After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771745 - Please use dbus-run-session to run dbus related tests
Please use dbus-run-session to run dbus related tests
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
1.46.x
Other Linux
: Normal normal
: ---
Assigned To: Philip Chimento
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2016-09-20 21:54 UTC by Michael Biebl
Modified: 2016-11-22 20:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Use dbus-run-session (9.95 KB, patch)
2016-11-16 05:11 UTC, Philip Chimento
none Details | Review
build: Use dbus-run-session (10.55 KB, patch)
2016-11-17 02:33 UTC, Philip Chimento
committed Details | Review

Description Michael Biebl 2016-09-20 21:54:15 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
Comment 1 Philip Chimento 2016-11-16 05:11:38 UTC
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.
Comment 2 Philip Chimento 2016-11-16 05:13:00 UTC
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.
Comment 3 Cosimo Cecchi 2016-11-16 18:00:23 UTC
Review of attachment 339990 [details] [review]:

Nice, looks good to me.
Comment 4 Philip Chimento 2016-11-17 02:33:54 UTC
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.
Comment 5 Philip Chimento 2016-11-17 02:35:00 UTC
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/>.
Comment 6 Cosimo Cecchi 2016-11-19 18:10:36 UTC
Review of attachment 340099 [details] [review]:

Looks good.
Comment 7 Philip Chimento 2016-11-22 20:02:08 UTC
Attachment 340099 [details] pushed as 458100a - build: Use dbus-run-session