From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 35811138334 for ; Sat, 14 Dec 2019 00:26:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2536CE088B; Sat, 14 Dec 2019 00:26:53 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EC535E0871 for ; Sat, 14 Dec 2019 00:26:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9E82134D97C for ; Sat, 14 Dec 2019 00:26:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D4CB8D3 for ; Sat, 14 Dec 2019 00:26:49 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1576281933.7d7d95509fcecd86476e705bc52fa147452139c3.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_funcs.sh gen_initramfs.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 7d7d95509fcecd86476e705bc52fa147452139c3 X-VCS-Branch: master Date: Sat, 14 Dec 2019 00:26:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 59548112-ef9a-4829-8df2-5631b94836ac X-Archives-Hash: 826870fb421c86028cacd0a0e85f2e6f commit: 7d7d95509fcecd86476e705bc52fa147452139c3 Author: Thomas Deutschmann gentoo org> AuthorDate: Fri Dec 13 20:56:40 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sat Dec 14 00:05:33 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=7d7d9550 gen_funcs.sh: get_chost_libdir(): Use libc.a to determine CHOST libdir libc.a is required for almost every package in initramfs whereas libnss_files.so isn't available in musl for example. Signed-off-by: Thomas Deutschmann gentoo.org> gen_funcs.sh | 7 +++++-- gen_initramfs.sh | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gen_funcs.sh b/gen_funcs.sh index f5dd0cd..32d367e 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -860,10 +860,13 @@ debug_breakpoint() { get_chost_libdir() { local cc=$(tc-getCC) - local test_file=$(${cc} -print-file-name=libnss_files.so 2>/dev/null) + local test_file=$(${cc} -print-file-name=libc.a 2>/dev/null) if [ -z "${test_file}" ] then - gen_die "$(get_useful_function_stack "${FUNCNAME}")Unable to determine CHOST's libdir: '${cc} -print-file-name=libnss_files.so' returned nothing!" + gen_die "$(get_useful_function_stack "${FUNCNAME}")Unable to determine CHOST's libdir: '${cc} -print-file-name=libc.a' returned nothing!" + elif [[ "${test_file}" == "libc.a" ]] + then + gen_die "$(get_useful_function_stack "${FUNCNAME}")Unable to determine CHOST's libdir: '${cc} -print-file-name=libc.a' returned no path!" fi local test_file_realpath=$(realpath "${test_file}" 2>/dev/null) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 6150cba..ab7b151 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -461,7 +461,7 @@ append_busybox() { # allow for DNS resolution 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.2 + copy_system_binaries "${TDIR}"/lib "${libdir}"/libnss_dns.so log_future_cpio_content find . -print0 | "${CPIO_COMMAND}" ${CPIO_ARGS} --append -F "${CPIO_ARCHIVE}" \ @@ -955,7 +955,7 @@ append_linker() { mkdir -p "${TDIR}"/sbin || gen_die "Failed to create '${TDIR}/sbin'!" local libdir=$(get_chost_libdir) - copy_system_binaries "${TDIR}/sbin" "${libdir}/../sbin/ldconfig" + copy_system_binaries "${TDIR}/sbin" "${libdir}/../../sbin/ldconfig" else # Only copy /etc/ld.so.conf.d -- /etc/ld.so.conf was already # added to CPIO via append_base_layout() and because we only @@ -1323,7 +1323,7 @@ append_dropbear() { local libdir=$(get_chost_libdir) mkdir -p "${TDIR}"/lib || gen_die "Failed to create '${TDIR}/lib'!" - copy_system_binaries "${TDIR}"/lib "${libdir}"/libnss_files.so.2 + copy_system_binaries "${TDIR}"/lib "${libdir}"/libnss_files.so cd "${TDIR}" || gen_die "Failed to chdir to '${TDIR}'!"