]> git.pld-linux.org Git - packages/glibc.git/blobdiff - glibc.spec
- headers packages are identical over all archs, there's no need for artificial Req...
[packages/glibc.git] / glibc.spec
index 5fa7b149f17a0bfa17821efa635d079c67a6d470..0cb86e1572f734bc3b213662d7638af9182ca4e1 100644 (file)
@@ -8,21 +8,26 @@
 # - math/{test-fenv,test-tgmath,test-float,test-ifloat}, debug/backtrace-tst(SEGV)  fail on alpha
 #
 # Conditional build:
-# min_kernel   (default is 2.6.16)
+# min_kernel   (default is 2.6.32)
 %bcond_without memusage        # don't build memusage utility
 %bcond_without selinux         # without SELinux support (in nscd)
 %bcond_with    tests           # perform "make test"
 %bcond_without localedb        # don't build localedb-all (is time consuming)
-%bcond_with    cross           # build using crossgcc (without libgcc_eh)
+%bcond_with    cross           # make a cross build, skip native programs
+%bcond_without nss_crypt       # disable nss-crypt
 #
-%{!?min_kernel:%global         min_kernel      2.6.16}
+%ifarch x32
+%{!?min_kernel:%global         min_kernel      3.4.0}
+%else
+%{!?min_kernel:%global         min_kernel      2.6.32}
+%endif
 
 %ifarch sparc64
 %undefine      with_memusage
 %endif
 
-%define                core_version    2.18
-%define                llh_version     7:2.6.20.4-1
+%define                core_version    2.20
+%define                llh_version     7:2.6.32.1-1
 
 Summary:       GNU libc
 Summary(de.UTF-8):     GNU libc
@@ -40,17 +45,18 @@ Epoch:              6
 License:       LGPL v2.1+
 Group:         Libraries
 Source0:       http://ftp.gnu.org/gnu/glibc/%{name}-%{version}.tar.xz
-# Source0-md5: 88fbbceafee809e82efd52efa1e3c58f
+# Source0-md5: 948a6e06419a01bd51e97206861595b0
 Source2:       nscd.init
 Source3:       nscd.sysconfig
 Source4:       nscd.logrotate
 #Source5:      http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-man-pages.tar.bz2
-Source5:       http://qboosh.pl/man/%{name}-man-pages.tar.bz2
-# Source5-md5: f464eadf3cf06761f65639e44a179e6b
+Source5:       %{name}-man-pages.tar.bz2
+# Source5-md5: 0d93d9628f35f1eae015affb11390df3
 Source6:       %{name}-localedb-gen
 Source7:       %{name}-LD-path.c
 Source8:       nscd.upstart
 Source9:       nscd.tmpfiles
+Patch0:                %{name}-git.patch
 # against GNU TP (libc domain)
 #Patch1:               %{name}-pl.po-update.patch
 Patch2:                %{name}-pld.patch
@@ -60,7 +66,7 @@ Patch5:               %{name}-sparc-softfp-gcc.patch
 Patch6:                %{name}-paths.patch
 Patch7:                1070_all_glibc-fadvise64_64.patch
 Patch8:                %{name}-missing-nls.patch
-Patch9:                %{name}-java-libc-wait.patch
+Patch9:                %{name}-nss_include_dirs.patch
 Patch10:       %{name}-info.patch
 Patch11:       %{name}-autoconf.patch
 Patch12:       %{name}-format.patch
@@ -68,11 +74,12 @@ Patch12:    %{name}-format.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
 Patch18:       %{name}-locale_fixes.patch
 Patch19:       %{name}-ZA_collate.patch
 Patch20:       %{name}-thread_start.patch
-Patch21:       %{name}-cross-gcc_eh.patch
 Patch22:       %{name}-with-stroke.patch
 Patch23:       %{name}-pt_pax.patch
 Patch25:       %{name}-cv_gnu89_inline.patch
