diff --git a/0001-add-dbus-service.patch b/0001-add-dbus-service.patch new file mode 100644 index 0000000..6ae2586 --- /dev/null +++ b/0001-add-dbus-service.patch @@ -0,0 +1,26 @@ +From a40a1d6cfc5c38fdee2749b1153ef8bf267ff24e Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Mon, 8 Jan 2018 16:34:29 +0100 +Subject: [PATCH] add dbus service + +Without it, stratisd is not activatable. + +Signed-off-by: Igor Gnatenko +--- + org.storage.stratis1.service | 4 ++++ + 1 file changed, 4 insertions(+) + create mode 100644 org.storage.stratis1.service + +diff --git a/org.storage.stratis1.service b/org.storage.stratis1.service +new file mode 100644 +index 0000000..4f3e92b +--- /dev/null ++++ b/org.storage.stratis1.service +@@ -0,0 +1,4 @@ ++[D-BUS Service] ++Name=org.storage.stratis1 ++Exec=/usr/libexec/stratisd ++User=root +-- +2.15.1 + diff --git a/stratisd.spec b/stratisd.spec index 5f13cd4..0a7b118 100644 --- a/stratisd.spec +++ b/stratisd.spec @@ -21,6 +21,8 @@ Patch0005: 0005-deps-update-clap-to-2.patch Patch0006: 0006-deps-update-loopdev-to-0.2.patch # https://github.com/stratis-storage/stratisd/pull/709 Patch1001: 0001-cast-stat.f_bsize-to-u64.patch +# https://github.com/stratis-storage/stratisd/pull/711 +Patch2001: 0001-add-dbus-service.patch ExclusiveArch: %{rust_arches} @@ -69,7 +71,11 @@ sed -i -e "/^clippy/d" Cargo.toml %install %cargo_install -%{__install} -Dpm0644 -t %{buildroot}%{_sysconfdir}/dbus-1/system.d stratisd.conf +%{__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 %if %{with check} %check @@ -79,9 +85,14 @@ sed -i -e "/^clippy/d" Cargo.toml %files %license LICENSE %doc README.md -%{_bindir}/stratisd -%config %{_sysconfdir}/dbus-1/system.d/stratisd.conf +%{_libexecdir}/stratisd +%{_datadir}/dbus-1/system.d/stratisd.conf +%{_datadir}/dbus-1/system-services/org.storage.stratis1.service %changelog +* Mon Jan 08 2018 Igor Gnatenko +- Move binary under %%{_libexecdir} +- Add dbus service (so it is activatable) + * Sun Jan 07 2018 Igor Gnatenko - 0.1.4-1 - Initial package