From: Michael Prokop Date: Thu, 11 Jul 2019 09:47:20 +0000 (+0200) Subject: Ensure locating libnss* files doesn't fail on merged-usr systems X-Git-Tag: debian/1%20180603+grml.3~1 X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=commitdiff_plain;h=d189b077107016d0128d4c9d48220b5788291b0b Ensure locating libnss* files doesn't fail on merged-usr systems Since debootstap v1.0.102 it defaults to --merged-usr, creating /{bin,sbin,lib}/ symlinks pointing to their counterparts in /usr/ Debian/buster provides debootstrap 1.0.114 and therefore defaults to --merged-usr as well. If the grml-live build environment is based on Debian/buster we get this as default. Inside backend/initramfs-tools/live.hook we have: | for _SHLIB in $(find /lib -name 'libnss_dns.so.*' -o -name 'libnss_files.so.*') | do | copy_exec "${_SHLIB}" | done So if /lib is a symlink to /usr/lib (with merged-usr), then the `find /lib ...` won't find any files (since it doesn't follow the symlink). This change fixes this behavior. Development sponsored by Sipwise GmbH. This is reported as TT#62500 in customer's ticket system. --- diff --git a/backend/initramfs-tools/live.hook b/backend/initramfs-tools/live.hook index ef148b6..ff5fa70 100755 --- a/backend/initramfs-tools/live.hook +++ b/backend/initramfs-tools/live.hook @@ -246,7 +246,7 @@ fi # /lib/libnss_files.so.*: /etc/hosts and /etc/passwd # /lib/libnss_compat.so.*: /etc/passwd -for _SHLIB in $(find /lib -name 'libnss_dns.so.*' -o -name 'libnss_files.so.*') +for _SHLIB in $(find /lib/ -name 'libnss_dns.so.*' -o -name 'libnss_files.so.*') do copy_exec "${_SHLIB}" done