openSUSE / obs-build

OBS build script, can be used with OBS or stand alone
GNU General Public License v2.0
133 stars 185 forks source link

pbuild deb package is missing LWP/UserAgent.pm #887

Open dcermak opened 2 years ago

dcermak commented 2 years ago

When you install obs-build from OBS on Ubuntu (tried 22.04 and 20.04), pbuild will fail to start with:

root@8bec339ceac9:/# pbuild --version
Can't locate LWP/UserAgent.pm in @INC (you may need to install the LWP::UserAgent module) (@INC contains: /usr/lib/build /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at /usr/lib/build/Build/Download.pm line 25.
BEGIN failed--compilation aborted at /usr/lib/build/Build/Download.pm line 25.
Compilation failed in require at /usr/lib/build/PBuild/RemoteAssets.pm line 28.
BEGIN failed--compilation aborted at /usr/lib/build/PBuild/RemoteAssets.pm line 28.
Compilation failed in require at /usr/lib/build/PBuild/AssetMgr.pm line 29.
BEGIN failed--compilation aborted at /usr/lib/build/PBuild/AssetMgr.pm line 29.
Compilation failed in require at /usr/bin/pbuild line 41.
BEGIN failed--compilation aborted at /usr/bin/pbuild line 41.

Reproducer:

Launch a container: podman run --rm -it docker.io/ubuntu:22.04 and run the following commands:

# apt update
# apt install gpg curl
# /etc/os-release
# echo "deb http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_$VERSION_ID/ /" | tee /etc/apt/sources.list.d/openSUSE:Tools.list
# curl -fsSL https://download.opensuse.org/repositories/openSUSE:Tools/xUbuntu_$VERSION_ID/Release.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/openSUSE_Tools.gpg > /dev/null
# apt update
# apt install obs-build
# pbuild --version
dcermak commented 2 years ago

XML::Parser is also not pulled in

mlschroe commented 2 years ago

It should not need XML::Parser.

mlschroe commented 2 years ago

Oh wait, the rpmmd parser uses it. Hmm, it's probably not that useful on debian, but I think adding it as recommends does not hurt.