@@ -81,12 +88,10 @@ Patch27:    %{name}-locale-C.patch.xz
 # Patch27-md5: 34ebe52a2afb923e33af0fb7c541f540
 Patch28:       %{name}-locale-C-pld.patch
 Patch29:       %{name}-arm-alignment-fix.patch
-
+Patch30:       glibc-rh1124987.patch
 Patch31:       %{name}-origin.patch
 Patch32:       %{name}-Os-fail-workaround.patch
-Patch33:       %{name}-hack-strstr.patch
-Patch34:       %{name}-make-ver.patch
-
+Patch33:       fix-broken-echo.patch
 Patch38:       1055_all_glibc-resolv-dynamic.patch
 URL:           http://www.gnu.org/software/libc/
 %{?with_selinux:BuildRequires: audit-libs-devel}
@@ -101,7 +106,7 @@ BuildRequires:      binutils >= 2:2.15.90.0.3
 BuildRequires: gawk
 BuildRequires: gcc >= 6:4.3
 %{?with_memusage:BuildRequires:        gd-devel >= 2.0.1}
-BuildRequires: gettext-devel >= 0.10.36
+BuildRequires: gettext-tools >= 0.10.36
 %{?with_selinux:BuildRequires: libselinux-devel >= 1.18}
 BuildRequires: linux-libc-headers >= %{llh_version}
 BuildRequires: nss-devel >= 1:3.15.1-2
@@ -113,6 +118,10 @@ BuildRequires:     texinfo
 Requires(post):        ldconfig = %{epoch}:%{version}-%{release}
 Requires:      filesystem
 Requires:      uname(release) >= %{min_kernel}
+Provides:      %{name}(%{_target_cpu}) = %{epoch}:%{version}-%{release}
+%ifarch %{ix86}
+Provides:      %{name}(ix86) = %{epoch}:%{version}-%{release}
+%endif
 Provides:      glibc(nptl)
 Provides:      glibc(tls)
 Provides:      rtld(GNU_HASH)
@@ -135,7 +144,7 @@ Conflicts:  poldek < 0.18.8-5
 Conflicts:     rc-scripts < 0.3.1-13
 Conflicts:     rpm < 4.1
 Conflicts:     xorg-driver-video-nvidia-libs < 1:295.33
-ExclusiveArch: i486 i586 i686 pentium3 pentium4 athlon %{x8664} ia64 alpha s390 s390x sparc sparc64 sparcv9 ppc ppc64 armv5tel
+ExclusiveArch: i486 i586 i686 pentium3 pentium4 athlon %{x8664} x32 ia64 alpha s390 s390x sparc sparc64 sparcv9 ppc ppc64 armv5tel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # avoid -s here (ld.so must not be stripped to allow any program debugging)
@@ -291,6 +300,10 @@ Summary:   Utilities and data used by glibc
 Summary(pl.UTF-8):     Narzędzia i dane używane przez glibc
 Group:         Applications/System
 Requires:      %{name} = %{epoch}:%{version}-%{release}
+%ifarch %{ix86}
+Conflicts:     %{name}(x32)
+Conflicts:     %{name}(x86_64)
+%endif
 
 %description misc
 Utilities and data used by glibc.
@@ -373,11 +386,7 @@ Group:             Development/Libraries
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      %{name}-devel-utils = %{epoch}:%{version}-%{release}
 Requires:      %{name}-libcrypt(%{_target_cpu}) = %{epoch}:%{version}-%{release}
-%if "%{_lib}" == "lib64"
-Requires:      %{name}-headers(64bit) = %{epoch}:%{version}-%{release}
-%else
 Requires:      %{name}-headers = %{epoch}:%{version}-%{release}
-%endif
 Provides:      %{name}-devel(%{_target_cpu}) = %{epoch}:%{version}-%{release}
 %ifarch %{ix86}
 Provides:      %{name}-devel(ix86) = %{epoch}:%{version}-%{release}
@@ -444,10 +453,7 @@ Provides:  %{name}-headers(%{_target_cpu}) = %{epoch}:%{version}-%{release}
 %ifarch %{ix86}
 Provides:      %{name}-headers(ix86) = %{epoch}:%{version}-%{release}
 %endif
-%if "%{_lib}" == "lib64"
-Provides:      %{name}-headers(64bit) = %{epoch}:%{version}-%{release}
-%endif
-%ifarch %{x8664}
+%ifarch %{x8664} x32
 # If both -m32 and -m64 is to be supported on x86_64, x86_64 package
 # have to be installed, not ix86 one.
 Obsoletes:     glibc-headers(athlon)
@@ -457,6 +463,10 @@ Obsoletes: glibc-headers(i586)
 Obsoletes:     glibc-headers(i686)
 Obsoletes:     glibc-headers(pentium3)
 Obsoletes:     glibc-headers(pentium4)
+Obsoletes:     glibc-headers(ix86)
+%endif
+%ifarch x32
+Obsoletes:     glibc-headers(x86_64)
 %endif
 %ifarch ppc64
 Obsoletes:     glibc-headers(ppc)
@@ -498,7 +508,7 @@ Provides:   %{name}-devel-utils(%{_target_cpu}) = %{epoch}:%{version}-%{release}
 %ifarch %{ix86}
 Provides:      %{name}-devel-utils(ix86) = %{epoch}:%{version}-%{release}
 %endif
-%ifarch %{x8664}
+%ifarch %{x8664} x32
 # If both -m32 and -m64 is to be supported on AMD64, x86_64 package
 # have to be installed, not ix86 one.
 Obsoletes:     glibc-devel-utils(athlon)
@@ -508,6 +518,10 @@ Obsoletes: glibc-devel-utils(i586)
 Obsoletes:     glibc-devel-utils(i686)
 Obsoletes:     glibc-devel-utils(pentium3)
 Obsoletes:     glibc-devel-utils(pentium4)
+Obsoletes:     glibc-devel-utils(ix86)
+%endif
+%ifarch x32
+Obsoletes:     glibc-devel-utils(x86_64)
 %endif
 %ifarch ppc64
 Obsoletes:     glibc-devel-utils(ppc)
@@ -557,6 +571,10 @@ Obsoletes: glibc-devel-doc(i586)
 Obsoletes:     glibc-devel-doc(i686)
 Obsoletes:     glibc-devel-doc(pentium3)
 Obsoletes:     glibc-devel-doc(pentium4)
+Obsoletes:     glibc-devel-doc(ix86)
+%endif
+%ifarch x32
+Obsoletes:     glibc-devel-doc(x86_64)
 %endif
 %ifarch ppc64
 Obsoletes:     glibc-devel-doc(ppc)
@@ -606,6 +624,8 @@ Requires:   %{name} = %{epoch}:%{version}-%{release}
 Requires:      rc-scripts >= 0.4.3.0
 Provides:      group(nscd)
 Provides:      user(nscd)
+Obsoletes:     gnscd
+Obsoletes:     unscd
 
 %description -n nscd
 nscd caches name service lookups; it can dramatically improve
@@ -935,11 +955,12 @@ Narzędzie do profilowania zużycia pamięci.
 %prep
 %setup -q
 
-%if "%{min_kernel}" < "2.6.16"
-echo "Minimal supported kernel is 2.6.16" >&2
+%if "%{min_kernel}" < "2.6.32"
+echo "Minimal supported kernel is 2.6.32" >&2
 exit 1
 %endif
 
+%patch0 -p1
 %patch2 -p1
 %patch3 -p0
 %patch4 -p1
@@ -947,7 +968,8 @@ exit 1
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
-%patch9 -p1
+%patch9 -p0
+
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
@@ -959,7 +981,6 @@ exit 1
 %patch18 -p1
 %patch19 -p1
 %patch20 -p1
