]> git.pld-linux.org Git - packages/glibc.git/blobdiff - glibc.spec
for fixed localedir no need for build time subst
[packages/glibc.git] / glibc.spec
index 7062bcda04c99c9199d9f0e99182b5f3aaca329f..a99b907f7826a2e1c8a5232e3db70da2678056f5 100644 (file)
 %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_without nss_crypt       # disable nss-crypt
+%bcond_with    cross           # make a cross build, skip native programs
+%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
 #
+%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.20
+%define                core_version    2.21
 %define                llh_version     7:2.6.32.1-1
 
 Summary:       GNU libc
@@ -36,12 +41,12 @@ Summary(tr.UTF-8):  GNU libc
 Summary(uk.UTF-8):     GNU libc версії
 Name:          glibc
 Version:       %{core_version}
-Release:       6
+Release:       3
 Epoch:         6
 License:       LGPL v2.1+
 Group:         Libraries
 Source0:       http://ftp.gnu.org/gnu/glibc/%{name}-%{version}.tar.xz
-# Source0-md5: 948a6e06419a01bd51e97206861595b0
+# Source0-md5: 9cb398828e8f84f57d1f7d5588cf40cd
 Source2:       nscd.init
 Source3:       nscd.sysconfig
 Source4:       nscd.logrotate
@@ -52,12 +57,11 @@ 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
 Patch3:                %{name}-crypt-blowfish.patch
-Patch4:                %{name}-sotruss-sh.patch
+Patch4:                %{name}-no-bash-nls.patch
 Patch5:                %{name}-sparc-softfp-gcc.patch
 Patch6:                %{name}-paths.patch
 Patch7:                1070_all_glibc-fadvise64_64.patch
@@ -65,7 +69,6 @@ Patch8:               %{name}-missing-nls.patch
 Patch9:                %{name}-nss_include_dirs.patch
 Patch10:       %{name}-info.patch
 Patch11:       %{name}-autoconf.patch
-Patch12:       %{name}-format.patch
 
 Patch14:       %{name}-sparc-errno_fix.patch
 Patch15:       %{name}-new-charsets.patch
@@ -76,19 +79,16 @@ Patch17:    %{name}-morelocales.patch
 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
-Patch26:       %{name}-posix-sh.patch
 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:       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,12 +101,12 @@ BuildRequires:    binutils >= 2:2.15.90.0.3
 %endif
 %{!?with_cross:BuildRequires:  dietlibc-static}
 BuildRequires: gawk
-BuildRequires: gcc >= 6:4.3
+BuildRequires: gcc >= 6:4.6
 %{?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
+%{?with_nss_crypt:BuildRequires:       nss-devel >= 1:3.15.1-2}
 BuildRequires: perl-base
 BuildRequires: rpm-build >= 4.3-0.20030610.28
 BuildRequires: rpmbuild(macros) >= 1.567
@@ -116,6 +116,9 @@ 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)
@@ -133,12 +136,12 @@ Conflicts:        kernel < %{min_kernel}
 Conflicts:     kernel24
 Conflicts:     kernel24-smp
 Conflicts:     ld.so < 1.9.9-10
-Conflicts:     man-pages < 1.43
+Conflicts:     man-pages < 3.71-2
 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)
@@ -160,9 +163,6 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %{expand:%%define      __cc    %{__cc} -m32}
 %endif
 
-# Architectures supported in glibc-ports
-%define                ports_arch              alpha %{arm}
-
 # Xen-friendly glibc
 %define                specflags_ia32          -mno-tls-direct-seg-refs
 %define                specflags_x86_64        -mno-tls-direct-seg-refs -fasynchronous-unwind-tables
@@ -295,6 +295,7 @@ 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
 
@@ -328,6 +329,7 @@ Summary(fr.UTF-8):  Crée un cache de bibliothčque partagée et gčre *.so
 Summary(pl.UTF-8):     Tworzenie cache'u bibliotek dynamicznych i ich dowiązań symbolicznych
 Summary(tr.UTF-8):     Ortak kitaplýk önbelleđi yaratýr ve bađlantýlarý kurar
 Group:         Applications/System
+Requires:      uname(release) >= %{min_kernel}
 # This is needed because previous package (glibc) had autoreq false and had
 # provided this manually. Probably poldek bug that have to have it here.
 Provides:      /sbin/ldconfig
@@ -378,12 +380,8 @@ Summary(uk.UTF-8): Додаткові бібліотеки, потрібні д
 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
