]> git.pld-linux.org Git - packages/glibc.git/blobdiff - glibc.spec
- updated paths patch: set nscd persistent storage dir to /var/lib/nscd
[packages/glibc.git] / glibc.spec
index c80a23c8f66545ca456917feab16c4e0b5c9797f..10f68aeef7aef7e13a1c88cc67e637214bd7e2f3 100644 (file)
@@ -1,58 +1,72 @@
 #
 # You can define min_kernel macro by "rpm --define 'min_kernel version'"
-# default is 2.4.6
+# default is 2.4.6 for linuxthreads, 2.6.0 for NPTL
 #
 # Conditional build:
 %bcond_with    omitfp          # build without frame pointer (pass \--enable-omitfp)
 %bcond_without memusage        # don't build memusage utility
-%bcond_with    kernelheaders   # use headers from kernel-headers instead of
+%bcond_with    kernelheaders   # use headers from %{_kernelsrcdir} instead of
                                # linux-libc-headers (evil, breakage etc., don't use)
-%bcond_without dist_kernel     # for above, allow non-distribution kernel
-%bcond_without nptl            # don't use NPTL (implies using linuxthreads)
-%bcond_without tls             # don't use tls (implies no NPTL)
+%bcond_without linuxthreads    # don't build linuxthreads version (NPTL only)
+%bcond_without nptl            # don't build NPTL version (linuxthreads only)
+%bcond_without tls             # don't support TLS at all (implies no NPTL)
+%bcond_with    __thread        # use TLS in linuxthreads
+%bcond_without selinux         # without SELinux support (in nscd)
 %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_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)
 # - math/{test-fenv,test-tgmath,test-float,test-ifloat},
 #   linuxthreads/tst-cancel8, debug/backtrace-tst(SEGV)  fail on alpha
+# - problem compiling with --enable-bounded (must be reported to libc-alpha)
+#   (is this comment still valid???)
 #
 
 %{!?min_kernel:%global          min_kernel      2.4.6}
-
-%if %{with nptl}
-# it seems that nptl uses cmpxchgl (available since i486) on x86
-%ifarch i486 i586 i686 pentium3 pentium4 athlon amd64 ia64 alpha s390 s390x sparcv9 ppc ppc64
 %if "%{min_kernel}" < "2.6.0"
-%global                min_kernel      2.6.0
-%endif
-%endif
+%global                nptl_min_kernel 2.6.0
+%else
+%global                nptl_min_kernel %{min_kernel}
 %endif
 
 %if %{with tls}
-%ifnarch %{ix86} amd64 ia64 alpha s390 s390x sparc sparcv9 ppc ppc64
+# sparc temporarily removed (broken)
+%ifnarch %{ix86} amd64 ia64 alpha s390 s390x sparc64 sparcv9 ppc ppc64
 %undefine      with_tls
 %endif
 %endif
 
+%if %{with nptl}
+# 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
 %if %{without tls}
-# NPTL requires TLS
 %undefine      with_nptl
 %endif
+%endif
+%endif
 
 %ifarch sparc64
 %undefine      with_memusage
 %endif
 
-%ifarch sparc
-%undefine      with_nptl
-#%%undefine    with_tls
+%if %{with linuxthreads} && %{with nptl}
+%define                with_dual       1
 %endif
 
 %define                llh_version     7:2.6.6.0
-%define                _snap           20041030
 
 Summary:       GNU libc
 Summary(de):   GNU libc
@@ -65,28 +79,23 @@ Summary(tr):        GNU libc
 Summary(uk):   GNU libc ×ÅÒÓ¦§ 2.3
 Name:          glibc
 Version:       2.3.4
-Release:       0.%{_snap}.8%{!?with_nptl:+nonptl}%{!?with_nptl:%{!?with_tls:+notls}}
+Release:       0.99999999.2
 Epoch:         6
 License:       LGPL
 Group:         Libraries
