djdelorie / rpms / glibc

Forked from rpms/glibc 3 years ago
Clone
Siddhesh Poyarekar 07e6287
%define glibcsrcdir  glibc-2.22
Siddhesh Poyarekar 07e6287
%define glibcversion 2.22
4c57cf5
%define glibcrelease 14%{?dist}
Siddhesh Poyarekar 5817231
# Pre-release tarballs are pulled in from git using a command that is
Siddhesh Poyarekar 5817231
# effectively:
Siddhesh Poyarekar 5817231
#
Siddhesh Poyarekar 5817231
# git archive HEAD --format=tar --prefix=$(git describe --match 'glibc-*')/ \
Siddhesh Poyarekar 5817231
#	> $(git describe --match 'glibc-*').tar
Siddhesh Poyarekar 5817231
# gzip -9 $(git describe --match 'glibc-*').tar
Siddhesh Poyarekar 5817231
#
Siddhesh Poyarekar 5817231
# glibc_release_url is only defined when we have a release tarball.
Siddhesh Poyarekar 07e6287
%define glibc_release_url http://ftp.gnu.org/gnu/glibc/
9abcefa
##############################################################################
9abcefa
# If run_glibc_tests is zero then tests are not run for the build.
9abcefa
# You must always set run_glibc_tests to one for production builds.
7472f90
%define run_glibc_tests 1
Siddhesh Poyarekar 67b30d7
%define build_benchtests 1
Siddhesh Poyarekar e9a7f4c
# Run valgrind test to ensure compatibility.
Siddhesh Poyarekar 6105e83
%ifarch %{ix86} x86_64 ppc ppc64le s390x armv7hl aarch64
Siddhesh Poyarekar e9a7f4c
%define run_valgrind_tests 1
8b04964
%endif
Siddhesh Poyarekar 5d3d5d4
# Disable -Werror in builds for these architectures
Siddhesh Poyarekar 5d3d5d4
%ifarch s390x
Siddhesh Poyarekar 5d3d5d4
%define disable_werror 1
Siddhesh Poyarekar 5d3d5d4
%endif
Siddhesh Poyarekar c041cd3
# Disable -Werror if we're bootstrapping
Siddhesh Poyarekar c041cd3
%{!?_with_bootstrap: %global disable_werror 1}
Siddhesh Poyarekar c041cd3
9abcefa
##############################################################################
9abcefa
# Auxiliary arches are those arches that can be built in addition
9abcefa
# to the core supported arches. You either install an auxarch or
9abcefa
# you install the base arch, not both. You would do this in order
9abcefa
# to provide a more optimized version of the package for your arch.
c1407c8
%define auxarches athlon alphaev6
9abcefa
##############################################################################
Siddhesh Poyarekar 49b191c
# Enable lock elision support for these architectures
Siddhesh Poyarekar 49b191c
#
Siddhesh Poyarekar 49b191c
# At the moment lock elision is disabled on x86_64 until there's a CPU that
Siddhesh Poyarekar 49b191c
# would actually benefit from enabling it.  Intel released a microcode update
Siddhesh Poyarekar 49b191c
# to disable HLE and RTM at boot and the Fedora kernel now applies it early
Siddhesh Poyarekar 49b191c
# enough that keeping lock elision enabled should be harmless, but we have
Siddhesh Poyarekar 49b191c
# disabled it anyway as a conservative measure.
Siddhesh Poyarekar 49b191c
%define lock_elision_arches s390 s390x
Siddhesh Poyarekar 49b191c
##############################################################################
9abcefa
# We build a special package for Xen that includes TLS support with
9abcefa
# no negative segment offsets for use with Xen guests. This is
9abcefa
# purely an optimization for increased performance on those arches.
a9d8ca8
%define xenarches i686 athlon
a9d8ca8
%ifarch %{xenarches}
a9d8ca8
%define buildxen 1
7ee7994
%define xenpackage 0
a9d8ca8
%else
a9d8ca8
%define buildxen 0
a9d8ca8
%define xenpackage 0
a9d8ca8
%endif
9abcefa
##############################################################################
9abcefa
# For Power we actually support alternate runtimes in the same base package.
9abcefa
# If we build for Power or Power64 we additionally build a power6 runtime that
9abcefa
# is enabled by AT_HWCAPS selection and an alternate runtime directory.
18aa46f
%ifarch ppc ppc64
18aa46f
%define buildpower6 1
18aa46f
%else
18aa46f
%define buildpower6 0
18aa46f
%endif
9abcefa
##############################################################################
9abcefa
# We build librtkaio for all rtkaioarches. The library is installed into
9abcefa
# a distinct subdirectory in the lib dir. This define enables the rtkaio
9abcefa
# add-on during the build. Upstream does not have rtkaio and it is provided
9abcefa
# strictly as part of our builds.
98dddaf
%define rtkaioarches %{ix86} x86_64 ppc %{power64} s390 s390x
9abcefa
##############################################################################
9abcefa
# Any architecture/kernel combination that supports running 32-bit and 64-bit
9abcefa
# code in userspace is considered a biarch arch.
98dddaf
%define biarcharches %{ix86} x86_64 ppc %{power64} s390 s390x
9abcefa
##############################################################################
9abcefa
# If the debug information is split into two packages, the core debuginfo
9abcefa
# pacakge and the common debuginfo package then the arch should be listed
9abcefa
# here. If the arch is not listed here then a single core debuginfo package
9abcefa
# will be created for the architecture.
Andreas Schwab 87a7e49
%define debuginfocommonarches %{biarcharches} alpha alphaev6
9abcefa
##############################################################################
9abcefa
# If the architecture has multiarch support in glibc then it should be listed
9abcefa
# here to enable support in the build. Multiarch support is a single library
9abcefa
# with implementations of certain functions for multiple architectures. The
9abcefa
# most optimal function is selected at runtime based on the hardware that is
9abcefa
# detected by glibc. The underlying support for function selection and
9abcefa
# execution is provided by STT_GNU_IFUNC.
98dddaf
%define multiarcharches ppc %{power64} %{ix86} x86_64 %{sparc}
9abcefa
##############################################################################
b5a3001
# Add -s for a less verbose build output.
b5a3001
%define silentrules PARALLELMFLAGS=
9abcefa
##############################################################################
9abcefa
# %%package glibc - The GNU C Library (glibc) core package.
9abcefa
##############################################################################
ffc48ad
Summary: The GNU libc libraries
cvsdist c381c23
Name: glibc
Andreas Schwab 237bb90
Version: %{glibcversion}
Carlos O'Donell e63fda9
Release: %{glibcrelease}
9214828
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
9214828
# Things that are linked directly into dynamically linked programs
9214828
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
9214828
# exception which allows linking it into any kind of programs or shared
9214828
# libraries without restrictions.
9214828
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
cvsdist c381c23
Group: System Environment/Libraries
Andreas Schwab 68ea17c
URL: http://www.gnu.org/software/glibc/
f79eb1f
Source0: %{?glibc_release_url}%{glibcsrcdir}.tar.gz
Siddhesh Poyarekar 17b00fb
Source1: build-locale-archive.c
Siddhesh Poyarekar 17b00fb
Source2: glibc_post_upgrade.c
Siddhesh Poyarekar 17b00fb
Source3: libc-lock.h
Siddhesh Poyarekar 17b00fb
Source4: nscd.conf
Siddhesh Poyarekar 17b00fb
Source7: nsswitch.conf
Siddhesh Poyarekar 17b00fb
Source8: power6emul.c
Siddhesh Poyarekar 67b30d7
Source9: bench.mk
Siddhesh Poyarekar 67b30d7
Source10: glibc-bench-compare
92f265f
9abcefa
##############################################################################
9abcefa
# Start of glibc patches
9abcefa
##############################################################################
92f265f
# 0000-0999 for patches which are unlikely to ever go upstream or which
92f265f
# have not been analyzed to see if they ought to go upstream yet.
bf6cb48
#
bf6cb48
# 1000-2000 for patches that are already upstream.
92f265f
#
92f265f
# 2000-3000 for patches that are awaiting upstream approval
92f265f
#
92f265f
# Yes, I realize this means some gratutious changes as patches to from
92f265f
# one bucket to another, but I find this scheme makes it easier to track
92f265f
# the upstream divergence and patches needing approval.
92f265f
#
92f265f
# Note that we can still apply the patches in any order we see fit, so
92f265f
# the changes from one bucket to another won't necessarily result in needing
92f265f
# to twiddle the patch because of dependencies on prior patches and the like.
92f265f
92f265f
6b37058
##############################################################################
92f265f
#
6b37058
# Patches that are unlikely to go upstream or not yet analyzed.
92f265f
#
6b37058
##############################################################################
665e71f
665e71f
# Configuration twiddle, not sure there's a good case to get upstream to
665e71f
# change this.
Carlos O'Donell 33fde86
Patch0001: glibc-fedora-nscd.patch
92f265f
Carlos O'Donell 33fde86
Patch0003: glibc-fedora-ldd.patch
dd8ae6f
Carlos O'Donell 33fde86
Patch0004: glibc-fedora-ppc-unwind.patch
dd8ae6f
dd8ae6f
# Build info files in the source tree, then move to the build
dd8ae6f
# tree so that they're identical for multilib builds
Carlos O'Donell 33fde86
Patch0005: glibc-rh825061.patch
dd8ae6f
dd8ae6f
# Horrible hack, never to be upstreamed.  Can go away once the world
dd8ae6f
# has been rebuilt to use the new ld.so path.
Carlos O'Donell 33fde86
Patch0006: glibc-arm-hardfloat-3.patch
dd8ae6f
92f265f
# Needs to be sent upstream
Carlos O'Donell 33fde86
Patch0009: glibc-fedora-include-bits-ldbl.patch
92f265f
0a21292
# All these were from the glibc-fedora.patch mega-patch and need another
0a21292
# round of reviewing.  Ideally they'll either be submitted upstream or
0a21292
# dropped.
Carlos O'Donell 33fde86
Patch0012: glibc-fedora-linux-tcsetattr.patch
Carlos O'Donell 33fde86
Patch0014: glibc-fedora-nptl-linklibc.patch
Carlos O'Donell 33fde86
Patch0015: glibc-fedora-localedef.patch
Carlos O'Donell 33fde86
Patch0016: glibc-fedora-i386-tls-direct-seg-refs.patch
Carlos O'Donell 33fde86
Patch0019: glibc-fedora-nis-rh188246.patch
Carlos O'Donell 33fde86
Patch0020: glibc-fedora-manual-dircategory.patch
Carlos O'Donell 33fde86
Patch0024: glibc-fedora-locarchive.patch
Carlos O'Donell 33fde86
Patch0025: glibc-fedora-streams-rh436349.patch
Carlos O'Donell 33fde86
Patch0028: glibc-fedora-localedata-rh61908.patch
Carlos O'Donell 33fde86
Patch0030: glibc-fedora-uname-getrlimit.patch
Carlos O'Donell 33fde86
Patch0031: glibc-fedora-__libc_multiple_libcs.patch
Carlos O'Donell 33fde86
Patch0033: glibc-fedora-elf-ORIGIN.patch
Carlos O'Donell 33fde86
Patch0034: glibc-fedora-elf-init-hidden_undef.patch
384f5b1
43bff16
# Needs to be sent upstream.
43bff16
# Support mangling and demangling null pointers.
Carlos O'Donell 33fde86
Patch0037: glibc-rh952799.patch
6cfdaac
Siddhesh Poyarekar 17b00fb
# rtkaio and c_stubs.  Note that despite the numbering, these are always
Siddhesh Poyarekar 17b00fb
# applied first.
Carlos O'Donell 33fde86
Patch0038: glibc-rtkaio.patch
Carlos O'Donell 33fde86
Patch0039: glibc-c_stubs.patch
Siddhesh Poyarekar 17b00fb
Siddhesh Poyarekar 615c1c4
# Remove non-ELF support in rtkaio
Carlos O'Donell 33fde86
Patch0040: glibc-rh731833-rtkaio.patch
Carlos O'Donell 33fde86
Patch0041: glibc-rh731833-rtkaio-2.patch
Carlos O'Donell 33fde86
Patch0042: glibc-rh970865.patch
Siddhesh Poyarekar 615c1c4
9c4147a
# ARM: Accept that some objects marked hard ABI are now not because of a
9c4147a
#      binutils bug.
Carlos O'Donell 33fde86
Patch0044: glibc-rh1009145.patch
9c4147a
c2021d0
# Allow applications to call pthread_atfork without libpthread.so.
Carlos O'Donell 33fde86
Patch0046: glibc-rh1013801.patch
c2021d0
Carlos O'Donell 33fde86
Patch0047: glibc-nscd-sysconfig.patch
Siddhesh Poyarekar bdbcf83
f8be71c
# Disable rwlock elision if --enable-lock-elision is not used.
Carlos O'Donell 33fde86
Patch0052: glibc-disable-rwlock-elision.patch
f8be71c
Siddhesh Poyarekar b80bba4
# confstr _CS_PATH should only return /usr/bin on Fedora since /bin is just a
Siddhesh Poyarekar b80bba4
# symlink to it.
Carlos O'Donell 33fde86
Patch0053: glibc-cs-path.patch
Siddhesh Poyarekar b80bba4
Carlos O'Donell 85a0930
# Remove the clock_* functions and use the ones in libc like librt does.
Carlos O'Donell 33fde86
Patch0054: glibc-rtkaio-clock.patch
Siddhesh Poyarekar a086cd2
Siddhesh Poyarekar 9af85e6
Patch0055: glibc-rtkaio-libof.patch
Siddhesh Poyarekar adbfe47
dd028df
# Add C.UTF-8 locale into /usr/lib/locale/
dd028df
Patch0059: glibc-c-utf8-locale.patch
dd028df
6b37058
##############################################################################
92f265f
#
92f265f
# Patches from upstream
92f265f
#
6b37058
##############################################################################
6b37058
Carlos O'Donell 7a808bc
Patch1000: glibc-rh1276711.patch
e8f4ba5
Patch1001: glibc-rh1288662.patch
67d1373
Patch1002: glibc-rh1276761-1.patch
67d1373
Patch1003: glibc-rh1276761-2.patch
67d1373
Patch1004: glibc-rh1276761-3.patch
62f2d36
Patch1005: glibc-rh1332912.patch
116e17a
Patch1006: glibc-rh1321954.patch
217d136
Patch1007: glibc-rh1332914-1.patch
217d136
Patch1008: glibc-rh1332914-2.patch
217d136
Patch1009: glibc-rh1332914-3.patch
217d136
Patch1010: glibc-rh1332914-4.patch
217d136
Patch1011: glibc-rh1332914-5.patch
79cd021
Patch1012: glibc-rh1313404-1.patch
79cd021
Patch1013: glibc-rh1313404-2.patch
79cd021
Patch1014: glibc-rh1313404-3.patch
84517e1
Patch1015: glibc-rh1321861.patch
d277a9b
Patch1016: glibc-rh1316972.patch
d277a9b
Patch1017: glibc-rh1316972-2.patch
8ef83de
Patch1018: glibc-rh1333940.patch
4c57cf5
Patch1019: glibc-rh1333901-1.patch
4c57cf5
Patch1020: glibc-rh1333901-2.patch
4c57cf5
Patch1021: glibc-rh1333901-3.patch
4c57cf5
Patch1022: glibc-rh1333901-4.patch
4c57cf5
Patch1023: glibc-rh1333901-5.patch
6ca2fbe
Patch1024: glibc-rh1315648-1.patch
6ca2fbe
Patch1025: glibc-rh1315648-2.patch
53d6baa
Patch1026: glibc-rh1333945.patch
53d6baa
Patch1027: glibc-rh1333945-2.patch
Carlos O'Donell 7a808bc
6b37058
##############################################################################
92f265f
#
92f265f
# Patches submitted, but not yet approved upstream.
6b37058
#
6b37058
##############################################################################
6b37058
#
92f265f
# Each should be associated with a BZ.
92f265f
# Obviously we're not there right now, but that's the goal
92f265f
#
6b37058
0a21292
# http://sourceware.org/ml/libc-alpha/2012-12/msg00103.html
Carlos O'Donell 33fde86
Patch2007: glibc-rh697421.patch
92f265f
Carlos O'Donell 33fde86
Patch2013: glibc-rh741105.patch
92f265f
dd8ae6f
# Upstream BZ 14247
Carlos O'Donell 33fde86
Patch2023: glibc-rh827510.patch
dd8ae6f
200aebf
# Upstream BZ 14185
Carlos O'Donell 33fde86
Patch2027: glibc-rh819430.patch
Siddhesh Poyarekar 70cc4d3
Carlos O'Donell 33fde86
Patch2031: glibc-rh1070416.patch
Siddhesh Poyarekar 52f69e7
Carlos O'Donell 33fde86
Patch2033: glibc-aarch64-tls-fixes.patch
Carlos O'Donell 33fde86
Patch2034: glibc-aarch64-workaround-nzcv-clobber-in-tlsdesc.patch
Kyle McMartin b39b864
dbf5f70
# Upstream BZ 18568
dbf5f70
Patch2101: glibc-rh1238412-remove-duplicate-transliterations.patch
dbf5f70
Patch2102: glibc-rh1238412-addition-and-fixes-for-translit_neutral.patch
dbf5f70
Patch2103: glibc-rh1238412-update-the-translit-files-to-unicode-7.0.0.patch
dbf5f70
Patch2104: glibc-rh1238412-add-translit-rules-for-da-nb-nn-sv-locales.patch
dbf5f70
Patch2105: glibc-rh1238412-unicode-8.0.0-update.patch
dbf5f70
73fbe41
# Upstream BZ 19573, patch reverts problematic commit
73fbe41
Patch2106: glibc-rh1252570.patch
73fbe41
6136c09
# Upstream BZ 18665
9f1734e
Patch2107: glibc-CVE-2015-7547.patch
9f1734e
e8497bf
# Upstream BZ 19682
e8497bf
Patch2108: glibc-rh1310168.patch
e8497bf
431c99d
# Upstream BZ 19581
431c99d
Patch2109: glibc-rh1114591.patch
431c99d
9abcefa
##############################################################################
Siddhesh Poyarekar 67b30d7
#
Siddhesh Poyarekar 67b30d7
# Benchmark comparison patches.
Siddhesh Poyarekar 67b30d7
#
Siddhesh Poyarekar 67b30d7
##############################################################################
Carlos O'Donell 33fde86
Patch3002: glibc-bench-build.patch
Siddhesh Poyarekar 67b30d7
6fbf955
# Upstream BZ 19048
Carlos O'Donell 7a808bc
Patch2035: glibc-rh1276112.patch
6fbf955
Siddhesh Poyarekar 67b30d7
##############################################################################
9abcefa
# End of glibc patches.
9abcefa
##############################################################################
200aebf
9abcefa
##############################################################################
9abcefa
# Continued list of core "glibc" package information:
9abcefa
##############################################################################
ffc48ad
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ffc48ad
Obsoletes: glibc-profile < 2.4
Andreas Schwab 538b3c0
Obsoletes: nss_db
cvsdist c381c23
Provides: ldconfig
9abcefa
754fe39
# The dynamic linker supports DT_GNU_HASH
754fe39
Provides: rtld(GNU_HASH)
69de141
69de141
# This is a short term need until everything is rebuilt in the ARM world
69de141
# to use the new dynamic linker path
69de141
%ifarch armv7hl armv7hnl
69de141
Provides: ld-linux.so.3
69de141
Provides: ld-linux.so.3(GLIBC_2.4)
69de141
%endif
69de141
cvsdist c381c23
Requires: glibc-common = %{version}-%{release}
9abcefa
cvsdist c381c23
# Require libgcc in case some program calls pthread_cancel in its %%post
ffc48ad
Requires(pre): basesystem, libgcc
9abcefa
cvsdist e8590cd
# This is for building auxiliary programs like memusage, nscd
cvsdist c381c23
# For initial glibc bootstraps it can be commented out
ffc48ad
BuildRequires: gd-devel libpng-devel zlib-devel texinfo, libselinux-devel >= 1.33.4-3
ccd32a3
BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext, nss-devel
ffc48ad
BuildRequires: /bin/ps, /bin/kill, /bin/awk
Andreas Schwab c883c14
BuildRequires: systemtap-sdt-devel
9abcefa
8b04964
%if 0%{?run_valgrind_tests}
Siddhesh Poyarekar e9a7f4c
BuildRequires: /usr/bin/valgrind
Siddhesh Poyarekar e9a7f4c
%endif
Siddhesh Poyarekar e9a7f4c
Siddhesh Poyarekar 944ed51
# We use systemd rpm macros for nscd
Siddhesh Poyarekar 944ed51
BuildRequires: systemd
Siddhesh Poyarekar 944ed51
37b7dfd
# We use python for the microbenchmarks
37b7dfd
BuildRequires: python
37b7dfd
cvsdist c381c23
# This is to ensure that __frame_state_for is exported by glibc
cvsdist c381c23
# will be compatible with egcs 1.x.y
ffc48ad
BuildRequires: gcc >= 3.2
Andreas Schwab 808dafc
%define enablekernel 2.6.32
Andreas Schwab 98c76af
Conflicts: kernel < %{enablekernel}
Andreas Schwab 444e2cc
%define target %{_target_cpu}-redhat-linux
Andreas Schwab 444e2cc
%ifarch %{arm}
Andreas Schwab 444e2cc
%define target %{_target_cpu}-redhat-linuxeabi
cvsdist 7abcfd3
%endif
98dddaf
%ifarch %{power64}
cffaeb6
%ifarch ppc64le
cffaeb6
%define target ppc64le-redhat-linux
cffaeb6
%else
98dddaf
%define target ppc64-redhat-linux
98dddaf
%endif
cffaeb6
%endif
9abcefa
Andreas Schwab 237bb90
%ifarch %{multiarcharches}
Andreas Schwab 237bb90
# Need STT_IFUNC support
98dddaf
%ifarch ppc %{power64}
Andreas Schwab 2c5bbbe
BuildRequires: binutils >= 2.20.51.0.2
Andreas Schwab 2c5bbbe
Conflicts: binutils < 2.20.51.0.2
Andreas Schwab 2c5bbbe
%else
1939bab
%ifarch s390 s390x
1939bab
# Needed for STT_GNU_IFUNC support for s390/390x
1939bab
BuildRequires: binutils >= 2.23.52.0.1-8
1939bab
Conflicts: binutils < 2.23.52.0.1-8
1939bab
%else
1939bab
# Default to this version
Andreas Schwab 237bb90
BuildRequires: binutils >= 2.19.51.0.10
Andreas Schwab 6c0e600
Conflicts: binutils < 2.19.51.0.10
Andreas Schwab 2c5bbbe
%endif
1939bab
%endif
Andreas Schwab 677ba77
# Earlier releases have broken support for IRELATIVE relocations
Andreas Schwab 677ba77
Conflicts: prelink < 0.4.2
Andreas Schwab 237bb90
%else
Andreas Schwab 677ba77
# Need AS_NEEDED directive
Andreas Schwab 677ba77
# Need --hash-style=* support
eda216b
BuildRequires: binutils >= 2.17.50.0.2-5
Andreas Schwab 237bb90
%endif
9abcefa
cvsdist c381c23
BuildRequires: gcc >= 3.2.1-5
57d2c53
%ifarch ppc s390 s390x
57d2c53
BuildRequires: gcc >= 4.1.0-0.17
57d2c53
%endif
Andreas Schwab 237bb90
%if 0%{?_enable_debug_packages}
ffc48ad
BuildRequires: elfutils >= 0.72
ffc48ad
BuildRequires: rpm >= 4.2-0.56
cvsdist c381c23
%endif
9abcefa
dbc262b
# The testsuite builds static C++ binaries that require a static
dbc262b
# C++ runtime from libstdc++-static.
dbc262b
BuildRequires: libstdc++-static
dbc262b
9abcefa
# Filter out all GLIBC_PRIVATE symbols since they are internal to
8c7b7c2
# the package and should not be examined by any other tool.
Andreas Schwab 96f2a7b
%global __filter_GLIBC_PRIVATE 1
cvsdist c381c23
cvsdist c381c23
%description
cvsdist c381c23
The glibc package contains standard libraries which are used by
cvsdist c381c23
multiple programs on the system. In order to save disk space and
cvsdist c381c23
memory, as well as to make upgrading easier, common system code is
cvsdist c381c23
kept in one place and shared between programs. This particular package
cvsdist c381c23
contains the most important sets of shared libraries: the standard C
cvsdist c381c23
library and the standard math library. Without these two libraries, a
cvsdist c381c23
Linux system will not function.
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# glibc "xen" sub-package
9abcefa
##############################################################################
a9d8ca8
%if %{xenpackage}
a9d8ca8
%package xen
a9d8ca8
Summary: The GNU libc libraries (optimized for running under Xen)
a9d8ca8
Group: System Environment/Libraries
a9d8ca8
Requires: glibc = %{version}-%{release}, glibc-utils = %{version}-%{release}
a9d8ca8
a9d8ca8
%description xen
a9d8ca8
The standard glibc package is optimized for native kernels and does not
a9d8ca8
perform as well under the Xen hypervisor.  This package provides alternative
a9d8ca8
library binaries that will be selected instead when running under Xen.
a9d8ca8
a9d8ca8
Install glibc-xen if you might run your system under the Xen hypervisor.
a9d8ca8
%endif
a9d8ca8
9abcefa
##############################################################################
9abcefa
# glibc "devel" sub-package
9abcefa
##############################################################################
cvsdist c381c23
%package devel
cvsdist c381c23
Summary: Object files for development using standard C libraries.
cvsdist c381c23
Group: Development/Libraries
ffc48ad
Requires(pre): /sbin/install-info
Andreas Schwab 237bb90
Requires(pre): %{name}-headers
Andreas Schwab 237bb90
Requires: %{name}-headers = %{version}-%{release}
ffc48ad
Requires: %{name} = %{version}-%{release}
cvsdist c381c23
cvsdist c381c23
%description devel
cvsdist c381c23
The glibc-devel package contains the object files necessary
cvsdist c381c23
for developing programs which use the standard C libraries (which are
cvsdist c381c23
used by nearly all programs).  If you are developing programs which
cvsdist c381c23
will use the standard C libraries, your system needs to have these
cvsdist c381c23
standard object files available in order to create the
cvsdist c381c23
executables.
cvsdist c381c23
cvsdist c381c23
Install glibc-devel if you are going to develop programs which will
cvsdist c381c23
use the standard C libraries.
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# glibc "static" sub-package
9abcefa
##############################################################################
65bf1c4
%package static
65bf1c4
Summary: C library static libraries for -static linking.
65bf1c4
Group: Development/Libraries
65bf1c4
Requires: %{name}-devel = %{version}-%{release}
65bf1c4
65bf1c4
%description static
65bf1c4
The glibc-static package contains the C library static libraries
65bf1c4
for -static linking.  You don't need these, unless you link statically,
65bf1c4
which is highly discouraged.
65bf1c4
9abcefa
##############################################################################
9abcefa
# glibc "headers" sub-package
Carlos O'Donell e63fda9
# - The headers package includes all common headers that are shared amongst
Carlos O'Donell e63fda9
#   the multilib builds. It was created to reduce the download size, and
Carlos O'Donell e63fda9
#   thus avoid downloading one header package per multilib. The package is
Carlos O'Donell e63fda9
#   identical both in content and file list, any difference is an error.
Carlos O'Donell e63fda9
#   Files like gnu/stubs.h which have gnu/stubs-32.h (i686) and gnu/stubs-64.h
Carlos O'Donell e63fda9
#   are included in glibc-headers, but the -32 and -64 files are in their
Carlos O'Donell e63fda9
#   respective i686 and x86_64 devel packages.
9abcefa
##############################################################################
cvsdist c381c23
%package headers
cvsdist c381c23
Summary: Header files for development using standard C libraries.
cvsdist c381c23
Group: Development/Libraries
cvsdist c381c23
Provides: %{name}-headers(%{_target_cpu})
cvsdist c381c23
%ifarch x86_64
cvsdist c381c23
# If both -m32 and -m64 is to be supported on AMD64, x86_64 glibc-headers
65bf1c4
# have to be installed, not i586 ones.
65bf1c4
Obsoletes: %{name}-headers(i586)
Andreas Schwab 50a0037
Obsoletes: %{name}-headers(i686)
cvsdist c381c23
%endif
ffc48ad
Requires(pre): kernel-headers
4465bbc
Requires: kernel-headers >= 2.2.1, %{name} = %{version}-%{release}
2094360
BuildRequires: kernel-headers >= 2.6.22
cvsdist c381c23
cvsdist c381c23
%description headers
cvsdist c381c23
The glibc-headers package contains the header files necessary
cvsdist c381c23
for developing programs which use the standard C libraries (which are
cvsdist c381c23
used by nearly all programs).  If you are developing programs which
cvsdist c381c23
will use the standard C libraries, your system needs to have these
cvsdist c381c23
standard header files available in order to create the
cvsdist c381c23
executables.
cvsdist c381c23
cvsdist c381c23
Install glibc-headers if you are going to develop programs which will
cvsdist c381c23
use the standard C libraries.
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# glibc "common" sub-package
9abcefa
##############################################################################
cvsdist c381c23
%package common
cvsdist c381c23
Summary: Common binaries and locale data for glibc
e5e8f77
Requires: %{name} = %{version}-%{release}
cvsdist c381c23
Requires: tzdata >= 2003a
cvsdist c381c23
Group: System Environment/Base
cvsdist c381c23
cvsdist c381c23
%description common
cvsdist c381c23
The glibc-common package includes common binaries for the GNU libc
cvsdist c381c23
libraries, as well as national language (locale) support.
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# glibc "nscd" sub-package
9abcefa
##############################################################################
cvsdist c381c23
%package -n nscd
cvsdist c381c23
Summary: A Name Service Caching Daemon (nscd).
cvsdist c381c23
Group: System Environment/Daemons
Andreas Schwab d047b37
Requires: %{name} = %{version}-%{release}
cc5c5b1
Requires: libselinux >= 1.17.10-1, audit-libs >= 1.1.3
Andreas Schwab 389eedc
Requires(pre): /usr/sbin/useradd, coreutils
Siddhesh Poyarekar a383e78
Requires(post): systemd
Siddhesh Poyarekar a383e78
Requires(preun): systemd
Siddhesh Poyarekar a383e78
Requires(postun): systemd, /usr/sbin/userdel
cvsdist c381c23
cvsdist c381c23
%description -n nscd
cvsdist c381c23
Nscd caches name service lookups and can dramatically improve
f90fe5a
performance with NIS+, and may help with DNS as well.
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# glibc "utils" sub-package
9abcefa
##############################################################################
cvsdist c381c23
%package utils
cvsdist c381c23
Summary: Development utilities from GNU C library
cvsdist c381c23
Group: Development/Tools
ffc48ad
Requires: %{name} = %{version}-%{release}
cvsdist c381c23
cvsdist c381c23
%description utils
cvsdist c381c23
The glibc-utils package contains memusage, a memory usage profiler,
cvsdist c381c23
mtrace, a memory leak tracer and xtrace, a function call tracer
cvsdist c381c23
which can be helpful during program debugging.
cvsdist c381c23
cvsdist c381c23
If unsure if you need this, don't install this package.
cvsdist c381c23
8c7b7c2
##############################################################################
8c7b7c2
# glibc core "debuginfo" sub-package
8c7b7c2
##############################################################################
Andreas Schwab 237bb90
%if 0%{?_enable_debug_packages}
cvsdist c381c23
%define debug_package %{nil}
e74e801
%define __debug_install_post %{nil}
e74e801
%global __debug_package 1
cvsdist c381c23
cvsdist c381c23
%package debuginfo
cvsdist c381c23
Summary: Debug information for package %{name}
cvsdist c381c23
Group: Development/Debug
e0b4499
AutoReqProv: no
cvsdist c381c23
%ifarch %{debuginfocommonarches}
cvsdist c381c23
Requires: glibc-debuginfo-common = %{version}-%{release}
Andreas Schwab 50a0037
%else
c1407c8
%ifarch %{ix86} %{sparc}
Andreas Schwab 50a0037
Obsoletes: glibc-debuginfo-common
Andreas Schwab 50a0037
%endif
cvsdist c381c23
%endif
cvsdist c381c23
cvsdist c381c23
%description debuginfo
cvsdist c381c23
This package provides debug information for package %{name}.
cvsdist c381c23
Debug information is useful when developing applications that use this
cvsdist c381c23
package or when debugging this package.
cvsdist c381c23
cvsdist ce09106
This package also contains static standard C libraries with
cvsdist ce09106
debugging information.  You need this only if you want to step into
cvsdist ce09106
C library routines during debugging programs statically linked against
cvsdist ce09106
one or more of the standard C libraries.
cvsdist ce09106
To use this debugging information, you need to link binaries
0d1d15d
with -static -L%{_prefix}/lib/debug%{_libdir} compiler options.
cvsdist ce09106
9abcefa
##############################################################################
9abcefa
# glibc common "debuginfo-common" sub-package
9abcefa
##############################################################################
cvsdist c381c23
%ifarch %{debuginfocommonarches}
cvsdist c381c23
cvsdist c381c23
%package debuginfo-common
cvsdist c381c23
Summary: Debug information for package %{name}
cvsdist c381c23
Group: Development/Debug
e0b4499
AutoReqProv: no
cvsdist c381c23
cvsdist c381c23
%description debuginfo-common
cvsdist c381c23
This package provides debug information for package %{name}.
cvsdist c381c23
Debug information is useful when developing applications that use this
cvsdist c381c23
package or when debugging this package.
cvsdist c381c23
9abcefa
%endif # %{debuginfocommonarches}
9abcefa
%endif # 0%{?_enable_debug_packages}
cvsdist c381c23
Siddhesh Poyarekar 67b30d7
%if %{build_benchtests}
Siddhesh Poyarekar 67b30d7
%package benchtests
Siddhesh Poyarekar 67b30d7
Summary: Benchmarking binaries and scripts for %{name}
Siddhesh Poyarekar 67b30d7
Group: Development/Debug
Siddhesh Poyarekar 67b30d7
%description benchtests
Siddhesh Poyarekar 67b30d7
This package provides built benchmark binaries and scripts to run
Siddhesh Poyarekar 67b30d7
microbenchmark tests on the system.
Siddhesh Poyarekar 67b30d7
%endif
Siddhesh Poyarekar 67b30d7
9abcefa
##############################################################################
9abcefa
# Prepare for the build.
9abcefa
##############################################################################
cvsdist c381c23
%prep
Siddhesh Poyarekar 17b00fb
%setup -q -n %{glibcsrcdir}
92f265f
9abcefa
# Patch order is important as some patches depend on other patches and
Siddhesh Poyarekar 17b00fb
# therefore the order must not be changed.  First two are rtkaio and c_stubs;
Siddhesh Poyarekar 17b00fb
# we maintain this only in Fedora.
Siddhesh Poyarekar 17b00fb
%patch0038 -p1
Siddhesh Poyarekar 17b00fb
%patch0039 -p1
665e71f
%patch0001 -p1
dd8ae6f
%patch0003 -p1
dd8ae6f
%patch0004 -p1
f7dfce4
%patch0005 -p1
dd8ae6f
%patch0006 -p1
0a21292
%patch2007 -p1
f7dfce4
%patch0009 -p1
03545a8
%patch0012 -p1
fdfcf25
%patch2013 -p1
a7ee17d
%patch0014 -p1
4e1a9eb
%patch0015 -p1
4e1a9eb
%patch0016 -p1
9625d85
%patch0019 -p1
9625d85
%patch0020 -p1
24dc568
%patch2023 -p1
9625d85
%patch0024 -p1
e781949
%patch0025 -p1
dd8ae6f
%patch2027 -p1
e3a9f69
%patch0028 -p1
f6de48a
%patch0030 -p1
fb633ea
%patch0031 -p1
fb633ea
%patch0033 -p1
fb633ea
%patch0034 -p1
7f65423
%patch0037 -p1
Siddhesh Poyarekar 615c1c4
%patch0040 -p1
Siddhesh Poyarekar e3b637c
%patch0041 -p1
Siddhesh Poyarekar 25e270d
%patch0042 -p1
9c4147a
%patch0044 -p1
c2021d0
%patch0046 -p1
Siddhesh Poyarekar bdbcf83
%patch2031 -p1
Siddhesh Poyarekar bdbcf83
%patch0047 -p1
Kyle McMartin b39b864
%patch2033 -p1
Kyle McMartin b66a135
%patch2034 -p1
6fbf955
%patch2035 -p1
f8be71c
%patch0052 -p1
Siddhesh Poyarekar b80bba4
%patch0053 -p1
Carlos O'Donell 85a0930
%patch0054 -p1
Siddhesh Poyarekar 67b30d7
%patch3002 -p1
ebc13c2
dbf5f70
%patch2101 -p1
dbf5f70
%patch2102 -p1
dbf5f70
%patch2103 -p1
dbf5f70
%patch2104 -p1
dbf5f70
%patch2105 -p1
73fbe41
%patch2106 -p1
9f1734e
%patch2107 -p1
e8497bf
%patch2108 -p1
431c99d
%patch2109 -p1
Siddhesh Poyarekar 9af85e6
%patch0055 -p1
Carlos O'Donell 7a808bc
%patch1000 -p1
e8f4ba5
%patch1001 -p1
67d1373
%patch1002 -p1
67d1373
%patch1003 -p1
67d1373
%patch1004 -p1
62f2d36
%patch1005 -p1
116e17a
%patch1006 -p1
217d136
%patch1007 -p1
217d136
%patch1008 -p1
217d136
%patch1009 -p1
217d136
%patch1010 -p1
217d136
%patch1011 -p1
79cd021
%patch1012 -p1
79cd021
%patch1013 -p1
79cd021
%patch1014 -p1
84517e1
%patch1015 -p1
d277a9b
%patch1016 -p1
d277a9b
%patch1017 -p1
8ef83de
%patch1018 -p1
4c57cf5
%patch1019 -p1
4c57cf5
%patch1020 -p1
4c57cf5
%patch1021 -p1
4c57cf5
%patch1022 -p1
4c57cf5
%patch1023 -p1
6ca2fbe
%patch1024 -p1
6ca2fbe
%patch1025 -p1
53d6baa
%patch1026 -p1
53d6baa
%patch1027 -p1
dd028df
%patch0059 -p1
dbf5f70
9abcefa
##############################################################################
9abcefa
# %%prep - Additional prep required...
9abcefa
##############################################################################
9abcefa
9abcefa
# XXX: This sounds entirely out of date, particularly in light of the fact
9abcefa
#      that we want to be building newer Power support. We should review this
9abcefa
#      and potentially remove this workaround. However it will require
9abcefa
#      determining which arches we support building for on our distributions.
9abcefa
# ~~~
8126ba8
# On powerpc32, hp timing is only available in power4/power6
8126ba8
# libs, not in base, so pre-power4 dynamic linker is incompatible
8126ba8
# with power6 libs.
9abcefa
# ~~~
b63a792
%if %{buildpower6}
8126ba8
rm -f sysdeps/powerpc/powerpc32/power4/hp-timing.[ch]
8126ba8
%endif
cvsdist c381c23
Siddhesh Poyarekar 67b30d7
# Make benchmark scripts executable
Siddhesh Poyarekar 67b30d7
chmod +x benchtests/scripts/*.py scripts/pylint
Siddhesh Poyarekar 67b30d7
9abcefa
# Remove all files generated from patching.
cvsdist c381c23
find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \;
9abcefa
9abcefa
# Ensure timestamps on configure files are current to prevent
9abcefa
# regenerating them.
cvsdist c381c23
touch `find . -name configure`
9abcefa
9abcefa
# Ensure *-kw.h files are current to prevent regenerating them.
da64eed
touch locale/programs/*-kw.h
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# Build glibc...
9abcefa
##############################################################################
cvsdist c381c23
%build
9abcefa
8c7b7c2
# We build using the native system compilers.
cvsdist c381c23
GCC=gcc
e1fb04f
GXX=g++
9abcefa
9abcefa
##############################################################################
9abcefa
# %%build - x86 options.
9abcefa
##############################################################################
9abcefa
# On x86 we build for the specific target cpu rpm is using.
cvsdist c381c23
%ifarch %{ix86}
Andreas Schwab 444e2cc
BuildFlags="-march=%{_target_cpu} -mtune=generic"
cvsdist c381c23
%endif
b5a3001
# We don't support building for i386. The generic i386 architecture lacks the
b5a3001
# atomic primitives required for NPTL support. However, when a user asks to
bf6cb48
# build for i386 we interpret that as "for whatever works on x86" and we
b5a3001
# select i686. Thus we treat i386 as an alias for i686.
b5a3001
%ifarch i386 i686
52b0ac1
BuildFlags="-march=i686 -mtune=generic"
aa68137
%endif
b5a3001
%ifarch i486 i586
35a1d02
BuildFlags="$BuildFlags -mno-tls-direct-seg-refs"
35a1d02
%endif
a18e83c
%ifarch x86_64
52b0ac1
BuildFlags="-mtune=generic"
a18e83c
%endif
9abcefa
9abcefa
##############################################################################
9abcefa
# %%build - SPARC options.
9abcefa
##############################################################################
cvsdist c381c23
%ifarch sparc
cvsdist c381c23
BuildFlags="-fcall-used-g6"
cvsdist c381c23
GCC="gcc -m32"
e1fb04f
GXX="g++ -m32"
cvsdist c381c23
%endif
cvsdist c381c23
%ifarch sparcv9
cvsdist c381c23
BuildFlags="-mcpu=ultrasparc -fcall-used-g6"
cvsdist c381c23
GCC="gcc -m32"
e1fb04f
GXX="g++ -m32"
cvsdist c381c23
%endif
bd08553
%ifarch sparcv9v
bd08553
BuildFlags="-mcpu=niagara -fcall-used-g6"
bd08553
GCC="gcc -m32"
bd08553
GXX="g++ -m32"
bd08553
%endif
cvsdist c381c23
%ifarch sparc64
cvsdist c381c23
BuildFlags="-mcpu=ultrasparc -mvis -fcall-used-g6"
cvsdist c381c23
GCC="gcc -m64"
e1fb04f
GXX="g++ -m64"
cvsdist c381c23
%endif
bd08553
%ifarch sparc64v
bd08553
BuildFlags="-mcpu=niagara -mvis -fcall-used-g6"
bd08553
GCC="gcc -m64"
bd08553
GXX="g++ -m64"
bd08553
%endif
98dddaf
%ifarch %{power64}
a7ee17d
BuildFlags=""
cvsdist c381c23
GCC="gcc -m64"
e1fb04f
GXX="g++ -m64"
cvsdist c381c23
%endif
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# %%build - Generic options.
9abcefa
##############################################################################
25b38c6
BuildFlags="$BuildFlags -fasynchronous-unwind-tables"
Andreas Schwab c57ebc6
# Add -DNDEBUG unless using a prerelease
Andreas Schwab c57ebc6
case %{version} in
Andreas Schwab c57ebc6
  *.*.9[0-9]*) ;;
Andreas Schwab 96d4f41
  *)
Andreas Schwab c57ebc6
     BuildFlags="$BuildFlags -DNDEBUG"
Andreas Schwab c57ebc6
     ;;
Andreas Schwab c57ebc6
esac
cvsdist c381c23
EnableKernel="--enable-kernel=%{enablekernel}"
9abcefa
# Save the used compiler and options into the file "Gcc" for use later
9abcefa
# by %%install.
2f520ca
echo "$GCC" > Gcc
Carlos O'Donell 2542c05
AddOns=`echo */configure | sed -e 's!/configure!!g;s!\(nptl\|rtkaio\|powerpc-cpu\)\( \|$\)!!g;s! \+$!!;s! !,!g;s!^!,!;/^,\*$/d'`
cvsdist ce09106
%ifarch %{rtkaioarches}
cvsdist ce09106
AddOns=,rtkaio$AddOns
cvsdist ce09106
%endif
cvsdist ce09106
9abcefa
##############################################################################
9abcefa
# build()
9abcefa
#	Build glibc in `build-%{target}$1', passing the rest of the arguments
9abcefa
#	as CFLAGS to the build (not the same as configure CFLAGS). Several
9abcefa
#	global values are used to determine build flags, add-ons, kernel
9abcefa
#	version, multiarch support, system tap support, etc.
9abcefa
##############################################################################
Andreas Schwab 444e2cc
build()
a9d8ca8
{
d4d7eff
	builddir=build-%{target}${1:+-$1}
d4d7eff
	${1+shift}
d4d7eff
	rm -rf $builddir
d4d7eff
	mkdir $builddir
d4d7eff
	pushd $builddir
d4d7eff
	build_CFLAGS="$BuildFlags -g -O3 $*"
d4d7eff
	# Some configure checks can spuriously fail for some architectures if
d4d7eff
	# unwind info is present
d4d7eff
	configure_CFLAGS="$build_CFLAGS -fno-asynchronous-unwind-tables"
d4d7eff
	../configure CC="$GCC" CXX="$GXX" CFLAGS="$configure_CFLAGS" \
d4d7eff
		--prefix=%{_prefix} \
Siddhesh Poyarekar c96b7f7
		--enable-add-ons=$AddOns \
d4d7eff
		--with-headers=%{_prefix}/include $EnableKernel --enable-bind-now \
d4d7eff
		--build=%{target} \
Andreas Schwab 237bb90
%ifarch %{multiarcharches}
d4d7eff
		--enable-multi-arch \
Andreas Schwab 237bb90
%endif
d4d7eff
		--enable-obsolete-rpc \
d4d7eff
		--enable-systemtap \
98dddaf
%ifarch ppc64p7
d4d7eff
		--with-cpu=power7 \
98dddaf
%endif
Siddhesh Poyarekar 49b191c
%ifarch %{lock_elision_arches}
Siddhesh Poyarekar 49b191c
		--enable-lock-elision \
Siddhesh Poyarekar 49b191c
%endif
Siddhesh Poyarekar 5d3d5d4
%if 0%{?disable_werror}
Siddhesh Poyarekar 5d3d5d4
               --disable-werror \
Siddhesh Poyarekar 5d3d5d4
%endif
d4d7eff
		--disable-profile --enable-nss-crypt ||
d4d7eff
		{ cat config.log; false; }
Andreas Schwab f81c27d
d4d7eff
	make %{?_smp_mflags} -r CFLAGS="$build_CFLAGS" %{silentrules}
d4d7eff
	popd
a9d8ca8
}
a9d8ca8
9abcefa
##############################################################################
9abcefa
# Build glibc for the default set of options.
9abcefa
##############################################################################
Andreas Schwab 444e2cc
build
a9d8ca8
9abcefa
##############################################################################
9abcefa
# Build glibc for xen:
9abcefa
# If we support xen build glibc again for xen support.
9abcefa
##############################################################################
a9d8ca8
%if %{buildxen}
Andreas Schwab 444e2cc
build nosegneg -mno-tls-direct-seg-refs
a9d8ca8
%endif
5a7053e
9abcefa
##############################################################################
9abcefa
# Build glibc for power6:
9abcefa
# If we support building a power6 alternate runtime then built glibc again for
9abcefa
# power6.
9abcefa
# XXX: We build in a sub-shell for no apparent reason.
9abcefa
##############################################################################
18aa46f
%if %{buildpower6}
18aa46f
(
d4d7eff
	platform=`LD_SHOW_AUXV=1 /bin/true | sed -n 's/^AT_PLATFORM:[[:blank:]]*//p'`
d4d7eff
	if [ "$platform" != power6 ]; then
2eb1503
		mkdir -p power6emul/{lib,lib64}
Siddhesh Poyarekar 17b00fb
		$GCC -shared -O2 -fpic -o power6emul/%{_lib}/power6emul.so %{SOURCE8} -Wl,-z,initfirst
18aa46f
%ifarch ppc
2eb1503
		gcc -shared -nostdlib -O2 -fpic -m64 -o power6emul/lib64/power6emul.so -xc - 
18aa46f
%endif
18aa46f
%ifarch ppc64
2eb1503
		gcc -shared -nostdlib -O2 -fpic -m32 -o power6emul/lib/power6emul.so -xc - < /dev/null
18aa46f
%endif
2eb1503
		export LD_PRELOAD=`pwd`/power6emul/\$LIB/power6emul.so
d4d7eff
	fi
d4d7eff
	AddOns="$AddOns --with-cpu=power6"
d4d7eff
	GCC="$GCC -mcpu=power6"
d4d7eff
	GXX="$GXX -mcpu=power6"
d4d7eff
	build power6
18aa46f
)
2eb1503
%endif # %{buildpower6}
18aa46f
9abcefa
##############################################################################
9abcefa
# Build the glibc post-upgrade program:
9abcefa
# We only build one of these with the default set of options. This program
9abcefa
# must be able to run on all hardware for the lowest common denomintor since
9abcefa
# we only build it once.
9abcefa
##############################################################################
7e232bd
pushd build-%{target}
Siddhesh Poyarekar 17b00fb
$GCC -static -L. -Os -g %{SOURCE2} \
2eb1503
	-o glibc_post_upgrade.%{_target_cpu} \
