[Pkg-nagios-changes] [pkg-nagios-plugins-contrib] 16/24: check_rbl: Update to 1.4.1

Jan Wagner waja at moszumanska.debian.org
Wed Dec 13 22:07:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

waja pushed a commit to branch master
in repository pkg-nagios-plugins-contrib.

commit e83a6656a5f365fec9a5c6b9783cb1052b7c9846
Author: Jan Wagner <waja at cyconet.org>
Date:   Tue Nov 28 22:04:48 2017 +0100

    check_rbl: Update to 1.4.1
---
 check_rbl/check_rbl-1.3.8/.travis.yml              |   5 -
 check_rbl/check_rbl-1.3.8/VERSION                  |   1 -
 check_rbl/check_rbl-1.4.1/.travis.yml              |  11 ++
 .../{check_rbl-1.3.8 => check_rbl-1.4.1}/AUTHORS   |   3 +-
 .../{check_rbl-1.3.8 => check_rbl-1.4.1}/COPYING   |   0
 .../{check_rbl-1.3.8 => check_rbl-1.4.1}/COPYRIGHT |   0
 .../{check_rbl-1.3.8 => check_rbl-1.4.1}/Changes   |  10 ++
 .../{check_rbl-1.3.8 => check_rbl-1.4.1}/INSTALL   |  10 +-
 .../{check_rbl-1.3.8 => check_rbl-1.4.1}/MANIFEST  |   0
 .../MANIFEST.SKIP                                  |   0
 .../{check_rbl-1.3.8 => check_rbl-1.4.1}/META.yml  |   7 +-
 .../MYMETA.json                                    |  16 +--
 .../MYMETA.yml                                     |  10 +-
 .../Makefile.PL                                    |   2 +
 .../{check_rbl-1.3.8 => check_rbl-1.4.1}/NEWS      |   2 +
 .../{check_rbl-1.3.8 => check_rbl-1.4.1}/README    |   2 +-
 .../{check_rbl-1.3.8 => check_rbl-1.4.1}/TODO      |   0
 check_rbl/check_rbl-1.4.1/VERSION                  |   1 +
 .../{check_rbl-1.3.8 => check_rbl-1.4.1}/check_rbl | 138 ++++++++++++++-------
 .../check_rbl.ini                                  |   1 -
 .../check_rbl.pod                                  |  13 +-
 .../check_rbl.spec                                 |  14 ++-
 .../inc/Module/AutoInstall.pm                      |   2 +-
 .../inc/Module/Install.pm                          |  35 +-----
 .../inc/Module/Install/AutoInstall.pm              |   2 +-
 .../inc/Module/Install/Base.pm                     |   2 +-
 .../inc/Module/Install/Include.pm                  |   2 +-
 .../inc/Module/Install/MakeMaker.pm                |   2 +-
 .../inc/Module/Install/Makefile.pm                 |   2 +-
 .../inc/Module/Install/Metadata.pm                 |   2 +-
 .../inc/Module/Install/Scripts.pm                  |   2 +-
 .../t/00_modules.t                                 |  18 ++-
 .../t/01_validation.t                              |   2 +-
 .../{check_rbl-1.3.8 => check_rbl-1.4.1}/test.sh   |   0
 check_rbl/control                                  |   2 +-
 check_rbl/src                                      |   2 +-
 36 files changed, 193 insertions(+), 128 deletions(-)

diff --git a/check_rbl/check_rbl-1.3.8/.travis.yml b/check_rbl/check_rbl-1.3.8/.travis.yml
deleted file mode 100644
index 72caf00..0000000
--- a/check_rbl/check_rbl-1.3.8/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: perl
-perl:
-  - "5.22"
-  - "5.20"
-  
diff --git a/check_rbl/check_rbl-1.3.8/VERSION b/check_rbl/check_rbl-1.3.8/VERSION
deleted file mode 100644
index e05cb33..0000000
--- a/check_rbl/check_rbl-1.3.8/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-1.3.8
diff --git a/check_rbl/check_rbl-1.4.1/.travis.yml b/check_rbl/check_rbl-1.4.1/.travis.yml
new file mode 100644
index 0000000..19dc739
--- /dev/null
+++ b/check_rbl/check_rbl-1.4.1/.travis.yml
@@ -0,0 +1,11 @@
+language: perl
+perl:
+  - '5.26'
+  - '5.24'
+  - '5.22'
+  - '5.20'
+  - '5.18'
+  - '5.16'
+  - '5.14'
+  - '5.12'
+  - '5.10'
diff --git a/check_rbl/check_rbl-1.3.8/AUTHORS b/check_rbl/check_rbl-1.4.1/AUTHORS
similarity index 73%
rename from check_rbl/check_rbl-1.3.8/AUTHORS
rename to check_rbl/check_rbl-1.4.1/AUTHORS
index c36aeb5..048c1a3 100644
--- a/check_rbl/check_rbl-1.3.8/AUTHORS
+++ b/check_rbl/check_rbl-1.4.1/AUTHORS
@@ -2,7 +2,8 @@ Matteo Corti <matteo at corti.li>
 Elan Ruusam�e <glen at delfi.ee> (improved parallel support and several fixes)
 Victor V Kudlak <info at kentos.ru> (parallel support)
 Jan Kantert <jan.kantert at researchgate.net> for the whitelisting support
+Nick Nicholas <opoudjis at gmail.com> for IPv6 support
 
-Please report any bugs or feature requests to matteo.corti at id.ethz.ch, or through the
+Please report any bugs or feature requests through the
 web interface at https://github.com/matteocorti/check_rbl/issues
 
diff --git a/check_rbl/check_rbl-1.3.8/COPYING b/check_rbl/check_rbl-1.4.1/COPYING
similarity index 100%
rename from check_rbl/check_rbl-1.3.8/COPYING
rename to check_rbl/check_rbl-1.4.1/COPYING
diff --git a/check_rbl/check_rbl-1.3.8/COPYRIGHT b/check_rbl/check_rbl-1.4.1/COPYRIGHT
similarity index 100%
rename from check_rbl/check_rbl-1.3.8/COPYRIGHT
rename to check_rbl/check_rbl-1.4.1/COPYRIGHT
diff --git a/check_rbl/check_rbl-1.3.8/Changes b/check_rbl/check_rbl-1.4.1/Changes
similarity index 93%
rename from check_rbl/check_rbl-1.3.8/Changes
rename to check_rbl/check_rbl-1.4.1/Changes
index a420942..10f3c0e 100644
--- a/check_rbl/check_rbl-1.3.8/Changes
+++ b/check_rbl/check_rbl-1.4.1/Changes
@@ -1,3 +1,13 @@
+2017-07-17  Matteo Corti  <matteo at corti.li>
+
+	* Version 1.4.1
+	* check_rbl: Perl 5.26 support ('.' missing from @INC)
+
+2017-04-18  Matteo Corti  <matteo at corti.li>
+
+	* Version 1.4.0
+	* check_rbl: IPv6 support
+
 2016-06-06  Matteo Corti  <matteo at corti.li>
 
 	* Version 1.3.8
diff --git a/check_rbl/check_rbl-1.3.8/INSTALL b/check_rbl/check_rbl-1.4.1/INSTALL
similarity index 87%
rename from check_rbl/check_rbl-1.3.8/INSTALL
rename to check_rbl/check_rbl-1.4.1/INSTALL
index fe0a727..5ece899 100644
--- a/check_rbl/check_rbl-1.3.8/INSTALL
+++ b/check_rbl/check_rbl-1.4.1/INSTALL
@@ -12,6 +12,7 @@ check_rbl depends on several Perl modules:
  * Monitoring::Plugin::Getopt
  * Monitoring::Plugin::Threshold
  * Net::DNS
+ * Net::IP
  * Readonly
 
 Perl modules can be found on the "Comprehensive Perl Archive Network"
@@ -64,5 +65,10 @@ Generate the man page with pod2man
 
     pod2man check_rbl.pod > CUSTOM_MAN_FILE
 
-Please report any installation problem to <matteo.corti at id.ethz.ch> or
-open a ticket at https://github.com/matteocorti/check_rbl/issues
+Please report any bugs or feature requests through the
+web interface at https://github.com/matteocorti/check_rbl/issues
+
+Dependencies on Debian
+======================
+
+apt-get install libdata-validate-ip-perl libdata-validate-domain-perl
diff --git a/check_rbl/check_rbl-1.3.8/MANIFEST b/check_rbl/check_rbl-1.4.1/MANIFEST
similarity index 100%
rename from check_rbl/check_rbl-1.3.8/MANIFEST
rename to check_rbl/check_rbl-1.4.1/MANIFEST
diff --git a/check_rbl/check_rbl-1.3.8/MANIFEST.SKIP b/check_rbl/check_rbl-1.4.1/MANIFEST.SKIP
similarity index 100%
rename from check_rbl/check_rbl-1.3.8/MANIFEST.SKIP
rename to check_rbl/check_rbl-1.4.1/MANIFEST.SKIP
diff --git a/check_rbl/check_rbl-1.3.8/META.yml b/check_rbl/check_rbl-1.4.1/META.yml
similarity index 84%
rename from check_rbl/check_rbl-1.3.8/META.yml
rename to check_rbl/check_rbl-1.4.1/META.yml
index d826b24..e2f0cea 100644
--- a/check_rbl/check_rbl-1.3.8/META.yml
+++ b/check_rbl/check_rbl-1.4.1/META.yml
@@ -1,14 +1,14 @@
 ---
 abstract: ~
 author:
-  - 'Matteo Corti <matteo.corti at id.ethz.ch>'
+  - 'Matteo Corti <matteo at corti.li>'
 build_requires:
   ExtUtils::MakeMaker: 6.59
 configure_requires:
   ExtUtils::MakeMaker: 6.59
 distribution_type: module
 dynamic_config: 1
-generated_by: 'Module::Install version 1.16'
+generated_by: 'Module::Install version 1.18'
 license: gpl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -27,8 +27,9 @@ requires:
   Monitoring::Plugin::Getopt: 0
   Monitoring::Plugin::Threshold: 0
   Net::DNS: 0
+  Net::IP: 0
   Readonly: 0
   perl: 5.8.0
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 1.3.8
+version: 1.4.0
diff --git a/check_rbl/check_rbl-1.3.8/MYMETA.json b/check_rbl/check_rbl-1.4.1/MYMETA.json
similarity index 74%
rename from check_rbl/check_rbl-1.3.8/MYMETA.json
rename to check_rbl/check_rbl-1.4.1/MYMETA.json
index f2d5c41..5cfbb50 100644
--- a/check_rbl/check_rbl-1.3.8/MYMETA.json
+++ b/check_rbl/check_rbl-1.4.1/MYMETA.json
@@ -1,16 +1,16 @@
 {
    "abstract" : "unknown",
    "author" : [
-      "Matteo Corti <matteo.corti at id.ethz.ch>"
+      "Matteo Corti <matteo at corti.li>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Module::Install version 1.16, CPAN::Meta::Converter version 2.150005",
+   "generated_by" : "Module::Install version 1.18, CPAN::Meta::Converter version 2.150010",
    "license" : [
       "open_source"
    ],
    "meta-spec" : {
       "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
-      "version" : "2"
+      "version" : 2
    },
    "name" : "check_rbl",
    "no_index" : {
@@ -22,7 +22,7 @@
    "prereqs" : {
       "build" : {
          "requires" : {
-            "ExtUtils::MakeMaker" : "6.59"
+            "ExtUtils::MakeMaker" : "6.36"
          }
       },
       "configure" : {
@@ -40,8 +40,8 @@
             "Monitoring::Plugin::Getopt" : "0",
             "Monitoring::Plugin::Threshold" : "0",
             "Net::DNS" : "0",
-            "Readonly" : "0",
-            "perl" : "5.00800"
+            "Net::IP" : "0",
+            "Readonly" : "0"
          }
       }
    },
@@ -51,6 +51,6 @@
          "http://opensource.org/licenses/gpl-license.php"
       ]
    },
