# You can define min_kernel macro by "rpm --define 'min_kernel version'"
# default is 2.2.0 (no changes up to 2.3.25)
#
+# 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
#
+# _with_kernheaders use "kernheaders" as user-space kernel headers
+# (instead of copying from kernel-headers 2.4.x)
+# [broken at the moment]
+#
+%bcond_with idn # build with included libidn
+#
# TODO:
# - localedb-gen man pages(?)
-# - serious problem with upgrade (changing zoneinfo/posix/* dirs into symlinks)
-# are there any other solutions than revert???
+# - 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:%define min_kernel 2.2.0}
-%define rel 2.13
+%{!?min_kernel:%global min_kernel 2.2.0}
Summary: GNU libc
Summary(de): GNU libc
+Summary(es): GNU libc
Summary(fr): GNU libc
Summary(ja): GNU libc ¥é¥¤¥Ö¥é¥ê
Summary(pl): GNU libc
Summary(uk): GNU libc ×ÅÒÓ¦§ 2.3
Name: glibc
Version: 2.3.2
+%define rel 7
Release: %{rel}
Epoch: 6
License: LGPL
# borrowed from util-linux
Source7: sln.8
Source8: %{name}-localedb-gen
+# Kernel headers for userspace
+Source9: %{name}-kernheaders.tar.bz2
+# Source9-md5: b48fec281f854627d6b8781cd1dd72d2
+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
Patch3: %{name}-crypt-blowfish.patch
Patch4: %{name}-string2-pointer-arith.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
+Patch26: %{name}-alpha-fix-as-syntax.patch
URL: http://www.gnu.org/software/libc/
BuildRequires: binutils >= 2.13.90.0.2
BuildRequires: gcc >= 3.2
%{!?_without_memusage:BuildRequires: gd-devel >= 2.0.1}
BuildRequires: gettext-devel >= 0.10.36
-%{!?_without_dist_kernel:BuildRequires: glibc-kernheaders}
+%if 0%{!?_with_kernheaders:1}
+%{!?_without_dist_kernel:BuildRequires: kernel-headers < 2.5}
+%endif
BuildRequires: perl-base
BuildRequires: rpm-build >= 4.0.2-46
BuildRequires: rpm-perlprov
BuildRequires: sed >= 4.0.5
BuildRequires: texinfo
+PreReq: basesystem
Provides: ld.so.2
Provides: ldconfig
Provides: /sbin/ldconfig
Obsoletes: %{name}-common
Obsoletes: %{name}-debug
Obsoletes: ldconfig
-Autoreq: false
-PreReq: basesystem
+AutoReq: false
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Conflicts: kernel < %{min_kernel}
Conflicts: ld.so < 1.9.9-10
Conflicts: man-pages < 1.43
+Conflicts: rc-scripts < 0.3.1-13
Conflicts: rpm < 4.1
%define debugcflags -O1 -g
+%ifarch sparc64
+%define _without_memusage 1
+%endif
+
+
+# Define to build a biarch package
+%global with_biarch 0
+%ifarch x86_64 sparc64
+%{!?min_kernel:%global min_kernel 2.4.10}
+%global with_biarch 1
+%endif
%description
Contains the standard libraries that are used by multiple programs on
Without these, a Linux system will not function. It also contains
national language (locale) support and timezone databases.
+Can be used on: Linux kernel >= %{min_kernel}.
+
+%description -l es
+Contiene las bibliotecas estándared que son usadas por varios programas
+del sistema. Para ahorrar el espacio en el disco y la memoria, igual que
+para facilitar actualizaciones, código común del sistema se guarda en un
+sitio y es compartido entre los programas. Este paquete contiene las
+bibliotecas compartidas más importantes, es decir la biblioteca C estándar
+y la biblioteca estándar de matemática. Sin éstas, un sistema Linux no
+podrá funcionar. También está incluido soporte de idiomas nacionales
+(locale) y bases de datos de zona de tiempo.
+
+Puede usarse con: núcleo Linux >= %{min_kernel}.
+
%description -l de
Enthält die Standard-Libraries, die von verschiedenen Programmen im
System benutzt werden. Um Festplatten- und Arbeitsspeicher zu sparen
Ferner enthält es den Support für die verschiedenen Sprachgregionen
(locale) und die Zeitzonen-Datenbank.
+Can be used on: Linux kernel >= %{min_kernel}.
+
%description -l fr
Contient les bibliothèques standards utilisées par de nombreux
programmes du système. Afin d'économiser l'espace disque et mémoire,
langues nationales (locales) et les bases de données des zones
horaires.
+Can be used on: Linux kernel >= %{min_kernel}.
+
%description -l ja
glibc
¥Ñ¥Ã¥±¡¼¥¸¤Ï¥·¥¹¥Æ¥à¾å¤ÎÊ£¿ô¤Î¥×¥í¥°¥é¥à¤Ç»È¤ï¤ì¤ëɸ½à¥é¥¤¥Ö¥é¥ê¤ò
¥Ñ¥Ã¥±¡¼¥¸¤Ï¤Þ¤¿ÃÏ°è¸À¸ì (locale) ¥µ¥Ý¡¼¥È¤È¥¿¥¤¥à¥¾¡¼¥ó¥Ç¡¼¥¿¥Ù¡¼¥¹
¥µ¥Ý¡¼¥È¤ò¤Õ¤¯¤ß¤Þ¤¹¡£
+Can be used on: Linux kernel >= %{min_kernel}.
+
%description -l pl
W pakiecie znajduj± siê podstawowe biblioteki, u¿ywane przez ró¿ne
programy w Twoim systemie. U¿ywanie przez programy bibliotek z tego
Znajduj± siê tutaj równie¿ definicje ró¿nych informacji dla wielu
jêzyków (locale) oraz definicje stref czasowych.
+Przeznaczony dla j±dra Linux >= %{min_kernel}.
+
%description -l ru
óÏÄÅÒÖÉÔ ÓÔÁÎÄÁÒÔÎÙÅ ÂÉÂÌÉÏÔÅËÉ, ÉÓÐÏÌØÚÕÅÍÙÅ ÍÎÏÇÏÞÉÓÌÅÎÎÙÍÉ
ÐÒÏÇÒÁÍÍÁÍÉ × ÓÉÓÔÅÍÅ. äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÓÏÈÒÁÎÉÔØ ÄÉÓËÏ×ÏÅ ÐÒÏÓÔÒÁÎÓÔ×Ï
ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÐÏÄÄÅÒÖËÕ ÎÁÃÉÏÎÁÌØÎÙÈ ÑÚÙËÏ× (locale) É ÂÁÚÙ ÄÁÎÎÙÈ
×ÒÅÍÅÎÎÙÈ ÚÏÎ (timezone databases).
+Can be used on: Linux kernel >= %{min_kernel}.
+
%description -l tr
Bu paket, birçok programýn kullandýðý standart kitaplýklarý içerir.
Disk alaný ve bellek kullanýmýný azaltmak ve ayný zamanda güncelleme
içerir. Bu kitaplýklar olmadan Linux sistemi çalýþmayacaktýr. Yerel
dil desteði ve zaman dilimi veri tabaný da bu pakette yer alýr.
+Can be used on: Linux kernel >= %{min_kernel}.
+
%description -l uk
í¦ÓÔÉÔØ ÓÔÁÎÄÁÒÔΦ ¦Â̦ÏÔÅËÉ, ËÏÔÒ¦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØÓÑ ÞÉÓÌÅÎÎÉÍÉ
ÐÒÏÇÒÁÍÁÍÉ × ÓÉÓÔÅͦ. äÌÑ ÔÏÇÏ, ÝÏ ÚÂÅÒÅÇÔÉ ÄÉÓËÏ×ÉÊ ÐÒÏÓÔ¦Ò ÔÁ
ôÁËÏÖ ÐÁËÅÔ Í¦ÓÔÉÔØ Ð¦ÄÔÒÉÍËÕ ÎÁæÏÎÁÌØÎÉÈ ÍÏ× (locale) ÔÁ ÂÁÚÉ ÄÁÎÎÉÈ
ÞÁÓÏ×ÉÈ ÚÏÎ (timezone databases).
+Can be used on: Linux kernel >= %{min_kernel}.
+
%package devel
Summary: Additional libraries required to compile
Summary(de): Weitere Libraries zum Kompilieren
+Summary(es): Bibliotecas adicionales necesarias para la compilación
Summary(fr): Librairies supplémentaires nécessaires à la compilation
Summary(ja): ɸ½à C ¥é¥¤¥Ö¥é¥ê¤Ç»È¤ï¤ì¤ë¥Ø¥Ã¥À¡¼¤È¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë
Summary(pl): Dodatkowe biblioteki wymagane podczas kompilacji
verwenden (also fast alle), benötigt das System diese Standard-Header-
und Objektdateien zum Erstellen der ausführbaren Programme.
+%description devel -l es
+Para desarrollar programas que utilizan las bibliotecas C estándar
+(lo cual hacen prácticamente todos los programas), el sistema necesita
+disponer de estos ficheros de cabecera y de objetos para crear los
+ejecutables.
+
%description devel -l fr
Pour développer des programmes utilisant les bibliothèques standard du
C (ce que presque tous les programmes font), le système doit posséder
%description devel -l pl
Pakiet ten jest niezbêdny przy tworzeniu w³asnych programów
korzystaj±cych ze standardowej biblioteki C. Znajduj± siê tutaj pliki
-nag³ówkowe oraz pliki objektowe, niezbêdne do kompilacji programów
+nag³ówkowe oraz pliki obiektowe, niezbêdne do kompilacji programów
wykonywalnych i innych bibliotek.
%description devel -l ru
%package kernel-headers
Summary: Kernel header files the glibc has been built with
+Summary(es): Los ficheros de cabecera del núcleo con los que se ha construido glibc
Summary(pl): Pliki nag³ówkowe j±dra, z którymi zosta³a zbudowana ta wersja glibc
Release: %{rel}
Group: Development/Libraries
%description kernel-headers
Kernel header files for userspace.
+%description kernel-headers -l es
+Los ficheros de cabecera del núcleo para el espacio del usuario.
+
%description kernel-headers -l pl
Pliki nag³ówkowe j±dra dla przestrzeni u¿ytkownika
%package -n nscd
Summary: Name Service Caching Daemon
+Summary(es): Demonio de caché del servicio de nombres
Summary(ja): ¥Í¡¼¥à¥µ¡¼¥Ó¥¹¥¥ã¥Ã¥·¥ó¥°¥Ç¡¼¥â¥ó (nacd)
Summary(pl): Demon zapamiêtuj±cy odpowiedzi serwisów nazw
Summary(ru): ëÜÛÉÒÕÀÝÉÊ ÄÅÍÏÎ ÓÅÒ×ÉÓÏ× ÉÍÅÎ
nscd with 2.0 kernels, due to bugs in the kernel-side thread support.
nscd happens to hit these bugs particularly hard.
+%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.
+
%description -n nscd -l ja
Nscd ¤Ï¥Í¡¼¥à¥µ¡¼¥Ó¥¹»²¾È¤ò¥¥ã¥Ã¥·¥å¤·¡¢NIS+ ¤Î¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤ò
¥É¥é¥Þ¥Æ¥£¥Ã¥¯¤Ë²þÁ±¤¹¤ë¤³¤È¤¬¤Ç¤¡¢DNS ¤òƱÍͤËÊä½õ¤·¤Þ¤¹¡£ 2.0
%package -n localedb-src
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
This add-on package contains the data needed to build the locale data
files to use the internationalization features of the GNU libc.
+%description -n localedb-src -l es
+Este paquete adicional contiene los datos necesarios para construir
+los ficheros de locale, imprescindibles para usar las cualidades de
+internacionalización de GNU libc.
+
%description -n localedb-src -l pl
Pakiet ten zawiera dane niezbêdne do zbudowania binarnych plików
lokalizacyjnych, by móc wykorzystaæ mo¿liwo¶ci oferowane przez GNU
%package localedb-all
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
installing localedb-src and regenerating database using localedb-gen
script (when database is generated, localedb-src can be uninstalled).
+%description localedb-all -l es
+Este paquete contiene una base de datos de todos los locales soportados
+por glibc. En glibc 2.3.x ése es un fichero grande (aprox. 19 MB) -- si
+prefiere algo más pequeño, sólo con soporte de unos locales elegidos,
+considérese instalar localedb-src y regenerar la base de datos usando
+el escript localedb-gen (una vez que la base de datos esté creada,
+localedb-src se podrá desinstalar).
+
%description localedb-all -l pl
Ten pakiet zawiera bazê danych locale dla wszystkich lokalizacji
obs³ugiwanych przez glibc. W glibc 2.3.x jest to jeden du¿y plik
%package -n iconv
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
%description -n iconv
Convert encoding of given files from one encoding to another. You need
-this package if you want to convert some documet from one encoding to
+this package if you want to convert some document from one encoding to
another or if you have installed some programs which use Generic
Character Set Conversion Interface.
+%description -n iconv -l es
+Convierte la codificación de dados ficheros. Necesita este paquete si
+quiere convertir un documento entre una codificación (juego de
+caracteres) y otra, o si tiene instalado algún programa que usa el
+Generic Character Set Conversion Interface (interfaz genérica de
+conversión de juegos de caracteres).
+
%description -n iconv -l pl
Program do konwersji plików tekstowych z jednego kodowania do innego.
Musisz mieæ zainstalowany ten pakiet je¿eli wykonujesz konwersjê
%package static
Summary: Static libraries
+Summary(es): Bibliotecas estáticas
Summary(pl): Biblioteki statyczne
Summary(ru): óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ glibc
Summary(uk): óÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ glibc
%description static
GNU libc static libraries.
+%description static -l es
+Bibliotecas estáticas de GNU libc.
+
%description static -l pl
Biblioteki statyczne GNU libc.
%package profile
Summary: glibc with profiling support
Summary(de): glibc mit Profil-Unterstützung
+Summary(es): glibc con soporte de perfilamiento
Summary(fr): glibc avec support pour profiling
Summary(pl): glibc ze wsparciem dla profilowania
Summary(ru): GNU libc Ó ÐÏÄÄÅÒÖËÏÊ ÐÒÏÆÁÊÌÅÒÁ
Requires: %{name}-devel = %{epoch}:%{version}
%description profile
-When programs are being profiled used gprof, they must use these
+When programs are being profiled using gprof, they must use these
libraries instead of the standard C libraries for gprof to be able to
profile them correctly.
Damit Programmprofile mit gprof richtig erstellt werden, müssen diese
Libraries anstelle der üblichen C-Libraries verwendet werden.
+%description profile -l es
+Cuando programas son perfilidas usando gprof, tienen que usar estas
+biblioteces en vez de las estándares para que gprof pueda perfilarlas
+correctamente.
+
%description profile -l pl
Programy profilowane za pomoc± gprof musz± u¿ywaæ tych bibliotek
zamiast standardowych bibliotek C, aby gprof móg³ odpowiednio je
%package pic
Summary: glibc PIC archive
-Summary(pl): archiwum PIC glibc
+Summary(es): Archivo PIC de glibc
+Summary(pl): Archiwum PIC glibc
Release: %{rel}
Group: Development/Libraries/Libc
Requires: %{name}-devel = %{epoch}:%{version}
composed of individual shared objects. This is used for creating a
library which is a smaller subset of the standard libc shared library.
+%description pic -l es
+El archivo PIC de la biblioteca glibc contiene una biblioteca archivada
+(un fichero ar) compuesta de individuales objetos compartidos. Es usado
+para crear una biblioteca que sea un subconjunto más pequeño de la
+biblioteca libc compartida estándar.
+
%description pic -l pl
Archiwum PIC biblioteki GNU C zawiera archiwaln± bibliotekê (plik ar)
z³o¿on± z pojedyñczych obiektów wspó³dzielonych. U¿ywana jest do
%package -n nss_compat
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
%description -n nss_compat
Old style NYS NSS glibc module.
+%description -n nss_compat -l es
+El antiguo módulo NYS NSS de glibc
+
%description -n nss_compat -l pl
Stary modu³ NYS NSS glibc.
%package -n nss_dns
Summary: BIND NSS glibc module
+Summary(es): Módulo BIND NSS de glibc
Summary(pl): Modu³ BIND NSS glibc
Release: %{rel}
Group: Base
%description -n nss_dns
BIND NSS glibc module.
+%description -n nss_dns -l es
+Módulo BIND NSS de glibc.
+
%description -n nss_dns -l pl
Modu³ BIND NSS glibc.
%package -n nss_files
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
%description -n nss_files
Traditional files databases NSS glibc module.
+%description -n nss_files -l es
+Módulo de tradicionales bases de datos en ficheros para glibc.
+
%description -n nss_files -l pl
Modu³ tradycyjnych plikowych baz danych NSS glibc.
%package -n nss_hesiod
-Summary: Hesiod 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
%description -n nss_hesiod
glibc NSS (Name Service Switch) module for databases access.
+%description -n nss_hesiod -l es
+Módulo hesiod NSS de glibc.
+
%description -n nss_hesiod -l pl
Modu³ glibc NSS (Name Service Switch) dostêpu do baz danych.
%package -n nss_nis
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
%description -n nss_nis
glibc NSS (Name Service Switch) module for NIS(YP) databases access.
+%description -n nss_nis -l es
+Módulo NSS de glibc para acceder las bases de datos NIS(YP).
+
%description -n nss_nis -l pl
Modu³ glibc NSS (Name Service Switch) dostêpu do baz danych NIS(YP).
%package -n nss_nisplus
Summary: NIS+ NSS module
+Summary(es): Módulo NIS+ NSS
Summary(pl): Modu³ NIS+ NSS
Release: %{rel}
Group: Base
Requires: %{name} = %{epoch}:%{version}
%description -n nss_nisplus
-glibc NSS (Name Service Switch) module for NIS+ databases accesa.
+glibc NSS (Name Service Switch) module for NIS+ databases access.
+
+%description -n nss_nisplus -l es
+Módulo NSS (Name Service Switch) de glibc para acceder las bases de datos NIS+.
%description -n nss_nisplus -l pl
Modu³ glibc NSS (Name Service Switch) dostêpu do baz danych NIS+.
%package memusage
Summary: A toy
+Summary(es): Un juguete
Summary(pl): Zabawka
Release: %{rel}
Group: Applications
%description memusage
A toy.
+%description memusage -l es
+Un juguete.
+
%description memusage -l pl
Zabawka.
%package zoneinfo_right
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
You don't want this. Details at:
http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html
+%description zoneinfo_right -l es
+No lo necesita. Encontrará los detalles en:
+http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html
+
%description zoneinfo_right -l pl
Nie potrzebujesz tego. Szczegó³y pod:
http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html
+%package -n %{name}64
+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
+Requires: %{name} = %{epoch}:%{version}
+
+%description -n %{name}64
+64-bit GNU libc libraries for sparc64 architecture.
+
+%description -n %{name}64 -l es
+Bibliotecas GNU libc de 64 bits para la arquitectura sparc64.
+
+%description -n %{name}64 -l pl
+Biblioteki 64-bitowe GNU libc dla architektury sparc64.
+
+%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}
+
+%description -n %{name}64-devel
+Development files for 64-bit GNU libc libraries for sparc64
+architecture.
+
+%description -n %{name}64-devel -l es
+Ficheros de desarrollo para las bibliotecas GNU libc de 64 bits para la
+arquitectura sparc64.
+
+%description -n %{name}64-devel -l pl
+Pliki do programowania z u¿yciem 64-bitowych bibliotek GNU libc dla
+architektury sparc64.
+
+%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}
+
+%description -n %{name}64-static
+Static 64-bit GNU libc libraries.
+
+%description -n %{name}64-static -l es
+Bibliotecas estáticas GNU libc de 64 bits.
+
+%description -n %{name}64-static -l pl
+Statyczne 64-bitowe biblioteki GNU libc.
+
%prep
-%setup -q -a 1
+%setup -q -a 1 -a 9 -a 10
%patch0 -p1
+%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
# don't know, if it is good idea, for brave ones
#%patch19 -p1
%patch20 -p1
+#%patch21 -p1
+%patch22 -p1
+%{!?_with_kernheaders:%patch23}
+%patch24 -p1
+# updated - lt
+%ifnarch alpha
+%patch25 -p1
+%endif
+%patch26 -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
-mkdir builddir
-cd builddir
-# avoid stripping ld.so by -s in rpmldflags
-LDFLAGS=" " ; export LDFLAGS
-../%configure \
- --enable-add-ons=linuxthreads \
- --enable-kernel="%{?kernel:%{kernel}}%{!?kernel:%{min_kernel}}" \
+basedir=$(pwd)
+
+BuildGlibc() {
+ arch="$1"
+ shift
+
+ BuildCC="%{__cc}"
+ case "${arch}" in
+ i[3456]86 | athlon)
+ if [ "`uname -m`" = "x86_64" -o "`uname -m`" = "amd64" ]; then
+ BuildCC="$BuildCC -m32"
+ fi
+ ;;
+ sparc64)
+ BuildCC="$BuildCC -m64"
+ BuildCCFlags="$BuildCCFlags -mvis -fcall-used-g6"
+ ;;
+ sparc | sparcv9)
+ BuildCC="$BuildCC -m32"
+ ;;
+ esac
+
+ # Library name
+ # Prepare kernel headers
+ _headers_dir=`pwd`/usr/include; export _headers_dir;
+ (cd $_headers_dir && rm asm)
+ (cd $_headers_dir && ln -s asm-`echo $arch | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/athlon/i386/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/s390x/s390/` asm)
+
+ glibc_cv_cc_64bit_output=no
+ if echo ".text" | $BuildCC -c -o test.o -xassembler -; then
+ case `/usr/bin/file test.o` in
+ *"ELF 64"*)
+ glibc_cv_cc_64bit_output=yes
+ ;;
+ esac
+ fi
+ rm -f test.o
+ case $arch:$glibc_cv_cc_64bit_output in
+ powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes | amd64:yes)
+ glibc_libname="lib64"
+ ;;
+ *:*)
+ glibc_libname="lib"
+ ;;
+ esac
+
+ # Build glibc
+ rm -rf builddir-${arch}
+ mkdir builddir-${arch}
+ cd builddir-${arch}
+ # avoid stripping ld.so by -s in rpmldflags
+ LDFLAGS=" " ; export LDFLAGS
+ #CFLAGS="-I $_headers_dir %{rpmcflags}"; export CFLAGS
+ ../%configure \
+ CC="${BuildCC}" \
+ --build=${arch}-%{_vendor}-%{_target_os} \
+ --libexecdir="%{_prefix}/$glibc_libname" \
+ --enable-add-ons=linuxthreads%{?with_idn:,libidn} \
+ --enable-kernel="%{min_kernel}" \
--enable-profile \
- --%{?_without_fp:en}%{!?_without_fp:dis}able-omitfp
-# --with-headers=%{_kernelsrcdir}/include
-# problem compiling with --enable-bounded (must be reported to libc-alpha)
+ --%{?_without_fp:en}%{!?_without_fp:dis}able-omitfp \
+%if 0%{!?_with_kernheaders:1}
+ CPPFLAGS="-I%{_kernelsrcdir}/include" \
+ --with-headers=%{_kernelsrcdir}/include
+%else
+ CPPFLAGS="-I$_headers_dir" \
+ --with-headers=$_headers_dir
+%endif
+
+ # problem compiling with --enable-bounded (must be reported to libc-alpha)
+
+ %{__make} %{?parallelmkflags}
-%{__make} %{?parallelmkflags}
+ cd ${basedir}
+}
+
+# Build main glibc
+%if %{with_biarch}
+%ifarch x86_64
+BuildGlibc "athlon"
+%endif
+
+BuildGlibc "%{_target_cpu}"
+%endif
%install
rm -rf $RPM_BUILD_ROOT
+basedir=$(pwd)
install -d $RPM_BUILD_ROOT{/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_mandir}/man{3,8},/var/log}
-cd builddir
+_headers_dir=`pwd`/usr/include; export _headers_dir;
+
+cd builddir-%{_target_cpu}
env LANGUAGE=C LC_ALL=C \
%{__make} install \
install elf/postshell $RPM_BUILD_ROOT/sbin
%{!?_without_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
%{__make} -C ../linuxthreads/man
install ../linuxthreads/man/*.3thr $RPM_BUILD_ROOT%{_mandir}/man3
rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/{localtime,posixtime,posixrules,posix/*}
-cd $RPM_BUILD_ROOT%{_datadir}/zoneinfo
-for i in [A-Z]*; do
- ln -s ../$i posix
-done
-cd -
+#cd $RPM_BUILD_ROOT%{_datadir}/zoneinfo
+#for i in [A-Z]*; do
+# ln -s ../$i posix
+#done
+#cd -
ln -sf %{_sysconfdir}/localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/localtime
ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixtime
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-%{version}.so}
+%endif
# Collect locale files and mark them with %%lang()
rm -f ../glibc.lang
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 ja_JP.SJIS ko_KR.utf8 pt_BR \
+ for j in de_AT de_BE de_CH de_LU es_AR es_MX ja_JP.SJIS ko_KR.utf8 pt_BR \
zh_CN zh_CN.gbk zh_HK zh_TW ; do
if [ $j = "$lang" ]; then
twochar=
done
# XXX: to be added when become supported by glibc
# am,bn,ml (present in sources, but incomplete and disabled) (used by GNOME)
-# kn,mn,ia (used by GNOME)
+# ia,kn,li,mn,sr@Latn (used by GNOME)
+# note: GNOME2 uses sr as cyrillic!
# nso,ss,ven,xh,zu (used by KDE)
-for i in af ar az be bg br bs cy de_AT el en eo es_AR et eu fa fi ga gr he hi \
- hr hu id is ja_JP.SJIS ka lg lt lv mk ms mt nn pt ro ru se sl sq sr \
- sr@cyrillic ta tg th uk uz vi wa yi zh_CN ; do
+for i in af ar az be bg br bs cy de_AT el en en_AU eo es_AR es_MX et eu fa fi \
+ ga gr he hi hr hu id is ja_JP.SJIS ka lg lt lv mk ms mt nn pt ro ru \
+ se sl sq sr sr@cyrillic ta tg th uk uz vi wa yi zh_CN ; 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/_.*//'`
# localedb-gen infrastructure
install %{SOURCE8} $RPM_BUILD_ROOT%{_bindir}/localedb-gen
-cat > $RPM_BUILD_ROOT/etc/sysconfig/localedb <<EOF
-# list of supported locales
-#SUPPORTED_LOCALES="pl_PL/ISO-8859-2 de_DE/ISO-8859-2 en_GB/ISO-8859-1 en_US/ISO-8859-1"
-EOF
install ../localedata/SUPPORTED $RPM_BUILD_ROOT%{_datadir}/i18n
# shutup check-files
rm -f $RPM_BUILD_ROOT%{_libdir}/pt_chown
# copy actual kernel headers for glibc-kernel-headers
-#%{__mkdir} -p $RPM_BUILD_ROOT%{_includedir}
-#%{__cp} -Hr %{_kernelsrcdir}/include/{asm,linux} $RPM_BUILD_ROOT%{_includedir}
-#if [ -d %{_kernelsrcdir}/include/asm-generic ] ; then
-# %{__cp} -Hr %{_kernelsrcdir}/include/asm-generic $RPM_BUILD_ROOT%{_includedir}
-#fi
+%if 0%{!?_with_kernheaders:1}
+%{__mkdir} -p $RPM_BUILD_ROOT%{_includedir}
+%{__cp} -Hr %{_kernelsrcdir}/include/{asm,linux} $RPM_BUILD_ROOT%{_includedir}
+if [ -d %{_kernelsrcdir}/include/asm-generic ] ; then
+ %{__cp} -Hr %{_kernelsrcdir}/include/asm-generic $RPM_BUILD_ROOT%{_includedir}
+fi
+%else
+%{__cp} -Hr $_headers_dir/{asm,linux} $RPM_BUILD_ROOT%{_includedir}
+%endif
%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
%post -p /sbin/postshell
/sbin/ldconfig
-/sbin/telinit u
%postun devel
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
-#%pre kernel-headers
+%pre kernel-headers
# useful if these are symlinks
-#if [ -h %{_includedir}/asm ]; then rm -f %{_includedir}/asm; fi
-#if [ -h %{_includedir}/linux ]; then rm -f %{_includedir}/linux; fi
+if [ -h %{_includedir}/asm ]; then rm -f %{_includedir}/asm; fi
+if [ -h %{_includedir}/linux ]; then rm -f %{_includedir}/linux; fi
%post -n nscd
/sbin/chkconfig --add nscd
-touch /var/log/nscd && (chmod 000 /var/log/nscd; chown root.root /var/log/nscd; chmod 640 /var/log/nscd)
+touch /var/log/nscd
+chmod 000 /var/log/nscd
+chown root:root /var/log/nscd
+chmod 640 /var/log/nscd
if [ -f /var/lock/subsys/nscd ]; then
/etc/rc.d/init.d/nscd restart 1>&2
else
fi
/sbin/chkconfig --del nscd
fi
+%endif
+%ifnarch sparc64
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc README NEWS FAQ BUGS
%attr(755,root,root) %{_bindir}/glibcbug
%attr(755,root,root) %{_bindir}/iconv
%attr(755,root,root) %{_bindir}/ldd
-%ifnarch alpha sparc sparc64 ppc
+%ifnarch alpha ppc sparc64
%attr(755,root,root) %{_bindir}/lddlibc4
%endif
%attr(755,root,root) %{_bindir}/locale
%attr(755,root,root) %{_sbindir}/zdump
%attr(755,root,root) %{_sbindir}/zic
-%attr(755,root,root) /lib/ld-*
+# 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
+%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) %{_bindir}/*trace
%{_includedir}/*.h
+%ifarch alpha
+%{_includedir}/alpha
+%endif
%{_includedir}/arpa
%{_includedir}/bits
%{_includedir}/gnu
%lang(pt_BR) %{_mandir}/pt_BR/man3/*
%lang(ru) %{_mandir}/ru/man3/*
-#%files kernel-headers
-#%defattr(644,root,root,755)
-#%{_includedir}/asm*
-#%{_includedir}/linux
+%files kernel-headers
+%defattr(644,root,root,755)
+%{_includedir}/asm*
+%{_includedir}/linux
%files -n nscd
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/localedb-gen
%{_datadir}/i18n
%{_mandir}/man1/localedef*
-%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/localedb
%files localedb-all
%defattr(644,root,root,755)
%{_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