[arch-commits] Commit in glibc/repos (22 files)

Allan McRae allan at archlinux.org
Wed Jul 4 01:13:22 UTC 2012


    Date: Tuesday, July 3, 2012 @ 21:13:22
  Author: allan
Revision: 162943

db-move: moved glibc from [staging] to [testing] ( i686,  x86_64)

Added:
  glibc/repos/testing-i686/
  glibc/repos/testing-i686/PKGBUILD
    (from rev 162938, glibc/repos/staging-i686/PKGBUILD)
  glibc/repos/testing-i686/glibc-2.15-fix-res_query-assert.patch
    (from rev 162938, glibc/repos/staging-i686/glibc-2.15-fix-res_query-assert.patch)
  glibc/repos/testing-i686/glibc-2.15-revert-c5a0802a.patch
    (from rev 162938, glibc/repos/staging-i686/glibc-2.15-revert-c5a0802a.patch)
  glibc/repos/testing-i686/glibc.install
    (from rev 162938, glibc/repos/staging-i686/glibc.install)
  glibc/repos/testing-i686/locale-gen
    (from rev 162938, glibc/repos/staging-i686/locale-gen)
  glibc/repos/testing-i686/locale.gen.txt
    (from rev 162938, glibc/repos/staging-i686/locale.gen.txt)
  glibc/repos/testing-i686/nscd.rcd
    (from rev 162938, glibc/repos/staging-i686/nscd.rcd)
  glibc/repos/testing-i686/nscd.service
    (from rev 162938, glibc/repos/staging-i686/nscd.service)
  glibc/repos/testing-i686/nscd.tmpfiles
    (from rev 162938, glibc/repos/staging-i686/nscd.tmpfiles)
  glibc/repos/testing-x86_64/
  glibc/repos/testing-x86_64/PKGBUILD
    (from rev 162938, glibc/repos/staging-x86_64/PKGBUILD)
  glibc/repos/testing-x86_64/glibc-2.15-fix-res_query-assert.patch
    (from rev 162938, glibc/repos/staging-x86_64/glibc-2.15-fix-res_query-assert.patch)
  glibc/repos/testing-x86_64/glibc-2.15-revert-c5a0802a.patch
    (from rev 162938, glibc/repos/staging-x86_64/glibc-2.15-revert-c5a0802a.patch)
  glibc/repos/testing-x86_64/glibc.install
    (from rev 162938, glibc/repos/staging-x86_64/glibc.install)
  glibc/repos/testing-x86_64/locale-gen
    (from rev 162938, glibc/repos/staging-x86_64/locale-gen)
  glibc/repos/testing-x86_64/locale.gen.txt
    (from rev 162938, glibc/repos/staging-x86_64/locale.gen.txt)
  glibc/repos/testing-x86_64/nscd.rcd
    (from rev 162938, glibc/repos/staging-x86_64/nscd.rcd)
  glibc/repos/testing-x86_64/nscd.service
    (from rev 162938, glibc/repos/staging-x86_64/nscd.service)
  glibc/repos/testing-x86_64/nscd.tmpfiles
    (from rev 162938, glibc/repos/staging-x86_64/nscd.tmpfiles)
Deleted:
  glibc/repos/staging-i686/
  glibc/repos/staging-x86_64/

------------------------------------------------------+
 testing-i686/PKGBUILD                                |  151 +++++++++++
 testing-i686/glibc-2.15-fix-res_query-assert.patch   |   51 +++
 testing-i686/glibc-2.15-revert-c5a0802a.patch        |  226 +++++++++++++++++
 testing-i686/glibc.install                           |   20 +
 testing-i686/locale-gen                              |   42 +++
 testing-i686/locale.gen.txt                          |   23 +
 testing-i686/nscd.rcd                                |   65 ++++
 testing-i686/nscd.service                            |   17 +
 testing-i686/nscd.tmpfiles                           |    1 
 testing-x86_64/PKGBUILD                              |  151 +++++++++++
 testing-x86_64/glibc-2.15-fix-res_query-assert.patch |   51 +++
 testing-x86_64/glibc-2.15-revert-c5a0802a.patch      |  226 +++++++++++++++++
 testing-x86_64/glibc.install                         |   20 +
 testing-x86_64/locale-gen                            |   42 +++
 testing-x86_64/locale.gen.txt                        |   23 +
 testing-x86_64/nscd.rcd                              |   65 ++++
 testing-x86_64/nscd.service                          |   17 +
 testing-x86_64/nscd.tmpfiles                         |    1 
 18 files changed, 1192 insertions(+)

