diff options
Diffstat (limited to 'repo/system/dbus')
-rw-r--r-- | repo/system/dbus/dbus.confd | 7 | ||||
-rw-r--r-- | repo/system/dbus/dbus.initd | 33 | ||||
-rw-r--r-- | repo/system/dbus/dbus.trigger | 4 | ||||
-rw-r--r-- | repo/system/dbus/dbus.xibuild | 60 |
4 files changed, 104 insertions, 0 deletions
diff --git a/repo/system/dbus/dbus.confd b/repo/system/dbus/dbus.confd new file mode 100644 index 0000000..0454047 --- /dev/null +++ b/repo/system/dbus/dbus.confd @@ -0,0 +1,7 @@ +# Configuration for /etc/init.d/dbus + +# Additional arguments to pass to dbus-daemon. +#command_args= + +# Uncomment to use process supervisor. +#supervisor=supervise-daemon diff --git a/repo/system/dbus/dbus.initd b/repo/system/dbus/dbus.initd new file mode 100644 index 0000000..f3f44da --- /dev/null +++ b/repo/system/dbus/dbus.initd @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +name="System Message Bus" +description="D-Bus System Message Bus" + +extra_started_commands="reload" + +command="/usr/bin/dbus-daemon" +command_args="--system --nofork --nopidfile --syslog-only ${command_args:-}" +command_background="yes" +pidfile="/run/$RC_SVCNAME.pid" + +depend() { + need localmount + after bootmisc +} + +start_pre() { + checkpath -d -m755 -o root:messagebus /run/dbus || return 1 + + /usr/bin/dbus-uuidgen --ensure=/etc/machine-id +} + +stop_post() { + [ ! -S /run/dbus/system_bus_socket ] || rm -f /run/dbus/system_bus_socket +} + +reload() { + ebegin "Reloading $name configuration" + /usr/bin/dbus-send --print-reply --system --type=method_call \ + --dest=org.freedesktop.DBus \ + / org.freedesktop.DBus.ReloadConfig > /dev/null + eend $? +} diff --git a/repo/system/dbus/dbus.trigger b/repo/system/dbus/dbus.trigger new file mode 100644 index 0000000..a537bd8 --- /dev/null +++ b/repo/system/dbus/dbus.trigger @@ -0,0 +1,4 @@ +#!/bin/sh + +dbus-send --system --type=method_call --dest=org.freedesktop.DBus / \ + org.freedesktop.DBUS.ReloadConfig >/dev/null 2>&1 || : diff --git a/repo/system/dbus/dbus.xibuild b/repo/system/dbus/dbus.xibuild new file mode 100644 index 0000000..3bbfc31 --- /dev/null +++ b/repo/system/dbus/dbus.xibuild @@ -0,0 +1,60 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="elogind" + +PKG_VER=1.12.20 +SOURCE=https://dbus.freedesktop.org/releases/dbus/dbus-$PKG_VER.tar.gz + +ADDITIONAL=" +dbus.confd +dbus.initd +dbus.trigger +" + +DESC="A message bus system allowing applications to talk to one another" + +build () { + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --enable-user-session \ + --disable-doxygen-docs \ + --disable-xml-docs \ + --disable-static \ + --with-systemduserunitdir=no \ + --with-systemdsystemunitdir=no \ + --docdir=/usr/share/doc/dbus-$PKG_VER \ + --with-console-auth-dir=/run/console \ + --with-system-pid-file=/run/dbus/pid \ + --with-system-socket=/run/dbus/system_bus_socket \ + --with-x && + make +} + +package () { + make DESTDIR=$PKG_DEST install + mv usr/lib/lib*.so.* $PKG_DEST/usr/lib/ + + chown root:messagebus $PKG_DEST/usr/libexec/dbus-daemon-launch-helper && + chmod 4750 $PKG_DEST/usr/libexec/dbus-daemon-launch-helper + + cat > $PKG_DEST/etc/dbus-1/session-local.conf << "EOF" +<!DOCTYPE busconfig PUBLIC + "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + + <!-- Search for .service files in /usr/local --> + <servicedir>/usr/local/share/dbus-1/services</servicedir> + +</busconfig> +EOF + + install -Dm755 dbus.initd $PKG_DEST/etc/init.d/dbus + install -Dm644 dbus.confd $PKG_DEST/etc/conf.d/dbus +} + +postinstall () { + rc-update add dbus +} |