# # spec file for package ceph # # Copyright (c) 2026 SUSE LLC and contributors # Copyright (C) 2004-2019 The Ceph Project Developers. See COPYING file # at the top-level directory of this distribution and at # https://github.com/ceph/ceph/blob/master/COPYING # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %bcond_with ringdisabled %bcond_with make_check %bcond_with zbd %bcond_with cmake_verbose_logging %bcond_with ceph_test_package %bcond_with minimal_debugging_information %ifarch s390 %bcond_with tcmalloc %else %bcond_without tcmalloc %endif %bcond_without rbd_ssd_cache %ifarch x86_64 %bcond_without rbd_rwl_cache %else %bcond_with rbd_rwl_cache %endif %if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %if 0%{?rhel} < 9 || 0%{?openEuler} %bcond_with system_pmdk %else %ifarch s390x aarch64 %bcond_with system_pmdk %else %bcond_without system_pmdk %endif %endif %bcond_without selinux %bcond_without amqp_endpoint %bcond_without kafka_endpoint %bcond_without lttng %bcond_without libradosstriper %bcond_without ocf %global luarocks_package_name luarocks %bcond_without lua_packages %global _remote_tarball_prefix https://download.ceph.com/tarballs/ %endif %if 0%{?suse_version} %ifarch s390x %bcond_with system_pmdk %else %bcond_without system_pmdk %endif %bcond_with amqp_endpoint %bcond_with cephfs_java %bcond_with kafka_endpoint %bcond_with libradosstriper %ifarch x86_64 aarch64 ppc64le %bcond_without lttng %else %bcond_with lttng %endif %bcond_with ocf %bcond_with selinux #Compat macro for _fillupdir macro introduced in Nov 2017 %if ! %{defined _fillupdir} %global _fillupdir /var/adm/fillup-templates %endif #luarocks %if 0%{?is_opensuse} # openSUSE %bcond_without lua_packages %if 0%{?sle_version} # openSUSE Leap %global luarocks_package_name lua53-luarocks %else # openSUSE Tumbleweed %global luarocks_package_name lua54-luarocks %endif %else # SLE %bcond_with lua_packages %endif %endif %bcond_with seastar %if 0%{?suse_version} || 0%{?openEuler} %bcond_with jaeger %else %bcond_without jaeger %endif %if 0%{?fedora} || 0%{?suse_version} >= 1500 || 0%{?rhel} >= 9 # distros that ship cmd2 and/or colorama %bcond_without cephfs_shell %else # distros that do _not_ ship cmd2/colorama %bcond_with cephfs_shell %endif %if 0%{?fedora} || 0%{?rhel} >= 9 %bcond_without system_arrow %else # for centos 8, utf8proc-devel comes from the subversion-devel module which isn't available in EPEL8 # this is tracked in https://bugzilla.redhat.com/2152265 %bcond_with system_arrow %endif %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} >= 8 || 0%{?openEuler} %global weak_deps 1 %endif %if %{with selinux} # get selinux policy version # Force 0.0.0 policy version for centos builds to avoid repository sync issues between rhel and centos %if 0%{?centos} %global _selinux_policy_version 0.0.0 %else %{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0} %endif %endif %{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d} %{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create} %{!?python3_pkgversion: %global python3_pkgversion 3} %{!?python3_version_nodots: %global python3_version_nodots 3} %{!?python3_version: %global python3_version 3} %{!?gts_prefix: %global gts_prefix gcc-toolset-11} %if ! 0%{?suse_version} # use multi-threaded xz compression: xz level 7 using ncpus threads %global _source_payload w7T%{_smp_build_ncpus}.xzdio %global _binary_payload w7T%{_smp_build_ncpus}.xzdio %endif %define smp_limit_mem_per_job() %( \ kb_per_job=%1 \ kb_total=$(head -3 /proc/meminfo | sed -n 's/MemAvailable:\\s*\\(.*\\) kB.*/\\1/p') \ jobs=$(( $kb_total / $kb_per_job )) \ [ $jobs -lt 1 ] && jobs=1 \ echo $jobs ) %if 0%{?_smp_ncpus_max} == 0 %if 0%{?__isa_bits} == 32 # 32-bit builds can use 3G memory max, which is not enough even for -j2 %global _smp_ncpus_max 1 %else # 3.0 GiB mem per job # SUSE distros use limit_build in the place of smp_limit_mem_per_job, please # be sure to update it (in the build section, below) as well when changing this # number. %global _smp_ncpus_max %{smp_limit_mem_per_job 3000000} %endif %endif # disable -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1, as gcc-toolset-{10,11}-annobin # do not provide gcc-annobin.so anymore, despite that they provide annobin.so. but # redhat-rpm-config still passes -fplugin=gcc-annobin to the compiler. %undefine _annotated_build %if 0%{?rhel} == 8 && 0%{?enable_devtoolset11:1} %enable_devtoolset11 %endif ################################################################################# # main package definition ################################################################################# Name: ceph Version: 18.2.7 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 %global _epoch_prefix %{?epoch:%{epoch}:} Summary: User space components of the Ceph file system License: BSD-3-Clause AND BSL-1.0 AND CC-BY-SA-3.0 AND LGPL-2.1-only AND LGPL-3.0-only AND GPL-2.0-only AND MIT %if 0%{?suse_version} Group: System/Filesystems %endif URL: http://ceph.com/ Source0: %{?_remote_tarball_prefix}ceph-%{version}.tar.bz2 Source1: ceph-rpmlintrc # PATCH-FIX-UPSTREAM ceph-mgr-stop-using-deprecated-api-to-initialize-python.patch -- 4cf9b36c66fd64f2dc50f4e1acca3fe93e29b3f2 Patch0: ceph-mgr-stop-using-deprecated-api-to-initialize-python.patch # PATCH-FIX-UPSTREAM ceph-mgr-set-argv-for-python.patch -- 07773617f339a2779aa7cf910c0361c937ffe4c2 Patch1: ceph-mgr-set-argv-for-python.patch # PATCH-FIX-UPSTREAM ceph-mgr-add-site-packages-paths.patch -- 51a5774aa605f3b976ced47902e15ce450f50339 Patch2: ceph-mgr-add-site-packages-paths.patch # PATCH-FIX-UPSTREAM ceph-librbd-fix-atomic-shared-pointer.patch - 7e3f243eae129634359dac1943f85155f6ff3e61 Patch3: ceph-librbd-fix-atomic-shared-pointer.patch # PATCH-FIX-UPSTREAM ceph-cmake-ensure-git-exists-before-executing-it.patch -- 8615731637a116f7b9299c6122a0e058d43a4f6d Patch4: ceph-cmake-ensure-git-exists-before-executing-it.patch # PATCH-FIX-UPSTREAM ceph-build-fix-fmt-version-check.patch -- 686dd3d838b6de6bf1101f0b61f729426b0bccad Patch5: ceph-build-fix-fmt-version-check.patch # PATCH-FIX-UPSTREAM ceph-tracing-fix-c-type-errors-in-librados-tracing.patch -- f9aea9105b6c1a8d7bff0ec0675f84f2ffb1db6f Patch6: ceph-tracing-fix-c-type-errors-in-librados-tracing.patch # PATCH-FIX-UPSTREAM ceph-pybind-fix-c-type-errors-in-cython-generated-python-bindings.patch -- a49d154f4a8e493baf2296a15c7b5c56cd25e993 Patch7: ceph-pybind-fix-c-type-errors-in-cython-generated-python-bindings.patch # PATCH-FIX-UPSTREAM ceph-volume-fix-importlib.metadata-compat.patch -- 8c78a22d2cf69892570f635735d9735169b64a75 Patch8: ceph-volume-fix-importlib.metadata-compat.patch # PATCH-FIX-UPSTREAM ceph-mgr-python-avoid-pyo3-errors.patch -- PR #62951 Patch9: ceph-mgr-python-avoid-pyo3-errors.patch # PATCH-FIX-UPSTREAM ceph-mgr-fix-module-import-by-making-NOTIFY_TYPES-in-py-m.patch Patch10: ceph-mgr-fix-module-import-by-making-NOTIFY_TYPES-in-py-m.patch # PATCH-FIX-OPENSUSE ceph-mgr-workaround-numpy-28271.patch -- Workaround for numpy #28271 Patch11: ceph-mgr-workaround-numpy-28271.patch # PATCH-FIX-UPSTREAM cephadm-fix-get_cluster_count_when_data_dir_is_missing.patch -- PR #63952 Patch12: cephadm-fix-get_cluster_count_when_data_dir_is_missing.patch # PATCH-FIX-OPENSUSE ceph-rocksdb-gcc15.patch -- Fix gcc15 compatibility issues Patch13: ceph-rocksdb-gcc15.patch # PATCH-FIX-UPSTREAM replace CryptoPP calls with GnuTLS [jsc#PED-13011] Patch14: ceph-replace-CryptoPP-calls-with-GnuTLS.patch # PATCH-FIX-OPENSUSE cephadm-reproducible.patch -- Ensure cephadm executable is reproducible Patch15: cephadm-reproducible.patch # PATCH-FIX-OPENSUSE ceph-liburing-build-fix.patch -- fix build with glibc 2.43 Patch16: ceph-liburing-build-fix.patch # PATCH-FIX-OPENSUSE ceph-gcc16-build-fix.patch -- fix build with gcc 16 Patch17: ceph-gcc16-build-fix.patch # PATCH-FIX-OPENSUSE cephadm-source-date-epoch.patch -- reproducible zip timestamps in cephadm Patch18: cephadm-source-date-epoch.patch %if 0%{?suse_version} # _insert_obs_source_lines_here ExclusiveArch: x86_64 aarch64 ppc64le s390x riscv64 %endif ################################################################################# # dependencies that apply across all distro families ################################################################################# Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release} Requires: ceph-mds = %{_epoch_prefix}%{version}-%{release} Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} Requires: ceph-mon = %{_epoch_prefix}%{version}-%{release} Requires(post): binutils %if 0%{with cephfs_java} BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: sharutils %endif %if 0%{with selinux} BuildRequires: checkpolicy BuildRequires: selinux-policy-devel %endif BuildRequires: cmake > 3.5 BuildRequires: git BuildRequires: gperf BuildRequires: pkgconfig(fuse3) %if 0%{?fedora} || 0%{?suse_version} > 1500 || 0%{?rhel} == 9 || 0%{?openEuler} BuildRequires: gcc-c++ >= 11 %endif %if 0%{?suse_version} == 1500 BuildRequires: gcc11-c++