Skip to content

Commit

Permalink
net-mgmt/net-snmp: Update to 5.9.4
Browse files Browse the repository at this point in the history
PR:		277436
Submitted by:	Ivan Rozhuk <rozhuk.im@gmail.com>
  • Loading branch information
zi0r committed Mar 4, 2024
1 parent 2e3d320 commit 647eff0
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 91 deletions.
15 changes: 7 additions & 8 deletions net-mgmt/net-snmp/Makefile
@@ -1,6 +1,5 @@
PORTNAME= snmp
PORTVERSION= 5.9.1
PORTREVISION= 5
PORTVERSION= 5.9.4
PORTEPOCH= 1
CATEGORIES= net-mgmt
MASTER_SITES= SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION} \
Expand Down Expand Up @@ -37,15 +36,11 @@ NEWSYSLOG_DESC= Automatically rotate snmpd.log via newsyslog
NOLIBPKG_DESC= Build without libpkg
SCTP_DESC= Build with SCTP MIB support

MAKE_JOBS_UNSAFE= yes

PORTSCOUT= skipv:5.7.2.1

GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
USES= cpe libtool perl5 ssl
USE_RC_SUBR= snmpd snmptrapd
USE_LDCONFIG= yes
USES= cpe libtool perl5 ssl
CPE_PRODUCT= net-snmp
USE_PERL5= build run
USE_CSTD= c99
Expand Down Expand Up @@ -147,7 +142,7 @@ CONFIGURE_ARGS+=--without-root-access
.endif

SHLIB_VERSION= 40
SHLIB_VERSION2= .1.0
SHLIB_VERSION2= .2.1
PLIST_SUB+= SHLIB_VERSION=${SHLIB_VERSION} SHLIB_VERSION2=${SHLIB_VERSION2}
SCRIPTS_SUB= PREFIX=${PREFIX} PERL=${PERL}

