diff --git a/_service b/_service
new file mode 100644
index 0000000..6b5257e
--- /dev/null
+++ b/_service
@@ -0,0 +1,7 @@
+
+
+ collectd-5.4.2.tar.bz2
+ sha256
+ 9789e900c138b5dbe907d3d744143f12b1e30022276cb1d8c65bbabaf0c4e393
+
+
diff --git a/collectd-5.4.1.tar.bz2 b/collectd-5.4.1.tar.bz2
deleted file mode 100644
index d466a16..0000000
--- a/collectd-5.4.1.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:75452129f271cb0aad28e57f12a49070618bbb7b6a9d64cf869e8766fa2f66e0
-size 1521907
diff --git a/collectd-5.4.2.tar.bz2 b/collectd-5.4.2.tar.bz2
new file mode 100644
index 0000000..0040ca6
--- /dev/null
+++ b/collectd-5.4.2.tar.bz2
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9789e900c138b5dbe907d3d744143f12b1e30022276cb1d8c65bbabaf0c4e393
+size 1633610
diff --git a/collectd-rpmlintrc b/collectd-rpmlintrc
index c1b4531..67ae783 100644
--- a/collectd-rpmlintrc
+++ b/collectd-rpmlintrc
@@ -8,3 +8,6 @@ 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 37482c3..ca88974 100644
--- a/collectd.changes
+++ b/collectd.changes
@@ -1,3 +1,106 @@
+-------------------------------------------------------------------
+Fri Jun 5 06:49:33 UTC 2015 - mpluskal@suse.com
+
+- Change _service to mode='localonly' active services are not
+ allowed in factory
+
+-------------------------------------------------------------------
+Mon Mar 2 08:59:24 UTC 2015 - bruno@ioda-net.ch
+
+- packaging :
+ deleted source collectd.service, use now upstream version in contrib
+ spec_cleaner .spec
+
+- upstream update bugfix release 2015-02-26, Version 5.4.2
+ * Build system: Numerous fixes. Thanks to Bjørn Nordbø, Jim Radford,
+ KOMEDA Shinji, Lauri Tirkkonen, Manuel Luis Sanmartin Rozada, Marc
+ Fournier, Rainer Müller, Yoga Ramalingam and Yves Mettier. #326,
+ #373, #653, #828
+ * collectd: A use-after-free has been fixed in the "parse_value()"
+ function. Thanks to Matthias Urlichs.
+ * collectd: Fix carriage return sign in types_list Thanks to Marc
+ Fournier and @NsLib.
+ * collectd: Fix programming error in src/configfile.c. Thanks to
+ Wilfried Goesgens.
+ * collectd: An off-by-one error has been fixed in the
+ "strstripnewline()" function. Patch by Florian Forster.
+ * collectd: Use the complain mechanism to report filter chain write
+ failures. Thanks to Sebastian Harl.
+ * collectd: Spelling and grammar of error messages have been fixed.
+ Thanks to Katelyn Perry and Tim Laszlo.
+ * collectdctl: Fixed buffering issues which caused trouble on AIX and
+ Solaris. Thanks to Yoga Ramalingam.
+ * Documentation: Details and example about multi-instance filterchain
+ targets have been added. Thanks to Marc Fournier.
+ * Documentation: The "CollectStatistics" option of the rrdcached has
+ been documented. Thanks to Micha Krause. #907
+ * Documentation: The write_redis has been documented. Thanks to Marc
+ Fournier.
+ * Documentation: The "GraphiteSeparateInstances" and
+ "GraphiteAlwaysAppendDS" options of the amqp have been documented.
+ Thanks to Marc Fournier.
+ * Documentation: Documentation of the "AutoLoadPlugin" option has been
+ improved. Thanks to Florian Forster. #715
+ * aggregation: "utils_vl_lookup": A race when creating user objects
+ has been fixed. Thanks to Sebastian Harl. #535
+ * cpu: Temperature code for MacOSX has been removed.
+ Thanks to Florian Forster and Marc Fournier. #22
+ * cURL, cURL-JSON, cURL-XML and Write HTTP plugins: Call
+ "curl_global_init()" in the plugins' "init()" callback. Thanks to
+ Jeremy Katz.
+ * cURL and memcachec plugins: Fix calculation of gauge, average,
+ minimum and maximum. Previously, they were calculated from the start
+ of the daemon, which is not the documented behavior. Thanks to
+ Florian Forster. #663
+ * curl-json: A bug, which triggered when two URLs with a long common
+ prefix were configured, was fixed. Thanks to Marc Fournier. #582
+ * dbi: Compatibility with new versions of libdbi has been restored.
+ Thanks to Florian Forster. #950
+ * Exec, UnixSock plugins: Fix parsing of the "time" option of the
+ "PUTNOTIF" command. Thanks to Adrian Miron. #477
+ * ipmi: A conflict with the java over the "SIGUSR2" signal has been
+ fixed. Thanks to Vincent Bernat. #114
+ * java: Conversion from Java's time representation to collectd's
+ representation has been fixed. Thanks to Manuel Luis Sanmartín
+ Rozada.
+ * java: Make sure "cjni_thread_detach()" is called on all paths.
+ Thanks to Florian Forster.
+ * LogFile and SysLog plugins: Avoid total silence in case of a
+ misconfiguration. Thanks to Marc Fournier and Wilfried Goesgens.
+ * network: Support for recent versions of gcrypt has been added.
+ Thanks to Vincent Bernat. #632
+ * network: Robustness of the client connecting behavior has been
+ improved. Thanks to Florian Forster. #627
+ * python: Don't create empty "meta_data_t" objects. Thanks to Florian
+ Forster. #716
+ * python: Fix Py list length check in "cpy_build_meta()". Thanks to
+ Yoga Ramalingam.
+ * python: The "interval" member was fixed to export seconds as a
+ double. Thanks to Justin Burnham.
+ * RRDtool and RRDCacheD plugins: A memory leak when creating RRD files
+ has been fixed. Thanks to Yves Mettier. #661
+ * snmp: Fix a memory leak. Thanks to Marc Fournier and Pierre-Yves
+ Ritschard. #610, #804
+ * statsd: Support for samplerates in timer metrics was added. Thanks
+ to John Leach. #461
+ * swap: Fix behavior under OpenVZ by making "cached" optional. Thanks
+ to Florian Forster. #733
+ * threshold: Population of the "time" field in notifications has been
+ added. Thanks to Manuel Luis Sanmartín Rozada.
+ * libvirt: Only gather stats for running domains. Thanks to Ruben
+ Kerkhof.
+ * lvm: An issue with Volume Groups (VGs) without Logical Volumes (LVs)
+ has been fixed. Thanks to Jan Kundrát.
+ * write_graphite: Escape characters not supported by Graphite. Thanks
+ to Pierre-Yves Ritschard and Marc Fournier.
+ * write_http: Make callback names context-dependent. Thanks to Marc
+ Fournier. #821
+ * write_redis: A formatting bug, which resulted in totally unusable
+ numbers being transmitted to Redis, was fixed. Thanks to Marc
+ Fournier.
+ * write_riemann: Receive acknowledge message when using TCP. Thanks to
+ John-John Tedro.
+
-------------------------------------------------------------------
Sun Jul 20 19:37:18 UTC 2014 - p.drouand@gmail.com
diff --git a/collectd.service b/collectd.service
deleted file mode 100644
index 86c519d..0000000
--- a/collectd.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=System statistics collection daemon
-After=local-fs.target network.target
-Requires=local-fs.target network.target
-
-[Service]
-ExecStart=/usr/sbin/collectd -C /etc/collectd.conf -f
-Restart=always
-RestartSec=10
-StandardOutput=syslog
-StandardError=syslog
-
-[Install]
-WantedBy=multi-user.target
diff --git a/collectd.spec b/collectd.spec
index 796b40b..55b3bf5 100644
--- a/collectd.spec
+++ b/collectd.spec
@@ -1,7 +1,7 @@
#
# spec file for package collectd
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2005-2013 Pascal Bleser
#
# All modifications and additions to the file contributed by third parties
@@ -17,30 +17,32 @@
#
+%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 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
%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
@@ -48,13 +50,11 @@
%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
@@ -68,27 +68,18 @@
%define iptables 0
%define iptables_plugin %{nil}
%endif
-
-%define madwifi_plugin madwifi
-
%if 0%{?suse_version} >= 1130
%define rrdcached_plugin rrdcached
%else
%define rrdcached_plugin %{nil}
%endif
-
-%define pcap_version %({rpm -q --qf='%{VERSION}\n' libpcap-devel 2>/dev/null || echo 0.0.0} | %__awk -F. '{print $1*10000+$2*100+$3}')
-%if %pcap_version >= 10000
+%if %{pcap_version} >= 10000
%define dns 1
%define dns_plugin dns
%else
%define dns 0
%define dns_plugin %{nil}
%endif
-
-%define snmp 1
-%define with_esmtp 1
-
%if 0%{?suse_version} >= 1000
%define yajl 1
%define curl_json_plugin curl_json
@@ -112,17 +103,23 @@
%define protobuf 0
%define pinba_plugin %{nil}
%endif
-
-%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
-
+%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.4.1
+Version: 5.4.2
Release: 0
Summary: Statistics Collection Daemon for filling RRD Files
License: GPL-2.0
Group: System/Monitoring
+Url: http://collectd.org/
Source: http://collectd.org/files/collectd-%{version}.tar.bz2
Source1: collectd.suse.init
Source2: collectd.apache2.conf
@@ -131,7 +128,6 @@ Source3: collectd-js.apache2.conf
# see https://bugzilla.novell.com/show_bug.cgi?id=388026
Source20: collectd-pthread.pc
Source99: collectd-rpmlintrc
-Source100: collectd.service
Patch4: collectd-lib64.patch
Patch7: collectd-fix-config.patch
Patch9: collectd-version.patch
@@ -144,34 +140,56 @@ 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
-
-# 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
-%endif
-
Patch25: collectd-df-remove-duplicates.patch
-Url: http://collectd.org/
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Requires: rrdtool
-Requires: sensors
+# for /etc/apache2/... ownership (rpmlint):
+BuildRequires: apache2
+BuildRequires: autoconf
+BuildRequires: automake
BuildRequires: bind-devel
BuildRequires: bison
BuildRequires: flex
+BuildRequires: freetype2-devel
+BuildRequires: gcc
BuildRequires: gettext
BuildRequires: gettext-devel
BuildRequires: intltool
+# for ipvs and madwifi:
+BuildRequires: kernel-source
+BuildRequires: libart_lgpl-devel
BuildRequires: libevent-devel
-BuildRequires: libnetlink-devel
#BuildRequires: libmodbus-devel
BuildRequires: libmnl-devel
+BuildRequires: libnetlink-devel
+BuildRequires: liboping-devel
+BuildRequires: libpcap
BuildRequires: libpng-devel
BuildRequires: libstatgrab-devel
+BuildRequires: libtool
+BuildRequires: libxml2-devel
+BuildRequires: linux-kernel-headers
+BuildRequires: make
BuildRequires: perl
+BuildRequires: pkgconfig
+BuildRequires: python-devel
BuildRequires: rrdtool
BuildRequires: sensors
+BuildRequires: xfsprogs-devel
BuildRequires: zlib-devel
+Requires: rrdtool
+Requires: sensors
+# FIXME: use proper Requires(pre/post/preun/...)
+PreReq: %fillup_prereq
+# in case we'd like to split it later:
+Provides: collectd-perl = %{version}-%{release}
+# 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
+%endif
%if 0%{?suse_version} > 1020
BuildRequires: libdb-4_5-devel
%else
@@ -182,103 +200,70 @@ BuildRequires: libgcrypt-devel
%else
BuildRequires: libgcrypt
%endif
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: freetype2-devel
-BuildRequires: gcc
-BuildRequires: libart_lgpl-devel
-BuildRequires: liboping-devel
-BuildRequires: libtool
-BuildRequires: make
-BuildRequires: pkgconfig
-BuildRequires: python-devel
-%if %libnotify
+%if %{libnotify}
BuildRequires: gtk2-devel
BuildRequires: libnotify-devel
%endif
%if %java
BuildRequires: java-devel
%endif #java
-# for /etc/apache2/... ownership (rpmlint):
-BuildRequires: apache2
-%if %with_esmtp
+%if %{with_esmtp}
BuildRequires: libesmtp-devel
%endif
-BuildRequires: xfsprogs-devel
-%if %with_mysql
+%if %{with_mysql}
BuildRequires: mysql-devel >= 4.1.0
%endif
-%if %with_pgsql
+%if %{with_pgsql}
BuildRequires: postgresql-devel
%endif
-%if %yajl
+%if %{yajl}
BuildRequires: libyajl-devel
%endif
-%if %suse_version >= 1030
+%if 0%{?suse_version} >= 1030
BuildRequires: rrdtool-devel
%endif
-%if %suse_version >= 1030
+%if 0%{?suse_version} >= 1030
BuildRequires: libcurl-devel
%else
BuildRequires: curl-devel
%endif
-BuildRequires: libxml2-devel
-%if %ipmi
+%if %{ipmi}
# for ipmi:
BuildRequires: OpenIPMI-devel
BuildRequires: gdbm-devel
%endif #ipmi
-%if %snmp
+%if %{snmp}
# for snmp:
BuildRequires: net-snmp-devel
%endif #snmp
-# for ipvs and madwifi:
-BuildRequires: kernel-source
-BuildRequires: linux-kernel-headers
-%if %suse_version >= 1030
+%if 0%{?suse_version} >= 1030
BuildRequires: libpcap-devel
%endif
-BuildRequires: libpcap
-%if %xmms
+%if %{xmms}
# for xmms:
BuildRequires: xmms-devel
%endif
-%if %virt
+%if %{virt}
# for libvirt:
BuildRequires: libvirt-devel
%endif
-%if %dbi
+%if %{dbi}
BuildRequires: libdbi-devel
%endif
-%if %memcachec
+%if %{memcachec}
BuildRequires: libmemcached-devel
%endif
-%if %protobuf
+%if %{protobuf}
BuildRequires: protobuf-c
%endif
-%if %suse_version < 1220
-%if %suse_version > 1020
+%if 0%{?suse_version} < 1220
+%if 0%{?suse_version} > 1020
BuildRequires: iptables-devel
%endif
%else
BuildRequires: libiptc-devel
BuildRequires: libxtables-devel
%endif
-%if %suse_version >= 1210
-%{perl_requires}
-%{?libperl_requires}
-BuildRequires: systemd
-%{?systemd_requires}
-%define has_systemd 1
-%else
-PreReq: %insserv_prereq
-%endif
-# in case we'd like to split it later:
-Provides: collectd-perl = %{version}-%{release}
-PreReq: %fillup_prereq
-# play nice with collectd-beta:
-Obsoletes: collectd-beta < %{version}
-Provides: collectd-beta = %{version}-%{release}
%description
collectd is a small daemon written in C for performance. It reads various
@@ -293,7 +278,6 @@ Group: System/Monitoring
Requires: apache2
Requires: perl
Requires: rrdtool
-Requires: rrdtool
Requires: perl(CGI)
Requires: perl(Data::Dumper)
Requires: perl(HTML::Entities)
@@ -302,7 +286,7 @@ Requires: perl(URI::Escape)
%description web
Web frontend CGI for watching %{name} statistics from a browser.
-Please look at /etc/apache2/conf.d/%{name}.conf on how to enable.
+Please look at %{_sysconfdir}/apache2/conf.d/%{name}.conf on how to enable.
%package web-js
Summary: Web/JavaScript Frontend for watching %{name} Statistics
@@ -321,22 +305,21 @@ Requires: perl(RRDs)
Web/JavaScript frontend CGI for watching %{name} statistics from
a browser.
-Please look at /etc/apache2/conf.d/%{name}-js.conf on how to
+Please look at %{_sysconfdir}/apache2/conf.d/%{name}-js.conf on how to
enable.
-%if %libnotify
-
+%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}
+Desktop Notification Support for %{name} allow you to receive
+message delivered on your desktop.
%endif #libnotify
-%if %ipmi
-
+%if %{ipmi}
%package plugin-ipmi
Summary: OpenIPMI Monitoring Plugin for %{name}
Group: System/Monitoring
@@ -347,8 +330,7 @@ Optional %{name} plugin to monitor sensors using the OpenIPMI
library, for IPMI enabled systems.
%endif #ipmi
-%if %snmp
-
+%if %{snmp}
%package plugin-snmp
Summary: SNMP Monitoring Plugin for %{name}
Group: System/Monitoring
@@ -361,8 +343,7 @@ Requires: perl(Socket6)
Optional %{name} plugin to monitor devices using SNMP.
%endif #snmp
-%if %with_mysql
-
+%if %{with_mysql}
%package plugin-mysql
Summary: MySQL Monitoring Plugin for %{name}
Group: System/Monitoring
@@ -372,8 +353,7 @@ Requires: %{name} = %{version}-%{release}
Optional %{name} plugin to monitor MySQL server instances.
%endif #with_mysql
-%if %with_pgsql
-
+%if %{with_pgsql}
%package plugin-postgresql
Summary: PostgreSQL Monitoring Plugin for %{name}
Group: System/Monitoring
@@ -393,7 +373,6 @@ Optional %{name} Python API in order to write %{name} plugins in
Python.
%if %java
-
%package plugin-java
Summary: Java API for %{name}
Group: System/Monitoring
@@ -404,8 +383,7 @@ Optional %{name} Java API in order to write %{name} plugins in
Java.
%endif #java
-%if %virt
-
+%if %{virt}
%package plugin-virt
Summary: Virtual Machine Statistics Plugin for %{name}
Group: System/Monitoring
@@ -416,8 +394,7 @@ Optional %{name} plugin to gather statistics from virtual
machines using libvirt.
%endif
-%if %xmms
-
+%if %{xmms}
%package plugin-xmms
Summary: XMMS Monitoring Plugin for %{name}
Group: System/Monitoring
@@ -428,8 +405,7 @@ Optional %{name} plugin to gather sampling frequencies and file
bitrates of files played with XMMS.
%endif #xmms
-%if %dbi
-
+%if %{dbi}
%package plugin-dbi
Summary: DBI Storage Plugin for %{name}
Group: System/Monitoring
@@ -440,8 +416,7 @@ Optional %{name} plugin to store sampling results into
various databases as supported by libdbi.
%endif #dbi
-%if %memcachec
-
+%if %{memcachec}
%package plugin-memcachec
Summary: Memcache Daemon Monitoring Plugin for %{name}
Group: System/Monitoring
@@ -451,8 +426,7 @@ Requires: %{name} = %{version}-%{release}
Optional %{name} plugin to sample memcached statistics.
%endif #memcachec
-%if %protobuf
-
+%if %{protobuf}
%package plugin-pinba
Summary: Pinba Collector Plugin for %{name}
Group: System/Monitoring
@@ -467,37 +441,37 @@ profiling extension for PHP.
Summary: All Monitoring Plugins for %{name}
Group: System/Monitoring
Requires: %{name} = %{version}-%{release}
-%if %ipmi
+Requires: %{name}-plugin-python = %{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
+%if %{snmp}
Requires: %{name}-plugin-snmp = %{version}-%{release}
%endif #snmp
-%if %with_mysql
+%if %{with_mysql}
Requires: %{name}-plugin-mysql = %{version}-%{release}
%endif #with_mysql
-%if %with_pgsql
+%if %{with_pgsql}
Requires: %{name}-plugin-postgresql = %{version}-%{release}
%endif
%if %java
Requires: %{name}-plugin-java = %{version}-%{release}
%endif #java
-%if %virt
+%if %{virt}
Requires: %{name}-plugin-virt = %{version}-%{release}
%endif #virt
-Requires: %{name}-web = %{version}-%{release}
-Requires: %{name}-web-js = %{version}-%{release}
-%if %libnotify
+%if %{libnotify}
Requires: %{name}-plugin-notify-desktop = %{version}-%{release}
%endif #libnotify
-Requires: %{name}-plugin-python = %{version}-%{release}
-%if %dbi
+%if %{dbi}
Requires: %{name}-plugin-dbi = %{version}-%{release}
%endif #dbi
-%if %memcachec
+%if %{memcachec}
Requires: %{name}-plugin-memcachec = %{version}-%{release}
%endif #memcachec
-%if %protobuf
+%if %{protobuf}
Requires: %{name}-plugin-pinba = %{version}-%{release}
%endif #protobuf
@@ -550,28 +524,28 @@ to write %{name} unixsock clients.
%patch20
%patch21
%patch23
-%if 0%{?suse_version} <= 1140 && !0%{sles_version}
+%if 0%{?suse_version} <= 1140 && !0%{?sles_version}
%patch24 -p1
%endif
%patch25
-%__sed -i 's|@@VERSION@@|%{version}|g' configure.ac
+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
+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
+perl -p -i -e 's|(-L\$withval/lib)\b|${1}64|g' configure.ac configure
# unneeded files:
-%__rm -fr \
+rm -fr \
contrib/fedora \
contrib/solaris-smf \
contrib/redhat \
contrib/sles*
# remove -Werror everywhere
-find . -name 'configure*' -o -name 'Makefile*' -exec %__sed -i 's|-Werror||g' {} \;
+find . -name 'configure*' -o -name 'Makefile*' -exec sed -i 's|-Werror||g' {} \;
%build
export SUSE_ASNEEDED=0
@@ -579,7 +553,7 @@ export SUSE_ASNEEDED=0
autoreconf -fiv
# set JAVA_HOME properly
-[ -n "$JAVA_HOME" -a -d "$JAVA_HOME" ] || export JAVA_HOME="%{_usr}/%{_lib}/jvm/java"
+[ -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"
@@ -588,12 +562,12 @@ 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=/usr/src/linux
+export KERNEL_DIR=%{_prefix}/src/linux
%configure \
--with-libstatgrab \
--with-rrdtool \
--disable-static \
-%if %dns
+%if %{dns}
--enable-dns \
%else
--disable-dns \
@@ -602,18 +576,18 @@ export KERNEL_DIR=/usr/src/linux
--enable-netlink \
--enable-python \
--with-librrd \
-%if %iptables
+%if %{iptables}
--enable-iptables \
%else
--disable-iptables \
--without-iptc \
%endif #iptables
-%if %ascent
+%if %{ascent}
--enable-ascent \
%else
--disable-ascent \
%endif #ascent
-%if %ipmi
+%if %{ipmi}
--enable-ipmi \
%else
--disable-ipmi \
@@ -624,17 +598,17 @@ export KERNEL_DIR=/usr/src/linux
%else
--disable-java \
%endif #java
-%if %dbi
+%if %{dbi}
--enable-dbi \
%else
--disable-dbi \
%endif #dbi
-%if %memcachec
+%if %{memcachec}
--enable-memcached \
%else
--disable-memcached \
%endif #memcachec
-%if %suse_version < 930
+%if 0%{?suse_version} < 930
--disable-mysql \
%endif
%ifos linux
@@ -643,7 +617,7 @@ export KERNEL_DIR=/usr/src/linux
--disable-serial
%endif #os linux
-%__make %{?_smp_flags} \
+make %{?_smp_flags} \
%if 0%{?suse_version} < 1120
JAVAC_TARGET="-source 1.5 -target 1.5"
%else
@@ -651,103 +625,103 @@ export KERNEL_DIR=/usr/src/linux
%endif
%install
-%makeinstall
+make DESTDIR=%{buildroot} install %{?_smp_mflags}
# delete .la files
-%__rm -f "%{buildroot}%{_libdir}"/*.{a,la}
-%__rm -f "%{buildroot}%{_libdir}/collectd"/*.a
+rm -f "%{buildroot}%{_libdir}"/*.{a,la}
+rm -f "%{buildroot}%{_libdir}/collectd"/*.a
-%__sed -i '/^dependency_libs=/ s|-L'"${RPM_BUILD_DIR}/%{name}-%{version}"'/src||g' "%{buildroot}%{_libdir}/collectd/python.la"
+sed -i '/^dependency_libs=/ s|-L'"${RPM_BUILD_DIR}/%{name}-%{version}"'/src||g' "%{buildroot}%{_libdir}/collectd/python.la"
# delete if it exists (not packaged any more on openSUSE):
-%__rm -rf "%{buildroot}/var/adm/perl-modules/%{name}"
+rm -rf "%{buildroot}%{_localstatedir}/adm/perl-modules/%{name}"
%if !%java
-%__rm -f "%{buildroot}%{_mandir}/man5"/collectd-java.5*
-%__rm -rf "%{buildroot}%{_datadir}/collectd/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/
+mkdir -p _rpmdoc_/java
+mv contrib/GenericJMX.conf _rpmdoc_/java/
# fix permissions:
-%__chmod 0755 "%{buildroot}%{_libdir}/collectd"/*.so
-%__chmod 0644 "%{buildroot}%{_libdir}/collectd"/*.la
+chmod 0755 "%{buildroot}%{_libdir}/collectd"/*.so
+chmod 0644 "%{buildroot}%{_libdir}/collectd"/*.la
# create /var/lib/collectd to add it to the %files section:
-%__install -d -m 0755 "%{buildroot}%{_localstatedir}/lib/collectd"
+install -d -m 0755 "%{buildroot}%{_localstatedir}/lib/collectd"
# Apache2 configuration for the CGI frontend:
-%__install -D -m 0644 "%{SOURCE2}" "%{buildroot}/etc/apache2/conf.d/%{name}.conf"
-%__install -D -m 0755 contrib/collection.cgi "%{buildroot}/srv/www/collectd/collection.cgi"
-%__install -D -m 0644 contrib/collection.conf "%{buildroot}%{_sysconfdir}/collectd/collection.conf"
-%__sed -i 's|@@LIBDIR@@|%{_libdir}|g' "%{buildroot}%{_sysconfdir}/collectd/collection.conf"
+install -D -m 0644 "%{SOURCE2}" "%{buildroot}%{_sysconfdir}/apache2/conf.d/%{name}.conf"
+install -D -m 0755 contrib/collection.cgi "%{buildroot}/srv/www/collectd/collection.cgi"
+install -D -m 0644 contrib/collection.conf "%{buildroot}%{_sysconfdir}/collectd/collection.conf"
+sed -i 's|@@LIBDIR@@|%{_libdir}|g' "%{buildroot}%{_sysconfdir}/collectd/collection.conf"
# remove it from contrib, to avoid having it end up in the main package as well:
-%__rm contrib/collection.cgi contrib/collection.conf
+rm contrib/collection.cgi contrib/collection.conf
%perl_process_packlist
-%__rm -rf "%{buildroot}/var/adm/perl-modules"/*
+rm -rf "%{buildroot}%{_localstatedir}/adm/perl-modules"/*
# web-js CGI frontend (_must_ be installed _after_ perl_process_packlist)
-%__install -d "%{buildroot}/srv/www/collectd-js"
-%__mkdir_p _rpmdoc_/web-js
-%__mv contrib/collection3/README _rpmdoc_/web-js/README
-find contrib/collection3/ -name .htaccess -exec %__rm {} \;
-%__cp -a \
+install -d "%{buildroot}/srv/www/collectd-js"
+mkdir -p _rpmdoc_/web-js
+mv contrib/collection3/README _rpmdoc_/web-js/README
+find contrib/collection3/ -name .htaccess -exec rm {} \;
+cp -a \
contrib/collection3/bin/* \
contrib/collection3/share/* \
"%{buildroot}/srv/www/collectd-js/"
-%__mkdir_p "%{buildroot}%{_usr}/lib/collectd-js"
-%__mv contrib/collection3/lib/* "%{buildroot}%{_usr}/lib/collectd-js/"
+mkdir -p "%{buildroot}%{_libexecdir}/collectd-js"
+mv contrib/collection3/lib/* "%{buildroot}%{_libexecdir}/collectd-js/"
-%__install -D -m 0644 contrib/collection3/etc/collection.conf \
+install -D -m 0644 contrib/collection3%{_sysconfdir}/collection.conf \
"%{buildroot}%{_sysconfdir}/collectd/collection-js.conf"
-%__rm -fr contrib/collection3/etc
-%__install -D -m 0644 "%{SOURCE3}" "%{buildroot}/etc/apache2/conf.d/%{name}-js.conf"
+rm -fr contrib/collection3/etc
+install -D -m 0644 "%{SOURCE3}" "%{buildroot}%{_sysconfdir}/apache2/conf.d/%{name}-js.conf"
# spamassassin (_must_ be installed _after_ perl_process_packlist)
-%__install -D -m0644 contrib/SpamAssassin/example.cf \
+install -D -m0644 contrib/SpamAssassin/example.cf \
"%{buildroot}%{_datadir}/spamassassin/99_%{name}.cf"
-%__install -D -m0644 contrib/SpamAssassin/Collectd.pm \
+install -D -m0644 contrib/SpamAssassin/Collectd.pm \
"%{buildroot}%{perl_vendorlib}/Mail/SpamAssassin/Plugin/Collectd.pm"
pod2man \
contrib/SpamAssassin/Collectd.pm \
> "%{buildroot}%{perl_man3dir}/Mail::SpamAssassin::Plugin::Collectd.%{perl_man3ext}"
-%__rm -rf contrib/SpamAssassin
+rm -rf contrib/SpamAssassin
# cussh script from contrib:
-%__install -m0755 contrib/cussh.pl "%{buildroot}%{_bindir}/cussh"
-%__install -d "%{buildroot}%{_mandir}/man1"
+install -m0755 contrib/cussh.pl "%{buildroot}%{_bindir}/cussh"
+install -d "%{buildroot}%{_mandir}/man1"
pod2man \
-c "Collectd UNIX Socket Shell" \
-n "CUSSH" \
-s 1 \
contrib/cussh.pl > "%{buildroot}%{_mandir}/man1/cussh.1"
-%__rm contrib/cussh.pl
+rm contrib/cussh.pl
# snmp:
-%__mkdir_p _rpmdoc_/snmp
-%__sed -n '/^snmp-data\.conf/,$ p' contrib/README > _rpmdoc_/snmp/README
-%__sed -i '/^snmp-data\.conf/,$ d' contrib/README
-%__mv contrib/snmp-data.conf _rpmdoc_/snmp/
-%__sed -i 's|\(\./\)snmp-probe-host\.px|collectd-snmp-probe-host|g' contrib/snmp-probe-host.px
+mkdir -p _rpmdoc_/snmp
+sed -n '/^snmp-data\.conf/,$ p' contrib/README > _rpmdoc_/snmp/README
+sed -i '/^snmp-data\.conf/,$ d' contrib/README
+mv contrib/snmp-data.conf _rpmdoc_/snmp/
+sed -i 's|\(\./\)snmp-probe-host\.px|collectd-snmp-probe-host|g' contrib/snmp-probe-host.px
pod2man \
-c "Collectd SNMP Host Probe" \
-n "COLLECTD-SNMP-PROBE-HOST" \
-s 1 \
contrib/snmp-probe-host.px \
> "%{buildroot}%{_mandir}/man1/collectd-snmp-probe-host.1"
-%__install -D -m0755 contrib/snmp-probe-host.px "%{buildroot}%{_bindir}/collectd-snmp-probe-host"
-%__rm contrib/snmp-probe-host.px
-%__install -d "%{buildroot}%{_mandir}/man1"
+install -D -m0755 contrib/snmp-probe-host.px "%{buildroot}%{_bindir}/collectd-snmp-probe-host"
+rm contrib/snmp-probe-host.px
+install -d "%{buildroot}%{_mandir}/man1"
-find contrib/ -name '*.orig' -exec %__rm {} \;
+find contrib/ -name '*.orig' -exec rm {} \;
-%if !%with_pgsql
-%__rm -f "%{buildroot}%{_datadir}/collectd/postgresql_default.conf"
+%if !%{with_pgsql}
+rm -f "%{buildroot}%{_datadir}/collectd/postgresql_default.conf"
%endif
-%if !%with_snmp_plugin
-%__rm -f "%{buildroot}%{_mandir}/man5/collectd-snmp.5"
+%if !%{with_snmp_plugin}
+rm -f "%{buildroot}%{_mandir}/man5/collectd-snmp.5"
%endif
# plugin list:
@@ -762,15 +736,15 @@ cat<README.plugins-all
This package is empty but depends on all collectd plugin subpackages.
EOF
-%__install -d -m 0755 "%{buildroot}/usr/sbin"
+install -d -m 0755 "%{buildroot}%{_prefix}/sbin"
-%if 0%{?has_systemd}
-%__install -D -m0644 %{SOURCE100} %{buildroot}%{_unitdir}/collectd.service
-ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
+%if 0%{?has_systemd}
+install -D -m0644 contrib/collectd.service %{buildroot}%{_unitdir}/collectd.service
+ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%else
# init script:
-%__install -D -m 0755 "%{SOURCE1}" "%{buildroot}/etc/init.d/collectd"
-%__ln_s "../../etc/init.d/collectd" "%{buildroot}/usr/sbin/rccollectd"
+install -D -m 0755 "%{SOURCE1}" "%{buildroot}%{_initddir}/collectd"
+ln -s "../..%{_initddir}/collectd" "%{buildroot}%{_sbindir}/rccollectd"
%endif
%preun
@@ -805,9 +779,6 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
%postun -n libcollectdclient1 -p /sbin/ldconfig
-%clean
-%{?buildroot:%__rm -rf "%{buildroot}"}
-
%files -f plugins.lst
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING README
@@ -820,8 +791,9 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
%{_bindir}/cussh
%{_sbindir}/collectd
%{_sbindir}/collectdmon
+%{_sbindir}/rccollectd
%dir %{_libdir}/collectd
-%if %with_esmtp
+%if %{with_esmtp}
%{_libdir}/collectd/notify_email.so
%{_libdir}/collectd/notify_email.la
%endif #with_esmtp
@@ -846,16 +818,15 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
%doc %{_mandir}/man5/types.db.5%{ext_man}
%doc %{perl_man3dir}/Collectd::Unixsock.%{perl_man3ext}%{ext_man}
%dir %{_localstatedir}/lib/collectd
-/usr/sbin/rccollectd
%if 0%{?has_systemd}
%{_unitdir}/collectd.service
%else
-/etc/init.d/collectd
+%{_initddir}/collectd
%endif
%files web
%defattr(-,root,root)
-%config(noreplace) /etc/apache2/conf.d/%{name}.conf
+%config(noreplace) %{_sysconfdir}/apache2/conf.d/%{name}.conf
%dir %{_sysconfdir}/collectd
%config(noreplace) %{_sysconfdir}/collectd/collection.conf
/srv/www/collectd
@@ -863,60 +834,54 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
%files web-js
%defattr(-,root,root)
%doc _rpmdoc_/web-js/README
-%config(noreplace) /etc/apache2/conf.d/%{name}-js.conf
+%config(noreplace) %{_sysconfdir}/apache2/conf.d/%{name}-js.conf
%dir %{_sysconfdir}/collectd
%config(noreplace) %{_sysconfdir}/collectd/collection-js.conf
/srv/www/collectd-js
-%{_usr}/lib/collectd-js
-
-%if %libnotify
+%{_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
-
+%if %{ipmi}
%files plugin-ipmi
%defattr(-,root,root)
%{_libdir}/collectd/ipmi.so
%{_libdir}/collectd/ipmi.la
%endif #ipmi
-%if %snmp
-
+%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
+%if %{with_snmp_plugin}
%{_libdir}/collectd/snmp.so
%{_libdir}/collectd/snmp.la
%doc %{_mandir}/man5/collectd-snmp.5%{ext_man}
%endif #with_snmp_plugin
%endif #snmp
-%if %protobuf
-
+%if %{protobuf}
%files plugin-pinba
%defattr(-,root,root)
%{_libdir}/collectd/pinba.so
%{_libdir}/collectd/pinba.la
%endif #protobuf
-%if %suse_version >= 930
-
+%if 0%{?suse_version} >= 930
%files plugin-mysql
%defattr(-,root,root)
%{_libdir}/collectd/mysql.so
%{_libdir}/collectd/mysql.la
%endif
-%if %with_pgsql
-
+%if %{with_pgsql}
%files plugin-postgresql
%defattr(-,root,root)
%{_libdir}/collectd/postgresql.so
@@ -931,7 +896,6 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
%doc %{_mandir}/man5/collectd-python.5%{ext_man}
%if %java
-
%files plugin-java
%defattr(-,root,root)
%doc _rpmdoc_/java/GenericJMX.conf
@@ -941,32 +905,28 @@ ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
%doc %{_mandir}/man5/collectd-java.5%{ext_man}
%endif #java
-%if %virt
-
+%if %{virt}
%files plugin-virt
%defattr(-,root,root)
%{_libdir}/collectd/libvirt.so
%{_libdir}/collectd/libvirt.la
%endif #virt
-%if %xmms
-
+%if %{xmms}
%files plugin-xmms
%defattr(-,root,root)
%{_libdir}/collectd/xmms.so
%{_libdir}/collectd/xmms.la
%endif #xmms
-%if %dbi
-
+%if %{dbi}
%files plugin-dbi
%defattr(-,root,root)
%{_libdir}/collectd/dbi.so
%{_libdir}/collectd/dbi.la
%endif #dbi
-%if %memcachec
-
+%if %{memcachec}
%files plugin-memcachec
%defattr(-,root,root)
%{_libdir}/collectd/memcachec.so