d4d7eff
	'-DLIBTLS="/%{_lib}/tls/"' \
0d1d15d
	'-DGCONV_MODULES_DIR="%{_libdir}/gconv"' \
d4d7eff
	'-DLD_SO_CONF="/etc/ld.so.conf"' \
d4d7eff
	'-DICONVCONFIG="%{_sbindir}/iconvconfig.%{_target_cpu}"'
7e232bd
popd
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# Install glibc...
9abcefa
##############################################################################
cvsdist c381c23
%install
c13214a
c13214a
# Ensure the permissions of errlist.c do not change.  When the file is
c13214a
# regenerated the Makefile sets the permissions to 444. We set it to 644
c13214a
# to match what comes out of git. The tarball of the git archive won't have
c13214a
# correct permissions because git doesn't track all of the permissions
c13214a
# accurately (see git-cache-meta if you need that). We also set it to 644 to
c13214a
# match pre-existing rpms. We do this *after* the build because the build
c13214a
# might regenerate the file and set the permissions to 444.
c13214a
chmod 644 sysdeps/gnu/errlist.c
c13214a
9abcefa
# Reload compiler and build options that were used during %%build.
cvsdist c381c23
GCC=`cat Gcc`
cvsdist c381c23
9abcefa
# Cleanup any previous installs...
cvsdist c381c23
rm -rf $RPM_BUILD_ROOT
cvsdist c381c23
mkdir -p $RPM_BUILD_ROOT
d4d7eff
make -j1 install_root=$RPM_BUILD_ROOT \
d4d7eff
	install -C build-%{target} %{silentrules}