-#Source0:      ftp://sources.redhat.com/pub/glibc/releases/%{name}-%{version}.tar.bz2
-Source0:       %{name}-%{_snap}.tar.bz2
-# Source0-md5: 4e14871efd881fbbf523a0ba16175bc7
-# Source0-size:        13680659
-#Source1:      ftp://sources.redhat.com/pub/glibc/releases/%{name}-linuxthreads-%{version}.tar.bz2
-#Source1:      %{name}-linuxthreads-2.3.3.tar.bz2
+Source0:       ftp://sources.redhat.com/pub/glibc/releases/%{name}-%{version}.tar.bz2
+# Source0-md5: 174ac5ed4f2851fcc866a3bac1e4a6a5
+Source1:       ftp://sources.redhat.com/pub/glibc/releases/%{name}-linuxthreads-%{version}.tar.bz2
+# Source1-md5: 7a199cd4965eb5622163756ae64358fe
 Source2:       nscd.init
 Source3:       nscd.sysconfig
 Source4:       nscd.logrotate
 #Source5:      http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-man-pages.tar.bz2
 Source5:       %{name}-man-pages.tar.bz2
 # Source5-md5: 03bee93e9786b3e7dad2570ccb0cbc5c
-# Source5-size:        283971
 #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
-# Source6-size:        1322469
-# borrowed from util-linux
 Source7:       %{name}-localedb-gen
 Patch0:                %{name}-info.patch
 Patch1:                %{name}-pl.po-update.patch
@@ -95,55 +104,56 @@ Patch3:            %{name}-crypt-blowfish.patch
 Patch4:                %{name}-linuxthreads-lock.patch
 Patch5:                %{name}-pthread_create-manpage.patch
 Patch6:                %{name}-paths.patch
-Patch8:                %{name}-postshell.patch
-Patch9:                %{name}-missing-nls.patch
-Patch10:       %{name}-java-libc-wait.patch
-Patch11:       %{name}-lthrds_noomit.patch
-Patch12:       %{name}-no_opt_override.patch
-# this is broken (hardcoded /usr/src/linux)
-Patch13:       %{name}-kernel_includes.patch
-Patch14:       %{name}-includes.patch
-Patch15:       %{name}-soinit-EH_FRAME.patch
-Patch16:       %{name}-sparc-errno_fix.patch
-Patch17:       %{name}-csu-quotes.patch
-Patch18:       %{name}-tests-noproc.patch
-Patch19:       %{name}-new-charsets.patch
-Patch20:       %{name}-sr_CS.patch
-Patch21:       %{name}-sparc64-dl-machine.patch
-Patch22:       %{name}-tzfile-noassert.patch
-Patch23:       %{name}-ifreq.patch
-Patch24:       %{name}-morelocales.patch
-Patch25:       %{name}-ppc-getcontext.patch
-Patch26:       %{name}-locale_fixes.patch
-Patch27:       %{name}-LD_DEBUG.patch
-# PaX
-Patch30:       %{name}-pax_iconvconfig.patch
-Patch31:       %{name}-pax_dl-execstack.patch
-Patch32:       %{name}-sparc_comdat.patch
-Patch33:       %{name}-alpha_giduidfix.patch
-Patch34:       %{name}-ia64_unwind.patch
+Patch7:                %{name}-postshell.patch
+Patch8:                %{name}-missing-nls.patch
+Patch9:                %{name}-java-libc-wait.patch
+Patch10:       %{name}-lthrds_noomit.patch
+Patch11:       %{name}-no_opt_override.patch
+Patch12:       %{name}-includes.patch
+Patch13:       %{name}-soinit-EH_FRAME.patch
+Patch14:       %{name}-sparc-errno_fix.patch
+Patch15:       %{name}-csu-quotes.patch
+Patch16:       %{name}-tests-noproc.patch
+Patch17:       %{name}-new-charsets.patch
+Patch18:       %{name}-sr_CS.patch
+Patch19:       %{name}-sparc64-dl-machine.patch
+Patch20:       %{name}-tzfile-noassert.patch
+Patch21:       %{name}-morelocales.patch
+Patch22:       %{name}-locale_ZA.patch
+Patch23:       %{name}-locale_fixes.patch
+Patch24:       %{name}-ZA_collate.patch
+Patch25:       %{name}-tls_fix.patch
+Patch26:       %{name}-nscd.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 %{with kernelheaders}
-%{?with_dist_kernel:BuildRequires:     kernel-headers < 2.5}
-%else
+%if %{without kernelheaders}
 BuildRequires: linux-libc-headers >= %{llh_version}
 %endif
-BuildRequires: libselinux-devel
+%{?with_selinux:BuildRequires: libselinux-devel >= 1.18}
 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
 PreReq:                basesystem
 Requires:      glibc-misc = %{epoch}:%{version}-%{release}
 %{?with_tls:Provides:  glibc(tls)}
-Provides:      ld.so.2
 Provides:      ldconfig
 Provides:      /sbin/ldconfig
 Obsoletes:     %{name}-common
@@ -157,10 +167,9 @@ Conflicts: rpm < 4.1
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                debugcflags     -O1 -g
-%ifarch sparc64
-%define        specflags_sparc64       -mvis -fcall-used-g6
-%define                _libdir                 /usr/lib64
-%endif
+# avoid -s here (ld.so must not be stripped to allow any program debugging)
+%define                rpmldflags      %{nil}
+%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
@@ -168,6 +177,11 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 # patched not to crash on partial hardlinks too)
 %define                _hack_dontneed_PartialHardlinkSets      1
 %define                _noautochrpath          .*\\(ldconfig\\|sln\\)
+%if %{with kernelheaders}
+%define                sysheaders      %{_kernelsrcdir}/include
+%else
+%define                sysheaders      %{_includedir}
+%endif
 
 %description
 Contains the standard libraries that are used by multiple programs on
@@ -309,6 +323,7 @@ Group:              Development/Libraries
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 %{!?with_kernelheaders:Requires:       linux-libc-headers >= %{llh_version}}
 Obsoletes:     libiconv-devel
