[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#717004: pu: package torrus/2.03-2+deb7u1



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: pu

Hello,

this is my first s-p-u request ever, please point out any mistakes I
might have made. Also please double-check whether this bug/fix can be
considered stable release material at all.

Andre Beck discovered in Bug#715365 that the torrus version shipped with
Wheezy (2.03) has some problems with SNMPv1-only targets. He identified
two upstream commits (one before 2.04, one before 2.05) that apply
cleanly on 2.03 and fix the problem for him. We have had 2.07 in
jessie/sid including both commits for some weeks now.

Andre tested both the patches locally for some time and tested a
previous version of the new package (different only in the version
number and the changelog entry). I also tested it locally and did not
find any negative side effects.

So, with your permission, I'd like to upload torrus/2.03-2+deb7u1 to
stable-proposed-updates for inclusion in a stable release.

Diff attached.

Thanks,
Bernhard
diff --git a/debian/changelog b/debian/changelog
index 6f32367..c0c4a17 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+torrus (2.03-2+deb7u1) stable-proposed-updates; urgency=low
+
+  * Fix SNMPv1 issues (Closes: #715365)
+    * debian/patches/20_collector_snmpv1.patch:
+      upstream commit 2f468f3e0aef02657b066baa98504dc98e841888 
+      (Bugfix in collector: maxrepetitions is unsupported in SNMPv1)
+    * debian/patches/20_walksnmptable_snmpv1.patch:
+      upstream commit 5985de2ace378ff8179ab9229470bd321728d061
+      (Bugfix in walkSnmpTable(): maxrepetitions is only applicable in 
+      SNMPv2 or v3)
+    Thanks to Andre Beck for identifying and testing the necessary commits.
+
+ -- Bernhard Schmidt <berni+deb@birkenwald.de>  Sat, 13 Jul 2013 21:31:44 +0200
+
 torrus (2.03-2) unstable; urgency=low
 
   [ Bernhard Schmidt ]
diff --git a/debian/patches/20_collector_snmpv1.patch b/debian/patches/20_collector_snmpv1.patch
new file mode 100644
index 0000000..7a3b278
--- /dev/null
+++ b/debian/patches/20_collector_snmpv1.patch
@@ -0,0 +1,36 @@
+commit 2f468f3e0aef02657b066baa98504dc98e841888
+Author: Stanislav Sinyagin <ssinyagin@k-open.com>
+Date:   Thu Oct 4 21:27:58 2012 +0200
+
+    Bugfix in collector: maxrepetitions is unsupported in SNMPv1
+
+diff --git a/perllib/Torrus/Collector/SNMP.pm b/perllib/Torrus/Collector/SNMP.pm
+index cf4c42d..0d13746 100644
+--- a/perllib/Torrus/Collector/SNMP.pm
++++ b/perllib/Torrus/Collector/SNMP.pm
+@@ -609,11 +609,20 @@ sub lookupMap
+ 
+         # Retrieve the map table
+ 
+-        my $maxrepetitions = $collector->param($token, 'snmp-maxrepetitions');
+-        $session->get_table( -baseoid => $map,
+-                             -maxrepetitions => $maxrepetitions,
+-                             -callback => [\&mapLookupCallback,
+-                                           $collector, $hosthash, $map] );
++        {
++            my @arg = ( -baseoid => $map,
++                        -callback => [\&mapLookupCallback,
++                                      $collector, $hosthash, $map] );
++            
++            if( $session->version() > 0 )
++            {
++                my $maxrepetitions =
++                    $collector->param($token, 'snmp-maxrepetitions');
++                push( @arg, '-maxrepetitions',  $maxrepetitions );
++            }
++            
++            $session->get_table( @arg );
++        }
+ 
+         $mapLookupScheduled{$maphash} = 1;
+ 
diff --git a/debian/patches/20_walksnmptable_snmpv1.patch b/debian/patches/20_walksnmptable_snmpv1.patch
new file mode 100644
index 0000000..e921121
--- /dev/null
+++ b/debian/patches/20_walksnmptable_snmpv1.patch
@@ -0,0 +1,38 @@
+commit 5985de2ace378ff8179ab9229470bd321728d061
+Author: Stanislav Sinyagin <ssinyagin@k-open.com>
+Date:   Thu May 3 20:00:32 2012 +0200
+
+    Bugfix in walkSnmpTable(): maxrepetitions is only applicable in SNMPv2 or v3
+
+diff --git a/perllib/Torrus/DevDiscover.pm b/perllib/Torrus/DevDiscover.pm
+index c2459c3..b41347b 100644
+--- a/perllib/Torrus/DevDiscover.pm
++++ b/perllib/Torrus/DevDiscover.pm
+@@ -594,7 +594,7 @@ sub buildConfig
+             {
+                 &{$reg->{$devtype}{'buildConfig'}}
+                 ( $devdetails, $cb, $devNode, $self->{'globalData'} );
+-            }
++          }
+ 
+             $cb->{'statistics'}{'hosts'}++;
+         }
+@@ -732,10 +732,15 @@ sub walkSnmpTable
+ 
+     my $session = $self->session();
+     my $base = $self->oiddef( $oidname );
++
++    my @arg = ( -baseoid => $base );
++
++    if( $session->version() > 0 )
++    {
++        push(@arg, -maxrepetitions => $self->{'maxrepetitions'});
++    }
+     
+-    my $table = $session->get_table
+-        ( -baseoid => $base,
+-          -maxrepetitions => $self->{'maxrepetitions'} );
++    my $table = $session->get_table( @arg );
+     
+     if( not defined($table) )
+     {
diff --git a/debian/patches/series b/debian/patches/series
index 370fcba..18c6194 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,4 +3,6 @@
 03_doc-userguide.patch
 04_doc-installation.patch
 10_rrdup_notify.patch
+20_collector_snmpv1.patch
+20_walksnmptable_snmpv1.patch
 99_log_sighup.patch

Attachment: signature.asc
Description: Digital signature


Reply to: