From 0c774b2ae87dc4e29c802265bc5a2208dcccc1a12f47e975b86fffd19cd6a3c8 Mon Sep 17 00:00:00 2001 From: Yuchen Lin Date: Wed, 2 Aug 2017 12:18:42 +0000 Subject: [PATCH] Accepting request 510091 from home:scarabeus_iv:branches:server:monitoring - Disable NUT plugin on older distros (broken NUT devel package) - Make sure we build lvm plugin - Disable turbostat plugin as it does not work with new kernels https://github.com/collectd/collectd/issues/2311 - Version update to 5.7.2: * Various small fixes around, notable fix for CVE-2017-7401 - Update buildrequires to include dependencies not detected by configure.ac (like python3) - Disable Werror - List all the modules in files and thus stick to --enable-all passed to configure to avoid having to name them all - Switch to python3 from python2 as plugin can be built only once... - Fix build on Factory - Remove unused collectd-pthread.pc SOURCE file as it does not need to be done anymore - Remove all the always true conditionals for readability - Convert to pkgconfig style dependencies - Remove never applied patch collectd-pkgconfig_libnotify_add_gtk.patch - Disable libdb collectd integration as we would like to reduce libdb exposure everywhere. There are other db backends in collectd anyway OBS-URL: https://build.opensuse.org/request/show/510091 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/collectd?expand=0&rev=144 --- collectd-5.7.1.tar.bz2 | 3 - collectd-5.7.2.tar.bz2 | 3 + collectd-pkgconfig_libnotify_add_gtk.patch | 11 - collectd-pthread.pc | 10 - collectd-rpmlintrc | 4 - collectd.changes | 33 ++ collectd.spec | 635 +++++---------------- 7 files changed, 176 insertions(+), 523 deletions(-) delete mode 100644 collectd-5.7.1.tar.bz2 create mode 100644 collectd-5.7.2.tar.bz2 delete mode 100644 collectd-pkgconfig_libnotify_add_gtk.patch delete mode 100644 collectd-pthread.pc diff --git a/collectd-5.7.1.tar.bz2 b/collectd-5.7.1.tar.bz2 deleted file mode 100644 index 924ab7a..0000000 --- a/collectd-5.7.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7edd3643c0842215553b2421d5456f4e9a8a58b07e216b40a7e8e91026d8e501 -size 1797725 diff --git a/collectd-5.7.2.tar.bz2 b/collectd-5.7.2.tar.bz2 new file mode 100644 index 0000000..abb3c1a --- /dev/null +++ b/collectd-5.7.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d20a0221569a8d6b80bbc52b86e5e84965f5bafdbf5dfc3790e0fed0763e592 +size 1798777 diff --git a/collectd-pkgconfig_libnotify_add_gtk.patch b/collectd-pkgconfig_libnotify_add_gtk.patch deleted file mode 100644 index f7c2130..0000000 --- a/collectd-pkgconfig_libnotify_add_gtk.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.ac 2014-03-15 15:48:45.278001132 +0100 -+++ b/configure.ac 2014-03-15 15:54:06.574995791 +0100 -@@ -4666,7 +4666,7 @@ - fi - # }}} - --PKG_CHECK_MODULES([LIBNOTIFY], [libnotify], -+PKG_CHECK_MODULES([LIBNOTIFY], [libnotify gtk+-2.0], - [with_libnotify="yes"], - [if test "x$LIBNOTIFY_PKG_ERRORS" = "x"; then - with_libnotify="no" diff --git a/collectd-pthread.pc b/collectd-pthread.pc deleted file mode 100644 index d8b8da1..0000000 --- a/collectd-pthread.pc +++ /dev/null @@ -1,10 +0,0 @@ -prefix=/ -exec_prefix=${prefix} -libdir=/@@LIB@@ -includedir=${prefix}/include - -Name: pthread -Description: POSIX threading library -Version: 0.0.0 -Libs: -lpthread -Cflags: diff --git a/collectd-rpmlintrc b/collectd-rpmlintrc index 67ae783..b0b12ac 100644 --- a/collectd-rpmlintrc +++ b/collectd-rpmlintrc @@ -5,9 +5,5 @@ addFilter('non-etc-or-var-file-marked-as-conffile .*/collectd/postgresql_default addFilter('macro-in-comment') -addFilter('no-manual-page-for-binary rccollectd') - -addFilter('obsolete-suse-version-check') - #There no fsf address in that file addFilter('incorrect-fsf-address /usr/share/doc/packages/collectd/contrib/network-proxy.py') diff --git a/collectd.changes b/collectd.changes index ac1e008..89b6687 100644 --- a/collectd.changes +++ b/collectd.changes @@ -1,3 +1,36 @@ +------------------------------------------------------------------- +Tue Jun 27 11:18:06 UTC 2017 - tchvatal@suse.com + +- Disable NUT plugin on older distros (broken NUT devel package) +- Make sure we build lvm plugin +- Disable turbostat plugin as it does not work with new kernels + https://github.com/collectd/collectd/issues/2311 +- Version update to 5.7.2: + * Various small fixes around, notable fix for CVE-2017-7401 +- Update buildrequires to include dependencies not detected by + configure.ac (like python3) +- Disable Werror +- List all the modules in files and thus stick to --enable-all passed + to configure to avoid having to name them all +- Switch to python3 from python2 as plugin can be built only once... +- Fix build on Factory +- Remove unused collectd-pthread.pc SOURCE file as it does not + need to be done anymore + +------------------------------------------------------------------- +Tue Jun 27 11:13:25 UTC 2017 - tchvatal@suse.com + +- Remove all the always true conditionals for readability +- Convert to pkgconfig style dependencies +- Remove never applied patch collectd-pkgconfig_libnotify_add_gtk.patch + +------------------------------------------------------------------- +Thu Jun 22 11:05:58 UTC 2017 - tchvatal@suse.com + +- Disable libdb collectd integration as we would like to reduce + libdb exposure everywhere. There are other db backends in collectd + anyway + ------------------------------------------------------------------- Thu May 25 07:31:25 UTC 2017 - jengelh@inai.de diff --git a/collectd.spec b/collectd.spec index a31646a..a3ebc21 100644 --- a/collectd.spec +++ b/collectd.spec @@ -17,14 +17,7 @@ # -%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 -%define with_esmtp 1 -%define ipvs_plugin ipvs -%define plugins apache apcups battery %{expand:%{bind_plugin}} cgroups chrony curl %{expand:%{curl_json_plugin}} %{expand:%{curl_xml_plugin}} conntrack contextswitch cpu cpufreq cpusleep csv df disk %{expand:%{dns_plugin}} email entropy exec filecount fscache hddtemp hugepages 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 notify_nagios 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 ceph drbd fhcount ipc log_logstash %{expand:%{turbostat_plugin}} write_log write_sensu write_tsdb zfs_arc zookeeper +%define plugins apache apcups battery bind cgroups chrony curl curl_json curl_xml conntrack contextswitch cpu cpufreq cpusleep csv df disk dns email entropy exec filecount fscache hddtemp hugepages interface ipvs irq load logfile match_empty_counter match_hashed match_regex match_timediff match_value mbmon memcached memory multimeter netlink network nfs nginx notify_nagios 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 ascent iptables madwifi rrdcached aggregation ethstat md numa tail_csv write_graphite ceph drbd fhcount ipc log_logstash write_log write_sensu write_tsdb write_prometheus zfs_arc zookeeper %ifnarch s390 s390x %define sensors 1 %define sensors_plugin sensors @@ -32,104 +25,8 @@ %define sensors 0 %define sensors_plugin %{nil} %endif -%ifarch %ix86 x86_64 -%define turbostat_plugin turbostat -%else -%define turbostat_plugin %{nil} -%endif - -%if 0%{?_with_xmms:1}0 -%define xmms 1 -%else -%define xmms 0 -%endif -%if 0%{?_with_java:1} || 0%{?suse_version} > 1030 && ! 0%{?_without_java:1} && ! 0%{?sles_version} -%define java 1 -%else -%define java 0 -%endif -%if 0%{?_with_virt:1} || 0%{?suse_version} > 1030 -%define virt 1 -%else -%define virt 0 -%endif -%if ! 0%{?_without_dbi:1} -%define dbi 1 -%else -%define dbi 0 -%endif -%if 0%{?suse_version} >= 1100 && ! 0%{?_without_memcachec:1} -%define memcachec 1 -%define memcached_plugin memcached -%else -%define memcachec 0 -%define memcached_plugin %{nil} -%endif -%if 0%{?suse_version} < 1000 -%define libnotify 0 -%else -%define libnotify 1 -%endif -%if 0%{?suse_version} > 1020 -%define ipmi 1 -%define ascent 1 -%define ascent_plugin ascent -%define iptables 1 -%define iptables_plugin iptables -%else -%define ipmi 0 -%define ascent 0 -%define ascent_plugin %{nil} -%define iptables 0 -%define iptables_plugin %{nil} -%endif -%if 0%{?suse_version} >= 1130 -%define rrdcached_plugin rrdcached -%else -%define rrdcached_plugin %{nil} -%endif -%if %{pcap_version} >= 10000 -%define dns 1 -%define dns_plugin dns -%else -%define dns 0 -%define dns_plugin %{nil} -%endif -%if 0%{?suse_version} >= 1000 -%define yajl 1 -%define curl_json_plugin curl_json -%define curl_xml_plugin curl_xml -%define with_snmp_plugin 1 -%define with_pgsql 1 -%define with_mysql 1 -%define with_bind 1 -%define bind_plugin bind -%define protobuf 1 -%define pinba_plugin pinba -%else -%define yajl 0 -%define curl_json_plugin %{nil} -%define curl_xml_plugin %{nil} -%define with_snmp_plugin 0 -%define with_pgsql 0 -%define with_mysql 0 -%define with_bind 0 -%define bind_plugin %{nil} -%define protobuf 0 -%define pinba_plugin %{nil} -%endif -%if 0%{?suse_version} >= 1210 -%define has_systemd 1 -BuildRequires: systemd -%{perl_requires} -%{?libperl_requires} -%{?systemd_requires} -%else -# FIXME: use proper Requires(pre/post/preun/...) -PreReq: %insserv_prereq -%endif Name: collectd -Version: 5.7.1 +Version: 5.7.2 Release: 0 Summary: Statistics Collection Daemon for filling RRD Files License: GPL-2.0 @@ -139,9 +36,6 @@ Source: http://collectd.org/files/collectd-%{version}.tar.bz2 Source1: collectd.suse.init Source2: collectd.apache2.conf Source3: collectd-js.apache2.conf -# workaround for missing pthread.pc on openSUSE, required by OpenIPMIpthread.pc -# see https://bugzilla.novell.com/show_bug.cgi?id=388026 -Source20: collectd-pthread.pc Source99: collectd-rpmlintrc Patch7: collectd-fix-config.patch Patch9: collectd-version.patch @@ -153,7 +47,6 @@ 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 - # for /etc/apache2/... ownership (rpmlint): BuildRequires: apache2 BuildRequires: autoconf @@ -161,129 +54,73 @@ BuildRequires: automake BuildRequires: bind-devel BuildRequires: bison BuildRequires: flex -BuildRequires: freetype2-devel BuildRequires: gcc -BuildRequires: gettext +BuildRequires: gdbm-devel BuildRequires: gettext-devel -BuildRequires: gpsd-devel BuildRequires: intltool -# for ipvs and madwifi: -#BuildRequires: kernel-source -BuildRequires: libart_lgpl-devel -BuildRequires: libatasmart-devel -BuildRequires: libevent-devel -BuildRequires: libmnl-devel +BuildRequires: java-devel +BuildRequires: libesmtp-devel +BuildRequires: libgcrypt-devel BuildRequires: libnetlink-devel -BuildRequires: liboping-devel -BuildRequires: libpcap +BuildRequires: libpcap-devel BuildRequires: libpng-devel -BuildRequires: libstatgrab-devel BuildRequires: libtool -BuildRequires: libudev-devel -BuildRequires: libxml2-devel +BuildRequires: libyajl-devel BuildRequires: linux-kernel-headers -BuildRequires: lua-devel BuildRequires: make +BuildRequires: mysql-devel >= 4.1.0 +BuildRequires: net-snmp-devel +BuildRequires: openldap2-devel BuildRequires: perl BuildRequires: pkgconfig -BuildRequires: python-devel +BuildRequires: postgresql-devel +BuildRequires: protobuf-c BuildRequires: rrdtool +BuildRequires: systemd-rpm-macros BuildRequires: xfsprogs-devel -BuildRequires: zlib-devel +BuildRequires: pkgconfig(OpenIPMI) +BuildRequires: pkgconfig(OpenIPMIpthread) +BuildRequires: pkgconfig(Qgpsmm) +BuildRequires: pkgconfig(dbi) +BuildRequires: pkgconfig(devmapper) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(gail) +BuildRequires: pkgconfig(gdk-2.0) +BuildRequires: pkgconfig(gtk+-2.0) +BuildRequires: pkgconfig(libart-2.0) +BuildRequires: pkgconfig(libatasmart) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libevent) +BuildRequires: pkgconfig(libgpsd) +BuildRequires: pkgconfig(libiptc) +BuildRequires: pkgconfig(libmemcached) +BuildRequires: pkgconfig(libmicrohttpd) +BuildRequires: pkgconfig(libmnl) +BuildRequires: pkgconfig(libnotify) +BuildRequires: pkgconfig(liboping) +BuildRequires: pkgconfig(librrd) +BuildRequires: pkgconfig(libstatgrab) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(libupsclient) +BuildRequires: pkgconfig(libvirt) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(lua) +BuildRequires: pkgconfig(lvm2app) +BuildRequires: pkgconfig(python3) +BuildRequires: pkgconfig(xtables) +BuildRequires: pkgconfig(zlib) 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: -Provides: collectd-perl = %{version}-%{release} +Requires(post): %fillup_prereq # play nice with collectd-beta: Obsoletes: collectd-beta < %{version} Provides: collectd-beta = %{version}-%{release} -BuildRoot: %{_tmppath}/%{name}-%{version}-build -# Should not be used - since Mon Apr 23 10:56:57 UTC 2012 -# except for 11.4 -%if 0%{?suse_version} <= 1140 && !0%{?sles_version} -Patch24: collectd-pkgconfig_libnotify_add_gtk.patch +%{?systemd_requires} +%if 0%{?suse_version} >= 1330 +BuildRequires: pkgconfig(libnutclient) %endif -%if 0%{?suse_version} > 1020 -BuildRequires: libdb-4_5-devel -%else -BuildRequires: db-devel -%endif -%if 0%{?suse_version} > 910 -BuildRequires: libgcrypt-devel -%else -BuildRequires: libgcrypt -%endif -%if %{libnotify} -BuildRequires: gtk2-devel -BuildRequires: libnotify-devel -%endif -%if %java -BuildRequires: java-devel -%endif #java -%if %{with_esmtp} -BuildRequires: libesmtp-devel -%endif -%if %{with_mysql} -BuildRequires: mysql-devel >= 4.1.0 -%endif -%if %{with_pgsql} -BuildRequires: postgresql-devel -%endif -%if %{yajl} -BuildRequires: libyajl-devel -%endif -%if 0%{?suse_version} >= 1030 -BuildRequires: rrdtool-devel -%endif -%if 0%{?suse_version} >= 1030 -BuildRequires: libcurl-devel -%else -BuildRequires: curl-devel -%endif -%if %{ipmi} -# for ipmi: -BuildRequires: OpenIPMI-devel -BuildRequires: gdbm-devel -%endif #ipmi -%if %{snmp} -# for snmp: -BuildRequires: net-snmp-devel -%endif #snmp -%if 0%{?suse_version} >= 1030 -BuildRequires: libpcap-devel -%endif -%if %{xmms} -# for xmms: -BuildRequires: xmms-devel -%endif -%if %{virt} -# for libvirt: -BuildRequires: libvirt-devel -%endif -%if %{dbi} -BuildRequires: libdbi-devel -%endif -%if %{memcachec} -BuildRequires: libmemcached-devel -%endif -%if %{with modbus} -BuildRequires: libmodbus-devel -%endif -%if %{protobuf} -BuildRequires: protobuf-c -%endif -%if 0%{?suse_version} < 1220 -%if 0%{?suse_version} > 1020 -BuildRequires: iptables-devel -%endif -%else -BuildRequires: libiptc-devel -BuildRequires: libxtables-devel +%if %{sensors} +BuildRequires: sensors +Requires: sensors %endif %description @@ -327,18 +164,15 @@ a browser. Please look at %{_sysconfdir}/apache2/conf.d/%{name}-js.conf on how to enable. -%if %{libnotify} %package plugin-notify-desktop Summary: Desktop Notification Plugin for %{name} Group: System/Monitoring Requires: %{name} = %{version}-%{release} %description plugin-notify-desktop -Desktop Notification Support for %{name} allow you to receive +Desktop Notification Support for %{name} allow you to receive message delivery on your desktop. -%endif #libnotify -%if %{ipmi} %package plugin-ipmi Summary: OpenIPMI Monitoring Plugin for %{name} Group: System/Monitoring @@ -347,9 +181,7 @@ Requires: %{name} = %{version}-%{release} %description plugin-ipmi Optional %{name} plugin to monitor sensors using the OpenIPMI library for IPMI enabled systems. -%endif #ipmi -%if %{snmp} %package plugin-snmp Summary: SNMP Monitoring Plugin for %{name} Group: System/Monitoring @@ -360,9 +192,7 @@ Requires: perl(Socket6) %description plugin-snmp Optional %{name} plugin to monitor devices using SNMP. -%endif #snmp -%if %{with_mysql} %package plugin-mysql Summary: MySQL Monitoring Plugin for %{name} Group: System/Monitoring @@ -370,9 +200,34 @@ Requires: %{name} = %{version}-%{release} %description plugin-mysql Optional %{name} plugin to monitor MySQL server instances. -%endif #with_mysql -%if %{with_pgsql} +%package plugin-openldap +Summary: OpenLDAP plugin for %{name} +Group: System/Monitoring +Requires: %{name} = %{version}-%{release} + +%description plugin-openldap +This plugin for collectd reads monitoring information +from OpenLDAP's cn=Monitor subtree. + +%if 0%{?suse_version} >= 1330 +%package plugin-nut +Summary: Network UPS Tools plugin for collectd +Group: System/Monitoring +Requires: %{name} = %{version}-%{release} + +%description plugin-nut +This plugin for collectd provides Network UPS Tools support. +%endif + +%package plugin-lvm +Summary: LVM plugin for collectd +Group: System/Monitoring +Requires: %{name} = %{version}-%{release} + +%description plugin-lvm +This plugin collects information from lvm. + %package plugin-postgresql Summary: PostgreSQL Monitoring Plugin for %{name} Group: System/Monitoring @@ -380,18 +235,16 @@ Requires: %{name} = %{version}-%{release} %description plugin-postgresql Optional %{name} plugin to monitor PostgreSQL server instances. -%endif #with_pgsql -%package plugin-python -Summary: Python API for %{name} +%package plugin-python3 +Summary: Python3 API for %{name} Group: System/Monitoring Requires: %{name} = %{version}-%{release} -%description plugin-python -Optional %{name} Python API in order to write %{name} plugins in -Python. +%description plugin-python3 +Optional %{name} Python3 API in order to write %{name} plugins in +Python3. -%if %java %package plugin-java Summary: Java API for %{name} Group: System/Monitoring @@ -400,9 +253,7 @@ Requires: %{name} = %{version}-%{release} %description plugin-java Optional %{name} Java API in order to write %{name} plugins in Java. -%endif #java -%if %{virt} %package plugin-virt Summary: Virtual Machine Statistics Plugin for %{name} Group: System/Monitoring @@ -411,20 +262,7 @@ Requires: %{name} = %{version}-%{release} %description plugin-virt Optional %{name} plugin to gather statistics from virtual machines using libvirt. -%endif -%if %{xmms} -%package plugin-xmms -Summary: XMMS Monitoring Plugin for %{name} -Group: System/Monitoring -Requires: %{name} = %{version}-%{release} - -%description plugin-xmms -Optional %{name} plugin to gather sampling frequencies and file -bitrates of files played with XMMS. -%endif #xmms - -%if %{dbi} %package plugin-dbi Summary: DBI Storage Plugin for %{name} Group: System/Monitoring @@ -433,9 +271,7 @@ Requires: %{name} = %{version}-%{release} %description plugin-dbi Optional %{name} plugin to store sampling results into various databases as supported by libdbi. -%endif #dbi -%if %{memcachec} %package plugin-memcachec Summary: Memcache Daemon Monitoring Plugin for %{name} Group: System/Monitoring @@ -443,19 +279,7 @@ Requires: %{name} = %{version}-%{release} %description plugin-memcachec Optional %{name} plugin to sample memcached statistics. -%endif #memcachec -%if %{with 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} Group: System/Monitoring @@ -464,7 +288,6 @@ Requires: %{name} = %{version}-%{release} %description plugin-pinba Optional %{name} plugin to receive and dispatch timing values from Pinba, a profiling extension for PHP. -%endif #protobuf %package plugin-smart Summary: SMART Monitoring Plugin for %{name} @@ -496,49 +319,31 @@ Optional %{name} plugin to monitor gpsd. Summary: All Monitoring Plugins for %{name} Group: System/Monitoring Requires: %{name} = %{version}-%{release} +Requires: %{name}-plugin-dbi = %{version}-%{release} Requires: %{name}-plugin-gps = %{version}-%{release} +Requires: %{name}-plugin-ipmi = %{version}-%{release} +Requires: %{name}-plugin-java = %{version}-%{release} Requires: %{name}-plugin-lua = %{version}-%{release} -Requires: %{name}-plugin-python = %{version}-%{release} +Requires: %{name}-plugin-lvm = %{version}-%{release} +Requires: %{name}-plugin-memcachec = %{version}-%{release} +Requires: %{name}-plugin-mysql = %{version}-%{release} +Requires: %{name}-plugin-notify-desktop = %{version}-%{release} +Requires: %{name}-plugin-openldap = %{version}-%{release} +Requires: %{name}-plugin-pinba = %{version}-%{release} +Requires: %{name}-plugin-postgresql = %{version}-%{release} +Requires: %{name}-plugin-python3 = %{version}-%{release} Requires: %{name}-plugin-smart = %{version}-%{release} +Requires: %{name}-plugin-snmp = %{version}-%{release} +Requires: %{name}-plugin-virt = %{version}-%{release} Requires: %{name}-web = %{version}-%{release} Requires: %{name}-web-js = %{version}-%{release} -%if %{ipmi} -Requires: %{name}-plugin-ipmi = %{version}-%{release} -%endif #ipmi -%if %{snmp} -Requires: %{name}-plugin-snmp = %{version}-%{release} -%endif #snmp -%if %{with_mysql} -Requires: %{name}-plugin-mysql = %{version}-%{release} -%endif #with_mysql -%if %{with_pgsql} -Requires: %{name}-plugin-postgresql = %{version}-%{release} +%if 0%{?suse_version} >= 1330 +Requires: %{name}-plugin-nut = %{version}-%{release} %endif -%if %java -Requires: %{name}-plugin-java = %{version}-%{release} -%endif #java -%if %{virt} -Requires: %{name}-plugin-virt = %{version}-%{release} -%endif #virt -%if %{libnotify} -Requires: %{name}-plugin-notify-desktop = %{version}-%{release} -%endif #libnotify -%if %{dbi} -Requires: %{name}-plugin-dbi = %{version}-%{release} -%endif #dbi -%if %{memcachec} -Requires: %{name}-plugin-memcachec = %{version}-%{release} -%endif #memcachec -%if %{with modbus} -Requires: %{name}-plugin-modbus = %{version}-%{release} -%endif #modbus -%if %{protobuf} -Requires: %{name}-plugin-pinba = %{version}-%{release} -%endif #protobuf %description plugins-all Metapackage that installs %{name} and all the available -monitoring plugin subpackages, except %{name}-plugin-xmms. +monitoring plugin subpackages. %package spamassassin Summary: Spamassassin Monitoring for %{name} @@ -581,16 +386,9 @@ to write %{name} unixsock clients. %patch20 %patch21 %patch23 -p1 -%if 0%{?suse_version} <= 1140 && !0%{?sles_version} -%patch24 -p1 -%endif sed -i 's|@@VERSION@@|%{version}|g' configure.ac -# workaround for missing pthread.pc on openSUSE, required by OpenIPMIpthread.pc -install -D -m0644 "%{SOURCE20}" pkgconfig/pthread.pc -sed 's|@@LIB@@|%{_lib}|g' pkgconfig/pthread.pc - perl -p -i -e 's|(-L\$withval/lib)\b|${1}64|g' configure.ac configure # unneeded files: @@ -600,93 +398,24 @@ rm -fr \ contrib/redhat \ contrib/sles* -# remove -Werror everywhere -find . -name 'configure*' -o -name 'Makefile*' -exec sed -i 's|-Werror||g' {} \; - %build -export SUSE_ASNEEDED=0 - autoreconf -fiv -# set JAVA_HOME properly -[ -n "$JAVA_HOME" -a -d "$JAVA_HOME" ] || export JAVA_HOME="%{_libdir}/jvm/java" -[ -n "$JDK_HOME" -a -d "$JDK_HOME" ] || export JDK_HOME="$JAVA_HOME" -[ -n "$JRE_HOME" -a -d "$JRE_HOME" ] || export JRE_HOME="$JAVA_HOME" -export PATH="$JDK_HOME/bin:$JRE_HOME/bin:$JAVA_HOME/bin:$PATH" - export CFLAGS="%{optflags} -fno-strict-aliasing" export CXXFLAGS="$CFLAGS" -# workaround for missing pthread.pc on openSUSE, required by OpenIPMIpthread.pc -export PKG_CONFIG_PATH="$PWD/pkgconfig:$PKG_CONFIG_PATH" export KERNEL_DIR=%{_prefix}/src/linux %configure \ - --with-libstatgrab \ - --with-rrdtool \ + --disable-werror \ + --disable-silent-rules \ --disable-static \ -%if %{dns} - --enable-dns \ -%else - --disable-dns \ -%endif - --disable-nut \ - --enable-netlink \ - --enable-python \ - --with-librrd \ -%if %{iptables} - --enable-iptables \ -%else - --disable-iptables \ - --without-iptc \ -%endif #iptables -%if %{ascent} - --enable-ascent \ -%else - --disable-ascent \ -%endif #ascent -%if %{ipmi} - --enable-ipmi \ -%else - --disable-ipmi \ -%endif #ipmi -%if %java - --enable-java \ --with-java="$JAVA_HOME/" \ -%else - --disable-java \ -%endif #java -%if %{dbi} - --enable-dbi \ -%else - --disable-dbi \ -%endif #dbi -%if %{memcachec} - --enable-memcached \ -%else - --disable-memcached \ -%endif #memcachec -%if %{with modbus} - --enable-modbus \ -%else - --disable-modbus \ -%endif #modbus -%if 0%{?suse_version} < 930 - --disable-mysql \ -%endif -%ifos linux - --enable-serial -%else - --disable-serial -%endif #os linux + --without-included-ltdl \ + --disable-turbostat -make %{?_smp_flags} V=1 \ -%if 0%{?suse_version} < 1120 - JAVAC_TARGET="-source 1.5 -target 1.5" -%else - JAVAC_TARGET="-source 1.5 -target 1.6" -%endif +make %{?_smp_mflags} %install -make DESTDIR=%{buildroot} install %{?_smp_mflags} +%make_install # delete .la files rm -f "%{buildroot}%{_libdir}"/*.{a,la} @@ -697,10 +426,6 @@ sed -i '/^dependency_libs=/ s|-L'"${RPM_BUILD_DIR}/%{name}-%{version}"'/src||g' # delete if it exists (not packaged any more on openSUSE): rm -rf "%{buildroot}%{_localstatedir}/adm/perl-modules/%{name}" -%if !%java -rm -f "%{buildroot}%{_mandir}/man5"/collectd-java.5* -rm -rf "%{buildroot}%{_datadir}/collectd/java" -%endif #!java mkdir -p _rpmdoc_/java mv contrib/GenericJMX.conf _rpmdoc_/java/ @@ -777,14 +502,6 @@ install -d "%{buildroot}%{_mandir}/man1" find contrib/ -name '*.orig' -delete -%if !%{with_pgsql} -rm -f "%{buildroot}%{_datadir}/collectd/postgresql_default.conf" -%endif - -%if !%{with_snmp_plugin} -rm -f "%{buildroot}%{_mandir}/man5/collectd-snmp.5" -%endif - # plugin list: echo -n > plugins.lst for plugin in %{plugins}; do @@ -798,50 +515,26 @@ This package is empty but depends on all collectd plugin subpackages. EOF install -d -m 0755 "%{buildroot}%{_prefix}/sbin" - -%if 0%{?has_systemd} install -D -m0644 contrib/systemd.collectd.service %{buildroot}%{_unitdir}/collectd.service ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} -%else -# init script: -install -D -m 0755 "%{SOURCE1}" "%{buildroot}%{_initddir}/collectd" -ln -s "../..%{_initddir}/collectd" "%{buildroot}%{_sbindir}/rccollectd" -%endif %preun -%stop_on_removal collectd - -%if 0%{?has_systemd} %service_del_preun %{name}.service -%endif %postun -%restart_on_update collectd -%insserv_cleanup - -%if 0%{?has_systemd} %service_del_postun %{name}.service -%endif %pre - -%if 0%{?has_systemd} %service_add_pre %{name}.service -%endif %post %{fillup_only collectd} - -%if 0%{?has_systemd} %service_add_post %{name}.service -%endif %post -n libcollectdclient1 -p /sbin/ldconfig - %postun -n libcollectdclient1 -p /sbin/ldconfig %files -f plugins.lst -%defattr(-,root,root) %doc AUTHORS ChangeLog COPYING README %doc contrib %config(noreplace) %{_sysconfdir}/collectd.conf @@ -854,46 +547,38 @@ ln -s "../..%{_initddir}/collectd" "%{buildroot}%{_sbindir}/rccollectd" %{_sbindir}/collectdmon %{_sbindir}/rccollectd %dir %{_libdir}/collectd -%if %{with_esmtp} %{_libdir}/collectd/notify_email.so %{_libdir}/collectd/notify_email.la -%endif #with_esmtp %dir %{_datadir}/collectd %{_datadir}/collectd/types.db %{perl_vendorlib}/Collectd.pm %dir %{perl_vendorlib}/Collectd %{perl_vendorlib}/Collectd/* %{perl_vendorarch}/auto/Collectd -%doc %{_mandir}/man1/collectd.1%{ext_man} -%doc %{_mandir}/man1/collectdctl.1%{ext_man} -%doc %{_mandir}/man1/collectdmon.1%{ext_man} -%doc %{_mandir}/man1/collectd-tg.1%{ext_man} -%doc %{_mandir}/man1/collectd-nagios.1%{ext_man} -%doc %{_mandir}/man1/cussh.1%{ext_man} -%doc %{_mandir}/man5/collectd.conf.5%{ext_man} -%doc %{_mandir}/man5/collectd-email.5%{ext_man} -%doc %{_mandir}/man5/collectd-exec.5%{ext_man} -%doc %{_mandir}/man5/collectd-perl.5%{ext_man} -%doc %{_mandir}/man5/collectd-threshold.5%{ext_man} -%doc %{_mandir}/man5/collectd-unixsock.5%{ext_man} -%doc %{_mandir}/man5/types.db.5%{ext_man} +%{_mandir}/man1/collectd.1%{ext_man} +%{_mandir}/man1/collectdctl.1%{ext_man} +%{_mandir}/man1/collectdmon.1%{ext_man} +%{_mandir}/man1/collectd-tg.1%{ext_man} +%{_mandir}/man1/collectd-nagios.1%{ext_man} +%{_mandir}/man1/cussh.1%{ext_man} +%{_mandir}/man5/collectd.conf.5%{ext_man} +%{_mandir}/man5/collectd-email.5%{ext_man} +%{_mandir}/man5/collectd-exec.5%{ext_man} +%{_mandir}/man5/collectd-perl.5%{ext_man} +%{_mandir}/man5/collectd-threshold.5%{ext_man} +%{_mandir}/man5/collectd-unixsock.5%{ext_man} +%{_mandir}/man5/types.db.5%{ext_man} %doc %{perl_man3dir}/Collectd::Unixsock.%{perl_man3ext}%{ext_man} %dir %{_localstatedir}/lib/collectd -%if 0%{?has_systemd} %{_unitdir}/collectd.service -%else -%{_initddir}/collectd -%endif %files web -%defattr(-,root,root) %config(noreplace) %{_sysconfdir}/apache2/conf.d/%{name}.conf %dir %{_sysconfdir}/collectd %config(noreplace) %{_sysconfdir}/collectd/collection.conf /srv/www/collectd %files web-js -%defattr(-,root,root) %doc _rpmdoc_/web-js/README %config(noreplace) %{_sysconfdir}/apache2/conf.d/%{name}-js.conf %dir %{_sysconfdir}/collectd @@ -901,124 +586,87 @@ ln -s "../..%{_initddir}/collectd" "%{buildroot}%{_sbindir}/rccollectd" /srv/www/collectd-js %{_libexecdir}/collectd-js -%if %{libnotify} %files plugin-notify-desktop -%defattr(-,root,root) %{_libdir}/collectd/notify_desktop.so %{_libdir}/collectd/notify_desktop.la -%endif #libnotify -%if %{ipmi} %files plugin-ipmi -%defattr(-,root,root) %{_libdir}/collectd/ipmi.so %{_libdir}/collectd/ipmi.la -%endif #ipmi -%if %{snmp} %files plugin-snmp -%defattr(-,root,root) %doc _rpmdoc_/snmp/* %{_bindir}/collectd-snmp-probe-host -%doc %{_mandir}/man1/collectd-snmp-probe-host.1%{ext_man} -%if %{with_snmp_plugin} +%{_mandir}/man1/collectd-snmp-probe-host.1%{ext_man} %{_libdir}/collectd/snmp.so %{_libdir}/collectd/snmp.la -%doc %{_mandir}/man5/collectd-snmp.5%{ext_man} -%endif #with_snmp_plugin -%endif #snmp +%{_mandir}/man5/collectd-snmp.5%{ext_man} + +%files plugin-lvm +%{_libdir}/collectd/lvm.so +%{_libdir}/collectd/lvm.la -%if %{protobuf} %files plugin-pinba -%defattr(-,root,root) %{_libdir}/collectd/pinba.so %{_libdir}/collectd/pinba.la -%endif #protobuf -%if 0%{?suse_version} >= 930 %files plugin-mysql -%defattr(-,root,root) %{_libdir}/collectd/mysql.so %{_libdir}/collectd/mysql.la -%endif -%if %{with_pgsql} %files plugin-postgresql -%defattr(-,root,root) %{_libdir}/collectd/postgresql.so %{_libdir}/collectd/postgresql.la %config %{_datadir}/collectd/postgresql_default.conf -%endif #with_pgsql -%files plugin-python -%defattr(-,root,root) +%files plugin-python3 %{_libdir}/collectd/python.so %{_libdir}/collectd/python.la -%doc %{_mandir}/man5/collectd-python.5%{ext_man} +%{_mandir}/man5/collectd-python.5%{ext_man} -%if %java %files plugin-java -%defattr(-,root,root) %doc _rpmdoc_/java/GenericJMX.conf %{_libdir}/collectd/java.so %{_libdir}/collectd/java.la %{_datadir}/collectd/java -%doc %{_mandir}/man5/collectd-java.5%{ext_man} -%endif #java +%{_mandir}/man5/collectd-java.5%{ext_man} -%if %{virt} %files plugin-virt -%defattr(-,root,root) %{_libdir}/collectd/virt.so %{_libdir}/collectd/virt.la -%endif #virt -%if %{xmms} -%files plugin-xmms -%defattr(-,root,root) -%{_libdir}/collectd/xmms.so -%{_libdir}/collectd/xmms.la -%endif #xmms - -%if %{dbi} %files plugin-dbi -%defattr(-,root,root) %{_libdir}/collectd/dbi.so %{_libdir}/collectd/dbi.la -%endif #dbi -%if %{memcachec} %files plugin-memcachec -%defattr(-,root,root) %{_libdir}/collectd/memcachec.so %{_libdir}/collectd/memcachec.la -%endif #memcachec - -%if %{with modbus} -%files plugin-modbus -%defattr(-,root,root) -%{_libdir}/collectd/modbus.so -%{_libdir}/collectd/modbus.la -%endif #modbus %files plugin-smart -%defattr(-,root,root) %{_libdir}/collectd/smart.so %{_libdir}/collectd/smart.la %files plugin-lua -%defattr(-,root,root) %{_libdir}/collectd/lua.so %{_libdir}/collectd/lua.la -%doc %{_mandir}/man5/collectd-lua.5%{ext_man} +%{_mandir}/man5/collectd-lua.5%{ext_man} %files plugin-gps -%defattr(-,root,root) %{_libdir}/collectd/gps.so %{_libdir}/collectd/gps.la +%files plugin-openldap +%{_libdir}/collectd/openldap.so +%{_libdir}/collectd/openldap.la + +%if 0%{?suse_version} >= 1330 +%files plugin-nut +%{_libdir}/collectd/nut.so +%{_libdir}/collectd/nut.la +%endif + %files spamassassin -%defattr(-,root,root) %dir %{_datadir}/spamassassin %config(noreplace) %{_datadir}/spamassassin/99_%{name}.cf %dir %{perl_vendorlib}/Mail @@ -1028,16 +676,13 @@ ln -s "../..%{_initddir}/collectd" "%{buildroot}%{_sbindir}/rccollectd" %doc %{perl_man3dir}/Mail::SpamAssassin::Plugin::Collectd.%{perl_man3ext}%{ext_man} %files plugins-all -%defattr(-,root,root) %doc README.plugins-all %files -n libcollectdclient1 -%defattr(-,root,root) %{_libdir}/libcollectdclient.so.1 %{_libdir}/libcollectdclient.so.1.*.* %files -n libcollectdclient-devel -%defattr(-,root,root) %{_includedir}/collectd %{_libdir}/libcollectdclient.so %{_libdir}/pkgconfig/libcollectdclient.pc