Copied: glibc/repos/testing-i686/PKGBUILD (from rev 162938, glibc/repos/staging-i686/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,151 @@
+# $Id$
+# Maintainer: Allan McRae <allan at archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+# NOTE: valgrind requires rebuilt with each major glibc version
+
+pkgname=glibc
+pkgver=2.16.0
+pkgrel=1
+pkgdesc="GNU C Library"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/libc"
+license=('GPL' 'LGPL')
+groups=('base')
+depends=('linux-api-headers>=3.4' 'tzdata')
+makedepends=('gcc>=4.7')
+backup=(etc/gai.conf
+        etc/locale.gen
+        etc/nscd.conf)
+options=('!strip')
+install=glibc.install
+source=(http://ftp.gnu.org/gnu/libc/${pkgname}-${pkgver}.tar.xz{,.sig}
+        glibc-2.15-fix-res_query-assert.patch
+        glibc-2.15-revert-c5a0802a.patch
+        nscd.rcd
+        nscd.service
+        nscd.tmpfiles
+        locale.gen.txt
+        locale-gen)
+md5sums=('80b181b02ab249524ec92822c0174cf7'
+         '2a1221a15575820751c325ef4d2fbb90'
+         '31f415b41197d85d3bbee3d1eecd06a3'
+         '0a0383d50d63f1c02919fe9943b82014'
+         '589d79041aa767a5179eaa4e2737dd3f'
+         'ad8a9af15ab7eeaa23dc7ee85024af9f'
+         'bccbe5619e75cf1d97312ec3681c605c'
+         '07ac979b6ab5eeb778d55f041529d623'
+         '476e9113489f93b348b21e144b6a8fcf')
+
+build() {
+  cd ${srcdir}/${pkgname}-${pkgver}
+
+  # fix res_query assertion
+  # http://sourceware.org/bugzilla/show_bug.cgi?id=13013
+  patch -p1 -i ${srcdir}/glibc-2.15-fix-res_query-assert.patch
+
+  # revert commit c5a0802a - causes various hangs
+  # https://bugzilla.redhat.com/show_bug.cgi?id=552960
+  patch -p1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch
+
+  cd ${srcdir}
+  mkdir glibc-build
+  cd glibc-build
+
+  if [[ ${CARCH} = "i686" ]]; then
+    # Hack to fix NPTL issues with Xen, only required on 32bit platforms
+    # TODO: make separate glibc-xen package for i686
+    export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
+  fi
+
+  echo "slibdir=/lib" >> configparms
+
+  # remove hardening options from CFLAGS for building libraries
+  CFLAGS=${CFLAGS/-fstack-protector/}
+  CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
+
+  ${srcdir}/${pkgname}-${pkgver}/configure --prefix=/usr \
+      --libdir=/usr/lib --libexecdir=/usr/lib \
+      --with-headers=/usr/include \
+      --enable-add-ons=nptl,libidn \
+      --enable-obsolete-rpc \
+      --enable-kernel=2.6.32 \
+      --enable-bind-now --disable-profile \
+      --enable-stackguard-randomization \
+      --enable-multi-arch
+
+  # build libraries with hardening disabled
+  echo "build-programs=no" >> configparms
+  make
+  
+  # re-enable hardening for programs
+  sed -i "/build-programs=/s#no#yes#" configparms
+  echo "CC += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
+  echo "CXX += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
+  make
+
+  # remove harding in preparation to run test-suite
+  sed -i '2,4d' configparms
+}
+
+check() {
+  cd ${srcdir}/glibc-build
+  make -k check
+}
+
+package() {
+  cd ${srcdir}/glibc-build
+
+  install -dm755 ${pkgdir}/etc
+  touch ${pkgdir}/etc/ld.so.conf
+
+  make install_root=${pkgdir} install
+
+  rm -f ${pkgdir}/etc/ld.so.{cache,conf}
+
+  install -dm755 ${pkgdir}/{etc/rc.d,usr/{sbin,lib/{,locale,systemd/system,tmpfiles.d}}}
+
+  install -m644 ${srcdir}/${pkgname}-${pkgver}/nscd/nscd.conf ${pkgdir}/etc/nscd.conf
+  sed -i -e 's/^\tserver-user/#\tserver-user/' ${pkgdir}/etc/nscd.conf
+  install -m755 ${srcdir}/nscd.rcd ${pkgdir}/etc/rc.d/nscd
+  install -m644 ${srcdir}/nscd.service ${pkgdir}/usr/lib/systemd/system
+  install -m644 ${srcdir}/nscd.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/nscd.conf
+
+  install -m644 ${srcdir}/${pkgname}-${pkgver}/posix/gai.conf ${pkgdir}/etc/gai.conf
+
+  install -m755 ${srcdir}/locale-gen ${pkgdir}/usr/sbin
+
+  # create /etc/locale.gen
+  install -m644 ${srcdir}/locale.gen.txt ${pkgdir}/etc/locale.gen
+  sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
+    ${srcdir}/glibc-2.16.0/localedata/SUPPORTED >> ${pkgdir}/etc/locale.gen
+
+  if [[ ${CARCH} = "x86_64" ]]; then
+    # fix paths and compliance with binary blobs...
+    sed -i '/RTLDLIST/s%lib64%lib%' ${pkgdir}/usr/bin/ldd
+    ln -s /lib ${pkgdir}/lib64
+  fi
+
+  # Do not strip the following files for improved debugging support
+  # ("improved" as in not breaking gdb and valgrind...):
+  #   ld-${pkgver}.so
+  #   libc-${pkgver}.so
+  #   libpthread-${pkgver}.so
+  #   libthread_db-1.0.so
+
+  cd $pkgdir
+  strip $STRIP_BINARIES sbin/{ldconfig,sln} \
+                        usr/bin/{gencat,getconf,getent,iconv,locale,localedef} \
+                        usr/bin/{makedb,pcprofiledump,pldd,rpcgen,sprof} \
+                        usr/lib/getconf/* \
+                        usr/sbin/{iconvconfig,nscd}
+  [[ $CARCH = "i686" ]] && strip $STRIP_BINARIES usr/bin/lddlibc4
+
+  strip $STRIP_STATIC usr/lib/*.a
+
+  strip $STRIP_SHARED lib/{libanl,libBrokenLocale,libcidn,libcrypt}-*.so \
+                      lib/libnss_{compat,db,dns,files,hesiod,nis,nisplus}-*.so \
+                      lib/{libdl,libm,libnsl,libresolv,librt,libutil}-*.so \
+                      lib/{libmemusage,libpcprofile,libSegFault}.so \
+                      usr/lib/{pt_chown,{audit,gconv}/*.so}
+}

Copied: glibc/repos/testing-i686/glibc-2.15-fix-res_query-assert.patch (from rev 162938, glibc/repos/staging-i686/glibc-2.15-fix-res_query-assert.patch)
===================================================================
--- testing-i686/glibc-2.15-fix-res_query-assert.patch	                        (rev 0)
+++ testing-i686/glibc-2.15-fix-res_query-assert.patch	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,51 @@
+--- a/resolv/res_query.c	
++++ a/resolv/res_query.c	
+@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp,
+ 		  int *resplen2)
+ {
+ 	HEADER *hp = (HEADER *) answer;
++	HEADER *hp2;
+ 	int n, use_malloc = 0;
+ 	u_int oflags = statp->_flags;
+ 
+@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp,
+ 	  /* __libc_res_nsend might have reallocated the buffer.  */
+ 	  hp = (HEADER *) *answerp;
+ 
+-	/* We simplify the following tests by assigning HP to HP2.  It
+-	   is easy to verify that this is the same as ignoring all
+-	   tests of HP2.  */
+-	HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
+-
+-	if (n < (int) sizeof (HEADER) && answerp2 != NULL
+-	    && *resplen2 > (int) sizeof (HEADER))
++	/* We simplify the following tests by assigning HP to HP2 or
++	   vice versa.  It is easy to verify that this is the same as
++	   ignoring all tests of HP or HP2.  */
++	if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
+ 	  {
+-	    /* Special case of partial answer.  */
+-	    assert (hp != hp2);
+-	    hp = hp2;
++	    hp2 = hp;
+ 	  }
+-	else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
+-		 && n > (int) sizeof (HEADER))
++	else
+ 	  {
+-	    /* Special case of partial answer.  */
+-	    assert (hp != hp2);
+-	    hp2 = hp;
++	    hp2 = (HEADER *) *answerp2;
++	    if (n < (int) sizeof (HEADER))
++	      {
++	        hp = hp2;
++	      }
+ 	  }
+ 
++	/* Make sure both hp and hp2 are defined */
++	assert((hp != NULL) && (hp2 != NULL));
++
+ 	if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
+ 	    && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
+ #ifdef DEBUG

Copied: glibc/repos/testing-i686/glibc-2.15-revert-c5a0802a.patch (from rev 162938, glibc/repos/staging-i686/glibc-2.15-revert-c5a0802a.patch)
===================================================================
--- testing-i686/glibc-2.15-revert-c5a0802a.patch	                        (rev 0)
+++ testing-i686/glibc-2.15-revert-c5a0802a.patch	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,226 @@
+diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S	2011-12-22 18:04:12.937212834 +0000
++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S	2011-12-22 18:04:42.104222278 +0000
+@@ -137,7 +137,6 @@ __pthread_cond_wait:
+ 	cmpl	$PI_BIT, %eax
+ 	jne	18f
+ 
+-90:
+ 	movl	$(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ 	movl	%ebp, %edx
+ 	xorl	%esi, %esi
+@@ -151,9 +150,6 @@ __pthread_cond_wait:
+ 	sete	16(%esp)
+ 	je	19f
+ 
+-	cmpl	$-EAGAIN, %eax
+-	je	91f
+-
+ 	/* Normal and PI futexes dont mix. Use normal futex functions only
+ 	   if the kernel does not support the PI futex functions.  */
+ 	cmpl	$-ENOSYS, %eax
+@@ -398,78 +394,6 @@ __pthread_cond_wait:
+ #endif
+ 	call	__lll_unlock_wake
+ 	jmp	11b
+-
+-91:
+-.LcleanupSTART2:
+-	/* FUTEX_WAIT_REQUEUE_PI returned EAGAIN.  We need to
+-	   call it again.  */
+-
+-	/* Get internal lock.  */
+-	movl	$1, %edx
+-	xorl	%eax, %eax
+-	LOCK
+-#if cond_lock == 0
+-	cmpxchgl %edx, (%ebx)
+-#else
+-	cmpxchgl %edx, cond_lock(%ebx)
+-#endif
+-	jz	92f
+-
+-#if cond_lock == 0
+-	movl	%ebx, %edx
+-#else
+-	leal	cond_lock(%ebx), %edx
+-#endif
+-#if (LLL_SHARED-LLL_PRIVATE) > 255
+-	xorl	%ecx, %ecx
+-#endif
+-	cmpl	$-1, dep_mutex(%ebx)
+-	setne	%cl
+-	subl	$1, %ecx
+-	andl	$(LLL_SHARED-LLL_PRIVATE), %ecx
+-#if LLL_PRIVATE != 0
+-	addl	$LLL_PRIVATE, %ecx
+-#endif
+-	call	__lll_lock_wait
+-
+-92:
+-	/* Increment the cond_futex value again, so it can be used as a new
+-	   expected value. */
+-	addl	$1, cond_futex(%ebx)
+-	movl	cond_futex(%ebx), %ebp
+-
+-	/* Unlock.  */
+-	LOCK
+-#if cond_lock == 0
+-	subl	$1, (%ebx)
+-#else
+-	subl	$1, cond_lock(%ebx)
+-#endif
+-	je	93f
+-#if cond_lock == 0
+-	movl	%ebx, %eax
+-#else
+-	leal	cond_lock(%ebx), %eax
+-#endif
+-#if (LLL_SHARED-LLL_PRIVATE) > 255
+-	xorl	%ecx, %ecx
+-#endif
+-	cmpl	$-1, dep_mutex(%ebx)
+-	setne	%cl
+-	subl	$1, %ecx
+-	andl	$(LLL_SHARED-LLL_PRIVATE), %ecx
+-#if LLL_PRIVATE != 0
+-	addl	$LLL_PRIVATE, %ecx
+-#endif
+-	call	__lll_unlock_wake
+-
+-93:
+-	/* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+-	xorl	%ecx, %ecx
+-	movl	dep_mutex(%ebx), %edi
+-	jmp	90b
+-.LcleanupEND2:
+-
+ 	.size	__pthread_cond_wait, .-__pthread_cond_wait
+ versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ 		  GLIBC_2_3_2)
+@@ -642,10 +566,6 @@ __condvar_w_cleanup:
+ 	.long	.LcleanupEND-.Lsub_cond_futex
+ 	.long	__condvar_w_cleanup-.LSTARTCODE
+ 	.uleb128  0
+-	.long	.LcleanupSTART2-.LSTARTCODE
+-	.long	.LcleanupEND2-.LcleanupSTART2
+-	.long	__condvar_w_cleanup-.LSTARTCODE
+-	.uleb128  0
+ 	.long	.LcallUR-.LSTARTCODE
+ 	.long	.LENDCODE-.LcallUR
+ 	.long	0
+Only in b/nptl/sysdeps/unix/sysv/linux/i386/i486: pthread_cond_wait.S.orig
+diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S	2011-12-22 18:04:12.941212837 +0000
++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S	2011-12-22 18:05:05.155229737 +0000
+@@ -23,7 +23,6 @@
+ #include <lowlevelcond.h>
+ #include <tcb-offsets.h>
+ #include <pthread-pi-defines.h>
+-#include <pthread-errnos.h>
+ #include <stap-probe.h>
+ 
+ #include <kernel-features.h>
+@@ -137,14 +136,11 @@ __pthread_cond_wait:
+ 	cmpl	$PI_BIT, %eax
+ 	jne	61f
+ 
+-90:
+ 	movl	$(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
+ 	movl	$SYS_futex, %eax
+ 	syscall
+ 
+ 	movl	$1, %r8d
+-	cmpq	$-EAGAIN, %rax
+-	je	91f
+ #ifdef __ASSUME_REQUEUE_PI
+ 	jmp	62f
+ #else
+@@ -331,70 +327,6 @@ __pthread_cond_wait:
+ 
+ 13:	movq	%r10, %rax
+ 	jmp	14b
+-
+-91:
+-.LcleanupSTART2:
+-	/* FUTEX_WAIT_REQUEUE_PI returned EAGAIN.  We need to
+-	   call it again.  */
+-	movq	8(%rsp), %rdi
+-
+-	/* Get internal lock.  */
+-	movl	$1, %esi
+-	xorl	%eax, %eax
+-	LOCK
+-#if cond_lock == 0
+-	cmpxchgl %esi, (%rdi)
+-#else
+-	cmpxchgl %esi, cond_lock(%rdi)
+-#endif
+-	jz	92f
+-
+-#if cond_lock != 0
+-	addq	$cond_lock, %rdi
+-#endif
+-	LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
+-	movl	$LLL_PRIVATE, %eax
+-	movl	$LLL_SHARED, %esi
+-	cmovne	%eax, %esi
+-	callq	__lll_lock_wait
+-#if cond_lock != 0
+-	subq	$cond_lock, %rdi
+-#endif
+-92:
+-	/* Increment the cond_futex value again, so it can be used as a new
+-	   expected value. */
+-	incl	cond_futex(%rdi)
+-	movl	cond_futex(%rdi), %edx
+-
+-	/* Release internal lock.  */
+-	LOCK
+-#if cond_lock == 0
+-	decl	(%rdi)
+-#else
+-	decl	cond_lock(%rdi)
+-#endif
+-	jz	93f
+-
+-#if cond_lock != 0
+-	addq	$cond_lock, %rdi
+-#endif
+-	LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
+-	movl	$LLL_PRIVATE, %eax
+-	movl	$LLL_SHARED, %esi
+-	cmovne	%eax, %esi
+-	/* The call preserves %rdx.  */
+-	callq	__lll_unlock_wake
+-#if cond_lock != 0
+-	subq	$cond_lock, %rdi
+-#endif
+-93:
+-	/* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+-	xorq	%r10, %r10
+-	mov	dep_mutex(%rdi), %R8_LP
+-	leaq	cond_futex(%rdi), %rdi
+-	jmp	90b
+-.LcleanupEND2:
+-
+ 	.size	__pthread_cond_wait, .-__pthread_cond_wait
+ versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ 		  GLIBC_2_3_2)
+@@ -547,15 +479,11 @@ __condvar_cleanup1:
+ 	.uleb128 .LcleanupSTART-.LSTARTCODE
+ 	.uleb128 .LcleanupEND-.LcleanupSTART
+ 	.uleb128 __condvar_cleanup1-.LSTARTCODE
+-	.uleb128 0
+-	.uleb128 .LcleanupSTART2-.LSTARTCODE
+-	.uleb128 .LcleanupEND2-.LcleanupSTART2
+-	.uleb128 __condvar_cleanup1-.LSTARTCODE
+-	.uleb128 0
++	.uleb128  0
+ 	.uleb128 .LcallUR-.LSTARTCODE
+ 	.uleb128 .LENDCODE-.LcallUR
+ 	.uleb128 0
+-	.uleb128 0
++	.uleb128  0
+ .Lcstend:
+ 

Copied: glibc/repos/testing-i686/glibc.install (from rev 162938, glibc/repos/staging-i686/glibc.install)
===================================================================
--- testing-i686/glibc.install	                        (rev 0)
+++ testing-i686/glibc.install	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(libc.info{,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11})
+
+post_upgrade() {
+  sbin/ldconfig -r .
+  [ -x sbin/init ] && sbin/init u
+  usr/sbin/locale-gen
+  
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    usr/bin/install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+  done
+}
+
+pre_remove() {
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    usr/bin/install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+  done
+}

Copied: glibc/repos/testing-i686/locale-gen (from rev 162938, glibc/repos/staging-i686/locale-gen)
===================================================================
--- testing-i686/locale-gen	                        (rev 0)
+++ testing-i686/locale-gen	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+set -e
+
+LOCALEGEN=/etc/locale.gen
+LOCALES=/usr/share/i18n/locales
+if [ -n "$POSIXLY_CORRECT" ]; then
+  unset POSIXLY_CORRECT
+fi
+
+
+[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
+
+# Remove all old locale dir and locale-archive before generating new
+# locale data.
+rm -rf /usr/lib/locale/* || true
+
+umask 022
+
+is_entry_ok() {
+  if [ -n "$locale" -a -n "$charset" ] ; then
+    true
+  else
+    echo "error: Bad entry '$locale $charset'"
+    false
+  fi
+}
+
+echo "Generating locales..."
+while read locale charset; do \
+	case $locale in \#*) continue;; "") continue;; esac; \
+	is_entry_ok || continue
+	echo -n "  `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
+	echo -n ".$charset"; \
+	echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
+	echo -n '...'; \
+        if [ -f $LOCALES/$locale ]; then input=$locale; else \
+        input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \
+	localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
+	echo ' done'; \
+done < $LOCALEGEN
+echo "Generation complete."

Copied: glibc/repos/testing-i686/locale.gen.txt (from rev 162938, glibc/repos/staging-i686/locale.gen.txt)
===================================================================
--- testing-i686/locale.gen.txt	                        (rev 0)
+++ testing-i686/locale.gen.txt	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,23 @@
+# Configuration file for locale-gen
+#
+# lists of locales that are to be generated by the locale-gen command.
+#
+# Each line is of the form:
+#
+#     <locale> <charset>
+#
+#  where <locale> is one of the locales given in /usr/share/i18n/locales
+#  and <charset> is one of the character sets listed in /usr/share/i18n/charmaps
+#
+#  Examples:
+#  en_US ISO-8859-1
+#  en_US.UTF-8 UTF-8
+#  de_DE ISO-8859-1
+#  de_DE at euro ISO-8859-15
+#
+#  The locale-gen command will generate all the locales,
+#  placing them in /usr/lib/locale.
+#
+#  A list of supported locales is included in this file.
+#  Uncomment the ones you need.
+#

Copied: glibc/repos/testing-i686/nscd.rcd (from rev 162938, glibc/repos/staging-i686/nscd.rcd)
===================================================================
--- testing-i686/nscd.rcd	                        (rev 0)
+++ testing-i686/nscd.rcd	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+daemon_name="nscd"
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+
+get_pid() {
+	pidof -o %PPID $daemon_name
+}
+
+case "$1" in
+	start)
+		stat_busy "Starting $daemon_name daemon"
+		PID=$(get_pid)
+		if [[ -z $PID ]]; then
+			rm -f /run/$daemon_name.pid
+			mkdir -p /run/nscd /var/db/nscd
+			rm -f /run/nscd/* /var/db/nscd/*
+			$daemon_name
+			if (( $? > 0 )); then
+				stat_fail
+				exit 1
+			else
+				echo $(get_pid) > /var/run/$daemon_name.pid
+				add_daemon $daemon_name
+				stat_done
+			fi
+		else
+			stat_fail
+			exit 1
+		fi
+		;;
+
+	stop)
+		stat_busy "Stopping $daemon_name daemon"
+		PID=$(get_pid)
+		[[ -n $PID ]] && nscd --shutdown &> /dev/null
+		if (( $? > 0 )); then
+			stat_fail
+			exit 1
+		else
+			rm -f /run/$daemon_name.pid &> /dev/null
+			rm_daemon $daemon_name
+			stat_done
+		fi
+		;;
+
+	restart)
+		$0 stop
+		sleep 3
+		$0 start
+		;;
+
+	status)
+		stat_busy "Checking $daemon_name status";
+		ck_status $daemon_name
+		;;
+
+	*)
+		echo "usage: $0 {start|stop|restart|status}"
+esac
+
+exit 0

Copied: glibc/repos/testing-i686/nscd.service (from rev 162938, glibc/repos/staging-i686/nscd.service)
===================================================================
--- testing-i686/nscd.service	                        (rev 0)
+++ testing-i686/nscd.service	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,17 @@
+[Unit]
+Description=Name Service Cache Daemon
+After=syslog.target
+ 
+[Service]
+Type=forking
+ExecStart=/usr/sbin/nscd
+ExecStop=/usr/sbin/nscd --shutdown
+ExecReload=/usr/sbin/nscd -i passwd
+ExecReload=/usr/sbin/nscd -i group
+ExecReload=/usr/sbin/nscd -i hosts
+ExecReload=/usr/sbin/nscd -i service
+Restart=always
+PIDFile=/run/nscd/nscd.pid
+ 
+[Install]
+WantedBy=multi-user.target

Copied: glibc/repos/testing-i686/nscd.tmpfiles (from rev 162938, glibc/repos/staging-i686/nscd.tmpfiles)
===================================================================
--- testing-i686/nscd.tmpfiles	                        (rev 0)
+++ testing-i686/nscd.tmpfiles	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1 @@
+d /run/nscd 0755 root root

Copied: glibc/repos/testing-x86_64/PKGBUILD (from rev 162938, glibc/repos/staging-x86_64/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,151 @@
+# $Id$
+# Maintainer: Allan McRae <allan at archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+# NOTE: valgrind requires rebuilt with each major glibc version
+
+pkgname=glibc
+pkgver=2.16.0
+pkgrel=1
+pkgdesc="GNU C Library"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/libc"
+license=('GPL' 'LGPL')
+groups=('base')
+depends=('linux-api-headers>=3.4' 'tzdata')
+makedepends=('gcc>=4.7')
+backup=(etc/gai.conf
+        etc/locale.gen
+        etc/nscd.conf)
+options=('!strip')
+install=glibc.install
+source=(http://ftp.gnu.org/gnu/libc/${pkgname}-${pkgver}.tar.xz{,.sig}
+        glibc-2.15-fix-res_query-assert.patch
+        glibc-2.15-revert-c5a0802a.patch
+        nscd.rcd
+        nscd.service
+        nscd.tmpfiles
+        locale.gen.txt
+        locale-gen)
+md5sums=('80b181b02ab249524ec92822c0174cf7'
+         '2a1221a15575820751c325ef4d2fbb90'
+         '31f415b41197d85d3bbee3d1eecd06a3'
+         '0a0383d50d63f1c02919fe9943b82014'
+         '589d79041aa767a5179eaa4e2737dd3f'
+         'ad8a9af15ab7eeaa23dc7ee85024af9f'
+         'bccbe5619e75cf1d97312ec3681c605c'
+         '07ac979b6ab5eeb778d55f041529d623'
+         '476e9113489f93b348b21e144b6a8fcf')
+
+build() {
+  cd ${srcdir}/${pkgname}-${pkgver}
+
+  # fix res_query assertion
+  # http://sourceware.org/bugzilla/show_bug.cgi?id=13013
+  patch -p1 -i ${srcdir}/glibc-2.15-fix-res_query-assert.patch
+
+  # revert commit c5a0802a - causes various hangs
+  # https://bugzilla.redhat.com/show_bug.cgi?id=552960
+  patch -p1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch
+
+  cd ${srcdir}
+  mkdir glibc-build
+  cd glibc-build
+
+  if [[ ${CARCH} = "i686" ]]; then
+    # Hack to fix NPTL issues with Xen, only required on 32bit platforms
+    # TODO: make separate glibc-xen package for i686
+    export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
+  fi
+
+  echo "slibdir=/lib" >> configparms
+
+  # remove hardening options from CFLAGS for building libraries
+  CFLAGS=${CFLAGS/-fstack-protector/}
+  CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
+
+  ${srcdir}/${pkgname}-${pkgver}/configure --prefix=/usr \
+      --libdir=/usr/lib --libexecdir=/usr/lib \
+      --with-headers=/usr/include \
+      --enable-add-ons=nptl,libidn \
+      --enable-obsolete-rpc \
+      --enable-kernel=2.6.32 \
+      --enable-bind-now --disable-profile \
+      --enable-stackguard-randomization \
+      --enable-multi-arch
+
+  # build libraries with hardening disabled
+  echo "build-programs=no" >> configparms
+  make
+  
+  # re-enable hardening for programs
+  sed -i "/build-programs=/s#no#yes#" configparms
+  echo "CC += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
+  echo "CXX += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
+  make
+
+  # remove harding in preparation to run test-suite
+  sed -i '2,4d' configparms
+}
+
+check() {
+  cd ${srcdir}/glibc-build
+  make -k check
+}
+
+package() {
+  cd ${srcdir}/glibc-build
+
+  install -dm755 ${pkgdir}/etc
+  touch ${pkgdir}/etc/ld.so.conf
+
+  make install_root=${pkgdir} install
+
+  rm -f ${pkgdir}/etc/ld.so.{cache,conf}
+
+  install -dm755 ${pkgdir}/{etc/rc.d,usr/{sbin,lib/{,locale,systemd/system,tmpfiles.d}}}
+
+  install -m644 ${srcdir}/${pkgname}-${pkgver}/nscd/nscd.conf ${pkgdir}/etc/nscd.conf
+  sed -i -e 's/^\tserver-user/#\tserver-user/' ${pkgdir}/etc/nscd.conf
+  install -m755 ${srcdir}/nscd.rcd ${pkgdir}/etc/rc.d/nscd
+  install -m644 ${srcdir}/nscd.service ${pkgdir}/usr/lib/systemd/system
+  install -m644 ${srcdir}/nscd.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/nscd.conf
+
+  install -m644 ${srcdir}/${pkgname}-${pkgver}/posix/gai.conf ${pkgdir}/etc/gai.conf
+
+  install -m755 ${srcdir}/locale-gen ${pkgdir}/usr/sbin
+
+  # create /etc/locale.gen
+  install -m644 ${srcdir}/locale.gen.txt ${pkgdir}/etc/locale.gen
+  sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
+    ${srcdir}/glibc-2.16.0/localedata/SUPPORTED >> ${pkgdir}/etc/locale.gen
+
+  if [[ ${CARCH} = "x86_64" ]]; then
+    # fix paths and compliance with binary blobs...
+    sed -i '/RTLDLIST/s%lib64%lib%' ${pkgdir}/usr/bin/ldd
+    ln -s /lib ${pkgdir}/lib64
+  fi
+
+  # Do not strip the following files for improved debugging support
+  # ("improved" as in not breaking gdb and valgrind...):
+  #   ld-${pkgver}.so
+  #   libc-${pkgver}.so
+  #   libpthread-${pkgver}.so
+  #   libthread_db-1.0.so
+
+  cd $pkgdir
+  strip $STRIP_BINARIES sbin/{ldconfig,sln} \
+                        usr/bin/{gencat,getconf,getent,iconv,locale,localedef} \
+                        usr/bin/{makedb,pcprofiledump,pldd,rpcgen,sprof} \
+                        usr/lib/getconf/* \
+                        usr/sbin/{iconvconfig,nscd}
+  [[ $CARCH = "i686" ]] && strip $STRIP_BINARIES usr/bin/lddlibc4
+
+  strip $STRIP_STATIC usr/lib/*.a
+
+  strip $STRIP_SHARED lib/{libanl,libBrokenLocale,libcidn,libcrypt}-*.so \
+                      lib/libnss_{compat,db,dns,files,hesiod,nis,nisplus}-*.so \
+                      lib/{libdl,libm,libnsl,libresolv,librt,libutil}-*.so \
+                      lib/{libmemusage,libpcprofile,libSegFault}.so \
+                      usr/lib/{pt_chown,{audit,gconv}/*.so}
+}

Copied: glibc/repos/testing-x86_64/glibc-2.15-fix-res_query-assert.patch (from rev 162938, glibc/repos/staging-x86_64/glibc-2.15-fix-res_query-assert.patch)
===================================================================
--- testing-x86_64/glibc-2.15-fix-res_query-assert.patch	                        (rev 0)
+++ testing-x86_64/glibc-2.15-fix-res_query-assert.patch	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,51 @@
+--- a/resolv/res_query.c	
++++ a/resolv/res_query.c	
+@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp,
+ 		  int *resplen2)
+ {
+ 	HEADER *hp = (HEADER *) answer;
++	HEADER *hp2;
+ 	int n, use_malloc = 0;
+ 	u_int oflags = statp->_flags;
+ 
+@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp,
+ 	  /* __libc_res_nsend might have reallocated the buffer.  */
+ 	  hp = (HEADER *) *answerp;
+ 
+-	/* We simplify the following tests by assigning HP to HP2.  It
+-	   is easy to verify that this is the same as ignoring all
+-	   tests of HP2.  */
+-	HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
+-
+-	if (n < (int) sizeof (HEADER) && answerp2 != NULL
+-	    && *resplen2 > (int) sizeof (HEADER))
++	/* We simplify the following tests by assigning HP to HP2 or
++	   vice versa.  It is easy to verify that this is the same as
++	   ignoring all tests of HP or HP2.  */
++	if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
+ 	  {
+-	    /* Special case of partial answer.  */
+-	    assert (hp != hp2);
+-	    hp = hp2;
++	    hp2 = hp;
+ 	  }
+-	else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
+-		 && n > (int) sizeof (HEADER))
++	else
+ 	  {
+-	    /* Special case of partial answer.  */
+-	    assert (hp != hp2);
+-	    hp2 = hp;
++	    hp2 = (HEADER *) *answerp2;
++	    if (n < (int) sizeof (HEADER))
++	      {
++	        hp = hp2;
++	      }
+ 	  }
+ 
++	/* Make sure both hp and hp2 are defined */
++	assert((hp != NULL) && (hp2 != NULL));
++
+ 	if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
+ 	    && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
+ #ifdef DEBUG

Copied: glibc/repos/testing-x86_64/glibc-2.15-revert-c5a0802a.patch (from rev 162938, glibc/repos/staging-x86_64/glibc-2.15-revert-c5a0802a.patch)
===================================================================
--- testing-x86_64/glibc-2.15-revert-c5a0802a.patch	                        (rev 0)
+++ testing-x86_64/glibc-2.15-revert-c5a0802a.patch	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,226 @@
+diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S	2011-12-22 18:04:12.937212834 +0000
++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S	2011-12-22 18:04:42.104222278 +0000
+@@ -137,7 +137,6 @@ __pthread_cond_wait:
+ 	cmpl	$PI_BIT, %eax
+ 	jne	18f
+ 
+-90:
+ 	movl	$(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ 	movl	%ebp, %edx
+ 	xorl	%esi, %esi
+@@ -151,9 +150,6 @@ __pthread_cond_wait:
+ 	sete	16(%esp)
+ 	je	19f
+ 
+-	cmpl	$-EAGAIN, %eax
+-	je	91f
+-
+ 	/* Normal and PI futexes dont mix. Use normal futex functions only
+ 	   if the kernel does not support the PI futex functions.  */
+ 	cmpl	$-ENOSYS, %eax
+@@ -398,78 +394,6 @@ __pthread_cond_wait:
+ #endif
+ 	call	__lll_unlock_wake
+ 	jmp	11b
+-
+-91:
+-.LcleanupSTART2:
+-	/* FUTEX_WAIT_REQUEUE_PI returned EAGAIN.  We need to
+-	   call it again.  */
+-
+-	/* Get internal lock.  */
+-	movl	$1, %edx
+-	xorl	%eax, %eax
+-	LOCK
+-#if cond_lock == 0
+-	cmpxchgl %edx, (%ebx)
+-#else
+-	cmpxchgl %edx, cond_lock(%ebx)
+-#endif
+-	jz	92f
+-
+-#if cond_lock == 0
+-	movl	%ebx, %edx
+-#else
+-	leal	cond_lock(%ebx), %edx
+-#endif
+-#if (LLL_SHARED-LLL_PRIVATE) > 255
+-	xorl	%ecx, %ecx
+-#endif
+-	cmpl	$-1, dep_mutex(%ebx)
+-	setne	%cl
+-	subl	$1, %ecx
+-	andl	$(LLL_SHARED-LLL_PRIVATE), %ecx
+-#if LLL_PRIVATE != 0
+-	addl	$LLL_PRIVATE, %ecx
+-#endif
+-	call	__lll_lock_wait
+-
+-92:
+-	/* Increment the cond_futex value again, so it can be used as a new
+-	   expected value. */
+-	addl	$1, cond_futex(%ebx)
+-	movl	cond_futex(%ebx), %ebp
+-
+-	/* Unlock.  */
+-	LOCK
+-#if cond_lock == 0
+-	subl	$1, (%ebx)
+-#else
+-	subl	$1, cond_lock(%ebx)
+-#endif
+-	je	93f
+-#if cond_lock == 0
+-	movl	%ebx, %eax
+-#else
+-	leal	cond_lock(%ebx), %eax
+-#endif
+-#if (LLL_SHARED-LLL_PRIVATE) > 255
+-	xorl	%ecx, %ecx
+-#endif
+-	cmpl	$-1, dep_mutex(%ebx)
+-	setne	%cl
+-	subl	$1, %ecx
+-	andl	$(LLL_SHARED-LLL_PRIVATE), %ecx
+-#if LLL_PRIVATE != 0
+-	addl	$LLL_PRIVATE, %ecx
+-#endif
+-	call	__lll_unlock_wake
+-
+-93:
+-	/* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+-	xorl	%ecx, %ecx
+-	movl	dep_mutex(%ebx), %edi
+-	jmp	90b
+-.LcleanupEND2:
+-
+ 	.size	__pthread_cond_wait, .-__pthread_cond_wait
+ versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ 		  GLIBC_2_3_2)
+@@ -642,10 +566,6 @@ __condvar_w_cleanup:
+ 	.long	.LcleanupEND-.Lsub_cond_futex
+ 	.long	__condvar_w_cleanup-.LSTARTCODE
+ 	.uleb128  0
+-	.long	.LcleanupSTART2-.LSTARTCODE
+-	.long	.LcleanupEND2-.LcleanupSTART2
+-	.long	__condvar_w_cleanup-.LSTARTCODE
+-	.uleb128  0
+ 	.long	.LcallUR-.LSTARTCODE
+ 	.long	.LENDCODE-.LcallUR
+ 	.long	0
+Only in b/nptl/sysdeps/unix/sysv/linux/i386/i486: pthread_cond_wait.S.orig
+diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S	2011-12-22 18:04:12.941212837 +0000
++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S	2011-12-22 18:05:05.155229737 +0000
+@@ -23,7 +23,6 @@
+ #include <lowlevelcond.h>
+ #include <tcb-offsets.h>
+ #include <pthread-pi-defines.h>
+-#include <pthread-errnos.h>
+ #include <stap-probe.h>
+ 
+ #include <kernel-features.h>
+@@ -137,14 +136,11 @@ __pthread_cond_wait:
+ 	cmpl	$PI_BIT, %eax
+ 	jne	61f
+ 
+-90:
+ 	movl	$(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
+ 	movl	$SYS_futex, %eax
+ 	syscall
+ 
+ 	movl	$1, %r8d
+-	cmpq	$-EAGAIN, %rax
+-	je	91f
+ #ifdef __ASSUME_REQUEUE_PI
+ 	jmp	62f
+ #else
+@@ -331,70 +327,6 @@ __pthread_cond_wait:
+ 
+ 13:	movq	%r10, %rax
+ 	jmp	14b
+-
+-91:
+-.LcleanupSTART2:
+-	/* FUTEX_WAIT_REQUEUE_PI returned EAGAIN.  We need to
+-	   call it again.  */
+-	movq	8(%rsp), %rdi
+-
+-	/* Get internal lock.  */
+-	movl	$1, %esi
+-	xorl	%eax, %eax
+-	LOCK
+-#if cond_lock == 0
+-	cmpxchgl %esi, (%rdi)
+-#else
+-	cmpxchgl %esi, cond_lock(%rdi)
+-#endif
+-	jz	92f
+-
+-#if cond_lock != 0
+-	addq	$cond_lock, %rdi
+-#endif
+-	LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
+-	movl	$LLL_PRIVATE, %eax
+-	movl	$LLL_SHARED, %esi
+-	cmovne	%eax, %esi
+-	callq	__lll_lock_wait
+-#if cond_lock != 0
+-	subq	$cond_lock, %rdi
+-#endif
+-92:
+-	/* Increment the cond_futex value again, so it can be used as a new
+-	   expected value. */
+-	incl	cond_futex(%rdi)
+-	movl	cond_futex(%rdi), %edx
+-
+-	/* Release internal lock.  */
+-	LOCK
+-#if cond_lock == 0
+-	decl	(%rdi)
+-#else
+-	decl	cond_lock(%rdi)
+-#endif
+-	jz	93f
+-
+-#if cond_lock != 0
+-	addq	$cond_lock, %rdi
+-#endif
+-	LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
+-	movl	$LLL_PRIVATE, %eax
+-	movl	$LLL_SHARED, %esi
+-	cmovne	%eax, %esi
+-	/* The call preserves %rdx.  */
+-	callq	__lll_unlock_wake
+-#if cond_lock != 0
+-	subq	$cond_lock, %rdi
+-#endif
+-93:
+-	/* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+-	xorq	%r10, %r10
+-	mov	dep_mutex(%rdi), %R8_LP
+-	leaq	cond_futex(%rdi), %rdi
+-	jmp	90b
+-.LcleanupEND2:
+-
+ 	.size	__pthread_cond_wait, .-__pthread_cond_wait
+ versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ 		  GLIBC_2_3_2)
+@@ -547,15 +479,11 @@ __condvar_cleanup1:
+ 	.uleb128 .LcleanupSTART-.LSTARTCODE
+ 	.uleb128 .LcleanupEND-.LcleanupSTART
+ 	.uleb128 __condvar_cleanup1-.LSTARTCODE
+-	.uleb128 0
+-	.uleb128 .LcleanupSTART2-.LSTARTCODE
+-	.uleb128 .LcleanupEND2-.LcleanupSTART2
+-	.uleb128 __condvar_cleanup1-.LSTARTCODE
+-	.uleb128 0
++	.uleb128  0
+ 	.uleb128 .LcallUR-.LSTARTCODE
+ 	.uleb128 .LENDCODE-.LcallUR
+ 	.uleb128 0
+-	.uleb128 0
++	.uleb128  0
+ .Lcstend:
+ 

Copied: glibc/repos/testing-x86_64/glibc.install (from rev 162938, glibc/repos/staging-x86_64/glibc.install)
===================================================================
--- testing-x86_64/glibc.install	                        (rev 0)
+++ testing-x86_64/glibc.install	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(libc.info{,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11})
+
+post_upgrade() {
+  sbin/ldconfig -r .
+  [ -x sbin/init ] && sbin/init u
+  usr/sbin/locale-gen
+  
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    usr/bin/install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+  done
+}
+
+pre_remove() {
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    usr/bin/install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+  done
+}

Copied: glibc/repos/testing-x86_64/locale-gen (from rev 162938, glibc/repos/staging-x86_64/locale-gen)
===================================================================
--- testing-x86_64/locale-gen	                        (rev 0)
+++ testing-x86_64/locale-gen	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+set -e
+
+LOCALEGEN=/etc/locale.gen
+LOCALES=/usr/share/i18n/locales
+if [ -n "$POSIXLY_CORRECT" ]; then
+  unset POSIXLY_CORRECT
+fi
+
+
+[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
+
+# Remove all old locale dir and locale-archive before generating new
+# locale data.
+rm -rf /usr/lib/locale/* || true
+
+umask 022
+
+is_entry_ok() {
+  if [ -n "$locale" -a -n "$charset" ] ; then
+    true
+  else
+    echo "error: Bad entry '$locale $charset'"
+    false
+  fi
+}
+
+echo "Generating locales..."
+while read locale charset; do \
+	case $locale in \#*) continue;; "") continue;; esac; \
+	is_entry_ok || continue
+	echo -n "  `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
+	echo -n ".$charset"; \
+	echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
+	echo -n '...'; \
+        if [ -f $LOCALES/$locale ]; then input=$locale; else \
+        input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \
+	localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
+	echo ' done'; \
+done < $LOCALEGEN
+echo "Generation complete."

Copied: glibc/repos/testing-x86_64/locale.gen.txt (from rev 162938, glibc/repos/staging-x86_64/locale.gen.txt)
===================================================================
--- testing-x86_64/locale.gen.txt	                        (rev 0)
+++ testing-x86_64/locale.gen.txt	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,23 @@
+# Configuration file for locale-gen
+#
+# lists of locales that are to be generated by the locale-gen command.
+#
+# Each line is of the form:
+#
+#     <locale> <charset>
+#
+#  where <locale> is one of the locales given in /usr/share/i18n/locales
+#  and <charset> is one of the character sets listed in /usr/share/i18n/charmaps
+#
+#  Examples:
+#  en_US ISO-8859-1
+#  en_US.UTF-8 UTF-8
+#  de_DE ISO-8859-1
+#  de_DE at euro ISO-8859-15
+#
+#  The locale-gen command will generate all the locales,
+#  placing them in /usr/lib/locale.
+#
+#  A list of supported locales is included in this file.
+#  Uncomment the ones you need.
+#

Copied: glibc/repos/testing-x86_64/nscd.rcd (from rev 162938, glibc/repos/staging-x86_64/nscd.rcd)
===================================================================
--- testing-x86_64/nscd.rcd	                        (rev 0)
+++ testing-x86_64/nscd.rcd	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+daemon_name="nscd"
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+
+get_pid() {
+	pidof -o %PPID $daemon_name
+}
+
+case "$1" in
+	start)
+		stat_busy "Starting $daemon_name daemon"
+		PID=$(get_pid)
+		if [[ -z $PID ]]; then
+			rm -f /run/$daemon_name.pid
+			mkdir -p /run/nscd /var/db/nscd
+			rm -f /run/nscd/* /var/db/nscd/*
+			$daemon_name
+			if (( $? > 0 )); then
+				stat_fail
+				exit 1
+			else
+				echo $(get_pid) > /var/run/$daemon_name.pid
+				add_daemon $daemon_name
+				stat_done
+			fi
+		else
+			stat_fail
+			exit 1
+		fi
+		;;
+
+	stop)
+		stat_busy "Stopping $daemon_name daemon"
+		PID=$(get_pid)
+		[[ -n $PID ]] && nscd --shutdown &> /dev/null
+		if (( $? > 0 )); then
+			stat_fail
+			exit 1
+		else
+			rm -f /run/$daemon_name.pid &> /dev/null
+			rm_daemon $daemon_name
+			stat_done
+		fi
+		;;
+
+	restart)
+		$0 stop
+		sleep 3
+		$0 start
+		;;
+
+	status)
+		stat_busy "Checking $daemon_name status";
+		ck_status $daemon_name
+		;;
+
+	*)
+		echo "usage: $0 {start|stop|restart|status}"
+esac
+
+exit 0

Copied: glibc/repos/testing-x86_64/nscd.service (from rev 162938, glibc/repos/staging-x86_64/nscd.service)
===================================================================
--- testing-x86_64/nscd.service	                        (rev 0)
+++ testing-x86_64/nscd.service	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1,17 @@
+[Unit]
+Description=Name Service Cache Daemon
+After=syslog.target
+ 
+[Service]
+Type=forking
+ExecStart=/usr/sbin/nscd
+ExecStop=/usr/sbin/nscd --shutdown
+ExecReload=/usr/sbin/nscd -i passwd
+ExecReload=/usr/sbin/nscd -i group
+ExecReload=/usr/sbin/nscd -i hosts
+ExecReload=/usr/sbin/nscd -i service
+Restart=always
+PIDFile=/run/nscd/nscd.pid
+ 
+[Install]
+WantedBy=multi-user.target

Copied: glibc/repos/testing-x86_64/nscd.tmpfiles (from rev 162938, glibc/repos/staging-x86_64/nscd.tmpfiles)
===================================================================
--- testing-x86_64/nscd.tmpfiles	                        (rev 0)
+++ testing-x86_64/nscd.tmpfiles	2012-07-04 01:13:22 UTC (rev 162943)
@@ -0,0 +1 @@
+d /run/nscd 0755 root root




More information about the arch-commits mailing list