-   "version" : "1.3.8",
-   "x_serialization_backend" : "JSON::PP version 2.27400"
+   "version" : "1.4.0",
+   "x_serialization_backend" : "JSON::PP version 2.94"
 }
diff --git a/check_rbl/check_rbl-1.3.8/MYMETA.yml b/check_rbl/check_rbl-1.4.1/MYMETA.yml
similarity index 76%
rename from check_rbl/check_rbl-1.3.8/MYMETA.yml
rename to check_rbl/check_rbl-1.4.1/MYMETA.yml
index e905e9c..9a073f1 100644
--- a/check_rbl/check_rbl-1.3.8/MYMETA.yml
+++ b/check_rbl/check_rbl-1.4.1/MYMETA.yml
@@ -1,13 +1,13 @@
 ---
 abstract: unknown
 author:
-  - 'Matteo Corti <matteo.corti at id.ethz.ch>'
+  - 'Matteo Corti <matteo at corti.li>'
 build_requires:
-  ExtUtils::MakeMaker: '6.59'
+  ExtUtils::MakeMaker: '6.36'
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 0
-generated_by: 'Module::Install version 1.16, CPAN::Meta::Converter version 2.150005'
+generated_by: 'Module::Install version 1.18, CPAN::Meta::Converter version 2.150010'
 license: open_source
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -26,9 +26,9 @@ requires:
   Monitoring::Plugin::Getopt: '0'
   Monitoring::Plugin::Threshold: '0'
   Net::DNS: '0'
+  Net::IP: '0'
   Readonly: '0'
-  perl: '5.00800'
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 1.3.8
+version: 1.4.0
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/check_rbl/check_rbl-1.3.8/Makefile.PL b/check_rbl/check_rbl-1.4.1/Makefile.PL
similarity index 94%
rename from check_rbl/check_rbl-1.3.8/Makefile.PL
rename to check_rbl/check_rbl-1.4.1/Makefile.PL
index 81ef174..3632b87 100644
--- a/check_rbl/check_rbl-1.3.8/Makefile.PL
+++ b/check_rbl/check_rbl-1.4.1/Makefile.PL
@@ -1,4 +1,5 @@
 # Load the Module::Install bundled in ./inc/
+use lib '.'; # added since from Perl 5.26 '.' is no more in @INC
 use inc::Module::Install;
 
 ##############################################################################
@@ -17,6 +18,7 @@ my %prereqs = (
     'Data::Validate::IP'     => 0,
     'English'                => 0,
     'Net::DNS'               => 0,
+    'Net::IP'                => 0,
     'Readonly'               => 0,
     'IO::Select'             => 0,
 );
diff --git a/check_rbl/check_rbl-1.3.8/NEWS b/check_rbl/check_rbl-1.4.1/NEWS
similarity index 92%
rename from check_rbl/check_rbl-1.3.8/NEWS
rename to check_rbl/check_rbl-1.4.1/NEWS
index 0c4d719..c33edff 100644
--- a/check_rbl/check_rbl-1.3.8/NEWS
+++ b/check_rbl/check_rbl-1.4.1/NEWS
@@ -1,3 +1,5 @@
+2017-07-17: 1.4.1 - Perl 5.26 support
+2017-04-18: 1.4.0 - IPv6 support
 2016-06-07: 1.3.8 - allowing Nagios::Plugins for older distributions
 2015-02-01: 1.3.7 - now depends on Monitoring::Plugins (Nagios::Plugins
                     is deprecated)
diff --git a/check_rbl/check_rbl-1.3.8/README b/check_rbl/check_rbl-1.4.1/README
similarity index 94%
rename from check_rbl/check_rbl-1.3.8/README
rename to check_rbl/check_rbl-1.4.1/README
index b0ba42b..4c3c142 100644
--- a/check_rbl/check_rbl-1.3.8/README
+++ b/check_rbl/check_rbl-1.4.1/README
@@ -14,5 +14,5 @@ Example:
 check_rbl -H example.org -t 60 -c 1 -w 1 -s cbl.anti-spam.org.cn -s cblplus.anti-spam.org.cn -s cblless.anti-spam.org.cn -s cdl.anti-spam.org.cn -s cbl.abuseat.org -s dnsbl.cyberlogic.net -s bl.deadbeef.com -s t1.dnsbl.net.au -s spamtrap.drbl.drand.net -s spamsources.fabel.dk -s 0spam.fusionzero.com -s mail-abuse.blacklist.jippg.org -s korea.services.net -s spamguard.leadmon.net -s ix.dnsbl.manitu.net -s relays.nether.net -s no-more-funn.moensted.dk -s psbl.surriel.com -s dyna.spamrats.c [...]
 
 
-Please report any bugs or feature requests to matteo.corti at id.ethz.ch, or through the
+Please report any bugs or feature requests through the
 web interface at https://github.com/matteocorti/check_rbl/issues
diff --git a/check_rbl/check_rbl-1.3.8/TODO b/check_rbl/check_rbl-1.4.1/TODO
similarity index 100%
rename from check_rbl/check_rbl-1.3.8/TODO
rename to check_rbl/check_rbl-1.4.1/TODO
diff --git a/check_rbl/check_rbl-1.4.1/VERSION b/check_rbl/check_rbl-1.4.1/VERSION
new file mode 100644
index 0000000..347f583
--- /dev/null
+++ b/check_rbl/check_rbl-1.4.1/VERSION
@@ -0,0 +1 @@
+1.4.1
diff --git a/check_rbl/check_rbl-1.3.8/check_rbl b/check_rbl/check_rbl-1.4.1/check_rbl
similarity index 86%
rename from check_rbl/check_rbl-1.3.8/check_rbl
rename to check_rbl/check_rbl-1.4.1/check_rbl
index e6e6cd7..800d44b 100644
--- a/check_rbl/check_rbl-1.3.8/check_rbl
+++ b/check_rbl/check_rbl-1.4.1/check_rbl
@@ -20,14 +20,13 @@ package main;
 use strict;
 use warnings;
 
-use 5.00800;
-
-our $VERSION = '1.3.8';
+our $VERSION = '1.4.1';
 
 use Data::Validate::Domain qw(is_hostname);
 use Data::Validate::IP qw(is_ipv4 is_ipv6);
 use IO::Select;
 use Net::DNS;
+use Net::IP qw(ip_expand_address);
 use Readonly;
 use English qw(-no_match_vars);
 
@@ -92,6 +91,33 @@ Readonly our $DEFAULT_QUERY_TIMEOUT => 15;
 our ( @listed, @timeouts, $options, $plugin, $threshold, $timeouts_string, );
 
 ##############################################################################
+# Usage     : debug("some message string")
+# Purpose   : write a message if the debugging option was specified
+# Returns   : n/a
+# Arguments : message : message string
+# Throws    : n/a
+# Comments  : n/a
+# See also  : n/a
+sub debug {
+
+    # arguments
+    my $message = shift;
+
+    if ( !defined $message ) {
+        $plugin->nagios_exit( $plugin_module->UNKNOWN,
+            q{Internal error: not enough parameters for 'debug'} );
+    }
+
+    if ( $options && $options->debug() ) {
+        ## no critic (RequireCheckedSyscall)
+        print "[DBG] $message\n";
+    }
+
+    return;
+
+}
+
+##############################################################################
 # Usage     : verbose("some message string", $optional_verbosity_level);
 # Purpose   : write a message if the verbosity level is high enough
 # Returns   : n/a
