9dc918
%define glibcsrcdir glibc-2.27-36-g55ad82e45c
Carlos O'Donell 587bed
%define glibcversion 2.27
9dc918
%define glibcrelease 7%{?dist}
Siddhesh Poyarekar 581723
# Pre-release tarballs are pulled in from git using a command that is
Siddhesh Poyarekar 581723
# effectively:
Siddhesh Poyarekar 581723
#
Siddhesh Poyarekar 581723
# git archive HEAD --format=tar --prefix=$(git describe --match 'glibc-*')/ \
Siddhesh Poyarekar 581723
#	> $(git describe --match 'glibc-*').tar
Siddhesh Poyarekar 581723
# gzip -9 $(git describe --match 'glibc-*').tar
Siddhesh Poyarekar 581723
#
Siddhesh Poyarekar 581723
# glibc_release_url is only defined when we have a release tarball.
3bd5cf
%{lua: if string.match(rpm.expand("%glibcsrcdir"), "^glibc%-[0-9.]+$") then
3bd5cf
  rpm.define("glibc_release_url https://ftp.gnu.org/gnu/glibc/") end}
9abcef
##############################################################################
c57221
# We support the following options:
Carlos O'Donell 6e8e9f
# --with/--without,
Carlos O'Donell 6e8e9f
# * testsuite - Running the testsuite.
Carlos O'Donell 6e8e9f
# * benchtests - Running and building benchmark subpackage.
Carlos O'Donell 6e8e9f
# * bootstrap - Bootstrapping the package.
Carlos O'Donell 6e8e9f
# * werror - Build with -Werror
Carlos O'Donell 6e8e9f
# * docs - Build with documentation and the required dependencies.
Carlos O'Donell 6e8e9f
# * valgrind - Run smoke tests with valgrind to verify dynamic loader.
Carlos O'Donell 6e8e9f
#
Carlos O'Donell 6e8e9f
# You must always run the testsuite for production builds.
Carlos O'Donell 6e8e9f
# Default: Always run the testsuite.
Carlos O'Donell 6e8e9f
%bcond_without testsuite
Carlos O'Donell 6e8e9f
# Default: Always build the benchtests.
Carlos O'Donell 6e8e9f
%bcond_without benchtests
Carlos O'Donell 6e8e9f
# Default: Not bootstrapping.
Carlos O'Donell 6e8e9f
%bcond_with bootstrap
Carlos O'Donell 6e8e9f
# Default: Enable using -Werror
Carlos O'Donell 6e8e9f
%bcond_without werror
Carlos O'Donell 6e8e9f
# Default: Always build documentation.
Carlos O'Donell 6e8e9f
%bcond_without docs
Carlos O'Donell 6e8e9f
# Default: Always run valgrind tests
Carlos O'Donell 6e8e9f
%bcond_without valgrind
Carlos O'Donell 6e8e9f
Carlos O'Donell 6e8e9f
# Run a valgrind smoke test to ensure that the release is compatible and
Carlos O'Donell 6e8e9f
# doesn't any new feature that might cause valgrind to abort.
Carlos O'Donell 6e8e9f
%if %{with valgrind}
ee109a
%ifarch s390 ppc64 ppc64p7 %{mips} riscv64
ee109a
# There is no valgrind support for 31-bit s390, nor for MIPS, nor RISC-V.
064765
# The valgrind test does not work on ppc64, ppc64p7 (bug 1273103).
Carlos O'Donell 6e8e9f
%undefine with_valgrind
Carlos O'Donell 6e8e9f
%endif
Carlos O'Donell 6e8e9f
%endif
Carlos O'Donell 6e8e9f
%if %{with bootstrap}
Carlos O'Donell 6e8e9f
# Disable benchtests, -Werror, docs, and valgrind if we're bootstrapping
Carlos O'Donell 6e8e9f
%undefine with_benchtests
Carlos O'Donell 6e8e9f
%undefine with_werror
Carlos O'Donell 6e8e9f
%undefine with_docs
Carlos O'Donell 6e8e9f
%undefine with_valgrind
Siddhesh Poyarekar 5d3d5d
%endif
9abcef
##############################################################################
9abcef
# Auxiliary arches are those arches that can be built in addition
9abcef
# to the core supported arches. You either install an auxarch or
9abcef
# you install the base arch, not both. You would do this in order
9abcef
# to provide a more optimized version of the package for your arch.
c1407c
%define auxarches athlon alphaev6
9abcef
##############################################################################
Carlos O'Donell 130c49
# We support only 64-bit POWER with the following runtimes:
Carlos O'Donell 130c49
# 64-bit BE:
Carlos O'Donell 130c49
# - Power 620 / 970 ISA (default runtime, compatile with POWER4 and newer)
Carlos O'Donell 130c49
#	- Provided for the large number of PowerPC G5 users.
Carlos O'Donell 130c49
#	- IFUNC support provides optimized core routines for POWER6,
Carlos O'Donell 130c49
#	  POWER7, and POWER8 transparently (if not using specific runtimes
Carlos O'Donell 130c49
#	  below)
Carlos O'Donell 130c49
# - POWER6 (has power6x symlink to power6, enabled via AT_PLATFORM)
Carlos O'Donell 130c49
#	- Legacy for old systems. Should be deprecated at some point soon.
Carlos O'Donell 130c49
# - POWER7 (enabled via AT_PLATFORM)
Carlos O'Donell 130c49
#	- Existing deployments.
Carlos O'Donell 130c49
# - POWER8 (enabled via AT_PLATFORM)
Carlos O'Donell 130c49
#	- Latest generation.
Carlos O'Donell 130c49
# 64-bit LE:
Carlos O'Donell 130c49
# - POWER8 LE (default)
Carlos O'Donell 130c49
#	- Latest generation.
Carlos O'Donell 130c49
#
Carlos O'Donell 130c49
# No 32-bit POWER support is provided.
Carlos O'Donell 130c49
#
Carlos O'Donell 130c49
# There are currently no plans for POWER9 enablement, but as hardware and
Carlos O'Donell 130c49
# upstream support become available this will be reviewed.
Carlos O'Donell 130c49
#
Carlos O'Donell 130c49
%ifarch ppc64
Carlos O'Donell 130c49
# Build the additional runtimes for 64-bit BE POWER.
ac6724
%define buildpower6 0
Carlos O'Donell 130c49
%define buildpower7 1
Carlos O'Donell 130c49
%define buildpower8 1
18aa46
%else
Carlos O'Donell 130c49
# No additional runtimes for ppc64le or ppc64p7, just the default.
18aa46
%define buildpower6 0
Carlos O'Donell 130c49
%define buildpower7 0
Carlos O'Donell 130c49
%define buildpower8 0
18aa46
%endif
Carlos O'Donell b60f74
cc5db6
# Only some architectures have static PIE support.
a4166c
%define pie_arches %{ix86} x86_64
cc5db6
9abcef
##############################################################################
9abcef
# Any architecture/kernel combination that supports running 32-bit and 64-bit
9abcef
# code in userspace is considered a biarch arch.
Carlos O'Donell 130c49
%define biarcharches %{ix86} x86_64 %{power64} s390 s390x
9abcef
##############################################################################
9abcef
# If the debug information is split into two packages, the core debuginfo
9abcef
# pacakge and the common debuginfo package then the arch should be listed
9abcef
# here. If the arch is not listed here then a single core debuginfo package
9abcef
# will be created for the architecture.
Andreas Schwab 87a7e4
%define debuginfocommonarches %{biarcharches} alpha alphaev6
9abcef
##############################################################################
9abcef
# %%package glibc - The GNU C Library (glibc) core package.
9abcef
##############################################################################
ffc48a
Summary: The GNU libc libraries
cvsdist c381c2
Name: glibc
Andreas Schwab 237bb9
Version: %{glibcversion}
55adfe
Release: %{glibcrelease}
921482
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
921482
# Things that are linked directly into dynamically linked programs
921482
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
921482
# exception which allows linking it into any kind of programs or shared
921482
# libraries without restrictions.
921482
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
Andreas Schwab 68ea17
URL: http://www.gnu.org/software/glibc/
f79eb1
Source0: %{?glibc_release_url}%{glibcsrcdir}.tar.gz
Siddhesh Poyarekar 17b00f
Source1: build-locale-archive.c
Siddhesh Poyarekar 17b00f
Source4: nscd.conf
Siddhesh Poyarekar 17b00f
Source7: nsswitch.conf
Siddhesh Poyarekar 17b00f
Source8: power6emul.c
Siddhesh Poyarekar 67b30d
Source9: bench.mk
Siddhesh Poyarekar 67b30d
Source10: glibc-bench-compare
5a0455
# A copy of localedata/SUPPORTED in the Source0 tarball.  The
a92e3b
# SUPPORTED file is used below to generate the list of locale
5a0455
# packages, using a Lua snippet.
9edc2b
Source11: SUPPORTED
92f265
29d100
# Include in the source RPM for reference.
29d100
Source12: ChangeLog.old
29d100
9abcef
##############################################################################
9abcef
# Start of glibc patches
9abcef
##############################################################################
92f265
# 0000-0999 for patches which are unlikely to ever go upstream or which
92f265
# have not been analyzed to see if they ought to go upstream yet.
bf6cb4
#
bf6cb4
# 1000-2000 for patches that are already upstream.
92f265
#
92f265
# 2000-3000 for patches that are awaiting upstream approval
92f265
#
92f265
# Yes, I realize this means some gratutious changes as patches to from
92f265
# one bucket to another, but I find this scheme makes it easier to track
92f265
# the upstream divergence and patches needing approval.
92f265
#
92f265
# Note that we can still apply the patches in any order we see fit, so
92f265
# the changes from one bucket to another won't necessarily result in needing
92f265
# to twiddle the patch because of dependencies on prior patches and the like.
92f265
92f265
6b3705
##############################################################################
92f265
#
6b3705
# Patches that are unlikely to go upstream or not yet analyzed.
92f265
#
6b3705
##############################################################################
665e71
737f7e
Patch1: glibc-post_upgrade.patch
737f7e
Patch2: glibc-fedora-nscd.patch
92f265
0a2129
# All these were from the glibc-fedora.patch mega-patch and need another
0a2129
# round of reviewing.  Ideally they'll either be submitted upstream or
0a2129
# dropped.
Carlos O'Donell 33fde8
Patch0012: glibc-fedora-linux-tcsetattr.patch
Carlos O'Donell 33fde8
Patch0014: glibc-fedora-nptl-linklibc.patch
Carlos O'Donell 33fde8
Patch0015: glibc-fedora-localedef.patch
Carlos O'Donell 33fde8
Patch0019: glibc-fedora-nis-rh188246.patch
Carlos O'Donell 33fde8
Patch0020: glibc-fedora-manual-dircategory.patch
Carlos O'Donell 33fde8
Patch0024: glibc-fedora-locarchive.patch
Carlos O'Donell 33fde8
Patch0025: glibc-fedora-streams-rh436349.patch
Carlos O'Donell 33fde8
Patch0028: glibc-fedora-localedata-rh61908.patch
Carlos O'Donell 33fde8
Patch0031: glibc-fedora-__libc_multiple_libcs.patch
384f5b
c2021d
# Allow applications to call pthread_atfork without libpthread.so.
Carlos O'Donell 33fde8
Patch0046: glibc-rh1013801.patch
c2021d
Carlos O'Donell 33fde8
Patch0047: glibc-nscd-sysconfig.patch
Siddhesh Poyarekar bdbcf8
Siddhesh Poyarekar b80bba
# confstr _CS_PATH should only return /usr/bin on Fedora since /bin is just a
Siddhesh Poyarekar b80bba
# symlink to it.
Carlos O'Donell 33fde8
Patch0053: glibc-cs-path.patch
Siddhesh Poyarekar b80bba
Carlos O'Donell 0457f6
# Add C.UTF-8 locale into /usr/lib/locale/
Carlos O'Donell 0457f6
Patch0059: glibc-c-utf8-locale.patch
Carlos O'Donell 0457f6
6b3705
##############################################################################
92f265
#
92f265
# Patches from upstream
92f265
#
6b3705
##############################################################################
6b3705
6b3705
##############################################################################
92f265
#
92f265
# Patches submitted, but not yet approved upstream.
6b3705
#
6b3705
##############################################################################
6b3705
#
92f265
# Each should be associated with a BZ.
92f265
# Obviously we're not there right now, but that's the goal
92f265
#
6b3705
0a2129
# http://sourceware.org/ml/libc-alpha/2012-12/msg00103.html
Carlos O'Donell 33fde8
Patch2007: glibc-rh697421.patch
92f265
Carlos O'Donell 33fde8
Patch2013: glibc-rh741105.patch
92f265
dd8ae6
# Upstream BZ 14247
Carlos O'Donell 33fde8
Patch2023: glibc-rh827510.patch
dd8ae6
200aeb
# Upstream BZ 14185
Carlos O'Donell 33fde8
Patch2027: glibc-rh819430.patch
Siddhesh Poyarekar 70cc4d
Carlos O'Donell 33fde8
Patch2031: glibc-rh1070416.patch
Siddhesh Poyarekar 52f69e
9fce07
Patch2037: glibc-rh1315108.patch
90612b
Patch2040: glibc-rh1452750-allocate_once.patch
90612b
Patch2041: glibc-rh1452750-libidn2.patch
2687b3
Patch2042: glibc-deprecate_libcrypt.patch
8ce0b9
Patch2043: glibc-collation-cldr-1.patch
8ce0b9
Patch2044: glibc-collation-cldr-2.patch
8ce0b9
Patch2045: glibc-collation-cldr-3.patch
8ce0b9
Patch2046: glibc-collation-cldr-4.patch
8ce0b9
Patch2047: glibc-collation-cldr-5.patch
8ce0b9
Patch2048: glibc-collation-cldr-6.patch
8ce0b9
Patch2049: glibc-collation-cldr-7.patch
8ce0b9
Patch2050: glibc-collation-cldr-8.patch
8ce0b9
Patch2051: glibc-collation-cldr-9.patch
8ce0b9
Patch2052: glibc-collation-cldr-10.patch
8ce0b9
Patch2053: glibc-collation-cldr-11.patch
8ce0b9
Patch2054: glibc-collation-cldr-12.patch
8ce0b9
Patch2055: glibc-collation-cldr-13.patch
8ce0b9
Patch2056: glibc-collation-cldr-14.patch
8ce0b9
Patch2057: glibc-collation-cldr-15.patch
2687b3
9abcef
##############################################################################
9abcef
# End of glibc patches.
9abcef
##############################################################################
200aeb
9abcef
##############################################################################
9abcef
# Continued list of core "glibc" package information:
9abcef
##############################################################################
ffc48a
Obsoletes: glibc-profile < 2.4
cvsdist c381c2
Provides: ldconfig
9abcef
754fe3
# The dynamic linker supports DT_GNU_HASH
754fe3
Provides: rtld(GNU_HASH)
cvsdist c381c2
Requires: glibc-common = %{version}-%{release}
9abcef
87b6ed
Requires(pre): basesystem
9abcef
cvsdist e8590c
# This is for building auxiliary programs like memusage, nscd
cvsdist c381c2
# For initial glibc bootstraps it can be commented out
Andreas Krebbel 71d4a0
%if %{without bootstrap}
Carlos O'Donell 6e8e9f
BuildRequires: gd-devel libpng-devel zlib-devel
Andreas Krebbel 71d4a0
%endif
Carlos O'Donell 6e8e9f
%if %{with docs}
Carlos O'Donell 6e8e9f
# Removing texinfo will cause check-safety.sh test to fail because it seems to
Carlos O'Donell 6e8e9f
# trigger documentation generation based on dependencies.  We need to fix this
Carlos O'Donell 6e8e9f
# upstream in some way that doesn't depend on generating docs to validate the
Carlos O'Donell 6e8e9f
# texinfo.  I expect it's simply the wrong dependency for that target.
238627
BuildRequires: texinfo >= 5.0
Carlos O'Donell 6e8e9f
%endif
Carlos O'Donell 6e8e9f
%if %{without bootstrap}
Carlos O'Donell 6e8e9f
BuildRequires: libselinux-devel >= 1.33.4-3
Carlos O'Donell 6e8e9f
%endif
Carlos O'Donell 6e8e9f
BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext
Carlos O'Donell 0457f6
# We need procps-ng (/bin/ps), util-linux (/bin/kill), and gawk (/bin/awk),
Carlos O'Donell 0457f6
# but it is more flexible to require the actual programs and let rpm infer
Carlos O'Donell 0457f6
# the packages. However, until bug 1259054 is widely fixed we avoid the
Carlos O'Donell 0457f6
# following:
Carlos O'Donell 0457f6
# BuildRequires: /bin/ps, /bin/kill, /bin/awk
Carlos O'Donell 0457f6
# And use instead (which should be reverted some time in the future):
Carlos O'Donell 0457f6
BuildRequires: procps-ng, util-linux, gawk
Andreas Schwab c883c1
BuildRequires: systemtap-sdt-devel
9abcef
Carlos O'Donell 6e8e9f
%if %{with valgrind}
Carlos O'Donell 0457f6
# Require valgrind for smoke testing the dynamic loader to make sure we
Carlos O'Donell 0457f6
# have not broken valgrind.
Mark Wielaard 05146e
BuildRequires: valgrind
Siddhesh Poyarekar e9a7f4
%endif
Siddhesh Poyarekar e9a7f4
Siddhesh Poyarekar 944ed5
# We use systemd rpm macros for nscd
Siddhesh Poyarekar 944ed5
BuildRequires: systemd
Siddhesh Poyarekar 944ed5
Carlos O'Donell 8544d3
# We use python for the microbenchmarks and locale data regeneration from
Carlos O'Donell 8544d3
# unicode sources (carried out manually). We choose python3 explicitly
Carlos O'Donell 8544d3
# because it supports both use cases.
e15a68
BuildRequires: python3
37b7df
00b734
# This GCC version is needed for -fstack-clash-protection support.
cf072e
BuildRequires: gcc >= 7.2.1-6
fda3e0
%define enablekernel 3.2
Andreas Schwab 98c76a
Conflicts: kernel < %{enablekernel}
Andreas Schwab 444e2c
%define target %{_target_cpu}-redhat-linux
Andreas Schwab 444e2c
%ifarch %{arm}
Andreas Schwab 444e2c
%define target %{_target_cpu}-redhat-linuxeabi
cvsdist 7abcfd
%endif
98ddda
%ifarch %{power64}
cffaeb
%ifarch ppc64le
cffaeb
%define target ppc64le-redhat-linux
cffaeb
%else
98ddda
%define target ppc64-redhat-linux
98ddda
%endif
cffaeb
%endif
9abcef
e09844
# GNU make 4.0 introduced the -O option.
e09844
BuildRequires: make >= 4.0
e09844
bb83f9
# The intl subsystem generates a parser using bison.
bb83f9
BuildRequires: bison >= 2.7
bb83f9
a4166c
# binutils 2.29 is needed for static PIE support in i386/x86_64.
a4166c
BuildRequires: binutils >= 2.29
cd5e5a
Andreas Schwab 677ba7
# Earlier releases have broken support for IRELATIVE relocations
Andreas Schwab 677ba7
Conflicts: prelink < 0.4.2
9abcef
Andreas Schwab 237bb9
%if 0%{?_enable_debug_packages}
ffc48a
BuildRequires: elfutils >= 0.72
ffc48a
BuildRequires: rpm >= 4.2-0.56
cvsdist c381c2
%endif
9abcef
Andreas Krebbel 71d4a0
%if %{without bootstrap}
Carlos O'Donell 8fdf67
%if %{with testsuite}
Carlos O'Donell 8fdf67
# The testsuite builds static C++ binaries that require a C++ compiler,
Carlos O'Donell 8fdf67
# static C++ runtime from libstdc++-static, and lastly static glibc.
Carlos O'Donell 6e8e9f
BuildRequires: gcc-c++
dbc262
BuildRequires: libstdc++-static
Carlos O'Donell 8fdf67
# A configure check tests for the ability to create static C++ binaries
Carlos O'Donell 8fdf67
# before glibc is built and therefore we need a glibc-static for that
Carlos O'Donell 8fdf67
# check to pass even if we aren't going to use any of those objects to
Carlos O'Donell 8fdf67
# build the tests.
Carlos O'Donell 8fdf67
BuildRequires: glibc-static
90612b
90612b
# libidn2 (but not libidn2-devel) is needed for testing AI_IDN/NI_IDN.
90612b
BuildRequires: libidn2
Carlos O'Donell 8fdf67
%endif
Carlos O'Donell 8fdf67
%endif
dbc262
9abcef
# Filter out all GLIBC_PRIVATE symbols since they are internal to
8c7b7c
# the package and should not be examined by any other tool.
Andreas Schwab 96f2a7
%global __filter_GLIBC_PRIVATE 1
cvsdist c381c2
Carlos O'Donell f2d402
# For language packs we have glibc require a virtual dependency
Carlos O'Donell f2d402
# "glibc-langpack" wich gives us at least one installed langpack.
Carlos O'Donell f2d402
# If no langpack providing 'glibc-langpack' was installed you'd
Carlos O'Donell f2d402
# get all of them, and that would make the transition from a
Carlos O'Donell f2d402
# system without langpacks smoother (you'd get all the locales
Carlos O'Donell f2d402
# installed). You would then trim that list, and the trimmed list
Carlos O'Donell f2d402
# is preserved. One problem is you can't have "no" locales installed,
Carlos O'Donell f2d402
# in that case we offer a "glibc-minimal-langpack" sub-pakcage for
Carlos O'Donell f2d402
# this purpose.
Carlos O'Donell f2d402
Requires: glibc-langpack = %{version}-%{release}
Carlos O'Donell f2d402
Suggests: glibc-all-langpacks = %{version}-%{release}
Carlos O'Donell f2d402
cvsdist c381c2
%description
cvsdist c381c2
The glibc package contains standard libraries which are used by
cvsdist c381c2
multiple programs on the system. In order to save disk space and
cvsdist c381c2
memory, as well as to make upgrading easier, common system code is
cvsdist c381c2
kept in one place and shared between programs. This particular package
cvsdist c381c2
contains the most important sets of shared libraries: the standard C
cvsdist c381c2
library and the standard math library. Without these two libraries, a
cvsdist c381c2
Linux system will not function.
cvsdist c381c2
7ad97b
######################################################################
b8bc11
# libnsl subpackage
b8bc11
######################################################################
b8bc11
b8bc11
%package -n libnsl
b8bc11
Summary: Legacy support library for NIS
b8bc11
Requires: %{name}%{_isa} = %{version}-%{release}
b8bc11
b8bc11
%description -n libnsl
b8bc11
This package provides the legacy version of libnsl library, for
b8bc11
accessing NIS services.
b8bc11
b8bc11
This library is provided for backwards compatibility only;
b8bc11
applications should use libnsl2 instead to gain IPv6 support.
b8bc11
9abcef
##############################################################################
9abcef
# glibc "devel" sub-package
9abcef
##############################################################################
cvsdist c381c2
%package devel
cvsdist c381c2
Summary: Object files for development using standard C libraries.
ffc48a
Requires(pre): /sbin/install-info
Andreas Schwab 237bb9
Requires(pre): %{name}-headers
Andreas Schwab 237bb9
Requires: %{name}-headers = %{version}-%{release}
ffc48a
Requires: %{name} = %{version}-%{release}
9d1bb0
Requires: libgcc%{_isa}
2687b3
Requires: libxcrypt-devel%{_isa} >= 4.0.0
cvsdist c381c2
cvsdist c381c2
%description devel
cvsdist c381c2
The glibc-devel package contains the object files necessary
cvsdist c381c2
for developing programs which use the standard C libraries (which are
cvsdist c381c2
used by nearly all programs).  If you are developing programs which
cvsdist c381c2
will use the standard C libraries, your system needs to have these
cvsdist c381c2
standard object files available in order to create the
cvsdist c381c2
executables.
cvsdist c381c2
cvsdist c381c2
Install glibc-devel if you are going to develop programs which will
cvsdist c381c2
use the standard C libraries.
cvsdist c381c2
9abcef
##############################################################################
9abcef
# glibc "static" sub-package
9abcef
##############################################################################
65bf1c
%package static
65bf1c
Summary: C library static libraries for -static linking.
65bf1c
Requires: %{name}-devel = %{version}-%{release}
2687b3
Requires: libxcrypt-static%{?_isa} >= 4.0.0
65bf1c
65bf1c
%description static
65bf1c
The glibc-static package contains the C library static libraries
65bf1c
for -static linking.  You don't need these, unless you link statically,
65bf1c
which is highly discouraged.
65bf1c
9abcef
##############################################################################
9abcef
# glibc "headers" sub-package
Carlos O'Donell e63fda
# - The headers package includes all common headers that are shared amongst
Carlos O'Donell e63fda
#   the multilib builds. It was created to reduce the download size, and
Carlos O'Donell e63fda
#   thus avoid downloading one header package per multilib. The package is
Carlos O'Donell e63fda
#   identical both in content and file list, any difference is an error.
Carlos O'Donell e63fda
#   Files like gnu/stubs.h which have gnu/stubs-32.h (i686) and gnu/stubs-64.h
Carlos O'Donell e63fda
#   are included in glibc-headers, but the -32 and -64 files are in their
Carlos O'Donell e63fda
#   respective i686 and x86_64 devel packages.
9abcef
##############################################################################
cvsdist c381c2
%package headers
cvsdist c381c2
Summary: Header files for development using standard C libraries.
cvsdist c381c2
Provides: %{name}-headers(%{_target_cpu})
ffc48a
Requires(pre): kernel-headers
4465bb
Requires: kernel-headers >= 2.2.1, %{name} = %{version}-%{release}
fda3e0
BuildRequires: kernel-headers >= 3.2
cvsdist c381c2
cvsdist c381c2
%description headers
cvsdist c381c2
The glibc-headers package contains the header files necessary
cvsdist c381c2
for developing programs which use the standard C libraries (which are
cvsdist c381c2
used by nearly all programs).  If you are developing programs which
cvsdist c381c2
will use the standard C libraries, your system needs to have these
cvsdist c381c2
standard header files available in order to create the
cvsdist c381c2
executables.
cvsdist c381c2
cvsdist c381c2
Install glibc-headers if you are going to develop programs which will
cvsdist c381c2
use the standard C libraries.
cvsdist c381c2
9abcef
##############################################################################
9abcef
# glibc "common" sub-package
9abcef
##############################################################################
cvsdist c381c2
%package common
cvsdist c381c2
Summary: Common binaries and locale data for glibc
e5e8f7
Requires: %{name} = %{version}-%{release}
cvsdist c381c2
Requires: tzdata >= 2003a
cvsdist c381c2
cvsdist c381c2
%description common
cvsdist c381c2
The glibc-common package includes common binaries for the GNU libc
cvsdist c381c2
libraries, as well as national language (locale) support.
cvsdist c381c2
c09c66
######################################################################
c09c66
# File triggers to do ldconfig calls automatically (see rhbz#1380878)
c09c66
######################################################################
c09c66
c09c66
# File triggers for when libraries are added or removed in standard
28e47f
# paths.
28e47f
%transfiletriggerin common -P 2000000 -- /lib /usr/lib /lib64 /usr/lib64
28e47f
/sbin/ldconfig
c09c66
%end
c09c66
28e47f
%transfiletriggerpostun common -P 2000000 -- /lib /usr/lib /lib64 /usr/lib64
28e47f
/sbin/ldconfig
c09c66
%end
c09c66
c09c66
# We need to run ldconfig manually because ldconfig cannot handle the
c09c66
# relative include path in the /etc/ld.so.conf file we gneerate.
c09c66
%undefine __brp_ldconfig
c09c66
c09c66
######################################################################
c09c66
9edc2b
%package locale-source
9edc2b
Summary: The sources for the locales
9edc2b
Requires: %{name} = %{version}-%{release}
9edc2b
Requires: %{name}-common = %{version}-%{release}
9edc2b
9edc2b
%description locale-source
9edc2b
The sources for all locales provided in the language packs.
9edc2b
If you are building custom locales you will most likely use
9edc2b
these sources as the basis for your new locale.
9edc2b
9df650
%{lua:
746617
-- Array of languages (ISO-639 codes).
746617
local languages = {}
746617
-- Dictionary from language codes (as in the languages array) to arrays
746617
-- of regions.
746617
local supplements = {}
746617
do
746617
   -- Parse the SUPPORTED file.  Eliminate duplicates.
746617
   local lang_region_seen = {}
746617
   for line in io.lines(rpm.expand("%{SOURCE11}")) do
746617
      -- Match lines which contain a language (eo) or language/region
746617
      -- (en_US) strings.
746617
      local lang_region = string.match(line, "^([a-z][^/@.]+)")
746617
      if lang_region ~= nil then
746617
	 if lang_region_seen[lang_region] == nil then
746617
	    lang_region_seen[lang_region] = true
746617
746617
	    -- Split language/region pair.
746617
	    local lang, region = string.match(lang_region, "^(.+)_(.+)")
746617
	    if lang == nil then
746617
	       -- Region is missing, use only the language.
746617
	       lang = lang_region
746617
	    end
746617
	    local suppl = supplements[lang]
746617
	    if suppl == nil then
746617
	       suppl = {}
746617
	       supplements[lang] = suppl
746617
	       -- New language not seen before.
746617
	       languages[#languages + 1] = lang
746617
	    end
746617
	    if region ~= nil then
746617
	       -- New region because of the check against
746617
	       -- lang_region_seen above.
746617
	       suppl[#suppl + 1] = region
746617
	    end
746617
	 end
746617
      end
746617
   end
746617
   -- Sort for determinism.
746617
   table.sort(languages)
746617
   for _, supples in pairs(supplements) do
746617
      table.sort(supplements)
746617
   end
746617
end
746617
746617
-- Compute the Supplements: list for a language, based on the regions.
746617
local function compute_supplements(lang)
746617
   result = "langpacks-" .. lang
746617
   regions = supplements[lang]
746617
   if regions ~= nil then
746617
      for i = 1, #regions do
746617
	 result = result .. " or langpacks-" .. lang .. "_" .. regions[i]
746617
      end
746617
   end
746617
   return result
746617
end
746617
746617
-- Emit the definition of a language pack package.
746617
local function lang_package(lang)
746617
   local suppl = compute_supplements(lang)
746617
   print(rpm.expand([[
746617
746617
%package langpack-]]..lang..[[
746617
746617
Summary: Locale data for ]]..lang..[[
746617
746617
Provides: glibc-langpack = %{version}-%{release}
746617
Requires: %{name} = %{version}-%{release}
746617
Requires: %{name}-common = %{version}-%{release}
684ac6
Supplements: (glibc and (]]..suppl..[[))
746617
%description langpack-]]..lang..[[
746617
746617
The glibc-langpack-]]..lang..[[ package includes the basic information required
746617
to support the ]]..lang..[[ language in your applications.
746617
%ifnarch %{auxarches}
746617
%files -f langpack-]]..lang..[[.filelist langpack-]]..lang..[[
746617
746617
%endif
746617
]]))
746617
end
746617
746617
for i = 1, #languages do
746617
   lang_package(languages[i])
746617
end
9df650
}
9edc2b
Carlos O'Donell f2d402
# The glibc-all-langpacks provides the virtual glibc-langpack,
Carlos O'Donell f2d402
# and thus satisfies glibc's requirement for installed locales.
Carlos O'Donell f2d402
# Users can add one more other langauge packs and then eventually
Carlos O'Donell f2d402
# uninstall all-langpacks to save space.
9edc2b
%package all-langpacks
Carlos O'Donell f2d402
Summary: All language packs for %{name}.
Carlos O'Donell f2d402
Requires: %{name} = %{version}-%{release}
Carlos O'Donell f2d402
Requires: %{name}-common = %{version}-%{release}
Carlos O'Donell f2d402
Provides: %{name}-langpack = %{version}-%{release}
9edc2b
%description all-langpacks
Carlos O'Donell f2d402
Carlos O'Donell f2d402
# No %files, this is an empty pacakge. The C/POSIX and
Carlos O'Donell f2d402
# C.UTF-8 files are already installed by glibc. We create
Carlos O'Donell f2d402
# minimal-langpack because the virtual provide of
Carlos O'Donell f2d402
# glibc-langpack needs at least one package installed
Carlos O'Donell f2d402
# to satisfy it. Given that no-locales installed is a valid
Carlos O'Donell f2d402
# use case we support it here with this package.
Carlos O'Donell f2d402
%package minimal-langpack
Carlos O'Donell f2d402
Summary: Minimal language packs for %{name}.
Carlos O'Donell f2d402
Provides: glibc-langpack = %{version}-%{release}
Carlos O'Donell f2d402
Requires: %{name} = %{version}-%{release}
Carlos O'Donell f2d402
Requires: %{name}-common = %{version}-%{release}
Carlos O'Donell f2d402
%description minimal-langpack
Carlos O'Donell f2d402
This is a Meta package that is used to install minimal language packs.
Carlos O'Donell f2d402
This package ensures you can use C, POSIX, or C.UTF-8 locales, but
Carlos O'Donell f2d402
nothing else. It is designed for assembling a minimal system.
9edc2b
%ifnarch %{auxarches}
Carlos O'Donell f2d402
%files minimal-langpack
9edc2b
%endif
9edc2b
9abcef
##############################################################################
9abcef
# glibc "nscd" sub-package
9abcef
##############################################################################
cvsdist c381c2
%package -n nscd
cvsdist c381c2
Summary: A Name Service Caching Daemon (nscd).
Andreas Schwab d047b3
Requires: %{name} = %{version}-%{release}
Carlos O'Donell 4f5155
%if %{without bootstrap}
Carlos O'Donell 6e8e9f
Requires: libselinux >= 1.17.10-1
Carlos O'Donell 6e8e9f
%endif
Carlos O'Donell 6e8e9f
Requires: audit-libs >= 1.1.3
Andreas Schwab 389eed
Requires(pre): /usr/sbin/useradd, coreutils
Siddhesh Poyarekar a383e7
Requires(post): systemd
Siddhesh Poyarekar a383e7
Requires(preun): systemd
Siddhesh Poyarekar a383e7
Requires(postun): systemd, /usr/sbin/userdel
cvsdist c381c2
cvsdist c381c2
%description -n nscd
b8bc11
The nscd daemon caches name service lookups and can improve
b8bc11
performance with LDAP, and may help with DNS as well.
cvsdist c381c2
9abcef
##############################################################################
d5e9ea
# Subpackages for NSS modules except nss_files, nss_dns
d5e9ea
##############################################################################
d5e9ea
d5e9ea
%package -n nss_db
d5e9ea
Summary: Name Service Switch (NSS) module using hash-indexed files
d5e9ea
Requires: %{name}%{_isa} = %{version}-%{release}
d5e9ea
d5e9ea
%description -n nss_db
d5e9ea
The nss_db Name Service Switch module uses hash-indexed files in /var/db
d5e9ea
to speed up user, group, service, host name, and other NSS-based lookups.
d5e9ea
d5e9ea
%package -n nss_hesiod
d5e9ea
Summary: Name Service Switch (NSS) module using Hesiod
d5e9ea
Requires: %{name}%{_isa} = %{version}-%{release}
d5e9ea
d5e9ea
%description -n nss_hesiod
d5e9ea
The nss_hesiod Name Service Switch module uses the Domain Name System
d5e9ea
(DNS) as a source for user, group, and service information, following
d5e9ea
the Hesiod convention of Project Athena.
d5e9ea
d5e9ea
%package nss-devel
d5e9ea
Summary: Development files for directly linking NSS service modules
d5e9ea
Requires: nss_db%{_isa} = %{version}-%{release}
d5e9ea
Requires: nss_hesiod%{_isa} = %{version}-%{release}
d5e9ea
d5e9ea
%description nss-devel
d5e9ea
The glibc-nss-devel package contains the object files necessary to
d5e9ea
compile applications and libraries which directly link against NSS
d5e9ea
modules supplied by glibc.
d5e9ea
d5e9ea
This is a rare and special use case; regular development has to use
d5e9ea
the glibc-devel package instead.
d5e9ea
d5e9ea
##############################################################################
9abcef
# glibc "utils" sub-package
9abcef
##############################################################################
cvsdist c381c2
%package utils
cvsdist c381c2
Summary: Development utilities from GNU C library
ffc48a
Requires: %{name} = %{version}-%{release}
cvsdist c381c2
cvsdist c381c2
%description utils
cvsdist c381c2
The glibc-utils package contains memusage, a memory usage profiler,
cvsdist c381c2
mtrace, a memory leak tracer and xtrace, a function call tracer
cvsdist c381c2
which can be helpful during program debugging.
cvsdist c381c2
cvsdist c381c2
If unsure if you need this, don't install this package.
cvsdist c381c2
8c7b7c
##############################################################################
8c7b7c
# glibc core "debuginfo" sub-package
8c7b7c
##############################################################################
Andreas Schwab 237bb9
%if 0%{?_enable_debug_packages}
cvsdist c381c2
%define debug_package %{nil}
e74e80
%define __debug_install_post %{nil}
e74e80
%global __debug_package 1
Carlos O'Donell 887799
# Disable thew new features that glibc packages don't use.
Carlos O'Donell 887799
%undefine _debugsource_packages
Carlos O'Donell 887799
%undefine _debuginfo_subpackages
Carlos O'Donell 887799
%undefine _unique_debug_names
Carlos O'Donell 887799
%undefine _unique_debug_srcs
cvsdist c381c2
cvsdist c381c2
%package debuginfo
cvsdist c381c2
Summary: Debug information for package %{name}
e0b449
AutoReqProv: no
cvsdist c381c2
%ifarch %{debuginfocommonarches}
cvsdist c381c2
Requires: glibc-debuginfo-common = %{version}-%{release}
Andreas Schwab 50a003
%else
c1407c
%ifarch %{ix86} %{sparc}
Andreas Schwab 50a003
Obsoletes: glibc-debuginfo-common
Andreas Schwab 50a003
%endif
cvsdist c381c2
%endif
cvsdist c381c2
cvsdist c381c2
%description debuginfo
cvsdist c381c2
This package provides debug information for package %{name}.
cvsdist c381c2
Debug information is useful when developing applications that use this
cvsdist c381c2
package or when debugging this package.
cvsdist c381c2
cvsdist ce0910
This package also contains static standard C libraries with
cvsdist ce0910
debugging information.  You need this only if you want to step into
cvsdist ce0910
C library routines during debugging programs statically linked against
cvsdist ce0910
one or more of the standard C libraries.
cvsdist ce0910
To use this debugging information, you need to link binaries
0d1d15
with -static -L%{_prefix}/lib/debug%{_libdir} compiler options.
cvsdist ce0910
9abcef
##############################################################################
9abcef
# glibc common "debuginfo-common" sub-package
9abcef
##############################################################################
cvsdist c381c2
%ifarch %{debuginfocommonarches}
cvsdist c381c2
cvsdist c381c2
%package debuginfo-common
cvsdist c381c2
Summary: Debug information for package %{name}
e0b449
AutoReqProv: no
cvsdist c381c2
cvsdist c381c2
%description debuginfo-common
cvsdist c381c2
This package provides debug information for package %{name}.
cvsdist c381c2
Debug information is useful when developing applications that use this
cvsdist c381c2
package or when debugging this package.
cvsdist c381c2
9abcef
%endif # %{debuginfocommonarches}
9abcef
%endif # 0%{?_enable_debug_packages}
cvsdist c381c2
Carlos O'Donell 6e8e9f
%if %{with benchtests}
Siddhesh Poyarekar 67b30d
%package benchtests
Siddhesh Poyarekar 67b30d
Summary: Benchmarking binaries and scripts for %{name}
Siddhesh Poyarekar 67b30d
%description benchtests
Siddhesh Poyarekar 67b30d
This package provides built benchmark binaries and scripts to run
Siddhesh Poyarekar 67b30d
microbenchmark tests on the system.
Siddhesh Poyarekar 67b30d
%endif
Siddhesh Poyarekar 67b30d
9abcef
##############################################################################
9abcef
# Prepare for the build.
9abcef
##############################################################################
cvsdist c381c2
%prep
Siddhesh Poyarekar 17b00f
%setup -q -n %{glibcsrcdir}
92f265
Carlos O'Donell 6e8e9f
# Patch order matters.
737f7e
%patch1 -p1
737f7e
%patch2 -p1
0a2129
%patch2007 -p1
03545a
%patch0012 -p1
fdfcf2
%patch2013 -p1
a7ee17
%patch0014 -p1
4e1a9e
%patch0015 -p1
9625d8
%patch0019 -p1
9625d8
%patch0020 -p1
24dc56
%patch2023 -p1
9625d8
%patch0024 -p1
e78194
%patch0025 -p1
dd8ae6
%patch2027 -p1
e3a9f6
%patch0028 -p1
fb633e
%patch0031 -p1
c2021d
%patch0046 -p1
Siddhesh Poyarekar bdbcf8
%patch2031 -p1
Siddhesh Poyarekar bdbcf8
%patch0047 -p1
Siddhesh Poyarekar b80bba
%patch0053 -p1
Carlos O'Donell 0457f6
%patch0059 -p1
9fce07
%patch2037 -p1
90612b
%patch2040 -p1
90612b
%patch2041 -p1
2687b3
%patch2042 -p1
8ce0b9
%patch2043 -p1
8ce0b9
%patch2044 -p1
8ce0b9
%patch2045 -p1
8ce0b9
%patch2046 -p1
8ce0b9
%patch2047 -p1
8ce0b9
%patch2048 -p1
8ce0b9
%patch2049 -p1
8ce0b9
%patch2050 -p1
8ce0b9
%patch2051 -p1
8ce0b9
%patch2052 -p1
8ce0b9
%patch2053 -p1
8ce0b9
%patch2054 -p1
8ce0b9
%patch2055 -p1
8ce0b9
%patch2056 -p1
8ce0b9
%patch2057 -p1
29b39d
9abcef
##############################################################################
9abcef
# %%prep - Additional prep required...
9abcef
##############################################################################
Siddhesh Poyarekar 67b30d
# Make benchmark scripts executable
Siddhesh Poyarekar 67b30d
chmod +x benchtests/scripts/*.py scripts/pylint
Siddhesh Poyarekar 67b30d
9abcef
# Remove all files generated from patching.
cvsdist c381c2
find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \;
9abcef
9abcef
# Ensure timestamps on configure files are current to prevent
9abcef
# regenerating them.
cvsdist c381c2
touch `find . -name configure`
9abcef
9abcef
# Ensure *-kw.h files are current to prevent regenerating them.
da64ee
touch locale/programs/*-kw.h
cvsdist c381c2
a92e3b
# Verify that our copy of localedata/SUPPORTED matches the glibc
a92e3b
# version.
a92e3b
#
5a0455
# The separate file copy is used by the Lua parser above.
a92e3b
# Patches or new upstream versions may change the list of locales,
a92e3b
# which changes the set of langpacks we need to build.  Verify the
a92e3b
# differences then update the copy of SUPPORTED.  This approach has
a92e3b
# two purposes: (a) avoid spurious changes to the set of langpacks,
5a0455
# and (b) the Lua snippet can use a fully patched-up version
a92e3b
# of the localedata/SUPPORTED file.
43e96b
diff -u %{SOURCE11} localedata/SUPPORTED
9edc2b
9abcef
##############################################################################
9abcef
# Build glibc...
9abcef
##############################################################################
cvsdist c381c2
%build
Carlos O'Donell 256beb
# Log system information
Carlos O'Donell 256beb
uname -a
9d8ea8
LD_SHOW_AUXV=1 /bin/true
Carlos O'Donell 256beb
cat /proc/cpuinfo
Carlos O'Donell 256beb
cat /proc/meminfo
d4be85
df
9abcef
8c7b7c
# We build using the native system compilers.
cvsdist c381c2
GCC=gcc
e1fb04
GXX=g++
9abcef
081ef3
# True if the compiler flag in the first argument is listed in
081ef3
# redhat-rpm-config.
081ef3
rpm_has_compiler_flag ()
081ef3
{
081ef3
	echo " $RPM_OPT_FLAGS $RPM_LD_FLAGS " | grep -q -F " $1 "
081ef3
}
Carlos O'Donell 7061f7
081ef3
# Propagates the listed flags to BuildFlags if supplied by redhat-rpm-config.
081ef3
BuildFlags="-O2 -g"
081ef3
rpm_inherit_flags ()
081ef3
{
081ef3
	local flag
081ef3
	for flag in "$@" ; do
081ef3
		if rpm_has_compiler_flag "$flag" ; then
081ef3
			BuildFlags="$BuildFlags $flag"
081ef3
		fi
081ef3
	done
081ef3
}
Carlos O'Donell b60f74
081ef3
# Propgate select compiler flags from redhat-rpm-config.  These flags
081ef3
# are target-dependent, so we use only those which are specified in
081ef3
# redhat-rpm-config.  We do not replicate the -march=/-mtune=
081ef3
# selection here because these match the defaults compiled into GCC.
081ef3
# We keep the -m32/-m32/-m64 flags to support multilib builds.
cvsdist c381c2
081ef3
rpm_inherit_flags \
081ef3
	"-fasynchronous-unwind-tables" \
081ef3
	"-fstack-clash-protection" \
081ef3
	"-funwind-tables" \
081ef3
	"-m31" \
081ef3
	"-m32" \
081ef3
	"-m64" \
157a63
%if 0%{?rhel} > 0
157a63
	"-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" \
157a63
%endif
66afdc
66afdc
##############################################################################
9abcef
# %%build - Generic options.
9abcef
##############################################################################
cvsdist c381c2
EnableKernel="--enable-kernel=%{enablekernel}"
9abcef
# Save the used compiler and options into the file "Gcc" for use later
9abcef
# by %%install.
2f520c
echo "$GCC" > Gcc
cvsdist ce0910
9abcef
##############################################################################
9abcef
# build()
9abcef
#	Build glibc in `build-%{target}$1', passing the rest of the arguments
9abcef
#	as CFLAGS to the build (not the same as configure CFLAGS). Several
dc9054
#	global values are used to determine build flags, kernel version,
dc9054
#	system tap support, etc.
9abcef
##############################################################################
Andreas Schwab 444e2c
build()
a9d8ca
{
081ef3
	local builddir=build-%{target}${1:+-$1}
d4d7ef
	${1+shift}
d4d7ef
	rm -rf $builddir
d4d7ef
	mkdir $builddir
d4d7ef
	pushd $builddir
081ef3
	../configure CC="$GCC" CXX="$GXX" CFLAGS="$BuildFlags $*" \
d4d7ef
		--prefix=%{_prefix} \
8ed873
		--with-headers=%{_prefix}/include $EnableKernel \
8ed873
		--enable-bind-now \
d4d7ef
		--build=%{target} \
4570c4
		--enable-stack-protector=strong \
cc5db6
%ifarch %{pie_arches}
5163db
		--enable-static-pie \
5163db
%endif
c65928
		--enable-tunables \
d4d7ef
		--enable-systemtap \
Carlos O'Donell b60f74
		${core_with_options} \
ad9d2e
%ifarch %{ix86}
ad9d2e
		--disable-multi-arch \
ad9d2e
%endif
Carlos O'Donell 6e8e9f
%if %{without werror}
Carlos O'Donell 6e8e9f
		--disable-werror \
Carlos O'Donell 6e8e9f
%endif
Carlos O'Donell 6e8e9f
		--disable-profile \
Carlos O'Donell 6e8e9f
%if %{with bootstrap}
Carlos O'Donell 6e8e9f
		--without-selinux \
Siddhesh Poyarekar 5d3d5d
%endif
08930d
		--disable-nss-crypt ||
d4d7ef
		{ cat config.log; false; }
Andreas Schwab f81c27
081ef3
	make %{?_smp_mflags} -O -r
d4d7ef
	popd
a9d8ca
}
a9d8ca
9abcef
##############################################################################
9abcef
# Build glibc for the default set of options.
9abcef
##############################################################################
Andreas Schwab 444e2c
build
a9d8ca
9abcef
##############################################################################
9abcef
# Build glibc for power6:
9abcef
# If we support building a power6 alternate runtime then built glibc again for
9abcef
# power6.
9abcef
# XXX: We build in a sub-shell for no apparent reason.
9abcef
##############################################################################
18aa46
%if %{buildpower6}
18aa46
(
d4d7ef
	platform=`LD_SHOW_AUXV=1 /bin/true | sed -n 's/^AT_PLATFORM:[[:blank:]]*//p'`
d4d7ef
	if [ "$platform" != power6 ]; then
2eb150
		mkdir -p power6emul/{lib,lib64}
Siddhesh Poyarekar 17b00f
		$GCC -shared -O2 -fpic -o power6emul/%{_lib}/power6emul.so %{SOURCE8} -Wl,-z,initfirst
18aa46
%ifarch ppc64
2eb150
		gcc -shared -nostdlib -O2 -fpic -m32 -o power6emul/lib/power6emul.so -xc - < /dev/null
18aa46
%endif
2eb150
		export LD_PRELOAD=`pwd`/power6emul/\$LIB/power6emul.so
d4d7ef
	fi
d4d7ef
	GCC="$GCC -mcpu=power6"
d4d7ef
	GXX="$GXX -mcpu=power6"
Carlos O'Donell b60f74
	core_with_options="--with-cpu=power6"
d4d7ef
	build power6
18aa46
)
2eb150
%endif # %{buildpower6}
18aa46
Carlos O'Donell 130c49
%if %{buildpower7}
Carlos O'Donell 130c49
(
Carlos O'Donell 130c49
  GCC="$GCC -mcpu=power7 -mtune=power7"
Carlos O'Donell 130c49
  GXX="$GXX -mcpu=power7 -mtune=power7"
Carlos O'Donell b60f74
  core_with_options="--with-cpu=power7"
Carlos O'Donell 130c49
  build power7
Carlos O'Donell 130c49
)
Carlos O'Donell 130c49
%endif
Carlos O'Donell 130c49
Carlos O'Donell 130c49
%if %{buildpower8}
Carlos O'Donell 130c49
(
Carlos O'Donell 130c49
  GCC="$GCC -mcpu=power8 -mtune=power8"
Carlos O'Donell 130c49
  GXX="$GXX -mcpu=power8 -mtune=power8"
Carlos O'Donell b60f74
  core_with_options="--with-cpu=power8"
Carlos O'Donell 130c49
  build power8
Carlos O'Donell 130c49
)
Carlos O'Donell 130c49
%endif
Carlos O'Donell 130c49
9abcef
##############################################################################
9abcef
# Install glibc...
9abcef
##############################################################################
cvsdist c381c2
%install
c13214
c6e992
# Remove existing file lists.
c6e992
find . -type f -name '*.filelist' -exec rm -rf {} \;
c6e992
c13214
# Ensure the permissions of errlist.c do not change.  When the file is
c13214
# regenerated the Makefile sets the permissions to 444. We set it to 644
c13214
# to match what comes out of git. The tarball of the git archive won't have
c13214
# correct permissions because git doesn't track all of the permissions
c13214
# accurately (see git-cache-meta if you need that). We also set it to 644 to
c13214
# match pre-existing rpms. We do this *after* the build because the build
c13214
# might regenerate the file and set the permissions to 444.
c13214
chmod 644 sysdeps/gnu/errlist.c
c13214
9abcef
# Reload compiler and build options that were used during %%build.
cvsdist c381c2
GCC=`cat Gcc`
cvsdist c381c2
16398f
%ifarch riscv64
16398f
# RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d.
16398f
# Make these be symlinks to /lib64 or /usr/lib64 respectively.  See:
16398f
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/DRHT5YTPK4WWVGL3GIN5BF2IKX2ODHZ3/
16398f
for d in $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT/%{_lib}; do
16398f
	mkdir -p $d
16398f
	(cd $d && ln -sf . lp64d)
16398f
done
16398f
%endif
16398f
c6e992
# Build and install.
7bdfe1
make -j1 install_root=$RPM_BUILD_ROOT install -C build-%{target}
c6e992
9abcef
# If we are not building an auxiliary arch then install all of the supported
9abcef
# locales.
cvsdist c381c2
%ifnarch %{auxarches}
7e232b
pushd build-%{target}
e09844
make %{?_smp_mflags} -O install_root=$RPM_BUILD_ROOT \
d4d7ef
	install-locales -C ../localedata objdir=`pwd`
7e232b
popd
cvsdist c381c2
%endif
cvsdist c381c2
71c008
# install_different:
71c008
#	Install all core libraries into DESTDIR/SUBDIR. Either the file is
71c008
#	installed as a copy or a symlink to the default install (if it is the
71c008
#	same). The path SUBDIR_UP is the prefix used to go from
71c008
#	DESTDIR/SUBDIR to the default installed libraries e.g.
71c008
#	ln -s SUBDIR_UP/foo.so DESTDIR/SUBDIR/foo.so.
71c008
#	When you call this function it is expected that you are in the root
71c008
#	of the build directory, and that the default build directory is:
71c008
#	"../build-%{target}" (relatively).
71c008
#	The primary use of this function is to install alternate runtimes
71c008
#	into the build directory and avoid duplicating this code for each
71c008
#	runtime.
71c008
install_different()
71c008
{
baa7ac
	local lib libbase libbaseso dlib
71c008
	local destdir="$1"
71c008
	local subdir="$2"
71c008
	local subdir_up="$3"
71c008
	local libdestdir="$destdir/$subdir"
71c008
	# All three arguments must be non-zero paths.
71c008
	if ! [ "$destdir" \
71c008
	       -a "$subdir" \
71c008
	       -a "$subdir_up" ]; then
71c008
		echo "One of the arguments to install_different was emtpy."
71c008
		exit 1
71c008
	fi
71c008
	# Create the destination directory and the multilib directory.
71c008
	mkdir -p "$destdir"
71c008
	mkdir -p "$libdestdir"
71c008
	# Walk all of the libraries we installed...
71c008
	for lib in libc math/libm nptl/libpthread rt/librt nptl_db/libthread_db
71c008
	do
71c008
		libbase=${lib#*/}
71c008
		# Take care that `libbaseso' has a * that needs expanding so
71c008
		# take care with quoting.
b8e476
		libbaseso=$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}-*.so)
71c008
		# Only install if different from default build library.
71c008
		if cmp -s ${lib}.so ../build-%{target}/${lib}.so; then
71c008
			ln -sf "$subdir_up"/$libbaseso $libdestdir/$libbaseso
71c008
		else
71c008
			cp -a ${lib}.so $libdestdir/$libbaseso
71c008
		fi
b8e476
		dlib=$libdestdir/$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}.so.*)
71c008
		ln -sf $libbaseso $dlib
71c008
	done
71c008
}
71c008
9abcef
##############################################################################
9abcef
# Install the power6 build files.
9abcef
##############################################################################
18aa46
%if %{buildpower6}
71c008
%define power6_subdir power6
71c008
%define power6_subdir_up ..
71c008
%define power6_legacy power6x
71c008
%define power6_legacy_up ..
7e232b
pushd build-%{target}-power6
71c008
destdir=$RPM_BUILD_ROOT/%{_lib}
db59a6
install_different "$destdir" "%{power6_subdir}" "%{power6_subdir_up}"
71c008
# Make a legacy /usr/lib[64]/power6x directory that is a symlink to the
71c008
# power6 runtime.
71c008
# XXX: When can we remove this? What is the history behind this?
71c008
mkdir -p ${destdir}/%{power6_legacy}
71c008
pushd ${destdir}/%{power6_legacy}
71c008
ln -sf %{power6_legacy_up}/%{power6_subdir}/*.so .
71c008
cp -a %{power6_legacy_up}/%{power6_subdir}/*.so.* .
1e072a
popd
7e232b
popd
2eb150
%endif # %{buildpower6}
18aa46
Carlos O'Donell 130c49
%if %{buildpower7}
Carlos O'Donell 130c49
%define power7_subdir power7
Carlos O'Donell 130c49
%define power7_subdir_up ..
Carlos O'Donell 130c49
pushd build-%{target}-power7
Carlos O'Donell 130c49
destdir=$RPM_BUILD_ROOT/%{_lib}
Carlos O'Donell 130c49
install_different "$destdir" "%{power7_subdir}" "%{power7_subdir_up}"
Carlos O'Donell 130c49
popd
Carlos O'Donell 130c49
%endif
Carlos O'Donell 130c49
Carlos O'Donell 130c49
%if %{buildpower8}
Carlos O'Donell 130c49
%define power8_subdir power8
Carlos O'Donell 130c49
%define power8_subdir_up ..
Carlos O'Donell 130c49
pushd build-%{target}-power8
Carlos O'Donell 130c49
destdir=$RPM_BUILD_ROOT/%{_lib}
Carlos O'Donell 130c49
install_different "$destdir" "%{power8_subdir}" "%{power8_subdir_up}"
Carlos O'Donell 130c49
popd
Carlos O'Donell 130c49
%endif
Carlos O'Donell 130c49
9abcef
##############################################################################
cvsdist c381c2
# Remove the files we don't want to distribute
9abcef
##############################################################################
9abcef
9abcef
# Remove the libNoVersion files.
9abcef
# XXX: This looks like a bug in glibc that accidentally installed these
9abcef
#      wrong files. We probably don't need this today.
0d1d15
rm -f $RPM_BUILD_ROOT%{_libdir}/libNoVersion*
cvsdist c381c2
rm -f $RPM_BUILD_ROOT/%{_lib}/libNoVersion*
cvsdist c381c2
5a3b56
# Remove the old nss modules.
5a3b56
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss1-*
5a3b56
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss-*.so.1
24d911
Colin Walters d8e157
# This statically linked binary is no longer necessary in a world where
Colin Walters d8e157
# the default Fedora install uses an initramfs, and further we have rpm-ostree
Colin Walters d8e157
# which captures the whole userspace FS tree.
Colin Walters d8e157
# Further, see https://github.com/projectatomic/rpm-ostree/pull/1173#issuecomment-355014583
Colin Walters d8e157
rm -f ${RPM_BUILD_ROOT}/{usr/,}sbin/sln
Colin Walters d8e157
6ff958
######################################################################
6ff958
# Run ldconfig to create all the symbolic links we need
6ff958
######################################################################
6ff958
6ff958
# Note: This has to happen before creating /etc/ld.so.conf.
6ff958
6ff958
mkdir -p $RPM_BUILD_ROOT/var/cache/ldconfig
6ff958
truncate -s 0 $RPM_BUILD_ROOT/var/cache/ldconfig/aux-cache
6ff958
6ff958
# ldconfig is statically linked, so we can use the new version.
6ff958
${RPM_BUILD_ROOT}/sbin/ldconfig -N -r ${RPM_BUILD_ROOT}
6ff958
8c7b7c
##############################################################################
5a3b56
# Install info files
8c7b7c
##############################################################################
8c7b7c
Carlos O'Donell 6e8e9f
%if %{with docs}
9abcef
# Move the info files if glibc installed them into the wrong location.
cvsdist c381c2
if [ -d $RPM_BUILD_ROOT%{_prefix}/info -a "%{_infodir}" != "%{_prefix}/info" ]; then
ffc48a
  mkdir -p $RPM_BUILD_ROOT%{_infodir}
ffc48a
  mv -f $RPM_BUILD_ROOT%{_prefix}/info/* $RPM_BUILD_ROOT%{_infodir}
ffc48a
  rm -rf $RPM_BUILD_ROOT%{_prefix}/info
cvsdist c381c2
fi
cvsdist c381c2
9abcef
# Compress all of the info files.
cvsdist c381c2
gzip -9nvf $RPM_BUILD_ROOT%{_infodir}/libc*
Carlos O'Donell 8fdf67
Carlos O'Donell 8fdf67
%else
Carlos O'Donell 8fdf67
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
Carlos O'Donell 8fdf67
rm -f $RPM_BUILD_ROOT%{_infodir}/libc.info*
Carlos O'Donell 6e8e9f
%endif
cvsdist c381c2
5a3b56
##############################################################################
9edc2b
# Create locale sub-package file lists
5a3b56
##############################################################################
5a3b56
5a3b56
%ifnarch %{auxarches}
5a3b56
olddir=`pwd`
5a3b56
pushd ${RPM_BUILD_ROOT}%{_prefix}/lib/locale
37b5e6
rm -f locale-archive
Carlos O'Donell f2d402
# Intentionally we do not pass --alias-file=, aliases will be added
Carlos O'Donell f2d402
# by build-locale-archive.
Carlos O'Donell f2d402
$olddir/build-%{target}/elf/ld.so \
Carlos O'Donell f2d402
        --library-path $olddir/build-%{target}/ \
Carlos O'Donell f2d402
        $olddir/build-%{target}/locale/localedef \
Carlos O'Donell f2d402
        --prefix ${RPM_BUILD_ROOT} --add-to-archive \
Carlos O'Donell f2d402
        *_*
Carlos O'Donell f2d402
# Setup the locale-archive template for use by glibc-all-langpacks.
Carlos O'Donell f2d402
mv locale-archive{,.tmpl}
9edc2b
# Create the file lists for the language specific sub-packages:
c8064e
for i in eo *_*
9edc2b
do
9edc2b
    lang=${i%%_*}
9edc2b
    if [ ! -e langpack-${lang}.filelist ]; then
9edc2b
        echo "%dir %{_prefix}/lib/locale" >> langpack-${lang}.filelist
9edc2b
    fi
9edc2b
    echo "%dir  %{_prefix}/lib/locale/$i" >> langpack-${lang}.filelist
9edc2b
    echo "%{_prefix}/lib/locale/$i/*" >> langpack-${lang}.filelist
9edc2b
done
9edc2b
popd
9edc2b
pushd ${RPM_BUILD_ROOT}%{_prefix}/share/locale
9edc2b
for i in */LC_MESSAGES/libc.mo
9edc2b
do
9edc2b
    locale=${i%%%%/*}
9edc2b
    lang=${locale%%%%_*}
9edc2b
    echo "%lang($lang) %{_prefix}/share/locale/${i}" \
9edc2b
         >> ${RPM_BUILD_ROOT}%{_prefix}/lib/locale/langpack-${lang}.filelist
9edc2b
done
5a3b56
popd
9edc2b
mv  ${RPM_BUILD_ROOT}%{_prefix}/lib/locale/*.filelist .
5a3b56
%endif
cvsdist c381c2
9abcef
##############################################################################
9abcef
# Install configuration files for services
9abcef
##############################################################################
9abcef
Siddhesh Poyarekar 17b00f
install -p -m 644 %{SOURCE7} $RPM_BUILD_ROOT/etc/nsswitch.conf
cvsdist c381c2
Andreas Schwab 2fa87b
%ifnarch %{auxarches}
cvsdist c381c2
# This is for ncsd - in glibc 2.2
cvsdist c381c2
install -m 644 nscd/nscd.conf $RPM_BUILD_ROOT/etc
Siddhesh Poyarekar 944ed5
mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
Siddhesh Poyarekar 17b00f
install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}
b8e476
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
Siddhesh Poyarekar bdbcf8
install -m 644 nscd/nscd.service nscd/nscd.socket $RPM_BUILD_ROOT/lib/systemd/system
Andreas Schwab 2fa87b
%endif
cvsdist c381c2
cvsdist c381c2
# Include ld.so.conf
cvsdist 195182
echo 'include ld.so.conf.d/*.conf' > $RPM_BUILD_ROOT/etc/ld.so.conf
1d99c0
truncate -s 0 $RPM_BUILD_ROOT/etc/ld.so.cache
cvsdist c381c2
chmod 644 $RPM_BUILD_ROOT/etc/ld.so.conf
cvsdist ce0910
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
Andreas Schwab 2fa87b
%ifnarch %{auxarches}
63b6b6
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
1d99c0
truncate -s 0 $RPM_BUILD_ROOT/etc/sysconfig/nscd
1d99c0
truncate -s 0 $RPM_BUILD_ROOT/etc/gai.conf
Andreas Schwab 2fa87b
%endif
cvsdist c381c2
0d1d15
# Include %{_libdir}/gconv/gconv-modules.cache
0d1d15
truncate -s 0 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
0d1d15
chmod 644 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
cvsdist c381c2
9abcef
##############################################################################
5a3b56
# Misc...
9abcef
##############################################################################
9abcef
5a3b56
# Install the upgrade program
737f7e
install -m 700 build-%{target}/elf/glibc_post_upgrade \
63769b
  $RPM_BUILD_ROOT%{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu}
cae834
5a3b56
# Strip all of the installed object files.
0d1d15
strip -g $RPM_BUILD_ROOT%{_libdir}/*.o
5a3b56
9abcef
##############################################################################
3bc8fa
# Install debug copies of unstripped static libraries
3bc8fa
# - This step must be last in order to capture any additional static
3bc8fa
#   archives we might have added.
3bc8fa
##############################################################################
3bc8fa
3bc8fa
# If we are building a debug package then copy all of the static archives
3bc8fa
# into the debug directory to keep them as unstripped copies.
3bc8fa
%if 0%{?_enable_debug_packages}
0d1d15
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}
0d1d15
cp -a $RPM_BUILD_ROOT%{_libdir}/*.a \
0d1d15
	$RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/
0d1d15
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/*_p.a
3bc8fa
%endif
3bc8fa
3bc8fa
##############################################################################
9abcef
# Build the file lists used for describing the package and subpackages.
9abcef
##############################################################################
d5e9ea
# There are several main file lists (and many more for
9edc2b
# the langpack sub-packages (langpack-${lang}.filelist)):
9abcef
# * rpm.fileslist
9abcef
#	- Master file list. Eventually, after removing files from this list
9abcef
#	  we are left with the list of files for the glibc package.
9abcef
# * common.filelist
9abcef
#	- Contains the list of flies for the common subpackage.
9abcef
# * utils.filelist
9abcef
#	- Contains the list of files for the utils subpackage.
9abcef
# * nscd.filelist
9abcef
#	- Contains the list of files for the nscd subpackage.
9abcef
# * devel.filelist
9abcef
#	- Contains the list of files for the devel subpackage.
9abcef
# * headers.filelist
9abcef
#	- Contains the list of files for the headers subpackage.
9abcef
# * static.filelist
9abcef
#	- Contains the list of files for the static subpackage.
b8bc11
# * libnsl.filelist
b8bc11
#       - Contains the list of files for the libnsl subpackage
b8bc11
# * nss_db.filelist, nss_hesiod.filelist
d5e9ea
#       - File lists for nss_* NSS module subpackages.
d5e9ea
# * nss-devel.filelist
d5e9ea
#       - File list with the .so symbolic links for NSS packages.
9abcef
# * debuginfo.filelist
9abcef
#	- Contains the list of files for the glibc debuginfo package.
9abcef
# * debuginfocommon.filelist
9abcef
#	- Contains the list of files for the glibc common debuginfo package.
9abcef
#
9abcef
Andreas Schwab 237bb9
{
Andreas Schwab 6843c2
  find $RPM_BUILD_ROOT \( -type f -o -type l \) \
Andreas Schwab 237bb9
       \( \
Andreas Schwab 237bb9
	 -name etc -printf "%%%%config " -o \
Andreas Schwab 237bb9
	 -name gconv-modules \
Andreas Schwab 237bb9
	 -printf "%%%%verify(not md5 size mtime) %%%%config(noreplace) " -o \
Andreas Schwab 237bb9
	 -name gconv-modules.cache \
Andreas Schwab 237bb9
	 -printf "%%%%verify(not md5 size mtime) " \
Andreas Schwab 237bb9
	 , \
Andreas Schwab 6843c2
	 ! -path "*/lib/debug/*" -printf "/%%P\n" \)
Siddhesh Poyarekar aeaedc
  # Print all directories with a %%dir prefix.  We omit the info directory and
Siddhesh Poyarekar aeaedc
  # all directories in (and including) /usr/share/locale.
Andreas Schwab 237bb9
  find $RPM_BUILD_ROOT -type d \
Siddhesh Poyarekar aeaedc
       \( -path '*%{_prefix}/share/locale' -prune -o \
Carlos O'Donell 6e8e9f
       \( -path '*%{_prefix}/share/*' \
Carlos O'Donell 6e8e9f
%if %{with docs}
Carlos O'Donell 6e8e9f
	! -path '*%{_infodir}' -o \
Carlos O'Donell 6e8e9f
%endif
Andreas Schwab 976b17
	  -path "*%{_prefix}/include/*" \
Siddhesh Poyarekar aeaedc
       \) -printf "%%%%dir /%%P\n" \)
Andreas Schwab 237bb9
} | {
Andreas Schwab 237bb9
Andreas Schwab 237bb9
  # primary filelist
Siddhesh Poyarekar 0cda72
9edc2b
  # Also remove the *.mo entries.  We will add them to the
9edc2b
  # language specific sub-packages.
d5e9ea
  # libnss_ files go into subpackages related to NSS modules.
9edc2b
  # and .*/share/i18n/charmaps/.*), they go into the sub-package
d5e9ea
  # "locale-source":
Siddhesh Poyarekar 0cda72
  sed -e '\,.*/share/locale/\([^/_]\+\).*/LC_MESSAGES/.*\.mo,d' \
9edc2b
      -e '\,.*/share/i18n/locales/.*,d' \
9edc2b
      -e '\,.*/share/i18n/charmaps/.*,d' \
Andreas Schwab d047b3
      -e '\,/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\|rpc\|gai\.conf\),d' \
Andreas Schwab 237bb9
      -e '\,/%{_lib}/lib\(pcprofile\|memusage\)\.so,d' \
6a5972
      -e '\,bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d'
Andreas Schwab 237bb9
} | sort > rpm.filelist
cvsdist c381c2
9edc2b
touch common.filelist
Siddhesh Poyarekar 0cda72
b8e476
mkdir -p $RPM_BUILD_ROOT%{_libdir}
b8e476
mv -f $RPM_BUILD_ROOT/%{_lib}/lib{pcprofile,memusage}.so $RPM_BUILD_ROOT%{_libdir}
b8e476
9abcef
# The xtrace and memusage scripts have hard-coded paths that need to be
9abcef
# translated to a correct set of paths using the $LIB token which is
9abcef
# dynamically translated by ld.so as the default lib directory.
cvsdist c381c2
for i in $RPM_BUILD_ROOT%{_prefix}/bin/{xtrace,memusage}; do
Andreas Krebbel 71d4a0
%if %{with bootstrap}
Andreas Krebbel 71d4a0
  test -w $i || continue
Andreas Krebbel 71d4a0
%endif
0d1d15
  sed -e 's~=/%{_lib}/libpcprofile.so~=%{_libdir}/libpcprofile.so~' \
0d1d15
      -e 's~=/%{_lib}/libmemusage.so~=%{_libdir}/libmemusage.so~' \
29d3ac
      -e 's~='\''/\\\$LIB/libpcprofile.so~='\''%{_prefix}/\\$LIB/libpcprofile.so~' \
29d3ac
      -e 's~='\''/\\\$LIB/libmemusage.so~='\''%{_prefix}/\\$LIB/libmemusage.so~' \
Andreas Schwab 237bb9
      -i $i
cvsdist c381c2
done
cvsdist c381c2
Carlos O'Donell 6e8e9f
%if %{with docs}
9abcef
# Put the info files into the devel file list.
271728
grep '%{_infodir}' < rpm.filelist | grep -v '%{_infodir}/dir' > devel.filelist
Carlos O'Donell 6e8e9f
%endif
9abcef
Carlos O'Donell e63fda
# The glibc-headers package includes only common files which are identical
Carlos O'Donell e63fda
# across all multilib packages. We must keep gnu/stubs.h and gnu/lib-names.h
Carlos O'Donell e63fda
# in the glibc-headers package, but the -32, -64, -64-v1, and -64-v2 versions
Carlos O'Donell e63fda
# go into the development packages.
Carlos O'Donell e63fda
grep '%{_prefix}/include/gnu/stubs-.*\.h$' < rpm.filelist >> devel.filelist || :
Carlos O'Donell e63fda
grep '%{_prefix}/include/gnu/lib-names-.*\.h$' < rpm.filelist >> devel.filelist || :
9abcef
# Put the include files into headers file list.
Carlos O'Donell e63fda
grep '%{_prefix}/include' < rpm.filelist \
Carlos O'Donell 2542c0
  | egrep -v '%{_prefix}/include/gnu/stubs-.*\.h$' \
Carlos O'Donell 2542c0
  | egrep -v '%{_prefix}/include/gnu/lib-names-.*\.h$' \
Carlos O'Donell e63fda
  > headers.filelist
cvsdist c381c2
9abcef
# Remove partial (lib*_p.a) static libraries, include files, and info files from
9abcef
# the core glibc package.
0d1d15
sed -i -e '\|%{_libdir}/lib.*_p.a|d' \
Andreas Schwab 237bb9
       -e '\|%{_prefix}/include|d' \
Carlos O'Donell 6e8e9f
       -e '\|%{_infodir}|d' \
Carlos O'Donell 6e8e9f
	rpm.filelist
cvsdist c381c2
9abcef
# Put some static files into the devel package.
0d1d15
grep '%{_libdir}/lib.*\.a' < rpm.filelist \
d62730
  | grep '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
65bf1c
  >> devel.filelist
9abcef
9abcef
# Put the rest of the static files into the static package.
0d1d15
grep '%{_libdir}/lib.*\.a' < rpm.filelist \
d62730
  | grep -v '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
65bf1c
  > static.filelist
9abcef
9abcef
# Put all of the object files and *.so (not the versioned ones) into the
9abcef
# devel package.
0d1d15
grep '%{_libdir}/.*\.o' < rpm.filelist >> devel.filelist
b8e476
grep '%{_libdir}/lib.*\.so' < rpm.filelist >> devel.filelist
cvsdist c381c2
Carlos O'Donell 2542c0
# Remove all of the static, object, unversioned DSOs, and nscd from the core
Carlos O'Donell 2542c0
# glibc package.
0d1d15
sed -i -e '\|%{_libdir}/lib.*\.a|d' \
0d1d15
       -e '\|%{_libdir}/.*\.o|d' \
b8e476
       -e '\|%{_libdir}/lib.*\.so|d' \
Andreas Schwab 237bb9
       -e '\|nscd|d' rpm.filelist
cvsdist c381c2
9abcef
# All of the bin and certain sbin files go into the common package.
9abcef
# We explicitly exclude certain sbin files that need to go into
9abcef
# the core glibc package for use during upgrades.
b8e476
grep '%{_prefix}/bin' < rpm.filelist >> common.filelist
b8e476
grep '%{_prefix}/sbin/[^gi]' < rpm.filelist >> common.filelist
9abcef
# All of the files under share go into the common package since
b8e476
# they should be multilib-independent.
ffc48a
grep '%{_prefix}/share' < rpm.filelist | \
b8e476
  grep -v -e '%{_prefix}/share/zoneinfo' -e '%%dir %{prefix}/share' \
b8e476
       >> common.filelist
cvsdist c381c2
Siddhesh Poyarekar 9a33c9
# Remove the bin, locale, some sbin, and share from the
9abcef
# core glibc package. We cheat a bit and use the slightly dangerous
b8e476
# /usr/sbin/[^gi] to match the inverse of the search that put the
9abcef
# files into common.filelist. It's dangerous in that additional files
b8e476
# that start with g, or i would get put into common.filelist and
9abcef
# rpm.filelist.
Andreas Schwab 237bb9
sed -i -e '\|%{_prefix}/bin|d' \
b8e476
       -e '\|%{_prefix}/lib/locale|d' \
b8e476
       -e '\|%{_prefix}/sbin/[^gi]|d' \
b8e476
       -e '\|%{_prefix}/share|d' rpm.filelist
cvsdist c381c2
9edc2b
# Add the binary to build locales to the common subpackage.
cvsdist c381c2
echo '%{_prefix}/sbin/build-locale-archive' >> common.filelist
9abcef
9abcef
# The nscd binary must go into the nscd subpackage.
cvsdist c381c2
echo '%{_prefix}/sbin/nscd' > nscd.filelist
cvsdist c381c2
9abcef
# The memusage and pcprofile libraries are put back into the core
9abcef
# glibc package even though they are only used by utils package
9abcef
# scripts..
Andreas Schwab aeada3
cat >> rpm.filelist <
0d1d15
%{_libdir}/libmemusage.so
0d1d15
%{_libdir}/libpcprofile.so
Andreas Schwab aeada3
EOF
9abcef
9abcef
# Add the utils scripts and programs to the utils subpackage.
Andreas Schwab aeada3
cat > utils.filelist <
Andreas Krebbel 71d4a0
%if %{without bootstrap}
cvsdist c381c2
%{_prefix}/bin/memusage
cvsdist c381c2
%{_prefix}/bin/memusagestat
2c005c
%endif
Andreas Krebbel 71d4a0
%{_prefix}/bin/mtrace
cvsdist c381c2
%{_prefix}/bin/pcprofiledump
cvsdist c381c2
%{_prefix}/bin/xtrace
cvsdist c381c2
EOF
cvsdist c381c2
d5e9ea
# Move the NSS-related files to the NSS subpackages.  Be careful not
d5e9ea
# to pick up .debug files, and the -devel symbolic links.
b8bc11
for module in db compat hesiod files dns; do
d5e9ea
  grep -E "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \
d5e9ea
    rpm.filelist > nss_$module.filelist
d5e9ea
done
d5e9ea
# Symlinks go into the nss-devel package (instead of the main devel
d5e9ea
# package).
d5e9ea
grep '/libnss_[a-z]*\.so$' devel.filelist > nss-devel.filelist
d3da0e
# /var/db/Makefile goes into nss_db, remove the other files from
d5e9ea
# the main and devel file list.
d5e9ea
sed -i -e '\,/libnss_.*\.so[0-9.]*$,d' \
d5e9ea
    -e '\,/var/db/Makefile,d' \
d5e9ea
    rpm.filelist devel.filelist
d5e9ea
# Restore the built-in NSS modules.
2235ae
cat nss_files.filelist nss_dns.filelist nss_compat.filelist >> rpm.filelist
d5e9ea
b8bc11
# Prepare the libnsl-related file lists.
b8bc11
grep '/libnsl-[0-9.]*.so$' rpm.filelist > libnsl.filelist
b8bc11
test $(wc -l < libnsl.filelist) -eq 1
b8bc11
sed -i -e '\,/libnsl,d' rpm.filelist
b8bc11
b8e476
# Remove the zoneinfo files
b8e476
# XXX: Why isn't this don't earlier when we are removing files?
b8e476
#      Won't this impact what is shipped?
cvsdist 7da373
rm -rf $RPM_BUILD_ROOT%{_prefix}/share/zoneinfo
cvsdist 7da373
Siddhesh Poyarekar 17b00f
# Make sure %config files have the same timestamp across multilib packages.
Siddhesh Poyarekar 17b00f
#
Siddhesh Poyarekar 17b00f
# XXX: Ideally ld.so.conf should have the timestamp of the spec file, but there
Siddhesh Poyarekar 17b00f
# doesn't seem to be any macro to give us that.  So we do the next best thing,
Siddhesh Poyarekar 17b00f
# which is to at least keep the timestamp consistent.  The choice of using
Siddhesh Poyarekar 17b00f
# glibc_post_upgrade.c is arbitrary.
737f7e
touch -r %{SOURCE0} $RPM_BUILD_ROOT/etc/ld.so.conf
b45468
touch -r sunrpc/etc.rpc $RPM_BUILD_ROOT/etc/rpc
b45468
Siddhesh Poyarekar 17b00f
pushd build-%{target}
Siddhesh Poyarekar afa87a
$GCC -Os -g -static -o build-locale-archive %{SOURCE1} \
d4d7ef
	../build-%{target}/locale/locarchive.o \
d4d7ef
	../build-%{target}/locale/md5.o \
35726c
	../build-%{target}/locale/record-status.o \
Siddhesh Poyarekar 17b00f
	-I. -DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \
d4d7ef
	-L../build-%{target} \
d4d7ef
	-B../build-%{target}/csu/ -lc -lc_nonshared
63769b
install -m 700 build-locale-archive $RPM_BUILD_ROOT%{_prefix}/sbin/build-locale-archive
7e232b
popd
cvsdist c381c2
9abcef
# Lastly copy some additional documentation for the packages.
cvsdist c381c2
rm -rf documentation
cvsdist c381c2
mkdir documentation
cvsdist c381c2
cp crypt/README.ufc-crypt documentation/README.ufc-crypt
cvsdist c381c2
cp timezone/README documentation/README.timezone
a2dbc1
cp posix/gai.conf documentation/
cvsdist c381c2
62c308
%ifarch s390x
b8e476
# Compatibility symlink
253d1d
mkdir -p $RPM_BUILD_ROOT/lib
b8e476
ln -sf /%{_lib}/ld64.so.1 $RPM_BUILD_ROOT/lib/ld64.so.1
cvsdist c381c2
%endif
cvsdist c381c2
Carlos O'Donell 6e8e9f
%if %{with benchtests}
Siddhesh Poyarekar 67b30d
# Build benchmark binaries.  Ignore the output of the benchmark runs.
Siddhesh Poyarekar 67b30d
pushd build-%{target}
Siddhesh Poyarekar 67b30d
make BENCH_DURATION=1 bench-build
Siddhesh Poyarekar 67b30d
popd
Siddhesh Poyarekar 67b30d
Siddhesh Poyarekar 67b30d
# Copy over benchmark binaries.
Siddhesh Poyarekar 67b30d
mkdir -p $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests
Siddhesh Poyarekar 67b30d
cp $(find build-%{target}/benchtests -type f -executable) $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d
Siddhesh Poyarekar 67b30d
find build-%{target}/benchtests -type f -executable | while read b; do
Siddhesh Poyarekar 67b30d
	echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)"
Siddhesh Poyarekar 67b30d
done >> benchtests.filelist
Siddhesh Poyarekar 67b30d
Siddhesh Poyarekar 67b30d
# ... and the makefile.
Siddhesh Poyarekar 67b30d
for b in %{SOURCE9} %{SOURCE10}; do
Siddhesh Poyarekar 67b30d
	cp $b $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d
	echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" >> benchtests.filelist
Siddhesh Poyarekar 67b30d
done
Siddhesh Poyarekar 67b30d
Siddhesh Poyarekar 67b30d
# .. and finally, the comparison scripts.
Siddhesh Poyarekar 67b30d
cp benchtests/scripts/benchout.schema.json $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d
cp benchtests/scripts/compare_bench.py $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d
cp benchtests/scripts/import_bench.py $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d
cp benchtests/scripts/validate_benchout.py $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d
Siddhesh Poyarekar 67b30d
echo "%{_prefix}/libexec/glibc-benchtests/benchout.schema.json" >> benchtests.filelist
Siddhesh Poyarekar 67b30d
echo "%{_prefix}/libexec/glibc-benchtests/compare_bench.py*" >> benchtests.filelist
Siddhesh Poyarekar 67b30d
echo "%{_prefix}/libexec/glibc-benchtests/import_bench.py*" >> benchtests.filelist
Siddhesh Poyarekar 67b30d
echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.filelist
Siddhesh Poyarekar 67b30d
%endif
Siddhesh Poyarekar 67b30d
9abcef
###############################################################################
9abcef
# Rebuild libpthread.a using --whole-archive to ensure all of libpthread
9abcef
# is included in a static link. This prevents any problems when linking
9abcef
# statically, using parts of libpthread, and other necessary parts not
9abcef
# being included. Upstream has decided that this is the wrong approach to
9abcef
# this problem and that the full set of dependencies should be resolved
9abcef
# such that static linking works and produces the most minimally sized
9abcef
# static application possible.
9abcef
###############################################################################
63769b
pushd $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
268a86
$GCC -r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a
65bf1c
rm libpthread.a
65bf1c
ar rcs libpthread.a libpthread.o
65bf1c
rm libpthread.o
65bf1c
popd
9abcef
###############################################################################
65bf1c
Andreas Schwab 237bb9
%if 0%{?_enable_debug_packages}
cvsdist c381c2
e0b449
# The #line directives gperf generates do not give the proper
e0b449
# file name relative to the build directory.
37b5e6
pushd locale
37b5e6
ln -s programs/*.gperf .
37b5e6
popd
37b5e6
pushd iconv
37b5e6
ln -s ../locale/programs/charmap-kw.gperf .
37b5e6
popd
cvsdist c381c2
9abcef
# Print some diagnostic information in the builds about the
9abcef
# getconf binaries.
9abcef
# XXX: Why do we do this?
63769b
ls -l $RPM_BUILD_ROOT%{_prefix}/bin/getconf
63769b
ls -l $RPM_BUILD_ROOT%{_prefix}/libexec/getconf
63769b
eu-readelf -hS $RPM_BUILD_ROOT%{_prefix}/bin/getconf \
63769b
	$RPM_BUILD_ROOT%{_prefix}/libexec/getconf/*
cvsdist c381c2
e0b449
find_debuginfo_args='--strict-build-id -g'
e0b449
%ifarch %{debuginfocommonarches}
e0b449
find_debuginfo_args="$find_debuginfo_args \
d4d7ef
	-l common.filelist \
d4d7ef
	-l utils.filelist \
d4d7ef
	-l nscd.filelist \
b8e476
	-p '.*/(sbin|libexec)/.*' \
d4d7ef
	-o debuginfocommon.filelist \
b8bc11
	-l nss_db.filelist -l nss_hesiod.filelist \
2687b3
	-l libnsl.filelist -l rpm.filelist \
Carlos O'Donell 6e8e9f
%if %{with benchtests}
6e6bd4
	-l benchtests.filelist
Carlos O'Donell 6e8e9f
%endif
6e6bd4
	"
e0b449
%endif
fce954
/usr/lib/rpm/find-debuginfo.sh $find_debuginfo_args -o debuginfo.filelist
cvsdist c381c2
9abcef
# List all of the *.a archives in the debug directory.
e0b449
list_debug_archives()
e0b449
{
0d1d15
	local dir=%{_prefix}/lib/debug%{_libdir}
d4d7ef
	find $RPM_BUILD_ROOT$dir -name "*.a" -printf "$dir/%%P\n"
e0b449
}
cvsdist c381c2
cvsdist c381c2
%ifarch %{debuginfocommonarches}
e0b449
9abcef
# Remove the source files from the common package debuginfo.
Andreas Schwab 87a7e4
sed -i '\#^%{_prefix}/src/debug/#d' debuginfocommon.filelist
9abcef
9abcef
# Create a list of all of the source files we copied to the debug directory.
Andreas Schwab 87a7e4
find $RPM_BUILD_ROOT%{_prefix}/src/debug \
Andreas Schwab 87a7e4
     \( -type d -printf '%%%%dir ' \) , \
Andreas Schwab 87a7e4
     -printf '%{_prefix}/src/debug/%%P\n' > debuginfocommon.sources
Andreas Schwab 87a7e4
Andreas Schwab 87a7e4
%ifarch %{biarcharches}
Andreas Schwab 87a7e4
9abcef
# Add the source files to the core debuginfo package.
Andreas Schwab 87a7e4
cat debuginfocommon.sources >> debuginfo.filelist
Andreas Schwab 87a7e4
Andreas Schwab 87a7e4
%else
Andreas Schwab 87a7e4
cvsdist c381c2
%ifarch %{ix86}
Andreas Schwab 50a003
%define basearch i686
cvsdist c381c2
%endif
cvsdist c381c2
%ifarch sparc sparcv9
cvsdist c381c2
%define basearch sparc
cvsdist c381c2
%endif
e0b449
9abcef
# The auxarches get only these few source files.
e0b449
auxarches_debugsources=\
e0b449
'/(generic|linux|%{basearch}|nptl(_db)?)/|/%{glibcsrcdir}/build|/dl-osinfo\.h'
e0b449
9abcef
# Place the source files into the core debuginfo pakcage.
e0b449
egrep "$auxarches_debugsources" debuginfocommon.sources >> debuginfo.filelist
e0b449
9abcef
# Remove the source files from the common debuginfo package.
e0b449
egrep -v "$auxarches_debugsources" \
ffc48a
  debuginfocommon.sources >> debuginfocommon.filelist
e0b449
8c7b7c
%endif # %{biarcharches}
Andreas Schwab 87a7e4
9abcef
# Add the list of *.a archives in the debug directory to
9abcef
# the common debuginfo package.
e0b449
list_debug_archives >> debuginfocommon.filelist
e0b449
85447d
# It happens that find-debuginfo.sh produces duplicate entries even
85447d
# though the inputs are unique. Therefore we sort and unique the
85447d
# entries in the debug file lists. This avoids the following warnings:
85447d
# ~~~
85447d
# Processing files: glibc-debuginfo-common-2.17.90-10.fc20.x86_64
85447d
# warning: File listed twice: /usr/lib/debug/usr/sbin/build-locale-archive.debug
85447d
# warning: File listed twice: /usr/lib/debug/usr/sbin/nscd.debug
85447d
# warning: File listed twice: /usr/lib/debug/usr/sbin/zdump.debug
85447d
# warning: File listed twice: /usr/lib/debug/usr/sbin/zic.debug
85447d
# ~~~
85447d
sort -u debuginfocommon.filelist > debuginfocommon2.filelist
85447d
mv debuginfocommon2.filelist debuginfocommon.filelist
85447d
9abcef
%endif # %{debuginfocommonarches}
cvsdist c381c2
85447d
# Remove any duplicates output by a buggy find-debuginfo.sh.
85447d
sort -u debuginfo.filelist > debuginfo2.filelist
85447d
mv debuginfo2.filelist debuginfo.filelist
85447d
Siddhesh Poyarekar 700749
# Remove some common directories from the common package debuginfo so that we
Siddhesh Poyarekar 700749
# don't end up owning them.
Siddhesh Poyarekar 700749
exclude_common_dirs()
Siddhesh Poyarekar 700749
{
Siddhesh Poyarekar 700749
	exclude_dirs="%{_prefix}/src/debug"
Siddhesh Poyarekar 700749
	exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug{,/%{_lib},/bin,/sbin})"
Siddhesh Poyarekar 700749
	exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug%{_prefix}{,/%{_lib},/libexec,/bin,/sbin})"
Siddhesh Poyarekar 700749
Siddhesh Poyarekar 700749
	for d in $(echo $exclude_dirs | sed 's/ /\n/g'); do
Siddhesh Poyarekar 700749
		sed -i "\|^%%dir $d/\?$|d" $1
Siddhesh Poyarekar 700749
	done
Siddhesh Poyarekar 700749
}
Siddhesh Poyarekar 700749
Siddhesh Poyarekar 700749
%ifarch %{debuginfocommonarches}
Siddhesh Poyarekar 700749
exclude_common_dirs debuginfocommon.filelist
Siddhesh Poyarekar 700749
%endif
Siddhesh Poyarekar 700749
exclude_common_dirs debuginfo.filelist
Siddhesh Poyarekar 700749
9abcef
%endif # 0%{?_enable_debug_packages}
e0b449
Carlos O'Donell 6e8e9f
%if %{with docs}
9abcef
# Remove the `dir' info-heirarchy file which will be maintained
9abcef
# by the system as it adds info files to the install.
e0b449
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
Carlos O'Donell 6e8e9f
%endif
e0b449
cvsdist c381c2
%ifarch %{auxarches}
e0b449
9abcef
# Delete files that we do not intended to ship with the auxarch.
cvsdist c381c2
echo Cutting down the list of unpackaged files
e0b449
sed -e '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //;s#^/*##' \
02e825
	common.filelist devel.filelist static.filelist headers.filelist \
02e825
	utils.filelist nscd.filelist \
02e825
%ifarch %{debuginfocommonarches}
02e825
	debuginfocommon.filelist \
02e825
%endif
02e825
	| (cd $RPM_BUILD_ROOT; xargs --no-run-if-empty rm -f 2> /dev/null || :)
9abcef
cfeb07
%else
cfeb07
cfeb07
mkdir -p $RPM_BUILD_ROOT/var/{db,run}/nscd
9893fa
touch $RPM_BUILD_ROOT/var/{db,run}/nscd/{passwd,group,hosts,services}
cfeb07
touch $RPM_BUILD_ROOT/var/run/nscd/{socket,nscd.pid}
2eb150
8c7b7c
%endif # %{auxarches}
cvsdist c381c2
Carlos O'Donell f2d402
%ifnarch %{auxarches}
Carlos O'Donell f2d402
truncate -s 0 $RPM_BUILD_ROOT/%{_prefix}/lib/locale/locale-archive
Carlos O'Donell f2d402
%endif
Carlos O'Donell f2d402
744852
##############################################################################
744852
# Run the glibc testsuite
744852
##############################################################################
744852
%check
Carlos O'Donell 6e8e9f
%if %{with testsuite}
f51594
5c2fe5
# Run the glibc tests. If any tests fail to build we exit %check with
5c2fe5
# an error, otherwise we print the test failure list and the failed
5c2fe5
# test output and continue.  Write to standard error to avoid
5c2fe5
# synchronization issues with make and shell tracing output if
5c2fe5
# standard output and standard error are different pipes.
f51594
run_tests () {
5c2fe5
  # This hides a test suite build failure, which should be fatal.  We
5c2fe5
  # check "Summary of test results:" below to verify that all tests
5c2fe5
  # were built and run.
5c2fe5
  make %{?_smp_mflags} -O check |& tee rpmbuild.check.log >&2
5c2fe5
  test -n tests.sum
5c2fe5
  if ! grep -q '^Summary of test results:$' rpmbuild.check.log ; then
5c2fe5
    echo "FAIL: test suite build of target: $(basename "$(pwd)")" >& 2
5c2fe5
    exit 1
5c2fe5
  fi
5c2fe5
  set +x
5c2fe5
  grep -v ^PASS: tests.sum > rpmbuild.tests.sum.not-passing || true
5c2fe5
  if test -n rpmbuild.tests.sum.not-passing ; then
5c2fe5
    echo ===================FAILED TESTS===================== >&2
5c2fe5
    echo "Target: $(basename "$(pwd)")" >& 2
5c2fe5
    cat rpmbuild.tests.sum.not-passing >&2
5c2fe5
    while read failed_code failed_test ; do
5c2fe5
      for suffix in out test-result ; do
5c2fe5
        if test -e "$failed_test.$suffix"; then
5c2fe5
	  echo >&2
5c2fe5
          echo "=====$failed_code $failed_test.$suffix=====" >&2
5c2fe5
          cat -- "$failed_test.$suffix" >&2
5c2fe5
	  echo >&2
5c2fe5
        fi
5c2fe5
      done
5c2fe5
    done 
5c2fe5
  fi
5c2fe5
5c2fe5
  # Unconditonally dump differences in the system call list.
5c2fe5
  echo "* System call consistency checks:" >&2
5c2fe5
  cat misc/tst-syscall-list.out >&2
5c2fe5
  set -x
f51594
}
f51594
744852
# Increase timeouts
744852
export TIMEOUTFACTOR=16
744852
parent=$$
744852
echo ====================TESTING=========================
744852
##############################################################################
744852
# - Test the default runtime.
5c2fe5
#	- Power 620 / 970 ISA for 64-bit POWER BE.
Carlos O'Donell 130c49
#	- POWER8 for 64-bit POWER LE.
Carlos O'Donell 130c49
#	- ??? for 64-bit x86_64
Carlos O'Donell 130c49
#	- ??? for 32-bit x86
Carlos O'Donell 130c49
#	- ??? for 64-bit AArch64
Carlos O'Donell 130c49
#	- ??? for 32-bit ARM
Carlos O'Donell 7061f7
#	- zEC12 for 64-bit s390x
Carlos O'Donell 130c49
#	- ??? for 32-bit s390
744852
##############################################################################
744852
pushd build-%{target}
f51594
run_tests
744852
popd
744852
744852
%if %{buildpower6}
744852
echo ====================TESTING -mcpu=power6=============
Carlos O'Donell 130c49
##############################################################################
Carlos O'Donell 130c49
# - Test the 64-bit POWER6 BE runtimes.
Carlos O'Donell 130c49
##############################################################################
744852
pushd build-%{target}-power6
f51594
if [ -d ../power6emul ]; then
744852
    export LD_PRELOAD=`cd ../power6emul; pwd`/\$LIB/power6emul.so
f51594
fi
f51594
run_tests
744852
popd
744852
%endif
Carlos O'Donell 130c49
Carlos O'Donell 130c49
%if %{buildpower7}
Carlos O'Donell 130c49
echo ====================TESTING -mcpu=power7=============
Carlos O'Donell 130c49
##############################################################################
Carlos O'Donell 130c49
# - Test the 64-bit POWER7 BE runtimes.
Carlos O'Donell 130c49
##############################################################################
Carlos O'Donell 130c49
pushd build-%{target}-power7
Carlos O'Donell 130c49
run_tests
Carlos O'Donell 130c49
popd
Carlos O'Donell 130c49
%endif
Carlos O'Donell 130c49
Carlos O'Donell 130c49
%if %{buildpower8}
Carlos O'Donell 130c49
echo ====================TESTING -mcpu=power8=============
Carlos O'Donell 130c49
##############################################################################
Carlos O'Donell 130c49
# - Test the 64-bit POWER8 BE runtimes.
Carlos O'Donell 130c49
##############################################################################
Carlos O'Donell 130c49
pushd build-%{target}-power8
Carlos O'Donell 130c49
run_tests
Carlos O'Donell 130c49
popd
Carlos O'Donell 130c49
%endif
Carlos O'Donell 130c49
744852
echo ====================TESTING END=====================
744852
PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p'
744852
echo ====================PLT RELOCS LD.SO================
744852
readelf -Wr $RPM_BUILD_ROOT/%{_lib}/ld-*.so | sed -n -e "$PLTCMD"
744852
echo ====================PLT RELOCS LIBC.SO==============
744852
readelf -Wr $RPM_BUILD_ROOT/%{_lib}/libc-*.so | sed -n -e "$PLTCMD"
744852
echo ====================PLT RELOCS END==================
744852
Siddhesh Poyarekar e9a7f4
# Finally, check if valgrind runs with the new glibc.
Siddhesh Poyarekar e9a7f4
# We want to fail building if valgrind is not able to run with this glibc so
Siddhesh Poyarekar e9a7f4
# that we can then coordinate with valgrind to get it fixed before we update
Siddhesh Poyarekar e9a7f4
# glibc.
Siddhesh Poyarekar e9a7f4
pushd build-%{target}
9d8ea8
9d8ea8
# Show the auxiliary vector as seen by the new library
9d8ea8
# (even if we do not perform the valgrind test).
9d8ea8
LD_SHOW_AUXV=1 elf/ld.so --library-path .:elf:nptl:dlfcn /bin/true
9d8ea8
9d8ea8
%if %{with valgrind}
Mark Wielaard 05146e
elf/ld.so --library-path .:elf:nptl:dlfcn \
Mark Wielaard 05146e
	/usr/bin/valgrind --error-exitcode=1 \
Siddhesh Poyarekar e9a7f4
	elf/ld.so --library-path .:elf:nptl:dlfcn /usr/bin/true
Siddhesh Poyarekar e9a7f4
%endif
9d8ea8
popd
Siddhesh Poyarekar e9a7f4
744852
%endif # %{run_glibc_tests}
744852
744852
Andreas Schwab 960330
%pre -p <lua>
Andreas Schwab 960330
-- Check that the running kernel is new enough
Andreas Schwab 960330
required = '%{enablekernel}'
Andreas Schwab 7dc670
rel = posix.uname("%r")
Andreas Schwab 7dc670
if rpm.vercmp(rel, required) < 0 then
Andreas Schwab 7dc670
  error("FATAL: kernel too old", 0)
