diff options
author | Naohiro Aota <naota@gentoo.org> | 2012-07-04 11:10:19 +0000 |
---|---|---|
committer | Naohiro Aota <naota@gentoo.org> | 2012-07-04 11:10:19 +0000 |
commit | 3517ef91e25a9681fc80a30b046ac571d1a956d6 (patch) | |
tree | 29bd8e9493789cd501def30d88cc8be1fba1d409 /net-analyzer/bsnmp | |
parent | dev-cpp/gccxml: Bump to version which fedora ships, includes gcc-4.7 compatib... (diff) | |
download | gentoo-2-3517ef91e25a9681fc80a30b046ac571d1a956d6.tar.gz gentoo-2-3517ef91e25a9681fc80a30b046ac571d1a956d6.tar.bz2 gentoo-2-3517ef91e25a9681fc80a30b046ac571d1a956d6.zip |
Patch to resolve symbol. #422647; Add init script and default configuration file. #422975
(Portage version: 2.2.0_alpha114/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/bsnmp')
-rw-r--r-- | net-analyzer/bsnmp/ChangeLog | 10 | ||||
-rw-r--r-- | net-analyzer/bsnmp/bsnmp-1.12-r1.ebuild | 49 | ||||
-rw-r--r-- | net-analyzer/bsnmp/files/bsnmp-1.12-mibII.patch | 13 | ||||
-rw-r--r-- | net-analyzer/bsnmp/files/bsnmpd.init | 12 | ||||
-rw-r--r-- | net-analyzer/bsnmp/files/snmpd.config | 98 |
5 files changed, 180 insertions, 2 deletions
diff --git a/net-analyzer/bsnmp/ChangeLog b/net-analyzer/bsnmp/ChangeLog index 2b74b05612c1..e592e9679308 100644 --- a/net-analyzer/bsnmp/ChangeLog +++ b/net-analyzer/bsnmp/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-analyzer/bsnmp # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/bsnmp/ChangeLog,v 1.4 2012/06/12 02:23:41 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/bsnmp/ChangeLog,v 1.5 2012/07/04 11:10:19 naota Exp $ + +*bsnmp-1.12-r1 (04 Jul 2012) + + 04 Jul 2012; Naohiro Aota <naota@gentoo.org> +bsnmp-1.12-r1.ebuild, + +files/bsnmp-1.12-mibII.patch, +files/bsnmpd.init, +files/snmpd.config: + Patch to resolve symbol. #422647; Add init script and default configuration + file. #422975 12 Jun 2012; Zac Medico <zmedico@gentoo.org> bsnmp-1.11a.ebuild, bsnmp-1.12.ebuild: @@ -21,4 +28,3 @@ +files/bsnmp-1.10-gcc34.patch, +metadata.xml, +bsnmp-1.11a.ebuild: Initial import from gentoo-alt overlay, SNMP daemon for FreeBSD. Not yet fixed to work on Linux, so just ~x86-fbsd. - diff --git a/net-analyzer/bsnmp/bsnmp-1.12-r1.ebuild b/net-analyzer/bsnmp/bsnmp-1.12-r1.ebuild new file mode 100644 index 000000000000..761963bf1f89 --- /dev/null +++ b/net-analyzer/bsnmp/bsnmp-1.12-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/bsnmp/bsnmp-1.12-r1.ebuild,v 1.1 2012/07/04 11:10:19 naota Exp $ + +inherit eutils flag-o-matic + +DESCRIPTION="Mini-SNMP Daemon and Library" +HOMEPAGE="http://people.freebsd.org/~harti/" +SRC_URI="http://people.freebsd.org/~harti/bsnmp/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64-fbsd ~x86-fbsd" +IUSE="tcpd" + +DEPEND="dev-libs/libbegemot + tcpd? ( sys-apps/tcp-wrappers )" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${PN}-1.10-gcc34.patch" + epatch "${FILESDIR}/werror.patch" + epatch "${FILESDIR}/${P}-mibII.patch" +} + +src_compile() { + if use elibc_glibc; then + # bsnmp is bsd-based, without this it will fail + append-flags "-D_BSD_SOURCE" + fi + + filter-flags -fno-inline + + econf \ + --with-libbegemot=/usr \ + $(use_with tcpd tcpwrappers) \ + || die "econf failed" + + emake -j1 || die "emake failed" +} + +src_install() { + einstall || die "make install failed" + newinitd "${FILESDIR}"/bsnmpd.init bsnmpd || die + insinto /etc + doins "${FILESDIR}"/snmpd.config +} diff --git a/net-analyzer/bsnmp/files/bsnmp-1.12-mibII.patch b/net-analyzer/bsnmp/files/bsnmp-1.12-mibII.patch new file mode 100644 index 000000000000..c93191823d6e --- /dev/null +++ b/net-analyzer/bsnmp/files/bsnmp-1.12-mibII.patch @@ -0,0 +1,13 @@ +diff --git a/snmp_mibII/Makefile.in b/snmp_mibII/Makefile.in +index d14c179..3a99850 100755 +--- a/snmp_mibII/Makefile.in ++++ b/snmp_mibII/Makefile.in +@@ -10,7 +10,7 @@ MOD= mibII + SRCS= ${MOD}_tree.c mibII.c mibII_ifmib.c mibII_ip.c \ + mibII_interfaces.c mibII_ipaddr.c mibII_ifstack.c \ + mibII_rcvaddr.c mibII_nettomedia.c mibII_tcp.c mibII_udp.c \ +- mibII_route.c ++ mibII_route.c mibII_begemot.c + INCS= snmp_${MOD}.h + DEFS= mibII_tree.def + MAN3= snmp_mibII.3 diff --git a/net-analyzer/bsnmp/files/bsnmpd.init b/net-analyzer/bsnmp/files/bsnmpd.init new file mode 100644 index 000000000000..82be65577c70 --- /dev/null +++ b/net-analyzer/bsnmp/files/bsnmpd.init @@ -0,0 +1,12 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/bsnmp/files/bsnmpd.init,v 1.1 2012/07/04 11:10:19 naota Exp $ + +description="Mini-SNMP Daemon" +command="/usr/bin/bsnmpd" +pidfile="/var/run/snmpd.pid" + +depend() { + use net +} diff --git a/net-analyzer/bsnmp/files/snmpd.config b/net-analyzer/bsnmp/files/snmpd.config new file mode 100644 index 000000000000..26f9f1aeb163 --- /dev/null +++ b/net-analyzer/bsnmp/files/snmpd.config @@ -0,0 +1,98 @@ +# $FreeBSD: src/etc/snmpd.config,v 1.9.10.1.8.1 2012/03/03 06:15:13 kensmith Exp $ +# +# Example configuration file for bsnmpd(1). +# + +# +# Set some common variables +# +location := "Room 200" +contact := "sysmeister@example.com" +system := 1 # FreeBSD +traphost := localhost +trapport := 162 + +# Change this! +read := "public" +# Uncomment begemotSnmpdCommunityString.0.2 below that sets the community +# string to enable write access. +write := "geheim" +trap := "mytrap" + +# +# Configuration +# +%snmpd +begemotSnmpdDebugDumpPdus = 2 +begemotSnmpdDebugSyslogPri = 7 + +# +# Set the read and write communities. +# +# The default value of the community strings is NULL (note, that this is +# different from the empty string). This disables both read and write access. +# To enable read access only the read community string must be set. Setting +# the write community string enables both read and write access with that +# string. +# +# Be sure to understand the security implications of SNMPv2 - the community +# strings are readable on the wire! +# +begemotSnmpdCommunityString.0.1 = $(read) +# begemotSnmpdCommunityString.0.2 = $(write) +begemotSnmpdCommunityDisable = 1 + +# open standard SNMP ports +begemotSnmpdPortStatus.0.0.0.0.161 = 1 + +# open a unix domain socket +begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1 +begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4 + +# send traps to the traphost +begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4 +begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2 +begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap) + +sysContact = $(contact) +sysLocation = $(location) +sysObjectId = 1.3.6.1.4.1.12325.1.1.2.1.$(system) + +snmpEnableAuthenTraps = 2 + +# +# Load MIB-2 module +# +begemotSnmpdModulePath."mibII" = "/usr/lib/libsnmp_mibII.so.3.0" + +# Force a polling rate for the 64-bit interface counters in case +# the automatic computation is wrong (which may be the case if an interface +# announces the wrong bit rate via its MIB). +#%mibII +#begemotIfForcePoll = 2000 + +# +# Netgraph module +# +#begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so" +# +#%netgraph +#begemotNgControlNodeName = "snmpd" + +# +# pf(4) module +# +#begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so" + +# +# Host resources module +# This requires the mibII module. +# +#begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so" + +# +# Bridge module +# This requires the mibII module. +# +#begemotSnmpdModulePath."bridge" = "/usr/lib/snmp_bridge.so" + |