Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kdepim-runtime for openSUSE:Factory checked in at 2023-09-22 21:47:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdepim-runtime (Old) and /work/SRC/openSUSE:Factory/.kdepim-runtime.new.1770 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdepim-runtime" Fri Sep 22 21:47:08 2023 rev:111 rq:1112533 version:23.08.1 Changes: -------- --- /work/SRC/openSUSE:Factory/kdepim-runtime/kdepim-runtime.changes 2023-09-15 22:02:44.515271748 +0200 +++ /work/SRC/openSUSE:Factory/.kdepim-runtime.new.1770/kdepim-runtime.changes 2023-09-22 21:47:54.781947076 +0200 @@ -1,0 +2,9 @@ +Wed Sep 20 10:18:14 UTC 2023 - Christophe Marin <[email protected]> + +- Add upstream changes to fix issues with the google resource + (boo#1214714, kde#470820) + * 0001-Revert-Revert-Use-config-plugin-instead-of-out-of-pr.patch + * 0002-Revert-Revert-Fix-race-condition-when-building.patch + * 0003-Actually-start-job-to-read-secret-key.patch + +------------------------------------------------------------------- New: ---- 0001-Revert-Revert-Use-config-plugin-instead-of-out-of-pr.patch 0002-Revert-Revert-Fix-race-condition-when-building.patch 0003-Actually-start-job-to-read-secret-key.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdepim-runtime.spec ++++++ --- /var/tmp/diff_new_pack.6fMTYN/_old 2023-09-22 21:47:56.013991803 +0200 +++ /var/tmp/diff_new_pack.6fMTYN/_new 2023-09-22 21:47:56.017991949 +0200 @@ -29,6 +29,10 @@ Source1: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig Source2: applications.keyring %endif +# PATCH-FIX-UPSTREAM +Patch0: 0001-Revert-Revert-Use-config-plugin-instead-of-out-of-pr.patch +Patch1: 0002-Revert-Revert-Fix-race-condition-when-building.patch +Patch2: 0003-Actually-start-job-to-read-secret-key.patch BuildRequires: cyrus-sasl-devel BuildRequires: extra-cmake-modules BuildRequires: hicolor-icon-theme ++++++ 0001-Revert-Revert-Use-config-plugin-instead-of-out-of-pr.patch ++++++ ++++ 1303 lines (skipped) ++++++ 0002-Revert-Revert-Fix-race-condition-when-building.patch ++++++ >From 2fd3604ad6a9594b9dd8b0f1529f4f4589fe831f Mon Sep 17 00:00:00 2001 From: Carl Schwan <[email protected]> Date: Tue, 19 Sep 2023 17:04:36 +0200 Subject: [PATCH 2/4] Revert "Revert "Fix race condition when building"" This reverts commit d3f20b3dab530065f9cff9d73e4ca1076af55a29. (cherry picked from commit f9f262b9289f7b1c34e55205fa0c5cde915bc652) --- resources/google-groupware/CMakeLists.txt | 7 ++++--- resources/google-groupware/googleresource.cpp | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/google-groupware/CMakeLists.txt b/resources/google-groupware/CMakeLists.txt index 2f2b46ade..0ac6f2db8 100644 --- a/resources/google-groupware/CMakeLists.txt +++ b/resources/google-groupware/CMakeLists.txt @@ -67,9 +67,6 @@ set(googleresource_SRCS ${googleresource_common_SRCS} ) -ki18n_wrap_ui(googleresource_SRCS googlesettingswidget.ui) - - add_executable(akonadi_google_resource ${googleresource_SRCS}) if (COMPILE_WITH_UNITY_CMAKE_SUPPORT) set_target_properties(akonadi_google_resource PROPERTIES UNITY_BUILD ON) @@ -126,6 +123,7 @@ install( kcoreaddons_add_plugin(googleconfig INSTALL_NAMESPACE "pim${QT_MAJOR_VERSION}/akonadi/config" ) + target_sources(googleconfig PRIVATE googleconfig.cpp @@ -133,6 +131,9 @@ PRIVATE googlesettingswidget.h ${googleresource_common_SRCS} ) + +ki18n_wrap_ui(googleconfig googlesettingswidget.ui) + target_link_libraries(googleconfig KPim${KF_MAJOR_VERSION}::AkonadiCore KPim${KF_MAJOR_VERSION}::AkonadiCalendar diff --git a/resources/google-groupware/googleresource.cpp b/resources/google-groupware/googleresource.cpp index 47a7e0c8d..d51c1e4a7 100644 --- a/resources/google-groupware/googleresource.cpp +++ b/resources/google-groupware/googleresource.cpp @@ -11,7 +11,6 @@ #include "googleresourcestate.h" #include "googlescopes.h" #include "googlesettings.h" -#include "googlesettingswidget.h" #include "settingsadaptor.h" #include "personhandler.h" -- 2.42.0 ++++++ 0003-Actually-start-job-to-read-secret-key.patch ++++++ >From c99afc75a503fff6ca83df2f47a5d5d951579524 Mon Sep 17 00:00:00 2001 From: Carl Schwan <[email protected]> Date: Tue, 19 Sep 2023 18:58:54 +0200 Subject: [PATCH 3/4] Actually start job to read secret key BUG: 470820 (cherry picked from commit 8393e92d56ecb31b2dd65d15d046f8e02565f5e3) --- resources/google-groupware/googleconfig.cpp | 8 +++++++- resources/google-groupware/googlesettings.cpp | 15 +++++++++------ .../google-groupware/googlesettingswidget.cpp | 3 +-- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/resources/google-groupware/googleconfig.cpp b/resources/google-groupware/googleconfig.cpp index 2eb6ab2ef..1af177c81 100644 --- a/resources/google-groupware/googleconfig.cpp +++ b/resources/google-groupware/googleconfig.cpp @@ -6,6 +6,7 @@ #include <Akonadi/AgentConfigurationBase> +#include "googleresource_debug.h" #include "googlesettings.h" #include "googlesettingswidget.h" @@ -25,7 +26,12 @@ public: void load() override { Akonadi::AgentConfigurationBase::load(); - mWidget.loadSettings(); + mSettings.init(); + connect(&mSettings, &GoogleSettings::accountReady, this, [this](bool ready) { + if (ready) { + mWidget.loadSettings(); + } + }); } Q_REQUIRED_RESULT bool save() const override diff --git a/resources/google-groupware/googlesettings.cpp b/resources/google-groupware/googlesettings.cpp index aa94cad1a..23a997989 100644 --- a/resources/google-groupware/googlesettings.cpp +++ b/resources/google-groupware/googlesettings.cpp @@ -32,7 +32,6 @@ static const QString googleWalletFolder = QStringLiteral("Akonadi Google"); GoogleSettings::GoogleSettings(const KSharedConfigPtr &config, Options options) : SettingsBase(config) { - qDebug() << config; if (options & Option::ExportToDBus) { new SettingsAdaptor(this); QDBusConnection::sessionBus().registerObject(QStringLiteral("/Settings"), @@ -44,9 +43,11 @@ GoogleSettings::GoogleSettings(const KSharedConfigPtr &config, Options options) void GoogleSettings::init() { // First read from QtKeyChain - auto job = new QKeychain::ReadPasswordJob(googleWalletFolder); + auto job = new QKeychain::ReadPasswordJob(googleWalletFolder, this); + job->setKey(account()); connect(job, &QKeychain::Job::finished, this, [this, job]() { if (job->error() != QKeychain::Error::NoError) { + qCWarning(GOOGLE_LOG) << "Unable to read password" << job->error(); Q_EMIT accountReady(false); return; } @@ -54,18 +55,19 @@ void GoogleSettings::init() // Found something with QtKeyChain if (!account().isEmpty()) { m_account = fetchAccountFromKeychain(account(), job); + m_isReady = true; + Q_EMIT accountReady(true); } - m_isReady = true; - Q_EMIT accountReady(true); }); + job->start(); } KGAPI2::AccountPtr GoogleSettings::fetchAccountFromKeychain(const QString &accountName, QKeychain::ReadPasswordJob *job) { QMap<QString, QString> map; auto value = job->binaryData(); - if (!value.isEmpty()) { - qCDebug(GOOGLE_LOG) << "Account" << accountName << "not found in KWallet"; + if (value.isEmpty()) { + qCWarning(GOOGLE_LOG) << "Account" << accountName << "not found in KWallet"; return {}; } @@ -116,6 +118,7 @@ WritePasswordJob *GoogleSettings::storeAccount(AccountPtr account) connect(writeJob, &WritePasswordJob::finished, this, [this, writeJob]() { if (writeJob->error()) { + qCWarning(GOOGLE_LOG) << "Unable to write password" << writeJob->error(); return; } SettingsBase::setAccount(m_account->accountName()); diff --git a/resources/google-groupware/googlesettingswidget.cpp b/resources/google-groupware/googlesettingswidget.cpp index 2543c4c6b..8e84cfbab 100644 --- a/resources/google-groupware/googlesettingswidget.cpp +++ b/resources/google-groupware/googlesettingswidget.cpp @@ -36,7 +36,6 @@ GoogleSettingsWidget::GoogleSettingsWidget(GoogleSettings &settings, const QStri , m_settings(settings) , m_identifier(identifier) { - qDebug() << m_settings.account(); auto mainLayout = new QVBoxLayout(this); auto mainWidget = new QWidget(this); @@ -83,7 +82,7 @@ bool GoogleSettingsWidget::handleError(KGAPI2::Job *job) } if (job->error() == KGAPI2::Unauthorized) { - qCDebug(GOOGLE_LOG) << job << job->errorString(); + qWarning() << job << job->errorString(); const QList<QUrl> resourceScopes = googleScopes(); for (const QUrl &scope : resourceScopes) { if (!m_account->scopes().contains(scope)) { -- 2.42.0
