1 Commits

Author SHA256 Message Date
80fd200352 Sync changes to SLFO-1.2 branch 2025-08-20 09:54:21 +02:00
13 changed files with 442 additions and 44261 deletions

View File

@@ -1,4 +1,4 @@
libsnmp45
libsnmp40
net-snmp-devel
requires -net-snmp-<targettype>
requires "libsnmp45-<targettype> = <version>"
requires "libsnmp40-<targettype> = <version>"

View File

@@ -0,0 +1,402 @@
commit d047b54f874f392f97ffce8d51f49729e1c78225
Author: Alexander Bergmann <abergmann@suse.com>
Date: Fri Mar 10 15:23:35 2023 +0100
Create sub-function to parse source address and network mask
Function netsnmp_udp_resolve_source was introduced to handle the source
address and network mask parsing into in_addr structures.
diff --git a/snmplib/transports/snmpUDPDomain.c b/snmplib/transports/snmpUDPDomain.c
index 2724cf2191..3ad33d4bc5 100644
--- a/snmplib/transports/snmpUDPDomain.c
+++ b/snmplib/transports/snmpUDPDomain.c
@@ -98,6 +98,58 @@ netsnmp_udp_fmtaddr(netsnmp_transport *t, const void *data, int len)
return netsnmp_ipv4_fmtaddr("UDP", t, data, len);
}
+static int
+netsnmp_udp_resolve_source(char *source, struct in_addr *network,
+ struct in_addr *mask)
+{
+ /* Split the source/netmask parts */
+ char *strmask = strchr(source, '/');
+ if (strmask != NULL)
+ /* Mask given. */
+ *strmask++ = '\0';
+
+ /* Try interpreting as a dotted quad. */
+ if (inet_pton(AF_INET, source, network) == 0) {
+ /* Nope, wasn't a dotted quad. Must be a hostname. */
+ int ret = netsnmp_gethostbyname_v4(source, &(network->s_addr));
+ if (ret < 0) {
+ config_perror("cannot resolve source hostname");
+ return ret;
+ }
+ }
+
+ /* Now work out the mask. */
+ if (strmask == NULL || *strmask == '\0') {
+ /* No mask was given. Assume /32 */
+ mask->s_addr = (in_addr_t)(~0UL);
+ } else {
+ /* Try to interpret mask as a "number of 1 bits". */
+ char* cp;
+ long maskLen = strtol(strmask, &cp, 10);
+ if (*cp == '\0') {
+ if (0 < maskLen && maskLen <= 32)
+ mask->s_addr = htonl((in_addr_t)(~0UL << (32 - maskLen)));
+ else if (maskLen == 0)
+ mask->s_addr = 0;
+ else {
+ config_perror("bad mask length");
+ return -1;
+ }
+ }
+ /* Try to interpret mask as a dotted quad. */
+ else if (inet_pton(AF_INET, strmask, mask) == 0) {
+ config_perror("bad mask");
+ return -1;
+ }
+
+ /* Check that the network and mask are consistent. */
+ if (network->s_addr & ~mask->s_addr) {
+ config_perror("source/mask mismatch");
+ return -1;
+ }
+ }
+ return 0;
+}
#if defined(HAVE_IP_PKTINFO) || (defined(HAVE_IP_RECVDSTADDR) && defined(HAVE_IP_SENDSRCADDR))
@@ -375,52 +427,10 @@ netsnmp_udp_parse_security(const char *token, char *param)
negate = 0;
sourcep = source;
}
-
- /* Split the source/netmask parts */
- strmask = strchr(sourcep, '/');
- if (strmask != NULL)
- /* Mask given. */
- *strmask++ = '\0';
-
- /* Try interpreting as a dotted quad. */
- if (inet_pton(AF_INET, sourcep, &network) == 0) {
- /* Nope, wasn't a dotted quad. Must be a hostname. */
- int ret = netsnmp_gethostbyname_v4(sourcep, &network.s_addr);
- if (ret < 0) {
- config_perror("cannot resolve IPv4 source hostname");
- return;
- }
- }
-
- /* Now work out the mask. */
- if (strmask == NULL || *strmask == '\0') {
- /* No mask was given. Assume /32 */
- mask.s_addr = (in_addr_t)(~0UL);
- } else {
- /* Try to interpret mask as a "number of 1 bits". */
- char* cp;
- long maskLen = strtol(strmask, &cp, 10);
- if (*cp == '\0') {
- if (0 < maskLen && maskLen <= 32)
- mask.s_addr = htonl((in_addr_t)(~0UL << (32 - maskLen)));
- else if (0 == maskLen)
- mask.s_addr = 0;
- else {
- config_perror("bad mask length");
- return;
- }
- }
- /* Try to interpret mask as a dotted quad. */
- else if (inet_pton(AF_INET, strmask, &mask) == 0) {
- config_perror("bad mask");
- return;
- }
-
- /* Check that the network and mask are consistent. */
- if (network.s_addr & ~mask.s_addr) {
- config_perror("source/mask mismatch");
- return;
- }
+ /* Parse source address and network mask. */
+ if(netsnmp_udp_resolve_source(sourcep, &network, &mask)) {
+ config_perror("source address/network mask parsing issue");
+ return;
}
}
commit a2559914d8d8132f155a81c0852cbbd2090d2d40
Author: Alexander Bergmann <abergmann@suse.com>
Date: Fri Mar 10 15:25:10 2023 +0100
Create sub-function to check the com2SecEntry_create return code
The return code interpretation of the netsnmp_udp_com2SecEntry_create
function is now done inside a new sub-function.
diff --git a/snmplib/transports/snmpUDPDomain.c b/snmplib/transports/snmpUDPDomain.c
index 3ad33d4bc5..5904a1b423 100644
--- a/snmplib/transports/snmpUDPDomain.c
+++ b/snmplib/transports/snmpUDPDomain.c
@@ -346,6 +346,33 @@ netsnmp_udp_com2SecEntry_create(com2SecEntry **entryp, const char *community,
return C2SE_ERR_SUCCESS;
}
+void
+netsnmp_udp_com2SecEntry_check_return_code(int rc)
+{
+ /*
+ * Check return code of the newly created com2Sec entry.
+ */
+ switch(rc) {
+ case C2SE_ERR_SUCCESS:
+ break;
+ case C2SE_ERR_CONTEXT_TOO_LONG:
+ config_perror("context name too long");
+ break;
+ case C2SE_ERR_COMMUNITY_TOO_LONG:
+ config_perror("community name too long");
+ break;
+ case C2SE_ERR_SECNAME_TOO_LONG:
+ config_perror("security name too long");
+ break;
+ case C2SE_ERR_MASK_MISMATCH:
+ config_perror("source/mask mismatch");
+ break;
+ case C2SE_ERR_MISSING_ARG:
+ default:
+ config_perror("unexpected error; could not create com2SecEntry");
+ }
+}
+
void
netsnmp_udp_parse_security(const char *token, char *param)
{
@@ -440,25 +467,7 @@ netsnmp_udp_parse_security(const char *token, char *param)
*/
rc = netsnmp_udp_com2SecEntry_create(NULL, community, secName, contextName,
&network, &mask, negate);
- switch(rc) {
- case C2SE_ERR_SUCCESS:
- break;
- case C2SE_ERR_CONTEXT_TOO_LONG:
- config_perror("context name too long");
- break;
- case C2SE_ERR_COMMUNITY_TOO_LONG:
- config_perror("community name too long");
- break;
- case C2SE_ERR_SECNAME_TOO_LONG:
- config_perror("security name too long");
- break;
- case C2SE_ERR_MASK_MISMATCH:
- config_perror("source/mask mismatch");
- break;
- case C2SE_ERR_MISSING_ARG:
- default:
- config_perror("unexpected error; could not create com2SecEntry");
- }
+ netsnmp_udp_com2SecEntry_check_return_code(rc);
}
void
commit 20e2bb7d75c391f5cfde1eb8b8676aff68f3a5f5
Author: Alexander Bergmann <abergmann@suse.com>
Date: Fri Mar 10 15:31:41 2023 +0100
Add '@' netgroup functionality
Allow access control via netgroups defined in /etc/netgroup or NIS/LDAP
via the '@' sign inside the configuration file. Same as IP addresses and
host names.
diff --git a/configure b/configure
index 575b60c4d2..82414664cf 100755
--- a/configure
+++ b/configure
@@ -31221,6 +31221,12 @@ if test "x$ac_cv_func_closedir" = xyes
then :
printf "%s\n" "#define HAVE_CLOSEDIR 1" >>confdefs.h
+fi
+ac_fn_c_check_func "$LINENO" "endnetgrent" "ac_cv_func_endnetgrent"
+if test "x$ac_cv_func_endnetgrent" = xyes
+then :
+ printf "%s\n" "#define HAVE_ENDNETGRENT 1" >>confdefs.h
+
fi
ac_fn_c_check_func "$LINENO" "fgetc_unlocked" "ac_cv_func_fgetc_unlocked"
if test "x$ac_cv_func_fgetc_unlocked" = xyes
@@ -31257,6 +31263,12 @@ if test "x$ac_cv_func_getlogin" = xyes
then :
printf "%s\n" "#define HAVE_GETLOGIN 1" >>confdefs.h
+fi
+ac_fn_c_check_func "$LINENO" "getnetgrent" "ac_cv_func_getnetgrent"
+if test "x$ac_cv_func_getnetgrent" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETNETGRENT 1" >>confdefs.h
+
fi
ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
if test "x$ac_cv_func_if_nametoindex" = xyes
@@ -31305,6 +31317,12 @@ if test "x$ac_cv_func_setlocale" = xyes
then :
printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h
+fi
+ac_fn_c_check_func "$LINENO" "setnetgrent" "ac_cv_func_setnetgrent"
+if test "x$ac_cv_func_setnetgrent" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETNETGRENT 1" >>confdefs.h
+
fi
ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
if test "x$ac_cv_func_setsid" = xyes
diff --git a/configure.d/config_os_functions b/configure.d/config_os_functions
index b921f8cd7b..0915928e21 100644
--- a/configure.d/config_os_functions
+++ b/configure.d/config_os_functions
@@ -25,12 +25,14 @@ AC_TYPE_SIGNAL
AC_CHECK_FUNCS([rand random srand srandom lrand48 srand48])
# Library:
-AC_CHECK_FUNCS([asprintf closedir fgetc_unlocked ] dnl
+AC_CHECK_FUNCS([asprintf closedir endnetgrent ] dnl
+ [fgetc_unlocked ] dnl
[flockfile funlockfile getipnodebyname ] dnl
- [gettimeofday getlogin ] dnl
+ [gettimeofday getlogin getnetgrent ] dnl
[if_nametoindex mkstemp ] dnl
[opendir readdir regcomp ] dnl
[setenv setitimer setlocale ] dnl
+ [setnetgrent ] dnl
[setsid snprintf strcasestr ] dnl
[strdup strerror strncasecmp ] dnl
[sysconf times vsnprintf ] )
diff --git a/include/net-snmp/net-snmp-config.h.in b/include/net-snmp/net-snmp-config.h.in
index 89b2ca116d..5efbf12400 100644
--- a/include/net-snmp/net-snmp-config.h.in
+++ b/include/net-snmp/net-snmp-config.h.in
@@ -183,6 +183,9 @@
/* Define to 1 if you have the `endfsent' function. */
#undef HAVE_ENDFSENT
+/* Define to 1 if you have the `endnetgrent' function. */
+#undef HAVE_ENDNETGRENT
+
/* Define to 1 if you have the `ERR_get_error_all' function. */
#undef HAVE_ERR_GET_ERROR_ALL
@@ -294,6 +297,9 @@
/* Define to 1 if you have the `getmntinfo' function. */
#undef HAVE_GETMNTINFO
+/* Define to 1 if you have the `getnetgrent' function. */
+#undef HAVE_GETNETGRENT
+
/* Define to 1 if you have the `getopt' function. */
#undef HAVE_GETOPT
@@ -883,6 +889,9 @@
/* Define to 1 if you have the `setmntent' function. */
#undef HAVE_SETMNTENT
+/* Define to 1 if you have the `setnetgrent' function. */
+#undef HAVE_SETNETGRENT
+
/* Define to 1 if you have the `setsid' function. */
#undef HAVE_SETSID
diff --git a/man/snmpd.conf.5.def b/man/snmpd.conf.5.def
index 2a9abd5b51..6060ed51d1 100644
--- a/man/snmpd.conf.5.def
+++ b/man/snmpd.conf.5.def
@@ -434,6 +434,14 @@ com2sec sec1 10.0.0.0/8 public
.IP
Access from outside of 10.0.0.0/8 would still be denied.
.IP
+It is also possible to reference a specific \fInetgroup\fR starting with an
+'@' character (e.g. @adminhosts). The \fInetgroup\fR lookup is running
+through the NSS (Name Services Switch) making it possible to define the
+group locally or via NIS/LDAP.
+.IP
+Note: The hostname DNS lookup and \fInetgroup\fR resolution is done only
+during snmpd start or reload.
+.IP
The same community string can be specified in several separate directives
(presumably with different source tokens), and the first source/community
combination that matches the incoming request will be selected.
diff --git a/snmplib/transports/snmpUDPDomain.c b/snmplib/transports/snmpUDPDomain.c
index 5904a1b423..8f98398704 100644
--- a/snmplib/transports/snmpUDPDomain.c
+++ b/snmplib/transports/snmpUDPDomain.c
@@ -445,6 +445,10 @@ netsnmp_udp_parse_security(const char *token, char *param)
network.s_addr = 0;
mask.s_addr = 0;
negate = 0;
+ /* Create a new com2Sec entry. */
+ rc = netsnmp_udp_com2SecEntry_create(NULL, community, secName, contextName,
+ &network, &mask, negate);
+ netsnmp_udp_com2SecEntry_check_return_code(rc);
} else {
char *strmask;
if (*source == '!') {
@@ -454,20 +458,44 @@ netsnmp_udp_parse_security(const char *token, char *param)
negate = 0;
sourcep = source;
}
- /* Parse source address and network mask. */
- if(netsnmp_udp_resolve_source(sourcep, &network, &mask)) {
- config_perror("source address/network mask parsing issue");
- return;
+#if HAVE_ENDNETGRENT && HAVE_GETNETGRENT && HAVE_SETNETGRENT
+ /* Interpret as netgroup */
+ if (*sourcep == '@') {
+ char *netgroup = sourcep+1;
+ char *host, *user, *domain;
+ if(setnetgrent(netgroup)) {
+ while (getnetgrent(&host, &user, &domain)) {
+ /* Parse source address and network mask for each netgroup host. */
+ if (netsnmp_udp_resolve_source(host, &network, &mask) == 0) {
+ /* Create a new com2Sec entry. */
+ rc = netsnmp_udp_com2SecEntry_create(NULL, community, secName, contextName,
+ &network, &mask, negate);
+ netsnmp_udp_com2SecEntry_check_return_code(rc);
+ } else {
+ config_perror("netgroup host address parsing issue");
+ break;
+ }
+ }
+ endnetgrent();
+ } else {
+ config_perror("netgroup could not be found");
+ }
+ }
+ /* Without '@' it has to be an address or hostname */
+ else
+#endif
+ {
+ /* Parse source address and network mask. */
+ if(netsnmp_udp_resolve_source(sourcep, &network, &mask) == 0) {
+ /* Create a new com2Sec entry. */
+ rc = netsnmp_udp_com2SecEntry_create(NULL, community, secName, contextName,
+ &network, &mask, negate);
+ netsnmp_udp_com2SecEntry_check_return_code(rc);
+ } else {
+ config_perror("source address/network mask parsing issue");
+ }
}
}
-
- /*
- * Everything is okay. Copy the parameters to the structure allocated
- * above and add it to END of the list.
- */
- rc = netsnmp_udp_com2SecEntry_create(NULL, community, secName, contextName,
- &network, &mask, negate);
- netsnmp_udp_com2SecEntry_check_return_code(rc);
}
void

