The system daemon is running as messagebus:messagebus, so it does not

have the permission to remove its pid file and socket on exit. Put
these files in the /var/run/dbus directory, owned by
messagebus:messagebus.

Remove the files and directory on package deinstall.
This commit is contained in:
Jean-Yves Lefort 2006-04-28 01:37:06 +00:00
parent 41d58c5272
commit 830a25df1e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=160615
5 changed files with 16 additions and 13 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= dbus
PORTVERSION= 0.61
PORTREVISION?= 0
PORTREVISION?= 1
CATEGORIES?= devel gnome
MASTER_SITES= http://dbus.freedesktop.org/releases/
@ -27,8 +27,8 @@ CONFIGURE_ARGS?=--disable-gtk \
--disable-mono \
--disable-mono-docs \
--localstatedir=/var \
--with-system-pid-file=/var/run/dbus.pid \
--with-system-socket=/var/run/dbus.pipe \
--with-system-pid-file=/var/run/dbus/dbus.pid \
--with-system-socket=/var/run/dbus/dbus.pipe \
--with-session-socket-dir=/var/tmp \
--disable-doxygen-docs \
--disable-xml-docs
@ -64,16 +64,13 @@ post-patch:
.if !defined(DBUS_SLAVE)
pre-su-install:
@for i in 15 9 ; do \
if [ -f /var/run/dbus.pid ]; then \
kill -$${i} $$(${CAT} /var/run/dbus.pid) 2>/dev/null || ${TRUE} ; \
if [ -f /var/run/dbus/dbus.pid ]; then \
kill -$${i} $$(${CAT} /var/run/dbus/dbus.pid) 2>/dev/null || ${TRUE} ; \
sleep 3 ; \
fi ; \
done
@if [ -f /var/run/dbus.pid ]; then \
${RM} -f /var/run/dbus.pid ; \
fi
@if [ -S /var/run/dbus ]; then \
${RM} -f /var/run/dbus ; \
@if [ -f /var/run/dbus/dbus.pid ]; then \
${RM} -f /var/run/dbus/dbus.pid ; \
fi
.endif

View file

@ -19,7 +19,7 @@ name=dbus
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/dbus-daemon"
pidfile="/var/run/${name}.pid"
pidfile="/var/run/dbus/${name}.pid"
stop_postcmd=stop_postcmd

View file

@ -31,6 +31,8 @@ POST-INSTALL)
exit 1
fi
fi
/usr/bin/install -d -o ${USER} -g ${GROUP} /var/run/dbus
exit 0
;;
esac

View file

@ -57,3 +57,7 @@ libdata/pkgconfig/dbus-glib-1.pc
@dirrm include/dbus-%%VERSION%%
@dirrm etc/dbus-1/system.d
@dirrm etc/dbus-1
@cwd /var/run
@unexec rm -f %D/dbus/dbus.pid
@unexec rm -f %D/dbus/dbus.pipe
@dirrm dbus

View file

@ -35,8 +35,8 @@ CONFIGURE_ARGS= --enable-python \
--disable-gtk \
--disable-qt3 \
--localstatedir=/var \
--with-system-pid-file=/var/run/dbus.pid \
--with-system-socket=/var/run/dbus.pipe \
--with-system-pid-file=/var/run/dbus/dbus.pid \
--with-system-socket=/var/run/dbus/dbus.pipe \
--with-session-socket-dir=/var/tmp \
--disable-doxygen-docs \
--disable-xml-docs