From: Nathan Cutler Date: Sat, 3 Oct 2015 07:05:03 +0000 (+0200) Subject: ceph.spec.in: use %fillup_only macro in SLE/openSUSE X-Git-Tag: v9.1.0~26^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9e226a808101c186ff3f32ede2a5cc1ad7da4128;p=ceph.git ceph.spec.in: use %fillup_only macro in SLE/openSUSE SUSE does not allow /etc/sysconfig/ceph to be owned by the ceph package. Signed-off-by: Nathan Cutler --- diff --git a/ceph.spec.in b/ceph.spec.in index 96d715a3f803..ceb50953ad08 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -134,6 +134,7 @@ BuildRequires: yasm BuildRequires: systemd-rpm-macros %{?systemd_requires} %endif +PreReq: %fillup_prereq Requires: python-Flask BuildRequires: net-tools BuildRequires: libbz2-devel @@ -594,7 +595,12 @@ find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';' find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';' install -D src/rbdmap $RPM_BUILD_ROOT%{_sysconfdir}/ceph/rbdmap install -D src/init-rbdmap $RPM_BUILD_ROOT%{_initrddir}/rbdmap +%if 0%{?fedora} || 0%{?rhel} install -m 0644 -D etc/sysconfig/ceph $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ceph +%endif +%if 0%{?suse_version} +install -m 0644 -D etc/sysconfig/ceph $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.%{name} +%endif %if 0%{?_with_systemd} install -m 0644 -D systemd/ceph.tmpfiles.d $RPM_BUILD_ROOT%{_tmpfilesdir}/ceph-common.conf install -m 0644 -D systemd/ceph-osd@.service $RPM_BUILD_ROOT%{_unitdir}/ceph-osd@.service @@ -671,6 +677,7 @@ rm -rf $RPM_BUILD_ROOT /sbin/ldconfig %if 0%{?_with_systemd} %if 0%{?suse_version} + %fillup_only %service_add_post ceph.target %endif %else @@ -781,8 +788,11 @@ rm -rf $RPM_BUILD_ROOT %{_udevrulesdir}/95-ceph-osd.rules %config %{_sysconfdir}/bash_completion.d/ceph %config(noreplace) %{_sysconfdir}/logrotate.d/ceph +%if 0%{?fedora} || 0%{?rhel} %config(noreplace) %{_sysconfdir}/sysconfig/ceph +%endif %if 0%{?suse_version} +%{_localstatedir}/adm/fillup-templates/sysconfig.* %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds %endif