Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=edbc7743c79a9ec3b7a8c806aed072af33e9358c

commit edbc7743c79a9ec3b7a8c806aed072af33e9358c
Author: Marius Cirsta <[email protected]>
Date:   Thu Mar 17 23:55:47 2016 +0200

qt5-base-5.6.0-2-x86_64

* add patch for kde

diff --git a/source/xlib-extra/qt5-base/FrugalBuild 
b/source/xlib-extra/qt5-base/FrugalBuild
index dc3c8c3..1da53cb 100644
--- a/source/xlib-extra/qt5-base/FrugalBuild
+++ b/source/xlib-extra/qt5-base/FrugalBuild
@@ -2,7 +2,7 @@
# Maintainer: Marius Cirsta <[email protected]>

pkgname=qt5-base
-pkgrel=1
+pkgrel=2
Finclude qt5
pkgdesc="The Qt5 GUI toolkit."
depends=('libxkbcommon' 'xcb-util-image' 'xcb-util-wm' 'dbus' 'harfbuzz' \
@@ -15,7 +15,10 @@ replaces=('libqt5concurrent' 'libqt5core' 'libqt5dbus' 
'libqt5gui' 'libqt5networ
'qt5-plugin-mysql' 'qt5-plugin-odbc' 'qt5-plugin-psql' 'qt5-plugin-sqlite3' 
'qt5')
conflicts=("${replaces[@]}")
provides=("${replaces[@]}")
-sha1sums=('7536cb165f773efd2202dbb44d7ad0fe1ce66ce3')
+source=(${source[@]} QTBUG-51676-Fix-QtDBus-deadlock-inside-kded-kiod.patch)
+sha1sums=('7536cb165f773efd2202dbb44d7ad0fe1ce66ce3' \
+          '617d7814f4076a23f26935053123e9e00dfe16b7')
+
Fconfopts+=" -prefix /usr \
-bindir /usr/lib/qt5/bin \
-headerdir /usr/include/qt5 \
@@ -65,6 +68,7 @@ subarchs+=('i686 x86_64')

build()
{
+       Fpatchall
Fmake
make  INSTALL_ROOT=$Fdestdir install || Fdie
for i in ${Fdestdir}/usr/lib/qt5/bin/*; do
diff --git 
a/source/xlib-extra/qt5-base/QTBUG-51676-Fix-QtDBus-deadlock-inside-kded-kiod.patch
 
b/source/xlib-extra/qt5-base/QTBUG-51676-Fix-QtDBus-deadlock-inside-kded-kiod.patch
new file mode 100644
index 0000000..d78978a
--- /dev/null
+++ 
b/source/xlib-extra/qt5-base/QTBUG-51676-Fix-QtDBus-deadlock-inside-kded-kiod.patch
@@ -0,0 +1,81 @@
+From 42e14c187f7b2eedb5be7b7a49efb4031f12a02e Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <[email protected]>
+Date: Tue, 15 Mar 2016 11:00:20 -0700
+Subject: [PATCH] Fix QtDBus deadlock inside kded/kiod
+
+Whenever a message spy was installed, we failed to actually process
+looped-back messages by queueing them for processing by the spy. That
+had as a consequence that the caller got an error reply and the message,
+later, we attempted to deliver the message. Since that message still was
+isLocal==true, bad things happened inside the manager thread.
+
+The correct solution is not to queue the message for the filter. We could
+have filtered the message directly, but instead this commit opts not to
+filter looped-back messages. That implies kded/kiod must not attempt to
+load its modules by way of a looped-back message.
+
+Task-number: QTBUG-51676
+Change-Id: I1dc112894cde7121e8ce302ae51b438ade1ff612
+---
+ src/dbus/qdbusintegrator.cpp | 19 +++++++++++++------
+ 1 file changed, 13 insertions(+), 6 deletions(-)
+
+diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
+index cd44861..6052766 100644
+--- a/src/dbus/qdbusintegrator.cpp
++++ b/src/dbus/qdbusintegrator.cpp
+@@ -509,7 +509,12 @@ bool QDBusConnectionPrivate::handleMessage(const 
QDBusMessage &amsg)
+ {
+     if (!ref.load())
+         return false;
+-    if (!dispatchEnabled && !QDBusMessagePrivate::isLocal(amsg)) {
++
++    // local message are always delivered, regardless of filtering
++    // or whether the dispatcher is enabled
++    bool isLocal = QDBusMessagePrivate::isLocal(amsg);
++
++    if (!dispatchEnabled && !isLocal) {
+         // queue messages only, we'll handle them later
+         qDBusDebug() << this << "delivery is suspended";
+         pendingMessages << amsg;
+@@ -524,7 +529,7 @@ bool QDBusConnectionPrivate::handleMessage(const 
QDBusMessage &amsg)
+         return false;
+     case QDBusMessage::MethodCallMessage:
+         // run it through the spy filters (if any) before the regular 
processing
+-        if (Q_UNLIKELY(qDBusSpyHookList.exists()) && qApp) {
++        if (Q_UNLIKELY(qDBusSpyHookList.exists()) && !isLocal && qApp) {
+             const QDBusSpyHookList &list = *qDBusSpyHookList;
+             qDBusDebug() << this << "invoking message spies";
+             QCoreApplication::postEvent(qApp, new QDBusSpyCallEvent(this, 
QDBusConnection(this),
+@@ -1451,9 +1456,9 @@ void QDBusConnectionPrivate::handleObjectCall(const 
QDBusMessage &msg)
+     // that means the dispatchLock mutex is locked
+     // must not call out to user code in that case
+     //
+-    // however, if the message is internal, handleMessage was called
+-    // directly and no lock is in place. We can therefore call out to
+-    // user code, if necessary
++    // however, if the message is internal, handleMessage was called directly
++    // (user's thread) and no lock is in place. We can therefore call out to
++    // user code, if necessary.
+     ObjectTreeNode result;
+     int usedLength;
+     QThread *objThread = 0;
+@@ -1492,12 +1497,14 @@ void QDBusConnectionPrivate::handleObjectCall(const 
QDBusMessage &msg)
+                                                            usedLength, msg));
+             return;
+         } else if (objThread != QThread::currentThread()) {
+-            // synchronize with other thread
++            // looped-back message, targeting another thread:
++            // synchronize with it
+             postEventToThread(HandleObjectCallPostEventAction, result.obj,
+                               new 
QDBusActivateObjectEvent(QDBusConnection(this), this, result,
+                                                            usedLength, msg, 
&sem));
+             semWait = true;
+         } else {
++            // looped-back message, targeting current thread
+             semWait = false;
+         }
+     } // release the lock
+--
+2.5.0
+
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to