Auto-sync and build new glibc-gconv-extra package

Auto-sync Upstream commit: ebae2f5a6f971a8f0b6c99e00f9c45ef7433924a

Changes in addition to the sync:

Add a downstream patch[1] to reinstate gconv-modules file and apply
glibc-rh697421.patch after it.  Also update spec file to create a new
package glibc-gconv-extra with iconv converter modules that are not
commonly used so that they can be removed in minimal or hardened
installations.

[1] https://sourceware.org/pipermail/libc-alpha/2021-June/127497.html

Auto-sync commits:

- Add build option to disable usage of scv on powerpc
- io: Fix sporadic test failures in io/tst-stat
- nptl: Avoid async cancellation to wrongly update __nptl_nthreads (BZ #19366)
- nptl: Use pthread_kill on pthread_cancel
- nptl: Implement raise in terms of pthread_kill
- nptl: Move cancel type out of cancelhandling
- nptl: Move cancel state out of cancelhandling
- nptl: Remove CANCELING_BITMASK
- nptl: Install cancellation handler on pthread_cancel
- nptl: Deallocate the thread stack on setup failure (BZ #19511)
- Remove stale references to libdl.a
- Fix elf/tst-tls9-static after libdl cleanups.
- iconvdata: Split out non-essential gconv module configuration
- iconvdata: Move gconv-modules configuration to gconv-modules.conf
- gconv_conf: Read configuration files in gconv-modules.d
- iconvconfig: Read configuration from gconv-modules.d subdirectory
- iconvconfig: Make file handling more general purpose
- AArch64: Add support for roundeven[f]
- configure: Replaced obsolete AC_TRY_COMPILE
- libio: Assume _IO_lock_inexpensive
- nptl: Remove exit-thread.h
- Improve test coverage of strnlen function
This commit is contained in:
Siddhesh Poyarekar 2021-06-14 11:15:03 +05:30
parent 2f717376f3
commit 6758377541
4 changed files with 211 additions and 12 deletions

View File

@ -0,0 +1,137 @@
Short description: Reinstate gconv-modules as the default configuration file
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: https://sourceware.org/pipermail/libc-alpha/2021-June/127497.html
Reinstate gconv-modules as the main file so that the configuration
files in gconv-modules.d/ become add-on configuration. With this, the
effective user visible change is that GCONV_PATH can now have
supplementary configuration in GCONV_PATH/gconv-modules.d/ in addition
to the main GCONV_PATH/gconv-modules file.
diff --git a/iconvdata/Makefile b/iconvdata/Makefile
index 3c6929fb59aadaa2..bb3f621b49608b04 100644
--- a/iconvdata/Makefile
+++ b/iconvdata/Makefile
@@ -137,13 +137,12 @@ charmaps = ../localedata/charmaps
extra-modules-left := $(modules)
include extra-module.mk
-gconv-modules = gconv-modules.conf gconv-modules-extra.conf
+gconv-modules = gconv-modules gconv-modules.d/gconv-modules-extra.conf
modpfx = $(objpfx)gconv-modules.d/
extra-objs += $(modules.so)
install-others = $(addprefix $(inst_gconvdir)/, $(modules.so)) \
- $(addprefix $(inst_gconvdir)/gconv-modules.d/, \
- $(gconv-modules))
+ $(addprefix $(inst_gconvdir)/, $(gconv-modules))
# We can build the conversion tables for numerous charsets automatically.
@@ -185,7 +184,7 @@ generated += $(generated-modules:=.h) $(generated-modules:=.stmp) \
iconv-test.out iconv-rules tst-loading.mtrace \
mtrace-tst-loading.out tst-tables.out iconv-test.xxx
ifdef objpfx
-generated += $(addprefix gconv-modules.d/,$(gconv-modules))
+generated += $(gconv-modules)
endif
# Rules to generate the headers.
@@ -253,8 +252,8 @@ headers: $(addprefix $(objpfx), $(generated-modules:=.h))
$(addprefix $(inst_gconvdir)/, $(modules.so)): \
$(inst_gconvdir)/%: $(objpfx)% $(+force)
$(do-install-program)
-$(addprefix $(inst_gconvdir)/gconv-modules.d/, $(gconv-modules)): \
- $(inst_gconvdir)/gconv-modules.d/%: $(modpfx)% $(+force)
+$(addprefix $(inst_gconvdir)/, $(gconv-modules)): \
+ $(inst_gconvdir)/%: $(objpfx)% $(+force)
$(do-install)
ifeq (no,$(cross-compiling))
# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
@@ -307,29 +306,29 @@ $(objpfx)mtrace-tst-loading.out: $(objpfx)tst-loading.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-loading.mtrace > $@; \
$(evaluate-test)
-$(objpfx)bug-iconv1.out: $(addprefix $(modpfx), $(gconv-modules)) \
+$(objpfx)bug-iconv1.out: $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so))
-$(objpfx)bug-iconv2.out: $(addprefix $(modpfx), $(gconv-modules)) \
+$(objpfx)bug-iconv2.out: $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so))
-$(objpfx)bug-iconv3.out: $(addprefix $(modpfx), $(gconv-modules)) \
+$(objpfx)bug-iconv3.out: $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so))
-$(objpfx)bug-iconv5.out: $(addprefix $(modpfx), $(gconv-modules)) \
+$(objpfx)bug-iconv5.out: $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so))
-$(objpfx)tst-loading.out: $(addprefix $(modpfx), $(gconv-modules)) \
+$(objpfx)tst-loading.out: $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so))
-$(objpfx)tst-iconv4.out: $(addprefix $(modpfx), $(gconv-modules)) \
+$(objpfx)tst-iconv4.out: $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so))
-$(objpfx)tst-iconv7.out: $(addprefix $(modpfx), $(gconv-modules)) \
+$(objpfx)tst-iconv7.out: $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so))
-$(objpfx)bug-iconv10.out: $(addprefix $(modpfx), $(gconv-modules)) \
+$(objpfx)bug-iconv10.out: $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so))
-$(objpfx)bug-iconv12.out: $(addprefix $(modpfx), $(gconv-modules)) \
+$(objpfx)bug-iconv12.out: $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so))
-$(objpfx)bug-iconv14.out: $(addprefix $(modpfx), $(gconv-modules)) \
+$(objpfx)bug-iconv14.out: $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so))
$(objpfx)iconv-test.out: run-iconv-test.sh \
- $(addprefix $(modpfx), $(gconv-modules)) \
+ $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so)) \
$(common-objdir)/iconv/iconv_prog TESTS
iconv_modules="$(modules)" \
@@ -338,7 +337,7 @@ $(objpfx)iconv-test.out: run-iconv-test.sh \
$(evaluate-test)
$(objpfx)tst-tables.out: tst-tables.sh \
- $(addprefix $(modpfx), $(gconv-modules)) \
+ $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so)) \
$(objpfx)tst-table-from $(objpfx)tst-table-to
$(SHELL) $< $(common-objpfx) $(common-objpfx)iconvdata/ \
@@ -357,7 +356,10 @@ $(modpfx):
$(modpfx)%: % $(modpfx)
cp $< $@
+$(objpfx)gconv-modules: gconv-modules
+ cp $^ $@
+
# Test requires BIG5HKSCS.
$(objpfx)tst-iconv-big5-hkscs-to-2ucs4.out: \
- $(addprefix $(modpfx), $(gconv-modules)) \
+ $(addprefix $(objpfx), $(gconv-modules)) \
$(addprefix $(objpfx),$(modules.so))
diff --git a/iconvdata/gconv-modules.conf b/iconvdata/gconv-modules
similarity index 100%
rename from iconvdata/gconv-modules.conf
rename to iconvdata/gconv-modules
diff --git a/localedata/Makefile b/localedata/Makefile
index ff4ec4acfa2bc523..bc5a60cf3b49701a 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -183,7 +183,7 @@ install-others := $(addprefix $(inst_i18ndir)/, \
$(locales))
endif
-tests: $(objdir)/iconvdata/gconv-modules.d/gconv-modules.conf
+tests: $(objdir)/iconvdata/gconv-modules
tests-static += tst-langinfo-newlocale-static tst-langinfo-setlocale-static
@@ -465,5 +465,5 @@ $(objpfx)mtrace-tst-leaks.out: $(objpfx)tst-leaks.out
bug-setlocale1-ENV-only = LOCPATH=$(objpfx) LC_CTYPE=de_DE.UTF-8
bug-setlocale1-static-ENV-only = $(bug-setlocale1-ENV-only)
-$(objdir)/iconvdata/gconv-modules.d/gconv-modules.conf:
+$(objdir)/iconvdata/gconv-modules:
$(MAKE) -C ../iconvdata subdir=iconvdata $@

