Package: sbuild
Version: 0.91.9
Severity: normal
X-Debbugs-Cc: [email protected]

sbuild has a option --build-dir, or $build_dir in sbuild.conf. It
specifies the output directory for build artifacts. When a to-be-created
directory name is supplied to this argument, it is expected that sbuild
will create the directory, while currently sbuild don't do that and
writes a file with a deb file:

        $ cd `mktemp -d`
        $ apt source --download-only hello
        $ sbuild --build-dir sbuild-artifacts --no-run-lintian 
--no-run-piuparts --no-run-autopkgtest *.dsc
        (...)
        du: cannot access 'sbuild-artifacts/hello_2.12.3-1.dsc': No such file 
or directory
        E: read_command failed to execute du
        E: Cannot determine space needed for 
sbuild-artifacts/hello_2.12.3-1.dsc (du failed):
        (...)
        $ ls -al sbuild-artifacts 
        -rw-r--r-- 1 billchenchina billchenchina 77352 Jun 26 03:02 
sbuild-artifacts
        $ file sbuild-artifacts 
        sbuild-artifacts: Debian binary package (format 2.0), with 
control.tar.xz , data compression xz
        $ dpkg -I sbuild-artifacts
         new Debian package, version 2.0.
         size 77352 bytes: control archive=1976 bytes.
             779 bytes,    21 lines      control
            3903 bytes,    53 lines      md5sums
         Package: hello
         Version: 2.12.3-1
         Architecture: amd64
        (...)

Please consider do some checks, create the directory if it does not
exist, before copying build artifacts from chroot to the build-dir.

-- System Information:
Debian Release: forky/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 7.0.13+deb14-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages sbuild depends on:
ii  iproute2        7.1.0-1
ii  libsbuild-perl  0.91.9
ii  mount           2.42.2-1
ii  passwd          1:4.19.3-2
ii  perl            5.40.1-8
ii  sbuild-schroot  0.91.9
ii  uidmap          1:4.19.3-2

Versions of packages sbuild recommends:
ii  apt-utils       3.3.1
ii  dpkg-dev        1.23.7
ii  mmdebstrap      1.5.7-3
ii  sbuild-schroot  0.91.9

Versions of packages sbuild suggests:
ii  autopkgtest  5.55
ii  piuparts     1.6.0

-- no debconf information

Reply via email to