X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=contrib%2Fredhat%2Fcollectd.spec;h=f78300f4045de259660626937b87334202e8ed9e;hb=b6788b6e5c560bd61243de4cf2963a2822b5324a;hp=2379c8d5b1944aa0677c3434e3d1ba5532d98b6c;hpb=296fec5ad60587485013993c5f5aad2a38834049;p=collectd.git diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec index 2379c8d5..f78300f4 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -1,7 +1,7 @@ # # q: What is this ? # a: A specfile for building RPM packages of current collectd releases, for -# RHEL/CentOS versions 5 and 6. By default all the plugins which are +# RHEL/CentOS versions 5, 6 and 7. By default all the plugins which are # buildable based on the libraries available in the distribution + the # EPEL repository, will be built. Plugins depending on external libs will # be packaged in separate RPMs. @@ -14,10 +14,12 @@ # - enable the EPEL repository (http://dl.fedoraproject.org/pub/epel/) in the # configuration files for your target systems (/etc/mock/*.cfg). # -# - copy this file in your ~/rpmbuild/SPECS/ directory -# # - fetch the desired collectd release file from https://collectd.org/files/ -# and save it in your ~/rpmbuild/SOURCES/ directory +# and save it in your ~/rpmbuild/SOURCES/ directory (or build your own out of +# the git repository: ./build.sh && ./configure && make-dist-bz2) +# +# - copy this file in your ~/rpmbuild/SPECS/ directory. Make sure the +# "Version:" tag matches the version from the tarball. # # - build the SRPM first: # mock -r centos-6-x86_64 --buildsrpm --spec ~/rpmbuild/SPECS/collectd.spec \ @@ -34,6 +36,7 @@ # %global _hardened_build 1 +%{?perl_default_filter} # plugins only buildable on RHEL6 # (NB: %{elN} macro is not available on RHEL < 6) @@ -44,7 +47,20 @@ %{?el6:%global _has_working_libiptc 1} %{?el6:%global _has_ip_vs_h 1} %{?el6:%global _has_lvm2app_h 1} -%{?el6:%global _has_perl_extutils_embed 1} +%{?el6:%global _has_libmodbus 1} +%{?el6:%global _has_iproute 1} + +%{?el7:%global _has_libyajl 1} +%{?el7:%global _has_recent_libpcap 1} +%{?el7:%global _has_recent_sockios_h 1} +%{?el7:%global _has_working_libiptc 1} +%{?el7:%global _has_ip_vs_h 1} +%{?el7:%global _has_lvm2app_h 1} +%{?el7:%global _has_recent_librrd 1} +%{?el7:%global _has_varnish4 1} +%{?el7:%global _has_iproute 1} +%{?el7:%global _has_libmodbus 1} +%{?el7:%global _has_xmms 1} # plugins enabled by default %define with_aggregation 0%{!?_without_aggregation:1} @@ -92,8 +108,9 @@ %define with_memcached 0%{!?_without_memcached:1} %define with_memory 0%{!?_without_memory:1} %define with_multimeter 0%{!?_without_multimeter:1} +%define with_modbus 0%{!?_without_modbus:0%{?_has_libmodbus}} %define with_mysql 0%{!?_without_mysql:1} -%define with_netlink 0%{!?_without_netlink:1} +%define with_netlink 0%{!?_without_netlink:0%{?_has_iproute}} %define with_network 0%{!?_without_network:1} %define with_nfs 0%{!?_without_nfs:1} %define with_nginx 0%{!?_without_nginx:1} @@ -104,7 +121,7 @@ %define with_nut 0%{!?_without_nut:1} %define with_olsrd 0%{!?_without_olsrd:1} %define with_openvpn 0%{!?_without_openvpn:1} -%define with_perl 0%{!?_without_perl:0%{?_has_perl_extutils_embed}} +%define with_perl 0%{!?_without_perl:1} %define with_pinba 0%{!?_without_pinba:1} %define with_ping 0%{!?_without_ping:1} %define with_postgresql 0%{!?_without_postgresql:1} @@ -112,6 +129,7 @@ %define with_processes 0%{!?_without_processes:1} %define with_protocols 0%{!?_without_protocols:1} %define with_python 0%{!?_without_python:1} +%define with_rrdcached 0%{!?_without_rrdcached:0%{?_has_recent_librrd}} %define with_rrdtool 0%{!?_without_rrdtool:1} %define with_sensors 0%{!?_without_sensors:1} %define with_serial 0%{!?_without_serial:1} @@ -131,13 +149,14 @@ %define with_uptime 0%{!?_without_uptime:1} %define with_users 0%{!?_without_users:1} %define with_uuid 0%{!?_without_uuid:1} -%define with_varnish 0%{!?_without_varnish:1} +%define with_varnish 0%{!?_without_varnish:0%{!?_has_varnish4:1}} %define with_vmem 0%{!?_without_vmem:1} %define with_vserver 0%{!?_without_vserver:1} %define with_wireless 0%{!?_without_wireless:1} %define with_write_graphite 0%{!?_without_write_graphite:1} %define with_write_http 0%{!?_without_write_http:1} %define with_write_riemann 0%{!?_without_write_riemann:1} +%define with_xmms 0%{!?_without_xmms:0%{?_has_xmms}} # Plugins not built by default because of dependencies on libraries not # available in RHEL or EPEL: @@ -150,8 +169,6 @@ %define with_lpar 0%{!?_without_lpar:0} # plugin mic disabled, requires Mic %define with_mic 0%{!?_without_mic:0} -# plugin modbus disabled, requires libmodbus -%define with_modbus 0%{!?_without_modbus:0} # plugin netapp disabled, requires libnetapp %define with_netapp 0%{!?_without_netapp:0} # plugin onewire disabled, requires libowfs @@ -164,8 +181,6 @@ %define with_redis 0%{!?_without_redis:0} # plugin routeros disabled, requires librouteros %define with_routeros 0%{!?_without_routeros:0} -# plugin rrdcached disabled, requires rrdtool >= 1.4 -%define with_rrdcached 0%{!?_without_rrdcached:0} # plugin sigrok disabled, requires libsigrok %define with_sigrok 0%{!?_without_sigrok:0} # plugin tape disabled, requires libkstat @@ -176,21 +191,19 @@ %define with_write_mongodb 0%{!?_without_write_mongodb:0} # plugin write_redis disabled, requires credis %define with_write_redis 0%{!?_without_write_redis:0} -# plugin xmms disabled, requires xmms -%define with_xmms 0%{!?_without_xmms:0} # plugin zfs_arc disabled, requires FreeBSD/Solaris %define with_zfs_arc 0%{!?_without_zfs_arc:0} -Summary: Statistics collection daemon for filling RRD files +Summary: statistics collection and monitoring daemon Name: collectd -Version: 5.4.0 +Version: 5.4.3 Release: 1%{?dist} -URL: http://collectd.org -Source: http://collectd.org/files/%{name}-%{version}.tar.bz2 +URL: https://collectd.org +Source: https://collectd.org/files/%{name}-%{version}.tar.bz2 License: GPLv2 Group: System Environment/Daemons BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: libgcrypt-devel, kernel-headers +BuildRequires: libgcrypt-devel, kernel-headers, libtool-ltdl-devel Vendor: collectd development team Requires(post): chkconfig @@ -422,6 +435,16 @@ The mic plugin collects CPU usage, memory usage, temperatures and power consumption from Intel Many Integrated Core (MIC) CPUs. %endif +%if %{with_modbus} +%package modbus +Summary: modbus plugin for collectd +Group: System Environment/Daemons +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: libmodbus-devel +%description modbus +The modbus plugin collects values from Modbus/TCP enabled devices +%endif + %if %{with_mysql} %package mysql Summary: MySQL plugin for collectd @@ -438,10 +461,9 @@ handlers and database traffic. Summary: netlink plugin for collectd Group: System Environment/Daemons Requires: %{name}%{?_isa} = %{version}-%{release} -BuildRequires: libmnl-devel +BuildRequires: libmnl-devel, iproute-devel %description netlink -This plugin collects very detailed Linux network interface and routing -statistics. +The netlink plugin collects detailed network interface and routing statistics. %endif %if %{with_nginx} @@ -492,7 +514,11 @@ Summary: Perl plugin for collectd Group: System Environment/Daemons Requires: %{name}%{?_isa} = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +%if 0%{?rhel} >= 6 BuildRequires: perl-ExtUtils-Embed +%else +BuildRequires: perl +%endif %description perl The Perl plugin embeds a Perl interpreter into collectd and exposes the application programming interface (API) to Perl-scripts. @@ -650,6 +676,16 @@ BuildRequires: protobuf-c-devel The riemann plugin submits values to Riemann, an event stream processor. %endif +%if %{with_xmms} +%package xmms +Summary: XMMS plugin for collectd +Group: System Environment/Daemons +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: xmms-devel +%description xmms +The xmms plugin collects information from the XMMS music player. +%endif + %package collection3 Summary: Web-based viewer for collectd Group: System Environment/Daemons @@ -808,7 +844,7 @@ Development files for libcollectdclient %if %{with_dbi} %define _with_dbi --enable-dbi %else -%define _with_dbi --disable-dbi --without-libdbi +%define _with_dbi --disable-dbi %endif %if %{with_df} @@ -1042,7 +1078,7 @@ Development files for libcollectdclient %if %{with_notify_email} %define _with_notify_email --enable-notify_email %else -%define _with_notify_email --disable-notify_email --without-libesmpt +%define _with_notify_email --disable-notify_email %endif %if %{with_ntpd} @@ -1090,7 +1126,7 @@ Development files for libcollectdclient %if %{with_perl} %define _with_perl --enable-perl --with-perl-bindings="INSTALLDIRS=vendor" %else -%define _with_perl --disable-perl --without-libperl +%define _with_perl --disable-perl %endif %if %{with_pf} @@ -1334,13 +1370,13 @@ Development files for libcollectdclient %if %{with_write_mongodb} %define _with_write_mongodb --enable-write_mongodb %else -%define _with_write_mongodb --disable-write_mongodb --without-libmongoc +%define _with_write_mongodb --disable-write_mongodb %endif %if %{with_write_redis} %define _with_write_redis --enable-write_redis %else -%define _with_write_redis --disable-write_redis --without-libcredis +%define _with_write_redis --disable-write_redis %endif %if %{with_write_riemann} @@ -1502,37 +1538,38 @@ rm -rf %{buildroot} %{__mkdir} -p %{buildroot}%{_localstatedir}/www %{__mkdir} -p %{buildroot}/%{_sysconfdir}/httpd/conf.d -%{__cp} -a contrib/collection3 %{buildroot}%{_localstatedir}/www -%{__cp} -a contrib/redhat/collection3.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/ +%{__mv} contrib/collection3 %{buildroot}%{_localstatedir}/www +%{__mv} contrib/redhat/collection3.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/ -%{__cp} -a contrib/php-collection %{buildroot}%{_localstatedir}/www -%{__cp} -a contrib/redhat/php-collection.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/ +%{__mv} contrib/php-collection %{buildroot}%{_localstatedir}/www +%{__mv} contrib/redhat/php-collection.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/ ### Clean up docs find contrib/ -type f -exec %{__chmod} a-x {} \; # *.la files shouldn't be distributed. rm -f %{buildroot}/%{_libdir}/{collectd/,}*.la -# Move the Perl examples to a separate directory. -mkdir perl-examples -find contrib -name '*.p[lm]' -exec mv {} perl-examples/ \; - # Remove Perl hidden .packlist files. find %{buildroot} -type f -name .packlist -delete # Remove Perl temporary file perllocal.pod find %{buildroot} -type f -name perllocal.pod -delete %if ! %{with_java} +rm -f %{buildroot}%{_datadir}/collectd/java/collectd-api.jar +rm -f %{buildroot}%{_datadir}/collectd/java/generic-jmx.jar rm -f %{buildroot}%{_mandir}/man5/collectd-java.5* %endif %if ! %{with_perl} rm -f %{buildroot}%{_mandir}/man5/collectd-perl.5* rm -f %{buildroot}%{_mandir}/man3/Collectd::Unixsock.3pm* -rm -fr perl-examples/ rm -fr %{buildroot}/usr/lib/perl5/ %endif +%if ! %{with_postgresql} +rm -f %{buildroot}%{_datadir}/collectd/postgresql_default.conf +%endif + %if ! %{with_python} rm -f %{buildroot}%{_mandir}/man5/collectd-python.5* %endif @@ -1572,7 +1609,7 @@ fi %{_bindir}/collectd-tg %{_bindir}/collectdctl %{_sbindir}/collectdmon -%{_datadir}/collectd/ +%{_datadir}/collectd/types.db %{_sharedstatedir}/collectd %{_mandir}/man1/collectd-nagios.1* %{_mandir}/man1/collectd.1* @@ -1739,7 +1776,7 @@ fi %if %{with_thermal} %{_libdir}/%{name}/thermal.so %endif -%if %{with_load} +%if %{with_threshold} %{_libdir}/%{name}/threshold.so %endif %if %{with_unixsock} @@ -1774,9 +1811,9 @@ fi %{_includedir}/collectd/network_buffer.h %{_includedir}/collectd/lcc_features.h %{_libdir}/pkgconfig/libcollectdclient.pc +%{_libdir}/libcollectdclient.so %files -n libcollectdclient -%{_libdir}/libcollectdclient.so %{_libdir}/libcollectdclient.so.* %if %{with_amqp} @@ -1856,8 +1893,8 @@ fi %if %{with_java} %files java -%{_prefix}/share/collectd/java/collectd-api.jar -%{_prefix}/share/collectd/java/generic-jmx.jar +%{_datadir}/collectd/java/collectd-api.jar +%{_datadir}/collectd/java/generic-jmx.jar %{_libdir}/%{name}/java.so %{_mandir}/man5/collectd-java.5* %endif @@ -1882,6 +1919,11 @@ fi %{_libdir}/%{name}/mic.so %endif +%if %{with_modbus} +%files modbus +%{_libdir}/%{name}/modbus.so +%endif + %if %{with_mysql} %files mysql %{_libdir}/%{name}/mysql.so @@ -1914,7 +1956,6 @@ fi %if %{with_perl} %files perl -%doc perl-examples/* %{perl_vendorlib}/Collectd.pm %{perl_vendorlib}/Collectd/ %{_mandir}/man3/Collectd::Unixsock.3pm* @@ -1934,7 +1975,7 @@ fi %if %{with_postgresql} %files postgresql -%{_prefix}/share/collectd/postgresql_default.conf +%{_datadir}/collectd/postgresql_default.conf %{_libdir}/%{name}/postgresql.so %endif @@ -1995,6 +2036,11 @@ fi %{_libdir}/%{name}/write_riemann.so %endif +%if %{with_xmms} +%files xmms +%{_libdir}/%{name}/xmms.so +%endif + %files collection3 %{_localstatedir}/www/collection3 %{_sysconfdir}/httpd/conf.d/collection3.conf @@ -2007,11 +2053,17 @@ fi %doc contrib/ %changelog -* Mon Aug 19 2013 Marc Fournier 5.4.0-1 +* Tue Jul 26 2016 Ruben Kerkhof - 5.4.3-1 +- New upstream version +- Contains fix for CVE-2016-6254 +- Change collectd.org url to https + +* Mon Aug 19 2013 Marc Fournier 5.4.2-1 - New upstream version - Build netlink plugin by default - Enable cgroups, lvm and statsd plugins - Enable (but don't build by default) mic, aquaero and sigrok plugins +- Enable modbus, memcachec and xmms plugins on RHEL7 * Tue Aug 06 2013 Marc Fournier 5.3.1-1 - New upstream version @@ -2022,6 +2074,14 @@ fi - Removed duplicate --enable-aggregation - Added some comments & usage examples - Replaced a couple of "Buildrequires" by "BuildRequires" +- Enabled modbus plugin on RHEL6 +- Enabled netlink plugin on RHEL6 and RHEL7 +- Allow perl plugin to build on RHEL5 +- Add support for RHEL7 +- Misc perl-related improvements: + * prevent rpmbuild from extracting dependencies from files in /usr/share/doc + * don't package collection3 and php-collection twice + * keep perl scripts from contrib/ in collectd-contrib * Wed Apr 10 2013 Marc Fournier 5.3.0-1 - New upstream version @@ -2029,7 +2089,7 @@ fi - Enabled tail_csv plugin - Installed collectd-tc manpage -* Thu Jan 11 2013 Marc Fournier 5.2.0-3 +* Fri Jan 11 2013 Marc Fournier 5.2.0-3 - remove dependency on libstatgrab, which isn't required on linux * Thu Jan 03 2013 Marc Fournier 5.2.0-2 @@ -2077,11 +2137,11 @@ fi non-essential stuff. - Replaced BuildPrereq by BuildRequires -* Tue Jan 03 2011 Monetate 5.0.1 +* Mon Jan 03 2011 Monetate 5.0.1 - New upstream version - Changes to support 5.0.1 -* Tue Jan 04 2010 Rackspace 4.9.0 +* Mon Jan 04 2010 Rackspace 4.9.0 - New upstream version - Changes to support 4.9.0 - Added support for Java/GenericJMX plugin @@ -2099,7 +2159,7 @@ fi - New major releas - Changes to support 4.0.5 -* Wed Jan 11 2007 Iain Lea 3.11.0-0 +* Thu Jan 11 2007 Iain Lea 3.11.0-0 - fixed spec file to build correctly on fedora core - added improved init.d script to work with chkconfig - added %%post and %%postun to call chkconfig automatically @@ -2107,10 +2167,10 @@ fi * Sun Jul 09 2006 Florian octo Forster 3.10.0-1 - New upstream version -* Tue Jun 25 2006 Florian octo Forster 3.9.4-1 +* Sun Jun 25 2006 Florian octo Forster 3.9.4-1 - New upstream version -* Tue Jun 01 2006 Florian octo Forster 3.9.3-1 +* Thu Jun 01 2006 Florian octo Forster 3.9.3-1 - New upstream version * Tue May 09 2006 Florian octo Forster 3.9.2-1 @@ -2126,10 +2186,10 @@ fi - New upstream version - Added the `apache' package. -* Thu Mar 14 2006 Florian octo Forster 3.8.2-1 +* Tue Mar 14 2006 Florian octo Forster 3.8.2-1 - New upstream version -* Thu Mar 13 2006 Florian octo Forster 3.8.1-1 +* Mon Mar 13 2006 Florian octo Forster 3.8.1-1 - New upstream version * Thu Mar 09 2006 Florian octo Forster 3.8.0-1 @@ -2166,7 +2226,7 @@ fi * Sat Nov 05 2005 Florian octo Forster 3.3.0-1 - New upstream version -* Tue Oct 26 2005 Florian octo Forster 3.2.0-1 +* Wed Oct 26 2005 Florian octo Forster 3.2.0-1 - New upstream version - Added statement to remove the `*.la' files. This fixes a problem when `Unpackaged files terminate build' is in effect. @@ -2183,13 +2243,13 @@ fi * Fri Sep 16 2005 Florian octo Forster 2.1.0-1 - New upstream version -* Mon Sep 10 2005 Florian octo Forster 2.0.0-1 +* Sat Sep 10 2005 Florian octo Forster 2.0.0-1 - New upstream version * Mon Aug 29 2005 Florian octo Forster 1.8.0-1 - New upstream version -* Sun Aug 25 2005 Florian octo Forster 1.7.0-1 +* Thu Aug 25 2005 Florian octo Forster 1.7.0-1 - New upstream version * Sun Aug 21 2005 Florian octo Forster 1.6.0-1