Code

RedHat RPM spec: update for 5.1 + improvements
authorMarc Fournier <marc.fournier@camptocamp.com>
Fri, 16 Nov 2012 15:06:18 +0000 (16:06 +0100)
committerRuben Kerkhof <ruben@tilaa.nl>
Sun, 18 Nov 2012 09:10:38 +0000 (10:10 +0100)
  * Enabled all buildable plugins based on libraries available on EL6 +
    EPEL
  * All plugins requiring external libraries are now shipped in seperate
    packages.
  * No longer treat Java plugin as an exception, correctly set
    $JAVA_HOME during the build process + ensure build deps are installed.
  * Dropped per-plugin configuration files, as they tend to diverge from
    upstream defaults.
  * Moved perl stuff to /usr/share/perl5/
  * Don't alter Interval and ReadThreads by default, let the user change
    this himself.
  * Drop collection.cgi from main package, as it's been obsoleted by
    collection3
  * Moved contrib/ to its own package, to avoid cluttering the main
    package with non-essential stuff.
  * Replaced BuildPrereq by BuildRequires

contrib/redhat/apache.conf [deleted file]
contrib/redhat/collectd.conf [deleted file]
contrib/redhat/collectd.spec
contrib/redhat/email.conf [deleted file]
contrib/redhat/mysql.conf [deleted file]
contrib/redhat/nginx.conf [deleted file]
contrib/redhat/sensors.conf [deleted file]
contrib/redhat/snmp.conf [deleted file]

diff --git a/contrib/redhat/apache.conf b/contrib/redhat/apache.conf
deleted file mode 100644 (file)
index e9c767a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-LoadPlugin apache
-#<Plugin apache>
-#      URL "http://localhost/status?auto"
-#      User "www-user"
-#      Password "secret"
-#      CACert "/etc/ssl/ca.crt"
-#</Plugin>
-
diff --git a/contrib/redhat/collectd.conf b/contrib/redhat/collectd.conf
deleted file mode 100644 (file)
index f8352ff..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-#
-# Config file for collectd(1).
-# Please read collectd.conf(5) for a list of options.
-# http://collectd.org/
-#
-
-#Hostname    "localhost"
-FQDNLookup   true
-BaseDir     "/var/lib/collectd"
-PIDFile     "/var/run/collectd.pid"
-PluginDir   "/usr/lib/collectd"
-TypesDB     "/usr/share/collectd/types.db"
-Interval     10
-ReadThreads  5
-
-LoadPlugin apcups
-#LoadPlugin apple_sensors
-LoadPlugin battery
-LoadPlugin conntrack
-LoadPlugin cpu
-LoadPlugin cpufreq
-LoadPlugin csv
-LoadPlugin df
-LoadPlugin disk
-LoadPlugin dns
-LoadPlugin entropy
-LoadPlugin exec
-LoadPlugin hddtemp
-LoadPlugin interface
-#LoadPlugin iptables
-#LoadPlugin ipvs
-LoadPlugin irq
-#LoadPlugin libvirt
-LoadPlugin load
-LoadPlugin logfile
-LoadPlugin mbmon
-LoadPlugin memcached
-LoadPlugin memory
-LoadPlugin multimeter
-#LoadPlugin netlink
-LoadPlugin network
-LoadPlugin nfs
-LoadPlugin ntpd
-#LoadPlugin nut
-LoadPlugin perl
-LoadPlugin ping
-LoadPlugin processes
-LoadPlugin rrdtool
-LoadPlugin serial
-LoadPlugin swap
-LoadPlugin syslog
-#LoadPlugin tape
-LoadPlugin tcpconns
-LoadPlugin unixsock
-LoadPlugin users
-LoadPlugin uuid
-LoadPlugin vserver
-LoadPlugin wireless
-#LoadPlugin xmms
-
-
-#<Plugin apcups>
-#      Host "localhost"
-#      Port "3551"
-#</Plugin>
-
-#<Plugin csv>
-#      DataDir "/usr/var/lib/collectd/csv"
-#      StoreRates false
-#</Plugin>
-
-#<Plugin df>
-#      Device "/dev/hda1"
-#      Device "192.168.0.2:/mnt/nfs"
-#      MountPoint "/home"
-#      FSType "ext3"
-#      IgnoreSelected false
-#</Plugin>
-
-#<Plugin dns>
-#      Interface "eth0"
-#      IgnoreSource "192.168.0.1"
-#</Plugin>
-
-#<Plugin exec>
-#      Exec "user:group" "/path/to/exec"
-#      NotificationExec "/path/to/exec"
-#</Plugin>
-
-#<Plugin hddtemp>
-#      Host "127.0.0.1"
-#      Port "7634"
-#      TranslateDevicename false
-#</Plugin>
-
-#<Plugin interface>
-#      Interface "eth0"
-#      IgnoreSelected false
-#</Plugin>
-
-#<Plugin iptables>
-#      Chain table chain
-#</Plugin>
-
-#<Plugin irq>
-#      Irq 7
-#      Irq 8
-#      Irq 9
-#      IgnoreSelected true
-#</Plugin>
-
-#<Plugin libvirt>
-#      Connection "xen:///"
-#      RefreshInterval 60
-#      Domain "name"
-#      BlockDevice "name:device"
-#      InterfaceDevice "name:device"
-#      IgnoreSelected false
-#      HostnameFormat name
-#</Plugin>
-
-#<Plugin logfile>
-#      LogLevel info
-#      File STDOUT
-#      Timestamp true
-#</Plugin>
-
-#<Plugin mbmon>
-#      Host "127.0.0.1"
-#      Port "411"
-#</Plugin>
-
-#<Plugin memcached>
-#      Host "127.0.0.1"
-#      Port "11211"
-#</Plugin>
-
-#<Plugin netlink>
-#      Interface "All"
-#      VerboseInterface "All"
-#      QDisc "eth0" "pfifo_fast-1:0"
-#      Class "ppp0" "htb-1:10"
-#      Filter "ppp0" "u32-1:0"
-#      IgnoreSelected false
-#</Plugin>
-
-#<Plugin network>
-#      Server "ff18::efc0:4a42" "25826"
-#      Server "239.192.74.66" "25826"
-#      Listen "ff18::efc0:4a42" "25826"
-#      Listen "239.192.74.66" "25826"
-#      TimeToLive "128"
-#      Forward false
-#      CacheFlush 1800
-#</Plugin>
-
-#<Plugin ntpd>
-#      Host "localhost"
-#      Port 123
-#      ReverseLookups false
-#</Plugin>
-
-#<Plugin nut>
-#      UPS "upsname@hostname:port"
-#</Plugin>
-
-#<Plugin perl>
-#      IncludeDir "/my/include/path"
-#      BaseName "Collectd::Plugin"
-#      EnableDebugger ""
-#      LoadPlugin foo
-#</Plugin>
-
-#<Plugin ping>
-#      Host "host.foo.bar"
-#      TTL 255
-#</Plugin>
-
-#<Plugin processes>
-#      Process "name"
-#</Plugin>
-
-#<Plugin rrdtool>
-#      DataDir "/usr/var/lib/collectd/rrd"
-#      CacheTimeout 120
-#      CacheFlush   900
-#</Plugin>
-
-#<Plugin syslog>
-#      LogLevel info
-#</Plugin>
-
-#<Plugin tcpconns>
-#      ListeningPorts false
-#      LocalPort "25"
-#      RemotePort "25"
-#</Plugin>
-
-#<Plugin unixsock>
-#      SocketFile "/usr/var/run/collectd-unixsock"
-#      SocketGroup "collectd"
-#      SocketPerms "0660"
-#</Plugin>
-
-#<Plugin uuid>
-#      UUIDFile "/etc/uuid"
-#</Plugin>
-
-Include "/etc/collectd.d"
-
index 6eefac9d9efd2cb04d237cb9c0fc00906060adab..0a0e81b78c2620a47aaba0893b6bf72fb210a785 100644 (file)
@@ -1,18 +1,16 @@
 
-%define with_java %(test -z "$JAVA_HOME" ; echo $?)
-
 Summary:       Statistics collection daemon for filling RRD files.
 Name:          collectd
-Version:       5.0.1
+Version:       5.1.0
 Release:       1%{?dist}
 Source:                http://collectd.org/files/%{name}-%{version}.tar.gz
 License:       GPL
 Group:         System Environment/Daemons
 BuildRoot:     %{_tmppath}/%{name}-%{version}-root
-BuildPrereq:   lm_sensors-devel, rrdtool-devel, libpcap-devel, net-snmp-devel, libstatgrab-devel, libxml2-devel, libiptcdata-devel
+BuildRequires: rrdtool-devel, libstatgrab-devel, libxml2-devel, libiptcdata-devel, libgcrypt-devel, kernel-headers
 # libcurl deps
-BuildPrereq:   curl-devel,libidn-devel,openssl-devel
-Requires:      rrdtool, perl-Regexp-Common, libstatgrab
+BuildRequires: curl-devel, libidn-devel, openssl-devel
+Requires:      libstatgrab, libgcrypt
 Packager:      RightScale <support@rightscale.com>
 Vendor:                collectd development team <collectd@verplant.org>
 
@@ -24,6 +22,14 @@ every time it wants to update the values it's very fast and easy on the
 system. Also, the statistics are very fine grained since the files are updated
 every 10 seconds.
 
+%package amqp
+Summary:       amqp-module for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, librabbitmq
+BuildRequires: librabbitmq-devel
+%description amqp
+The AMQP plugin transmits or receives values collected by collectd via the
+Advanced Message Queuing Protocol (AMQP).
 
 %package apache
 Summary:       apache-plugin for collectd.
@@ -32,6 +38,67 @@ Requires:    collectd = %{version}, curl
 %description apache
 This plugin collects data provided by Apache's `mod_status'.
 
