sys-libs/glibc: Sync with Gentoo

It's from Gentoo commit 089ec116139a743587e77ecb62ceae94692642c0.
This commit is contained in:
Flatcar Buildbot 2025-08-04 07:20:14 +00:00
parent 79930e2e8e
commit 2a13b9fba2
16 changed files with 3892 additions and 307 deletions

View File

@ -26,7 +26,10 @@ DIST glibc-2.39.tar.xz 18520988 BLAKE2B 9d98459a2d58401e07c081e0d841935b23998da7
DIST glibc-2.40-patches-11.tar.xz 227044 BLAKE2B 2a8c799a88596f3fc28bc45fc206f231f628ff83aae242d69e216b65983def35d3aaab282287f1d77cb9d37d10bb71c483815ea83dfb2e47670a4cfcfbd1d92f SHA512 e984e4842951c24cf079e9a6f88771ede0709949402dd9f734cbfdf21ff40ca3d7380c0b9cc0c0d89943b6481adf8c7db2ab4b0ffe57e2e1fa514d925f0db395
DIST glibc-2.40.tar.xz 18752204 BLAKE2B 8593cab5b2549b77159b6866fbb40b917e491fd5bc0814f7f85b6529166d78d4583436450c479b86cdfe468304fc4d2a9ba8294230a55dbc4c15e89c3ab6c000 SHA512 33caf91dbfddde6480b7cdf7a68b36aff8c522bfee56160af26af297f1b768668edb08bc4e1a7ff61c64721e3c1d49c347a5dd01c5edd3b914ee6479c8b27885
DIST glibc-2.41-patches-6.tar.xz 83980 BLAKE2B ca689782db9f78751d5b5004ee9bf7bd6daf4cf071bb25507e53e4408fdd0331a9f4c82bbe7579e38540fc4d416bd858f76e5655f4e8a87048067fbc5e3c7a17 SHA512 bce972f5e036712e178d0adc97bef17b83a5c5cc3139d689bfc2847bc5e8126ee01250ce41033bc78919a7638965740d54eb431b240a9a32460c433335da968f
DIST glibc-2.41-patches-7.tar.xz 96232 BLAKE2B 0d4d22eb467370e9e902278b223545c5a225c990a87b4c2f39db48677301d126d7e69ea2823822ced5c472a9abdf7679c6c0ede88b87e50123a7ac146a98249e SHA512 00fc6f83a28dfae8f17ed50ba19f322d267f3f6d80e5545c317694ce1e2e0e4ebfb922b4fa1d7c854d035a457e968bf8281ccedca8e5347e380fa54b6755aedd
DIST glibc-2.41.tar.xz 19344868 BLAKE2B 4da62f489ba7a95bb069c2cfea8cf78e4d37e3a5f7e1736239670ba1dca12b69aa77bd00ced078c27d91b1e622c58cbd70258161a9d18c5b3bcc95863b8d744d SHA512 894a3e5a796bc13df30c26a5bfbe4d60b5dbdaac54e7763432235124b547070c7dda88c50584536870cab79183d8cad73a3ac6ed09bfe54fa8482aad07253169
DIST glibc-2.42-patches-2.tar.xz 25856 BLAKE2B 26a5a3bdc7985c2193533e883445acac29ea695df30d72b6d9409aa9ec94d39a086eb6c41eb9adfc39e0de78f7ae84e0fa64a955f9866de262179ee40ce4a6b5 SHA512 1526613855b9ca65002c6853f88d77990a1fe9e6f4cc01aca51d67fc4592ed985da8c74a661d304eb8a27c6afc8592da259fe40fa08a824942a9b700942086e6
DIST glibc-2.42.tar.xz 19930508 BLAKE2B 6ffabfe7942034a5a4fb5097679cb47bc3431eb2a3864af07cea0cb6aa5db63fbaf6f026b3c9299e00268058a6762eb21e92499f012d552ed87d65c7ffbd0bbe SHA512 73a617db8e0f0958c0575f7a1c5a35b72b7e070b6cbdd02a9bb134995ca7ca0909f1e50d7362c53d2572d72f1879bb201a61d5275bac16136895d9a34ef0c068
DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238
DIST glibc-systemd-20210814.tar.gz 1469 BLAKE2B 10fa7bcb46d4fdce9c0ab353cbd30871e9b09a347a13a9c9a3b5777f931aa3c826c158d2e49532c604d4a834f2fab4089b67495fb88d0398945dc50d45ad9ef1 SHA512 5346a9ea459a1e6ccf665389f2a294de1e16f1e3e05cdf07e3dd99ed0e4f6f8b52cc333d4bff3c75ac90ab6ce70cd4ab2b3e126f920ce7979abd6dda56315efc
DIST locale-gen-2.00.tar.gz 7738 BLAKE2B cde6de5ba3400aea24d0d5f1b79471f89f09fb747c8e371e38316c7ada92f967e0865f573f23cb353d82419c234724143c0aeca9eb70eb945dfc581cc7491eb1 SHA512 b609fddb9ec5e567c008841fef3390eddb5d6e7699a8271b3b8c0ade1b44b0ac2e5d1daa8b9acabf3432e3b88110b538a96f209b1ad0f9e988b7efce66606dff

