From 3738f45aa28527a961fda5fded5670a70e60fdfe Mon Sep 17 00:00:00 2001 From: aliriza Date: Thu, 16 Feb 2023 08:36:12 +0000 Subject: [PATCH] dbus --- sys/apps/dbus/dbus.confd | 2 -- sys/apps/dbus/dbus.initd | 3 ++- sys/apps/dbus/dbus.xinit | 7 +++++++ sys/apps/dbus/ympbuild | 7 +++++-- 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 sys/apps/dbus/dbus.xinit diff --git a/sys/apps/dbus/dbus.confd b/sys/apps/dbus/dbus.confd index 04540475..31243b61 100644 --- a/sys/apps/dbus/dbus.confd +++ b/sys/apps/dbus/dbus.confd @@ -3,5 +3,3 @@ # Additional arguments to pass to dbus-daemon. #command_args= -# Uncomment to use process supervisor. -#supervisor=supervise-daemon diff --git a/sys/apps/dbus/dbus.initd b/sys/apps/dbus/dbus.initd index 0fa531c0..e332dfc8 100644 --- a/sys/apps/dbus/dbus.initd +++ b/sys/apps/dbus/dbus.initd @@ -4,8 +4,9 @@ description="An IPC message bus daemon" extra_started_commands="reload" +supervisor=supervise-daemon command="/usr/bin/dbus-daemon" -command_args="--system" +command_args="--system --nofork --nopidfile --syslog-only ${command_args:-}" command_background="yes" pidfile="/run/$RC_SVCNAME.pid" diff --git a/sys/apps/dbus/dbus.xinit b/sys/apps/dbus/dbus.xinit new file mode 100644 index 00000000..251a7e8a --- /dev/null +++ b/sys/apps/dbus/dbus.xinit @@ -0,0 +1,7 @@ +#!/bin/sh +## test for an existing bus daemon, just to be safe +if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then + ## if not found, launch a new one + eval `dbus-launch --sh-syntax` + echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS" +fi diff --git a/sys/apps/dbus/ympbuild b/sys/apps/dbus/ympbuild index 0b09a6d8..38bcf473 100644 --- a/sys/apps/dbus/ympbuild +++ b/sys/apps/dbus/ympbuild @@ -10,10 +10,12 @@ license=('GPLv3') source=("https://dbus.freedesktop.org/releases/dbus/dbus-$version.tar.xz" "dbus.sysconf" "dbus.initd" - "dbus.confd") + "dbus.confd" + "dbus.xinit") depends=(audit expat libcap-ng) makedepends=() md5sums=('c56de960ea9031b92ee71aaa0e8e72c2' + 'SKIP' 'SKIP' 'SKIP' 'SKIP') @@ -39,11 +41,12 @@ build(){ package(){ make $jobs install - mkdir "$DESTDIR"/etc/{passwd,group,sysconf,init,conf}.d + mkdir -p "$DESTDIR"/etc/{passwd,group,sysconf,init,conf}.d "$DESTDIR"/etc/X11/xinit/xinitrc.d/ echo "messagebus:x:109:" > "$DESTDIR"/etc/group.d/dbus echo "messagebus:x:103:109::/nonexistent:/usr/sbin/nologin" > "$DESTDIR"/etc/passwd.d/dbus install ../dbus.sysconf "$DESTDIR"/etc/sysconf.d/dbus install ../dbus.initd "$DESTDIR"/etc/init.d/dbus install ../dbus.confd "$DESTDIR"/etc/conf.d/dbus + install ../dbus.xinit "$DESTDIR"/etc/X11/xinit/xinitrc.d/30-dbus-launch.sh }