Fix locale-archive generation (#2057697)

Resolves: #2057697
This commit is contained in:
Carlos O'Donell 2022-02-23 23:12:00 -05:00
parent 6079b05db6
commit e2ef526535
1 changed files with 20 additions and 15 deletions

View File

@ -152,7 +152,7 @@ end}
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.
@ -1225,20 +1225,6 @@ popd
# via hardlinks, so we must group them ourselves.
hardlink -c %{glibc_sysroot}/usr/lib/locale
# Almost half the LC_CTYPE files in langpacks are identical to the C.utf8
# variant which is installed by default. When we keep them as hardlinks,
# each langpack ends up retaining a copy. If we convert these to symbolic
# links instead, we save ~350K each when they get installed that way.
#
# LC_MEASUREMENT and LC_PAPER also have several duplicates but we don't
# bother with these because they are only ~30 bytes each.
pushd %{glibc_sysroot}/usr/lib/locale
for f in $(find eo *_* -samefile C.utf8/LC_CTYPE); do
rm $f && ln -s '../C.utf8/LC_CTYPE' $f
done
popd
# install_different:
# Install all core libraries into DESTDIR/SUBDIR. Either the file is
# installed as a copy or a symlink to the default install (if it is the
@ -1359,6 +1345,22 @@ $olddir/build-%{target}/elf/ld.so \
# glibc-all-langpacks versions)
ln locale-archive locale-archive.real
# Almost half the LC_CTYPE files in langpacks are identical to the C.utf8
# variant which is installed by default. When we keep them as hardlinks,
# each langpack ends up retaining a copy. If we convert these to symbolic
# links instead, we save ~350K each when they get installed that way.
#
# LC_MEASUREMENT and LC_PAPER also have several duplicates but we don't
# bother with these because they are only ~30 bytes each.
#
# Note: This must be done AFTER locale-archive generation since the locale
# archive is incorrectly generated when symbolic links are present.
pushd %{glibc_sysroot}/usr/lib/locale
for f in $(find eo *_* -samefile C.utf8/LC_CTYPE); do
rm $f && ln -s '../C.utf8/LC_CTYPE' $f
done
popd
# Create the file lists for the language specific sub-packages:
for i in eo *_*
do
@ -2175,6 +2177,9 @@ update_gconv_modules_cache ()
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
%changelog
* Wed Feb 23 2022 Carlos O'Donell <carlos@redhat.com> - 2.35.9000-5
- Fix locale-archive generation (#2057697)
* Tue Feb 22 2022 Carlos O'Donell <carlos@redhat.com> - 2.35.9000-4
- Auto-sync with upstream branch master,
commit fdc1ae67fef27eea1445bab4bdfe2f0fb3bc7aa1: