From 0b7b6c9628c8086a3759f8f43178a44f66a083eb Mon Sep 17 00:00:00 2001
From: krop <>
Date: May 12 2023 18:54:18 +0000
Subject: Update akonadi-server to version 23.04.1 / rev 111 via SR 1086231
https://build.opensuse.org/request/show/1086231
by user krop + dimstar_suse
KDE Release Gear 23.04.1
---
diff --git a/.files b/.files
index 4aa310e..56aa5e0 100644
Binary files a/.files and b/.files differ
diff --git a/.rev b/.rev
index c3cf051..8cb84bc 100644
--- a/.rev
+++ b/.rev
@@ -895,4 +895,12 @@ Mainly intended for Leap 42.3 to prevent upgrade problems. (forwarded request 49
1083570
+
+ e5d4c94c3c1485ddb89e373868e55830
+ 23.04.1
+
+ dimstar_suse
+ KDE Release Gear 23.04.1
+ 1086231
+
diff --git a/0001-Allow-running-mysql_upgrade-when-starting-Akonadi.patch b/0001-Allow-running-mysql_upgrade-when-starting-Akonadi.patch
deleted file mode 100644
index ad656ed..0000000
--- a/0001-Allow-running-mysql_upgrade-when-starting-Akonadi.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 5d6bf9ab17c89bb42ba6dc579ea564d105c6efcb Mon Sep 17 00:00:00 2001
-From: Christophe Marin
-Date: Fri, 28 Apr 2023 16:29:45 +0200
-Subject: [PATCH] Allow running mysql_upgrade when starting Akonadi
-
-Amends d6a1c057327332487adc9ad39252f9481ae28288
-CCBUG: 402680
-
-(cherry picked from commit 620ea58f76e00aed52c1acee9c8d11b6f3279953)
----
- apparmor/mariadbd_akonadi | 3 ++-
- apparmor/mysqld_akonadi | 1 +
- apparmor/usr.bin.akonadiserver | 2 ++
- 3 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/apparmor/mariadbd_akonadi b/apparmor/mariadbd_akonadi
-index b63465278..7c0497a3d 100644
---- a/apparmor/mariadbd_akonadi
-+++ b/apparmor/mariadbd_akonadi
-@@ -30,9 +30,10 @@ profile mariadbd_akonadi {
- /{usr/,}bin/mkdir mrix,
- /{usr/,}bin/sed mrix,
- /usr/bin/my_print_defaults mrix,
-- /usr/bin/mariadb-install-db mrix,
- /usr/bin/mariadb-admin mrix,
- /usr/bin/mariadb-check mrix,
-+ /usr/bin/mariadb-install-db mrix,
-+ /usr/bin/mariadb-upgrade mrix,
- /usr/{,s}bin/mariadbd mrix,
- /usr/share/mysql/** r,
- owner @{xdg_data_home}/akonadi/** rwk,
-diff --git a/apparmor/mysqld_akonadi b/apparmor/mysqld_akonadi
-index 72949d025..4940bf4d2 100644
---- a/apparmor/mysqld_akonadi
-+++ b/apparmor/mysqld_akonadi
-@@ -31,6 +31,7 @@ profile mysqld_akonadi {
- /{usr/,}bin/sed mrix,
- /usr/bin/my_print_defaults mrix,
- /usr/bin/mysql_install_db mrix,
-+ /usr/bin/mysql_upgrade mrix,
- /usr/bin/mysqladmin mrix,
- /usr/bin/mysqlcheck mrix,
- /usr/{,s}bin/mysqld mrix,
-diff --git a/apparmor/usr.bin.akonadiserver b/apparmor/usr.bin.akonadiserver
-index aa489a3d0..917d5bf78 100644
---- a/apparmor/usr.bin.akonadiserver
-+++ b/apparmor/usr.bin.akonadiserver
-@@ -46,8 +46,10 @@ abi ,
- /usr/bin/mariadb-admin Px -> mariadbd_akonadi,
- /usr/bin/mariadb-check Px -> mariadbd_akonadi,
- /usr/bin/mariadb-install-db Px -> mariadbd_akonadi,
-+ /usr/bin/mariadb-upgrade Px -> mariadbd_akonadi,
- /usr/{,s}bin/mariadbd Px -> mariadbd_akonadi,
- /usr/bin/mysql_install_db Px -> mysqld_akonadi,
-+ /usr/bin/mysql_upgrade Px -> mysqld_akonadi,
- /usr/bin/mysqladmin Px -> mysqld_akonadi,
- /usr/bin/mysqlcheck Px -> mysqld_akonadi,
- /usr/{,s}bin/mysqld Px -> mysqld_akonadi,
---
-2.40.0
-
diff --git a/0001-Avoid-crashing-before-priting-debug-output-when-sett.patch b/0001-Avoid-crashing-before-priting-debug-output-when-sett.patch
deleted file mode 100644
index 33a1a63..0000000
--- a/0001-Avoid-crashing-before-priting-debug-output-when-sett.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 518c99d1313b621312275a5bd6af919a3d889f26 Mon Sep 17 00:00:00 2001
-From: Carl Schwan
-Date: Wed, 26 Apr 2023 19:35:57 +0200
-Subject: [PATCH] Avoid crashing before priting debug output when setting up db
-
-Calling debugLastDbError requires the database to be already setup
-as it is using the akonadi tracer. So using it to debug why the database
-didn't open doesn't work.
-
-CCBUG: 468985
-
-
-(cherry picked from commit 05db7d03baae46513cd6735ec2c3f28733145b0a)
----
- src/server/storage/datastore.cpp | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/server/storage/datastore.cpp b/src/server/storage/datastore.cpp
-index 8f8a6bc1f..31a29b670 100644
---- a/src/server/storage/datastore.cpp
-+++ b/src/server/storage/datastore.cpp
-@@ -113,7 +113,10 @@ void DataStore::open()
- m_dbOpened = m_database.open();
-
- if (!m_dbOpened) {
-- debugLastDbError("Cannot open database.");
-+ qCCritical(AKONADISERVER_LOG) << "Database error: Cannot open database.";
-+ qCCritical(AKONADISERVER_LOG) << " Last driver error:" << m_database.lastError().driverText();
-+ qCCritical(AKONADISERVER_LOG) << " Last database error:" << m_database.lastError().databaseText();
-+ return;
- } else {
- qCDebug(AKONADISERVER_LOG) << "Database" << m_database.databaseName() << "opened using driver" << m_database.driverName();
- }
---
-2.40.0
-
diff --git a/0001-Fix-crash-on-server-shutdown.patch b/0001-Fix-crash-on-server-shutdown.patch
deleted file mode 100644
index 37b03c1..0000000
--- a/0001-Fix-crash-on-server-shutdown.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 1d9d64ec3cf78dfdddc2239df0d33b08dc442104 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Daniel=20Vr=C3=A1til?=
-Date: Sat, 22 Apr 2023 11:43:02 +0200
-Subject: [PATCH] Fix crash on server shutdown
-
-When AkonadiServer::quit() is called it clears the vector of existing
-connections and destroys them. This can race with a resource disconnecting
-or crashing on its own, which then enqueues a singal emission from the
-Connection to remove itself from the connections vector as well.
-
-Previously the code assumed the Connection must always exist in the vector
-which caused a crash when it did not...surprise surprise.
-
-BUG: 462692
-FIXED-IN: 23.04.0
----
- src/server/akonadi.cpp | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/server/akonadi.cpp b/src/server/akonadi.cpp
-index 7ede9e238..5ff4a9c46 100644
---- a/src/server/akonadi.cpp
-+++ b/src/server/akonadi.cpp
-@@ -230,8 +230,10 @@ void AkonadiServer::connectionDisconnected()
- auto it = std::find_if(mConnections.begin(), mConnections.end(), [this](const auto &ptr) {
- return ptr.get() == sender();
- });
-- Q_ASSERT(it != mConnections.end());
-- mConnections.erase(it);
-+
-+ if (it != mConnections.end()) {
-+ mConnections.erase(it);
-+ }
- }
-
- bool AkonadiServer::setupDatabase()
---
-2.40.0
-
diff --git a/0001-Fix-wrong-for-clause-in-Akonadi-Session.patch b/0001-Fix-wrong-for-clause-in-Akonadi-Session.patch
deleted file mode 100644
index 7f3abac..0000000
--- a/0001-Fix-wrong-for-clause-in-Akonadi-Session.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 0ab418bacdaf8322771e41452a87d062a2449869 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pale=C4=8Dek?=
-Date: Thu, 20 Apr 2023 16:17:12 +0200
-Subject: [PATCH 1/3] Fix wrong for clause in Akonadi::Session
-
-BUG: 468343
-BUG: 465245
-BUG: 464275
-BUG: 462213
-BUG: 462169
-BUG: 461131
-BUG: 460653
-BUG: 460586
-BUG: 458497
-BUG: 458315
-(cherry picked from commit eca4fdbdf328883ae564b568c9ba13697cc90c4a)
----
- src/core/session.cpp | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/src/core/session.cpp b/src/core/session.cpp
-index 227dda367..46106b923 100644
---- a/src/core/session.cpp
-+++ b/src/core/session.cpp
-@@ -293,7 +293,8 @@ void SessionPrivate::serverStateChanged(ServerManager::State state)
- } else if (!connected && state == ServerManager::Broken) {
- // If the server is broken, cancel all pending jobs, otherwise they will be
- // blocked forever and applications waiting for them to finish would be stuck
-- for (Job *job : std::as_const(queue)) {
-+ auto q = queue;
-+ for (Job *job : q) {
- job->setError(Job::ConnectionFailed);
- job->kill(KJob::EmitResult);
- }
-@@ -435,11 +436,13 @@ void Session::clear()
-
- void SessionPrivate::clear(bool forceReconnect)
- {
-- for (Job *job : std::as_const(queue)) {
-+ auto q = queue;
-+ for (Job *job : q) {
- job->kill(KJob::EmitResult); // safe, not started yet
- }
- queue.clear();
-- for (Job *job : std::as_const(pipeline)) {
-+ auto p = pipeline;
-+ for (Job *job : p) {
- job->d_ptr->mStarted = false; // avoid killing/reconnect loops
- job->kill(KJob::EmitResult);
- }
---
-2.40.0
-
diff --git a/0001-Remove-dangling-reference.patch b/0001-Remove-dangling-reference.patch
deleted file mode 100644
index 5cb7248..0000000
--- a/0001-Remove-dangling-reference.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From d46d05e67c729902e30691fc5f013504c8734ba4 Mon Sep 17 00:00:00 2001
-From: Carl Schwan
-Date: Tue, 25 Apr 2023 19:40:09 +0200
-Subject: [PATCH] Remove dangling reference
-
-remoteCollection.contentMimeTypes() creates a temporary which is deleted
-at the end of the expression. This was a compiler warning.
-
-(cherry picked from commit d9476fd48863a46d4ef5deac4d8a0c7fbdb1c6c5)
----
- src/core/collectionsync.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/core/collectionsync.cpp b/src/core/collectionsync.cpp
-index 6195b501e..c8817676e 100644
---- a/src/core/collectionsync.cpp
-+++ b/src/core/collectionsync.cpp
-@@ -376,8 +376,8 @@ public:
- return true;
- } else {
- for (int i = 0, total = remoteCollection.contentMimeTypes().size(); i < total; ++i) {
-- const QString &m = remoteCollection.contentMimeTypes().at(i);
-- if (!localCollection.contentMimeTypes().contains(m)) {
-+ const QString mimetype = remoteCollection.contentMimeTypes().at(i);
-+ if (!localCollection.contentMimeTypes().contains(mimetype)) {
- return true;
- }
- }
---
-2.40.0
-
diff --git a/0002-Remove-dead-code-from-FavoriteCollectionsModel.patch b/0002-Remove-dead-code-from-FavoriteCollectionsModel.patch
deleted file mode 100644
index b84c44c..0000000
--- a/0002-Remove-dead-code-from-FavoriteCollectionsModel.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 70679e219841733000bf5abfc2462872058a4042 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pale=C4=8Dek?=
-Date: Thu, 20 Apr 2023 16:18:22 +0200
-Subject: [PATCH 2/3] Remove dead code from FavoriteCollectionsModel
-
- This code has per search been always dead. On top of that, the for
- loop is faulty
-
-(cherry picked from commit 56706add168cdc2a83eda49bfed7714a3ad01cc5)
----
- src/core/models/favoritecollectionsmodel.cpp | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/src/core/models/favoritecollectionsmodel.cpp b/src/core/models/favoritecollectionsmodel.cpp
-index 3ba7cec2c..835d8e277 100644
---- a/src/core/models/favoritecollectionsmodel.cpp
-+++ b/src/core/models/favoritecollectionsmodel.cpp
-@@ -152,13 +152,6 @@ public:
- }
- }
-
-- void clearReferences()
-- {
-- for (const Collection::Id &collectionId : std::as_const(referencedCollections)) {
-- dereference(collectionId);
-- }
-- }
--
- /**
- * Adds a collection to the favorite collections
- */
---
-2.40.0
-
diff --git a/0003-Fix-a-bug-in-for-clause-in-EntityTreeModel.patch b/0003-Fix-a-bug-in-for-clause-in-EntityTreeModel.patch
deleted file mode 100644
index 7529ed7..0000000
--- a/0003-Fix-a-bug-in-for-clause-in-EntityTreeModel.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 046a3e20663f00d75899677656b14c0bc3225526 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pale=C4=8Dek?=
-Date: Thu, 20 Apr 2023 16:22:14 +0200
-Subject: [PATCH 3/3] Fix a bug in for clause in EntityTreeModel
-
- The body of the for loop calls function monitoredCollectionRemoved,
- which modifies the list which is iterated over. This can lead to
- undefined behavior, so it's better to just iterate over a copy.
-
-(cherry picked from commit b2b2ac0311b735ec80e9b02addae4e00398cf21e)
----
- src/core/models/entitytreemodel_p.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/core/models/entitytreemodel_p.cpp b/src/core/models/entitytreemodel_p.cpp
-index ab67c482a..531019562 100644
---- a/src/core/models/entitytreemodel_p.cpp
-+++ b/src/core/models/entitytreemodel_p.cpp
-@@ -174,7 +174,7 @@ void EntityTreeModelPrivate::agentInstanceRemoved(const Akonadi::AgentInstance &
- }
- return;
- }
-- const auto &children = m_childEntities[Collection::root().id()];
-+ const auto children = m_childEntities[Collection::root().id()];
- for (const Node *node : children) {
- Q_ASSERT(node->type == Node::Collection);
-
---
-2.40.0
-
diff --git a/akonadi-23.04.0.tar.xz b/akonadi-23.04.0.tar.xz
deleted file mode 120000
index ae21c2d..0000000
--- a/akonadi-23.04.0.tar.xz
+++ /dev/null
@@ -1 +0,0 @@
-/ipfs/bafybeia3pf2onfdxn2ldnodpxn25vm4a2jiwij47pc526nxdl65r64shbe
\ No newline at end of file
diff --git a/akonadi-23.04.0.tar.xz.sig b/akonadi-23.04.0.tar.xz.sig
deleted file mode 100644
index 2ce668a..0000000
--- a/akonadi-23.04.0.tar.xz.sig
+++ /dev/null
@@ -1,16 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQIzBAABCgAdFiEE2BwMs463Je9mkcOFu0YzUNbvMe8FAmQ473YACgkQu0YzUNbv
-Me9jGQ/8D5TqbugHe7EeCdMROykxiG0onxq2a1ZmRKOlUpdocRj3SbApwPCbz74s
-vEAoghBbxU99mK/jkxASWpF/U7zwc3S0oR4kGk7k66inxRvPLO0ukgqsRtTtRKGk
-JIGQYj3bKijz3LiWbgECra8F4+1X1Qq0CHJCzXo1Z/gUa5Qpuk68ModLIog4xIg8
-qV7DeOqUYTcThDlMdttZRiSHoiEIrLLCtqJQ5E801ZL+SKsqMrFMtMlnw986/vsX
-9PuWVYeBf2EJZ2J9iW01skUV8tvGawQi1j8yPXYcPD/ZHnA7n3kuZf4NONwRiKJn
-ZrZ/y8tsrvJkNCy+oDBJCgAwJP5hCOw0mPMU/7HUleFthETCBsxQNVo2RYn6JnnC
-1dOR1nIRZHEZrWlAIu0nKwAXTk0u/OQ+HGu1zag7EzX1Fdrxx2B3u0INhZ/8Xye9
-I/q/U/bAQR13crJ4qr40/2dYP55aae2448nU56DCVUYLa1XBvb7ypmhTVf6QI5OD
-dyrxGvfPxGFPHbjMMDPZ5jSiFTZCoiLfMD56j7Eu+saAbufw5p5F2ayoFV7I04Vr
-mKB3BnbXZXGK3gJgfM8+Ndx3Tcay1Tf1p9llGPwQf+LVdOeEQiRn5Qn3xYUULE0f
-aLhK6AM3k41ml9WGOVqHjG7poNHV9Dc9erSyRXjXG+Fiqw+Qtvk=
-=bNCh
------END PGP SIGNATURE-----
diff --git a/akonadi-23.04.1.tar.xz b/akonadi-23.04.1.tar.xz
new file mode 120000
index 0000000..58c0720
--- /dev/null
+++ b/akonadi-23.04.1.tar.xz
@@ -0,0 +1 @@
+/ipfs/bafybeib2xnd3a63fyvclp5rw4rq5krjmir5foqdjkrf5rfauuhpgia4hh4
\ No newline at end of file
diff --git a/akonadi-23.04.1.tar.xz.sig b/akonadi-23.04.1.tar.xz.sig
new file mode 100644
index 0000000..6ea4ff8
--- /dev/null
+++ b/akonadi-23.04.1.tar.xz.sig
@@ -0,0 +1,16 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQIzBAABCgAdFiEE2BwMs463Je9mkcOFu0YzUNbvMe8FAmRZ5PMACgkQu0YzUNbv
+Me+cFhAAiOQ+e4Rm0cc0AnQXhNEqqoP4buyiNosd0mwj0gZ5Q9aoSdDsvY6m2IhG
+3rqbCBBLfp/gqnMURbBQVGoHTKZ2n/6x57PSStrhCVDRzR5X71PNrrY3YiJCdstn
+4vnPNnbfJc02fFkXzYDkhGpYPy0WP323Q+AshgN+Tq9gn6VwhUUnHETXT16/sLDN
+GFNtyyBdYA+/Hky/MVZ/pRElrVpbyg0CHgb+Y81e0OyIf/Z55xYBSio1GR9blYIG
+HE3uzO1brehGm0c3nkDQxmoxg+nJC0FpvNDCvtC2Vr6OLZaEHFNnLlaS7HLFuNh2
+cE2enzdVlBkJ8mvqW0BFQztFVJ4QLWGFIXI4i4ii3iSA9ulM5unPzMePkBOEmtE6
+tSVEmZ9zduN6gGV4SDmXDSx9wl0MVVYT84y9+2KDKF2SwdeN1oGFDQsx/VqFWrXf
+5OFeozP9HGcCMqs0ijWstmrXTlFtpZIge4CVU73wzIZskotG+AKEWgQBa6CEzZzi
+TfpQLj7sfX2/VX3Gh1wSvjIAEyi1QvtJ4qI+tpei9bF3rnwuQsTxlWi0DVfF65xv
+YWamwXHjDoX/Q8su78SicqkIPhNLEdjOXf6eGzdMaR7L7Zb/LpGMsvcbhdMuRoe1
+VGfJl3h2epS4POYZoxQAc1id+45mraMkn3F35IXrRvCMLcTD4V8=
+=w/iN
+-----END PGP SIGNATURE-----
diff --git a/akonadi-server.changes b/akonadi-server.changes
index b36a098..71f90d5 100644
--- a/akonadi-server.changes
+++ b/akonadi-server.changes
@@ -1,4 +1,30 @@
-------------------------------------------------------------------
+Tue May 9 10:46:19 UTC 2023 - Christophe Marin
+
+- Update to 23.04.1
+ * New bugfix release
+ * For more details please see:
+ * https://kde.org/announcements/gear/23.04.1/
+- Changes since 23.04.0:
+ * Allow running mysql_upgrade when starting Akonadi
+ * Remove dangling reference
+ * Avoid crashing before priting debug output when setting up db
+ * Fix crash on server shutdown (kde#462692)
+ * Use correct INSTALL_TARGETS_DEFAULT_ARGS
+ * Fix a bug in for clause in EntityTreeModel
+ * Remove dead code from FavoriteCollectionsModel
+ * Fix wrong for clause in Akonadi::Session (kde#468343)
+ * Add a test for faulty iteration in Akonadi::Session
+- Drop patches, merged upstream:
+ * 0001-Fix-wrong-for-clause-in-Akonadi-Session.patch
+ * 0002-Remove-dead-code-from-FavoriteCollectionsModel.patch
+ * 0003-Fix-a-bug-in-for-clause-in-EntityTreeModel.patch
+ * 0001-Fix-crash-on-server-shutdown.patch
+ * 0001-Avoid-crashing-before-priting-debug-output-when-sett.patch
+ * 0001-Remove-dangling-reference.patch
+ * 0001-Allow-running-mysql_upgrade-when-starting-Akonadi.patch
+
+-------------------------------------------------------------------
Fri Apr 28 14:05:49 UTC 2023 - Christophe Marin
- Add more fixes:
diff --git a/akonadi-server.spec b/akonadi-server.spec
index deee6b4..473c96d 100644
--- a/akonadi-server.spec
+++ b/akonadi-server.spec
@@ -20,7 +20,7 @@
%define kf5_version 5.104.0
%bcond_without released
Name: akonadi-server
-Version: 23.04.0
+Version: 23.04.1
Release: 0
Summary: PIM Storage Service
License: LGPL-2.1-or-later
@@ -31,20 +31,6 @@ Source1: https://download.kde.org/stable/release-service/%{version}/src/%
Source2: applications.keyring
%endif
Source99: akonadi-server-rpmlintrc
-# PATCH-FIX-UPSTREAM -- kde#458315 and duplicates
-Patch0: 0001-Fix-wrong-for-clause-in-Akonadi-Session.patch
-# PATCH-FIX-UPSTREAM
-Patch1: 0002-Remove-dead-code-from-FavoriteCollectionsModel.patch
-# PATCH-FIX-UPSTREAM -- potential undefined behaviour
-Patch2: 0003-Fix-a-bug-in-for-clause-in-EntityTreeModel.patch
-# PATCH-FIX-UPSTREAM -- Another crash fix
-Patch3: 0001-Fix-crash-on-server-shutdown.patch
-# PATCH-FIX-UPSTREAM
-Patch4: 0001-Avoid-crashing-before-priting-debug-output-when-sett.patch
-# PATCH-FIX-UPSTREAM
-Patch5: 0001-Remove-dangling-reference.patch
-# PATCH-FIX-UPSTREAM
-Patch6: 0001-Allow-running-mysql_upgrade-when-starting-Akonadi.patch
BuildRequires: apparmor-abstractions
BuildRequires: apparmor-rpm-macros
BuildRequires: extra-cmake-modules >= %{kf5_version}