From acfc06d9494fca8b0f4e6c8684709b0966e86c24 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Thu, 25 Feb 2016 21:51:36 +0100 Subject: [PATCH 1/2] ceph.spec.in: use %{_prefix} for ocf instead of hardcoding /usr This patch aligns the spec file with src/ocf/Makefile.am, which installs the resource agents in $(prefix)/lib/ocf. Signed-off-by: Nathan Cutler --- ceph.spec.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index 640f1aef76433..552f9669531d9 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1183,10 +1183,11 @@ fi %if %{with ocf} %files resource-agents %defattr(0755,root,root,-) -%dir /usr/lib/ocf -%dir /usr/lib/ocf/resource.d -%dir /usr/lib/ocf/resource.d/ceph -/usr/lib/ocf/resource.d/%{name}/* +# N.B. src/ocf/Makefile.am uses $(prefix)/lib +%dir %{_prefix}/lib/ocf +%dir %{_prefix}/lib/ocf/resource.d +%dir %{_prefix}/lib/ocf/resource.d/ceph +%{_prefix}/lib/ocf/resource.d/%{name}/* %endif ################################################################################# From 9acb00ec551e23a551de4b11028d469dbef79185 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Thu, 25 Feb 2016 21:54:27 +0100 Subject: [PATCH 2/2] ceph.spec.in: do not install Ceph RA on systemd platforms The Ceph Resource Agent (RA) wraps the Ceph init script and is incompatible with systemd. http://tracker.ceph.com/issues/14828 Fixes: #14828 Signed-off-by: Nathan Cutler --- ceph.spec.in | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ceph.spec.in b/ceph.spec.in index 552f9669531d9..c1169e228d92a 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1181,13 +1181,27 @@ fi ################################################################################# %if %{with ocf} + %files resource-agents %defattr(0755,root,root,-) # N.B. src/ocf/Makefile.am uses $(prefix)/lib %dir %{_prefix}/lib/ocf %dir %{_prefix}/lib/ocf/resource.d %dir %{_prefix}/lib/ocf/resource.d/ceph -%{_prefix}/lib/ocf/resource.d/%{name}/* +%if 0%{_with_systemd} +%exclude %{_prefix}/lib/ocf/resource.d/ceph/ceph +%exclude %{_prefix}/lib/ocf/resource.d/ceph/mds +%exclude %{_prefix}/lib/ocf/resource.d/ceph/mon +%exclude %{_prefix}/lib/ocf/resource.d/ceph/osd +%endif +%if ! 0%{_with_systemd} +%{_prefix}/lib/ocf/resource.d/ceph/ceph +%{_prefix}/lib/ocf/resource.d/ceph/mds +%{_prefix}/lib/ocf/resource.d/ceph/mon +%{_prefix}/lib/ocf/resource.d/ceph/osd +%endif +%{_prefix}/lib/ocf/resource.d/ceph/rbd + %endif #################################################################################