Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Apr 2001 09:08:54 +0900
From:      Jun Kuriyama <kuriyama@imgsrc.co.jp>
To:        billf@FreeBSD.org
Cc:        Ports Team <ports@FreeBSD.org>
Subject:   ucd-snmp-4.2.1 released
Message-ID:  <7m8zlgdx7t.wl@waterblue.imgsrc.co.jp>

next in thread | raw e-mail | index | archive | help
--Multipart_Thu_Apr__5_09:08:54_2001-1
Content-Type: text/plain; charset=US-ASCII


I made a patch to update our port to 4.2.1 release from net-snmp
project.

Some of our patches are merged into original distribution after 4.2.

# Bill, patch-{ab,af,ag,ap} should be "cvs remove"d if you use this
# diff.


-- 
Jun Kuriyama <kuriyama@imgsrc.co.jp> // IMG SRC, Inc.
             <kuriyama@FreeBSD.org> // FreeBSD Project

--Multipart_Thu_Apr__5_09:08:54_2001-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="net-snmp.diff"
Content-Transfer-Encoding: 7bit

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net/net-snmp/Makefile,v
retrieving revision 1.56
diff -u -r1.56 Makefile
--- Makefile	2001/02/08 02:39:57	1.56
+++ Makefile	2001/04/04 23:46:57
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	ucd-snmp
-PORTVERSION=	4.2
+PORTVERSION=	4.2.1
 CATEGORIES=	net ipv6
 MASTER_SITES= 	${MASTER_SITE_SOURCEFORGE} \
 		ftp://ucd-snmp.ucdavis.edu/ \
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/net/net-snmp/distinfo,v
retrieving revision 1.13
diff -u -r1.13 distinfo
--- distinfo	2001/01/18 09:58:30	1.13
+++ distinfo	2001/04/04 23:47:01
@@ -1 +1 @@
-MD5 (ucd-snmp-4.2.tar.gz) = 7370edec952a6830459948d9808da7cb
+MD5 (ucd-snmp-4.2.1.tar.gz) = 192d467185c8e7142c155d5e162b1e97
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/net/net-snmp/pkg-plist,v
retrieving revision 1.16
diff -u -r1.16 pkg-plist
--- pkg-plist	2001/02/08 02:39:57	1.16
+++ pkg-plist	2001/04/04 23:55:44
@@ -134,9 +134,12 @@
 share/snmp/snmpconf/snmpd.conf/operation
 share/snmp/snmpconf/snmpd.conf/system
 share/snmp/snmpconf/snmpd.conf/trapsinks
+share/snmp/snmpconf/snmptrapd.conf/formatting
+share/snmp/snmpconf/snmptrapd.conf/traphandle
 @unexec rm -f %D/share/snmp/mibs/.index
 @dirrm share/snmp/mibs
 @dirrm share/snmp/snmpconf/snmp.conf
 @dirrm share/snmp/snmpconf/snmpd.conf
+@dirrm share/snmp/snmpconf/snmptrapd.conf
 @dirrm share/snmp/snmpconf
 @dirrm share/snmp
Index: files/patch-ab
===================================================================
RCS file: /home/ncvs/ports/net/net-snmp/files/patch-ab,v
retrieving revision 1.3
diff -u -r1.3 patch-ab
--- files/patch-ab	2000/12/31 05:17:01	1.3
+++ files/patch-ab	2001/03/29 02:51:39
@@ -1,56 +0,0 @@
---- agent/mibgroup/ucd-snmp/disk.c~	Fri Mar  5 08:45:00 1999
-+++ agent/mibgroup/ucd-snmp/disk.c	Sat Apr  3 13:33:11 1999
-@@ -24,12 +24,12 @@
- #include <sys/vmmeter.h>
- #endif
- #endif
--#if HAVE_SYS_CONF_H
--#include <sys/conf.h>
--#endif
- #if HAVE_SYS_PARAM_H
- #include <sys/param.h>
- #endif
-+#if HAVE_SYS_CONF_H
-+#include <sys/conf.h>
-+#endif
- #if HAVE_ASM_PAGE_H
- #include <asm/page.h>
- #endif
-@@ -86,6 +86,7 @@
- #include <vm/vm.h>
- #endif
- #if HAVE_VM_SWAP_PAGER_H
-+#include <vm/vm.h>
- #include <vm/swap_pager.h>
- #endif
- #if HAVE_SYS_FIXPOINT_H
---- agent/mibgroup/ucd-snmp/errormib.c~	Tue Mar  2 05:27:30 1999
-+++ agent/mibgroup/ucd-snmp/errormib.c	Sat Apr  3 13:33:44 1999
-@@ -93,6 +93,7 @@
- #define statvfs statfs
- #endif
- #if HAVE_VM_SWAP_PAGER_H
-+#include <vm/vm.h>
- #include <vm/swap_pager.h>
- #endif
- #if HAVE_SYS_FIXPOINT_H
---- agent/mibgroup/ucd-snmp/extensible.c~	Fri Mar  5 08:45:01 1999
-+++ agent/mibgroup/ucd-snmp/extensible.c	Sat Apr  3 13:34:13 1999
-@@ -81,6 +81,7 @@
- #define statvfs statfs
- #endif
- #if HAVE_VM_SWAP_PAGER_H
-+#include <vm/vm.h>
- #include <vm/swap_pager.h>
- #endif
- #if HAVE_SYS_FIXPOINT_H
---- agent/mibgroup/ucd-snmp/loadave.c~	Tue Mar 16 08:21:02 1999
-+++ agent/mibgroup/ucd-snmp/loadave.c	Sat Apr  3 13:34:39 1999
-@@ -80,6 +80,7 @@
- #define statvfs statfs
- #endif
- #if HAVE_VM_SWAP_PAGER_H
-+#include <vm/vm.h>
- #include <vm/swap_pager.h>
- #endif
- #if HAVE_SYS_FIXPOINT_H
Index: files/patch-af
===================================================================
RCS file: /home/ncvs/ports/net/net-snmp/files/patch-af,v
retrieving revision 1.2
diff -u -r1.2 patch-af
--- files/patch-af	2000/05/12 20:21:26	1.2
+++ files/patch-af	2001/04/04 23:48:02
@@ -1,14 +0,0 @@
---- agent/mibgroup/ucd_snmp.h.orig	Fri Feb 26 03:03:41 1999
-+++ agent/mibgroup/ucd_snmp.h	Sun Apr  4 13:52:23 1999
-@@ -18,5 +18,11 @@
- config_arch_require(bsdi3, ucd-snmp/memory)
- config_arch_require(linux, ucd-snmp/vmstat)
- config_arch_require(freebsd2, ucd-snmp/vmstat_freebsd2)
-+config_arch_require(freebsd3, ucd-snmp/vmstat_freebsd2)
-+config_arch_require(freebsd4, ucd-snmp/vmstat_freebsd2)
-+config_arch_require(freebsd5, ucd-snmp/vmstat_freebsd2)
- config_arch_require(freebsd2, ucd-snmp/memory_freebsd2)
-+config_arch_require(freebsd3, ucd-snmp/memory_freebsd2)
-+config_arch_require(freebsd4, ucd-snmp/memory_freebsd2)
-+config_arch_require(freebsd5, ucd-snmp/memory_freebsd2)
- config_add_mib(UCD-SNMP-MIB) 
Index: files/patch-ag
===================================================================
RCS file: /home/ncvs/ports/net/net-snmp/files/patch-ag,v
retrieving revision 1.1
diff -u -r1.1 patch-ag
--- files/patch-ag	1999/09/04 23:30:47	1.1
+++ files/patch-ag	2001/04/04 23:59:17
@@ -1,11 +0,0 @@
---- snmplib/ucd-snmp-includes.h.orig	Wed Jan 20 18:18:42 1999
-+++ snmplib/ucd-snmp-includes.h	Sat Aug 28 02:13:56 1999
-@@ -4,7 +4,7 @@
- #include <netinet/in.h>
- 
- /* uncomment if you don't have in_addr_t in netinet/in.h */
--/* typedef u_int in_addr_t; */
-+typedef u_int in_addr_t;
- 
- #include <ucd-snmp/asn1.h>
- #include <ucd-snmp/snmp_api.h>
Index: files/patch-ap
===================================================================
RCS file: /home/ncvs/ports/net/net-snmp/files/patch-ap,v
retrieving revision 1.1
diff -u -r1.1 patch-ap
--- files/patch-ap	2001/01/18 09:58:30	1.1
+++ files/patch-ap	2001/04/05 00:00:50
@@ -1,11 +0,0 @@
---- man/Makefile.in.orig	Thu Jan 18 01:37:31 2001
-+++ man/Makefile.in	Thu Jan 18 01:37:39 2001
-@@ -2,7 +2,7 @@
- 
- MAN1 = snmpcmd.1 snmpget.1 snmpset.1 snmpwalk.1 snmpbulkwalk.1 snmpbulkget.1 \
- 	snmpgetnext.1 snmptest.1 snmpnetstat.1 snmptranslate.1 snmpstatus.1 \
--	snmptrap.1 snmpdelta.1 snmptable.1 snmpusm.1 snmpinform.1 snmpdf.1
-+	snmptrap.1 snmpdelta.1 snmptable.1 snmpusm.1 snmpinform.1 snmpdf.1 snmpconf.1
- MAN1G = snmpd.1
- MAN3 = snmp_agent_api.3 snmp_api.3 mib_api.3 snmp_sess_api.3 snmp_trap_api.3 \
- 	snmp_alarm.3 snmp_close.3 snmp_free_pdu.3 snmp_open.3 snmp_read.3 \
Index: files/patch-hr_swrun.c
===================================================================
RCS file: /home/ncvs/ports/net/net-snmp/files/patch-hr_swrun.c,v
retrieving revision 1.2
diff -u -r1.2 patch-hr_swrun.c
--- files/patch-hr_swrun.c	2001/02/02 02:39:45	1.2
+++ files/patch-hr_swrun.c	2001/03/27 03:38:14
@@ -1,92 +1,6 @@
---- agent/mibgroup/host/hr_swrun.c.orig	Tue Oct  3 13:36:38 2000
-+++ agent/mibgroup/host/hr_swrun.c	Fri Feb  2 11:27:39 2001
-@@ -216,15 +216,15 @@
-         if ( pid == -1 )
- 	    break;
- 	newname[HRSWRUN_ENTRY_NAME_LENGTH] = pid;
--    DEBUGMSGOID(("host/hr_swrun", newname, *length));
--    DEBUGMSG(("host/hr_swrun","\n"));
-+	DEBUGMSGOID(("host/hr_swrun", newname, *length));
-+	DEBUGMSG(("host/hr_swrun","\n"));
-         result = snmp_oid_compare(name, *length, newname, vp->namelen + 1);
-         if (exact && (result == 0)) {
- 	    LowPid = pid;
- #ifndef linux
- 	    LowProcIndex = current_proc_entry-1;
- #endif
--DEBUGMSGTL(("host/hr_swrun", " saved\n"));
-+	    DEBUGMSGTL(("host/hr_swrun", " saved\n"));
- 	    /* Save process status information */
-             break;
- 	}
-@@ -235,9 +235,9 @@
- 	    LowProcIndex = current_proc_entry-1;
- #endif
- 	    /* Save process status information */
--DEBUGMSG(("host/hr_swrun", " saved"));
-+	    DEBUGMSG(("host/hr_swrun", " saved"));
- 	}
--DEBUGMSG(("host/hr_swrun", "\n"));
-+	DEBUGMSG(("host/hr_swrun", "\n"));
-     }
- 
-     if ( LowPid == -1 ) {
-@@ -279,16 +279,16 @@
- #elif defined(solaris2)
- #if _SLASH_PROC_METHOD_
-     static psinfo_t psinfo;
--    static psinfo_t *proc_buf = &psinfo;
-+    static psinfo_t *proc_buf;
-     int procfd;
-     char procfn[sizeof "/proc/00000/psinfo"];
- #else
-     static struct proc *proc_buf;
-+    char *cp1;
- #endif	/* _SLASH_PROC_METHOD_ */
-     static time_t when = 0;
-     time_t now;
-     static int oldpid = -1;
--    char *cp1;
- #endif
- #if HAVE_KVM_GETPROCS
-     char **argv;
-@@ -321,10 +321,13 @@
-     }
-     if (oldpid != pid || proc_buf == NULL) {
- #if _SLASH_PROC_METHOD_
-+	proc_buf = &psinfo;
- 	sprintf(procfn, "/proc/%.5d/psinfo", pid);
--	if ((procfd = open(procfn, O_RDONLY)) == -1) return NULL;
--	if (read(procfd, proc_buf, sizeof(*proc_buf)) != sizeof(*proc_buf)) abort();
--	close(procfd);
-+	if ((procfd = open(procfn, O_RDONLY)) != -1) {
-+		if (read(procfd, proc_buf, sizeof(*proc_buf)) != sizeof(*proc_buf)) abort();
-+		close(procfd);
-+	} else
-+		proc_buf = NULL;
- #else
- 	if (kd == NULL) return NULL;
- 	if ((proc_buf = kvm_getproc(kd, pid)) == NULL) return NULL;
-@@ -340,8 +343,8 @@
- 		return NULL;
- #else
- 	    long_return = 1;		/* Probably! */
--#endif
- 	    return (u_char *)&long_return;
-+#endif
- 
- 	case HRSWRUN_INDEX:
- 	    long_return = pid;
-@@ -354,12 +357,19 @@
- 		*cp = '\0';
- #elif defined(solaris2)
- #if _SLASH_PROC_METHOD_
--	    strcpy(string, proc_buf->pr_fname);
-+	    if (proc_buf)
-+		    strcpy(string, proc_buf->pr_fname);
-+	    else
-+		    strcpy(string, "<exited>");
- #else
+--- agent/mibgroup/host/hr_swrun.c~	Wed Mar 14 22:45:56 2001
++++ agent/mibgroup/host/hr_swrun.c	Tue Mar 27 12:37:57 2001
+@@ -365,7 +365,11 @@
  	    strcpy(string, proc_buf->p_user.u_comm);
  #endif
  #elif HAVE_KVM_GETPROCS
@@ -98,19 +12,7 @@
  #elif defined(linux)
  	    sprintf( string, "/proc/%d/status", pid );
  	    if ((fp = fopen( string, "r")) == NULL) return NULL;
-@@ -398,7 +408,10 @@
- 		*cp = '\0';
- #elif defined(solaris2)
- #ifdef _SLASH_PROC_METHOD_
--	    strcpy(string, proc_buf->pr_psargs);
-+	    if (proc_buf)
-+	        strcpy(string, proc_buf->pr_psargs);
-+	    else
-+		sprintf(string, "<exited>");
- 	    cp = strchr(string, ' ');
- 	    if (cp) *cp = 0;
- #else
-@@ -408,7 +421,11 @@
+@@ -417,7 +421,11 @@
  	    *cp1 = 0;
  #endif
  #elif HAVE_KVM_GETPROCS
@@ -121,42 +23,8 @@
 +#endif
  #elif defined(linux)
  	    sprintf( string, "/proc/%d/cmdline", pid );
- 	    if ((fp = fopen( string, "r")) == NULL) return NULL;
-@@ -448,9 +465,12 @@
- 		string[0] = '\0';
- #elif defined(solaris2)
- #ifdef _SLASH_PROC_METHOD_
--	    cp = strchr(proc_buf->pr_psargs, ' ');
--	    if (cp) strcpy(string, cp+1);
--	    else string[0] = 0;
-+	    if (proc_buf) {
-+	        cp = strchr(proc_buf->pr_psargs, ' ');
-+	        if (cp) strcpy(string, cp+1);
-+	        else string[0] = 0;
-+	    } else
-+		string[0] = 0;
- #else
- 	    cp = proc_buf->p_user.u_psargs;
- 	    while (*cp && *cp != ' ') cp++;
-@@ -470,9 +490,15 @@
- 	    sprintf( string, "/proc/%d/cmdline", pid );
  	    if ((fp = fopen( string, "r")) == NULL) return NULL;
- 	    memset( buf, 0, sizeof(buf) );
--	    if(!fgets( buf, sizeof(buf)-2, fp ))
--		return NULL;   /* argv[0] '\0' argv[1] '\0' .... */
- 
-+                /* argv[0] '\0' argv[1] '\0' .... */
-+	    if(!fgets( buf, sizeof(buf)-2, fp )) {
-+                /* maybe be empty (even argv[0] is missing) */
-+                string[0] = '\0';
-+                *var_len = 0;
-+                return string;
-+            }
-+            
- 		/* Skip over argv[0] */
- 	    cp = buf;
- 	    while ( *cp )
-@@ -531,10 +557,14 @@
+@@ -550,7 +558,11 @@
  	    }
  #else
  #if HAVE_KVM_GETPROCS
