mbox series

[0/2] Support using alternative runtime D-Bus implementation

Message ID 20250317110519.1562513-1-niko.mauno@vaisala.com
Headers show
Series Support using alternative runtime D-Bus implementation | expand

Message

Niko Mauno March 17, 2025, 11:05 a.m. UTC
For example the Fedora distribution uses dbus-broker instead of
Freedesktop.org's D-Bus implementation. The following excerpts from
https://fedoraproject.org/wiki/Changes/DbusBrokerAsTheDefaultDbusImplementation
provide background for their technological decision

  This change provides a more scalable and more reliable implementation in place of the reference implementation.
  The reference implementation suffers from long-standing issues including potential dead-locks and susceptibility to denial of service attacks, which the replacement implementation does not.

and

  No visible changes in behavior are expected, except for different log messages.
  Any visibly different behavior to `dbus-daemon` should be reported as a regression.
  Ideally, this change should only improve the performance and security of the message bus.

In the following patches two new global variables, namely
VIRTUAL-RUNTIME_dbus and PREFERRED_RPROVIDER_dbus-x11 are introduced in
order to allow Yocto users to use an alternative runtime D-Bus
implementation such as dbus-broker, a recipe for which is currently
available under meta-openembedded/meta-oe/recipes-core/dbus/

This change aims to preserve the prevalent functionality, while
allowing the user to optionally select an alternative runtime D-Bus
implementation by adding the following line e.g. to local.conf file:

  VIRTUAL-RUNTIME_dbus = "dbus-broker"

Overriding the aforementioned variable will also adjust the default
value of PREFERRED_RPROVIDER_dbus-x11 variable which is used to
determine the runtime dbus-x11 provider (the value shouldn't need to
be directly modified by user).

Should these changes be considered acceptable by poky maintainers I
will then intend to propose corresponding alignments also in the
meta-openembedded recipes, which includes also adding the following
two lines to the dbus-broker recipe:

  RPROVIDES:${PN} = "dbus-x11"
  RREPLACES:${PN} += "dbus-x11"

Niko Mauno (2):
  Add VIRTUAL-RUNTIME_dbus variable
  Add PREFERRED_RPROVIDER_dbus-x11 variable

 meta/conf/distro/include/default-providers.inc      |  2 ++
 meta/recipes-connectivity/bluez5/bluez5.inc         |  2 +-
 meta/recipes-connectivity/connman/connman.inc       |  2 +-
 meta/recipes-connectivity/neard/neard_0.19.bb       |  2 +-
 meta/recipes-connectivity/ofono/ofono_2.14.bb       |  2 +-
 meta/recipes-core/dbus/dbus-glib_0.112.bb           |  3 ++-
 meta/recipes-core/dbus/dbus_1.16.2.bb               | 13 +++++++------
 meta/recipes-core/glib-2.0/glib.inc                 |  2 +-
 meta/recipes-core/systemd/systemd_257.3.bb          |  2 +-
 .../packagegroups/packagegroup-core-x11.bb          |  2 +-
 10 files changed, 18 insertions(+), 14 deletions(-)