diff --git a/glibc.spec b/glibc.spec index 7ab7ec95f1e54e6d61732f00e00d93cf2d7841d0..0a58d4f83543ba22e728243f7caac75f27451d6b 100644 --- a/glibc.spec +++ b/glibc.spec @@ -31,6 +31,9 @@ %bcond_with bootstrap %bcond_without werror %bcond_without docs +%ifarch x86_64 aarch64 +%bcond_without compat_2_17 +%endif %ifarch %{valgrind_arches} %bcond_without valgrind @@ -59,7 +62,7 @@ ############################################################################## Name: glibc Version: 2.28 -Release: 88 +Release: 89 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -432,6 +435,17 @@ Requires: man info %description help This package provides al doc and man files of %{name} +############################################################################## +# glibc compat-2.17 sub-package +############################################################################## +%if %{with compat_2_17} +%package compat-2.17 +Summary: provides pthread library with glibc-2.17 + +%description compat-2.17 +To keep older applications compatible, glibc-compat-2.17 provides libpthread_nonshared.a +%endif + ############################################################################## # Prepare for the build. ############################################################################## @@ -604,6 +618,12 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/nsswitch.conf mkdir -p $RPM_BUILD_ROOT/etc/default install -p -m 644 nis/nss $RPM_BUILD_ROOT/etc/default/nss +%if %{with compat_2_17} +# Build an empty libpthread_nonshared.a for compatiliby with applications +# that have old linker scripts that reference this file. +ar cr $RPM_BUILD_ROOT/%{_prefix}/%{_lib}/libpthread_nonshared.a +%endif + # This is for ncsd - in glibc 2.2 install -m 644 nscd/nscd.conf $RPM_BUILD_ROOT/etc mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir} @@ -738,6 +758,9 @@ touch libnsl.filelist touch debugutils.filelist touch benchtests.filelist touch debuginfo.filelist +%if %{with compat_2_17} +touch compat-2.17.filelist +%endif { find $RPM_BUILD_ROOT \( -type f -o -type l \) \ @@ -764,6 +787,9 @@ touch debuginfo.filelist -e '\,.*/share/i18n/charmaps/.*,d' \ -e '\,.*/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\|rpc\|gai\.conf\),d' \ -e '\,.*/%{_libdir}/lib\(pcprofile\|memusage\)\.so,d' \ +%if %{with compat_2_17} + -e '\,.*%{_libdir}/libpthread_nonshared.a,d' \ +%endif -e '\,.*/bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d' } | sort > master.filelist @@ -937,6 +963,14 @@ for d in $(echo $remove_dir | sed 's/ /\n/g'); do sed -i "\|^%%dir $d/\?$|d" debuginfo.filelist done %endif # %{with benchtests} + +%if %{with compat_2_17} +############################################################################## +# glibc compat-2.17 sub-package +############################################################################## + echo "%{_libdir}/libpthread_nonshared.a" >> compat-2.17.filelist +%endif + ############################################################################## # Run the glibc testsuite # If any tests fail to build we exit %check with an error, otherwise @@ -1173,7 +1207,14 @@ fi #Doc of nss_modules sub-package %doc hesiod/README.hesiod +%if %{with compat_2_17} +%files -f compat-2.17.filelist compat-2.17 +%endif + %changelog +* Thu Jul 7 2022 Yang Yanchao - 2.28-89 +- add libpthread_nonshared.a in glibc-compat-2.17 for old applications + * Fri Jan 28 2022 Qingqing Li - 2.28-88 - Fix __cscncmp_avx2 in strcmp-avx2.S [BZ#28755]