Does not wrap *at() functions which makes fakechroot fail badly with Hardy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
fakechroot (Debian) |
Fix Released
|
Unknown
|
|||
fakechroot (Ubuntu) |
Fix Released
|
Undecided
|
Martin Pitt | ||
Hardy |
Fix Released
|
High
|
Martin Pitt | ||
Intrepid |
Fix Released
|
Undecided
|
Martin Pitt |
Bug Description
Binary package hint: fakechroot
Using fakechroot to debootstrap and work with Ubuntu had worked fine until Gutsy. With Hardy it breaks completely, scripts fail with all sorts of weird errors, such as rm claiming that /etc/shells.tmp does not exist (although it does).
The reason is that Hardy's glibc and coreutils started to use the new *at() family of system calls, such as fxstatat(), openat(), etc., but fakechroot does not handle them at all. Thus paths are not converted to the fakechroot environment.
TEST CASE:
sudo apt-get install fakechroot fakeroot
mkdir /tmp/c
cd /tmp/c
mkdir bin lib
cp /lib/*.so lib
cp /bin/{bash,
fakeroot fakechroot chroot /tmp/c
Now try some commands in the chroot and see how many break with absolute path names:
$ mkdir /test
$ echo hello > /test/foo
$ ls /test/foo
/test/foo
$ rm /test/foo
rm: cannot remove `/test/foo': No such file or directory
$ rm -r /test
rm: cannot remove `/test': No such file or directory
They do work with relative paths:
$ rm test/foo
$ rm -r test
With the updated version of fakechroot, the ones with absolute path names work.
If you do not mind downloading some MB from the net, you can/should test debootstrapping:
sudo apt-get install debootstrap
fakeroot fakechroot debootstrap --variant=
(use your local mirror). This fails horribly with the fakechroot in hardy final, but should work with the hardy-proposed version.
Related branches
description: | updated |
Changed in fakechroot: | |
status: | Unknown → New |
Changed in fakechroot: | |
status: | New → Fix Committed |
Changed in fakechroot: | |
status: | Fix Committed → Fix Released |
Fixed in Intrepid yesterday:
fakechroot (2.6-1.3ubuntu2) intrepid; urgency=low
* src/libfakechro ot.c:
- Define openat(), to unbreak rm -r.
- Define fchmodat(), to unbreak chmod.
- Define fchownat(), to unbreak chown.
This fixes everything which broke debootstrapping Hardy.
* test/fakechroot.sh: Add cp, mkdir, chmod.
-- Martin Pitt <email address hidden> Thu, 08 May 2008 22:13:43 +0200
fakechroot (2.6-1.3ubuntu1) intrepid; urgency=low
* src/libfakechro ot.c: Provide wrapping of unlinkat(), __fxstatat(), and
__fxstatat64() to unbreak rm'ing absolute directories. This extends the
original patch from Daniel Kahn Gillmor in Debian #473682. Still
incomplete, since other *at() functions are still missing, but those are
the most pressing which cause the Apport retracers to fail so badly.
* test/fakechroot.sh: Add /bin/rm, and call bash instead of sh.
-- Martin Pitt <email address hidden> Thu, 08 May 2008 20:45:48 +0200