Expand Down Expand Up @@ -275,6 +270,10 @@ post-configure:
s!^.*#undef.*(HAVE_${hdr:tu:S/./_/g:S/\//_/g}).*$$!#define \1 1!g' \
${WRKSRC}/include/net-snmp/net-snmp-config.h
.endfor
# Fix after:
# https://github.com/net-snmp/net-snmp/commit/923cb442bbef360de227fbca565710518b5ee8e5
@${REINPLACE_CMD} -e 's|snmpIPv6BaseDomain.h snmpIPBaseDomain.h|snmpIPv6BaseDomain.h|g' \
${WRKSRC}/snmplib/Makefile
.if ${PORT_OPTIONS:MPYTHON}
@(cd ${WRKSRC}/python; \
${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} setopt -c bdist_egg \
Expand Down
6 changes: 3 additions & 3 deletions net-mgmt/net-snmp/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1651857991
SHA256 (net-snmp-5.9.1.tar.gz) = eb7fd4a44de6cddbffd9a92a85ad1309e5c1054fb9d5a7dd93079c8953f48c3f
SIZE (net-snmp-5.9.1.tar.gz) = 6711774
TIMESTAMP = 1709374659
SHA256 (net-snmp-5.9.4.tar.gz) = 8b4de01391e74e3c7014beb43961a2d6d6fa03acc34280b9585f4930745b0544
SIZE (net-snmp-5.9.4.tar.gz) = 6681606
8 changes: 4 additions & 4 deletions net-mgmt/net-snmp/files/patch-Makefile.in
@@ -1,6 +1,6 @@
--- Makefile.in.orig 2021-05-25 15:19:35.000000000 -0700
+++ Makefile.in 2023-09-05 01:13:06.391986000 -0700
@@ -21,7 +21,7 @@
--- Makefile.in.orig 2023-08-15 20:32:01 UTC
+++ Makefile.in
@@ -21,7 +21,7 @@ INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi
darwin.h dragonfly.h dynix.h \
freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h \
freebsd7.h freebsd8.h freebsd9.h freebsd10.h freebsd11.h \
Expand All @@ -9,7 +9,7 @@
generic.h \
hpux.h irix.h kfreebsd.h linux.h mingw32.h mingw32msvc.h mips.h \
netbsd.h nto-qnx6.h osf5.h \
@@ -234,7 +234,7 @@
@@ -234,7 +234,7 @@ pythoninstall:
fi

pythoninstall:
Expand Down
@@ -1,6 +1,6 @@
--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2015-02-20 14:44:47 UTC
--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2023-08-15 20:32:01 UTC
+++ agent/mibgroup/hardware/memory/memory_freebsd.c
@@ -163,7 +163,7 @@ int netsnmp_mem_arch_load( netsnmp_cache
@@ -164,7 +164,7 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void
if (!mem->descr)
mem->descr = strdup("Cached memory");
mem->units = pagesize;
Expand Down
@@ -1,5 +1,5 @@
--- agent/mibgroup/ip-mib/data_access/scalars_sysctl.c.orig 2021-05-25 15:19:35.000000000 -0700
+++ agent/mibgroup/ip-mib/data_access/scalars_sysctl.c 2022-09-27 20:25:15.687146000 -0700
--- agent/mibgroup/ip-mib/data_access/scalars_sysctl.c.orig 2023-08-15 20:32:01 UTC
+++ agent/mibgroup/ip-mib/data_access/scalars_sysctl.c
@@ -9,6 +9,7 @@
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include <net-snmp/data_access/ip_scalars.h>
Expand Down
6 changes: 3 additions & 3 deletions net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_ip.c
@@ -1,5 +1,5 @@
--- agent/mibgroup/mibII/ip.c.orig 2021-05-25 15:19:35.000000000 -0700
+++ agent/mibgroup/mibII/ip.c 2022-09-27 20:25:12.959145000 -0700
--- agent/mibgroup/mibII/ip.c.orig 2023-08-15 20:32:01 UTC
+++ agent/mibgroup/mibII/ip.c
@@ -5,6 +5,13 @@

#include <net-snmp/net-snmp-config.h>
Expand All @@ -12,5 +12,5 @@
+#define PR_FASTHZ 5 /* 5 fast timeouts per second */
+#endif

#if HAVE_SYS_HASHING_H
#ifdef HAVE_SYS_HASHING_H
#include <sys/hashing.h>
6 changes: 3 additions & 3 deletions net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c
@@ -1,5 +1,5 @@
--- agent/mibgroup/mibII/tcp.c.orig 2021-05-25 15:19:35.000000000 -0700
+++ agent/mibgroup/mibII/tcp.c 2022-09-27 20:36:22.284180000 -0700
--- agent/mibgroup/mibII/tcp.c.orig 2023-08-15 20:32:01 UTC
+++ agent/mibgroup/mibII/tcp.c
@@ -8,6 +8,14 @@
#include <net-snmp/net-snmp-features.h>
#include "mibII_common.h"
Expand All @@ -12,6 +12,6 @@
+#define PR_FASTHZ 5 /* 5 fast timeouts per second */
+#endif
+
#if HAVE_STDLIB_H
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
@@ -1,6 +1,6 @@
--- /dev/null 2023-09-03 22:25:19.482823000 -0700
+++ include/net-snmp/system/freebsd15.h 2023-09-03 22:24:08.956666000 -0700
--- include/net-snmp/system/freebsd15.h.orig 2024-03-02 16:01:17 UTC
+++ include/net-snmp/system/freebsd15.h
@@ -0,0 +1,3 @@
+/* freebsd15 is a superset of freebsd14 */
+#include "freebsd14.h"
+#define freebsd14 freebsd14
+/* freebsd14 is a superset of freebsd13 */
+#include "freebsd13.h"
+#define freebsd13 freebsd13
14 changes: 3 additions & 11 deletions net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in
@@ -1,19 +1,11 @@
--- net-snmp-create-v3-user.in.orig 2021-05-25 22:19:35 UTC
--- net-snmp-create-v3-user.in.orig 2023-08-15 20:32:01 UTC
+++ net-snmp-create-v3-user.in
@@ -3,7 +3,7 @@
# this shell script is designed to add new SNMPv3 users
# to Net-SNMP config file.

-if @PSCMD@ | egrep ' snmpd *$' > /dev/null 2>&1 ; then
-if @PSCMD@ | @EGREP@ ' snmpd *$' > /dev/null 2>&1 ; then
+if @PSCMD@ -J 0 | egrep ' snmpd *$' > /dev/null 2>&1 ; then
echo "Apparently at least one snmpd demon is already running."
echo "Apparently at least one snmpd daemon is already running."
echo "You must stop them in order to use this command."
exit 1
@@ -135,6 +135,7 @@ if test ! -d "$outfile"; then
fi
echo "$line" >> "$outfile"
# Avoid that configure complains that this script ignores @datarootdir@
+datarootdir="@datarootdir@"
echo "@datarootdir@" >/dev/null
outfile="@datadir@/snmp/snmpd.conf"
line="$token $user"

0 comments on commit 647eff0

Please sign in to comment.