summaryrefslogtreecommitdiff
path: root/kde-apps/akonadi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-08-02 19:14:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-08-02 19:14:55 +0100
commitb24bd25253fe093f722ab576d29fdc41d04cb1ee (patch)
tree0fcf2afd9f852c4d4c291cf8afaa2c244d598105 /kde-apps/akonadi
parent121ed4eec41fbf03e1998d09eede1bf449da63b9 (diff)
gentoo resync : 02.08.2019
Diffstat (limited to 'kde-apps/akonadi')
-rw-r--r--kde-apps/akonadi/Manifest8
-rw-r--r--kde-apps/akonadi/akonadi-19.04.3-r1.ebuild (renamed from kde-apps/akonadi/akonadi-18.12.3-r2.ebuild)19
-rw-r--r--kde-apps/akonadi/akonadi-19.04.3.ebuild112
-rw-r--r--kde-apps/akonadi/files/akonadi-18.12.3-akonadi_control-start-race-condition.patch187
-rw-r--r--kde-apps/akonadi/files/akonadi-18.12.3-collection-detach-at-wrong-time-in-attribute.patch97
-rw-r--r--kde-apps/akonadi/files/akonadi-18.12.3-major-regression-updating-attributes.patch55
-rw-r--r--kde-apps/akonadi/files/akonadi-19.04.3-qmysql-fix.patch44
7 files changed, 60 insertions, 462 deletions
diff --git a/kde-apps/akonadi/Manifest b/kde-apps/akonadi/Manifest
index 58064340e973..967425a491b4 100644
--- a/kde-apps/akonadi/Manifest
+++ b/kde-apps/akonadi/Manifest
@@ -1,9 +1,5 @@
AUX akonadi-18.12.2-mysql56-crash.patch 2196 BLAKE2B d12643c870da557f540f199f78462f97fc569ffe160415f56f166d89b7e94e0f6682fa68ed84c9629e66639ddac61b5c54376c309a8921d84a1d52ba351a9aab SHA512 093a0b4243668344db59b0419809500e411f7399137ba3d9c439b4d5300a2f867fb231f7d5a8bc5d95ad2d1ccb6921804caff8200ddddba74a62ddcdfa9ac623
-AUX akonadi-18.12.3-akonadi_control-start-race-condition.patch 7349 BLAKE2B 66b4313af759b5d9a42c49fb6cadd7abd3bf990ecc04dc14300d684f5edc57ce61fffdfe08dc3480cf9a62ed73d726975d1047bf663d87d8de8081256625a0b8 SHA512 df8d6ad4c43ddf80c0b90188bcd9b74cb176d0553ca886e7b5a4f41109770415f67e49e00525aeea885dab3058c7076d05aafa5b5fa5c191e95a0d1f7c0c1bd9
-AUX akonadi-18.12.3-collection-detach-at-wrong-time-in-attribute.patch 3459 BLAKE2B cbaa0fd210f21b0bdb917fb46fca7096a145df38b394d8542f7c1898287ba6cbc9293bb65ab01be7a7619325d8653391902b1a7c4d52a9a2376e57161af13cde SHA512 5a515f41c0a2343eaa562129e1e844c380db4f88288641af240983420cdf4144857a64f1f01f8ec0a60e65fdbff0752efaec4c1c0bed373d6aad77f54905731e
-AUX akonadi-18.12.3-major-regression-updating-attributes.patch 2415 BLAKE2B 028bfbe36774d9eeea4c2d9028c65e3953fcf68fc085e6fe21f89c2528a3ad270b19c1e8d8c04aa1935a77336853f9722a81d7cb99302d99f91072829e051adc SHA512 33271a433a1009e5943210ed6fc54c6a26ab8c994a4a9a89502a1b648ce5f9ee696dfb839ad6e77e1b73148dbc5c75faaebda2f3b26731b86425d63353a59244
-DIST akonadi-18.12.3.tar.xz 1555044 BLAKE2B 20eb8cf2027c1589e65ef4d907f6252faaedc7ab48c45be79bf66b5f9ae9652cbf654d00261f4a09765edaa0b0c03c798ee079796d902de4f522e5d0cfce5491 SHA512 f97e716be612001a8176f20afbe80a1cf4c78c6d348d92e542307ea951e1ff74189d2f0847675ed44ad65845b52a5180346b3866f5a8d82b55ed613d107ac346
+AUX akonadi-19.04.3-qmysql-fix.patch 1642 BLAKE2B 5ca247ec787d6f4182fdb13e8990909548473adfc2ef95a1bdfa29f85c76a6747f1c9135f5220e290c64397cc0d2c3c6b7c060f76d89147394b2d7d71b7cba13 SHA512 6678df405c290989667a2d58317517378c365862650f851a1ae3d919e3370dbe216f42db52c0cb5f7b7faaad252ae08aa55f6c8aa0570927546af73892056e1d
DIST akonadi-19.04.3.tar.xz 1574868 BLAKE2B f520f5e8f8fc6480b6e44d6f91c561317b2d3460072c5473baccdf149c0e9eca5587cfeefaeacee0e504349624418a0ba5de7042866c0f5806de0b677f8f38a1 SHA512 62d7367ef87cd6fd7e26ae87dcc15df427f3b647618334a5ae67e722ca16dc2c7882152bd6172ab6a0982979f45271f6d65cc15b18f86e8a0ebf144b1bbe576a
-EBUILD akonadi-18.12.3-r2.ebuild 3150 BLAKE2B 76bde37e75d201936bed67df9ecea0526fc1d8fe13a45c67f0e7acf32f51bd0135fdc111599dcc6fd63cd1ff982b82b3b64a5b69758feca75e6f850943f68699 SHA512 105f1e6e82d664de14c9b21177b82a48c9cf087d57cfea1b67cecf585de6dfb2954c742e0a66803487a1dc60b7654dd553108f099bf5bdc6319b9f483978b64c
-EBUILD akonadi-19.04.3.ebuild 2933 BLAKE2B 07eede75c77ea79c66d3c133022bf4dd4a2185ad7014907d8d897724ae94d3e67954b8f4cd03ea24331a8241312eb108e67b2b996340bb5b0d37cd98fc9e7483 SHA512 0eaa88a0763755471faf820db978d8ccc19e0a72e6251770bb58b6cdfb815dbc59cea21193fdf64f058e0d8fc6915b9f149c1b4f706c5ff4a8e2e200ad8fa300
+EBUILD akonadi-19.04.3-r1.ebuild 3526 BLAKE2B 7f30ab98cee979d02dff8b402084894d4b2da241466e41639488a872acbdf8232ca958ce7dcd4d675ecb634b0567813f9554448d6f7ad9cb3c6a9ffaf53095bd SHA512 3f55230c10f5513130a6044108b41819cdfa820a652dd7f675d6ce5ccb21ef7211514c09a51ed95e59fbfc0a3a86f04b8a7b44a6249dec458815d41b2f65cf95
MISC metadata.xml 410 BLAKE2B 259694dd8c348fbd80f1ef1dd2b2c6e5aa876cfcd2d4b781dd51f3882b22f8899bea347c6c993be3912c5acc3d996bdf88b63f8455bb822490f3d33cc45ce8bd SHA512 28d1be9310a2e9b91f2b93089bd2588da14b0aded9a057f9885782153df3222cd62c885d03374dd59216e408c1e0717074c03445e38b3dfdc7b3ed0b3dd739fa
diff --git a/kde-apps/akonadi/akonadi-18.12.3-r2.ebuild b/kde-apps/akonadi/akonadi-19.04.3-r1.ebuild
index 78b5d5374581..e0b34bf8f256 100644
--- a/kde-apps/akonadi/akonadi-18.12.3-r2.ebuild
+++ b/kde-apps/akonadi/akonadi-19.04.3-r1.ebuild
@@ -12,7 +12,7 @@ inherit kde5
DESCRIPTION="Storage service for PIM data and libraries for PIM apps"
HOMEPAGE="https://community.kde.org/KDE_PIM/akonadi"
-KEYWORDS="amd64 ~arm ~arm64 x86"
+KEYWORDS="amd64 ~arm arm64 x86"
LICENSE="LGPL-2.1+"
IUSE="+mysql postgres sqlite tools xml"
@@ -51,7 +51,6 @@ DEPEND="${COMMON_DEPEND}
test? ( sys-apps/dbus )
"
RDEPEND="${COMMON_DEPEND}
- !kde-apps/akonadi:4
!<kde-apps/kapptemplate-17.11.80
!kde-apps/kdepim-l10n
!kde-apps/kdepimlibs
@@ -64,9 +63,7 @@ RESTRICT+=" test"
PATCHES=(
"${FILESDIR}/${PN}-18.12.2-mysql56-crash.patch"
- "${FILESDIR}/${P}-major-regression-updating-attributes.patch"
- "${FILESDIR}/${P}-collection-detach-at-wrong-time-in-attribute.patch"
- "${FILESDIR}/${P}-akonadi_control-start-race-condition.patch"
+ "${FILESDIR}/${P}-qmysql-fix.patch"
)
pkg_setup() {
@@ -76,6 +73,18 @@ pkg_setup() {
use postgres && DRIVER="QPSQL"
use mysql && DRIVER="QMYSQL"
+ if use mysql && has_version ">=dev-db/mariadb-10.4"; then
+ ewarn "If an existing Akonadi QMYSQL database is being upgraded using"
+ ewarn ">=dev-db/mariadb-10.4 and KMail stops fetching and sending mail,"
+ ewarn "check ~/.local/share/akonadi/akonadiserver.error for errors like:"
+ ewarn " \"Cannot add or update a child row: a foreign key constraint fails\""
+ ewarn
+ ewarn "Manual steps are required to fix it, see also:"
+ ewarn " https://bugs.gentoo.org/688746 (see Whiteboard)"
+ ewarn " https://bugs.kde.org/show_bug.cgi?id=409224"
+ ewarn
+ fi
+
if use sqlite || has_version "<${CATEGORY}/${P}[sqlite]"; then
ewarn "We strongly recommend you change your Akonadi database backend to either MySQL"
ewarn "or PostgreSQL in your user configuration."
diff --git a/kde-apps/akonadi/akonadi-19.04.3.ebuild b/kde-apps/akonadi/akonadi-19.04.3.ebuild
deleted file mode 100644
index f8fd5fa4cf77..000000000000
--- a/kde-apps/akonadi/akonadi-19.04.3.ebuild
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-KDE_DESIGNERPLUGIN="true"
-KDE_TEST="forceoptional"
-VIRTUALDBUS_TEST="true"
-VIRTUALX_REQUIRED="test"
-inherit kde5
-
-DESCRIPTION="Storage service for PIM data and libraries for PIM apps"
-HOMEPAGE="https://community.kde.org/KDE_PIM/akonadi"
-
-KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-LICENSE="LGPL-2.1+"
-IUSE="+mysql postgres sqlite tools xml"
-
-REQUIRED_USE="|| ( mysql postgres sqlite ) test? ( tools )"
-
-COMMON_DEPEND="
- $(add_frameworks_dep kcompletion)
- $(add_frameworks_dep kconfig)
- $(add_frameworks_dep kconfigwidgets)
- $(add_frameworks_dep kcoreaddons)
- $(add_frameworks_dep kcrash)
- $(add_frameworks_dep kdbusaddons)
- $(add_frameworks_dep ki18n)
- $(add_frameworks_dep kiconthemes)
- $(add_frameworks_dep kio)
- $(add_frameworks_dep kitemmodels)
- $(add_frameworks_dep kitemviews)
- $(add_frameworks_dep kwidgetsaddons)
- $(add_frameworks_dep kwindowsystem)
- $(add_frameworks_dep kxmlgui)
- $(add_qt_dep qtdbus)
- $(add_qt_dep qtgui)
- $(add_qt_dep qtnetwork)
- $(add_qt_dep qtsql 'mysql?,postgres?')
- $(add_qt_dep qtwidgets)
- $(add_qt_dep qtxml)
- sqlite? (
- $(add_qt_dep qtsql 'sqlite' '' '5=')
- dev-db/sqlite:3
- )
- xml? ( dev-libs/libxml2 )
-"
-DEPEND="${COMMON_DEPEND}
- dev-libs/boost
- dev-libs/libxslt
- test? ( sys-apps/dbus )
-"
-RDEPEND="${COMMON_DEPEND}
- !<kde-apps/kapptemplate-17.11.80
- !kde-apps/kdepim-l10n
- !kde-apps/kdepimlibs
- mysql? ( virtual/mysql )
- postgres? ( dev-db/postgresql )
-"
-
-# some akonadi tests time out, that probably needs more work as it's ~700 tests
-RESTRICT+=" test"
-
-PATCHES=( "${FILESDIR}/${PN}-18.12.2-mysql56-crash.patch" )
-
-pkg_setup() {
- # Set default storage backend in order: MySQL, PostgreSQL, SQLite
- # reverse driver check to keep the order
- use sqlite && DRIVER="QSQLITE3"
- use postgres && DRIVER="QPSQL"
- use mysql && DRIVER="QMYSQL"
-
- if use sqlite || has_version "<${CATEGORY}/${P}[sqlite]"; then
- ewarn "We strongly recommend you change your Akonadi database backend to either MySQL"
- ewarn "or PostgreSQL in your user configuration."
- ewarn "In particular, kde-apps/kmail does not work properly with the sqlite backend."
- fi
-
- kde5_pkg_setup
-}
-
-src_configure() {
- local mycmakeargs=(
- -DAKONADI_BUILD_QSQLITE=$(usex sqlite)
- -DBUILD_TOOLS=$(usex tools)
- $(cmake-utils_use_find_package xml LibXml2)
- )
-
- kde5_src_configure
-}
-
-src_install() {
- # Who knows, maybe it accidentally fixes our permission issues
- cat <<-EOF > "${T}"/akonadiserverrc
-[%General]
-Driver=${DRIVER}
-EOF
- insinto /usr/share/config/akonadi
- doins "${T}"/akonadiserverrc
-
- kde5_src_install
-}
-
-pkg_postinst() {
- kde5_pkg_postinst
- elog "You can select the storage backend in ~/.config/akonadi/akonadiserverrc."
- elog "Available drivers are:"
- use mysql && elog " QMYSQL"
- use postgres && elog " QPSQL"
- use sqlite && elog " QSQLITE3"
- elog "${DRIVER} has been set as your default akonadi storage backend."
-}
diff --git a/kde-apps/akonadi/files/akonadi-18.12.3-akonadi_control-start-race-condition.patch b/kde-apps/akonadi/files/akonadi-18.12.3-akonadi_control-start-race-condition.patch
deleted file mode 100644
index dd3aac5f58c3..000000000000
--- a/kde-apps/akonadi/files/akonadi-18.12.3-akonadi_control-start-race-condition.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-From c21bb5220a3ae835a5183afd58c186ba21f6c93d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <dvratil@kde.org>
-Date: Fri, 28 Jun 2019 17:10:04 +0200
-Subject: Fix race-condition on akonadi_control start
-
-Summary:
-Check that there are no other akonadi_control instances running as the
-very first thing on startup. Previously this check would happen after
-AkApplication initialization, which contains some potential race-
-conditions, like rotating log files.
-
-The situation when akonadi_control is launched multiple times can occur
-on session startup, when multiple different components will attempt to
-launch Akonadi if its not yet running.
-
-BUG: 392092
-FIXED-IN: 19.04.3
-
-Reviewers: #kde_pim, vkrause
-
-Reviewed By: #kde_pim, vkrause
-
-Subscribers: kde-pim
-
-Tags: #kde_pim
-
-Differential Revision: https://phabricator.kde.org/D22092
----
- src/akonadicontrol/main.cpp | 16 ++-------------
- src/shared/akapplication.cpp | 7 +++----
- src/shared/akapplication.h | 49 ++++++++++++++++++++++++++++++++++++++------
- 3 files changed, 48 insertions(+), 24 deletions(-)
-
-diff --git a/src/akonadicontrol/main.cpp b/src/akonadicontrol/main.cpp
-index 19bebb8..7dba85b 100644
---- a/src/akonadicontrol/main.cpp
-+++ b/src/akonadicontrol/main.cpp
-@@ -52,7 +52,7 @@ void crashHandler(int)
-
- int main(int argc, char **argv)
- {
-- AkGuiApplication app(argc, argv, AKONADICONTROL_LOG());
-+ AkUniqueGuiApplication app(argc, argv, Akonadi::DBus::serviceName(Akonadi::DBus::ControlLock), AKONADICONTROL_LOG());
- app.setDescription(QStringLiteral("Akonadi Control Process\nDo not run this manually, use 'akonadictl' instead to start/stop Akonadi."));
-
- KAboutData aboutData(QStringLiteral("akonadi_control"),
-@@ -64,20 +64,8 @@ int main(int argc, char **argv)
-
- app.parseCommandLine();
-
-- // try to acquire the lock first, that means there is no second instance trying to start up at the same time
-- // registering the real service name happens in AgentManager::continueStartup(), when everything is in fact up and running
-- if (!QDBusConnection::sessionBus().registerService(Akonadi::DBus::serviceName(Akonadi::DBus::ControlLock))) {
-- // We couldn't register. Most likely, it's already running.
-- const QString lastError = QDBusConnection::sessionBus().lastError().message();
-- if (lastError.isEmpty()) {
-- qCWarning(AKONADICONTROL_LOG) << "Unable to register service as" << Akonadi::DBus::serviceName(Akonadi::DBus::ControlLock) << "Maybe it's already running?";
-- } else {
-- qCWarning(AKONADICONTROL_LOG) << "Unable to register service as" << Akonadi::DBus::serviceName(Akonadi::DBus::ControlLock) << "Error was:" << lastError;
-- }
-- return -1;
-- }
--
- // older Akonadi server versions don't use the lock service yet, so check if one is already running before we try to start another one
-+ // TODO: Remove this legacy check?
- if (QDBusConnection::sessionBus().interface()->isServiceRegistered(Akonadi::DBus::serviceName(Akonadi::DBus::Control))) {
- qCWarning(AKONADICONTROL_LOG) << "Another Akonadi control process is already running.";
- return -1;
-diff --git a/src/shared/akapplication.cpp b/src/shared/akapplication.cpp
-index af860e5..b790b8d 100644
---- a/src/shared/akapplication.cpp
-+++ b/src/shared/akapplication.cpp
-@@ -32,10 +32,9 @@
-
- AkApplicationBase *AkApplicationBase::sInstance = nullptr;
-
--AkApplicationBase::AkApplicationBase(int &argc, char **argv, const QLoggingCategory &loggingCategory)
-+AkApplicationBase::AkApplicationBase(std::unique_ptr<QCoreApplication> app, const QLoggingCategory &loggingCategory)
- : QObject(nullptr)
-- , mArgc(argc)
-- , mArgv(argv)
-+ , mApp(std::move(app))
- , mLoggingCategory(loggingCategory)
- {
- Q_ASSERT(!sInstance);
-@@ -59,7 +58,7 @@ AkApplicationBase *AkApplicationBase::instance()
-
- void AkApplicationBase::init()
- {
-- akInit(QString::fromLatin1(mArgv[0]));
-+ akInit(mApp->applicationName());
- akInitRemoteLog();
-
- if (!QDBusConnection::sessionBus().isConnected()) {
-diff --git a/src/shared/akapplication.h b/src/shared/akapplication.h
-index aae7a99..433b725 100644
---- a/src/shared/akapplication.h
-+++ b/src/shared/akapplication.h
-@@ -23,6 +23,10 @@
- #include <QObject>
- #include <QCommandLineParser>
- #include <QLoggingCategory>
-+#include <QDBusConnection>
-+#include <QDBusError>
-+
-+#include <memory>
-
- class QCoreApplication;
- class QApplication;
-@@ -55,16 +59,15 @@ public:
- int exec();
-
- protected:
-- AkApplicationBase(int &argc, char **argv, const QLoggingCategory &loggingCategory);
-+ AkApplicationBase(std::unique_ptr<QCoreApplication> app, const QLoggingCategory &loggingCategory);
- void init();
-- QScopedPointer<QCoreApplication> mApp;
-+
-+ std::unique_ptr<QCoreApplication> mApp;
-
- private Q_SLOTS:
- void pollSessionBus() const;
-
- private:
-- int mArgc;
-- char **mArgv;
- QString mInstanceId;
- const QLoggingCategory &mLoggingCategory;
- static AkApplicationBase *sInstance;
-@@ -77,13 +80,46 @@ class AkApplicationImpl : public AkApplicationBase
- {
- public:
- AkApplicationImpl(int &argc, char **argv, const QLoggingCategory &loggingCategory = *QLoggingCategory::defaultCategory())
-- : AkApplicationBase(argc, argv, loggingCategory)
-+ : AkApplicationBase(std::make_unique<T>(argc, argv), loggingCategory)
- {
-- mApp.reset(new T(argc, argv));
- init();
- }
- };
-
-+template<typename T>
-+class AkUniqueApplicationImpl : public AkApplicationBase
-+{
-+public:
-+ AkUniqueApplicationImpl(int &argc, char **argv, const QString &serviceName, const QLoggingCategory &loggingCategory = *QLoggingCategory::defaultCategory())
-+ : AkApplicationBase(std::make_unique<T>(argc, argv), loggingCategory)
-+ {
-+ registerUniqueServiceOrTerminate(serviceName, loggingCategory);
-+ init();
-+ }
-+
-+private:
-+ void registerUniqueServiceOrTerminate(const QString &serviceName, const QLoggingCategory &log)
-+ {
-+ auto bus = QDBusConnection::sessionBus();
-+ if (!bus.isConnected()) {
-+ qCCritical(log, "Session bus not found. Is DBus running?");
-+ exit(1);
-+ }
-+
-+ if (!bus.registerService(serviceName)) {
-+ // We couldn't register. Most likely, it's already running.
-+ const QString lastError = bus.lastError().message();
-+ if (lastError.isEmpty()) {
-+ qCInfo(log, "Service %s already registered, terminating now.", qUtf8Printable(serviceName));
-+ exit(0); // already running, so it's OK. Terminate now.
-+ } else {
-+ qCCritical(log, "Unable to register service as %s due to an error: %s", qUtf8Printable(serviceName), qUtf8Printable(lastError));
-+ exit(1); // :(
-+ }
-+ }
-+ }
-+};
-+
- /**
- * Returns the contents of @p name environment variable if it is defined,
- * or @p defaultValue otherwise.
-@@ -93,5 +129,6 @@ QString akGetEnv(const char *name, const QString &defaultValue = QString());
- typedef AkApplicationImpl<QCoreApplication> AkCoreApplication;
- typedef AkApplicationImpl<QApplication> AkApplication;
- typedef AkApplicationImpl<QGuiApplication> AkGuiApplication;
-+typedef AkUniqueApplicationImpl<QGuiApplication> AkUniqueGuiApplication;
-
- #endif
---
-cgit v1.1
diff --git a/kde-apps/akonadi/files/akonadi-18.12.3-collection-detach-at-wrong-time-in-attribute.patch b/kde-apps/akonadi/files/akonadi-18.12.3-collection-detach-at-wrong-time-in-attribute.patch
deleted file mode 100644
index bee866dc3bc7..000000000000
--- a/kde-apps/akonadi/files/akonadi-18.12.3-collection-detach-at-wrong-time-in-attribute.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 53ad3b6d73d92ea289cf0183c10e2b8a35c8127a Mon Sep 17 00:00:00 2001
-From: David Faure <faure@kde.org>
-Date: Thu, 21 Mar 2019 23:37:36 +0100
-Subject: Fix collection detaching at the wrong time in attribute()
-
-Summary:
-Found in FatCRM where changes to collection attributes were not stored
-anymore.
-
-Test Plan:
-New unittest to ensure that we get the attribute from the
-detached collection, not from the original one.
-
-Reviewers: dvratil
-
-Reviewed By: dvratil
-
-Subscribers: kde-pim
-
-Tags: #kde_pim
-
-Differential Revision: https://phabricator.kde.org/D19741
----
- autotests/libs/collectionattributetest.cpp | 15 +++++++++++++++
- autotests/libs/collectionattributetest.h | 1 +
- src/core/collection.h | 8 ++------
- 3 files changed, 18 insertions(+), 6 deletions(-)
-
-diff --git a/autotests/libs/collectionattributetest.cpp b/autotests/libs/collectionattributetest.cpp
-index e264a37..9c46561 100644
---- a/autotests/libs/collectionattributetest.cpp
-+++ b/autotests/libs/collectionattributetest.cpp
-@@ -240,3 +240,18 @@ void CollectionAttributeTest::testCollectionIdentificationAttribute()
- QCOMPARE(parsed.identifier(), id);
- QCOMPARE(parsed.collectionNamespace(), ns);
- }
-+
-+void CollectionAttributeTest::testDetach()
-+{
-+ // GIVEN a collection with an attribute
-+ Collection col;
-+ col.attribute<TestAttribute>(Akonadi::Collection::AddIfMissing);
-+ Collection col2 = col; // and a copy, so that non-const access detaches
-+
-+ // WHEN
-+ TestAttribute *attr = col2.attribute<TestAttribute>(Akonadi::Collection::AddIfMissing);
-+ TestAttribute *attr2 = col2.attribute<TestAttribute>();
-+
-+ // THEN
-+ QCOMPARE(attr, attr2);
-+}
-diff --git a/autotests/libs/collectionattributetest.h b/autotests/libs/collectionattributetest.h
-index 420df78..2afa9eb 100644
---- a/autotests/libs/collectionattributetest.h
-+++ b/autotests/libs/collectionattributetest.h
-@@ -32,6 +32,7 @@ private Q_SLOTS:
- void testDefaultAttributes();
- void testCollectionRightsAttribute();
- void testCollectionIdentificationAttribute();
-+ void testDetach();
- };
-
- #endif
-diff --git a/src/core/collection.h b/src/core/collection.h
-index b5a496c..9c19cc9 100644
---- a/src/core/collection.h
-+++ b/src/core/collection.h
-@@ -565,10 +565,10 @@ inline T *Akonadi::Collection::attribute(Collection::CreateOption option)
- Q_UNUSED(option);
-
- const T dummy;
-+ markAttributesChanged();
- if (hasAttribute(dummy.type())) {
- T *attr = dynamic_cast<T *>(attribute(dummy.type()));
- if (attr) {
-- markAttributesChanged();
- return attr;
- }
- //Reuse 5250
-@@ -585,14 +585,10 @@ template <typename T>
- inline T *Akonadi::Collection::attribute() const
- {
- const QByteArray type = T().type();
-+ const_cast<Collection*>(this)->markAttributesChanged();
- if (hasAttribute(type)) {
- T *attr = dynamic_cast<T *>(attribute(type));
- if (attr) {
-- // FIXME: This method returns a non-const pointer, so callers may still modify the
-- // attribute. Unfortunately, just making this function return a const pointer and
-- // creating a non-const overload does not work, as many users of this function abuse the
-- // non-const pointer and modify the attribute even on a const object.
-- const_cast<Collection*>(this)->markAttributesChanged();
- return attr;
- }
- //reuse 5250
---
-cgit v1.1
diff --git a/kde-apps/akonadi/files/akonadi-18.12.3-major-regression-updating-attributes.patch b/kde-apps/akonadi/files/akonadi-18.12.3-major-regression-updating-attributes.patch
deleted file mode 100644
index c3e62af2d02a..000000000000
--- a/kde-apps/akonadi/files/akonadi-18.12.3-major-regression-updating-attributes.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 1d8851495bcfa6ff5d3fa35882b68fdf68b21a7f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <dvratil@kde.org>
-Date: Thu, 21 Mar 2019 13:22:58 +0100
-Subject: Fix a regression when updating attributes
-
-This fixes a regression introduced in 3a062e6a and 6054e42d where some
-attributes were not sent to the Akonadi server in update job even though
-they were modified. This was due to a bad API design which returns a
-non-const pointer to an attribute from a const method, so callers sometimes
-modify the returned attribute on a const object. Since the method itself
-is const though, it did not mark the attribute as modified.
-
-Proper fix is to introduce a purely const and non-const overloads for
-the attribute accessors, unfortunatelly this requires fixing a lot of our code
-in many places first to not abuse the non-constness of the returned
-attribute.
-
-Note that since the code is in an inlined method, all clients should be
-recompiled.
-
-CCMAIL: faure@kde.org
----
- src/core/collection.h | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/src/core/collection.h b/src/core/collection.h
-index 50c0926..b5a496c 100644
---- a/src/core/collection.h
-+++ b/src/core/collection.h
-@@ -584,14 +584,19 @@ inline T *Akonadi::Collection::attribute(Collection::CreateOption option)
- template <typename T>
- inline T *Akonadi::Collection::attribute() const
- {
-- const T dummy;
-- if (hasAttribute(dummy.type())) {
-- T *attr = dynamic_cast<T *>(attribute(dummy.type()));
-+ const QByteArray type = T().type();
-+ if (hasAttribute(type)) {
-+ T *attr = dynamic_cast<T *>(attribute(type));
- if (attr) {
-+ // FIXME: This method returns a non-const pointer, so callers may still modify the
-+ // attribute. Unfortunately, just making this function return a const pointer and
-+ // creating a non-const overload does not work, as many users of this function abuse the
-+ // non-const pointer and modify the attribute even on a const object.
-+ const_cast<Collection*>(this)->markAttributesChanged();
- return attr;
- }
- //reuse 5250
-- qWarning() << "Found attribute of unknown type" << dummy.type()
-+ qWarning() << "Found attribute of unknown type" << type
- << ". Did you forget to call AttributeFactory::registerAttribute()?";
- }
-
---
-cgit v1.1
diff --git a/kde-apps/akonadi/files/akonadi-19.04.3-qmysql-fix.patch b/kde-apps/akonadi/files/akonadi-19.04.3-qmysql-fix.patch
new file mode 100644
index 000000000000..c26d3d993b2b
--- /dev/null
+++ b/kde-apps/akonadi/files/akonadi-19.04.3-qmysql-fix.patch
@@ -0,0 +1,44 @@
+From 8b8db29d10b2ef92deb2d87ff613f3d7f39af34e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <dvratil@kde.org>
+Date: Fri, 26 Jul 2019 13:31:58 +0200
+Subject: Fix compatibility with QMYSQL driver after 74aed95
+
+Summary:
+QPSQL requires the table name passed to QSqlDatabase::record() to be lowercase
+since Qt 5.13, but doing that breaks QMYSQL, so only adjust the name when
+using QPSQL.
+
+CCBUG: 409234
+
+Reviewers: #kde_pim, vkrause
+
+Reviewed By: #kde_pim, vkrause
+
+Subscribers: kde-pim
+
+Tags: #kde_pim
+
+Differential Revision: https://phabricator.kde.org/D22677
+---
+ src/server/storage/dbintrospector.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/server/storage/dbintrospector.cpp b/src/server/storage/dbintrospector.cpp
+index 70d952a..932444c 100644
+--- a/src/server/storage/dbintrospector.cpp
++++ b/src/server/storage/dbintrospector.cpp
+@@ -76,7 +76,10 @@ bool DbIntrospector::hasColumn(const QString &tableName, const QString &columnNa
+ QStringList columns = m_columnCache.value(tableName);
+
+ if (columns.isEmpty()) {
+- const QSqlRecord table = m_database.record(tableName.toLower());
++ // QPSQL requires the name to be lower case, but it breaks compatibility with existing
++ // tables with other drivers (see BKO#409234). Yay for abstraction...
++ const auto name = (DbType::type(m_database) == DbType::PostgreSQL) ? tableName.toLower() : tableName;
++ const QSqlRecord table = m_database.record(name);
+ const int numTables = table.count();
+ columns.reserve(numTables);
+ for (int i = 0; i < numTables; ++i) {
+--
+cgit v1.1
+