az@server ~ $ fakechroot az@server ~ $ chroot debian-fakechroot fakechroot: dlsym(__fxstatat): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(__fxstatat64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(__lxstat): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(__lxstat64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(__open): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(__open64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(__xmknod): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(__xstat): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(__xstat64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(access): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(acct): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(bind): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(canonicalize_file_name): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(chdir): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(chmod): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(chown): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(connect): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(creat): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(creat64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(dlmopen): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(dlopen): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(eaccess): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(euidaccess): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(execve): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(execvp): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(fchmodat): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(fchownat): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(fopen): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(fopen64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(freopen): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(freopen64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(fts_open): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(ftw): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(ftw64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(get_current_dir_name): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(getcwd): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(getpeername): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(getsockname): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(getwd): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(getxattr): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(glob): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(glob64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(glob_pattern_p): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(lchown): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(lgetxattr): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(link): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(listxattr): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(llistxattr): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(lremovexattr): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(lsetxattr): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(lutimes): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(mkdir): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(mkdirat): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(mkdtemp): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(mknod): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(mkfifo): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(mkstemp): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(mkstemp64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(mktemp): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(nftw): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(nftw64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(open): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(open64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(openat): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(openat64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(opendir): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(pathconf): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(readlink): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(realpath): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(remove): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(removexattr): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(rename): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(renameat): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(rmdir): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(scandir): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(scandir64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(setxattr): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(symlink): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(tempnam): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(tmpnam): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(truncate): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(truncate64): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(unlink): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(unlinkat): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(utime): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(utimes): RTLD_NEXT used in code not dynamically loaded Segmentation fault az@server ~ $
... fakechroot: dlsym(utime): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(utimes): RTLD_NEXT used in code not dynamically loaded Program received signal SIGSEGV, Segmentation fault. 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () #1 0xb7f355e0 in fopen () from /usr/lib/fakechroot/libfakechroot.so #2 0xbfa54b3c in ?? () #3 0xb7da5c98 in ?? () from /home/az/debian-fakechroot/lib/libnss_compat.so.2 #4 0x00000000 in ?? () (gdb) q The program is running. Exit anyway? (y or n) y az@server ~ $
az@server ~ $ emerge --info Portage 2.1.6.13 (default/linux/x86/2008.0/server, gcc-4.1.2, glibc-2.9_p20081201-r2, 2.6.26.7 i686) ================================================================= System uname: Linux-2.6.26.7-i686-AMD_Athlon-tm-_Processor-with-glibc2.0 Timestamp of tree: Tue, 11 Aug 2009 13:30:01 +0000 distcc 3.1 i686-pc-linux-gnu [disabled] app-shells/bash: 3.2_p39 dev-lang/python: 2.4.4-r9, 2.5.4-r3 dev-python/pycrypto: 2.0.1-r6 dev-util/cmake: 2.6.4 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -march=athlon -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp6.uni-erlangen.de/pub/mirrors/gentoo ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ ftp://mirror.nutsmaas.nl/gentoo/" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/private" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X509 a52 aac acl apache2 authdaemond bash-completion bcmath berkdb binary bzip2 cgi cli cracklib crypt ctype cups curl dhcp dv encode exif extensions fam fastcgi flac flash fortran gd gdbm gif gmp gpm hash highlight iconv idn imap inifile isdnlog ithreads jpeg kerberos leim linuxthreads-tls logrotate lzo mad maildir mbox memcache mhash mp3 mudflap multitarget mysql ncurses nls no-htdocs noaudio nojoystick novideo nptl nptlonly ocaml ogg openmp pam passwordsave pcntl pcre pdf perl php png pppd python qt-static qt3-static quotas readline reflection samba sasl server session sftp sharedext slang slp snmp sockets socks5 spl ssl subversion sysfs tcpd threads tiff tools truetype unicode unzip urandom vda vidix vorbis win32codecs winbind x86 xanim xattr xml xorg xvid zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Oh, this is interesting: az@server ~ $ fakeroot server ~ # chroot chroot: missing operand Try `chroot --help' for more information. server ~ # chroot debian-fakechroot chroot: cannot change root directory to debian-fakechroot: Operation not permitted server ~ # fakechroot server ~ # chroot debian-fakechroot fakechroot: dlsym(__fxstatat): RTLD_NEXT used in code not dynamically loaded ... fakechroot: dlsym(utime): RTLD_NEXT used in code not dynamically loaded fakechroot: dlsym(utimes): RTLD_NEXT used in code not dynamically loaded Segmentation fault server ~ # env | grep LD LD_PRELOAD=libfakechroot.so libfakeroot.so LD_LIBRARY_PATH=/usr/lib/fakechroot:/usr/lib:/usr/lib64/libfakeroot:/usr/lib32/libfakeroot server ~ # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib server ~ # chroot debian-fakechroot I have no name!@server:/# ... Yay, at least this continues: server ~ # DEBOOTSTRAP_DIR=debian-fakechroot/debootstrap debootstrap --second-stage --second-stage-target=debian-fakechroot --variant=fakechroot I: Installing core packages... I: Unpacking required packages... I: Unpacking base-files... I: Unpacking base-passwd... I: Unpacking bash... I: Unpacking binutils... ...
Well, still not really: root@server:/# ping www.google.de ping: icmp open socket: Operation not permitted root@server:/# ls bin dev home media opt root selinux sys usr boot etc lib mnt proc sbin srv tmp var root@server:/# apt-get install lynx apt-get: /lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /home/az/debian-fakechroot/usr/lib/libstdc++.so.6) root@server:/# ls /lib/libgcc_s.so.1 /lib/libgcc_s.so.1 root@server:/# ldd /lib/libgcc_s.so.1 /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000) libc.so.6 => /lib/libc.so.6 (0x00000000) root@server:/# type apt-get apt-get is hashed (/usr/bin/apt-get) root@server:/# env | grep LD LD_PRELOAD=libfakechroot.so libfakeroot.so LD_LIBRARY_PATH=/usr/lib/fakechroot:/usr/lib:/usr/lib64/libfakeroot:/usr/lib32/libfakeroot::/lib:/home/az/debian-fakechroot/usr/lib:/home/az/debian-fakechroot/lib root@server:/# LD_LIBRARY_PATH=/usr/lib/fakechroot:/usr/lib:/usr/lib64/libfakeroot:/usr/lib32/libfakeroot:/home/az/debian-fakechroot/usr/lib:/home/az/debian-fakechroot/lib root@server:/# apt-get install lynx fakechroot: dlsym(__fxstatat): RTLD_NEXT used in code not dynamically loaded ... fakechroot: dlsym(utimes): RTLD_NEXT used in code not dynamically loaded Segmentation fault
I've just committed latest, fakechroot-2.11 to Portage, might as well check if this is still a problem... ?