%else
%bcond_without tcmalloc
%endif
+%bcond_with system_pmdk
%if 0%{?fedora} || 0%{?rhel}
%bcond_without selinux
%ifarch x86_64 ppc64le
%bcond_without rbd_rwl_cache
%bcond_without rbd_ssd_cache
-%global _system_pmdk 1
%else
%bcond_with rbd_rwl_cache
%bcond_with rbd_ssd_cache
%bcond_with libradosstriper
%ifarch x86_64 aarch64 ppc64le
%bcond_without lttng
-%global _system_pmdk 1
%bcond_without rbd_rwl_cache
%bcond_without rbd_ssd_cache
%else
%bcond_with lttng
-%global _system_pmdk 0
%bcond_with rbd_rwl_cache
%bcond_with rbd_ssd_cache
%endif
# main package definition
#################################################################################
Name: ceph
-Version: 16.2.6
+Version: 16.2.7
Release: 0%{?dist}
%if 0%{?fedora} || 0%{?rhel}
Epoch: 2
Group: System/Filesystems
%endif
URL: http://ceph.com/
-Source0: %{?_remote_tarball_prefix}ceph-16.2.6.tar.bz2
+Source0: %{?_remote_tarball_prefix}ceph-16.2.7.tar.bz2
%if 0%{?suse_version}
# _insert_obs_source_lines_here
ExclusiveArch: x86_64 aarch64 ppc64le s390x
BuildRequires: python%{python3_pkgversion}-pecan
BuildRequires: python%{python3_pkgversion}-requests
BuildRequires: python%{python3_pkgversion}-dateutil
-BuildRequires: python%{python3_pkgversion}-virtualenv
BuildRequires: python%{python3_pkgversion}-coverage
BuildRequires: python%{python3_pkgversion}-pyOpenSSL
BuildRequires: socat
BuildRequires: libevent-devel
BuildRequires: yaml-cpp-devel
%endif
-%if 0%{?_system_pmdk}
+%if 0%{with system_pmdk}
BuildRequires: libpmem-devel
BuildRequires: libpmemobj-devel
%endif
%endif
%if 0%{?weak_deps}
Recommends: chrony
+Recommends: nvme-cli
+%if 0%{?suse_version}
+Requires: smartmontools
+%else
+Recommends: smartmontools
+%endif
%endif
%description base
Base is the package that includes all the files shared amongst ceph servers
%endif
Provides: ceph-test:/usr/bin/ceph-monstore-tool
Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
-%if 0%{?weak_deps}
-Recommends: nvme-cli
-%if 0%{?suse_version}
-Requires: smartmontools
-%else
-Recommends: smartmontools
-%endif
-%endif
%if 0%{with jaeger}
Requires: libjaeger = %{_epoch_prefix}%{version}-%{release}
%endif
Requires: sudo
Requires: libstoragemgmt
Requires: python%{python3_pkgversion}-ceph-common = %{_epoch_prefix}%{version}-%{release}
-%if 0%{?weak_deps}
-Recommends: nvme-cli
-%if 0%{?suse_version}
-Requires: smartmontools
-%else
-Recommends: smartmontools
-%endif
-%endif
%description osd
ceph-osd is the object storage daemon for the Ceph distributed file
system. It is responsible for storing objects on a local file system
# common
#################################################################################
%prep
-%autosetup -p1 -n ceph-16.2.6
+%autosetup -p1 -n ceph-16.2.7
%build
# LTO can be enabled as soon as the following GCC bug is fixed:
%if 0%{with rbd_ssd_cache}
-DWITH_RBD_SSD_CACHE=ON \
%endif
-%if 0%{?_system_pmdk}
+%if 0%{with system_pmdk}
-DWITH_SYSTEM_PMDK:BOOL=ON \
%endif
-DBOOST_J=$CEPH_SMP_NCPUS \
install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules
# sudoers.d
-install -m 0440 -D sudoers.d/ceph-osd-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
+install -m 0440 -D sudoers.d/ceph-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-smartctl
%if 0%{?rhel} >= 8
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/*
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mgr
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
+%{_sysconfdir}/sudoers.d/ceph-smartctl
%post base
/sbin/ldconfig
%{_unitdir}/ceph-volume@.service
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
%config(noreplace) %{_sysctldir}/90-ceph-osd.conf
-%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
%post osd
%if 0%{?suse_version}
exit 0
fi
+# Stop ceph.target while relabeling if CEPH_AUTO_RESTART_ON_UPGRADE=yes
+SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
+if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
+ source $SYSCONF_CEPH
+fi
+
# Check whether the daemons are running
/usr/bin/systemctl status ceph.target > /dev/null 2>&1
STATUS=$?
# Stop the daemons if they were running
if test $STATUS -eq 0; then
- /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
+ if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
+ /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
+ fi
fi
# Relabel the files fix for first package install
# Start the daemons iff they were running before
if test $STATUS -eq 0; then
- /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
+ if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
+ /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
+ fi
fi
exit 0
exit 0
fi
+ # Stop ceph.target while relabeling if CEPH_AUTO_RESTART_ON_UPGRADE=yes
+ SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
+ if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
+ source $SYSCONF_CEPH
+ fi
+
# Check whether the daemons are running
/usr/bin/systemctl status ceph.target > /dev/null 2>&1
STATUS=$?
# Stop the daemons if they were running
if test $STATUS -eq 0; then
- /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
+ if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
+ /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
+ fi
fi
/usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
# Start the daemons if they were running before
if test $STATUS -eq 0; then
- /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
+ if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
+ /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
+ fi
fi
fi
exit 0