Changeset - 45ab1f5cf51c
[Not reviewed]
0 0 10
Chel Sea (chain) - 3 years ago 2021-04-22 23:45:05
chain@rpgfiction.net
add last-rited version of net-analyzer/bsnmp to tree
10 files changed with 293 insertions and 0 deletions:
0 comments (0 inline, 0 general)
net-analyzer/bsnmp/Manifest
Show inline comments
 
new file 100644
 
DIST bsnmp-1.11a.tar.gz 408165 BLAKE2B 11240fddb1b449927749baddc0c6a6e0d03c85a51fe6f3901e0b915f6060743875224de319c652f5aa70ed5f0a6d2a4ecea059a5d4d4441dff409bfa9be9a1bd SHA512 8b3695a147b5a3c012509f73c0627c8f7b66d99c54c53636d2add2d3427acf331bc4168ee88b8cad2536c1a15901fc38c4acd51e7630c48f4972504d94e8dc08
 
DIST bsnmp-1.12.tar.gz 418653 BLAKE2B 87ec6325b2daade01ed46e6c1b5bdccaef310065e00a82b947c33d7451ec5485faa34d88b7371cb114fd4e70eee4746cb13ffaed2586bd35ed581883e1f748c3 SHA512 c2c292e21632ea475d30aafaf7f66566389bccabfd20886a27bc4af98dba24139568c0eaddd36710655abac9ca6a38525136e06f2cf7be8b9db8ca656b2021c9
net-analyzer/bsnmp/bsnmp-1.11a.ebuild
Show inline comments
 
new file 100644
 
# 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"
 
}
net-analyzer/bsnmp/bsnmp-1.12-r1.ebuild
Show inline comments
 
new file 100644
 
# 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
 
}
net-analyzer/bsnmp/bsnmp-1.12.ebuild
Show inline comments
 
new file 100644
 
# 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"
 
}
net-analyzer/bsnmp/files/bsnmp-1.10-gcc34.patch
Show inline comments
 
new file 100644
 
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);
 
 }
 
 
 
 /*
net-analyzer/bsnmp/files/bsnmp-1.12-mibII.patch
Show inline comments
 
new file 100644
 
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
net-analyzer/bsnmp/files/bsnmpd.init
Show inline comments
 
new file 100644
 
#!/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
 
}
net-analyzer/bsnmp/files/snmpd.config
Show inline comments
 
new file 100644
 
# $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"
 

	
net-analyzer/bsnmp/files/werror.patch
Show inline comments
 
new file 100644
 
--- 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		\
net-analyzer/bsnmp/metadata.xml
Show inline comments
 
new file 100644
 
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 
<pkgmetadata>
 
<!-- maintainer-needed -->
 
</pkgmetadata>
0 comments (0 inline, 0 general)