Package: debirf
Version: 0.34
Severity: normal
Tags: patch

Dear Maintainer,

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.

The following patch replaces fakechroot ldd and ldconfig by
original versions, and build /etc/ld.so.cache.

Regards,
JH Chatenet

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"



-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages debirf depends on:
ii  apt          1.0.5
ii  cpio         2.11+dfsg-2
ii  debootstrap  1.0.60
ii  fakechroot   2.17.2-1
ii  fakeroot     1.18.4-2
ii  klibc-utils  2.0.3-1

Versions of packages debirf recommends:
ii  grub-common  2.00-22
ii  lsb-release  4.1+Debian13
ii  xorriso      1.3.2-1

debirf suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to