diff options
author | Pacho Ramos <pacho@gentoo.org> | 2012-07-08 11:47:14 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2012-07-08 11:47:14 +0000 |
commit | d9c1693caef8ffda629984236633701d011b6b9d (patch) | |
tree | fcff84251ec4ebf6b0eb06bea4605334e39ce998 /dev-libs | |
parent | Version bump (diff) | |
download | historical-d9c1693caef8ffda629984236633701d011b6b9d.tar.gz historical-d9c1693caef8ffda629984236633701d011b6b9d.tar.bz2 historical-d9c1693caef8ffda629984236633701d011b6b9d.zip |
Fix deadlock, bug #420353 by Michael Boone.
Package-Manager: portage-2.1.11.5/cvs/Linux x86_64
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/libgamin/ChangeLog | 9 | ||||
-rw-r--r-- | dev-libs/libgamin/Manifest | 14 | ||||
-rw-r--r-- | dev-libs/libgamin/files/libgamin-0.1.10-deadlock.patch | 65 | ||||
-rw-r--r-- | dev-libs/libgamin/libgamin-0.1.10-r3.ebuild | 144 |
4 files changed, 229 insertions, 3 deletions
diff --git a/dev-libs/libgamin/ChangeLog b/dev-libs/libgamin/ChangeLog index d1fb308a1037..ea86afd037b3 100644 --- a/dev-libs/libgamin/ChangeLog +++ b/dev-libs/libgamin/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-libs/libgamin # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libgamin/ChangeLog,v 1.31 2012/04/30 14:29:54 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libgamin/ChangeLog,v 1.32 2012/07/08 11:47:14 pacho Exp $ + +*libgamin-0.1.10-r3 (08 Jul 2012) + + 08 Jul 2012; Pacho Ramos <pacho@gentoo.org> + +files/libgamin-0.1.10-deadlock.patch, +libgamin-0.1.10-r3.ebuild: + Fix deadlock, bug #420353 by Michael Boone. 30 Apr 2012; Fabian Groffen <grobian@gentoo.org> libgamin-0.1.10-r2.ebuild: Fix for Prefix, add (Open)Solaris patch, bug #413415 @@ -125,4 +131,3 @@ +libgamin-0.1.10.ebuild, +metadata.xml: New ebuild split off gamin. Initial ebuild inspired by Pacho Ramos, closes bug #217861. - diff --git a/dev-libs/libgamin/Manifest b/dev-libs/libgamin/Manifest index 427faf366f40..41840ae73fa2 100644 --- a/dev-libs/libgamin/Manifest +++ b/dev-libs/libgamin/Manifest @@ -1,7 +1,11 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX libgamin-0.1.10-G_CONST_RETURN-removal.patch 2470 SHA256 adddd1f54bb33669d9163398308ebb732f33b6c12b1363a0dcf765ff28fc30ad SHA512 56cf8439d64c3856cc768a0d6aa67e00e82579b0db60b1f25b195024eec1628f61013718f3139910735eafa15e05f4fabe4373ebac053778abb1c89201c6cf0c WHIRLPOOL 425495ec6bb9cc5993631b9c5ef24d33261f71e9a039120a373235bae3cb386b8a938cd06714a6fba57a2378f868d372b063efc325bc98faa43b3c136c4d00b1 AUX libgamin-0.1.10-armel-features.patch 1490 SHA256 6b6faf3084ca2ddf577575395172901d637a96e5db8dd42bc5268d58a767d30e SHA512 fe6365489428ca9206a36b8dea495d5c4beb381fe43dd49aa2fa022f8ea34d8068275ce42f41211ef7ce8bb2c1dce952673d4b2e72eec5be00161fa8f8bcb2a5 WHIRLPOOL 935fde8a3683a1cb9f7f44307fe136a7f8251982501e54209625bee681d8ef23cfbf27d5f8b127da200a800c778b91013124ddd8caf970810c018d7f44dc356a AUX libgamin-0.1.10-compilewarnings.patch 526 SHA256 dfca2bee08ba14c873a6bcd732359dd7e3a9372d6d9fb82378194d7a73a30e68 SHA512 f413fbd5db1e0412d1fabe6b46e049d347735cf6db7a7ca1eecc9ede1b299a7e622be3c508df40990159e05470d285069a0fa4e2cfcf6fd80378d0aa2b69fd0f WHIRLPOOL ae2277d225551e1b7bbaa897b675b51e561b8e3f71a2456dafea4d7cf697437534aedf286ae9399e8445aca83c02dedd5ce2ac3d9c085293210e3c0bf9af2dea AUX libgamin-0.1.10-crosscompile-fix.patch 764 SHA256 27e92227c19a6ae61336f66cefe7d44fca43fe7e0c8122fe32c313b4d848f28c SHA512 11aca975f98d9364bfdd8e28162f922a96493012fb3c6c704115d33155b2a2e9bbd20aba64354db922f16c3589b88a07091590a5bd6aa806582b9b7875ba8e23 WHIRLPOOL 61c2c95cd7874eb106fcb1e474a10e21ce79d0c10220520810d904e4dac106ccfe12a09782d0ea7cb42c7369a1226fca9b7f4d826e5f62140713ea6a8ac967c2 +AUX libgamin-0.1.10-deadlock.patch 2090 SHA256 75cee6cb0210cec02be1e042454f561da20724c55810f968b0a5f4972f9cbfd5 SHA512 c0a4a318eb78b9666930e9d1a6fac5e7762f38796e5892d849c893df524310408020ea75fb02a4d79000be3440435ae640340cf2a3dd43fa031df5787762f8de WHIRLPOOL 9d5b26134ccd1e13c25f5bfe3295bdec7c1a8cdd73f21b1cb65ff50dc910e533c3ac5b28508cb7f93a15096e365aa25cdaf9f32d8d76cadf435215b8aebdb090 AUX libgamin-0.1.10-disable_python_static_library.patch 340 SHA256 460306119bc6be6fd19d173eadfa28493fc72e90fceaf3ee49b50fee50a4f5d1 SHA512 8d11f4b891bfc9e1aa6ba99aa485279b29c0a0f154742349035032c5122ae6ef29da5e5f0482791a7b1f7bceebd2bc871f14c3eb96f1947ad791b8036e488b00 WHIRLPOOL 59fb95c4acb5f14897f274d1ad72bf0ddd67a0e905f4098894e2d56767c3930a99b4a459c0bcab607917b0305dab1ca516c8158ce9700c6de88648995e688be1 AUX libgamin-0.1.10-noinst-lib.patch 2207 SHA256 e19ede71d259fbe5888c06635441365a48687034b24c5f15edd808a7cbd9cdc7 SHA512 ba7ce391f4da1a6b4c75941b8440a72f483b6f2597592f64ddca720bf46b1269e64a20a27da9c35b134100a121990d84e28ac737cffef48e90974a017ba3a4cb WHIRLPOOL d3605973df5f148d03d65a6660925dd2c1bca5bda9574714fb3259f630341cdeb3d5d7c73986fa0a6eacb0f34c584eb25c8f6ed431d1b95df21a974241678124 DIST gamin-0.1.10.tar.bz2 452194 SHA256 a59948b20ce2f14136c013f155abb8c8d51db2ea167c063ff33461e453fec10a SHA512 ccdbc06eeb958ed2d888aee3fcadbadf00e9e6566802adee82035e0762ac3351ed2a2983eabe07503ddde2ddf035185c6cd98cbece2feadaaa36e8f656a38306 WHIRLPOOL 49ca0e192d8f5e28d6ffbb201b98b0f2c736554447b37c50eaa6e76e499ab77d696cf585c96c6a38f94c2589c634e694daf2e4969ffddbbb245b07b8a6e7b2d8 @@ -9,5 +13,13 @@ DIST gamin-0.1.9-freebsd.patch.bz2 4635 SHA256 fcd1a6655d1c7cd86db6102931a4da1c2 DIST libgamin-0.1.10-opensolaris.patch.bz2 16955 SHA256 9cb1bde5a34888ce4de4c4894c7d31dbfdbfb3279007b9eddf2da35510f6a9b5 SHA512 fd1cfc5a6b5ba429622f8d426cfba0e3c1c05c3677fb58c53af39b4030ae56f3f71caf63eb5ecb16169c2f7e8c79a32d7d440857c2c7fd3a259cf8312a9b2004 WHIRLPOOL 3efbf3781a55f44f383e573db4a3b3df731e9f77608d73db4ff3027eae0bda6abb6eae022c094735c0d8d2a85e224a980436d8557f9350bb1558b40d99280701 DIST pkg-config-0.26.tar.gz 396399 SHA256 94c1936a797c930fb3e4e5a154165b6268caba22b32d24083dd4c492a533c8af SHA512 9390d5918dd4ac520b914d2330aa7cae2587ca7b21b03bc88372fd5dbbd78e33eeb3fca39fcdb6dd10113658f03118a1c8829149c7029eb0dd80348d100170a4 WHIRLPOOL f535946a02192a9bffc7be0fae454e25aa86af8bac7f47622d52ed13f77f1ba05ff9b5693b2a501981e3991e4e1595eced22dee4ab748b310baa7d57267a62a7 EBUILD libgamin-0.1.10-r2.ebuild 3950 SHA256 e526bd55dffec64977d9bb28edf710b25a7d563553919fd42317fb21ae90666a SHA512 c89f02ec77d51e2ec4ebe6a7ec6c0751e34a97136a93afa23891e0a6021dc833296eb61a8e4ad81c00807f390405de6115c2e86c1f7909bf496cdc383b72ccc7 WHIRLPOOL d6f518a27eb43e851ec2179bd2887aae3da81c958e4d6435603b6aaea87855c64545e18ef67f17be80014f4be74f19f382366807f38d9e94b02a9aa126965a1d -MISC ChangeLog 4933 SHA256 413f218436a3cb3b36b0feeb6e2a20f183860d6ef8c52d9a9d8420633fdbf114 SHA512 8f2636b26a9089c485d0b52554a0f89055a552957940f8182cc2e3f35b09162b6c7a114ddbed768c56613894c4027bafc28db51409c7e26a36ccd369158cbe20 WHIRLPOOL 4b8d84acf2a7d5bc988c077b24e02c11bfb7a4ec31e89ef5033caaa816c1ac426e454ab49c5db8255ef7274ec362346792c56f86aead4fdb463a0199508a6c96 +EBUILD libgamin-0.1.10-r3.ebuild 4092 SHA256 d50ff91fe335d4383f68e49f92716357666987b3e6c2593becf866608d06784e SHA512 54b381a7a9fd50c7c1da2e34c006065d0685873d1ffbd4eb0541af1a3cbe2f13e4801dd5aacdf60109a05ee2ed5a4ddee78e3934eed3cf50d48f51f7b0b1a850 WHIRLPOOL e87237aa4927621b9299ada1efb8942960a8ccf2802d680054150fe84c08d34994005c29f336c8e1b0cd8f3bd75ace70dd68f6e4ada41f7a2ad9c9dd9c52675c +MISC ChangeLog 5127 SHA256 2e6093e4bc61514d0b9d7eeb7fb70c7b3da152aa6902809f575832a7d9749a05 SHA512 b22ce66b7169d779d90d389e1bd862e6d48e0bacc9ad5e9d5de00aaf1c2f19c1bad58269d24706b2279b9de3e7dd7ac637539c981b9b70fdc1f46c89b172cdac WHIRLPOOL 56079efc31dccd93c15cf9f92420b2c759953051f500827a36bf81ed2de6b645ba7bb60ba457c5a2081d1903b6a597d9559ec27fe169fa519df66cf71e4aa6d3 MISC metadata.xml 234 SHA256 3018e3b31ed690a57bfc14e35699dd20ea3b352fc28b918f699e6955b57a2d97 SHA512 eed880663c66280f6688f896bd6b82d600cac0063eb79da7b1be0fe3bf866e7289edb389a505dfbf45bd9c7e5282748dadd7bf3477759788c1024300796545c3 WHIRLPOOL 79028c7efb93b6255351aebe7f35d1587d07ec1405e8fbee4fd874e42e57e6d10368b0f4ab60c89e115493a094f36af8be1bc2fe79fc2d34daae83dc0f8d7b16 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iEYEARECAAYFAk/5c0gACgkQCaWpQKGI+9RdZACfdvDkyuenslMw+WT90VEsxmzE +epgAnRez94ADh5hJauDg8gLP9RTeH7Zt +=2Qly +-----END PGP SIGNATURE----- diff --git a/dev-libs/libgamin/files/libgamin-0.1.10-deadlock.patch b/dev-libs/libgamin/files/libgamin-0.1.10-deadlock.patch new file mode 100644 index 000000000000..9f2b2a5150bd --- /dev/null +++ b/dev-libs/libgamin/files/libgamin-0.1.10-deadlock.patch @@ -0,0 +1,65 @@ +From cc14440eface093548cb3bc7814da11d9a99d283 Mon Sep 17 00:00:00 2001 +From: Anssi Hannula <anssi@mageia.org> +Date: Wed, 4 Jan 2012 00:23:55 +0200 +Subject: [PATCH] fix possible server deadlock in ih_sub_cancel + +ih_sub_foreach() calls ih_sub_cancel() while inotify_lock is locked. +However, ih_sub_cancel() locks it again, and locking GMutex recursively +causes undefined behaviour. + +Fix that by removing locking from ih_sub_cancel() as ih_sub_foreach() +is its only user. Also make the function static so that it won't +accidentally get used by other files without locking (inotify-helper.h +is an internal server header). + +This should fix the intermittent deadlocks I've been experiencing +causing KDE applications to no longer start, and probably also +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542361 +--- + server/inotify-helper.c | 7 ++----- + server/inotify-helper.h | 1 - + 2 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/server/inotify-helper.c b/server/inotify-helper.c +index d77203e..0789fa4 100644 +--- a/server/inotify-helper.c ++++ b/server/inotify-helper.c +@@ -123,13 +123,11 @@ ih_sub_add (ih_sub_t * sub) + + /** + * Cancels a subscription which was being monitored. ++ * inotify_lock must be held when calling. + */ +-gboolean ++static gboolean + ih_sub_cancel (ih_sub_t * sub) + { +- G_LOCK(inotify_lock); +- +- + if (!sub->cancelled) + { + IH_W("cancelling %s\n", sub->pathname); +@@ -140,7 +138,6 @@ ih_sub_cancel (ih_sub_t * sub) + sub_list = g_list_remove (sub_list, sub); + } + +- G_UNLOCK(inotify_lock); + return TRUE; + } + +diff --git a/server/inotify-helper.h b/server/inotify-helper.h +index 5d3b6d0..d36b5fd 100644 +--- a/server/inotify-helper.h ++++ b/server/inotify-helper.h +@@ -34,7 +34,6 @@ gboolean ih_startup (event_callback_t ecb, + found_callback_t fcb); + gboolean ih_running (void); + gboolean ih_sub_add (ih_sub_t *sub); +-gboolean ih_sub_cancel (ih_sub_t *sub); + + /* Return FALSE from 'f' if the subscription should be cancelled */ + void ih_sub_foreach (void *callerdata, gboolean (*f)(ih_sub_t *sub, void *callerdata)); +-- +1.7.7.2 + diff --git a/dev-libs/libgamin/libgamin-0.1.10-r3.ebuild b/dev-libs/libgamin/libgamin-0.1.10-r3.ebuild new file mode 100644 index 000000000000..404fe9d0b670 --- /dev/null +++ b/dev-libs/libgamin/libgamin-0.1.10-r3.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libgamin/libgamin-0.1.10-r3.ebuild,v 1.1 2012/07/08 11:47:14 pacho Exp $ + +EAPI="4" +PYTHON_DEPEND="python? 2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.* *-jython" +GNOME_ORG_MODULE="gamin" +GNOME_TARBALL_SUFFIX="bz2" + +inherit autotools eutils flag-o-matic libtool python gnome.org + +DESCRIPTION="Library providing the FAM File Alteration Monitor API" +HOMEPAGE="http://www.gnome.org/~veillard/gamin/" +SRC_URI="${SRC_URI} + mirror://gentoo/gamin-0.1.9-freebsd.patch.bz2 + http://dev.gentoo.org/~grobian/patches/libgamin-0.1.10-opensolaris.patch.bz2 + http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz" # pkg.m4 for eautoreconf + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="debug kernel_linux python static-libs" + +RESTRICT="test" # needs gam-server + +RDEPEND="!app-admin/fam + !<app-admin/gamin-0.1.10" +DEPEND="${RDEPEND}" + +pkg_setup() { + if use python; then + python_pkg_setup + fi +} + +src_prepare() { + mv -vf "${WORKDIR}"/pkg-config-*/pkg.m4 "${WORKDIR}"/ || die + + # Fix QA warnings, bug #257281, upstream #466791 + epatch "${FILESDIR}"/${PN}-0.1.10-compilewarnings.patch + + if [[ ${CHOST} != *-solaris* ]] ; then + # Fix compile warnings; bug #188923 + epatch "${DISTDIR}"/gamin-0.1.9-freebsd.patch.bz2 + else + # (Open)Solaris necessary patches (changes configure.in), unfortunately + # conflicts with freebsd patch and breaks some linux installs so it must + # only be applied if on solaris. + epatch "${DISTDIR}"/${P}-opensolaris.patch.bz2 + fi + + # Fix collision problem due to intermediate library, upstream bug #530635 + epatch "${FILESDIR}"/${PN}-0.1.10-noinst-lib.patch + + # Fix compilation with latest glib, bug #382783 + epatch "${FILESDIR}/${PN}-0.1.10-G_CONST_RETURN-removal.patch" + + # Fix crosscompilation issues, bug #267604 + epatch "${FILESDIR}/${PN}-0.1.10-crosscompile-fix.patch" + + # Enable linux specific features on armel, upstream bug #588338 + epatch "${FILESDIR}/${P}-armel-features.patch" + + # Fix possible server deadlock in ih_sub_cancel, upstream bug #667230 + epatch "${FILESDIR}/${PN}-0.1.10-deadlock.patch" + + # Drop DEPRECATED flags + sed -i -e 's:-DG_DISABLE_DEPRECATED:$(NULL):g' server/Makefile.am || die + + # Build only shared version of Python module. + epatch "${FILESDIR}"/${PN}-0.1.10-disable_python_static_library.patch + + # Python bindings are built/installed manually. + sed -e "/SUBDIRS += python/d" -i Makefile.am + + # autoconf is required as the user-cflags patch modifies configure.in + # however, elibtoolize is also required, so when the above patch is + # removed, replace the following call with a call to elibtoolize + AT_M4DIR="${WORKDIR}" eautoreconf + + use python && python_clean_py-compile_files +} + +src_configure() { + econf \ + $(use_enable static-libs static) \ + --disable-debug \ + --disable-server \ + $(use_enable kernel_linux inotify) \ + $(use_enable debug debug-api) \ + $(use_with python) +} + +src_compile() { + default + + if use python; then + python_copy_sources python + + building() { + emake \ + PYTHON_INCLUDES="${EPREFIX}$(python_get_includedir)" \ + PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)" \ + PYTHON_VERSION="$(python_get_version)" + } + python_execute_function -s --source-dir python building + fi +} + +src_install() { + emake DESTDIR="${D}" install + + if use python; then + installation() { + emake \ + DESTDIR="${D}" \ + PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)" \ + PYTHON_VERSION="$(python_get_version)" \ + install + } + python_execute_function -s --source-dir python installation + + python_clean_installation_image + fi + + dodoc AUTHORS ChangeLog README TODO NEWS doc/*txt + dohtml doc/* + + find "${D}" -name '*.la' -exec rm -f {} + +} + +pkg_postinst() { + if use python; then + python_mod_optimize gamin.py + fi +} + +pkg_postrm() { + if use python; then + python_mod_cleanup gamin.py + fi +} |