X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=glibc.spec;h=10f68aeef7aef7e13a1c88cc67e637214bd7e2f3;hb=f307cfc5e7e607b77a268164e1ee37db00c51e0d;hp=ef931024858be27bf0efcfb6e404148d2bcf5b34;hpb=62269e77b11e131ea6f7337b1512dd898199fd57;p=packages%2Fglibc.git diff --git a/glibc.spec b/glibc.spec index ef93102..10f68ae 100644 --- a/glibc.spec +++ b/glibc.spec @@ -15,12 +15,14 @@ %bcond_with tests # perform "make test" %bcond_with tests_nptl # perform NPTL tests on dual build (requires 2.6.x kernel) %bcond_without localedb # don't build localedb-all (is time consuming) - -%bcond_without comdat # without (unfinished) comdat hacks [for Ac] - +%bcond_with cross # build using crossgcc (without libgcc_eh) # # TODO: # - look at locale fixes/updates in bugzilla +# - usable persitent storage in nscd: +# - change persistent storage paths to /var/lib/nscd (to be FHS 2.3 compliant) +# (see glibc/nscd/nscd.h) +# - create nscd user, use it in nscd.conf (see -pld.patch) # [OLD] # - localedb-gen man pages(?) # - fix what trojan broke while upgreading (getaddrinfo-workaround) @@ -39,13 +41,14 @@ %if %{with tls} # sparc temporarily removed (broken) -%ifnarch %{ix86} amd64 ia64 alpha s390 s390x sparc64 sparcv9 ppc ppc64 +%ifnarch %{ix86} amd64 ia64 alpha s390 s390x sparc64 sparcv9 ppc ppc64 %undefine with_tls %endif %endif %if %{with nptl} -# nptl on x86 uses cmpxchgl (available since i486) +# on x86 uses cmpxchgl (available since i486) +# on sparc only sparcv9 is supported %ifnarch i486 i586 i686 pentium3 pentium4 athlon amd64 ia64 alpha s390 s390x sparc64 sparcv9 ppc ppc64 %undefine with_nptl %else @@ -76,7 +79,7 @@ Summary(tr): GNU libc Summary(uk): GNU libc ×ÅÒÓ¦§ 2.3 Name: glibc Version: 2.3.4 -Release: 0.99999999.1 +Release: 0.99999999.2 Epoch: 6 License: LGPL Group: Libraries @@ -93,7 +96,6 @@ Source5: %{name}-man-pages.tar.bz2 #Source6: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2 Source6: %{name}-non-english-man-pages.tar.bz2 # Source6-md5: 6159f0a9b6426b5f6fc1b0d8d21b9b76 -# borrowed from util-linux Source7: %{name}-localedb-gen Patch0: %{name}-info.patch Patch1: %{name}-pl.po-update.patch @@ -122,14 +124,20 @@ Patch23: %{name}-locale_fixes.patch Patch24: %{name}-ZA_collate.patch Patch25: %{name}-tls_fix.patch Patch26: %{name}-nscd.patch -Patch27: %{name}-comdat.patch -# PaX hacks (dropped) -#Patch28: %{name}-pax_iconvconfig.patch -#Patch29: %{name}-pax_dl-execstack.patch +Patch27: %{name}-iconvconfig-nxstack.patch +Patch28: %{name}-gcc4.patch +Patch29: %{name}-cross-gcc_eh.patch +# PaX hack (dropped) +#Patch30: %{name}-pax_dl-execstack.patch URL: http://www.gnu.org/software/libc/ BuildRequires: automake BuildRequires: binutils >= 2:2.15.90.0.3 BuildRequires: gcc >= 3.2 +%ifarch ppc ppc64 sparc sparcv9 sparc64 +%if %{with nptl} || %{with __thread} +BuildRequires: gcc >= 5:3.4 +%endif +%endif %{?with_memusage:BuildRequires: gd-devel >= 2.0.1} BuildRequires: gettext-devel >= 0.10.36 %if %{without kernelheaders} @@ -139,6 +147,7 @@ BuildRequires: linux-libc-headers >= %{llh_version} BuildRequires: perl-base BuildRequires: rpm-build >= 4.3-0.20030610.28 BuildRequires: rpm-perlprov +BuildRequires: rpmbuild(macros) >= 1.159 BuildRequires: sed >= 4.0.5 BuildRequires: texinfo AutoReq: false @@ -160,10 +169,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define debugcflags -O1 -g # avoid -s here (ld.so must not be stripped to allow any program debugging) %define rpmldflags %{nil} -%ifarch sparc64 -%define specflags_sparc64 -mvis -fcall-used-g6 -%define _libdir /usr/lib64 -%endif +%define specflags_sparc64 -mcpu=ultrasparc -mvis -fcall-used-g6 # we don't want perl dependency in glibc-devel %define _noautoreqfiles %{_bindir}/mtrace # hack: don't depend on rpmlib(PartialHardlinkSets) for easier upgrade from Ra @@ -380,9 +386,18 @@ Summary(ru): Summary(uk): ëÅÛÕÀÞÉÊ ÄÅÍÏÎ ÓÅ×¦Ó¦× ¦ÍÅÎ Group: Networking/Daemons PreReq: rc-scripts >= 0.2.0 +Requires(pre): /bin/id +Requires(pre): /usr/bin/getgid +Requires(pre): /usr/sbin/groupadd +Requires(pre): /usr/sbin/useradd Requires(post,preun): /sbin/chkconfig Requires(post): fileutils +Requires(postun): /usr/sbin/groupdel +Requires(postun): /usr/sbin/userdel Requires: %{name} = %{epoch}:%{version}-%{release} +%{?with_selinux:Requires: libselinux >= 1.18} +Provides: group(nscd) +Provides: user(nscd) %description -n nscd nscd caches name service lookups; it can dramatically improve @@ -731,7 +746,7 @@ Summary: GNU libc - 64-bit libraries Summary(es): GNU libc - bibliotecas de 64 bits Summary(pl): GNU libc - biblioteki 64-bitowe Group: Libraries -%ifarch amd64 +%ifarch amd64 ppc64 s390x sparc64 Provides: glibc = %{epoch}:%{version}-%{release} Requires: glibc-misc = %{epoch}:%{version}-%{release} %else @@ -812,7 +827,9 @@ Statyczne 64-bitowe biblioteki GNU libc. %patch24 -p1 %patch25 -p1 %patch26 -p1 -%{?with_comdat:%patch27 -p1} +%patch27 -p1 +%patch28 -p1 +%{?with_cross:%patch29 -p1} chmod +x scripts/cpp @@ -828,6 +845,9 @@ cp -f /usr/share/automake/config.sub scripts rm -rf builddir install -d builddir cd builddir +%ifarch sparc64 +CC="%{__cc} -m64 -mcpu=ultrasparc -mvis -fcall-used-g6" +%endif %if %{with linuxthreads} ../%configure \ --enable-kernel="%{min_kernel}" \ @@ -886,7 +906,7 @@ done %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_mandir}/man{3,8},/var/log,/var/run/nscd} +install -d $RPM_BUILD_ROOT{/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_mandir}/man{3,8},/var/log,/var/{lib,run}/nscd} cd builddir env LANGUAGE=C LC_ALL=C \ @@ -947,9 +967,7 @@ rm -rf $RPM_BUILD_ROOT/nptl %endif %{?with_memusage:mv -f $RPM_BUILD_ROOT/%{_lib}/libmemusage.so $RPM_BUILD_ROOT%{_libdir}} -%ifnarch sparc64 mv -f $RPM_BUILD_ROOT/%{_lib}/libpcprofile.so $RPM_BUILD_ROOT%{_libdir} -%endif %if %{with linuxthreads} install linuxthreads/man/*.3thr $RPM_BUILD_ROOT%{_mandir}/man3 @@ -989,6 +1007,9 @@ bzip2 -dc %{SOURCE6} | tar xf - -C $RPM_BUILD_ROOT%{_mandir} rm -f $RPM_BUILD_ROOT%{_mandir}/hu/man7/man.7 :> $RPM_BUILD_ROOT/var/log/nscd +:> $RPM_BUILD_ROOT/var/lib/nscd/passwd +:> $RPM_BUILD_ROOT/var/lib/nscd/group +:> $RPM_BUILD_ROOT/var/lib/nscd/hosts rm -rf documentation install -d documentation @@ -1010,9 +1031,7 @@ cp -f ChangeLog* documentation rm -f $RPM_BUILD_ROOT%{_libdir}/libnss_*.so # strip ld.so with --strip-debug only (other ELFs are stripped by rpm): -%ifnarch sparc64 %{!?debug:strip -g -R .comment -R .note $RPM_BUILD_ROOT/%{_lib}/ld-*.so} -%endif # Collect locale files and mark them with %%lang() rm -f glibc.lang @@ -1078,8 +1097,7 @@ rm -rf $RPM_BUILD_ROOT # don't run iconvconfig in %%postun -n iconv because iconvconfig doesn't exist # when %%postun is run -%ifnarch sparc64 -%ifarch amd64 +%ifarch amd64 ppc64 s390x sparc64 %post -n %{name}64 -p /sbin/postshell %else %post -p /sbin/postshell @@ -1087,7 +1105,7 @@ rm -rf $RPM_BUILD_ROOT /sbin/ldconfig -/sbin/telinit u -%ifarch amd64 +%ifarch amd64 ppc64 s390x sparc64 %postun -n %{name}64 -p /sbin/postshell %else %postun -p /sbin/postshell @@ -1095,7 +1113,7 @@ rm -rf $RPM_BUILD_ROOT /sbin/ldconfig -/sbin/telinit u -%ifarch amd64 +%ifarch amd64 ppc64 s390x sparc64 %triggerpostun -n %{name}64 -p /sbin/postshell -- glibc-misc < 6:2.3.4-0.20040505.1 %else %triggerpostun -p /sbin/postshell -- glibc-misc < 6:2.3.4-0.20040505.1 @@ -1113,6 +1131,24 @@ rm -rf $RPM_BUILD_ROOT %postun devel [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 +%pre -n nscd +if [ -n "`/usr/bin/getgid nscd`" ]; then + if [ "`/usr/bin/getgid nscd`" != "144" ]; then + echo "Error: group nscd doesn't have gid=144. Correct this before installing nscd." 1>&2 + exit 1 + fi +else + /usr/sbin/groupadd -g 144 -r nscd +fi +if [ -n "`/bin/id -u nscd 2>/dev/null`" ]; then + if [ "`/bin/id -u nscd`" != "144" ]; then + echo "Error: user nscd doesn't have uid=144. Correct this before installing nscd." 1>&2 + exit 1 + fi +else + /usr/sbin/useradd -u 144 -r -d /tmp -s /bin/false -c "nscd" -g nscd nscd 1>&2 +fi + %post -n nscd /sbin/chkconfig --add nscd touch /var/log/nscd @@ -1132,10 +1168,14 @@ if [ "$1" = "0" ]; then fi /sbin/chkconfig --del nscd fi -%endif -%ifnarch sparc64 -%ifarch amd64 +%postun -n nscd +if [ "$1" = "0" ]; then + %userremove nscd + %groupremove nscd +fi + +%ifarch amd64 ppc64 s390x sparc64 %files -n glibc64 %defattr(644,root,root,755) %else @@ -1164,7 +1204,7 @@ fi %attr(755,root,root) /%{_lib}/tls/lib[cmprt]* %endif %{?with_localedb:%dir %{_libdir}/locale} -%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/ld.so.conf +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf %ghost %{_sysconfdir}/ld.so.cache #%files -n nss_dns @@ -1178,7 +1218,7 @@ fi %files misc -f %{name}.lang %defattr(644,root,root,755) -%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/nsswitch.conf +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nsswitch.conf %config %{_sysconfdir}/rpc %attr(755,root,root) /sbin/sln @@ -1187,7 +1227,7 @@ fi %attr(755,root,root) %{_bindir}/getent %attr(755,root,root) %{_bindir}/iconv %attr(755,root,root) %{_bindir}/ldd -%ifnarch alpha amd64 ia64 ppc sparc64 +%ifarch %{ix86} m68k sparc sparcv9 %attr(755,root,root) %{_bindir}/lddlibc4 %endif %attr(755,root,root) %{_bindir}/locale @@ -1402,13 +1442,17 @@ fi %files -n nscd %defattr(644,root,root,755) -%attr(640,root,root) %config %verify(not md5 size mtime) /etc/sysconfig/nscd -%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/nscd.* +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nscd +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nscd.* %attr(754,root,root) /etc/rc.d/init.d/nscd %attr(755,root,root) %{_sbindir}/nscd* -%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/nscd +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/nscd %attr(640,root,root) %ghost /var/log/nscd %dir /var/run/nscd +%dir /var/lib/nscd +%attr(600,root,root) %ghost /var/lib/nscd/passwd +%attr(600,root,root) %ghost /var/lib/nscd/group +%attr(600,root,root) %ghost /var/lib/nscd/hosts %{_mandir}/man5/nscd.conf.5* %{_mandir}/man8/nscd.8* %{_mandir}/man8/nscd_nischeck.8* @@ -1469,44 +1513,3 @@ fi %{_libdir}/lib*.map %{_libdir}/soinit.o %{_libdir}/sofini.o - -%else - -%files -n glibc64 -%defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/ld-* -%attr(755,root,root) %{_libdir}/libanl* -%attr(755,root,root) %{_libdir}/libdl* -%attr(755,root,root) %{_libdir}/libnsl* -%attr(755,root,root) %{_libdir}/lib[BScmprtu]* -%attr(755,root,root) %{_libdir}/libnss_dns*.so* -%attr(755,root,root) %{_libdir}/libnss_files*.so* - -%files -n glibc64-devel -%defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/lib[!m]*.so -%attr(755,root,root) %{_libdir}/libm.so -%attr(755,root,root) %{_libdir}/*crt*.o -%{_libdir}/libbsd-compat.a -%{_libdir}/libbsd.a -%{_libdir}/libc_nonshared.a -%{_libdir}/libg.a -%{_libdir}/libieee.a -%{_libdir}/libpthread_nonshared.a -%{_libdir}/librpcsvc.a - -%files -n glibc64-static -%defattr(644,root,root,755) -%{_libdir}/libanl.a -%{_libdir}/libBrokenLocale.a -%{_libdir}/libc.a -%{_libdir}/libcrypt.a -%{_libdir}/libdl.a -%{_libdir}/libm.a -%{_libdir}/libmcheck.a -%{_libdir}/libnsl.a -%{_libdir}/libpthread.a -%{_libdir}/libresolv.a -%{_libdir}/librt.a -%{_libdir}/libutil.a -%endif