From 1fe99a5328dc710340d6eb72e3e59f55c4062c49 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sun, 3 Aug 2025 18:43:45 +0300 Subject: [PATCH] Fix wrong ownership for /run/dbus --- pkg.info | 1 + source-files/dbus.esv | 2 +- source-files/dbus.sh | 5 +++++ source.sh | 3 ++- 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 source-files/dbus.sh diff --git a/pkg.info b/pkg.info index 7a814ea..6a98352 100644 --- a/pkg.info +++ b/pkg.info @@ -1,6 +1,7 @@ name: dbus description: Freedesktop.org message bus system version: 1.16.2 +revision: 2 url: https://www.freedesktop.org/wiki/Software/dbus license: AFL2.1 or GPL2-or-later architecture: any diff --git a/source-files/dbus.esv b/source-files/dbus.esv index a93a152..bcff14c 100644 --- a/source-files/dbus.esv +++ b/source-files/dbus.esv @@ -1,6 +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' +start_cmd: /etc/esvm/scripts/dbus.sh exit_method: kill restart: true diff --git a/source-files/dbus.sh b/source-files/dbus.sh new file mode 100644 index 0000000..19d6b7f --- /dev/null +++ b/source-files/dbus.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +[ -d /run/dbus ] || install -d /run/dbus + +exec /usr/bin/dbus-daemon --system --nofork diff --git a/source.sh b/source.sh index 67adcca..9297c67 100644 --- a/source.sh +++ b/source.sh @@ -49,10 +49,11 @@ package() { ln -sfv /var/lib/dbus/machine-id "$BPM_OUTPUT"/etc/machine-id # Install dbus service - install -Dm755 "$BPM_WORKDIR"/dbus-reload.sh "$BPM_OUTPUT"/usr/sbin/dbus-reload + install -Dm755 "$BPM_WORKDIR"/dbus.sh "$BPM_OUTPUT"/etc/esvm/scripts/dbus.sh install -Dm644 "$BPM_WORKDIR"/dbus.esv "$BPM_OUTPUT"/etc/esvm/services/dbus.esv # Install dbus BPM hook + install -Dm755 "$BPM_WORKDIR"/dbus-reload.sh "$BPM_OUTPUT"/usr/sbin/dbus-reload install -Dm644 "$BPM_WORKDIR"/dbus-reload.bpmhook "$BPM_OUTPUT"/var/lib/bpm/hooks/dbus-reload.bpmhook # Install package license