2009-02-20 08:46:43 +01:00
|
|
|
#
|
2010-07-20 09:50:26 +02:00
|
|
|
# spec file for package glibc (Version 2.11.2)
|
2009-02-20 08:46:43 +01:00
|
|
|
#
|
2010-01-03 12:31:34 +01:00
|
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2009-02-20 08:46:43 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
|
|
|
|
Name: glibc
|
|
|
|
BuildRequires: gcc-c++ libstdc++-devel
|
|
|
|
BuildRequires: libselinux-devel
|
2009-09-23 16:36:23 +02:00
|
|
|
%define _filter_GLIBC_PRIVATE 1
|
2009-02-20 08:46:43 +01:00
|
|
|
%define build_locales 1
|
|
|
|
%define run_testsuite 0
|
|
|
|
%define disable_assert 0
|
|
|
|
%define enable_stackguard_randomization 1
|
|
|
|
%ifarch ppc ppc64
|
2010-01-03 12:31:34 +01:00
|
|
|
%define optimize_power 1
|
2010-04-26 13:34:14 +02:00
|
|
|
%ifarch ppc
|
|
|
|
%define powerpc_optimize_base power3
|
|
|
|
%define powerpc_optimize_tune power3
|
|
|
|
%define powerpc_optimize_cpu_power4 1
|
|
|
|
%else
|
2010-01-03 12:31:34 +01:00
|
|
|
%define powerpc_optimize_base power4
|
|
|
|
%define powerpc_optimize_tune power5
|
2010-04-26 13:34:14 +02:00
|
|
|
%define powerpc_optimize_cpu_power4 0
|
|
|
|
%endif
|
2010-01-29 14:56:15 +01:00
|
|
|
# We are not building Power CPU specific optimizations for openSUSE.
|
|
|
|
%define powerpc_optimize_cpu_power6 0
|
|
|
|
%define powerpc_optimize_cpu_power7 0
|
|
|
|
%define powerpc_optimize_cpu_cell 0
|
2009-02-20 08:46:43 +01:00
|
|
|
%else
|
2010-01-03 12:31:34 +01:00
|
|
|
%define optimize_power 0
|
|
|
|
%define powerpc_optimize_base 0
|
2010-04-26 13:34:14 +02:00
|
|
|
%define powerpc_optimize_cpu_power4 0
|
2010-01-03 12:31:34 +01:00
|
|
|
%define powerpc_optimize_cpu_power6 0
|
|
|
|
%define powerpc_optimize_cpu_power7 0
|
|
|
|
%define powerpc_optimize_cpu_cell 0
|
|
|
|
%endif # ppc, ppc64
|
2010-07-20 09:50:26 +02:00
|
|
|
License: GPLv2+
|
2009-02-20 08:46:43 +01:00
|
|
|
Summary: Standard Shared Libraries (from the GNU C Library)
|
|
|
|
Group: System/Libraries
|
|
|
|
Obsoletes: ngpt <= 2.2.2 ngpt-devel <= 2.2.2
|
|
|
|
Provides: ntpt = 2.2.2 ngpt-devel = 2.2.2
|
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: glibc-64bit
|
|
|
|
%endif
|
|
|
|
%ifarch ppc
|
|
|
|
Obsoletes: glibc-32bit
|
|
|
|
%endif
|
|
|
|
Provides: rtld(GNU_HASH)
|
|
|
|
AutoReqProv: on
|
2010-05-20 02:21:41 +02:00
|
|
|
Version: 2.11.2
|
2010-02-14 15:34:48 +01:00
|
|
|
Release: 1
|
2009-02-20 08:46:43 +01:00
|
|
|
Url: http://www.gnu.org/software/libc/libc.html
|
|
|
|
PreReq: filesystem
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-06-11 16:32:35 +02:00
|
|
|
Source: glibc-%{version}-21580967038a.tar.bz2
|
2010-01-03 12:31:34 +01:00
|
|
|
Source2: glibc-ports-2.10.1-2b2b217196.tar.bz2
|
2009-02-20 08:46:43 +01:00
|
|
|
Source3: noversion.tar.bz2
|
|
|
|
Source4: manpages.tar.bz2
|
2009-09-16 22:09:07 +02:00
|
|
|
Source5: usr.sbin.nscd
|
2009-02-20 08:46:43 +01:00
|
|
|
Source8: nsswitch.conf
|
|
|
|
Source9: nscd.init
|
|
|
|
Source10: bindresvport.blacklist
|
|
|
|
Source11: ctype_b.c
|
|
|
|
Source12: glibc_post_upgrade.c
|
|
|
|
Source15: glibc.rpmlintrc
|
2010-01-03 12:31:34 +01:00
|
|
|
Source16: baselibs.conf
|
2009-02-20 08:46:43 +01:00
|
|
|
%if %_target_cpu == "i686"
|
2010-01-03 12:31:34 +01:00
|
|
|
# We need to avoid to have only the src rpm from i686 on the media,
|
2009-02-20 08:46:43 +01:00
|
|
|
# since it does not work on other architectures.
|
|
|
|
NoSource: 0
|
|
|
|
%endif
|
|
|
|
#
|
|
|
|
Patch0: glibc-2.3-SuSE.diff
|
|
|
|
Patch1: glibc-2.3.90-noversion.diff
|
|
|
|
Patch2: glibc-2.3.90-fnmatch.diff
|
2010-03-18 14:37:59 +01:00
|
|
|
Patch3: glibc-resolv-reload.diff
|
2009-02-20 08:46:43 +01:00
|
|
|
Patch4: glibc-2.3.locales.diff.bz2
|
2009-09-10 12:38:51 +02:00
|
|
|
Patch5: crypt_blowfish-1.0-suse.diff
|
2009-05-27 12:39:38 +02:00
|
|
|
Patch7: glibc-version.diff
|
|
|
|
Patch8: glibc-2.4.90-revert-only-euro.diff
|
|
|
|
Patch9: glibc-2.3-regcomp.diff
|
|
|
|
Patch10: glibc-2.3.2-revert_tcsetattr.diff
|
|
|
|
Patch11: glibc-2.3.1.localedef.diff
|
|
|
|
Patch12: glibc-2.3.2.no_archive.diff
|
|
|
|
Patch13: glibc-2.3.3-amd64-string.diff
|
|
|
|
Patch14: libm-x86-64.diff.bz2
|
|
|
|
Patch15: glibc-2.3.90-bindresvport.blacklist.diff
|
|
|
|
Patch16: glibc-suse-note.diff
|
|
|
|
Patch17: glibc-2.4.90-no_NO.diff
|
|
|
|
Patch18: glibc-2.3.90-ld.so-madvise.diff
|
|
|
|
Patch19: glibc-2.3.3-amd64-s_ceil.diff
|
2009-02-20 08:46:43 +01:00
|
|
|
Patch20: glibc-2.3.3-execstack.diff
|
|
|
|
Patch21: glibc-2.4-china.diff
|
|
|
|
Patch22: glibc-2.3.4-gb18030-big5hkscs.diff.bz2
|
|
|
|
Patch23: glibc-2.4.90-nscd.diff
|
|
|
|
Patch24: glibc-2.3.3-nscd-db-path.diff
|
|
|
|
Patch25: glibc-2.3.5-nscd-zeronegtimeout.diff
|
|
|
|
Patch26: glibc-2.3.90-langpackdir.diff
|
|
|
|
Patch27: glibc-nptl-2.4-nofixsyscallnr.diff
|
|
|
|
Patch30: glibc-2.6-configure.diff
|
|
|
|
Patch31: glibc-2.2-sunrpc.diff
|
|
|
|
Patch32: glibc-2.8-getconf.diff
|
2009-05-27 12:39:38 +02:00
|
|
|
Patch33: getaddrinfo-ipv6-sanity.diff
|
|
|
|
Patch35: ppc-atomic.diff
|
|
|
|
Patch36: glibc-2.8-clone.diff
|
|
|
|
Patch37: glibc-nss-deepbind.diff
|
|
|
|
Patch39: glibc-compiled-binaries.diff
|
|
|
|
Patch40: glibc-selinux.diff
|
|
|
|
Patch41: glibc-check-native-missing-include.diff
|
|
|
|
Patch42: glibc-no-unwind-tables.diff
|
|
|
|
Patch43: glibc-2.10-nscd-nostack.diff
|
|
|
|
Patch44: glibc-cpusetsize.diff
|
|
|
|
Patch45: glibc-nis-splitgroups.diff
|
2010-01-03 12:31:34 +01:00
|
|
|
Patch46: glibc-2.10.99-ia64-include.diff
|
|
|
|
Patch47: libm-x86-64-exceptions.diff
|
|
|
|
Patch48: glibc-uio-cell.diff
|
|
|
|
Patch50: glibc-nameserver-localhost.diff
|
2010-05-04 08:58:36 +02:00
|
|
|
Patch54: glibc-statfs64-ia64.diff
|
2010-03-25 17:12:02 +01:00
|
|
|
Patch60: ld-prelink-unique.diff
|
|
|
|
Patch61: glibc-ppc64-vdso-time.diff
|
2010-04-20 13:16:55 +02:00
|
|
|
Patch64: glibc-gai-private4.diff
|
2010-05-11 00:04:33 +02:00
|
|
|
Patch65: glibc-resolv-mdnshint.diff
|
2010-06-11 16:32:35 +02:00
|
|
|
Patch66: glibc-ldconfigr-aux.diff
|
2010-07-07 05:26:30 +02:00
|
|
|
Patch67: glibc-nis-initgroups.diff
|
2009-05-27 12:39:38 +02:00
|
|
|
Patch500: ARM_glibc-2.10.1-local-eabi-wchar.diff
|
|
|
|
Patch501: ARM_glibc-2.10.1-local-hwcap-updates.diff
|
|
|
|
Patch502: ARM_glibc-2.10.1-local-lowlevellock.diff
|
|
|
|
Patch503: ARM_glibc-2.10.1-local-no-hwcap.diff
|
2010-07-04 15:55:39 +02:00
|
|
|
# http://sources.redhat.com/bugzilla/show_bug.cgi?id=11155
|
2010-07-20 09:50:26 +02:00
|
|
|
Patch600: glibc-sparc64-fxstat.diff
|
2009-02-20 08:46:43 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
The GNU C Library provides the most important standard libraries used
|
|
|
|
by nearly all programs: the standard C library, the standard math
|
|
|
|
library, and the POSIX thread library. A system is not functional
|
|
|
|
without these libraries.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package info
|
2010-01-03 12:31:34 +01:00
|
|
|
License: GPLv2+
|
2009-02-20 08:46:43 +01:00
|
|
|
Summary: Info Files for the GNU C Library
|
|
|
|
Group: Documentation/Other
|
|
|
|
PreReq: %{install_info_prereq}
|
|
|
|
AutoReqProv: on
|
|
|
|
|
|
|
|
%description info
|
|
|
|
This package contains the documentation for the GNU C library stored as
|
|
|
|
info files. Due to a lack of resources, this documentation is not
|
|
|
|
complete and is partially out of date.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package html
|
2010-01-03 12:31:34 +01:00
|
|
|
License: GPLv2+ ; LGPLv2.1+
|
2009-02-20 08:46:43 +01:00
|
|
|
Summary: HTML Documentation for the GNU C Library
|
|
|
|
Group: Documentation/HTML
|
|
|
|
AutoReqProv: on
|
|
|
|
|
|
|
|
%description html
|
|
|
|
This package contains the HTML documentation for the GNU C library. Due
|
|
|
|
to a lack of resources, this documentation is not complete and is
|
|
|
|
partially out of date.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package i18ndata
|
2010-01-03 12:31:34 +01:00
|
|
|
License: LGPLv2.1+
|
2009-02-20 08:46:43 +01:00
|
|
|
Summary: Database Sources for 'locale'
|
|
|
|
Group: System/Libraries
|
|
|
|
AutoReqProv: on
|
|
|
|
|
|
|
|
%description i18ndata
|
|
|
|
This package contains the data needed to build the locale data files to
|
|
|
|
use the internationalization features of the GNU libc. It is normally
|
|
|
|
not necessary to install this packages, the data files are already
|
|
|
|
created.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package locale
|
2010-01-03 12:31:34 +01:00
|
|
|
License: GPLv2+ ; LGPLv2.1+
|
2009-02-20 08:46:43 +01:00
|
|
|
Summary: Locale Data for Localized Programs
|
|
|
|
Group: System/Libraries
|
|
|
|
Requires: glibc = %{version}
|
2010-03-25 17:12:02 +01:00
|
|
|
PreReq: /bin/cat
|
2009-02-20 08:46:43 +01:00
|
|
|
AutoReqProv: on
|
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: glibc-locale-64bit
|
|
|
|
%endif
|
|
|
|
%ifarch ppc
|
|
|
|
Obsoletes: glibc-locale-32bit
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description locale
|
|
|
|
Locale data for the internationalisation features of the GNU C library.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n nscd
|
2010-01-03 12:31:34 +01:00
|
|
|
License: LGPLv2.1+
|
2009-02-20 08:46:43 +01:00
|
|
|
Summary: Name Service Caching Daemon
|
|
|
|
Group: System/Daemons
|
|
|
|
Provides: glibc:/usr/sbin/nscd aaa_base:/etc/init.d/nscd
|
|
|
|
PreReq: %insserv_prereq
|
|
|
|
|
|
|
|
%description -n nscd
|
|
|
|
Nscd caches name service lookups and can dramatically improve
|
|
|
|
performance with NIS, NIS+, and LDAP.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package profile
|
2010-01-03 12:31:34 +01:00
|
|
|
License: LGPLv2.1+
|
2009-02-20 08:46:43 +01:00
|
|
|
Summary: Libc Profiling and Debugging Versions
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: glibc = %{version}
|
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: glibc-profile-64bit
|
|
|
|
%endif
|
|
|
|
%ifarch ppc
|
|
|
|
Obsoletes: glibc-profile-32bit
|
|
|
|
%endif
|
|
|
|
AutoReqProv: on
|
|
|
|
|
|
|
|
%description profile
|
|
|
|
This package contains special versions of the GNU C library which are
|
|
|
|
necessary for profiling and debugging.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
2010-01-03 12:31:34 +01:00
|
|
|
License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+
|
2009-02-20 08:46:43 +01:00
|
|
|
Summary: Include Files and Libraries Mandatory for Development
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Obsoletes: epoll = 1.0
|
|
|
|
Provides: epoll <= 1.0
|
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: glibc-devel-64bit
|
|
|
|
%endif
|
|
|
|
%ifarch ppc
|
|
|
|
Obsoletes: glibc-devel-32bit
|
|
|
|
%endif
|
|
|
|
PreReq: /bin/rm
|
|
|
|
Requires: glibc = %{version}, linux-kernel-headers
|
|
|
|
AutoReqProv: on
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
These libraries are needed to develop programs which use the standard C
|
|
|
|
library.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package obsolete
|
2010-01-03 12:31:34 +01:00
|
|
|
License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+
|
2009-02-20 08:46:43 +01:00
|
|
|
Summary: Obsolete Shared Libraries from the GNU C Library
|
|
|
|
Group: System/Libraries
|
|
|
|
Requires: glibc = %{version}
|
|
|
|
AutoReqProv: on
|
|
|
|
|
|
|
|
%description obsolete
|
|
|
|
This package provides some old libraries from the GNU C Library which
|
|
|
|
are no longer supported. Additional it provides a compatibility library
|
|
|
|
for old binaries linked against glibc 2.0.
|
|
|
|
|
|
|
|
Install this package if you need one of this libraries to get old
|
|
|
|
binaries working, but since this libraries are not supported and there
|
|
|
|
is no gurantee that they work for you, you should try to get newer
|
|
|
|
versions of your software.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2009-05-27 12:39:38 +02:00
|
|
|
%ifarch %arm armv5tel armv7l
|
|
|
|
# add glibc-ports for arm
|
2010-01-03 12:31:34 +01:00
|
|
|
# this is CURRENTLY BROKEN; ARM-interested contributors need to provide
|
|
|
|
# new tested glibc-ports source
|
2010-03-25 17:12:02 +01:00
|
|
|
%setup -n glibc-%{version} -q -a 2 -a 3 -a 4
|
2009-05-27 12:39:38 +02:00
|
|
|
%else
|
|
|
|
# any other leave out ports
|
2010-03-25 17:12:02 +01:00
|
|
|
%setup -n glibc-%{version} -q -a 3 -a 4
|
2009-05-27 12:39:38 +02:00
|
|
|
%endif
|
2009-08-28 17:43:28 +02:00
|
|
|
%patch0
|
2009-02-20 08:46:43 +01:00
|
|
|
# libNoVersion part is only active on ix86
|
|
|
|
%patch1
|
|
|
|
%patch2
|
|
|
|
%patch3
|
|
|
|
%patch4
|
2009-05-27 12:39:38 +02:00
|
|
|
%patch5
|
2009-02-20 08:46:43 +01:00
|
|
|
%patch7
|
|
|
|
%patch8
|
|
|
|
%patch9
|
|
|
|
%patch10
|
|
|
|
%patch11
|
|
|
|
%patch12
|
2009-05-27 12:39:38 +02:00
|
|
|
%patch13
|
2010-01-29 14:56:15 +01:00
|
|
|
# strncmp.S triggers amd64 assembler bug [bnc#540647]
|
|
|
|
rm sysdeps/x86_64/strncmp.S
|
2009-05-27 12:39:38 +02:00
|
|
|
%patch14 -E
|
2009-02-20 08:46:43 +01:00
|
|
|
# We have s_sincos.c in patch13, remove duplicate
|
|
|
|
rm sysdeps/x86_64/fpu/s_sincos.S
|
|
|
|
%patch15
|
|
|
|
%patch16
|
|
|
|
%patch17
|
|
|
|
%patch18
|
2009-05-27 12:39:38 +02:00
|
|
|
%patch19
|
2009-02-20 08:46:43 +01:00
|
|
|
%patch20
|
|
|
|
%patch21
|
|
|
|
%patch22
|
2010-03-18 14:37:59 +01:00
|
|
|
# avoid changing nscd_stat.c mtime to avoid code generation
|
|
|
|
# differences on each rebuild
|
|
|
|
touch -r nscd/nscd_stat.c nscd/s-stamp
|
2009-02-20 08:46:43 +01:00
|
|
|
%patch23
|
|
|
|
%patch24
|
|
|
|
%patch25
|
2010-03-18 14:37:59 +01:00
|
|
|
touch -r nscd/s-stamp nscd/nscd_stat.c
|
|
|
|
rm nscd/s-stamp
|
2009-02-20 08:46:43 +01:00
|
|
|
%patch26
|
|
|
|
%patch27
|
|
|
|
%patch30
|
|
|
|
%patch31
|
|
|
|
%patch32
|
|
|
|
%patch33
|
|
|
|
%patch35
|
|
|
|
%patch36
|
|
|
|
%patch37
|
|
|
|
%patch39
|
|
|
|
%patch40
|
|
|
|
%patch41
|
|
|
|
%patch42
|
|
|
|
%patch43
|
|
|
|
%patch44
|
|
|
|
%patch45
|
2009-06-12 16:37:00 +02:00
|
|
|
%patch46
|
2009-07-17 15:43:39 +02:00
|
|
|
%patch47
|
2010-01-03 12:31:34 +01:00
|
|
|
%patch48 -p1
|
|
|
|
%patch50 -p1
|
2010-03-25 17:12:02 +01:00
|
|
|
%patch54
|
|
|
|
%patch60 -p1
|
|
|
|
%patch61 -p1
|
2010-04-20 13:16:55 +02:00
|
|
|
%patch64
|
2010-05-11 00:04:33 +02:00
|
|
|
%patch65 -p1
|
2010-06-11 16:32:35 +02:00
|
|
|
%patch66 -p1
|
2010-07-07 05:26:30 +02:00
|
|
|
%patch67 -p1
|
2009-05-27 12:39:38 +02:00
|
|
|
%ifarch %arm armv5tel armv7l
|
|
|
|
%patch500
|
|
|
|
%patch501
|
|
|
|
%patch502
|
|
|
|
%patch503
|
|
|
|
%endif
|
2010-07-04 15:55:39 +02:00
|
|
|
%patch600 -p1
|
2009-02-20 08:46:43 +01:00
|
|
|
#
|
|
|
|
# Inconsistency detected by ld.so: dl-close.c: 719: _dl_close: Assertion `map->l_init_called' failed!
|
|
|
|
#
|
|
|
|
# Glibc 2.8 introduced the HP_TIMING element to the rtld_global_ro struct # definition.
|
|
|
|
# If the base is built without power4 the loader won't have this element in
|
|
|
|
# the struct whereas the power4/5/6/... libc will, so there will be a disconnect
|
|
|
|
# between the size of the rtld_global_ro struct between the two and dl_close
|
|
|
|
# ends up getting called incorrectly when it's actually attempting to call a
|
|
|
|
# resolver function. This is because the GLRO() macro simply attempts to
|
|
|
|
# compute an offset and gets the wrong one.
|
|
|
|
# Building the base glibc with --with-cpu=power4 solves this problem.
|
|
|
|
# But: ppc32 can not default to -mcpu=power4 because it would emit instructions
|
|
|
|
# which are not available on G3, G4 etc.
|
|
|
|
#
|
|
|
|
# We simply remove the power4 files, and build the base glibc for a generic powerpc cpu
|
|
|
|
# Additional cputuned libs can now be used on powerpc32
|
|
|
|
#
|
|
|
|
rm -fv sysdeps/powerpc/powerpc32/power4/hp-timing.c sysdeps/powerpc/powerpc32/power4/hp-timing.h
|
|
|
|
find . -name configure | xargs touch
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
#######################################################################
|
|
|
|
###
|
|
|
|
### BUILD
|
|
|
|
###
|
|
|
|
#######################################################################
|
2010-07-20 09:50:26 +02:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
%build
|
|
|
|
if [ -x /bin/uname.bin ]; then
|
2010-01-03 12:31:34 +01:00
|
|
|
/bin/uname.bin -a
|
2009-02-20 08:46:43 +01:00
|
|
|
else
|
2010-01-03 12:31:34 +01:00
|
|
|
uname -a
|
2009-02-20 08:46:43 +01:00
|
|
|
fi
|
|
|
|
uptime || :
|
|
|
|
ulimit -a
|
|
|
|
nice
|
|
|
|
# Adjust glibc version.h
|
|
|
|
echo "#define CONFHOST \"%{_target_cpu}-suse-linux\"" >> version.h
|
|
|
|
echo "#define CVSDATE \"`date -r ChangeLog +%Y%m%d`\"" >> version.h
|
|
|
|
#
|
|
|
|
# Default CFLAGS and Compiler
|
|
|
|
#
|
|
|
|
BuildFlags="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE -fno-strict-aliasing"
|
|
|
|
BuildFlags="$(echo $BuildFlags | sed -e 's#-fstack-protector##' -e 's#-ffortify=[0-9]*##')"
|
|
|
|
BuildCC="gcc"
|
|
|
|
BuildCCplus="g++"
|
|
|
|
add_ons=",libidn"
|
2010-06-28 23:29:28 +02:00
|
|
|
PARALLEL="%{?_smp_mflags}"
|
2009-02-20 08:46:43 +01:00
|
|
|
#
|
|
|
|
#now overwrite for some architectures
|
|
|
|
#
|
|
|
|
%ifarch sparc64
|
2010-01-03 12:31:34 +01:00
|
|
|
BuildFlags="-O2 -mcpu=ultrasparc -mvis -fcall-used-g6"
|
|
|
|
BuildCC="gcc -m64"
|
|
|
|
BuildCCplus="$BuildCCplus -m64"
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
%ifarch sparc
|
2010-01-03 12:31:34 +01:00
|
|
|
BuildFlags="$BuildFlags -fcall-used-g6"
|
|
|
|
BuildCC="gcc -m32"
|
|
|
|
BuildCCplus="$BuildCCplus -m32"
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
%ifarch sparcv9
|
2010-01-03 12:31:34 +01:00
|
|
|
BuildFlags="$BuildFlags -mcpu=ultrasparc -fcall-used-g6"
|
|
|
|
BuildCC="gcc -m32"
|
|
|
|
BuildCCplus="$BuildCCplus -m32"
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
%ifarch alphaev6
|
2010-01-03 12:31:34 +01:00
|
|
|
BuildFlags="-mcpu=ev6"
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
%ifarch ppc ppc64
|
2010-01-03 12:31:34 +01:00
|
|
|
BuildFlags="$(echo $BuildFlags | sed 's#-mminimal-toc##')"
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
%ifarch ppc64
|
2010-01-03 12:31:34 +01:00
|
|
|
BuildCC="$BuildCC -m64"
|
|
|
|
BuildCCplus="$BuildCCplus -m64"
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
%ifarch hppa
|
2010-01-03 12:31:34 +01:00
|
|
|
BuildFlags="$BuildFlags -mpa-risc-1-1 -fstrict-aliasing"
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
%ifarch %ix86 x86_64
|
2010-01-03 12:31:34 +01:00
|
|
|
BuildFlags="$BuildFlags -mno-tls-direct-seg-refs"
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
# Add flags for all plattforms except AXP
|
|
|
|
%ifnarch alpha
|
2010-01-03 12:31:34 +01:00
|
|
|
BuildFlags="$BuildFlags -g"
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
%if %{disable_assert}
|
2010-01-03 12:31:34 +01:00
|
|
|
BuildFlags="$BuildFlags -DNDEBUG=1"
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
%ifarch %ix86
|
2010-01-03 12:31:34 +01:00
|
|
|
add_ons=$add_ons,noversion
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
2009-05-27 12:39:38 +02:00
|
|
|
%ifarch %arm armv5tel armv7l
|
2010-01-03 12:31:34 +01:00
|
|
|
add_ons=$add_ons,ports
|
|
|
|
BuildFlags="-march=armv5te -O2 -Wall"
|
|
|
|
# fails to build otherwise - need to recheck and fix
|
|
|
|
%define enable_stackguard_randomization 0
|
2009-05-27 12:39:38 +02:00
|
|
|
%endif
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
configure_and_build_glibc() {
|
2010-01-03 12:31:34 +01:00
|
|
|
local dirname="$1"; shift
|
|
|
|
local cflags="$1"; shift
|
|
|
|
local addons="$1"; shift
|
|
|
|
mkdir "cc-$dirname"
|
|
|
|
cd "cc-$dirname"
|
2009-02-20 08:46:43 +01:00
|
|
|
CFLAGS="$cflags" CC="$BuildCC" CXX="$BuildCCplus" ../configure \
|
2010-01-03 12:31:34 +01:00
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libexecdir=%{_libdir} --infodir=%{_infodir} \
|
|
|
|
--enable-add-ons=nptl$addons --without-cvs --enable-profile \
|
|
|
|
"$@" \
|
2009-02-20 08:46:43 +01:00
|
|
|
%if %{enable_stackguard_randomization}
|
2010-01-03 12:31:34 +01:00
|
|
|
--enable-stackguard-randomization \
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
2009-05-27 12:39:38 +02:00
|
|
|
%ifarch %arm armv5tel armv7l
|
2010-01-03 12:31:34 +01:00
|
|
|
--build=%{_target_cpu}-suse-linux-gnueabi \
|
2009-05-27 12:39:38 +02:00
|
|
|
%else
|
2010-01-03 12:31:34 +01:00
|
|
|
--build=%{_target_cpu}-suse-linux \
|
2009-05-27 12:39:38 +02:00
|
|
|
%endif
|
2010-01-03 12:31:34 +01:00
|
|
|
--with-tls --with-__thread --enable-kernel=2.6.4
|
|
|
|
make $PARALLEL
|
|
|
|
cd ..
|
2009-02-20 08:46:43 +01:00
|
|
|
}
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
%if !%{optimize_power}
|
|
|
|
#
|
|
|
|
# Build base glibc
|
|
|
|
#
|
|
|
|
configure_and_build_glibc base "$BuildFlags" "$add_ons"
|
2009-02-20 08:46:43 +01:00
|
|
|
%else
|
2010-01-03 12:31:34 +01:00
|
|
|
#
|
|
|
|
# Build POWER-optimized glibc
|
|
|
|
#
|
|
|
|
# First, base build:
|
|
|
|
pBuildFlags="$BuildFlags -mcpu=%{powerpc_optimize_base} -mtune=%{powerpc_optimize_tune}"
|
2010-04-26 13:34:14 +02:00
|
|
|
%if %{powerpc_optimize_base} != "power3"
|
2010-03-25 17:12:02 +01:00
|
|
|
configure_and_build_glibc base "$pBuildFlags" "$add_ons" --with-cpu=%{powerpc_optimize_base}
|
2010-04-26 13:34:14 +02:00
|
|
|
%else
|
|
|
|
# Use no default CPU
|
|
|
|
configure_and_build_glibc base "$pBuildFlags" "$add_ons"
|
|
|
|
%endif
|
2010-01-03 12:31:34 +01:00
|
|
|
# Then other power variants:
|
|
|
|
for pcpu in \
|
2010-04-26 13:34:14 +02:00
|
|
|
%if %{powerpc_optimize_cpu_power4}
|
|
|
|
power4 \
|
|
|
|
%endif
|
2010-01-03 12:31:34 +01:00
|
|
|
%if %{powerpc_optimize_cpu_power6}
|
|
|
|
power6 \
|
|
|
|
%endif
|
|
|
|
%if %{powerpc_optimize_cpu_power7}
|
|
|
|
power7 \
|
|
|
|
%endif
|
|
|
|
; do
|
2010-03-25 17:12:02 +01:00
|
|
|
configure_and_build_glibc $pcpu "$BuildFlags -mcpu=$pcpu" "$add_ons" \
|
2010-01-03 12:31:34 +01:00
|
|
|
--with-cpu=$pcpu --disable-runbinaries
|
|
|
|
done
|
|
|
|
# Eventually, special Cell variant:
|
|
|
|
%if %{powerpc_optimize_cpu_cell}
|
|
|
|
configure_and_build_glibc ppc-cell-be "$BuildFlags -mcpu=cell" "$add_ons" --disable-runbinaries
|
|
|
|
%endif
|
|
|
|
%endif # optimize_power
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
#
|
|
|
|
# Build html documentation
|
|
|
|
#
|
2010-01-03 12:31:34 +01:00
|
|
|
make -C cc-base html
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
#
|
|
|
|
# Build glibc_post_upgrade binary
|
|
|
|
#
|
|
|
|
$BuildCC -static -Os -g $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glibc_post_upgrade \
|
2010-01-03 12:31:34 +01:00
|
|
|
-Lcc-base -Bcc-base/csu \
|
2010-04-26 13:34:14 +02:00
|
|
|
'-DREMOVE_TLS_DIRS' '-DREMOVE_PPC_OPTIMIZE_POWER5' \
|
2009-02-20 08:46:43 +01:00
|
|
|
%ifarch ppc ppc64
|
2010-04-26 13:34:14 +02:00
|
|
|
%if !%{powerpc_optimize_cpu_power4}
|
|
|
|
'-DREMOVE_PPC_OPTIMIZE_POWER4' \
|
|
|
|
%endif
|
2010-01-03 12:31:34 +01:00
|
|
|
%if !%{powerpc_optimize_cpu_power6}
|
2009-02-20 08:46:43 +01:00
|
|
|
'-DREMOVE_PPC_OPTIMIZE_POWER6' \
|
2010-01-03 12:31:34 +01:00
|
|
|
%endif
|
|
|
|
%if !%{powerpc_optimize_cpu_power7}
|
2009-02-20 08:46:43 +01:00
|
|
|
'-DREMOVE_PPC_OPTIMIZE_POWER7' \
|
2010-01-03 12:31:34 +01:00
|
|
|
%endif
|
|
|
|
%if !%{powerpc_optimize_cpu_cell}
|
2009-02-20 08:46:43 +01:00
|
|
|
'-DREMOVE_PPC_OPTIMIZE_CELL' \
|
2010-01-03 12:31:34 +01:00
|
|
|
%endif
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
'-DLIBDIR="/%{_lib}"' '-DGCONV_MODULES_DIR="%{_prefix}/%{_lib}/gconv"'
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
#######################################################################
|
|
|
|
###
|
|
|
|
### CHECK
|
|
|
|
###
|
|
|
|
#######################################################################
|
2009-02-20 08:46:43 +01:00
|
|
|
|
|
|
|
%check
|
|
|
|
%if %{run_testsuite}
|
2010-01-03 12:31:34 +01:00
|
|
|
# Increase timeout
|
|
|
|
export TIMEOUTFACTOR=16
|
|
|
|
%ifarch alpha %ix86 ppc ppc64 ia64 s390 s390x x86_64
|
|
|
|
# ix86: tst-cputimer? fails
|
|
|
|
# ia64: tst-timer4 fails
|
|
|
|
# ppc64: tst-pselect, ftwtest fails
|
|
|
|
# s390,s390x: tst-timer* fails
|
|
|
|
make -C cc-base -k check || echo make check failed
|
|
|
|
%else
|
|
|
|
make -C cc-base check
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
make -C cc-base check-abi || echo check-abi failed
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
#######################################################################
|
|
|
|
###
|
|
|
|
### INSTALL
|
|
|
|
###
|
|
|
|
#######################################################################
|
2009-02-20 08:46:43 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
# We don't want to strip the .symtab from our libraries in find-debuginfo.sh,
|
2010-01-03 12:31:34 +01:00
|
|
|
# certainly not from libpthread.so.* because it is used by libthread_db to find
|
2009-02-20 08:46:43 +01:00
|
|
|
# some non-exported symbols in order to detect if threading support
|
|
|
|
# should be enabled. These symbols are _not_ exported, and we can't easily
|
|
|
|
# export them retroactively without changing the ABI. So we have to
|
|
|
|
# continue to "export" them via .symtab, instead of .dynsym :-(
|
2010-01-03 12:31:34 +01:00
|
|
|
# But we also want to keep .symtab and .strtab of other libraries since some
|
|
|
|
# debugging tools currently require these sections directly inside the main
|
|
|
|
# files - specifically valgrind and PurifyPlus.
|
|
|
|
export STRIP_KEEP_SYMTAB=*.so*
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
# Make sure we will create the gconv-modules.cache
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gconv
|
|
|
|
touch $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
# Install base glibc
|
2009-02-20 08:46:43 +01:00
|
|
|
# Do not install in parallel, timezone Makefile will fail
|
2010-01-03 12:31:34 +01:00
|
|
|
make install_root=$RPM_BUILD_ROOT install -C cc-base
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
# Install power-optimized glibc
|
2009-02-20 08:46:43 +01:00
|
|
|
%if %{optimize_power}
|
2010-01-03 12:31:34 +01:00
|
|
|
# run ldconfig to create the library symlinks
|
|
|
|
# do not use the new ldconfig from the build directory because
|
|
|
|
# it may contain instructions not suitable for the cpu on the builhost
|
|
|
|
my_ldconfig=/sbin/ldconfig
|
|
|
|
for pcpu in \
|
2010-04-26 13:34:14 +02:00
|
|
|
%if %{powerpc_optimize_cpu_power4}
|
|
|
|
power4 \
|
|
|
|
%endif
|
2010-01-03 12:31:34 +01:00
|
|
|
%if %{powerpc_optimize_cpu_power6}
|
|
|
|
power6 \
|
|
|
|
%endif
|
|
|
|
%if %{powerpc_optimize_cpu_power7}
|
|
|
|
power7 \
|
|
|
|
%endif
|
|
|
|
%if %{powerpc_optimize_cpu_cell}
|
|
|
|
ppc-cell-be \
|
|
|
|
%endif
|
|
|
|
; do
|
|
|
|
make install_root=${RPM_BUILD_ROOT}/$pcpu install -C cc-$pcpu
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_lib}/$pcpu
|
|
|
|
for i in libc-%{version} libm-%{version} libpthread-%{version} libthread_db-1.0 librt-%{version}; do
|
|
|
|
mv $RPM_BUILD_ROOT/$pcpu/%{_lib}/$i.so $RPM_BUILD_ROOT/%{_lib}/$pcpu
|
|
|
|
done
|
|
|
|
$my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/$pcpu/
|
|
|
|
rm -rf $RPM_BUILD_ROOT/$pcpu
|
2009-02-20 08:46:43 +01:00
|
|
|
done
|
2010-01-03 12:31:34 +01:00
|
|
|
%if %{powerpc_optimize_cpu_power6}
|
|
|
|
# power6 is compatible with power6x
|
|
|
|
# doing a symlink doesnt work, ldconfig follows them and accepts only the first real dir
|
|
|
|
if test -d $RPM_BUILD_ROOT/%{_lib}/power6; then
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_lib}/power6x
|
|
|
|
for i in $RPM_BUILD_ROOT/%{_lib}/power6/*.so; do
|
|
|
|
b=`basename $i`
|
|
|
|
ln -vs ../power6/$b $RPM_BUILD_ROOT/%{_lib}/power6x/$b
|
|
|
|
done
|
|
|
|
$my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/power6x/
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
%endif # optimize_power
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
# Install locales
|
2009-02-20 08:46:43 +01:00
|
|
|
%if %{build_locales}
|
2010-01-03 12:31:34 +01:00
|
|
|
# Do not install locales in parallel!
|
|
|
|
cd cc-base
|
|
|
|
make install_root=$RPM_BUILD_ROOT install-locales -C ../localedata objdir=`pwd`
|
|
|
|
cd ..
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
2010-01-03 12:31:34 +01:00
|
|
|
# Create file list for glibc-locale package
|
2009-02-20 08:46:43 +01:00
|
|
|
%{find_lang} libc
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
# Prepare obsolete/, used only on some architectures:
|
2009-02-20 08:46:43 +01:00
|
|
|
export RPM_BUILD_ROOT
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_lib}/obsolete
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
# NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
|
|
|
|
# the generic one (RH#162634)
|
|
|
|
cp -av bits/stdio-lock.h $RPM_BUILD_ROOT%{_prefix}/include/bits/stdio-lock.h
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
%ifarch s390x
|
2010-01-03 12:31:34 +01:00
|
|
|
# s390x is different ...
|
|
|
|
mkdir $RPM_BUILD_ROOT/lib
|
|
|
|
ln -sf ../%{_lib}/ld-%{version}.so $RPM_BUILD_ROOT/lib/ld64.so.1
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
# Miscelanna:
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
install -m 0700 glibc_post_upgrade $RPM_BUILD_ROOT%{_sbindir}
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
install -m 644 $RPM_SOURCE_DIR/bindresvport.blacklist $RPM_BUILD_ROOT/etc
|
|
|
|
install -m 644 $RPM_SOURCE_DIR/nsswitch.conf $RPM_BUILD_ROOT/etc
|
|
|
|
install -m 644 posix/gai.conf $RPM_BUILD_ROOT/etc
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/default
|
|
|
|
install -m 644 nis/nss $RPM_BUILD_ROOT/etc/default/
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/include/resolv
|
|
|
|
install -m 0644 resolv/mapv4v6addr.h $RPM_BUILD_ROOT/usr/include/resolv/
|
|
|
|
install -m 0644 resolv/mapv4v6hostent.h $RPM_BUILD_ROOT/usr/include/resolv/
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/glibc
|
|
|
|
cp -p manual/libc/*.html $RPM_BUILD_ROOT/usr/share/doc/glibc
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
cd manpages; make install_root=$RPM_BUILD_ROOT install; cd ..
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
# nscd tools:
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
cp nscd/nscd.conf $RPM_BUILD_ROOT/etc
|
2009-09-16 22:09:07 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/apparmor.d
|
|
|
|
cp $RPM_SOURCE_DIR/usr.sbin.nscd $RPM_BUILD_ROOT/etc/apparmor.d
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
2009-02-20 08:46:43 +01:00
|
|
|
install -m 755 $RPM_SOURCE_DIR/nscd.init $RPM_BUILD_ROOT/etc/init.d/nscd
|
|
|
|
ln -sf /etc/init.d/nscd $RPM_BUILD_ROOT/usr/sbin/rcnscd
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/run/nscd
|
|
|
|
touch $RPM_BUILD_ROOT/var/run/nscd/{passwd,group,hosts}
|
|
|
|
touch $RPM_BUILD_ROOT/var/run/nscd/{socket,nscd.pid}
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
#
|
|
|
|
# Create ld.so.conf
|
|
|
|
#
|
|
|
|
cat > $RPM_BUILD_ROOT/etc/ld.so.conf <<EOF
|
|
|
|
%ifarch s390x sparc64 x86_64 ppc64 ppc
|
|
|
|
/usr/X11R6/lib64/Xaw3d
|
|
|
|
/usr/X11R6/lib64
|
|
|
|
/usr/lib64/Xaw3d
|
|
|
|
%endif
|
|
|
|
/usr/X11R6/lib/Xaw3d
|
|
|
|
/usr/X11R6/lib
|
|
|
|
/usr/lib/Xaw3d
|
|
|
|
%ifarch %x86
|
|
|
|
/usr/i586-suse-linux/lib
|
|
|
|
%else
|
|
|
|
%ifarch ppc ppc64
|
|
|
|
/usr/powerpc-suse-linux/lib
|
|
|
|
/usr/powerpc64-suse-linux/lib
|
|
|
|
%else
|
|
|
|
/usr/$RPM_ARCH-suse-linux/lib
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
/usr/local/lib
|
|
|
|
/opt/kde3/lib
|
|
|
|
%ifarch s390x sparc64 x86_64 ppc64 ppc
|
|
|
|
/lib64
|
|
|
|
/lib
|
|
|
|
/usr/lib64
|
|
|
|
/usr/lib
|
|
|
|
/usr/local/lib64
|
|
|
|
/opt/kde3/lib64
|
|
|
|
%endif
|
|
|
|
include /etc/ld.so.conf.d/*.conf
|
|
|
|
EOF
|
|
|
|
# Add ldconfig cache directory for directory ownership
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/cache/ldconfig
|
2010-01-03 12:31:34 +01:00
|
|
|
# Empty the ld.so.cache:
|
|
|
|
rm -f $RPM_BUILD_ROOT/etc/ld.so.cache
|
|
|
|
touch $RPM_BUILD_ROOT/etc/ld.so.cache
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
# libNoVersion belongs only to glibc-obsolete:
|
2009-02-20 08:46:43 +01:00
|
|
|
%ifarch %ix86
|
2010-01-03 12:31:34 +01:00
|
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/libNoVersion*
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_lib}/obsolete/noversion
|
|
|
|
mv -v $RPM_BUILD_ROOT/%{_lib}/libNoVersion* $RPM_BUILD_ROOT/%{_lib}/obsolete/noversion/
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
# Don't look at ldd! We don't wish a /bin/sh requires
|
2009-02-20 08:46:43 +01:00
|
|
|
chmod 644 $RPM_BUILD_ROOT/usr/bin/ldd
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
# Remove timezone data, now coming in standalone package:
|
2009-02-20 08:46:43 +01:00
|
|
|
for i in sbin/sln usr/bin/tzselect usr/sbin/zic usr/sbin/zdump etc/localtime; do
|
|
|
|
rm -f $RPM_BUILD_ROOT/$i
|
|
|
|
done
|
|
|
|
rm -rf $RPM_BUILD_ROOT/usr/share/zoneinfo
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
# Remove the buildflags tracking section and the build-id
|
2009-02-20 08:46:43 +01:00
|
|
|
for o in $RPM_BUILD_ROOT/%{_libdir}/crt[1in].o $RPM_BUILD_ROOT/%{_libdir}/lib*_nonshared.a; do
|
2010-01-03 12:31:34 +01:00
|
|
|
objcopy -R ".comment.SUSE.OPTs" -R ".note.gnu.build-id" $o
|
2009-02-20 08:46:43 +01:00
|
|
|
done
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
#######################################################################
|
|
|
|
###
|
|
|
|
### ...
|
|
|
|
###
|
|
|
|
#######################################################################
|
2009-02-20 08:46:43 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post -p %{_sbindir}/glibc_post_upgrade
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
%post locale
|
|
|
|
for l in /usr/share/locale/locale.alias %{_libdir}/gconv/gconv-modules; do
|
|
|
|
[ -d "$l.d" ] || continue
|
|
|
|
echo "###X# The following is autogenerated from extra files in the .d directory:" >>"$l"
|
|
|
|
cat "$l.d"/* >>"$l"
|
|
|
|
done
|
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
%post info
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/libc.info.gz
|
|
|
|
|
|
|
|
%postun info
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz
|
|
|
|
|
|
|
|
%preun -n nscd
|
|
|
|
%stop_on_removal nscd
|
|
|
|
|
|
|
|
%post -n nscd
|
|
|
|
%{insserv_force_if_yast nscd}
|
|
|
|
|
|
|
|
%postun -n nscd
|
|
|
|
%restart_on_update nscd
|
|
|
|
%insserv_cleanup
|
|
|
|
exit 0
|
2010-03-18 14:37:59 +01:00
|
|
|
|
2010-01-03 12:31:34 +01:00
|
|
|
#######################################################################
|
|
|
|
###
|
|
|
|
### FILES
|
|
|
|
###
|
|
|
|
#######################################################################
|
2009-02-20 08:46:43 +01:00
|
|
|
|
2010-03-18 14:37:59 +01:00
|
|
|
# glibc
|
2010-07-20 09:50:26 +02:00
|
|
|
|
2009-02-20 08:46:43 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc LICENSES
|
|
|
|
%config(noreplace) /etc/bindresvport.blacklist
|
|
|
|
%config /etc/ld.so.conf
|
|
|
|
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache
|
|
|
|
%config(noreplace) /etc/rpc
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf
|
|
|
|
%verify(not md5 size mtime) %config(noreplace) /etc/gai.conf
|
|
|
|
%config(noreplace) /etc/default/nss
|
|
|
|
%doc %{_mandir}/man1/getconf.1.gz
|
|
|
|
%doc %{_mandir}/man1/getent.1.gz
|
|
|
|
%doc %{_mandir}/man1/localedef.1.gz
|
|
|
|
%doc %{_mandir}/man5/*
|
|
|
|
%doc %{_mandir}/man8/rpcinfo.8.gz
|
|
|
|
/%{_lib}/ld-%{version}.so
|
|
|
|
%ifarch ppc s390 mips hppa
|
2010-01-03 12:31:34 +01:00
|
|
|
/%{_lib}/ld.so.1
|
2009-05-27 12:39:38 +02:00
|
|
|
%else
|
2010-01-03 12:31:34 +01:00
|
|
|
%ifarch ia64
|
|
|
|
/%{_lib}/ld-linux-ia64.so.2
|
|
|
|
%else
|
|
|
|
%ifarch s390x ppc64
|
|
|
|
/%{_lib}/ld64.so.1
|
|
|
|
%ifarch s390x
|
|
|
|
/lib/ld64.so.1
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
%ifarch x86_64
|
|
|
|
/%{_lib}/ld-linux-x86-64.so.2
|
|
|
|
%else
|
|
|
|
%ifarch %arm armv5tel armv7l
|
|
|
|
/%{_lib}/ld-linux.so.3
|
|
|
|
%else
|
|
|
|
/%{_lib}/ld-linux.so.2
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%endif
|
2009-05-27 12:39:38 +02:00
|
|
|
%endif
|
2009-02-20 08:46:43 +01:00
|
|
|
/%{_lib}/libBrokenLocale-%{version}.so
|
|
|
|
/%{_lib}/libBrokenLocale.so.1
|
|
|
|
/%{_lib}/libSegFault.so
|
|
|
|
/%{_lib}/libanl-%{version}.so
|
|
|
|
/%{_lib}/libanl.so.1
|
|
|
|
/%{_lib}/libc-%{version}.so
|
|
|
|
/%{_lib}/libc.so.6*
|
|
|
|
/%{_lib}/libcidn-%{version}.so
|
|
|
|
/%{_lib}/libcidn.so.1
|
|
|
|
/%{_lib}/libcrypt-%{version}.so
|
|
|
|
/%{_lib}/libcrypt.so.1
|
|
|
|
/%{_lib}/libdl-%{version}.so
|
|
|
|
/%{_lib}/libdl.so.2*
|
|
|
|
/%{_lib}/libm-%{version}.so
|
|
|
|
/%{_lib}/libm.so.6*
|
|
|
|
/%{_lib}/libmemusage.so
|
|
|
|
/%{_lib}/libnsl-%{version}.so
|
|
|
|
/%{_lib}/libnsl.so.1
|
|
|
|
/%{_lib}/libnss_compat-%{version}.so
|
|
|
|
/%{_lib}/libnss_compat.so.2
|
|
|
|
/%{_lib}/libnss_dns-%{version}.so
|
|
|
|
/%{_lib}/libnss_dns.so.2
|
|
|
|
/%{_lib}/libnss_files-%{version}.so
|
|
|
|
/%{_lib}/libnss_files.so.2
|
|
|
|
/%{_lib}/libnss_hesiod-%{version}.so
|
|
|
|
/%{_lib}/libnss_hesiod.so.2
|
|
|
|
/%{_lib}/libnss_nis-%{version}.so
|
|
|
|
/%{_lib}/libnss_nis.so.2
|
|
|
|
/%{_lib}/libnss_nisplus-%{version}.so
|
|
|
|
/%{_lib}/libnss_nisplus.so.2
|
|
|
|
/%{_lib}/libpcprofile.so
|
|
|
|
/%{_lib}/libpthread-%{version}.so
|
|
|
|
/%{_lib}/libpthread.so.0
|
|
|
|
/%{_lib}/libresolv-%{version}.so
|
|
|
|
/%{_lib}/libresolv.so.2
|
|
|
|
/%{_lib}/librt-%{version}.so
|
|
|
|
/%{_lib}/librt.so.1
|
|
|
|
/%{_lib}/libthread_db-1.0.so
|
|
|
|
/%{_lib}/libthread_db.so.1
|
|
|
|
/%{_lib}/libutil-%{version}.so
|
|
|
|
/%{_lib}/libutil.so.1
|
|
|
|
%if %{optimize_power}
|
2010-01-03 12:31:34 +01:00
|
|
|
%define optimized_libs() \
|
|
|
|
%dir %attr(0755,root,root) /%{_lib}/%1\
|
|
|
|
/%{_lib}/%1/libc-%{version}.so\
|
|
|
|
/%{_lib}/%1/libc.so.6*\
|
|
|
|
/%{_lib}/%1/libm-%{version}.so\
|
|
|
|
/%{_lib}/%1/libm.so.6*\
|
|
|
|
/%{_lib}/%1/libpthread-%{version}.so\
|
|
|
|
/%{_lib}/%1/libpthread.so.0\
|
|
|
|
/%{_lib}/%1/librt-%{version}.so\
|
|
|
|
/%{_lib}/%1/librt.so.1\
|
|
|
|
/%{_lib}/%1/libthread_db-1.0.so\
|
|
|
|
/%{_lib}/%1/libthread_db.so.1
|
2010-04-26 13:34:14 +02:00
|
|
|
%if %{powerpc_optimize_cpu_power4}
|
|
|
|
%{optimized_libs power4}
|
|
|
|
%endif
|
2010-01-03 12:31:34 +01:00
|
|
|
%if %{powerpc_optimize_cpu_power6}
|
|
|
|
%{optimized_libs power6}
|
|
|
|
%{optimized_libs power6x}
|
|
|
|
%endif
|
|
|
|
%if %{powerpc_optimize_cpu_power7}
|
|
|
|
%{optimized_libs power7}
|
|
|
|
%endif
|
|
|
|
%if %{powerpc_optimize_cpu_cell}
|
|
|
|
%{optimized_libs ppc-cell-be}
|
|
|
|
%endif
|
|
|
|
%endif # optimize_power
|
2009-02-20 08:46:43 +01:00
|
|
|
%dir %attr(0700,root,root) /var/cache/ldconfig
|
|
|
|
/sbin/ldconfig
|
|
|
|
/usr/bin/gencat
|
|
|
|
/usr/bin/getconf
|
|
|
|
/usr/bin/getent
|
|
|
|
/usr/bin/iconv
|
|
|
|
%attr(755,root,root) /usr/bin/ldd
|
|
|
|
%ifarch %ix86 sparc sparcv9
|
2010-01-03 12:31:34 +01:00
|
|
|
/usr/bin/lddlibc4
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
/usr/bin/locale
|
|
|
|
/usr/bin/localedef
|
|
|
|
%attr(4755,root,root) %{_libdir}/pt_chown
|
|
|
|
%dir %attr(0755,root,root) %{_libdir}/getconf
|
|
|
|
%{_libdir}/getconf/*
|
|
|
|
%{_sbindir}/glibc_post_upgrade
|
|
|
|
%{_sbindir}/rpcinfo
|
|
|
|
/usr/sbin/iconvconfig
|
|
|
|
|
|
|
|
%files obsolete
|
|
|
|
%defattr (755,root,root,755)
|
|
|
|
%dir /%{_lib}/obsolete/
|
|
|
|
%ifarch %ix86
|
2010-01-03 12:31:34 +01:00
|
|
|
%dir /%{_lib}/obsolete/noversion
|
|
|
|
/%{_lib}/obsolete/noversion/libNoVersion-%{version}.so
|
|
|
|
/%{_lib}/obsolete/noversion/libNoVersion.so.1
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files locale -f libc.lang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/share/locale/locale.alias
|
|
|
|
%if %{build_locales}
|
2010-01-03 12:31:34 +01:00
|
|
|
/usr/lib/locale
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
%{_libdir}/gconv
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc COPYING COPYING.LIB FAQ INSTALL NEWS NOTES README BUGS CONFORMANCE $RPM_SOURCE_DIR/ctype_b.c
|
|
|
|
%doc %{_mandir}/man1/catchsegv.1.gz
|
|
|
|
%doc %{_mandir}/man1/rpcgen.1.gz
|
|
|
|
%doc %{_mandir}/man1/sprof.1.gz
|
|
|
|
%doc %{_mandir}/man3/*
|
|
|
|
/usr/bin/catchsegv
|
|
|
|
/usr/bin/mtrace
|
|
|
|
/usr/bin/pcprofiledump
|
|
|
|
/usr/bin/rpcgen
|
|
|
|
/usr/bin/sprof
|
|
|
|
/usr/bin/xtrace
|
|
|
|
%{_prefix}/include/*
|
|
|
|
%{_libdir}/*.o
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_libdir}/libBrokenLocale.a
|
|
|
|
%{_libdir}/libanl.a
|
|
|
|
%{_libdir}/libbsd-compat.a
|
|
|
|
%{_libdir}/libc.a
|
|
|
|
%{_libdir}/libc_nonshared.a
|
|
|
|
%{_libdir}/libcrypt.a
|
|
|
|
%{_libdir}/libdl.a
|
|
|
|
%{_libdir}/libg.a
|
|
|
|
%{_libdir}/libieee.a
|
2010-01-03 12:31:34 +01:00
|
|
|
%ifarch ppc ppc64 s390 s390x sparc sparcv8 sparcv9 sparcv9v
|
|
|
|
# This is not built on sparc64.
|
|
|
|
%{_libdir}/libnldbl_nonshared.a
|
2009-02-20 08:46:43 +01:00
|
|
|
%endif
|
|
|
|
%{_libdir}/libm.a
|
|
|
|
%{_libdir}/libmcheck.a
|
|
|
|
%{_libdir}/libnsl.a
|
|
|
|
%{_libdir}/libpthread.a
|
|
|
|
%{_libdir}/libpthread_nonshared.a
|
|
|
|
%{_libdir}/libresolv.a
|
|
|
|
%{_libdir}/librpcsvc.a
|
|
|
|
%{_libdir}/librt.a
|
|
|
|
%{_libdir}/libutil.a
|
|
|
|
|
|
|
|
%files info
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc %{_infodir}/libc.info.gz
|
|
|
|
%doc %{_infodir}/libc.info-?.gz
|
|
|
|
%doc %{_infodir}/libc.info-??.gz
|
|
|
|
|
|
|
|
%files html
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc %{_prefix}/share/doc/glibc
|
|
|
|
|
|
|
|
%files i18ndata
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_prefix}/share/i18n
|
|
|
|
|
|
|
|
%files -n nscd
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%config(noreplace) /etc/nscd.conf
|
2009-09-23 16:36:23 +02:00
|
|
|
%dir /etc/apparmor.d
|
2009-09-16 22:09:07 +02:00
|
|
|
%config /etc/apparmor.d/usr.sbin.nscd
|
2009-02-20 08:46:43 +01:00
|
|
|
%config /etc/init.d/nscd
|
|
|
|
/usr/sbin/nscd
|
|
|
|
/usr/sbin/rcnscd
|
2010-05-04 08:54:49 +02:00
|
|
|
%dir %attr(0755,root,root) %ghost /var/run/nscd
|
2009-02-20 08:46:43 +01:00
|
|
|
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid
|
|
|
|
%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket
|
|
|
|
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd
|
|
|
|
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group
|
|
|
|
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts
|
|
|
|
|
|
|
|
%files profile
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libc_p.a
|
|
|
|
%{_libdir}/libBrokenLocale_p.a
|
|
|
|
%{_libdir}/libanl_p.a
|
|
|
|
%{_libdir}/libm_p.a
|
|
|
|
%{_libdir}/libcrypt_p.a
|
|
|
|
%{_libdir}/libpthread_p.a
|
|
|
|
%{_libdir}/libresolv_p.a
|
|
|
|
%{_libdir}/libnsl_p.a
|
|
|
|
%{_libdir}/librt_p.a
|
|
|
|
%{_libdir}/librpcsvc_p.a
|
|
|
|
%{_libdir}/libutil_p.a
|
|
|
|
%{_libdir}/libdl_p.a
|
|
|
|
|
|
|
|
%changelog
|