Package: fakechroot
Version: 2.19-3
Severity: minor
Tags: patch


Dear Maintainer,

fakechroot behaves strangely if the environment variable CDPATH is set :

$ mkdir some_directory
$ CDPATH=/home/me/some_directory
$ export CDPATH
$ cd some_directory
$ fakechroot fakeroot -s ../.fakeroot.state debootstrap --variant=fakechroot 
sid mychroot http://debian.univ-lorraine.fr/debian
[ ... ]
I: Base system installed successfully.
$ echo $?
0
$ fakechroot fakeroot -i ../.fakeroot.state -s ../.fakeroot.state chroot 
mychroot
/usr/sbin/chroot: cannot change root directory to 
'/home/me/some_directory/mychroot'$'\n''/home/me/some_directory/mychroot': No 
such file or directory
$ echo $?
125

One recover the expected behavior if CDPATH is unset (see the patch below) :

$ fakechroot fakeroot -i ../.fakeroot.state -s ../.fakeroot.state chroot 
mychroot
# echo $?
0
# pwd
/

Regards,
JH Chatenet

PS : The inspiration comes from debian bug #848693 :
debirf : crashes if CDPATH is set


--- /usr/bin/fakechroot.orig
+++ /usr/bin/fakechroot
@@ -9,6 +9,7 @@
 
 FAKECHROOT_VERSION=2.19
 
+unset CDPATH
 
 fakechroot_die () {
     echo "$@" 1>&2





-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages fakechroot depends on:
ii  libfakechroot  2.19-3

fakechroot recommends no packages.

fakechroot suggests no packages.

-- no debconf information

Reply via email to