Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jan 2011 03:30:33 GMT
From:      Doug Barton <dougb@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/154367: Patch net-mgmt/p5-SNMP_Session to avoid redefinition of SNMP_Session::*_INET6
Message-ID:  <201101290330.p0T3UXEP009991@freefall.freebsd.org>
Resent-Message-ID: <201101290340.p0T3e9Rg018899@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         154367
>Category:       ports
>Synopsis:       Patch net-mgmt/p5-SNMP_Session to avoid redefinition of SNMP_Session::*_INET6
>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:   Sat Jan 29 03:40:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Doug Barton
>Release:        FreeBSD 8.1-STABLE i386
>Organization:
AAAG
>Environment:
	DNA
>Description:
	See https://bugs.gentoo.org/show_bug.cgi?id=321701 for a discussion
	of the bug. Using up to date ports and IPv6 enabled in both
	net-mgmt/mrtg and net-mgmt/p5-SNMP_Session with perl 5.10.1 I get:

/usr/local/bin/mrtg --logging /data/logs/mrtg.log --lock-file /var/run/mrtg/mrtg.lock /usr/local/etc/mrtg/mrtg.cfg
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
 Prototype mismatch: sub SNMP_Session::AF_INET6 () vs none 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
...
etc.

>How-To-Repeat:
	See above
>Fix:
	Apply the following patch:

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/net-mgmt/p5-SNMP_Session/Makefile,v
retrieving revision 1.32
diff -u -r1.32 Makefile
--- Makefile	4 Dec 2008 13:28:54 -0000	1.32
+++ Makefile	29 Jan 2011 03:25:41 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	SNMP_Session
 PORTVERSION=	1.12
+PORTREVISION=	1
 CATEGORIES=	net-mgmt perl5
 MASTER_SITES=	http://www.switch.ch/misc/leinen/snmp/perl/dist/%SUBDIR%/
 MASTER_SITE_SUBDIR=	. old
@@ -19,6 +20,12 @@
 
 DOCSDIR=	${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
 
+post-patch:
+	@${CP} ${WRKSRC}/lib/SNMP_Session.pm ${WRKSRC}/lib/SNMP_Session.pm.Dist
+	@${SED} -e 's#import Socket6#Socket6->import(qw(pack_sockaddr_in6 inet_pton))#' \
+		${WRKSRC}/lib/SNMP_Session.pm.Dist > \
+		${WRKSRC}/lib/SNMP_Session.pm
+
 post-install:
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101290330.p0T3UXEP009991>