summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Krier <cedk@gentoo.org>2006-11-26 21:37:22 +0000
committerCédric Krier <cedk@gentoo.org>2006-11-26 21:37:22 +0000
commitf00d9cfff0a3660f0a1403de1d2087e7eb02accd (patch)
treecaa702c279b9e2344677ddd9f0a4e3a5dde8dbe7 /net-analyzer/net-snmp
parentStable on ppc64 (diff)
downloadgentoo-2-f00d9cfff0a3660f0a1403de1d2087e7eb02accd.tar.gz
gentoo-2-f00d9cfff0a3660f0a1403de1d2087e7eb02accd.tar.bz2
gentoo-2-f00d9cfff0a3660f0a1403de1d2087e7eb02accd.zip
Version bump
(Portage version: 2.1.1-r1)
Diffstat (limited to 'net-analyzer/net-snmp')
-rw-r--r--net-analyzer/net-snmp/ChangeLog9
-rw-r--r--net-analyzer/net-snmp/files/digest-net-snmp-5.43
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.4-makefile.patch20
-rw-r--r--net-analyzer/net-snmp/files/snmpd.conf17
-rw-r--r--net-analyzer/net-snmp/files/snmpd.rc730
-rw-r--r--net-analyzer/net-snmp/files/snmptrapd.rc722
-rw-r--r--net-analyzer/net-snmp/net-snmp-5.4.ebuild175
7 files changed, 275 insertions, 1 deletions
diff --git a/net-analyzer/net-snmp/ChangeLog b/net-analyzer/net-snmp/ChangeLog
index 9a6bc65464d6..6eb5d2200d33 100644
--- a/net-analyzer/net-snmp/ChangeLog
+++ b/net-analyzer/net-snmp/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-analyzer/net-snmp
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.139 2006/10/23 13:04:29 mattm Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.140 2006/11/26 21:37:22 cedk Exp $
+
+*net-snmp-5.4 (26 Nov 2006)
+
+ 26 Nov 2006; Cedric Krier <cedk@gentoo.org>
+ +files/net-snmp-5.4-makefile.patch, +files/snmpd.conf, +files/snmpd.rc7,
+ +files/snmptrapd.rc7, +net-snmp-5.4.ebuild:
+ Version bump
*net-snmp-5.3.1-r1 (23 Oct 2006)
diff --git a/net-analyzer/net-snmp/files/digest-net-snmp-5.4 b/net-analyzer/net-snmp/files/digest-net-snmp-5.4
new file mode 100644
index 000000000000..2141580dd27e
--- /dev/null
+++ b/net-analyzer/net-snmp/files/digest-net-snmp-5.4
@@ -0,0 +1,3 @@
+MD5 46d893281056ff476e597659cb91574d net-snmp-5.4.tar.gz 5031685
+RMD160 8ad1f9a3def8022eea48d9b74ae71d8efb59ca61 net-snmp-5.4.tar.gz 5031685
+SHA256 2f43cd6f3c4066f8c17fdc47931a96c1fce808c9d1dd74bcb5a79d9d29d5f947 net-snmp-5.4.tar.gz 5031685
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.4-makefile.patch b/net-analyzer/net-snmp/files/net-snmp-5.4-makefile.patch
new file mode 100644
index 000000000000..7b7ba127c110
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.4-makefile.patch
@@ -0,0 +1,20 @@
+diff -ru net-snmp-5.4~/agent/mibgroup/Makefile.in net-snmp-5.4/agent/mibgroup/Makefile.in
+--- net-snmp-5.4~/agent/mibgroup/Makefile.in 2006-11-26 16:43:18.000000000 +0100
++++ net-snmp-5.4/agent/mibgroup/Makefile.in 2006-11-26 16:44:49.000000000 +0100
+@@ -22,9 +22,13 @@
+ .c.o:
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+
+-OBJS = @mib_module_list_o@
+-LOBJS = @mib_module_list_lo@
+-SRCS = @mib_module_list_c@
++@mib_module_list_o@
++@mib_module_list_lo@
++@mib_module_list_c@
++
++OBJS = $(mib_module_list_o)
++LOBJS = $(mib_module_list_lo)
++SRCS = $(mib_module_list_c)
+
+ all: standardall $(LOBJS)
+
diff --git a/net-analyzer/net-snmp/files/snmpd.conf b/net-analyzer/net-snmp/files/snmpd.conf
new file mode 100644
index 000000000000..97a1d7052661
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmpd.conf
@@ -0,0 +1,17 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd.conf,v 1.8 2006/11/26 21:37:22 cedk Exp $
+
+# Initial (empty) options.
+SNMPD_FLAGS=""
+
+# Enable connection logging.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -a"
+
+# Enable syslog and disable file log.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -Lsd -Lf /dev/null"
+
+# Enable agentx socket as /var/agentx/master
+# *NOTE* Before uncommenting this, make sure
+# the /var/agentx directory exists.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -x /var/agentx/master"
diff --git a/net-analyzer/net-snmp/files/snmpd.rc7 b/net-analyzer/net-snmp/files/snmpd.rc7
new file mode 100644
index 000000000000..11329bd75185
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmpd.rc7
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd.rc7,v 1.1 2006/11/26 21:37:22 cedk Exp $
+
+depend() {
+ use logger
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/snmp/snmpd.conf ] ; then
+ eerror "You need an /etc/snmp/snmpd.conf config file to run snmpd"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting net-snmpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/snmpd \
+ -- -p /var/run/snmpd.pid ${SNMPD_FLAGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping net-snmpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/snmpd.pid
+ eend $?
+}
diff --git a/net-analyzer/net-snmp/files/snmptrapd.rc7 b/net-analyzer/net-snmp/files/snmptrapd.rc7
new file mode 100644
index 000000000000..585675b4309e
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmptrapd.rc7
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmptrapd.rc7,v 1.1 2006/11/26 21:37:22 cedk Exp $
+
+depend() {
+ use logger
+ need net
+}
+
+start() {
+ ebegin "Starting snmptrapd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/snmptrapd \
+ -- -p /var/run/snmptrapd.pid ${SNMPTRAPD_FLAGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping snmptrapd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/snmptrapd.pid
+ eend $?
+}
diff --git a/net-analyzer/net-snmp/net-snmp-5.4.ebuild b/net-analyzer/net-snmp/net-snmp-5.4.ebuild
new file mode 100644
index 000000000000..37c4e27f7e8b
--- /dev/null
+++ b/net-analyzer/net-snmp/net-snmp-5.4.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.ebuild,v 1.1 2006/11/26 21:37:22 cedk Exp $
+
+inherit fixheadtails flag-o-matic perl-module
+
+DESCRIPTION="Software for generating and retrieving SNMP data"
+HOMEPAGE="http://net-snmp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="as-is BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="diskio doc elf ipv6 lm_sensors mfd-rewrites minimal perl rpm selinux smux
+ssl tcpd X sendmail"
+
+DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ rpm? ( app-arch/rpm
+ dev-libs/popt
+ app-arch/bzip2
+ >=sys-libs/zlib-1.1.4
+ )
+ elf? ( dev-libs/elfutils )
+ lm_sensors? ( sys-apps/lm_sensors )"
+
+RDEPEND="${DEPEND}
+ perl? (
+ X? ( dev-perl/perl-tk )
+ !minimal? ( dev-perl/TermReadKey )
+ )
+ selinux? ( sec-policy/selinux-snmpd )"
+
+DEPEND="${DEPEND}
+ >=sys-apps/sed-4
+ doc? ( app-doc/doxygen )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-makefile.patch
+
+# The lm_sensors patch has a memory leak
+# If you can help, please attach a patch to bug 109785
+
+# if use lm_sensors; then
+# if use x86 || use amd64; then
+# epatch "${FILESDIR}"/${PN}-lm_sensors.patch
+# else
+# eerror "Unfortunatly you are trying to enable lm_sensors support for an unsupported arch."
+# eerror "please check the availability of sys-apps/lm_sensors - if it is available on"
+# eerror "your arch, please file a bug about this."
+# die "lm_sensors patch error: unsupported arch."
+# fi
+# fi
+
+ # fix access violation in make check
+ sed -i -e 's/\(snmpd.*\)-Lf/\1-l/' testing/eval_tools.sh || \
+ die "sed eval_tools.sh failed"
+ # fix path in fixproc
+ sed -i -e 's|\(database_file =.*\)/local\(.*\)$|\1\2|' local/fixproc || \
+ die "sed fixproc failed"
+
+ ht_fix_all
+}
+
+src_compile() {
+ local mibs
+
+ strip-flags
+
+ # filter for bug #145960
+ # as it seems that the option is not enough
+ filter-ldflags -Wl,--as-needed
+
+ mibs="host ucd-snmp/dlmod"
+ use smux && mibs="${mibs} smux"
+ use sendmail && mibs="${mibs} mibII/mta_sendmail"
+ use lm_sensors && mibs="${mibs} ucd-snmp/lmSensors"
+ use diskio && mibs="${mibs} ucd-snmp/diskio"
+
+ econf \
+ --with-install-prefix="${D}" \
+ --with-sys-location="Unknown" \
+ --with-sys-contact="root@Unknown" \
+ --with-default-snmp-version="3" \
+ --with-mib-modules="${mibs}" \
+ --with-logfile="${ROOT}/var/log/net-snmpd.log" \
+ --with-persistent-directory="${ROOT}/var/lib/net-snmp" \
+ --enable-ucd-snmp-compatibility \
+ --enable-shared \
+ --enable-as-needed \
+ $(use_enable mfd-rewrites) \
+ $(use_enable perl embedded-perl) \
+ $(use_enable ipv6) \
+ $(use_enable !ssl internal-md5) \
+ $(use_with ssl openssl) \
+ $(use_with tcpd libwrap) \
+ $(use_with rpm) \
+ $(use_with rpm bzip2) \
+ $(use_with rpm zlib) \
+ $(use_with elf) \
+ || die "econf failed"
+
+ emake -j1 || die "emake failed"
+
+ if use perl ; then
+ emake perlmodules || die "compile perl modules problem"
+ fi
+
+ if use doc ; then
+ einfo "Building HTML Documentation"
+ make docsdox || die "failed to build docs"
+ fi
+}
+
+src_test() {
+ cd testing
+ if ! make test ; then
+ echo
+ einfo "Don't be alarmed if a few tests FAIL."
+ einfo "This could happen for several reasons:"
+ einfo " - You don't already have a working configuration."
+ einfo " - Your ethernet interface isn't properly configured."
+ echo
+ fi
+}
+
+src_install () {
+ make DESTDIR="${D}" install || die "make install failed"
+
+ if use perl ; then
+ make DESTDIR="${D}" perlinstall || die "make perlinstall failed"
+ fixlocalpod
+
+ use X || rm -f "${D}/usr/bin/tkmib"
+ else
+ rm -f "${D}/usr/bin/mib2c" "${D}/usr/bin/tkmib" "${D}/usr/bin/snmpcheck"
+ fi
+
+ dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
+ newdoc EXAMPLE.conf.def EXAMPLE.conf
+
+ use doc && dohtml docs/html/*
+
+ keepdir /etc/snmp /var/lib/net-snmp
+
+ newinitd "${FILESDIR}"/snmpd.rc7 snmpd
+ newconfd "${FILESDIR}"/snmpd.conf snmpd
+
+ newinitd "${FILESDIR}"/snmptrapd.rc7 snmptrapd
+ newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
+
+ # Remove everything, keeping only the snmpd, snmptrapd, MIBs, libs, and includes.
+ if use minimal; then
+ einfo "USE=minimal is set. Cleaning up excess cruft for a embedded/minimal/server only install."
+ rm -rf
+ "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,snmpcheck}}
+ rm -rf "${D}"/usr/share/snmp/snmpconf-data "${D}"/usr/share/snmp/*.conf
+ rm -rf "${D}"/usr/bin/{fixproc,traptoemail} "${D}"/usr/bin/snmpc{heck,onf}
+ find "${D}" -name '*.pl' -exec rm -f '{}' \;
+ use ipv6 || rm -rf "${D}"/usr/share/snmp/mibs/IPV6*
+ fi
+
+ # bug 113788, install example config
+ insinto /etc/snmp
+ newins "${S}"/EXAMPLE.conf snmpd.conf.example
+}
+
+pkg_postinst() {
+ einfo "An example configuration file has been installed in"
+ einfo "/etc/snmp/snmpd.conf.example."
+}
+