SHA256
1
0
forked from pool/collectd

Accepting request 241668 from home:posophe:branches:server:monitoring

- Do not provide support for systemd and sysvinit on the same system
  it's redundant
- Add a rc symlink with systemd service file for backward compatibility

OBS-URL: https://build.opensuse.org/request/show/241668
OBS-URL: https://build.opensuse.org/package/show/server:monitoring/collectd?expand=0&rev=123
This commit is contained in:
Darin Perusich 2014-07-21 12:28:00 +00:00 committed by Git OBS Bridge
parent 389fd309fa
commit a1d1e80331
2 changed files with 18 additions and 8 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Jul 20 19:37:18 UTC 2014 - p.drouand@gmail.com
- Do not provide support for systemd and sysvinit on the same system
it's redundant
- Add a rc symlink with systemd service file for backward compatibility
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Mar 15 15:21:46 UTC 2014 - bruno@ioda-net.ch Sat Mar 15 15:21:46 UTC 2014 - bruno@ioda-net.ch

View File

@ -1,4 +1,3 @@
# vim: set sw=4 ts=4 et nu:
# #
# spec file for package collectd # spec file for package collectd
# #
@ -271,11 +270,12 @@ BuildRequires: libxtables-devel
BuildRequires: systemd BuildRequires: systemd
%{?systemd_requires} %{?systemd_requires}
%define has_systemd 1 %define has_systemd 1
%else
PreReq: %insserv_prereq
%endif %endif
# in case we'd like to split it later: # in case we'd like to split it later:
Provides: collectd-perl = %{version}-%{release} Provides: collectd-perl = %{version}-%{release}
PreReq: %fillup_prereq PreReq: %fillup_prereq
PreReq: %insserv_prereq
# play nice with collectd-beta: # play nice with collectd-beta:
Obsoletes: collectd-beta < %{version} Obsoletes: collectd-beta < %{version}
Provides: collectd-beta = %{version}-%{release} Provides: collectd-beta = %{version}-%{release}
@ -676,11 +676,6 @@ export KERNEL_DIR=/usr/src/linux
# create /var/lib/collectd to add it to the %files section: # 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"
# init script:
%__install -D -m 0755 "%{SOURCE1}" "%{buildroot}/etc/init.d/collectd"
%__install -d -m 0755 "%{buildroot}/usr/sbin"
%__ln_s "../../etc/init.d/collectd" "%{buildroot}/usr/sbin/rccollectd"
# Apache2 configuration for the CGI frontend: # Apache2 configuration for the CGI frontend:
%__install -D -m 0644 "%{SOURCE2}" "%{buildroot}/etc/apache2/conf.d/%{name}.conf" %__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 0755 contrib/collection.cgi "%{buildroot}/srv/www/collectd/collection.cgi"
@ -767,8 +762,15 @@ cat<<EOF >README.plugins-all
This package is empty but depends on all collectd plugin subpackages. This package is empty but depends on all collectd plugin subpackages.
EOF EOF
%__install -d -m 0755 "%{buildroot}/usr/sbin"
%if 0%{?has_systemd} %if 0%{?has_systemd}
%__install -D -m0644 %{SOURCE100} %{buildroot}%{_unitdir}/collectd.service %__install -D -m0644 %{SOURCE100} %{buildroot}%{_unitdir}/collectd.service
ln -s /usr/sbin/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"
%endif %endif
%preun %preun
@ -844,10 +846,11 @@ EOF
%doc %{_mandir}/man5/types.db.5%{ext_man} %doc %{_mandir}/man5/types.db.5%{ext_man}
%doc %{perl_man3dir}/Collectd::Unixsock.%{perl_man3ext}%{ext_man} %doc %{perl_man3dir}/Collectd::Unixsock.%{perl_man3ext}%{ext_man}
%dir %{_localstatedir}/lib/collectd %dir %{_localstatedir}/lib/collectd
/etc/init.d/collectd
/usr/sbin/rccollectd /usr/sbin/rccollectd
%if 0%{?has_systemd} %if 0%{?has_systemd}
%{_unitdir}/collectd.service %{_unitdir}/collectd.service
%else
/etc/init.d/collectd
%endif %endif
%files web %files web