djdelorie / rpms / glibc

Forked from rpms/glibc 3 years ago
Clone
769d807
%define glibcsrcdir glibc-2.27-56-g50df56ca86
Carlos O'Donell 587bed9
%define glibcversion 2.27
769d807
%define glibcrelease 15%{?dist}
Siddhesh Poyarekar 5817231
# Pre-release tarballs are pulled in from git using a command that is
Siddhesh Poyarekar 5817231
# effectively:
Siddhesh Poyarekar 5817231
#
Siddhesh Poyarekar 5817231
# git archive HEAD --format=tar --prefix=$(git describe --match 'glibc-*')/ \
Siddhesh Poyarekar 5817231
#	> $(git describe --match 'glibc-*').tar
Siddhesh Poyarekar 5817231
# gzip -9 $(git describe --match 'glibc-*').tar
Siddhesh Poyarekar 5817231
#
Siddhesh Poyarekar 5817231
# glibc_release_url is only defined when we have a release tarball.
3bd5cf3
%{lua: if string.match(rpm.expand("%glibcsrcdir"), "^glibc%-[0-9.]+$") then
3bd5cf3
  rpm.define("glibc_release_url https://ftp.gnu.org/gnu/glibc/") end}
9abcefa
##############################################################################
c57221c
# We support the following options:
Carlos O'Donell 6e8e9f6
# --with/--without,
Carlos O'Donell 6e8e9f6
# * testsuite - Running the testsuite.
Carlos O'Donell 6e8e9f6
# * benchtests - Running and building benchmark subpackage.
Carlos O'Donell 6e8e9f6
# * bootstrap - Bootstrapping the package.
Carlos O'Donell 6e8e9f6
# * werror - Build with -Werror
Carlos O'Donell 6e8e9f6
# * docs - Build with documentation and the required dependencies.
Carlos O'Donell 6e8e9f6
# * valgrind - Run smoke tests with valgrind to verify dynamic loader.
Carlos O'Donell 6e8e9f6
#
Carlos O'Donell 6e8e9f6
# You must always run the testsuite for production builds.
Carlos O'Donell 6e8e9f6
# Default: Always run the testsuite.
Carlos O'Donell 6e8e9f6
%bcond_without testsuite
Carlos O'Donell 6e8e9f6
# Default: Always build the benchtests.
Carlos O'Donell 6e8e9f6
%bcond_without benchtests
Carlos O'Donell 6e8e9f6
# Default: Not bootstrapping.
Carlos O'Donell 6e8e9f6
%bcond_with bootstrap
Carlos O'Donell 6e8e9f6
# Default: Enable using -Werror
Carlos O'Donell 6e8e9f6
%bcond_without werror
Carlos O'Donell 6e8e9f6
# Default: Always build documentation.
Carlos O'Donell 6e8e9f6
%bcond_without docs
Carlos O'Donell 6e8e9f6
# Default: Always run valgrind tests
Carlos O'Donell 6e8e9f6
%bcond_without valgrind
Carlos O'Donell 6e8e9f6
Carlos O'Donell 6e8e9f6
# Run a valgrind smoke test to ensure that the release is compatible and
Carlos O'Donell 6e8e9f6
# doesn't any new feature that might cause valgrind to abort.
Carlos O'Donell 6e8e9f6
%if %{with valgrind}
ee109af
%ifarch s390 ppc64 ppc64p7 %{mips} riscv64
ee109af
# There is no valgrind support for 31-bit s390, nor for MIPS, nor RISC-V.
0647659
# The valgrind test does not work on ppc64, ppc64p7 (bug 1273103).
Carlos O'Donell 6e8e9f6
%undefine with_valgrind
Carlos O'Donell 6e8e9f6
%endif
Carlos O'Donell 6e8e9f6
%endif
Carlos O'Donell 6e8e9f6
%if %{with bootstrap}
Carlos O'Donell 6e8e9f6
# Disable benchtests, -Werror, docs, and valgrind if we're bootstrapping
Carlos O'Donell 6e8e9f6
%undefine with_benchtests
Carlos O'Donell 6e8e9f6
%undefine with_werror
Carlos O'Donell 6e8e9f6
%undefine with_docs
Carlos O'Donell 6e8e9f6
%undefine with_valgrind
Siddhesh Poyarekar 5d3d5d4
%endif
9abcefa
##############################################################################
9abcefa
# Auxiliary arches are those arches that can be built in addition
9abcefa
# to the core supported arches. You either install an auxarch or
9abcefa
# you install the base arch, not both. You would do this in order
9abcefa
# to provide a more optimized version of the package for your arch.
c1407c8
%define auxarches athlon alphaev6
9abcefa
##############################################################################
Carlos O'Donell 130c497
# We support only 64-bit POWER with the following runtimes:
Carlos O'Donell 130c497
# 64-bit BE:
Carlos O'Donell 130c497
# - Power 620 / 970 ISA (default runtime, compatile with POWER4 and newer)
Carlos O'Donell 130c497
#	- Provided for the large number of PowerPC G5 users.
Carlos O'Donell 130c497
#	- IFUNC support provides optimized core routines for POWER6,
Carlos O'Donell 130c497
#	  POWER7, and POWER8 transparently (if not using specific runtimes
Carlos O'Donell 130c497
#	  below)
Carlos O'Donell 130c497
# - POWER6 (has power6x symlink to power6, enabled via AT_PLATFORM)
Carlos O'Donell 130c497
#	- Legacy for old systems. Should be deprecated at some point soon.
Carlos O'Donell 130c497
# - POWER7 (enabled via AT_PLATFORM)
Carlos O'Donell 130c497
#	- Existing deployments.
Carlos O'Donell 130c497
# - POWER8 (enabled via AT_PLATFORM)
Carlos O'Donell 130c497
#	- Latest generation.
Carlos O'Donell 130c497
# 64-bit LE:
Carlos O'Donell 130c497
# - POWER8 LE (default)
Carlos O'Donell 130c497
#	- Latest generation.
Carlos O'Donell 130c497
#
Carlos O'Donell 130c497
# No 32-bit POWER support is provided.
Carlos O'Donell 130c497
#
Carlos O'Donell 130c497
# There are currently no plans for POWER9 enablement, but as hardware and
Carlos O'Donell 130c497
# upstream support become available this will be reviewed.
Carlos O'Donell 130c497
#
Carlos O'Donell 130c497
%ifarch ppc64
Carlos O'Donell 130c497
# Build the additional runtimes for 64-bit BE POWER.
ac67247
%define buildpower6 0
Carlos O'Donell 130c497
%define buildpower7 1
Carlos O'Donell 130c497
%define buildpower8 1
18aa46f
%else
Carlos O'Donell 130c497
# No additional runtimes for ppc64le or ppc64p7, just the default.
18aa46f
%define buildpower6 0
Carlos O'Donell 130c497
%define buildpower7 0
Carlos O'Donell 130c497
%define buildpower8 0
18aa46f
%endif
Carlos O'Donell b60f740
cc5db6c
# Only some architectures have static PIE support.
a4166cd
%define pie_arches %{ix86} x86_64
cc5db6c
9abcefa
##############################################################################
9abcefa
# Any architecture/kernel combination that supports running 32-bit and 64-bit
9abcefa
# code in userspace is considered a biarch arch.
Carlos O'Donell 130c497
%define biarcharches %{ix86} x86_64 %{power64} s390 s390x
9abcefa
##############################################################################
9abcefa
# If the debug information is split into two packages, the core debuginfo
9abcefa
# pacakge and the common debuginfo package then the arch should be listed
9abcefa
# here. If the arch is not listed here then a single core debuginfo package
9abcefa
# will be created for the architecture.
Andreas Schwab 87a7e49
%define debuginfocommonarches %{biarcharches} alpha alphaev6
9abcefa
##############################################################################
9abcefa
# %%package glibc - The GNU C Library (glibc) core package.
9abcefa
##############################################################################
ffc48ad
Summary: The GNU libc libraries
cvsdist c381c23
Name: glibc
Andreas Schwab 237bb90
Version: %{glibcversion}
55adfec
Release: %{glibcrelease}
9214828
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
9214828
# Things that are linked directly into dynamically linked programs
9214828
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
9214828
# exception which allows linking it into any kind of programs or shared
9214828
# libraries without restrictions.
9214828
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
Andreas Schwab 68ea17c
URL: http://www.gnu.org/software/glibc/
f79eb1f
Source0: %{?glibc_release_url}%{glibcsrcdir}.tar.gz
Siddhesh Poyarekar 17b00fb
Source1: build-locale-archive.c
Siddhesh Poyarekar 17b00fb
Source4: nscd.conf
Siddhesh Poyarekar 17b00fb
Source7: nsswitch.conf
Siddhesh Poyarekar 17b00fb
Source8: power6emul.c
Siddhesh Poyarekar 67b30d7
Source9: bench.mk
Siddhesh Poyarekar 67b30d7
Source10: glibc-bench-compare
5a04553
# A copy of localedata/SUPPORTED in the Source0 tarball.  The
a92e3b7
# SUPPORTED file is used below to generate the list of locale
5a04553
# packages, using a Lua snippet.
9edc2b6
Source11: SUPPORTED
92f265f
29d1004
# Include in the source RPM for reference.
29d1004
Source12: ChangeLog.old
29d1004
9abcefa
##############################################################################
9abcefa
# Start of glibc patches
9abcefa
##############################################################################
92f265f
# 0000-0999 for patches which are unlikely to ever go upstream or which
92f265f
# have not been analyzed to see if they ought to go upstream yet.
bf6cb48
#
bf6cb48
# 1000-2000 for patches that are already upstream.
92f265f
#
92f265f
# 2000-3000 for patches that are awaiting upstream approval
92f265f
#
92f265f
# Yes, I realize this means some gratutious changes as patches to from
92f265f
# one bucket to another, but I find this scheme makes it easier to track
92f265f
# the upstream divergence and patches needing approval.
92f265f
#
92f265f
# Note that we can still apply the patches in any order we see fit, so
92f265f
# the changes from one bucket to another won't necessarily result in needing
92f265f
# to twiddle the patch because of dependencies on prior patches and the like.
92f265f
92f265f
6b37058
##############################################################################
92f265f
#
6b37058
# Patches that are unlikely to go upstream or not yet analyzed.
92f265f
#
6b37058
##############################################################################
665e71f
737f7e8
Patch1: glibc-post_upgrade.patch
737f7e8
Patch2: glibc-fedora-nscd.patch
92f265f
0a21292
# All these were from the glibc-fedora.patch mega-patch and need another
0a21292
# round of reviewing.  Ideally they'll either be submitted upstream or
0a21292
# dropped.
Carlos O'Donell 33fde86
Patch0012: glibc-fedora-linux-tcsetattr.patch
Carlos O'Donell 33fde86
Patch0014: glibc-fedora-nptl-linklibc.patch
Carlos O'Donell 33fde86
Patch0015: glibc-fedora-localedef.patch
Carlos O'Donell 33fde86
Patch0019: glibc-fedora-nis-rh188246.patch
Carlos O'Donell 33fde86
Patch0020: glibc-fedora-manual-dircategory.patch
Carlos O'Donell 33fde86
Patch0024: glibc-fedora-locarchive.patch
Carlos O'Donell 33fde86
Patch0025: glibc-fedora-streams-rh436349.patch
Carlos O'Donell 33fde86
Patch0028: glibc-fedora-localedata-rh61908.patch
Carlos O'Donell 33fde86
Patch0031: glibc-fedora-__libc_multiple_libcs.patch
384f5b1
c2021d0
# Allow applications to call pthread_atfork without libpthread.so.
Carlos O'Donell 33fde86
Patch0046: glibc-rh1013801.patch
c2021d0
Carlos O'Donell 33fde86
Patch0047: glibc-nscd-sysconfig.patch
Siddhesh Poyarekar bdbcf83
Siddhesh Poyarekar b80bba4
# confstr _CS_PATH should only return /usr/bin on Fedora since /bin is just a
Siddhesh Poyarekar b80bba4
# symlink to it.
Carlos O'Donell 33fde86
Patch0053: glibc-cs-path.patch
Siddhesh Poyarekar b80bba4
Carlos O'Donell 0457f64
# Add C.UTF-8 locale into /usr/lib/locale/
Carlos O'Donell 0457f64
Patch0059: glibc-c-utf8-locale.patch
Carlos O'Donell 0457f64
6b37058
##############################################################################
92f265f
#
92f265f
# Patches from upstream
92f265f
#
6b37058
##############################################################################
6b37058
6b37058
##############################################################################
92f265f
#
92f265f
# Patches submitted, but not yet approved upstream.
6b37058
#
6b37058
##############################################################################
6b37058
#
92f265f
# Each should be associated with a BZ.
92f265f
# Obviously we're not there right now, but that's the goal
92f265f
#
6b37058
0a21292
# http://sourceware.org/ml/libc-alpha/2012-12/msg00103.html
Carlos O'Donell 33fde86
Patch2007: glibc-rh697421.patch
92f265f
Carlos O'Donell 33fde86
Patch2013: glibc-rh741105.patch
92f265f
dd8ae6f
# Upstream BZ 14247
Carlos O'Donell 33fde86
Patch2023: glibc-rh827510.patch
dd8ae6f
200aebf
# Upstream BZ 14185
Carlos O'Donell 33fde86
Patch2027: glibc-rh819430.patch
Siddhesh Poyarekar 70cc4d3
Carlos O'Donell 33fde86
Patch2031: glibc-rh1070416.patch
Siddhesh Poyarekar 52f69e7
9fce074
Patch2037: glibc-rh1315108.patch
90612b2
Patch2040: glibc-rh1452750-allocate_once.patch
90612b2
Patch2041: glibc-rh1452750-libidn2.patch
2687b3c
Patch2042: glibc-deprecate_libcrypt.patch
8ce0b90
Patch2043: glibc-collation-cldr-1.patch
8ce0b90
Patch2044: glibc-collation-cldr-2.patch
8ce0b90
Patch2045: glibc-collation-cldr-3.patch
8ce0b90
Patch2046: glibc-collation-cldr-4.patch
8ce0b90
Patch2047: glibc-collation-cldr-5.patch
8ce0b90
Patch2048: glibc-collation-cldr-6.patch
8ce0b90
Patch2049: glibc-collation-cldr-7.patch
8ce0b90
Patch2050: glibc-collation-cldr-8.patch
8ce0b90
Patch2051: glibc-collation-cldr-9.patch
8ce0b90
Patch2052: glibc-collation-cldr-10.patch
8ce0b90
Patch2053: glibc-collation-cldr-11.patch
8ce0b90
Patch2054: glibc-collation-cldr-12.patch
8ce0b90
Patch2055: glibc-collation-cldr-13.patch
8ce0b90
Patch2056: glibc-collation-cldr-14.patch
8ce0b90
Patch2057: glibc-collation-cldr-15.patch
9512708
Patch2058: glibc-python3.patch
2687b3c
9abcefa
##############################################################################
9abcefa
# End of glibc patches.
9abcefa
##############################################################################
200aebf
9abcefa
##############################################################################
9abcefa
# Continued list of core "glibc" package information:
9abcefa
##############################################################################
ffc48ad
Obsoletes: glibc-profile < 2.4
cvsdist c381c23
Provides: ldconfig
9abcefa
754fe39
# The dynamic linker supports DT_GNU_HASH
754fe39
Provides: rtld(GNU_HASH)
cvsdist c381c23
Requires: glibc-common = %{version}-%{release}
9abcefa
87b6ed7
Requires(pre): basesystem
9abcefa
cvsdist e8590cd
# This is for building auxiliary programs like memusage, nscd
cvsdist c381c23
# For initial glibc bootstraps it can be commented out
Andreas Krebbel 71d4a02
%if %{without bootstrap}
Carlos O'Donell 6e8e9f6
BuildRequires: gd-devel libpng-devel zlib-devel
Andreas Krebbel 71d4a02
%endif
Carlos O'Donell 6e8e9f6
%if %{with docs}
Carlos O'Donell 6e8e9f6
# Removing texinfo will cause check-safety.sh test to fail because it seems to
Carlos O'Donell 6e8e9f6
# trigger documentation generation based on dependencies.  We need to fix this
Carlos O'Donell 6e8e9f6
# upstream in some way that doesn't depend on generating docs to validate the
Carlos O'Donell 6e8e9f6
# texinfo.  I expect it's simply the wrong dependency for that target.
238627a
BuildRequires: texinfo >= 5.0
Carlos O'Donell 6e8e9f6
%endif
Carlos O'Donell 6e8e9f6
%if %{without bootstrap}
Carlos O'Donell 6e8e9f6
BuildRequires: libselinux-devel >= 1.33.4-3
Carlos O'Donell 6e8e9f6
%endif
Carlos O'Donell 6e8e9f6
BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext
Carlos O'Donell 0457f64
# We need procps-ng (/bin/ps), util-linux (/bin/kill), and gawk (/bin/awk),
Carlos O'Donell 0457f64
# but it is more flexible to require the actual programs and let rpm infer
Carlos O'Donell 0457f64
# the packages. However, until bug 1259054 is widely fixed we avoid the
Carlos O'Donell 0457f64
# following:
Carlos O'Donell 0457f64
# BuildRequires: /bin/ps, /bin/kill, /bin/awk
Carlos O'Donell 0457f64
# And use instead (which should be reverted some time in the future):
Carlos O'Donell 0457f64
BuildRequires: procps-ng, util-linux, gawk
Andreas Schwab c883c14
BuildRequires: systemtap-sdt-devel
9abcefa
Carlos O'Donell 6e8e9f6
%if %{with valgrind}
Carlos O'Donell 0457f64
# Require valgrind for smoke testing the dynamic loader to make sure we
Carlos O'Donell 0457f64
# have not broken valgrind.
Mark Wielaard 05146e3
BuildRequires: valgrind
Siddhesh Poyarekar e9a7f4c
%endif
Siddhesh Poyarekar e9a7f4c
Siddhesh Poyarekar 944ed51
# We use systemd rpm macros for nscd
Siddhesh Poyarekar 944ed51
BuildRequires: systemd
Siddhesh Poyarekar 944ed51
Carlos O'Donell 8544d3a
# We use python for the microbenchmarks and locale data regeneration from
Carlos O'Donell 8544d3a
# unicode sources (carried out manually). We choose python3 explicitly
Carlos O'Donell 8544d3a
# because it supports both use cases.
e15a681
BuildRequires: python3
37b7dfd
00b734f
# This GCC version is needed for -fstack-clash-protection support.
cf072ec
BuildRequires: gcc >= 7.2.1-6
fda3e07
%define enablekernel 3.2
Andreas Schwab 98c76af
Conflicts: kernel < %{enablekernel}
Andreas Schwab 444e2cc
%define target %{_target_cpu}-redhat-linux
Andreas Schwab 444e2cc
%ifarch %{arm}
Andreas Schwab 444e2cc
%define target %{_target_cpu}-redhat-linuxeabi
cvsdist 7abcfd3
%endif
98dddaf
%ifarch %{power64}
cffaeb6
%ifarch ppc64le
cffaeb6
%define target ppc64le-redhat-linux
cffaeb6
%else
98dddaf
%define target ppc64-redhat-linux
98dddaf
%endif
cffaeb6
%endif
9abcefa
e098446
# GNU make 4.0 introduced the -O option.
e098446
BuildRequires: make >= 4.0
e098446
bb83f92
# The intl subsystem generates a parser using bison.
bb83f92
BuildRequires: bison >= 2.7
bb83f92
a4166cd
# binutils 2.29 is needed for static PIE support in i386/x86_64.
a4166cd
BuildRequires: binutils >= 2.29
cd5e5a1
Andreas Schwab 677ba77
# Earlier releases have broken support for IRELATIVE relocations
Andreas Schwab 677ba77
Conflicts: prelink < 0.4.2
9abcefa
Andreas Schwab 237bb90
%if 0%{?_enable_debug_packages}
ffc48ad
BuildRequires: elfutils >= 0.72
ffc48ad
BuildRequires: rpm >= 4.2-0.56
cvsdist c381c23
%endif
9abcefa
Andreas Krebbel 71d4a02
%if %{without bootstrap}
Carlos O'Donell 8fdf674
%if %{with testsuite}
Carlos O'Donell 8fdf674
# The testsuite builds static C++ binaries that require a C++ compiler,
Carlos O'Donell 8fdf674
# static C++ runtime from libstdc++-static, and lastly static glibc.
Carlos O'Donell 6e8e9f6
BuildRequires: gcc-c++
dbc262b
BuildRequires: libstdc++-static
Carlos O'Donell 8fdf674
# A configure check tests for the ability to create static C++ binaries
Carlos O'Donell 8fdf674
# before glibc is built and therefore we need a glibc-static for that
Carlos O'Donell 8fdf674
# check to pass even if we aren't going to use any of those objects to
Carlos O'Donell 8fdf674
# build the tests.
Carlos O'Donell 8fdf674
BuildRequires: glibc-static
90612b2
90612b2
# libidn2 (but not libidn2-devel) is needed for testing AI_IDN/NI_IDN.
90612b2
BuildRequires: libidn2
Carlos O'Donell 8fdf674
%endif
Carlos O'Donell 8fdf674
%endif
dbc262b
9abcefa
# Filter out all GLIBC_PRIVATE symbols since they are internal to
8c7b7c2
# the package and should not be examined by any other tool.
Andreas Schwab 96f2a7b
%global __filter_GLIBC_PRIVATE 1
cvsdist c381c23
Carlos O'Donell f2d4020
# For language packs we have glibc require a virtual dependency
Carlos O'Donell f2d4020
# "glibc-langpack" wich gives us at least one installed langpack.
Carlos O'Donell f2d4020
# If no langpack providing 'glibc-langpack' was installed you'd
Carlos O'Donell f2d4020
# get all of them, and that would make the transition from a
Carlos O'Donell f2d4020
# system without langpacks smoother (you'd get all the locales
Carlos O'Donell f2d4020
# installed). You would then trim that list, and the trimmed list
Carlos O'Donell f2d4020
# is preserved. One problem is you can't have "no" locales installed,
Carlos O'Donell f2d4020
# in that case we offer a "glibc-minimal-langpack" sub-pakcage for
Carlos O'Donell f2d4020
# this purpose.
Carlos O'Donell f2d4020
Requires: glibc-langpack = %{version}-%{release}
Carlos O'Donell f2d4020
Suggests: glibc-all-langpacks = %{version}-%{release}
Carlos O'Donell f2d4020
cvsdist c381c23
%description
cvsdist c381c23
The glibc package contains standard libraries which are used by
cvsdist c381c23
multiple programs on the system. In order to save disk space and
cvsdist c381c23
memory, as well as to make upgrading easier, common system code is
cvsdist c381c23
kept in one place and shared between programs. This particular package
cvsdist c381c23
contains the most important sets of shared libraries: the standard C
cvsdist c381c23
library and the standard math library. Without these two libraries, a
cvsdist c381c23
Linux system will not function.
cvsdist c381c23
7ad97ba
######################################################################
b8bc11a
# libnsl subpackage
b8bc11a
######################################################################
b8bc11a
b8bc11a
%package -n libnsl
b8bc11a
Summary: Legacy support library for NIS
b8bc11a
Requires: %{name}%{_isa} = %{version}-%{release}
b8bc11a
b8bc11a
%description -n libnsl
b8bc11a
This package provides the legacy version of libnsl library, for
b8bc11a
accessing NIS services.
b8bc11a
b8bc11a
This library is provided for backwards compatibility only;
b8bc11a
applications should use libnsl2 instead to gain IPv6 support.
b8bc11a
9abcefa
##############################################################################
9abcefa
# glibc "devel" sub-package
9abcefa
##############################################################################
cvsdist c381c23
%package devel
cvsdist c381c23
Summary: Object files for development using standard C libraries.
ffc48ad
Requires(pre): /sbin/install-info
Andreas Schwab 237bb90
Requires(pre): %{name}-headers
Andreas Schwab 237bb90
Requires: %{name}-headers = %{version}-%{release}
ffc48ad
Requires: %{name} = %{version}-%{release}
9d1bb0a
Requires: libgcc%{_isa}
2687b3c
Requires: libxcrypt-devel%{_isa} >= 4.0.0
cvsdist c381c23
cvsdist c381c23
%description devel
cvsdist c381c23
The glibc-devel package contains the object files necessary
cvsdist c381c23
for developing programs which use the standard C libraries (which are
cvsdist c381c23
used by nearly all programs).  If you are developing programs which
cvsdist c381c23
will use the standard C libraries, your system needs to have these
cvsdist c381c23
standard object files available in order to create the
cvsdist c381c23
executables.
cvsdist c381c23
cvsdist c381c23
Install glibc-devel if you are going to develop programs which will
cvsdist c381c23
use the standard C libraries.
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# glibc "static" sub-package
9abcefa
##############################################################################
65bf1c4
%package static
65bf1c4
Summary: C library static libraries for -static linking.
65bf1c4
Requires: %{name}-devel = %{version}-%{release}
2687b3c
Requires: libxcrypt-static%{?_isa} >= 4.0.0
65bf1c4
65bf1c4
%description static
65bf1c4
The glibc-static package contains the C library static libraries
65bf1c4
for -static linking.  You don't need these, unless you link statically,
65bf1c4
which is highly discouraged.
65bf1c4
9abcefa
##############################################################################
9abcefa
# glibc "headers" sub-package
Carlos O'Donell e63fda9
# - The headers package includes all common headers that are shared amongst
Carlos O'Donell e63fda9
#   the multilib builds. It was created to reduce the download size, and
Carlos O'Donell e63fda9
#   thus avoid downloading one header package per multilib. The package is
Carlos O'Donell e63fda9
#   identical both in content and file list, any difference is an error.
Carlos O'Donell e63fda9
#   Files like gnu/stubs.h which have gnu/stubs-32.h (i686) and gnu/stubs-64.h
Carlos O'Donell e63fda9
#   are included in glibc-headers, but the -32 and -64 files are in their
Carlos O'Donell e63fda9
#   respective i686 and x86_64 devel packages.
9abcefa
##############################################################################
cvsdist c381c23
%package headers
cvsdist c381c23
Summary: Header files for development using standard C libraries.
cvsdist c381c23
Provides: %{name}-headers(%{_target_cpu})
ffc48ad
Requires(pre): kernel-headers
4465bbc
Requires: kernel-headers >= 2.2.1, %{name} = %{version}-%{release}
fda3e07
BuildRequires: kernel-headers >= 3.2
cvsdist c381c23
cvsdist c381c23
%description headers
cvsdist c381c23
The glibc-headers package contains the header files necessary
cvsdist c381c23
for developing programs which use the standard C libraries (which are
cvsdist c381c23
used by nearly all programs).  If you are developing programs which
cvsdist c381c23
will use the standard C libraries, your system needs to have these
cvsdist c381c23
standard header files available in order to create the
cvsdist c381c23
executables.
cvsdist c381c23
cvsdist c381c23
Install glibc-headers if you are going to develop programs which will
cvsdist c381c23
use the standard C libraries.
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# glibc "common" sub-package
9abcefa
##############################################################################
cvsdist c381c23
%package common
cvsdist c381c23
Summary: Common binaries and locale data for glibc
e5e8f77
Requires: %{name} = %{version}-%{release}
cvsdist c381c23
Requires: tzdata >= 2003a
cvsdist c381c23
cvsdist c381c23
%description common
cvsdist c381c23
The glibc-common package includes common binaries for the GNU libc
cvsdist c381c23
libraries, as well as national language (locale) support.
cvsdist c381c23
c09c662
######################################################################
c09c662
# File triggers to do ldconfig calls automatically (see rhbz#1380878)
c09c662
######################################################################
c09c662
c09c662
# File triggers for when libraries are added or removed in standard
28e47fe
# paths.
28e47fe
%transfiletriggerin common -P 2000000 -- /lib /usr/lib /lib64 /usr/lib64
28e47fe
/sbin/ldconfig
c09c662
%end
c09c662
28e47fe
%transfiletriggerpostun common -P 2000000 -- /lib /usr/lib /lib64 /usr/lib64
28e47fe
/sbin/ldconfig
c09c662
%end
c09c662
c09c662
# We need to run ldconfig manually because ldconfig cannot handle the
c09c662
# relative include path in the /etc/ld.so.conf file we gneerate.
c09c662
%undefine __brp_ldconfig
c09c662
c09c662
######################################################################
c09c662
9edc2b6
%package locale-source
9edc2b6
Summary: The sources for the locales
9edc2b6
Requires: %{name} = %{version}-%{release}
9edc2b6
Requires: %{name}-common = %{version}-%{release}
9edc2b6
9edc2b6
%description locale-source
9edc2b6
The sources for all locales provided in the language packs.
9edc2b6
If you are building custom locales you will most likely use
9edc2b6
these sources as the basis for your new locale.
9edc2b6
9df6505
%{lua:
746617c
-- Array of languages (ISO-639 codes).
746617c
local languages = {}
746617c
-- Dictionary from language codes (as in the languages array) to arrays
746617c
-- of regions.
746617c
local supplements = {}
746617c
do
746617c
   -- Parse the SUPPORTED file.  Eliminate duplicates.
746617c
   local lang_region_seen = {}
746617c
   for line in io.lines(rpm.expand("%{SOURCE11}")) do
746617c
      -- Match lines which contain a language (eo) or language/region
746617c
      -- (en_US) strings.
746617c
      local lang_region = string.match(line, "^([a-z][^/@.]+)")
746617c
      if lang_region ~= nil then
746617c
	 if lang_region_seen[lang_region] == nil then
746617c
	    lang_region_seen[lang_region] = true
746617c
746617c
	    -- Split language/region pair.
746617c
	    local lang, region = string.match(lang_region, "^(.+)_(.+)")
746617c
	    if lang == nil then
746617c
	       -- Region is missing, use only the language.
746617c
	       lang = lang_region
746617c
	    end
746617c
	    local suppl = supplements[lang]
746617c
	    if suppl == nil then
746617c
	       suppl = {}
746617c
	       supplements[lang] = suppl
746617c
	       -- New language not seen before.
746617c
	       languages[#languages + 1] = lang
746617c
	    end
746617c
	    if region ~= nil then
746617c
	       -- New region because of the check against
746617c
	       -- lang_region_seen above.
746617c
	       suppl[#suppl + 1] = region
746617c
	    end
746617c
	 end
746617c
      end
746617c
   end
746617c
   -- Sort for determinism.
746617c
   table.sort(languages)
746617c
   for _, supples in pairs(supplements) do
746617c
      table.sort(supplements)
746617c
   end
746617c
end
746617c
746617c
-- Compute the Supplements: list for a language, based on the regions.
746617c
local function compute_supplements(lang)
746617c
   result = "langpacks-" .. lang
746617c
   regions = supplements[lang]
746617c
   if regions ~= nil then
746617c
      for i = 1, #regions do
746617c
	 result = result .. " or langpacks-" .. lang .. "_" .. regions[i]
746617c
      end
746617c
   end
746617c
   return result
746617c
end
746617c
746617c
-- Emit the definition of a language pack package.
746617c
local function lang_package(lang)
746617c
   local suppl = compute_supplements(lang)
746617c
   print(rpm.expand([[
746617c
746617c
%package langpack-]]..lang..[[
746617c
746617c
Summary: Locale data for ]]..lang..[[
746617c
746617c
Provides: glibc-langpack = %{version}-%{release}
746617c
Requires: %{name} = %{version}-%{release}
746617c
Requires: %{name}-common = %{version}-%{release}
684ac6e
Supplements: (glibc and (]]..suppl..[[))
746617c
%description langpack-]]..lang..[[
746617c
746617c
The glibc-langpack-]]..lang..[[ package includes the basic information required
746617c
to support the ]]..lang..[[ language in your applications.
746617c
%ifnarch %{auxarches}
746617c
%files -f langpack-]]..lang..[[.filelist langpack-]]..lang..[[
746617c
746617c
%endif
746617c
]]))
746617c
end
746617c
746617c
for i = 1, #languages do
746617c
   lang_package(languages[i])
746617c
end
9df6505
}
9edc2b6
Carlos O'Donell f2d4020
# The glibc-all-langpacks provides the virtual glibc-langpack,
Carlos O'Donell f2d4020
# and thus satisfies glibc's requirement for installed locales.
Carlos O'Donell f2d4020
# Users can add one more other langauge packs and then eventually
Carlos O'Donell f2d4020
# uninstall all-langpacks to save space.
9edc2b6
%package all-langpacks
Carlos O'Donell f2d4020
Summary: All language packs for %{name}.
Carlos O'Donell f2d4020
Requires: %{name} = %{version}-%{release}
Carlos O'Donell f2d4020
Requires: %{name}-common = %{version}-%{release}
Carlos O'Donell f2d4020
Provides: %{name}-langpack = %{version}-%{release}
9edc2b6
%description all-langpacks
Carlos O'Donell f2d4020
Carlos O'Donell f2d4020
# No %files, this is an empty pacakge. The C/POSIX and
Carlos O'Donell f2d4020
# C.UTF-8 files are already installed by glibc. We create
Carlos O'Donell f2d4020
# minimal-langpack because the virtual provide of
Carlos O'Donell f2d4020
# glibc-langpack needs at least one package installed
Carlos O'Donell f2d4020
# to satisfy it. Given that no-locales installed is a valid
Carlos O'Donell f2d4020
# use case we support it here with this package.
Carlos O'Donell f2d4020
%package minimal-langpack
Carlos O'Donell f2d4020
Summary: Minimal language packs for %{name}.
Carlos O'Donell f2d4020
Provides: glibc-langpack = %{version}-%{release}
Carlos O'Donell f2d4020
Requires: %{name} = %{version}-%{release}
Carlos O'Donell f2d4020
Requires: %{name}-common = %{version}-%{release}
Carlos O'Donell f2d4020
%description minimal-langpack
Carlos O'Donell f2d4020
This is a Meta package that is used to install minimal language packs.
Carlos O'Donell f2d4020
This package ensures you can use C, POSIX, or C.UTF-8 locales, but
Carlos O'Donell f2d4020
nothing else. It is designed for assembling a minimal system.
9edc2b6
%ifnarch %{auxarches}
Carlos O'Donell f2d4020
%files minimal-langpack
9edc2b6
%endif
9edc2b6
9abcefa
##############################################################################
9abcefa
# glibc "nscd" sub-package
9abcefa
##############################################################################
cvsdist c381c23
%package -n nscd
cvsdist c381c23
Summary: A Name Service Caching Daemon (nscd).
Andreas Schwab d047b37
Requires: %{name} = %{version}-%{release}
Carlos O'Donell 4f51555
%if %{without bootstrap}
Carlos O'Donell 6e8e9f6
Requires: libselinux >= 1.17.10-1
Carlos O'Donell 6e8e9f6
%endif
Carlos O'Donell 6e8e9f6
Requires: audit-libs >= 1.1.3
Andreas Schwab 389eedc
Requires(pre): /usr/sbin/useradd, coreutils
Siddhesh Poyarekar a383e78
Requires(post): systemd
Siddhesh Poyarekar a383e78
Requires(preun): systemd
Siddhesh Poyarekar a383e78
Requires(postun): systemd, /usr/sbin/userdel
cvsdist c381c23
cvsdist c381c23
%description -n nscd
b8bc11a
The nscd daemon caches name service lookups and can improve
b8bc11a
performance with LDAP, and may help with DNS as well.
cvsdist c381c23
9abcefa
##############################################################################
d5e9ea2
# Subpackages for NSS modules except nss_files, nss_dns
d5e9ea2
##############################################################################
d5e9ea2
d5e9ea2
%package -n nss_db
d5e9ea2
Summary: Name Service Switch (NSS) module using hash-indexed files
d5e9ea2
Requires: %{name}%{_isa} = %{version}-%{release}
d5e9ea2
d5e9ea2
%description -n nss_db
d5e9ea2
The nss_db Name Service Switch module uses hash-indexed files in /var/db
d5e9ea2
to speed up user, group, service, host name, and other NSS-based lookups.
d5e9ea2
d5e9ea2
%package -n nss_hesiod
d5e9ea2
Summary: Name Service Switch (NSS) module using Hesiod
d5e9ea2
Requires: %{name}%{_isa} = %{version}-%{release}
d5e9ea2
d5e9ea2
%description -n nss_hesiod
d5e9ea2
The nss_hesiod Name Service Switch module uses the Domain Name System
d5e9ea2
(DNS) as a source for user, group, and service information, following
d5e9ea2
the Hesiod convention of Project Athena.
d5e9ea2
d5e9ea2
%package nss-devel
d5e9ea2
Summary: Development files for directly linking NSS service modules
d5e9ea2
Requires: nss_db%{_isa} = %{version}-%{release}
d5e9ea2
Requires: nss_hesiod%{_isa} = %{version}-%{release}
d5e9ea2
d5e9ea2
%description nss-devel
d5e9ea2
The glibc-nss-devel package contains the object files necessary to
d5e9ea2
compile applications and libraries which directly link against NSS
d5e9ea2
modules supplied by glibc.
d5e9ea2
d5e9ea2
This is a rare and special use case; regular development has to use
d5e9ea2
the glibc-devel package instead.
d5e9ea2
d5e9ea2
##############################################################################
9abcefa
# glibc "utils" sub-package
9abcefa
##############################################################################
cvsdist c381c23
%package utils
cvsdist c381c23
Summary: Development utilities from GNU C library
ffc48ad
Requires: %{name} = %{version}-%{release}
cvsdist c381c23
cvsdist c381c23
%description utils
cvsdist c381c23
The glibc-utils package contains memusage, a memory usage profiler,
cvsdist c381c23
mtrace, a memory leak tracer and xtrace, a function call tracer
cvsdist c381c23
which can be helpful during program debugging.
cvsdist c381c23
cvsdist c381c23
If unsure if you need this, don't install this package.
cvsdist c381c23
8c7b7c2
##############################################################################
8c7b7c2
# glibc core "debuginfo" sub-package
8c7b7c2
##############################################################################
Andreas Schwab 237bb90
%if 0%{?_enable_debug_packages}
cvsdist c381c23
%define debug_package %{nil}
e74e801
%define __debug_install_post %{nil}
e74e801
%global __debug_package 1
Carlos O'Donell 8877992
# Disable thew new features that glibc packages don't use.
Carlos O'Donell 8877992
%undefine _debugsource_packages
Carlos O'Donell 8877992
%undefine _debuginfo_subpackages
Carlos O'Donell 8877992
%undefine _unique_debug_names
Carlos O'Donell 8877992
%undefine _unique_debug_srcs
cvsdist c381c23
cvsdist c381c23
%package debuginfo
cvsdist c381c23
Summary: Debug information for package %{name}
e0b4499
AutoReqProv: no
cvsdist c381c23
%ifarch %{debuginfocommonarches}
cvsdist c381c23
Requires: glibc-debuginfo-common = %{version}-%{release}
Andreas Schwab 50a0037
%else
c1407c8
%ifarch %{ix86} %{sparc}
Andreas Schwab 50a0037
Obsoletes: glibc-debuginfo-common
Andreas Schwab 50a0037
%endif
cvsdist c381c23
%endif
cvsdist c381c23
cvsdist c381c23
%description debuginfo
cvsdist c381c23
This package provides debug information for package %{name}.
cvsdist c381c23
Debug information is useful when developing applications that use this
cvsdist c381c23
package or when debugging this package.
cvsdist c381c23
cvsdist ce09106
This package also contains static standard C libraries with
cvsdist ce09106
debugging information.  You need this only if you want to step into
cvsdist ce09106
C library routines during debugging programs statically linked against
cvsdist ce09106
one or more of the standard C libraries.
cvsdist ce09106
To use this debugging information, you need to link binaries
0d1d15d
with -static -L%{_prefix}/lib/debug%{_libdir} compiler options.
cvsdist ce09106
9abcefa
##############################################################################
9abcefa
# glibc common "debuginfo-common" sub-package
9abcefa
##############################################################################
cvsdist c381c23
%ifarch %{debuginfocommonarches}
cvsdist c381c23
cvsdist c381c23
%package debuginfo-common
cvsdist c381c23
Summary: Debug information for package %{name}
e0b4499
AutoReqProv: no
cvsdist c381c23
cvsdist c381c23
%description debuginfo-common
cvsdist c381c23
This package provides debug information for package %{name}.
cvsdist c381c23
Debug information is useful when developing applications that use this
cvsdist c381c23
package or when debugging this package.
cvsdist c381c23
9abcefa
%endif # %{debuginfocommonarches}
9abcefa
%endif # 0%{?_enable_debug_packages}
cvsdist c381c23
Carlos O'Donell 6e8e9f6
%if %{with benchtests}
Siddhesh Poyarekar 67b30d7
%package benchtests
Siddhesh Poyarekar 67b30d7
Summary: Benchmarking binaries and scripts for %{name}
Siddhesh Poyarekar 67b30d7
%description benchtests
Siddhesh Poyarekar 67b30d7
This package provides built benchmark binaries and scripts to run
Siddhesh Poyarekar 67b30d7
microbenchmark tests on the system.
Siddhesh Poyarekar 67b30d7
%endif
Siddhesh Poyarekar 67b30d7
9abcefa
##############################################################################
9abcefa
# Prepare for the build.
9abcefa
##############################################################################
cvsdist c381c23
%prep
Siddhesh Poyarekar 17b00fb
%setup -q -n %{glibcsrcdir}
92f265f
Carlos O'Donell 6e8e9f6
# Patch order matters.
737f7e8
%patch1 -p1
737f7e8
%patch2 -p1
0a21292
%patch2007 -p1
03545a8
%patch0012 -p1
fdfcf25
%patch2013 -p1
a7ee17d
%patch0014 -p1
4e1a9eb
%patch0015 -p1
9625d85
%patch0019 -p1
9625d85
%patch0020 -p1
24dc568
%patch2023 -p1
9625d85
%patch0024 -p1
e781949
%patch0025 -p1
dd8ae6f
%patch2027 -p1
e3a9f69
%patch0028 -p1
fb633ea
%patch0031 -p1
c2021d0
%patch0046 -p1
Siddhesh Poyarekar bdbcf83
%patch2031 -p1
Siddhesh Poyarekar bdbcf83
%patch0047 -p1
Siddhesh Poyarekar b80bba4
%patch0053 -p1
Carlos O'Donell 0457f64
%patch0059 -p1
9fce074
%patch2037 -p1
90612b2
%patch2040 -p1
90612b2
%patch2041 -p1
2687b3c
%patch2042 -p1
8ce0b90
%patch2043 -p1
8ce0b90
%patch2044 -p1
8ce0b90
%patch2045 -p1
8ce0b90
%patch2046 -p1
8ce0b90
%patch2047 -p1
8ce0b90
%patch2048 -p1
8ce0b90
%patch2049 -p1
8ce0b90
%patch2050 -p1
8ce0b90
%patch2051 -p1
8ce0b90
%patch2052 -p1
8ce0b90
%patch2053 -p1
8ce0b90
%patch2054 -p1
8ce0b90
%patch2055 -p1
8ce0b90
%patch2056 -p1
8ce0b90
%patch2057 -p1
9512708
%patch2058 -p1
29b39d6
9abcefa
##############################################################################
9abcefa
# %%prep - Additional prep required...
9abcefa
##############################################################################
Siddhesh Poyarekar 67b30d7
# Make benchmark scripts executable
Siddhesh Poyarekar 67b30d7
chmod +x benchtests/scripts/*.py scripts/pylint
Siddhesh Poyarekar 67b30d7
9abcefa
# Remove all files generated from patching.
cvsdist c381c23
find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \;
9abcefa
9abcefa
# Ensure timestamps on configure files are current to prevent
9abcefa
# regenerating them.
cvsdist c381c23
touch `find . -name configure`
9abcefa
9abcefa
# Ensure *-kw.h files are current to prevent regenerating them.
da64eed
touch locale/programs/*-kw.h
cvsdist c381c23
a92e3b7
# Verify that our copy of localedata/SUPPORTED matches the glibc
a92e3b7
# version.
a92e3b7
#
5a04553
# The separate file copy is used by the Lua parser above.
a92e3b7
# Patches or new upstream versions may change the list of locales,
a92e3b7
# which changes the set of langpacks we need to build.  Verify the
a92e3b7
# differences then update the copy of SUPPORTED.  This approach has
a92e3b7
# two purposes: (a) avoid spurious changes to the set of langpacks,
5a04553
# and (b) the Lua snippet can use a fully patched-up version
a92e3b7
# of the localedata/SUPPORTED file.
43e96b9
diff -u %{SOURCE11} localedata/SUPPORTED
9edc2b6
9abcefa
##############################################################################
9abcefa
# Build glibc...
9abcefa
##############################################################################
cvsdist c381c23
%build
Carlos O'Donell 256beb3
# Log system information
Carlos O'Donell 256beb3
uname -a
9d8ea8c
LD_SHOW_AUXV=1 /bin/true
Carlos O'Donell 256beb3
cat /proc/cpuinfo
Carlos O'Donell 256beb3
cat /proc/meminfo
d4be858
df
9abcefa
8c7b7c2
# We build using the native system compilers.
cvsdist c381c23
GCC=gcc
e1fb04f
GXX=g++
9abcefa
081ef32
# Propagates the listed flags to BuildFlags if supplied by redhat-rpm-config.
081ef32
BuildFlags="-O2 -g"
081ef32
rpm_inherit_flags ()
081ef32
{
fb93b16
	local reference=" $* "
081ef32
	local flag
fb93b16
	for flag in $RPM_OPT_FLAGS $RPM_LD_FLAGS ; do
fb93b16
		if echo "$reference" | grep -q -F " $flag " ; then
081ef32
			BuildFlags="$BuildFlags $flag"
081ef32
		fi
081ef32
	done
081ef32
}
Carlos O'Donell b60f740
081ef32
# Propgate select compiler flags from redhat-rpm-config.  These flags
081ef32
# are target-dependent, so we use only those which are specified in
081ef32
# redhat-rpm-config.  We do not replicate the -march=/-mtune=
081ef32
# selection here because these match the defaults compiled into GCC.
081ef32
# We keep the -m32/-m32/-m64 flags to support multilib builds.
cvsdist c381c23
081ef32
rpm_inherit_flags \
081ef32
	"-fasynchronous-unwind-tables" \
081ef32
	"-fstack-clash-protection" \
081ef32
	"-funwind-tables" \
081ef32
	"-m31" \
081ef32
	"-m32" \
081ef32
	"-m64" \
512e087
	"-mstackrealign" \
157a638
%if 0%{?rhel} > 0
157a638
	"-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" \
157a638
%endif
66afdc6
61dc9c8
%if 0%{?rhel} > 0
61dc9c8
%ifarch i686
61dc9c8
BuildFlags="$BuildFlags -mstackrealign"
61dc9c8
%endif
61dc9c8
%endif
61dc9c8
66afdc6
##############################################################################
9abcefa
# %%build - Generic options.
9abcefa
##############################################################################
cvsdist c381c23
EnableKernel="--enable-kernel=%{enablekernel}"
9abcefa
# Save the used compiler and options into the file "Gcc" for use later
9abcefa
# by %%install.
2f520ca
echo "$GCC" > Gcc
cvsdist ce09106
9abcefa
##############################################################################
9abcefa
# build()
9abcefa
#	Build glibc in `build-%{target}$1', passing the rest of the arguments
9abcefa
#	as CFLAGS to the build (not the same as configure CFLAGS). Several
dc90541
#	global values are used to determine build flags, kernel version,
dc90541
#	system tap support, etc.
9abcefa
##############################################################################
Andreas Schwab 444e2cc
build()
a9d8ca8
{
081ef32
	local builddir=build-%{target}${1:+-$1}
d4d7eff
	${1+shift}
d4d7eff
	rm -rf $builddir
d4d7eff
	mkdir $builddir
d4d7eff
	pushd $builddir
081ef32
	../configure CC="$GCC" CXX="$GXX" CFLAGS="$BuildFlags $*" \
d4d7eff
		--prefix=%{_prefix} \
8ed8731
		--with-headers=%{_prefix}/include $EnableKernel \
8ed8731
		--enable-bind-now \
d4d7eff
		--build=%{target} \
4570c40
		--enable-stack-protector=strong \
cc5db6c
%ifarch %{pie_arches}
5163dbe
		--enable-static-pie \
5163dbe
%endif
c659285
		--enable-tunables \
d4d7eff
		--enable-systemtap \
Carlos O'Donell b60f740
		${core_with_options} \
ad9d2e1
%ifarch %{ix86}
ad9d2e1
		--disable-multi-arch \
ad9d2e1
%endif
Carlos O'Donell 6e8e9f6
%if %{without werror}
Carlos O'Donell 6e8e9f6
		--disable-werror \
Carlos O'Donell 6e8e9f6
%endif
Carlos O'Donell 6e8e9f6
		--disable-profile \
Carlos O'Donell 6e8e9f6
%if %{with bootstrap}
Carlos O'Donell 6e8e9f6
		--without-selinux \
Siddhesh Poyarekar 5d3d5d4
%endif
08930d1
		--disable-nss-crypt ||
d4d7eff
		{ cat config.log; false; }
Andreas Schwab f81c27d
081ef32
	make %{?_smp_mflags} -O -r
d4d7eff
	popd
a9d8ca8
}
a9d8ca8
9abcefa
##############################################################################
9abcefa
# Build glibc for the default set of options.
9abcefa
##############################################################################
Andreas Schwab 444e2cc
build
a9d8ca8
9abcefa
##############################################################################
9abcefa
# Build glibc for power6:
9abcefa
# If we support building a power6 alternate runtime then built glibc again for
9abcefa
# power6.
9abcefa
# XXX: We build in a sub-shell for no apparent reason.
9abcefa
##############################################################################
18aa46f
%if %{buildpower6}
18aa46f
(
d4d7eff
	platform=`LD_SHOW_AUXV=1 /bin/true | sed -n 's/^AT_PLATFORM:[[:blank:]]*//p'`
d4d7eff
	if [ "$platform" != power6 ]; then
2eb1503
		mkdir -p power6emul/{lib,lib64}
Siddhesh Poyarekar 17b00fb
		$GCC -shared -O2 -fpic -o power6emul/%{_lib}/power6emul.so %{SOURCE8} -Wl,-z,initfirst
18aa46f
%ifarch ppc64
2eb1503
		gcc -shared -nostdlib -O2 -fpic -m32 -o power6emul/lib/power6emul.so -xc - < /dev/null
18aa46f
%endif
2eb1503
		export LD_PRELOAD=`pwd`/power6emul/\$LIB/power6emul.so
d4d7eff
	fi
d4d7eff
	GCC="$GCC -mcpu=power6"
d4d7eff
	GXX="$GXX -mcpu=power6"
Carlos O'Donell b60f740
	core_with_options="--with-cpu=power6"
d4d7eff
	build power6
18aa46f
)
2eb1503
%endif # %{buildpower6}
18aa46f
Carlos O'Donell 130c497
%if %{buildpower7}
Carlos O'Donell 130c497
(
Carlos O'Donell 130c497
  GCC="$GCC -mcpu=power7 -mtune=power7"
Carlos O'Donell 130c497
  GXX="$GXX -mcpu=power7 -mtune=power7"
Carlos O'Donell b60f740
  core_with_options="--with-cpu=power7"
Carlos O'Donell 130c497
  build power7
Carlos O'Donell 130c497
)
Carlos O'Donell 130c497
%endif
Carlos O'Donell 130c497
Carlos O'Donell 130c497
%if %{buildpower8}
Carlos O'Donell 130c497
(
Carlos O'Donell 130c497
  GCC="$GCC -mcpu=power8 -mtune=power8"
Carlos O'Donell 130c497
  GXX="$GXX -mcpu=power8 -mtune=power8"
Carlos O'Donell b60f740
  core_with_options="--with-cpu=power8"
Carlos O'Donell 130c497
  build power8
Carlos O'Donell 130c497
)
Carlos O'Donell 130c497
%endif
Carlos O'Donell 130c497
9abcefa
##############################################################################
9abcefa
# Install glibc...
9abcefa
##############################################################################
cvsdist c381c23
%install
c13214a
c6e9927
# Remove existing file lists.
c6e9927
find . -type f -name '*.filelist' -exec rm -rf {} \;
c6e9927
c13214a
# Ensure the permissions of errlist.c do not change.  When the file is
c13214a
# regenerated the Makefile sets the permissions to 444. We set it to 644
c13214a
# to match what comes out of git. The tarball of the git archive won't have
c13214a
# correct permissions because git doesn't track all of the permissions
c13214a
# accurately (see git-cache-meta if you need that). We also set it to 644 to
c13214a
# match pre-existing rpms. We do this *after* the build because the build
c13214a
# might regenerate the file and set the permissions to 444.
c13214a
chmod 644 sysdeps/gnu/errlist.c
c13214a
9abcefa
# Reload compiler and build options that were used during %%build.
cvsdist c381c23
GCC=`cat Gcc`
cvsdist c381c23
16398fc
%ifarch riscv64
16398fc
# RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d.
16398fc
# Make these be symlinks to /lib64 or /usr/lib64 respectively.  See:
16398fc
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/DRHT5YTPK4WWVGL3GIN5BF2IKX2ODHZ3/
16398fc
for d in $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT/%{_lib}; do
16398fc
	mkdir -p $d
16398fc
	(cd $d && ln -sf . lp64d)
16398fc
done
16398fc
%endif
16398fc
c6e9927
# Build and install.
7bdfe15
make -j1 install_root=$RPM_BUILD_ROOT install -C build-%{target}
c6e9927
9abcefa
# If we are not building an auxiliary arch then install all of the supported
9abcefa
# locales.
cvsdist c381c23
%ifnarch %{auxarches}
7e232bd
pushd build-%{target}
e098446
make %{?_smp_mflags} -O install_root=$RPM_BUILD_ROOT \
d4d7eff
	install-locales -C ../localedata objdir=`pwd`
7e232bd
popd
cvsdist c381c23
%endif
cvsdist c381c23
71c008f
# install_different:
71c008f
#	Install all core libraries into DESTDIR/SUBDIR. Either the file is
71c008f
#	installed as a copy or a symlink to the default install (if it is the
71c008f
#	same). The path SUBDIR_UP is the prefix used to go from
71c008f
#	DESTDIR/SUBDIR to the default installed libraries e.g.
71c008f
#	ln -s SUBDIR_UP/foo.so DESTDIR/SUBDIR/foo.so.
71c008f
#	When you call this function it is expected that you are in the root
71c008f
#	of the build directory, and that the default build directory is:
71c008f
#	"../build-%{target}" (relatively).
71c008f
#	The primary use of this function is to install alternate runtimes
71c008f
#	into the build directory and avoid duplicating this code for each
71c008f
#	runtime.
71c008f
install_different()
71c008f
{
baa7ac6
	local lib libbase libbaseso dlib
71c008f
	local destdir="$1"
71c008f
	local subdir="$2"
71c008f
	local subdir_up="$3"
71c008f
	local libdestdir="$destdir/$subdir"
71c008f
	# All three arguments must be non-zero paths.
71c008f
	if ! [ "$destdir" \
71c008f
	       -a "$subdir" \
71c008f
	       -a "$subdir_up" ]; then
71c008f
		echo "One of the arguments to install_different was emtpy."
71c008f
		exit 1
71c008f
	fi
71c008f
	# Create the destination directory and the multilib directory.
71c008f
	mkdir -p "$destdir"
71c008f
	mkdir -p "$libdestdir"
71c008f
	# Walk all of the libraries we installed...
71c008f
	for lib in libc math/libm nptl/libpthread rt/librt nptl_db/libthread_db
71c008f
	do
71c008f
		libbase=${lib#*/}
71c008f
		# Take care that `libbaseso' has a * that needs expanding so
71c008f
		# take care with quoting.
b8e4762
		libbaseso=$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}-*.so)
71c008f
		# Only install if different from default build library.
71c008f
		if cmp -s ${lib}.so ../build-%{target}/${lib}.so; then
71c008f
			ln -sf "$subdir_up"/$libbaseso $libdestdir/$libbaseso
71c008f
		else
71c008f
			cp -a ${lib}.so $libdestdir/$libbaseso
71c008f
		fi
b8e4762
		dlib=$libdestdir/$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}.so.*)
71c008f
		ln -sf $libbaseso $dlib
71c008f
	done
71c008f
}
71c008f
9abcefa
##############################################################################
9abcefa
# Install the power6 build files.
9abcefa
##############################################################################
18aa46f
%if %{buildpower6}
71c008f
%define power6_subdir power6
71c008f
%define power6_subdir_up ..
71c008f
%define power6_legacy power6x
71c008f
%define power6_legacy_up ..
7e232bd
pushd build-%{target}-power6
71c008f
destdir=$RPM_BUILD_ROOT/%{_lib}
db59a63
install_different "$destdir" "%{power6_subdir}" "%{power6_subdir_up}"
71c008f
# Make a legacy /usr/lib[64]/power6x directory that is a symlink to the
71c008f
# power6 runtime.
71c008f
# XXX: When can we remove this? What is the history behind this?
71c008f
mkdir -p ${destdir}/%{power6_legacy}
71c008f
pushd ${destdir}/%{power6_legacy}
71c008f
ln -sf %{power6_legacy_up}/%{power6_subdir}/*.so .
71c008f
cp -a %{power6_legacy_up}/%{power6_subdir}/*.so.* .
1e072aa
popd
7e232bd
popd
2eb1503
%endif # %{buildpower6}
18aa46f
Carlos O'Donell 130c497
%if %{buildpower7}
Carlos O'Donell 130c497
%define power7_subdir power7
Carlos O'Donell 130c497
%define power7_subdir_up ..
Carlos O'Donell 130c497
pushd build-%{target}-power7
Carlos O'Donell 130c497
destdir=$RPM_BUILD_ROOT/%{_lib}
Carlos O'Donell 130c497
install_different "$destdir" "%{power7_subdir}" "%{power7_subdir_up}"
Carlos O'Donell 130c497
popd
Carlos O'Donell 130c497
%endif
Carlos O'Donell 130c497
Carlos O'Donell 130c497
%if %{buildpower8}
Carlos O'Donell 130c497
%define power8_subdir power8
Carlos O'Donell 130c497
%define power8_subdir_up ..
Carlos O'Donell 130c497
pushd build-%{target}-power8
Carlos O'Donell 130c497
destdir=$RPM_BUILD_ROOT/%{_lib}
Carlos O'Donell 130c497
install_different "$destdir" "%{power8_subdir}" "%{power8_subdir_up}"
Carlos O'Donell 130c497
popd
Carlos O'Donell 130c497
%endif
Carlos O'Donell 130c497
9abcefa
##############################################################################
cvsdist c381c23
# Remove the files we don't want to distribute
9abcefa
##############################################################################
9abcefa
9abcefa
# Remove the libNoVersion files.
9abcefa
# XXX: This looks like a bug in glibc that accidentally installed these
9abcefa
#      wrong files. We probably don't need this today.
0d1d15d
rm -f $RPM_BUILD_ROOT%{_libdir}/libNoVersion*
cvsdist c381c23
rm -f $RPM_BUILD_ROOT/%{_lib}/libNoVersion*
cvsdist c381c23
5a3b560
# Remove the old nss modules.
5a3b560
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss1-*
5a3b560
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss-*.so.1
24d9119
Colin Walters d8e1573
# This statically linked binary is no longer necessary in a world where
Colin Walters d8e1573
# the default Fedora install uses an initramfs, and further we have rpm-ostree
Colin Walters d8e1573
# which captures the whole userspace FS tree.
Colin Walters d8e1573
# Further, see https://github.com/projectatomic/rpm-ostree/pull/1173#issuecomment-355014583
Colin Walters d8e1573
rm -f ${RPM_BUILD_ROOT}/{usr/,}sbin/sln
Colin Walters d8e1573
6ff958f
######################################################################
6ff958f
# Run ldconfig to create all the symbolic links we need
6ff958f
######################################################################
6ff958f
6ff958f
# Note: This has to happen before creating /etc/ld.so.conf.
6ff958f
6ff958f
mkdir -p $RPM_BUILD_ROOT/var/cache/ldconfig
6ff958f
truncate -s 0 $RPM_BUILD_ROOT/var/cache/ldconfig/aux-cache
6ff958f
6ff958f
# ldconfig is statically linked, so we can use the new version.
6ff958f
${RPM_BUILD_ROOT}/sbin/ldconfig -N -r ${RPM_BUILD_ROOT}
6ff958f
8c7b7c2
##############################################################################
5a3b560
# Install info files
8c7b7c2
##############################################################################
8c7b7c2
Carlos O'Donell 6e8e9f6
%if %{with docs}
9abcefa
# Move the info files if glibc installed them into the wrong location.
cvsdist c381c23
if [ -d $RPM_BUILD_ROOT%{_prefix}/info -a "%{_infodir}" != "%{_prefix}/info" ]; then
ffc48ad
  mkdir -p $RPM_BUILD_ROOT%{_infodir}
ffc48ad
  mv -f $RPM_BUILD_ROOT%{_prefix}/info/* $RPM_BUILD_ROOT%{_infodir}
ffc48ad
  rm -rf $RPM_BUILD_ROOT%{_prefix}/info
cvsdist c381c23
fi
cvsdist c381c23
9abcefa
# Compress all of the info files.
cvsdist c381c23
gzip -9nvf $RPM_BUILD_ROOT%{_infodir}/libc*
Carlos O'Donell 8fdf674
Carlos O'Donell 8fdf674
%else
Carlos O'Donell 8fdf674
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
Carlos O'Donell 8fdf674
rm -f $RPM_BUILD_ROOT%{_infodir}/libc.info*
Carlos O'Donell 6e8e9f6
%endif
cvsdist c381c23
5a3b560
##############################################################################
9edc2b6
# Create locale sub-package file lists
5a3b560
##############################################################################
5a3b560
5a3b560
%ifnarch %{auxarches}
5a3b560
olddir=`pwd`
5a3b560
pushd ${RPM_BUILD_ROOT}%{_prefix}/lib/locale
37b5e6b
rm -f locale-archive
Carlos O'Donell f2d4020
# Intentionally we do not pass --alias-file=, aliases will be added
Carlos O'Donell f2d4020
# by build-locale-archive.
Carlos O'Donell f2d4020
$olddir/build-%{target}/elf/ld.so \
Carlos O'Donell f2d4020
        --library-path $olddir/build-%{target}/ \
Carlos O'Donell f2d4020
        $olddir/build-%{target}/locale/localedef \
Carlos O'Donell f2d4020
        --prefix ${RPM_BUILD_ROOT} --add-to-archive \
Carlos O'Donell f2d4020
        *_*
Carlos O'Donell f2d4020
# Setup the locale-archive template for use by glibc-all-langpacks.
Carlos O'Donell f2d4020
mv locale-archive{,.tmpl}
9edc2b6
# Create the file lists for the language specific sub-packages:
c8064eb
for i in eo *_*
9edc2b6
do
9edc2b6
    lang=${i%%_*}
9edc2b6
    if [ ! -e langpack-${lang}.filelist ]; then
9edc2b6
        echo "%dir %{_prefix}/lib/locale" >> langpack-${lang}.filelist
9edc2b6
    fi
9edc2b6
    echo "%dir  %{_prefix}/lib/locale/$i" >> langpack-${lang}.filelist
9edc2b6
    echo "%{_prefix}/lib/locale/$i/*" >> langpack-${lang}.filelist
9edc2b6
done
9edc2b6
popd
9edc2b6
pushd ${RPM_BUILD_ROOT}%{_prefix}/share/locale
9edc2b6
for i in */LC_MESSAGES/libc.mo
9edc2b6
do
9edc2b6
    locale=${i%%%%/*}
9edc2b6
    lang=${locale%%%%_*}
9edc2b6
    echo "%lang($lang) %{_prefix}/share/locale/${i}" \
9edc2b6
         >> ${RPM_BUILD_ROOT}%{_prefix}/lib/locale/langpack-${lang}.filelist
9edc2b6
done
5a3b560
popd
9edc2b6
mv  ${RPM_BUILD_ROOT}%{_prefix}/lib/locale/*.filelist .
5a3b560
%endif
cvsdist c381c23
9abcefa
##############################################################################
9abcefa
# Install configuration files for services
9abcefa
##############################################################################
9abcefa
Siddhesh Poyarekar 17b00fb
install -p -m 644 %{SOURCE7} $RPM_BUILD_ROOT/etc/nsswitch.conf
cvsdist c381c23
Andreas Schwab 2fa87be
%ifnarch %{auxarches}
cvsdist c381c23
# This is for ncsd - in glibc 2.2
cvsdist c381c23
install -m 644 nscd/nscd.conf $RPM_BUILD_ROOT/etc
Siddhesh Poyarekar 944ed51
mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
Siddhesh Poyarekar 17b00fb
install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}
b8e4762
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
Siddhesh Poyarekar bdbcf83
install -m 644 nscd/nscd.service nscd/nscd.socket $RPM_BUILD_ROOT/lib/systemd/system
Andreas Schwab 2fa87be
%endif
cvsdist c381c23
cvsdist c381c23
# Include ld.so.conf
cvsdist 195182b
echo 'include ld.so.conf.d/*.conf' > $RPM_BUILD_ROOT/etc/ld.so.conf
1d99c01
truncate -s 0 $RPM_BUILD_ROOT/etc/ld.so.cache
cvsdist c381c23
chmod 644 $RPM_BUILD_ROOT/etc/ld.so.conf
cvsdist ce09106
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
Andreas Schwab 2fa87be
%ifnarch %{auxarches}
63b6b66
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
1d99c01
truncate -s 0 $RPM_BUILD_ROOT/etc/sysconfig/nscd
1d99c01
truncate -s 0 $RPM_BUILD_ROOT/etc/gai.conf
Andreas Schwab 2fa87be
%endif
cvsdist c381c23
0d1d15d
# Include %{_libdir}/gconv/gconv-modules.cache
0d1d15d
truncate -s 0 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
0d1d15d
chmod 644 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
cvsdist c381c23
9abcefa
##############################################################################
5a3b560
# Misc...
9abcefa
##############################################################################
9abcefa
5a3b560
# Install the upgrade program
737f7e8
install -m 700 build-%{target}/elf/glibc_post_upgrade \
63769b1
  $RPM_BUILD_ROOT%{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu}
cae8344
5a3b560
# Strip all of the installed object files.
0d1d15d
strip -g $RPM_BUILD_ROOT%{_libdir}/*.o
5a3b560
9abcefa
##############################################################################
3bc8fa7
# Install debug copies of unstripped static libraries
3bc8fa7
# - This step must be last in order to capture any additional static
3bc8fa7
#   archives we might have added.
3bc8fa7
##############################################################################
3bc8fa7
3bc8fa7
# If we are building a debug package then copy all of the static archives
3bc8fa7
# into the debug directory to keep them as unstripped copies.
3bc8fa7
%if 0%{?_enable_debug_packages}
0d1d15d
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}
0d1d15d
cp -a $RPM_BUILD_ROOT%{_libdir}/*.a \
0d1d15d
	$RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/
0d1d15d
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/*_p.a
3bc8fa7
%endif
3bc8fa7
3bc8fa7
##############################################################################
9abcefa
# Build the file lists used for describing the package and subpackages.
9abcefa
##############################################################################
d5e9ea2
# There are several main file lists (and many more for
9edc2b6
# the langpack sub-packages (langpack-${lang}.filelist)):
9abcefa
# * rpm.fileslist
9abcefa
#	- Master file list. Eventually, after removing files from this list
9abcefa
#	  we are left with the list of files for the glibc package.
9abcefa
# * common.filelist
9abcefa
#	- Contains the list of flies for the common subpackage.
9abcefa
# * utils.filelist
9abcefa
#	- Contains the list of files for the utils subpackage.
9abcefa
# * nscd.filelist
9abcefa
#	- Contains the list of files for the nscd subpackage.
9abcefa
# * devel.filelist
9abcefa
#	- Contains the list of files for the devel subpackage.
9abcefa
# * headers.filelist
9abcefa
#	- Contains the list of files for the headers subpackage.
9abcefa
# * static.filelist
9abcefa
#	- Contains the list of files for the static subpackage.
b8bc11a
# * libnsl.filelist
b8bc11a
#       - Contains the list of files for the libnsl subpackage
b8bc11a
# * nss_db.filelist, nss_hesiod.filelist
d5e9ea2
#       - File lists for nss_* NSS module subpackages.
d5e9ea2
# * nss-devel.filelist
d5e9ea2
#       - File list with the .so symbolic links for NSS packages.
9abcefa
# * debuginfo.filelist
9abcefa
#	- Contains the list of files for the glibc debuginfo package.
9abcefa
# * debuginfocommon.filelist
9abcefa
#	- Contains the list of files for the glibc common debuginfo package.
9abcefa
#
9abcefa
Andreas Schwab 237bb90
{
Andreas Schwab 6843c2d
  find $RPM_BUILD_ROOT \( -type f -o -type l \) \
Andreas Schwab 237bb90
       \( \
Andreas Schwab 237bb90
	 -name etc -printf "%%%%config " -o \
Andreas Schwab 237bb90
	 -name gconv-modules \
Andreas Schwab 237bb90
	 -printf "%%%%verify(not md5 size mtime) %%%%config(noreplace) " -o \
Andreas Schwab 237bb90
	 -name gconv-modules.cache \
Andreas Schwab 237bb90
	 -printf "%%%%verify(not md5 size mtime) " \
Andreas Schwab 237bb90
	 , \
Andreas Schwab 6843c2d
	 ! -path "*/lib/debug/*" -printf "/%%P\n" \)
Siddhesh Poyarekar aeaedc4
  # Print all directories with a %%dir prefix.  We omit the info directory and
Siddhesh Poyarekar aeaedc4
  # all directories in (and including) /usr/share/locale.
Andreas Schwab 237bb90
  find $RPM_BUILD_ROOT -type d \
Siddhesh Poyarekar aeaedc4
       \( -path '*%{_prefix}/share/locale' -prune -o \
Carlos O'Donell 6e8e9f6
       \( -path '*%{_prefix}/share/*' \
Carlos O'Donell 6e8e9f6
%if %{with docs}
Carlos O'Donell 6e8e9f6
	! -path '*%{_infodir}' -o \
Carlos O'Donell 6e8e9f6
%endif
Andreas Schwab 976b178
	  -path "*%{_prefix}/include/*" \
Siddhesh Poyarekar aeaedc4
       \) -printf "%%%%dir /%%P\n" \)
Andreas Schwab 237bb90
} | {
Andreas Schwab 237bb90
Andreas Schwab 237bb90
  # primary filelist
Siddhesh Poyarekar 0cda723
9edc2b6
  # Also remove the *.mo entries.  We will add them to the
9edc2b6
  # language specific sub-packages.
d5e9ea2
  # libnss_ files go into subpackages related to NSS modules.
9edc2b6
  # and .*/share/i18n/charmaps/.*), they go into the sub-package
d5e9ea2
  # "locale-source":
Siddhesh Poyarekar 0cda723
  sed -e '\,.*/share/locale/\([^/_]\+\).*/LC_MESSAGES/.*\.mo,d' \
9edc2b6
      -e '\,.*/share/i18n/locales/.*,d' \
9edc2b6
      -e '\,.*/share/i18n/charmaps/.*,d' \
Andreas Schwab d047b37
      -e '\,/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\|rpc\|gai\.conf\),d' \
Andreas Schwab 237bb90
      -e '\,/%{_lib}/lib\(pcprofile\|memusage\)\.so,d' \
6a5972a
      -e '\,bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d'
Andreas Schwab 237bb90
} | sort > rpm.filelist
cvsdist c381c23
9edc2b6
touch common.filelist
Siddhesh Poyarekar 0cda723
b8e4762
mkdir -p $RPM_BUILD_ROOT%{_libdir}
b8e4762
mv -f $RPM_BUILD_ROOT/%{_lib}/lib{pcprofile,memusage}.so $RPM_BUILD_ROOT%{_libdir}
b8e4762
9abcefa
# The xtrace and memusage scripts have hard-coded paths that need to be
9abcefa
# translated to a correct set of paths using the $LIB token which is
9abcefa
# dynamically translated by ld.so as the default lib directory.
cvsdist c381c23
for i in $RPM_BUILD_ROOT%{_prefix}/bin/{xtrace,memusage}; do
Andreas Krebbel 71d4a02
%if %{with bootstrap}
Andreas Krebbel 71d4a02
  test -w $i || continue
Andreas Krebbel 71d4a02
%endif
0d1d15d
  sed -e 's~=/%{_lib}/libpcprofile.so~=%{_libdir}/libpcprofile.so~' \
0d1d15d
      -e 's~=/%{_lib}/libmemusage.so~=%{_libdir}/libmemusage.so~' \
29d3ac0
      -e 's~='\''/\\\$LIB/libpcprofile.so~='\''%{_prefix}/\\$LIB/libpcprofile.so~' \
29d3ac0
      -e 's~='\''/\\\$LIB/libmemusage.so~='\''%{_prefix}/\\$LIB/libmemusage.so~' \
Andreas Schwab 237bb90
      -i $i
cvsdist c381c23
done
cvsdist c381c23
Carlos O'Donell 6e8e9f6
%if %{with docs}
9abcefa
# Put the info files into the devel file list.
271728a
grep '%{_infodir}' < rpm.filelist | grep -v '%{_infodir}/dir' > devel.filelist
Carlos O'Donell 6e8e9f6
%endif
9abcefa
Carlos O'Donell e63fda9
# The glibc-headers package includes only common files which are identical
Carlos O'Donell e63fda9
# across all multilib packages. We must keep gnu/stubs.h and gnu/lib-names.h
Carlos O'Donell e63fda9
# in the glibc-headers package, but the -32, -64, -64-v1, and -64-v2 versions
Carlos O'Donell e63fda9
# go into the development packages.
Carlos O'Donell e63fda9
grep '%{_prefix}/include/gnu/stubs-.*\.h$' < rpm.filelist >> devel.filelist || :
Carlos O'Donell e63fda9
grep '%{_prefix}/include/gnu/lib-names-.*\.h$' < rpm.filelist >> devel.filelist || :
9abcefa
# Put the include files into headers file list.
Carlos O'Donell e63fda9
grep '%{_prefix}/include' < rpm.filelist \
Carlos O'Donell 2542c05
  | egrep -v '%{_prefix}/include/gnu/stubs-.*\.h$' \
Carlos O'Donell 2542c05
  | egrep -v '%{_prefix}/include/gnu/lib-names-.*\.h$' \
Carlos O'Donell e63fda9
  > headers.filelist
cvsdist c381c23
9abcefa
# Remove partial (lib*_p.a) static libraries, include files, and info files from
9abcefa
# the core glibc package.
0d1d15d
sed -i -e '\|%{_libdir}/lib.*_p.a|d' \
Andreas Schwab 237bb90
       -e '\|%{_prefix}/include|d' \
Carlos O'Donell 6e8e9f6
       -e '\|%{_infodir}|d' \
Carlos O'Donell 6e8e9f6
	rpm.filelist
cvsdist c381c23
9abcefa
# Put some static files into the devel package.
0d1d15d
grep '%{_libdir}/lib.*\.a' < rpm.filelist \
d62730d
  | grep '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
65bf1c4
  >> devel.filelist
9abcefa
9abcefa
# Put the rest of the static files into the static package.
0d1d15d
grep '%{_libdir}/lib.*\.a' < rpm.filelist \
d62730d
  | grep -v '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
65bf1c4
  > static.filelist
9abcefa
9abcefa
# Put all of the object files and *.so (not the versioned ones) into the
9abcefa
# devel package.
0d1d15d
grep '%{_libdir}/.*\.o' < rpm.filelist >> devel.filelist
b8e4762
grep '%{_libdir}/lib.*\.so' < rpm.filelist >> devel.filelist
cvsdist c381c23
Carlos O'Donell 2542c05
# Remove all of the static, object, unversioned DSOs, and nscd from the core
Carlos O'Donell 2542c05
# glibc package.
0d1d15d
sed -i -e '\|%{_libdir}/lib.*\.a|d' \
0d1d15d
       -e '\|%{_libdir}/.*\.o|d' \
b8e4762
       -e '\|%{_libdir}/lib.*\.so|d' \
Andreas Schwab 237bb90
       -e '\|nscd|d' rpm.filelist
cvsdist c381c23
9abcefa
# All of the bin and certain sbin files go into the common package.
9abcefa
# We explicitly exclude certain sbin files that need to go into
9abcefa
# the core glibc package for use during upgrades.
b8e4762
grep '%{_prefix}/bin' < rpm.filelist >> common.filelist
b8e4762
grep '%{_prefix}/sbin/[^gi]' < rpm.filelist >> common.filelist
9abcefa
# All of the files under share go into the common package since
b8e4762
# they should be multilib-independent.
ffc48ad
grep '%{_prefix}/share' < rpm.filelist | \
b8e4762
  grep -v -e '%{_prefix}/share/zoneinfo' -e '%%dir %{prefix}/share' \
b8e4762
       >> common.filelist
cvsdist c381c23
Siddhesh Poyarekar 9a33c90
# Remove the bin, locale, some sbin, and share from the
9abcefa
# core glibc package. We cheat a bit and use the slightly dangerous
b8e4762
# /usr/sbin/[^gi] to match the inverse of the search that put the
9abcefa
# files into common.filelist. It's dangerous in that additional files
b8e4762
# that start with g, or i would get put into common.filelist and
9abcefa
# rpm.filelist.
Andreas Schwab 237bb90
sed -i -e '\|%{_prefix}/bin|d' \
b8e4762
       -e '\|%{_prefix}/lib/locale|d' \
b8e4762
       -e '\|%{_prefix}/sbin/[^gi]|d' \
b8e4762
       -e '\|%{_prefix}/share|d' rpm.filelist
cvsdist c381c23
9edc2b6
# Add the binary to build locales to the common subpackage.
cvsdist c381c23
echo '%{_prefix}/sbin/build-locale-archive' >> common.filelist
9abcefa
9abcefa
# The nscd binary must go into the nscd subpackage.
cvsdist c381c23
echo '%{_prefix}/sbin/nscd' > nscd.filelist
cvsdist c381c23
9abcefa
# The memusage and pcprofile libraries are put back into the core
9abcefa
# glibc package even though they are only used by utils package
9abcefa
# scripts..
Andreas Schwab aeada30
cat >> rpm.filelist <
0d1d15d
%{_libdir}/libmemusage.so
0d1d15d
%{_libdir}/libpcprofile.so
Andreas Schwab aeada30
EOF
9abcefa
9abcefa
# Add the utils scripts and programs to the utils subpackage.
Andreas Schwab aeada30
cat > utils.filelist <
Andreas Krebbel 71d4a02
%if %{without bootstrap}
cvsdist c381c23
%{_prefix}/bin/memusage
cvsdist c381c23
%{_prefix}/bin/memusagestat
2c005c9
%endif
Andreas Krebbel 71d4a02
%{_prefix}/bin/mtrace
cvsdist c381c23
%{_prefix}/bin/pcprofiledump
cvsdist c381c23
%{_prefix}/bin/xtrace
cvsdist c381c23
EOF
cvsdist c381c23
d5e9ea2
# Move the NSS-related files to the NSS subpackages.  Be careful not
d5e9ea2
# to pick up .debug files, and the -devel symbolic links.
b8bc11a
for module in db compat hesiod files dns; do
d5e9ea2
  grep -E "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \
d5e9ea2
    rpm.filelist > nss_$module.filelist
d5e9ea2
done
d5e9ea2
# Symlinks go into the nss-devel package (instead of the main devel
d5e9ea2
# package).
d5e9ea2
grep '/libnss_[a-z]*\.so$' devel.filelist > nss-devel.filelist
d3da0e9
# /var/db/Makefile goes into nss_db, remove the other files from
d5e9ea2
# the main and devel file list.
d5e9ea2
sed -i -e '\,/libnss_.*\.so[0-9.]*$,d' \
d5e9ea2
    -e '\,/var/db/Makefile,d' \
d5e9ea2
    rpm.filelist devel.filelist
d5e9ea2
# Restore the built-in NSS modules.
2235ae5
cat nss_files.filelist nss_dns.filelist nss_compat.filelist >> rpm.filelist
d5e9ea2
b8bc11a
# Prepare the libnsl-related file lists.
b8bc11a
grep '/libnsl-[0-9.]*.so$' rpm.filelist > libnsl.filelist
b8bc11a
test $(wc -l < libnsl.filelist) -eq 1
b8bc11a
sed -i -e '\,/libnsl,d' rpm.filelist
b8bc11a
b8e4762
# Remove the zoneinfo files
b8e4762
# XXX: Why isn't this don't earlier when we are removing files?
b8e4762
#      Won't this impact what is shipped?
cvsdist 7da373a
rm -rf $RPM_BUILD_ROOT%{_prefix}/share/zoneinfo
cvsdist 7da373a
Siddhesh Poyarekar 17b00fb
# Make sure %config files have the same timestamp across multilib packages.
Siddhesh Poyarekar 17b00fb
#
Siddhesh Poyarekar 17b00fb
# XXX: Ideally ld.so.conf should have the timestamp of the spec file, but there
Siddhesh Poyarekar 17b00fb
# doesn't seem to be any macro to give us that.  So we do the next best thing,
Siddhesh Poyarekar 17b00fb
# which is to at least keep the timestamp consistent.  The choice of using
Siddhesh Poyarekar 17b00fb
# glibc_post_upgrade.c is arbitrary.
737f7e8
touch -r %{SOURCE0} $RPM_BUILD_ROOT/etc/ld.so.conf
b45468e
touch -r sunrpc/etc.rpc $RPM_BUILD_ROOT/etc/rpc
b45468e
Siddhesh Poyarekar 17b00fb
pushd build-%{target}
Siddhesh Poyarekar afa87a3
$GCC -Os -g -static -o build-locale-archive %{SOURCE1} \
d4d7eff
	../build-%{target}/locale/locarchive.o \
d4d7eff
	../build-%{target}/locale/md5.o \
35726c3
	../build-%{target}/locale/record-status.o \
Siddhesh Poyarekar 17b00fb
	-I. -DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \
d4d7eff
	-L../build-%{target} \
d4d7eff
	-B../build-%{target}/csu/ -lc -lc_nonshared
63769b1
install -m 700 build-locale-archive $RPM_BUILD_ROOT%{_prefix}/sbin/build-locale-archive
7e232bd
popd
cvsdist c381c23
9abcefa
# Lastly copy some additional documentation for the packages.
cvsdist c381c23
rm -rf documentation
cvsdist c381c23
mkdir documentation
cvsdist c381c23
cp crypt/README.ufc-crypt documentation/README.ufc-crypt
cvsdist c381c23
cp timezone/README documentation/README.timezone
a2dbc14
cp posix/gai.conf documentation/
cvsdist c381c23
62c3082
%ifarch s390x
b8e4762
# Compatibility symlink
253d1d9
mkdir -p $RPM_BUILD_ROOT/lib
b8e4762
ln -sf /%{_lib}/ld64.so.1 $RPM_BUILD_ROOT/lib/ld64.so.1
cvsdist c381c23
%endif
cvsdist c381c23
Carlos O'Donell 6e8e9f6
%if %{with benchtests}
Siddhesh Poyarekar 67b30d7
# Build benchmark binaries.  Ignore the output of the benchmark runs.
Siddhesh Poyarekar 67b30d7
pushd build-%{target}
Siddhesh Poyarekar 67b30d7
make BENCH_DURATION=1 bench-build
Siddhesh Poyarekar 67b30d7
popd
Siddhesh Poyarekar 67b30d7
Siddhesh Poyarekar 67b30d7
# Copy over benchmark binaries.
Siddhesh Poyarekar 67b30d7
mkdir -p $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests
Siddhesh Poyarekar 67b30d7
cp $(find build-%{target}/benchtests -type f -executable) $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d7
Siddhesh Poyarekar 67b30d7
find build-%{target}/benchtests -type f -executable | while read b; do
Siddhesh Poyarekar 67b30d7
	echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)"
Siddhesh Poyarekar 67b30d7
done >> benchtests.filelist
Siddhesh Poyarekar 67b30d7
Siddhesh Poyarekar 67b30d7
# ... and the makefile.
Siddhesh Poyarekar 67b30d7
for b in %{SOURCE9} %{SOURCE10}; do
Siddhesh Poyarekar 67b30d7
	cp $b $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d7
	echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" >> benchtests.filelist
Siddhesh Poyarekar 67b30d7
done
Siddhesh Poyarekar 67b30d7
Siddhesh Poyarekar 67b30d7
# .. and finally, the comparison scripts.
Siddhesh Poyarekar 67b30d7
cp benchtests/scripts/benchout.schema.json $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d7
cp benchtests/scripts/compare_bench.py $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d7
cp benchtests/scripts/import_bench.py $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d7
cp benchtests/scripts/validate_benchout.py $RPM_BUILD_ROOT%{_prefix}/libexec/glibc-benchtests/
Siddhesh Poyarekar 67b30d7
Siddhesh Poyarekar 67b30d7
echo "%{_prefix}/libexec/glibc-benchtests/benchout.schema.json" >> benchtests.filelist
Siddhesh Poyarekar 67b30d7
echo "%{_prefix}/libexec/glibc-benchtests/compare_bench.py*" >> benchtests.filelist
Siddhesh Poyarekar 67b30d7
echo "%{_prefix}/libexec/glibc-benchtests/import_bench.py*" >> benchtests.filelist
Siddhesh Poyarekar 67b30d7
echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.filelist
Siddhesh Poyarekar 67b30d7
%endif
Siddhesh Poyarekar 67b30d7
9abcefa
###############################################################################
9abcefa
# Rebuild libpthread.a using --whole-archive to ensure all of libpthread
9abcefa
# is included in a static link. This prevents any problems when linking
9abcefa
# statically, using parts of libpthread, and other necessary parts not
9abcefa
# being included. Upstream has decided that this is the wrong approach to
9abcefa
# this problem and that the full set of dependencies should be resolved
9abcefa
# such that static linking works and produces the most minimally sized
9abcefa
# static application possible.
9abcefa
###############################################################################
63769b1
pushd $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
268a86f
$GCC -r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a
65bf1c4
rm libpthread.a
65bf1c4
ar rcs libpthread.a libpthread.o
65bf1c4
rm libpthread.o
65bf1c4
popd
9abcefa
###############################################################################
65bf1c4
Andreas Schwab 237bb90
%if 0%{?_enable_debug_packages}
cvsdist c381c23
e0b4499
# The #line directives gperf generates do not give the proper
e0b4499
# file name relative to the build directory.
37b5e6b
pushd locale
37b5e6b
ln -s programs/*.gperf .
37b5e6b
popd
37b5e6b
pushd iconv
37b5e6b
ln -s ../locale/programs/charmap-kw.gperf .
37b5e6b
popd
cvsdist c381c23
9abcefa
# Print some diagnostic information in the builds about the
9abcefa
# getconf binaries.
9abcefa
# XXX: Why do we do this?
63769b1
ls -l $RPM_BUILD_ROOT%{_prefix}/bin/getconf
63769b1
ls -l $RPM_BUILD_ROOT%{_prefix}/libexec/getconf
63769b1
eu-readelf -hS $RPM_BUILD_ROOT%{_prefix}/bin/getconf \
63769b1
	$RPM_BUILD_ROOT%{_prefix}/libexec/getconf/*
cvsdist c381c23
e0b4499
find_debuginfo_args='--strict-build-id -g'
e0b4499
%ifarch %{debuginfocommonarches}
e0b4499
find_debuginfo_args="$find_debuginfo_args \
d4d7eff
	-l common.filelist \
d4d7eff
	-l utils.filelist \
d4d7eff
	-l nscd.filelist \
b8e4762
	-p '.*/(sbin|libexec)/.*' \
d4d7eff
	-o debuginfocommon.filelist \
b8bc11a
	-l nss_db.filelist -l nss_hesiod.filelist \
2687b3c
	-l libnsl.filelist -l rpm.filelist \
Carlos O'Donell 6e8e9f6
%if %{with benchtests}
6e6bd41
	-l benchtests.filelist
Carlos O'Donell 6e8e9f6
%endif
6e6bd41
	"
e0b4499
%endif
fce9549
/usr/lib/rpm/find-debuginfo.sh $find_debuginfo_args -o debuginfo.filelist
cvsdist c381c23
9abcefa
# List all of the *.a archives in the debug directory.
e0b4499
list_debug_archives()
e0b4499
{
0d1d15d
	local dir=%{_prefix}/lib/debug%{_libdir}
d4d7eff
	find $RPM_BUILD_ROOT$dir -name "*.a" -printf "$dir/%%P\n"
e0b4499
}
cvsdist c381c23
cvsdist c381c23
%ifarch %{debuginfocommonarches}
e0b4499
9abcefa
# Remove the source files from the common package debuginfo.
Andreas Schwab 87a7e49
sed -i '\#^%{_prefix}/src/debug/#d' debuginfocommon.filelist
9abcefa
9abcefa
# Create a list of all of the source files we copied to the debug directory.
Andreas Schwab 87a7e49
find $RPM_BUILD_ROOT%{_prefix}/src/debug \
Andreas Schwab 87a7e49
     \( -type d -printf '%%%%dir ' \) , \
Andreas Schwab 87a7e49
     -printf '%{_prefix}/src/debug/%%P\n' > debuginfocommon.sources
Andreas Schwab 87a7e49
Andreas Schwab 87a7e49
%ifarch %{biarcharches}
Andreas Schwab 87a7e49
9abcefa
# Add the source files to the core debuginfo package.
Andreas Schwab 87a7e49
cat debuginfocommon.sources >> debuginfo.filelist
Andreas Schwab 87a7e49
Andreas Schwab 87a7e49
%else
Andreas Schwab 87a7e49
cvsdist c381c23
%ifarch %{ix86}
Andreas Schwab 50a0037
%define basearch i686
cvsdist c381c23
%endif
cvsdist c381c23
%ifarch sparc sparcv9
cvsdist c381c23
%define basearch sparc
cvsdist c381c23
%endif
e0b4499
9abcefa
# The auxarches get only these few source files.
e0b4499
auxarches_debugsources=\
e0b4499
'/(generic|linux|%{basearch}|nptl(_db)?)/|/%{glibcsrcdir}/build|/dl-osinfo\.h'
e0b4499
9abcefa
# Place the source files into the core debuginfo pakcage.
e0b4499
egrep "$auxarches_debugsources" debuginfocommon.sources >> debuginfo.filelist
e0b4499
9abcefa
# Remove the source files from the common debuginfo package.
e0b4499
egrep -v "$auxarches_debugsources" \
ffc48ad
  debuginfocommon.sources >> debuginfocommon.filelist
e0b4499
8c7b7c2
%endif # %{biarcharches}
Andreas Schwab 87a7e49
9abcefa
# Add the list of *.a archives in the debug directory to
9abcefa
# the common debuginfo package.
e0b4499
list_debug_archives >> debuginfocommon.filelist
e0b4499
85447d4
# It happens that find-debuginfo.sh produces duplicate entries even
85447d4
# though the inputs are unique. Therefore we sort and unique the
85447d4
# entries in the debug file lists. This avoids the following warnings:
85447d4
# ~~~
85447d4
# Processing files: glibc-debuginfo-common-2.17.90-10.fc20.x86_64
85447d4
# warning: File listed twice: /usr/lib/debug/usr/sbin/build-locale-archive.debug
85447d4
# warning: File listed twice: /usr/lib/debug/usr/sbin/nscd.debug
85447d4
# warning: File listed twice: /usr/lib/debug/usr/sbin/zdump.debug
85447d4
# warning: File listed twice: /usr/lib/debug/usr/sbin/zic.debug
85447d4
# ~~~
85447d4
sort -u debuginfocommon.filelist > debuginfocommon2.filelist
85447d4
mv debuginfocommon2.filelist debuginfocommon.filelist
85447d4
9abcefa
%endif # %{debuginfocommonarches}
cvsdist c381c23
85447d4
# Remove any duplicates output by a buggy find-debuginfo.sh.
85447d4
sort -u debuginfo.filelist > debuginfo2.filelist
85447d4
mv debuginfo2.filelist debuginfo.filelist
85447d4
Siddhesh Poyarekar 7007495
# Remove some common directories from the common package debuginfo so that we
Siddhesh Poyarekar 7007495
# don't end up owning them.
Siddhesh Poyarekar 7007495
exclude_common_dirs()
Siddhesh Poyarekar 7007495
{
Siddhesh Poyarekar 7007495
	exclude_dirs="%{_prefix}/src/debug"
Siddhesh Poyarekar 7007495
	exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug{,/%{_lib},/bin,/sbin})"
Siddhesh Poyarekar 7007495
	exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug%{_prefix}{,/%{_lib},/libexec,/bin,/sbin})"
Siddhesh Poyarekar 7007495
Siddhesh Poyarekar 7007495
	for d in $(echo $exclude_dirs | sed 's/ /\n/g'); do
Siddhesh Poyarekar 7007495
		sed -i "\|^%%dir $d/\?$|d" $1
Siddhesh Poyarekar 7007495
	done
Siddhesh Poyarekar 7007495
}
Siddhesh Poyarekar 7007495
Siddhesh Poyarekar 7007495
%ifarch %{debuginfocommonarches}
Siddhesh Poyarekar 7007495
exclude_common_dirs debuginfocommon.filelist
Siddhesh Poyarekar 7007495
%endif
Siddhesh Poyarekar 7007495
exclude_common_dirs debuginfo.filelist
Siddhesh Poyarekar 7007495
9abcefa
%endif # 0%{?_enable_debug_packages}
e0b4499
Carlos O'Donell 6e8e9f6
%if %{with docs}
9abcefa
# Remove the `dir' info-heirarchy file which will be maintained
9abcefa
# by the system as it adds info files to the install.
e0b4499
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
Carlos O'Donell 6e8e9f6
%endif
e0b4499
cvsdist c381c23
%ifarch %{auxarches}
e0b4499
9abcefa
# Delete files that we do not intended to ship with the auxarch.
cvsdist c381c23
echo Cutting down the list of unpackaged files
e0b4499
sed -e '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //;s#^/*##' \
02e8252
	common.filelist devel.filelist static.filelist headers.filelist \
02e8252
	utils.filelist nscd.filelist \
02e8252
%ifarch %{debuginfocommonarches}
02e8252
	debuginfocommon.filelist \
02e8252
%endif
02e8252
	| (cd $RPM_BUILD_ROOT; xargs --no-run-if-empty rm -f 2> /dev/null || :)
