include $(TOPDIR)/rules.mk
PKG_NAME:=collectd
-PKG_VERSION:=5.11.0
-PKG_RELEASE:=9
+PKG_VERSION:=5.12.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://collectd.org/files/ \
https://github.com/collectd/collectd/releases/download/collectd-$(PKG_VERSION)
-PKG_HASH:=37b10a806e34aa8570c1cafa6006c604796fae13cc2e1b3e630d33dcba9e5db2
+PKG_HASH:=5bae043042c19c31f77eb8464e56a01a5454e0b39fa07cf7ad0f1bfc9c3a09d6
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4
ceph \
cgroups \
cpusleep \
+ curl_jolokia \
curl_json \
curl_xml \
dbi \
grpc \
hddtemp \
hugepages \
+ infiniband \
intel_pmu \
intel_rdt \
ipc \
mbmon \
mcelog \
md \
+ mdevents \
memcachec \
memcached \
mic \
monitorus \
multimeter \
netapp \
+ netstat_udp \
nfs \
notify_desktop \
notify_email \
--- a/configure.ac
+++ b/configure.ac
-@@ -3384,9 +3384,9 @@ if test "x$with_libmodbus" = "xyes"; the
+@@ -3385,9 +3385,9 @@ if test "x$with_libmodbus" = "xyes"; the
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
--- a/configure.ac
+++ b/configure.ac
-@@ -532,11 +532,7 @@ if test "x$ac_system" = "xLinux"; then
+@@ -533,11 +533,7 @@ if test "x$ac_system" = "xLinux"; then
[have_cpuid_h="no (cpuid.h not found)"]
)
--- a/configure.ac
+++ b/configure.ac
-@@ -712,6 +712,11 @@ AC_CACHE_CHECK([whether clock_boottime a
+@@ -713,6 +713,11 @@ AC_CACHE_CHECK([whether clock_boottime a
]
)
#
# Checks for typedefs, structures, and compiler characteristics.
-@@ -6586,6 +6591,7 @@ plugin_ipmi="no"
+@@ -6619,6 +6624,7 @@ plugin_ipmi="no"
plugin_ipstats="no"
plugin_ipvs="no"
plugin_irq="no"
plugin_load="no"
plugin_log_logstash="no"
plugin_mcelog="no"
-@@ -7047,6 +7053,7 @@ AC_PLUGIN([iptables], [$with_
+@@ -7086,6 +7092,7 @@ AC_PLUGIN([iptables], [$with_
AC_PLUGIN([ipstats], [$plugin_ipstats], [IP packet statistics])
AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
AC_PLUGIN([load], [$plugin_load], [System load])
AC_PLUGIN([log_logstash], [$plugin_log_logstash], [Logstash json_event compatible logging])
-@@ -7424,6 +7431,7 @@ AC_MSG_RESULT([ libyajl . . . . . . .
+@@ -7465,6 +7472,7 @@ AC_MSG_RESULT([ libyajl . . . . . . .
AC_MSG_RESULT([ oracle . . . . . . . $with_oracle])
AC_MSG_RESULT([ protobuf-c . . . . . $have_protoc_c])
AC_MSG_RESULT([ protoc 3 . . . . . . $have_protoc3])
AC_MSG_RESULT()
AC_MSG_RESULT([ Features:])
AC_MSG_RESULT([ daemon mode . . . . . $enable_daemon])
-@@ -7491,6 +7499,7 @@ AC_MSG_RESULT([ iptables . . . . . .
+@@ -7533,6 +7541,7 @@ AC_MSG_RESULT([ iptables . . . . . .
AC_MSG_RESULT([ ipstats . . . . . . . $enable_ipstats])
AC_MSG_RESULT([ ipvs . . . . . . . . $enable_ipvs])
AC_MSG_RESULT([ irq . . . . . . . . . $enable_irq])
AC_MSG_RESULT([ logfile . . . . . . . $enable_logfile])
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
-@@ -145,6 +145,7 @@
+@@ -147,6 +147,7 @@
#@BUILD_PLUGIN_IPTABLES_TRUE@LoadPlugin iptables
#@BUILD_PLUGIN_IPVS_TRUE@LoadPlugin ipvs
#@BUILD_PLUGIN_IRQ_TRUE@LoadPlugin irq
#@BUILD_PLUGIN_JAVA_TRUE@LoadPlugin java
@BUILD_PLUGIN_LOAD_TRUE@@BUILD_PLUGIN_LOAD_TRUE@LoadPlugin load
#@BUILD_PLUGIN_LPAR_TRUE@LoadPlugin lpar
-@@ -813,6 +814,12 @@
+@@ -897,6 +898,12 @@
# IgnoreSelected true
#</Plugin>
# JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar"
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
-@@ -4164,6 +4164,27 @@ and all other interrupts are collected.
+@@ -4343,6 +4343,27 @@ and all other interrupts are collected.
=back
+}
--- a/src/types.db
+++ b/src/types.db
-@@ -258,6 +258,7 @@ snr value:GAUGE:0:U
+@@ -308,6 +308,7 @@ snr value:GAUGE:0:U
spam_check value:GAUGE:0:U
spam_score value:GAUGE:U:U
spl value:GAUGE:U:U
sysevent value:GAUGE:0:1
--- a/Makefile.am
+++ b/Makefile.am
-@@ -1237,6 +1237,14 @@ irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+@@ -1246,6 +1246,14 @@ irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
irq_la_LIBADD = libignorelist.la
endif
--- a/src/types.db
+++ b/src/types.db
-@@ -303,6 +303,17 @@ vs_memory value:GAUGE:0:92
+@@ -359,6 +359,17 @@ vs_memory value:GAUGE:0:92
vs_processes value:GAUGE:0:65535
vs_threads value:GAUGE:0:65535
--- /dev/null
+From 5e600ae2ad370ddbb759e84ce55a7dfaa9a0bdd7 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 6 Sep 2020 14:17:23 +0200
+Subject: [PATCH] src/netlink.c: remove REG_NOERROR
+
+REG_NOERROR is used since version 5.12.0 and
+https://github.com/collectd/collectd/commit/f7fd32e5209e188db7985a42054252fc4cbfe7c1
+
+However, REG_NOERROR is not defined by musl, even GNU regex do not
+mention REG_NOERROR, so just remove it to avoid the following build
+failure:
+
+src/netlink.c: In function 'check_ignorelist':
+src/netlink.c:243:51: error: 'REG_NOERROR' undeclared (first use in this function); did you mean 'REG_NOTBOL'?
+ if (regexec(i->rdevice, dev, 0, NULL, 0) != REG_NOERROR)
+ ^~~~~~~~~~~
+ REG_NOTBOL
+
+Fixes:
+ - http://autobuild.buildroot.org/results/cd4d75888b5259b028132dd224be34f69bcbb702
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ src/netlink.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/netlink.c b/src/netlink.c
+index 7a5da762c7..fac2fb1eb4 100644
+--- a/src/netlink.c
++++ b/src/netlink.c
+@@ -240,7 +240,7 @@ static int check_ignorelist(const char *dev, const char *type,
+ for (ir_ignorelist_t *i = ir_ignorelist_head; i != NULL; i = i->next) {
+ #if HAVE_REGEX_H
+ if (i->rdevice != NULL) {
+- if (regexec(i->rdevice, dev, 0, NULL, 0) != REG_NOERROR)
++ if (regexec(i->rdevice, dev, 0, NULL, 0))
+ continue;
+ } else
+ #endif
+++ /dev/null
---- a/src/ubi.c
-+++ b/src/ubi.c
-@@ -70,13 +70,13 @@ static int ubi_config(const char *key, c
- } /* int ubi_config */
-
- static void ubi_submit(const char *dev_name, const char *type,
-- counter_t value) {
-+ gauge_t value) {
- value_list_t vl = VALUE_LIST_INIT;
-
- if (ignorelist_match(ignorelist, dev_name) != 0)
- return;
-
-- vl.values = &(value_t){.counter = value};
-+ vl.values = &(value_t){.gauge = value};
- vl.values_len = 1;
- sstrncpy(vl.plugin, PLUGIN_NAME, sizeof(vl.plugin));
- sstrncpy(vl.type_instance, dev_name, sizeof(vl.type_instance));
-@@ -107,7 +107,7 @@ static int ubi_read_dev_attr(const char
- return -1;
- }
-
-- ubi_submit(dev_name, attr, (counter_t)val);
-+ ubi_submit(dev_name, attr, (gauge_t)val);
-
- return 0;
- } /* int ubi_read_dev_attr */
---- a/src/types.db
-+++ b/src/types.db
-@@ -7,7 +7,7 @@ apache_scoreboard value:GAUGE:0:65
- ath_nodes value:GAUGE:0:65535
- ath_stat value:DERIVE:0:U
- backends value:GAUGE:0:65535
--bad_peb_count value:COUNTER:0:U
-+bad_peb_count value:GAUGE:0:U
- bitrate value:GAUGE:0:4294967295
- blocked_clients value:GAUGE:0:U
- bucket value:GAUGE:0:U
-@@ -140,7 +140,7 @@ job_stats value:DERIVE:0:U
- latency value:GAUGE:0:U
- links value:GAUGE:0:U
- load shortterm:GAUGE:0:5000, midterm:GAUGE:0:5000, longterm:GAUGE:0:5000
--max_ec value:COUNTER:0:U
-+max_ec value:GAUGE:0:U
- media value:GAUGE:0:18446744073709551615
- memory_bandwidth value:DERIVE:0:U
- md_disks value:GAUGE:0:U