diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-06-13 10:39:22 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-06-13 10:39:22 +0100 |
commit | 9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch) | |
tree | 8ac67e26b45f34d71c5aab3621813b100a0d5f00 /net-libs/signond | |
parent | f516638b7fe9592837389826a6152a7e1b251c54 (diff) |
gentoo resync : 13.06.2020
Diffstat (limited to 'net-libs/signond')
-rw-r--r-- | net-libs/signond/Manifest | 3 | ||||
-rw-r--r-- | net-libs/signond/files/signond-8.60-crashfix.patch | 160 | ||||
-rw-r--r-- | net-libs/signond/files/signond-8.60-unused-dep.patch | 10 | ||||
-rw-r--r-- | net-libs/signond/signond-8.60-r2.ebuild | 77 |
4 files changed, 250 insertions, 0 deletions
diff --git a/net-libs/signond/Manifest b/net-libs/signond/Manifest index 19b4d90ae350..9729444a1921 100644 --- a/net-libs/signond/Manifest +++ b/net-libs/signond/Manifest @@ -1,5 +1,8 @@ AUX signond-8.60-buildsystem.patch 1306 BLAKE2B 5cf758cd974d54fa39e42291f6d4969f341d37970948d0e1bb6f74367a5a77e5b0be8c7a435af2f7474d9ff8ab6f8352a7ddd83e772b792bb8db97032db2b8ba SHA512 ec69a845da1019c7517ca1163bd09fab2cf1f4e1e8faf27c2baa1ae0da5c5b4689b7fadc4207f744224deff7b99eaada6d41af4c451962bc07c9920d1559ba1f AUX signond-8.60-consistent-paths.patch 10565 BLAKE2B 09024a3a877d965ad037f3e77add52589e230b2fdeb133960192b6f26d4272395230621625a78633d084f863fd3aa0c931011f47134587a44e1a27a20ca04e91 SHA512 e3731e360c208c75de3634e507c81be94da29df7592ae90c192a30ef727cdf1c86e939a6d27ddd5b227a7655630dc7320c7181f644721e8b59b37501dc34e2fb +AUX signond-8.60-crashfix.patch 5228 BLAKE2B 713fe5b5fe6c806fc09bf1710e5a5c8872b7bc80e55d328d6301fa0040bf3750b33891d1e2ce42cab45622b9633fb93e29277889ce27fb54a98fb44bc022124a SHA512 25ef43ed61f8d422882e944600e2571108927920493558904c039a06af7091ec8fdcdcf030cb4e59ebf53d934aa67265d073084b3d280b204f24f74620e764b9 +AUX signond-8.60-unused-dep.patch 254 BLAKE2B 65f6157833a139b72d4fdb07b3877948ce7d7f327e457c0c2391d715475a7110c5e793f02c950b4a7b289ecca2c387ce6133af3d51c7f0d96b3910795abd4ed9 SHA512 21cb1ee319b3219ac46e6b61eec04d93262a3108311e141fee25fb1280fd6673d5ffac0f7b444a9131d5f8a6b255ba8189a75dec83004680d48eae5776404778 DIST signond-8.60.tar.gz 281359 BLAKE2B 3ecd8048d8c5551c3611e48091c35a9f0fe4c972e6b4730fe1f610b4870fe86911dee04c331847deee2a50f4a04acd5a8a0d1c605d1f4f0a24272d44c289a6d3 SHA512 fb3ccc99c692506ca29d5bae39bc375ff97057734fac1551ea39105d5f8e78f3df23e01a286f73be3a606c54b40f957c3c0d985484926e57f354218e4137ff3c EBUILD signond-8.60-r1.ebuild 1622 BLAKE2B ed235128e02a9d93fde9848d2feff85e1ddfe29cc3b5cc97e63cc04630a898a34722750ead88faa5940bd6983fb193911b588a27fdf022ad1fb3fb88211d9570 SHA512 4b5cca985c36a579420153441d4d75e1ef879262b21145385079e9be8244d2442678b4c742d7b2fe9453d2cb97411190bd01ea03fcf6a96887bf09bc3bc575e0 +EBUILD signond-8.60-r2.ebuild 2166 BLAKE2B a01bf96f0641b976263523f5e09052b129554401577c403f1ff0b57d32586d98dc79aef05ec9d369ecb2589c190f317a5f8727face1aaacb2aeae02be8bd5fdc SHA512 f9bb80adb2d4e0790448d7f31afe40f064be2e2d671d97267e0d842471ae354669a9b26f57a9acf93d352473489f1aaf3f8e0e8e847df9dbd2d0d45cd9159a14 MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3 diff --git a/net-libs/signond/files/signond-8.60-crashfix.patch b/net-libs/signond/files/signond-8.60-crashfix.patch new file mode 100644 index 000000000000..8cfc79ac431e --- /dev/null +++ b/net-libs/signond/files/signond-8.60-crashfix.patch @@ -0,0 +1,160 @@ +From ab9fab9763277783363f8c6d4b62405c3b0b0413 Mon Sep 17 00:00:00 2001 +From: Chris Adams <chris.adams@jollamobile.com> +Date: Wed, 31 Jul 2019 12:45:14 +1000 +Subject: [PATCH] Don't emit QObject::destroyed() within Identity::destroy() + +QObject::destroyed() should not be emitted manually, as that can +cause unwanted side effects. + +Specifically, in this case, the +QDBusConnectionPrivate::objectDestroyed() slot was invoked with +invalidated object parameter (perhaps due to duplicate invocation) +resulting in a warning in QObject::disconnect(). + +Instead, ensure the object is unregistered from DBus immediately. +--- + src/signond/signondaemonadaptor.cpp | 29 ++++++++++++++++++++++++++++- + src/signond/signondaemonadaptor.h | 3 +++ + src/signond/signonidentity.cpp | 13 ++++++++----- + src/signond/signonidentity.h | 1 + + 4 files changed, 40 insertions(+), 6 deletions(-) + +diff --git a/src/signond/signondaemonadaptor.cpp b/src/signond/signondaemonadaptor.cpp +index 8b35e4bd..abd8fd3a 100644 +--- a/src/signond/signondaemonadaptor.cpp ++++ b/src/signond/signondaemonadaptor.cpp +@@ -29,6 +29,13 @@ + + namespace SignonDaemonNS { + ++struct RegisteredIdentity { ++ RegisteredIdentity(const QDBusConnection &connection, QObject *identity) ++ : conn(connection), ident(identity) {} ++ QDBusConnection conn; ++ QObject *ident = nullptr; ++}; ++ + SignonDaemonAdaptor::SignonDaemonAdaptor(SignonDaemon *parent): + QDBusAbstractAdaptor(parent), + m_parent(parent) +@@ -38,6 +45,7 @@ SignonDaemonAdaptor::SignonDaemonAdaptor(SignonDaemon *parent): + + SignonDaemonAdaptor::~SignonDaemonAdaptor() + { ++ qDeleteAll(m_registeredIdentities); + } + + void SignonDaemonAdaptor::registerNewIdentity(const QString &applicationContext, +@@ -46,7 +54,10 @@ void SignonDaemonAdaptor::registerNewIdentity(const QString &applicationContext, + Q_UNUSED(applicationContext); + + QObject *identity = m_parent->registerNewIdentity(); +- objectPath = registerObject(parentDBusContext().connection(), identity); ++ QDBusConnection dbusConnection(parentDBusContext().connection()); ++ objectPath = registerObject(dbusConnection, identity); ++ m_registeredIdentities.append(new RegisteredIdentity(dbusConnection, identity)); ++ connect(identity, SIGNAL(unregistered()), this, SLOT(onIdentityUnregistered())); + + SignonDisposable::destroyUnused(); + } +@@ -130,6 +141,22 @@ void SignonDaemonAdaptor::getIdentity(const quint32 id, + SignonDisposable::destroyUnused(); + } + ++void SignonDaemonAdaptor::onIdentityUnregistered() ++{ ++ QObject *ident = sender(); ++ if (!ident) { ++ return; ++ } ++ ++ for (int i = 0; i < m_registeredIdentities.size(); ++i) { ++ if (m_registeredIdentities[i]->ident == ident) { ++ m_registeredIdentities[i]->conn.unregisterObject(ident->objectName()); ++ delete m_registeredIdentities.takeAt(i); ++ return; ++ } ++ } ++} ++ + void SignonDaemonAdaptor::onIdentityAccessReplyFinished() + { + SignOn::AccessReply *reply = qobject_cast<SignOn::AccessReply*>(sender()); +diff --git a/src/signond/signondaemonadaptor.h b/src/signond/signondaemonadaptor.h +index db8d875f..1c20cac3 100644 +--- a/src/signond/signondaemonadaptor.h ++++ b/src/signond/signondaemonadaptor.h +@@ -34,6 +34,7 @@ + namespace SignonDaemonNS { + + typedef QList<QVariantMap> MapList; ++class RegisteredIdentity; + + class SignonDaemonAdaptor: public QDBusAbstractAdaptor + { +@@ -74,10 +75,12 @@ private: + QObject *object); + + private Q_SLOTS: ++ void onIdentityUnregistered(); + void onIdentityAccessReplyFinished(); + void onAuthSessionAccessReplyFinished(); + + private: ++ QList<RegisteredIdentity*> m_registeredIdentities; + SignonDaemon *m_parent; + }; //class SignonDaemonAdaptor + +diff --git a/src/signond/signonidentity.cpp b/src/signond/signonidentity.cpp +index ce1ecfb0..a143c223 100644 +--- a/src/signond/signonidentity.cpp ++++ b/src/signond/signonidentity.cpp +@@ -84,7 +84,8 @@ private: + SignonIdentity::SignonIdentity(quint32 id, int timeout, + SignonDaemon *parent): + SignonDisposable(timeout, parent), +- m_pInfo(NULL) ++ m_pInfo(NULL), ++ m_destroyed(false) + { + m_id = id; + +@@ -112,7 +113,10 @@ SignonIdentity::SignonIdentity(quint32 id, int timeout, + + SignonIdentity::~SignonIdentity() + { +- emit unregistered(); ++ if (!m_destroyed) { ++ m_destroyed = true; ++ Q_EMIT unregistered(); ++ } + + delete m_signonui; + delete m_pInfo; +@@ -125,9 +129,8 @@ SignonIdentity *SignonIdentity::createIdentity(quint32 id, SignonDaemon *parent) + + void SignonIdentity::destroy() + { +- /* Emitting the destroyed signal makes QDBusConnection unregister the +- * object */ +- Q_EMIT destroyed(); ++ m_destroyed = true; ++ Q_EMIT unregistered(); + deleteLater(); + } + +diff --git a/src/signond/signonidentity.h b/src/signond/signonidentity.h +index 9ec9be4e..f6321f30 100644 +--- a/src/signond/signonidentity.h ++++ b/src/signond/signonidentity.h +@@ -96,6 +96,7 @@ private: + quint32 m_id; + SignonUiAdaptor *m_signonui; + SignonIdentityInfo *m_pInfo; ++ bool m_destroyed; + }; //class SignonDaemon + + } //namespace SignonDaemonNS +-- +2.26.2 + diff --git a/net-libs/signond/files/signond-8.60-unused-dep.patch b/net-libs/signond/files/signond-8.60-unused-dep.patch new file mode 100644 index 000000000000..dd32af041d4d --- /dev/null +++ b/net-libs/signond/files/signond-8.60-unused-dep.patch @@ -0,0 +1,10 @@ +--- a/tests/signond-tests/signond-tests.pri 2020-06-07 10:57:19.327456979 +0200 ++++ b/tests/signond-tests/signond-tests.pri 2020-06-07 11:00:39.866322814 +0200 +@@ -6,7 +6,6 @@ + QT += core \ + sql \ + testlib \ +- xml \ + network \ + dbus + diff --git a/net-libs/signond/signond-8.60-r2.ebuild b/net-libs/signond/signond-8.60-r2.ebuild new file mode 100644 index 000000000000..c775677aaaa5 --- /dev/null +++ b/net-libs/signond/signond-8.60-r2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit qmake-utils + +DESCRIPTION="Signon daemon for libaccounts-glib" +HOMEPAGE="https://gitlab.com/accounts-sso" +SRC_URI="https://gitlab.com/accounts-sso/${PN}/-/archive/VERSION_${PV}/${PN}-VERSION_${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm arm64 ~ppc64 ~x86" +IUSE="doc test" + +BDEPEND="doc? ( app-doc/doxygen )" +RDEPEND=" + dev-qt/qtcore:5 + dev-qt/qtdbus:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtsql:5 + net-libs/libproxy +" +DEPEND="${RDEPEND} + test? ( dev-qt/qttest:5 ) +" + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}/${P}-buildsystem.patch" + "${FILESDIR}/${P}-consistent-paths.patch" # bug 701142 + "${FILESDIR}/${P}-crashfix.patch" + "${FILESDIR}/${P}-unused-dep.patch" # bug 727346 +) + +S="${WORKDIR}/${PN}-VERSION_${PV}" + +src_prepare() { + default + + # install docs to correct location + sed -e "s|share/doc/\$\${PROJECT_NAME}|share/doc/${PF}|" \ + -i doc/doc.pri || die + sed -e "/^documentation.path = /c\documentation.path = \$\${INSTALL_PREFIX}/share/doc/${PF}/\$\${TARGET}/" \ + -i lib/plugins/doc/doc.pri || die + sed -e "/^documentation.path = /c\documentation.path = \$\${INSTALL_PREFIX}/share/doc/${PF}/libsignon-qt/" \ + -i lib/SignOn/doc/doc.pri || die + + # std flags + sed -e "/CONFIG += c++11/d" \ + -i common-project-config.pri || die "failed fixing CXXFLAGS" + + # fix runtime failures + sed -e "/fno-rtti/d" \ + -i common-project-config.pri src/plugins/plugins.pri \ + src/{remotepluginprocess/remotepluginprocess,extensions/cryptsetup/cryptsetup}.pro \ + tests/{signond-tests/signond-tests,extensions/extensions}.pri \ + tests/{passwordplugintest/passwordplugintest,libsignon-qt-tests/libsignon-qt-tests}.pro \ + || die "failed disabling -fno-rtti" + + use doc || sed -e "/include(\s*doc\/doc.pri\s*)/d" \ + -i signon.pro lib/SignOn/SignOn.pro lib/plugins/plugins.pro || die + + use test || sed -e '/^SUBDIRS/s/tests//' \ + -i signon.pro || die "couldn't disable tests" +} + +src_configure() { + eqmake5 PREFIX="${EPREFIX}"/usr LIBDIR=$(get_libdir) +} + +src_install() { + emake INSTALL_ROOT="${D}" install +} |