commit:     ab723c54aa0fef50384dbbb936614c7430f5413b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 14 23:57:12 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Nov 15 01:23:26 2021 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=ab723c54

gen_initramfs.sh: append_busybox: NSS dns module was merged into libc in 
>=glibc-2.34

Bug: https://bugs.gentoo.org/823716
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_initramfs.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 56d6a03..fef8046 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -562,8 +562,16 @@ append_busybox() {
        if isTrue "$(is_glibc)"
        then
                local libdir=$(get_chost_libdir)
-               mkdir -p "${TDIR}"/lib || gen_die "Failed to create 
'${TDIR}/lib'!"
-               copy_system_binaries "${TDIR}"/lib "${libdir}"/libnss_dns.so
+               local libnss_dns="${libdir}/libnss_dns.so"
+
+               # NSS dns module was moved into libc in >=glibc-2.34
+               # but when this file exists we are probably dealing with older 
glibc
+               # and need to manually copy the module.
+               if [[ -f "${libnss_dns}" ]]
+               then
+                       mkdir -p "${TDIR}"/lib || gen_die "Failed to create 
'${TDIR}/lib'!"
+                       copy_system_binaries "${TDIR}"/lib "${libnss_dns}"
+               fi
        fi
 
        log_future_cpio_content

Reply via email to