X-Git-Url: http://git.pld-linux.org/?p=packages%2Fglibc.git;a=blobdiff_plain;f=glibc.spec;h=f8d5fa99c08eed70c88788ad38f7b30a7c3ab3a1;hp=38b49a878dcd45c05ceb6146ed3eda4c7ab7b63e;hb=69f2455f8241d173071ebcd21b63eb30184281a0;hpb=f8168007072e9835a12ef12236e981d8d6690274 diff --git a/glibc.spec b/glibc.spec index 38b49a8..f8d5fa9 100644 --- a/glibc.spec +++ b/glibc.spec @@ -6,6 +6,7 @@ %bcond_with tests # perform "make test" %bcond_without localedb # don't build localedb-all (is time consuming) %bcond_with cross # build using crossgcc (without libgcc_eh) +%bcond_with pax # PaX support # # TODO: # - look at locale fixes/updates in bugzilla @@ -34,15 +35,15 @@ Summary(ru.UTF-8): GNU libc версии Summary(tr.UTF-8): GNU libc Summary(uk.UTF-8): GNU libc версії Name: glibc -Version: 2.6.1 -Release: 2 +Version: 2.7 +Release: 8.2 Epoch: 6 License: LGPL v2.1+ Group: Libraries Source0: ftp://sources.redhat.com/pub/glibc/releases/%{name}-%{version}.tar.bz2 -# Source0-md5: 11cf6d3fc86dbe0890b8d00372eb6286 +# Source0-md5: 065c5952b439deba40083ccd67bcc8f7 Source1: ftp://sources.redhat.com/pub/glibc/releases/%{name}-libidn-%{version}.tar.bz2 -# Source1-md5: 503f1315afd808728ebaa75b3d87a7d9 +# Source1-md5: 226809992fb1f3dc6ea23e0f26952ea4 Source2: nscd.init Source3: nscd.sysconfig Source4: nscd.logrotate @@ -62,22 +63,24 @@ Patch8: %{name}-missing-nls.patch Patch9: %{name}-java-libc-wait.patch Patch10: %{name}-info.patch Patch11: %{name}-no_debuggable_objects.patch -Patch12: %{name}-includes.patch -Patch13: %{name}-gcc42.patch -Patch14: %{name}-sparc-errno_fix.patch +Patch13: %{name}-awk.patch +Patch14: %{name}-sparc-errno_fix.patch +Patch15: %{name}-memmove.patch Patch17: %{name}-new-charsets.patch +Patch18: %{name}-i586-build-fix.patch Patch20: %{name}-tzfile-noassert.patch Patch21: %{name}-morelocales.patch Patch22: %{name}-locale_fixes.patch Patch23: %{name}-ZA_collate.patch -Patch24: %{name}-iconvconfig-nxstack.patch + Patch25: %{name}-cross-gcc_eh.patch Patch26: %{name}-with-stroke.patch -Patch27: %{name}-sparc64-undefined-registers.patch -# PaX hack (dropped) -#Patch30: %{name}-pax_dl-execstack.patch +Patch30: %{name}-pax_dl-execstack.patch +Patch31: %{name}-pt_pax.patch +Patch32: %{name}-tzfile_read.patch +Patch33: %{name}-sparc-lowlevellock.patch URL: http://www.gnu.org/software/libc/ %{?with_selinux:BuildRequires: audit-libs-devel} BuildRequires: autoconf @@ -87,35 +90,34 @@ BuildRequires: binutils >= 2:2.17.50.0.7 %else BuildRequires: binutils >= 2:2.15.90.0.3 %endif -BuildRequires: gcc >= 5:3.4 +AutoReq: false +%{!?with_cross:BuildRequires: dietlibc-static} BuildRequires: gawk +BuildRequires: gcc >= 5:3.4 %{?with_memusage:BuildRequires: gd-devel >= 2.0.1} BuildRequires: gettext-devel >= 0.10.36 -%{!?with_cross:BuildRequires: dietlibc-static} %{?with_selinux:BuildRequires: libselinux-devel >= 1.18} BuildRequires: linux-libc-headers >= %{llh_version} BuildRequires: perl-base BuildRequires: rpm-build >= 4.3-0.20030610.28 BuildRequires: rpm-perlprov -BuildRequires: rpmbuild(macros) >= 1.315 +BuildRequires: rpmbuild(macros) >= 1.412 BuildRequires: sed >= 4.0.5 BuildRequires: texinfo -AutoReq: false +Requires(post): ldconfig = %{epoch}:%{version}-%{release} Requires: %{name}-misc = %{epoch}:%{version}-%{release} Requires: basesystem Requires: uname(release) >= %{min_kernel} -Provides: /sbin/ldconfig Provides: glibc(nptl) Provides: glibc(tls) -Provides: ldconfig Provides: rtld(GNU_HASH) Obsoletes: glibc-common Obsoletes: glibc-debug -Obsoletes: ldconfig %ifarch %{x8664} sparc64 ppc64 Provides: glibc64 Obsoletes: glibc64 %endif +Conflicts: SysVinit < 2.86-11 Conflicts: kernel < %{min_kernel} Conflicts: kernel24 Conflicts: kernel24-smp @@ -131,6 +133,11 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.* %define specflags_sparc64 -mcpu=ultrasparc -mvis -fcall-used-g6 +# ld.so needs not to be stripped to work +# gdb needs unstripped libpthread for some threading support +# ...but we can strip at least debuginfo from them +%define _autostripdebug .*/ld-[0-9.]*so\|.*/libpthread-[0-9.]*so + # -m from CFLAGS or even LDFLAGS is not propagated to some *.o linking %ifarch sparc sparcv9 %{expand:%%define __cc %{__cc} -m32} @@ -264,7 +271,6 @@ Summary: Utilities and data used by glibc Summary(pl.UTF-8): Narzędzia i dane używane przez glibc Group: Applications/System AutoReq: false -Requires(pre): %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release} %description misc @@ -273,6 +279,48 @@ Utilities and data used by glibc. %description misc -l pl.UTF-8 Narzędzia i dane używane przez glibc. +%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 +# 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 + +%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 uruchominy 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 devel Summary: Additional libraries required to compile Summary(de.UTF-8): Weitere Libraries zum Kompilieren @@ -485,8 +533,8 @@ Summary(ja.UTF-8): ネームサービスキャッシングデーモン (nacd) Summary(pl.UTF-8): Demon zapamiętujący odpowiedzi serwisów nazw Summary(ru.UTF-8): Кэширующий демон сервисов имен Summary(uk.UTF-8): Кешуючий демон севісів імен -Group: Networking/Daemons License: GPL v2 +Group: Networking/Daemons Requires(post): fileutils Requires(post,preun): /sbin/chkconfig Requires(postun): /usr/sbin/groupdel @@ -838,23 +886,21 @@ ln -s glibc-libidn-%{version} libidn %patch9 -p1 %patch10 -p1 %patch11 -p1 -%patch12 -p1 -%patch13 -p1 +%patch13 -p0 %patch14 -p0 - +%patch15 -p1 %patch17 -p1 - +%patch18 -p1 %patch20 -p1 -# needs update %patch21 -p1 %patch22 -p1 %patch23 -p1 -%patch24 -p1 %{?with_cross:%patch25 -p1} %patch26 -p1 -%ifarch sparc64 -%patch27 -p1 -%endif +%{?with_pax:%patch30 -p0} +%{?with_pax:%patch31 -p0} +%patch32 -p1 +%patch33 -p1 # these would be copied to localedb-src rm -f localedata/locales/*{.orig,~} @@ -921,8 +967,9 @@ cd .. done %endif -%if !%{with cross} -diet %{__cc} %{SOURCE7} %{rpmcflags} -Os -static -o glibc-postinst +%if %{without cross} +CC="%{__cc}" +diet ${CC#*ccache } %{SOURCE7} %{rpmcflags} -Os -static -o glibc-postinst %endif %install @@ -951,25 +998,29 @@ install elf/soinit.os $RPM_BUILD_ROOT%{_libdir}/soinit.o install elf/sofini.os $RPM_BUILD_ROOT%{_libdir}/sofini.o cd .. -%if !%{with cross} +%if %{without cross} install glibc-postinst $RPM_BUILD_ROOT/sbin %endif %{?with_memusage:mv -f $RPM_BUILD_ROOT/%{_lib}/libmemusage.so $RPM_BUILD_ROOT%{_libdir}} mv -f $RPM_BUILD_ROOT/%{_lib}/libpcprofile.so $RPM_BUILD_ROOT%{_libdir} -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/localtime # moved to tzdata package +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/localtime rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo ln -sf libbsd-compat.a $RPM_BUILD_ROOT%{_libdir}/libbsd.a # make symlinks across top-level directories absolute for l in anl BrokenLocale crypt dl m nsl resolv rt thread_db util ; do + test -L $RPM_BUILD_ROOT%{_libdir}/lib${l}.so || exit 1 rm -f $RPM_BUILD_ROOT%{_libdir}/lib${l}.so - ln -sf /%{_lib}/`cd $RPM_BUILD_ROOT/%{_lib} ; echo lib${l}.so.*` $RPM_BUILD_ROOT%{_libdir}/lib${l}.so + ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/lib${l}.so.*) $RPM_BUILD_ROOT%{_libdir}/lib${l}.so done +# linking nss modules directly is not supported +rm -f $RPM_BUILD_ROOT%{_libdir}/libnss_*.so + install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/nscd install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/nscd install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/nscd @@ -996,33 +1047,13 @@ for f in ANNOUNCE ChangeLog DESIGN-{barrier,condvar,rwlock,sem}.txt TODO{,-kerne done cp -f crypt/README.ufc-crypt ChangeLog* documentation -rm -f $RPM_BUILD_ROOT%{_libdir}/libnss_*.so - -# strip ld.so with --strip-debug only (other ELFs are stripped by rpm): -%{!?debug:strip -g -R .comment -R .note $RPM_BUILD_ROOT/%{_lib}/ld-*.so} - # Collect locale files and mark them with %%lang() rm -f glibc.lang echo '%defattr(644,root,root,755)' > glibc.lang -for i in $RPM_BUILD_ROOT%{_datadir}/locale/* $RPM_BUILD_ROOT%{_libdir}/locale/* ; do +for i in $RPM_BUILD_ROOT%{_datadir}/locale/* ; do if [ -d $i ]; then - lang=`echo $i | sed -e 's/.*locale\///' -e 's/\/.*//'` - twochar=1 - # list of long %%lang values we do support - for j in de_AT de_BE de_CH de_LU es_AR es_MX pt_BR \ - zh_CN zh_CN.gbk zh_HK zh_TW ; do - if [ $j = "$lang" ]; then - twochar= - fi - done - if [ -n "$twochar" ]; then - if [ `echo $lang | sed "s,_.*,,"` = "zh" ]; then - lang=`echo $lang | sed "s,\..*,,"` - else - lang=`echo $lang | sed "s,_.*,,"` - fi - fi - dir=`echo $i | sed "s#$RPM_BUILD_ROOT##"` + lang=$(basename $i) + dir="${i#$RPM_BUILD_ROOT}" echo "%lang($lang) $dir" >> glibc.lang fi done @@ -1049,18 +1080,28 @@ done # sv tr zh_CN zh_TW # for i in aa aa@saaho af am an ang ar as ast az be@alternative be@latin bg bn \ - bn_IN br bs byn ca_ES csb cy de_AT dz en en@boldquot en@quot en_AU en_CA en_US \ - eo es_AR es_MX es_NI es_PR et eu fa fil fo fr_BE fur fy ga gd gez gu gv \ - he hi hsb hy ia id ik is it_CH iu ka kk kl km kn ku kw ky lg li lo lt lv \ - mai mg mi mk ml mn mr ms mt nds ne nl_BE nn nr nso oc om or pa pap pt rm \ - ro sa sc se si sid sl so sq sr sr@Latn sr@ije sr@latin ss st sw ta te tg th ti tig \ - tk tl tlh tn ts tt ug uk uk_UA ur uz uz@cyrillic ve vi wa wal wo xh yi yo zh_HK \ - zu ; do + bn_IN br bs byn csb cy de_AT dz en en@boldquot en@quot en_AU en_CA en_US \ + eo es_AR es_CO es_MX es_NI es_PR et eu fa fil fo fr_BE fur fy ga gd gez \ + gu gv he hi hsb hy ia id ik is it_CH iu ka kk kl km kn ku kw ky lg li lo \ + lt lv mai mg mi mk ml mn mr ms mt nds ne nl_BE nn nr nso oc om or pa pap \ + pt rm ro sa sc se si sid sl so sq sr sr@Latn sr@ije sr@latin ss st sw ta \ + te tg th ti tig tk tl tlh tn ts tt ug uk ur uz uz@cyrillic ve vi wa wal \ + wo xh yi yo zh_HK zu ; do if [ ! -d $RPM_BUILD_ROOT%{_datadir}/locale/$i/LC_MESSAGES ]; then install -d $RPM_BUILD_ROOT%{_datadir}/locale/$i/LC_MESSAGES - lang=`echo $i | sed -e 's/_.*//'` + # use lang() tags with ll_CC@variant (stripping charset and @quot|@boldquot) + lang=`echo $i | sed -e 's/@quot\>\|@boldquot\>//'` + echo "%lang($lang) %{_datadir}/locale/$i" >> glibc.lang + fi +done + +# LC_TIME category, used for localized date formats (at least by coreutils) +for i in af be bg ca cs da de el es et eu fi fr ga gl hu it ja ko ms nb nl pl \ + pt pt_BR ru rw sk sl sv tr zh_CN zh_TW ; do + if [ ! -d $RPM_BUILD_ROOT%{_datadir}/locale/$i ]; then echo "%lang($lang) %{_datadir}/locale/$i" >> glibc.lang fi + install -d $RPM_BUILD_ROOT%{_datadir}/locale/$i/LC_TIME done # localedb-gen infrastructure @@ -1085,15 +1126,13 @@ rm -rf $RPM_BUILD_ROOT # don't run iconvconfig in %%postun -n iconv because iconvconfig doesn't exist # when %%postun is run -%if !%{with cross} +%if %{without cross} %post -p /sbin/postshell /sbin/glibc-postinst /%{_lib}/%{_host_cpu} /%{_lib}/tls /sbin/ldconfig --/sbin/telinit u %postun -p /sbin/postshell /sbin/ldconfig --/sbin/telinit u %triggerpostun -p /sbin/postshell -- glibc-misc < 6:2.3.5-7.6 -/bin/cp -f /etc/ld.so.conf /etc/ld.so.conf.rpmsave @@ -1141,25 +1180,19 @@ fi %if !%{with cross} %attr(755,root,root) /sbin/glibc-postinst %endif -%attr(755,root,root) /sbin/ldconfig -# ld* and libc.so.6 SONAME symlinks must be in package because of -# chicken-egg problem (postshell is dynamically linked with libc); -# NOTE: postshell is now linked statically with diet -# ld-*.so SONAME is: +# ld*.so SONAME is: # ld.so.1 on ppc # ld64.so.1 on ppc64,s390x # ld-linux-ia64.so.2 on ia64 # ld-linux-x86-64.so.2 on x86_64 # ld-linux.so.2 on other archs +# TODO: package ldconfig symlinks as %ghost %attr(755,root,root) /%{_lib}/ld* %attr(755,root,root) /%{_lib}/libanl* %attr(755,root,root) /%{_lib}/libdl* %attr(755,root,root) /%{_lib}/libnsl* %attr(755,root,root) /%{_lib}/lib[BScmprtu]* %{?with_localedb:%dir %{_libdir}/locale} -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf -%dir %{_sysconfdir}/ld.so.conf.d -%ghost %{_sysconfdir}/ld.so.cache #%files -n nss_dns %defattr(644,root,root,755) @@ -1169,6 +1202,21 @@ fi %defattr(644,root,root,755) %attr(755,root,root) /%{_lib}/libnss_files*.so* +%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 +%attr(755,root,root) /sbin/ldconfig +%{_mandir}/man8/ldconfig.8* +%lang(es) %{_mandir}/es/man8/ldconfig.8* +%lang(fr) %{_mandir}/fr/man8/ldconfig.8* +%lang(hu) %{_mandir}/hu/man8/ldconfig.8* +%lang(ja) %{_mandir}/ja/man8/ldconfig.8* +%lang(pl) %{_mandir}/pl/man8/ldconfig.8* +%lang(pt) %{_mandir}/pt/man8/ldconfig.8* +%lang(ru) %{_mandir}/ru/man8/ldconfig.8* + %files misc -f %{name}.lang %defattr(644,root,root,755) @@ -1210,7 +1258,9 @@ fi %{_mandir}/man5/nsswitch.conf.5* %{_mandir}/man5/tzfile.5* %{_mandir}/man7/* -%{_mandir}/man8/ld*.8* +%{_mandir}/man8/ld-linux.8* +%{_mandir}/man8/ld-linux.so.8* +%{_mandir}/man8/ld.so.8* %{_mandir}/man8/sln.8* %{_mandir}/man8/tzselect.8* %{_mandir}/man8/zdump.8* @@ -1223,7 +1273,9 @@ fi %lang(es) %{_mandir}/es/man5/nsswitch.conf.5* %lang(es) %{_mandir}/es/man5/tzfile.5* %lang(es) %{_mandir}/es/man7/* -%lang(es) %{_mandir}/es/man8/ld*.8* +%lang(es) %{_mandir}/es/man8/ld-linux.8* +%lang(es) %{_mandir}/es/man8/ld-linux.so.8* +%lang(es) %{_mandir}/es/man8/ld.do.8* %lang(es) %{_mandir}/es/man8/tzselect.8* %lang(es) %{_mandir}/es/man8/zdump.8* %lang(es) %{_mandir}/es/man8/zic.8* @@ -1233,13 +1285,17 @@ fi %lang(fr) %{_mandir}/fr/man5/nsswitch.conf.5* %lang(fr) %{_mandir}/fr/man5/tzfile.5* %lang(fr) %{_mandir}/fr/man7/* -%lang(fr) %{_mandir}/fr/man8/ld*.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/tzselect.8* %lang(fr) %{_mandir}/fr/man8/zdump.8* %lang(fr) %{_mandir}/fr/man8/zic.8* %lang(hu) %{_mandir}/hu/man1/ldd.1* %lang(hu) %{_mandir}/hu/man7/* -%lang(hu) %{_mandir}/hu/man8/ld*.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/zdump.8* %lang(it) %{_mandir}/it/man5/locale.5* %lang(it) %{_mandir}/it/man7/* @@ -1251,7 +1307,9 @@ fi %lang(ja) %{_mandir}/ja/man5/nsswitch.conf.5* %lang(ja) %{_mandir}/ja/man5/tzfile.5* %lang(ja) %{_mandir}/ja/man7/* -%lang(ja) %{_mandir}/ja/man8/ld*.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/sln.8* %lang(ja) %{_mandir}/ja/man8/tzselect.8* %lang(ja) %{_mandir}/ja/man8/zdump.8* @@ -1265,12 +1323,13 @@ fi %lang(pl) %{_mandir}/pl/man1/ldd.1* %lang(pl) %{_mandir}/pl/man5/locale.5* %lang(pl) %{_mandir}/pl/man7/* -%lang(pl) %{_mandir}/pl/man8/ld*.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(pt) %{_mandir}/pt/man5/locale.5* %lang(pt) %{_mandir}/pt/man5/nsswitch.conf.5* %lang(pt) %{_mandir}/pt/man5/tzfile.5* %lang(pt) %{_mandir}/pt/man7/* -%lang(pt) %{_mandir}/pt/man8/ld*.8* %lang(pt) %{_mandir}/pt/man8/tzselect.8* %lang(pt) %{_mandir}/pt/man8/zdump.8* %lang(pt) %{_mandir}/pt/man8/zic.8* @@ -1283,7 +1342,8 @@ fi %lang(ru) %{_mandir}/ru/man5/nsswitch.conf.5* %lang(ru) %{_mandir}/ru/man5/tzfile.5* %lang(ru) %{_mandir}/ru/man7/* -%lang(ru) %{_mandir}/ru/man8/ld*.8* +%lang(ru) %{_mandir}/ru/man8/ld-linux.so.8* +%lang(ru) %{_mandir}/ru/man8/ld.so.8* %lang(ru) %{_mandir}/ru/man8/tzselect.8* %lang(ru) %{_mandir}/ru/man8/zdump.8* %lang(ru) %{_mandir}/ru/man8/zic.8*