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>
# 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>
# - Added source file for glibc-ports-2.14, needed for building on ARM
# - Symlink glibc-ports-2.14 source dir to ports dir in glibc directory
# - Added source file for glibc-ports, needed for building on ARM
# - Symlink glibc-ports source dir to ports dir in glibc directory
# - Changed configure to enable ports add-on, specify our build host type
# - Disabled distcc and ccache, make -j1 for v5, -j2 for v7
@ -14,9 +14,9 @@ plugrel=1
noautobuild=1
pkgname=glibc
pkgver=2.14
pkgrel=4
_glibcdate=20110617
pkgver=2.14.1
pkgrel=1
_glibcdate=20111025
pkgdesc="GNU C Library"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/libc"
@ -24,12 +24,13 @@ license=('GPL' 'LGPL')
groups=('base')
depends=('linux-api-headers>=3.0' 'tzdata')
makedepends=('gcc>=4.6')
backup=(etc/locale.gen
backup=(etc/gai.conf
etc/locale.gen
etc/nscd.conf)
options=('!strip' '!distcc' '!ccache')
install=glibc.install
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-bz4781.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.13-futex.patch
glibc-2.14-libdl-crash.patch
#glibc-2.14-fix-resolver-crash-typo.patch
glibc-2.14-revert-4462fad3.patch
glibc-2.14-revert-4768ae77.patch
glibc-2.14-reexport-rpc-interface.patch
glibc-2.14-reinstall-nis-rpc-headers.patch
nscd
locale.gen.txt
locale-gen)
md5sums=('e441d745609d93c907b72548ba646dad'
'ee80ed9e723a085099218f959a7e344b'
md5sums=('c52a15134dfa9f2c94f2ccd4cb155cf1'
'4dadb9203b69a3210d53514bb46f41c3'
'0c5540efc51c0b93996c51b57a8540ae'
'40cd342e21f71f5e49e32622b25acc52'
'a3ac6f318d680347bb6e2805d42b73b2'
'b042647ea7d6f22ad319e12e796bd13e'
'7d0154b7e17ea218c9fa953599d24cc4'
'cea62cc6b903d222c5f26e05a3c0e0e6'
'46e56492cccb1c9172ed3a235cf43c6c'
'6970bcfeb3bf88913436d5112d16f588'
'7da8c554a3b591c7401d7023b1928afc'
'c5de2a946215d647c8af5432ec4b0da0'
'55febbb72139ac7b65757df085024b83'
'b587ee3a70c9b3713099295609afde49'
@ -100,11 +99,12 @@ build() {
# http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.patch
# This fixes the main segfault but not the assert fail (FS#24615)
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=57912a71
#patch -Np1 -i ${srcdir}/glibc-2.14-fix-resolver-crash-typo.patch
# resort to reverting the bad commit completely for the moment
patch -Np1 -i ${srcdir}/glibc-2.14-revert-4462fad3.patch
# Revert commit causing issues with crappy DNS servers...
# Will be removed when workaround becomes annoying to maintain - USE A BETTER DNS SERVER!
# Note that both these patches do not fix the issue completely:
# http://sourceware.org/bugzilla/show_bug.cgi?id=13013
# 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
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
@ -130,6 +130,10 @@ build() {
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 \
--libdir=/usr/lib --libexecdir=/usr/lib \
--with-headers=/usr/include \
@ -139,8 +143,19 @@ build() {
--enable-bind-now --without-gd \
--without-cvs --disable-profile \
--disable-multi-arch $CONFIGFLAG
# build libraries with hardening disabled
echo "build-programs=no" >> configparms
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() {
@ -204,3 +219,18 @@ package() {
lib/{libmemusage,libpcprofile,libSegFault}.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)
- map->l_orig_initfini = old_l_initfini;
+ _dl_scope_free (old_l_initfini);
}
diff --git a/elf/dl-libc.c b/elf/dl-libc.c
index 7be9483..a13fce3 100644
--- 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);
if (n < 0)
return (-1);
- if (n == 0 && (buf2 == NULL || resplen2 == 0))
- if (n == 0 && (buf2 == NULL || *resplen2 == 0))
+ if (n == 0)
goto next_ns;
} else {
@ -14,7 +14,7 @@ diff -Naur glibc-orig//resolv/res_send.c glibc/resolv/res_send.c
ansp2, nansp2, resplen2);
if (n < 0)
return (-1);
- if (n == 0 && (buf2 == NULL || resplen2 == 0))
- if (n == 0 && (buf2 == NULL || *resplen2 == 0))
+ if (n == 0)
goto next_ns;
if (v_circuit)