From e2e1bcd06731ad5313ec71bd857983f42732a7ed43cae147a1ce6e9d95a5258b Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Wed, 19 Oct 2022 10:19:30 +0000 Subject: [PATCH] Accepting request 1029947 from home:alarrosa:branches:KDE:Applications The package is built in Backports for Leap and SLES/SLED and the same binary is used in all cases so we can't just use an %if in the spec file. I thought of this solution, which is not very nice but it works. - In SLE-15-SP3 we had patches that made akonadi fall back to sqlite if the mysql backend is not available. Those patches were already merged by upstream so we can let the package Recommend mysql instead of Require it, since it's not available in SLED. The Requires are set unless branding-SLE is installed so the requirements are used in Leap/TW but not in SLE where it's only a Recommends and an alternate Requirements is used in that case where the sqlite backend is installed if mysql is not available. OBS-URL: https://build.opensuse.org/request/show/1029947 OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/akonadi-server?expand=0&rev=321 --- akonadi-server.changes | 12 ++++++++++++ akonadi-server.spec | 9 ++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/akonadi-server.changes b/akonadi-server.changes index 5600744..e9bd110 100644 --- a/akonadi-server.changes +++ b/akonadi-server.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Oct 18 14:58:50 UTC 2022 - Antonio Larrosa + +- In SLE-15-SP3 we had patches that made akonadi fall back to + sqlite if the mysql backend is not available. Those patches were + already merged by upstream so we can let the package Recommend + mysql instead of Require it, since it's not available in SLED. + The Requires are set unless branding-SLE is installed so the + requirements are used in Leap/TW but not in SLE where it's only + a Recommends and an alternate Requirements is used in that case + where the sqlite backend is installed if mysql is not available. + ------------------------------------------------------------------- Tue Oct 11 14:31:39 UTC 2022 - Christophe Giboudeaux diff --git a/akonadi-server.spec b/akonadi-server.spec index 33b77d8..20a8538 100644 --- a/akonadi-server.spec +++ b/akonadi-server.spec @@ -1,7 +1,7 @@ # # spec file for package akonadi-server # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -70,8 +70,11 @@ BuildRequires: cmake(Qt5Sql) BuildRequires: cmake(Qt5Test) BuildRequires: cmake(Qt5Widgets) BuildRequires: cmake(Qt5Xml) -Requires: libqt5-sql-mysql -Requires: mysql +Requires: ((akonadi-server-sqlite or (libqt5-sql-mysql and mysql)) if branding-SLE) +Requires: (libqt5-sql-mysql or branding-SLE) +Requires: (mysql or branding-SLE) +Recommends: libqt5-sql-mysql +Recommends: mysql # FIXME: Check if it's worth it Recommends: kaccounts-integration Recommends: kaccounts-providers