diff options
author | Michael Palimaka <kensington@gentoo.org> | 2016-04-24 02:57:01 +1000 |
---|---|---|
committer | Michael Palimaka <kensington@gentoo.org> | 2016-04-24 03:23:11 +1000 |
commit | 421e93435a836b5245edd3e97a533ab806941e91 (patch) | |
tree | d4ef6b3cf40176ce99ac82a1d6f9144532d93842 /dev-qt/qtdbus | |
parent | app-emulation/qemu-guest-agent: fix build w/newer glibc #580924 (diff) | |
download | gentoo-421e93435a836b5245edd3e97a533ab806941e91.tar.gz gentoo-421e93435a836b5245edd3e97a533ab806941e91.tar.bz2 gentoo-421e93435a836b5245edd3e97a533ab806941e91.zip |
dev-qt: version bump 5.6.0
Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-qt/qtdbus')
-rw-r--r-- | dev-qt/qtdbus/Manifest | 1 | ||||
-rw-r--r-- | dev-qt/qtdbus/files/qtdbus-5.6.0-deadlock.patch | 122 | ||||
-rw-r--r-- | dev-qt/qtdbus/metadata.xml | 5 | ||||
-rw-r--r-- | dev-qt/qtdbus/qtdbus-5.6.0.ebuild | 41 |
4 files changed, 169 insertions, 0 deletions
diff --git a/dev-qt/qtdbus/Manifest b/dev-qt/qtdbus/Manifest index deb6c399c96f..2ff1eb2852cf 100644 --- a/dev-qt/qtdbus/Manifest +++ b/dev-qt/qtdbus/Manifest @@ -1,3 +1,4 @@ DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84 DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2 DIST qtbase-opensource-src-5.5.1.tar.xz 46389212 SHA256 dfa4e8a4d7e4c6b69285e7e8833eeecd819987e1bdbe5baa6b6facd4420de916 SHA512 4d31de136870025dfb7544f255798884af1ad4f3060b0c00a0467c98af1f7de368eb298d4c52ba6d1ad27e36060b30c0314ce7ba0744b15642420ec89587a575 WHIRLPOOL 8975a54a720105d1b12b4f50072b98157f6a91020ecd7bad12ab4a92b7ac4663713a82e87f033cc6ad49602a5f9468c6d3ee23120be6c15d63e55ea0b5a343c4 +DIST qtbase-opensource-src-5.6.0.tar.xz 46757096 SHA256 6efa8a5c559e92b2e526d48034e858023d5fd3c39115ac1bfd3bb65834dbd67a SHA512 5b2a5842346475be0944fc44bc09ff5b5d5da167246310de132f034e17ebbcbbf103b6f085dbf8b566389694bd095227aa1ed569b93e0f9a8f02da51d8fe076e WHIRLPOOL 2f6817a0fbf5ad7f3457e778a33bcf38791ea6e0df68e7de4b0fc3ea8e84b35bc6c5bba2d574105dbaba8edbc8c2d954b13e4cf1784991544f7f77c8d6d68590 diff --git a/dev-qt/qtdbus/files/qtdbus-5.6.0-deadlock.patch b/dev-qt/qtdbus/files/qtdbus-5.6.0-deadlock.patch new file mode 100644 index 000000000000..93a5ed7eb4a9 --- /dev/null +++ b/dev-qt/qtdbus/files/qtdbus-5.6.0-deadlock.patch @@ -0,0 +1,122 @@ +From: Thiago Macieira <thiago.macieira@intel.com> +Date: Tue, 15 Mar 2016 18:00:20 +0000 (-0700) +Subject: Fix QtDBus deadlock inside kded/kiod +X-Git-Url: https://codereview.qt-project.org/gitweb?p=qt%2Fqtbase.git;a=commitdiff_plain;h=11c5e716b08b6b3c5a7c9fce96b0cde8624ec869;hp=85a57f7a2e85ac61bb65e66b003cb21f58d5a5b7 + +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. Worse, since +the message had been queued, QtDBus would attempt to deliver it later. +Since that message had isLocal==true, bad things happened inside the +manager thread. + +The correct solution is not to queue the message for the filter. If the +message is local, then simply deliver directly, as we're still in the +user's thread. This used to be the behavior in Qt 5.5. + +Task-number: QTBUG-51676 +Change-Id: I1dc112894cde7121e8ce302ae51b438ade1ff612 +--- + +diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp +index cd44861..478a2c4 100644 +--- a/src/dbus/qdbusintegrator.cpp ++++ b/src/dbus/qdbusintegrator.cpp +@@ -481,6 +481,11 @@ QDBusSpyCallEvent::~QDBusSpyCallEvent() + + void QDBusSpyCallEvent::placeMetaCall(QObject *) + { ++ invokeSpyHooks(msg, hooks, hookCount); ++} ++ ++inline void QDBusSpyCallEvent::invokeSpyHooks(const QDBusMessage &msg, const Hook *hooks, int hookCount) ++{ + // call the spy hook list + for (int i = 0; i < hookCount; ++i) + hooks[i](msg); +@@ -509,7 +514,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; +@@ -523,13 +533,23 @@ bool QDBusConnectionPrivate::handleMessage(const QDBusMessage &amsg) + // let them see the signal too + return false; + case QDBusMessage::MethodCallMessage: +- // run it through the spy filters (if any) before the regular processing ++ // run it through the spy filters (if any) before the regular processing: ++ // a) if it's a local message, we're in the caller's thread, so invoke the filter directly ++ // b) if it's an external message, post to the main thread + if (Q_UNLIKELY(qDBusSpyHookList.exists()) && qApp) { + const QDBusSpyHookList &list = *qDBusSpyHookList; +- qDBusDebug() << this << "invoking message spies"; +- QCoreApplication::postEvent(qApp, new QDBusSpyCallEvent(this, QDBusConnection(this), +- amsg, list.constData(), list.size())); +- return true; ++ if (isLocal) { ++ Q_ASSERT(QThread::currentThread() != thread()); ++ qDBusDebug() << this << "invoking message spies directly"; ++ QDBusSpyCallEvent::invokeSpyHooks(amsg, list.constData(), list.size()); ++ } else { ++ qDBusDebug() << this << "invoking message spies via event"; ++ QCoreApplication::postEvent(qApp, new QDBusSpyCallEvent(this, QDBusConnection(this), ++ amsg, list.constData(), list.size())); ++ ++ // we'll be called back, so return ++ return true; ++ } + } + + handleObjectCall(amsg); +@@ -1451,9 +1471,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 +1512,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 +diff --git a/src/dbus/qdbusintegrator_p.h b/src/dbus/qdbusintegrator_p.h +index 2bbebdf..c0d9c22 100644 +--- a/src/dbus/qdbusintegrator_p.h ++++ b/src/dbus/qdbusintegrator_p.h +@@ -145,6 +145,7 @@ public: + {} + ~QDBusSpyCallEvent(); + void placeMetaCall(QObject *) Q_DECL_OVERRIDE; ++ static inline void invokeSpyHooks(const QDBusMessage &msg, const Hook *hooks, int hookCount); + + QDBusConnection conn; // keeps the refcount in QDBusConnectionPrivate up + QDBusMessage msg; diff --git a/dev-qt/qtdbus/metadata.xml b/dev-qt/qtdbus/metadata.xml index 6ac3b4e09cb8..f185c428c704 100644 --- a/dev-qt/qtdbus/metadata.xml +++ b/dev-qt/qtdbus/metadata.xml @@ -13,4 +13,9 @@ <bugs-to>https://bugreports.qt.io/</bugs-to> <doc>http://doc.qt.io/</doc> </upstream> + <slots> + <subslots> + Must only be used by packages that are known to use private parts of the Qt API. + </subslots> + </slots> </pkgmetadata> diff --git a/dev-qt/qtdbus/qtdbus-5.6.0.ebuild b/dev-qt/qtdbus/qtdbus-5.6.0.ebuild new file mode 100644 index 000000000000..8c6db2e148fd --- /dev/null +++ b/dev-qt/qtdbus/qtdbus-5.6.0.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +QT5_MODULE="qtbase" +inherit qt5-build + +DESCRIPTION="The D-Bus module for the Qt5 framework" + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86" +fi + +IUSE="" + +DEPEND=" + ~dev-qt/qtcore-${PV} + >=sys-apps/dbus-1.4.20 +" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${P}-deadlock.patch" ) + +QT5_TARGET_SUBDIRS=( + src/dbus + src/tools/qdbusxml2cpp + src/tools/qdbuscpp2xml +) + +QT5_GENTOO_CONFIG=( + :dbus + :dbus-linked: +) + +src_configure() { + local myconf=( + -dbus-linked + ) + qt5-build_src_configure +} |