@@ -166,73 +34,9 @@
  	    switch ( proc_table[LowProcIndex].kp_proc.p_stat ) {
 +#endif
  #elif defined(solaris2)
- #if _SLASH_PROC_METHOD_
--	    switch (proc_buf->pr_lwp.pr_state) {
-+	    switch (proc_buf ? proc_buf->pr_lwp.pr_state : SIDL) {
- #else
- 	    switch ( proc_buf->p_stat ) {
- #endif
-@@ -566,32 +596,34 @@
- #endif
- #else
- 	    sprintf( string, "/proc/%d/stat", pid );
--	    if ((fp = fopen( string, "r")) == NULL) return NULL;
--	    fgets( buf, sizeof(buf), fp );
--	    cp = buf;
--	    for ( i = 0 ; i < 2 ; ++i ) {	/* skip two fields */
--		while ( *cp != ' ')
-+	    if ((fp = fopen( string, "r")) != NULL) {
-+		fgets( buf, sizeof(buf), fp );
-+		cp = buf;
-+		for ( i = 0 ; i < 2 ; ++i ) {	/* skip two fields */
-+		    while ( *cp != ' ')
-+			++cp;
- 		    ++cp;
--		++cp;
--	    }
-+		}
- 
--	    switch ( *cp ) {
--		case 'R':
-+		switch ( *cp ) {
-+		    case 'R':
- 	    		long_return = 1;	/* running */
- 			break;
--		case 'S':
-+		    case 'S':
- 	    		long_return = 2;	/* runnable */
- 			break;
--		case 'D':
--		case 'T':
-+		    case 'D':
-+		    case 'T':
- 	    		long_return = 3;	/* notRunnable */
- 			break;
--		case 'Z':
--		default:
-+		    case 'Z':
-+		    default:
- 	    		long_return = 4;	/* invalid */
- 			break;
--	    }
--            fclose(fp);
-+		}
-+                fclose(fp);
-+	    } else
-+		long_return = 4;		/* invalid */
- #endif
- 	    return (u_char *)&long_return;
- 
-@@ -603,16 +635,24 @@
- 				 */
- #elif defined(solaris2)
  #if _SLASH_PROC_METHOD_
--	    long_return = proc_buf->pr_time.tv_sec * 100 +
--			  proc_buf->pr_time.tv_nsec/10000000;
-+	    long_return = proc_buf ? proc_buf->pr_time.tv_sec * 100 +
-+			  proc_buf->pr_time.tv_nsec/10000000 : 0;
- #else
- 	    long_return = proc_buf->p_utime*100 +
+ 	    switch (proc_buf ? proc_buf->pr_lwp.pr_state : SIDL) {
+@@ -631,9 +643,17 @@
  	    		  proc_buf->p_stime*100;
  #endif
  #elif HAVE_KVM_GETPROCS
@@ -250,18 +54,9 @@
  #elif defined(linux)
  	    sprintf( string, "/proc/%d/stat", pid );
  	    if ((fp = fopen( string, "r")) == NULL) return NULL;
-@@ -645,13 +685,20 @@
- 	    long_return = (proc_buf.pst_rssize << PGSHIFT)/1024;
- #elif defined(solaris2)
- #if _SLASH_PROC_METHOD_
--	    long_return = proc_buf->pr_rssize;
-+	    long_return = proc_buf ? proc_buf->pr_rssize : 0;
- #else
- 	    long_return = proc_buf->p_swrss;
- #endif
+@@ -673,6 +693,13 @@
  #elif HAVE_KVM_GETPROCS
--#ifdef freebsd3
-+#if defined(freebsd3)
+ #ifdef freebsd3
  	    long_return = proc_table[LowProcIndex].kp_eproc.e_vm.vm_map.size/1024;
 +#elif defined(freebsd5) && __FreeBSD_version >= 500014
 +	    /* XXX
@@ -273,18 +68,7 @@
  #else
  	    long_return = proc_table[LowProcIndex].kp_eproc.e_vm.vm_tsize +
  			  proc_table[LowProcIndex].kp_eproc.e_vm.vm_ssize +
-@@ -747,6 +794,10 @@
-     }
- #elif HAVE_KVM_GETPROCS
-     {
-+	if (kd == NULL) {
-+	    nproc = 0;
-+	    return;
-+	}
- 	proc_table = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nproc);
-     }
- #else
-@@ -794,8 +845,13 @@
+@@ -819,8 +846,13 @@
  #elif defined(solaris2)
  	return proc_table[current_proc_entry++];
  #elif HAVE_KVM_GETPROCS
@@ -298,12 +82,3 @@
  #else
  	if ( proc_table[current_proc_entry].p_stat != 0 )
  	    return proc_table[current_proc_entry++].p_pid;
-@@ -853,7 +909,7 @@
- 
- int count_processes (void)
- {
--#ifndef linux
-+#if !(defined(linux) || defined(hpux10) || defined(solaris2) || HAVE_KVM_GETPROCS)
-     int i;
- #endif
-     int total=0;

--Multipart_Thu_Apr__5_09:08:54_2001-1--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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