ports/77721: [maintainer update] sysutils/munin-node 1.0.4 -> 1.2.0

Lupe Christoph lupe at lupe-christoph.de
Sat Feb 19 08:20:16 UTC 2005


>Number:         77721
>Category:       ports
>Synopsis:       [maintainer update] sysutils/munin-node 1.0.4 -> 1.2.0
>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:   Sat Feb 19 08:20:14 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Lupe Christoph
>Release:        FreeBSD 4.10-RELEASE i386
>Organization:
>Environment:
System: FreeBSD vmw-freebsd4.lupe-christoph.de 4.10-RELEASE FreeBSD 4.10-RELEASE #0: Tue May 25 22:47:12 GMT 2004 root at perseus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
	Update to support Munin 1.2.0
	Changes that were in the 1.0.5 update that did not get applied:
		Upgrade FreeBSD4 support to rcNG.
		Use INSTALL_SCRIPT to install the start-stop script.   
		Remove patches to support 6-CURRENT, Munin has that now in the tarball.
		Correct rcNG version of pkg-message, adding PREFIX.
	New changes:
		Remove NOPRECIOUSMAKEVARS, Munin has been corrected
		Use SUB_FILES and SUB_LIST
		Add log rotation support. The unreliable signals in perl < 5.8.0
		necessitate an "revive" script
	Files changed:
		Makefile 
		distinfo
		pkg-deinstall
		pkg-install
		pkg-plist 
>How-To-Repeat:
	
>Fix:

	

--- munin-node-1.2.0.patch begins here ---
diff -duN munin-node-1.0.4/Makefile munin-node-1.2.0/Makefile
--- munin-node-1.0.4/Makefile	Sun Nov 21 11:47:09 2004
+++ munin-node-1.2.0/Makefile	Thu Feb 17 17:41:25 2005
@@ -2,16 +2,16 @@
 # Date created:				25 Januar 2004
 # Whom:					Lupe Christoph <lupe at lupe-christoph.de>
 #
-# $FreeBSD: ports/sysutils/munin-node/Makefile,v 1.10 2004/11/16 15:16:37 leeym Exp $
+# $FreeBSD: ports/sysutils/munin-node/Makefile,v 1.12 2004/12/14 01:43:10 sem Exp $
 #
 
 PORTNAME=	munin
-PORTVERSION=	1.0.4
+PORTVERSION=	1.2.0
 CATEGORIES=	sysutils perl5
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	munin
 PKGNAMESUFFIX=	-node
-DISTNAME=	${PORTNAME}_${PORTVERSION:S/.p/pre/}
+DISTNAME=	${PORTNAME}_${PORTVERSION:S/.r/rc/}
 
 MAINTAINER=	lupe at lupe-christoph.de
 COMMENT=	Node-specific part of Munin
@@ -27,37 +27,31 @@
 
 USE_GMAKE=	yes
 PATCH_STRIP=	-p1
-WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.p/pre/}
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.r/rc/}
 PKGMESSAGE=	${WRKDIR}/pkg-message
-ALL_TARGET=	DATADIR=${DATADIR} build build-man
-INSTALL_TARGET=	DATADIR=${DATADIR} install-node install-node-plugins
+ALL_TARGET=	DATADIR=${DATADIR} PERL=${PERL} build build-man
+INSTALL_TARGET=	DATADIR=${DATADIR} PERL=${PERL} install-node install-node-plugins
 MAKE_ENV=	LANG=C
-NOPRECIOUSMAKEVARS=yes
 
 MAN5=		munin-node.conf.5
 MAN8=		munin-node-configure.8 munin-node.8 munin-run.8
 
-.if ${OSVERSION} < 500000
-PKGMSG=${FILESDIR}/pkg-message.4
-STARTSTOP_SRC=${FILESDIR}/munin-node.sh
-STARTSTOP_DST=${PREFIX}/etc/rc.d/munin-node.sh
-.else
-PKGMSG=${FILESDIR}/pkg-message
-STARTSTOP_SRC=${FILESDIR}/munin_node.sh
-STARTSTOP_DST=/etc/rc.d/munin_node
-.endif
+SUB_FILES=	pkg-message munin-node.sh munin-node-revive.sh
+SUB_LIST=	RC_SUBR=${RC_SUBR}
+USE_RC_SUBR=	YES
 
 pre-install:
-	@${SED} 's@%%PREFIX%%@${PREFIX}@g' ${PKGMSG} > ${PKGMESSAGE}
 	@PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL
 
 post-install:
-	@${SED} 's@%PREFIX%@${LOCALBASE}@g' ${STARTSTOP_SRC} > ${STARTSTOP_DST}
-	@${CHMOD} +x ${STARTSTOP_DST}
+	${INSTALL_SCRIPT} ${WRKDIR}/munin-node.sh ${PREFIX}/etc/rc.d/munin-node.sh
+.if ${PERL_LEVEL} < 500800
+	${INSTALL_SCRIPT} ${WRKDIR}/munin-node-revive.sh ${PREFIX}/bin/munin-node-revive
+.endif
 	${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf ${PREFIX}/etc/munin/munin-node.conf.sample
-	${INSTALL_DATA} ${WRKSRC}/plugins.conf ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample
+	${INSTALL_DATA} files/plugins.conf ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample
 	@if [ ! -f ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf ]; then \
-		${INSTALL_DATA} ${WRKSRC}/plugins.conf ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf; \
+		${INSTALL_DATA} ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf; \
 	fi
 	@${CAT} ${PKGMESSAGE}
 	@${INSTALL_MAN} -C ${WRKSRC}/build/doc/munin-node.conf.5 ${PREFIX}/man/man5
diff -duN munin-node-1.0.4/distinfo munin-node-1.2.0/distinfo
--- munin-node-1.0.4/distinfo	Sun Nov 21 11:42:35 2004
+++ munin-node-1.2.0/distinfo	Thu Feb 17 17:41:28 2005
@@ -1,2 +1,2 @@
-MD5 (munin_1.0.4.tar.gz) = 00721181e1ff81be85ad89307457d998
-SIZE (munin_1.0.4.tar.gz) = 214902
+MD5 (munin_1.2.0.tar.gz) = bbab7bf91ac837e4c72889aaef7cf2e8
+SIZE (munin_1.2.0.tar.gz) = 318364
Common subdirectories: munin-node-1.0.4/files and munin-node-1.2.0/files
diff -duN munin-node-1.0.4/pkg-deinstall munin-node-1.2.0/pkg-deinstall
--- munin-node-1.0.4/pkg-deinstall	Sun Nov 21 11:52:27 2004
+++ munin-node-1.2.0/pkg-deinstall	Tue Feb  1 12:44:54 2005
@@ -1,13 +1,4 @@
 #! /bin/sh
-#
-# $Log: pkg-deinstall,v $
-# Revision 1.2.2.1  2004/11/21 10:52:27  lupe
-# make stop_process use old or new start-stop script.
-#
-# Revision 1.2  2004/02/06 18:49:58  lupe
-# Fixes for pkg_add compatibility.
-#
-#
 
 ask() {
     local question default answer
@@ -39,6 +30,8 @@
 }
 
 stop_process() {
+    STARTSTOP=${PKG_PREFIX}/etc/rc.d/munin-node.sh
+
     if [ -x $STARTSTOP ]; then
 	$STARTSTOP stop
     fi
@@ -54,17 +47,45 @@
     fi
 }
 
-OSVERSION=`/sbin/sysctl -n kern.osreldate`
-if [ $OSVERSION -lt 500000 ]; then
-    STARTSTOP=${PKG_PREFIX}/etc/rc.d/munin-node.sh
-else
-    STARTSTOP=/etc/rc.d/munin_node
-fi
+delete_crontab_entries() {
+    local prog
+    prog=$1
+
+    if grep -q "^[^#]*$prog" /etc/crontab; then
+	TMPFILE=`mktemp -t munin` || exit 1
+	grep -v $prog /etc/crontab > $TMPFILE
+	cat $TMPFILE > /etc/crontab
+	rm $/etc/crontab
+    fi
+}
+
+delnewsyslog() {
+    tmp="/etc/#munin-node$$"
+    sed -e '/^\/var\/log\/munin-node.log[ 	]/d' /etc/newsyslog.conf >${tmp}
+    cat ${tmp} > /etc/newsyslog.conf
+    rm ${tmp}
+}
+
+newsyslog() {
+    ENTRY=`grep /var/log/munin-node.log /etc/newsyslog.conf`
+    DEFAULT='/var/log/munin-node.log			644  7	   *	@T00  Z	/var/run/munin/munin-node.pid'
+    if [ -z "$ENTRY" ]; then
+	exit 0
+    elif [ "$ENTRY" = "$DEFAULT" ]; then
+	delnewsyslog
+    elif yesno "You have changed the default munin-node entry in \"/etc/newsyslog.conf\".
+Do you want me to delete it?" y; then
+	delnewsyslog
+	echo "Done."
+    fi
+}
+
 
 case $2 in
     DEINSTALL)
+	delete_crontab_entries ${PKG_PREFIX}/bin/munin-node-revive
 	stop_process
-	exit 0 # ignore error
+	newsyslog
 	;;
     POST-DEINSTALL)
 	delete_group munin
diff -duN munin-node-1.0.4/pkg-install munin-node-1.2.0/pkg-install
--- munin-node-1.0.4/pkg-install	Fri Feb  6 19:49:58 2004
+++ munin-node-1.2.0/pkg-install	Mon Feb  7 11:57:07 2005
@@ -1,10 +1,4 @@
 #! /bin/sh
-#
-# $Log: pkg-install,v $
-# Revision 1.2  2004/02/06 18:49:58  lupe
-# Fixes for pkg_add compatibility.
-#
-#
 
 ask() {
     local question default answer
@@ -63,8 +57,6 @@
 	prevver=$(cat ${PKG_PREFIX}/etc/munin/VERSION.node)
     fi
 
-    mkdir -p ${PKG_PREFIX}/etc/munin/plugins ${PKG_PREFIX}/var/munin/plugin-state
-
     if [ -n "$prevver" ]; then
 	echo -n "Initializing new plugins.."
 	${PKG_PREFIX}/sbin/munin-node-configure --shell --newer "${prevver%-*}" | sh -x
@@ -75,6 +67,43 @@
     echo "done."
 }
 
+create_crontab_entries() {
+    local sched prog
+    sched=$1
+    prog=$2
+
+    if grep -q "^[^#]*$prog" /etc/crontab; then
+	echo "It looks like your crontab is already set up, so I'll use that."
+    else
+	echo "It looks like your perl suffers from unsafe signals."
+	if yesno "Would you like me to set up your root crontab to restart munin-node" y; then
+	    cat <<EOT >>/etc/crontab
+$sched	root	$prog
+EOT
+	else
+	    echo "You may suffer from munin-node crashing after log rotation."
+	    echo "If you still want to restart munin-node, use $prog."
+	fi
+    fi
+}
+
+newsyslog() {
+    if yesno "Would you like me to set up log rotation" y; then
+	if grep -q /var/log/munin-node.log /etc/newsyslog.conf; then
+	    :
+	else
+	    cat >> /etc/newsyslog.conf <<EOT
+/var/log/munin-node.log			644  7	   *	@T00  Z	/var/run/munin/munin-node.pid
+EOT
+	fi
+	if [ -f ${PKG_PREFIX}/bin/munin-node-revive ]; then
+	    create_crontab_entries '4	*	*	*	*' ${PKG_PREFIX}/bin/munin-node-revive
+	fi
+    else
+	echo "/var/log/munin-node.log will grow without bounds."
+    fi
+}
+
 
 ########################################################################
 
@@ -84,5 +113,7 @@
 	;;      
     POST-INSTALL)
 	init_plugins
+	${PKG_PREFIX}/etc/rc.d/munin-node.sh start
+	newsyslog
 	;;      
 esac
diff -duN munin-node-1.0.4/pkg-plist munin-node-1.2.0/pkg-plist
--- munin-node-1.0.4/pkg-plist	Fri Nov 26 07:57:23 2004
+++ munin-node-1.2.0/pkg-plist	Mon Feb  7 12:01:11 2005
@@ -1,12 +1,16 @@
+ at exec mkdir -p %D/etc/munin/plugins
+ at exec mkdir -p %D/etc/munin/plugin-conf.d && chmod 755 %D/etc/munin/plugin-conf.d
+ at exec mkdir -p %D/var/munin/plugin-state && chgrp munin %D/var/munin/plugin-state && chmod 775 %D/var/munin/plugin-state
+ at unexec rm %D/bin/munin-node-revive 2>/dev/null || true
 @comment etc/munin/VERSION.node must remain for upgrade version check
 @unexec if cmp -s %D/etc/munin/munin-node.conf %D/etc/munin/munin-node.conf.sample; then rm -f %D/etc/munin/munin-node.conf; fi
 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
- at unexec rm /etc/rc.d/munin_node 2>/dev/null || true
 sbin/munin-node
 sbin/munin-node-configure
+sbin/munin-node-configure-snmp
 sbin/munin-run
 %%DATADIR%%/plugins/acpi
 %%DATADIR%%/plugins/amavis
@@ -14,22 +18,38 @@
 %%DATADIR%%/plugins/apache_processes
 %%DATADIR%%/plugins/apache_volume
 %%DATADIR%%/plugins/apc_envunit_
+%%DATADIR%%/plugins/apc_nis
 %%DATADIR%%/plugins/bind9
+%%DATADIR%%/plugins/bind9_rndc
+%%DATADIR%%/plugins/courier_
+%%DATADIR%%/plugins/courier_mta_mailqueue
+%%DATADIR%%/plugins/courier_mta_mailstats
+%%DATADIR%%/plugins/courier_mta_mailvolume
 %%DATADIR%%/plugins/cpu