9abcefa
cfeb07d
%else
cfeb07d
cfeb07d
mkdir -p $RPM_BUILD_ROOT/var/{db,run}/nscd
9893fad
touch $RPM_BUILD_ROOT/var/{db,run}/nscd/{passwd,group,hosts,services}
cfeb07d
touch $RPM_BUILD_ROOT/var/run/nscd/{socket,nscd.pid}
2eb1503
8c7b7c2
%endif # %{auxarches}
cvsdist c381c23
Carlos O'Donell f2d4020
%ifnarch %{auxarches}
Carlos O'Donell f2d4020
truncate -s 0 $RPM_BUILD_ROOT/%{_prefix}/lib/locale/locale-archive
Carlos O'Donell f2d4020
%endif
Carlos O'Donell f2d4020
7448524
##############################################################################
7448524
# Run the glibc testsuite
7448524
##############################################################################
7448524
%check
Carlos O'Donell 6e8e9f6
%if %{with testsuite}
f515946
5c2fe5c
# Run the glibc tests. If any tests fail to build we exit %check with
5c2fe5c
# an error, otherwise we print the test failure list and the failed
5c2fe5c
# test output and continue.  Write to standard error to avoid
5c2fe5c
# synchronization issues with make and shell tracing output if
5c2fe5c
# standard output and standard error are different pipes.
f515946
run_tests () {
5c2fe5c
  # This hides a test suite build failure, which should be fatal.  We
5c2fe5c
  # check "Summary of test results:" below to verify that all tests
5c2fe5c
  # were built and run.
5c2fe5c
  make %{?_smp_mflags} -O check |& tee rpmbuild.check.log >&2
5c2fe5c
  test -n tests.sum
5c2fe5c
  if ! grep -q '^Summary of test results:$' rpmbuild.check.log ; then
5c2fe5c
    echo "FAIL: test suite build of target: $(basename "$(pwd)")" >& 2
5c2fe5c
    exit 1
5c2fe5c
  fi
5c2fe5c
  set +x
5c2fe5c
  grep -v ^PASS: tests.sum > rpmbuild.tests.sum.not-passing || true
5c2fe5c
  if test -n rpmbuild.tests.sum.not-passing ; then
5c2fe5c
    echo ===================FAILED TESTS===================== >&2
5c2fe5c
    echo "Target: $(basename "$(pwd)")" >& 2
5c2fe5c
    cat rpmbuild.tests.sum.not-passing >&2
5c2fe5c
    while read failed_code failed_test ; do
5c2fe5c
      for suffix in out test-result ; do
5c2fe5c
        if test -e "$failed_test.$suffix"; then
5c2fe5c
	  echo >&2
5c2fe5c
          echo "=====$failed_code $failed_test.$suffix=====" >&2
5c2fe5c
          cat -- "$failed_test.$suffix" >&2
5c2fe5c
	  echo >&2
5c2fe5c
        fi
5c2fe5c
      done
5c2fe5c
    done 
5c2fe5c
  fi
5c2fe5c
5c2fe5c
  # Unconditonally dump differences in the system call list.
5c2fe5c
  echo "* System call consistency checks:" >&2
5c2fe5c
  cat misc/tst-syscall-list.out >&2
5c2fe5c
  set -x
f515946
}
f515946
7448524
# Increase timeouts
7448524
export TIMEOUTFACTOR=16
7448524
parent=$$
7448524
echo ====================TESTING=========================
7448524
##############################################################################
7448524
# - Test the default runtime.
5c2fe5c
#	- Power 620 / 970 ISA for 64-bit POWER BE.
Carlos O'Donell 130c497
#	- POWER8 for 64-bit POWER LE.
Carlos O'Donell 130c497
#	- ??? for 64-bit x86_64
Carlos O'Donell 130c497
#	- ??? for 32-bit x86
Carlos O'Donell 130c497
#	- ??? for 64-bit AArch64
Carlos O'Donell 130c497
#	- ??? for 32-bit ARM
Carlos O'Donell 7061f72
#	- zEC12 for 64-bit s390x
Carlos O'Donell 130c497
#	- ??? for 32-bit s390
7448524
##############################################################################
7448524
pushd build-%{target}
f515946
run_tests
7448524
popd
7448524
7448524
%if %{buildpower6}
7448524
echo ====================TESTING -mcpu=power6=============
Carlos O'Donell 130c497
##############################################################################
Carlos O'Donell 130c497
# - Test the 64-bit POWER6 BE runtimes.
Carlos O'Donell 130c497
##############################################################################
7448524
pushd build-%{target}-power6
f515946
if [ -d ../power6emul ]; then
7448524
    export LD_PRELOAD=`cd ../power6emul; pwd`/\$LIB/power6emul.so
f515946
fi
f515946
run_tests
7448524
popd
7448524
%endif
Carlos O'Donell 130c497
Carlos O'Donell 130c497
%if %{buildpower7}
Carlos O'Donell 130c497
echo ====================TESTING -mcpu=power7=============
Carlos O'Donell 130c497
##############################################################################
Carlos O'Donell 130c497
# - Test the 64-bit POWER7 BE runtimes.
Carlos O'Donell 130c497
##############################################################################
Carlos O'Donell 130c497
pushd build-%{target}-power7
Carlos O'Donell 130c497
run_tests
Carlos O'Donell 130c497
popd
Carlos O'Donell 130c497
%endif
Carlos O'Donell 130c497
Carlos O'Donell 130c497
%if %{buildpower8}
Carlos O'Donell 130c497
echo ====================TESTING -mcpu=power8=============
Carlos O'Donell 130c497
##############################################################################
Carlos O'Donell 130c497
# - Test the 64-bit POWER8 BE runtimes.
Carlos O'Donell 130c497
##############################################################################
Carlos O'Donell 130c497
pushd build-%{target}-power8
Carlos O'Donell 130c497
run_tests
Carlos O'Donell 130c497
popd
Carlos O'Donell 130c497
%endif
Carlos O'Donell 130c497
7448524
echo ====================TESTING END=====================
7448524
PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p'
7448524
echo ====================PLT RELOCS LD.SO================
7448524
readelf -Wr $RPM_BUILD_ROOT/%{_lib}/ld-*.so | sed -n -e "$PLTCMD"
7448524
echo ====================PLT RELOCS LIBC.SO==============
7448524
readelf -Wr $RPM_BUILD_ROOT/%{_lib}/libc-*.so | sed -n -e "$PLTCMD"
7448524
echo ====================PLT RELOCS END==================
7448524
Siddhesh Poyarekar e9a7f4c
# Finally, check if valgrind runs with the new glibc.
Siddhesh Poyarekar e9a7f4c
# We want to fail building if valgrind is not able to run with this glibc so
Siddhesh Poyarekar e9a7f4c
# that we can then coordinate with valgrind to get it fixed before we update
Siddhesh Poyarekar e9a7f4c
# glibc.
Siddhesh Poyarekar e9a7f4c
pushd build-%{target}
9d8ea8c
9d8ea8c
# Show the auxiliary vector as seen by the new library
9d8ea8c
# (even if we do not perform the valgrind test).
9d8ea8c
LD_SHOW_AUXV=1 elf/ld.so --library-path .:elf:nptl:dlfcn /bin/true
9d8ea8c
9d8ea8c
%if %{with valgrind}
Mark Wielaard 05146e3
elf/ld.so --library-path .:elf:nptl:dlfcn \
Mark Wielaard 05146e3
	/usr/bin/valgrind --error-exitcode=1 \
Siddhesh Poyarekar e9a7f4c
	elf/ld.so --library-path .:elf:nptl:dlfcn /usr/bin/true
Siddhesh Poyarekar e9a7f4c
%endif
9d8ea8c
popd
Siddhesh Poyarekar e9a7f4c
7448524
%endif # %{run_glibc_tests}
7448524
7448524
Andreas Schwab 9603304
%pre -p <lua>
Andreas Schwab 9603304
-- Check that the running kernel is new enough
Andreas Schwab 9603304
required = '%{enablekernel}'
Andreas Schwab 7dc6703
rel = posix.uname("%r")
Andreas Schwab 7dc6703
if rpm.vercmp(rel, required) < 0 then
Andreas Schwab 7dc6703
  error("FATAL: kernel too old", 0)
Andreas Schwab 9603304
end
Andreas Schwab 9603304
63769b1
%post -p %{_prefix}/sbin/glibc_post_upgrade.%{_target_cpu}
cvsdist c381c23
Carlos O'Donell 1bbad64
%posttrans all-langpacks -e -p <lua>
Carlos O'Donell f2d4020
-- If at the end of the transaction we are still installed
Carlos O'Donell f2d4020
-- (have a template of non-zero size), then we rebuild the
Carlos O'Donell f2d4020
-- locale cache (locale-archive) from the pre-populated
Carlos O'Donell f2d4020
-- locale cache (locale-archive.tmpl) i.e. template.
Carlos O'Donell f2d4020
if posix.stat("%{_prefix}/lib/locale/locale-archive.tmpl", "size") > 0 then
Carlos O'Donell f2d4020
  pid = posix.fork()
Carlos O'Donell f2d4020
  if pid == 0 then
Carlos O'Donell 1bbad64
    posix.exec("%{_prefix}/sbin/build-locale-archive", "--install-langs", "%%{_install_langs}")
Carlos O'Donell f2d4020
  elseif pid > 0 then
Carlos O'Donell f2d4020
    posix.wait(pid)
Carlos O'Donell f2d4020
  end
Carlos O'Donell f2d4020
end
Carlos O'Donell f2d4020
Carlos O'Donell f2d4020
%postun all-langpacks -p <lua>
Carlos O'Donell f2d4020
-- In the postun we always remove the locale cache.
Carlos O'Donell f2d4020
-- We are being uninstalled and if this is an upgrade
Carlos O'Donell f2d4020
-- then the new packages template will be used to
Carlos O'Donell f2d4020
-- recreate a new copy of the cache.
9edc2b6
os.remove("%{_prefix}/lib/locale/locale-archive")
cvsdist c381c23
Carlos O'Donell 6e8e9f6
%if %{with docs}
cvsdist c381c23
%post devel
Andreas Schwab 713def3
/sbin/install-info %{_infodir}/libc.info.gz %{_infodir}/dir > /dev/null 2>&1 || :
Carlos O'Donell 6e8e9f6
%endif
cvsdist c381c23
cvsdist c381c23
%pre headers
cvsdist c381c23
# this used to be a link and it is causing nightmares now
cvsdist c381c23
if [ -L %{_prefix}/include/scsi ] ; then
ffc48ad
  rm -f %{_prefix}/include/scsi
cvsdist c381c23
fi
cvsdist c381c23
Carlos O'Donell 6e8e9f6
%if %{with docs}
cvsdist c381c23
%preun devel
cvsdist c381c23
if [ "$1" = 0 ]; then
Andreas Schwab 713def3
  /sbin/install-info --delete %{_infodir}/libc.info.gz %{_infodir}/dir > /dev/null 2>&1 || :
cvsdist c381c23
fi
Carlos O'Donell 6e8e9f6
%endif
cvsdist c381c23
cvsdist c381c23
%pre -n nscd
Andreas Schwab 08541d9
getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r nscd
Andreas Schwab 08541d9
getent passwd nscd >/dev/null ||
Andreas Schwab 08541d9
  /usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \
Andreas Schwab 08541d9
		    -c "NSCD Daemon" -u 28 -g nscd nscd
cvsdist c381c23
cvsdist c381c23
%post -n nscd
f8556b4
%systemd_post nscd.service
cvsdist c381c23
cvsdist c381c23
%preun -n nscd
f8556b4
%systemd_preun nscd.service
cvsdist c381c23
cvsdist c381c23
%postun -n nscd
Andreas Schwab 389eedc
if test $1 = 0; then
ffc48ad
  /usr/sbin/userdel nscd > /dev/null 2>&1 || :
