On Thu, Dec 30, 2010 at 09:31:12PM +0100, Jakub Wilk wrote: > Package: sbuild > Version: 0.60.7-1 > > If you don't have sudo installed, sbuild-createchroot ends with these > error messages: > > | I: sudo chroot configuration linked as /etc/sbuild/chroot/sid-i386-sbuild. > | Can't exec "sudo": No such file or directory at > /usr/share/perl5/Sbuild/Chroot.pm line 306. > | Failed to exec: sudo: No such file or directory at > /usr/share/perl5/Sbuild/Chroot.pm line 307. > | Can't exec "sudo": No such file or directory at > /usr/share/perl5/Sbuild/Chroot.pm line 306. > | Failed to exec: sudo: No such file or directory at > /usr/share/perl5/Sbuild/Chroot.pm line 307. > | E: Failed to create build directory /build > | Failed to set up chroot > | E: Error creating chroot session: skipping apt update > > However, sbuild doesn't recommend or suggest sudo.
It shouldn't be using it. sbuild-createchroot can't use schroot to finish final setup of the chroot (run apt-get update,dist-upgrade, create build directory and other bits.) because it might not be installed, or the chroot name may clash. So we use chroot(8) instead via the Sbuild::ChrootPlain module. This only uses sudo when not root (required for running chroot(8)), but since debootstrap requires root and hence we are already root this should never occur. I'll double check the logic in Sbuild::ChrootPlain; I had sudo installed during testing, so it's possible I missed something. Looking at it, I think push(@cmdline, $self->get_conf('SUDO')) if ($need_chroot || $need_su); should be push(@cmdline, $self->get_conf('SUDO')) if (($need_chroot || $need_su) && $user ne 'root'); Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
signature.asc
Description: Digital signature