+Requires:      %{name}-libcrypt(%{_target_cpu}) = %{epoch}:%{version}-%{release}
 Provides:      %{name}-devel(%{_target_cpu}) = %{epoch}:%{version}-%{release}
 %ifarch %{ix86}
 Provides:      %{name}-devel(ix86) = %{epoch}:%{version}-%{release}
@@ -450,10 +448,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)
@@ -461,9 +456,13 @@ Obsoletes: glibc-headers(i386)
 Obsoletes:     glibc-headers(i486)
 Obsoletes:     glibc-headers(i586)
 Obsoletes:     glibc-headers(i686)
+Obsoletes:     glibc-headers(ix86)
 Obsoletes:     glibc-headers(pentium3)
 Obsoletes:     glibc-headers(pentium4)
 %endif
+%ifarch x32
+Obsoletes:     glibc-headers(x86_64)
+%endif
 %ifarch ppc64
 Obsoletes:     glibc-headers(ppc)
 %endif
@@ -504,7 +503,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)
@@ -512,9 +511,13 @@ Obsoletes: glibc-devel-utils(i386)
 Obsoletes:     glibc-devel-utils(i486)
 Obsoletes:     glibc-devel-utils(i586)
 Obsoletes:     glibc-devel-utils(i686)
+Obsoletes:     glibc-devel-utils(ix86)
 Obsoletes:     glibc-devel-utils(pentium3)
 Obsoletes:     glibc-devel-utils(pentium4)
 %endif
+%ifarch x32
+Obsoletes:     glibc-devel-utils(x86_64)
+%endif
 %ifarch ppc64
 Obsoletes:     glibc-devel-utils(ppc)
 %endif
@@ -561,9 +564,13 @@ Obsoletes: glibc-devel-doc(i386)
 Obsoletes:     glibc-devel-doc(i486)
 Obsoletes:     glibc-devel-doc(i586)
 Obsoletes:     glibc-devel-doc(i686)
+Obsoletes:     glibc-devel-doc(ix86)
 Obsoletes:     glibc-devel-doc(pentium3)
 Obsoletes:     glibc-devel-doc(pentium4)
 %endif
+%ifarch x32
+Obsoletes:     glibc-devel-doc(x86_64)
+%endif
 %ifarch ppc64
 Obsoletes:     glibc-devel-doc(ppc)
 %endif
@@ -948,10 +955,9 @@ echo "Minimal supported kernel is 2.6.32" >&2
 exit 1
 %endif
 
-%patch0 -p1
 %patch2 -p1
 %patch3 -p0
-%patch4 -p1
+%{!?with_bash_nls:%patch4 -p1}
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
@@ -960,7 +966,6 @@ exit 1
 
 %patch10 -p1
 %patch11 -p1
-%patch12 -p1
 
 %patch14 -p0
 %patch15 -p1
@@ -969,18 +974,16 @@ exit 1
 %patch18 -p1
 %patch19 -p1
 %patch20 -p1
-%{?with_cross:%patch21 -p1}
 %patch22 -p1
 %patch23 -p0
 
 %patch25 -p1
-%patch26 -p1
 %patch27 -p1
 %patch28 -p1
 %patch29 -p1
 %patch30 -p1
-%patch31 -p1
-%patch32 -p1
+
+%patch33 -p1
 
 %patch38 -p1
 
@@ -1004,11 +1007,6 @@ cd builddir
 CC="%{__cc} -m64 -mcpu=ultrasparc -mvis -fcall-used-g6"
 %endif
 
-AddOns=libidn
-%ifarch %{ports_arch}
-AddOns=$AddOns,ports
-%endif
-
 # force ld bfd (instead of gold)
 install -d alt-tools
 ln -sf %{_bindir}/ld.bfd alt-tools/ld
@@ -1016,20 +1014,20 @@ PATH=$(pwd)/alt-tools:$PATH; export PATH
 
 AWK="gawk" \
 ../%configure \
-       --with-bugurl=http://bugs.pld-linux.org/ \
-       --with-binutils=$(pwd)/alt-tools \
+       --enable-add-ons=libidn \
+       --enable-bind-now \
+       --enable-experimental-malloc \
+       --enable-hidden-plt \
        --enable-kernel="%{min_kernel}" \
-       --with-headers=%{_includedir} \
-       --with%{!?with_selinux:out}-selinux \
-       --with-tls \
+       --enable-nss-crypt%{!?with_nss_crypt:=no} \
        --enable-obsolete-rpc \
-       --enable-add-ons=$AddOns \
-       --%{?with_nss_crypt:en}%{!?with_nss_crypt:dis}able-nss-crypt \
-       --enable-experimental-malloc \
+       --enable-profile \
        --enable-stackguard-randomization \
-       --enable-hidden-plt \
-       --enable-bind-now \
-       --enable-profile
+       --with-binutils=$(pwd)/alt-tools \
+       --with-bugurl=http://bugs.pld-linux.org/ \
+       --with-headers=%{_includedir} \
+       --with-selinux%{!?with_selinux:=no} \
+       --with-tls
 
 %{__make} \
        AWK="gawk" \
@@ -1090,19 +1088,15 @@ install -p glibc-postinst                               $RPM_BUILD_ROOT/sbin
 %{?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}
 
-# moved to tzdata package
-rm -f $RPM_BUILD_ROOT%{_sysconfdir}/localtime
-rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo
-
 # 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
-       rm -f $RPM_BUILD_ROOT%{_libdir}/lib${l}.so
+       %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib${l}.so
        ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/lib${l}.so.*) $RPM_BUILD_ROOT%{_libdir}/lib${l}.so
 done
 
 # linking nss modules directly is not supported
-rm -f $RPM_BUILD_ROOT%{_libdir}/libnss_*.so
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnss_*.so
 
 install -p %{SOURCE2}          $RPM_BUILD_ROOT/etc/rc.d/init.d/nscd
 cp -p %{SOURCE8}               $RPM_BUILD_ROOT/etc/init/nscd.conf
@@ -1119,25 +1113,23 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d
 echo 'include ld.so.conf.d/*.conf' > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf
 : > $RPM_BUILD_ROOT/var/cache/ldconfig/aux-cache
 
-rm -f $RPM_BUILD_ROOT%{_mandir}/hu/man7/man.7
-
 # doesn't fit with out tzdata concept and configure.in is stupid assuming bash
 # is first posix compatible shell making this script depend on bash.
-rm -f $RPM_BUILD_ROOT%{_bindir}/tzselect
-rm -f $RPM_BUILD_ROOT%{_mandir}/man8/tzselect.8*
-rm -f $RPM_BUILD_ROOT%{_mandir}/*/man8/tzselect.8*
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/tzselect
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/tzselect.8*
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/*/man8/tzselect.8*
 
 : > $RPM_BUILD_ROOT/var/log/nscd
 : > $RPM_BUILD_ROOT/var/lib/nscd/passwd
 : > $RPM_BUILD_ROOT/var/lib/nscd/group
 : > $RPM_BUILD_ROOT/var/lib/nscd/hosts
 
-install %{SOURCE9} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/nscd.conf
+cp -p %{SOURCE9} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/nscd.conf
 
 rm -rf documentation
 install -d documentation
 
-for f in ChangeLog.old DESIGN-{barrier,condvar,rwlock,sem}.txt TODO{,-kernel,-testing}; do
+for f in ChangeLog.old DESIGN-{barrier,condvar,rwlock,systemtap-probes}.txt TODO{,-kernel,-testing}; do
        cp -af nptl/$f documentation/$f.nptl
 done
 cp -af crypt/README.ufc-crypt ChangeLog* documentation
@@ -1238,13 +1230,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 cmn crh csb cv cy de_AT de_CH dv dz en \
+       bg bho bn bn_IN bo br brx bs byn ca@valencia 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_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 quz rm ro sa sc sd se si sid sl so sq sr sr@Latn tl \
+       lg li lo lt lv mai mg mhr mi mk ml mn mni mr ms mt my nds ne nl_BE nn nr nso \
+       oc om or pa pap ps pt ps quz rm ro sa sat 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
@@ -1266,9 +1258,8 @@ 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@,%{_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
+install -p %{SOURCE6} $RPM_BUILD_ROOT%{_bindir}/localedb-gen
+cp -p localedata/SUPPORTED $RPM_BUILD_ROOT%{_datadir}/i18n
 
 # shutup check-files
 %{__rm} $RPM_BUILD_ROOT%{_mandir}/README.*
@@ -1332,10 +1323,10 @@ if [ "$SUPPORTED_LOCALES" ]; then
        localedb-gen || :
 fi
 
-%post devel    -p      /sbin/postshell
+%post devel-doc        -p      /sbin/postshell
 -/usr/sbin/fix-info-dir -c %{_infodir}
 
-%postun devel  -p      /sbin/postshell
+%postun devel-doc      -p      /sbin/postshell
 -/usr/sbin/fix-info-dir -c %{_infodir}
 
 %pre -n nscd
@@ -1382,10 +1373,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
@@ -1689,7 +1683,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
This page took 0.400597 seconds and 4 git commands to generate.