git.iko.soy/typeable/nixpkgs
on master help sign in
akonadi: update patches
commit403e5188a6d7eb85932a3363d02956cbcd748d08 authorThomas Tuegel <ttuegel@mailbox.org> dateMon 13 Jul 2020, 11:48 (6 years ago) parent2855e9b
6 files changed+107−74
pkgs/applications/kde/akonadi/akonadi-paths.patch → pkgs/applications/kde/akonadi/0001-akonadi-paths.patch+58−40 pkgs/applications/kde/akonadi/0002-akonadi-timestamps.patch+26 pkgs/applications/kde/akonadi/0001-Revert-Make-Akonadi-installation-properly-relocatabl.patch → pkgs/applications/kde/akonadi/0003-akonadi-revert-make-relocatable.patch+18−16 pkgs/applications/kde/akonadi/akonadi-timestamps.patch−14 pkgs/applications/kde/akonadi/default.nix+5−1 pkgs/applications/kde/akonadi/series−3
pkgs/applications/kde/akonadi/akonadi-paths.patch → pkgs/applications/kde/akonadi/0001-akonadi-paths.patchrenamed+58−40
@@ -1,27 +1,42 @@
1−Index: akonadi-19.08.0/src/akonadicontrol/agentmanager.cpp
2−===================================================================
3−--- akonadi-19.08.0.orig/src/akonadicontrol/agentmanager.cpp
4−+++ akonadi-19.08.0/src/akonadicontrol/agentmanager.cpp
5−@@ -78,12 +78,12 @@ AgentManager::AgentManager(bool verbose,
6− mStorageController = new Akonadi::ProcessControl;
7− mStorageController->setShutdownTimeout(15 * 1000); // the server needs more time for shutdown if we are using an internal mysqld
8− connect(mStorageController, &Akonadi::ProcessControl::unableToStart, this, &AgentManager::serverFailure);
9−- mStorageController->start(QStringLiteral("akonadiserver"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash);
10−+ mStorageController->start(QLatin1String(NIX_OUT "/bin/akonadiserver"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash);
1+From 90969b9b36400d47b1afe761fb8468c1acb8a04a Mon Sep 17 00:00:00 2001
2+From: Thomas Tuegel <ttuegel@mailbox.org>
3+Date: Mon, 13 Jul 2020 11:41:19 -0500
4+Subject: [PATCH 1/3] akonadi paths
5+
6+---
7+ src/akonadicontrol/agentmanager.cpp | 4 ++--
8+ src/akonadicontrol/agentprocessinstance.cpp | 2 +-
9+ src/server/storage/dbconfigmysql.cpp | 26 ++++-----------------
10+ src/server/storage/dbconfigpostgresql.cpp | 19 +++------------
11+ 4 files changed, 11 insertions(+), 40 deletions(-)
12+
13+diff --git a/src/akonadicontrol/agentmanager.cpp b/src/akonadicontrol/agentmanager.cpp
14+index 23b4a1f..c13b658 100644
15+--- a/src/akonadicontrol/agentmanager.cpp
16++++ b/src/akonadicontrol/agentmanager.cpp
17+@@ -61,7 +61,7 @@ public:
18+ []() {
19+ QCoreApplication::instance()->exit(255);
20+ });
21+- start(QStringLiteral("akonadiserver"), args, RestartOnCrash);
22++ start(QLatin1String(NIX_OUT "/bin/akonadiserver"), args, RestartOnCrash);
23+ }
1124
12− if (mAgentServerEnabled) {
13− mAgentServer = new Akonadi::ProcessControl;
14− connect(mAgentServer, &Akonadi::ProcessControl::unableToStart, this, &AgentManager::agentServerFailure);
15−- mAgentServer->start(QStringLiteral("akonadi_agent_server"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash);
16−+ mAgentServer->start(QLatin1String(NIX_OUT "/bin/akonadi_agent_server"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash);
25+ ~StorageProcessControl() override
26+@@ -84,7 +84,7 @@ public:
27+ []() {
28+ qCCritical(AKONADICONTROL_LOG) << "Failed to start AgentServer!";
29+ });
30+- start(QStringLiteral("akonadi_agent_server"), args, RestartOnCrash);
31++ start(QLatin1String(NIX_OUT "/bin/akonadi_agent_server"), args, RestartOnCrash);
1732 }
18− }
1933
20−Index: akonadi-19.08.0/src/akonadicontrol/agentprocessinstance.cpp
21−===================================================================
22−--- akonadi-19.08.0.orig/src/akonadicontrol/agentprocessinstance.cpp
23−+++ akonadi-19.08.0/src/akonadicontrol/agentprocessinstance.cpp
24−@@ -62,7 +62,7 @@ bool AgentProcessInstance::start(const A
34+ ~AgentServerProcessControl() override
35+diff --git a/src/akonadicontrol/agentprocessinstance.cpp b/src/akonadicontrol/agentprocessinstance.cpp
36+index 4e58f7e..e8bb532 100644
37+--- a/src/akonadicontrol/agentprocessinstance.cpp
38++++ b/src/akonadicontrol/agentprocessinstance.cpp
39+@@ -62,7 +62,7 @@ bool AgentProcessInstance::start(const AgentType &agentInfo)
2540 } else {
2641 Q_ASSERT(agentInfo.launchMethod == AgentType::Launcher);
2742 const QStringList arguments = QStringList() << executable << identifier();
@@ -30,11 +45,11 @@ Index: akonadi-19.08.0/src/akonadicontrol/agentprocessinstance.cpp
3045 mController->start(agentLauncherExec, arguments);
3146 }
3247 return true;
33−Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
34−===================================================================
35−--- akonadi-19.08.0.orig/src/server/storage/dbconfigmysql.cpp
36−+++ akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
37−@@ -83,7 +83,6 @@ bool DbConfigMysql::init(QSettings &sett
48+diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
49+index cac40f5..527649b 100644
50+--- a/src/server/storage/dbconfigmysql.cpp
51++++ b/src/server/storage/dbconfigmysql.cpp
52+@@ -83,7 +83,6 @@ bool DbConfigMysql::init(QSettings &settings)
3853 // determine default settings depending on the driver
3954 QString defaultHostName;
4055 QString defaultOptions;
@@ -42,7 +57,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
4257 QString defaultCleanShutdownCommand;
4358
4459 #ifndef Q_OS_WIN
45−@@ -92,16 +91,7 @@ bool DbConfigMysql::init(QSettings &sett
60+@@ -92,16 +91,7 @@ bool DbConfigMysql::init(QSettings &settings)
4661 #endif
4762
4863 const bool defaultInternalServer = true;
@@ -60,7 +75,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
6075 if (!mysqladminPath.isEmpty()) {
6176 #ifndef Q_OS_WIN
6277 defaultCleanShutdownCommand = QStringLiteral("%1 --defaults-file=%2/mysql.conf --socket=%3/%4 shutdown")
63−@@ -111,10 +101,10 @@ bool DbConfigMysql::init(QSettings &sett
78+@@ -111,10 +101,10 @@ bool DbConfigMysql::init(QSettings &settings)
6479 #endif
6580 }
6681
@@ -73,7 +88,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
7388 qCDebug(AKONADISERVER_LOG) << "Found mysqlcheck: " << mMysqlCheckPath;
7489
7590 mInternalServer = settings.value(QStringLiteral("QMYSQL/StartServer"), defaultInternalServer).toBool();
76−@@ -131,7 +121,7 @@ bool DbConfigMysql::init(QSettings &sett
91+@@ -131,7 +121,7 @@ bool DbConfigMysql::init(QSettings &settings)
7792 mUserName = settings.value(QStringLiteral("User")).toString();
7893 mPassword = settings.value(QStringLiteral("Password")).toString();
7994 mConnectionOptions = settings.value(QStringLiteral("Options"), defaultOptions).toString();
@@ -82,7 +97,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
8297 mCleanServerShutdownCommand = settings.value(QStringLiteral("CleanServerShutdownCommand"), defaultCleanShutdownCommand).toString();
8398 settings.endGroup();
8499
85−@@ -141,9 +131,6 @@ bool DbConfigMysql::init(QSettings &sett
100+@@ -141,9 +131,6 @@ bool DbConfigMysql::init(QSettings &settings)
86101 // intentionally not namespaced as we are the only one in this db instance when using internal mode
87102 mDatabaseName = QStringLiteral("akonadi");
88103 }
@@ -92,7 +107,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
92107
93108 qCDebug(AKONADISERVER_LOG) << "Using mysqld:" << mMysqldPath;
94109
95−@@ -152,9 +139,6 @@ bool DbConfigMysql::init(QSettings &sett
110+@@ -152,9 +139,6 @@ bool DbConfigMysql::init(QSettings &settings)
96111 settings.setValue(QStringLiteral("Name"), mDatabaseName);
97112 settings.setValue(QStringLiteral("Host"), mHostName);
98113 settings.setValue(QStringLiteral("Options"), mConnectionOptions);
@@ -102,7 +117,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
102117 settings.setValue(QStringLiteral("StartServer"), mInternalServer);
103118 settings.endGroup();
104119 settings.sync();
105−@@ -209,7 +193,7 @@ bool DbConfigMysql::startInternalServer(
120+@@ -209,7 +193,7 @@ bool DbConfigMysql::startInternalServer()
106121 #endif
107122
108123 // generate config file
@@ -111,11 +126,11 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
111126 const QString localConfig = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-local.conf"));
112127 const QString actualConfig = StandardDirs::saveDir("data") + QLatin1String("/mysql.conf");
113128 if (globalConfig.isEmpty()) {
114−Index: akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
115−===================================================================
116−--- akonadi-19.08.0.orig/src/server/storage/dbconfigpostgresql.cpp
117−+++ akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
118−@@ -140,9 +140,7 @@ bool DbConfigPostgresql::init(QSettings
129+diff --git a/src/server/storage/dbconfigpostgresql.cpp b/src/server/storage/dbconfigpostgresql.cpp
130+index 09cdbd5..1c8996b 100644
131+--- a/src/server/storage/dbconfigpostgresql.cpp
132++++ b/src/server/storage/dbconfigpostgresql.cpp
133+@@ -141,9 +141,7 @@ bool DbConfigPostgresql::init(QSettings &settings)
119134 // determine default settings depending on the driver
120135 QString defaultHostName;
121136 QString defaultOptions;
@@ -125,7 +140,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
125140 QString defaultPgData;
126141
127142 #ifndef Q_WS_WIN // We assume that PostgreSQL is running as service on Windows
128−@@ -153,12 +151,8 @@ bool DbConfigPostgresql::init(QSettings
143+@@ -154,12 +152,8 @@ bool DbConfigPostgresql::init(QSettings &settings)
129144
130145 mInternalServer = settings.value(QStringLiteral("QPSQL/StartServer"), defaultInternalServer).toBool();
131146 if (mInternalServer) {
@@ -139,7 +154,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
139154 defaultPgData = StandardDirs::saveDir("data", QStringLiteral("db_data"));
140155 }
141156
142−@@ -177,20 +171,14 @@ bool DbConfigPostgresql::init(QSettings
157+@@ -178,20 +172,14 @@ bool DbConfigPostgresql::init(QSettings &settings)
143158 mUserName = settings.value(QStringLiteral("User")).toString();
144159 mPassword = settings.value(QStringLiteral("Password")).toString();
145160 mConnectionOptions = settings.value(QStringLiteral("Options"), defaultOptions).toString();
@@ -162,7 +177,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
162177 qCDebug(AKONADISERVER_LOG) << "Found pg_upgrade:" << mPgUpgradePath;
163178 mPgData = settings.value(QStringLiteral("PgData"), defaultPgData).toString();
164179 if (mPgData.isEmpty()) {
165−@@ -206,7 +194,6 @@ bool DbConfigPostgresql::init(QSettings
180+@@ -207,7 +195,6 @@ bool DbConfigPostgresql::init(QSettings &settings)
166181 settings.setValue(QStringLiteral("Port"), mHostPort);
167182 }
168183 settings.setValue(QStringLiteral("Options"), mConnectionOptions);
@@ -170,3 +185,6 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
170185 settings.setValue(QStringLiteral("InitDbPath"), mInitDbPath);
171186 settings.setValue(QStringLiteral("StartServer"), mInternalServer);
172187 settings.endGroup();
188+--
189+2.25.4
190+
pkgs/applications/kde/akonadi/0002-akonadi-timestamps.patchnew file+26
@@ -0,0 +1,26 @@
1+From b8c6a2a017321649db8fec553a644b8da2300514 Mon Sep 17 00:00:00 2001
2+From: Thomas Tuegel <ttuegel@mailbox.org>
3+Date: Mon, 13 Jul 2020 11:41:35 -0500
4+Subject: [PATCH 2/3] akonadi timestamps
5+
6+---
7+ src/server/storage/dbconfigmysql.cpp | 3 +--
8+ 1 file changed, 1 insertion(+), 2 deletions(-)
9+
10+diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
11+index 527649b..08c3dd4 100644
12+--- a/src/server/storage/dbconfigmysql.cpp
13++++ b/src/server/storage/dbconfigmysql.cpp
14+@@ -235,8 +235,7 @@ bool DbConfigMysql::startInternalServer()
15+ bool confUpdate = false;
16+ QFile actualFile(actualConfig);
17+ // update conf only if either global (or local) is newer than actual
18+- if ((QFileInfo(globalConfig).lastModified() > QFileInfo(actualFile).lastModified()) ||
19+- (QFileInfo(localConfig).lastModified() > QFileInfo(actualFile).lastModified())) {
20++ if (true) {
21+ QFile globalFile(globalConfig);
22+ QFile localFile(localConfig);
23+ if (globalFile.open(QFile::ReadOnly) && actualFile.open(QFile::WriteOnly)) {
24+--
25+2.25.4
26+
pkgs/applications/kde/akonadi/0001-Revert-Make-Akonadi-installation-properly-relocatabl.patch → pkgs/applications/kde/akonadi/0003-akonadi-revert-make-relocatable.patchrenamed+18−16
@@ -1,19 +1,18 @@
1−From bc018b4bc816a3b51deb9739bedbf8a2268d0684 Mon Sep 17 00:00:00 2001
2−From: gnidorah <gnidorah@users.noreply.github.com>
3−Date: Fri, 22 Dec 2017 17:36:03 +0300
4−Subject: [PATCH] Revert "Make Akonadi installation properly relocatable"
1+From 7afe018382cf68b477b35f87b666424d62d19ef4 Mon Sep 17 00:00:00 2001
2+From: Thomas Tuegel <ttuegel@mailbox.org>
3+Date: Mon, 13 Jul 2020 11:41:55 -0500
4+Subject: [PATCH 3/3] akonadi revert make relocatable
55
6−This reverts commit b2bb55f13f2ac783f89cc414de8c39f62fa2096a.
76---
87 CMakeLists.txt | 3 ---
98 KF5AkonadiConfig.cmake.in | 6 +++---
109 2 files changed, 3 insertions(+), 6 deletions(-)
1110
12−Index: akonadi-19.08.0/CMakeLists.txt
13−===================================================================
14−--- akonadi-19.08.0.orig/CMakeLists.txt
15−+++ akonadi-19.08.0/CMakeLists.txt
16−@@ -306,9 +306,6 @@ configure_package_config_file(
11+diff --git a/CMakeLists.txt b/CMakeLists.txt
12+index d927471..83a74c0 100644
13+--- a/CMakeLists.txt
14++++ b/CMakeLists.txt
15+@@ -330,9 +330,6 @@ configure_package_config_file(
1716 "${CMAKE_CURRENT_SOURCE_DIR}/KF5AkonadiConfig.cmake.in"
1817 "${CMAKE_CURRENT_BINARY_DIR}/KF5AkonadiConfig.cmake"
1918 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
@@ -23,11 +22,11 @@ Index: akonadi-19.08.0/CMakeLists.txt
2322 )
2423
2524 install(FILES
26−Index: akonadi-19.08.0/KF5AkonadiConfig.cmake.in
27−===================================================================
28−--- akonadi-19.08.0.orig/KF5AkonadiConfig.cmake.in
29−+++ akonadi-19.08.0/KF5AkonadiConfig.cmake.in
30−@@ -26,8 +26,8 @@ if(BUILD_TESTING)
25+diff --git a/KF5AkonadiConfig.cmake.in b/KF5AkonadiConfig.cmake.in
26+index 421e1df..e3abf27 100644
27+--- a/KF5AkonadiConfig.cmake.in
28++++ b/KF5AkonadiConfig.cmake.in
29+@@ -24,8 +24,8 @@ if(BUILD_TESTING)
3130 find_dependency(Qt5Test "@QT_REQUIRED_VERSION@")
3231 endif()
3332
@@ -38,7 +37,7 @@ Index: akonadi-19.08.0/KF5AkonadiConfig.cmake.in
3837
3938 find_dependency(Boost "@Boost_MINIMUM_VERSION@")
4039
41−@@ -35,7 +35,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/KF5Ako
40+@@ -33,7 +33,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/KF5AkonadiTargets.cmake)
4241 include(${CMAKE_CURRENT_LIST_DIR}/KF5AkonadiMacros.cmake)
4342
4443 # The directory where akonadi-xml.xsd and kcfg2dbus.xsl are installed
@@ -47,3 +46,6 @@ Index: akonadi-19.08.0/KF5AkonadiConfig.cmake.in
4746
4847 ####################################################################################
4948 # CMAKE_AUTOMOC
49+--
50+2.25.4
51+
pkgs/applications/kde/akonadi/akonadi-timestamps.patchdeleted−14
@@ -1,14 +0,0 @@
1−Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
2−===================================================================
3−--- akonadi-19.08.0.orig/src/server/storage/dbconfigmysql.cpp
4−+++ akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
5−@@ -235,8 +235,7 @@ bool DbConfigMysql::startInternalServer(
6− bool confUpdate = false;
7− QFile actualFile(actualConfig);
8− // update conf only if either global (or local) is newer than actual
9−- if ((QFileInfo(globalConfig).lastModified() > QFileInfo(actualFile).lastModified()) ||
10−- (QFileInfo(localConfig).lastModified() > QFileInfo(actualFile).lastModified())) {
11−+ if (true) {
12− QFile globalFile(globalConfig);
13− QFile localFile(localConfig);
14− if (globalFile.open(QFile::ReadOnly) && actualFile.open(QFile::WriteOnly)) {
pkgs/applications/kde/akonadi/default.nix+5−1
@@ -11,7 +11,11 @@ mkDerivation {
1111 license = [ lib.licenses.lgpl21 ];
1212 maintainers = kdepimTeam;
1313 };
14− patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
14+ patches = [
15+ ./0001-akonadi-paths.patch
16+ ./0002-akonadi-timestamps.patch
17+ ./0003-akonadi-revert-make-relocatable.patch
18+ ];
1519 nativeBuildInputs = [ extra-cmake-modules shared-mime-info ];
1620 buildInputs = [
1721 kcompletion kconfigwidgets kcrash kdbusaddons kdesignerplugin ki18n
pkgs/applications/kde/akonadi/seriesdeleted−3
@@ -1,3 +0,0 @@
1−akonadi-paths.patch
2−akonadi-timestamps.patch
3−0001-Revert-Make-Akonadi-installation-properly-relocatabl.patch