+Obsoletes:     glibc-headers
 
 %description devel
 To develop programs which use the standard C libraries (which nearly
@@ -371,35 +386,35 @@ 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
-performance with NIS+, and may help with DNS as well. You cannot use
-nscd with 2.0 kernels, due to bugs in the kernel-side thread support.
-nscd happens to hit these bugs particularly hard.
+performance with NIS+, and may help with DNS as well.
 
 %description -n nscd -l es
 nscd guarda las peticiones del servicio de nombres en una caché; eso
 puede aumentar drásticamente las prestaciones de NIS+, y también puede
-ayudar con DNS. No puede usar nscd con núcleos 2.0, por contener éstos
-errores en el soporte de hilos. Resulta que estos errores impactan el
-nscd de manera realmente grave.
+ayudar con DNS.
 
 %description -n nscd -l ja
 Nscd ¤Ï¥Í¡¼¥à¥µ¡¼¥Ó¥¹»²¾È¤ò¥­¥ã¥Ã¥·¥å¤·¡¢NIS+ ¤Î¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤ò
-¥É¥é¥Þ¥Æ¥£¥Ã¥¯¤Ë²þÁ±¤¹¤ë¤³¤È¤¬¤Ç¤­¡¢DNS ¤òƱÍͤËÊä½õ¤·¤Þ¤¹¡£ 2.0
-¥«¡¼¥Í¥ë¤Ç nscd ¤ò»ÈÍѤ¹¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£
-¤½¤ì¤Ï¡¢¥«¡¼¥Í¥ë¦¤Î¥¹¥ì¥Ã¥É¥µ¥Ý¡¼¥È¤Ë¥Ð¥°¤¬¤¢¤ë¤«¤é¤Ç¤¹¡£ÉÔ¹¬¤Ê¤³¤È¤Ë¡¢
-nscd ¤Ï¤³¤ì¤é¤Î¥Ð¥°¤ËÆäˤϤ²¤·¤¯¤¢¤¿¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
+¥É¥é¥Þ¥Æ¥£¥Ã¥¯¤Ë²þÁ±¤¹¤ë¤³¤È¤¬¤Ç¤­¡¢DNS ¤òƱÍͤËÊä½õ¤·¤Þ¤¹¡£
 
 %description -n nscd -l pl
 nscd zapamiêtuje zapytania i odpowiedzi NIS oraz DNS. Pozwala
-drastycznie poprawiæ szybko¶æ dzia³ania NIS+. Nie jest mo¿liwe
-u¿ywanie nscd z j±drami serii 2.0.x z powodu b³êdów po stronie j±dra w
-obs³udze w±tków.
+drastycznie poprawiæ szybko¶æ dzia³ania NIS+.
 
 %description -n nscd -l ru
 nscd ËÜÛÉÒÕÅÔ ÒÅÚÕÌØÔÁÔÙ ÚÁÐÒÏÓÏ× Ë ÓÅÒ×ÉÓÁÍ ÉÍÅÎ; ÜÔÏ ÍÏÖÅÔ ÒÅÚËÏ
@@ -416,6 +431,7 @@ Summary(es):        C
 Summary(pl):   Kod ¼ród³owy bazy locale
 Group:         Daemons
 Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      gzip
 Requires:      sed
 
 %description -n localedb-src
@@ -730,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
@@ -782,90 +798,96 @@ Bibliotecas est
 Statyczne 64-bitowe biblioteki GNU libc.
 
 %prep
-#setup -q -a 1 -n libc
-%setup -q -n libc
+%setup -q -a1
 %patch0 -p1
-# UPDATEME
-#%patch1 -p1
+%patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 %patch8 -p1
-# PARTIAL UPDATEME
-#%patch9 -p1
+%patch9 -p1
 %patch10 -p1
-%patch11 -p1
 # don't know, if it is good idea, for brave ones
-#%patch12 -p1
-%{?with_kernelheaders:%patch13}
-%{?!with_kernelheaders:%patch14 -p1}
+#%patch11 -p1
+%{!?with_kernelheaders:%patch12 -p1}
+%patch13 -p1
+%patch14 -p0
 %patch15 -p1
-%patch16 -p0
+%patch16 -p1
 %patch17 -p1
 %patch18 -p1
 %patch19 -p1
 %patch20 -p1
 %patch21 -p1
 %patch22 -p1
-# DROPME
-#%patch23 -p1
+%patch23 -p1
 %patch24 -p1
-# UPDATEME/DROPME
-#%patch25 -p1
+%patch25 -p1
 %patch26 -p1
-# UPDATEME/DROPME
-# %patch27 -p0
-# DROP
-#%patch30 -p1
-# DROP
-#%patch31 -p1
-%patch32 -p1
-%patch33 -p1
-%patch34 -p1
+%patch27 -p1
+%patch28 -p1
+%{?with_cross:%patch29 -p1}
 
 chmod +x scripts/cpp
 
+# i786 (aka pentium4) hack
+cd nptl/sysdeps/i386 && ln -s i686 i786 && cd -
+cd nptl/sysdeps/unix/sysv/linux/i386 && ln -s i686 i786 && cd -
+
 %build
 # Build glibc
-cp %{_datadir}/automake/config.sub .
-cp %{_datadir}/automake/config.sub scripts
+cp -f /usr/share/automake/config.sub scripts
 %{__aclocal}
 %{__autoconf}
-# i786 (aka pentium4) hack
-cd nptl/sysdeps/i386 && ln -s i686 i786 && cd -
-cd nptl/sysdeps/unix/sysv/linux/i386 && ln -s i686 i786 && cd -
-#
-[ -d builddir ] || mkdir builddir
+rm -rf builddir
+install -d builddir
 cd builddir
-# avoid stripping ld.so by -s in rpmldflags
-LDFLAGS=" " ; export LDFLAGS
+%ifarch sparc64
+CC="%{__cc} -m64 -mcpu=ultrasparc -mvis -fcall-used-g6"
+%endif
+%if %{with linuxthreads}
 ../%configure \
        --enable-kernel="%{min_kernel}" \
        --%{?with_omitfp:en}%{!?with_omitfp:dis}able-omitfp \
+       --with%{!?with___thread:out}-__thread \
+       --with-headers=%{sysheaders} \
+       --with%{!?with_selinux:out}-selinux \
        --with%{!?with_tls:out}-tls \
-       --with-selinux \
-%if %{with nptl}
-        --enable-add-ons=nptl \
-       --disable-profile \
-%else
         --enable-add-ons=linuxthreads \
-       --enable-profile \
+       --enable-profile
+%{__make}
 %endif
-%if %{with kernelheaders}
-       CPPFLAGS="-I%{_kernelsrcdir}/include" \
-       --with-headers=%{_kernelsrcdir}/include
-%else
-       CPPFLAGS="-I%{_includedir}" \
-       --with-headers=%{_includedir}
+%if %{with nptl}
+%if %{with dual}
+cd ..
+rm -rf builddir-nptl
+install -d builddir-nptl
+cd builddir-nptl
 %endif
+../%configure \
+       --enable-kernel="%{nptl_min_kernel}" \
+       --%{?with_omitfp:en}%{!?with_omitfp:dis}able-omitfp \
+       --with-headers=%{sysheaders} \
+       --with%{!?with_selinux:out}-selinux \
+       --with-tls \
+        --enable-add-ons=nptl \
+       --enable-profile
+# simulate cross-compiling so we can perform dual builds on 2.4.x kernel
+%{__make} \
+       %{?with_dual:cross-compiling=yes}
+%endif
+cd ..
 
-# problem compiling with --enable-bounded (must be reported to libc-alpha)
-
-%{__make} %{?parallelmkflags}
+%if %{with linuxthreads}
+%{__make} -C linuxthreads/man
+%endif
 
 %if %{with tests}
+for d in builddir %{?with_tests_nptl:builddir-nptl} ; do
+cd $d
 env LANGUAGE=C LC_ALL=C \
 %{__make} tests 2>&1 | awk '
 BEGIN { file = "" }
@@ -878,25 +900,26 @@ BEGIN { file = "" }
        print $0;
 }
 END { if (file != "") { print "ERROR OUTPUT FROM " file; system("cat " file); exit(1); } }'
