pkgsrc/net/net-snmp/Makefile

139 lines
4.4 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.119 2017/06/05 14:24:16 ryoon Exp $
.include "Makefile.common"
CATEGORIES= net
PKGREVISION= 7
Changes 5.2.1: Fixes: Building: - configure --disable-snmpv2c now works - fix make test tests for rfc1213 - bug 1049607: net-snmp-config --compile-subagent broken library: - bug 1084413: Can't disable file logging - bug 1072406: invalid operator precedence in opendir() agent library: - disconnected AgentX subagents now reconnect with correct context - fix table_array row insert/delete during set processing agent: - don't override clientAddr setting for local trapsinks - bug 1088765: Agent fails to send traps to remote target - bug 1034008: memory leak using SET for table_dataset - patch 1052460: fix agent deadlock on exec - bug 1055781: get-next fails to step into interfaces group correctly - bug 1056760: agent ignores ifspeed, type settings in snmpd.conf - bug 1062986: pass and pass_persist fail and crash snmpd - fix snmpd.conf table token to handle augments tables snmptrapd: - bug 1085981: snmptrapd complains about logging and access control - bug 1040711: snmptrapd: SIGHUP duplicates traphandlers (repeatedly) MFD: - Misc updates to MFD templates - add auto-handling of cache update for row insert/delete Ports: - Win32 - fixes for compiling without the Microsoft PSDK installed - fix Win32 getenv crash - Mac OS X compile error fix - HP-UX configure now detects and won't use unavailable function - Linux - patch 1055036: if-mib init order fix - patch 1057057: ipSystemStatsTable index fix, add ipv6 - patch 1073897: fix if-mib data access 64bit counter wrap detection MIBs: - update IP-FORWARD-MIB from an ID set to become an RFC
2005-03-30 14:10:58 +02:00
MAINTAINER= adam@NetBSD.org
COMMENT= Extensible SNMP implementation
CONFLICTS= ucd-snmp-[0-9]*
2007-02-15 22:47:21 +01:00
CONFLICTS+= nocol-[0-9]* # bin/snmpget bin/snmpwalk
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
MAKE_ENV+= OPSYS=${OPSYS}
MAKE_JOBS_SAFE= no
.include "../../mk/bsd.prefs.mk"
.include "options.mk"
# Don't compress manual pages as they include each other.
.undef MANZ
2016-02-25 17:20:49 +01:00
MAKE_ENV.DragonFly+= MIB_SYSTEM_LIBS=-lkinfo
.if ${OPSYS} == "NetBSD"
OSVERSION_SPECIFIC= YES
. if empty(CFLAGS:U:M*-Dnetbsd1*)
CFLAGS+= -Dnetbsd1
. endif
.endif
.if (${OPSYS} == "NetBSD") || !exists(/usr/bin/lpstat)
CONFIGURE_ENV+= ac_cv_path_LPSTAT_PATH=no
.endif
NET_SNMP_SYS_CONTACT?= default_user@contact.domain
NET_SNMP_SYS_LOCATION?= defaultlocation
NET_SNMP_PERSISTENTDIR?= ${VARBASE}/net-snmp
NET_SNMP_MIBDIRS?= \$$HOME/.snmp/mibs:${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tcl/tnm2.1.10/mibs:/usr/local/share/snmp/mibs
Update to 5.0.9. PR19939 by Greg A. Woods. Changes from NEWS file: --------8<--------8<--------8<--------8<--------8<--------8<--------8< *5.0.9* SECURITY: - An existing user/community could get access to data in MIB objects that were explicitly excluded from their view. Fixes: - Perl build environment should better under Windows - Misc kerberos support fixes. - Improvements on various manual pages. - A annoying bug with SETs being passed to pass scripts was fixed. - The often talked about VACM optimization improvement was fixed again. - mib2c handles augmentation tables better now. - Various 64 bit issues have been addressed. *5.0.8* New: - No new features will be added to the 5.0.x line. Ports: - Update libtool to version 1.4.3, for the benefit of Darwin - diskio support for Darwin - Updates for OpenBSD 3. - Updates to solaris README Fixes: - find libwrap w/nsl on RedHat - fix for openssl 0.9.7 - Fix some AgentX memory leaks - use macro for inline function prototypes - Attempt to find unused port before running tests - Use SNMP_SLEEP environment variable when running tests - calculate a proper ifSpeed under linux when possible - better daemonization of snmpd - close and reopen snmptrapd log files on HUP - support for 16 bit reuqest ids - Recognize new 't' code in display hints - misc other fixes *5.0.7* New: - VACM (access control) optimizations which will greatly benefit people who wish to exclude large portions of the MIB tree from some people. Previously this was a large resource drain. - Add command line option to snmpd to set syslog facility - Reverse DISPLAY-HINT processing, i.e. it allows you to input data formatted like a DISPLAY-HINT prescribes - Support setting of sysDescr and sysObjectID via snmpd.conf configuration directives - New output option to force display of strings as hex - Persistent directory can be specified at runtime - Add support for Linux virtual interfaces in the ipAddressTable. - implemented the mteEventTable and the mteEventNotificationTable form the DISMAN-EVENT-MIB. Fixes: - AgentX no longer flagged as experimental - A few memory leak fixes for the table_iterator agent API. - Processed flag cleared before each pass of a set request - Remove snmpd pid file on exit - Restore default behaviour of building shared libraries - misc other fixes --------8<--------8<--------8<--------8<--------8<--------8<--------8<
2003-09-12 14:07:18 +02:00
BUILD_DEFS+= NET_SNMP_SYS_CONTACT
BUILD_DEFS+= NET_SNMP_SYS_LOCATION
BUILD_DEFS+= NET_SNMP_PERSISTENTDIR
BUILD_DEFS+= NET_SNMP_MIBDIRS
CONFIGURE_ARGS+= --enable-shared
CONFIGURE_ARGS+= --with-defaults
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
2005-10-18 06:32:37 +02:00
CONFIGURE_ARGS+= --with-libwrap=${BUILDLINK_PREFIX.tcp_wrappers}/lib
CONFIGURE_ARGS+= --with-sys-contact=${NET_SNMP_SYS_CONTACT:Q}
CONFIGURE_ARGS+= --with-sys-location=${NET_SNMP_SYS_LOCATION:Q}
CONFIGURE_ARGS+= --with-install-prefix=${DESTDIR}
Update to 5.0.9. PR19939 by Greg A. Woods. Changes from NEWS file: --------8<--------8<--------8<--------8<--------8<--------8<--------8< *5.0.9* SECURITY: - An existing user/community could get access to data in MIB objects that were explicitly excluded from their view. Fixes: - Perl build environment should better under Windows - Misc kerberos support fixes. - Improvements on various manual pages. - A annoying bug with SETs being passed to pass scripts was fixed. - The often talked about VACM optimization improvement was fixed again. - mib2c handles augmentation tables better now. - Various 64 bit issues have been addressed. *5.0.8* New: - No new features will be added to the 5.0.x line. Ports: - Update libtool to version 1.4.3, for the benefit of Darwin - diskio support for Darwin - Updates for OpenBSD 3. - Updates to solaris README Fixes: - find libwrap w/nsl on RedHat - fix for openssl 0.9.7 - Fix some AgentX memory leaks - use macro for inline function prototypes - Attempt to find unused port before running tests - Use SNMP_SLEEP environment variable when running tests - calculate a proper ifSpeed under linux when possible - better daemonization of snmpd - close and reopen snmptrapd log files on HUP - support for 16 bit reuqest ids - Recognize new 't' code in display hints - misc other fixes *5.0.7* New: - VACM (access control) optimizations which will greatly benefit people who wish to exclude large portions of the MIB tree from some people. Previously this was a large resource drain. - Add command line option to snmpd to set syslog facility - Reverse DISPLAY-HINT processing, i.e. it allows you to input data formatted like a DISPLAY-HINT prescribes - Support setting of sysDescr and sysObjectID via snmpd.conf configuration directives - New output option to force display of strings as hex - Persistent directory can be specified at runtime - Add support for Linux virtual interfaces in the ipAddressTable. - implemented the mteEventTable and the mteEventNotificationTable form the DISMAN-EVENT-MIB. Fixes: - AgentX no longer flagged as experimental - A few memory leak fixes for the table_iterator agent API. - Processed flag cleared before each pass of a set request - Remove snmpd pid file on exit - Restore default behaviour of building shared libraries - misc other fixes --------8<--------8<--------8<--------8<--------8<--------8<--------8<
2003-09-12 14:07:18 +02:00
#
# NOTE: if you specify a logfile then this file will be written to by
# default and although it can be disabled on the command line, the
# daemon must be stopped to cycle it properly. Remember rc.d/snmpd
# will use '-s' to enable standard syslog logging anyway.
#
CONFIGURE_ARGS+= --with-logfile=none
CONFIGURE_ARGS+= --with-persistent-directory=${NET_SNMP_PERSISTENTDIR}
.if !empty(NET_SNMP_MIBDIRS)
CONFIGURE_ARGS+= --with-mibdirs=${NET_SNMP_MIBDIRS:Q}
.endif
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS"
CONFIGURE_ARGS+= --with-mib-modules="smux host ucd-snmp/diskio"
.else
Update to 5.0.9. PR19939 by Greg A. Woods. Changes from NEWS file: --------8<--------8<--------8<--------8<--------8<--------8<--------8< *5.0.9* SECURITY: - An existing user/community could get access to data in MIB objects that were explicitly excluded from their view. Fixes: - Perl build environment should better under Windows - Misc kerberos support fixes. - Improvements on various manual pages. - A annoying bug with SETs being passed to pass scripts was fixed. - The often talked about VACM optimization improvement was fixed again. - mib2c handles augmentation tables better now. - Various 64 bit issues have been addressed. *5.0.8* New: - No new features will be added to the 5.0.x line. Ports: - Update libtool to version 1.4.3, for the benefit of Darwin - diskio support for Darwin - Updates for OpenBSD 3. - Updates to solaris README Fixes: - find libwrap w/nsl on RedHat - fix for openssl 0.9.7 - Fix some AgentX memory leaks - use macro for inline function prototypes - Attempt to find unused port before running tests - Use SNMP_SLEEP environment variable when running tests - calculate a proper ifSpeed under linux when possible - better daemonization of snmpd - close and reopen snmptrapd log files on HUP - support for 16 bit reuqest ids - Recognize new 't' code in display hints - misc other fixes *5.0.7* New: - VACM (access control) optimizations which will greatly benefit people who wish to exclude large portions of the MIB tree from some people. Previously this was a large resource drain. - Add command line option to snmpd to set syslog facility - Reverse DISPLAY-HINT processing, i.e. it allows you to input data formatted like a DISPLAY-HINT prescribes - Support setting of sysDescr and sysObjectID via snmpd.conf configuration directives - New output option to force display of strings as hex - Persistent directory can be specified at runtime - Add support for Linux virtual interfaces in the ipAddressTable. - implemented the mteEventTable and the mteEventNotificationTable form the DISMAN-EVENT-MIB. Fixes: - AgentX no longer flagged as experimental - A few memory leak fixes for the table_iterator agent API. - Processed flag cleared before each pass of a set request - Remove snmpd pid file on exit - Restore default behaviour of building shared libraries - misc other fixes --------8<--------8<--------8<--------8<--------8<--------8<--------8<
2003-09-12 14:07:18 +02:00
CONFIGURE_ARGS+= --with-mib-modules="smux host"
.endif
.if !empty(MACHINE_PLATFORM:MDarwin-[567].*)
CONFIGURE_ARGS+= --with-out-mib-modules="ucd-snmp/diskio mibII"
.endif
.if !empty(MACHINE_PLATFORM:MDarwin-9.*)
CONFIGURE_ARGS+= --with-mib-modules="host ucd-snmp/diskio"
CONFIGURE_ARGS+= --with-out-mib-modules="mibII/icmp host/hr_swrun"
CONFIGURE_ARGS+= --enable-as-needed
CONFIGURE_ARGS+= --without-kmem-usage
CONFIGURE_ARGS+= --without-rpm
.endif
#
# Using "dummy" values is technically not compliant with SNMP specs, but
# otherwise, some tools, e.g. net/tcl-scotty, net/tkined, may ignore results
# when they shouldn't.
#
CONFIGURE_ARGS+= --with-dummy-values
#
# Install the UCD-SNMP look-alike headers and libraries to ease porting of
# older software to use net-snmp.
#
CONFIGURE_ARGS+= --enable-ucd-snmp-compatibility
2016-02-25 17:20:49 +01:00
CFLAGS.Darwin+= -framework ApplicationServices
CFLAGS.Darwin+= -framework CoreFoundation
CFLAGS.Darwin+= -framework CoreServices
CFLAGS.Darwin+= -framework DiskArbitration
CFLAGS.Darwin+= -framework IOKit
# Handle ${PREFIX}/share/snmp in the DEINSTALL script since it may contain
# leftover config files or pidfiles after deinstallation.
#
REQD_DIRS= ${PREFIX}/share/snmp
RCD_SCRIPTS= snmpd snmptrapd
SMF_NAME= snmp
USE_TOOLS+= sh:run
REPLACE_INTERPRETER+= bash
REPLACE.bash.old= /bin/bash
REPLACE.bash.new= ${SH}
REPLACE_FILES.bash= local/mib2c-update
INSTALLATION_DIRS+= share/examples/net-snmp
post-extract:
.if ${OPSYS} == "DragonFly"
cp ${FILESDIR}/cpu_dragonfly.c ${WRKSRC}/agent/mibgroup/hardware/cpu/cpu_nlist.c
# XXX make it build on OS X 10.10; remove on the next update
2014-08-22 18:27:18 +02:00
.elif ${OPSYS} == "Darwin"
ln -s ${WRKSRC}/include/net-snmp/system/darwin13.h ${WRKSRC}/include/net-snmp/system/darwin14.h
2016-11-25 17:05:07 +01:00
ln -s ${WRKSRC}/include/net-snmp/system/darwin13.h ${WRKSRC}/include/net-snmp/system/darwin15.h
ln -s ${WRKSRC}/include/net-snmp/system/darwin13.h ${WRKSRC}/include/net-snmp/system/darwin16.h
.endif
post-wrapper:
.if !empty(MACHINE_PLATFORM:MNetBSD-1.5.[123]*-i386)
mkdir ${BUILDLINK_DIR}/include/sys
cp ${FILESDIR}/disklabel.h ${BUILDLINK_DIR}/include/sys
.endif
post-install:
${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf \
2009-08-30 04:21:58 +02:00
${DESTDIR}${PREFIX}/share/examples/net-snmp/EXAMPLE.conf
Changes 5.6.1.1: * OID Typedef Bug Fix: The oid typedef was changed in 5.6.1 to an u_int32 from a u_long. This broke binary compatibility and likely 3rd-party code. 5.6.1.1 reverts this change and fixes an underlying OID printing problem in two agent modules that caused someone to change the typedef in the first place. Changes 5.6.1: * General: - The DTLS and TLS transports and the TSM security model are no longer "beta" (they've undergone rigorous interoperability testing). - Many Bug Fixes (see the CHANGES and ChangeLog files for full details) * snmpd: - 0 Patch 3141462: from fenner: fix agentx subagent issues with multiple-object requests - Patch from Niels to fix VACM persistant storage. Changes 5.6: * all: - Implemented the SNMP over TLS and SNMP over DTLS protocols [RFC-to-be] - Implemented the "Transport Security Model" [RFC5591] - Generic host-specific configuration .conf files are now read. - Include statements can now be used in .conf files. * snmpd: - Fix handling of multiple matching VACM entries. (Use the "best" match, rather than the first one). Reported by Adam Lewis. Note that this could potentially affect the behaviour of existing access control configurations. - Agent will no longer call table handlers if a set request for the handler has invalid indexes - table_data/tdata next handler will not be called during get processing if no valid rows are found for the handler - [PATCH 2952708]: Added Perl implementation of BRIDGE-MIB - moved all functions defined in libnetsnmphelpers to libnetsnmpagent. libnetsnmphelpers is now an empty library. - Implemented the TSM-MIB and the TLSTM-MIB - new API for indicating that persistent store needs to be saved after the current request finishes processing - [PATCH 2931446]: make the load averages writable. * apps: - A new tool 'net-snmp-cert' that easily creates and manages X.509 certificates for use with the SNMP over (D)TLS protocols. - Added an 'agentxtrap' command to send notifications via AgentX - -T command line flag can be used to pass configuration directly to transports that can accept configuration tokens - A new 'snmptls' command for manipulating the agent's TLS configuration * snmplib: - A more modular transport subsystem that allows third party extensions and dependencies for code reuse. - New transport functions: f_config, f_open, f_copy and f_setup_session - Transports can now specify session defaults - [PATCH 2942940]: Add a new function, netsnmp_parse_args, that is like snmp_parse_args but takes an additional bitmask, flags, to affect the behaviour. Also remove the magic handling of some application names. - A new X.509 certificate API for indexing and reading certificates - new experimental row creation API which uses a state machine to try really hard to create a row from a given varbind list - netsnmp_container enhancements: - added a free_item function - added a CONTAINER_FREE_ALL macro/function - added an interface for duplicating a container (CONTAINER_DUP) - added a remove function to container_iterators - added an ability to set options on binary_array containers - new snmp token logOption allows specifying log destinations via configuration conf files - A very significant reduction in compiler warning output - new experimental simple state machine handling API
2011-05-27 12:55:24 +02:00
${INSTALL_DATA} ${WRKSRC}/agent/snmp_perl.pl \
2009-08-30 04:21:58 +02:00
${DESTDIR}${PREFIX}/share/snmp/
.include "../../security/tcp_wrappers/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"