resolve issue in mrtg SNMP_Session

This commit is contained in:
Tom "spot" Callaway 2011-10-02 13:20:59 +02:00
parent 7d6e9c0bd6
commit 1b839fc568
3 changed files with 59 additions and 1 deletions

View File

@ -0,0 +1,32 @@
diff -up mrtg-2.16.4/bin/mrtg.orig mrtg-2.16.4/bin/mrtg
--- mrtg-2.16.4/bin/mrtg.orig 2010-12-13 14:26:25.000000000 +0100
+++ mrtg-2.16.4/bin/mrtg 2010-12-13 14:31:30.168311050 +0100
@@ -98,6 +98,7 @@ use locales_mrtg "0.07";
BEGIN {
if (eval {local $SIG{__DIE__};require Socket6;}) {
import Socket;
+ use Socket();
import Socket6
}
}
diff -up mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm.orig mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm
--- mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm.orig 2010-05-17 15:59:20.000000000 +0200
+++ mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm 2010-12-13 14:26:25.366152933 +0100
@@ -146,7 +146,7 @@ BEGIN {
if (eval {local $SIG{__DIE__};require Socket6;} &&
eval {local $SIG{__DIE__};require IO::Socket::INET6; IO::Socket::INET6->VERSION("1.26");}) {
- import Socket6;
+ Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));
$ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1")));
$SNMP_Session::ipv6available = 1;
}
@@ -601,7 +601,7 @@ use Carp;
BEGIN {
if($SNMP_Session::ipv6available) {
import IO::Socket::INET6;
- import Socket6;
+ Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));
}
}

View File

@ -0,0 +1,21 @@
diff -up mrtg-2.17.2/lib/mrtg2/SNMP_Session.pm.socket6 mrtg-2.17.2/lib/mrtg2/SNMP_Session.pm
--- mrtg-2.17.2/lib/mrtg2/SNMP_Session.pm.socket6 2011-02-20 23:33:38.000000000 +0100
+++ mrtg-2.17.2/lib/mrtg2/SNMP_Session.pm 2011-10-02 13:04:28.512019418 +0200
@@ -146,7 +146,7 @@ BEGIN {
if (eval {local $SIG{__DIE__};require Socket6;} &&
eval {local $SIG{__DIE__};require IO::Socket::INET6; IO::Socket::INET6->VERSION("1.26");}) {
- Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));
+ Socket6->import(qw(inet_pton getaddrinfo));
$ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1")));
$SNMP_Session::ipv6available = 1;
}
@@ -601,7 +601,7 @@ use Carp;
BEGIN {
if($SNMP_Session::ipv6available) {
import IO::Socket::INET6;
- Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));
+ Socket6->import(qw(inet_pton getaddrinfo));
}
}

View File

@ -6,7 +6,7 @@
Summary: Multi Router Traffic Grapher
Name: mrtg
Version: 2.17.2
Release: 4%{?dist}
Release: 5%{?dist}
URL: http://oss.oetiker.ch/mrtg/
Source0: http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz
Source1: http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz.md5
@ -18,6 +18,7 @@ Source7: mrtg.tmpfiles
Source8: mrtg.service
Source9: mrtg.timer
Patch0: mrtg-2.15.0-lib64.patch
Patch2: mrtg-2.17.2-socket6-fix.patch
License: GPLv2+
Group: Applications/Internet
Requires(post): systemd-units
@ -39,6 +40,7 @@ images which provide a LIVE visual representation of this traffic.
%prep
%setup -q
%patch0 -p1 -b .lib64
%patch2 -p1 -b .socket6
for i in doc/mrtg-forum.1 doc/mrtg-squid.1 CHANGES; do
iconv -f iso-8859-1 -t utf-8 < "$i" > "${i}_"
@ -131,6 +133,9 @@ fi
%{_unitdir}/mrtg.timer
%changelog
* Sun Oct 2 2011 Tom Callaway <spot@fedoraproject.org> - 2.17.2-5
- Resolve bugzilla 732587
* Thu Sep 8 2011 Tom Callaway <spot@fedoraproject.org> - 2.17.2-4
- add missing systemd scriptlets
- drop cron.d config (systemd handles it now)