From 3c9598ab68a6e3e05f28526a8489c2d43b822a64 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Mon, 25 Oct 2010 17:50:06 +0200 Subject: [PATCH] remove unused patches --- net-snmp-5.5-missing-bcast.patch | 27 ---------- net-snmp-5.5-mktemp-size.patch | 32 ------------ net-snmp-5.5-sensors3.patch | 14 ------ net-snmp-5.5-sysobjectid-truncation.patch | 51 ------------------- net-snmp-5.5-tcp-pid.patch | 60 ----------------------- net-snmp-5.5-test-tmpdir.patch | 18 ------- net-snmp-5.5-udptable-index.patch | 27 ---------- net-snmp.spec | 27 +++------- 8 files changed, 6 insertions(+), 250 deletions(-) delete mode 100644 net-snmp-5.5-missing-bcast.patch delete mode 100644 net-snmp-5.5-mktemp-size.patch delete mode 100644 net-snmp-5.5-sensors3.patch delete mode 100644 net-snmp-5.5-sysobjectid-truncation.patch delete mode 100644 net-snmp-5.5-tcp-pid.patch delete mode 100644 net-snmp-5.5-test-tmpdir.patch delete mode 100644 net-snmp-5.5-udptable-index.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-mktemp-size.patch b/net-snmp-5.5-mktemp-size.patch deleted file mode 100644 index e55b57a..0000000 --- a/net-snmp-5.5-mktemp-size.patch +++ /dev/null @@ -1,32 +0,0 @@ -616347 - snmptrapd dies when starting external script - -Source: upstream, SVN rev. 19231 - -Index: net-snmp/snmplib/system.c -=================================================================== ---- net-snmp/snmplib/system.c (revision 19230) -+++ net-snmp/snmplib/system.c (revision 19231) -@@ -158,6 +158,10 @@ - #include - #endif - -+#if HAVE_LIMITS_H -+#include -+#endif -+ - #include - #include - #include -@@ -1027,7 +1031,11 @@ - const char * - netsnmp_mktemp(void) - { -- static char name[32]; -+#ifdef PATH_MAX -+ static char name[PATH_MAX]; -+#else -+ static char name[256]; -+#endif - int fd = -1; - - strcpy(name, get_temp_file_pattern()); diff --git a/net-snmp-5.5-sensors3.patch b/net-snmp-5.5-sensors3.patch deleted file mode 100644 index db10381..0000000 --- a/net-snmp-5.5-sensors3.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-5.5-sysobjectid-truncation.patch b/net-snmp-5.5-sysobjectid-truncation.patch deleted file mode 100644 index 9af2837..0000000 --- a/net-snmp-5.5-sysobjectid-truncation.patch +++ /dev/null @@ -1,51 +0,0 @@ -640848: snmpd always returns an incorrect sysObjectID of ".1.3" or ".0.1" - -Source: upstream, SVN rev. 19322 - -Index: net-snmp/agent/mibgroup/mibII/system_mib.c -=================================================================== ---- net-snmp/agent/mibgroup/mibII/system_mib.c (revision 17596) -+++ net-snmp/agent/mibgroup/mibII/system_mib.c (working copy) -@@ -60,7 +57,7 @@ - static char sysName[SYS_STRING_LEN] = NETSNMP_SYS_NAME; - static char sysLocation[SYS_STRING_LEN] = NETSNMP_SYS_LOC; - static oid sysObjectID[MAX_OID_LEN]; --static size_t sysObjectIDLength; -+static size_t sysObjectIDByteLength; - - extern oid version_sysoid[]; - extern int version_sysoid_len; -@@ -171,12 +168,11 @@ - static void - system_parse_config_sysObjectID(const char *token, char *cptr) - { -- sysObjectIDLength = MAX_OID_LEN; -+ size_t sysObjectIDLength = MAX_OID_LEN; - if (!read_objid(cptr, sysObjectID, &sysObjectIDLength)) { - netsnmp_config_error("sysobjectid token not a parsable OID:\n\t%s", - cptr); - memcpy(sysObjectID, version_sysoid, version_sysoid_len * sizeof(oid)); -- sysObjectIDLength = version_sysoid_len; - } - } - -@@ -318,7 +314,7 @@ - - /* default sysObjectID */ - memcpy(sysObjectID, version_sysoid, version_sysoid_len * sizeof(oid)); -- sysObjectIDLength = version_sysoid_len; -+ sysObjectIDByteLength = version_sysoid_len * sizeof(oid); - - { - const oid sysDescr_oid[] = { 1, 3, 6, 1, 2, 1, 1, 1 }; -@@ -340,8 +336,8 @@ - HANDLER_CAN_RONLY), - netsnmp_init_watcher_info6( - &sysObjectID_winfo, sysObjectID, 0, ASN_OBJECT_ID, -- WATCHER_MAX_SIZE | WATCHER_SIZE_IS_PTR, -- MAX_OID_LEN, &sysObjectIDLength)); -+ WATCHER_MAX_SIZE | WATCHER_SIZE_IS_PTR, -+ MAX_OID_LEN, &sysObjectIDByteLength)); - } - { - const oid sysUpTime_oid[] = { 1, 3, 6, 1, 2, 1, 1, 3 }; 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-5.5-test-tmpdir.patch b/net-snmp-5.5-test-tmpdir.patch deleted file mode 100644 index 9d9f6e8..0000000 --- a/net-snmp-5.5-test-tmpdir.patch +++ /dev/null @@ -1,18 +0,0 @@ -Source: upstream, SVN rev. 18090 - -Fix the test suite - /var/run/net-snmp does not exist at the time -'make test' is running. So we need another place to put temporary -files - let it be /tmp. SELinux allows it, snmpd during tests is -unconfined. - -diff -up net-snmp-5.5/testing/tests/T059trapdtraphandle.orig net-snmp-5.5/testing/tests/T059trapdtraphandle ---- net-snmp-5.5/testing/tests/T059trapdtraphandle.orig 2007-12-19 23:31:28.000000000 +0100 -+++ net-snmp-5.5/testing/tests/T059trapdtraphandle 2010-01-29 19:57:30.000000000 +0100 -@@ -22,6 +22,7 @@ snmp_version=v2c - TESTCOMMUNITY=testcommunity - - CONFIGTRAPD [snmp] persistentDir $SNMP_TMP_PERSISTENTDIR -+CONFIGTRAPD [snmp] tempFilePattern /tmp/snmpd-tmp-XXXXXX - CONFIGTRAPD authcommunity execute $TESTCOMMUNITY - CONFIGTRAPD doNotLogTraps true - CONFIGTRAPD traphandle default $0 $1 traphandle diff --git a/net-snmp-5.5-udptable-index.patch b/net-snmp-5.5-udptable-index.patch deleted file mode 100644 index a827b3d..0000000 --- a/net-snmp-5.5-udptable-index.patch +++ /dev/null @@ -1,27 +0,0 @@ -543352: 'make test' fails on big endian system - -Source: upstream, SVN rev. 17860 - -Fix udpTable indexes. -Index: net-snmp/agent/mibgroup/mibII/udpTable.c -=================================================================== ---- net-snmp/agent/mibgroup/mibII/udpTable.c (revision 17859) -+++ net-snmp/agent/mibgroup/mibII/udpTable.c (revision 17860) -@@ -361,7 +361,7 @@ - { - UDPTABLE_ENTRY_TYPE *entry = (UDPTABLE_ENTRY_TYPE *)*loop_context; - long port; -- in_addr_t addr; -+ long addr; - - if (!entry) - return NULL; -@@ -376,7 +376,7 @@ - #else - addr = UDP_ADDRESS_TO_NETWORK_ORDER((in_addr_t)entry->UDPTABLE_LOCALADDRESS); - snmp_set_var_value(index, (u_char *)&addr, -- sizeof(entry->UDPTABLE_LOCALADDRESS)); -+ sizeof(addr)); - #endif - port = UDP_PORT_TO_HOST_ORDER(entry->UDPTABLE_LOCALPORT); - snmp_set_var_value(index->next_variable, diff --git a/net-snmp.spec b/net-snmp.spec index 494993c..68ed8ed 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -29,16 +29,9 @@ Source8: net-snmptrapd.sysconfig Patch1: net-snmp-5.6-pie.patch Patch2: net-snmp-5.5-dir-fix.patch Patch3: net-snmp-5.6-multilib.patch -Patch4: net-snmp-5.5-sensors3.patch -Patch5: net-snmp-5.5-udptable-index.patch -Patch6: net-snmp-5.5-missing-bcast.patch -Patch7: net-snmp-5.5-tcp-pid.patch -Patch8: net-snmp-5.5-test-tmpdir.patch -Patch9: net-snmp-5.5-include-struct.patch -Patch10: net-snmp-5.5-mktemp-size.patch -Patch11: net-snmp-5.5-apsl-copying.patch -Patch12: net-snmp-5.5-perl-linking.patch -Patch13: net-snmp-5.5-sysobjectid-truncation.patch +Patch4: net-snmp-5.5-include-struct.patch +Patch5: net-snmp-5.5-apsl-copying.patch +Patch6: net-snmp-5.5-perl-linking.patch Requires(post): chkconfig Requires(preun): chkconfig @@ -165,17 +158,9 @@ Net-SNMP toolkit library. %patch2 -p1 -b .dir-fix %patch3 -p1 -b .multilib -%patch4 -p1 -b .sensors -%patch5 -p1 -b .udptable-index -%patch6 -p1 -b .missing-bcast -%patch7 -p1 -b .tcp-pid -# no backup of this one, it would break tests! -%patch8 -p1 -%patch9 -p1 -b .include-struct -%patch10 -p1 -b .mktemp-size -%patch11 -p1 -b .apsl -%patch12 -p1 -b .perl-linking -%patch13 -p1 -b .sysobjectid-truncation +%patch4 -p1 -b .include-struct +%patch5 -p1 -b .apsl +%patch6 -p1 -b .perl-linking %build MIBS="host agentx smux \