glibc/glibc.spec

1335 lines
42 KiB
RPMSpec
Raw Normal View History

%define checklist %{_builddir}/%{name}-%{version}/Check.list
2012-02-01 14:42:15 +04:00
# crypt blowfish support
%define crypt_bf_ver 1.3
2012-02-01 14:42:15 +04:00
%define _slibdir /%{_lib}
%define _slibdir32 /lib
%define _libdir32 %{_prefix}/lib
2012-02-01 14:42:15 +04:00
%define major 6
%define libc %mklibname c %{major}
%define devname %mklibname -d c
%define statname %mklibname -d -s c
%define multilibc libc%{major}
2012-02-01 14:42:15 +04:00
%define _disable_ld_no_undefined 1
%undefine _fortify_cflags
%ifarch %{arm}
%define _gnu -gnueabi
2012-02-01 14:42:15 +04:00
%endif
# Define Xen arches to build with -mno-tls-direct-seg-refs
%define xenarches %{ix86}
2012-02-01 14:42:15 +04:00
# Distro-specific default value is defined in branding-configs package
%{?build_selinux}%{?!build_selinux:%bcond_with selinux}
%{?build_systap}%{?!build_systap:%bcond_without systap}
2012-02-01 14:42:15 +04:00
# FIXME disable libselinux, new version is not yet available
%bcond_with selinux
2012-02-01 14:42:15 +04:00
# Allow make check to fail only when running kernels where we know
# tests must pass (no missing features or bugs in the kernel)
%define check_min_kver 2.6.21
# Define to build a biarch package
%define build_multiarch 0
%ifarch x86_64
%define build_multiarch 1
2012-02-01 14:42:15 +04:00
%endif
%bcond_without nscd
%bcond_without i18ndata
%bcond_with timezone
%bcond_without nsscrypt
2016-09-01 21:36:14 +10:00
%bcond_without locales
2012-02-01 14:42:15 +04:00
# build documentation by default
%bcond_without doc
%bcond_with pdf
# enable utils by default
%bcond_without utils
2012-02-01 14:42:15 +04:00
#-----------------------------------------------------------------------
2012-02-01 14:42:15 +04:00
Summary: The GNU libc libraries
Name: glibc
Epoch: 6
Version: 2.24
2016-10-14 21:13:32 +04:00
Release: 5
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
2012-02-01 14:42:15 +04:00
Group: System/Libraries
Url: http://www.eglibc.org/
2014-05-23 01:04:06 +11:00
Source0: http://ftp.gnu.org/gnu/glibc/%{name}-%{version}.tar.xz
Source1: http://ftp.gnu.org/gnu/glibc/%{name}-%{version}.tar.xz.sig
2012-02-01 14:42:15 +04:00
# From Fedora
Source2: glibc_post_upgrade.c
2012-02-01 14:42:15 +04:00
Source3: glibc-manpages.tar.bz2
2015-09-18 11:46:50 +03:00
Source4: nscd.conf
2012-02-01 14:42:15 +04:00
Source5: glibc-check.sh
Source6: nscd.service
Source7: nscd.socket
Source10: libc-lock.h
2012-02-01 14:42:15 +04:00
# Locales
Source20: Makefile.locales
2012-10-22 20:13:52 +11:00
2012-02-01 14:42:15 +04:00
# Blowfish support
Source50: http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_ver}.tar.gz
Source51: http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_ver}.tar.gz.sign
Source52: http://cvsweb.openwall.com/cgi/cvsweb.cgi/~checkout~/Owl/packages/glibc/crypt_freesec.c
Source53: http://cvsweb.openwall.com/cgi/cvsweb.cgi/~checkout~/Owl/packages/glibc/crypt_freesec.h
Source100: %{name}.rpmlintrc
Source1000: locale-pkg
Source1001: locale_install.sh
Source1002: locale_uninstall.sh
#-----------------------------------------------------------------------
# fedora patches
#
# Patches that are highly unlikely to ever be accepated upstream.
#
2012-02-01 14:42:15 +04:00
# Configuration twiddle, not sure there's a good case to get upstream to
# change this.
Patch0: glibc-fedora-nscd.patch
# Horrible hack, never to be upstreamed. Can go away once the world
# has been rebuilt to use the new ld.so path.
2016-09-01 15:21:36 +10:00
Patch1: glibc-arm-hardfloat-3.patch
# All these were from the glibc-fedora.patch mega-patch and need another
# round of reviewing. Ideally they'll either be submitted upstream or
# dropped.
2016-09-01 15:21:36 +10:00
Patch10: glibc-fedora-__libc_multiple_libcs.patch
Patch11: glibc-fedora-elf-ORIGIN.patch
Patch12: glibc-fedora-elf-init-hidden_undef.patch
Patch13: glibc-fedora-elf-rh737223.patch
Patch14: eglibc-fedora-test-debug-gnuc-hack.patch
Patch15: glibc-fedora-i386-tls-direct-seg-refs.patch
Patch16: glibc-fedora-include-bits-ldbl.patch
Patch17: glibc-fedora-ldd.patch
Patch18: glibc-fedora-linux-tcsetattr.patch
Patch19: eglibc-fedora-locale-euro.patch
# We disagree with
# glibc-fedora-streams-rh436349.patch
# Therefore we don't package/apply it.
2016-09-01 15:21:36 +10:00
Patch20: glibc-fedora-localedata-rh61908.patch
Patch21: glibc-fedora-localedef.patch
Patch22: glibc-fedora-locarchive.patch
Patch23: glibc-fedora-manual-dircategory.patch
Patch24: glibc-fedora-nis-rh188246.patch
Patch25: glibc-fedora-nptl-linklibc.patch
Patch26: glibc-2.20-i586-hptiming.patch
Patch27: glibc-2.22-blacklist-CPUs-from-lock-elision.patch
Patch28: glibc-bug-regex-gcc5.patch
Patch29: glibc-c-utf8-locale.patch
Patch30: glibc-dns-host-gcc5.patch
Patch31: glibc-dso_deps.patch
Patch32: glibc-gcc-PR69537.patch
Patch33: glibc-gethnamaddr-gcc5.patch
Patch34: glibc-ld-ctype-gcc5.patch
Patch35: glibc-res-hconf-gcc5.patch
#
# Patches from upstream
#
#
# Patches submitted, but not yet approved upstream.
# Each should be associated with a BZ.
# Obviously we're not there right now, but that's the goal
#
2012-07-30 21:08:33 +04:00
2016-09-01 15:21:36 +10:00
# Needs to be sent upstream
Patch40: glibc-rh697421.patch
# Build info files in the source tree, then move to the build
# tree so that they're identical for multilib builds
Patch41: glibc-rh825061.patch
Patch42: glibc-rh741105.patch
# Upstream BZ 14247
2016-09-01 15:21:36 +10:00
Patch43: glibc-rh827510.patch
# Upstream BZ 14185
2016-09-01 15:21:36 +10:00
Patch44: glibc-rh819430.patch
Patch45: glibc-rh952799.patch
Patch46: glibc-rh1009145.patch
Patch47: glibc-rh1013801.patch
Patch48: glibc-rh1070416.patch
Patch49: glibc-rh1315108.patch
Patch50: glibc-rh1315476-1.patch
Patch51: glibc-rh1315476-2.patch
Patch52: glibc-rh1324623.patch
Patch53: glibc-rh1335011.patch
Patch54: glibc-rh1351108-update-to-unicode-9.0.0.patch
#-----------------------------------------------------------------------
# mandriva patches
2016-09-01 15:21:36 +10:00
Patch100: eglibc-mandriva-localedef-archive-follow-symlinks.patch
Patch101: eglibc-mandriva-fix-dns-with-broken-routers.patch
Patch102: eglibc-mandriva-nss-upgrade.patch
#Drop patch. Use default directory for locale definitions
2016-09-01 15:21:36 +10:00
#Patch103: eglibc-mandriva-share-locale.patch
Patch104: eglibc-mandriva-nsswitch.conf.patch
Patch105: eglibc-mandriva-xterm-xvt.patch
Patch106: eglibc-mandriva-nscd-enable.patch
Patch107: eglibc-mandriva-nscd-no-host-cache.patch
Patch108: eglibc-mandriva-i386-hwcapinfo.patch
Patch109: eglibc-mandriva-nscd-init-should-start.patch
Patch110: eglibc-mandriva-timezone.patch
Patch111: eglibc-mandriva-biarch-cpp-defines.patch
Patch112: eglibc-mandriva-ENOTTY-fr-translation.patch
Patch113: eglibc-mandriva-biarch-utils.patch
Patch114: eglibc-mandriva-multiarch.patch
Patch115: eglibc-mandriva-i586-if-no-cmov.patch
Patch116: eglibc-mandriva-pt_BR-i18nfixes.patch
Patch117: eglibc-mandriva-testsuite-ldbl-bits.patch
Patch118: eglibc-mandriva-testsuite-rt-notparallel.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=638477#c275
# https://bugzilla.redhat.com/show_bug.cgi?id=696096
# https://bugzilla.redhat.com/attachment.cgi?id=491198
2016-09-01 15:21:36 +10:00
Patch120: eglibc-mandriva-no-leaf-attribute.patch
Patch121: eglibc-mandriva-mdv-avx-owl-crypt.patch
Patch122: eglibc-mandriva-mdv-owl-crypt_freesec.patch
Patch123: eglibc-mandriva-avx-relocate_fcrypt.patch
Patch124: eglibc-mandriva-avx-increase_BF_FRAME.patch
Patch125: eglibc-mandriva-mdv-wrapper_handle_sha.patch
# Reverts a part of eglibc-fedora-uname-getrlimit.patch that breaks the build
2016-09-01 15:21:36 +10:00
Patch126: nptl-getrlimit-compile.patch
# http://sourceware.org/bugzilla/show_bug.cgi?id=14995
# http://sourceware.org/bugzilla/attachment.cgi?id=6795
2016-09-01 15:21:36 +10:00
Patch127: glibc-2.17-gold.patch
# Crypt-blowfish patches
2016-09-01 15:21:36 +10:00
Patch128: crypt_blowfish-arm.patch
2013-12-11 09:17:21 -05:00
BuildRequires: autoconf2.5
BuildRequires: gettext
BuildRequires: kernel-headers
BuildRequires: patch
BuildRequires: perl
BuildRequires: cap-devel
%if %{with selinux}
BuildRequires: pkgconfig(libselinux) >= 1.17.10
%endif
BuildRequires: texinfo
%if %{with pdf}
BuildRequires: texlive
%endif
%if %{with utils}
BuildRequires: gd-devel
%endif
%if %{with systap}
BuildRequires: systemtap-devel
%endif
%if %{with nsscrypt}
BuildRequires: pkgconfig(nss)
%endif
# we'll be the only package requiring this, avoiding any other package
# dependencies on '/bin/sh' or 'bash'
Requires: bash
# Requires: filesystem
%ifarch %{xenarches}
%rename %{name}-xen
%endif
# The dynamic linker supports DT_GNU_HASH
Provides: rtld(GNU_HASH)
Provides: glibc-crypt_blowfish = %{crypt_bf_ver}
Provides: eglibc-crypt_blowfish = %{crypt_bf_ver}
Provides: should-restart = system
# Determine minimum kernel versions (rhbz#619538)
%define enablekernel 2.6.32
Conflicts: kernel < %{enablekernel}
2016-09-01 22:20:35 +10:00
%if %{with locales}
Conflicts: locales < %{EVRD}
Conflicts: locales > %{EVRD}
2016-09-01 22:20:35 +10:00
%endif
2012-02-01 14:42:15 +04:00
# Don't try to explicitly provide GLIBC_PRIVATE versioned libraries
%define _filter_GLIBC_PRIVATE 1
2012-02-01 14:42:15 +04:00
Provides: ld.so
%rename ldconfig
Provides: /sbin/ldconfig
2012-02-01 14:42:15 +04:00
%description
The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.
2012-02-01 14:42:15 +04:00
# %post
# %{_sbindir}/glibc_post_upgrade
%files -f libc.lang
%if %{with timezone}
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/localtime
2012-02-01 14:42:15 +04:00
%endif
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/nsswitch.conf
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/ld.so.conf
%dir %{_sysconfdir}/ld.so.conf.d
%config(noreplace) %{_sysconfdir}/rpc
%doc %dir %{_docdir}/glibc
%doc %{_docdir}/glibc/nss
%doc %{_docdir}/glibc/gai.conf
%doc %{_docdir}/glibc/COPYING
%doc %{_docdir}/glibc/COPYING.LIB
%{_mandir}/man1/*
%{_mandir}/man8/rpcinfo.8*
%{_mandir}/man8/ld.so*
%{_localedir}/locale.alias
/sbin/sln
%{_prefix}/libexec/getconf
%ifarch x86_64
%exclude %{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFF32
%exclude %{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFFBIG
%exclude %{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFF32
%exclude %{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFFBIG
%exclude %{_prefix}/libexec/getconf/XBS5_ILP32_OFF32
%exclude %{_prefix}/libexec/getconf/XBS5_ILP32_OFFBIG
%endif
2012-07-30 21:08:33 +04:00
%{_slibdir}/ld-%{version}.so
%ifarch %{ix86}
%{_slibdir}/ld-linux.so.2
%{_slibdir}/i686
%endif
%ifarch x86_64
%{_slibdir}/ld-linux-x86-64.so.2
2012-02-01 14:42:15 +04:00
%endif
%ifarch armv7l
%{_slibdir}/ld-linux.so.3
2012-02-01 14:42:15 +04:00
%endif
%ifarch armv7hl armv6j
%{_slibdir}/ld-linux-armhf.so.3
%endif
%ifarch aarch64
%{_slibdir}/ld-linux-aarch64.so.1
%{_slibdir32}/ld-linux-aarch64.so.1
%endif
%{_slibdir}/lib*-[.0-9]*.so
%{_slibdir}/lib*.so.[0-9]*
%{_slibdir}/libSegFault.so
%dir %{_libdir}/audit
%{_libdir}/audit/sotruss-lib.so
%dir %{_libdir}/gconv
%{_libdir}/gconv/*.so
%{_libdir}/gconv/gconv-modules
%ghost %{_libdir}/gconv/gconv-modules.cache
# %attr(4755,root,root) %{_prefix}/libexec/pt_chown
%{_bindir}/catchsegv
%{_bindir}/gencat
%{_bindir}/getconf
%{_bindir}/getent
%{_bindir}/iconv
%{_bindir}/ldd
%ifarch %{ix86}
%{_bindir}/lddlibc4
%endif
%{_bindir}/locale
%{_bindir}/localedef
%{_bindir}/makedb
%{_bindir}/pldd
%{_bindir}/sotruss
%{_bindir}/sprof
%{_bindir}/tzselect
%{_sbindir}/iconvconfig
%{_sbindir}/glibc_post_upgrade
/sbin/ldconfig
%{_mandir}/man8/ldconfig*
%ghost %{_sysconfdir}/ld.so.cache
%dir %{_var}/cache/ldconfig
%ghost %{_var}/cache/ldconfig/aux-cache
%{_var}/lib/rpm/filetriggers/ldconfig.*
%{_var}/db/Makefile
########################################################################
%if %{build_multiarch}
#-----------------------------------------------------------------------
%package -n %{multilibc}
Summary: The GNU libc libraries
Group: System/Libraries
Conflicts: glibc < 6:2.14.90-13
%post -n %{multilibc}
%{_sbindir}/iconvconfig %{_libdir32}/gconv -o %{_libdir32}/gconv/gconv-modules.cache
%description -n %{multilibc}
The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.
%files -n %{multilibc}
2012-07-30 21:08:33 +04:00
%{_slibdir32}/ld-%{version}.so
%{_slibdir32}/ld-linux*.so.2
%{_slibdir32}/lib*-[.0-9]*.so
%{_slibdir32}/lib*.so.[0-9]*
%{_slibdir32}/libSegFault.so
%dir %{_libdir32}/audit
%{_libdir32}/audit/sotruss-lib.so
%{_libdir32}/gconv/*.so
%{_libdir32}/gconv/gconv-modules
%ghost %{_libdir32}/gconv/gconv-modules.cache
%{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFF32
%{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFFBIG
%{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFF32
%{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFFBIG
%{_prefix}/libexec/getconf/XBS5_ILP32_OFF32
%{_prefix}/libexec/getconf/XBS5_ILP32_OFFBIG
#-----------------------------------------------------------------------
# build_multiarch
%endif
#-----------------------------------------------------------------------
%package devel
Summary: Header and object files for development using standard C libraries
Group: Development/C
Requires: %{name} = %{EVRD}
%if %{build_multiarch}
Requires: %{multilibc} = %{EVRD}
2012-02-01 14:42:15 +04:00
%endif
Requires: kernel-headers
2012-02-01 14:42:15 +04:00
Provides: glibc-crypt_blowfish-devel = %{crypt_bf_ver}
Provides: eglibc-crypt_blowfish-devel = %{crypt_bf_ver}
%rename glibc-doc
%if %{with pdf}
%rename glibc-doc-pdf
%endif
2012-02-01 14:42:15 +04:00
%description devel
2012-02-01 14:42:15 +04:00
The glibc-devel package contains the header and object files necessary
for developing programs which use the standard C libraries (which are
used by nearly all programs). If you are developing programs which
will use the standard C libraries, your system needs to have these
standard header and object files available in order to create the
executables.
%files devel
%{_mandir}/man3/*
%{_infodir}/libc.info*
%doc %{_docdir}/glibc/*
%exclude %{_docdir}/glibc/nss
%exclude %{_docdir}/glibc/gai.conf
%exclude %{_docdir}/glibc/COPYING
%exclude %{_docdir}/glibc/COPYING.LIB
%{_includedir}/*
%{_libdir}/*.o
%{_libdir}/*.so
%{_libdir}/libc_nonshared.a
%{_libdir}/libg.a
%{_libdir}/libieee.a
%{_libdir}/libmcheck.a
%ifarch x86_64
%{_libdir}/libmvec.a
%{_libdir}/libmvec_nonshared.a
%endif
%{_libdir}/libpthread_nonshared.a
%{_libdir}/librpcsvc.a
%if %{build_multiarch}
%{_libdir32}/*.o
%{_libdir32}/*.so
%{_libdir32}/libc_nonshared.a
%{_libdir32}/libg.a
%{_libdir32}/libieee.a
%{_libdir32}/libmcheck.a
%{_libdir32}/libpthread_nonshared.a
%{_libdir32}/librpcsvc.a
%endif
#-----------------------------------------------------------------------
%package static-devel
2012-02-01 14:42:15 +04:00
Summary: Static libraries for GNU C library
Group: Development/C
Requires: %{name}-devel = %{EVRD}
2012-02-01 14:42:15 +04:00
%description static-devel
2012-02-01 14:42:15 +04:00
The glibc-static-devel package contains the static libraries necessary
for developing programs which use the standard C libraries. Install
glibc-static-devel if you need to statically link your program or
library.
%files static-devel
%{_libdir}/libBrokenLocale.a
%{_libdir}/libanl.a
%{_libdir}/libc.a
%{_libdir}/libcrypt.a
%{_libdir}/libdl.a
%{_libdir}/libm.a
%{_libdir}/libnsl.a
%{_libdir}/libpthread.a
%{_libdir}/libresolv.a
%{_libdir}/librt.a
%{_libdir}/libutil.a
%if %{build_multiarch}
%{_libdir32}/libBrokenLocale.a
%{_libdir32}/libanl.a
%{_libdir32}/libc.a
%{_libdir32}/libcrypt.a
%{_libdir32}/libdl.a
%{_libdir32}/libm.a
%{_libdir32}/libnsl.a
%{_libdir32}/libpthread.a
%{_libdir32}/libresolv.a
%{_libdir32}/librt.a
%{_libdir32}/libutil.a
%endif
########################################################################
%if %{with nscd}
#-----------------------------------------------------------------------
%package -n nscd
2012-02-01 14:42:15 +04:00
Summary: A Name Service Caching Daemon (nscd)
Group: System/Servers
Conflicts: kernel < 2.2.0
Requires(post): systemd
Requires(pre): rpm-helper
Requires(preun):rpm-helper
Requires(post): rpm-helper
Requires(postun):rpm-helper
2012-02-01 14:42:15 +04:00
%description -n nscd
2012-02-01 14:42:15 +04:00
Nscd caches name service lookups and can dramatically improve
performance with NIS+, and may help with DNS as well.
%pre -n nscd
%_pre_useradd nscd / /sbin/nologin
2012-02-01 14:42:15 +04:00
%post -n nscd
%_post_service nscd
2012-02-01 14:42:15 +04:00
%preun -n nscd
%_preun_service nscd
2012-02-01 14:42:15 +04:00
%postun -n nscd
%_postun_userdel nscd
if [ "$1" -ge "1" ]; then
systemctl condrestart nscd > /dev/null 2>&1 || :
fi
2012-02-01 14:42:15 +04:00
%files -n nscd
%config(noreplace) %{_sysconfdir}/nscd.conf
2015-09-18 11:46:50 +03:00
%{_tmpfilesdir}/nscd.conf
%{_unitdir}/nscd.service
%{_unitdir}/nscd.socket
%{_sbindir}/nscd
/var/db/nscd
#-----------------------------------------------------------------------
# with nscd
2012-02-01 14:42:15 +04:00
%endif
########################################################################
%if %{with utils}
#-----------------------------------------------------------------------
%package utils
2012-02-01 14:42:15 +04:00
Summary: Development utilities from GNU C library
Group: Development/Other
Requires: %{name} = %{EVRD}
2012-02-01 14:42:15 +04:00
%description utils
2012-02-01 14:42:15 +04:00
The glibc-utils package contains memusage, a memory usage profiler,
mtrace, a memory leak tracer and xtrace, a function call tracer which
can be helpful during program debugging.
If unsure if you need this, don't install this package.
%files utils
%{_bindir}/memusage
%{_bindir}/memusagestat
%{_bindir}/mtrace
%{_bindir}/pcprofiledump
%{_bindir}/xtrace
%{_slibdir}/libmemusage.so
%{_slibdir}/libpcprofile.so
%if %{build_multiarch}
%{_slibdir32}/libmemusage.so
%{_slibdir32}/libpcprofile.so
%endif
#-----------------------------------------------------------------------
# with utils
%endif
########################################################################
%if %{with i18ndata}
#-----------------------------------------------------------------------
%package i18ndata
2012-02-01 14:42:15 +04:00
Summary: Database sources for 'locale'
Group: System/Libraries
%rename glibc-localedata
2012-02-01 14:42:15 +04:00
%description i18ndata
2012-02-01 14:42:15 +04:00
This package contains the data needed to build the locale data files
to use the internationalization features of the GNU libc.
%files i18ndata
%dir %{_datadir}/i18n
%dir %{_datadir}/i18n/charmaps
%{_datadir}/i18n/charmaps/*
%dir %{_datadir}/i18n/locales
%{_datadir}/i18n/locales/*
%{_datadir}/i18n/SUPPORTED
#-----------------------------------------------------------------------
# with i18ndata
2012-02-01 14:42:15 +04:00
%endif
########################################################################
%if %{with timezone}
#-----------------------------------------------------------------------
%package -n timezone
2012-02-01 14:42:15 +04:00
Summary: Time zone descriptions
Group: System/Base
%description -n timezone
These are configuration files that describe possible time zones.
2012-02-01 14:42:15 +04:00
%files -n timezone
%{_sbindir}/zdump
%{_sbindir}/zic
%{_mandir}/man1/zdump.1*
%{_datadir}/zoneinfo
#-----------------------------------------------------------------------
# with timezone
2012-02-01 14:42:15 +04:00
%endif
########################################################################
%if ! %{without locales}
%package -n locales
Summary: Base files for localization
Group: System/Internationalization
Requires: %{name}-i18ndata
2015-02-12 17:53:52 +03:00
Requires(pre): glibc = %{EVRD}
%description -n locales
These are the base files for language localization.
You also need to install the specific locales-?? for the language(s) you want.
Then the user need to set the LANG variable to their preferred language in
their ~/.profile configuration file.
%files -n locales
%{_bindir}/locale_install.sh
%{_bindir}/locale_uninstall.sh
%dir %{_datadir}/locale
%dir %{_prefix}/lib/locale
%ghost %{_prefix}/lib/locale/locale-archive
%{_prefix}/lib/locale/ISO*
%{_prefix}/lib/locale/CP*
%{_prefix}/lib/locale/UTF*
%{_prefix}/lib/locale/KOI*
# Locale specifc packages
%{expand:%(sh %{SOURCE1000} Afar aa aa_DJ aa_ER aa_ET)}
%{expand:%(sh %{SOURCE1000} Afrikaans af af_ZA)}
%{expand:%(sh %{SOURCE1000} Amharic am am_ET byn_ER gez_ER gez_ET om_ET om_KE sid_ET ti_ER ti_ET tig_ER wal_ET)}
%{expand:%(sh %{SOURCE1000} Akan ak ak_GH)}
%{expand:%(sh %{SOURCE1000} Angika anp anp_IN)}
%{expand:%(sh %{SOURCE1000} Arabic ar ar_AE ar_BH ar_DZ ar_EG ar_IN ar_IQ ar_JO ar_KW ar_LB ar_LY ar_MA ar_OM ar_QA ar_SA ar_SD ar_SS ar_SY ar_TN ar_YE)}
%{expand:%(sh %{SOURCE1000} Assamese as as_IN)}
%{expand:%(sh %{SOURCE1000} Asturian ast ast_ES)}
%{expand:%(sh %{SOURCE1000} Aymara ayc ayc_PE)}
%{expand:%(sh %{SOURCE1000} Azeri az az_AZ)}
%{expand:%(sh %{SOURCE1000} Belarusian be be_BY)}
%{expand:%(sh %{SOURCE1000} Bemba bem bem_ZM)}
%{expand:%(sh %{SOURCE1000} Berber ber ber_DZ ber_MA)}
%{expand:%(sh %{SOURCE1000} Bulgarian bg bg_BG)}
%{expand:%(sh %{SOURCE1000} Bengali bn bn_BD bn_IN)}
%{expand:%(sh %{SOURCE1000} Tibetan bo bo_CN bo_IN)}
%{expand:%(sh %{SOURCE1000} Breton br br_FR)}
%{expand:%(sh %{SOURCE1000} Bosnian bs bs_BA)}
%{expand:%(sh %{SOURCE1000} Catalan ca ca_AD ca_ES ca_FR ca_IT)}
%{expand:%(sh %{SOURCE1000} "Crimean Tatar" crh crh_UA)}
%{expand:%(sh %{SOURCE1000} Czech cs cs_CZ)}
%{expand:%(sh %{SOURCE1000} Chuvash cv cv_RU)}
%{expand:%(sh %{SOURCE1000} Welsh cy cy_GB)}
%{expand:%(sh %{SOURCE1000} Danish da da_DK)}
%{expand:%(sh %{SOURCE1000} German de de_AT de_BE de_CH de_DE de_LU)}
%{expand:%(sh %{SOURCE1000} Dogri doi doi_IN)}
%{expand:%(sh %{SOURCE1000} Dhivehi dv dv_MV)}
%{expand:%(sh %{SOURCE1000} Dzongkha dz dz_BT)}
%{expand:%(sh %{SOURCE1000} Greek el r:gr el_CY el_GR)}
%{expand:%(sh %{SOURCE1000} English en en_AG en_AU en_BW en_CA en_DK en_GB en_HK en_IE en_IN en_NG en_NZ en_PH en_SG en_US en_ZA en_ZM en_ZW)}
%{expand:%(sh %{SOURCE1000} Esperanto eo eo_XX)}
# Potentially unhandled: es@tradicional?, an = Aragonese
%{expand:%(sh %{SOURCE1000} Spanish es an_ES es_AR es_BO es_CL es_CO es_CR es_CU es_DO es_EC es_ES es_GT es_HN es_MX es_NI es_PA es_PE es_PR es_PY es_SV es_US es_UY es_VE)}
%{expand:%(sh %{SOURCE1000} Estonian et et_EE)}
%{expand:%(sh %{SOURCE1000} Basque eu eu_ES)}
%{expand:%(sh %{SOURCE1000} Farsi fa fa_IR)}
%{expand:%(sh %{SOURCE1000} Finnish fi fi_FI)}
%{expand:%(sh %{SOURCE1000} Fulah ff ff_SN)}
%{expand:%(sh %{SOURCE1000} Faroese fo fo_FO)}
%{expand:%(sh %{SOURCE1000} French fr fr_BE fr_CA fr_CH fr_FR fr_LU)}
%{expand:%(sh %{SOURCE1000} Friulan fur fur_IT)}
%{expand:%(sh %{SOURCE1000} Frisian fy fy_DE fy_NL)}
%{expand:%(sh %{SOURCE1000} Irish ga ga_IE)}
%{expand:%(sh %{SOURCE1000} "Scottish Gaelic" gd gd_GB)}
%{expand:%(sh %{SOURCE1000} Galician gl gl_ES)}
%{expand:%(sh %{SOURCE1000} Gujarati gu gu_IN)}
%{expand:%(sh %{SOURCE1000} "Manx Gaelic" gv gv_GB)}
%{expand:%(sh %{SOURCE1000} Hausa ha ha_NG)}
%{expand:%(sh %{SOURCE1000} Hebrew he he_IL iw_IL)}
%{expand:%(sh %{SOURCE1000} Hindi hi bho_IN brx_IN hi_IN ur_IN)}
%{expand:%(sh %{SOURCE1000} Chhattisgarhi hne hne_IN)}
%{expand:%(sh %{SOURCE1000} Croatian hr hr_HR)}
%{expand:%(sh %{SOURCE1000} "Upper Sorbian" hsb hsb_DE)}
%{expand:%(sh %{SOURCE1000} Breyol ht ht_HT)}
%{expand:%(sh %{SOURCE1000} Hungarian hu hu_HU)}
%{expand:%(sh %{SOURCE1000} Armenian hy hy_AM)}
%{expand:%(sh %{SOURCE1000} Interlingua ia ia_FR)}
%{expand:%(sh %{SOURCE1000} Indonesian id id_ID)}
%{expand:%(sh %{SOURCE1000} Igbo ig ig_NG)}
%{expand:%(sh %{SOURCE1000} Inupiaq ik ik_CA)}
%{expand:%(sh %{SOURCE1000} Icelandic is is_IS)}
%{expand:%(sh %{SOURCE1000} Italian it it_CH it_IT)}
%{expand:%(sh %{SOURCE1000} Inuktitut iu iu_CA)}
%{expand:%(sh %{SOURCE1000} Japanese ja ja ja_JP)}
%{expand:%(sh %{SOURCE1000} Georgian ka ka_GE)}
%{expand:%(sh %{SOURCE1000} Kazakh kk kk_KZ)}
%{expand:%(sh %{SOURCE1000} Greenlandic kl kl_GL)}
%{expand:%(sh %{SOURCE1000} Khmer km km_KH)}
%{expand:%(sh %{SOURCE1000} Kannada kn kn_IN)}
%{expand:%(sh %{SOURCE1000} Korean ko ko_KR)}
%{expand:%(sh %{SOURCE1000} Konkani kok kok_IN)}
%{expand:%(sh %{SOURCE1000} Kashmiri ks ks_IN ks_IN@devanagari)}
%{expand:%(sh %{SOURCE1000} Kurdish ku ku_TR)}
%{expand:%(sh %{SOURCE1000} Cornish kw kw_GB)}
%{expand:%(sh %{SOURCE1000} Kyrgyz ky ky_KG)}
%{expand:%(sh %{SOURCE1000} Luxembourgish lb lb_LU)}
%{expand:%(sh %{SOURCE1000} Luganda lg lg_UG)}
%{expand:%(sh %{SOURCE1000} Limburguish li li_BE li_NL)}
%{expand:%(sh %{SOURCE1000} Ligurian lij lij_IT)}
%{expand:%(sh %{SOURCE1000} Laotian lo lo_LA)}
%{expand:%(sh %{SOURCE1000} Lithuanian lt lt_LT)}
%{expand:%(sh %{SOURCE1000} Latvian lv lv_LV)}
%{expand:%(sh %{SOURCE1000} Magahi mag mag_IN)}
%{expand:%(sh %{SOURCE1000} Maithili mai mai_IN)}
%{expand:%(sh %{SOURCE1000} Malagasy mg mg_MG)}
%{expand:%(sh %{SOURCE1000} Mari mhr mhr_RU)}
%{expand:%(sh %{SOURCE1000} Maori mi mi_NZ)}
%{expand:%(sh %{SOURCE1000} Macedonian mk mk_MK)}
%{expand:%(sh %{SOURCE1000} Malayalam ml ml_IN)}
%{expand:%(sh %{SOURCE1000} Mongolian mn mn_MN)}
%{expand:%(sh %{SOURCE1000} Manipuri mni mni_IN)}
%{expand:%(sh %{SOURCE1000} Marathi mr mr_IN)}
%{expand:%(sh %{SOURCE1000} Malay ms ms_MY)}
%{expand:%(sh %{SOURCE1000} Maltese mt mt_MT)}
%{expand:%(sh %{SOURCE1000} Burmese my my_MM)}
%{expand:%(sh %{SOURCE1000} "Lower Saxon" nds nds_DE nds_NL)}
%{expand:%(sh %{SOURCE1000} Nepali ne ne_NP)}
%{expand:%(sh %{SOURCE1000} Nahuatl nhn nhn_MX)}
%{expand:%(sh %{SOURCE1000} Niuean niu niu_NU niu_NZ)}
%{expand:%(sh %{SOURCE1000} Dutch nl nl_AW nl_BE nl_NL)}
%{expand:%(sh %{SOURCE1000} Norwegian no r:nb r:nn nb_NO nn_NO)}
%{expand:%(sh %{SOURCE1000} Ndebele nr nr_ZA)}
%{expand:%(sh %{SOURCE1000} "Northern Sotho" nso nso_ZA)}
%{expand:%(sh %{SOURCE1000} Occitan oc oc_FR)}
%{expand:%(sh %{SOURCE1000} Oriya or or_IN)}
%{expand:%(sh %{SOURCE1000} Ossetian os os_RU)}
%{expand:%(sh %{SOURCE1000} Punjabi pa pa_IN pa_PK)}
%{expand:%(sh %{SOURCE1000} Papiamento pap r:pp pap_AN pap_AW pap_CW)}
%{expand:%(sh %{SOURCE1000} Polish pl csb_PL pl_PL)}
%{expand:%(sh %{SOURCE1000} Pashto ps ps_AF)}
%{expand:%(sh %{SOURCE1000} Portuguese pt pt_BR pt_PT)}
%{expand:%(sh %{SOURCE1000} Quechua quz quz_PE)}
%{expand:%(sh %{SOURCE1000} Romanian ro ro_RO)}
%{expand:%(sh %{SOURCE1000} Russian ru ru_RU ru_UA)}
%{expand:%(sh %{SOURCE1000} Kinyarwanda rw rw_RW)}
%{expand:%(sh %{SOURCE1000} Sanskrit sa sa_IN)}
%{expand:%(sh %{SOURCE1000} Santali sat sat_IN)}
%{expand:%(sh %{SOURCE1000} Sardinian sc sc_IT)}
%{expand:%(sh %{SOURCE1000} Sindhi sd sd_IN sd_IN@devanagari)}
%{expand:%(sh %{SOURCE1000} Saami se se_NO)}
%{expand:%(sh %{SOURCE1000} Secwepemctsin shs shs_CA)}
%{expand:%(sh %{SOURCE1000} Sinhala si si_LK)}
%{expand:%(sh %{SOURCE1000} Slovak sk sk_SK)}
%{expand:%(sh %{SOURCE1000} Slovenian sl sl_SI)}
%{expand:%(sh %{SOURCE1000} Serbian sr sr_ME sr_RS)}
%{expand:%(sh %{SOURCE1000} Somali so so_DJ so_ET so_KE so_SO)}
%{expand:%(sh %{SOURCE1000} Albanian sq sq_AL sq_MK)}
%{expand:%(sh %{SOURCE1000} Swati ss ss_ZA)}
%{expand:%(sh %{SOURCE1000} Sotho st st_ZA)}
%{expand:%(sh %{SOURCE1000} Swedish sv sv_FI sv_SE)}
# sw_XX?
%{expand:%(sh %{SOURCE1000} Swahili sw sw_KE sw_TZ)}
%{expand:%(sh %{SOURCE1000} Silesian szl szl_PL)}
%{expand:%(sh %{SOURCE1000} Tamil ta ta_IN ta_LK)}
%{expand:%(sh %{SOURCE1000} Telugu te te_IN)}
%{expand:%(sh %{SOURCE1000} Tajik tg tg_TJ)}
%{expand:%(sh %{SOURCE1000} Thai th th_TH)}
%{expand:%(sh %{SOURCE1000} Tharu/Tharuhati the the_NP)}
%{expand:%(sh %{SOURCE1000} Turkmen tk tk_TM)}
%{expand:%(sh %{SOURCE1000} Pilipino tl r:ph fil_PH tl_PH)}
%{expand:%(sh %{SOURCE1000} Tswana tn tn_ZA)}
%{expand:%(sh %{SOURCE1000} Turkish tr tr_CY tr_TR)}
%{expand:%(sh %{SOURCE1000} Tsonga ts ts_ZA)}
%{expand:%(sh %{SOURCE1000} Tatar tt tt_RU)}
%{expand:%(sh %{SOURCE1000} Uyghur ug ug_CN)}
%{expand:%(sh %{SOURCE1000} Unami unm unm_US)}
%{expand:%(sh %{SOURCE1000} Ukrainian uk uk_UA)}
%{expand:%(sh %{SOURCE1000} Urdu ur ur_PK)}
%{expand:%(sh %{SOURCE1000} Uzbek uz uz_UZ)}
%{expand:%(sh %{SOURCE1000} Venda ve ve_ZA)}
%{expand:%(sh %{SOURCE1000} Vietnamese vi vi_VN)}
%{expand:%(sh %{SOURCE1000} Walloon wa wa_BE)}
%{expand:%(sh %{SOURCE1000} Walser wae wae_CH)}
%{expand:%(sh %{SOURCE1000} Wolof wo wo_SN)}
%{expand:%(sh %{SOURCE1000} Xhosa xh xh_ZA)}
%{expand:%(sh %{SOURCE1000} Yiddish yi yi_US)}
%{expand:%(sh %{SOURCE1000} Yoruba yo yo_NG)}
%{expand:%(sh %{SOURCE1000} "Yue Chinese (Cantonese)" yue yue_HK)}
%{expand:%(sh %{SOURCE1000} Chinese zh zh_CN zh_HK zh_SG zh_TW cmn_TW hak_TW lzh_TW nan_TW nam_TW@latin)}
%{expand:%(sh %{SOURCE1000} Zulu zu zu_ZA)}
#-----------------------------------------------------------------------
# without locales
%endif
########################################################################
2012-02-01 14:42:15 +04:00
%prep
%setup -q -a3 -a50
%patch00 -p1
2016-09-01 15:21:36 +10:00
%patch01 -p1
%patch10 -p1 -b .multiple~
%patch11 -p1 -b .elfORIGIN~
%patch12 -p1
%patch13 -p1 -b .rh737223~
%patch14 -p1
%patch15 -p1
2016-09-01 15:21:36 +10:00
%patch16 -p1
%patch17 -p1
%patch18 -p1
2016-09-01 15:21:36 +10:00
%patch19 -p1 -b .curr~
%patch20 -p1 -b .locales~
%patch21 -p1
2016-09-01 15:21:36 +10:00
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
2016-09-01 15:21:36 +10:00
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch40 -p1
2016-09-01 15:21:36 +10:00
%patch41 -p1
%patch42 -p1
%patch43 -p1
%patch44 -p1
%patch45 -p1
%patch46 -p1
%patch47 -p1
%patch48 -p1
%patch49 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
%patch53 -p1
%patch54 -p1
2016-09-01 15:21:36 +10:00
%patch100 -p1
%patch101 -p1
%patch102 -p1 -b .nssUpgrade~
#patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1 -b .hwcap~
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1 -b .multiarch~
%patch114 -p1
%patch115 -p1
%patch116 -p1 -b .ldbl~
%patch117 -p1 -b .tsp~
%patch118 -p1
%patch120 -p1
2012-02-01 14:42:15 +04:00
# copy freesec source
2012-07-30 21:08:33 +04:00
cp %{SOURCE52} %{SOURCE53} crypt/
echo "Applying crypt_blowfish patch:"
2016-09-01 15:21:36 +10:00
%patch121 -p1 -b .owlCrypt~
2012-07-30 21:08:33 +04:00
mv crypt/crypt.h crypt/gnu-crypt.h
chmod 0644 crypt_blowfish-%{crypt_bf_ver}/*.[chS]
2012-07-30 21:08:33 +04:00
cp -a crypt_blowfish-%{crypt_bf_ver}/*.[chS] crypt/
2012-02-01 14:42:15 +04:00
## FreeSec support for extended/new-style/BSDI hashes in crypt(3)
2016-09-01 15:21:36 +10:00
%patch122 -p1 -b .freesec~
%patch123 -p1 -b .relocateFcrypt~
%patch124 -p0
2012-02-01 14:42:15 +04:00
# add sha256-crypt and sha512-crypt support to the Openwall wrapper
2016-09-01 15:21:36 +10:00
%patch125 -p1
2012-02-01 14:42:15 +04:00
2016-09-01 15:21:36 +10:00
%patch126 -p1 -b .compile~
2012-02-01 14:42:15 +04:00
2016-09-01 15:21:36 +10:00
%patch127 -p1 -b .gold~
2012-07-30 21:08:33 +04:00
2016-09-01 15:21:36 +10:00
%patch128 -p1 -b .blowfish_nonx86~
%if %{with selinux}
# XXX kludge to build nscd with selinux support as it added -nostdinc
# so /usr/include/selinux is not found
ln -s %{_includedir}/selinux selinux
%endif
2013-12-11 09:17:21 -05:00
find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \;
2012-02-01 14:42:15 +04:00
# Remove patch backups from files we ship in glibc packages
rm -f ChangeLog.[^0-9]*
rm -f localedata/locales/{???_??,??_??}.*
rm -f localedata/locales/[a-z_]*.*
# Regenerate autoconf files, some of our patches touch them
# Remove the autoconf 2.68 hardcode...
sed -i -e "s,2.68,`autoconf --version |head -n1 |cut -d' ' -f4`," aclocal.m4
# fix nss headers location
sed -i -e 's@<hasht.h>@<nss/hasht.h>@g' -e 's@<nsslowhash.h>@<nss/nsslowhash.h>@g' configure*
aclocal
autoconf
#-----------------------------------------------------------------------
2012-02-01 14:42:15 +04:00
%build
# ...
mkdir bin
ln -sf %{_bindir}/ld.bfd bin/ld
export PATH=$PWD/bin:$PATH
2012-02-01 14:42:15 +04:00
# Prepare test matrix in the next function
> %{checklist}
2012-02-01 14:42:15 +04:00
#
# BuildGlibc <arch> [<extra_configure_options>+]
#
function BuildGlibc() {
arch="$1"
shift 1
# Select optimization flags and compiler to use
BuildAltArch="no"
BuildCompFlags=""
BuildFlags=""
case $arch in
i[3-6]86)
%ifarch x86_64
BuildFlags="-march=pentium4 -mtune=generic"
BuildAltArch="yes"
BuildCompFlags="-m32"
%else
BuildFlags="-march=$arch -mtune=atom"
%endif
2012-02-01 14:42:15 +04:00
;;
x86_64)
BuildFlags="-mtune=generic"
;;
armv5t*)
BuildFlags="-march=armv5t"
BuildCompFlags="-march=armv5t"
2012-02-01 14:42:15 +04:00
;;
# to check
armv7*)
BuildFlags="-march=armv7-a"
BuildCompFlags="-march=armv7-a"
;;
armv6*)
BuildFlags="-march=armv6"
BuildCompFlags="-march=armv6"
;;
2012-02-01 14:42:15 +04:00
esac
BuildCompFlags="$BuildCompFlags -fuse-ld=bfd"
2012-02-01 14:42:15 +04:00
# Choose multiarch support
MultiArchFlags=
case $arch in
i686 | x86_64)
MultiArchFlags="--enable-multi-arch"
;;
esac
# Determine C & C++ compilers
BuildCC="%{__cc} $BuildCompFlags"
BuildCXX="%{__cxx} $BuildCompFlags"
BuildFlags="$BuildFlags -DNDEBUG=1 %{__common_cflags} -O3"
# XXX: -frecord-gcc-switches makes gold abort with assertion error and gcc segfault :|
#BuildFlags="$(echo $BuildFlags |sed -e 's#-frecord-gcc-switches##g')"
2012-02-01 14:42:15 +04:00
# Do not use direct references against %gs when accessing tls data
# XXX make it the default in GCC? (for other non glibc specific usage)
%ifarch %{xenarches}
BuildFlags="$BuildFlags -mno-tls-direct-seg-refs"
%endif
2012-02-01 14:42:15 +04:00
# Extra configure flags
ExtraFlags=
# We'll be having issues with biarch builds of these two as longs as their
# build dependencies aren't provided as biarch packages as well.
# But as the alternate arch is less likely to make any use of the
# functionality and that we might just ditch biarch packaging completely,
# we just enable it on the main arch for now.
%if %{with nsscrypt} || %{with systap}
if [[ "$BuildAltArch" = "no" ]]; then
%if %{with nsscrypt}
ExtraFlags="$ExtraFlags --enable-nss-crypt"
%endif
%if %{with systap}
ExtraFlags="$ExtraFlags --enable-systemtap"
%endif
fi
%endif
2012-02-01 14:42:15 +04:00
# Add-ons
AddOns="libidn"
2012-02-01 14:42:15 +04:00
# Force a separate and clean object dir
rm -rf build-$arch-linux
mkdir build-$arch-linux
pushd build-$arch-linux
2012-02-01 14:42:15 +04:00
[[ "$BuildAltArch" = "yes" ]] && touch ".alt" || touch ".main"
CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags -Wno-error" LDFLAGS="%{ldflags} -fuse-ld=bfd" ../configure \
$arch-%{_target_vendor}-%{_target_os}%{?_gnu} \
2012-02-01 14:42:15 +04:00
--prefix=%{_prefix} \
--libexecdir=%{_prefix}/libexec \
--infodir=%{_infodir} \
--localedir=%{_localedir} \
--enable-add-ons=$AddOns \
--disable-profile \
--enable-static \
--enable-bind-now \
$ExtraFlags \
$MultiArchFlags \
2012-02-01 14:42:15 +04:00
--enable-kernel=%{enablekernel} \
--with-headers=%{_includedir} ${1+"$@"}
2012-02-01 14:42:15 +04:00
%make -r
popd
check_flags="-k"
2012-02-01 14:42:15 +04:00
# Generate test matrix
[[ -d "build-$arch-linux" ]] || {
echo "ERROR: PrepareGlibcTest: build-$arch-linux does not exist!"
return 1
}
local BuildJobs="%{_smp_mflags}"
echo "$BuildJobs -d build-$arch-linux $check_flags" >> %{checklist}
2012-02-01 14:42:15 +04:00
case $arch in
i686) base_arch=i586;;
2012-02-01 14:42:15 +04:00
*) base_arch=none;;
esac
[[ -d "build-$base_arch-linux" ]] && {
check_flags="$check_flags -l build-$base_arch-linux/elf/ld.so"
echo "$BuildJobs -d build-$arch-linux $check_flags" >> %{checklist}
2012-02-01 14:42:15 +04:00
}
return 0
}
# Build main glibc
BuildGlibc %{_target_cpu}
2012-02-01 14:42:15 +04:00
%if %{build_multiarch}
%ifarch x86_64
BuildGlibc i686
%endif
%else
# Build i686 libraries if not already building for i686
case %{_target_cpu} in
i686)
;;
i[3-5]86)
BuildGlibc i686
;;
esac
2012-02-01 14:42:15 +04:00
%endif
make -C crypt_blowfish-%{crypt_bf_ver} man
# post install wrapper
gcc -static -Lbuild-%{_target_cpu}-linux %{optflags} -Os %{SOURCE2} -o build-%{_target_cpu}-linux/glibc_post_upgrade \
'-DLIBTLS="/%{_lib}/tls/"' \
'-DGCONV_MODULES_DIR="%{_libdir}/gconv"' \
'-DLD_SO_CONF="/etc/ld.so.conf"' \
'-DICONVCONFIG="%{_sbindir}/iconvconfig"'
#-----------------------------------------------------------------------
%check
# ...
export PATH=$PWD/bin:$PATH
2012-02-01 14:42:15 +04:00
export TMPDIR=/tmp
export TIMEOUTFACTOR=16
while read arglist; do
sh %{SOURCE5} $arglist || exit 1
done < %{checklist}
2012-02-01 14:42:15 +04:00
#-----------------------------------------------------------------------
2012-02-01 14:42:15 +04:00
%install
# ...
export PATH=$PWD/bin:$PATH
%if %{build_multiarch}
%ifarch x86_64
ALT_ARCH=i686
%endif
%make install install_root=%{buildroot} -C build-${ALT_ARCH}-linux
2012-02-01 14:42:15 +04:00
%endif
%make install install_root=%{buildroot} -C build-%{_target_cpu}-linux
%if %{build_multiarch}
%ifarch x86_64
rm -f %{buildroot}%{_bindir}/lddlibc4
%endif
2012-02-01 14:42:15 +04:00
%endif
install -m700 build-%{_target_cpu}-linux/glibc_post_upgrade -D %{buildroot}%{_sbindir}/glibc_post_upgrade
sh manpages/Script.sh
2012-02-01 14:42:15 +04:00
# Install extra glibc libraries
function InstallGlibc() {
local BuildDir="$1"
local SubDir="$2"
local LibDir="$3"
[[ -z "$LibDir" ]] && LibDir="%{_slibdir}"
pushd $BuildDir
mkdir -p %{buildroot}$LibDir/$SubDir/
install -m755 libc.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libc-*.so`
ln -sf `basename %{buildroot}$LibDir/libc-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libc.so.*`
install -m755 math/libm.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libm-*.so`
ln -sf `basename %{buildroot}$LibDir/libm-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libm.so.*`
install -m755 nptl/libpthread.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libpthread-*.so`
ln -sf `basename %{buildroot}$LibDir/libpthread-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libpthread.so.*`
install -m755 nptl_db/libthread_db.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libthread_db-*.so`
ln -sf `basename %{buildroot}$LibDir/libthread_db-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libthread_db.so.*`
install -m755 rt/librt.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/librt-*.so`
ln -sf `basename %{buildroot}$LibDir/librt-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/librt.so.*`
2012-02-01 14:42:15 +04:00
popd
}
# Install arch-specific optimized libraries
case %{_target_cpu} in
2012-02-01 14:42:15 +04:00
i[3-5]86)
InstallGlibc build-i686-linux i686
;;
esac
# NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
# the generic one (RH#162634)
install -m644 sysdeps/generic/stdio-lock.h -D %{buildroot}%{_includedir}/bits/stdio-lock.h
# And <bits/libc-lock.h> needs sanitizing as well.
install -m644 %{SOURCE10} -D %{buildroot}%{_includedir}/bits/libc-lock.h
2012-02-01 14:42:15 +04:00
# Compatibility hack: this locale has vanished from glibc, but some other
# programs are still using it. Normally we would handle it in the %pre
# section but with glibc that is simply not an option
mkdir -p %{buildroot}%{_localedir}/ru_RU/LC_MESSAGES
2012-02-01 14:42:15 +04:00
# Remove the files we don't want to distribute
rm -f %{buildroot}%{_libdir}/libNoVersion*
rm -f %{buildroot}%{_slibdir}/libNoVersion*
2012-02-01 14:42:15 +04:00
# (tpg) workaround for aarch64 ?
%ifarch aarch64
ls -sf %{_slibdir}/ld-linux-aarch64.so.1 %{buildroot}%{_slibdir32}/ld-linux-aarch64.so.1
2012-02-01 14:42:15 +04:00
%endif
install -m 644 mandriva/nsswitch.conf %{buildroot}%{_sysconfdir}/nsswitch.conf
2012-02-01 14:42:15 +04:00
# This is for ncsd - in glibc 2.2
%if %{with nscd}
install -m644 nscd/nscd.conf -D %{buildroot}%{_sysconfdir}/nscd.conf
install -m755 %{SOURCE6} -D %{buildroot}%{_unitdir}/nscd.service
2015-09-18 11:46:50 +03:00
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}
install -m755 %{SOURCE7} -D %{buildroot}%{_unitdir}/nscd.socket
install -m755 -d %{buildroot}/var/db/nscd
2012-02-01 14:42:15 +04:00
%endif
# These man pages require special attention
mkdir -p %{buildroot}%{_mandir}/man3
install -p -m 0644 crypt_blowfish-%{crypt_bf_ver}/*.3 %{buildroot}%{_mandir}/man3/
# Useless and takes place
rm -rf %{buildroot}/%{_datadir}/zoneinfo/{posix,right}
2012-02-01 14:42:15 +04:00
# Include ld.so.conf
echo "include /etc/ld.so.conf.d/*.conf" > %{buildroot}%{_sysconfdir}/ld.so.conf
chmod 644 %{buildroot}%{_sysconfdir}/ld.so.conf
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
2012-02-01 14:42:15 +04:00
# ldconfig cache
mkdir -p %{buildroot}%{_var}/cache/ldconfig
touch %{buildroot}%{_var}/cache/ldconfig/aux-cache
2012-02-01 14:42:15 +04:00
# automatic ldconfig cache update on rpm installs/removals
# (see http://wiki.mandriva.com/en/Rpm_filetriggers)
install -d %{buildroot}%{_var}/lib/rpm/filetriggers
cat > %{buildroot}%{_var}/lib/rpm/filetriggers/ldconfig.filter << EOF
2012-02-01 14:42:15 +04:00
^.((/lib|/usr/lib)(64)?/[^/]*\.so\.|/etc/ld.so.conf.d/[^/]*\.conf)
EOF
cat > %{buildroot}%{_var}/lib/rpm/filetriggers/ldconfig.script << EOF
2012-02-01 14:42:15 +04:00
#!/bin/sh
ldconfig -X
EOF
chmod 755 %{buildroot}%{_var}/lib/rpm/filetriggers/ldconfig.script
2012-02-01 14:42:15 +04:00
# gconv-modules.cache
touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache
chmod 644 %{buildroot}%{_libdir}/gconv/gconv-modules.cache
%if %{build_multiarch}
touch %{buildroot}%{_libdir32}/gconv/gconv-modules.cache
chmod 644 %{buildroot}%{_libdir32}/gconv/gconv-modules.cache
2012-02-01 14:42:15 +04:00
%endif
touch %{buildroot}%{_sysconfdir}/ld.so.cache
2012-02-01 14:42:15 +04:00
# Strip debugging info from all static libraries
pushd %{buildroot}%{_libdir}
for i in *.a; do
if [ -f "$i" ]; then
strip -g -R .comment -R .GCC.command.line $i
fi
done
2012-02-01 14:42:15 +04:00
popd
# rquota.x and rquota.h are now provided by quota
rm -f %{buildroot}%{_includedir}/rpcsvc/rquota.[hx]
2012-02-01 14:42:15 +04:00
%if %{with i18ndata}
install -m644 localedata/SUPPORTED %{buildroot}%{_datadir}/i18n/
2012-02-01 14:42:15 +04:00
%endif
rm -rf %{buildroot}%{_includedir}/netatalk/
2012-02-01 14:42:15 +04:00
# /etc/localtime - we're proud of our timezone #Well we(mdk) may put Paris
%if %{with timezone}
rm -f %{buildroot}%{_sysconfdir}/localtime
cp -f %{buildroot}%{_datadir}/zoneinfo/CET %{buildroot}%{_sysconfdir}/localtime
%endif
# Documentation
install -m 755 -d %{buildroot}%{_docdir}/glibc
2016-10-24 20:28:13 +10:00
pushd build-%{_target_cpu}-linux/html
%if %{with doc}
make html
cp -fpar manual/libc %{buildroot}%{_docdir}/glibc/html
%endif
%if %{with pdf}
make pdf
install -m644 -D manual/libc.pdf %{buildroot}%{_docdir}/glibc/libc.pdf
%endif
popd
install -m 644 COPYING COPYING.LIB README NEWS INSTALL BUGS \
PROJECTS CONFORMANCE hesiod/README.hesiod \
ChangeLog* crypt/README.ufc-crypt nis/nss posix/gai.conf \
%{buildroot}%{_docdir}/glibc
xz -0 --text %{buildroot}%{_docdir}/glibc/ChangeLog*
install -m 644 timezone/README %{buildroot}%{_docdir}/glibc/README.timezone
install -m 755 -d %{buildroot}%{_docdir}/glibc/crypt_blowfish
2012-02-01 14:42:15 +04:00
install -m 644 crypt_blowfish-%{crypt_bf_ver}/{README,LINKS,PERFORMANCE} \
%{buildroot}%{_docdir}/glibc/crypt_blowfish
2012-02-01 14:42:15 +04:00
# Localization
2012-02-01 14:42:15 +04:00
%find_lang libc
# Remove unpackaged files
rm -f %{buildroot}%{_infodir}/dir.old*
rm -rf %{buildroot}%{_includedir}/asm-*/mach-*/
rm -f %{buildroot}%{_localedir}/locale-archive*
rm %{buildroot}%{_bindir}/rpcgen %{buildroot}%{_mandir}/man1/rpcgen.1*
# XXX: verify
#find %{buildroot}%{_localedir} -type f -name LC_\* -o -name SYS_LC_\* |xargs rm -f
2012-02-01 14:42:15 +04:00
%if !%{with nscd}
rm -f %{buildroot}%{_sbindir}/nscd
2012-02-01 14:42:15 +04:00
%endif
rm -f %{buildroot}%{_infodir}/dir
2012-02-01 14:42:15 +04:00
%if %{without utils}
rm -f %{buildroot}%{_bindir}/memusage
rm -f %{buildroot}%{_bindir}/memusagestat
rm -f %{buildroot}%{_bindir}/mtrace
rm -f %{buildroot}%{_bindir}/pcprofiledump
rm -f %{buildroot}%{_bindir}/xtrace
rm -f %{buildroot}%{_slibdir}/libmemusage.so
rm -f %{buildroot}%{_slibdir}/libpcprofile.so
%if %{build_multiarch}
rm -f %{buildroot}%{_slibdir32}/libmemusage.so
rm -f %{buildroot}%{_slibdir32}/libpcprofile.so
%endif
2012-02-01 14:42:15 +04:00
%endif
%if !%{with timezone}
rm -f %{buildroot}%{_sysconfdir}/localtime
rm -f %{buildroot}%{_sbindir}/zdump
rm -f %{buildroot}%{_sbindir}/zic
rm -f %{buildroot}%{_mandir}/man1/zdump.1*
rm -rf %{buildroot}%{_datadir}/zoneinfo
2012-02-01 14:42:15 +04:00
%endif
%if !%{with i18ndata}
rm -rf %{buildroot}%{_datadir}/i18n
2012-02-01 14:42:15 +04:00
%endif
%if %{with locales}
export PATH=%{buildroot}%{_bindir}:%{buildroot}%{_sbindir}:$PATH
#export LD_LIBRARY_PATH=%{buildroot}/%{_lib}:%{buildroot}%{_libdir}:$LD_LIBRARY_PATH
export I18NPATH=%{buildroot}%{_datadir}/i18n
# Needed for/used by locale-archive
mkdir -p %{buildroot}%{_prefix}/lib/locale
touch %{buildroot}%{_prefix}/lib/locale/locale-archive
# Locale related tools
install -c -m 755 %{SOURCE1001} %{SOURCE1002} %{buildroot}%{_bindir}/
# make default charset pseudo-locales
# those will be symlinked (for LC_CTYPE, LC_COLLATE mainly) from
# a lot of other locales, thus saving space
for DEF_CHARSET in UTF-8 ISO-8859-1 ISO-8859-2 ISO-8859-3 ISO-8859-4 \
ISO-8859-5 ISO-8859-7 ISO-8859-9 \
ISO-8859-13 ISO-8859-14 ISO-8859-15 KOI8-R KOI8-U CP1251
do
# don't use en_DK because of LC_MONETARY
localedef -c -f $DEF_CHARSET -i en_US %{buildroot}%{_prefix}/lib/locale/$DEF_CHARSET || :
done
# TODO: REMOVE?^^^
%endif
# This will make the '-g' argument to be passed to eu-strip for these libraries, so that
# some info is kept that's required to make valgrind work without depending on glibc-debug
# package to be installed.
2012-07-30 21:08:33 +04:00
export EXCLUDE_FROM_FULL_STRIP="ld-%{version}.so libpthread libc-%{version}.so libm-%{version}.so"