|
|
|
|
@@ -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
|
|
|
|
|
|