View File

@@ -1,8 +1,8 @@
diff -Nurp net-snmp-5.9.5.2-orig/dist/snmpd.service net-snmp-5.9.5.2/dist/snmpd.service
--- net-snmp-5.9.5.2-orig/dist/snmpd.service 2026-01-08 14:05:58.027152850 +0000
+++ net-snmp-5.9.5.2/dist/snmpd.service 2026-01-08 14:08:59.335152850 +0000
diff -Nurp net-snmp-5.9.3-orig/dist/snmpd.service net-snmp-5.9.3/dist/snmpd.service
--- net-snmp-5.9.3-orig/dist/snmpd.service 2022-07-13 23:14:14.000000000 +0200
+++ net-snmp-5.9.3/dist/snmpd.service 2023-01-09 12:11:47.508668095 +0100
@@ -10,6 +10,15 @@ Description=Simple Network Management Pr
After=network.target
After=syslog.target network.target
[Service]
+# added automatically, for details please see

View File

@@ -1,8 +1,8 @@
diff -Nurp net-snmp-5.9.5.2-orig/dist/snmptrapd.service net-snmp-5.9.5.2/dist/snmptrapd.service
--- net-snmp-5.9.5.2-orig/dist/snmptrapd.service 2026-01-08 14:14:11.863152850 +0000
+++ net-snmp-5.9.5.2/dist/snmptrapd.service 2026-01-08 14:14:42.503152850 +0000
diff -Nurp net-snmp-5.9.3-orig/dist/snmptrapd.service net-snmp-5.9.3/dist/snmptrapd.service
--- net-snmp-5.9.3-orig/dist/snmptrapd.service 2022-07-13 23:14:14.000000000 +0200
+++ net-snmp-5.9.3/dist/snmptrapd.service 2023-01-09 12:13:40.120216602 +0100
@@ -7,6 +7,15 @@ Description=Simple Network Management Pr
After=network.target
After=syslog.target network.target
[Service]
+# added automatically, for details please see

