From afbe2a1ac9c2c1c4f190dd1b463346769125e267 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 24 Oct 2010 20:33:01 +0000 Subject: [PATCH] - updated to 5.6 - updated config-noflags,link,use-rpm-hrmib patches - removed obsolete missing-bcast,lm_sensors_3,tcp-pid,loadave-writable patches - added nodebug patch (fixes build with --disable-debugging) Changed files: net-snmp-5.5-missing-bcast.patch -> 1.2 net-snmp-5.5-tcp-pid.patch -> 1.2 net-snmp-config-noflags.patch -> 1.6 net-snmp-link.patch -> 1.13 net-snmp-lm_sensors_3.patch -> 1.4 net-snmp-loadave-writable.patch -> 1.9 net-snmp-use-rpm-hrmib.patch -> 1.4 net-snmp.spec -> 1.167 --- net-snmp-5.5-missing-bcast.patch | 27 ----- net-snmp-5.5-tcp-pid.patch | 60 ----------- net-snmp-config-noflags.patch | 10 +- net-snmp-link.patch | 49 ++++----- net-snmp-lm_sensors_3.patch | 14 --- net-snmp-loadave-writable.patch | 172 ------------------------------- net-snmp-use-rpm-hrmib.patch | 84 +++++++-------- net-snmp.spec | 41 ++++---- 8 files changed, 86 insertions(+), 371 deletions(-) delete mode 100644 net-snmp-5.5-missing-bcast.patch delete mode 100644 net-snmp-5.5-tcp-pid.patch delete mode 100644 net-snmp-lm_sensors_3.patch delete mode 100644 net-snmp-loadave-writable.patch diff --git a/net-snmp-5.5-missing-bcast.patch b/net-snmp-5.5-missing-bcast.patch deleted file mode 100644 index b05eb01..0000000 --- a/net-snmp-5.5-missing-bcast.patch +++ /dev/null @@ -1,27 +0,0 @@ -544849 - snmpd segfaults when openvpn is running - -Source: upstream, svn rev. 17931 - -Clear the bcastentry in every loop iteration. If not cleared, the bcastentry -might be insterted into the container twice, when processing an interface -without broadcast address (like OpenVPN's tun0). - -diff -up net-snmp-5.5/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c.new net-snmp-5.5/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c ---- net-snmp-5.5/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c.new 2009-05-06 23:59:20.000000000 +0200 -+++ net-snmp-5.5/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c 2009-12-21 15:58:02.000000000 +0100 -@@ -135,7 +135,6 @@ _netsnmp_ioctl_ipaddress_container_load_ - struct ifreq *ifrp; - struct sockaddr save_addr; - struct sockaddr_in * si; -- netsnmp_ipaddress_entry *entry, *bcastentry = NULL; - struct address_flag_info addr_info; - in_addr_t ipval; - _ioctl_extras *extras; -@@ -156,6 +155,7 @@ _netsnmp_ioctl_ipaddress_container_load_ - - ifrp = ifc.ifc_req; - for(i=0; i < interfaces; ++i, ++ifrp) { -+ netsnmp_ipaddress_entry *entry, *bcastentry = NULL; - - DEBUGMSGTL(("access:ipaddress:container", - " interface %d, %s\n", i, ifrp->ifr_name)); diff --git a/net-snmp-5.5-tcp-pid.patch b/net-snmp-5.5-tcp-pid.patch deleted file mode 100644 index 3d67652..0000000 --- a/net-snmp-5.5-tcp-pid.patch +++ /dev/null @@ -1,60 +0,0 @@ -551030 - Memory corruption in TCP-MIB::tcpListenerProcess - -Source: upstream, SVN rev. 17861 - - CHANGES: snmpd: Fixed invalid access to memory in TCP-MIB - -diff --git a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c -index 7259bf8..e274d19 100644 ---- a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c -+++ b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.c -@@ -155,6 +155,8 @@ tcpConnectionTable_rowreq_ctx_cleanup(tcpConnectionTable_rowreq_ctx * - /* - * TODO:211:o: |-> Perform extra tcpConnectionTable rowreq cleanup. - */ -+ netsnmp_access_tcpconn_entry_free(rowreq_ctx->data); -+ rowreq_ctx->data = NULL; - } /* tcpConnectionTable_rowreq_ctx_cleanup */ - - /** -diff --git a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c -index 807dd9d..fec6bef 100644 ---- a/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c -+++ b/agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access.c -@@ -256,7 +256,8 @@ tcpConnectionTable_container_load(netsnmp_container *container) - * free the container. we've either claimed each entry, or released it, - * so the dal function doesn't need to clear the container. - */ -- netsnmp_access_tcpconn_container_free(raw_data, 0); -+ netsnmp_access_tcpconn_container_free(raw_data, -+ NETSNMP_ACCESS_TCPCONN_FREE_DONT_CLEAR); - - DEBUGMSGT(("verbose:tcpConnectionTable:tcpConnectionTable_cache_load", - "%d records\n", (int)CONTAINER_SIZE(container))); -diff --git a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.c b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.c -index f3009dd..ebd672b 100644 ---- a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.c -+++ b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable.c -@@ -154,6 +154,8 @@ tcpListenerTable_rowreq_ctx_cleanup(tcpListenerTable_rowreq_ctx * - /* - * TODO:211:o: |-> Perform extra tcpListenerTable rowreq cleanup. - */ -+ netsnmp_access_tcpconn_entry_free(rowreq_ctx->data); -+ rowreq_ctx->data = NULL; - } /* tcpListenerTable_rowreq_ctx_cleanup */ - - /** -diff --git a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c -index 09ba655..b25d5db 100644 ---- a/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c -+++ b/agent/mibgroup/tcp-mib/tcpListenerTable/tcpListenerTable_data_access.c -@@ -254,7 +254,8 @@ tcpListenerTable_container_load(netsnmp_container *container) - * free the container. we've either claimed each entry, or released it, - * so the dal function doesn't need to clear the container. - */ -- netsnmp_access_tcpconn_container_free(raw_data, 0); -+ netsnmp_access_tcpconn_container_free(raw_data, -+ NETSNMP_ACCESS_TCPCONN_FREE_DONT_CLEAR); - - DEBUGMSGT(("verbose:tcpListenerTable:tcpListenerTable_cache_load", - "%d records\n", (int)CONTAINER_SIZE(container))); diff --git a/net-snmp-config-noflags.patch b/net-snmp-config-noflags.patch index b0f021a..3c015bb 100644 --- a/net-snmp-config-noflags.patch +++ b/net-snmp-config-noflags.patch @@ -1,15 +1,15 @@ ---- net-snmp-5.2.1/net-snmp-config.in.orig 2005-01-05 16:12:52.000000000 +0100 -+++ net-snmp-5.2.1/net-snmp-config.in 2005-02-26 14:58:33.779999232 +0100 +--- net-snmp-5.6/net-snmp-config.in.orig 2010-05-30 22:19:04.000000000 +0200 ++++ net-snmp-5.6/net-snmp-config.in 2010-10-24 10:12:12.899734339 +0200 @@ -46,7 +46,7 @@ includedir=@includedir@ libdir=@libdir@ datarootdir=@datarootdir@ -NSC_LDFLAGS="@LDFLAGS@" +NSC_LDFLAGS="" + NSC_LNETSNMPLIBS="@LNETSNMPLIBS@" NSC_INCLUDEDIR=${includedir} NSC_LIBDIR=-L${libdir} - NSC_LIBS="@LIBS@" -@@ -89,10 +89,10 @@ +@@ -124,10 +124,10 @@ ;; #################################################### compile --base-cflags) @@ -22,7 +22,7 @@ ;; --srcdir) echo $NSC_SRCDIR -@@ -445,7 +445,7 @@ +@@ -585,7 +585,7 @@ echo "Ack. Can't create $tmpfile." exit 1 fi diff --git a/net-snmp-link.patch b/net-snmp-link.patch index 5aee397..ef64864 100644 --- a/net-snmp-link.patch +++ b/net-snmp-link.patch @@ -1,27 +1,25 @@ ---- net-snmp-5.4.1/agent/Makefile.in.orig 2007-07-05 01:26:56.000000000 +0200 -+++ net-snmp-5.4.1/agent/Makefile.in 2007-09-08 16:50:07.310018380 +0200 -@@ -74,8 +74,8 @@ +--- net-snmp-5.6/agent/Makefile.in.orig 2010-06-08 23:05:11.000000000 +0200 ++++ net-snmp-5.6/agent/Makefile.in 2010-10-24 10:33:36.007741043 +0200 +@@ -108,7 +108,7 @@ # # how to build it info # -USELIBS = ../snmplib/libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) --HELPERLIB = helpers/libnetsnmphelpers.$(LIB_EXTENSION)$(LIB_VERSION) +USELIBS = $(top_builddir)/snmplib/libnetsnmp.la -+HELPERLIB = $(top_builddir)/agent/helpers/libnetsnmphelpers.la AGENTLIB = libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) MIBLIB = libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) -@@ -143,11 +143,11 @@ +@@ -249,11 +249,11 @@ libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} $(USELIBS) -- $(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) -+ $(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) $(LDFLAGS) ${LAGENTLIBS} $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) +- $(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@ ++ $(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) $(LDFLAGS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@ $(RANLIB) $(AGENTLIB) - libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(HELPERLIB) $(AGENTLIB) $(USELIBS) -- $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(HELPERLIB) $(AGENTLIB) $(USELIBS) $(LDFLAGS) ${LMIBLIBS} $(LIB_LD_LIBS) -+ $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(HELPERLIB) $(AGENTLIB) $(USELIBS) $(LDFLAGS) ${LMIBLIBS} $(LIB_LD_LIBS) + libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(AGENTLIB) $(USELIBS) +- $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) ${LMIBLIBS} $(LIB_LD_LIBS) @AGENTLIBS@ ++ $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(LDFLAGS) $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ ${LMIBLIBS} $(LIB_LD_LIBS) @AGENTLIBS@ $(RANLIB) $(MIBLIB) agentlib: $(AGENTLIB) @@ -59,9 +57,9 @@ installsubdirlibs: @if test "$(SUBDIRS)" != ""; then \ ---- net-snmp-5.4.1/snmplib/Makefile.in.orig 2007-06-18 23:34:43.000000000 +0200 -+++ net-snmp-5.4.1/snmplib/Makefile.in 2007-09-08 16:48:42.425181069 +0200 -@@ -128,7 +128,6 @@ +--- net-snmp-5.6/snmplib/Makefile.in.orig 2010-05-27 06:06:32.000000000 +0200 ++++ net-snmp-5.6/snmplib/Makefile.in 2010-10-24 10:35:59.615743558 +0200 +@@ -134,7 +134,6 @@ # libraries INSTALLLIBS=libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) @@ -69,25 +67,16 @@ # # Things to build -@@ -191,10 +190,6 @@ - $(LIB_LD_CMD) $@ $(TOBJS) $(LDFLAGS) @LNETSNMPLIBS@ - $(RANLIB) $@ - --libsnmp.$(LIB_EXTENSION)$(LIB_VERSION): $(TOBJS) -- $(LIB_LD_CMD) $@ $(TOBJS) $(LDFLAGS) @LNETSNMPLIBS@ -- $(RANLIB) $@ -- - # - # internal test objects - # ---- net-snmp-5.5/snmplib/Makefile.in~ 2010-06-05 20:17:39.941541617 +0200 -+++ net-snmp-5.5/snmplib/Makefile.in 2010-06-06 09:25:54.332457357 +0200 -@@ -194,7 +194,7 @@ +@@ -200,11 +199,7 @@ # how to build the libraries. libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION): $(TOBJS) -- $(LIB_LD_CMD) $@ $(TOBJS) $(LDFLAGS) @LNETSNMPLIBS@ -+ $(LIB_LD_CMD) $@ $(TOBJS) $(LDFLAGS) @LNETSNMPLIBS@ @LIBS@ +- $(LIB_LD_CMD) $@ $(TOBJS) @LD_NO_UNDEFINED@ $(LDFLAGS) @LNETSNMPLIBS@ +- $(RANLIB) $@ +- +-libsnmp.$(LIB_EXTENSION)$(LIB_VERSION): $(TOBJS) +- $(LIB_LD_CMD) $@ $(TOBJS) @LD_NO_UNDEFINED@ $(LDFLAGS) @LNETSNMPLIBS@ ++ $(LIB_LD_CMD) $@ $(TOBJS) @LD_NO_UNDEFINED@ $(LDFLAGS) @LNETSNMPLIBS@ @LIBS@ $(RANLIB) $@ # diff --git a/net-snmp-lm_sensors_3.patch b/net-snmp-lm_sensors_3.patch deleted file mode 100644 index db10381..0000000 --- a/net-snmp-lm_sensors_3.patch +++ /dev/null @@ -1,14 +0,0 @@ -Compile with lm_sensors3. - -diff -up net-snmp-5.5/agent/mibgroup/hardware/sensors.h.orig net-snmp-5.5/agent/mibgroup/hardware/sensors.h ---- net-snmp-5.5/agent/mibgroup/hardware/sensors.h.orig 2009-04-24 00:53:26.000000000 +0200 -+++ net-snmp-5.5/agent/mibgroup/hardware/sensors.h 2009-09-29 12:00:18.000000000 +0200 -@@ -7,7 +7,7 @@ config_require(hardware/sensors/picld_se - config_require(hardware/sensors/kstat_sensors) - # endif - #else --config_require(hardware/sensors/lmsensors_v2) -+config_require(hardware/sensors/lmsensors_v3) - #endif - - /* config_require(hardware/sensors/dummy_sensors) */ diff --git a/net-snmp-loadave-writable.patch b/net-snmp-loadave-writable.patch deleted file mode 100644 index 196f973..0000000 --- a/net-snmp-loadave-writable.patch +++ /dev/null @@ -1,172 +0,0 @@ -This patch makes "load X Y Z" snmpsettable via snmpset, - -it behaves the same as sysName.0, once written in snmpd.conf, it becames -readonly. - -Signed-off-by: Elan Ruusamäe -Upstream-Tracker: https://sourceforge.net/tracker/?func=detail&aid=2931446&group_id=12694&atid=312694 - ---- net-snmp/agent/mibgroup/ucd-snmp/loadave.c 2010/07/29 14:58:47 19264 -+++ net-snmp/agent/mibgroup/ucd-snmp/loadave.c 2010/08/11 22:07:58 19294 -@@ -128,7 +128,19 @@ - #include "util_funcs/header_simple_table.h" - #include "kernel.h" - --double maxload[3]; -+static double maxload[3]; -+static int laConfigSet = 0; -+ -+static int -+loadave_store_config(int a, int b, void *c, void *d) -+{ -+ char line[SNMP_MAXBUF_SMALL]; -+ if (laConfigSet > 0) { -+ snprintf(line, SNMP_MAXBUF_SMALL, "pload %.02f %.02f %.02f", maxload[0], maxload[1], maxload[2]); -+ snmpd_store_config(line); -+ } -+ return SNMPERR_SUCCESS; -+} - - void - init_loadave(void) -@@ -145,7 +157,7 @@ - var_extensible_loadave, 1, {ERRORNAME}}, - {LOADAVE, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, - var_extensible_loadave, 1, {LOADAVE}}, -- {LOADMAXVAL, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, -+ {LOADMAXVAL, ASN_OCTET_STR, NETSNMP_OLDAPI_RWRITE, - var_extensible_loadave, 1, {LOADMAXVAL}}, - {LOADAVEINT, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, - var_extensible_loadave, 1, {LOADAVEINT}}, -@@ -172,9 +184,22 @@ - REGISTER_MIB("ucd-snmp/loadave", extensible_loadave_variables, - variable2, loadave_variables_oid); - -+ laConfigSet = 0; -+ - snmpd_register_config_handler("load", loadave_parse_config, - loadave_free_config, - "max1 [max5] [max15]"); -+ -+ snmpd_register_config_handler("pload", -+ loadave_parse_config, NULL, NULL); -+ -+ -+ /* -+ * we need to be called back later -+ */ -+ snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, -+ loadave_store_config, NULL); -+ - } - - void -@@ -182,6 +207,25 @@ - { - int i; - -+ if (strcmp(token, "pload") == 0) { -+ if (laConfigSet < 0) { -+ snmp_log(LOG_WARNING, -+ "ignoring attempted override of read-only load\n"); -+ return; -+ } else { -+ laConfigSet++; -+ } -+ } else { -+ if (laConfigSet > 0) { -+ snmp_log(LOG_WARNING, -+ "ignoring attempted override of read-only load\n"); -+ /* -+ * Fall through and copy in this value. -+ */ -+ } -+ laConfigSet = -1; -+ } -+ - for (i = 0; i <= 2; i++) { - if (cptr != NULL) - maxload[i] = atof(cptr); -@@ -307,6 +351,71 @@ - return 0; - } - -+static int -+write_laConfig(int action, -+ u_char * var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char * statP, oid * name, size_t name_len) -+{ -+ static double laConfig = 0; -+ -+ switch (action) { -+ case RESERVE1: /* Check values for acceptability */ -+ if (var_val_type != ASN_OCTET_STR) { -+ DEBUGMSGTL(("ucd-snmp/loadave", -+ "write to laConfig not ASN_OCTET_STR\n")); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if (var_val_len > 8 || var_val_len <= 0) { -+ DEBUGMSGTL(("ucd-snmp/loadave", -+ "write to laConfig: bad length\n")); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ -+ if (laConfigSet < 0) { -+ /* -+ * The object is set in a read-only configuration file. -+ */ -+ return SNMP_ERR_NOTWRITABLE; -+ } -+ break; -+ -+ case RESERVE2: /* Allocate memory and similar resources */ -+ { -+ u_char buf[8]; -+ int old_errno = errno; -+ double val; -+ char *endp; -+ -+ strncpy(buf, var_val, var_val_len); -+ buf[var_val_len] = '\0'; -+ val = strtod(buf, &endp); -+ -+ if (errno == ERANGE || *endp != '\0' || val < 0 || val > 65536.00) { -+ errno = old_errno; -+ DEBUGMSGTL(("ucd-snmp/loadave", -+ "write to laConfig: invalid value\n")); -+ return SNMP_ERR_WRONGVALUE; -+ } -+ -+ errno = old_errno; -+ -+ laConfig = val; -+ } -+ break; -+ -+ case COMMIT: -+ { -+ int idx = name[name_len - 1] - 1; -+ maxload[idx] = laConfig; -+ laConfigSet = 1; -+ } -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ - u_char * - var_extensible_loadave(struct variable * vp, - oid * name, -@@ -326,6 +435,10 @@ - case MIBINDEX: - long_ret = name[*length - 1]; - return ((u_char *) (&long_ret)); -+ case LOADMAXVAL: -+ /* setup write method, but don't return yet */ -+ *write_method = write_laConfig; -+ break; - case ERRORNAME: - sprintf(errmsg, "Load-%d", ((name[*length - 1] == 1) ? 1 : - ((name[*length - 1] == 2) ? 5 : 15))); diff --git a/net-snmp-use-rpm-hrmib.patch b/net-snmp-use-rpm-hrmib.patch index 471b4c5..fa85110 100644 --- a/net-snmp-use-rpm-hrmib.patch +++ b/net-snmp-use-rpm-hrmib.patch @@ -11,9 +11,9 @@ void init_hr_swinst(void) { ---- net-snmp-5.5/configure.d/config_os_libs~ 2010-05-12 14:31:17.751301337 +0200 -+++ net-snmp-5.5/configure.d/config_os_libs 2010-05-12 14:34:11.694627717 +0200 -@@ -261,20 +261,34 @@ +--- net-snmp-5.6/configure.d/config_os_libs.orig 2010-10-24 10:37:25.527741043 +0200 ++++ net-snmp-5.6/configure.d/config_os_libs 2010-10-24 10:40:56.519744396 +0200 +@@ -425,20 +425,34 @@ # RPM checks # ## @@ -28,55 +28,51 @@ - else - with_rpm=no - fi --fi -- - # -+# check if we can use rpm hrmib export -+if test "$with_rpm" != "no" ; then -+ AC_PATH_PROG([RPM], rpm) -+ if test -n "$RPM"; then -+ changequote(, ) -+ RPM_HRMIB_PATH=$($RPM -E %{_hrmib_path} | sed -e 's,/[^/]\+$,,') -+ changequote([, ]) -+ if test -n "$RPM_HRMIB_PATH"; then -+ AC_DEFINE_UNQUOTED([RPM_HRMIB_PATH], ["$RPM_HRMIB_PATH"], [Directory where RPM exports packages hrmib information]) -+ fi -+ fi -+fi -+# otherwise try binary linkin -+if test -z "$RPM_HRMIB_PATH"; then -+ AC_CHECK_HEADERS(rpm/rpmlib.h rpm/header.h) -+ -+ AC_CHECK_HEADER(rpm/rpmlib.h,rpmlib_h=yes,rpmlib_h=no) -+ AC_CHECK_HEADER(rpm/header.h,rpmheader_h=yes,rpmheader_h=no) -+ -+ if test "x$rpmheader_h" = "xno" -o "x$rpmlib_h" = "xno" ; then -+ if test "x$with_rpm" = "xyes" ; then -+ AC_MSG_ERROR([Could not find either the RPM header files needed and was specifically asked to use RPM support]) -+ else -+ with_rpm=no -+ fi -+ fi ++# ++# check if we can use rpm hrmib export ++if test "$with_rpm" != "no" ; then ++ AC_PATH_PROG([RPM], rpm) ++ if test -n "$RPM"; then ++ changequote(, ) ++ RPM_HRMIB_PATH=$($RPM -E %{_hrmib_path} | sed -e 's,/[^/]\+$,,') ++ changequote([, ]) ++ if test -n "$RPM_HRMIB_PATH"; then ++ AC_DEFINE_UNQUOTED([RPM_HRMIB_PATH], ["$RPM_HRMIB_PATH"], [Directory where RPM exports packages hrmib information]) ++ fi ++ fi + fi ++# otherwise try binary linkin ++if test -z "$RPM_HRMIB_PATH"; then ++ AC_CHECK_HEADERS(rpm/rpmlib.h rpm/header.h) + ++ AC_CHECK_HEADER(rpm/rpmlib.h,rpmlib_h=yes,rpmlib_h=no) ++ AC_CHECK_HEADER(rpm/header.h,rpmheader_h=yes,rpmheader_h=no) ++ ++ if test "x$rpmheader_h" = "xno" -o "x$rpmlib_h" = "xno" ; then ++ if test "x$with_rpm" = "xyes" ; then ++ AC_MSG_ERROR([Could not find either the RPM header files needed and was specifically asked to use RPM support]) ++ else ++ with_rpm=no ++ fi ++ fi + +-# # rpm libraries only needed for the host resources mib software # installed tables (on linux in particular) # -@@ -319,7 +333,14 @@ - LMIBLIBS="$_rpmlibs $LMIBLIBS" - CFLAGS="$CFLAGS -I/usr/include/rpm" - ],, $LMIBLIBS, _rpmlibs) --fi -+ OLDLIBS=$LIBS -+ LIBS=$LMIBLIBS -+ AC_CHECK_FUNCS(rpmGetPath) -+ LIBS=$OLDLIBS +@@ -490,6 +504,12 @@ + AC_DEFINE([_RPM_4_4_COMPAT], [], [Define if you have RPM 4.6 or newer to turn on legacy API]), + [[#include ]] + ) + ++ OLDLIBS=$LIBS ++ LIBS=$LMIBLIBS ++ AC_CHECK_FUNCS([rpmGetPath]) ++ LIBS=$OLDLIBS + fi -+ -+fi # with rpmlib + fi ## - # mysql --- net-snmp-5.5/configure.d/config_os_functions~ 2009-07-26 20:20:55.000000000 +0200 +++ net-snmp-5.5/configure.d/config_os_functions 2010-05-12 14:35:39.421276242 +0200 @@ -67,15 +67,6 @@ diff --git a/net-snmp.spec b/net-snmp.spec index 43a38f4..f94cc92 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -18,7 +18,7 @@ %undefine with_lm_sensors %endif -%define so_version 20 +%define so_version 25 %include /usr/lib/rpm/macros.perl Summary: A collection of SNMP protocol tools @@ -28,12 +28,12 @@ Summary(pt_BR.UTF-8): Agente SNMP da UCD Summary(ru.UTF-8): Набор утилит для протокола SNMP от UC-Davis Summary(uk.UTF-8): Набір утиліт для протоколу SNMP від UC-Davis Name: net-snmp -Version: 5.5 -Release: 5 +Version: 5.6 +Release: 1 License: BSD-like Group: Networking/Daemons -Source0: http://dl.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz -# Source0-md5: 5b2551e7bd024fbbee84dca22a5f13a1 +Source0: http://downloads.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz +# Source0-md5: 89b3a7a77e68daef925abee43a3f7018 Source1: %{name}d.init Source2: %{name}d.conf Source3: %{name}d.sysconfig @@ -55,11 +55,8 @@ Patch9: %{name}-python.patch Patch10: %{name}-lvalue.patch Patch11: %{name}-defaultconfig.patch Patch12: %{name}-use-rpm-hrmib.patch -Patch13: net-snmp-5.5-missing-bcast.patch -Patch14: %{name}-lm_sensors_3.patch -Patch15: net-snmp-5.5-tcp-pid.patch -Patch17: %{name}-TCP_STATS_CACHE_TIMEOUT.patch -Patch19: %{name}-loadave-writable.patch +Patch13: %{name}-TCP_STATS_CACHE_TIMEOUT.patch +Patch14: %{name}-nodebug.patch URL: http://www.net-snmp.org/ BuildRequires: autoconf >= 2.61-3 BuildRequires: automake @@ -435,9 +432,6 @@ SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1). %patch12 -p1 %patch13 -p1 %patch14 -p1 -%patch15 -p1 -%patch17 -p1 -%patch19 -p1 %build %{__libtoolize} @@ -631,11 +625,11 @@ fi %defattr(644,root,root,755) %dir %{_sysconfdir}/snmp %dir %{_datadir}/snmp -%attr(755,root,root) %{_libdir}/libnetsnmp.so.*.* -%attr(755,root,root) %{_libdir}/libnetsnmpagent.so.*.* -%attr(755,root,root) %{_libdir}/libnetsnmphelpers.so.*.* -%attr(755,root,root) %{_libdir}/libnetsnmpmibs.so.*.* -%attr(755,root,root) %{_libdir}/libnetsnmptrapd.so.*.* +%attr(755,root,root) %{_libdir}/libnetsnmp.so.*.*.* +%attr(755,root,root) %{_libdir}/libnetsnmpagent.so.*.*.* +%attr(755,root,root) %{_libdir}/libnetsnmphelpers.so.*.*.* +%attr(755,root,root) %{_libdir}/libnetsnmpmibs.so.*.*.* +%attr(755,root,root) %{_libdir}/libnetsnmptrapd.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libnetsnmp.so.%{so_version} %attr(755,root,root) %ghost %{_libdir}/libnetsnmpagent.so.%{so_version} %attr(755,root,root) %ghost %{_libdir}/libnetsnmphelpers.so.%{so_version} @@ -668,7 +662,11 @@ fi %if %{with static_libs} %files static %defattr(644,root,root,755) -%{_libdir}/libnet*.a +%{_libdir}/libnetsnmp.a +%{_libdir}/libnetsnmpagent.a +%{_libdir}/libnetsnmphelpers.a +%{_libdir}/libnetsnmpmibs.a +%{_libdir}/libnetsnmptrapd.a %endif %files compat-devel @@ -701,6 +699,7 @@ fi %files utils %defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/agentxtrap %attr(755,root,root) %{_bindir}/encode_keychange %attr(755,root,root) %{_bindir}/snmpbulkget %attr(755,root,root) %{_bindir}/snmpbulkwalk @@ -719,6 +718,7 @@ fi %attr(755,root,root) %{_bindir}/snmpusm %attr(755,root,root) %{_bindir}/snmpvacm %attr(755,root,root) %{_bindir}/snmpwalk +%{_mandir}/man1/agentxtrap.1* %{_mandir}/man1/encode_keychange.1* %{_mandir}/man1/snmpbulkget.1* %{_mandir}/man1/snmpbulkwalk.1* @@ -769,9 +769,12 @@ fi %files utils-perl %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/fixproc +%attr(755,root,root) %{_bindir}/net-snmp-cert +%attr(755,root,root) %{_bindir}/snmp-bridge-mib %attr(755,root,root) %{_bindir}/snmpcheck %attr(755,root,root) %{_bindir}/traptoemail %{_mandir}/man1/fixproc.1* +%{_mandir}/man1/snmp-bridge-mib.1* %{_mandir}/man1/traptoemail.1* %endif -- 2.44.0