#1112235 gpsd: Depends on deprecated dbus-glib

#1112235#5
Date:
2025-08-27 16:37:44 UTC
From:
To:
This package appears to build-depend on dbus-glib (libdbus-glib-1-dev)
even though the dependency was removed in the past (#955846). It's used
in contrib/gpsd-dbus.c. Did the dependency come back?

dbus-glib is a long-deprecated D-Bus library with some significant
design flaws, and is essentially unmaintained. I would like to minimize
its use, and eventually remove it from Debian. There will not be a
version that fixes its design flaws, because that would be a major
compatibility break, and any user of dbus-glib who is willing to port
their application to a newer, incompatible version should instead be
porting their application to a better D-Bus implementation such as
GDBus.

For most purposes, the recommended replacement for dbus-glib is the
GDBus family of APIs in GLib, found in <gio/gio.h>. This does not add an
additional dependency, because dbus-glib already depends on a
sufficiently new version of GLib. A porting guide is available in the
GLib documentation: <https://docs.gtk.org/gio/migrating-gdbus.html>.
Practical examples of porting from dbus-glib to GDBus can be found in
the git history of most older GNOME applications.

Alternatives to GDBus, with different design emphasis and trade-offs,
include sd-bus (systemd's D-Bus implementation), QtDBus (Qt's D-Bus
API), and libdbus (the low-level reference D-Bus implementation).

It looks as though contrib/gpsd-dbus.c is 90% libdbus, and could easily
be converted to pure libdbus by calling
dbus_connection_read_write_dispatch() in a loop, instead of using the
GLib main loop. That would have the side benefit of it no longer needing
GLib at all.

    smcv

#1112235#12
Date:
2026-04-24 10:36:29 UTC
From:
To:
Control: severity -1 important

I'm raising the bug reports for remaining uses of dbus-glib to important
severity. It's now been 11 years since dbus-glib was documented as
deprecated in its own NEWS file, and it hasn't got any better-quality or
more-maintained since then.

It might be useful to note that since the initial MBF in 2018, the
migration guide from dbus-glib to GDBus has moved to
<https://docs.gtk.org/gio/migrating-gdbus.html>.

     smcv