%bcond_with bash_nls # use bash NLS in shell scripts (ldd, sotruss); restores /bin/bash dep
%bcond_without cet # Intel Control-flow Enforcement Technology (CET)
%bcond_without crypt # don't build obsolete libcrypt
+%bcond_without static_pie # disable static PIE support
#
%ifarch %{ix86} %{x8664}
%{!?min_kernel:%global min_kernel 3.2.0}
%ifnarch i686 %{x8664} x32
%undefine with_cet
%endif
-%ifnarch %{arm}
-%define with_static_pie 1
+%ifarch %{arm}
+%undefine with_static_pie
%endif
-%define core_version 2.32
+%define core_version 2.33
%define llh_version 7:2.6.32.1-1
Summary: GNU libc
Summary(uk.UTF-8): GNU libc версії
Name: glibc
Version: %{core_version}
-Release: 6
+Release: 1
Epoch: 6
License: LGPL v2.1+
Group: Libraries
Source0: https://ftp.gnu.org/gnu/glibc/%{name}-%{version}.tar.xz
-# Source0-md5: 720c7992861c57cf97d66a2f36d8d1fa
+# Source0-md5: 390bbd889c7e8e8a7041564cb6b27cca
Source2: nscd.init
Source3: nscd.sysconfig
Source4: nscd.logrotate
Source9: nscd.tmpfiles
# use branch.sh to update glibc-git.patch
Patch0: glibc-git.patch
-# Patch0-md5: 2feec2e270f668fb41b8cde1e5f2ba68
+# Patch0-md5: 74fe5d1f0d652a5c4d46e4c52edd8694
# against GNU TP (libc domain)
#Patch1: %{name}-pl.po-update.patch
Patch2: %{name}-pld.patch
BuildRequires: rpm-build >= 4.3-0.20030610.28
BuildRequires: rpmbuild(macros) >= 1.752
BuildRequires: sed >= 4.0.5
+BuildRequires: tar >= 1:1.22
BuildRequires: texinfo >= 4.7
-Requires: %{name}-ld = %{epoch}:%{version}-%{release}
+BuildRequires: xz
+Requires(post): ldconfig = %{epoch}:%{version}-%{release}
Requires: filesystem
Requires: uname(release) >= %{min_kernel}
Provides: %{name}(%{_target_cpu}) = %{epoch}:%{version}-%{release}
%endif
Provides: glibc(nptl)
Provides: glibc(tls)
+Provides: rtld(GNU_HASH)
Obsoletes: glibc-common
Obsoletes: glibc-debug
%ifarch %{x8664} sparc64 ppc64
Conflicts: rpm < 4.1
Conflicts: util-linux < 2.35.1-2
Conflicts: xorg-driver-video-nvidia-libs < 1:295.33
-ExclusiveArch: i486 i586 i686 pentium3 pentium4 athlon %{x8664} x32 ia64 alpha s390 s390x sparc sparc64 sparcv9 ppc ppc64 armv5tel aarch64
+ExclusiveArch: i486 i586 i686 pentium3 pentium4 athlon %{x8664} x32 ia64 alpha s390 s390x sparc sparc64 sparcv9 ppc ppc64 armv5tel armv6hl aarch64
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# avoid -s here (ld.so must not be stripped to allow any program debugging)
%description libcrypt -l pl.UTF-8
Biblioteka glibc z funkcją crypt(3).
-%package ld
-Summary: Dynamic linker
-Summary(pl.UTF-8): Linker (konsolidator) dynamiczny
+%package -n ldconfig
+Summary: Create shared library cache and maintains symlinks
+Summary(de.UTF-8): Erstellt ein shared library cache und verwaltet symlinks
+Summary(fr.UTF-8): Crée un cache de bibliothčque partagée et gčre *.so
+Summary(pl.UTF-8): Tworzenie cache'u bibliotek dynamicznych i ich dowiązań symbolicznych
+Summary(tr.UTF-8): Ortak kitaplýk önbelleđi yaratýr ve bađlantýlarý kurar
Group: Applications/System
Requires: uname(release) >= %{min_kernel}
# we want FHS being installed before ldconfig, altho they are both unrelated to each-other.
# This is needed because previous package (glibc) had autoreq false and had
# provided this manually. Probably poldek bug that have to have it here.
Provides: /sbin/ldconfig
-Provides: ldconfig = %{epoch}:%{version}-%{release}
-Obsoletes: ldconfig < 6:2.28-6.1
-
-%description ld
-The dynamic linker is used to load shared libraries used by
-executables linked dynamically.
-
-The package also contains the ldconfig tool used to maintain shared
-library cache for the linker.
-
-%description ld -l pl.UTF-8
-Linker (konsolidator) dynamiczny służy do ładowania bibliotek
-współdzielonych używanych przez programy wykonywalne konsolidowane
-dynamicznie.
+# we want FHS being installed before ldconfig, altho they are both unrelated to each-other.
+Requires: FHS
-Pakiet zawiera także narzędzie ldconfig, służące do utrzymywania
-pamięci podręcznej bibliotek współdzielonych dla linkera.
+%description -n ldconfig
+ldconfig scans a running system and sets up the symbolic links that
+are used to load shared libraries properly. It also creates
+/etc/ld.so.cache which speeds the loading programs which use shared
+libraries.
+
+%description -n ldconfig -l de.UTF-8
+ldconfig scannt ein laufendes System und richtet die symbolischen
+Verknüpfungen zum Laden der gemeinsam genutzten Libraries ein.
+Außerdem erstellt es /etc/ld.so.cache, was das Laden von Programmen
+mit gemeinsam genutzten Libraries beschleunigt.
+
+%description -n ldconfig -l fr.UTF-8
+ldconfig analyse un systčme et configure les liens symboliques
+utilisés pour charger correctement les bibliothčques partagées. Il
+crée aussi /etc/ld.so.cache qui accélčre le chargement des programmes
+utilisant les bibliothčques partagées.
+
+%description -n ldconfig -l pl.UTF-8
+ldconfig testuje uruchomiony system i tworzy dowiązania symboliczne,
+które są następnie używane do poprawnego ładowania bibliotek
+dynamicznych. Program ten tworzy plik /etc/ld.so.cache, który
+przyśpiesza ładowanie programów korzystających z bibliotek
+dynamicznych.
+
+%description -n ldconfig -l tr.UTF-8
+ldconfig, çalýţmakta olan sistemi araţtýrýr ve ortak kitaplýklarýn
+düzgün bir ţekilde yüklenmesi için gereken simgesel bađlantýlarý
+kurar. Ayrýca ortak kitaplýklarý kullanan programlarýn yüklenmesini
+hýzlandýran /etc/ld.so.cache dosyasýný yaratýr.
%package -n nss_compat
Summary: Old style NYS NSS glibc module
Summary: Header files for development using standard C libraries
Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia programów przy użyciu standardowych bibliotek C
Group: Development/Building
-Provides: %{name}-headers(%{_target_cpu}) = %{epoch}:%{version}-%{release}
+Provides: %{name}-header-cpu-%{_target_cpu} = %{epoch}:%{version}-%{release}
%ifarch %{ix86}
-Provides: %{name}-headers(ix86) = %{epoch}:%{version}-%{release}
+Provides: %{name}-headers-cpu-ix86 = %{epoch}:%{version}-%{release}
%endif
%ifarch %{x8664} x32
# If both -m32 and -m64 is to be supported on x86_64, x86_64 package
# have to be installed, not ix86 one.
-Obsoletes: glibc-headers(athlon)
-Obsoletes: glibc-headers(i386)
-Obsoletes: glibc-headers(i486)
-Obsoletes: glibc-headers(i586)
-Obsoletes: glibc-headers(i686)
-Obsoletes: glibc-headers(ix86)
-Obsoletes: glibc-headers(pentium3)
-Obsoletes: glibc-headers(pentium4)
+Obsoletes: glibc-headers-cpu-athlon
+Obsoletes: glibc-headers-cpu-i386
+Obsoletes: glibc-headers-cpu-i486
+Obsoletes: glibc-headers-cpu-i586
+Obsoletes: glibc-headers-cpu-i686
+Obsoletes: glibc-headers-cpu-ix86
+Obsoletes: glibc-headers-cpu-pentium3
+Obsoletes: glibc-headers-cpu-pentium4
%endif
%ifarch x32
-Obsoletes: glibc-headers(x86_64)
+Obsoletes: glibc-headers-cpu-x86_64
%endif
%ifarch ppc64
-Obsoletes: glibc-headers(ppc)
+Obsoletes: glibc-headers-cpu-ppc
%endif
%ifarch s390x
-Obsoletes: glibc-headers(s390)
+Obsoletes: glibc-headers-cpu-s390
%endif
%ifarch sparc64
-Obsoletes: glibc-headers(sparc)
+Obsoletes: glibc-headers-cpu-sparc
%endif
Requires: linux-libc-headers >= %{llh_version}
Summary: Utilities needed for development using standard C libraries
Summary(pl.UTF-8): Narzędzia do tworzenia programów przy użyciu standardowych bibliotek C
Group: Development/Libraries
-Provides: %{name}-devel-utils(%{_target_cpu}) = %{epoch}:%{version}-%{release}
+Provides: %{name}-devel-util-cpu-%{_target_cpu} = %{epoch}:%{version}-%{release}
%ifarch %{ix86}
-Provides: %{name}-devel-utils(ix86) = %{epoch}:%{version}-%{release}
+Provides: %{name}-devel-utils-cpu-ix86 = %{epoch}:%{version}-%{release}
%endif
%ifarch %{x8664} x32
# If both -m32 and -m64 is to be supported on AMD64, x86_64 package
# have to be installed, not ix86 one.
-Obsoletes: glibc-devel-utils(athlon)
-Obsoletes: glibc-devel-utils(i386)
-Obsoletes: glibc-devel-utils(i486)
-Obsoletes: glibc-devel-utils(i586)
-Obsoletes: glibc-devel-utils(i686)
-Obsoletes: glibc-devel-utils(ix86)
-Obsoletes: glibc-devel-utils(pentium3)
-Obsoletes: glibc-devel-utils(pentium4)
+Obsoletes: glibc-devel-utils-cpu-athlon
+Obsoletes: glibc-devel-utils-cpu-i386
+Obsoletes: glibc-devel-utils-cpu-i486
+Obsoletes: glibc-devel-utils-cpu-i586
+Obsoletes: glibc-devel-utils-cpu-i686
+Obsoletes: glibc-devel-utils-cpu-ix86
+Obsoletes: glibc-devel-utils-cpu-pentium3
+Obsoletes: glibc-devel-utils-cpu-pentium4
%endif
%ifarch x32
-Obsoletes: glibc-devel-utils(x86_64)
+Obsoletes: glibc-devel-utils-cpu-x86_64
%endif
%ifarch ppc64
-Obsoletes: glibc-devel-utils(ppc)
+Obsoletes: glibc-devel-utils-cpu-ppc
%endif
%ifarch s390x
-Obsoletes: glibc-devel-utils(s390)
+Obsoletes: glibc-devel-utils-cpu-s390
%endif
%ifarch sparc64
-Obsoletes: glibc-devel-utils(sparc)
+Obsoletes: glibc-devel-utils-cpu-sparc
%endif
Conflicts: man-pages < 4.00
# glibc has its own way to remove PLT relocations. / H. J. Lu.
unset LD_SYMBOLIC_FUNCTIONS || :
-cp -f /usr/share/automake/config.sub scripts
%{__aclocal}
%{__autoconf}
cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/nscd
cp -a nscd/nscd.conf $RPM_BUILD_ROOT%{_sysconfdir}
cp -a posix/gai.conf $RPM_BUILD_ROOT%{_sysconfdir}
-cp -a nis/nss $RPM_BUILD_ROOT/etc/default/nss
sed -e 's#\([ \t]\)db\([ \t]\)#\1#g' nss/nsswitch.conf > $RPM_BUILD_ROOT%{_sysconfdir}/nsswitch.conf
xz -dc %{SOURCE5} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
%{__rm} $RPM_BUILD_ROOT%{_mandir}/pl/man3/{alphasort,cfgetispeed,cfgetospeed,cfmakeraw,cfsetispeed,cfsetospeed,closelog,dn_comp,dn_expand,fscanf}.3
%{__rm} $RPM_BUILD_ROOT%{_mandir}/tr/man3/{encrypt_r,setkey,setkey_r}.3
+%if %{without crypt}
+%{__rm} $RPM_BUILD_ROOT%{_mandir}{,/ja}/man3/crypt{,_r}.3
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/{de,es,fr,pl,pt,ru,tr}/man3/crypt.3
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
%if %{without cross}
%post -p /sbin/postshell
/sbin/glibc-postinst /%{_lib}/%{_host_cpu} /%{_lib}/tls
--/sbin/ldconfig
-
-%postun -p /sbin/postshell
--/sbin/ldconfig
+/sbin/ldconfig
-%post ld -p /sbin/postshell
--/sbin/ldconfig
+%postun -p /sbin/ldconfig
-%postun ld -p /sbin/postshell
--/sbin/ldconfig
-
-%triggerpostun ld -p /sbin/postshell -- glibc-misc < 6:2.3.5-7.6
+%triggerpostun -p /sbin/postshell -- glibc-misc < 6:2.3.5-7.6
-/bin/cp -f /etc/ld.so.conf /etc/ld.so.conf.rpmsave
-/bin/sed -i -e '1iinclude ld.so.conf.d/*.conf' /etc/ld.so.conf
%endif
%if %{without cross}
%attr(755,root,root) /sbin/glibc-postinst
%endif
-# wildly arch-dependent ld.so SONAME symlink
+# TODO: package ldconfig symlinks as %ghost
+%attr(755,root,root) /%{_lib}/ld-%{core_version}.so
+%ifarch %{ix86} sparc sparcv9 sparc64 alpha sh
+%attr(755,root,root) /%{_lib}/ld-linux.so.2
+%endif
+%ifarch ia64
+%attr(755,root,root) /%{_lib}/ld-linux-ia64.so.2
+%endif
+%ifarch %{x8664}
+%attr(755,root,root) /%{_lib}/ld-linux-x86-64.so.2
+%endif
+%ifarch x32
+%attr(755,root,root) /%{_lib}/ld-linux-x32.so.2
+%endif
+%ifarch ppc64 s390x
+%attr(755,root,root) /%{_lib}/ld64.so.1
+%endif
+%ifarch aarch64
+%attr(755,root,root) /lib/ld-linux-aarch64.so.1
+%attr(755,root,root) /%{_lib}/ld-linux-aarch64.so.1
+%endif
+%ifarch armv6hl
+%attr(755,root,root) /lib/ld-linux-armhf.so.3
+%endif
+%ifnarch %{ix86} sparc sparcv9 sparc64 alpha sh ia64 %{x8664} x32 ppc64 s390x %{arm} aarch64
+%attr(755,root,root) /%{_lib}/ld.so.1
+%endif
%attr(755,root,root) /%{_lib}/libBrokenLocale-%{core_version}.so
%ifarch alpha
%attr(755,root,root) /%{_lib}/libBrokenLocale.so.1.1
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nsswitch.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gai.conf
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/default/nss
%config %{_sysconfdir}/rpc
%attr(755,root,root) %{_bindir}/getent
%attr(755,root,root) %{_bindir}/iconv
%attr(755,root,root) %{_bindir}/locale
-%attr(755,root,root) %{_sbindir}/zdump
+%attr(755,root,root) %{_bindir}/zdump
%attr(755,root,root) %{_sbindir}/zic
%dir %{_libexecdir}/getconf
%{_mandir}/man7/unicode.7*
%{_mandir}/man7/utf-8.7*
%{_mandir}/man7/utf8.7*
+%{_mandir}/man8/ld-linux.8*
+%{_mandir}/man8/ld-linux.so.8*
+%{_mandir}/man8/ld.so.8*
%{_mandir}/man8/sln.8*
%{_mandir}/man8/zdump.8*
%{_mandir}/man8/zic.8*
%lang(es) %{_mandir}/es/man7/unicode.7*
%lang(es) %{_mandir}/es/man7/utf-8.7*
%lang(es) %{_mandir}/es/man7/utf8.7*
+%lang(es) %{_mandir}/es/man8/ld-linux.8*
+%lang(es) %{_mandir}/es/man8/ld-linux.so.8*
+%lang(es) %{_mandir}/es/man8/ld.so.8*
%lang(es) %{_mandir}/es/man8/zdump.8*
%lang(es) %{_mandir}/es/man8/zic.8*
%lang(fr) %{_mandir}/fr/man1/getent.1*
%lang(fr) %{_mandir}/fr/man7/unicode.7*
%lang(fr) %{_mandir}/fr/man7/utf-8.7*
%lang(fr) %{_mandir}/fr/man7/utf8.7*
+%lang(fr) %{_mandir}/fr/man8/ld-linux.8*
+%lang(fr) %{_mandir}/fr/man8/ld-linux.so.8*
+%lang(fr) %{_mandir}/fr/man8/ld.so.8*
%lang(fr) %{_mandir}/fr/man8/sln.8*
%lang(fr) %{_mandir}/fr/man8/zdump.8*
%lang(fr) %{_mandir}/fr/man8/zic.8*
%lang(hu) %{_mandir}/hu/man7/locale.7*
%lang(hu) %{_mandir}/hu/man7/utf-8.7*
%lang(hu) %{_mandir}/hu/man7/utf8.7*
+%lang(hu) %{_mandir}/hu/man8/ld-linux.8*
+%lang(hu) %{_mandir}/hu/man8/ld-linux.so.8*
+%lang(hu) %{_mandir}/hu/man8/ld.so.8*
%lang(hu) %{_mandir}/hu/man8/zdump.8*
%lang(it) %{_mandir}/it/man5/locale.5*
%lang(it) %{_mandir}/it/man7/ascii.7*
%lang(ja) %{_mandir}/ja/man7/unicode.7*
%lang(ja) %{_mandir}/ja/man7/utf-8.7*
%lang(ja) %{_mandir}/ja/man7/utf8.7*
+%lang(ja) %{_mandir}/ja/man8/ld-linux.8*
+%lang(ja) %{_mandir}/ja/man8/ld-linux.so.8*
+%lang(ja) %{_mandir}/ja/man8/ld.so.8*
%lang(ja) %{_mandir}/ja/man8/sln.8*
%lang(ja) %{_mandir}/ja/man8/zdump.8*
%lang(ja) %{_mandir}/ja/man8/zic.8*
%lang(pl) %{_mandir}/pl/man7/unicode.7*
%lang(pl) %{_mandir}/pl/man7/utf-8.7*
%lang(pl) %{_mandir}/pl/man7/utf8.7*
+%lang(pl) %{_mandir}/pl/man8/ld-linux.8*
+%lang(pl) %{_mandir}/pl/man8/ld-linux.so.8*
+%lang(pl) %{_mandir}/pl/man8/ld.so.8*
%lang(pt) %{_mandir}/pt/man5/locale.5*
%lang(pt) %{_mandir}/pt/man5/nsswitch.conf.5*
%lang(pt) %{_mandir}/pt/man5/rpc.5*
%lang(ru) %{_mandir}/ru/man7/unicode.7*
%lang(ru) %{_mandir}/ru/man7/utf-8.7*
%lang(ru) %{_mandir}/ru/man7/utf8.7*
+%lang(ru) %{_mandir}/ru/man8/ld-linux.so.8*
+%lang(ru) %{_mandir}/ru/man8/ld.so.8*
%lang(ru) %{_mandir}/ru/man8/zdump.8*
%lang(ru) %{_mandir}/ru/man8/zic.8*
%lang(tr) %{_mandir}/tr/man1/iconv.1*
%endif
%endif
-%files ld
+%files -n ldconfig
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf
%dir %{_sysconfdir}/ld.so.conf.d
%ghost %{_sysconfdir}/ld.so.cache
-# TODO: package ldconfig symlinks as %ghost
-%attr(755,root,root) /%{_lib}/ld-%{core_version}.so
-%ifarch %{ix86} sparc sparcv9 sparc64 alpha sh
-%attr(755,root,root) /%{_lib}/ld-linux.so.2
-%endif
-%ifarch ia64
-%attr(755,root,root) /%{_lib}/ld-linux-ia64.so.2
-%endif
-%ifarch %{x8664}
-%attr(755,root,root) /%{_lib}/ld-linux-x86-64.so.2
-%endif
-%ifarch x32
-%attr(755,root,root) /%{_lib}/ld-linux-x32.so.2
-%endif
-%ifarch ppc64 s390x
-%attr(755,root,root) /%{_lib}/ld64.so.1
-%endif
-%ifarch aarch64
-%attr(755,root,root) /lib/ld-linux-aarch64.so.1
-%attr(755,root,root) /%{_lib}/ld-linux-aarch64.so.1
-%endif
-%ifnarch %{ix86} sparc sparcv9 sparc64 alpha sh ia64 %{x8664} x32 ppc64 s390x %{arm} aarch64
-%attr(755,root,root) /%{_lib}/ld.so.1
-%endif
%attr(755,root,root) /sbin/ldconfig
-%{_mandir}/man8/ld-linux.8*
-%{_mandir}/man8/ld-linux.so.8*
-%{_mandir}/man8/ld.so.8*
%{_mandir}/man8/ldconfig.8*
-%lang(es) %{_mandir}/es/man8/ld-linux.8*
-%lang(es) %{_mandir}/es/man8/ld-linux.so.8*
-%lang(es) %{_mandir}/es/man8/ld.so.8*
%lang(es) %{_mandir}/es/man8/ldconfig.8*
-%lang(fr) %{_mandir}/fr/man8/ld-linux.8*
-%lang(fr) %{_mandir}/fr/man8/ld-linux.so.8*
-%lang(fr) %{_mandir}/fr/man8/ld.so.8*
%lang(fr) %{_mandir}/fr/man8/ldconfig.8*
-%lang(hu) %{_mandir}/hu/man8/ld-linux.8*
-%lang(hu) %{_mandir}/hu/man8/ld-linux.so.8*
-%lang(hu) %{_mandir}/hu/man8/ld.so.8*
%lang(hu) %{_mandir}/hu/man8/ldconfig.8*
-%lang(ja) %{_mandir}/ja/man8/ld-linux.8*
-%lang(ja) %{_mandir}/ja/man8/ld-linux.so.8*
-%lang(ja) %{_mandir}/ja/man8/ld.so.8*
%lang(ja) %{_mandir}/ja/man8/ldconfig.8*
-%lang(pl) %{_mandir}/pl/man8/ld-linux.8*
-%lang(pl) %{_mandir}/pl/man8/ld-linux.so.8*
-%lang(pl) %{_mandir}/pl/man8/ld.so.8*
%lang(pl) %{_mandir}/pl/man8/ldconfig.8*
%lang(pt) %{_mandir}/pt/man8/ldconfig.8*
-%lang(ru) %{_mandir}/ru/man8/ld-linux.so.8*
-%lang(ru) %{_mandir}/ru/man8/ld.so.8*
%lang(ru) %{_mandir}/ru/man8/ldconfig.8*
%dir %attr(700,root,root) /var/cache/ldconfig
%attr(600,root,root) %ghost /var/cache/ldconfig/aux-cache
%attr(755,root,root) %{_libdir}/libutil.so
%{_libdir}/crt[1in].o
%{_libdir}/[MSgr]crt1.o
-%{_libdir}/grcrt1.o
+%{?with_static_pie:%{_libdir}/grcrt1.o}
# ld scripts
%{_libdir}/libc.so
%{_libdir}/libpthread.so
%ifarch alpha ppc sparc
%{_libdir}/libnldbl_nonshared.a
%endif
-%ifarch %{ix86} %{x8664} x32 ppc ppc64 s390 s390x sparc sparcv9 sparc64 aarch64
+%ifarch %{ix86} %{x8664} x32 ppc ppc64 s390 s390x sparc sparcv9 sparc64 aarch64 armv6hl
# ABI-dependent headers
%{_includedir}/gnu/stubs-*.h
%endif