+cd ..
+done
 %endif
 
 %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 \
 %{__make} install \
-       %{?parallelmkflags} \
        install_root=$RPM_BUILD_ROOT \
        infodir=%{_infodir} \
        mandir=%{_mandir}
 
+%if %{with localedb}
 env LANGUAGE=C LC_ALL=C \
 %{__make} localedata/install-locales \
-       %{?parallelmkflags} \
        install_root=$RPM_BUILD_ROOT
+%endif
 
 PICFILES="libc_pic.a libc.map
        math/libm_pic.a libm.map
@@ -907,15 +930,47 @@ install elf/soinit.os                             $RPM_BUILD_ROOT%{_libdir}/soinit.o
 install elf/sofini.os                          $RPM_BUILD_ROOT%{_libdir}/sofini.o
 
 install elf/postshell                          $RPM_BUILD_ROOT/sbin
+cd ..
+
+%if %{with dual}
+env LANGUAGE=C LC_ALL=C \
+%{__make} -C builddir-nptl install \
+       cross-compiling=yes \
+       install_root=$RPM_BUILD_ROOT/nptl
+
+install -d $RPM_BUILD_ROOT{/%{_lib}/tls,%{_libdir}/nptl,%{_includedir}/nptl}
+for f in libc libm libpthread libthread_db librt; do
+       mv -f $RPM_BUILD_ROOT/nptl/%{_lib}/${f}[-.]* $RPM_BUILD_ROOT/%{_lib}/tls
+done
+$RPM_BUILD_ROOT/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_lib}/tls
+
+for f in libc.so libpthread.so ; do
+       cat $RPM_BUILD_ROOT/nptl%{_libdir}/$f | sed \
+               -e "s|/libc.so.6|/tls/libc.so.6|g" \
+               -e "s|/libpthread.so.0|/tls/libpthread.so.0|g" \
+               -e "s|/libpthread_nonshared.a|/nptl/libpthread_nonshared.a|g" \
+               > $RPM_BUILD_ROOT%{_libdir}/nptl/$f
+done
+for f in libc.a libpthread.a libpthread_nonshared.a; do
+       mv -f $RPM_BUILD_ROOT/nptl%{_libdir}/$f $RPM_BUILD_ROOT%{_libdir}/nptl
+done
+cd $RPM_BUILD_ROOT/nptl%{_prefix}/include
+       for f in `find . -type f`; do
+               if ! [ -f $RPM_BUILD_ROOT%{_prefix}/include/$f ] \
+                  || ! cmp -s $f $RPM_BUILD_ROOT%{_prefix}/include/$f ; then
+                       install -d $RPM_BUILD_ROOT%{_prefix}/include/nptl/`dirname $f`
+                       cp -a $f $RPM_BUILD_ROOT%{_prefix}/include/nptl/$f
+               fi
+       done
+cd -
+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 %{without nptl}
-%{__make} -C ../linuxthreads/man
-install ../linuxthreads/man/*.3thr                     $RPM_BUILD_ROOT%{_mandir}/man3
+%if %{with linuxthreads}
+install linuxthreads/man/*.3thr                $RPM_BUILD_ROOT%{_mandir}/man3
 %endif
 
 rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/{localtime,posixtime,posixrules,posix/*}
@@ -934,7 +989,7 @@ ln -sf libbsd-compat.a              $RPM_BUILD_ROOT%{_libdir}/libbsd.a
 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/localtime
 
 # make symlinks across top-level directories absolute
-for l in anl BrokenLocale crypt dl m nsl pthread resolv rt thread_db util ; do
+for l in anl BrokenLocale crypt dl m nsl resolv rt thread_db util ; do
        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
 done
@@ -942,8 +997,8 @@ done
 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
-install ../nscd/nscd.conf      $RPM_BUILD_ROOT%{_sysconfdir}
-install ../nss/nsswitch.conf   $RPM_BUILD_ROOT%{_sysconfdir}
+install nscd/nscd.conf $RPM_BUILD_ROOT%{_sysconfdir}
+install nss/nsswitch.conf      $RPM_BUILD_ROOT%{_sysconfdir}
 
 bzip2 -dc %{SOURCE5} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 bzip2 -dc %{SOURCE6} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
@@ -952,29 +1007,35 @@ 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
+rm -rf documentation
+install -d documentation
 
-%if %{without nptl}
-cp -f ../linuxthreads/ChangeLog ../documentation/ChangeLog.threads
-cp -f ../linuxthreads/Changes ../documentation/Changes.threads
-cp -f ../linuxthreads/README ../documentation/README.threads
+%if %{with linuxthreads}
+for f in ChangeLog Changes README ; do
+       cp -f linuxthreads/$f documentation/${f}.linuxthreads
+done
+%endif
+%if %{with nptl}
+for f in ANNOUNCE ChangeLog DESIGN-{barrier,condvar,rwlock,sem}.txt TODO{,-kernel,-testing} ;  do
+       cp -f nptl/$f documentation/${f}.nptl
+done
 %endif
-cp -f ../crypt/README.ufc-crypt ../documentation/
+cp -f crypt/README.ufc-crypt documentation
 
-cp -f ../ChangeLog* ../documentation
+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
-echo '%defattr(644,root,root,755)' > ../glibc.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
        if [ -d $i ]; then
                lang=`echo $i | sed -e 's/.*locale\///' -e 's/\/.*//'`
@@ -994,24 +1055,24 @@ for i in $RPM_BUILD_ROOT%{_datadir}/locale/* $RPM_BUILD_ROOT%{_libdir}/locale/*
                        fi
                fi
                dir=`echo $i | sed "s#$RPM_BUILD_ROOT##"`
-               echo "%lang($lang) $dir" >> ../glibc.lang
+               echo "%lang($lang) $dir" >> glibc.lang
        fi
 done
 # XXX: to be added when become supported by glibc
-# ia,li (used by GNOME)
-# nso,ss,ven (used by KDE)
+# tk, yo (used by GNOME)
+# ven -> ve (used by KDE)
 # NOTES:
 # bn is used for bn_BD or bn_IN?
 # omitted here - already existing (with libc.mo):
 #   be,ca,cs,da,de,el,en_GB,es,fi,fr,gl,hr,hu,it,ja,ko,nb,nl,pl,pt_BR,sk,sv,tr,zh_CN,zh_TW
 for i in af am ang ar az bg bn br bs cy de_AT en en@boldquot en@quot en_AU \
     en_CA en_US eo es_AR es_MX et eu fa fo ga gu he hi hsb ia id is ka kn \
-    leet lg li lo lt lv mi mk ml mn mr ms mt nds ne nn or pa pt ro ru se \
-    sl sq sr sr@Latn sr@ije ta tg th uk uz vi wa xh yi zu ; do
+    leet lg li lo lt lv mi mk ml mn mr ms mt nds ne nn nso or pa pt ro ru se \
+    sl sq sr sr@Latn sr@ije ss ta tg th tlh uk uz ve vi wa xh yi 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/_.*//'`
-               echo "%lang($lang) %{_datadir}/locale/$i" >> ../glibc.lang
+               echo "%lang($lang) %{_datadir}/locale/$i" >> glibc.lang
        fi
 done
 cd $RPM_BUILD_ROOT%{_datadir}/locale