-%{?with_cross:%patch21 -p1}
 %patch22 -p1
 %patch23 -p0
 
@@ -968,11 +989,10 @@ exit 1
 %patch27 -p1
 %patch28 -p1
 %patch29 -p1
-
+%patch30 -p1
 %patch31 -p1
 %patch32 -p1
 %patch33 -p1
-%patch34 -p1
 
 %patch38 -p1
 
@@ -981,10 +1001,6 @@ find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
 chmod +x scripts/cpp
 
-# i786 (aka pentium4) hack
-ln -s i686 nptl/sysdeps/i386/i786
-ln -s i686 nptl/sysdeps/unix/sysv/linux/i386/i786
-
 %build
 # glibc has its own way to remove PLT relocations. / H. J. Lu.
 unset LD_SYMBOLIC_FUNCTIONS || :
@@ -1000,7 +1016,7 @@ cd builddir
 CC="%{__cc} -m64 -mcpu=ultrasparc -mvis -fcall-used-g6"
 %endif
 
-AddOns=nptl,libidn
+AddOns=libidn
 %ifarch %{ports_arch}
 AddOns=$AddOns,ports
 %endif
@@ -1020,9 +1036,7 @@ AWK="gawk" \
        --with-tls \
        --enable-obsolete-rpc \
        --enable-add-ons=$AddOns \
-%if "%{pld_release}" != "ti"
-       --enable-nss-crypt \
-%endif
+       --%{?with_nss_crypt:en}%{!?with_nss_crypt:dis}able-nss-crypt \
        --enable-experimental-malloc \
        --enable-stackguard-randomization \
        --enable-hidden-plt \
@@ -1031,26 +1045,14 @@ AWK="gawk" \
 
 %{__make} \
        AWK="gawk" \
+       localedir=%{_prefix}/lib/locale \
        sLIBdir=%{_libdir}
 
 cd ..
 
 %if %{with tests}
-cd builddir
 env LANGUAGE=C LC_ALL=C \
-%{__make} -j1 tests 2>&1 | awk '
-BEGIN { file = "" }
-{
-       if (($0 ~ /\*\*\* \[.*\.out\] Error/) && ($0 !~ /annexc/) && (file == "")) {
-               file=$0;
-               gsub(/.*\[/, NIL, file);
-               gsub(/\].*/, NIL, file);
-       }
-       print $0;
-}
-END { if (file != "") { print "ERROR OUTPUT FROM " file; system("cat " file); exit(1); } }'
-cd ..
-done
+%{__make} -j1 -C builddir tests
 %endif
 
 %if %{without cross}
@@ -1068,13 +1070,17 @@ cd builddir
 env LANGUAGE=C LC_ALL=C \
 %{__make} install \
        install_root=$RPM_BUILD_ROOT \
+       localedir=%{_prefix}/lib/locale \
        infodir=%{_infodir} \
        mandir=%{_mandir}
 
 %if %{with localedb}
 env LANGUAGE=C LC_ALL=C \
 %{__make} localedata/install-locales \
+       localedir=%{_prefix}/lib/locale \
        install_root=$RPM_BUILD_ROOT
+%else
+install -d $RPM_BUILD_ROOT%{_prefix}/lib/locale
 %endif
 
 PICFILES="libc_pic.a libc.map
@@ -1100,8 +1106,6 @@ mv -f $RPM_BUILD_ROOT/%{_lib}/libpcprofile.so     $RPM_BUILD_ROOT%{_libdir}
 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/localtime
 rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo
 
-ln -sf libbsd-compat.a         $RPM_BUILD_ROOT%{_libdir}/libbsd.a
-
 # make symlinks across top-level directories absolute
 for l in BrokenLocale anl cidn crypt dl m nsl resolv rt thread_db util; do
        test -L $RPM_BUILD_ROOT%{_libdir}/lib${l}.so || exit 1
