diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-07-01 04:58:03 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-07-01 04:58:03 +0000 |
commit | 76400556d9e8a5dedc692487c13b76a541813a23 (patch) | |
tree | fb8b06b7dea0e79577a77e3748ed551d9ac1b34b /testing/net-snmp | |
parent | 64e72407414ce0badfb541782125cd8e3a25c12e (diff) |
Fri Jul 1 04:58:02 UTC 2011
Diffstat (limited to 'testing/net-snmp')
-rw-r--r-- | testing/net-snmp/PKGBUILD | 43 | ||||
-rw-r--r-- | testing/net-snmp/libnl-2.patch | 67 | ||||
-rw-r--r-- | testing/net-snmp/snmpd.rc | 38 |
3 files changed, 0 insertions, 148 deletions
diff --git a/testing/net-snmp/PKGBUILD b/testing/net-snmp/PKGBUILD deleted file mode 100644 index 42faa88a3..000000000 --- a/testing/net-snmp/PKGBUILD +++ /dev/null @@ -1,43 +0,0 @@ -# $Id: PKGBUILD 125239 2011-05-25 19:13:43Z foutrelis $ -# Maintainer: Eric Belanger <eric@archlinux.org> -# Contributor: Dale Blount <dale@archlinux.org> - -pkgname=net-snmp -pkgver=5.6.1 -pkgrel=2 -pkgdesc="A suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6" -arch=('i686' 'x86_64') -url="http://www.net-snmp.org/" -license=('custom') -depends=('openssl' 'tcp_wrappers' 'libnl') -makedepends=('setuptools') -optdepends=('perl-term-readkey: for snmpcheck application' - 'perl-tk: for snmpcheck and tkmib applications' - 'python2: for the python modules') -provides=('ucd-snmp') -options=('!libtool' '!makeflags' '!emptydirs') -source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz" - 'snmpd.rc') -md5sums=('b4e30ead5783b0bb1d280172c6095ea4' - '9f0d13676ba1fae1eb7eb178edd85b43') -sha1sums=('45bbf1295253d5379a5d1efd918593160387fd00' '2c679b564a2c319d9ce2714a9776aa0e6d89c60a') - -build() { - cd "${srcdir}/${pkgname}-${pkgver}" - sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${pkgdir}':" Makefile.in - ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \ - --enable-ucd-snmp-compatibility --enable-ipv6 --with-libwrap --with-python-modules \ - --with-default-snmp-version="3" --with-sys-contact="root@localhost" \ - --with-sys-location="Unknown" --with-logfile="/var/log/snmpd.log" \ - --with-mib-modules="host misc/ipfwacc ucd-snmp/diskio tunnel ucd-snmp/dlmod" \ - --with-persistent-directory="/var/net-snmp" \ - PYTHONPROG=/usr/bin/python2 - make NETSNMP_DONT_CHECK_VERSION=1 LDFLAGS+="-Wl,-rpath -Wl,/usr/lib/perl5/core_perl/CORE" -} - -package() { - cd "${srcdir}/${pkgname}-${pkgver}" - make DESTDIR="${pkgdir}" INSTALL_PREFIX="${pkgdir}" INSTALLDIRS=vendor install - install -D -m755 "${srcdir}/snmpd.rc" "${pkgdir}/etc/rc.d/snmpd" - install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" -} diff --git a/testing/net-snmp/libnl-2.patch b/testing/net-snmp/libnl-2.patch deleted file mode 100644 index 7c140fe83..000000000 --- a/testing/net-snmp/libnl-2.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff -Nur net-snmp-5.5.orig//agent/mibgroup/mibII/tcpTable.c net-snmp-5.5//agent/mibgroup/mibII/tcpTable.c ---- net-snmp-5.5.orig//agent/mibgroup/mibII/tcpTable.c 2009-06-13 04:02:02.000000000 +0200 -+++ net-snmp-5.5//agent/mibgroup/mibII/tcpTable.c 2011-01-15 10:31:03.579735957 +0100 -@@ -555,8 +555,10 @@ - static int - tcpTable_load_netlink() - { -+ int err; -+ - /* TODO: perhaps use permanent nl handle? */ -- struct nl_handle *nl = nl_handle_alloc(); -+ struct nl_sock *nl = nl_socket_alloc(); - - if (nl == NULL) { - DEBUGMSGTL(("mibII/tcpTable", "Failed to allocate netlink handle\n")); -@@ -564,10 +566,10 @@ - return -1; - } - -- if (nl_connect(nl, NETLINK_INET_DIAG) < 0) { -- DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror())); -- snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror()); -- nl_handle_destroy(nl); -+ if ((err = nl_connect(nl, NETLINK_INET_DIAG)) < 0) { -+ DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror(err))); -+ snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror(err)); -+ nl_socket_free(nl); - return -1; - } - -@@ -579,10 +581,10 @@ - struct nl_msg *nm = nlmsg_alloc_simple(TCPDIAG_GETSOCK, NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST); - nlmsg_append(nm, &req, sizeof(struct inet_diag_req), 0); - -- if (nl_send_auto_complete(nl, nm) < 0) { -- DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror())); -- snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror()); -- nl_handle_destroy(nl); -+ if ((err = nl_send_auto_complete(nl, nm)) < 0) { -+ DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror(err))); -+ snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror(err)); -+ nl_socket_free(nl); - return -1; - } - nlmsg_free(nm); -@@ -593,9 +595,9 @@ - - while (running) { - if ((len = nl_recv(nl, &peer, &buf, NULL)) <= 0) { -- DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror())); -- snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror()); -- nl_handle_destroy(nl); -+ DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror(len))); -+ snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror(len)); -+ nl_socket_free(nl); - return -1; - } - -@@ -644,7 +646,7 @@ - free(buf); - } - -- nl_handle_destroy(nl); -+ nl_socket_free(nl); - - if (tcp_head) { - DEBUGMSGTL(("mibII/tcpTable", "Loaded TCP Table using netlink\n")); diff --git a/testing/net-snmp/snmpd.rc b/testing/net-snmp/snmpd.rc deleted file mode 100644 index 9f1b83f64..000000000 --- a/testing/net-snmp/snmpd.rc +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pidof -o %PPID /usr/sbin/snmpd` -case "$1" in - start) - stat_busy "Starting Net-SNMP" - [ -z "$PID" ] && /usr/sbin/snmpd - if [ $? -gt 0 ]; then - stat_fail - else - echo $PID > /var/run/snmpd.pid - add_daemon snmpd - stat_done - fi - ;; - stop) - stat_busy "Stopping Net-SNMP" - [ ! -z "$PID" ] && kill $PID &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm /var/run/snmpd.pid - rm_daemon snmpd - stat_done - fi - ;; - restart) - $0 stop - sleep 2 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 |