9abcefa
# If we are not building an auxiliary arch then install all of the supported
9abcefa
# locales.
cvsdist c381c23
%ifnarch %{auxarches}
7e232bd
pushd build-%{target}
d4d7eff
make %{?_smp_mflags} install_root=$RPM_BUILD_ROOT \
d4d7eff
	install-locales -C ../localedata objdir=`pwd`
7e232bd
popd
cvsdist c381c23
%endif
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# Install rtkaio libraries.
9abcefa
##############################################################################
52b0ac1
%ifarch %{rtkaioarches}
b8e4762
librtso=`basename $RPM_BUILD_ROOT/%{_lib}/librt.so.*`
b8e4762
rm -f $RPM_BUILD_ROOT{,%{_prefix}}/%{_lib}/librtkaio.*
b8e4762
rm -f $RPM_BUILD_ROOT%{_libdir}/librt.so.*
b8e4762
mkdir -p $RPM_BUILD_ROOT/%{_lib}/rtkaio
b8e4762
mv $RPM_BUILD_ROOT/%{_lib}/librtkaio-*.so $RPM_BUILD_ROOT/%{_lib}/rtkaio/
b8e4762
rm -f $RPM_BUILD_ROOT/%{_lib}/$librtso
b8e4762
ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/librt-*.so` $RPM_BUILD_ROOT/%{_lib}/$librtso
b8e4762
ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/rtkaio/librtkaio-*.so` $RPM_BUILD_ROOT/%{_lib}/rtkaio/$librtso
52b0ac1
%endif
52b0ac1
71c008f
# install_different:
71c008f
#	Install all core libraries into DESTDIR/SUBDIR. Either the file is
71c008f
#	installed as a copy or a symlink to the default install (if it is the
71c008f
#	same). The path SUBDIR_UP is the prefix used to go from
71c008f
#	DESTDIR/SUBDIR to the default installed libraries e.g.
71c008f
#	ln -s SUBDIR_UP/foo.so DESTDIR/SUBDIR/foo.so.
71c008f
#	When you call this function it is expected that you are in the root
71c008f
#	of the build directory, and that the default build directory is:
71c008f
#	"../build-%{target}" (relatively).
71c008f
#	The primary use of this function is to install alternate runtimes
71c008f
#	into the build directory and avoid duplicating this code for each
71c008f
#	runtime.
71c008f
install_different()
71c008f
{
baa7ac6
	local lib libbase libbaseso dlib
71c008f
	local destdir="$1"
71c008f
	local subdir="$2"
71c008f
	local subdir_up="$3"
71c008f
	local libdestdir="$destdir/$subdir"
71c008f
	# All three arguments must be non-zero paths.
71c008f
	if ! [ "$destdir" \
71c008f
	       -a "$subdir" \
71c008f
	       -a "$subdir_up" ]; then
71c008f
		echo "One of the arguments to install_different was emtpy."
71c008f
		exit 1
71c008f
	fi
71c008f
	# Create the destination directory and the multilib directory.
71c008f
	mkdir -p "$destdir"
71c008f
	mkdir -p "$libdestdir"
71c008f
	# Walk all of the libraries we installed...
71c008f
	for lib in libc math/libm nptl/libpthread rt/librt nptl_db/libthread_db
71c008f
	do
71c008f
		libbase=${lib#*/}
71c008f
		# Take care that `libbaseso' has a * that needs expanding so
71c008f
		# take care with quoting.
b8e4762
		libbaseso=$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}-*.so)
71c008f
		# Only install if different from default build library.
71c008f
		if cmp -s ${lib}.so ../build-%{target}/${lib}.so; then
71c008f
			ln -sf "$subdir_up"/$libbaseso $libdestdir/$libbaseso
71c008f
		else
71c008f
			cp -a ${lib}.so $libdestdir/$libbaseso
71c008f
		fi
b8e4762
		dlib=$libdestdir/$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}.so.*)
71c008f
		ln -sf $libbaseso $dlib
71c008f
	done
71c008f
%ifarch %{rtkaioarches}
b8e4762
	local rtkdestdir="$RPM_BUILD_ROOT/%{_lib}/rtkaio/$subdir"
b8e4762
	local librtso=`basename $RPM_BUILD_ROOT/%{_lib}/librt.so.*`
5b97b46
	mkdir -p $rtkdestdir
b8e4762
	librtkaioso=$(basename $RPM_BUILD_ROOT/%{_lib}/librt-*.so | sed s/librt-/librtkaio-/)
b8e4762
	if cmp -s rtkaio/librtkaio.so ../build-%{target}/rtkaio/librtkaio.so; then
b8e4762
		ln -s %{nosegneg_subdir_up}/$librtkaioso $rtkdestdir/$librtkaioso
71c008f
	else
b8e4762
		cp -a rtkaio/librtkaio.so $rtkdestdir/$librtkaioso
71c008f
	fi
b8e4762
	ln -sf $librtkaioso $rtkdestdir/$librtso
71c008f
%endif
71c008f
}
71c008f
9abcefa
##############################################################################
9abcefa
# Install the xen build files.
9abcefa
##############################################################################
5a7053e
%if %{buildxen}
d1be4db
%define nosegneg_subdir_base i686
5a7053e
%define nosegneg_subdir i686/nosegneg
Andreas Schwab 6c0e600
%define nosegneg_subdir_up ../..
7e232bd
pushd build-%{target}-nosegneg
b8e4762
destdir=$RPM_BUILD_ROOT/%{_lib}
71c008f
install_different "$destdir" "%{nosegneg_subdir}" "%{nosegneg_subdir_up}"
7e232bd
popd
2eb1503
%endif # %{buildxen}
a9d8ca8
9abcefa
##############################################################################
9abcefa
# Install the power6 build files.
9abcefa
##############################################################################
18aa46f
%if %{buildpower6}
71c008f
%define power6_subdir power6
71c008f
%define power6_subdir_up ..
71c008f
%define power6_legacy power6x
71c008f
%define power6_legacy_up ..
7e232bd
pushd build-%{target}-power6
71c008f
destdir=$RPM_BUILD_ROOT/%{_lib}
db59a63
install_different "$destdir" "%{power6_subdir}" "%{power6_subdir_up}"
71c008f
# Make a legacy /usr/lib[64]/power6x directory that is a symlink to the
71c008f
# power6 runtime.
71c008f
# XXX: When can we remove this? What is the history behind this?
71c008f
mkdir -p ${destdir}/%{power6_legacy}
71c008f
pushd ${destdir}/%{power6_legacy}
71c008f
ln -sf %{power6_legacy_up}/%{power6_subdir}/*.so .
71c008f
cp -a %{power6_legacy_up}/%{power6_subdir}/*.so.* .
1e072aa
popd
18aa46f
%ifarch %{rtkaioarches}
71c008f
destdir=${destdir}/rtkaio
71c008f
mkdir -p ${destdir}/%{power6_legacy}
71c008f
pushd ${destdir}/%{power6_legacy}
1e072aa
ln -sf ../power6/*.so .
1e072aa
cp -a ../power6/*.so.* .
1e072aa
popd
18aa46f
%endif
7e232bd
popd
2eb1503
%endif # %{buildpower6}
18aa46f
9abcefa
##############################################################################
cvsdist c381c23
# Remove the files we don't want to distribute
9abcefa
##############################################################################
9abcefa
9abcefa
# Remove the libNoVersion files.
9abcefa
# XXX: This looks like a bug in glibc that accidentally installed these
9abcefa
#      wrong files. We probably don't need this today.
0d1d15d
rm -f $RPM_BUILD_ROOT%{_libdir}/libNoVersion*
cvsdist c381c23
rm -f $RPM_BUILD_ROOT/%{_lib}/libNoVersion*
cvsdist c381c23
5a3b560
# rquota.x and rquota.h are now provided by quota
5a3b560
rm -f $RPM_BUILD_ROOT%{_prefix}/include/rpcsvc/rquota.[hx]
5a3b560
5a3b560
# In F7+ this is provided by rpcbind rpm
5a3b560
rm -f $RPM_BUILD_ROOT%{_sbindir}/rpcinfo
5a3b560
5a3b560
# Remove the old nss modules.
5a3b560
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss1-*
5a3b560
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss-*.so.1
24d9119
8c7b7c2
##############################################################################
5a3b560
# Install info files
8c7b7c2
##############################################################################
8c7b7c2
9abcefa
# Move the info files if glibc installed them into the wrong location.
cvsdist c381c23
if [ -d $RPM_BUILD_ROOT%{_prefix}/info -a "%{_infodir}" != "%{_prefix}/info" ]; then
ffc48ad
  mkdir -p $RPM_BUILD_ROOT%{_infodir}
ffc48ad
  mv -f $RPM_BUILD_ROOT%{_prefix}/info/* $RPM_BUILD_ROOT%{_infodir}
ffc48ad
  rm -rf $RPM_BUILD_ROOT%{_prefix}/info
cvsdist c381c23
fi
cvsdist c381c23
9abcefa
# Compress all of the info files.
cvsdist c381c23
gzip -9nvf $RPM_BUILD_ROOT%{_infodir}/libc*
cvsdist c381c23
5a3b560
##############################################################################
5a3b560
# Install locale files
5a3b560
##############################################################################
5a3b560
5a3b560
# Create archive of locale files
5a3b560
%ifnarch %{auxarches}
5a3b560
olddir=`pwd`
5a3b560
pushd ${RPM_BUILD_ROOT}%{_prefix}/lib/locale
37b5e6b
rm -f locale-archive
5a3b560
# Intentionally we do not pass --alias-file=, aliases will be added
5a3b560
# by build-locale-archive.
5a3b560
$olddir/build-%{target}/elf/ld.so \
d4d7eff
	--library-path $olddir/build-%{target}/ \
d4d7eff
	$olddir/build-%{target}/locale/localedef \
d4d7eff
	--prefix ${RPM_BUILD_ROOT} --add-to-archive \
dd028df
	C.utf8 *_*
dd028df
# Removes all locales except C.utf8 which remains as fallback in
dd028df
# the event the user cleans the locale-archive using localedef.
5a3b560
rm -rf *_*
5a3b560
mv locale-archive{,.tmpl}
5a3b560
popd
5a3b560
%endif
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# Install configuration files for services
9abcefa
##############################################################################
9abcefa
Siddhesh Poyarekar 17b00fb
install -p -m 644 %{SOURCE7} $RPM_BUILD_ROOT/etc/nsswitch.conf
cvsdist c381c23
Andreas Schwab 2fa87be
%ifnarch %{auxarches}
cvsdist ce09106
mkdir -p $RPM_BUILD_ROOT/etc/default
bb8d778
install -p -m 644 nis/nss $RPM_BUILD_ROOT/etc/default/nss
cvsdist ce09106
cvsdist c381c23
# This is for ncsd - in glibc 2.2
cvsdist c381c23
install -m 644 nscd/nscd.conf $RPM_BUILD_ROOT/etc
Siddhesh Poyarekar 944ed51
mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
Siddhesh Poyarekar 17b00fb
install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}
b8e4762
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
Siddhesh Poyarekar bdbcf83
install -m 644 nscd/nscd.service nscd/nscd.socket $RPM_BUILD_ROOT/lib/systemd/system
Andreas Schwab 2fa87be
%endif
cvsdist c381c23
cvsdist c381c23
# Include ld.so.conf
cvsdist 195182b
echo 'include ld.so.conf.d/*.conf' > $RPM_BUILD_ROOT/etc/ld.so.conf
1d99c01
truncate -s 0 $RPM_BUILD_ROOT/etc/ld.so.cache
cvsdist c381c23
chmod 644 $RPM_BUILD_ROOT/etc/ld.so.conf
cvsdist ce09106
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
Andreas Schwab 2fa87be
%ifnarch %{auxarches}
63b6b66
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
1d99c01
truncate -s 0 $RPM_BUILD_ROOT/etc/sysconfig/nscd
1d99c01
truncate -s 0 $RPM_BUILD_ROOT/etc/gai.conf
Andreas Schwab 2fa87be
%endif
cvsdist c381c23
0d1d15d
# Include %{_libdir}/gconv/gconv-modules.cache
0d1d15d
truncate -s 0 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
0d1d15d
chmod 644 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
cvsdist c381c23
9abcefa
##############################################################################
5a3b560
# Misc...
9abcefa
##############################################################################
9abcefa
5a3b560
# NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
5a3b560
# the generic one (#162634)
5a3b560
cp -a bits/stdio-lock.h $RPM_BUILD_ROOT%{_prefix}/include/bits/stdio-lock.h
5a3b560
# And <bits/libc-lock.h> needs sanitizing as well.
Siddhesh Poyarekar 17b00fb
cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_prefix}/include/bits/libc-lock.h
cvsdist c381c23
5a3b560
# XXX: What is this for?
0d1d15d
ln -sf libbsd-compat.a $RPM_BUILD_ROOT%{_libdir}/libbsd.a
5aec04c
5a3b560
# Install the upgrade program
5a3b560
install -m 700 build-%{target}/glibc_post_upgrade.%{_target_cpu} \
63769b1
  $RPM_BUILD_ROOT%{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu}
cae8344
5a3b560
# Strip all of the installed object files.
0d1d15d
strip -g $RPM_BUILD_ROOT%{_libdir}/*.o
5a3b560
5a3b560
# XXX: Ugly hack for buggy rpm. What bug? BZ? Is this fixed?
5a3b560
ln -f ${RPM_BUILD_ROOT}%{_sbindir}/iconvconfig{,.%{_target_cpu}}
d465a06
9abcefa
##############################################################################
3bc8fa7
# Install debug copies of unstripped static libraries
3bc8fa7
# - This step must be last in order to capture any additional static
3bc8fa7
#   archives we might have added.
3bc8fa7
##############################################################################
3bc8fa7
3bc8fa7
# If we are building a debug package then copy all of the static archives
3bc8fa7
# into the debug directory to keep them as unstripped copies.
3bc8fa7
%if 0%{?_enable_debug_packages}
0d1d15d
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}
0d1d15d
cp -a $RPM_BUILD_ROOT%{_libdir}/*.a \
0d1d15d
	$RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/
0d1d15d
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/*_p.a
3bc8fa7
%endif
3bc8fa7
3bc8fa7
##############################################################################
9abcefa
# Build the file lists used for describing the package and subpackages.
9abcefa
##############################################################################
9abcefa
# There are 11 file lists:
9abcefa
# * rpm.fileslist
9abcefa
#	- Master file list. Eventually, after removing files from this list
9abcefa
#	  we are left with the list of files for the glibc package.
9abcefa
# * common.filelist
9abcefa
#	- Contains the list of flies for the common subpackage.
9abcefa
# * utils.filelist
9abcefa
#	- Contains the list of files for the utils subpackage.
9abcefa
# * nscd.filelist
9abcefa
#	- Contains the list of files for the nscd subpackage.
9abcefa
# * devel.filelist
9abcefa
#	- Contains the list of files for the devel subpackage.
9abcefa
# * headers.filelist
9abcefa
#	- Contains the list of files for the headers subpackage.
9abcefa
# * static.filelist
9abcefa
#	- Contains the list of files for the static subpackage.
9abcefa
# * nosegneg.filelist
9abcefa
#	- Contains the list of files for the xen subpackage.
9abcefa
# * debuginfo.filelist
9abcefa
#	- Contains the list of files for the glibc debuginfo package.
9abcefa
# * debuginfocommon.filelist
9abcefa
#	- Contains the list of files for the glibc common debuginfo package.
9abcefa
#
9abcefa
Andreas Schwab 237bb90
{
Andreas Schwab 6843c2d
  find $RPM_BUILD_ROOT \( -type f -o -type l \) \
Andreas Schwab 237bb90
       \( \
Andreas Schwab 237bb90
	 -name etc -printf "%%%%config " -o \
Andreas Schwab 237bb90
	 -name gconv-modules \
Andreas Schwab 237bb90
	 -printf "%%%%verify(not md5 size mtime) %%%%config(noreplace) " -o \
Andreas Schwab 237bb90
	 -name gconv-modules.cache \
Andreas Schwab 237bb90
	 -printf "%%%%verify(not md5 size mtime) " \
Andreas Schwab 237bb90
	 , \
Andreas Schwab 6843c2d
	 ! -path "*/lib/debug/*" -printf "/%%P\n" \)
Siddhesh Poyarekar aeaedc4
  # Print all directories with a %%dir prefix.  We omit the info directory and
Siddhesh Poyarekar aeaedc4
  # all directories in (and including) /usr/share/locale.
Andreas Schwab 237bb90
  find $RPM_BUILD_ROOT -type d \
Siddhesh Poyarekar aeaedc4
       \( -path '*%{_prefix}/share/locale' -prune -o \
Andreas Schwab 237bb90
       \( -path '*%{_prefix}/share/*' ! -path '*%{_infodir}' -o \
Andreas Schwab 976b178
	  -path "*%{_prefix}/include/*" \
Siddhesh Poyarekar aeaedc4
       \) -printf "%%%%dir /%%P\n" \)
Andreas Schwab 237bb90
} | {
Andreas Schwab 237bb90
Andreas Schwab 237bb90
  # primary filelist
Siddhesh Poyarekar 0cda723
Siddhesh Poyarekar 7728cb8
  # Add %%lang entries for language-specific locale files.  This allows users
Siddhesh Poyarekar 7728cb8
  # to set %%_install_lang and not install the unnecessary locale files.
Siddhesh Poyarekar 7728cb8
  I18N_LANG='s|.*/share/i18n/locales/\([a-z]\{2\}[a-z]\?\)_[A-Z]\{2\}.*|%lang(\1) &|'
