On Fri, Jul 11 2014, jhcha54008 <jhcha54...@free.fr> wrote: > As stated in http://cmrg.fifthhorseman.net/ticket/80 : in a debirf instance > built with > ROOT_BUILD=false, ldconfig and ldd are not the fully functional executables > but the > scripts which come with fakechroot. There is no /etc/ld.so.cache. > > As a result, softwares which rely on /etc/ld.so.cache (and paths in > /etc/ld.so.conf.d/* > files) to find their libraries may break when run in a debirf instance, > e.g. fakechroot : in a booted debirf instance > > # dpkg -l fakechroot > ||/ Name Version Architecture Description > +++-===========-=========-=============-=========================================== > ii fakechroot 2.17.2-1 all gives a fake chroot environment - > utilities > # FAKECHROOT_DETECT=1 fakechroot echo > fakechroot: preload library not found, aborting.
Just for clarification, the above error comes from running fakechroot on a booted debirf instance? > diff -Naur a/usr/share/debirf/modules/z1_clean-root > b/usr/share/debirf/modules/z1_clean-root > --- a/usr/share/debirf/modules/z1_clean-root 2014-07-09 22:28:14.000000000 > +0200 > +++ b/usr/share/debirf/modules/z1_clean-root 2014-07-09 22:37:49.000000000 > +0200 > @@ -28,3 +28,16 @@ > > # setup dynamically updated /etc/mtab > ln -sf /proc/mounts "$DEBIRF_ROOT/etc/mtab" > + > +# remove diversions added by debootstrap > +# (debootstrap 1.0.60, function install_fakechroot_tools, > +# file /usr/share/debootstrap/functions lines 1397-1582 ) > +if [ "$ROOT_BUILD" = 'false' ]; then > + debirf_exec dpkg-divert --remove /sbin/ldconfig > + mv -f "$DEBIRF_ROOT/sbin/ldconfig.REAL" "$DEBIRF_ROOT/sbin/ldconfig" > + debirf_exec dpkg-divert --remove /usr/bin/ldd > + mv -f "$DEBIRF_ROOT/usr/bin/ldd.REAL" "$DEBIRF_ROOT/usr/bin/ldd" > +fi > + > +# setup ld.so cache > +/sbin/ldconfig -r "$DEBIRF_ROOT" I think it would good to have more comments around these snippets to describe why all this is necessary. jamie.
pgpkYPgoIL5hQ.pgp
Description: PGP signature