fix phonon bug

This commit is contained in:
Phil 2011-10-26 09:30:58 +00:00
parent 85d6917979
commit 827facef75
6 changed files with 64 additions and 266 deletions

View File

@ -58,7 +58,7 @@ build() {
${_basedir}/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \
--mandir=/usr/share/man --infodir=/usr/share/info \
--with-bugurl=https://bugs.archlinux.org/ \
--with-bugurl=http://chakra-project.org/bugs/ \
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \
--enable-shared --enable-threads=posix \
--with-system-zlib --enable-__cxa_atexit \

View File

@ -5,51 +5,47 @@
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]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
pkgname=glibc
pkgver=2.14
pkgrel=6
_glibcdate=20110908
pkgver=2.14.1
pkgrel=1
_glibcdate=20111026
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.0' 'tzdata')
#makedepends=('gcc')
makedepends=('gcc>=4.6')
backup=(etc/gai.conf
etc/locale.gen
etc/nscd.conf)
options=('!strip')
install=glibc.install
# http://chakra-project.org/sources/${pkgname}/${pkgname}-${pkgver}.tar.xz
source=(http://chakra-project.org/sources/${pkgname}/${pkgname}-${pkgver}_${_glibcdate}.tar.xz
source=(http://chakra.sourceforge.net/sources/${pkgname}/${pkgname}-${pkgver}_${_glibcdate}.tar.xz
glibc-2.10-dont-build-timezone.patch
glibc-2.10-bz4781.patch
glibc-__i686.patch
glibc-2.12.1-static-shared-getpagesize.patch
glibc-2.12.2-ignore-origin-of-privileged-program.patch
glibc-2.13-futex.patch
glibc-2.13-dlclose-search-reset.patch
glibc-2.14-libdl-crash.patch
glibc-2.14-avoid-assertion-on-empty-dns-answer.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=('069069eb9100cc7affd7ad884cb3c3e9'
md5sums=('671b8af6dc5b02c8893253d135e2ac26'
'4dadb9203b69a3210d53514bb46f41c3'
'0c5540efc51c0b93996c51b57a8540ae'
'40cd342e21f71f5e49e32622b25acc52'
'a3ac6f318d680347bb6e2805d42b73b2'
'b042647ea7d6f22ad319e12e796bd13e'
'7d0154b7e17ea218c9fa953599d24cc4'
'22d09c58718fb3d1d31c3a6c14ca6886'
'cea62cc6b903d222c5f26e05a3c0e0e6'
'13728807283f111e5d9d38cf38e0a461'
'6970bcfeb3bf88913436d5112d16f588'
'7da8c554a3b591c7401d7023b1928afc'
'c5de2a946215d647c8af5432ec4b0da0'
'55febbb72139ac7b65757df085024b83'
'b587ee3a70c9b3713099295609afde49'
@ -60,9 +56,10 @@ md5sums=('069069eb9100cc7affd7ad884cb3c3e9'
mksource() {
git clone git://sourceware.org/git/glibc.git
pushd glibc
git checkout -b glibc-2.14-arch origin/release/2.14/master
git checkout -b glibc-2.14-chakra origin/release/2.14/master
popd
tar -cvJf glibc-${pkgver}_${_glibcdate}.tar.xz glibc/*
md5sum glibc-${pkgver}_${_glibcdate}.tar.xz
}
build() {
@ -89,17 +86,16 @@ build() {
# http://sourceware.org/bugzilla/show_bug.cgi?id=12403
patch -Np1 -i ${srcdir}/glibc-2.13-futex.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=593675
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=2f811bf8 (only fedora branch...)
patch -Np1 -i ${srcdir}/glibc-2.13-dlclose-search-reset.patch
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (only fedora branch...)
# http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.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-avoid-assertion-on-empty-dns-answer.patch
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...)
@ -111,6 +107,7 @@ build() {
touch ${pkgdir}/etc/ld.so.conf
cd ${srcdir}
rm -vRf glibc-build
mkdir glibc-build
cd glibc-build
@ -121,9 +118,10 @@ build() {
echo "slibdir=/lib" >> configparms
# archlinux specific lines
# remove hardening options from CFLAGS for building libraries
CFLAGS=${CFLAGS/-fstack-protector/}
CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
#CFLAGS=${CFLAGS/-fstack-protector/}
#CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
${srcdir}/glibc/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \
@ -133,20 +131,22 @@ build() {
--with-tls --with-__thread \
--enable-bind-now --without-gd \
--without-cvs --disable-profile \
--disable-multi-arch
--enable-multi-arch
# archlinux specific lines
# build libraries with hardening disabled
echo "build-programs=no" >> configparms
make
#echo "build-programs=no" >> configparms
#make
#
# 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
#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
# archlinux specific lines
# remove harding in preparation to run test-suite
sed -i '2,4d' configparms
#sed -i '2,4d' configparms
}
check() {

View File

@ -1,196 +0,0 @@
From 2f811bf88bed4a6c0dec8778847ba441736d509d Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Wed, 26 May 2010 18:28:59 +0200
Subject: [PATCH] Fix scope handling during dl_close
---
ChangeLog | 12 ++++++++++++
elf/Makefile | 10 +++++++++-
elf/dl-close.c | 7 +++++++
elf/unload8.c | 33 +++++++++++++++++++++++++++++++++
elf/unload8mod1.c | 7 +++++++
elf/unload8mod1x.c | 1 +
elf/unload8mod2.c | 7 +++++++
elf/unload8mod3.c | 27 +++++++++++++++++++++++++++
8 files changed, 103 insertions(+), 1 deletions(-)
create mode 100644 elf/unload8.c
create mode 100644 elf/unload8mod1.c
create mode 100644 elf/unload8mod1x.c
create mode 100644 elf/unload8mod2.c
create mode 100644 elf/unload8mod3.c
diff --git a/elf/Makefile b/elf/Makefile
index 59e835f..65b6deb 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -89,6 +89,7 @@ distribute := rtld-Rules \
unload4mod1.c unload4mod2.c unload4mod3.c unload4mod4.c \
unload6mod1.c unload6mod2.c unload6mod3.c \
unload7mod1.c unload7mod2.c \
+ unload8mod1.c unload8mod1x.c unload8mod2.c unload8mod3.c \
tst-audit1.c tst-audit2.c tst-audit3.c tst-audit4.c \
tst-auditmod1.c tst-auditmod3a.c tst-auditmod3b.c \
tst-auditmod4a.c tst-auditmod4b.c \
@@ -196,7 +197,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \
tst-dlmodcount tst-dlopenrpath tst-deep1 \
tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
- unload3 unload4 unload5 unload6 unload7 tst-global1 order2 \
+ unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \
tst-audit1 tst-audit2 \
tst-stackguard1 tst-addr1 tst-thrlock \
tst-unique1 tst-unique2
@@ -247,6 +248,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
unload4mod1 unload4mod2 unload4mod3 unload4mod4 \
unload6mod1 unload6mod2 unload6mod3 \
unload7mod1 unload7mod2 \
+ unload8mod1 unload8mod1x unload8mod2 unload8mod3 \
order2mod1 order2mod2 order2mod3 order2mod4 \
tst-unique1mod1 tst-unique1mod2 \
tst-unique2mod1 tst-unique2mod2
@@ -522,6 +524,9 @@ $(objpfx)unload6mod2.so: $(libdl)
$(objpfx)unload6mod3.so: $(libdl)
$(objpfx)unload7mod1.so: $(libdl)
$(objpfx)unload7mod2.so: $(objpfx)unload7mod1.so
+$(objpfx)unload8mod1.so: $(objpfx)unload8mod2.so
+$(objpfx)unload8mod2.so: $(objpfx)unload8mod3.so
+$(objpfx)unload8mod3.so: $(libdl)
$(objpfx)tst-initordera2.so: $(objpfx)tst-initordera1.so
$(objpfx)tst-initorderb2.so: $(objpfx)tst-initorderb1.so $(objpfx)tst-initordera2.so
$(objpfx)tst-initordera3.so: $(objpfx)tst-initorderb2.so $(objpfx)tst-initorderb1.so
@@ -823,6 +828,9 @@ $(objpfx)unload7: $(libdl)
$(objpfx)unload7.out: $(objpfx)unload7mod1.so $(objpfx)unload7mod2.so
unload7-ENV = MALLOC_PERTURB_=85
+$(objpfx)unload8: $(libdl)
+$(objpfx)unload8.out: $(objpfx)unload8mod1.so $(objpfx)unload8mod1x.so
+
ifdef libdl
$(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a
$(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 700e765..f47d5f8 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -421,6 +421,13 @@ _dl_close_worker (struct link_map *map)
imap->l_scope_max = new_size;
}
+ else if (new_list != NULL)
+ {
+ /* We didn't change the scope array, so reset the search
+ list. */
+ imap->l_searchlist.r_list = NULL;
+ imap->l_searchlist.r_nlist = 0;
+ }
/* The loader is gone, so mark the object as not having one.
Note: l_idx != IDX_STILL_USED -> object will be removed. */
diff --git a/elf/unload8.c b/elf/unload8.c
new file mode 100644
index 0000000..f984a38
--- /dev/null
+++ b/elf/unload8.c
@@ -0,0 +1,33 @@
+#include <dlfcn.h>
+#include <stdio.h>
+
+int
+main (void)
+{
+ void *h = dlopen ("$ORIGIN/unload8mod1.so", RTLD_LAZY);
+ if (h == NULL)
+ {
+ puts ("dlopen unload8mod1.so failed");
+ return 1;
+ }
+
+ void *h2 = dlopen ("$ORIGIN/unload8mod1x.so", RTLD_LAZY);
+ if (h2 == NULL)
+ {
+ puts ("dlopen unload8mod1x.so failed");
+ return 1;
+ }
+ dlclose (h2);
+
+ int (*mod1) (void) = dlsym (h, "mod1");
+ if (mod1 == NULL)
+ {
+ puts ("dlsym failed");
+ return 1;
+ }
+
+ mod1 ();
+ dlclose (h);
+
+ return 0;
+}
diff --git a/elf/unload8mod1.c b/elf/unload8mod1.c
new file mode 100644
index 0000000..fe7e81c
--- /dev/null
+++ b/elf/unload8mod1.c
@@ -0,0 +1,7 @@
+extern void mod2 (void);
+
+void
+mod1 (void)
+{
+ mod2 ();
+}
diff --git a/elf/unload8mod1x.c b/elf/unload8mod1x.c
new file mode 100644
index 0000000..835b634
--- /dev/null
+++ b/elf/unload8mod1x.c
@@ -0,0 +1 @@
+int mod1x;
diff --git a/elf/unload8mod2.c b/elf/unload8mod2.c
new file mode 100644
index 0000000..2fd8b67
--- /dev/null
+++ b/elf/unload8mod2.c
@@ -0,0 +1,7 @@
+extern void mod3 (void);
+
+void
+mod2 (void)
+{
+ mod3 ();
+}
diff --git a/elf/unload8mod3.c b/elf/unload8mod3.c
new file mode 100644
index 0000000..d49e22b
--- /dev/null
+++ b/elf/unload8mod3.c
@@ -0,0 +1,27 @@
+#include <dlfcn.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void
+mod3_fini2 (void)
+{
+}
+
+void
+mod3_fini (void)
+{
+ mod3_fini2 ();
+}
+
+void
+mod3 (void)
+{
+ void *h = dlopen ("$ORIGIN/unload8mod2.so", RTLD_LAZY);
+ if (h == NULL)
+ {
+ puts ("dlopen unload8mod2.so failed");
+ exit (1);
+ }
+
+ atexit (mod3_fini);
+}
--
1.7.3.4

View File

@ -1,26 +0,0 @@
From 032c0ee3ee28841d684950e33a77210118697566 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 1 Sep 2011 10:46:14 +0200
Subject: [PATCH] Avoid assertion failure when first DNS answer was empty
---
ChangeLog | 4 ++++
resolv/res_query.c | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/resolv/res_query.c b/resolv/res_query.c
index 2f7cfaa..2ded9fb 100644
--- a/resolv/res_query.c
+++ b/resolv/res_query.c
@@ -248,7 +248,7 @@ __libc_res_nquery(res_state statp,
&& *resplen2 > (int) sizeof (HEADER))
{
/* Special case of partial answer. */
- assert (hp != hp2);
+ assert (n == 0 || hp != hp2);
hp = hp2;
}
else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
--
1.7.3.4

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

@ -9,27 +9,47 @@ source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
# NOTE: requires rebuilt with each new gcc version
pkgname=libtool
pkgver=2.4
pkgrel=3
pkgname=('libtool' 'libltdl')
pkgver=2.4.2
pkgrel=1
pkgdesc="A generic library support script"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/libtool"
license=('GPL')
depends=('sh' 'tar' 'texinfo')
groups=('base-devel')
options=('!libtool')
install=libtool.install
source=(ftp://ftp.gnu.org/pub/gnu/libtool/${pkgname}-${pkgver}.tar.gz)
md5sums=('b32b04148ecdd7344abc6fe8bd1bb021')
source=(ftp://ftp.gnu.org/pub/gnu/libtool/${pkgname}-${pkgver}.tar.xz{,.sig})
md5sums=('2ec8997e0c07249eb4cbd072417d70fe'
'1e6ba57420c82c663c85e745d11c7eed')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
cd ${srcdir}/${pkgbase}-${pkgver}
./configure --prefix=/usr
make || return 1
make
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
check() {
cd ${srcdir}/${pkgbase}-${pkgver}
make check
}
package_libtool() {
depends=('sh' "libltdl=$pkgver" 'tar' 'gcc=4.6.1')
groups=('base-devel')
install=libtool.install
cd ${srcdir}/${pkgbase}-${pkgver}
make DESTDIR=${pkgdir} install-binSCRIPTS install-man install-info \
install-data-local
rm -rf ${pkgdir}/usr/share/libtool/libltdl/
}
package_libltdl() {
pkgdesc="A system independent dlopen wrapper for GNU libtool"
cd ${srcdir}/${pkgbase}-${pkgver}
make DESTDIR=${pkgdir} install-libLTLIBRARIES install-includeHEADERS \
install-ltdlincludeHEADERS install-data-local
rm -rf ${pkgdir}/usr/share/{aclocal,libtool/config}
}