Requires: hdparm
Requires: cryptsetup
Requires(post): binutils
-# We require this to be present for %%{_tmpfilesdir}
-# systemd package must be installed in build environment for systemd-tmpfiles to work
-%if 0%{?_with_systemd}
-Requires: systemd
-BuildRequires: systemd
-%endif
%if 0%{with cephfs_java}
BuildRequires: sharutils
%endif
Requires: python-rbd = %{version}-%{release}
Requires: python-cephfs = %{version}-%{release}
Requires: python-requests
+%if 0%{?_with_systemd}
+%{?systemd_requires}
+%endif
%if 0%{?rhel} || 0%{?fedora}
Requires: redhat-lsb-core
%endif
Group: Development/Libraries
Requires: ceph-common = %{version}-%{release}
Requires: librados2 = %{version}-%{release}
+%if 0%{?_with_systemd}
+%{?systemd_requires}
+%endif
%if 0%{?suse_version}
BuildRequires: libexpat-devel
BuildRequires: FastCGI-devel
mkdir -p $RPM_BUILD_ROOT/usr/lib/ceph-radosgw/
install -m 0755 -D src/ceph-radosgw-prestart.sh $RPM_BUILD_ROOT/usr/lib/ceph-radosgw/
install -m 0755 -D systemd/ceph %{buildroot}/%{_sbindir}/rcceph
- 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/tmpfiles.d_ceph-rgw.conf $RPM_BUILD_ROOT%{_tmpfilesdir}/ceph-radosgw.conf
install -m 0644 -D systemd/ceph-disk-activate-journal@.service $RPM_BUILD_ROOT%{_unitdir}/ceph-disk-activate-journal@.service
install -m 0644 -D systemd/ceph-disk-activate@.service $RPM_BUILD_ROOT%{_unitdir}/ceph-disk-activate@.service
%post
/sbin/ldconfig
%if 0%{?_with_systemd}
- systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf
%if 0%{?suse_version}
%service_add_post ceph.target
%endif
%{_unitdir}/ceph-disk-activate@.service
%{_unitdir}/ceph-disk-dmcrypt-activate@.service
%{_unitdir}/ceph.target
-%{_tmpfilesdir}/%{name}.conf
%else
%{_initrddir}/ceph
%endif
%{_bindir}/rbd
%{_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*
%{python_sitelib}/ceph_argparse.py*
%{_udevrulesdir}/50-rbd.rules
+%post -n ceph-common
+%if 0%{?_with_systemd}
+systemd-tmpfiles --create
+%endif
+
%postun -n ceph-common
# Package removal cleanup
if [ "$1" -eq "0" ] ; then