[arch-commits] Commit in net-snmp/repos/extra-i686 (6 files)

Eric Bélanger eric at archlinux.org
Sun Aug 21 12:34:39 UTC 2011


    Date: Sunday, August 21, 2011 @ 08:34:39
  Author: eric
Revision: 136008

archrelease: copy trunk to extra-i686

Added:
  net-snmp/repos/extra-i686/PKGBUILD
    (from rev 136007, net-snmp/trunk/PKGBUILD)
  net-snmp/repos/extra-i686/libnl-2.patch
    (from rev 136007, net-snmp/trunk/libnl-2.patch)
  net-snmp/repos/extra-i686/snmpd.rc
    (from rev 136007, net-snmp/trunk/snmpd.rc)
Deleted:
  net-snmp/repos/extra-i686/PKGBUILD
  net-snmp/repos/extra-i686/libnl-2.patch
  net-snmp/repos/extra-i686/snmpd.rc

---------------+
 PKGBUILD      |   97 ++++++++++++++++++++--------------------
 libnl-2.patch |  134 ++++++++++++++++++++++++++++----------------------------
 snmpd.rc      |   77 ++++++++++++++++----------------
 3 files changed, 155 insertions(+), 153 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2011-08-21 12:33:57 UTC (rev 136007)
+++ PKGBUILD	2011-08-21 12:34:39 UTC (rev 136008)
@@ -1,48 +0,0 @@
-# $Id$
-# Maintainer: Eric Belanger <eric at archlinux.org>
-# Contributor: Dale Blount <dale at archlinux.org>
-
-pkgname=net-snmp
-pkgver=5.6.1
-pkgrel=3
-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' '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/${pkgname}/${pkgname}-${pkgver}.tar.gz"
-        'snmpd.rc')
-md5sums=('b4e30ead5783b0bb1d280172c6095ea4'
-         '9f0d13676ba1fae1eb7eb178edd85b43')
-
-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-python-modules \
-    --with-default-snmp-version="3" \
-    --with-sys-contact="root at 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}/LICENSE"
-}

Copied: net-snmp/repos/extra-i686/PKGBUILD (from rev 136007, net-snmp/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2011-08-21 12:34:39 UTC (rev 136008)
@@ -0,0 +1,49 @@
+# $Id$
+# Maintainer: 
+# Contributor: Dale Blount <dale at archlinux.org>
+
+pkgname=net-snmp
+pkgver=5.6.1
+pkgrel=4
+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' 'libnl')
+makedepends=('python2-distribute')
+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/${pkgname}/${pkgname}-${pkgver}.tar.gz
+        snmpd.confd snmpd.rc)
+md5sums=('b4e30ead5783b0bb1d280172c6095ea4'
+         '37bc5db8707004fe284c202437c6aa7d'
+         'edab44a12f76045e41340d433a79dcec')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${pkgdir}':" Makefile.in
+  PYTHONPROG=/usr/bin/python2 ./configure --prefix=/usr \
+    --sysconfdir=/etc \
+    --mandir=/usr/share/man \
+    --enable-ucd-snmp-compatibility \
+    --enable-ipv6 \
+    --with-python-modules \
+    --with-default-snmp-version="3" \
+    --with-sys-contact="root at 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"
+  make NETSNMP_DONT_CHECK_VERSION=1
+}
+
+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 "${srcdir}/snmpd.confd" "${pkgdir}/etc/conf.d/snmpd"
+  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}

Deleted: libnl-2.patch
===================================================================
--- libnl-2.patch	2011-08-21 12:33:57 UTC (rev 136007)
+++ libnl-2.patch	2011-08-21 12:34:39 UTC (rev 136008)
@@ -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"));

Copied: net-snmp/repos/extra-i686/libnl-2.patch (from rev 136007, net-snmp/trunk/libnl-2.patch)
===================================================================
--- libnl-2.patch	                        (rev 0)
+++ libnl-2.patch	2011-08-21 12:34:39 UTC (rev 136008)
@@ -0,0 +1,67 @@
+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"));

Deleted: snmpd.rc
===================================================================
--- snmpd.rc	2011-08-21 12:33:57 UTC (rev 136007)
+++ snmpd.rc	2011-08-21 12:34:39 UTC (rev 136008)
@@ -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

Copied: net-snmp/repos/extra-i686/snmpd.rc (from rev 136007, net-snmp/trunk/snmpd.rc)
===================================================================
--- snmpd.rc	                        (rev 0)
+++ snmpd.rc	2011-08-21 12:34:39 UTC (rev 136008)
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/snmpd
+
+PID=`pidof -o %PPID /usr/sbin/snmpd`
+case "$1" in
+  start)
+    stat_busy "Starting Net-SNMP"
+    [ -z "$PID" ] && /usr/sbin/snmpd $SNMPD_ARGS
+    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




More information about the arch-commits mailing list