From b5fba04e19aa47d909857019daf1176c502d0904679f4b7fa68eb800548d47df Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Mon, 26 Oct 2015 15:49:18 +0000 Subject: [PATCH 1/4] Accepting request 330598 from home:matwey:branches:server:monitoring OBS-URL: https://build.opensuse.org/request/show/330598 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/collectd?expand=0&rev=128 --- collectd.changes | 5 +++++ collectd.spec | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/collectd.changes b/collectd.changes index ca88974..bf7fae6 100644 --- a/collectd.changes +++ b/collectd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Sep 12 10:58:03 UTC 2015 - matwey.kornilov@gmail.com + +- Add modbus plugin + ------------------------------------------------------------------- Fri Jun 5 06:49:33 UTC 2015 - mpluskal@suse.com diff --git a/collectd.spec b/collectd.spec index 55b3bf5..8a24ae7 100644 --- a/collectd.spec +++ b/collectd.spec @@ -50,6 +50,11 @@ %define memcachec 0 %define memcached_plugin %{nil} %endif +%if ! 0%{?_without_modbus:1} +%define modbus 1 +%else +%define modbus 0 +%endif %if 0%{?suse_version} < 1000 %define libnotify 0 %else @@ -253,6 +258,9 @@ BuildRequires: libdbi-devel %if %{memcachec} BuildRequires: libmemcached-devel %endif +%if %{modbus} +BuildRequires: libmodbus-devel +%endif %if %{protobuf} BuildRequires: protobuf-c %endif @@ -426,6 +434,16 @@ Requires: %{name} = %{version}-%{release} Optional %{name} plugin to sample memcached statistics. %endif #memcachec +%if %{modbus} +%package plugin-modbus +Summary: ModBus Plugin for %{name} +Group: System/Monitoring +Requires: %{name} = %{version}-%{release} + +%description plugin-modbus +Optional %{name} plugin to collect data using ModBus protocol. +%endif #modbus + %if %{protobuf} %package plugin-pinba Summary: Pinba Collector Plugin for %{name} @@ -471,6 +489,9 @@ Requires: %{name}-plugin-dbi = %{version}-%{release} %if %{memcachec} Requires: %{name}-plugin-memcachec = %{version}-%{release} %endif #memcachec +%if %{modbus} +Requires: %{name}-plugin-modbus = %{version}-%{release} +%endif #modbus %if %{protobuf} Requires: %{name}-plugin-pinba = %{version}-%{release} %endif #protobuf @@ -608,6 +629,11 @@ export KERNEL_DIR=%{_prefix}/src/linux %else --disable-memcached \ %endif #memcachec +%if %{modbus} + --enable-modbus \ +%else + --disable-modbus \ +%endif #modbus %if 0%{?suse_version} < 930 --disable-mysql \ %endif @@ -933,6 +959,13 @@ ln -s "../..%{_initddir}/collectd" "%{buildroot}%{_sbindir}/rccollectd" %{_libdir}/collectd/memcachec.la %endif #memcachec +%if %{modbus} +%files plugin-modbus +%defattr(-,root,root) +%{_libdir}/collectd/modbus.so +%{_libdir}/collectd/modbus.la +%endif #modbus + %files spamassassin %defattr(-,root,root) %dir %{_datadir}/spamassassin From 9761b086e4a53bca77e57432071dedcc90a2acf4e8f3cde117beda1f7bb579bb Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Thu, 31 Dec 2015 18:21:24 +0000 Subject: [PATCH 2/4] Accepting request 349425 from home:oertel:branches:server:monitoring - add patch collectd-new_libstatgrab.patch: fix build with recent libstatgrab (basically backport from git) - do not (build)require sensors on s390/s390x OBS-URL: https://build.opensuse.org/request/show/349425 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/collectd?expand=0&rev=129 --- collectd-new_libstatgrab.patch | 63 ++++++++++++++++++++++++++++++++++ collectd.changes | 7 ++++ collectd.spec | 15 ++++++-- 3 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 collectd-new_libstatgrab.patch diff --git a/collectd-new_libstatgrab.patch b/collectd-new_libstatgrab.patch new file mode 100644 index 0000000..1661d35 --- /dev/null +++ b/collectd-new_libstatgrab.patch @@ -0,0 +1,63 @@ +--- configure.ac ++++ configure.ac +@@ -4003,6 +4003,34 @@ + LDFLAGS="$SAVE_LDFLAGS" + fi + ++if test "x$with_libstatgrab" = "xyes" ++then ++ SAVE_CFLAGS="$CFLAGS" ++ SAVE_LDFLAGS="$LDFLAGS" ++ ++ CFLAGS="$CFLAGS $with_libstatgrab_cflags" ++ LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags" ++ ++ AC_CACHE_CHECK([if sg_init() requires an argument], ++ [c_cv_have_libstatgrab_init_arg], ++ AC_LINK_IFELSE([AC_LANG_PROGRAM( ++[[[ ++#include ++#include ++]]], ++[[[ ++ if (sg_init()) return 0; ++]]] ++ )], ++ [c_cv_have_libstatgrab_init_arg="no"], ++ [c_cv_have_libstatgrab_init_arg="yes"] ++ ) ++ ) ++ ++ CFLAGS="$SAVE_CFLAGS" ++ LDFLAGS="$SAVE_LDFLAGS" ++fi ++ + AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes") + if test "x$with_libstatgrab" = "xyes" + then +@@ -4011,6 +4039,10 @@ + BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags" + AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS) + AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS) ++ if test "x$c_cv_have_libstatgrab_init_arg" = "xyes" ++ then ++ AC_DEFINE(HAVE_LIBSTATGRAB_INIT_ARG, 1, [Define to 1 if sg_init does require an argument]) ++ fi + fi + # }}} + +--- src/collectd.c ++++ src/collectd.c +@@ -288,7 +288,11 @@ + #endif + + #if HAVE_LIBSTATGRAB +- if (sg_init ()) ++ if (sg_init ( ++# if HAVE_LIBSTATGRAB_INIT_ARG ++ 0 ++# endif ++ )) + { + ERROR ("sg_init: %s", sg_str_error (sg_get_error ())); + return (-1); diff --git a/collectd.changes b/collectd.changes index bf7fae6..b28aa2d 100644 --- a/collectd.changes +++ b/collectd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Dec 17 17:56:16 CET 2015 - ro@suse.de + +- add patch collectd-new_libstatgrab.patch: + fix build with recent libstatgrab (basically backport from git) +- do not (build)require sensors on s390/s390x + ------------------------------------------------------------------- Sat Sep 12 10:58:03 UTC 2015 - matwey.kornilov@gmail.com diff --git a/collectd.spec b/collectd.spec index 8a24ae7..5c44683 100644 --- a/collectd.spec +++ b/collectd.spec @@ -22,7 +22,14 @@ %define snmp 1 %define with_esmtp 1 %define ipvs_plugin ipvs -%define plugins apache apcups battery %{expand:%{bind_plugin}} cgroups curl %{expand:%{curl_json_plugin}} %{expand:%{curl_xml_plugin}} conntrack contextswitch cpu cpufreq csv df disk %{expand:%{dns_plugin}} email entropy exec filecount fscache hddtemp interface %{expand:%{ipvs_plugin}} irq load logfile match_empty_counter match_hashed match_regex match_timediff match_value mbmon %{expand:%{memcached_plugin}} memory multimeter netlink network nfs nginx ntpd olsrd openvpn perl ping protocols powerdns processes rrdtool sensors serial statsd swap syslog table tail target_notification target_replace target_scale target_set target_v5upgrade tcpconns teamspeak2 ted thermal threshold unixsock uptime users uuid vmem vserver wireless write_http %{expand:%{ascent_plugin}} %{expand:%{iptables_plugin}} %{expand:%{madwifi_plugin}} %{expand:%{rrdcached_plugin}} aggregation ethstat md numa tail_csv write_graphite write_riemann +%define plugins apache apcups battery %{expand:%{bind_plugin}} cgroups curl %{expand:%{curl_json_plugin}} %{expand:%{curl_xml_plugin}} conntrack contextswitch cpu cpufreq csv df disk %{expand:%{dns_plugin}} email entropy exec filecount fscache hddtemp interface %{expand:%{ipvs_plugin}} irq load logfile match_empty_counter match_hashed match_regex match_timediff match_value mbmon %{expand:%{memcached_plugin}} memory multimeter netlink network nfs nginx ntpd olsrd openvpn perl ping protocols powerdns processes rrdtool %{expand:%{sensors_plugin}} serial statsd swap syslog table tail target_notification target_replace target_scale target_set target_v5upgrade tcpconns teamspeak2 ted thermal threshold unixsock uptime users uuid vmem vserver wireless write_http %{expand:%{ascent_plugin}} %{expand:%{iptables_plugin}} %{expand:%{madwifi_plugin}} %{expand:%{rrdcached_plugin}} aggregation ethstat md numa tail_csv write_graphite write_riemann +%ifnarch s390 s390x +%define sensors 1 +%define sensors_plugin sensors +%else +%define sensors 0 +%define sensors_plugin %{nil} +%endif %if 0%{?_with_xmms:1}0 %define xmms 1 %else @@ -146,6 +153,7 @@ Patch20: collectd-split_README.patch Patch21: collectd-fix_collectd_config_path_in_snmp_probe.patch Patch23: collectd-javac_target.patch Patch25: collectd-df-remove-duplicates.patch +Patch26: collectd-new_libstatgrab.patch # for /etc/apache2/... ownership (rpmlint): BuildRequires: apache2 BuildRequires: autoconf @@ -177,11 +185,13 @@ BuildRequires: perl BuildRequires: pkgconfig BuildRequires: python-devel BuildRequires: rrdtool -BuildRequires: sensors BuildRequires: xfsprogs-devel BuildRequires: zlib-devel Requires: rrdtool +%if %{sensors} +BuildRequires: sensors Requires: sensors +%endif # FIXME: use proper Requires(pre/post/preun/...) PreReq: %fillup_prereq # in case we'd like to split it later: @@ -549,6 +559,7 @@ to write %{name} unixsock clients. %patch24 -p1 %endif %patch25 +%patch26 sed -i 's|@@VERSION@@|%{version}|g' configure.ac From 01ba04bb0c0ff774ae04849cbff822c5df34e4207c3773e461cc0eaf616553a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aeneas=20Jai=C3=9Fle?= Date: Thu, 14 Jan 2016 12:47:04 +0000 Subject: [PATCH 3/4] Accepting request 353681 from home:aeneas_jaissle:branches:server:monitoring Add %bcond for modbus OBS-URL: https://build.opensuse.org/request/show/353681 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/collectd?expand=0&rev=130 --- collectd.changes | 5 +++++ collectd.spec | 20 ++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/collectd.changes b/collectd.changes index b28aa2d..57dcb10 100644 --- a/collectd.changes +++ b/collectd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jan 14 10:53:13 UTC 2016 - aj@ajaissle.de + +- Added %bcond for modbus + ------------------------------------------------------------------- Thu Dec 17 17:56:16 CET 2015 - ro@suse.de diff --git a/collectd.spec b/collectd.spec index 5c44683..e126ed3 100644 --- a/collectd.spec +++ b/collectd.spec @@ -1,7 +1,7 @@ # # spec file for package collectd # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2005-2013 Pascal Bleser # # All modifications and additions to the file contributed by third parties @@ -17,6 +17,8 @@ # +%bcond_with modbus + %define madwifi_plugin madwifi %define pcap_version %({rpm -q --qf='%{VERSION}\n' libpcap-devel 2>/dev/null || echo 0.0.0} | gawk -F. '{print $1*10000+$2*100+$3}') %define snmp 1 @@ -57,11 +59,6 @@ %define memcachec 0 %define memcached_plugin %{nil} %endif -%if ! 0%{?_without_modbus:1} -%define modbus 1 -%else -%define modbus 0 -%endif %if 0%{?suse_version} < 1000 %define libnotify 0 %else @@ -170,7 +167,6 @@ BuildRequires: intltool BuildRequires: kernel-source BuildRequires: libart_lgpl-devel BuildRequires: libevent-devel -#BuildRequires: libmodbus-devel BuildRequires: libmnl-devel BuildRequires: libnetlink-devel BuildRequires: liboping-devel @@ -268,7 +264,7 @@ BuildRequires: libdbi-devel %if %{memcachec} BuildRequires: libmemcached-devel %endif -%if %{modbus} +%if %{with modbus} BuildRequires: libmodbus-devel %endif %if %{protobuf} @@ -444,7 +440,7 @@ Requires: %{name} = %{version}-%{release} Optional %{name} plugin to sample memcached statistics. %endif #memcachec -%if %{modbus} +%if %{with modbus} %package plugin-modbus Summary: ModBus Plugin for %{name} Group: System/Monitoring @@ -499,7 +495,7 @@ Requires: %{name}-plugin-dbi = %{version}-%{release} %if %{memcachec} Requires: %{name}-plugin-memcachec = %{version}-%{release} %endif #memcachec -%if %{modbus} +%if %{with modbus} Requires: %{name}-plugin-modbus = %{version}-%{release} %endif #modbus %if %{protobuf} @@ -640,7 +636,7 @@ export KERNEL_DIR=%{_prefix}/src/linux %else --disable-memcached \ %endif #memcachec -%if %{modbus} +%if %{with modbus} --enable-modbus \ %else --disable-modbus \ @@ -970,7 +966,7 @@ ln -s "../..%{_initddir}/collectd" "%{buildroot}%{_sbindir}/rccollectd" %{_libdir}/collectd/memcachec.la %endif #memcachec -%if %{modbus} +%if %{with modbus} %files plugin-modbus %defattr(-,root,root) %{_libdir}/collectd/modbus.so From 321fa44ea394193363d2963ac903f35fced009a047be9b51318d7a5c82e8774c Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Mon, 18 Jan 2016 08:23:37 +0000 Subject: [PATCH 4/4] Accepting request 353930 from home:mnhauke:monitoring - packaging: * removed patches: - collectd-new_libstatgrab.patch (fixed upstream) - collectd-lib64.patch (fixed upstream) - collectd-fix_libltdl_autoreconf.patch (fixed upstream) * updated patches: - collectd-javac_target.patch - collectd-version.patch - upstream update release 2015-05-27, Version 5.5.0 OBS-URL: https://build.opensuse.org/request/show/353930 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/collectd?expand=0&rev=131 --- _service | 7 - collectd-5.4.2.tar.bz2 | 3 - collectd-5.5.0.tar.bz2 | 3 + collectd-fix_libltdl_autoreconf.patch | 19 -- collectd-javac_target.patch | 38 ++-- collectd-lib64.patch | 11 - collectd-new_libstatgrab.patch | 63 ------ collectd-version.patch | 8 +- collectd.changes | 291 ++++++++++++++++++++++++++ collectd.spec | 18 +- 10 files changed, 325 insertions(+), 136 deletions(-) delete mode 100644 _service delete mode 100644 collectd-5.4.2.tar.bz2 create mode 100644 collectd-5.5.0.tar.bz2 delete mode 100644 collectd-fix_libltdl_autoreconf.patch delete mode 100644 collectd-lib64.patch delete mode 100644 collectd-new_libstatgrab.patch diff --git a/_service b/_service deleted file mode 100644 index 6b5257e..0000000 --- a/_service +++ /dev/null @@ -1,7 +0,0 @@ - - - collectd-5.4.2.tar.bz2 - sha256 - 9789e900c138b5dbe907d3d744143f12b1e30022276cb1d8c65bbabaf0c4e393 - - diff --git a/collectd-5.4.2.tar.bz2 b/collectd-5.4.2.tar.bz2 deleted file mode 100644 index 0040ca6..0000000 --- a/collectd-5.4.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9789e900c138b5dbe907d3d744143f12b1e30022276cb1d8c65bbabaf0c4e393 -size 1633610 diff --git a/collectd-5.5.0.tar.bz2 b/collectd-5.5.0.tar.bz2 new file mode 100644 index 0000000..d0c9846 --- /dev/null +++ b/collectd-5.5.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:847684cf5c10de1dc34145078af3fcf6e0d168ba98c14f1343b1062a4b569e88 +size 1824495 diff --git a/collectd-fix_libltdl_autoreconf.patch b/collectd-fix_libltdl_autoreconf.patch deleted file mode 100644 index 33651cf..0000000 --- a/collectd-fix_libltdl_autoreconf.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- Makefile.in.orig 2013-06-04 02:28:14.547813510 +0200 -+++ Makefile.in 2013-06-04 02:28:22.270816101 +0200 -@@ -346,7 +346,7 @@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --ACLOCAL_AMFLAGS = -I libltdl/m4 -+ACLOCAL_AMFLAGS = -I libltdl - SUBDIRS = libltdl src bindings . - INCLUDES = $(LTDLINCL) - EXTRA_DIST = contrib version-gen.sh ---- Makefile.am.orig 2013-06-04 02:28:28.047818050 +0200 -+++ Makefile.am 2013-06-04 02:28:32.101819418 +0200 -@@ -1,4 +1,4 @@ --ACLOCAL_AMFLAGS = -I libltdl/m4 -+ACLOCAL_AMFLAGS = -I libltdl - - SUBDIRS = libltdl src bindings . - diff --git a/collectd-javac_target.patch b/collectd-javac_target.patch index dba40da..3fb07b2 100644 --- a/collectd-javac_target.patch +++ b/collectd-javac_target.patch @@ -1,22 +1,26 @@ ---- bindings/java/Makefile.in.orig 2010-07-12 20:27:41.000000000 +0200 -+++ bindings/java/Makefile.in 2010-07-12 20:28:09.000000000 +0200 -@@ -490,8 +490,8 @@ - - - java-build-stamp: org/collectd/api/*.java org/collectd/java/*.java -- $(JAVAC) -d "." "$(srcdir)/org/collectd/api"/*.java -- $(JAVAC) -d "." "$(srcdir)/org/collectd/java"/*.java -+ $(JAVAC) $(JAVAC_TARGET) -d "." "$(srcdir)/org/collectd/api"/*.java -+ $(JAVAC) $(JAVAC_TARGET) -d "." "$(srcdir)/org/collectd/java"/*.java - mkdir -p .libs - $(JAR) cf .libs/collectd-api.jar "org/collectd/api"/*.class - $(JAR) cf .libs/generic-jmx.jar "org/collectd/java"/*.class ---- bindings/java/Makefile.am.orig 2010-07-12 20:26:48.000000000 +0200 -+++ bindings/java/Makefile.am 2010-07-12 20:27:35.000000000 +0200 -@@ -25,8 +25,8 @@ +diff --git a/bindings/java/Makefile.am b/bindings/java/Makefile.am +index 8d2e49d..549d81a 100644 +--- a/bindings/java/Makefile.am ++++ b/bindings/java/Makefile.am +@@ -25,8 +25,8 @@ EXTRA_DIST = org/collectd/api/CollectdConfigInterface.java \ org/collectd/java/JMXMemory.java - java-build-stamp: org/collectd/api/*.java org/collectd/java/*.java + java-build-stamp: $(srcdir)/org/collectd/api/*.java $(srcdir)/org/collectd/java/*.java +- $(JAVAC) -d "." "$(srcdir)/org/collectd/api"/*.java +- $(JAVAC) -d "." "$(srcdir)/org/collectd/java"/*.java ++ $(JAVAC) $(JAVAC_TARGET) -d "." "$(srcdir)/org/collectd/api"/*.java ++ $(JAVAC) $(JAVAC_TARGET) -d "." "$(srcdir)/org/collectd/java"/*.java + mkdir -p .libs + $(JAR) cf .libs/collectd-api.jar "org/collectd/api"/*.class + $(JAR) cf .libs/generic-jmx.jar "org/collectd/java"/*.class +diff --git a/bindings/java/Makefile.in b/bindings/java/Makefile.in +index 1c57558..c8ab086 100644 +--- a/bindings/java/Makefile.in ++++ b/bindings/java/Makefile.in +@@ -597,8 +597,8 @@ uninstall-am: uninstall-local + + + java-build-stamp: $(srcdir)/org/collectd/api/*.java $(srcdir)/org/collectd/java/*.java - $(JAVAC) -d "." "$(srcdir)/org/collectd/api"/*.java - $(JAVAC) -d "." "$(srcdir)/org/collectd/java"/*.java + $(JAVAC) $(JAVAC_TARGET) -d "." "$(srcdir)/org/collectd/api"/*.java diff --git a/collectd-lib64.patch b/collectd-lib64.patch deleted file mode 100644 index 7d492ab..0000000 --- a/collectd-lib64.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/collectd.h.orig 2009-12-20 16:36:31.000000000 +0100 -+++ src/collectd.h 2009-12-21 20:01:00.000000000 +0100 -@@ -254,7 +254,7 @@ - #endif - - #ifndef PLUGINDIR --#define PLUGINDIR PREFIX "/lib/" PACKAGE_NAME -+#define PLUGINDIR PREFIX "/lib64/" PACKAGE_NAME - #endif - - #ifndef PKGDATADIR diff --git a/collectd-new_libstatgrab.patch b/collectd-new_libstatgrab.patch deleted file mode 100644 index 1661d35..0000000 --- a/collectd-new_libstatgrab.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- configure.ac -+++ configure.ac -@@ -4003,6 +4003,34 @@ - LDFLAGS="$SAVE_LDFLAGS" - fi - -+if test "x$with_libstatgrab" = "xyes" -+then -+ SAVE_CFLAGS="$CFLAGS" -+ SAVE_LDFLAGS="$LDFLAGS" -+ -+ CFLAGS="$CFLAGS $with_libstatgrab_cflags" -+ LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags" -+ -+ AC_CACHE_CHECK([if sg_init() requires an argument], -+ [c_cv_have_libstatgrab_init_arg], -+ AC_LINK_IFELSE([AC_LANG_PROGRAM( -+[[[ -+#include -+#include -+]]], -+[[[ -+ if (sg_init()) return 0; -+]]] -+ )], -+ [c_cv_have_libstatgrab_init_arg="no"], -+ [c_cv_have_libstatgrab_init_arg="yes"] -+ ) -+ ) -+ -+ CFLAGS="$SAVE_CFLAGS" -+ LDFLAGS="$SAVE_LDFLAGS" -+fi -+ - AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes") - if test "x$with_libstatgrab" = "xyes" - then -@@ -4011,6 +4039,10 @@ - BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags" - AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS) - AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS) -+ if test "x$c_cv_have_libstatgrab_init_arg" = "xyes" -+ then -+ AC_DEFINE(HAVE_LIBSTATGRAB_INIT_ARG, 1, [Define to 1 if sg_init does require an argument]) -+ fi - fi - # }}} - ---- src/collectd.c -+++ src/collectd.c -@@ -288,7 +288,11 @@ - #endif - - #if HAVE_LIBSTATGRAB -- if (sg_init ()) -+ if (sg_init ( -+# if HAVE_LIBSTATGRAB_INIT_ARG -+ 0 -+# endif -+ )) - { - ERROR ("sg_init: %s", sg_str_error (sg_get_error ())); - return (-1); diff --git a/collectd-version.patch b/collectd-version.patch index f4fd5ed..0a35fe9 100644 --- a/collectd-version.patch +++ b/collectd-version.patch @@ -1,9 +1,11 @@ ---- a/configure.ac 2014-01-26 09:09:23.000000000 +0100 -+++ b/configure.ac 2014-03-11 07:41:44.326748635 +0100 +diff --git a/configure.ac b/configure.ac +index 87d1502..15efa43 100644 +--- a/configure.ac ++++ b/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)]) +AC_INIT([collectd],[@@VERSION@@]) - AC_CONFIG_SRCDIR(src/collectd.c) + AC_CONFIG_SRCDIR(src/) AC_CONFIG_HEADERS(src/config.h) AC_CONFIG_AUX_DIR([libltdl/config]) diff --git a/collectd.changes b/collectd.changes index 57dcb10..b3b202f 100644 --- a/collectd.changes +++ b/collectd.changes @@ -1,3 +1,294 @@ +------------------------------------------------------------------- +Fri Jan 15 20:48:24 UTC 2016 - mardnh@gmx.de + +- packaging: + * removed patches: + - collectd-new_libstatgrab.patch (fixed upstream) + - collectd-lib64.patch (fixed upstream) + - collectd-fix_libltdl_autoreconf.patch (fixed upstream) + * updated patches: + - collectd-javac_target.patch + - collectd-version.patch + +- upstream update release 2015-05-27, Version 5.5.0 + * Build system: Ability to make out-of-tree builds has been fixed. + Thanks to Vincent Bernat. #792 + * Build system, Disk and Users plugins: Detection and use of libstatgrab + ≧ 0.90 has been added. Thanks to Vincent Bernat. #445, #795, #806, + #807, #908 + * Build system, Memory, CPU, TCPConns and Processes plugins: Numerous + fixes related to OpenBSD support have been added. Thanks to Landry + Breuil. #777, #778, #779, #808 + * Build system: Plugins now only export "module_register()". Thanks to + Florian Forster. + * Build system: Various cleanups and improvements have been done. Thanks + to Marc Fournier. + * collectd: Numerous internal changes and improvements to the daemon and + the plugin API have been make. Thanks to Florian Forster, Pierre-Yves + Ritschard and Alex Petrov. #512, #727 + * collectd: Numerous spelling mistakes have been corrected in comments + and documentation and several error messages have been improved. + Thanks to Ruben Kerkhof, Abhinav Upadhyay, Olivier Bazoud, Pierre-Yves + Ritschard, Tim Smith, Moshe Zada, Katelyn Perry and Marc Fournier. + * collectd: Rules/Targets can now be appended to existing Filter Chains. + Thanks to Marc Falzon. #444 + * collectd: Failing Filter Chains destinations will now log the list of + available write targets. Thanks to Wilfried Goesgens. #650, #1043 + * collectd: Support for process signaling and management by upstart and + systemd has been implemented for the Linux platform. Thanks to + Pierre-Yves Ritschard and Marc Fournier. #798, #811, #814 + * collectd: The "CollectInternalStats" option has been added. Thanks to + Yves Mettier. #691 + * collectd: The daemon source code and dependencies have moved to the + "src/daemon/" directory. Thanks to Florian Forster. + * collectd: The new "MaxReadInterval" option allows to cap the + exponential retry interval of plugins read errors. Thanks to Alexey + Remizov and Florian Forster. #713 + * collectd: The "-P" command-line option now has precedence over the + "PIDFile" option. Thanks to Thomas D. #553 + * collection.cgi: Various data-source related adjustments have been + made. Thanks to Fabiano Pires and Sebastian Harl. + * libcollectdclient: Now propagates errors when signing / encrypting + network packets. Thanks to Florian Forster. + * Configuration: Support for unquoted IPv6 addresses has been added. + Thanks to Sebastian Harl. #489 + * Documentation: Various improvements have been done. Thanks to Florian + Forster and Marc Fournier. + * Examples: the sample C plugin has been updated to the current plugin + API. Thanks to Sebastian Harl. + * Licensing: The following components have been relicensed to the MIT + license: the Apple Sensors, Ascent, DBI, E-Mail, Entropy, GenericJMX, + gmond, LogFile, nginx, Notify Desktop, NTPd, NUT, olsrd, Perl, Ping, + PostgreSQL, Protocols, RouterOS, RRDCacheD, SNMP, StatsD, SysLog, + Table, Tail, UnixSock, vmem, VServer, Wireless, Write Riemann and XMMS + plugins, the core collectd daemon, the collectdmon, collectd-nagios + and collectd-tg utilities, all the Targets and Matches, liboconfig, + most of the "utils_*" files and the plugin API. + * Tests: A test suite has been added. Thanks to Florian Forster. + * Threshold: The hysteresis calculation has been made more reliable. + Thanks to Jan Kundrát. #581 + * Threshold: Various fixes and improvements have been made. Thanks to + Manuel Luis Sanmartín Rozada. #649, #644 + * AMQP plugin: The "ConnectionRetryDelay" option has been added, + allowing to delay reconnection. Thanks to Yoga Ramalingam and Marc + Fournier. #833 + * AMQP plugin: The "QueueDurable" and "QueueAutoDelete" options have + been added, giving control over queue creation and deletion. Thanks to + David Blundell and Marc Fournier. #623 + * Apache, Ascent, BIND, cURL, cURL-JSON, cURL-XML, nginx and Write HTTP + plugins: Customizing the "User-Agent" field is now possible at + compile-time. Thanks to Jeremy Katz. #440 + * Apache, Ascent, BIND, cURL, cURL-JSON, cURL-XML, nginx plugins: The + connection will be reset if it hasn't completed within the configured + "Interval". The new "Timeout" option gives control over this behavior. + Thanks to Jan Kundrát and Marc Fournier. #982, #983, #993 + * Apache, Ascent, cURL, cURL-JSON, cURL-XML, nginx, Write HTTP plugins: + Allow usernames and passwords to contain colons if built against + libcurl ≧ 7.19.1. Thanks to Marc Fournier. #695, #947 + * Apache plugin: The "SSLCiphers" option gives control over the + encryption algorithms to use with TLS connections. Thanks to Toni + Moreno. #946 + * Barometer plugin: This new plugin reads sensor data from various + Freescale and Bosch digital barometers. Thanks to Tomas Menzl. #69, + #693 + * Battery plugin: Reporting values as percentages and reporting degraded + batteries has been added. Thanks to Florian Forster. + * Battery plugin: Support for reading values from sysfs on Linux has + been added. Thanks to Andy Parkins, Nicholas Humfrey, Peter Wu and + Florian Forster. #725, #810, #998 + * Battery plugin: The value for current is no longer supplied unless the + battery provides this information. Thanks to Florian Forster. + * BIND plugin: Bind's XML v3 API is now supported; Thanks to Victor + Berger, Bruno Prémont and Michal Humpula. #742, #847 + * Ceph plugin: This new plugin collects statistics from the Ceph + distributed storage system. Thanks to Dan Ryder, Dennis Zou, Colin + McCabe, Sage Weil. #522, #598 + * ConnTrack plugin: Support for reporting values as percentages as well + as legacy conntrack files in "/proc" has been added. Thanks to + Pierre-Yves Ritschard. #497, #680 + * CPU plugin: The plugin is now able to report values as percentages and + aggregate values per-state and per-CPU. Thanks to Pierre-Yves + Ritschard, Florian Forster, Fabien Wernli, Nicholas Humfrey and + Wilfried Goesgens. #499, #516, #639 #734, #812, #802 + * cURL-JSON plugin: Extracting values from complex JSON structures has + been enhanced. Thanks to Jim Radford. #408, #411 + * cURL-JSON plugin: Intervals can now be configured on a per-URL basis. + Thanks to Stan Sawa. #685 + * cURL-JSON, cURL-XML, Write HTTP plugins: These plugins now also follow + HTTP redirects. Thanks to Marc Fournier. + * cURL, cURL-JSON, cURL-XML plugins: HTTP Digest authentication has been + implemented. Thanks to Frank Cornelis. #482 + * DBI, Oracle, PostgreSQL plugins: A "MetadataFrom" parameter has been + added which allows to set metadata from database columns. Thanks to + Mark Wong. #317, #321 + * DBI plugin: Querying several databases in parallel is now possible. + Thanks to Vincent Bernat. #453 + * Disk plugin: On the Linux platform, disk names can now get looked up + in udev with the "UdevNameAttr" option. Thanks to Patrick Mooney. #537 + * Disk plugin: This plugin now collects several additional I/O-related + metrics on the Linux platform. Thanks to Florian Forster and Michael + Schenck. #705, #759 + * DRBD plugin: This new plugin reads Linux's Distributed Replicated + Block Device (DRBD) statistics. Thanks to Tim Laszlo. #566, #700 + * Exec, UnixSock plugins: The "PUTNOTIF" command now allows to set + metadata on notifications. Thanks to John-John Tedro. #416 + * fhcount plugin: This new plugin reports the number of used file + handles. Thanks to Jiri Tyr. #1009 + * GenericJMX plugin: A Class Loader for "JMXConnectorFactory" has been + added, allowing the plugin to work with JBOSS > 7. Thanks to Alexandre + Moutot. #452 + * IPC plugin: This new plugin collects information related to shared + memory. Thanks to Andrés J. Díaz. #925 + * Java plugin: Now uses the hostname defined in the configuration file. + Thanks to Pierre-Yves Ritschard. #530, #681 + * Load plugin: The plugin is now able to report values as percentages. + Thanks to Vedran Bartonicek and Pierre-Yves Ritschard. #344, #498 + * Log Logstash plugin: This new plugin writes collectd logs and events + as Logstash JSON formatted events. Thanks to Pierre-Yves Ritschard. + #360 + * LVM plugin: The plugin collects thin pool data volumes size, and no + longer reports virtual volumes. Thanks to Benjamin Gilbert. #603 + * memcached plugin: "listen_disabled_num" are now also reported. Thanks + to Matt Cottingham. #622 + * Memory plugin: Slab memory reporting on the Linux platform has been + added. Thanks to Manuel CISSÉ and Marc Fournier. #560, #697 + * Memory plugin: The plugin is now able to report values as percentages. + Thanks to Jeremy Katz, Florian Forster and Manuel CISSÉ. #501, #511, + #559 + * Modbus plugin: Selecting between holding and input registers is now + possible. Thanks to Jan Vitek. #338 + * Modbus plugin: Support for accessing devices through an RS-485 serial + port has been added. Thanks to Eric Sandeen. + * Multimeter plugin: This plugin isn't built by default on the AIX + platform anymore. Thanks to Manuel Luis Sanmartin Rozada. #549, #684 + * MySQL and PostgreSQL plugins: Passing "127.0.0.1" as a host will now + result in the global Hostname being used in metric names. Thanks to + Jeremy Katz. #441 + * MySQL plugin: InnoDB, Select and Sort statistics collection has been + added. Thanks to Wilson Felipe, Marek Becka and Pierre-Yves Ritschard. + #248, #621, #699, #824 + * MySQL plugin: The "Alias" and "ConnectTimeout" options have been + added. Thanks to William Tisäter. + * Netlink plugin: Support for 64bit netlink counters has been added. + Thanks to Marek Becka. #435 + * Network plugin: The "ReconnectInterval" configuration option has been + added. Thanks to John Ferlito. #732 + * NFS plugin: Support for NFSv4.0 has been implemented. Thanks to Marek + Becka. #550 + * OneWire plugin: Support for more temperature-providing sensor families + has been added. Thanks to Tomasz Torcz. #672 + * OneWire plugin: Support for full OWFS path and more device families + has been implemented. Thanks to Tomas Menzl. #68 + * OpenLDAP plugin: This new plugin reads monitoring information from + OpenLDAP's "cn=Monitor" subtree. Thanks to Kimo Rosenbaum, Marc + Fournier and Nicholas Humfrey. #719 + * OpenVPN plugin: Support for OpenVPN 2.3.0 has been implemented. Thanks + to Ed Okerson. #252 + * OpenVZ plugin: Various improvements have been made, making the plugin + report values like the other collectd plugins do. Thanks to Chris + Lundquist. #264 + * Perl plugin: A new "listval_filter" method has been added, various + internal cleanups and improvements have been made and a test suite has + been added. Thanks to Matthias Bethke. #728 + * PostgreSQL plugin: The new "ExpireDelay" option allows skipping older + values pending write when the database slows down. Thanks to Stephen + O'Dor. #593 + * PowerDNS plugin: The plugin was updated for stats from pdns 3.4.3. + Thanks to Ruben Kerkhof. #965 + * Processes plugin: A memory-usage related optimization for low-profile + systems has been added. Thanks to Florian Forster. #652 + * Python plugin: Support for Python3 has been improved, "ModulePath" is + now prepended to "sys.path", and the "get_dataset()" function has been + added to the Python API. Thanks to Sven Trenkel and Patrick Browne. + #890, #751, #771 + * Redis and Write_Redis plugins: The support library has been switched + from credis to hiredis. Thanks to Andrés J. Díaz, Victor Seva, Marc + Fournier, Johan Bergström, Michael Spiegle and brianpkelly. #296, + #464, #475, #799, #1030 + * Redis plugin: Custom commands can now be used to fetch values stored + in Redis. Thanks to Pierre-Yves Ritschard. #816 + * Redis plugin: Support for passwords up to 512 characters long has been + added. Thanks to Jeremy Katz. #532 + * Sensors plugin: Support for lm_sensors' power sensors has been added. + Thanks to Jan Kundrát. #571 + * SMART plugin: This new plugin collects SMART statistics from disk + drives. Thanks to Vincent Bernat. #797 + * SNMP plugin: A blacklist/whitelist feature can now be used to filter + which OIDs to collect. Thanks to Christophe Courtaut. #414 + * SNMP plugin: SNMPv3 authentication and encryption support has been + implemented. Thanks to Michael Pilat. #362 + * SNMP plugin: Two error messages have been disambiguated. Thanks to + Sergey. #939, #952 + * Swap plugin: The plugin is now able to report values as percentages. + Thanks to Jeremy Katz and Florian Forster. #500, #510 + * Swap plugin: The plugin no longer fails on Linux systems where + "SwapCached" isn't exposed by the kernel. Thanks to Florian Forster. + #733 + * Tail plugin: "GaugeInc" and "GaugeAdd" options have been implemented. + Thanks to Andre Ferraz. #673 + * Tail plugin: Intervals can now be configured on a per-File basis. + Thanks to Tom Leaman. #446 + * TCPConns plugin: The "AllPortsSummary" option, allowing to summarize + all connections, has been added. Thanks to Marek Becka. #488 + * TCPConns plugin: Three metrics were renamed on the AIX platform, for + the sake of consistency. Thanks to Manuel Luis Sanmartín Rozada. #546 + * Turbostat plugin: This new plugin reads CPU frequency and C-state + residency on modern Intel turbo-capable processors. Thanks to Vincent + Brillault, Jean Delvare and Nicolas Iooss. #651 + * UnixSock plugin: The "GETTHRESHOLD" command has been re-added. Thanks + to Manuel Luis Sanmartín Rozada. #674 + * Varnish plugin: Varnish 4 support has been added, as well as as + monitoring metrics only available in Varnish 4. Thanks to Marc + Fournier. #618, #783 + * virt plugin: Guests memory usage is now also collected. Thanks to + Tiago Carvalho, jazzmes and Zollner Robert. + * virt plugin: It is now possible to chose between using guests' name or + UUID as plugin_instance. Thanks to Remi Ferrand. #385 + * virt plugin: The libvirt plugin has been renamed to virt. Thanks to + Florian Forster. + * Write Graphite plugin: When the connection to graphite fails, + reconnection attempts are now limited to once per second. Thanks to + Florian Forster. #625 + * Write HTTP plugin: Multi-instance support of this plugin has been + improved. The "" block has been deprecated in favor of + "". Thanks to Marc Fournier. #902 + * Write HTTP plugin: Several TLS-related configuration options have been + added. Thanks to Ingmar Runge. #666 + * Write HTTP plugin: The "LowSpeedLimit" and "Timeout" options allow to + reset slow/stalled network connections. Thanks to loginator17 and Marc + Fournier. #752, #985 + * Write HTTP plugin: The size of the payload posted to the HTTP server + can now be controlled with the "BufferSize" option. Thanks to Florian + Forster. #722 + * Write Kafka plugin: This new plugin sends data to Apache Kafka, a + distributed messaging queue. Thanks to Pierre-Yves Ritschard, + ciomaire, Vincent Bernat, Marc Fournier. #670, #694, #794, #853, #014 + * Write Log plugin: This new plugin dispatches collected values to the + configured log destination(s). Thanks to Pierre-Yves Ritschard. #886 + * Write Riemann plugin: Extra meta strings are now added as attributes + in notifications. Thanks to John-John Tedro. #417 + * Write Riemann plugin: Notification message are now sent to the Riemann + server via the description field. Thanks to Adrian Miron. #575 + * Write Riemann plugin: Support for custom attributes has been added. + Thanks to Pierre-Yves Ritschard. #459 + * Write Riemann plugin: Support had been implemented for sending events + to Riemann in batches (when using TCP), and is enabled by default. + Thanks to Pierre-Yves Ritschard. #800 + * Write Riemann plugin: The "EventServicePrefix" option has been added, + which adds a prefix to event service names. Thanks to Moshe Zada. #706 + * Write Riemann plugin: Threshold checks can now be passed down to the + Riemann server. Thanks to Pierre-Yves Ritschard. #518 + * Write Sensu plugin: This new plugin submits values to Sensu, a stream + processing and monitoring system. Thanks to Fabrice A. Marie and Marc + Fournier. #912, #1001, #1016 + * Write TSDB plugin: This new plugin sends data to OpenTSDB, a scalable + time series database. Thanks to Kevin Bowling, Florian Forster, Dallin + Young, Michael Schenck and Pierre-Yves Ritschard. #703, #772, #945 + * ZFS ARC plugin: Support for ZFS-on-Linux has been added. Thanks to + Marc Fournier and Wilfried Goesgens. #552 + * Zookeeper plugin: This new plugin reads data from the Apache Zookeeper + "MNTR" command. Thanks to Jeremy Katz. #826 + ------------------------------------------------------------------- Thu Jan 14 10:53:13 UTC 2016 - aj@ajaissle.de diff --git a/collectd.spec b/collectd.spec index e126ed3..3929b67 100644 --- a/collectd.spec +++ b/collectd.spec @@ -24,7 +24,7 @@ %define snmp 1 %define with_esmtp 1 %define ipvs_plugin ipvs -%define plugins apache apcups battery %{expand:%{bind_plugin}} cgroups curl %{expand:%{curl_json_plugin}} %{expand:%{curl_xml_plugin}} conntrack contextswitch cpu cpufreq csv df disk %{expand:%{dns_plugin}} email entropy exec filecount fscache hddtemp interface %{expand:%{ipvs_plugin}} irq load logfile match_empty_counter match_hashed match_regex match_timediff match_value mbmon %{expand:%{memcached_plugin}} memory multimeter netlink network nfs nginx ntpd olsrd openvpn perl ping protocols powerdns processes rrdtool %{expand:%{sensors_plugin}} serial statsd swap syslog table tail target_notification target_replace target_scale target_set target_v5upgrade tcpconns teamspeak2 ted thermal threshold unixsock uptime users uuid vmem vserver wireless write_http %{expand:%{ascent_plugin}} %{expand:%{iptables_plugin}} %{expand:%{madwifi_plugin}} %{expand:%{rrdcached_plugin}} aggregation ethstat md numa tail_csv write_graphite write_riemann +%define plugins apache apcups battery %{expand:%{bind_plugin}} cgroups curl %{expand:%{curl_json_plugin}} %{expand:%{curl_xml_plugin}} conntrack contextswitch cpu cpufreq csv df disk %{expand:%{dns_plugin}} email entropy exec filecount fscache hddtemp interface %{expand:%{ipvs_plugin}} irq load logfile match_empty_counter match_hashed match_regex match_timediff match_value mbmon %{expand:%{memcached_plugin}} memory multimeter netlink network nfs nginx ntpd olsrd openvpn perl ping protocols powerdns processes rrdtool %{expand:%{sensors_plugin}} serial statsd swap syslog table tail target_notification target_replace target_scale target_set target_v5upgrade tcpconns teamspeak2 ted thermal threshold unixsock uptime users uuid vmem vserver wireless write_http %{expand:%{ascent_plugin}} %{expand:%{iptables_plugin}} %{expand:%{madwifi_plugin}} %{expand:%{rrdcached_plugin}} aggregation ethstat md numa tail_csv write_graphite write_riemann ceph drbd fhcount ipc log_logstash turbostat write_log write_log write_sensu write_tsdb zfs_arc zookeeper %ifnarch s390 s390x %define sensors 1 %define sensors_plugin sensors @@ -123,7 +123,7 @@ BuildRequires: systemd PreReq: %insserv_prereq %endif Name: collectd -Version: 5.4.2 +Version: 5.5.0 Release: 0 Summary: Statistics Collection Daemon for filling RRD Files License: GPL-2.0 @@ -137,20 +137,17 @@ Source3: collectd-js.apache2.conf # see https://bugzilla.novell.com/show_bug.cgi?id=388026 Source20: collectd-pthread.pc Source99: collectd-rpmlintrc -Patch4: collectd-lib64.patch Patch7: collectd-fix-config.patch Patch9: collectd-version.patch Patch10: collectd-perl-vendor.patch # see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467072 Patch11: collectd-fix_broken_perl-5.10.patch -Patch17: collectd-fix_libltdl_autoreconf.patch Patch18: collectd-fix_collection_cgi.patch Patch19: collectd-fix_spamassassin_doc.patch Patch20: collectd-split_README.patch Patch21: collectd-fix_collectd_config_path_in_snmp_probe.patch Patch23: collectd-javac_target.patch Patch25: collectd-df-remove-duplicates.patch -Patch26: collectd-new_libstatgrab.patch # for /etc/apache2/... ownership (rpmlint): BuildRequires: apache2 BuildRequires: autoconf @@ -538,24 +535,19 @@ to write %{name} unixsock clients. %prep %setup -q -n "collectd-%{version}" -%if "%{_lib}"=="lib64" -%patch4 -%endif %patch7 %patch9 -p1 %patch10 %patch11 -%patch17 %patch18 %patch19 %patch20 %patch21 -%patch23 +%patch23 -p1 %if 0%{?suse_version} <= 1140 && !0%{?sles_version} %patch24 -p1 %endif %patch25 -%patch26 sed -i 's|@@VERSION@@|%{version}|g' configure.ac @@ -941,8 +933,8 @@ ln -s "../..%{_initddir}/collectd" "%{buildroot}%{_sbindir}/rccollectd" %if %{virt} %files plugin-virt %defattr(-,root,root) -%{_libdir}/collectd/libvirt.so -%{_libdir}/collectd/libvirt.la +%{_libdir}/collectd/virt.so +%{_libdir}/collectd/virt.la %endif #virt %if %{xmms}