[packages/nagios-plugins] up to 2.1.1
glen
glen at pld-linux.org
Mon Aug 3 10:41:50 CEST 2015
commit b1bf4c51164d35a9cacd4730d68ebe0f1148d2c7
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Aug 3 11:41:43 2015 +0300
up to 2.1.1
mawk-workaround.patch | 172 ------------------------------------------
nagios-plugins-cosmetic.patch | 11 ---
nagios-plugins-subst.patch | 29 -------
nagios-plugins.spec | 13 +---
4 files changed, 4 insertions(+), 221 deletions(-)
---
diff --git a/nagios-plugins.spec b/nagios-plugins.spec
index 1972f42..477d911 100644
--- a/nagios-plugins.spec
+++ b/nagios-plugins.spec
@@ -15,30 +15,27 @@
Summary: Host/service/network monitoring program plugins for Nagios
Summary(pl.UTF-8): Wtyczki do monitorowania hostów/usług/sieci dla Nagiosa
Name: nagios-plugins
-Version: 2.0.3
-Release: 3
+Version: 2.1.1
+Release: 1
License: GPL v3
Group: Networking
Source0: http://www.nagios-plugins.org/download/%{name}-%{version}.tar.gz
-# Source0-md5: 6755765bab88b506181268ef7982595e
+# Source0-md5: e199ca874df5723bfaca8c43887b1a79
# https://git.pld-linux.org/projects/nagios-config
Source1: %{name}-config-20150412.tar.xz
# Source1-md5: 2f0f29735345c158d11c2009be3e1478
Source2: nagios-utils.php
#Patch: %{name}-shared.patch # needs finishing
Patch0: %{name}-tainted.patch
-Patch3: %{name}-subst.patch
Patch4: %{name}-noroot.patch
Patch5: %{name}-check_ping-socket-filter-warning.patch
Patch7: %{name}-pgsql.patch
Patch9: %{name}-check_log_paths.patch
Patch13: %{name}-check_radius_segfault.patch
-Patch20: %{name}-cosmetic.patch
Patch21: %{name}-check_hpjd-no-paper-out.patch
Patch23: %{name}-check_disk_smb-zero-cap.patch
Patch24: %{name}-paths.patch
Patch27: %{name}-ping.patch
-Patch28: mawk-workaround.patch
URL: http://www.nagiosplugins.org/
BuildRequires: autoconf
BuildRequires: automake
@@ -511,17 +508,14 @@ Wtyczki przekazane do projektu Nagios. Część z nich działa, część nie.
%setup -q -a1
mv nagios-plugins-config-*/* .
%patch0 -p1
-%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch7 -p1
%patch13 -p1
-%patch20 -p1
%patch21 -p1
%patch23 -p1
%patch24 -p1
%patch27 -p1
-%patch28 -p1
# remove libtool m4 macro copies, breaks when system libtool is older
%{__rm} gl/m4/libtool.m4 gl/m4/lt*.m4
@@ -573,6 +567,7 @@ fi
--with-apt-get-command=/usr/bin/apt-get \
--with-qmail-qstat-command=/usr/bin/qmail-qstat \
--with-mailq-command=/usr/bin/mailq \
+ --with-sudo-command=/usr/bin/sudo \
--without-included-regex
%{__make}
diff --git a/mawk-workaround.patch b/mawk-workaround.patch
deleted file mode 100644
index 12cbbab..0000000
--- a/mawk-workaround.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-
-mawk pattern matching is probably too greedy as it fails when two paths on same line:
-
-
-mawk: run time error: regular expression compile failed (missing operand)
-/usr/lib/nullmailer' || -d '/usr/local/lib/nullmailer
- FILENAME="check_mailq.pl" FNR=627 NR=627
-
-however upstream removed autodetection (GRRR), revert that change
-https://nagios-plugins.org/nagios-plugins-2-0-3-released/
-
-this is resolved differently in monitoring-plugins:
-https://github.com/monitoring-plugins/monitoring-plugins/commit/c08d6a429ba0e0cd3642ba2c2fe85687472ee22f
-
---- nagios-plugins-2.0.3/plugins-scripts/check_mailq.pl 2015-04-12 00:49:58.451674277 +0300
-+++ nagios-plugins-2.0.1/plugins-scripts/check_mailq.pl 2015-04-12 00:49:01.892078238 +0300
-@@ -199,20 +199,20 @@
- ## now check the queue length(s)
-
- if ($msg_q == 0) {
-- $msg = "OK: mailq is empty";
-+ $msg = "OK: $mailq mailq is empty";
- $state = $ERRORS{'OK'};
- } else {
- print "msg_q = $msg_q warn=$opt_w crit=$opt_c\n" if $verbose;
-
- # overall queue length
- if ($msg_q < $opt_w) {
-- $msg = "OK: mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
-+ $msg = "OK: $mailq mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
- $state = $ERRORS{'OK'};
- }elsif ($msg_q >= $opt_w && $msg_q < $opt_c) {
-- $msg = "WARNING: mailq is $msg_q (threshold w = $opt_w)";
-+ $msg = "WARNING: $mailq mailq is $msg_q (threshold w = $opt_w)";
- $state = $ERRORS{'WARNING'};
- }else {
-- $msg = "CRITICAL: mailq is $msg_q (threshold c = $opt_c)";
-+ $msg = "CRITICAL: $mailq mailq is $msg_q (threshold c = $opt_c)";
- $state = $ERRORS{'CRITICAL'};
- }
-
-@@ -344,20 +344,20 @@
-
- # check queue length(s)
- if ($msg_q == 0){
-- $msg = "OK: mailq reports queue is empty";
-+ $msg = "OK: $mailq mailq reports queue is empty";
- $state = $ERRORS{'OK'};
- } else {
- print "msg_q = $msg_q warn=$opt_w crit=$opt_c\n" if $verbose;
-
- # overall queue length
- if ($msg_q < $opt_w) {
-- $msg = "OK: mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
-+ $msg = "OK: $mailq mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
- $state = $ERRORS{'OK'};
- }elsif ($msg_q >= $opt_w && $msg_q < $opt_c) {
-- $msg = "WARNING: mailq is $msg_q (threshold w = $opt_w)";
-+ $msg = "WARNING: $mailq mailq is $msg_q (threshold w = $opt_w)";
- $state = $ERRORS{'WARNING'};
- }else {
-- $msg = "CRITICAL: mailq is $msg_q (threshold c = $opt_c)";
-+ $msg = "CRITICAL: $mailq mailq is $msg_q (threshold c = $opt_c)";
- $state = $ERRORS{'CRITICAL'};
- }
-
-@@ -431,13 +431,13 @@
-
- # overall queue length
- if ($msg_q < $opt_w) {
-- $msg = "OK: mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
-+ $msg = "OK: $mailq mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
- $state = $ERRORS{'OK'};
- }elsif ($msg_q >= $opt_w && $msg_q < $opt_c) {
-- $msg = "WARNING: mailq is $msg_q (threshold w = $opt_w)";
-+ $msg = "WARNING: $mailq mailq is $msg_q (threshold w = $opt_w)";
- $state = $ERRORS{'WARNING'};
- }else {
-- $msg = "CRITICAL: mailq is $msg_q (threshold c = $opt_c)";
-+ $msg = "CRITICAL: $mailq mailq is $msg_q (threshold c = $opt_c)";
- $state = $ERRORS{'CRITICAL'};
- }
-
-@@ -489,13 +489,13 @@
- exit $ERRORS{CRITICAL};
- }
- if ($msg_q < $opt_w) {
-- $msg = "OK: mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
-+ $msg = "OK: $mailq mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
- $state = $ERRORS{'OK'};
- }elsif ($msg_q >= $opt_w && $msg_q < $opt_c) {
-- $msg = "WARNING: mailq is $msg_q (threshold w = $opt_w)";
-+ $msg = "WARNING: $mailq mailq is $msg_q (threshold w = $opt_w)";
- $state = $ERRORS{'WARNING'};
- }else {
-- $msg = "CRITICAL: mailq is $msg_q (threshold c = $opt_c)";
-+ $msg = "CRITICAL: $mailq mailq is $msg_q (threshold c = $opt_c)";
- $state = $ERRORS{'CRITICAL'};
- }
- } # end of ($mailq eq "exim")
-@@ -526,13 +526,13 @@
- }
- close(MAILQ) ;
- if ($msg_q < $opt_w) {
-- $msg = "OK: mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
-+ $msg = "OK: $mailq mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
- $state = $ERRORS{'OK'};
- }elsif ($msg_q >= $opt_w && $msg_q < $opt_c) {
-- $msg = "WARNING: mailq is $msg_q (threshold w = $opt_w)";
-+ $msg = "WARNING: $mailq mailq is $msg_q (threshold w = $opt_w)";
- $state = $ERRORS{'WARNING'};
- }else {
-- $msg = "CRITICAL: mailq is $msg_q (threshold c = $opt_c)";
-+ $msg = "CRITICAL: $mailq mailq is $msg_q (threshold c = $opt_c)";
- $state = $ERRORS{'CRITICAL'};
- }
- } # end of ($mailq eq "nullmailer")
-@@ -605,7 +605,35 @@
- exit $ERRORS{'UNKNOWN'};
- }
- }else{
-- $mailq = 'sendmail' ;
-+ if (defined $utils::PATH_TO_QMAIL_QSTAT
-+ && -x $utils::PATH_TO_QMAIL_QSTAT)
-+ {
-+ $mailq = 'qmail';
-+ }
-+ elsif (-d '/var/lib/postfix'
-+ || -d '/var/local/lib/postfix'
-+ || -e '/usr/sbin/postfix'
-+ || -e '/usr/local/sbin/postfix')
-+ {
-+ $mailq = 'postfix';
-+ }
-+ elsif (-d '/usr/lib/exim4'
-+ || -d '/usr/local/lib/exim4'
-+ || -e '/usr/sbin/exim'
-+ || -e '/usr/local/sbin/exim')
-+ {
-+ $mailq = 'exim';
-+ }
-+ elsif (-d '/usr/lib/nullmailer'
-+ || -d '/usr/local/lib/nullmailer'
-+ || -e '/usr/sbin/nullmailer-send'
-+ || -e '/usr/local/sbin/nullmailer-send')
-+ {
-+ $mailq = 'nullmailer';
-+ }
-+ else {
-+ $mailq = 'sendmail';
-+ }
- }
-
- return $ERRORS{'OK'};
-@@ -628,7 +656,7 @@
- print "-W (--Warning) = Min. number of messages for same domain in queue to generate warning\n";
- print "-C (--Critical) = Min. number of messages for same domain in queue to generate critical alert ( W < C )\n";
- print "-t (--timeout) = Plugin timeout in seconds (default = $utils::TIMEOUT)\n";
-- print "-M (--mailserver) = [ sendmail | qmail | postfix | exim | nullmailer ] (default = sendmail)\n";
-+ print "-M (--mailserver) = [ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)\n";
- print "-h (--help)\n";
- print "-V (--version)\n";
- print "-v (--verbose) = debugging output\n";
-@@ -636,6 +664,8 @@
- print "Note: -w and -c are required arguments. -W and -C are optional.\n";
- print " -W and -C are applied to domains listed on the queues - both FROM and TO. (sendmail)\n";
- print " -W and -C are applied message not yet preproccessed. (qmail)\n";
-+ print " This plugin tries to autodetect which mailserver you are running,\n";
-+ print " you can override the autodetection with -M.\n";
- print " This plugin uses the system mailq command (sendmail) or qmail-stat (qmail)\n";
- print " to look at the queues. Mailq can usually only be accessed by root or \n";
- print " a TrustedUser. You will have to set appropriate permissions for the plugin to work.\n";
diff --git a/nagios-plugins-cosmetic.patch b/nagios-plugins-cosmetic.patch
deleted file mode 100644
index b1d0964..0000000
--- a/nagios-plugins-cosmetic.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- nagios-plugins-1.4.13/plugins-scripts/check_mailq.pl~ 2006-07-05 16:45:57.000000000 +0300
-+++ nagios-plugins-1.4.13/plugins-scripts/check_mailq.pl 2008-10-11 14:52:47.407968164 +0300
-@@ -32,7 +32,7 @@
- use vars qw($opt_V $opt_h $opt_v $verbose $PROGNAME $opt_w $opt_c $opt_t
- $opt_M $mailq $status $state $msg $msg_q $msg_p $opt_W $opt_C $mailq @lines
- %srcdomains %dstdomains);
--use lib utils.pm;
-+use lib utils.pm;
- use utils qw(%ERRORS &print_revision &support &usage );
-
-
diff --git a/nagios-plugins-subst.patch b/nagios-plugins-subst.patch
deleted file mode 100644
index 6b79252..0000000
--- a/nagios-plugins-subst.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-do the utils.pm substitution AFTER path based substitution
-otherwise if 'nagios' is in $PATH somewhy, then wrong perl library path is
-substituted to perl programs
-
-glen, 2004-12-08
-
---- ./plugins-scripts/subst.in~ 2003-07-02 18:01:22.000000000 +0300
-+++ ./plugins-scripts/subst.in 2005-04-02 00:11:24.000000000 +0300
-@@ -44,10 +44,6 @@
- /^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");}
- /^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");}
-
--# add to libexecdir to INC for perl utils.pm
--/^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } }
--
--
- # Trusted path mechanism (deprecated)
-
- /^[ \t]*\$ENV[ \t]*\{[ \t'"]*PATH[ \t"']*\}[ \t]*=/ {
-@@ -68,6 +64,9 @@
- sub(c,which(c,path));
- }
-
-+# add to libexecdir to INC for perl utils.pm
-+/^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } }
-+
- {
- print;
- }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugins.git/commitdiff/b1bf4c51164d35a9cacd4730d68ebe0f1148d2c7
More information about the pld-cvs-commit
mailing list