SHA256
1
0
forked from pool/glibc

Accepting request 114164 from Base:System

Lots of fixes for glibc and cleanup of spec file. (forwarded request 114163 from a_jaeger)

OBS-URL: https://build.opensuse.org/request/show/114164
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=105
This commit is contained in:
Stephan Kulow
2012-04-18 10:34:21 +00:00
committed by Git OBS Bridge
parent 415b57529a
commit 7f152ecbf8
32 changed files with 3086 additions and 1676 deletions

View File

@@ -16,6 +16,13 @@
#
# The full testsuite is only run with osc --with=glibc_run_testsuite
%bcond_with glibc_run_testsuite
# Run with osc --with=fast_build to have a shorter turnaround
# It will avoid building some parts of glibc and will not run the
# testsuite
%bcond_with fast_build
%define crypt_bf_version 1.2
Name: glibc
@@ -25,23 +32,50 @@ Group: System/Libraries
BuildRequires: gcc-c++
BuildRequires: libselinux-devel
BuildRequires: libstdc++-devel
%define _filter_GLIBC_PRIVATE 1
%if %_target_cpu == "i686"
# For i686 we ship only glibc and glibc-devel, so
# let's not build everything
%define build_profile 0
%define build_locales 0
%define build_html 0
%else
%if %{with fast_build}
%define build_profile 0
%define build_locales 0
%define build_html 0
%else
# Default:
%define build_profile 1
%define build_locales 1
%define build_html 1
%endif
%endif
# Enable testsuite runs for local builds
%if %{with fast_build}
%define run_testsuite 0
%else
%if %{with glibc_run_testsuite}
%define run_testsuite 1
%else
%define run_testsuite 0
%endif
%endif
%define disable_assert 0
%define enable_stackguard_randomization 1
%ifarch ppc ppc64
%define optimize_power 1
%ifarch ppc
%define powerpc_optimize_base power3
%define powerpc_optimize_tune power3
%define powerpc_optimize_cpu_power4 1
%define powerpc_optimize_base power4
%define powerpc_optimize_tune power4
%else
%define powerpc_optimize_base power4
%define powerpc_optimize_tune power5
%define powerpc_optimize_cpu_power4 0
%endif
# We are not building Power CPU specific optimizations for openSUSE.
%define powerpc_optimize_cpu_power4 0
%define powerpc_optimize_cpu_power6 0
%define powerpc_optimize_cpu_power7 0
%define powerpc_optimize_cpu_cell 0
@@ -110,6 +144,17 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
NoSource: 0
%endif
#
###
# Patches are ordered as:
# Patches that we will never upstream or which have not been looked at: 0000-0999
# Patches taken from upstream: 1000-2000
# Patches that are going upstream, waiting approval: 2000-3000
###
###
# Patches that upstream will not accept
###
# PATCH-FIX-OPENSUSE remove lfs test from testsuite aj@suse.de
Patch0: glibc-testsuite.patch
# PATCH-FIX-OPENSUSE handle glibc binaries
@@ -148,14 +193,12 @@ Patch28: glibc-2.2-sunrpc.diff
Patch29: glibc-2.8-getconf.diff
# PATCH-FIX-OPENSUSE only use ipv6 if real ipv6 address exists bnc#361697, bnc#684534
Patch30: getaddrinfo-ipv6-sanity.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
# PATCH-FIX-OPENSUSE add option --enable-runbinaries to disable running of compiled binaries
Patch33: glibc-compiled-binaries.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch36: glibc-no-unwind-tables.diff
# PATCH-FEATURE-SLE increase cpusetsize to 4096, needs to be kept for compatibility kukuk@suse.de
Patch38: glibc-cpusetsize.diff
# PATCH-FIX-OPENSUSE - Allow compilation with -altivec aj@suse.de
Patch41: glibc-uio-cell.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch45: glibc-gai-private4.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
@@ -164,7 +207,7 @@ Patch46: glibc-resolv-mdnshint.diff
Patch47: glibc-nscd-hconf.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch49: glibc-fini-unwind.diff
# PATCH-FIX-OPENSUSE bnc#657627
# PATCH-FIX-OPENSUSE bnc#657627, http://sourceware.org/bugzilla/show_bug.cgi?id=12561
Patch52: glibc-elf-localscope.diff
# FIX-OPENSUSE compile some files with -fno-strict-aliasing
Patch58: glibc-strict-aliasing.diff
@@ -174,16 +217,14 @@ Patch65: glibc-fix-double-loopback.diff
Patch66: glibc2.14-revert-sunrpc-removal.patch
# PATCH-FIX-OPENSUSE revert seeking on fclose for now bnc#711829 matz@suse.de
Patch67: glibc-revert-fseek-on-fclose.diff
# PATCH-FIX-OPENSUSE Fix crash (access-after-free) in dl_lookup_x bnc#703140 matz@suse.de
# PATCH-FIX-OPENSUSE Fix crash (access-after-free) in dl_lookup_x bnc#703140, bso#13579 matz@suse.de
Patch68: glibc-fix-lookup-crash.patch
# PATCH-FIX-OPENSUSE Fix crash (access-after-free) in dl_lookup_x bnc#703140, bso#13579 matz@suse.de
Patch69: glibc-fix-noload.patch
# PATCH-FIX-OPENSUSE Do not trigger an abort when an i586 Intel CPU is running the i686 library, as valgrind does. bnc#681398 aj@suse.de
Patch71: x86-cpuid-level2.patch
# PATCH-FIX-UPSTREAM Fix assertion error in res_query.c (bso#13013)
Patch73: glibc-resolv-assert.diff
# PATCH-FIX-OPENSUSE Run ctors (bnc#717671) aj@suse.de
Patch74: glibc-2.14-fix-ctors.patch
# PATCH-FIX-OPENSUSE Fix missing declarations
Patch75: glibc-2.15-nss_db-declarations.patch
# PATCH-FEATURE-OPENSUSE -- add sha support to crypt_blowfish lnussel@suse.de
Patch80: crypt_blowfish-1.2-sha.diff
# PATCH-FEATURE-OPENSUSE -- use separate symbol version for Owl extensions - lnussel@suse.de
@@ -196,18 +237,48 @@ Patch84: nscd-avoid-gcc-warning.diff
Patch87: glibc-nodate.patch
# PATCH-FIX-OPENSUSE revert pthread-cond-wait change since it causes hangs - aj@suse.de
Patch88: pthread-cond-wait-revert.patch
# PATCH-FIX-OPENSUSE Fix cycle detection - aj@suse.de
Patch95: cycle-detection.patch
# PATCH-FIX-OPENSUSE Fix LD_PROFILE (glibc bug#13818) - aj@suse.de
Patch96: glibc-ld-profile.patch
# PATCH-FIX-OPENSUSE Fix path for nss_db (bnc#753657) - aj@suse.de
Patch97: nss-db-path.patch
# PATCH-FIX-OPENSUSE Fix cycle detection 2 (from Fedora) - aj@suse.de
Patch100: glibc-sw13618-2.patch
###
# Patches from upstream
###
# PATCH-FIX-UPSTREAM Fix missing declarations
Patch1000: glibc-2.15-nss_db-declarations.patch
# PATCH-FIX-UPSTREAM Fix realloc usage in vfscanf - aj@suse.de
Patch89: glibc-2.16-scanf.patch
Patch1001: glibc-2.16-scanf.patch
# PATCH-FIX-UPSTREAM Fix getcontext on 32-bit powerpc - aj@suse.de
Patch90: glibc-ppc-getcontext.patch
Patch1002: glibc-ppc-getcontext.patch
# PATCH-FIX-UPSTREAM Fix ifunc relocations (bnc#740109) - aj@suse.de
Patch91: glibc-ifunc-2.16.patch
# PATCH-FIX-OPENSUSE Remove netlink optimization (bnc#741021) - aj@suse.de
Patch92: glibc-revert-netlink-cache.patch
Patch1003: glibc-ifunc-2.16.patch
# PATCH-FIX-UPSTREAM Fix tests for AVX features - aj@suse.de
Patch93: glibc-2.16-avx.patch
Patch1004: glibc-2.16-avx.patch
# PATCH-FIX-UPSTREAM vfprintf: validate nargs and maybe allocate from heap bnc#747768 - aj@suse.de
Patch94: vfprintf-nargs.patch
Patch1005: vfprintf-nargs.patch
# PATCH-FIX-UPSTREAM Add Arm dependency on libmemusage - bwiedemann@suse.de
Patch1006: glibc-add-arm-dependency-libmemusage.patch
# PATCH-FIX-UPSTREAM Fix check abi - aj@suse.de
Patch1007: glibc-2.16-fix-check-abi.patch
# PATCH-FIX-UPSTREAM Fix check-localelfplt - aj@suse.de
Patch1008: glibc-2.16-fix-check-localplt.patch
# PATCH-FIX-UPSTREAM - Allow compilation with -altivec aj@suse.de
Patch1009: glibc-uio-cell.diff
###
# Patches awaiting upstream approval
###
# PATCH-FIX-UPSTREAM Fix assertion error in res_query.c (bso#13013)
Patch2001: glibc-resolv-assert.diff
# PATCH-FIX-UPSTREAM Use new common path for ARMv7 hardware float linker - aj@suse.de
Patch2002: armhf-ld-so.patch
# PATCH-FIX-UPSTREAM Fix crash when nscd is not running (bso#135949) - aj@suse.de
Patch2003: glibc-nscd-crash-bso13594.patch
%description
The GNU C Library provides the most important standard libraries used
@@ -228,6 +299,7 @@ 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.
%if %{build_html}
%package html
Summary: HTML Documentation for the GNU C Library
License: GFDL-1.1
@@ -238,6 +310,7 @@ BuildArch: noarch
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.
%endif
%package i18ndata
Summary: Database Sources for 'locale'
@@ -283,6 +356,7 @@ Requires(postun): %insserv_prereq
Nscd caches name service lookups and can dramatically improve
performance with NIS, NIS+, and LDAP.
%if %{build_profile}
%package profile
Summary: Libc Profiling and Debugging Versions
License: LGPL-2.1+ and SUSE-LGPL-2.1+-with-GCC-exception and GPL-2.0+
@@ -299,6 +373,7 @@ Obsoletes: glibc-profile-32bit
%description profile
This package contains special versions of the GNU C library which are
necessary for profiling and debugging.
%endif
%package devel
Summary: Include Files and Libraries Mandatory for Development
@@ -394,7 +469,7 @@ mv crypt_blowfish-%crypt_bf_version/*.[chS] crypt/
#
%patch0
# libNoVersion part is only active on ix86
%patch1
%patch1 -p1
%patch3
%patch4
%patch5 -p1
@@ -403,8 +478,8 @@ mv crypt_blowfish-%crypt_bf_version/*.[chS] crypt/
%patch8
%patch12
%patch14
%patch16
%patch20
%patch16 -p1
%patch20 -p1
%patch21 -p1
# avoid changing nscd_stat.c mtime to avoid code generation
# differences on each rebuild
@@ -414,36 +489,51 @@ touch -r nscd/nscd_stat.c nscd/s-stamp
touch -r nscd/s-stamp nscd/nscd_stat.c
rm nscd/s-stamp
%patch25
%patch28
%patch28 -p1
%patch29
%patch30
%patch33
%patch36
%patch33 -p1
%patch36 -p1
%patch38
%patch41 -p1
%patch1009 -p1
%patch45
%patch46 -p1
%patch47 -p1
%patch49
# XXX: Does not pass testsuite, still there's no better solution yet
%patch52
%patch58
%patch58 -p1
%patch65 -p1
%patch66 -p1
%patch67 -p1
%patch68 -p1
# XXX Patch 69 replaces 68, remove soon
#%patch68 -p1
%patch69 -p1
%patch71 -p1
%patch73 -p1
%patch2001 -p1
%patch74 -p1
%patch75 -p1
%patch84
%patch87 -p0
%patch1000 -p1
%patch84 -p1
%patch87 -p1
%patch88 -p1 -R
%patch89 -p1
%patch90 -p1
%patch91 -p1
%patch92 -p1 -R
%patch93 -p1
%patch94 -p1
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
%patch1004 -p1
%patch1005 -p1
%patch95 -p1
# XXX Disable, it breaks the testsuite, test elf/tst-audit2
# %patch96 -p1
%patch97 -p1
%patch2003 -p1
%patch1006 -p1
%patch100 -p1
%patch1007 -p1
%patch1008 -p1
%ifarch armv7l
# Disable for now
#%patch2002 -p1
%endif
#
# Inconsistency detected by ld.so: dl-close.c: 719: _dl_close: Assertion `map->l_init_called' failed!
@@ -472,6 +562,9 @@ find . -name configure | xargs touch
#######################################################################
%build
%if %{with glibc_run_testsuite}
echo glibc_run_testsuite is set
%endif
if [ -x /bin/uname.bin ]; then
/bin/uname.bin -a
else
@@ -488,6 +581,10 @@ nice
%else
%define target %{_target_cpu}-suse-linux
%endif
# Don't use as-needed, it breaks glibc assumptions
# Before enabling it, run the testsuite and verify that it
# passes completely
export SUSE_ASNEEDED=0
# Adjust glibc version.h
echo "#define CONFHOST \"%{target}\"" >> version.h
echo "#define CVSDATE \"`date -r ChangeLog +%Y%m%d`\"" >> version.h
@@ -566,10 +663,14 @@ configure_and_build_glibc() {
%else
conf_cflags="$cflags"
%endif
CFLAGS="$conf_cflags" CC="$BuildCC" CXX="$BuildCCplus" ../configure \
--prefix=%{_prefix} \
--libexecdir=%{_libdir} --infodir=%{_infodir} \
--enable-add-ons=nptl$addons --enable-profile \
--enable-add-ons=nptl$addons \
%if %{build_profile}
--enable-profile \
%endif
"$@" \
%if %{enable_stackguard_randomization}
--enable-stackguard-randomization \
@@ -633,7 +734,9 @@ configure_and_build_glibc() {
#
# Build html documentation
#
%if %{build_html}
make -C cc-base html
%endif
#
# Build glibc_post_upgrade binary
@@ -669,6 +772,8 @@ popd
#######################################################################
%check
# The testsuite will fail if asneeded is used
export SUSE_ASNEEDED=0
%if %{run_testsuite}
# Increase timeout
export TIMEOUTFACTOR=16
@@ -682,7 +787,17 @@ popd
make -C cc-base check
%endif
%endif
make -C cc-base check-abi || echo check-abi failed
# File was not created as empty file by patch 101
touch abilist/libnss_dns.abilist abilist/libnss_db.abilist
# This has to pass on x86 and x86-64
# Exceptions:
# ARM: There's no check-abi data for arm at all
# s390, s390x, ppc, ppc64: Outdated check-abi data
%ifnarch %arm s390 s390x ppc ppc64
make -C cc-base check-abi
#%else
#make -C cc-base check-abi || echo check-abi failed
%endif
#######################################################################
###
@@ -812,8 +927,10 @@ mkdir -p %{buildroot}%{_includedir}/resolv
install -m 0644 resolv/mapv4v6addr.h %{buildroot}%{_includedir}/resolv/
install -m 0644 resolv/mapv4v6hostent.h %{buildroot}%{_includedir}/resolv/
%if %{build_html}
mkdir -p %{buildroot}%{_datadir}/doc/glibc
cp -p manual/libc/*.html %{buildroot}%{_datadir}/doc/glibc
%endif
cd manpages; make install_root=%{buildroot} install; cd ..
@@ -879,6 +996,11 @@ mkdir -p %{buildroot}/lib/systemd/system
install -m 644 %{SOURCE21} %{buildroot}/lib/systemd/system
install -m 644 %{SOURCE22} %{buildroot}/lib/systemd/system
%ifarch armv7l
# Provide compatibility link
# XXX ln -s ld-%{version}.so %{buildroot}/lib/ld-linux.so.3
%endif
#######################################################################
###
### ...
@@ -951,30 +1073,37 @@ exit 0
%doc %{_mandir}/man1/localedef.1.gz
%doc %{_mandir}/man5/*
/%{_lib}/ld-%{version}.so
%ifarch ppc s390 mips hppa
/%{_lib}/ld.so.1
# Each architecture has a different name for the dynamic linker:
%ifarch %arm
%ifarch armv7l
#XXX /%{_lib}/ld-linux-armhf.so.3
# Keep compatibility link
/%{_lib}/ld-linux.so.3
%else
%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
/%{_lib}/ld-linux.so.3
%else
/%{_lib}/ld-linux.so.2
%endif
%endif
%endif
%endif
/%{_lib}/ld-linux.so.2
%endif
%endif
%ifarch ia64
/%{_lib}/ld-linux-ia64.so.2
%endif
%ifarch ppc s390 mips hppa
/%{_lib}/ld.so.1
%endif
%ifarch ppc64
/%{_lib}/ld64.so.1
%endif
%ifarch s390x
/lib/ld64.so.1
/%{_lib}/ld64.so.1
%endif
%ifarch x86_64
/%{_lib}/ld-linux-x86-64.so.2
%endif
%ifarch %ix86
/%{_lib}/ld-linux.so.2
%endif
/%{_lib}/libBrokenLocale-%{version}.so
/%{_lib}/libBrokenLocale.so.1
/%{_lib}/libSegFault.so
@@ -1065,7 +1194,7 @@ exit 0
%{_libdir}/getconf/*
%{_sbindir}/glibc_post_upgrade
%{_sbindir}/iconvconfig
%dir /var/db
#%dir /var/db
%ifarch %ix86
@@ -1131,9 +1260,11 @@ exit 0
%doc %{_infodir}/libc.info-?.gz
%doc %{_infodir}/libc.info-??.gz
%if %{build_html}
%files html
%defattr(-,root,root)
%doc %{_prefix}/share/doc/glibc
%endif
%files i18ndata
%defattr(-,root,root)
@@ -1156,6 +1287,7 @@ exit 0
%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
%if %{build_profile}
%files profile
%defattr(-,root,root)
%{_libdir}/libc_p.a
@@ -1170,6 +1302,7 @@ exit 0
%{_libdir}/librpcsvc_p.a
%{_libdir}/libutil_p.a
%{_libdir}/libdl_p.a
%endif
%files utils
%defattr(-,root,root)
@@ -1189,6 +1322,6 @@ exit 0
%files extra
%defattr(-,root,root)
%{_bindir}/makedb
/var/db/Makefile
/var/lib/misc/Makefile
%changelog