+%%DATADIR%%/plugins/cupsys_pages
 %%DATADIR%%/plugins/df
 %%DATADIR%%/plugins/df_inode
+%%DATADIR%%/plugins/dhcpd3
 %%DATADIR%%/plugins/exim_mailqueue
+%%DATADIR%%/plugins/exim_mailqueue_alt
 %%DATADIR%%/plugins/exim_mailstats
-%%DATADIR%%/plugins/folding at home
+%%DATADIR%%/plugins/foldingathome
+%%DATADIR%%/plugins/foldingathome_rank
+%%DATADIR%%/plugins/foldingathome_wu
 %%DATADIR%%/plugins/hddtemp
 %%DATADIR%%/plugins/hddtemp2
+%%DATADIR%%/plugins/hddtemp_smartctl
+%%DATADIR%%/plugins/hddtempd
 %%DATADIR%%/plugins/if_
 %%DATADIR%%/plugins/if_errcoll_
 %%DATADIR%%/plugins/ipac-ng
 %%DATADIR%%/plugins/ircu
 %%DATADIR%%/plugins/load
+%%DATADIR%%/plugins/loggrep
 %%DATADIR%%/plugins/mailman
+%%DATADIR%%/plugins/mailscanner
 %%DATADIR%%/plugins/memory
+%%DATADIR%%/plugins/mhttping
 %%DATADIR%%/plugins/multips
 %%DATADIR%%/plugins/munin_graph
 %%DATADIR%%/plugins/munin_update
@@ -40,9 +60,15 @@
 %%DATADIR%%/plugins/mysql_threads
 %%DATADIR%%/plugins/named
 %%DATADIR%%/plugins/netstat
+%%DATADIR%%/plugins/ntp_
+%%DATADIR%%/plugins/ntp_states
+%%DATADIR%%/plugins/nut_misc
+%%DATADIR%%/plugins/nut_volts
 %%DATADIR%%/plugins/open_files
+%%DATADIR%%/plugins/perdition
+%%DATADIR%%/plugins/ping_
 %%DATADIR%%/plugins/plugins.history
-%%DATADIR%%/plugins/pm3users
+%%DATADIR%%/plugins/pm3users_
 %%DATADIR%%/plugins/pop_stats
 %%DATADIR%%/plugins/postfix_mailqueue
 %%DATADIR%%/plugins/postfix_mailstats
@@ -54,6 +80,7 @@
 %%DATADIR%%/plugins/sendmail_mailqueue
 %%DATADIR%%/plugins/sendmail_mailstats
 %%DATADIR%%/plugins/sendmail_mailtraffic
+%%DATADIR%%/plugins/smart_
 %%DATADIR%%/plugins/snmp__df
 %%DATADIR%%/plugins/snmp__fc_if_
 %%DATADIR%%/plugins/snmp__fc_if_err_
@@ -61,6 +88,13 @@
 %%DATADIR%%/plugins/snmp__if_err_
 %%DATADIR%%/plugins/snmp__load
 %%DATADIR%%/plugins/snmp__processes
+%%DATADIR%%/plugins/snmp__sensors_fsc_bx_fan
+%%DATADIR%%/plugins/snmp__sensors_fsc_bx_temp
+%%DATADIR%%/plugins/snmp__sensors_fsc_fan
+%%DATADIR%%/plugins/snmp__sensors_fsc_temp
+%%DATADIR%%/plugins/snmp__sensors_mbm_fan
+%%DATADIR%%/plugins/snmp__sensors_mbm_temp
+%%DATADIR%%/plugins/snmp__sensors_mbm_volt
 %%DATADIR%%/plugins/snmp__users
 %%DATADIR%%/plugins/spamstats
 %%DATADIR%%/plugins/squid_cache
@@ -71,8 +105,11 @@
 %%DATADIR%%/plugins/swap
 %%DATADIR%%/plugins/sybase_space
 %%DATADIR%%/plugins/vmstat
+ at unexec rm -f /var/run/munin/munin-node.pid
+ at unexec rmdir /var/run/munin 2>/dev/null || true
 @unexec rmdir %D/var/munin/plugin-state 2>/dev/null || true
 @unexec rmdir %D/var/munin 2>/dev/null || true
+ at unexec rmdir %D/%%DATADIR%%/plugins 2>/dev/null || true
 @unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
 @unexec rmdir %D/etc/munin/plugin-conf.d 2>/dev/null || true
 @unexec rmdir %D/etc/munin 2>/dev/null || true
--- munin-node-1.2.0.patch ends here ---


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



More information about the freebsd-ports-bugs mailing list