@@ -1021,7 +1082,7 @@ cd -
 
 # localedb-gen infrastructure
 install %{SOURCE7} $RPM_BUILD_ROOT%{_bindir}/localedb-gen
-install ../localedata/SUPPORTED $RPM_BUILD_ROOT%{_datadir}/i18n
+install localedata/SUPPORTED $RPM_BUILD_ROOT%{_datadir}/i18n
 
 # shutup check-files
 rm -f $RPM_BUILD_ROOT%{_mandir}/README.*
@@ -1030,17 +1091,13 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 # we don't support kernel without ptys support
 rm -f $RPM_BUILD_ROOT%{_libdir}/pt_chown
 
-# no longer supported (/dev/null has the same, but expected behaviour)
-rm -f $RPM_BUILD_ROOT%{_bindir}/glibcbug
-
 %clean
 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
@@ -1048,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
@@ -1056,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
@@ -1074,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
@@ -1093,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
@@ -1109,14 +1188,23 @@ fi
 %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);
-# ld-*.so SONAME is ld.so.1 on ppc, ld-linux.so.2 on other archs
+# 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 amd64
+#   ld-linux.so.2 on other archs
 %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]*
-%dir %{_libdir}/locale
-%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/ld.so.conf
+%if %{with dual}
+%dir /%{_lib}/tls
+%attr(755,root,root) /%{_lib}/tls/lib[cmprt]*
+%endif
+%{?with_localedb:%dir %{_libdir}/locale}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf
 %ghost %{_sysconfdir}/ld.so.cache
 
 #%files -n nss_dns