@@ -1145,7 +1149,7 @@ install %{SOURCE9} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/nscd.conf
 rm -rf documentation
 install -d documentation
 
-for f in ANNOUNCE ChangeLog DESIGN-{barrier,condvar,rwlock,sem}.txt TODO{,-kernel,-testing}; do
+for f in ChangeLog.old DESIGN-{barrier,condvar,rwlock,sem}.txt TODO{,-kernel,-testing}; do
        cp -af nptl/$f documentation/$f.nptl
 done
 cp -af crypt/README.ufc-crypt ChangeLog* documentation
@@ -1184,12 +1188,14 @@ done
 #   kmr (vlc)
 #   man (ccsm; incorrectly named md)
 #   mus (bluez-gnome)
+#   nah (mate-system-monitor)
 #   pms (deluge)
 #   sco (gnomad2, picard, stellarium)
 #   son (gtkspell3)
 #   swg (sim)
 #   syr (iso-codes)
 #   tet (vlc)
+#   vec (mate-applet-indicator)
 #
 # To be removed (after fixing packages still using it):
 #   sr@Latn (use sr@latin instead)
@@ -1203,6 +1209,7 @@ done
 # bo=bo_CN? (or common for CN, IN?)
 # ca=ca_ES
 # ckb=ckb_IQ
+# cv=cv_RU
 # de=de_DE
 # en=common? (en_AU, en_CA, en_GB, en_NZ, en_US are used for particular variants)
 # eo=common
@@ -1221,7 +1228,9 @@ done
 # or=or_IN
 # pa=pa_IN
 # pt=pt_PT
+# quz=quz_PE
 # ru=ru_RU
+# sd=sd_IN
 # so=so_SO
 # sr=sr_RS [cyrillic]
 # sr@latin=sr_RS@latin
@@ -1241,13 +1250,13 @@ done
 #   sv tr zh_CN zh_TW
 #
 for i in aa aa@saaho af am an ang ar ar_TN as ast az az_IR be@latin be@tarask bem \
-       bg bn bn_IN bo br bs byn ca@valencia ckb crh csb cy de_AT de_CH dv dz en \
+       bg bn bn_IN bo br bs byn ca@valencia ckb cmn crh csb cv cy de_AT de_CH dv dz en \
        en@boldquot en@quot en@shaw en_AU en_CA en_NZ en_US 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 et eu fa ff fil fo fr_BE fr_CA fr_CH fur fy ga gd gez gu gv ha he \
        hi hne hsb hy ia id ig ik is it_CH iu ka kg kk kl km kn kok ks ku kw ky la lb \
        lg li lo lt lv mai mg mhr mi mk ml mn mr ms mt my nds ne nl_BE nn nr nso \
-       oc om or pa pap ps pt ps rm ro sa sc se si sid sl so sq sr sr@Latn tl \
+       oc om or pa pap ps pt ps quz rm ro sa sc sd se si sid sl so sq sr sr@Latn tl \
        sr@ije sr@ijekavian sr@ijekavianlatin sr@latin ss st sw ta te tg th ti \
        tig tk tl tlh tn ts tt tt@iqtelif ug uk ur uz uz@cyrillic ve vi wa wal wo xh yi yo \
        zh_HK zu; do
@@ -1269,7 +1278,7 @@ 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
 done
 
 # localedb-gen infrastructure
-sed -e 's,@localedir@,%{_libdir}/locale,' %{SOURCE6} > $RPM_BUILD_ROOT%{_bindir}/localedb-gen
+sed -e 's,@localedir@,%{_prefix}/lib/locale,' %{SOURCE6} > $RPM_BUILD_ROOT%{_bindir}/localedb-gen
 chmod +x $RPM_BUILD_ROOT%{_bindir}/localedb-gen
 install localedata/SUPPORTED $RPM_BUILD_ROOT%{_datadir}/i18n
 
