From 53a0744ff2eec1d9975343a327d3b70fce61dd66 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Tue, 30 Jan 2024 17:21:59 +0100 Subject: [PATCH 001/106] CI Tests: add Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc test --- .../Makefile | 64 +++++++++++ .../PURPOSE | 8 ++ .../main.fmf | 23 ++++ .../runtest.sh | 101 ++++++++++++++++++ 4 files changed, 196 insertions(+) create mode 100644 tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/Makefile create mode 100644 tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/PURPOSE create mode 100644 tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/main.fmf create mode 100755 tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/runtest.sh diff --git a/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/Makefile b/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/Makefile new file mode 100644 index 0000000..3429bda --- /dev/null +++ b/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc +# Description: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc) +# Author: Sergey Kolosov +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Sergey Kolosov " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc)" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 2h" >> $(METADATA) + @echo "RunFor: glibc" >> $(METADATA) + @echo "Requires: glibc rpm-build" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 1430477" >> $(METADATA) + @echo "Releases: -RHEL4 -RHEL5 -RHEL6" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/PURPOSE b/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/PURPOSE new file mode 100644 index 0000000..d31ceb1 --- /dev/null +++ b/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/PURPOSE @@ -0,0 +1,8 @@ +PURPOSE of /tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc +Description: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc) +Author: Sergey Kolosov +Bug summary: glibc: Missing else branch in __libc_calloc +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1430477 + +The test builds glibc, then does malloc.o recompilation and does checking that +there are no missing initializations for oldtop and oldtopsize variables. diff --git a/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/main.fmf b/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/main.fmf new file mode 100644 index 0000000..f5ff109 --- /dev/null +++ b/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/main.fmf @@ -0,0 +1,23 @@ +summary: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc) +description: | + Bug summary: glibc: Missing else branch in __libc_calloc + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1430477 + + The test builds glibc, then does malloc.o recompilation and does checking + that there are no missing initializations for oldtop and oldtopsize + variables. +contact: Sergey Kolosov +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1430477 +component: + - glibc +test: ./runtest.sh +framework: beakerlib +recommend: + - glibc + - rpm-build +duration: 2h +extra-summary: + /tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc +extra-task: + /tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc diff --git a/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/runtest.sh b/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/runtest.sh new file mode 100755 index 0000000..23438b7 --- /dev/null +++ b/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/runtest.sh @@ -0,0 +1,101 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/glibc/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc +# Description: Test for BZ#1430477 (glibc Missing else branch in __libc_calloc) +# Author: Sergey Kolosov +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="glibc" + +rlJournalStart + rlPhaseStartSetup + PRARCH="$(rlGetPrimaryArch)" + BUILDDIR="$(rpm -E '%{_builddir}')" + SPECDIR="$(rpm -E '%{_specdir}')" + rlAssertRpm $PACKAGE + rlLog "Build directory: $BUILDDIR" + rlLog "Spec directory: $SPECDIR" + rlLog "Architecture : $PRARCH" + + rlLog "Cleaning build and spec directories of glibc files" + rlRun "rm -rf $BUILDDIR/glibc*" 0 "Cleaning $BUILDDIR/glibc*" + rlRun "rm -rf $SPECDIR/glibc*.spec" 0 "Cleaning $SPECDIR/glibc*.spec" + rlRun "rm -rf glibc*.src.rpm" 0 "Removing any present glibc src.rpm" + + rlLog "Installing glibc srpm" + rlFetchSrcForInstalled $PACKAGE + rlRun "rpm -Uhv $PACKAGE*.src.rpm" + rlAssertExists $SPECDIR/$PACKAGE.spec + + rlRun "yum-builddep -y $PACKAGE-*.src.rpm" 0 "Installing dependences" + rlPhaseEnd + + rlPhaseStartTest "Building glibc" + if rlIsRHEL 7; then + rlRun -c "sed -i '/#\ Ensure\ timestamps/i \\touch intl/plural.c' $SPECDIR/glibc.spec" + fi + rlRun "rpmbuild -bc ${SPECDIR}/${PACKAGE}.spec &> glibc_build_log.txt" 0 "Unpacking $PACKAGE" + ISSUCCESS=$? + if [ $ISSUCCESS -ne 0 ] + then + rlFileSubmit glibc_build_log.txt + rlFail "Glibc compilation error" + fi + + BUILDS="$BUILDDIR/glibc*/build*" + rlLog "Found builds at:" + for build in $BUILDS; do + rlLog "$build" + done; unset build + rlPhaseEnd + + rlPhaseStartTest "Check for uninitialized values" + for CURBUILD in $BUILDS + do + rlRun -c "pushd $CURBUILD" + rlRun -c "rm malloc/malloc.o" + rlRun -c "make -r PARALLELMFLAGS="" -C .. -C malloc objdir=`pwd` subdir=malloc &> malloc_build_log.txt" + rlAssertExists malloc_build_log.txt + rlAssertNotGrep "‘oldtop’ may be used uninitialized in this function" malloc_build_log.txt + rlAssertNotGrep "‘oldtopsize’ may be used uninitialized in this function" malloc_build_log.txt + rlFileSubmit malloc_build_log.txt ${CURBUILD}_malloc_build_log + rlRun -c "popd" + done + rlPhaseEnd + + rlPhaseStartCleanup + if [ -n "$KEEP_GLIBC_RESULTS" ]; then + rlLog "$(pwd) contains:" + rlLog "$(ls $(pwd))" + rlLog "Build Directory at: $(ls $BUILDDIR)" + rlLog "Spec File at: $(ls $SPECDIR/glibc*.spec)" + else + rlRun "rm glibc*.src.rpm" + rlRun "rm -rf $BUILDDIR/glibc* $SPECDIR/glibc*.spec" + fi + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From 1b6496d171cb69bbaca97bae285f7d646f5a88e6 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Tue, 30 Jan 2024 17:22:56 +0100 Subject: [PATCH 002/106] CI Tests: add Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports test --- .../Makefile | 64 +++++++++++++++++++ .../PURPOSE | 9 +++ .../main.fmf | 24 +++++++ .../runtest.sh | 54 ++++++++++++++++ 4 files changed, 151 insertions(+) create mode 100644 tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/Makefile create mode 100644 tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/PURPOSE create mode 100644 tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/main.fmf create mode 100755 tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/runtest.sh diff --git a/tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/Makefile b/tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/Makefile new file mode 100644 index 0000000..378022c --- /dev/null +++ b/tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports +# Description: Test for BZ#1577212 (glibc Remove stray Sun RPC exports) +# Author: Alexandra Hájková +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2019 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Alexandra Hájková " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#1577212 (glibc Remove stray Sun RPC exports)" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 1h" >> $(METADATA) + @echo "RunFor: glibc" >> $(METADATA) + @echo "Requires: glibc elfutils" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 1577212" >> $(METADATA) + @echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/PURPOSE b/tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/PURPOSE new file mode 100644 index 0000000..d77a6de --- /dev/null +++ b/tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/PURPOSE @@ -0,0 +1,9 @@ +PURPOSE of /tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports +Description: Test for BZ#1577212 (glibc Remove stray Sun RPC exports) +Author: Alexandra Hájková +Bug summary: glibc: Remove stray Sun RPC exports +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1577212 + +Remove stray Sun RPC exports: In this context, “remove“ means that the default symbol version (the @@ part) +is gone, and there is only a compat symbol (with a single @). We cannot remove the compat symbols for +backwards compatibility reasons. diff --git a/tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/main.fmf b/tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/main.fmf new file mode 100644 index 0000000..e251cec --- /dev/null +++ b/tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/main.fmf @@ -0,0 +1,24 @@ +summary: Test for BZ#1577212 (glibc Remove stray Sun RPC exports) +description: | + Bug summary: glibc: Remove stray Sun RPC exports + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1577212 + + Remove stray Sun RPC exports: In this context, “remove“ means that the + default symbol version (the @@ part) is gone, and there is only a compat + symbol (with a single @). We cannot remove the compat symbols for backwards + compatibility reasons. +contact: Alexandra Hájková +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1577212 +component: + - glibc +test: ./runtest.sh +framework: beakerlib +recommend: + - glibc + - elfutils +duration: 1h +extra-summary: + /tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports +extra-task: + /tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports diff --git a/tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/runtest.sh b/tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/runtest.sh new file mode 100755 index 0000000..6513c9a --- /dev/null +++ b/tests/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports/runtest.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/glibc/Regression/bz1577212-glibc-Remove-stray-Sun-RPC-exports +# Description: Test for BZ#1577212 (glibc Remove stray Sun RPC exports) +# Author: Alexandra Hájková +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2019 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="glibc" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest + rlRun "eu-readelf --symbols=.dynsym /usr/lib64/libc.so.6 > log" + rlAssertNotGrep "svcauthdes_stats@@" log + rlAssertNotGrep "svc_pollfd@@" log + rlAssertNotGrep "rpc_createerr@@" log + rlAssertNotGrep "svc_fdset@@" log + rlAssertNotGrep "svc_max_pollfd@@" log + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From 3eb443a2d195213a0780f0a49f1ce7cc77d413a7 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Tue, 30 Jan 2024 18:19:10 +0100 Subject: [PATCH 003/106] CI Tests: fix Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value * add gcc to required packages * include 'unistd.h' --- .../main.fmf | 1 + .../tst-getlogin_r.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/main.fmf b/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/main.fmf index 422d973..c3601ae 100644 --- a/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/main.fmf +++ b/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/main.fmf @@ -16,6 +16,7 @@ recommend: - glibc-debuginfo - glibc-debuginfo-common - gdb + - gcc duration: 30m extra-summary: /tools/glibc/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value diff --git a/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/tst-getlogin_r.c b/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/tst-getlogin_r.c index c2dceb1..fd4f9a0 100644 --- a/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/tst-getlogin_r.c +++ b/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/tst-getlogin_r.c @@ -1,5 +1,6 @@ #include #include +#include #define BUFSIZE 1024 int main(int argc, char *argv[]) { int r=0,i,attempts=0; From d1b1cc9c2687bf92949bde1342c6296e33b167d2 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Tue, 30 Jan 2024 18:25:44 +0100 Subject: [PATCH 004/106] CI Tests: fix Regression/bz455360-RHEL4-vfprintf-call-goes-into-recursive * add 'gcc' to required packages * include 'unistd.h' --- .../bz455360-RHEL4-vfprintf-call-goes-into-recursive/main.fmf | 1 + .../bz455360-RHEL4-vfprintf-call-goes-into-recursive/testcase.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/Regression/bz455360-RHEL4-vfprintf-call-goes-into-recursive/main.fmf b/tests/Regression/bz455360-RHEL4-vfprintf-call-goes-into-recursive/main.fmf index da5ba66..a737a0a 100644 --- a/tests/Regression/bz455360-RHEL4-vfprintf-call-goes-into-recursive/main.fmf +++ b/tests/Regression/bz455360-RHEL4-vfprintf-call-goes-into-recursive/main.fmf @@ -77,6 +77,7 @@ test: ./runtest.sh framework: beakerlib recommend: - glibc + - gcc tag: - simple - tier1_mfranc diff --git a/tests/Regression/bz455360-RHEL4-vfprintf-call-goes-into-recursive/testcase.c b/tests/Regression/bz455360-RHEL4-vfprintf-call-goes-into-recursive/testcase.c index 05c7a33..22f9419 100644 --- a/tests/Regression/bz455360-RHEL4-vfprintf-call-goes-into-recursive/testcase.c +++ b/tests/Regression/bz455360-RHEL4-vfprintf-call-goes-into-recursive/testcase.c @@ -1,5 +1,6 @@ #include #include +#include int main (void) From ec13b9b33e27ebbba3205e77906193b2ddf2406b Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Wed, 31 Jan 2024 09:53:12 +0100 Subject: [PATCH 005/106] CI Tests: fix /tests/Regression/bz529997-sem_timedwait-with-invalid-time * include 'unistd.h' --- .../bz529997-sem_timedwait-with-invalid-time/real-reproducer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Regression/bz529997-sem_timedwait-with-invalid-time/real-reproducer.c b/tests/Regression/bz529997-sem_timedwait-with-invalid-time/real-reproducer.c index 471fe16..c01a116 100644 --- a/tests/Regression/bz529997-sem_timedwait-with-invalid-time/real-reproducer.c +++ b/tests/Regression/bz529997-sem_timedwait-with-invalid-time/real-reproducer.c @@ -5,6 +5,7 @@ #include #include #include +#include void func(sem_t *semp) { From 9ba57dfb0e7318975ca826a925bce880f3b652c3 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Wed, 31 Jan 2024 10:00:46 +0100 Subject: [PATCH 006/106] CI Tests: fix /tests/Regression/bz549813-dl-close-race-with-C-destructor * include 'unistd.h' --- .../C_Only.tar | Bin 10240 -> 909 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/tests/Regression/bz549813-dl-close-race-with-C-destructor/C_Only.tar b/tests/Regression/bz549813-dl-close-race-with-C-destructor/C_Only.tar index 76a5ddac09c14dba91885f6cf1696d3e4c14971a..4063dab4c73bcc2a11f4a154f2e17fc747ee77bb 100644 GIT binary patch literal 909 zcmV;819JQyiwFP!000001MOCAZ__Xk-q-k7oCZS4)NW~)w9-Z=jj{@oKB60jYHW2wzdn}O zY6W4~3H&hJM_#MlYVB`9xY1P^Eao!K0k)<|wiw0yPToWMe-wRv{?qsi9WhQf662xs z@2c}}wL1Y`g1`^({P#O30)Hc`S;K#R{-ocB0zDWf3F)7oS8qTDuZM4{*CwChPmQ_6 z$4pLg8mBl*IW)%w`R%KVb@F@?=M-6&ywMa{b0Jc^X+lYEb)$()FxiXLGs;==MGMi4 z^&<5wgoGqfhL?9YI{-6Fi1XCN96V?yOPO*?h-9K*7GsS!nz2N&o0(Q+CBt}M`p!TZ zsU$r`*3wF;c0dQ2mr*JU+!k*cVO~ZegvkRaJsBOrz?{b70FCqMnz9O42KdwSH}$V` z{u>wS7N{EU1i@YP-|DnGrvAfrh=q^!-)?tp{XYhtFp=;@O5wSw!`;adsf2TxvTRkf z5DcY1(Kx$Wld-Xgxsn;rkpy{&*ZXV6QrJ0l^%&=4555!PFd-r1=^@TW;FdOXDw9|w zl;bf;>Yl%Qb#Ze1GU^`>`zM3wWO)2yaMFNhXy`$&2fp&F!6d?O~uB;-F)?Zjvo{3L=w$!B-s^J13`dkqdBr?S(jVPU*~TU#7Hd!nKr~T24xD{8Z73on&IX5@+SKHN}-C zncA^v&002&PUn_5h3N-j0$(#eA#R_F5V4ZM#HnqvJ^E{HMC_t@hncU z?#ve@{^R6veqAfQl}26_pEA4MXxYe{E%Se%8+q}T@`Pt|S}sJjXG8a~%|Bv|T3A?E jSXfwCSXfwCSXfwCSXfwCSXfwC{0@EqR>7EP04M+etdGWT literal 10240 zcmeHJTWb?R6wYhrR~)LyCM4}9%>`N`)YzgJ(oz*4RF>`RBpIE~hRsAN(*N$6%U+Te zZ7CJRS=#LEnRETlo^NLyol0@FS9{DW#A`V0*UWv;+qi2PUbRlAA9i~E{r*1gcfuix zp#PXj<-XS|6=wjoc$V>8cH8|=`?uNr1G2I0|7HA*&A4EXlCf^^@A|Ks-RX1(J$wOr zq3(aTr~4m1N;X?g|MUKn@fgfCf;pvRe0Eko0hzp+zSYlW6WZbu|0(`w3V)Vrk+C?z zRU)80H_Go`pKmL#7IDT<>!WD3W!hfL1m85NCAYev1%h8}$@pBxLd%@zNP#-U*ZX_Q6KI|U_8w>R2K*$X&ZUA>B!{?~ zL6F<5n4++|EISJC)rIzFC6$J3*ilj9aVL&FA)Mi6RW_4+bHZ?jVi!vV*lDl}$lHs$6SatWH{tYb~J)#54gD;E7swP5;TGHHRsENC{| zs?mTGyP20yisJRbMj_8ynzj*ixupgzE7iIinx+s0EUD&SlvI$gP04n!Qj^}d5i8M5 zAGw@w#M$V!?N*>%F_li*ovmt2_o_-oJyzWX0@t=Om9Hu0_q#;2Lf~M(nT+1WRDN)^ z*sR6ETXdkrS6kfFCl!!OL=ohN&Gdb&9slRw&-<9(S@#e8ANKl{^FMwIkpK5R|KAzj z2Pxj9dZ^HUB4$(~h2!~2GudT~Q=u0~+O!1}Pj=A6_4iL-4DVV-U&JyI44J-eS9lpS+5uryn(eYRa>!4LtM|(<9P2!6|d+NBq8IadzcK`37y5qo&Pn zH!5hm-Er)1Y1=#{f{Jv-@ Date: Wed, 31 Jan 2024 10:10:45 +0100 Subject: [PATCH 007/106] CI Tests: fix /tests/Regression/bz600457-locally-defined-symbol-resolving-failure * add includes --- .../reproducer.tar.gz | Bin 941 -> 953 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/tests/Regression/bz600457-locally-defined-symbol-resolving-failure/reproducer.tar.gz b/tests/Regression/bz600457-locally-defined-symbol-resolving-failure/reproducer.tar.gz index 9551435364d76a8d012244f263335b4af81a3c43..1153a58f9de8a7b04e090174c43242e2ef858267 100644 GIT binary patch literal 953 zcmV;q14jHGiwFP!000001MOLDPunmM?$`KNn9@l}Mbo%>n+lzlWZH(*Nr>^GOp{Q^ z3yqd0mD5f`6aRg-lQapX1x;%a%nwv4=R4oo=jUP@9L#a*FTDWwTf2fnVCp)3B2!oD z&k`-9>AImQhN&AZ1*r%rEvWA-q8gUj!o?7_W?s4s-FTzkW9=^#xXOPVT|2V310OWO zhNf-IKW#%u)e!kH3`Fv;vHUALh-D4`dHxTh#EX}H08jil^b&dc4pgFS;YaD3h^!MT z13%NqhgWpfT!m2*i4yn?ggK6qMJTpSi8c&rLpFsy=q`d^(L$8ICvE8%+~vmiZ0mhd zox0L8@t6`Uz?!xexjWTi8i$b?}cQNq`Fj3nAeoyXQgJhqxVwzlxt+RkI^Nj$Cs9IOR6Sp_K2znYOv zwnR4B9@*q+6{a*-%fP%i&4PP@6;hFTB@MM=C=l%cd?4drJj?x$ zqMAAXRoygDe*RN6&i{R&--Q>`D1+qJg~4pTxTPx!yZBay-9CTwzjieFZ$A(J4P$lx zPr&#;FgXABfz>TeJAWOut6NvQx^)$5m$3ZY{F>0@zxC|=XL9=gACvQcA87F3Zt&k~ b^55qC=iuPr;Nalkcm?h6j;~Q z2kWn^>RSCZ#gH0M+5?vjyz=^=29X;sJRhEW;lz!^>3dL`lGF?04HI4`#0GxFfd|KA z)r==W6z~H01GqT~qIAMH4S_WDNkcM)9q6R~?;z!cA5l|y2kx`rwb*K3#HZ@Ch+OIf zbI_(XZnNHjGOL^3w&1ptSFu^?9Iv{*o7j! z6kt2R%SA>1U!9-+BnbWgp5w9af5VVh`qyQ0|Eo(f)Bizm3X8G>+aBDxF0elh&ClNk zojcf>Twd6)s04M+ecz5C_ From 9b8bc360e15dd9edf752b9e6c0f26c1ceba37882 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Wed, 31 Jan 2024 10:16:26 +0100 Subject: [PATCH 008/106] CI Tests: fix /tests/Regression/bz827362-RHEL6-2-ftell-after-fseek-moves-the-offset-on-a * include 'wchar.h' --- .../test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Regression/bz827362-RHEL6-2-ftell-after-fseek-moves-the-offset-on-a/test.c b/tests/Regression/bz827362-RHEL6-2-ftell-after-fseek-moves-the-offset-on-a/test.c index 496fe4c..b8636bb 100644 --- a/tests/Regression/bz827362-RHEL6-2-ftell-after-fseek-moves-the-offset-on-a/test.c +++ b/tests/Regression/bz827362-RHEL6-2-ftell-after-fseek-moves-the-offset-on-a/test.c @@ -1,6 +1,7 @@ #include #include #include +#include int main(int argc, char** argv) { From 82e9f5dfc64db01f3b14e751b4ff661617ed5613 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Wed, 31 Jan 2024 10:54:04 +0100 Subject: [PATCH 009/106] CI Tests: fix /tests/Regression/double_free_exploit * add missing casts to int * add missing includes --- tests/Regression/double_free_exploit/exploit.c | 9 +++++---- tests/Regression/double_free_exploit/exploit2.c | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/Regression/double_free_exploit/exploit.c b/tests/Regression/double_free_exploit/exploit.c index dfc0420..f2491e2 100644 --- a/tests/Regression/double_free_exploit/exploit.c +++ b/tests/Regression/double_free_exploit/exploit.c @@ -1,6 +1,7 @@ -#include -#include +#include +#include #include +#include int main(void) { unsigned int *chunk; @@ -17,8 +18,8 @@ int main(void) { */ chunk[0] = -0x10; /* prev_size */ chunk[1] = 0x8; /* size */ - chunk[2] = shellcode; /* fd */ - chunk[3] = shellcode; /* bk */ + chunk[2] = (int) shellcode; /* fd */ + chunk[3] = (int) shellcode; /* bk */ /* set fd to the adres of the return address - 3 the minus 3 is needed because fd[3] will become bk diff --git a/tests/Regression/double_free_exploit/exploit2.c b/tests/Regression/double_free_exploit/exploit2.c index b9eb76f..be9f77a 100644 --- a/tests/Regression/double_free_exploit/exploit2.c +++ b/tests/Regression/double_free_exploit/exploit2.c @@ -1,4 +1,7 @@ -main() +#include +#include + +int main() { int *a,*b,*c,*d,*e; b=malloc(8); From cace4f829d8f7a5a47719cbf00230af3d705d898 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Wed, 31 Jan 2024 11:14:41 +0100 Subject: [PATCH 010/106] CI Tests: fix /tests/Sanity/basic-linking-sanity * use 'fclose' * add missing includes --- tests/Sanity/basic-linking-sanity/lc.c | 2 +- tests/Sanity/basic-linking-sanity/lm.c | 2 +- tests/Sanity/basic-linking-sanity/lpthread.c | 2 +- tests/Sanity/basic-linking-sanity/lrt.c | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/Sanity/basic-linking-sanity/lc.c b/tests/Sanity/basic-linking-sanity/lc.c index 2b4f286..23679f4 100644 --- a/tests/Sanity/basic-linking-sanity/lc.c +++ b/tests/Sanity/basic-linking-sanity/lc.c @@ -15,7 +15,7 @@ int main(){ two[3] = '\0'; fprintf(fp, "Two: %s, length %d\n", two, strlen(two)); - close(fp); + fclose(fp); free(two); return 0; } diff --git a/tests/Sanity/basic-linking-sanity/lm.c b/tests/Sanity/basic-linking-sanity/lm.c index 72612b9..ca45637 100644 --- a/tests/Sanity/basic-linking-sanity/lm.c +++ b/tests/Sanity/basic-linking-sanity/lm.c @@ -8,6 +8,6 @@ int main(){ fprintf(fp, "SIN: %0.2f\n", 1.0); - close(fp); + fclose(fp); return 0; } diff --git a/tests/Sanity/basic-linking-sanity/lpthread.c b/tests/Sanity/basic-linking-sanity/lpthread.c index 65aca15..7ce81d7 100644 --- a/tests/Sanity/basic-linking-sanity/lpthread.c +++ b/tests/Sanity/basic-linking-sanity/lpthread.c @@ -41,6 +41,6 @@ int main(){ pthread_join(tw, NULL); pthread_join(on, NULL); - close(fp); + fclose(fp); return 0; } diff --git a/tests/Sanity/basic-linking-sanity/lrt.c b/tests/Sanity/basic-linking-sanity/lrt.c index 2a31e0d..daadf29 100644 --- a/tests/Sanity/basic-linking-sanity/lrt.c +++ b/tests/Sanity/basic-linking-sanity/lrt.c @@ -1,4 +1,5 @@ #include +#include #include int main(){ @@ -16,6 +17,6 @@ int main(){ else fprintf(fp, "shm_unlink successful\n"); - close(fp); + fclose(fp); return 0; } From ea742f068aba4e04ead6670ecf3954260eced0e0 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Wed, 31 Jan 2024 12:53:53 +0100 Subject: [PATCH 011/106] CI Tests: fix /tests/Standardscompliance/bz531160-ldd-Vulnerable-to-Social-Engineering-Exploits * include 'unistd.h' --- .../interp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Standardscompliance/bz531160-ldd-Vulnerable-to-Social-Engineering-Exploits/interp.c b/tests/Standardscompliance/bz531160-ldd-Vulnerable-to-Social-Engineering-Exploits/interp.c index 965d3d1..4030866 100644 --- a/tests/Standardscompliance/bz531160-ldd-Vulnerable-to-Social-Engineering-Exploits/interp.c +++ b/tests/Standardscompliance/bz531160-ldd-Vulnerable-to-Social-Engineering-Exploits/interp.c @@ -1,3 +1,5 @@ +#include + #define MESG "you are not suppposed to see this\n" int main() From 7ce2803ac6533c4acc0193ea5991e4011b4ccdd1 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Thu, 1 Feb 2024 09:27:12 +0100 Subject: [PATCH 012/106] CI Test: fix /tests/Regression/bz488748-inet6-opt-init-sets-incorrect-header-len * add '-D_GNU_SOURCE' to compilation as 'inet6_opt_init' is a GNU extension --- .../runtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Regression/bz488748-inet6-opt-init-sets-incorrect-header-len/runtest.sh b/tests/Regression/bz488748-inet6-opt-init-sets-incorrect-header-len/runtest.sh index 44962e1..3649de7 100755 --- a/tests/Regression/bz488748-inet6-opt-init-sets-incorrect-header-len/runtest.sh +++ b/tests/Regression/bz488748-inet6-opt-init-sets-incorrect-header-len/runtest.sh @@ -34,7 +34,7 @@ PACKAGE="glibc" rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE - rlRun 'gcc optinit.c -o optinit' 0 "Compiling the testcase" + rlRun 'gcc -D_GNU_SOURCE optinit.c -o optinit' 0 "Compiling the testcase" rlPhaseEnd rlPhaseStartTest From 385a689f17fe219dfd74edd5a829f0ad748d2814 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 5 Feb 2024 08:35:25 -0500 Subject: [PATCH 013/106] Switch to upstream 2.39 release Upstream commit: ef321e23c20eebc6d6fb4044425c00e6df27b05f - Document CVE-2023-6246, CVE-2023-6779, and CVE-2023-6780 - Update advisory format and introduce some automation - manual/io: Fix swapped reading and writing phrase. - Fix typo - S390: Fix building with --disable-mutli-arch [BZ #31196] - NEWS: insert advisories and fixed bugs for 2.39 - contrib.texi: update - INSTALL, install.texi: minor updates, regenerate - libc.pot: regenerate - version.h, include/features.h: Bump version to 2.39 - Create ChangeLog.old/ChangeLog.28 --- glibc.spec | 21 ++++++++++++++++++--- sources | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/glibc.spec b/glibc.spec index 6116752..94f75de 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,5 +1,5 @@ -%global glibcsrcdir glibc-2.38.9000-530-gddf542da94 -%global glibcversion 2.38.9000 +%global glibcsrcdir glibc-2.39 +%global glibcversion 2.39 # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -171,7 +171,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 39 +%global baserelease 1 Release: %{baserelease}%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for @@ -2308,6 +2308,21 @@ update_gconv_modules_cache () %endif %changelog +* Fri Feb 02 2024 Carlos O'Donell - 2.39-1 +- Switch to upstream 2.39 release, + commit ef321e23c20eebc6d6fb4044425c00e6df27b05f +- Document CVE-2023-6246, CVE-2023-6779, and CVE-2023-6780 +- Update advisory format and introduce some automation +- manual/io: Fix swapped reading and writing phrase. +- Fix typo +- S390: Fix building with --disable-mutli-arch [BZ #31196] +- NEWS: insert advisories and fixed bugs for 2.39 +- contrib.texi: update +- INSTALL, install.texi: minor updates, regenerate +- libc.pot: regenerate +- version.h, include/features.h: Bump version to 2.39 +- Create ChangeLog.old/ChangeLog.28 + * Wed Jan 31 2024 Florian Weimer - 2.38.9000-39 - Add noarch sysroot subpackages diff --git a/sources b/sources index e829191..d3d5275 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.38.9000-530-gddf542da94.tar.xz) = d6e19bbc1eaa22833124d2068570f0943fa3bac130ecc433875514e281fdabfcb976f67cf33c052d06a8ce7ab91134622e2d4df143d4efb1b4627b4c342960a7 +SHA512 (glibc-2.39.tar.xz) = 818f58172a52815b4338ea9f2a69ecaa3335492b9f8f64cbf8afb24c0d737982341968ecd79631cae3d3074ab0ae4bc6056fc4ba3ffe790849dc374835cd57e2 From 797647f2a81cf749f2e08350ffb68ee0d3425a69 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 7 Feb 2024 09:23:34 +0100 Subject: [PATCH 014/106] Ignore symbolic links to . in sysroot construction --- glibc.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index 94f75de..23ae3f7 100644 --- a/glibc.spec +++ b/glibc.spec @@ -171,7 +171,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 1 +%global baserelease 2 Release: %{baserelease}%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for @@ -1571,6 +1571,10 @@ for lib in lib lib64; do set +x slbase=$(basename $sl) sltarget=$(basename $(readlink $sl)) + if test "$sltarget" = . ; then + # This is the lp64d symbolic link on riscv64, see above. + continue + fi if ! test -r usr/$lib/$sltarget; then echo "$sl: inferred $sltarget ($(readlink $sl)) missing" exit 1 @@ -2308,6 +2312,9 @@ update_gconv_modules_cache () %endif %changelog +* Wed Feb 7 2024 Florian Weimer - 2.39-2 +- Ignore symbolic links to . in sysroot construction + * Fri Feb 02 2024 Carlos O'Donell - 2.39-1 - Switch to upstream 2.39 release, commit ef321e23c20eebc6d6fb4044425c00e6df27b05f From f7655efa9510208dc3a30ddfb3fa21cc12800e7c Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 15 Feb 2024 17:16:35 -0500 Subject: [PATCH 015/106] Auto-sync with upstream branch master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream commit: ef7f4b1fef67430a8f3cfc77fa6aada2add851d7 - Apply the Makefile sorting fix - sysdeps/x86_64/Makefile (tests): Add the end marker - sort-makefile-lines.py: Allow '_' in name and "^# name" - trivial doc fix: remove weird phrase "syscall takes zero to five arguments" - mips: Use builtins for ffs and ffsll - x86: Expand the comment on when REP STOSB is used on memset - x86: Do not prefer ERMS for memset on Zen3+ - x86: Fix Zen3/Zen4 ERMS selection (BZ 30994) - x86/cet: fix shadow stack test scripts - test_printers_common.py: Remove invalid escape sequence - elf: Remove attempt at env handling in elf/tst-rtld-list-diagnostics.py - Add SOL_VSOCK from Linux 6.7 to bits/socket.h - localedata: ssy_ER: Fix syntax error - localedata: hr_HR: change currency to EUR/€ - Change lv_LV collation to agree with the recent change in CLDR - Add new AArch64 HWCAP2 definitions from Linux 6.7 to bits/hwcap.h - string: Add hidden builtin definition for __strcpy_chk. - arm: Remove wrong ldr from _dl_start_user (BZ 31339) - LoongArch: Use builtins for ffs and ffsll - Remove sysdeps/ia64/math-use-builtins-ffs.h - Fix stringop-overflow warning in tst-strlcat2. - mips: FIx clone3 implementation (BZ 31325) - stdlib: fix qsort example in manual - soft-fp: Add brain format support - Rename c2x / gnu2x tests to c23 / gnu23 - manual: Fix up stdbit.texi - string: Use builtins for ffs and ffsll - misc: tst-poll: Proper synchronize with child before sending the signal - math: Remove bogus math implementations - Refer to C23 in place of C2X in glibc - elf: Remove _dl_sysdep_open_object hook function - build-many-glibcs: relax version check to allow non-digit characters - Use gcc __builtin_stdc_* builtins in stdbit.h if possible - Open master branch for glibc 2.40 development --- glibc.spec | 44 +++++++++++++++++++++++++++++++++++++++++--- sources | 2 +- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/glibc.spec b/glibc.spec index 23ae3f7..df6ebe7 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,5 +1,5 @@ -%global glibcsrcdir glibc-2.39 -%global glibcversion 2.39 +%global glibcsrcdir glibc-2.39.9000-33-gef7f4b1fef +%global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -171,7 +171,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 2 +%global baserelease 1 Release: %{baserelease}%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for @@ -2312,6 +2312,44 @@ update_gconv_modules_cache () %endif %changelog +* Thu Feb 15 2024 Carlos O'Donell - 2.39.9000-1 +- Auto-sync with upstream branch master, + commit ef7f4b1fef67430a8f3cfc77fa6aada2add851d7: +- Apply the Makefile sorting fix +- sysdeps/x86_64/Makefile (tests): Add the end marker +- sort-makefile-lines.py: Allow '_' in name and "^# name" +- trivial doc fix: remove weird phrase "syscall takes zero to five arguments" +- mips: Use builtins for ffs and ffsll +- x86: Expand the comment on when REP STOSB is used on memset +- x86: Do not prefer ERMS for memset on Zen3+ +- x86: Fix Zen3/Zen4 ERMS selection (BZ 30994) +- x86/cet: fix shadow stack test scripts +- test_printers_common.py: Remove invalid escape sequence +- elf: Remove attempt at env handling in elf/tst-rtld-list-diagnostics.py +- Add SOL_VSOCK from Linux 6.7 to bits/socket.h +- localedata: ssy_ER: Fix syntax error +- localedata: hr_HR: change currency to EUR/€ +- Change lv_LV collation to agree with the recent change in CLDR +- Add new AArch64 HWCAP2 definitions from Linux 6.7 to bits/hwcap.h +- string: Add hidden builtin definition for __strcpy_chk. +- arm: Remove wrong ldr from _dl_start_user (BZ 31339) +- LoongArch: Use builtins for ffs and ffsll +- Remove sysdeps/ia64/math-use-builtins-ffs.h +- Fix stringop-overflow warning in tst-strlcat2. +- mips: FIx clone3 implementation (BZ 31325) +- stdlib: fix qsort example in manual +- soft-fp: Add brain format support +- Rename c2x / gnu2x tests to c23 / gnu23 +- manual: Fix up stdbit.texi +- string: Use builtins for ffs and ffsll +- misc: tst-poll: Proper synchronize with child before sending the signal +- math: Remove bogus math implementations +- Refer to C23 in place of C2X in glibc +- elf: Remove _dl_sysdep_open_object hook function +- build-many-glibcs: relax version check to allow non-digit characters +- Use gcc __builtin_stdc_* builtins in stdbit.h if possible +- Open master branch for glibc 2.40 development + * Wed Feb 7 2024 Florian Weimer - 2.39-2 - Ignore symbolic links to . in sysroot construction diff --git a/sources b/sources index d3d5275..e1b5002 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.tar.xz) = 818f58172a52815b4338ea9f2a69ecaa3335492b9f8f64cbf8afb24c0d737982341968ecd79631cae3d3074ab0ae4bc6056fc4ba3ffe790849dc374835cd57e2 +SHA512 (glibc-2.39.9000-33-gef7f4b1fef.tar.xz) = aaba548b3447f12226117cb500f034335b4887a6aad1152578a167753828f1ff85d4d94f60a2b8f625364faf3e984787eb3504ff1e8fb38e0268bf7cf5035f1a From f58422e787db35b3b6842620122de64310a933d9 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Thu, 22 Feb 2024 13:27:32 -0500 Subject: [PATCH 016/106] Auto-sync with upstream branch master Upstream commit: b881f1efcd1b30c2afab3599b41ce9cd4864c823 - elf: Add new LoongArch reloc types (110 to 126) into elf.h - build-many-glibcs.py: Add s390 --disable-multi-arch / multi-arch configurations. - sparc: Treat the version field in the FPU control word as reserved - Implement setcontext/getcontext/makecontext/swapcontext for Hurd x86_64 - Use proc_getchildren_rusage when available in getrusage and times. - Linux: Switch back to assembly syscall wrapper for prctl (bug 29770) - i386: Use generic memrchr in libc (bug 31316) --- glibc.spec | 15 +++++++++++++-- sources | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index df6ebe7..6f56e95 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-33-gef7f4b1fef +%global glibcsrcdir glibc-2.39.9000-40-gb881f1efcd %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -171,7 +171,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 1 +%global baserelease 3 Release: %{baserelease}%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for @@ -2312,6 +2312,17 @@ update_gconv_modules_cache () %endif %changelog +* Thu Feb 22 2024 DJ Delorie - 2.39.9000-2 +- Auto-sync with upstream branch master, + commit b881f1efcd1b30c2afab3599b41ce9cd4864c823. +- elf: Add new LoongArch reloc types (110 to 126) into elf.h +- build-many-glibcs.py: Add s390 --disable-multi-arch / multi-arch configurations. +- sparc: Treat the version field in the FPU control word as reserved +- Implement setcontext/getcontext/makecontext/swapcontext for Hurd x86_64 +- Use proc_getchildren_rusage when available in getrusage and times. +- Linux: Switch back to assembly syscall wrapper for prctl (bug 29770) +- i386: Use generic memrchr in libc (bug 31316) + * Thu Feb 15 2024 Carlos O'Donell - 2.39.9000-1 - Auto-sync with upstream branch master, commit ef7f4b1fef67430a8f3cfc77fa6aada2add851d7: diff --git a/sources b/sources index e1b5002..f8b9808 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-33-gef7f4b1fef.tar.xz) = aaba548b3447f12226117cb500f034335b4887a6aad1152578a167753828f1ff85d4d94f60a2b8f625364faf3e984787eb3504ff1e8fb38e0268bf7cf5035f1a +SHA512 (glibc-2.39.9000-40-gb881f1efcd.tar.xz) = 6e56ee33fa4d5e1ae4698db358aea62d9916e6e6a36882e5b771c40f12ae8eefacf303d80848aa603af1e96a9247d7a021a035fe78fbfe9faef5c24be81d2849 From dc38b4582d85b9958577953fb009bfb6c5f90899 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Mon, 26 Feb 2024 22:36:29 +0100 Subject: [PATCH 017/106] Correct a past changelog entry --- glibc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index 6f56e95..b6f324a 100644 --- a/glibc.spec +++ b/glibc.spec @@ -2312,7 +2312,7 @@ update_gconv_modules_cache () %endif %changelog -* Thu Feb 22 2024 DJ Delorie - 2.39.9000-2 +* Thu Feb 22 2024 DJ Delorie - 2.39.9000-3 - Auto-sync with upstream branch master, commit b881f1efcd1b30c2afab3599b41ce9cd4864c823. - elf: Add new LoongArch reloc types (110 to 126) into elf.h From 1061be84f7384ab830cb12ca6742eef4eba583f2 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Tue, 27 Feb 2024 18:46:15 +0100 Subject: [PATCH 018/106] Migrate License field to SPDX identifiers (#2222074) This commit (a) expands on and corrects some errors in the long comment describing various licenses used in glibc preceding the License field; and (b) migrates the License field to SPDX identifiers based on an analysis of glibc-2.39 sources done using the ScanCode toolkit. Licenses Allowed in Fedora: https://docs.fedoraproject.org/en-US/legal/allowed-licenses Adoption of SPDX in Fedora: https://docs.fedoraproject.org/en-US/legal/update-existing-packages Repository of Fedora License Data: https://gitlab.com/fedora/legal/fedora-license-data ScanCode toolkit: https://github.com/nexB/scancode-toolkit --- glibc.spec | 71 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 19 deletions(-) diff --git a/glibc.spec b/glibc.spec index b6f324a..fa1ff93 100644 --- a/glibc.spec +++ b/glibc.spec @@ -171,35 +171,61 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 3 +%global baserelease 4 Release: %{baserelease}%{?dist} -# In general, GPLv2+ is used by programs, LGPLv2+ is used for -# libraries. +# Licenses: # -# LGPLv2+ with exceptions is used for things that are linked directly -# into dynamically linked programs and shared libraries (e.g. crt -# files, lib*_nonshared.a). Historically, this exception also applies -# to parts of libio. +# High level license status of the glibc source tree: # -# GPLv2+ with exceptions is used for parts of the Arm unwinder. +# * In general, GPLv2+ is used by programs, LGPLv2+ is used for +# libraries. # -# GFDL is used for the documentation. +# * LGPLv2+ with exceptions is used for things that are linked directly +# into dynamically linked programs and shared libraries (e.g. crt +# files, lib*_nonshared.a). Historically, this exception also applies +# to parts of libio. # -# Some other licenses are used in various places (BSD, Inner-Net, -# ISC, Public Domain). +# * LGPLv2 is used in a couple of places (e.g. time/timespec_get.c, by +# mistake). # -# HSRL and FSFAP are only used in test cases, which currently do not -# ship in binary RPMs, so they are not listed here. MIT is used for -# scripts/install-sh, which does not ship, either. +# * GPLv2+ with exceptions is used for parts of the Arm unwinder. # -# GPLv3+ is used by manual/texinfo.tex, which we do not use. +# * GFDL is used for the documentation. # -# LGPLv3+ is used by some Hurd code, which we do not build. +# * Some other licenses are used in various places (BSD, Inner-Net, +# ISC, Public Domain, etc.). # -# LGPLv2 is used in one place (time/timespec_get.c, by mistake), but -# it is not actually compiled, so it does not matter for libraries. -License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ and GPLv2+ with exceptions and BSD and Inner-Net and ISC and Public Domain and GFDL +# Licenses that make an appearance in the source tree but are not used: +# +# * HSRL and FSFAP are only used in test cases, which currently do not +# ship in binary RPMs, so they are not listed here. +# +# * GPLv3+ is used by manual/texinfo.tex, which we do not use and a test and +# some scripts that we do not ship, and so it is not listed here. +# +# * LGPLv3+ is used by some Hurd code, which we do not build. +# +# * A copyleft license is used in posix/runtests.c, but it is only a test +# case and so the license is not listed here. +# +# * A "PCRE License" is used by PCRE.tests, but it is only a test case and +# so the license is not listed here. +# +# * BSL-1.0 is only used by a test from boost and so the license is not +# listed here. +# +# * Unlicense is used in an OpenRISC 1000 file which we don't support. +# +# SPDX references: +# https://spdx.org/licenses +# https://docs.fedoraproject.org/en-US/legal/allowed-licenses +# https://gitlab.com/fedora/legal/fedora-license-data +# +# SPDX license string based on evaluation of glibc-2.39 sources by +# ScanCode toolkit (https://github.com/nexB/scancode-toolkit), +# and accounting for exceptions listed above: +License: LGPL-2.1-or-later AND SunPro AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later WITH GNU-compiler-exception AND GPL-2.0-only AND ISC AND LicenseRef-Fedora-Public-Domain AND HPND AND CMU-Mach AND LGPL-2.1-only AND LGPL-2.0-or-later AND Unicode-DFS-2015 AND GFDL-1.1-or-later AND GPL-1.0-or-later AND FSFUL AND MIT AND Inner-Net-2.0 AND X11 AND GPL-2.0-or-later WITH GCC-exception-2.0 AND GFDL-1.3-only AND GFDL-1.1-only URL: http://www.gnu.org/software/glibc/ Source0: %{?glibc_release_url}%{glibcsrcdir}.tar.xz @@ -2312,6 +2338,13 @@ update_gconv_modules_cache () %endif %changelog +* Tue Feb 27 2024 Arjun Shankar - 2.39.9000-4 +- Analyse glibc-2.39 sources for license information +- Migrate License field to SPDX identifiers for + https://docs.fedoraproject.org/en-US/legal/allowed-licenses/ + https://docs.fedoraproject.org/en-US/legal/update-existing-packages + (#2222074) + * Thu Feb 22 2024 DJ Delorie - 2.39.9000-3 - Auto-sync with upstream branch master, commit b881f1efcd1b30c2afab3599b41ce9cd4864c823. From 51c6ed86e2f3ffe1f89c47a97a9b00d913cf05fe Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Wed, 28 Feb 2024 09:55:29 +0100 Subject: [PATCH 019/106] CI tests: fix Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries Destination (name) of ld.so symlink can change and assert fails. Use readlink to get proper filename to be checked. --- .../runtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries/runtest.sh b/tests/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries/runtest.sh index e40714d..31bdebe 100755 --- a/tests/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries/runtest.sh +++ b/tests/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries/runtest.sh @@ -48,7 +48,7 @@ rlJournalStart rlAssertGrep "ldconfig.*, stripped" output.log rlAssertGrep "iconvconfig.*, stripped" output.log rlAssertGrep "localedef.*, stripped" output.log - rlAssertGrep "ld-.*, not stripped" output.log + rlAssertGrep "$(readlink -f /usr/bin/ld.so).*, not stripped" output.log rlLogInfo "Content of output.log:\n$(cat output.log)" # some debugging info (e.g. pthread struct) should be accessible even without installed debuginfo packages From a084b04ccfb131404116db9d74527390045fedae Mon Sep 17 00:00:00 2001 From: Patsy Griffin Date: Mon, 4 Mar 2024 10:36:20 -0500 Subject: [PATCH 020/106] Auto-sync with upstream branch master Upstream commit: b6e3898194bbae78910bbe9cd086937014961e45 - x86-64: Simplify minimum ISA check ifdef conditional with if - manual/tunables - Add entry for enable_secure tunable. - NEWS: Move enable_secure_tunable from 2.39 to 2.40. - riscv: Add and use alignment-ignorant memcpy - riscv: Add ifunc helper method to hwprobe.h - riscv: Enable multi-arg ifunc resolvers - riscv: Add __riscv_hwprobe pointer to ifunc calls - riscv: Add hwprobe vdso call support - linux: Introduce INTERNAL_VSYSCALL - riscv: Add Linux hwprobe syscall support - rtld: Add glibc.rtld.enable_secure tunable. - x86-64: Update _dl_tlsdesc_dynamic to preserve AMX registers - x86_64: Suppress false positive valgrind error - x86: Don't check XFD against /proc/cpuinfo - x86-64: Don't use SSE resolvers for ISA level 3 or above - x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers - sysdeps/unix/sysv/linux/x86_64/Makefile: Add the end marker - cdefs: Drop access attribute for _FORTIFY_SOURCE=3 (BZ #31383) - s390: Improve static-pie configure tests - x86: Change ENQCMD test to CHECK_FEATURE_PRESENT - debug: Improve mqueue.h fortify warnings with clang - debug: Improve fcntl.h fortify warnings with clang - wcsmbs: Improve fortify with clang - syslog: Improve fortify with clang - socket: Improve fortify with clang - unistd: Improve fortify with clang - stdlib: Improve fortify with clang - string: Improve fortify with clang - libio: Improve fortify with clang - cdefs.h: Add clang fortify directives - Update SHARED-FILES and license for Unicode 15.1.0. - aarch64/fpu: Sync libmvec routines from 2.39 and before with AOR - S390: Do not clobber r7 in clone [BZ #31402] - x86_64: Exclude SSE, AVX and FMA4 variants in libm multiarch - hurd: Reformat Makefile. - htl/tests: Reformat Makefile. - htl: Reformat Makefile. - hesiod: Reformat Makefile. - gmon: Reformat Makefile. - dlfcn: Reformat Makefile. - dirent: Reformat Makefile. - ctype: Reformat Makefile. - csu: Reformat Makefile. - conform: Reformat Makefile. - Support compiling .S files with additional options - x86-64: Save APX registers in ld.so trampoline - benchtests: Add more benchtests for rounding functions. - tests: gracefully handle AppArmor userns containment - treewide: python-scripts: use `is None` for none-equality - powerpc: Remove power7 strstr optimization - arm: Use _dl_find_object on __gnu_Unwind_Find_exidx (BZ 31405) - math: Update mips64 ulps --- glibc.spec | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index fa1ff93..35ad43c 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-40-gb881f1efcd +%global glibcsrcdir glibc-2.39.9000-92-gb6e3898194 %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -171,7 +171,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 4 +%global baserelease 5 Release: %{baserelease}%{?dist} # Licenses: @@ -2338,6 +2338,62 @@ update_gconv_modules_cache () %endif %changelog +* Mon Mar 04 2024 Patsy Griffin - 2.39.9000-5 +- Auto-sync with upstream branch master, + commit b6e3898194bbae78910bbe9cd086937014961e45. +- x86-64: Simplify minimum ISA check ifdef conditional with if +- manual/tunables - Add entry for enable_secure tunable. +- NEWS: Move enable_secure_tunable from 2.39 to 2.40. +- riscv: Add and use alignment-ignorant memcpy +- riscv: Add ifunc helper method to hwprobe.h +- riscv: Enable multi-arg ifunc resolvers +- riscv: Add __riscv_hwprobe pointer to ifunc calls +- riscv: Add hwprobe vdso call support +- linux: Introduce INTERNAL_VSYSCALL +- riscv: Add Linux hwprobe syscall support +- rtld: Add glibc.rtld.enable_secure tunable. +- x86-64: Update _dl_tlsdesc_dynamic to preserve AMX registers +- x86_64: Suppress false positive valgrind error +- x86: Don't check XFD against /proc/cpuinfo +- x86-64: Don't use SSE resolvers for ISA level 3 or above +- x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers +- sysdeps/unix/sysv/linux/x86_64/Makefile: Add the end marker +- cdefs: Drop access attribute for _FORTIFY_SOURCE=3 (BZ #31383) +- s390: Improve static-pie configure tests +- x86: Change ENQCMD test to CHECK_FEATURE_PRESENT +- debug: Improve mqueue.h fortify warnings with clang +- debug: Improve fcntl.h fortify warnings with clang +- wcsmbs: Improve fortify with clang +- syslog: Improve fortify with clang +- socket: Improve fortify with clang +- unistd: Improve fortify with clang +- stdlib: Improve fortify with clang +- string: Improve fortify with clang +- libio: Improve fortify with clang +- cdefs.h: Add clang fortify directives +- Update SHARED-FILES and license for Unicode 15.1.0. +- aarch64/fpu: Sync libmvec routines from 2.39 and before with AOR +- S390: Do not clobber r7 in clone [BZ #31402] +- x86_64: Exclude SSE, AVX and FMA4 variants in libm multiarch +- hurd: Reformat Makefile. +- htl/tests: Reformat Makefile. +- htl: Reformat Makefile. +- hesiod: Reformat Makefile. +- gmon: Reformat Makefile. +- dlfcn: Reformat Makefile. +- dirent: Reformat Makefile. +- ctype: Reformat Makefile. +- csu: Reformat Makefile. +- conform: Reformat Makefile. +- Support compiling .S files with additional options +- x86-64: Save APX registers in ld.so trampoline +- benchtests: Add more benchtests for rounding functions. +- tests: gracefully handle AppArmor userns containment +- treewide: python-scripts: use `is None` for none-equality +- powerpc: Remove power7 strstr optimization +- arm: Use _dl_find_object on __gnu_Unwind_Find_exidx (BZ 31405) +- math: Update mips64 ulps + * Tue Feb 27 2024 Arjun Shankar - 2.39.9000-4 - Analyse glibc-2.39 sources for license information - Migrate License field to SPDX identifiers for diff --git a/sources b/sources index f8b9808..75f20af 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-40-gb881f1efcd.tar.xz) = 6e56ee33fa4d5e1ae4698db358aea62d9916e6e6a36882e5b771c40f12ae8eefacf303d80848aa603af1e96a9247d7a021a035fe78fbfe9faef5c24be81d2849 +SHA512 (glibc-2.39.9000-92-gb6e3898194.tar.xz) = 8b354ced1de682e9bc34c9d4af8f6f7e593e0a6777617f3ff28cb7405bbe5ff7efb8de988213962a3484c589f4d6eaaa91d65ede24fb5cc1ffeb60fb0382528f From b07a1b7660bb527ce0f65e5fad54e115682d20a9 Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Tue, 12 Sep 2023 01:15:40 +0200 Subject: [PATCH 021/106] CI Tests: test coverage improvement --- .../Makefile | 63 +++++++++++++++++ .../PURPOSE | 3 + .../estale-test.c | 14 ++++ .../main.fmf | 22 ++++++ .../refs/orig_de_AT | 2 + .../refs/orig_de_DE | 2 + .../refs/orig_en_US | 2 + .../refs/orig_es_ES | 2 + .../refs/orig_fr_FR | 2 + .../refs/orig_fr_FR.utf8 | 2 + .../refs/orig_it_IT | 2 + .../refs/orig_ja_JP | 2 + .../refs/orig_ja_JP.utf8 | 2 + .../refs/orig_ko_KR.utf8 | 2 + .../refs/orig_pt_BR.utf8 | 2 + .../refs/orig_ru_UA.utf8 | 2 + .../refs/orig_zh_CN.utf8 | 2 + .../refs/orig_zh_TW.utf8 | 2 + .../runtest.sh | 64 +++++++++++++++++ .../Makefile | 64 +++++++++++++++++ .../PURPOSE | 5 ++ .../main.fmf | 18 +++++ .../runtest.sh | 54 +++++++++++++++ .../tst-mktime.c | 24 +++++++ .../Makefile | 64 +++++++++++++++++ .../PURPOSE | 5 ++ .../main.fmf | 18 +++++ .../runtest.sh | 68 +++++++++++++++++++ 28 files changed, 514 insertions(+) create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/Makefile create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/PURPOSE create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/estale-test.c create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/main.fmf create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_de_AT create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_de_DE create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_en_US create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_es_ES create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_fr_FR create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_fr_FR.utf8 create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_it_IT create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ja_JP create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ja_JP.utf8 create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ko_KR.utf8 create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_pt_BR.utf8 create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ru_UA.utf8 create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_CN.utf8 create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_TW.utf8 create mode 100755 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/runtest.sh create mode 100644 tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/Makefile create mode 100644 tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/PURPOSE create mode 100644 tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/main.fmf create mode 100755 tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/runtest.sh create mode 100644 tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/tst-mktime.c create mode 100644 tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/Makefile create mode 100644 tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/PURPOSE create mode 100644 tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf create mode 100755 tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/Makefile b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/Makefile new file mode 100644 index 0000000..c003abc --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7 +# Description: What the test does +# Author: Sergey Kolosov +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2023 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7 +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE estale-test.c refs + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Sergey Kolosov " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: What the test does" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 10m" >> $(METADATA) + @echo "RunFor: glibc" >> $(METADATA) + @echo "Requires: gcc glibc-devel glibc-langpack-es glibc-langpack-ja glibc-langpack-fr glibc-langpack-de glibc-langpack-it glibc-langpack-ko glibc-langpack-pt glibc-langpack-ru glibc-langpack-zh" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -RHEL6 -RHEL7" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/PURPOSE b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/PURPOSE new file mode 100644 index 0000000..64f3c96 --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7 +Description: What the test does +Author: Sergey Kolosov diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/estale-test.c b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/estale-test.c new file mode 100644 index 0000000..1a8efe2 --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/estale-test.c @@ -0,0 +1,14 @@ +#include +#include +#include + +int +main (void) +{ + setlocale (LC_ALL, ""); + errno = ESTALE; + perror ("ESTALE"); + errno = EAGAIN; + perror ("EAGAIN"); + return 0; +} diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/main.fmf b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/main.fmf new file mode 100644 index 0000000..ef964a9 --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/main.fmf @@ -0,0 +1,22 @@ +summary: What the test does +description: '' +contact: Sergey Kolosov +component: + - glibc +test: ./runtest.sh +framework: beakerlib +recommend: + - gcc + - glibc-devel + - glibc-langpack-es + - glibc-langpack-ja + - glibc-langpack-fr + - glibc-langpack-de + - glibc-langpack-it + - glibc-langpack-ko + - glibc-langpack-pt + - glibc-langpack-ru + - glibc-langpack-zh +duration: 10m +extra-summary: /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7 +extra-task: /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7 diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_de_AT b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_de_AT new file mode 100644 index 0000000..3719e16 --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_de_AT @@ -0,0 +1,2 @@ +ESTALE: Veraltete Dateizugriffsnummer (file handle) +EAGAIN: Die Ressource ist zur Zeit nicht verfgbar diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_de_DE b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_de_DE new file mode 100644 index 0000000..3719e16 --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_de_DE @@ -0,0 +1,2 @@ +ESTALE: Veraltete Dateizugriffsnummer (file handle) +EAGAIN: Die Ressource ist zur Zeit nicht verfgbar diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_en_US b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_en_US new file mode 100644 index 0000000..0074184 --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_en_US @@ -0,0 +1,2 @@ +ESTALE: Stale file handle +EAGAIN: Resource temporarily unavailable diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_es_ES b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_es_ES new file mode 100644 index 0000000..99ba394 --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_es_ES @@ -0,0 +1,2 @@ +ESTALE: `handle' de fichero en desuso +EAGAIN: Recurso no disponible temporalmente diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_fr_FR b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_fr_FR new file mode 100644 index 0000000..cb93f19 --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_fr_FR @@ -0,0 +1,2 @@ +ESTALE: Panne d'accs au fichier +EAGAIN: Ressource temporairement non disponible diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_fr_FR.utf8 b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_fr_FR.utf8 new file mode 100644 index 0000000..19bb87f --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_fr_FR.utf8 @@ -0,0 +1,2 @@ +ESTALE: Panne d'accès au fichier +EAGAIN: Ressource temporairement non disponible diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_it_IT b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_it_IT new file mode 100644 index 0000000..20e9f4b --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_it_IT @@ -0,0 +1,2 @@ +ESTALE: Riferimento al file obsoleto +EAGAIN: Risorsa temporaneamente non disponibile diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ja_JP b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ja_JP new file mode 100644 index 0000000..eb01dfe --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ja_JP @@ -0,0 +1,2 @@ +ESTALE: ŤեϥɥǤ +EAGAIN: ꥽ŪѤǤޤ diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ja_JP.utf8 b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ja_JP.utf8 new file mode 100644 index 0000000..1a4a02c --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ja_JP.utf8 @@ -0,0 +1,2 @@ +ESTALE: 古いファイルハンドルです +EAGAIN: リソースが一時的に利用できません diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ko_KR.utf8 b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ko_KR.utf8 new file mode 100644 index 0000000..7855938 --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ko_KR.utf8 @@ -0,0 +1,2 @@ +ESTALE: 끊어진 파일 핸들 +EAGAIN: 자원이 일시적으로 사용 불가능함 diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_pt_BR.utf8 b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_pt_BR.utf8 new file mode 100644 index 0000000..acb9aaa --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_pt_BR.utf8 @@ -0,0 +1,2 @@ +ESTALE: Manipulador de arquivo corrompido +EAGAIN: Recurso temporariamente indisponível diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ru_UA.utf8 b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ru_UA.utf8 new file mode 100644 index 0000000..82324e0 --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_ru_UA.utf8 @@ -0,0 +1,2 @@ +ESTALE: Устаревший дескриптор файла +EAGAIN: Ресурс временно недоступен diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_CN.utf8 b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_CN.utf8 new file mode 100644 index 0000000..147901b --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_CN.utf8 @@ -0,0 +1,2 @@ +ESTALE: 过旧的文件控柄 +EAGAIN: 资源暂时不可用 diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_TW.utf8 b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_TW.utf8 new file mode 100644 index 0000000..212c34d --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_TW.utf8 @@ -0,0 +1,2 @@ +ESTALE: 過舊的檔案控柄 +EAGAIN: 資源暫時無法取得 diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/runtest.sh b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/runtest.sh new file mode 100755 index 0000000..f0704ca --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/runtest.sh @@ -0,0 +1,64 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/glibc/Regression/ESTALE-error-message-translation-regression-from-RHEL7 +# Description: What the test does +# Author: Sergey Kolosov +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2023 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="glibc" +TESTPROG="estale-test" +TESTED_LANGS="de_AT de_DE en_US es_ES fr_FR fr_FR.utf8 it_IT ja_JP ja_JP.utf8 ko_KR.utf8 pt_BR.utf8 ru_UA.utf8 zh_CN.utf8 zh_TW.utf8" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + PACKNVR=$(rpm -q ${PACKAGE}.`arch`) + rlRun "TESTTMPDIR=$(mktemp -d)" + rlRun "cp ${TESTPROG}.c $TESTTMPDIR" + rlRun "cp refs/orig_* $TESTTMPDIR" + rlRun "pushd $TESTTMPDIR" + rlPhaseEnd + + rlPhaseStartTest prepare + rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG" + rlAssertExists "$TESTPROG" + rlPhaseEnd + + for L in $TESTED_LANGS + do + rlPhaseStartTest estale-test-$L + rlRun -c "LANG=$L ./${TESTPROG} 2> out_$L" + rlAssertNotDiffer out_$L orig_$L + rlLogInfo "out_$L:\n$(cat out_$L)" + rlPhaseEnd + done + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TESTTMPDIR" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/Makefile b/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/Makefile new file mode 100644 index 0000000..33f1a75 --- /dev/null +++ b/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/glibc/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when +# Description: Test for BZ#2110357 (glibc mktime() fails with -EOVERFLOW when) +# Author: Sergey Kolosov +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2022 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/glibc/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE tst-mktime.c + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Sergey Kolosov " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#2110357 (glibc mktime() fails with -EOVERFLOW when)" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 10m" >> $(METADATA) + @echo "RunFor: glibc" >> $(METADATA) + @echo "Requires: glibc glibc-devel gcc" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 2110357" >> $(METADATA) + @echo "Releases: -RHEL4 -RHEL6 -RHELClient5 -RHELServer5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/PURPOSE b/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/PURPOSE new file mode 100644 index 0000000..a5ccc83 --- /dev/null +++ b/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /tools/glibc/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when +Description: Test for BZ#2110357 (glibc mktime() fails with -EOVERFLOW when) +Author: Sergey Kolosov +Bug summary: glibc: mktime() fails with -EOVERFLOW when tm_isdst=1 and a neighboring DST boundary is far from tm_year +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2110357 diff --git a/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/main.fmf b/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/main.fmf new file mode 100644 index 0000000..b4a5b47 --- /dev/null +++ b/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/main.fmf @@ -0,0 +1,18 @@ +summary: Test for BZ#2110357 (glibc mktime() fails with -EOVERFLOW when) +description: | + Bug summary: glibc: mktime() fails with -EOVERFLOW when tm_isdst=1 and a neighboring DST boundary is far from tm_year + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2110357 +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2110357 +contact: Sergey Kolosov +component: + - glibc +test: ./runtest.sh +framework: beakerlib +recommend: + - glibc + - glibc-devel + - gcc +duration: 10m +extra-summary: /tools/glibc/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when +extra-task: /tools/glibc/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when diff --git a/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/runtest.sh b/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/runtest.sh new file mode 100755 index 0000000..77aaf34 --- /dev/null +++ b/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/runtest.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/glibc/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when +# Description: Test for BZ#2110357 (glibc mktime() fails with -EOVERFLOW when) +# Author: Sergey Kolosov +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2022 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="glibc" +TESTPROG="tst-mktime" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + PACKNVR=$(rpm -q ${PACKAGE}.`arch`) + rlRun "TESTTMPDIR=$(mktemp -d)" + rlRun "cp ${TESTPROG}.c $TESTTMPDIR" + rlRun "pushd $TESTTMPDIR" + rlPhaseEnd + + rlPhaseStartTest + rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG" + rlAssertExists "$TESTPROG" + rlRun -c "./${TESTPROG}" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TESTTMPDIR" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/tst-mktime.c b/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/tst-mktime.c new file mode 100644 index 0000000..d73c97d --- /dev/null +++ b/tests/Regression/bz2110357-glibc-mktime-fails-with-EOVERFLOW-when/tst-mktime.c @@ -0,0 +1,24 @@ +#include +#include +#include +#include + +int main(int argc, char *argv[]) { + time_t t; + struct tm tm; + + setenv("TZ", "Asia/Tokyo", 1); + + memset(&tm, 0, sizeof(tm)); + tm.tm_mday = 1; + tm.tm_mon = 1; + tm.tm_year = 2023; + tm.tm_isdst = 1; + + t = mktime(&tm); + printf("mktime(&tm) = %d\n", t); + if (t < 0) + exit(1); + + return 0; +} diff --git a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/Makefile b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/Makefile new file mode 100644 index 0000000..2840e52 --- /dev/null +++ b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/glibc/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in +# Description: Test for BZ#2115831 (glibc missing .gnu_debuglink section in libc.so.6,) +# Author: Sergey Kolosov +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2022 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/glibc/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Sergey Kolosov " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#2115831 (glibc missing .gnu_debuglink section in libc.so.6,)" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 20m" >> $(METADATA) + @echo "RunFor: glibc" >> $(METADATA) + @echo "Requires: elfutils glibc glibc-debuginfo" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 2115831" >> $(METADATA) + @echo "Releases: RHEL8 RHEL9" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/PURPOSE b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/PURPOSE new file mode 100644 index 0000000..85effc3 --- /dev/null +++ b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /tools/glibc/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in +Description: Test for BZ#2115831 (glibc missing .gnu_debuglink section in libc.so.6,) +Author: Sergey Kolosov +Bug summary: glibc: missing .gnu_debuglink section in libc.so.6, redundant annobin symbols and debufginfo for ld.so +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2115831 diff --git a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf new file mode 100644 index 0000000..c0453f6 --- /dev/null +++ b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf @@ -0,0 +1,18 @@ +summary: Test for BZ#2115831 (glibc missing .gnu_debuglink section in libc.so.6,) +description: | + Bug summary: glibc: missing .gnu_debuglink section in libc.so.6, redundant annobin symbols and debufginfo for ld.so + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2115831 +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2115831 +contact: Sergey Kolosov +component: + - glibc +test: ./runtest.sh +framework: beakerlib +recommend: + - elfutils + - glibc + - glibc-debuginfo +duration: 20m +extra-summary: /tools/glibc/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in +extra-task: /tools/glibc/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in diff --git a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh new file mode 100755 index 0000000..f534c2c --- /dev/null +++ b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh @@ -0,0 +1,68 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/glibc/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in +# Description: Test for BZ#2115831 (glibc missing .gnu_debuglink section in libc.so.6,) +# Author: Sergey Kolosov +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2022 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="glibc" +LIBC_SO_6_LIBS=$(find /usr/ -name libc.so.6) +TESTL2="/usr/bin/ld.so" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlAssertRpm ${PACKAGE}-debuginfo + PACKNVR=$(rpm -q ${PACKAGE}.`arch`) + rlRun "TESTTMPDIR=$(mktemp -d)" + rlRun "pushd $TESTTMPDIR" + rlPhaseEnd + + rlPhaseStartTest + for LIB in $LIBC_SO_6_LIBS; do + rlRun -l "eu-readelf -S $LIB | grep -q .debug_" 1 + rlRun -l "eu-readelf -S $LIB | grep -q .gnu_debuglink" 0 + done + rlRun -l "eu-readelf -S $TESTL2 | grep -q .debug_" 0 + rlRun -l "eu-readelf -S $TESTL2 | grep -q .gnu_debuglink" 1 + rlRun -l "eu-readelf -s $TESTL2 | grep -q annobin" 1 + if rlIsRHEL "8"; then + rlRun -l "rpm -ql glibc-debuginfo|sort|grep '/ld-$(rpm -q --qf "%{VERSION}" ${PACKAGE}.`arch`)'" 1 + rlRun -l "rpm -ql glibc-debuginfo|sort|grep '/libc-$(rpm -q --qf "%{VERSION}" ${PACKAGE}.`arch`)'" 0 + elif rlIsRHEL "9"; then + rlRun -l "rpm -ql glibc-debuginfo|sort|grep ld-linux-" 1 + rlRun -l "rpm -ql glibc-debuginfo|sort|grep libc.so.6-" 0 + else + rlFail "Test does not support current distro (yet?)!" + fi + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TESTTMPDIR" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From 71d41742d1004faa15e75485c633bacd966e814e Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Tue, 12 Sep 2023 10:33:19 +0200 Subject: [PATCH 022/106] CI Tests: fix Fedora support for tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in --- .../bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh index f534c2c..61cddd6 100755 --- a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh +++ b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh @@ -52,7 +52,7 @@ rlJournalStart if rlIsRHEL "8"; then rlRun -l "rpm -ql glibc-debuginfo|sort|grep '/ld-$(rpm -q --qf "%{VERSION}" ${PACKAGE}.`arch`)'" 1 rlRun -l "rpm -ql glibc-debuginfo|sort|grep '/libc-$(rpm -q --qf "%{VERSION}" ${PACKAGE}.`arch`)'" 0 - elif rlIsRHEL "9"; then + elif rlIsRHEL "9" || rlIsFedora; then rlRun -l "rpm -ql glibc-debuginfo|sort|grep ld-linux-" 1 rlRun -l "rpm -ql glibc-debuginfo|sort|grep libc.so.6-" 0 else From fa5d2d58b2964165d81dfe18268a44a39670020d Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Fri, 1 Mar 2024 16:43:45 +0100 Subject: [PATCH 023/106] CI Tests: updates zh_CN translation for tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7 --- .../refs/orig_zh_CN.utf8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_CN.utf8 b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_CN.utf8 index 147901b..c45e771 100644 --- a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_CN.utf8 +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_CN.utf8 @@ -1,2 +1,2 @@ -ESTALE: 过旧的文件控柄 +ESTALE: 过旧的文件句柄 EAGAIN: 资源暂时不可用 From c7aa4fc83f47c1d2ce6b3807104b0af7d4baaf76 Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Mon, 4 Mar 2024 23:47:23 +0100 Subject: [PATCH 024/106] CI Tests: tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in: adjust test for future RHEL versions --- .../bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh index 61cddd6..36f8d52 100755 --- a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh +++ b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh @@ -52,7 +52,7 @@ rlJournalStart if rlIsRHEL "8"; then rlRun -l "rpm -ql glibc-debuginfo|sort|grep '/ld-$(rpm -q --qf "%{VERSION}" ${PACKAGE}.`arch`)'" 1 rlRun -l "rpm -ql glibc-debuginfo|sort|grep '/libc-$(rpm -q --qf "%{VERSION}" ${PACKAGE}.`arch`)'" 0 - elif rlIsRHEL "9" || rlIsFedora; then + elif rlIsRHEL ">=9" || rlIsFedora; then rlRun -l "rpm -ql glibc-debuginfo|sort|grep ld-linux-" 1 rlRun -l "rpm -ql glibc-debuginfo|sort|grep libc.so.6-" 0 else From 51fcca62926cf737b14234e15b4011ac3a99cc1f Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Mon, 4 Mar 2024 23:47:46 +0100 Subject: [PATCH 025/106] CI Tests: tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in: require glibc-debuginfo --- .../bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf index c0453f6..36de426 100644 --- a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf +++ b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf @@ -9,7 +9,7 @@ component: - glibc test: ./runtest.sh framework: beakerlib -recommend: +require: - elfutils - glibc - glibc-debuginfo From 4246727bc0d60bbb567ae1de0a7c8da7db97d834 Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Tue, 5 Mar 2024 11:42:26 +0100 Subject: [PATCH 026/106] CI Tests: tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in: fixes libc.so.6 search path --- .../runtest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh index 36f8d52..ad288e4 100755 --- a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh +++ b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/runtest.sh @@ -29,19 +29,19 @@ . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="glibc" -LIBC_SO_6_LIBS=$(find /usr/ -name libc.so.6) +LIBC_SO_6_LIBS=$(find /usr/lib/ /usr/lib64/ -name libc.so.6) TESTL2="/usr/bin/ld.so" rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE - rlAssertRpm ${PACKAGE}-debuginfo PACKNVR=$(rpm -q ${PACKAGE}.`arch`) rlRun "TESTTMPDIR=$(mktemp -d)" rlRun "pushd $TESTTMPDIR" rlPhaseEnd rlPhaseStartTest + rlRun -l "rpm -ql glibc-debuginfo" for LIB in $LIBC_SO_6_LIBS; do rlRun -l "eu-readelf -S $LIB | grep -q .debug_" 1 rlRun -l "eu-readelf -S $LIB | grep -q .gnu_debuglink" 0 From 60e20f67b62bb2852a8520108517cd8278df9664 Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Wed, 6 Mar 2024 14:44:49 +0100 Subject: [PATCH 027/106] CI Tests: tests/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries: set order to 1000 to avoid removing glibc-debuginfo package for other tests --- .../main.fmf | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries/main.fmf b/tests/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries/main.fmf index 31302be..39acd0b 100644 --- a/tests/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries/main.fmf +++ b/tests/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries/main.fmf @@ -14,5 +14,6 @@ recommend: - glibc - gdb duration: 15m +order: 1000 extra-summary: /tools/glibc/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries extra-task: /tools/glibc/Regression/bz1661513-glibc-Adjust-to-rpms-find-debuginfo-sh-changes-to-keep-stripping-binaries From 9d961552f70a98a343d25d1b469b1ec537fe0d1e Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Wed, 6 Mar 2024 14:57:01 +0100 Subject: [PATCH 028/106] CI Tests: tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in: disabled until the bug will be fixed --- .../bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf index 36de426..4a3341c 100644 --- a/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf +++ b/tests/Regression/bz2115831-glibc-missing-gnu-debuglink-section-in/main.fmf @@ -1,3 +1,4 @@ +enabled: false summary: Test for BZ#2115831 (glibc missing .gnu_debuglink section in libc.so.6,) description: | Bug summary: glibc: missing .gnu_debuglink section in libc.so.6, redundant annobin symbols and debufginfo for ld.so From 205275b675070809b1236b7d11ded26938510b11 Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Tue, 12 Mar 2024 18:32:23 +0100 Subject: [PATCH 029/106] CI Tests: makes tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7 compatible with RHEL --- .../refs/orig_zh_CN.utf8_rhel | 2 ++ .../runtest.sh | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_CN.utf8_rhel diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_CN.utf8_rhel b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_CN.utf8_rhel new file mode 100644 index 0000000..147901b --- /dev/null +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/refs/orig_zh_CN.utf8_rhel @@ -0,0 +1,2 @@ +ESTALE: 过旧的文件控柄 +EAGAIN: 资源暂时不可用 diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/runtest.sh b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/runtest.sh index f0704ca..1406fa5 100755 --- a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/runtest.sh +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/runtest.sh @@ -51,7 +51,12 @@ rlJournalStart do rlPhaseStartTest estale-test-$L rlRun -c "LANG=$L ./${TESTPROG} 2> out_$L" - rlAssertNotDiffer out_$L orig_$L + if rlIsRHEL && [ -f orig_${L}_rhel ] + then + rlAssertNotDiffer out_$L orig_${L}_rhel + else + rlAssertNotDiffer out_$L orig_$L + fi rlLogInfo "out_$L:\n$(cat out_$L)" rlPhaseEnd done From e025effd84d415d98dcebbc97cdf03e6e44465b8 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 13 Mar 2024 22:11:58 +0000 Subject: [PATCH 030/106] Build glibc32 binary package from glibc sources as part of x86_64 build GCC for x86_64 includes 32-bit multilib support, requiring a 32-bit glibc to be present when GCC is built. That 32-bit glibc cannot come from an i686 RPM because of limitations in Koji, so there is a hack including a glibc32 "source" package that actually contains binaries from an i686 build (and thus needs additional manual update steps). Set up glibc.spec to build a glibc32 binary package directly when building for x86_64, so avoiding the need for the separate glibc32 source package. This improvement is tracked in and . The list of files in the glibc32 package has been compared to that in the previous package (the gnu/lib-names-32.h header is added, as its previous omission appears to be a bug). And the lists of files in the other packages built from glibc.spec have also been compared before and after this change, to make sure there aren't inappropriate changes to those lists. --- glibc.spec | 128 +++++++++++++++++++++++++++++++++++++++-- wrap-find-debuginfo.sh | 10 ++++ 2 files changed, 133 insertions(+), 5 deletions(-) diff --git a/glibc.spec b/glibc.spec index 35ad43c..edea382 100644 --- a/glibc.spec +++ b/glibc.spec @@ -171,7 +171,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 5 +%global baserelease 6 Release: %{baserelease}%{?dist} # Licenses: @@ -1080,6 +1080,27 @@ that can be installed across architectures. %dnl %%{without bootstrap} %endif +############################################################################## +# glibc32 (only for use in building GCC, not shipped) +############################################################################## +%ifarch x86_64 +%package -n glibc32 +Summary: The GNU libc libraries (32-bit) +Conflicts: glibc(x86-32) + +%description -n glibc32 +This package is only used for internal building of multilib aware +packages, like gcc, due to a technical limitation in the distribution +build environment. Any package which needs both 32-bit and 64-bit +runtimes at the same time must install glibc32 (marked as a 64-bit +package) to access the 32-bit development files during a 64-bit build. + +This package is not supported or intended for use outside of the +distribution build enviroment. Regular users can install both 32-bit and +64-bit runtimes and development files without any problems. + +%endif + ############################################################################## # Prepare for the build. ############################################################################## @@ -1244,12 +1265,10 @@ build() --with-nonshared-cflags="$BuildFlagsNonshared" \ --enable-bind-now \ --build=%{target} \ + ${configure_host} \ --enable-stack-protector=strong \ --enable-systemtap \ ${core_with_options} \ -%ifarch x86_64 - --enable-cet \ -%endif %ifarch %{ix86} --disable-multi-arch \ %endif @@ -1282,6 +1301,17 @@ build() popd } +%ifarch x86_64 +# Build for the glibc32 package. +GCC="$GCC -m32" GXX="$GXX -m32" BuildFlags="${BuildFlags/-m64/-m32}" configure_host="--host=i686-linux-gnu" build 32 +%endif + +configure_host="" + +%ifarch x86_64 +configure_host="--enable-cet" +%endif + # Default set of compiler options. build @@ -1312,6 +1342,20 @@ for d in %{glibc_sysroot}%{_libdir} %{glibc_sysroot}/%{_lib}; do done %endif +%ifarch x86_64 +# Install for the glibc32 package. +pushd build-%{target}-32 +%make_build install_root=%{glibc_sysroot} install +popd +pushd %{glibc_sysroot} +rm -rf etc sbin var usr/bin usr/lib/gconv usr/libexec usr/sbin usr/share +rm -f lib/libnss_db* lib/libnss_hesiod* lib/libnsl* usr/lib/libnsl* usr/lib/libnss* +rm usr/lib/libc_malloc_debug.so +strip -g usr/lib/*.o +mv lib/{libmemusage,libpcprofile}.so usr/lib/ +popd +%endif + # Build and install: pushd build-%{target} %make_build install_root=%{glibc_sysroot} install @@ -1584,7 +1628,17 @@ pushd %{glibc_sysroot}/%{sysroot_prefix} mkdir -p usr/lib usr/lib64 cp -a %{glibc_sysroot}/%{_prefix}/include usr/. +%ifarch x86_64 +# 32-bit headers for glibc32 don't go in the sysroot. +rm usr/include/gnu/*-32.h +%endif for lib in lib lib64; do +%ifarch x86_64 + if [ "$lib" = "lib" ]; then + # 32-bit libraries built for glibc32 don't go in the sysroot. + continue + fi +%endif for pfx in "" %{_prefix}/; do if test -d %{glibc_sysroot}/$pfx$lib ; then # Implement UsrMove: everything goes into usr/$lib. Only @@ -1668,6 +1722,8 @@ popd # - File list with the .so symbolic links for NSS packages. # * compat-libpthread-nonshared.filelist. # - File list for compat-libpthread-nonshared subpackage. +# * glibc32.filelist +# - Files for the glibc32 packages. # Create the main file lists. This way we can append to any one of them later # wihtout having to create it. Note these are removed at the start of the @@ -1686,6 +1742,9 @@ touch nss_db.filelist touch nss_hesiod.filelist touch nss-devel.filelist touch compat-libpthread-nonshared.filelist +%ifarch x86_64 +touch glibc32.filelist +%endif ############################################################################### # Master file list, excluding a few things. @@ -1772,6 +1831,12 @@ cat master.filelist \ -e '/libnsl' \ -e 'glibc-benchtests' \ -e 'aux-cache' \ +%ifarch x86_64 +%dnl Exclude 32-bit libraries built for glibc32. + -e '/lib/.*\.o' \ + -e '/lib/.*\.a' \ + -e '/lib/.*\.so.*' \ +%endif > glibc.filelist # Add specific files: @@ -1781,9 +1846,18 @@ for module in compat files dns; do cat master.filelist \ | grep -E \ -e "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \ +%ifarch x86_64 +%dnl Exclude 32-bit libraries built for glibc32. + | grep -v -e /lib/lib \ +%endif >> glibc.filelist done -grep -e "libmemusage.so" -e "libpcprofile.so" master.filelist >> glibc.filelist +grep -e "libmemusage.so" -e "libpcprofile.so" master.filelist \ +%ifarch x86_64 +%dnl Exclude 32-bit libraries built for glibc32. + | grep -v -e /lib/lib \ +%endif + >> glibc.filelist ############################################################################### # glibc-gconv-extra @@ -1824,6 +1898,10 @@ other_static_library_pattern='/libpthread_nonshared\.a' grep '%{_libdir}/lib.*\.a' master.filelist \ | grep "$devel_static_library_pattern" \ | grep -v "$other_static_library_pattern" \ +%ifarch x86_64 +%dnl Exclude 32-bit libraries built for glibc32. + | grep -v '/lib/.*\.a' \ +%endif > devel.filelist # Put all of the object files and *.so (not the versioned ones) into the @@ -1836,6 +1914,10 @@ grep '%{_libdir}/lib.*\.so' < master.filelist >> devel.filelist sed -i -e '\,libmemusage.so,d' \ -e '\,libpcprofile.so,d' \ -e '\,/libnss_[a-z]*\.so$,d' \ +%ifarch x86_64 +%dnl Exclude 32-bit libraries built for glibc32. + -e '\,/lib/.*\.so$,d' \ +%endif devel.filelist %if %{glibc_autorequires} @@ -1867,8 +1949,17 @@ grep '%{_docdir}' master.filelist >> doc.filelist # across all multilib packages. We must keep gnu/stubs.h and gnu/lib-names.h # in the glibc-headers package, but the -32, -64, -64-v1, and -64-v2 versions # go into glibc-devel. +%ifarch x86_64 +# Hardcode 32-bit and 64-bit header names here, so that 32-bit headers end up +# in glibc32. +grep '%{_prefix}/include/gnu/stubs-64\.h$' < master.filelist >> devel.filelist || : +grep '%{_prefix}/include/gnu/lib-names-64\.h$' < master.filelist >> devel.filelist || : +grep '%{_prefix}/include/gnu/stubs-32\.h$' < master.filelist >> glibc32.filelist || : +grep '%{_prefix}/include/gnu/lib-names-32\.h$' < master.filelist >> glibc32.filelist || : +%else grep '%{_prefix}/include/gnu/stubs-.*\.h$' < master.filelist >> devel.filelist || : grep '%{_prefix}/include/gnu/lib-names-.*\.h$' < master.filelist >> devel.filelist || : +%endif # Put the include files into headers file list. grep '%{_prefix}/include' < master.filelist \ | grep -E -v '%{_prefix}/include/gnu/stubs-.*\.h$' \ @@ -1888,6 +1979,10 @@ grep '%{_prefix}/include' < master.filelist >> devel.filelist grep '%{_libdir}/lib.*\.a' < master.filelist \ | grep -v "$devel_static_library_pattern" \ | grep -v "$other_static_library_pattern" \ +%ifarch x86_64 +%dnl Exclude 32-bit libraries built for glibc32. + | grep -v '/lib/.*\.a' \ +%endif > static.filelist ############################################################################### @@ -1985,6 +2080,15 @@ echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.f ############################################################################### echo "%{_libdir}/libpthread_nonshared.a" >> compat-libpthread-nonshared.filelist +############################################################################### +# glibc32 +############################################################################### +%ifarch x86_64 +grep '/lib/.*\.o$' master.filelist >> glibc32.filelist +grep '/lib/.*\.a$' master.filelist >> glibc32.filelist +grep '/lib/.*\.so' master.filelist >> glibc32.filelist +%endif + ############################################################################## # Run the glibc testsuite ############################################################################## @@ -2052,8 +2156,14 @@ echo ====================PLT RELOCS END================== # link and then pick the first loader (although there should be only # one). Use -maxdepth 2 to avoid descending into the /sys-root/ # sub-tree. See wrap-find-debuginfo.sh. +%ifarch x86_64 +# Hardcode the patch to avoid picking up the 32-bit dynamic linker from +# glibc32; both 32-bit and 64-bit dynamic linkers will be present. +ldso_path="%{glibc_sysroot}/lib64/ld-linux-x86-64.so.2" +%else ldso_path="$(find %{glibc_sysroot}/ -maxdepth 2 -regextype posix-extended \ -regex '.*/ld(-.*|64|)\.so\.[0-9]+$' -type f | LC_ALL=C sort | head -n1)" +%endif run_ldso="$ldso_path --library-path %{glibc_sysroot}/%{_lib}" # Show the auxiliary vector as seen by the new library @@ -2337,7 +2447,15 @@ update_gconv_modules_cache () %{sysroot_prefix} %endif +%ifarch x86_64 +%files -f glibc32.filelist -n glibc32 +%endif + %changelog +* Wed Mar 13 2024 Joseph Myers - 2.39.9000-6 +- Build glibc32 binary package from glibc sources as part of x86_64 build, + not from glibc32 SRPM that contains binaries from i686 RPM build. + * Mon Mar 04 2024 Patsy Griffin - 2.39.9000-5 - Auto-sync with upstream branch master, commit b6e3898194bbae78910bbe9cd086937014961e45. diff --git a/wrap-find-debuginfo.sh b/wrap-find-debuginfo.sh index 1fae784..ba1719a 100644 --- a/wrap-find-debuginfo.sh +++ b/wrap-find-debuginfo.sh @@ -43,6 +43,11 @@ for ldso_candidate in `find "$sysroot_path" -maxdepth 2 \ -regextype posix-extended -regex '.*/ld(-.*|64|)\.so\.[0-9]+$' -type f` ; do if test -z "$ldso_path" ; then ldso_path="$ldso_candidate" + elif [ -f "$sysroot_path/lib64/ld-linux-x86-64.so.2" ] && [ -f "$sysroot_path/lib/ld-linux.so.2" ]; then + # x86_64 with 32-bit libc built for glibc32 as well. Finding + # multiple dynamic linkers is expected, not a bug; ensure the + # 64-bit one is used. + ldso_path="$sysroot_path/lib64/ld-linux-x86-64.so.2" else echo "error: multiple ld.so candidates: $ldso_path, $ldso_candidate" exit 1 @@ -54,6 +59,11 @@ libc_path= for libc_candidate in `find "$sysroot_path" -maxdepth 2 -name libc.so.6`; do if test -z "$libc_path" ; then libc_path="$libc_candidate" + elif [ -f "$sysroot_path/lib64/ld-linux-x86-64.so.2" ] && [ -f "$sysroot_path/lib/ld-linux.so.2" ]; then + # x86_64 with 32-bit libc built for glibc32 as well. The test + # here uses ld.so paths, not libc paths, to ensure it doesn't + # apply on any other architecture. + libc_path="$sysroot_path/lib64/libc.so.6" else echo "error: multiple libc.so.6 candidates: $libc_path, $libc_candidate" exit 1 From 01911dc70e30a96d5a7835475187ff6241a68a2d Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 15 Mar 2024 08:44:46 +0100 Subject: [PATCH 031/106] Do not generate ELF dependency information for glibc32 --- glibc.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index edea382..6845ba2 100644 --- a/glibc.spec +++ b/glibc.spec @@ -171,7 +171,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 6 +%global baserelease 7 Release: %{baserelease}%{?dist} # Licenses: @@ -1087,6 +1087,11 @@ that can be installed across architectures. %package -n glibc32 Summary: The GNU libc libraries (32-bit) Conflicts: glibc(x86-32) +%dnl The gcc package does not use ELF dependencies to install glibc32: +%dnl BuildRequires: (glibc32 or glibc-devel(%{__isa_name}-32)) +%dnl Not generating the ELF dependencies for glibc32 makes it less likely +%dnl that the package is selected by accident over glibc.i686. +AutoReqProv: no %description -n glibc32 This package is only used for internal building of multilib aware @@ -2452,6 +2457,9 @@ update_gconv_modules_cache () %endif %changelog +* Fri Mar 15 2024 Florian Weimer - 2.39.9000-7 +- Do not generate ELF dependency information for glibc32 + * Wed Mar 13 2024 Joseph Myers - 2.39.9000-6 - Build glibc32 binary package from glibc sources as part of x86_64 build, not from glibc32 SRPM that contains binaries from i686 RPM build. From 136bbceed946bc5d3db7f89a718939a75117dd1a Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 16 Mar 2024 15:38:14 +0100 Subject: [PATCH 032/106] Global dynamic TLS access may clobber RBX (#2269799) --- glibc-rh2269799.patch | 34 ++++++++++++++++++++++++++++++++++ glibc.spec | 6 +++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 glibc-rh2269799.patch diff --git a/glibc-rh2269799.patch b/glibc-rh2269799.patch new file mode 100644 index 0000000..9deeae2 --- /dev/null +++ b/glibc-rh2269799.patch @@ -0,0 +1,34 @@ +Author: Florian Weimer +Date: Sat Mar 16 15:30:37 2024 +0100 + + x86-64: Stack alignment in _dl_tlsdesc_dynamic and red zone usage (bug 31501) + + In sysdeps/x86_64/dl-tlsdesc-dynamic.h, the stack pointer is + realigned for some variants (notably _dl_tlsdesc_dynamic_xsavec). + This realignment does not take into account that the function has + already used part of the red zone at this point, thus clobbering + the initally saved register values located there if the stack + alignment inherited from the caller is unfortunate. + +diff --git a/sysdeps/x86_64/dl-tlsdesc-dynamic.h b/sysdeps/x86_64/dl-tlsdesc-dynamic.h +index 9f02cfc3eb..8e49e7eece 100644 +--- a/sysdeps/x86_64/dl-tlsdesc-dynamic.h ++++ b/sysdeps/x86_64/dl-tlsdesc-dynamic.h +@@ -83,6 +83,8 @@ _dl_tlsdesc_dynamic: + 2: + #if DL_RUNTIME_RESOLVE_REALIGN_STACK + movq %rbx, -24(%rsp) ++ subq $24, %rsp ++ cfi_adjust_cfa_offset(24) + mov %RSP_LP, %RBX_LP + cfi_def_cfa_register(%rbx) + and $-STATE_SAVE_ALIGNMENT, %RSP_LP +@@ -153,6 +155,8 @@ _dl_tlsdesc_dynamic: + #if DL_RUNTIME_RESOLVE_REALIGN_STACK + mov %RBX_LP, %RSP_LP + cfi_def_cfa_register(%rsp) ++ addq $24, %rsp ++ cfi_adjust_cfa_offset(-24) + movq -24(%rsp), %rbx + cfi_restore(%rbx) + #else diff --git a/glibc.spec b/glibc.spec index 6845ba2..4749aaa 100644 --- a/glibc.spec +++ b/glibc.spec @@ -171,7 +171,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 7 +%global baserelease 8 Release: %{baserelease}%{?dist} # Licenses: @@ -281,6 +281,7 @@ Patch9: glibc-rh827510.patch Patch13: glibc-fedora-localedata-rh61908.patch Patch17: glibc-cs-path.patch Patch23: glibc-python3.patch +Patch24: glibc-rh2269799.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2457,6 +2458,9 @@ update_gconv_modules_cache () %endif %changelog +* Sat Mar 16 2024 Florian Weimer - 2.39.9000-8 +- Global dynamic TLS access may clobber RBX (#2269799) + * Fri Mar 15 2024 Florian Weimer - 2.39.9000-7 - Do not generate ELF dependency information for glibc32 From b102601d3e0d284997ce4d0ac806bd1a0375a195 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 20 Mar 2024 09:35:15 +0100 Subject: [PATCH 033/106] Auto-sync with upstream branch master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream commit: 1ea051145612f199d8716ecdf78b084b00b5a727 - Drop glibc-rh2269799.patch, fixed differently upstream. -powerpc: Placeholder and infrastructure/build support to add Power11 related changes. - powerpc: Add HWCAP3/HWCAP4 data to TCB for Power Architecture. - elf: Enable TLS descriptor tests on aarch64 - arm: Update _dl_tlsdesc_dynamic to preserve caller-saved registers (BZ 31372) - Ignore undefined symbols for -mtls-dialect=gnu2 - Add tst-gnu2-tls2mod1 to test-internal-extras - x86-64: Allocate state buffer space for RDI, RSI and RBX (#2269799) - riscv: Update nofpu libm test ulps - Add STATX_MNT_ID_UNIQUE from Linux 6.8 to bits/statx-generic.h - linux: Use rseq area unconditionally in sched_getcpu (bug 31479) - aarch64: fix check for SVE support in assembler - Update kernel version to 6.8 in header constant tests - Update syscall lists for Linux 6.8 - Use Linux 6.8 in build-many-glibcs.py - powerpc: Remove power8 strcasestr optimization - riscv: Fix alignment-ignorant memcpy implementation - linux/sigsetops: fix type confusion (bug 31468) - LoongArch: Correct {__ieee754, _}_scalb -> {__ieee754, _}_scalbf - duplocale: protect use of global locale (bug 23970) --- glibc-rh2269799.patch | 34 ---------------------------------- glibc.spec | 29 ++++++++++++++++++++++++++--- sources | 2 +- 3 files changed, 27 insertions(+), 38 deletions(-) delete mode 100644 glibc-rh2269799.patch diff --git a/glibc-rh2269799.patch b/glibc-rh2269799.patch deleted file mode 100644 index 9deeae2..0000000 --- a/glibc-rh2269799.patch +++ /dev/null @@ -1,34 +0,0 @@ -Author: Florian Weimer -Date: Sat Mar 16 15:30:37 2024 +0100 - - x86-64: Stack alignment in _dl_tlsdesc_dynamic and red zone usage (bug 31501) - - In sysdeps/x86_64/dl-tlsdesc-dynamic.h, the stack pointer is - realigned for some variants (notably _dl_tlsdesc_dynamic_xsavec). - This realignment does not take into account that the function has - already used part of the red zone at this point, thus clobbering - the initally saved register values located there if the stack - alignment inherited from the caller is unfortunate. - -diff --git a/sysdeps/x86_64/dl-tlsdesc-dynamic.h b/sysdeps/x86_64/dl-tlsdesc-dynamic.h -index 9f02cfc3eb..8e49e7eece 100644 ---- a/sysdeps/x86_64/dl-tlsdesc-dynamic.h -+++ b/sysdeps/x86_64/dl-tlsdesc-dynamic.h -@@ -83,6 +83,8 @@ _dl_tlsdesc_dynamic: - 2: - #if DL_RUNTIME_RESOLVE_REALIGN_STACK - movq %rbx, -24(%rsp) -+ subq $24, %rsp -+ cfi_adjust_cfa_offset(24) - mov %RSP_LP, %RBX_LP - cfi_def_cfa_register(%rbx) - and $-STATE_SAVE_ALIGNMENT, %RSP_LP -@@ -153,6 +155,8 @@ _dl_tlsdesc_dynamic: - #if DL_RUNTIME_RESOLVE_REALIGN_STACK - mov %RBX_LP, %RSP_LP - cfi_def_cfa_register(%rsp) -+ addq $24, %rsp -+ cfi_adjust_cfa_offset(-24) - movq -24(%rsp), %rbx - cfi_restore(%rbx) - #else diff --git a/glibc.spec b/glibc.spec index 4749aaa..9a48feb 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-92-gb6e3898194 +%global glibcsrcdir glibc-2.39.9000-111-g1ea0511456 %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -171,7 +171,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 8 +%global baserelease 9 Release: %{baserelease}%{?dist} # Licenses: @@ -281,7 +281,6 @@ Patch9: glibc-rh827510.patch Patch13: glibc-fedora-localedata-rh61908.patch Patch17: glibc-cs-path.patch Patch23: glibc-python3.patch -Patch24: glibc-rh2269799.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2458,6 +2457,30 @@ update_gconv_modules_cache () %endif %changelog +* Wed Mar 20 2024 Florian Weimer - 2.39.9000-9 +- Drop glibc-rh2269799.patch, fixed differently upstream. +- Auto-sync with upstream branch master, + commit 1ea051145612f199d8716ecdf78b084b00b5a727: +- powerpc: Placeholder and infrastructure/build support to add Power11 related changes. +- powerpc: Add HWCAP3/HWCAP4 data to TCB for Power Architecture. +- elf: Enable TLS descriptor tests on aarch64 +- arm: Update _dl_tlsdesc_dynamic to preserve caller-saved registers (BZ 31372) +- Ignore undefined symbols for -mtls-dialect=gnu2 +- Add tst-gnu2-tls2mod1 to test-internal-extras +- x86-64: Allocate state buffer space for RDI, RSI and RBX (#2269799) +- riscv: Update nofpu libm test ulps +- Add STATX_MNT_ID_UNIQUE from Linux 6.8 to bits/statx-generic.h +- linux: Use rseq area unconditionally in sched_getcpu (bug 31479) +- aarch64: fix check for SVE support in assembler +- Update kernel version to 6.8 in header constant tests +- Update syscall lists for Linux 6.8 +- Use Linux 6.8 in build-many-glibcs.py +- powerpc: Remove power8 strcasestr optimization +- riscv: Fix alignment-ignorant memcpy implementation +- linux/sigsetops: fix type confusion (bug 31468) +- LoongArch: Correct {__ieee754, _}_scalb -> {__ieee754, _}_scalbf +- duplocale: protect use of global locale (bug 23970) + * Sat Mar 16 2024 Florian Weimer - 2.39.9000-8 - Global dynamic TLS access may clobber RBX (#2269799) diff --git a/sources b/sources index 75f20af..4c2b8e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-92-gb6e3898194.tar.xz) = 8b354ced1de682e9bc34c9d4af8f6f7e593e0a6777617f3ff28cb7405bbe5ff7efb8de988213962a3484c589f4d6eaaa91d65ede24fb5cc1ffeb60fb0382528f +SHA512 (glibc-2.39.9000-111-g1ea0511456.tar.xz) = 4f5f8a27351e1b80442e44ccdb4bd585f7581ecb1f3f3e9f61946956e9fff30fb2d17ac9da2baf695f4cf2430c405ffae87d13c8ea93564df92a558a04f0eeb6 From b2dcb43f058f0b46660abd25d42e48118d07d689 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 26 Mar 2024 13:51:42 -0400 Subject: [PATCH 034/106] Auto-sync with upstream branch master Upstream commit: 96d1b9ac2321b565f340ba8f3674597141e3450d - RISC-V: Fix the static-PIE non-relocated object check - htl: Implement some support for TLS_DTV_AT_TP - htl: Respect GL(dl_stack_flags) when allocating stacks - hurd: Use the RETURN_ADDRESS macro - hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now - Allow glibc to be compiled without EXEC_PAGESIZE - hurd: Stop relying on VM_MAX_ADDRESS - hurd: Move internal functions to internal header - stdlib: Fix tst-makecontext2 log when swapcontext fails - or1k: Add prctl wrapper to unwrap variadic args - or1k: Only define fpu rouding and exceptions with hard-float - or1k: Update libm test ulps - AArch64: Check kernel version for SVE ifuncs --- glibc.spec | 21 +++++++++++++++++++-- sources | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 9a48feb..feb93b3 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-111-g1ea0511456 +%global glibcsrcdir glibc-2.39.9000-124-g96d1b9ac23 %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -171,7 +171,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 9 +%global baserelease 10 Release: %{baserelease}%{?dist} # Licenses: @@ -2457,6 +2457,23 @@ update_gconv_modules_cache () %endif %changelog +* Tue Mar 26 2024 DJ Delorie - 2.39.9000-10 +- Auto-sync with upstream branch master, + commit 96d1b9ac2321b565f340ba8f3674597141e3450d. +- RISC-V: Fix the static-PIE non-relocated object check +- htl: Implement some support for TLS_DTV_AT_TP +- htl: Respect GL(dl_stack_flags) when allocating stacks +- hurd: Use the RETURN_ADDRESS macro +- hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now +- Allow glibc to be compiled without EXEC_PAGESIZE +- hurd: Stop relying on VM_MAX_ADDRESS +- hurd: Move internal functions to internal header +- stdlib: Fix tst-makecontext2 log when swapcontext fails +- or1k: Add prctl wrapper to unwrap variadic args +- or1k: Only define fpu rouding and exceptions with hard-float +- or1k: Update libm test ulps +- AArch64: Check kernel version for SVE ifuncs + * Wed Mar 20 2024 Florian Weimer - 2.39.9000-9 - Drop glibc-rh2269799.patch, fixed differently upstream. - Auto-sync with upstream branch master, diff --git a/sources b/sources index 4c2b8e7..3724a92 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-111-g1ea0511456.tar.xz) = 4f5f8a27351e1b80442e44ccdb4bd585f7581ecb1f3f3e9f61946956e9fff30fb2d17ac9da2baf695f4cf2430c405ffae87d13c8ea93564df92a558a04f0eeb6 +SHA512 (glibc-2.39.9000-124-g96d1b9ac23.tar.xz) = 4abdff83f8da31c7256b8520695bdedf3a48ef6baa5b5615ce4e036bb40f824a14a9c30edaad230561d84abe7327479019a58ba2fff148d84e758d5a2674cb47 From 86c3f272ad309c12a400c66b2d9e82c1ec953c2f Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Thu, 28 Mar 2024 16:28:21 +0100 Subject: [PATCH 035/106] CI Tests: make Regression/ESTALE-error-message-translation-regression-from-RHEL7 rhel-10 compatible --- .../runtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/runtest.sh b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/runtest.sh index 1406fa5..3f5f818 100755 --- a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/runtest.sh +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/runtest.sh @@ -51,7 +51,7 @@ rlJournalStart do rlPhaseStartTest estale-test-$L rlRun -c "LANG=$L ./${TESTPROG} 2> out_$L" - if rlIsRHEL && [ -f orig_${L}_rhel ] + if rlIsRHEL "<=9" && [ -f orig_${L}_rhel ] then rlAssertNotDiffer out_$L orig_${L}_rhel else From b2452ec760514c73a4ae1671714aca71dc677852 Mon Sep 17 00:00:00 2001 From: Patsy Griffin Date: Tue, 9 Apr 2024 18:02:09 -0400 Subject: [PATCH 036/106] Auto-sync with upstream branch master Upstream commit: 42e48e720c78ab75eb8def9e866da52b0ac278df - nptl: Add tst-pthread-key1-static for BZ #21777 - elf: Add ld.so test with non-existing program name - elf: Check objname before calling fatal_error - Use crtbeginT.o and crtend.o for non-PIE static executables - aarch64: Enhanced CPU diagnostics for ld.so - x86: Add generic CPUID data dumper to ld.so --list-diagnostics - elf: Add CPU iteration support for future use in ld.so diagnostics - timezone: sync to TZDB 2024a - Fix bsearch, qsort doc to match POSIX better - x86-64: Exclude FMA4 IFUNC functions for -mapxf - Reinstate generic features-time64.h - Cleanup __tls_get_addr on alpha/microblaze localplt.data - arm: Remove ld.so __tls_get_addr plt usage - aarch64: Remove ld.so __tls_get_addr plt usage - math: x86 trunc traps when FE_INEXACT is enabled (BZ 31603) - math: x86 floor traps when FE_INEXACT is enabled (BZ 31601) - math: x86 ceill traps when FE_INEXACT is enabled (BZ 31600) - aarch64/fpu: Add vector variants of erfc - aarch64/fpu: Add vector variants of tanh - aarch64/fpu: Add vector variants of sinh - aarch64/fpu: Add vector variants of atanh - aarch64/fpu: Add vector variants of asinh - aarch64/fpu: Add vector variants of acosh - aarch64/fpu: Add vector variants of cosh - aarch64/fpu: Add vector variants of erf - misc: Add support for Linux uio.h RWF_NOAPPEND flag - manual: significand() uses FLT_RADIX, not 2 - manual: Clarify return value of cbrt(3) - manual: floor(log2(fabs(x))) has rounding errors - manual: logb(x) is floor(log2(fabs(x))) - powerpc: Add missing arch flags on rounding ifunc variants - math: Reformat Makefile. - Always define __USE_TIME_BITS64 when 64 bit time_t is used - benchtests: Improve benchtests for strstr - x86_64: Remove avx512 strstr implementation - signal: Avoid system signal disposition to interfere with tests --- glibc.spec | 44 ++++++++++++++++++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index feb93b3..a627751 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-124-g96d1b9ac23 +%global glibcsrcdir glibc-2.39.9000-160-g42e48e720c %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -171,7 +171,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 10 +%global baserelease 11 Release: %{baserelease}%{?dist} # Licenses: @@ -2457,6 +2457,46 @@ update_gconv_modules_cache () %endif %changelog +* Tue Apr 09 2024 Patsy Griffin - 2.39.9000-11 +- Auto-sync with upstream branch master, + commit 42e48e720c78ab75eb8def9e866da52b0ac278df. +- nptl: Add tst-pthread-key1-static for BZ #21777 +- elf: Add ld.so test with non-existing program name +- elf: Check objname before calling fatal_error +- Use crtbeginT.o and crtend.o for non-PIE static executables +- aarch64: Enhanced CPU diagnostics for ld.so +- x86: Add generic CPUID data dumper to ld.so --list-diagnostics +- elf: Add CPU iteration support for future use in ld.so diagnostics +- timezone: sync to TZDB 2024a +- Fix bsearch, qsort doc to match POSIX better +- x86-64: Exclude FMA4 IFUNC functions for -mapxf +- Reinstate generic features-time64.h +- Cleanup __tls_get_addr on alpha/microblaze localplt.data +- arm: Remove ld.so __tls_get_addr plt usage +- aarch64: Remove ld.so __tls_get_addr plt usage +- math: x86 trunc traps when FE_INEXACT is enabled (BZ 31603) +- math: x86 floor traps when FE_INEXACT is enabled (BZ 31601) +- math: x86 ceill traps when FE_INEXACT is enabled (BZ 31600) +- aarch64/fpu: Add vector variants of erfc +- aarch64/fpu: Add vector variants of tanh +- aarch64/fpu: Add vector variants of sinh +- aarch64/fpu: Add vector variants of atanh +- aarch64/fpu: Add vector variants of asinh +- aarch64/fpu: Add vector variants of acosh +- aarch64/fpu: Add vector variants of cosh +- aarch64/fpu: Add vector variants of erf +- misc: Add support for Linux uio.h RWF_NOAPPEND flag +- manual: significand() uses FLT_RADIX, not 2 +- manual: Clarify return value of cbrt(3) +- manual: floor(log2(fabs(x))) has rounding errors +- manual: logb(x) is floor(log2(fabs(x))) +- powerpc: Add missing arch flags on rounding ifunc variants +- math: Reformat Makefile. +- Always define __USE_TIME_BITS64 when 64 bit time_t is used +- benchtests: Improve benchtests for strstr +- x86_64: Remove avx512 strstr implementation +- signal: Avoid system signal disposition to interfere with tests + * Tue Mar 26 2024 DJ Delorie - 2.39.9000-10 - Auto-sync with upstream branch master, commit 96d1b9ac2321b565f340ba8f3674597141e3450d. diff --git a/sources b/sources index 3724a92..f722609 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-124-g96d1b9ac23.tar.xz) = 4abdff83f8da31c7256b8520695bdedf3a48ef6baa5b5615ce4e036bb40f824a14a9c30edaad230561d84abe7327479019a58ba2fff148d84e758d5a2674cb47 +SHA512 (glibc-2.39.9000-160-g42e48e720c.tar.xz) = 41d5ea916774d9f3d1370468c4e3ae5ab32ad794c3906d1645dc0dec984ba93fa6b28653d49cc881712f3810710b51494908dacfdff145fb4afc5f552b0e1244 From 7a3e1914e0370bdfaff2058bdf333c1cec90efe4 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sun, 14 Apr 2024 15:23:12 +0200 Subject: [PATCH 037/106] Auto-sync with upstream branch master Upstream commit: 14e56bd4ce15ac2d1cc43f762eb2e6b83fec1afe - powerpc: Fix ld.so address determination for PCREL mode (bug 31640) - Revert "x86_64: Suppress false positive valgrind error" - wcsmbs: Ensure wcstr worst-case linear execution time (BZ 23865) - wcsmbs: Add test-wcsstr - posix: Sync tempname with gnulib - socket: Add new test for connect - libsupport: Add xgetpeername --- glibc.spec | 15 +++++++++++++-- sources | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index a627751..545b7e4 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-160-g42e48e720c +%global glibcsrcdir glibc-2.39.9000-167-g14e56bd4ce %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -171,7 +171,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 11 +%global baserelease 12 Release: %{baserelease}%{?dist} # Licenses: @@ -2457,6 +2457,17 @@ update_gconv_modules_cache () %endif %changelog +* Sun Apr 14 2024 Florian Weimer - 2.39.9000-12 +- Auto-sync with upstream branch master, + commit 14e56bd4ce15ac2d1cc43f762eb2e6b83fec1afe: +- powerpc: Fix ld.so address determination for PCREL mode (bug 31640) +- Revert "x86_64: Suppress false positive valgrind error" +- wcsmbs: Ensure wcstr worst-case linear execution time (BZ 23865) +- wcsmbs: Add test-wcsstr +- posix: Sync tempname with gnulib +- socket: Add new test for connect +- libsupport: Add xgetpeername + * Tue Apr 09 2024 Patsy Griffin - 2.39.9000-11 - Auto-sync with upstream branch master, commit 42e48e720c78ab75eb8def9e866da52b0ac278df. diff --git a/sources b/sources index f722609..43958e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-160-g42e48e720c.tar.xz) = 41d5ea916774d9f3d1370468c4e3ae5ab32ad794c3906d1645dc0dec984ba93fa6b28653d49cc881712f3810710b51494908dacfdff145fb4afc5f552b0e1244 +SHA512 (glibc-2.39.9000-167-g14e56bd4ce.tar.xz) = 9f6d2d99e9ceff8f147b2f9f009bd5d66ac031352ede56f692660c668d1b719f48c53c826158e2e19bb3fc913f2a376081bdde70a9365226645546c9d863ac07 From 114492e2a8a0447f90fe19cf4631d58d8ce80b49 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 12 Apr 2024 11:35:53 +0200 Subject: [PATCH 038/106] Rewrite flags inheritance in Lua And simplify the invocation of the build shell function. --- glibc.spec | 195 +++++++++++++++++++++++++++++------------------------ 1 file changed, 106 insertions(+), 89 deletions(-) diff --git a/glibc.spec b/glibc.spec index 545b7e4..6122256 100644 --- a/glibc.spec +++ b/glibc.spec @@ -78,7 +78,7 @@ %endif # We do our own build flags management. In particular, see -# rpm_inherit_flags below. +# glibc_shell_* below. %undefine _auto_set_build_flags ############################################################################## @@ -1153,78 +1153,97 @@ cat /proc/sysinfo 2>/dev/null || true cat /proc/meminfo df -# We build using the native system compilers. -GCC=gcc -GXX=g++ - -# Part of rpm_inherit_flags. Is overridden below. -rpm_append_flag () -{ - BuildFlags="$BuildFlags $*" -} - -# Propagates the listed flags to rpm_append_flag if supplied by -# redhat-rpm-config. -BuildFlags="-O2 -g" -rpm_inherit_flags () -{ - local reference=" $* " - local flag - for flag in $RPM_OPT_FLAGS $RPM_LD_FLAGS ; do - if echo "$reference" | grep -q -F " $flag " ; then - rpm_append_flag "$flag" - fi - done -} - # Propgate select compiler flags from redhat-rpm-config. These flags # are target-dependent, so we use only those which are specified in # redhat-rpm-config. We keep the -m32/-m32/-m64 flags to support # multilib builds. -# -# Note: For building alternative run-times, care is required to avoid -# overriding the architecture flags which go into CC/CXX. The flags -# below are passed in CFLAGS. -rpm_inherit_flags \ - "-Wp,-D_GLIBCXX_ASSERTIONS" \ - "-fasynchronous-unwind-tables" \ - "-fstack-clash-protection" \ - "-fno-omit-frame-pointer" \ - "-funwind-tables" \ - "-m31" \ - "-m32" \ - "-m64" \ - "-march=armv8-a+lse" \ - "-march=armv8.1-a" \ - "-march=haswell" \ - "-march=i686" \ - "-march=x86-64" \ - "-march=x86-64-v2" \ - "-march=x86-64-v3" \ - "-march=x86-64-v4" \ - "-march=z13" \ - "-march=z14" \ - "-march=z15" \ - "-march=zEC12" \ - "-mbackchain" \ - "-mbranch-protection=standard" \ - "-mcpu=power10" \ - "-mcpu=power8" \ - "-mcpu=power9" \ - "-mfpmath=sse" \ - "-mno-omit-leaf-frame-pointer" \ - "-msse2" \ - "-mstackrealign" \ - "-mtune=generic" \ - "-mtune=power10" \ - "-mtune=power8" \ - "-mtune=power9" \ - "-mtune=z13" \ - "-mtune=z14" \ - "-mtune=z15" \ - "-mtune=zEC12" \ - "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" \ +%{lua: +-- Split the string argument into keys of an associate array. +-- The values are set to true. +local function string_to_array(s) + local result = {} + for e in string.gmatch(s, "%S+") do + result[e] = true + end + return result +end + +local inherit_flags = {} + +-- These flags are put into the CC and CXX arguments to configure. +-- Alternate builds do not use the flags listed here, only the main build does. +inherit_flags.cc_main = string_to_array [[ +-march=armv8-a+lse +-march=armv8.1-a +-march=haswell +-march=i686 +-march=x86-64 +-march=x86-64-v2 +-march=x86-64-v3 +-march=x86-64-v4 +-march=z13 +-march=z14 +-march=z15 +-march=zEC12 +-mcpu=power10 +-mcpu=power8 +-mcpu=power9 +-mtune=generic +-mtune=power10 +-mtune=power8 +-mtune=power9 +-mtune=z13 +-mtune=z14 +-mtune=z15 +-mtune=zEC12 +]] + +-- Like inherit_flags_cc_main, but also used for alternate builds. +inherit_flags.cc = string_to_array [[ +-m31 +-m32 +-m64 +]] + +-- These flags are passed through CFLAGS and CXXFLAGS. +inherit_flags.cflags = string_to_array [[ +-O2 +-O3 +-Wall +-Wp,-D_GLIBCXX_ASSERTIONS +-fasynchronous-unwind-tables +-fno-omit-frame-pointer +-fstack-clash-protection +-funwind-tables +-g +-mbackchain +-mbranch-protection=standard +-mfpmath=sse +-mno-omit-leaf-frame-pointer +-msse2 +-mstackrealign +-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 +]] + +-- Iterate over the build_cflags RPM variable and emit a shell +-- variable that contains the inherited flags of the indicated variant. +local function shell_build_flags(variant) + local result = {} + local inherit = assert(inherit_flags[variant]) + for f in string.gmatch(rpm.expand("%build_cflags"), "%S+") do + if inherit[f] then + result[#result + 1] = f + end + end + print("glibc_flags_" .. variant .. "=\"" .. table.concat(result, " ") + .. "\"\n") +end + +shell_build_flags('cc_main') -- Set $glibc_flags_cc_main. +shell_build_flags('cc') -- Set $glibc_flags_cc. +shell_build_flags('cflags') -- Set $glibc_flags_cflags. +} %if 0%{?_annotated_build} > 0 # libc_nonshared.a cannot be built with the default hardening flags @@ -1246,34 +1265,29 @@ BuildFlagsNonshared="-fplugin=annobin -fplugin-arg-annobin-disable -Wa,--generat # %%build - Generic options. ############################################################################## EnableKernel="--enable-kernel=%{enablekernel}" -# Save the used compiler and options into the file "Gcc" for use later -# by %%install. -echo "$GCC" > Gcc ############################################################################## # build() -# Build glibc in `build-%{target}$1', passing the rest of the arguments -# as CFLAGS to the build (not the same as configure CFLAGS). Several +# Build glibc in the directory $1, passing the rest of the arguments +# as additional configure arguments. Several # global values are used to determine build flags, kernel version, # system tap support, etc. ############################################################################## build() { - local builddir=build-%{target}${1:+-$1} - ${1+shift} + local builddir=$1 + shift rm -rf $builddir mkdir $builddir pushd $builddir - ../configure CC="$GCC" CXX="$GXX" CFLAGS="$BuildFlags $*" \ + ../configure "$@" \ --prefix=%{_prefix} \ --with-headers=%{_prefix}/include $EnableKernel \ --with-nonshared-cflags="$BuildFlagsNonshared" \ --enable-bind-now \ --build=%{target} \ - ${configure_host} \ --enable-stack-protector=strong \ --enable-systemtap \ - ${core_with_options} \ %ifarch %{ix86} --disable-multi-arch \ %endif @@ -1308,17 +1322,23 @@ build() %ifarch x86_64 # Build for the glibc32 package. -GCC="$GCC -m32" GXX="$GXX -m32" BuildFlags="${BuildFlags/-m64/-m32}" configure_host="--host=i686-linux-gnu" build 32 -%endif - -configure_host="" - -%ifarch x86_64 -configure_host="--enable-cet" +build build-%{target}-32 \ + CC="gcc -m32" \ + CXX="g++ -m32" \ + CFLAGS="${glibc_flags_cflags/-m64/-m32}" \ + --host=i686-linux-gnu \ +# %endif # Default set of compiler options. -build +build build-%{target} \ + CC="gcc $glibc_flags_cc $glibc_flags_cc_main" \ + CXX="gcc $glibc_flags_cc $glibc_flags_cc_main" \ + CFLAGS="$glibc_flags_cflags" \ +%ifarch x86_64 + --enable-cet \ +%endif +# ############################################################################## # Install glibc... @@ -1334,9 +1354,6 @@ build # Remove existing file lists. find . -type f -name '*.filelist' -exec rm -rf {} \; -# Reload compiler and build options that were used during %%build. -GCC=`cat Gcc` - %ifarch riscv64 # RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d. # Make these be symlinks to /lib64 or /usr/lib64 respectively. See: From 0d17d18a8862d7737a041d1360d0775b62275dd7 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 12 Apr 2024 12:39:17 +0200 Subject: [PATCH 039/106] Remove remnants of 32-bit Arm support --- glibc.spec | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/glibc.spec b/glibc.spec index 6122256..603a08f 100644 --- a/glibc.spec +++ b/glibc.spec @@ -69,14 +69,6 @@ %undefine with_valgrind %endif -# The annobin annotations cause binutils to produce broken ARM EABI -# unwinding information. Symptom is a hang/test failure for -# malloc/tst-malloc-stats-cancellation. See -# . -%ifarch armv7hl -%undefine _annotated_build -%endif - # We do our own build flags management. In particular, see # glibc_shell_* below. %undefine _auto_set_build_flags @@ -350,10 +342,7 @@ BuildRequires: python3 python3-devel BuildRequires: gcc >= 7.2.1-6 %global enablekernel 3.2 Conflicts: kernel < %{enablekernel} -%global target %{_target_cpu}-redhat-linux -%ifarch %{arm} -%global target %{_target_cpu}-redhat-linuxeabi -%endif +%define target %{_target_cpu}-redhat-linux %ifarch ppc64le %global target ppc64le-redhat-linux %endif From 7749ea58a9e2198f830d6eb8b162344aaf8acb84 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 12 Apr 2024 13:33:21 +0200 Subject: [PATCH 040/106] Hard-code ld.so paths for all architectures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This supports multiple ld.so files in a cleaner way. Also forward-port multiple libc.so.6 file handling in wrap-find-debuginfo.sh from downstream. This also incorporates the “nm --format=posix“ change from #2115831 downstream. Co-authored-by: Tulio Magno Quites Machado Filho --- glibc.spec | 48 ++++++++++++------ wrap-find-debuginfo.sh | 109 +++++++++++++++++++---------------------- 2 files changed, 83 insertions(+), 74 deletions(-) diff --git a/glibc.spec b/glibc.spec index 603a08f..85933e8 100644 --- a/glibc.spec +++ b/glibc.spec @@ -230,6 +230,36 @@ Source11: parse-SUPPORTED.py # Include in the source RPM for reference. Source12: ChangeLog.old +# ABI-specific program interpreter name. Used for debuginfo +# extraction (wrap-find-debuginfo.sh) and smoke testing ($run_ldso below). +%ifarch %{ix86} +%global glibc_ldso /lib/ld-linux.so.2 +%endif +%ifarch aarch64 +%global glibc_ldso /lib/ld-linux-aarch64.so.1 +%endif +%ifarch ppc +%global glibc_ldso /lib/ld.so.1 +%endif +%ifarch ppc64 +%global glibc_ldso /lib64/ld64.so.1 +%endif +%ifarch ppc64le +%global glibc_ldso /lib64/ld64.so.2 +%endif +%ifarch riscv64 +%global glibc_ldso /lib/ld-linux-riscv64-lp64d.so.1 +%endif +%ifarch s390 +%global glibc_ldso /lib/ld.so.1 +%endif +%ifarch s390x +%global glibc_ldso /lib/ld64.so.1 +%endif +%ifarch x86_64 x86_64_v2 x86_64_v3 x86_64_v4 +%global glibc_ldso /lib64/ld-linux-x86-64.so.2 +%endif + ###################################################################### # Activate the wrapper script for debuginfo generation, by rewriting # the definition of __debug_install_post. @@ -241,7 +271,7 @@ local original = rpm.expand("%{macrobody:__debug_install_post}") -- Avoid embedded newlines that confuse the macro definition. original = original:match("^%s*(.-)%s*$"):gsub("\\\n", "") rpm.define("__debug_install_post bash " .. wrapper - .. " " .. sysroot .. " " .. original) + .. " " .. sysroot .. " %{glibc_ldso} " .. original) } # sysroot package support. These contain arch-specific packages, so @@ -1322,7 +1352,7 @@ build build-%{target}-32 \ # Default set of compiler options. build build-%{target} \ CC="gcc $glibc_flags_cc $glibc_flags_cc_main" \ - CXX="gcc $glibc_flags_cc $glibc_flags_cc_main" \ + CXX="g++ $glibc_flags_cc $glibc_flags_cc_main" \ CFLAGS="$glibc_flags_cflags" \ %ifarch x86_64 --enable-cet \ @@ -2163,19 +2193,7 @@ echo ====================PLT RELOCS LIBC.SO============== readelf -Wr %{glibc_sysroot}/%{_lib}/libc-*.so | sed -n -e "$PLTCMD" echo ====================PLT RELOCS END================== -# Obtain a way to run the dynamic loader. Avoid matching the symbolic -# link and then pick the first loader (although there should be only -# one). Use -maxdepth 2 to avoid descending into the /sys-root/ -# sub-tree. See wrap-find-debuginfo.sh. -%ifarch x86_64 -# Hardcode the patch to avoid picking up the 32-bit dynamic linker from -# glibc32; both 32-bit and 64-bit dynamic linkers will be present. -ldso_path="%{glibc_sysroot}/lib64/ld-linux-x86-64.so.2" -%else -ldso_path="$(find %{glibc_sysroot}/ -maxdepth 2 -regextype posix-extended \ - -regex '.*/ld(-.*|64|)\.so\.[0-9]+$' -type f | LC_ALL=C sort | head -n1)" -%endif -run_ldso="$ldso_path --library-path %{glibc_sysroot}/%{_lib}" +run_ldso="%{glibc_sysroot}/%{glibc_ldso} --library-path %{glibc_sysroot}/%{_lib}" # Show the auxiliary vector as seen by the new library # (even if we do not perform the valgrind test). diff --git a/wrap-find-debuginfo.sh b/wrap-find-debuginfo.sh index ba1719a..5257de7 100644 --- a/wrap-find-debuginfo.sh +++ b/wrap-find-debuginfo.sh @@ -18,7 +18,13 @@ set -ex workdir="$(mktemp -d -t find_debuginfo.XXXXXX)" ldso_tmp="$workdir/ld.so" -libc_tmp="$workdir/libc.so" +libc_tmp_dir="$workdir/" + +# Return the path where a libc should be saved temporarily. This path is +# based on its original path received in $1. +libc_tmp_path() { + echo "$libc_tmp_dir"`dirname "$1"`"/libc.so" +} # Prefer a separately installed debugedit over the RPM-integrated one. if command -v debugedit >/dev/null ; then @@ -34,64 +40,65 @@ trap cleanup 0 sysroot_path="$1" shift +# Resolve symbolic link, so that the activities below only alter the +# file it points to. +ldso_path="$(readlink -f "$sysroot_path/$1")" +shift script_path="$1" shift -# See ldso_path setting in glibc.spec. -ldso_path= -for ldso_candidate in `find "$sysroot_path" -maxdepth 2 \ - -regextype posix-extended -regex '.*/ld(-.*|64|)\.so\.[0-9]+$' -type f` ; do - if test -z "$ldso_path" ; then - ldso_path="$ldso_candidate" - elif [ -f "$sysroot_path/lib64/ld-linux-x86-64.so.2" ] && [ -f "$sysroot_path/lib/ld-linux.so.2" ]; then - # x86_64 with 32-bit libc built for glibc32 as well. Finding - # multiple dynamic linkers is expected, not a bug; ensure the - # 64-bit one is used. - ldso_path="$sysroot_path/lib64/ld-linux-x86-64.so.2" - else - echo "error: multiple ld.so candidates: $ldso_path, $ldso_candidate" - exit 1 - fi -done - # libc.so.6 always uses this name, so it is simpler to locate. -libc_path= -for libc_candidate in `find "$sysroot_path" -maxdepth 2 -name libc.so.6`; do - if test -z "$libc_path" ; then - libc_path="$libc_candidate" - elif [ -f "$sysroot_path/lib64/ld-linux-x86-64.so.2" ] && [ -f "$sysroot_path/lib/ld-linux.so.2" ]; then - # x86_64 with 32-bit libc built for glibc32 as well. The test - # here uses ld.so paths, not libc paths, to ensure it doesn't - # apply on any other architecture. - libc_path="$sysroot_path/lib64/libc.so.6" - else - echo "error: multiple libc.so.6 candidates: $libc_path, $libc_candidate" - exit 1 - fi -done +# This can result in multiple paths, hence the loop below. +libc_path=`find "$sysroot_path" -name libc.so.6` # Preserve the original files. cp "$ldso_path" "$ldso_tmp" -cp "$libc_path" "$libc_tmp" +for lib in $libc_path ; do + libtmp=`libc_tmp_path $lib` + mkdir -p `dirname "$libtmp"` + cp "$lib" "$libtmp" +done # Run the debuginfo extraction. "$script_path" "$@" -# libc.so.6: Extract the .gnu_debuglink section -objcopy -j.gnu_debuglink --set-section-flags .gnu_debuglink=alloc \ - -O binary "$libc_path" "$libc_tmp.debuglink" +for lib in $libc_path ; do + libtmp=`libc_tmp_path "$lib"` + # libc.so.6: Extract the .gnu_debuglink section + objcopy -j.gnu_debuglink --set-section-flags .gnu_debuglink=alloc \ + -O binary "$lib" "$libtmp.debuglink" + # Restore the original files. + cp "$libtmp" "$lib" -# Restore the original files. + # Reduce the size of libc notes. Primarily for annobin. + objcopy --merge-notes "$lib" + + # libc.so.6: Restore the .gnu_debuglink section + objcopy --add-section .gnu_debuglink="$libtmp.debuglink" "$lib" + + # libc.so.6: Reduce to valuable symbols. Eliminate file symbols, + # annobin symbols, and symbols used by the glibc build to implement + # hidden aliases (__EI_*). We would also like to remove __GI_* + # symbols, but even listing them explicitly (as in -K __GI_strlen) + # still causes strip to remove them, so there is no filtering of + # __GI_* here. (Debuginfo is gone after this, so no need to optimize + # it.) + strip -w \ + -K '*' \ + -K '!*.c' \ + -K '!*.os' \ + -K '!.annobin_*' \ + -K '!__EI_*' \ + -K '!__PRETTY_FUNCTION__*' \ + "$lib" +done + +# Restore the original ld.so. cp "$ldso_tmp" "$ldso_path" -cp "$libc_tmp" "$libc_path" # Reduce the size of notes. Primarily for annobin. objcopy --merge-notes "$ldso_path" -objcopy --merge-notes "$libc_path" - -# libc.so.6: Restore the .gnu_debuglink section -objcopy --add-section .gnu_debuglink="$libc_tmp.debuglink" "$libc_path" # ld.so does not have separated debuginfo and so the debuginfo file # generated by find-debuginfo is redundant. Therefore, remove it. @@ -108,22 +115,6 @@ for ldso_debug_candidate in `find "$sysroot_path" -maxdepth 2 \ done rm -f "$ldso_debug" -# libc.so.6: Reduce to valuable symbols. Eliminate file symbols, -# annobin symbols, and symbols used by the glibc build to implement -# hidden aliases (__EI_*). We would also like to remove __GI_* -# symbols, but even listing them explicitly (as in -K __GI_strlen) -# still causes strip to remove them, so there is no filtering of -# __GI_* here. (Debuginfo is gone after this, so no need to optimize -# it.) -strip -w \ - -K '*' \ - -K '!*.c' \ - -K '!*.os' \ - -K '!.annobin_*' \ - -K '!__EI_*' \ - -K '!__PRETTY_FUNCTION__*' \ - "$libc_path" - # ld.so: Rewrite the source file paths to match the extracted # locations. First compute the arguments for invoking debugedit. # See find-debuginfo.sh. @@ -147,7 +138,7 @@ done debug_base_name=${last_arg:-$RPM_BUILD_ROOT} $debugedit -b "$debug_base_name" -d "$debug_dest_name" -n $ldso_path # Remove the .annobin* symbols (and only them). -if nm --format=just-symbols "$ldso_path" \ +if nm --format=posix "$ldso_path" | cut -d' ' -f1 \ | grep '^\.annobin' > "$ldso_tmp.annobin-symbols"; then objcopy --strip-symbols="$ldso_tmp.annobin-symbols" "$ldso_path" fi From 34d14091784c508be9a0b451fdd97d468bad016c Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Fri, 12 Apr 2024 19:12:53 +0200 Subject: [PATCH 041/106] Move the removal of multilibs to %pre --- glibc.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/glibc.spec b/glibc.spec index 85933e8..d7d47dc 100644 --- a/glibc.spec +++ b/glibc.spec @@ -2224,13 +2224,11 @@ if rpm.vercmp(rel, required) < 0 then error("FATAL: kernel too old", 0) end -%post -p -%glibc_post_funcs -- (1) Remove multilib libraries from previous installs. -- In order to support in-place upgrades, we must immediately remove --- obsolete platform directories after installing a new glibc +-- all platform directories before installing a new glibc -- version. RPM only deletes files removed by updates near the end --- of the transaction. If we did not remove the obsolete platform +-- of the transaction. If we did not remove all platform -- directories here, they may be preferred by the dynamic linker -- during the execution of subsequent RPM scriptlets, likely -- resulting in process startup failures. @@ -2303,7 +2301,9 @@ for _, rdir in ipairs (remove_dirs) do end end --- (2) Update /etc/ld.so.conf +%post -p +%glibc_post_funcs +-- (1) Update /etc/ld.so.conf -- Next we update /etc/ld.so.conf to ensure that it starts with -- a literal "include ld.so.conf.d/*.conf". @@ -2342,14 +2342,14 @@ if posix.access (ldsoconf) then end end --- (3) Rebuild ld.so.cache early. +-- (2) Rebuild ld.so.cache early. -- If the format of the cache changes then we need to rebuild -- the cache early to avoid any problems running binaries with -- the new glibc. call_ldconfig() --- (4) Update gconv modules cache. +-- (3) Update gconv modules cache. -- If the /usr/lib/gconv/gconv-modules.cache exists, then update it -- with the latest set of modules that were just installed. -- We assume that the cache is in _libdir/gconv and called @@ -2357,7 +2357,7 @@ call_ldconfig() update_gconv_modules_cache() --- (5) On upgrades, restart systemd if installed. "systemctl -q" does +-- (4) On upgrades, restart systemd if installed. "systemctl -q" does -- not suppress the error message (which is common in chroots), so -- open-code rpm.execute with standard error suppressed. if tonumber(arg[2]) >= 2 From 09d1856f529d26545de4651b8415690e934efdf5 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Fri, 12 Apr 2024 19:19:34 +0200 Subject: [PATCH 042/106] Enable power10 multilib Co-authored-by: Florian Weimer --- glibc.spec | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/glibc.spec b/glibc.spec index d7d47dc..f078653 100644 --- a/glibc.spec +++ b/glibc.spec @@ -61,6 +61,13 @@ %endif %endif +# Build the POWER10 multilib. +%ifarch ppc64le +%define buildpower10 1 +%else +%define buildpower10 0 +%endif + %if %{with bootstrap} # Disable benchtests, -Werror, docs, and valgrind if we're bootstrapping %undefine with_benchtests @@ -1359,6 +1366,17 @@ build build-%{target} \ %endif # +# POWER10 build variant. +%if %{buildpower10} +build build-%{target}-power10 \ + CC="gcc $glibc_flags_cc" \ + CXX="g++ $glibc_flags_cc" \ + CFLAGS="$glibc_flags_cflags" \ + --with-cpu=power10 \ +# +%endif + + ############################################################################## # Install glibc... ############################################################################## @@ -1437,23 +1455,28 @@ install_different() mkdir -p "$destdir" mkdir -p "$libdestdir" # Walk all of the libraries we installed... - for lib in libc math/libm nptl/libpthread rt/librt nptl_db/libthread_db + for lib in libc math/libm do libbase=${lib#*/} # Take care that `libbaseso' has a * that needs expanding so # take care with quoting. - libbaseso=$(basename %{glibc_sysroot}/%{_lib}/${libbase}-*.so) + libbaseso=$(basename %{glibc_sysroot}/%{_lib}/${libbase}.so.*) # Only install if different from default build library. if cmp -s ${lib}.so ../build-%{target}/${lib}.so; then ln -sf "$subdir_up"/$libbaseso $libdestdir/$libbaseso else cp -a ${lib}.so $libdestdir/$libbaseso fi - dlib=$libdestdir/$(basename %{glibc_sysroot}/%{_lib}/${libbase}.so.*) - ln -sf $libbaseso $dlib done } +%if %{buildpower10} +pushd build-%{target}-power10 +install_different "$RPM_BUILD_ROOT/%{_libdir}/glibc-hwcaps" power10 .. +popd +%endif + + ############################################################################## # Remove the files we don't want to distribute ############################################################################## @@ -2185,6 +2208,16 @@ pushd build-%{target} run_tests popd +%if %{buildpower10} +# Run this test only if the server supports Power10 instructions. +if LD_SHOW_AUXV=1 /bin/true | grep -E "AT_HWCAP2:[^$]*arch_3_1" > /dev/null; then + echo ====================TESTING -mcpu=power10============= + pushd build-%{target}-power10 + run_tests + popd +fi +%endif + echo ====================TESTING END===================== PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p' echo ====================PLT RELOCS LD.SO================ @@ -2406,6 +2439,9 @@ update_gconv_modules_cache () %files -f glibc.filelist %dir %{_prefix}/%{_lib}/audit +%if %{buildpower10} +%dir /%{_libdir}/glibc-hwcaps/power10 +%endif %verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf %verify(not md5 size mtime) %config(noreplace) /etc/rpc %dir /etc/ld.so.conf.d From 5a7908398e0832631ed2e2ad906eb17fcdae10b9 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 22 Apr 2024 11:50:05 +0200 Subject: [PATCH 043/106] Update changelog --- glibc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index f078653..2edf269 100644 --- a/glibc.spec +++ b/glibc.spec @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 12 +%global baserelease 13 Release: %{baserelease}%{?dist} # Licenses: @@ -2517,6 +2517,9 @@ update_gconv_modules_cache () %endif %changelog +* Mon Apr 22 2024 Florian Weimer - 2.39.9000-13 +- Build POWER10 multilib + * Sun Apr 14 2024 Florian Weimer - 2.39.9000-12 - Auto-sync with upstream branch master, commit 14e56bd4ce15ac2d1cc43f762eb2e6b83fec1afe: From 6b7878d77d9dc55b08fe44a909525be787c672e7 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Tue, 23 Apr 2024 11:18:01 +0200 Subject: [PATCH 044/106] Auto-sync with upstream branch master Upstream commit: 16c8dfba14ff7596ad3aea941a240f8abcdc50e6 - Drop glibc-rh827510.patch, fixed differently upstream. - Revert "Allow glibc to be compiled without EXEC_PAGESIZE" - locale: Handle loading a missing locale twice (Bug 14247) - elf: Do not check for loader mmap on tst-decorate-maps (BZ 31553) - Use --enable-obsolete in build-many-glibcs.py for nios2-linux-gnu - login: Use unsigned 32-bit types for seconds-since-epoch - login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) - login: Check default sizes of structs utmp, utmpx, lastlog - benchtests: Add random() benchmark - advisories: Add Reported-By - Fix 'Reported-By' to use Camel Case for commit 6a98f4640ea453f - Document CVE-2024-2961 - iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence (CVE-2024-2961) - elf/rtld: Count skipped environment variables for enable_secure --- glibc-rh827510.patch | 37 ------------------------------------- glibc.spec | 23 ++++++++++++++++++++--- sources | 2 +- 3 files changed, 21 insertions(+), 41 deletions(-) delete mode 100644 glibc-rh827510.patch diff --git a/glibc-rh827510.patch b/glibc-rh827510.patch deleted file mode 100644 index 6115891..0000000 --- a/glibc-rh827510.patch +++ /dev/null @@ -1,37 +0,0 @@ -Short description: Fix newlocale error return. -Author(s): Fedora glibc team -Origin: PATCH -Bug-RHEL: #832516 -Bug-Fedora: #827510 -Bug-Upstream: #14247 -Upstream status: not-submitted - -This needs to go upstream right away to fix the error case for -newlocale not correctly returning an error. - -2012-06-14 Jeff Law - - * locale/loadlocale.c (_nl_load_locale): Delay setting - file->decided until we have successfully loaded the file's - data. - -diff --git a/locale/loadlocale.c b/locale/loadlocale.c -index e3fa187..9fd9216 100644 ---- a/locale/loadlocale.c -+++ b/locale/loadlocale.c -@@ -169,7 +169,6 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) - int save_err; - int alloc = ld_mapped; - -- file->decided = 1; - file->data = NULL; - - fd = __open_nocancel (file->filename, O_RDONLY | O_CLOEXEC); -@@ -278,6 +277,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) - newdata->alloc = alloc; - - file->data = newdata; -+ file->decided = 1; - } - - void diff --git a/glibc.spec b/glibc.spec index 2edf269..93c9492 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-167-g14e56bd4ce +%global glibcsrcdir glibc-2.39.9000-180-g16c8dfba14 %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 13 +%global baserelease 14 Release: %{baserelease}%{?dist} # Licenses: @@ -306,7 +306,6 @@ rpm.define("__debug_install_post bash " .. wrapper ############################################################################## Patch4: glibc-fedora-linux-tcsetattr.patch Patch8: glibc-fedora-manual-dircategory.patch -Patch9: glibc-rh827510.patch Patch13: glibc-fedora-localedata-rh61908.patch Patch17: glibc-cs-path.patch Patch23: glibc-python3.patch @@ -2517,6 +2516,24 @@ update_gconv_modules_cache () %endif %changelog +* Tue Apr 23 2024 Arjun Shankar - 2.39.9000-14 +- Drop glibc-rh827510.patch, fixed differently upstream. +- Auto-sync with upstream branch master, + commit 16c8dfba14ff7596ad3aea941a240f8abcdc50e6: +- Revert "Allow glibc to be compiled without EXEC_PAGESIZE" +- locale: Handle loading a missing locale twice (Bug 14247) +- elf: Do not check for loader mmap on tst-decorate-maps (BZ 31553) +- Use --enable-obsolete in build-many-glibcs.py for nios2-linux-gnu +- login: Use unsigned 32-bit types for seconds-since-epoch +- login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) +- login: Check default sizes of structs utmp, utmpx, lastlog +- benchtests: Add random() benchmark +- advisories: Add Reported-By +- Fix 'Reported-By' to use Camel Case for commit 6a98f4640ea453f +- Document CVE-2024-2961 +- iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence (CVE-2024-2961) +- elf/rtld: Count skipped environment variables for enable_secure + * Mon Apr 22 2024 Florian Weimer - 2.39.9000-13 - Build POWER10 multilib diff --git a/sources b/sources index 43958e3..0623ae0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-167-g14e56bd4ce.tar.xz) = 9f6d2d99e9ceff8f147b2f9f009bd5d66ac031352ede56f692660c668d1b719f48c53c826158e2e19bb3fc913f2a376081bdde70a9365226645546c9d863ac07 +SHA512 (glibc-2.39.9000-180-g16c8dfba14.tar.xz) = fb4980c13aa21a9318d5d4741165718bc40214db5020ac0dbfd0b0091820e49dea9a073f04cc1af94970dcec734a511e553ac6b708ac8478cadabe5a4e7710e0 From d6a43c7f0abd9914011c8eef6ee21210a5984ae5 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 25 Apr 2024 11:05:42 +0200 Subject: [PATCH 045/106] Auto-sync with upstream branch master Upstream commit: 41903cb6f460d62ba6dd2f4883116e2a624ee6f8 - GLIBC-SA-2024-0004: add commit for 2.31 branch - benchtests: Add difficult strstr needle for bruteforce algorithms - x86: Define MINIMUM_X86_ISA_LEVEL in config.h [BZ #31676] - LoongArch: Add glibc.cpu.hwcap support. - nptl: Fix tst-cancel30 on kernels without ppoll_time64 support --- glibc.spec | 13 +++++++++++-- sources | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 93c9492..4dc76c8 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-180-g16c8dfba14 +%global glibcsrcdir glibc-2.39.9000-185-g41903cb6f4 %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 14 +%global baserelease 15 Release: %{baserelease}%{?dist} # Licenses: @@ -2516,6 +2516,15 @@ update_gconv_modules_cache () %endif %changelog +* Thu Apr 25 2024 Florian Weimer - 2.39.9000-15 +- Auto-sync with upstream branch master, + commit 41903cb6f460d62ba6dd2f4883116e2a624ee6f8: +- GLIBC-SA-2024-0004: add commit for 2.31 branch +- benchtests: Add difficult strstr needle for bruteforce algorithms +- x86: Define MINIMUM_X86_ISA_LEVEL in config.h [BZ #31676] +- LoongArch: Add glibc.cpu.hwcap support. +- nptl: Fix tst-cancel30 on kernels without ppoll_time64 support + * Tue Apr 23 2024 Arjun Shankar - 2.39.9000-14 - Drop glibc-rh827510.patch, fixed differently upstream. - Auto-sync with upstream branch master, diff --git a/sources b/sources index 0623ae0..a605cd7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-180-g16c8dfba14.tar.xz) = fb4980c13aa21a9318d5d4741165718bc40214db5020ac0dbfd0b0091820e49dea9a073f04cc1af94970dcec734a511e553ac6b708ac8478cadabe5a4e7710e0 +SHA512 (glibc-2.39.9000-185-g41903cb6f4.tar.xz) = 68d9ba6060cc2e1f145969824b69b5d64331c1f1b5c9f660ee14f679abae2b8baffb48a413e36e14069ce67704ba461179e0b6f80f5229c39f5db5da0b323c95 From 207f40b76617449cc02fadaf51f24982382dfb8e Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 25 Apr 2024 17:31:37 +0200 Subject: [PATCH 046/106] Enable CPU compatibility diagnostics in ld.so (RHEL-31738) --- glibc.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/glibc.spec b/glibc.spec index 4dc76c8..88bdf32 100644 --- a/glibc.spec +++ b/glibc.spec @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 15 +%global baserelease 16 Release: %{baserelease}%{?dist} # Licenses: @@ -237,8 +237,13 @@ Source11: parse-SUPPORTED.py # Include in the source RPM for reference. Source12: ChangeLog.old -# ABI-specific program interpreter name. Used for debuginfo +# glibc_ldso: ABI-specific program interpreter name. Used for debuginfo # extraction (wrap-find-debuginfo.sh) and smoke testing ($run_ldso below). +# +# glibc_rtld_early_cflags: The ABI baseline for architectures with +# potentially a later baseline. The --with-rtld-early-cflags= +# configure option is passed to the main glibc build if this macro is +# defined. %ifarch %{ix86} %global glibc_ldso /lib/ld-linux.so.2 %endif @@ -250,6 +255,7 @@ Source12: ChangeLog.old %endif %ifarch ppc64 %global glibc_ldso /lib64/ld64.so.1 +%define glibc_rtld_early_cflags -mcpu=power8 %endif %ifarch ppc64le %global glibc_ldso /lib64/ld64.so.2 @@ -259,12 +265,15 @@ Source12: ChangeLog.old %endif %ifarch s390 %global glibc_ldso /lib/ld.so.1 +%define glibc_rtld_early_cflags -march=z13 %endif %ifarch s390x %global glibc_ldso /lib/ld64.so.1 +%define glibc_rtld_early_cflags -march=z13 %endif %ifarch x86_64 x86_64_v2 x86_64_v3 x86_64_v4 %global glibc_ldso /lib64/ld-linux-x86-64.so.2 +%define glibc_rtld_early_cflags -march=x86-64 %endif ###################################################################### @@ -1360,6 +1369,7 @@ build build-%{target} \ CC="gcc $glibc_flags_cc $glibc_flags_cc_main" \ CXX="g++ $glibc_flags_cc $glibc_flags_cc_main" \ CFLAGS="$glibc_flags_cflags" \ + %{?glibc_rtld_early_cflags:--with-rtld-early-cflags=%glibc_rtld_early_cflags} \ %ifarch x86_64 --enable-cet \ %endif @@ -2516,6 +2526,9 @@ update_gconv_modules_cache () %endif %changelog +* Thu Apr 25 2024 Florian Weimer - 2.39.9000-16 +- Enable CPU compatibility diagnostics in ld.so (RHEL-31738) + * Thu Apr 25 2024 Florian Weimer - 2.39.9000-15 - Auto-sync with upstream branch master, commit 41903cb6f460d62ba6dd2f4883116e2a624ee6f8: From 4720899564a621ebdc0af936f54ab98cbaed62df Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Mon, 15 Apr 2024 13:47:01 +0200 Subject: [PATCH 047/106] CI Tests: disable Regression/bz863384-getaddrinfo-fails-to-return-FQDN-for-AF_INET-and-AF_INET6 on rhel10 * package perl-Net-DNS-Nameserver removed from rhel-10, test needs to be rewritten, disable for rhel10 until then --- .../main.fmf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Regression/bz863384-getaddrinfo-fails-to-return-FQDN-for-AF_INET-and-AF_INET6/main.fmf b/tests/Regression/bz863384-getaddrinfo-fails-to-return-FQDN-for-AF_INET-and-AF_INET6/main.fmf index c88d3fd..50f30d4 100644 --- a/tests/Regression/bz863384-getaddrinfo-fails-to-return-FQDN-for-AF_INET-and-AF_INET6/main.fmf +++ b/tests/Regression/bz863384-getaddrinfo-fails-to-return-FQDN-for-AF_INET-and-AF_INET6/main.fmf @@ -1,5 +1,8 @@ summary: Tests if 'getaddrinfo' returns FQDN in ai_canonname. description: '' +adjust: + - enabled: false + when: distro > rhel-9 contact: Arjun Shankar component: - glibc From 79a3dc68ab8a973980422359252f0a767db7c26e Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 1 May 2024 12:45:34 -0400 Subject: [PATCH 048/106] Auto-sync with upstream master Upstream commit: 91695ee4598b39d181ab8df579b888a8863c4cab - Update License tag to match upstream. - time: Allow later version licensing. - hurd: Stop mapping AT_NO_AUTOMOUNT to O_NOTRANS - libio: Sort test variables in Makefile - AArch64: Remove unused defines of CPU names - Make sure INSTALL is ASCII plaintext again - x86: In ld.so, diagnose missing APX support in APX-only builds - elf: Also compile dl-misc.os with $(rtld-early-cflags) - CVE-2024-33601, CVE-2024-33602: nscd: netgroup: Use two buffers in addgetnetgrentX (bug 31680) - CVE-2024-33600: nscd: Avoid null pointer crashes after notfound response (bug 31678) - CVE-2024-33600: nscd: Do not send missing not-found response in addgetnetgrentX (bug 31678) - CVE-2024-33599: nscd: Stack-based buffer overflow in netgroup cache (bug 31677) - i386: ulp update for SSE2 --disable-multi-arch configurations --- glibc.spec | 28 ++++++++++++++++++++++------ sources | 2 +- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/glibc.spec b/glibc.spec index 88bdf32..7f658a6 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-185-g41903cb6f4 +%global glibcsrcdir glibc-2.39.9000-197-g91695ee459 %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 16 +%global baserelease 17 Release: %{baserelease}%{?dist} # Licenses: @@ -185,13 +185,12 @@ Release: %{baserelease}%{?dist} # files, lib*_nonshared.a). Historically, this exception also applies # to parts of libio. # -# * LGPLv2 is used in a couple of places (e.g. time/timespec_get.c, by -# mistake). -# # * GPLv2+ with exceptions is used for parts of the Arm unwinder. # # * GFDL is used for the documentation. # +# * UNICODE v3 is used for the Unicode data files. +# # * Some other licenses are used in various places (BSD, Inner-Net, # ISC, Public Domain, etc.). # @@ -224,7 +223,7 @@ Release: %{baserelease}%{?dist} # SPDX license string based on evaluation of glibc-2.39 sources by # ScanCode toolkit (https://github.com/nexB/scancode-toolkit), # and accounting for exceptions listed above: -License: LGPL-2.1-or-later AND SunPro AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later WITH GNU-compiler-exception AND GPL-2.0-only AND ISC AND LicenseRef-Fedora-Public-Domain AND HPND AND CMU-Mach AND LGPL-2.1-only AND LGPL-2.0-or-later AND Unicode-DFS-2015 AND GFDL-1.1-or-later AND GPL-1.0-or-later AND FSFUL AND MIT AND Inner-Net-2.0 AND X11 AND GPL-2.0-or-later WITH GCC-exception-2.0 AND GFDL-1.3-only AND GFDL-1.1-only +License: LGPL-2.1-or-later AND SunPro AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later WITH GNU-compiler-exception AND GPL-2.0-only AND ISC AND LicenseRef-Fedora-Public-Domain AND HPND AND CMU-Mach AND LGPL-2.0-or-later AND Unicode-3.0 AND GFDL-1.1-or-later AND GPL-1.0-or-later AND FSFUL AND MIT AND Inner-Net-2.0 AND X11 AND GPL-2.0-or-later WITH GCC-exception-2.0 AND GFDL-1.3-only AND GFDL-1.1-only URL: http://www.gnu.org/software/glibc/ Source0: %{?glibc_release_url}%{glibcsrcdir}.tar.xz @@ -2526,6 +2525,23 @@ update_gconv_modules_cache () %endif %changelog +* Wed May 01 2024 Carlos O'Donell - 2.39.9000-17 +- Update License tag to match upstream. +- Auto-sync with upstream branch master, + commit 91695ee4598b39d181ab8df579b888a8863c4cab: +- time: Allow later version licensing. +- hurd: Stop mapping AT_NO_AUTOMOUNT to O_NOTRANS +- libio: Sort test variables in Makefile +- AArch64: Remove unused defines of CPU names +- Make sure INSTALL is ASCII plaintext again +- x86: In ld.so, diagnose missing APX support in APX-only builds +- elf: Also compile dl-misc.os with $(rtld-early-cflags) +- CVE-2024-33601, CVE-2024-33602: nscd: netgroup: Use two buffers in addgetnetgrentX (bug 31680) +- CVE-2024-33600: nscd: Avoid null pointer crashes after notfound response (bug 31678) +- CVE-2024-33600: nscd: Do not send missing not-found response in addgetnetgrentX (bug 31678) +- CVE-2024-33599: nscd: Stack-based buffer overflow in netgroup cache (bug 31677) +- i386: ulp update for SSE2 --disable-multi-arch configurations + * Thu Apr 25 2024 Florian Weimer - 2.39.9000-16 - Enable CPU compatibility diagnostics in ld.so (RHEL-31738) diff --git a/sources b/sources index a605cd7..0f08b02 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-185-g41903cb6f4.tar.xz) = 68d9ba6060cc2e1f145969824b69b5d64331c1f1b5c9f660ee14f679abae2b8baffb48a413e36e14069ce67704ba461179e0b6f80f5229c39f5db5da0b323c95 +SHA512 (glibc-2.39.9000-197-g91695ee459.tar.xz) = afd7f4229f48851afc93bc2f959e21f997929b61758914ea2dd877eacb5ae96998ca6e7b9e0733641111c78bb50bec0b9f1678e0576ef8a4e3e5e90287145775 From 05c725ac552030418ff2e3ce275b67b29d32c2b4 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 6 May 2024 15:19:12 -0400 Subject: [PATCH 049/106] Auto-sync with upstream master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream commit: 5f245f3bfbe61b2182964dafb94907e38284b806. - Add crt1-2.0.o for glibc 2.0 compatibility tests - powerpc: Optimized strncmp for power10 - build-many-glibcs.py: Add openrisc hard float glibc variant - or1k: Add hard float support - or1k: Add hard float libm-test-ulps - nscd: Use time_t for return type of addgetnetgrentX - Add a test to check for duplicate definitions in the static library - i686: Fix multiple definitions of __memmove_chk and __memset_chk - i586: Fix multiple definitions of __memcpy_chk and __mempcpy_chk - nscd: Typo inside comment in netgroup cache --- glibc.spec | 18 ++++++++++++++++-- sources | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 7f658a6..fda38b5 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-197-g91695ee459 +%global glibcsrcdir glibc-2.39.9000-207-g5f245f3bfb %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 17 +%global baserelease 18 Release: %{baserelease}%{?dist} # Licenses: @@ -2525,6 +2525,20 @@ update_gconv_modules_cache () %endif %changelog +* Mon May 06 2024 DJ Delorie - 2.39.9000-18 +- Auto-sync with upstream branch master, + commit 5f245f3bfbe61b2182964dafb94907e38284b806. +- Add crt1-2.0.o for glibc 2.0 compatibility tests +- powerpc: Optimized strncmp for power10 +- build-many-glibcs.py: Add openrisc hard float glibc variant +- or1k: Add hard float support +- or1k: Add hard float libm-test-ulps +- nscd: Use time_t for return type of addgetnetgrentX +- Add a test to check for duplicate definitions in the static library +- i686: Fix multiple definitions of __memmove_chk and __memset_chk +- i586: Fix multiple definitions of __memcpy_chk and __mempcpy_chk +- nscd: Typo inside comment in netgroup cache + * Wed May 01 2024 Carlos O'Donell - 2.39.9000-17 - Update License tag to match upstream. - Auto-sync with upstream branch master, diff --git a/sources b/sources index 0f08b02..882edb2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-197-g91695ee459.tar.xz) = afd7f4229f48851afc93bc2f959e21f997929b61758914ea2dd877eacb5ae96998ca6e7b9e0733641111c78bb50bec0b9f1678e0576ef8a4e3e5e90287145775 +SHA512 (glibc-2.39.9000-207-g5f245f3bfb.tar.xz) = 1b70c6897e3c7c039a6b15e8026c28d89de641ca7b626d8024e3ba73455a957172c8c42faaeb5e9e982e526af1c2cdbf08003ff01fe7945b609220343c810bbe From 2d5af83031edfa8191254814609961e4e57766fc Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Tue, 14 May 2024 12:12:32 +0200 Subject: [PATCH 050/106] Move libc_malloc_debug.so.0 from glibc to glibc-utils libc_malloc_debug is a debugging library and therefore should not be installed by default. Since it is needed in order to enable mtrace functionality, it belongs in glibc-utils along with the mtrace log interpreter. --- glibc.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index fda38b5..4c456eb 100644 --- a/glibc.spec +++ b/glibc.spec @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 18 +%global baserelease 19 Release: %{baserelease}%{?dist} # Licenses: @@ -1881,6 +1881,7 @@ chmod 0444 master.filelist # a double negation of -v and [^i] so it removes all files in # sbin *but* iconvconfig. # - All the libnss files (we add back the ones we want later). +# - libc_malloc_debug.so, since it is a debugging library. # - All bench test binaries. # - The aux-cache, since it's handled specially in the files section. # - Extra gconv modules. We add the required modules later. @@ -1901,6 +1902,7 @@ cat master.filelist \ -e '/var/db/Makefile' \ -e '/libnss_.*\.so[0-9.]*$' \ -e '/libnsl' \ + -e 'libc_malloc_debug\.so' \ -e 'glibc-benchtests' \ -e 'aux-cache' \ %ifarch x86_64 @@ -1980,6 +1982,7 @@ grep '%{_libdir}/lib.*\.a' master.filelist \ # devel package. grep '%{_libdir}/.*\.o' < master.filelist >> devel.filelist grep '%{_libdir}/lib.*\.so' < master.filelist >> devel.filelist + # The exceptions are: # - libmemusage.so and libpcprofile.so in glibc used by utils. # - libnss_*.so which are in nss-devel. @@ -2099,6 +2102,10 @@ cat > utils.filelist <> utils.filelist + ############################################################################### # nss_db, nss_hesiod ############################################################################### @@ -2525,6 +2532,9 @@ update_gconv_modules_cache () %endif %changelog +* Tue May 14 2024 Arjun Shankar - 2.39.9000-19 +- Move libc_malloc_debug.so.0 from glibc to glibc-utils + * Mon May 06 2024 DJ Delorie - 2.39.9000-18 - Auto-sync with upstream branch master, commit 5f245f3bfbe61b2182964dafb94907e38284b806. From e9d072eb64a251e09a121122941605f4a22d170a Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Wed, 15 May 2024 12:57:49 +0200 Subject: [PATCH 051/106] Move memory tracing libs to appropriate sub-packages Commit 2d5af83031ed moved libc_malloc_debug.so.0 to glibc-utils, but this made it impossible to install the 32-bit version of the library on x86_64. libmemusage.so is a similar tracing library that is currently shipped in glibc but should also (with the exception of i686) be moved to glibc-utils. This commit fixes that by: 1. Moving libc_malloc_debug.so.0 back to glibc on i686. 2. Moving libmemusage.so to glibc-utils, again, except on i686. --- glibc.spec | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/glibc.spec b/glibc.spec index 4c456eb..175e528 100644 --- a/glibc.spec +++ b/glibc.spec @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 19 +%global baserelease 20 Release: %{baserelease}%{?dist} # Licenses: @@ -307,6 +307,18 @@ rpm.define("__debug_install_post bash " .. wrapper %global _no_recompute_build_ids 1 %undefine _unique_build_ids +%ifarch %{ix86} +# The memory tracing tools (like mtrace, memusage) in glibc-utils only work +# when the corresponding memory tracing libraries are preloaded. So we ship +# memory allocation tracing/checking libraries in glibc-utils, except on +# i686 where we need to ship them in glibc.i686. This is because +# glibc-utils.x86_64 will contain only the 64-bit version of these +# libraries. +%global glibc_ship_tracelibs_in_utils 0 +%else +%global glibc_ship_tracelibs_in_utils 1 +%endif + ############################################################################## # Patches: # - See each individual patch file for origin and upstream status. @@ -1902,7 +1914,9 @@ cat master.filelist \ -e '/var/db/Makefile' \ -e '/libnss_.*\.so[0-9.]*$' \ -e '/libnsl' \ +%if %{glibc_ship_tracelibs_in_utils} -e 'libc_malloc_debug\.so' \ +%endif -e 'glibc-benchtests' \ -e 'aux-cache' \ %ifarch x86_64 @@ -1926,7 +1940,12 @@ for module in compat files dns; do %endif >> glibc.filelist done -grep -e "libmemusage.so" -e "libpcprofile.so" master.filelist \ +grep \ +%if ! %{glibc_ship_tracelibs_in_utils} + -e "libmemusage.so" \ +%endif + -e "libpcprofile.so" \ + master.filelist \ %ifarch x86_64 %dnl Exclude 32-bit libraries built for glibc32. | grep -v -e /lib/lib \ @@ -2102,9 +2121,12 @@ cat > utils.filelist <> utils.filelist +%if %{glibc_ship_tracelibs_in_utils} +grep \ + -e '%{_lib}/libc_malloc_debug\.so' \ + -e '%{_lib}/libmemusage.so' \ + < master.filelist >> utils.filelist +%endif ############################################################################### # nss_db, nss_hesiod @@ -2532,6 +2554,10 @@ update_gconv_modules_cache () %endif %changelog +* Wed May 15 2024 Arjun Shankar - 2.39.9000-20 +- i686: Move libc_malloc_debug.so.0 back to glibc +- Other arches: Move libmemusage.so to glibc-utils + * Tue May 14 2024 Arjun Shankar - 2.39.9000-19 - Move libc_malloc_debug.so.0 from glibc to glibc-utils From 1f7783d16b1462c14141076eb7698742811f0c29 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sun, 19 May 2024 11:48:52 +0200 Subject: [PATCH 052/106] Auto-sync with upstream branch master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream commit: 8d7b6b4cb27d4dec1dd5f7960298c1699275f962 - socket: Use may_alias on sockaddr structs (bug 19622) - Use a doubly-linked list for _IO_list_all (bug 27777) - powerpc64: Fix by using the configure value $libc_cv_cc_submachine [BZ #31629] - aarch64/fpu: Add vector variants of cbrt - aarch64/fpu: Add vector variants of hypot - Use Linux 6.9 in build-many-glibcs.py - localedata: Fix several issues with the set of characters considered 0-width [BZ #31370] - math: Add GLIBC_TEST_LIBM_VERBOSE environment variable support. - malloc: Improve aligned_alloc and calloc test coverage. - Unify output from backtrace_symbols_fd with backtrace_symbols (bug 31730) - manual: add dup3 - Force DT_RPATH for --enable-hardcoded-path-in-tests - powerpc: Fix __fesetround_inline_nocheck on POWER9+ (BZ 31682) - localedata: add mdf_RU locale - elf: Make glibc.rtld.enable_secure ignore alias environment variables - elf: Remove glibc.rtld.enable_secure check from parse_tunables_string - elf: Only process multiple tunable once (BZ 31686) --- glibc.spec | 26 ++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 175e528..bf96630 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-207-g5f245f3bfb +%global glibcsrcdir glibc-2.39.9000-234-g8d7b6b4cb2 %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 20 +%global baserelease 21 Release: %{baserelease}%{?dist} # Licenses: @@ -824,6 +824,7 @@ local locales = { { code="lzh", name="Literary Chinese", regions={ "TW" } }, { code="mag", name="Magahi", regions={ "IN" } }, { code="mai", name="Maithili", regions={ "IN", "NP" } }, + { code="mdf", name="Moksha", regions={ "RU" } }, { code="mfe", name="Morisyen", regions={ "MU" } }, { code="mg", name="Malagasy", regions={ "MG" } }, { code="mhr", name="Meadow Mari", regions={ "RU" } }, @@ -2554,6 +2555,27 @@ update_gconv_modules_cache () %endif %changelog +* Sun May 19 2024 Florian Weimer - 2.39.9000-21 +- Auto-sync with upstream branch master, + commit 8d7b6b4cb27d4dec1dd5f7960298c1699275f962: +- socket: Use may_alias on sockaddr structs (bug 19622) +- Use a doubly-linked list for _IO_list_all (bug 27777) +- powerpc64: Fix by using the configure value $libc_cv_cc_submachine [BZ #31629] +- aarch64/fpu: Add vector variants of cbrt +- aarch64/fpu: Add vector variants of hypot +- Use Linux 6.9 in build-many-glibcs.py +- localedata: Fix several issues with the set of characters considered 0-width [BZ #31370] +- math: Add GLIBC_TEST_LIBM_VERBOSE environment variable support. +- malloc: Improve aligned_alloc and calloc test coverage. +- Unify output from backtrace_symbols_fd with backtrace_symbols (bug 31730) +- manual: add dup3 +- Force DT_RPATH for --enable-hardcoded-path-in-tests +- powerpc: Fix __fesetround_inline_nocheck on POWER9+ (BZ 31682) +- localedata: add mdf_RU locale +- elf: Make glibc.rtld.enable_secure ignore alias environment variables +- elf: Remove glibc.rtld.enable_secure check from parse_tunables_string +- elf: Only process multiple tunable once (BZ 31686) + * Wed May 15 2024 Arjun Shankar - 2.39.9000-20 - i686: Move libc_malloc_debug.so.0 back to glibc - Other arches: Move libmemusage.so to glibc-utils diff --git a/sources b/sources index 882edb2..08f9c4a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-207-g5f245f3bfb.tar.xz) = 1b70c6897e3c7c039a6b15e8026c28d89de641ca7b626d8024e3ba73455a957172c8c42faaeb5e9e982e526af1c2cdbf08003ff01fe7945b609220343c810bbe +SHA512 (glibc-2.39.9000-234-g8d7b6b4cb2.tar.xz) = 914b3695243f32dd4492a832f56a4523a9b9238451bd948799b6d65331351c72d7c582d19ac65e770338680e1db596480043dff82f97891644e3727766eb1a79 From cb26947f73950b581adfac51cd51f8481cc95a94 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sun, 19 May 2024 18:33:38 +0200 Subject: [PATCH 053/106] Add Conflicts:/Obsoletes: for glibc32 to glibc.i686 --- glibc.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index bf96630..5b0aabd 100644 --- a/glibc.spec +++ b/glibc.spec @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 21 +%global baserelease 22 Release: %{baserelease}%{?dist} # Licenses: @@ -359,6 +359,10 @@ Requires: basesystem # after nss_*.x86_64. (See below for the other ordering.) Recommends: (nss_db(x86-32) if nss_db(x86-64)) Recommends: (nss_hesiod(x86-32) if nss_hesiod(x86-64)) +# Deinstall the glibc32 package if present. This helps tests that do +# not run against the compose. +Conflicts: glibc32 <= %{version}-%{baserelease} +Obsoletes: glibc32 <= %{version}-%{baserelease} %endif # This is for building auxiliary programs like memusage @@ -2555,6 +2559,9 @@ update_gconv_modules_cache () %endif %changelog +* Sun May 19 2024 Florian Weimer - 2.39.9000-22 +- Add Conflicts:/Obsoletes: for glibc32 to glibc.i686 + * Sun May 19 2024 Florian Weimer - 2.39.9000-21 - Auto-sync with upstream branch master, commit 8d7b6b4cb27d4dec1dd5f7960298c1699275f962: From add3da24f037a9d934eaeb9a6c246a45d3a716cc Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 22 May 2024 11:26:11 +0200 Subject: [PATCH 054/106] Use release instead of baserelease for glibc32 conflict This is necessary because %{baserelease} < %{release}, so the previous Obsoletes: clause did not match an installed glibc32 package from the same build. --- glibc.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 5b0aabd..23153b5 100644 --- a/glibc.spec +++ b/glibc.spec @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 22 +%global baserelease 23 Release: %{baserelease}%{?dist} # Licenses: @@ -361,8 +361,8 @@ Recommends: (nss_db(x86-32) if nss_db(x86-64)) Recommends: (nss_hesiod(x86-32) if nss_hesiod(x86-64)) # Deinstall the glibc32 package if present. This helps tests that do # not run against the compose. -Conflicts: glibc32 <= %{version}-%{baserelease} -Obsoletes: glibc32 <= %{version}-%{baserelease} +Conflicts: glibc32 <= %{version}-%{release} +Obsoletes: glibc32 <= %{version}-%{release} %endif # This is for building auxiliary programs like memusage @@ -2559,6 +2559,9 @@ update_gconv_modules_cache () %endif %changelog +* Wed May 22 2024 Florian Weimer - 2.39.9000-23 +- Use release instead of baserelease for glibc32 conflict + * Sun May 19 2024 Florian Weimer - 2.39.9000-22 - Add Conflicts:/Obsoletes: for glibc32 to glibc.i686 From e32c8ab95ee0f7b355b8e93de69902ac6c4f82ab Mon Sep 17 00:00:00 2001 From: Patsy Griffin Date: Thu, 23 May 2024 08:57:35 -0400 Subject: [PATCH 055/106] Auto-sync with upstream branch master Upstream commit: eaa8113bf0eb599025e3efdbe1bb214ee8dc645a - math: Provide missing math symbols on libc.a (BZ 31781) - s390: Make utmp32, utmpx32, and login32 shared only (BZ 31790) - microblaze: Remove cacheflush from libc.a (BZ 31788) - powerpc: Remove duplicated llrintf and llrintf32 from libm.a (BZ 31787) - powerpc: Remove duplicate strchrnul and strncasecmp_l libc.a (BZ 31786) - loongarch: Remove duplicate strnlen in libc.a (BZ 31785) - aarch64: Remove duplicate memchr/strlen in libc.a (BZ 31777) - Update PIDFD_* constants for Linux 6.9 - Define write_profiling functions only in profile library [BZ #31756] - Don't provide XXXf128_do_not_use aliases [BZ #31757] - Don't provide scalb/significand _FloatN aliases [BZ #31760] - math: Fix isnanf128 static build (BZ 31774) - math: Add support for auto static math tests - Change _IO_stderr_/_IO_stdin_/_IO_stdout to compat symbols [BZ #31766] - Obsolete _dl_mcount_wrapper in glibc 2.40 [BZ #31765] - math: Fix i386 and m68k exp10 on static build (BZ 31775) - math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) - Remove the clone3 symbol from libc.a [BZ #31770] - aarch64/fpu: Add vector variants of pow - Compile libmvec with -fno-math-errno - manual: clarify defintions of floating point exponent bounds (bug 31518) - LoongArch: Update ulps - LoongArch: Fix tst-gnu2-tls2 compiler error - resolv: Make _res_opcodes a compat symbol [BZ #31764] - i386: Don't define stpncpy alias when used in IFUNC [BZ #31768] - powerpc: Update ulps - arm: Update ulps - aarch64: Update ulps - math: Add more details to the test driver output. - Implement C23 log2p1 - Update syscall lists for Linux 6.9 - Rename procutils_read_file to __libc_procutils_read_file [BZ #31755] - nearbyint: Don't define alias when used in IFUNC [BZ #31759] - Pass -nostdlib -nostartfiles together with -r [BZ #31753] --- glibc.spec | 42 ++++++++++++++++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 23153b5..76d690b 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-234-g8d7b6b4cb2 +%global glibcsrcdir glibc-2.39.9000-268-geaa8113bf0 %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 23 +%global baserelease 24 Release: %{baserelease}%{?dist} # Licenses: @@ -2559,6 +2559,44 @@ update_gconv_modules_cache () %endif %changelog +* Thu May 23 2024 Patsy Griffin - 2.39.9000-24 +- Auto-sync with upstream branch master, + commit eaa8113bf0eb599025e3efdbe1bb214ee8dc645a. +- math: Provide missing math symbols on libc.a (BZ 31781) +- s390: Make utmp32, utmpx32, and login32 shared only (BZ 31790) +- microblaze: Remove cacheflush from libc.a (BZ 31788) +- powerpc: Remove duplicated llrintf and llrintf32 from libm.a (BZ 31787) +- powerpc: Remove duplicate strchrnul and strncasecmp_l libc.a (BZ 31786) +- loongarch: Remove duplicate strnlen in libc.a (BZ 31785) +- aarch64: Remove duplicate memchr/strlen in libc.a (BZ 31777) +- Update PIDFD_* constants for Linux 6.9 +- Define write_profiling functions only in profile library [BZ #31756] +- Don't provide XXXf128_do_not_use aliases [BZ #31757] +- Don't provide scalb/significand _FloatN aliases [BZ #31760] +- math: Fix isnanf128 static build (BZ 31774) +- math: Add support for auto static math tests +- Change _IO_stderr_/_IO_stdin_/_IO_stdout to compat symbols [BZ #31766] +- Obsolete _dl_mcount_wrapper in glibc 2.40 [BZ #31765] +- math: Fix i386 and m68k exp10 on static build (BZ 31775) +- math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) +- Remove the clone3 symbol from libc.a [BZ #31770] +- aarch64/fpu: Add vector variants of pow +- Compile libmvec with -fno-math-errno +- manual: clarify defintions of floating point exponent bounds (bug 31518) +- LoongArch: Update ulps +- LoongArch: Fix tst-gnu2-tls2 compiler error +- resolv: Make _res_opcodes a compat symbol [BZ #31764] +- i386: Don't define stpncpy alias when used in IFUNC [BZ #31768] +- powerpc: Update ulps +- arm: Update ulps +- aarch64: Update ulps +- math: Add more details to the test driver output. +- Implement C23 log2p1 +- Update syscall lists for Linux 6.9 +- Rename procutils_read_file to __libc_procutils_read_file [BZ #31755] +- nearbyint: Don't define alias when used in IFUNC [BZ #31759] +- Pass -nostdlib -nostartfiles together with -r [BZ #31753] + * Wed May 22 2024 Florian Weimer - 2.39.9000-23 - Use release instead of baserelease for glibc32 conflict diff --git a/sources b/sources index 08f9c4a..f82a727 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-234-g8d7b6b4cb2.tar.xz) = 914b3695243f32dd4492a832f56a4523a9b9238451bd948799b6d65331351c72d7c582d19ac65e770338680e1db596480043dff82f97891644e3727766eb1a79 +SHA512 (glibc-2.39.9000-268-geaa8113bf0.tar.xz) = f4e3cf179e656a472dfa5a278c7720b47f9d9b541b65744ba00d29dcf56f4c4cea04b9f545d6541a23595fdb542c0258bb9e4619e7e58b29ae4cc4e24584509f From 98d57c7f87588c70b2fe89b3f5f22409bbc5b653 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Wed, 29 May 2024 11:04:51 +0200 Subject: [PATCH 056/106] Auto-sync with upstream branch master Upstream commit: 0c1d2c277a59f08fd3232b33d18644ea890190ea - LoongArch: Use "$fcsr0" instead of "$r0" in _FPU_{GET,SET}CW - x86_64: Reformat elf_machine_rela - i386: Disable Intel Xeon Phi tests for GCC 15 and above (BZ 31782) - difftime is pure, not const - parse_fdinfo: Don't advance pointer twice [BZ #31798] - elf/Makefile: Split and sort PIE tests - Revert "Test fscanf of long double without " - sysdeps/ieee754/ldbl-opt/Makefile: Split and sort libnldbl-calls - Test fscanf of long double without - sysdeps/ieee754/ldbl-opt/Makefile: Remove test-nldbl-redirect-static - sysdeps/ieee754/ldbl-opt/Makefile: Split and sort tests - s390x: Regenerate ULPs. - powerpc: Remove duplicated versionsort from libm.a (BZ 31789) - Update kernel version to 6.9 in header constant tests - localedata: cv_RU: update translation --- glibc.spec | 23 +++++++++++++++++++++-- sources | 2 +- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 76d690b..522cb23 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-268-geaa8113bf0 +%global glibcsrcdir glibc-2.39.9000-283-g0c1d2c277a %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 24 +%global baserelease 25 Release: %{baserelease}%{?dist} # Licenses: @@ -2559,6 +2559,25 @@ update_gconv_modules_cache () %endif %changelog +* Wed May 29 2024 Arjun Shankar - 2.39.9000-25 +- Auto-sync with upstream branch master, + commit 0c1d2c277a59f08fd3232b33d18644ea890190ea: +- LoongArch: Use "$fcsr0" instead of "$r0" in _FPU_{GET,SET}CW +- x86_64: Reformat elf_machine_rela +- i386: Disable Intel Xeon Phi tests for GCC 15 and above (BZ 31782) +- difftime is pure, not const +- parse_fdinfo: Don't advance pointer twice [BZ #31798] +- elf/Makefile: Split and sort PIE tests +- Revert "Test fscanf of long double without " +- sysdeps/ieee754/ldbl-opt/Makefile: Split and sort libnldbl-calls +- Test fscanf of long double without +- sysdeps/ieee754/ldbl-opt/Makefile: Remove test-nldbl-redirect-static +- sysdeps/ieee754/ldbl-opt/Makefile: Split and sort tests +- s390x: Regenerate ULPs. +- powerpc: Remove duplicated versionsort from libm.a (BZ 31789) +- Update kernel version to 6.9 in header constant tests +- localedata: cv_RU: update translation + * Thu May 23 2024 Patsy Griffin - 2.39.9000-24 - Auto-sync with upstream branch master, commit eaa8113bf0eb599025e3efdbe1bb214ee8dc645a. diff --git a/sources b/sources index f82a727..7326153 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-268-geaa8113bf0.tar.xz) = f4e3cf179e656a472dfa5a278c7720b47f9d9b541b65744ba00d29dcf56f4c4cea04b9f545d6541a23595fdb542c0258bb9e4619e7e58b29ae4cc4e24584509f +SHA512 (glibc-2.39.9000-283-g0c1d2c277a.tar.xz) = 9d389e846430c9c44454a0f65511f159d533fe0feffb79fb3116b94a95f55264d761fda770104d35b9d2ea8870f5240010f93f5ee6e897cf0731bec91c74b69b From e8ab643b0a371c3ba72c6f10e97ca467d511e4b7 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Wed, 12 Jun 2024 15:11:24 -0400 Subject: [PATCH 057/106] Auto-sync with upstream branch master Upstream commit: e7ac92e6ca9784b397189df0b2e1fb34f425bab8 - : Acknowledge that getdelim/getline are in POSIX - localedata: Lowercase day and abday in cs_CZ - x86: Properly set MINIMUM_X86_ISA_LEVEL for i386 [BZ #31867] - x86: Enable non-temporal memset tunable for AMD - hurd: Fix getxattr/listxattr returning ERANGE - hurd: Fix setxattr return value on replacing - hurd: Fix getxattr("gnu.translator") returning ENODATA - hurd: Fix lsetxattr return value - localedata: add new locales scn_IT - support: Fix typo in xgetsockname error message - getconf: Add NPROCESSORS_{CONF,ONLN} [BZ #31661] - Linux: Add epoll ioctls - Improve doc for time_t range (BZ 31808) - difftime can throw exceptions - malloc: New test to check malloc alternate path using memory obstruction - math: Fix exp10 undefined left shift - libio: Test for fdopen memory leak without SEEK_END support (bug 31840) - Remove memory leak in fdopen (bug 31840) - Add new AArch64 HWCAP2 definitions from Linux 6.9 to bits/hwcap.h - Add more NT_ARM_* constants from Linux kernel to elf.h - stdlib: Describe __cxa_finalize usage in function comment - elf: Avoid some free (NULL) calls in _dl_update_slotinfo - x86: Add seperate non-temporal tunable for memset - x86: Improve large memset perf with non-temporal stores [RHEL-29312] - elf: add note identifier for dlopen metadata - elf: update NT_FDO_PACKAGING_METADATA spec URL --- glibc.spec | 35 +++++++++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 522cb23..19a02fb 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-283-g0c1d2c277a +%global glibcsrcdir glibc-2.39.9000-309-ge7ac92e6ca %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 25 +%global baserelease 26 Release: %{baserelease}%{?dist} # Licenses: @@ -873,6 +873,7 @@ local locales = { { code="sah", name="Sakha", regions={ "RU" } }, { code="sat", name="Santali", regions={ "IN" } }, { code="sc", name="Sardinian", regions={ "IT" } }, + { code="scn", name="Sicilian", regions={ "IT" } }, { code="sd", name="Sindhi", regions={ "IN" } }, { code="se", name="Northern Sami", regions={ "NO" } }, { code="sgs", name="Samogitian", regions={ "LT" } }, @@ -2559,6 +2560,36 @@ update_gconv_modules_cache () %endif %changelog +* Wed Jun 12 2024 DJ Delorie - 2.39.9000-26 +- Auto-sync with upstream branch master, + commit e7ac92e6ca9784b397189df0b2e1fb34f425bab8. +- : Acknowledge that getdelim/getline are in POSIX +- localedata: Lowercase day and abday in cs_CZ +- x86: Properly set MINIMUM_X86_ISA_LEVEL for i386 [BZ #31867] +- x86: Enable non-temporal memset tunable for AMD +- hurd: Fix getxattr/listxattr returning ERANGE +- hurd: Fix setxattr return value on replacing +- hurd: Fix getxattr("gnu.translator") returning ENODATA +- hurd: Fix lsetxattr return value +- localedata: add new locales scn_IT +- support: Fix typo in xgetsockname error message +- getconf: Add NPROCESSORS_{CONF,ONLN} [BZ #31661] +- Linux: Add epoll ioctls +- Improve doc for time_t range (BZ 31808) +- difftime can throw exceptions +- malloc: New test to check malloc alternate path using memory obstruction +- math: Fix exp10 undefined left shift +- libio: Test for fdopen memory leak without SEEK_END support (bug 31840) +- Remove memory leak in fdopen (bug 31840) +- Add new AArch64 HWCAP2 definitions from Linux 6.9 to bits/hwcap.h +- Add more NT_ARM_* constants from Linux kernel to elf.h +- stdlib: Describe __cxa_finalize usage in function comment +- elf: Avoid some free (NULL) calls in _dl_update_slotinfo +- x86: Add seperate non-temporal tunable for memset +- x86: Improve large memset perf with non-temporal stores [RHEL-29312] +- elf: add note identifier for dlopen metadata +- elf: update NT_FDO_PACKAGING_METADATA spec URL + * Wed May 29 2024 Arjun Shankar - 2.39.9000-25 - Auto-sync with upstream branch master, commit 0c1d2c277a59f08fd3232b33d18644ea890190ea: diff --git a/sources b/sources index 7326153..c87d816 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-283-g0c1d2c277a.tar.xz) = 9d389e846430c9c44454a0f65511f159d533fe0feffb79fb3116b94a95f55264d761fda770104d35b9d2ea8870f5240010f93f5ee6e897cf0731bec91c74b69b +SHA512 (glibc-2.39.9000-309-ge7ac92e6ca.tar.xz) = 9c8d83e6b5dfd90b28c438500c32c0044930c613df6b9d44b0652e096c04af636accde9ff00c97ae8c07f655f850c5dd7cf55006071a1c1d2109630901dceaad From b5cf50002ff11b750020c0a8fa2324bc28ba4ed1 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 21 Jun 2024 13:25:26 +0200 Subject: [PATCH 058/106] Auto-sync with upstream branch master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream commit: dd144dce21c864781fade4561581d50fb4549956 - malloc: Replace shell/Perl gate in mtrace - s390x: Capture grep output in static PIE check - i386: Update ulps - malloc: Always install mtrace (bug 31892) - Translations: Regenerate libc.pot - s390x: Regenerate ULPs. - LoongArch: Fix _dl_tlsdesc_dynamic in LSX case - aarch64: Update ulps - powerpc: Update ulps - Linux: Include in dl-sysdep.c - linux: add definitions for hugetlb page size encodings - elf: Remove HWCAP_IMPORTANT - elf: Remove LD_HWCAP_MASK / tunable glibc.cpu.hwcap_mask - elf: Remove _DL_PLATFORMS_COUNT - elf: Remove _DL_FIRST_PLATFORM - elf: Remove _DL_HWCAP_PLATFORM - elf: Remove platform strings in dl-procinfo.c - elf: Remove _dl_string_platform - elf: Remove loading legacy hwcaps/platform entries in dynamic loader - x86: Remove HWCAP_START and HWCAP_COUNT - math: Update mips32/mips64 ulps for log2p1 - Convert to autoconf 2.72 (vanilla release, no distribution patches) - Implement C23 exp2m1, exp10m1 - Implement C23 log10p1 - Implement C23 logp1 - support: Include for NAME_MAX use in temp_file.c - support: Include for atoi use in support_wait_for_thread_exit - Extend tst-getconf.sh test with NPROCESSORS_CONF and NPROCESSORS_ONLN - Define ISO 639-3 "ltg" (Latgalian) and add ltg_LV locale - Minor code improvement to timespec_subtract example - Modernize and fix doc’s “Date and Time” (BZ 31876) - manual: minor language fix (bz 31340) - x86: Fix value for `x86_memset_non_temporal_threshold` when it is undesirable - elf: Change module-names to modules-names in comments - resolv: Track single-request fallback via _res._flags (bug 31476) - x86: Properly set x86 minimum ISA level [BZ #31883] - tunables: sort tunables list (BZ 30027) - linux: Remove __stack_prot --- glibc.spec | 47 +++++++++++++++++++++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 19a02fb..c161287 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-309-ge7ac92e6ca +%global glibcsrcdir glibc-2.39.9000-355-gdd144dce21 %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 26 +%global baserelease 27 Release: %{baserelease}%{?dist} # Licenses: @@ -824,6 +824,7 @@ local locales = { { code="ln", name="Lingala", regions={ "CD" } }, { code="lo", name="Lao", regions={ "LA" } }, { code="lt", name="Lithuanian", regions={ "LT" } }, + { code="ltg", name="Latgalian", regions={ "LV" } }, { code="lv", name="Latvian", regions={ "LV" } }, { code="lzh", name="Literary Chinese", regions={ "TW" } }, { code="mag", name="Magahi", regions={ "IN" } }, @@ -2560,6 +2561,48 @@ update_gconv_modules_cache () %endif %changelog +* Thu Jun 20 2024 Florian Weimer - 2.39.9000-27 +- Auto-sync with upstream branch master, + commit dd144dce21c864781fade4561581d50fb4549956: +- malloc: Replace shell/Perl gate in mtrace +- s390x: Capture grep output in static PIE check +- i386: Update ulps +- malloc: Always install mtrace (bug 31892) +- Translations: Regenerate libc.pot +- s390x: Regenerate ULPs. +- LoongArch: Fix _dl_tlsdesc_dynamic in LSX case +- aarch64: Update ulps +- powerpc: Update ulps +- Linux: Include in dl-sysdep.c +- linux: add definitions for hugetlb page size encodings +- elf: Remove HWCAP_IMPORTANT +- elf: Remove LD_HWCAP_MASK / tunable glibc.cpu.hwcap_mask +- elf: Remove _DL_PLATFORMS_COUNT +- elf: Remove _DL_FIRST_PLATFORM +- elf: Remove _DL_HWCAP_PLATFORM +- elf: Remove platform strings in dl-procinfo.c +- elf: Remove _dl_string_platform +- elf: Remove loading legacy hwcaps/platform entries in dynamic loader +- x86: Remove HWCAP_START and HWCAP_COUNT +- math: Update mips32/mips64 ulps for log2p1 +- Convert to autoconf 2.72 (vanilla release, no distribution patches) +- Implement C23 exp2m1, exp10m1 +- Implement C23 log10p1 +- Implement C23 logp1 +- support: Include for NAME_MAX use in temp_file.c +- support: Include for atoi use in support_wait_for_thread_exit +- Extend tst-getconf.sh test with NPROCESSORS_CONF and NPROCESSORS_ONLN +- Define ISO 639-3 "ltg" (Latgalian) and add ltg_LV locale +- Minor code improvement to timespec_subtract example +- Modernize and fix doc’s “Date and Time” (BZ 31876) +- manual: minor language fix (bz 31340) +- x86: Fix value for `x86_memset_non_temporal_threshold` when it is undesirable +- elf: Change module-names to modules-names in comments +- resolv: Track single-request fallback via _res._flags (bug 31476) +- x86: Properly set x86 minimum ISA level [BZ #31883] +- tunables: sort tunables list (BZ 30027) +- linux: Remove __stack_prot + * Wed Jun 12 2024 DJ Delorie - 2.39.9000-26 - Auto-sync with upstream branch master, commit e7ac92e6ca9784b397189df0b2e1fb34f425bab8. diff --git a/sources b/sources index c87d816..e2c9590 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-309-ge7ac92e6ca.tar.xz) = 9c8d83e6b5dfd90b28c438500c32c0044930c613df6b9d44b0652e096c04af636accde9ff00c97ae8c07f655f850c5dd7cf55006071a1c1d2109630901dceaad +SHA512 (glibc-2.39.9000-355-gdd144dce21.tar.xz) = 056ca43b7baafa4fff1015fb77371590a3bcaf636a98697f8607741423b11743b7d3462a7a60d0c4c856c10fb7cd723ba1d80abfe0c27a4477b5ee9156b470a3 From d1acdb1a5e317c5c8db2409d85fb46b2bfae6a4d Mon Sep 17 00:00:00 2001 From: Patsy Griffin Date: Thu, 27 Jun 2024 10:52:45 -0400 Subject: [PATCH 059/106] Auto-sync with upstream branch master Upstream commit: 21738846a19eb4a36981efd37d9ee7cb6d687494 - time: Avoid memcmp overread in tzset (bug 31931) - Fix strnlen doc re array size - arm: Avoid UB in elf_machine_rel() - LoongArch: Fix tst-gnu2-tls2 test case - posix: Fix pidfd_spawn/pidfd_spawnp leak if execve fails (BZ 31695) - INSTALL: regenerate - Revert "MIPSr6/math: Use builtin fma and fmaf" - INSTALL: Fix typo ibmlondouble to ibmlongdouble - RISC-V: Execute a PAUSE hint in spin loops - MIPSr6/math: Use builtin fma and fmaf - po: incorporate translations (cs, de, hr, ko, pl, ro, ru, sv, uk, zh_CN) - mtrace: make shell commands robust against meta characters - hppa/vdso: Add wrappers for vDSO functions - Update hppa libm-test-ulps - Benchtests: Remove broken walk benchmarks - Update hppa libm-test-ulps - RISC-V: Update ulps - MIPS: Update ulps --- glibc.spec | 26 ++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index c161287..8c7d3b0 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-355-gdd144dce21 +%global glibcsrcdir glibc-2.39.9000-373-g21738846a1 %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 27 +%global baserelease 28 Release: %{baserelease}%{?dist} # Licenses: @@ -2561,6 +2561,28 @@ update_gconv_modules_cache () %endif %changelog +* Thu Jun 27 2024 Patsy Griffin - 2.39.9000-28 +- Auto-sync with upstream branch master, + commit 21738846a19eb4a36981efd37d9ee7cb6d687494. +- time: Avoid memcmp overread in tzset (bug 31931) +- Fix strnlen doc re array size +- arm: Avoid UB in elf_machine_rel() +- LoongArch: Fix tst-gnu2-tls2 test case +- posix: Fix pidfd_spawn/pidfd_spawnp leak if execve fails (BZ 31695) +- INSTALL: regenerate +- Revert "MIPSr6/math: Use builtin fma and fmaf" +- INSTALL: Fix typo ibmlondouble to ibmlongdouble +- RISC-V: Execute a PAUSE hint in spin loops +- MIPSr6/math: Use builtin fma and fmaf +- po: incorporate translations (cs, de, hr, ko, pl, ro, ru, sv, uk, zh_CN) +- mtrace: make shell commands robust against meta characters +- hppa/vdso: Add wrappers for vDSO functions +- Update hppa libm-test-ulps +- Benchtests: Remove broken walk benchmarks +- Update hppa libm-test-ulps +- RISC-V: Update ulps +- MIPS: Update ulps + * Thu Jun 20 2024 Florian Weimer - 2.39.9000-27 - Auto-sync with upstream branch master, commit dd144dce21c864781fade4561581d50fb4549956: diff --git a/sources b/sources index e2c9590..9ef70a0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-355-gdd144dce21.tar.xz) = 056ca43b7baafa4fff1015fb77371590a3bcaf636a98697f8607741423b11743b7d3462a7a60d0c4c856c10fb7cd723ba1d80abfe0c27a4477b5ee9156b470a3 +SHA512 (glibc-2.39.9000-373-g21738846a1.tar.xz) = 4f7f6866d3341951e015d76ab33b79d3c0bb00fc6e63c01f5acd6372179de9d088e894a62158c69658694c37b7fe98cd77f6c03754acee7803e48020c278b218 From 16031399765daa50518f38efc4d9ba8c46cf3ab2 Mon Sep 17 00:00:00 2001 From: Patsy Griffin Date: Mon, 1 Jul 2024 14:37:11 -0400 Subject: [PATCH 060/106] Move ANSI_X3.110-1983 support from main package to glibc-gconv-extra. --- glibc.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/glibc.spec b/glibc.spec index 8c7d3b0..a26ab7e 100644 --- a/glibc.spec +++ b/glibc.spec @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 28 +%global baserelease 29 Release: %{baserelease}%{?dist} # Licenses: @@ -1966,7 +1966,7 @@ grep \ grep -e "gconv-modules-extra.conf" master.filelist > gconv.filelist # Put the essential gconv modules into the main package. -GconvBaseModules="ANSI_X3.110 ISO8859-15 ISO8859-1 CP1252" +GconvBaseModules="ISO8859-15 ISO8859-1 CP1252" GconvBaseModules="$GconvBaseModules UNICODE UTF-16 UTF-32 UTF-7" %ifarch s390 s390x GconvBaseModules="$GconvBaseModules ISO-8859-1_CP037_Z900 UTF8_UTF16_Z9" @@ -2561,6 +2561,9 @@ update_gconv_modules_cache () %endif %changelog +* Thu Jun 27 2024 Patsy Griffin - 2.39.9000-29 +- Move ANSI_X3.110-1983 support from main package to glibc-gconv-extra. + * Thu Jun 27 2024 Patsy Griffin - 2.39.9000-28 - Auto-sync with upstream branch master, commit 21738846a19eb4a36981efd37d9ee7cb6d687494. From 39288317199b4486f03b031573391c1808afeb76 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Thu, 4 Jul 2024 13:16:14 +0200 Subject: [PATCH 061/106] Auto-sync with upstream branch master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream commit: 2b92982e2369d292560793bee8e730f695f48ff3 - nptl: fix potential merge of __rseq_* relro symbols - riscv: Update nofpu libm test ulps - manual: Recommendations for dynamic linker hardening - socket: Add new test for shutdown - elf/rtld: Fix auxiliary vector for enable_secure - hppa/vdso: Provide 64-bit clock_gettime() vDSO only - debug: Fix clang open fortify wrapper (BZ 31927) - Add --disable-static-c++-tests option [BZ #31797] - Add --disable-static-c++-link-check option [BZ #31412] - Update mmap() flags and errors lists - MIPSr6/math: Use builtin fma and fmaf - elf: Support recursive use of dynamic TLS in interposed malloc - Fix conditionals on mtrace-based tests (bug 31892) - signal/Makefile: Split and sort tests - x86: Set default non_temporal_threshold for Zhaoxin processors - x86_64: Optimize large size copy in memmove-ssse3 - x86: Set preferred CPU features on the KH-40000 and KX-7000 Zhaoxin processors - Aarch64: Add new memset for Qualcomm's oryon-1 core - Aarch64: Add memcpy for qualcomm's oryon-1 core - debug: Fix clang open fortify wrapper (BZ 31927) - debug: Fix clang mq_open fortify wrapper (BZ 31917) - tests-mbwc: Silence gcc 14 -Werror=format-overflow= --- glibc.spec | 30 ++++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index a26ab7e..9993fe2 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-373-g21738846a1 +%global glibcsrcdir glibc-2.39.9000-395-g2b92982e23 %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -170,7 +170,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 29 +%global baserelease 30 Release: %{baserelease}%{?dist} # Licenses: @@ -2561,6 +2561,32 @@ update_gconv_modules_cache () %endif %changelog +* Thu Jul 04 2024 Arjun Shankar - 2.39.9000-30 +- Auto-sync with upstream branch master, + commit 2b92982e2369d292560793bee8e730f695f48ff3: +- nptl: fix potential merge of __rseq_* relro symbols +- riscv: Update nofpu libm test ulps +- manual: Recommendations for dynamic linker hardening +- socket: Add new test for shutdown +- elf/rtld: Fix auxiliary vector for enable_secure +- hppa/vdso: Provide 64-bit clock_gettime() vDSO only +- debug: Fix clang open fortify wrapper (BZ 31927) +- Add --disable-static-c++-tests option [BZ #31797] +- Add --disable-static-c++-link-check option [BZ #31412] +- Update mmap() flags and errors lists +- MIPSr6/math: Use builtin fma and fmaf +- elf: Support recursive use of dynamic TLS in interposed malloc +- Fix conditionals on mtrace-based tests (bug 31892) +- signal/Makefile: Split and sort tests +- x86: Set default non_temporal_threshold for Zhaoxin processors +- x86_64: Optimize large size copy in memmove-ssse3 +- x86: Set preferred CPU features on the KH-40000 and KX-7000 Zhaoxin processors +- Aarch64: Add new memset for Qualcomm's oryon-1 core +- Aarch64: Add memcpy for qualcomm's oryon-1 core +- debug: Fix clang open fortify wrapper (BZ 31927) +- debug: Fix clang mq_open fortify wrapper (BZ 31917) +- tests-mbwc: Silence gcc 14 -Werror=format-overflow= + * Thu Jun 27 2024 Patsy Griffin - 2.39.9000-29 - Move ANSI_X3.110-1983 support from main package to glibc-gconv-extra. diff --git a/sources b/sources index 9ef70a0..f9d242a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-373-g21738846a1.tar.xz) = 4f7f6866d3341951e015d76ab33b79d3c0bb00fc6e63c01f5acd6372179de9d088e894a62158c69658694c37b7fe98cd77f6c03754acee7803e48020c278b218 +SHA512 (glibc-2.39.9000-395-g2b92982e23.tar.xz) = 1e120829c96e3fce2c3d0a5267c7ce6c569e9ffa5bdedf7546f6d3fb91da055e439a800ad5b4e6924a328536066f58ae7efe0f1996cc335a4b6feb2f77a54631 From 6756999ced04c544708632a1003e8b405fb94047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 9 Apr 2024 17:32:50 +0200 Subject: [PATCH 062/106] Move ldconfig to %{_sbindir}, adjust paths for merged-sbin This implements https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin and https://pagure.io/packaging-committee/pull-request/1355. Since %{_sbindir} will point to /usr/bin, ldconfig is moved first to /usr/sbin, but then when the merge is implemented, to /usr/bin. Adjust the handling of zic and iconvconfig. Previously, they were sorted into the right subpackage based on the location, but now all files are in /usr/bin, so that doesn't work anymore. Before the merge, /sbin/ldconfig and /usr/sbin/ldconfig point to the same file, so both paths work. Virtual Provides:/sbin/ldconfig allows other rpms to refer to either path. After sbin-merge, the /usr/sbin/ symlink needs to be created by filesystem, so add the appropriate Requires. --- glibc.spec | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/glibc.spec b/glibc.spec index 9993fe2..20e18ed 100644 --- a/glibc.spec +++ b/glibc.spec @@ -134,10 +134,9 @@ function post_exec (msg, program, ...) end end --- Note: We use _prefix because Fedora's UsrMove says so. function call_ldconfig () - post_exec("Error: call to %{_prefix}/sbin/ldconfig failed.\n", - "%{_prefix}/sbin/ldconfig") + post_exec("Error: call to ldconfig failed.\n", + "ldconfig") end function update_gconv_modules_cache () @@ -170,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 30 +%global baserelease 31 Release: %{baserelease}%{?dist} # Licenses: @@ -336,6 +335,10 @@ Patch23: glibc-python3.patch Obsoletes: glibc-profile < 2.4 Obsoletes: nscd < 2.35 Provides: ldconfig +%if "%{_sbindir}" == "%{_bindir}" +# We rely on filesystem to create the compat symlinks for us +Requires: filesystem(unmerged-sbin-symlinks) +%endif Provides: /sbin/ldconfig Provides: /usr/sbin/ldconfig @@ -584,6 +587,11 @@ Summary: Common binaries and locale data for glibc Requires: %{name} = %{version}-%{release} Recommends: tzdata >= 2003a +%if "%{_sbindir}" == "%{_bindir}" +# We rely on filesystem to create the compat symlinks for us +Requires: filesystem(unmerged-sbin-symlinks) +%endif + %description common The glibc-common package includes common binaries for the GNU libc libraries, as well as national language (locale) support. @@ -1452,6 +1460,12 @@ popd # via hardlinks, so we must group them ourselves. hardlink -c %{glibc_sysroot}/usr/lib/locale +# Implement Changes/UsrMerge and Changes/Unify_bin_and_sbin. +mv %{glibc_sysroot}/sbin/ldconfig %{glibc_sysroot}/%{_sbindir}/ +%if "%{_sbindir}" == "%{_bindir}" +mv %{glibc_sysroot}/usr/sbin/{iconvconfig,zic} %{glibc_sysroot}/%{_bindir}/ +%endif + # install_different: # Install all core libraries into DESTDIR/SUBDIR. Either the file is # installed as a copy or a symlink to the default install (if it is the @@ -1534,7 +1548,7 @@ mkdir -p %{glibc_sysroot}/var/cache/ldconfig truncate -s 0 %{glibc_sysroot}/var/cache/ldconfig/aux-cache # ldconfig is statically linked, so we can use the new version. -%{glibc_sysroot}/sbin/ldconfig -N -r %{glibc_sysroot} +%{glibc_sysroot}/%{_sbindir}/ldconfig -N -r %{glibc_sysroot} ############################################################################## # Install info files @@ -1895,10 +1909,7 @@ chmod 0444 master.filelist # - The info files '%{_infodir}/dir' # - The partial (lib*_p.a) static libraries, include files. # - The static files, objects, and unversioned DSOs. -# - The bin, locale, some sbin, and share. -# - We want iconvconfig in the main package and we do this by using -# a double negation of -v and [^i] so it removes all files in -# sbin *but* iconvconfig. +# - Share and ldconfig and iconvconfig # - All the libnss files (we add back the ones we want later). # - libc_malloc_debug.so, since it is a debugging library. # - All bench test binaries. @@ -1916,7 +1927,7 @@ cat master.filelist \ -e '%{_libdir}/gconv/gconv-modules.d/gconv-modules-extra\.conf$' \ -e '%{_prefix}/bin' \ -e '%{_prefix}/lib/locale' \ - -e '%{_prefix}/sbin/[^i]' \ + -e '%{_prefix}/sbin' \ -e '%{_prefix}/share' \ -e '/var/db/Makefile' \ -e '/libnss_.*\.so[0-9.]*$' \ @@ -1933,6 +1944,10 @@ cat master.filelist \ -e '/lib/.*\.so.*' \ %endif > glibc.filelist +cat master.filelist \ + | grep -E \ + -e 'bin/(ldconfig|iconvconfig)' \ + >> glibc.filelist # Add specific files: # - The nss_files, nss_compat, and nss_db files. @@ -2094,11 +2109,9 @@ grep '%{_libdir}/lib.*\.a' < master.filelist \ # iconvconfig which needs to go in glibc. The iconvconfig binary is kept in # the main glibc package because we use it in the post-install scriptlet to # rebuild the gconv-modules.cache. The makedb binary is in nss_db. -grep '%{_prefix}/bin' master.filelist \ - | grep -v '%{_prefix}/bin/makedb' \ +grep -E '%{_prefix}/s?bin' master.filelist \ + | grep -vE 'bin/(makedb|iconvconfig|ldconfig|memusage|mtrace|pcprofiledump|xtrace)' \ >> common.filelist -grep '%{_prefix}/sbin' master.filelist \ - | grep -v '%{_prefix}/sbin/iconvconfig' >> common.filelist # All of the files under share go into the common package since they should be # multilib-independent. # Exceptions: @@ -2561,6 +2574,10 @@ update_gconv_modules_cache () %endif %changelog +* Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek - 2.39.9000-31 +- Rebuilt for the bin-sbin merge +- ldconfig is moved to /usr/bin and paths are adjusted for merged-sbin + * Thu Jul 04 2024 Arjun Shankar - 2.39.9000-30 - Auto-sync with upstream branch master, commit 2b92982e2369d292560793bee8e730f695f48ff3: From 2dfb5f35bdf5e6455c3fd05db98dc759523505a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 9 Apr 2024 21:46:44 +0200 Subject: [PATCH 063/106] Make short-circuit builds work The build would fail because the target already exists. Use "-f" to make it work. This is useful because glibc takes a while to build ;) --- glibc.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 20e18ed..fa1f5dc 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1677,10 +1677,10 @@ cp benchtests/scripts/validate_benchout.py %{glibc_sysroot}%{_prefix}/libexec/gl # The #line directives gperf generates do not give the proper # file name relative to the build directory. pushd locale -ln -s programs/*.gperf . +ln -sf programs/*.gperf . popd pushd iconv -ln -s ../locale/programs/charmap-kw.gperf . +ln -sf ../locale/programs/charmap-kw.gperf . popd %if %{with docs} @@ -1765,7 +1765,7 @@ for lib in lib lib64; do exit 1 fi set -x - ln -s $sltarget usr/$lib/$slbase + ln -sf $sltarget usr/$lib/$slbase done fi done From 04dd5dc6671eef8249c6991a09e3e9f63b369762 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 10 Jul 2024 14:13:57 +0200 Subject: [PATCH 064/106] Auto-sync with upstream branch master Upstream commit: 2e456ccf0c34a056e3ccafac4a0c7effef14d918 - Linux: Make __rseq_size useful for feature detection (bug 31965) - po: incorporate translations (bg) - manual: add syscalls - libio: handle opening a file when all files are closed (bug 31963) - ldconfig: Ignore all GDB extension files - ldconfig: Move endswithn into a new header file - math: Update m68k ULPs - stdlib: fix arc4random fallback to /dev/urandom (BZ 31612) - elf: Make dl-rseq-symbols Linux only --- glibc.spec | 17 +++++++++++++++-- sources | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index fa1f5dc..eecf4a0 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-395-g2b92982e23 +%global glibcsrcdir glibc-2.39.9000-404-g2e456ccf0c %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 31 +%global baserelease 32 Release: %{baserelease}%{?dist} # Licenses: @@ -2574,6 +2574,19 @@ update_gconv_modules_cache () %endif %changelog +* Wed Jul 10 2024 Florian Weimer - 2.39.9000-32 +- Auto-sync with upstream branch master, + commit 2e456ccf0c34a056e3ccafac4a0c7effef14d918: +- Linux: Make __rseq_size useful for feature detection (bug 31965) +- po: incorporate translations (bg) +- manual: add syscalls +- libio: handle opening a file when all files are closed (bug 31963) +- ldconfig: Ignore all GDB extension files +- ldconfig: Move endswithn into a new header file +- math: Update m68k ULPs +- stdlib: fix arc4random fallback to /dev/urandom (BZ 31612) +- elf: Make dl-rseq-symbols Linux only + * Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek - 2.39.9000-31 - Rebuilt for the bin-sbin merge - ldconfig is moved to /usr/bin and paths are adjusted for merged-sbin diff --git a/sources b/sources index f9d242a..2ff48c6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-395-g2b92982e23.tar.xz) = 1e120829c96e3fce2c3d0a5267c7ce6c569e9ffa5bdedf7546f6d3fb91da055e439a800ad5b4e6924a328536066f58ae7efe0f1996cc335a4b6feb2f77a54631 +SHA512 (glibc-2.39.9000-404-g2e456ccf0c.tar.xz) = f0b00c30ab89c1e04642f1f2c680740f58c8e8e1ce602374eb16c7979574c84446ea74b11f234b049bd9b1c10cf8b8e269e7ba066af5c3751f1b2c4210538c03 From a6d2abe7025f504bb0c736a3be93bd895b71833a Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Mon, 8 Jul 2024 09:37:06 +0200 Subject: [PATCH 065/106] CI Tests: Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value: removes outdated glibc-debuginfo-common dependency --- .../main.fmf | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/main.fmf b/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/main.fmf index c3601ae..109de26 100644 --- a/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/main.fmf +++ b/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/main.fmf @@ -14,7 +14,6 @@ framework: beakerlib recommend: - glibc-devel - glibc-debuginfo - - glibc-debuginfo-common - gdb - gcc duration: 30m From aaf67f6194d34e7fc217ee79102af73be7e4a938 Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Mon, 8 Jul 2024 09:37:59 +0200 Subject: [PATCH 066/106] CI Tests: Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index: removes outdated glibc-debuginfo-common dependency --- .../bz1612448-glibc-debuginfo-does-not-have-gdb-index/main.fmf | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index/main.fmf b/tests/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index/main.fmf index 0171c47..0ab0bc1 100644 --- a/tests/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index/main.fmf +++ b/tests/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index/main.fmf @@ -12,7 +12,6 @@ framework: beakerlib recommend: - glibc - glibc-debuginfo - - glibc-debuginfo-common - glibc-common-debuginfo - binutils duration: 20m From 2d6435632852db56abba7de35ae8dfc02a3f99fd Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Mon, 8 Jul 2024 09:37:06 +0200 Subject: [PATCH 067/106] CI Tests: Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value: removes outdated glibc-debuginfo-common dependency --- .../Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/Makefile b/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/Makefile index 7006044..8b4b02f 100644 --- a/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/Makefile +++ b/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/Makefile @@ -53,7 +53,7 @@ $(METADATA): Makefile @echo "Type: Regression" >> $(METADATA) @echo "TestTime: 30m" >> $(METADATA) @echo "RunFor: glibc" >> $(METADATA) - @echo "Requires: glibc-devel glibc-debuginfo glibc-debuginfo-common gdb" >> $(METADATA) + @echo "Requires: glibc-devel glibc-debuginfo gdb" >> $(METADATA) @echo "Priority: Normal" >> $(METADATA) @echo "License: GPLv2+" >> $(METADATA) @echo "Confidential: no" >> $(METADATA) From 2112d490892cffb1c10a9588ebda6fc0bb161786 Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Mon, 8 Jul 2024 09:37:59 +0200 Subject: [PATCH 068/106] CI Tests: Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index: removes outdated glibc-debuginfo-common dependency --- .../bz1612448-glibc-debuginfo-does-not-have-gdb-index/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index/Makefile b/tests/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index/Makefile index 3bb1315..53389c1 100644 --- a/tests/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index/Makefile +++ b/tests/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index/Makefile @@ -53,7 +53,7 @@ $(METADATA): Makefile @echo "Type: Regression" >> $(METADATA) @echo "TestTime: 20m" >> $(METADATA) @echo "RunFor: glibc" >> $(METADATA) - @echo "Requires: glibc glibc-debuginfo glibc-debuginfo-common glibc-common-debuginfo binutils" >> $(METADATA) + @echo "Requires: glibc glibc-debuginfo glibc-common-debuginfo binutils" >> $(METADATA) @echo "Priority: Normal" >> $(METADATA) @echo "License: GPLv2+" >> $(METADATA) @echo "Confidential: no" >> $(METADATA) From c6d9960c4a3c4f19b05bf96343fecc0e14d6f80b Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Tue, 9 Jul 2024 13:08:06 +0200 Subject: [PATCH 069/106] CI Tests: Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value: use require instead of recommend --- .../main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/main.fmf b/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/main.fmf index 109de26..acc4ebd 100644 --- a/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/main.fmf +++ b/tests/Regression/bz1563046-getlogin-r-return-early-when-linux-sentinel-value/main.fmf @@ -11,7 +11,7 @@ component: - glibc test: ./runtest.sh framework: beakerlib -recommend: +require: - glibc-devel - glibc-debuginfo - gdb From ecb359903b6c143287ca3d8fdd48e85d1c76141c Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Tue, 9 Jul 2024 13:08:40 +0200 Subject: [PATCH 070/106] CI Tests: Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index: use require instead of recommend --- .../bz1612448-glibc-debuginfo-does-not-have-gdb-index/main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index/main.fmf b/tests/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index/main.fmf index 0ab0bc1..fbaa011 100644 --- a/tests/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index/main.fmf +++ b/tests/Regression/bz1612448-glibc-debuginfo-does-not-have-gdb-index/main.fmf @@ -9,7 +9,7 @@ component: - glibc test: ./runtest.sh framework: beakerlib -recommend: +require: - glibc - glibc-debuginfo - glibc-common-debuginfo From 6544ca10164d570a238d482fd4f1f70549729fd0 Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Wed, 10 Jul 2024 13:51:32 +0200 Subject: [PATCH 071/106] CI Tests: Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc: adds support for latest distros --- .../runtest.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/runtest.sh b/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/runtest.sh index 23438b7..cfc5a1a 100755 --- a/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/runtest.sh +++ b/tests/Regression/bz1430477-glibc-Missing-else-branch-in-libc-calloc/runtest.sh @@ -54,9 +54,6 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest "Building glibc" - if rlIsRHEL 7; then - rlRun -c "sed -i '/#\ Ensure\ timestamps/i \\touch intl/plural.c' $SPECDIR/glibc.spec" - fi rlRun "rpmbuild -bc ${SPECDIR}/${PACKAGE}.spec &> glibc_build_log.txt" 0 "Unpacking $PACKAGE" ISSUCCESS=$? if [ $ISSUCCESS -ne 0 ] @@ -65,7 +62,13 @@ rlJournalStart rlFail "Glibc compilation error" fi - BUILDS="$BUILDDIR/glibc*/build*" + if rlIsRHEL "==10"; then + BUILDS="$BUILDDIR/glibc-2.39/build*" + elif rlIsFedora ">=41"; then + BUILDS="$BUILDDIR/glibc*build/glibc*/build*" + else + BUILDS="$BUILDDIR/glibc*/build*" + fi rlLog "Found builds at:" for build in $BUILDS; do rlLog "$build" From 8f78a55fb6a0dcf4803e4f354ea85ebcad192974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 13 Jul 2024 13:02:45 +0200 Subject: [PATCH 072/106] Rebuilt for the bin-sbin merge (again) https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin --- glibc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index eecf4a0..cb0ea7b 100644 --- a/glibc.spec +++ b/glibc.spec @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 32 +%global baserelease 33 Release: %{baserelease}%{?dist} # Licenses: @@ -2574,6 +2574,9 @@ update_gconv_modules_cache () %endif %changelog +* Sat Jul 13 2024 Zbigniew Jędrzejewski-Szmek - 2.39.9000-33 +- Rebuilt for the bin-sbin merge (again) + * Wed Jul 10 2024 Florian Weimer - 2.39.9000-32 - Auto-sync with upstream branch master, commit 2e456ccf0c34a056e3ccafac4a0c7effef14d918: From a9efe40115eed299f10636a5231d391e154a6765 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 15 Jul 2024 21:57:47 -0400 Subject: [PATCH 073/106] Auto-sync with upstream branch master Upstream commit: a11e15ea0ab1ee8a1947b6be52beca53693f0991 - math: Update alpha ulps - hurd: Fix restoring message to be retried - nptl: Convert tst-sem11 and tst-sem12 tests to use the test driver - nptl: Add copyright notice tst-sem11 and tst-sem12 tests - tests: XFAIL audit tests failing on all mips configurations, bug 29404 - time/Makefile: Split and sort tests - s390x: Fix segfault in wcsncmp [BZ #31934] --- glibc.spec | 15 +++++++++++++-- sources | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index cb0ea7b..b26bb57 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.39.9000-404-g2e456ccf0c +%global glibcsrcdir glibc-2.39.9000-411-ga11e15ea0a %global glibcversion 2.39.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 33 +%global baserelease 34 Release: %{baserelease}%{?dist} # Licenses: @@ -2574,6 +2574,17 @@ update_gconv_modules_cache () %endif %changelog +* Mon Jul 15 2024 DJ Delorie - 2.39.9000-34 +- Auto-sync with upstream branch master, + commit a11e15ea0ab1ee8a1947b6be52beca53693f0991. +- math: Update alpha ulps +- hurd: Fix restoring message to be retried +- nptl: Convert tst-sem11 and tst-sem12 tests to use the test driver +- nptl: Add copyright notice tst-sem11 and tst-sem12 tests +- tests: XFAIL audit tests failing on all mips configurations, bug 29404 +- time/Makefile: Split and sort tests +- s390x: Fix segfault in wcsncmp [BZ #31934] + * Sat Jul 13 2024 Zbigniew Jędrzejewski-Szmek - 2.39.9000-33 - Rebuilt for the bin-sbin merge (again) diff --git a/sources b/sources index 2ff48c6..601829c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-404-g2e456ccf0c.tar.xz) = f0b00c30ab89c1e04642f1f2c680740f58c8e8e1ce602374eb16c7979574c84446ea74b11f234b049bd9b1c10cf8b8e269e7ba066af5c3751f1b2c4210538c03 +SHA512 (glibc-2.39.9000-411-ga11e15ea0a.tar.xz) = aa7043f64d00106490280a92c5834fc946a1d679c38bfa03bb883e599b04a95b1c43b534d33fe2e563c1ad8433cf1723a80700181feeaf7170e45bc0e12a76cb From c9bf6af6067391f6fb5027b2e8a9a0ee51d3064e Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Thu, 18 Jul 2024 14:32:52 +0200 Subject: [PATCH 074/106] ppc64le: Build early startup code with -mcpu=power8 The --with-rtld-early-cflags configure option was being passed for ppc64 builds instead of for ppc64le. This commit fixes that. --- glibc.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/glibc.spec b/glibc.spec index b26bb57..fb84a86 100644 --- a/glibc.spec +++ b/glibc.spec @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 34 +%global baserelease 35 Release: %{baserelease}%{?dist} # Licenses: @@ -253,10 +253,10 @@ Source12: ChangeLog.old %endif %ifarch ppc64 %global glibc_ldso /lib64/ld64.so.1 -%define glibc_rtld_early_cflags -mcpu=power8 %endif %ifarch ppc64le %global glibc_ldso /lib64/ld64.so.2 +%define glibc_rtld_early_cflags -mcpu=power8 %endif %ifarch riscv64 %global glibc_ldso /lib/ld-linux-riscv64-lp64d.so.1 @@ -2574,6 +2574,9 @@ update_gconv_modules_cache () %endif %changelog +* Thu Jul 18 2024 Arjun Shankar - 2.39.9000-35 +- ppc64le: Build early startup code with -mcpu=power8 + * Mon Jul 15 2024 DJ Delorie - 2.39.9000-34 - Auto-sync with upstream branch master, commit a11e15ea0ab1ee8a1947b6be52beca53693f0991. From 82b4bc76c0ad7700c0798d6ba85926b9a6692137 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 26 Jul 2024 09:48:10 +0200 Subject: [PATCH 075/106] Auto-sync with upstream branch release/2.40/master Upstream commit: 145b5886379c8de4f0a1bca3556a4c3d7b6c24b2 - manual: Do not mention STATIC_TLS in dynamic linker hardening recommendations - resolv: Do not wait for non-existing second DNS response after error (bug 30081) - resolv: Allow short error responses to match any query (bug 31890) - Increase version number to 2.40 - libc.pot: regenerate (only line number changes) - x86: Disable non-temporal memset on Skylake Server --- glibc.spec | 17 ++++++++++++++--- sources | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/glibc.spec b/glibc.spec index fb84a86..ef03af8 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,5 +1,5 @@ -%global glibcsrcdir glibc-2.39.9000-411-ga11e15ea0a -%global glibcversion 2.39.9000 +%global glibcsrcdir glibc-2.40-5-g145b588637 +%global glibcversion 2.40 # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 35 +%global baserelease 1 Release: %{baserelease}%{?dist} # Licenses: @@ -2574,6 +2574,17 @@ update_gconv_modules_cache () %endif %changelog +* Fri Jul 26 2024 Florian Weimer - 2.40-1 +- Switch to upstream 2.40 release branch +- Auto-sync with upstream branch release/2.40/master, + commit 145b5886379c8de4f0a1bca3556a4c3d7b6c24b2: +- manual: Do not mention STATIC_TLS in dynamic linker hardening recommendations +- resolv: Do not wait for non-existing second DNS response after error (bug 30081) +- resolv: Allow short error responses to match any query (bug 31890) +- Increase version number to 2.40 +- libc.pot: regenerate (only line number changes) +- x86: Disable non-temporal memset on Skylake Server + * Thu Jul 18 2024 Arjun Shankar - 2.39.9000-35 - ppc64le: Build early startup code with -mcpu=power8 diff --git a/sources b/sources index 601829c..f3bf2fc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.39.9000-411-ga11e15ea0a.tar.xz) = aa7043f64d00106490280a92c5834fc946a1d679c38bfa03bb883e599b04a95b1c43b534d33fe2e563c1ad8433cf1723a80700181feeaf7170e45bc0e12a76cb +SHA512 (glibc-2.40-5-g145b588637.tar.xz) = e83265cb511f102c6b8c6aafa347b538bec657914c16d44485b582c692c564f5118969b538d3ba0a68b3e4033fd2c984f2e1c304a53961f9ca678c5d0f938c1c From 03bf7e6cdf637e35df9d8eb74de2d35531e504d6 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 26 Jul 2024 14:00:09 +0200 Subject: [PATCH 076/106] Stub resolver configuration updates (RHEL-18039) - Support clearing options in /etc/resolv.conf, RES_OPTIONS with a - prefix - Introduce the strict-error/RES_STRICTERR stub resolver option --- RHEL-18039-1.patch | 79 ++++++++++++++++++ RHEL-18039-2.patch | 204 +++++++++++++++++++++++++++++++++++++++++++++ glibc.spec | 8 +- 3 files changed, 290 insertions(+), 1 deletion(-) create mode 100644 RHEL-18039-1.patch create mode 100644 RHEL-18039-2.patch diff --git a/RHEL-18039-1.patch b/RHEL-18039-1.patch new file mode 100644 index 0000000..549b26f --- /dev/null +++ b/RHEL-18039-1.patch @@ -0,0 +1,79 @@ +commit 95f61610f3e481d191b6184432342236fd59186d +Author: Florian Weimer +Date: Wed Jul 24 12:06:47 2024 +0200 + + resolv: Support clearing option flags with a “-” prefix (bug 14799) + + I think using a “-” prefix is less confusing than introducing + double-negation construct (“no-no-tld-query”). + + Reviewed-by: DJ Delorie + +diff --git a/resolv/res_init.c b/resolv/res_init.c +index 263263d474721545..243532b3ade338d8 100644 +--- a/resolv/res_init.c ++++ b/resolv/res_init.c +@@ -682,27 +682,29 @@ res_setoptions (struct resolv_conf_parser *parser, const char *options) + { + char str[22]; + uint8_t len; +- uint8_t clear; + unsigned long int flag; + } options[] = { + #define STRnLEN(str) str, sizeof (str) - 1 +- { STRnLEN ("rotate"), 0, RES_ROTATE }, +- { STRnLEN ("edns0"), 0, RES_USE_EDNS0 }, +- { STRnLEN ("single-request-reopen"), 0, RES_SNGLKUPREOP }, +- { STRnLEN ("single-request"), 0, RES_SNGLKUP }, +- { STRnLEN ("no_tld_query"), 0, RES_NOTLDQUERY }, +- { STRnLEN ("no-tld-query"), 0, RES_NOTLDQUERY }, +- { STRnLEN ("no-reload"), 0, RES_NORELOAD }, +- { STRnLEN ("use-vc"), 0, RES_USEVC }, +- { STRnLEN ("trust-ad"), 0, RES_TRUSTAD }, +- { STRnLEN ("no-aaaa"), 0, RES_NOAAAA }, ++ { STRnLEN ("rotate"), RES_ROTATE }, ++ { STRnLEN ("edns0"), RES_USE_EDNS0 }, ++ { STRnLEN ("single-request-reopen"), RES_SNGLKUPREOP }, ++ { STRnLEN ("single-request"), RES_SNGLKUP }, ++ { STRnLEN ("no_tld_query"), RES_NOTLDQUERY }, ++ { STRnLEN ("no-tld-query"), RES_NOTLDQUERY }, ++ { STRnLEN ("no-reload"), RES_NORELOAD }, ++ { STRnLEN ("use-vc"), RES_USEVC }, ++ { STRnLEN ("trust-ad"), RES_TRUSTAD }, ++ { STRnLEN ("no-aaaa"), RES_NOAAAA }, + }; + #define noptions (sizeof (options) / sizeof (options[0])) ++ bool negate_option = *cp == '-'; ++ if (negate_option) ++ ++cp; + for (int i = 0; i < noptions; ++i) + if (strncmp (cp, options[i].str, options[i].len) == 0) + { +- if (options[i].clear) +- parser->template.options &= options[i].flag; ++ if (negate_option) ++ parser->template.options &= ~options[i].flag; + else + parser->template.options |= options[i].flag; + break; +diff --git a/resolv/tst-resolv-res_init-skeleton.c b/resolv/tst-resolv-res_init-skeleton.c +index 6bef62cde2cbf8cd..d3a19eb305d41467 100644 +--- a/resolv/tst-resolv-res_init-skeleton.c ++++ b/resolv/tst-resolv-res_init-skeleton.c +@@ -679,6 +679,16 @@ struct test_case test_cases[] = + "; nameserver[0]: [192.0.2.1]:53\n", + .res_options = "attempts:5 ndots:3 edns0 ", + }, ++ {.name = "RES_OPTIONS can clear flags", ++ .conf = "options ndots:2 use-vc no-aaaa edns0\n" ++ "nameserver 192.0.2.1\n", ++ .expected = "options ndots:3 use-vc\n" ++ "search example.com\n" ++ "; search[0]: example.com\n" ++ "nameserver 192.0.2.1\n" ++ "; nameserver[0]: [192.0.2.1]:53\n", ++ .res_options = "ndots:3 -edns0 -no-aaaa", ++ }, + {.name = "many search list entries (bug 19569)", + .conf = "nameserver 192.0.2.1\n" + "search corp.example.com support.example.com" diff --git a/RHEL-18039-2.patch b/RHEL-18039-2.patch new file mode 100644 index 0000000..9834166 --- /dev/null +++ b/RHEL-18039-2.patch @@ -0,0 +1,204 @@ +commit 765325951ac5c7d072278c9424930b29657e9758 +Author: Florian Weimer +Date: Wed Jul 24 12:06:47 2024 +0200 + + resolv: Implement strict-error stub resolver option (bug 27929) + + For now, do not enable this mode by default due to the potential + impact on compatibility with existing deployments. + + Reviewed-by: DJ Delorie + +diff --git a/resolv/res_init.c b/resolv/res_init.c +index 243532b3ade338d8..b838dc70642e1935 100644 +--- a/resolv/res_init.c ++++ b/resolv/res_init.c +@@ -695,6 +695,7 @@ res_setoptions (struct resolv_conf_parser *parser, const char *options) + { STRnLEN ("use-vc"), RES_USEVC }, + { STRnLEN ("trust-ad"), RES_TRUSTAD }, + { STRnLEN ("no-aaaa"), RES_NOAAAA }, ++ { STRnLEN ("strict-error"), RES_STRICTERR }, + }; + #define noptions (sizeof (options) / sizeof (options[0])) + bool negate_option = *cp == '-'; +diff --git a/resolv/res_send.c b/resolv/res_send.c +index 9c77613f374e5469..9a284ed44aa8cc2e 100644 +--- a/resolv/res_send.c ++++ b/resolv/res_send.c +@@ -1234,21 +1234,38 @@ send_dg(res_state statp, + + if (thisansp_error) { + next_ns: +- if (recvresp1 || (buf2 != NULL && recvresp2)) { +- *resplen2 = 0; +- return resplen; +- } +- if (buf2 != NULL && !single_request) ++ /* Outside of strict-error mode, use the first ++ response even if the second response is an ++ error. This allows parallel resolution to ++ succeed even if the recursive resolver ++ always answers with SERVFAIL for AAAA ++ queries (which still happens in practice ++ unfortunately). ++ ++ In strict-error mode, always switch to the ++ next server and try to get a response from ++ there. */ ++ if ((statp->options & RES_STRICTERR) == 0) + { +- /* No data from the first reply. */ +- resplen = 0; +- /* We are waiting for a possible second reply. */ +- if (matching_query == 1) +- recvresp1 = 1; +- else +- recvresp2 = 1; +- +- goto wait; ++ if (recvresp1 || (buf2 != NULL && recvresp2)) ++ { ++ *resplen2 = 0; ++ return resplen; ++ } ++ ++ if (buf2 != NULL && !single_request) ++ { ++ /* No data from the first reply. */ ++ resplen = 0; ++ /* We are waiting for a possible ++ second reply. */ ++ if (matching_query == 1) ++ recvresp1 = 1; ++ else ++ recvresp2 = 1; ++ ++ goto wait; ++ } + } + + /* don't retry if called from dig */ +diff --git a/resolv/resolv.h b/resolv/resolv.h +index f40d6c58cee0f585..b8a0f66a5fd50e22 100644 +--- a/resolv/resolv.h ++++ b/resolv/resolv.h +@@ -133,6 +133,7 @@ struct res_sym { + #define RES_NORELOAD 0x02000000 /* No automatic configuration reload. */ + #define RES_TRUSTAD 0x04000000 /* Request AD bit, keep it in responses. */ + #define RES_NOAAAA 0x08000000 /* Suppress AAAA queries. */ ++#define RES_STRICTERR 0x10000000 /* Report more DNS errors as errors. */ + + #define RES_DEFAULT (RES_RECURSE|RES_DEFNAMES|RES_DNSRCH) + +diff --git a/resolv/tst-resolv-res_init-skeleton.c b/resolv/tst-resolv-res_init-skeleton.c +index d3a19eb305d41467..e41bcebd9d9a8024 100644 +--- a/resolv/tst-resolv-res_init-skeleton.c ++++ b/resolv/tst-resolv-res_init-skeleton.c +@@ -129,6 +129,7 @@ print_resp (FILE *fp, res_state resp) + print_option_flag (fp, &options, RES_NORELOAD, "no-reload"); + print_option_flag (fp, &options, RES_TRUSTAD, "trust-ad"); + print_option_flag (fp, &options, RES_NOAAAA, "no-aaaa"); ++ print_option_flag (fp, &options, RES_STRICTERR, "strict-error"); + fputc ('\n', fp); + if (options != 0) + fprintf (fp, "; error: unresolved option bits: 0x%x\n", options); +@@ -741,6 +742,15 @@ struct test_case test_cases[] = + "nameserver 192.0.2.1\n" + "; nameserver[0]: [192.0.2.1]:53\n" + }, ++ {.name = "strict-error flag", ++ .conf = "options strict-error\n" ++ "nameserver 192.0.2.1\n", ++ .expected = "options strict-error\n" ++ "search example.com\n" ++ "; search[0]: example.com\n" ++ "nameserver 192.0.2.1\n" ++ "; nameserver[0]: [192.0.2.1]:53\n" ++ }, + { NULL } + }; + +diff --git a/resolv/tst-resolv-semi-failure.c b/resolv/tst-resolv-semi-failure.c +index aa9798b5a7dfaa88..b7681210f450bb5a 100644 +--- a/resolv/tst-resolv-semi-failure.c ++++ b/resolv/tst-resolv-semi-failure.c +@@ -67,6 +67,9 @@ response (const struct resolv_response_context *ctx, + resolv_response_close_record (b); + } + ++/* Set to 1 if strict error checking is enabled. */ ++static int do_strict_error; ++ + static void + check_one (void) + { +@@ -83,7 +86,10 @@ check_one (void) + struct addrinfo *ai; + int ret = getaddrinfo ("www.example", "80", &hints, &ai); + const char *expected; +- if (ret == 0 && ai->ai_next != NULL) ++ /* In strict-error mode, a switch to the second name server ++ happens, and both responses are received, so a single ++ response is a bug. */ ++ if (do_strict_error || (ret == 0 && ai->ai_next != NULL)) + expected = ("address: STREAM/TCP 192.0.2.17 80\n" + "address: STREAM/TCP 2001:db8::1 80\n"); + else +@@ -99,33 +105,36 @@ check_one (void) + static int + do_test (void) + { +- for (int do_single_lookup = 0; do_single_lookup < 2; ++do_single_lookup) +- { +- struct resolv_test *aux = resolv_test_start +- ((struct resolv_redirect_config) +- { +- .response_callback = response, +- }); ++ for (do_strict_error = 0; do_strict_error < 2; ++do_strict_error) ++ for (int do_single_lookup = 0; do_single_lookup < 2; ++do_single_lookup) ++ { ++ struct resolv_test *aux = resolv_test_start ++ ((struct resolv_redirect_config) ++ { ++ .response_callback = response, ++ }); + +- if (do_single_lookup) +- _res.options |= RES_SNGLKUP; ++ if (do_strict_error) ++ _res.options |= RES_STRICTERR; ++ if (do_single_lookup) ++ _res.options |= RES_SNGLKUP; + +- for (int do_fail_aaaa = 0; do_fail_aaaa < 2; ++do_fail_aaaa) +- { +- fail_aaaa = do_fail_aaaa; ++ for (int do_fail_aaaa = 0; do_fail_aaaa < 2; ++do_fail_aaaa) ++ { ++ fail_aaaa = do_fail_aaaa; + +- rcode = 2; /* SERVFAIL. */ +- check_one (); ++ rcode = 2; /* SERVFAIL. */ ++ check_one (); + +- rcode = 4; /* NOTIMP. */ +- check_one (); ++ rcode = 4; /* NOTIMP. */ ++ check_one (); + +- rcode = 5; /* REFUSED. */ +- check_one (); +- } ++ rcode = 5; /* REFUSED. */ ++ check_one (); ++ } + +- resolv_test_end (aux); +- } ++ resolv_test_end (aux); ++ } + + return 0; + } diff --git a/glibc.spec b/glibc.spec index ef03af8..dd3f154 100644 --- a/glibc.spec +++ b/glibc.spec @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 1 +%global baserelease 2 Release: %{baserelease}%{?dist} # Licenses: @@ -328,6 +328,8 @@ Patch8: glibc-fedora-manual-dircategory.patch Patch13: glibc-fedora-localedata-rh61908.patch Patch17: glibc-cs-path.patch Patch23: glibc-python3.patch +Patch24: RHEL-18039-1.patch +Patch25: RHEL-18039-2.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2574,6 +2576,10 @@ update_gconv_modules_cache () %endif %changelog +* Fri Jul 26 2024 Florian Weimer - 2.40-2 +- Support clearing options in /etc/resolv.conf, RES_OPTIONS with a - prefix +- Introduce the strict-error/RES_STRICTERR stub resolver option + * Fri Jul 26 2024 Florian Weimer - 2.40-1 - Switch to upstream 2.40 release branch - Auto-sync with upstream branch release/2.40/master, From 59ad86c69bc9f4d26d6872038275b42ff5911c77 Mon Sep 17 00:00:00 2001 From: Patsy Griffin Date: Wed, 31 Jul 2024 13:17:16 -0400 Subject: [PATCH 077/106] Auto-sync with upstream branch release/2.40/master Upstream commit: 132a72f93cb4ad9f16b8469dc061de5f75f6a44e - manual: make setrlimit() description less ambiguous - manual/stdio: Clarify putc and putwc - malloc: add multi-threaded tests for aligned_alloc/calloc/malloc - malloc: avoid global locks in tst-aligned_alloc-lib.c --- glibc.spec | 12 ++++++++++-- sources | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index dd3f154..1482a2c 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.40-5-g145b588637 +%global glibcsrcdir glibc-2.40-9-g132a72f93c %global glibcversion 2.40 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 2 +%global baserelease 3 Release: %{baserelease}%{?dist} # Licenses: @@ -2576,6 +2576,14 @@ update_gconv_modules_cache () %endif %changelog +* Wed Jul 31 2024 Patsy Griffin - 2.40-3 +- Auto-sync with upstream branch release/2.40/master, + commit 132a72f93cb4ad9f16b8469dc061de5f75f6a44e. +- manual: make setrlimit() description less ambiguous +- manual/stdio: Clarify putc and putwc +- malloc: add multi-threaded tests for aligned_alloc/calloc/malloc +- malloc: avoid global locks in tst-aligned_alloc-lib.c + * Fri Jul 26 2024 Florian Weimer - 2.40-2 - Support clearing options in /etc/resolv.conf, RES_OPTIONS with a - prefix - Introduce the strict-error/RES_STRICTERR stub resolver option diff --git a/sources b/sources index f3bf2fc..a46c9c9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.40-5-g145b588637.tar.xz) = e83265cb511f102c6b8c6aafa347b538bec657914c16d44485b582c692c564f5118969b538d3ba0a68b3e4033fd2c984f2e1c304a53961f9ca678c5d0f938c1c +SHA512 (glibc-2.40-9-g132a72f93c.tar.xz) = f88ffb4ab47104640c88504ca2619cdca0795565173daf98a37d624333e14ab96699f662597fe51ba94a274c4cc7001bd2c8cc29fd5df012733298049e533bf4 From 76510cb6c3f15f1caaed941132c79e5a270e383a Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Sun, 4 Aug 2024 17:48:06 +0200 Subject: [PATCH 078/106] CI Tests: mark tests for tiers --- tests/Regression/bz434601-timedlock-segfault/main.fmf | 3 ++- .../bz529997-sem_timedwait-with-invalid-time/main.fmf | 1 + .../bz549813-dl-close-race-with-C-destructor/main.fmf | 1 + tests/Regression/bz585674-free-race-in-mcheck-hooks/main.fmf | 3 ++- .../main.fmf | 1 + .../main.fmf | 3 ++- .../main.fmf | 3 ++- .../main.fmf | 3 ++- .../main.fmf | 3 ++- .../main.fmf | 3 ++- .../bz789238-FJ6-2-Bug-malloc-deadlock-in-case-of/main.fmf | 4 ++-- .../main.fmf | 3 ++- .../main.fmf | 3 ++- .../main.fmf | 1 + tests/Regression/double_free_exploit/main.fmf | 3 ++- tests/Regression/fallocate_156289/main.fmf | 3 ++- .../main.fmf | 3 ++- 17 files changed, 30 insertions(+), 14 deletions(-) diff --git a/tests/Regression/bz434601-timedlock-segfault/main.fmf b/tests/Regression/bz434601-timedlock-segfault/main.fmf index c5f2a74..6f2d55b 100644 --- a/tests/Regression/bz434601-timedlock-segfault/main.fmf +++ b/tests/Regression/bz434601-timedlock-segfault/main.fmf @@ -13,8 +13,9 @@ contact: Petr Muller component: - glibc test: ./runtest.sh +tier: 2 framework: beakerlib -recommend: +require: - glibc - gcc tag: diff --git a/tests/Regression/bz529997-sem_timedwait-with-invalid-time/main.fmf b/tests/Regression/bz529997-sem_timedwait-with-invalid-time/main.fmf index 9cd0fec..32d87ae 100644 --- a/tests/Regression/bz529997-sem_timedwait-with-invalid-time/main.fmf +++ b/tests/Regression/bz529997-sem_timedwait-with-invalid-time/main.fmf @@ -149,6 +149,7 @@ contact: Petr Muller component: - glibc test: ./runtest.sh +tier: 2 framework: beakerlib require: - gcc diff --git a/tests/Regression/bz549813-dl-close-race-with-C-destructor/main.fmf b/tests/Regression/bz549813-dl-close-race-with-C-destructor/main.fmf index f786b6d..4c42793 100644 --- a/tests/Regression/bz549813-dl-close-race-with-C-destructor/main.fmf +++ b/tests/Regression/bz549813-dl-close-race-with-C-destructor/main.fmf @@ -92,6 +92,7 @@ contact: Petr Muller component: - glibc test: ./runtest.sh +tier: 2 framework: beakerlib require: - make diff --git a/tests/Regression/bz585674-free-race-in-mcheck-hooks/main.fmf b/tests/Regression/bz585674-free-race-in-mcheck-hooks/main.fmf index b0a168c..eecfcb5 100644 --- a/tests/Regression/bz585674-free-race-in-mcheck-hooks/main.fmf +++ b/tests/Regression/bz585674-free-race-in-mcheck-hooks/main.fmf @@ -50,8 +50,9 @@ contact: Petr Muller component: - glibc test: ./runtest.sh +tier: 1 framework: beakerlib -recommend: +require: - glibc - gcc - libgomp diff --git a/tests/Regression/bz600457-locally-defined-symbol-resolving-failure/main.fmf b/tests/Regression/bz600457-locally-defined-symbol-resolving-failure/main.fmf index beddb06..0bf0d00 100644 --- a/tests/Regression/bz600457-locally-defined-symbol-resolving-failure/main.fmf +++ b/tests/Regression/bz600457-locally-defined-symbol-resolving-failure/main.fmf @@ -127,6 +127,7 @@ contact: Petr Muller component: - glibc test: ./runtest.sh +tier: 1 framework: beakerlib require: - gcc diff --git a/tests/Regression/bz656530-sqrtl-returns-highly-incorrect-results-for-some/main.fmf b/tests/Regression/bz656530-sqrtl-returns-highly-incorrect-results-for-some/main.fmf index 662e657..bf6eb57 100644 --- a/tests/Regression/bz656530-sqrtl-returns-highly-incorrect-results-for-some/main.fmf +++ b/tests/Regression/bz656530-sqrtl-returns-highly-incorrect-results-for-some/main.fmf @@ -10,8 +10,9 @@ contact: Miroslav Franc component: - glibc test: ./runtest.sh +tier: 1 framework: beakerlib -recommend: +require: - glibc - gcc tag: diff --git a/tests/Regression/bz692177-sysconf-SC-CACHE-returns-0-for-all-caches-on/main.fmf b/tests/Regression/bz692177-sysconf-SC-CACHE-returns-0-for-all-caches-on/main.fmf index 5120de1..2bb020c 100644 --- a/tests/Regression/bz692177-sysconf-SC-CACHE-returns-0-for-all-caches-on/main.fmf +++ b/tests/Regression/bz692177-sysconf-SC-CACHE-returns-0-for-all-caches-on/main.fmf @@ -45,8 +45,9 @@ contact: Miroslav Franc component: - glibc test: ./runtest.sh +tier: 1 framework: beakerlib -recommend: +require: - glibc tag: - simple diff --git a/tests/Regression/bz711531-shared-robust-mutexes-fail-in-child-fork/main.fmf b/tests/Regression/bz711531-shared-robust-mutexes-fail-in-child-fork/main.fmf index 88f16cd..05c79f0 100644 --- a/tests/Regression/bz711531-shared-robust-mutexes-fail-in-child-fork/main.fmf +++ b/tests/Regression/bz711531-shared-robust-mutexes-fail-in-child-fork/main.fmf @@ -6,8 +6,9 @@ contact: Miroslav Franc component: - glibc test: ./runtest.sh +tier: 1 framework: beakerlib -recommend: +require: - glibc - gcc - glibc-devel diff --git a/tests/Regression/bz730379-libresolv-is-not-compiled-with-the-stack-protector/main.fmf b/tests/Regression/bz730379-libresolv-is-not-compiled-with-the-stack-protector/main.fmf index 299c175..083d34b 100644 --- a/tests/Regression/bz730379-libresolv-is-not-compiled-with-the-stack-protector/main.fmf +++ b/tests/Regression/bz730379-libresolv-is-not-compiled-with-the-stack-protector/main.fmf @@ -6,8 +6,9 @@ contact: Miroslav Franc component: - glibc test: ./runtest.sh +tier: 1 framework: beakerlib -recommend: +require: - glibc - binutils tag: diff --git a/tests/Regression/bz731042-pthread-create-dumps-core-when-it-fails-to-set/main.fmf b/tests/Regression/bz731042-pthread-create-dumps-core-when-it-fails-to-set/main.fmf index 6cfc0c7..63cf32e 100644 --- a/tests/Regression/bz731042-pthread-create-dumps-core-when-it-fails-to-set/main.fmf +++ b/tests/Regression/bz731042-pthread-create-dumps-core-when-it-fails-to-set/main.fmf @@ -6,8 +6,9 @@ contact: Miroslav Franc component: - glibc test: ./runtest.sh +tier: 1 framework: beakerlib -recommend: +require: - glibc - gcc tag: diff --git a/tests/Regression/bz789238-FJ6-2-Bug-malloc-deadlock-in-case-of/main.fmf b/tests/Regression/bz789238-FJ6-2-Bug-malloc-deadlock-in-case-of/main.fmf index 4768245..6c3a169 100644 --- a/tests/Regression/bz789238-FJ6-2-Bug-malloc-deadlock-in-case-of/main.fmf +++ b/tests/Regression/bz789238-FJ6-2-Bug-malloc-deadlock-in-case-of/main.fmf @@ -6,11 +6,11 @@ contact: Miroslav Franc component: - glibc test: ./runtest.sh +tier: 1 framework: beakerlib -recommend: +require: - glibc - glibc-devel - - glibc-headers - gcc - coreutils tag: diff --git a/tests/Regression/bz804689-getaddrinfo-localhost6-returns-127-0-0-1/main.fmf b/tests/Regression/bz804689-getaddrinfo-localhost6-returns-127-0-0-1/main.fmf index cc9f6b1..be5187e 100644 --- a/tests/Regression/bz804689-getaddrinfo-localhost6-returns-127-0-0-1/main.fmf +++ b/tests/Regression/bz804689-getaddrinfo-localhost6-returns-127-0-0-1/main.fmf @@ -6,8 +6,9 @@ contact: Miroslav Franc component: - glibc test: ./runtest.sh +tier: 1 framework: beakerlib -recommend: +require: - glibc - gcc tag: diff --git a/tests/Regression/bz819430-fnmatch-fails-when-wildcard-is-applied-on/main.fmf b/tests/Regression/bz819430-fnmatch-fails-when-wildcard-is-applied-on/main.fmf index fc4be7c..9776dc9 100644 --- a/tests/Regression/bz819430-fnmatch-fails-when-wildcard-is-applied-on/main.fmf +++ b/tests/Regression/bz819430-fnmatch-fails-when-wildcard-is-applied-on/main.fmf @@ -6,8 +6,9 @@ contact: Miroslav Franc component: - glibc test: ./runtest.sh +tier: 1 framework: beakerlib -recommend: +require: - glibc - gcc tag: diff --git a/tests/Regression/bz839572-Anaconda-traceback-when-installing-on-s390x/main.fmf b/tests/Regression/bz839572-Anaconda-traceback-when-installing-on-s390x/main.fmf index cf595ca..236b663 100644 --- a/tests/Regression/bz839572-Anaconda-traceback-when-installing-on-s390x/main.fmf +++ b/tests/Regression/bz839572-Anaconda-traceback-when-installing-on-s390x/main.fmf @@ -6,6 +6,7 @@ contact: Miroslav Franc component: - glibc test: ./runtest.sh +tier: 1 framework: beakerlib recommend: - glibc diff --git a/tests/Regression/double_free_exploit/main.fmf b/tests/Regression/double_free_exploit/main.fmf index 7261ef4..5bdac44 100644 --- a/tests/Regression/double_free_exploit/main.fmf +++ b/tests/Regression/double_free_exploit/main.fmf @@ -5,8 +5,9 @@ contact: Petr Muller component: - glibc test: ./runtest.sh +tier: 2 framework: beakerlib -recommend: +require: - glibc - glibc-devel - gcc diff --git a/tests/Regression/fallocate_156289/main.fmf b/tests/Regression/fallocate_156289/main.fmf index 5974203..6304313 100644 --- a/tests/Regression/fallocate_156289/main.fmf +++ b/tests/Regression/fallocate_156289/main.fmf @@ -5,8 +5,9 @@ contact: David Malcolm component: - glibc test: ./runtest.sh +tier: 2 framework: beakerlib -recommend: +require: - glibc - gcc-c++ tag: diff --git a/tests/Standardscompliance/bz531160-ldd-Vulnerable-to-Social-Engineering-Exploits/main.fmf b/tests/Standardscompliance/bz531160-ldd-Vulnerable-to-Social-Engineering-Exploits/main.fmf index 3b23534..2c38424 100644 --- a/tests/Standardscompliance/bz531160-ldd-Vulnerable-to-Social-Engineering-Exploits/main.fmf +++ b/tests/Standardscompliance/bz531160-ldd-Vulnerable-to-Social-Engineering-Exploits/main.fmf @@ -6,8 +6,9 @@ contact: Miroslav Franc component: - glibc test: ./runtest.sh +tier: 1 framework: beakerlib -recommend: +require: - glibc - glibc-static - glibc-common From 88814acb29081a1498fe3f4ce454fcdfd56b683f Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 5 Sep 2024 13:43:48 +0200 Subject: [PATCH 079/106] Auto-sync with upstream branch master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream commit: 9c0d6f7a1046aba111e25e34ec07242853e859dc - Fix memory leak on freopen error return (bug 32140) - Clear flags2 flags set from mode in freopen (bug 32134) - Linux: readdir_r needs to report getdents failures (bug 32124) - libio: Attempt wide backup free only for non-legacy code - Do not set errno for overflowing NaN payload in strtod/nan (bug 32045) - powerpc64: Fix syscall_cancel build for powerpc64le-linux-gnu [BZ #32125] - Fix strtod subnormal rounding (bug 30220) - manual: Add Descriptor-Relative Access section - x86: Enable non-temporal memset for Hygon processors - x86: Add cache information support for Hygon processors - x86: Add new architecture type for Hygon processors - powerpc64: Optimize strcpy and stpcpy for Power9/10 - nptl: Fix Race conditions in pthread cancellation [BZ#12683] - x86: Unifies 'strnlen-evex' and 'strnlen-evex512' implementations. - string: strerror, strsignal cannot use buffer after dlmopen (bug 32026) - ungetc: Fix backup buffer leak on program exit [BZ #27821] - ungetc: Fix uninitialized read when putting into unused streams [BZ #27821] - x86: Add `Avoid_STOSB` tunable to allow NT memset without ERMS - x86: Use `Avoid_Non_Temporal_Memset` to control non-temporal path - x86: Fix bug in strchrnul-evex512 [BZ #32078] - manual: Document dprintf and vdprintf - manual: Document generic printf error codes - ARC: Regenerate ULPs - support: Add options list terminator to the test driver - Define __libc_initial for the static libc - Turn on -Wimplicit-fallthrough by default if available - elf: Remove struct dl_init_args from elf/dl-open.c - nptl: Fix stray process left by tst-cancel7 blocking testing - nptl: Reorder semaphore release in tst-cancel7 - sysdeps: Re-flow and sort multiline gnu/Makefile definitions - login: Re-flow and sort multiline Makefile definitions - benchtests: Add random memset benchmark - AArch64: Improve generic strlen - rtld: Fix handling of '--' option - manual/stdio: Further clarify putc, putwc, getc, and getwc - stdlib: Allow concurrent quick_exit (BZ 31997) - elf: Avoid re-initializing already allocated TLS in dlopen (bug 31717) - elf: Clarify and invert second argument of _dl_allocate_tls_init - Fix name space violation in fortify wrappers (bug 32052) - iconv: Fix matching of multi-character transliterations (bug 31859) - x86: Tunables may incorrectly set Prefer_PMINUB_for_stringop (bug 32047) - x86: Add missing switch/case fall-through markers to init_cpu_features - stdlib: Link tst-concurrent-exit with $(shared-thread-library) - hurd: Fix missing pthread_ compat symbol in libc - resolv: Fix tst-resolv-short-response for older GCC (bug 32042) - Add mremap tests - mremap: Update manual entry - linux: Update the mremap C implementation [BZ #31968] - Enhanced test coverage for strncmp, wcsncmp - Enhance test coverage for strnlen, wcsnlen - stdlib: Mark `abort` as `cold` - stdlib: Allow concurrent exit (BZ 31997) - Add F_DUPFD_QUERY from Linux 6.10 to bits/fcntl-linux.h - Add STATX_SUBVOL from Linux 6.10 to bits/statx-generic.h - Update syscall lists for Linux 6.10 - assert: Mark `__assert_fail` as `cold` - x86-64: Remove sysdeps/x86_64/x32/dl-machine.h --- RHEL-18039-1.patch | 79 ------------------ RHEL-18039-2.patch | 204 --------------------------------------------- glibc.spec | 70 ++++++++++++++-- sources | 2 +- 4 files changed, 66 insertions(+), 289 deletions(-) delete mode 100644 RHEL-18039-1.patch delete mode 100644 RHEL-18039-2.patch diff --git a/RHEL-18039-1.patch b/RHEL-18039-1.patch deleted file mode 100644 index 549b26f..0000000 --- a/RHEL-18039-1.patch +++ /dev/null @@ -1,79 +0,0 @@ -commit 95f61610f3e481d191b6184432342236fd59186d -Author: Florian Weimer -Date: Wed Jul 24 12:06:47 2024 +0200 - - resolv: Support clearing option flags with a “-” prefix (bug 14799) - - I think using a “-” prefix is less confusing than introducing - double-negation construct (“no-no-tld-query”). - - Reviewed-by: DJ Delorie - -diff --git a/resolv/res_init.c b/resolv/res_init.c -index 263263d474721545..243532b3ade338d8 100644 ---- a/resolv/res_init.c -+++ b/resolv/res_init.c -@@ -682,27 +682,29 @@ res_setoptions (struct resolv_conf_parser *parser, const char *options) - { - char str[22]; - uint8_t len; -- uint8_t clear; - unsigned long int flag; - } options[] = { - #define STRnLEN(str) str, sizeof (str) - 1 -- { STRnLEN ("rotate"), 0, RES_ROTATE }, -- { STRnLEN ("edns0"), 0, RES_USE_EDNS0 }, -- { STRnLEN ("single-request-reopen"), 0, RES_SNGLKUPREOP }, -- { STRnLEN ("single-request"), 0, RES_SNGLKUP }, -- { STRnLEN ("no_tld_query"), 0, RES_NOTLDQUERY }, -- { STRnLEN ("no-tld-query"), 0, RES_NOTLDQUERY }, -- { STRnLEN ("no-reload"), 0, RES_NORELOAD }, -- { STRnLEN ("use-vc"), 0, RES_USEVC }, -- { STRnLEN ("trust-ad"), 0, RES_TRUSTAD }, -- { STRnLEN ("no-aaaa"), 0, RES_NOAAAA }, -+ { STRnLEN ("rotate"), RES_ROTATE }, -+ { STRnLEN ("edns0"), RES_USE_EDNS0 }, -+ { STRnLEN ("single-request-reopen"), RES_SNGLKUPREOP }, -+ { STRnLEN ("single-request"), RES_SNGLKUP }, -+ { STRnLEN ("no_tld_query"), RES_NOTLDQUERY }, -+ { STRnLEN ("no-tld-query"), RES_NOTLDQUERY }, -+ { STRnLEN ("no-reload"), RES_NORELOAD }, -+ { STRnLEN ("use-vc"), RES_USEVC }, -+ { STRnLEN ("trust-ad"), RES_TRUSTAD }, -+ { STRnLEN ("no-aaaa"), RES_NOAAAA }, - }; - #define noptions (sizeof (options) / sizeof (options[0])) -+ bool negate_option = *cp == '-'; -+ if (negate_option) -+ ++cp; - for (int i = 0; i < noptions; ++i) - if (strncmp (cp, options[i].str, options[i].len) == 0) - { -- if (options[i].clear) -- parser->template.options &= options[i].flag; -+ if (negate_option) -+ parser->template.options &= ~options[i].flag; - else - parser->template.options |= options[i].flag; - break; -diff --git a/resolv/tst-resolv-res_init-skeleton.c b/resolv/tst-resolv-res_init-skeleton.c -index 6bef62cde2cbf8cd..d3a19eb305d41467 100644 ---- a/resolv/tst-resolv-res_init-skeleton.c -+++ b/resolv/tst-resolv-res_init-skeleton.c -@@ -679,6 +679,16 @@ struct test_case test_cases[] = - "; nameserver[0]: [192.0.2.1]:53\n", - .res_options = "attempts:5 ndots:3 edns0 ", - }, -+ {.name = "RES_OPTIONS can clear flags", -+ .conf = "options ndots:2 use-vc no-aaaa edns0\n" -+ "nameserver 192.0.2.1\n", -+ .expected = "options ndots:3 use-vc\n" -+ "search example.com\n" -+ "; search[0]: example.com\n" -+ "nameserver 192.0.2.1\n" -+ "; nameserver[0]: [192.0.2.1]:53\n", -+ .res_options = "ndots:3 -edns0 -no-aaaa", -+ }, - {.name = "many search list entries (bug 19569)", - .conf = "nameserver 192.0.2.1\n" - "search corp.example.com support.example.com" diff --git a/RHEL-18039-2.patch b/RHEL-18039-2.patch deleted file mode 100644 index 9834166..0000000 --- a/RHEL-18039-2.patch +++ /dev/null @@ -1,204 +0,0 @@ -commit 765325951ac5c7d072278c9424930b29657e9758 -Author: Florian Weimer -Date: Wed Jul 24 12:06:47 2024 +0200 - - resolv: Implement strict-error stub resolver option (bug 27929) - - For now, do not enable this mode by default due to the potential - impact on compatibility with existing deployments. - - Reviewed-by: DJ Delorie - -diff --git a/resolv/res_init.c b/resolv/res_init.c -index 243532b3ade338d8..b838dc70642e1935 100644 ---- a/resolv/res_init.c -+++ b/resolv/res_init.c -@@ -695,6 +695,7 @@ res_setoptions (struct resolv_conf_parser *parser, const char *options) - { STRnLEN ("use-vc"), RES_USEVC }, - { STRnLEN ("trust-ad"), RES_TRUSTAD }, - { STRnLEN ("no-aaaa"), RES_NOAAAA }, -+ { STRnLEN ("strict-error"), RES_STRICTERR }, - }; - #define noptions (sizeof (options) / sizeof (options[0])) - bool negate_option = *cp == '-'; -diff --git a/resolv/res_send.c b/resolv/res_send.c -index 9c77613f374e5469..9a284ed44aa8cc2e 100644 ---- a/resolv/res_send.c -+++ b/resolv/res_send.c -@@ -1234,21 +1234,38 @@ send_dg(res_state statp, - - if (thisansp_error) { - next_ns: -- if (recvresp1 || (buf2 != NULL && recvresp2)) { -- *resplen2 = 0; -- return resplen; -- } -- if (buf2 != NULL && !single_request) -+ /* Outside of strict-error mode, use the first -+ response even if the second response is an -+ error. This allows parallel resolution to -+ succeed even if the recursive resolver -+ always answers with SERVFAIL for AAAA -+ queries (which still happens in practice -+ unfortunately). -+ -+ In strict-error mode, always switch to the -+ next server and try to get a response from -+ there. */ -+ if ((statp->options & RES_STRICTERR) == 0) - { -- /* No data from the first reply. */ -- resplen = 0; -- /* We are waiting for a possible second reply. */ -- if (matching_query == 1) -- recvresp1 = 1; -- else -- recvresp2 = 1; -- -- goto wait; -+ if (recvresp1 || (buf2 != NULL && recvresp2)) -+ { -+ *resplen2 = 0; -+ return resplen; -+ } -+ -+ if (buf2 != NULL && !single_request) -+ { -+ /* No data from the first reply. */ -+ resplen = 0; -+ /* We are waiting for a possible -+ second reply. */ -+ if (matching_query == 1) -+ recvresp1 = 1; -+ else -+ recvresp2 = 1; -+ -+ goto wait; -+ } - } - - /* don't retry if called from dig */ -diff --git a/resolv/resolv.h b/resolv/resolv.h -index f40d6c58cee0f585..b8a0f66a5fd50e22 100644 ---- a/resolv/resolv.h -+++ b/resolv/resolv.h -@@ -133,6 +133,7 @@ struct res_sym { - #define RES_NORELOAD 0x02000000 /* No automatic configuration reload. */ - #define RES_TRUSTAD 0x04000000 /* Request AD bit, keep it in responses. */ - #define RES_NOAAAA 0x08000000 /* Suppress AAAA queries. */ -+#define RES_STRICTERR 0x10000000 /* Report more DNS errors as errors. */ - - #define RES_DEFAULT (RES_RECURSE|RES_DEFNAMES|RES_DNSRCH) - -diff --git a/resolv/tst-resolv-res_init-skeleton.c b/resolv/tst-resolv-res_init-skeleton.c -index d3a19eb305d41467..e41bcebd9d9a8024 100644 ---- a/resolv/tst-resolv-res_init-skeleton.c -+++ b/resolv/tst-resolv-res_init-skeleton.c -@@ -129,6 +129,7 @@ print_resp (FILE *fp, res_state resp) - print_option_flag (fp, &options, RES_NORELOAD, "no-reload"); - print_option_flag (fp, &options, RES_TRUSTAD, "trust-ad"); - print_option_flag (fp, &options, RES_NOAAAA, "no-aaaa"); -+ print_option_flag (fp, &options, RES_STRICTERR, "strict-error"); - fputc ('\n', fp); - if (options != 0) - fprintf (fp, "; error: unresolved option bits: 0x%x\n", options); -@@ -741,6 +742,15 @@ struct test_case test_cases[] = - "nameserver 192.0.2.1\n" - "; nameserver[0]: [192.0.2.1]:53\n" - }, -+ {.name = "strict-error flag", -+ .conf = "options strict-error\n" -+ "nameserver 192.0.2.1\n", -+ .expected = "options strict-error\n" -+ "search example.com\n" -+ "; search[0]: example.com\n" -+ "nameserver 192.0.2.1\n" -+ "; nameserver[0]: [192.0.2.1]:53\n" -+ }, - { NULL } - }; - -diff --git a/resolv/tst-resolv-semi-failure.c b/resolv/tst-resolv-semi-failure.c -index aa9798b5a7dfaa88..b7681210f450bb5a 100644 ---- a/resolv/tst-resolv-semi-failure.c -+++ b/resolv/tst-resolv-semi-failure.c -@@ -67,6 +67,9 @@ response (const struct resolv_response_context *ctx, - resolv_response_close_record (b); - } - -+/* Set to 1 if strict error checking is enabled. */ -+static int do_strict_error; -+ - static void - check_one (void) - { -@@ -83,7 +86,10 @@ check_one (void) - struct addrinfo *ai; - int ret = getaddrinfo ("www.example", "80", &hints, &ai); - const char *expected; -- if (ret == 0 && ai->ai_next != NULL) -+ /* In strict-error mode, a switch to the second name server -+ happens, and both responses are received, so a single -+ response is a bug. */ -+ if (do_strict_error || (ret == 0 && ai->ai_next != NULL)) - expected = ("address: STREAM/TCP 192.0.2.17 80\n" - "address: STREAM/TCP 2001:db8::1 80\n"); - else -@@ -99,33 +105,36 @@ check_one (void) - static int - do_test (void) - { -- for (int do_single_lookup = 0; do_single_lookup < 2; ++do_single_lookup) -- { -- struct resolv_test *aux = resolv_test_start -- ((struct resolv_redirect_config) -- { -- .response_callback = response, -- }); -+ for (do_strict_error = 0; do_strict_error < 2; ++do_strict_error) -+ for (int do_single_lookup = 0; do_single_lookup < 2; ++do_single_lookup) -+ { -+ struct resolv_test *aux = resolv_test_start -+ ((struct resolv_redirect_config) -+ { -+ .response_callback = response, -+ }); - -- if (do_single_lookup) -- _res.options |= RES_SNGLKUP; -+ if (do_strict_error) -+ _res.options |= RES_STRICTERR; -+ if (do_single_lookup) -+ _res.options |= RES_SNGLKUP; - -- for (int do_fail_aaaa = 0; do_fail_aaaa < 2; ++do_fail_aaaa) -- { -- fail_aaaa = do_fail_aaaa; -+ for (int do_fail_aaaa = 0; do_fail_aaaa < 2; ++do_fail_aaaa) -+ { -+ fail_aaaa = do_fail_aaaa; - -- rcode = 2; /* SERVFAIL. */ -- check_one (); -+ rcode = 2; /* SERVFAIL. */ -+ check_one (); - -- rcode = 4; /* NOTIMP. */ -- check_one (); -+ rcode = 4; /* NOTIMP. */ -+ check_one (); - -- rcode = 5; /* REFUSED. */ -- check_one (); -- } -+ rcode = 5; /* REFUSED. */ -+ check_one (); -+ } - -- resolv_test_end (aux); -- } -+ resolv_test_end (aux); -+ } - - return 0; - } diff --git a/glibc.spec b/glibc.spec index 1482a2c..b527d6e 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,5 +1,5 @@ -%global glibcsrcdir glibc-2.40-9-g132a72f93c -%global glibcversion 2.40 +%global glibcsrcdir glibc-2.40.9000-140-g9c0d6f7a10 +%global glibcversion 2.40.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 3 +%global baserelease 1 Release: %{baserelease}%{?dist} # Licenses: @@ -328,8 +328,6 @@ Patch8: glibc-fedora-manual-dircategory.patch Patch13: glibc-fedora-localedata-rh61908.patch Patch17: glibc-cs-path.patch Patch23: glibc-python3.patch -Patch24: RHEL-18039-1.patch -Patch25: RHEL-18039-2.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2576,6 +2574,68 @@ update_gconv_modules_cache () %endif %changelog +* Thu Sep 05 2024 Florian Weimer - 2.40.9000-1 +- Remove RHEL-18039-1.patch, RHEL-18039-2.patch. Applied upstream. +- Auto-sync with upstream branch master, + commit 9c0d6f7a1046aba111e25e34ec07242853e859dc: +- Fix memory leak on freopen error return (bug 32140) +- Clear flags2 flags set from mode in freopen (bug 32134) +- Linux: readdir_r needs to report getdents failures (bug 32124) +- libio: Attempt wide backup free only for non-legacy code +- Do not set errno for overflowing NaN payload in strtod/nan (bug 32045) +- powerpc64: Fix syscall_cancel build for powerpc64le-linux-gnu [BZ #32125] +- Fix strtod subnormal rounding (bug 30220) +- manual: Add Descriptor-Relative Access section +- x86: Enable non-temporal memset for Hygon processors +- x86: Add cache information support for Hygon processors +- x86: Add new architecture type for Hygon processors +- powerpc64: Optimize strcpy and stpcpy for Power9/10 +- nptl: Fix Race conditions in pthread cancellation [BZ#12683] +- x86: Unifies 'strnlen-evex' and 'strnlen-evex512' implementations. +- string: strerror, strsignal cannot use buffer after dlmopen (bug 32026) +- ungetc: Fix backup buffer leak on program exit [BZ #27821] +- ungetc: Fix uninitialized read when putting into unused streams [BZ #27821] +- x86: Add `Avoid_STOSB` tunable to allow NT memset without ERMS +- x86: Use `Avoid_Non_Temporal_Memset` to control non-temporal path +- x86: Fix bug in strchrnul-evex512 [BZ #32078] +- manual: Document dprintf and vdprintf +- manual: Document generic printf error codes +- ARC: Regenerate ULPs +- support: Add options list terminator to the test driver +- Define __libc_initial for the static libc +- Turn on -Wimplicit-fallthrough by default if available +- elf: Remove struct dl_init_args from elf/dl-open.c +- nptl: Fix stray process left by tst-cancel7 blocking testing +- nptl: Reorder semaphore release in tst-cancel7 +- sysdeps: Re-flow and sort multiline gnu/Makefile definitions +- login: Re-flow and sort multiline Makefile definitions +- benchtests: Add random memset benchmark +- AArch64: Improve generic strlen +- rtld: Fix handling of '--' option +- manual/stdio: Further clarify putc, putwc, getc, and getwc +- stdlib: Allow concurrent quick_exit (BZ 31997) +- elf: Avoid re-initializing already allocated TLS in dlopen (bug 31717) +- elf: Clarify and invert second argument of _dl_allocate_tls_init +- Fix name space violation in fortify wrappers (bug 32052) +- iconv: Fix matching of multi-character transliterations (bug 31859) +- x86: Tunables may incorrectly set Prefer_PMINUB_for_stringop (bug 32047) +- x86: Add missing switch/case fall-through markers to init_cpu_features +- stdlib: Link tst-concurrent-exit with $(shared-thread-library) +- hurd: Fix missing pthread_ compat symbol in libc +- resolv: Fix tst-resolv-short-response for older GCC (bug 32042) +- Add mremap tests +- mremap: Update manual entry +- linux: Update the mremap C implementation [BZ #31968] +- Enhanced test coverage for strncmp, wcsncmp +- Enhance test coverage for strnlen, wcsnlen +- stdlib: Mark `abort` as `cold` +- stdlib: Allow concurrent exit (BZ 31997) +- Add F_DUPFD_QUERY from Linux 6.10 to bits/fcntl-linux.h +- Add STATX_SUBVOL from Linux 6.10 to bits/statx-generic.h +- Update syscall lists for Linux 6.10 +- assert: Mark `__assert_fail` as `cold` +- x86-64: Remove sysdeps/x86_64/x32/dl-machine.h + * Wed Jul 31 2024 Patsy Griffin - 2.40-3 - Auto-sync with upstream branch release/2.40/master, commit 132a72f93cb4ad9f16b8469dc061de5f75f6a44e. diff --git a/sources b/sources index a46c9c9..5d3a8b4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.40-9-g132a72f93c.tar.xz) = f88ffb4ab47104640c88504ca2619cdca0795565173daf98a37d624333e14ab96699f662597fe51ba94a274c4cc7001bd2c8cc29fd5df012733298049e533bf4 +SHA512 (glibc-2.40.9000-140-g9c0d6f7a10.tar.xz) = 86f7d54d775c1ed11ee0ca8ef8f1e6b69393a31e2fef71f095e24b2e0cf04a7530ef57ac7f94f5824856418e3f289efdd0db283438073f34aa10ecac926c8ebe From e2bae39a8f68872f2604f4112881dd2bc76be266 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 19 Sep 2024 10:36:00 +0200 Subject: [PATCH 080/106] Ensure that xtests can be built --- glibc.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index b527d6e..649224e 100644 --- a/glibc.spec +++ b/glibc.spec @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 1 +%global baserelease 2 Release: %{baserelease}%{?dist} # Licenses: @@ -2249,6 +2249,13 @@ run_tests () { done & 2 + exit 1 + fi + # Unconditonally dump differences in the system call list. echo "* System call consistency checks:" >&2 cat misc/tst-syscall-list.out >&2 @@ -2574,6 +2581,9 @@ update_gconv_modules_cache () %endif %changelog +* Thu Sep 19 2024 Florian Weimer - 2.40.9000-2 +- Ensure that xtests can be built + * Thu Sep 05 2024 Florian Weimer - 2.40.9000-1 - Remove RHEL-18039-1.patch, RHEL-18039-2.patch. Applied upstream. - Auto-sync with upstream branch master, From e4aaff0fdb38f6c7963bbe07b98b538bafbf670d Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 19 Sep 2024 13:22:59 +0200 Subject: [PATCH 081/106] Use make xcheck in such a way that xtests are actually built --- glibc.spec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 649224e..9b5fb9e 100644 --- a/glibc.spec +++ b/glibc.spec @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 2 +%global baserelease 3 Release: %{baserelease}%{?dist} # Licenses: @@ -2249,10 +2249,15 @@ run_tests () { done rpmbuild.xcheck.log 2>&1 || true if ! grep -Eq '^\s+=== Summary of results for extra tests ===$' rpmbuild.xcheck.log ; then echo "FAIL: xcheck test suite build of target: $(basename "$(pwd)")" >& 2 + cat rpmbuild.xcheck exit 1 fi @@ -2581,6 +2586,9 @@ update_gconv_modules_cache () %endif %changelog +* Thu Sep 19 2024 Florian Weimer - 2.40.9000-3 +- Use make xcheck in such a way that xtests are actually built + * Thu Sep 19 2024 Florian Weimer - 2.40.9000-2 - Ensure that xtests can be built From 3ebbe38af2731d26428c264dd2510a2e13e7467a Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 19 Sep 2024 13:53:19 +0200 Subject: [PATCH 082/106] Fix typo in rpmbuild.xcheck.log dumping --- glibc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index 9b5fb9e..9aca138 100644 --- a/glibc.spec +++ b/glibc.spec @@ -2257,7 +2257,7 @@ run_tests () { TIMEOUT_FACTOR=1 %make_build xcheck > rpmbuild.xcheck.log 2>&1 || true if ! grep -Eq '^\s+=== Summary of results for extra tests ===$' rpmbuild.xcheck.log ; then echo "FAIL: xcheck test suite build of target: $(basename "$(pwd)")" >& 2 - cat rpmbuild.xcheck + cat rpmbuild.xcheck.log exit 1 fi From 8587305be044c8eb14b669fdc7ded9d37912b59b Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Thu, 12 Sep 2024 14:40:05 +0200 Subject: [PATCH 083/106] tests/: relevancy updates Rhel testing requires some relevancy updates in following tests: * tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7 * tests/Regression/bz1988382-annocheck-reports-pie-pic-test-failures-on * tests/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting * tests/Regression/bz2024347-glibc-Optional-sched-getcpu-acceleration-using * tests/Regression/bz2027789-glibc-backtrace-function-crashes-without-vdso-on * tests/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics --- .../main.fmf | 3 +++ .../main.fmf | 3 +++ .../bz2007417-glibc-ldd-segfaults-when-inspecting/main.fmf | 3 +++ .../main.fmf | 3 +++ .../main.fmf | 3 +++ .../bz2023420-glibc-Backport-ld-so-list-diagnostics/main.fmf | 3 +++ 6 files changed, 18 insertions(+) diff --git a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/main.fmf b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/main.fmf index ef964a9..394a933 100644 --- a/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/main.fmf +++ b/tests/Regression/ESTALE-error-message-translation-regression-from-RHEL7/main.fmf @@ -3,6 +3,9 @@ description: '' contact: Sergey Kolosov component: - glibc +adjust: + - enabled: false + when: distro < rhel-8.9 test: ./runtest.sh framework: beakerlib recommend: diff --git a/tests/Regression/bz1988382-annocheck-reports-pie-pic-test-failures-on/main.fmf b/tests/Regression/bz1988382-annocheck-reports-pie-pic-test-failures-on/main.fmf index 5acd701..c13e2eb 100644 --- a/tests/Regression/bz1988382-annocheck-reports-pie-pic-test-failures-on/main.fmf +++ b/tests/Regression/bz1988382-annocheck-reports-pie-pic-test-failures-on/main.fmf @@ -7,6 +7,9 @@ link: contact: Sergey Kolosov component: - glibc +adjust: + - enabled: false + when: distro < rhel-9 test: ./runtest.sh framework: beakerlib recommend: diff --git a/tests/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting/main.fmf b/tests/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting/main.fmf index bcbba50..d2963d1 100644 --- a/tests/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting/main.fmf +++ b/tests/Regression/bz2007417-glibc-ldd-segfaults-when-inspecting/main.fmf @@ -5,6 +5,9 @@ description: | contact: Sergey Kolosov component: - glibc +adjust: + - enabled: false + when: distro < rhel-9 test: ./runtest.sh framework: beakerlib recommend: diff --git a/tests/Regression/bz2024347-glibc-Optional-sched-getcpu-acceleration-using/main.fmf b/tests/Regression/bz2024347-glibc-Optional-sched-getcpu-acceleration-using/main.fmf index 826bc25..eb82ecc 100644 --- a/tests/Regression/bz2024347-glibc-Optional-sched-getcpu-acceleration-using/main.fmf +++ b/tests/Regression/bz2024347-glibc-Optional-sched-getcpu-acceleration-using/main.fmf @@ -7,6 +7,9 @@ link: contact: Sergey Kolosov component: - glibc +adjust: + - enabled: false + when: distro < rhel-9 test: ./runtest.sh framework: beakerlib recommend: diff --git a/tests/Regression/bz2027789-glibc-backtrace-function-crashes-without-vdso-on/main.fmf b/tests/Regression/bz2027789-glibc-backtrace-function-crashes-without-vdso-on/main.fmf index 8f638fa..aad4b13 100644 --- a/tests/Regression/bz2027789-glibc-backtrace-function-crashes-without-vdso-on/main.fmf +++ b/tests/Regression/bz2027789-glibc-backtrace-function-crashes-without-vdso-on/main.fmf @@ -7,6 +7,9 @@ link: contact: Sergey Kolosov component: - glibc +adjust: + - enabled: false + when: distro < rhel-9 test: ./runtest.sh framework: beakerlib recommend: diff --git a/tests/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics/main.fmf b/tests/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics/main.fmf index 13cda56..f2c7353 100644 --- a/tests/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics/main.fmf +++ b/tests/Sanity/bz2023420-glibc-Backport-ld-so-list-diagnostics/main.fmf @@ -7,6 +7,9 @@ link: contact: Martin Coufal component: - glibc +adjust: + - enabled: false + when: distro < rhel-8.6 test: ./runtest.sh framework: beakerlib recommend: From 7d2f2381561d097b4514317ca434c1fd798756f9 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 20 Sep 2024 14:01:56 +0200 Subject: [PATCH 084/106] Auto-sync with upstream branch master Upstream commit: fa1b0d5e9f6e0353e16339430770a7a8824c0468 - iconv: Input buffering for the iconv program (bug 6050) - iconv: Multiple - on command line should not fail (bug 32050) - iconv: Support in-place conversions (bug 10460, bug 32033) - iconv: Preserve iconv -c error exit on invalid inputs (bug 32046) - manual: __is_last is no longer part of iconv internals - iconv: Do not use mmap in iconv (the program) (bug 17703) - iconv: Base tests for buffer management - AArch64: Add vector logp1 alias for log1p - Linux: Add missing scheduler constants to - Linux: Add the sched_setattr and sched_getattr functions - manual: Extract the @manpageurl{func,sec} macro - AArch64: Remove memset-reg.h - debug: Fix read error handling in pcprofiledump - AArch64: Optimize memset - aarch64: Avoid redundant MOVs in AdvSIMD F32 logs - Document limitations on streams passed to freopen - stdlib: Do not use GLIBC_PRIVATE ABI for errno in libc_nonshared.a - manual: Safety annotations for clock_gettime, clock_getres - timezone: sync to TZDB 2024b - Fix freopen handling of ,ccs= (bug 23675) - powerpc64le: Build new strtod tests with long double ABI flags (bug 32145) --- glibc.spec | 29 +++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 9aca138..151ff87 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.40.9000-140-g9c0d6f7a10 +%global glibcsrcdir glibc-2.40.9000-174-gfa1b0d5e9f %global glibcversion 2.40.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 3 +%global baserelease 4 Release: %{baserelease}%{?dist} # Licenses: @@ -2586,6 +2586,31 @@ update_gconv_modules_cache () %endif %changelog +* Fri Sep 20 2024 Florian Weimer - 2.40.9000-4 +- Auto-sync with upstream branch master, + commit fa1b0d5e9f6e0353e16339430770a7a8824c0468: +- iconv: Input buffering for the iconv program (bug 6050) +- iconv: Multiple - on command line should not fail (bug 32050) +- iconv: Support in-place conversions (bug 10460, bug 32033) +- iconv: Preserve iconv -c error exit on invalid inputs (bug 32046) +- manual: __is_last is no longer part of iconv internals +- iconv: Do not use mmap in iconv (the program) (bug 17703) +- iconv: Base tests for buffer management +- AArch64: Add vector logp1 alias for log1p +- Linux: Add missing scheduler constants to +- Linux: Add the sched_setattr and sched_getattr functions +- manual: Extract the @manpageurl{func,sec} macro +- AArch64: Remove memset-reg.h +- debug: Fix read error handling in pcprofiledump +- AArch64: Optimize memset +- aarch64: Avoid redundant MOVs in AdvSIMD F32 logs +- Document limitations on streams passed to freopen +- stdlib: Do not use GLIBC_PRIVATE ABI for errno in libc_nonshared.a +- manual: Safety annotations for clock_gettime, clock_getres +- timezone: sync to TZDB 2024b +- Fix freopen handling of ,ccs= (bug 23675) +- powerpc64le: Build new strtod tests with long double ABI flags (bug 32145) + * Thu Sep 19 2024 Florian Weimer - 2.40.9000-3 - Use make xcheck in such a way that xtests are actually built diff --git a/sources b/sources index 5d3a8b4..50a9569 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.40.9000-140-g9c0d6f7a10.tar.xz) = 86f7d54d775c1ed11ee0ca8ef8f1e6b69393a31e2fef71f095e24b2e0cf04a7530ef57ac7f94f5824856418e3f289efdd0db283438073f34aa10ecac926c8ebe +SHA512 (glibc-2.40.9000-174-gfa1b0d5e9f.tar.xz) = d550da28526eaa564cf40a02f1b4e2930d22beaef9f996471d1a748fafa446f7a8bb59cfdeb47bb97337f0a051e93a7b77bf9e1753f3dcf4cce2c206d0ab6398 From 39bab0c46f64a4e785f33275c94f65e49f8f6271 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Tue, 24 Sep 2024 16:03:42 +0200 Subject: [PATCH 085/106] Auto-sync with upstream branch master Upstream commit: da29dc24d419656a4a6d6d61598b767b86b1425d - nptl: Prefer setresuid32 in tst-setuid2 - elf: Move __rtld_malloc_init_stubs call into _dl_start_final - elf: Eliminate alloca in open_verify - elf: Remove version assert in check_match in elf/dl-lookup.c - elf: In rtld_setup_main_map, assume ld.so has a DYNAMIC segment - misc: Enable internal use of memory protection keys - misc: Link tst-mkstemp-fuse-parallel with $(shared-thread-library) - iconv: Use $(run-program-prefix) for running iconv (bug 32197) - AArch64: Simplify rounding-multiply pattern in several AdvSIMD routines - AArch64: Improve codegen in users of ADVSIMD expm1f helper - AArch64: Improve codegen in users of AdvSIMD log1pf helper - AArch64: Improve codegen in SVE F32 logs - AArch64: Improve codegen in SVE expf & related routines - Linux: readdir64_r should not skip d_ino == 0 entries (bug 32126) - dirent: Add tst-rewinddir - dirent: Add tst-readdir-long - Linux: Use readdir64_r for compat __old_readdir64_r (bug 32128) - dirent: Add tst-closedir-leaks - support: Add valgrind instructions to - support: Fix memory leaks in FUSE tests - misc: FUSE-based tests for mkstemp - Add freopen special-case tests: chroot, EFBIG, stdin/stdout/stderr - Make tst-strtod-underflow type-generic - Add tests of more strtod special cases - Add more tests of strtod end pointer - Make tst-strtod2 and tst-strtod5 type-generic - Implement run-built-tests=no for make xcheck, always build xtests - Test that errno is set to 0 at program startup - Add another test for fclose on an unopened file --- glibc.spec | 37 +++++++++++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 151ff87..7061759 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.40.9000-174-gfa1b0d5e9f +%global glibcsrcdir glibc-2.40.9000-203-gda29dc24d4 %global glibcversion 2.40.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 4 +%global baserelease 5 Release: %{baserelease}%{?dist} # Licenses: @@ -2586,6 +2586,39 @@ update_gconv_modules_cache () %endif %changelog +* Tue Sep 24 2024 Arjun Shankar - 2.40.9000-5 +- Auto-sync with upstream branch master, + commit da29dc24d419656a4a6d6d61598b767b86b1425d: +- nptl: Prefer setresuid32 in tst-setuid2 +- elf: Move __rtld_malloc_init_stubs call into _dl_start_final +- elf: Eliminate alloca in open_verify +- elf: Remove version assert in check_match in elf/dl-lookup.c +- elf: In rtld_setup_main_map, assume ld.so has a DYNAMIC segment +- misc: Enable internal use of memory protection keys +- misc: Link tst-mkstemp-fuse-parallel with $(shared-thread-library) +- iconv: Use $(run-program-prefix) for running iconv (bug 32197) +- AArch64: Simplify rounding-multiply pattern in several AdvSIMD routines +- AArch64: Improve codegen in users of ADVSIMD expm1f helper +- AArch64: Improve codegen in users of AdvSIMD log1pf helper +- AArch64: Improve codegen in SVE F32 logs +- AArch64: Improve codegen in SVE expf & related routines +- Linux: readdir64_r should not skip d_ino == 0 entries (bug 32126) +- dirent: Add tst-rewinddir +- dirent: Add tst-readdir-long +- Linux: Use readdir64_r for compat __old_readdir64_r (bug 32128) +- dirent: Add tst-closedir-leaks +- support: Add valgrind instructions to +- support: Fix memory leaks in FUSE tests +- misc: FUSE-based tests for mkstemp +- Add freopen special-case tests: chroot, EFBIG, stdin/stdout/stderr +- Make tst-strtod-underflow type-generic +- Add tests of more strtod special cases +- Add more tests of strtod end pointer +- Make tst-strtod2 and tst-strtod5 type-generic +- Implement run-built-tests=no for make xcheck, always build xtests +- Test that errno is set to 0 at program startup +- Add another test for fclose on an unopened file + * Fri Sep 20 2024 Florian Weimer - 2.40.9000-4 - Auto-sync with upstream branch master, commit fa1b0d5e9f6e0353e16339430770a7a8824c0468: diff --git a/sources b/sources index 50a9569..33bba73 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.40.9000-174-gfa1b0d5e9f.tar.xz) = d550da28526eaa564cf40a02f1b4e2930d22beaef9f996471d1a748fafa446f7a8bb59cfdeb47bb97337f0a051e93a7b77bf9e1753f3dcf4cce2c206d0ab6398 +SHA512 (glibc-2.40.9000-203-gda29dc24d4.tar.xz) = ed6bb29775339f64a3b1b57ceefaa6d60bf1ba10b80a4720a0c0968de55201d46760708971410cdceadecb2e4cb7c9da1f310b554bd9cad2dcccf4082cd0a606 From 563b4e6c6f603a5bdf4be8708700c25bbe34b458 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 2 Oct 2024 16:11:30 -0400 Subject: [PATCH 086/106] Auto-sync with upstream branch master Upstream commit: a36814e1455093fc9ebfcdf6ef39bb0cf3d447da - riscv: align .preinit_array (bug 32228) - linux: sparc: Fix clone for LEON/sparcv8 (BZ 31394) - linux: sparc: Fix syscall_cancel for LEON - math: Improve layout of expf data - Disable _TIME_BITS if the compiler defaults to it - Disable _FILE_OFFSET_BITS if the compiler defaults to it - Do not use -Wp to disable fortify (BZ 31928) - libio: Set _vtable_offset before calling _IO_link_in [BZ #32148] - Add a new fwrite test that exercises buffer overflow - x86/string: Fixup alignment of main loop in str{n}cmp-evex [BZ #32212] - stdio-common: Fix memory leak in tst-freopen4* tests on UNSUPPORTED - Linux: Block signals around _Fork (bug 32215) - Update to Unicode 16.0.0 [BZ #32168] - manual: Document that feof and ferror are mutually exclusive - stdio-common: Add new test for fdopen - Fix missing randomness in __gen_tempname (bug 32214) - arc: Cleanup arcbe - arc: Remove HAVE_ARC_BE macro and disable big-endian port - scripts: Remove arceb-linux-gnu from build-many-glibcs.py - LoongArch: Undef __NR_fstat and __NR_newfstatat. - Add tests of fread --- glibc.spec | 29 +++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 7061759..c78ffa8 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.40.9000-203-gda29dc24d4 +%global glibcsrcdir glibc-2.40.9000-224-ga36814e145 %global glibcversion 2.40.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 5 +%global baserelease 6 Release: %{baserelease}%{?dist} # Licenses: @@ -2586,6 +2586,31 @@ update_gconv_modules_cache () %endif %changelog +* Wed Oct 02 2024 Carlos O'Donell - 2.40.9000-6 +- Auto-sync with upstream branch master, + commit a36814e1455093fc9ebfcdf6ef39bb0cf3d447da. +- riscv: align .preinit_array (bug 32228) +- linux: sparc: Fix clone for LEON/sparcv8 (BZ 31394) +- linux: sparc: Fix syscall_cancel for LEON +- math: Improve layout of expf data +- Disable _TIME_BITS if the compiler defaults to it +- Disable _FILE_OFFSET_BITS if the compiler defaults to it +- Do not use -Wp to disable fortify (BZ 31928) +- libio: Set _vtable_offset before calling _IO_link_in [BZ #32148] +- Add a new fwrite test that exercises buffer overflow +- x86/string: Fixup alignment of main loop in str{n}cmp-evex [BZ #32212] +- stdio-common: Fix memory leak in tst-freopen4* tests on UNSUPPORTED +- Linux: Block signals around _Fork (bug 32215) +- Update to Unicode 16.0.0 [BZ #32168] +- manual: Document that feof and ferror are mutually exclusive +- stdio-common: Add new test for fdopen +- Fix missing randomness in __gen_tempname (bug 32214) +- arc: Cleanup arcbe +- arc: Remove HAVE_ARC_BE macro and disable big-endian port +- scripts: Remove arceb-linux-gnu from build-many-glibcs.py +- LoongArch: Undef __NR_fstat and __NR_newfstatat. +- Add tests of fread + * Tue Sep 24 2024 Arjun Shankar - 2.40.9000-5 - Auto-sync with upstream branch master, commit da29dc24d419656a4a6d6d61598b767b86b1425d: diff --git a/sources b/sources index 33bba73..5d52940 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.40.9000-203-gda29dc24d4.tar.xz) = ed6bb29775339f64a3b1b57ceefaa6d60bf1ba10b80a4720a0c0968de55201d46760708971410cdceadecb2e4cb7c9da1f310b554bd9cad2dcccf4082cd0a606 +SHA512 (glibc-2.40.9000-224-ga36814e145.tar.xz) = 05ff8dfcac70206e72aa2a4f6ad584e1d25df5cb469fda2c2a0eccdd3dc473428b45583bd9cc94c225b856ead2d0414d71338f45a969766bcbee2df97d4c61af From 74a6204fdb87d9c90115869b9597434f884048b4 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 14 Oct 2024 13:30:51 -0400 Subject: [PATCH 087/106] Auto-sync with upstream branch master Upstream commit 9d4b4515a88c5d0bbfc7809374f322c507c2d779 - locale: Fix some spelling typos - LoongArch: Regenerate loongarch/arch-syscall.h by build-many-glibcs.py update-syscalls. - manual: Fix and test @deftypef* function formatting - replace tgammaf by the CORE-MATH implementation - Add IPPROTO_SMC from Linux 6.11 to netinet/in.h - misc: Add support for Linux uio.h RWF_ATOMIC flag - linux: Update stat-generic.h with linux 6.11 - Update kernel version to 6.11 in header constant tests - linux: Add MAP_DROPPABLE from Linux 6.11 - Update PIDFD_* constants for Linux 6.11 - Update syscall lists for Linux 6.11 - Use Linux 6.11 in build-many-glibcs.py - Fix header guard in sysdeps/mach/hurd/x86_64/vm_param.h - rt: more clock_nanosleep tests addendum - rt: more clock_nanosleep tests - stdlib: Make abort/_Exit AS-safe (BZ 26275) - linux: Use GLRO(dl_vdso_time) on time - linux: Use GLRO(dl_vdso_gettimeofday) on gettimeofday - S390: Don't use r11 for cu-instructions as used as frame-pointer. [BZ# 32192] - stdio-common/Makefile: Fix FAIL: lint-makefiles - Fix whitespace related license issues. - Add freopen special-case tests: thread cancellation - hurd: Add missing va_end call in fcntl implementation. [BZ #32234] --- glibc.spec | 31 +++++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index c78ffa8..0a0855b 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.40.9000-224-ga36814e145 +%global glibcsrcdir glibc-2.40.9000-247-g9d4b4515a8 %global glibcversion 2.40.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 6 +%global baserelease 7 Release: %{baserelease}%{?dist} # Licenses: @@ -2586,6 +2586,33 @@ update_gconv_modules_cache () %endif %changelog +* Mon Oct 14 2024 DJ Delorie - 2.40.9000-7 +- Auto-sync with upstream branch master, + commit 9d4b4515a88c5d0bbfc7809374f322c507c2d779. +- locale: Fix some spelling typos +- LoongArch: Regenerate loongarch/arch-syscall.h by build-many-glibcs.py update-syscalls. +- manual: Fix and test @deftypef* function formatting +- replace tgammaf by the CORE-MATH implementation +- Add IPPROTO_SMC from Linux 6.11 to netinet/in.h +- misc: Add support for Linux uio.h RWF_ATOMIC flag +- linux: Update stat-generic.h with linux 6.11 +- Update kernel version to 6.11 in header constant tests +- linux: Add MAP_DROPPABLE from Linux 6.11 +- Update PIDFD_* constants for Linux 6.11 +- Update syscall lists for Linux 6.11 +- Use Linux 6.11 in build-many-glibcs.py +- Fix header guard in sysdeps/mach/hurd/x86_64/vm_param.h +- rt: more clock_nanosleep tests addendum +- rt: more clock_nanosleep tests +- stdlib: Make abort/_Exit AS-safe (BZ 26275) +- linux: Use GLRO(dl_vdso_time) on time +- linux: Use GLRO(dl_vdso_gettimeofday) on gettimeofday +- S390: Don't use r11 for cu-instructions as used as frame-pointer. [BZ# 32192] +- stdio-common/Makefile: Fix FAIL: lint-makefiles +- Fix whitespace related license issues. +- Add freopen special-case tests: thread cancellation +- hurd: Add missing va_end call in fcntl implementation. [BZ #32234] + * Wed Oct 02 2024 Carlos O'Donell - 2.40.9000-6 - Auto-sync with upstream branch master, commit a36814e1455093fc9ebfcdf6ef39bb0cf3d447da. diff --git a/sources b/sources index 5d52940..5e53d64 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.40.9000-224-ga36814e145.tar.xz) = 05ff8dfcac70206e72aa2a4f6ad584e1d25df5cb469fda2c2a0eccdd3dc473428b45583bd9cc94c225b856ead2d0414d71338f45a969766bcbee2df97d4c61af +SHA512 (glibc-2.40.9000-247-g9d4b4515a8.tar.xz) = 4b365fae877a46138ffcd1244af4a728760696026c2f5d7a8783265358db7cc5243cea0bdaf6fa26348d316444c1b1540f40ad45edfcd4336c5e39100d0806af From 581f21ada772a7b47a03d6b4861439201438208c Mon Sep 17 00:00:00 2001 From: Patsy Griffin Date: Thu, 24 Oct 2024 16:57:16 -0400 Subject: [PATCH 088/106] Auto-sync with upstream branch master sUpstream commit: c5dd659f22058bf9b371ab1cba07631f1206c674 - Add more tests of pthread_mutexattr_gettype and pthread_mutexattr_settype - libio: Fix a deadlock after fork in popen - configure: default to --prefix=/usr on GNU/Linux - manual: Document stdio.h functions that may be macros - Check time arguments to pthread_timedjoin_np and pthread_clockjoin_np - Add .b4-config file - linux: Fix tst-syscall-restart.c on old gcc (BZ 32283) - sparc: Fix restartable syscalls (BZ 32173) - support: Make support_process_state_wait return the found state - Enable transliteration rules with two input characters in scn_IT [BZ #32280] --- glibc.spec | 18 ++++++++++++++++-- sources | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 0a0855b..ca5a65f 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.40.9000-247-g9d4b4515a8 +%global glibcsrcdir glibc-2.40.9000-257-gc5dd659f22 %global glibcversion 2.40.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 7 +%global baserelease 8 Release: %{baserelease}%{?dist} # Licenses: @@ -2586,6 +2586,20 @@ update_gconv_modules_cache () %endif %changelog +* Thu Oct 24 2024 Patsy Griffin - 2.40.9000-8 +- Auto-sync with upstream branch master, + commit c5dd659f22058bf9b371ab1cba07631f1206c674. +- Add more tests of pthread_mutexattr_gettype and pthread_mutexattr_settype +- libio: Fix a deadlock after fork in popen +- configure: default to --prefix=/usr on GNU/Linux +- manual: Document stdio.h functions that may be macros +- Check time arguments to pthread_timedjoin_np and pthread_clockjoin_np +- Add .b4-config file +- linux: Fix tst-syscall-restart.c on old gcc (BZ 32283) +- sparc: Fix restartable syscalls (BZ 32173) +- support: Make support_process_state_wait return the found state +- Enable transliteration rules with two input characters in scn_IT [BZ #32280] + * Mon Oct 14 2024 DJ Delorie - 2.40.9000-7 - Auto-sync with upstream branch master, commit 9d4b4515a88c5d0bbfc7809374f322c507c2d779. diff --git a/sources b/sources index 5e53d64..a392479 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.40.9000-247-g9d4b4515a8.tar.xz) = 4b365fae877a46138ffcd1244af4a728760696026c2f5d7a8783265358db7cc5243cea0bdaf6fa26348d316444c1b1540f40ad45edfcd4336c5e39100d0806af +SHA512 (glibc-2.40.9000-257-gc5dd659f22.tar.xz) = c78d403ebf65624c7be8fafabd9badc5e39b748b268c1cfb5a335e3182bb1c8ba5cfc39d04bf432a45ec339b6165754f48c122c3797c7ad2f25866a44dbe4489 From 267a95236f530d28e00813c9851817b67e48b907 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 25 Oct 2024 17:24:13 +0200 Subject: [PATCH 089/106] Auto-sync with upstream branch master Upstream commit: 43db5e2c0672cae7edea7c9685b22317eae25471 - elf: Signal RT_CONSISTENT after relocation processing in dlopen (bug 31986) - elf: Signal LA_ACT_CONSISTENT to auditors after RT_CONSISTENT switch - elf: Run constructors on cyclic recursive dlopen (bug 31986) - Linux: Match kernel text for SCHED_ macros - libio: Correctly link tst-popen-fork against libpthread --- glibc.spec | 13 +++++++++++-- sources | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index ca5a65f..06c7a7f 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.40.9000-257-gc5dd659f22 +%global glibcsrcdir glibc-2.40.9000-262-g43db5e2c06 %global glibcversion 2.40.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 8 +%global baserelease 9 Release: %{baserelease}%{?dist} # Licenses: @@ -2586,6 +2586,15 @@ update_gconv_modules_cache () %endif %changelog +* Fri Oct 25 2024 Florian Weimer - 2.40.9000-9 +- Auto-sync with upstream branch master, + commit 43db5e2c0672cae7edea7c9685b22317eae25471: +- elf: Signal RT_CONSISTENT after relocation processing in dlopen (bug 31986) +- elf: Signal LA_ACT_CONSISTENT to auditors after RT_CONSISTENT switch +- elf: Run constructors on cyclic recursive dlopen (bug 31986) +- Linux: Match kernel text for SCHED_ macros +- libio: Correctly link tst-popen-fork against libpthread + * Thu Oct 24 2024 Patsy Griffin - 2.40.9000-8 - Auto-sync with upstream branch master, commit c5dd659f22058bf9b371ab1cba07631f1206c674. diff --git a/sources b/sources index a392479..9e786ca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.40.9000-257-gc5dd659f22.tar.xz) = c78d403ebf65624c7be8fafabd9badc5e39b748b268c1cfb5a335e3182bb1c8ba5cfc39d04bf432a45ec339b6165754f48c122c3797c7ad2f25866a44dbe4489 +SHA512 (glibc-2.40.9000-262-g43db5e2c06.tar.xz) = 84375c29fc59b9b2bc435ecc937ac8769e28e407ba0340a01149e11ea6546a39684668c9b59622533c2e8effdf38c1daae90896b7ea7e80aeee4c79a9f42f371 From ba9b5e45af5f27e6c03c9b0df8034513dd1f9979 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 25 Oct 2024 17:53:45 +0200 Subject: [PATCH 090/106] Auto-sync with upstream branch master Upstream commit: ac73067cb7a328bf106ecd041c020fc61be7e087 - elf: Fix map_complete Systemtap probe in dl_open_worker --- glibc.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 06c7a7f..c1cc719 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.40.9000-262-g43db5e2c06 +%global glibcsrcdir glibc-2.40.9000-263-gac73067cb7 %global glibcversion 2.40.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 9 +%global baserelease 10 Release: %{baserelease}%{?dist} # Licenses: @@ -2586,6 +2586,10 @@ update_gconv_modules_cache () %endif %changelog +* Fri Oct 25 2024 Florian Weimer - 2.40.9000-10 +- Auto-sync with upstream branch master, + commit ac73067cb7a328bf106ecd041c020fc61be7e087. + * Fri Oct 25 2024 Florian Weimer - 2.40.9000-9 - Auto-sync with upstream branch master, commit 43db5e2c0672cae7edea7c9685b22317eae25471: diff --git a/sources b/sources index 9e786ca..0b0eeba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.40.9000-262-g43db5e2c06.tar.xz) = 84375c29fc59b9b2bc435ecc937ac8769e28e407ba0340a01149e11ea6546a39684668c9b59622533c2e8effdf38c1daae90896b7ea7e80aeee4c79a9f42f371 +SHA512 (glibc-2.40.9000-263-gac73067cb7.tar.xz) = ac6e9bab9711ea09bf5c9ea2f32df4b4d166be89825f7aaac24e4c862212d172ed7aba115937adc39c4fbc95ac93f7bdc95e3a27390fc3544be01f0a878b463c From 1cbb8b93479b32be61df99603a954a321b834438 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 25 Oct 2024 14:25:08 +0200 Subject: [PATCH 091/106] Do not build and run xtests explicitly Upstream builds them unconditionally as part of make check. --- glibc.spec | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/glibc.spec b/glibc.spec index c1cc719..ee848a0 100644 --- a/glibc.spec +++ b/glibc.spec @@ -2249,18 +2249,6 @@ run_tests () { done rpmbuild.xcheck.log 2>&1 || true - if ! grep -Eq '^\s+=== Summary of results for extra tests ===$' rpmbuild.xcheck.log ; then - echo "FAIL: xcheck test suite build of target: $(basename "$(pwd)")" >& 2 - cat rpmbuild.xcheck.log - exit 1 - fi - # Unconditonally dump differences in the system call list. echo "* System call consistency checks:" >&2 cat misc/tst-syscall-list.out >&2 From 328b9681ee796ef64c30cc0525acc2b426e451d1 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 23 Oct 2024 23:27:54 +0200 Subject: [PATCH 092/106] Rework filelist construction Eliminate most pattern matching and list files explicitly. Two common exceptions are modeled explicitly: libmvec (additional shared object and static library), libnldbl (additional shared object). To implement glibc-headers-* and glibc-gconv-extra, pattern matching is still used, but with helper shell functions that allow splitting the matching and non-matching files into separate list files. Some complications arise because the build for glibc32.x86_64 installs header files into /usr/include that shouldn't land in the regular development packages. The remaining differences are bug fixes for directory ownership. /usr/libexec/glibc-benchtests is now owned by glibc-benchtests. /lib64/glibc-hwcaps is now owned by glibc.ppc64le. Differences can be checked with this script: mkdir -p filelist for x in "$@" ; do target="$(rpm -qp --qf 'filelist/%{name}.%{arch}.txt' "$x")" rpm -qp --qf '[%{filenames} %{filemodes:perms} (%{fileflags:fflags})(%{fileverifyflags:hex}) \{%{filecaps}\} %{fileusername} %{filegroupname}\n]' "$x" > "$target" done Note: Delete the *.src.rpm files because %{arch} has unexpected results for them. --- glibc.spec | 661 +++++++++++++++++++---------------------------------- 1 file changed, 232 insertions(+), 429 deletions(-) diff --git a/glibc.spec b/glibc.spec index ee848a0..38b0a5a 100644 --- a/glibc.spec +++ b/glibc.spec @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 10 +%global baserelease 11 Release: %{baserelease}%{?dist} # Licenses: @@ -238,39 +238,61 @@ Source12: ChangeLog.old # glibc_ldso: ABI-specific program interpreter name. Used for debuginfo # extraction (wrap-find-debuginfo.sh) and smoke testing ($run_ldso below). # +# glibc_has_libnldbl: -lnldbl is supported for long double as double. +# +# glibc_has_libmvec: libmvec is available. +# # glibc_rtld_early_cflags: The ABI baseline for architectures with # potentially a later baseline. The --with-rtld-early-cflags= # configure option is passed to the main glibc build if this macro is # defined. %ifarch %{ix86} %global glibc_ldso /lib/ld-linux.so.2 +%global glibc_has_libnldbl 0 +%global glibc_has_libmvec 0 %endif %ifarch aarch64 %global glibc_ldso /lib/ld-linux-aarch64.so.1 +%global glibc_has_libnldbl 0 +%global glibc_has_libmvec 1 %endif %ifarch ppc %global glibc_ldso /lib/ld.so.1 +%global glibc_has_libnldbl 1 +%global glibc_has_libmvec 0 %endif %ifarch ppc64 %global glibc_ldso /lib64/ld64.so.1 +%global glibc_has_libnldbl 1 +%global glibc_has_libmvec 0 %endif %ifarch ppc64le %global glibc_ldso /lib64/ld64.so.2 +%global glibc_has_libnldbl 1 +%global glibc_has_libmvec 0 %define glibc_rtld_early_cflags -mcpu=power8 %endif %ifarch riscv64 %global glibc_ldso /lib/ld-linux-riscv64-lp64d.so.1 +%global glibc_has_libnldbl 0 +%global glibc_has_libmvec 0 %endif %ifarch s390 %global glibc_ldso /lib/ld.so.1 +%global glibc_has_libnldbl 1 +%global glibc_has_libmvec 0 %define glibc_rtld_early_cflags -march=z13 %endif %ifarch s390x %global glibc_ldso /lib/ld64.so.1 +%global glibc_has_libnldbl 1 +%global glibc_has_libmvec 0 %define glibc_rtld_early_cflags -march=z13 %endif %ifarch x86_64 x86_64_v2 x86_64_v3 x86_64_v4 %global glibc_ldso /lib64/ld-linux-x86-64.so.2 +%global glibc_has_libnldbl 0 +%global glibc_has_libmvec 1 %define glibc_rtld_early_cflags -march=x86-64 %endif @@ -1423,9 +1445,6 @@ build build-%{target}-power10 \ # distribution that supports multiple installed glibc versions. %global glibc_sysroot $RPM_BUILD_ROOT -# Remove existing file lists. -find . -type f -name '*.filelist' -exec rm -rf {} \; - %ifarch riscv64 # RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d. # Make these be symlinks to /lib64 or /usr/lib64 respectively. See: @@ -1460,6 +1479,16 @@ popd # via hardlinks, so we must group them ourselves. hardlink -c %{glibc_sysroot}/usr/lib/locale +%if %{glibc_autorequires} +mkdir -p %{glibc_sysroot}/%{_rpmconfigdir} %{glibc_sysroot}/%{_fileattrsdir} +sed < %{SOURCE3} \ + -e s/@VERSION@/%{version}/ \ + -e s/@RELEASE@/%{baserelease}/ \ + -e s/@SYMVER@/%{glibc_autorequires_symver}/ \ + > %{glibc_sysroot}/%{_rpmconfigdir}/glibc.req +cp %{SOURCE4} %{glibc_sysroot}/%{_fileattrsdir}/glibc.attr +%endif + # Implement Changes/UsrMerge and Changes/Unify_bin_and_sbin. mv %{glibc_sysroot}/sbin/ldconfig %{glibc_sysroot}/%{_sbindir}/ %if "%{_sbindir}" == "%{_bindir}" @@ -1797,418 +1826,82 @@ popd # installed files. ############################################################################## -############################################################################## -# Build the file lists used for describing the package and subpackages. -############################################################################## -# There are several main file lists (and many more for -# the langpack sub-packages (langpack-${lang}.filelist)): -# * master.filelist -# - Master file list from which all other lists are built. -# * glibc.filelist -# - Files for the glibc packages. -# * common.filelist -# - Flies for the common subpackage. -# * utils.filelist -# - Files for the utils subpackage. -# * devel.filelist -# - Files for the devel subpackage. -# * doc.filelist -# - Files for the documentation subpackage. -# * headers.filelist -# - Files for the headers subpackage. -# * static.filelist -# - Files for the static subpackage. -# * libnsl.filelist -# - Files for the libnsl subpackage -# * nss_db.filelist -# * nss_hesiod.filelist -# - File lists for nss_* NSS module subpackages. -# * nss-devel.filelist -# - File list with the .so symbolic links for NSS packages. -# * compat-libpthread-nonshared.filelist. -# - File list for compat-libpthread-nonshared subpackage. -# * glibc32.filelist -# - Files for the glibc32 packages. +# Placement of files in subpackages is mostly controlled by the +# %%files section below. There are some exceptions where a subset of +# files are put in one package and need to be elided from another +# package, and it's not possible to do this easily using explicit file +# lists or directory matching. For these exceptions. .filelist file +# are created. -# Create the main file lists. This way we can append to any one of them later -# wihtout having to create it. Note these are removed at the start of the -# install phase. -touch master.filelist -touch glibc.filelist -touch common.filelist -touch utils.filelist -touch gconv.filelist -touch devel.filelist -touch doc.filelist -touch headers.filelist -touch static.filelist -touch libnsl.filelist -touch nss_db.filelist -touch nss_hesiod.filelist -touch nss-devel.filelist -touch compat-libpthread-nonshared.filelist -%ifarch x86_64 -touch glibc32.filelist -%endif +# Make the sorting below more consistent. +export LC_ALL=C -############################################################################### -# Master file list, excluding a few things. -############################################################################### -{ - # List all files or links that we have created during install. - # Files with 'etc' are configuration files, likewise 'gconv-modules' - # and 'gconv-modules.cache' are caches, and we exclude them. - find %{glibc_sysroot} \( -type f -o -type l \) \ - \( \ - -name etc -printf "%%%%config " -o \ - -name gconv-modules.cache \ - -printf "%%%%verify(not md5 size mtime) " -o \ - -name gconv-modules* \ - -printf "%%%%verify(not md5 size mtime) %%%%config(noreplace) " \ - , \ - ! -path "*/lib/debug/*" -printf "/%%P\n" \) - # List all directories with a %%dir prefix. We omit the info directory and - # all directories in (and including) /usr/share/locale. - find %{glibc_sysroot} -type d \ - \( -path '*%{_prefix}/share/locale' -prune -o \ - \( -path '*%{_prefix}/share/*' \ -%if %{with docs} - ! -path '*%{_infodir}' -o \ -%endif - -path "*%{_prefix}/include/*" \ - \) -printf "%%%%dir /%%P\n" \) -} | { - # Also remove the *.mo entries. We will add them to the - # language specific sub-packages. - # libnss_ files go into subpackages related to NSS modules. - # and .*/share/i18n/charmaps/.*), they go into the sub-package - # "locale-source". /sys-root/ files are put into the sysroot package. - sed -e '\,.*/share/locale/\([^/_]\+\).*/LC_MESSAGES/.*\.mo,d' \ - -e '\,.*/share/i18n/locales/.*,d' \ - -e '\,.*/share/i18n/charmaps/.*,d' \ - -e '\,.*/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\|rpc\|gai\.conf\),d' \ - -e '\,.*/%{_libdir}/lib\(pcprofile\|memusage\)\.so,d' \ - -e '\,.*/bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d' \ - -e '\,.*/sys-root,d' -} | sort > master.filelist +# `make_sysroot_filelist PATH FIND-ARGS LIST` writes %%files section +# lines for files and directories in the sysroot under PATH to the +# file LIST, with FIND-ARGS passed to the find command. The output is +# passed through sort. +make_sysroot_filelist () { + ( + find "%{glibc_sysroot}$1" \( -type f -o -type l \) $2 \ + -printf "$1/%%P\n" || true + find "%{glibc_sysroot}$1" -type d $2 -printf "%%%%dir $1/%%P\n" || true + ) | sort > "$3" +} -# The master file list is now used by each subpackage to list their own -# files. We go through each package and subpackage now and create their lists. -# Each subpackage picks the files from the master list that they need. -# The order of the subpackage list generation does not matter. +# `remove_from_filelist FILE1 FILE2` removes the lines from FILE1 +# which are also in FILE2. The lines must not contain tabs, and the +# file is sorted as a side effect. The input files must be sorted +# according to the sort command. +remove_from_filelist () { + comm -23 "$1" "$2" > "$1.tmp" + mv "$1.tmp" "$1" +} -# Make the master file list read-only after this point to avoid accidental -# modification. -chmod 0444 master.filelist - -############################################################################### -# glibc -############################################################################### - -# Add all files with the following exceptions: -# - The info files '%{_infodir}/dir' -# - The partial (lib*_p.a) static libraries, include files. -# - The static files, objects, and unversioned DSOs. -# - Share and ldconfig and iconvconfig -# - All the libnss files (we add back the ones we want later). -# - libc_malloc_debug.so, since it is a debugging library. -# - All bench test binaries. -# - The aux-cache, since it's handled specially in the files section. -# - Extra gconv modules. We add the required modules later. -cat master.filelist \ - | grep -v \ - -e '%{_infodir}' \ - -e '%{_libdir}/lib.*_p.a' \ - -e '%{_prefix}/include' \ - -e '%{_libdir}/lib.*\.a' \ - -e '%{_libdir}/.*\.o' \ - -e '%{_libdir}/lib.*\.so' \ - -e '%{_libdir}/gconv/.*\.so$' \ - -e '%{_libdir}/gconv/gconv-modules.d/gconv-modules-extra\.conf$' \ - -e '%{_prefix}/bin' \ - -e '%{_prefix}/lib/locale' \ - -e '%{_prefix}/sbin' \ - -e '%{_prefix}/share' \ - -e '/var/db/Makefile' \ - -e '/libnss_.*\.so[0-9.]*$' \ - -e '/libnsl' \ -%if %{glibc_ship_tracelibs_in_utils} - -e 'libc_malloc_debug\.so' \ -%endif - -e 'glibc-benchtests' \ - -e 'aux-cache' \ -%ifarch x86_64 -%dnl Exclude 32-bit libraries built for glibc32. - -e '/lib/.*\.o' \ - -e '/lib/.*\.a' \ - -e '/lib/.*\.so.*' \ -%endif - > glibc.filelist -cat master.filelist \ - | grep -E \ - -e 'bin/(ldconfig|iconvconfig)' \ - >> glibc.filelist - -# Add specific files: -# - The nss_files, nss_compat, and nss_db files. -# - The libmemusage.so and libpcprofile.so used by utils. -for module in compat files dns; do - cat master.filelist \ - | grep -E \ - -e "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \ -%ifarch x86_64 -%dnl Exclude 32-bit libraries built for glibc32. - | grep -v -e /lib/lib \ -%endif - >> glibc.filelist -done -grep \ -%if ! %{glibc_ship_tracelibs_in_utils} - -e "libmemusage.so" \ -%endif - -e "libpcprofile.so" \ - master.filelist \ -%ifarch x86_64 -%dnl Exclude 32-bit libraries built for glibc32. - | grep -v -e /lib/lib \ -%endif - >> glibc.filelist - -############################################################################### -# glibc-gconv-extra -############################################################################### - -grep -e "gconv-modules-extra.conf" master.filelist > gconv.filelist - -# Put the essential gconv modules into the main package. -GconvBaseModules="ISO8859-15 ISO8859-1 CP1252" -GconvBaseModules="$GconvBaseModules UNICODE UTF-16 UTF-32 UTF-7" -%ifarch s390 s390x -GconvBaseModules="$GconvBaseModules ISO-8859-1_CP037_Z900 UTF8_UTF16_Z9" -GconvBaseModules="$GconvBaseModules UTF16_UTF32_Z9 UTF8_UTF32_Z9" -%endif -GconvAllModules=$(cat master.filelist | - sed -n 's|%{_libdir}/gconv/\(.*\)\.so|\1|p') - -# Put the base modules into glibc and the rest into glibc-gconv-extra -for conv in $GconvAllModules; do - if echo $GconvBaseModules | grep -q $conv; then - grep -E -e "%{_libdir}/gconv/$conv.so$" \ - master.filelist >> glibc.filelist - else - grep -E -e "%{_libdir}/gconv/$conv.so$" \ - master.filelist >> gconv.filelist - fi -done - -############################################################################### -# glibc-devel -############################################################################### - -# Static libraries that land in glibc-devel, not glibc-static. -devel_static_library_pattern='/lib\(\(c\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\|pthread\|dl\|rt\|util\|anl\)\.a$' -# Static libraries neither in glibc-devel nor in glibc-static. -other_static_library_pattern='/libpthread_nonshared\.a' - -grep '%{_libdir}/lib.*\.a' master.filelist \ - | grep "$devel_static_library_pattern" \ - | grep -v "$other_static_library_pattern" \ -%ifarch x86_64 -%dnl Exclude 32-bit libraries built for glibc32. - | grep -v '/lib/.*\.a' \ -%endif - > devel.filelist - -# Put all of the object files and *.so (not the versioned ones) into the -# devel package. -grep '%{_libdir}/.*\.o' < master.filelist >> devel.filelist -grep '%{_libdir}/lib.*\.so' < master.filelist >> devel.filelist - -# The exceptions are: -# - libmemusage.so and libpcprofile.so in glibc used by utils. -# - libnss_*.so which are in nss-devel. -sed -i -e '\,libmemusage.so,d' \ - -e '\,libpcprofile.so,d' \ - -e '\,/libnss_[a-z]*\.so$,d' \ -%ifarch x86_64 -%dnl Exclude 32-bit libraries built for glibc32. - -e '\,/lib/.*\.so$,d' \ -%endif - devel.filelist - -%if %{glibc_autorequires} -mkdir -p %{glibc_sysroot}/%{_rpmconfigdir} %{glibc_sysroot}/%{_fileattrsdir} -sed < %{SOURCE3} \ - -e s/@VERSION@/%{version}/ \ - -e s/@RELEASE@/%{baserelease}/ \ - -e s/@SYMVER@/%{glibc_autorequires_symver}/ \ - > %{glibc_sysroot}/%{_rpmconfigdir}/glibc.req -cp %{SOURCE4} %{glibc_sysroot}/%{_fileattrsdir}/glibc.attr -%endif - -############################################################################### -# glibc-doc -############################################################################### - -%if %{with docs} -# Put the info files into the doc file list, but exclude the generated dir. -grep '%{_infodir}' master.filelist | grep -v '%{_infodir}/dir' > doc.filelist -grep '%{_docdir}' master.filelist >> doc.filelist -%endif - -############################################################################### -# glibc-headers -############################################################################### +# `split_sysroot_file_list DIR FIND-ARGS REGEXP MAIN-LIST EXCEPTIONS-LIST` +# creates a list of files in the sysroot subdirectory # DIR. +# Files and directories are enumerated with the find command, +# passing FIND-ARGS as an extra argument. Those output paths that +# match REGEXP (an POSIX extended regular expression; all whitespace +# in it is removed before matching) are put into EXCEPTIONS-LIST. The +# remaining files are put into MAIN-LIST. +split_sysroot_file_list () { + make_sysroot_filelist "$1" "$2" "$4" + grep -E -e "$(printf %%s "$3" | tr -d '[:space:]')" < "$4" > "$5" + remove_from_filelist "$4" "$5" +} +# glibc-devel historically contains a subset of the files in +# /usr/include/gnu. The remaining headers are in glibc-headers-*. +# The -regex clause skips /usr/include, which is owned by the +# filesystem package. The x86_64 exception is required because there +# are headers that should be part of the glibc32 package only. %if %{need_headers_package} -# The glibc-headers package includes only common files which are identical -# across all multilib packages. We must keep gnu/stubs.h and gnu/lib-names.h -# in the glibc-headers package, but the -32, -64, -64-v1, and -64-v2 versions -# go into glibc-devel. +split_sysroot_file_list \ + %{_includedir} '( + ! -regex .*%{_includedir}$ %ifarch x86_64 -# Hardcode 32-bit and 64-bit header names here, so that 32-bit headers end up -# in glibc32. -grep '%{_prefix}/include/gnu/stubs-64\.h$' < master.filelist >> devel.filelist || : -grep '%{_prefix}/include/gnu/lib-names-64\.h$' < master.filelist >> devel.filelist || : -grep '%{_prefix}/include/gnu/stubs-32\.h$' < master.filelist >> glibc32.filelist || : -grep '%{_prefix}/include/gnu/lib-names-32\.h$' < master.filelist >> glibc32.filelist || : -%else -grep '%{_prefix}/include/gnu/stubs-.*\.h$' < master.filelist >> devel.filelist || : -grep '%{_prefix}/include/gnu/lib-names-.*\.h$' < master.filelist >> devel.filelist || : + ! -regex .*%{_includedir}/gnu/.*-32\.h$ %endif -# Put the include files into headers file list. -grep '%{_prefix}/include' < master.filelist \ - | grep -E -v '%{_prefix}/include/gnu/stubs-.*\.h$' \ - | grep -E -v '%{_prefix}/include/gnu/lib-names-.*\.h$' \ - > headers.filelist -%else -# If there is no glibc-headers package, all header files go into the -# glibc-devel package. -grep '%{_prefix}/include' < master.filelist >> devel.filelist + )' \ + '%{_includedir}/gnu/(stubs|lib-names)-.*\.h$' \ + headers.filelist devel.filelist %endif -############################################################################### -# glibc-static -############################################################################### - -# Put the rest of the static files into the static package. -grep '%{_libdir}/lib.*\.a' < master.filelist \ - | grep -v "$devel_static_library_pattern" \ - | grep -v "$other_static_library_pattern" \ -%ifarch x86_64 -%dnl Exclude 32-bit libraries built for glibc32. - | grep -v '/lib/.*\.a' \ -%endif - > static.filelist - -############################################################################### -# glibc-common -############################################################################### - -# All of the bin and certain sbin files go into the common package except -# iconvconfig which needs to go in glibc. The iconvconfig binary is kept in -# the main glibc package because we use it in the post-install scriptlet to -# rebuild the gconv-modules.cache. The makedb binary is in nss_db. -grep -E '%{_prefix}/s?bin' master.filelist \ - | grep -vE 'bin/(makedb|iconvconfig|ldconfig|memusage|mtrace|pcprofiledump|xtrace)' \ - >> common.filelist -# All of the files under share go into the common package since they should be -# multilib-independent. -# Exceptions: -# - The actual share directory, not owned by us. -# - The info files which go into doc, and the info directory. -# - All documentation files, which go into doc. -grep '%{_prefix}/share' master.filelist \ - | grep -v \ - -e '%{_prefix}/share/info/libc.info.*' \ - -e '%%dir %{prefix}/share/info' \ - -e '%%dir %{prefix}/share' \ - -e '%{_docdir}' \ - >> common.filelist - -############################################################################### -# glibc-utils -############################################################################### - -# Add the utils scripts and programs to the utils subpackage. -cat > utils.filelist <> utils.filelist -%endif - -############################################################################### -# nss_db, nss_hesiod -############################################################################### - -# Move the NSS-related files to the NSS subpackages. Be careful not -# to pick up .debug files, and the -devel symbolic links. -for module in db hesiod; do - grep -E "/libnss_$module\\.so\\.[0-9.]+\$" \ - master.filelist > nss_$module.filelist -done -grep -E "%{_prefix}/bin/makedb$" master.filelist >> nss_db.filelist - -############################################################################### -# nss-devel -############################################################################### - -# Symlinks go into the nss-devel package (instead of the main devel -# package). -grep '/libnss_[a-z]*\.so$' master.filelist > nss-devel.filelist - -############################################################################### -# libnsl -############################################################################### - -# Prepare the libnsl-related file lists. -grep -E '/libnsl\.so\.[0-9]+$' master.filelist > libnsl.filelist -test $(wc -l < libnsl.filelist) -eq 1 - -%if %{with benchtests} -############################################################################### -# glibc-benchtests -############################################################################### - -# List of benchmarks. -find build-%{target}/benchtests -type f -executable | while read b; do - echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" -done >> benchtests.filelist -# ... and the makefile. -for b in %{SOURCE1} %{SOURCE2}; do - echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" >> benchtests.filelist -done -# ... and finally, the comparison scripts. -echo "%{_prefix}/libexec/glibc-benchtests/benchout.schema.json" >> benchtests.filelist -echo "%{_prefix}/libexec/glibc-benchtests/compare_bench.py*" >> benchtests.filelist -echo "%{_prefix}/libexec/glibc-benchtests/import_bench.py*" >> benchtests.filelist -echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.filelist -%endif - -############################################################################### -# compat-libpthread-nonshared -############################################################################### -echo "%{_libdir}/libpthread_nonshared.a" >> compat-libpthread-nonshared.filelist - -############################################################################### -# glibc32 -############################################################################### -%ifarch x86_64 -grep '/lib/.*\.o$' master.filelist >> glibc32.filelist -grep '/lib/.*\.a$' master.filelist >> glibc32.filelist -grep '/lib/.*\.so' master.filelist >> glibc32.filelist -%endif +# The primary gconv converters are in the glibc package, the rest goes +# into glibc-gconv-extra. The Z9 and Z900 subpatterns are for +# s390x-specific converters. The -name clause skips over files +# that are not loadable gconv modules. +split_sysroot_file_list \ + %{_libdir}/gconv '-name *.so' \ + 'gconv/ + (CP1252 + |ISO8859-15? + |UNICODE + |UTF-[0-9]+ + |ISO-8859-1_CP037_Z900 + |UTF(8|16)_UTF(16|32)_Z9 + )\.so$' \ + gconv-extra.filelist glibc.filelist ############################################################################## # Run the glibc testsuite @@ -2495,16 +2188,46 @@ update_gconv_modules_cache () update_gconv_modules_cache () %files -f glibc.filelist -%dir %{_prefix}/%{_lib}/audit +%{_sbindir}/ldconfig +%{_sbindir}/iconvconfig +%{_libexecdir}/getconf +%{glibc_ldso} +/%{_lib}/libBrokenLocale.so.1 +/%{_lib}/libanl.so.1 +/%{_lib}/libc.so.6 +/%{_lib}/libdl.so.2 +/%{_lib}/libm.so.6 +/%{_lib}/libnss_compat.so.2 +/%{_lib}/libnss_dns.so.2 +/%{_lib}/libnss_files.so.2 +/%{_lib}/libpthread.so.0 +/%{_lib}/libresolv.so.2 +/%{_lib}/librt.so.1 +/%{_lib}/libthread_db.so.1 +/%{_lib}/libutil.so.1 +%{_libdir}/libpcprofile.so +%{_libdir}/audit +%if %{glibc_has_libmvec} +/%{_lib}/libmvec.so.1 +%endif +%ifarch %{ix86} +# Needs to be in glibc.i686 so that glibc-utils.x86_64 can use it. +%{_libdir}/libmemusage.so +/%{_lib}/libc_malloc_debug.so.0 +%endif %if %{buildpower10} -%dir /%{_libdir}/glibc-hwcaps/power10 +%{_libdir}/glibc-hwcaps %endif %verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf %verify(not md5 size mtime) %config(noreplace) /etc/rpc %dir /etc/ld.so.conf.d -%dir %{_prefix}/libexec/getconf %dir %{_libdir}/gconv %dir %{_libdir}/gconv/gconv-modules.d +%verify(not md5 size mtime) %config(noreplace) %{_libdir}/gconv/gconv-modules +%verify(not md5 size mtime) %{_libdir}/gconv/gconv-modules.cache +%ifarch s390x +%verify(not md5 size mtime) %config(noreplace) %{_libdir}/gconv/gconv-modules.d/gconv-modules-s390.conf +%endif %dir %attr(0700,root,root) /var/cache/ldconfig %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/cache/ldconfig/aux-cache %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache @@ -2513,10 +2236,27 @@ update_gconv_modules_cache () %{!?_licensedir:%global license %%doc} %license COPYING COPYING.LIB LICENSES -%files -f common.filelist common +%files common +%{_bindir}/gencat +%{_bindir}/getconf +%{_bindir}/getent +%{_bindir}/iconv +%{_bindir}/ld.so +%{_bindir}/ldd +%{_bindir}/locale +%{_bindir}/localedef +%{_bindir}/pldd +%{_bindir}/sotruss +%{_bindir}/sprof +%{_bindir}/tzselect +%{_bindir}/zdump +%{_sbindir}/zic +%dir %{_datarootdir}/i18n +%dir %{_datarootdir}/i18n/locales +%dir %{_datarootdir}/i18n/charmaps %dir %{_prefix}/lib/locale -%dir %{_prefix}/lib/locale/C.utf8 -%{_prefix}/lib/locale/C.utf8/* +%{_datarootdir}/locale/locale.alias +%{_prefix}/lib/locale/C.utf8 %files all-langpacks %{_prefix}/lib/locale/locale-archive @@ -2524,45 +2264,98 @@ update_gconv_modules_cache () %{_prefix}/share/locale/*/LC_MESSAGES/libc.mo %files locale-source -%dir %{_prefix}/share/i18n/locales -%{_prefix}/share/i18n/locales/* -%dir %{_prefix}/share/i18n/charmaps -%{_prefix}/share/i18n/charmaps/* +%{_datarootdir}/i18n/locales +%{_datarootdir}/i18n/charmaps +%if %{need_headers_package} %files -f devel.filelist devel +%else +%files devel +%{_includedir}/* +%endif %if %{glibc_autorequires} %attr(0755,root,root) %{_rpmconfigdir}/glibc.req %{_fileattrsdir}/glibc.attr %endif - -%if %{with docs} -%files -f doc.filelist doc +%{_libdir}/*.o +%{_libdir}/libBrokenLocale.so +%{_libdir}/libanl.a +%{_libdir}/libanl.so +%{_libdir}/libc.so +%{_libdir}/libc_nonshared.a +%{_libdir}/libdl.a +%{_libdir}/libg.a +%{_libdir}/libm.so +%{_libdir}/libmcheck.a +%{_libdir}/libpthread.a +%{_libdir}/libresolv.so +%{_libdir}/librt.a +%{_libdir}/libthread_db.so +%{_libdir}/libutil.a +%if %{glibc_has_libnldbl} +%{_libdir}/libnldbl_nonshared.a +%endif +%if %{glibc_has_libmvec} +%{_libdir}/libmvec.so %endif -%files -f static.filelist static +%if %{with docs} +%files doc +%{_datarootdir}/doc +%{_infodir}/*.info* +%endif + +%files static +%{_libdir}/libBrokenLocale.a +%{_libdir}/libc.a +%{_libdir}/libm.a +%{_libdir}/libresolv.a +%if %{glibc_has_libmvec} +%{_libdir}/libm-%{version}.a +%{_libdir}/libmvec.a +%endif %if %{need_headers_package} %files -f headers.filelist -n %{headers_package_name} %endif -%files -f utils.filelist utils +%files utils +%{_bindir}/memusage +%{_bindir}/memusagestat +%{_bindir}/mtrace +%{_bindir}/pcprofiledump +%{_bindir}/xtrace +%ifnarch %{ix86} +# Needs to be in glibc.i686 so that glibc-utils.x86_64 can use it. +%{_libdir}/libmemusage.so +/%{_lib}/libc_malloc_debug.so.0 +%endif -%files -f gconv.filelist gconv-extra +%files -f gconv-extra.filelist gconv-extra +%verify(not md5 size mtime) %config(noreplace) %{_libdir}/gconv/gconv-modules.d/gconv-modules-extra.conf -%files -f nss_db.filelist -n nss_db +%files -n nss_db +%{_bindir}/makedb +/%{_lib}/libnss_db.so.2 /var/db/Makefile -%files -f nss_hesiod.filelist -n nss_hesiod +%files -n nss_hesiod +/%{_lib}/libnss_hesiod.so.2 %doc hesiod/README.hesiod -%files -f nss-devel.filelist nss-devel +%files nss-devel +%{_libdir}/libnss_compat.so +%{_libdir}/libnss_db.so +%{_libdir}/libnss_hesiod.so -%files -f libnsl.filelist -n libnsl +%files -n libnsl /%{_lib}/libnsl.so.1 %if %{with benchtests} -%files benchtests -f benchtests.filelist +%files benchtests +%{_libexecdir}/glibc-benchtests %endif -%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared +%files -n compat-libpthread-nonshared +%{_libdir}/libpthread_nonshared.a %if %{without bootstrap} %files -n sysroot-%{_arch}-%{sysroot_dist}-glibc @@ -2570,10 +2363,20 @@ update_gconv_modules_cache () %endif %ifarch x86_64 -%files -f glibc32.filelist -n glibc32 +%files -n glibc32 +%{_includedir}/gnu/lib-names-32.h +%{_includedir}/gnu/stubs-32.h +%{_prefix}/lib/*.a +%{_prefix}/lib/*.o +%{_prefix}/lib/*.so* +%{_prefix}/lib/audit/* +/lib/*.so* %endif %changelog +* Fri Oct 25 2024 Florian Weimer - 2.40.9000-11 +- Rework filelist construction + * Fri Oct 25 2024 Florian Weimer - 2.40.9000-10 - Auto-sync with upstream branch master, commit ac73067cb7a328bf106ecd041c020fc61be7e087. From 0a6148145d92e68858671dd8f59f59f7ed61ca34 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 25 Oct 2024 12:49:29 +0200 Subject: [PATCH 093/106] Use UsrMove (Changes/UsrMerge) path destination in the RPMs (#1063607) This commit updates most occurrences of /%{_lib} to %{_libdir}. The glibc build process is not changed, instead the symbolic links are created right before installing the files, to redirect them to their final locations. The symbolic links are removed again so that they do not end up in the shipped packages. --- glibc.spec | 98 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 44 deletions(-) diff --git a/glibc.spec b/glibc.spec index 38b0a5a..d3896df 100644 --- a/glibc.spec +++ b/glibc.spec @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 11 +%global baserelease 12 Release: %{baserelease}%{?dist} # Licenses: @@ -307,7 +307,7 @@ local original = rpm.expand("%{macrobody:__debug_install_post}") -- Avoid embedded newlines that confuse the macro definition. original = original:match("^%s*(.-)%s*$"):gsub("\\\n", "") rpm.define("__debug_install_post bash " .. wrapper - .. " " .. sysroot .. " %{glibc_ldso} " .. original) + .. " " .. sysroot .. " %{_prefix}%{glibc_ldso} " .. original) } # sysroot package support. These contain arch-specific packages, so @@ -363,6 +363,8 @@ Requires: filesystem(unmerged-sbin-symlinks) %endif Provides: /sbin/ldconfig Provides: /usr/sbin/ldconfig +# Historic file paths provided for backwards compatibility. +Provides: %{glibc_ldso} # The dynamic linker supports DT_GNU_HASH Provides: rtld(GNU_HASH) @@ -1445,11 +1447,20 @@ build build-%{target}-power10 \ # distribution that supports multiple installed glibc versions. %global glibc_sysroot $RPM_BUILD_ROOT +# Create symbolic links for Features/UsrMove (aka UsrMerge, MoveToUsr). +# See below: Remove UsrMove symbolic links. +usrmove_file_names="bin lib lib64 sbin" +for d in $usrmove_file_names ; do + mkdir -p "%{glibc_sysroot}/usr/$d" + ln -s "usr/$d" "%{glibc_sysroot}/$d" +done + %ifarch riscv64 -# RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d. +# RISC-V ABI wants to install everything in /usr/lib64/lp64d. +# Make these be symlinks to /usr/lib64. See: # Make these be symlinks to /lib64 or /usr/lib64 respectively. See: # https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/DRHT5YTPK4WWVGL3GIN5BF2IKX2ODHZ3/ -for d in %{glibc_sysroot}%{_libdir} %{glibc_sysroot}/%{_lib}; do +for d in %{glibc_sysroot}%{_libdir}; do mkdir -p $d (cd $d && ln -sf . lp64d) done @@ -1461,11 +1472,10 @@ pushd build-%{target}-32 %make_build install_root=%{glibc_sysroot} install popd pushd %{glibc_sysroot} -rm -rf etc sbin var usr/bin usr/lib/gconv usr/libexec usr/sbin usr/share +rm -rf etc var usr/bin usr/lib/gconv usr/libexec usr/sbin usr/share rm -f lib/libnss_db* lib/libnss_hesiod* lib/libnsl* usr/lib/libnsl* usr/lib/libnss* rm usr/lib/libc_malloc_debug.so strip -g usr/lib/*.o -mv lib/{libmemusage,libpcprofile}.so usr/lib/ popd %endif @@ -1489,8 +1499,7 @@ sed < %{SOURCE3} \ cp %{SOURCE4} %{glibc_sysroot}/%{_fileattrsdir}/glibc.attr %endif -# Implement Changes/UsrMerge and Changes/Unify_bin_and_sbin. -mv %{glibc_sysroot}/sbin/ldconfig %{glibc_sysroot}/%{_sbindir}/ +# Implement Changes/Unify_bin_and_sbin. %if "%{_sbindir}" == "%{_bindir}" mv %{glibc_sysroot}/usr/sbin/{iconvconfig,zic} %{glibc_sysroot}/%{_bindir}/ %endif @@ -1530,7 +1539,7 @@ install_different() libbase=${lib#*/} # Take care that `libbaseso' has a * that needs expanding so # take care with quoting. - libbaseso=$(basename %{glibc_sysroot}/%{_lib}/${libbase}.so.*) + libbaseso=$(basename %{glibc_sysroot}/%{_libdir}/${libbase}.so.*) # Only install if different from default build library. if cmp -s ${lib}.so ../build-%{target}/${lib}.so; then ln -sf "$subdir_up"/$libbaseso $libdestdir/$libbaseso @@ -1555,11 +1564,10 @@ popd # XXX: This looks like a bug in glibc that accidentally installed these # wrong files. We probably don't need this today. rm -f %{glibc_sysroot}/%{_libdir}/libNoVersion* -rm -f %{glibc_sysroot}/%{_lib}/libNoVersion* # Remove the old nss modules. -rm -f %{glibc_sysroot}/%{_lib}/libnss1-* -rm -f %{glibc_sysroot}/%{_lib}/libnss-*.so.1 +rm -f %{glibc_sysroot}%{_libdir}/libnss1-* +rm -f %{glibc_sysroot}%{_libdir}/libnss-*.so.1 # This statically linked binary is no longer necessary in a world where # the default Fedora install uses an initramfs, and further we have rpm-ostree @@ -1718,13 +1726,6 @@ popd rm -f %{glibc_sysroot}%{_infodir}/dir %endif -# Move libpcprofile.so and libmemusage.so into the proper library directory. -# They can be moved without any real consequences because users would not use -# them directly. -mkdir -p %{glibc_sysroot}%{_libdir} -mv -f %{glibc_sysroot}/%{_lib}/lib{pcprofile,memusage}.so \ - %{glibc_sysroot}%{_libdir} - # Disallow linking against libc_malloc_debug. rm %{glibc_sysroot}%{_libdir}/libc_malloc_debug.so @@ -1750,7 +1751,14 @@ done # that have old linker scripts that reference this file. We ship this only # in compat-libpthread-nonshared sub-package. ############################################################################## -ar cr %{glibc_sysroot}%{_prefix}/%{_lib}/libpthread_nonshared.a +ar cr %{glibc_sysroot}%{_libdir}/libpthread_nonshared.a + +# Remove UsrMove symbolic links. +# These should not end in the packaged contents. +# They are part of the filesystem package. +for d in $usrmove_file_names ; do + rm "%{glibc_sysroot}/$d" +done ############################################################################### # Sysroot package creation. @@ -1971,12 +1979,12 @@ fi echo ====================TESTING END===================== PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p' echo ====================PLT RELOCS LD.SO================ -readelf -Wr %{glibc_sysroot}/%{_lib}/ld-*.so | sed -n -e "$PLTCMD" +readelf -Wr %{glibc_sysroot}%{_libdir}/ld-*.so | sed -n -e "$PLTCMD" echo ====================PLT RELOCS LIBC.SO============== -readelf -Wr %{glibc_sysroot}/%{_lib}/libc-*.so | sed -n -e "$PLTCMD" +readelf -Wr %{glibc_sysroot}%{_libdir}/libc-*.so | sed -n -e "$PLTCMD" echo ====================PLT RELOCS END================== -run_ldso="%{glibc_sysroot}/%{glibc_ldso} --library-path %{glibc_sysroot}/%{_lib}" +run_ldso="%{glibc_sysroot}/%{_prefix}%{glibc_ldso} --library-path %{glibc_sysroot}/%{_libdir}" # Show the auxiliary vector as seen by the new library # (even if we do not perform the valgrind test). @@ -2191,29 +2199,29 @@ update_gconv_modules_cache () %{_sbindir}/ldconfig %{_sbindir}/iconvconfig %{_libexecdir}/getconf -%{glibc_ldso} -/%{_lib}/libBrokenLocale.so.1 -/%{_lib}/libanl.so.1 -/%{_lib}/libc.so.6 -/%{_lib}/libdl.so.2 -/%{_lib}/libm.so.6 -/%{_lib}/libnss_compat.so.2 -/%{_lib}/libnss_dns.so.2 -/%{_lib}/libnss_files.so.2 -/%{_lib}/libpthread.so.0 -/%{_lib}/libresolv.so.2 -/%{_lib}/librt.so.1 -/%{_lib}/libthread_db.so.1 -/%{_lib}/libutil.so.1 +%{_prefix}%{glibc_ldso} +%{_libdir}/libBrokenLocale.so.1 +%{_libdir}/libanl.so.1 +%{_libdir}/libc.so.6 +%{_libdir}/libdl.so.2 +%{_libdir}/libm.so.6 +%{_libdir}/libnss_compat.so.2 +%{_libdir}/libnss_dns.so.2 +%{_libdir}/libnss_files.so.2 +%{_libdir}/libpthread.so.0 +%{_libdir}/libresolv.so.2 +%{_libdir}/librt.so.1 +%{_libdir}/libthread_db.so.1 +%{_libdir}/libutil.so.1 %{_libdir}/libpcprofile.so %{_libdir}/audit %if %{glibc_has_libmvec} -/%{_lib}/libmvec.so.1 +%{_libdir}/libmvec.so.1 %endif %ifarch %{ix86} # Needs to be in glibc.i686 so that glibc-utils.x86_64 can use it. %{_libdir}/libmemusage.so -/%{_lib}/libc_malloc_debug.so.0 +%{_libdir}/libc_malloc_debug.so.0 %endif %if %{buildpower10} %{_libdir}/glibc-hwcaps @@ -2328,7 +2336,7 @@ update_gconv_modules_cache () %ifnarch %{ix86} # Needs to be in glibc.i686 so that glibc-utils.x86_64 can use it. %{_libdir}/libmemusage.so -/%{_lib}/libc_malloc_debug.so.0 +%{_libdir}/libc_malloc_debug.so.0 %endif %files -f gconv-extra.filelist gconv-extra @@ -2336,10 +2344,10 @@ update_gconv_modules_cache () %files -n nss_db %{_bindir}/makedb -/%{_lib}/libnss_db.so.2 +%{_libdir}/libnss_db.so.2 /var/db/Makefile %files -n nss_hesiod -/%{_lib}/libnss_hesiod.so.2 +%{_libdir}/libnss_hesiod.so.2 %doc hesiod/README.hesiod %files nss-devel %{_libdir}/libnss_compat.so @@ -2347,7 +2355,7 @@ update_gconv_modules_cache () %{_libdir}/libnss_hesiod.so %files -n libnsl -/%{_lib}/libnsl.so.1 +%{_libdir}/libnsl.so.1 %if %{with benchtests} %files benchtests @@ -2370,10 +2378,12 @@ update_gconv_modules_cache () %{_prefix}/lib/*.o %{_prefix}/lib/*.so* %{_prefix}/lib/audit/* -/lib/*.so* %endif %changelog +* Fri Oct 25 2024 Florian Weimer - 2.40.9000-12 +- Complete Features/UsrMove (aka UsrMerge, MoveToUsr) transition (#1063607) + * Fri Oct 25 2024 Florian Weimer - 2.40.9000-11 - Rework filelist construction From 9dacf7e4e90aa852bf05b7dab8540825f0619ab3 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 26 Oct 2024 01:22:06 +0200 Subject: [PATCH 094/106] Define macros that are expanded during source RPM construction for noarch Otherwise, building source RPMs in Koji chokes on directives such as Provides: %{glibc_ldso} even though these entries are not relevant to source RPMs. --- glibc.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/glibc.spec b/glibc.spec index d3896df..d83652e 100644 --- a/glibc.spec +++ b/glibc.spec @@ -296,6 +296,14 @@ Source12: ChangeLog.old %define glibc_rtld_early_cflags -march=x86-64 %endif +# This is necessary to enable source RPM building under noarch, as +# used by some build environments. +%ifarch noarch +%global glibc_ldso /lib/ld.so +%global glibc_has_libnldbl 0 +%global glibc_has_libmvec 0 +%endif + ###################################################################### # Activate the wrapper script for debuginfo generation, by rewriting # the definition of __debug_install_post. From dce3a85f6a56ac5ec562c5430c3f6f548616e4fd Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 26 Oct 2024 15:53:44 +0200 Subject: [PATCH 095/106] Add missing upstream commit description --- glibc.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index d83652e..b214a91 100644 --- a/glibc.spec +++ b/glibc.spec @@ -2397,7 +2397,8 @@ update_gconv_modules_cache () * Fri Oct 25 2024 Florian Weimer - 2.40.9000-10 - Auto-sync with upstream branch master, - commit ac73067cb7a328bf106ecd041c020fc61be7e087. + commit ac73067cb7a328bf106ecd041c020fc61be7e087: +- elf: Fix map_complete Systemtap probe in dl_open_worker * Fri Oct 25 2024 Florian Weimer - 2.40.9000-9 - Auto-sync with upstream branch master, From 8a4e95401c25bdb7513f6f5e6d78e1c1adbf04b3 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 26 Oct 2024 15:57:37 +0200 Subject: [PATCH 096/106] Restore compatibility with libglvnd --- glibc-dlopen-constructor-null-1.patch | 270 ++++++++++++++++++++++++++ glibc-dlopen-constructor-null-2.patch | 216 +++++++++++++++++++++ glibc.spec | 8 +- 3 files changed, 493 insertions(+), 1 deletion(-) create mode 100644 glibc-dlopen-constructor-null-1.patch create mode 100644 glibc-dlopen-constructor-null-2.patch diff --git a/glibc-dlopen-constructor-null-1.patch b/glibc-dlopen-constructor-null-1.patch new file mode 100644 index 0000000..e9dfb15 --- /dev/null +++ b/glibc-dlopen-constructor-null-1.patch @@ -0,0 +1,270 @@ +Author: Florian Weimer +Date: Sat Oct 26 14:16:10 2024 +0200 + + Revert "elf: Run constructors on cyclic recursive dlopen (bug 31986)" + + This reverts commit 9897ced8e78db5d813166a7ccccfd5a42c69ef20. + + Adjust the test expectations in elf/tst-dlopen-auditdup-auditmod.c + accordingly. + +Upstream: + +diff --git a/elf/Makefile b/elf/Makefile +index 9cfe7389195f8ed0..fda796f6d5e71c6a 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -415,7 +415,6 @@ tests += \ + tst-dlmopen3 \ + tst-dlmopen4 \ + tst-dlopen-auditdup \ +- tst-dlopen-recurse \ + tst-dlopen-self \ + tst-dlopen-tlsmodid \ + tst-dlopen-tlsreinit1 \ +@@ -869,8 +868,6 @@ modules-names += \ + tst-dlmopen1mod \ + tst-dlopen-auditdup-auditmod \ + tst-dlopen-auditdupmod \ +- tst-dlopen-recursemod1 \ +- tst-dlopen-recursemod2 \ + tst-dlopen-tlsreinitmod1 \ + tst-dlopen-tlsreinitmod2 \ + tst-dlopen-tlsreinitmod3 \ +@@ -3160,8 +3157,6 @@ tst-dlopen-tlsreinit3-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so + $(objpfx)tst-dlopen-tlsreinit4.out: $(objpfx)tst-auditmod1.so + tst-dlopen-tlsreinit4-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so + +-$(objpfx)tst-dlopen-recurse.out: $(objpfx)tst-dlopen-recursemod1.so +-$(objpfx)tst-dlopen-recursemod1.so: $(objpfx)tst-dlopen-recursemod2.so + tst-dlopen-auditdup-ENV = LD_AUDIT=$(objpfx)tst-dlopen-auditdup-auditmod.so + $(objpfx)tst-dlopen-auditdup.out: \ + $(objpfx)tst-dlopen-auditdupmod.so $(objpfx)tst-dlopen-auditdup-auditmod.so +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 1d943dfbc39cf977..ba3c266e6a37d6c2 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -594,14 +594,6 @@ dl_open_worker_begin (void *a) + if ((mode & RTLD_GLOBAL) && new->l_global == 0) + add_to_global_update (new); + +- /* Do not return without calling the (supposedly new) map's +- constructor. This case occurs if a dependency of a directly +- opened map has a constructor that calls dlopen again on the +- initially opened map. The new map is initialized last, so +- checking only it is enough. */ +- if (!new->l_init_called) +- _dl_catch_exception (NULL, call_dl_init, args); +- + return; + } + +diff --git a/elf/dl-support.c b/elf/dl-support.c +index 94e8197c632c11c8..451932dd03e971b8 100644 +--- a/elf/dl-support.c ++++ b/elf/dl-support.c +@@ -99,7 +99,6 @@ static struct link_map _dl_main_map = + .l_used = 1, + .l_tls_offset = NO_TLS_OFFSET, + .l_serial = 1, +- .l_init_called = 1, + }; + + /* Namespace information. */ +diff --git a/elf/tst-dlopen-auditdup-auditmod.c b/elf/tst-dlopen-auditdup-auditmod.c +index 9b67295e94d03e7a..270a595ec4de1439 100644 +--- a/elf/tst-dlopen-auditdup-auditmod.c ++++ b/elf/tst-dlopen-auditdup-auditmod.c +@@ -66,7 +66,11 @@ la_activity (uintptr_t *cookie, unsigned int flag) + _exit (1); + } + +- /* Check that the constructor has run. */ ++ /* Check that the constructor has not run. Running the ++ constructor would require constructing its dependencies, but ++ the constructor call that triggered this auditing activity ++ has not completed, and constructors among the dependencies ++ may not be able to deal with that. */ + int *status = dlsym (handle, "auditdupmod_status"); + if (status == NULL) + { +@@ -75,9 +79,9 @@ la_activity (uintptr_t *cookie, unsigned int flag) + _exit (1); + } + printf ("info: auditdupmod_status == %d\n", *status); +- if (*status != 1) ++ if (*status != 0) + { +- puts ("error: auditdupmod_status == 1 expected"); ++ puts ("error: auditdupmod_status == 0 expected"); + fflush (stdout); + _exit (1); + } +diff --git a/elf/tst-dlopen-recurse.c b/elf/tst-dlopen-recurse.c +deleted file mode 100644 +index c7fb379d373c6e77..0000000000000000 +--- a/elf/tst-dlopen-recurse.c ++++ /dev/null +@@ -1,34 +0,0 @@ +-/* Test that recursive dlopen runs constructors before return (bug 31986). +- Copyright (C) 2024 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#include +-#include +-#include +- +-static int +-do_test (void) +-{ +- void *handle = xdlopen ("tst-dlopen-recursemod1.so", RTLD_NOW); +- int *status = dlsym (handle, "recursemod1_status"); +- printf ("info: recursemod1_status == %d (from main)\n", *status); +- TEST_COMPARE (*status, 2); +- xdlclose (handle); +- return 0; +-} +- +-#include +diff --git a/elf/tst-dlopen-recursemod1.c b/elf/tst-dlopen-recursemod1.c +deleted file mode 100644 +index 5e0cc0eb8c32d6d4..0000000000000000 +--- a/elf/tst-dlopen-recursemod1.c ++++ /dev/null +@@ -1,50 +0,0 @@ +-/* Directly opened test module that gets recursively opened again. +- Copyright (C) 2024 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#include +-#include +-#include +- +-int recursemod1_status; +- +-/* Force linking against st-dlopen-recursemod2.so. Also allows +- checking for relocation. */ +-extern int recursemod2_status; +-int *force_recursemod2_reference = &recursemod2_status; +- +-static void __attribute__ ((constructor)) +-init (void) +-{ +- ++recursemod1_status; +- printf ("info: tst-dlopen-recursemod1.so constructor called (status %d)\n", +- recursemod1_status); +-} +- +-static void __attribute__ ((destructor)) +-fini (void) +-{ +- /* The recursemod1_status variable was incremented in the +- tst-dlopen-recursemod2.so constructor. */ +- printf ("info: tst-dlopen-recursemod1.so destructor called (status %d)\n", +- recursemod1_status); +- if (recursemod1_status != 2) +- { +- puts ("error: recursemod1_status == 2 expected"); +- exit (1); +- } +-} +diff --git a/elf/tst-dlopen-recursemod2.c b/elf/tst-dlopen-recursemod2.c +deleted file mode 100644 +index edd2f2526b877810..0000000000000000 +--- a/elf/tst-dlopen-recursemod2.c ++++ /dev/null +@@ -1,66 +0,0 @@ +-/* Indirectly opened module that recursively opens the directly opened module. +- Copyright (C) 2024 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#include +-#include +-#include +- +-int recursemod2_status; +- +-static void __attribute__ ((constructor)) +-init (void) +-{ +- ++recursemod2_status; +- printf ("info: tst-dlopen-recursemod2.so constructor called (status %d)\n", +- recursemod2_status); +- void *handle = dlopen ("tst-dlopen-recursemod1.so", RTLD_NOW); +- if (handle == NULL) +- { +- printf ("error: dlopen: %s\n", dlerror ()); +- exit (1); +- } +- int *status = dlsym (handle, "recursemod1_status"); +- if (status == NULL) +- { +- printf ("error: dlsym: %s\n", dlerror ()); +- exit (1); +- } +- printf ("info: recursemod1_status == %d\n", *status); +- if (*status != 1) +- { +- puts ("error: recursemod1_status == 1 expected"); +- exit (1); +- } +- ++*status; +- printf ("info: recursemod1_status == %d\n", *status); +- +- int **mod2_status = dlsym (handle, "force_recursemod2_reference"); +- if (mod2_status == NULL || *mod2_status != &recursemod2_status) +- { +- puts ("error: invalid recursemod2_status address in" +- " tst-dlopen-recursemod1.so"); +- exit (1); +- } +-} +- +-static void __attribute__ ((destructor)) +-fini (void) +-{ +- printf ("info: tst-dlopen-recursemod2.so destructor called (status %d)\n", +- recursemod2_status); +-} diff --git a/glibc-dlopen-constructor-null-2.patch b/glibc-dlopen-constructor-null-2.patch new file mode 100644 index 0000000..0d32a71 --- /dev/null +++ b/glibc-dlopen-constructor-null-2.patch @@ -0,0 +1,216 @@ +Author: Florian Weimer +Date: Sat Oct 26 14:49:57 2024 +0200 + + elf: Test dlopen (NULL, RTLD_LAZY) from an ELF constructor + + This call must not complete initialization of all shared objects + in the global scope because the ELF constructor which makes the call + likely has not finished initialization. Calling more constructors + at this point would expose those to a partially constructed + dependency. + + This completes the revert of commit 9897ced8e78db5d813166a7ccccfd5a + ("elf: Run constructors on cyclic recursive dlopen (bug 31986)"). + +Upstream: + +diff --git a/elf/Makefile b/elf/Makefile +index fda796f6d5e71c6a..2376789eadcf5250 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -415,6 +415,7 @@ tests += \ + tst-dlmopen3 \ + tst-dlmopen4 \ + tst-dlopen-auditdup \ ++ tst-dlopen-constructor-null \ + tst-dlopen-self \ + tst-dlopen-tlsmodid \ + tst-dlopen-tlsreinit1 \ +@@ -868,6 +869,8 @@ modules-names += \ + tst-dlmopen1mod \ + tst-dlopen-auditdup-auditmod \ + tst-dlopen-auditdupmod \ ++ tst-dlopen-constructor-null-mod1 \ ++ tst-dlopen-constructor-null-mod2 \ + tst-dlopen-tlsreinitmod1 \ + tst-dlopen-tlsreinitmod2 \ + tst-dlopen-tlsreinitmod3 \ +@@ -3160,3 +3163,9 @@ tst-dlopen-tlsreinit4-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so + tst-dlopen-auditdup-ENV = LD_AUDIT=$(objpfx)tst-dlopen-auditdup-auditmod.so + $(objpfx)tst-dlopen-auditdup.out: \ + $(objpfx)tst-dlopen-auditdupmod.so $(objpfx)tst-dlopen-auditdup-auditmod.so ++ ++$(objpfx)tst-dlopen-constructor-null: \ ++ $(objpfx)tst-dlopen-constructor-null-mod1.so \ ++ $(objpfx)tst-dlopen-constructor-null-mod2.so ++$(objpfx)tst-dlopen-constructor-null-mod2.so: \ ++ $(objpfx)tst-dlopen-constructor-null-mod1.so +diff --git a/elf/dl-open.c b/elf/dl-open.c +index ba3c266e6a37d6c2..8fdc631a1d32f699 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -594,6 +594,16 @@ dl_open_worker_begin (void *a) + if ((mode & RTLD_GLOBAL) && new->l_global == 0) + add_to_global_update (new); + ++ /* It is not possible to run the ELF constructor for the new ++ link map if it has not executed yet: If this dlopen call came ++ from an ELF constructor that has not put that object into a ++ consistent state, completing initialization for the entire ++ scope will expose objects that have this partially ++ constructed object among its dependencies to this ++ inconsistent state. This could happen even with a benign ++ dlopen (NULL, RTLD_LAZY) call from a constructor of an ++ initially loaded shared object. */ ++ + return; + } + +diff --git a/elf/tst-dlopen-constructor-null-mod1.c b/elf/tst-dlopen-constructor-null-mod1.c +new file mode 100644 +index 0000000000000000..70a7a0ad46a1a666 +--- /dev/null ++++ b/elf/tst-dlopen-constructor-null-mod1.c +@@ -0,0 +1,55 @@ ++/* Module calling dlopen (NULL, RTLD_LAZY) to obtain the global scope. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++ ++int mod1_status; ++ ++static void __attribute__ ((constructor)) ++init (void) ++{ ++ puts ("info: tst-dlopen-constructor-null-mod1.so constructor"); ++ ++ void *handle = dlopen (NULL, RTLD_LAZY); ++ if (handle == NULL) ++ { ++ printf ("error: %s\n", dlerror ()); ++ exit (1); ++ } ++ puts ("info: dlopen returned"); ++ if (dlsym (handle, "malloc") != malloc) ++ { ++ puts ("error: dlsym did not produce expected result"); ++ exit (1); ++ } ++ dlclose (handle); ++ ++ /* Check that the second module's constructor has not executed. */ ++ if (getenv ("mod2_status") != NULL) ++ { ++ printf ("error: mod2_status environment variable set: %s\n", ++ getenv ("mod2_status")); ++ exit (1); ++ } ++ ++ /* Communicate to the second module that the constructor executed. */ ++ mod1_status = 1; ++} +diff --git a/elf/tst-dlopen-constructor-null-mod2.c b/elf/tst-dlopen-constructor-null-mod2.c +new file mode 100644 +index 0000000000000000..d6e945beaec04815 +--- /dev/null ++++ b/elf/tst-dlopen-constructor-null-mod2.c +@@ -0,0 +1,37 @@ ++/* Module whose constructor should not be invoked by dlopen (NULL, RTLD_LAZY). ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++ ++extern int mod1_status; ++int mod2_status; ++ ++static void __attribute__ ((constructor)) ++init (void) ++{ ++ printf ("info: tst-dlopen-constructor-null-mod2.so constructor" ++ " (mod1_status=%d)", mod1_status); ++ if (!(mod1_status == 1 && mod2_status == 0)) ++ { ++ puts ("error: mod1_status == 1 && mod2_status == 0 expected"); ++ exit (1); ++ } ++ setenv ("mod2_status", "constructed", 1); ++ mod2_status = 1; ++} +diff --git a/elf/tst-dlopen-constructor-null.c b/elf/tst-dlopen-constructor-null.c +new file mode 100644 +index 0000000000000000..58c4660c7d18ca4a +--- /dev/null ++++ b/elf/tst-dlopen-constructor-null.c +@@ -0,0 +1,38 @@ ++/* Verify that dlopen (NULL, RTLD_LAZY) does not complete initialization. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* This test mimics what the glvndSetupPthreads function in libglvnd ++ does. */ ++ ++#include ++#include ++ ++/* Defined an initialized in the shared objects. */ ++extern int mod1_status; ++extern int mod2_status; ++ ++static int ++do_test (void) ++{ ++ TEST_COMPARE (mod1_status, 1); ++ TEST_COMPARE (mod2_status, 1); ++ TEST_COMPARE_STRING (getenv ("mod2_status"), "constructed"); ++ return 0; ++} ++ ++#include diff --git a/glibc.spec b/glibc.spec index b214a91..5b4ba31 100644 --- a/glibc.spec +++ b/glibc.spec @@ -169,7 +169,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 12 +%global baserelease 13 Release: %{baserelease}%{?dist} # Licenses: @@ -358,6 +358,8 @@ Patch8: glibc-fedora-manual-dircategory.patch Patch13: glibc-fedora-localedata-rh61908.patch Patch17: glibc-cs-path.patch Patch23: glibc-python3.patch +Patch24: glibc-dlopen-constructor-null-1.patch +Patch25: glibc-dlopen-constructor-null-2.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2389,6 +2391,10 @@ update_gconv_modules_cache () %endif %changelog +* Sat Oct 26 2024 Florian Weimer - 2.40.9000-13 +- Restore compatibility with libglvnd by reverting + "elf: Run constructors on cyclic recursive dlopen (bug 31986)" + * Fri Oct 25 2024 Florian Weimer - 2.40.9000-12 - Complete Features/UsrMove (aka UsrMerge, MoveToUsr) transition (#1063607) From 1fcc972d48f1fdc3346168f5fdb90875f9ed0331 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 28 Oct 2024 12:43:56 +0100 Subject: [PATCH 097/106] Eliminate glibc-headers and related packages The headers are identical except for and . Having those in glibc-devel.x86_64 as well should be harmless. RPM is expected to handle the identical files shared between glibc-devel.x86_64 and glibc-devel.i686 because it's needed for pretty much every other -devel package. --- glibc.spec | 118 ++++++++++++++++------------------------------------- 1 file changed, 35 insertions(+), 83 deletions(-) diff --git a/glibc.spec b/glibc.spec index 5b4ba31..54990b7 100644 --- a/glibc.spec +++ b/glibc.spec @@ -80,31 +80,6 @@ # glibc_shell_* below. %undefine _auto_set_build_flags -############################################################################## -# Any architecture/kernel combination that supports running 32-bit and 64-bit -# code in userspace is considered a biarch arch. -%global biarcharches %{ix86} x86_64 s390 s390x - -# Avoid generating a glibc-headers package on architectures which are -# not biarch. -%ifarch %{biarcharches} -%global need_headers_package 1 -%if 0%{?rhel} > 0 -%global headers_package_name glibc-headers -%else -%ifarch %{ix86} x86_64 -%global headers_package_name glibc-headers-x86 -%endif -%ifarch s390 s390x -%global headers_package_name glibc-headers-s390 -%endif -%dnl !rhel -%endif -%else -%global need_headers_package 0 -%dnl !biarcharches -%endif - ############################################################################## # Utility functions for pre/post scripts. Stick them at the beginning of # any lua %pre, %post, %postun, etc. sections to have them expand into @@ -169,7 +144,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 13 +%global baserelease 14 Release: %{baserelease}%{?dist} # Licenses: @@ -533,14 +508,21 @@ Requires: %{name} = %{version}-%{release} Requires: libxcrypt-devel%{_isa} >= 4.0.0 Requires: kernel-headers >= 3.2 BuildRequires: kernel-headers >= 3.2 -%if %{need_headers_package} -Requires: %{headers_package_name} = %{version}-%{release} -%endif -%if !(0%{?rhel} > 0 && %{need_headers_package}) # For backwards compatibility, when the glibc-headers package existed. Provides: glibc-headers = %{version}-%{release} Provides: glibc-headers(%{_target_cpu}) Obsoletes: glibc-headers < %{version}-%{release} +# For backwards compatibility with alternative Fedora approach to +# work around multilib issue in composes. +%if 0%{?fedora} +%ifarch x86_64 +Provides: glibc-headers-x86 = %{version}-%{release} +Obsoletes: glibc-headers-x86 < %{version}-%{release} +%endif +%ifarch s390x +Provides: glibc-headers-s390 = %{version}-%{release} +Obsoletes: glibc-headers-s390 < %{version}-%{release} +%endif %endif %description devel @@ -587,32 +569,6 @@ The glibc-static package contains the C library static libraries for -static linking. You don't need these, unless you link statically, which is highly discouraged. -############################################################################## -# glibc "headers" sub-package -# - The headers package includes all common headers that are shared amongst -# the multilib builds. It avoids file conflicts between the architecture- -# specific glibc-devel variants. -# Files like gnu/stubs.h which have gnu/stubs-32.h (i686) and gnu/stubs-64.h -# are included in glibc-headers, but the -32 and -64 files are in their -# respective i686 and x86_64 devel packages. -############################################################################## -%if %{need_headers_package} -%package -n %{headers_package_name} -Summary: Additional internal header files for glibc-devel. -Requires: %{name} = %{version}-%{release} -%if 0%{?rhel} > 0 -Provides: %{name}-headers(%{_target_cpu}) -Obsoletes: glibc-headers-x86 < %{version}-%{release} -Obsoletes: glibc-headers-s390 < %{version}-%{release} -%else -BuildArch: noarch -%endif - -%description -n %{headers_package_name} -The %{headers_package_name} package contains the architecture-specific -header files which cannot be included in glibc-devel package. -%endif - ############################################################################## # glibc "common" sub-package ############################################################################## @@ -1487,6 +1443,8 @@ rm -f lib/libnss_db* lib/libnss_hesiod* lib/libnsl* usr/lib/libnsl* usr/lib/libn rm usr/lib/libc_malloc_debug.so strip -g usr/lib/*.o popd +mkdir glibc32-headers +cp -a %{glibc_sysroot}%{_includedir} glibc32-headers %endif # Build and install: @@ -1499,6 +1457,23 @@ popd # via hardlinks, so we must group them ourselves. hardlink -c %{glibc_sysroot}/usr/lib/locale +%ifarch x86_64 +# Verify that there are no unexpected differences in the header files common +# between i386 and x86_64. +diff -ur %{glibc_sysroot}%{_includedir} glibc32-headers/include \ + > glibc-32-64.diff || true +if test -s glibc-32-64.diff ; then + if test $(grep -v '^Only in ' glibc-32-64.diff | wc -l) -ne 0; then + : Unexpected header file differences + exit 1 + fi +else + : Missing additional stubs header files. +fi +rm glibc-32-64.diff +rm -rf glibc32-headers +%endif + %if %{glibc_autorequires} mkdir -p %{glibc_sysroot}/%{_rpmconfigdir} %{glibc_sysroot}/%{_fileattrsdir} sed < %{SOURCE3} \ @@ -1888,23 +1863,6 @@ split_sysroot_file_list () { remove_from_filelist "$4" "$5" } -# glibc-devel historically contains a subset of the files in -# /usr/include/gnu. The remaining headers are in glibc-headers-*. -# The -regex clause skips /usr/include, which is owned by the -# filesystem package. The x86_64 exception is required because there -# are headers that should be part of the glibc32 package only. -%if %{need_headers_package} -split_sysroot_file_list \ - %{_includedir} '( - ! -regex .*%{_includedir}$ -%ifarch x86_64 - ! -regex .*%{_includedir}/gnu/.*-32\.h$ -%endif - )' \ - '%{_includedir}/gnu/(stubs|lib-names)-.*\.h$' \ - headers.filelist devel.filelist -%endif - # The primary gconv converters are in the glibc package, the rest goes # into glibc-gconv-extra. The Z9 and Z900 subpatterns are for # s390x-specific converters. The -name clause skips over files @@ -2285,12 +2243,8 @@ update_gconv_modules_cache () %{_datarootdir}/i18n/locales %{_datarootdir}/i18n/charmaps -%if %{need_headers_package} -%files -f devel.filelist devel -%else %files devel %{_includedir}/* -%endif %if %{glibc_autorequires} %attr(0755,root,root) %{_rpmconfigdir}/glibc.req %{_fileattrsdir}/glibc.attr @@ -2333,10 +2287,6 @@ update_gconv_modules_cache () %{_libdir}/libmvec.a %endif -%if %{need_headers_package} -%files -f headers.filelist -n %{headers_package_name} -%endif - %files utils %{_bindir}/memusage %{_bindir}/memusagestat @@ -2382,8 +2332,7 @@ update_gconv_modules_cache () %ifarch x86_64 %files -n glibc32 -%{_includedir}/gnu/lib-names-32.h -%{_includedir}/gnu/stubs-32.h +# All headers are contained in glibc-devel.x86_64. %{_prefix}/lib/*.a %{_prefix}/lib/*.o %{_prefix}/lib/*.so* @@ -2391,6 +2340,9 @@ update_gconv_modules_cache () %endif %changelog +* Mon Oct 28 2024 Florian Weimer - 2.40.9000-14 +- Eliminate the glibc-headers package + * Sat Oct 26 2024 Florian Weimer - 2.40.9000-13 - Restore compatibility with libglvnd by reverting "elf: Run constructors on cyclic recursive dlopen (bug 31986)" From a766afca020b0cf389de4602f6c53d7d8b45a0e3 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 28 Oct 2024 13:17:37 +0100 Subject: [PATCH 098/106] Use rpm.spawn instead of posix.fork if availabe (#2291869) --- glibc.spec | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/glibc.spec b/glibc.spec index 54990b7..1cf6f75 100644 --- a/glibc.spec +++ b/glibc.spec @@ -99,13 +99,21 @@ -- Open-code rpm.execute with error message handling. function post_exec (msg, program, ...) - local pid = posix.fork () - if pid == 0 then - posix.exec (program, ...) - io.stdout:write (msg) - assert (nil) - elseif pid > 0 then - posix.wait (pid) + if rpm.spawn ~= nil then + local status = rpm.spawn ({program, ...}) + if status == nil then + io.stdout:write (msg) + assert (nil) + end + else + local pid = posix.fork () + if pid == 0 then + posix.exec (program, ...) + io.stdout:write (msg) + assert (nil) + elseif pid > 0 then + posix.wait (pid) + end end end @@ -144,7 +152,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 14 +%global baserelease 15 Release: %{baserelease}%{?dist} # Licenses: @@ -2122,12 +2130,17 @@ update_gconv_modules_cache() if tonumber(arg[2]) >= 2 and posix.access("%{_prefix}/bin/systemctl", "x") then - local pid = posix.fork() - if pid == 0 then - posix.redirect2null(2) - posix.exec("%{_prefix}/bin/systemctl", "daemon-reexec") - elseif pid > 0 then - posix.wait(pid) + if rpm.spawn ~= nil then + rpm.spawn ({"%{_prefix}/bin/systemctl", "daemon-reexec"}, + {stderr="/dev/null"}) + else + local pid = posix.fork() + if pid == 0 then + posix.redirect2null(2) + posix.exec("%{_prefix}/bin/systemctl", "daemon-reexec") + elseif pid > 0 then + posix.wait(pid) + end end end @@ -2340,6 +2353,9 @@ update_gconv_modules_cache () %endif %changelog +* Mon Oct 28 2024 Florian Weimer - 2.40.9000-15 +- Use rpm.spawn instead of posix.fork if availabe (#2291869) + * Mon Oct 28 2024 Florian Weimer - 2.40.9000-14 - Eliminate the glibc-headers package From 7a7420d7f4a927448cb0064a0def0b53000f5dff Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Tue, 15 Oct 2024 10:55:47 +0200 Subject: [PATCH 099/106] Regression/bz434601-timedlock-segfault: use pthread in compilation We use fedora tests for RHEL testing as well and some of the older releases do not have libpthread -> libc merge, so we need the '-pthread' option to compile the tests successfully. --- tests/Regression/bz434601-timedlock-segfault/runtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Regression/bz434601-timedlock-segfault/runtest.sh b/tests/Regression/bz434601-timedlock-segfault/runtest.sh index a451879..b1bdd39 100755 --- a/tests/Regression/bz434601-timedlock-segfault/runtest.sh +++ b/tests/Regression/bz434601-timedlock-segfault/runtest.sh @@ -40,7 +40,7 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest - rlRun -c "gcc ${TESTPROG}.c -o $TESTPROG" + rlRun -c "gcc -pthread ${TESTPROG}.c -o $TESTPROG" rlAssertExists "$TESTPROG" rlRun -c "./${TESTPROG}" rlPhaseEnd From cd8af7b147bb5b2c55428deae409a2ac982466d5 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 4 Nov 2024 16:33:51 +0100 Subject: [PATCH 100/106] Exclude 32-bit headers from the x86_64 package The files in glibc-devel.x86_64 caused the llvm architecture detection to fail. It also changes the error message back to the familiar: /usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory Instead of the new one: /usr/bin/ld: cannot find crt1.o: No such file or directory --- glibc.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/glibc.spec b/glibc.spec index 1cf6f75..15bc505 100644 --- a/glibc.spec +++ b/glibc.spec @@ -152,7 +152,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 15 +%global baserelease 16 Release: %{baserelease}%{?dist} # Licenses: @@ -2283,6 +2283,11 @@ update_gconv_modules_cache () %if %{glibc_has_libmvec} %{_libdir}/libmvec.so %endif +%ifarch x86_64 +# This files are included in the buildroot for glibc32 below. +%exclude %{_includedir}/gnu/lib-names-32.h +%exclude %{_includedir}/gnu/stubs-32.h +%endif %if %{with docs} %files doc @@ -2345,7 +2350,8 @@ update_gconv_modules_cache () %ifarch x86_64 %files -n glibc32 -# All headers are contained in glibc-devel.x86_64. +%{_includedir}/gnu/lib-names-32.h +%{_includedir}/gnu/stubs-32.h %{_prefix}/lib/*.a %{_prefix}/lib/*.o %{_prefix}/lib/*.so* @@ -2353,6 +2359,9 @@ update_gconv_modules_cache () %endif %changelog +* Mon Nov 4 2024 Florian Weimer - 2.40.9000-16 +- Exclude 32-bit headers from the x86_64 package + * Mon Oct 28 2024 Florian Weimer - 2.40.9000-15 - Use rpm.spawn instead of posix.fork if availabe (#2291869) From d48dfabacb677b3a1a74cac795cfce0d81a2f507 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 11 Nov 2024 17:11:32 -0500 Subject: [PATCH 101/106] Auto-sync with upstream branch master, Upstream commit: 7b544224f82d20019f9b28522ebf8114a372d1a2 - stat.h: Fix missing declaration of struct timespec - mach: Fix __xpg_strerror_r on in-range but undefined errors [BZ #32350] - x86/string: Use `movsl` instead of `movsd` [BZ #32344] - Rename new tst-sem17 test to tst-sem18 - Avoid uninitialized result in sem_open when file does not exist - nptl: initialize rseq area prior to registration - s390x: Update ulps - elf: avoid jumping over a needed declaration - math: Fix log10f on some ABIs - stdio-common: Add tests for formatted vsnprintf output specifiers - stdio-common: Add tests for formatted vsprintf output specifiers - stdio-common: Add tests for formatted vfprintf output specifiers - stdio-common: Add tests for formatted vdprintf output specifiers - stdio-common: Add tests for formatted vasprintf output specifiers - stdio-common: Add tests for formatted vprintf output specifiers - stdio-common: Add tests for formatted snprintf output specifiers - stdio-common: Add tests for formatted sprintf output specifiers - stdio-common: Add tests for formatted fprintf output specifiers - stdio-common: Add tests for formatted dprintf output specifiers - stdio-common: Add tests for formatted asprintf output specifiers - stdio-common: Add tests for formatted printf output specifiers - nptl: fix __builtin_thread_pointer detection on LoongArch - math: Fix incorrect results of exp10m1f with some GCC versions - misc: Align argument name for pkey_*() functions with the manual - manual: Use more precise wording for memory protection keys - elf: Switch to main malloc after final ld.so self-relocation - elf: Introduce _dl_relocate_object_no_relro - elf: Do not define consider_profiling, consider_symbind as macros - elf: rtld_multiple_ref is always true - Add Arm HWCAP2_* constants from Linux 3.15 and 6.2 to - Add feature test macro _ISOC2Y_SOURCE - added license for sysdeps/ieee754/flt-32/e_gammaf_r.c - AArch64: Remove SVE erf and erfc tables - x86_64: Add exp2m1f with FMA - x86_64: Add exp10m1f with FMA - math: Use log10p1f from CORE-MATH - math: Use log1pf from CORE-MATH - math: Use log2p1f from CORE-MATH - math: Use log10f from CORE-MATH - math: Use expm1f from CORE-MATH - math: Use exp2m1f from CORE-MATH - math: Use exp10m1f from CORE-MATH - benchtests: Add log10p1f benchmark - benchtests: Add log1p benchmark - benchtests: Add log2p1f benchmark - benchtests: Add log10f benchmark - benchtests: Add expm1f benchmark - benchtests: Add exp2m1f benchmark - benchtests: Add exp10m1f benchmark - math: Add e_gammaf_r to glibc code and style - LoongArch: Add RSEQ_SIG in rseq.h. - nptl: Add for LoongArch - Link tst-clock_gettime with $(librt) - powerpc64: Obviate the need for ROP protection in clone/clone3 - Add tests of time, gettimeofday, clock_gettime - Add more tests of pthread attributes initial values - Document further requirement on mixing streams / file descriptors - powerpc64le: Adhere to ABI stack alignment requirement - AArch64: Small optimisation in AdvSIMD erf and erfc - Revert "elf: Run constructors on cyclic recursive dlopen (bug 31986)" - elf: Change ldconfig auxcache magic number (bug 32231) - SHARED-FILES: Mention bundled Linux 6.10 headers. - libio: Fix crash in fputws [BZ #20632] - stdio-common: Fix scanf parsing for NaN types [BZ #30647] --- glibc-add-back-support-non-glibc.patch | 237 ++++++++++++++++++++++ glibc-dlopen-constructor-null-1.patch | 270 ------------------------- glibc-dlopen-constructor-null-2.patch | 216 -------------------- glibc.spec | 75 ++++++- sources | 2 +- 5 files changed, 309 insertions(+), 491 deletions(-) create mode 100644 glibc-add-back-support-non-glibc.patch delete mode 100644 glibc-dlopen-constructor-null-1.patch delete mode 100644 glibc-dlopen-constructor-null-2.patch diff --git a/glibc-add-back-support-non-glibc.patch b/glibc-add-back-support-non-glibc.patch new file mode 100644 index 0000000..f6be9a8 --- /dev/null +++ b/glibc-add-back-support-non-glibc.patch @@ -0,0 +1,237 @@ +From patchwork Tue Nov 12 11:48:47 2024 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +X-Patchwork-Submitter: Florian Weimer +X-Patchwork-Id: 100853 +Return-Path: +X-Original-To: patchwork@sourceware.org +Delivered-To: patchwork@sourceware.org +Received: from server2.sourceware.org (localhost [IPv6:::1]) + by sourceware.org (Postfix) with ESMTP id 889EF385840B + for ; Tue, 12 Nov 2024 11:49:30 +0000 (GMT) +X-Original-To: libc-alpha@sourceware.org +Delivered-To: libc-alpha@sourceware.org +Received: from us-smtp-delivery-124.mimecast.com + (us-smtp-delivery-124.mimecast.com [170.10.133.124]) + by sourceware.org (Postfix) with ESMTP id 8F45D3858D20 + for ; Tue, 12 Nov 2024 11:48:54 +0000 (GMT) +DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F45D3858D20 +Authentication-Results: sourceware.org; + dmarc=pass (p=none dis=none) header.from=redhat.com +Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com +ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8F45D3858D20 +Authentication-Results: server2.sourceware.org; + arc=none smtp.remote-ip=170.10.133.124 +ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731412140; cv=none; + b=fHXFiaPL6c6UgfShfJ6zG7APVYTybY7wpLlkMpjUKBOLz2BtIsVon8qFGP+AAWEtvXJiZ3d6QAKfjvJkuuidZCtwx3jR3oJh9RnzXjKAsvQ26kzR1S1VreHwSu10NI7rzzqHCOaA0qq/CQKbZvHsAtAxcQUxhVvV7ana8xsfpkw= +ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; + t=1731412140; c=relaxed/simple; + bh=GJcAbo0Ltt+ruaCIXEv0WhSaSGajwEfCIqCcb8Bh0yo=; + h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; + b=f80gjj3F4KkcOyl3fTzi679BfFgci50PrOWK1gEFThaFda8w0kw8AftbXsrAhwfMJP2oHs+xB7S630IY0mGaPNgtj7147nItmY4OQ2fHSqq0+69LNRz6OJ9RWtLVTu7aDxq9EP0QOgtDFjK2wqXkrMPgx4pxdtY4Ft1nhkjzSwU= +ARC-Authentication-Results: i=1; server2.sourceware.org +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; + s=mimecast20190719; t=1731412134; + h=from:from:reply-to:subject:subject:date:date:message-id:message-id: + to:to:cc:mime-version:mime-version:content-type:content-type: + content-transfer-encoding:content-transfer-encoding; + bh=qFJ5e+OXYQcfwJXdpuYOsUX6oYHcoUs0fZ/verutR9A=; + b=MZplBqzoEgSFEXjG03xvIEcedfQ/4HHm5BXZ5ZjKRwafIcEpn3+ycicx4A436vGFBKeii8 + McwAO5Yg+cbQ/PW8hiFsgH9pA+mm+PBtyVs5gDz/jz/IEZWunyk4TFpjQdvowkO69ySp5S + ns4DHhrxnIaGVd9cjZnkEK8K/BKJEjo= +Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com + (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by + relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, + cipher=TLS_AES_256_GCM_SHA384) id us-mta-648-UXK_ODp5OAOeOEkxd8brhw-1; Tue, + 12 Nov 2024 06:48:52 -0500 +X-MC-Unique: UXK_ODp5OAOeOEkxd8brhw-1 +X-Mimecast-MFC-AGG-ID: UXK_ODp5OAOeOEkxd8brhw +Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com + (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) + (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) + key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest + SHA256) + (No client certificate requested) + by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS + id 040B619560BA + for ; Tue, 12 Nov 2024 11:48:52 +0000 (UTC) +Received: from oldenburg.str.redhat.com (unknown [10.39.192.74]) + by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with + ESMTPS + id 1DC981956086 + for ; Tue, 12 Nov 2024 11:48:50 +0000 (UTC) +From: Florian Weimer +To: libc-alpha@sourceware.org +Subject: [PATCH v3] elf: Add back support for programs that do not load + libc.so +Date: Tue, 12 Nov 2024 12:48:47 +0100 +Message-ID: <87v7wsn04g.fsf@oldenburg.str.redhat.com> +User-Agent: Gnus/5.13 (Gnus v5.13) +MIME-Version: 1.0 +X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 +X-Mimecast-Spam-Score: 0 +X-Mimecast-MFC-PROC-ID: Jq-vIr9iQTPt_3zLeAdPUKT-6SHShFllhBNSEuv7d9I_1731412132 +X-Mimecast-Originator: redhat.com +X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, + DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, + KAM_SHORT, + RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, + SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 +X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on + server2.sourceware.org +X-BeenThere: libc-alpha@sourceware.org +X-Mailman-Version: 2.1.30 +Precedence: list +List-Id: Libc-alpha mailing list +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org + +Commit 8f8dd904c4a2207699bb666f30acceb5209c8d3f (“elf: +rtld_multiple_ref is always true”) removed some code that happened +to enable compatibility with programs that do not link against +libc.so. Such programs cannot call dlopen or any dynamic linker +functions (except __tls_get_addr), so this is not really useful. +Still ld.so should not crash with a null-pointer dereference +or undefined symbol reference in these cases. +--- +v3: Fix typo flagged by Andreas. Avoid make warning about redefined + elf/tst-nolink-libc rule. Link with -E to make __stack_chk_guard + available for reference from ld.so (although ld.so really should + not have such a symbol reference from ld.so to libc.so, but it + occurs on the Linaro builders). + elf/Makefile | 11 +++++++++++ + elf/dl-minimal.c | 5 +++++ + sysdeps/nptl/dl-mutex.c | 4 ++++ + sysdeps/unix/sysv/linux/Makefile | 5 +++++ + sysdeps/unix/sysv/linux/arm/Makefile | 3 +++ + sysdeps/unix/sysv/linux/tst-nolink-libc.c | 32 +++++++++++++++++++++++++++++++ + 6 files changed, 60 insertions(+) + + +base-commit: f745d78e2628cd5b13ca119ae0c0e21d08ad1906 + +diff --git a/elf/Makefile b/elf/Makefile +index 3a1cb72955..834b565693 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -3169,3 +3169,14 @@ tst-rtld-no-malloc-audit-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so + + # Any shared object should do. + tst-rtld-no-malloc-preload-ENV = LD_PRELOAD=$(objpfx)tst-auditmod1.so ++ ++# These rules link (without libc.so) and run the special ++# elf/tst-nolink-libc test if a port adds it to the tests variables. ++# The test is always run directly, not under the dynamic linker. ++# Link with -E to export the __stack_chk_guard variable. ++$(objpfx)tst-nolink-libc: $(objpfx)tst-nolink-libc.o $(objpfx)ld.so ++ $(LINK.o) -nostdlib -nostartfiles -o $@ $< \ ++ -Wl,-E,--dynamic-link=$(objpfx)ld.so $(objpfx)ld.so ++CFLAGS-tst-nolink-libc.c += $(no-stack-protector) ++$(objpfx)tst-nolink-libc.out: $(objpfx)tst-nolink-libc $(objpfx)ld.so ++ $< > $@ 2>&1; $(evaluate-test) +diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c +index dfa0764f58..d22a428964 100644 +--- a/elf/dl-minimal.c ++++ b/elf/dl-minimal.c +@@ -82,6 +82,11 @@ __rtld_malloc_init_real (struct link_map *main_map) + rtld relocation (which enables RELRO, after which the pointer + variables cannot be written to). */ + ++ if (GL (dl_ns)[LM_ID_BASE].libc_map == NULL) ++ /* Nothing is linked against libc.so, which means that there is no ++ malloc implementation available. */ ++ return; ++ + struct r_found_version version; + version.name = symbol_version_string (libc, GLIBC_2_0); + version.hidden = 0; +diff --git a/sysdeps/nptl/dl-mutex.c b/sysdeps/nptl/dl-mutex.c +index 8d123cbb2f..85c71c1f81 100644 +--- a/sysdeps/nptl/dl-mutex.c ++++ b/sysdeps/nptl/dl-mutex.c +@@ -35,6 +35,10 @@ __rtld_mutex_init (void) + constructor while holding loader locks. */ + + struct link_map *libc_map = GL (dl_ns)[LM_ID_BASE].libc_map; ++ if (libc_map == NULL) ++ /* Special case: the program links against ld.so, but not libc.so, ++ so the full locking implementation is not available. */ ++ return; + + const ElfW(Sym) *sym + = _dl_lookup_direct (libc_map, "pthread_mutex_lock", +diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile +index 527c7a5ae8..c87daaba90 100644 +--- a/sysdeps/unix/sysv/linux/Makefile ++++ b/sysdeps/unix/sysv/linux/Makefile +@@ -652,7 +652,12 @@ install-bin += \ + # install-bin + + $(objpfx)pldd: $(objpfx)xmalloc.o ++ ++test-internal-extras += tst-nolink-libc ++ifeq ($(run-built-tests),yes) ++tests-special += $(objpfx)tst-nolink-libc.out + endif ++endif # $(subdir) == elf + + ifeq ($(subdir),rt) + CFLAGS-mq_send.c += -fexceptions +diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile +index a73c897f43..e73ce4f811 100644 +--- a/sysdeps/unix/sysv/linux/arm/Makefile ++++ b/sysdeps/unix/sysv/linux/arm/Makefile +@@ -1,5 +1,8 @@ + ifeq ($(subdir),elf) + sysdep-rtld-routines += aeabi_read_tp libc-do-syscall ++# The test uses INTERNAL_SYSCALL_CALL. In thumb mode, this uses ++# an undefined reference to __libc_do_syscall. ++CFLAGS-tst-nolink-libc.c += -marm + endif + + ifeq ($(subdir),misc) +diff --git a/sysdeps/unix/sysv/linux/tst-nolink-libc.c b/sysdeps/unix/sysv/linux/tst-nolink-libc.c +new file mode 100644 +index 0000000000..ad697e6674 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/tst-nolink-libc.c +@@ -0,0 +1,32 @@ ++/* Test program not linked against libc.so and not using any glibc functions. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++ ++/* On some build configurations, the main program contains a reference ++ to __stack_chk_guard, but that cannot be resolved because this test ++ does not link against libc.so. Provide a definition here, so that ++ program is able to run. Zero is a permitted, but unlikely value ++ for the stack guard. */ ++void *__stack_chk_guard; ++ ++void ++_start (void) ++{ ++ INTERNAL_SYSCALL_CALL (exit_group, 0); ++} diff --git a/glibc-dlopen-constructor-null-1.patch b/glibc-dlopen-constructor-null-1.patch deleted file mode 100644 index e9dfb15..0000000 --- a/glibc-dlopen-constructor-null-1.patch +++ /dev/null @@ -1,270 +0,0 @@ -Author: Florian Weimer -Date: Sat Oct 26 14:16:10 2024 +0200 - - Revert "elf: Run constructors on cyclic recursive dlopen (bug 31986)" - - This reverts commit 9897ced8e78db5d813166a7ccccfd5a42c69ef20. - - Adjust the test expectations in elf/tst-dlopen-auditdup-auditmod.c - accordingly. - -Upstream: - -diff --git a/elf/Makefile b/elf/Makefile -index 9cfe7389195f8ed0..fda796f6d5e71c6a 100644 ---- a/elf/Makefile -+++ b/elf/Makefile -@@ -415,7 +415,6 @@ tests += \ - tst-dlmopen3 \ - tst-dlmopen4 \ - tst-dlopen-auditdup \ -- tst-dlopen-recurse \ - tst-dlopen-self \ - tst-dlopen-tlsmodid \ - tst-dlopen-tlsreinit1 \ -@@ -869,8 +868,6 @@ modules-names += \ - tst-dlmopen1mod \ - tst-dlopen-auditdup-auditmod \ - tst-dlopen-auditdupmod \ -- tst-dlopen-recursemod1 \ -- tst-dlopen-recursemod2 \ - tst-dlopen-tlsreinitmod1 \ - tst-dlopen-tlsreinitmod2 \ - tst-dlopen-tlsreinitmod3 \ -@@ -3160,8 +3157,6 @@ tst-dlopen-tlsreinit3-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so - $(objpfx)tst-dlopen-tlsreinit4.out: $(objpfx)tst-auditmod1.so - tst-dlopen-tlsreinit4-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so - --$(objpfx)tst-dlopen-recurse.out: $(objpfx)tst-dlopen-recursemod1.so --$(objpfx)tst-dlopen-recursemod1.so: $(objpfx)tst-dlopen-recursemod2.so - tst-dlopen-auditdup-ENV = LD_AUDIT=$(objpfx)tst-dlopen-auditdup-auditmod.so - $(objpfx)tst-dlopen-auditdup.out: \ - $(objpfx)tst-dlopen-auditdupmod.so $(objpfx)tst-dlopen-auditdup-auditmod.so -diff --git a/elf/dl-open.c b/elf/dl-open.c -index 1d943dfbc39cf977..ba3c266e6a37d6c2 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -594,14 +594,6 @@ dl_open_worker_begin (void *a) - if ((mode & RTLD_GLOBAL) && new->l_global == 0) - add_to_global_update (new); - -- /* Do not return without calling the (supposedly new) map's -- constructor. This case occurs if a dependency of a directly -- opened map has a constructor that calls dlopen again on the -- initially opened map. The new map is initialized last, so -- checking only it is enough. */ -- if (!new->l_init_called) -- _dl_catch_exception (NULL, call_dl_init, args); -- - return; - } - -diff --git a/elf/dl-support.c b/elf/dl-support.c -index 94e8197c632c11c8..451932dd03e971b8 100644 ---- a/elf/dl-support.c -+++ b/elf/dl-support.c -@@ -99,7 +99,6 @@ static struct link_map _dl_main_map = - .l_used = 1, - .l_tls_offset = NO_TLS_OFFSET, - .l_serial = 1, -- .l_init_called = 1, - }; - - /* Namespace information. */ -diff --git a/elf/tst-dlopen-auditdup-auditmod.c b/elf/tst-dlopen-auditdup-auditmod.c -index 9b67295e94d03e7a..270a595ec4de1439 100644 ---- a/elf/tst-dlopen-auditdup-auditmod.c -+++ b/elf/tst-dlopen-auditdup-auditmod.c -@@ -66,7 +66,11 @@ la_activity (uintptr_t *cookie, unsigned int flag) - _exit (1); - } - -- /* Check that the constructor has run. */ -+ /* Check that the constructor has not run. Running the -+ constructor would require constructing its dependencies, but -+ the constructor call that triggered this auditing activity -+ has not completed, and constructors among the dependencies -+ may not be able to deal with that. */ - int *status = dlsym (handle, "auditdupmod_status"); - if (status == NULL) - { -@@ -75,9 +79,9 @@ la_activity (uintptr_t *cookie, unsigned int flag) - _exit (1); - } - printf ("info: auditdupmod_status == %d\n", *status); -- if (*status != 1) -+ if (*status != 0) - { -- puts ("error: auditdupmod_status == 1 expected"); -+ puts ("error: auditdupmod_status == 0 expected"); - fflush (stdout); - _exit (1); - } -diff --git a/elf/tst-dlopen-recurse.c b/elf/tst-dlopen-recurse.c -deleted file mode 100644 -index c7fb379d373c6e77..0000000000000000 ---- a/elf/tst-dlopen-recurse.c -+++ /dev/null -@@ -1,34 +0,0 @@ --/* Test that recursive dlopen runs constructors before return (bug 31986). -- Copyright (C) 2024 Free Software Foundation, Inc. -- This file is part of the GNU C Library. -- -- The GNU C Library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or (at your option) any later version. -- -- The GNU C Library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public -- License along with the GNU C Library; if not, see -- . */ -- --#include --#include --#include -- --static int --do_test (void) --{ -- void *handle = xdlopen ("tst-dlopen-recursemod1.so", RTLD_NOW); -- int *status = dlsym (handle, "recursemod1_status"); -- printf ("info: recursemod1_status == %d (from main)\n", *status); -- TEST_COMPARE (*status, 2); -- xdlclose (handle); -- return 0; --} -- --#include -diff --git a/elf/tst-dlopen-recursemod1.c b/elf/tst-dlopen-recursemod1.c -deleted file mode 100644 -index 5e0cc0eb8c32d6d4..0000000000000000 ---- a/elf/tst-dlopen-recursemod1.c -+++ /dev/null -@@ -1,50 +0,0 @@ --/* Directly opened test module that gets recursively opened again. -- Copyright (C) 2024 Free Software Foundation, Inc. -- This file is part of the GNU C Library. -- -- The GNU C Library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or (at your option) any later version. -- -- The GNU C Library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public -- License along with the GNU C Library; if not, see -- . */ -- --#include --#include --#include -- --int recursemod1_status; -- --/* Force linking against st-dlopen-recursemod2.so. Also allows -- checking for relocation. */ --extern int recursemod2_status; --int *force_recursemod2_reference = &recursemod2_status; -- --static void __attribute__ ((constructor)) --init (void) --{ -- ++recursemod1_status; -- printf ("info: tst-dlopen-recursemod1.so constructor called (status %d)\n", -- recursemod1_status); --} -- --static void __attribute__ ((destructor)) --fini (void) --{ -- /* The recursemod1_status variable was incremented in the -- tst-dlopen-recursemod2.so constructor. */ -- printf ("info: tst-dlopen-recursemod1.so destructor called (status %d)\n", -- recursemod1_status); -- if (recursemod1_status != 2) -- { -- puts ("error: recursemod1_status == 2 expected"); -- exit (1); -- } --} -diff --git a/elf/tst-dlopen-recursemod2.c b/elf/tst-dlopen-recursemod2.c -deleted file mode 100644 -index edd2f2526b877810..0000000000000000 ---- a/elf/tst-dlopen-recursemod2.c -+++ /dev/null -@@ -1,66 +0,0 @@ --/* Indirectly opened module that recursively opens the directly opened module. -- Copyright (C) 2024 Free Software Foundation, Inc. -- This file is part of the GNU C Library. -- -- The GNU C Library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public -- License as published by the Free Software Foundation; either -- version 2.1 of the License, or (at your option) any later version. -- -- The GNU C Library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- Lesser General Public License for more details. -- -- You should have received a copy of the GNU Lesser General Public -- License along with the GNU C Library; if not, see -- . */ -- --#include --#include --#include -- --int recursemod2_status; -- --static void __attribute__ ((constructor)) --init (void) --{ -- ++recursemod2_status; -- printf ("info: tst-dlopen-recursemod2.so constructor called (status %d)\n", -- recursemod2_status); -- void *handle = dlopen ("tst-dlopen-recursemod1.so", RTLD_NOW); -- if (handle == NULL) -- { -- printf ("error: dlopen: %s\n", dlerror ()); -- exit (1); -- } -- int *status = dlsym (handle, "recursemod1_status"); -- if (status == NULL) -- { -- printf ("error: dlsym: %s\n", dlerror ()); -- exit (1); -- } -- printf ("info: recursemod1_status == %d\n", *status); -- if (*status != 1) -- { -- puts ("error: recursemod1_status == 1 expected"); -- exit (1); -- } -- ++*status; -- printf ("info: recursemod1_status == %d\n", *status); -- -- int **mod2_status = dlsym (handle, "force_recursemod2_reference"); -- if (mod2_status == NULL || *mod2_status != &recursemod2_status) -- { -- puts ("error: invalid recursemod2_status address in" -- " tst-dlopen-recursemod1.so"); -- exit (1); -- } --} -- --static void __attribute__ ((destructor)) --fini (void) --{ -- printf ("info: tst-dlopen-recursemod2.so destructor called (status %d)\n", -- recursemod2_status); --} diff --git a/glibc-dlopen-constructor-null-2.patch b/glibc-dlopen-constructor-null-2.patch deleted file mode 100644 index 0d32a71..0000000 --- a/glibc-dlopen-constructor-null-2.patch +++ /dev/null @@ -1,216 +0,0 @@ -Author: Florian Weimer -Date: Sat Oct 26 14:49:57 2024 +0200 - - elf: Test dlopen (NULL, RTLD_LAZY) from an ELF constructor - - This call must not complete initialization of all shared objects - in the global scope because the ELF constructor which makes the call - likely has not finished initialization. Calling more constructors - at this point would expose those to a partially constructed - dependency. - - This completes the revert of commit 9897ced8e78db5d813166a7ccccfd5a - ("elf: Run constructors on cyclic recursive dlopen (bug 31986)"). - -Upstream: - -diff --git a/elf/Makefile b/elf/Makefile -index fda796f6d5e71c6a..2376789eadcf5250 100644 ---- a/elf/Makefile -+++ b/elf/Makefile -@@ -415,6 +415,7 @@ tests += \ - tst-dlmopen3 \ - tst-dlmopen4 \ - tst-dlopen-auditdup \ -+ tst-dlopen-constructor-null \ - tst-dlopen-self \ - tst-dlopen-tlsmodid \ - tst-dlopen-tlsreinit1 \ -@@ -868,6 +869,8 @@ modules-names += \ - tst-dlmopen1mod \ - tst-dlopen-auditdup-auditmod \ - tst-dlopen-auditdupmod \ -+ tst-dlopen-constructor-null-mod1 \ -+ tst-dlopen-constructor-null-mod2 \ - tst-dlopen-tlsreinitmod1 \ - tst-dlopen-tlsreinitmod2 \ - tst-dlopen-tlsreinitmod3 \ -@@ -3160,3 +3163,9 @@ tst-dlopen-tlsreinit4-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so - tst-dlopen-auditdup-ENV = LD_AUDIT=$(objpfx)tst-dlopen-auditdup-auditmod.so - $(objpfx)tst-dlopen-auditdup.out: \ - $(objpfx)tst-dlopen-auditdupmod.so $(objpfx)tst-dlopen-auditdup-auditmod.so -+ -+$(objpfx)tst-dlopen-constructor-null: \ -+ $(objpfx)tst-dlopen-constructor-null-mod1.so \ -+ $(objpfx)tst-dlopen-constructor-null-mod2.so -+$(objpfx)tst-dlopen-constructor-null-mod2.so: \ -+ $(objpfx)tst-dlopen-constructor-null-mod1.so -diff --git a/elf/dl-open.c b/elf/dl-open.c -index ba3c266e6a37d6c2..8fdc631a1d32f699 100644 ---- a/elf/dl-open.c -+++ b/elf/dl-open.c -@@ -594,6 +594,16 @@ dl_open_worker_begin (void *a) - if ((mode & RTLD_GLOBAL) && new->l_global == 0) - add_to_global_update (new); - -+ /* It is not possible to run the ELF constructor for the new -+ link map if it has not executed yet: If this dlopen call came -+ from an ELF constructor that has not put that object into a -+ consistent state, completing initialization for the entire -+ scope will expose objects that have this partially -+ constructed object among its dependencies to this -+ inconsistent state. This could happen even with a benign -+ dlopen (NULL, RTLD_LAZY) call from a constructor of an -+ initially loaded shared object. */ -+ - return; - } - -diff --git a/elf/tst-dlopen-constructor-null-mod1.c b/elf/tst-dlopen-constructor-null-mod1.c -new file mode 100644 -index 0000000000000000..70a7a0ad46a1a666 ---- /dev/null -+++ b/elf/tst-dlopen-constructor-null-mod1.c -@@ -0,0 +1,55 @@ -+/* Module calling dlopen (NULL, RTLD_LAZY) to obtain the global scope. -+ Copyright (C) 2024 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+#include -+#include -+#include -+ -+int mod1_status; -+ -+static void __attribute__ ((constructor)) -+init (void) -+{ -+ puts ("info: tst-dlopen-constructor-null-mod1.so constructor"); -+ -+ void *handle = dlopen (NULL, RTLD_LAZY); -+ if (handle == NULL) -+ { -+ printf ("error: %s\n", dlerror ()); -+ exit (1); -+ } -+ puts ("info: dlopen returned"); -+ if (dlsym (handle, "malloc") != malloc) -+ { -+ puts ("error: dlsym did not produce expected result"); -+ exit (1); -+ } -+ dlclose (handle); -+ -+ /* Check that the second module's constructor has not executed. */ -+ if (getenv ("mod2_status") != NULL) -+ { -+ printf ("error: mod2_status environment variable set: %s\n", -+ getenv ("mod2_status")); -+ exit (1); -+ } -+ -+ /* Communicate to the second module that the constructor executed. */ -+ mod1_status = 1; -+} -diff --git a/elf/tst-dlopen-constructor-null-mod2.c b/elf/tst-dlopen-constructor-null-mod2.c -new file mode 100644 -index 0000000000000000..d6e945beaec04815 ---- /dev/null -+++ b/elf/tst-dlopen-constructor-null-mod2.c -@@ -0,0 +1,37 @@ -+/* Module whose constructor should not be invoked by dlopen (NULL, RTLD_LAZY). -+ Copyright (C) 2024 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+#include -+ -+extern int mod1_status; -+int mod2_status; -+ -+static void __attribute__ ((constructor)) -+init (void) -+{ -+ printf ("info: tst-dlopen-constructor-null-mod2.so constructor" -+ " (mod1_status=%d)", mod1_status); -+ if (!(mod1_status == 1 && mod2_status == 0)) -+ { -+ puts ("error: mod1_status == 1 && mod2_status == 0 expected"); -+ exit (1); -+ } -+ setenv ("mod2_status", "constructed", 1); -+ mod2_status = 1; -+} -diff --git a/elf/tst-dlopen-constructor-null.c b/elf/tst-dlopen-constructor-null.c -new file mode 100644 -index 0000000000000000..58c4660c7d18ca4a ---- /dev/null -+++ b/elf/tst-dlopen-constructor-null.c -@@ -0,0 +1,38 @@ -+/* Verify that dlopen (NULL, RTLD_LAZY) does not complete initialization. -+ Copyright (C) 2024 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+/* This test mimics what the glvndSetupPthreads function in libglvnd -+ does. */ -+ -+#include -+#include -+ -+/* Defined an initialized in the shared objects. */ -+extern int mod1_status; -+extern int mod2_status; -+ -+static int -+do_test (void) -+{ -+ TEST_COMPARE (mod1_status, 1); -+ TEST_COMPARE (mod2_status, 1); -+ TEST_COMPARE_STRING (getenv ("mod2_status"), "constructed"); -+ return 0; -+} -+ -+#include diff --git a/glibc.spec b/glibc.spec index 15bc505..028d1d6 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.40.9000-263-gac73067cb7 +%global glibcsrcdir glibc-2.40.9000-327-g7b544224f8 %global glibcversion 2.40.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -152,7 +152,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 16 +%global baserelease 17 Release: %{baserelease}%{?dist} # Licenses: @@ -341,8 +341,7 @@ Patch8: glibc-fedora-manual-dircategory.patch Patch13: glibc-fedora-localedata-rh61908.patch Patch17: glibc-cs-path.patch Patch23: glibc-python3.patch -Patch24: glibc-dlopen-constructor-null-1.patch -Patch25: glibc-dlopen-constructor-null-2.patch +Patch24: glibc-add-back-support-non-glibc.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2359,6 +2358,74 @@ update_gconv_modules_cache () %endif %changelog +* Mon Nov 11 2024 DJ Delorie - 2.40.9000-17 +- Auto-sync with upstream branch master, + commit 7b544224f82d20019f9b28522ebf8114a372d1a2. +- stat.h: Fix missing declaration of struct timespec +- mach: Fix __xpg_strerror_r on in-range but undefined errors [BZ #32350] +- x86/string: Use `movsl` instead of `movsd` [BZ #32344] +- Rename new tst-sem17 test to tst-sem18 +- Avoid uninitialized result in sem_open when file does not exist +- nptl: initialize rseq area prior to registration +- s390x: Update ulps +- elf: avoid jumping over a needed declaration +- math: Fix log10f on some ABIs +- stdio-common: Add tests for formatted vsnprintf output specifiers +- stdio-common: Add tests for formatted vsprintf output specifiers +- stdio-common: Add tests for formatted vfprintf output specifiers +- stdio-common: Add tests for formatted vdprintf output specifiers +- stdio-common: Add tests for formatted vasprintf output specifiers +- stdio-common: Add tests for formatted vprintf output specifiers +- stdio-common: Add tests for formatted snprintf output specifiers +- stdio-common: Add tests for formatted sprintf output specifiers +- stdio-common: Add tests for formatted fprintf output specifiers +- stdio-common: Add tests for formatted dprintf output specifiers +- stdio-common: Add tests for formatted asprintf output specifiers +- stdio-common: Add tests for formatted printf output specifiers +- nptl: fix __builtin_thread_pointer detection on LoongArch +- math: Fix incorrect results of exp10m1f with some GCC versions +- misc: Align argument name for pkey_*() functions with the manual +- manual: Use more precise wording for memory protection keys +- elf: Switch to main malloc after final ld.so self-relocation +- elf: Introduce _dl_relocate_object_no_relro +- elf: Do not define consider_profiling, consider_symbind as macros +- elf: rtld_multiple_ref is always true +- Add Arm HWCAP2_* constants from Linux 3.15 and 6.2 to +- Add feature test macro _ISOC2Y_SOURCE +- added license for sysdeps/ieee754/flt-32/e_gammaf_r.c +- AArch64: Remove SVE erf and erfc tables +- x86_64: Add exp2m1f with FMA +- x86_64: Add exp10m1f with FMA +- math: Use log10p1f from CORE-MATH +- math: Use log1pf from CORE-MATH +- math: Use log2p1f from CORE-MATH +- math: Use log10f from CORE-MATH +- math: Use expm1f from CORE-MATH +- math: Use exp2m1f from CORE-MATH +- math: Use exp10m1f from CORE-MATH +- benchtests: Add log10p1f benchmark +- benchtests: Add log1p benchmark +- benchtests: Add log2p1f benchmark +- benchtests: Add log10f benchmark +- benchtests: Add expm1f benchmark +- benchtests: Add exp2m1f benchmark +- benchtests: Add exp10m1f benchmark +- math: Add e_gammaf_r to glibc code and style +- LoongArch: Add RSEQ_SIG in rseq.h. +- nptl: Add for LoongArch +- Link tst-clock_gettime with $(librt) +- powerpc64: Obviate the need for ROP protection in clone/clone3 +- Add tests of time, gettimeofday, clock_gettime +- Add more tests of pthread attributes initial values +- Document further requirement on mixing streams / file descriptors +- powerpc64le: Adhere to ABI stack alignment requirement +- AArch64: Small optimisation in AdvSIMD erf and erfc +- Revert "elf: Run constructors on cyclic recursive dlopen (bug 31986)" +- elf: Change ldconfig auxcache magic number (bug 32231) +- SHARED-FILES: Mention bundled Linux 6.10 headers. +- libio: Fix crash in fputws [BZ #20632] +- stdio-common: Fix scanf parsing for NaN types [BZ #30647] + * Mon Nov 4 2024 Florian Weimer - 2.40.9000-16 - Exclude 32-bit headers from the x86_64 package diff --git a/sources b/sources index 0b0eeba..d54e5f1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.40.9000-263-gac73067cb7.tar.xz) = ac6e9bab9711ea09bf5c9ea2f32df4b4d166be89825f7aaac24e4c862212d172ed7aba115937adc39c4fbc95ac93f7bdc95e3a27390fc3544be01f0a878b463c +SHA512 (glibc-2.40.9000-327-g7b544224f8.tar.xz) = 5a1ff6ea72bb9c72939425a9802bcef1f5271aabba6ff5609b39ce91e4350972fb9a84fb39fd40bef60b0b5fe603db32373896cc7cc8a09eb93d8512bc7d900c From 736b65ab4befd3bc1641da6911b0c97c1f635b0f Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 13 Nov 2024 17:50:00 +0100 Subject: [PATCH 102/106] Only relocate ld.so for the second time of libc.so has been loaded --- glibc-add-back-support-non-glibc.patch | 237 ------------------------- glibc-nolink-libc.patch | 211 ++++++++++++++++++++++ glibc.spec | 7 +- 3 files changed, 216 insertions(+), 239 deletions(-) delete mode 100644 glibc-add-back-support-non-glibc.patch create mode 100644 glibc-nolink-libc.patch diff --git a/glibc-add-back-support-non-glibc.patch b/glibc-add-back-support-non-glibc.patch deleted file mode 100644 index f6be9a8..0000000 --- a/glibc-add-back-support-non-glibc.patch +++ /dev/null @@ -1,237 +0,0 @@ -From patchwork Tue Nov 12 11:48:47 2024 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: Florian Weimer -X-Patchwork-Id: 100853 -Return-Path: -X-Original-To: patchwork@sourceware.org -Delivered-To: patchwork@sourceware.org -Received: from server2.sourceware.org (localhost [IPv6:::1]) - by sourceware.org (Postfix) with ESMTP id 889EF385840B - for ; Tue, 12 Nov 2024 11:49:30 +0000 (GMT) -X-Original-To: libc-alpha@sourceware.org -Delivered-To: libc-alpha@sourceware.org -Received: from us-smtp-delivery-124.mimecast.com - (us-smtp-delivery-124.mimecast.com [170.10.133.124]) - by sourceware.org (Postfix) with ESMTP id 8F45D3858D20 - for ; Tue, 12 Nov 2024 11:48:54 +0000 (GMT) -DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F45D3858D20 -Authentication-Results: sourceware.org; - dmarc=pass (p=none dis=none) header.from=redhat.com -Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com -ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8F45D3858D20 -Authentication-Results: server2.sourceware.org; - arc=none smtp.remote-ip=170.10.133.124 -ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731412140; cv=none; - b=fHXFiaPL6c6UgfShfJ6zG7APVYTybY7wpLlkMpjUKBOLz2BtIsVon8qFGP+AAWEtvXJiZ3d6QAKfjvJkuuidZCtwx3jR3oJh9RnzXjKAsvQ26kzR1S1VreHwSu10NI7rzzqHCOaA0qq/CQKbZvHsAtAxcQUxhVvV7ana8xsfpkw= -ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; - t=1731412140; c=relaxed/simple; - bh=GJcAbo0Ltt+ruaCIXEv0WhSaSGajwEfCIqCcb8Bh0yo=; - h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; - b=f80gjj3F4KkcOyl3fTzi679BfFgci50PrOWK1gEFThaFda8w0kw8AftbXsrAhwfMJP2oHs+xB7S630IY0mGaPNgtj7147nItmY4OQ2fHSqq0+69LNRz6OJ9RWtLVTu7aDxq9EP0QOgtDFjK2wqXkrMPgx4pxdtY4Ft1nhkjzSwU= -ARC-Authentication-Results: i=1; server2.sourceware.org -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; - s=mimecast20190719; t=1731412134; - h=from:from:reply-to:subject:subject:date:date:message-id:message-id: - to:to:cc:mime-version:mime-version:content-type:content-type: - content-transfer-encoding:content-transfer-encoding; - bh=qFJ5e+OXYQcfwJXdpuYOsUX6oYHcoUs0fZ/verutR9A=; - b=MZplBqzoEgSFEXjG03xvIEcedfQ/4HHm5BXZ5ZjKRwafIcEpn3+ycicx4A436vGFBKeii8 - McwAO5Yg+cbQ/PW8hiFsgH9pA+mm+PBtyVs5gDz/jz/IEZWunyk4TFpjQdvowkO69ySp5S - ns4DHhrxnIaGVd9cjZnkEK8K/BKJEjo= -Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com - (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by - relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, - cipher=TLS_AES_256_GCM_SHA384) id us-mta-648-UXK_ODp5OAOeOEkxd8brhw-1; Tue, - 12 Nov 2024 06:48:52 -0500 -X-MC-Unique: UXK_ODp5OAOeOEkxd8brhw-1 -X-Mimecast-MFC-AGG-ID: UXK_ODp5OAOeOEkxd8brhw -Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com - (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) - (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) - key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest - SHA256) - (No client certificate requested) - by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS - id 040B619560BA - for ; Tue, 12 Nov 2024 11:48:52 +0000 (UTC) -Received: from oldenburg.str.redhat.com (unknown [10.39.192.74]) - by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with - ESMTPS - id 1DC981956086 - for ; Tue, 12 Nov 2024 11:48:50 +0000 (UTC) -From: Florian Weimer -To: libc-alpha@sourceware.org -Subject: [PATCH v3] elf: Add back support for programs that do not load - libc.so -Date: Tue, 12 Nov 2024 12:48:47 +0100 -Message-ID: <87v7wsn04g.fsf@oldenburg.str.redhat.com> -User-Agent: Gnus/5.13 (Gnus v5.13) -MIME-Version: 1.0 -X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 -X-Mimecast-Spam-Score: 0 -X-Mimecast-MFC-PROC-ID: Jq-vIr9iQTPt_3zLeAdPUKT-6SHShFllhBNSEuv7d9I_1731412132 -X-Mimecast-Originator: redhat.com -X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, - DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, - KAM_SHORT, - RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, - SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 -X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on - server2.sourceware.org -X-BeenThere: libc-alpha@sourceware.org -X-Mailman-Version: 2.1.30 -Precedence: list -List-Id: Libc-alpha mailing list -List-Unsubscribe: , - -List-Archive: -List-Post: -List-Help: -List-Subscribe: , - -Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org - -Commit 8f8dd904c4a2207699bb666f30acceb5209c8d3f (“elf: -rtld_multiple_ref is always true”) removed some code that happened -to enable compatibility with programs that do not link against -libc.so. Such programs cannot call dlopen or any dynamic linker -functions (except __tls_get_addr), so this is not really useful. -Still ld.so should not crash with a null-pointer dereference -or undefined symbol reference in these cases. ---- -v3: Fix typo flagged by Andreas. Avoid make warning about redefined - elf/tst-nolink-libc rule. Link with -E to make __stack_chk_guard - available for reference from ld.so (although ld.so really should - not have such a symbol reference from ld.so to libc.so, but it - occurs on the Linaro builders). - elf/Makefile | 11 +++++++++++ - elf/dl-minimal.c | 5 +++++ - sysdeps/nptl/dl-mutex.c | 4 ++++ - sysdeps/unix/sysv/linux/Makefile | 5 +++++ - sysdeps/unix/sysv/linux/arm/Makefile | 3 +++ - sysdeps/unix/sysv/linux/tst-nolink-libc.c | 32 +++++++++++++++++++++++++++++++ - 6 files changed, 60 insertions(+) - - -base-commit: f745d78e2628cd5b13ca119ae0c0e21d08ad1906 - -diff --git a/elf/Makefile b/elf/Makefile -index 3a1cb72955..834b565693 100644 ---- a/elf/Makefile -+++ b/elf/Makefile -@@ -3169,3 +3169,14 @@ tst-rtld-no-malloc-audit-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so - - # Any shared object should do. - tst-rtld-no-malloc-preload-ENV = LD_PRELOAD=$(objpfx)tst-auditmod1.so -+ -+# These rules link (without libc.so) and run the special -+# elf/tst-nolink-libc test if a port adds it to the tests variables. -+# The test is always run directly, not under the dynamic linker. -+# Link with -E to export the __stack_chk_guard variable. -+$(objpfx)tst-nolink-libc: $(objpfx)tst-nolink-libc.o $(objpfx)ld.so -+ $(LINK.o) -nostdlib -nostartfiles -o $@ $< \ -+ -Wl,-E,--dynamic-link=$(objpfx)ld.so $(objpfx)ld.so -+CFLAGS-tst-nolink-libc.c += $(no-stack-protector) -+$(objpfx)tst-nolink-libc.out: $(objpfx)tst-nolink-libc $(objpfx)ld.so -+ $< > $@ 2>&1; $(evaluate-test) -diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c -index dfa0764f58..d22a428964 100644 ---- a/elf/dl-minimal.c -+++ b/elf/dl-minimal.c -@@ -82,6 +82,11 @@ __rtld_malloc_init_real (struct link_map *main_map) - rtld relocation (which enables RELRO, after which the pointer - variables cannot be written to). */ - -+ if (GL (dl_ns)[LM_ID_BASE].libc_map == NULL) -+ /* Nothing is linked against libc.so, which means that there is no -+ malloc implementation available. */ -+ return; -+ - struct r_found_version version; - version.name = symbol_version_string (libc, GLIBC_2_0); - version.hidden = 0; -diff --git a/sysdeps/nptl/dl-mutex.c b/sysdeps/nptl/dl-mutex.c -index 8d123cbb2f..85c71c1f81 100644 ---- a/sysdeps/nptl/dl-mutex.c -+++ b/sysdeps/nptl/dl-mutex.c -@@ -35,6 +35,10 @@ __rtld_mutex_init (void) - constructor while holding loader locks. */ - - struct link_map *libc_map = GL (dl_ns)[LM_ID_BASE].libc_map; -+ if (libc_map == NULL) -+ /* Special case: the program links against ld.so, but not libc.so, -+ so the full locking implementation is not available. */ -+ return; - - const ElfW(Sym) *sym - = _dl_lookup_direct (libc_map, "pthread_mutex_lock", -diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile -index 527c7a5ae8..c87daaba90 100644 ---- a/sysdeps/unix/sysv/linux/Makefile -+++ b/sysdeps/unix/sysv/linux/Makefile -@@ -652,7 +652,12 @@ install-bin += \ - # install-bin - - $(objpfx)pldd: $(objpfx)xmalloc.o -+ -+test-internal-extras += tst-nolink-libc -+ifeq ($(run-built-tests),yes) -+tests-special += $(objpfx)tst-nolink-libc.out - endif -+endif # $(subdir) == elf - - ifeq ($(subdir),rt) - CFLAGS-mq_send.c += -fexceptions -diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile -index a73c897f43..e73ce4f811 100644 ---- a/sysdeps/unix/sysv/linux/arm/Makefile -+++ b/sysdeps/unix/sysv/linux/arm/Makefile -@@ -1,5 +1,8 @@ - ifeq ($(subdir),elf) - sysdep-rtld-routines += aeabi_read_tp libc-do-syscall -+# The test uses INTERNAL_SYSCALL_CALL. In thumb mode, this uses -+# an undefined reference to __libc_do_syscall. -+CFLAGS-tst-nolink-libc.c += -marm - endif - - ifeq ($(subdir),misc) -diff --git a/sysdeps/unix/sysv/linux/tst-nolink-libc.c b/sysdeps/unix/sysv/linux/tst-nolink-libc.c -new file mode 100644 -index 0000000000..ad697e6674 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/tst-nolink-libc.c -@@ -0,0 +1,32 @@ -+/* Test program not linked against libc.so and not using any glibc functions. -+ Copyright (C) 2024 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+ -+/* On some build configurations, the main program contains a reference -+ to __stack_chk_guard, but that cannot be resolved because this test -+ does not link against libc.so. Provide a definition here, so that -+ program is able to run. Zero is a permitted, but unlikely value -+ for the stack guard. */ -+void *__stack_chk_guard; -+ -+void -+_start (void) -+{ -+ INTERNAL_SYSCALL_CALL (exit_group, 0); -+} diff --git a/glibc-nolink-libc.patch b/glibc-nolink-libc.patch new file mode 100644 index 0000000..3626c02 --- /dev/null +++ b/glibc-nolink-libc.patch @@ -0,0 +1,211 @@ +commit 624acf596c5074ffc63ff697850cad4c8ef2e7ff +Author: Florian Weimer +Date: Tue Nov 12 20:09:33 2024 +0100 + + elf: Second ld.so relocation only if libc.so has been loaded + + Commit 8f8dd904c4a2207699bb666f30acceb5209c8d3f (“elf: + rtld_multiple_ref is always true”) removed some code that happened + to enable compatibility with programs that do not link against + libc.so. Such programs cannot call dlopen or any dynamic linker + functions (except __tls_get_addr), so this is not really useful. + Still ld.so should not crash with a null-pointer dereference + or undefined symbol reference in these cases. + + Perform the final relocation for ld.so right before relocating + libc.so (which seems more correct anyway), but only if libc.so + has been loaded. In the main relocation loop, call + _dl_relocate_object unconditionally because it already checks + if the object has been relocated. Only call __rtld_mutex_init + and __rtld_malloc_init_real if libc.so has been loaded. Otherwise, + the full implementations are not available. + + The previous concern regarding GOT updates through self-relocation + no longer applies because function pointers are updated + explicitly through __rtld_mutex_init and __rtld_malloc_init_real, + and not through relocation. + + Fixes commit 8f8dd904c4a2207699bb666f30acceb5209c8d3f (“elf: + rtld_multiple_ref is always true”). + +diff --git a/elf/Makefile b/elf/Makefile +index 3a1cb72955dc0eec..b044a2c2fa974905 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -3169,3 +3169,20 @@ tst-rtld-no-malloc-audit-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so + + # Any shared object should do. + tst-rtld-no-malloc-preload-ENV = LD_PRELOAD=$(objpfx)tst-auditmod1.so ++ ++# These rules link and run the special elf/tst-nolink-libc-* tests if ++# a port adds them to the tests variables. Neither test variant is ++# linked against libc.so, but tst-nolink-libc-1 is linked against ++# ld.so. The test is always run directly, not under the dynamic ++# linker. ++CFLAGS-tst-nolink-libc.c += $(no-stack-protector) ++$(objpfx)tst-nolink-libc-1: $(objpfx)tst-nolink-libc.o $(objpfx)ld.so ++ $(LINK.o) -nostdlib -nostartfiles -o $@ $< \ ++ -Wl,--dynamic-linker=$(objpfx)ld.so,--no-as-needed $(objpfx)ld.so ++$(objpfx)tst-nolink-libc-1.out: $(objpfx)tst-nolink-libc-1 $(objpfx)ld.so ++ $< > $@ 2>&1; $(evaluate-test) ++$(objpfx)tst-nolink-libc-2: $(objpfx)tst-nolink-libc.o ++ $(LINK.o) -nostdlib -nostartfiles -o $@ $< \ ++ -Wl,--dynamic-linker=$(objpfx)ld.so ++$(objpfx)tst-nolink-libc-2.out: $(objpfx)tst-nolink-libc-2 $(objpfx)ld.so ++ $< > $@ 2>&1; $(evaluate-test) +diff --git a/elf/rtld.c b/elf/rtld.c +index b8cc3f605f9e053c..f54b1829af20881a 100644 +--- a/elf/rtld.c ++++ b/elf/rtld.c +@@ -2243,15 +2243,7 @@ dl_main (const ElfW(Phdr) *phdr, + + _rtld_main_check (main_map, _dl_argv[0]); + +- /* Now we have all the objects loaded. Relocate them all except for +- the dynamic linker itself. We do this in reverse order so that copy +- relocs of earlier objects overwrite the data written by later +- objects. We do not re-relocate the dynamic linker itself in this +- loop because that could result in the GOT entries for functions we +- call being changed, and that would break us. It is safe to relocate +- the dynamic linker out of order because it has no copy relocations. +- Likewise for libc, which is relocated early to ensure that IFUNC +- resolvers in libc work. */ ++ /* Now we have all the objects loaded. */ + + int consider_profiling = GLRO(dl_profile) != NULL; + +@@ -2259,9 +2251,19 @@ dl_main (const ElfW(Phdr) *phdr, + GLRO(dl_lazy) |= consider_profiling; + + if (GL(dl_ns)[LM_ID_BASE].libc_map != NULL) +- _dl_relocate_object (GL(dl_ns)[LM_ID_BASE].libc_map, +- GL(dl_ns)[LM_ID_BASE].libc_map->l_scope, +- GLRO(dl_lazy) ? RTLD_LAZY : 0, consider_profiling); ++ { ++ /* If libc.so has been loaded, relocate it early, after the ++ dynamic loader itself. */ ++ RTLD_TIMING_VAR (start); ++ rtld_timer_start (&start); ++ ++ _dl_relocate_object_no_relro (&GL(dl_rtld_map), main_map->l_scope, 0, 0); ++ _dl_relocate_object (GL(dl_ns)[LM_ID_BASE].libc_map, ++ GL(dl_ns)[LM_ID_BASE].libc_map->l_scope, ++ GLRO(dl_lazy) ? RTLD_LAZY : 0, consider_profiling); ++ ++ rtld_timer_accum (&relocate_time, start); ++ } + + RTLD_TIMING_VAR (start); + rtld_timer_start (&start); +@@ -2284,9 +2286,8 @@ dl_main (const ElfW(Phdr) *phdr, + /* Also allocated with the fake malloc(). */ + l->l_free_initfini = 0; + +- if (l != &GL(dl_rtld_map)) +- _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0, +- consider_profiling); ++ _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0, ++ consider_profiling); + + /* Add object to slot information data if necessasy. */ + if (l->l_tls_blocksize != 0 && __rtld_tls_init_tp_called) +@@ -2324,27 +2325,18 @@ dl_main (const ElfW(Phdr) *phdr, + /* Set up the object lookup structures. */ + _dl_find_object_init (); + +- /* Likewise for the locking implementation. */ +- __rtld_mutex_init (); +- +- /* Re-relocate ourselves with user-controlled symbol definitions. */ +- +- { +- RTLD_TIMING_VAR (start); +- rtld_timer_start (&start); +- +- _dl_relocate_object_no_relro (&GL(dl_rtld_map), main_map->l_scope, 0, 0); +- +- /* The malloc implementation has been relocated, so resolving +- its symbols (and potentially calling IFUNC resolvers) is safe +- at this point. */ +- __rtld_malloc_init_real (main_map); +- +- if (GL(dl_rtld_map).l_relro_size != 0) +- _dl_protect_relro (&GL(dl_rtld_map)); ++ /* If libc.so was loaded, ld.so has been fully relocated along with ++ it. Complete ld.so initialization with mutex symbols from ++ libc.so and malloc symbols from the global scope. */ ++ if (GL(dl_ns)[LM_ID_BASE].libc_map != NULL) ++ { ++ __rtld_mutex_init (); ++ __rtld_malloc_init_real (main_map); ++ } + +- rtld_timer_accum (&relocate_time, start); +- } ++ /* All ld.so initialization is complete. Apply RELRO. */ ++ if (GL(dl_rtld_map).l_relro_size != 0) ++ _dl_protect_relro (&GL(dl_rtld_map)); + + /* Relocation is complete. Perform early libc initialization. This + is the initial libc, even if audit modules have been loaded with +diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile +index 527c7a5ae898acea..a3f7fc4054f5d54d 100644 +--- a/sysdeps/unix/sysv/linux/Makefile ++++ b/sysdeps/unix/sysv/linux/Makefile +@@ -652,7 +652,12 @@ install-bin += \ + # install-bin + + $(objpfx)pldd: $(objpfx)xmalloc.o ++ ++test-internal-extras += tst-nolink-libc ++ifeq ($(run-built-tests),yes) ++tests-special += $(objpfx)tst-nolink-libc-1.out $(objpfx)tst-nolink-libc-2.out + endif ++endif # $(subdir) == elf + + ifeq ($(subdir),rt) + CFLAGS-mq_send.c += -fexceptions +diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile +index a73c897f43c9a206..e73ce4f81114e789 100644 +--- a/sysdeps/unix/sysv/linux/arm/Makefile ++++ b/sysdeps/unix/sysv/linux/arm/Makefile +@@ -1,5 +1,8 @@ + ifeq ($(subdir),elf) + sysdep-rtld-routines += aeabi_read_tp libc-do-syscall ++# The test uses INTERNAL_SYSCALL_CALL. In thumb mode, this uses ++# an undefined reference to __libc_do_syscall. ++CFLAGS-tst-nolink-libc.c += -marm + endif + + ifeq ($(subdir),misc) +diff --git a/sysdeps/unix/sysv/linux/tst-nolink-libc.c b/sysdeps/unix/sysv/linux/tst-nolink-libc.c +new file mode 100644 +index 0000000000000000..817f37784b4080f9 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/tst-nolink-libc.c +@@ -0,0 +1,25 @@ ++/* Test program not linked against libc.so and not using any glibc functions. ++ Copyright (C) 2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++ ++void ++_start (void) ++{ ++ INTERNAL_SYSCALL_CALL (exit_group, 0); ++} diff --git a/glibc.spec b/glibc.spec index 028d1d6..be75f25 100644 --- a/glibc.spec +++ b/glibc.spec @@ -152,7 +152,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 17 +%global baserelease 18 Release: %{baserelease}%{?dist} # Licenses: @@ -341,7 +341,7 @@ Patch8: glibc-fedora-manual-dircategory.patch Patch13: glibc-fedora-localedata-rh61908.patch Patch17: glibc-cs-path.patch Patch23: glibc-python3.patch -Patch24: glibc-add-back-support-non-glibc.patch +Patch24: glibc-nolink-libc.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2358,6 +2358,9 @@ update_gconv_modules_cache () %endif %changelog +* Wed Nov 13 2024 Florian Weimer - 2.40.9000-18 +- Only relocate ld.so for the second time of libc.so has been loaded + * Mon Nov 11 2024 DJ Delorie - 2.40.9000-17 - Auto-sync with upstream branch master, commit 7b544224f82d20019f9b28522ebf8114a372d1a2. From 0e9c278a7eb69e6e657346cb400a9e53d7e8825e Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 20 Nov 2024 14:07:52 +0100 Subject: [PATCH 103/106] Auto-sync with upstream branch master Upstream commit: 47311cca31e685fa7bfe19bb8cef17d2d3d7fff9 - manual: Add description of AArch64-specific pkey flags - AArch64: Add support for memory protection keys - AArch64: Remove thunderx{,2} memcpy - powerpc64le: Optimized strcat for POWER10 - powerpc: Improve the inline asm for syscall wrappers - elf: handle addition overflow in _dl_find_object_update_1 [BZ #32245] - x86/string: Use `movsl` instead of `movsd` in strncpy/strncat [BZ #32344] - manual: Fix overeager s/int/size_t/ in memory.texi - linux: Add support for getrandom vDSO --- glibc.spec | 17 +++++++++++++++-- sources | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index be75f25..1f3b2a8 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.40.9000-327-g7b544224f8 +%global glibcsrcdir glibc-2.40.9000-357-g47311cca31 %global glibcversion 2.40.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -152,7 +152,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 18 +%global baserelease 19 Release: %{baserelease}%{?dist} # Licenses: @@ -2358,6 +2358,19 @@ update_gconv_modules_cache () %endif %changelog +* Wed Nov 20 2024 Florian Weimer - 2.40.9000-19 +- Auto-sync with upstream branch master, + commit 47311cca31e685fa7bfe19bb8cef17d2d3d7fff9: +- manual: Add description of AArch64-specific pkey flags +- AArch64: Add support for memory protection keys +- AArch64: Remove thunderx{,2} memcpy +- powerpc64le: Optimized strcat for POWER10 +- powerpc: Improve the inline asm for syscall wrappers +- elf: handle addition overflow in _dl_find_object_update_1 [BZ #32245] +- x86/string: Use `movsl` instead of `movsd` in strncpy/strncat [BZ #32344] +- manual: Fix overeager s/int/size_t/ in memory.texi +- linux: Add support for getrandom vDSO + * Wed Nov 13 2024 Florian Weimer - 2.40.9000-18 - Only relocate ld.so for the second time of libc.so has been loaded diff --git a/sources b/sources index d54e5f1..964c386 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.40.9000-327-g7b544224f8.tar.xz) = 5a1ff6ea72bb9c72939425a9802bcef1f5271aabba6ff5609b39ce91e4350972fb9a84fb39fd40bef60b0b5fe603db32373896cc7cc8a09eb93d8512bc7d900c +SHA512 (glibc-2.40.9000-357-g47311cca31.tar.xz) = dadb5ecd14e44cf9ed75fb20af9d47190df31f9a7402fcfac50abcb90a720399046f0270c423f2992dbeca0853d64b71b917eeb6272468cbaa6db0266dbf7613 From 88d869c1c2e2474b7f6610836237ec6c281ef07e Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 21 Nov 2024 20:09:48 +0100 Subject: [PATCH 104/106] Revert aarch64 memset changes (cec3aef3241cec3aef32412779e) (#2327564) --- glibc-rh2327564-1.patch | 158 +++++++++++++++++++++++ glibc-rh2327564-2.patch | 276 ++++++++++++++++++++++++++++++++++++++++ glibc.spec | 7 +- 3 files changed, 440 insertions(+), 1 deletion(-) create mode 100644 glibc-rh2327564-1.patch create mode 100644 glibc-rh2327564-2.patch diff --git a/glibc-rh2327564-1.patch b/glibc-rh2327564-1.patch new file mode 100644 index 0000000..698bc6b --- /dev/null +++ b/glibc-rh2327564-1.patch @@ -0,0 +1,158 @@ +commit d115e98ad627fae62679bc18e3bf062a898860cb +Author: Florian Weimer +Date: Wed Nov 20 19:21:45 2024 +0100 + + Revert "AArch64: Remove memset-reg.h" + + This reverts commit 8ecb477ea16a387a44ace5bf59d39a7e270b238b. + +diff --git a/sysdeps/aarch64/memset-reg.h b/sysdeps/aarch64/memset-reg.h +new file mode 100644 +index 0000000000000000..6c7f60b37edf3b11 +--- /dev/null ++++ b/sysdeps/aarch64/memset-reg.h +@@ -0,0 +1,30 @@ ++/* Register aliases for memset to be used across implementations. ++ Copyright (C) 2017-2024 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#define dstin x0 ++#define val x1 ++#define valw w1 ++#define count x2 ++#define dst x3 ++#define dstend x4 ++#define tmp1 x5 ++#define tmp1w w5 ++#define tmp2 x6 ++#define tmp2w w6 ++#define zva_len x7 ++#define zva_lenw w7 +diff --git a/sysdeps/aarch64/memset.S b/sysdeps/aarch64/memset.S +index b76dde1557ed8fb1..caafb019e2b6217b 100644 +--- a/sysdeps/aarch64/memset.S ++++ b/sysdeps/aarch64/memset.S +@@ -30,6 +30,7 @@ + */ + + #define dstin x0 ++#define val x1 + #define valw w1 + #define count x2 + #define dst x3 +diff --git a/sysdeps/aarch64/multiarch/memset_a64fx.S b/sysdeps/aarch64/multiarch/memset_a64fx.S +index f665b5a891433c1c..2e6d882fc931a882 100644 +--- a/sysdeps/aarch64/multiarch/memset_a64fx.S ++++ b/sysdeps/aarch64/multiarch/memset_a64fx.S +@@ -18,6 +18,7 @@ + . */ + + #include ++#include + + /* Assumptions: + * +@@ -35,14 +36,6 @@ + + .arch armv8.2-a+sve + +-#define dstin x0 +-#define valw w1 +-#define count x2 +-#define dst x3 +-#define dstend x4 +-#define tmp1 x5 +-#define tmp2 x6 +- + .macro st1b_unroll first=0, last=7 + st1b z0.b, p0, [dst, \first, mul vl] + .if \last-\first +diff --git a/sysdeps/aarch64/multiarch/memset_emag.S b/sysdeps/aarch64/multiarch/memset_emag.S +index cf1b25f2edf64900..6d714ed0e1b396ef 100644 +--- a/sysdeps/aarch64/multiarch/memset_emag.S ++++ b/sysdeps/aarch64/multiarch/memset_emag.S +@@ -18,6 +18,7 @@ + . */ + + #include ++#include "memset-reg.h" + + /* Assumptions: + * +@@ -25,13 +26,6 @@ + * + */ + +-#define dstin x0 +-#define val x1 +-#define valw w1 +-#define count x2 +-#define dst x3 +-#define dstend x4 +- + ENTRY (__memset_emag) + + PTR_ARG (0) +diff --git a/sysdeps/aarch64/multiarch/memset_kunpeng.S b/sysdeps/aarch64/multiarch/memset_kunpeng.S +index f815c20b0383f057..7b215501376cbe03 100644 +--- a/sysdeps/aarch64/multiarch/memset_kunpeng.S ++++ b/sysdeps/aarch64/multiarch/memset_kunpeng.S +@@ -18,6 +18,7 @@ + . */ + + #include ++#include + + /* Assumptions: + * +@@ -25,12 +26,6 @@ + * + */ + +-#define dstin x0 +-#define valw w1 +-#define count x2 +-#define dst x3 +-#define dstend x4 +- + ENTRY (__memset_kunpeng) + + PTR_ARG (0) +diff --git a/sysdeps/aarch64/multiarch/memset_oryon1.S b/sysdeps/aarch64/multiarch/memset_oryon1.S +index 6fa28a9bd030a705..b43a43b54e1b3439 100644 +--- a/sysdeps/aarch64/multiarch/memset_oryon1.S ++++ b/sysdeps/aarch64/multiarch/memset_oryon1.S +@@ -19,18 +19,12 @@ + . */ + + #include ++#include "memset-reg.h" + + /* Assumptions: + ARMv8-a, AArch64, unaligned accesses + */ + +-#define dstin x0 +-#define val x1 +-#define valw w1 +-#define count x2 +-#define dst x3 +-#define dstend x4 +- + ENTRY (__memset_oryon1) + + PTR_ARG (0) diff --git a/glibc-rh2327564-2.patch b/glibc-rh2327564-2.patch new file mode 100644 index 0000000..4afd43b --- /dev/null +++ b/glibc-rh2327564-2.patch @@ -0,0 +1,276 @@ +commit b26c53ecc4dd3bc48b11e09f6ddc7c1441e126c2 +Author: Florian Weimer +Date: Wed Nov 20 19:21:48 2024 +0100 + + Revert "AArch64: Optimize memset" + + This reverts commit cec3aef32412779e207f825db0d057ebb4628ae8. + +diff --git a/sysdeps/aarch64/memset.S b/sysdeps/aarch64/memset.S +index caafb019e2b6217b..7ef77ee8c926de21 100644 +--- a/sysdeps/aarch64/memset.S ++++ b/sysdeps/aarch64/memset.S +@@ -1,5 +1,4 @@ +-/* Generic optimized memset using SIMD. +- Copyright (C) 2012-2024 Free Software Foundation, Inc. ++/* Copyright (C) 2012-2024 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + +@@ -18,6 +17,7 @@ + . */ + + #include ++#include "memset-reg.h" + + #ifndef MEMSET + # define MEMSET memset +@@ -25,132 +25,130 @@ + + /* Assumptions: + * +- * ARMv8-a, AArch64, Advanced SIMD, unaligned accesses. ++ * ARMv8-a, AArch64, unaligned accesses + * + */ + +-#define dstin x0 +-#define val x1 +-#define valw w1 +-#define count x2 +-#define dst x3 +-#define dstend x4 +-#define zva_val x5 +-#define off x3 +-#define dstend2 x5 +- + ENTRY (MEMSET) ++ + PTR_ARG (0) + SIZE_ARG (2) + + dup v0.16B, valw +- cmp count, 16 +- b.lo L(set_small) +- + add dstend, dstin, count +- cmp count, 64 +- b.hs L(set_128) + +- /* Set 16..63 bytes. */ +- mov off, 16 +- and off, off, count, lsr 1 +- sub dstend2, dstend, off +- str q0, [dstin] +- str q0, [dstin, off] +- str q0, [dstend2, -16] +- str q0, [dstend, -16] +- ret ++ cmp count, 96 ++ b.hi L(set_long) ++ cmp count, 16 ++ b.hs L(set_medium) ++ mov val, v0.D[0] + +- .p2align 4 + /* Set 0..15 bytes. */ +-L(set_small): +- add dstend, dstin, count +- cmp count, 4 +- b.lo 2f +- lsr off, count, 3 +- sub dstend2, dstend, off, lsl 2 +- str s0, [dstin] +- str s0, [dstin, off, lsl 2] +- str s0, [dstend2, -4] +- str s0, [dstend, -4] ++ tbz count, 3, 1f ++ str val, [dstin] ++ str val, [dstend, -8] ++ ret ++ nop ++1: tbz count, 2, 2f ++ str valw, [dstin] ++ str valw, [dstend, -4] + ret +- +- /* Set 0..3 bytes. */ + 2: cbz count, 3f +- lsr off, count, 1 + strb valw, [dstin] +- strb valw, [dstin, off] +- strb valw, [dstend, -1] ++ tbz count, 1, 3f ++ strh valw, [dstend, -2] + 3: ret + ++ /* Set 17..96 bytes. */ ++L(set_medium): ++ str q0, [dstin] ++ tbnz count, 6, L(set96) ++ str q0, [dstend, -16] ++ tbz count, 5, 1f ++ str q0, [dstin, 16] ++ str q0, [dstend, -32] ++1: ret ++ + .p2align 4 +-L(set_128): +- bic dst, dstin, 15 +- cmp count, 128 +- b.hi L(set_long) +- stp q0, q0, [dstin] ++ /* Set 64..96 bytes. Write 64 bytes from the start and ++ 32 bytes from the end. */ ++L(set96): ++ str q0, [dstin, 16] + stp q0, q0, [dstin, 32] +- stp q0, q0, [dstend, -64] + stp q0, q0, [dstend, -32] + ret + +- .p2align 4 ++ .p2align 3 ++ nop + L(set_long): ++ and valw, valw, 255 ++ bic dst, dstin, 15 + str q0, [dstin] +- str q0, [dst, 16] +- tst valw, 255 +- b.ne L(no_zva) +-#ifndef ZVA64_ONLY +- mrs zva_val, dczid_el0 +- and zva_val, zva_val, 31 +- cmp zva_val, 4 /* ZVA size is 64 bytes. */ +- b.ne L(zva_128) +-#endif +- stp q0, q0, [dst, 32] +- bic dst, dstin, 63 +- sub count, dstend, dst /* Count is now 64 too large. */ +- sub count, count, 64 + 64 /* Adjust count and bias for loop. */ +- +- /* Write last bytes before ZVA loop. */ +- stp q0, q0, [dstend, -64] +- stp q0, q0, [dstend, -32] +- +- .p2align 4 +-L(zva64_loop): +- add dst, dst, 64 +- dc zva, dst ++ cmp count, 256 ++ ccmp valw, 0, 0, cs ++ b.eq L(try_zva) ++L(no_zva): ++ sub count, dstend, dst /* Count is 16 too large. */ ++ sub dst, dst, 16 /* Dst is biased by -32. */ ++ sub count, count, 64 + 16 /* Adjust count and bias for loop. */ ++1: stp q0, q0, [dst, 32] ++ stp q0, q0, [dst, 64]! ++L(tail64): + subs count, count, 64 +- b.hi L(zva64_loop) ++ b.hi 1b ++2: stp q0, q0, [dstend, -64] ++ stp q0, q0, [dstend, -32] + ret + ++L(try_zva): ++#ifndef ZVA64_ONLY + .p2align 3 +-L(no_zva): +- sub count, dstend, dst /* Count is 32 too large. */ +- sub count, count, 64 + 32 /* Adjust count and bias for loop. */ +-L(no_zva_loop): ++ mrs tmp1, dczid_el0 ++ tbnz tmp1w, 4, L(no_zva) ++ and tmp1w, tmp1w, 15 ++ cmp tmp1w, 4 /* ZVA size is 64 bytes. */ ++ b.ne L(zva_128) ++ nop ++#endif ++ /* Write the first and last 64 byte aligned block using stp rather ++ than using DC ZVA. This is faster on some cores. ++ */ ++ .p2align 4 ++L(zva_64): ++ str q0, [dst, 16] + stp q0, q0, [dst, 32] ++ bic dst, dst, 63 + stp q0, q0, [dst, 64] ++ stp q0, q0, [dst, 96] ++ sub count, dstend, dst /* Count is now 128 too large. */ ++ sub count, count, 128+64+64 /* Adjust count and bias for loop. */ ++ add dst, dst, 128 ++1: dc zva, dst + add dst, dst, 64 + subs count, count, 64 +- b.hi L(no_zva_loop) ++ b.hi 1b ++ stp q0, q0, [dst, 0] ++ stp q0, q0, [dst, 32] + stp q0, q0, [dstend, -64] + stp q0, q0, [dstend, -32] + ret + + #ifndef ZVA64_ONLY +- .p2align 4 ++ .p2align 3 + L(zva_128): +- cmp zva_val, 5 /* ZVA size is 128 bytes. */ +- b.ne L(no_zva) ++ cmp tmp1w, 5 /* ZVA size is 128 bytes. */ ++ b.ne L(zva_other) + ++ str q0, [dst, 16] + stp q0, q0, [dst, 32] + stp q0, q0, [dst, 64] + stp q0, q0, [dst, 96] + bic dst, dst, 127 + sub count, dstend, dst /* Count is now 128 too large. */ +- sub count, count, 128 + 128 /* Adjust count and bias for loop. */ +-1: add dst, dst, 128 +- dc zva, dst ++ sub count, count, 128+128 /* Adjust count and bias for loop. */ ++ add dst, dst, 128 ++1: dc zva, dst ++ add dst, dst, 128 + subs count, count, 128 + b.hi 1b + stp q0, q0, [dstend, -128] +@@ -158,6 +156,35 @@ L(zva_128): + stp q0, q0, [dstend, -64] + stp q0, q0, [dstend, -32] + ret ++ ++L(zva_other): ++ mov tmp2w, 4 ++ lsl zva_lenw, tmp2w, tmp1w ++ add tmp1, zva_len, 64 /* Max alignment bytes written. */ ++ cmp count, tmp1 ++ blo L(no_zva) ++ ++ sub tmp2, zva_len, 1 ++ add tmp1, dst, zva_len ++ add dst, dst, 16 ++ subs count, tmp1, dst /* Actual alignment bytes to write. */ ++ bic tmp1, tmp1, tmp2 /* Aligned dc zva start address. */ ++ beq 2f ++1: stp q0, q0, [dst], 64 ++ stp q0, q0, [dst, -32] ++ subs count, count, 64 ++ b.hi 1b ++2: mov dst, tmp1 ++ sub count, dstend, tmp1 /* Remaining bytes to write. */ ++ subs count, count, zva_len ++ b.lo 4f ++3: dc zva, dst ++ add dst, dst, zva_len ++ subs count, count, zva_len ++ b.hs 3b ++4: add count, count, zva_len ++ sub dst, dst, 32 /* Bias dst for tail loop. */ ++ b L(tail64) + #endif + + END (MEMSET) diff --git a/glibc.spec b/glibc.spec index 1f3b2a8..a881339 100644 --- a/glibc.spec +++ b/glibc.spec @@ -152,7 +152,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 19 +%global baserelease 20 Release: %{baserelease}%{?dist} # Licenses: @@ -342,6 +342,8 @@ Patch13: glibc-fedora-localedata-rh61908.patch Patch17: glibc-cs-path.patch Patch23: glibc-python3.patch Patch24: glibc-nolink-libc.patch +Patch25: glibc-revert-1.patch +Patch26: glibc-revert-2.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2358,6 +2360,9 @@ update_gconv_modules_cache () %endif %changelog +* Thu Nov 21 2024 Florian Weimer - 2.40.9000-20 +- Revert aarch64 memset changes (cec3aef3241cec3aef32412779e) (#2327564) + * Wed Nov 20 2024 Florian Weimer - 2.40.9000-19 - Auto-sync with upstream branch master, commit 47311cca31e685fa7bfe19bb8cef17d2d3d7fff9: From 01e1915f679ca2ab37d94dc4ef803674f750682d Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 21 Nov 2024 21:13:35 +0100 Subject: [PATCH 105/106] Correct patch names (#2327564) --- glibc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glibc.spec b/glibc.spec index a881339..9bbda1f 100644 --- a/glibc.spec +++ b/glibc.spec @@ -342,8 +342,8 @@ Patch13: glibc-fedora-localedata-rh61908.patch Patch17: glibc-cs-path.patch Patch23: glibc-python3.patch Patch24: glibc-nolink-libc.patch -Patch25: glibc-revert-1.patch -Patch26: glibc-revert-2.patch +Patch25: glibc-rh2327564-1.patch +Patch26: glibc-rh2327564-2.patch ############################################################################## # Continued list of core "glibc" package information: From 3315b0dd11d6c9a5853be2cca3489ea1293118ff Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 29 Nov 2024 15:22:22 +0100 Subject: [PATCH 106/106] Auto-sync with upstream branch master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream commit: e2436d6f5aa47ce8da80c2ba0f59dfb9ffde08f3 - Drop glibc-rh2327564-1.patch, glibc-rh2327564-2.patch. Fixed upstream. (#2327564) - malloc: send freed small chunks to smallbin - AArch64: Remove zva_128 from memset - benchtests: Add calloc test - libio: make _IO_least_marker static - malloc: Avoid func call for tcache quick path in free() - math: Add internal roundeven_finite - RISC-V: Use builtin for fma and fmaf - RISC-V: Use builtin for copysign and copysignf - Silence most -Wzero-as-null-pointer-constant diagnostics - sysdeps: linux: Fix output of LD_SHOW_AUXV=1 for AT_RSEQ_* - nptl: initialize cpu_id_start prior to rseq registration - math: Fix branch hint for 68d7128942 - powerpc64le: ROP Changes for strncpy/ppc-mount - math: Fix non-portability in the computation of signgam in lgammaf - malloc: Split _int_free() into 3 sub functions - math: Use tanf from CORE-MATH - math: Use lgammaf from CORE-MATH - math: Use erfcf from CORE-MATH - math: Use erff from CORE-MATH - math: Split s_erfF in erff and erfc - math: Use cbrtf from CORE-MATH - benchtests: Add tanf benchmark - benchtests: Add lgammaf benchmark - benchtests: Add erfcf benchmark - benchtests: Add erff benchmark - benchtests: Add cbrtf benchmark - elf: Handle static PIE with non-zero load address [BZ #31799] - x86/string: Use `movsl` instead of `movsd` in strncat [BZ #32344] - stdlib: Make getenv thread-safe in more cases - aarch64: Remove non-temporal load/stores from oryon-1's memset - aarch64: Remove non-temporal load/stores from oryon-1's memcpy - powerpc64le: _init/_fini file changes for ROP - misc: remove extra va_end in error_tail (bug 32233) - intl: avoid alloca for arbitrary sizes (bug 32380) --- glibc.spec | 46 ++++++++++++++++++++++++++++++++++++++++++---- sources | 2 +- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/glibc.spec b/glibc.spec index 9bbda1f..06e1ead 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%global glibcsrcdir glibc-2.40.9000-357-g47311cca31 +%global glibcsrcdir glibc-2.40.9000-399-ge2436d6f5a %global glibcversion 2.40.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -152,7 +152,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 20 +%global baserelease 21 Release: %{baserelease}%{?dist} # Licenses: @@ -342,8 +342,6 @@ Patch13: glibc-fedora-localedata-rh61908.patch Patch17: glibc-cs-path.patch Patch23: glibc-python3.patch Patch24: glibc-nolink-libc.patch -Patch25: glibc-rh2327564-1.patch -Patch26: glibc-rh2327564-2.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2360,6 +2358,46 @@ update_gconv_modules_cache () %endif %changelog +* Fri Nov 29 2024 Florian Weimer - 2.40.9000-21 +- Drop glibc-rh2327564-1.patch, glibc-rh2327564-2.patch. Fixed upstream. + (#2327564) +- Auto-sync with upstream branch master, + commit e2436d6f5aa47ce8da80c2ba0f59dfb9ffde08f3: +- malloc: send freed small chunks to smallbin +- AArch64: Remove zva_128 from memset +- benchtests: Add calloc test +- libio: make _IO_least_marker static +- malloc: Avoid func call for tcache quick path in free() +- math: Add internal roundeven_finite +- RISC-V: Use builtin for fma and fmaf +- RISC-V: Use builtin for copysign and copysignf +- Silence most -Wzero-as-null-pointer-constant diagnostics +- sysdeps: linux: Fix output of LD_SHOW_AUXV=1 for AT_RSEQ_* +- nptl: initialize cpu_id_start prior to rseq registration +- math: Fix branch hint for 68d7128942 +- powerpc64le: ROP Changes for strncpy/ppc-mount +- math: Fix non-portability in the computation of signgam in lgammaf +- malloc: Split _int_free() into 3 sub functions +- math: Use tanf from CORE-MATH +- math: Use lgammaf from CORE-MATH +- math: Use erfcf from CORE-MATH +- math: Use erff from CORE-MATH +- math: Split s_erfF in erff and erfc +- math: Use cbrtf from CORE-MATH +- benchtests: Add tanf benchmark +- benchtests: Add lgammaf benchmark +- benchtests: Add erfcf benchmark +- benchtests: Add erff benchmark +- benchtests: Add cbrtf benchmark +- elf: Handle static PIE with non-zero load address [BZ #31799] +- x86/string: Use `movsl` instead of `movsd` in strncat [BZ #32344] +- stdlib: Make getenv thread-safe in more cases +- aarch64: Remove non-temporal load/stores from oryon-1's memset +- aarch64: Remove non-temporal load/stores from oryon-1's memcpy +- powerpc64le: _init/_fini file changes for ROP +- misc: remove extra va_end in error_tail (bug 32233) +- intl: avoid alloca for arbitrary sizes (bug 32380) + * Thu Nov 21 2024 Florian Weimer - 2.40.9000-20 - Revert aarch64 memset changes (cec3aef3241cec3aef32412779e) (#2327564) diff --git a/sources b/sources index 964c386..d3dce74 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.40.9000-357-g47311cca31.tar.xz) = dadb5ecd14e44cf9ed75fb20af9d47190df31f9a7402fcfac50abcb90a720399046f0270c423f2992dbeca0853d64b71b917eeb6272468cbaa6db0266dbf7613 +SHA512 (glibc-2.40.9000-399-ge2436d6f5a.tar.xz) = f50cb28fd54bc7dd77903e939e43aedff63e3ac7896b6c4a1e1938fea4c190512857d7a954971e9037b85a727795bb3c5692f4d85848ceaa9cd47fdb1c96aac2