Package: sbuild Version: 0.65.2-1 Severity: normal User: de...@kali.org Usertags: origin-kali
I had to reinstall a machine, but I had the possibility to keep around all the build chroots since they were stored in a separate filesystem. So I did that but the resulting system failed miserably. sbuild would not run, it would immediately fail (cf log below). I had to resort to strace-debugging to understand that it failed while it tried to create /var/lib/sbuild/apt.conf.XXXX in the chroot. Since the sbuild user is created dynamically, it had a different uid outside the chroot compared to inside the chroot. And this operation failed with EPERM. IMO sbuild should: - be fixed to error out with a clear error message of what went wrong - probably do a "chown -R sbuild:sbuild /var/lib/sbuild" inside the chroot just like it already does for other files Sample build log: sbuild (Debian sbuild) 0.65.2 (24 Mar 2015) on nike.kali.org ╔══════════════════════════════════════════════════════════════════════════════╗ ║ metasploit-framework 4.11.4-2015071403-0kali4 (armhf) 31 Aug 2015 20:01 ║ ╚══════════════════════════════════════════════════════════════════════════════╝ Package: metasploit-framework Version: 4.11.4-2015071403-0kali4 Source Version: 4.11.4-2015071403-0kali4 Distribution: sana Machine Architecture: armhf Host Architecture: armhf Build Architecture: armhf I: NOTICE: Log filtering will replace 'build/metasploit-framework-S5uMzw/metasploit-framework-4.11.4-2015071403' with '«PKGBUILDDIR»' I: NOTICE: Log filtering will replace 'build/metasploit-framework-S5uMzw' with '«BUILDDIR»' I: NOTICE: Log filtering will replace 'var/run/schroot/mount/sana-armhf-sbuild-5af8621c-1249-48b9-933c-d54c828182ad' with '«CHROOT»' ┌──────────────────────────────────────────────────────────────────────────────┐ │ Summary │ └──────────────────────────────────────────────────────────────────────────────┘ Build Architecture: armhf Build-Space: 0 Build-Time: 0 Distribution: sana Fail-Stage: init Host Architecture: armhf Install-Time: 0 Job: /srv/build.kali.org/build/work/metasploit-framework_4.11.4-2015071403-0kali4.dsc Machine Architecture: armhf Package: metasploit-framework Package-Time: 0 Source-Version: 4.11.4-2015071403-0kali4 Space: 0 Status: failed Version: 4.11.4-2015071403-0kali4 ──────────────────────────────────────────────────────────────────────────────── Finished at 20150831-2001 Build needed 00:00:00, 0k disc space -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.1.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages sbuild depends on: ii adduser 3.113+nmu3 ii apt-utils 1.0.9.10 ii libsbuild-perl 0.65.2-1 ii perl 5.20.2-6 Versions of packages sbuild recommends: ii debootstrap 1.0.72 ii fakeroot 1.20.2-1 Versions of packages sbuild suggests: pn deborphan <none> ii wget 1.16.3-3 -- no debconf information