diff --git a/net-analyzer/bsnmp/Manifest b/net-analyzer/bsnmp/Manifest new file mode 100644 index 0000000000000000000000000000000000000000..20ada3975bc1471f7e0cb0073d30f1f594e1d876 --- /dev/null +++ b/net-analyzer/bsnmp/Manifest @@ -0,0 +1,2 @@ +DIST bsnmp-1.11a.tar.gz 408165 BLAKE2B 11240fddb1b449927749baddc0c6a6e0d03c85a51fe6f3901e0b915f6060743875224de319c652f5aa70ed5f0a6d2a4ecea059a5d4d4441dff409bfa9be9a1bd SHA512 8b3695a147b5a3c012509f73c0627c8f7b66d99c54c53636d2add2d3427acf331bc4168ee88b8cad2536c1a15901fc38c4acd51e7630c48f4972504d94e8dc08 +DIST bsnmp-1.12.tar.gz 418653 BLAKE2B 87ec6325b2daade01ed46e6c1b5bdccaef310065e00a82b947c33d7451ec5485faa34d88b7371cb114fd4e70eee4746cb13ffaed2586bd35ed581883e1f748c3 SHA512 c2c292e21632ea475d30aafaf7f66566389bccabfd20886a27bc4af98dba24139568c0eaddd36710655abac9ca6a38525136e06f2cf7be8b9db8ca656b2021c9 diff --git a/net-analyzer/bsnmp/bsnmp-1.11a.ebuild b/net-analyzer/bsnmp/bsnmp-1.11a.ebuild new file mode 100644 index 0000000000000000000000000000000000000000..f19dc60cea7aed84774b679b160e4187073b503d --- /dev/null +++ b/net-analyzer/bsnmp/bsnmp-1.11a.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=0 + +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="" +IUSE="tcpd" + +DEPEND="dev-libs/libbegemot + tcpd? ( sys-apps/tcp-wrappers )" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${PN}-1.10-gcc34.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" +} 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 0000000000000000000000000000000000000000..fdd92f44ff94d051aa803f7fccfe0d70c3a9d911 --- /dev/null +++ b/net-analyzer/bsnmp/bsnmp-1.12-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=0 + +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 GPL-2" # GPL-2 init script +SLOT="0" +KEYWORDS="" +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/bsnmp-1.12.ebuild b/net-analyzer/bsnmp/bsnmp-1.12.ebuild new file mode 100644 index 0000000000000000000000000000000000000000..57b8a2e3afd5686abeb2ebc5079dc9fe1f7625c9 --- /dev/null +++ b/net-analyzer/bsnmp/bsnmp-1.12.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=0 + +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="" +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" +} + +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" +} diff --git a/net-analyzer/bsnmp/files/bsnmp-1.10-gcc34.patch b/net-analyzer/bsnmp/files/bsnmp-1.10-gcc34.patch new file mode 100644 index 0000000000000000000000000000000000000000..f1220b83d52167696eaad392c07db5a4dfaf71d5 --- /dev/null +++ b/net-analyzer/bsnmp/files/bsnmp-1.10-gcc34.patch @@ -0,0 +1,12 @@ +diff -ur -x '*~' bsnmp-1.10/snmp_ntp/snmp_ntp.c bsnmp-1.10-fix/snmp_ntp/snmp_ntp.c +--- bsnmp-1.10/snmp_ntp/snmp_ntp.c 2005-05-23 11:03:48.000000000 +0200 ++++ bsnmp-1.10-fix/snmp_ntp/snmp_ntp.c 2005-07-10 01:58:35.557888936 +0200 +@@ -360,6 +360,8 @@ + free(rpkt); + return (-1); + } ++ ++ return (-1); + } + + /* 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 0000000000000000000000000000000000000000..c93191823d6e47acd56eb4deee50016c8f80e60b --- /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 0000000000000000000000000000000000000000..947e542a0437040483cfe182e3fc81637a63cdee --- /dev/null +++ b/net-analyzer/bsnmp/files/bsnmpd.init @@ -0,0 +1,11 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 0000000000000000000000000000000000000000..26f9f1aeb1636fb9d540dfb3c4fd313fc28046bf --- /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" + diff --git a/net-analyzer/bsnmp/files/werror.patch b/net-analyzer/bsnmp/files/werror.patch new file mode 100644 index 0000000000000000000000000000000000000000..7a0968e84441ffea65d49e6011829f153bc2f18f --- /dev/null +++ b/net-analyzer/bsnmp/files/werror.patch @@ -0,0 +1,11 @@ +--- bsnmp-1.12/config/Makefile.pre.old 2012-04-26 10:45:58.000000000 -0400 ++++ bsnmp-1.12/config/Makefile.pre 2012-04-26 10:46:11.000000000 -0400 +@@ -53,7 +53,7 @@ + # Assume a Posix-ish make that passes MAKEFLAGS in the environment. + SUBMAKE= $(MAKE) --no-print-directory + +-WARNS= -Wsystem-headers -Werror -Wall -Wno-format-y2k -W \ ++WARNS= -Wsystem-headers -Wall -Wno-format-y2k -W \ + -Wstrict-prototypes -Wmissing-prototypes \ + -Wpointer-arith -Wreturn-type -Wcast-qual \ + -Wwrite-strings -Wswitch -Wshadow -Wcast-align \ diff --git a/net-analyzer/bsnmp/metadata.xml b/net-analyzer/bsnmp/metadata.xml new file mode 100644 index 0000000000000000000000000000000000000000..6f49eba8f49693023f393161560b3a2d9e2717c5 --- /dev/null +++ b/net-analyzer/bsnmp/metadata.xml @@ -0,0 +1,5 @@ + + + + +