collectd: Update to 5.5.1
authorHannu Nyman <redacted>
Wed, 3 Feb 2016 16:47:51 +0000 (18:47 +0200)
committerHannu Nyman <redacted>
Wed, 3 Feb 2016 16:59:37 +0000 (18:59 +0200)
Update collectd, the backbone of Luci statistics, to 5.5.1

Refresh patches. Main changes:
 - Remove 500-upstream-parallel-build-fix.patch (implemented upstream)
 - Add 600-fix-libmodbus-detection.patch to revert an upstream change
   that broke libmodbus detection in collectd's configure script

Signed-off-by: Hannu Nyman <redacted>
utils/collectd/Makefile
utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch
utils/collectd/patches/140-fix-fqdnlookup.patch
utils/collectd/patches/200-fix-git-describe-error.patch
utils/collectd/patches/300-delay-first-read-cycle.patch
utils/collectd/patches/500-upstream-parallel-build-fix.patch [deleted file]
utils/collectd/patches/600-fix-libmodbus-detection.patch [new file with mode: 0644]
utils/collectd/patches/900-add-iwinfo-plugin.patch
utils/collectd/patches/920-fix-ping-droprate.patch

index f92e17a4a7078f13acae8cad1c8becbbe1884c3e..7b4ee08eeca7d6ac288cf4ef9f7463a8cfdea481 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
-PKG_VERSION:=5.5.0
-PKG_RELEASE:=5
+PKG_VERSION:=5.5.1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://collectd.org/files/
-PKG_MD5SUM:=c39305ef5514b44238b0d31f77e29e6a
+PKG_MD5SUM:=fd24b947cef9351ce3e2d6d2a0762e18
 
 PKG_FIXUP:=autoreconf
 PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4
index e9059d532470cdb216e74e377a81449ecbda7c73..704962f75b79fd639681309cc95c01d8324daf9f 100644 (file)
@@ -17,7 +17,7 @@
        /* consolidation_functions = */ NULL,
        /* consolidation_functions_num = */ 0,
  
-@@ -1093,6 +1096,14 @@ static int rrd_config (const char *key,
+@@ -1110,6 +1113,14 @@ static int rrd_config (const char *key,
  
                free (value_copy);
        }
@@ -34,7 +34,7 @@
                double tmp = atof (value);
 --- a/src/utils_rrdcreate.c
 +++ b/src/utils_rrdcreate.c
-@@ -217,6 +217,9 @@ static int rra_get (char ***ret, const v
+@@ -213,6 +213,9 @@ static int rra_get (char ***ret, const v
      rts_num = rra_timespans_num;
    }
  
@@ -42,8 +42,8 @@
 +    rra_types_num = 1;
 +
    rra_max = rts_num * rra_types_num;
+   assert (rra_max > 0);
  
-   if ((rra_def = (char **) malloc ((rra_max + 1) * sizeof (char *))) == NULL)
 --- a/src/utils_rrdcreate.h
 +++ b/src/utils_rrdcreate.h
 @@ -41,6 +41,8 @@ struct rrdcreate_config_s
index 660b87d2c4f1dd956ac53ed5fc2e46681500dd70..22990bd5be2bacd88482bbfb4057229f196b5c92 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/daemon/configfile.c
 +++ b/src/daemon/configfile.c
-@@ -109,7 +109,7 @@ static cf_global_option_t cf_global_opti
+@@ -111,7 +111,7 @@ static cf_global_option_t cf_global_opti
        {"BaseDir",     NULL, PKGLOCALSTATEDIR},
        {"PIDFile",     NULL, PIDFILE},
        {"Hostname",    NULL, NULL},
index 5aa48dcda7e0634126c5d40dde67b7220ad30305..d9f1311a5d7480501ca85805c04b6b51639243ba 100644 (file)
@@ -2,7 +2,7 @@
 +++ b/version-gen.sh
 @@ -2,7 +2,7 @@
  
- DEFAULT_VERSION="5.5.0.git"
+ DEFAULT_VERSION="5.5.1.git"
  
 -VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`"
 +#VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`"
index 9a60cc4640ac04688b881805f6465327a4ac2d0a..495c80f3ae42a0be67b618bf663314ffc536c25e 100644 (file)
@@ -9,4 +9,3 @@
        rf->rf_effective_interval = rf->rf_interval;
  
        pthread_mutex_lock (&read_lock);
-
diff --git a/utils/collectd/patches/500-upstream-parallel-build-fix.patch b/utils/collectd/patches/500-upstream-parallel-build-fix.patch
deleted file mode 100644 (file)
index a10fbbb..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-Backport of 780e6a76021a240e95007a04b723d827120afa95
-Subject: [PATCH] build: add libavltree, libcommon & libheap dependencies
-
-Otherwise it can break on very parallel builds since collectd link time
-arrives before one or more of these were built.
-
---- a/src/daemon/Makefile.am
-+++ b/src/daemon/Makefile.am
-@@ -49,7 +49,7 @@ collectd_CPPFLAGS =  $(AM_CPPFLAGS) $(LT
- collectd_CFLAGS = $(AM_CFLAGS)
- collectd_LDFLAGS = -export-dynamic
- collectd_LDADD = libavltree.la libcommon.la libheap.la -lm
--collectd_DEPENDENCIES =
-+collectd_DEPENDENCIES = libavltree.la libcommon.la libheap.la
- # Link to these libraries..
- if BUILD_WITH_LIBRT
diff --git a/utils/collectd/patches/600-fix-libmodbus-detection.patch b/utils/collectd/patches/600-fix-libmodbus-detection.patch
new file mode 100644 (file)
index 0000000..027ba5b
--- /dev/null
@@ -0,0 +1,40 @@
+Patch reverts upstream commit:
+https://github.com/collectd/collectd/commit/6124da7a48f28f54fc09ebeb942d1037516fe6ab
+
+The commit changed the detection path due to FreeBSD issues,
+but apparently affects also Openwrt buildroot negatively.
+
+Original explanation:
+  From 6124da7a48f28f54fc09ebeb942d1037516fe6ab Mon Sep 17 00:00:00 2001
+  Subject: [PATCH] Fix libmodbus detection on FreeBSD
+
+  We look for modbus/modbus.h in /usr/local/include/modbus
+  but we should look for modbus.h
+
+  This is only an issue on FreeBSD since /usr/local/include is not
+  in the default search path.
+
+Reversed patch to be applied:
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -2585,7 +2585,7 @@ then
+       SAVE_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
+-      AC_CHECK_HEADERS(modbus.h, [], [with_libmodbus="no (modbus.h not found)"])
++      AC_CHECK_HEADERS(modbus/modbus.h, [], [with_libmodbus="no (modbus/modbus.h not found)"])
+       CPPFLAGS="$SAVE_CPPFLAGS"
+ fi
+--- a/src/modbus.c
++++ b/src/modbus.c
+@@ -27,7 +27,7 @@
+ #include <netdb.h>
+-#include <modbus.h>
++#include <modbus/modbus.h>
+ #ifndef LIBMODBUS_VERSION_CHECK
+ /* Assume version 2.0.3 */
index 6b36b9a23252b81dde2d9286a073261b1a877ef5..92c0877ed083b3c399abc196243df80ee2531662 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -589,6 +589,9 @@ AC_CHECK_HEADERS(net/pfvar.h,
+@@ -663,6 +663,9 @@ AC_CHECK_HEADERS(net/pfvar.h,
  have_termios_h="no"
  AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
  
@@ -10,7 +10,7 @@
  # For the turbostat plugin
  have_asm_msrindex_h="no"
  AC_CHECK_HEADERS(asm/msr-index.h, [have_asm_msrindex_h="yes"])
-@@ -5171,6 +5174,7 @@ plugin_interface="no"
+@@ -5241,6 +5244,7 @@ plugin_interface="no"
  plugin_ipmi="no"
  plugin_ipvs="no"
  plugin_irq="no"
@@ -18,7 +18,7 @@
  plugin_load="no"
  plugin_log_logstash="no"
  plugin_memory="no"
-@@ -5562,6 +5566,7 @@ AC_PLUGIN([ipmi],        [$plugin_ipmi],
+@@ -5638,6 +5642,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([load],        [$plugin_load],       [System load])
  AC_PLUGIN([logfile],     [yes],                [File logging plugin])
-@@ -5891,6 +5896,7 @@ Configuration:
+@@ -5967,6 +5972,7 @@ Configuration:
      oracle  . . . . . . . $with_oracle
      protobuf-c  . . . . . $have_protoc_c
      python  . . . . . . . $with_python
@@ -34,7 +34,7 @@
  
    Features:
      daemon mode . . . . . $enable_daemon
-@@ -5940,6 +5946,7 @@ Configuration:
+@@ -6016,6 +6022,7 @@ Configuration:
      iptables  . . . . . . $enable_iptables
      ipvs  . . . . . . . . $enable_ipvs
      irq . . . . . . . . . $enable_irq
@@ -45,7 +45,7 @@
 --- a/src/collectd.conf.in
 +++ b/src/collectd.conf.in
 @@ -128,6 +128,7 @@
- #@BUILD_PLUGIN_IPMI_TRUE@LoadPlugin ipmi
+ #@BUILD_PLUGIN_IPTABLES_TRUE@LoadPlugin iptables
  #@BUILD_PLUGIN_IPVS_TRUE@LoadPlugin ipvs
  #@BUILD_PLUGIN_IRQ_TRUE@LoadPlugin irq
 +#@BUILD_PLUGIN_IWINFO_TRUE@LoadPlugin iwinfo
@@ -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
-@@ -2572,6 +2572,27 @@ and all other interrupts are collected.
+@@ -2608,6 +2608,27 @@ and all other interrupts are collected.
  
  =back
  
 +}
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
-@@ -459,6 +459,13 @@ irq_la_SOURCES = irq.c \
+@@ -454,6 +454,13 @@ irq_la_SOURCES = irq.c
  irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
  endif
  
 +if BUILD_PLUGIN_IWINFO
 +pkglib_LTLIBRARIES += iwinfo.la
-+iwinfo_la_SOURCES = iwinfo.c utils_ignorelist.c utils_ignorelist.h
++iwinfo_la_SOURCES = iwinfo.c
 +iwinfo_la_LDFLAGS = -module -avoid-version
 +iwinfo_la_LIBADD = -liwinfo
 +endif
  java_la_SOURCES = java.c
 --- a/src/types.db
 +++ b/src/types.db
-@@ -227,6 +227,7 @@ voltage                    value:GAUGE:U:U
+@@ -228,6 +228,7 @@ voltage                    value:GAUGE:U:U
  vs_memory             value:GAUGE:0:9223372036854775807
  vs_processes          value:GAUGE:0:65535
  vs_threads            value:GAUGE:0:65535
index 6cbdcda9ed442c1647b985aaba5482d18e4eaf33..96a5c22bd38e042e1d8ef0a342fac688e7d220ac 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/ping.c
 +++ b/src/ping.c
-@@ -656,7 +656,7 @@ static int ping_read (void) /* {{{ */
+@@ -658,7 +658,7 @@ static int ping_read (void) /* {{{ */
            / ((double) (pkg_recv * (pkg_recv - 1))));
  
      /* Calculate drop rate. */
git clone https://git.99rst.org/PROJECT