@@ -1127,19 +1215,19 @@ fi
 %defattr(644,root,root,755)
 %attr(755,root,root) /%{_lib}/libnss_files*.so*
 
-
 %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
 %attr(755,root,root) %{_bindir}/catchsegv
+%attr(755,root,root) %{_bindir}/getconf
 %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
@@ -1150,12 +1238,16 @@ fi
 %attr(755,root,root) %{_sbindir}/zdump
 %attr(755,root,root) %{_sbindir}/zic
 
+%dir %{_libexecdir}/getconf
+%attr(755,root,root) %{_libexecdir}/getconf/*
+
 %dir %{_datadir}/locale
 %{_datadir}/locale/locale.alias
 %{_datadir}/zoneinfo
 %exclude %{_datadir}/zoneinfo/right
 
 %{_mandir}/man1/catchsegv.1*
+%{_mandir}/man1/getconf.1*
 %{_mandir}/man1/getent.1*
 %{_mandir}/man1/iconv.1*
 %{_mandir}/man1/ldd.1*
@@ -1276,10 +1368,35 @@ fi
 %defattr(644,root,root,755)
 %doc documentation/* NOTES PROJECTS
 %attr(755,root,root) %{_bindir}/gencat
-%attr(755,root,root) %{_bindir}/getconf
 %attr(755,root,root) %{_bindir}/*prof*
 %attr(755,root,root) %{_bindir}/*trace
 
+%attr(755,root,root) %{_libdir}/lib[!cmp]*.so
+%attr(755,root,root) %{_libdir}/libcrypt.so
+%attr(755,root,root) %{_libdir}/libm.so
+%attr(755,root,root) %{_libdir}/libpcprofile.so
+%attr(755,root,root) %{_libdir}/*crt*.o
+# ld scripts
+%{_libdir}/libc.so
+%{_libdir}/libpthread.so
+
+%{_libdir}/libbsd-compat.a
+%{_libdir}/libbsd.a
+%{_libdir}/libc_nonshared.a
+%{_libdir}/libg.a
+%{_libdir}/libieee.a
+%{_libdir}/libpthread_nonshared.a
+%{_libdir}/librpcsvc.a
+
+%if %{with dual}
+%dir %{_libdir}/nptl
+# ld scripts
+%{_libdir}/nptl/libc.so
+%{_libdir}/nptl/libpthread.so
+%{_libdir}/nptl/libpthread_nonshared.a
+%{_includedir}/nptl
+%endif
+
 %{_includedir}/*.h
 %ifarch alpha
 %{_includedir}/alpha
@@ -1306,18 +1423,6 @@ fi
 
 %{_infodir}/libc.info*
 
-%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
-
-%{_mandir}/man1/getconf.1*
 %{_mandir}/man1/sprof.1*
 %{_mandir}/man3/*
 %lang(cs) %{_mandir}/cs/man3/*
@@ -1337,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*
@@ -1361,9 +1470,11 @@ fi
 %{_datadir}/i18n
 %{_mandir}/man1/localedef.1*
 
+%if %{with localedb}
 %files localedb-all
 %defattr(644,root,root,755)
 %{_libdir}/locale/locale-archive
+%endif
 
 %files -n iconv
 %defattr(644,root,root,755)
@@ -1386,12 +1497,15 @@ fi
 %{_libdir}/libresolv.a
 %{_libdir}/librt.a
 %{_libdir}/libutil.a
+%if %{with dual}
+%{_libdir}/nptl/libc.a
+%{_libdir}/nptl/libpthread.a
+%endif
 
-%if %{without nptl}
 %files profile
 %defattr(644,root,root,755)
+#{?with_dual:%{_libdir}/nptl/lib*_p.a}
 %{_libdir}/lib*_p.a
-%endif
 
 %files pic
 %defattr(644,root,root,755)
@@ -1399,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
This page took 0.639318 seconds and 4 git commands to generate.