[packages/perl-SNMP_Session] Fix conflicts with new Socket6 module

jajcus jajcus at pld-linux.org
Thu Sep 19 21:29:25 CEST 2013


commit ead5285c9fcbf795f4e2725cf6f896e6e4ecd860
Author: Jacek Konieczny <jajcus at jajcus.net>
Date:   Thu Sep 19 20:45:42 2013 +0200

    Fix conflicts with new Socket6 module
    
    The conflicts cause errors in mrtg cron job output.
    
    http://code.google.com/p/snmp-session/issues/detail?id=5

 perl-SNMP_Session-Socket6_conflict.patch | 21 +++++++++++++++++++++
 perl-SNMP_Session.spec                   |  2 ++
 2 files changed, 23 insertions(+)
---
diff --git a/perl-SNMP_Session.spec b/perl-SNMP_Session.spec
index 6598d14..dbf1a9a 100644
--- a/perl-SNMP_Session.spec
+++ b/perl-SNMP_Session.spec
@@ -27,6 +27,7 @@ License:	Artistic
 Group:		Development/Languages/Perl
 Source0:	http://snmp-session.googlecode.com/files/SNMP_Session-%{version}.tar.gz
 # Source0-md5:	055e1065babf55f1f8606329c6bdb947
+Patch0:		%{name}-Socket6_conflict.patch
 URL:		http://code.google.com/p/snmp-session/
 BuildRequires:	perl-devel >= 1:5.8.0
 BuildRequires:	rpm-perlprov >= 4.1-13
@@ -44,6 +45,7 @@ używane wspólnie, dają dostęp do zewnętrznych serwisów SNMP (v1/v2).
 
 %prep
 %setup -q -n SNMP_Session-%{version}
+%patch0 -p0
 
 %build
 %{__perl} Makefile.PL \
diff --git a/perl-SNMP_Session-Socket6_conflict.patch b/perl-SNMP_Session-Socket6_conflict.patch
new file mode 100644
index 0000000..9017647
--- /dev/null
+++ b/perl-SNMP_Session-Socket6_conflict.patch
@@ -0,0 +1,21 @@
+$OpenBSD: patch-lib_SNMP_Session_pm,v 1.2 2010/03/20 23:05:17 sthen Exp $
+--- lib/SNMP_Session.pm.orig	Fri Nov 21 05:25:17 2008
++++ lib/SNMP_Session.pm	Tue Mar 16 16:14:22 2010
+@@ -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(inet_pton getaddrinfo));
+ 	$ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1")));
+ 	$SNMP_Session::ipv6available = 1;
+     }
+@@ -605,7 +605,7 @@ use Carp;
+ BEGIN {
+     if($SNMP_Session::ipv6available) {
+ 	import IO::Socket::INET6;
+-	import Socket6;
++	Socket6->import(qw(inet_pton getaddrinfo));
+     }
+ }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-SNMP_Session.git/commitdiff/ead5285c9fcbf795f4e2725cf6f896e6e4ecd860



More information about the pld-cvs-commit mailing list