Merge branch 'master' of github.com:pisilinux/main into golang_new
This commit is contained in:
@@ -8,11 +8,7 @@ from pisi.actionsapi import kde5
|
||||
from pisi.actionsapi import pisitools
|
||||
|
||||
def setup():
|
||||
kde5.configure("-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-D__KDE_HAVE_GCC_VISIBILITY=NO \
|
||||
kde5.configure("-D__KDE_HAVE_GCC_VISIBILITY=NO \
|
||||
-DPHONON_BUILD_PHONON4QT5=ON")
|
||||
|
||||
def build():
|
||||
|
||||
@@ -13,8 +13,10 @@
|
||||
<IsA>library</IsA>
|
||||
<Summary>GStreamer qt5-phonon backend</Summary>
|
||||
<Description>Phonon is the Qt multimedia API, which provides a task-oriented abstraction layer for capturing, mixing, processing, and playing audio and video content. phonon-backend-gstreamer contains the GStreamer backend for Phonon.</Description>
|
||||
<Archive sha1sum="9998ba3a002af09e1ba4072508d1813af1d1e5be" type="tarxz">mirrors://kde/stable/phonon/phonon-backend-gstreamer/4.8.2/src/phonon-backend-gstreamer-4.8.2.tar.xz</Archive>
|
||||
<Archive sha1sum="81f16c98e35a6377fefd8ce8e66e1e2ec609c94d" type="tarxz">http://download.kde.org/stable/phonon/phonon-backend-gstreamer/4.9.0/phonon-backend-gstreamer-4.9.0.tar.xz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>extra-cmake-modules</Dependency>
|
||||
<Dependency>qt5-x11extras-devel</Dependency>
|
||||
<Dependency>qt5-base-devel</Dependency>
|
||||
<Dependency>qt5-phonon-devel</Dependency>
|
||||
<Dependency>gstreamer-devel</Dependency>
|
||||
@@ -23,7 +25,6 @@
|
||||
<Dependency>gst-plugins-base-next-devel</Dependency>
|
||||
<Dependency>mesa-devel</Dependency>
|
||||
<Dependency>libxml2-devel</Dependency>
|
||||
<Dependency>cmake</Dependency>
|
||||
</BuildDependencies>
|
||||
</Source>
|
||||
|
||||
@@ -31,6 +32,7 @@
|
||||
<Name>qt5-phonon-backend-gstreamer</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>qt5-base</Dependency>
|
||||
<Dependency>qt5-x11extras</Dependency>
|
||||
<Dependency>qt5-phonon</Dependency>
|
||||
<Dependency>mesa</Dependency>
|
||||
<Dependency>glib2</Dependency>
|
||||
@@ -46,6 +48,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="2">
|
||||
<Date>2016-05-03</Date>
|
||||
<Version>4.9.0</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Stefan Gronewold(groni)</Name>
|
||||
<Email>groni@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="1">
|
||||
<Date>2015-08-18</Date>
|
||||
<Version>4.8.2</Version>
|
||||
|
||||
@@ -9,18 +9,13 @@ from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
def setup():
|
||||
kde5.configure("-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=ON \
|
||||
-DPHONON_BUILD_PHONON4QT5=ON \
|
||||
-D__KDE_HAVE_GCC_VISIBILITY=NO \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib")
|
||||
kde5.configure("-DPHONON_BUILD_PHONON4QT5=ON")
|
||||
|
||||
def build():
|
||||
kde5.make()
|
||||
|
||||
def install():
|
||||
kde5.install()
|
||||
|
||||
pisitools.dosym("/usr/include/KDE/Phonon", "/usr/include/Phonon")
|
||||
|
||||
pisitools.domove("/usr/share/qt5/mkspecs/modules/qt_phonon4qt5.pri", "/usr/lib/qt5/mkspecs/modules/")
|
||||
pisitools.removeDir("/usr/share/qt5")
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
<IsA>library</IsA>
|
||||
<Summary>Cross platform multimedia API for KDE4 using QT5</Summary>
|
||||
<Description>Phonon was created as a solution to several problems with multimedia commonly faced by Unix desktops, especially KDE 3's outdated multimedia framework aRts. Phonon itself is not a multimedia framework, but interfaces with existing frameworks such as GStreamer or Xine via backends.</Description>
|
||||
<Archive sha1sum="aac5dc44ae4821e6165c6735b9c6063dd111ac03" type="tarxz">mirrors://kde/stable/phonon/4.8.3/src/phonon-4.8.3.tar.xz</Archive>
|
||||
<Archive sha1sum="5823cec679f16021c121dfb756fb215cee17caee" type="tarxz">http://download.kde.org/stable/phonon/4.9.0/phonon-4.9.0.tar.xz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>extra-cmake-modules</Dependency>
|
||||
<Dependency>qt5-base-devel</Dependency>
|
||||
<Dependency>qt5-designer-devel</Dependency>
|
||||
<Dependency>qt5-quick1-devel</Dependency>
|
||||
@@ -22,11 +23,10 @@
|
||||
<Dependency>gst-plugins-base-devel</Dependency>
|
||||
<Dependency>pulseaudio-libs-devel</Dependency>
|
||||
<Dependency>gstreamer-devel</Dependency>
|
||||
<Dependency>cmake</Dependency>
|
||||
<Dependency>mesa-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch>qt-5.4.2.patch</Patch>
|
||||
<!-- <Patch>qt-5.4.2.patch</Patch> -->
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<Path fileType="library">/usr/lib/libphonon*</Path>
|
||||
<Path fileType="library">/usr/lib/qt5</Path>
|
||||
<Path fileType="data">/usr/share/dbus-1</Path>
|
||||
<Path fileType="data">/usr/share/phonon4qt5</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
@@ -59,12 +60,18 @@
|
||||
<Path fileType="header">/usr/include</Path>
|
||||
<Path fileType="data">/usr/lib/pkgconfig</Path>
|
||||
<Path fileType="data">/usr/lib/cmake</Path>
|
||||
<Path fileType="data">/usr/share/phonon4qt5</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="1">
|
||||
<Update release="2">
|
||||
<Date>2016-05-03</Date>
|
||||
<Version>4.9.0</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Stefan Gronewold(groni)</Name>
|
||||
<Email>groni@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="1">
|
||||
<Date>2015-08-13</Date>
|
||||
<Version>4.8.3</Version>
|
||||
<Comment>First release</Comment>
|
||||
@@ -72,5 +79,4 @@
|
||||
<Email>groni@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
|
||||
</PISI>
|
||||
|
||||
@@ -102,7 +102,7 @@ def setup():
|
||||
|
||||
def build():
|
||||
shelltools.export("LD_LIBRARY_PATH", "%s/lib:%s" % (get.curDIR(), get.ENV("LD_LIBRARY_PATH")))
|
||||
autotools.make()
|
||||
qt5.make()
|
||||
|
||||
def install():
|
||||
if get.buildTYPE() == "emul32":
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- qtbase-opensource-src-5.6.0-rc/config.tests/unix/alsa/alsatest.cpp.0 2016-02-29 08:15:48.203031809 +0000
|
||||
+++ qtbase-opensource-src-5.6.0-rc/config.tests/unix/alsa/alsatest.cpp 2016-02-29 08:16:39.712811962 +0000
|
||||
@@ -32,7 +32,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <alsa/asoundlib.h>
|
||||
-#if(!(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10))
|
||||
+#if(!(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 10)))
|
||||
#error "Alsa version found too old, require >= 1.0.10"
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
From 269fdbdd2bedda5f5eacb751224d3a3fc3eed5bc Mon Sep 17 00:00:00 2001
|
||||
From: Urs Fleisch <ufleisch@users.sourceforge.net>
|
||||
Date: Fri, 26 Feb 2016 17:46:09 +0100
|
||||
Subject: [PATCH] xcb: Fix drag and drop to applications like Emacs and
|
||||
Chromium.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Drops without matching time stamp do not work. I have fixed the issue by
|
||||
reanimating the findXdndAwareParent() function (adapted to XCB) and
|
||||
using it to find a matching transaction if all else fails.
|
||||
|
||||
Task-number: QTBUG-45812
|
||||
Change-Id: Ibca15bbab02ccf2f25280418e9edf36972ebf9a0
|
||||
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
|
||||
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
|
||||
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
|
||||
---
|
||||
src/plugins/platforms/xcb/qxcbdrag.cpp | 55 +++++++++++++++++++++++++++-------
|
||||
1 file changed, 44 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
|
||||
index f5cc873..f1428d0 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
|
||||
@@ -1072,6 +1072,40 @@ void QXcbDrag::cancel()
|
||||
send_leave();
|
||||
}
|
||||
|
||||
+// find an ancestor with XdndAware on it
|
||||
+static xcb_window_t findXdndAwareParent(QXcbConnection *c, xcb_window_t window)
|
||||
+{
|
||||
+ xcb_window_t target = 0;
|
||||
+ forever {
|
||||
+ // check if window has XdndAware
|
||||
+ xcb_get_property_cookie_t gpCookie = Q_XCB_CALL(
|
||||
+ xcb_get_property(c->xcb_connection(), false, window,
|
||||
+ c->atom(QXcbAtom::XdndAware), XCB_GET_PROPERTY_TYPE_ANY, 0, 0));
|
||||
+ xcb_get_property_reply_t *gpReply = xcb_get_property_reply(
|
||||
+ c->xcb_connection(), gpCookie, 0);
|
||||
+ bool aware = gpReply && gpReply->type != XCB_NONE;
|
||||
+ free(gpReply);
|
||||
+ if (aware) {
|
||||
+ target = window;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ // try window's parent
|
||||
+ xcb_query_tree_cookie_t qtCookie = Q_XCB_CALL(
|
||||
+ xcb_query_tree_unchecked(c->xcb_connection(), window));
|
||||
+ xcb_query_tree_reply_t *qtReply = xcb_query_tree_reply(
|
||||
+ c->xcb_connection(), qtCookie, NULL);
|
||||
+ if (!qtReply)
|
||||
+ break;
|
||||
+ xcb_window_t root = qtReply->root;
|
||||
+ xcb_window_t parent = qtReply->parent;
|
||||
+ free(qtReply);
|
||||
+ if (window == root)
|
||||
+ break;
|
||||
+ window = parent;
|
||||
+ }
|
||||
+ return target;
|
||||
+}
|
||||
|
||||
void QXcbDrag::handleSelectionRequest(const xcb_selection_request_event_t *event)
|
||||
{
|
||||
@@ -1099,17 +1133,16 @@ void QXcbDrag::handleSelectionRequest(const xcb_selection_request_event_t *event
|
||||
// xcb_convert_selection() that we sent the XdndDrop event to.
|
||||
at = findTransactionByWindow(event->requestor);
|
||||
}
|
||||
-// if (at == -1 && event->time == XCB_CURRENT_TIME) {
|
||||
-// // previous Qt versions always requested the data on a child of the target window
|
||||
-// // using CurrentTime... but it could be asking for either drop data or the current drag's data
|
||||
-// Window target = findXdndAwareParent(event->requestor);
|
||||
-// if (target) {
|
||||
-// if (current_target && current_target == target)
|
||||
-// at = -2;
|
||||
-// else
|
||||
-// at = findXdndDropTransactionByWindow(target);
|
||||
-// }
|
||||
-// }
|
||||
+
|
||||
+ if (at == -1 && event->time == XCB_CURRENT_TIME) {
|
||||
+ xcb_window_t target = findXdndAwareParent(connection(), event->requestor);
|
||||
+ if (target) {
|
||||
+ if (current_target == target)
|
||||
+ at = -2;
|
||||
+ else
|
||||
+ at = findTransactionByWindow(target);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
QDrag *transactionDrag = 0;
|
||||
--
|
||||
2.7.1
|
||||
@@ -0,0 +1,87 @@
|
||||
From b024fbe83863fc57364a52c717d5b43d654bdb5d Mon Sep 17 00:00:00 2001
|
||||
From: Weng Xuetian <wengxt@gmail.com>
|
||||
Date: Sat, 5 Mar 2016 12:23:21 -0800
|
||||
Subject: [PATCH] QtDBus: clean up signal hooks and object tree in
|
||||
closeConnection
|
||||
|
||||
If a QObject is added or passed as receiver to QDBusConnection::connect()
|
||||
and it is managed by Q_GLOBAL_STATIC or similar mechanism, it is
|
||||
possible that when that its destructor is called after the dbus daemon
|
||||
thread ends. In that case, QObject::destroyed connected via
|
||||
Qt::BlockingQueuedConnection to QDBusConnectionPrivate will cause dead
|
||||
lock since the thread is no longer processing events.
|
||||
|
||||
Task-number: QTBUG-51648
|
||||
Change-Id: I1a1810a6d6d0234af0269d5f3fc1f54101bf1547
|
||||
---
|
||||
src/dbus/qdbusconnection_p.h | 1 +
|
||||
src/dbus/qdbusintegrator.cpp | 28 +++++++++++++++++++++++++++-
|
||||
2 files changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
|
||||
index c77daf7..565eb83 100644
|
||||
--- a/src/dbus/qdbusconnection_p.h
|
||||
+++ b/src/dbus/qdbusconnection_p.h
|
||||
@@ -254,6 +254,7 @@ private:
|
||||
const QVector<int> &metaTypes, int slotIdx);
|
||||
|
||||
SignalHookHash::Iterator removeSignalHookNoLock(SignalHookHash::Iterator it);
|
||||
+ void disconnectObjectTree(ObjectTreeNode &node);
|
||||
|
||||
bool isServiceRegisteredByThread(const QString &serviceName);
|
||||
|
||||
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
|
||||
index cd44861..a3cd47b 100644
|
||||
--- a/src/dbus/qdbusintegrator.cpp
|
||||
+++ b/src/dbus/qdbusintegrator.cpp
|
||||
@@ -1030,7 +1030,6 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate()
|
||||
qPrintable(name));
|
||||
|
||||
closeConnection();
|
||||
- rootNode.children.clear(); // free resources
|
||||
qDeleteAll(cachedMetaObjects);
|
||||
|
||||
if (mode == ClientMode || mode == PeerMode) {
|
||||
@@ -1052,6 +1051,20 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate()
|
||||
}
|
||||
}
|
||||
|
||||
+void QDBusConnectionPrivate::disconnectObjectTree(QDBusConnectionPrivate::ObjectTreeNode &haystack)
|
||||
+{
|
||||
+ QDBusConnectionPrivate::ObjectTreeNode::DataList::Iterator it = haystack.children.begin();
|
||||
+
|
||||
+ while (it != haystack.children.end()) {
|
||||
+ disconnectObjectTree(*it);
|
||||
+ it++;
|
||||
+ }
|
||||
+
|
||||
+ if (haystack.obj) {
|
||||
+ haystack.obj->disconnect(this);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void QDBusConnectionPrivate::closeConnection()
|
||||
{
|
||||
QDBusWriteLocker locker(CloseConnectionAction, this);
|
||||
@@ -1075,6 +1088,19 @@ void QDBusConnectionPrivate::closeConnection()
|
||||
}
|
||||
|
||||
qDeleteAll(pendingCalls);
|
||||
+
|
||||
+ // clean up all signal hook and object tree, to avoid QObject::destroyed
|
||||
+ // being activated to dbus daemon thread which already quits.
|
||||
+ // dbus connection is already closed, so there is nothing we could do be clean
|
||||
+ // up everything here.
|
||||
+ SignalHookHash::iterator sit = signalHooks.begin();
|
||||
+ while (sit != signalHooks.end()) {
|
||||
+ sit.value().obj->disconnect(this);
|
||||
+ sit++;
|
||||
+ }
|
||||
+
|
||||
+ disconnectObjectTree(rootNode);
|
||||
+ rootNode.children.clear(); // free resources
|
||||
}
|
||||
|
||||
void QDBusConnectionPrivate::checkThread()
|
||||
--
|
||||
2.7.1
|
||||
@@ -0,0 +1,158 @@
|
||||
From acde2e69df5dedc624674107596f276125e22864 Mon Sep 17 00:00:00 2001
|
||||
From: Weng Xuetian <wengxt@gmail.com>
|
||||
Date: Thu, 3 Mar 2016 21:56:53 -0800
|
||||
Subject: [PATCH] QtDBus: finish all pending call with error if disconnected
|
||||
|
||||
libdbus will send a local signal if connection gets disconnected. When
|
||||
this happens, end all pending calls with QDBusError::Disconnected.
|
||||
|
||||
Task-number: QTBUG-51649
|
||||
Change-Id: I5c7d2a468bb5da746d0c0e53e458c1e376f186a9
|
||||
---
|
||||
src/dbus/dbus_minimal_p.h | 2 ++
|
||||
src/dbus/qdbusintegrator.cpp | 26 +++++++++++++++++-----
|
||||
src/dbus/qdbusutil_p.h | 6 +++++
|
||||
.../dbus/qdbusconnection/tst_qdbusconnection.cpp | 22 ++++++++++++++++++
|
||||
.../dbus/qdbusconnection/tst_qdbusconnection.h | 1 +
|
||||
5 files changed, 51 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/dbus/dbus_minimal_p.h b/src/dbus/dbus_minimal_p.h
|
||||
index f0a2954..8f25b24 100644
|
||||
--- a/src/dbus/dbus_minimal_p.h
|
||||
+++ b/src/dbus/dbus_minimal_p.h
|
||||
@@ -99,9 +99,11 @@ typedef dbus_uint32_t dbus_bool_t;
|
||||
/* dbus-shared.h */
|
||||
#define DBUS_SERVICE_DBUS "org.freedesktop.DBus"
|
||||
#define DBUS_PATH_DBUS "/org/freedesktop/DBus"
|
||||
+#define DBUS_PATH_LOCAL "/org/freedesktop/DBus/Local"
|
||||
#define DBUS_INTERFACE_DBUS "org.freedesktop.DBus"
|
||||
#define DBUS_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable"
|
||||
#define DBUS_INTERFACE_PROPERTIES "org.freedesktop.DBus.Properties"
|
||||
+#define DBUS_INTERFACE_LOCAL "org.freedesktop.DBus.Local"
|
||||
|
||||
#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1 /**< Allow another service to become the primary owner if requested */
|
||||
#define DBUS_NAME_FLAG_REPLACE_EXISTING 0x2 /**< Request to replace the current primary owner */
|
||||
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
|
||||
index cd44861..320419f 100644
|
||||
--- a/src/dbus/qdbusintegrator.cpp
|
||||
+++ b/src/dbus/qdbusintegrator.cpp
|
||||
@@ -519,6 +519,14 @@ bool QDBusConnectionPrivate::handleMessage(const QDBusMessage &amsg)
|
||||
switch (amsg.type()) {
|
||||
case QDBusMessage::SignalMessage:
|
||||
handleSignal(amsg);
|
||||
+ // Check local disconnected signal from libdbus
|
||||
+ if (amsg.interface() == QDBusUtil::dbusInterfaceLocal()
|
||||
+ && amsg.path() == QDBusUtil::dbusPathLocal()
|
||||
+ && amsg.member() == QDBusUtil::disconnected()
|
||||
+ && !QDBusMessagePrivate::isLocal(amsg)) {
|
||||
+ while (!pendingCalls.isEmpty())
|
||||
+ processFinishedCall(pendingCalls.first());
|
||||
+ }
|
||||
// if there are any other filters in this DBusConnection,
|
||||
// let them see the signal too
|
||||
return false;
|
||||
@@ -1767,10 +1775,16 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
|
||||
|
||||
QDBusMessage &msg = call->replyMessage;
|
||||
if (call->pending) {
|
||||
- // decode the message
|
||||
- DBusMessage *reply = q_dbus_pending_call_steal_reply(call->pending);
|
||||
- msg = QDBusMessagePrivate::fromDBusMessage(reply, connection->capabilities);
|
||||
- q_dbus_message_unref(reply);
|
||||
+ // when processFinishedCall is called and pending call is not completed,
|
||||
+ // it means we received disconnected signal from libdbus
|
||||
+ if (q_dbus_pending_call_get_completed(call->pending)) {
|
||||
+ // decode the message
|
||||
+ DBusMessage *reply = q_dbus_pending_call_steal_reply(call->pending);
|
||||
+ msg = QDBusMessagePrivate::fromDBusMessage(reply, connection->capabilities);
|
||||
+ q_dbus_message_unref(reply);
|
||||
+ } else {
|
||||
+ msg = QDBusMessage::createError(QDBusError::Disconnected, QDBusUtil::disconnectedErrorMessage());
|
||||
+ }
|
||||
}
|
||||
qDBusDebug() << connection << "got message reply:" << msg;
|
||||
|
||||
@@ -2070,8 +2084,8 @@ void QDBusConnectionPrivate::sendInternal(QDBusPendingCallPrivate *pcall, void *
|
||||
pcall->pending = pending;
|
||||
q_dbus_pending_call_set_notify(pending, qDBusResultReceived, pcall, 0);
|
||||
|
||||
- // DBus won't notify us when a peer disconnects so we need to track these ourselves
|
||||
- if (mode == QDBusConnectionPrivate::PeerMode)
|
||||
+ // DBus won't notify us when a peer disconnects or server terminates so we need to track these ourselves
|
||||
+ if (mode == QDBusConnectionPrivate::PeerMode || mode == QDBusConnectionPrivate::ClientMode)
|
||||
pendingCalls.append(pcall);
|
||||
|
||||
return;
|
||||
diff --git a/src/dbus/qdbusutil_p.h b/src/dbus/qdbusutil_p.h
|
||||
index 8f5ae92..ca70ff9 100644
|
||||
--- a/src/dbus/qdbusutil_p.h
|
||||
+++ b/src/dbus/qdbusutil_p.h
|
||||
@@ -155,6 +155,8 @@ namespace QDBusUtil
|
||||
{ return QStringLiteral(DBUS_SERVICE_DBUS); }
|
||||
inline QString dbusPath()
|
||||
{ return QStringLiteral(DBUS_PATH_DBUS); }
|
||||
+ inline QString dbusPathLocal()
|
||||
+ { return QStringLiteral(DBUS_PATH_LOCAL); }
|
||||
inline QString dbusInterface()
|
||||
{
|
||||
// it's the same string, but just be sure
|
||||
@@ -165,8 +167,12 @@ namespace QDBusUtil
|
||||
{ return QStringLiteral(DBUS_INTERFACE_PROPERTIES); }
|
||||
inline QString dbusInterfaceIntrospectable()
|
||||
{ return QStringLiteral(DBUS_INTERFACE_INTROSPECTABLE); }
|
||||
+ inline QString dbusInterfaceLocal()
|
||||
+ { return QStringLiteral(DBUS_INTERFACE_LOCAL); }
|
||||
inline QString nameOwnerChanged()
|
||||
{ return QStringLiteral("NameOwnerChanged"); }
|
||||
+ inline QString disconnected()
|
||||
+ { return QStringLiteral("Disconnected"); }
|
||||
inline QString disconnectedErrorMessage()
|
||||
{ return QStringLiteral("Not connected to D-Bus server"); }
|
||||
}
|
||||
diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
|
||||
index e91f87d..6c7e6b1 100644
|
||||
--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
|
||||
+++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
|
||||
@@ -1218,6 +1218,28 @@ void tst_QDBusConnection::callVirtualObjectLocal()
|
||||
QCOMPARE(obj.replyArguments, subPathReply.arguments());
|
||||
}
|
||||
|
||||
+void tst_QDBusConnection::pendingCallWhenDisconnected()
|
||||
+{
|
||||
+ QDBusServer *server = new QDBusServer;
|
||||
+ QDBusConnection con = QDBusConnection::connectToPeer(server->address(), "disconnect");
|
||||
+ QTestEventLoop::instance().enterLoop(2);
|
||||
+ QVERIFY(!QTestEventLoop::instance().timeout());
|
||||
+ QVERIFY(con.isConnected());
|
||||
+
|
||||
+ delete server;
|
||||
+
|
||||
+ // Make sure we call the method before we know it is disconnected.
|
||||
+ QVERIFY(con.isConnected());
|
||||
+ QDBusMessage message = QDBusMessage::createMethodCall("", "/", QString(), "method");
|
||||
+ QDBusPendingCall reply = con.asyncCall(message);
|
||||
+
|
||||
+ QTestEventLoop::instance().enterLoop(2);
|
||||
+ QVERIFY(!con.isConnected());
|
||||
+ QVERIFY(reply.isFinished());
|
||||
+ QVERIFY(reply.isError());
|
||||
+ QVERIFY(reply.error().type() == QDBusError::Disconnected);
|
||||
+}
|
||||
+
|
||||
QString MyObject::path;
|
||||
QString MyObjectWithoutInterface::path;
|
||||
QString MyObjectWithoutInterface::interface;
|
||||
diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
|
||||
index a53ba32..720e484 100644
|
||||
--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
|
||||
+++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
|
||||
@@ -121,6 +121,7 @@ private slots:
|
||||
void registerVirtualObject();
|
||||
void callVirtualObject();
|
||||
void callVirtualObjectLocal();
|
||||
+ void pendingCallWhenDisconnected();
|
||||
|
||||
public:
|
||||
QString serviceName() const { return "org.qtproject.Qt.Autotests.QDBusConnection"; }
|
||||
--
|
||||
2.7.1
|
||||
@@ -0,0 +1,125 @@
|
||||
From 11c5e716b08b6b3c5a7c9fce96b0cde8624ec869 Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Macieira <thiago.macieira@intel.com>
|
||||
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. 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
|
||||
---
|
||||
src/dbus/qdbusintegrator.cpp | 42 ++++++++++++++++++++++++++++++++----------
|
||||
src/dbus/qdbusintegrator_p.h | 1 +
|
||||
2 files changed, 33 insertions(+), 10 deletions(-)
|
||||
|
||||
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;
|
||||
--
|
||||
2.7.1
|
||||
@@ -72,14 +72,19 @@
|
||||
<Patches>
|
||||
<!-- Pisilinux Patches -->
|
||||
<Patch level="1">mkspecs.patch</Patch>
|
||||
<Patch level="1">qt5-alsa1.11.patch</Patch>
|
||||
<Patch level="1">qtbug-45812.patch</Patch>
|
||||
<Patch level="1">qtbug-51648.patch</Patch>
|
||||
<Patch level="1">qtbug-51649.patch</Patch>
|
||||
<Patch level="1">qtbug-51676.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>qt5-base</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>libpcre</Dependency>
|
||||
<Dependency>libgcc</Dependency>
|
||||
<Dependency>libpcre</Dependency>
|
||||
<Dependency>libgcc</Dependency>
|
||||
<Dependency>cups</Dependency>
|
||||
<Dependency>dbus</Dependency>
|
||||
<!-- <Dependency>gtk2</Dependency> -->
|
||||
@@ -251,7 +256,7 @@
|
||||
|
||||
<History>
|
||||
<Update release="2">
|
||||
<Date>2016-05-02</Date>
|
||||
<Date>2016-05-04</Date>
|
||||
<Version>5.6.0</Version>
|
||||
<Comment>Release Bump</Comment>
|
||||
<Name>PisiLinux Community</Name>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>The Advanced Linux Sound Architecture (ALSA) library</Summary>
|
||||
<Description>alsa-lib provides ALSA runtime libraries to simplify application programming and provide higher level functionality as well as support for the older OSS API, providing binary compatibility for most OSS programs.</Description>
|
||||
<Archive sha1sum="9b81d20417170db2a91452bfe537d0893ef4df89" type="tarbz2">ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.29.tar.bz2</Archive>
|
||||
<Archive sha1sum="09f7e9b2d88287e04a4bb0d56e0cbc9018e524ec" type="tarbz2">ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.1.tar.bz2</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>python-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
@@ -66,6 +66,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="2">
|
||||
<Date>2016-05-03</Date>
|
||||
<Version>1.1.1</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Alihan Öztürk</Name>
|
||||
<Email>alihan@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="1">
|
||||
<Date>2015-03-04</Date>
|
||||
<Version>1.0.29</Version>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<IsA>app:gui</IsA>
|
||||
<Summary>ALSA configuration tools</Summary>
|
||||
<Description>alsa-tools contains ALSA (Advanced Linux Sound Architecture) tools like firmware loaders and sound card control utilities for specific sound cards.</Description>
|
||||
<Archive sha1sum="f2fd83342c7b85eac9dfb807fe89e155179d1d91" type="tarbz2">ftp://ftp.alsa-project.org/pub/tools/alsa-tools-1.0.29.tar.bz2</Archive>
|
||||
<Archive sha1sum="02c9276f1c272c4bbf9bad9cfe0a9d8d8a6f50cf" type="tarbz2">ftp://ftp.alsa-project.org/pub/tools/alsa-tools-1.1.0.tar.bz2</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>gtk2-devel</Dependency>
|
||||
<Dependency>fltk-devel</Dependency>
|
||||
@@ -98,6 +98,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="2">
|
||||
<Date>2016-05-03</Date>
|
||||
<Version>1.1.0</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Alihan Öztürk</Name>
|
||||
<Email>alihan@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="1">
|
||||
<Date>2015-03-04</Date>
|
||||
<Version>1.0.29</Version>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>Advanced Linux Sound Architecture (ALSA) utilities</Summary>
|
||||
<Description>alsa-utils contains command line utilities for the Advanced Linux Sound Architecture (ALSA).</Description>
|
||||
<Archive sha1sum="8b456e2d8adf538aef3fc2d24aae2377509f9544" type="tarbz2">ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.29.tar.bz2</Archive>
|
||||
<Archive sha1sum="a5fb61b41685001c9a2a41a38e61cdaf7e60ef2e" type="tarbz2">ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.1.1.tar.bz2</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>xmlto</Dependency>
|
||||
<Dependency>util-linux</Dependency>
|
||||
@@ -57,6 +57,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="2">
|
||||
<Date>2016-05-03</Date>
|
||||
<Version>1.1.1</Version>
|
||||
<Comment>Version bump</Comment>
|
||||
<Name>Alihan Öztürk</Name>
|
||||
<Email>alihan@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="1">
|
||||
<Date>2015-03-04</Date>
|
||||
<Version>1.0.29</Version>
|
||||
|
||||
@@ -15,7 +15,7 @@ def setup():
|
||||
shelltools.sym("makefiles/Makefile.am", "Makefile.am")
|
||||
shelltools.sym("makefiles/makefile.linux", "Makefile")
|
||||
#shelltools.sym("contrib/gcc/sdl-mngplay/acinclude.m4", "acinclude.m4")
|
||||
|
||||
|
||||
shelltools.system("sed -i -e 's/unroll-loops/& -fPIC/' Makefile ")
|
||||
|
||||
autotools.autoreconf("-fiv")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
@@ -54,13 +53,11 @@
|
||||
<Dependency>zlib-32bit </Dependency>
|
||||
<Dependency>lcms2-32bit</Dependency>
|
||||
<Dependency>libjpeg-turbo-32bit </Dependency>
|
||||
<Dependency>glibc-32bit </Dependency>
|
||||
</BuildDependencies>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>zlib-32bit </Dependency>
|
||||
<Dependency>lcms2-32bit</Dependency>
|
||||
<Dependency>libjpeg-turbo-32bit </Dependency>
|
||||
<Dependency>glibc-32bit </Dependency>
|
||||
<Dependency release="current">libmng</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
@@ -70,11 +67,11 @@
|
||||
|
||||
<History>
|
||||
<Update release="1">
|
||||
<Date>2014-05-19</Date>
|
||||
<Date>2016-05-04</Date>
|
||||
<Version>2.0.2</Version>
|
||||
<Comment>First release</Comment>
|
||||
<Name>Alihan Öztürk</Name>
|
||||
<Email>alihan@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
</PISI>
|
||||
Reference in New Issue
Block a user