From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.pqgruber.com ([52.59.78.55]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kKeU3-0002PD-Rj for ptxdist@pengutronix.de; Tue, 22 Sep 2020 11:21:12 +0200 From: Clemens Gruber Date: Tue, 22 Sep 2020 11:20:15 +0200 Message-Id: <20200922092015.84149-7-clemens.gruber@pqgruber.com> In-Reply-To: <20200922092015.84149-1-clemens.gruber@pqgruber.com> References: <20200922092015.84149-1-clemens.gruber@pqgruber.com> MIME-Version: 1.0 Subject: [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: Clemens Gruber 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) 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