pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/p5-SNMP Update to version 5.0.9.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ff31d1ab894e
branches:  trunk
changeset: 468396:ff31d1ab894e
user:      seb <seb%pkgsrc.org@localhost>
date:      Fri Feb 13 17:46:22 2004 +0000

description:
Update to version 5.0.9.

The main change is the switch from UCD-SNMP to Net-SNMP,
gaining asynchronous operation in the process and support
for net-snmp configuration files -this will likely affect your
perl applications.

diffstat:

 net/p5-SNMP/DESCR            |   22 +++-
 net/p5-SNMP/Makefile         |   30 ++----
 net/p5-SNMP/PLIST            |   13 +--
 net/p5-SNMP/distinfo         |   12 +-
 net/p5-SNMP/patches/patch-aa |   43 ++-------
 net/p5-SNMP/patches/patch-ab |  192 +++++++++++++++++++++++++++++++++++++++---
 net/p5-SNMP/patches/patch-ac |   77 +++++++++++++----
 7 files changed, 279 insertions(+), 110 deletions(-)

diffs (truncated from 439 to 300 lines):

diff -r a2586d7f6cd3 -r ff31d1ab894e net/p5-SNMP/DESCR
--- a/net/p5-SNMP/DESCR Fri Feb 13 17:41:30 2004 +0000
+++ b/net/p5-SNMP/DESCR Fri Feb 13 17:46:22 2004 +0000
@@ -1,9 +1,15 @@
-This is a Perl5 extension module which provides an interface to the
-CMU-SNMPv2 library.
+This is the Perl5 'SNMP' extension module. The SNMP module provides a
+full featured, tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) API. The
+SNMP module also provides an interface to the SMI MIB parse-tree for
+run-time access to parsed MIB data.  The SNMP module internals rely on
+the Net-SNMP toolkit library (previously known as ucd-snmp).
 
-The basic operations offered by SNMP are provided through an object
-oriented interface for modularity and ease of use. The primary object is
-SNMP::Session which is implemented as a blessed hash reference. The
-object supports 'get', 'set', and 'getNext' method calls. All calls are
-blocking/synchronous (i.e., they must receive a response or timeout
-before control is returned to the caller).
+The basic operations of the SNMP protocol are provided by this module
+through an object oriented interface for modularity and ease of use.
+The primary class is SNMP::Session which encapsulates the persistent
+aspects of a connection between the management application and the
+managed agent. Internally the class is implemented as a blessed hash
+reference. This class supplies 'get', 'getnext', 'set', 'fget', and
+'fgetnext' and other method calls. The methods take a variety of input
+argument formats and support both synchronous and asynchronous
+operation through a polymorphic API.
diff -r a2586d7f6cd3 -r ff31d1ab894e net/p5-SNMP/Makefile
--- a/net/p5-SNMP/Makefile      Fri Feb 13 17:41:30 2004 +0000
+++ b/net/p5-SNMP/Makefile      Fri Feb 13 17:46:22 2004 +0000
@@ -1,35 +1,27 @@
-# $NetBSD: Makefile,v 1.17 2003/09/13 06:22:50 jlam Exp $
+# $NetBSD: Makefile,v 1.18 2004/02/13 17:46:22 seb Exp $
 # FreeBSD Id: Makefile,v 1.1.1.1 1997/06/27 01:53:13 jfitz Exp
 #
 
-DISTNAME=      SNMP-3.1.0
-PKGNAME=       p5-SNMP-3.1.0
-PKGREVISION=   1
+DISTNAME=      net-snmp-5.0.9
+PKGNAME=       p5-SNMP-5.0.9
 SVR4_PKGNAME=  p5snm
 CATEGORIES=    net perl5
-MASTER_SITES=  ${MASTER_SITE_PERL_CPAN:=SNMP/}
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=net-snmp/}
 
 MAINTAINER=    tech-pkg%NetBSD.org@localhost
-COMMENT=       Perl5 module for interfacing to the UCD SNMP library
+HOMEPAGE=      http://www.net-snmp.org/
+COMMENT=       Perl5 module for interfacing to the Net-SNMP library
 
 USE_BUILDLINK2=        YES
-PERL5_PACKLIST=        ${PERL5_SITEARCH}/auto/SNMP/.packlist
-
-# Until the source catches up to the current Perl API, we need PERL_POLLUTE
-# to look like an older perl.
-#MAKE_PARAMS=  DEFINE="-DPERL_POLLUTE=1"
+PERL5_PACKLIST=        ${PERL5_SITEARCH}/auto/Bundle/NetSNMP/.packlist
 