cvsdist c381c23
fi
f8556b4
%systemd_postun_with_restart nscd.service
cvsdist c381c23
cvsdist c381c23
%files -f rpm.filelist
63769b1
%dir %{_prefix}/%{_lib}/audit
18aa46f
%if %{buildpower6}
b8e4762
%dir /%{_lib}/power6
b8e4762
%dir /%{_lib}/power6x
18aa46f
%endif
Carlos O'Donell 130c497
%if %{buildpower7}
Carlos O'Donell 130c497
%dir /%{_lib}/power7
Carlos O'Donell 130c497
%endif
Carlos O'Donell 130c497
%if %{buildpower8}
Carlos O'Donell 130c497
%dir /%{_lib}/power8
Carlos O'Donell 130c497
%endif
cvsdist c381c23
%ifarch s390x
b8e4762
/lib/ld64.so.1
cvsdist c381c23
%endif
cvsdist c381c23
%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf
cvsdist c381c23
%verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf
Andreas Schwab 809a543
%verify(not md5 size mtime) %config(noreplace) /etc/rpc
cvsdist 195182b
%dir /etc/ld.so.conf.d
ef031de
%dir %{_prefix}/libexec/getconf
0d1d15d
%dir %{_libdir}/gconv
50740a3
%dir %attr(0700,root,root) /var/cache/ldconfig
50740a3
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/cache/ldconfig/aux-cache
cvsdist 4a201b7
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache
Andreas Schwab d047b37
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf
8ca6f66
%doc README NEWS INSTALL elf/rtld-debugger-interface.txt
Carlos O'Donell 6e8e9f6
# If rpm doesn't support %license, then use %doc instead.
e653c3c
%{!?_licensedir:%global license %%doc}
e653c3c
%license COPYING COPYING.LIB LICENSES
cvsdist c381c23
cvsdist c381c23
%ifnarch %{auxarches}
cvsdist c381c23
%files -f common.filelist common
111d75b
%dir %{_prefix}/lib/locale
Carlos O'Donell 0457f64
%dir %{_prefix}/lib/locale/C.utf8
Carlos O'Donell 0457f64
%{_prefix}/lib/locale/C.utf8/*
7ad97ba
%doc documentation/README.timezone
7ad97ba
%doc documentation/gai.conf
cvsdist c381c23
Carlos O'Donell f2d4020
%files all-langpacks
Carlos O'Donell f2d4020
%attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive.tmpl
Carlos O'Donell f2d4020
%attr(0644,root,root) %verify(not md5 size mtime mode) %ghost %config(missingok,noreplace) %{_prefix}/lib/locale/locale-archive
Carlos O'Donell f2d4020
9edc2b6
%files locale-source
9edc2b6
%dir %{_prefix}/share/i18n/locales
9edc2b6
%{_prefix}/share/i18n/locales/*
9edc2b6
%dir %{_prefix}/share/i18n/charmaps
9edc2b6
%{_prefix}/share/i18n/charmaps/*
9edc2b6
cvsdist c381c23
%files -f devel.filelist devel
cvsdist c381c23
65bf1c4
%files -f static.filelist static
65bf1c4
cvsdist c381c23
%files -f headers.filelist headers
cvsdist c381c23
cvsdist c381c23
%files -f utils.filelist utils
cvsdist c381c23
cvsdist c381c23
%files -f nscd.filelist -n nscd
cvsdist c381c23
%config(noreplace) /etc/nscd.conf
cfeb07d
%dir %attr(0755,root,root) /var/run/nscd
cfeb07d
%dir %attr(0755,root,root) /var/db/nscd
b8e4762
/lib/systemd/system/nscd.service
b8e4762
/lib/systemd/system/nscd.socket
Siddhesh Poyarekar 944ed51
%{_tmpfilesdir}/nscd.conf
cfeb07d
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid
cfeb07d
%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket
cfeb07d
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd
cfeb07d
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group
cfeb07d
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts
9893fad
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/services
cfeb07d
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/passwd
cfeb07d
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/group
cfeb07d
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/hosts
9893fad
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/services
63b6b66
%ghost %config(missingok,noreplace) /etc/sysconfig/nscd
cvsdist c381c23
%endif
cvsdist c381c23
d5e9ea2
%files -f nss_db.filelist -n nss_db
d3da0e9
/var/db/Makefile
d5e9ea2
%files -f nss_hesiod.filelist -n nss_hesiod
d5e9ea2
%doc hesiod/README.hesiod
d5e9ea2
%files -f nss-devel.filelist nss-devel
d5e9ea2
b8bc11a
%files -f libnsl.filelist -n libnsl
b8bc11a
/%{_lib}/libnsl.so.1
b8bc11a
Andreas Schwab 237bb90
%if 0%{?_enable_debug_packages}
cvsdist c381c23
%files debuginfo -f debuginfo.filelist
cvsdist c381c23
%ifarch %{debuginfocommonarches}
cvsdist c381c23
%ifnarch %{auxarches}
cvsdist c381c23
%files debuginfo-common -f debuginfocommon.filelist
cvsdist c381c23
%endif
cvsdist c381c23
%endif
cvsdist c381c23
%endif
cvsdist c381c23
Carlos O'Donell 6e8e9f6
%if %{with benchtests}
Siddhesh Poyarekar 67b30d7
%files benchtests -f benchtests.filelist
Siddhesh Poyarekar 67b30d7
%endif
Siddhesh Poyarekar 67b30d7
cvsdist c381c23
%changelog
769d807
* Thu May 24 2018 Florian Weimer <fweimer@redhat.com> - 2.27-15
77db5a0
- Rebuild to add back .symtab section in ld.so (#1570246)
8ab27a7
- Switch to upstream version of libidn2 removal (#1452750)
769d807
- Auto-sync with upstream branch release/2.27/master,
769d807
  commit 50df56ca86a281c8fd99a8100aac75539813788d:
769d807
- CVE-2018-11237: Buffer overflow in mempcpy for Xeon Phi (#1581275)
769d807
6080375
* Thu May 17 2018 Florian Weimer <fweimer@redhat.com> - 2.27-14
6080375
- Do not run telinit u on upgrades (#1579225)
6080375
3528d1b
* Tue May 15 2018 Florian Weimer <fweimer@redhat.com> - 2.27-13
3528d1b
- Auto-sync with upstream branch release/2.27/master,
3528d1b
  commit 0cd4a5e87f6885a2f15fe8e7eb7378d010cdb606:
3528d1b
- sunrpc: Remove stray exports (#1577210)
3528d1b
- gd_GB: Fix typo in abbreviated "May" (swbz#23152)
3528d1b
- realpath: Fix path length overflow (swbz#22786)
3528d1b
- elf: Fix stack overflow with huge PT_NOTE segment (swbz#20419)
3528d1b
- resolv: Fully initialize struct mmsghdr in send_dg (swbz#23037)
3528d1b
- manual: Various fixes to the mbstouwcs example, and mbrtowc update
3528d1b
- getlogin_r: return early when linux sentinel value is set
3528d1b
- resolv: Fix crash in resolver on memory allocation failure (swbz#23005)
3528d1b
- Fix signed integer overflow in random_r (swbz#17343)
3528d1b
- RISC-V: fix struct kernel_sigaction to match the kernel version (swbz#23069)
3528d1b
61dc9c8
* Fri May 11 2018 Florian Weimer <fweimer@redhat.com> - 2.27-12
61dc9c8
- Unconditionally build downstream with -mstackrealign for now
61dc9c8
fb93b16
* Fri May 11 2018 Florian Weimer <fweimer@redhat.com> - 2.27-11
fb93b16
- Inherit compiler flags in the original order
fb93b16
512e087
* Fri May 11 2018 Florian Weimer <fweimer@redhat.com> - 2.27-10
512e087
- Inherit the -mstackrealign flag if it is set
512e087
9512708
* Fri May 11 2018 Florian Weimer <fweimer@redhat.com> - 2.27-9
9512708
- Use /usr/bin/python3 for benchmarks scripts (#1577223)
9512708
cb37f54
* Thu Mar 29 2018 Florian Weimer <fweimer@redhat.com> - 2.27-8
cb37f54
- Auto-sync with upstream branch release/2.27/master,
cb37f54
  commit 39071a55392d2d2e0b75fb19f2b48d661c4cc682.
cb37f54
9dc918b
* Thu Mar 29 2018 Florian Weimer <fweimer@redhat.com> - 2.27-7
157a638
- Enable annobin on Red Hat Enterprise Linux
9dc918b
- Auto-sync with upstream branch release/2.27/master,
9dc918b
  commit 55ad82e45c313454de657931898e974a7a036cad:
57a4f74
- CVE-2017-18269: i386: Fix memmove issue (swbz#22644)
9dc918b
- RISC-V: fmax/fmin: Handle signalling NaNs correctly (swbz#22884)
9dc918b
- RISC-V: Do not initialize $gp in TLS macros
9dc918b
- cs_CZ locale: Add alternative month names (swbz#22963)
9dc918b
- Greek (el_CY, el_GR) locales: Introduce ab_alt_mon (swbz#22937)
9dc918b
- lt_LT locale: Update abbreviated month names (swbz#22932)
9dc918b
- ca_ES locale: Update LC_TIME (swbz#22848)
9dc918b
- i386: Fix i386 sigaction sa_restorer initialization (swbz#21269)
9dc918b
- Fix multiple definitions of __nss_*_database (swbz#22918)
9dc918b
- Fix netgroup cache keys (swbz#22342)
9dc918b
- linux/powerpc: sync sys/ptrace.h with Linux 4.15 (swbz#22433, swbz#22807)
9dc918b
- powerpc: Undefine Linux ptrace macros that conflict with __ptrace_request
9dc918b
- Add missing “reorder-end” in LC_COLLATE of et_EE (swbz#22517)
9dc918b
- linux/aarch64: sync sys/ptrace.h with Linux 4.15 (swbz#22433)
9dc918b
- [RISC-V] Fix parsing flags in ELF64 files (swbz#22827)
9dc918b
8ce0b90
* Fri Mar  2 2018 Florian Weimer <fweimer@redhat.com> - 2.27-6
8ce0b90
- Collation update and sync with CLDR (#1551009)
8ce0b90
d92633e
* Wed Feb 28 2018 Florian Weimer <fweimer@redhat.com> - 2.27-5
b8a2275
- Inherit as many flags as possible from redhat-rpm-config (#1550914)
d92633e
16398fc
* Mon Feb 19 2018 Richard W.M. Jones <rjones@redhat.com> - 2.27-4
16398fc
- riscv64: Add symlink from /usr/lib64/lp64d -> /usr/lib64 for ABI compat.
ee109af
- riscv64: Disable valgrind smoke test on this architecture.
16398fc
4c06a87
* Wed Feb 14 2018 Florian Weimer <fweimer@redhat.com> - 2.27-3
4c06a87
- Spec file cleanups:
4c06a87
  - Remove %%defattr(-,root,root)
4c06a87
  - Use shell to run ldconfig %%transfiletrigger
4c06a87
  - Move %%transfiletrigger* to the glibc-common subpackage
4c06a87
  - Trim changelog
4c06a87
  - Include ChangeLog.old in the source RPM
4c06a87
55adfec
* Wed Feb  7 2018 Florian Weimer <fweimer@redhat.com> - 2.27-2.1
55adfec
- Linux: use reserved name __key in pkey_get (#1542643)
55adfec
- Auto-sync with upstream branch release/2.27/master,
55adfec
  commit 56170e064e2b21ce204f0817733e92f1730541ea.
55adfec
cefed5d
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org>
cefed5d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
cefed5d
Carlos O'Donell 587bed9
* Mon Feb 05 2018 Carlos O'Donell <carlos@redhat.com> - 2.27-1
Carlos O'Donell 587bed9
- Update to released glibc 2.27.
Carlos O'Donell 587bed9
- Auto-sync with upstream branch master,
Carlos O'Donell 587bed9
  commit 23158b08a0908f381459f273a984c6fd328363cb.
Carlos O'Donell 587bed9
72c4f88
* Tue Jan 30 2018 Richard W.M. Jones <rjones@redhat.com> - 2.26.9000-52
f80578d
- Disable -fstack-clash-protection on riscv64:
f80578d
  not supported even by GCC 7.3.1 on this architecture.
f80578d
6ff958f
* Mon Jan 29 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-51
6ff958f
- Explicitly run ldconfig in the buildroot
6ff958f
- Do not run ldconfig from scriptlets
6ff958f
- Put triggers into the glibc-common package, do not pass arguments to ldconfig
6ff958f
48a7163
* Mon Jan 29 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-50
48a7163
- Auto-sync with upstream branch master,
48a7163
  commit cdd14619a713ab41e26ba700add4880604324dbb:
48a7163
- libnsl: Turn remaining symbols into compat symbols (swbz#22701)
48a7163
- be_BY, be_BY@latin, lt_LT, el_CY, el_GR, ru_RU, ru_UA, uk_UA:
48a7163
  Add alternative month names (swbz#10871)
48a7163
- x86: Revert Intel CET changes to __jmp_buf_tag (swbz#22743)
48a7163
- aarch64: Revert the change of the __reserved member of mcontext_t
48a7163
1f24fb0
* Mon Jan 29 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.26.9000-49
1f24fb0
- Add file triggers to do ldconfig calls automatically
1f24fb0
6777c3e
* Mon Jan 22 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-48
6777c3e
- Auto-sync with upstream branch master,
6777c3e
  commit 21c0696cdef617517de6e25711958c40455c554f:
6777c3e
- locale: Implement alternative month names (swbz#10871)
6777c3e
- locale: Change month names for pl_PL (swbz#10871)
6777c3e
9286701
* Mon Jan 22 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-47
9286701
- Unconditionally build without libcrypt
9286701
b8b7388
* Fri Jan 19 2018 Björn Esser <besser82@fedoraproject.org> - 2.26.9000-46
2687b3c
- Remove deprecated libcrypt, gets replaced by libxcrypt
2687b3c
- Add applicable Requires on libxcrypt
2687b3c
36e8658
* Fri Jan 19 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-45
36e8658
- Drop static PIE support on aarch64.  It leads to crashes at run time.
6a5972a
- Remove glibc-rpcgen subpackage.  See rpcsvc-proto.  (#1531540)
36e8658
fac98a7
* Fri Jan 19 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-44
a4166cd
- Correct the list of static PIE architectures (#1247050)
fac98a7
- glibc_post_upgrade: Remove process restart logic
fac98a7
- glibc_post_upgrade: Integrate into the build process
fac98a7
- glibc_post_upgrade: Do not clean up tls subdirectories
fac98a7
- glibc_post_upgrade: Drop ia64 support
fac98a7
- Remove architecture-specific symbolic link for iconvconfig
fac98a7
- Auto-sync with upstream branch master,
fac98a7
  commit 4612268a0ad8e3409d8ce2314dd2dd8ee0af5269:
fac98a7
- powerpc: Fix syscalls during early process initialization (swbz#22685)
fac98a7
0f4d3ed
* Fri Jan 19 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-43
a4166cd
- Enable static PIE support on i386, x86_64 (#1247050)
0f4d3ed
- Remove add-on support (already gone upstream)
0f4d3ed
- Rework test suite status reporting
0f4d3ed
- Auto-sync with upstream branch master,
0f4d3ed
  commit 64f63cb4583ecc1ba16c7253aacc192b6d088511:
0f4d3ed
- malloc: Fix integer overflows in memalign and malloc functions (swbz#22343)
0f4d3ed
- x86-64: Properly align La_x86_64_retval to VEC_SIZE (swbz#22715)
0f4d3ed
- aarch64: Update bits/hwcap.h for Linux 4.15
0f4d3ed
- Add NT_ARM_SVE to elf.h
0f4d3ed
90612b2
* Wed Jan 17 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-42
90612b2
- CVE-2017-14062, CVE-2016-6261, CVE-2016-6263:
90612b2
  Use libidn2 for IDNA support (#1452750)
90612b2
d7ce5d4
* Mon Jan 15 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-41
d7ce5d4
- CVE-2018-1000001: Make getcwd fail if it cannot obtain an absolute path
d7ce5d4
  (#1533837)
d7ce5d4
- elf: Synchronize DF_1_* flags with binutils (#1439328)
d7ce5d4
- Auto-sync with upstream branch master,
d7ce5d4
  commit 860b0240a5645edd6490161de3f8d1d1f2786025:
d7ce5d4
- aarch64: fix static pie enabled libc when main is in a shared library
d7ce5d4
- malloc: Ensure that the consolidated fast chunk has a sane size
d7ce5d4
d84b03d
* Fri Jan 12 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-40
d84b03d
- libnsl: Do not install libnsl.so, libnsl.a (#1531540)
d84b03d
- Use unversioned Supplements: for langpacks (#1490725)
d84b03d
- Auto-sync with upstream branch master,
d84b03d
  commit 9a08a366a7e7ddffe62113a9ffe5e50605ea0924:
d84b03d
- hu_HU locale: Avoid double space (swbz#22657)
d84b03d
- math: Make default libc_feholdsetround_noex_ctx use __feholdexcept
d84b03d
  (swbz#22702)
d84b03d
538e3ea
* Thu Jan 11 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-39
538e3ea
- nptl: Open libgcc.so with RTLD_NOW during pthread_cancel (#1527887)
538e3ea
- Introduce libnsl subpackage and remove NIS headers (#1531540)
538e3ea
- Use versioned Obsoletes: for libcrypt-nss.
538e3ea
- Auto-sync with upstream branch master,
538e3ea
  commit 08c6e95234c60a5c2f37532d1111acf084f39345:
538e3ea
- nptl: Add tst-minstack-cancel, tst-minstack-exit (swbz#22636)
538e3ea
- math: ldbl-128ibm log1pl (-qNaN) spurious "invalid" exception (swbz#22693)
538e3ea
9e28c42
* Wed Jan 10 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-38
9e28c42
- nptl: Fix stack guard size accounting (#1527887)
9e28c42
- Remove invalid Obsoletes: on glibc-header provides
9e28c42
- Require python3 instead of python during builds
9e28c42
- Auto-sync with upstream branch master,
9e28c42
  commit 09085ede12fb9650f286bdcd805609ae69f80618:
9e28c42
- math: ldbl-128ibm lrintl/lroundl missing "invalid" exceptions (swbz#22690)
9e28c42
- x86-64: Add sincosf with vector FMA
9e28c42
a281128
* Mon Jan  8 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-37
a281128
- Add glibc-rpcgen subpackage, until the replacement is packaged (#1531540)
a281128
1042b5d
* Mon Jan 08 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-36
1042b5d
- Auto-sync with upstream branch master,
1042b5d
  commit 579396ee082565ab5f42ff166a264891223b7b82:
1042b5d
- nptl: Add test for callee-saved register restore in pthread_exit
1042b5d
- getrlimit64: fix for 32-bit configurations with default version >= 2.2
1042b5d
- elf: Add linux-4.15 VDSO hash for RISC-V
1042b5d
- elf: Add RISC-V dynamic relocations to elf.h
1042b5d
- powerpc: Fix error message during relocation overflow
1042b5d
- prlimit: Replace old_rlimit RLIM64_INFINITY with RLIM_INFINITY (swbz#22678)
1042b5d
cf072ec
* Fri Jan 05 2018 Florian Weimer <fweimer@redhat.com> - 2.26.9000-35
cf072ec
- Remove sln (#1531546)
cf072ec
- Remove Sun RPC interfaces (#1531540)
cf072ec
- Rebuild with newer GCC to fix pthread_exit stack unwinding issue (#1529549)
cf072ec
- Auto-sync with upstream branch master,
cf072ec
  commit f1a844ac6389ea4e111afc019323ca982b5b027d:
cf072ec
- CVE-2017-16997: elf: Check for empty tokens before DST expansion (#1526866)
cf072ec
- i386: In makecontext, align the stack before calling exit (swbz#22667)
cf072ec
- x86, armhfp: sync sys/ptrace.h with Linux 4.15 (swbz#22433)
cf072ec
- elf: check for rpath emptiness before making a copy of it
cf072ec
- elf: remove redundant is_path argument
cf072ec
- elf: remove redundant code from is_dst
cf072ec
- elf: remove redundant code from _dl_dst_substitute
cf072ec
- scandir: fix wrong assumption about errno (swbz#17804)
cf072ec
- Deprecate external use of libio.h and _G_config.h
cf072ec
39b4cfb
* Fri Dec 22 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-34
39b4cfb
- Auto-sync with upstream branch master,
39b4cfb
  commit bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f:
39b4cfb
- copy_file_range: New function to copy file data
39b4cfb
- nptl: Consolidate pthread_{timed,try}join{_np}
39b4cfb
- nptl: Implement pthread_self in libc.so (swbz#22635)
39b4cfb
- math: Provide a C++ version of iseqsig (swbz#22377)
39b4cfb
- elf: remove redundant __libc_enable_secure check from fillin_rpath
39b4cfb
- math: Avoid signed shift overflow in pow (swbz#21309)
39b4cfb
- x86: Add feature_1 to tcbhead_t (swbz#22563)
39b4cfb
- x86: Update cancel_jmp_buf to match __jmp_buf_tag (swbz#22563)
39b4cfb
- ld.so: Examine GLRO to detect inactive loader (swbz#20204)
39b4cfb
- nscd: Fix nscd readlink argument aliasing (swbz#22446)
39b4cfb
- elf: do not substitute dst in $LD_LIBRARY_PATH twice (swbz#22627)
39b4cfb
- ldconfig: set LC_COLLATE to C (swbz#22505)
39b4cfb
- math: New generic sincosf
39b4cfb
- powerpc: st{r,p}cpy optimization for aligned strings
39b4cfb
- CVE-2017-1000409: Count in expanded path in _dl_init_path (#1524867)
39b4cfb
- CVE-2017-1000408: Compute correct array size in _dl_init_paths (#1524867)
39b4cfb
- x86-64: Remove sysdeps/x86_64/fpu/s_cosf.S
39b4cfb
- aarch64: Improve strcmp unaligned performance
39b4cfb
a5a7506
* Wed Dec 13 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-33
a5a7506
- Remove power6 platform directory (#1522675)
a5a7506
94e38e4
* Wed Dec 13 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-32
08930d1
- Obsolete the libcrypt-nss subpackage (#1525396)
29bd4db
- armhfp: Disable -fstack-clash-protection due to GCC bug (#1522678)
ac67247
- ppc64: Disable power6 multilib due to GCC bug (#1522675)
94e38e4
- Auto-sync with upstream branch master,
94e38e4
  commit 243b63337c2c02f30ec3a988ecc44bc0f6ffa0ad:
94e38e4
- libio: Free backup area when it not required (swbz#22415)
94e38e4
- math: Fix nextafter and nexttoward declaration (swbz#22593)
94e38e4
- math: New generic cosf
94e38e4
- powerpc: POWER8 memcpy optimization for cached memory
94e38e4
- x86-64: Add sinf with FMA
94e38e4
- x86-64: Remove sysdeps/x86_64/fpu/s_sinf.S
94e38e4
- math: Fix ctanh (0 + i NaN), ctanh (0 + i Inf) (swbz#22568)
94e38e4
- lt_LT locale: Base collation on copy "iso14651_t1" (swbz#22524)
94e38e4
- math: Add _Float32 function aliases
94e38e4
- math: Make cacosh (0 + iNaN) return NaN + i pi/2 (swbz#22561)
94e38e4
- hsb_DE locale: Base collation on copy "iso14651_t1" (swbz#22515)
94e38e4
3c78a51
* Wed Dec 06 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-31
9d8de72
- Add elision tunables.  Drop related configure flag.  (#1383986)
3c78a51
- Auto-sync with upstream branch master,
3c78a51
  commit 37ac8e635a29810318f6d79902102e2e96b2b5bf:
3c78a51
- Linux: Implement interfaces for memory protection keys
3c78a51
- math: Add _Float64, _Float32x function aliases
3c78a51
- math: Use sign as double for reduced case in sinf
3c78a51
- math: fix sinf(NAN)
3c78a51
- math: s_sinf.c: Replace floor with simple casts
3c78a51
- et_EE locale: Base collation on iso14651_t1 (swbz#22517)
3c78a51
- tr_TR locale: Base collation on iso14651_t1 (swbz#22527)
3c78a51
- hr_HR locale: Avoid single code points for digraphs in LC_TIME (swbz#10580)
3c78a51
- S390: Fix backtrace in vdso functions
3c78a51
bb83f92
* Mon Dec 04 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-30
bb83f92
- Add build dependency on bison
bb83f92
- Auto-sync with upstream branch master,
bb83f92
  commit 7863a7118112fe502e8020a0db0fa74fef281f29:
bb83f92
- math: New generic sinf (swbz#5997)
bb83f92
- is_IS locale: Base collation on iso14651_t1 (swbz#22519)
bb83f92
- intl: Improve reproducibility by using bison (swbz#22432)
bb83f92
- sr_RS, bs_BA locales: make collation rules the same as for hr_HR (wbz#22534)
bb83f92
- hr_HR locale: various updates (swbz#10580)
bb83f92
- x86: Make a space in jmpbuf for shadow stack pointer
d19bd27
- CVE-2017-17426: malloc: Fix integer overflow in tcache (swbz#22375)
bb83f92
- locale: make forward accent sorting the default in collating (swbz#17750)
bb83f92
776ca08
* Wed Nov 29 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-29
00b734f
- Enable -fstack-clash-protection (#1512531)
776ca08
- Auto-sync with upstream branch master,
776ca08
  commit a55430cb0e261834ce7a4e118dd9e0f2b7fb14bc:
776ca08
- elf: Properly compute offsets of note descriptor and next note (swbz#22370)
776ca08
- cs_CZ locale: Base collation on iso14651_t1 (swbz#22336)
776ca08
- Implement the mlock2 function
776ca08
- Add _Float64x function aliases
776ca08
- elf: Consolidate link map sorting
776ca08
- pl_PL locale: Base collation on iso14651_t1 (swbz#22469)
776ca08
- nss: Export nscd hash function as __nss_hash (swbz#22459)
776ca08
10c1baf
* Thu Nov 23 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-28
10c1baf
- Auto-sync with upstream branch master,
10c1baf
  commit cccb6d4e87053ed63c74aee063fa84eb63ebf7b8:
10c1baf
- sigwait can fail with EINTR (#1516394)
10c1baf
- Add memfd_create function
10c1baf
- resolv: Fix p_secstodate overflow handling (swbz#22463)
10c1baf
- resolv: Obsolete p_secstodate
10c1baf
- Avoid use of strlen in getlogin_r (swbz#22447)
10c1baf
- lv_LV locale: fix collation (swbz#15537)
10c1baf
- S390: Add cfi information for start routines in order to stop unwinding
10c1baf
- aarch64: Optimized memset for falkor
10c1baf
df54767
* Sun Nov 19 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-27
df54767
- Auto-sync with upstream branch master,
df54767
  commit f6e965ee94b37289f64ecd3253021541f7c214c3:
df54767
- powerpc: AT_HWCAP2 bit PPC_FEATURE2_HTM_NO_SUSPEND
df54767
- aarch64: Add HWCAP_DCPOP bit
df54767
- ttyname, ttyname_r: Don't bail prematurely (swbz#22145)
df54767
- signal: Optimize sigrelse implementation
df54767
- inet: Check length of ifname in if_nametoindex (swbz#22442)
df54767
- malloc: Account for all heaps in an arena in malloc_info (swbz#22439)
df54767
- malloc: Add missing arena lock in malloc_info (swbz#22408)
df54767
- malloc: Use __builtin_tgmath in tgmath.h with GCC 8 (swbz#21660)
df54767
- locale: Replaced unicode sequences in the ASCII printable range
df54767
- resolv: More precise checks in res_hnok, res_dnok (swbz#22409, swbz#22412)
df54767
- resolv: ns_name_pton should report trailing \ as error (swbz#22413)
df54767
- locale: mfe_MU, miq_NI, an_ES, kab_DZ, om_ET: Escape / in d_fmt (swbz#22403)
df54767
0980ba1
* Tue Nov 07 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-26
0980ba1
- Auto-sync with upstream branch master,
0980ba1
  commit 6b86036452b9ac47b4ee7789a50f2f37df7ecc4f:
0980ba1
- CVE-2017-15804: glob: Fix buffer overflow during GLOB_TILDE unescaping
0980ba1
- powerpc: Use latest string function optimization for internal function calls
0980ba1
- math: No _Float128 support for ppc64le -mlong-double-64 (swbz#22402)
0980ba1
- tpi_PG locale: Fix wrong d_fmt
0980ba1
- aarch64: Disable lazy symbol binding of TLSDESC
0980ba1
- tpi_PG locale: fix syntax error (swbz#22382)
0980ba1
- i586: Use conditional branches in strcpy.S (swbz#22353)
0980ba1
- ffsl, ffsll: Declare under __USE_MISC, not just __USE_GNU
0980ba1
- csb_PL locale: Fix abmon/mon for March (swbz#19485)
0980ba1
- locale: Various yesstr/nostr/yesexpr/noexpr fixes (swbz#15260, swbz#15261)
0980ba1
- localedef: Add --no-warnings/--warnings option
0980ba1
- powerpc: Replace lxvd2x/stxvd2x with lvx/stvx in P7's memcpy/memmove
0980ba1
- locale: Use ASCII as much as possible in LC_MESSAGES
0980ba1
- Add new locale yuw_PG (swbz#20952)
0980ba1
- malloc: Add single-threaded path to malloc/realloc/calloc/memalloc
0980ba1
- i386: Replace assembly versions of e_powf with generic e_powf.c
0980ba1
- i386: Replace assembly versions of e_log2f with generic e_log2f.c
0980ba1
- x86-64: Add powf with FMA
0980ba1
- x86-64: Add logf with FMA
0980ba1
- i386: Replace assembly versions of e_logf with generic e_logf.c
0980ba1
- i386: Replace assembly versions of e_exp2f with generic e_exp2f.c
0980ba1
- x86-64: Add exp2f with FMA
0980ba1
- i386: Replace assembly versions of e_expf with generic e_expf.c
0980ba1
e74f2b3
* Sat Oct 21 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-25
e74f2b3
- Auto-sync with upstream branch master,
e74f2b3
  commit 797ba44ba27521261f94cc521f1c2ca74f650147:
e74f2b3
- math: Add bits/floatn.h defines for more _FloatN / _FloatNx types
e74f2b3
- posix: Fix improper assert in Linux posix_spawn (swbz#22273)
e74f2b3
- x86-64: Use fxsave/xsave/xsavec in _dl_runtime_resolve (swbz#21265)
e74f2b3
- CVE-2017-15670: glob: Fix one-byte overflow (#1504807)
e74f2b3
- malloc: Add single-threaded path to _int_free
e74f2b3
- locale: Add new locale kab_DZ (swbz#18812)
e74f2b3
- locale: Add new locale shn_MM (swbz#13605)
e74f2b3
5188e85
* Fri Oct 20 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-24
5188e85
- Use make -O to serialize make output
5188e85
- Auto-sync with upstream branch master,
5188e85
  commit 63b4baa44e8d22501c433c4093aa3310f91b6aa2:
5188e85
- sysconf: Fix missing definition of UIO_MAXIOV on Linux (#1504165)
5188e85
- Install correct bits/long-double.h for MIPS64 (swbz#22322)
5188e85
- malloc: Fix deadlock in _int_free consistency check
5188e85
- x86-64: Don't set GLRO(dl_platform) to NULL (swbz#22299)
5188e85
- math: Add _Float128 function aliases
5188e85
- locale: Add new locale mjw_IN (swbz#13994)
5188e85
- aarch64: Rewrite elf_machine_load_address using _DYNAMIC symbol
5188e85
- powerpc: fix check-before-set in SET_RESTORE_ROUND
5188e85
- locale: Use U+202F as thousands separators in pl_PL locale (swbz#16777)
5188e85
- math: Use __f128 to define FLT128_* constants in include/float.h for old GCC
5188e85
- malloc: Improve malloc initialization sequence (swbz#22159)
5188e85
- malloc: Use relaxed atomics for malloc have_fastchunks
5188e85
- locale: New locale ca_ES@valencia (swbz#2522)
5188e85
- math: Let signbit use the builtin in C++ mode with gcc < 6.x (swbz#22296)
5188e85
- locale: Place monetary symbol in el_GR, el_CY after the amount (swbz#22019)
5188e85
d4b46d7
* Tue Oct 17 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-23
7fbb58c
- Switch to .9000 version numbers during development
d4b46d7
d4b46d7
* Tue Oct 17 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-22
7fbb58c
- Auto-sync with upstream branch master,
7fbb58c
  commit c38a4bfd596db2be2b9c1f96715bdc833eab760a:
7fbb58c
- malloc: Use compat_symbol_reference in libmcheck (swbz#22050)
7fbb58c
6c2a58d
* Mon Oct 16 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-21
6c2a58d
- Auto-sync with upstream branch master,
6c2a58d
  commit 596f70134a8f11967c65c1d55a94a3a2718c731d:
6c2a58d
- Silence -O3 -Wall warning in malloc/hooks.c with GCC 7 (swbz#22052)
6c2a58d
- locale: No warning for non-symbolic character (swbz#22295)
6c2a58d
- locale: Allow "" int_curr_Symbol (swbz#22294)
6c2a58d
- locale: Fix localedef exit code (swbz#22292)
6c2a58d
- nptl: Preserve error in setxid thread broadcast in coredumps (swbz#22153)
6c2a58d
- powerpc: Avoid putting floating point values in memory (swbz#22189)
6c2a58d
- powerpc: Fix the carry bit on mpn_[add|sub]_n on POWER7 (swbz#22142)
6c2a58d
- Support profiling PIE (swbz#22284)
6c2a58d
b1ee101
* Wed Oct 11 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-20
b1ee101
- Auto-sync with upstream branch master,
b1ee101
  commit d8425e116cdd954fea0c04c0f406179b5daebbb3:
b1ee101
- nss_files performance issue in multi mode (swbz#22078)
b1ee101
- Ensure C99 and C11 interfaces are available for C++ (swbz#21326)
b1ee101
988ba6d
* Mon Oct 09 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-19
d3da0e9
- Move /var/db/Makefile to nss_db (#1498900)
988ba6d
- Auto-sync with upstream branch master,
988ba6d
  commit 645ac9aaf89e3311949828546df6334322f48933:
988ba6d
- openpty: use TIOCGPTPEER to open slave side fd
988ba6d
Carlos O'Donell b586203
* Fri Oct 06 2017 Carlos O'Donell <carlos@systemhalted.org> - 2.26.90-18
Carlos O'Donell b586203
- Auto-sync with upstream master,
Carlos O'Donell b586203
  commit 1e26d35193efbb29239c710a4c46a64708643320.
Carlos O'Donell b586203
- malloc: Fix tcache leak after thread destruction (swbz#22111)
Carlos O'Donell b586203
- powerpc:  Fix IFUNC for memrchr.
Carlos O'Donell b586203
- aarch64: Optimized implementation of memmove for Qualcomm Falkor
Carlos O'Donell b586203
- Always do locking when iterating over list of streams (swbz#15142)
Carlos O'Donell b586203
- abort: Do not flush stdio streams (swbz#15436)
Carlos O'Donell b586203
67108a5
* Wed Oct 04 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-17
2235ae5
- Move nss_compat to the main glibc package (#1400538)
67108a5
- Auto-sync with upstream master,
67108a5
  commit 11c4f5010c58029e73e656d5df4f8f42c9b8e877:
67108a5
- crypt: Use NSPR header files in addition to NSS header files (#1489339)
67108a5
- math: Fix yn(n,0) without SVID wrapper (swbz#22244)
67108a5
- math: Fix log2(0) and log(10) in downward rounding (swbz#22243)
67108a5
- math: Add C++ versions of iscanonical for ldbl-96, ldbl-128ibm (swbz#22235)
67108a5
- powerpc: Optimize memrchr for power8
67108a5
- Hide various internal functions (swbz#18822)
67108a5
d61c107
* Sat Sep 30 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-16
d61c107
- Auto-sync with upstream master,
d61c107
  commit 1e2bffd05c36a9be30d7092d6593a9e9aa009ada:
d61c107
- Add IBM858 charset (#1416405)
d61c107
- Update kernel version in syscall-names.list to 4.13
d61c107
- Add Linux 4.13 constants to bits/fcntl-linux.h
d61c107
- Add fcntl sealing interfaces from Linux 3.17 to bits/fcntl-linux.h
d61c107
- math: New generic powf, log2f, logf
d61c107
- Fix nearbyint arithmetic moved before feholdexcept (swbz#22225)
d61c107
- Mark __dso_handle as hidden (swbz#18822)
d61c107
- Skip PT_DYNAMIC segment with p_filesz == 0 (swbz#22101)
d61c107
- glob now matches dangling symbolic links (swbz#866, swbz#22183)
d61c107
- nscd: Release read lock after resetting timeout (swbz#22161)
f7f0303
- Avoid __MATH_TG in C++ mode with -Os for fpclassify (swbz#22146)
d61c107
- Fix dlclose/exit race (swbz#22180)
d61c107
- x86: Add SSE4.1 trunc, truncf (swbz#20142)
d61c107
- Fix atexit/exit race (swbz#14333)
d61c107
- Use execveat syscall in fexecve (swbz#22134)
d61c107
- Enable unwind info in libc-start.c and backtrace.c
d61c107
- powerpc: Avoid misaligned stores in memset
d61c107
- powerpc: build some IFUNC math functions for libc and libm (swbz#21745)
d61c107
- Removed redundant data (LC_TIME and LC_MESSAGES) for niu_NZ (swbz#22023)
d61c107
- Fix LC_TELEPHONE for az_AZ (swbz#22112)
d61c107
- x86: Add MathVec_Prefer_No_AVX512 to cpu-features (swbz#21967)
d61c107
- x86: Add x86_64 to x86-64 HWCAP (swbz#22093)
d61c107
- Finish change from “Bengali” to “Bangla” (swbz#14925)
d61c107
- posix: fix glob bugs with long login names (swbz#1062)
d61c107
- posix: Fix getpwnam_r usage (swbz#1062)
d61c107
- posix: accept inode 0 is a valid inode number (swbz#19971)
d61c107
- Remove redundant LC_TIME data in om_KE (swbz#22100)
d61c107
- Remove remaining _HAVE_STRING_ARCH_* definitions (swbz#18858)
d61c107
- resolv: Fix memory leak with OOM during resolv.conf parsing (swbz#22095)
d61c107
- Add miq_NI locale for Miskito (swbz#20498)
d61c107
- Fix bits/math-finite.h exp10 condition (swbz#22082)
d61c107
0e45e4d
* Mon Sep 04 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-15
0e45e4d
- Auto-sync with upstream master,
0e45e4d
  commit b38042f51430974642616a60afbbf96fd0b98659:
0e45e4d
- Implement tmpfile with O_TMPFILE (swbz#21530)
0e45e4d
- Obsolete pow10 functions
0e45e4d
- math.h: Warn about an already-defined log macro
0e45e4d
2847461
* Fri Sep 01 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-14
21cf167
- Build glibc with -O2 (following the upstream default).
2847461
- Auto-sync with upstream master,
2847461
  commit f4a6be2582b8dfe8adfa68da3dd8decf566b3983:
2847461
- malloc: Abort on heap corruption, without a backtrace (swbz#21754)
2847461
- getaddrinfo: Return EAI_NODATA for gethostbyname2_r with NO_DATA (swbz#21922)
2847461
- getaddrinfo: Fix error handling in gethosts (swbz#21915) (swbz#21922)
2847461
- Place $(elf-objpfx)sofini.os last (swbz#22051)
2847461
- Various locale fixes (swbz#15332, swbz#22044)
2847461
b45bb05
* Wed Aug 30 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-13
b45bb05
- Drop glibc-rh952799.patch, applied upstream (#952799, swbz#22025)
b45bb05
- Auto-sync with upstream master,
b45bb05
  commit 5f9409b787c5758fc277f8d1baf7478b752b775d:
b45bb05
- Various locale fixes (swbz#22022, swbz#22038, swbz#21951, swbz#13805,
b45bb05
  swbz#21971, swbz#21959)
b45bb05
- MIPS/o32: Fix internal_syscall5/6/7 (swbz#21956)
b45bb05
- AArch64: Fix procfs.h not to expose stdint.h types
b45bb05
- iconv_open: Fix heap corruption on gconv_init failure (swbz#22026)
b45bb05
- iconv: Mangle __btowc_fct even without __init_fct (swbz#22025)
b45bb05
- Fix bits/math-finite.h _MSUF_ expansion namespace (swbz#22028)
b45bb05
- Provide a C++ version of iszero that does not use __MATH_TG (swbz#21930)
b45bb05
d0c57f6
* Mon Aug 28 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-12
d0c57f6
- Auto-sync with upstream master,
d0c57f6
  commit 2dba5ce7b8115d6a2789bf279892263621088e74.
d0c57f6
6a6f543
* Fri Aug 25 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-11
6a6f543
- Auto-sync with upstream master,
6a6f543
  commit 3d7b66f66cb223e899a7ebc0f4c20f13e711c9e0:
6a6f543
- string/stratcliff.c: Replace int with size_t (swbz#21982)
6a6f543
- Fix tgmath.h handling of complex integers (swbz#21684)
6a6f543
5bc208c
* Thu Aug 24 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-10
5bc208c
- Use an architecture-independent system call list (#1484729)
2f246ed
- Drop glibc-fedora-include-bits-ldbl.patch (#1482105)
5bc208c
eb3d388
* Tue Aug 22 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-9
eb3d388
- Auto-sync with upstream master,
eb3d388
  commit 80f91666fed71fa3dd5eb5618739147cc731bc89.
eb3d388
c6d0720
* Mon Aug 21 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-8
c6d0720
- Auto-sync with upstream master,
c6d0720
  commit a8410a5fc9305c316633a5a3033f3927b759be35:
c6d0720
- Obsolete matherr, _LIB_VERSION, libieee.a.
c6d0720
976a6ca
* Mon Aug 21 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-7
976a6ca
- Auto-sync with upstream master,
976a6ca
  commit 4504783c0f65b7074204c6126c6255ed89d6594e.
976a6ca
8c898cd
* Mon Aug 21 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-6
8c898cd
- Auto-sync with upstream master,
8c898cd
  commit b5889d25e9bf944a89fdd7bcabf3b6c6f6bb6f7c:
8c898cd
- assert: Support types without operator== (int) (#1483005)
8c898cd
051a34b
* Mon Aug 21 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-5
051a34b
- Auto-sync with upstream master,
051a34b
  commit 2585d7b839559e665d5723734862fbe62264b25d:
051a34b
- Do not use generic selection in C++ mode
051a34b
- Do not use __builtin_types_compatible_p in C++ mode (#1481205)
051a34b
- x86-64: Check FMA_Usable in ifunc-mathvec-avx2.h (swbz#21966)
051a34b
- Various locale fixes (swbz#21750, swbz#21960, swbz#21959, swbz#19852)
051a34b
- Fix sigval namespace (swbz#21944)
051a34b
- x86-64: Optimize e_expf with FMA (swbz#21912)
051a34b
- Adjust glibc-rh827510.patch.
051a34b
c6e9927
* Wed Aug 16 2017 Tomasz Kłoczko <kloczek@fedoraproject.org> - 2.26-4
Carlos O'Donell 08d81d7
- Remove 'Buildroot' tag, 'Group' tag, and '%%clean' section, and don't
Carlos O'Donell 08d81d7
  remove the buildroot in '%%install', all per Fedora Packaging Guidelines
c6e9927
  (#1476839)
c6e9927
66a1c9c
* Wed Aug 16 2017 Florian Weimer <fweimer@redhat.com> - 2.26.90-3
66a1c9c
- Auto-sync with upstream master,
66a1c9c
  commit 403143e1df85dadd374f304bd891be0cd7573e3b:
66a1c9c
- x86-64: Align L(SP_RANGE)/L(SP_INF_0) to 8 bytes (swbz#21955)
66a1c9c
- powerpc: Add values from Linux 4.8 to <elf.h>
66a1c9c
- S390: Add new s390 platform z14.
66a1c9c
- Various locale fixes (swbz#14925, swbz#20008, swbz#20482, swbz#12349
66a1c9c
  swbz#19982, swbz#20756, swbz#20756, swbz#21836, swbz#17563, swbz#16905,
66a1c9c
  swbz#21920, swbz#21854)
66a1c9c
- NSS: Replace exported NSS lookup functions with stubs (swbz#21962)
66a1c9c
- i386: Do not set internal_function
66a1c9c
- assert: Suppress pedantic warning caused by statement expression (swbz#21242)
66a1c9c
- powerpc: Restrict xssqrtqp operands to Vector Registers (swbz#21941)
66a1c9c
- sys/ptrace.h: remove obsolete PTRACE_SEIZE_DEVEL constant (swbz#21928)
66a1c9c
- Remove __qaddr_t, __long_double_t
66a1c9c
- Fix uc_* namespace (swbz#21457)
66a1c9c
- nss: Call __resolv_context_put before early return in get*_r (swbz#21932)
66a1c9c
- aarch64: Optimized memcpy for Qualcomm Falkor processor
66a1c9c
- manual: Document getcontext uc_stack value on Linux (swbz#759)
66a1c9c
- i386: Add <startup.h> (swbz#21913)
66a1c9c
- Don't use IFUNC resolver for longjmp or system in libpthread (swbz#21041)
66a1c9c
- Fix XPG4.2 bits/sigaction.h namespace (swbz#21899)
66a1c9c
- x86-64: Add FMA multiarch functions to libm
66a1c9c
- i386: Support static PIE in start.S
66a1c9c
- Compile tst-prelink.c without PIE (swbz#21815)
66a1c9c
- x86-64: Use _dl_runtime_resolve_opt only with AVX512F (swbz#21871)
66a1c9c
- x86: Remove __memset_zero_constant_len_parameter (swbz#21790)
66a1c9c
2620469
* Wed Aug 16 2017 Florian Weimer <fweimer@redhat.com> - 2.26-2
2620469
- Disable multi-arch (IFUNC string functions) on i686 (#1471427)
2620469
- Remove nosegneg 32-bit Xen PV support libraries (#1482027)
2620469
- Adjust spec file to RPM changes
2620469
Carlos O'Donell 8742b0f
* Thu Aug 03 2017 Carlos O'Donell <carlos@systemhalted.org> - 2.26-1
Carlos O'Donell 8742b0f
- Update to released glibc 2.26.
Carlos O'Donell 8742b0f
- Auto-sync with upstream master,
Carlos O'Donell 8742b0f
  commit 2aad4b04ad7b17a2e6b0e66d2cb4bc559376617b.
Carlos O'Donell 8742b0f
- getaddrinfo: Release resolver context on error in gethosts (swbz#21885)