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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3E1F5158089 for ; Mon, 18 Sep 2023 09:55:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 779A02BC069; Mon, 18 Sep 2023 09:55:05 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5AB2E2BC069 for ; Mon, 18 Sep 2023 09:55:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 46342335CAF for ; Mon, 18 Sep 2023 09:55:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D5A3A11DA for ; Mon, 18 Sep 2023 09:55:02 +0000 (UTC) From: "WANG Xuerui" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "WANG Xuerui" Message-ID: <1695030889.9e5d587b00d17b5d3c2fc3d76b2f9cd7803df3ee.xen0n@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/glibc/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/glibc/glibc-2.38-r3.ebuild sys-libs/glibc/glibc-9999.ebuild X-VCS-Directories: sys-libs/glibc/ X-VCS-Committer: xen0n X-VCS-Committer-Name: WANG Xuerui X-VCS-Revision: 9e5d587b00d17b5d3c2fc3d76b2f9cd7803df3ee X-VCS-Branch: master Date: Mon, 18 Sep 2023 09:55:02 +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: e2d71dd5-432e-4048-b7b9-fa57094b25a4 X-Archives-Hash: ed75eda5a5897f34dc1439c50282984d commit: 9e5d587b00d17b5d3c2fc3d76b2f9cd7803df3ee Author: WANG Xuerui gentoo org> AuthorDate: Sun Aug 27 07:06:07 2023 +0000 Commit: WANG Xuerui gentoo org> CommitDate: Mon Sep 18 09:54:49 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e5d587b sys-libs/glibc: refresh ld.so.cache if natively installing >=2.38 on loong The 2.38 change is ~loong-only to avoid triggering rebuilds on other arches. Closes: https://github.com/gentoo/gentoo/pull/32470 Reviewed-by: Sam James gentoo.org> Signed-off-by: WANG Xuerui gentoo.org> .../{glibc-9999.ebuild => glibc-2.38-r3.ebuild} | 31 ++++++++++++++++++++-- sys-libs/glibc/glibc-9999.ebuild | 26 ++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-2.38-r3.ebuild similarity index 98% copy from sys-libs/glibc/glibc-9999.ebuild copy to sys-libs/glibc/glibc-2.38-r3.ebuild index 4e85a4b43e39..2e8876560419 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-2.38-r3.ebuild @@ -6,7 +6,7 @@ EAPI=8 # Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc # Please read & adapt the page as necessary if obsolete. -PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_COMPAT=( python3_{9..12} ) TMPFILES_OPTIONAL=1 inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ @@ -20,7 +20,7 @@ SLOT="2.2" EMULTILIB_PKG="true" # Gentoo patchset (ignored for live ebuilds) -PATCH_VER=1 +PATCH_VER=3 PATCH_DEV=dilfridge # gcc mulitilib bootstrap files version @@ -40,6 +40,7 @@ if [[ ${PV} == 9999* ]]; then inherit git-r3 else #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~loong" SRC_URI="mirror://gnu/glibc/${P}.tar.xz" SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" fi @@ -1638,6 +1639,21 @@ pkg_preinst() { fi } +glibc_refresh_ldconfig() { + if [[ ${MERGE_TYPE} == buildonly ]]; then + return + fi + + # Version check could be added to avoid unnecessary work, but ldconfig + # should finish quickly enough to not matter. + ebegin "Refreshing ld.so.cache" + ldconfig -i + if ! eend $?; then + ewarn "Failed to refresh the ld.so.cache for you. Some programs may be broken" + ewarn "before you manually do so (ldconfig -i)." + fi +} + pkg_postinst() { # nothing to do if just installing headers just_headers && return @@ -1648,6 +1664,17 @@ pkg_postinst() { fi if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + # glibc-2.38+ on loong has ldconfig support added, but the ELF e_flags + # handling has changed as well, which means stale ldconfig auxiliary + # cache entries and failure to lookup libgcc_s / libstdc++ (breaking + # every C++ application) / libgomp etc., among other breakages. + # + # To fix this, simply refresh the ld.so.cache without using the + # auxiliary cache if we're natively installing on loong. This should + # be done relatively soon because we want to minimize the breakage + # window for the affected programs. + use loong && glibc_refresh_ldconfig + use compile-locales || run_locale_gen "${EROOT}/" fi diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 4e85a4b43e39..a293423678ba 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -1638,6 +1638,21 @@ pkg_preinst() { fi } +glibc_refresh_ldconfig() { + if [[ ${MERGE_TYPE} == buildonly ]]; then + return + fi + + # Version check could be added to avoid unnecessary work, but ldconfig + # should finish quickly enough to not matter. + ebegin "Refreshing ld.so.cache" + ldconfig -i + if ! eend $?; then + ewarn "Failed to refresh the ld.so.cache for you. Some programs may be broken" + ewarn "before you manually do so (ldconfig -i)." + fi +} + pkg_postinst() { # nothing to do if just installing headers just_headers && return @@ -1648,6 +1663,17 @@ pkg_postinst() { fi if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + # glibc-2.38+ on loong has ldconfig support added, but the ELF e_flags + # handling has changed as well, which means stale ldconfig auxiliary + # cache entries and failure to lookup libgcc_s / libstdc++ (breaking + # every C++ application) / libgomp etc., among other breakages. + # + # To fix this, simply refresh the ld.so.cache without using the + # auxiliary cache if we're natively installing on loong. This should + # be done relatively soon because we want to minimize the breakage + # window for the affected programs. + use loong && glibc_refresh_ldconfig + use compile-locales || run_locale_gen "${EROOT}/" fi