dbus: switch to OpenRC, bump revision.

--HG--
extra : convert_revision : d2099026e9bdd524aa7ae31062e7079bf937a3f2
This commit is contained in:
Juan RP 2009-05-04 23:51:22 +02:00
parent e8078d41df
commit 940404d5eb
5 changed files with 29 additions and 67 deletions

View file

@ -1,28 +0,0 @@
#
# This script fixes permissions for dbus-daemon-launch-helper
# and creates the dbus system user/group.
#
dbus_launch="./usr/libexec/dbus-daemon-launch-helper"
case "${ACTION}" in
pre)
;;
post)
echo "Running ${PKGNAME}-${VERSION} post installation hooks..."
if ! getent group dbus >/dev/null; then
groupadd -r dbus 2>&1 >/dev/null
[ $? -ne 0 ] && exit $?
echo "Created dbus system group."
fi
if ! getent passwd dbus >/dev/null; then
useradd -c "System message bus" \
-d /var/run/dbus \
-s /sbin/nologin -g dbus -r dbus && \
passwd -l dbus 2>&1 >/dev/null
[ $? -ne 0 ] && exit $?
echo "Created dbus system user."
fi
chown root:dbus ${dbus_launch}
chmod 4750 ${dbus_launch}
;;
esac

View file

@ -1,11 +0,0 @@
#
# This script removes the dbus user/group.
#
case "${ACTION}" in
pre)
userdel dbus 2>&1 >/dev/null
[ $? -eq 0 ] && echo "Removed ${PKGNAME} system user/group."
;;
post)
;;
esac

View file

@ -1,27 +0,0 @@
#!/bin/sh
#
# PROVIDE: dbus
# REQUIRE: DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
name="dbus"
rcvar=$name
command="/usr/bin/dbus-daemon"
command_args="--system"
pidfile="/var/run/dbus/pid"
start_precmd=dbus_prestart
dbus_prestart() {
dir="/var/run/dbus"
if [ ! -d $dir ]; then
mkdir $dir
chmod 0755 $dir
chown dbus:dbus $dir
fi
/usr/bin/dbus-uuidgen --ensure
}
load_rc_config $name
run_rc_command "$1"

View file

@ -0,0 +1,23 @@
#!/sbin/runscript
command=/usr/bin/dbus-daemon
pidfile=/var/run/dbus/pid
: ${command_args:=--system}
name="D-Bus (System Message Bus)"
depend()
{
need localmount net
after bootmisc
}
start_pre()
{
dir=$(dirname $pidfile)
if [ ! -d $dir ]; then
mkdir $dir
chmod 0755 $dir
chown dbus:dbus $dir
fi
dbus-uuidgen --ensure
}

View file

@ -2,6 +2,7 @@
pkgname=dbus
sourcepkg=$pkgname
version=1.2.12
revision=1
distfiles="http://dbus.freedesktop.org/releases/dbus/$pkgname-$version.tar.gz"
build_style=gnu_configure
configure_args="--disable-selinux --enable-userdb-cache --with-xml=expat
@ -24,14 +25,18 @@ long_desc="
keep_dirs="/etc/dbus-1"
conf_files="/etc/dbus-1/session.conf /etc/dbus-1/system.conf"
subpackages="devel libs"
openrc_services="dbus default"
triggers="openrc-service"
Add_dependency full glibc
Add_dependency full expat
Add_dependency run dbus-libs
Add_dependency build pkg-config
Add_dependency run OpenRC
post_install()
{
rm -rf ${DESTDIR}/var/run
install -D -m755 ${FILESDIR}/dbus ${DESTDIR}/etc/rc.d/dbus
# Install the OpenRC service
install -D -m755 ${FILESDIR}/dbus.rc ${DESTDIR}/etc/init.d/dbus
}