# TODO:
-# - use syslog.2 from here and not from man-pages
+# - consider moving klogctl.3 man to man-pages (and drop syslog.2 stub hacks here)
# - restore --with-pkgversion when tcl upstream fixes the #3599098 (broken platform::identify).
# - --enable-systemtap
# - look at locale fixes/updates in bugzilla
# - math/{test-fenv,test-tgmath,test-float,test-ifloat}, debug/backtrace-tst(SEGV) fail on alpha
#
# Conditional build:
-# min_kernel (default is 3.4.0 except for x86/x86_64 where 3.2.0 suffices)
+# min_kernel (default is 3.2.0 with arch specific values x32 (3.4.0) aarch64 (3.7.0) ia64 (3.2.18))
%bcond_without memusage # don't build memusage utility
%bcond_without selinux # without SELinux support (in nscd)
%bcond_with tests # perform "make test"
%bcond_without nss_crypt # disable crypt features based on Mozilla NSS library
%bcond_with bash_nls # use bash NLS in shell scripts (ldd, sotruss); restores /bin/bash dep
%bcond_without cet # Intel Control-flow Enforcement Technology (CET)
-%bcond_without crypt # don't build obsolete libcrypt
-%bcond_without static_pie # disable static PIE support
+%bcond_with crypt # don't build obsolete libcrypt
#
-%ifarch %{ix86} %{x8664}
-%{!?min_kernel:%global min_kernel 3.2.0}
-%else
+%ifarch aarch64
+%{!?min_kernel:%global min_kernel 3.7.0}
+%endif
+%ifarch ia64
+%{!?min_kernel:%global min_kernel 3.2.18}
+%endif
+%ifarch x32
%{!?min_kernel:%global min_kernel 3.4.0}
%endif
+%ifnarch aarch64 ia64 x32
+%{!?min_kernel:%global min_kernel 3.2.0}
+%endif
%ifarch sparc64
%undefine with_memusage
%ifnarch i686 %{x8664} x32
%undefine with_cet
%endif
-%ifarch %{arm}
-%undefine with_static_pie
+%ifnarch %{arm}
+%define with_static_pie 1
%endif
-%define core_version 2.34
+%define core_version 2.37
%define llh_version 7:2.6.32.1-1
Summary: GNU libc
Summary(uk.UTF-8): GNU libc версії
Name: glibc
Version: %{core_version}
-Release: 1
+Release: 3
Epoch: 6
License: LGPL v2.1+
Group: Libraries
Source0: https://ftp.gnu.org/gnu/glibc/%{name}-%{version}.tar.xz
-# Source0-md5: 31998b53fb39cb946e96abc310af1c89
+# Source0-md5: e89cf3dcb64939d29f04b4ceead5cc4e
Source2: nscd.init
Source3: nscd.sysconfig
Source4: nscd.logrotate
# from man-pages.spec --with tars
Source5: %{name}-man-pages.tar.xz
-# Source5-md5: e66023386d2cc0d6a1d5c29bdbf03550
+# Source5-md5: 4481fa9cbead3fe9d24af66666db1c86
Source6: %{name}-localedb-gen
Source7: %{name}-LD-path.c
Source9: nscd.tmpfiles
# use branch.sh to update glibc-git.patch
-#Patch0: glibc-git.patch
-# Patch0-md5: d41d8cd98f00b204e9800998ecf8427e
+Patch0: glibc-git.patch
+# Patch0-md5: 86773bb487a8ee4c7b9a8194ee0f3b96
# against GNU TP (libc domain)
#Patch1: %{name}-pl.po-update.patch
Patch2: %{name}-pld.patch
Patch3: %{name}-crypt-blowfish.patch
Patch4: %{name}-no-bash-nls.patch
-
Patch6: %{name}-paths.patch
Patch10: %{name}-info.patch
Patch14: %{name}-sparc-errno_fix.patch
Patch15: %{name}-new-charsets.patch
-Patch16: %{name}-tzfile-noassert.patch
+
# additions pending for upstream merge or taken from other distros
Patch17: %{name}-morelocales.patch
# fixes mostly pending for upstream merge
Patch23: %{name}-pt_pax.patch
-# http://pkgs.fedoraproject.org/cgit/rpms/glibc.git/plain/glibc-c-utf8-locale.patch
-Patch27: %{name}-c-utf8-locale.patch
-
-Patch29: %{name}-arm-alignment-fix.patch
Patch30: glibc-rh1124987.patch
+Patch31: arm-widevine-compat.patch
URL: http://www.gnu.org/software/libc/
%{?with_selinux:BuildRequires: audit-libs-devel}
BuildRequires: autoconf >= 2.69
BuildRequires: automake
-BuildRequires: binutils >= 2:2.29
+BuildRequires: binutils >= 4:2.29
BuildRequires: bison >= 2.7
%{!?with_cross:BuildRequires: dietlibc-static}
BuildRequires: gawk >= 3.1.2
%endif
%{?with_memusage:BuildRequires: gd-devel >= 2.0.1}
BuildRequires: gettext-tools >= 0.10.36
+%{?with_selinux:BuildRequires: libcap-devel}
%{?with_selinux:BuildRequires: libselinux-devel >= 1.18}
BuildRequires: linux-libc-headers >= %{llh_version}
BuildRequires: make >= 1:4.0
Provides: glibc(tls)
Provides: rtld(GNU_HASH)
Obsoletes: glibc-common
-Obsoletes: glibc-debug
+Obsoletes: glibc-debug < 2.1
Obsoletes: glibc-ld < 6:2.33-2
%ifarch %{x8664} sparc64 ppc64
Provides: glibc64
Suggests: tzdata
Conflicts: %{name}-misc < %{epoch}:%{version}-%{release}
Conflicts: SysVinit < 2.86-11
-Conflicts: kernel < %{min_kernel}
+Conflicts: kernel < 3:%{min_kernel}
Conflicts: kernel24
Conflicts: kernel24-smp
Conflicts: ld.so < 1.9.9-10
%if %{with crypt}
Requires: %{name}-libcrypt(%{_target_cpu}) = %{epoch}:%{version}-%{release}
%else
-Requires: libxcrypt-devel
+Requires: libxcrypt-devel >= 4.0.0
%endif
Provides: %{name}-devel(%{_target_cpu}) = %{epoch}:%{version}-%{release}
%ifarch %{ix86}
Summary(uk.UTF-8): Статичні бібліотеки glibc
Group: Development/Libraries
Requires: %{name}-devel = %{epoch}:%{version}-%{release}
-%{!?with_crypt:Requires: libxcrypt-static}
+%{!?with_crypt:Requires: libxcrypt-static >= 4.0.0}
Provides: %{name}-static(%{_target_cpu}) = %{epoch}:%{version}-%{release}
%ifarch %{ix86}
Provides: %{name}-static(ix86) = %{epoch}:%{version}-%{release}
Summary(uk.UTF-8): GNU libc з підтримкою профайлера
Group: Development/Libraries/Libc
Requires: %{name}-devel = %{epoch}:%{version}-%{release}
-Obsoletes: libc-profile
+Obsoletes: libc-profile < 6
%description profile
When programs are being profiled using gprof, they must use these
exit 1
%endif
-#%patch0 -p1
+%patch0 -p1
%patch2 -p1
%patch3 -p1
%patch14 -p1
%patch15 -p1
-%patch16 -p1
+
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch23 -p0
-%patch27 -p1
-
-%patch29 -p1
%patch30 -p1
+%ifarch %{arm} aarch64
+%patch31 -p1
+%endif
# cleanup backups after patching
find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
--enable-profile \
--enable-stack-protector=strong \
--enable-stackguard-randomization \
- %{?with_static_pie:--enable-static-pie} \
--enable-tunables \
--with-binutils=$(pwd)/alt-tools \
--with-bugurl=http://bugs.pld-linux.org/ \
math/libm_pic.a libm.map
resolv/libresolv_pic.a"
-install -p $PICFILES $RPM_BUILD_ROOT%{_libdir}
-install -p elf/sofini.os $RPM_BUILD_ROOT%{_libdir}/sofini.o
+install -p $PICFILES $RPM_BUILD_ROOT%{_libdir}
+install -p elf/sofini.os $RPM_BUILD_ROOT%{_libdir}/sofini.o
# Include %{_libdir}/gconv/gconv-modules.cache
-$(pwd)/elf/ld.so --library-path $(pwd) ./iconv/iconvconfig --nostdlib --prefix=$RPM_BUILD_ROOT %{_libdir}/gconv -o $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
+:> $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
cd ..
%if %{without cross}
install -p glibc-postinst $RPM_BUILD_ROOT/sbin
%endif
-%{?with_memusage:mv -f $RPM_BUILD_ROOT/%{_lib}/libmemusage.so $RPM_BUILD_ROOT%{_libdir}}
-mv -f $RPM_BUILD_ROOT/%{_lib}/libpcprofile.so $RPM_BUILD_ROOT%{_libdir}
+%{?with_memusage:%{__mv} $RPM_BUILD_ROOT/%{_lib}/libmemusage.so $RPM_BUILD_ROOT%{_libdir}}
+%{__mv} $RPM_BUILD_ROOT/%{_lib}/libpcprofile.so $RPM_BUILD_ROOT%{_libdir}
# make symlinks across top-level directories absolute
for l in BrokenLocale anl %{?with_crypt:crypt} c_malloc_debug\
# linking nss modules directly is not supported
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnss_*.so
+# avoid conflict on multilib
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/ld.so{,-%{_target_cpu}}
+
install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/nscd
cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/nscd
cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/nscd
sed -e 's#\([ \t]\)db\([ \t]\)#\1#g' nss/nsswitch.conf > $RPM_BUILD_ROOT%{_sysconfdir}/nsswitch.conf
xz -dc %{SOURCE5} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
+# catchsegv was removed in glibc 2.35
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/catchsegv.1
+
: > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.cache
install -d $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d
echo 'include ld.so.conf.d/*.conf' > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf
# ch (iso-codes)
# co (FileZilla, libfilezilla, vlc)
# es_419 (alpm - common "Spanish (Latin America)")
-# frp (iso-codes, lxlauncher, mate, xfce)
+# frp (iso-codes, lxlauncher, cinnamon, mate, xfce)
# gn (iso-codes, gnome; gn_BR in gnome, maybe gn_PY)
# guc (gtk-vnc)
# haw (iso-codes, stellarium)
# hrx (stellarium)
-# hye (tumbler)
-# ie (xfce, cinnamon)
+# hye (xfce)
+# ie (GNOME, xfce, cinnamon)
# ilo (kudzu, libosinfo, libreport)
# io (alacarte, gtk+2, gnome, iso-codes)
# jam (iso-codes)
# jv (avant-window-navigator, gmpc, kdesudo, mate, cinnamon)
# ki (iso-codes)
# kok@latin (inkscape)
-# kmr (vlc)
+# kmr (iso-codes, vlc)
# ksw (cinnamon)
# ku_IQ (mate)
# kv (iso-codes)
# son (gtkspell3, iso-codes)
# su (terminator)
# swg (sim)
-# syr (iso-codes)
# tet (vlc)
# tw (libosinfo)
+# tzm (iso-codes)
# vec (mate-applet-indicator)
# wba (libosinfo)
+# zgh (cinnamon, xapps)
#
# To be removed (after fixing packages still using it):
# sr@Latn (use sr@latin instead)
#
# Short forms (omitted country code, used instead of long form) for ambiguous or unclear cases:
# aa=aa_ER
+# ab=ab_GE
# ak=ak_GH
# anp=anp_IN
# ar=common? (AE, BH, DZ, EG, IQ, JO, KW, LB, LY, MA, OM, QA, SA, SD, SY, TN, YE)
# az=az_AZ
+# ber=ber_DZ? (or common for DZ, MA?)
# bn=bn_BD
# bo=bo_CN? (or common for CN, IN?)
# ca=ca_ES
# fr=fr_FR
# fy=fy_NL
# gez=gez_ET (?)
+# hy=hy_AM
# it=it_IT
# kab=kab_DZ
# ks=ks_IN
# be ca cs da de el en_GB es fi fr gl hr hu it ja ko nb nl pl pt_BR ru rw sk
# sv tr zh_CN zh_TW
#
-for i in aa aa@saaho af ak am an ang anp ar ar_TN as ast az az_IR \
- be@latin be@tarask bem bg bho bn bn_IN bo br brx bs byn \
+for i in aa aa@saaho ab af ak am an ang anp ar ar_TN as ast az az_IR \
+ be@latin be@tarask bem ber bg bho bn bn_IN bo br brx bs byn \
ca@valencia ce chr ckb cmn crh csb cv cy de_AT de_CH doi dv dz \
en en@boldquot en@quot en@shaw en_AU en_CA en_IE en_NZ en_US en_ZA eo \
es_AR es_CL es_CO es_CR es_DO es_EC es_GT es_HN es_MX es_NI es_PA es_PE es_PR es_SV es_UY es_VE \
mai mg mhr mi mjw mk ml mn mni mr ms mt my nds ne nl_BE nn nr nso oc om or os \
pa pap ps pt ps quz rm ro \
sa sat sc sd sd@devanagari se shn si sid sl so sq \
- sr sr@Latn sr@ije sr@ijekavian sr@ijekavianlatin sr@latin ss st sw szl \
+ sr sr@Latn sr@ije sr@ijekavian sr@ijekavianlatin sr@latin ss st sw syr szl \
ta te tg th ti tig tk tl tlh tn tpi ts tt tt@iqtelif \
ug uk ur uz uz@cyrillic ve vi wa wal wo xh yi yo zh_HK zu; do
if [ ! -d $RPM_BUILD_ROOT%{_localedir}/$i/LC_MESSAGES ]; then
done
# LC_TIME category, used for localized date formats (at least by coreutils)
-for i in af be bg ca cs da de el en eo es et eu fi fr ga gl hr hu ia id it ja kk ko lg lt \
+for i in af be bg ca cs da de el en eo es et eu fi fr ga gl hr hu ia id it ja ka kk ko lg lt \
ms nb nl pl pt pt_BR ro ru rw sk sl sr sv tr uk vi zh_CN zh_TW; do
if [ ! -d $RPM_BUILD_ROOT%{_localedir}/$i ]; then
echo "%lang($lang) %{_localedir}/$i" >> glibc.lang
%groupremove nscd
fi
+%posttrans -n iconv
+%{_sbindir}/iconvconfig --nostdlib -o %{_libdir}/gconv/gconv-modules.cache %{_libdir}/gconv
+
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc README NEWS
%if %{without cross}
%attr(755,root,root) /sbin/glibc-postinst
%endif
-# TODO: package ldconfig symlinks as %ghost
%ifarch %{ix86} sparc sparcv9 sparc64 alpha sh
%attr(755,root,root) /%{_lib}/ld-linux.so.2
%endif
%endif
%ifarch aarch64
%attr(755,root,root) /lib/ld-linux-aarch64.so.1
-%attr(755,root,root) /%{_lib}/ld-linux-aarch64.so.1
%endif
%ifarch armv6hl armv7hl armv7hnl
%attr(755,root,root) /lib/ld-linux-armhf.so.3
%else
%attr(755,root,root) /%{_lib}/libBrokenLocale.so.1
%endif
-%attr(755,root,root) /%{_lib}/libSegFault.so
%attr(755,root,root) /%{_lib}/libanl.so.1
%ifarch alpha ia64
%attr(755,root,root) /%{_lib}/libc.so.6.1
%attr(755,root,root) %{_bindir}/getconf
%attr(755,root,root) %{_bindir}/getent
%attr(755,root,root) %{_bindir}/iconv
+%attr(755,root,root) %{_bindir}/ld.so-%{_target_cpu}
%attr(755,root,root) %{_bindir}/locale
%attr(755,root,root) %{_bindir}/zdump
%attr(755,root,root) %{_sbindir}/zic
%files misc
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/catchsegv
%attr(755,root,root) %{_bindir}/ldd
%attr(755,root,root) %{_bindir}/pldd
-%ifarch %{ix86} m68k sparc sparcv9
+%ifarch m68k sparc sparcv9
%attr(755,root,root) %{_bindir}/lddlibc4
%endif
%attr(755,root,root) %{_bindir}/sotruss
%dir %{_libdir}/audit
%attr(755,root,root) %{_libdir}/audit/sotruss-lib.so
-%{_mandir}/man1/catchsegv.1*
%{_mandir}/man1/ldd.1*
%{_mandir}/man1/pldd.1*
%lang(cs) %{_mandir}/cs/man1/ldd.1*
%files libcrypt
%defattr(644,root,root,755)
%ifarch alpha
-%attr(755,root,root) %ghost /%{_lib}/libcrypt.so.1.1
+%attr(755,root,root) /%{_lib}/libcrypt.so.1.1
%else
-%attr(755,root,root) %ghost /%{_lib}/libcrypt.so.1
+%attr(755,root,root) /%{_lib}/libcrypt.so.1
%endif
%endif
# empty archives, so linking with obsolete -lXX (these below) works
%{_libdir}/libanl.a
%{_libdir}/libdl.a
-%{_libdir}/libdl_p.a
%{_libdir}/libpthread.a
-%{_libdir}/libpthread_p.a
%{_libdir}/librt.a
-%{_libdir}/librt_p.a
%{_libdir}/libutil.a
-%{_libdir}/libutil_p.a
%{_libdir}/crt[1in].o
%{_libdir}/[MSgr]crt1.o
%{?with_static_pie:%{_libdir}/grcrt1.o}
%doc documentation/*
%{_infodir}/libc.info*
+%{_mandir}/man2/getcwd.2*
%{_mandir}/man3/*
%{_mandir}/man7/aio.7*
%{_mandir}/man7/attributes.7*
%{_mandir}/man7/nptl.7*
%{_mandir}/man7/posixoptions.7*
%{_mandir}/man7/pthreads.7*
+%{_mandir}/man7/queue.7*
%{_mandir}/man7/rtld-audit.7*
%{_mandir}/man7/sem_overview.7*
%{_mandir}/man7/shm_overview.7*
+%{_mandir}/man7/system_data_types.7*
%lang(cs) %{_mandir}/cs/man3/*
%lang(de) %{_mandir}/de/man3/*
%lang(es) %{_mandir}/es/man3/*
%lang(hu) %{_mandir}/hu/man3/*
%lang(it) %{_mandir}/it/man3/*
%lang(it) %{_mandir}/it/man7/glob.7*
+%lang(ja) %{_mandir}/ja/man2/getcwd.2*
%lang(ja) %{_mandir}/ja/man3/*
%lang(ja) %{_mandir}/ja/man7/aio.7*
%lang(ja) %{_mandir}/ja/man7/complex.7*
%files profile
%defattr(644,root,root,755)
-%{_libdir}/lib*_p.a
+%{_libdir}/libBrokenLocale_p.a
+%{_libdir}/libanl_p.a
+%{_libdir}/libc_p.a
+%{?with_crypt:%{_libdir}/libcrypt_p.a}
+%{_libdir}/libdl_p.a
+%{_libdir}/libm_p.a
+%ifarch %{x8664} x32
+%{_libdir}/libmvec_p.a
+%endif
+%{_libdir}/libpthread_p.a
+%{_libdir}/libresolv_p.a
+%{_libdir}/librt_p.a
+%{_libdir}/libutil_p.a
%files pic
%defattr(644,root,root,755)
-%{_libdir}/lib*_pic.a
-%{_libdir}/lib*.map
+%{_libdir}/libc_pic.a
+%{_libdir}/libm_pic.a
+%{_libdir}/libresolv_pic.a
+%{_libdir}/libc.map
+%{_libdir}/libm.map
%{_libdir}/sofini.o
%files -n nscd
%dir %{_libdir}/gconv
%{_libdir}/gconv/gconv-modules
%dir %{_libdir}/gconv/gconv-modules.d
- %{_libdir}/gconv/gconv-modules.d/gconv-modules-extra.conf
+%{_libdir}/gconv/gconv-modules.d/gconv-modules-extra.conf
%verify(not md5 mtime size) %{_libdir}/gconv/gconv-modules.cache
%attr(755,root,root) %{_libdir}/gconv/*.so
%{_mandir}/man8/iconvconfig.8*