# This file is under the GNU Lesser General Public License, version 2.1
#
# Please submit bugfixes or comments via http://tracker.ceph.com/
-#
+#
%bcond_without ocf
%bcond_without cephfs_java
%if 0%{?suse_version}
%bcond_without ceph_test_package
%endif
%bcond_with make_check
-%bcond_with xio
%ifarch s390 s390x
%bcond_with tcmalloc
%else
%if %{with selinux}
# get selinux policy version
-%{!?_selinux_policy_version: %global _selinux_policy_version %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null || echo 0.0.0)}
+%{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0}
%endif
%{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d}
Version: @VERSION@
Release: @RPM_RELEASE@%{?dist}
%if 0%{?fedora} || 0%{?rhel}
-Epoch: 1
+Epoch: 2
%endif
-# define %_epoch_prefix macro which will expand to the empty string if %epoch is undefined
+# define _epoch_prefix macro which will expand to the empty string if epoch is
+# undefined
%global _epoch_prefix %{?epoch:%{epoch}:}
Summary: User space components of the Ceph file system
-License: LGPL-2.1 and CC-BY-SA-1.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and MIT
+License: LGPL-2.1 and CC-BY-SA-3.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and MIT
%if 0%{?suse_version}
Group: System/Filesystems
%endif
%if 0%{with selinux}
BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel
-BuildRequires: /usr/share/selinux/devel/policyhelp
+%endif
+%if 0%{with make_check}
+%if 0%{?fedora} || 0%{?rhel}
+BuildRequires: python-cherrypy
+BuildRequires: python-werkzeug
+%endif
+%if 0%{?suse_version}
+BuildRequires: python-CherryPy
+BuildRequires: python-Werkzeug
+BuildRequires: python-numpy-devel
+%endif
+BuildRequires: python-coverage
+BuildRequires: python-pecan
+BuildRequires: socat
%endif
BuildRequires: bc
BuildRequires: gperf
BuildRequires: gcc-c++
BuildRequires: gdbm
%if 0%{with tcmalloc}
+%if 0%{?fedora} || 0%{?rhel}
+BuildRequires: gperftools-devel >= 2.6.1
+%endif
+%if 0%{?suse_version}
BuildRequires: gperftools-devel >= 2.4
%endif
+%endif
BuildRequires: jq
BuildRequires: leveldb-devel > 1.2
BuildRequires: libaio-devel
BuildRequires: python
BuildRequires: python-devel
BuildRequires: python-nose
-BuildRequires: python-pecan
BuildRequires: python-requests
+BuildRequires: python-six
BuildRequires: python-virtualenv
-BuildRequires: python-werkzeug
BuildRequires: snappy-devel
BuildRequires: udev
BuildRequires: util-linux
BuildRequires: libopenssl-devel
BuildRequires: lsb-release
BuildRequires: openldap2-devel
-BuildRequires: python-CherryPy
BuildRequires: python-Cython
BuildRequires: python-PrettyTable
BuildRequires: python-Sphinx
BuildRequires: rdma-core-devel
%endif
-%if 0%{?fedora} || 0%{?rhel}
+%if 0%{?fedora} || 0%{?rhel}
Requires: systemd
BuildRequires: boost-random
BuildRequires: btrfs-progs
BuildRequires: openssl-devel
BuildRequires: redhat-lsb-core
BuildRequires: Cython
-BuildRequires: python-cherrypy
BuildRequires: python-prettytable
BuildRequires: python-sphinx
%endif
%if 0%{?fedora} || 0%{?rhel}
BuildRequires: redhat-rpm-config
%endif
-# Accelio IB/RDMA
-%if 0%{with xio}
-BuildRequires: libxio-devel
-%endif
%description
Ceph is a massively scalable, open-source, distributed storage system that runs
Requires: python-setuptools
Requires: grep
Requires: xfsprogs
+Requires: e2fsprogs
Requires: logrotate
+Requires: parted
Requires: util-linux
Requires: cryptsetup
Requires: findutils
Requires: psmisc
Requires: which
+%if 0%{?fedora} || 0%{?rhel}
+Requires: gdisk
+# The following is necessary due to tracker 36508 and can be removed once the
+# associated upstream bugs are resolved.
+%if 0%{with tcmalloc}
+Requires: gperftools-libs >= 2.6.1
+%endif
+%endif
%if 0%{?suse_version}
Recommends: ntp-daemon
-%endif
-%if 0%{with xio}
-Requires: libxio
+Requires: gptfdisk
%endif
%description base
Base is the package that includes all the files shared amongst ceph servers
%if 0%{?suse_version}
Requires(pre): pwdutils
%endif
-%if 0%{with xio}
-Requires: libxio
-%endif
%description -n ceph-common
Common utilities to mount and interact with a ceph storage cluster.
Comprised of files that are common to Ceph clients and servers.
Group: System/Filesystems
%endif
Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
+Requires: python-six
%if 0%{?fedora} || 0%{?rhel}
Requires: python-cherrypy
+Requires: python-jinja2
Requires: python-werkzeug
Requires: pyOpenSSL
%endif
%if 0%{?suse_version}
Requires: python-CherryPy
+Requires: python-Jinja2
Requires: python-Werkzeug
Requires: python-pyOpenSSL
%endif
%if 0%{?suse_version}
Group: System/Filesystems
%endif
+Requires: fuse
%description fuse
FUSE based client for Ceph distributed network file system
Group: System/Filesystems
%endif
Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
-# for sgdisk, used by ceph-disk
-%if 0%{?fedora} || 0%{?rhel}
-Requires: gdisk
-%endif
-%if 0%{?suse_version}
-Requires: gptfdisk
-%endif
-Requires: parted
+Requires: lvm2
%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
%if 0%{?suse_version}
Group: System/Libraries
%endif
+Obsoletes: libcephfs1
%if 0%{?rhel} || 0%{?fedora}
Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
Obsoletes: ceph-libcephfs
%if 0%{?suse_version}
Group: System/Benchmark
%endif
-Requires: ceph-common
+Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
Requires: xmlstarlet
Requires: jq
+Requires: socat
%description -n ceph-test
This package contains Ceph benchmarks and test tools.
%endif
-DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
-DCMAKE_INSTALL_MANDIR=%{_mandir} \
-DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \
- -DWITH_EMBEDDED=OFF \
+ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-DWITH_MANPAGE=ON \
-DWITH_PYTHON3=ON \
-DWITH_SYSTEMD=ON \
%if 0%{?rhel} && ! 0%{?centos}
-DWITH_SUBMAN=ON \
%endif
-%if 0%{with xio}
- -DWITH_XIO=ON \
-%endif
%if 0%{without ceph_test_package}
-DWITH_TESTS=OFF \
%endif
%endif
%if %{with lttng}
-DWITH_LTTNG=ON \
- -DHAVE_BABELTRACE=ON \
+ -DWITH_BABELTRACE=ON \
%else
-DWITH_LTTNG=OFF \
- -DHAVE_BABELTRACE=OFF \
+ -DWITH_BABELTRACE=OFF \
%endif
$CEPH_EXTRA_CMAKE_ARGS \
%if 0%{with ocf}
-DWITH_OCF=ON \
%endif
%ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64
- -DWITH_RADOSGW_BEAST_FRONTEND=ON \
+ -DWITH_BOOST_CONTEXT=ON \
%else
- -DWITH_RADOSGW_BEAST_FRONTEND=OFF \
+ -DWITH_BOOST_CONTEXT=OFF \
%endif
-DBOOST_J=%{_smp_ncpus}
install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf
install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
+install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
# firewall templates and /sbin/mount.ceph symlink
%if 0%{?suse_version}
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mgr
+mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd
%if 0%{?suse_version}
# create __pycache__ directories and their contents
%{_bindir}/crushtool
%{_bindir}/monmaptool
%{_bindir}/osdmaptool
+%{_bindir}/ceph-kvstore-tool
%{_bindir}/ceph-run
%{_bindir}/ceph-detect-init
%{_libexecdir}/systemd/system-preset/50-ceph.preset
%{_unitdir}/ceph.target
%{python_sitelib}/ceph_detect_init*
%{python_sitelib}/ceph_disk*
+%dir %{python_sitelib}/ceph_volume
+%{python_sitelib}/ceph_volume/*
+%{python_sitelib}/ceph_volume-*
%{_mandir}/man8/ceph-deploy.8*
%{_mandir}/man8/ceph-detect-init.8*
%{_mandir}/man8/ceph-create-keys.8*
%{_mandir}/man8/crushtool.8*
%{_mandir}/man8/osdmaptool.8*
%{_mandir}/man8/monmaptool.8*
+%{_mandir}/man8/ceph-kvstore-tool.8*
#set up placeholder directories
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/tmp
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mds
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rgw
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mgr
+%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd
%post base
/sbin/ldconfig
%if 0%{?suse_version}
%fillup_only
if [ $1 -eq 1 ] ; then
- /usr/bin/systemctl preset ceph-disk@\*.service ceph.target >/dev/null 2>&1 || :
+/usr/bin/systemctl preset ceph-disk@\*.service ceph.target >/dev/null 2>&1 || :
fi
%endif
%if 0%{?fedora} || 0%{?rhel}
%postun base
/sbin/ldconfig
+test -n "$FIRST_ARG" || FIRST_ARG=$1
%if 0%{?suse_version}
DISABLE_RESTART_ON_UPDATE="yes"
%service_del_postun ceph-disk@\*.service ceph.target
fi
%files common
-%docdir %{_docdir}
-%docdir %{_docdir}/ceph
+%dir %{_docdir}/ceph
%doc %{_docdir}/ceph/sample.ceph.conf
%doc %{_docdir}/ceph/COPYING
%{_bindir}/ceph
%files mon
%{_bindir}/ceph-mon
%{_bindir}/ceph-rest-api
+%{_bindir}/ceph-monstore-tool
%{_mandir}/man8/ceph-mon.8*
%{_mandir}/man8/ceph-rest-api.8*
%{python_sitelib}/ceph_rest_api.py*
%{_bindir}/ceph-clsinfo
%{_bindir}/ceph-bluestore-tool
%{_bindir}/ceph-objectstore-tool
+%{_bindir}/ceph-osdomap-tool
%{_bindir}/ceph-osd
%{_libexecdir}/ceph/ceph-osd-prestart.sh
+%{_sbindir}/ceph-volume
+%{_sbindir}/ceph-volume-systemd
%dir %{_udevrulesdir}
%{_udevrulesdir}/60-ceph-by-parttypeuuid.rules
%{_udevrulesdir}/95-ceph-osd.rules
%{_mandir}/man8/ceph-clsinfo.8*
%{_mandir}/man8/ceph-osd.8*
+%{_mandir}/man8/ceph-bluestore-tool.8*
+%{_mandir}/man8/ceph-volume.8*
+%{_mandir}/man8/ceph-volume-systemd.8*
%if 0%{?rhel} && ! 0%{?centos}
%attr(0755,-,-) %{_sysconfdir}/cron.hourly/subman
%endif
%{_unitdir}/ceph-osd@.service
%{_unitdir}/ceph-osd.target
+%{_unitdir}/ceph-volume@.service
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
+%config(noreplace) %{_sysctldir}/90-ceph-osd.conf
%post osd
%if 0%{?suse_version}
if [ $1 -eq 1 ] ; then
- /usr/bin/systemctl preset ceph-osd@\*.service ceph-osd.target >/dev/null 2>&1 || :
+ /usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || :
fi
%endif
%if 0%{?fedora} || 0%{?rhel}
-%systemd_post ceph-osd@\*.service ceph-osd.target
+%systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
%endif
if [ $1 -eq 1 ] ; then
/usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || :
fi
+%if 0%{?sysctl_apply}
+ %sysctl_apply 90-ceph-osd.conf
+%else
+ /usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || :
+%endif
+# work around https://tracker.ceph.com/issues/24903
+chown -f -h ceph:ceph /var/lib/ceph/osd/*/block* 2>&1 > /dev/null || :
%preun osd
%if 0%{?suse_version}
-%service_del_preun ceph-osd@\*.service ceph-osd.target
+%service_del_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
%endif
%if 0%{?fedora} || 0%{?rhel}
-%systemd_preun ceph-osd@\*.service ceph-osd.target
+%systemd_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
%endif
%postun osd
test -n "$FIRST_ARG" || FIRST_ARG=$1
%if 0%{?suse_version}
DISABLE_RESTART_ON_UPDATE="yes"
-%service_del_postun ceph-osd@\*.service ceph-osd.target
+%service_del_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
%endif
%if 0%{?fedora} || 0%{?rhel}
-%systemd_postun ceph-osd@\*.service ceph-osd.target
+%systemd_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
%endif
if [ $FIRST_ARG -ge 1 ] ; then
# Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
source $SYSCONF_CEPH
fi
if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
- /usr/bin/systemctl try-restart ceph-osd@\*.service > /dev/null 2>&1 || :
+ /usr/bin/systemctl try-restart ceph-osd@\*.service ceph-volume@\*.service > /dev/null 2>&1 || :
fi
fi
%dir %{_prefix}/lib/ocf
%dir %{_prefix}/lib/ocf/resource.d
%dir %{_prefix}/lib/ocf/resource.d/ceph
-%{_prefix}/lib/ocf/resource.d/ceph/rbd
+%attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/ceph/rbd
%endif
%{_libdir}/librbd_tp.so.*
%endif
-%post -n librbd1
-/sbin/ldconfig
-mkdir -p /usr/lib64/qemu/
-ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
+%post -n librbd1 -p /sbin/ldconfig
%postun -n librbd1 -p /sbin/ldconfig
%{_bindir}/ceph_tpbench
%{_bindir}/ceph_xattr_bench
%{_bindir}/ceph-coverage
-%{_bindir}/ceph-monstore-tool
-%{_bindir}/ceph-osdomap-tool
-%{_bindir}/ceph-kvstore-tool
%{_bindir}/ceph-debugpack
%{_mandir}/man8/ceph-debugpack.8*
%dir %{_libdir}/ceph