From f4420bb23f606d5ab0be3095ff5a1f5d2fb44f66 Mon Sep 17 00:00:00 2001 From: "Alexandros C. Couloumbis" Date: Sat, 4 Dec 2010 04:29:09 +0000 Subject: [PATCH] utils/collectd: update to version 4.10.2, fix a kernel 2.6.37 issue, refresh patches SVN-Revision: 24237 --- utils/collectd/Makefile | 13 +++- .../100-rrdtool-add-rrasingle-option.patch | 2 +- .../patches/110-net-device-stats.patch | 4 +- .../patches/120-fix_kernel_2.6.37.patch | 78 +++++++++++++++++++ 4 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 utils/collectd/patches/120-fix_kernel_2.6.37.patch diff --git a/utils/collectd/Makefile b/utils/collectd/Makefile index da25abcb61..c4c4fe36a1 100644 --- a/utils/collectd/Makefile +++ b/utils/collectd/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=collectd -PKG_VERSION:=4.9.1 -PKG_RELEASE:=3 +PKG_VERSION:=4.10.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://collectd.org/files/ -PKG_MD5SUM:=5753496651c8c84afaea1fe290876bfc +PKG_MD5SUM:=85d9d8d0a1327782661e3c89800aa70e PKG_FIXUP:=libtool PKG_INSTALL:=1 @@ -200,6 +200,13 @@ define Package/collectd/conffiles /etc/collectd.conf endef +#define Build/Configure +# (cd $(PKG_BUILD_DIR); \ +# autoreconf -v --install || exit 1 \ +# ); +# $(call Build/Configure/Default) +#endef + define Package/collectd/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(1)/usr/sbin/ diff --git a/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch b/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch index 611a729c9d..ce1daa473f 100644 --- a/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch +++ b/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch @@ -17,7 +17,7 @@ /* consolidation_functions = */ NULL, /* consolidation_functions_num = */ 0 }; -@@ -976,6 +979,14 @@ static int rrd_config (const char *key, +@@ -1027,6 +1030,14 @@ static int rrd_config (const char *key, free (value_copy); } diff --git a/utils/collectd/patches/110-net-device-stats.patch b/utils/collectd/patches/110-net-device-stats.patch index d619338e4f..91e73aa374 100644 --- a/utils/collectd/patches/110-net-device-stats.patch +++ b/utils/collectd/patches/110-net-device-stats.patch @@ -2,8 +2,8 @@ src/interface.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) ---- collectd-4.9.1.orig/src/interface.c -+++ collectd-4.9.1/src/interface.c +--- a/src/interface.c ++++ b/src/interface.c @@ -203,7 +203,38 @@ static int interface_read (void) # define IFA_RX_ERROR rx_errors # define IFA_TX_ERROR tx_errors diff --git a/utils/collectd/patches/120-fix_kernel_2.6.37.patch b/utils/collectd/patches/120-fix_kernel_2.6.37.patch new file mode 100644 index 0000000000..cca445af5b --- /dev/null +++ b/utils/collectd/patches/120-fix_kernel_2.6.37.patch @@ -0,0 +1,78 @@ +--- a/src/owniptc/libiptc.c ++++ b/src/owniptc/libiptc.c +@@ -81,11 +81,11 @@ static const char *hooknames[] = { + }; + + /* Convenience structures */ +-struct ipt_error_target ++ struct ipt_error_target2 + { + STRUCT_ENTRY_TARGET t; + char error[TABLE_MAXNAMELEN]; +-}; ++}; + + struct chain_head; + struct rule_head; +@@ -1007,10 +1007,10 @@ static int parse_table(TC_HANDLE_T h) + /* Convenience structures */ + struct iptcb_chain_start{ + STRUCT_ENTRY e; +- struct ipt_error_target name; ++ struct ipt_error_target2 name; + }; + #define IPTCB_CHAIN_START_SIZE (sizeof(STRUCT_ENTRY) + \ +- ALIGN(sizeof(struct ipt_error_target))) ++ ALIGN(sizeof(struct ipt_error_target2))) + + struct iptcb_chain_foot { + STRUCT_ENTRY e; +@@ -1021,10 +1021,10 @@ struct iptcb_chain_foot { + + struct iptcb_chain_error { + STRUCT_ENTRY entry; +- struct ipt_error_target target; ++ struct ipt_error_target2 target; + }; + #define IPTCB_CHAIN_ERROR_SIZE (sizeof(STRUCT_ENTRY) + \ +- ALIGN(sizeof(struct ipt_error_target))) ++ ALIGN(sizeof(struct ipt_error_target2))) + + + +@@ -1069,7 +1069,7 @@ static int iptcc_compile_chain(TC_HANDLE + head->e.next_offset = IPTCB_CHAIN_START_SIZE; + strcpy(head->name.t.u.user.name, ERROR_TARGET); + head->name.t.u.target_size = +- ALIGN(sizeof(struct ipt_error_target)); ++ ALIGN(sizeof(struct ipt_error_target2)); + strcpy(head->name.error, c->name); + } else { + repl->hook_entry[c->hooknum-1] = c->head_offset; +@@ -1113,7 +1113,7 @@ static int iptcc_compile_chain_offsets(T + if (!iptcc_is_builtin(c)) { + /* Chain has header */ + *offset += sizeof(STRUCT_ENTRY) +- + ALIGN(sizeof(struct ipt_error_target)); ++ + ALIGN(sizeof(struct ipt_error_target2)); + (*num)++; + } + +@@ -1153,7 +1153,7 @@ static int iptcc_compile_table_prep(TC_H + /* Append one error rule at end of chain */ + num++; + offset += sizeof(STRUCT_ENTRY) +- + ALIGN(sizeof(struct ipt_error_target)); ++ + ALIGN(sizeof(struct ipt_error_target2)); + + /* ruleset size is now in offset */ + *size = offset; +@@ -1177,7 +1177,7 @@ static int iptcc_compile_table(TC_HANDLE + error->entry.target_offset = sizeof(STRUCT_ENTRY); + error->entry.next_offset = IPTCB_CHAIN_ERROR_SIZE; + error->target.t.u.user.target_size = +- ALIGN(sizeof(struct ipt_error_target)); ++ ALIGN(sizeof(struct ipt_error_target2)); + strcpy((char *)&error->target.t.u.user.name, ERROR_TARGET); + strcpy((char *)&error->target.error, "ERROR"); + -- 2.30.2