-PLFILES=       async1.pl async2.pl ipforward.pl mibtree.pl mibwalk.pl
-PLFILES+=      pingmib.pl tablewalk.pl testleak.pl
+WRKSRC=                ${WRKDIR}/${DISTNAME}/perl
 
-post-build:
-       @for i in ${PLFILES} ; do ${ECHO} "#! ${PREFIX}/bin/perl" | ${CAT} - ${WRKSRC}/examples/$$i > ${WRKDIR}/$$i ; done
+INSTALLATION_DIRS+=    share/doc/p5-SNMP
 
 post-install:
-       @${INSTALL_DATA} ${WRKSRC}/README ${PERL5_SITELIB}/README.SNMP
-       @${INSTALL_DATA_DIR} ${PREFIX}/share/examples/p5-SNMP
-       @for i in ${PLFILES} ; do ${INSTALL_SCRIPT} ${WRKDIR}/$$i ${PREFIX}/share/examples/p5-SNMP/$$i ; done
+       ${INSTALL_DATA} ${WRKSRC}/SNMP/README ${PREFIX}/share/doc/p5-SNMP/README
 
 .include "../../lang/perl5/module.mk"
-.include "../../net/ucd-snmp/buildlink2.mk"
+.include "../../net/net-snmp/buildlink2.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r a2586d7f6cd3 -r ff31d1ab894e net/p5-SNMP/PLIST
--- a/net/p5-SNMP/PLIST Fri Feb 13 17:41:30 2004 +0000
+++ b/net/p5-SNMP/PLIST Fri Feb 13 17:46:22 2004 +0000
@@ -1,11 +1,2 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 22:57:30 zuntum Exp $
-${PERL5_SITELIB}/README.SNMP
-share/examples/p5-SNMP/async1.pl
-share/examples/p5-SNMP/async2.pl
-share/examples/p5-SNMP/ipforward.pl
-share/examples/p5-SNMP/mibtree.pl
-share/examples/p5-SNMP/mibwalk.pl
-share/examples/p5-SNMP/pingmib.pl
-share/examples/p5-SNMP/tablewalk.pl
-share/examples/p5-SNMP/testleak.pl
-@dirrm share/examples/p5-SNMP
+@comment $NetBSD: PLIST,v 1.2 2004/02/13 17:46:22 seb Exp $
+share/doc/p5-SNMP/README
diff -r a2586d7f6cd3 -r ff31d1ab894e net/p5-SNMP/distinfo
--- a/net/p5-SNMP/distinfo      Fri Feb 13 17:41:30 2004 +0000
+++ b/net/p5-SNMP/distinfo      Fri Feb 13 17:46:22 2004 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.2 2001/04/21 11:23:28 wiz Exp $
+$NetBSD: distinfo,v 1.3 2004/02/13 17:46:22 seb Exp $
 
-SHA1 (SNMP-3.1.0.tar.gz) = 097be7307d2803e74149abf294735d7aea5cfba8
-Size (SNMP-3.1.0.tar.gz) = 75010 bytes
-SHA1 (patch-aa) = 5a2c41eda609fee3b30ceccf436650c29f54d41b
-SHA1 (patch-ab) = 919e877aabec85b775a07cc74a7c646485298f70
-SHA1 (patch-ac) = d36f4edac534971f598129880f62af52120ff829
+SHA1 (net-snmp-5.0.9.tar.gz) = bb27bdf38da96833a3fa55f8c6a14732ab2c1991
+Size (net-snmp-5.0.9.tar.gz) = 2345822 bytes
+SHA1 (patch-aa) = bf695411a053cd0a9d8ecfd056edc57528454487
+SHA1 (patch-ab) = cedbea3a47e0322d9528333e1e8323e3d496cf9d
+SHA1 (patch-ac) = d423bdee21c07f4625f77ec1e08f6b212fab2b79
diff -r a2586d7f6cd3 -r ff31d1ab894e net/p5-SNMP/patches/patch-aa
--- a/net/p5-SNMP/patches/patch-aa      Fri Feb 13 17:41:30 2004 +0000
+++ b/net/p5-SNMP/patches/patch-aa      Fri Feb 13 17:46:22 2004 +0000
@@ -1,34 +1,13 @@
-$NetBSD: patch-aa,v 1.3 2001/01/30 22:03:39 wrstuden Exp $
+$NetBSD: patch-aa,v 1.4 2004/02/13 17:46:22 seb Exp $
 
