diff --git a/net/mini_snmpd/Makefile b/net/mini_snmpd/Makefile index c6647c7267c12..d2192097b04ce 100644 --- a/net/mini_snmpd/Makefile +++ b/net/mini_snmpd/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mini_snmpd -PKG_VERSION:=1.6 -PKG_RELEASE:=5 +PKG_VERSION:=2.0 +PKG_RELEASE:=1 PKG_MAINTAINER:=Marcin Jurkowski PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING @@ -18,9 +18,9 @@ PKG_CPE_ID:=cpe:/a:minisnmpd_project:minisnmpd PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/troglobit/mini-snmpd PKG_SOURCE_SUBDIR:=mini-snmpd-$(PKG_VERSION) -PKG_SOURCE_VERSION:=45765e39d52469fd2b5ec5cfb78e042f437c0df4 +PKG_SOURCE_VERSION:=dba5d0cee40a29d109dbf2f64853651cf6ec79e4 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/mini-snmpd-$(PKG_VERSION) -PKG_MIRROR_HASH:=580eb4bc45a86d9827df505813ec0cf47ba836261d27e8e4b5ca5e0e1581c255 +PKG_MIRROR_HASH:=16104e50a36ba193142252e5cfd0a6c3fec391ae651dfde40fb4da83226e0d28 PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 diff --git a/net/mini_snmpd/files/mini_snmpd.init b/net/mini_snmpd/files/mini_snmpd.init index 0c4f2a9b91767..afb8c74161b0d 100644 --- a/net/mini_snmpd/files/mini_snmpd.init +++ b/net/mini_snmpd/files/mini_snmpd.init @@ -219,8 +219,11 @@ start_instance() { append_arg "-V" "$vendor_oid" append_arg "-t" $mib_timeout - [ "$ipv6" = 1 ] && procd_append_param command "-6" - [ "$debug" = 1 ] && procd_append_param command "-v" + if "$PROG" -h 2>&1 | grep -q -- '--use-ipv4'; then + [ "$ipv6" = 0 ] && procd_append_param command "-4" + [ "$ipv6" = 1 ] && procd_append_param command "-6" + fi + [ "$debug" = 1 ] && procd_append_param command "-l" "debug" # uci_validate_section() aka /sbin/validate_data can only cast default values not defined in /etc/config/* to string # e.g. ="1" however it sets bools defined in /etc/config/* to =1 / =0 [ "$auth" = 1 -o "$auth" = "1" ] && procd_append_param command "-a" diff --git a/net/mini_snmpd/patches/0001-make-MAX_NR_INTERFACES-configurable.patch b/net/mini_snmpd/patches/0001-make-MAX_NR_INTERFACES-configurable.patch deleted file mode 100644 index c7cc31f9f69d8..0000000000000 --- a/net/mini_snmpd/patches/0001-make-MAX_NR_INTERFACES-configurable.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 60e685bd74bca45a4be9528d97f5a2edcc954e7f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= -Date: Thu, 22 Sep 2022 11:49:42 +0200 -Subject: [PATCH] make MAX_NR_INTERFACES configurable -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Bjørn Mork ---- - configure.ac | 9 +++++++++ - mini-snmpd.h | 1 - - 2 files changed, 9 insertions(+), 1 deletion(-) - ---- a/configure.ac -+++ b/configure.ac -@@ -40,6 +40,10 @@ AC_ARG_WITH(systemd, - [AS_HELP_STRING([--with-systemd=DIR], [Directory for systemd service files])],, - [with_systemd=auto]) - -+AC_ARG_WITH(interfaces, -+ AS_HELP_STRING([--with-interfaces=NUM], [Support NUM interfaces, default: 8]), -+ [with_interfaces=$withval], [with_interfaces="8"]) -+ - AC_ARG_ENABLE(debug, - AS_HELP_STRING([--enable-debug], [Enable developer debug mode, disabled by default]), - [enable_debug=$enableval], [enable_debug=no]) -@@ -56,6 +60,7 @@ AC_ARG_ENABLE(ethtool, - AS_HELP_STRING([--enable-ethtool], [Enable ethtool interface stats, disabled by default]), - [enable_ethtool=$enableval], [enable_ethtool=no]) - -+ - ### Enable features ########################################################################### - AS_IF([test "x$with_vendor" != "xno"],[ - AS_IF([test "x$vendor" = "xyes"],[ -@@ -69,6 +74,8 @@ AS_IF([test "x$with_config" != "xno"], [ - PKG_CHECK_MODULES([confuse], [libconfuse >= 2.7])]) - AM_CONDITIONAL([HAVE_CONFUSE], [test "x$with_config" != "xno"]) - -+AC_DEFINE_UNQUOTED(MAX_NR_INTERFACES, $with_interfaces, [Max Number of Interfaces]) -+ - AS_IF([test "x$enable_debug" = "xyes"],[ - AC_DEFINE(DEBUG, 1, [Define to enable debug mode.])]) - -@@ -81,6 +88,7 @@ AS_IF([test "x$enable_ipv6" != "xno"],[ - AS_IF([test "x$enable_ethtool" != "xno"],[ - AC_DEFINE(CONFIG_ENABLE_ETHTOOL, 1, [Define to enable ethtool stats.])]) - -+ - # Check where to install the systemd .service file - AS_IF([test "x$with_systemd" = "xyes" -o "x$with_systemd" = "xauto"], [ - def_systemd=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) -@@ -129,6 +137,7 @@ cat <