Package: sbuild
Version: 0.85.0
Severity: normal
X-Debbugs-Cc: vagr...@reproducible-builds.org

Using the following sbuild.conf:

  $chroot_mode = 'unshare';
  $build_user = 'user7777';

Results in this error:

  Check disk space
  ----------------

  runuser: user vagrant does not exist or the user entry does not contain all 
the required fields
  E: read_command failed to execute du
  Use of uninitialized value $current_usage in scalar chomp at 
/usr/share/perl5/Sbuild/Build.pm line 2271.
  E: du exited with non-zero exit status 256
  runuser: user vagrant does not exist or the user entry does not contain all 
the required fields
  E: read_command failed to execute du
  E: Cannot determine space needed for /<<PKGBUILDDIR>> (du failed)

If I add the following to sbuild.conf:

  $external_commands = {
    "chroot-setup-commands" => [
       ['useradd', '--uid', '1000', '--user-group', '--shell', '/bin/bash', 
'--groups', 'sbuild', 'vagrant' ],
  ]};

Then it works for me, and actually builds as the user specified with
$build_user.

Seems like it should also use $build_user for the check disk space
command as well!

live well,
  vagrant

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

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

Versions of packages sbuild depends on:
ii  adduser         3.131
ii  libsbuild-perl  0.85.0
ii  perl            5.36.0-7

Versions of packages sbuild recommends:
pn  autopkgtest  <none>
pn  debootstrap  <none>
pn  schroot      <none>
ii  uidmap       1:4.13+dfsg1-1

Versions of packages sbuild suggests:
pn  deborphan  <none>
ii  e2fsprogs  1.46.6-1
ii  kmod       30+20221128-1
ii  wget       1.21.3-1+b2

-- no debconf information

Reply via email to