update Net-SNMP to 5.4.3 and pick up OpenBSD mibs from /usr/share/snmp/mibs
This commit is contained in:
parent
038ab963ce
commit
420b23fcc5
@ -1,13 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.45 2010/07/12 22:07:39 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.46 2010/09/21 10:43:04 sthen Exp $
|
||||
|
||||
COMMENT-main= extendable SNMP implementation
|
||||
COMMENT-perl= SNMP modules for Perl
|
||||
COMMENT-tkmib= graphical SNMP MIB browser
|
||||
|
||||
V= 5.4.2.1
|
||||
V= 5.4.3
|
||||
DISTNAME= net-snmp-${V}
|
||||
REVISION-main= 5
|
||||
REVISION-perl= 1
|
||||
PKGNAME-main= ${DISTNAME}
|
||||
PKGNAME-perl= p5-SNMP-${V}
|
||||
PKGNAME-tkmib= net-snmp-tkmib-${V}
|
||||
@ -19,22 +17,32 @@ SHARED_LIBS= netsnmp 8.0 \
|
||||
CATEGORIES= net perl5
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=net-snmp/}
|
||||
|
||||
HOMEPAGE= http://www.net-snmp.org
|
||||
HOMEPAGE= http://www.net-snmp.org/
|
||||
|
||||
# BSD
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB-main= c crypto kvm m perl util wrap
|
||||
|
||||
MULTI_PACKAGES= -main -perl -tkmib
|
||||
MULTI_PACKAGES= -main -perl -tkmib
|
||||
|
||||
LIB_DEPENDS-perl= netsnmptrapd,netsnmpmibs,netsnmphelpers,netsnmpagent,netsnmp::net/net-snmp,-main
|
||||
WANTLIB-perl= netsnmp netsnmpagent netsnmphelpers netsnmptrapd
|
||||
WANTLIB-perl+= netsnmpmibs
|
||||
LIB_DEPENDS-perl= ::net/net-snmp,-main
|
||||
RUN_DEPENDS-tkmib= ::net/net-snmp,-perl \
|
||||
::x11/p5-Tk
|
||||
|
||||
NET_SNMP_MIB_LIST= host disman/event-mib smux mibII/mta_sendmail
|
||||
NET_SNMP_MIB_LIST= host disman/event-mib smux mibII/mta_sendmail
|
||||
|
||||
# set the default mib search list:
|
||||
# - net-snmp default mibs (include/net-snmp/net-snmp-config.h.in)
|
||||
# - this is checked in pre-configure as we don't want it to get out of sync
|
||||
DEFAULT_MIBS= IP-MIB:IF-MIB:TCP-MIB:UDP-MIB:SNMPv2-MIB:RFC1213-MIB
|
||||
# - base OpenBSD mibs (/usr/share/snmp/mibs)
|
||||
OPENBSD_MIBS= OPENBSD-BASE-MIB:OPENBSD-MEM-MIB:OPENBSD-SENSORS-MIB:OPENBSD-SNMPD-CONF
|
||||
|
||||
USE_LIBTOOL= Yes
|
||||
CONFIGURE_STYLE= gnu
|
||||
@ -45,6 +53,8 @@ CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
|
||||
--with-perl-modules \
|
||||
--with-copy-persistent-files="no" \
|
||||
--with-mib-modules="${NET_SNMP_MIB_LIST}" \
|
||||
--with-mibs="${DEFAULT_MIBS}:${OPENBSD_MIBS}" \
|
||||
--with-mibdirs="\$$HOME/.snmp/mibs:/usr/share/snmp/mibs:${TRUEPREFIX}/share/snmp/mibs" \
|
||||
--with-default-snmp-version="3" \
|
||||
--with-sys-contact="nobody@nowhere.invalid" \
|
||||
--with-sys-location="somewhere" \
|
||||
@ -53,6 +63,11 @@ CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
|
||||
|
||||
REGRESS_TARGET= test
|
||||
|
||||
pre-configure:
|
||||
@if ! fgrep '#define NETSNMP_DEFAULT_MIBS "${DEFAULT_MIBS}"' \
|
||||
${WRKSRC}/include/net-snmp/net-snmp-config.h.in > /dev/null; then \
|
||||
echo 'DEFAULT_MIBS in the port Makefile is out of sync'; exit 1; fi
|
||||
|
||||
post-install:
|
||||
@perl -pi -e 's,^(#define[ ]PACKAGE_.*)$$,/* $$1 */,' \
|
||||
${PREFIX}/include/net-snmp/net-snmp-config.h
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (net-snmp-5.4.2.1.tar.gz) = mEkyUgFD8Mi/e3zh/J4doQ==
|
||||
RMD160 (net-snmp-5.4.2.1.tar.gz) = IUjELUhu2I+c/Dyh1Qxoq81+PWM=
|
||||
SHA1 (net-snmp-5.4.2.1.tar.gz) = Ty356mI0T+hA9JPQ4Iq+XeNpeGI=
|
||||
SHA256 (net-snmp-5.4.2.1.tar.gz) = Eai68Wf3v/9g0lkOBQmRQAo6CCkj282/heDgzkbrJHw=
|
||||
SIZE (net-snmp-5.4.2.1.tar.gz) = 5185390
|
||||
MD5 (net-snmp-5.4.3.tar.gz) = NRPjnuGp1sdYHFCIELgY+Q==
|
||||
RMD160 (net-snmp-5.4.3.tar.gz) = QX9HwwHDIhpk83FitWtGYcn22Ms=
|
||||
SHA1 (net-snmp-5.4.3.tar.gz) = hJog3eqpCxsAEOSHh2kn5hW1xrw=
|
||||
SHA256 (net-snmp-5.4.3.tar.gz) = Rhp6cqy+WtE+OfC64Sm0nfVBuOqPkXjSck3nZU1PHEA=
|
||||
SIZE (net-snmp-5.4.3.tar.gz) = 5199202
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c,v 1.2 2010/05/19 15:50:00 sthen Exp $
|
||||
--- agent/mibgroup/if-mib/data_access/interface_sysctl.c.orig Sat Mar 13 01:01:16 2010
|
||||
+++ agent/mibgroup/if-mib/data_access/interface_sysctl.c Sat Mar 13 01:01:09 2010
|
||||
$OpenBSD: patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c,v 1.3 2010/09/21 10:43:04 sthen Exp $
|
||||
--- agent/mibgroup/if-mib/data_access/interface_sysctl.c.orig Thu Apr 9 09:44:41 2009
|
||||
+++ agent/mibgroup/if-mib/data_access/interface_sysctl.c Mon Sep 20 09:48:18 2010
|
||||
@@ -183,6 +183,7 @@ netsnmp_sysctl_ifmedia_to_speed(int media, u_int *spee
|
||||
#endif
|
||||
}
|
||||
@ -21,38 +21,3 @@ $OpenBSD: patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c,v 1.2 2010/
|
||||
#ifdef IFM_ATM
|
||||
case IFM_ATM:
|
||||
switch (IFM_SUBTYPE(media)) {
|
||||
@@ -451,22 +453,22 @@ netsnmp_arch_interface_container_load(netsnmp_containe
|
||||
NETSNMP_INTERFACE_FLAGS_HAS_V6_REASMMAX;
|
||||
|
||||
/* get counters */
|
||||
- entry->stats.ibytes.low = ifp->ifm_data.ifi_ibytes;
|
||||
- entry->stats.ibytes.high = 0;
|
||||
- entry->stats.iucast.low = ifp->ifm_data.ifi_ipackets;
|
||||
- entry->stats.iucast.high = 0;
|
||||
- entry->stats.imcast.low = ifp->ifm_data.ifi_imcasts;
|
||||
- entry->stats.imcast.high = 0;
|
||||
+ entry->stats.ibytes.low = ifp->ifm_data.ifi_ibytes & 0xffffffff;
|
||||
+ entry->stats.ibytes.high = ifp->ifm_data.ifi_ibytes >> 32;
|
||||
+ entry->stats.iucast.low = ifp->ifm_data.ifi_ipackets & 0xffffffff;
|
||||
+ entry->stats.iucast.high = ifp->ifm_data.ifi_ipackets >> 32;
|
||||
+ entry->stats.imcast.low = ifp->ifm_data.ifi_imcasts & 0xffffffff;
|
||||
+ entry->stats.imcast.high = ifp->ifm_data.ifi_imcasts >> 32;
|
||||
entry->stats.ierrors = ifp->ifm_data.ifi_ierrors;
|
||||
entry->stats.idiscards = ifp->ifm_data.ifi_iqdrops;
|
||||
entry->stats.iunknown_protos = ifp->ifm_data.ifi_noproto;
|
||||
|
||||
- entry->stats.obytes.low = ifp->ifm_data.ifi_obytes;
|
||||
- entry->stats.obytes.high = 0;
|
||||
- entry->stats.oucast.low = ifp->ifm_data.ifi_opackets;
|
||||
- entry->stats.oucast.high = 0;
|
||||
- entry->stats.omcast.low = ifp->ifm_data.ifi_omcasts;
|
||||
- entry->stats.omcast.high = 0;
|
||||
+ entry->stats.obytes.low = ifp->ifm_data.ifi_obytes & 0xffffffff;
|
||||
+ entry->stats.obytes.high = ifp->ifm_data.ifi_obytes >> 32;
|
||||
+ entry->stats.oucast.low = ifp->ifm_data.ifi_opackets & 0xffffffff;
|
||||
+ entry->stats.oucast.high = ifp->ifm_data.ifi_opackets >> 32;
|
||||
+ entry->stats.omcast.low = ifp->ifm_data.ifi_omcasts & 0xffffffff;
|
||||
+ entry->stats.omcast.high = ifp->ifm_data.ifi_omcasts >> 32;
|
||||
entry->stats.oerrors = ifp->ifm_data.ifi_oerrors;
|
||||
entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_BYTES |
|
||||
NETSNMP_INTERFACE_FLAGS_HAS_DROPS |
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-agent_mibgroup_mibII_interfaces_c,v 1.4 2007/09/26 20:03:42 rui Exp $
|
||||
--- agent/mibgroup/mibII/interfaces.c.orig Mon Nov 6 23:43:27 2006
|
||||
+++ agent/mibgroup/mibII/interfaces.c Sat Sep 15 23:12:28 2007
|
||||
@@ -2097,11 +2097,10 @@ Interface_Scan_Get_Count(void)
|
||||
$OpenBSD: patch-agent_mibgroup_mibII_interfaces_c,v 1.5 2010/09/21 10:43:04 sthen Exp $
|
||||
--- agent/mibgroup/mibII/interfaces.c.orig Wed Apr 14 09:11:44 2010
|
||||
+++ agent/mibgroup/mibII/interfaces.c Mon Sep 20 09:48:18 2010
|
||||
@@ -2117,11 +2117,10 @@ Interface_Scan_Get_Count(void)
|
||||
|
||||
#else /* hpux11 */
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-configure,v 1.9 2008/09/20 22:15:52 rui Exp $
|
||||
--- configure.orig Fri Sep 5 10:29:01 2008
|
||||
+++ configure Fri Sep 19 18:04:38 2008
|
||||
$OpenBSD: patch-configure,v 1.10 2010/09/21 10:43:04 sthen Exp $
|
||||
--- configure.orig Sun May 23 22:10:00 2010
|
||||
+++ configure Mon Sep 20 09:48:18 2010
|
||||
@@ -21655,34 +21655,6 @@ fi
|
||||
echo "$as_me:$LINENO: result: $EXTRACPPFLAGS" >&5
|
||||
echo "${ECHO_T}$EXTRACPPFLAGS" >&6
|
||||
@ -52,7 +52,7 @@ $OpenBSD: patch-configure,v 1.9 2008/09/20 22:15:52 rui Exp $
|
||||
#include <tcpd.h>
|
||||
_ACEOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||
@@ -33939,7 +33913,7 @@ done
|
||||
@@ -34009,7 +33983,7 @@ done
|
||||
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ $OpenBSD: patch-configure,v 1.9 2008/09/20 22:15:52 rui Exp $
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||||
@@ -37415,7 +37389,6 @@ cat confdefs.h >>conftest.$ac_ext
|
||||
@@ -37485,7 +37459,6 @@ cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
$OpenBSD: patch-local_tkmib,v 1.1 2009/08/17 14:58:45 giovanni Exp $
|
||||
--- local/tkmib.orig Thu Jul 16 09:07:45 2009
|
||||
+++ local/tkmib Thu Jul 16 09:08:01 2009
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/perl
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
require 5;
|
@ -1,23 +0,0 @@
|
||||
$OpenBSD: patch-snmplib_snmpUDPDomain_c,v 1.1 2009/02/13 09:39:38 jasper Exp $
|
||||
|
||||
Fix for SA33884, which could disclose sensitive information.
|
||||
Patch taken from upstream svn, -r17367.
|
||||
|
||||
--- snmplib/snmpUDPDomain.c.orig Fri Feb 13 10:20:08 2009
|
||||
+++ snmplib/snmpUDPDomain.c Fri Feb 13 10:21:07 2009
|
||||
@@ -104,12 +104,12 @@ netsnmp_udp_fmtaddr(netsnmp_transport *t, void *data,
|
||||
char tmp[64];
|
||||
to = (struct sockaddr_in *) &(addr_pair->remote_addr);
|
||||
if (to == NULL) {
|
||||
- sprintf(tmp, "UDP: [%s]->unknown",
|
||||
+ sprintf(tmp, "UDP: unknown->[%s]",
|
||||
inet_ntoa(addr_pair->local_addr));
|
||||
} else {
|
||||
- sprintf(tmp, "UDP: [%s]->", inet_ntoa(addr_pair->local_addr));
|
||||
- sprintf(tmp + strlen(tmp), "[%s]:%hd",
|
||||
+ sprintf(tmp, "UDP: [%s]:%hu->",
|
||||
inet_ntoa(to->sin_addr), ntohs(to->sin_port));
|
||||
+ sprintf(tmp + strlen(tmp), "[%s]", inet_ntoa(addr_pair->local_addr));
|
||||
}
|
||||
return strdup(tmp);
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.7 2009/08/17 14:58:45 giovanni Exp $
|
||||
@comment $OpenBSD: PLIST-main,v 1.8 2010/09/21 10:43:04 sthen Exp $
|
||||
@pkgpath net/net-snmp
|
||||
%%SHARED%%
|
||||
@bin bin/encode_keychange
|
||||
@ -231,7 +231,6 @@ lib/libnetsnmptrapd.la
|
||||
@man man/man3/init_mib.3
|
||||
@man man/man3/init_mib_internals.3
|
||||
@man man/man3/mib_api.3
|
||||
@man man/man3/netsnmp_Container_iterator.3
|
||||
@man man/man3/netsnmp_agent.3
|
||||
@man man/man3/netsnmp_baby_steps.3
|
||||
@man man/man3/netsnmp_bulk_to_next.3
|
||||
@ -473,6 +472,7 @@ share/snmp/mibs/NET-SNMP-AGENT-MIB.txt
|
||||
share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt
|
||||
share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt
|
||||
share/snmp/mibs/NET-SNMP-MIB.txt
|
||||
share/snmp/mibs/NET-SNMP-PASS-MIB.txt
|
||||
share/snmp/mibs/NET-SNMP-TC.txt
|
||||
share/snmp/mibs/NET-SNMP-VACM-MIB.txt
|
||||
share/snmp/mibs/NETWORK-SERVICES-MIB.txt
|
||||
|
Loading…
Reference in New Issue
Block a user