-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also added support for regression testing. make test in package directory will run test suite. snmpd and snmptrapd need to already running, and t/startagent.pl needs to have correct values for SNMP v1 access.
- Loading branch information
wrstuden
committed
Jan 30, 2001
1 parent
8bb4b32
commit 302a9a2
Showing
8 changed files
with
101 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,38 @@ | ||
# $NetBSD: Makefile,v 1.7 2000/08/29 20:48:14 jlam Exp $ | ||
# $NetBSD: Makefile,v 1.8 2001/01/30 22:03:38 wrstuden Exp $ | ||
# FreeBSD Id: Makefile,v 1.1.1.1 1997/06/27 01:53:13 jfitz Exp | ||
# | ||
|
||
DISTNAME= SNMP-1.7 | ||
PKGNAME= p5-SNMP-1.7 | ||
DISTNAME= SNMP-3.1.0 | ||
PKGNAME= p5-SNMP-3.1.0 | ||
CATEGORIES= net perl5 | ||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=SNMP/} | ||
|
||
MAINTAINER= [email protected] | ||
|
||
DEPENDS= ucd-snmp>=4.0.1:../../net/ucd-snmp | ||
DEPENDS= ucd-snmp>=4.1.0:../../net/ucd-snmp | ||
|
||
USE_PERL5= # defined | ||
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" | ||
#MAKE_PARAMS= DEFINE="-DPERL_POLLUTE=1" | ||
|
||
PLFILES= async1.pl async2.pl ipforward.pl mibtree.pl mibwalk.pl | ||
PLFILES+= pingmib.pl tablewalk.pl testleak.pl | ||
|
||
do-configure: | ||
@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} Makefile.PL ${MAKE_PARAMS} | ||
|
||
post-build: | ||
@for i in ${PLFILES} ; do ${ECHO} "#! ${PREFIX}/bin/perl" | ${CAT} - ${WRKSRC}/examples/$$i > ${WRKDIR}/$$i ; done | ||
|
||
post-install: | ||
@${INSTALL_DATA} ${WRKSRC}/README ${PERL5_SITELIB}/README.SNMP | ||
@${MKDIR} ${PREFIX}/share/examples/p5-SNMP | ||
@for i in ${PLFILES} ; do ${INSTALL_SCRIPT} ${WRKDIR}/$$i ${PREFIX}/share/examples/p5-SNMP/$$i ; done | ||
|
||
test: | ||
@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} test | ||
|
||
.include "../../mk/bsd.pkg.mk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
$NetBSD: md5,v 1.2 1998/08/07 13:25:11 agc Exp $ | ||
$NetBSD: md5,v 1.3 2001/01/30 22:03:39 wrstuden Exp $ | ||
|
||
MD5 (SNMP-1.7.tar.gz) = 430af6d8ff8ceaad2dfc35f6e0dcfd0a | ||
MD5 (SNMP-3.1.0.tar.gz) = 21dc57fbf812b2b105412f584e2c2463 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
$NetBSD: patch-sum,v 1.1 1999/07/09 14:12:26 agc Exp $ | ||
$NetBSD: patch-sum,v 1.2 2001/01/30 22:03:39 wrstuden Exp $ | ||
|
||
MD5 (patch-aa) = 36edb9af9dfbd05fb0b82084d1a83bfd | ||
MD5 (patch-aa) = 30e86db994132e71af3d90c014795097 | ||
MD5 (patch-ab) = 46ee3d5608d83ff544f0dd738375ab80 | ||
MD5 (patch-ac) = fb73e365cf90e149ed52760fa689bdf1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,34 @@ | ||
$NetBSD: patch-aa,v 1.2 1998/08/07 11:10:49 agc Exp $ | ||
$NetBSD: patch-aa,v 1.3 2001/01/30 22:03:39 wrstuden Exp $ | ||
|
||
--- Makefile.PL.orig Fri Dec 19 01:34:49 1997 | ||
+++ Makefile.PL Sun May 24 00:39:43 1998 | ||
@@ -32,10 +32,10 @@ | ||
$sep = '/'; | ||
} | ||
my $inc_path1 = "${sep}usr${sep}include"; | ||
-my $inc_path2 = "${sep}usr${sep}local${sep}include"; | ||
+my $inc_path2 = "$ENV{'PREFIX'}${sep}include"; | ||
my $inc_path3 = "${inc_path2}${sep}ucd-snmp"; | ||
my $lib_path1 = "${sep}usr${sep}lib"; | ||
-my $lib_path2 = "${sep}usr${sep}local${sep}lib"; | ||
+my $lib_path2 = "$ENV{'PREFIX'}${sep}lib"; | ||
|
||
my @IncludeFiles = qw[asn1.h mib.h parse.h snmp.h snmp_api.h | ||
snmp_client.h snmp_impl.h]; | ||
@@ -52,7 +52,7 @@ | ||
|
||
@IncludeFiles = map {"$IncludeDir$sep$_";} @IncludeFiles; | ||
$Params{LIBS} = "-L$LibDir -l$snmp_llib"; | ||
- $Params{INC} = "-I$IncludeDir"; | ||
+ $Params{INC} = "-I$IncludeDir -DCMU_COMPATIBLE"; | ||
$Params{H} = \@IncludeFiles; | ||
return(%Params); | ||
} | ||
@@ -79,8 +79,8 @@ | ||
--- 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 = '/'; | ||
} | ||
$host ||= 'localhost'; | ||
$comm ||= 'private'; | ||
- my $resp = prompt("Enter host and community for SNMP tests: ", | ||
- "$host $comm"); | ||
+#HF# my $resp = prompt("Enter host and community for SNMP tests: ", | ||
+#HF# "$host $comm"); | ||
open(H, ">host") || die "Error: could not open file 'host' ($!)"; | ||
print H "$resp\n"; | ||
close H; | ||
- 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"; | ||
|
||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
$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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
$NetBSD: patch-ac,v 1.1 2001/01/30 22:03:40 wrstuden Exp $ | ||
|
||
--- t/mib.t.orig Tue Jan 30 05:15:44 2001 | ||
+++ t/mib.t Tue Jan 30 05:16:19 2001 | ||
@@ -147,13 +147,13 @@ | ||
###################### 15 ######################### | ||
$res = $SNMP::MIB{atNetAddress}{nextNode}; | ||
#print("res is --> $res\n"); | ||
-ok($res =~ /^HASH/); | ||
+ok(ref($res) eq HASH); | ||
#print("\n"); | ||
|
||
######################## 16 ######################### | ||
$res = $SNMP::MIB{sysDescr}{children}; | ||
#print("res is --> $res\n"); | ||
-ok($res =~ /^ARRAY/); | ||
+ok(ref($res) eq ARRAY); | ||
#print("\n"); | ||
#################### 17 ######################### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Perl5 module for interfacing to the CMU SNMP library | ||
Perl5 module for interfacing to the UCD SNMP library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
@comment $NetBSD: PLIST,v 1.2 2000/08/29 20:48:14 jlam Exp $ | ||
@comment $NetBSD: PLIST,v 1.3 2001/01/30 22:03:40 wrstuden 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 |