From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Thu, 8 Oct 2020 14:40:01 +0200 From: Clemens Gruber Message-ID: <20201008124001.GA6534@workstation.tuxnet> References: <20200922092015.84149-1-clemens.gruber@pqgruber.com> <20200922092015.84149-7-clemens.gruber@pqgruber.com> <20201007071153.GO11021@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201007071153.GO11021@pengutronix.de> Subject: Re: [ptxdist] [PATCH] dbus-broker: new package List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Michael Olbrich 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 > > --- > > 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 > > +# > > +# 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 ") > > + @$(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-request@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-request@pengutronix.de