resolve issue in mrtg SNMP_Session
This commit is contained in:
parent
7d6e9c0bd6
commit
1b839fc568
32
mrtg-2.16.4-Socket6-fix.patch
Normal file
32
mrtg-2.16.4-Socket6-fix.patch
Normal 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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
21
mrtg-2.17.2-socket6-fix.patch
Normal file
21
mrtg-2.17.2-socket6-fix.patch
Normal 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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,7 +6,7 @@
|
|||||||
Summary: Multi Router Traffic Grapher
|
Summary: Multi Router Traffic Grapher
|
||||||
Name: mrtg
|
Name: mrtg
|
||||||
Version: 2.17.2
|
Version: 2.17.2
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
URL: http://oss.oetiker.ch/mrtg/
|
URL: http://oss.oetiker.ch/mrtg/
|
||||||
Source0: http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz
|
Source0: http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz
|
||||||
Source1: http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz.md5
|
Source1: http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz.md5
|
||||||
@ -18,6 +18,7 @@ Source7: mrtg.tmpfiles
|
|||||||
Source8: mrtg.service
|
Source8: mrtg.service
|
||||||
Source9: mrtg.timer
|
Source9: mrtg.timer
|
||||||
Patch0: mrtg-2.15.0-lib64.patch
|
Patch0: mrtg-2.15.0-lib64.patch
|
||||||
|
Patch2: mrtg-2.17.2-socket6-fix.patch
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
Requires(post): systemd-units
|
Requires(post): systemd-units
|
||||||
@ -39,6 +40,7 @@ images which provide a LIVE visual representation of this traffic.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .lib64
|
%patch0 -p1 -b .lib64
|
||||||
|
%patch2 -p1 -b .socket6
|
||||||
|
|
||||||
for i in doc/mrtg-forum.1 doc/mrtg-squid.1 CHANGES; do
|
for i in doc/mrtg-forum.1 doc/mrtg-squid.1 CHANGES; do
|
||||||
iconv -f iso-8859-1 -t utf-8 < "$i" > "${i}_"
|
iconv -f iso-8859-1 -t utf-8 < "$i" > "${i}_"
|
||||||
@ -131,6 +133,9 @@ fi
|
|||||||
%{_unitdir}/mrtg.timer
|
%{_unitdir}/mrtg.timer
|
||||||
|
|
||||||
%changelog
|
%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
|
* Thu Sep 8 2011 Tom Callaway <spot@fedoraproject.org> - 2.17.2-4
|
||||||
- add missing systemd scriptlets
|
- add missing systemd scriptlets
|
||||||
- drop cron.d config (systemd handles it now)
|
- drop cron.d config (systemd handles it now)
|
||||||
|
Loading…
Reference in New Issue
Block a user