sys-libs/glibc: import upstream 2.37-r5

Imported from commit 406ab36652e8f9cac3f6e61990fb00c861a86a28

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This commit is contained in:
Thilo Fromm 2023-09-22 15:01:36 +02:00
parent 4272a41039
commit 9ae20fd41f

View File

@ -20,7 +20,7 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
PATCH_VER=5
PATCH_VER=7
PATCH_DEV=dilfridge
# gcc mulitilib bootstrap files version
@ -39,7 +39,7 @@ MIN_PAX_UTILS_VER="1.3.3"
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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
fi
@ -170,6 +170,30 @@ XFAIL_TEST_LIST=(
tst-strsignal
)
XFAIL_NSPAWN_TEST_LIST=(
# These tests need to be adapted to handle EPERM/ENOSYS(?) properly
# upstream, as systemd-nspawn's default seccomp whitelist is too strict.
# https://sourceware.org/PR30603
test-errno-linux
tst-bz21269
tst-mlock2
tst-ntp_gettime
tst-ntp_gettime-time64
tst-ntp_gettimex
tst-ntp_gettimex-time64
tst-pkey
tst-process_mrelease
tst-adjtime
tst-adjtime-time64
tst-clock2
tst-clock2-time64
# These fail if --suppress-sync and/or low priority is set
tst-sync_file_range
tst-sched1
test-errno
)
#
# Small helper functions
#
@ -840,6 +864,8 @@ sanity_prechecks() {
}
upgrade_warning() {
is_crosscompile && return
if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then
local oldv newv=$(ver_cut 1-2 ${PV})
for oldv in ${REPLACING_VERSIONS}; do
@ -1225,6 +1251,12 @@ glibc_src_test() {
local myxfailparams=""
if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
local virt=$(systemd-detect-virt 2>/dev/null)
if [[ ${virt} == systemd-nspawn ]] ; then
ewarn "Skipping extra tests because in systemd-nspawn container"
XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" )
fi
for myt in ${XFAIL_TEST_LIST[@]} ; do
myxfailparams+="test-xfail-${myt}=yes "
done
@ -1301,14 +1333,13 @@ glibc_do_src_install() {
# '#define VERSION "2.26.90"' -> '2.26.90'
local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
# Flatcar: override this and strip everything to keep image size at bay
# Avoid stripping binaries not targeted by ${CHOST}. Or else
# ${CHOST}-strip would break binaries build for ${CTARGET}.
# is_crosscompile && dostrip -x /
is_crosscompile && dostrip -x /
# gdb thread introspection relies on local libpthreads symbols. stripping breaks it
# See Note [Disable automatic stripping]
# dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
# Move versioned .a file out of libdir to evade portage QA checks
@ -1496,23 +1527,6 @@ glibc_do_src_install() {
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
fi
## Flatcar Container Linux: Add some local changes:
# - Config files are installed by baselayout, not glibc.
# - Install nscd/systemd stuff in /usr.
# Use tmpfiles to put nscd.conf in /etc and create directories.
insinto /usr/share/baselayout
if ! in_iuse nscd || use nscd ; then
doins "${S}"/nscd/nscd.conf || die
newtmpfiles "${FILESDIR}"/nscd-conf.tmpfiles nscd-conf.conf || die
fi
# Clean out any default configs.
rm -rf "${ED}"/etc
# Restore this one for the SDK.
test ! -e "${T}"/00glibc || doenvd "${T}"/00glibc
}
glibc_headers_install() {