From 1c5b89063faebbc28555f081d8f345a810b5b08a Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 19 Feb 2019 08:33:22 +0100 Subject: [PATCH 01/50] Auto-sync with upstream branch release/2.29/master Upstream commit: 067fc32968b601493f4b247a3ac00caeea3f3d61 - Drop glibc-rh1674280.patch. Different fix applied upstream. (#1674280) - nptl: Fix invalid Systemtap probe in pthread_join (#1674280) --- glibc-rh1674280.patch | 26 -------------------------- glibc.spec | 11 ++++++++--- sources | 2 +- 3 files changed, 9 insertions(+), 30 deletions(-) delete mode 100644 glibc-rh1674280.patch diff --git a/glibc-rh1674280.patch b/glibc-rh1674280.patch deleted file mode 100644 index 38603c1..0000000 --- a/glibc-rh1674280.patch +++ /dev/null @@ -1,26 +0,0 @@ -Fix a user-after-free bug in the Systemtap probe in -__pthread_timedjoin_ex: - - /* Free the TCB. */ - __free_tcb (pd); - } - else - pd->joinid = NULL; - - LIBC_PROBE (pthread_join_ret, 3, threadid, result, pd->result); - -__free_tcb has freed the stack, the access pd->result is invalid. - -diff --git a/nptl/pthread_join_common.c b/nptl/pthread_join_common.c -index ecb78ffba5861bdc..45deba6a74c5efd2 100644 ---- a/nptl/pthread_join_common.c -+++ b/nptl/pthread_join_common.c -@@ -101,7 +101,7 @@ __pthread_timedjoin_ex (pthread_t threadid, void **thread_return, - else - pd->joinid = NULL; - -- LIBC_PROBE (pthread_join_ret, 3, threadid, result, pd->result); -+ LIBC_PROBE (pthread_join_ret, 3, threadid, result, result); - - return result; - } diff --git a/glibc.spec b/glibc.spec index 53e2d1b..d75332a 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29-5-gc096b008d2 +%define glibcsrcdir glibc-2.29-6-g067fc32968 %define glibcversion 2.29 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 7%{?dist} +Release: 8%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -158,7 +158,6 @@ Patch18: glibc-c-utf8-locale.patch Patch23: glibc-python3.patch Patch28: glibc-rh1615608.patch Patch29: glibc-rh1670028.patch -Patch99: glibc-rh1674280.patch ############################################################################## # Continued list of core "glibc" package information: @@ -1890,6 +1889,12 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Tue Feb 19 2019 Florian Weimer - 2.29-8 +- Drop glibc-rh1674280.patch. Different fix applied upstream. (#1674280) +- Auto-sync with upstream branch release/2.29/master, + commit 067fc32968b601493f4b247a3ac00caeea3f3d61: +- nptl: Fix invalid Systemtap probe in pthread_join (#1674280) + * Mon Feb 11 2019 Florian Weimer - 2.29-7 - Hotfix for invalid Systemtap probe in pthread_join (#1674280) diff --git a/sources b/sources index 792b1e4..2a402e2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29-5-gc096b008d2.tar.xz) = b2caff098709183f3c02dabbb75926d067006f442ab15531c14a33f2a4b04e064fce2e4bdfb27dd9f148122de057e4884f8fdc426bd7aa9315d4e67d60c6b4c5 +SHA512 (glibc-2.29-6-g067fc32968.tar.xz) = c26330756b920d4d58e6c04de459b8239c707c49d1c38c6f35becbf4fe0a1e455c57029b08a9105347e064d041255ad5dcf2039c0ae795cd10a7819318913e95 From 047399b0d0f0f454e81f971345e2357b3e552cef Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 26 Feb 2019 09:31:34 -0500 Subject: [PATCH 02/50] Auto-sync with upstream branch master, Upstream commit: e0cb7b6131ee5f2dca2938069b8b9590304e6f6b - nss_files: Fix /etc/aliases null pointer dereference (swbz#24059) - regex: fix read overrun (swbz#24114) - libio: use stdout in puts and putchar, etc (swbz#24051) - aarch64: Add AmpereComputing emag to tunable cpu list - aarch64: Optimized memset specific to AmpereComputing emag - aarch64: Optimized memchr specific to AmpereComputing emag - Require GCC 6.2 or later to build glibc - manual: Document lack of conformance of sched_* functions (swbz#14829) - libio: Use stdin consistently for input functions (swbz#24153) - x86-64 memcmp: Use unsigned Jcc instructions on size (swbz#24155) - Fix handling of collating elements in fnmatch (swbz#17396,swbz#16976) - arm: Use "nr" constraint for Systemtap probes (swbz#24164) - Fix alignment of TLS variables for tls variant TLS_TCB_AT_TP (swbz#23403) - Add compiler barriers for pthread_mutex_trylock (swbz#24180) - rt: Turn forwards from librt to libc into compat symbols (swbz#24194) - Linux: Add gettid system call wrapper (swbz#6399) - nptl: Avoid fork handler lock for async-signal-safe fork (swbz#24161) - elf: Ignore LD_AUDIT interfaces if la_version returns 0 (swbz#24122) - nptl: Reinstate pthread_timedjoin_np as a cancellation point (swbz#24215) - nptl: Fix invalid Systemtap probe in pthread_join (swbz#24211) --- glibc.spec | 30 +++++++++++++++++++++++++++--- sources | 2 +- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/glibc.spec b/glibc.spec index d75332a..f95d41d 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,5 +1,5 @@ -%define glibcsrcdir glibc-2.29-6-g067fc32968 -%define glibcversion 2.29 +%define glibcsrcdir glibc-2.29.9000-86-ge0cb7b6131 +%define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 8%{?dist} +Release: 1%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1889,6 +1889,30 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Tue Feb 26 2019 Carlos O'Donell - 2.29.9000-1 +- Auto-sync with upstream branch master, + commit e0cb7b6131ee5f2dca2938069b8b9590304e6f6b: +- nss_files: Fix /etc/aliases null pointer dereference (swbz#24059) +- regex: fix read overrun (swbz#24114) +- libio: use stdout in puts and putchar, etc (swbz#24051) +- aarch64: Add AmpereComputing emag to tunable cpu list +- aarch64: Optimized memset specific to AmpereComputing emag +- aarch64: Optimized memchr specific to AmpereComputing emag +- Require GCC 6.2 or later to build glibc +- manual: Document lack of conformance of sched_* functions (swbz#14829) +- libio: Use stdin consistently for input functions (swbz#24153) +- x86-64 memcmp: Use unsigned Jcc instructions on size (swbz#24155) +- Fix handling of collating elements in fnmatch (swbz#17396,swbz#16976) +- arm: Use "nr" constraint for Systemtap probes (swbz#24164) +- Fix alignment of TLS variables for tls variant TLS_TCB_AT_TP (swbz#23403) +- Add compiler barriers for pthread_mutex_trylock (swbz#24180) +- rt: Turn forwards from librt to libc into compat symbols (swbz#24194) +- Linux: Add gettid system call wrapper (swbz#6399) +- nptl: Avoid fork handler lock for async-signal-safe fork (swbz#24161) +- elf: Ignore LD_AUDIT interfaces if la_version returns 0 (swbz#24122) +- nptl: Reinstate pthread_timedjoin_np as a cancellation point (swbz#24215) +- nptl: Fix invalid Systemtap probe in pthread_join (swbz#24211) + * Tue Feb 19 2019 Florian Weimer - 2.29-8 - Drop glibc-rh1674280.patch. Different fix applied upstream. (#1674280) - Auto-sync with upstream branch release/2.29/master, diff --git a/sources b/sources index 2a402e2..eaadbd2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29-6-g067fc32968.tar.xz) = c26330756b920d4d58e6c04de459b8239c707c49d1c38c6f35becbf4fe0a1e455c57029b08a9105347e064d041255ad5dcf2039c0ae795cd10a7819318913e95 +SHA512 (glibc-2.29.9000-86-ge0cb7b6131.tar.xz) = 80da977b1ffc342f180b0ce19c3caf8e3f7365233068480e074777dcf831daad9e97fae3a7b342848640e94c10efb3d862e622aae701de4ad085d73008244a85 From 8a209c638d58aac2aab751a49f77b64c112b3f97 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 28 Feb 2019 02:09:46 -0500 Subject: [PATCH 03/50] Work around compiler warning in microbenchmarks. Raised upstream: https://www.sourceware.org/ml/libc-alpha/2019-02/msg00656.html --- glibc-warning-fix.patch | 25 +++++++++++++++++++++++++ glibc.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 glibc-warning-fix.patch diff --git a/glibc-warning-fix.patch b/glibc-warning-fix.patch new file mode 100644 index 0000000..0e4afa1 --- /dev/null +++ b/glibc-warning-fix.patch @@ -0,0 +1,25 @@ +Temporary work around to fix compiler warning for set but not used +'res' variable. + +e.g. +BUILDSTDERR: bench-malloc-simple.c: In function 'bench': +BUILDSTDERR: bench-malloc-simple.c:89:17: error: variable 'res' set but not used [-Werror=unused-but-set-variable] +BUILDSTDERR: 89 | unsigned long res; +BUILDSTDERR: | ^~~ +BUILDSTDERR: cc1: all warnings being treated as errors + +Affects aarch64, armv7hl, and s390x. + +diff --git a/benchtests/bench-malloc-simple.c b/benchtests/bench-malloc-simple.c +index 83203ff3187654a1..e449dd5a2e351278 100644 +--- a/benchtests/bench-malloc-simple.c ++++ b/benchtests/bench-malloc-simple.c +@@ -90,6 +90,8 @@ bench (unsigned long size) + + TIMING_INIT (res); + ++ (void) res; ++ + for (int t = 0; t <= 3; t++) + for (int i = 0; i < NUM_ALLOCS; i++) + { diff --git a/glibc.spec b/glibc.spec index f95d41d..c1f1c27 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 1%{?dist} +Release: 2%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -158,6 +158,7 @@ Patch18: glibc-c-utf8-locale.patch Patch23: glibc-python3.patch Patch28: glibc-rh1615608.patch Patch29: glibc-rh1670028.patch +Patch30: glibc-warning-fix.patch ############################################################################## # Continued list of core "glibc" package information: @@ -1889,6 +1890,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Wed Feb 27 2019 Carlos O'Donell - 2.29.9000-2 +- Fix build failure related to microbenchmarks. + * Tue Feb 26 2019 Carlos O'Donell - 2.29.9000-1 - Auto-sync with upstream branch master, commit e0cb7b6131ee5f2dca2938069b8b9590304e6f6b: From 2300402532b257c994ab0e163790c7d527eb4b37 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Fri, 1 Mar 2019 14:45:22 -0500 Subject: [PATCH 04/50] Add .gdb_index to debug information Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1680765 by adding -i to find-debuginfo.sh flags. --- glibc.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/glibc.spec b/glibc.spec index c1f1c27..587500a 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 2%{?dist} +Release: 3%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1545,7 +1545,7 @@ echo "%{_libdir}/libpthread_nonshared.a" >> compat-libpthread-nonshared.filelist # glibc-debuginfocommon, and glibc-debuginfo ############################################################################### -find_debuginfo_args='--strict-build-id -g' +find_debuginfo_args='--strict-build-id -g -i' %ifarch %{debuginfocommonarches} find_debuginfo_args="$find_debuginfo_args \ -l common.filelist \ @@ -1890,6 +1890,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Fri Mar 1 2019 DJ Delorie - 2.29.9000-3 +- Add .gdb_index to debug information (rhbz#1680765) + * Wed Feb 27 2019 Carlos O'Donell - 2.29.9000-2 - Fix build failure related to microbenchmarks. From 9f81c9aa6eaa98b2a810edd8719009deb70899ce Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Wed, 6 Mar 2019 15:56:00 -0500 Subject: [PATCH 05/50] Auto-sync with upstream branch master Upstream commit: 0ddb7ea842abf63516b74d4b057c052afc6ba863. - nptl: Assume __ASSUME_FUTEX_CLOCK_REALTIME support - powerpc: Fix build of wcscpy with --disable-multi-arch - elf: Remove remnants of MAP_ANON emulation - S390: Increase function alignment to 16 bytes. - ja_JP: Change the offset for Taisho gan-nen from 2 to 1 [BZ #24162] - ldbl-opt: Reuse test cases from misc/ that check long double - ldbl-opt: Add error and error_at_line (bug 23984) - ldbl-opt: Add err, errx, verr, verrx, warn, warnx, vwarn, and vwarnx (bug 23984) - ldbl-opt: Reuse argp tests that print long double - ldbl-opt: Add argp_error and argp_failure (bug 23983) - elf/tst-big-note: Improve accuracy of test [BZ #20419] - S390: Fix introduction of __wcscpy and weak wcscpy symbols. - __netlink_assert_response: Add more __libc_fatal newlines [BZ #20271] - Add more spaces before '('. - elf: Add tests with a local IFUNC resolver [BZ #23937] - elf/Makefile: Run IFUNC tests if binutils supports IFUNC - powerpc: Fix linknamespace introduced by 4d8015639a75 - hurd: Add renameat2 support for RENAME_NOREPLACE - Fix -Wempty-body warnings in Hurd-specific code. - Add some spaces before '('. - wcsmbs: optimize wcsnlen - wcsmbs: optimize wcsncpy - wcsmbs: optimize wcsncat - wcsmbs: optimize wcscpy - wcsmbs: optimize wcscat - wcsmbs: optimize wcpncpy - wcsmbs: optimize wcpcpy - Break further lines before not after operators. - Add and move fall-through comments in system-specific code. --- glibc.spec | 38 ++++++++++++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 587500a..4f65b74 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-86-ge0cb7b6131 +%define glibcsrcdir glibc-2.29.9000-114-g0ddb7ea842 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 3%{?dist} +Release: 4%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1890,6 +1890,40 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Wed Mar 06 2019 DJ Delorie - 2.29.9000-4 +- Auto-sync with upstream branch master, + commit 0ddb7ea842abf63516b74d4b057c052afc6ba863. +- nptl: Assume __ASSUME_FUTEX_CLOCK_REALTIME support +- powerpc: Fix build of wcscpy with --disable-multi-arch +- elf: Remove remnants of MAP_ANON emulation +- S390: Increase function alignment to 16 bytes. +- ja_JP: Change the offset for Taisho gan-nen from 2 to 1 [BZ #24162] +- ldbl-opt: Reuse test cases from misc/ that check long double +- ldbl-opt: Add error and error_at_line (bug 23984) +- ldbl-opt: Add err, errx, verr, verrx, warn, warnx, vwarn, and vwarnx (bug 23984) +- ldbl-opt: Reuse argp tests that print long double +- ldbl-opt: Add argp_error and argp_failure (bug 23983) +- elf/tst-big-note: Improve accuracy of test [BZ #20419] +- S390: Fix introduction of __wcscpy and weak wcscpy symbols. +- __netlink_assert_response: Add more __libc_fatal newlines [BZ #20271] +- Add more spaces before '('. +- elf: Add tests with a local IFUNC resolver [BZ #23937] +- elf/Makefile: Run IFUNC tests if binutils supports IFUNC +- powerpc: Fix linknamespace introduced by 4d8015639a75 +- hurd: Add renameat2 support for RENAME_NOREPLACE +- Fix -Wempty-body warnings in Hurd-specific code. +- Add some spaces before '('. +- wcsmbs: optimize wcsnlen +- wcsmbs: optimize wcsncpy +- wcsmbs: optimize wcsncat +- wcsmbs: optimize wcscpy +- wcsmbs: optimize wcscat +- wcsmbs: optimize wcpncpy +- wcsmbs: optimize wcpcpy +- Break further lines before not after operators. +- Add and move fall-through comments in system-specific code. + + * Fri Mar 1 2019 DJ Delorie - 2.29.9000-3 - Add .gdb_index to debug information (rhbz#1680765) diff --git a/sources b/sources index eaadbd2..b085d40 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-86-ge0cb7b6131.tar.xz) = 80da977b1ffc342f180b0ce19c3caf8e3f7365233068480e074777dcf831daad9e97fae3a7b342848640e94c10efb3d862e622aae701de4ad085d73008244a85 +SHA512 (glibc-2.29.9000-114-g0ddb7ea842.tar.xz) = 1977ff73beab3a7415659786c9b923c44cb6981e5b595a4b1d259a493507acec8614b2d6fbae7b91e581f46af73a4df5f213a0d054922c55c5c360cc0445afaf From 5b4007bb565c549efa1b37a61afe390f656398ab Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" Date: Sun, 17 Feb 2019 12:02:24 +0100 Subject: [PATCH 06/50] Fix bootstrapping glibc Bootstrapping glibc will disable benchtests, but the if/endif clauses excluded essentials from the bootstrapped build. Also, mtrace isn't built when bootstrapping. --- glibc.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index 4f65b74..f728764 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1163,6 +1163,7 @@ cp benchtests/scripts/benchout.schema.json %{glibc_sysroot}%{_prefix}/libexec/gl cp benchtests/scripts/compare_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ cp benchtests/scripts/import_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ cp benchtests/scripts/validate_benchout.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ +%endif # with benchtests %if 0%{?_enable_debug_packages} # The #line directives gperf generates do not give the proper @@ -1484,8 +1485,8 @@ cat > utils.filelist < nss-devel.filelist grep '/libnsl-[0-9.]*.so$' master.filelist > libnsl.filelist test $(wc -l < libnsl.filelist) -eq 1 +%if %{with benchtests} ############################################################################### # glibc-benchtests ############################################################################### From 97506ad65a03a9551cec2d6be9a3a27e9b66cb40 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" Date: Tue, 19 Feb 2019 09:00:34 +0100 Subject: [PATCH 07/50] It's there now... --- glibc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index f728764..0cbeb52 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1485,8 +1485,8 @@ cat > utils.filelist < Date: Wed, 13 Mar 2019 13:33:01 +0100 Subject: [PATCH 08/50] Auto-sync with upstream branch master Upstream commit: 38b52865d4ccfee3647f27e969e539a4396a73b1 - Drop glibc-rh1670028.patch, applied upstream - elf: Add DF_1_KMOD, DF_1_WEAKFILTER, DF_1_NOCOMMON to - resolv: Enable full ICMP errors for UDP DNS sockets [BZ #24047] - C-SKY: add elf header definition for elfutils - C-SKY: mark lr as undefined to stop unwinding - C-SKY: remove user_regs definition - C-SKY: fix sigcontext miss match - Bug 24307: Update to Unicode 12.0.0 - Break lines before not after operators, batch 4. - check-wrapper-headers test: Adjust Fortran include file directory - Fix location where math-vector-fortran.h is installed. --- glibc-rh1670028.patch | 100 ------------------------------------------ glibc.spec | 20 +++++++-- 2 files changed, 17 insertions(+), 103 deletions(-) delete mode 100644 glibc-rh1670028.patch diff --git a/glibc-rh1670028.patch b/glibc-rh1670028.patch deleted file mode 100644 index d1dbe3f..0000000 --- a/glibc-rh1670028.patch +++ /dev/null @@ -1,100 +0,0 @@ -resolv: Enable full ICMP error reporting for UDP DNS sockets - -The Linux kernel suppresses some ICMP error messages by default for UDP -sockets. This commit enables full ICMP error reporting, hopefully -resulting in faster timeouts. - -diff --git a/resolv/Makefile b/resolv/Makefile -index 8f22e6a154621238..ebe1b733f294a97c 100644 ---- a/resolv/Makefile -+++ b/resolv/Makefile -@@ -105,7 +105,7 @@ libresolv-routines := res_comp res_debug \ - res_data res_mkquery res_query res_send \ - inet_net_ntop inet_net_pton inet_neta base64 \ - ns_parse ns_name ns_netint ns_ttl ns_print \ -- ns_samedomain ns_date \ -+ ns_samedomain ns_date res_enable_icmp \ - compat-hooks compat-gethnamaddr - - libanl-routines := gai_cancel gai_error gai_misc gai_notify gai_suspend \ -diff --git a/resolv/res_enable_icmp.c b/resolv/res_enable_icmp.c -new file mode 100644 -index 0000000000000000..bdc9220f08cef71d ---- /dev/null -+++ b/resolv/res_enable_icmp.c -@@ -0,0 +1,37 @@ -+/* Enable full ICMP errors on a socket. -+ Copyright (C) 2019 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 -+__res_enable_icmp (int family, int fd) -+{ -+ int one = 1; -+ switch (family) -+ { -+ case AF_INET: -+ return setsockopt (fd, SOL_IP, IP_RECVERR, &one, sizeof (one)); -+ case AF_INET6: -+ return setsockopt (fd, SOL_IPV6, IPV6_RECVERR, &one, sizeof (one)); -+ default: -+ __set_errno (EAFNOSUPPORT); -+ return -1; -+ } -+} -diff --git a/resolv/res_send.c b/resolv/res_send.c -index fa040c1198fadce5..0f6ec83a7ba05986 100644 ---- a/resolv/res_send.c -+++ b/resolv/res_send.c -@@ -943,6 +943,18 @@ reopen (res_state statp, int *terrno, int ns) - return (-1); - } - -+ /* Enable full ICMP error reporting for this -+ socket. */ -+ if (__res_enable_icmp (nsap->sa_family, -+ EXT (statp).nssocks[ns]) < 0) -+ { -+ int saved_errno = errno; -+ __res_iclose (statp, false); -+ __set_errno (saved_errno); -+ *terrno = saved_errno; -+ return -1; -+ } -+ - /* - * On a 4.3BSD+ machine (client and server, - * actually), sending to a nameserver datagram -diff --git a/resolv/resolv-internal.h b/resolv/resolv-internal.h -index 6ab8f2af09a7ce0b..1500adc607f2ce3e 100644 ---- a/resolv/resolv-internal.h -+++ b/resolv/resolv-internal.h -@@ -100,4 +100,10 @@ libc_hidden_proto (__inet_pton_length) - /* Called as part of the thread shutdown sequence. */ - void __res_thread_freeres (void) attribute_hidden; - -+/* The Linux kernel does not enable all ICMP messages on a UDP socket -+ by default. A call this function enables full error reporting for -+ the socket FD. FAMILY must be AF_INET or AF_INET6. Returns 0 on -+ success, -1 on failure. */ -+int __res_enable_icmp (int family, int fd) attribute_hidden; -+ - #endif /* _RESOLV_INTERNAL_H */ diff --git a/glibc.spec b/glibc.spec index 0cbeb52..bfaf8d8 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-114-g0ddb7ea842 +%define glibcsrcdir glibc-2.29.9000-124-g38b52865d4 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 4%{?dist} +Release: 5%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -157,7 +157,6 @@ Patch17: glibc-cs-path.patch Patch18: glibc-c-utf8-locale.patch Patch23: glibc-python3.patch Patch28: glibc-rh1615608.patch -Patch29: glibc-rh1670028.patch Patch30: glibc-warning-fix.patch ############################################################################## @@ -1892,6 +1891,21 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Wed Mar 13 2019 Florian Weimer - 2.29.9000-5 +- Drop glibc-rh1670028.patch, applied upstream +- Auto-sync with upstream branch master, + commit 38b52865d4ccfee3647f27e969e539a4396a73b1: +- elf: Add DF_1_KMOD, DF_1_WEAKFILTER, DF_1_NOCOMMON to +- resolv: Enable full ICMP errors for UDP DNS sockets [BZ #24047] +- C-SKY: add elf header definition for elfutils +- C-SKY: mark lr as undefined to stop unwinding +- C-SKY: remove user_regs definition +- C-SKY: fix sigcontext miss match +- Bug 24307: Update to Unicode 12.0.0 +- Break lines before not after operators, batch 4. +- check-wrapper-headers test: Adjust Fortran include file directory +- Fix location where math-vector-fortran.h is installed. + * Wed Mar 06 2019 DJ Delorie - 2.29.9000-4 - Auto-sync with upstream branch master, commit 0ddb7ea842abf63516b74d4b057c052afc6ba863. From 4d79a1a6ddd9c16f2764a9d4adb1ce74c88a5076 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 13 Mar 2019 17:44:44 +0100 Subject: [PATCH 09/50] Update sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index b085d40..182cd2f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-114-g0ddb7ea842.tar.xz) = 1977ff73beab3a7415659786c9b923c44cb6981e5b595a4b1d259a493507acec8614b2d6fbae7b91e581f46af73a4df5f213a0d054922c55c5c360cc0445afaf +SHA512 (glibc-2.29.9000-124-g38b52865d4.tar.xz) = 61e5bb8c34663fad540c6c106a45127bd88ec94c8d81d80e9532d913ec8e6ef69b98957d2f10fde6da41c52fd7c0bb0002ad64814027766e02f9bd881646c578 From fdf2115d36548c89f99e39a43bc35e3a2411b3f0 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 14 Mar 2019 16:18:47 +0100 Subject: [PATCH 10/50] Auto-sync with upstream branch master Upstream commit: a0a0dc83173ce11ff45105fd32e5d14356cdfb9c - Drop glibc-fedora-streams-rh436349.patch. STREAMS was removed upstream. - Remove obsolete, never-implemented XSI STREAMS declarations - nss: Fix tst-nss-files-alias-truncated for default --as-needed linking - scripts/check-obsolete-constructs.py: Process all headers as UTF-8. - Use Linux 5.0 in build-many-glibcs.py. - hurd: Add no-op version of __res_enable_icmp [BZ #24047] - Move inttypes.h and stdint.h to stdlib. - Use a proper C tokenizer to implement the obsolete typedefs test. - Fix output of LD_SHOW_AUXV=1. --- glibc-fedora-streams-rh436349.patch | 38 ----------------------------- glibc.spec | 18 +++++++++++--- sources | 2 +- 3 files changed, 16 insertions(+), 42 deletions(-) delete mode 100644 glibc-fedora-streams-rh436349.patch diff --git a/glibc-fedora-streams-rh436349.patch b/glibc-fedora-streams-rh436349.patch deleted file mode 100644 index 0d8f7d9..0000000 --- a/glibc-fedora-streams-rh436349.patch +++ /dev/null @@ -1,38 +0,0 @@ -Short description: Do not define _XOPEN_STREAMS. -Author(s): Fedora glibc team -Origin: PATCH -Bug-Fedora: #436349 -Upstream status: not-submitted - -This patch should go upstream. Not defining _XOPEN_STREAMS is the -same as setting it to -1 for POSIX conformance. The headers setting -needs to be reviewed indepedently. - -This is part of commit glibc-2.3.3-1564-gd0b6ac6 - -* Fri Mar 14 2008 Jakub Jelinek 2.7.90-11 -- remove , define _XOPEN_STREAMS -1 (#436349) - -diff -Nrup a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h ---- a/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-06-07 12:15:21.817318674 -0600 -@@ -188,4 +188,7 @@ - /* Typed memory objects are not available. */ - #define _POSIX_TYPED_MEMORY_OBJECTS -1 - -+/* Streams are not available. */ -+#define _XOPEN_STREAMS -1 -+ - #endif /* bits/posix_opt.h */ -diff -Nrup a/streams/Makefile b/streams/Makefile ---- a/streams/Makefile 2012-06-05 07:42:49.000000000 -0600 -+++ b/streams/Makefile 2012-06-07 12:15:21.824318649 -0600 -@@ -20,7 +20,7 @@ - - include ../Makeconfig - --headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h -+#headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h - routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach - - include ../Rules diff --git a/glibc.spec b/glibc.spec index bfaf8d8..950bf14 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-124-g38b52865d4 +%define glibcsrcdir glibc-2.29.9000-132-ga0a0dc8317 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 5%{?dist} +Release: 6%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -147,7 +147,6 @@ Patch7: glibc-fedora-nis-rh188246.patch Patch8: glibc-fedora-manual-dircategory.patch Patch9: glibc-rh827510.patch Patch10: glibc-fedora-locarchive.patch -Patch11: glibc-fedora-streams-rh436349.patch Patch12: glibc-rh819430.patch Patch13: glibc-fedora-localedata-rh61908.patch Patch14: glibc-fedora-__libc_multiple_libcs.patch @@ -1891,6 +1890,19 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Thu Mar 14 2019 Florian Weimer - 2.29.9000-6 +- Drop glibc-fedora-streams-rh436349.patch. STREAMS was removed upstream. +- Auto-sync with upstream branch master, + commit a0a0dc83173ce11ff45105fd32e5d14356cdfb9c: +- Remove obsolete, never-implemented XSI STREAMS declarations +- nss: Fix tst-nss-files-alias-truncated for default --as-needed linking +- scripts/check-obsolete-constructs.py: Process all headers as UTF-8. +- Use Linux 5.0 in build-many-glibcs.py. +- hurd: Add no-op version of __res_enable_icmp [BZ #24047] +- Move inttypes.h and stdint.h to stdlib. +- Use a proper C tokenizer to implement the obsolete typedefs test. +- Fix output of LD_SHOW_AUXV=1. + * Wed Mar 13 2019 Florian Weimer - 2.29.9000-5 - Drop glibc-rh1670028.patch, applied upstream - Auto-sync with upstream branch master, diff --git a/sources b/sources index 182cd2f..1b699a0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-124-g38b52865d4.tar.xz) = 61e5bb8c34663fad540c6c106a45127bd88ec94c8d81d80e9532d913ec8e6ef69b98957d2f10fde6da41c52fd7c0bb0002ad64814027766e02f9bd881646c578 +SHA512 (glibc-2.29.9000-132-ga0a0dc8317.tar.xz) = de0cfa155b629d3452cbebd04d4f8c9cad49c323319a34a508f94cbe5054ec9e6c9268f8af1af4200e7b5009342e45bbb9e8b6b62db5d5c8f4e211677842af98 From a84cd6b5305baaba9d03431a10ecd35802bf348e Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 18 Mar 2019 13:23:22 -0400 Subject: [PATCH 11/50] Auto-sync with upstream branch master Upstream commit: 78919d3886c9543279ec755a701e279c62b44164 78919d3886 time/mktime.c: Update obsolete URL in comment. b626c5aa5d Record CVE-2019-9169 in NEWS and ChangeLog [BZ #24114] 066ae81ec9 hurd: Fix comment style e87d8ada29 hurd: Document how EINTR should be handled in critical sections 477e739b32 Update syscall-names.list for Linux 5.0. 238d60a1fb localedata: Add Minguo calendar support to Taiwanese locales [BZ #24293] 5b06f538c5 malloc: Check for large bin list corruption when inserting unsorted chunk a0a0dc8317 Remove obsolete, never-implemented XSI STREAMS declarations --- glibc.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 950bf14..96def0f 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-132-ga0a0dc8317 +%define glibcsrcdir glibc-2.29.9000-139-g78919d3886 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 6%{?dist} +Release: 7%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1890,6 +1890,10 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon Mar 18 2019 DJ Delorie - 2.29.9000-7 +- Auto-sync with upstream branch master, + commit 78919d3886c9543279ec755a701e279c62b44164. + * Thu Mar 14 2019 Florian Weimer - 2.29.9000-6 - Drop glibc-fedora-streams-rh436349.patch. STREAMS was removed upstream. - Auto-sync with upstream branch master, diff --git a/sources b/sources index 1b699a0..94170ab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-132-ga0a0dc8317.tar.xz) = de0cfa155b629d3452cbebd04d4f8c9cad49c323319a34a508f94cbe5054ec9e6c9268f8af1af4200e7b5009342e45bbb9e8b6b62db5d5c8f4e211677842af98 +SHA512 (glibc-2.29.9000-139-g78919d3886.tar.xz) = 40fe2eaadaac1c87df69e989d5eb8b9a6981aeee2563e812deb008430c09700b9f7feecc0a746b73ee13174a1b93bfdcd706baed211546aed880c90f5a2ff702 From 82a97343d6405772541d754aeb4bab79612bd839 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 7 Feb 2019 17:15:12 -0500 Subject: [PATCH 12/50] Add warnings and notes to /etc/nsswitch.conf and /etc/nscd.conf. --- glibc-fedora-nscd-warnings.patch | 30 ++++++++++++++++++++++++++++++ glibc.spec | 12 ++++++++++-- nsswitch.conf | 3 +++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 glibc-fedora-nscd-warnings.patch diff --git a/glibc-fedora-nscd-warnings.patch b/glibc-fedora-nscd-warnings.patch new file mode 100644 index 0000000..6a77a24 --- /dev/null +++ b/glibc-fedora-nscd-warnings.patch @@ -0,0 +1,30 @@ +Fedora-specific warnings about using nscd with sssd, and that +shared mappings don't show up in nscd -g statistics. + +diff --git a/nscd/nscd.conf b/nscd/nscd.conf +index 3730835c50a349c4..b66faa3ca33b4b64 100644 +--- a/nscd/nscd.conf ++++ b/nscd/nscd.conf +@@ -3,6 +3,9 @@ + # + # An example Name Service Cache config file. This file is needed by nscd. + # ++# WARNING: Running nscd with a secondary caching service like sssd may lead to ++# unexpected behaviour, especially with how long entries are cached. ++# + # Legal entries are: + # + # logfile +@@ -22,7 +25,12 @@ + # suggested-size + # check-files + # persistent ++# + # shared ++# NOTE: Setting 'shared' to a value of 'yes' will accelerate the lookup ++# with the help of the client, but these lookups will not be ++# counted as cache hits i.e. 'nscd -g' may show '0%'. ++# + # max-db-size + # auto-propagate + # diff --git a/glibc.spec b/glibc.spec index 96def0f..0eaa5ed 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 7%{?dist} +Release: 8%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -158,6 +158,12 @@ Patch23: glibc-python3.patch Patch28: glibc-rh1615608.patch Patch30: glibc-warning-fix.patch +# In progress upstream submission for nsswitch.conf changes: +# https://www.sourceware.org/ml/libc-alpha/2019-03/msg00425.html +# In progress upstream submission for nscd.conf changes: +# https://www.sourceware.org/ml/libc-alpha/2019-03/msg00436.html +Patch31: glibc-fedora-nscd-warnings.patch + ############################################################################## # Continued list of core "glibc" package information: ############################################################################## @@ -1890,6 +1896,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Thu Mar 07 2019 Carlos O'Donell - 2.29.9000-8 +- Add warnings and notes to /etc/nsswitch.conf and /etc/nscd.conf. + * Mon Mar 18 2019 DJ Delorie - 2.29.9000-7 - Auto-sync with upstream branch master, commit 78919d3886c9543279ec755a701e279c62b44164. @@ -1955,7 +1964,6 @@ fi - Break further lines before not after operators. - Add and move fall-through comments in system-specific code. - * Fri Mar 1 2019 DJ Delorie - 2.29.9000-3 - Add .gdb_index to debug information (rhbz#1680765) diff --git a/nsswitch.conf b/nsswitch.conf index b49a3b2..ba87550 100644 --- a/nsswitch.conf +++ b/nsswitch.conf @@ -24,6 +24,9 @@ # # 'sssd' performs its own 'files'-based caching, so it should # generally come before 'files'. +# +# WARNING: Running nscd with a secondary caching service like sssd may lead to +# unexpected behaviour, especially with how long entries are cached. # To use 'db', install the nss_db package, and put the 'db' in front # of 'files' for entries you want to be looked up first in the From bfa3999fdd34d449196784049222ddd5022a3ecb Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 20 Mar 2019 22:41:20 -0400 Subject: [PATCH 13/50] Fix %changelog date. --- glibc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index 0eaa5ed..47d9185 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1896,7 +1896,7 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog -* Thu Mar 07 2019 Carlos O'Donell - 2.29.9000-8 +* Wed Mar 20 2019 Carlos O'Donell - 2.29.9000-8 - Add warnings and notes to /etc/nsswitch.conf and /etc/nscd.conf. * Mon Mar 18 2019 DJ Delorie - 2.29.9000-7 From 7b2061df55ba606e8a67e096248e38bce41b2c83 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Mon, 1 Apr 2019 16:44:34 +0200 Subject: [PATCH 14/50] Auto-sync with upstream branch master Upstream commit: 993e3107af67edefcfc79a62ae55f7b98aa5151e - Add AArch64 HWCAPs from Linux 5.0 - tt_RU: Fix orthographic mistakes in day and abday sections [BZ #24296] - iconv, localedef: avoid floating point rounding differences [BZ #24372] - Fix parentheses error in iconvconfig.c and ld-collate.c [BZ #24372] - S390: New configure check and hwcap values for new CPU architecture arch13 - S390: Add memmove, strstr, and memmem ifunc variants for arch13 - nptl: Remove pthread_clock_gettime pthread_clock_settime - linux: Assume clock_getres CLOCK_{PROCESS,THREAD}_CPUTIME_ID - Remove __get_clockfreq - Do not use HP_TIMING_NOW for random bits - hp-timing: Refactor rtld usage, add generic support - Add NT_ARM_PAC_MASK and NT_MIPS_MSA from Linux 5.0 to elf.h - Add UDP_GRO from Linux 5.0 to netinet/udp.h - nptl: Convert tst-sem5 & tst-sem13 to use libsupport - nptl/tst-rwlock14: Test pthread_rwlock_timedwrlock correctly - nss/tst-nss-files-alias-leak: add missing opening quote in printf - math: Enable some math builtins for clang - powerpc: Use __builtin_{mffs,mtfsf} - RISC-V: Fix `test' operand error with soft-float ABI being configured --- glibc.spec | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/glibc.spec b/glibc.spec index 47d9185..667ec05 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-139-g78919d3886 +%define glibcsrcdir glibc-2.29.9000-168-g993e3107af %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 8%{?dist} +Release: 9%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1896,6 +1896,29 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon Apr 01 2019 Arjun Shankar - 2.29.9000-9 +- Auto-sync with upstream branch master, + commit 993e3107af67edefcfc79a62ae55f7b98aa5151e: +- Add AArch64 HWCAPs from Linux 5.0 +- tt_RU: Fix orthographic mistakes in day and abday sections [BZ #24296] +- iconv, localedef: avoid floating point rounding differences [BZ #24372] +- Fix parentheses error in iconvconfig.c and ld-collate.c [BZ #24372] +- S390: New configure check and hwcap values for new CPU architecture arch13 +- S390: Add memmove, strstr, and memmem ifunc variants for arch13 +- nptl: Remove pthread_clock_gettime pthread_clock_settime +- linux: Assume clock_getres CLOCK_{PROCESS,THREAD}_CPUTIME_ID +- Remove __get_clockfreq +- Do not use HP_TIMING_NOW for random bits +- hp-timing: Refactor rtld usage, add generic support +- Add NT_ARM_PAC_MASK and NT_MIPS_MSA from Linux 5.0 to elf.h +- Add UDP_GRO from Linux 5.0 to netinet/udp.h +- nptl: Convert tst-sem5 & tst-sem13 to use libsupport +- nptl/tst-rwlock14: Test pthread_rwlock_timedwrlock correctly +- nss/tst-nss-files-alias-leak: add missing opening quote in printf +- math: Enable some math builtins for clang +- powerpc: Use __builtin_{mffs,mtfsf} +- RISC-V: Fix `test' operand error with soft-float ABI being configured + * Wed Mar 20 2019 Carlos O'Donell - 2.29.9000-8 - Add warnings and notes to /etc/nsswitch.conf and /etc/nscd.conf. From 539fe8abbd575c2cb34c59b8bb52bdd73c76b1b7 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Mon, 1 Apr 2019 18:33:52 +0200 Subject: [PATCH 15/50] Update sources file --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 94170ab..6418979 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-139-g78919d3886.tar.xz) = 40fe2eaadaac1c87df69e989d5eb8b9a6981aeee2563e812deb008430c09700b9f7feecc0a746b73ee13174a1b93bfdcd706baed211546aed880c90f5a2ff702 +SHA512 (glibc-2.29.9000-168-g993e3107af.tar.xz) = d4173788d59d7668b68366ed095f2f321d844fe85eb19f0f08fe673aaa75d8ef61c43501b30552fb91820eda1673dc81fa241bff122514fa69c4a694f642adc0 From e4dacdad3d14585c74a67f9ea450eca030716e0c Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Thu, 4 Apr 2019 03:07:08 +0200 Subject: [PATCH 16/50] Auto-sync with upstream branch master Upstream commit: 8260f23616c1a2a4e609f989a195fba7690a42ca - Fix strptime era handling, add more strftime tests [BZ #24394] - time/tst-strftime2.c: Make the file easier to maintain - time: Add tests for Minguo calendar [BZ #24293] - ja_JP locale: Add entry for the new Japanese era [BZ #22964] - Add Reiwa era tests to time/tst-strftime3.c --- glibc.spec | 13 +++++++++++-- sources | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 667ec05..7612be9 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-168-g993e3107af +%define glibcsrcdir glibc-2.29.9000-176-g8260f23616 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 9%{?dist} +Release: 10%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1896,6 +1896,15 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Thu Apr 04 2019 Arjun Shankar - 2.29.9000-10 +- Auto-sync with upstream branch master, + commit 8260f23616c1a2a4e609f989a195fba7690a42ca: +- Fix strptime era handling, add more strftime tests [BZ #24394] +- time/tst-strftime2.c: Make the file easier to maintain +- time: Add tests for Minguo calendar [BZ #24293] +- ja_JP locale: Add entry for the new Japanese era [BZ #22964] +- Add Reiwa era tests to time/tst-strftime3.c + * Mon Apr 01 2019 Arjun Shankar - 2.29.9000-9 - Auto-sync with upstream branch master, commit 993e3107af67edefcfc79a62ae55f7b98aa5151e: diff --git a/sources b/sources index 6418979..71350b8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-168-g993e3107af.tar.xz) = d4173788d59d7668b68366ed095f2f321d844fe85eb19f0f08fe673aaa75d8ef61c43501b30552fb91820eda1673dc81fa241bff122514fa69c4a694f642adc0 +SHA512 (glibc-2.29.9000-176-g8260f23616.tar.xz) = 62e691eddb773ebedea61d3cddfa6afadd0e98055dd46e794bcec5cd07aa010379b94bdce9a363940a2d1e68c1beaa16ee05e517df01862bfb6fac707fff1605 From b797613532f113578d9c3e229a921b0e732ae145 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 9 Apr 2019 11:05:36 -0400 Subject: [PATCH 17/50] Auto-sync with upstream branch master Upstream commit: 648279f4af423c4783ec1dfa63cb7b46a7640217 - Drop glibc-warning-fix.patch. Microbenchmark code fixed upstream. - powerpc: Use generic wcscpy optimization - powerpc: Use generic wcschr optimization - powerpc: Use generic wcsrchr optimization - aarch64: thunderx2 memcpy implementation cleanup and streamlining - resolv: Remove support for RES_USE_INET6 and the inet6 option - resolv: Remove RES_INSECURE1, RES_INSECURE2 --- glibc-warning-fix.patch | 25 ------------------------- glibc.spec | 16 +++++++++++++--- sources | 2 +- 3 files changed, 14 insertions(+), 29 deletions(-) delete mode 100644 glibc-warning-fix.patch diff --git a/glibc-warning-fix.patch b/glibc-warning-fix.patch deleted file mode 100644 index 0e4afa1..0000000 --- a/glibc-warning-fix.patch +++ /dev/null @@ -1,25 +0,0 @@ -Temporary work around to fix compiler warning for set but not used -'res' variable. - -e.g. -BUILDSTDERR: bench-malloc-simple.c: In function 'bench': -BUILDSTDERR: bench-malloc-simple.c:89:17: error: variable 'res' set but not used [-Werror=unused-but-set-variable] -BUILDSTDERR: 89 | unsigned long res; -BUILDSTDERR: | ^~~ -BUILDSTDERR: cc1: all warnings being treated as errors - -Affects aarch64, armv7hl, and s390x. - -diff --git a/benchtests/bench-malloc-simple.c b/benchtests/bench-malloc-simple.c -index 83203ff3187654a1..e449dd5a2e351278 100644 ---- a/benchtests/bench-malloc-simple.c -+++ b/benchtests/bench-malloc-simple.c -@@ -90,6 +90,8 @@ bench (unsigned long size) - - TIMING_INIT (res); - -+ (void) res; -+ - for (int t = 0; t <= 3; t++) - for (int i = 0; i < NUM_ALLOCS; i++) - { diff --git a/glibc.spec b/glibc.spec index 7612be9..562aba2 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-176-g8260f23616 +%define glibcsrcdir glibc-2.29.9000-189-g648279f4af %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 10%{?dist} +Release: 11%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -156,7 +156,6 @@ Patch17: glibc-cs-path.patch Patch18: glibc-c-utf8-locale.patch Patch23: glibc-python3.patch Patch28: glibc-rh1615608.patch -Patch30: glibc-warning-fix.patch # In progress upstream submission for nsswitch.conf changes: # https://www.sourceware.org/ml/libc-alpha/2019-03/msg00425.html @@ -1896,6 +1895,17 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Tue Apr 09 2019 Carlos O'Donell - 2.29.9000-11 +- Drop glibc-warning-fix.patch. Microbenchmark code fixed upstream. +- Auto-sync with upstream branch master, + commit 648279f4af423c4783ec1dfa63cb7b46a7640217: +- powerpc: Use generic wcscpy optimization +- powerpc: Use generic wcschr optimization +- powerpc: Use generic wcsrchr optimization +- aarch64: thunderx2 memcpy implementation cleanup and streamlining +- resolv: Remove support for RES_USE_INET6 and the inet6 option +- resolv: Remove RES_INSECURE1, RES_INSECURE2 + * Thu Apr 04 2019 Arjun Shankar - 2.29.9000-10 - Auto-sync with upstream branch master, commit 8260f23616c1a2a4e609f989a195fba7690a42ca: diff --git a/sources b/sources index 71350b8..15c2aa0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-176-g8260f23616.tar.xz) = 62e691eddb773ebedea61d3cddfa6afadd0e98055dd46e794bcec5cd07aa010379b94bdce9a363940a2d1e68c1beaa16ee05e517df01862bfb6fac707fff1605 +SHA512 (glibc-2.29.9000-189-g648279f4af.tar.xz) = 5540f7922cd9829b1f5b8b021ac156e5a2e4b95c4712b9ab4d9ec9578941ff078b945af0a454e35b48e57bb25f322cfc28b42086a4f56ea224da4a87cb84e759 From 7b77f1b10ff9c4a50f36e2d2805fbf783a81b55d Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 10 Apr 2019 10:26:43 +0200 Subject: [PATCH 18/50] Strip debugging information from installed programs again (#1661510) --- glibc.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 562aba2..586e94d 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 11%{?dist} +Release: 12%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -253,7 +253,7 @@ Conflicts: prelink < 0.4.2 %if 0%{?_enable_debug_packages} BuildRequires: elfutils >= 0.72 -BuildRequires: rpm >= 4.2-0.56 +BuildRequires: rpm >= 4.14.2.1-5 %endif %if %{without bootstrap} @@ -1550,7 +1550,7 @@ echo "%{_libdir}/libpthread_nonshared.a" >> compat-libpthread-nonshared.filelist # glibc-debuginfocommon, and glibc-debuginfo ############################################################################### -find_debuginfo_args='--strict-build-id -g -i' +find_debuginfo_args='--strict-build-id --g-libs -i' %ifarch %{debuginfocommonarches} find_debuginfo_args="$find_debuginfo_args \ -l common.filelist \ @@ -1895,6 +1895,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Wed Apr 10 2019 Florian Weimer - 2.29.9000-12 +- Strip debugging information from installed programs again (#1661510) + * Tue Apr 09 2019 Carlos O'Donell - 2.29.9000-11 - Drop glibc-warning-fix.patch. Microbenchmark code fixed upstream. - Auto-sync with upstream branch master, From dcaaa784676727b0ea9206c6c6aa0e8ef955a1e1 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 11 Apr 2019 12:18:48 +0200 Subject: [PATCH 19/50] Do not use --g-libs with find-debuginfo.sh; it breaks valgrind (#1698824) --- glibc.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 586e94d..c080526 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 12%{?dist} +Release: 13%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -253,7 +253,7 @@ Conflicts: prelink < 0.4.2 %if 0%{?_enable_debug_packages} BuildRequires: elfutils >= 0.72 -BuildRequires: rpm >= 4.14.2.1-5 +BuildRequires: rpm >= 4.2-0.56 %endif %if %{without bootstrap} @@ -1550,7 +1550,7 @@ echo "%{_libdir}/libpthread_nonshared.a" >> compat-libpthread-nonshared.filelist # glibc-debuginfocommon, and glibc-debuginfo ############################################################################### -find_debuginfo_args='--strict-build-id --g-libs -i' +find_debuginfo_args='--strict-build-id -g -i' %ifarch %{debuginfocommonarches} find_debuginfo_args="$find_debuginfo_args \ -l common.filelist \ @@ -1895,6 +1895,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Thu Apr 11 2019 Florian Weimer - 2.29.9000-13 +- Do not use --g-libs with find-debuginfo.sh; it breaks valgrind (#1698824) + * Wed Apr 10 2019 Florian Weimer - 2.29.9000-12 - Strip debugging information from installed programs again (#1661510) From a54853472d5f9ec445fcf0be957f3aa68e852a8c Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 11 Apr 2019 21:53:43 +0200 Subject: [PATCH 20/50] Run valgrind smoke test against the install tree --- glibc.spec | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/glibc.spec b/glibc.spec index c080526..9c44fd6 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 13%{?dist} +Release: 14%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1726,22 +1726,26 @@ 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). +run_ldso="$(find %{glibc_sysroot}/%{_lib}/ld-*.so -type f | LC_ALL=C sort | head -n1) --library-path %{glibc_sysroot}/%{_lib}" + +# Show the auxiliary vector as seen by the new library +# (even if we do not perform the valgrind test). +LD_SHOW_AUXV=1 $run_ldso /bin/true + # Finally, check if valgrind runs with the new glibc. # We want to fail building if valgrind is not able to run with this glibc so # that we can then coordinate with valgrind to get it fixed before we update # glibc. -pushd build-%{target} - -# Show the auxiliary vector as seen by the new library -# (even if we do not perform the valgrind test). -LD_SHOW_AUXV=1 elf/ld.so --library-path .:elf:nptl:dlfcn /bin/true - %if %{with valgrind} -elf/ld.so --library-path .:elf:nptl:dlfcn \ - /usr/bin/valgrind --error-exitcode=1 \ - elf/ld.so --library-path .:elf:nptl:dlfcn /usr/bin/true +$run_ldso /usr/bin/valgrind --error-exitcode=1 \ + $run_ldso /usr/bin/true +# true --help performs some memory allocations. +$run_ldso /usr/bin/valgrind --error-exitcode=1 \ + $run_ldso /usr/bin/true --help >/dev/null %endif -popd %endif # %{run_glibc_tests} @@ -1895,6 +1899,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Thu Apr 11 2019 Florian Weimer - 2.29.9000-14 +- Run valgrind smoke test against the install tree + * Thu Apr 11 2019 Florian Weimer - 2.29.9000-13 - Do not use --g-libs with find-debuginfo.sh; it breaks valgrind (#1698824) From 448365c7f7e6924929c5bcfba271cde4751f97d5 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 15 Apr 2019 15:05:30 +0200 Subject: [PATCH 21/50] Auto-sync with upstream branch master Upstream commit: e3f454bac0f968216699ca405c127c858f0657c7 - nss_dns: Do not replace root domain with empty string - alloc_buffer: Return unqualified pointer type in alloc_buffer_next - malloc: Set and reset all hooks for tracing (swbz#16573) --- glibc.spec | 11 +++++++++-- sources | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 9c44fd6..d16a96d 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-189-g648279f4af +%define glibcsrcdir glibc-2.29.9000-196-ge3f454bac0 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 14%{?dist} +Release: 15%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1899,6 +1899,13 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon Apr 15 2019 Florian Weimer - 2.29.9000-15 +- Auto-sync with upstream branch master, + commit e3f454bac0f968216699ca405c127c858f0657c7: +- nss_dns: Do not replace root domain with empty string +- alloc_buffer: Return unqualified pointer type in alloc_buffer_next +- malloc: Set and reset all hooks for tracing (swbz#16573) + * Thu Apr 11 2019 Florian Weimer - 2.29.9000-14 - Run valgrind smoke test against the install tree diff --git a/sources b/sources index 15c2aa0..d6a53be 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-189-g648279f4af.tar.xz) = 5540f7922cd9829b1f5b8b021ac156e5a2e4b95c4712b9ab4d9ec9578941ff078b945af0a454e35b48e57bb25f322cfc28b42086a4f56ea224da4a87cb84e759 +SHA512 (glibc-2.29.9000-196-ge3f454bac0.tar.xz) = ec0d9b0a454c0a35e55c7e82e76f30c4ec52ffa70dc20070d40c72ca5c4b672de185c0a090a35142a86d8d3736ee3992f262880d89a72df9d0607d1742c8fdc9 From 47192f413e15f42d0b6d2aeb869ce13f4e75ee25 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 22 Apr 2019 15:33:30 -0400 Subject: [PATCH 22/50] Auto-sync with upstream branch master Upstream commit: 25f7a3c96116a9102df8bf7b04ef160faa32416d - malloc: make malloc fail with requests larger than PTRDIFF_MAX (BZ#23741) - powerpc: Fix format issue from 3a16dd780eeba602 - powerpc: fma using builtins - powerpc: Use generic fabs{f} implementations - mips: Remove rt_sigreturn usage on context function - powerpc: Remove rt_sigreturn usage on context function - support: Add support_capture_subprogram - stdlib/tst-secure-getenv: handle >64 groups --- glibc.spec | 16 ++++++++++++++-- sources | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index d16a96d..cf61b18 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-196-ge3f454bac0 +%define glibcsrcdir glibc-2.29.9000-207-g25f7a3c961 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 15%{?dist} +Release: 16%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1899,6 +1899,18 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon Apr 22 2019 DJ Delorie - 2.29.9000-16 +- Auto-sync with upstream branch master, + commit 25f7a3c96116a9102df8bf7b04ef160faa32416d. +- malloc: make malloc fail with requests larger than PTRDIFF_MAX (BZ#23741) +- powerpc: Fix format issue from 3a16dd780eeba602 +- powerpc: fma using builtins +- powerpc: Use generic fabs{f} implementations +- mips: Remove rt_sigreturn usage on context function +- powerpc: Remove rt_sigreturn usage on context function +- support: Add support_capture_subprogram +- stdlib/tst-secure-getenv: handle >64 groups + * Mon Apr 15 2019 Florian Weimer - 2.29.9000-15 - Auto-sync with upstream branch master, commit e3f454bac0f968216699ca405c127c858f0657c7: diff --git a/sources b/sources index d6a53be..7bfa935 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-196-ge3f454bac0.tar.xz) = ec0d9b0a454c0a35e55c7e82e76f30c4ec52ffa70dc20070d40c72ca5c4b672de185c0a090a35142a86d8d3736ee3992f262880d89a72df9d0607d1742c8fdc9 +SHA512 (glibc-2.29.9000-207-g25f7a3c961.tar.xz) = 3598e92d2ebb21b9ed1602819ee411e43ae20b1b6a929c36a97fa1ac1d4b7a344f388cfac971a68cf84577ad845705765b91f4a934f957531bfbb7138551ada4 From d9394d9d7e84eb1e5197d8ffb7ed277584e345f1 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 26 Apr 2019 13:51:28 +0200 Subject: [PATCH 23/50] Auto-sync with upstream branch master Upstream commit: c57afec0a9b318bb691e0f5fa4e9681cf30df7a4 - Increase BIND_NOW coverage (#1702671) - Fix pldd hang (#1361689) - riscv: remove DL_RO_DYN_SECTION (swbz#24484) - locale: Add LOCPATH diagnostics to the locale program - benchtests: Enable BIND_NOW if configured with --enable-bind-now --- glibc.spec | 13 +++++++++++-- sources | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index cf61b18..22692fc 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-207-g25f7a3c961 +%define glibcsrcdir glibc-2.29.9000-219-gc57afec0a9 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 16%{?dist} +Release: 17%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1899,6 +1899,15 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Fri Apr 26 2019 Florian Weimer - 2.29.9000-17 +- Auto-sync with upstream branch master, + commit c57afec0a9b318bb691e0f5fa4e9681cf30df7a4: +- Increase BIND_NOW coverage (#1702671) +- Fix pldd hang (#1361689) +- riscv: remove DL_RO_DYN_SECTION (swbz#24484) +- locale: Add LOCPATH diagnostics to the locale program +- Reduce benchtests time + * Mon Apr 22 2019 DJ Delorie - 2.29.9000-16 - Auto-sync with upstream branch master, commit 25f7a3c96116a9102df8bf7b04ef160faa32416d. diff --git a/sources b/sources index 7bfa935..abbb490 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-207-g25f7a3c961.tar.xz) = 3598e92d2ebb21b9ed1602819ee411e43ae20b1b6a929c36a97fa1ac1d4b7a344f388cfac971a68cf84577ad845705765b91f4a934f957531bfbb7138551ada4 +SHA512 (glibc-2.29.9000-219-gc57afec0a9.tar.xz) = 3c91dfac3c432b675ffd16eb9c2acda133a8e78c03939b268951db64308d44ee7de8059d0494b37254eb4153a476960f8aaee64783643d77a55c6372c986fd56 From 4124e42f39ca859587745c25caffd0733ef2e456 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Thu, 2 May 2019 13:03:35 +0200 Subject: [PATCH 24/50] Auto-sync with upstream branch master Upstream commit: 20aa5819586ac7ad11f711bab64feda307965191 - semaphore.h: Add nonnull attributes - powerpc: Remove power4 mpa optimization - powerpc: Refactor ceil/ceilf - Fix -O1 compilation errors with `__ddivl' and `__fdivl' [BZ #19444] - Make mktime etc. compatible with __time64_t --- glibc.spec | 13 +++++++++++-- sources | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 22692fc..391b768 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-219-gc57afec0a9 +%define glibcsrcdir glibc-2.29.9000-224-g20aa581958 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 17%{?dist} +Release: 18%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1899,6 +1899,15 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Thu May 02 2019 Arjun Shankar - 2.29.9000-18 +- Auto-sync with upstream branch master, + commit 20aa5819586ac7ad11f711bab64feda307965191: +- semaphore.h: Add nonnull attributes +- powerpc: Remove power4 mpa optimization +- powerpc: Refactor ceil/ceilf +- Fix -O1 compilation errors with `__ddivl' and `__fdivl' [BZ #19444] +- Make mktime etc. compatible with __time64_t + * Fri Apr 26 2019 Florian Weimer - 2.29.9000-17 - Auto-sync with upstream branch master, commit c57afec0a9b318bb691e0f5fa4e9681cf30df7a4: diff --git a/sources b/sources index abbb490..7b1d9f8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-219-gc57afec0a9.tar.xz) = 3c91dfac3c432b675ffd16eb9c2acda133a8e78c03939b268951db64308d44ee7de8059d0494b37254eb4153a476960f8aaee64783643d77a55c6372c986fd56 +SHA512 (glibc-2.29.9000-224-g20aa581958.tar.xz) = f1b86c03d65ed3be1b724bba35197d51991e8d435e834a781f57105df70e4ab562e386d2bbf7073b7e9b890f8fb273c3ee75d4329b593aff7dc17f3f35627758 From 6666c40188f4103b0ec2dcbc0e7d0f80fa30ce9f Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 15 May 2019 17:55:39 +0200 Subject: [PATCH 25/50] Auto-sync with upstream branch master Upstream commit: 32ff397533715988c19cbf3675dcbd727ec13e18 - Fix crash in _IO_wfile_sync (#1710460) - nss: Turn __nss_database_lookup into a compatibility symbol - support: Add support_install_rootsbindir - iconv: Remove public declaration of __gconv_transliterate - Linux: Add the tgkill function - manual: Adjust twalk_r documentation. - elf: Fix tst-pldd for non-default --prefix and/or --bindir (swbz#24544) - support: Export bindir path on support_path - configure: Make --bindir effective - x86: Remove arch-specific low level lock implementation - nptl: Assume LLL_LOCK_INITIALIZER is 0 - nptl: Small optimization for lowlevellock - Add single-thread.h header - locale: Update to Unicode 12.1.0 (swbz#24535) - malloc: Fix tcache count maximum (swbz#24531) - sem_close: Use __twalk_r - support: Fix timespec printf - nptl/tst-abstime: Use libsupport - nptl: Convert some rwlock tests to use libsupport - nptl: Use recent additions to libsupport in tst-sem5 - nptl: Convert tst-cond11.c to use libsupport - support: Add timespec.h - Move nptl/tst-eintr1 to xtests (swbz#24537) - powerpc: trunc/truncf refactor - powerpc: round/roundf refactor - powerpc: floor/floorf refactor - support: Add xclock_gettime - malloc/tst-mallocfork2: Use process-shared barriers - Update syscall-names.list for Linux 5.1 - Use GCC 9 in build-many-glibcs.py - aarch64: thunderx2 memmove performance improvements - misc/tst-tsearch: Additional explicit error checking - elf: Fix elf/tst-pldd with --enable-hardcoded-path-in-tests (swbz#24506) - misc: Add twalk_r function --- glibc.spec | 42 ++++++++++++++++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 391b768..df07e14 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-224-g20aa581958 +%define glibcsrcdir glibc-2.29.9000-261-g32ff397533 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 18%{?dist} +Release: 19%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1899,6 +1899,44 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Wed May 15 2019 Florian Weimer - 2.29.9000-19 +- Auto-sync with upstream branch master, + commit 32ff397533715988c19cbf3675dcbd727ec13e18: +- Fix crash in _IO_wfile_sync (#1710460) +- nss: Turn __nss_database_lookup into a compatibility symbol +- support: Add support_install_rootsbindir +- iconv: Remove public declaration of __gconv_transliterate +- Linux: Add the tgkill function +- manual: Adjust twalk_r documentation. +- elf: Fix tst-pldd for non-default --prefix and/or --bindir (swbz#24544) +- support: Export bindir path on support_path +- configure: Make --bindir effective +- x86: Remove arch-specific low level lock implementation +- nptl: Assume LLL_LOCK_INITIALIZER is 0 +- nptl: Small optimization for lowlevellock +- Add single-thread.h header +- locale: Update to Unicode 12.1.0 (swbz#24535) +- malloc: Fix tcache count maximum (swbz#24531) +- sem_close: Use __twalk_r +- support: Fix timespec printf +- nptl/tst-abstime: Use libsupport +- nptl: Convert some rwlock tests to use libsupport +- nptl: Use recent additions to libsupport in tst-sem5 +- nptl: Convert tst-cond11.c to use libsupport +- support: Add timespec.h +- Move nptl/tst-eintr1 to xtests (swbz#24537) +- powerpc: trunc/truncf refactor +- powerpc: round/roundf refactor +- powerpc: floor/floorf refactor +- support: Add xclock_gettime +- malloc/tst-mallocfork2: Use process-shared barriers +- Update syscall-names.list for Linux 5.1 +- Use GCC 9 in build-many-glibcs.py +- aarch64: thunderx2 memmove performance improvements +- misc/tst-tsearch: Additional explicit error checking +- elf: Fix elf/tst-pldd with --enable-hardcoded-path-in-tests (swbz#24506) +- misc: Add twalk_r function + * Thu May 02 2019 Arjun Shankar - 2.29.9000-18 - Auto-sync with upstream branch master, commit 20aa5819586ac7ad11f711bab64feda307965191: diff --git a/sources b/sources index 7b1d9f8..c08fdc1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-224-g20aa581958.tar.xz) = f1b86c03d65ed3be1b724bba35197d51991e8d435e834a781f57105df70e4ab562e386d2bbf7073b7e9b890f8fb273c3ee75d4329b593aff7dc17f3f35627758 +SHA512 (glibc-2.29.9000-261-g32ff397533.tar.xz) = 98da9bd37d4e5628ac257cfa88af1c6646762dc30bd322b9171ecd6c029ab3333d387b480ca017bfc82881d2b789e037a1b3634b14789df2d7b7e42f130bb1c0 From 9701fdade7415cc798e0bd17efd1c5310789fb93 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 21 May 2019 14:21:21 -0400 Subject: [PATCH 26/50] Auto-sync with upstream branch master, Upstream commit 46ae07324b1cd50fbf8f37a076d6babcfca7c510 - Improve string benchtest timing - sysvipc: Add missing bit of semtimedop s390 consolidation - wcsmbs: Fix data race in __wcsmbs_clone_conv [swbz #24584] - libio: Fix gconv-related memory leak [swbz #24583] - libio: Remove codecvt vtable [swbz #24588] - support: Expose sbindir as support_sbindir_prefix - support: Add missing EOL terminators on timespec - support: Correct confusing comment - sysvipc: Consolidate semtimedop s390 - sysvipc: Fix compat msgctl (swbz#24570) - Add NT_ARM_PACA_KEYS and NT_ARM_PACG_KEYS from Linux 5.1 to elf.h. - Small tcache improvements - manual: Document O_DIRECTORY - Update kernel-features.h files for Linux 5.1. - nss_nis, nss_nisplus: Remove RES_USE_INET6 handling - nss_files: Remove RES_USE_INET6 from hosts processing - support: Report NULL blobs explicitly in TEST_COMPARE - dlfcn: Guard __dlerror_main_freeres with __libc_once_get (once) [swbz# 24476] - Add missing Changelog entry --- glibc.spec | 28 ++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index df07e14..e9da711 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-261-g32ff397533 +%define glibcsrcdir glibc-2.29.9000-280-g46ae07324b %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 19%{?dist} +Release: 20%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1899,6 +1899,30 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Tue May 21 2019 DJ Delorie - 2.29.9000-20 +- Auto-sync with upstream branch master, + commit 46ae07324b1cd50fbf8f37a076d6babcfca7c510. +- Improve string benchtest timing +- sysvipc: Add missing bit of semtimedop s390 consolidation +- wcsmbs: Fix data race in __wcsmbs_clone_conv [swbz #24584] +- libio: Fix gconv-related memory leak [swbz #24583] +- libio: Remove codecvt vtable [swbz #24588] +- support: Expose sbindir as support_sbindir_prefix +- support: Add missing EOL terminators on timespec +- support: Correct confusing comment +- sysvipc: Consolidate semtimedop s390 +- sysvipc: Fix compat msgctl (swbz#24570) +- Add NT_ARM_PACA_KEYS and NT_ARM_PACG_KEYS from Linux 5.1 to elf.h. +- Small tcache improvements +- manual: Document O_DIRECTORY +- Update kernel-features.h files for Linux 5.1. +- nss_nis, nss_nisplus: Remove RES_USE_INET6 handling +- nss_files: Remove RES_USE_INET6 from hosts processing +- support: Report NULL blobs explicitly in TEST_COMPARE +- dlfcn: Guard __dlerror_main_freeres with __libc_once_get (once) [swbz# 24476] +- Add missing Changelog entry + + * Wed May 15 2019 Florian Weimer - 2.29.9000-19 - Auto-sync with upstream branch master, commit 32ff397533715988c19cbf3675dcbd727ec13e18: diff --git a/sources b/sources index c08fdc1..8aeb1ec 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-261-g32ff397533.tar.xz) = 98da9bd37d4e5628ac257cfa88af1c6646762dc30bd322b9171ecd6c029ab3333d387b480ca017bfc82881d2b789e037a1b3634b14789df2d7b7e42f130bb1c0 +SHA512 (glibc-2.29.9000-280-g46ae07324b.tar.xz) = 94520dfd7237492f1dd8b5d23df6132f8b7ce079c4a47d2432460d716e84a490c5aed9682dfb43b618152f2b071937733a39f9686a5abfce46165e2e88a0f645 From 74725dd94ede74f445c16a936024baf108594903 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Mon, 27 May 2019 14:45:50 +0200 Subject: [PATCH 27/50] Auto-sync with upstream branch master Upstream commit: 85188d8211698d1a255f0aec6529546db5c56de3 - Remove support for PowerPC SPE extension - elf: Add tst-ldconfig-bad-aux-cache test - Add F_SEAL_FUTURE_WRITE from Linux 5.1 to bits/fcntl-linux.h - nss_dns: Check for proper A/AAAA address alignment --- glibc.spec | 12 ++++++++++-- sources | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index e9da711..775ecef 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-280-g46ae07324b +%define glibcsrcdir glibc-2.29.9000-286-g85188d8211 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 20%{?dist} +Release: 21%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1899,6 +1899,14 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon May 27 2019 Arjun Shankar - 2.29.9000-21 +- Auto-sync with upstream branch master, + commit 85188d8211698d1a255f0aec6529546db5c56de3: +- Remove support for PowerPC SPE extension +- elf: Add tst-ldconfig-bad-aux-cache test +- Add F_SEAL_FUTURE_WRITE from Linux 5.1 to bits/fcntl-linux.h +- nss_dns: Check for proper A/AAAA address alignment + * Tue May 21 2019 DJ Delorie - 2.29.9000-20 - Auto-sync with upstream branch master, commit 46ae07324b1cd50fbf8f37a076d6babcfca7c510. diff --git a/sources b/sources index 8aeb1ec..ad27d2f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-280-g46ae07324b.tar.xz) = 94520dfd7237492f1dd8b5d23df6132f8b7ce079c4a47d2432460d716e84a490c5aed9682dfb43b618152f2b071937733a39f9686a5abfce46165e2e88a0f645 +SHA512 (glibc-2.29.9000-286-g85188d8211.tar.xz) = df0953bef2d4b45a25573e6c42fcf08845d884ff2af4f11ad4bef60b78aa20852b814311bcdcaf795fa6dbcda015cdb25f39d1f1d50850e8975e39db2ab4c277 From 50bcae98df7d383733d4d6d896b9e1e829914eb0 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 1 Jun 2019 13:13:40 +0200 Subject: [PATCH 28/50] Remove support for filtering glibc-all-langpacks (#1715891) Reviewed-by: Carlos O'Donell --- build-locale-archive.c | 862 ---------------------------------- glibc-fedora-locarchive.patch | 46 -- glibc.spec | 48 +- 3 files changed, 2 insertions(+), 954 deletions(-) delete mode 100644 build-locale-archive.c delete mode 100644 glibc-fedora-locarchive.patch diff --git a/build-locale-archive.c b/build-locale-archive.c deleted file mode 100644 index 9183972..0000000 --- a/build-locale-archive.c +++ /dev/null @@ -1,862 +0,0 @@ -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../locale/hashval.h" -#define __LC_LAST 13 -#include "../locale/locarchive.h" -#include "../crypt/md5.h" - -const char *alias_file = DATADIR "/locale/locale.alias"; -const char *locar_file = PREFIX "/lib/locale/locale-archive"; -const char *tmpl_file = PREFIX "/lib/locale/locale-archive.tmpl"; -const char *loc_path = PREFIX "/lib/locale/"; -/* Flags set by `--verbose` option. */ -int be_quiet = 1; -int verbose = 0; -int max_locarchive_open_retry = 10; -const char *output_prefix; - -/* Endianness should have been taken care of by localedef. We don't need to do - additional swapping. We need this variable exported however, since - locarchive.c uses it to determine if it needs to swap endianness of a value - before writing to or reading from the archive. */ -bool swap_endianness_p = false; - -static const char *locnames[] = - { -#define DEFINE_CATEGORY(category, category_name, items, a) \ - [category] = category_name, -#include "../locale/categories.def" -#undef DEFINE_CATEGORY - }; - -static int -is_prime (unsigned long candidate) -{ - /* No even number and none less than 10 will be passed here. */ - unsigned long int divn = 3; - unsigned long int sq = divn * divn; - - while (sq < candidate && candidate % divn != 0) - { - ++divn; - sq += 4 * divn; - ++divn; - } - - return candidate % divn != 0; -} - -unsigned long -next_prime (unsigned long seed) -{ - /* Make it definitely odd. */ - seed |= 1; - - while (!is_prime (seed)) - seed += 2; - - return seed; -} - -void -error (int status, int errnum, const char *message, ...) -{ - va_list args; - - va_start (args, message); - fflush (stdout); - fprintf (stderr, "%s: ", program_invocation_name); - vfprintf (stderr, message, args); - va_end (args); - if (errnum) - fprintf (stderr, ": %s", strerror (errnum)); - putc ('\n', stderr); - fflush (stderr); - if (status) - exit (errnum == EROFS ? 0 : status); -} - -void * -xmalloc (size_t size) -{ - void *p = malloc (size); - if (p == NULL) - error (EXIT_FAILURE, errno, "could not allocate %zd bytes of memory", size); - return p; -} - -static void -open_tmpl_archive (struct locarhandle *ah) -{ - struct stat64 st; - int fd; - struct locarhead head; - const char *archivefname = ah->fname == NULL ? tmpl_file : ah->fname; - - /* Open the archive. We must have exclusive write access. */ - fd = open64 (archivefname, O_RDONLY); - if (fd == -1) - error (EXIT_FAILURE, errno, "cannot open locale archive template file \"%s\"", - archivefname); - - if (fstat64 (fd, &st) < 0) - error (EXIT_FAILURE, errno, "cannot stat locale archive template file \"%s\"", - archivefname); - - /* Read the header. */ - if (TEMP_FAILURE_RETRY (read (fd, &head, sizeof (head))) != sizeof (head)) - error (EXIT_FAILURE, errno, "cannot read archive header"); - - ah->fd = fd; - ah->mmaped = (head.sumhash_offset - + head.sumhash_size * sizeof (struct sumhashent)); - if (ah->mmaped > (unsigned long) st.st_size) - error (EXIT_FAILURE, 0, "locale archive template file truncated"); - ah->mmaped = st.st_size; - ah->reserved = st.st_size; - - /* Now we know how large the administrative information part is. - Map all of it. */ - ah->addr = mmap64 (NULL, ah->mmaped, PROT_READ, MAP_SHARED, fd, 0); - if (ah->addr == MAP_FAILED) - error (EXIT_FAILURE, errno, "cannot map archive header"); -} - -/* Open the locale archive. */ -extern void open_archive (struct locarhandle *ah, bool readonly); - -/* Close the locale archive. */ -extern void close_archive (struct locarhandle *ah); - -/* Add given locale data to the archive. */ -extern int add_locale_to_archive (struct locarhandle *ah, const char *name, - locale_data_t data, bool replace); - -extern void add_alias (struct locarhandle *ah, const char *alias, - bool replace, const char *oldname, - uint32_t *locrec_offset_p); - -extern struct namehashent * -insert_name (struct locarhandle *ah, - const char *name, size_t name_len, bool replace); - -struct nameent -{ - char *name; - struct locrecent *locrec; -}; - -struct dataent -{ - const unsigned char *sum; - uint32_t file_offset; -}; - -static int -nameentcmp (const void *a, const void *b) -{ - struct locrecent *la = ((const struct nameent *) a)->locrec; - struct locrecent *lb = ((const struct nameent *) b)->locrec; - uint32_t start_a = -1, end_a = 0; - uint32_t start_b = -1, end_b = 0; - int cnt; - - for (cnt = 0; cnt < __LC_LAST; ++cnt) - if (cnt != LC_ALL) - { - if (la->record[cnt].offset < start_a) - start_a = la->record[cnt].offset; - if (la->record[cnt].offset + la->record[cnt].len > end_a) - end_a = la->record[cnt].offset + la->record[cnt].len; - } - assert (start_a != (uint32_t)-1); - assert (end_a != 0); - - for (cnt = 0; cnt < __LC_LAST; ++cnt) - if (cnt != LC_ALL) - { - if (lb->record[cnt].offset < start_b) - start_b = lb->record[cnt].offset; - if (lb->record[cnt].offset + lb->record[cnt].len > end_b) - end_b = lb->record[cnt].offset + lb->record[cnt].len; - } - assert (start_b != (uint32_t)-1); - assert (end_b != 0); - - if (start_a != start_b) - return (int)start_a - (int)start_b; - return (int)end_a - (int)end_b; -} - -static int -dataentcmp (const void *a, const void *b) -{ - if (((const struct dataent *) a)->file_offset - < ((const struct dataent *) b)->file_offset) - return -1; - - if (((const struct dataent *) a)->file_offset - > ((const struct dataent *) b)->file_offset) - return 1; - - return 0; -} - -static int -sumsearchfn (const void *key, const void *ent) -{ - uint32_t keyn = *(uint32_t *)key; - uint32_t entn = ((struct dataent *)ent)->file_offset; - - if (keyn < entn) - return -1; - if (keyn > entn) - return 1; - return 0; -} - -static void -compute_data (struct locarhandle *ah, struct nameent *name, size_t sumused, - struct dataent *files, locale_data_t data) -{ - int cnt; - struct locrecent *locrec = name->locrec; - struct dataent *file; - data[LC_ALL].addr = ((char *) ah->addr) + locrec->record[LC_ALL].offset; - data[LC_ALL].size = locrec->record[LC_ALL].len; - for (cnt = 0; cnt < __LC_LAST; ++cnt) - if (cnt != LC_ALL) - { - data[cnt].addr = ((char *) ah->addr) + locrec->record[cnt].offset; - data[cnt].size = locrec->record[cnt].len; - if (data[cnt].addr >= data[LC_ALL].addr - && data[cnt].addr + data[cnt].size - <= data[LC_ALL].addr + data[LC_ALL].size) - __md5_buffer (data[cnt].addr, data[cnt].size, data[cnt].sum); - else - { - file = bsearch (&locrec->record[cnt].offset, files, sumused, - sizeof (*files), sumsearchfn); - if (file == NULL) - error (EXIT_FAILURE, 0, "inconsistent template file"); - memcpy (data[cnt].sum, file->sum, sizeof (data[cnt].sum)); - } - } -} - -static int -fill_archive (struct locarhandle *tmpl_ah, - const char *fname, - size_t install_langs_count, char *install_langs_list[], - size_t nlist, char *list[], - const char *primary) -{ - struct locarhandle ah; - struct locarhead *head; - int result = 0; - struct nameent *names; - struct namehashent *namehashtab; - size_t cnt, used; - struct dataent *files; - struct sumhashent *sumhashtab; - size_t sumused; - struct locrecent *primary_locrec = NULL; - struct nameent *primary_nameent = NULL; - - head = tmpl_ah->addr; - names = (struct nameent *) malloc (head->namehash_used - * sizeof (struct nameent)); - files = (struct dataent *) malloc (head->sumhash_used - * sizeof (struct dataent)); - if (names == NULL || files == NULL) - error (EXIT_FAILURE, errno, "could not allocate tables"); - - namehashtab = (struct namehashent *) ((char *) tmpl_ah->addr - + head->namehash_offset); - sumhashtab = (struct sumhashent *) ((char *) tmpl_ah->addr - + head->sumhash_offset); - - for (cnt = used = 0; cnt < head->namehash_size; ++cnt) - if (namehashtab[cnt].locrec_offset != 0) - { - char * name; - int i; - assert (used < head->namehash_used); - name = tmpl_ah->addr + namehashtab[cnt].name_offset; - if (install_langs_count == 0) - { - /* Always intstall the entry. */ - names[used].name = name; - names[used++].locrec - = (struct locrecent *) ((char *) tmpl_ah->addr + - namehashtab[cnt].locrec_offset); - } - else - { - /* Only install the entry if the user asked for it via - --install-langs. */ - for (i = 0; i < install_langs_count; i++) - { - /* Add one for "_" and one for the null terminator. */ - size_t len = strlen (install_langs_list[i]) + 2; - char *install_lang = (char *)xmalloc (len); - strcpy (install_lang, install_langs_list[i]); - if (strchr (install_lang, '_') == NULL) - strcat (install_lang, "_"); - if (strncmp (name, install_lang, strlen (install_lang)) == 0) - { - names[used].name = name; - names[used++].locrec - = (struct locrecent *) ((char *)tmpl_ah->addr - + namehashtab[cnt].locrec_offset); - } - free (install_lang); - } - } - } - - /* Sort the names. */ - qsort (names, used, sizeof (struct nameent), nameentcmp); - - for (cnt = sumused = 0; cnt < head->sumhash_size; ++cnt) - if (sumhashtab[cnt].file_offset != 0) - { - assert (sumused < head->sumhash_used); - files[sumused].sum = (const unsigned char *) sumhashtab[cnt].sum; - files[sumused++].file_offset = sumhashtab[cnt].file_offset; - } - - /* Sort by file locations. */ - qsort (files, sumused, sizeof (struct dataent), dataentcmp); - - /* Open the archive. This call never returns if we cannot - successfully open the archive. */ - ah.fname = NULL; - if (fname != NULL) - ah.fname = fname; - open_archive (&ah, false); - - if (primary != NULL) - { - for (cnt = 0; cnt < used; ++cnt) - if (strcmp (names[cnt].name, primary) == 0) - break; - if (cnt < used) - { - locale_data_t data; - - compute_data (tmpl_ah, &names[cnt], sumused, files, data); - result |= add_locale_to_archive (&ah, primary, data, 0); - primary_locrec = names[cnt].locrec; - primary_nameent = &names[cnt]; - } - } - - for (cnt = 0; cnt < used; ++cnt) - if (&names[cnt] == primary_nameent) - continue; - else if ((cnt > 0 && names[cnt - 1].locrec == names[cnt].locrec) - || names[cnt].locrec == primary_locrec) - { - const char *oldname; - struct namehashent *namehashent; - uint32_t locrec_offset; - - if (names[cnt].locrec == primary_locrec) - oldname = primary; - else - oldname = names[cnt - 1].name; - namehashent = insert_name (&ah, oldname, strlen (oldname), true); - assert (namehashent->name_offset != 0); - assert (namehashent->locrec_offset != 0); - locrec_offset = namehashent->locrec_offset; - add_alias (&ah, names[cnt].name, 0, oldname, &locrec_offset); - } - else - { - locale_data_t data; - - compute_data (tmpl_ah, &names[cnt], sumused, files, data); - result |= add_locale_to_archive (&ah, names[cnt].name, data, 0); - } - - while (nlist-- > 0) - { - const char *fname = *list++; - size_t fnamelen = strlen (fname); - struct stat64 st; - DIR *dirp; - struct dirent64 *d; - int seen; - locale_data_t data; - int cnt; - - /* First see whether this really is a directory and whether it - contains all the require locale category files. */ - if (stat64 (fname, &st) < 0) - { - error (0, 0, "stat of \"%s\" failed: %s: ignored", fname, - strerror (errno)); - continue; - } - if (!S_ISDIR (st.st_mode)) - { - error (0, 0, "\"%s\" is no directory; ignored", fname); - continue; - } - - dirp = opendir (fname); - if (dirp == NULL) - { - error (0, 0, "cannot open directory \"%s\": %s: ignored", - fname, strerror (errno)); - continue; - } - - seen = 0; - while ((d = readdir64 (dirp)) != NULL) - { - for (cnt = 0; cnt < __LC_LAST; ++cnt) - if (cnt != LC_ALL) - if (strcmp (d->d_name, locnames[cnt]) == 0) - { - unsigned char d_type; - - /* We have an object of the required name. If it's - a directory we have to look at a file with the - prefix "SYS_". Otherwise we have found what we - are looking for. */ -#ifdef _DIRENT_HAVE_D_TYPE - d_type = d->d_type; - - if (d_type != DT_REG) -#endif - { - char fullname[fnamelen + 2 * strlen (d->d_name) + 7]; - -#ifdef _DIRENT_HAVE_D_TYPE - if (d_type == DT_UNKNOWN) -#endif - { - strcpy (stpcpy (stpcpy (fullname, fname), "/"), - d->d_name); - - if (stat64 (fullname, &st) == -1) - /* We cannot stat the file, ignore it. */ - break; - - d_type = IFTODT (st.st_mode); - } - - if (d_type == DT_DIR) - { - /* We have to do more tests. The file is a - directory and it therefore must contain a - regular file with the same name except a - "SYS_" prefix. */ - char *t = stpcpy (stpcpy (fullname, fname), "/"); - strcpy (stpcpy (stpcpy (t, d->d_name), "/SYS_"), - d->d_name); - - if (stat64 (fullname, &st) == -1) - /* There is no SYS_* file or we cannot - access it. */ - break; - - d_type = IFTODT (st.st_mode); - } - } - - /* If we found a regular file (eventually after - following a symlink) we are successful. */ - if (d_type == DT_REG) - ++seen; - break; - } - } - - closedir (dirp); - - if (seen != __LC_LAST - 1) - { - /* We don't have all locale category files. Ignore the name. */ - error (0, 0, "incomplete set of locale files in \"%s\"", - fname); - continue; - } - - /* Add the files to the archive. To do this we first compute - sizes and the MD5 sums of all the files. */ - for (cnt = 0; cnt < __LC_LAST; ++cnt) - if (cnt != LC_ALL) - { - char fullname[fnamelen + 2 * strlen (locnames[cnt]) + 7]; - int fd; - - strcpy (stpcpy (stpcpy (fullname, fname), "/"), locnames[cnt]); - fd = open64 (fullname, O_RDONLY); - if (fd == -1 || fstat64 (fd, &st) == -1) - { - /* Cannot read the file. */ - if (fd != -1) - close (fd); - break; - } - - if (S_ISDIR (st.st_mode)) - { - char *t; - close (fd); - t = stpcpy (stpcpy (fullname, fname), "/"); - strcpy (stpcpy (stpcpy (t, locnames[cnt]), "/SYS_"), - locnames[cnt]); - - fd = open64 (fullname, O_RDONLY); - if (fd == -1 || fstat64 (fd, &st) == -1 - || !S_ISREG (st.st_mode)) - { - if (fd != -1) - close (fd); - break; - } - } - - /* Map the file. */ - data[cnt].addr = mmap64 (NULL, st.st_size, PROT_READ, MAP_SHARED, - fd, 0); - if (data[cnt].addr == MAP_FAILED) - { - /* Cannot map it. */ - close (fd); - break; - } - - data[cnt].size = st.st_size; - __md5_buffer (data[cnt].addr, st.st_size, data[cnt].sum); - - /* We don't need the file descriptor anymore. */ - close (fd); - } - - if (cnt != __LC_LAST) - { - while (cnt-- > 0) - if (cnt != LC_ALL) - munmap (data[cnt].addr, data[cnt].size); - - error (0, 0, "cannot read all files in \"%s\": ignored", fname); - - continue; - } - - result |= add_locale_to_archive (&ah, basename (fname), data, 0); - - for (cnt = 0; cnt < __LC_LAST; ++cnt) - if (cnt != LC_ALL) - munmap (data[cnt].addr, data[cnt].size); - } - - /* We are done. */ - close_archive (&ah); - - return result; -} - -void usage() -{ - printf ("\ -Usage: build-locale-archive [OPTION]... [TEMPLATE-FILE] [ARCHIVE-FILE]\n\ - Builds a locale archive from a template file.\n\ - Options:\n\ - -h, --help Print this usage message.\n\ - -v, --verbose Verbose execution.\n\ - -l, --install-langs=LIST Only include locales given in LIST into the \n\ - locale archive. LIST is a colon separated list\n\ - of locale prefixes, for example \"de:en:ja\".\n\ - The special argument \"all\" means to install\n\ - all languages and it must be present by itself.\n\ - If \"all\" is present with any other language it\n\ - will be treated as the name of a locale.\n\ - If the --install-langs option is missing, all\n\ - locales are installed. The colon separated list\n\ - can contain any strings matching the beginning of\n\ - locale names.\n\ - If a string does not contain a \"_\", it is added.\n\ - Examples:\n\ - --install-langs=\"en\"\n\ - installs en_US, en_US.iso88591,\n\ - en_US.iso885915, en_US.utf8,\n\ - en_GB ...\n\ - --install-langs=\"en_US.utf8\"\n\ - installs only en_US.utf8.\n\ - --install-langs=\"ko\"\n\ - installs ko_KR, ko_KR.euckr,\n\ - ko_KR.utf8 but *not* kok_IN\n\ - because \"ko\" does not contain\n\ - \"_\" and it is silently added\n\ - --install-langs\"ko:kok\"\n\ - installs ko_KR, ko_KR.euckr,\n\ - ko_KR.utf8, kok_IN, and\n\ - kok_IN.utf8.\n\ - --install-langs=\"POSIX\" will\n\ - installs *no* locales at all\n\ - because POSIX matches none of\n\ - the locales. Actually, any string\n\ - matching nothing will do that.\n\ - POSIX and C will always be\n\ - available because they are\n\ - builtin.\n\ - Aliases are installed as well,\n\ - i.e. --install-langs=\"de\"\n\ - will install not only every locale starting with\n\ - \"de\" but also the aliases \"deutsch\"\n\ - and and \"german\" although the latter does not\n\ - start with \"de\".\n\ -\n\ - If the arguments TEMPLATE-FILE and ARCHIVE-FILE are not given the locations\n\ - where the glibc used expects these files are used by default.\n\ -"); -} - -int main (int argc, char *argv[]) -{ - char path[4096]; - DIR *dirp; - struct dirent64 *d; - struct stat64 st; - char *list[16384], *primary; - char *lang; - int install_langs_count = 0; - int i; - char *install_langs_arg, *ila_start; - char **install_langs_list = NULL; - unsigned int cnt = 0; - struct locarhandle tmpl_ah; - char *new_locar_fname = NULL; - size_t loc_path_len = strlen (loc_path); - - while (1) - { - int c; - - static struct option long_options[] = - { - {"help", no_argument, 0, 'h'}, - {"verbose", no_argument, 0, 'v'}, - {"install-langs", required_argument, 0, 'l'}, - {0, 0, 0, 0} - }; - /* getopt_long stores the option index here. */ - int option_index = 0; - - c = getopt_long (argc, argv, "vhl:", - long_options, &option_index); - - /* Detect the end of the options. */ - if (c == -1) - break; - - switch (c) - { - case 0: - printf ("unknown option %s", long_options[option_index].name); - if (optarg) - printf (" with arg %s", optarg); - printf ("\n"); - usage (); - exit (1); - - case 'v': - verbose = 1; - be_quiet = 0; - break; - - case 'h': - usage (); - exit (0); - - case 'l': - install_langs_arg = ila_start = strdup (optarg); - /* If the argument to --install-lang is "all", do - not limit the list of languages to install and install - them all. We do not support installing a single locale - called "all". */ -#define MAGIC_INSTALL_ALL "all" - if (install_langs_arg != NULL - && install_langs_arg[0] != '\0' - && !(strncmp(install_langs_arg, MAGIC_INSTALL_ALL, - strlen(MAGIC_INSTALL_ALL)) == 0 - && strlen (install_langs_arg) == 3)) - { - /* Count the number of languages we will install. */ - while (true) - { - lang = strtok(install_langs_arg, ":;,"); - if (lang == NULL) - break; - install_langs_count++; - install_langs_arg = NULL; - } - free (ila_start); - - /* Reject an entire string made up of delimiters. */ - if (install_langs_count == 0) - break; - - /* Copy the list. */ - install_langs_list = (char **)xmalloc (sizeof(char *) * install_langs_count); - install_langs_arg = ila_start = strdup (optarg); - install_langs_count = 0; - while (true) - { - lang = strtok(install_langs_arg, ":;,"); - if (lang == NULL) - break; - install_langs_list[install_langs_count] = lang; - install_langs_count++; - install_langs_arg = NULL; - } - } - break; - - case '?': - /* getopt_long already printed an error message. */ - usage (); - exit (0); - - default: - abort (); - } - } - tmpl_ah.fname = NULL; - if (optind < argc) - tmpl_ah.fname = argv[optind]; - if (optind + 1 < argc) - new_locar_fname = argv[optind + 1]; - if (verbose) - { - if (tmpl_ah.fname) - printf("input archive file specified on command line: %s\n", - tmpl_ah.fname); - else - printf("using default input archive file.\n"); - if (new_locar_fname) - printf("output archive file specified on command line: %s\n", - new_locar_fname); - else - printf("using default output archive file.\n"); - } - - dirp = opendir (loc_path); - if (dirp == NULL) - error (EXIT_FAILURE, errno, "cannot open directory \"%s\"", loc_path); - - open_tmpl_archive (&tmpl_ah); - - if (new_locar_fname) - unlink (new_locar_fname); - else - unlink (locar_file); - primary = getenv ("LC_ALL"); - if (primary == NULL) - primary = getenv ("LANG"); - if (primary != NULL) - { - if (strncmp (primary, "ja", 2) != 0 - && strncmp (primary, "ko", 2) != 0 - && strncmp (primary, "zh", 2) != 0) - { - char *ptr = malloc (strlen (primary) + strlen (".utf8") + 1), *p, *q; - /* This leads to invalid locales sometimes: - de_DE.iso885915@euro -> de_DE.utf8@euro */ - if (ptr != NULL) - { - p = ptr; - q = primary; - while (*q && *q != '.' && *q != '@') - *p++ = *q++; - if (*q == '.') - while (*q && *q != '@') - q++; - p = stpcpy (p, ".utf8"); - strcpy (p, q); - primary = ptr; - } - else - primary = NULL; - } - } - - memcpy (path, loc_path, loc_path_len); - - while ((d = readdir64 (dirp)) != NULL) - { - if (strcmp (d->d_name, ".") == 0 || strcmp (d->d_name, "..") == 0) - continue; - if (strchr (d->d_name, '_') == NULL) - continue; - - size_t d_name_len = strlen (d->d_name); - if (loc_path_len + d_name_len + 1 > sizeof (path)) - { - error (0, 0, "too long filename \"%s\"", d->d_name); - continue; - } - - memcpy (path + loc_path_len, d->d_name, d_name_len + 1); - if (stat64 (path, &st) < 0) - { - error (0, errno, "cannot stat \"%s\"", path); - continue; - } - if (! S_ISDIR (st.st_mode)) - continue; - if (cnt == 16384) - { - error (0, 0, "too many directories in \"%s\"", loc_path); - break; - } - list[cnt] = strdup (path); - if (list[cnt] == NULL) - { - error (0, errno, "cannot add file to list \"%s\"", path); - continue; - } - if (primary != NULL && cnt > 0 && strcmp (primary, d->d_name) == 0) - { - char *p = list[0]; - list[0] = list[cnt]; - list[cnt] = p; - } - cnt++; - } - closedir (dirp); - /* Store the archive to the file specified as the second argument on the - command line or the default locale archive. */ - fill_archive (&tmpl_ah, new_locar_fname, - install_langs_count, install_langs_list, - cnt, list, primary); - close_archive (&tmpl_ah); - truncate (tmpl_file, 0); - if (install_langs_count > 0) - { - free (ila_start); - free (install_langs_list); - } - char *tz_argv[] = { "/usr/sbin/tzdata-update", NULL }; - execve (tz_argv[0], (char *const *)tz_argv, (char *const *)&tz_argv[1]); - exit (0); -} diff --git a/glibc-fedora-locarchive.patch b/glibc-fedora-locarchive.patch deleted file mode 100644 index 299b0f0..0000000 --- a/glibc-fedora-locarchive.patch +++ /dev/null @@ -1,46 +0,0 @@ -Short description: Allow access to internal locale archive functions. -Author(s): Fedora glibc team -Origin: PATCH -Upstream status: not-needed - -This is a part of commit glibc-2.3.3-1492-ga891c7b, -needed for fedora/build-locale-archive.c only. - -2007-04-16 Jakub Jelinek - - * locale/programs/locarchive.c (add_alias, insert_name): Remove static. - -diff -Nrup a/locale/programs/locarchive.c b/locale/programs/locarchive.c ---- a/locale/programs/locarchive.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/locale/programs/locarchive.c 2012-06-07 12:15:21.585319540 -0600 -@@ -252,9 +252,9 @@ oldlocrecentcmp (const void *a, const vo - /* forward decls for below */ - static uint32_t add_locale (struct locarhandle *ah, const char *name, - locale_data_t data, bool replace); --static void add_alias (struct locarhandle *ah, const char *alias, -- bool replace, const char *oldname, -- uint32_t *locrec_offset_p); -+void add_alias (struct locarhandle *ah, const char *alias, -+ bool replace, const char *oldname, -+ uint32_t *locrec_offset_p); - - - static bool -@@ -635,7 +635,7 @@ close_archive (struct locarhandle *ah) - #include "../../intl/explodename.c" - #include "../../intl/l10nflist.c" - --static struct namehashent * -+struct namehashent * - insert_name (struct locarhandle *ah, - const char *name, size_t name_len, bool replace) - { -@@ -693,7 +693,7 @@ insert_name (struct locarhandle *ah, - return &namehashtab[idx]; - } - --static void -+void - add_alias (struct locarhandle *ah, const char *alias, bool replace, - const char *oldname, uint32_t *locrec_offset_p) - { diff --git a/glibc.spec b/glibc.spec index 775ecef..6995753 100644 --- a/glibc.spec +++ b/glibc.spec @@ -118,7 +118,6 @@ License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ and GPLv2+ with exceptio URL: http://www.gnu.org/software/glibc/ Source0: %{?glibc_release_url}%{glibcsrcdir}.tar.xz -Source1: build-locale-archive.c Source4: nscd.conf Source7: nsswitch.conf Source8: power6emul.c @@ -146,7 +145,6 @@ Patch6: glibc-fedora-localedef.patch Patch7: glibc-fedora-nis-rh188246.patch Patch8: glibc-fedora-manual-dircategory.patch Patch9: glibc-rh827510.patch -Patch10: glibc-fedora-locarchive.patch Patch12: glibc-rh819430.patch Patch13: glibc-fedora-localedata-rh61908.patch Patch14: glibc-fedora-__libc_multiple_libcs.patch @@ -1032,15 +1030,12 @@ rm -f %{glibc_sysroot}%{_infodir}/libc.info* olddir=`pwd` pushd %{glibc_sysroot}%{_prefix}/lib/locale rm -f locale-archive -# Intentionally we do not pass --alias-file=, aliases will be added -# by build-locale-archive. $olddir/build-%{target}/elf/ld.so \ --library-path $olddir/build-%{target}/ \ $olddir/build-%{target}/locale/localedef \ + --alias-file=$olddir/intl/locale.alias \ --prefix %{glibc_sysroot} --add-to-archive \ eo *_* -# Setup the locale-archive template for use by glibc-all-langpacks. -mv locale-archive{,.tmpl} # Create the file lists for the language specific sub-packages: for i in eo *_* do @@ -1125,17 +1120,6 @@ rm -rf %{glibc_sysroot}%{_prefix}/share/zoneinfo touch -r %{SOURCE0} %{glibc_sysroot}/etc/ld.so.conf touch -r sunrpc/etc.rpc %{glibc_sysroot}/etc/rpc -pushd build-%{target} -$GCC -Os -g -static -o build-locale-archive %{SOURCE1} \ - ../build-%{target}/locale/locarchive.o \ - ../build-%{target}/locale/md5.o \ - ../build-%{target}/locale/record-status.o \ - -I. -DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \ - -L../build-%{target} \ - -B../build-%{target}/csu/ -lc -lc_nonshared -install -m 700 build-locale-archive %{glibc_sysroot}%{_prefix}/sbin/build-locale-archive -popd - # Lastly copy some additional documentation for the packages. rm -rf documentation mkdir documentation @@ -1185,7 +1169,6 @@ rm -f %{glibc_sysroot}%{_infodir}/dir %endif %ifnarch %{auxarches} -truncate -s 0 %{glibc_sysroot}/%{_prefix}/lib/locale/locale-archive mkdir -p %{glibc_sysroot}/var/{db,run}/nscd touch %{glibc_sysroot}/var/{db,run}/nscd/{passwd,group,hosts,services} touch %{glibc_sysroot}/var/run/nscd/{socket,nscd.pid} @@ -1363,7 +1346,6 @@ chmod 0444 master.filelist # - All the libnss files (we add back the ones we want later). # - All bench test binaries. # - The aux-cache, since it's handled specially in the files section. -# - The build-locale-archive binary since it's in the common package. cat master.filelist \ | grep -v \ -e '%{_infodir}' \ @@ -1382,7 +1364,6 @@ cat master.filelist \ -e '/libnsl' \ -e 'glibc-benchtests' \ -e 'aux-cache' \ - -e 'build-locale-archive' \ > glibc.filelist # Add specific files: @@ -1469,9 +1450,6 @@ grep '%{_prefix}/share' master.filelist \ -e '%%dir %{prefix}/share' \ >> common.filelist -# Add the binary to build locales to the common subpackage. -echo '%{_prefix}/sbin/build-locale-archive' >> common.filelist - ############################################################################### # nscd ############################################################################### @@ -1760,27 +1738,6 @@ end %post -p %{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu} -%posttrans all-langpacks -e -p --- If at the end of the transaction we are still installed --- (have a template of non-zero size), then we rebuild the --- locale cache (locale-archive) from the pre-populated --- locale cache (locale-archive.tmpl) i.e. template. -if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then - pid = posix.fork() - if pid == 0 then - posix.exec("%{_prefix}/sbin/build-locale-archive", "--install-langs", "%%{_install_langs}") - elseif pid > 0 then - posix.wait(pid) - end -end - -%postun all-langpacks -p --- In the postun we always remove the locale cache. --- We are being uninstalled and if this is an upgrade --- then the new packages template will be used to --- recreate a new copy of the cache. -os.remove("%{_prefix}/lib/locale/locale-archive") - %pre headers # this used to be a link and it is causing nightmares now if [ -L %{_prefix}/include/scsi ] ; then @@ -1837,8 +1794,7 @@ fi %doc documentation/gai.conf %files all-langpacks -%attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive.tmpl -%attr(0644,root,root) %verify(not md5 size mtime mode) %ghost %config(missingok,noreplace) %{_prefix}/lib/locale/locale-archive +%attr(0644,root,root) %{_prefix}/lib/locale/locale-archive %files locale-source %dir %{_prefix}/share/i18n/locales From fcb40838939e1ea02ed122a8d5f48cf2be734845 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 1 Jun 2019 13:41:32 +0200 Subject: [PATCH 29/50] Auto-sync with upstream branch master Upstream commit: 9250e6610fdb0f3a6f238d2813e319a41fb7a810 - powerpc: Fix build failures with current GCC - Remove unused get_clockfreq files - powerpc: generic nearbyint/nearbyintf - tt_RU: Add lang_name (swbz#24370) - tt_RU: Fix orthographic mistakes in mon and abmon sections (swbz#24369) - Add IGMP_MRDISC_ADV from Linux 5.1 to netinet/igmp.h. --- glibc.spec | 15 +++++++++++++-- sources | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 6995753..16cf4c0 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-286-g85188d8211 +%define glibcsrcdir glibc-2.29.9000-292-g9250e6610f %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 21%{?dist} +Release: 22%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1855,6 +1855,17 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Sat Jun 01 2019 Florian Weimer - 2.29.9000-22 +- Remove support for filtering glibc-all-langpacks (#1715891) +- Auto-sync with upstream branch master, + commit 9250e6610fdb0f3a6f238d2813e319a41fb7a810: +- powerpc: Fix build failures with current GCC +- Remove unused get_clockfreq files +- powerpc: generic nearbyint/nearbyintf +- tt_RU: Add lang_name (swbz#24370) +- tt_RU: Fix orthographic mistakes in mon and abmon sections (swbz#24369) +- Add IGMP_MRDISC_ADV from Linux 5.1 to netinet/igmp.h. + * Mon May 27 2019 Arjun Shankar - 2.29.9000-21 - Auto-sync with upstream branch master, commit 85188d8211698d1a255f0aec6529546db5c56de3: diff --git a/sources b/sources index ad27d2f..33682ff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-286-g85188d8211.tar.xz) = df0953bef2d4b45a25573e6c42fcf08845d884ff2af4f11ad4bef60b78aa20852b814311bcdcaf795fa6dbcda015cdb25f39d1f1d50850e8975e39db2ab4c277 +SHA512 (glibc-2.29.9000-292-g9250e6610f.tar.xz) = 9d3bda7bf75aafe5618ad26fc9696df904a67e4287ce7fa4ad5d7937848da2420304f68c262cc07440135aef029f22f8c875720ef9ed830694b3c4d6dd24d335 From 34927af202deb7d97dbb211a3cb13b1c53b496d3 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 16 May 2019 21:43:50 -0400 Subject: [PATCH 30/50] Convert glibc_post_upgrade to lua. --- glibc-post_upgrade.patch | 272 -------------------------------------- glibc.spec | 167 +++++++++++++++++++++--- glibc_post_upgrade.c | 274 --------------------------------------- 3 files changed, 150 insertions(+), 563 deletions(-) delete mode 100644 glibc-post_upgrade.patch delete mode 100644 glibc_post_upgrade.c diff --git a/glibc-post_upgrade.patch b/glibc-post_upgrade.patch deleted file mode 100644 index a64adfc..0000000 --- a/glibc-post_upgrade.patch +++ /dev/null @@ -1,272 +0,0 @@ -Short description: RPM Post-upgrade cleanup program. -Author(s): Fedora glibc team -Origin: PATCH -Upstream status: not-needed - -A helper program is needed to clean up the system configuration -early during RPM package installation, so that other scriptlets -can run successfully. - -diff --git a/elf/Makefile b/elf/Makefile -index 2a432d8beebcd207..368dcae477fff2ae 100644 ---- a/elf/Makefile -+++ b/elf/Makefile -@@ -117,6 +117,14 @@ others-extras = $(ldconfig-modules) - endif - endif - -+# This needs to be statically linked because it is executed at a time -+# when there might be incompatible shared objects on disk, and the -+# purpose of this program is to remove them (among other things). -+others-static += glibc_post_upgrade -+others += glibc_post_upgrade -+glibc_post_upgrade-modules := static-stubs -+CFLAGS-glibc_post_upgrade.c += -DGCONV_MODULES_DIR='"$(gconvdir)"' -+ - # To find xmalloc.c and xstrdup.c - vpath %.c ../locale/programs - -@@ -559,6 +567,8 @@ $(objpfx)sln: $(sln-modules:%=$(objpfx)%.o) - - $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o) - -+$(objpfx)glibc_post_upgrade: $(glibc_post_upgrade-modules:%=$(objpfx)%.o) -+ - SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"' - CFLAGS-ldconfig.c += $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \ - -D'SLIBDIR="$(slibdir)"' -diff --git a/elf/glibc_post_upgrade.c b/elf/glibc_post_upgrade.c -new file mode 100644 -index 0000000000000000..19b59f70e2308032 ---- /dev/null -+++ b/elf/glibc_post_upgrade.c -@@ -0,0 +1,229 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define LD_SO_CONF "/etc/ld.so.conf" -+#define ICONVCONFIG "/usr/sbin/iconvconfig" -+ -+#define verbose_exec(failcode, path...) \ -+ do \ -+ { \ -+ char *const arr[] = { path, NULL }; \ -+ vexec (failcode, arr); \ -+ } while (0) -+ -+__attribute__((noinline)) static void vexec (int failcode, char *const path[]); -+__attribute__((noinline)) static void says (const char *str); -+__attribute__((noinline)) static void sayn (long num); -+__attribute__((noinline)) static void message (char *const path[]); -+ -+int -+main (void) -+{ -+ char initpath[256]; -+ -+ char buffer[4096]; -+ struct pref { -+ const char *p; -+ int len; -+ } prefix[] = { { "libc-", 5 }, { "libm-", 5 }, -+ { "librt-", 6 }, { "libpthread-", 11 }, -+ { "librtkaio-", 10 }, { "libthread_db-", 13 } }; -+ int i, j, fd; -+ off_t base; -+ ssize_t ret; -+ -+ /* In order to support in-place upgrades, we must immediately remove -+ obsolete platform directories after 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 -+ directories here, they would be preferred by the dynamic linker -+ during the execution of subsequent RPM scriptlets, likely -+ resulting in process startup failures. */ -+ const char *remove_dirs[] = -+ { -+#if defined (__i386__) -+ "/lib/i686", -+ "/lib/i686/nosegneg", -+#elif defined (__powerpc64__) && _CALL_ELF != 2 -+ "/lib64/power6", -+#endif -+ }; -+ for (j = 0; j < sizeof (remove_dirs) / sizeof (remove_dirs[0]); ++j) -+ { -+ size_t rmlen = strlen (remove_dirs[j]); -+ fd = open (remove_dirs[j], O_RDONLY); -+ if (fd >= 0 -+ && (ret = getdirentries (fd, buffer, sizeof (buffer), &base)) -+ >= (ssize_t) offsetof (struct dirent, d_name)) -+ { -+ for (base = 0; base + offsetof (struct dirent, d_name) < ret; ) -+ { -+ struct dirent *d = (struct dirent *) (buffer + base); -+ -+ for (i = 0; i < sizeof (prefix) / sizeof (prefix[0]); i++) -+ if (! strncmp (d->d_name, prefix[i].p, prefix[i].len)) -+ { -+ char *p = d->d_name + prefix[i].len; -+ -+ while (*p == '.' || (*p >= '0' && *p <= '9')) p++; -+ if (p[0] == 's' && p[1] == 'o' && p[2] == '\0' -+ && p + 3 - d->d_name -+ < sizeof (initpath) - rmlen - 1) -+ { -+ memcpy (initpath, remove_dirs[j], rmlen); -+ initpath[rmlen] = '/'; -+ strcpy (initpath + rmlen + 1, d->d_name); -+ unlink (initpath); -+ break; -+ } -+ } -+ base += d->d_reclen; -+ } -+ close (fd); -+ } -+ } -+ -+ int ldsocfd = open (LD_SO_CONF, O_RDONLY); -+ struct stat ldsocst; -+ if (ldsocfd >= 0 && fstat (ldsocfd, &ldsocst) >= 0) -+ { -+ char p[ldsocst.st_size + 1]; -+ if (read (ldsocfd, p, ldsocst.st_size) == ldsocst.st_size) -+ { -+ p[ldsocst.st_size] = '\0'; -+ if (strstr (p, "include ld.so.conf.d/*.conf") == NULL) -+ { -+ close (ldsocfd); -+ ldsocfd = open (LD_SO_CONF, O_WRONLY | O_TRUNC); -+ if (ldsocfd >= 0) -+ { -+ size_t slen = strlen ("include ld.so.conf.d/*.conf\n"); -+ if (write (ldsocfd, "include ld.so.conf.d/*.conf\n", slen) -+ != slen -+ || write (ldsocfd, p, ldsocst.st_size) != ldsocst.st_size) -+ _exit (109); -+ } -+ } -+ } -+ if (ldsocfd >= 0) -+ close (ldsocfd); -+ } -+ -+ /* If installing bi-arch glibc, rpm sometimes doesn't unpack all files -+ before running one of the lib's %post scriptlet. /sbin/ldconfig will -+ then be run by the other arch's %post. */ -+ if (! access ("/sbin/ldconfig", X_OK)) -+ verbose_exec (110, -+ (char *) "/sbin/ldconfig", -+ (char *) "/sbin/ldconfig"); -+ -+ if (! utimes (GCONV_MODULES_DIR "/gconv-modules.cache", NULL)) -+ { -+ const char *iconv_cache = GCONV_MODULES_DIR "/gconv-modules.cache"; -+ const char *iconv_dir = GCONV_MODULES_DIR; -+ verbose_exec (113, -+ (char *) ICONVCONFIG, -+ (char *) "/usr/sbin/iconvconfig", -+ (char *) "-o", -+ (char *) iconv_cache, -+ (char *) "--nostdlib", -+ (char *) iconv_dir); -+ } -+ -+ _exit(0); -+} -+ -+void -+vexec (int failcode, char *const path[]) -+{ -+ pid_t pid; -+ int status, save_errno; -+ int devnull = 0; -+ -+ if (failcode < 0) -+ { -+ devnull = 1; -+ failcode = -failcode; -+ } -+ pid = vfork (); -+ if (pid == 0) -+ { -+ int fd; -+ if (devnull && (fd = open ("/dev/null", O_WRONLY)) >= 0) -+ { -+ dup2 (fd, 1); -+ dup2 (fd, 2); -+ close (fd); -+ } -+ execv (path[0], path + 1); -+ save_errno = errno; -+ message (path); -+ says (" exec failed with errno "); -+ sayn (save_errno); -+ says ("\n"); -+ _exit (failcode); -+ } -+ else if (pid < 0) -+ { -+ save_errno = errno; -+ message (path); -+ says (" fork failed with errno "); -+ sayn (save_errno); -+ says ("\n"); -+ _exit (failcode + 1); -+ } -+ if (waitpid (0, &status, 0) != pid || !WIFEXITED (status)) -+ { -+ message (path); -+ says (" child terminated abnormally\n"); -+ _exit (failcode + 2); -+ } -+ if (WEXITSTATUS (status)) -+ { -+ message (path); -+ says (" child exited with exit code "); -+ sayn (WEXITSTATUS (status)); -+ says ("\n"); -+ _exit (WEXITSTATUS (status)); -+ } -+} -+ -+static void -+says (const char *str) -+{ -+ write (1, str, strlen (str)); -+} -+ -+static void -+sayn (long num) -+{ -+ char string[sizeof (long) * 3 + 1]; -+ char *p = string + sizeof (string) - 1; -+ -+ *p = '\0'; -+ if (num == 0) -+ *--p = '0'; -+ else -+ while (num) -+ { -+ *--p = '0' + num % 10; -+ num = num / 10; -+ } -+ -+ says (p); -+} -+ -+static void -+message (char *const path[]) -+{ -+ says ("/usr/sbin/glibc_post_upgrade: While trying to execute "); -+ says (path[0]); -+} diff --git a/glibc.spec b/glibc.spec index 16cf4c0..2dde267 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 22%{?dist} +Release: 23%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -136,7 +136,6 @@ Source12: ChangeLog.old # - See each individual patch file for origin and upstream status. # - For new patches follow template.patch format. ############################################################################## -Patch1: glibc-post_upgrade.patch Patch2: glibc-fedora-nscd.patch Patch3: glibc-rh697421.patch Patch4: glibc-fedora-linux-tcsetattr.patch @@ -399,8 +398,11 @@ libraries, as well as national language (locale) support. /sbin/ldconfig %end -# We need to run ldconfig manually because ldconfig cannot handle the -# relative include path in the /etc/ld.so.conf file we gneerate. +# We need to run ldconfig manually because __brp_ldconfig assumes that +# glibc itself is always installed in $RPM_BUILD_ROOT, but with sysroots +# we may be installed into a subdirectory of that path. Therefore we +# unset __brp_ldconfig and run ldconfig by hand with the sysroots path +# passed to -r. %undefine __brp_ldconfig ###################################################################### @@ -1089,10 +1091,6 @@ truncate -s 0 %{glibc_sysroot}/etc/gai.conf truncate -s 0 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache chmod 644 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache -# Install the upgrade program -install -m 700 build-%{target}/elf/glibc_post_upgrade \ - %{glibc_sysroot}%{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu} - ############################################################################## # Install debug copies of unstripped static libraries # - This step must be last in order to capture any additional static @@ -1115,8 +1113,8 @@ rm -rf %{glibc_sysroot}%{_prefix}/share/zoneinfo # # XXX: Ideally ld.so.conf should have the timestamp of the spec file, but there # doesn't seem to be any macro to give us that. So we do the next best thing, -# which is to at least keep the timestamp consistent. The choice of using -# glibc_post_upgrade.c is arbitrary. +# which is to at least keep the timestamp consistent. The choice of using +# SOURCE0 is arbitrary. touch -r %{SOURCE0} %{glibc_sysroot}/etc/ld.so.conf touch -r sunrpc/etc.rpc %{glibc_sysroot}/etc/rpc @@ -1341,8 +1339,9 @@ chmod 0444 master.filelist # - The partial (lib*_p.a) static libraries, include files. # - The static files, objects, unversioned DSOs, and nscd. # - The bin, locale, some sbin, and share. -# - The use of [^gi] is meant to exclude all files except glibc_post_upgrade, -# and iconvconfig, which we want in the main packages. +# - 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. # - All the libnss files (we add back the ones we want later). # - All bench test binaries. # - The aux-cache, since it's handled specially in the files section. @@ -1357,7 +1356,7 @@ cat master.filelist \ -e 'nscd' \ -e '%{_prefix}/bin' \ -e '%{_prefix}/lib/locale' \ - -e '%{_prefix}/sbin/[^gi]' \ + -e '%{_prefix}/sbin/[^i]' \ -e '%{_prefix}/share' \ -e '/var/db/Makefile' \ -e '/libnss_.*\.so[0-9.]*$' \ @@ -1433,10 +1432,13 @@ grep '%{_libdir}/lib.*\.a' < master.filelist \ ############################################################################### # All of the bin and certain sbin files go into the common package except -# glibc_post_upgrade.* and iconvconfig which need to go in glibc. Likewise -# nscd is excluded because it goes in nscd. +# iconvconfig which needs to go in glibc. Likewise nscd is excluded because +# it goes in nscd. 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. grep '%{_prefix}/bin' master.filelist >> common.filelist -grep '%{_prefix}/sbin/[^gi]' master.filelist \ +grep '%{_prefix}/sbin' master.filelist \ + | grep -v '%{_prefix}/sbin/iconvconfig' \ | grep -v 'nscd' >> common.filelist # All of the files under share go into the common package since they should be # multilib-independent. @@ -1736,7 +1738,135 @@ if rpm.vercmp(rel, required) < 0 then error("FATAL: kernel too old", 0) end -%post -p %{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu} +%post -p +-- We use lua's posix.exec because there may be no shell that we can +-- run during glibc upgrade. +function post_exec (program, ...) + local pid = posix.fork () + if pid == 0 then + assert (posix.exec (program, ...)) + elseif pid > 0 then + posix.wait (pid) + end +end + +-- (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 +-- version. RPM only deletes files removed by updates near the end +-- of the transaction. If we did not remove the obsolete platform +-- directories here, they may be preferred by the dynamic linker +-- during the execution of subsequent RPM scriptlets, likely +-- resulting in process startup failures. + +-- Full set of libraries glibc may install. +install_libs = { "anl", "BrokenLocale", "c", "dl", "m", "mvec", + "nss_compat", "nss_db", "nss_dns", "nss_files", + "nss_hesiod", "pthread", "resolv", "rt", "SegFault", + "thread_db", "util" } + +-- We are going to remove these libraries. Generally speaking we remove +-- all core libraries in the multilib directory. +-- We employ a tight match where X.Y is in [2.0,9.9*], so we would +-- match "libc-2.0.so" and so on up to "libc-9.9*". +remove_regexps = {} +for i = 1, #install_libs do + remove_regexps[i] = ("lib" .. install_libs[i] + .. "%%-[2-9]%%.[0-9]+%%.so$") +end + +-- Two exceptions: +remove_regexps[#install_libs + 1] = "libthread_db%%-1%%.0%%.so" +remove_regexps[#install_libs + 2] = "libSegFault%%.so" + +-- We are going to search these directories. +local remove_dirs = { "%{_libdir}/i686", + "%{_libdir}/i686/nosegneg", + "%{_libdir}/power6", + "%{_libdir}/power7", + "%{_libdir}/power8" } + +-- Walk all the directories with files we need to remove... +for _, rdir in ipairs (remove_dirs) do + if posix.access (rdir) then + -- If the directory exists we look at all the files... + local remove_files = posix.files (rdir) + for rfile in remove_files do + for _, rregexp in ipairs (remove_regexps) do + -- Does it match the regexp? + local dso = string.match (rfile, rregexp) + if (dso ~= nil) then + -- Removing file... + os.remove (rdir .. '/' .. rfile) + end + end + end + end +end + +-- (2) 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". + +local ldsoconf = "/etc/ld.so.conf" +local ldsoconf_tmp = "/etc/glibc_post_upgrade.ld.so.conf" + +if posix.access (ldsoconf) then + + -- We must have a "include ld.so.conf.d/*.conf" line. + local have_include = false + for line in io.lines (ldsoconf) do + -- This must match, and we don't ignore whitespace. + if string.match (line, "^include ld.so.conf.d/%%*%%.conf$") ~= nil then + have_include = true + end + end + + if not have_include then + -- Insert "include ld.so.conf.d/*.conf" line at the start of the + -- file. We only support one of these post upgrades running at + -- a time (temporary file name is fixed). + local tmp_fd = io.open (ldsoconf_tmp, "w") + if tmp_fd ~= nil then + tmp_fd:write ("include ld.so.conf.d/*.conf\n") + for line in io.lines (ldsoconf) do + tmp_fd:write (line .. "\n") + end + tmp_fd:close () + local res = os.rename (ldsoconf_tmp, ldsoconf) + if res == nil then + io.stdout:write ("Error: Unable to update configuration file (rename).\n") + end + else + io.stdout:write ("Error: Unable to update configuration file (open).\n") + end + end +end + +-- (3) 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. + +-- Note: We use _prefix because Fedora's UsrMove says so. +post_exec ("%{_prefix}/sbin/ldconfig") + +-- (4) 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 +-- "gconv-modules.cache". + +local iconv_dir = "%{_libdir}/gconv" +local iconv_cache = iconv_dir .. "/gconv-modules.cache" +if (posix.utime (iconv_cache) == 0) then + post_exec ("%{_prefix}/sbin/iconvconfig", + "-o", iconv_cache, + "--nostdlib", + iconv_dir) +else + io.stdout:write ("Error: Missing " .. iconv_cache .. " file.\n") +end %pre headers # this used to be a link and it is causing nightmares now @@ -1855,6 +1985,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Sat Jun 01 2019 Carlos O'Donell - 2.29.9000-23 +- Convert glibc_post_upgrade to lua. + * Sat Jun 01 2019 Florian Weimer - 2.29.9000-22 - Remove support for filtering glibc-all-langpacks (#1715891) - Auto-sync with upstream branch master, diff --git a/glibc_post_upgrade.c b/glibc_post_upgrade.c deleted file mode 100644 index 9014857..0000000 --- a/glibc_post_upgrade.c +++ /dev/null @@ -1,274 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define LD_SO_CONF "/etc/ld.so.conf" -#define ICONVCONFIG "/usr/sbin/iconvconfig" - -#define verbose_exec(failcode, path...) \ - do \ - { \ - char *const arr[] = { path, NULL }; \ - vexec (failcode, arr); \ - } while (0) - -__attribute__((noinline)) void vexec (int failcode, char *const path[]); -__attribute__((noinline)) void says (const char *str); -__attribute__((noinline)) void sayn (long num); -__attribute__((noinline)) void message (char *const path[]); -__attribute__((noinline)) int check_elf (const char *name); - -int -main (void) -{ - struct stat statbuf; - char initpath[256]; - - char buffer[4096]; - struct pref { - char *p; - int len; - } prefix[] = { { "libc-", 5 }, { "libm-", 5 }, - { "librt-", 6 }, { "libpthread-", 11 }, - { "librtkaio-", 10 }, { "libthread_db-", 13 } }; - int i, j, fd; - off_t base; - ssize_t ret; - - /* In order to support in-place upgrades, we must immediately remove - obsolete platform directories after 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 - directories here, they would be preferred by the dynamic linker - during the execution of subsequent RPM scriptlets, likely - resulting in process startup failures. */ - const char *remove_dirs[] = - { -#if defined (__i386__) - "/lib/i686", - "/lib/i686/nosegneg", -#elif defined (__powerpc64__) && _CALL_ELF != 2 - "/lib64/power6", - "/lib64/power7", - "/lib64/power8", -#endif - }; - for (j = 0; j < sizeof (remove_dirs) / sizeof (remove_dirs[0]); ++j) - { - size_t rmlen = strlen (remove_dirs[j]); - fd = open (remove_dirs[j], O_RDONLY); - if (fd >= 0 - && (ret = getdirentries (fd, buffer, sizeof (buffer), &base)) - >= (ssize_t) offsetof (struct dirent, d_name)) - { - for (base = 0; base + offsetof (struct dirent, d_name) < ret; ) - { - struct dirent *d = (struct dirent *) (buffer + base); - - for (i = 0; i < sizeof (prefix) / sizeof (prefix[0]); i++) - if (! strncmp (d->d_name, prefix[i].p, prefix[i].len)) - { - char *p = d->d_name + prefix[i].len; - - while (*p == '.' || (*p >= '0' && *p <= '9')) p++; - if (p[0] == 's' && p[1] == 'o' && p[2] == '\0' - && p + 3 - d->d_name - < sizeof (initpath) - rmlen - 1) - { - memcpy (initpath, remove_dirs[j], rmlen); - initpath[rmlen] = '/'; - strcpy (initpath + rmlen + 1, d->d_name); - unlink (initpath); - break; - } - } - base += d->d_reclen; - } - close (fd); - } - } - - int ldsocfd = open (LD_SO_CONF, O_RDONLY); - struct stat ldsocst; - if (ldsocfd >= 0 && fstat (ldsocfd, &ldsocst) >= 0) - { - char p[ldsocst.st_size + 1]; - if (read (ldsocfd, p, ldsocst.st_size) == ldsocst.st_size) - { - p[ldsocst.st_size] = '\0'; - if (strstr (p, "include ld.so.conf.d/*.conf") == NULL) - { - close (ldsocfd); - ldsocfd = open (LD_SO_CONF, O_WRONLY | O_TRUNC); - if (ldsocfd >= 0) - { - size_t slen = strlen ("include ld.so.conf.d/*.conf\n"); - if (write (ldsocfd, "include ld.so.conf.d/*.conf\n", slen) - != slen - || write (ldsocfd, p, ldsocst.st_size) != ldsocst.st_size) - _exit (109); - } - } - } - if (ldsocfd >= 0) - close (ldsocfd); - } - - /* If installing bi-arch glibc, rpm sometimes doesn't unpack all files - before running one of the lib's %post scriptlet. /sbin/ldconfig will - then be run by the other arch's %post. */ - if (! access ("/sbin/ldconfig", X_OK)) - verbose_exec (110, "/sbin/ldconfig", "/sbin/ldconfig"); - - if (! utimes (GCONV_MODULES_DIR "/gconv-modules.cache", NULL)) - { - char *iconv_cache = GCONV_MODULES_DIR"/gconv-modules.cache"; - char *iconv_dir = GCONV_MODULES_DIR; - verbose_exec (113, ICONVCONFIG, "/usr/sbin/iconvconfig", - "-o", iconv_cache, - "--nostdlib", iconv_dir); - } - - _exit(0); -} - -void -vexec (int failcode, char *const path[]) -{ - pid_t pid; - int status, save_errno; - int devnull = 0; - - if (failcode < 0) - { - devnull = 1; - failcode = -failcode; - } - pid = vfork (); - if (pid == 0) - { - int fd; - if (devnull && (fd = open ("/dev/null", O_WRONLY)) >= 0) - { - dup2 (fd, 1); - dup2 (fd, 2); - close (fd); - } - execv (path[0], path + 1); - save_errno = errno; - message (path); - says (" exec failed with errno "); - sayn (save_errno); - says ("\n"); - _exit (failcode); - } - else if (pid < 0) - { - save_errno = errno; - message (path); - says (" fork failed with errno "); - sayn (save_errno); - says ("\n"); - _exit (failcode + 1); - } - if (waitpid (0, &status, 0) != pid || !WIFEXITED (status)) - { - message (path); - says (" child terminated abnormally\n"); - _exit (failcode + 2); - } - if (WEXITSTATUS (status)) - { - message (path); - says (" child exited with exit code "); - sayn (WEXITSTATUS (status)); - says ("\n"); - _exit (WEXITSTATUS (status)); - } -} - -void -says (const char *str) -{ - write (1, str, strlen (str)); -} - -void -sayn (long num) -{ - char string[sizeof (long) * 3 + 1]; - char *p = string + sizeof (string) - 1; - - *p = '\0'; - if (num == 0) - *--p = '0'; - else - while (num) - { - *--p = '0' + num % 10; - num = num / 10; - } - - says (p); -} - -void -message (char *const path[]) -{ - says ("/usr/sbin/glibc_post_upgrade: While trying to execute "); - says (path[0]); -} - -int -check_elf (const char *name) -{ - /* Play safe, if we can't open or read, assume it might be - ELF for the current arch. */ - int ret = 1; - int fd = open (name, O_RDONLY); - if (fd >= 0) - { - Elf32_Ehdr ehdr; - if (read (fd, &ehdr, offsetof (Elf32_Ehdr, e_version)) - == offsetof (Elf32_Ehdr, e_version)) - { - ret = 0; - if (ehdr.e_ident[EI_CLASS] - == (sizeof (long) == 8 ? ELFCLASS64 : ELFCLASS32)) - { -#if defined __i386__ - ret = ehdr.e_machine == EM_386; -#elif defined __x86_64__ - ret = ehdr.e_machine == EM_X86_64; -#elif defined __powerpc64__ - ret = ehdr.e_machine == EM_PPC64; -#elif defined __powerpc__ - ret = ehdr.e_machine == EM_PPC; -#elif defined __s390__ || defined __s390x__ - ret = ehdr.e_machine == EM_S390; -#elif defined __x86_64__ - ret = ehdr.e_machine == EM_X86_64; -#elif defined __sparc__ - if (sizeof (long) == 8) - ret = ehdr.e_machine == EM_SPARCV9; - else - ret = (ehdr.e_machine == EM_SPARC - || ehdr.e_machine == EM_SPARC32PLUS); -#else - ret = 1; -#endif - } - } - close (fd); - } - return ret; -} From 3aed6a961c489d512e4d2b1f95505c6d0696d3b1 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 3 Jun 2019 16:05:09 -0400 Subject: [PATCH 31/50] Auto-sync with upstream branch master Upstream commit: dc91a19e6f71e1523f4ac179191a29b2131d74bb - Linux: Add oddly-named arm syscalls to syscall-names.list. - arm: Remove ioperm/iopl/inb/inw/inl/outb/outw/outl support. - Add INADDR_ALLSNOOPERS_GROUP from Linux 5.1 to netinet/in.h. --- glibc.spec | 11 +++++++++-- sources | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 2dde267..1b35e9d 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-292-g9250e6610f +%define glibcsrcdir glibc-2.29.9000-296-gdc91a19e6f %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 23%{?dist} +Release: 24%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -1985,6 +1985,13 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon Jun 03 2019 Carlos O'Donell - 2.29.9000-24 +- Auto-sync with upstream branch master, + commit dc91a19e6f71e1523f4ac179191a29b2131d74bb: +- Linux: Add oddly-named arm syscalls to syscall-names.list. +- arm: Remove ioperm/iopl/inb/inw/inl/outb/outw/outl support. +- Add INADDR_ALLSNOOPERS_GROUP from Linux 5.1 to netinet/in.h. + * Sat Jun 01 2019 Carlos O'Donell - 2.29.9000-23 - Convert glibc_post_upgrade to lua. diff --git a/sources b/sources index 33682ff..a07f13e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-292-g9250e6610f.tar.xz) = 9d3bda7bf75aafe5618ad26fc9696df904a67e4287ce7fa4ad5d7937848da2420304f68c262cc07440135aef029f22f8c875720ef9ed830694b3c4d6dd24d335 +SHA512 (glibc-2.29.9000-296-gdc91a19e6f.tar.xz) = 3295b07bc34808c8c3d2b5b3f7c0453c9aacc2a9ab210958e0c9afabd253e001ff69b2adcc85397a82f91470e6a164ee8b4724e9fe6587d4d4d111e543b93bb2 From 819bb4065ce3704ef2a3dba2ef1d9780adeebae9 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 4 Jun 2019 16:02:20 +0200 Subject: [PATCH 32/50] Add glibc version to locale-archive name (#1716710) --- glibc-rh1716710.patch | 183 ++++++++++++++++++++++++++++++++++++++++++ glibc.spec | 17 +++- 2 files changed, 197 insertions(+), 3 deletions(-) create mode 100644 glibc-rh1716710.patch diff --git a/glibc-rh1716710.patch b/glibc-rh1716710.patch new file mode 100644 index 0000000..6a9412f --- /dev/null +++ b/glibc-rh1716710.patch @@ -0,0 +1,183 @@ +Author: Florian Weimer +Date: Tue Jun 4 14:34:42 2019 +0200 + + locale: Make the file name of the locale archive configurable + + This improves support for parallel installation and upgrade scenarios + involving changes to the locale archive format or the data stored in + it. + +diff --git a/INSTALL b/INSTALL +index e137a71169651929..0244b0aa9689336a 100644 +--- a/INSTALL ++++ b/INSTALL +@@ -106,6 +106,14 @@ if 'CFLAGS' is specified it must enable optimization. For example: + particular case and potentially change debugging information and + metadata only). + ++'--with-locale-archive-name=NAME' ++ Use NAME as the file name of the locale archive, and not the ++ default 'locale-archive'. Usually, the locale archive is stored in ++ the directory '/usr/lib/locale' (for both 32-bit and 64-bit ++ targets). For parallel installation of partially compatible ++ versions of the GNU C Library, this option can be used to alter the ++ name of the file used by glibc and by the 'localedef' tool. ++ + '--disable-shared' + Don't build shared libraries even if it is possible. Not all + systems support shared libraries; you need ELF support and +diff --git a/config.h.in b/config.h.in +index 824dfe8d8cb61dd1..7d263447ed153766 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -189,6 +189,9 @@ + /* Define if the linker defines __ehdr_start. */ + #undef HAVE_EHDR_START + ++/* The file name of the locale archive (without the directory). */ ++#undef LOCALE_ARCHIVE_NAME ++ + /* + */ + +diff --git a/config.make.in b/config.make.in +index 2fed3da773020a09..a6421039ebbbd966 100644 +--- a/config.make.in ++++ b/config.make.in +@@ -23,6 +23,7 @@ datarootdir = @datarootdir@ + localstatedir = @libc_cv_localstatedir@ + localedir = @localedir@ + multidir= @libc_cv_multidir@ ++locale-archive-name = @locale_archive_name@ + + # Should we use and build ldconfig? + use-ldconfig = @use_ldconfig@ +diff --git a/configure b/configure +index c773c487b542b3be..0d9645c389d3f111 100755 +--- a/configure ++++ b/configure +@@ -687,6 +687,7 @@ hardcoded_path_in_tests + enable_timezone_tools + extra_nonshared_cflags + use_default_link ++locale_archive_name + sysheaders + ac_ct_CXX + CXXFLAGS +@@ -763,6 +764,7 @@ with_gd_lib + with_binutils + with_selinux + with_headers ++with_locale_archive_name + with_default_link + with_nonshared_cflags + enable_sanity_checks +@@ -1484,6 +1486,9 @@ Optional Packages: + --with-selinux if building with SELinux support + --with-headers=PATH location of system headers to use (for example + /usr/src/linux/include) [default=compiler default] ++ --with-locale-archive-name=NAME ++ file name of the locale archive ++ [default=locale-archive] + --with-default-link do not use explicit linker scripts + --with-nonshared-cflags=CFLAGS + build nonshared libraries with additional CFLAGS +@@ -3335,6 +3340,20 @@ fi + + + ++# Check whether --with-locale-archive-name was given. ++if test "${with_locale_archive_name+set}" = set; then : ++ withval=$with_locale_archive_name; locale_archive_name=$withval ++else ++ locale_archive_name=locale-archive ++fi ++ ++cat >>confdefs.h <<_ACEOF ++#define LOCALE_ARCHIVE_NAME "$locale_archive_name" ++_ACEOF ++ ++ ++ ++ + + # Check whether --with-default-link was given. + if test "${with_default_link+set}" = set; then : +diff --git a/configure.ac b/configure.ac +index 598ba6c4aed08a3b..1b33559103b65e8f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -147,6 +147,15 @@ AC_ARG_WITH([headers], + [sysheaders='']) + AC_SUBST(sysheaders) + ++AC_ARG_WITH([locale-archive-name], ++ AC_HELP_STRING([--with-locale-archive-name=NAME], ++ [file name of the locale archive ++ @<:@default=locale-archive@:>@]), ++ [locale_archive_name=$withval], ++ [locale_archive_name=locale-archive]) ++AC_DEFINE_UNQUOTED(LOCALE_ARCHIVE_NAME, "$locale_archive_name") ++AC_SUBST(locale_archive_name) ++ + AC_SUBST(use_default_link) + AC_ARG_WITH([default-link], + AC_HELP_STRING([--with-default-link], +diff --git a/locale/loadarchive.c b/locale/loadarchive.c +index 803c1cf2a45838a7..834f794abf6a830c 100644 +--- a/locale/loadarchive.c ++++ b/locale/loadarchive.c +@@ -42,7 +42,7 @@ + + + /* Name of the locale archive file. */ +-static const char archfname[] = COMPLOCALEDIR "/locale-archive"; ++static const char archfname[] = COMPLOCALEDIR "/" LOCALE_ARCHIVE_NAME; + + /* Size of initial mapping window, optimal if large enough to + cover the header plus the initial locale. */ +diff --git a/locale/programs/locale.c b/locale/programs/locale.c +index 6eae3175bb3cad9a..be8f07b20f100a10 100644 +--- a/locale/programs/locale.c ++++ b/locale/programs/locale.c +@@ -46,7 +46,7 @@ + #include "../locarchive.h" + #include + +-#define ARCHIVE_NAME COMPLOCALEDIR "/locale-archive" ++#define ARCHIVE_NAME COMPLOCALEDIR "/" LOCALE_ARCHIVE_NAME + + /* If set print the name of the category. */ + static int show_category_name; +diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c +index e6310b18beee8dd2..02f44f682452de3e 100644 +--- a/locale/programs/locarchive.c ++++ b/locale/programs/locarchive.c +@@ -57,7 +57,7 @@ + + extern const char *output_prefix; + +-#define ARCHIVE_NAME COMPLOCALEDIR "/locale-archive" ++#define ARCHIVE_NAME COMPLOCALEDIR "/" LOCALE_ARCHIVE_NAME + + static const char *locnames[] = + { +diff --git a/manual/install.texi b/manual/install.texi +index 29f6b68e25d04e4b..19e1f9ca161032b1 100644 +--- a/manual/install.texi ++++ b/manual/install.texi +@@ -131,6 +131,14 @@ that the objects in @file{libc_nonshared.a} are compiled with this flag + (although this will not affect the generated code in this particular + case and potentially change debugging information and metadata only). + ++@item --with-locale-archive-name=@var{name} ++Use @var{name} as the file name of the locale archive, and not the ++default @file{locale-archive}. Usually, the locale archive is stored ++in the directory @file{/usr/lib/locale} (for both 32-bit and 64-bit ++targets). For parallel installation of partially compatible versions ++of @theglibc{}, this option can be used to alter the name of the file ++used by glibc and by the @command{localedef} tool. ++ + @c disable static doesn't work currently + @c @item --disable-static + @c Don't build static libraries. Static libraries aren't that useful these diff --git a/glibc.spec b/glibc.spec index 1b35e9d..7320848 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 24%{?dist} +Release: 25%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -160,6 +160,8 @@ Patch28: glibc-rh1615608.patch # https://www.sourceware.org/ml/libc-alpha/2019-03/msg00436.html Patch31: glibc-fedora-nscd-warnings.patch +Patch32: glibc-rh1716710.patch + ############################################################################## # Continued list of core "glibc" package information: ############################################################################## @@ -507,6 +509,11 @@ end # and thus satisfies glibc's requirement for installed locales. # Users can add one more other langauge packs and then eventually # uninstall all-langpacks to save space. +# +# Historically, the postun scriptlet of glibc-all-langpacks deleted +# the locale-archive file. Therefore, we tell glibc to use a +# different, release-specific name. +%global locale_archive_name locale-archive.%{version}-%{release} %package all-langpacks Summary: All language packs for %{name}. Requires: %{name} = %{version}-%{release} @@ -828,6 +835,7 @@ build() --prefix=%{_prefix} \ --with-headers=%{_prefix}/include $EnableKernel \ --with-nonshared-cflags="$BuildFlagsNonshared" \ + --with-locale-archive-name="%{locale_archive_name}" \ --enable-bind-now \ --build=%{target} \ --enable-stack-protector=strong \ @@ -1031,7 +1039,7 @@ rm -f %{glibc_sysroot}%{_infodir}/libc.info* %ifnarch %{auxarches} olddir=`pwd` pushd %{glibc_sysroot}%{_prefix}/lib/locale -rm -f locale-archive +rm -f %{locale_archive_name} $olddir/build-%{target}/elf/ld.so \ --library-path $olddir/build-%{target}/ \ $olddir/build-%{target}/locale/localedef \ @@ -1924,7 +1932,7 @@ fi %doc documentation/gai.conf %files all-langpacks -%attr(0644,root,root) %{_prefix}/lib/locale/locale-archive +%attr(0644,root,root) %{_prefix}/lib/locale/%{locale_archive_name} %files locale-source %dir %{_prefix}/share/i18n/locales @@ -1985,6 +1993,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Tue Jun 4 2019 Florian Weimer - 2.29.9000-25 +- Add glibc version to locale-archive name (#1716710) + * Mon Jun 03 2019 Carlos O'Donell - 2.29.9000-24 - Auto-sync with upstream branch master, commit dc91a19e6f71e1523f4ac179191a29b2131d74bb: From bd8d2430b4dbd5919cb0bb54332db377ad0934cd Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 5 Jun 2019 12:20:08 +0200 Subject: [PATCH 33/50] Restore /usr/lib/locale/locale-archive under its original name (#1716710) --- glibc-rh1716710.patch | 183 ------------------------------------------ glibc.spec | 47 ++++++++--- 2 files changed, 36 insertions(+), 194 deletions(-) delete mode 100644 glibc-rh1716710.patch diff --git a/glibc-rh1716710.patch b/glibc-rh1716710.patch deleted file mode 100644 index 6a9412f..0000000 --- a/glibc-rh1716710.patch +++ /dev/null @@ -1,183 +0,0 @@ -Author: Florian Weimer -Date: Tue Jun 4 14:34:42 2019 +0200 - - locale: Make the file name of the locale archive configurable - - This improves support for parallel installation and upgrade scenarios - involving changes to the locale archive format or the data stored in - it. - -diff --git a/INSTALL b/INSTALL -index e137a71169651929..0244b0aa9689336a 100644 ---- a/INSTALL -+++ b/INSTALL -@@ -106,6 +106,14 @@ if 'CFLAGS' is specified it must enable optimization. For example: - particular case and potentially change debugging information and - metadata only). - -+'--with-locale-archive-name=NAME' -+ Use NAME as the file name of the locale archive, and not the -+ default 'locale-archive'. Usually, the locale archive is stored in -+ the directory '/usr/lib/locale' (for both 32-bit and 64-bit -+ targets). For parallel installation of partially compatible -+ versions of the GNU C Library, this option can be used to alter the -+ name of the file used by glibc and by the 'localedef' tool. -+ - '--disable-shared' - Don't build shared libraries even if it is possible. Not all - systems support shared libraries; you need ELF support and -diff --git a/config.h.in b/config.h.in -index 824dfe8d8cb61dd1..7d263447ed153766 100644 ---- a/config.h.in -+++ b/config.h.in -@@ -189,6 +189,9 @@ - /* Define if the linker defines __ehdr_start. */ - #undef HAVE_EHDR_START - -+/* The file name of the locale archive (without the directory). */ -+#undef LOCALE_ARCHIVE_NAME -+ - /* - */ - -diff --git a/config.make.in b/config.make.in -index 2fed3da773020a09..a6421039ebbbd966 100644 ---- a/config.make.in -+++ b/config.make.in -@@ -23,6 +23,7 @@ datarootdir = @datarootdir@ - localstatedir = @libc_cv_localstatedir@ - localedir = @localedir@ - multidir= @libc_cv_multidir@ -+locale-archive-name = @locale_archive_name@ - - # Should we use and build ldconfig? - use-ldconfig = @use_ldconfig@ -diff --git a/configure b/configure -index c773c487b542b3be..0d9645c389d3f111 100755 ---- a/configure -+++ b/configure -@@ -687,6 +687,7 @@ hardcoded_path_in_tests - enable_timezone_tools - extra_nonshared_cflags - use_default_link -+locale_archive_name - sysheaders - ac_ct_CXX - CXXFLAGS -@@ -763,6 +764,7 @@ with_gd_lib - with_binutils - with_selinux - with_headers -+with_locale_archive_name - with_default_link - with_nonshared_cflags - enable_sanity_checks -@@ -1484,6 +1486,9 @@ Optional Packages: - --with-selinux if building with SELinux support - --with-headers=PATH location of system headers to use (for example - /usr/src/linux/include) [default=compiler default] -+ --with-locale-archive-name=NAME -+ file name of the locale archive -+ [default=locale-archive] - --with-default-link do not use explicit linker scripts - --with-nonshared-cflags=CFLAGS - build nonshared libraries with additional CFLAGS -@@ -3335,6 +3340,20 @@ fi - - - -+# Check whether --with-locale-archive-name was given. -+if test "${with_locale_archive_name+set}" = set; then : -+ withval=$with_locale_archive_name; locale_archive_name=$withval -+else -+ locale_archive_name=locale-archive -+fi -+ -+cat >>confdefs.h <<_ACEOF -+#define LOCALE_ARCHIVE_NAME "$locale_archive_name" -+_ACEOF -+ -+ -+ -+ - - # Check whether --with-default-link was given. - if test "${with_default_link+set}" = set; then : -diff --git a/configure.ac b/configure.ac -index 598ba6c4aed08a3b..1b33559103b65e8f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -147,6 +147,15 @@ AC_ARG_WITH([headers], - [sysheaders='']) - AC_SUBST(sysheaders) - -+AC_ARG_WITH([locale-archive-name], -+ AC_HELP_STRING([--with-locale-archive-name=NAME], -+ [file name of the locale archive -+ @<:@default=locale-archive@:>@]), -+ [locale_archive_name=$withval], -+ [locale_archive_name=locale-archive]) -+AC_DEFINE_UNQUOTED(LOCALE_ARCHIVE_NAME, "$locale_archive_name") -+AC_SUBST(locale_archive_name) -+ - AC_SUBST(use_default_link) - AC_ARG_WITH([default-link], - AC_HELP_STRING([--with-default-link], -diff --git a/locale/loadarchive.c b/locale/loadarchive.c -index 803c1cf2a45838a7..834f794abf6a830c 100644 ---- a/locale/loadarchive.c -+++ b/locale/loadarchive.c -@@ -42,7 +42,7 @@ - - - /* Name of the locale archive file. */ --static const char archfname[] = COMPLOCALEDIR "/locale-archive"; -+static const char archfname[] = COMPLOCALEDIR "/" LOCALE_ARCHIVE_NAME; - - /* Size of initial mapping window, optimal if large enough to - cover the header plus the initial locale. */ -diff --git a/locale/programs/locale.c b/locale/programs/locale.c -index 6eae3175bb3cad9a..be8f07b20f100a10 100644 ---- a/locale/programs/locale.c -+++ b/locale/programs/locale.c -@@ -46,7 +46,7 @@ - #include "../locarchive.h" - #include - --#define ARCHIVE_NAME COMPLOCALEDIR "/locale-archive" -+#define ARCHIVE_NAME COMPLOCALEDIR "/" LOCALE_ARCHIVE_NAME - - /* If set print the name of the category. */ - static int show_category_name; -diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c -index e6310b18beee8dd2..02f44f682452de3e 100644 ---- a/locale/programs/locarchive.c -+++ b/locale/programs/locarchive.c -@@ -57,7 +57,7 @@ - - extern const char *output_prefix; - --#define ARCHIVE_NAME COMPLOCALEDIR "/locale-archive" -+#define ARCHIVE_NAME COMPLOCALEDIR "/" LOCALE_ARCHIVE_NAME - - static const char *locnames[] = - { -diff --git a/manual/install.texi b/manual/install.texi -index 29f6b68e25d04e4b..19e1f9ca161032b1 100644 ---- a/manual/install.texi -+++ b/manual/install.texi -@@ -131,6 +131,14 @@ that the objects in @file{libc_nonshared.a} are compiled with this flag - (although this will not affect the generated code in this particular - case and potentially change debugging information and metadata only). - -+@item --with-locale-archive-name=@var{name} -+Use @var{name} as the file name of the locale archive, and not the -+default @file{locale-archive}. Usually, the locale archive is stored -+in the directory @file{/usr/lib/locale} (for both 32-bit and 64-bit -+targets). For parallel installation of partially compatible versions -+of @theglibc{}, this option can be used to alter the name of the file -+used by glibc and by the @command{localedef} tool. -+ - @c disable static doesn't work currently - @c @item --disable-static - @c Don't build static libraries. Static libraries aren't that useful these diff --git a/glibc.spec b/glibc.spec index 7320848..4c96784 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 25%{?dist} +Release: 26%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -160,8 +160,6 @@ Patch28: glibc-rh1615608.patch # https://www.sourceware.org/ml/libc-alpha/2019-03/msg00436.html Patch31: glibc-fedora-nscd-warnings.patch -Patch32: glibc-rh1716710.patch - ############################################################################## # Continued list of core "glibc" package information: ############################################################################## @@ -509,11 +507,6 @@ end # and thus satisfies glibc's requirement for installed locales. # Users can add one more other langauge packs and then eventually # uninstall all-langpacks to save space. -# -# Historically, the postun scriptlet of glibc-all-langpacks deleted -# the locale-archive file. Therefore, we tell glibc to use a -# different, release-specific name. -%global locale_archive_name locale-archive.%{version}-%{release} %package all-langpacks Summary: All language packs for %{name}. Requires: %{name} = %{version}-%{release} @@ -835,7 +828,6 @@ build() --prefix=%{_prefix} \ --with-headers=%{_prefix}/include $EnableKernel \ --with-nonshared-cflags="$BuildFlagsNonshared" \ - --with-locale-archive-name="%{locale_archive_name}" \ --enable-bind-now \ --build=%{target} \ --enable-stack-protector=strong \ @@ -1039,13 +1031,18 @@ rm -f %{glibc_sysroot}%{_infodir}/libc.info* %ifnarch %{auxarches} olddir=`pwd` pushd %{glibc_sysroot}%{_prefix}/lib/locale -rm -f %{locale_archive_name} +rm -f locale-archive $olddir/build-%{target}/elf/ld.so \ --library-path $olddir/build-%{target}/ \ $olddir/build-%{target}/locale/localedef \ --alias-file=$olddir/intl/locale.alias \ --prefix %{glibc_sysroot} --add-to-archive \ eo *_* +# Historically, glibc-all-langpacks deleted the file on updates (sic), +# so we need to restore it in the posttrans scriptlet (like the old +# glibc-all-langpacks versions) +ln locale-archive locale-archive.real + # Create the file lists for the language specific sub-packages: for i in eo *_* do @@ -1876,6 +1873,30 @@ else io.stdout:write ("Error: Missing " .. iconv_cache .. " file.\n") end +%posttrans all-langpacks -e -p +-- The old glibc-all-langpacks postun scriptlet deleted the locale-archive +-- file, so we may have to resurrect it on upgrades. +local archive_path = "%{_prefix}/lib/locale/locale-archive" +local real_path = "%{_prefix}/lib/locale/locale-archive.real" +local stat_archive = posix.stat(archive_path) +local stat_real = posix.stat(real_path) +-- If the hard link was removed, restore it. +if stat_archive ~= nil and stat_real ~= nil + and (stat_archive.ino ~= stat_real.ino + or stat_archive.dev ~= stat_real.dev) then + posix.unlink(archive_path) + stat_archive = nil +end +-- If the file is gone, restore it. +if stat_archive == nil then + posix.link(real_path, archive_path) +end +-- Remove .rpmsave file potentially created due to config file change. +local save_path = archive_path .. ".rpmsave" +if posix.access(save_path) then + posix.unlink(save_path) +end + %pre headers # this used to be a link and it is causing nightmares now if [ -L %{_prefix}/include/scsi ] ; then @@ -1932,7 +1953,8 @@ fi %doc documentation/gai.conf %files all-langpacks -%attr(0644,root,root) %{_prefix}/lib/locale/%{locale_archive_name} +%{_prefix}/lib/locale/locale-archive +%{_prefix}/lib/locale/locale-archive.real %files locale-source %dir %{_prefix}/share/i18n/locales @@ -1993,6 +2015,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Wed Jun 5 2019 Florian Weimer - 2.29.9000-26 +- Restore /usr/lib/locale/locale-archive under its original name (#1716710) + * Tue Jun 4 2019 Florian Weimer - 2.29.9000-25 - Add glibc version to locale-archive name (#1716710) From 9c5a4265d8d93a528a816da719cbc660d1196b6d Mon Sep 17 00:00:00 2001 From: Patsy Franklin Date: Mon, 10 Jun 2019 12:59:02 -0400 Subject: [PATCH 34/50] Auto-sync with upstream branch master Upstream commit: 51ea67d54882318c4fa5394c386f4816ddc22408 - powerpc: get_rounding_mode: utilize faster method to get rounding mode - riscv: Do not use __has_include__ - powerpc: fegetexcept: utilize function instead of duplicating code - iconv: Use __twalk_r in __gconv_release_shlib - Fix iconv buffer handling with IGNORE error handler (swbz#18830) --- glibc.spec | 13 +++++++++++-- sources | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 4c96784..336b7bf 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-296-gdc91a19e6f +%define glibcsrcdir glibc-2.29.9000-302-g51ea67d548 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 26%{?dist} +Release: 27%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -2015,6 +2015,15 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon Jun 10 2019 Patsy Franklin - 2.29.9000-27 +- Auto-sync with upstream branch master, + commit 51ea67d54882318c4fa5394c386f4816ddc22408. +- powerpc: get_rounding_mode: utilize faster method to get rounding mode +- riscv: Do not use __has_include__ +- powerpc: fegetexcept: utilize function instead of duplicating code +- iconv: Use __twalk_r in __gconv_release_shlib +- Fix iconv buffer handling with IGNORE error handler (swbz#18830) + * Wed Jun 5 2019 Florian Weimer - 2.29.9000-26 - Restore /usr/lib/locale/locale-archive under its original name (#1716710) diff --git a/sources b/sources index a07f13e..7d75f3e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-296-gdc91a19e6f.tar.xz) = 3295b07bc34808c8c3d2b5b3f7c0453c9aacc2a9ab210958e0c9afabd253e001ff69b2adcc85397a82f91470e6a164ee8b4724e9fe6587d4d4d111e543b93bb2 +SHA512 (glibc-2.29.9000-302-g51ea67d548.tar.xz) = 0eb88ec6b857ef9e9b830d46f217f210fde7e5afeec6e2fa51994aadccdfccb822e07a0cdfc4bd60c0674a16503089428f8965c1a9fc6fe1f21acbbd750c97f4 From a464847a25b15f2621e9a6b54882a2457781f77d Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 17 Jun 2019 14:36:16 +0200 Subject: [PATCH 35/50] Auto-sync with upstream branch master Upstream commit: 48c3c1238925410b4e777dc94e2fde4cc9132d44 - Linux: Fix __glibc_has_include use for and statx (#1721129) - : Inhibit macro expansion for __glibc_has_include - Add IPV6_ROUTER_ALERT_ISOLATE from Linux 5.1 to bits/in.h - aarch64: handle STO_AARCH64_VARIANT_PCS - aarch64: add STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS - powerpc: Remove optimized finite - math: Use wordsize-64 version for finite - powerpc: Remove optimized isinf - math: Use wordsize-64 version for isinf - powerpc: Remove optimized isnan - math: Use wordsize-64 version for isnan - benchtests: Add isnan/isinf/isfinite benchmark - powerpc: copysign cleanup - powerpc: consolidate rint - libio: freopen of default streams crashes in old programs (swbz#24632) - Linux: Deprecate and sysctl - : Use Linux UAPI header for statx if available and useful (#1721129) - : Add __glibc_has_include macro - Improve performance of memmem - Improve performance of strstr - Benchmark strstr hard needles - Fix malloc tests build with GCC 10 --- glibc.spec | 31 +++++++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 336b7bf..29d500f 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-302-g51ea67d548 +%define glibcsrcdir glibc-2.29.9000-325-g48c3c12389 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 27%{?dist} +Release: 28%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -2015,6 +2015,33 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon Jun 17 2019 Florian Weimer - 2.29.9000-28 +- Auto-sync with upstream branch master, + commit 48c3c1238925410b4e777dc94e2fde4cc9132d44. +- Linux: Fix __glibc_has_include use for and statx (#1721129) +- : Inhibit macro expansion for __glibc_has_include +- Add IPV6_ROUTER_ALERT_ISOLATE from Linux 5.1 to bits/in.h +- aarch64: handle STO_AARCH64_VARIANT_PCS +- aarch64: add STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS +- powerpc: Remove optimized finite +- math: Use wordsize-64 version for finite +- powerpc: Remove optimized isinf +- math: Use wordsize-64 version for isinf +- powerpc: Remove optimized isnan +- math: Use wordsize-64 version for isnan +- benchtests: Add isnan/isinf/isfinite benchmark +- powerpc: copysign cleanup +- powerpc: consolidate rint +- libio: freopen of default streams crashes in old programs (swbz#24632) +- Linux: Deprecate and sysctl +- : Use Linux UAPI header for statx if available and useful + (#1721129) +- : Add __glibc_has_include macro +- Improve performance of memmem +- Improve performance of strstr +- Benchmark strstr hard needles +- Fix malloc tests build with GCC 10 + * Mon Jun 10 2019 Patsy Franklin - 2.29.9000-27 - Auto-sync with upstream branch master, commit 51ea67d54882318c4fa5394c386f4816ddc22408. diff --git a/sources b/sources index 7d75f3e..bfec39a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-302-g51ea67d548.tar.xz) = 0eb88ec6b857ef9e9b830d46f217f210fde7e5afeec6e2fa51994aadccdfccb822e07a0cdfc4bd60c0674a16503089428f8965c1a9fc6fe1f21acbbd750c97f4 +SHA512 (glibc-2.29.9000-325-g48c3c12389.tar.xz) = 573cdc30a7a5f95649931774cf5d17c1a06c6bf88e946a5582ee34a59ac1ce779a3d466f4356407d65768c147cb403bb4af74ff77083a05054f5048ce2088148 From 134a36d7f8bad4d46e1d9a8a6c2768a955833559 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 17 Jun 2019 15:45:58 +0200 Subject: [PATCH 36/50] Remove comments on %endif, required by newer RPM --- glibc.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/glibc.spec b/glibc.spec index 29d500f..c93262b 100644 --- a/glibc.spec +++ b/glibc.spec @@ -659,8 +659,8 @@ This package provides debug information for package %{name}. Debug information is useful when developing applications that use this package or when debugging this package. -%endif # %{debuginfocommonarches} -%endif # 0%{?_enable_debug_packages} +%endif +%endif %if %{with benchtests} %package benchtests @@ -1153,7 +1153,7 @@ cp benchtests/scripts/benchout.schema.json %{glibc_sysroot}%{_prefix}/libexec/gl cp benchtests/scripts/compare_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ cp benchtests/scripts/import_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ cp benchtests/scripts/validate_benchout.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ -%endif # with benchtests +%endif %if 0%{?_enable_debug_packages} # The #line directives gperf generates do not give the proper @@ -1595,13 +1595,13 @@ egrep "$auxarches_debugsources" debuginfocommon.sources >> debuginfo.filelist egrep -v "$auxarches_debugsources" \ debuginfocommon.sources >> debuginfocommon.filelist -%endif # %{biarcharches} +%endif # Add the list of *.a archives in the debug directory to # the common debuginfo package. list_debug_archives >> debuginfocommon.filelist -%endif # %{debuginfocommonarches} +%endif # Remove some common directories from the common package debuginfo so that we # don't end up owning them. @@ -1621,7 +1621,7 @@ exclude_common_dirs debuginfocommon.filelist %endif exclude_common_dirs debuginfo.filelist -%endif # 0%{?_enable_debug_packages} +%endif ############################################################################## # Delete files that we do not intended to ship with the auxarch. @@ -1637,7 +1637,7 @@ sed -e '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //;s#^/*##' \ debuginfocommon.filelist \ %endif | (cd %{glibc_sysroot}; xargs --no-run-if-empty rm -f 2> /dev/null || :) -%endif # %{auxarches} +%endif ############################################################################## # Run the glibc testsuite @@ -1732,7 +1732,7 @@ $run_ldso /usr/bin/valgrind --error-exitcode=1 \ $run_ldso /usr/bin/true --help >/dev/null %endif -%endif # %{run_glibc_tests} +%endif %pre -p From d53844dd72f7b9caac2f5b0e5d803b0815e2febb Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 21 Jun 2019 09:40:58 +0200 Subject: [PATCH 37/50] Auto-sync with upstream branch master Upstream commit: 21cc130b78a4db9113fb6695e2b951e697662440 - During exit, skip wide buffer handling for legacy stdio handles (#1722216) - powerpc: add 'volatile' to asm - powerpc: Fix static-linked version of __ppc_get_timebase_freq (swbz#24640) - nl_AW locale: Correct the negative monetary format (swb#z24614) - Fix gcc 9 build errors for make xcheck. (swbz#24556) - dlfcn: Avoid one-element flexible array in Dl_serinfo (swbz#24166) - elf: Refuse to dlopen PIE objects (swbz#24323) - nl_NL locale: Correct the negative monetary format (swbz#24614) - powerpc: Refactor powerpc64 lround/lroundf/llround/llroundf - powerpc: refactor powerpc64 lrint/lrintf/llrint/llrintf --- glibc.spec | 18 ++++++++++++++++-- sources | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index c93262b..a9a20f8 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-325-g48c3c12389 +%define glibcsrcdir glibc-2.29.9000-337-g21cc130b78 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 28%{?dist} +Release: 29%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -2015,6 +2015,20 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Fri Jun 21 2019 Florian Weimer - 2.29.9000-29 +- Auto-sync with upstream branch master, + commit 21cc130b78a4db9113fb6695e2b951e697662440: +- During exit, skip wide buffer handling for legacy stdio handles (#1722216) +- powerpc: add 'volatile' to asm +- powerpc: Fix static-linked version of __ppc_get_timebase_freq (swbz#24640) +- nl_AW locale: Correct the negative monetary format (swb#z24614) +- Fix gcc 9 build errors for make xcheck. (swbz#24556) +- dlfcn: Avoid one-element flexible array in Dl_serinfo (swbz#24166) +- elf: Refuse to dlopen PIE objects (swbz#24323) +- nl_NL locale: Correct the negative monetary format (swbz#24614) +- powerpc: Refactor powerpc64 lround/lroundf/llround/llroundf +- powerpc: refactor powerpc64 lrint/lrintf/llrint/llrintf + * Mon Jun 17 2019 Florian Weimer - 2.29.9000-28 - Auto-sync with upstream branch master, commit 48c3c1238925410b4e777dc94e2fde4cc9132d44. diff --git a/sources b/sources index bfec39a..26707a1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-325-g48c3c12389.tar.xz) = 573cdc30a7a5f95649931774cf5d17c1a06c6bf88e946a5582ee34a59ac1ce779a3d466f4356407d65768c147cb403bb4af74ff77083a05054f5048ce2088148 +SHA512 (glibc-2.29.9000-337-g21cc130b78.tar.xz) = feef634cefae6c722524707e9ffdd870714fb02a0789c60de3c89a51824d9259aefdadd472219a48cafafd1d69e171ec326fd4e00013b32313b7a3c999f7a5a4 From b21f47f28708350d0b21fb9870be32bdddb3ef9b Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 20 Jun 2019 11:29:33 -0400 Subject: [PATCH 38/50] Reduce external fragmentation in memalign (swbz#14581). --- glibc-fedora-memalign.patch | 192 ++++++++++++++++++++++++++++++++++++ glibc.spec | 8 +- 2 files changed, 199 insertions(+), 1 deletion(-) create mode 100644 glibc-fedora-memalign.patch diff --git a/glibc-fedora-memalign.patch b/glibc-fedora-memalign.patch new file mode 100644 index 0000000..2b921ac --- /dev/null +++ b/glibc-fedora-memalign.patch @@ -0,0 +1,192 @@ +This patch adds a chunk scanning algorithm to the +_int_memalign code path that reduces external fragmentation +by reusing already aligned chunks instead of looking for +chunks of larger sizes and splitting them. + +The goal is it fix the pathological use cases where heaps +grow continuously in Ruby or orther workloads that are +heavy users of memalign. + +diff --git a/malloc/malloc.c b/malloc/malloc.c +index 00ce48cf5879c87f..cc6d8299e272441d 100644 +--- a/malloc/malloc.c ++++ b/malloc/malloc.c +@@ -4665,8 +4665,7 @@ _int_memalign (mstate av, size_t alignment, size_t bytes) + mchunkptr remainder; /* spare room at end to split off */ + unsigned long remainder_size; /* its size */ + INTERNAL_SIZE_T size; +- +- ++ mchunkptr victim; + + if (!checked_request2size (bytes, &nb)) + { +@@ -4674,29 +4673,135 @@ _int_memalign (mstate av, size_t alignment, size_t bytes) + return NULL; + } + +- /* +- Strategy: find a spot within that chunk that meets the alignment ++ /* Strategy: search the bins looking for an existing block that meets ++ our needs. */ ++ ++ /* This will be set if we found a candidate chunk. */ ++ victim = NULL; ++ ++ /* Fast bins are singly-linked, hard to remove a chunk from the middle ++ and unlikely to meet our alignment requirements. We have not done ++ any experimentation with searching for aligned fastbins. */ ++ ++ if (in_smallbin_range (nb)) ++ { ++ /* Check small bins. Small bin chunks are doubly-linked despite ++ being the same size. */ ++ int victim_index; /* its bin index */ ++ ++ victim_index = smallbin_index (nb); ++ mchunkptr fwd; /* misc temp for linking */ ++ mchunkptr bck; /* misc temp for linking */ ++ ++ bck = bin_at (av, victim_index); ++ fwd = bck->fd; ++ while (fwd != bck) ++ { ++ if (((intptr_t)chunk2mem (fwd) & (alignment - 1)) == 0) ++ { ++ victim = fwd; ++ ++ /* Unlink it */ ++ victim->fd->bk = victim->bk; ++ victim->bk->fd = victim->fd; ++ break; ++ } ++ ++ fwd = fwd->fd; ++ } ++ } ++ else ++ { ++ /* Check large bins. */ ++ int victim_index; /* its bin index */ ++ mchunkptr fwd; /* misc temp for linking */ ++ mchunkptr bck; /* misc temp for linking */ ++ mchunkptr best = NULL; ++ size_t best_size = 0; ++ ++ victim_index = largebin_index (nb); ++ bck = bin_at (av, victim_index); ++ fwd = bck->fd; ++ ++ while (fwd != bck) ++ { ++ if (chunksize (fwd) >= nb ++ && (((intptr_t)chunk2mem (fwd) & (alignment - 1)) == 0) ++ && (chunksize (fwd) <= best_size || best == NULL)) ++ { ++ best = fwd; ++ best_size = chunksize(fwd); ++ } ++ ++ fwd = fwd->fd; ++ if (chunksize (fwd) < nb) ++ break; ++ } ++ victim = best; ++ ++ if (victim) ++ { ++ if (victim->fd_nextsize) ++ { ++ if (victim->fd_nextsize != victim->fd ++ && victim->fd != bck) ++ { ++ /* There's more with the same size, but we've chosen the ++ "leader". We need to make the next one the leader. */ ++ victim->fd->fd_nextsize = victim->fd_nextsize; ++ victim->fd->bk_nextsize = victim->bk_nextsize; ++ if (victim->fd_nextsize) ++ victim->fd_nextsize->bk_nextsize = victim->fd; ++ if (victim->bk_nextsize) ++ victim->bk_nextsize->fd_nextsize = victim->fd; ++ } ++ else ++ { ++ /* There's only this one with this size. */ ++ if (victim->fd_nextsize) ++ victim->fd_nextsize->bk_nextsize = victim->bk_nextsize; ++ if (victim->bk_nextsize) ++ victim->bk_nextsize->fd_nextsize = victim->fd_nextsize; ++ } ++ } ++ ++ if (victim->fd) ++ victim->fd->bk = victim->bk; ++ if (victim->bk) ++ victim->bk->fd = victim->fd; ++ } ++ } ++ ++ /* Strategy: find a spot within that chunk that meets the alignment + request, and then possibly free the leading and trailing space. +- */ ++ This strategy is incredibly costly and can lead to external ++ fragmentation if header and footer chunks are unused. */ + +- /* Call malloc with worst case padding to hit alignment. */ ++ if (victim != NULL) ++ { ++ p = victim; ++ m = chunk2mem (p); ++ set_inuse (p); ++ } ++ else ++ { ++ /* Call malloc with worst case padding to hit alignment. */ + +- m = (char *) (_int_malloc (av, nb + alignment + MINSIZE)); ++ m = (char *) (_int_malloc (av, nb + alignment + MINSIZE)); + +- if (m == 0) +- return 0; /* propagate failure */ ++ if (m == 0) ++ return 0; /* propagate failure */ + +- p = mem2chunk (m); ++ p = mem2chunk (m); ++ } + + if ((((unsigned long) (m)) % alignment) != 0) /* misaligned */ +- +- { /* +- Find an aligned spot inside chunk. Since we need to give back +- leading space in a chunk of at least MINSIZE, if the first +- calculation places us at a spot with less than MINSIZE leader, +- we can move to the next aligned spot -- we've allocated enough +- total room so that this is always possible. +- */ ++ { ++ /* Find an aligned spot inside chunk. Since we need to give back ++ leading space in a chunk of at least MINSIZE, if the first ++ calculation places us at a spot with less than MINSIZE leader, ++ we can move to the next aligned spot -- we've allocated enough ++ total room so that this is always possible. */ + brk = (char *) mem2chunk (((unsigned long) (m + alignment - 1)) & + - ((signed long) alignment)); + if ((unsigned long) (brk - (char *) (p)) < MINSIZE) +@@ -5385,6 +5490,16 @@ __malloc_info (int options, FILE *fp) + + fputs ("\n", fp); + ++ fprintf (fp, "\n", (long) MALLOC_ALIGNMENT); ++ fprintf (fp, "\n", (long) MIN_CHUNK_SIZE); ++ fprintf (fp, "\n", (long) MAX_FAST_SIZE); ++ fprintf (fp, "\n", (long) MAX_TCACHE_SIZE); ++ fprintf (fp, "\n", (long) MIN_LARGE_SIZE); ++ fprintf (fp, "\n", (long) DEFAULT_MMAP_THRESHOLD); ++ fprintf (fp, "\n", (long) DEFAULT_MMAP_THRESHOLD_MAX); ++ fprintf (fp, "\n", (long) HEAP_MIN_SIZE); ++ fprintf (fp, "\n", (long) HEAP_MAX_SIZE); ++ + /* Iterate over all arenas currently in use. */ + mstate ar_ptr = &main_arena; + do diff --git a/glibc.spec b/glibc.spec index a9a20f8..16a73d9 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 29%{?dist} +Release: 30%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -159,6 +159,9 @@ Patch28: glibc-rh1615608.patch # In progress upstream submission for nscd.conf changes: # https://www.sourceware.org/ml/libc-alpha/2019-03/msg00436.html Patch31: glibc-fedora-nscd-warnings.patch +Patch32: glibc-fedora-memalign.patch + + ############################################################################## # Continued list of core "glibc" package information: @@ -2015,6 +2018,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Fri Jun 21 2019 Carlos O'Donell - 2.29.9000-30 +- Reduce external fragmentation in memalign (swbz#14581) + * Fri Jun 21 2019 Florian Weimer - 2.29.9000-29 - Auto-sync with upstream branch master, commit 21cc130b78a4db9113fb6695e2b951e697662440: From ca11f82b699604ed6375b632954441384d3a3ae6 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Mon, 24 Jun 2019 10:57:31 -0400 Subject: [PATCH 39/50] Revert glibc-fedora-memalign.patch addition. The patch has been removed and will be added back once F31 branches. No official build happened so we can just remove the NEVRA usage. --- glibc-fedora-memalign.patch | 192 ------------------------------------ glibc.spec | 8 +- 2 files changed, 1 insertion(+), 199 deletions(-) delete mode 100644 glibc-fedora-memalign.patch diff --git a/glibc-fedora-memalign.patch b/glibc-fedora-memalign.patch deleted file mode 100644 index 2b921ac..0000000 --- a/glibc-fedora-memalign.patch +++ /dev/null @@ -1,192 +0,0 @@ -This patch adds a chunk scanning algorithm to the -_int_memalign code path that reduces external fragmentation -by reusing already aligned chunks instead of looking for -chunks of larger sizes and splitting them. - -The goal is it fix the pathological use cases where heaps -grow continuously in Ruby or orther workloads that are -heavy users of memalign. - -diff --git a/malloc/malloc.c b/malloc/malloc.c -index 00ce48cf5879c87f..cc6d8299e272441d 100644 ---- a/malloc/malloc.c -+++ b/malloc/malloc.c -@@ -4665,8 +4665,7 @@ _int_memalign (mstate av, size_t alignment, size_t bytes) - mchunkptr remainder; /* spare room at end to split off */ - unsigned long remainder_size; /* its size */ - INTERNAL_SIZE_T size; -- -- -+ mchunkptr victim; - - if (!checked_request2size (bytes, &nb)) - { -@@ -4674,29 +4673,135 @@ _int_memalign (mstate av, size_t alignment, size_t bytes) - return NULL; - } - -- /* -- Strategy: find a spot within that chunk that meets the alignment -+ /* Strategy: search the bins looking for an existing block that meets -+ our needs. */ -+ -+ /* This will be set if we found a candidate chunk. */ -+ victim = NULL; -+ -+ /* Fast bins are singly-linked, hard to remove a chunk from the middle -+ and unlikely to meet our alignment requirements. We have not done -+ any experimentation with searching for aligned fastbins. */ -+ -+ if (in_smallbin_range (nb)) -+ { -+ /* Check small bins. Small bin chunks are doubly-linked despite -+ being the same size. */ -+ int victim_index; /* its bin index */ -+ -+ victim_index = smallbin_index (nb); -+ mchunkptr fwd; /* misc temp for linking */ -+ mchunkptr bck; /* misc temp for linking */ -+ -+ bck = bin_at (av, victim_index); -+ fwd = bck->fd; -+ while (fwd != bck) -+ { -+ if (((intptr_t)chunk2mem (fwd) & (alignment - 1)) == 0) -+ { -+ victim = fwd; -+ -+ /* Unlink it */ -+ victim->fd->bk = victim->bk; -+ victim->bk->fd = victim->fd; -+ break; -+ } -+ -+ fwd = fwd->fd; -+ } -+ } -+ else -+ { -+ /* Check large bins. */ -+ int victim_index; /* its bin index */ -+ mchunkptr fwd; /* misc temp for linking */ -+ mchunkptr bck; /* misc temp for linking */ -+ mchunkptr best = NULL; -+ size_t best_size = 0; -+ -+ victim_index = largebin_index (nb); -+ bck = bin_at (av, victim_index); -+ fwd = bck->fd; -+ -+ while (fwd != bck) -+ { -+ if (chunksize (fwd) >= nb -+ && (((intptr_t)chunk2mem (fwd) & (alignment - 1)) == 0) -+ && (chunksize (fwd) <= best_size || best == NULL)) -+ { -+ best = fwd; -+ best_size = chunksize(fwd); -+ } -+ -+ fwd = fwd->fd; -+ if (chunksize (fwd) < nb) -+ break; -+ } -+ victim = best; -+ -+ if (victim) -+ { -+ if (victim->fd_nextsize) -+ { -+ if (victim->fd_nextsize != victim->fd -+ && victim->fd != bck) -+ { -+ /* There's more with the same size, but we've chosen the -+ "leader". We need to make the next one the leader. */ -+ victim->fd->fd_nextsize = victim->fd_nextsize; -+ victim->fd->bk_nextsize = victim->bk_nextsize; -+ if (victim->fd_nextsize) -+ victim->fd_nextsize->bk_nextsize = victim->fd; -+ if (victim->bk_nextsize) -+ victim->bk_nextsize->fd_nextsize = victim->fd; -+ } -+ else -+ { -+ /* There's only this one with this size. */ -+ if (victim->fd_nextsize) -+ victim->fd_nextsize->bk_nextsize = victim->bk_nextsize; -+ if (victim->bk_nextsize) -+ victim->bk_nextsize->fd_nextsize = victim->fd_nextsize; -+ } -+ } -+ -+ if (victim->fd) -+ victim->fd->bk = victim->bk; -+ if (victim->bk) -+ victim->bk->fd = victim->fd; -+ } -+ } -+ -+ /* Strategy: find a spot within that chunk that meets the alignment - request, and then possibly free the leading and trailing space. -- */ -+ This strategy is incredibly costly and can lead to external -+ fragmentation if header and footer chunks are unused. */ - -- /* Call malloc with worst case padding to hit alignment. */ -+ if (victim != NULL) -+ { -+ p = victim; -+ m = chunk2mem (p); -+ set_inuse (p); -+ } -+ else -+ { -+ /* Call malloc with worst case padding to hit alignment. */ - -- m = (char *) (_int_malloc (av, nb + alignment + MINSIZE)); -+ m = (char *) (_int_malloc (av, nb + alignment + MINSIZE)); - -- if (m == 0) -- return 0; /* propagate failure */ -+ if (m == 0) -+ return 0; /* propagate failure */ - -- p = mem2chunk (m); -+ p = mem2chunk (m); -+ } - - if ((((unsigned long) (m)) % alignment) != 0) /* misaligned */ -- -- { /* -- Find an aligned spot inside chunk. Since we need to give back -- leading space in a chunk of at least MINSIZE, if the first -- calculation places us at a spot with less than MINSIZE leader, -- we can move to the next aligned spot -- we've allocated enough -- total room so that this is always possible. -- */ -+ { -+ /* Find an aligned spot inside chunk. Since we need to give back -+ leading space in a chunk of at least MINSIZE, if the first -+ calculation places us at a spot with less than MINSIZE leader, -+ we can move to the next aligned spot -- we've allocated enough -+ total room so that this is always possible. */ - brk = (char *) mem2chunk (((unsigned long) (m + alignment - 1)) & - - ((signed long) alignment)); - if ((unsigned long) (brk - (char *) (p)) < MINSIZE) -@@ -5385,6 +5490,16 @@ __malloc_info (int options, FILE *fp) - - fputs ("\n", fp); - -+ fprintf (fp, "\n", (long) MALLOC_ALIGNMENT); -+ fprintf (fp, "\n", (long) MIN_CHUNK_SIZE); -+ fprintf (fp, "\n", (long) MAX_FAST_SIZE); -+ fprintf (fp, "\n", (long) MAX_TCACHE_SIZE); -+ fprintf (fp, "\n", (long) MIN_LARGE_SIZE); -+ fprintf (fp, "\n", (long) DEFAULT_MMAP_THRESHOLD); -+ fprintf (fp, "\n", (long) DEFAULT_MMAP_THRESHOLD_MAX); -+ fprintf (fp, "\n", (long) HEAP_MIN_SIZE); -+ fprintf (fp, "\n", (long) HEAP_MAX_SIZE); -+ - /* Iterate over all arenas currently in use. */ - mstate ar_ptr = &main_arena; - do diff --git a/glibc.spec b/glibc.spec index 16a73d9..a9a20f8 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 30%{?dist} +Release: 29%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -159,9 +159,6 @@ Patch28: glibc-rh1615608.patch # In progress upstream submission for nscd.conf changes: # https://www.sourceware.org/ml/libc-alpha/2019-03/msg00436.html Patch31: glibc-fedora-nscd-warnings.patch -Patch32: glibc-fedora-memalign.patch - - ############################################################################## # Continued list of core "glibc" package information: @@ -2018,9 +2015,6 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog -* Fri Jun 21 2019 Carlos O'Donell - 2.29.9000-30 -- Reduce external fragmentation in memalign (swbz#14581) - * Fri Jun 21 2019 Florian Weimer - 2.29.9000-29 - Auto-sync with upstream branch master, commit 21cc130b78a4db9113fb6695e2b951e697662440: From 4a003b4922c29c370e8d81355949b53899aff30c Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 24 Jun 2019 15:59:37 -0400 Subject: [PATCH 40/50] Auto-sync with upstream branch master Upstream commit: 2bd81b60d6ffdf7e0d22006d69f4b812b1c80513. - szl_PL locale: Spelling corrections (swbz 24652). - nl_{AW,NL}: Correct the thousands separator and grouping (swbz 23831). - Add missing VDSO_{NAME,HASH}_* macros and use them for PREPARE_VERSION_KNOWN - nptl: Convert various tests to use libsupport - support: Invent verbose_printf macro - support: Add xclock_now helper function. --- glibc.spec | 14 ++++++++++++-- sources | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index a9a20f8..ca8da28 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-337-g21cc130b78 +%define glibcsrcdir glibc-2.29.9000-343-g2bd81b60d6 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 29%{?dist} +Release: 30%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -2015,6 +2015,16 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon Jun 24 2019 DJ Delorie - 2.29.9000-30 +- Auto-sync with upstream branch master, + commit 2bd81b60d6ffdf7e0d22006d69f4b812b1c80513. +- szl_PL locale: Spelling corrections (swbz 24652). +- nl_{AW,NL}: Correct the thousands separator and grouping (swbz 23831). +- Add missing VDSO_{NAME,HASH}_* macros and use them for PREPARE_VERSION_KNOWN +- nptl: Convert various tests to use libsupport +- support: Invent verbose_printf macro +- support: Add xclock_now helper function. + * Fri Jun 21 2019 Florian Weimer - 2.29.9000-29 - Auto-sync with upstream branch master, commit 21cc130b78a4db9113fb6695e2b951e697662440: diff --git a/sources b/sources index 26707a1..ffe67e5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-337-g21cc130b78.tar.xz) = feef634cefae6c722524707e9ffdd870714fb02a0789c60de3c89a51824d9259aefdadd472219a48cafafd1d69e171ec326fd4e00013b32313b7a3c999f7a5a4 +SHA512 (glibc-2.29.9000-343-g2bd81b60d6.tar.xz) = d0938192107917e2c781eedd3c15fa56f0214dceefc80764fb4478ad3ff3be52e1b8cad267f57007b6be51d11f485ba8301600ee643e6138ee4c190384e87ce5 From c098079671a2643b10ddf8e390aa153e027676da Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Wed, 10 Jul 2019 12:49:03 -0400 Subject: [PATCH 41/50] Auto-sync with upstream branch master Upstream commit: 30ba0375464f34e4bf8129f3d3dc14d0c09add17 - Don't declare __malloc_check_init in (bug 23352) - nftw: fill in stat buf for dangling links [BZ #23501] - dl-vdso: Add LINUX_4 HASH CODE to support nds32 vdso mechanism - riscv: restore ABI compatibility (bug 24484) - aarch64: new ifunc resolver ABI - nptl: Remove vfork IFUNC-based forwarder from libpthread [BZ #20188] - malloc: Add nptl, htl dependency for the subdirectory [BZ #24757] - Call _dl_open_check after relocation [BZ #24259] - Linux: Use mmap instead of malloc in dirent/tst-getdents64 - ld.so: Support moving versioned symbols between sonames [BZ #24741] - io: Remove copy_file_range emulation [BZ #24744] - Linux: Adjust gedents64 buffer size to int range [BZ #24740] - powerpc: Use generic e_expf - Linux: Add nds32 specific syscalls to syscall-names.list - szl_PL locale: Fix a typo in the previous commit (bug 24652). --- glibc.spec | 23 +++++++++++++++++++++-- sources | 2 +- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index ca8da28..cccdda7 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-343-g2bd81b60d6 +%define glibcsrcdir glibc-2.29.9000-381-g30ba037546 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 30%{?dist} +Release: 31%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -2015,6 +2015,25 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Wed Jul 10 2019 Carlos O'Donell - 2.29.9000-31 +- Auto-sync with upstream branch master, + commit 30ba0375464f34e4bf8129f3d3dc14d0c09add17. +- Don't declare __malloc_check_init in (bug 23352) +- nftw: fill in stat buf for dangling links [BZ #23501] +- dl-vdso: Add LINUX_4 HASH CODE to support nds32 vdso mechanism +- riscv: restore ABI compatibility (bug 24484) +- aarch64: new ifunc resolver ABI +- nptl: Remove vfork IFUNC-based forwarder from libpthread [BZ #20188] +- malloc: Add nptl, htl dependency for the subdirectory [BZ #24757] +- Call _dl_open_check after relocation [BZ #24259] +- Linux: Use mmap instead of malloc in dirent/tst-getdents64 +- ld.so: Support moving versioned symbols between sonames [BZ #24741] +- io: Remove copy_file_range emulation [BZ #24744] +- Linux: Adjust gedents64 buffer size to int range [BZ #24740] +- powerpc: Use generic e_expf +- Linux: Add nds32 specific syscalls to syscall-names.list +- szl_PL locale: Fix a typo in the previous commit (bug 24652). + * Mon Jun 24 2019 DJ Delorie - 2.29.9000-30 - Auto-sync with upstream branch master, commit 2bd81b60d6ffdf7e0d22006d69f4b812b1c80513. diff --git a/sources b/sources index ffe67e5..47f2ac5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-343-g2bd81b60d6.tar.xz) = d0938192107917e2c781eedd3c15fa56f0214dceefc80764fb4478ad3ff3be52e1b8cad267f57007b6be51d11f485ba8301600ee643e6138ee4c190384e87ce5 +SHA512 (glibc-2.29.9000-381-g30ba037546.tar.xz) = 572654d41967dfaa3ce1aaa62bc37cbb42ce6219f79eafdbe4a3de67c254867c37914cee809781d4edd3f9624345eb57808d7a3a2574fca550f767130818350c From 5f0fe918a52e92f8700108ae5e09a4f1b2fee2bf Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Thu, 18 Jul 2019 15:15:24 -0400 Subject: [PATCH 42/50] Auto-sync with upstream branch master Upstream commit: 3556658c5b8765480711b265abc901c67d5fc060 - Regenerate po/libc.pot for 2.30 release. - nptl: Add POSIX-proposed _clock functions to hppa pthread.h - nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc - Afar locales: Months and days updated from CLDR (bug 21897). - nl_BE locale: Use "copy "nl_NL"" in LC_NAME (bug 23996). - nl_BE and nl_NL locales: Dutch salutations (bug 23996). - ga_IE and en_IE locales: Revert first_weekday removal (bug 24200). - nptl: Remove futex_supports_exact_relative_timeouts - Update NEWS for new _clockwait and _clocklock functions - nptl: Add POSIX-proposed pthread_mutex_clocklock - nptl: Rename lll_timedlock to lll_clocklock and add clockid parameter - nptl: Add POSIX-proposed pthread_rwlock_clockrdlock & pthread_rwlock_clockwrlock - nptl: pthread_rwlock: Move timeout validation into _full functions - nptl: Add POSIX-proposed pthread_cond_clockwait - nptl: Add POSIX-proposed sem_clockwait - nptl: Add clockid parameter to futex timed wait calls - posix: Fix large mmap64 offset for mips64n32 (BZ#24699) - nss_db: fix endent wrt NULL mappings [BZ #24695] [BZ #24696] --- glibc.spec | 26 ++++++++++++++++++++++++-- sources | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index cccdda7..0e44e39 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-381-g30ba037546 +%define glibcsrcdir glibc-2.29.9000-399-g3556658c5b %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 31%{?dist} +Release: 32%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -2015,6 +2015,28 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Thu Jul 18 2019 DJ Delorie - 2.29.9000-32 +- Auto-sync with upstream branch master, + commit 3556658c5b8765480711b265abc901c67d5fc060. +- Regenerate po/libc.pot for 2.30 release. +- nptl: Add POSIX-proposed _clock functions to hppa pthread.h +- nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc +- Afar locales: Months and days updated from CLDR (bug 21897). +- nl_BE locale: Use "copy "nl_NL"" in LC_NAME (bug 23996). +- nl_BE and nl_NL locales: Dutch salutations (bug 23996). +- ga_IE and en_IE locales: Revert first_weekday removal (bug 24200). +- nptl: Remove futex_supports_exact_relative_timeouts +- Update NEWS for new _clockwait and _clocklock functions +- nptl: Add POSIX-proposed pthread_mutex_clocklock +- nptl: Rename lll_timedlock to lll_clocklock and add clockid parameter +- nptl: Add POSIX-proposed pthread_rwlock_clockrdlock & pthread_rwlock_clockwrlock +- nptl: pthread_rwlock: Move timeout validation into _full functions +- nptl: Add POSIX-proposed pthread_cond_clockwait +- nptl: Add POSIX-proposed sem_clockwait +- nptl: Add clockid parameter to futex timed wait calls +- posix: Fix large mmap64 offset for mips64n32 (BZ#24699) +- nss_db: fix endent wrt NULL mappings [BZ #24695] [BZ #24696] + * Wed Jul 10 2019 Carlos O'Donell - 2.29.9000-31 - Auto-sync with upstream branch master, commit 30ba0375464f34e4bf8129f3d3dc14d0c09add17. diff --git a/sources b/sources index 47f2ac5..45a4530 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-381-g30ba037546.tar.xz) = 572654d41967dfaa3ce1aaa62bc37cbb42ce6219f79eafdbe4a3de67c254867c37914cee809781d4edd3f9624345eb57808d7a3a2574fca550f767130818350c +SHA512 (glibc-2.29.9000-399-g3556658c5b.tar.xz) = 60f1e4e957046e319ff865cc1ecccf75d05f5bf13228fbf6cf4b65c3ce9714c71dfee217a24bea5b1297f926832757c4e535399fd58c74cf4c1735d8cbb556b5 From 8797f878024852d6febbec8a4b79296e99b47e3a Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 22 Jul 2019 14:06:01 -0400 Subject: [PATCH 43/50] Auto-sync with upstream branch master Upstream commit: dcf36bcad3f283f77893d3b157ef7bb2c99419f2 - Add NEWS entry about the new AArch64 IFUNC resolver call ABI - locale/C-translit.h.in: Cyrillic -> ASCII transliteration [BZ #2872] - Linux: Update syscall-names.list to Linux 5.2 --- glibc.spec | 12 ++++++++++-- sources | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 0e44e39..ec4ce29 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-399-g3556658c5b +%define glibcsrcdir glibc-2.29.9000-402-gdcf36bcad3 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 32%{?dist} +Release: 33%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -2015,6 +2015,14 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon Jul 22 2019 DJ Delorie - 2.29.9000-33 +- Auto-sync with upstream branch master, + commit dcf36bcad3f283f77893d3b157ef7bb2c99419f2. +- Add NEWS entry about the new AArch64 IFUNC resolver call ABI +- locale/C-translit.h.in: Cyrillic -> ASCII transliteration [BZ #2872] +- Linux: Update syscall-names.list to Linux 5.2 + + * Thu Jul 18 2019 DJ Delorie - 2.29.9000-32 - Auto-sync with upstream branch master, commit 3556658c5b8765480711b265abc901c67d5fc060. diff --git a/sources b/sources index 45a4530..137c890 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-399-g3556658c5b.tar.xz) = 60f1e4e957046e319ff865cc1ecccf75d05f5bf13228fbf6cf4b65c3ce9714c71dfee217a24bea5b1297f926832757c4e535399fd58c74cf4c1735d8cbb556b5 +SHA512 (glibc-2.29.9000-402-gdcf36bcad3.tar.xz) = f61e3755b54ab50c2be711c2b74773b8e76df336be975881e4201ca04866d721c756b93ff3b420a1c5bb9173d7748d545cb4f37c7f913c73cd14d48fa75d7671 From c96359dd1c6c259fa71ab51940e5c961fce53fa9 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 23 Jul 2019 12:14:15 +0200 Subject: [PATCH 44/50] Revert libio change that causes crashes (#1732406) --- glibc-rh1732406.patch | 231 ++++++++++++++++++++++++++++++++++++++++++ glibc.spec | 6 +- 2 files changed, 236 insertions(+), 1 deletion(-) create mode 100644 glibc-rh1732406.patch diff --git a/glibc-rh1732406.patch b/glibc-rh1732406.patch new file mode 100644 index 0000000..37a1bc5 --- /dev/null +++ b/glibc-rh1732406.patch @@ -0,0 +1,231 @@ +Revert "libio: Fix gconv-related memory leak [BZ #24583]" + +This reverts commit 7e740ab2e7be7d83b75513aa406e0b10875f7f9c. + +It causes a regression: + +https://sourceware.org/bugzilla/show_bug.cgi?id=24677 + +diff --git a/libio/Makefile b/libio/Makefile +index 6e594b8ec5fbca94..66ffab43201638ef 100644 +--- a/libio/Makefile ++++ b/libio/Makefile +@@ -66,11 +66,7 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ + tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \ + tst-ftell-append tst-fputws tst-bz22415 tst-fgetc-after-eof \ + tst-sprintf-ub tst-sprintf-chk-ub tst-bz24051 tst-bz24153 \ +- tst-wfile-sync tst-wfile-gconv +- +-# This test tests interaction with the gconv cache. Setting +-# GCONV_CACHE during out-of-container testing disables the cache. +-tests-container += tst-wfile-ascii ++ tst-wfile-sync + + tests-internal = tst-vtables tst-vtables-interposed tst-readline + +@@ -173,12 +169,10 @@ test-fmemopen-ENV = MALLOC_TRACE=$(objpfx)test-fmemopen.mtrace + tst-fopenloc-ENV = MALLOC_TRACE=$(objpfx)tst-fopenloc.mtrace + tst-bz22415-ENV = MALLOC_TRACE=$(objpfx)tst-bz22415.mtrace + tst-bz24228-ENV = MALLOC_TRACE=$(objpfx)tst-bz24228.mtrace +-tst-wfile-gconv-ENV = MALLOC_TRACE=$(objpfx)tst-wfile-gconv.mtrace + + generated += test-fmemopen.mtrace test-fmemopen.check + generated += tst-fopenloc.mtrace tst-fopenloc.check + generated += tst-bz22415.mtrace tst-bz22415.check +-generated += tst-wfile-gconv.mtrace tst-wfile-gconv.check + + aux := fileops genops stdfiles stdio strops + +@@ -194,8 +188,7 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \ + + ifeq ($(run-built-tests),yes) + tests-special += $(objpfx)test-freopen.out $(objpfx)test-fmemopen-mem.out \ +- $(objpfx)tst-bz22415-mem.out \ +- $(objpfx)tst-wfile-gconv-mem.out ++ $(objpfx)tst-bz22415-mem.out + ifeq (yes,$(build-shared)) + # Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared + # library is enabled since they depend on tst-fopenloc.out. +@@ -229,7 +222,6 @@ $(objpfx)tst-ungetwc2.out: $(gen-locales) + $(objpfx)tst-widetext.out: $(gen-locales) + $(objpfx)tst_wprintf2.out: $(gen-locales) + $(objpfx)tst-wfile-sync.out: $(gen-locales) +-$(objpfx)tst-wfile-gconv.out: $(gen-locales) + endif + + $(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen +@@ -258,6 +250,3 @@ $(objpfx)tst-bz24228-mem.out: $(objpfx)tst-bz24228.out + $(common-objpfx)malloc/mtrace $(objpfx)tst-bz24228.mtrace > $@; \ + $(evaluate-test) + +-$(objpfx)tst-wfile-gconv-mem.out: $(objpfx)tst-wfile-gconv.out +- $(common-objpfx)malloc/mtrace $(objpfx)tst-wfile-gconv.mtrace > $@; \ +- $(evaluate-test) +diff --git a/libio/iofclose.c b/libio/iofclose.c +index c03c6cf57cafd2bb..8a80dd0b78a50fce 100644 +--- a/libio/iofclose.c ++++ b/libio/iofclose.c +@@ -26,8 +26,8 @@ + + #include "libioP.h" + #include ++#include "../iconv/gconv_int.h" + #include +-#include + + int + _IO_new_fclose (FILE *fp) +@@ -60,14 +60,11 @@ _IO_new_fclose (FILE *fp) + /* This stream has a wide orientation. This means we have to free + the conversion functions. */ + struct _IO_codecvt *cc = fp->_codecvt; +- struct gconv_fcts conv = +- { +- .towc = cc->__cd_in.__cd.__steps, +- .towc_nsteps = cc->__cd_in.__cd.__nsteps, +- .tomb = cc->__cd_out.__cd.__steps, +- .tomb_nsteps = cc->__cd_out.__cd.__nsteps, +- }; +- __wcsmbs_close_conv (&conv); ++ ++ __libc_lock_lock (__gconv_lock); ++ __gconv_release_step (cc->__cd_in.__cd.__steps); ++ __gconv_release_step (cc->__cd_out.__cd.__steps); ++ __libc_lock_unlock (__gconv_lock); + } + else + { +diff --git a/libio/tst-wfile-ascii.c b/libio/tst-wfile-ascii.c +deleted file mode 100644 +index 7514289a7bb79339..0000000000000000 +--- a/libio/tst-wfile-ascii.c ++++ /dev/null +@@ -1,56 +0,0 @@ +-/* Test ASCII gconv module followed by cache initialization. +- Copyright (C) 2019 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 +-#include +- +-static int +-do_test (void) +-{ +- /* The test-in-container framework sets these environment variables. +- The presence of GCONV_PATH invalidates this test. */ +- unsetenv ("GCONV_PATH"); +- unsetenv ("LOCPATH"); +- +- /* Create the gconv module cache. iconvconfig is in /sbin, which is +- not on PATH. */ +- { +- char *iconvconfig = xasprintf ("%s/iconvconfig", support_sbindir_prefix); +- TEST_COMPARE (system (iconvconfig), 0); +- } +- +- /* Use built-in ASCII gconv module, without triggering cache +- initialization. */ +- FILE *fp1 = xfopen ("/dev/zero", "r"); +- TEST_COMPARE (fwide (fp1, 1), 1); +- +- /* Use non-ASCII gconv module and trigger gconv cache +- initialization. */ +- FILE *fp2 = xfopen ("/dev/zero", "r,ccs=UTF-8"); +- TEST_COMPARE (fwide (fp2, 0), 1); +- +- xfclose (fp1); +- xfclose (fp2); +- +- return 0; +-} +- +-#include +diff --git a/libio/tst-wfile-gconv.c b/libio/tst-wfile-gconv.c +deleted file mode 100644 +index de603b32d2a1a58b..0000000000000000 +--- a/libio/tst-wfile-gconv.c ++++ /dev/null +@@ -1,36 +0,0 @@ +-/* Test that non-built-in gconv modules do not cause memory leak (bug 24583). +- Copyright (C) 2019 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 +- +-static int +-do_test (void) +-{ +- mtrace (); +- +- TEST_VERIFY_EXIT (setlocale (LC_ALL, "ja_JP.EUC-JP") != NULL); +- xfclose (xfopen ("/etc/passwd", "r,ccs=UTF-8")); +- xfclose (xfopen ("/etc/passwd", "r")); +- +- return 0; +-} +- +-#include +diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c +index 840d4abc440e1076..6648365d822bc167 100644 +--- a/wcsmbs/wcsmbsload.c ++++ b/wcsmbs/wcsmbsload.c +@@ -279,13 +279,3 @@ _nl_cleanup_ctype (struct __locale_data *locale) + free ((char *) data); + } + } +- +-/* Free the specified conversion functions (but not CONV itself). */ +-void +-__wcsmbs_close_conv (struct gconv_fcts *conv) +-{ +- if (conv->towc != &to_wc) +- __gconv_close_transform (conv->towc, conv->towc_nsteps); +- if (conv->tomb != &to_mb) +- __gconv_close_transform (conv->tomb, conv->tomb_nsteps); +-} +diff --git a/wcsmbs/wcsmbsload.h b/wcsmbs/wcsmbsload.h +index c2fffbd914f663e6..6ccad4b3ba62b500 100644 +--- a/wcsmbs/wcsmbsload.h ++++ b/wcsmbs/wcsmbsload.h +@@ -51,7 +51,6 @@ extern int __wcsmbs_named_conv (struct gconv_fcts *copy, const char *name) + /* Function used for the `private.cleanup' hook. */ + extern void _nl_cleanup_ctype (struct __locale_data *) attribute_hidden; + +-extern void __wcsmbs_close_conv (struct gconv_fcts *conv) attribute_hidden; + + #include + diff --git a/glibc.spec b/glibc.spec index ec4ce29..e77fda0 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 33%{?dist} +Release: 34%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -159,6 +159,7 @@ Patch28: glibc-rh1615608.patch # In progress upstream submission for nscd.conf changes: # https://www.sourceware.org/ml/libc-alpha/2019-03/msg00436.html Patch31: glibc-fedora-nscd-warnings.patch +Patch32: glibc-rh1732406.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2015,6 +2016,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Tue Jul 23 2019 Florian Weimer - 2.29.9000-34 +- Revert libio change that causes crashes (#1732406) + * Mon Jul 22 2019 DJ Delorie - 2.29.9000-33 - Auto-sync with upstream branch master, commit dcf36bcad3f283f77893d3b157ef7bb2c99419f2. From 6144405435800b483f02ea08133a786c706eac92 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 03:41:31 +0000 Subject: [PATCH 45/50] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- glibc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index e77fda0..f49ddb2 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 34%{?dist} +Release: 35%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -2016,6 +2016,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Thu Jul 25 2019 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Tue Jul 23 2019 Florian Weimer - 2.29.9000-34 - Revert libio change that causes crashes (#1732406) From b3c6eb0e4cfd2a5f8c809a2cc2dca961d1145f29 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 30 Jul 2019 11:05:22 +0200 Subject: [PATCH 46/50] Auto-sync with upstream branch master Upstream commit: 8a814e20d443adc460a1030fa1a66aa9ae817483 - Drop glibc-rh1732406.patch, fix for the regression applied upstream. - nptl: Use uintptr_t for address diagnostic in nptl/tst-pthread-getattr - Linux: Move getdents64 to - test-container: Install with $(sorted-subdirs) (swbz#24794) - gconv: Check reference count in __gconv_release_cache (#1732406) - x86-64: Compile branred.c with -mprefer-vector-width=128 (swbz#24603) - build-many-glibcs.py: Use Linux 5.2 by default - Linux: Use in-tree copy of SO_ constants for !__USE_MISC (swbz#24532) - test-container: Avoid copying unintended system libraries --- glibc-rh1732406.patch | 231 ------------------------------------------ glibc.spec | 18 +++- sources | 2 +- 3 files changed, 16 insertions(+), 235 deletions(-) delete mode 100644 glibc-rh1732406.patch diff --git a/glibc-rh1732406.patch b/glibc-rh1732406.patch deleted file mode 100644 index 37a1bc5..0000000 --- a/glibc-rh1732406.patch +++ /dev/null @@ -1,231 +0,0 @@ -Revert "libio: Fix gconv-related memory leak [BZ #24583]" - -This reverts commit 7e740ab2e7be7d83b75513aa406e0b10875f7f9c. - -It causes a regression: - -https://sourceware.org/bugzilla/show_bug.cgi?id=24677 - -diff --git a/libio/Makefile b/libio/Makefile -index 6e594b8ec5fbca94..66ffab43201638ef 100644 ---- a/libio/Makefile -+++ b/libio/Makefile -@@ -66,11 +66,7 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ - tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \ - tst-ftell-append tst-fputws tst-bz22415 tst-fgetc-after-eof \ - tst-sprintf-ub tst-sprintf-chk-ub tst-bz24051 tst-bz24153 \ -- tst-wfile-sync tst-wfile-gconv -- --# This test tests interaction with the gconv cache. Setting --# GCONV_CACHE during out-of-container testing disables the cache. --tests-container += tst-wfile-ascii -+ tst-wfile-sync - - tests-internal = tst-vtables tst-vtables-interposed tst-readline - -@@ -173,12 +169,10 @@ test-fmemopen-ENV = MALLOC_TRACE=$(objpfx)test-fmemopen.mtrace - tst-fopenloc-ENV = MALLOC_TRACE=$(objpfx)tst-fopenloc.mtrace - tst-bz22415-ENV = MALLOC_TRACE=$(objpfx)tst-bz22415.mtrace - tst-bz24228-ENV = MALLOC_TRACE=$(objpfx)tst-bz24228.mtrace --tst-wfile-gconv-ENV = MALLOC_TRACE=$(objpfx)tst-wfile-gconv.mtrace - - generated += test-fmemopen.mtrace test-fmemopen.check - generated += tst-fopenloc.mtrace tst-fopenloc.check - generated += tst-bz22415.mtrace tst-bz22415.check --generated += tst-wfile-gconv.mtrace tst-wfile-gconv.check - - aux := fileops genops stdfiles stdio strops - -@@ -194,8 +188,7 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \ - - ifeq ($(run-built-tests),yes) - tests-special += $(objpfx)test-freopen.out $(objpfx)test-fmemopen-mem.out \ -- $(objpfx)tst-bz22415-mem.out \ -- $(objpfx)tst-wfile-gconv-mem.out -+ $(objpfx)tst-bz22415-mem.out - ifeq (yes,$(build-shared)) - # Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared - # library is enabled since they depend on tst-fopenloc.out. -@@ -229,7 +222,6 @@ $(objpfx)tst-ungetwc2.out: $(gen-locales) - $(objpfx)tst-widetext.out: $(gen-locales) - $(objpfx)tst_wprintf2.out: $(gen-locales) - $(objpfx)tst-wfile-sync.out: $(gen-locales) --$(objpfx)tst-wfile-gconv.out: $(gen-locales) - endif - - $(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen -@@ -258,6 +250,3 @@ $(objpfx)tst-bz24228-mem.out: $(objpfx)tst-bz24228.out - $(common-objpfx)malloc/mtrace $(objpfx)tst-bz24228.mtrace > $@; \ - $(evaluate-test) - --$(objpfx)tst-wfile-gconv-mem.out: $(objpfx)tst-wfile-gconv.out -- $(common-objpfx)malloc/mtrace $(objpfx)tst-wfile-gconv.mtrace > $@; \ -- $(evaluate-test) -diff --git a/libio/iofclose.c b/libio/iofclose.c -index c03c6cf57cafd2bb..8a80dd0b78a50fce 100644 ---- a/libio/iofclose.c -+++ b/libio/iofclose.c -@@ -26,8 +26,8 @@ - - #include "libioP.h" - #include -+#include "../iconv/gconv_int.h" - #include --#include - - int - _IO_new_fclose (FILE *fp) -@@ -60,14 +60,11 @@ _IO_new_fclose (FILE *fp) - /* This stream has a wide orientation. This means we have to free - the conversion functions. */ - struct _IO_codecvt *cc = fp->_codecvt; -- struct gconv_fcts conv = -- { -- .towc = cc->__cd_in.__cd.__steps, -- .towc_nsteps = cc->__cd_in.__cd.__nsteps, -- .tomb = cc->__cd_out.__cd.__steps, -- .tomb_nsteps = cc->__cd_out.__cd.__nsteps, -- }; -- __wcsmbs_close_conv (&conv); -+ -+ __libc_lock_lock (__gconv_lock); -+ __gconv_release_step (cc->__cd_in.__cd.__steps); -+ __gconv_release_step (cc->__cd_out.__cd.__steps); -+ __libc_lock_unlock (__gconv_lock); - } - else - { -diff --git a/libio/tst-wfile-ascii.c b/libio/tst-wfile-ascii.c -deleted file mode 100644 -index 7514289a7bb79339..0000000000000000 ---- a/libio/tst-wfile-ascii.c -+++ /dev/null -@@ -1,56 +0,0 @@ --/* Test ASCII gconv module followed by cache initialization. -- Copyright (C) 2019 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 --#include -- --static int --do_test (void) --{ -- /* The test-in-container framework sets these environment variables. -- The presence of GCONV_PATH invalidates this test. */ -- unsetenv ("GCONV_PATH"); -- unsetenv ("LOCPATH"); -- -- /* Create the gconv module cache. iconvconfig is in /sbin, which is -- not on PATH. */ -- { -- char *iconvconfig = xasprintf ("%s/iconvconfig", support_sbindir_prefix); -- TEST_COMPARE (system (iconvconfig), 0); -- } -- -- /* Use built-in ASCII gconv module, without triggering cache -- initialization. */ -- FILE *fp1 = xfopen ("/dev/zero", "r"); -- TEST_COMPARE (fwide (fp1, 1), 1); -- -- /* Use non-ASCII gconv module and trigger gconv cache -- initialization. */ -- FILE *fp2 = xfopen ("/dev/zero", "r,ccs=UTF-8"); -- TEST_COMPARE (fwide (fp2, 0), 1); -- -- xfclose (fp1); -- xfclose (fp2); -- -- return 0; --} -- --#include -diff --git a/libio/tst-wfile-gconv.c b/libio/tst-wfile-gconv.c -deleted file mode 100644 -index de603b32d2a1a58b..0000000000000000 ---- a/libio/tst-wfile-gconv.c -+++ /dev/null -@@ -1,36 +0,0 @@ --/* Test that non-built-in gconv modules do not cause memory leak (bug 24583). -- Copyright (C) 2019 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 -- --static int --do_test (void) --{ -- mtrace (); -- -- TEST_VERIFY_EXIT (setlocale (LC_ALL, "ja_JP.EUC-JP") != NULL); -- xfclose (xfopen ("/etc/passwd", "r,ccs=UTF-8")); -- xfclose (xfopen ("/etc/passwd", "r")); -- -- return 0; --} -- --#include -diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c -index 840d4abc440e1076..6648365d822bc167 100644 ---- a/wcsmbs/wcsmbsload.c -+++ b/wcsmbs/wcsmbsload.c -@@ -279,13 +279,3 @@ _nl_cleanup_ctype (struct __locale_data *locale) - free ((char *) data); - } - } -- --/* Free the specified conversion functions (but not CONV itself). */ --void --__wcsmbs_close_conv (struct gconv_fcts *conv) --{ -- if (conv->towc != &to_wc) -- __gconv_close_transform (conv->towc, conv->towc_nsteps); -- if (conv->tomb != &to_mb) -- __gconv_close_transform (conv->tomb, conv->tomb_nsteps); --} -diff --git a/wcsmbs/wcsmbsload.h b/wcsmbs/wcsmbsload.h -index c2fffbd914f663e6..6ccad4b3ba62b500 100644 ---- a/wcsmbs/wcsmbsload.h -+++ b/wcsmbs/wcsmbsload.h -@@ -51,7 +51,6 @@ extern int __wcsmbs_named_conv (struct gconv_fcts *copy, const char *name) - /* Function used for the `private.cleanup' hook. */ - extern void _nl_cleanup_ctype (struct __locale_data *) attribute_hidden; - --extern void __wcsmbs_close_conv (struct gconv_fcts *conv) attribute_hidden; - - #include - diff --git a/glibc.spec b/glibc.spec index f49ddb2..d1177eb 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.29.9000-402-gdcf36bcad3 +%define glibcsrcdir glibc-2.29.9000-411-g8a814e20d4 %define glibcversion 2.29.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 35%{?dist} +Release: 36%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -159,7 +159,6 @@ Patch28: glibc-rh1615608.patch # In progress upstream submission for nscd.conf changes: # https://www.sourceware.org/ml/libc-alpha/2019-03/msg00436.html Patch31: glibc-fedora-nscd-warnings.patch -Patch32: glibc-rh1732406.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2016,6 +2015,19 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Tue Jul 30 2019 Florian Weimer - 2.29.9000-36 +- Drop glibc-rh1732406.patch, fix for the regression applied upstream. +- Auto-sync with upstream branch master, + commit 8a814e20d443adc460a1030fa1a66aa9ae817483: +- nptl: Use uintptr_t for address diagnostic in nptl/tst-pthread-getattr +- Linux: Move getdents64 to +- test-container: Install with $(sorted-subdirs) (swbz#24794) +- gconv: Check reference count in __gconv_release_cache (#1732406) +- x86-64: Compile branred.c with -mprefer-vector-width=128 (swbz#24603) +- build-many-glibcs.py: Use Linux 5.2 by default +- Linux: Use in-tree copy of SO_ constants for !__USE_MISC (swbz#24532) +- test-container: Avoid copying unintended system libraries + * Thu Jul 25 2019 Fedora Release Engineering - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 137c890..5d4c6f9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-402-gdcf36bcad3.tar.xz) = f61e3755b54ab50c2be711c2b74773b8e76df336be975881e4201ca04866d721c756b93ff3b420a1c5bb9173d7748d545cb4f37c7f913c73cd14d48fa75d7671 +SHA512 (glibc-2.29.9000-411-g8a814e20d4.tar.xz) = b9ae6b07270121f77a5350ee6b848499239289aaa93b552e87b6e2eaf165e6042880ae096b3093bcc571fa265756014a4420f09793a1121c588aae85dff5e38e From a4d24cbe4552a79c9f854fc308bb01afcd7f5b8e Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 31 Jul 2019 11:53:38 +0200 Subject: [PATCH 47/50] Fix memory leak in iconv_open (#1734680) --- glibc-rh1734680.patch | 279 ++++++++++++++++++++++++++++++++++++++++++ glibc.spec | 7 +- 2 files changed, 285 insertions(+), 1 deletion(-) create mode 100644 glibc-rh1734680.patch diff --git a/glibc-rh1734680.patch b/glibc-rh1734680.patch new file mode 100644 index 0000000..c4b5137 --- /dev/null +++ b/glibc-rh1734680.patch @@ -0,0 +1,279 @@ +iconv: Revert steps array reference counting changes + +The changes introduce a memory leak for gconv steps arrays whose +first element is an internal conversion, which has a fixed +reference count which is not decremented. As a result, after the +change in commit 50ce3eae5ba304650459d4441d7d246a7cefc26f, the steps +array is never freed, resulting in an unbounded memory leak. + +This reverts commit 50ce3eae5ba304650459d4441d7d246a7cefc26f +("gconv: Check reference count in __gconv_release_cache +[BZ #24677]") and commit 7e740ab2e7be7d83b75513aa406e0b10875f7f9c +("libio: Fix gconv-related memory leak [BZ #24583]"). It +reintroduces bug 24583. (Bug 24677 was just a regression caused by +the second commit.) + +2019-07-31 Florian Weimer + + [BZ #24583] + [BZ #24677] + iconv, libio: Revert reference counting changes. + * iconv/gconv_cache.c (__gconv_release_cache): Unconditionally + free the steps array. + * libio/Makefile (tests): Remove tst-wfile-gconv. + (tests-container): Do not add tst-wfile-ascii. + (tst-wfile-gconv-ENV): Do not set. + (generated): Do not add tst-wfile-gconv.mtrace, + tst-wfile-gconv.check. + [($run-built-tests)] (tests-special): Do not add + tst-wfile-gconv-mem.out. + (tst-wfile-gconv.out, tst-wfile-gconv-mem.out): Remove targets. + * libio/iofclose.c (_IO_new_fclose): Call __gconv_release_step + instead of __wcsmbs_clone_conv. + * wcsmbs/wcsmbsload.c (__wcsmbs_clone_conv): Remove definition. + * wcsmbs/wcsmbsload.h (__wcsmbs_clone_conv): Remove declaration. + +diff --git a/iconv/gconv_cache.c b/iconv/gconv_cache.c +index 4db7287cee..9a456bf825 100644 +--- a/iconv/gconv_cache.c ++++ b/iconv/gconv_cache.c +@@ -446,12 +446,9 @@ __gconv_lookup_cache (const char *toset, const char *fromset, + void + __gconv_release_cache (struct __gconv_step *steps, size_t nsteps) + { +- /* The only thing we have to deallocate is the record with the +- steps. But do not do this if the reference counter is still +- positive. This can happen if the steps array was cloned by +- __wcsmbs_clone_conv. (The array elements have separate __counter +- fields, but they are only out of sync temporarily.) */ +- if (gconv_cache != NULL && steps->__counter == 0) ++ if (gconv_cache != NULL) ++ /* The only thing we have to deallocate is the record with the ++ steps. */ + free (steps); + } + +diff --git a/libio/Makefile b/libio/Makefile +index 6e594b8ec5..4a3637f046 100644 +--- a/libio/Makefile ++++ b/libio/Makefile +@@ -66,11 +66,7 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ + tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \ + tst-ftell-append tst-fputws tst-bz22415 tst-fgetc-after-eof \ + tst-sprintf-ub tst-sprintf-chk-ub tst-bz24051 tst-bz24153 \ +- tst-wfile-sync tst-wfile-gconv +- +-# This test tests interaction with the gconv cache. Setting +-# GCONV_CACHE during out-of-container testing disables the cache. +-tests-container += tst-wfile-ascii ++ tst-wfile-sync + + tests-internal = tst-vtables tst-vtables-interposed tst-readline + +@@ -173,12 +169,10 @@ test-fmemopen-ENV = MALLOC_TRACE=$(objpfx)test-fmemopen.mtrace + tst-fopenloc-ENV = MALLOC_TRACE=$(objpfx)tst-fopenloc.mtrace + tst-bz22415-ENV = MALLOC_TRACE=$(objpfx)tst-bz22415.mtrace + tst-bz24228-ENV = MALLOC_TRACE=$(objpfx)tst-bz24228.mtrace +-tst-wfile-gconv-ENV = MALLOC_TRACE=$(objpfx)tst-wfile-gconv.mtrace + + generated += test-fmemopen.mtrace test-fmemopen.check + generated += tst-fopenloc.mtrace tst-fopenloc.check + generated += tst-bz22415.mtrace tst-bz22415.check +-generated += tst-wfile-gconv.mtrace tst-wfile-gconv.check + + aux := fileops genops stdfiles stdio strops + +@@ -194,8 +188,7 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \ + + ifeq ($(run-built-tests),yes) + tests-special += $(objpfx)test-freopen.out $(objpfx)test-fmemopen-mem.out \ +- $(objpfx)tst-bz22415-mem.out \ +- $(objpfx)tst-wfile-gconv-mem.out ++ $(objpfx)tst-bz22415-mem.out + ifeq (yes,$(build-shared)) + # Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared + # library is enabled since they depend on tst-fopenloc.out. +@@ -229,7 +222,6 @@ $(objpfx)tst-ungetwc2.out: $(gen-locales) + $(objpfx)tst-widetext.out: $(gen-locales) + $(objpfx)tst_wprintf2.out: $(gen-locales) + $(objpfx)tst-wfile-sync.out: $(gen-locales) +-$(objpfx)tst-wfile-gconv.out: $(gen-locales) + endif + + $(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen +@@ -257,7 +249,3 @@ $(objpfx)tst-bz22415-mem.out: $(objpfx)tst-bz22415.out + $(objpfx)tst-bz24228-mem.out: $(objpfx)tst-bz24228.out + $(common-objpfx)malloc/mtrace $(objpfx)tst-bz24228.mtrace > $@; \ + $(evaluate-test) +- +-$(objpfx)tst-wfile-gconv-mem.out: $(objpfx)tst-wfile-gconv.out +- $(common-objpfx)malloc/mtrace $(objpfx)tst-wfile-gconv.mtrace > $@; \ +- $(evaluate-test) +diff --git a/libio/iofclose.c b/libio/iofclose.c +index c03c6cf57c..8a80dd0b78 100644 +--- a/libio/iofclose.c ++++ b/libio/iofclose.c +@@ -26,8 +26,8 @@ + + #include "libioP.h" + #include ++#include "../iconv/gconv_int.h" + #include +-#include + + int + _IO_new_fclose (FILE *fp) +@@ -60,14 +60,11 @@ _IO_new_fclose (FILE *fp) + /* This stream has a wide orientation. This means we have to free + the conversion functions. */ + struct _IO_codecvt *cc = fp->_codecvt; +- struct gconv_fcts conv = +- { +- .towc = cc->__cd_in.__cd.__steps, +- .towc_nsteps = cc->__cd_in.__cd.__nsteps, +- .tomb = cc->__cd_out.__cd.__steps, +- .tomb_nsteps = cc->__cd_out.__cd.__nsteps, +- }; +- __wcsmbs_close_conv (&conv); ++ ++ __libc_lock_lock (__gconv_lock); ++ __gconv_release_step (cc->__cd_in.__cd.__steps); ++ __gconv_release_step (cc->__cd_out.__cd.__steps); ++ __libc_lock_unlock (__gconv_lock); + } + else + { +diff --git a/libio/tst-wfile-ascii.c b/libio/tst-wfile-ascii.c +deleted file mode 100644 +index 7514289a7b..0000000000 +--- a/libio/tst-wfile-ascii.c ++++ /dev/null +@@ -1,56 +0,0 @@ +-/* Test ASCII gconv module followed by cache initialization. +- Copyright (C) 2019 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 +-#include +- +-static int +-do_test (void) +-{ +- /* The test-in-container framework sets these environment variables. +- The presence of GCONV_PATH invalidates this test. */ +- unsetenv ("GCONV_PATH"); +- unsetenv ("LOCPATH"); +- +- /* Create the gconv module cache. iconvconfig is in /sbin, which is +- not on PATH. */ +- { +- char *iconvconfig = xasprintf ("%s/iconvconfig", support_sbindir_prefix); +- TEST_COMPARE (system (iconvconfig), 0); +- } +- +- /* Use built-in ASCII gconv module, without triggering cache +- initialization. */ +- FILE *fp1 = xfopen ("/dev/zero", "r"); +- TEST_COMPARE (fwide (fp1, 1), 1); +- +- /* Use non-ASCII gconv module and trigger gconv cache +- initialization. */ +- FILE *fp2 = xfopen ("/dev/zero", "r,ccs=UTF-8"); +- TEST_COMPARE (fwide (fp2, 0), 1); +- +- xfclose (fp1); +- xfclose (fp2); +- +- return 0; +-} +- +-#include +diff --git a/libio/tst-wfile-gconv.c b/libio/tst-wfile-gconv.c +deleted file mode 100644 +index de603b32d2..0000000000 +--- a/libio/tst-wfile-gconv.c ++++ /dev/null +@@ -1,36 +0,0 @@ +-/* Test that non-built-in gconv modules do not cause memory leak (bug 24583). +- Copyright (C) 2019 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 +- +-static int +-do_test (void) +-{ +- mtrace (); +- +- TEST_VERIFY_EXIT (setlocale (LC_ALL, "ja_JP.EUC-JP") != NULL); +- xfclose (xfopen ("/etc/passwd", "r,ccs=UTF-8")); +- xfclose (xfopen ("/etc/passwd", "r")); +- +- return 0; +-} +- +-#include +diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c +index 840d4abc44..6648365d82 100644 +--- a/wcsmbs/wcsmbsload.c ++++ b/wcsmbs/wcsmbsload.c +@@ -279,13 +279,3 @@ _nl_cleanup_ctype (struct __locale_data *locale) + free ((char *) data); + } + } +- +-/* Free the specified conversion functions (but not CONV itself). */ +-void +-__wcsmbs_close_conv (struct gconv_fcts *conv) +-{ +- if (conv->towc != &to_wc) +- __gconv_close_transform (conv->towc, conv->towc_nsteps); +- if (conv->tomb != &to_mb) +- __gconv_close_transform (conv->tomb, conv->tomb_nsteps); +-} +diff --git a/wcsmbs/wcsmbsload.h b/wcsmbs/wcsmbsload.h +index c2fffbd914..6ccad4b3ba 100644 +--- a/wcsmbs/wcsmbsload.h ++++ b/wcsmbs/wcsmbsload.h +@@ -51,7 +51,6 @@ extern int __wcsmbs_named_conv (struct gconv_fcts *copy, const char *name) + /* Function used for the `private.cleanup' hook. */ + extern void _nl_cleanup_ctype (struct __locale_data *) attribute_hidden; + +-extern void __wcsmbs_close_conv (struct gconv_fcts *conv) attribute_hidden; + + #include + diff --git a/glibc.spec b/glibc.spec index d1177eb..44db764 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 36%{?dist} +Release: 37%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -160,6 +160,8 @@ Patch28: glibc-rh1615608.patch # https://www.sourceware.org/ml/libc-alpha/2019-03/msg00436.html Patch31: glibc-fedora-nscd-warnings.patch +Patch32: glibc-rh1734680.patch + ############################################################################## # Continued list of core "glibc" package information: ############################################################################## @@ -2015,6 +2017,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Wed Jul 31 2019 Florian Weimer - 2.29.9000-37 +- Fix memory leak in iconv_open (#1734680) + * Tue Jul 30 2019 Florian Weimer - 2.29.9000-36 - Drop glibc-rh1732406.patch, fix for the regression applied upstream. - Auto-sync with upstream branch master, From 1ff5b17afe1841482ef15ce32abeb8d8239a1beb Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 2 Aug 2019 14:16:34 +0200 Subject: [PATCH 48/50] Auto-sync with upstream branch release/2.30/master Upstream commit: be9a328c93834648e0bec106a1f86357d1a8c7e1 - malloc: Remove unwanted leading whitespace in malloc_info (swbz#24867) - glibc 2.30 release - iconv: Revert steps array reference counting changes (#1734680) - Restore r31 setting in powerpc32 swapcontext --- glibc-rh1734680.patch | 279 ------------------------------------------ glibc.spec | 16 ++- sources | 2 +- 3 files changed, 13 insertions(+), 284 deletions(-) delete mode 100644 glibc-rh1734680.patch diff --git a/glibc-rh1734680.patch b/glibc-rh1734680.patch deleted file mode 100644 index c4b5137..0000000 --- a/glibc-rh1734680.patch +++ /dev/null @@ -1,279 +0,0 @@ -iconv: Revert steps array reference counting changes - -The changes introduce a memory leak for gconv steps arrays whose -first element is an internal conversion, which has a fixed -reference count which is not decremented. As a result, after the -change in commit 50ce3eae5ba304650459d4441d7d246a7cefc26f, the steps -array is never freed, resulting in an unbounded memory leak. - -This reverts commit 50ce3eae5ba304650459d4441d7d246a7cefc26f -("gconv: Check reference count in __gconv_release_cache -[BZ #24677]") and commit 7e740ab2e7be7d83b75513aa406e0b10875f7f9c -("libio: Fix gconv-related memory leak [BZ #24583]"). It -reintroduces bug 24583. (Bug 24677 was just a regression caused by -the second commit.) - -2019-07-31 Florian Weimer - - [BZ #24583] - [BZ #24677] - iconv, libio: Revert reference counting changes. - * iconv/gconv_cache.c (__gconv_release_cache): Unconditionally - free the steps array. - * libio/Makefile (tests): Remove tst-wfile-gconv. - (tests-container): Do not add tst-wfile-ascii. - (tst-wfile-gconv-ENV): Do not set. - (generated): Do not add tst-wfile-gconv.mtrace, - tst-wfile-gconv.check. - [($run-built-tests)] (tests-special): Do not add - tst-wfile-gconv-mem.out. - (tst-wfile-gconv.out, tst-wfile-gconv-mem.out): Remove targets. - * libio/iofclose.c (_IO_new_fclose): Call __gconv_release_step - instead of __wcsmbs_clone_conv. - * wcsmbs/wcsmbsload.c (__wcsmbs_clone_conv): Remove definition. - * wcsmbs/wcsmbsload.h (__wcsmbs_clone_conv): Remove declaration. - -diff --git a/iconv/gconv_cache.c b/iconv/gconv_cache.c -index 4db7287cee..9a456bf825 100644 ---- a/iconv/gconv_cache.c -+++ b/iconv/gconv_cache.c -@@ -446,12 +446,9 @@ __gconv_lookup_cache (const char *toset, const char *fromset, - void - __gconv_release_cache (struct __gconv_step *steps, size_t nsteps) - { -- /* The only thing we have to deallocate is the record with the -- steps. But do not do this if the reference counter is still -- positive. This can happen if the steps array was cloned by -- __wcsmbs_clone_conv. (The array elements have separate __counter -- fields, but they are only out of sync temporarily.) */ -- if (gconv_cache != NULL && steps->__counter == 0) -+ if (gconv_cache != NULL) -+ /* The only thing we have to deallocate is the record with the -+ steps. */ - free (steps); - } - -diff --git a/libio/Makefile b/libio/Makefile -index 6e594b8ec5..4a3637f046 100644 ---- a/libio/Makefile -+++ b/libio/Makefile -@@ -66,11 +66,7 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ - tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \ - tst-ftell-append tst-fputws tst-bz22415 tst-fgetc-after-eof \ - tst-sprintf-ub tst-sprintf-chk-ub tst-bz24051 tst-bz24153 \ -- tst-wfile-sync tst-wfile-gconv -- --# This test tests interaction with the gconv cache. Setting --# GCONV_CACHE during out-of-container testing disables the cache. --tests-container += tst-wfile-ascii -+ tst-wfile-sync - - tests-internal = tst-vtables tst-vtables-interposed tst-readline - -@@ -173,12 +169,10 @@ test-fmemopen-ENV = MALLOC_TRACE=$(objpfx)test-fmemopen.mtrace - tst-fopenloc-ENV = MALLOC_TRACE=$(objpfx)tst-fopenloc.mtrace - tst-bz22415-ENV = MALLOC_TRACE=$(objpfx)tst-bz22415.mtrace - tst-bz24228-ENV = MALLOC_TRACE=$(objpfx)tst-bz24228.mtrace --tst-wfile-gconv-ENV = MALLOC_TRACE=$(objpfx)tst-wfile-gconv.mtrace - - generated += test-fmemopen.mtrace test-fmemopen.check - generated += tst-fopenloc.mtrace tst-fopenloc.check - generated += tst-bz22415.mtrace tst-bz22415.check --generated += tst-wfile-gconv.mtrace tst-wfile-gconv.check - - aux := fileops genops stdfiles stdio strops - -@@ -194,8 +188,7 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \ - - ifeq ($(run-built-tests),yes) - tests-special += $(objpfx)test-freopen.out $(objpfx)test-fmemopen-mem.out \ -- $(objpfx)tst-bz22415-mem.out \ -- $(objpfx)tst-wfile-gconv-mem.out -+ $(objpfx)tst-bz22415-mem.out - ifeq (yes,$(build-shared)) - # Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared - # library is enabled since they depend on tst-fopenloc.out. -@@ -229,7 +222,6 @@ $(objpfx)tst-ungetwc2.out: $(gen-locales) - $(objpfx)tst-widetext.out: $(gen-locales) - $(objpfx)tst_wprintf2.out: $(gen-locales) - $(objpfx)tst-wfile-sync.out: $(gen-locales) --$(objpfx)tst-wfile-gconv.out: $(gen-locales) - endif - - $(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen -@@ -257,7 +249,3 @@ $(objpfx)tst-bz22415-mem.out: $(objpfx)tst-bz22415.out - $(objpfx)tst-bz24228-mem.out: $(objpfx)tst-bz24228.out - $(common-objpfx)malloc/mtrace $(objpfx)tst-bz24228.mtrace > $@; \ - $(evaluate-test) -- --$(objpfx)tst-wfile-gconv-mem.out: $(objpfx)tst-wfile-gconv.out -- $(common-objpfx)malloc/mtrace $(objpfx)tst-wfile-gconv.mtrace > $@; \ -- $(evaluate-test) -diff --git a/libio/iofclose.c b/libio/iofclose.c -index c03c6cf57c..8a80dd0b78 100644 ---- a/libio/iofclose.c -+++ b/libio/iofclose.c -@@ -26,8 +26,8 @@ - - #include "libioP.h" - #include -+#include "../iconv/gconv_int.h" - #include --#include - - int - _IO_new_fclose (FILE *fp) -@@ -60,14 +60,11 @@ _IO_new_fclose (FILE *fp) - /* This stream has a wide orientation. This means we have to free - the conversion functions. */ - struct _IO_codecvt *cc = fp->_codecvt; -- struct gconv_fcts conv = -- { -- .towc = cc->__cd_in.__cd.__steps, -- .towc_nsteps = cc->__cd_in.__cd.__nsteps, -- .tomb = cc->__cd_out.__cd.__steps, -- .tomb_nsteps = cc->__cd_out.__cd.__nsteps, -- }; -- __wcsmbs_close_conv (&conv); -+ -+ __libc_lock_lock (__gconv_lock); -+ __gconv_release_step (cc->__cd_in.__cd.__steps); -+ __gconv_release_step (cc->__cd_out.__cd.__steps); -+ __libc_lock_unlock (__gconv_lock); - } - else - { -diff --git a/libio/tst-wfile-ascii.c b/libio/tst-wfile-ascii.c -deleted file mode 100644 -index 7514289a7b..0000000000 ---- a/libio/tst-wfile-ascii.c -+++ /dev/null -@@ -1,56 +0,0 @@ --/* Test ASCII gconv module followed by cache initialization. -- Copyright (C) 2019 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 --#include -- --static int --do_test (void) --{ -- /* The test-in-container framework sets these environment variables. -- The presence of GCONV_PATH invalidates this test. */ -- unsetenv ("GCONV_PATH"); -- unsetenv ("LOCPATH"); -- -- /* Create the gconv module cache. iconvconfig is in /sbin, which is -- not on PATH. */ -- { -- char *iconvconfig = xasprintf ("%s/iconvconfig", support_sbindir_prefix); -- TEST_COMPARE (system (iconvconfig), 0); -- } -- -- /* Use built-in ASCII gconv module, without triggering cache -- initialization. */ -- FILE *fp1 = xfopen ("/dev/zero", "r"); -- TEST_COMPARE (fwide (fp1, 1), 1); -- -- /* Use non-ASCII gconv module and trigger gconv cache -- initialization. */ -- FILE *fp2 = xfopen ("/dev/zero", "r,ccs=UTF-8"); -- TEST_COMPARE (fwide (fp2, 0), 1); -- -- xfclose (fp1); -- xfclose (fp2); -- -- return 0; --} -- --#include -diff --git a/libio/tst-wfile-gconv.c b/libio/tst-wfile-gconv.c -deleted file mode 100644 -index de603b32d2..0000000000 ---- a/libio/tst-wfile-gconv.c -+++ /dev/null -@@ -1,36 +0,0 @@ --/* Test that non-built-in gconv modules do not cause memory leak (bug 24583). -- Copyright (C) 2019 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 -- --static int --do_test (void) --{ -- mtrace (); -- -- TEST_VERIFY_EXIT (setlocale (LC_ALL, "ja_JP.EUC-JP") != NULL); -- xfclose (xfopen ("/etc/passwd", "r,ccs=UTF-8")); -- xfclose (xfopen ("/etc/passwd", "r")); -- -- return 0; --} -- --#include -diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c -index 840d4abc44..6648365d82 100644 ---- a/wcsmbs/wcsmbsload.c -+++ b/wcsmbs/wcsmbsload.c -@@ -279,13 +279,3 @@ _nl_cleanup_ctype (struct __locale_data *locale) - free ((char *) data); - } - } -- --/* Free the specified conversion functions (but not CONV itself). */ --void --__wcsmbs_close_conv (struct gconv_fcts *conv) --{ -- if (conv->towc != &to_wc) -- __gconv_close_transform (conv->towc, conv->towc_nsteps); -- if (conv->tomb != &to_mb) -- __gconv_close_transform (conv->tomb, conv->tomb_nsteps); --} -diff --git a/wcsmbs/wcsmbsload.h b/wcsmbs/wcsmbsload.h -index c2fffbd914..6ccad4b3ba 100644 ---- a/wcsmbs/wcsmbsload.h -+++ b/wcsmbs/wcsmbsload.h -@@ -51,7 +51,6 @@ extern int __wcsmbs_named_conv (struct gconv_fcts *copy, const char *name) - /* Function used for the `private.cleanup' hook. */ - extern void _nl_cleanup_ctype (struct __locale_data *) attribute_hidden; - --extern void __wcsmbs_close_conv (struct gconv_fcts *conv) attribute_hidden; - - #include - diff --git a/glibc.spec b/glibc.spec index 44db764..ca842c0 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,5 +1,5 @@ -%define glibcsrcdir glibc-2.29.9000-411-g8a814e20d4 -%define glibcversion 2.29.9000 +%define glibcsrcdir glibc-2.30-1-gbe9a328c93 +%define glibcversion 2.30 # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 37%{?dist} +Release: 38%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -160,7 +160,6 @@ Patch28: glibc-rh1615608.patch # https://www.sourceware.org/ml/libc-alpha/2019-03/msg00436.html Patch31: glibc-fedora-nscd-warnings.patch -Patch32: glibc-rh1734680.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2017,6 +2016,15 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Fri Aug 02 2019 Florian Weimer - 2.29.9000-38 +- Drop glibc-rh1734680.patch, applied upstream. +- Auto-sync with upstream branch release/2.30/master, + commit be9a328c93834648e0bec106a1f86357d1a8c7e1: +- malloc: Remove unwanted leading whitespace in malloc_info (swbz#24867) +- glibc 2.30 release +- iconv: Revert steps array reference counting changes (#1734680) +- Restore r31 setting in powerpc32 swapcontext + * Wed Jul 31 2019 Florian Weimer - 2.29.9000-37 - Fix memory leak in iconv_open (#1734680) diff --git a/sources b/sources index 5d4c6f9..46dc6dd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.29.9000-411-g8a814e20d4.tar.xz) = b9ae6b07270121f77a5350ee6b848499239289aaa93b552e87b6e2eaf165e6042880ae096b3093bcc571fa265756014a4420f09793a1121c588aae85dff5e38e +SHA512 (glibc-2.30-1-gbe9a328c93.tar.xz) = ad471d2b9d81a12e36e100a18685fe1de3461a372151506b8021f52aeb7180727f807044b9cbdbda61911f2ed48192c906f743c46677fc55e608530b8bb856d0 From 525a40ce11d4b3c028d8dce96df51327c75bd5c2 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 2 Aug 2019 14:23:17 +0200 Subject: [PATCH 49/50] Lower the release number to 1 --- glibc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index ca842c0..b2b90b4 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 38%{?dist} +Release: 1%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. From 293db26d857ebdef0ceeea5da44f166d91d0e5fb Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 2 Aug 2019 14:24:18 +0200 Subject: [PATCH 50/50] Fix changelog version --- glibc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index b2b90b4..b20269d 100644 --- a/glibc.spec +++ b/glibc.spec @@ -2016,7 +2016,7 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog -* Fri Aug 02 2019 Florian Weimer - 2.29.9000-38 +* Fri Aug 02 2019 Florian Weimer - 2.30-1 - Drop glibc-rh1734680.patch, applied upstream. - Auto-sync with upstream branch release/2.30/master, commit be9a328c93834648e0bec106a1f86357d1a8c7e1: