Subject: patch for custom USER for dbus
To: None <jmmv@NetBSD.org, pkgsrc-users@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: pkgsrc-users
Date: 04/08/2006 13:56:17
I have not tested this by running or using (just installing). I did this
because doing installs as non-root.
Index: sysutils/dbus/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/dbus/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- sysutils/dbus/Makefile 2 Apr 2006 18:20:53 -0000 1.11
+++ sysutils/dbus/Makefile 8 Apr 2006 20:51:21 -0000
@@ -4,8 +4,8 @@
.include "Makefile.common"
PKGREVISION= 1
-PKG_USERS= messagebus:messagebus::System\ message\ bus:${VARBASE}/run/dbus:${NOLOGIN}
-PKG_GROUPS= messagebus
+PKG_USERS= ${DBUS_USER}:${DBUS_GROUP}::System\ message\ bus:${VARBASE}/run/dbus:${NOLOGIN}
+PKG_GROUPS= ${DBUS_GROUP}
MAKE_DIRS= ${PKG_SYSCONFDIR}/event.d
MAKE_DIRS+= ${PKG_SYSCONFDIR}/system.d
@@ -16,6 +16,9 @@
CONF_FILES= ${EGDIR}/session.conf ${PKG_SYSCONFDIR}/session.conf
CONF_FILES+= ${EGDIR}/system.conf ${PKG_SYSCONFDIR}/system.conf
+FILES_SUBST+= DBUS_USER=${DBUS_USER}
+FILES_SUBST+= DBUS_GROUP=${DBUS_GROUP}
+
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
Index: sysutils/dbus/Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/dbus/Makefile.common,v
retrieving revision 1.14
diff -u -r1.14 Makefile.common
--- sysutils/dbus/Makefile.common 6 Apr 2006 06:22:45 -0000 1.14
+++ sysutils/dbus/Makefile.common 8 Apr 2006 20:51:21 -0000
@@ -43,6 +43,7 @@
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+= --with-xml=expat
CONFIGURE_ARGS+= --without-x
+CONFIGURE_ARGS+= --with-dbus-user=${DBUS_USER}
PKG_SYSCONFSUBDIR= dbus-1
Index: sysutils/dbus/files/dbus.sh
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/dbus/files/dbus.sh,v
retrieving revision 1.3
diff -u -r1.3 dbus.sh
--- sysutils/dbus/files/dbus.sh 30 Mar 2006 20:57:08 -0000 1.3
+++ sysutils/dbus/files/dbus.sh 8 Apr 2006 20:51:21 -0000
@@ -14,8 +14,8 @@
command_args="--system"
pidfile="@VARBASE@/run/dbus/pid"
start_precmd=dbus_prestart
-dbus_user=messagebus
-dbus_group=messagebus
+dbus_user=@DBUS_USER@
+dbus_group=@DBUS_GROUP@
dbus_prestart() {
if @TEST@ ! -d "@VARBASE@/run/dbus"; then
Index: mk/defaults/mk.conf
===================================================================
RCS file: /cvsroot/pkgsrc/mk/defaults/mk.conf,v
retrieving revision 1.115
diff -u -r1.115 mk.conf
--- mk/defaults/mk.conf 6 Apr 2006 06:23:06 -0000 1.115
+++ mk/defaults/mk.conf 8 Apr 2006 20:51:22 -0000
@@ -691,6 +691,17 @@
# Possible: any user name
# Default: cyrus
+DBUS_GROUP?= messagebus
+# Used in the dbus package to specify the daemon group.
+# Possible: any group name
+# Default: messagebus
+
+DBUS_USER?= messagebus
+# Used in the dbus package to specify the daemon user.
+# Possible: any user name
+# Default: dbus
+
+
DEFANG_GROUP?= defang
# Used in the mimedefang package to specify the group to run commands as
# Possible: any group name