#1117059 emacs: Please don't build-depend on dbus-x11 or rely on dbus-launch

#1117059#5
Date:
2025-10-02 22:48:25 UTC
From:
To:
emacs Build-Depends on dbus-x11, presumably because
test/lisp/net/dbus-tests.el explicitly invokes dbus-launch.

dbus-launch is poorly-understood legacy code and is best avoided. If
this test-case wants to start a temporary dbus-daemon, connect to it, do
some testing and then terminate it, it is better to invoke dbus-daemon
directly (which only requires the dbus-daemon package), using its
--fork, --print-address and --print-pid options: for example, search for 
dbus-daemon in
https://salsa.debian.org/debian/flatpak/-/blob/debian/trixie/tests/libtest.sh
for an example of doing this in a shell script.

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

Thanks,
    smcv

#1117059#10
Date:
2025-10-05 17:13:14 UTC
From:
To:
Hello,

Thank you for this.  I'm CCing Michael who wrote that code, and
emacs-devel in lieu of filing a report about this upstream, yet.

Michael, do you have any time to replace dbus-launch in dbus-tests.el
with starting a temporary dbus-daemon in the way Simon describes?

(Simon is Debian's dbus expert.)

Thanks.

#1117059#15
Date:
2025-10-06 16:14:41 UTC
From:
To:
Sean Whitton <spwhitton@spwhitton.name> writes:

Hi Sean, Simon,

I've fixed this in dbus-tests.el, pushed to Emacs' git master (commit
1df9cfdb135).

Best regards, Michael.

#1117059#20
Date:
2025-10-06 16:47:47 UTC
From:
To:
Hello,

Thanks!

Simon, is this blocking you, or can it wait until Emacs 31 hits sid?

#1117059#25
Date:
2025-10-06 18:29:40 UTC
From:
To:
(Cc trimmed, emacs upstream presumably don't care so much about this)

This is not blocking me, I am unlikely to be able to remove dbus-x11 any
time soon (perhaps not ever). All I can do is to try to minimize its
use.

     smcv