Package: sbuild
Version: 0.81.2
Severity: normal
Tags: upstream

Dear Maintainer,

sbuild does not download packages unless libwww-perl is installed.

To reproduce:

$ docker run -it debian:bullseye /bin/bash # just to have a clean system
# apt-get update && apt-get -y install sbuild # same final result as using "apt 
install sbuild"
# sbuild --no-clean --arch-any --arch-all --no-source --dist=stable 
--arch=amd64  http://deb.debian.org/debian/pool/main/h/hello/hello_2.10-2.dsc
E: Failed to open build log 
//http://deb.debian.org/debian/pool/main/h/hello/hello_2.10-2.dsc_amd64-2022-04-19T10:20:26Z.build:
 No such file or directory
E: Error creating chroot

I expected the .dsc file to be downloaded.

After installing libwww-perl sbuild works as expected:

# apt-get -y install libwww-perl

# sbuild --no-clean --arch-any --arch-all --no-source --dist=stable 
--arch=amd64  http://deb.debian.org/debian/pool/main/h/hello/hello_2.10-2.dsc # 
it downloads the package as expected


Not a Perl programmer here but I followed the code:

/usr/bin/sbuild around line 103 does "check_url($jobname)" which is implemented 
in /usr/share/perl5/Sbuild/Utility.pm around line 166. It does:

    # Load LWP::UserAgent if possible, else return 0.
    if (! can_load( modules => { 'LWP::UserAgent' => undef, } )) {
        return 0;
    }

Without libwww-perl package installed it returns 0. Then sbuild assumes that
http://deb.debian.org/debian/pool/main/h/hello/hello_2.10-2.dsc is a
local file.

I don't know if the way to go is to make the error message more helpful
(suggesting to install the package?), or make libwww-perl a dependency
(or at least recommended). Or perhaps add a note in the manual? It
currently says "For .dsc files  in  remote locations,  the source
packages are downloaded first, then built." without noting that
libwww-perl is required for this.

Thank you,


-- System Information:
Debian Release: 11.3
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-security')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-13-amd64 (SMP w/4 CPU threads)
Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages sbuild depends on:
ii  adduser         3.118
ii  libsbuild-perl  0.81.2
ii  perl            5.32.1-4+deb11u2

Versions of packages sbuild recommends:
ii  autopkgtest  5.16
ii  debootstrap  1.0.123
ii  schroot      1.6.10-12

Versions of packages sbuild suggests:
ii  deborphan  1.7.33
ii  e2fsprogs  1.46.2-2
ii  kmod       28-1
ii  wget       1.21-1+deb11u1

-- no debconf information

Reply via email to