View File

@ -9,13 +9,14 @@ data for gconv used by a certain class of users. This should be
revisited at some point to determine if those users are just using
UTF-8 at this point.
diff -rup a/iconvdata/gconv-modules b/iconvdata/gconv-modules
--- a/iconvdata/gconv-modules 2010-05-04 05:27:23.000000000 -0600
+++ b/iconvdata/gconv-modules 2012-01-26 10:58:24.181895489 -0700
@@ -1954,3 +1954,6 @@ alias HPGREEK8// HP-GREEK8//
alias OSF10010004// HP-GREEK8//
module HP-GREEK8// INTERNAL HP-GREEK8 1
module INTERNAL HP-GREEK8// HP-GREEK8 1
diff --git a/iconvdata/gconv-modules b/iconvdata/gconv-modules
index 4acbba062f2b187d..66f08b286f31f942 100644
--- a/iconvdata/gconv-modules
+++ b/iconvdata/gconv-modules
@@ -113,3 +113,6 @@ module INTERNAL UTF-32BE// UTF-32 1
alias UTF7// UTF-7//
module UTF-7// INTERNAL UTF-7 1
module INTERNAL UTF-7// UTF-7 1
+
+alias ISO-10646-UCS-2// UNICODE//
+alias ISO-10646-UCS-2// ISO-10646/UTF8/

