From 6367acd61c60197a9de405453fa0c425109b8e94 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Mon, 10 Mar 2025 20:26:59 +0200 Subject: [PATCH] Switch from Systemd to Enit --- pkg.info | 5 +++-- source-files/dbus-reload.bpmhook | 5 +++++ source-files/dbus.esv | 6 ++++++ source.sh | 7 +++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 source-files/dbus-reload.bpmhook create mode 100644 source-files/dbus.esv diff --git a/pkg.info b/pkg.info index cf7a91d..6bbe440 100644 --- a/pkg.info +++ b/pkg.info @@ -1,9 +1,10 @@ name: dbus description: Freedesktop.org message bus system version: 1.14.10 +revision: 3 url: https://www.freedesktop.org/wiki/Software/dbus license: AFL2.1 or GPL2-or-later architecture: any -depends: ["glibc","systemd"] -make_depends: ["bash","binutils","coreutils","diffutils","gawk","gcc","glibc","grep","make","pkgconf","sed","systemd","util-linux"] +depends: ["glibc"] +make_depends: ["bash","binutils","coreutils","diffutils","gawk","gcc","glibc","grep","make","pkgconf","sed","util-linux"] type: source diff --git a/source-files/dbus-reload.bpmhook b/source-files/dbus-reload.bpmhook new file mode 100644 index 0000000..8d1307d --- /dev/null +++ b/source-files/dbus-reload.bpmhook @@ -0,0 +1,5 @@ +trigger_operations: ["install", "upgrade", "remove"] +target_type: "path" +targets: ["etc/dbus-1/system.d/", "usr/share/dbus-1/system.d/", "usr/share/dbus-1/system-services/"] +depends: ["dbus"] +run: "/usr/bin/systemctl try-reload-or-restart dbus" diff --git a/source-files/dbus.esv b/source-files/dbus.esv new file mode 100644 index 0000000..a93a152 --- /dev/null +++ b/source-files/dbus.esv @@ -0,0 +1,6 @@ +name: dbus +description: DBus message system bus +type: background +start_cmd: bash -c 'install -m755 -g 81 -o 81 -d /run/dbus; exec dbus-daemon --system --nofork --nopidfile' +exit_method: kill +restart: true diff --git a/source.sh b/source.sh index b93e4b1..0c39210 100644 --- a/source.sh +++ b/source.sh @@ -23,6 +23,8 @@ build() { --disable-static \ --disable-doxygen-docs \ --disable-xml-docs \ + --with-systemduserunitdir=no \ + --with-systemdsystemunitdir=no \ --docdir=/usr/share/doc/dbus \ --with-system-socket=/run/dbus/system_bus_socket make @@ -38,5 +40,10 @@ check() { # This function is used to move the compiled files into the output directory package() { make DESTDIR="$BPM_OUTPUT" install + chown root:messagebus "$BPM_OUTPUT"/usr/libexec/dbus-daemon-launch-helper + chmod 4750 "$BPM_OUTPUT"/usr/libexec/dbus-daemon-launch-helper ln -sfv /etc/machine-id "$BPM_OUTPUT"/var/lib/dbus + + install -Dm644 "$BPM_WORKDIR"/dbus-reload.bpmhook "$BPM_OUTPUT"/var/lib/bpm/hooks/dbus-reload.bpmhook + install -Dm644 "$BPM_WORKDIR"/dbus.esv "$BPM_OUTPUT"/etc/esvm/services/dbus.esv }