Translation(s): none

(!) ?Discussion

Mini HOWTO create a Debian fakechroot

First you need to install fakeroot, fakechroot, debootstrap and dpkg.

Then, as your normal user:

# mkdir -p fakechroot/debian
# fakechroot # sets environment variables required by debootstrap --variant=fakechroot
# fakeroot
# export PATH=/usr/sbin:/sbin:$PATH
# debootstrap --foreign --variant=fakechroot --exclude dhcp3-server,dhcp3-server-ldap sid fakechroot/debian
# echo "int main() { return 0; }" | gcc -x c - -o fakechroot/debian/usr/sbin/chown
# echo "int main() { return 0; }" | gcc -x c - -o fakechroot/debian/usr/sbin/chmod
# echo "int main() { return 0; }" | gcc -x c - -o fakechroot/debian/usr/sbin/chgrp
# DEBOOTSTRAP_DIR=fakechroot/debian/debootstrap debootstrap --second-stage --second-stage-target=fakechroot/debian

Note that I have replaced chown/chmod/chgrp by dummies in this HOWTO. This is because there seems to be trouble with them. You can replace them later by real ones if you like. I also exclude dhcp3-server* as it uses rm together with an absolute path and rm is not mapped by fakechroot, therefore this doesn't work. The easiest method here was to just exclude it.

(Btw., it took some time to figure out all the problems and how to work around them.)