pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Make the dbus user and group configurable, because (at...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f8dfb80ad959
branches:  trunk
changeset: 521968:f8dfb80ad959
user:      ghen <ghen%pkgsrc.org@localhost>
date:      Wed Nov 29 10:11:53 2006 +0000

description:
Make the dbus user and group configurable, because (at least on NetBSD) the
defaults messagebus:messagebus trigger daily security warnings (more than 8
characters). The default values are set in mk/defaults/mk.conf but kept the
same for backwards compatibility, so no PKGREVISION bump.

diffstat:

 mk/defaults/mk.conf         |  12 +++++++++++-
 sysutils/dbus/Makefile      |  16 +++++++++++-----
 sysutils/dbus/files/dbus.sh |   4 ++--
 3 files changed, 24 insertions(+), 8 deletions(-)

diffs (83 lines):

diff -r cf3e615bf745 -r f8dfb80ad959 mk/defaults/mk.conf
--- a/mk/defaults/mk.conf       Wed Nov 29 01:26:27 2006 +0000
+++ b/mk/defaults/mk.conf       Wed Nov 29 10:11:53 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.136 2006/11/18 08:13:26 rillig Exp $
+# $NetBSD: mk.conf,v 1.137 2006/11/29 10:11:53 ghen Exp $
 #
 
 # This file provides default values for variables that may be overridden
@@ -696,6 +696,16 @@
 # Possible: any user name
 # Default: cyrus
 
+DBUS_GROUP?=   messagebus
+# Used in the dbus package to specify the group to run dbus as
+# Possible: any group name
+# Default: messagebus
+
+DBUS_USER?=    messagebus
+# Used in the dbus package to specify the user to run dbus as
+# Possible: any user name
+# Default: messagebus
+
 DEFANG_GROUP?= defang
 # Used in the mimedefang package to specify the group to run commands as
 # Possible: any group name
diff -r cf3e615bf745 -r f8dfb80ad959 sysutils/dbus/Makefile
--- a/sysutils/dbus/Makefile    Wed Nov 29 01:26:27 2006 +0000
+++ b/sysutils/dbus/Makefile    Wed Nov 29 10:11:53 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2006/11/13 15:16:20 drochner Exp $
+# $NetBSD: Makefile,v 1.19 2006/11/29 10:11:53 ghen Exp $
 #
 
 DISTNAME=      dbus-1.0.0
@@ -36,6 +36,7 @@
 CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR:Q}
 CONFIGURE_ARGS+=       --with-xml=expat
 CONFIGURE_ARGS+=       --without-x
+CONFIGURE_ARGS+=       --with-dbus-user=${DBUS_USER}
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.dbus
 PKG_SUPPORTED_OPTIONS+=        debug
@@ -59,10 +60,15 @@
 
 RCD_SCRIPTS=           dbus
 
-PKG_GROUPS=            messagebus
-PKG_USERS=             messagebus:messagebus
-PKG_GECOS.messagebus=  System message bus
-PKG_HOME.messagebus=   ${VARBASE}/run/dbus
+BUILD_DEFS+=           DBUS_USER DBUS_GROUP
+
+PKG_GROUPS=            ${DBUS_GROUP}
+PKG_USERS=             ${DBUS_USER}:${DBUS_GROUP}
+PKG_GECOS.${DBUS_USER}=        System message bus
+PKG_HOME.${DBUS_USER}= ${VARBASE}/run/dbus
+
+FILES_SUBST+=          DBUS_USER=${DBUS_USER}
+FILES_SUBST+=          DBUS_GROUP=${DBUS_GROUP}
 
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../textproc/expat/buildlink3.mk"
diff -r cf3e615bf745 -r f8dfb80ad959 sysutils/dbus/files/dbus.sh
--- a/sysutils/dbus/files/dbus.sh       Wed Nov 29 01:26:27 2006 +0000
+++ b/sysutils/dbus/files/dbus.sh       Wed Nov 29 10:11:53 2006 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: dbus.sh,v 1.5 2006/11/13 15:16:20 drochner Exp $
+# $NetBSD: dbus.sh,v 1.6 2006/11/29 10:11:53 ghen Exp $
 #
 # PROVIDE: dbus
 # REQUIRE: DAEMON
@@ -19,7 +19,7 @@
        if @TEST@ ! -d "@VARBASE@/run/dbus"; then
                @MKDIR@ "@VARBASE@/run/dbus"
                @CHMOD@ 0755 "@VARBASE@/run/dbus"
-               @CHOWN@ messagebus:messagebus "@VARBASE@/run/dbus"
+               @CHOWN@ @DBUS_USER@:@DBUS_GROUP@ "@VARBASE@/run/dbus"
        fi
        @PREFIX@/bin/dbus-uuidgen --ensure
 }



Home | Main Index | Thread Index | Old Index