* [gentoo-commits] repo/gentoo:master commit in: kde-misc/kio-gdrive/files/, kde-misc/kio-gdrive/
@ 2017-05-31 20:11 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2017-05-31 20:11 UTC (permalink / raw
To: gentoo-commits
commit: 958a0c95a306526ee6fb1b57593c2a163529627b
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed May 31 18:43:19 2017 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed May 31 20:11:32 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=958a0c95
kde-misc/kio-gdrive: Drop old
Package-Manager: Portage-2.3.5, Repoman-2.3.1
kde-misc/kio-gdrive/Manifest | 1 -
.../files/kio-gdrive-1.2.0-tests-optional.patch | 21 ----------
kde-misc/kio-gdrive/kio-gdrive-1.2.0.ebuild | 45 ----------------------
3 files changed, 67 deletions(-)
diff --git a/kde-misc/kio-gdrive/Manifest b/kde-misc/kio-gdrive/Manifest
index 5f0ce1aa3e3..49cdda707c4 100644
--- a/kde-misc/kio-gdrive/Manifest
+++ b/kde-misc/kio-gdrive/Manifest
@@ -1,3 +1,2 @@
DIST kio-gdrive-1.1.1.tar.xz 24096 SHA256 c840151e844f9c135ff575771c09ac78bd9c939b853af72b568c76aa1db540ea SHA512 9377167a8f12731b27adc816790f50b73685dbfccf416e4ca927f08d52a85adb2cc6d769c111fc66fd24fe9646217321d7392946dbc6f05c9eb8a3e6aeb929ba WHIRLPOOL 2096961eb41738a319cc8e9589a0c6b14df6c55a365344c8dd484ed2b329aae2f19db12c7e9c8f8ef0417241406ea81a607cb03008d53207f2c84705482941fd
DIST kio-gdrive-1.2.0.1.tar.xz 34356 SHA256 7abe7352ae87e16580c6274502c7475d00d852bad96052aec5a3ce09f70a8009 SHA512 8f3cff889ff91c7775733f067ba45097d89e2f98a5ba1202d2fd55645973ffcf03f18002ce73fb5221706d51551af3d44ee2c41229f5c272ccf6913fcdb78c47 WHIRLPOOL b8d5c135123b2d94e0233ed3acf5131c97b3937b5897aadbadb9259b457449d48ed282be09f5d4029f328e1664a98f30b038837daf56dbba2a51f31eda31fcff
-DIST kio-gdrive-1.2.0.tar.xz 33780 SHA256 c3b0eb54efc92daa636c8eb81113bf8f196cd2e3af0ba8c37660bfa3a7dd9274 SHA512 244d4eb3ec17451400b8e68eb554f5bf8708c797085dc8606be095d1c39f367e9f5c8633d68834cfdbd25032e1726372d3fead131610d3ae9daf25f555924d29 WHIRLPOOL 2e66b8706604e1ea1aed1af817f18fb4f901ff2fa7b52fd28ee6807b1e309b9362fd10d4fd0bbd2dd3b75c91bc00fa0ca18a0e94be3391dc2f12bd838eeab388
diff --git a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.0-tests-optional.patch b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.0-tests-optional.patch
deleted file mode 100644
index f72b0963e3f..00000000000
--- a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.0-tests-optional.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-commit e9ddacb58dcf011bc2a877c11b026cab94031e65
-Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sat May 27 15:58:32 2017 +0200
-
- If tests are optional, autotests subdir must be conditional
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0c1b691..a2a771c 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -61,7 +61,9 @@ add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
- add_definitions(-DQT_STRICT_ITERATORS)
- add_definitions(-DTRANSLATION_DOMAIN=\"kio5_gdrive\")
-
--add_subdirectory(autotests)
-+if(BUILD_TESTING)
-+ add_subdirectory(autotests)
-+endif()
- add_subdirectory(desktop)
- add_subdirectory(doc)
- add_subdirectory(src)
diff --git a/kde-misc/kio-gdrive/kio-gdrive-1.2.0.ebuild b/kde-misc/kio-gdrive/kio-gdrive-1.2.0.ebuild
deleted file mode 100644
index 7842a1f824b..00000000000
--- a/kde-misc/kio-gdrive/kio-gdrive-1.2.0.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-KDE_APPS_MINIMAL="17.04.0"
-KDE_HANDBOOK="true"
-KDE_TEST="optional"
-inherit kde5
-
-DESCRIPTION="KIO Slave for Google Drive service"
-HOMEPAGE="https://phabricator.kde.org/project/profile/72/"
-
-if [[ ${KDE_BUILD_TYPE} != live ]] ; then
- SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
- KEYWORDS="~amd64"
-fi
-
-IUSE="+kaccounts"
-
-RDEPEND="
- $(add_frameworks_dep kcoreaddons)
- $(add_frameworks_dep ki18n)
- $(add_frameworks_dep kio)
- $(add_frameworks_dep knotifications)
- $(add_kdeapps_dep libkgapi)
- $(add_qt_dep qtwidgets)
- kaccounts? ( $(add_kdeapps_dep kaccounts-integration) )
- !kaccounts? ( dev-libs/qtkeychain:=[qt5] )
-"
-DEPEND="${RDEPEND}
- $(add_qt_dep qtgui)
- $(add_qt_dep qtnetwork)
-"
-
-DOCS=( README.md )
-
-PATCHES=( "${FILESDIR}/${P}-tests-optional.patch" )
-
-src_configure() {
- local mycmakeargs=(
- $(cmake-utils_use_find_package kaccounts KAccounts)
- )
- kde5_src_configure
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-misc/kio-gdrive/files/, kde-misc/kio-gdrive/
@ 2019-08-15 17:09 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2019-08-15 17:09 UTC (permalink / raw
To: gentoo-commits
commit: 78569d482a5866088bc6d9ebf3adcff8f864d2db
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 15 14:44:29 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Aug 15 17:09:43 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78569d48
kde-misc/kio-gdrive: Revbump for >=kde-apps/libkgapi-19.08.0 compat
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch | 120 +++++++++++++++++++++
.../files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch | 42 ++++++++
kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild | 49 +++++++++
3 files changed, 211 insertions(+)
diff --git a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch
new file mode 100644
index 00000000000..03352081b73
--- /dev/null
+++ b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch
@@ -0,0 +1,120 @@
+From 01ec4d87b2e28de5eb3c23ec469c6c746f573520 Mon Sep 17 00:00:00 2001
+From: David Barchiesi <david@barchie.si>
+Date: Sun, 19 May 2019 12:38:24 +0200
+Subject: Adapt to LibKGAPI setFields() changes.
+
+Summary:
+In the next release, LibKGAPI has changed the way it sets fields in `FileFetchJob` and in general allows setting response fields for all `Job`s (see [[ https://phabricator.kde.org/D20886 | D20886 Add fields standard query parameter to Job and use it in FileFetchJob ]]).
+
+This patch adjusts KIO Gdrive to this change and limits the response in `AboutFetchJob`s.
+
+Reviewers: dvratil, elvisangelaccio
+
+Subscribers: #libkgapi, #kio_gdrive
+
+Tags: #kio_gdrive, #libkgapi
+
+Differential Revision: https://phabricator.kde.org/D20888
+---
+ CMakeLists.txt | 2 +-
+ src/kio_gdrive.cpp | 30 ++++++++++++++++++------------
+ 2 files changed, 19 insertions(+), 13 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a830925..680ae3e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -5,7 +5,7 @@ project(kio-gdrive VERSION ${GDRIVE_VERSION})
+
+ set(QT_MIN_VERSION 5.2.0)
+ set(KF5_MIN_VERSION 5.14.0)
+-set(KGAPI_MIN_VERSION 5.5.0)
++set(KGAPI_MIN_VERSION 5.11.41)
+ set(KACCOUNTS_MIN_VERSION 17.04.0)
+ set(QTKEYCHAIN_MIN_VERSION 0.6.0)
+
+diff --git a/src/kio_gdrive.cpp b/src/kio_gdrive.cpp
+index 9ab146f..e01fef6 100644
+--- a/src/kio_gdrive.cpp
++++ b/src/kio_gdrive.cpp
+@@ -146,6 +146,12 @@ void KIOGDrive::fileSystemFreeSpace(const QUrl &url)
+ }
+ if (!gdriveUrl.isRoot()) {
+ AboutFetchJob aboutFetch(getAccount(accountId));
++ aboutFetch.setFields({
++ About::Fields::Kind,
++ About::Fields::QuotaBytesTotal,
++ About::Fields::QuotaBytesUsedAggregate,
++ About::Fields::CanCreateTeamDrives,
++ });
+ if (runJob(aboutFetch, url, accountId)) {
+ const AboutPtr about = aboutFetch.aboutData();
+ if (about) {
+@@ -379,7 +385,7 @@ QString KIOGDrive::resolveFileIdFromPath(const QString &path, PathFlags flags)
+
+ const QString accountId = gdriveUrl.account();
+ FileFetchJob fetchJob(query, getAccount(accountId));
+- fetchJob.setFields(FileFetchJob::Id | FileFetchJob::Title | FileFetchJob::Labels);
++ fetchJob.setFields({File::Fields::Id, File::Fields::Title, File::Fields::Labels});
+ if (!runJob(fetchJob, url, accountId)) {
+ return QString();
+ }
+@@ -404,6 +410,7 @@ QString KIOGDrive::rootFolderId(const QString &accountId)
+ auto it = m_rootIds.constFind(accountId);
+ if (it == m_rootIds.cend()) {
+ AboutFetchJob aboutFetch(getAccount(accountId));
++ aboutFetch.setFields({About::Fields::Kind, About::Fields::RootFolderId});
+ QUrl url;
+ if (!runJob(aboutFetch, url, accountId)) {
+ return QString();
+@@ -455,10 +462,13 @@ void KIOGDrive::listDir(const QUrl &url)
+ query.addQuery(FileSearchQuery::Trashed, FileSearchQuery::Equals, false);
+ query.addQuery(FileSearchQuery::Parents, FileSearchQuery::In, folderId);
+ FileFetchJob fileFetchJob(query, getAccount(accountId));
+- fileFetchJob.setFields((FileFetchJob::BasicFields & ~FileFetchJob::Permissions)
+- | FileFetchJob::Labels
+- | FileFetchJob::ExportLinks
+- | FileFetchJob::LastViewedByMeDate);
++ const auto extraFields =
++ KGAPI2::Drive::FileFetchJob::FieldShorthands::BasicFields +
++ QStringList({ KGAPI2::Drive::File::Fields::Labels,
++ KGAPI2::Drive::File::Fields::ExportLinks,
++ KGAPI2::Drive::File::Fields::LastViewedByMeDate,
++ });
++ fileFetchJob.setFields(KGAPI2::Drive::FileFetchJob::FieldShorthands::BasicFields + extraFields);
+ runJob(fileFetchJob, url, accountId);
+
+ ObjectsList objects = fileFetchJob.items();
+@@ -607,10 +617,7 @@ void KIOGDrive::get(const QUrl &url)
+ }
+
+ FileFetchJob fileFetchJob(fileId, getAccount(accountId));
+- fileFetchJob.setFields(FileFetchJob::Id
+- | FileFetchJob::MimeType
+- | FileFetchJob::ExportLinks
+- | FileFetchJob::DownloadUrl);
++ fileFetchJob.setFields({File::Fields::Id, File::Fields::MimeType, File::Fields::ExportLinks, File::Fields::DownloadUrl});
+ runJob(fileFetchJob, url, accountId);
+
+ const ObjectsList objects = fileFetchJob.items();
+@@ -866,8 +873,7 @@ void KIOGDrive::copy(const QUrl &src, const QUrl &dest, int permissions, KIO::Jo
+ return;
+ }
+ FileFetchJob sourceFileFetchJob(sourceFileId, getAccount(sourceAccountId));
+- sourceFileFetchJob.setFields(FileFetchJob::Id | FileFetchJob::ModifiedDate |
+- FileFetchJob::LastViewedByMeDate | FileFetchJob::Description);
++ sourceFileFetchJob.setFields({File::Fields::Id, File::Fields::ModifiedDate, File::Fields::LastViewedByMeDate, File::Fields::Description});
+ runJob(sourceFileFetchJob, src, sourceAccountId);
+
+ const ObjectsList objects = sourceFileFetchJob.items();
+@@ -1086,7 +1092,7 @@ void KIOGDrive::mimetype(const QUrl &url)
+ const QString accountId = GDriveUrl(url).account();
+
+ FileFetchJob fileFetchJob(fileId, getAccount(accountId));
+- fileFetchJob.setFields(FileFetchJob::Id | FileFetchJob::MimeType);
++ fileFetchJob.setFields({File::Fields::Id, File::Fields::MimeType});
+ runJob(fileFetchJob, url, accountId);
+
+ const ObjectsList objects = fileFetchJob.items();
+--
+cgit v1.1
diff --git a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch
new file mode 100644
index 00000000000..65d181ca7a5
--- /dev/null
+++ b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch
@@ -0,0 +1,42 @@
+From f81aed7bd13fd1d7fcd1f37baade3f1f6f34c54d Mon Sep 17 00:00:00 2001
+From: David Barchiesi <david@barchie.si>
+Date: Wed, 3 Jul 2019 20:18:59 +0200
+Subject: Remove useless FileFetchJob field specifications. Fixes D21838
+ related issues.
+
+---
+ src/kio_gdrive.cpp | 12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/src/kio_gdrive.cpp b/src/kio_gdrive.cpp
+index 4d80baf..5add144 100644
+--- a/src/kio_gdrive.cpp
++++ b/src/kio_gdrive.cpp
+@@ -149,8 +149,7 @@ void KIOGDrive::fileSystemFreeSpace(const QUrl &url)
+ aboutFetch.setFields({
+ About::Fields::Kind,
+ About::Fields::QuotaBytesTotal,
+- About::Fields::QuotaBytesUsedAggregate,
+- About::Fields::CanCreateTeamDrives,
++ About::Fields::QuotaBytesUsedAggregate
+ });
+ if (runJob(aboutFetch, url, accountId)) {
+ const AboutPtr about = aboutFetch.aboutData();
+@@ -462,11 +461,10 @@ void KIOGDrive::listDir(const QUrl &url)
+ query.addQuery(FileSearchQuery::Parents, FileSearchQuery::In, folderId);
+ FileFetchJob fileFetchJob(query, getAccount(accountId));
+ const auto extraFields =
+- KGAPI2::Drive::FileFetchJob::FieldShorthands::BasicFields +
+- QStringList({ KGAPI2::Drive::File::Fields::Labels,
+- KGAPI2::Drive::File::Fields::ExportLinks,
+- KGAPI2::Drive::File::Fields::LastViewedByMeDate,
+- });
++ QStringList({ KGAPI2::Drive::File::Fields::Labels,
++ KGAPI2::Drive::File::Fields::ExportLinks,
++ KGAPI2::Drive::File::Fields::LastViewedByMeDate,
++ });
+ fileFetchJob.setFields(KGAPI2::Drive::FileFetchJob::FieldShorthands::BasicFields + extraFields);
+ runJob(fileFetchJob, url, accountId);
+
+--
+cgit v1.1
diff --git a/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild b/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild
new file mode 100644
index 00000000000..41e4f617d5c
--- /dev/null
+++ b/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+KDE_APPS_MINIMAL=19.08.0
+KDE_HANDBOOK="forceoptional"
+KDE_TEST="optional"
+inherit kde5
+
+DESCRIPTION="KIO Slave for Google Drive service"
+HOMEPAGE="https://phabricator.kde.org/project/profile/72/"
+
+if [[ ${KDE_BUILD_TYPE} != live ]] ; then
+ SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+IUSE="+kaccounts"
+
+COMMON_DEPEND="
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep knotifications)
+ $(add_kdeapps_dep libkgapi)
+ $(add_qt_dep qtwidgets)
+ kaccounts? ( $(add_kdeapps_dep kaccounts-integration) )
+ !kaccounts? ( dev-libs/qtkeychain:=[qt5(+)] )
+"
+DEPEND="${COMMON_DEPEND}
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtnetwork)
+"
+RDEPEND="${COMMON_DEPEND}
+ kaccounts? ( $(add_kdeapps_dep kaccounts-providers) )
+"
+BDEPEND="dev-util/intltool"
+
+DOCS=( README.md )
+
+PATCHES=( "${FILESDIR}"/${P}-libkgapi-19.08-{1,2}.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package kaccounts KAccounts)
+ )
+ kde5_src_configure
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-misc/kio-gdrive/files/, kde-misc/kio-gdrive/
@ 2019-08-15 17:09 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2019-08-15 17:09 UTC (permalink / raw
To: gentoo-commits
commit: 538efaea5738d193f38cd76a5a4afe12837d1347
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 15 17:09:01 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Aug 15 17:09:43 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=538efaea
kde-misc/kio-gdrive: Add patch to refresh credentials
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../kio-gdrive-1.2.6-refresh-credentials.patch | 101 +++++++++++++++++++++
kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild | 5 +-
2 files changed, 105 insertions(+), 1 deletion(-)
diff --git a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-refresh-credentials.patch b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-refresh-credentials.patch
new file mode 100644
index 00000000000..2d595882786
--- /dev/null
+++ b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-refresh-credentials.patch
@@ -0,0 +1,101 @@
+From 4ded388b2b2672f5f7fb953a0150a69fcfaa7cb0 Mon Sep 17 00:00:00 2001
+From: David Barchiesi <david@barchie.si>
+Date: Mon, 8 Jul 2019 09:54:08 +0200
+Subject: Re get Google credentials from KAccounts when a refresh is needed.
+
+Summary: Currently, when the Google access token in use expires, the KIO slave silently ignores refreshing the token (only 'not implemented' gets logged) and fails all subsequent api requests. This patch prevents the slave from breaking by requesting new credentials from KAccounts.
+
+Test Plan: Open a Google Drive folder in Dolphin, wait until accounts token needs a refresh, open another Google Drive folder. The folder loads because a new access token was requested.
+
+Reviewers: elvisangelaccio
+
+Reviewed By: elvisangelaccio
+
+Subscribers: mck182, elvisangelaccio
+
+Differential Revision: https://phabricator.kde.org/D22009
+---
+ src/kaccountsmanager.cpp | 45 ++++++++++++++++++++++++++++++++-------------
+ src/kaccountsmanager.h | 2 ++
+ 2 files changed, 34 insertions(+), 13 deletions(-)
+
+diff --git a/src/kaccountsmanager.cpp b/src/kaccountsmanager.cpp
+index 08272df..dc35852 100644
+--- a/src/kaccountsmanager.cpp
++++ b/src/kaccountsmanager.cpp
+@@ -85,8 +85,19 @@ AccountPtr KAccountsManager::createAccount()
+
+ AccountPtr KAccountsManager::refreshAccount(const AccountPtr &account)
+ {
+- Q_UNUSED(account)
+- qCWarning(GDRIVE) << Q_FUNC_INFO << "not implemented.";
++ const QString accountName = account->accountName();
++ for (auto it = m_accounts.constBegin(); it != m_accounts.constEnd(); ++it) {
++ if (it.value()->accountName() != accountName) {
++ continue;
++ }
++
++ const auto id = it.key();
++ qCDebug(GDRIVE) << "Refreshing" << accountName;
++ auto gapiAccount = getAccountCredentials(id, accountName);
++ m_accounts.insert(id, gapiAccount);
++ return gapiAccount;
++ }
++
+ return {};
+ }
+
+@@ -143,19 +154,27 @@ void KAccountsManager::loadAccounts()
+ }
+ qCDebug(GDRIVE) << account->displayName() << "supports gdrive!";
+
+- auto job = new GetCredentialsJob(id, nullptr);
+- job->exec();
++ auto gapiAccount = getAccountCredentials(id, account->displayName());
++ m_accounts.insert(id, gapiAccount);
++ }
++ }
++}
+
+- auto gapiAccount = AccountPtr(new Account(account->displayName(),
+- job->credentialsData().value(QStringLiteral("AccessToken")).toString(),
+- job->credentialsData().value(QStringLiteral("RefreshToken")).toString()));
++AccountPtr KAccountsManager::getAccountCredentials(Accounts::AccountId id, const QString& displayName)
++{
++ auto job = new GetCredentialsJob(id, nullptr);
++ job->exec();
+
+- const auto scopes = job->credentialsData().value(QStringLiteral("Scope")).toStringList();
+- for (const auto &scope : scopes) {
+- gapiAccount->addScope(QUrl::fromUserInput(scope));
+- }
++ auto gapiAccount = AccountPtr(new Account(displayName,
++ job->credentialsData().value(QStringLiteral("AccessToken")).toString(),
++ job->credentialsData().value(QStringLiteral("RefreshToken")).toString()));
+
+- m_accounts.insert(id, gapiAccount);
+- }
++ const auto scopes = job->credentialsData().value(QStringLiteral("Scope")).toStringList();
++ for (const auto &scope : scopes) {
++ gapiAccount->addScope(QUrl::fromUserInput(scope));
+ }
++
++ qCDebug(GDRIVE) << "Got account credentials for:" << gapiAccount->accountName() << ", accessToken:" << gapiAccount->accessToken() << ", refreshToken:" << gapiAccount->refreshToken();
++
++ return gapiAccount;
+ }
+diff --git a/src/kaccountsmanager.h b/src/kaccountsmanager.h
+index 235d11a..d2dbc43 100644
+--- a/src/kaccountsmanager.h
++++ b/src/kaccountsmanager.h
+@@ -40,6 +40,8 @@ public:
+ private:
+ void loadAccounts();
+
++ KGAPI2::AccountPtr getAccountCredentials(Accounts::AccountId id, const QString& displayName);
++
+ QMap<Accounts::AccountId, KGAPI2::AccountPtr> m_accounts;
+ };
+
+--
+cgit v1.1
diff --git a/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild b/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild
index 41e4f617d5c..f6f2fa71b1f 100644
--- a/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild
+++ b/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild
@@ -39,7 +39,10 @@ BDEPEND="dev-util/intltool"
DOCS=( README.md )
-PATCHES=( "${FILESDIR}"/${P}-libkgapi-19.08-{1,2}.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-libkgapi-19.08-{1,2}.patch
+ "${FILESDIR}"/${P}-refresh-credentials.patch
+)
src_configure() {
local mycmakeargs=(
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-misc/kio-gdrive/files/, kde-misc/kio-gdrive/
@ 2019-08-25 8:10 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2019-08-25 8:10 UTC (permalink / raw
To: gentoo-commits
commit: bd6f5a3f962878d24fdd3adc589af89eb1b87a01
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 24 20:55:17 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Aug 25 08:08:27 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd6f5a3f
kde-misc/kio-gdrive: Drop 1.2.6-r1
Package-Manager: Portage-2.3.73, Repoman-2.3.17
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch | 120 ---------------------
.../files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch | 42 --------
kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild | 52 ---------
3 files changed, 214 deletions(-)
diff --git a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch
deleted file mode 100644
index 03352081b73..00000000000
--- a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 01ec4d87b2e28de5eb3c23ec469c6c746f573520 Mon Sep 17 00:00:00 2001
-From: David Barchiesi <david@barchie.si>
-Date: Sun, 19 May 2019 12:38:24 +0200
-Subject: Adapt to LibKGAPI setFields() changes.
-
-Summary:
-In the next release, LibKGAPI has changed the way it sets fields in `FileFetchJob` and in general allows setting response fields for all `Job`s (see [[ https://phabricator.kde.org/D20886 | D20886 Add fields standard query parameter to Job and use it in FileFetchJob ]]).
-
-This patch adjusts KIO Gdrive to this change and limits the response in `AboutFetchJob`s.
-
-Reviewers: dvratil, elvisangelaccio
-
-Subscribers: #libkgapi, #kio_gdrive
-
-Tags: #kio_gdrive, #libkgapi
-
-Differential Revision: https://phabricator.kde.org/D20888
----
- CMakeLists.txt | 2 +-
- src/kio_gdrive.cpp | 30 ++++++++++++++++++------------
- 2 files changed, 19 insertions(+), 13 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a830925..680ae3e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -5,7 +5,7 @@ project(kio-gdrive VERSION ${GDRIVE_VERSION})
-
- set(QT_MIN_VERSION 5.2.0)
- set(KF5_MIN_VERSION 5.14.0)
--set(KGAPI_MIN_VERSION 5.5.0)
-+set(KGAPI_MIN_VERSION 5.11.41)
- set(KACCOUNTS_MIN_VERSION 17.04.0)
- set(QTKEYCHAIN_MIN_VERSION 0.6.0)
-
-diff --git a/src/kio_gdrive.cpp b/src/kio_gdrive.cpp
-index 9ab146f..e01fef6 100644
---- a/src/kio_gdrive.cpp
-+++ b/src/kio_gdrive.cpp
-@@ -146,6 +146,12 @@ void KIOGDrive::fileSystemFreeSpace(const QUrl &url)
- }
- if (!gdriveUrl.isRoot()) {
- AboutFetchJob aboutFetch(getAccount(accountId));
-+ aboutFetch.setFields({
-+ About::Fields::Kind,
-+ About::Fields::QuotaBytesTotal,
-+ About::Fields::QuotaBytesUsedAggregate,
-+ About::Fields::CanCreateTeamDrives,
-+ });
- if (runJob(aboutFetch, url, accountId)) {
- const AboutPtr about = aboutFetch.aboutData();
- if (about) {
-@@ -379,7 +385,7 @@ QString KIOGDrive::resolveFileIdFromPath(const QString &path, PathFlags flags)
-
- const QString accountId = gdriveUrl.account();
- FileFetchJob fetchJob(query, getAccount(accountId));
-- fetchJob.setFields(FileFetchJob::Id | FileFetchJob::Title | FileFetchJob::Labels);
-+ fetchJob.setFields({File::Fields::Id, File::Fields::Title, File::Fields::Labels});
- if (!runJob(fetchJob, url, accountId)) {
- return QString();
- }
-@@ -404,6 +410,7 @@ QString KIOGDrive::rootFolderId(const QString &accountId)
- auto it = m_rootIds.constFind(accountId);
- if (it == m_rootIds.cend()) {
- AboutFetchJob aboutFetch(getAccount(accountId));
-+ aboutFetch.setFields({About::Fields::Kind, About::Fields::RootFolderId});
- QUrl url;
- if (!runJob(aboutFetch, url, accountId)) {
- return QString();
-@@ -455,10 +462,13 @@ void KIOGDrive::listDir(const QUrl &url)
- query.addQuery(FileSearchQuery::Trashed, FileSearchQuery::Equals, false);
- query.addQuery(FileSearchQuery::Parents, FileSearchQuery::In, folderId);
- FileFetchJob fileFetchJob(query, getAccount(accountId));
-- fileFetchJob.setFields((FileFetchJob::BasicFields & ~FileFetchJob::Permissions)
-- | FileFetchJob::Labels
-- | FileFetchJob::ExportLinks
-- | FileFetchJob::LastViewedByMeDate);
-+ const auto extraFields =
-+ KGAPI2::Drive::FileFetchJob::FieldShorthands::BasicFields +
-+ QStringList({ KGAPI2::Drive::File::Fields::Labels,
-+ KGAPI2::Drive::File::Fields::ExportLinks,
-+ KGAPI2::Drive::File::Fields::LastViewedByMeDate,
-+ });
-+ fileFetchJob.setFields(KGAPI2::Drive::FileFetchJob::FieldShorthands::BasicFields + extraFields);
- runJob(fileFetchJob, url, accountId);
-
- ObjectsList objects = fileFetchJob.items();
-@@ -607,10 +617,7 @@ void KIOGDrive::get(const QUrl &url)
- }
-
- FileFetchJob fileFetchJob(fileId, getAccount(accountId));
-- fileFetchJob.setFields(FileFetchJob::Id
-- | FileFetchJob::MimeType
-- | FileFetchJob::ExportLinks
-- | FileFetchJob::DownloadUrl);
-+ fileFetchJob.setFields({File::Fields::Id, File::Fields::MimeType, File::Fields::ExportLinks, File::Fields::DownloadUrl});
- runJob(fileFetchJob, url, accountId);
-
- const ObjectsList objects = fileFetchJob.items();
-@@ -866,8 +873,7 @@ void KIOGDrive::copy(const QUrl &src, const QUrl &dest, int permissions, KIO::Jo
- return;
- }
- FileFetchJob sourceFileFetchJob(sourceFileId, getAccount(sourceAccountId));
-- sourceFileFetchJob.setFields(FileFetchJob::Id | FileFetchJob::ModifiedDate |
-- FileFetchJob::LastViewedByMeDate | FileFetchJob::Description);
-+ sourceFileFetchJob.setFields({File::Fields::Id, File::Fields::ModifiedDate, File::Fields::LastViewedByMeDate, File::Fields::Description});
- runJob(sourceFileFetchJob, src, sourceAccountId);
-
- const ObjectsList objects = sourceFileFetchJob.items();
-@@ -1086,7 +1092,7 @@ void KIOGDrive::mimetype(const QUrl &url)
- const QString accountId = GDriveUrl(url).account();
-
- FileFetchJob fileFetchJob(fileId, getAccount(accountId));
-- fileFetchJob.setFields(FileFetchJob::Id | FileFetchJob::MimeType);
-+ fileFetchJob.setFields({File::Fields::Id, File::Fields::MimeType});
- runJob(fileFetchJob, url, accountId);
-
- const ObjectsList objects = fileFetchJob.items();
---
-cgit v1.1
diff --git a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch
deleted file mode 100644
index 65d181ca7a5..00000000000
--- a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From f81aed7bd13fd1d7fcd1f37baade3f1f6f34c54d Mon Sep 17 00:00:00 2001
-From: David Barchiesi <david@barchie.si>
-Date: Wed, 3 Jul 2019 20:18:59 +0200
-Subject: Remove useless FileFetchJob field specifications. Fixes D21838
- related issues.
-
----
- src/kio_gdrive.cpp | 12 +++++-------
- 1 file changed, 5 insertions(+), 7 deletions(-)
-
-diff --git a/src/kio_gdrive.cpp b/src/kio_gdrive.cpp
-index 4d80baf..5add144 100644
---- a/src/kio_gdrive.cpp
-+++ b/src/kio_gdrive.cpp
-@@ -149,8 +149,7 @@ void KIOGDrive::fileSystemFreeSpace(const QUrl &url)
- aboutFetch.setFields({
- About::Fields::Kind,
- About::Fields::QuotaBytesTotal,
-- About::Fields::QuotaBytesUsedAggregate,
-- About::Fields::CanCreateTeamDrives,
-+ About::Fields::QuotaBytesUsedAggregate
- });
- if (runJob(aboutFetch, url, accountId)) {
- const AboutPtr about = aboutFetch.aboutData();
-@@ -462,11 +461,10 @@ void KIOGDrive::listDir(const QUrl &url)
- query.addQuery(FileSearchQuery::Parents, FileSearchQuery::In, folderId);
- FileFetchJob fileFetchJob(query, getAccount(accountId));
- const auto extraFields =
-- KGAPI2::Drive::FileFetchJob::FieldShorthands::BasicFields +
-- QStringList({ KGAPI2::Drive::File::Fields::Labels,
-- KGAPI2::Drive::File::Fields::ExportLinks,
-- KGAPI2::Drive::File::Fields::LastViewedByMeDate,
-- });
-+ QStringList({ KGAPI2::Drive::File::Fields::Labels,
-+ KGAPI2::Drive::File::Fields::ExportLinks,
-+ KGAPI2::Drive::File::Fields::LastViewedByMeDate,
-+ });
- fileFetchJob.setFields(KGAPI2::Drive::FileFetchJob::FieldShorthands::BasicFields + extraFields);
- runJob(fileFetchJob, url, accountId);
-
---
-cgit v1.1
diff --git a/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild b/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild
deleted file mode 100644
index f6f2fa71b1f..00000000000
--- a/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-KDE_APPS_MINIMAL=19.08.0
-KDE_HANDBOOK="forceoptional"
-KDE_TEST="optional"
-inherit kde5
-
-DESCRIPTION="KIO Slave for Google Drive service"
-HOMEPAGE="https://phabricator.kde.org/project/profile/72/"
-
-if [[ ${KDE_BUILD_TYPE} != live ]] ; then
- SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
- KEYWORDS="~amd64 ~x86"
-fi
-
-IUSE="+kaccounts"
-
-COMMON_DEPEND="
- $(add_frameworks_dep kcoreaddons)
- $(add_frameworks_dep ki18n)
- $(add_frameworks_dep kio)
- $(add_frameworks_dep knotifications)
- $(add_kdeapps_dep libkgapi)
- $(add_qt_dep qtwidgets)
- kaccounts? ( $(add_kdeapps_dep kaccounts-integration) )
- !kaccounts? ( dev-libs/qtkeychain:=[qt5(+)] )
-"
-DEPEND="${COMMON_DEPEND}
- $(add_qt_dep qtgui)
- $(add_qt_dep qtnetwork)
-"
-RDEPEND="${COMMON_DEPEND}
- kaccounts? ( $(add_kdeapps_dep kaccounts-providers) )
-"
-BDEPEND="dev-util/intltool"
-
-DOCS=( README.md )
-
-PATCHES=(
- "${FILESDIR}"/${P}-libkgapi-19.08-{1,2}.patch
- "${FILESDIR}"/${P}-refresh-credentials.patch
-)
-
-src_configure() {
- local mycmakeargs=(
- $(cmake-utils_use_find_package kaccounts KAccounts)
- )
- kde5_src_configure
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-misc/kio-gdrive/files/, kde-misc/kio-gdrive/
@ 2020-03-16 21:29 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2020-03-16 21:29 UTC (permalink / raw
To: gentoo-commits
commit: 11c675b24fa3170d778ca75eb4e094616ff2840b
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 16 16:29:16 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Mar 16 21:25:46 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11c675b2
kde-misc/kio-gdrive: Fix build with >=kaccounts-integration-20.04
Upstream commit 088fe1964fcf7150eb85dc66cbe3670489729f15
Package-Manager: Portage-2.3.94, Repoman-2.3.21
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...-gdrive-1.2.7-kaccounts-integration-20.04.patch | 97 ++++++++++++++++++++++
kde-misc/kio-gdrive/kio-gdrive-1.2.7.ebuild | 5 +-
2 files changed, 101 insertions(+), 1 deletion(-)
diff --git a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.7-kaccounts-integration-20.04.patch b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.7-kaccounts-integration-20.04.patch
new file mode 100644
index 00000000000..bc6e7536e82
--- /dev/null
+++ b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.7-kaccounts-integration-20.04.patch
@@ -0,0 +1,97 @@
+From 088fe1964fcf7150eb85dc66cbe3670489729f15 Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Mon, 16 Mar 2020 10:39:08 +0100
+Subject: Adapt to new KAccounts plugin system
+
+Summary: KAccounts was ported from QPluginLoader to KPluginLoader in D27633. Adapt the KAccounts plugin to stay compatible
+
+Test Plan: Added a google account. Got a notification that my drive can now be used
+
+Reviewers: #kio_gdrive, elvisangelaccio
+
+Reviewed By: #kio_gdrive, elvisangelaccio
+
+Differential Revision: https://phabricator.kde.org/D27656
+---
+ kaccounts/CMakeLists.txt | 1 +
+ kaccounts/kaccountsplugin.cpp | 10 ++++++++--
+ kaccounts/kaccountsplugin.h | 5 +----
+ kaccounts/kaccountsplugin.json | 12 ++++++++++++
+ 4 files changed, 22 insertions(+), 6 deletions(-)
+ create mode 100644 kaccounts/kaccountsplugin.json
+
+diff --git a/kaccounts/CMakeLists.txt b/kaccounts/CMakeLists.txt
+index 2a7e796..bb26513 100644
+--- a/kaccounts/CMakeLists.txt
++++ b/kaccounts/CMakeLists.txt
+@@ -4,6 +4,7 @@ find_package(Intltool REQUIRED)
+ kaccounts_add_service(${CMAKE_CURRENT_SOURCE_DIR}/google-drive.service.in)
+
+ kcoreaddons_add_plugin(kaccounts_gdrive
++ JSON kaccountsplugin.json
+ SOURCES kaccountsplugin.cpp
+ INSTALL_NAMESPACE kaccounts/daemonplugins)
+
+diff --git a/kaccounts/kaccountsplugin.cpp b/kaccounts/kaccountsplugin.cpp
+index 5499f13..3e6fb7c 100644
+--- a/kaccounts/kaccountsplugin.cpp
++++ b/kaccounts/kaccountsplugin.cpp
+@@ -25,8 +25,12 @@
+ #include <KNotification>
+ #include <KRun>
+
+-GoogleDrivePlugin::GoogleDrivePlugin(QObject *parent)
+- : KAccountsDPlugin(parent)
++#include <KPluginFactory>
++
++K_PLUGIN_CLASS_WITH_JSON(GoogleDrivePlugin, "kaccountsplugin.json")
++
++GoogleDrivePlugin::GoogleDrivePlugin(QObject *parent, const QVariantList &args)
++ : KAccountsDPlugin(parent, args)
+ {
+ }
+
+@@ -72,3 +76,5 @@ void GoogleDrivePlugin::onServiceDisabled(const Accounts::AccountId accountId, c
+ Q_UNUSED(accountId)
+ Q_UNUSED(service)
+ }
++
++#include "kaccountsplugin.moc"
+diff --git a/kaccounts/kaccountsplugin.h b/kaccounts/kaccountsplugin.h
+index 82ae739..8613041 100644
+--- a/kaccounts/kaccountsplugin.h
++++ b/kaccounts/kaccountsplugin.h
+@@ -24,11 +24,8 @@
+ class GoogleDrivePlugin : public KAccountsDPlugin
+ {
+ Q_OBJECT
+- Q_PLUGIN_METADATA(IID "org.kde.kaccounts.DPlugin")
+- Q_INTERFACES(KAccountsDPlugin)
+-
+ public:
+- GoogleDrivePlugin(QObject *parent = nullptr);
++ explicit GoogleDrivePlugin(QObject *parent, const QVariantList &args);
+
+ public slots:
+ void onAccountCreated(const Accounts::AccountId accountId, const Accounts::ServiceList &serviceList) override;
+diff --git a/kaccounts/kaccountsplugin.json b/kaccounts/kaccountsplugin.json
+new file mode 100644
+index 0000000..89e8142
+--- /dev/null
++++ b/kaccounts/kaccountsplugin.json
+@@ -0,0 +1,12 @@
++{
++ "KPlugin": {
++ "Description": "Integrate KIO gdrive",
++ "EnabledByDefault": true,
++ "Icon": "system-file-manager",
++ "Id": "kaccounts_kio_gdrive",
++ "License": "GPL",
++ "Name": "KIO gdrive",
++ "Version": "0.1"
++ }
++}
++
+--
+cgit v1.1
+
diff --git a/kde-misc/kio-gdrive/kio-gdrive-1.2.7.ebuild b/kde-misc/kio-gdrive/kio-gdrive-1.2.7.ebuild
index 038869b249e..1a713692b2a 100644
--- a/kde-misc/kio-gdrive/kio-gdrive-1.2.7.ebuild
+++ b/kde-misc/kio-gdrive/kio-gdrive-1.2.7.ebuild
@@ -42,7 +42,10 @@ RDEPEND="${COMMON_DEPEND}
DOCS=( README.md )
-PATCHES=( "${FILESDIR}"/${PN}-1.2.6-refresh-credentials.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.2.6-refresh-credentials.patch
+ "${FILESDIR}"/${P}-kaccounts-integration-20.04.patch
+)
src_configure() {
local mycmakeargs=(
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-misc/kio-gdrive/files/, kde-misc/kio-gdrive/
@ 2020-04-23 22:07 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2020-04-23 22:07 UTC (permalink / raw
To: gentoo-commits
commit: c811e0a313e23ee2f734525583f701e04b1a55c6
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 23 11:44:57 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Apr 23 22:06:57 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c811e0a3
kde-misc/kio-gdrive: Drop 1.2.7 (r0)
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...-gdrive-1.2.7-kaccounts-integration-20.04.patch | 97 ----------------------
kde-misc/kio-gdrive/kio-gdrive-1.2.7.ebuild | 58 -------------
2 files changed, 155 deletions(-)
diff --git a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.7-kaccounts-integration-20.04.patch b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.7-kaccounts-integration-20.04.patch
deleted file mode 100644
index bc6e7536e82..00000000000
--- a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.7-kaccounts-integration-20.04.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 088fe1964fcf7150eb85dc66cbe3670489729f15 Mon Sep 17 00:00:00 2001
-From: Nicolas Fella <nicolas.fella@gmx.de>
-Date: Mon, 16 Mar 2020 10:39:08 +0100
-Subject: Adapt to new KAccounts plugin system
-
-Summary: KAccounts was ported from QPluginLoader to KPluginLoader in D27633. Adapt the KAccounts plugin to stay compatible
-
-Test Plan: Added a google account. Got a notification that my drive can now be used
-
-Reviewers: #kio_gdrive, elvisangelaccio
-
-Reviewed By: #kio_gdrive, elvisangelaccio
-
-Differential Revision: https://phabricator.kde.org/D27656
----
- kaccounts/CMakeLists.txt | 1 +
- kaccounts/kaccountsplugin.cpp | 10 ++++++++--
- kaccounts/kaccountsplugin.h | 5 +----
- kaccounts/kaccountsplugin.json | 12 ++++++++++++
- 4 files changed, 22 insertions(+), 6 deletions(-)
- create mode 100644 kaccounts/kaccountsplugin.json
-
-diff --git a/kaccounts/CMakeLists.txt b/kaccounts/CMakeLists.txt
-index 2a7e796..bb26513 100644
---- a/kaccounts/CMakeLists.txt
-+++ b/kaccounts/CMakeLists.txt
-@@ -4,6 +4,7 @@ find_package(Intltool REQUIRED)
- kaccounts_add_service(${CMAKE_CURRENT_SOURCE_DIR}/google-drive.service.in)
-
- kcoreaddons_add_plugin(kaccounts_gdrive
-+ JSON kaccountsplugin.json
- SOURCES kaccountsplugin.cpp
- INSTALL_NAMESPACE kaccounts/daemonplugins)
-
-diff --git a/kaccounts/kaccountsplugin.cpp b/kaccounts/kaccountsplugin.cpp
-index 5499f13..3e6fb7c 100644
---- a/kaccounts/kaccountsplugin.cpp
-+++ b/kaccounts/kaccountsplugin.cpp
-@@ -25,8 +25,12 @@
- #include <KNotification>
- #include <KRun>
-
--GoogleDrivePlugin::GoogleDrivePlugin(QObject *parent)
-- : KAccountsDPlugin(parent)
-+#include <KPluginFactory>
-+
-+K_PLUGIN_CLASS_WITH_JSON(GoogleDrivePlugin, "kaccountsplugin.json")
-+
-+GoogleDrivePlugin::GoogleDrivePlugin(QObject *parent, const QVariantList &args)
-+ : KAccountsDPlugin(parent, args)
- {
- }
-
-@@ -72,3 +76,5 @@ void GoogleDrivePlugin::onServiceDisabled(const Accounts::AccountId accountId, c
- Q_UNUSED(accountId)
- Q_UNUSED(service)
- }
-+
-+#include "kaccountsplugin.moc"
-diff --git a/kaccounts/kaccountsplugin.h b/kaccounts/kaccountsplugin.h
-index 82ae739..8613041 100644
---- a/kaccounts/kaccountsplugin.h
-+++ b/kaccounts/kaccountsplugin.h
-@@ -24,11 +24,8 @@
- class GoogleDrivePlugin : public KAccountsDPlugin
- {
- Q_OBJECT
-- Q_PLUGIN_METADATA(IID "org.kde.kaccounts.DPlugin")
-- Q_INTERFACES(KAccountsDPlugin)
--
- public:
-- GoogleDrivePlugin(QObject *parent = nullptr);
-+ explicit GoogleDrivePlugin(QObject *parent, const QVariantList &args);
-
- public slots:
- void onAccountCreated(const Accounts::AccountId accountId, const Accounts::ServiceList &serviceList) override;
-diff --git a/kaccounts/kaccountsplugin.json b/kaccounts/kaccountsplugin.json
-new file mode 100644
-index 0000000..89e8142
---- /dev/null
-+++ b/kaccounts/kaccountsplugin.json
-@@ -0,0 +1,12 @@
-+{
-+ "KPlugin": {
-+ "Description": "Integrate KIO gdrive",
-+ "EnabledByDefault": true,
-+ "Icon": "system-file-manager",
-+ "Id": "kaccounts_kio_gdrive",
-+ "License": "GPL",
-+ "Name": "KIO gdrive",
-+ "Version": "0.1"
-+ }
-+}
-+
---
-cgit v1.1
-
diff --git a/kde-misc/kio-gdrive/kio-gdrive-1.2.7.ebuild b/kde-misc/kio-gdrive/kio-gdrive-1.2.7.ebuild
deleted file mode 100644
index a36f78862b1..00000000000
--- a/kde-misc/kio-gdrive/kio-gdrive-1.2.7.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-ECM_HANDBOOK="forceoptional"
-ECM_TEST="optional"
-KFMIN=5.60.0
-QTMIN=5.12.3
-inherit ecm kde.org
-
-DESCRIPTION="KIO Slave for Google Drive service"
-HOMEPAGE="https://phabricator.kde.org/project/profile/72/"
-
-if [[ ${KDE_BUILD_TYPE} != live ]] ; then
- SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
- KEYWORDS="amd64 ~arm64 x86"
-fi
-
-LICENSE="GPL-2+"
-SLOT="5"
-IUSE="+kaccounts"
-
-BDEPEND="dev-util/intltool"
-COMMON_DEPEND="
- >=dev-qt/qtwidgets-${QTMIN}:5
- >=kde-apps/libkgapi-19.08.0:5
- >=kde-frameworks/kcoreaddons-${KFMIN}:5
- >=kde-frameworks/ki18n-${KFMIN}:5
- >=kde-frameworks/kio-${KFMIN}:5
- >=kde-frameworks/knotifications-${KFMIN}:5
- kaccounts? ( kde-apps/kaccounts-integration:5 )
- !kaccounts? ( dev-libs/qtkeychain:=[qt5(+)] )
-"
-DEPEND="${COMMON_DEPEND}
- >=dev-qt/qtgui-${QTMIN}:5
- >=dev-qt/qtnetwork-${QTMIN}:5
-"
-RDEPEND="${COMMON_DEPEND}
- kaccounts? ( >=kde-apps/kaccounts-providers-19.08.0:5 )
-"
-
-DOCS=( README.md )
-
-PATCHES=( "${FILESDIR}"/${PN}-1.2.6-refresh-credentials.patch )
-
-src_prepare() {
- has_version ">=kde-apps/kaccounts-providers-20.03.80" &&
- PATCHES+=( "${FILESDIR}"/${P}-kaccounts-integration-20.04.patch )
- ecm_src_prepare
-}
-
-src_configure() {
- local mycmakeargs=(
- $(cmake_use_find_package kaccounts KAccounts)
- )
- ecm_src_configure
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-misc/kio-gdrive/files/, kde-misc/kio-gdrive/
@ 2020-08-04 6:37 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2020-08-04 6:37 UTC (permalink / raw
To: gentoo-commits
commit: 4f9e042497f5e60bb4aedcffe66267db6c1aa8ae
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 4 06:37:13 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Aug 4 06:37:13 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f9e0424
kde-misc/kio-gdrive: Drop 1.2.7-r1
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
kde-misc/kio-gdrive/Manifest | 1 -
.../kio-gdrive-1.2.6-refresh-credentials.patch | 101 ---------------------
kde-misc/kio-gdrive/kio-gdrive-1.2.7-r1.ebuild | 52 -----------
3 files changed, 154 deletions(-)
diff --git a/kde-misc/kio-gdrive/Manifest b/kde-misc/kio-gdrive/Manifest
index c218e2fc2e0..85b22238440 100644
--- a/kde-misc/kio-gdrive/Manifest
+++ b/kde-misc/kio-gdrive/Manifest
@@ -1,2 +1 @@
-DIST kio-gdrive-1.2.7.tar.xz 46748 BLAKE2B 308c7d8d55c4eef175e2ef6030f1fbcdb59fdc6cd33f6c0bd5c35efe7bd21cf7f6cf7293b355f30b7b05effae79b91e357cc5a93ed866db850953f392bd65e0f SHA512 f1eedad2cd244e38f6cdf397e9488cb7f31fe7c4b17825f3b0882ff46f7f62f087e7b2bc59db434b4a55641920b8b03f3dec6adf7031ccc2277c7a0b166f9c80
DIST kio-gdrive-1.3.0.tar.xz 51668 BLAKE2B a5c9bc347e5b40998449b613e8ad73c362d82d2486a1e91527f84acc5473d603b3cca422bd7c67cff28e49b08803904fdf752bec742bae752e868b8a84321684 SHA512 b0a6be2b59512d3faf6c677c6f3ffdcc9a38fff3a41d0bc6a29566008d7da3ab524fb189ddd219308a8ac8244fbed67c01da480e8193ed0aeb815fe64d72988a
diff --git a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-refresh-credentials.patch b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-refresh-credentials.patch
deleted file mode 100644
index 2d595882786..00000000000
--- a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-refresh-credentials.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 4ded388b2b2672f5f7fb953a0150a69fcfaa7cb0 Mon Sep 17 00:00:00 2001
-From: David Barchiesi <david@barchie.si>
-Date: Mon, 8 Jul 2019 09:54:08 +0200
-Subject: Re get Google credentials from KAccounts when a refresh is needed.
-
-Summary: Currently, when the Google access token in use expires, the KIO slave silently ignores refreshing the token (only 'not implemented' gets logged) and fails all subsequent api requests. This patch prevents the slave from breaking by requesting new credentials from KAccounts.
-
-Test Plan: Open a Google Drive folder in Dolphin, wait until accounts token needs a refresh, open another Google Drive folder. The folder loads because a new access token was requested.
-
-Reviewers: elvisangelaccio
-
-Reviewed By: elvisangelaccio
-
-Subscribers: mck182, elvisangelaccio
-
-Differential Revision: https://phabricator.kde.org/D22009
----
- src/kaccountsmanager.cpp | 45 ++++++++++++++++++++++++++++++++-------------
- src/kaccountsmanager.h | 2 ++
- 2 files changed, 34 insertions(+), 13 deletions(-)
-
-diff --git a/src/kaccountsmanager.cpp b/src/kaccountsmanager.cpp
-index 08272df..dc35852 100644
---- a/src/kaccountsmanager.cpp
-+++ b/src/kaccountsmanager.cpp
-@@ -85,8 +85,19 @@ AccountPtr KAccountsManager::createAccount()
-
- AccountPtr KAccountsManager::refreshAccount(const AccountPtr &account)
- {
-- Q_UNUSED(account)
-- qCWarning(GDRIVE) << Q_FUNC_INFO << "not implemented.";
-+ const QString accountName = account->accountName();
-+ for (auto it = m_accounts.constBegin(); it != m_accounts.constEnd(); ++it) {
-+ if (it.value()->accountName() != accountName) {
-+ continue;
-+ }
-+
-+ const auto id = it.key();
-+ qCDebug(GDRIVE) << "Refreshing" << accountName;
-+ auto gapiAccount = getAccountCredentials(id, accountName);
-+ m_accounts.insert(id, gapiAccount);
-+ return gapiAccount;
-+ }
-+
- return {};
- }
-
-@@ -143,19 +154,27 @@ void KAccountsManager::loadAccounts()
- }
- qCDebug(GDRIVE) << account->displayName() << "supports gdrive!";
-
-- auto job = new GetCredentialsJob(id, nullptr);
-- job->exec();
-+ auto gapiAccount = getAccountCredentials(id, account->displayName());
-+ m_accounts.insert(id, gapiAccount);
-+ }
-+ }
-+}
-
-- auto gapiAccount = AccountPtr(new Account(account->displayName(),
-- job->credentialsData().value(QStringLiteral("AccessToken")).toString(),
-- job->credentialsData().value(QStringLiteral("RefreshToken")).toString()));
-+AccountPtr KAccountsManager::getAccountCredentials(Accounts::AccountId id, const QString& displayName)
-+{
-+ auto job = new GetCredentialsJob(id, nullptr);
-+ job->exec();
-
-- const auto scopes = job->credentialsData().value(QStringLiteral("Scope")).toStringList();
-- for (const auto &scope : scopes) {
-- gapiAccount->addScope(QUrl::fromUserInput(scope));
-- }
-+ auto gapiAccount = AccountPtr(new Account(displayName,
-+ job->credentialsData().value(QStringLiteral("AccessToken")).toString(),
-+ job->credentialsData().value(QStringLiteral("RefreshToken")).toString()));
-
-- m_accounts.insert(id, gapiAccount);
-- }
-+ const auto scopes = job->credentialsData().value(QStringLiteral("Scope")).toStringList();
-+ for (const auto &scope : scopes) {
-+ gapiAccount->addScope(QUrl::fromUserInput(scope));
- }
-+
-+ qCDebug(GDRIVE) << "Got account credentials for:" << gapiAccount->accountName() << ", accessToken:" << gapiAccount->accessToken() << ", refreshToken:" << gapiAccount->refreshToken();
-+
-+ return gapiAccount;
- }
-diff --git a/src/kaccountsmanager.h b/src/kaccountsmanager.h
-index 235d11a..d2dbc43 100644
---- a/src/kaccountsmanager.h
-+++ b/src/kaccountsmanager.h
-@@ -40,6 +40,8 @@ public:
- private:
- void loadAccounts();
-
-+ KGAPI2::AccountPtr getAccountCredentials(Accounts::AccountId id, const QString& displayName);
-+
- QMap<Accounts::AccountId, KGAPI2::AccountPtr> m_accounts;
- };
-
---
-cgit v1.1
diff --git a/kde-misc/kio-gdrive/kio-gdrive-1.2.7-r1.ebuild b/kde-misc/kio-gdrive/kio-gdrive-1.2.7-r1.ebuild
deleted file mode 100644
index e7eb5ed98d4..00000000000
--- a/kde-misc/kio-gdrive/kio-gdrive-1.2.7-r1.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-ECM_HANDBOOK="forceoptional"
-ECM_TEST="optional"
-KFMIN=5.60.0
-QTMIN=5.12.3
-inherit ecm kde.org
-
-DESCRIPTION="KIO Slave for Google Drive service"
-HOMEPAGE="https://phabricator.kde.org/project/profile/72/"
-
-if [[ ${KDE_BUILD_TYPE} != live ]] ; then
- SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
- KEYWORDS="amd64 ~arm64 x86"
-fi
-
-LICENSE="GPL-2+"
-SLOT="5"
-IUSE="+kaccounts"
-
-BDEPEND="dev-util/intltool"
-COMMON_DEPEND="
- >=dev-qt/qtwidgets-${QTMIN}:5
- =kde-apps/libkgapi-19.12*:5
- >=kde-frameworks/kcoreaddons-${KFMIN}:5
- >=kde-frameworks/ki18n-${KFMIN}:5
- >=kde-frameworks/kio-${KFMIN}:5
- >=kde-frameworks/knotifications-${KFMIN}:5
- kaccounts? ( =kde-apps/kaccounts-integration-19.12*:5 )
- !kaccounts? ( dev-libs/qtkeychain:=[qt5(+)] )
-"
-DEPEND="${COMMON_DEPEND}
- >=dev-qt/qtgui-${QTMIN}:5
- >=dev-qt/qtnetwork-${QTMIN}:5
-"
-RDEPEND="${COMMON_DEPEND}
- kaccounts? ( >=kde-apps/kaccounts-providers-19.08.0:5 )
-"
-
-DOCS=( README.md )
-
-PATCHES=( "${FILESDIR}"/${PN}-1.2.6-refresh-credentials.patch )
-
-src_configure() {
- local mycmakeargs=(
- $(cmake_use_find_package kaccounts KAccounts)
- )
- ecm_src_configure
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-08-04 6:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-23 22:07 [gentoo-commits] repo/gentoo:master commit in: kde-misc/kio-gdrive/files/, kde-misc/kio-gdrive/ Andreas Sturmlechner
-- strict thread matches above, loose matches on Subject: below --
2020-08-04 6:37 Andreas Sturmlechner
2020-03-16 21:29 Andreas Sturmlechner
2019-08-25 8:10 Andreas Sturmlechner
2019-08-15 17:09 Andreas Sturmlechner
2019-08-15 17:09 Andreas Sturmlechner
2017-05-31 20:11 Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox