Module: check_mk
Branch: master
Commit: 85c84b42ecc97feec2f40bb79423ccef0306e94d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=85c84b42ecc97f…
Author: Andreas <ab(a)mathias-kettner.de>
Date: Mon Jun 25 18:40:53 2018 +0200
6236 FIX cmk --convert-rrds: fixed broken command
The last major update of rrdtool broke some previously working command in the python
c-binding.
As a result, the <tt>cmk --convert-rrds</tt> command failed with
<tt>ERROR: 'xff'</tt>.
Change-Id: If8ed196ec75e5942b5b5d0b91f96c21405ebb74f
---
.werks/6236 | 13 +++++++++++++
omd/packages/rrdtool/Makefile | 4 ++++
.../patches/0001-xff_field_missing_from_rrdinfo.diff | 17 +++++++++++++++++
3 files changed, 34 insertions(+)
diff --git a/.werks/6236 b/.werks/6236
new file mode 100644
index 0000000..b0d7191
--- /dev/null
+++ b/.werks/6236
@@ -0,0 +1,13 @@
+Title: cmk --convert-rrds: fixed broken command
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1529944624
+Class: fix
+
+The last major update of rrdtool broke some previously working command in the python
c-binding.
+As a result, the <tt>cmk --convert-rrds</tt> command failed with
<tt>ERROR: 'xff'</tt>.
+
+
diff --git a/omd/packages/rrdtool/Makefile b/omd/packages/rrdtool/Makefile
index d248e93..2c31c75 100644
--- a/omd/packages/rrdtool/Makefile
+++ b/omd/packages/rrdtool/Makefile
@@ -19,6 +19,10 @@ CONFIGUREOPTS := \
build: check-python check-python-modules
rm -rf $(DIR)
tar xzf $(DIR).tar.gz
+ for p in patches/*.diff ; do \
+ echo "applying $$p..." ; \
+ patch -p1 -b -d $(DIR) < $$p ; \
+ done
# set perl environment to match the other perl modules
echo "install --install_base $(DESTDIR)$(OMD_ROOT)/lib/perl5" >
.modulebuildrc
# The MS_ASYNC/mtime check is broken and often leads to non-killable sync syscalls.
diff --git a/omd/packages/rrdtool/patches/0001-xff_field_missing_from_rrdinfo.diff
b/omd/packages/rrdtool/patches/0001-xff_field_missing_from_rrdinfo.diff
new file mode 100644
index 0000000..37557f8
--- /dev/null
+++ b/omd/packages/rrdtool/patches/0001-xff_field_missing_from_rrdinfo.diff
@@ -0,0 +1,17 @@
+--- a/bindings/python/rrdtoolmodule.c.orig 2018-06-25 18:25:52.726510964 +0200
++++ b/bindings/python/rrdtoolmodule.c 2018-06-25 18:26:11.341983601 +0200
+@@ -213,11 +213,9 @@
+
+ switch (data->type) {
+ case RD_I_VAL:
+- if (isnan(data->value.u_val)) {
+- Py_INCREF(Py_None);
+- val = Py_None;
+- } else
+- PyFloat_FromDouble(data->value.u_val);
++ val = isnan(data->value.u_val)
++ ? (Py_INCREF(Py_None), Py_None)
++ : PyFloat_FromDouble(data->value.u_val);
+ break;
+
+ case RD_I_CNT: