ports/154411: [patch] Make net-mgmt/p5-SNMP_Session not to issue warnings with mrtg

Eugene Grosbein egrosbein at rdtc.ru
Mon Jan 31 09:10:11 UTC 2011


>Number:         154411
>Category:       ports
>Synopsis:       [patch] Make net-mgmt/p5-SNMP_Session not to issue warnings with mrtg
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 31 09:10:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Eugene Grosbein
>Release:        FreeBSD 7.4-PRERELEASE i386
>Organization:
RDTC JSC
>Environment:
System: FreeBSD syslog.sd.rdtc.ru 7.4-PRERELEASE FreeBSD 7.4-PRERELEASE #6: Tue Nov 23 13:49:00 NOVT 2010 root at syslog.sd.rdtc.ru:/usr/obj/usr/src/sys/SYSLOG i386
	p5-SNMP_Session-1.12

>Description:
	mrtg depends on net-mgmt/p5-SNMP_Session and with p5-SNMP_Session-1.12
	mrtg issues warnings like this at start:

Constant subroutine SNMP_Session::AF_INET6 redefined at /usr/local/lib/perl5/5.10.1/Exporter.pm line 67.
 at /usr/local/lib/perl5/site_perl/5.10.1/SNMP_Session.pm line 149

	net-mgmt/p5-SNMP_Session should be patched to eliminate warnings.
	The patch taken from http://oss.oetiker.ch/mrtg-trac/changeset/330 follows.


>How-To-Repeat:
	See above.
>Fix:

	Create ports/net-mgmt/p5-SNMP_Session/files subdirectory
	and put the patch as "patch-SNMP_Session.pm" there:

--- lib/SNMP_Session.pm.orig	2011-01-31 14:10:12.000000000 +0600
+++ lib/SNMP_Session.pm	2011-01-31 14:11:20.000000000 +0600
@@ -146,7 +146,7 @@
 
     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 @@
 BEGIN {
     if($SNMP_Session::ipv6available) {
 	import IO::Socket::INET6;
-	import Socket6;
+	Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo)); 
     }
 }
 

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list