Import glibc-2.34-1.fc35 from rawhide (#1988950)

Resolves: #1988950
This commit is contained in:
Florian Weimer 2021-08-02 17:41:24 +02:00
parent ac0c960904
commit de873f1d0a
2 changed files with 67 additions and 48 deletions

View File

@ -1,5 +1,5 @@
%define glibcsrcdir glibc-2.33.9000-993-gc37fc3ebf0 %define glibcsrcdir glibc-2.34
%define glibcversion 2.33.9000 %define glibcversion 2.34
# Pre-release tarballs are pulled in from git using a command that is # Pre-release tarballs are pulled in from git using a command that is
# effectively: # effectively:
# #
@ -105,13 +105,53 @@
%dnl !biarcharches %dnl !biarcharches
%endif %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. # %%package glibc - The GNU C Library (glibc) core package.
############################################################################## ##############################################################################
Summary: The GNU libc libraries Summary: The GNU libc libraries
Name: glibc Name: glibc
Version: %{glibcversion} Version: %{glibcversion}
Release: 55%{?dist} Release: 1%{?dist}
# In general, GPLv2+ is used by programs, LGPLv2+ is used for # In general, GPLv2+ is used by programs, LGPLv2+ is used for
# libraries. # libraries.
@ -861,12 +901,6 @@ nothing else. It is designed for assembling a minimal system.
Summary: All iconv converter modules for %{name}. Summary: All iconv converter modules for %{name}.
Requires: %{name}%{_isa} = %{version}-%{release} Requires: %{name}%{_isa} = %{version}-%{release}
Requires: %{name}-common = %{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 %description gconv-extra
This package contains all iconv converter modules built in %{name}. This package contains all iconv converter modules built in %{name}.
@ -1937,23 +1971,7 @@ if rpm.vercmp(rel, required) < 0 then
end end
%post -p <lua> %post -p <lua>
-- We use lua's posix.exec because there may be no shell that we can %glibc_post_funcs
-- 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
-- (1) Remove multilib libraries from previous installs. -- (1) Remove multilib libraries from previous installs.
-- In order to support in-place upgrades, we must immediately remove -- In order to support in-place upgrades, we must immediately remove
-- obsolete platform directories after installing a new glibc -- 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 -- We assume that the cache is in _libdir/gconv and called
-- "gconv-modules.cache". -- "gconv-modules.cache".
local iconv_dir = "%{_libdir}/gconv" update_gconv_modules_cache()
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
-- (5) On upgrades, restart systemd if installed. "systemctl -q" does -- (5) On upgrades, restart systemd if installed. "systemctl -q" does
-- not suppress the error message (which is common in chroots), so -- 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) posix.unlink(save_path)
end end
%post gconv-extra %post gconv-extra -p <lua>
iconv_dir=%{_libdir}/gconv %glibc_post_funcs
%{_prefix}/sbin/iconvconfig -o "$iconv_dir/gconv-modules.cache" --nostdlib \ update_gconv_modules_cache ()
$iconv_dir
%postun gconv-extra %postun gconv-extra -p <lua>
iconv_dir=%{_libdir}/gconv %glibc_post_funcs
# The file won't exist if glibc is also removed. update_gconv_modules_cache ()
if [ -f $iconv_dir/gconv-modules ]; then
%{_prefix}/sbin/iconvconfig -o "$iconv_dir/gconv-modules.cache" \
--nostdlib $iconv_dir
fi
%pre -n nscd %pre -n nscd
getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r 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 %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
%changelog %changelog
* Mon Aug 2 2021 Florian Weimer <fweimer@redhat.com> - 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 <siddhesh@redhat.com> - 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 <fweimer@redhat.com> - 2.33.9000-55 * Thu Jul 29 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-55
- Auto-sync with upstream branch master, - Auto-sync with upstream branch master,
commit c37fc3ebf0607ce1953c565ffe56d56555eeb25e: commit c37fc3ebf0607ce1953c565ffe56d56555eeb25e:

View File

@ -1 +1 @@
SHA512 (glibc-2.33.9000-993-gc37fc3ebf0.tar.xz) = f709f747658b156f147634a26ea85043dc26a30c50174adbf0d8ab32a96ee0c7b3be329f75dd38a7fca371043f520dbdfe7693eeebf5ec649c3dfb9bfa2e6aea SHA512 (glibc-2.34.tar.xz) = 15252affd9ef4523a8001db16d497f4fdcb3ddf4cde7fe80e075df0bd3cc6524dc29fbe20229dbf5f97af580556e6b1fac0de321a5fe25322bc3e72f93beb624