---- Makefile.PL.orig   Fri Jan 26 13:35:24 2001
-+++ Makefile.PL        Fri Jan 26 14:03:10 2001
-@@ -31,9 +31,9 @@
-       $snmp_link_lib = 'snmp';
-       $sep = '/';
-     }
--    my $inc_path1 = "${sep}usr${sep}local${sep}include";
-+    my $inc_path1 = "$ENV{'PREFIX'}${sep}include";
-     my $inc_path2 = "${sep}usr${sep}include";
--    my $lib_path1 = "${sep}usr${sep}local${sep}lib";
-+    my $lib_path1 = "$ENV{'PREFIX'}${sep}lib";
-     my $lib_path2 = "${sep}usr${sep}lib";
+--- OID/OID.xs.orig    Thu Dec 19 22:49:21 2002
++++ OID/OID.xs
+@@ -12,7 +12,7 @@
+ #define NETSNMP_NAMEBUF_LEN 128
+ typedef struct netsnmp_oid_s {
+     oid                 *name;
+-    unsigned int         len;
++    size_t               len;
+     oid                  namebuf[ NETSNMP_NAMEBUF_LEN ];
+ } netsnmp_oid;
  
-     my @IncludeFiles = qw[ucd-snmp/ucd-snmp-config.h
-@@ -58,7 +58,7 @@
-     $ssl_link_lib = ($^O =~ /win32/i ? 'libeay32' : 'crypto');
-     my $ssl_link_libs;
-     if (HasSSL("$IncludeDir${sep}ucd-snmp/ucd-snmp-config.h")) {
--      my @SSLLibDirs = ("/usr/local/lib", "/usr/local/ssl/lib", "/usr/lib");
-+      my @SSLLibDirs = ("/usr/lib", "$ENV{'PREFIX'}/lib");
-       my $SSLLibDir = find_files([$ssl_lib], \@SSLLibDirs) ||
-           prompt("Where is the SSL library installed?", $SSLLibDirs[1]);
-       $ssl_link = "-L$SSLLibDir -l$ssl_link_lib" if $SSLLibDir;
-@@ -87,7 +87,7 @@
- sub GetTestInfo {
-     my $sep = ($^O =~ /win32/i ? '\\' : '/');
-     my $info_file = "t${sep}snmptest.cmd";
--    my $snmpd_path1 = "${sep}usr${sep}local${sep}sbin";
-+    my $snmpd_path1 = "$ENV{'PREFIX'}${sep}sbin";
-     my $snmpd_path2 = "${sep}usr${sep}sbin";
-     my $snmpd_path3 = "${sep}usr${sep}bin";
-     return if -e $info_file;
diff -r a2586d7f6cd3 -r ff31d1ab894e net/p5-SNMP/patches/patch-ab
--- a/net/p5-SNMP/patches/patch-ab      Fri Feb 13 17:41:30 2004 +0000
+++ b/net/p5-SNMP/patches/patch-ab      Fri Feb 13 17:46:22 2004 +0000
@@ -1,16 +1,176 @@
-$NetBSD: patch-ab,v 1.1 2001/01/30 22:03:39 wrstuden Exp $
---- t/mibload.t.orig   Mon Jan 29 10:19:18 2001
-+++ t/mibload.t        Mon Jan 29 10:24:02 2001
-@@ -33,9 +33,9 @@
-     @mibdir = ("/usr/mibs");
-     @mibfile = ("/usr/mibs/IPV6-TCP-MIB.txt", "/usr/mibs/snmp-proxy-mib.txt");
- } else {
--    $mibfile1 = "/usr/local/share/snmp/mibs/TCP-MIB.txt";
--    @mibdir = ('/usr/local/share/snmp/mibs/');
--    @mibfile = ('/usr/local/share/snmp/mibs/IPV6-TCP-MIB.txt');
-+    $mibfile1 = "$ENV{'PREFIX'}/share/snmp/mibs/TCP-MIB.txt";
-+    @mibdir = ("$ENV{'PREFIX'}/share/snmp/mibs/");
-+    @mibfile = ("$ENV{'PREFIX'}/share/snmp/mibs/IPV6-TCP-MIB.txt");
- }
- ######################################################################
- # See if we can find a mib to use, return of 0 means the file wasn't
+$NetBSD: patch-ab,v 1.2 2004/02/13 17:46:22 seb Exp $
+
+--- SNMP/SNMP.xs.orig  Fri Jul 25 01:14:48 2003
++++ SNMP/SNMP.xs
+@@ -119,15 +119,15 @@ static int __snprint_value _((char *, si
+                               netsnmp_variable_list*, struct tree *,
+                              int, int));
+ static int __sprint_num_objid _((char *, oid *, int));
+-static int __scan_num_objid _((char *, oid *, int *));
++static int __scan_num_objid _((char *, oid *, size_t *));
+ static int __get_type_str _((int, char *));
+ static int __get_label_iid _((char *, char **, char **, int));
+ static int __oid_cmp _((oid *, int, oid *, int));
+ static int __tp_sprint_num_objid _((char*,SnmpMibNode *));
+ static SnmpMibNode * __get_next_mib_node _((SnmpMibNode *));
+ static struct tree * __oid2tp _((oid*, int, struct tree *, int*));
+-static struct tree * __tag2oid _((char *, char *, oid  *, int  *, int *, int));
+-static int __concat_oid_str _((oid *, int *, char *));
++static struct tree * __tag2oid _((char *, char *, oid  *, size_t  *, int *, int));
++static int __concat_oid_str _((oid *, size_t *, char *));
+ static int __add_var_val_str _((netsnmp_pdu *, oid *, int, char *,
+                                  int, int));
+ static int __send_sync_pdu _((netsnmp_session *, netsnmp_pdu *,
+@@ -565,7 +565,7 @@ static int
+ __scan_num_objid (buf, objid, len)
+ char *buf;
+ oid *objid;
+-int *len;
++size_t *len;
+ {
+    char *cp;
+    *len = 0;
+@@ -818,7 +818,7 @@ __tag2oid(tag, iid, oid_arr, oid_arr_len
+ char * tag;
+ char * iid;
+ oid  * oid_arr;
+-int  * oid_arr_len;
++size_t  * oid_arr_len;
+ int  * type;
+ int    best_guess;
+ {
+@@ -826,7 +826,7 @@ int    best_guess;
+    struct tree *rtp = NULL;
+    DLL_IMPORT extern struct tree *tree_head;
+    oid newname[MAX_OID_LEN], *op;
+-   int newname_len = 0;
++   size_t newname_len = 0;
+ 
+    if (type) *type = TYPE_UNKNOWN;
+    if (oid_arr_len) *oid_arr_len = 0;
+@@ -926,7 +926,7 @@ found:
+ static int
+ __concat_oid_str(doid_arr, doid_arr_len, soid_str)
+ oid *doid_arr;
+-int *doid_arr_len;
++size_t *doid_arr_len;
+ char * soid_str;
+ {
+    char soid_buf[STR_BUF_SIZE];
+@@ -2794,7 +2794,10 @@ snmp_read_mib(mib_file, force=0)
+               if (verbose) warn("failed\n");
+            }
+         }
+-        RETVAL = (I32)Mib;
++      if (Mib)
++              RETVAL = (I32)1;
++      else
++              RETVAL = (I32)0;
+         }
+         OUTPUT:
+         RETVAL
+@@ -2817,7 +2820,10 @@ snmp_read_module(module)
+         } else {
+            if (verbose) warn("Failed reading %s\n", module);
+         }
+-        RETVAL = (I32)Mib;
++      if (Mib)
++              RETVAL = (I32)1;
++      else
++              RETVAL = (I32)0;
+         }
+         OUTPUT:
+         RETVAL
+@@ -2840,7 +2846,7 @@ snmp_set(sess_ref, varlist_ref, perl_cal
+            netsnmp_pdu *pdu, *response;
+            struct tree *tp;
+          oid *oid_arr;
+-         int oid_arr_len = MAX_OID_LEN;
++         size_t oid_arr_len = MAX_OID_LEN;
+            char *tag_pv;
+            snmp_xs_cb_data *xs_cb_data;
+            SV **sess_ptr_sv;
+@@ -3035,7 +3041,7 @@ snmp_get(sess_ref, retry_nosuch, varlist
+            struct tree *tp;
+            int len;
+            oid *oid_arr = NULL;
+-           int oid_arr_len = MAX_OID_LEN;
++           size_t oid_arr_len = MAX_OID_LEN;
+            SV *tmp_sv;
+            char *tag_pv;
+            int type;
+@@ -3188,7 +3194,7 @@ snmp_getnext(sess_ref, varlist_ref, perl
+            struct tree *tp;
+            int len;
+          oid *oid_arr;
+-         int oid_arr_len = MAX_OID_LEN;
++         size_t oid_arr_len = MAX_OID_LEN;
+            SV *tmp_sv;
+            int type;
+          char tmp_type_str[MAX_TYPE_NAME_LEN];
+@@ -3394,7 +3400,7 @@ snmp_getbulk(sess_ref, nonrepeaters, max
+            struct tree *tp;
+            int len;
+          oid *oid_arr;
+-         int oid_arr_len = MAX_OID_LEN;
++         size_t oid_arr_len = MAX_OID_LEN;
+            SV *tmp_sv;
+            int type;
+          char tmp_type_str[MAX_TYPE_NAME_LEN];
+@@ -3599,7 +3605,7 @@ snmp_bulkwalk(sess_ref, nonrepeaters, ma



Home | Main Index | Thread Index | Old Index