@@ -1313,6 +1322,14 @@ if [ "$1" != 1 ]; then
        %service -q crond restart
 fi
 
+%ifarch %{x8664}
+# when upgrading from glibc < 6:2.19-3 copy locale-archive
+# from /usr/lib64/locale to /usr/lib/locale
+# but only if the latter doesn't already exist
+%triggerpostun -p /sbin/postshell -- %{name} < 6:2.19-3
+-/bin/cp -an %{_libdir}/locale/locale-archive %{_prefix}/lib/locale/locale-archive
+%endif
+
 %post  libcrypt -p /sbin/ldconfig
 %postun        libcrypt -p /sbin/ldconfig
 
@@ -1377,10 +1394,13 @@ fi
 %ifarch %{x8664}
 %attr(755,root,root) /%{_lib}/ld-linux-x86-64.so.2
 %endif
+%ifarch x32
+%attr(755,root,root) /%{_lib}/ld-linux-x32.so.2
+%endif
 %ifarch ppc64 s390x
 %attr(755,root,root) /%{_lib}/ld64.so.1
 %endif
-%ifnarch %{ix86} sparc sparcv9 sparc64 alpha sh ia64 %{x8664} ppc64 s390x %{arm}
+%ifnarch %{ix86} sparc sparcv9 sparc64 alpha sh ia64 %{x8664} x32 ppc64 s390x %{arm}
 %attr(755,root,root) /%{_lib}/ld.so.1
 %endif
 %attr(755,root,root) /%{_lib}/libBrokenLocale-%{core_version}.so
@@ -1436,7 +1456,7 @@ fi
 %else
 %attr(755,root,root) /%{_lib}/libutil.so.1
 %endif
-%{?with_localedb:%dir %{_libdir}/locale}
+%dir %{_prefix}/lib/locale
 
 #%files -n nss_db
 %defattr(644,root,root,755)
@@ -1467,9 +1487,6 @@ fi
 %attr(755,root,root) %{_bindir}/getconf
 %attr(755,root,root) %{_bindir}/getent
 %attr(755,root,root) %{_bindir}/iconv
-%ifarch %{ix86} m68k sparc sparcv9
-%attr(755,root,root) %{_bindir}/lddlibc4
-%endif
 %attr(755,root,root) %{_bindir}/locale
 %attr(755,root,root) %{_bindir}/rpcgen
 %attr(755,root,root) %{_sbindir}/zdump
@@ -1586,6 +1603,9 @@ fi
 %attr(755,root,root) %{_bindir}/catchsegv
 %attr(755,root,root) %{_bindir}/ldd
 %attr(755,root,root) %{_bindir}/pldd
+%ifarch %{ix86} 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
@@ -1676,8 +1696,6 @@ fi
 %{_libdir}/libc.so
 %{_libdir}/libpthread.so
 # static-only libs
-%{_libdir}/libbsd-compat.a
-%{_libdir}/libbsd.a
 %{_libdir}/libc_nonshared.a
 %{_libdir}/libg.a
 %{_libdir}/libieee.a
@@ -1686,7 +1704,7 @@ fi
 %endif
 %{_libdir}/libpthread_nonshared.a
 %{_libdir}/librpcsvc.a
-%ifarch %{ix86} %{x8664} ppc ppc64 s390 s390x sparc sparcv9 sparc64
+%ifarch %{ix86} %{x8664} x32 ppc ppc64 s390 s390x sparc sparcv9 sparc64
 # ABI-dependent headers
 %{_includedir}/gnu/stubs-*.h
 %endif
@@ -1791,7 +1809,7 @@ fi
 %if %{with localedb}
 %files localedb-all
 %defattr(644,root,root,755)
-%{_libdir}/locale/locale-archive
+%{_prefix}/lib/locale/locale-archive
 %endif
 
 %files -n iconv
This page took 0.504694 seconds and 4 git commands to generate.