mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 03:05:48 +03:00
With MALIIT_FORCE_DBUS_CONNECTION=1 maliit-server is opening a dbus server, which seems to have changed behavior with recent dbus versions. Pick a patch from upstream to fix this.
42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
From 3fef6c2069e890c39c296a31bbf3faf2ecbd67e8 Mon Sep 17 00:00:00 2001
|
|
From: Rodney Dawes <dobey.pwns@gmail.com>
|
|
Date: Wed, 12 Oct 2022 13:13:56 -0400
|
|
Subject: [PATCH] connection: Move dbus socket to well known path in
|
|
XDG_RUNTIME_DIR
|
|
|
|
As dbus has now changed to make tmpdir behave the same as dir, socket
|
|
creation fails when the directory does not exist, and it is no longer
|
|
automatically removed upon exit. Instead, switch to a well known name
|
|
under XDG_RUNTIME_DIR, as only one instance of the dbus service can
|
|
exist at a time, per user.
|
|
---
|
|
connection/serverdbusaddress.cpp | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/connection/serverdbusaddress.cpp b/connection/serverdbusaddress.cpp
|
|
index 67fe0a2..19f46d4 100644
|
|
--- a/connection/serverdbusaddress.cpp
|
|
+++ b/connection/serverdbusaddress.cpp
|
|
@@ -15,8 +15,8 @@
|
|
|
|
#include <QDebug>
|
|
#include <QDBusConnection>
|
|
-
|
|
#include <QDBusServer>
|
|
+#include <QStandardPaths>
|
|
|
|
#include <cstdlib>
|
|
|
|
@@ -61,7 +61,8 @@ DynamicAddress::DynamicAddress()
|
|
|
|
QDBusServer* DynamicAddress::connect()
|
|
{
|
|
- QLatin1String dbusAddress("unix:tmpdir=/tmp/maliit-server");
|
|
+ auto runtimeDir = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
|
|
+ auto dbusAddress = QLatin1String("unix:path=%1/maliit-server").arg(runtimeDir);
|
|
|
|
QDBusServer *server = new QDBusServer(dbusAddress);
|
|
|
|
--
|
|
2.39.0
|
|
|