+%package ascent
+Summary:       ascent-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, curl, libxml2
+%description ascent
+The Ascent plugin reads and parses the statistics page of Ascent, a free and
+open-source server software for the game World of Warcraft by Blizzard
+Entertainment.
+
+%package bind
+Summary:       bind-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, curl, libxml2
+%description bind
+The BIND plugin retrieves this information that's encoded in XML and provided
+via HTTP and submits the values to collectd.
+
+%package curl
+Summary:       curl-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, curl
+%description curl
+The cURL plugin uses libcurl to read files and then parses them according to
+the configuration.
+
+%package curl_json
+Summary:       curl_json-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, curl, yajl
+Buildrequires: yajl-devel
+%description curl_json
+The cURL-JSON plugin queries JavaScript Object Notation (JSON) data using the
+cURL library and parses it according to the user's configuration.
+
+%package curl_xml
+Summary:       curl_xml-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, curl, libxml2
+%description curl_xml
+The cURL-XML plugin reads files using libcurl and parses it as Extensible
+Markup Language (XML).
+
+%package dns
+Summary:       dns-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, libpcap
+Buildrequires: libpcap-devel
+%description dns
+The DNS plugin has a similar functionality to dnstop: It uses libpcap to get a
+copy of all traffic from/to port UDP/53 (that's the DNS port), interprets the
+packets and collects statistics of your DNS traffic.
+
+%package dbi
+Summary:       dbi-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, libdbi
+Buildrequires: libdbi-devel
+%description dbi
+The DBI plugin uses libdbi, a database abstraction library, to execute SQL
+statements on a database and read back the result.
+
 %package email
 Summary:       email-plugin for collectd.
 Group:         System Environment/Daemons
@@ -39,10 +106,73 @@ Requires:  collectd = %{version}, spamassassin
 %description email
 This plugin collects data provided by spamassassin.
 
+%package gmond
+Summary:       gmond-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, ganglia
+BuildRequires: ganglia-devel
+%description gmond
+The gmond plugin subscribes to a Multicast group to receive data from gmond,
+the client daemon of the Ganglia project.
+
+%package hddtemp
+Summary:       hddtemp-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, hddtemp
+%description hddtemp
+The HDDTemp plugin collects the temperature of hard disks. The temperatures are
+provided via SMART and queried by the external hddtemp daemon.
+
+%package ipmi
+Summary:       ipmi-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, OpenIPMI-libs
+BuildRequires: OpenIPMI-devel
+%description ipmi
+The IPMI plugin uses the OpenIPMI library to read hardware sensors from servers
+using the Intelligent Platform Management Interface (IPMI).
+
+%package iptables
+Summary:       iptables-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, iptables-devel
+BuildRequires: iptables-devel
+%description iptables
+The IP-Tables plugin can gather statistics from your ip_tables based packet
+filter (aka. firewall) for both the IPv4 and the IPv6 protocol. It can collect
+the byte- and packet-counters of selected rules and submit them to collectd.
+
+%package java
+Summary:       java-module for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, libjvm.so
+BuildRequires: java-1.7.0-openjdk-devel
+%description java
+This plugin for collectd allows plugins to be written in Java and executed
+in an embedded JVM.
+
+%package libvirt
+Summary:       libvirt-module for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, libvirt, libxml2
+BuildRequires: libvirt-devel
+%description libvirt
+
+%package memcachec
+Summary:       memcachec-module for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, libmemcached
+BuildRequires: libmemcached-devel
+%description memcachec
+The Memcachec plugin uses libmemcached to read statistics from a Memcached
+instance. Note that another plugin, named `memcached', exists and does a
+similar job, without requiring the installation of libmemcached.
+
 %package mysql
 Summary:       mysql-module for collectd.
 Group:         System Environment/Daemons
 Requires:      collectd = %{version}, mysql
+BuildRequires: mysql-devel
 %description mysql
 MySQL querying plugin. This plugins provides data of issued commands, called
 handlers and database traffic.
@@ -54,10 +184,88 @@ Requires:  collectd = %{version}, curl
 %description nginx
 This plugin gets data provided by nginx.
 
+%package notify_desktop
+Summary:       notify_desktop-module for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, libnotify
+BuildRequires: libnotify-devel
+%description notify_desktop
+The Notify Desktop plugin uses libnotify to display notifications to the user
+via the desktop notification specification, i. e. on an X display.
+
+%package notify_email
+Summary:       notify_email-module for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, libesmtp
+BuildRequires: libesmtp-devel
+%description notify_email
+The Notify Email plugin uses libESMTP to send notifications to a configured
+email address(es).
+
+%package nut
+Summary:       nut-module for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, nut-client
+BuildRequires: nut-devel
+%description nut
+
+%package perl
+Summary:       perl-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, perl
+BuildRequires: perl-ExtUtils-Embed
+%description perl
+The Perl plugin embeds a Perl interpreter into collectd and exposes the
+application programming interface (API) to Perl-scripts.
+
+%package pinba
+Summary:       pinba-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, protobuf-c
+BuildRequires: protobuf-c-devel
+%description pinba
+The Pinba plugin receives and dispatches timing values from Pinba, a profiling
+extension for PHP.
+
+%package ping
+Summary:       ping-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, liboping
+BuildRequires: liboping-devel
+%description ping
+The Ping plugin measures network latency using ICMP “echo requests”, usually
+known as “ping”.
+
+%package postgresql
+Summary:       postgresql-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, postgresql-libs
+BuildRequires: postgresql-devel
+%description postgresql
+The PostgreSQL plugin connects to and executes SQL statements on a PostgreSQL
+database.
+
+%package python
+Summary:       python-plugin for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, python
+BuildRequires: python-devel
+%description python
+The Python plugin embeds a Python interpreter into collectd and exposes the
+application programming interface (API) to Python-scripts.
+
+%package rrdtool
+Summary:       librrdtool-module for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, rrdtool
+%description rrdtool
+The RRDtool plugin writes values to RRD-files using librrd.
+
 %package sensors
-Summary:       libsensors-module for collectd.
+Summary:       sensors-module for collectd.
 Group:         System Environment/Daemons
 Requires:      collectd = %{version}, lm_sensors
+BuildRequires: lm_sensors-devel
 %description sensors
 This plugin for collectd provides querying of sensors supported by lm_sensors.
 
@@ -65,37 +273,46 @@ This plugin for collectd provides querying of sensors supported by lm_sensors.
 Summary:       snmp-module for collectd.
 Group:         System Environment/Daemons
 Requires:      collectd = %{version}, net-snmp
+BuildRequires: net-snmp-devel
 %description snmp
 This plugin for collectd allows querying of network equipment using SNMP.
 
-%if %with_java
-%package java
-Summary:       java-module for collectd.
+%package varnish
+Summary:       varnish-module for collectd.
 Group:         System Environment/Daemons
-Requires:      collectd = %{version}, jdk >= 1.6
-BuildPrereq:   jdk >= 1.6
-%description java
-This plugin for collectd allows plugins to be written in Java and executed
-in an embedded JVM.
-%endif
+Requires:      collectd = %{version}, varnish-libs
+BuildRequires: varnish-libs-devel
+%description varnish
+The Varnish plugin collects information about Varnish, an HTTP accelerator.
+
+%package write_http
+Summary:       write_http-module for collectd.
+Group:         System Environment/Daemons
+Requires:      collectd = %{version}, curl
+%description write_http
+The Write HTTP plugin sends the values collected by collectd to a web-server
+using HTTP POST requests.
+
+%package contrib
+Summary:       contrib files for collectd.
+Group:         System Environment/Daemons
+%description contrib
+All the files found under contrib/ in the source tree are bundled in this
+package.
 
 %prep
 rm -rf $RPM_BUILD_ROOT
 %setup
 
 %build
-./configure CFLAGS=-"DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL'" --prefix=%{_prefix} --sbindir=%{_sbindir} --mandir=%{_mandir} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} \
-    %{!?with_java:"--with-java=$JAVA_HOME --enable-java"} \
-    --disable-battery
+export JAVA_HOME="/usr"
+./configure CFLAGS=-"DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL'" --prefix=%{_prefix} --sbindir=%{_sbindir} --mandir=%{_mandir} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir}
 make
 
 %install
 make install DESTDIR=$RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
-mkdir -p $RPM_BUILD_ROOT/var/www/cgi-bin
 cp contrib/redhat/init.d-collectd $RPM_BUILD_ROOT/etc/rc.d/init.d/collectd
-cp contrib/collection.cgi $RPM_BUILD_ROOT/var/www/cgi-bin
-mkdir -p $RPM_BUILD_ROOT/etc/collectd.d
 mkdir -p $RPM_BUILD_ROOT/var/lib/collectd
 ### Clean up docs
 find contrib/ -type f -exec %{__chmod} a-x {} \;
@@ -105,18 +322,6 @@ sed -i 's:#BaseDir     "/usr/var/lib/collectd":BaseDir     "/var/lib/collectd":'
 sed -i 's:#PIDFile     "/usr/var/run/collectd.pid":PIDFile     "/var/run/collectd.pid":' $RPM_BUILD_ROOT/etc/collectd.conf
 sed -i 's:#PluginDir   "/usr/lib/collectd":PluginDir   "%{_libdir}/collectd":' $RPM_BUILD_ROOT/etc/collectd.conf
 sed -i 's:#TypesDB     "/usr/share/collectd/types.db":TypesDB     "/usr/share/collectd/types.db":' $RPM_BUILD_ROOT/etc/collectd.conf
-sed -i 's:#Interval     10:Interval     30:' $RPM_BUILD_ROOT/etc/collectd.conf
-sed -i 's:#ReadThreads  5:ReadThreads  5:' $RPM_BUILD_ROOT/etc/collectd.conf
-###Include broken out config directory
-echo -e '\nInclude "/etc/collectd.d"' >> $RPM_BUILD_ROOT/etc/collectd.conf
-
-##Move config contribs
-cp contrib/redhat/apache.conf $RPM_BUILD_ROOT/etc/collectd.d/apache.conf
-cp contrib/redhat/email.conf $RPM_BUILD_ROOT/etc/collectd.d/email.conf
-cp contrib/redhat/sensors.conf $RPM_BUILD_ROOT/etc/collectd.d/sensors.conf
-cp contrib/redhat/mysql.conf $RPM_BUILD_ROOT/etc/collectd.d/mysql.conf
-cp contrib/redhat/nginx.conf $RPM_BUILD_ROOT/etc/collectd.d/nginx.conf
-cp contrib/redhat/snmp.conf $RPM_BUILD_ROOT/etc/collectd.d/snmp.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -141,17 +346,19 @@ exit 0
 
 %files
 %defattr(-,root,root)
-%doc AUTHORS COPYING ChangeLog INSTALL NEWS README contrib/
+%exclude %{_mandir}/man5/collectd-java*
+%exclude %{_mandir}/man5/collectd-perl*
+%exclude %{_mandir}/man5/collectd-python*
+%exclude %{_mandir}/man5/collectd-snmp*
+%doc AUTHORS COPYING ChangeLog INSTALL NEWS README
 %config %attr(0644,root,root) /etc/collectd.conf
 %attr(0755,root,root) /etc/rc.d/init.d/collectd
-%attr(0755,root,root) /var/www/cgi-bin/collection.cgi
 %attr(0755,root,root) %{_sbindir}/collectd
 %attr(0755,root,root) %{_bindir}/collectd-nagios
 %attr(0755,root,root) %{_bindir}/collectdctl
 %attr(0755,root,root) %{_sbindir}/collectdmon
 %attr(0644,root,root) %{_mandir}/man1/*
 %attr(0644,root,root) %{_mandir}/man5/*
-%dir /etc/collectd.d
 
 # client
 %attr(0644,root,root) /usr/include/collectd/client.h
@@ -166,73 +373,63 @@ exit 0
 %attr(0644,root,root) %{_libdir}/%{name}/%1.so* \
 %attr(0644,root,root) %{_libdir}/%{name}/%1.la
 
+# all plugins bundled with the main collectd package
 %plugin_macro apcups
-%plugin_macro ascent
-%plugin_macro bind
+%plugin_macro battery
 %plugin_macro conntrack
 %plugin_macro contextswitch
 %plugin_macro cpufreq
 %plugin_macro cpu
 %plugin_macro csv
-%plugin_macro curl
-%plugin_macro curl_xml
 %plugin_macro df
 %plugin_macro disk
-%plugin_macro dns
+%plugin_macro ethstat
 %plugin_macro entropy
 %plugin_macro email
 %plugin_macro exec
 %plugin_macro filecount
 %plugin_macro fscache
-%plugin_macro hddtemp
 %plugin_macro interface
 %plugin_macro iptables
+%plugin_macro ipvs
 %plugin_macro irq
 %plugin_macro load
 %plugin_macro logfile
 %plugin_macro madwifi
-
 %plugin_macro match_empty_counter
 %plugin_macro match_hashed
 %plugin_macro match_regex
 %plugin_macro match_timediff
 %plugin_macro match_value
-
 %plugin_macro mbmon
-%plugin_macro memcachec
+%plugin_macro md
 %plugin_macro memcached
 %plugin_macro memory
 %plugin_macro multimeter
 %plugin_macro network
 %plugin_macro nfs
 %plugin_macro ntpd
+%plugin_macro numa
 %plugin_macro openvpn
 %plugin_macro olsrd
-%plugin_macro perl
 %plugin_macro powerdns
 %plugin_macro processes
 %plugin_macro protocols
-%plugin_macro python
-%plugin_macro rrdtool
 %plugin_macro serial
-%plugin_macro sensors
 %plugin_macro swap
 %plugin_macro syslog
 %plugin_macro table
 %plugin_macro tail
-
 %plugin_macro target_notification
 %plugin_macro target_replace
 %plugin_macro target_scale
 %plugin_macro target_set
 %plugin_macro target_v5upgrade
-
 %plugin_macro tcpconns
 %plugin_macro teamspeak2
 %plugin_macro ted
 %plugin_macro thermal
 %plugin_macro threshold
-
 %plugin_macro unixsock
 %plugin_macro uptime
 %plugin_macro users
@@ -240,55 +437,163 @@ exit 0
 %plugin_macro vmem
 %plugin_macro vserver
 %plugin_macro wireless
-%plugin_macro write_http
+%plugin_macro write_graphite
+
+# All plugins not built because of dependencies on libraries not available in
+# RHEL or EPEL:
+# plugin modbus disabled, requires libmodbus
+# plugin netlink disabled, requires libnetlink.h
+# plugin numa disabled, requires libnetapp
+# plugin onewire disabled, requires libowfs
+# plugin oracle disabled, requires Oracle
+# plugin redis disabled, requires credis
+# plugin routeros disabled, requires librouteros
+# plugin rrdcached disabled, requires rrdtool >= 1.4
+# plugin tokyotyrant disabled, requires tcrdb.h
+# plugin write_mongodb disabled, requires libmongoc
+# plugin write_redis disabled, requires credis
+# plugin xmms disabled, requires xmms
 
 %attr(0644,root,root) %{_datadir}/%{name}/types.db
 
-%exclude %{_libdir}/perl5/5.8.8/%{_arch}-linux-thread-multi/perllocal.pod
-%attr(0644,root,root) %{_libdir}/perl5/site_perl/5.8.8/%{_arch}-linux-thread-multi/auto/Collectd/.packlist
-%attr(0644,root,root) /usr/lib/perl5/site_perl/5.8.8/Collectd.pm
-%attr(0644,root,root) /usr/lib/perl5/site_perl/5.8.8/Collectd/Unixsock.pm
-%attr(0644,root,root) /usr/lib/perl5/site_perl/5.8.8/Collectd/Plugins/OpenVZ.pm
-%attr(0644,root,root) /usr/lib/perl5/site_perl/5.8.8/Collectd/Plugins/Monitorus.pm
-%attr(0644,root,root) /usr/share/man/man3/Collectd::Unixsock.3pm.gz
-
-%exclude /usr/share/collectd/postgresql_default.conf
-
 %dir /var/lib/collectd
 
-%if %with_java
-%files java
-/usr/share/collectd/java/collectd-api.jar
-/usr/share/collectd/java/generic-jmx.jar
-%plugin_macro java
-%endif
+%files amqp
+%plugin_macro amqp
 
 %files apache
-%config %attr(0644,root,root) /etc/collectd.d/apache.conf
 %plugin_macro apache
 
+%files ascent
+%plugin_macro ascent
+
+%files bind
+%plugin_macro bind
+
+%files curl
+%plugin_macro curl
+
+%files curl_json
+%plugin_macro curl_json
+
+%files curl_xml
+%plugin_macro curl_xml
+
+%files dns
+%plugin_macro dns
+
+%files dbi
+%plugin_macro dbi
+
 %files email
-%attr(0644,root,root) %{_libdir}/%{name}/email.so*
-%attr(0644,root,root) %{_libdir}/%{name}/email.la
-%config %attr(0644,root,root) /etc/collectd.d/email.conf
+%plugin_macro email
+
+%files gmond
+%plugin_macro gmond
+
+%files hddtemp
+%plugin_macro hddtemp
+
+%files ipmi
+%plugin_macro ipmi
+
+%files iptables
+%plugin_macro iptables
+
+%files java
+%attr(0644,root,root) /usr/share/man/man5/collectd-java.5.gz
+%attr(0644,root,root) /usr/share/collectd/java/collectd-api.jar
+%attr(0644,root,root) /usr/share/collectd/java/generic-jmx.jar
+%plugin_macro java
+
+%files libvirt
+%plugin_macro libvirt
+
+%files memcachec
+%plugin_macro memcachec
 
 %files mysql
-%config %attr(0644,root,root) /etc/collectd.d/mysql.conf
 %plugin_macro mysql
 
 %files nginx
-%config %attr(0644,root,root) /etc/collectd.d/nginx.conf
 %plugin_macro nginx
 
+%files notify_desktop
+%plugin_macro notify_desktop
+
+%files notify_email
+%plugin_macro notify_email
+
+%files nut
+%plugin_macro nut
+
+%files perl
+%exclude %{_libdir}/perl5/perllocal.pod
+%attr(0644,root,root) %{_libdir}/perl5/auto/Collectd/.packlist
+%attr(0644,root,root) /usr/share/perl5/Collectd.pm
+%attr(0644,root,root) /usr/share/perl5/Collectd/Unixsock.pm
+%attr(0644,root,root) /usr/share/perl5/Collectd/Plugins/OpenVZ.pm
+%attr(0644,root,root) /usr/share/perl5/Collectd/Plugins/Monitorus.pm
+%attr(0644,root,root) /usr/share/man/man3/Collectd::Unixsock.3pm.gz
+%attr(0644,root,root) /usr/share/man/man5/collectd-perl.5.gz
+%plugin_macro perl
+
+%files pinba
+%plugin_macro pinba
+
+%files ping
+%plugin_macro ping
+
+%files postgresql
+/usr/share/collectd/postgresql_default.conf
+%plugin_macro postgresql
+
+%files python
+%attr(0644,root,root) /usr/share/man/man5/collectd-python.5.gz
+%plugin_macro python
+
+%files rrdtool
+%plugin_macro rrdtool
+
 %files sensors
-%attr(0644,root,root) %{_libdir}/%{name}/sensors.so*
-%attr(0644,root,root) %{_libdir}/%{name}/sensors.la
-%config %attr(0644,root,root) /etc/collectd.d/sensors.conf
+%plugin_macro sensors
 
 %files snmp
-%attr(0644,root,root) /etc/collectd.d/snmp.conf
+%attr(0644,root,root) /usr/share/man/man5/collectd-snmp.5.gz
 %plugin_macro snmp
 
+%files varnish
+%plugin_macro varnish
+
+%files write_http
+%plugin_macro write_http
+
+%files contrib
+%doc contrib/
+
+%changelog
+* Fri Nov 16 2012 Marc Fournier <marc.fournier@camptocamp.com> 5.1.0
+- New upstream version
+- Changes to support 5.1.0
+- Enabled all buildable plugins based on libraries available on EL6 + EPEL
+- All plugins requiring external libraries are now shipped in seperate
+  packages.
+- No longer treat Java plugin as an exception, correctly set $JAVA_HOME during
+  the build process + ensure build deps are installed.
+- Dropped per-plugin configuration files, as they tend to diverge from upstream
+  defaults.
+- Moved perl stuff to /usr/share/perl5/
+- Don't alter Interval and ReadThreads by default, let the user change this
+  himself.
+- Initscript improvements:
+  * checks configuration before (re)starting, based on debian's initscript
+  * use /etc/sysconfig instdead of /etc/default
+  * include optional $ARGS in arguments passed to collectd.
+- Drop collection.cgi from main package, as it's been obsoleted by collection3
+- Moved contrib/ to its own package, to avoid cluttering the main package with
+  non-essential stuff.
+- Replaced BuildPrereq by BuildRequires
+
 %changelog
 * Tue Jan 03 2011 Monetate <jason.stelzer@monetate.com> 5.0.1
 - New upstream version
diff --git a/contrib/redhat/email.conf b/contrib/redhat/email.conf
deleted file mode 100644 (file)
index 6f2caba..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-LoadPlugin email
-#<Plugin email>
-#      SocketFile "/usr/var/run/collectd-email"
-#      SocketGroup "collectd"
-#      SocketPerms "0770"
-#      MaxConns 5
-#</Plugin>
-
diff --git a/contrib/redhat/mysql.conf b/contrib/redhat/mysql.conf
deleted file mode 100644 (file)
index ad87557..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-LoadPlugin mysql
-
-#<Plugin mysql>
-#      Host "database.serv.er"
-#      User "db_user"
-#      Password "secret"
-#      Database "db_name"
-#</Plugin>
-
diff --git a/contrib/redhat/nginx.conf b/contrib/redhat/nginx.conf
deleted file mode 100644 (file)
index 56ce35d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-LoadPlugin nginx
-
-#<Plugin nginx>
-#      URL "http://localhost/status?auto"
-#      User "www-user"
-#      Password "secret"
-#      CACert "/etc/ssl/ca.crt"
-#</Plugin>
diff --git a/contrib/redhat/sensors.conf b/contrib/redhat/sensors.conf
deleted file mode 100644 (file)
index 82455f8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-LoadPlugin sensors
-
-#<Plugin sensors>
-#      Sensor "it8712-isa-0290/temperature-temp1"
-#      Sensor "it8712-isa-0290/fanspeed-fan3"
-#      Sensor "it8712-isa-0290/voltage-in8"
-#      IgnoreSelected false
-#</Plugin>
-
diff --git a/contrib/redhat/snmp.conf b/contrib/redhat/snmp.conf
deleted file mode 100644 (file)
index e13833c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-LoadPlugin snmp
-
-#<Plugin snmp>
-#   <Data "powerplus_voltge_input">
-#       Type "voltage"
-#       Table false
-#       Instance "input_line1"
-#       Values "SNMPv2-SMI::enterprises.6050.5.4.1.1.2.1"
-#   </Data>
-#   <Data "hr_users">
-#       Type "users"
-#       Table false
-#       Instance ""
-#       Values "HOST-RESOURCES-MIB::hrSystemNumUsers.0"
-#   </Data>
-#   <Data "std_traffic">
-#       Type "if_octets"
-#       Table true
-#       Instance "IF-MIB::ifDescr"
-#       Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets"
-#   </Data>
-#   
-#   <Host "some.switch.mydomain.org">
-#       Address "192.168.0.2"
-#       Version 1
-#       Community "community_string"
-#       Collect "std_traffic"
-#       Inverval 120
-#   </Host>
-#   <Host "some.server.mydomain.org">
-#       Address "192.168.0.42"
-#       Version 2
-#       Community "another_string"
-#       Collect "std_traffic" "hr_users"
-#   </Host>
-#   <Host "some.ups.mydomain.org">
-#       Address "192.168.0.3"
-#       Version 1
-#       Community "more_communities"
-#       Collect "powerplus_voltge_input"
-#       Interval 300
-#   </Host>
-#</Plugin>
-