View File

@ -1036,16 +1036,30 @@ src_test() {
}
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local locale_list="${root%/}/etc/locale.gen"
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root%/}/usr/share/i18n/SUPPORTED"
local prefix=$1 user_config config
local -a localegen_args
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
locale-gen --jobs $(makeopts_jobs) --config "${locale_list}" \
--destdir "${root}"
localegen_args=( --config "${config}" --destdir "${prefix}" )
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1219,7 +1233,9 @@ glibc_do_src_install() {
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen "${ED}"
if ! run_locale_gen "${ED}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
fi
}
@ -1311,8 +1327,10 @@ pkg_postinst() {
"${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/"
fi
if ! is_crosscompile && [[ -n ${ROOT} ]] ; then
use compile-locales || run_locale_gen "${EROOT}/"
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
fi
# Check for sanity of /etc/nsswitch.conf, take 2

View File

@ -1174,30 +1174,30 @@ src_test() {
}
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local inplace=""
local prefix=$1 user_config config
local -a localegen_args
if [[ "${root}" == "--inplace-glibc" ]] ; then
inplace="--inplace-glibc"
root="$2"
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
local locale_list="${root}/etc/locale.gen"
localegen_args=( --config "${config}" --destdir "${prefix}" )
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root}/usr/share/i18n/SUPPORTED"
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
popd >/dev/null
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1392,7 +1392,9 @@ glibc_do_src_install() {
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
if ! run_locale_gen "${ED%/}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
fi
}
@ -1491,7 +1493,9 @@ pkg_postinst() {
fi
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
use compile-locales || run_locale_gen "${EROOT}/"
if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
fi
# Check for sanity of /etc/nsswitch.conf, take 2

View File

@ -1203,30 +1203,30 @@ src_test() {
}
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local inplace=""
local prefix=$1 user_config config
local -a localegen_args
if [[ "${root}" == "--inplace-glibc" ]] ; then
inplace="--inplace-glibc"
root="$2"
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
local locale_list="${root}/etc/locale.gen"
localegen_args=( --config "${config}" --destdir "${prefix}" )
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root}/usr/share/i18n/SUPPORTED"
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
popd >/dev/null
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1404,7 +1404,9 @@ glibc_do_src_install() {
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
if ! run_locale_gen "${ED%/}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
fi
}
@ -1509,7 +1511,9 @@ pkg_postinst() {
fi
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
use compile-locales || run_locale_gen "${EROOT}/"
if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
fi
# Check for sanity of /etc/nsswitch.conf, take 2

View File

@ -1225,30 +1225,30 @@ src_test() {
}
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local inplace=""
local prefix=$1 user_config config
local -a localegen_args
if [[ "${root}" == "--inplace-glibc" ]] ; then
inplace="--inplace-glibc"
root="$2"
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
local locale_list="${root%/}/etc/locale.gen"
localegen_args=( --config "${config}" --destdir "${prefix}" )
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root%/}/usr/share/i18n/SUPPORTED"
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
popd >/dev/null
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1453,7 +1453,9 @@ glibc_do_src_install() {
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
if ! run_locale_gen "${ED%/}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
fi
}
@ -1574,7 +1576,9 @@ pkg_postinst() {
fi
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
use compile-locales || run_locale_gen "${EROOT}/"
if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
fi
upgrade_warning

View File

@ -1246,30 +1246,30 @@ src_test() {
}
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local inplace=""
local prefix=$1 user_config config
local -a localegen_args
if [[ "${root}" == "--inplace-glibc" ]] ; then
inplace="--inplace-glibc"
root="$2"
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
local locale_list="${root%/}/etc/locale.gen"
localegen_args=( --config "${config}" --destdir "${prefix}" )
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root%/}/usr/share/i18n/SUPPORTED"
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
popd >/dev/null
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1474,7 +1474,9 @@ glibc_do_src_install() {
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
if ! run_locale_gen "${ED%/}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
fi
}
@ -1595,7 +1597,9 @@ pkg_postinst() {
fi
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
use compile-locales || run_locale_gen "${EROOT}/"
if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
fi
upgrade_warning

View File

@ -1254,30 +1254,30 @@ src_test() {
}
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local inplace=""
local prefix=$1 user_config config
local -a localegen_args
if [[ "${root}" == "--inplace-glibc" ]] ; then
inplace="--inplace-glibc"
root="$2"
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
local locale_list="${root%/}/etc/locale.gen"
localegen_args=( --config "${config}" --destdir "${prefix}" )
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root%/}/usr/share/i18n/SUPPORTED"
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
popd >/dev/null
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1482,7 +1482,9 @@ glibc_do_src_install() {
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
if ! run_locale_gen "${ED%/}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
fi
}
@ -1603,7 +1605,9 @@ pkg_postinst() {
fi
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
use compile-locales || run_locale_gen "${EROOT}/"
if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
fi
upgrade_warning

View File

@ -1284,30 +1284,30 @@ src_test() {
}
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local inplace=""
local prefix=$1 user_config config
local -a localegen_args
if [[ "${root}" == "--inplace-glibc" ]] ; then
inplace="--inplace-glibc"
root="$2"
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
local locale_list="${root%/}/etc/locale.gen"
localegen_args=( --config "${config}" --destdir "${prefix}" )
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root%/}/usr/share/i18n/SUPPORTED"
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
popd >/dev/null
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1523,7 +1523,9 @@ glibc_do_src_install() {
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
if ! run_locale_gen "${ED%/}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
fi
}
@ -1644,7 +1646,9 @@ pkg_postinst() {
fi
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
use compile-locales || run_locale_gen "${EROOT}/"
if ! use compile-locales && ! run_locale_gen "${EROOT%/}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
fi
upgrade_warning

View File

@ -1295,38 +1295,36 @@ src_test() {
# src_install
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local inplace=""
local prefix=$1 user_config config
local -a hasversion_opts localegen_args
if [[ "${root}" == "--inplace-glibc" ]] ; then
inplace="--inplace-glibc"
root="$2"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
hasversion_opts=( -b )
fi
local locale_list="${root%/}/etc/locale.gen"
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root%/}/usr/share/i18n/SUPPORTED"
if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
localegen_args=( --prefix "${prefix}" )
else
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
localegen_args=( --config "${config}" --destdir "${prefix}" )
fi
# bug 736794: we need to be careful with the parallelization... the number of
# processors saved in the environment of a binary package may differ strongly
# from the number of processes available during postinst
local mygenjobs="$(makeopts_jobs)"
if [[ "${EMERGE_FROM}" == "binary" ]] ; then
mygenjobs="$(nproc)"
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
popd >/dev/null
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1539,8 +1537,8 @@ glibc_do_src_install() {
rm -f "${ED}"/etc/localtime
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
}
@ -1663,7 +1661,9 @@ pkg_postinst() {
fi
if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
use compile-locales || run_locale_gen "${EROOT}/"
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
fi
upgrade_warning

View File

@ -1314,38 +1314,36 @@ src_test() {
# src_install
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local inplace=""
local prefix=$1 user_config config
local -a hasversion_opts localegen_args
if [[ "${root}" == "--inplace-glibc" ]] ; then
inplace="--inplace-glibc"
root="$2"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
hasversion_opts=( -b )
fi
local locale_list="${root%/}/etc/locale.gen"
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root%/}/usr/share/i18n/SUPPORTED"
if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
localegen_args=( --prefix "${prefix}" )
else
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
localegen_args=( --config "${config}" --destdir "${prefix}" )
fi
# bug 736794: we need to be careful with the parallelization... the number of
# processors saved in the environment of a binary package may differ strongly
# from the number of processes available during postinst
local mygenjobs="$(makeopts_jobs)"
if [[ "${EMERGE_FROM}" == "binary" ]] ; then
mygenjobs="$(nproc)"
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
popd >/dev/null
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1558,8 +1556,8 @@ glibc_do_src_install() {
rm -f "${ED}"/etc/localtime
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
}
@ -1708,7 +1706,9 @@ pkg_postinst() {
# window for the affected programs.
use loong && glibc_refresh_ldconfig
use compile-locales || run_locale_gen "${EROOT}/"
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
fi
upgrade_warning

View File

@ -1322,38 +1322,36 @@ src_test() {
# src_install
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local inplace=""
local prefix=$1 user_config config
local -a hasversion_opts localegen_args
if [[ "${root}" == "--inplace-glibc" ]] ; then
inplace="--inplace-glibc"
root="$2"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
hasversion_opts=( -b )
fi
local locale_list="${root%/}/etc/locale.gen"
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root%/}/usr/share/i18n/SUPPORTED"
if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
localegen_args=( --prefix "${prefix}" )
else
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
localegen_args=( --config "${config}" --destdir "${prefix}" )
fi
# bug 736794: we need to be careful with the parallelization... the number of
# processors saved in the environment of a binary package may differ strongly
# from the number of processes available during postinst
local mygenjobs="$(makeopts_jobs)"
if [[ "${EMERGE_FROM}" == "binary" ]] ; then
mygenjobs="$(nproc)"
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
popd >/dev/null
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1568,8 +1566,8 @@ glibc_do_src_install() {
rm -f "${ED}"/etc/localtime
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
}
@ -1719,7 +1717,9 @@ pkg_postinst() {
# window for the affected programs.
use loong && glibc_refresh_ldconfig
use compile-locales || run_locale_gen "${EROOT}/"
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
fi
upgrade_warning

View File

@ -1302,38 +1302,36 @@ src_test() {
# src_install
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local inplace=""
local prefix=$1 user_config config
local -a hasversion_opts localegen_args
if [[ "${root}" == "--inplace-glibc" ]] ; then
inplace="--inplace-glibc"
root="$2"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
hasversion_opts=( -b )
fi
local locale_list="${root%/}/etc/locale.gen"
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root%/}/usr/share/i18n/SUPPORTED"
if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
localegen_args=( --prefix "${prefix}" )
else
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
localegen_args=( --config "${config}" --destdir "${prefix}" )
fi
# bug 736794: we need to be careful with the parallelization... the number of
# processors saved in the environment of a binary package may differ strongly
# from the number of processes available during postinst
local mygenjobs="$(makeopts_jobs)"
if [[ "${EMERGE_FROM}" == "binary" ]] ; then
mygenjobs="$(nproc)"
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
popd >/dev/null
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1548,8 +1546,8 @@ glibc_do_src_install() {
rm -f "${ED}"/etc/localtime
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
}
@ -1699,7 +1697,9 @@ pkg_postinst() {
# window for the affected programs.
use loong && glibc_refresh_ldconfig
use compile-locales || run_locale_gen "${EROOT}/"
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
# If fixincludes was/is active for a particular GCC slot, we
# must refresh it. See bug #933282 and GCC's documentation:

View File

@ -972,14 +972,14 @@ src_prepare() {
einfo "Done."
fi
case ${CTARGET} in
m68*-aligned-*)
case ${CTARGET} in
m68*-aligned-*)
einfo "Applying utmp format fix for m68k with -maligned-int"
eapply "${FILESDIR}/glibc-2.41-m68k-malign.patch"
;;
*)
*)
;;
esac
esac
default
@ -1316,38 +1316,36 @@ src_test() {
# src_install
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local inplace=""
local prefix=$1 user_config config
local -a hasversion_opts localegen_args
if [[ "${root}" == "--inplace-glibc" ]] ; then
inplace="--inplace-glibc"
root="$2"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
hasversion_opts=( -b )
fi
local locale_list="${root%/}/etc/locale.gen"
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root%/}/usr/share/i18n/SUPPORTED"
if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
localegen_args=( --prefix "${prefix}" )
else
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
localegen_args=( --config "${config}" --destdir "${prefix}" )
fi
# bug 736794: we need to be careful with the parallelization... the number of
# processors saved in the environment of a binary package may differ strongly
# from the number of processes available during postinst
local mygenjobs="$(makeopts_jobs)"
if [[ "${EMERGE_FROM}" == "binary" ]] ; then
mygenjobs="$(nproc)"
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
popd >/dev/null
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1562,8 +1560,8 @@ glibc_do_src_install() {
rm -f "${ED}"/etc/localtime
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
}
@ -1713,7 +1711,9 @@ pkg_postinst() {
# window for the affected programs.
use loong && glibc_refresh_ldconfig
use compile-locales || run_locale_gen "${EROOT}/"
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
# If fixincludes was/is active for a particular GCC slot, we
# must refresh it. See bug #933282 and GCC's documentation:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -38,7 +38,7 @@ inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfi
DESCRIPTION="GNU libc C library"
HOMEPAGE="https://www.gnu.org/software/libc/"
if [[ ${PV} == 9999* ]]; then
if [[ ${PV} == *9999 ]]; then
inherit git-r3
else
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
@ -930,7 +930,7 @@ src_unpack() {
use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
if [[ ${PV} == 9999* ]] ; then
if [[ ${PV} == *9999 ]] ; then
EGIT_REPO_URI="
https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git
https://github.com/gentoo/glibc-patches.git
@ -944,12 +944,13 @@ src_unpack() {
https://gitlab.com/x86-glibc/glibc.git
"
EGIT_CHECKOUT_DIR=${S}
[[ ${PV} == *.*.9999 ]] && EGIT_BRANCH=release/${PV%.*}/master
git-r3_src_unpack
else
unpack ${P}.tar.xz
cd "${WORKDIR}" || die
unpack glibc-${PV}-patches-${PATCH_VER}.tar.xz
unpack ${P}-patches-${PATCH_VER}.tar.xz
fi
cd "${WORKDIR}" || die
@ -1301,7 +1302,7 @@ glibc_src_test() {
# we give the tests a bit more time to avoid spurious
# bug reports on slow arches
SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check
SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 nonfatal emake ${myxfailparams} check
}
src_test() {
@ -1309,44 +1310,44 @@ src_test() {
return
fi
# glibc_src_test uses nonfatal so that we can run tests for all ABIs
# and fail at the end instead.
foreach_abi glibc_src_test || die "tests failed"
}
# src_install
run_locale_gen() {
# if the host locales.gen contains no entries, we'll install everything
local root="$1"
local inplace=""
local prefix=$1 user_config config
local -a hasversion_opts localegen_args
if [[ "${root}" == "--inplace-glibc" ]] ; then
inplace="--inplace-glibc"
root="$2"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
hasversion_opts=( -b )
fi
local locale_list="${root%/}/etc/locale.gen"
pushd "${ED}"/$(get_libdir) >/dev/null
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
locale_list="${root%/}/usr/share/i18n/SUPPORTED"
if has_version "${hasversion_opts[@]}" '>=sys-apps/locale-gen-3'; then
localegen_args=( --prefix "${prefix}" )
else
config="${prefix}/usr/share/i18n/SUPPORTED"
user_config="${prefix}/etc/locale.gen"
if [[ ${EBUILD_PHASE_FUNC} == src_install ]]; then
# For USE=compile-locales, all locales should be built.
mkdir -p -- "${prefix}/usr/lib/locale" || die
elif locale-gen --list --config "${user_config}" | read -r; then
config=${user_config}
fi
localegen_args=( --config "${config}" --destdir "${prefix}" )
fi
# bug 736794: we need to be careful with the parallelization... the number of
# processors saved in the environment of a binary package may differ strongly
# from the number of processes available during postinst
local mygenjobs="$(makeopts_jobs)"
if [[ "${EMERGE_FROM}" == "binary" ]] ; then
mygenjobs="$(nproc)"
# bug 736794: we need to be careful with the parallelization... the
# number of processors saved in the environment of a binary package may
# differ strongly from the number of processes available during postinst
if [[ ${EMERGE_FROM} != binary ]]; then
localegen_args+=( --jobs "$(makeopts_jobs)" )
fi
set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \
--destdir "${root}"
echo "$@"
"$@"
popd >/dev/null
printf 'Executing: locale-gen %s\n' "${localegen_args[*]@Q}" >&2
locale-gen "${localegen_args[@]}"
}
glibc_do_src_install() {
@ -1561,8 +1562,8 @@ glibc_do_src_install() {
rm -f "${ED}"/etc/localtime
# Generate all locales if this is a native build as locale generation
if use compile-locales && ! is_crosscompile ; then
run_locale_gen --inplace-glibc "${ED}/"
if use compile-locales && ! is_crosscompile && ! run_locale_gen "${ED}"; then
die "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
}
@ -1712,7 +1713,9 @@ pkg_postinst() {
# window for the affected programs.
use loong && glibc_refresh_ldconfig
use compile-locales || run_locale_gen "${EROOT}/"
if ! use compile-locales && ! run_locale_gen "${EROOT}"; then
ewarn "locale-gen(1) unexpectedly failed during the ${EBUILD_PHASE_FUNC} phase"
fi
# If fixincludes was/is active for a particular GCC slot, we
# must refresh it. See bug #933282 and GCC's documentation: