diff --git a/stratisd.spec b/stratisd.spec index e13a724..aba3b02 100644 --- a/stratisd.spec +++ b/stratisd.spec @@ -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 - 0.9.0-4 +- Add missing systemd scriptlets + * Wed Sep 19 2018 Tony Asleson - 0.9.0-3 - Add systemd unit file - Remove systemd activation file