diff options
author | hubertf <hubertf> | 2001-01-26 02:02:34 +0000 |
---|---|---|
committer | hubertf <hubertf> | 2001-01-26 02:02:34 +0000 |
commit | 24b2b4849749986921af5dd943729696410ccf41 (patch) | |
tree | f4c410a54c9ddbe945c1485f6162349c30dc484b /net/ucd-snmp | |
parent | 1baa55c89603c250c08432b253e62825ce806d20 (diff) | |
download | pkgsrc-24b2b4849749986921af5dd943729696410ccf41.tar.gz |
* Fix rc.d scripts
* support HOST-RESOURCES MIB
Patch submitted by Greg A. Woods <woods@weird.com> in PR 12043
Diffstat (limited to 'net/ucd-snmp')
-rw-r--r-- | net/ucd-snmp/Makefile | 20 | ||||
-rw-r--r-- | net/ucd-snmp/files/patch-sum | 2 | ||||
-rw-r--r-- | net/ucd-snmp/files/snmpd.sh | 6 | ||||
-rw-r--r-- | net/ucd-snmp/patches/patch-aa | 85 | ||||
-rw-r--r-- | net/ucd-snmp/pkg/PLIST | 5 |
5 files changed, 94 insertions, 24 deletions
diff --git a/net/ucd-snmp/Makefile b/net/ucd-snmp/Makefile index c22abb9af49..11c8c4fda77 100644 --- a/net/ucd-snmp/Makefile +++ b/net/ucd-snmp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2000/12/16 09:04:40 hubertf Exp $ +# $NetBSD: Makefile,v 1.26 2001/01/26 02:02:34 hubertf Exp $ # FreeBSD Id: Makefile,v 1.18 1998/04/06 20:50:31 andreas Exp # @@ -27,6 +27,13 @@ USE_SSL= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+=--with-defaults --with-libwrap --with-logfile="/var/log/snmpd" +CONFIGURE_ARGS+=--with-mib-modules="smux host" +# NOTE: if you do not allow dummy values some tools such as +# scotty/tkined may ignore results when they shouldn't. +CONFIGURE_ARGS+=--with-dummy-values +# NOTE: without this the default is USER@DOMAINNAME of the package builder +CONFIGURE_ARGS+=--with-sys-contact="default_user@contact.domain" +CONFIGURE_ARGS+=--with-sys-location="defaultlocation" CONFIGURE_ARGS+=--enable-shared .if defined(USE_INET6) && ${USE_INET6} == "YES" CONFIGURE_ARGS+=--enable-ipv6 @@ -35,7 +42,7 @@ CONFIGURE_ARGS+=--disable-ipv6 .endif # this might make it easier to use scotty's mibs, and local ones too -CONFIGURE_ARGS+=--with-mibdirs="${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tcl/tnm2.1.10/mibs:/usr/local/share/snmp/mibs" +CONFIGURE_ARGS+=--with-mibdirs="${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tcl/tnm2.1.10/mibs:${PREFIX}/lib/tnm2.1.8/mibs:/usr/local/share/snmp/mibs" # deal with libwrap bogosity by providing these variables to programs which # do not supply them: @@ -45,13 +52,16 @@ post-extract: pre-configure: @(cd ${WRKSRC} && autoreconf) +post-build: + ${SED} 's,@PREFIX@,${PREFIX},g' < ${FILESDIR}/snmpd.sh > ${WRKDIR}/snmpd + ${SED} 's,@PREFIX@,${PREFIX},g' < ${FILESDIR}/snmptrapd.sh > ${WRKDIR}/snmptrapd + post-install: ${MKDIR} ${PREFIX}/share/examples/ucd-snmp ${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf ${PREFIX}/share/examples/ucd-snmp ${INSTALL_DATA_DIR} ${PREFIX}/lib/snmp/dlmod - ${SED} -e 's,@PREFIX@,${PREFIX},' \ - < ${FILESDIR}/snmpd.sh > ${WRKDIR}/snmpd.sh - ${INSTALL_SCRIPT} ${WRKDIR}/snmpd.sh ${PREFIX}/etc/rc.d + ${INSTALL_SCRIPT} ${WRKDIR}/snmpd ${PREFIX}/etc/rc.d + ${INSTALL_SCRIPT} ${WRKDIR}/snmptrapd ${PREFIX}/etc/rc.d .if (${OPSYS} == "NetBSD") CFLAGS+= -Dnetbsd1 diff --git a/net/ucd-snmp/files/patch-sum b/net/ucd-snmp/files/patch-sum index 16ace4cb77f..967ce39bede 100644 --- a/net/ucd-snmp/files/patch-sum +++ b/net/ucd-snmp/files/patch-sum @@ -1,6 +1,6 @@ <<<<<<< patch-sum -MD5 (patch-aa) = 0cd7c132f9c7290f6d073afcadc17c97 +MD5 (patch-aa) = 770617ea0a51aaa1884390941876e2cc MD5 (patch-ab) = 3a748ac3b5ad6148ee5db35e4e5a7e6c MD5 (patch-ac) = 3ff9d693d5560fa4442c8f59599af2a0 MD5 (patch-ad) = e25de5b48c6a1ca959cf6ff5b8fe1e1b diff --git a/net/ucd-snmp/files/snmpd.sh b/net/ucd-snmp/files/snmpd.sh index ea15c553802..4aae15d05e9 100644 --- a/net/ucd-snmp/files/snmpd.sh +++ b/net/ucd-snmp/files/snmpd.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: snmpd.sh,v 1.2 2000/12/16 09:04:41 hubertf Exp $ +# $NetBSD: snmpd.sh,v 1.3 2001/01/26 02:02:35 hubertf Exp $ # PID file: PF=/var/run/snmpd.pid @@ -15,13 +15,15 @@ start) if [ -x @PREFIX@/sbin/snmpd ] then echo -n ' snmpd' - @PREFIX@/sbin/snmpd -s -P ${PF} -A -l /dev/null ${SNMPD_CFG} + @PREFIX@/sbin/snmpd -s -P ${PF} -A ${SNMPD_CFG} fi ;; stop) if [ -f ${PF} ]; then kill `cat ${PF}` rm -f ${PF} + else + echo "$0: snmpd not running or PID not recorded!" 1>&2 fi ;; restart) diff --git a/net/ucd-snmp/patches/patch-aa b/net/ucd-snmp/patches/patch-aa index c0772eb5746..6ec684f13f3 100644 --- a/net/ucd-snmp/patches/patch-aa +++ b/net/ucd-snmp/patches/patch-aa @@ -1,24 +1,57 @@ -$NetBSD: patch-aa,v 1.11 2000/10/13 17:55:36 kim Exp $ +$NetBSD: patch-aa,v 1.12 2001/01/26 02:02:35 hubertf Exp $ ---- configure.in.orig Sat May 6 01:46:26 2000 -+++ configure.in Wed Oct 11 19:15:06 2000 -@@ -461,3 +461,4 @@ +--- configure.in.orig Fri May 5 12:46:26 2000 ++++ configure.in Thu Jan 25 11:34:44 2001 +@@ -459,7 +459,8 @@ + else + SHLIB_CFLAGS="-KPIC" fi - SHLIB_EXTENSION="so" +# SHLIB_EXTENSION="so" + SHLIB_EXTENSION="la" SHLIB_VERSION= -@@ -1069,3 +1070,3 @@ + SHLIB_LD_CMD="ld -r -o" + SHLIB_LDCONFIG_CMD= +@@ -1045,12 +1046,12 @@ + dnl + dnl now check for rpm using the appropriate db library + dnl +-AC_CHECK_LIB(rpm, rpmdbOpen,[ +- AC_DEFINE(HAVE_LIBRPM) +- LIBS="-lrpm $LIBS" +- CFLAGS="$CFLAGS -I/usr/include/rpm" +-],,-lz) +- ++AC_CHECK_HEADERS(rpm/rpmlib.h rpm/header.h, ++ AC_CHECK_LIB(rpm, rpmdbOpen,[ ++ AC_DEFINE(HAVE_LIBRPM) ++ LIBS="-lrpm $LIBS" ++], CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}), ++CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}) + + dnl Replace `main' with a function in -lkstat: + AC_CHECK_LIB(kstat, kstat_lookup) +@@ -1067,7 +1068,7 @@ + AC_HEADER_STDC + AC_HEADER_DIRENT AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(stdarg.h string.h fcntl.h limits.h sys/file.h sys/ioctl.h syslog.h unistd.h netinet/tcpip.h netinet/in.h netinet/ip.h net/if.h netdb.h sys/dmap.h machine/pte.h xti.h sys/sockio.h sys/socket.h sys/un.h fstab.h sys/fs.h mtab.h ufs/fs.h ufs/ffs/fs.h sys/fixpoint.h machine/param.h sys/vm.h vm/vm.h sys/vmmeter.h sys/vmparam.h sys/vmmac.h sys/vmsystm.h sys/mbuf.h sys/time.h sys/swap.h inet/mib2.h sys/statvfs.h sys/vfs.h sys/mnttab.h sys/user.h sys/proc.h sys/select.h mntent.h sys/mntent.h kstat.h utsname.h sys/utsname.h sys/cdefs.h getopt.h locale.h pthread.h sys/loadavg.h regex.h) +AC_CHECK_HEADERS(stdarg.h string.h fcntl.h limits.h sys/file.h sys/ioctl.h syslog.h unistd.h netinet/tcpip.h netinet/in.h netinet/ip.h net/if.h netdb.h sys/dmap.h machine/pte.h xti.h sys/sockio.h sys/socket.h sys/un.h fstab.h sys/fs.h mtab.h ufs/fs.h ufs/ffs/fs.h sys/fixpoint.h machine/param.h sys/vm.h sys/vmmeter.h sys/vmparam.h sys/vmmac.h sys/vmsystm.h sys/mbuf.h sys/time.h sys/swap.h inet/mib2.h sys/statvfs.h sys/vfs.h sys/mnttab.h sys/user.h sys/proc.h sys/select.h mntent.h sys/mntent.h kstat.h utsname.h sys/utsname.h sys/cdefs.h getopt.h locale.h pthread.h sys/loadavg.h regex.h) dnl FreeBSD required headers -@@ -1077,3 +1078,3 @@ + AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_mib.h net/if_types.h net/if_var.h sys/queue.h osreldate.h sys/disklabel.h machine/types.h sys/socketvar.h) + dnl Linux +@@ -1075,7 +1076,7 @@ + dnl NetBSD required headers + AC_CHECK_HEADERS(arpa/inet.h kvm.h sys/pool.h) dnl BSDi2 headers -AC_CHECK_HEADERS(sys/mount.h vm/swap_pager.h ufs/ufs/dinode.h) +AC_CHECK_HEADERS(sys/mount.h ufs/ufs/dinode.h) dnl BSDi3 headers -@@ -1276,7 +1277,3 @@ + AC_CHECK_HEADERS(sys/stat.h sys/vnode.h ufs/ufs/quota.h ufs/ufs/inode.h) + dnl irix headers +@@ -1274,11 +1275,7 @@ + + AC_CHECK_STRUCT_FOR([ #include <sys/types.h> -#define KERNEL -#define _KERNEL @@ -26,7 +59,11 @@ $NetBSD: patch-aa,v 1.11 2000/10/13 17:55:36 kim Exp $ -#undef KERNEL -#undef _KERNEL #include <net/route.h> -@@ -1291,7 +1288,3 @@ + ], rtentry, rt_dst, no) + +@@ -1289,11 +1286,7 @@ + dnl 4.4 compat + AC_TRY_COMPILE([ #include <sys/types.h> -#define KERNEL -#define _KERNEL @@ -34,7 +71,11 @@ $NetBSD: patch-aa,v 1.11 2000/10/13 17:55:36 kim Exp $ -#undef KERNEL -#undef _KERNEL #include <net/route.h> -@@ -1312,7 +1305,3 @@ + ],[ + +@@ -1310,11 +1303,7 @@ + if test "x$ac_cv_RTENTRY_TYPE" = "x"; then + AC_TRY_COMPILE([ #include <sys/types.h> -#define KERNEL -#define _KERNEL @@ -42,7 +83,11 @@ $NetBSD: patch-aa,v 1.11 2000/10/13 17:55:36 kim Exp $ -#undef KERNEL -#undef _KERNEL #include <net/route.h> -@@ -1366,7 +1355,3 @@ + ],[ + struct rtentry rt; +@@ -1364,11 +1353,7 @@ + [ + AC_TRY_COMPILE([ #include <sys/types.h> -#define KERNEL -#define _KERNEL @@ -50,7 +95,11 @@ $NetBSD: patch-aa,v 1.11 2000/10/13 17:55:36 kim Exp $ -#undef KERNEL -#undef _KERNEL #include <net/route.h> -@@ -1387,7 +1372,3 @@ + ],[ + struct rtentry rt; +@@ -1385,41 +1370,25 @@ + dnl Check struct rtentry for various things. + AC_CHECK_STRUCT_FOR([ #include <sys/types.h> -#define KERNEL -#define _KERNEL @@ -58,7 +107,9 @@ $NetBSD: patch-aa,v 1.11 2000/10/13 17:55:36 kim Exp $ -#undef KERNEL -#undef _KERNEL #include <net/route.h> -@@ -1397,7 +1378,3 @@ + ], rtentry, rt_unit) + + AC_CHECK_STRUCT_FOR([ #include <sys/types.h> -#define KERNEL -#define _KERNEL @@ -66,7 +117,9 @@ $NetBSD: patch-aa,v 1.11 2000/10/13 17:55:36 kim Exp $ -#undef KERNEL -#undef _KERNEL #include <net/route.h> -@@ -1407,7 +1384,3 @@ + ], rtentry, rt_refcnt) + + AC_CHECK_STRUCT_FOR([ #include <sys/types.h> -#define KERNEL -#define _KERNEL @@ -74,7 +127,9 @@ $NetBSD: patch-aa,v 1.11 2000/10/13 17:55:36 kim Exp $ -#undef KERNEL -#undef _KERNEL #include <net/route.h> -@@ -1417,7 +1390,3 @@ + ], rtentry, rt_hash) + + AC_CHECK_STRUCT_FOR([ #include <sys/types.h> -#define KERNEL -#define _KERNEL @@ -82,3 +137,5 @@ $NetBSD: patch-aa,v 1.11 2000/10/13 17:55:36 kim Exp $ -#undef KERNEL -#undef _KERNEL #include <net/route.h> + ], rtentry, rt_use) + diff --git a/net/ucd-snmp/pkg/PLIST b/net/ucd-snmp/pkg/PLIST index a4e16a68c3d..806c5f6a895 100644 --- a/net/ucd-snmp/pkg/PLIST +++ b/net/ucd-snmp/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.10 2001/01/04 15:10:52 agc Exp $ +@comment $NetBSD: PLIST,v 1.11 2001/01/26 02:02:35 hubertf Exp $ bin/encode_keychange bin/snmpbulkget bin/snmpbulkwalk @@ -17,7 +17,8 @@ bin/snmptrap bin/snmpusm bin/snmpwalk bin/tkmib -etc/rc.d/snmpd.sh +etc/rc.d/snmpd +etc/rc.d/snmptrapd include/ucd-snmp/agent_read_config.h include/ucd-snmp/agent_registry.h include/ucd-snmp/agent_trap.h |