+++ /dev/null
---- ceph-12.2.13/src/logrotate.conf.orig 2020-05-28 06:45:00.496496556 +0200
-+++ ceph-12.2.13/src/logrotate.conf 2020-05-28 06:47:07.249143211 +0200
-@@ -4,8 +4,7 @@
- compress
- sharedscripts
- postrotate
-- killall -q -1 ceph-mon ceph-mgr ceph-mds ceph-osd ceph-fuse radosgw || true
-- killall -q -1 ceph-mon ceph-mgr ceph-mds ceph-osd ceph-fuse radosgw rbd-mirror || true
-+ cephctl reload >/dev/null 2>/dev/null
- endscript
- missingok
- notifempty
Source0: http://download.ceph.com/tarballs/%{name}-%{version}.tar.gz
# Source0-md5: 38bd01cf8224c9ca081298e19ab6e5a1
Source1: ceph.sysconfig
-Source2: cephctl
Source3: ceph.tmpfiles
Patch0: %{name}-init-fix.patch
-Patch1: %{name}.logrotate.patch
Patch2: boost.patch
Patch3: %{name}-python.patch
Patch4: %{name}-types.patch
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
%patch2 -p0
%patch3 -p1
%patch4 -p1
cp -p src/logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ceph
cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/ceph
-install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}
ln -sf /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/ceph.service
cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/ceph.conf
%attr(755,root,root) %{_bindir}/ceph_smalliobenchrbd
%attr(755,root,root) %{_bindir}/ceph_tpbench
%attr(755,root,root) %{_bindir}/ceph_xattr_bench
-%attr(755,root,root) %{_bindir}/cephctl
%attr(755,root,root) %{_bindir}/cephfs-data-scan
%attr(755,root,root) %{_bindir}/cephfs-journal-tool
%attr(755,root,root) %{_bindir}/cephfs-table-tool
+++ /dev/null
-#! /bin/bash
-
-# It seems this was designed as /etc/init.d/ceph script for controlling the systemd
-# units on SuSE, made into 'cephctl' for PLD
-
-systemd_booted 2>/dev/null || exec /etc/rc.d/init.d/ceph "$@"
-
-action=$1 ; shift
-[ -f /etc/sysconfig/ceph ] && . /etc/sysconfig/ceph
-cluster=${CLUSTER:-ceph}
-config=$1 ; shift
-
-# Shared variables by many actions
-dir_mon="/var/lib/ceph/mon/"
-dir_osd="/var/lib/ceph/osd/"
-if test -d ${dir_mon} ; then
-lmon=`ls ${dir_mon} | grep ${cluster}`
-fi
-if test -d ${dir_osd} ; then
-losd=`ls ${dir_osd} | grep ${cluster}`
-fi
-prefix="${cluster}-"
-
-RC=0
-
-if test -n "$config" ; then
- systemctl "${action}" "ceph-mon@${config}.service" || RC=1
-else
- case $action in
- start | stop | status | enable | disable | restart | is-active | is-failed | show | kill | reset-failed | reload )
- n=0
- if test -n ${lmon} ; then
- for s in ${lmon#=${prefix}} ; do
- systemctl "${action}" ceph-mon@${s#$prefix}.service
- [ $? -eq 0 ] || RC=1
- ((++n))
- done
- fi
- if test -n ${lmon} ; then
- for s in ${losd#=${prefix}} ; do
- systemctl "${action}" ceph-osd@${s#$prefix}.service
- [ $? -eq 0 ] || RC=1
- ((++n))
- done
- fi
- ;;
- *)
- echo "Invalid paramter : $action"
- echo "Valid paramters : start | stop | status | enable | disable | restart | is-active | is-failed | show | kill | reset-failed | reload"
- ;;
- esac
-fi
-exit $RC