Sun Nov 7 19:14:16 2021 UTC ()
dbus: let the RC script work unprivileged

This takes advantage of the introduction of the SYSCONFBASE variable.
Tested on NetBSD/amd64.

Bumps PKGREVISION.


(khorben)
diff -r1.1 -r1.2 pkgsrc/sysutils/dbus/MESSAGE.rcd
diff -r1.125 -r1.126 pkgsrc/sysutils/dbus/Makefile
diff -r1.10 -r1.11 pkgsrc/sysutils/dbus/files/dbus.sh

cvs diff -r1.1 -r1.2 pkgsrc/sysutils/dbus/MESSAGE.rcd (expand / switch to unified diff)

--- pkgsrc/sysutils/dbus/MESSAGE.rcd 2021/03/14 08:31:17 1.1
+++ pkgsrc/sysutils/dbus/MESSAGE.rcd 2021/11/07 19:14:15 1.2
@@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
1=========================================================================== 1===========================================================================
2$NetBSD: MESSAGE.rcd,v 1.1 2021/03/14 08:31:17 nia Exp $ 2$NetBSD: MESSAGE.rcd,v 1.2 2021/11/07 19:14:15 khorben Exp $
3 3
4You should enable the dbus system-wide daemon for correct operation. Use: 4You should enable the dbus system-wide daemon for correct operation. Use:
5 5
6$ cp ${PREFIX}/share/examples/rc.d/dbus /etc/rc.d/dbus 6$ cp ${PREFIX}/share/examples/rc.d/dbus ${SYSCONFBASE}/rc.d/dbus
7 7
8Edit /etc/rc.conf to set dbus=YES. 8Edit ${SYSCONFBASE}/rc.conf to set dbus=YES.
9 9
10=========================================================================== 10===========================================================================

cvs diff -r1.125 -r1.126 pkgsrc/sysutils/dbus/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/dbus/Makefile 2021/03/30 16:16:03 1.125
+++ pkgsrc/sysutils/dbus/Makefile 2021/11/07 19:14:15 1.126
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.125 2021/03/30 16:16:03 ryoon Exp $ 1# $NetBSD: Makefile,v 1.126 2021/11/07 19:14:15 khorben Exp $
2 2
3DISTNAME= dbus-1.12.20 3DISTNAME= dbus-1.12.20
4PKGREVISION= 1 4PKGREVISION= 2
5CATEGORIES= sysutils 5CATEGORIES= sysutils
6MASTER_SITES= http://dbus.freedesktop.org/releases/dbus/ 6MASTER_SITES= http://dbus.freedesktop.org/releases/dbus/
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= https://www.freedesktop.org/Software/dbus 9HOMEPAGE= https://www.freedesktop.org/Software/dbus
10COMMENT= Message bus system 10COMMENT= Message bus system
11LICENSE= gnu-gpl-v2 11LICENSE= gnu-gpl-v2
12 12
13CONFLICTS+= dbus-glib<0.71 13CONFLICTS+= dbus-glib<0.71
14CONFLICTS+= py27-dbus<0.71 14CONFLICTS+= py27-dbus<0.71
15 15
16BUILD_DEPENDS+= xmlto-[0-9]*:../../textproc/xmlto 16BUILD_DEPENDS+= xmlto-[0-9]*:../../textproc/xmlto
17 17

cvs diff -r1.10 -r1.11 pkgsrc/sysutils/dbus/files/dbus.sh (expand / switch to unified diff)

--- pkgsrc/sysutils/dbus/files/dbus.sh 2016/05/22 23:02:24 1.10
+++ pkgsrc/sysutils/dbus/files/dbus.sh 2021/11/07 19:14:16 1.11
@@ -1,22 +1,26 @@ @@ -1,22 +1,26 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: dbus.sh,v 1.10 2016/05/22 23:02:24 youri Exp $ 3# $NetBSD: dbus.sh,v 1.11 2021/11/07 19:14:16 khorben Exp $
4# 4#
5# PROVIDE: dbus 5# PROVIDE: dbus
6# REQUIRE: DAEMON 6# REQUIRE: DAEMON
7# KEYWORD: shutdown 7# KEYWORD: shutdown
 8#
 9# You will need to set some variables in @SYSCONFBASE@/rc.conf to start dbus:
 10#
 11# dbus=YES
8 12
9. /etc/rc.subr 13$_rc_subr_loaded . @SYSCONFBASE@/rc.subr
10 14
11name="dbus" 15name="dbus"
12rcvar=$name 16rcvar=$name
13command="@PREFIX@/bin/dbus-daemon" 17command="@PREFIX@/bin/dbus-daemon"
14command_args="--system --fork" 18command_args="--system --fork"
15pidfile="@VARBASE@/run/dbus/pid" 19pidfile="@VARBASE@/run/dbus/pid"
16start_precmd=dbus_prestart 20start_precmd=dbus_prestart
17 21
18dbus_prestart() { 22dbus_prestart() {
19 dir="@VARBASE@/run/dbus" 23 dir="@VARBASE@/run/dbus"
20 if @TEST@ ! -d $dir; then 24 if @TEST@ ! -d $dir; then
21 @MKDIR@ $dir 25 @MKDIR@ $dir
22 @CHMOD@ 0755 $dir 26 @CHMOD@ 0755 $dir