[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#774331: debootstrap: fakechroot variant fails with fakechroot not found



On 2014-12-31, Dan Greene wrote:
> As a normal user, trying to run debootstrap --variant=chroot
> (after starting fakeroot and fakechroot)

Do you mean --variant=fakechroot ?

I can't reproduce your "chroot: not found" issue, though it fails in
other ways... What are the exact commands you used? I used this:

  fakechroot fakeroot /usr/sbin/debootstrap --variant=fakechroot jessie jessie http://ftp.us.debian.org/debian

The order of fakechroot and fakeroot supposedly matters, according to
the fakechroot manpage.


> yields the following:
> [output omitted]
> I: Installing core packages...
> W: Failure trying to run: chroot /home/user/debootstrap-test dpkg --force-depends --install /var/cache/apt/archives/base-passwd_3.5.37_amd64.deb
> W: See /home/user/debootstrap-test/debootstrap/debootstrap.log for details

Mine fails with:

  I: Configuring systemd-sysv...
  I: Configuring init...
  W: Failure while configuring required packages.
  W: See /tmp/tmp.odgbAKw69L/jessie/debootstrap/debootstrap.log for
     details (possibly the package systemd is at fault)

It has already successfully installed base-passwd by that point:

  $ dpkg --root=jessie -l base-passwd | grep ^ii
  ii  base-passwd    3.5.37       amd64        Debian base system master password and group files


> root@debian:~# less debootstrap-test/debootstrap/debootstrap.log
> gpgv: Signature made Wed Dec 31 14:57:43 2014 CST using RSA key ID 46925553
> gpgv: Good signature from "Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>"
> /usr/sbin/debootstrap: 905: /usr/sbin/debootstrap: chroot: not found
>
> It seems that chroot isn't in the default $PATH for a normal user, causing
> debootstrap to fail.

And in debootstrap.log:

  Setting up systemd (215-8) ...
  Initializing machine ID from random generator.
  chfn: PAM: System error
  adduser: `/usr/bin/chfn -f systemd Time Synchronization
  systemd-timesync' returned error code 1. Exiting.
  dpkg: error processing package systemd (--configure):
   subprocess installed post-installation script returned error exit
   status 1
   Setting up dmsetup (2:1.02.90-2) ...
   dpkg: systemd-sysv: dependency problems, but configuring anyway as you
   requested:
    systemd-sysv depends on systemd (= 215-8); however:
      Package systemd is not configured yet.
       systemd-sysv depends on systemd; however:
         Package systemd is not configured yet.
  
  Setting up systemd-sysv (215-8) ...
  Setting up init (1.22) ...
  Errors were encountered while processing:
   systemd


It looks like /usr/share/debootstrap/functions contains something to
adjust the path to ensure the presence of /usr/sbin and /sbin:

  install_fakechroot_tools () {
  	if [ "$VARIANT" = "fakechroot" ]; then
  		export PATH=/usr/sbin:/sbin:$PATH
  	fi


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature


Reply to: