GNOME Bugzilla – Bug 771745
Please use dbus-run-session to run dbus related tests
Last modified: 2016-11-22 20:02:11 UTC
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835883 As described in <https://lists.debian.org/debian-devel/2016/08/msg00554.html> the dbus maintainer is trying to reduce how much dbus-launch is used in Debian. This package currently uses dbus-launch in a test script. This Flatpak commit illustrates how eval `dbus-launch` can be replaced by invoking dbus-daemon directly, avoiding the X11-specific dbus-launch: https://github.com/flatpak/flatpak/commit/6cc8062cfb3f9410d54a27e7ccca77c103e441e8 Alternatively, if run-with-dbus --system (a fake system bus) is not actively used, it can be replaced with something like this: dbus-run-session -- some-test
Created attachment 339990 [details] [review] build: Use dbus-run-session DBus 1.8 gained a utility called dbus-run-session, that will run another program inside a new session bus and then shut down the session bus afterwards. This can replace the hand-rolled run-with-dbus script. Even though we started a fake system bus with run-with-dbus, I don't believe it was used. We also generated extra configuration files with which to start the buses, but I don't believe those were necessary either.
I'm pretty sure this will work (I tested it on my Mac which doesn't have a system bus) but it's probably a good idea to test it on a headless environment as well.
Review of attachment 339990 [details] [review]: Nice, looks good to me.
Created attachment 340099 [details] [review] build: Use dbus-run-session DBus 1.8 gained a utility called dbus-run-session, that will run another program inside a new session bus and then shut down the session bus afterwards. This can replace the hand-rolled run-with-dbus script. Even though we started a fake system bus with run-with-dbus, I don't believe it was used. We also generated extra configuration files with which to start the buses, but I don't believe those were necessary either.
I haven't been able to test it yet on a headless environment (can Continuous do this?) but I did discover a bug when I ran it configured --with-xvfb-tests; the bus configuration needed <standard_service_dirs/>.
Review of attachment 340099 [details] [review]: Looks good.
Attachment 340099 [details] pushed as 458100a - build: Use dbus-run-session