Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Nov 2014 15:04:20 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r372671 - in head/sysutils/munin-node: . files
Message-ID:  <201411171504.sAHF4KQ1006422@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Mon Nov 17 15:04:19 2014
New Revision: 372671
URL: https://svnweb.freebsd.org/changeset/ports/372671
QAT: https://qat.redports.org/buildarchive/r372671/

Log:
  - Fix bugs in if_* (prompted by [1])
  - Add a new PERL option to add some extra dependencies needed by some modules
    (based on [2])
  
  PR:		194733 [1] 195021 [2]
  Submitted by:	Claudius Herder [1]  John W. O'Brien [2]
  Sponsored by:	Absolight

Modified:
  head/sysutils/munin-node/Makefile
  head/sysutils/munin-node/files/patch-node__munin-node.conf.in
  head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__if_.in
  head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__if_errcoll_.in
  head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__if_packets_.in
  head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__iostat.in
  head/sysutils/munin-node/files/patch-plugins__node.d__hddtemp_smartctl.in
  head/sysutils/munin-node/files/patch-plugins__node.d__multiping.in
  head/sysutils/munin-node/files/patch-plugins__node.d__squeezebox_.in
  head/sysutils/munin-node/pkg-plist

Modified: head/sysutils/munin-node/Makefile
==============================================================================
--- head/sysutils/munin-node/Makefile	Mon Nov 17 14:41:24 2014	(r372670)
+++ head/sysutils/munin-node/Makefile	Mon Nov 17 15:04:19 2014	(r372671)
@@ -3,6 +3,7 @@
 
 PORTNAME=	munin
 PORTVERSION=	${MUNIN_VERSION}
+PORTREVISION=	1
 CATEGORIES=	sysutils perl5
 MASTER_SITES=	${MUNIN_SITES}
 PKGNAMESUFFIX=	-node
@@ -35,14 +36,19 @@ ALL_TARGET=	build-node build-plugins
 INSTALL_TARGET=	install-node-prime install-plugins-prime
 NO_ARCH=	yes
 
-OPTIONS_DEFINE=	SNMP JAVA
-OPTIONS_DEFAULT=	SNMP
+OPTIONS_DEFINE=	SNMP PERL JAVA
+OPTIONS_DEFAULT=	SNMP PERL
 OPTIONS_SUB=	yes
 SNMP_DESC=	Include SNMP plugins
+PERL_DESC=	Include all Perl modules (adds dependencies)
 JAVA_DESC=	Include JAVA plugins
 
-SNMP_BUILD_DEPENDS+=	p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP
-SNMP_RUN_DEPENDS+=	p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP
+SNMP_BUILD_DEPENDS=	p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP
+SNMP_RUN_DEPENDS=	p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP
+PERL_RUN_DEPENDS=	p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg \
+		p5-Net-DNS>=0:${PORTSDIR}/dns/p5-Net-DNS \
+		p5-XML-Parser>=0:${PORTSDIR}/textproc/p5-XML-Parser \
+		p5-XML-LibXML>=0:${PORTSDIR}/textproc/p5-XML-LibXML
 JAVA_USE=	java=yes
 JAVA_INSTALL_TARGET=	install-plugins-java
 JAVA_BUILD=	yes

Modified: head/sysutils/munin-node/files/patch-node__munin-node.conf.in
==============================================================================
--- head/sysutils/munin-node/files/patch-node__munin-node.conf.in	Mon Nov 17 14:41:24 2014	(r372670)
+++ head/sysutils/munin-node/files/patch-node__munin-node.conf.in	Mon Nov 17 15:04:19 2014	(r372671)
@@ -1,6 +1,6 @@
---- node/munin-node.conf.in.orig	2014-04-22 19:29:32 UTC
+--- node/munin-node.conf.in.orig	2014-10-26 14:12:24 UTC
 +++ node/munin-node.conf.in
-@@ -10,7 +10,7 @@
+@@ -10,7 +10,7 @@ background 1
  setsid 1
  
  user root
@@ -9,7 +9,7 @@
  
  # This is the timeout for the whole transaction.
  # Units are in sec. Default is 15 min
