Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2008 21:24:26 +0800 (CST)
From:      Gea-Suan Lin <gslin@gslin.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        gslin@gslin.org, des@FreeBSD.org
Subject:   ports/120756: [PATCH] sysutils/munin-node: Use fixed GID
Message-ID:  <20080217132426.CA69C1CC20@ccreader.NCTU.edu.tw>
Resent-Message-ID: <200802171330.m1HDU1hZ023984@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         120756
>Category:       ports
>Synopsis:       [PATCH] sysutils/munin-node: Use fixed GID
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 17 13:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Gea-Suan Lin
>Release:        FreeBSD 6.3-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD ccreader.NCTU.edu.tw 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #3: Tue Jan 15 11:22:08 CST 2008
>Description:
- Use fixed GID
- Fix FATAL message of "portlint -a"

Added file(s):
- files/munin-node.in

Removed file(s):
- files/munin-node.sh.in

Port maintainer (des@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- munin-node-1.2.5_3.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/munin-node/Makefile /home/staff/gslin/work/ports/munin-node/Makefile
--- /usr/ports/sysutils/munin-node/Makefile	2008-02-07 18:41:12.000000000 +0800
+++ /home/staff/gslin/work/ports/munin-node/Makefile	2008-02-17 21:21:59.000000000 +0800
@@ -7,7 +7,7 @@
 
 PORTNAME=	munin
 PORTVERSION=	1.2.5
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	sysutils perl5
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	munin
@@ -17,11 +17,11 @@
 MAINTAINER=	des@FreeBSD.org
 COMMENT=	Node-specific part of Munin
 
-USE_PERL5=	yes
-
 RUN_DEPENDS=	${SITE_PERL}/Net/Server/Fork.pm:${PORTSDIR}/net/p5-Net-Server
 BUILD_DEPENDS=	${RUN_DEPENDS}
 
+USE_PERL5=	yes
+
 .include <bsd.port.pre.mk>
 
 .if ${PERL_LEVEL} < 500800
@@ -32,7 +32,7 @@
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.r/rc/}
 PKGMESSAGE=	${WRKDIR}/pkg-message
 ALL_TARGET=	DATADIR=${DATADIR} PERL=${PERL} build build-man
-INSTALL_TARGET=	DATADIR=${DATADIR} PERL=${PERL} SITE_PERL_REL=$(SITE_PERL_REL) install-node install-node-plugins
+INSTALL_TARGET=	DATADIR=${DATADIR} PERL=${PERL} SITE_PERL_REL=${SITE_PERL_REL} install-node install-node-plugins
 MAKE_ENV=	LANG=C
 
 MAN5=		munin-node.conf.5
@@ -40,7 +40,7 @@
 
 SUB_FILES=	pkg-message munin-node.sh munin-node-revive.sh
 SUB_LIST=	RC_SUBR=${RC_SUBR}
-USE_RC_SUBR=	YES
+USE_RC_SUBR=	munin-node
 
 pre-install:
 	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
diff -ruN --exclude=CVS /usr/ports/sysutils/munin-node/files/munin-node.in /home/staff/gslin/work/ports/munin-node/files/munin-node.in
--- /usr/ports/sysutils/munin-node/files/munin-node.in	1970-01-01 08:00:00.000000000 +0800
+++ /home/staff/gslin/work/ports/munin-node/files/munin-node.in	2008-02-17 21:19:27.000000000 +0800
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+
+# PROVIDE: munin-node
+# REQUIRE: DAEMON
+# BEFORE:  cron
+
+#
+# Add the following lines to /etc/rc.conf to enable munin-node:
+# munin_node_enable (bool):      Set to "NO" by default.
+#                                Set it to "YES" to enable munin-node
+# munin_node_config (path):      Set to "%%PREFIX%%/etc/munin/munin-node.conf" by default.
+#
+
+. %%RC_SUBR%%
+
+name="munin_node"
+rcvar=`set_rcvar`
+
+[ -z "$munin_node_enable" ] && munin_node_enable="NO"
+[ -z "$munin_node_config" ] && munin_node_config="%%PREFIX%%/etc/munin/munin-node.conf"
+
+command="%%PREFIX%%/sbin/munin-node"
+pidfile=`awk '$1 == "pid_file" { print $2 }' $munin_node_config`
+
+load_rc_config $name
+run_rc_command "$1"
diff -ruN --exclude=CVS /usr/ports/sysutils/munin-node/files/munin-node.sh.in /home/staff/gslin/work/ports/munin-node/files/munin-node.sh.in
--- /usr/ports/sysutils/munin-node/files/munin-node.sh.in	2006-02-21 04:47:43.000000000 +0800
+++ /home/staff/gslin/work/ports/munin-node/files/munin-node.sh.in	1970-01-01 08:00:00.000000000 +0800
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-
-# PROVIDE: munin-node
-# REQUIRE: DAEMON
-# BEFORE:  cron
-
-#
-# Add the following lines to /etc/rc.conf to enable munin-node:
-# munin_node_enable (bool):      Set to "NO" by default.
-#                                Set it to "YES" to enable munin-node
-# munin_node_config (path):      Set to "%%PREFIX%%/etc/munin/munin-node.conf" by default.
-#
-
-. %%RC_SUBR%%
-
-name="munin_node"
-rcvar=`set_rcvar`
-
-[ -z "$munin_node_enable" ] && munin_node_enable="NO"
-[ -z "$munin_node_config" ] && munin_node_config="%%PREFIX%%/etc/munin/munin-node.conf"
-
-command="%%PREFIX%%/sbin/munin-node"
-pidfile=`awk '$1 == "pid_file" { print $2 }' $munin_node_config`
-
-load_rc_config $name
-run_rc_command "$1"
diff -ruN --exclude=CVS /usr/ports/sysutils/munin-node/pkg-install /home/staff/gslin/work/ports/munin-node/pkg-install
--- /usr/ports/sysutils/munin-node/pkg-install	2006-11-07 06:50:50.000000000 +0800
+++ /home/staff/gslin/work/ports/munin-node/pkg-install	2008-02-17 21:20:28.000000000 +0800
@@ -33,13 +33,14 @@
     local g
 
     g=$1
+    gid=$2
 
     if pw group show "${g}" >/dev/null 2>&1; then
 	echo "You already have a group \"${g}\", so I will use it."
     else
 	echo "You need a group \"${g}\"."
 	if which -s pw && yesno "Would you like me to create it" y; then
-	    pw groupadd ${g} || exit
+	    pw groupadd -g ${gid} ${g} || exit
 	    echo "Done."
 	else
 	    echo "Please create it, and try again."
@@ -109,7 +110,7 @@
 
 case $2 in
     PRE-INSTALL)
-	make_group munin
+	make_group munin 842
 	;;      
     POST-INSTALL)
 	if [ -z "${PACKAGE_BUILDING}" ]; then
diff -ruN --exclude=CVS /usr/ports/sysutils/munin-node/pkg-plist /home/staff/gslin/work/ports/munin-node/pkg-plist
--- /usr/ports/sysutils/munin-node/pkg-plist	2006-11-07 06:50:50.000000000 +0800
+++ /home/staff/gslin/work/ports/munin-node/pkg-plist	2008-02-17 21:23:17.000000000 +0800
@@ -7,7 +7,7 @@
 etc/munin/munin-node.conf.sample
 @unexec if cmp -s %D/etc/munin/plugin-conf.d/plugins.conf %D/etc/munin/plugin-conf.d/plugins.conf.sample; then rm -f %D/etc/munin/plugin-conf.d/plugins.conf; fi
 etc/munin/plugin-conf.d/plugins.conf.sample
-@unexec rm %D/etc/rc.d/munin-node.sh 2>/dev/null || true
+@unexec rm %D/etc/rc.d/munin-node 2>/dev/null || true
 sbin/munin-node
 sbin/munin-node-configure
 sbin/munin-node-configure-snmp
@@ -107,7 +107,7 @@
 %%DATADIR%%/plugins/sybase_space
 %%DATADIR%%/plugins/vmstat
 @unexec rm -f /var/run/munin/munin-node.pid
-@unexec rmdir /var/run/munin 2>/dev/null || true
+@dirrmtry /var/run/munin
 @dirrmtry var/munin/plugin-state
 @dirrmtry var/munin
 @dirrmtry %%DATADIR%%/plugins
--- munin-node-1.2.5_3.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080217132426.CA69C1CC20>