X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=contrib%2Fredhat%2Fcollectd.spec;h=072dd6bd97f71d06247ac6ad9f4d484ca9d13566;hb=c089df03816e9fb799f08ee4bc2df01d2d8a3e9f;hp=c8c1c258f9dd306f9563301b23262239e991c295;hpb=602d8828fe4ead5148a261af0f9e81b6b9b720ea;p=collectd.git diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec index c8c1c258..072dd6bd 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -160,6 +160,8 @@ %define with_aquaero 0%{!?_without_aquaero:0} # plugin barometer disabled, requires a libi2c %define with_barometer 0%{!?_without_barometer:0} +# plugin grpc disabled, requires protobuf-compiler >= 3.0 +%define with_grpc 0%{!?_without_grpc:0} # plugin lpar disabled, requires AIX %define with_lpar 0%{!?_without_lpar:0} # plugin mic disabled, requires Mic @@ -217,7 +219,7 @@ %define with_xmms 0 %endif -Summary: statistics collection and monitoring daemon +Summary: Statistics collection and monitoring daemon Name: collectd Version: 5.5.1 Release: 1%{?dist} @@ -229,11 +231,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: libgcrypt-devel, kernel-headers, libtool-ltdl-devel, libcap-devel Vendor: collectd development team -%if 0%{?el7:1} -Requires(pre): initscripts -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +%if 0%{?fedora} || 0%{?rhel} >= 7 +%{?systemd_requires} +BuildRequires: systemd %else Requires(post): chkconfig Requires(preun): chkconfig, initscripts @@ -416,6 +416,15 @@ The gmond plugin subscribes to a Multicast group to receive data from gmond, the client daemon of the Ganglia project. %endif +%if %{with_grpc} +%package grpc +Summary: GRPC plugin for collectd +Group: System Environment/Daemons +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: protobuf-compiler +%description grpc +This plugin embeds a gRPC server into Collectd. + %if %{with_hddtemp} %package hddtemp Summary: Hddtemp plugin for collectd @@ -1074,6 +1083,12 @@ Collectd utilities %define _with_gmond --disable-gmond %endif +%if %{with_grpc} +%define _with_grpc --enable-grpc +%else +%define _with_grpc --disable-grpc +%endif + %if %{with_hddtemp} %define _with_hddtemp --enable-hddtemp %else @@ -1696,6 +1711,7 @@ Collectd utilities %{?_with_filecount} \ %{?_with_fscache} \ %{?_with_gmond} \ + %{?_with_grpc} \ %{?_with_hddtemp} \ %{?_with_interface} \ %{?_with_ipc} \ @@ -1800,7 +1816,7 @@ Collectd utilities %install rm -rf %{buildroot} %{__make} install DESTDIR=%{buildroot} -%if 0%{?el7:1} +%if 0%{?fedora} || 0%{?rhel} >= 7 %{__install} -Dp -m0644 contrib/systemd.collectd.service %{buildroot}%{_unitdir}/collectd.service %else %{__install} -Dp -m0755 contrib/redhat/init.d-collectd %{buildroot}%{_initrddir}/collectd @@ -1856,26 +1872,15 @@ rm -f %{buildroot}%{_mandir}/man5/collectd-snmp.5* %clean rm -rf %{buildroot} -%pre -%if 0%{?el7:1} -# stop sysv-based instance before upgrading to systemd -if [ $1 -eq 2 ] && [ -f /var/lock/subsys/collectd ]; then - SYSTEMCTL_SKIP_REDIRECT=1 %{_initddir}/collectd stop >/dev/null 2>&1 || : -fi -%endif - %post -%if 0%{?el7:1} -if [ $1 -eq 2 ]; then - /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%if 0%{?fedora} || 0%{?rhel} >= 7 %systemd_post collectd.service %else /sbin/chkconfig --add collectd || : %endif %preun -%if 0%{?el7:1} +%if 0%{?fedora} || 0%{?rhel} >= 7 %systemd_preun collectd.service %else # stop collectd only when uninstalling @@ -1886,7 +1891,7 @@ fi %endif %postun -%if 0%{?el7:1} +%if 0%{?fedora} || 0%{?rhel} >= 7 %systemd_postun_with_restart collectd.service %else # restart collectd only when upgrading @@ -1902,7 +1907,7 @@ fi %files %doc AUTHORS COPYING ChangeLog README %config(noreplace) %{_sysconfdir}/collectd.conf -%if 0%{?el7:1} +%if 0%{?fedora} || 0%{?rhel} >= 7 %{_unitdir}/collectd.service %else %{_initrddir}/collectd @@ -2227,6 +2232,11 @@ fi %{_libdir}/%{name}/gmond.so %endif +%if %{with_grpc} +%files grpc +%{_libdir}/%{name}/grpc.so +%endif + %if %{with_hddtemp} %files hddtemp %{_libdir}/%{name}/hddtemp.so @@ -2437,7 +2447,7 @@ fi * Sat Jun 04 2016 Ruben Kerkhof 5.5.1-1 - New upstream version - New plugins enabled by default: chrony, mqtt, notify_nagios -- New plugins disabled by default: zone, xencpu +- New plugins disabled by default: grpc, zone, xencpu * Wed May 27 2015 Marc Fournier 5.5.0-1 - New upstream version