Add missing systemd scriptlets

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2018-09-19 16:49:25 +02:00
parent b4851c1102
commit 54674b8012
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

View File

@ -6,7 +6,7 @@
Name: stratisd
Version: 0.9.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Daemon that manages block devices to create filesystems
License: MPLv2.0
@ -46,7 +46,9 @@ BuildRequires: (crate(loopdev) >= 0.2.0 with crate(loopdev) < 0.3.0)
BuildRequires: (crate(quickcheck) >= 0.6.0 with crate(quickcheck) < 0.7.0)
%endif
BuildRequires: %{_bindir}/a2x
BuildRequires: systemd
%{?systemd_requires}
Requires: xfsprogs
Requires: device-mapper-persistent-data
@ -75,13 +77,22 @@ mv %{buildroot}%{_bindir}/stratisd %{buildroot}%{_sbindir}/stratisd-init
%{__install} -Dpm0644 -t %{buildroot}%{_datadir}/dbus-1/system.d stratisd.conf
%{__install} -Dpm0644 -t %{buildroot}%{_mandir}/man8 docs/stratisd.8
%{__install} -Dpm0644 -t %{buildroot}%{_unitdir} %{name}.service
%{__install} -Dpm0644 -t %{buildroot}%{_unitdir} stratisd.service
%if %{with check}
%check
%cargo_test -- -- --skip real_ --skip loop_ --skip travis_ --skip test_buffering
%endif
%post
%systemd_post stratisd.service
%preun
%systemd_preun stratisd.service
%postun
%systemd_postun_with_restart stratisd.service
%files
%license LICENSE
%doc README.md
@ -90,9 +101,12 @@ mv %{buildroot}%{_bindir}/stratisd %{buildroot}%{_sbindir}/stratisd-init
%dir %{_datadir}/dbus-1
%{_datadir}/dbus-1/system.d/stratisd.conf
%{_mandir}/man8/stratisd.8*
%{_unitdir}/%{name}.service
%{_unitdir}/stratisd.service
%changelog
* Wed Sep 19 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.9.0-4
- Add missing systemd scriptlets
* Wed Sep 19 2018 Tony Asleson <tasleson@redhat.com> - 0.9.0-3
- Add systemd unit file
- Remove systemd activation file