View File

@@ -1,15 +0,0 @@
Index: net-snmp-5.9.4/python/setup.py
===================================================================
--- net-snmp-5.9.4.orig/python/setup.py
+++ net-snmp-5.9.4/python/setup.py
@@ -12,6 +12,10 @@ for arg in args:
sys.argv.remove(arg)
intree=1
+if os.environ.get("NET_SNMP_BASEDIR"):
+ basedir = os.environ.get("NET_SNMP_BASEDIR")
+ intree = 1
+
if intree:
netsnmp_libs = os.popen(basedir+'/net-snmp-config --libs').read()
libdir = os.popen(basedir+'/net-snmp-config --build-lib-dirs '+basedir).read()

View File

@@ -1,49 +0,0 @@
diff -uwr net-snmp-5.9.3.old/agent/Makefile.in net-snmp-5.9.3/agent/Makefile.in
--- net-snmp-5.9.3.old/agent/Makefile.in 2022-07-13 23:14:14.000000000 +0200
+++ net-snmp-5.9.3/agent/Makefile.in 2023-06-16 11:31:16.049538400 +0200
@@ -116,7 +116,7 @@
MIBLIB = libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)
LAGENTLIBS = @LAGENTLIBS@
-LMIBLIBS = @LMIBLIBS@
+LMIBLIBS = @LMIBLIBS@ -lsystemd
VAL_LIBS = @VAL_LIBS@
PERLLDOPTS_FOR_APPS = @PERLLDOPTS_FOR_APPS@
PERLLDOPTS_FOR_LIBS = @PERLLDOPTS_FOR_LIBS@
diff -uwr net-snmp-5.9.3.old/agent/mibgroup/host/hr_system.c net-snmp-5.9.3/agent/mibgroup/host/hr_system.c
--- net-snmp-5.9.3.old/agent/mibgroup/host/hr_system.c 2022-07-13 23:14:14.000000000 +0200
+++ net-snmp-5.9.3/agent/mibgroup/host/hr_system.c 2023-06-16 10:38:58.916026706 +0200
@@ -79,6 +79,11 @@
#include <sys/sysctl.h>
#endif
+#ifndef NETSNMP_NO_SYSTEMD
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-login.h>
+#endif
+
netsnmp_feature_require(date_n_time);
#if !defined(UTMP_FILE) && defined(_PATH_UTMP)
@@ -686,6 +691,11 @@
struct utmp *utmp_p;
#endif
+#ifndef NETSNMP_NO_SYSTEMD
+ if (sd_booted () > 0)
+ total = sd_get_sessions (NULL);
+ else {
+#endif
setutent();
while ((utmp_p = getutent()) != NULL) {
#ifndef UTMP_HAS_NO_TYPE
@@ -704,6 +714,9 @@
++total;
}
endutent();
+#ifndef NETSNMP_NO_SYSTEMD
+ }
+#endif
#else /* WIN32 */
/*
* TODO - Error checking.

BIN
net-snmp-5.9.4.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQRuZxiu8etcZcMtGyo1a8C1UtU8qwUCZNvg2QAKCRA1a8C1UtU8
qw8qAQDETiafcfGE3SBySaKHBbF29I0JoCgyQkMZcohhulta0gEA3VXykAg9M0S9
q/bjRz8lPTdz9tpYmiza9eXcYmQZcAA=
=PJkj
-----END PGP SIGNATURE-----

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:16707719f833184a4b72835dac359ae188123b06b5e42817c00790d7dc1384bf
size 6826866

View File

@@ -1,7 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQRuZxiu8etcZcMtGyo1a8C1UtU8qwUCaUrJTQAKCRA1a8C1UtU8
q8QJAP4t5pduTzfblWeI+6Xau8idTgnpH/s/extGS4PETjz0dAD/XCsyWSt4Y8SN
rH4g9ebVg9tqhUftOGnkJEH0z8quSAU=
=4HXR
-----END PGP SIGNATURE-----

View File

@@ -1,60 +1,10 @@
-------------------------------------------------------------------
Thu Feb 5 07:03:10 UTC 2026 - Dominique Leuenberger <dimstar@opensuse.org>
- Fix dependency on renamed library in baselibs devel package.
-------------------------------------------------------------------
Tue Feb 3 08:31:38 UTC 2026 - Alexander Bergmann <abergmann@suse.com>
- Fix devel package libnl3-devel requires (boo#1256695).
- Update to net-snmp-5.9.5.2.
snmptrapd:
- fixed a critical vulnerability triggered by a specially crafted trap
(bsc#1255491, CVE-2025-68615)
snmpd:
- Make UCD-SNMP::dskTable dynamic if includeAllDisks is set.") added
a verification that drops all filesystems not present in other_fs[]
table. So add 'ubifs' in other_fs[] to fix it.
add (rename):
* net-snmp-5.9.5.2-add-netgroups-functionality.patch
* net-snmp-5.9.5.2-harden_snmpd.service.patch
* net-snmp-5.9.5.2-harden_snmptrapd.service.patch
delete (rename):
* net-snmp-5.9.4-add-netgroups-functionality.patch
* net-snmp-5.9.4-harden_snmpd.service.patch
* net-snmp-5.9.4-harden_snmptrapd.service.patch
-------------------------------------------------------------------
Mon Jun 30 04:38:25 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Use pyproject macros to build and install.
- Add patch net-snmp-5.9.4-setup.py-basedir-environ.patch:
* Also use environment variables to set the basedir.
- Specify directories explicitly in %files.
-------------------------------------------------------------------
Wed Jan 22 15:48:36 UTC 2025 - Dominique Leuenberger <dimstar@opensuse.org>
- Drop rcFOO symlinks for CODE16 (PED-266).
-------------------------------------------------------------------
Fri Nov 15 07:20:59 UTC 2024 - Alexander Bergmann <abergmann@suse.com>
- logrotate should use reload instead of restart (bsc#1232030)
-------------------------------------------------------------------
Fri Oct 20 09:01:42 UTC 2023 - Thorsten Kukuk <kukuk@suse.com>
- net-snmp-5.9.4-systemd-no-utmp.patch: prefer systemd-logind over
utmp to count number of logged in users, utmp is not reliable for
this and has a Y2038 problem (jsc#PED-3144)
-------------------------------------------------------------------
Tue Oct 17 13:56:01 UTC 2023 - Alexander Bergmann <abergmann@suse.com>
Thu Nov 14 16:53:39 UTC 2024 - Alexander Bergmann <abergmann@suse.com>
- Update to net-snmp-5.9.4 (bsc#1214364).
add (rename):
* net-snmp-5.9.4-add-lustre-fs-support.patch
* net-snmp-5.9.4-add-netgroups-functionality.patch
* net-snmp-5.9.4-fix-create-v3-user-outfile.patch
* net-snmp-5.9.4-fixed-python2-bindings.patch
* net-snmp-5.9.4-fix-Makefile.PL.patch
@@ -72,26 +22,23 @@ Tue Oct 17 13:56:01 UTC 2023 - Alexander Bergmann <abergmann@suse.com>
* net-snmp-5.9.3-grep.patch
delete (rename):
* net-snmp-5.9.1-add-lustre-fs-support.patch
* net-snmp-5.9.2-fix-create-v3-user-outfile.patch
* net-snmp-5.9.3-fixed-python2-bindings.patch
* net-snmp-5.9.1-fix-Makefile.PL.patch
* net-snmp-5.9.1-modern-rpm-api.patch
* net-snmp-5.9.1-net-snmp-config-headercheck.patch
* net-snmp-5.9.1-perl-tk-warning.patch
* net-snmp-5.9.2-pie.patch
* net-snmp-5.9.1-snmpstatus-suppress-output.patch
* net-snmp-5.9.1-socket-path.patch
* net-snmp-5.9.1-subagent-set-response.patch
* net-snmp-5.9.1-suse-systemd-service-files.patch
* net-snmp-5.9.1-testing-empty-arptable.patch
- Removing legacy MIBs used by Velocity Software (jira#PED-6416).
delete:
* net-snmp-5.9.1-velocity-mib.patch
* net-snmp-5.9.2-fix-create-v3-user-outfile.patch
* net-snmp-5.9.2-pie.patch
* net-snmp-5.9.3-fixed-python2-bindings.patch
- Removing legacy MIBs used by Velocity Software (jira#PED-6416).
- Re-add support for hostname netgroups that was removed accidentally and
previously added with FATE#316305 (bsc#1207697).
'@hostgroup' can be specified for multiple hosts
add:
* net-snmp-5.9.4-add-netgroups-functionality.patch
- Hardening systemd services setting "ProtectHome=true" caused home directory
size and allocation to be listed incorrectly (bsc#1206044).
add (rename):
@@ -100,6 +47,7 @@ Tue Oct 17 13:56:01 UTC 2023 - Alexander Bergmann <abergmann@suse.com>
delete (rename):
* net-snmp-5.9.1-harden_snmpd.service.patch
* net-snmp-5.9.1-harden_snmptrapd.service.patch
- logrotate should use reload instead of restart (bsc#1232030)
-------------------------------------------------------------------
Thu Jan 5 11:49:22 UTC 2023 - Alexander Bergmann <abergmann@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package net-snmp
#
# Copyright (c) 2026 SUSE LLC and contributors
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,7 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define netsnmp_logfile %{_localstatedir}/log/net-snmpd.log
%define netsnmp_agentx_socket_dir_fhs %{_rundir}/agentx
%define netsnmp_agentx_socket_dir_rfc %{_localstatedir}/agentx
@@ -26,15 +27,15 @@
%ifnarch s390 s390x
%define netsnmp_with_sensors 1
%endif
%define libname libsnmp45
%define libname libsnmp40
%bcond_without python2
Name: net-snmp
Version: 5.9.5.2
Version: 5.9.4
Release: 0
Summary: SNMP Daemon
License: BSD-3-Clause AND MIT
Group: Productivity/Networking/Other
URL: https://github.com/net-snmp/net-snmp
URL: https://sourceforge.net/projects/net-snmp
Source: https://sourceforge.net/projects/net-snmp/files/net-snmp/%{version}/%{name}-%{version}.tar.gz
Source1: snmpd.conf
Source2: README.SUSE
@@ -56,35 +57,30 @@ Patch6: net-snmp-5.9.4-snmpstatus-suppress-output.patch
Patch7: net-snmp-5.9.4-fix-Makefile.PL.patch
Patch8: net-snmp-5.9.4-modern-rpm-api.patch
Patch9: net-snmp-5.9.4-add-lustre-fs-support.patch
Patch10: net-snmp-5.9.5.2-harden_snmpd.service.patch
Patch11: net-snmp-5.9.5.2-harden_snmptrapd.service.patch
Patch10: net-snmp-5.9.4-harden_snmpd.service.patch
Patch11: net-snmp-5.9.4-harden_snmptrapd.service.patch
Patch12: net-snmp-5.9.4-suse-systemd-service-files.patch
Patch13: net-snmp-5.9.4-fix-create-v3-user-outfile.patch
Patch14: net-snmp-5.9.4-subagent-set-response.patch
Patch15: net-snmp-5.9.4-fixed-python2-bindings.patch
Patch16: net-snmp-5.9.5.2-add-netgroups-functionality.patch
Patch17: net-snmp-5.9.4-systemd-no-utmp.patch
Patch18: net-snmp-5.9.4-setup.py-basedir-environ.patch
Patch16: net-snmp-5.9.4-add-netgroups-functionality.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libnl3-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
BuildRequires: procps
BuildRequires: python-rpm-macros
BuildRequires: rpm-devel
BuildRequires: systemd-devel
BuildRequires: systemd-rpm-macros
BuildRequires: tcpd-devel
Requires: logrotate
Requires: perl-SNMP = %{version}
Requires: perl-TermReadKey
Requires(post): %fillup_prereq
%{?systemd_requires}
%if 0%{?netsnmp_with_sensors}
BuildRequires: libsensors4-devel
%endif
@@ -145,7 +141,6 @@ Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
# for mib2c
Requires: perl
Requires: libnl3-devel
Requires: perl-SNMP = %{version}
Requires: rpm-devel
Requires: tcpd-devel
@@ -281,16 +276,13 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib"
--with-transports=TLSTCP,DTLSUDP \
--with-systemd \
--with-openssl \
--enable-blumenthal-aes \
--disable-des \
--disable-md5
--enable-blumenthal-aes
# Parallel build deps not properly stated
%make_build -j1
pushd python
export NET_SNMP_BASEDIR="../"
%pyproject_wheel
%python_exec setup.py build --basedir="../"
popd
%install
@@ -307,10 +299,8 @@ install -D -m 0644 %{SOURCE3} %{buildroot}%{_distconfdir}/logrotate.d/net-snmp
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/net-snmp
%endif
install -m 0744 %{SOURCE4} testing/
%if 0%{?suse_version} < 1600
ln -sf service %{buildroot}%{_sbindir}/rcsnmpd
ln -sf service %{buildroot}%{_sbindir}/rcsnmptrapd
%endif
install -m 0644 /dev/null %{buildroot}%{netsnmp_logfile}
pushd perl
%perl_make_install
@@ -318,7 +308,7 @@ pushd perl
rm -f %{buildroot}/%{perl_vendorarch}/Bundle/Makefile.subs.pl
popd
pushd python
%pyproject_install
%python_install
popd
grep -a -v "^#define PACKAGE" %{buildroot}%{_includedir}/net-snmp/net-snmp-config.h > \
%{buildroot}%{_includedir}/net-snmp/net-snmp-config.h.new
@@ -465,7 +455,6 @@ done
%files %{python_files %{name}}
%doc README
%{python_sitearch}/netsnmp
%{python_sitearch}/netsnmp_python-1.0a1.dist-info
%{python_sitearch}/*
%changelog