fakechroot/fakechroot — Issue #1: symlinks to absolute path resolving to parent root filesystem
Author: devsk
Created: 2011-11-20 14:39:34+00:00
State: open

Hi,

I am not sure if anybody's faced this problem but a quick google did not yield any results. Here is my issue: inside the chroot, I have /usr/bin/env pointing to /bin/env. Anything that depends on /usr/bin/env fails to find /bin/env because the parent root filesystem does NOT have /bin/env.

e.g. /usr/bin/hg contains this line at the top:

#!/usr/bin/env python

It just fails to run. As soon as I create /bin/env in the parent rootfs, it starts to work!

So, chroot is escaping to the parent.

In fact, what I notice is that any symlink to an absolute path resolves in the parent root, whereas my expectation was that it would resolve within the chroot. This breaks almost everything (think Gentoo chroot and how it has wrappers managed using symlinks in that chroot) for doing any kind of builds inside the chroot. The good thing is the that parent root is not Gentoo, so the setup never works. Otherwise, it would be a silent bug.