Add -init version of daemon

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2018-06-22 21:54:14 +02:00
parent 986be8a7df
commit dd0d8863ff
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

View File

@ -4,12 +4,9 @@
# stratisd is supposed to be daemon used through dbus
%global __cargo_is_lib() false
# We want to support dbus
%global __cargo_common_opts %{__cargo_common_opts} --features dbus_enabled
Name: stratisd
Version: 0.5.3
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Daemon that manages block devices to create filesystems
License: MPLv2.0
@ -61,31 +58,44 @@ sed -i -e "/^clippy/d" Cargo.toml
%build
%cargo_build
%cargo_build -n
a2x -f manpage docs/stratisd.txt
%install
%cargo_install
%{__install} -Dpm0644 -t %{buildroot}%{_datadir}/dbus-1/system.d stratisd.conf
%{__install} -Dpm0644 -t %{buildroot}%{_datadir}/dbus-1/system-services org.storage.stratis1.service
# Daemon should be really private
mkdir -p %{buildroot}%{_libexecdir}
mv %{buildroot}%{_bindir}/stratisd %{buildroot}%{_libexecdir}/stratisd
%cargo_install -n
# Init version should be in sbin
mkdir -p %{buildroot}%{_sbindir}
mv %{buildroot}%{_bindir}/stratisd %{buildroot}%{_sbindir}/stratisd-init
%{__install} -Dpm0644 -t %{buildroot}%{_datadir}/dbus-1/system.d stratisd.conf
%{__install} -Dpm0644 -t %{buildroot}%{_datadir}/dbus-1/system-services org.storage.stratis1.service
%{__install} -Dpm0644 -t %{buildroot}%{_mandir}/man8 docs/stratisd.8
%if %{with check}
%check
%cargo_test -- --skip real_ --skip loop_ --skip travis_
%cargo_test -- -- --skip real_ --skip loop_ --skip travis_
%endif
%files
%license LICENSE
%doc README.md
%{_libexecdir}/stratisd
%{_sbindir}/stratisd-init
%dir %{_datadir}/dbus-1
%{_datadir}/dbus-1/system.d/stratisd.conf
%{_datadir}/dbus-1/system-services/org.storage.stratis1.service
%{_mandir}/man8/stratisd.8*
%changelog
* Fri Jun 22 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.5.3-2
- Add -init version of daemon
- Own dbus-1 directory
* Mon Jun 4 2018 Andy Grover <agrover@redhat.com> - 0.5.3-1
- Update to 0.5.3