# 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
# main package definition
#################################################################################
Name: ceph
-Version: 12.1.1
+Version: 12.2.3
Release: 0%{?dist}
%if 0%{?fedora} || 0%{?rhel}
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
Group: System/Filesystems
%endif
URL: http://ceph.com/
-Source0: http://ceph.com/download/ceph-12.1.1.tar.bz2
+Source0: http://ceph.com/download/ceph-12.2.3.tar.bz2
%if 0%{?suse_version}
%if 0%{?is_opensuse}
ExclusiveArch: x86_64 aarch64 ppc64 ppc64le
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-pecan
+BuildRequires: socat
+%endif
BuildRequires: bc
BuildRequires: gperf
BuildRequires: cmake
BuildRequires: python
BuildRequires: python-devel
BuildRequires: python-nose
-BuildRequires: python-pecan
BuildRequires: python-requests
BuildRequires: python-virtualenv
-BuildRequires: python-werkzeug
-BuildRequires: socat
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
%if 0%{?suse_version}
Recommends: ntp-daemon
%endif
-%if 0%{with xio}
-Requires: libxio
-%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.
Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
%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
%if 0%{?suse_version}
Requires: gptfdisk
%endif
-Requires: parted
+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/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
# common
#################################################################################
%prep
-%autosetup -p1 -n ceph-12.1.1
+%autosetup -p1 -n ceph-12.2.3
%build
%if 0%{with cephfs_java}
-DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
-DCMAKE_INSTALL_MANDIR=%{_mandir} \
-DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \
+ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-DWITH_EMBEDDED=OFF \
-DWITH_MANPAGE=ON \
-DWITH_PYTHON3=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 \
- -DWTIH_BABELTRACE=ON \
+ -DWITH_BABELTRACE=ON \
%else
-DWITH_LTTNG=OFF \
- -DWTIH_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}
%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
%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