diff options
Diffstat (limited to 'user/akonadi')
-rw-r--r-- | user/akonadi/APKBUILD | 22 | ||||
-rw-r--r-- | user/akonadi/atomics.patch | 10 | ||||
-rw-r--r-- | user/akonadi/attributes.patch | 153 |
3 files changed, 21 insertions, 164 deletions
diff --git a/user/akonadi/APKBUILD b/user/akonadi/APKBUILD index 349967d5a..61dd0437b 100644 --- a/user/akonadi/APKBUILD +++ b/user/akonadi/APKBUILD @@ -1,8 +1,8 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=akonadi -pkgver=18.12.3 -pkgrel=1 +pkgver=22.04.2 +pkgrel=0 pkgdesc="Libraries and storage system for PIM data" url="https://community.kde.org/KDE_PIM/Akonadi" arch="all" @@ -14,15 +14,15 @@ depends_dev="qt5-qtbase-dev boost-dev kconfig-dev kconfigwidgets-dev makedepends="$depends_dev cmake extra-cmake-modules libxslt-dev qt5-qttools-dev libxslt-dev shared-mime-info sqlite-dev kcompletion-dev kcrash-dev kdesignerplugin-dev ki18n-dev kiconthemes-dev kitemviews-dev kio-dev - kwidgetsaddons-dev kwindowsystem-dev kxmlgui-dev" + kwidgetsaddons-dev kwindowsystem-dev kxmlgui-dev postgresql-dev xz-dev + doxygen postgresql" subpackages="$pkgname-dev $pkgname-lang" -source="https://download.kde.org/stable/applications/$pkgver/src/akonadi-$pkgver.tar.xz +source="https://download.kde.org/stable/release-service/$pkgver/src/akonadi-$pkgver.tar.xz akonadiserverrc - attributes.patch + atomics.patch " build() { - cd "$builddir" if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi @@ -33,17 +33,17 @@ build() { -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" \ - ${CMAKE_CROSSOPTS} + -DBUILD_QCH:BOOL=ON \ + -DDATABASE_BACKEND=POSTGRES \ + ${CMAKE_CROSSOPTS} . make } check() { - cd "$builddir" CTEST_OUTPUT_ON_FAILURE=TRUE ctest } package() { - cd "$builddir" make DESTDIR="$pkgdir" install mkdir -p "$pkgdir"/usr/share/config/akonadi @@ -51,6 +51,6 @@ package() { "$pkgdir"/usr/share/config/akonadi } -sha512sums="f97e716be612001a8176f20afbe80a1cf4c78c6d348d92e542307ea951e1ff74189d2f0847675ed44ad65845b52a5180346b3866f5a8d82b55ed613d107ac346 akonadi-18.12.3.tar.xz +sha512sums="ea06a24ea0d740ba44705a33e7b7a51e99ca4a51efa735e409dd5be5707d0447ce409e8af88ad316a6064e61f381b27a63262a583d097a79cbdb132d6ca13d45 akonadi-22.04.2.tar.xz b0c333508da8ba5c447827b2bad5f36e3dc72bef8303b1526043b09c75d3055790908ac9cbb871e61319cfd4b405f4662d62d2d347e563c9956f4c8159fca9ab akonadiserverrc -63a26cf5c20583a372146d11050f5003242997743fe9470fb2b7556d5aebb58c06dfeefc0c14c86a435f7172126dac0d52b1701c6bd872f10531bf1d99625e93 attributes.patch" +3d895231b88aedf3ef45112d637d3b90696386ef8e00df61c5204cd054b01a7c4326748b5126f03abe4ff8ba7bd74e0686bee60060fefeb45aefa7744b2a046e atomics.patch" diff --git a/user/akonadi/atomics.patch b/user/akonadi/atomics.patch new file mode 100644 index 000000000..55bdb5c03 --- /dev/null +++ b/user/akonadi/atomics.patch @@ -0,0 +1,10 @@ +--- akonadi-20.04.2/src/server/CMakeLists.txt.old 2020-06-02 07:09:51.000000000 +0000 ++++ akonadi-20.04.2/src/server/CMakeLists.txt 2020-06-16 00:56:48.253282683 +0000 +@@ -272,6 +272,7 @@ + set_target_properties(libakonadiserver PROPERTIES OUTPUT_NAME akonadiserver) + target_link_libraries(libakonadiserver + akonadi_shared ++ atomic + KF5AkonadiPrivate + Qt5::Core + Qt5::Network diff --git a/user/akonadi/attributes.patch b/user/akonadi/attributes.patch deleted file mode 100644 index a49db7f37..000000000 --- a/user/akonadi/attributes.patch +++ /dev/null @@ -1,153 +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 - -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 |