@@ -164,7 +190,6 @@ sub init_dns_resolver {
 # If answer is found C<$callback> is called with arguments as: $name, $host.
 #
 # Author: Elan Ruusamae <glen at delfi.ee>, (c) 1999-2010
-## no critic (ProhibitExcessComplexity)
 sub mdns {
 
     my ( $data, $callback ) = @_;
@@ -174,7 +199,6 @@ sub mdns {
 
     # timeout per query (seconds)
     my $timeout = $options ? $options->get('query-timeout') : $DEFAULT_TIMEOUT;
-    my $debug = $options ? $options->debug() : 0;
     my $res = init_dns_resolver( $options ? $options->retry() : 0 );
 
     my $sel = IO::Select->new();
@@ -191,25 +215,15 @@ sub mdns {
 
         while ( !$eof && $sel->count() < $workers ) {
 
-            if ($debug) {
-                ## no critic (RequireCheckedSyscall)
-                print 'DEBUG: reading...';
-            }
             my $name = shift @addrs;
 
             if ( !defined $name ) {
-                if ($debug) {
-                    ## no critic (RequireCheckedSyscall)
-                    print "EOF.\n";
-                }
+                debug('reading...EOF.');
                 $eof = 1;
                 last;
             }
 
-            if ($debug) {
-                ## no critic (RequireCheckedSyscall)
-                print "NAME: $name\n";
-            }
+            debug("reading...$name");
 
             my $sock = $res->bgsend($name);
 
@@ -223,11 +237,7 @@ sub mdns {
                 # response gives different ip for ips with multiple hosts
                 $addrs{$sock} = $name;
                 $sel->add($sock);
-                if ($debug) {
-                    ## no critic (RequireCheckedSyscall)
-                    print "DEBUG: name = $name, outstanding = ", $sel->count(),
-                      "\n";
-                }
+                debug( "name = $name, outstanding = " . $sel->count() );
 
             }
 
@@ -240,10 +250,7 @@ sub mdns {
         my @ready;
         my $timed_out = 1;
 
-        if ($debug) {
-            ## no critic (RequireCheckedSyscall)
-            print "DEBUG: waiting for replies\n";
-        }
+        debug('waiting for replies');
 
         @ready = $sel->can_read($timeout);
 
@@ -251,16 +258,12 @@ sub mdns {
 
             $timed_out = 0;
 
-            if ($debug) {
-                ## no critic (RequireCheckedSyscall)
-                print 'DEBUG: replies received: ', scalar @ready, "\n";
-            }
+            debug( 'replies received: ' . scalar @ready );
 
             foreach my $sock (@ready) {
-                if ($debug) {
-                    ## no critic (RequireCheckedSyscall)
-                    print "DEBUG: handling a reply\n";
-                }
+
+                debug('handling a reply');
+
                 my $addr = $addrs{$sock};
                 delete $addrs{$sock};
                 $sel->remove($sock);
@@ -268,10 +271,13 @@ sub mdns {
                 my $ans = $res->bgread($sock);
 
                 my $host;
+
                 if ($ans) {
 
                     foreach my $rr ( $ans->answer ) {
 
+                        debug('Processing answer');
+
                         ## no critic(ProhibitDeepNests)
                         if ( !( $rr->type eq 'A' ) ) {
                             next;
@@ -279,16 +285,29 @@ sub mdns {
 
                         $host = $rr->address;
 
+                        debug("host = $host");
+
                         # take just the first answer
                         last;
                     }
                 }
                 else {
-                    if ($debug) {
-                        ## no critic (RequireCheckedSyscall)
-                        print 'DEBUG: no answer: ' . $res->errorstring() . "\n";
-                    }
+
+                    debug( 'no answer: ' . $res->errorstring() );
+
+                }
+
+                if ( defined $host ) {
+
+                    debug("callback( $addr, $host )");
+
                 }
+                else {
+
+                    debug("callback( $addr, <undefined> )");
+
+                }
+
                 &{$callback}( $addr, $host );
             }
 
@@ -302,10 +321,9 @@ sub mdns {
         #----------------------------------------------------------------------
 
         if ($timed_out) {
-            if ($debug) {
-                ## no critic (RequireCheckedSyscall)
-                print "DEBUG: timeout: clearing the outstanding pool.\n";
-            }
+
+            debug('timeout: clearing the outstanding pool.');
+
             foreach my $sock ( $sel->handles() ) {
                 my $addr = $addrs{$sock};
                 delete $addrs{$sock};
@@ -316,10 +334,7 @@ sub mdns {
             }
         }
 
-        if ($debug) {
-            ## no critic (RequireCheckedSyscall)
-            print 'DEBUG: outstanding = ', $sel->count(), ", eof = $eof\n";
-        }
+        debug( 'outstanding = ' . $sel->count() . ", eof = $eof" );
 
         #----------------------------------------------------------------------
         # We're done if there are no outstanding queries and we've read EOF.
@@ -345,6 +360,8 @@ sub validate {
     my $hostname = shift;
     my $ip       = $hostname;
 
+    debug("validate($hostname, $ip)");
+
     if ( !is_ipv4($hostname) && !is_ipv6($hostname) ) {
 
         if ( is_hostname($hostname) ) {
@@ -371,6 +388,10 @@ sub validate {
 
     }
 
+    if ( is_ipv6($ip) ) {
+        $ip = Net::IP::ip_expand_address( $ip, 6 );
+    }
+
     return $ip;
 
 }
@@ -398,7 +419,7 @@ sub run {
     $options = $plugin_getopt_module->new(
         usage   => 'Usage: %s [OPTIONS]',
         version => $VERSION,
-        url     => 'https://trac.id.ethz.ch/projects/nagios_plugins',
+        url     => 'http://matteocorti.github.io/check_rbl/',
         blurb   => 'Check SMTP black- or white- listing status',
     );
 
@@ -498,8 +519,17 @@ sub run {
     # build address lists
     my @addrs;
     foreach my $server (@servers) {
-        ( my $local_ip = $ip ) =~
+        my $local_ip = $ip;
+        if ( is_ipv6($local_ip) ) {
+            $local_ip = reverse $local_ip;
+            $local_ip =~ s/://gmxs;
+            $local_ip =~ s/(.)/$1\./gmxs;
+            $local_ip = $local_ip . $server;
+        }
+        else {
+            $local_ip =~
 s/(\d{1,3}) [.] (\d{1,3}) [.] (\d{1,3}) [.] (\d{1,3})/$4.$3.$2.$1.$server/mxs;
+        }
         push @addrs, $local_ip;
     }
 
@@ -508,7 +538,19 @@ s/(\d{1,3}) [.] (\d{1,3}) [.] (\d{1,3}) [.] (\d{1,3})/$4.$3.$2.$1.$server/mxs;
         sub {
             my ( $addr, $host ) = @_;
 
+            if ( defined $host ) {
+
+                debug("callback( $addr, $host )");
+
+            }
+            else {
+
+                debug("callback( $addr, <undefined> )");
+
+            }
+
             # extract RBL we checked
+            $addr =~ s/^(?:[a-f\d][.]){32}//mxs;
             $addr =~ s/^(?:\d+[.]){4}//mxs;
             if ( defined $host ) {
                 if ( $host eq q{} ) {
diff --git a/check_rbl/check_rbl-1.3.8/check_rbl.ini b/check_rbl/check_rbl-1.4.1/check_rbl.ini
similarity index 98%
rename from check_rbl/check_rbl-1.3.8/check_rbl.ini
rename to check_rbl/check_rbl-1.4.1/check_rbl.ini
index c291347..b323792 100644
--- a/check_rbl/check_rbl-1.3.8/check_rbl.ini
+++ b/check_rbl/check_rbl-1.4.1/check_rbl.ini
@@ -32,7 +32,6 @@ server=access.redhawk.org
 server=blacklist.sci.kun.nl
 server=bl.technovision.dk
 server=dnsbl.kempt.net
-server=dul.ru
 server=forbidden.icm.edu.pl
 server=hil.habeas.com
 server=rbl.schulte.org
diff --git a/check_rbl/check_rbl-1.3.8/check_rbl.pod b/check_rbl/check_rbl-1.4.1/check_rbl.pod
similarity index 92%
rename from check_rbl/check_rbl-1.3.8/check_rbl.pod
rename to check_rbl/check_rbl-1.4.1/check_rbl.pod
index 9d9a1cf..6164150 100644
--- a/check_rbl/check_rbl-1.3.8/check_rbl.pod
+++ b/check_rbl/check_rbl-1.4.1/check_rbl.pod
@@ -10,7 +10,7 @@ check_rbl is a Nagios plugin to check if an SMTP server is blacklisted
 
 =head1 VERSION
 
-Version 1.3.8
+Version 1.4.1
 
 =head1 SYNOPSIS
 
@@ -52,7 +52,7 @@ the querying mechanism.
 =head1 EXIT STATUS
 
 0 if OK, 1 in case of a warning, 2 in case of a critical status and 3
-in case of an unkown problem
+in case of an unknown problem
 
 =head1 DEPENDENCIES
 
@@ -92,19 +92,18 @@ Nagios documentation
 
 No bugs have been reported.
 
-Please report any bugs or feature requests to matteo.corti at id.ethz.ch,
-or through the web interface at
-https://trac.id.ethz.ch/projects/nagios_plugins/newticket?component=check_rbl
+Please report any bugs or feature requests through the
+web interface at https://github.com/matteocorti/check_rbl/issues
 
 =head1 AUTHOR
 
-Matteo Corti <matteo.corti at id.ethz.ch>
+Matteo Corti <matteo at corti.li>
 
 =head1 LICENSE AND COPYRIGHT
 
 Copyright (c) 2010, Elan Ruusamae <glen at delfi.ee>
 
-Copyright (c) 2008-2011, Matteo Corti <matteo.corti at id.ethz.ch>
+Copyright (c) 2008-2017, Matteo Corti <matteo.corti at id.ethz.ch>
 
 This module is free software; you can redistribute it and/or modify it
 under the terms of GNU general public license (gpl) version 3.
diff --git a/check_rbl/check_rbl-1.3.8/check_rbl.spec b/check_rbl/check_rbl-1.4.1/check_rbl.spec
similarity index 88%
rename from check_rbl/check_rbl-1.3.8/check_rbl.spec
rename to check_rbl/check_rbl-1.4.1/check_rbl.spec
index 476101b..3b2e98a 100644
--- a/check_rbl/check_rbl-1.3.8/check_rbl.spec
+++ b/check_rbl/check_rbl-1.4.1/check_rbl.spec
@@ -1,4 +1,4 @@
-%define version          1.3.8
+%define version          1.4.1
 %define release          0
 %define sourcename       check_rbl
 %define packagename      nagios-plugins-check-rbl
@@ -13,11 +13,11 @@ Obsoletes: check_rbl
 Version:   %{version}
 Release:   %{release}%{?dist}
 License:   GPLv3+
-Packager:  Matteo Corti <matteo.corti at id.ethz.ch>
+Packager:  Matteo Corti <matteo at corti.li>
 Group:     Applications/System
 BuildRoot: %{_tmppath}/%{packagename}-%{version}-%{release}-root-%(%{__id_u} -n)
-URL:       https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl
-Source:    http://www.id.ethz.ch/people/allid_list/corti/%{sourcename}-%{version}.tar.gz
+URL:       https://github.com/matteocorti/check_rbl
+Source:    https://github.com/matteocorti/check_rbl/releases/download/v%{version}/check_rbl-%{version}.tar.gz
 
 # Fedora build requirement (not needed for EPEL{4,5})
 BuildRequires: perl(ExtUtils::MakeMaker)
@@ -54,6 +54,12 @@ rm -rf %{buildroot}
 %{_mandir}/man1/%{sourcename}.1*
 
 %changelog
+* Mon Jul 17 2017 Matteo Corti <matteo at corti.li> - 1.4.1-0
+- Update to 1.4.1
+
+* Tue Apr 18 2017 Matteo Corti <matteo at corti.li> - 1.4.0-0
+- Update to 1.4.0
+
 * Wed Dec 30 2015 Matteo Corti <matteo at corti.li> - 1.3.8-0
 - Update to 1.3.8
 
diff --git a/check_rbl/check_rbl-1.3.8/inc/Module/AutoInstall.pm b/check_rbl/check_rbl-1.4.1/inc/Module/AutoInstall.pm
similarity index 99%
rename from check_rbl/check_rbl-1.3.8/inc/Module/AutoInstall.pm
rename to check_rbl/check_rbl-1.4.1/inc/Module/AutoInstall.pm
index 22dfa82..51e7e97 100644
--- a/check_rbl/check_rbl-1.3.8/inc/Module/AutoInstall.pm
+++ b/check_rbl/check_rbl-1.4.1/inc/Module/AutoInstall.pm
@@ -8,7 +8,7 @@ use ExtUtils::MakeMaker ();
 
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '1.16';
+	$VERSION = '1.18';
 }
 
 # special map on pre-defined feature sets
diff --git a/check_rbl/check_rbl-1.3.8/inc/Module/Install.pm b/check_rbl/check_rbl-1.4.1/inc/Module/Install.pm
similarity index 93%
rename from check_rbl/check_rbl-1.3.8/inc/Module/Install.pm
rename to check_rbl/check_rbl-1.4.1/inc/Module/Install.pm
index f44ab4d..07525c5 100644
--- a/check_rbl/check_rbl-1.3.8/inc/Module/Install.pm
+++ b/check_rbl/check_rbl-1.4.1/inc/Module/Install.pm
@@ -31,7 +31,7 @@ BEGIN {
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '1.16';
+	$VERSION = '1.18';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
@@ -244,6 +244,8 @@ sub new {
 	}
 	return $args{_self} if $args{_self};
 
+	$base_path = VMS::Filespec::unixify($base_path) if $^O eq 'VMS';
+
 	$args{dispatch} ||= 'Admin';
 	$args{prefix}   ||= 'inc';
 	$args{author}   ||= ($^O eq 'VMS' ? '_author' : '.author');
@@ -322,7 +324,7 @@ sub find_extensions {
 	my ($self, $path) = @_;
 
 	my @found;
-	File::Find::find( sub {
+	File::Find::find( {no_chdir => 1, wanted => sub {
 		my $file = $File::Find::name;
 		return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
 		my $subpath = $1;
@@ -336,7 +338,7 @@ sub find_extensions {
 		# correctly.  Otherwise, root through the file to locate the case-preserved
 		# version of the package name.
 		if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
-			my $content = Module::Install::_read($subpath . '.pm');
+			my $content = Module::Install::_read($File::Find::name);
 			my $in_pod  = 0;
 			foreach ( split /\n/, $content ) {
 				$in_pod = 1 if /^=\w/;
@@ -351,7 +353,7 @@ sub find_extensions {
 		}
 
 		push @found, [ $file, $pkg ];
-	}, $path ) if -d $path;
+	}}, $path ) if -d $path;
 
 	@found;
 }
@@ -373,8 +375,6 @@ sub _caller {
 	return $call;
 }
 
-# Done in evals to avoid confusing Perl::MinimumVersion
-eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _read {
 	local *FH;
 	open( FH, '<', $_[0] ) or die "open($_[0]): $!";
@@ -383,16 +383,6 @@ sub _read {
 	close FH or die "close($_[0]): $!";
 	return $string;
 }
-END_NEW
-sub _read {
-	local *FH;
-	open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
-	binmode FH;
-	my $string = do { local $/; <FH> };
-	close FH or die "close($_[0]): $!";
-	return $string;
-}
-END_OLD
 
 sub _readperl {
 	my $string = Module::Install::_read($_[0]);
@@ -413,8 +403,6 @@ sub _readpod {
 	return $string;
 }
 
-# Done in evals to avoid confusing Perl::MinimumVersion
-eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _write {
 	local *FH;
 	open( FH, '>', $_[0] ) or die "open($_[0]): $!";
@@ -424,17 +412,6 @@ sub _write {
 	}
 	close FH or die "close($_[0]): $!";
 }
-END_NEW
-sub _write {
-	local *FH;
-	open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
-	binmode FH;
-	foreach ( 1 .. $#_ ) {
-		print FH $_[$_] or die "print($_[0]): $!";
-	}
-	close FH or die "close($_[0]): $!";
-}
-END_OLD
 
 # _version is for processing module versions (eg, 1.03_05) not
 # Perl versions (eg, 5.8.1).
diff --git a/check_rbl/check_rbl-1.3.8/inc/Module/Install/AutoInstall.pm b/check_rbl/check_rbl-1.4.1/inc/Module/Install/AutoInstall.pm
similarity index 99%
rename from check_rbl/check_rbl-1.3.8/inc/Module/Install/AutoInstall.pm
rename to check_rbl/check_rbl-1.4.1/inc/Module/Install/AutoInstall.pm
index e19d259..75f61e8 100644
--- a/check_rbl/check_rbl-1.3.8/inc/Module/Install/AutoInstall.pm
+++ b/check_rbl/check_rbl-1.4.1/inc/Module/Install/AutoInstall.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.16';
+	$VERSION = '1.18';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/check_rbl/check_rbl-1.3.8/inc/Module/Install/Base.pm b/check_rbl/check_rbl-1.4.1/inc/Module/Install/Base.pm
similarity index 98%
rename from check_rbl/check_rbl-1.3.8/inc/Module/Install/Base.pm
rename to check_rbl/check_rbl-1.4.1/inc/Module/Install/Base.pm
index 5762a74..b61d424 100644
--- a/check_rbl/check_rbl-1.3.8/inc/Module/Install/Base.pm
+++ b/check_rbl/check_rbl-1.4.1/inc/Module/Install/Base.pm
@@ -4,7 +4,7 @@ package Module::Install::Base;
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '1.16';
+	$VERSION = '1.18';
 }
 
 # Suspend handler for "redefined" warnings
diff --git a/check_rbl/check_rbl-1.3.8/inc/Module/Install/Include.pm b/check_rbl/check_rbl-1.4.1/inc/Module/Install/Include.pm
similarity index 96%
rename from check_rbl/check_rbl-1.3.8/inc/Module/Install/Include.pm
rename to check_rbl/check_rbl-1.4.1/inc/Module/Install/Include.pm
index 2eb1d1f..087da8d 100644
--- a/check_rbl/check_rbl-1.3.8/inc/Module/Install/Include.pm
+++ b/check_rbl/check_rbl-1.4.1/inc/Module/Install/Include.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.16';
+	$VERSION = '1.18';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/check_rbl/check_rbl-1.3.8/inc/Module/Install/MakeMaker.pm b/check_rbl/check_rbl-1.4.1/inc/Module/Install/MakeMaker.pm
similarity index 98%
rename from check_rbl/check_rbl-1.3.8/inc/Module/Install/MakeMaker.pm
rename to check_rbl/check_rbl-1.4.1/inc/Module/Install/MakeMaker.pm
index bcfe93a..d5b1419 100644
--- a/check_rbl/check_rbl-1.3.8/inc/Module/Install/MakeMaker.pm
+++ b/check_rbl/check_rbl-1.4.1/inc/Module/Install/MakeMaker.pm
@@ -7,7 +7,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.16';
+	$VERSION = '1.18';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/check_rbl/check_rbl-1.3.8/inc/Module/Install/Makefile.pm b/check_rbl/check_rbl-1.4.1/inc/Module/Install/Makefile.pm
similarity index 99%
rename from check_rbl/check_rbl-1.3.8/inc/Module/Install/Makefile.pm
rename to check_rbl/check_rbl-1.4.1/inc/Module/Install/Makefile.pm
index e9918d2..8ba3d88 100644
--- a/check_rbl/check_rbl-1.3.8/inc/Module/Install/Makefile.pm
+++ b/check_rbl/check_rbl-1.4.1/inc/Module/Install/Makefile.pm
@@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/;
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.16';
+	$VERSION = '1.18';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/check_rbl/check_rbl-1.3.8/inc/Module/Install/Metadata.pm b/check_rbl/check_rbl-1.4.1/inc/Module/Install/Metadata.pm
similarity index 99%
rename from check_rbl/check_rbl-1.3.8/inc/Module/Install/Metadata.pm
rename to check_rbl/check_rbl-1.4.1/inc/Module/Install/Metadata.pm
index 9792685..692ce71 100644
--- a/check_rbl/check_rbl-1.3.8/inc/Module/Install/Metadata.pm
+++ b/check_rbl/check_rbl-1.4.1/inc/Module/Install/Metadata.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.16';
+	$VERSION = '1.18';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/check_rbl/check_rbl-1.3.8/inc/Module/Install/Scripts.pm b/check_rbl/check_rbl-1.4.1/inc/Module/Install/Scripts.pm
similarity index 96%
rename from check_rbl/check_rbl-1.3.8/inc/Module/Install/Scripts.pm
rename to check_rbl/check_rbl-1.4.1/inc/Module/Install/Scripts.pm
index 333d49b..42e6fcc 100644
--- a/check_rbl/check_rbl-1.3.8/inc/Module/Install/Scripts.pm
+++ b/check_rbl/check_rbl-1.4.1/inc/Module/Install/Scripts.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.16';
+	$VERSION = '1.18';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/check_rbl/check_rbl-1.3.8/t/00_modules.t b/check_rbl/check_rbl-1.4.1/t/00_modules.t
similarity index 75%
rename from check_rbl/check_rbl-1.3.8/t/00_modules.t
rename to check_rbl/check_rbl-1.4.1/t/00_modules.t
index 7c56af2..ac1dbcb 100644
--- a/check_rbl/check_rbl-1.3.8/t/00_modules.t
+++ b/check_rbl/check_rbl-1.4.1/t/00_modules.t
@@ -5,9 +5,9 @@ use 5.00800;
 use strict;
 use warnings;
 
-use Test::More tests => 24;
+use Test::More tests => 33;
 
-our $VERSION = '1.3.8';
+our $VERSION = '1.4.0';
 
 my $plugin_name;
 if ( eval { require Monitoring::Plugin } ) {
@@ -45,3 +45,17 @@ can_ok( 'Net::DNS::Resolver', 'new' );
 can_ok( 'Net::DNS::Resolver', 'can' );
 can_ok( 'Net::DNS::Resolver', 'bgsend' );
 can_ok( 'Net::DNS::Resolver', 'bgread' );
+
+use_ok('English');
+use_ok('Readonly');
+
+use_ok('Net::IP');
+can_ok( 'Net::IP', 'ip_expand_address' );
+
+use_ok('Data::Validate::Domain');
+can_ok( 'Data::Validate::Domain', 'is_hostname' );
+
+use_ok('Data::Validate::IP');
+can_ok( 'Data::Validate::IP', 'is_ipv4' );
+can_ok( 'Data::Validate::IP', 'is_ipv6' );
+
diff --git a/check_rbl/check_rbl-1.3.8/t/01_validation.t b/check_rbl/check_rbl-1.4.1/t/01_validation.t
similarity index 92%
rename from check_rbl/check_rbl-1.3.8/t/01_validation.t
rename to check_rbl/check_rbl-1.4.1/t/01_validation.t
index aae22d8..2abf5b2 100644
--- a/check_rbl/check_rbl-1.3.8/t/01_validation.t
+++ b/check_rbl/check_rbl-1.4.1/t/01_validation.t
@@ -8,7 +8,7 @@ use warnings;
 use File::Spec;
 use Test::More tests => 3;
 
-our $VERSION = '1.3.8';
+our $VERSION = '1.4.0';
 
 my $check_updates = File::Spec->catfile(qw(blib script check_rbl));
 
diff --git a/check_rbl/check_rbl-1.3.8/test.sh b/check_rbl/check_rbl-1.4.1/test.sh
similarity index 100%
rename from check_rbl/check_rbl-1.3.8/test.sh
rename to check_rbl/check_rbl-1.4.1/test.sh
diff --git a/check_rbl/control b/check_rbl/control
index b539108..08be064 100644
--- a/check_rbl/control
+++ b/check_rbl/control
@@ -1,6 +1,6 @@
 Uploaders: Bernd Zeimetz <bzed at debian.org>
 Recommends: libmonitoring-plugin-perl | libnagios-plugin-perl (>= 0.31), libreadonly-perl, libnet-dns-perl, libdata-validate-domain-perl, libdata-validate-ip-perl
-Version: 1.3.8
+Version: 1.4.1
 Homepage: https://github.com/matteocorti/check_rbl
 Watch: https://github.com/matteocorti/check_rbl/releases check_rbl-([0-9.]+)\.tar\.gz
 Description: plugin to check if a server is blacklisted
diff --git a/check_rbl/src b/check_rbl/src
index f9202ba..5793855 120000
--- a/check_rbl/src
+++ b/check_rbl/src
@@ -1 +1 @@
-check_rbl-1.3.8
\ No newline at end of file
+check_rbl-1.4.1/
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins-contrib.git



More information about the Pkg-nagios-changes mailing list