summaryrefslogtreecommitdiff
path: root/kde-apps/libkgapi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-29 02:53:24 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-29 02:53:24 +0000
commitb8ec9071f5d20d8518b02d0077428b2c9f88861b (patch)
tree6214c0d63a2bd5ae464941924a90f415687fa63c /kde-apps/libkgapi
parentbdf6e70da7a28f45617c02a251bb6b3844202bc5 (diff)
gentoo auto-resync : 29:01:2023 - 02:53:24
Diffstat (limited to 'kde-apps/libkgapi')
-rw-r--r--kde-apps/libkgapi/Manifest3
-rw-r--r--kde-apps/libkgapi/files/libkgapi-22.08.3-AccountManager-dont-keep-finished-promises-in-cache.patch27
-rw-r--r--kde-apps/libkgapi/files/libkgapi-22.08.3-dont-cache-promises-for-AccountManager-findAccount.patch75
-rw-r--r--kde-apps/libkgapi/libkgapi-22.08.3-r1.ebuild49
4 files changed, 154 insertions, 0 deletions
diff --git a/kde-apps/libkgapi/Manifest b/kde-apps/libkgapi/Manifest
index 043a153fcf76..0c03aabadfe7 100644
--- a/kde-apps/libkgapi/Manifest
+++ b/kde-apps/libkgapi/Manifest
@@ -1,5 +1,8 @@
+AUX libkgapi-22.08.3-AccountManager-dont-keep-finished-promises-in-cache.patch 1070 BLAKE2B d462378f3bec92e36a5fc72b92e58d8dd24ed679c87d1aed2b8328cb6b70bef3e23e2234e8f62a6a45ae76915bbcb49e161e8e87133dfc381b6790543cc569f5 SHA512 8ad8af2ec82a2bb2466048b4fc0832b194403d359b69d51fff3a10e9c55494f3441c3c9f1fc33edd3aefcece1245b01dd2450f1da4718d85d63f631919d43364
+AUX libkgapi-22.08.3-dont-cache-promises-for-AccountManager-findAccount.patch 2937 BLAKE2B 478ff1293905b8af485c2516d5dd6a78f45d8bb2782a3fc852dc46f059480bb4561efabe4fe6578273d5c8331bdc1e8743eaccf63faf6056a4a39cb97924445a SHA512 15a851a436bf7ba7740bb66774361f3a97ae8b8f81728837f42597ae4c8a022d2cd76a8434c956727a407a007ad29eea77fac626314b31aa643da875e422e9f5
DIST libkgapi-22.08.3.tar.xz 242496 BLAKE2B e38ac44878e5425b4cb6922b13bbca4268795f92a6e50123c3c4ff228f80bec58a0146e4548aa8d5284780f5700236b5f52a96962f2ac8caa3d676847b6ab2db SHA512 b393691240954c2e6262cef32fc04dc2d2137f97256d8bc43d8ed6cb6007122819da43206fca6a5cf3e6c6201fd4b7e43bfc1972733a7b6c25221895eeb91991
DIST libkgapi-22.12.1.tar.xz 244676 BLAKE2B f65ee13007f915c7c117ced20a0b2ba4a665b792d578a7f1c2c4ee43614658144594da19fec5965ea2469fa817e9c0513864ea69e12c9e1763fe060f1cc9d48c SHA512 12f52bb7c858d339ddf15a54caa6c54e0e434a9f5bd549a8dfdb129791e506ac34a06adb4359d55f572e7e4f162995a0f314d57dc99275601163b23707245d63
+EBUILD libkgapi-22.08.3-r1.ebuild 1539 BLAKE2B 79b88902d43d178b9697b55c85426809da04f5a33752b76da9e692bdfecd1e0d85a08d604ff0e08eaeb165a8c98a08e52376668fe34ba837edbdeb3a13b7ce6f SHA512 823c07b260eb8e7fb9ba96c60b68d10a6719404dd180e176a1e5f66a539213a4da2aa3fc71c80ced3fe7636c0be9326b3e87c7d80cdcaebc0a17e1cf65c6fc95
EBUILD libkgapi-22.08.3.ebuild 1368 BLAKE2B 422fd8761ce70740e5ee38cd2d85ca0b45549ff00c5bfcd242d0d315258488e5a81f963bfb3b716fcf3bdefedd4d0ac6512d3fc3f694853362a7d52369e3e31f SHA512 524a3923893e4a1c5e231f9ccc1230e82c523bd1637d5ca7f9f9015abe416e57bc01fc7fc30dac4837ccf7ab2ca87f6579ac4d6de2b50bc2e1c453e94041b258
EBUILD libkgapi-22.12.1.ebuild 1372 BLAKE2B 900d7f2429b9526075d7999f18659a7fcd259df1da2aeb8a34aa602028c9054e3ca1a80e39e107b024f00557f3613091c5c161f471314275f22adf6ab744127d SHA512 6c37493ef5feb0d79a7dfb02570247ff67cfb8c4457ccdcc73e95b672de012183cdc40d1a9087c9cc1dd492344a32ea1e0334c213d5b675cfea195326eb9cdd7
MISC metadata.xml 318 BLAKE2B 922a5e32e706b2976c5f359a14194d268d3f499398576c80ce5fad8c0fcea0fbf048de4480a80a6a1889c88b8b6c14147654a3ab4d5ffbcc258c2290da63f6d1 SHA512 614cb8dda7ad2088e5d6ef39b449bb4be0ac72cd0231c320188d76d1816dce6490c5114bb4798112c4b11d99d30a9e82ff8fcf08ffa8c049589682a5e38208f6
diff --git a/kde-apps/libkgapi/files/libkgapi-22.08.3-AccountManager-dont-keep-finished-promises-in-cache.patch b/kde-apps/libkgapi/files/libkgapi-22.08.3-AccountManager-dont-keep-finished-promises-in-cache.patch
new file mode 100644
index 000000000000..485bc7d840f8
--- /dev/null
+++ b/kde-apps/libkgapi/files/libkgapi-22.08.3-AccountManager-dont-keep-finished-promises-in-cache.patch
@@ -0,0 +1,27 @@
+From b5a581d98d9b57363c44bd98eeab7243fbf13a22 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Mon, 21 Nov 2022 13:00:41 +0100
+Subject: [PATCH] AccountManager: Don't keep finished promises in the cache
+
+AccountPromises are destroyed one event loop cycle after they finished().
+They won't emit finished() again, so they can't be used.
+---
+ src/core/accountmanager.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/accountmanager.cpp b/src/core/accountmanager.cpp
+index 42719c5e..da5c37b6 100644
+--- a/src/core/accountmanager.cpp
++++ b/src/core/accountmanager.cpp
+@@ -134,7 +134,7 @@ public:
+ auto promise = mPendingPromises.value(key, nullptr);
+ if (!promise) {
+ promise = new AccountPromise(q);
+- QObject::connect(promise, &QObject::destroyed, q, [key, this]() {
++ QObject::connect(promise, &AccountPromise::finished, q, [key, this]() {
+ mPendingPromises.remove(key);
+ });
+ mPendingPromises.insert(key, promise);
+--
+GitLab
+
diff --git a/kde-apps/libkgapi/files/libkgapi-22.08.3-dont-cache-promises-for-AccountManager-findAccount.patch b/kde-apps/libkgapi/files/libkgapi-22.08.3-dont-cache-promises-for-AccountManager-findAccount.patch
new file mode 100644
index 000000000000..b24b80377686
--- /dev/null
+++ b/kde-apps/libkgapi/files/libkgapi-22.08.3-dont-cache-promises-for-AccountManager-findAccount.patch
@@ -0,0 +1,75 @@
+From d677a08c21fd99e7e8be0a0899f797f9237207e4 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Mon, 21 Nov 2022 13:02:27 +0100
+Subject: [PATCH] Don't cache promises for AccountManager::findAccount
+
+Unlike AccountManager::getAccount and AccountManager::refreshTokens, this
+method does not return an authenticated account. However, the promises are
+cached for all of them in the same store, so it was possible for a call to
+e.g. refreshTokens to get a promise created by findAccount instead, resulting
+in an unexpected result. Just don't cache promises created by findAccount.
+
+BUG: 406839
+BUG: 409122
+BUG: 421664
+BUG: 456923
+---
+ src/core/accountmanager.cpp | 38 ++++++++++++++++++-------------------
+ 1 file changed, 18 insertions(+), 20 deletions(-)
+
+diff --git a/src/core/accountmanager.cpp b/src/core/accountmanager.cpp
+index da5c37b6..c6b8189d 100644
+--- a/src/core/accountmanager.cpp
++++ b/src/core/accountmanager.cpp
+@@ -265,30 +265,28 @@ AccountPromise *AccountManager::refreshTokens(const QString &apiKey, const QStri
+
+ AccountPromise *AccountManager::findAccount(const QString &apiKey, const QString &accountName, const QList<QUrl> &scopes)
+ {
+- auto promise = d->createPromise(apiKey, accountName);
+- if (!promise->d->isRunning()) {
+- QTimer::singleShot(0, this, [=]() {
+- d->ensureStore([=](bool storeOpened) {
+- if (!storeOpened) {
+- promise->d->setError(tr("Failed to open account store"));
+- return;
+- }
++ auto promise = new AccountPromise(this);
++ QTimer::singleShot(0, this, [=]() {
++ d->ensureStore([=](bool storeOpened) {
++ if (!storeOpened) {
++ promise->d->setError(tr("Failed to open account store"));
++ return;
++ }
+
+- const auto account = d->mStore->getAccount(apiKey, accountName);
+- if (!account) {
+- promise->d->setAccount({});
++ const auto account = d->mStore->getAccount(apiKey, accountName);
++ if (!account) {
++ promise->d->setAccount({});
++ } else {
++ const auto currentScopes = account->scopes();
++ if (scopes.isEmpty() || d->compareScopes(currentScopes, scopes)) {
++ promise->d->setAccount(account);
+ } else {
+- const auto currentScopes = account->scopes();
+- if (scopes.isEmpty() || d->compareScopes(currentScopes, scopes)) {
+- promise->d->setAccount(account);
+- } else {
+- promise->d->setAccount({});
+- }
++ promise->d->setAccount({});
+ }
+- });
++ }
+ });
+- promise->d->setRunning();
+- }
++ });
++ promise->d->setRunning();
+ return promise;
+ }
+
+--
+GitLab
+
diff --git a/kde-apps/libkgapi/libkgapi-22.08.3-r1.ebuild b/kde-apps/libkgapi/libkgapi-22.08.3-r1.ebuild
new file mode 100644
index 000000000000..a46cb2350c58
--- /dev/null
+++ b/kde-apps/libkgapi/libkgapi-22.08.3-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="true"
+KFMIN=5.96.0
+QTMIN=5.15.5
+VIRTUALX_REQUIRED="test"
+inherit ecm gear.kde.org
+
+DESCRIPTION="Library for accessing Google calendar and contact resources"
+HOMEPAGE="https://api.kde.org/kdepim/libkgapi/html/index.html"
+
+LICENSE="LGPL-2.1+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="nls"
+
+DEPEND="
+ dev-libs/cyrus-sasl:2
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtnetwork-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=dev-qt/qtxml-${QTMIN}:5
+ >=kde-frameworks/kcalendarcore-${KFMIN}:5
+ >=kde-frameworks/kcontacts-${KFMIN}:5
+ >=kde-frameworks/kwallet-${KFMIN}:5
+"
+RDEPEND="${DEPEND}"
+BDEPEND="nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-AccountManager-dont-keep-finished-promises-in-cache.patch"
+ "${FILESDIR}/${P}-dont-cache-promises-for-AccountManager-findAccount.patch"
+)
+
+src_test() {
+ local myctestargs=(
+ # Both fail for multiple distros, see bug #832709 for more discussion
+ # Revisit at least once Qt 5.15.3 is in wider distribution (in Gentoo at least):
+ # contacts-contactcreatejobtest, contacts-contactmodifyjobtest
+ # More failures not specific to Gentoo, bug #852593, KDE-bug #440648:
+ # calendar-eventcreatejobtest, calendar-eventfetchjobtest, calendar-eventmodifyjobtest
+ -E "(contacts-contactcreatejobtest|contacts-contactmodifyjobtest|calendar-eventcreatejobtest|calendar-eventfetchjobtest|calendar-eventmodifyjobtest)"
+ )
+
+ virtx cmake_src_test
+}