From patchwork Sat Jan 7 21:05:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 6419 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4NqCQj53y8z40Qr for ; Sat, 7 Jan 2023 21:05:17 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4NqCQg4R7TzyP; Sat, 7 Jan 2023 21:05:15 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4NqCQg2VnCz2yRv; Sat, 7 Jan 2023 21:05:15 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4NqCQf37rmz2xHD for ; Sat, 7 Jan 2023 21:05:14 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4NqCQd56t7zV; Sat, 7 Jan 2023 21:05:13 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1673125513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tQS+584kPa+/8zjUDyOEAmuMWKuWZjo2yvvQSuhMV/A=; b=Uq5vbtaaBK1iTQdPnbtn7uzQKkMDBy4askB8/4mmEdo0ZdLMfQtcPkeC27vtj13LQoi8Ym epONBso356++3hAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1673125513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tQS+584kPa+/8zjUDyOEAmuMWKuWZjo2yvvQSuhMV/A=; b=LKAPI3dXwh6LvIbSQ+6GgsJLIhy22tdy21OAMWnTU/gbppmxzKcD3P3vI0T/47vw5k4qWJ Sse+kIvlIFUF+5WQW13iQ8qWeV55l4Euytd6sJNaVI6T2vErDulsyR+wdIY/v8XwzVplbL 889JNXl41YvbcMGeEesvI0Ilv6KrvAtWOhkzgzG+QYAFqigTQN/6i5UfuX/LwXxAagJfM0 +bs38yd4Q8wO0lnIBaDlKt/PfKgkQ5gl8f3ZCxCp6IGWSLs5TDdTbMVLzwgoAVo6bO9Qbm DrevO1jwElQTWmCDtRP8uzJg8MzdfPOYUUILDOxtt91uNqIW2/JIC4Ye4e9zDQ== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 1/2] dbus-broker: New package Date: Sat, 7 Jan 2023 22:05:04 +0100 Message-Id: <20230107210505.131637-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" 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 = dbus-broker +version = 32 +release = 1 + +maintainer = Stefan Schantl +groups = System/Daemons +url = https://github.com/bus1/dbus-broker +license = Apache 2.0 +summary = 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 = https://github.com/bus1/%{name}/releases/download/v%{version}/ +sources = %{thisapp}.tar.xz + +build + requires + meson + python3-docutils + expat-devel + libcap-ng-devel + systemd-devel + end + + build + %{meson} \ + -Ddocs=true \ + -Dlinux-4-17=true + + %{meson_build} + end + + install + %{meson_install} + end +end + +packages + package %{name} + obsoletes + dbus <= 1.15.2-2 + end + + provides + dbus + end + + requires + dbus-common + end + + prerequires += 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 running. + 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