Siddhesh Poyarekar 0cda723
  # Remove the *.mo entries.  We will add that using %%find_lang
Siddhesh Poyarekar 0cda723
  sed -e '\,.*/share/locale/\([^/_]\+\).*/LC_MESSAGES/.*\.mo,d' \
Siddhesh Poyarekar 7728cb8
      -e "$I18N_LANG" \
Andreas Schwab d047b37
      -e '\,/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\|rpc\|gai\.conf\),d' \
Andreas Schwab 237bb90
      -e '\,/%{_lib}/lib\(pcprofile\|memusage\)\.so,d' \
Andreas Schwab 237bb90
      -e '\,bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d'
Andreas Schwab 237bb90
} | sort > rpm.filelist
cvsdist c381c23
Siddhesh Poyarekar 0cda723
# Our *.mo files.  Put them in glibc-common.
Siddhesh Poyarekar 0cda723
%find_lang libc
Siddhesh Poyarekar 0cda723
mv libc.lang common.filelist
Siddhesh Poyarekar 0cda723
b8e4762
mkdir -p $RPM_BUILD_ROOT%{_libdir}
b8e4762
mv -f $RPM_BUILD_ROOT/%{_lib}/lib{pcprofile,memusage}.so $RPM_BUILD_ROOT%{_libdir}
b8e4762
9abcefa
# The xtrace and memusage scripts have hard-coded paths that need to be
9abcefa
# translated to a correct set of paths using the $LIB token which is
9abcefa
# dynamically translated by ld.so as the default lib directory.
cvsdist c381c23
for i in $RPM_BUILD_ROOT%{_prefix}/bin/{xtrace,memusage}; do
0d1d15d
  sed -e 's~=/%{_lib}/libpcprofile.so~=%{_libdir}/libpcprofile.so~' \
0d1d15d
      -e 's~=/%{_lib}/libmemusage.so~=%{_libdir}/libmemusage.so~' \
29d3ac0
      -e 's~='\''/\\\$LIB/libpcprofile.so~='\''%{_prefix}/\\$LIB/libpcprofile.so~' \
29d3ac0
      -e 's~='\''/\\\$LIB/libmemusage.so~='\''%{_prefix}/\\$LIB/libmemusage.so~' \
Andreas Schwab 237bb90
      -i $i
cvsdist c381c23
done
cvsdist c381c23
9abcefa
# Put the info files into the devel file list.
271728a
grep '%{_infodir}' < rpm.filelist | grep -v '%{_infodir}/dir' > devel.filelist
9abcefa
Carlos O'Donell e63fda9
# The glibc-headers package includes only common files which are identical
Carlos O'Donell e63fda9
# across all multilib packages. We must keep gnu/stubs.h and gnu/lib-names.h
Carlos O'Donell e63fda9
# in the glibc-headers package, but the -32, -64, -64-v1, and -64-v2 versions
Carlos O'Donell e63fda9
# go into the development packages.
Carlos O'Donell e63fda9
grep '%{_prefix}/include/gnu/stubs-.*\.h$' < rpm.filelist >> devel.filelist || :
Carlos O'Donell e63fda9
grep '%{_prefix}/include/gnu/lib-names-.*\.h$' < rpm.filelist >> devel.filelist || :
9abcefa
# Put the include files into headers file list.
Carlos O'Donell e63fda9
grep '%{_prefix}/include' < rpm.filelist \
Carlos O'Donell 2542c05
  | egrep -v '%{_prefix}/include/gnu/stubs-.*\.h$' \
Carlos O'Donell 2542c05
  | egrep -v '%{_prefix}/include/gnu/lib-names-.*\.h$' \
Carlos O'Donell e63fda9
  > headers.filelist
cvsdist c381c23
9abcefa
# Remove partial (lib*_p.a) static libraries, include files, and info files from
9abcefa
# the core glibc package.
0d1d15d
sed -i -e '\|%{_libdir}/lib.*_p.a|d' \
Andreas Schwab 237bb90
       -e '\|%{_prefix}/include|d' \
Andreas Schwab 237bb90
       -e '\|%{_infodir}|d' rpm.filelist
cvsdist c381c23
9abcefa
# Put some static files into the devel package.
0d1d15d
grep '%{_libdir}/lib.*\.a' < rpm.filelist \
268a86f
  | grep '/lib\(\(c\|pthread\|nldbl\)_nonshared\|bsd\(\|-compat\)\|g\|ieee\|mcheck\|rpcsvc\)\.a$' \
65bf1c4
  >> devel.filelist
9abcefa
9abcefa
# Put the rest of the static files into the static package.
0d1d15d
grep '%{_libdir}/lib.*\.a' < rpm.filelist \
268a86f
  | grep -v '/lib\(\(c\|pthread\|nldbl\)_nonshared\|bsd\(\|-compat\)\|g\|ieee\|mcheck\|rpcsvc\)\.a$' \
65bf1c4
  > static.filelist
9abcefa
9abcefa
# Put all of the object files and *.so (not the versioned ones) into the
9abcefa
# devel package.
0d1d15d
grep '%{_libdir}/.*\.o' < rpm.filelist >> devel.filelist
b8e4762
grep '%{_libdir}/lib.*\.so' < rpm.filelist >> devel.filelist
cvsdist c381c23
Carlos O'Donell 2542c05
# Remove all of the static, object, unversioned DSOs, and nscd from the core
Carlos O'Donell 2542c05
# glibc package.
0d1d15d
sed -i -e '\|%{_libdir}/lib.*\.a|d' \
0d1d15d
       -e '\|%{_libdir}/.*\.o|d' \
b8e4762
       -e '\|%{_libdir}/lib.*\.so|d' \
Andreas Schwab 237bb90
       -e '\|nscd|d' rpm.filelist
cvsdist c381c23
9abcefa
# All of the bin and certain sbin files go into the common package.
9abcefa
# We explicitly exclude certain sbin files that need to go into
9abcefa
# the core glibc package for use during upgrades.
b8e4762
grep '%{_prefix}/bin' < rpm.filelist >> common.filelist
b8e4762
grep '%{_prefix}/sbin/[^gi]' < rpm.filelist >> common.filelist
9abcefa
# All of the files under share go into the common package since
b8e4762
# they should be multilib-independent.
ffc48ad
grep '%{_prefix}/share' < rpm.filelist | \
b8e4762
  grep -v -e '%{_prefix}/share/zoneinfo' -e '%%dir %{prefix}/share' \
b8e4762
       >> common.filelist
cvsdist c381c23
Siddhesh Poyarekar 9a33c90
# Remove the bin, locale, some sbin, and share from the
9abcefa
# core glibc package. We cheat a bit and use the slightly dangerous
b8e4762
# /usr/sbin/[^gi] to match the inverse of the search that put the
9abcefa
# files into common.filelist. It's dangerous in that additional files
b8e4762
# that start with g, or i would get put into common.filelist and
9abcefa
# rpm.filelist.
Andreas Schwab 237bb90
sed -i -e '\|%{_prefix}/bin|d' \
b8e4762
       -e '\|%{_prefix}/lib/locale|d' \
b8e4762
       -e '\|%{_prefix}/sbin/[^gi]|d' \
b8e4762
       -e '\|%{_prefix}/share|d' rpm.filelist
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# Build the xen package file list (nosegneg.filelist)
9abcefa
##############################################################################
1d99c01
truncate -s 0 nosegneg.filelist
a9d8ca8
%if %{xenpackage}
b8e4762
grep '/%{_lib}/%{nosegneg_subdir}' < rpm.filelist >> nosegneg.filelist
b8e4762
sed -i -e '\|/%{_lib}/%{nosegneg_subdir}|d' rpm.filelist
9abcefa
# TODO: There are files in the nosegneg list which should be in the devel
9abcefa
#	pacakge, but we leave them instead in the xen subpackage. We may
9abcefa
#	wish to clean that up at some point.
a9d8ca8
%endif
a9d8ca8
9abcefa
# Add the binary to build localse to the common subpackage.
cvsdist c381c23
echo '%{_prefix}/sbin/build-locale-archive' >> common.filelist
9abcefa
9abcefa
# The nscd binary must go into the nscd subpackage.
cvsdist c381c23
echo '%{_prefix}/sbin/nscd' > nscd.filelist
cvsdist c381c23
9abcefa
# The memusage and pcprofile libraries are put back into the core
9abcefa
# glibc package even though they are only used by utils package
9abcefa
# scripts..
Andreas Schwab aeada30
cat >> rpm.filelist <
0d1d15d
%{_libdir}/libmemusage.so
0d1d15d
%{_libdir}/libpcprofile.so
Andreas Schwab aeada30
EOF
9abcefa
9abcefa
# Add the utils scripts and programs to the utils subpackage.
Andreas Schwab aeada30
cat > utils.filelist <
cvsdist c381c23
%{_prefix}/bin/memusage
cvsdist c381c23
%{_prefix}/bin/memusagestat
cvsdist c381c23
%{_prefix}/bin/mtrace
cvsdist c381c23
%{_prefix}/bin/pcprofiledump
cvsdist c381c23
%{_prefix}/bin/xtrace
cvsdist c381c23
EOF
cvsdist c381c23
b8e4762
# Remove the zoneinfo files
b8e4762
# XXX: Why isn't this don't earlier when we are removing files?
b8e4762
#      Won't this impact what is shipped?
cvsdist 7da373a
rm -rf $RPM_BUILD_ROOT%{_prefix}/share/zoneinfo
cvsdist 7da373a
Siddhesh Poyarekar 17b00fb
# Make sure %config files have the same timestamp across multilib packages.
Siddhesh Poyarekar 17b00fb
#
Siddhesh Poyarekar 17b00fb
# XXX: Ideally ld.so.conf should have the timestamp of the spec file, but there
Siddhesh Poyarekar 17b00fb
# doesn't seem to be any macro to give us that.  So we do the next best thing,
Siddhesh Poyarekar 17b00fb
# which is to at least keep the timestamp consistent.  The choice of using
Siddhesh Poyarekar 17b00fb
# glibc_post_upgrade.c is arbitrary.
Siddhesh Poyarekar 17b00fb
touch -r %{SOURCE2} $RPM_BUILD_ROOT/etc/ld.so.conf
b45468e
touch -r sunrpc/etc.rpc $RPM_BUILD_ROOT/etc/rpc
b45468e
69de141
# We allow undefined symbols in shared libraries because the libraries
69de141
# referenced at link time here, particularly ld.so, may be different than
bf6cb48
# the one used at runtime.  This is really only needed during the ARM
69de141
# transition from ld-linux.so.3 to ld-linux-armhf.so.3.
Siddhesh Poyarekar 17b00fb
pushd build-%{target}
Siddhesh Poyarekar afa87a3
$GCC -Os -g -static -o build-locale-archive %{SOURCE1} \
d4d7eff
	../build-%{target}/locale/locarchive.o \
d4d7eff
	../build-%{target}/locale/md5.o \
Siddhesh Poyarekar 17b00fb
	-I. -DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \
d4d7eff
	-L../build-%{target} \
d4d7eff
	-Wl,--allow-shlib-undefined \
d4d7eff
	-B../build-%{target}/csu/ -lc -lc_nonshared
63769b1
install -m 700 build-locale-archive $RPM_BUILD_ROOT%{_prefix}/sbin/build-locale-archive
7e232bd
popd
cvsdist c381c23
9abcefa
# Lastly copy some additional documentation for the packages.
cvsdist c381c23
rm -rf documentation
cvsdist c381c23
mkdir documentation
cvsdist c381c23
cp crypt/README.ufc-crypt documentation/README.ufc-crypt
cvsdist c381c23
cp timezone/README documentation/README.timezone
a2dbc14
cp posix/gai.conf documentation/
cvsdist c381c23
62c3082
%ifarch s390x
b8e4762
# Compatibility symlink
b8e4762
mkdir -p $RPM_BUILD_ROOT/lib
b8e4762
ln -sf /%{_lib}/ld64.so.1 $RPM_BUILD_ROOT/lib/ld64.so.1
cvsdist c381c23
%endif
cvsdist c381c23
69de141
# Leave a compatibility symlink for the dynamic loader on armhfp targets,
69de141
# at least until the world gets rebuilt
69de141
%ifarch armv7hl armv7hnl
b8e4762
ln -sf /lib/ld-linux-armhf.so.3 $RPM_BUILD_ROOT/lib/ld-linux.so.3
69de141
%endif
69de141
Siddhesh Poyarekar 67b30d7
# Build benchmark binaries.  Ignore the output of the benchmark runs.
Siddhesh Poyarekar 67b30d7
pushd build-%{target}
Siddhesh Poyarekar 67b30d7
make BENCH_DURATION=1 bench-build
Siddhesh Poyarekar 67b30d7
popd
Siddhesh Poyarekar 67b30d7
Siddhesh Poyarekar 67b30d7
%if %{build_benchtests}
Siddhesh Poyarekar 67b30d7
# Copy over benchmark binaries.
Siddhesh Poyarekar 67b30d7
mkdir -p $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests
Siddhesh Poyarekar 67b30d7
cp $(find build-%{target}/benchtests -type f -executable) $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d7
Siddhesh Poyarekar 67b30d7
find build-%{target}/benchtests -type f -executable | while read b; do
Siddhesh Poyarekar 67b30d7
	echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)"
Siddhesh Poyarekar 67b30d7
done >> benchtests.filelist
Siddhesh Poyarekar 67b30d7
Siddhesh Poyarekar 67b30d7
# ... and the makefile.
Siddhesh Poyarekar 67b30d7
for b in %{SOURCE9} %{SOURCE10}; do
Siddhesh Poyarekar 67b30d7
	cp $b $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d7
	echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" >> benchtests.filelist
Siddhesh Poyarekar 67b30d7
done
Siddhesh Poyarekar 67b30d7
Siddhesh Poyarekar 67b30d7
# .. and finally, the comparison scripts.
Siddhesh Poyarekar 67b30d7
cp benchtests/scripts/benchout.schema.json $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d7
cp benchtests/scripts/compare_bench.py $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d7
cp benchtests/scripts/import_bench.py $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d7
cp benchtests/scripts/validate_benchout.py $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d7
Siddhesh Poyarekar 67b30d7
echo "%{_prefix}/libexec/glibc-benchtests/benchout.schema.json" >> benchtests.filelist
Siddhesh Poyarekar 67b30d7
echo "%{_prefix}/libexec/glibc-benchtests/compare_bench.py*" >> benchtests.filelist
Siddhesh Poyarekar 67b30d7
echo "%{_prefix}/libexec/glibc-benchtests/import_bench.py*" >> benchtests.filelist
Siddhesh Poyarekar 67b30d7
echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.filelist
Siddhesh Poyarekar 67b30d7
%endif
Siddhesh Poyarekar 67b30d7
9abcefa
###############################################################################
9abcefa
# Rebuild libpthread.a using --whole-archive to ensure all of libpthread
9abcefa
# is included in a static link. This prevents any problems when linking
9abcefa
# statically, using parts of libpthread, and other necessary parts not
9abcefa
# being included. Upstream has decided that this is the wrong approach to
9abcefa
# this problem and that the full set of dependencies should be resolved
9abcefa
# such that static linking works and produces the most minimally sized
9abcefa
# static application possible.
9abcefa
###############################################################################
63769b1
pushd $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
268a86f
$GCC -r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a
65bf1c4
rm libpthread.a
65bf1c4
ar rcs libpthread.a libpthread.o
65bf1c4
rm libpthread.o
65bf1c4
popd
9abcefa
###############################################################################
65bf1c4
Andreas Schwab 237bb90
%if 0%{?_enable_debug_packages}
cvsdist c381c23
e0b4499
# The #line directives gperf generates do not give the proper
e0b4499
# file name relative to the build directory.
37b5e6b
pushd locale
37b5e6b
ln -s programs/*.gperf .
37b5e6b
popd
37b5e6b
pushd iconv
37b5e6b
ln -s ../locale/programs/charmap-kw.gperf .
37b5e6b
popd
cvsdist c381c23
9abcefa
# Print some diagnostic information in the builds about the
9abcefa
# getconf binaries.
9abcefa
# XXX: Why do we do this?
63769b1
ls -l $RPM_BUILD_ROOT%{_prefix}/bin/getconf
63769b1
ls -l $RPM_BUILD_ROOT%{_prefix}/libexec/getconf
63769b1
eu-readelf -hS $RPM_BUILD_ROOT%{_prefix}/bin/getconf \
63769b1
	$RPM_BUILD_ROOT%{_prefix}/libexec/getconf/*
cvsdist c381c23
e0b4499
find_debuginfo_args='--strict-build-id -g'
e0b4499
%ifarch %{debuginfocommonarches}
e0b4499
find_debuginfo_args="$find_debuginfo_args \
d4d7eff
	-l common.filelist \
d4d7eff
	-l utils.filelist \
d4d7eff
	-l nscd.filelist \
b8e4762
	-p '.*/(sbin|libexec)/.*' \
d4d7eff
	-o debuginfocommon.filelist \
