collectd: update to 5.12.0

Update collectd to version 5.12.0.

* Refresh patches
* Remove upstreamed patch 920-fix-ubi-data-source-type.patch
* Backport a patch from upstream to fix a missing define
  (920-backport-netlink-reg-noerror.patch)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
This commit is contained in:
Hannu Nyman 2020-09-07 17:58:08 +03:00
parent 89213c1a45
commit 28747825df
7 changed files with 59 additions and 63 deletions

View File

@ -8,13 +8,13 @@
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
@ -37,6 +37,7 @@ COLLECTD_PLUGINS_DISABLED:= \
ceph \
cgroups \
cpusleep \
curl_jolokia \
curl_json \
curl_xml \
dbi \
@ -53,6 +54,7 @@ COLLECTD_PLUGINS_DISABLED:= \
grpc \
hddtemp \
hugepages \
infiniband \
intel_pmu \
intel_rdt \
ipc \
@ -68,12 +70,14 @@ COLLECTD_PLUGINS_DISABLED:= \
mbmon \
mcelog \
md \
mdevents \
memcachec \
memcached \
mic \
monitorus \
multimeter \
netapp \
netstat_udp \
nfs \
notify_desktop \
notify_email \

View File

@ -18,7 +18,7 @@ Reversed patch to be applied:
--- 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"

View File

@ -1,6 +1,6 @@
--- 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)"]
)

View File

@ -1,6 +1,6 @@
--- 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
]
)
@ -12,7 +12,7 @@
#
# 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"
@ -20,7 +20,7 @@
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])
@ -28,7 +28,7 @@
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])
@ -36,7 +36,7 @@
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])
@ -46,7 +46,7 @@
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
@ -54,7 +54,7 @@
#@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>
@ -69,7 +69,7 @@
# 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
@ -252,7 +252,7 @@
+}
--- 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
@ -262,7 +262,7 @@
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

View File

@ -1,6 +1,6 @@
--- 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

View File

@ -0,0 +1,39 @@
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

View File

@ -1,47 +0,0 @@
--- 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