Requires: python-rbd = %{epoch}:%{version}-%{release}
Requires: python-cephfs = %{epoch}:%{version}-%{release}
Requires: python-requests
+%if 0%{?_with_systemd}
+%{?systemd_requires}
+%endif
%if 0%{?rhel} || 0%{?fedora}
Requires: redhat-lsb-core
%endif
install -D src/init-rbdmap $RPM_BUILD_ROOT%{_initrddir}/rbdmap
install -m 0644 -D etc/sysconfig/ceph $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ceph
%if 0%{?_with_systemd}
- install -m 0644 -D systemd/ceph.tmpfiles.d $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf
+ 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
install -m 0644 -D systemd/ceph-mon@.service $RPM_BUILD_ROOT%{_unitdir}/ceph-mon@.service
install -m 0644 -D systemd/ceph-create-keys@.service $RPM_BUILD_ROOT%{_unitdir}/ceph-create-keys@.service
%post
/sbin/ldconfig
%if 0%{?_with_systemd}
- systemd-tmpfiles --create
%if 0%{?suse_version}
%service_add_post ceph.target
%endif
%{_bindir}/ceph-debugpack
%{_bindir}/ceph-coverage
%if 0%{?_with_systemd}
-%{_tmpfilesdir}/%{name}.conf
%{_unitdir}/ceph-mds@.service
%{_unitdir}/ceph-mon@.service
%{_unitdir}/ceph-create-keys@.service
%endif
%{_bindir}/ceph-post-file
%{_bindir}/ceph-brag
+%if 0%{?_with_systemd}
+%{_tmpfilesdir}/ceph-common.conf
+%endif
%{_mandir}/man8/ceph-authtool.8*
%{_mandir}/man8/ceph-conf.8*
%{_mandir}/man8/ceph-dencoder.8*
%{_sbindir}/groupadd ceph $CEPH_GROUP_ID -o -r 2>/dev/null || :
%{_sbindir}/useradd ceph $CEPH_USER_ID -o -r -g ceph -s /sbin/nologin -c "Ceph daemons" -d %{_localstatedir}/lib/ceph 2> /dev/null || :
+%post -n ceph-common
+%if 0%{?_with_systemd}
+systemd-tmpfiles --create
+%endif
+
%postun -n ceph-common
# Package removal cleanup
if [ "$1" -eq "0" ] ; then