View File

@ -1,4 +1,4 @@
%define glibcsrcdir glibc-2.33.9000-679-g466c1ea15f
%define glibcsrcdir glibc-2.33.9000-701-gebae2f5a6f
%define glibcversion 2.33.9000
# Pre-release tarballs are pulled in from git using a command that is
# effectively:
@ -97,7 +97,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.
@ -156,7 +156,6 @@ rpm.define("__debug_install_post bash " .. wrapper
# - For new patches follow template.patch format.
##############################################################################
Patch1: glibc-fedora-nscd.patch
Patch3: glibc-rh697421.patch
Patch4: glibc-fedora-linux-tcsetattr.patch
Patch6: glibc-fedora-localedef.patch
Patch8: glibc-fedora-manual-dircategory.patch
@ -170,6 +169,8 @@ Patch23: glibc-python3.patch
Patch29: glibc-fedora-nsswitch.patch
Patch30: glibc-deprecated-selinux-makedb.patch
Patch31: glibc-deprecated-selinux-nscd.patch
Patch32: glibc-gconv-modules-revert.patch
Patch33: glibc-rh697421.patch
##############################################################################
# Continued list of core "glibc" package information:
@ -294,6 +295,10 @@ BuildRequires: perl-interpreter
Requires: glibc-langpack = %{version}-%{release}
Suggests: glibc-minimal-langpack = %{version}-%{release}
# Suggest extra gconv modules so that they are installed by default but can be
# removed if needed to build a minimal OS image.
Recommends: glibc-gconv-extra = %{version}-%{release}
%description
The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
@ -829,6 +834,14 @@ This package ensures you can use C, POSIX, or C.UTF-8 locales, but
nothing else. It is designed for assembling a minimal system.
%files minimal-langpack
# Infrequently used iconv converter modules.
%package gconv-extra
Summary: All iconv converter modules for %{name}.
Requires: %{name} = %{version}-%{release}
Requires: %{name}-common = %{version}-%{release}
%description gconv-extra
This package contains all iconv converter modules built in %{name}.
##############################################################################
# glibc "nscd" sub-package
#
@ -1476,6 +1489,7 @@ touch master.filelist
touch glibc.filelist
touch common.filelist
touch utils.filelist
touch gconv.filelist
touch nscd.filelist
touch devel.filelist
touch doc.filelist
@ -1497,7 +1511,7 @@ touch compat-libpthread-nonshared.filelist
find %{glibc_sysroot} \( -type f -o -type l \) \
\( \
-name etc -printf "%%%%config " -o \
-name gconv-modules \
-name gconv-modules* \
-printf "%%%%verify(not md5 size mtime) %%%%config(noreplace) " -o \
-name gconv-modules.cache \
-printf "%%%%verify(not md5 size mtime) " \
@ -1551,6 +1565,7 @@ 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.
# - Extra gconv modules. We add the required modules later.
cat master.filelist \
| grep -v \
-e '%{_infodir}' \
@ -1559,6 +1574,8 @@ cat master.filelist \
-e '%{_libdir}/lib.*\.a' \
-e '%{_libdir}/.*\.o' \
-e '%{_libdir}/lib.*\.so' \
-e '%{_libdir}/gconv/.*\.so$' \
-e '%{_libdir}/gconv/gconv-modules.d/gconv-modules-extra\.conf$' \
-e 'nscd' \
-e '%{_prefix}/bin' \
-e '%{_prefix}/lib/locale' \
@ -1582,6 +1599,33 @@ for module in compat files dns; do
done
grep -e "libmemusage.so" -e "libpcprofile.so" master.filelist >> glibc.filelist
###############################################################################
# glibc-gconv-extra
###############################################################################
grep -e "gconv-modules-extra.conf" master.filelist > gconv.filelist
# Put the essential gconv modules into the main package.
GconvBaseModules="ANSI_X3.110 ISO8859-15 ISO8859-1 CP1252"
GconvBaseModules="$GconvBaseModules UNICODE UTF-16 UTF-32 UTF-7"
%ifarch s390 s390x
GconvBaseModules="$GconvBaseModules ISO-8859-1_CP037_Z900 UTF8_UTF16_Z9"
GconvBaseModules="$GconvBaseModules UTF16_UTF32_Z9 UTF8_UTF32_Z9"
%endif
GconvAllModules=$(cat master.filelist |
sed -n 's|%{_libdir}/gconv/\(.*\)\.so|\1|p')
# Put the base modules into glibc and the rest into glibc-gconv-extra
for conv in $GconvAllModules; do
if echo $GconvBaseModules | grep -q $conv; then
grep -E -e "%{_libdir}/gconv/$conv.so$" \
master.filelist >> glibc.filelist
else
grep -E -e "%{_libdir}/gconv/$conv.so$" \
master.filelist >> gconv.filelist
fi
done
###############################################################################
# glibc-devel
###############################################################################
@ -2013,6 +2057,16 @@ 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
%postun gconv-extra
iconv_dir=%{_libdir}/gconv
%{_prefix}/sbin/iconvconfig -o "$iconv_dir/gconv-modules.cache" --nostdlib \
$iconv_dir
%pre -n nscd
getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r nscd
getent passwd nscd >/dev/null ||
@ -2077,6 +2131,8 @@ fi
%files -f utils.filelist utils
%files -f gconv.filelist gconv-extra
%files -f nscd.filelist -n nscd
%config(noreplace) /etc/nscd.conf
%dir %attr(0755,root,root) /var/run/nscd
@ -2112,6 +2168,11 @@ fi
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
%changelog
* Mon Jun 14 2021 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.33.9000-13
- Auto-sync with upstream branch master,
commit ebae2f5a6f971a8f0b6c99e00f9c45ef7433924a.
- Revert gconv configuration file name to gconv-modules.
* Thu Jun 03 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-12
- libdl is no longer a separate shared object.
- CVE-2021-33574: Use-after-free via mq_notify (#1965410)

View File

@ -1 +1 @@
SHA512 (glibc-2.33.9000-679-g466c1ea15f.tar.xz) = b000b7ae622ccb3667ce95a6b9ec542b6df140962bb17c1966059b80e7bc3e9751dc7118da3090fcc36d67e5e410fcf855dd28bdc5b9daff484ad583edc0ac8f
SHA512 (glibc-2.33.9000-701-gebae2f5a6f.tar.xz) = 1bf82ebfa0cce166a09d31a5b36e7ab456fc7c588f3a2454ce439c94d92fd54bce05ecf263cb6f555f8ce85b86a5718235cb72dbfdd05f85e898a7c8ff971b72