diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2013-05-02 01:17:09 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2013-05-02 01:17:09 +0000 |
commit | 06e8a7562c9c5d65accb6112b460c3f6ba84f03e (patch) | |
tree | fbef4e1159223cd51464698c380575b5bade3381 /media-libs/alsa-lib | |
parent | old, pull in missing virtual/pkgconfig (diff) | |
download | historical-06e8a7562c9c5d65accb6112b460c3f6ba84f03e.tar.gz historical-06e8a7562c9c5d65accb6112b460c3f6ba84f03e.tar.bz2 historical-06e8a7562c9c5d65accb6112b460c3f6ba84f03e.zip |
Upstream patch for "Fix doubly call of dlclose() in dlobj caching code" as noted by galtgendo at Freenode
Package-Manager: portage-2.2.0_alpha173/cvs/Linux x86_64
Manifest-Sign-Key: 0x4868F14D
Diffstat (limited to 'media-libs/alsa-lib')
-rw-r--r-- | media-libs/alsa-lib/ChangeLog | 9 | ||||
-rw-r--r-- | media-libs/alsa-lib/Manifest | 20 | ||||
-rw-r--r-- | media-libs/alsa-lib/alsa-lib-1.0.27-r1.ebuild | 78 | ||||
-rw-r--r-- | media-libs/alsa-lib/files/1.0.25-extraneous-cflags.diff | 10 | ||||
-rw-r--r-- | media-libs/alsa-lib/files/alsa-lib-1.0.27-dlclose.patch | 102 |
5 files changed, 203 insertions, 16 deletions
diff --git a/media-libs/alsa-lib/ChangeLog b/media-libs/alsa-lib/ChangeLog index b35c25a63395..3312136c69fb 100644 --- a/media-libs/alsa-lib/ChangeLog +++ b/media-libs/alsa-lib/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-libs/alsa-lib # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/ChangeLog,v 1.352 2013/05/01 16:26:03 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/ChangeLog,v 1.353 2013/05/02 01:16:58 ssuominen Exp $ + +*alsa-lib-1.0.27-r1 (02 May 2013) + + 02 May 2013; Samuli Suominen <ssuominen@gentoo.org> + +alsa-lib-1.0.27-r1.ebuild, +files/alsa-lib-1.0.27-dlclose.patch: + Upstream patch for "Fix doubly call of dlclose() in dlobj caching code" as + noted by galtgendo at Freenode 01 May 2013; Samuli Suominen <ssuominen@gentoo.org> alsa-lib-1.0.27.ebuild: Call epatch_user wrt #468162 by Doug Goldstein diff --git a/media-libs/alsa-lib/Manifest b/media-libs/alsa-lib/Manifest index 4cac39fac97c..b533d3c69007 100644 --- a/media-libs/alsa-lib/Manifest +++ b/media-libs/alsa-lib/Manifest @@ -1,21 +1,23 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 -AUX 1.0.25-extraneous-cflags.diff 897 SHA256 687dad4aac106fb55a25478bdfd52fafdd35e44be9b6a8b4c2f89c380ee8807c SHA512 df070edb139ca1b6aaae3012c975683e09defe0467d51eb4b5c11ecfd067a641f3ae711a5bc6a169f69d375cfb63360a6c9ec1060e50fbb3e62d81abe165147e WHIRLPOOL 9a148294fc336e1a333b472eaa96e30513b7f11594ea7739e950143fad0e009cc44b54cd9a085f2fa6313c12509558a12d5fe1c5cebccb0020948e3108beffbf +AUX 1.0.25-extraneous-cflags.diff 465 SHA256 ac22ee102fa41baf179b755ca0203b87712e57e515c85b72b45ed5bc9e75d555 SHA512 1c84f3f1c4bd8bd866c2c0fed24136b818dad28bf91fd6e39b4e17c7f1b72d53af7d3e4a6358b9c80f616052ae87540561743757f98e1dcd613ae2d1c7ab8348 WHIRLPOOL 7ca6ec58257fb572bc2eb7ebb6efc12f9d7319e4beaf78137d4d876abf1e53fc151bad682600363407b4afae3887cbce267ebb580e29685c0ac61b6b33cc6431 +AUX alsa-lib-1.0.27-dlclose.patch 2999 SHA256 4663756b2c501bbc69fe31b6066c93620e847a14b96905311c89f0986caa405e SHA512 bd763f4b6d986c6342b9d7d6896cab9ea8b7638ddd81aa9330fd7e1d7912da2d19d58c17137fae25b545f6e3295a2dd4c9e6c87b5a93a7f770a90612ad39aa07 WHIRLPOOL c14ac89cb2c9421020bf3ab51db2fe59dcd3798748d2232b6cc2840b5eae25ff231647548005c6f0cf178fe1e14eec31851b58781e0488dc6e68b1870e9b7351 DIST alsa-lib-1.0.26.tar.bz2 883076 SHA256 8c9f8161603cc3db640619650401292c3e110da63429ab6938aac763319f6e7d SHA512 2f917171c1e2f50947d7b62da468c5febfa91fba5c04b4694171f7fa0e61ddf398daf7e657876bab1f1ec08932e82f147786b10f815172409f057b0fcd69003a WHIRLPOOL c6353ccf335e24e97258f26fed14ce66fff21b721bef1d6648f212653c0c58a99c889784bf7d42cadbc0f2b1514c877fe8ed94f30c7b45d55f9193c335849c0f DIST alsa-lib-1.0.27.tar.bz2 898132 SHA256 947caa14cf53c614d0a206fe9f5964de6ee9617f9007e8fceffd6b3cfd89bc5d SHA512 70e12f7ba8e1d1c7e7c240c033affd991a536b57b95bb82b25cc7f9ef36157c2045ceec360df373e2979e8c03ed64019bbb1949a279d965bd208bd6a704351eb WHIRLPOOL 055ecbda55733d3a63cee9bcda8a04f168b83313b6eccff5fa568a1d7727cb7ff5ca40e25d1f8bf651cb97f129884e7e0963877fb2c06252f8e4a0e130a4b407 EBUILD alsa-lib-1.0.26-r1.ebuild 1611 SHA256 21beff4d4e3d1a3a641901dcb806a8b4740a99706d4d7f6f43938892c86b2620 SHA512 f0a0084ca9dba8199ae7f3cc38694226a618b170bb8b2d61d226cfbccffae8fc1585aab7ae16bbf7459bf665c2cf62dcefe746a4119df998cf3d80cf2460b716 WHIRLPOOL ce18af81d4586c04489a992db8555289d3b181807e5b8e247441fb7f23138b5f9436fbbd036010cc57789989b6909010760d011dc2d3e41913b5673531f16d79 +EBUILD alsa-lib-1.0.27-r1.ebuild 1759 SHA256 e9af06c622cde78876aa5a45b71534370ab0cb3e92cfdda03282b6addb0f9c03 SHA512 c790fc228a51f4886ccc6db51122901c9b124fcab25846df32e58214942a30afe3829bdba8434b3e1adf74aa57f67863e68e33e0f5738a40b7538e912c4a2823 WHIRLPOOL f7597f67e0427106c9d5e4a49a6dcff885568b19db931a6d95f9b37ac5aad05f9bb76150b1d9b734df48bb619f91b9d3f0aa4d53b6351247aa172f89b08171b0 EBUILD alsa-lib-1.0.27.ebuild 1714 SHA256 486df26f952658f4b5f64f01e99c946c607b7ddde8e7aa2b3a469fc759d18c45 SHA512 39b27b921f663bbecb233e914f3102ecd21b3bb2012013c0f5c8e3616dceb335a08ff0173d81531053614d4f5965815a709435de245685149221c6d5f9287d56 WHIRLPOOL 31d6df0e96f576255392d1ac61c8ad036c95bde157dd1041a942e16e290680b7029135c2dad3bdaf0bb4202d806afcd85ec3496fee1f61366b61236ca26fd382 -MISC ChangeLog 51977 SHA256 c0be50f88d188b4ab458b64490ed931d443ce4137a7530747b46815e868425c1 SHA512 f5e86e91e4cc4a028d30dddf331f4ab084afaf84215ff2fad00dddac92f9f61f333bb308e7ffb538c1a3559e737084af92f44f7f4bce542687082f167bc81706 WHIRLPOOL 1289894ec905b5753965169a78040a03972a6949165febe8090490e1493e9379b5bcb1940ade2f1bc17e06df5b58c4ccdec75c7a02518af63e31e2bd36ab077a +MISC ChangeLog 52245 SHA256 57a11bdaf8f6bcf084df40591b40148ac3aea45beb219dba248163fb3e99be4d SHA512 7628abc88e42f70e8ceb83e336ff94cf0dc27a327a6a606ac2c4683c765a5a3b52e68aada9956b7f1019f49d574b0d843dca74dd1780380341be90d80e7f5050 WHIRLPOOL 74eb13c82048d19fea2c3a741d2509ad13b10dd933d0b966388f641a2c0d0d0837fadca685a831f2918a9ab6cae638bbbc403784bf33b47a5931230c7bf6e1f5 MISC metadata.xml 349 SHA256 68b0f168985d3b03a0997eb9f9338662d1584dc7fe7ea35ae8f7564e5e20c2e3 SHA512 477956b85f7ddddac6b0bb67a52803a569f3ee6011ab917a3d2a60975a11c0a9ef5acedebbcb75bdbd04063e2c6e7aabf10a0c2444dd10492eda4cb8f817f688 WHIRLPOOL c42f98c4da4bd5c20d32bfa6a3d9d68b71aaccbc905cad9a7552366be99c1e1f010279d458b620e97e2c1044cef0af066cf79fc5a1fcecf8fb31c91a3e1e95ab -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQEcBAEBCAAGBQJRgUGtAAoJEEdUh39IaPFNviAH/0CF3ft+6zHTPKg6WPzAWghb -NS8ElwNnQkeVLWtyc+ieUvS7aZigpqcylaCitlOyJMo8O5b7xkJaSSkHVMbtUuQn -QjOffveYDsTB+oQ/dTDi5DkC5dpVLC9OxOYmY9iJExQo2C2Rde0lF8tfhS1zj2P/ -ojDozGMAvCSMMKUXbc/PVehLXhkxn+nsbiryb549lZbcPY8IIw8UCKFioRoiVWE8 -eUOXQ5c2Jg4LEQe3T7w/frOiHLN+RzdpKa64YQvU9RaZw0/ylTmmMqZPUwjDD9HW -jj+BMYszj1s9Jn3tPBVmhy6HXuxv4i3gncZrDqoOJrK/PILJFmvwAE5/zbOyOp4= -=ARZn +iQEcBAEBCAAGBQJRgb4aAAoJEEdUh39IaPFN5GQH+QF7QEkTzGrNKIRd++Zzxfqf +GX0Wjqx8Q3J6kgOMNjFvMOC8bzdQPAFlfNhsKlkmcFyo4ZMLRxs428obfZC4mbsp +rSLLN9ORmpxlSMoPflfSyS6w+5PWKdNDwUXa6Og9QJwyWKtLXihMwi9G9pHSbDXa +O7agSlhSUm4Gu4LxYGYZE2LXqYDgiZ4PI2or/eestGRoK173Cq+vWZ5ZXKz/uV9t +jSh7/7pmzLIg5iXxIh94KEEx3vgu6QgYdcp4f/XT9H8baZkF/GYJhP4aP4rq0Bh4 +PRbYffJZr5/AiNQiRI5Bgs9dLPQ03rigHZhbwlcVG+dyc3I2JM8+IB/HGjZf8zI= +=TjCZ -----END PGP SIGNATURE----- diff --git a/media-libs/alsa-lib/alsa-lib-1.0.27-r1.ebuild b/media-libs/alsa-lib/alsa-lib-1.0.27-r1.ebuild new file mode 100644 index 000000000000..5d7d5bbf0a58 --- /dev/null +++ b/media-libs/alsa-lib/alsa-lib-1.0.27-r1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/alsa-lib-1.0.27-r1.ebuild,v 1.1 2013/05/02 01:16:58 ssuominen Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools eutils multilib python-single-r1 + +DESCRIPTION="Advanced Linux Sound Architecture Library" +HOMEPAGE="http://www.alsa-project.org/" +SRC_URI="mirror://alsaproject/lib/${P}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc debug alisp python" + +RDEPEND="python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + >=media-sound/alsa-headers-1.0.25-r1 + doc? ( >=app-doc/doxygen-1.2.6 )" + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + epatch \ + "${FILESDIR}"/1.0.25-extraneous-cflags.diff \ + "${FILESDIR}"/${P}-dlclose.patch + + sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #466980 + + epatch_user + + eautoreconf + # if eautoreconf'd with recent autoconf, then epunt_cxx is + # unncessary wrt #460974 +# epunt_cxx +} + +src_configure() { + local myconf + use elibc_uclibc && myconf="--without-versioned" + + econf \ + --enable-shared \ + --disable-resmgr \ + --enable-rawmidi \ + --enable-seq \ + --enable-aload \ + $(use_with debug) \ + $(use_enable alisp) \ + $(use_enable python) \ + ${myconf} +} + +src_compile() { + emake + + if use doc; then + emake doc + fgrep -Zrl "${S}" "${S}/doc/doxygen/html" | \ + xargs -0 sed -i -e "s:${S}::" + fi +} + +src_install() { + emake DESTDIR="${D}" install + + prune_libtool_files --all + find "${ED}"/usr/$(get_libdir)/alsa-lib -name '*.a' -exec rm -f {} + + + dodoc ChangeLog TODO + use doc && dohtml -r doc/doxygen/html/* +} diff --git a/media-libs/alsa-lib/files/1.0.25-extraneous-cflags.diff b/media-libs/alsa-lib/files/1.0.25-extraneous-cflags.diff index 6d687c567313..d070b97bf62d 100644 --- a/media-libs/alsa-lib/files/1.0.25-extraneous-cflags.diff +++ b/media-libs/alsa-lib/files/1.0.25-extraneous-cflags.diff @@ -1,6 +1,5 @@ -diff -uNr alsa-lib-1.0.25.ORIG/modules/mixer/simple/Makefile.am alsa-lib-1.0.25/modules/mixer/simple/Makefile.am ---- alsa-lib-1.0.25.ORIG/modules/mixer/simple/Makefile.am 2012-01-26 10:46:50.870738448 +0000 -+++ alsa-lib-1.0.25/modules/mixer/simple/Makefile.am 2012-01-26 11:12:16.972695934 +0000 +--- modules/mixer/simple/Makefile.am ++++ modules/mixer/simple/Makefile.am @@ -1,7 +1,7 @@ alsaplugindir = @ALSA_PLUGIN_DIR@ pkglibdir = $(alsaplugindir)/smixer @@ -10,9 +9,8 @@ diff -uNr alsa-lib-1.0.25.ORIG/modules/mixer/simple/Makefile.am alsa-lib-1.0.25/ INCLUDES=-I$(top_srcdir)/include -diff -uNr alsa-lib-1.0.25.ORIG/src/pcm/scopes/Makefile.am alsa-lib-1.0.25/src/pcm/scopes/Makefile.am ---- alsa-lib-1.0.25.ORIG/src/pcm/scopes/Makefile.am 2012-01-26 10:46:50.875738335 +0000 -+++ alsa-lib-1.0.25/src/pcm/scopes/Makefile.am 2012-01-26 11:12:29.172695655 +0000 +--- src/pcm/scopes/Makefile.am ++++ src/pcm/scopes/Makefile.am @@ -1,6 +1,6 @@ pkglibdir = $(libdir)/@PACKAGE@/scopes diff --git a/media-libs/alsa-lib/files/alsa-lib-1.0.27-dlclose.patch b/media-libs/alsa-lib/files/alsa-lib-1.0.27-dlclose.patch new file mode 100644 index 000000000000..72df461859e1 --- /dev/null +++ b/media-libs/alsa-lib/files/alsa-lib-1.0.27-dlclose.patch @@ -0,0 +1,102 @@ +From e1e40c25535af35fa5cdf7ffc95a01fbff098ddd Mon Sep 17 00:00:00 2001 +From: Takashi Iwai <tiwai@suse.de> +Date: Mon, 15 Apr 2013 18:12:17 +0200 +Subject: [PATCH] Fix doubly call of dlclose() in dlobj caching code + +When multiple dlobj_cache items point to the same dlobj, dlclose() may +be called wrongly multiple times when these items are cleared, because +we manage the dlobj_cache list as a flat list. This results in a bad +segfault we've seen in openal-soft, for example. + +For fixing this, we need the refcounting of dlobj itself. But, in +this case, we don't have to manage yet another list, since dlopen() +does a proper refcounting by itself. That is, we can just call always +dlopen() at each time a new function is assigned, and also call +dlclose() for each released dlobj_cache item at cleanup. + +Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=814250 + +Signed-off-by: Takashi Iwai <tiwai@suse.de> +--- + src/dlmisc.c | 31 +++++++++++-------------------- + 1 file changed, 11 insertions(+), 20 deletions(-) + +diff --git a/src/dlmisc.c b/src/dlmisc.c +index 3788382..2de0234 100644 +--- a/src/dlmisc.c ++++ b/src/dlmisc.c +@@ -208,8 +208,7 @@ void *snd_dlobj_cache_get(const char *lib, const char *name, + { + struct list_head *p; + struct dlobj_cache *c; +- void *func, *dlobj = NULL; +- int dlobj_close = 0; ++ void *func, *dlobj; + + snd_dlobj_lock(); + list_for_each(p, &pcm_dlobj_list) { +@@ -220,7 +219,6 @@ void *snd_dlobj_cache_get(const char *lib, const char *name, + continue; + if (!lib && c->lib) + continue; +- dlobj = c->dlobj; + if (strcmp(c->name, name) == 0) { + c->refcnt++; + func = c->func; +@@ -228,17 +226,16 @@ void *snd_dlobj_cache_get(const char *lib, const char *name, + return func; + } + } ++ ++ dlobj = snd_dlopen(lib, RTLD_NOW); + if (dlobj == NULL) { +- dlobj = snd_dlopen(lib, RTLD_NOW); +- if (dlobj == NULL) { +- if (verbose) +- SNDERR("Cannot open shared library %s", ++ if (verbose) ++ SNDERR("Cannot open shared library %s", + lib ? lib : "[builtin]"); +- snd_dlobj_unlock(); +- return NULL; +- } +- dlobj_close = 1; ++ snd_dlobj_unlock(); ++ return NULL; + } ++ + func = snd_dlsym(dlobj, name, version); + if (func == NULL) { + if (verbose) +@@ -257,8 +254,7 @@ void *snd_dlobj_cache_get(const char *lib, const char *name, + free((void *)c->lib); + free(c); + __err: +- if (dlobj_close) +- snd_dlclose(dlobj); ++ snd_dlclose(dlobj); + snd_dlobj_unlock(); + return NULL; + } +@@ -298,16 +294,11 @@ void snd_dlobj_cache_cleanup(void) + struct list_head *p, *npos; + struct dlobj_cache *c; + +- /* clean up caches only when really no user is present */ + snd_dlobj_lock(); +- list_for_each(p, &pcm_dlobj_list) { +- c = list_entry(p, struct dlobj_cache, list); +- if (c->refcnt) +- goto unlock; +- } +- + list_for_each_safe(p, npos, &pcm_dlobj_list) { + c = list_entry(p, struct dlobj_cache, list); ++ if (c->refcnt) ++ continue; + list_del(p); + snd_dlclose(c->dlobj); + free((void *)c->name); /* shut up gcc warning */ +-- +1.7.11.7 + |