summaryrefslogtreecommitdiff
path: root/kde-apps/akonadi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-04-05 21:17:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-04-05 21:17:31 +0100
commitdc7cbdfa65fd814b3b9aa3c56257da201109e807 (patch)
treec85d72f6f31f21f178069c9d41d41a7c1ff4b362 /kde-apps/akonadi
parent0706fc6986773f4e4d391deff4ad5143c464ea4e (diff)
gentoo resync : 05.04.2019
Diffstat (limited to 'kde-apps/akonadi')
-rw-r--r--kde-apps/akonadi/Manifest8
-rw-r--r--kde-apps/akonadi/akonadi-18.12.3-r1.ebuild (renamed from kde-apps/akonadi/akonadi-18.08.3-r1.ebuild)12
-rw-r--r--kde-apps/akonadi/akonadi-18.12.3.ebuild2
-rw-r--r--kde-apps/akonadi/files/akonadi-17.03.80-mysql56-crash.patch40
-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
6 files changed, 165 insertions, 49 deletions
diff --git a/kde-apps/akonadi/Manifest b/kde-apps/akonadi/Manifest
index d091d9e61303..cd2059ac5d8c 100644
--- a/kde-apps/akonadi/Manifest
+++ b/kde-apps/akonadi/Manifest
@@ -1,7 +1,7 @@
-AUX akonadi-17.03.80-mysql56-crash.patch 2064 BLAKE2B a4107b5732d0147e3001484c7c4c5e3bba64909d21656686142cf9d58304d7496dea8d11b72836bbdeee09691d9c1e160445ecf94fc280cca3c35f45c078d969 SHA512 35e89ac8fa7640354a0a0f50abff06ec34075722e4e8f3b6297da7384a3deef62f7826c1a7a08aef72329ab0b6ef3b20b1bbec231674e20733fa15fd388195f7
AUX akonadi-18.12.2-mysql56-crash.patch 2196 BLAKE2B d12643c870da557f540f199f78462f97fc569ffe160415f56f166d89b7e94e0f6682fa68ed84c9629e66639ddac61b5c54376c309a8921d84a1d52ba351a9aab SHA512 093a0b4243668344db59b0419809500e411f7399137ba3d9c439b4d5300a2f867fb231f7d5a8bc5d95ad2d1ccb6921804caff8200ddddba74a62ddcdfa9ac623
-DIST akonadi-18.08.3.tar.xz 1538188 BLAKE2B 333c86802418f86f2336408d1e63ce16a9fc50267f7d5cb39f177eb6aab1ddc8479fa9384f323f8aad0ac4157d8abfe8de237bcc6bd058b19fe596442c7f20e1 SHA512 ba883902ad83c989bb480712c0b3871e683307ecb121f1d7b3e433b9211056cda209d9640a7bae520fb4b6611950863180b879269797a606af2ac25ae4f24cc0
+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
-EBUILD akonadi-18.08.3-r1.ebuild 2952 BLAKE2B 48d6a61ce0246bbec6d67c47a9ae9e77dc395b85660098033ff49c7ee63d5458547233521df0613fac15af791aedc31ad489c9e0c4cfce69e6ae8de1d8badc85 SHA512 bc09fc8a03bcc0ac5ac22a6ee72283ba852167feba801b27b91b40b1de1bc1c962d73ebe602197dbd4fdd4e0e1a422da27428e7aaff7c738d900cd598bb4bc40
-EBUILD akonadi-18.12.3.ebuild 2954 BLAKE2B 794d5f2910330af2298de9b9904b76bc861e7df0500a1716495e7c49b6aba4ead8fc95bd5491fce17fdf9f8a4b182860a07ea943b7d45cc967606aa6114cab11 SHA512 92fc7c600076f119f2fdec476068236fe0b0e1952c33cd0001e58a13d37faf322ece4fe6bdc6ee7a1cd810799084d9c1606a152d9ec5a4f9e0edc19ec885d024
+EBUILD akonadi-18.12.3-r1.ebuild 3089 BLAKE2B cd24927e858757595053c867051db1d9e0a7258eb2f3f627bd4bc3cf7b91f4fa5f7498529f261e400f53932b9a429fb4813bc25e686c4e3604cbf2c407f44470 SHA512 290d1777f3efe1e6b03483efd55c9cf2f24307fe877d64d53bd86b3485a9fc38509d6760da0006df0c7177b2c032ed836d50cf2591a4b01157fe258a2acb03a3
+EBUILD akonadi-18.12.3.ebuild 2952 BLAKE2B 0918e04166a36075d896c2067d3af4c7c2e75fb07967c926c22b5c5b5d5e096b6862e3bb37cb8b435f2e1637b0fb6835dab5f11099594584ef3764410471fada SHA512 ba78bc17fb52d899dfb6aa6a39e810187c98646f7651477a7e196f860b2696d438971775e4e6d6af23d8c4e728dcf3fe5994c3a8396ba817f9b8521f6e4f543f
MISC metadata.xml 410 BLAKE2B 259694dd8c348fbd80f1ef1dd2b2c6e5aa876cfcd2d4b781dd51f3882b22f8899bea347c6c993be3912c5acc3d996bdf88b63f8455bb822490f3d33cc45ce8bd SHA512 28d1be9310a2e9b91f2b93089bd2588da14b0aded9a057f9885782153df3222cd62c885d03374dd59216e408c1e0717074c03445e38b3dfdc7b3ed0b3dd739fa
diff --git a/kde-apps/akonadi/akonadi-18.08.3-r1.ebuild b/kde-apps/akonadi/akonadi-18.12.3-r1.ebuild
index b138b2cd70e1..8b3713c95d81 100644
--- a/kde-apps/akonadi/akonadi-18.08.3-r1.ebuild
+++ b/kde-apps/akonadi/akonadi-18.12.3-r1.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
KDE_DESIGNERPLUGIN="true"
KDE_TEST="forceoptional"
@@ -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 x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
LICENSE="LGPL-2.1+"
IUSE="+mysql postgres sqlite tools xml"
@@ -39,7 +39,6 @@ COMMON_DEPEND="
$(add_qt_dep qtsql 'mysql?,postgres?')
$(add_qt_dep qtwidgets)
$(add_qt_dep qtxml)
- x11-misc/shared-mime-info
sqlite? (
$(add_qt_dep qtsql 'sqlite' '' '5=')
dev-db/sqlite:3
@@ -52,6 +51,7 @@ 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
@@ -62,7 +62,11 @@ RDEPEND="${COMMON_DEPEND}
# some akonadi tests time out, that probably needs more work as it's ~700 tests
RESTRICT+=" test"
-PATCHES=( "${FILESDIR}/${PN}-17.03.80-mysql56-crash.patch" )
+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"
+)
pkg_setup() {
# Set default storage backend in order: MySQL, PostgreSQL, SQLite
diff --git a/kde-apps/akonadi/akonadi-18.12.3.ebuild b/kde-apps/akonadi/akonadi-18.12.3.ebuild
index 420a6ab14057..c3035abbece3 100644
--- a/kde-apps/akonadi/akonadi-18.12.3.ebuild
+++ b/kde-apps/akonadi/akonadi-18.12.3.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"
diff --git a/kde-apps/akonadi/files/akonadi-17.03.80-mysql56-crash.patch b/kde-apps/akonadi/files/akonadi-17.03.80-mysql56-crash.patch
deleted file mode 100644
index 0b5e381b155d..000000000000
--- a/kde-apps/akonadi/files/akonadi-17.03.80-mysql56-crash.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Gentoo-bug: 530012
-
-diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
-index 50421714d..dfae09c20 100644
---- a/src/server/storage/dbconfigmysql.cpp
-+++ b/src/server/storage/dbconfigmysql.cpp
-@@ -81,6 +81,7 @@ bool DbConfigMysql::init(QSettings &settings)
- << QStringLiteral("/usr/local/sbin")
- << QStringLiteral("/usr/local/libexec")
- << QStringLiteral("/usr/libexec")
-+ << QStringLiteral("/usr/share/mysql/scripts")
- << QStringLiteral("/opt/mysql/libexec")
- << QStringLiteral("/opt/local/lib/mysql5/bin")
- << QStringLiteral("/opt/mysql/sbin");
-@@ -511,7 +512,7 @@ bool DbConfigMysql::initializeMariaDBDatabase(const QString &confFile, const QSt
- return 0 == execute(mMysqlInstallDbPath, {
- QStringLiteral("--defaults-file=%1").arg(confFile),
- QStringLiteral("--force"),
-- QStringLiteral("--basedir=%1").arg(baseDir),
-+ QStringLiteral("--basedir=/usr"),
- QStringLiteral("--datadir=%1/").arg(dataDir)
- });
- }
-@@ -525,6 +526,7 @@ bool DbConfigMysql::initializeMySQL5_7_6Database(const QString &confFile, const
- return 0 == execute(mMysqldPath, {
- QStringLiteral("--defaults-file=%1").arg(confFile),
- QStringLiteral("--initialize"),
-+ QStringLiteral("--basedir=/usr"),
- QStringLiteral("--datadir=%1/").arg(dataDir)
- });
- }
-@@ -539,7 +541,7 @@ bool DbConfigMysql::initializeMySQLDatabase(const QString &confFile, const QStri
- // Don't use --force, it has been removed in MySQL 5.7.5
- return 0 == execute(mMysqlInstallDbPath, {
- QStringLiteral("--defaults-file=%1").arg(confFile),
-- QStringLiteral("--basedir=%1").arg(baseDir),
-+ QStringLiteral("--basedir=/usr"),
- QStringLiteral("--datadir=%1/").arg(dataDir)
- });
- }
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
new file mode 100644
index 000000000000..bee866dc3bc7
--- /dev/null
+++ b/kde-apps/akonadi/files/akonadi-18.12.3-collection-detach-at-wrong-time-in-attribute.patch
@@ -0,0 +1,97 @@
+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
new file mode 100644
index 000000000000..c3e62af2d02a
--- /dev/null
+++ b/kde-apps/akonadi/files/akonadi-18.12.3-major-regression-updating-attributes.patch
@@ -0,0 +1,55 @@
+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