commit:     aafd9a4d3575a6d8fb4c3f0c527b57524b7571cf
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 22 12:08:35 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Apr 22 14:32:04 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aafd9a4d

kde-apps/kdepim-runtime: Add upstream fix for gmail accounts migration

See also:
https://mail.kde.org/pipermail/release-team/2017-April/010257.html

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../kdepim-runtime-17.04.0-gmail-migration.patch   | 52 ++++++++++++++
 .../kdepim-runtime-17.04.0-r1.ebuild               | 81 ++++++++++++++++++++++
 2 files changed, 133 insertions(+)

diff --git 
a/kde-apps/kdepim-runtime/files/kdepim-runtime-17.04.0-gmail-migration.patch 
b/kde-apps/kdepim-runtime/files/kdepim-runtime-17.04.0-gmail-migration.patch
new file mode 100644
index 00000000000..5ea301ccec8
--- /dev/null
+++ b/kde-apps/kdepim-runtime/files/kdepim-runtime-17.04.0-gmail-migration.patch
@@ -0,0 +1,52 @@
+From c9ae16363e68d6958db0cd835cb0180b340594b5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <[email protected]>
+Date: Sat, 22 Apr 2017 13:31:42 +0200
+Subject: [IMAP] Fix migration to new Gmail authentication
+
+Currently the settings would be migrated only if user opened the
+Settings dialog. The GmailPasswordRequester expects that the server
+settings is migrated correctly and always tries to authenticate via
+XOAUTH2, even if the configuration says "PLAIN" or other mechanism.
+This breaks login as we try to send XOAUTH2 tokens as PLAIN credentials.
+
+This change ensures that the encryption and auth mechanism settings
+is correctly migrated on resource startup.
+
+CCBUG: 378857
+CCBUG: 378876
+---
+ resources/imap/settings.cpp | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/resources/imap/settings.cpp b/resources/imap/settings.cpp
+index 53296b8..6a599ea 100644
+--- a/resources/imap/settings.cpp
++++ b/resources/imap/settings.cpp
+@@ -23,6 +23,7 @@
+ 
+ #include "imapaccount.h"
+ #include "utils.h"
++#include "config.h"
+ 
+ #include <kwallet.h>
+ using KWallet::Wallet;
+@@ -78,6 +79,17 @@ Settings::Settings(WId winId) : SettingsBase(), 
m_winId(winId)
+ {
+     load();
+ 
++#ifdef WITH_GMAIL_XOAUTH2
++    // Make sure that Gmail configuration is correctly migrated even if the 
user
++    // did not open the configuration dialog
++    if (Utils::isGmail(imapServer())) {
++        setImapPort(993);
++        setSafety(QStringLiteral("SSL"));
++        
setAuthentication(MailTransport::Transport::EnumAuthenticationType::XOAUTH2);
++        save();
++    }
++#endif
++
+     new SettingsAdaptor(this);
+     QDBusConnection::sessionBus().registerObject(QStringLiteral("/Settings"), 
this, QDBusConnection::ExportAdaptors | 
QDBusConnection::ExportScriptableContents);
+ }
+-- 
+cgit v0.11.2

diff --git a/kde-apps/kdepim-runtime/kdepim-runtime-17.04.0-r1.ebuild 
b/kde-apps/kdepim-runtime/kdepim-runtime-17.04.0-r1.ebuild
new file mode 100644
index 00000000000..e8bd49c7047
--- /dev/null
+++ b/kde-apps/kdepim-runtime/kdepim-runtime-17.04.0-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="forceoptional"
+KDE_TEST="forceoptional"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Runtime plugin collection to extend the functionality of KDE PIM"
+LICENSE="GPL-2+ LGPL-2.1+"
+KEYWORDS="~amd64 ~x86"
+IUSE="google"
+
+# TODO kolab, Qt5TextToSpeech
+CDEPEND="
+       $(add_frameworks_dep kcodecs)
+       $(add_frameworks_dep kcompletion)
+       $(add_frameworks_dep kconfig)
+       $(add_frameworks_dep kconfigwidgets)
+       $(add_frameworks_dep kcoreaddons)
+       $(add_frameworks_dep kdbusaddons)
+       $(add_frameworks_dep kdelibs4support)
+       $(add_frameworks_dep ki18n)
+       $(add_frameworks_dep kio)
+       $(add_frameworks_dep kitemmodels)
+       $(add_frameworks_dep kjobwidgets)
+       $(add_frameworks_dep knotifications)
+       $(add_frameworks_dep knotifyconfig)
+       $(add_frameworks_dep kservice)
+       $(add_frameworks_dep ktextwidgets)
+       $(add_frameworks_dep kwallet)
+       $(add_frameworks_dep kwidgetsaddons)
+       $(add_frameworks_dep kwindowsystem)
+       $(add_frameworks_dep kxmlgui)
+       $(add_kdeapps_dep akonadi)
+       $(add_kdeapps_dep akonadi-calendar)
+       $(add_kdeapps_dep akonadi-contacts)
+       $(add_kdeapps_dep akonadi-mime)
+       $(add_kdeapps_dep akonadi-notes)
+       $(add_kdeapps_dep kalarmcal)
+       $(add_kdeapps_dep kcalcore)
+       $(add_kdeapps_dep kcalutils)
+       $(add_kdeapps_dep kcontacts)
+       $(add_kdeapps_dep kdav)
+       $(add_kdeapps_dep kidentitymanagement)
+       $(add_kdeapps_dep kimap)
+       $(add_kdeapps_dep kmailtransport)
+       $(add_kdeapps_dep kmbox)
+       $(add_kdeapps_dep kmime)
+       $(add_qt_dep qtdbus)
+       $(add_qt_dep qtgui)
+       $(add_qt_dep qtnetwork)
+       $(add_qt_dep qtwebengine 'widgets')
+       $(add_qt_dep qtwidgets)
+       $(add_qt_dep qtxml)
+       dev-libs/cyrus-sasl:2
+       dev-libs/libical:=
+       google? ( $(add_kdeapps_dep libkgapi) )
+"
+DEPEND="${CDEPEND}
+       $(add_qt_dep qtxmlpatterns)
+       dev-libs/libxslt
+"
+RDEPEND="${CDEPEND}
+       !kde-apps/kdepim-kioslaves
+       $(add_frameworks_dep oxygen-icons)
+"
+
+RESTRICT+=" test"
+
+PATCHES=( "${FILESDIR}/${P}-gmail-migration.patch" )
+
+src_configure() {
+       local mycmakeargs=(
+               $(cmake-utils_use_find_package google KPimGAPI)
+       )
+
+       kde5_src_configure
+}

Reply via email to