-@@ -30,6 +30,7 @@
+@@ -30,6 +30,7 @@ ignore_file %$
  ignore_file \.dpkg-(tmp|new|old|dist)$
  ignore_file \.rpm(save|new)$
  ignore_file \.pod$

Modified: head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__if_.in
==============================================================================
--- head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__if_.in	Mon Nov 17 14:41:24 2014	(r372670)
+++ head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__if_.in	Mon Nov 17 15:04:19 2014	(r372671)
@@ -9,7 +9,7 @@
  		echo yes
  		exit 0
  	else
-@@ -32,8 +32,12 @@
+@@ -32,8 +32,12 @@ if [ "$1" = "autoconf" ]; then
  fi
  
  if [ "$1" = "suggest" ]; then
@@ -24,26 +24,38 @@
  		exit 0
  	else
  		exit 1
-@@ -68,8 +72,10 @@
+@@ -68,8 +72,14 @@ BEGIN { rsum = 0; osum = 0; }
  /<Link#[0-9]*>/ {
  	if (NF == 10) { 
  		rsum += $6; osum += $9;
 -	} else {
+-		rsum += $7; osum += $10;
 +	} else if (NF == 11) {
- 		rsum += $7; osum += $10;
++		if ($4 ~ /:/) {
++			rsum += $7; osum += $10;
++		} else {
++			rsum += $7; osum += $10;
++		}
 +	} else { # NF == 12
 +		rsum += $8; osum += $11;
  	}
  }
  END {
-@@ -83,9 +89,13 @@
+@@ -83,9 +93,18 @@ else
  	if (NF == 10) { 
  		print "rbytes.value", $6;
  		print "obytes.value", $9;
 -	} else {
+-		print "rbytes.value", $7;
+-		print "obytes.value", $10;
 +	} else if (NF == 11) {
- 		print "rbytes.value", $7;
- 		print "obytes.value", $10;
++		if ($4 ~ /:/) {
++			print "rbytes.value", $7;
++			print "obytes.value", $10;
++		} else {
++			print "rbytes.value", $7;
++			print "obytes.value", $10;
++		}
 +	} else { # NF == 12
 +		print "rbytes.value", $8;
 +		print "obytes.value", $11;

Modified: head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__if_errcoll_.in
==============================================================================
--- head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__if_errcoll_.in	Mon Nov 17 14:41:24 2014	(r372670)
+++ head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__if_errcoll_.in	Mon Nov 17 15:04:19 2014	(r372671)
@@ -9,7 +9,7 @@
  		echo yes
  		exit 0
  	else
-@@ -29,8 +29,12 @@
+@@ -29,8 +29,12 @@ if [ "$1" = "autoconf" ]; then
  fi
  
  if [ "$1" = "suggest" ]; then
@@ -24,17 +24,25 @@
  		exit 0
  	else
  		exit 1
-@@ -59,9 +63,13 @@
+@@ -59,9 +63,19 @@ fi;
  		print "ierrors.value", $5;
  		print "oerrors.value", $8;
  		print "collisions.value", $10;
 -	} else {
 +	} else if (NF == 11) {
- 		print "ierrors.value", $6;
- 		print "oerrors.value", $9;
- 		print "collisions.value", $11;
++		if ($4 ~ /:/) {
++			print "ierrors.value", $6;
++			print "oerrors.value", $9;
++			print "collisions.value", $11;
++		} else {
++			print "ierrors.value", $5;
++			print "oerrors.value", $9;
++			print "collisions.value", $11;
++		}
 +	} else { # NF == 12
-+		print "ierrors.value", $6;
+ 		print "ierrors.value", $6;
+-		print "oerrors.value", $9;
+-		print "collisions.value", $11;
 +		print "oerrors.value", $10;
 +		print "collisions.value", $12;
  	}

Modified: head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__if_packets_.in
==============================================================================
--- head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__if_packets_.in	Mon Nov 17 14:41:24 2014	(r372670)
+++ head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__if_packets_.in	Mon Nov 17 15:04:19 2014	(r372671)
@@ -1,6 +1,6 @@
---- plugins/node.d.freebsd/if_packets_.in.orig	2014-10-27 10:21:08 UTC
+--- plugins/node.d.freebsd/if_packets_.in.orig	2014-11-17 14:29:50 UTC
 +++ plugins/node.d.freebsd/if_packets_.in
-@@ -0,0 +1,101 @@
+@@ -0,0 +1,110 @@
 +#!@@GOODSH@@
 +# -*- sh -*-
 +#
@@ -76,7 +76,11 @@
 +	if (NF == 10) { 
 +		rsum += $4; osum += $7;
 +	} else if (NF == 11) {
-+		rsum += $5; osum += $8;
++		if ($4 ~ /:/) {
++			rsum += $5; osum += $8;
++		} else {
++			rsum += $4; osum += $8;
++		}
 +	} else { # NF == 12
 +		rsum += $6; osum += $9;
 +	}
@@ -93,10 +97,15 @@
 +		print "rpackets.value", $4;
 +		print "opackets.value", $7;
 +	} else if (NF == 11) {
-+		print "rbytes.value", $5;
-+		print "obytes.value", $8;
++		if ($4 ~ /:/) {
++			print "rpackets.value", $5;
++			print "opackets.value", $8;
++		} else {
++			print "rpackets.value", $4;
++			print "opackets.value", $8;
++		}
 +	} else { # NF == 12
-+		print "rpackets.value", $6;
++		print "rpackets.value", $5;
 +		print "opackets.value", $9;
 +	}
 +}'

