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 C6E1613835A for ; Sat, 27 Mar 2021 00:00:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E1839E0809; Sat, 27 Mar 2021 00:00:13 +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 CC7C9E0809 for ; Sat, 27 Mar 2021 00:00:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 957F1335D77 for ; Sat, 27 Mar 2021 00:00:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 199E5634 for ; Sat, 27 Mar 2021 00:00:11 +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: <1616801946.61049d2954dcf04bd2a2f38ac398fc406e45695f.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_compile.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 61049d2954dcf04bd2a2f38ac398fc406e45695f X-VCS-Branch: master Date: Sat, 27 Mar 2021 00:00:11 +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: 234e39a2-462f-464e-a1fc-b3cc06d816df X-Archives-Hash: f68c028b8a063159a0d2c9be4621b092 commit: 61049d2954dcf04bd2a2f38ac398fc406e45695f Author: Thomas Deutschmann gentoo org> AuthorDate: Fri Mar 26 23:39:06 2021 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Fri Mar 26 23:39:06 2021 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=61049d29 gen_compile.sh: populate_binpkg(): Throw away binpkg when glibc has changed It was reported that dropbear in genkernel initramfs crashed when client tried to connect. The problem is, that while we are compiling statically, we still depend on used glibc version. I.e. dropbear binpkg was created against glibc version A, but when genkernel initramfs will be created, we will copy system libraries from whatever glibc version host is currently using which doesn't necessarily need to match used glibc version when binpkg was created which could result in reported problem. This commit will make genkernel treat binpkg as stale when glibc was changed since binpkg was created to force a rebuild. Signed-off-by: Thomas Deutschmann gentoo.org> gen_compile.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gen_compile.sh b/gen_compile.sh index d755150..e2b86cc 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -510,6 +510,23 @@ populate_binpkg() { unset patch patchdir fi + if [[ -f "${BINPKG}" ]] + then + if isTrue "$(is_glibc)" + then + local libdir=$(get_chost_libdir) + local glibc_test_file="${libdir}/libnss_files.so" + + if [[ "${BINPKG}" -ot "${glibc_test_file}" ]] + then + print_info 3 "${CHECK_LEVEL_PREFIX}Glibc (${glibc_test_file}) is newer than us; Removing stale ${P} binpkg ..." + rm "${BINPKG}" || gen_die "Failed to remove stale binpkg '${BINPKG}'!" + fi + + print_info 3 "${CHECK_LEVEL_PREFIX}Existing ${P} binpkg is newer than glibc (${glibc_test_file}); Skipping ..." + fi + fi + if [[ ! -f "${BINPKG}" ]] then print_info 3 "${CHECK_LEVEL_PREFIX}Binpkg '${BINPKG}' does NOT exist; Need to build ${P} ..."