d4d7eff
	-l rpm.filelist \
Siddhesh Poyarekar 67b30d7
	-l nosegneg.filelist -l benchtests.filelist"
e0b4499
%endif
b8e4762
eval /usr/lib/rpm/find-debuginfo.sh \
d4d7eff
	"$find_debuginfo_args" \
d4d7eff
	-o debuginfo.filelist
cvsdist c381c23
9abcefa
# List all of the *.a archives in the debug directory.
e0b4499
list_debug_archives()
e0b4499
{
0d1d15d
	local dir=%{_prefix}/lib/debug%{_libdir}
d4d7eff
	find $RPM_BUILD_ROOT$dir -name "*.a" -printf "$dir/%%P\n"
e0b4499
}
cvsdist c381c23
cvsdist c381c23
%ifarch %{debuginfocommonarches}
e0b4499
9abcefa
# Remove the source files from the common package debuginfo.
Andreas Schwab 87a7e49
sed -i '\#^%{_prefix}/src/debug/#d' debuginfocommon.filelist
9abcefa
9abcefa
# Create a list of all of the source files we copied to the debug directory.
Andreas Schwab 87a7e49
find $RPM_BUILD_ROOT%{_prefix}/src/debug \
Andreas Schwab 87a7e49
     \( -type d -printf '%%%%dir ' \) , \
Andreas Schwab 87a7e49
     -printf '%{_prefix}/src/debug/%%P\n' > debuginfocommon.sources
Andreas Schwab 87a7e49
Andreas Schwab 87a7e49
%ifarch %{biarcharches}
Andreas Schwab 87a7e49
9abcefa
# Add the source files to the core debuginfo package.
Andreas Schwab 87a7e49
cat debuginfocommon.sources >> debuginfo.filelist
Andreas Schwab 87a7e49
Andreas Schwab 87a7e49
%else
Andreas Schwab 87a7e49
cvsdist c381c23
%ifarch %{ix86}
Andreas Schwab 50a0037
%define basearch i686
cvsdist c381c23
%endif
cvsdist c381c23
%ifarch sparc sparcv9
cvsdist c381c23
%define basearch sparc
cvsdist c381c23
%endif
e0b4499
9abcefa
# The auxarches get only these few source files.
e0b4499
auxarches_debugsources=\
e0b4499
'/(generic|linux|%{basearch}|nptl(_db)?)/|/%{glibcsrcdir}/build|/dl-osinfo\.h'
e0b4499
9abcefa
# Place the source files into the core debuginfo pakcage.
e0b4499
egrep "$auxarches_debugsources" debuginfocommon.sources >> debuginfo.filelist
e0b4499
9abcefa
# Remove the source files from the common debuginfo package.
e0b4499
egrep -v "$auxarches_debugsources" \
ffc48ad
  debuginfocommon.sources >> debuginfocommon.filelist
e0b4499
8c7b7c2
%endif # %{biarcharches}
Andreas Schwab 87a7e49
9abcefa
# Add the list of *.a archives in the debug directory to
9abcefa
# the common debuginfo package.
e0b4499
list_debug_archives >> debuginfocommon.filelist
e0b4499
85447d4
# It happens that find-debuginfo.sh produces duplicate entries even
85447d4
# though the inputs are unique. Therefore we sort and unique the
85447d4
# entries in the debug file lists. This avoids the following warnings:
85447d4
# ~~~
85447d4
# Processing files: glibc-debuginfo-common-2.17.90-10.fc20.x86_64
85447d4
# warning: File listed twice: /usr/lib/debug/usr/sbin/build-locale-archive.debug
85447d4
# warning: File listed twice: /usr/lib/debug/usr/sbin/nscd.debug
85447d4
# warning: File listed twice: /usr/lib/debug/usr/sbin/zdump.debug
85447d4
# warning: File listed twice: /usr/lib/debug/usr/sbin/zic.debug
85447d4
# ~~~
85447d4
sort -u debuginfocommon.filelist > debuginfocommon2.filelist
85447d4
mv debuginfocommon2.filelist debuginfocommon.filelist
85447d4
9abcefa
%endif # %{debuginfocommonarches}
cvsdist c381c23
85447d4
# Remove any duplicates output by a buggy find-debuginfo.sh.
85447d4
sort -u debuginfo.filelist > debuginfo2.filelist
85447d4
mv debuginfo2.filelist debuginfo.filelist
85447d4
Siddhesh Poyarekar 7007495
# Remove some common directories from the common package debuginfo so that we
Siddhesh Poyarekar 7007495
# don't end up owning them.
Siddhesh Poyarekar 7007495
exclude_common_dirs()
Siddhesh Poyarekar 7007495
{
Siddhesh Poyarekar 7007495
	exclude_dirs="%{_prefix}/src/debug"
Siddhesh Poyarekar 7007495
	exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug{,/%{_lib},/bin,/sbin})"
Siddhesh Poyarekar 7007495
	exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug%{_prefix}{,/%{_lib},/libexec,/bin,/sbin})"
Siddhesh Poyarekar 7007495
Siddhesh Poyarekar 7007495
	for d in $(echo $exclude_dirs | sed 's/ /\n/g'); do
Siddhesh Poyarekar 7007495
		sed -i "\|^%%dir $d/\?$|d" $1
Siddhesh Poyarekar 7007495
	done
Siddhesh Poyarekar 7007495
}
Siddhesh Poyarekar 7007495
Siddhesh Poyarekar 7007495
%ifarch %{debuginfocommonarches}
Siddhesh Poyarekar 7007495
exclude_common_dirs debuginfocommon.filelist
Siddhesh Poyarekar 7007495
%endif
Siddhesh Poyarekar 7007495
exclude_common_dirs debuginfo.filelist
Siddhesh Poyarekar 7007495
9abcefa
%endif # 0%{?_enable_debug_packages}
e0b4499
9abcefa
# Remove the `dir' info-heirarchy file which will be maintained
9abcefa
# by the system as it adds info files to the install.
e0b4499
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
e0b4499
cvsdist c381c23
%ifarch %{auxarches}
e0b4499
9abcefa
# Delete files that we do not intended to ship with the auxarch.
cvsdist c381c23
echo Cutting down the list of unpackaged files
e0b4499
sed -e '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //;s#^/*##' \
02e8252
	common.filelist devel.filelist static.filelist headers.filelist \
02e8252
	utils.filelist nscd.filelist \
02e8252
%ifarch %{debuginfocommonarches}
02e8252
	debuginfocommon.filelist \
02e8252
%endif
02e8252
	| (cd $RPM_BUILD_ROOT; xargs --no-run-if-empty rm -f 2> /dev/null || :)
9abcefa
cfeb07d
%else
cfeb07d
cfeb07d
mkdir -p $RPM_BUILD_ROOT/var/{db,run}/nscd
9893fad
touch $RPM_BUILD_ROOT/var/{db,run}/nscd/{passwd,group,hosts,services}
cfeb07d
touch $RPM_BUILD_ROOT/var/run/nscd/{socket,nscd.pid}
2eb1503
8c7b7c2
%endif # %{auxarches}
cvsdist c381c23
3dbfe42
%ifnarch %{auxarches}
1d99c01
truncate -s 0 $RPM_BUILD_ROOT/%{_prefix}/lib/locale/locale-archive
3dbfe42
%endif
cvsdist 195182b
50740a3
mkdir -p $RPM_BUILD_ROOT/var/cache/ldconfig
1d99c01
truncate -s 0 $RPM_BUILD_ROOT/var/cache/ldconfig/aux-cache
50740a3
7448524
##############################################################################
7448524
# Run the glibc testsuite
7448524
##############################################################################
7448524
%check
7448524
%if %{run_glibc_tests}
f515946
f515946
# Run the glibc tests. If any tests fail to build we exit %check with an error
f515946
# of 1, otherwise we print the test failure list and the failed test output
f515946
# and exit with 0. In the future we want to compare against a baseline and
f515946
# exit with 1 if the results deviate from the baseline.
f515946
run_tests () {
f515946
	truncate -s 0 check.log
f515946
	tail -f check.log &
f515946
	tailpid=$!
f515946
	# Run the make a sub-shell (to avoid %check failing if make fails)
f515946
	# but capture the status for use later. We use the normal sub-shell
f515946
	# trick of printing the status. The actual result of the sub-shell
f515946
	# is the successful execution of the echo.
f515946
	status=$(set +e
f515946
		 make %{?_smp_mflags} check %{silentrules} > check.log 2>&1
f515946
		 status=$?
f515946
		 echo $status)
f515946
	# Wait for the tail to catch up with the output and then kill it.
f515946
	sleep 10
f515946
	kill $tailpid
f515946
	# Print the header, so we can find it, but skip the error printing
f515946
	# if there aren't any failrues.
f515946
	echo ===================FAILED TESTS=====================
f515946
	if [ $status -ne 0 ]; then
f515946
		# We are not running with `-k`, therefore a test build failure
f515946
		# terminates the test run and that terminates %check with an
f515946
		# error which terminates the build. We want this behaviour to
f515946
		# ensure that all tests build, and all tests run.
f515946
		# If the test result summary is not present it means one of
f515946
		# tests failed to build.
f515946
		if ! grep 'Summary of test results:' check.log; then
f515946
			echo "FAIL: Some glibc tests failed to build."
f515946
			exit 1
f515946
		fi
f515946
f515946
		# Print out information about all of the failed tests.
f515946
		grep -e ^FAIL -e ^ERROR tests.sum \
f515946
			| awk '{print $2}' \
f515946
			| while read testcase;
f515946
		do
f515946
			echo "$testcase"
f515946
			cat $testcase.out
f515946
			echo -------------------------
f515946
		done
f515946
	fi
f515946
}
f515946
7448524
# Increase timeouts
7448524
export TIMEOUTFACTOR=16
7448524
parent=$$
7448524
echo ====================TESTING=========================
7448524
##############################################################################
7448524
# - Test the default runtime.
7448524
##############################################################################
7448524
pushd build-%{target}
f515946
run_tests
7448524
popd
7448524
7448524
##############################################################################
7448524
# - Test the xen runtimes (nosegneg).
7448524
##############################################################################
7448524
%if %{buildxen}
7448524
echo ====================TESTING -mno-tls-direct-seg-refs=============
7448524
pushd build-%{target}-nosegneg
f515946
run_tests
7448524
popd
7448524
%endif
7448524
7448524
##############################################################################
7448524
# - Test the power6 runtimes.
7448524
##############################################################################
7448524
%if %{buildpower6}
7448524
echo ====================TESTING -mcpu=power6=============
7448524
pushd build-%{target}-power6
f515946
if [ -d ../power6emul ]; then
7448524
    export LD_PRELOAD=`cd ../power6emul; pwd`/\$LIB/power6emul.so
f515946
fi
f515946
run_tests
7448524
popd
7448524
%endif
7448524
echo ====================TESTING DETAILS=================
7448524
for i in `sed -n 's|^.*\*\*\* \[\([^]]*\.out\)\].*$|\1|p' build-*-linux*/check.log`; do
7448524
  echo =====$i=====
7448524
  cat $i || :
7448524
  echo ============
7448524
done
7448524
echo ====================TESTING END=====================
7448524
PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p'
7448524
echo ====================PLT RELOCS LD.SO================
7448524
readelf -Wr $RPM_BUILD_ROOT/%{_lib}/ld-*.so | sed -n -e "$PLTCMD"
7448524
echo ====================PLT RELOCS LIBC.SO==============
7448524
readelf -Wr $RPM_BUILD_ROOT/%{_lib}/libc-*.so | sed -n -e "$PLTCMD"
7448524
echo ====================PLT RELOCS END==================
7448524
8b04964
%if 0%{?run_valgrind_tests}
Siddhesh Poyarekar e9a7f4c
# Finally, check if valgrind runs with the new glibc.
Siddhesh Poyarekar e9a7f4c
# We want to fail building if valgrind is not able to run with this glibc so
Siddhesh Poyarekar e9a7f4c
# that we can then coordinate with valgrind to get it fixed before we update
Siddhesh Poyarekar e9a7f4c
# glibc.
Siddhesh Poyarekar e9a7f4c
pushd build-%{target}
Siddhesh Poyarekar e9a7f4c
elf/ld.so --library-path .:elf:nptl:dlfcn /usr/bin/valgrind \
Siddhesh Poyarekar e9a7f4c
	elf/ld.so --library-path .:elf:nptl:dlfcn /usr/bin/true
Siddhesh Poyarekar e9a7f4c
popd
Siddhesh Poyarekar e9a7f4c
%endif
Siddhesh Poyarekar e9a7f4c
7448524
%endif # %{run_glibc_tests}
7448524
7448524
Andreas Schwab 9603304
%pre -p <lua>
Andreas Schwab 9603304
-- Check that the running kernel is new enough
Andreas Schwab 9603304
required = '%{enablekernel}'
Andreas Schwab 7dc6703
rel = posix.uname("%r")
Andreas Schwab 7dc6703
if rpm.vercmp(rel, required) < 0 then
Andreas Schwab 7dc6703
  error("FATAL: kernel too old", 0)
Andreas Schwab 9603304
end
Andreas Schwab 9603304
63769b1
%post -p %{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu}
cvsdist c381c23
b8e4762
%postun -p /sbin/ldconfig
cvsdist c381c23
Carlos O'Donell e513279
%triggerin common -p <lua> -- glibc
Andreas Schwab 4dd080e
if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
Andreas Schwab 4dd080e
  pid = posix.fork()
Andreas Schwab 4dd080e
  if pid == 0 then
Carlos O'Donell e513279
    posix.exec("%{_prefix}/sbin/build-locale-archive", "--install-langs", rpm.expand("%%{_install_langs}"))
Andreas Schwab 4dd080e
  elseif pid > 0 then
Andreas Schwab 4dd080e
    posix.wait(pid)
Andreas Schwab 4dd080e
  end
Andreas Schwab 4dd080e
end
Andreas Schwab 4dd080e
Carlos O'Donell e513279
%post common -p <lua>
Andreas Schwab 4dd080e
if posix.access("/etc/ld.so.cache") then
Andreas Schwab 4dd080e
  if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
Andreas Schwab 4dd080e
    pid = posix.fork()
Andreas Schwab 4dd080e
    if pid == 0 then
Carlos O'Donell e513279
      posix.exec("%{_prefix}/sbin/build-locale-archive", "--install-langs", rpm.expand("%%{_install_langs}"))
Andreas Schwab 4dd080e
    elseif pid > 0 then
Andreas Schwab 4dd080e
      posix.wait(pid)
Andreas Schwab 4dd080e
    end
Andreas Schwab 4dd080e
  end
Andreas Schwab 4dd080e
end
cvsdist c381c23
cvsdist c381c23
%post devel
Andreas Schwab 713def3
/sbin/install-info %{_infodir}/libc.info.gz %{_infodir}/dir > /dev/null 2>&1 || :
cvsdist c381c23
cvsdist c381c23
%pre headers
cvsdist c381c23
# this used to be a link and it is causing nightmares now
cvsdist c381c23
if [ -L %{_prefix}/include/scsi ] ; then
ffc48ad
  rm -f %{_prefix}/include/scsi
cvsdist c381c23
fi
cvsdist c381c23
cvsdist c381c23
%preun devel
cvsdist c381c23
if [ "$1" = 0 ]; then
Andreas Schwab 713def3
  /sbin/install-info --delete %{_infodir}/libc.info.gz %{_infodir}/dir > /dev/null 2>&1 || :
cvsdist c381c23
fi
cvsdist c381c23
b8e4762
%post utils -p /sbin/ldconfig
cvsdist c381c23
b8e4762
%postun utils -p /sbin/ldconfig
cvsdist c381c23
cvsdist c381c23
%pre -n nscd
Andreas Schwab 08541d9
getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r nscd
Andreas Schwab 08541d9
getent passwd nscd >/dev/null ||
Andreas Schwab 08541d9
  /usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \
Andreas Schwab 08541d9
		    -c "NSCD Daemon" -u 28 -g nscd nscd
