Hello community, here is the log from the commit of package polkit-qt-1 for openSUSE:Factory checked in at 2013-07-16 18:38:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/polkit-qt-1 (Old) and /work/SRC/openSUSE:Factory/.polkit-qt-1.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "polkit-qt-1" Changes: -------- --- /work/SRC/openSUSE:Factory/polkit-qt-1/polkit-qt-1.changes 2012-01-09 15:42:37.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.polkit-qt-1.new/polkit-qt-1.changes 2013-07-16 18:38:21.000000000 +0200 @@ -1,0 +2,11 @@ +Tue Jul 16 14:59:33 UTC 2013 - [email protected] + +- Update to 0.103.0 + * Bugfix release, contains previously included patches +- Droped ck-avoid-crash.diff and d3c337da.patch, included in this + release +- Added fixed-GCancellable-handling-in-PolkitQtListener.patch and + fixed-reference-counting-of-GObjects.patch from upstream + (kde#257802, kde#286935, kde#291977, kde#307323, kde#270489) + +------------------------------------------------------------------- Old: ---- ck-avoid-crash.diff d3c337da.patch polkit-qt-1-0.99.1.tar.bz2 New: ---- fixed-GCancellable-handling-in-PolkitQtListener.patch fixed-reference-counting-of-GObjects.patch polkit-qt-1-0.103.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ polkit-qt-1.spec ++++++ --- /var/tmp/diff_new_pack.ak5dhc/_old 2013-07-16 18:38:22.000000000 +0200 +++ /var/tmp/diff_new_pack.ak5dhc/_new 2013-07-16 18:38:22.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package polkit-qt-1 # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,17 +19,19 @@ %define debug_package_requires libpolkit-qt-1-0 = %{version}-%{release} Name: polkit-qt-1 -Version: 0.99.1 -Release: 14 -License: LGPL-2.1+ +Version: 0.103.0 +Release: 0 Summary: PolicyKit Library Qt Bindings -Url: http://api.kde.org/kdesupport-api/kdesupport-apidocs/polkit-qt/html/ +License: LGPL-2.1+ Group: Development/Libraries/KDE +Url: http://api.kde.org/kdesupport-api/kdesupport-apidocs/polkit-qt/html/ # ftp://ftp.kde.org/pub/kde/stable/apps/KDE4.x/admin/ -Source0: %{name}-%{version}.tar.bz2 +Source0: ftp://ftp.kde.org/pub/kde/stable/apps/KDE4.x/admin/%{name}-%{version}.tar.bz2 Source99: baselibs.conf -Patch0: ck-avoid-crash.diff -Patch1: d3c337da.patch +# PATCH-FIX-UPSTREAM fixed-reference-counting-of-GObjects.patch (kde#257802, kde#286935, kde#291977, kde#307323) +Patch0: fixed-reference-counting-of-GObjects.patch +# PATCH-FIX-UPSTREAM fixed-GCancellable-handling-in-PolkitQtListener.patch (kde#270489) +Patch1: fixed-GCancellable-handling-in-PolkitQtListener.patch BuildRequires: automoc4 BuildRequires: cmake BuildRequires: kde4-filesystem @@ -44,7 +46,6 @@ with PolicyKit. %package -n libpolkit-qt-1-1 -License: LGPL-2.1+ Summary: PolicyKit Library Qt Bindings Group: Development/Libraries/KDE Provides: libpolkit-qt0 = 0.9.3 @@ -57,7 +58,6 @@ with PolicyKit. %package -n libpolkit-qt-1-devel -License: LGPL-2.1+ Summary: PolicyKit Library Qt Bindings Group: Development/Libraries/KDE Requires: libpolkit-qt-1-1 = %{version} @@ -73,7 +73,7 @@ %prep %setup -q -%patch0 +%patch0 -p1 %patch1 -p1 %build ++++++ fixed-GCancellable-handling-in-PolkitQtListener.patch ++++++ From: Martin Briza <[email protected]> Date: Fri, 12 Jul 2013 13:37:05 +0000 Subject: Fixed GCancellable handling in PolkitQtListener X-Git-Url: http://quickgit.kde.org/?p=polkit-qt-1.git&a=commitdiff&h=57a81d0c90fc509fd197b30378cc0ada3b7afbf1 --- Fixed GCancellable handling in PolkitQtListener There was a race condition happening on two simultanneous requests to the agent, causing it to crash. BUGS: 270489 --- --- a/agent/polkitqtlistener.cpp +++ b/agent/polkitqtlistener.cpp @@ -115,6 +115,13 @@ qDebug() << "Listener adapter polkit_qt_listener_initiate_authentication"; PolkitQtListener *listener = POLKIT_QT_LISTENER(agent_listener); + if (cancellable != NULL) { + g_cancellable_connect(cancellable, + G_CALLBACK(cancelled_cb), + agent_listener, + NULL); + } + // The result of asynchronous method will be created here and it will be pushed to the listener. GSimpleAsyncResult *result = g_simple_async_result_new((GObject *) listener, callback, user_data, agent_listener); qDebug() << "GSimpleAsyncResult:" << result; @@ -129,13 +136,6 @@ cancellable, result); - if (cancellable != NULL) { - g_signal_connect(cancellable, - "cancelled", - G_CALLBACK(cancelled_cb), - agent_listener); - } - } static gboolean polkit_qt_listener_initiate_authentication_finish(PolkitAgentListener *listener, ++++++ fixed-reference-counting-of-GObjects.patch ++++++ From: Martin Briza <[email protected]> Date: Fri, 22 Mar 2013 14:52:52 +0000 Subject: Fixed reference counting of GObjects X-Git-Url: http://quickgit.kde.org/?p=polkit-qt-1.git&a=commitdiff&h=4ed9c3fa043b70ee50176c4baacc07d1c73f1fce --- Fixed reference counting of GObjects Gets us rid of some crashes and reduces memory leaking. There's a change it fixes crashes~ BUGS: 257802, 286935, 291977, 307323 --- --- a/agent/polkitqt1-agent-listener.cpp +++ b/agent/polkitqt1-agent-listener.cpp @@ -62,6 +62,10 @@ g_type_init(); d->listener = listener; + + if (d->listener != NULL) { + g_object_ref(d->listener); + } } Listener::~Listener() --- a/agent/polkitqt1-agent-session.cpp +++ b/agent/polkitqt1-agent-session.cpp @@ -66,6 +66,9 @@ , d(new Private) { d->polkitAgentSession = pkAgentSession; + if (d->polkitAgentSession) { + g_object_ref(d->polkitAgentSession); + } g_signal_connect(G_OBJECT(d->polkitAgentSession), "completed", G_CALLBACK(Private::completed), this); g_signal_connect(G_OBJECT(d->polkitAgentSession), "request", G_CALLBACK(Private::request), this); g_signal_connect(G_OBJECT(d->polkitAgentSession), "show-error", G_CALLBACK(Private::showError), this); --- a/core/polkitqt1-details.cpp +++ b/core/polkitqt1-details.cpp @@ -35,11 +35,15 @@ : QSharedData(other) , polkitDetails(other.polkitDetails) { - g_object_ref(polkitDetails); + if (polkitDetails != NULL) { + g_object_ref(polkitDetails); + } } ~Data() { - g_object_unref(polkitDetails); + if (polkitDetails != NULL) { + g_object_unref(polkitDetails); + } } PolkitDetails *polkitDetails; @@ -57,6 +61,10 @@ { g_type_init(); d->polkitDetails = pkDetails; + + if (d->polkitDetails != NULL) { + g_object_ref(d->polkitDetails); + } } Details::~Details() --- a/core/polkitqt1-subject.cpp +++ b/core/polkitqt1-subject.cpp @@ -58,6 +58,10 @@ { g_type_init(); d->subject = subject; + + if (d->subject != NULL) { + g_object_ref(d->subject); + } } Subject::Subject(const PolkitQt1::Subject& other) @@ -88,6 +92,9 @@ void Subject::setSubject(PolkitSubject *subject) { + if (d->subject != NULL) { + g_object_unref(d->subject); + } d->subject = subject; } ++++++ polkit-qt-1-0.99.1.tar.bz2 -> polkit-qt-1-0.103.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polkit-qt-1-0.99.1/CMakeLists.txt new/polkit-qt-1-0.103.0/CMakeLists.txt --- old/polkit-qt-1-0.99.1/CMakeLists.txt 2010-12-09 10:15:16.000000000 +0100 +++ new/polkit-qt-1-0.103.0/CMakeLists.txt 2011-12-14 10:19:36.000000000 +0100 @@ -49,8 +49,8 @@ endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2) set(POLKITQT-1_VERSION_MAJOR 0 CACHE INT "PolkitQt-1's major version number" FORCE) -set(POLKITQT-1_VERSION_MINOR 99 CACHE INT "PolkitQt-1's minor version number" FORCE) -set(POLKITQT-1_VERSION_PATCH 1 CACHE INT "PolkitQt-1's release version number" FORCE) +set(POLKITQT-1_VERSION_MINOR 103 CACHE INT "PolkitQt-1's minor version number" FORCE) +set(POLKITQT-1_VERSION_PATCH 0 CACHE INT "PolkitQt-1's release version number" FORCE) set(POLKITQT-1_VERSION_STRING "${POLKITQT-1_VERSION_MAJOR}.${POLKITQT-1_VERSION_MINOR}.${POLKITQT-1_VERSION_PATCH}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polkit-qt-1-0.99.1/agent/polkitqt1-agent-session.cpp new/polkit-qt-1-0.103.0/agent/polkitqt1-agent-session.cpp --- old/polkit-qt-1-0.99.1/agent/polkitqt1-agent-session.cpp 2010-12-09 10:15:16.000000000 +0100 +++ new/polkit-qt-1-0.103.0/agent/polkitqt1-agent-session.cpp 2011-12-14 10:19:36.000000000 +0100 @@ -46,7 +46,7 @@ Session::Private::~Private() { - g_object_unref(polkitAgentSession); + // polkitAgentSession is freed in Session d'tor } Session::Session(const PolkitQt1::Identity &identity, const QString &cookie, AsyncResult *result, QObject *parent) @@ -74,6 +74,9 @@ Session::~Session() { + if (d->polkitAgentSession) + g_object_unref(d->polkitAgentSession); + delete d; } @@ -101,7 +104,11 @@ { qDebug() << "COMPLETED"; Session *session = (Session *)user_data; - Q_EMIT((Session *)user_data)->completed(gained_authorization); + Q_EMIT(session)->completed(gained_authorization); + + //free session here as polkit documentation asks + g_object_unref(session->d->polkitAgentSession); + session->d->polkitAgentSession = 0; } void Session::Private::request(PolkitAgentSession *s, gchar *request, gboolean echo_on, gpointer user_data) @@ -139,7 +146,8 @@ AsyncResult::~AsyncResult() { - g_object_unref(d->result); + if (d->result) + g_object_unref(d->result); } void AsyncResult::setCompleted() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polkit-qt-1-0.99.1/cmake/modules/FindPolkit.cmake new/polkit-qt-1-0.103.0/cmake/modules/FindPolkit.cmake --- old/polkit-qt-1-0.99.1/cmake/modules/FindPolkit.cmake 2010-12-09 10:15:16.000000000 +0100 +++ new/polkit-qt-1-0.103.0/cmake/modules/FindPolkit.cmake 2011-12-14 10:19:36.000000000 +0100 @@ -21,8 +21,8 @@ # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls find_package(PkgConfig) - pkg_check_modules(PC_POLKIT REQUIRED polkit-gobject-1) - pkg_check_modules(PC_POLKIT_AGENT REQUIRED polkit-agent-1) + pkg_check_modules(PC_POLKIT polkit-gobject-1) + pkg_check_modules(PC_POLKIT_AGENT polkit-agent-1) set(POLKIT_DEFINITIONS ${PC_POLKIT_CFLAGS_OTHER}) endif (NOT WIN32) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polkit-qt-1-0.99.1/core/polkitqt1-actiondescription.h new/polkit-qt-1-0.103.0/core/polkitqt1-actiondescription.h --- old/polkit-qt-1-0.99.1/core/polkitqt1-actiondescription.h 2010-12-09 10:15:16.000000000 +0100 +++ new/polkit-qt-1-0.103.0/core/polkitqt1-actiondescription.h 2011-12-14 10:19:36.000000000 +0100 @@ -144,6 +144,6 @@ }; } -Q_DECLARE_METATYPE(PolkitQt1::ActionDescription::List); +Q_DECLARE_METATYPE(PolkitQt1::ActionDescription::List) #endif //POLKIT_QT_ACTION_DESCRIPTION_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polkit-qt-1-0.99.1/core/polkitqt1-authority.cpp new/polkit-qt-1-0.103.0/core/polkitqt1-authority.cpp --- old/polkit-qt-1-0.99.1/core/polkitqt1-authority.cpp 2010-12-09 10:15:16.000000000 +0100 +++ new/polkit-qt-1-0.103.0/core/polkitqt1-authority.cpp 2011-12-14 10:19:36.000000000 +0100 @@ -219,12 +219,14 @@ // then we need to extract all seats from ConsoleKit QDBusMessage msg = QDBusMessage::createMethodCall(consoleKitService, consoleKitManagerPath, consoleKitManagerInterface, "GetSeats"); msg = QDBusConnection::systemBus().call(msg); - // this method returns a list with present seats - QList<QString> seats; - qVariantValue<QDBusArgument> (msg.arguments()[0]) >> seats; - // it can be multiple seats present so connect all their signals - Q_FOREACH(const QString &seat, seats) { - seatSignalsConnect(seat); + if (!msg.arguments().isEmpty()) { + // this method returns a list with present seats + QList<QString> seats; + qVariantValue<QDBusArgument> (msg.arguments()[0]) >> seats; + // it can be multiple seats present so connect all their signals + Q_FOREACH(const QString &seat, seats) { + seatSignalsConnect(seat); + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/polkit-qt-1-0.99.1/core/polkitqt1-identity.cpp new/polkit-qt-1-0.103.0/core/polkitqt1-identity.cpp --- old/polkit-qt-1-0.99.1/core/polkitqt1-identity.cpp 2010-12-09 10:15:16.000000000 +0100 +++ new/polkit-qt-1-0.103.0/core/polkitqt1-identity.cpp 2011-12-14 10:19:36.000000000 +0100 @@ -35,11 +35,15 @@ : QSharedData(other) , identity(other.identity) { - g_object_ref(identity); + if (identity) { + g_object_ref(identity); + } } ~Data() { - g_object_unref(identity); + if (identity) { + g_object_unref(identity); + } } PolkitIdentity *identity; @@ -56,6 +60,10 @@ { g_type_init(); d->identity = polkitIdentity; + + if (d->identity) { + g_object_ref(d->identity); + } } Identity::Identity(const PolkitQt1::Identity& other) @@ -86,7 +94,19 @@ void Identity::setIdentity(PolkitIdentity *identity) { + if (d->identity == identity) { + return; + } + + if (d->identity) { + g_object_unref(d->identity); + } + d->identity = identity; + + if (d->identity) { + g_object_ref(d->identity); + } } QString Identity::toString() const -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
