forked from Lainports/freebsd-ports
Fix the bind9_rndc plugin wrt Perl 5.18+ hash randomzation.
While there, group all patches for the three ports in munin-common, and remove an obsolete patch. PR: 195689 Submitted by: Vlad "Blackflow" K. Sponsored by: Absolight
This commit is contained in:
parent
8f2eb85add
commit
2ff6de7ee9
16 changed files with 74 additions and 34 deletions
|
|
@ -1,4 +1,4 @@
|
|||
--- node/munin-node.conf.in.orig 2014-10-26 14:12:24 UTC
|
||||
--- node/munin-node.conf.in.orig 2014-11-24 21:46:24 UTC
|
||||
+++ node/munin-node.conf.in
|
||||
@@ -10,7 +10,7 @@ background 1
|
||||
setsid 1
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- node/sbin/munin-node.orig 2012-11-12 14:10:58.234196646 +0100
|
||||
+++ node/sbin/munin-node 2012-11-12 14:11:19.591568597 +0100
|
||||
@@ -54,6 +54,10 @@
|
||||
--- node/sbin/munin-node.orig 2014-11-24 21:46:24 UTC
|
||||
+++ node/sbin/munin-node
|
||||
@@ -54,6 +54,10 @@ sub main
|
||||
$ENV{$key} = $1;
|
||||
}
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
--- node/sbin/munin-node-configure.orig Tue Oct 5 22:36:04 2010
|
||||
+++ node/sbin/munin-node-configure Tue Oct 5 22:37:57 2010
|
||||
@@ -28,6 +28,10 @@ use POSIX ();
|
||||
use Data::Dumper;
|
||||
use Carp;
|
||||
--- node/sbin/munin-node-configure.orig 2014-11-24 21:46:24 UTC
|
||||
+++ node/sbin/munin-node-configure
|
||||
@@ -23,6 +23,10 @@ use warnings;
|
||||
|
||||
use Getopt::Long;
|
||||
|
||||
+# plugins run in taint mode because the uid is changed, so the path
|
||||
+# must not contain writable directories.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- node/sbin/munin-run.orig Wed Oct 20 14:50:43 2010
|
||||
+++ node/sbin/munin-run Wed Oct 20 14:52:51 2010
|
||||
@@ -53,6 +53,9 @@ sub main
|
||||
--- node/sbin/munin-run.orig 2014-11-24 21:46:24 UTC
|
||||
+++ node/sbin/munin-run
|
||||
@@ -52,6 +52,9 @@ sub main
|
||||
$ENV{$key} =~ /^(.*)$/;
|
||||
$ENV{$key} = $1;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
--- plugins/node.d.freebsd/if_.in.orig 2014-10-26 14:12:24 UTC
|
||||
--- plugins/node.d.freebsd/if_.in.orig 2014-11-24 21:46:24 UTC
|
||||
+++ plugins/node.d.freebsd/if_.in
|
||||
@@ -22,7 +22,7 @@
|
||||
INTERFACE=${0##*if_}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
--- plugins/node.d.freebsd/if_errcoll_.in.orig 2014-10-26 14:12:24 UTC
|
||||
--- plugins/node.d.freebsd/if_errcoll_.in.orig 2014-11-24 21:46:24 UTC
|
||||
+++ plugins/node.d.freebsd/if_errcoll_.in
|
||||
@@ -19,7 +19,7 @@
|
||||
INTERFACE=${0##*if_errcoll_}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
--- plugins/node.d.freebsd/if_packets_.in.orig 2014-11-17 14:29:50 UTC
|
||||
--- plugins/node.d.freebsd/if_packets_.in.orig 2014-12-10 15:34:51 UTC
|
||||
+++ plugins/node.d.freebsd/if_packets_.in
|
||||
@@ -0,0 +1,110 @@
|
||||
+#!@@GOODSH@@
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
--- plugins/node.d.freebsd/iostat.in.orig 2014-10-26 14:12:24 UTC
|
||||
--- plugins/node.d.freebsd/iostat.in.orig 2014-11-24 21:46:24 UTC
|
||||
+++ plugins/node.d.freebsd/iostat.in
|
||||
@@ -56,13 +56,11 @@ if [ "$1" = "config" ]; then
|
||||
for d in $drives; do
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
--- plugins/node.d/bind9_rndc.in.orig 2014-11-24 21:46:24 UTC
|
||||
+++ plugins/node.d/bind9_rndc.in
|
||||
@@ -63,6 +63,7 @@ use strict;
|
||||
my $rndc = defined($ENV{rndc}) ? $ENV{rndc} : '/usr/sbin/rndc';
|
||||
my $querystats = $ENV{querystats} || '/var/run/named.stats';
|
||||
my %IN;
|
||||
+my @IN_KEYS;
|
||||
|
||||
# attempt to create log file if it doesn't exist
|
||||
if ( ! -r $querystats ) {
|
||||
@@ -124,20 +125,13 @@ chomp $line;
|
||||
if ($line eq '++ Incoming Requests ++') {
|
||||
# new format
|
||||
|
||||
- %IN = (
|
||||
- requests => 0,
|
||||
- responses => 0,
|
||||
- success => 0,
|
||||
- auth_answer => 0,
|
||||
- nonauth_answer => 0,
|
||||
- nxrrset => 0,
|
||||
- failure => 0,
|
||||
- nxdomain => 0,
|
||||
- recursion => 0,
|
||||
- duplicates => 0,
|
||||
- transfers => 0,
|
||||
- rejections => 0,
|
||||
- );
|
||||
+ @IN_KEYS = ('requests', 'responses', 'success', 'auth_answer',
|
||||
+ 'nonauth_answer', 'nxrrset', 'failure', 'nxdomain',
|
||||
+ 'recursion', 'duplicates', 'transfers', 'rejections');
|
||||
+ %IN = ();
|
||||
+ for my $key (@IN_KEYS) {
|
||||
+ $IN{$key} = 0;
|
||||
+ }
|
||||
|
||||
# jump to server stats section
|
||||
while ($line ne '++ Name Server Statistics ++') {
|
||||
@@ -197,11 +191,11 @@ if (defined($ARGV[0]) and ($ARGV[0] eq '
|
||||
print "graph_vlabel queries / \${graph_period}\n";
|
||||
print "graph_category BIND\n";
|
||||
|
||||
- for my $key (keys %IN) {
|
||||
+ for my $key (@IN_KEYS) {
|
||||
print "query_$key.label $key\n";
|
||||
print "query_$key.type DERIVE\n";
|
||||
print "query_$key.min 0\n";
|
||||
}
|
||||
} else {
|
||||
- print "query_$_.value $IN{$_}\n" for keys %IN;
|
||||
+ print "query_$_.value $IN{$_}\n" for @IN_KEYS;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
--- plugins/node.d/hddtemp_smartctl.in.orig 2014-10-26 14:12:24 UTC
|
||||
--- plugins/node.d/hddtemp_smartctl.in.orig 2014-11-24 21:46:24 UTC
|
||||
+++ plugins/node.d/hddtemp_smartctl.in
|
||||
@@ -162,7 +162,7 @@ if ($^O eq 'linux') {
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
--- plugins/node.d/multiping.in.orig 2014-10-26 14:12:24 UTC
|
||||
--- plugins/node.d/multiping.in.orig 2014-11-24 21:46:24 UTC
|
||||
+++ plugins/node.d/multiping.in
|
||||
@@ -59,6 +59,7 @@ if [ -z "$host" ]; then
|
||||
host=${host:-${file_host:-www.google.com}}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
--- plugins/node.d/nutups_.in.orig 2014-10-26 14:12:24 UTC
|
||||
--- plugins/node.d/nutups_.in.orig 2014-11-24 21:46:24 UTC
|
||||
+++ plugins/node.d/nutups_.in
|
||||
@@ -7,20 +7,25 @@
|
||||
#
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
--- plugins/node.d/squeezebox_.in.orig 2014-10-26 14:12:24 UTC
|
||||
--- plugins/node.d/squeezebox_.in.orig 2014-11-24 21:46:24 UTC
|
||||
+++ plugins/node.d/squeezebox_.in
|
||||
@@ -157,7 +157,7 @@ if [ "$CMD" = "years" ]; then
|
||||
printf "graph_order y"
|
||||
|
|
@ -1,11 +1,7 @@
|
|||
MUNIN_VERSION= 2.0.25
|
||||
MUNIN_SITES= SF/${PORTNAME}/stable/${MUNIN_VERSION}
|
||||
DISTINFO_FILE= ${PORTSDIR}/sysutils/munin-common/distinfo
|
||||
|
||||
.if ${PKGNAMESUFFIX} != -common
|
||||
EXTRA_PATCHES+= ${PORTSDIR}/sysutils/munin-common/files/patch-Makefile \
|
||||
${PORTSDIR}/sysutils/munin-common/files/patch-Makefile.config
|
||||
.endif
|
||||
PATCHDIR= ${.CURDIR}/../../sysutils/munin-common/files
|
||||
|
||||
PORTSCOUT= limit:^2\.0\.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= munin
|
||||
PORTVERSION= ${MUNIN_VERSION}
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= sysutils perl5
|
||||
MASTER_SITES= ${MUNIN_SITES}
|
||||
PKGNAMESUFFIX= -node
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
--- plugins/node.d/ntp_offset.in.orig 2008-10-14 19:50:27.092576040 +0900
|
||||
+++ plugins/node.d/ntp_offset.in 2008-10-14 19:50:36.788908430 +0900
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!@@GOODSH@@ -w
|
||||
+#!@@GOODSH@@
|
||||
# -*- sh -*-
|
||||
#
|
||||
# Plugin to monitor NTP time offset.
|
||||
Loading…
Add table
Reference in a new issue