Andreas Schwab 960330
end
Andreas Schwab 960330
63769b
%post -p %{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu}
cvsdist c381c2
Carlos O'Donell 1bbad6
%posttrans all-langpacks -e -p <lua>
Carlos O'Donell f2d402
-- If at the end of the transaction we are still installed
Carlos O'Donell f2d402
-- (have a template of non-zero size), then we rebuild the
Carlos O'Donell f2d402
-- locale cache (locale-archive) from the pre-populated
Carlos O'Donell f2d402
-- locale cache (locale-archive.tmpl) i.e. template.
Carlos O'Donell f2d402
if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
Carlos O'Donell f2d402
  pid = posix.fork()
Carlos O'Donell f2d402
  if pid == 0 then
Carlos O'Donell 1bbad6
    posix.exec("%{_prefix}/sbin/build-locale-archive", "--install-langs", "%%{_install_langs}")
Carlos O'Donell f2d402
  elseif pid > 0 then
Carlos O'Donell f2d402
    posix.wait(pid)
Carlos O'Donell f2d402
  end
Carlos O'Donell f2d402
end
Carlos O'Donell f2d402
Carlos O'Donell f2d402
%postun all-langpacks -p <lua>
Carlos O'Donell f2d402
-- In the postun we always remove the locale cache.
Carlos O'Donell f2d402
-- We are being uninstalled and if this is an upgrade
Carlos O'Donell f2d402
-- then the new packages template will be used to
Carlos O'Donell f2d402
-- recreate a new copy of the cache.
9edc2b
os.remove("%{_prefix}/lib/locale/locale-archive")
cvsdist c381c2
Carlos O'Donell 6e8e9f
%if %{with docs}
cvsdist c381c2
%post devel
Andreas Schwab 713def
/sbin/install-info %{_infodir}/libc.info.gz %{_infodir}/dir > /dev/null 2>&1 || :
Carlos O'Donell 6e8e9f
%endif
cvsdist c381c2
cvsdist c381c2
%pre headers
cvsdist c381c2
# this used to be a link and it is causing nightmares now
cvsdist c381c2
if [ -L %{_prefix}/include/scsi ] ; then
ffc48a
  rm -f %{_prefix}/include/scsi
cvsdist c381c2
fi
cvsdist c381c2
Carlos O'Donell 6e8e9f
%if %{with docs}
cvsdist c381c2
%preun devel
cvsdist c381c2
if [ "$1" = 0 ]; then
Andreas Schwab 713def
  /sbin/install-info --delete %{_infodir}/libc.info.gz %{_infodir}/dir > /dev/null 2>&1 || :
cvsdist c381c2
fi
Carlos O'Donell 6e8e9f
%endif
cvsdist c381c2
cvsdist c381c2
%pre -n nscd
Andreas Schwab 08541d
getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r nscd
Andreas Schwab 08541d
getent passwd nscd >/dev/null ||
Andreas Schwab 08541d
  /usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \
Andreas Schwab 08541d
		    -c "NSCD Daemon" -u 28 -g nscd nscd
cvsdist c381c2
cvsdist c381c2
%post -n nscd
f8556b
%systemd_post nscd.service
cvsdist c381c2
cvsdist c381c2
%preun -n nscd
f8556b
%systemd_preun nscd.service
cvsdist c381c2
cvsdist c381c2
%postun -n nscd
Andreas Schwab 389eed
if test $1 = 0; then
ffc48a
  /usr/sbin/userdel nscd > /dev/null 2>&1 || :