Modified: head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__iostat.in
==============================================================================
--- head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__iostat.in	Mon Nov 17 14:41:24 2014	(r372670)
+++ head/sysutils/munin-node/files/patch-plugins__node.d.freebsd__iostat.in	Mon Nov 17 15:04:19 2014	(r372671)
@@ -1,6 +1,6 @@
---- plugins/node.d.freebsd/iostat.in.orig	2014-04-22 19:29:32 UTC
+--- plugins/node.d.freebsd/iostat.in.orig	2014-10-26 14:12:24 UTC
 +++ plugins/node.d.freebsd/iostat.in
-@@ -56,13 +56,11 @@
+@@ -56,13 +56,11 @@ if [ "$1" = "config" ]; then
      for d in $drives; do
         echo "${d}_read.label ${d}"
         echo "${d}_read.type DERIVE"

Modified: head/sysutils/munin-node/files/patch-plugins__node.d__hddtemp_smartctl.in
==============================================================================
--- head/sysutils/munin-node/files/patch-plugins__node.d__hddtemp_smartctl.in	Mon Nov 17 14:41:24 2014	(r372670)
+++ head/sysutils/munin-node/files/patch-plugins__node.d__hddtemp_smartctl.in	Mon Nov 17 15:04:19 2014	(r372671)
@@ -1,6 +1,6 @@
---- plugins/node.d/hddtemp_smartctl.in.orig	2014-04-22 19:29:32 UTC
+--- plugins/node.d/hddtemp_smartctl.in.orig	2014-10-26 14:12:24 UTC
 +++ plugins/node.d/hddtemp_smartctl.in
