From 87891f105014a16bac7129a133b9f5fc6181bd6a Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 4 Dec 2012 16:20:55 +0000 Subject: [PATCH] collectd: 4.10.8 version bump Collectd, the backbone for LuCI statistics, has been updated to 4.10.8 a few weeks ago. I have already used it in my trunk build for some time. Among other things 4.10.8 fixes a few memory leaks and a perl incompatibility (see https://dev.openwrt.org/ticket/12494 ). 4.10.8 increases compatibility with current kernels and iproute2 reducing the patch 130-fix_netlink_kernel_3.3-patch unnecessary. It can be removed. I have also included a new patch 920-fix-ping-droprate.patch for fixing LuCI ticket 462 (http://luci.subsignal.org/trac/ticket/462). Signed-off-by: hannu.nyman@iki.fi Signed-off-by: Florian Fainelli SVN-Revision: 34487 --- utils/collectd/Makefile | 6 +-- .../collectd/patches/003-remove-werror.patch | 6 +-- .../patches/130-fix_netlink_kernel_3.3-patch | 50 ------------------- .../patches/200-fix-git-describe-error.patch | 2 +- .../patches/900-add-iwinfo-plugin.patch | 12 ++--- .../patches/920-fix-ping-droprate.patch | 11 ++++ 6 files changed, 24 insertions(+), 63 deletions(-) create mode 100644 utils/collectd/patches/920-fix-ping-droprate.patch diff --git a/utils/collectd/Makefile b/utils/collectd/Makefile index 84d3f44075..413ff8447d 100644 --- a/utils/collectd/Makefile +++ b/utils/collectd/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=collectd -PKG_VERSION:=4.10.7 -PKG_RELEASE:=2 +PKG_VERSION:=4.10.8 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://collectd.org/files/ -PKG_MD5SUM:=f4193fdb5002ddac8159c88032a726bc +PKG_MD5SUM:=7a60495208b9383225493c6dd6abb2f0 PKG_FIXUP:=autoreconf PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4 diff --git a/utils/collectd/patches/003-remove-werror.patch b/utils/collectd/patches/003-remove-werror.patch index 5a4fb53e25..0e572bf312 100644 --- a/utils/collectd/patches/003-remove-werror.patch +++ b/utils/collectd/patches/003-remove-werror.patch @@ -11,7 +11,7 @@ AM_CPPFLAGS = -DPREFIX='"${prefix}"' --- a/src/Makefile.in +++ b/src/Makefile.in -@@ -1836,7 +1836,7 @@ top_build_prefix = @top_build_prefix@ +@@ -1833,7 +1833,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = libcollectdclient $(am__append_1) $(am__append_2) @@ -33,7 +33,7 @@ pkginclude_HEADERS = client.h lcc_features.h --- a/src/libcollectdclient/Makefile.in +++ b/src/libcollectdclient/Makefile.in -@@ -329,7 +329,7 @@ top_build_prefix = @top_build_prefix@ +@@ -327,7 +327,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies @@ -55,7 +55,7 @@ noinst_LTLIBRARIES = libiptc.la --- a/src/owniptc/Makefile.in +++ b/src/owniptc/Makefile.in -@@ -298,7 +298,7 @@ top_builddir = @top_builddir@ +@@ -296,7 +296,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies EXTRA_DIST = libiptc.c README.collectd diff --git a/utils/collectd/patches/130-fix_netlink_kernel_3.3-patch b/utils/collectd/patches/130-fix_netlink_kernel_3.3-patch index 9cb88309d3..e69de29bb2 100644 --- a/utils/collectd/patches/130-fix_netlink_kernel_3.3-patch +++ b/utils/collectd/patches/130-fix_netlink_kernel_3.3-patch @@ -1,50 +0,0 @@ -Index: collectd-4.10.7/src/netlink.c -=================================================================== ---- collectd-4.10.7.orig/src/netlink.c 2012-04-01 16:20:24.000000000 +0200 -+++ collectd-4.10.7/src/netlink.c 2012-06-07 17:22:16.212616882 +0200 -@@ -223,7 +223,7 @@ - - msg = NLMSG_DATA (nmh); - -- msg_len = nmh->nlmsg_len - sizeof (struct ifinfomsg); -+ msg_len = nmh->nlmsg_len - NLMSG_LENGTH(sizeof (struct ifinfomsg)); - if (msg_len < 0) - { - ERROR ("netlink plugin: link_filter: msg_len = %i < 0;", msg_len); -@@ -554,24 +554,19 @@ - - static int ir_read (void) - { -- struct ifinfomsg im; - struct tcmsg tm; - int ifindex; - - static const int type_id[] = { RTM_GETQDISC, RTM_GETTCLASS, RTM_GETTFILTER }; - static const char *type_name[] = { "qdisc", "class", "filter" }; - -- memset (&im, '\0', sizeof (im)); -- im.ifi_type = AF_UNSPEC; -- -- if (rtnl_dump_request (&rth, RTM_GETLINK, &im, sizeof (im)) < 0) -+ if (rtnl_wilddump_request (&rth, AF_UNSPEC, RTM_GETLINK) < 0) - { - ERROR ("netlink plugin: ir_read: rtnl_dump_request failed."); - return (-1); - } - -- if (rtnl_dump_filter (&rth, link_filter, /* arg1 = */ NULL, -- NULL, NULL) != 0) -+ if (rtnl_dump_filter (&rth, link_filter, /* arg1 = */ NULL) != 0) - { - ERROR ("netlink plugin: ir_read: rtnl_dump_filter failed."); - return (-1); -@@ -608,8 +603,7 @@ - continue; - } - -- if (rtnl_dump_filter (&rth, qos_filter, (void *) &ifindex, -- NULL, NULL) != 0) -+ if (rtnl_dump_filter (&rth, qos_filter, (void *) &ifindex) != 0) - { - ERROR ("netlink plugin: ir_read: rtnl_dump_filter failed."); - continue; diff --git a/utils/collectd/patches/200-fix-git-describe-error.patch b/utils/collectd/patches/200-fix-git-describe-error.patch index 09e914ab64..1946650a73 100644 --- a/utils/collectd/patches/200-fix-git-describe-error.patch +++ b/utils/collectd/patches/200-fix-git-describe-error.patch @@ -2,7 +2,7 @@ +++ b/version-gen.sh @@ -2,7 +2,7 @@ - DEFAULT_VERSION="4.10.7.git" + DEFAULT_VERSION="4.10.8.git" -VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`" +#VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`" diff --git a/utils/collectd/patches/900-add-iwinfo-plugin.patch b/utils/collectd/patches/900-add-iwinfo-plugin.patch index 98945863c1..a635493325 100644 --- a/utils/collectd/patches/900-add-iwinfo-plugin.patch +++ b/utils/collectd/patches/900-add-iwinfo-plugin.patch @@ -10,7 +10,7 @@ # # Checks for typedefs, structures, and compiler characteristics. # -@@ -4008,6 +4011,7 @@ plugin_interface="no" +@@ -4081,6 +4084,7 @@ plugin_interface="no" plugin_ipmi="no" plugin_ipvs="no" plugin_irq="no" @@ -18,7 +18,7 @@ plugin_libvirt="no" plugin_load="no" plugin_memory="no" -@@ -4315,6 +4319,7 @@ AC_PLUGIN([ipmi], [$plugin_ipmi], +@@ -4388,6 +4392,7 @@ AC_PLUGIN([ipmi], [$plugin_ipmi], AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters]) AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics]) AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics]) @@ -26,7 +26,7 @@ AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine]) AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics]) AC_PLUGIN([load], [$plugin_load], [System load]) -@@ -4593,6 +4598,7 @@ Configuration: +@@ -4666,6 +4671,7 @@ Configuration: protobuf-c . . . . . $have_protoc_c oracle . . . . . . . $with_oracle python . . . . . . . $with_python @@ -34,7 +34,7 @@ Features: daemon mode . . . . . $enable_daemon -@@ -4632,6 +4638,7 @@ Configuration: +@@ -4705,6 +4711,7 @@ Configuration: iptables . . . . . . $enable_iptables ipvs . . . . . . . . $enable_ipvs irq . . . . . . . . . $enable_irq @@ -67,7 +67,7 @@ # JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar" --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod -@@ -1468,6 +1468,27 @@ and all other interrupts are collected. +@@ -1478,6 +1478,27 @@ and all other interrupts are collected. =back @@ -250,7 +250,7 @@ +} --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -454,6 +454,15 @@ collectd_LDADD += "-dlopen" irq.la +@@ -453,6 +453,15 @@ collectd_LDADD += "-dlopen" irq.la collectd_DEPENDENCIES += irq.la endif diff --git a/utils/collectd/patches/920-fix-ping-droprate.patch b/utils/collectd/patches/920-fix-ping-droprate.patch new file mode 100644 index 0000000000..f74329905a --- /dev/null +++ b/utils/collectd/patches/920-fix-ping-droprate.patch @@ -0,0 +1,11 @@ +--- a/src/ping.c ++++ b/src/ping.c +@@ -651,7 +651,7 @@ static int ping_read (void) /* {{{ */ + / ((double) (pkg_recv * (pkg_recv - 1)))); + + /* Calculate drop rate. */ +- droprate = ((double) (pkg_sent - pkg_recv)) / ((double) pkg_sent); ++ droprate = ((double) (pkg_sent - pkg_recv)) * 100 / ((double) pkg_sent); + + submit (hl->host, "ping", latency_average); + submit (hl->host, "ping_stddev", latency_stddev); -- 2.30.2