core/glibc to 2.14.1-1

This commit is contained in:
Kevin Mihelich 2011-10-31 21:43:03 -04:00
parent ad2a711cbe
commit 2f73b548cb
3 changed files with 54 additions and 24 deletions

View file

@ -1,12 +1,12 @@
# $Id: PKGBUILD 128661 2011-06-25 11:56:19Z allan $ # $Id: PKGBUILD 141373 2011-10-30 06:48:26Z allan $
# Maintainer: Allan McRae <allan@archlinux.org> # Maintainer: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc # toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: valgrind requires rebuilt with each new glibc version # NOTE: valgrind requires rebuilt with each major glibc version
# ALARM: Kevin Mihelich <kevin@plugapps.com> # ALARM: Kevin Mihelich <kevin@plugapps.com>
# - Added source file for glibc-ports-2.14, needed for building on ARM # - Added source file for glibc-ports, needed for building on ARM
# - Symlink glibc-ports-2.14 source dir to ports dir in glibc directory # - Symlink glibc-ports source dir to ports dir in glibc directory
# - Changed configure to enable ports add-on, specify our build host type # - Changed configure to enable ports add-on, specify our build host type
# - Disabled distcc and ccache, make -j1 for v5, -j2 for v7 # - Disabled distcc and ccache, make -j1 for v5, -j2 for v7
@ -14,9 +14,9 @@ plugrel=1
noautobuild=1 noautobuild=1
pkgname=glibc pkgname=glibc
pkgver=2.14 pkgver=2.14.1
pkgrel=4 pkgrel=1
_glibcdate=20110617 _glibcdate=20111025
pkgdesc="GNU C Library" pkgdesc="GNU C Library"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
url="http://www.gnu.org/software/libc" url="http://www.gnu.org/software/libc"
@ -24,12 +24,13 @@ license=('GPL' 'LGPL')
groups=('base') groups=('base')
depends=('linux-api-headers>=3.0' 'tzdata') depends=('linux-api-headers>=3.0' 'tzdata')
makedepends=('gcc>=4.6') makedepends=('gcc>=4.6')
backup=(etc/locale.gen backup=(etc/gai.conf
etc/locale.gen
etc/nscd.conf) etc/nscd.conf)
options=('!strip' '!distcc' '!ccache') options=('!strip' '!distcc' '!ccache')
install=glibc.install install=glibc.install
source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.tar.xz source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.tar.xz
http://ftp.gnu.org/gnu/glibc/${pkgname}-ports-${pkgver}.tar.gz ftp://ftp.gnu.org/gnu/glibc/glibc-ports-${pkgver}.tar.xz
glibc-2.10-dont-build-timezone.patch glibc-2.10-dont-build-timezone.patch
glibc-2.10-bz4781.patch glibc-2.10-bz4781.patch
glibc-__i686.patch glibc-__i686.patch
@ -37,23 +38,21 @@ source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.t
glibc-2.12.2-ignore-origin-of-privileged-program.patch glibc-2.12.2-ignore-origin-of-privileged-program.patch
glibc-2.13-futex.patch glibc-2.13-futex.patch
glibc-2.14-libdl-crash.patch glibc-2.14-libdl-crash.patch
#glibc-2.14-fix-resolver-crash-typo.patch glibc-2.14-revert-4768ae77.patch
glibc-2.14-revert-4462fad3.patch
glibc-2.14-reexport-rpc-interface.patch glibc-2.14-reexport-rpc-interface.patch
glibc-2.14-reinstall-nis-rpc-headers.patch glibc-2.14-reinstall-nis-rpc-headers.patch
nscd nscd
locale.gen.txt locale.gen.txt
locale-gen) locale-gen)
md5sums=('e441d745609d93c907b72548ba646dad' md5sums=('c52a15134dfa9f2c94f2ccd4cb155cf1'
'ee80ed9e723a085099218f959a7e344b'
'4dadb9203b69a3210d53514bb46f41c3' '4dadb9203b69a3210d53514bb46f41c3'
'0c5540efc51c0b93996c51b57a8540ae' '0c5540efc51c0b93996c51b57a8540ae'
'40cd342e21f71f5e49e32622b25acc52' '40cd342e21f71f5e49e32622b25acc52'
'a3ac6f318d680347bb6e2805d42b73b2' 'a3ac6f318d680347bb6e2805d42b73b2'
'b042647ea7d6f22ad319e12e796bd13e' 'b042647ea7d6f22ad319e12e796bd13e'
'7d0154b7e17ea218c9fa953599d24cc4' '7d0154b7e17ea218c9fa953599d24cc4'
'cea62cc6b903d222c5f26e05a3c0e0e6' '6970bcfeb3bf88913436d5112d16f588'
'46e56492cccb1c9172ed3a235cf43c6c' '7da8c554a3b591c7401d7023b1928afc'
'c5de2a946215d647c8af5432ec4b0da0' 'c5de2a946215d647c8af5432ec4b0da0'
'55febbb72139ac7b65757df085024b83' '55febbb72139ac7b65757df085024b83'
'b587ee3a70c9b3713099295609afde49' 'b587ee3a70c9b3713099295609afde49'
@ -100,11 +99,12 @@ build() {
# http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html # http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.patch patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.patch
# This fixes the main segfault but not the assert fail (FS#24615) # Revert commit causing issues with crappy DNS servers...
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=57912a71 # Will be removed when workaround becomes annoying to maintain - USE A BETTER DNS SERVER!
#patch -Np1 -i ${srcdir}/glibc-2.14-fix-resolver-crash-typo.patch # Note that both these patches do not fix the issue completely:
# resort to reverting the bad commit completely for the moment # http://sourceware.org/bugzilla/show_bug.cgi?id=13013
patch -Np1 -i ${srcdir}/glibc-2.14-revert-4462fad3.patch # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=032c0ee3 (only fedora branch...)
patch -Np1 -i ${srcdir}/glibc-2.14-revert-4768ae77.patch
# re-export RPC interface until libtirpc is ready as a replacement # re-export RPC interface until libtirpc is ready as a replacement
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...) # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
@ -130,6 +130,10 @@ build() {
echo "slibdir=/lib" >> configparms echo "slibdir=/lib" >> configparms
# remove hardening options from CFLAGS for building libraries
CFLAGS=${CFLAGS/-fstack-protector/}
CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
${srcdir}/glibc/configure --prefix=/usr \ ${srcdir}/glibc/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \ --libdir=/usr/lib --libexecdir=/usr/lib \
--with-headers=/usr/include \ --with-headers=/usr/include \
@ -140,7 +144,18 @@ build() {
--without-cvs --disable-profile \ --without-cvs --disable-profile \
--disable-multi-arch $CONFIGFLAG --disable-multi-arch $CONFIGFLAG
# build libraries with hardening disabled
echo "build-programs=no" >> configparms
make $MAKEFLAG make $MAKEFLAG
# re-enable hardening for programs
sed -i "s#=no#=yes#" configparms
echo "CC += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
echo "CXX += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
make $MAKEFLAG
# remove harding in preparation to run test-suite
sed -i '2,4d' configparms
} }
check() { check() {
@ -204,3 +219,18 @@ package() {
lib/{libmemusage,libpcprofile,libSegFault}.so \ lib/{libmemusage,libpcprofile,libSegFault}.so \
usr/lib/{pt_chown,{audit,gconv}/*.so} usr/lib/{pt_chown,{audit,gconv}/*.so}
} }
md5sums=('c52a15134dfa9f2c94f2ccd4cb155cf1'
'3b3afcb6b99fea9e3a2474cc4778ec88'
'4dadb9203b69a3210d53514bb46f41c3'
'0c5540efc51c0b93996c51b57a8540ae'
'40cd342e21f71f5e49e32622b25acc52'
'a3ac6f318d680347bb6e2805d42b73b2'
'b042647ea7d6f22ad319e12e796bd13e'
'7d0154b7e17ea218c9fa953599d24cc4'
'6970bcfeb3bf88913436d5112d16f588'
'7da8c554a3b591c7401d7023b1928afc'
'c5de2a946215d647c8af5432ec4b0da0'
'55febbb72139ac7b65757df085024b83'
'b587ee3a70c9b3713099295609afde49'
'07ac979b6ab5eeb778d55f041529d623'
'476e9113489f93b348b21e144b6a8fcf')

View file

@ -55,7 +55,7 @@ index 9e30594..3890d00 100644
if (old_l_initfini != NULL) if (old_l_initfini != NULL)
- map->l_orig_initfini = old_l_initfini; - map->l_orig_initfini = old_l_initfini;
+ _dl_scope_free (old_l_initfini); + _dl_scope_free (old_l_initfini);
}
diff --git a/elf/dl-libc.c b/elf/dl-libc.c diff --git a/elf/dl-libc.c b/elf/dl-libc.c
index 7be9483..a13fce3 100644 index 7be9483..a13fce3 100644
--- a/elf/dl-libc.c --- a/elf/dl-libc.c

View file

@ -5,7 +5,7 @@ diff -Naur glibc-orig//resolv/res_send.c glibc/resolv/res_send.c
ns, ansp, ansp2, nansp2, resplen2); ns, ansp, ansp2, nansp2, resplen2);
if (n < 0) if (n < 0)
return (-1); return (-1);
- if (n == 0 && (buf2 == NULL || resplen2 == 0)) - if (n == 0 && (buf2 == NULL || *resplen2 == 0))
+ if (n == 0) + if (n == 0)
goto next_ns; goto next_ns;
} else { } else {
@ -14,7 +14,7 @@ diff -Naur glibc-orig//resolv/res_send.c glibc/resolv/res_send.c
ansp2, nansp2, resplen2); ansp2, nansp2, resplen2);
if (n < 0) if (n < 0)
return (-1); return (-1);
- if (n == 0 && (buf2 == NULL || resplen2 == 0)) - if (n == 0 && (buf2 == NULL || *resplen2 == 0))
+ if (n == 0) + if (n == 0)
goto next_ns; goto next_ns;
if (v_circuit) if (v_circuit)