Date: Friday, April 16, 2010 @ 15:49:15
  Author: ibiru
Revision: 77648

upgpkg: libgnome-keyring 2.30.0-2
fix infinte loop due to no notification from dbus, fixing FS#18908 

Added:
  libgnome-keyring/trunk/fix_endless_loop.patch
Modified:
  libgnome-keyring/trunk/PKGBUILD

------------------------+
 PKGBUILD               |    9 ++++++---
 fix_endless_loop.patch |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2010-04-16 19:48:40 UTC (rev 77647)
+++ PKGBUILD    2010-04-16 19:49:15 UTC (rev 77648)
@@ -3,7 +3,7 @@
 
 pkgname=libgnome-keyring
 pkgver=2.30.0
-pkgrel=1
+pkgrel=2
 pkgdesc="GNOME keyring client library"
 arch=(i686 x86_64)
 license=('GPL' 'LGPL')
@@ -11,11 +11,14 @@
 makedepends=('intltool' 'pkgconfig' 'python')
 options=('!libtool' '!emptydirs')
 url="http://www.gnome.org";
-source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.30/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('11e64445537a8fab367875d1ae4aa00db9227c4db384c5d019cfa85c977b40ec')
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.30/${pkgname}-${pkgver}.tar.bz2
+       fix_endless_loop.patch)
+sha256sums=('11e64445537a8fab367875d1ae4aa00db9227c4db384c5d019cfa85c977b40ec'
+           '6e53216a8fae3e4c4888a44ff14e80fe540b9f21ef3276976cc78928d99cf9b7')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
+  patch -Np1 -i "${srcdir}/fix_endless_loop.patch" || return 1
   ./configure --prefix=/usr --sysconfdir=/etc \
       --localstatedir=/var --disable-static \
       --libexecdir=/usr/lib/gnome-keyring || return 1

Added: fix_endless_loop.patch
===================================================================
--- fix_endless_loop.patch                              (rev 0)
+++ fix_endless_loop.patch      2010-04-16 19:49:15 UTC (rev 77648)
@@ -0,0 +1,46 @@
+From 942ff4eae19732d9f5fd0d549385a7f2d9842444 Mon Sep 17 00:00:00 2001
+From: Stef Walter <[email protected]>
+Date: Fri, 09 Apr 2010 18:39:38 +0000
+Subject: Workaround for problem with endless loop during blocking operations.
+
+Research done by Hiroyuki Ikezoe
+
+This is due to a bug in libdbus where the pending call is completed
+without the relevant callback being called when used in certain
+threading situations.
+
+Fixes bug #606902
+---
+diff --git a/library/gkr-operation.c b/library/gkr-operation.c
+index 214ecc7..9f49e73 100644
+--- a/library/gkr-operation.c
++++ b/library/gkr-operation.c
+@@ -363,13 +363,25 @@ gkr_operation_request (GkrOperation *op, DBusMessage 
*req)
+ GnomeKeyringResult
+ gkr_operation_block (GkrOperation *op)
+ {
++      DBusPendingCall *pending;
+       g_return_val_if_fail (op, BROKEN);
+ 
+       gkr_operation_ref (op);
+ 
+       while ((int) gkr_operation_get_result (op) == INCOMPLETE) {
+               if (op->pending) {
+-                      dbus_pending_call_block (op->pending);
++                      /*
++                       * DBus has strange behavior that can complete a 
pending call
++                       * in another thread and somehow does this without 
calling our
++                       * on_pending_call_notify. So guard against this 
brokenness.
++                       */
++                      pending = op->pending;
++                      dbus_pending_call_block (pending);
++                      if (op->pending == pending) {
++                              g_return_val_if_fail 
(dbus_pending_call_get_completed (pending), BROKEN);
++                              on_pending_call_notify (pending, op);
++                              g_assert (op->pending != pending);
++                      }
+               } else if (op->prompting) {
+                       dbus_connection_flush (op->conn);
+                       while (op->prompting && (int) gkr_operation_get_result 
(op) == INCOMPLETE) {
+--
+cgit v0.8.3.1

Reply via email to