Replacing a direct dependency on the dbus package
=================================================

The dbus package in Debian 12 (bookworm) was broken up into several smaller
packages, so that people who want to use a non-reference implementation
of the D-Bus message buses (like dbus-broker) can do so. Various packages
should ideally change their dependencies.

Mass bug filing originally proposed in 2022:
https://lists.debian.org/debian-devel/2022/11/msg00114.html

Usertag for mass bug filing:
https://udd.debian.org/cgi-bin/bts-usertags.cgi?user=dbus@packages.debian.org&tag=direct-dbus-dependency

Context
=======

dbus is the portable reference implementation of the D-Bus protocol. One
of its major components is dbus-daemon, which is the reference
implementation of a D-Bus message bus service (corresponding to the role
of a "broker" in many other IPC protocols). dbus-daemon is currently the
default and recommended D-Bus message bus implementation in Debian.

dbus-broker is a Linux-specific reimplementation of a D-Bus message bus
service. Some non-Debian distributions have switched from dbus-daemon to
dbus-broker as their message bus. I'm not aware of any plans to make that
switch in Debian, but it should be possible for sysadmins and derivatives
to make that switch if they want to.

Common scenarios
================

If your package depends on having a working D-Bus system message bus
({/var,}/run/dbus/system_bus_socket), please replace a dependency on "dbus"
with "default-dbus-system-bus | dbus-system-bus". Typical examples:
accountsservice, bluez.

If your package depends on having a working D-Bus *session* message
bus, then "dbus" was already not an appropriate dependency. Please use
"default-dbus-session-bus | dbus-session-bus". Typical example: ario.

If your package depends on having the dbus-daemon or dbus-run-session
executables in the PATH in order to start a temporary or custom session
bus, please depend on "dbus-daemon". Typical example: debian/tests/control
in many packages.

If your package depends on having a machine ID in either /etc/machine-id
or /var/lib/dbus/machine-id, but does not depend on the system bus, then
please depend on "dbus-daemon | systemd". It is not necessary to add this
dependency if there is a "default-dbus-system-bus | dbus-system-bus"
dependency, which you can safely assume will also ensure that there is a
machine ID.

If your package depends on /var/lib/dbus/machine-id specifically, please
make it try /etc/machine-id too, or if that isn't possible, depend on
"dbus-daemon" specifically.

If your package depends on having the dbus-cleanup-sockets, dbus-monitor,
dbus-send, dbus-update-activation-environment or dbus-uuidgen executables
in PATH, please depend on "dbus-bin".