cvsdist c381c23
cvsdist c381c23
%post -n nscd
f8556b4
%systemd_post nscd.service
cvsdist c381c23
cvsdist c381c23
%preun -n nscd
f8556b4
%systemd_preun nscd.service
cvsdist c381c23
cvsdist c381c23
%postun -n nscd
Andreas Schwab 389eedc
if test $1 = 0; then
ffc48ad
  /usr/sbin/userdel nscd > /dev/null 2>&1 || :
cvsdist c381c23
fi
f8556b4
%systemd_postun_with_restart nscd.service
cvsdist c381c23
a9d8ca8
%if %{xenpackage}
b8e4762
%post xen -p /sbin/ldconfig
b8e4762
%postun xen -p /sbin/ldconfig
a9d8ca8
%endif
a9d8ca8
cvsdist c381c23
%clean
cvsdist c381c23
rm -rf "$RPM_BUILD_ROOT"
cvsdist c381c23
rm -f *.filelist*
cvsdist c381c23
cvsdist c381c23
%files -f rpm.filelist
cvsdist c381c23
%defattr(-,root,root)
63769b1
%dir %{_prefix}/%{_lib}/audit
52b0ac1
%ifarch %{rtkaioarches}
b8e4762
%dir /%{_lib}/rtkaio
52b0ac1
%endif
a9d8ca8
%if %{buildxen} && !%{xenpackage}
b8e4762
%dir /%{_lib}/%{nosegneg_subdir_base}
b8e4762
%dir /%{_lib}/%{nosegneg_subdir}
52b0ac1
%ifarch %{rtkaioarches}
b8e4762
%dir /%{_lib}/rtkaio/%{nosegneg_subdir_base}
b8e4762
%dir /%{_lib}/rtkaio/%{nosegneg_subdir}
52b0ac1
%endif
a9d8ca8
%endif
18aa46f
%if %{buildpower6}
b8e4762
%dir /%{_lib}/power6
b8e4762
%dir /%{_lib}/power6x
18aa46f
%ifarch %{rtkaioarches}
b8e4762
%dir /%{_lib}/rtkaio/power6
b8e4762
%dir /%{_lib}/rtkaio/power6x
18aa46f
%endif
18aa46f
%endif
cvsdist c381c23
%ifarch s390x
b8e4762
/lib/ld64.so.1
cvsdist c381c23
%endif
bf6cb48
%ifarch armv7hl armv7hnl
b8e4762
/lib/ld-linux.so.3
69de141
%endif
cvsdist c381c23
%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf
cvsdist c381c23
%verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf
Andreas Schwab 809a543
%verify(not md5 size mtime) %config(noreplace) /etc/rpc
cvsdist 195182b
%dir /etc/ld.so.conf.d
ef031de
%dir %{_prefix}/libexec/getconf
0d1d15d
%dir %{_libdir}/gconv
50740a3
%dir %attr(0700,root,root) /var/cache/ldconfig
50740a3
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/cache/ldconfig/aux-cache
cvsdist 4a201b7
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache
Andreas Schwab d047b37
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf
01a2098
%doc README NEWS INSTALL BUGS PROJECTS CONFORMANCE elf/rtld-debugger-interface.txt
e653c3c
%{!?_licensedir:%global license %%doc}
e653c3c
%license COPYING COPYING.LIB LICENSES
cvsdist c381c23
%doc hesiod/README.hesiod
cvsdist c381c23
a9d8ca8
%if %{xenpackage}
a9d8ca8
%files -f nosegneg.filelist xen
a9d8ca8
%defattr(-,root,root)
b8e4762
%dir /%{_lib}/%{nosegneg_subdir_base}
b8e4762
%dir /%{_lib}/%{nosegneg_subdir}
a9d8ca8
%endif
a9d8ca8
cvsdist c381c23
%ifnarch %{auxarches}
cvsdist c381c23
%files -f common.filelist common
cvsdist c381c23
%defattr(-,root,root)
111d75b
%dir %{_prefix}/lib/locale
dd028df
%dir %{_prefix}/lib/locale/C.utf8
dd028df
%{_prefix}/lib/locale/C.utf8/*
50740a3
%attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive.tmpl
cvsdist 195182b
%attr(0644,root,root) %verify(not md5 size mtime mode) %ghost %config(missingok,noreplace) %{_prefix}/lib/locale/locale-archive
45fdec0
%dir %attr(755,root,root) /etc/default
45fdec0
%verify(not md5 size mtime) %config(noreplace) /etc/default/nss
cvsdist c381c23
%doc documentation/*
cvsdist c381c23
cvsdist c381c23
%files -f devel.filelist devel
cvsdist c381c23
%defattr(-,root,root)
cvsdist c381c23
65bf1c4
%files -f static.filelist static
65bf1c4
%defattr(-,root,root)
65bf1c4
cvsdist c381c23
%files -f headers.filelist headers
cvsdist c381c23
%defattr(-,root,root)
cvsdist c381c23
cvsdist c381c23
%files -f utils.filelist utils
cvsdist c381c23
%defattr(-,root,root)
cvsdist c381c23
cvsdist c381c23
%files -f nscd.filelist -n nscd
cvsdist c381c23
%defattr(-,root,root)
cvsdist c381c23
%config(noreplace) /etc/nscd.conf
cfeb07d
%dir %attr(0755,root,root) /var/run/nscd
cfeb07d
%dir %attr(0755,root,root) /var/db/nscd
b8e4762
/lib/systemd/system/nscd.service
b8e4762
/lib/systemd/system/nscd.socket
Siddhesh Poyarekar 944ed51
%{_tmpfilesdir}/nscd.conf
cfeb07d
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid
cfeb07d
%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket
cfeb07d
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd
cfeb07d
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group
cfeb07d
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts
9893fad
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/services
cfeb07d
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/passwd
cfeb07d
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/group
cfeb07d
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/hosts
9893fad
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/services
63b6b66
%ghost %config(missingok,noreplace) /etc/sysconfig/nscd
cvsdist c381c23
%endif
cvsdist c381c23
Andreas Schwab 237bb90
%if 0%{?_enable_debug_packages}
cvsdist c381c23
%files debuginfo -f debuginfo.filelist
cvsdist c381c23
%defattr(-,root,root)
cvsdist c381c23
%ifarch %{debuginfocommonarches}
cvsdist c381c23
%ifnarch %{auxarches}
cvsdist c381c23
%files debuginfo-common -f debuginfocommon.filelist
cvsdist c381c23
%defattr(-,root,root)
cvsdist c381c23
%endif
cvsdist c381c23
%endif
cvsdist c381c23
%endif
cvsdist c381c23
Siddhesh Poyarekar 67b30d7
%if %{build_benchtests}
Siddhesh Poyarekar 67b30d7
%files benchtests -f benchtests.filelist
Siddhesh Poyarekar 67b30d7
%defattr(-,root,root)
Siddhesh Poyarekar 67b30d7
%endif
Siddhesh Poyarekar 67b30d7
cvsdist c381c23
%changelog
4c57cf5
* Fri May  6 2016 Florian Weimer <fweimer@redhat.com> - 2.22-14
4c57cf5
- Fix getnameinfo memory leak and incorrect truncation (#1333901)
6ca2fbe
- CVE-2016-1234: buffer overflow in glob with GLOB_ALTDIRFUNC (#1315648)
53d6baa
- Set dlerror after dlsym (RTLD_NEXT) failure (#1333945)
4c57cf5
8ef83de
* Fri May  6 2016 Florian Weimer <fweimer@redhat.com> - 2.22-13
8ef83de
- Avoid build failure in TZ tests (#1333940)
8ef83de
62f2d36
* Fri May  6 2016 Florian Weimer <fweimer@redhat.com> - 2.22-12
62f2d36
- Fix heap-based buffer overflow in get_txt_records (#1332912)
116e17a
- CVE-2016-3075: Stack overflow in _nss_dns_getnetbyname_r (#1321954)
217d136
- April 2016 nss_dns hardening (#1332914)
79cd021
- Fix elf/tst-audit10 and elf/tst-audit4 failures (#1313404)
84517e1
- nss_db: Fix handling of long entries (#1321861)
d277a9b
- resolv: Fix NULL pointer dereference with unconnectable address (#1316972)
62f2d36
dd028df
* Wed Mar 02 2016 Mike FABIAN <mfabian@redhat.com> - 2.22-11
dd028df
- Add the C.UTF-8 locale
dd028df
e8497bf
* Fri Feb 19 2016 Florian Weimer <fweimer@redhat.com> - 2.22-10
e8497bf
- Fix socket system call selection on s390x (#1310168).
431c99d
- Remove stray newline from Serbian locales (#1114591).
e8497bf
9f1734e
* Tue Feb 16 2016 Florian Weimer <fweimer@redhat.com> - 2.22-9
9f1734e
- CVE-2015-7547: Stack-based buffer overflow in getaddrinfo (#1308943).
9f1734e
73fbe41
* Mon Feb 15 2016 Florian Weimer <fweimer@redhat.com> - 2.22-8
73fbe41
- Revert upstream commit 2212c1420c92a33b0e0bd9a34938c9814a56c0f7 (#1252570).
73fbe41
74847c7
* Mon Jan  4 2016 Florian Weimer <fweimer@redhat.com> - 2.22-7
74847c7
- Update glibc-rh1276112.patch to include backports to fix
74847c7
  upstream bugs 19243 and 19182.  (#1295189)
74847c7
e8f4ba5
* Sat Dec  5 2015 Florian Weimer <fweimer@redhat.com> - 2.22-6
e8f4ba5
- Re-enable large file support in openat.  (#1288662)
67d1373
- Apply additional pointer guard hardening.  (#1276761)
e8f4ba5
Carlos O'Donell 7a808bc
* Mon Nov  9 2015 Carlos O'Donell <carlos@redhat.com> - 2.22-5
Carlos O'Donell 7a808bc
- Remove invalid strcoll optimization (#1276711).
Carlos O'Donell 7a808bc
6fbf955
* Fri Oct 30 2015 Florian Weimer <fweimer@redhat.com> - 2.22-4
6fbf955
- Prevent malloc arena free list from becoming cyclic.  (#1276112)
6fbf955
26f4d28
* Wed Sep 16 2015 Mike FABIAN <mfabian@redhat.com> - 2.22-3
26f4d28
- build-locale-archive sometimes created empty archives (fixed by David Shea) (#1262040)
26f4d28
Siddhesh Poyarekar a0be169
* Fri Aug 14 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.22-2
Siddhesh Poyarekar a0be169
- Remove initgroups from default nsswitch.conf (#751450).
Siddhesh Poyarekar a0be169
Siddhesh Poyarekar 9af85e6
* Tue Jul 28 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.21.90-21
Siddhesh Poyarekar 9af85e6
- Auto-sync with upstream master.
Siddhesh Poyarekar 9af85e6
Siddhesh Poyarekar c2535df
* Mon Jul 27 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.12.90-20
Siddhesh Poyarekar c2535df
- Back out new condvar implementation.
Siddhesh Poyarekar c2535df
706a051
* Thu Jul 23 2015 Mike FABIAN <mfabian@redhat.com> - 2.21.90-19
706a051
- some more additions to the translit_neutral file by Marko Myllynen
706a051
dbf5f70
* Tue Jul 14 2015 Mike FABIAN <mfabian@redhat.com> - 2.21.90-18
37b7dfd
- Unicode 8.0.0 updates, including the transliteration files (#1238412).
dbf5f70
Carlos O'Donell 2542c05
* Sun Jun 21 2015 Carlos O'Donell <carlos@redhat.com> - 2.21.90-17
Carlos O'Donell 2542c05
- Remove all linuxthreads handling from glibc spec file.
Carlos O'Donell 2542c05
Carlos O'Donell e63fda9
* Wed Jun 17 2015 Carlos O'Donell <carlos@redhat.com> - 2.21.90-16
Carlos O'Donell e63fda9
- Move split out architecture-dependent header files into devel package
Carlos O'Donell e63fda9
  and keep generic variant in headers package, thus keeping headers package
Carlos O'Donell e63fda9
  content and file list identical across multilib rpms.
Carlos O'Donell e63fda9
5ee623b
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.21.90-15.1
5ee623b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5ee623b
Carlos O'Donell 1c7c723
* Wed Jun  3 2015 Carlos O'Donell <carlos@redhat.com> - 2.21.90-15
Carlos O'Donell 1c7c723
- Remove patch to increase DTV surplus which is no longer needed after
Carlos O'Donell 1c7c723
  upstream commit f8aeae347377f3dfa8cbadde057adf1827fb1d44.
Carlos O'Donell 1c7c723
Siddhesh Poyarekar 8178d6f
* Sat May 30 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.21.90-14
Siddhesh Poyarekar 8178d6f
- Fix build failure on aarch64 (#1226459).
Siddhesh Poyarekar 8178d6f
Siddhesh Poyarekar 7047693
* Mon May 18 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.21.90-13
Siddhesh Poyarekar 7047693
- Sync with upstream master.
Siddhesh Poyarekar a7f6b6e
- Install new condvar implementation.
Siddhesh Poyarekar 7047693
Siddhesh Poyarekar 67b30d7
* Fri May 08 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.21.90-12
Siddhesh Poyarekar 67b30d7
- Add benchmark comparison scripts.
Siddhesh Poyarekar 67b30d7
Siddhesh Poyarekar adbfe47
* Thu May 07 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.21.90-11
Siddhesh Poyarekar adbfe47
- Auto-sync with upstream master.
Siddhesh Poyarekar adbfe47
- Revert arena threshold fix to work around #1209451.
Siddhesh Poyarekar adbfe47
Siddhesh Poyarekar 943a064
* Tue Apr 07 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.21.90-10
Siddhesh Poyarekar 943a064
- Revert last auto-sync (#1209451).
Siddhesh Poyarekar 943a064
Siddhesh Poyarekar 3d147ac
* Mon Apr 06 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.21.90-9
Siddhesh Poyarekar 3d147ac
- Auto-sync with upstream master.
Siddhesh Poyarekar 3d147ac
Siddhesh Poyarekar 85b5421
* Tue Mar 24 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.21.90-8
Siddhesh Poyarekar 85b5421
- Auto-sync with upstream master.
Siddhesh Poyarekar 85b5421
Carlos O'Donell e513279
* Tue Mar 17 2015 Carlos O'Donell <carlos@redhat.com> - 2.21.90-7
Carlos O'Donell e513279
- Use rpm.expand in scripts to reduce set of required RPM features.
Carlos O'Donell e513279
Siddhesh Poyarekar ca47b31
* Thu Mar 12 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.21.90-6
Siddhesh Poyarekar ca47b31
- Auto-sync with upstream master.
Siddhesh Poyarekar ca47b31
Carlos O'Donell 91764bd
* Tue Mar  3 2015 Mike Fabian <mfabian@redhat.com> - 2.21.90-5
Carlos O'Donell 91764bd
- Support installing only those locales specified by the RPM macro
Carlos O'Donell 91764bd
  %%_install_langs (#156477).
Carlos O'Donell 91764bd
Siddhesh Poyarekar 5c97909
* Mon Feb 23 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.21.90-4
Siddhesh Poyarekar 5c97909
- Auto-sync with upstream master.
Siddhesh Poyarekar 5c97909
6e81b3f
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 2.21.90-3.1
6e81b3f
- Rebuilt for Fedora 23 Change
6e81b3f
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
6e81b3f
Carlos O'Donell e03dd62
* Thu Feb 12 2015 Carlos O'Donell <carlos@systemhalted.org> - 2.21.90-3
Carlos O'Donell e03dd62
- Fix missing clock_* IFUNCs in librtkaio.
Carlos O'Donell e03dd62
Carlos O'Donell c6d44c9
* Thu Feb 12 2015 Carlos O'Donell <carlos@systemhalted.org> - 2.21.90-2
Carlos O'Donell c6d44c9
- Auto-sync with upstream master.
Carlos O'Donell c6d44c9
Carlos O'Donell 85a0930
* Wed Feb 11 2015 Carlos O'Donell <carlos@systemhalted.org> - 2.21.90-1
Carlos O'Donell 85a0930
- Add back x86 vDSO support.
Carlos O'Donell 85a0930
- Fix rtkaio build to reference clock_* functions from libc.
Carlos O'Donell 85a0930
Siddhesh Poyarekar 5d3d5d4
* Wed Jan 21 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.20.90-20
Siddhesh Poyarekar 5d3d5d4
- Sync with upstream master.
Siddhesh Poyarekar 5d3d5d4
- Disable werror on s390x.
Siddhesh Poyarekar a086cd2
- Revert x86 vDSO support since it breaks i686 rtkaio build.
Siddhesh Poyarekar 5d3d5d4
20d87df
* Tue Jan 20 2015 Peter Robinson <pbrobinson@fedoraproject.org> 2.20.90-19
20d87df
- Drop large ancient ChangeLogs (rhbz #1169546)
20d87df
Siddhesh Poyarekar 2415b86
* Mon Jan 12 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.20.90-18
Siddhesh Poyarekar 2415b86
- Pass address of main_arena.mutex to mutex_lock/unlock.
Siddhesh Poyarekar 2415b86
Siddhesh Poyarekar 84d3407
* Thu Jan 08 2015 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.20.90-17
Siddhesh Poyarekar 84d3407
- Define a __tls_get_addr macro to avoid a conflicting declaration.
Siddhesh Poyarekar 84d3407
Siddhesh Poyarekar 80f4152
* Wed Jan 07 2015 Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> - 2.20.90-16
Siddhesh Poyarekar 80f4152
- Disable -Werror for s390 as well.
Siddhesh Poyarekar 80f4152
Siddhesh Poyarekar 6105e83
* Wed Jan 07 2015 Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> - 2.20.90-14
Siddhesh Poyarekar 6105e83
- Sync with upstream master.
Siddhesh Poyarekar 6105e83
- Disable -Werror on powerpc and armv7hl.
Siddhesh Poyarekar 6105e83
- Temporarily disable valgrind test on ppc64.
Siddhesh Poyarekar 6105e83
8b04964
* Sun Dec 28 2014 Dan Horák <dan[at]danny.cz>
8b04964
- valgrind available only on selected arches (missing on s390)
8b04964
Kyle McMartin fd8c9e7
* Wed Dec 10 2014 Kyle McMartin <kmcmarti@redhat.com>
Kyle McMartin fd8c9e7
- aarch64: Drop strchrnul.S revert, apply fix from Richard Earnshaw.
Kyle McMartin fd8c9e7
c13214a
* Fri Dec 05 2014 Carlos O'Donell <carlos@redhat.com> - 2.20.90-13
c13214a
- Fix permission of debuginfo source files to allow multiarch
c13214a
  debuginfo packages to be installed and upgraded.
c13214a
c13214a
* Fri Dec 05 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.20.90-12
Siddhesh Poyarekar e7f91b5
- Remove LIB_LANG since we don't install locales in /usr/lib/locale anymore.
Siddhesh Poyarekar 0cda723
- Don't own any directories in /usr/share/locale (#1167445).
Siddhesh Poyarekar 0cda723
- Use the %%find_lang macro to get the *.mo files (#1167445).
Siddhesh Poyarekar 7728cb8
- Add %%lang tags to language locale files in /usr/share/i18n/locale (#1169044).
Siddhesh Poyarekar a9ff8be
Kyle McMartin eb16415
* Wed Dec 03 2014 Kyle McMartin <kyle@fedoraproject.org> - 2.20.90-11
Kyle McMartin eb16415
- aarch64: revert optimized strchrnul.S implementation (rhbz#1167501)
Kyle McMartin eb16415
  until it can be debugged.
Kyle McMartin eb16415
66b39fa
* Fri Nov 28 2014 Carlos O'Donell <carlos@redhat.com> - 2.20.90-10
66b39fa
- Auto-sync with upstream master.
66b39fa
ce126e1
* Wed Nov 19 2014 Carlos O'Donell <carlos@redhat.com> - 2.20.90-9
ce126e1
- Sync with upstream master.
ce126e1
Siddhesh Poyarekar b80bba4
* Wed Nov 05 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.20.90-8
Siddhesh Poyarekar b80bba4
- Make getconf return only /usr/bin (#1138835).
Siddhesh Poyarekar 5c361d9
- Sync with upstream master.
Siddhesh Poyarekar b80bba4
88659d3
* Tue Nov 04 2014 Arjun Shankar <arjun.is@lostca.se> - 2.20.90-7
88659d3
- Add patch that modifies several tests to use test-skeleton.c.
88659d3
  The patch is accepted but not yet committed upstream.
88659d3
  https://sourceware.org/ml/libc-alpha/2014-10/msg00744.html
88659d3
f8be71c
* Tue Sep 30 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.20.90-6
Siddhesh Poyarekar a391f0c
- Sync with upstream master.
f8be71c
- Disable more Intel TSX usage in rwlocks (#1146967).
Siddhesh Poyarekar 49b191c
- Enable lock elision again on s390 and s390x.
Siddhesh Poyarekar 484979c
- Enable Systemtap SDT probes for all architectures (#985109).
f8be71c
f515946
* Fri Sep 26 2014 Carlos O'Donell <carlos@redhat.com> - 2.20.90-5
f515946
- Disable lock elision support for Intel hardware until microcode
f515946
  updates can be done in early bootup (#1146967).
f515946
- Fix building test tst-strtod-round for ARM.
f515946
Siddhesh Poyarekar 7007495
* Tue Sep 23 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.20.90-4
Siddhesh Poyarekar a5b5c3d
- Sync with upstream master.
Siddhesh Poyarekar 7007495
- Don't own the common debuginfo directories (#1144853).
Siddhesh Poyarekar e9a7f4c
- Run valgrind in the %%check section to ensure that it does not break.
Siddhesh Poyarekar 7007495
Siddhesh Poyarekar 7ba0787
* Tue Sep 16 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.20.90-3
Siddhesh Poyarekar 7ba0787
- Sync with upstream master.
Siddhesh Poyarekar 7ba0787
- Revert patch for #737223.
Siddhesh Poyarekar 7ba0787
Siddhesh Poyarekar afa87a3
* Mon Sep 08 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.20.90-2
Siddhesh Poyarekar afa87a3
- Build build-locale-archive statically again.
Siddhesh Poyarekar afa87a3
Siddhesh Poyarekar 680bff1
* Mon Sep 08 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.20.90-1
Siddhesh Poyarekar 680bff1
- Sync with upstream master.
Siddhesh Poyarekar 680bff1
7448524
* Thu Sep  4 2014 Carlos O'Donell <carlos@redhat.com> - 2.19.90-36
7448524
- Allow up to 32 dlopened modules to use static TLS (#1124987).
7448524
- Run glibc tests in %%check section of RPM spec file.
7448524
- Do not run tests with `-k` and fail if any test fails to build.
7448524
Siddhesh Poyarekar f64bffe
* Tue Aug 26 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-35
Siddhesh Poyarekar f64bffe
- Sync with upstream master.
Siddhesh Poyarekar f64bffe
- Use INTERNAL_SYSCALL in TLS_INIT_TP (#1133134).
Siddhesh Poyarekar f64bffe
- Remove gconv loadable module transliteration support (CVE-2014-5119, #1119128).
Siddhesh Poyarekar f64bffe
6776785
* Fri Aug 22 2014 Dennis Gilmore <dennis@ausil.us> - 2.19.90-34
6776785
- add back sss to nsswitch.conf we have added workarounds in the tools
6776785
d0b1601
* Thu Aug 21 2014 Kevin Fenzi <kevin@scrye.com> - 2.19.90-33.1
d0b1601
- Rebuild for rpm bug 1131960
d0b1601
87e4cc7
* Tue Aug 19 2014 Dennis Gilmore <dennis@ausil.us> - 2.19.90-33
87e4cc7
- remove sss from default nsswitch.conf it causes issues with live image composing
87e4cc7
Siddhesh Poyarekar 75bedb0
* Wed Aug 13 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-32
Siddhesh Poyarekar 75bedb0
- Auto-sync with upstream master.
Siddhesh Poyarekar 75bedb0
- Revert to only defining __extern_always_inline for g++-4.3+.
Siddhesh Poyarekar 75bedb0
- Fix build failure in compat-gcc-32 (#186410).
Siddhesh Poyarekar 75bedb0
Siddhesh Poyarekar d579c1a
* Mon Jul 28 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-31
Siddhesh Poyarekar d579c1a
- Auto-sync with upstream master.
Siddhesh Poyarekar d579c1a
Siddhesh Poyarekar 3cb7ba0
* Wed Jul 23 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-30
Siddhesh Poyarekar 2ca89ea
- Undo last master sync to fix up rawhide.
Siddhesh Poyarekar 2ca89ea
Siddhesh Poyarekar c54d242
* Tue Jul 15 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-29
Siddhesh Poyarekar c54d242
- Auto-sync with upstream master.
Siddhesh Poyarekar c54d242
e653c3c
* Sat Jul 12 2014 Tom Callaway <spot@fedoraproject.org> - 2.19.90-28
e653c3c
- fix license handling
e653c3c
Siddhesh Poyarekar dc2e7c6
* Mon Jul 07 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-27
Siddhesh Poyarekar dc2e7c6
- Auto-sync with upstream master.
Siddhesh Poyarekar dc2e7c6
Siddhesh Poyarekar 1779efa
* Fri Jul 04 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-26
Siddhesh Poyarekar 1779efa
- Sync with upstream roland/nptl branch.
Siddhesh Poyarekar 1779efa
- Improve testsuite failure outputs in build.log
Siddhesh Poyarekar 1779efa
Siddhesh Poyarekar 1ea305b
* Thu Jul 03 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-25
Siddhesh Poyarekar 1ea305b
- Sync with upstream roland/nptl branch.
Siddhesh Poyarekar 1ea305b
Siddhesh Poyarekar 191c4db
* Wed Jul 02 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-24
Siddhesh Poyarekar 191c4db
- Sync with upstream master.
Siddhesh Poyarekar 191c4db
Siddhesh Poyarekar 9eb38c1
* Tue Jun 24 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-23
Siddhesh Poyarekar 9eb38c1
- Sync with upstream master.
Siddhesh Poyarekar 9eb38c1
- Add fix to unbreak i386 ABI breakage due to a change in scalbn.
Siddhesh Poyarekar 9eb38c1
Kyle McMartin b66a135
* Fri Jun 20 2014 Kyle McMartin <kmcmarti@redhat.com> - 2.19.90-22
Kyle McMartin b66a135
- AArch64: Save & restore NZCV (flags) upon entry to _dl_tlsdesc_dynamic
Kyle McMartin b66a135
  in order to work around GCC reordering compares across the TLS
Kyle McMartin b66a135
  descriptor sequence (GCC PR61545.) Committing a (temporary) fix here
Kyle McMartin b66a135
  allows us to avoid rebuilding the world with gcc 4.9.0-11.fc21.
Kyle McMartin b66a135
Kyle McMartin a0c2da6
* Mon Jun 16 2014 Kyle McMartin <kmcmarti@redhat.com> - 2.19.90-21
Kyle McMartin a0c2da6
- Auto-sync with upstream master.
Kyle McMartin a0c2da6
Siddhesh Poyarekar 8f0eca5
* Thu Jun 12 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-20
Siddhesh Poyarekar 8f0eca5
- Auto-sync with upstream master.
Siddhesh Poyarekar 8f0eca5
19b41eb
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.19.90-19.1
19b41eb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
19b41eb
Siddhesh Poyarekar 9d331e9
* Tue Jun 03 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-19
Siddhesh Poyarekar 9d331e9
- Sync with upstream master.
Siddhesh Poyarekar 9d331e9
Siddhesh Poyarekar 8710f4a
* Mon May 26 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-18
Siddhesh Poyarekar 8710f4a
- Sync with upstream master.
Siddhesh Poyarekar 8da75f6
- Adjust rtkaio patches to build with upstream master.
Siddhesh Poyarekar 8710f4a
Kyle McMartin b39b864
* Wed May 21 2014 Kyle McMartin <kyle@fedoraproject.org> - 2.19.90-17
Kyle McMartin b39b864
- Backport some upstream-wards patches to fix TLS issues on AArch64.
Kyle McMartin b39b864
Kyle McMartin abfaca5
* Wed May 21 2014 Kyle McMartin <kyle@fedoraproject.org> - 2.19.90-16
Kyle McMartin abfaca5
- AArch64: Fix handling of nocancel syscall failures (#1098327)
Kyle McMartin abfaca5
Siddhesh Poyarekar 25cc206
* Thu May 15 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-15
Siddhesh Poyarekar 25cc206
- Sync with upstream master.
Siddhesh Poyarekar 25cc206
647ffb7
* Wed May 14 2014 Carlos O'Donell <carlos@redhat.com> - 2.19.90-14
647ffb7
- Add support for displaying all test results in build logs.
647ffb7
cffaeb6
* Wed May 14 2014 Carlos O'Donell <carlos@redhat.com> - 2.19.90-13
cffaeb6
- Add initial support for ppc64le.
cffaeb6
Siddhesh Poyarekar f0de90d
* Tue Apr 29 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-12
Siddhesh Poyarekar f0de90d
- Auto-sync with upstream master.
Siddhesh Poyarekar 543337e
- Remove ports addon.
Siddhesh Poyarekar f0de90d
Siddhesh Poyarekar 4d17ec2
* Fri Apr 18 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-11
Siddhesh Poyarekar 4d17ec2
- Sync with upstream master.
Siddhesh Poyarekar 4d17ec2
Siddhesh Poyarekar c899b49
* Thu Apr 10 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-10
Siddhesh Poyarekar c899b49
- Sync with upstream master.
Siddhesh Poyarekar c899b49
Siddhesh Poyarekar b5ec002
* Thu Apr 03 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-9
Siddhesh Poyarekar b5ec002
- Sync with upstream master.
Siddhesh Poyarekar b5ec002
Siddhesh Poyarekar e7c5d54
* Wed Mar 26 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-8
Siddhesh Poyarekar e7c5d54
- Sync with upstream master.
Siddhesh Poyarekar e7c5d54
Siddhesh Poyarekar b7b25cd
* Wed Mar 19 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-7
Siddhesh Poyarekar b7b25cd
- Sync with upstream master.
Siddhesh Poyarekar b7b25cd
- Fix offset computation for append+ mode on switching from read (#1078355).
Siddhesh Poyarekar b7b25cd
43bff16
* Wed Mar 12 2014 Carlos O'Donell <carlos@redhat.com> - 2.19.90-6
43bff16
- Sync with upstream master.
43bff16
- Use cleaner upstream solution for -ftree-loop-distribute-patterns (#911307).
43bff16
Siddhesh Poyarekar 51574b2
* Tue Mar 04 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-5
Siddhesh Poyarekar 51574b2
- Sync with upstream master.
Siddhesh Poyarekar 51574b2
Siddhesh Poyarekar bdbcf83
* Thu Feb 27 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-4
Siddhesh Poyarekar bdbcf83
- Use nscd service files from glibc sources.
Siddhesh Poyarekar bdbcf83
- Make nscd service forking in systemd service file.
Siddhesh Poyarekar bdbcf83
Siddhesh Poyarekar 52f69e7
* Tue Feb 25 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-3
Siddhesh Poyarekar 52f69e7
- Sync with upstream master.
Siddhesh Poyarekar 52f69e7
- Separate ftell from fseek logic and avoid modifying FILE data (#1069559).
Siddhesh Poyarekar 52f69e7
eaa1d42
* Mon Feb 24 2014 Carlos O'Donell <carlos@redhat.com> - 2.19.90-2
eaa1d42
- Fix build-locale-archive failure to open default template.
eaa1d42
Siddhesh Poyarekar 372014c
* Tue Feb 18 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.19.90-1
Siddhesh Poyarekar 372014c
- Sync with upstream master.
Siddhesh Poyarekar 372014c
Siddhesh Poyarekar c90adf8
* Tue Feb 04 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.18.90-27
Siddhesh Poyarekar c90adf8
- Sync with upstream master.
Siddhesh Poyarekar c90adf8
Siddhesh Poyarekar 80e87fc
* Wed Jan 29 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.18.90-26
Siddhesh Poyarekar 80e87fc
- Modify regular expressions to include powerpcle stubs-*.h (#1058258).
Siddhesh Poyarekar 80e87fc
Siddhesh Poyarekar 68ca569
* Wed Jan 29 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.18.90-25
Siddhesh Poyarekar ef2183c
- Sync with upstream master.
Siddhesh Poyarekar 68ca569
Siddhesh Poyarekar 56fa240
* Sat Jan 25 2014 Ville Skyttä <ville.skytta@iki.fi> - 2.18.90-24
111d75b
- Own the %%{_prefix}/lib/locale dir.
111d75b
Siddhesh Poyarekar e74f409
* Thu Jan 23 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.18.90-23
Siddhesh Poyarekar e74f409
- Sync with upstream master.
Siddhesh Poyarekar e74f409
Siddhesh Poyarekar 0a210cc
* Thu Jan 16 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.18.90-22
Siddhesh Poyarekar 0a210cc
- Back out ftell test case (#1052846).
Siddhesh Poyarekar 0a210cc
Siddhesh Poyarekar 8ecbeeb
* Tue Jan 14 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.18.90-21
Siddhesh Poyarekar 8ecbeeb
- Sync with upstream master.
Siddhesh Poyarekar 8ecbeeb
- Fix infinite loop in ftell when writing wide char data (#1052846).
Siddhesh Poyarekar 8ecbeeb
Siddhesh Poyarekar 216cf91
* Tue Jan  7 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.18.90-20
Siddhesh Poyarekar 216cf91
- Sync with upstream master.
Siddhesh Poyarekar 216cf91
- Enable systemtap probes on Power and S/390.