diff --git a/rpm/0031-Store-socket-in-RuntimeLocation.patch b/rpm/0031-Store-socket-in-RuntimeLocation.patch new file mode 100644 index 0000000..a358b6e --- /dev/null +++ b/rpm/0031-Store-socket-in-RuntimeLocation.patch @@ -0,0 +1,69 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tomi=20Lepp=C3=A4nen?= +Date: Mon, 12 Apr 2021 17:09:15 +0300 +Subject: [PATCH] Store socket in RuntimeLocation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Tomi Leppänen +--- + src/libraries/qmfclient/support/qcopchannel.cpp | 5 +++-- + src/libraries/qmfclient/support/qcopserver.cpp | 4 +++- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/src/libraries/qmfclient/support/qcopchannel.cpp b/src/libraries/qmfclient/support/qcopchannel.cpp +index 2e1d67af..e921e070 100644 +--- a/src/libraries/qmfclient/support/qcopchannel.cpp ++++ b/src/libraries/qmfclient/support/qcopchannel.cpp +@@ -48,6 +48,7 @@ + #include "qcoreevent.h" + #include "qmetaobject.h" + #include "qmaillog.h" ++#include "qstandardpaths.h" + + QCopServerRegexp::QCopServerRegexp(const QString& ch, QCopClient *cl) + : channel(ch), client(cl) +@@ -1095,8 +1096,8 @@ void QCopClient::disconnectFromServer() + + QString QCopThreadData::socketPath() + { +- //return (Qtopia::inline tempDir() + "qcop-server").toUtf8(); +- return QString::fromLatin1("qcop-server-0"); ++ return QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation) ++ + QStringLiteral("/messageserver/qcop-server-0"); + } + + #else +diff --git a/src/libraries/qmfclient/support/qcopserver.cpp b/src/libraries/qmfclient/support/qcopserver.cpp +index 39def5aa..1b212e24 100644 +--- a/src/libraries/qmfclient/support/qcopserver.cpp ++++ b/src/libraries/qmfclient/support/qcopserver.cpp +@@ -37,6 +37,7 @@ + #include "qcopchannelmonitor_p.h" + #include + #include ++#include + + QCopServerPrivate::QCopServerPrivate() + : QCopLocalServer() +@@ -44,6 +45,7 @@ QCopServerPrivate::QCopServerPrivate() + bool ok; + #ifndef QT_NO_QCOP_LOCAL_SOCKET + QString path = QCopThreadData::socketPath(); ++ QFileInfo(path).dir().mkpath("."); + ok = listen(path); + #ifdef Q_OS_UNIX + if (!ok) { +@@ -56,7 +58,7 @@ QCopServerPrivate::QCopServerPrivate() + socket->connectToServer(path); + if (!socket->waitForConnected()) { + delete socket; +- QFile::remove(QDir::tempPath() + QChar::fromLatin1('/') + path); ++ QFile::remove(path); + ok = listen(path); + } else { + delete socket; +-- +2.30.2 + diff --git a/rpm/qmf-qt5.spec b/rpm/qmf-qt5.spec index 9868a6f..44de66b 100644 --- a/rpm/qmf-qt5.spec +++ b/rpm/qmf-qt5.spec @@ -59,6 +59,7 @@ Patch27: 0027-Allow-a-service-provided-folder-to-be-set-as-the-sta.patch Patch28: 0028-Add-QMailMessage-CalendarCancellation-flag.patch Patch29: 0029-Use-a-queued-connection-to-handle-accountsUpdated-si.patch Patch30: 0030-Support-as-specifier-for-log-file-paths.patch +Patch31: 0031-Store-socket-in-RuntimeLocation.patch %description The Qt Messaging Framework, QMF, consists of a C++ library and daemon server