Source: phosh
Version: 0.41.0-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: dbus-launch dbus-launch-for-tests

phosh relies on dbus-launch (dbus-x11) to run its test suite, but it
doesn't need to: dbus-run-session (dbus-daemon) is sufficient. Please
consider the attached patch.

See also <https://lists.debian.org/debian-devel/2016/08/msg00554.html>,
a mass bug filing in 2016 (at which point I think phosh didn't yet exist).

The (superficial) autopkgtest still passes with the attached patch (tested
in qemu, lxc, podman).

Thanks,
    smcv
>From 06680f959989077edabd9e2487cf35a01caf28ed Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Sat, 24 Aug 2024 14:23:57 +0100
Subject: [PATCH] d/control, d/rules: Use dbus-run-session to run tests

Instead of relying on X11 autolaunching, explicitly start a session
bus for the unit tests. This avoids a dependency on dbus-x11.

Closes: #-1
---
 debian/control | 2 +-
 debian/rules   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index b4998260..58258ea7 100644
--- a/debian/control
+++ b/debian/control
@@ -36,7 +36,7 @@ Build-Depends:
 # to run the tests
  at-spi2-core <!nocheck>,
  desktop-file-utils <!nocheck>,
- dbus-x11 <!nocheck>,
+ dbus-daemon <!nocheck>,
  gnome-settings-daemon-common <!nocheck>,
  gnome-shell-common <!nocheck>,
  gnome-themes-extra-data <!nocheck>,
diff --git a/debian/rules b/debian/rules
index d5dfa8d3..2bd4996f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -36,4 +36,4 @@ override_dh_installsystemd:
 	dh_installsystemd --no-start --no-enable --no-restart-on-upgrade --no-restart-after-upgrade
 
 override_dh_auto_test:
-	LC_ALL=C.UTF-8 xvfb-run -a dh_auto_test -- --no-suite manual
+	LC_ALL=C.UTF-8 xvfb-run -a dbus-run-session -- dh_auto_test -- --no-suite manual
-- 
2.45.2

Reply via email to