aboutsummaryrefslogtreecommitdiffstats
path: root/net/net-snmp
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2002-04-09 08:31:17 +0800
committerkuriyama <kuriyama@FreeBSD.org>2002-04-09 08:31:17 +0800
commit38576ff55bb936e522ceaa7548dc92d79cd50300 (patch)
tree202505a5dd9022a1ef96a0edf412fb645eac9ab0 /net/net-snmp
parent225aafd176866587b079045c86ff88b19a979ecd (diff)
downloadfreebsd-ports-gnome-38576ff55bb936e522ceaa7548dc92d79cd50300.tar.gz
freebsd-ports-gnome-38576ff55bb936e522ceaa7548dc92d79cd50300.tar.zst
freebsd-ports-gnome-38576ff55bb936e522ceaa7548dc92d79cd50300.zip
Upgrade to 4.2.4.
Some of our patches are integrated into original distribution. Enable diskio mib-module by default.
Diffstat (limited to 'net/net-snmp')
-rw-r--r--net/net-snmp/Makefile5
-rw-r--r--net/net-snmp/distinfo2
-rw-r--r--net/net-snmp/files/patch-Makefile.top8
-rw-r--r--net/net-snmp/files/patch-ad47
-rw-r--r--net/net-snmp/files/patch-ao11
-rw-r--r--net/net-snmp/files/patch-diskio.c31
-rw-r--r--net/net-snmp/files/patch-hr_disk.c13
-rw-r--r--net/net-snmp/files/patch-hr_print.c12
-rw-r--r--net/net-snmp/files/patch-hr_storage.c33
-rw-r--r--net/net-snmp/files/patch-hr_swrun.c22
-rw-r--r--net/net-snmp/pkg-plist2
11 files changed, 39 insertions, 147 deletions
diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile
index c599c4a8a443..e4a0887682a4 100644
--- a/net/net-snmp/Makefile
+++ b/net/net-snmp/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= ucd-snmp
-PORTVERSION= 4.2.3
-PORTREVISION= 3
+PORTVERSION= 4.2.4
CATEGORIES= net ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
ftp://ucd-snmp.ucdavis.edu/ \
@@ -64,7 +63,7 @@ STARTUP_FILE= ${PREFIX}/etc/rc.d/snmpd.sh
.if ${OSVERSION} >= 400014
CONFIGURE_ARGS+= --enable-ipv6
.endif
-.if defined(WITH_SNMP_DISKIO)
+.if !defined(WITHOUT_SNMP_DISKIO)
CONFIGURE_ARGS+=--with-mib-modules="ucd-snmp/diskio" --with-libs="-ldevstat"
.endif
diff --git a/net/net-snmp/distinfo b/net/net-snmp/distinfo
index cfb7dd91771d..663be779a546 100644
--- a/net/net-snmp/distinfo
+++ b/net/net-snmp/distinfo
@@ -1 +1 @@
-MD5 (ucd-snmp-4.2.3.tar.gz) = e42df4c7558b5f12cd442b36428ec4bb
+MD5 (ucd-snmp-4.2.4.tar.gz) = b3ae3ad6199d461e21da1c7818e099d3
diff --git a/net/net-snmp/files/patch-Makefile.top b/net/net-snmp/files/patch-Makefile.top
index 2ecdb3d91c59..e6077bc203ef 100644
--- a/net/net-snmp/files/patch-Makefile.top
+++ b/net/net-snmp/files/patch-Makefile.top
@@ -1,10 +1,10 @@
---- Makefile.top.orig Mon Nov 20 05:58:05 2000
-+++ Makefile.top Thu Feb 8 01:21:42 2001
-@@ -51,7 +51,7 @@
+--- Makefile.top.orig Sat Feb 16 10:00:19 2002
++++ Makefile.top Sat Feb 16 23:31:00 2002
+@@ -52,7 +52,7 @@
# Misc Compiling Stuff
CC = @CC@
# version number is prefixed by a 0 for a better shared library version number
--LIB_LD_CMD = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -rpath $(libdir) -release 0.$(VERSION) -o
+-LIB_LD_CMD = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -rpath $(libdir) $(SHVFLAGS) -o
+LIB_LD_CMD = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -rpath $(libdir) -release $(VERSION).0 -version-info 4 -o
LIB_EXTENSION = la
LIB_VERSION =
diff --git a/net/net-snmp/files/patch-ad b/net/net-snmp/files/patch-ad
deleted file mode 100644
index bd85f7453919..000000000000
--- a/net/net-snmp/files/patch-ad
+++ /dev/null
@@ -1,47 +0,0 @@
---- agent/mibgroup/mibII/interfaces.c.orig Fri Dec 1 14:17:21 2000
-+++ agent/mibgroup/mibII/interfaces.c Thu Jan 18 00:04:42 2001
-@@ -129,7 +129,7 @@
- #if HAVE_SYS_SYSCTL_H
- #include <sys/sysctl.h>
-
--#ifdef freebsd3
-+#if defined(freebsd3) || defined(freebsd4) || defined(freebsd5)
- # define USE_SYSCTL_IFLIST
- #else
- # if defined(CTL_NET) && !defined(freebsd2)
-@@ -1842,10 +1842,18 @@
- physaddrbuf = 0;
- }
- ifm = (struct if_msghdr *)rtm;
-+#if defined(freebsd3) || defined(freebsd4) || defined(freebsd5)
-+ if (physaddrs != 0) physaddrs[naddrs] = (void*)(ifm + 1);
-+ naddrs++;
-+#endif
- ilen -= ifm->ifm_msglen;
- cp += ifm->ifm_msglen;
- rtm = (struct rt_msghdr *)cp;
- while (ilen > 0 && rtm->rtm_type == RTM_NEWADDR) {
-+#if defined(freebsd3) || defined(freebsd4) || defined(freebsd5)
-+ ilen -= rtm->rtm_msglen;
-+ cp += rtm->rtm_msglen;
-+#else
- int is_alias = 0;
- ifam = (struct ifa_msghdr *)rtm;
- ilen -= sizeof(*ifam);
-@@ -1868,6 +1876,7 @@
- }
- sa = (struct sockaddr *)cp;
- }
-+#endif
- rtm = (struct rt_msghdr *)cp;
- }
- }
-@@ -1982,7 +1991,7 @@
- if (ifmd.ifmd_data.ifi_lastchange.tv_sec == 0 &&
- ifmd.ifmd_data.ifi_lastchange.tv_usec == 0) {
- long_return = 0;
-- else if (ifmd.ifmd_data.ifi_lastchange.tv_sec < starttime.tv_sec)
-+ } else if (ifmd.ifmd_data.ifi_lastchange.tv_sec < starttime.tv_sec) {
- long_return = 0;
- } else {
- long_return = (u_long)
diff --git a/net/net-snmp/files/patch-ao b/net/net-snmp/files/patch-ao
deleted file mode 100644
index 9ba64ec94695..000000000000
--- a/net/net-snmp/files/patch-ao
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/host/hr_filesys.c.orig Wed Jan 17 19:09:48 2001
-+++ agent/mibgroup/host/hr_filesys.c Wed Jan 17 19:10:22 2001
-@@ -38,7 +38,7 @@
- #include <stdlib.h>
- #endif
-
--#if defined(freebsd3) || defined(bsdi4)
-+#if defined(freebsd3) || defined(bsdi4) || defined(freebsd4) || defined(freebsd5)
- #if HAVE_GETFSSTAT
- #if defined(MFSNAMELEN)
- #define MOUNT_NFS "nfs"
diff --git a/net/net-snmp/files/patch-diskio.c b/net/net-snmp/files/patch-diskio.c
deleted file mode 100644
index 1c68911c67b7..000000000000
--- a/net/net-snmp/files/patch-diskio.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- agent/mibgroup/ucd-snmp/diskio.c.orig Mon Sep 17 06:49:41 2001
-+++ agent/mibgroup/ucd-snmp/diskio.c Wed Feb 13 22:22:45 2002
-@@ -46,10 +46,10 @@
- #include <sys/diskstats.h>
- #endif /* bsdi */
-
--#if defined (freebsd4)
-+#if __FreeBSD__ >= 4
- #include <sys/dkstat.h>
- #include <devstat.h>
--#endif /* freebsd */
-+#endif /* __FreeBSD__ */
-
-
- /*********************
-@@ -298,7 +298,7 @@
- }
- #endif /* bsdi */
-
--#if defined(freebsd4)
-+#if __FreeBSD__ >= 4
- static int ndisk;
- static struct statinfo *stat;
-
-@@ -377,5 +377,5 @@
- }
- return NULL;
- }
--#endif /* freebsd4 */
-+#endif /* __FreeBSD__ >= 4 */
-
diff --git a/net/net-snmp/files/patch-hr_disk.c b/net/net-snmp/files/patch-hr_disk.c
index ea1ed0adf096..b4f2c66a92f8 100644
--- a/net/net-snmp/files/patch-hr_disk.c
+++ b/net/net-snmp/files/patch-hr_disk.c
@@ -1,12 +1,11 @@
---- agent/mibgroup/host/hr_disk.c.orig Mon Nov 19 13:48:10 2001
-+++ agent/mibgroup/host/hr_disk.c Tue Feb 12 22:37:43 2002
-@@ -178,6 +178,9 @@
+--- agent/mibgroup/host/hr_disk.c.orig Tue Feb 26 01:57:26 2002
++++ agent/mibgroup/host/hr_disk.c Fri Mar 29 16:06:29 2002
+@@ -185,7 +185,7 @@
#elif defined(solaris2)
Add_HR_Disk_entry ( "/dev/rdsk/c%dt%dd0s%d", 0, 1, 0, 15, "/dev/rdsk/c%dt%dd0s0", 0, 7 );
Add_HR_Disk_entry ( "/dev/rdsk/c%dd%ds%d", 0, 1, 0, 15, "/dev/rdsk/c%dd%ds0", 0, 7 );
+-#elif defined(freebsd4)
+#elif defined(__FreeBSD__) && __FreeBSD__ >= 4
-+ Add_HR_Disk_entry ( "/dev/ad%ds%d%c", 0, 1, 1, 4, "/dev/ad%ds%d", 'a', 'h');
-+ Add_HR_Disk_entry ( "/dev/da%ds%d%c", 0, 1, 1, 4, "/dev/da%ds%d", 'a', 'h');
+ Add_HR_Disk_entry ( "/dev/ad%ds%d%c", 0, 1, 1, 4, "/dev/ad%ds%d", 'a', 'h');
+ Add_HR_Disk_entry ( "/dev/da%ds%d%c", 0, 1, 1, 4, "/dev/da%ds%d", 'a', 'h');
#elif defined(freebsd3)
- Add_HR_Disk_entry ( "/dev/wd%ds%d%c", 0, 1, 1, 4, "/dev/wd%ds%d", 'a', 'h');
- Add_HR_Disk_entry ( "/dev/sd%ds%d%c", 0, 1, 1, 4, "/dev/sd%ds%d", 'a', 'h');
diff --git a/net/net-snmp/files/patch-hr_print.c b/net/net-snmp/files/patch-hr_print.c
deleted file mode 100644
index ba8192ef59f5..000000000000
--- a/net/net-snmp/files/patch-hr_print.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- agent/mibgroup/host/hr_print.c.orig Wed Oct 3 00:02:07 2001
-+++ agent/mibgroup/host/hr_print.c Wed Feb 13 01:02:53 2002
-@@ -30,7 +30,9 @@
- int printer_detail_status(int);
- int printer_errors(int);
- int header_hrprint (struct variable *,oid *, size_t *, int, size_t *, WriteMethod **);
-+#ifdef HAVE_LPSTAT
- FILE * run_lpstat(void);
-+#endif
-
-
- /*********************
diff --git a/net/net-snmp/files/patch-hr_storage.c b/net/net-snmp/files/patch-hr_storage.c
index 063c5bcc62ff..0c5381602966 100644
--- a/net/net-snmp/files/patch-hr_storage.c
+++ b/net/net-snmp/files/patch-hr_storage.c
@@ -1,39 +1,34 @@
---- agent/mibgroup/host/hr_storage.c.orig Thu Mar 22 14:27:21 2001
-+++ agent/mibgroup/host/hr_storage.c Thu Oct 11 12:19:18 2001
-@@ -523,8 +523,18 @@
+--- agent/mibgroup/host/hr_storage.c.orig Fri Feb 8 19:42:25 2002
++++ agent/mibgroup/host/hr_storage.c Sat Feb 16 23:37:31 2002
+@@ -583,7 +583,15 @@
for (i = 0; i < sizeof(mbstat.m_mtypes)/sizeof(mbstat.m_mtypes[0]); i++)
long_return += mbstat.m_mtypes[i];
#elif defined(MBSTAT_SYMBOL)
-+#if __FreeBSD_version < 500021
++#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
long_return = mbstat.m_mbufs;
- #else
-+#if __FreeBSD_version < 500024
++#elif __FreeBSD_version < 500024
+ /* mbuf stats disabled */
+ return NULL;
+#else
+ /* XXX TODO: implement new method */
+ return NULL;
+#endif
-+#endif
-+#else
+ #elif defined(NO_DUMMY_VALUES)
return NULL;
- #endif
- break;
-@@ -562,7 +572,17 @@
- long_return = (mbpool.pr_nget - mbpool.pr_nput)*mbpool.pr_size
- + (mclpool.pr_nget - mclpool.pr_nput)*mclpool.pr_size;
+ #else
+@@ -634,7 +642,15 @@
+ + (mclpool.pr_nget - mclpool.pr_nput)
+ * mclpool.pr_size;
#elif defined(MBSTAT_SYMBOL)
-+#if __FreeBSD_version < 500021
++#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
long_return = mbstat.m_clusters - mbstat.m_clfree; /* unlikely, but... */
-+#else
-+#if __FreeBSD_version < 500024
++#elif __FreeBSD_version < 500024
+ /* mbuf stats disabled */
+ return NULL;
+#else
+ /* XXX TODO: implement new method */
+ return NULL;
+#endif
-+#endif
- #else
+ #elif defined(NO_DUMMY_VALUES)
return NULL;
- #endif
+ #else
diff --git a/net/net-snmp/files/patch-hr_swrun.c b/net/net-snmp/files/patch-hr_swrun.c
index 554ac1e1daef..c232386f873e 100644
--- a/net/net-snmp/files/patch-hr_swrun.c
+++ b/net/net-snmp/files/patch-hr_swrun.c
@@ -1,6 +1,6 @@
---- 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 @@
+--- agent/mibgroup/host/hr_swrun.c.orig Sat Feb 16 09:41:19 2002
++++ agent/mibgroup/host/hr_swrun.c Sat Feb 16 23:41:05 2002
+@@ -543,7 +543,11 @@
strcpy(string, proc_buf->p_user.u_comm);
#endif
#elif HAVE_KVM_GETPROCS
@@ -12,7 +12,7 @@
#elif defined(linux)
sprintf( string, "/proc/%d/status", pid );
if ((fp = fopen( string, "r")) == NULL) return NULL;
-@@ -417,7 +421,11 @@
+@@ -638,7 +642,11 @@
*cp1 = 0;
#endif
#elif HAVE_KVM_GETPROCS
@@ -24,7 +24,7 @@
#elif defined(linux)
sprintf( string, "/proc/%d/cmdline", pid );
if ((fp = fopen( string, "r")) == NULL) return NULL;
-@@ -550,7 +558,11 @@
+@@ -810,7 +818,11 @@
}
#else
#if HAVE_KVM_GETPROCS
@@ -33,10 +33,10 @@
+#else
switch ( proc_table[LowProcIndex].kp_proc.p_stat ) {
+#endif
+ #elif defined(dynix)
+ switch ( lowpsinfo.pr_state ) {
#elif defined(solaris2)
- #if _SLASH_PROC_METHOD_
- switch (proc_buf ? proc_buf->pr_lwp.pr_state : SIDL) {
-@@ -631,9 +643,17 @@
+@@ -906,9 +918,17 @@
proc_buf->p_stime*100;
#endif
#elif HAVE_KVM_GETPROCS
@@ -54,9 +54,9 @@
#elif defined(linux)
sprintf( string, "/proc/%d/stat", pid );
if ((fp = fopen( string, "r")) == NULL) return NULL;
-@@ -673,6 +693,13 @@
+@@ -976,6 +996,13 @@
#elif HAVE_KVM_GETPROCS
- #ifdef freebsd3
+ #if defined(freebsd3) && !defined(darwin)
long_return = proc_table[LowProcIndex].kp_eproc.e_vm.vm_map.size/1024;
+#elif defined(freebsd5) && __FreeBSD_version >= 500014
+ /* XXX
@@ -68,7 +68,7 @@
#else
long_return = proc_table[LowProcIndex].kp_eproc.e_vm.vm_tsize +
proc_table[LowProcIndex].kp_eproc.e_vm.vm_ssize +
-@@ -819,8 +846,13 @@
+@@ -1237,8 +1264,13 @@
#elif defined(solaris2)
return proc_table[current_proc_entry++];
#elif HAVE_KVM_GETPROCS
diff --git a/net/net-snmp/pkg-plist b/net/net-snmp/pkg-plist
index 236102460b4b..e7d031a7cbc5 100644
--- a/net/net-snmp/pkg-plist
+++ b/net/net-snmp/pkg-plist
@@ -143,4 +143,4 @@ share/snmp/snmpconf/snmptrapd.conf/traphandle
@dirrm share/snmp/snmpconf/snmpd.conf
@dirrm share/snmp/snmpconf/snmptrapd.conf
@dirrm share/snmp/snmpconf
-@dirrm share/snmp
+@unexec rmdir %D/share/snmp 2>/dev/null || true