Explanation of main patches for collectd in packages feed:

- 140-fix-fqdnlookup.patch : FQDNLookup option has been turned on by default since 5.1. If that option is enabled, it causes collectd to refuse to start in a basic Openwrt box as typically a fully qualified domain name does not exist for the router. (That error related can only be properly seen when console is used to start collectd. Otherwise Luci statistics collectd simply dies immediately after starting it.) That option should be false by default. I included a new patch 140-fix-fqdnlookup.patch to turn the option off by default.
http://git.verplant.org/?p=collectd.git;a=commit;h=e58f85bb68b4c45130bb6fdf40b51db95d2b71e5

- quilt choked on some -Werror related patches, so I removed them from 003-remove-werror.patch.

- 120-fix_kernel_2.6.37.patch seems to be unnecessary as the file to be patched has been removed. Removed.

- 130-timeleft-max.patch is included upstream. I removed it.
http://git.verplant.org/?p=collectd.git;a=commitdiff;h=d5b09f2bb673ac9396da52b85bcbd16c98b3d633

- 105-rrdtool-csv-honor-datadir-531upstream.patch is needed to correct a rrd file path bug in 5.3.1. Already fixed in upstream.
http://git.verplant.org/?p=collectd.git;a=commit;h=6ef3385ccec835c7efae1ff3d5895858003a6da7

Signed-off-by: Hannu Nyman <hannu.ny...@iki.fi>

--- packages/utils/collectd/Makefile    (revision 38418)
+++ packages/utils/collectd/Makefile    (working copy)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
-PKG_VERSION:=4.10.8
-PKG_RELEASE:=2
+PKG_VERSION:=5.3.1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://collectd.org/files/
-PKG_MD5SUM:=7a60495208b9383225493c6dd6abb2f0
+PKG_MD5SUM:=7cd518c58271a9a8160f7ec8a607b3c5
 
 PKG_FIXUP:=autoreconf
 PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4
@@ -22,11 +22,14 @@
 PKG_BUILD_PARALLEL:=1
 
 COLLECTD_PLUGINS_DISABLED:= \
+       amqp \
        apple_sensors \
        battery \
        cpufreq \
        curl_json \
+       curl_xml \
        entropy \
+       ethstat \
        genericjmx \
        gmond \
        hddtemp \
@@ -34,20 +37,26 @@
        ipvs \
        java \
        libvirt \
+       lpar \
        mbmon \
+       md \
        memcachec \
        memcached \
+       mic \
        monitorus \
        multimeter \
        netapp \
        nfs \
        notify_desktop \
        notify_email \
+       numa \
        openvz \
        oracle \
        perl \
+       pf \
        pinba \
        python \
+       redis \
        routeros \
        rrdcached \
        serial \
@@ -55,7 +64,12 @@
        tape \
        tokyotyrant \
        uuid \
+       varnish \
        vserver \
+       write_graphite \
+       write_mongodb \
+       write_redis \
+       write_riemann \
        xmms \
        zfs_arc \
 
@@ -104,11 +118,11 @@
        sensors \
        snmp \
        syslog \
+       table \
        tail \
-       table \
-       ted \
        tcpconns \
        teamspeak2 \
+       ted \
        thermal \
        unixsock \
        uptime \
--- packages/utils/collectd/patches/003-remove-werror.patch     (revision 38418)
+++ packages/utils/collectd/patches/003-remove-werror.patch     (working copy)
@@ -1,6 +1,6 @@
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
-@@ -7,7 +7,7 @@ SUBDIRS += liboconfig
+@@ -4,7 +4,7 @@ SUBDIRS += liboconfig
  endif
  
  if COMPILER_IS_GCC
@@ -9,17 +9,6 @@
  endif
  
  AM_CPPFLAGS = -DPREFIX='"${prefix}"'
---- a/src/Makefile.in
-+++ b/src/Makefile.in
-@@ -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)
--@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall -Werror
-+@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall
- AM_CPPFLAGS = -DPREFIX='"${prefix}"' \
-       -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' \
-       -DLOCALSTATEDIR='"${localstatedir}"' \
 --- a/src/libcollectdclient/Makefile.am
 +++ b/src/libcollectdclient/Makefile.am
 @@ -1,7 +1,7 @@
@@ -30,37 +19,4 @@
 +AM_CFLAGS = -Wall
  endif
  
- pkginclude_HEADERS = client.h lcc_features.h
---- a/src/libcollectdclient/Makefile.in
-+++ b/src/libcollectdclient/Makefile.in
-@@ -327,7 +327,7 @@ top_build_prefix = @top_build_prefix@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- AUTOMAKE_OPTIONS = foreign no-dependencies
--@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall -Werror
-+@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall
- pkginclude_HEADERS = client.h lcc_features.h
- lib_LTLIBRARIES = libcollectdclient.la
- nodist_pkgconfig_DATA = libcollectdclient.pc
---- a/src/owniptc/Makefile.am
-+++ b/src/owniptc/Makefile.am
-@@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = foreign no-dependenci
- EXTRA_DIST = libiptc.c README.collectd
- 
- if COMPILER_IS_GCC
--AM_CFLAGS = -Wall -Werror
-+AM_CFLAGS = -Wall
- endif
- 
- noinst_LTLIBRARIES = libiptc.la
---- a/src/owniptc/Makefile.in
-+++ b/src/owniptc/Makefile.in
-@@ -296,7 +296,7 @@ top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- AUTOMAKE_OPTIONS = foreign no-dependencies
- EXTRA_DIST = libiptc.c README.collectd
--@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall -Werror
-+@COMPILER_IS_GCC_TRUE@AM_CFLAGS = -Wall
- noinst_LTLIBRARIES = libiptc.la
- libiptc_la_SOURCES = libip4tc.c libip6tc.c \
-               ipt_kernel_headers.h libip6tc.h libiptc.h linux_list.h \
+ pkginclude_HEADERS = collectd/client.h collectd/network.h 
collectd/network_buffer.h collectd/lcc_features.h
--- packages/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch      
(revision 38418)
+++ packages/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch      
(working copy)
@@ -1,6 +1,6 @@
 --- a/src/rrdtool.c
 +++ b/src/rrdtool.c
-@@ -80,6 +80,7 @@ static const char *config_keys[] =
+@@ -82,6 +82,7 @@ static const char *config_keys[] =
        "HeartBeat",
        "RRARows",
        "RRATimespan",
@@ -8,17 +8,17 @@
        "XFF",
        "WritesPerSecond",
        "RandomTimeout"
-@@ -101,6 +102,8 @@ static rrdcreate_config_t rrdcreate_conf
+@@ -103,6 +104,8 @@ static rrdcreate_config_t rrdcreate_conf
        /* timespans = */ NULL,
        /* timespans_num = */ 0,
  
 +      /* rrasingle = */ 0,
 +
        /* consolidation_functions = */ NULL,
-       /* consolidation_functions_num = */ 0
- };
-@@ -1027,6 +1030,14 @@ static int rrd_config (const char *key,
+       /* consolidation_functions_num = */ 0,
  
+@@ -1039,6 +1042,14 @@ static int rrd_config (const char *key,
+ 
                free (value_copy);
        }
 +      else if (strcasecmp ("RRASingle", key) == 0)
@@ -34,7 +34,7 @@
                double tmp = atof (value);
 --- a/src/utils_rrdcreate.c
 +++ b/src/utils_rrdcreate.c
-@@ -122,6 +122,9 @@ static int rra_get (char ***ret, const v
+@@ -211,6 +211,9 @@ static int rra_get (char ***ret, const v
      rts_num = rra_timespans_num;
    }
  
@@ -54,4 +54,4 @@
 +
    char **consolidation_functions;
    size_t consolidation_functions_num;
- };
+ 
--- 
packages/utils/collectd/patches/105-rrdtool-csv-honor-datadir-531upstream.patch 
    (revision 0)
+++ 
packages/utils/collectd/patches/105-rrdtool-csv-honor-datadir-531upstream.patch 
    (working copy)
@@ -0,0 +1,111 @@
+Upstream commits: rrdcached, rrdtool, csv plugins: Honor the "DataDir" setting.
+6ef3385ccec835c7efae1ff3d5895858003a6da7
+dc61df5bf2ec9fe2c2aea6142505a73b3406d8e3
+44dcf2017576cbd398574ac66a732a5d2b179c3c
+d8a5927958995e2c62d5c32a395a724db1af9123
+
+Date: Wed, 24 Jul 2013 14:12:53 +0200
+This fixes a regression introduced in:
+bfd3f06ef4996707036756371c5724ebf2748821
+
+--- a/src/rrdcached.c
++++ b/src/rrdcached.c
+@@ -121,6 +121,21 @@ static int value_list_to_filename (char *buffer, size_t 
buffer_size,
+   int status;
+   size_t len;
+ 
++  if (datadir != NULL)
++  {
++    size_t datadir_len = strlen (datadir) + 1;
++
++    if (datadir_len >= buffer_size)
++      return (ENOMEM);
++
++    sstrncpy (buffer, datadir, buffer_size);
++    buffer[datadir_len - 1] = '/';
++    buffer[datadir_len] = 0;
++
++    buffer += datadir_len;
++    buffer_size -= datadir_len;
++  }
++
+   status = FORMAT_VL (buffer, buffer_size, vl);
+   if (status != 0)
+     return (status);
+--- a/src/rrdtool.c
++++ b/src/rrdtool.c
+@@ -254,6 +254,21 @@ static int value_list_to_filename (char *buffer, size_t 
buffer_size,
+       int status;
+       size_t len;
+ 
++      if (datadir != NULL)
++      {
++              size_t datadir_len = strlen (datadir) + 1;
++
++              if (datadir_len >= buffer_size)
++                      return (ENOMEM);
++
++              sstrncpy (buffer, datadir, buffer_size);
++              buffer[datadir_len - 1] = '/';
++              buffer[datadir_len] = 0;
++
++              buffer += datadir_len;
++              buffer_size -= datadir_len;
++      }
++
+       status = FORMAT_VL (buffer, buffer_size, vl);
+       if (status != 0)
+               return (status);
+--- a/src/csv.c
++++ b/src/csv.c
+@@ -126,12 +126,25 @@ static int value_list_to_filename (char *buffer, size_t 
buffer_size,
+ {
+       int status;
+ 
+-      char *ptr;
+-      size_t ptr_size;
++      char *ptr = buffer;
++      size_t ptr_size = buffer_size;
+       time_t now;
+       struct tm struct_tm;
+ 
+-      status = FORMAT_VL (buffer, buffer_size, vl);
++      if (datadir != NULL)
++      {
++              size_t len = strlen (datadir) + 1;
++
++              if (len >= ptr_size)
++                      return (ENOBUFS);
++
++              memcpy (ptr, datadir, len);
++              ptr[len-1] = '/';
++              ptr_size -= len;
++              ptr += len;
++      }
++
++      status = FORMAT_VL (ptr, ptr_size, vl);
+       if (status != 0)
+               return (status);
+ 
+@@ -140,8 +153,8 @@ static int value_list_to_filename (char *buffer, size_t 
buffer_size,
+       if (use_stdio)
+               return (0);
+ 
+-      ptr_size = buffer_size - strlen (buffer);
+-      ptr = buffer + strlen (buffer);
++      ptr_size -= strlen (ptr);
++      ptr +=  strlen (ptr);
+ 
+       /* "-2013-07-12" => 11 bytes */
+       if (ptr_size < 12)
+@@ -202,7 +215,10 @@ static int csv_config (const char *key, const char *value)
+       if (strcasecmp ("DataDir", key) == 0)
+       {
+               if (datadir != NULL)
++              {
+                       free (datadir);
++                      datadir = NULL;
++              }
+               if (strcasecmp ("stdout", value) == 0)
+               {
+                       use_stdio = 1;
--- packages/utils/collectd/patches/120-fix_kernel_2.6.37.patch (revision 38418)
+++ packages/utils/collectd/patches/120-fix_kernel_2.6.37.patch (working copy)
@@ -1,78 +0,0 @@
---- 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");
- 
--- packages/utils/collectd/patches/130-timeleft-max.patch      (revision 38418)
+++ packages/utils/collectd/patches/130-timeleft-max.patch      (working copy)
@@ -1,14 +0,0 @@
-Derived from uptream commit d5b09f2b: http://octo.cx/d5b09f2
-
---- a/src/types.db
-+++ b/src/types.db
-@@ -152,7 +152,7 @@ tcp_connections            value:GAUGE:0:429496729
- temperature           value:GAUGE:-273.15:U
- threads                       value:GAUGE:0:U
- time_dispersion               seconds:GAUGE:-1000000:1000000
--timeleft              timeleft:GAUGE:0:3600
-+timeleft              timeleft:GAUGE:0:U
- time_offset           seconds:GAUGE:-1000000:1000000
- total_bytes           value:DERIVE:0:U
- total_requests                value:DERIVE:0:U
-
--- packages/utils/collectd/patches/140-fix-fqdnlookup.patch    (revision 0)
+++ packages/utils/collectd/patches/140-fix-fqdnlookup.patch    (working copy)
@@ -0,0 +1,11 @@
+--- a/src/configfile.c
++++ b/src/configfile.c
+@@ -105,7 +105,7 @@ static cf_global_option_t cf_global_opti
+       {"BaseDir",     NULL, PKGLOCALSTATEDIR},
+       {"PIDFile",     NULL, PIDFILE},
+       {"Hostname",    NULL, NULL},
+-      {"FQDNLookup",  NULL, "true"},
++      {"FQDNLookup",  NULL, "false"},
+       {"Interval",    NULL, NULL},
+       {"ReadThreads", NULL, "5"},
+       {"WriteThreads", NULL, "5"},
--- packages/utils/collectd/patches/200-fix-git-describe-error.patch    
(revision 38418)
+++ packages/utils/collectd/patches/200-fix-git-describe-error.patch    
(working copy)
@@ -2,7 +2,7 @@
 +++ b/version-gen.sh
 @@ -2,7 +2,7 @@
  
- DEFAULT_VERSION="4.10.8.git"
+ DEFAULT_VERSION="5.3.1.git"
  
 -VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`"
 +#VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`"
--- packages/utils/collectd/patches/900-add-iwinfo-plugin.patch (revision 38418)
+++ packages/utils/collectd/patches/900-add-iwinfo-plugin.patch (working copy)
@@ -1,6 +1,6 @@
 --- a/configure.in
 +++ b/configure.in
-@@ -490,6 +490,9 @@ AC_CHECK_HEADERS(netinet/if_ether.h, [],
+@@ -563,6 +563,9 @@ AC_CHECK_HEADERS(net/pfvar.h,
  have_termios_h="no"
  AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
  
@@ -10,7 +10,7 @@
  #
  # Checks for typedefs, structures, and compiler characteristics.
  #
-@@ -4081,6 +4084,7 @@ plugin_interface="no"
+@@ -4593,6 +4596,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"
-@@ -4388,6 +4392,7 @@ AC_PLUGIN([ipmi],        [$plugin_ipmi],
+@@ -4920,6 +4924,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])
-@@ -4666,6 +4671,7 @@ Configuration:
+@@ -5213,6 +5218,7 @@ Configuration:
      protobuf-c  . . . . . $have_protoc_c
      oracle  . . . . . . . $with_oracle
      python  . . . . . . . $with_python
@@ -34,7 +34,7 @@
  
    Features:
      daemon mode . . . . . $enable_daemon
-@@ -4705,6 +4711,7 @@ Configuration:
+@@ -5255,6 +5261,7 @@ Configuration:
      iptables  . . . . . . $enable_iptables
      ipvs  . . . . . . . . $enable_ipvs
      irq . . . . . . . . . $enable_irq
@@ -44,7 +44,7 @@
      load  . . . . . . . . $enable_load
 --- a/src/collectd.conf.in
 +++ b/src/collectd.conf.in
-@@ -82,6 +82,7 @@ FQDNLookup   true
+@@ -95,6 +95,7 @@
  #@BUILD_PLUGIN_IPMI_TRUE@LoadPlugin ipmi
  #@BUILD_PLUGIN_IPVS_TRUE@LoadPlugin ipvs
  #@BUILD_PLUGIN_IRQ_TRUE@LoadPlugin irq
@@ -52,7 +52,7 @@
  #@BUILD_PLUGIN_JAVA_TRUE@LoadPlugin java
  #@BUILD_PLUGIN_LIBVIRT_TRUE@LoadPlugin libvirt
  @BUILD_PLUGIN_LOAD_TRUE@@BUILD_PLUGIN_LOAD_TRUE@LoadPlugin load
-@@ -376,6 +377,12 @@ FQDNLookup   true
+@@ -438,6 +439,12 @@
  #     IgnoreSelected true
  #</Plugin>
  
@@ -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
-@@ -1478,6 +1478,27 @@ and all other interrupts are collected.
+@@ -1916,6 +1916,27 @@ and all other interrupts are collected.
  
  =back
  
@@ -250,7 +250,7 @@
 +}
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
-@@ -453,6 +453,15 @@ collectd_LDADD += "-dlopen" irq.la
+@@ -512,6 +512,15 @@ collectd_LDADD += "-dlopen" irq.la
  collectd_DEPENDENCIES += irq.la
  endif
  
@@ -268,8 +268,11 @@
  java_la_SOURCES = java.c
 --- a/src/types.db
 +++ b/src/types.db
-@@ -171,3 +171,4 @@ voltage                    value:GAUGE:U:U
+@@ -186,6 +186,7 @@ voltage                    value:GAUGE:U:U
  vs_memory             value:GAUGE:0:9223372036854775807
  vs_processes          value:GAUGE:0:65535
  vs_threads            value:GAUGE:0:65535
 +stations              value:GAUGE:0:256
+ #
+ # Legacy types
+ # (required for the v5 upgrade target)
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to