From 8df8838f8364886927359517be8e3adc88fbdc42 Mon Sep 17 00:00:00 2001 From: Lu zhiping Date: Mon, 27 Jun 2022 15:01:27 +0800 Subject: [PATCH] format patches --- debian/patches/02_statistics.patch | 16 +- debian/patches/03_makefiles.patch | 30 ++-- debian/patches/05_searchdirs.patch | 2 +- debian/patches/07_docfiles.patch | 35 +++-- debian/patches/26_kfreebsd.patch | 22 ++- debian/patches/27_kfreebsd.patch | 17 ++- debian/patches/62_add_lib_cflags.patch | 30 ++-- debian/patches/64_missing_lib.patch | 23 ++- ...k-libnetsnmptrapd-against-MYSQL_LIBS.patch | 1 - debian/patches/apps_makefile_use_ldflags | 23 ++- ...autofs-fix-a-recently-introduced-bug.patch | 11 +- .../patches/autofs-skip-autofs-entries.patch | 28 ++-- debian/patches/callback_print.diff | 4 +- .../do_not_callback_for_failed_reports.diff | 138 ------------------ .../patches/fix-check-hr-filesys-autofs.patch | 23 +-- debian/patches/fix-request-id-0.patch | 14 +- debian/patches/fix_engineid_reprobe.diff | 16 +- .../fix_manpage-has-errors_break_line.patch | 14 +- debian/patches/fix_perl_bulk_gets.diff | 18 ++- debian/patches/fix_regular_expression.patch | 40 +++-- debian/patches/fix_spelling_error.patch | 20 ++- debian/patches/let_perl_access_engineid.diff | 27 +++- ...7-log-once-proc-net-if_inet6-failure.patch | 8 +- debian/patches/mysql8-replace-bool.patch | 12 +- debian/patches/netsnmp_mib_api_3_groff | 12 +- debian/patches/parsing_default_port | 25 +++- debian/patches/pingmib_perl_path | 16 +- debian/patches/series | 1 - debian/patches/snmpcmd_1_groff | 12 +- debian/patches/snmpd_pidfile_mode | 18 ++- debian/patches/snmplib_error_subcontainer | 20 ++- debian/patches/snmptranslate.1.patch | 16 +- debian/patches/snmpwalk_args_in_snmpcheck | 6 +- 33 files changed, 391 insertions(+), 307 deletions(-) delete mode 100644 debian/patches/do_not_callback_for_failed_reports.diff diff --git a/debian/patches/02_statistics.patch b/debian/patches/02_statistics.patch index 77a3a58..7a3a9a2 100644 --- a/debian/patches/02_statistics.patch +++ b/debian/patches/02_statistics.patch @@ -1,10 +1,18 @@ -Description: Ignore interfaces without statistics -Author: Net-SNMP Packaging Team +From: Net-SNMP Packaging Team +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Ignore interfaces without statistics + Reviewed-by: Craig Small Last-Update: 2019-02-07 +--- + agent/mibgroup/mibII/interfaces.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/agent/mibgroup/mibII/interfaces.c b/agent/mibgroup/mibII/interfaces.c +index 7bc7e77..ae80e0e 100644 --- a/agent/mibgroup/mibII/interfaces.c +++ b/agent/mibgroup/mibII/interfaces.c -@@ -1588,6 +1588,10 @@ +@@ -1588,6 +1588,10 @@ Interface_Scan_Init(void) struct ifnet *nnew; char *stats, *ifstart = line; @@ -15,7 +23,7 @@ Last-Update: 2019-02-07 if (line[strlen(line) - 1] == '\n') line[strlen(line) - 1] = '\0'; -@@ -1620,7 +1624,7 @@ +@@ -1620,7 +1624,7 @@ Interface_Scan_Init(void) &coll) != 5)) { if ((scan_line_to_use == scan_line_2_2) && !strstr(line, "No statistics available")) diff --git a/debian/patches/03_makefiles.patch b/debian/patches/03_makefiles.patch index 4b0f6a9..7b8cae9 100644 --- a/debian/patches/03_makefiles.patch +++ b/debian/patches/03_makefiles.patch @@ -1,19 +1,23 @@ -Description: Update Makefiles - Makefile patch to include libwrap and libsensors libraries and install - extra MIB files. -Author: Net-SNMP Packaging Team +From: Net-SNMP Packaging Team +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Update Makefiles + +Makefile patch to include libwrap and libsensors libraries and install +extra MIB files. Reviewed-by: Craig Small Last-Update: 2019-02-07 --- - Makefile.in | 4 ++-- + Makefile.in | 2 +- Makefile.top | 1 + local/Makefile.in | 2 +- mibs/Makefile.in | 6 +++--- - 4 files changed, 7 insertions(+), 6 deletions(-) + 4 files changed, 6 insertions(+), 5 deletions(-) +diff --git a/Makefile.in b/Makefile.in +index 9dbdde1..60b8d76 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -173,7 +173,7 @@ +@@ -173,7 +173,7 @@ OTHERCLEANTODOS=perlclean @PYTHONCLEANTARGS@ cleanfeatures perlcleanfeatures pyt # # override LD_RUN_PATH to avoid dependencies on the build directory perlmodules: perlmakefiles subdirs @@ -22,9 +26,11 @@ Last-Update: 2019-02-07 if test $$? != 0 ; then \ exit 1 ; \ fi +diff --git a/Makefile.top b/Makefile.top +index 5d4f9bc..6f9a9ab 100644 --- a/Makefile.top +++ b/Makefile.top -@@ -28,6 +28,7 @@ +@@ -28,6 +28,7 @@ man8dir = $(mandir)/man8 snmplibdir = $(datadir)/snmp mibdir = $(snmplibdir)/mibs persistentdir = @PERSISTENT_DIRECTORY@ @@ -32,9 +38,11 @@ Last-Update: 2019-02-07 DESTDIR = @INSTALL_PREFIX@ INSTALL_PREFIX = $(DESTDIR) +diff --git a/local/Makefile.in b/local/Makefile.in +index 4b8a133..b784a71 100644 --- a/local/Makefile.in +++ b/local/Makefile.in -@@ -101,7 +101,7 @@ +@@ -101,7 +101,7 @@ tkmib.made: $(srcdir)/tkmib mib2c.made: $(srcdir)/mib2c if test "x$(PERL)" != "x" ; then \ @@ -43,9 +51,11 @@ Last-Update: 2019-02-07 else \ touch mib2c.made; \ fi +diff --git a/mibs/Makefile.in b/mibs/Makefile.in +index fad4c2a..982f220 100644 --- a/mibs/Makefile.in +++ b/mibs/Makefile.in -@@ -47,11 +47,11 @@ +@@ -47,11 +47,11 @@ NETSNMPMIBS = NET-SNMP-TC.txt NET-SNMP-MIB.txt NET-SNMP-AGENT-MIB.txt \ UCDMIBS = UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \ UCD-DLMOD-MIB.txt UCD-DISKIO-MIB.txt diff --git a/debian/patches/05_searchdirs.patch b/debian/patches/05_searchdirs.patch index 266a901..c235add 100644 --- a/debian/patches/05_searchdirs.patch +++ b/debian/patches/05_searchdirs.patch @@ -9,7 +9,7 @@ MIB files. 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/local/mib2c b/local/mib2c -index 2016f06..6926321 100755 +index 439cc37..0a0ba09 100755 --- a/local/mib2c +++ b/local/mib2c @@ -61,8 +61,9 @@ $currentlevel = -1; diff --git a/debian/patches/07_docfiles.patch b/debian/patches/07_docfiles.patch index 0f5d9a6..695587e 100644 --- a/debian/patches/07_docfiles.patch +++ b/debian/patches/07_docfiles.patch @@ -1,11 +1,20 @@ -Description: Document paths - Patch documentation files to change paths to Debian specific locations. -Author: Net-SNMP Packaging Team +From: Net-SNMP Packaging Team +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Document paths + +Patch documentation files to change paths to Debian specific locations. Reviewed-by: Craig Small Last-Update: 2019-02-07 +--- + EXAMPLE.conf.def | 2 +- + FAQ | 22 +++++++++++----------- + 2 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/EXAMPLE.conf.def b/EXAMPLE.conf.def +index 8f4a197..180713c 100644 --- a/EXAMPLE.conf.def +++ b/EXAMPLE.conf.def -@@ -23,7 +23,7 @@ +@@ -23,7 +23,7 @@ agentAddress udp:127.0.0.1:161 # SNMPv3 AUTHENTICATION # # Note that these particular settings don't actually belong here. @@ -14,9 +23,11 @@ Last-Update: 2019-02-07 # and the passwords changed, before being uncommented in that file *only*. # Then restart the agent +diff --git a/FAQ b/FAQ +index d1614f9..1584892 100644 --- a/FAQ +++ b/FAQ -@@ -108,7 +108,7 @@ +@@ -108,7 +108,7 @@ TABLE OF CONTENTS How do I configure access control? How do I configure SNMPv3 users? The 'createUser' line disappears when I start the agent. Why? @@ -25,7 +36,7 @@ Last-Update: 2019-02-07 My new agent is ignoring the old snmpd.conf file. Why? Where should the snmpd.conf file go? Why am I getting "Connection refused"? -@@ -699,7 +699,7 @@ +@@ -699,7 +699,7 @@ How do I add a MIB to the tools? There are two steps required to add a new MIB file to the tools. Firstly, copy the MIB file into the appropriate location: @@ -34,7 +45,7 @@ Last-Update: 2019-02-07 (which makes it available to everyone on the system) or mkdir $HOME/.snmp -@@ -1395,7 +1395,7 @@ +@@ -1395,7 +1395,7 @@ My traphandler script doesn't work when run like this - why not? If this is the case, then you can specify this interpreter explicitly as part of the trap handle directive: @@ -43,7 +54,7 @@ Last-Update: 2019-02-07 In this case, it's almost certain that you'll also need to give the full path to the traphandle script (as shown) -@@ -1489,7 +1489,7 @@ +@@ -1489,7 +1489,7 @@ OK, what should I put in snmp.conf? string to use. Some of these (such as MIB information), might be best put in a @@ -52,7 +63,7 @@ Last-Update: 2019-02-07 /etc/snmp/snmp.conf) to apply to all users of the system. Others (particularly the SNMPv3 security settings), are more likely to refer to a particular user, and should probably go in a personal snmp.conf -@@ -2663,7 +2663,7 @@ +@@ -2663,7 +2663,7 @@ How do I configure SNMPv3 users? createUser {myUser} MD5 {myPassword} DES @@ -61,7 +72,7 @@ Last-Update: 2019-02-07 {myPassword} are the appropriate values for username and password, _without_ the braces!). Then re-start the snmpd agent. -@@ -2672,7 +2672,7 @@ +@@ -2672,7 +2672,7 @@ How do I configure SNMPv3 users? net-snmp-config --create-snmpv3-user and follow the prompts given. This will create an entry @@ -70,7 +81,7 @@ Last-Update: 2019-02-07 Then re-start the snmpd agent. 3) Make sure the agent is running, and will respond to an SNMPv3 -@@ -2706,16 +2706,16 @@ +@@ -2706,16 +2706,16 @@ The 'createUser' line disappears when I start the agent. Why? @@ -91,7 +102,7 @@ Last-Update: 2019-02-07 -@@ -2736,7 +2736,7 @@ +@@ -2736,7 +2736,7 @@ Where should the snmpd.conf file go? ----------------------------------- The default location for this file with the basic distribution is diff --git a/debian/patches/26_kfreebsd.patch b/debian/patches/26_kfreebsd.patch index 716fe8a..3f51edb 100644 --- a/debian/patches/26_kfreebsd.patch +++ b/debian/patches/26_kfreebsd.patch @@ -1,7 +1,15 @@ -Description: Preliminary support for kfreebsd. -Author: Net-SNMP Packaging Team +From: Net-SNMP Packaging Team +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Preliminary support for kfreebsd. + Reviewed-by: Craig Small Last-Update: 2019-02-07 +--- + agent/mibgroup/hardware/cpu/cpu_sysctl.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/agent/mibgroup/hardware/cpu/cpu_sysctl.c b/agent/mibgroup/hardware/cpu/cpu_sysctl.c +index 386984a..a894839 100644 --- a/agent/mibgroup/hardware/cpu/cpu_sysctl.c +++ b/agent/mibgroup/hardware/cpu/cpu_sysctl.c @@ -12,7 +12,7 @@ @@ -13,7 +21,7 @@ Last-Update: 2019-02-07 #include #if !defined(CPUSTATES) #include -@@ -92,7 +92,7 @@ +@@ -92,7 +92,7 @@ void init_cpu_sysctl( void ) { #elif defined(KERN_CPTIME) /* OpenBSD */ #define NETSNMP_KERN_CPU KERN_CPTIME @@ -22,7 +30,7 @@ Last-Update: 2019-02-07 #define NETSNMP_KERN_MCPU 1 /* Enable support for multi-cpu stats. Valid for FreeBSD >=6.4, >=7.1, >=8.0 and beyond */ #define NETSNMP_KERN_MCPU_TYPE NETSNMP_CPU_STATS -@@ -132,7 +132,7 @@ +@@ -132,7 +132,7 @@ void init_cpu_sysctl( void ) { #define NETSNMP_VM_STATS_TYPE struct uvmexp #endif /* VM_UVMEXP2 || VM_UVMEXP */ @@ -31,7 +39,7 @@ Last-Update: 2019-02-07 #define NETSNMP_VM_STATS VM_METER #define NETSNMP_VM_STATS_TYPE struct vmmeter #define NS_VM_INTR v_intr -@@ -172,10 +172,10 @@ +@@ -172,10 +172,10 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { */ NETSNMP_CPU_STATS cpu_stats[CPUSTATES]; size_t cpu_size = sizeof(cpu_stats); @@ -44,7 +52,7 @@ Last-Update: 2019-02-07 static int cp_times = -1; #endif #ifdef KERN_CPTIME2 -@@ -192,7 +192,7 @@ +@@ -192,7 +192,7 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { size_t mem_size = sizeof(NETSNMP_VM_STATS_TYPE); netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 0 ); @@ -53,7 +61,7 @@ Last-Update: 2019-02-07 sysctlbyname("kern.cp_time", cpu_stats, &cpu_size, NULL, 0); #else sysctl(cpu_mib, 2, cpu_stats, &cpu_size, NULL, 0); -@@ -229,7 +229,7 @@ +@@ -229,7 +229,7 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { mcpu_size = cpu_num*sizeof(cpu_stats); mcpu_stats = malloc(mcpu_size); sysctlbyname("kern.cp_time", mcpu_stats, &mcpu_size, NULL, 0); diff --git a/debian/patches/27_kfreebsd.patch b/debian/patches/27_kfreebsd.patch index 17e680a..136a1a4 100644 --- a/debian/patches/27_kfreebsd.patch +++ b/debian/patches/27_kfreebsd.patch @@ -1,10 +1,19 @@ -Description: ICMP parameters for kFreeBSD -Author: Net-SNMP Packaging Team +From: Net-SNMP Packaging Team +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: ICMP parameters for kFreeBSD + Reviewed-by: Craig Small Last-Update: 2019-02-07 +--- + agent/mibgroup/mibII/icmp.h | 1 + + agent/mibgroup/mibII/kernel_sysctl.c | 6 ++++++ + 2 files changed, 7 insertions(+) + +diff --git a/agent/mibgroup/mibII/icmp.h b/agent/mibgroup/mibII/icmp.h +index 9c8d34a..90f17f3 100644 --- a/agent/mibgroup/mibII/icmp.h +++ b/agent/mibgroup/mibII/icmp.h -@@ -16,6 +16,7 @@ +@@ -16,6 +16,7 @@ config_arch_require(freebsd9, mibII/kernel_sysctl) config_arch_require(freebsd10, mibII/kernel_sysctl) config_arch_require(freebsd11, mibII/kernel_sysctl) config_arch_require(freebsd12, mibII/kernel_sysctl) @@ -12,6 +21,8 @@ Last-Update: 2019-02-07 config_arch_require(netbsd, mibII/kernel_netbsd) config_arch_require(netbsdelf, mibII/kernel_netbsd) config_arch_require(openbsd4, mibII/kernel_sysctl) +diff --git a/agent/mibgroup/mibII/kernel_sysctl.c b/agent/mibgroup/mibII/kernel_sysctl.c +index 166f664..8ea87f8 100644 --- a/agent/mibgroup/mibII/kernel_sysctl.c +++ b/agent/mibgroup/mibII/kernel_sysctl.c @@ -14,6 +14,12 @@ diff --git a/debian/patches/62_add_lib_cflags.patch b/debian/patches/62_add_lib_cflags.patch index 310089d..be1cf03 100644 --- a/debian/patches/62_add_lib_cflags.patch +++ b/debian/patches/62_add_lib_cflags.patch @@ -1,17 +1,25 @@ -Description: Add base-lib-cflags option - Add option "--base-lib-cflags" to net-snmp-config. This flag returns - options needed to link against libnetsnmp. In particular, no perl - specific options are provided. - . - It was reported in "libsnmp-base: forcing perl headers in net-snmp-config - --cflags breaks perl builds" - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502806 -Author: Net-SNMP Packaging Team +From: Net-SNMP Packaging Team +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Add base-lib-cflags option + +Add option "--base-lib-cflags" to net-snmp-config. This flag returns +options needed to link against libnetsnmp. In particular, no perl +specific options are provided. + +It was reported in "libsnmp-base: forcing perl headers in net-snmp-config +--cflags breaks perl builds" +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502806 Reviewed-by: Craig Small Last-Update: 2019-02-07 +--- + net-snmp-config.in | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/net-snmp-config.in b/net-snmp-config.in +index a412412..0b8266a 100644 --- a/net-snmp-config.in +++ b/net-snmp-config.in -@@ -142,6 +142,9 @@ +@@ -142,6 +142,9 @@ else --base-cflags) echo @CFLAGS@ @CPPFLAGS@ -I${NSC_INCLUDEDIR} ;; @@ -21,7 +29,7 @@ Last-Update: 2019-02-07 --cflags|--cf*) echo @CFLAGS@ @DEVFLAGS@ @CPPFLAGS@ -I. -I${NSC_INCLUDEDIR} ;; -@@ -704,6 +707,8 @@ +@@ -704,6 +707,8 @@ if test "x$usage" = "xyes"; then echo " These options produce the various compilation flags needed when" echo " building external SNMP applications:" echo "" diff --git a/debian/patches/64_missing_lib.patch b/debian/patches/64_missing_lib.patch index 08f5bc8..f6d66df 100644 --- a/debian/patches/64_missing_lib.patch +++ b/debian/patches/64_missing_lib.patch @@ -1,10 +1,19 @@ -Description: Add missing libraries to Makefile -Author: Net-SNMP Packaging Team +From: Net-SNMP Packaging Team +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Add missing libraries to Makefile + Reviewed-by: Craig Small Last-Update: 2019-02-07 +--- + apps/Makefile.in | 6 ++++-- + configure.ac | 3 +++ + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/apps/Makefile.in b/apps/Makefile.in +index e5e1f69..403378e 100644 --- a/apps/Makefile.in +++ b/apps/Makefile.in -@@ -93,6 +93,8 @@ +@@ -93,6 +93,8 @@ MIBLIB = ../agent/libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) USEAGENTLIBS = $(MIBLIB) $(AGENTLIB) $(USELIBS) MYSQL_LIBS = @MYSQL_LIBS@ MYSQL_INCLUDES = @MYSQL_INCLUDES@ @@ -13,7 +22,7 @@ Last-Update: 2019-02-07 VAL_LIBS = @VAL_LIBS@ LIBS = $(USELIBS) $(VAL_LIBS) @LIBS@ -@@ -183,7 +185,7 @@ +@@ -183,7 +185,7 @@ snmptest$(EXEEXT): snmptest.$(OSUFFIX) $(USELIBS) $(LINK) ${CFLAGS} -o $@ snmptest.$(OSUFFIX) ${LDFLAGS} ${LIBS} snmptrapd$(EXEEXT): $(TRAPD_OBJECTS) $(USETRAPLIBS) $(INSTALLLIBS) @@ -22,7 +31,7 @@ Last-Update: 2019-02-07 snmptrap$(EXEEXT): snmptrap.$(OSUFFIX) $(USELIBS) $(LINK) ${CFLAGS} -o $@ snmptrap.$(OSUFFIX) ${LDFLAGS} ${LIBS} -@@ -200,7 +202,7 @@ +@@ -200,7 +202,7 @@ snmpset$(EXEEXT): snmpset.$(OSUFFIX) $(USELIBS) $(LINK) ${CFLAGS} -o $@ snmpset.$(OSUFFIX) ${LDFLAGS} ${LIBS} snmpusm$(EXEEXT): snmpusm.$(OSUFFIX) $(USELIBS) @@ -31,9 +40,11 @@ Last-Update: 2019-02-07 snmpvacm$(EXEEXT): snmpvacm.$(OSUFFIX) $(USELIBS) $(LINK) ${CFLAGS} -o $@ snmpvacm.$(OSUFFIX) ${LDFLAGS} ${LIBS} +diff --git a/configure.ac b/configure.ac +index 1622b7c..00f83df 100644 --- a/configure.ac +++ b/configure.ac -@@ -102,6 +102,9 @@ +@@ -102,6 +102,9 @@ AC_SUBST(DLLIBS) AC_SUBST(PARTIALTARGETFLAGS) AC_SUBST(ac_cv_NETSNMP_SYSTEM_INCLUDE_FILE) diff --git a/debian/patches/Link-libnetsnmptrapd-against-MYSQL_LIBS.patch b/debian/patches/Link-libnetsnmptrapd-against-MYSQL_LIBS.patch index 2469c49..f4f2ac0 100644 --- a/debian/patches/Link-libnetsnmptrapd-against-MYSQL_LIBS.patch +++ b/debian/patches/Link-libnetsnmptrapd-against-MYSQL_LIBS.patch @@ -1,4 +1,3 @@ -From 9432f629e66e4f9500f6335eab3ad427f84523b2 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 20 Jul 2017 10:31:47 -0700 Subject: [PATCH] Link libnetsnmptrapd against MYSQL_LIBS diff --git a/debian/patches/apps_makefile_use_ldflags b/debian/patches/apps_makefile_use_ldflags index a26591d..8a92fb1 100644 --- a/debian/patches/apps_makefile_use_ldflags +++ b/debian/patches/apps_makefile_use_ldflags @@ -1,13 +1,22 @@ -Description: Makefile add correct flags - The sedscript creation was missing CPPGLAGS - More seriously the libnetsnmptrapd library linking was missing LDFLAGS -Author: Craig Small +From: Craig Small +Date: Mon, 27 Jun 2022 15:01:27 +0800 +Subject: Makefile add correct flags + +The sedscript creation was missing CPPGLAGS +More seriously the libnetsnmptrapd library linking was missing LDFLAGS Bug: https://github.com/net-snmp/net-snmp/issues/29 Reviewed-by: Craig Small Last-Update: 2019-10-16 +--- + Makefile.in | 2 +- + apps/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 60b8d76..47c58a7 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -114,7 +114,7 @@ +@@ -114,7 +114,7 @@ agentxtrap snmptrapd: @FEATURETARGS@ # local build rules # sedscript: sedscript.in include/net-snmp/net-snmp-config.h $(srcdir)/agent/mibgroup/mibdefs.h @@ -16,9 +25,11 @@ Last-Update: 2019-10-16 echo 's/VERSIONINFO/$(VERSION)/g' >> sedscript echo 's#DATADIR#$(datadir)#g' >> sedscript echo 's#LIBDIR#$(libdir)#g' >> sedscript +diff --git a/apps/Makefile.in b/apps/Makefile.in +index 403378e..1ea4415 100644 --- a/apps/Makefile.in +++ b/apps/Makefile.in -@@ -232,7 +232,7 @@ +@@ -232,7 +232,7 @@ snmppcap$(EXEEXT): snmppcap.$(OSUFFIX) $(USELIBS) $(LINK) ${CFLAGS} -o $@ snmppcap.$(OSUFFIX) ${LDFLAGS} ${LIBS} -lpcap libnetsnmptrapd.$(LIB_EXTENSION)$(LIB_VERSION): $(LLIBTRAPD_OBJS) diff --git a/debian/patches/autofs-fix-a-recently-introduced-bug.patch b/debian/patches/autofs-fix-a-recently-introduced-bug.patch index 23a55ea..4dff4f6 100644 --- a/debian/patches/autofs-fix-a-recently-introduced-bug.patch +++ b/debian/patches/autofs-fix-a-recently-introduced-bug.patch @@ -1,5 +1,8 @@ -HOST-MIB: Fix a recently introduced bug +From: Ubuntu Developers +Date: Mon, 27 Jun 2022 15:01:27 +0800 +Subject: autofs-fix-a-recently-introduced-bug +HOST-MIB: Fix a recently introduced bug Fixes: cf41e6e91015 ("HOST-MIB: Skip autofs entries") Note: this bug was not introduced by Josef but by me. @@ -13,13 +16,12 @@ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935325 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1835818 Reviewed-by: Rafael David Tinoco Last-Update: 2019-12-16 - --- agent/mibgroup/host/hrh_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/mibgroup/host/hrh_storage.c b/agent/mibgroup/host/hrh_storage.c -index 6f8ff6c53..c7c53922a 100644 +index 6f8ff6c..c7c5392 100644 --- a/agent/mibgroup/host/hrh_storage.c +++ b/agent/mibgroup/host/hrh_storage.c @@ -371,7 +371,7 @@ really_try_next: @@ -31,6 +33,3 @@ index 6f8ff6c53..c7c53922a 100644 return NULL; if (store_idx <= NETSNMP_MEM_TYPE_MAX ) { mem = (netsnmp_memory_info*)ptr; --- -2.24.0 - diff --git a/debian/patches/autofs-skip-autofs-entries.patch b/debian/patches/autofs-skip-autofs-entries.patch index 7f5f258..dcc045c 100644 --- a/debian/patches/autofs-skip-autofs-entries.patch +++ b/debian/patches/autofs-skip-autofs-entries.patch @@ -1,5 +1,8 @@ -HOST-MIB: Skip autofs entries +From: Ubuntu Developers +Date: Mon, 27 Jun 2022 15:01:27 +0800 +Subject: autofs-skip-autofs-entries +HOST-MIB: Skip autofs entries Do not call statfs() for autofs entries. See also https://sourceforge.net/p/net-snmp/patches/1350/. @@ -30,7 +33,7 @@ Last-Update: 2019-12-16 10 files changed, 58 insertions(+), 4 deletions(-) diff --git a/agent/mibgroup/hardware/fsys/fsys_mntctl.c b/agent/mibgroup/hardware/fsys/fsys_mntctl.c -index e7d9a1c5a..782c8edd2 100644 +index e7d9a1c..782c8ed 100644 --- a/agent/mibgroup/hardware/fsys/fsys_mntctl.c +++ b/agent/mibgroup/hardware/fsys/fsys_mntctl.c @@ -43,8 +43,9 @@ _fsys_type( int type) @@ -62,7 +65,7 @@ index e7d9a1c5a..782c8edd2 100644 if ( statfs( entry->path, &stat_buf ) < 0 ) { snprintf( tmpbuf, sizeof(tmpbuf), "Cannot statfs %s", entry->path ); diff --git a/agent/mibgroup/hardware/fsys/fsys_mntent.c b/agent/mibgroup/hardware/fsys/fsys_mntent.c -index 3cdcea1fb..79e6e4f72 100644 +index 3cdcea1..79e6e4f 100644 --- a/agent/mibgroup/hardware/fsys/fsys_mntent.c +++ b/agent/mibgroup/hardware/fsys/fsys_mntent.c @@ -150,6 +150,13 @@ _fsys_type( char *typename ) @@ -91,7 +94,7 @@ index 3cdcea1fb..79e6e4f72 100644 if ( NSFS_STATFS( entry->path, &stat_buf, sizeof(struct statfs), 0) < 0 ) #else diff --git a/agent/mibgroup/hardware/fsys/mnttypes.h b/agent/mibgroup/hardware/fsys/mnttypes.h -index bb1b40173..53f1cc896 100644 +index bb1b401..53f1cc8 100644 --- a/agent/mibgroup/hardware/fsys/mnttypes.h +++ b/agent/mibgroup/hardware/fsys/mnttypes.h @@ -165,6 +165,9 @@ @@ -105,7 +108,7 @@ index bb1b40173..53f1cc896 100644 #define MNTTYPE_DEVPTS "devpts" #endif diff --git a/agent/mibgroup/host/hr_filesys.c b/agent/mibgroup/host/hr_filesys.c -index 56c8b2095..8caeecf4e 100644 +index 56c8b20..8caeecf 100644 --- a/agent/mibgroup/host/hr_filesys.c +++ b/agent/mibgroup/host/hr_filesys.c @@ -834,6 +834,27 @@ Check_HR_FileSys_NFS (void) @@ -137,7 +140,7 @@ index 56c8b2095..8caeecf4e 100644 End_HR_FileSys(void) { diff --git a/agent/mibgroup/host/hr_filesys.h b/agent/mibgroup/host/hr_filesys.h -index 2f00355f3..36cd7dd08 100644 +index 2f00355..36cd7dd 100644 --- a/agent/mibgroup/host/hr_filesys.h +++ b/agent/mibgroup/host/hr_filesys.h @@ -10,6 +10,7 @@ extern void Init_HR_FileSys(void); @@ -149,7 +152,7 @@ index 2f00355f3..36cd7dd08 100644 extern int Get_FSIndex(char *); extern long Get_FSSize(char *); /* Temporary */ diff --git a/agent/mibgroup/host/hr_storage.c b/agent/mibgroup/host/hr_storage.c -index a86898451..6b459ec51 100644 +index a868984..6b459ec 100644 --- a/agent/mibgroup/host/hr_storage.c +++ b/agent/mibgroup/host/hr_storage.c @@ -544,6 +544,8 @@ really_try_next: @@ -172,7 +175,7 @@ index a86898451..6b459ec51 100644 } } else { diff --git a/agent/mibgroup/host/hrh_filesys.c b/agent/mibgroup/host/hrh_filesys.c -index 5ad82b20f..5d2102e24 100644 +index 5ad82b2..5d2102e 100644 --- a/agent/mibgroup/host/hrh_filesys.c +++ b/agent/mibgroup/host/hrh_filesys.c @@ -429,3 +429,9 @@ Check_HR_FileSys_NFS (void) @@ -186,7 +189,7 @@ index 5ad82b20f..5d2102e24 100644 + return HRFS_entry->type == NETSNMP_FS_TYPE_AUTOFS; +} diff --git a/agent/mibgroup/host/hrh_filesys.h b/agent/mibgroup/host/hrh_filesys.h -index 568917e09..c0f5d6e8c 100644 +index 568917e..c0f5d6e 100644 --- a/agent/mibgroup/host/hrh_filesys.h +++ b/agent/mibgroup/host/hrh_filesys.h @@ -10,6 +10,7 @@ extern void Init_HR_FileSys(void); @@ -198,7 +201,7 @@ index 568917e09..c0f5d6e8c 100644 extern int Get_FSIndex(char *); extern long Get_FSSize(char *); /* Temporary */ diff --git a/agent/mibgroup/host/hrh_storage.c b/agent/mibgroup/host/hrh_storage.c -index 810766946..6f8ff6c53 100644 +index 8107669..6f8ff6c 100644 --- a/agent/mibgroup/host/hrh_storage.c +++ b/agent/mibgroup/host/hrh_storage.c @@ -371,6 +371,8 @@ really_try_next: @@ -221,7 +224,7 @@ index 810766946..6f8ff6c53 100644 } } else { diff --git a/include/net-snmp/agent/hardware/fsys.h b/include/net-snmp/agent/hardware/fsys.h -index 3f2b28440..54ab9d806 100644 +index 3f2b284..54ab9d8 100644 --- a/include/net-snmp/agent/hardware/fsys.h +++ b/include/net-snmp/agent/hardware/fsys.h @@ -41,6 +41,7 @@ typedef struct netsnmp_fsys_info_s netsnmp_fsys_info; @@ -232,6 +235,3 @@ index 3f2b28440..54ab9d806 100644 #define NETSNMP_FS_FLAG_ACTIVE 0x01 #define NETSNMP_FS_FLAG_REMOTE 0x02 --- -2.24.0 - diff --git a/debian/patches/callback_print.diff b/debian/patches/callback_print.diff index 8c16fc6..76bb2ea 100644 --- a/debian/patches/callback_print.diff +++ b/debian/patches/callback_print.diff @@ -6,9 +6,11 @@ Subject: callback_print perl/SNMP/SNMP.xs | 4 ++++ 1 file changed, 4 insertions(+) +diff --git a/perl/SNMP/SNMP.xs b/perl/SNMP/SNMP.xs +index e5b5aa2..db8a6e2 100644 --- a/perl/SNMP/SNMP.xs +++ b/perl/SNMP/SNMP.xs -@@ -1296,6 +1296,10 @@ +@@ -1296,6 +1296,10 @@ void *cb_data; netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMERIC_OIDS, 1); netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, NETSNMP_OID_OUTPUT_NUMERIC); } diff --git a/debian/patches/do_not_callback_for_failed_reports.diff b/debian/patches/do_not_callback_for_failed_reports.diff deleted file mode 100644 index df9712c..0000000 --- a/debian/patches/do_not_callback_for_failed_reports.diff +++ /dev/null @@ -1,138 +0,0 @@ -From: Net-SNMP Packaging Team -Date: Mon, 5 Mar 2018 21:13:51 +1100 -Subject: do_not_callback_for_failed_reports - -=================================================================== ---- - snmplib/snmp_api.c | 106 ++++++++++++++++++++++++++--------------------------- - 1 file changed, 53 insertions(+), 53 deletions(-) - -diff --git a/snmplib/snmp_api.c b/snmplib/snmp_api.c -index 85cc720..d155c99 100644 ---- a/snmplib/snmp_api.c -+++ b/snmplib/snmp_api.c -@@ -5347,71 +5347,71 @@ _sess_process_packet(void *sessp, netsnmp_session * sp, - * should be per session ! - */ - -- if (callback == NULL -- || callback(NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE, sp, -- pdu->reqid, pdu, magic) == 1) { -- if (pdu->command == SNMP_MSG_REPORT) { -- if (sp->s_snmp_errno == SNMPERR_NOT_IN_TIME_WINDOW || -- snmpv3_get_report_type(pdu) == -- SNMPERR_NOT_IN_TIME_WINDOW) { -- /* -- * trigger immediate retry on recoverable Reports -- * * (notInTimeWindow), incr_retries == TRUE to prevent -- * * inifinite resend -- */ -- if (rp->retries <= sp->retries) { -- snmp_resend_request(slp, rp, TRUE); -- break; -- } else { -- /* We're done with retries, so no longer waiting for a response */ -- if (magic) { -- ((struct synch_state*)magic)->waiting = 0; -- } -- } -+ if (pdu->command == SNMP_MSG_REPORT) { -+ if (sp->s_snmp_errno == SNMPERR_NOT_IN_TIME_WINDOW || -+ snmpv3_get_report_type(pdu) == -+ SNMPERR_NOT_IN_TIME_WINDOW) { -+ /* -+ * trigger immediate retry on recoverable Reports -+ * * (notInTimeWindow), incr_retries == TRUE to prevent -+ * * inifinite resend -+ */ -+ if (rp->retries <= sp->retries) { -+ snmp_resend_request(slp, rp, TRUE); -+ break; - } else { -- if (SNMPV3_IGNORE_UNAUTH_REPORTS) { -- break; -- } else { /* Set the state to no longer be waiting, since we're done with retries */ -- if (magic) { -- ((struct synch_state*)magic)->waiting = 0; -- } -+ /* We're done with retries, so no longer waiting for a response */ -+ if (magic) { -+ ((struct synch_state*)magic)->waiting = 0; - } - } -+ } else { -+ if (SNMPV3_IGNORE_UNAUTH_REPORTS) { -+ break; -+ } else { /* Set the state to no longer be waiting, since we're done with retries */ -+ if (magic) { -+ ((struct synch_state*)magic)->waiting = 0; -+ } -+ } -+ } - -- /* -- * Handle engineID discovery. -- */ -- if (!sp->securityEngineIDLen && pdu->securityEngineIDLen) { -- sp->securityEngineID = -- (u_char *) malloc(pdu->securityEngineIDLen); -- if (sp->securityEngineID == NULL) { -+ /* -+ * Handle engineID discovery. -+ */ -+ if (!sp->securityEngineIDLen && pdu->securityEngineIDLen) { -+ sp->securityEngineID = -+ (u_char *) malloc(pdu->securityEngineIDLen); -+ if (sp->securityEngineID == NULL) { -+ /* -+ * TODO FIX: recover after message callback *? -+ */ -+ return -1; -+ } -+ memcpy(sp->securityEngineID, pdu->securityEngineID, -+ pdu->securityEngineIDLen); -+ sp->securityEngineIDLen = pdu->securityEngineIDLen; -+ if (!sp->contextEngineIDLen) { -+ sp->contextEngineID = -+ (u_char *) malloc(pdu-> -+ securityEngineIDLen); -+ if (sp->contextEngineID == NULL) { - /* - * TODO FIX: recover after message callback *? -- */ -+ */ - return -1; - } -- memcpy(sp->securityEngineID, pdu->securityEngineID, -+ memcpy(sp->contextEngineID, -+ pdu->securityEngineID, - pdu->securityEngineIDLen); -- sp->securityEngineIDLen = pdu->securityEngineIDLen; -- if (!sp->contextEngineIDLen) { -- sp->contextEngineID = -- (u_char *) malloc(pdu-> -- securityEngineIDLen); -- if (sp->contextEngineID == NULL) { -- /* -- * TODO FIX: recover after message callback *? -- */ -- return -1; -- } -- memcpy(sp->contextEngineID, -- pdu->securityEngineID, -- pdu->securityEngineIDLen); -- sp->contextEngineIDLen = -- pdu->securityEngineIDLen; -- } -+ sp->contextEngineIDLen = -+ pdu->securityEngineIDLen; - } - } -+ } - -+ if (callback == NULL || -+ callback(NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE, sp, -+ pdu->reqid, pdu, magic) == 1) { - /* - * Successful, so delete request. - */ diff --git a/debian/patches/fix-check-hr-filesys-autofs.patch b/debian/patches/fix-check-hr-filesys-autofs.patch index 9751a94..8c5ae0b 100644 --- a/debian/patches/fix-check-hr-filesys-autofs.patch +++ b/debian/patches/fix-check-hr-filesys-autofs.patch @@ -1,19 +1,24 @@ -Description: HOST-MIB, hr_filesys: Fix Check_HR_FileSys_AutoFs() - - On Linux getmntent() is available but getfsstat() not. Hence remove #if - HAVE_GETFSSTAT from around the HRFS_type check. +From: Ubuntu Developers +Date: Mon, 27 Jun 2022 15:01:27 +0800 +Subject: HOST-MIB, hr_filesys: Fix Check_HR_FileSys_AutoFs() +On Linux getmntent() is available but getfsstat() not. Hence remove #if +HAVE_GETFSSTAT from around the HRFS_type check. See also https://sourceforge.net/p/net-snmp/patches/1350/. Fixes: cf41e6e91015 ("HOST-MIB: Skip autofs entries"). Author: Bart Van Assche Origin: upstream, https://github.com/net-snmp/net-snmp/commit/bcb1a6b8afc444bbcd099a195e08f0b01cbc8f6b Bug: https://sourceforge.net/p/net-snmp/patches/1350/ Bug-Ubuntu: https://launchpad.net/bugs/1843036 -Index: net-snmp-5.7.3+dfsg/agent/mibgroup/host/hr_filesys.c -=================================================================== ---- net-snmp-5.7.3+dfsg.orig/agent/mibgroup/host/hr_filesys.c -+++ net-snmp-5.7.3+dfsg/agent/mibgroup/host/hr_filesys.c -@@ -846,18 +846,8 @@ Check_HR_FileSys_NFS (void) +--- + agent/mibgroup/host/hr_filesys.c | 14 ++------------ + 1 file changed, 2 insertions(+), 12 deletions(-) + +diff --git a/agent/mibgroup/host/hr_filesys.c b/agent/mibgroup/host/hr_filesys.c +index 8caeecf..4e51dc8 100644 +--- a/agent/mibgroup/host/hr_filesys.c ++++ b/agent/mibgroup/host/hr_filesys.c +@@ -841,18 +841,8 @@ Check_HR_FileSys_NFS (void) int Check_HR_FileSys_AutoFs(void) { diff --git a/debian/patches/fix-request-id-0.patch b/debian/patches/fix-request-id-0.patch index 1bb488d..ad283e8 100644 --- a/debian/patches/fix-request-id-0.patch +++ b/debian/patches/fix-request-id-0.patch @@ -1,10 +1,18 @@ -Description: fix-request-id-0 -Author: Net-SNMP Packaging Team +From: Net-SNMP Packaging Team +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: fix-request-id-0 + Reviewed-by: Craig Small Last-Update: 2019-02-07 +--- + snmplib/snmp_api.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/snmplib/snmp_api.c b/snmplib/snmp_api.c +index 554767a..6754fa6 100644 --- a/snmplib/snmp_api.c +++ b/snmplib/snmp_api.c -@@ -5367,6 +5367,9 @@ +@@ -5367,6 +5367,9 @@ _sess_async_send(void *sessp, /* * No response expected... */ diff --git a/debian/patches/fix_engineid_reprobe.diff b/debian/patches/fix_engineid_reprobe.diff index 35f4d00..972f910 100644 --- a/debian/patches/fix_engineid_reprobe.diff +++ b/debian/patches/fix_engineid_reprobe.diff @@ -1,11 +1,19 @@ -Description: Fix engineID reprobe - Do not probe for engineID when we already know it -Author: Net-SNMP Packaging Team +From: Net-SNMP Packaging Team +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Fix engineID reprobe + +Do not probe for engineID when we already know it Reviewed-by: Craig Small Last-Updated: 2019-02-07 +--- + snmplib/snmpusm.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/snmplib/snmpusm.c b/snmplib/snmpusm.c +index 3cfa126..e697c23 100644 --- a/snmplib/snmpusm.c +++ b/snmplib/snmpusm.c -@@ -3258,6 +3258,11 @@ +@@ -3258,6 +3258,11 @@ int usm_discover_engineid(void *slpv, netsnmp_session *session) { int status, i; struct session_list *slp = (struct session_list *) slpv; diff --git a/debian/patches/fix_manpage-has-errors_break_line.patch b/debian/patches/fix_manpage-has-errors_break_line.patch index a7e276d..4be5631 100644 --- a/debian/patches/fix_manpage-has-errors_break_line.patch +++ b/debian/patches/fix_manpage-has-errors_break_line.patch @@ -1,10 +1,18 @@ -Description: Fix man page groff errors -Author: Hideki Yamane +From: Hideki Yamane +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Fix man page groff errors + Reviewed-by: Craig Small Last-Update: 2019-02-07 +--- + man/netsnmp_config_api.3.def | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/man/netsnmp_config_api.3.def b/man/netsnmp_config_api.3.def +index 90b20d9..57baea8 100644 --- a/man/netsnmp_config_api.3.def +++ b/man/netsnmp_config_api.3.def -@@ -365,7 +365,7 @@ +@@ -365,7 +365,7 @@ function that it should abort the operation of the application. SNMPCONFPATH A colon separated list of directories to search for configuration files in. diff --git a/debian/patches/fix_perl_bulk_gets.diff b/debian/patches/fix_perl_bulk_gets.diff index 6960537..c2af4b4 100644 --- a/debian/patches/fix_perl_bulk_gets.diff +++ b/debian/patches/fix_perl_bulk_gets.diff @@ -1,10 +1,18 @@ -Description: Fix perl bulk gets -Author: Net-SNMP Packaging Team +From: Net-SNMP Packaging Team +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Fix perl bulk gets + Reviewed-by: Craig Small Last-Updated: 2019-02-07 +--- + perl/SNMP/SNMP.pm | 53 ++++++++++++++++++++++++----------------------------- + 1 file changed, 24 insertions(+), 29 deletions(-) + +diff --git a/perl/SNMP/SNMP.pm b/perl/SNMP/SNMP.pm +index 2267b76..ae71601 100644 --- a/perl/SNMP/SNMP.pm +++ b/perl/SNMP/SNMP.pm -@@ -866,22 +866,11 @@ +@@ -866,22 +866,11 @@ sub _gettable_do_it() { $vbl = $_[$#_] if ($state->{'options'}{'callback'}); @@ -31,7 +39,7 @@ Last-Updated: 2019-02-07 for (my $i = 0; $i <= $#$vbl; $i++) { my $row_oid = SNMP::translateObj($vbl->[$i][0]); -@@ -890,9 +879,11 @@ +@@ -890,9 +879,11 @@ sub _gettable_do_it() { my $row_value = $vbl->[$i][2]; my $row_type = $vbl->[$i][3]; @@ -46,7 +54,7 @@ Last-Updated: 2019-02-07 if ($row_type eq "OBJECTID") { -@@ -903,26 +894,30 @@ +@@ -903,26 +894,30 @@ sub _gettable_do_it() { } diff --git a/debian/patches/fix_regular_expression.patch b/debian/patches/fix_regular_expression.patch index 06ca27c..60aad46 100644 --- a/debian/patches/fix_regular_expression.patch +++ b/debian/patches/fix_regular_expression.patch @@ -1,23 +1,31 @@ -Description: Fix regular expression - >>> import os - >>> import re - >>> import string - >>> import sys - >>> netsnmp_libs="-Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu -lnetsnmp -lcrypto -lm" - >>> print netsnmp_libs - -Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu -lnetsnmp -lcrypto -lm - >>> re.findall(r"-l(\S+)", netsnmp_libs) - ['inux-gnu', 'netsnmp', 'crypto', 'm'] - . - Just inserting space will fix this. - >>> re.findall(r" -l(\S+)", netsnmp_libs) - ['netsnmp', 'crypto', 'm'] -Author: Hideki Yamane +From: Hideki Yamane +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Fix regular expression + +>>> import os +>>> import re +>>> import string +>>> import sys +>>> netsnmp_libs="-Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu -lnetsnmp -lcrypto -lm" +>>> print netsnmp_libs +-Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu -lnetsnmp -lcrypto -lm +>>> re.findall(r"-l(\S+)", netsnmp_libs) +['inux-gnu', 'netsnmp', 'crypto', 'm'] + + Just inserting space will fix this. +>>> re.findall(r" -l(\S+)", netsnmp_libs) +['netsnmp', 'crypto', 'm'] Reviewed-by: Craig Small LAst-Update: 2019-02-07 +--- + python/setup.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/python/setup.py b/python/setup.py +index a62aabf..4e12195 100644 --- a/python/setup.py +++ b/python/setup.py -@@ -18,14 +18,14 @@ +@@ -18,14 +18,14 @@ if intree: netsnmp_libs = os.popen(basedir+'/net-snmp-config --libs').read() libdir = os.popen(basedir+'/net-snmp-config --build-lib-dirs '+basedir).read() incdir = os.popen(basedir+'/net-snmp-config --build-includes '+basedir).read() + " " + os.popen(basedir+'/net-snmp-config --base-cflags '+basedir).read() diff --git a/debian/patches/fix_spelling_error.patch b/debian/patches/fix_spelling_error.patch index 5356d87..903d344 100644 --- a/debian/patches/fix_spelling_error.patch +++ b/debian/patches/fix_spelling_error.patch @@ -1,12 +1,20 @@ -Description: Spelling Errors - Fix some minor spelling errors in the code -Author: Net-SNMP Packaging Team +From: Net-SNMP Packaging Team +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Spelling Errors + +Fix some minor spelling errors in the code Reviewed-by: Craig Small Last-Update: 2019-02-07 +--- + apps/snmpnetstat/inet.c | 2 +- + apps/snmpnetstat/inet6.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) +diff --git a/apps/snmpnetstat/inet.c b/apps/snmpnetstat/inet.c +index 441df8a..48e361f 100644 --- a/apps/snmpnetstat/inet.c +++ b/apps/snmpnetstat/inet.c -@@ -452,7 +452,7 @@ +@@ -452,7 +452,7 @@ icmp_stats(const char *name) struct stat_table icmpstats_tbl[] = { { 1, "%14lu total message%s received"}, { 2, "%14lu message%s dropped due to errors"}, @@ -15,9 +23,11 @@ Last-Update: 2019-02-07 {15, "%14lu output message%s discarded"}, { 0, ""} }; +diff --git a/apps/snmpnetstat/inet6.c b/apps/snmpnetstat/inet6.c +index 31c7495..68e80e5 100644 --- a/apps/snmpnetstat/inet6.c +++ b/apps/snmpnetstat/inet6.c -@@ -333,7 +333,7 @@ +@@ -333,7 +333,7 @@ icmp6_stats(const char *name) struct stat_table icmp6stats_tbl[] = { { 1, "%14d total message%s received"}, { 2, "%14d message%s dropped due to errors"}, diff --git a/debian/patches/let_perl_access_engineid.diff b/debian/patches/let_perl_access_engineid.diff index 1493de2..40b3f5b 100644 --- a/debian/patches/let_perl_access_engineid.diff +++ b/debian/patches/let_perl_access_engineid.diff @@ -1,10 +1,19 @@ -Description: Let Perl access EngineID -Author: Net-SNMP Packaging Team +From: Net-SNMP Packaging Team +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Let Perl access EngineID + Reviewed-by: Craig Small Last-Update: 2019-02-07 +--- + perl/SNMP/SNMP.pm | 21 +++++++++++++++++++++ + perl/SNMP/SNMP.xs | 44 ++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 65 insertions(+) + +diff --git a/perl/SNMP/SNMP.pm b/perl/SNMP/SNMP.pm +index 361b3b7..2267b76 100644 --- a/perl/SNMP/SNMP.pm +++ b/perl/SNMP/SNMP.pm -@@ -1243,6 +1243,16 @@ +@@ -1243,6 +1243,16 @@ sub inform { return(wantarray() ? @res : $res[0]); } @@ -21,7 +30,7 @@ Last-Update: 2019-02-07 package SNMP::TrapSession; @SNMP::TrapSession::ISA = ('SNMP::Session'); -@@ -2043,6 +2053,17 @@ +@@ -2043,6 +2053,17 @@ as well. =back @@ -39,12 +48,15 @@ Last-Update: 2019-02-07 =back =head1 SNMP::TrapSession +diff --git a/perl/SNMP/SNMP.xs b/perl/SNMP/SNMP.xs +index b0cc523..e5b5aa2 100644 --- a/perl/SNMP/SNMP.xs +++ b/perl/SNMP/SNMP.xs -@@ -4739,6 +4739,50 @@ +@@ -4738,6 +4738,50 @@ done: - char * + ++char * +snmp_get_sec_engine_id(sess_ref) + SV * sess_ref + CODE: @@ -88,7 +100,6 @@ Last-Update: 2019-02-07 + netsnmp_free(RETVAL); + + -+char * + char * snmp_get_type(tag, best_guess) char * tag - int best_guess diff --git a/debian/patches/lp1871307-log-once-proc-net-if_inet6-failure.patch b/debian/patches/lp1871307-log-once-proc-net-if_inet6-failure.patch index e1d7a5d..51bc3a6 100644 --- a/debian/patches/lp1871307-log-once-proc-net-if_inet6-failure.patch +++ b/debian/patches/lp1871307-log-once-proc-net-if_inet6-failure.patch @@ -1,4 +1,6 @@ -Description: MIB-II: Only log once that opening /proc/net/if_inet6 failed +From: Ubuntu Developers +Date: Mon, 27 Jun 2022 15:01:27 +0800 +Subject: MIB-II: Only log once that opening /proc/net/if_inet6 failed If IPv6 has been disabled (ipv6.disable=1) then opening /proc/net/if_inet6 fails. Only log this once instead of thousand of times a day. @@ -14,9 +16,11 @@ Last-Update: 2020-04-09 agent/mibgroup/ip-mib/data_access/ipaddress_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c +index 8743130..c9e3536 100644 --- a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c +++ b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c -@@ -234,7 +234,7 @@ +@@ -234,7 +234,7 @@ _load_v6(netsnmp_container *container, int idx_offset) #define PROCFILE "/proc/net/if_inet6" if (!(in = fopen(PROCFILE, "r"))) { diff --git a/debian/patches/mysql8-replace-bool.patch b/debian/patches/mysql8-replace-bool.patch index 8c66f4a..f300fb4 100644 --- a/debian/patches/mysql8-replace-bool.patch +++ b/debian/patches/mysql8-replace-bool.patch @@ -1,5 +1,8 @@ -apps/snmptrapd_sql: Fix build against MySQL 8 +From: Ubuntu Developers +Date: Mon, 27 Jun 2022 15:01:27 +0800 +Subject: mysql8-replace-bool +apps/snmptrapd_sql: Fix build against MySQL 8 See also https://sourceforge.net/p/net-snmp/bugs/2922/. [bvanassche: changed 'int' into 'char'] @@ -12,10 +15,15 @@ Bug-Ubuntu: https://bugs.launchpad.net/bugs/1814270 Applied-Upstream: v5.8.rc4-180-g9f4af8c42 (drop after v5.8.1.pre1) Reviewed-by: Rafael David Tinoco Last-Update: 2019-12-16 +--- + apps/snmptrapd_sql.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/apps/snmptrapd_sql.c b/apps/snmptrapd_sql.c +index 6126ca9..32a3b17 100644 --- a/apps/snmptrapd_sql.c +++ b/apps/snmptrapd_sql.c -@@ -194,7 +194,7 @@ typedef struct sql_buf_t { +@@ -199,7 +199,7 @@ typedef struct sql_buf_t { * static bind structures, plus 2 static buffers to bind to. */ static MYSQL_BIND _tbind[TBIND_MAX], _vbind[VBIND_MAX]; diff --git a/debian/patches/netsnmp_mib_api_3_groff b/debian/patches/netsnmp_mib_api_3_groff index 0934655..1133134 100644 --- a/debian/patches/netsnmp_mib_api_3_groff +++ b/debian/patches/netsnmp_mib_api_3_groff @@ -1,6 +1,16 @@ +From: Ubuntu Developers +Date: Mon, 27 Jun 2022 15:01:27 +0800 +Subject: netsnmp_mib_api_3_groff + +--- + man/netsnmp_mib_api.3.def | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/man/netsnmp_mib_api.3.def b/man/netsnmp_mib_api.3.def +index 4c297cd..e3d1e1b 100644 --- a/man/netsnmp_mib_api.3.def +++ b/man/netsnmp_mib_api.3.def -@@ -278,7 +278,9 @@ +@@ -278,7 +278,9 @@ A colon separated list of MIB modules to load. The default list of modules will depend on how the Net-SNMP software was originally compiled, but is typically: .br diff --git a/debian/patches/parsing_default_port b/debian/patches/parsing_default_port index 514cda6..87657f7 100644 --- a/debian/patches/parsing_default_port +++ b/debian/patches/parsing_default_port @@ -1,14 +1,23 @@ -Description: Set default port of 0 when parsing addresses - Default port should be zero when address parsing so other parts of the - library can set the emphereal source port. -Author: Bill Fenner +From: Ubuntu Developers +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Set default port of 0 when parsing addresses + +Default port should be zero when address parsing so other parts of the +library can set the emphereal source port. Origin: https://sourceforge.net/p/net-snmp/code/ci/06a02b7c708c1ea2bf67e59c333001e8ce128dff Bug: https://sourceforge.net/p/net-snmp/bugs/2978/ Reviewed-by: Craig Small Last-Update: 2019-09-30 +--- + snmplib/transports/snmpUDPIPv4BaseDomain.c | 2 +- + snmplib/transports/snmpUDPIPv6Domain.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/snmplib/transports/snmpUDPIPv4BaseDomain.c b/snmplib/transports/snmpUDPIPv4BaseDomain.c +index 433eb80..07e46c4 100644 --- a/snmplib/transports/snmpUDPIPv4BaseDomain.c +++ b/snmplib/transports/snmpUDPIPv4BaseDomain.c -@@ -317,7 +317,7 @@ +@@ -317,7 +317,7 @@ netsnmp_udpipv4base_tspec_transport(netsnmp_tdomain_spec *tspec) if (NULL != tspec->source) { struct sockaddr_in src_addr, *srcp = &src_addr; /** get sockaddr from source */ @@ -17,9 +26,11 @@ Last-Update: 2019-09-30 return NULL; return netsnmp_udpipv4base_transport_with_source(&addr, local, srcp); } else { +diff --git a/snmplib/transports/snmpUDPIPv6Domain.c b/snmplib/transports/snmpUDPIPv6Domain.c +index 3d003f2..bb87551 100644 --- a/snmplib/transports/snmpUDPIPv6Domain.c +++ b/snmplib/transports/snmpUDPIPv6Domain.c -@@ -383,7 +383,7 @@ +@@ -383,7 +383,7 @@ netsnmp_udpipv6base_tspec_transport(netsnmp_tdomain_spec *tspec) if (NULL != tspec->source) { struct sockaddr_in6 src_addr, *srcp = &src_addr; /** get sockaddr from source */ @@ -28,7 +39,7 @@ Last-Update: 2019-09-30 return NULL; return netsnmp_udp6_transport_with_source(&addr, local, srcp); } else { -@@ -464,7 +464,7 @@ +@@ -464,7 +464,7 @@ netsnmp_udp6_transport(const struct sockaddr_in6 *addr, int local) NETSNMP_DS_LIB_CLIENT_ADDR); if (client_socket) { struct sockaddr_in6 client_addr; diff --git a/debian/patches/pingmib_perl_path b/debian/patches/pingmib_perl_path index d2a14d6..b48a8b8 100644 --- a/debian/patches/pingmib_perl_path +++ b/debian/patches/pingmib_perl_path @@ -1,8 +1,16 @@ -Description: Use perl path directly - Original script used /usr/bin/env perl to find the interpreter. This is - against Debian policy 10.4 -Author: Craig Small +From: Craig Small +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Use perl path directly + +Original script used /usr/bin/env perl to find the interpreter. This is +against Debian policy 10.4 Last-Update: 2019-01-05 +--- + perl/SNMP/examples/pingmib.pl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/perl/SNMP/examples/pingmib.pl b/perl/SNMP/examples/pingmib.pl +index e6aa792..a61d831 100755 --- a/perl/SNMP/examples/pingmib.pl +++ b/perl/SNMP/examples/pingmib.pl @@ -1,4 +1,4 @@ diff --git a/debian/patches/series b/debian/patches/series index 8160545..37f0f8c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -21,7 +21,6 @@ fix-request-id-0.patch 0027-fix-455707-traptoemail-use-FQDN.patch let_perl_access_engineid.diff fix_perl_bulk_gets.diff -#do_not_callback_for_failed_reports.diff callback_print.diff fix_engineid_reprobe.diff snmpwalk_args_in_snmpcheck diff --git a/debian/patches/snmpcmd_1_groff b/debian/patches/snmpcmd_1_groff index e86979a..9c0ff79 100644 --- a/debian/patches/snmpcmd_1_groff +++ b/debian/patches/snmpcmd_1_groff @@ -1,6 +1,16 @@ +From: Ubuntu Developers +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: snmpcmd_1_groff + +--- + man/snmpcmd.1.def | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/man/snmpcmd.1.def b/man/snmpcmd.1.def +index 141d505..c92e100 100644 --- a/man/snmpcmd.1.def +++ b/man/snmpcmd.1.def -@@ -905,8 +905,9 @@ +@@ -905,8 +905,9 @@ The standard prefix for object identifiers (when using UCD-style output). Defaults to .iso.org.dod.internet.mgmt.mib\-2 .IP MIBS The list of MIBs to load. Defaults to diff --git a/debian/patches/snmpd_pidfile_mode b/debian/patches/snmpd_pidfile_mode index 7ca3077..d3f74a1 100644 --- a/debian/patches/snmpd_pidfile_mode +++ b/debian/patches/snmpd_pidfile_mode @@ -1,13 +1,21 @@ -Description: Make snmpd pidfile word-readable - Almost all pid files are mode 644, including snmptrapd. For some unknown - reason, snmpd had mode 0600. Now it has 644 like everyone else. -Author: Craig Small +From: Craig Small +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: Make snmpd pidfile word-readable + +Almost all pid files are mode 644, including snmptrapd. For some unknown +reason, snmpd had mode 0600. Now it has 644 like everyone else. Bug-Debian: https://bugs.debian.org/528103 Reviewed-by: Craig Small Last-Update: 2019-04-30 +--- + agent/snmpd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/agent/snmpd.c b/agent/snmpd.c +index 6566354..b838d4d 100644 --- a/agent/snmpd.c +++ b/agent/snmpd.c -@@ -984,7 +984,7 @@ +@@ -984,7 +984,7 @@ main(int argc, char *argv[]) * already exists. */ unlink(pid_file); diff --git a/debian/patches/snmplib_error_subcontainer b/debian/patches/snmplib_error_subcontainer index 634bee6..4454e48 100644 --- a/debian/patches/snmplib_error_subcontainer +++ b/debian/patches/snmplib_error_subcontainer @@ -1,15 +1,23 @@ -Description: Change logging on ia_addr message - Message about error with subcontainers is just debug, not a filtered by - keyword debug. This (along with logging options set to high in the init - script) made snmpd very chatty. -Author: Pik Master +From: Pik Master +Date: Mon, 27 Jun 2022 15:01:27 +0800 +Subject: Change logging on ia_addr message + +Message about error with subcontainers is just debug, not a filtered by +keyword debug. This (along with logging options set to high in the init +script) made snmpd very chatty. Origin: upstream, http://sourceforge.net/p/net-snmp/patches/1322/ Bug-Debian: https://bugs.debian.org/684721 Reviewed-by: Craig Small Last-Update: 2019-10-10 +--- + snmplib/container.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/snmplib/container.c b/snmplib/container.c +index c5cdede..c8aead4 100644 --- a/snmplib/container.c +++ b/snmplib/container.c -@@ -334,8 +334,8 @@ +@@ -334,8 +334,8 @@ int CONTAINER_INSERT_HELPER(netsnmp_container* x, const void* k) if(x) { int rc = x->insert(x,k); if(rc) diff --git a/debian/patches/snmptranslate.1.patch b/debian/patches/snmptranslate.1.patch index 0e79451..8054345 100644 --- a/debian/patches/snmptranslate.1.patch +++ b/debian/patches/snmptranslate.1.patch @@ -1,10 +1,18 @@ -Description: snmptranslate.1 groff errors -Author: Hideki Yamane +From: Hideki Yamane +Date: Mon, 27 Jun 2022 15:01:26 +0800 +Subject: snmptranslate.1 groff errors + Reviewed-by: Craig Small Last-Update: 2019-02-07 +--- + man/snmptranslate.1.def | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/man/snmptranslate.1.def b/man/snmptranslate.1.def +index 550a4f7..53ef39d 100644 --- a/man/snmptranslate.1.def +++ b/man/snmptranslate.1.def -@@ -179,22 +179,22 @@ +@@ -179,22 +179,22 @@ will print the following tree: .nf +--system(1) | @@ -35,7 +43,7 @@ Last-Update: 2019-02-07 | Textual Convention: TimeStamp | +--sysORTable(9) -@@ -202,11 +202,11 @@ +@@ -202,11 +202,11 @@ will print the following tree: +--sysOREntry(1) | +-- ---- Integer sysORIndex(1) diff --git a/debian/patches/snmpwalk_args_in_snmpcheck b/debian/patches/snmpwalk_args_in_snmpcheck index c2fc00c..63a4b01 100644 --- a/debian/patches/snmpwalk_args_in_snmpcheck +++ b/debian/patches/snmpwalk_args_in_snmpcheck @@ -10,10 +10,14 @@ Closes: #898197 References: https://bugs.kali.org/view.php?id=4655 --- + local/snmpcheck.def | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) +diff --git a/local/snmpcheck.def b/local/snmpcheck.def +index df3450e..445078c 100755 --- a/local/snmpcheck.def +++ b/local/snmpcheck.def -@@ -27,8 +27,8 @@ $mibupdateconfig="$mibheadall.VERSIONMIB +@@ -27,8 +27,8 @@ $mibupdateconfig="$mibheadall.VERSIONMIBNUM.VERUPDATECONFIG"; '.LOADAVEMIBNUM.1' => 1, '.ERRORMIBNUM' => 1); $errlog="/net/tyfon/1/OV/log/ece-log";