cvsdist c381c2
fi
f8556b
%systemd_postun_with_restart nscd.service
cvsdist c381c2
cvsdist c381c2
%files -f rpm.filelist
63769b
%dir %{_prefix}/%{_lib}/audit
18aa46
%if %{buildpower6}
b8e476
%dir /%{_lib}/power6
b8e476
%dir /%{_lib}/power6x
18aa46
%endif
Carlos O'Donell 130c49
%if %{buildpower7}
Carlos O'Donell 130c49
%dir /%{_lib}/power7
Carlos O'Donell 130c49
%endif
Carlos O'Donell 130c49
%if %{buildpower8}
Carlos O'Donell 130c49
%dir /%{_lib}/power8
Carlos O'Donell 130c49
%endif
cvsdist c381c2
%ifarch s390x
b8e476
/lib/ld64.so.1
cvsdist c381c2
%endif
cvsdist c381c2
%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf
cvsdist c381c2
%verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf
Andreas Schwab 809a54
%verify(not md5 size mtime) %config(noreplace) /etc/rpc
cvsdist 195182
%dir /etc/ld.so.conf.d
ef031d
%dir %{_prefix}/libexec/getconf
0d1d15
%dir %{_libdir}/gconv
50740a
%dir %attr(0700,root,root) /var/cache/ldconfig
50740a
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/cache/ldconfig/aux-cache
cvsdist 4a201b
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache
Andreas Schwab d047b3
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf
8ca6f6
%doc README NEWS INSTALL elf/rtld-debugger-interface.txt
Carlos O'Donell 6e8e9f
# If rpm doesn't support %license, then use %doc instead.
e653c3
%{!?_licensedir:%global license %%doc}
e653c3
%license COPYING COPYING.LIB LICENSES
cvsdist c381c2
cvsdist c381c2
%ifnarch %{auxarches}
cvsdist c381c2
%files -f common.filelist common
111d75
%dir %{_prefix}/lib/locale
Carlos O'Donell 0457f6
%dir %{_prefix}/lib/locale/C.utf8
Carlos O'Donell 0457f6
%{_prefix}/lib/locale/C.utf8/*
7ad97b
%doc documentation/README.timezone
7ad97b
%doc documentation/gai.conf
cvsdist c381c2
Carlos O'Donell f2d402
%files all-langpacks
Carlos O'Donell f2d402
%attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive.tmpl
Carlos O'Donell f2d402
%attr(0644,root,root) %verify(not md5 size mtime mode) %ghost %config(missingok,noreplace) %{_prefix}/lib/locale/locale-archive
Carlos O'Donell f2d402
9edc2b
%files locale-source
9edc2b
%dir %{_prefix}/share/i18n/locales
9edc2b
%{_prefix}/share/i18n/locales/*
9edc2b
%dir %{_prefix}/share/i18n/charmaps
9edc2b
%{_prefix}/share/i18n/charmaps/*
9edc2b
cvsdist c381c2
%files -f devel.filelist devel
cvsdist c381c2
65bf1c
%files -f static.filelist static
65bf1c
cvsdist c381c2
%files -f headers.filelist headers
cvsdist c381c2
cvsdist c381c2
%files -f utils.filelist utils
cvsdist c381c2
cvsdist c381c2
%files -f nscd.filelist -n nscd
cvsdist c381c2
%config(noreplace) /etc/nscd.conf
cfeb07
%dir %attr(0755,root,root) /var/run/nscd
cfeb07
%dir %attr(0755,root,root) /var/db/nscd
b8e476
/lib/systemd/system/nscd.service
b8e476
/lib/systemd/system/nscd.socket
Siddhesh Poyarekar 944ed5
%{_tmpfilesdir}/nscd.conf
cfeb07
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid
cfeb07
%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket
cfeb07
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd
cfeb07
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group
cfeb07
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts
9893fa
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/services
cfeb07
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/passwd
cfeb07
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/group
cfeb07
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/hosts
9893fa
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/services
63b6b6
%ghost %config(missingok,noreplace) /etc/sysconfig/nscd
cvsdist c381c2
%endif
cvsdist c381c2
d5e9ea
%files -f nss_db.filelist -n nss_db
d3da0e
/var/db/Makefile
d5e9ea
%files -f nss_hesiod.filelist -n nss_hesiod
d5e9ea
%doc hesiod/README.hesiod
d5e9ea
%files -f nss-devel.filelist nss-devel
d5e9ea
b8bc11
%files -f libnsl.filelist -n libnsl
b8bc11
/%{_lib}/libnsl.so.1
b8bc11
Andreas Schwab 237bb9
%if 0%{?_enable_debug_packages}
cvsdist c381c2
%files debuginfo -f debuginfo.filelist
cvsdist c381c2
%ifarch %{debuginfocommonarches}
cvsdist c381c2
%ifnarch %{auxarches}
cvsdist c381c2
%files debuginfo-common -f debuginfocommon.filelist
cvsdist c381c2
%endif
cvsdist c381c2
%endif
cvsdist c381c2
%endif
cvsdist c381c2
Carlos O'Donell 6e8e9f
%if %{with benchtests}
Siddhesh Poyarekar 67b30d
%files benchtests -f benchtests.filelist
Siddhesh Poyarekar 67b30d
%endif
Siddhesh Poyarekar 67b30d
cvsdist c381c2
%changelog
9dc918
* Thu Mar 29 2018 Florian Weimer <fweimer@redhat.com> - 2.27-7
157a63
- Enable annobin on Red Hat Enterprise Linux
9dc918
- Auto-sync with upstream branch release/2.27/master,
9dc918
  commit 55ad82e45c313454de657931898e974a7a036cad:
9dc918
- i386: Fix memmove issue (swbz#22644)
9dc918
- RISC-V: fmax/fmin: Handle signalling NaNs correctly (swbz#22884)
9dc918
- RISC-V: Do not initialize $gp in TLS macros
9dc918
- cs_CZ locale: Add alternative month names (swbz#22963)
9dc918
- Greek (el_CY, el_GR) locales: Introduce ab_alt_mon (swbz#22937)
9dc918
- lt_LT locale: Update abbreviated month names (swbz#22932)
9dc918
- ca_ES locale: Update LC_TIME (swbz#22848)
9dc918
- i386: Fix i386 sigaction sa_restorer initialization (swbz#21269)
9dc918
- Fix multiple definitions of __nss_*_database (swbz#22918)
9dc918
- Fix netgroup cache keys (swbz#22342)
9dc918
- linux/powerpc: sync sys/ptrace.h with Linux 4.15 (swbz#22433, swbz#22807)
9dc918
- powerpc: Undefine Linux ptrace macros that conflict with __ptrace_request
9dc918
- Add missing “reorder-end” in LC_COLLATE of et_EE (swbz#22517)
9dc918
- linux/aarch64: sync sys/ptrace.h with Linux 4.15 (swbz#22433)
9dc918
- [RISC-V] Fix parsing flags in ELF64 files (swbz#22827)
9dc918
8ce0b9
* Fri Mar  2 2018 Florian Weimer <fweimer@redhat.com> - 2.27-6
8ce0b9
- Collation update and sync with CLDR (#1551009)
8ce0b9
d92633
* Wed Feb 28 2018 Florian Weimer <fweimer@redhat.com> - 2.27-5
b8a227
- Inherit as many flags as possible from redhat-rpm-config (#1550914)
d92633
16398f
* Mon Feb 19 2018 Richard W.M. Jones <rjones@redhat.com> - 2.27-4
16398f
- riscv64: Add symlink from /usr/lib64/lp64d -> /usr/lib64 for ABI compat.
ee109a
- riscv64: Disable valgrind smoke test on this architecture.
16398f
4c06a8
* Wed Feb 14 2018 Florian Weimer <fweimer@redhat.com> - 2.27-3
4c06a8
- Spec file cleanups:
4c06a8
  - Remove %%defattr(-,root,root)
4c06a8
  - Use shell to run ldconfig %%transfiletrigger
4c06a8
  - Move %%transfiletrigger* to the glibc-common subpackage
4c06a8
  - Trim changelog
4c06a8
  - Include ChangeLog.old in the source RPM
4c06a8
55adfe
* Wed Feb  7 2018 Florian Weimer <fweimer@redhat.com> - 2.27-2.1
55adfe
- Linux: use reserved name __key in pkey_get (#1542643)
55adfe
- Auto-sync with upstream branch release/2.27/master,
55adfe
  commit 56170e064e2b21ce204f0817733e92f1730541ea.
55adfe
cefed5
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org>
cefed5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
cefed5
Carlos O'Donell 587bed
* Mon Feb 05 2018 Carlos O'Donell <carlos@redhat.com> - 2.27-1
Carlos O'Donell 587bed
- Update to released glibc 2.27.
Carlos O'Donell 587bed
- Auto-sync with upstream branch master,
Carlos O'Donell 587bed
  commit 23158b08a0908f381459f273a984c6fd328363cb.
Carlos O'Donell 587bed
72c4f8
* Tue Jan 30 2018 Richard W.M. Jones <rjones@redhat.com> - 2.26.9000-52
f80578
- Disable -fstack-clash-protection on riscv64:
f80578
  not supported even by GCC 7.3.1 on this architecture.
f80578
6ff958
* Mon Jan 29 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-51
6ff958
- Explicitly run ldconfig in the buildroot
6ff958
- Do not run ldconfig from scriptlets
6ff958
- Put triggers into the glibc-common package, do not pass arguments to ldconfig
6ff958
48a716
* Mon Jan 29 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-50
48a716
- Auto-sync with upstream branch master,
48a716
  commit cdd14619a713ab41e26ba700add4880604324dbb:
48a716
- libnsl: Turn remaining symbols into compat symbols (swbz#22701)
48a716
- be_BY, be_BY@latin, lt_LT, el_CY, el_GR, ru_RU, ru_UA, uk_UA:
48a716
  Add alternative month names (swbz#10871)
48a716
- x86: Revert Intel CET changes to __jmp_buf_tag (swbz#22743)
48a716
- aarch64: Revert the change of the __reserved member of mcontext_t
48a716
1f24fb
* Mon Jan 29 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.26.9000-49
1f24fb
- Add file triggers to do ldconfig calls automatically
1f24fb
6777c3
* Mon Jan 22 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-48
6777c3
- Auto-sync with upstream branch master,
6777c3
  commit 21c0696cdef617517de6e25711958c40455c554f:
6777c3
- locale: Implement alternative month names (swbz#10871)
6777c3
- locale: Change month names for pl_PL (swbz#10871)
6777c3
928670
* Mon Jan 22 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-47
928670
- Unconditionally build without libcrypt
928670
b8b738
* Fri Jan 19 2018 Björn Esser <besser82@fedoraproject.org> - 2.26.9000-46
2687b3
- Remove deprecated libcrypt, gets replaced by libxcrypt
2687b3
- Add applicable Requires on libxcrypt
2687b3
36e865
* Fri Jan 19 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-45
36e865
- Drop static PIE support on aarch64.  It leads to crashes at run time.
6a5972
- Remove glibc-rpcgen subpackage.  See rpcsvc-proto.  (#1531540)
36e865
fac98a
* Fri Jan 19 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-44
a4166c
- Correct the list of static PIE architectures (#1247050)
fac98a
- glibc_post_upgrade: Remove process restart logic
fac98a
- glibc_post_upgrade: Integrate into the build process
fac98a
- glibc_post_upgrade: Do not clean up tls subdirectories
fac98a
- glibc_post_upgrade: Drop ia64 support
fac98a
- Remove architecture-specific symbolic link for iconvconfig
fac98a
- Auto-sync with upstream branch master,
fac98a
  commit 4612268a0ad8e3409d8ce2314dd2dd8ee0af5269:
fac98a
- powerpc: Fix syscalls during early process initialization (swbz#22685)
fac98a
0f4d3e
* Fri Jan 19 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-43
a4166c
- Enable static PIE support on i386, x86_64 (#1247050)
0f4d3e
- Remove add-on support (already gone upstream)
0f4d3e
- Rework test suite status reporting
0f4d3e
- Auto-sync with upstream branch master,
0f4d3e
  commit 64f63cb4583ecc1ba16c7253aacc192b6d088511:
0f4d3e
- malloc: Fix integer overflows in memalign and malloc functions (swbz#22343)
0f4d3e
- x86-64: Properly align La_x86_64_retval to VEC_SIZE (swbz#22715)
0f4d3e
- aarch64: Update bits/hwcap.h for Linux 4.15
0f4d3e
- Add NT_ARM_SVE to elf.h
0f4d3e
90612b
* Wed Jan 17 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-42
90612b
- CVE-2017-14062, CVE-2016-6261, CVE-2016-6263:
90612b
  Use libidn2 for IDNA support (#1452750)
90612b
d7ce5d
* Mon Jan 15 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-41
d7ce5d
- CVE-2018-1000001: Make getcwd fail if it cannot obtain an absolute path
d7ce5d
  (#1533837)
d7ce5d
- elf: Synchronize DF_1_* flags with binutils (#1439328)
d7ce5d
- Auto-sync with upstream branch master,
d7ce5d
  commit 860b0240a5645edd6490161de3f8d1d1f2786025:
d7ce5d
- aarch64: fix static pie enabled libc when main is in a shared library
d7ce5d
- malloc: Ensure that the consolidated fast chunk has a sane size
d7ce5d
d84b03
* Fri Jan 12 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-40
d84b03
- libnsl: Do not install libnsl.so, libnsl.a (#1531540)
d84b03
- Use unversioned Supplements: for langpacks (#1490725)
d84b03
- Auto-sync with upstream branch master,
d84b03
  commit 9a08a366a7e7ddffe62113a9ffe5e50605ea0924:
d84b03
- hu_HU locale: Avoid double space (swbz#22657)
d84b03
- math: Make default libc_feholdsetround_noex_ctx use __feholdexcept
d84b03
  (swbz#22702)
d84b03
538e3e
* Thu Jan 11 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-39
538e3e
- nptl: Open libgcc.so with RTLD_NOW during pthread_cancel (#1527887)
538e3e
- Introduce libnsl subpackage and remove NIS headers (#1531540)
538e3e
- Use versioned Obsoletes: for libcrypt-nss.
538e3e
- Auto-sync with upstream branch master,
538e3e
  commit 08c6e95234c60a5c2f37532d1111acf084f39345:
538e3e
- nptl: Add tst-minstack-cancel, tst-minstack-exit (swbz#22636)
538e3e
- math: ldbl-128ibm log1pl (-qNaN) spurious "invalid" exception (swbz#22693)
538e3e
9e28c4
* Wed Jan 10 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-38
9e28c4
- nptl: Fix stack guard size accounting (#1527887)
9e28c4
- Remove invalid Obsoletes: on glibc-header provides
9e28c4
- Require python3 instead of python during builds
9e28c4
- Auto-sync with upstream branch master,
9e28c4
  commit 09085ede12fb9650f286bdcd805609ae69f80618:
9e28c4
- math: ldbl-128ibm lrintl/lroundl missing "invalid" exceptions (swbz#22690)
9e28c4
- x86-64: Add sincosf with vector FMA
9e28c4
a28112
* Mon Jan  8 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-37
a28112
- Add glibc-rpcgen subpackage, until the replacement is packaged (#1531540)
a28112
1042b5
* Mon Jan 08 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-36
1042b5
- Auto-sync with upstream branch master,
1042b5
  commit 579396ee082565ab5f42ff166a264891223b7b82:
1042b5
- nptl: Add test for callee-saved register restore in pthread_exit
1042b5
- getrlimit64: fix for 32-bit configurations with default version >= 2.2
1042b5
- elf: Add linux-4.15 VDSO hash for RISC-V
1042b5
- elf: Add RISC-V dynamic relocations to elf.h
1042b5
- powerpc: Fix error message during relocation overflow
1042b5
- prlimit: Replace old_rlimit RLIM64_INFINITY with RLIM_INFINITY (swbz#22678)
1042b5
cf072e
* Fri Jan 05 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-35
cf072e
- Remove sln (#1531546)
cf072e
- Remove Sun RPC interfaces (#1531540)
cf072e
- Rebuild with newer GCC to fix pthread_exit stack unwinding issue (#1529549)
cf072e
- Auto-sync with upstream branch master,
cf072e
  commit f1a844ac6389ea4e111afc019323ca982b5b027d:
cf072e
- CVE-2017-16997: elf: Check for empty tokens before DST expansion (#1526866)
cf072e
- i386: In makecontext, align the stack before calling exit (swbz#22667)
cf072e
- x86, armhfp: sync sys/ptrace.h with Linux 4.15 (swbz#22433)
cf072e
- elf: check for rpath emptiness before making a copy of it
cf072e
- elf: remove redundant is_path argument
cf072e
- elf: remove redundant code from is_dst
cf072e
- elf: remove redundant code from _dl_dst_substitute
cf072e
- scandir: fix wrong assumption about errno (swbz#17804)
cf072e
- Deprecate external use of libio.h and _G_config.h
cf072e
39b4cf
* Fri Dec 22 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-34
39b4cf
- Auto-sync with upstream branch master,
39b4cf
  commit bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f:
39b4cf
- copy_file_range: New function to copy file data
39b4cf
- nptl: Consolidate pthread_{timed,try}join{_np}
39b4cf
- nptl: Implement pthread_self in libc.so (swbz#22635)
39b4cf
- math: Provide a C++ version of iseqsig (swbz#22377)
39b4cf
- elf: remove redundant __libc_enable_secure check from fillin_rpath
39b4cf
- math: Avoid signed shift overflow in pow (swbz#21309)
39b4cf
- x86: Add feature_1 to tcbhead_t (swbz#22563)
39b4cf
- x86: Update cancel_jmp_buf to match __jmp_buf_tag (swbz#22563)
39b4cf
- ld.so: Examine GLRO to detect inactive loader (swbz#20204)
39b4cf
- nscd: Fix nscd readlink argument aliasing (swbz#22446)
39b4cf
- elf: do not substitute dst in $LD_LIBRARY_PATH twice (swbz#22627)
39b4cf
- ldconfig: set LC_COLLATE to C (swbz#22505)
39b4cf
- math: New generic sincosf
39b4cf
- powerpc: st{r,p}cpy optimization for aligned strings
39b4cf
- CVE-2017-1000409: Count in expanded path in _dl_init_path (#1524867)
39b4cf
- CVE-2017-1000408: Compute correct array size in _dl_init_paths (#1524867)
39b4cf
- x86-64: Remove sysdeps/x86_64/fpu/s_cosf.S
39b4cf
- aarch64: Improve strcmp unaligned performance
39b4cf
a5a750
* Wed Dec 13 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-33
a5a750
- Remove power6 platform directory (#1522675)
a5a750
94e38e
* Wed Dec 13 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-32
08930d
- Obsolete the libcrypt-nss subpackage (#1525396)
29bd4d
- armhfp: Disable -fstack-clash-protection due to GCC bug (#1522678)
ac6724
- ppc64: Disable power6 multilib due to GCC bug (#1522675)
94e38e
- Auto-sync with upstream branch master,
94e38e
  commit 243b63337c2c02f30ec3a988ecc44bc0f6ffa0ad:
94e38e
- libio: Free backup area when it not required (swbz#22415)
94e38e
- math: Fix nextafter and nexttoward declaration (swbz#22593)
94e38e
- math: New generic cosf
94e38e
- powerpc: POWER8 memcpy optimization for cached memory
94e38e
- x86-64: Add sinf with FMA
94e38e
- x86-64: Remove sysdeps/x86_64/fpu/s_sinf.S
94e38e
- math: Fix ctanh (0 + i NaN), ctanh (0 + i Inf) (swbz#22568)
94e38e
- lt_LT locale: Base collation on copy "iso14651_t1" (swbz#22524)
94e38e
- math: Add _Float32 function aliases
94e38e
- math: Make cacosh (0 + iNaN) return NaN + i pi/2 (swbz#22561)
94e38e
- hsb_DE locale: Base collation on copy "iso14651_t1" (swbz#22515)
94e38e
3c78a5
* Wed Dec 06 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-31
9d8de7
- Add elision tunables.  Drop related configure flag.  (#1383986)
3c78a5
- Auto-sync with upstream branch master,
3c78a5
  commit 37ac8e635a29810318f6d79902102e2e96b2b5bf:
3c78a5
- Linux: Implement interfaces for memory protection keys
3c78a5
- math: Add _Float64, _Float32x function aliases
3c78a5
- math: Use sign as double for reduced case in sinf
3c78a5
- math: fix sinf(NAN)
3c78a5
- math: s_sinf.c: Replace floor with simple casts
3c78a5
- et_EE locale: Base collation on iso14651_t1 (swbz#22517)
3c78a5
- tr_TR locale: Base collation on iso14651_t1 (swbz#22527)
3c78a5
- hr_HR locale: Avoid single code points for digraphs in LC_TIME (swbz#10580)
3c78a5
- S390: Fix backtrace in vdso functions
3c78a5
bb83f9
* Mon Dec 04 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-30
bb83f9
- Add build dependency on bison
bb83f9
- Auto-sync with upstream branch master,
bb83f9
  commit 7863a7118112fe502e8020a0db0fa74fef281f29:
bb83f9
- math: New generic sinf (swbz#5997)
bb83f9
- is_IS locale: Base collation on iso14651_t1 (swbz#22519)
bb83f9
- intl: Improve reproducibility by using bison (swbz#22432)
bb83f9
- sr_RS, bs_BA locales: make collation rules the same as for hr_HR (wbz#22534)
bb83f9
- hr_HR locale: various updates (swbz#10580)
bb83f9
- x86: Make a space in jmpbuf for shadow stack pointer
d19bd2
- CVE-2017-17426: malloc: Fix integer overflow in tcache (swbz#22375)
bb83f9
- locale: make forward accent sorting the default in collating (swbz#17750)
bb83f9
776ca0
* Wed Nov 29 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-29
00b734
- Enable -fstack-clash-protection (#1512531)
776ca0
- Auto-sync with upstream branch master,
776ca0
  commit a55430cb0e261834ce7a4e118dd9e0f2b7fb14bc:
776ca0
- elf: Properly compute offsets of note descriptor and next note (swbz#22370)
776ca0
- cs_CZ locale: Base collation on iso14651_t1 (swbz#22336)
776ca0
- Implement the mlock2 function
776ca0
- Add _Float64x function aliases
776ca0
- elf: Consolidate link map sorting
776ca0
- pl_PL locale: Base collation on iso14651_t1 (swbz#22469)
776ca0
- nss: Export nscd hash function as __nss_hash (swbz#22459)
776ca0
10c1ba
* Thu Nov 23 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-28
10c1ba
- Auto-sync with upstream branch master,
10c1ba
  commit cccb6d4e87053ed63c74aee063fa84eb63ebf7b8:
10c1ba
- sigwait can fail with EINTR (#1516394)
10c1ba
- Add memfd_create function
10c1ba
- resolv: Fix p_secstodate overflow handling (swbz#22463)
10c1ba
- resolv: Obsolete p_secstodate
10c1ba
- Avoid use of strlen in getlogin_r (swbz#22447)
10c1ba
- lv_LV locale: fix collation (swbz#15537)
10c1ba
- S390: Add cfi information for start routines in order to stop unwinding
10c1ba
- aarch64: Optimized memset for falkor
10c1ba
df5476
* Sun Nov 19 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-27
df5476
- Auto-sync with upstream branch master,
df5476
  commit f6e965ee94b37289f64ecd3253021541f7c214c3:
df5476
- powerpc: AT_HWCAP2 bit PPC_FEATURE2_HTM_NO_SUSPEND
df5476
- aarch64: Add HWCAP_DCPOP bit
df5476
- ttyname, ttyname_r: Don't bail prematurely (swbz#22145)
df5476
- signal: Optimize sigrelse implementation
df5476
- inet: Check length of ifname in if_nametoindex (swbz#22442)
df5476
- malloc: Account for all heaps in an arena in malloc_info (swbz#22439)
df5476
- malloc: Add missing arena lock in malloc_info (swbz#22408)
df5476
- malloc: Use __builtin_tgmath in tgmath.h with GCC 8 (swbz#21660)
df5476
- locale: Replaced unicode sequences in the ASCII printable range
df5476
- resolv: More precise checks in res_hnok, res_dnok (swbz#22409, swbz#22412)
df5476
- resolv: ns_name_pton should report trailing \ as error (swbz#22413)
df5476
- locale: mfe_MU, miq_NI, an_ES, kab_DZ, om_ET: Escape / in d_fmt (swbz#22403)
df5476
0980ba
* Tue Nov 07 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-26
0980ba
- Auto-sync with upstream branch master,
0980ba
  commit 6b86036452b9ac47b4ee7789a50f2f37df7ecc4f:
0980ba
- CVE-2017-15804: glob: Fix buffer overflow during GLOB_TILDE unescaping
0980ba
- powerpc: Use latest string function optimization for internal function calls
0980ba
- math: No _Float128 support for ppc64le -mlong-double-64 (swbz#22402)
0980ba
- tpi_PG locale: Fix wrong d_fmt
0980ba
- aarch64: Disable lazy symbol binding of TLSDESC
0980ba
- tpi_PG locale: fix syntax error (swbz#22382)
0980ba
- i586: Use conditional branches in strcpy.S (swbz#22353)
0980ba
- ffsl, ffsll: Declare under __USE_MISC, not just __USE_GNU
0980ba
- csb_PL locale: Fix abmon/mon for March (swbz#19485)
0980ba
- locale: Various yesstr/nostr/yesexpr/noexpr fixes (swbz#15260, swbz#15261)
0980ba
- localedef: Add --no-warnings/--warnings option
0980ba
- powerpc: Replace lxvd2x/stxvd2x with lvx/stvx in P7's memcpy/memmove
0980ba
- locale: Use ASCII as much as possible in LC_MESSAGES
0980ba
- Add new locale yuw_PG (swbz#20952)
0980ba
- malloc: Add single-threaded path to malloc/realloc/calloc/memalloc
0980ba
- i386: Replace assembly versions of e_powf with generic e_powf.c
0980ba
- i386: Replace assembly versions of e_log2f with generic e_log2f.c
0980ba
- x86-64: Add powf with FMA
0980ba
- x86-64: Add logf with FMA
0980ba
- i386: Replace assembly versions of e_logf with generic e_logf.c
0980ba
- i386: Replace assembly versions of e_exp2f with generic e_exp2f.c
0980ba
- x86-64: Add exp2f with FMA
0980ba
- i386: Replace assembly versions of e_expf with generic e_expf.c
0980ba
e74f2b
* Sat Oct 21 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-25
e74f2b
- Auto-sync with upstream branch master,
e74f2b
  commit 797ba44ba27521261f94cc521f1c2ca74f650147:
e74f2b
- math: Add bits/floatn.h defines for more _FloatN / _FloatNx types
e74f2b
- posix: Fix improper assert in Linux posix_spawn (swbz#22273)
e74f2b
- x86-64: Use fxsave/xsave/xsavec in _dl_runtime_resolve (swbz#21265)
e74f2b
- CVE-2017-15670: glob: Fix one-byte overflow (#1504807)
e74f2b
- malloc: Add single-threaded path to _int_free
e74f2b
- locale: Add new locale kab_DZ (swbz#18812)
e74f2b
- locale: Add new locale shn_MM (swbz#13605)
e74f2b
5188e8
* Fri Oct 20 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-24
5188e8
- Use make -O to serialize make output
5188e8
- Auto-sync with upstream branch master,
5188e8
  commit 63b4baa44e8d22501c433c4093aa3310f91b6aa2:
5188e8
- sysconf: Fix missing definition of UIO_MAXIOV on Linux (#1504165)
5188e8
- Install correct bits/long-double.h for MIPS64 (swbz#22322)
5188e8
- malloc: Fix deadlock in _int_free consistency check
5188e8
- x86-64: Don't set GLRO(dl_platform) to NULL (swbz#22299)
5188e8
- math: Add _Float128 function aliases
5188e8
- locale: Add new locale mjw_IN (swbz#13994)
5188e8
- aarch64: Rewrite elf_machine_load_address using _DYNAMIC symbol
5188e8
- powerpc: fix check-before-set in SET_RESTORE_ROUND
5188e8
- locale: Use U+202F as thousands separators in pl_PL locale (swbz#16777)
5188e8
- math: Use __f128 to define FLT128_* constants in include/float.h for old GCC
5188e8
- malloc: Improve malloc initialization sequence (swbz#22159)
5188e8
- malloc: Use relaxed atomics for malloc have_fastchunks
5188e8
- locale: New locale ca_ES@valencia (swbz#2522)
5188e8
- math: Let signbit use the builtin in C++ mode with gcc < 6.x (swbz#22296)
5188e8
- locale: Place monetary symbol in el_GR, el_CY after the amount (swbz#22019)
5188e8
d4b46d
* Tue Oct 17 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-23
7fbb58
- Switch to .9000 version numbers during development
d4b46d
d4b46d
* Tue Oct 17 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-22
7fbb58
- Auto-sync with upstream branch master,
7fbb58
  commit c38a4bfd596db2be2b9c1f96715bdc833eab760a:
7fbb58
- malloc: Use compat_symbol_reference in libmcheck (swbz#22050)
7fbb58
6c2a58
* Mon Oct 16 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-21
6c2a58
- Auto-sync with upstream branch master,
6c2a58
  commit 596f70134a8f11967c65c1d55a94a3a2718c731d:
6c2a58
- Silence -O3 -Wall warning in malloc/hooks.c with GCC 7 (swbz#22052)
6c2a58
- locale: No warning for non-symbolic character (swbz#22295)
6c2a58
- locale: Allow "" int_curr_Symbol (swbz#22294)
6c2a58
- locale: Fix localedef exit code (swbz#22292)
6c2a58
- nptl: Preserve error in setxid thread broadcast in coredumps (swbz#22153)
6c2a58
- powerpc: Avoid putting floating point values in memory (swbz#22189)
6c2a58
- powerpc: Fix the carry bit on mpn_[add|sub]_n on POWER7 (swbz#22142)
6c2a58
- Support profiling PIE (swbz#22284)
6c2a58
b1ee10
* Wed Oct 11 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-20
b1ee10
- Auto-sync with upstream branch master,
b1ee10
  commit d8425e116cdd954fea0c04c0f406179b5daebbb3:
b1ee10
- nss_files performance issue in multi mode (swbz#22078)