forked from mirrors/nixpkgs
akonadi: update patches
This commit is contained in:
parent
2855e9b77f
commit
403e5188a6
|
@ -1,27 +1,42 @@
|
|||
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);
|
||||
From 90969b9b36400d47b1afe761fb8468c1acb8a04a Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Tuegel <ttuegel@mailbox.org>
|
||||
Date: Mon, 13 Jul 2020 11:41:19 -0500
|
||||
Subject: [PATCH 1/3] akonadi paths
|
||||
|
||||
---
|
||||
src/akonadicontrol/agentmanager.cpp | 4 ++--
|
||||
src/akonadicontrol/agentprocessinstance.cpp | 2 +-
|
||||
src/server/storage/dbconfigmysql.cpp | 26 ++++-----------------
|
||||
src/server/storage/dbconfigpostgresql.cpp | 19 +++------------
|
||||
4 files changed, 11 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/src/akonadicontrol/agentmanager.cpp b/src/akonadicontrol/agentmanager.cpp
|
||||
index 23b4a1f..c13b658 100644
|
||||
--- a/src/akonadicontrol/agentmanager.cpp
|
||||
+++ b/src/akonadicontrol/agentmanager.cpp
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
[]() {
|
||||
QCoreApplication::instance()->exit(255);
|
||||
});
|
||||
- start(QStringLiteral("akonadiserver"), args, RestartOnCrash);
|
||||
+ start(QLatin1String(NIX_OUT "/bin/akonadiserver"), args, 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
|
||||
~StorageProcessControl() override
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
[]() {
|
||||
qCCritical(AKONADICONTROL_LOG) << "Failed to start AgentServer!";
|
||||
});
|
||||
- start(QStringLiteral("akonadi_agent_server"), args, RestartOnCrash);
|
||||
+ start(QLatin1String(NIX_OUT "/bin/akonadi_agent_server"), args, RestartOnCrash);
|
||||
}
|
||||
|
||||
~AgentServerProcessControl() override
|
||||
diff --git a/src/akonadicontrol/agentprocessinstance.cpp b/src/akonadicontrol/agentprocessinstance.cpp
|
||||
index 4e58f7e..e8bb532 100644
|
||||
--- a/src/akonadicontrol/agentprocessinstance.cpp
|
||||
+++ b/src/akonadicontrol/agentprocessinstance.cpp
|
||||
@@ -62,7 +62,7 @@ bool AgentProcessInstance::start(const AgentType &agentInfo)
|
||||
} else {
|
||||
Q_ASSERT(agentInfo.launchMethod == AgentType::Launcher);
|
||||
const QStringList arguments = QStringList() << executable << identifier();
|
||||
|
@ -30,11 +45,11 @@ Index: akonadi-19.08.0/src/akonadicontrol/agentprocessinstance.cpp
|
|||
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
|
||||
@@ -83,7 +83,6 @@ bool DbConfigMysql::init(QSettings &sett
|
||||
diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
|
||||
index cac40f5..527649b 100644
|
||||
--- a/src/server/storage/dbconfigmysql.cpp
|
||||
+++ b/src/server/storage/dbconfigmysql.cpp
|
||||
@@ -83,7 +83,6 @@ bool DbConfigMysql::init(QSettings &settings)
|
||||
// determine default settings depending on the driver
|
||||
QString defaultHostName;
|
||||
QString defaultOptions;
|
||||
|
@ -42,7 +57,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
|
|||
QString defaultCleanShutdownCommand;
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
@@ -92,16 +91,7 @@ bool DbConfigMysql::init(QSettings &sett
|
||||
@@ -92,16 +91,7 @@ bool DbConfigMysql::init(QSettings &settings)
|
||||
#endif
|
||||
|
||||
const bool defaultInternalServer = true;
|
||||
|
@ -60,7 +75,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
|
|||
if (!mysqladminPath.isEmpty()) {
|
||||
#ifndef Q_OS_WIN
|
||||
defaultCleanShutdownCommand = QStringLiteral("%1 --defaults-file=%2/mysql.conf --socket=%3/%4 shutdown")
|
||||
@@ -111,10 +101,10 @@ bool DbConfigMysql::init(QSettings &sett
|
||||
@@ -111,10 +101,10 @@ bool DbConfigMysql::init(QSettings &settings)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -73,7 +88,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
|
|||
qCDebug(AKONADISERVER_LOG) << "Found mysqlcheck: " << mMysqlCheckPath;
|
||||
|
||||
mInternalServer = settings.value(QStringLiteral("QMYSQL/StartServer"), defaultInternalServer).toBool();
|
||||
@@ -131,7 +121,7 @@ bool DbConfigMysql::init(QSettings &sett
|
||||
@@ -131,7 +121,7 @@ bool DbConfigMysql::init(QSettings &settings)
|
||||
mUserName = settings.value(QStringLiteral("User")).toString();
|
||||
mPassword = settings.value(QStringLiteral("Password")).toString();
|
||||
mConnectionOptions = settings.value(QStringLiteral("Options"), defaultOptions).toString();
|
||||
|
@ -82,7 +97,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
|
|||
mCleanServerShutdownCommand = settings.value(QStringLiteral("CleanServerShutdownCommand"), defaultCleanShutdownCommand).toString();
|
||||
settings.endGroup();
|
||||
|
||||
@@ -141,9 +131,6 @@ bool DbConfigMysql::init(QSettings &sett
|
||||
@@ -141,9 +131,6 @@ bool DbConfigMysql::init(QSettings &settings)
|
||||
// intentionally not namespaced as we are the only one in this db instance when using internal mode
|
||||
mDatabaseName = QStringLiteral("akonadi");
|
||||
}
|
||||
|
@ -92,7 +107,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
|
|||
|
||||
qCDebug(AKONADISERVER_LOG) << "Using mysqld:" << mMysqldPath;
|
||||
|
||||
@@ -152,9 +139,6 @@ bool DbConfigMysql::init(QSettings &sett
|
||||
@@ -152,9 +139,6 @@ bool DbConfigMysql::init(QSettings &settings)
|
||||
settings.setValue(QStringLiteral("Name"), mDatabaseName);
|
||||
settings.setValue(QStringLiteral("Host"), mHostName);
|
||||
settings.setValue(QStringLiteral("Options"), mConnectionOptions);
|
||||
|
@ -102,7 +117,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
|
|||
settings.setValue(QStringLiteral("StartServer"), mInternalServer);
|
||||
settings.endGroup();
|
||||
settings.sync();
|
||||
@@ -209,7 +193,7 @@ bool DbConfigMysql::startInternalServer(
|
||||
@@ -209,7 +193,7 @@ bool DbConfigMysql::startInternalServer()
|
||||
#endif
|
||||
|
||||
// generate config file
|
||||
|
@ -111,11 +126,11 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigmysql.cpp
|
|||
const QString localConfig = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-local.conf"));
|
||||
const QString actualConfig = StandardDirs::saveDir("data") + QLatin1String("/mysql.conf");
|
||||
if (globalConfig.isEmpty()) {
|
||||
Index: akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
|
||||
===================================================================
|
||||
--- akonadi-19.08.0.orig/src/server/storage/dbconfigpostgresql.cpp
|
||||
+++ akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
|
||||
@@ -140,9 +140,7 @@ bool DbConfigPostgresql::init(QSettings
|
||||
diff --git a/src/server/storage/dbconfigpostgresql.cpp b/src/server/storage/dbconfigpostgresql.cpp
|
||||
index 09cdbd5..1c8996b 100644
|
||||
--- a/src/server/storage/dbconfigpostgresql.cpp
|
||||
+++ b/src/server/storage/dbconfigpostgresql.cpp
|
||||
@@ -141,9 +141,7 @@ bool DbConfigPostgresql::init(QSettings &settings)
|
||||
// determine default settings depending on the driver
|
||||
QString defaultHostName;
|
||||
QString defaultOptions;
|
||||
|
@ -125,7 +140,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
|
|||
QString defaultPgData;
|
||||
|
||||
#ifndef Q_WS_WIN // We assume that PostgreSQL is running as service on Windows
|
||||
@@ -153,12 +151,8 @@ bool DbConfigPostgresql::init(QSettings
|
||||
@@ -154,12 +152,8 @@ bool DbConfigPostgresql::init(QSettings &settings)
|
||||
|
||||
mInternalServer = settings.value(QStringLiteral("QPSQL/StartServer"), defaultInternalServer).toBool();
|
||||
if (mInternalServer) {
|
||||
|
@ -139,7 +154,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
|
|||
defaultPgData = StandardDirs::saveDir("data", QStringLiteral("db_data"));
|
||||
}
|
||||
|
||||
@@ -177,20 +171,14 @@ bool DbConfigPostgresql::init(QSettings
|
||||
@@ -178,20 +172,14 @@ bool DbConfigPostgresql::init(QSettings &settings)
|
||||
mUserName = settings.value(QStringLiteral("User")).toString();
|
||||
mPassword = settings.value(QStringLiteral("Password")).toString();
|
||||
mConnectionOptions = settings.value(QStringLiteral("Options"), defaultOptions).toString();
|
||||
|
@ -162,7 +177,7 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
|
|||
qCDebug(AKONADISERVER_LOG) << "Found pg_upgrade:" << mPgUpgradePath;
|
||||
mPgData = settings.value(QStringLiteral("PgData"), defaultPgData).toString();
|
||||
if (mPgData.isEmpty()) {
|
||||
@@ -206,7 +194,6 @@ bool DbConfigPostgresql::init(QSettings
|
||||
@@ -207,7 +195,6 @@ bool DbConfigPostgresql::init(QSettings &settings)
|
||||
settings.setValue(QStringLiteral("Port"), mHostPort);
|
||||
}
|
||||
settings.setValue(QStringLiteral("Options"), mConnectionOptions);
|
||||
|
@ -170,3 +185,6 @@ Index: akonadi-19.08.0/src/server/storage/dbconfigpostgresql.cpp
|
|||
settings.setValue(QStringLiteral("InitDbPath"), mInitDbPath);
|
||||
settings.setValue(QStringLiteral("StartServer"), mInternalServer);
|
||||
settings.endGroup();
|
||||
--
|
||||
2.25.4
|
||||
|
26
pkgs/applications/kde/akonadi/0002-akonadi-timestamps.patch
Normal file
26
pkgs/applications/kde/akonadi/0002-akonadi-timestamps.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
From b8c6a2a017321649db8fec553a644b8da2300514 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Tuegel <ttuegel@mailbox.org>
|
||||
Date: Mon, 13 Jul 2020 11:41:35 -0500
|
||||
Subject: [PATCH 2/3] akonadi timestamps
|
||||
|
||||
---
|
||||
src/server/storage/dbconfigmysql.cpp | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
|
||||
index 527649b..08c3dd4 100644
|
||||
--- a/src/server/storage/dbconfigmysql.cpp
|
||||
+++ b/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.25.4
|
||||
|
|
@ -1,19 +1,18 @@
|
|||
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"
|
||||
From 7afe018382cf68b477b35f87b666424d62d19ef4 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Tuegel <ttuegel@mailbox.org>
|
||||
Date: Mon, 13 Jul 2020 11:41:55 -0500
|
||||
Subject: [PATCH 3/3] akonadi revert make 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(
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index d927471..83a74c0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -330,9 +330,6 @@ configure_package_config_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/KF5AkonadiConfig.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/KF5AkonadiConfig.cmake"
|
||||
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
|
||||
|
@ -23,11 +22,11 @@ Index: akonadi-19.08.0/CMakeLists.txt
|
|||
)
|
||||
|
||||
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)
|
||||
diff --git a/KF5AkonadiConfig.cmake.in b/KF5AkonadiConfig.cmake.in
|
||||
index 421e1df..e3abf27 100644
|
||||
--- a/KF5AkonadiConfig.cmake.in
|
||||
+++ b/KF5AkonadiConfig.cmake.in
|
||||
@@ -24,8 +24,8 @@ if(BUILD_TESTING)
|
||||
find_dependency(Qt5Test "@QT_REQUIRED_VERSION@")
|
||||
endif()
|
||||
|
||||
|
@ -38,7 +37,7 @@ Index: akonadi-19.08.0/KF5AkonadiConfig.cmake.in
|
|||
|
||||
find_dependency(Boost "@Boost_MINIMUM_VERSION@")
|
||||
|
||||
@@ -35,7 +35,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/KF5Ako
|
||||
@@ -33,7 +33,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/KF5AkonadiTargets.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/KF5AkonadiMacros.cmake)
|
||||
|
||||
# The directory where akonadi-xml.xsd and kcfg2dbus.xsl are installed
|
||||
|
@ -47,3 +46,6 @@ Index: akonadi-19.08.0/KF5AkonadiConfig.cmake.in
|
|||
|
||||
####################################################################################
|
||||
# CMAKE_AUTOMOC
|
||||
--
|
||||
2.25.4
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
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)) {
|
|
@ -11,7 +11,11 @@ mkDerivation {
|
|||
license = [ lib.licenses.lgpl21 ];
|
||||
maintainers = kdepimTeam;
|
||||
};
|
||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||
patches = [
|
||||
./0001-akonadi-paths.patch
|
||||
./0002-akonadi-timestamps.patch
|
||||
./0003-akonadi-revert-make-relocatable.patch
|
||||
];
|
||||
nativeBuildInputs = [ extra-cmake-modules shared-mime-info ];
|
||||
buildInputs = [
|
||||
kcompletion kconfigwidgets kcrash kdbusaddons kdesignerplugin ki18n
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
akonadi-paths.patch
|
||||
akonadi-timestamps.patch
|
||||
0001-Revert-Make-Akonadi-installation-properly-relocatabl.patch
|
Loading…
Reference in a new issue