-@@ -162,7 +162,7 @@
+@@ -162,7 +162,7 @@ if ($^O eq 'linux') {
    
  } elsif ($^O eq 'freebsd') {
    opendir(DEV, '/dev');

Modified: head/sysutils/munin-node/files/patch-plugins__node.d__multiping.in
==============================================================================
--- head/sysutils/munin-node/files/patch-plugins__node.d__multiping.in	Mon Nov 17 14:41:24 2014	(r372670)
+++ head/sysutils/munin-node/files/patch-plugins__node.d__multiping.in	Mon Nov 17 15:04:19 2014	(r372671)
@@ -1,6 +1,6 @@
---- plugins/node.d/multiping.in.orig	2014-04-22 19:29:32 UTC
+--- plugins/node.d/multiping.in.orig	2014-10-26 14:12:24 UTC
 +++ plugins/node.d/multiping.in
-@@ -59,6 +59,7 @@
+@@ -59,6 +59,7 @@ if [ -z "$host" ]; then
      host=${host:-${file_host:-www.google.com}}
  fi
  

Modified: head/sysutils/munin-node/files/patch-plugins__node.d__squeezebox_.in
==============================================================================
--- head/sysutils/munin-node/files/patch-plugins__node.d__squeezebox_.in	Mon Nov 17 14:41:24 2014	(r372670)
+++ head/sysutils/munin-node/files/patch-plugins__node.d__squeezebox_.in	Mon Nov 17 15:04:19 2014	(r372671)
@@ -1,6 +1,6 @@
---- plugins/node.d/squeezebox_.in.orig	2014-04-22 19:29:32 UTC
+--- plugins/node.d/squeezebox_.in.orig	2014-10-26 14:12:24 UTC
 +++ plugins/node.d/squeezebox_.in
-@@ -157,7 +157,7 @@
+@@ -157,7 +157,7 @@ if [ "$CMD" = "years" ]; then
  		printf "graph_order y"
          echo $years_array | sed 's/ / y/g'
  
@@ -9,7 +9,7 @@
  			year=$(echo ${arr1[$i]})
  			if [ $year = 0 ]; then
  				echo y0.label No year
-@@ -172,7 +172,7 @@
+@@ -172,7 +172,7 @@ if [ "$CMD" = "years" ]; then
  		done
  		exit 0
  	fi
@@ -18,7 +18,7 @@
  		year=$(echo ${arr1[$i]})
  		printf "y%s.value " ${year}
  		printf "%b" "albums 0 0 year:${year}\nexit\n" | $NC $HOST $PORT | sed 's/%3A/:/g' | cut -d ':' -f 3
-@@ -183,7 +183,7 @@
+@@ -183,7 +183,7 @@ elif [ "$CMD" = "signalstrength" -o "$CM
              echo "graph_category Squeezebox"
              COUNT=$(printf "%b" "player count ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 3)
              (( COUNT-- ))
@@ -27,7 +27,7 @@
                  MAC=$(printf "%b" "player id $ID ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 4 | sed 's/%3A/:/g')
  		NAME=$(printf "%b" "player name $MAC ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 4 | sed 's/%20/ /g')
  		MAC2=$(echo $MAC | sed 's/://g; s/\./_/g')
-@@ -193,7 +193,7 @@
+@@ -193,7 +193,7 @@ elif [ "$CMD" = "signalstrength" -o "$CM
          fi
          COUNT=$(printf "%b" "player count ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 3)
          (( COUNT-- ))

Modified: head/sysutils/munin-node/pkg-plist
==============================================================================
--- head/sysutils/munin-node/pkg-plist	Mon Nov 17 14:41:24 2014	(r372670)
+++ head/sysutils/munin-node/pkg-plist	Mon Nov 17 15:04:19 2014	(r372671)
@@ -98,7 +98,7 @@ sbin/munin-sched
 %%DATADIR%%/plugins/hddtemp2
 %%DATADIR%%/plugins/hddtemp_smartctl
 %%DATADIR%%/plugins/hddtempd
-%%DATADIR%%/plugins/hp2000_
+%%PERL%%%%DATADIR%%/plugins/hp2000_
 %%DATADIR%%/plugins/http_loadtime
 %%DATADIR%%/plugins/if_
 %%DATADIR%%/plugins/if_errcoll_
@@ -138,12 +138,12 @@ sbin/munin-sched
 %%DATADIR%%/plugins/nginx_request
 %%DATADIR%%/plugins/nginx_status
 %%DATADIR%%/plugins/nomadix_users_
-%%DATADIR%%/plugins/ntp_
+%%PERL%%%%DATADIR%%/plugins/ntp_
 %%DATADIR%%/plugins/ntp_kernel_err
 %%DATADIR%%/plugins/ntp_kernel_pll_freq
 %%DATADIR%%/plugins/ntp_kernel_pll_off
 %%DATADIR%%/plugins/ntp_offset
-%%DATADIR%%/plugins/ntp_states
+%%PERL%%%%DATADIR%%/plugins/ntp_states
 %%DATADIR%%/plugins/nut_misc
 %%DATADIR%%/plugins/nut_volts
 %%DATADIR%%/plugins/nutups_
@@ -151,8 +151,8 @@ sbin/munin-sched
 %%DATADIR%%/plugins/open_files
 %%DATADIR%%/plugins/openvpn
 %%DATADIR%%/plugins/perdition
-%%DATADIR%%/plugins/pgbouncer_connections
-%%DATADIR%%/plugins/pgbouncer_requests
+%%PERL%%%%DATADIR%%/plugins/pgbouncer_connections
+%%PERL%%%%DATADIR%%/plugins/pgbouncer_requests
 %%DATADIR%%/plugins/ping_
 %%DATADIR%%/plugins/plugin.sh
 %%DATADIR%%/plugins/plugins.history
@@ -161,23 +161,23 @@ sbin/munin-sched
 %%DATADIR%%/plugins/postfix_mailqueue
 %%DATADIR%%/plugins/postfix_mailstats
 %%DATADIR%%/plugins/postfix_mailvolume
-%%DATADIR%%/plugins/postgres_autovacuum
-%%DATADIR%%/plugins/postgres_bgwriter
-%%DATADIR%%/plugins/postgres_cache_
-%%DATADIR%%/plugins/postgres_checkpoints
-%%DATADIR%%/plugins/postgres_connections_
-%%DATADIR%%/plugins/postgres_connections_db
-%%DATADIR%%/plugins/postgres_locks_
-%%DATADIR%%/plugins/postgres_oldest_prepared_xact_
-%%DATADIR%%/plugins/postgres_prepared_xacts_
-%%DATADIR%%/plugins/postgres_querylength_
-%%DATADIR%%/plugins/postgres_scans_
-%%DATADIR%%/plugins/postgres_size_
-%%DATADIR%%/plugins/postgres_streaming_
-%%DATADIR%%/plugins/postgres_transactions_
-%%DATADIR%%/plugins/postgres_tuples_
-%%DATADIR%%/plugins/postgres_users
-%%DATADIR%%/plugins/postgres_xlog
+%%PERL%%%%DATADIR%%/plugins/postgres_autovacuum
+%%PERL%%%%DATADIR%%/plugins/postgres_bgwriter
+%%PERL%%%%DATADIR%%/plugins/postgres_cache_
+%%PERL%%%%DATADIR%%/plugins/postgres_checkpoints
+%%PERL%%%%DATADIR%%/plugins/postgres_connections_
+%%PERL%%%%DATADIR%%/plugins/postgres_connections_db
+%%PERL%%%%DATADIR%%/plugins/postgres_locks_
+%%PERL%%%%DATADIR%%/plugins/postgres_oldest_prepared_xact_
+%%PERL%%%%DATADIR%%/plugins/postgres_prepared_xacts_
+%%PERL%%%%DATADIR%%/plugins/postgres_querylength_
+%%PERL%%%%DATADIR%%/plugins/postgres_scans_
+%%PERL%%%%DATADIR%%/plugins/postgres_size_
+%%PERL%%%%DATADIR%%/plugins/postgres_streaming_
+%%PERL%%%%DATADIR%%/plugins/postgres_transactions_
+%%PERL%%%%DATADIR%%/plugins/postgres_tuples_
+%%PERL%%%%DATADIR%%/plugins/postgres_users
+%%PERL%%%%DATADIR%%/plugins/postgres_xlog
 %%DATADIR%%/plugins/processes
 %%DATADIR%%/plugins/proxy_plugin
 %%DATADIR%%/plugins/ps_
@@ -191,7 +191,7 @@ sbin/munin-sched
 %%DATADIR%%/plugins/sendmail_mailtraffic
 %%DATADIR%%/plugins/slapd_
 %%DATADIR%%/plugins/slapd_bdb_cache_
-%%DATADIR%%/plugins/slony_lag_
+%%PERL%%%%DATADIR%%/plugins/slony_lag_
 %%DATADIR%%/plugins/smart_
 %%SNMP%%%%DATADIR%%/plugins/snmp__cpuload
 %%SNMP%%%%DATADIR%%/plugins/snmp__df
@@ -246,7 +246,7 @@ sbin/munin-sched
 %%DATADIR%%/plugins/tomcat_volume
 %%DATADIR%%/plugins/uptime
 %%DATADIR%%/plugins/users
-%%DATADIR%%/plugins/varnish_
+%%PERL%%%%DATADIR%%/plugins/varnish_
 %%DATADIR%%/plugins/vmstat
 %%DATADIR%%/plugins/zimbra_
 @dir(%%USER%%,%%GROUP%%,) %%DBDIR%%/plugin-state



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