From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 1/2] dbus-broker: New package Date: Sat, 07 Jan 2023 22:05:04 +0100 Message-ID: <20230107210505.131637-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1054714278111718267==" List-Id: --===============1054714278111718267== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This will replace the legacy dbus-daemon. Signed-off-by: Stefan Schantl --- dbus-broker/dbus-broker.nm | 100 +++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 dbus-broker/dbus-broker.nm diff --git a/dbus-broker/dbus-broker.nm b/dbus-broker/dbus-broker.nm new file mode 100644 index 000000000..a65a1e0d6 --- /dev/null +++ b/dbus-broker/dbus-broker.nm @@ -0,0 +1,100 @@ +############################################################################= ### +# IPFire.org - An Open Source Firewall Solution = # +# Copyright (C) - IPFire Development Team = # +############################################################################= ### + +name =3D dbus-broker +version =3D 32 +release =3D 1 + +maintainer =3D Stefan Schantl +groups =3D System/Daemons +url =3D https://github.com/bus1/dbus-broker +license =3D Apache 2.0 +summary =3D Linux D-Bus Message Broker + +description + D-BUS is a system for sending messages between applications. It is + used both for the system-wide message bus service, and as a + per-user-login-session messaging facility. +end + +source_dl =3D https://github.com/bus1/%{name}/releases/download/v%{version}/ +sources =3D %{thisapp}.tar.xz + +build + requires + meson + python3-docutils + expat-devel + libcap-ng-devel + systemd-devel + end + + build + %{meson} \ + -Ddocs=3Dtrue \ + -Dlinux-4-17=3Dtrue + + %{meson_build} + end + + install + %{meson_install} + end +end + +packages + package %{name} + obsoletes + dbus <=3D 1.15.2-2 + end + + provides + dbus=20 + end + + requires + dbus-common + end + + prerequires +=3D shadow-utils + + script prein + getent group dbus >/dev/null || groupadd -r dbus + getent passwd dbus >/dev/null || \ + useradd -r -g dbus -d / -s /sbin/nologin \ + -c "User for dbus service" dbus + exit 0 + end + + # Just search for new unit files that were just installed. + script postin + systemctl daemon-reload >/dev/null 2>&1 || : + + # The dbus service should be started on default. + systemctl enable dbus-broker.service > /dev/null 2>&1 || : + end + + # Disable the service that is to be removed and stop it if it is still run= ning. + script preun + systemctl --no-reload disable dbus-broker.service >/dev/null 2>&1 || : + systemctl stop dbus-broker.service >/dev/null 2>&1 || : + end + + # Just tell systemd that unitfiles have been removed. + script postun + systemctl daemon-reload >/dev/null 2>&1 || : + end + + # Try to restart the service if it is running. + script postup + systemctl daemon-reload >/dev/null 2>&1 || : + systemctl try-restart dbus-broker.service >/dev/null 2>&1 || : + end + end + + package %{name}-debuginfo + template DEBUGINFO + end +end --=20 2.30.2 --===============1054714278111718267==--