ports/103451: [maintainer update] sysutils/munin-node fix for PR 103436

Lupe Christoph lupe at lupe-christoph.de
Thu Sep 21 08:30:31 UTC 2006


>Number:         103451
>Category:       ports
>Synopsis:       [maintainer update] sysutils/munin-node fix for PR 103436
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 21 08:30:22 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Lupe Christoph
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD vmw-freebsd6.lupe-christoph.de 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
	Johan Strom found a problem in both Munin ports with the
	way a pre-existing user "munin" is detected. He proposed a
	patch to the patch that adapts the Makefile.config in the
	Munin distribution. This PR adopts his patch for the
	munin-main port, modifies pkg-install in a similar way, and
	bumps the port revision to 3. It also includes a fix to the
	plugin configuration file that sets FreeBSD-specific pathes.

        A similar patch for munin-main was already sent.
>How-To-Repeat:
	
>Fix:

	

--- munin-node.patch begins here ---
diff -ruN munin-node-1.2.4_1/Makefile munin-node-1.2.4_2/Makefile
--- munin-node-1.2.4_1/Makefile	Mon Dec 26 08:11:05 2005
+++ munin-node-1.2.4_2/Makefile	Thu Sep 21 10:20:27 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	munin
 PORTVERSION=	1.2.4
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	sysutils perl5
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	munin
diff -ruN munin-node-1.2.4_1/files/patch-Makefile.config munin-node-1.2.4_2/files/patch-Makefile.config
--- munin-node-1.2.4_1/files/patch-Makefile.config	Tue Mar 22 12:36:04 2005
+++ munin-node-1.2.4_2/files/patch-Makefile.config	Thu Sep 21 09:25:22 2006
@@ -78,8 +78,8 @@
 -GETENT = $(shell which getent || which true 2>/dev/null)
 -CHECKUSER  = $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
 -CHECKGROUP = $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2"))
-+CHECKUSER:= $(shell grep $(USER) /etc/passwd >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
-+CHECKGROUP:= $(shell grep $(GROUP) /etc/group >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2"))
++CHECKUSER:= $(shell /usr/sbin/pw user show $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
++CHECKGROUP:= $(shell /usr/sbin/pw group show $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2"))
  
  CHOWN      = chown
  CHMOD      = chmod
diff -ruN munin-node-1.2.4_1/files/plugins.conf munin-node-1.2.4_2/files/plugins.conf
--- munin-node-1.2.4_1/files/plugins.conf	Fri Mar  4 18:47:19 2005
+++ munin-node-1.2.4_2/files/plugins.conf	Thu Sep 21 10:15:29 2006
@@ -2,34 +2,47 @@
 # This file contains configuration options for the plugins. Three
 # options are understood by munin-node itself:
 #
-# 	user <user>         # Set the user to run the plugin as
-# 	group <group>       # Set the group to run the plugin as
-# 	command <command>   # Run <command> instead of the plugin. %c
-# 	                      expands to what would normally be run.
+#   user <user>         # Set the user to run the plugin as
+#   group <group>       # Set the group to run the plugin as
+#   command <command>   # Run <command> instead of the plugin. %c
+#                         expands to what would normally be run.
 #   env.<variable>      # Sets <variable> in the plugin's environment, see the
 #                         individual plugins to find out which variables they
 #                         care about.
 #
-#
-
-[mysql*]
-#env.mysqlopts -u someuser
+# Note that many of the environment variables are just guesses
+# because the port maintainer did not bother to install all the
+# software that the Munin plugins can monitor. Please don't hesitate
+# to file a PR against the munin-node port if you find an error.
+
+# The logtail program used by many plugins is installed with the
+# port security/logcheck. The munin-node port has no dependency on
+# that port because most plugins do not require it.
+
+[amavis]
+env.amavislog /var/log/maillog
+env.logtail /usr/local/bin/logtail
+
+[courier_*]
+env.logfile /var/log/maillog
+env.logtail /usr/local/bin/logtail
+
+[dhcp3]
+env.configfile /usr/local/etc/dhcpd.conf
+env.leasefile /var/db/dhcpd.leases
 
 [exim*]
 group mail
+env.exim /usr/local/sbin/exim
 
-[cps*]
-user root
-
-[apt]
-user root
-
-[vlan*]
-user root
+[mysql*]
+env.mysqladmin /usr/local/bin/mysqladmin
+env.mysqlshow /usr/local/bin/mysqlshow
 
 [postfix*]
 user root
-env.logfile maillog
+env.logfile /var/log/maillog
 
 [sendmail*]
 env.mspqueue /var/spool/clientmqueue
+env.mailstats /usr/sbin/mailstats
diff -ruN munin-node-1.2.4_1/pkg-install munin-node-1.2.4_2/pkg-install
--- munin-node-1.2.4_1/pkg-install	Fri Mar  4 18:47:19 2005
+++ munin-node-1.2.4_2/pkg-install	Thu Sep 21 09:25:47 2006
@@ -43,7 +43,7 @@
 	    echo "Done."
 	else
 	    echo "Please create it, and try again."
-	    if ! grep -q "^${u}:" /etc/passwd; then
+	    if ! /usr/sbin/pw user show ${u} >/dev/null 2>/dev/null; then
 		echo "While you're at it, please create a user \"${u}\" too,"
 		echo "with a default group of \"${g}\"."
 	    fi
--- munin-node.patch ends here ---


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



More information about the freebsd-ports-bugs mailing list