all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: 39182@debbugs.gnu.org
Subject: [bug#39182] [PATCH 01/26] gnu: Add akonadi.
Date: Sat, 18 Jan 2020 22:11:20 +0100	[thread overview]
Message-ID: <20200118211145.27488-1-h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <20200118211002.27355-1-h.goebel@crazy-compilers.com>

* gnu/packages/kde-pim.scm,
  gnu/packages/patches/akonadi-paths.patch,
  gnu/packages/patches/akonadi-Revert-Make-installation-properly-relocatabl.patch
  gnu/packages/patches/akonadi-timestamps.patch: New files.
* gnu/local.mk (MODULES): Add kde-pim.scm. (dist_patch): Add the patches.
---
 gnu/local.mk                                  |   4 +
 gnu/packages/kde-pim.scm                      | 112 ++++++++++++++++++
 ...ake-installation-properly-relocatabl.patch |  49 ++++++++
 gnu/packages/patches/akonadi-paths.patch      |  49 ++++++++
 gnu/packages/patches/akonadi-timestamps.patch |  14 +++
 5 files changed, 228 insertions(+)
 create mode 100644 gnu/packages/kde-pim.scm
 create mode 100644 gnu/packages/patches/akonadi-Revert-Make-installation-properly-relocatabl.patch
 create mode 100644 gnu/packages/patches/akonadi-paths.patch
 create mode 100644 gnu/packages/patches/akonadi-timestamps.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 286bcb67dd..41829c5c5a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -285,6 +285,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/kde-frameworks.scm		\
   %D%/packages/kde-multimedia.scm		\
   %D%/packages/kde-plasma.scm			\
+  %D%/packages/kde-pim.scm			\
   %D%/packages/kde-utils.scm			\
   %D%/packages/kerberos.scm			\
   %D%/packages/key-mon.scm			\
@@ -705,6 +706,9 @@ dist_patch_DATA =						\
   %D%/packages/patches/aegisub-icu59-include-unistr.patch	\
   %D%/packages/patches/aegisub-boost68.patch                    \
   %D%/packages/patches/agg-am_c_prototype.patch			\
+  %D%/packages/patches/akonadi-paths.patch		\
+  %D%/packages/patches/akonadi-Revert-Make-installation-properly-relocatabl.patch \
+  %D%/packages/patches/akonadi-timestamps.patch		\
   %D%/packages/patches/allegro-mesa-18.2.5-and-later.patch	\
   %D%/packages/patches/amule-crypto-6.patch			\
   %D%/packages/patches/antiword-CVE-2014-8123.patch			\
diff --git a/gnu/packages/kde-pim.scm b/gnu/packages/kde-pim.scm
new file mode 100644
index 0000000000..3bf3e96a02
--- /dev/null
+++ b/gnu/packages/kde-pim.scm
@@ -0,0 +1,112 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017, 2019, 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages kde-pim)
+  #:use-module (guix build-system qt)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix utils)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages xml))
+
+(define-public akonadi
+  (package
+    (name "akonadi")
+    (version "19.08.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/applications/" version
+                           "/src/akonadi-" version ".tar.xz"))
+       (sha256
+        (base32 "0v7f1049wjnqxhwxr1443wc2cfbdqmf15xcwjz3j1m0vgdva9pyg"))
+       (patches (search-patches
+                 "akonadi-paths.patch"
+                 "akonadi-timestamps.patch"
+                 "akonadi-Revert-Make-installation-properly-relocatabl.patch"))))
+    (build-system qt-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("qttools" ,qttools)
+       ("shared-mime-info" ,shared-mime-info)))
+    (inputs
+     `(("boost" ,boost)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kcrash" ,kcrash)
+       ("kdbusaddons" ,kdbusaddons)
+       ("kdesignerplugin" ,kdesignerplugin)
+       ("ki18n" ,ki18n)
+       ("kiconthemes" ,kiconthemes)
+       ("kio" ,kio)
+       ("kitemmodels" ,kitemmodels)
+       ("kitemviews" ,kitemviews)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kwindowsystem" ,kwindowsystem)
+       ("kxmlgui" ,kxmlgui)
+       ("libxml2" ,libxml2)
+       ("libxslt" ,libxslt)
+       ;; Do NOT add mysql or postgresql to the inputs. Otherwise the binaries
+       ;; and wrapped files will refer to them, even if the user choices none
+       ;; of these.  Executables are searched on $PATH then.
+       ("qtbase" ,qtbase)
+       ("sqlite" ,sqlite)))
+    (arguments
+     `(#:tests? #f ;; TODO 135/167 tests fail
+       #:configure-flags '("-DDATABASE_BACKEND=SQLITE") ; lightweight
+       #:modules ((ice-9 textual-ports)
+                  ,@%qt-build-system-modules)
+       #:phases
+       (modify-phases (@ (guix build qt-build-system) %standard-phases)
+         (add-before 'configure 'add-definitions
+           (lambda _
+             (let ((out (assoc-ref %outputs "out"))
+                   (mysql (assoc-ref %build-inputs "mysql"))
+                   (pgsql (assoc-ref %build-inputs "postgresql")))
+               (with-output-to-file "CMakeLists.txt.new"
+                 (lambda _
+                   (display
+                    (string-append
+                     "add_compile_definitions(\n"
+                     "NIX_OUT=\"" out "\"\n"
+                     ;; pin binaries for mysql backend
+                     ")\n\n"))
+                   (display
+                    (call-with-input-file "CMakeLists.txt"
+                      get-string-all))))
+               (rename-file "CMakeLists.txt.new" "CMakeLists.txt"))
+             #t)))))
+    (home-page "https://kontact.kde.org/components/akonadi.html")
+    (synopsis "Extensible cross-desktop storage service for PIM")
+    (description "Akonadi is an extensible cross-desktop Personal Information
+Management (PIM) storage service.  It provides a common framework for
+applications to store and access mail, calendars, addressbooks, and other PIM
+data.
+
+This package contains the Akonadi PIM storage server and associated
+programs.")
+    (license license:fdl1.2+)))
diff --git a/gnu/packages/patches/akonadi-Revert-Make-installation-properly-relocatabl.patch b/gnu/packages/patches/akonadi-Revert-Make-installation-properly-relocatabl.patch
new file mode 100644
index 0000000000..c3964c5c05
--- /dev/null
+++ b/gnu/packages/patches/akonadi-Revert-Make-installation-properly-relocatabl.patch
@@ -0,0 +1,49 @@
+From bc018b4bc816a3b51deb9739bedbf8a2268d0684 Mon Sep 17 00:00:00 2001
+From: gnidorah <gnidorah@users.noreply.github.com>
+Date: Fri, 22 Dec 2017 17:36:03 +0300
+Subject: [PATCH] Revert "Make Akonadi installation properly relocatable"
+
+This reverts commit b2bb55f13f2ac783f89cc414de8c39f62fa2096a.
+---
+ CMakeLists.txt            | 3 ---
+ KF5AkonadiConfig.cmake.in | 6 +++---
+ 2 files changed, 3 insertions(+), 6 deletions(-)
+
+Index: akonadi-19.08.0/CMakeLists.txt
+===================================================================
+--- akonadi-19.08.0.orig/CMakeLists.txt
++++ akonadi-19.08.0/CMakeLists.txt
+@@ -306,9 +306,6 @@ configure_package_config_file(
+     "${CMAKE_CURRENT_SOURCE_DIR}/KF5AkonadiConfig.cmake.in"
+     "${CMAKE_CURRENT_BINARY_DIR}/KF5AkonadiConfig.cmake"
+     INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
+-    PATH_VARS AKONADI_DBUS_INTERFACES_INSTALL_DIR
+-              AKONADI_INCLUDE_DIR
+-              KF5Akonadi_DATA_DIR
+ )
+ 
+ install(FILES
+Index: akonadi-19.08.0/KF5AkonadiConfig.cmake.in
+===================================================================
+--- akonadi-19.08.0.orig/KF5AkonadiConfig.cmake.in
++++ akonadi-19.08.0/KF5AkonadiConfig.cmake.in
+@@ -26,8 +26,8 @@ if(BUILD_TESTING)
+     find_dependency(Qt5Test "@QT_REQUIRED_VERSION@")
+ endif()
+ 
+-set_and_check(AKONADI_DBUS_INTERFACES_DIR  "@PACKAGE_AKONADI_DBUS_INTERFACES_INSTALL_DIR@")
+-set_and_check(AKONADI_INCLUDE_DIR          "@PACKAGE_AKONADI_INCLUDE_DIR@")
++set_and_check(AKONADI_DBUS_INTERFACES_DIR  "@AKONADI_DBUS_INTERFACES_INSTALL_DIR@")
++set_and_check(AKONADI_INCLUDE_DIR          "@AKONADI_INCLUDE_DIR@")
+ 
+ find_dependency(Boost "@Boost_MINIMUM_VERSION@")
+ 
+@@ -35,7 +35,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/KF5Ako
+ include(${CMAKE_CURRENT_LIST_DIR}/KF5AkonadiMacros.cmake)
+ 
+ # The directory where akonadi-xml.xsd and kcfg2dbus.xsl are installed
+-set(KF5Akonadi_DATA_DIR "@PACKAGE_KF5Akonadi_DATA_DIR@")
++set(KF5Akonadi_DATA_DIR "@KF5Akonadi_DATA_DIR@")
+ 
+ ####################################################################################
+ # CMAKE_AUTOMOC
diff --git a/gnu/packages/patches/akonadi-paths.patch b/gnu/packages/patches/akonadi-paths.patch
new file mode 100644
index 0000000000..da250ee9e8
--- /dev/null
+++ b/gnu/packages/patches/akonadi-paths.patch
@@ -0,0 +1,49 @@
+This is based on the respectve patch from NixPkgs, but with the parts pinning
+mysql and postgresql executables removed. The our package definition on why.
+
+
+Index: akonadi-19.08.0/src/akonadicontrol/agentmanager.cpp
+===================================================================
+--- akonadi-19.08.0.orig/src/akonadicontrol/agentmanager.cpp
++++ akonadi-19.08.0/src/akonadicontrol/agentmanager.cpp
+@@ -78,12 +78,12 @@ AgentManager::AgentManager(bool verbose,
+     mStorageController = new Akonadi::ProcessControl;
+     mStorageController->setShutdownTimeout(15 * 1000);   // the server needs more time for shutdown if we are using an internal mysqld
+     connect(mStorageController, &Akonadi::ProcessControl::unableToStart, this, &AgentManager::serverFailure);
+-    mStorageController->start(QStringLiteral("akonadiserver"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash);
++    mStorageController->start(QLatin1String(NIX_OUT "/bin/akonadiserver"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash);
+ 
+     if (mAgentServerEnabled) {
+         mAgentServer = new Akonadi::ProcessControl;
+         connect(mAgentServer, &Akonadi::ProcessControl::unableToStart, this, &AgentManager::agentServerFailure);
+-        mAgentServer->start(QStringLiteral("akonadi_agent_server"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash);
++        mAgentServer->start(QLatin1String(NIX_OUT "/bin/akonadi_agent_server"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash);
+     }
+ }
+ 
+Index: akonadi-19.08.0/src/akonadicontrol/agentprocessinstance.cpp
+===================================================================
+--- akonadi-19.08.0.orig/src/akonadicontrol/agentprocessinstance.cpp
++++ akonadi-19.08.0/src/akonadicontrol/agentprocessinstance.cpp
+@@ -62,7 +62,7 @@ bool AgentProcessInstance::start(const A
+     } else {
+         Q_ASSERT(agentInfo.launchMethod == AgentType::Launcher);
+         const QStringList arguments = QStringList() << executable << identifier();
+-        const QString agentLauncherExec = Akonadi::StandardDirs::findExecutable(QStringLiteral("akonadi_agent_launcher"));
++        const QString agentLauncherExec = QLatin1String(NIX_OUT "/bin/akonadi_agent_launcher");
+         mController->start(agentLauncherExec, arguments);
+     }
+     return true;
+Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
+===================================================================
+--- akonadi-19.08.0.orig/src/server/storage/dbconfigmysql.cpp
++++ akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
+@@ -209,7 +193,7 @@ bool DbConfigMysql::startInternalServer(
+ #endif
+ 
+     // generate config file
+-    const QString globalConfig = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-global.conf"));
++    const QString globalConfig = QLatin1String(NIX_OUT "/etc/xdg/akonadi/mysql-global.conf");
+     const QString localConfig  = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-local.conf"));
+     const QString actualConfig = StandardDirs::saveDir("data") + QLatin1String("/mysql.conf");
+     if (globalConfig.isEmpty()) {
diff --git a/gnu/packages/patches/akonadi-timestamps.patch b/gnu/packages/patches/akonadi-timestamps.patch
new file mode 100644
index 0000000000..e299a6991f
--- /dev/null
+++ b/gnu/packages/patches/akonadi-timestamps.patch
@@ -0,0 +1,14 @@
+Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
+===================================================================
+--- akonadi-19.08.0.orig/src/server/storage/dbconfigmysql.cpp
++++ akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
+@@ -235,8 +235,7 @@ bool DbConfigMysql::startInternalServer(
+     bool confUpdate = false;
+     QFile actualFile(actualConfig);
+     // update conf only if either global (or local) is newer than actual
+-    if ((QFileInfo(globalConfig).lastModified() > QFileInfo(actualFile).lastModified()) ||
+-            (QFileInfo(localConfig).lastModified()  > QFileInfo(actualFile).lastModified())) {
++    if (true) {
+         QFile globalFile(globalConfig);
+         QFile localFile(localConfig);
+         if (globalFile.open(QFile::ReadOnly) && actualFile.open(QFile::WriteOnly)) {
-- 
2.21.1

  reply	other threads:[~2020-01-18 21:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-18 21:10 [bug#39182] [PATCH 00/26] First part od KDE PIM, incl. akonadi, kgpg, kleopatra Hartmut Goebel
2020-01-18 21:11 ` Hartmut Goebel [this message]
2020-01-18 21:11   ` [bug#39182] [PATCH 02/26] gnu: Add kmime Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 03/26] gnu: Add kmbox Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 04/26] gnu: Add kcalutils Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 05/26] gnu: Add kpimtextedit Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 06/26] gnu: Add kidentitymanagement Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 07/26] gnu: Add kimap Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 08/26] gnu: Add kldap Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 09/26] gnu: Add ktnef Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 10/26] gnu: Add kalarmcal Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 11/26] gnu: Add akonadi-mime Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 12/26] gnu: Add akonadi-notes Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 13/26] gnu: Add akonadi-search Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 14/26] gnu: Add akonadi-contacts Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 15/26] gnu: Add ksmtp Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 16/26] gnu: Add kontactinterface Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 17/26] gnu: Add libkgapi Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 18/26] gnu: Add kmailtransport Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 19/26] gnu: Add akonadi-calendar Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 20/26] gnu: Add libkleo Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 21/26] gnu: Add kleopatra Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 22/26] gnu: Add kgpg Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 23/26] gnu: Add libkdepim Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 24/26] gnu: Add kmailimporter Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 25/26] gnu: Add kpimcommon Hartmut Goebel
2020-01-18 21:11   ` [bug#39182] [PATCH 26/26] gnu: Add kdepim-apps-libs Hartmut Goebel
     [not found] ` <handler.39182.B.15793818166673.ack@debbugs.gnu.org>
2020-02-03 13:46   ` bug#39182: Acknowledgement ([PATCH 00/26] First part od KDE PIM, incl. akonadi, kgpg, kleopatra) Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200118211145.27488-1-h.goebel@crazy-compilers.com \
    --to=h.goebel@crazy-compilers.com \
    --cc=39182@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.