mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: Robert Schwebel <r.schwebel@pengutronix.de>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] dbus-broker: replacement dbus daemon
Date: Wed, 19 Feb 2025 11:20:12 +0100	[thread overview]
Message-ID: <20250219102012.qc7jpz6ni6zkv66l@pengutronix.de> (raw)
In-Reply-To: <20241218080159.2909891-1-r.schwebel@pengutronix.de>

On Wed, Dec 18, 2024 at 09:01:59AM +0100, Robert Schwebel wrote:
> From: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> dbus-broker has meanwhile evolved as an alternative to the standard dbus
> daemon. Since its beginning, it has for example been long used in
> Fedora, and Debian has it as an alternative implementation. So let's try
> it in ptxdist as well.
> 
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> [various version bumps, added sysroot mechanics for newer versions]
> Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> ---
>  .../usr/lib/systemd/system/dbus.socket        |   5 +
>  projectroot/usr/share/dbus-1/system.conf      | 140 ++++++++++++++++++
>  rules/dbus-broker.in                          |  17 +++
>  rules/dbus-broker.make                        |  86 +++++++++++
>  rules/dbus.in                                 |  10 ++
>  rules/dbus.make                               |   6 +-
>  6 files changed, 262 insertions(+), 2 deletions(-)
>  create mode 100644 projectroot/usr/lib/systemd/system/dbus.socket
>  create mode 100644 projectroot/usr/share/dbus-1/system.conf
>  create mode 100644 rules/dbus-broker.in
>  create mode 100644 rules/dbus-broker.make
> 

[...]

> diff --git a/rules/dbus-broker.make b/rules/dbus-broker.make
> new file mode 100644
> index 000000000..ffb9a9e9c
> --- /dev/null
> +++ b/rules/dbus-broker.make
> @@ -0,0 +1,86 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2018 by Michael Olbrich <m.olbrich@pengutronix.de>
> +#
> +# See CREDITS for details about who has contributed to this project.

Old template, remove this line.

> +#
> +# 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	:= 36
> +DBUS_BROKER_MD5		:= 0398b41a250a6172e35750fc864ee33b
> +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://README.md;startline=73;endline=76;md5=ef96995b3d4e9260fb70eeade6439048 \
	file://AUTHORS;startline=1;endline=17;md5=37e7c29e235ce05ce1a54d8627d4365b \
	file://LICENSE;md5=7b486c2338d225a1405d979ed2c15ce8

 - Roland

> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +# host path leaks in if not set explicitly
> +DBUS_BROKER_CONF_ENV	:= \
> +	$(CROSS_ENV) \
> +	PTXDIST_PKG_CONFIG_VAR_NO_SYSROOT="systemdsystemunitdir systemduserunitdir catalogdir"
> +
> +#
> +# meson
> +#
> +DBUS_BROKER_CONF_TOOL	:= meson
> +DBUS_BROKER_CONF_OPT	:= \
> +	$(CROSS_MESON_USR) \
> +	-Daudit=false \
> +	-Dc-shquote:reference-test=false \
> +	-Ddocs=false \
> +	-Dlauncher=true \
> +	-Dreference-test=false \
> +	-Dselinux=false \
> +	-Dsystem-console-users="[]"
> +
> +# ----------------------------------------------------------------------------
> +# 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,"Michael Olbrich <m.olbrich@pengutronix.de>")
> +	@$(call install_fixup, dbus-broker,DESCRIPTION,missing)
> +
> +	@$(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/share/dbus-1/system.conf)
> +
> +	@$(call install_copy, dbus-broker, 0, 0, 0644, -, \
> +		/usr/lib/systemd/system/dbus-broker.service)
> +	@$(call install_link, dbus-broker, dbus-broker.service, \
> +		/usr/lib/systemd/system/dbus.service)
> +
> +	@$(call install_alternative, dbus-broker, 0, 0, 0644, \
> +		/usr/lib/systemd/system/dbus.socket)
> +	@$(call install_link, dbus-broker, ../dbus.socket, \
> +		/usr/lib/systemd/system/sockets.target.wants/dbus.socket)
> +
> +	@$(call install_finish, dbus-broker)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> diff --git a/rules/dbus.in b/rules/dbus.in
> index b205ee62f..c8b5f09be 100644
> --- a/rules/dbus.in
> +++ b/rules/dbus.in
> @@ -32,6 +32,14 @@ config DBUS_SELINUX
>  	depends on BROKEN
>  	bool
>  
> +config DBUS_NO_DAEMON
> +	bool
> +
> +comment "D-Bus daemon is provided by dbus-broker"
> +	depends on DBUS_NO_DAEMON
> +
> +if !DBUS_NO_DAEMON
> +
>  config DBUS_SYSTEMD
>  	bool
>  	default INITMETHOD_SYSTEMD
> @@ -60,3 +68,5 @@ config DBUS_SYSTEMD_USER_UNIT
>  	depends on SYSTEMD_UNITS_USER && DBUS_SYSTEMD_UNIT
>  
>  endif
> +
> +endif
> diff --git a/rules/dbus.make b/rules/dbus.make
> index f2bc7b552..dffa0ab6f 100644
> --- a/rules/dbus.make
> +++ b/rules/dbus.make
> @@ -89,6 +89,7 @@ $(STATEDIR)/dbus.targetinstall:
>  	@$(call install_fixup, dbus,AUTHOR,"Roland Hostettler <r.hostettler@gmx.ch>")
>  	@$(call install_fixup, dbus,DESCRIPTION,missing)
>  
> +ifndef PTXCONF_DBUS_NO_DAEMON
>  	@$(call install_copy, dbus, 0, 0, 0755, -, \
>  		/usr/bin/dbus-daemon)
>  	@$(call install_copy, dbus, 0, 0, 0755, -, \
> @@ -105,14 +106,17 @@ $(STATEDIR)/dbus.targetinstall:
>  		/usr/bin/dbus-uuidgen)
>  	@$(call install_copy, dbus, 0, 104, 4754, -, \
>  		/usr/libexec/dbus-daemon-launch-helper)
> +endif
>  
>  	@$(call install_lib, dbus, 0, 0, 0644, libdbus-1)
>  
>  #	#
>  #	# install config files
>  #	#
> +ifndef PTXCONF_DBUS_NO_DAEMON
>  	@$(call install_alternative, dbus, 0, 0, 0644, /usr/share/dbus-1/system.conf)
>  	@$(call install_alternative, dbus, 0, 0, 0644, /usr/share/dbus-1/session.conf)
> +endif
>  
>  #	#
>  #	# busybox init: start script
> @@ -132,8 +136,6 @@ ifdef PTXCONF_DBUS_SYSTEMD_UNIT
>  		/usr/lib/systemd/system/dbus.socket)
>  	@$(call install_link, dbus, ../dbus.socket, \
>  		/usr/lib/systemd/system/sockets.target.wants/dbus.socket)
> -	@$(call install_link, dbus, ../dbus.socket, \
> -		/usr/lib/systemd/system/dbus.target.wants/dbus.socket)
>  
>  	@$(call install_copy, dbus, 0, 0, 0644, -, \
>  		/usr/lib/systemd/system/dbus.service)
> -- 
> 2.39.5
> 
> 
> 

-- 
Roland Hieber, Pengutronix e.K.          | rhi@pengutronix.de          |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |



      parent reply	other threads:[~2025-02-19 10:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18  8:01 Robert Schwebel
2025-01-17 16:36 ` Michael Olbrich
2025-02-19 10:20 ` Roland Hieber [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250219102012.qc7jpz6ni6zkv66l@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=r.schwebel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox