From de873f1d0a235dd91c7dc26b065b8a44561ff10c Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 2 Aug 2021 17:41:24 +0200 Subject: [PATCH] Import glibc-2.34-1.fc35 from rawhide (#1988950) Resolves: #1988950 --- glibc.spec | 113 +++++++++++++++++++++++++++++++---------------------- sources | 2 +- 2 files changed, 67 insertions(+), 48 deletions(-) diff --git a/glibc.spec b/glibc.spec index 3a627e0..ff5457c 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,5 +1,5 @@ -%define glibcsrcdir glibc-2.33.9000-993-gc37fc3ebf0 -%define glibcversion 2.33.9000 +%define glibcsrcdir glibc-2.34 +%define glibcversion 2.34 # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -105,13 +105,53 @@ %dnl !biarcharches %endif +############################################################################## +# Utility functions for pre/post scripts. Stick them at the beginning of +# any lua %pre, %post, %postun, etc. sections to have them expand into +# those scripts. It only works in lua sections and not anywhere else. +%define glibc_post_funcs() \ +-- We use lua posix.exec because there may be no shell that we can \ +-- run during glibc upgrade. We used to implement much of %%post as a \ +-- C program, but from an overall maintenance perspective the lua in \ +-- the spec file was simpler and safer given the operations required. \ +-- All lua code will be ignored by rpm-ostree; see: \ +-- https://github.com/projectatomic/rpm-ostree/pull/1869 \ +-- If we add new lua actions to the %%post code we should coordinate \ +-- with rpm-ostree and ensure that their glibc install is functional. \ +function post_exec (program, ...) \ + local pid = posix.fork () \ + if pid == 0 then \ + posix.exec (program, ...) \ + assert (nil) \ + elseif pid > 0 then \ + posix.wait (pid) \ + end \ +end \ +\ +function update_gconv_modules_cache () \ + local iconv_dir = "%{_libdir}/gconv" \ + local iconv_cache = iconv_dir .. "/gconv-modules.cache" \ + local iconv_modules = iconv_dir .. "/gconv-modules" \ + if (posix.utime (iconv_modules) == 0) then \ + 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 \ + end \ +end \ +%{nil} + ############################################################################## # %%package glibc - The GNU C Library (glibc) core package. ############################################################################## Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 55%{?dist} +Release: 1%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -861,12 +901,6 @@ nothing else. It is designed for assembling a minimal system. Summary: All iconv converter modules for %{name}. Requires: %{name}%{_isa} = %{version}-%{release} Requires: %{name}-common = %{version}-%{release} -%ifarch x86_64 -# Automatically install the 32-bit variant if the 64-bit variant has -# been installed. This covers the case when glibc.i686 is installed -# before glibc-gconv-extra.x86_64. (See above for the other ordering.) -Recommends: (glibc-gconv-extra(x86-32) if glibc(x86-32)) -%endif %description gconv-extra This package contains all iconv converter modules built in %{name}. @@ -1937,23 +1971,7 @@ if rpm.vercmp(rel, required) < 0 then end %post -p --- We use lua's posix.exec because there may be no shell that we can --- run during glibc upgrade. We used to implement much of %%post as a --- C program, but from an overall maintenance perspective the lua in --- the spec file was simpler and safer given the operations required. --- All lua code will be ignored by rpm-ostree; see: --- https://github.com/projectatomic/rpm-ostree/pull/1869 --- If we add new lua actions to the %%post code we should coordinate --- with rpm-ostree and ensure that their glibc install is functional. -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 - +%glibc_post_funcs -- (1) Remove multilib libraries from previous installs. -- In order to support in-place upgrades, we must immediately remove -- obsolete platform directories after installing a new glibc @@ -2084,16 +2102,7 @@ post_exec ("%{_prefix}/sbin/ldconfig") -- 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 +update_gconv_modules_cache() -- (5) On upgrades, restart systemd if installed. "systemctl -q" does -- not suppress the error message (which is common in chroots), so @@ -2134,18 +2143,13 @@ if posix.access(save_path) then posix.unlink(save_path) end -%post gconv-extra -iconv_dir=%{_libdir}/gconv -%{_prefix}/sbin/iconvconfig -o "$iconv_dir/gconv-modules.cache" --nostdlib \ - $iconv_dir +%post gconv-extra -p +%glibc_post_funcs +update_gconv_modules_cache () -%postun gconv-extra -iconv_dir=%{_libdir}/gconv -# The file won't exist if glibc is also removed. -if [ -f $iconv_dir/gconv-modules ]; then - %{_prefix}/sbin/iconvconfig -o "$iconv_dir/gconv-modules.cache" \ - --nostdlib $iconv_dir -fi +%postun gconv-extra -p +%glibc_post_funcs +update_gconv_modules_cache () %pre -n nscd getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r nscd @@ -2253,6 +2257,21 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon Aug 2 2021 Florian Weimer - 2.34-1 +- Switch to glibc 2.34 release tarball: +- Update ChangeLog.old/ChangeLog.23. +- Prepare for glibc 2.34 release. +- po/nl.po: Update Dutch translation. +- Update install.texi, and regenerate INSTALL. +- Update translations. +- Update NEWS. +- NEWS: Fix typos, grammar, and missing words +- elf: Fix audit regression + +* Fri Jul 30 2021 Siddhesh Poyarekar - 2.33.9000-56 +- Port post scripts for gconv-extra to lua and drop dependency across + architectures for x86 multilib (#1988344). + * Thu Jul 29 2021 Florian Weimer - 2.33.9000-55 - Auto-sync with upstream branch master, commit c37fc3ebf0607ce1953c565ffe56d56555eeb25e: diff --git a/sources b/sources index 21eb817..e59ed2f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.33.9000-993-gc37fc3ebf0.tar.xz) = f709f747658b156f147634a26ea85043dc26a30c50174adbf0d8ab32a96ee0c7b3be329f75dd38a7fca371043f520dbdfe7693eeebf5ec649c3dfb9bfa2e6aea +SHA512 (glibc-2.34.tar.xz) = 15252affd9ef4523a8001db16d497f4fdcb3ddf4cde7fe80e075df0bd3cc6524dc29fbe20229dbf5f97af580556e6b1fac0de321a5fe25322bc3e72f93beb624