#
# You can define min_kernel macro by "rpm --define 'min_kernel version'"
-# default is 2.2.0 (no changes up to 2.3.25)
+# default is 2.4.6
#
# Conditional build:
-# _without_dist_kernel build without kernel from the distribution;
-# headers will be searched in %_kernelsrcdir/include.
-# _without_fp build without frame pointer (pass --enable-omitfp)
-# _without_memusage build without memusage
-#
-%bcond_with kernelheaders # use headers from kernel-headers instead of
- # glibc-kernel-headers
-%bcond_with idn # build with included libidn
+%bcond_without fp # 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
+ # glibc-kernel-headers (evil, breakage etc., don't use)
+%bcond_without dist_kernel # for above, allow non-distribution kernel
+%bcond_with idn # build with included libidn
+%bcond_with nptl # use nptl instead of linuxthreads
+%bcond_without tls # do not use tls
+%bcond_without tests # do not perform "make test"
+
#
# TODO:
# - localedb-gen man pages(?)
# - fix what trojan broke while upgreading (getaddrinfo-workaround)
#
-#
# WARNING:
# posix zoneinfo dir removed, /etc/rc.d/init.d/timezone must be changed
# in order to use this version!
#
-%{!?min_kernel:%global min_kernel 2.2.0}
+
+%{!?min_kernel:%global min_kernel 2.4.6}
+
+%if %{with nptl}
+%ifarch i686 athlon amd64 ia64 s390 s390x sparcv9 ppc ppc64
+%if "%{min_kernel}" < "2.6.0"
+%global min_kernel 2.6.0
+%endif
+%else
+%undefine with_nptl
+%endif
+%endif
+
+%if %{with tls}
+%ifnarch i686 athlon amd64 ia64 s390 s390x alpha alphaev6 sparc sparcv9 ppc ppc64
+%undefine with_tls
+%endif
+%endif
+
+%define gkh_version 7:2.6.0.3
Summary: GNU libc
Summary(de): GNU libc
Summary(es): GNU libc
Summary(tr): GNU libc
Summary(uk): GNU libc ×ÅÒÓ¦§ 2.3
Name: glibc
-Version: 2.3.2
-%define rel 9
-Release: %{rel}
+Version: 2.3.3
+Release: 0.20040101.3%{?with_nptl:+nptl}
Epoch: 6
License: LGPL
Group: Libraries
-Source0: ftp://sources.redhat.com/pub/glibc/releases/%{name}-%{version}.tar.bz2
-# Source0-md5: ede969aad568f48083e413384f20753c
-Source1: ftp://sources.redhat.com/pub/glibc/releases/%{name}-linuxthreads-%{version}.tar.bz2
-# Source1-md5: 894b8969cfbdf787c73e139782167607
+# 20040101 snapshot
+#Source0: ftp://sources.redhat.com/pub/glibc/releases/%{name}-%{version}.tar.bz2
+Source0: %{name}-%{version}.tar.bz2
+# Source0-md5: b4e3f037a0b36afc705af344033a91c7
+#Source1: ftp://sources.redhat.com/pub/glibc/releases/%{name}-linuxthreads-%{version}.tar.bz2
+Source1: %{name}-linuxthreads-%{version}.tar.bz2
+# Source1-md5: 97c30992592f854a67107579dcef61dd
Source2: nscd.init
Source3: nscd.sysconfig
Source4: nscd.logrotate
# borrowed from util-linux
Source7: sln.8
Source8: %{name}-localedb-gen
-Source10: http://josefsson.org/libidn/releases/libidn-0.3.0rc3.tar.gz
-# Source10-md5: ded0b439efe16dd29ce5a24d3d3dcebf
Patch0: %{name}-info.patch
Patch1: %{name}-initgroups-overflow.patch
Patch2: %{name}-pld.patch
Patch10: %{name}-vaargs.patch
Patch11: %{name}-getaddrinfo-workaround.patch
Patch12: %{name}-postshell.patch
-Patch13: %{name}-pl.po-update.patch
Patch14: %{name}-missing-nls.patch
Patch16: %{name}-java-libc-wait.patch
-Patch17: %{name}-morelocales.patch
Patch18: %{name}-lthrds_noomit.patch
Patch19: %{name}-no_opt_override.patch
-Patch20: %{name}-gcc33.patch
-#Patch21: %{name}-sanity.patch
-Patch22: %{name}-secureexec.patch
Patch23: %{name}-kernel_includes.patch
-Patch24: %{name}-sparc64_pause.patch
-Patch25: %{name}-linuxthreads.patch
+Patch24: %{name}-includes.patch
Patch26: %{name}-alpha-fix-as-syntax.patch
Patch27: %{name}-soinit-EH_FRAME.patch
+Patch28: %{name}-fix-asserts.patch
+Patch30: %{name}-sparc-errno_fix.patch
+Patch31: %{name}-make.patch
+Patch32: %{name}-tests-io-tmp.patch
URL: http://www.gnu.org/software/libc/
+BuildRequires: automake
BuildRequires: binutils >= 2.13.90.0.2
BuildRequires: gcc >= 3.2
-%{!?_without_memusage:BuildRequires: gd-devel >= 2.0.1}
+%{?with_memusage:BuildRequires: gd-devel >= 2.0.1}
BuildRequires: gettext-devel >= 0.10.36
%if %{with kernelheaders}
-%{!?_without_dist_kernel:BuildRequires: kernel-headers < 2.5}
+%{?with_dist_kernel:BuildRequires: kernel-headers < 2.5}
%else
-BuildRequires: glibc-kernel-headers >= 1:1-2
+BuildRequires: glibc-kernel-headers >= %{gkh_version}
%endif
BuildRequires: perl-base
-BuildRequires: rpm-build >= 4.0.2-46
+BuildRequires: rpm-build >= 4.3-0.20030610.28
BuildRequires: rpm-perlprov
BuildRequires: sed >= 4.0.5
BuildRequires: texinfo
Obsoletes: %{name}-debug
Obsoletes: ldconfig
AutoReq: false
-Requires: glibc-misc = %{epoch}:%{version}
+Requires: glibc-misc = %{epoch}:%{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Conflicts: kernel < %{min_kernel}
Conflicts: ld.so < 1.9.9-10
%define debugcflags -O1 -g
%ifarch sparc64
-%define _without_memusage 1
+%undefine with_memusage
%define specflags_sparc64 -mvis -fcall-used-g6
%define _libdir /usr/lib64
%endif
+# hack: don't depend on rpmlib(PartialHardlinkSets) for easier upgrade from Ra
+# (hardlinks here are unlikely to be "partial"... and rpm 4.0.2 from Ra was
+# patched not to crash on partial hardlinks too)
+%define _hack_dontneed_PartialHardlinkSets 1
%description
Contains the standard libraries that are used by multiple programs on
%package misc
Summary: Utilities and data used by glibc
+Summary(pl): Narzêdzia i dane u¿ywane przez glibc
Group: Development/Libraries
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description misc
-Utilities and data used by glibc
+Utilities and data used by glibc.
+
+%description misc -l pl
+Narzêdzia i dane u¿ywane przez glibc.
%package devel
Summary: Additional libraries required to compile
Summary(tr): Geliþtirme için gerekli diðer kitaplýklar
Summary(uk): äÏÄÁÔËÏצ ¦Â̦ÏÔÅËÉ, ÐÏÔÒ¦ÂΦ ÄÌÑ ËÏÍЦÌÑæ§
Group: Development/Libraries
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
+%{!?with_kernelheaders:Requires: glibc-kernel-headers >= %{gkh_version}}
%description devel
To develop programs which use the standard C libraries (which nearly
Summary(pl): Demon zapamiêtuj±cy odpowiedzi serwisów nazw
Summary(ru): ëÜÛÉÒÕÀÝÉÊ ÄÅÍÏÎ ÓÅÒ×ÉÓÏ× ÉÍÅÎ
Summary(uk): ëÅÛÕÀÞÉÊ ÄÅÍÏÎ ÓÅ×¦Ó¦× ¦ÍÅÎ
-Release: %{rel}
Group: Networking/Daemons
PreReq: rc-scripts >= 0.2.0
Requires(post,preun): /sbin/chkconfig
Requires(post): fileutils
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description -n nscd
nscd caches name service lookups; it can dramatically improve
Summary: locale database source code
Summary(es): Código fuente de la base de datos de los locales
Summary(pl): Kod ¼ród³owy bazy locale
-Release: %{rel}
Group: Daemons
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description -n localedb-src
This add-on package contains the data needed to build the locale data
Summary: locale database for all locales supported by glibc
Summary(es): Base de datos de todos los locales soportados por glibc
Summary(pl): Baza danych locale dla wszystkich lokalizacji obs³ugiwanych przez glibc
-Release: %{rel}
Group: Libraries
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description localedb-all
This package contains locale database for all locales supported by
Summary: Convert encoding of given files from one encoding to another
Summary(es): Convierte entre varias codificaciones de los ficheros dados
Summary(pl): Program do konwersji plików tekstowych z jednego kodowania do innego
-Release: %{rel}
Group: Applications/Text
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description -n iconv
Convert encoding of given files from one encoding to another. You need
Summary(pl): Biblioteki statyczne
Summary(ru): óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ glibc
Summary(uk): óÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ glibc
-Release: %{rel}
Group: Development/Libraries
-Requires: %{name}-devel = %{epoch}:%{version}
+Requires: %{name}-devel = %{epoch}:%{version}-%{release}
%description static
GNU libc static libraries.
Summary(ru): GNU libc Ó ÐÏÄÄÅÒÖËÏÊ ÐÒÏÆÁÊÌÅÒÁ
Summary(tr): Ölçüm desteði olan glibc
Summary(uk): GNU libc Ú Ð¦ÄÔÒÉÍËÏÀ ÐÒÏÆÁÊÌÅÒÁ
-Release: %{rel}
Group: Development/Libraries/Libc
Obsoletes: libc-profile
-Requires: %{name}-devel = %{epoch}:%{version}
+Requires: %{name}-devel = %{epoch}:%{version}-%{release}
%description profile
When programs are being profiled using gprof, they must use these
Summary: glibc PIC archive
Summary(es): Archivo PIC de glibc
Summary(pl): Archiwum PIC glibc
-Release: %{rel}
Group: Development/Libraries/Libc
-Requires: %{name}-devel = %{epoch}:%{version}
+Requires: %{name}-devel = %{epoch}:%{version}-%{release}
%description pic
GNU C Library PIC archive contains an archive library (ar file)
Summary: Old style NYS NSS glibc module
Summary(es): El antiguo módulo NYS NSS de glibc
Summary(pl): Stary modu³ NYS NSS glibc
-Release: %{rel}
Group: Base
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description -n nss_compat
Old style NYS NSS glibc module.
Summary: BIND NSS glibc module
Summary(es): Módulo BIND NSS de glibc
Summary(pl): Modu³ BIND NSS glibc
-Release: %{rel}
Group: Base
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description -n nss_dns
BIND NSS glibc module.
Summary: Traditional files databases NSS glibc module
Summary(es): Módulo de tradicionales bases de datos en ficheros para glibc
Summary(pl): Modu³ tradycyjnych plikowych baz danych NSS glibc
-Release: %{rel}
Group: Base
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description -n nss_files
Traditional files databases NSS glibc module.
Summary: hesiod NSS glibc module
Summary(es): Módulo hesiod NSS de glibc
Summary(pl): Modu³ hesiod NSS glibc
-Release: %{rel}
Group: Base
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description -n nss_hesiod
glibc NSS (Name Service Switch) module for databases access.
Summary: NIS(YP) NSS glibc module
Summary(es): Módulo NIS(YP) NSS de glibc
Summary(pl): Modu³ NIS(YP) NSS glibc
-Release: %{rel}
Group: Base
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description -n nss_nis
glibc NSS (Name Service Switch) module for NIS(YP) databases access.
Summary: NIS+ NSS module
Summary(es): Módulo NIS+ NSS
Summary(pl): Modu³ NIS+ NSS
-Release: %{rel}
Group: Base
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description -n nss_nisplus
glibc NSS (Name Service Switch) module for NIS+ databases access.
Summary: A toy
Summary(es): Un juguete
Summary(pl): Zabawka
-Release: %{rel}
Group: Applications
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: gd
%description memusage
Summary: Non-POSIX (real) time zones
Summary(es): Zonas de tiempo reales (no de POSIX)
Summary(pl): Nie-POSIX-owe (prawdziwe) strefy czasowe
-Release: %{rel}
Group: Libraries
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description zoneinfo_right
You don't want this. Details at:
Summary: GNU libc - 64-bit libraries
Summary(es): GNU libc - bibliotecas de 64 bits
Summary(pl): GNU libc - biblioteki 64-bitowe
-Release: %{rel}
Group: Libraries
%ifarch amd64
-Provides: glibc = %{epoch}:%{version}
+Provides: glibc = %{epoch}:%{version}-%{release}
%else
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%endif
%description -n %{name}64
-64-bit GNU libc libraries for sparc64 architecture.
+64-bit GNU libc libraries for 64bit architecture.
%description -n %{name}64 -l es
-Bibliotecas GNU libc de 64 bits para la arquitectura sparc64.
+Bibliotecas GNU libc de 64 bits para la arquitectura 64bit.
%description -n %{name}64 -l pl
-Biblioteki 64-bitowe GNU libc dla architektury sparc64.
+Biblioteki 64-bitowe GNU libc dla architektury 64bit.
%package -n %{name}64-devel
Summary: Development files for 64-bit GNU libc libraries
Summary(es): Ficheros de desarrollo para bibliotecas GNU libc de 64 bits
Summary(pl): Pliki do programowania z u¿yciem 64-bitowych bibliotek GNU libc
-Release: %{rel}
Group: Development/Libraries
-Requires: %{name}-devel = %{epoch}:%{version}
+Requires: %{name}-devel = %{epoch}:%{version}-%{release}
%description -n %{name}64-devel
-Development files for 64-bit GNU libc libraries for sparc64
+Development files for 64-bit GNU libc libraries for 64bit
architecture.
%description -n %{name}64-devel -l es
Ficheros de desarrollo para las bibliotecas GNU libc de 64 bits para la
-arquitectura sparc64.
+arquitectura 64bit.
%description -n %{name}64-devel -l pl
Pliki do programowania z u¿yciem 64-bitowych bibliotek GNU libc dla
-architektury sparc64.
+architektury 64bit.
%package -n %{name}64-static
Summary: Static 64-bit GNU libc libraries
Summary(es): Bibliotecas estáticas GNU libc de 64 bits
Summary(pl): Statyczne 64-bitowe biblioteki GNU libc
-Release: %{rel}
Group: Development/Libraries
-Requires: %{name}64-devel = %{epoch}:%{version}
+Requires: %{name}64-devel = %{epoch}:%{version}-%{release}
%description -n %{name}64-static
Static 64-bit GNU libc libraries.
Statyczne 64-bitowe biblioteki GNU libc.
%prep
-%setup -q -a 1 -a 10
+%setup -q -a 1
%patch0 -p1
-%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch10 -p1
#%%patch11 -p1
%patch12 -p1
-%patch13 -p1
%patch14 -p1
%patch16 -p1
-%patch17 -p1
%patch18 -p1
# don't know, if it is good idea, for brave ones
#%patch19 -p1
-%patch20 -p1
-#%patch21 -p1
-%patch22 -p1
%{?with_kernelheaders:%patch23}
-%patch24 -p1
-# updated - lt
-%ifnarch alpha
-%patch25 -p1
-%endif
+%{?!with_kernelheaders:%patch24 -p1}
%patch26 -p1
%patch27 -p1
+%patch28 -p1
+%patch30
+%patch31 -p1
+%patch32 -p1
chmod +x scripts/cpp
-# standardize name
-mv -f localedata/locales/{lug_UG,lg_UG}
-
-%if %{with idn}
-cp -r libidn-*/lib libidn
-cp libidn-*/libc/{Makefile,configure,Banner,Versions} libidn
-cp libidn-*/lib/*.{c,h} libidn
-sed -e 's/idn-int.h/stdint.h/g' libidn-*/lib/idna.h > libidn/idna.h
-ln -sf ../libidn/idna.h include/idna.h
-sed -e 's/idn-int.h/stdint.h/g' libidn-*/lib/stringprep.h > libidn/stringprep.h
-sed -e 's/idn-int.h/stdint.h/g' libidn-*/lib/punycode.h > libidn/punycode.h
-sed -e 's/stringprep_generic/rfc3454/g' libidn-*/libc/Makefile > libidn/Makefile
-
-#cp libidn-*/libc/getaddrinfo.c sysdeps/posix/
-#cp libidn-*/libc/netdb.h resolv/
-
-cp libidn-*/libc/*.patch libc-idn.patch
-patch -p0 < libc-idn.patch
-
-touch libidn/libidn.texi
-%endif
-
-#make proper symlink for asm in headers
-#cd usr/include
-#%ifarch %{ix86}
-#ln -s asm-i386 asm
-#%endif
-#cd ../..
-
%build
# Build glibc
+cp /usr/share/automake/config.sub .
+cp /usr/share/automake/config.sub scripts
[ -d builddir ] || mkdir builddir
cd builddir
# avoid stripping ld.so by -s in rpmldflags
LDFLAGS=" " ; export LDFLAGS
../%configure \
- --enable-add-ons=linuxthreads%{?with_idn:,libidn} \
--enable-kernel="%{min_kernel}" \
+ --%{!?with_fp:en}%{?with_fp:dis}able-omitfp \
+%if %{with nptl}
+ --enable-add-ons=nptl \
+ --with-tls \
+ --disable-profile \
+%else
+ %{?with_tls:--with-tls} \
+ --enable-add-ons=linuxthreads \
--enable-profile \
- --%{?_without_fp:en}%{!?_without_fp:dis}able-omitfp \
+%endif
%if %{with kernelheaders}
CPPFLAGS="-I%{_kernelsrcdir}/include" \
- --with-headers=%{_kernelsrcdir}/include
+ --with-headers=%{_kernelsrcdir}/include
%else
CPPFLAGS="-I%{_includedir}" \
- --with-headers=%{_includedir}
+ --with-headers=%{_includedir}
%endif
# problem compiling with --enable-bounded (must be reported to libc-alpha)
%{__make} %{?parallelmkflags}
+%if %{with tests}
+env LANGUAGE=C LC_ALL=C \
+%{__make} tests 2>&1 | awk '
+BEGIN { file = "" }
+{
+ if (($0 ~ /\*\*\* \[.*\.out\] Error/) && (file == "")) {
+ file=$0;
+ gsub(/.*\[/, NIL, file);
+ gsub(/\].*/, NIL, file);
+ }
+ print $0;
+}
+END { if (file != "") { print "ERROR OUTPUT FROM " file; system("cat " file); exit(1); } }'
+%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}
mv $RPM_BUILD_ROOT/sbin/ldconfig $RPM_BUILD_ROOT/%{_lib}
ln -s /%{_lib}/ldconfig $RPM_BUILD_ROOT/sbin
-%{!?_without_memusage:mv -f $RPM_BUILD_ROOT/%{_lib}/libmemusage.so $RPM_BUILD_ROOT%{_libdir}}
+%{?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
+%endif
rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/{localtime,posixtime,posixrules,posix/*}
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
+%endif
cp -f ../crypt/README.ufc-crypt ../documentation/
cp -f ../ChangeLog* ../documentation
# when %%postun is run
%ifnarch sparc64
+%ifarch amd64
+%post -n %{name}64 -p /%{_lib}/postshell
+%else
%post -p /%{_lib}/postshell
+%endif
/%{_lib}/ldconfig
-/sbin/telinit u
-%postun -p /%{_lib}/postshell
+%ifarch amd64
+%postun -n %{name}64 -p /%{_lib}/postshell
+%else
+%postun -p /%{_lib}/postshell
+%endif
/%{_lib}/ldconfig
-/sbin/telinit u
%attr(755,root,root) /%{_lib}/lib[BScmprtu]*
%dir %{_libdir}/locale
+#%files -n nss_dns
+%defattr(644,root,root,755)
+%attr(755,root,root) /%{_lib}/libnss_dns*.so*
+
+#%files -n nss_files
+%defattr(644,root,root,755)
+%attr(755,root,root) /%{_lib}/libnss_files*.so*
+
+
%files misc -f %{name}.lang
%defattr(644,root,root,755)
%lang(pt_BR) %{_mandir}/pt_BR/man8/[!n]*
%lang(ru) %{_mandir}/ru/man[578]/*
-#%files -n nss_dns
-%defattr(644,root,root,755)
-%attr(755,root,root) /%{_lib}/libnss_dns*.so*
-
-#%files -n nss_files
-%defattr(644,root,root,755)
-%attr(755,root,root) /%{_lib}/libnss_files*.so*
-
%files zoneinfo_right
%defattr(644,root,root,755)
%{_datadir}/zoneinfo/right
%defattr(644,root,root,755)
%attr(755,root,root) /%{_lib}/libnss_nisplus*.so*
-%if %{?_without_memusage:0}%{!?_without_memusage:1}
+%if %{with memusage}
%files memusage
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/memusage*
-%attr(755,root,root) %{_libdir}/libmemusage*
+%attr(755,root,root) %{_libdir}/libmemusage.so
%endif
%files devel
%{_libdir}/librt.a
%{_libdir}/libutil.a
+%if %{without nptl}
%files profile
%defattr(644,root,root,755)
%{_libdir}/lib*_p.a
+%endif
%files pic
%defattr(644,root,root,755)