On Wed, Oct 07, 2020 at 09:11:53AM +0200, Michael Olbrich wrote:
> On Tue, Sep 22, 2020 at 11:20:15AM +0200, Clemens Gruber wrote:
> > dbus-broker is a high-performance D-Bus message broker which serves as
> > a drop-in replacement for the dbus-daemon. The original dbus is
> > installed as a dependency (due to required files).
> > 
> > If dbus-broker is enabled, it is used as the system bus.
> > 
> > At runtime, a Linux Kernel >= 4.14 is required (theoretically >= 4.10
> > works too, but lacks security-related AF_UNIX patches according to
> > dbus-broker docs)
> 
> I've done some experimentation with this myself in the past. The last time
> I tried this, I still needed the /usr/share/dbus-1/system.conf from the
> regular package. That made installing only dbus-broker somewhat awkward.
> 
> Is that still necessary?

Yes it is, and on https://github.com/bus1/dbus-broker/wiki they write:
"You still need the dbus reference implementation installed, since it
provides tools used by many applications, as well as the dbus.socket
unit file."

>From PTXdist point of view, dbus could be a dependency for dbus-broker,
and "overriding" dbus.service in /etc/systemd/system seemed like a good
choice. Do you think this could lead to problems?

Until they ship all files they need with dbus-broker, I am not sure
there is a better way.

Clemens

> 
> Michael
> 
> > Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com>
> > ---
> >  rules/dbus-broker.in   | 19 +++++++++++
> >  rules/dbus-broker.make | 75 ++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 94 insertions(+)
> >  create mode 100644 rules/dbus-broker.in
> >  create mode 100644 rules/dbus-broker.make
> > 
> > diff --git a/rules/dbus-broker.in b/rules/dbus-broker.in
> > new file mode 100644
> > index 000000000..9ae261284
> > --- /dev/null
> > +++ b/rules/dbus-broker.in
> > @@ -0,0 +1,19 @@
> > +## SECTION=middleware
> > +
> > +menuconfig DBUS_BROKER
> > +   tristate
> > +   prompt "dbus-broker                   "
> > +   select HOST_MESON
> > +   select DBUS
> > +   select EXPAT
> > +   select LIBC_M
> > +   select LIBC_PTHREAD
> > +   select SYSTEMD
> > +   help
> > +     The dbus-broker project is an implementation of a message bus as
> > +     defined by the D-Bus specification. Its aim is to provide high
> > +     performance and reliability, while keeping compatibility to the
> > +     D-Bus reference implementation.
> > +     This package is designed to be a drop-in replacement for dbus
> > +     (as the system bus), but the dbus package still has to be
> > +     installed.
> > diff --git a/rules/dbus-broker.make b/rules/dbus-broker.make
> > new file mode 100644
> > index 000000000..7d32c5425
> > --- /dev/null
> > +++ b/rules/dbus-broker.make
> > @@ -0,0 +1,75 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) 2020 by Clemens Gruber <clemens.gru...@pqgruber.com>
> > +#
> > +# For further information about the PTXdist project and license conditions
> > +# see the README file.
> > +#
> > +
> > +#
> > +# We provide this package
> > +#
> > +PACKAGES-$(PTXCONF_DBUS_BROKER) += dbus-broker
> > +
> > +#
> > +# Paths and names
> > +#
> > +DBUS_BROKER_VERSION        := 24
> > +DBUS_BROKER_MD5            := b60f426bc92a4f6119e51a69aef301a2
> > +DBUS_BROKER                := dbus-broker-$(DBUS_BROKER_VERSION)
> > +DBUS_BROKER_SUFFIX := tar.xz
> > +DBUS_BROKER_URL            := 
> > https://github.com/bus1/dbus-broker/releases/download/v$(DBUS_BROKER_VERSION)/$(DBUS_BROKER).$(DBUS_BROKER_SUFFIX)
> > +DBUS_BROKER_SOURCE := $(SRCDIR)/$(DBUS_BROKER).$(DBUS_BROKER_SUFFIX)
> > +DBUS_BROKER_DIR            := $(BUILDDIR)/$(DBUS_BROKER)
> > +DBUS_BROKER_LICENSE        := Apache-2.0
> > +DBUS_BROKER_LICENSE_FILES := \
> > +   file://LICENSE;md5=7b486c2338d225a1405d979ed2c15ce8
> > +
> > +# 
> > ----------------------------------------------------------------------------
> > +# Prepare
> > +# 
> > ----------------------------------------------------------------------------
> > +
> > +DBUS_BROKER_CONF_TOOL      := meson
> > +DBUS_BROKER_CONF_OPT       := \
> > +   $(CROSS_MESON_USR) \
> > +   -Daudit=false \
> > +   -Ddocs=false \
> > +   -Dlauncher=true \
> > +   -Dlinux-4-17=false \
> > +   -Dreference-test=false \
> > +   -Dselinux=$(call ptx/truefalse,PTXCONF_GLOBAL_SELINUX)
> > +
> > +# dbus-broker requires a kernel and kernel headers >= 4.14
> > +ifdef PTXCONF_KERNEL_HEADER
> > +DBUS_BROKER_CPPFLAGS       := \
> > +   -isystem $(KERNEL_HEADERS_INCLUDE_DIR)
> > +endif
> > +
> > +# 
> > ----------------------------------------------------------------------------
> > +# Target-Install
> > +# 
> > ----------------------------------------------------------------------------
> > +
> > +$(STATEDIR)/dbus-broker.targetinstall:
> > +   @$(call targetinfo)
> > +
> > +   @$(call install_init, dbus-broker)
> > +   @$(call install_fixup, dbus-broker, PRIORITY, optional)
> > +   @$(call install_fixup, dbus-broker, SECTION, base)
> > +   @$(call install_fixup, dbus-broker, AUTHOR, "Clemens Gruber 
> > <clemens.gru...@pqgruber.com>")
> > +   @$(call install_fixup, dbus-broker, DESCRIPTION, \
> > +           "Linux D-Bus Message Broker")
> > +
> > +   @$(call install_copy, dbus-broker, 0, 0, 0755, -, /usr/bin/dbus-broker)
> > +   @$(call install_copy, dbus-broker, 0, 0, 0755, -, 
> > /usr/bin/dbus-broker-launch)
> > +   @$(call install_alternative, dbus-broker, 0, 0, 0644, \
> > +           /usr/lib/systemd/system/dbus-broker.service)
> > +
> > +   # Replace dbus reference implementation service with dbus-broker as 
> > system bus
> > +   $(call install_link, dbus-broker, 
> > /usr/lib/systemd/system/dbus-broker.service, \
> > +           /etc/systemd/system/dbus.service)
> > +
> > +   @$(call install_finish, dbus-broker)
> > +
> > +   @$(call touch)
> > +
> > +# vim: syntax=make
> > -- 
> > 2.28.0
> > 
> > 
> > _______________________________________________
> > ptxdist mailing list
> > ptxdist@pengutronix.de
> > To unsubscribe, send a mail with subject "unsubscribe" to 
> > ptxdist-requ...@pengutronix.de
> > 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de

Reply via email to