Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ceph for openSUSE:Factory checked in at 2025-06-27 23:00:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ceph (Old) and /work/SRC/openSUSE:Factory/.ceph.new.7067 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ceph" Fri Jun 27 23:00:37 2025 rev:100 rq:1288386 version:18.2.7 Changes: -------- --- /work/SRC/openSUSE:Factory/ceph/ceph.changes 2025-04-20 19:50:45.453850023 +0200 +++ /work/SRC/openSUSE:Factory/.ceph.new.7067/ceph.changes 2025-06-27 23:01:35.293955509 +0200 @@ -1,0 +2,97 @@ +Tue Jun 24 20:36:58 UTC 2025 - James Oakley <jf...@opensuse.org> + +- Disable ceph-mgr-cephadm in ring1 + +------------------------------------------------------------------- +Wed Jun 18 10:52:11 UTC 2025 - James Oakley <jf...@opensuse.org> + +- Added cephadm-fix-get_cluster_count_when_data_dir_is_missing.patch +- Add ceph-rocksdb-gcc15.patch + +------------------------------------------------------------------- +Tue Jun 3 20:46:41 UTC 2025 - James Oakley <jf...@opensuse.org> + +- Add ceph-volume-fix-importlib.metadata-compat.patch +- Added ceph-mgr-python-avoid-pyo3-errors.patch +- Added ceph-mgr-do-not-require-NOTIFY_TYPES-in-python-modules.patch +- Added ceph-mgr-workaround-numpy-28271.patch + +------------------------------------------------------------------- +Sun Jun 01 18:27:14 UTC 2025 - James Oakley <jf...@opensuse.org> + +- Update to 18.2.7 (Reef): + + RADOS + * FileStore is not supported in Reef. + * RocksDB has been upgraded to version 7.9.2. + * There have been significant improvements to RocksDB iteration overhead + and performance. + * The `perf dump` and `perf schema` commands have been deprecated in favor + of the new `counter dump` and `counter schema` commands. + * Cache tiering is now deprecated. + * A new feature, the "read balancer", is now available, which allows users + to balance primary PGs per pool on their clusters. + * A POOL_APP_NOT_ENABLED health warning will now be reported if the + application is not enabled for the pool whether the pool is in use or + not. + * The get_pool_is_selfmanaged_snaps_mode C++ API has been deprecated due + to being prone to false negative results. Its safer replacement is + pool_is_in_selfmanaged_snaps_mode. + * A new command, `ceph osd rm-pg-upmap-primary-all`, has been added that + allows users to clear all pg-upmap-primary mappings in the osdmap when + desired. + * A bug related to IPv6 support is now fixed. + + RGW + * Bucket resharding is now supported for multi-site configurations. + * There have been significant improvements to the stability and + consistency of multi-site replication. + * Compression is now supported for objects uploaded with Server-Side + Encryption. + * S3 multipart uploads using Server-Side Encryption now replicate + correctly in a multi-site deployment. + * New tools have been added to `radosgw-admin` for identifying and + correcting issues with versioned bucket indexes. + + Dashboard + * There is a new Dashboard page with improved layout. Active alerts and + some important charts are now displayed inside cards. + * An overview page for RGW to show the overall status of RGW components. + * Added management support for RGW Multi-site and CephFS Subvolumes and + groups. + * Fixed several issues in Ceph dashboard on Rook-backed clusters, and + improved the user experience on the Rook environment. + + RBD + * Support for layered client-side encryption has been added. + * When diffing against the beginning of time (fromsnapname == NULL) in + fast-diff mode (whole_object == true with fast-diff image feature + enabled and valid), diff-iterate is now guaranteed to execute locally if + exclusive lock is available. This brings a dramatic performance + improvement for QEMU live disk synchronization and backup use cases. + * The option --image-id has been added to `rbd children` CLI command, so + it can be run for images in the trash. + * The try-netlink mapping option for rbd-nbd has become the default and is + now deprecated. + + Telemetry + * Users can now opt in to participate in a leaderboard in the telemetry + public dashboards. + + CEPHFS + * MDS now evicts clients which are not advancing their request tids. + + mgr + * For clusters with multiple CephFS file systems, all the snap-schedule + commands now expect the ‘--fs’ argument. + * Refine the orchestrator availability check to prevent against crashes in + the prometheus module during startup. + + ceph-volume + * A bug related to cryptsetup version handling has been fixed. +- Switched to managing the spec directly with a pristine source and set of + patches +- Removed ceph-test +- Removed checkin scripts +- Added ceph-mgr-stop-using-deprecated-api-to-initialize-python.patch +- Added ceph-mgr-set-argv-for-python.patch +- Added ceph-mgr-add-site-packages-paths.patch +- Added ceph-librbd-fix-atomic-shared-pointer.patch +- Added ceph-cmake-ensure-git-exists-before-executing-it.patch +- Added ceph-build-fix-fmt-version-check.patch +- Added ceph-tracing-fix-c-type-errors-in-librados-tracing.patch +- Added ceph-pybind-fix-c-type-errors-in-cython-generated-python-bindings.patch + +------------------------------------------------------------------- Old: ---- README-ceph-test.txt README-checkin.txt README-constraints.txt README-packaging.txt _multibuild ceph-16.2.15-84-gb9c09b69575.tar.bz2 ceph-test.spec checkin.sh pre_checkin.env pre_checkin.sh New: ---- ceph-18.2.7.tar.bz2 ceph-build-fix-fmt-version-check.patch ceph-cmake-ensure-git-exists-before-executing-it.patch ceph-librbd-fix-atomic-shared-pointer.patch ceph-mgr-add-site-packages-paths.patch ceph-mgr-do-not-require-NOTIFY_TYPES-in-python-modules.patch ceph-mgr-python-avoid-pyo3-errors.patch ceph-mgr-set-argv-for-python.patch ceph-mgr-stop-using-deprecated-api-to-initialize-python.patch ceph-mgr-workaround-numpy-28271.patch ceph-pybind-fix-c-type-errors-in-cython-generated-python-bindings.patch ceph-rocksdb-gcc15.patch ceph-tracing-fix-c-type-errors-in-librados-tracing.patch ceph-volume-fix-importlib.metadata-compat.patch cephadm-fix-get_cluster_count_when_data_dir_is_missing.patch ----------(New B)---------- New:- Added ceph-cmake-ensure-git-exists-before-executing-it.patch - Added ceph-build-fix-fmt-version-check.patch - Added ceph-tracing-fix-c-type-errors-in-librados-tracing.patch New:- Added ceph-librbd-fix-atomic-shared-pointer.patch - Added ceph-cmake-ensure-git-exists-before-executing-it.patch - Added ceph-build-fix-fmt-version-check.patch New:- Added ceph-mgr-add-site-packages-paths.patch - Added ceph-librbd-fix-atomic-shared-pointer.patch - Added ceph-cmake-ensure-git-exists-before-executing-it.patch New:- Added ceph-mgr-set-argv-for-python.patch - Added ceph-mgr-add-site-packages-paths.patch - Added ceph-librbd-fix-atomic-shared-pointer.patch New:- Added ceph-mgr-python-avoid-pyo3-errors.patch - Added ceph-mgr-do-not-require-NOTIFY_TYPES-in-python-modules.patch - Added ceph-mgr-workaround-numpy-28271.patch New:- Add ceph-volume-fix-importlib.metadata-compat.patch - Added ceph-mgr-python-avoid-pyo3-errors.patch - Added ceph-mgr-do-not-require-NOTIFY_TYPES-in-python-modules.patch New:- Added ceph-mgr-stop-using-deprecated-api-to-initialize-python.patch - Added ceph-mgr-set-argv-for-python.patch - Added ceph-mgr-add-site-packages-paths.patch New:- Removed checkin scripts - Added ceph-mgr-stop-using-deprecated-api-to-initialize-python.patch - Added ceph-mgr-set-argv-for-python.patch New:- Added ceph-mgr-do-not-require-NOTIFY_TYPES-in-python-modules.patch - Added ceph-mgr-workaround-numpy-28271.patch New:- Added ceph-tracing-fix-c-type-errors-in-librados-tracing.patch - Added ceph-pybind-fix-c-type-errors-in-cython-generated-python-bindings.patch New:- Added cephadm-fix-get_cluster_count_when_data_dir_is_missing.patch - Add ceph-rocksdb-gcc15.patch New:- Added ceph-build-fix-fmt-version-check.patch - Added ceph-tracing-fix-c-type-errors-in-librados-tracing.patch - Added ceph-pybind-fix-c-type-errors-in-cython-generated-python-bindings.patch New: - Add ceph-volume-fix-importlib.metadata-compat.patch - Added ceph-mgr-python-avoid-pyo3-errors.patch New: - Added cephadm-fix-get_cluster_count_when_data_dir_is_missing.patch - Add ceph-rocksdb-gcc15.patch ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ceph.spec ++++++ --- /var/tmp/diff_new_pack.0U9bkL/_old 2025-06-27 23:01:38.958106520 +0200 +++ /var/tmp/diff_new_pack.0U9bkL/_new 2025-06-27 23:01:38.962106685 +0200 @@ -3,25 +3,26 @@ # # spec file for package ceph # +# Copyright (c) 2025 SUSE LLC # 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. -# -# This file is under the GNU Lesser General Public License, version 2.1 -# -# Please submit bugfixes or comments via http://tracker.ceph.com/ -# +# 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. -################################################################################# -# conditional build section +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -# please read http://rpm.org/user_doc/conditional_builds.html for explanation of -# bcond syntax! -################################################################################# + +# Disable some parts for the ring1 build +%bcond_with ringdisabled + %bcond_with make_check %bcond_with zbd %bcond_with cmake_verbose_logging @@ -32,25 +33,23 @@ %else %bcond_without tcmalloc %endif -%if 0%{?rhel} >= 9 -%bcond_without system_pmdk -%else -%bcond_with system_pmdk -%endif -%if 0%{?fedora} || 0%{?rhel} -%bcond_without selinux -%ifarch x86_64 ppc64le -%bcond_without rbd_rwl_cache %bcond_without rbd_ssd_cache +%ifarch x86_64 +%bcond_without rbd_rwl_cache %else %bcond_with rbd_rwl_cache -%bcond_with rbd_ssd_cache %endif -%if 0%{?rhel} >= 8 -%bcond_with cephfs_java +%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 cephfs_java +%bcond_without system_pmdk +%endif %endif +%bcond_without selinux %bcond_without amqp_endpoint %bcond_without kafka_endpoint %bcond_without lttng @@ -61,18 +60,19 @@ %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 -%bcond_without rbd_rwl_cache -%bcond_without rbd_ssd_cache %else %bcond_with lttng -%bcond_with rbd_rwl_cache -%bcond_with rbd_ssd_cache %endif %bcond_with ocf %bcond_with selinux @@ -97,15 +97,26 @@ %endif %endif %bcond_with seastar +%if 0%{?suse_version} || 0%{?openEuler} %bcond_with jaeger -%if 0%{?fedora} || 0%{?suse_version} >= 1500 +%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%{?suse_version} || 0%{?rhel} >= 8 +%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} @@ -123,22 +134,47 @@ %{!?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} -# disable dwz which compresses the debuginfo -%global _find_debuginfo_dwz_opts %{nil} +%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 -%if 0%{with seastar} -# disable -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1, as gcc-toolset-{9,10}-annobin +%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: 16.2.15.84+gb9c09b69575 +Version: 18.2.7 Release: 0%{?dist} %if 0%{?fedora} || 0%{?rhel} Epoch: 2 @@ -149,44 +185,83 @@ %global _epoch_prefix %{?epoch:%{epoch}:} Summary: User space components of the Ceph file system -License: LGPL-2.1 and LGPL-3.0 and CC-BY-SA-3.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and MIT +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-16.2.15-84-gb9c09b69575.tar.bz2 +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-do-not-require-NOTIFY_TYPES-in-python-modules.patch -- 4589c4d8ac524206d4fb6349b07c5a4e83f926dc +Patch10: ceph-mgr-do-not-require-NOTIFY_TYPES-in-python-modules.patch +# PATCH-FIX-OPENSUSE ceph-mgr-workaround-numpy-28271.patch -- Workaround for numpy #28271 +Patch11: ceph-mgr-workaround-numpy-28271.patch +# PATCH-FIX-UPSTREAM ceph-mgr-do-not-require-NOTIFY_TYPES-in-python-modules.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 %if 0%{?suse_version} # _insert_obs_source_lines_here -ExclusiveArch: x86_64 aarch64 ppc64le s390x riscv64 +ExclusiveArch: x86_64 aarch64 ppc64le s390x %endif ################################################################################# # dependencies that apply across all distro families ################################################################################# -Requires: ceph-osd = %{_epoch_prefix}%{version} -Requires: ceph-mds = %{_epoch_prefix}%{version} -Requires: ceph-mgr = %{_epoch_prefix}%{version} -Requires: ceph-mon = %{_epoch_prefix}%{version} +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: gperf BuildRequires: cmake > 3.5 -BuildRequires: cryptsetup -BuildRequires: fuse-devel -%if 0%{with seastar} -BuildRequires: gcc-toolset-9-gcc-c++ >= 9.2.1-2.3 -%else -BuildRequires: gcc-c++ +BuildRequires: pkgconfig(fuse3) +BuildRequires: git +BuildRequires: gperf +%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++ +%endif +%if 0%{?rhel} == 8 +BuildRequires: %{gts_prefix}-build +BuildRequires: %{gts_prefix}-gcc-c++ +BuildRequires: %{gts_prefix}-libatomic-devel +%endif +%if 0%{?fedora} || 0%{?rhel} == 9 || 0%{?openEuler} +BuildRequires: libatomic %endif %if 0%{with tcmalloc} # libprofiler did not build on ppc64le until 2.7.90 -%if 0%{?fedora} || 0%{?rhel} >= 8 +%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?openEuler} BuildRequires: gperftools-devel >= 2.7.90 %endif %if 0%{?rhel} && 0%{?rhel} < 8 @@ -196,40 +271,42 @@ BuildRequires: gperftools-devel >= 2.4 %endif %endif -BuildRequires: leveldb-devel > 1.2 +BuildRequires: cryptsetup-devel +BuildRequires: fmt-devel >= 6.2.1 BuildRequires: libaio-devel BuildRequires: libblkid-devel >= 2.17 -BuildRequires: cryptsetup-devel -BuildRequires: libcurl-devel +BuildRequires: libcap-devel BuildRequires: libcap-ng-devel -BuildRequires: ((fmt-devel >= 5.2.1 with fmt-devel < 10) or fmt-9-devel) -BuildRequires: pkgconfig(libudev) +BuildRequires: libcurl-devel +BuildRequires: libicu-devel BuildRequires: libnl3-devel BuildRequires: liboath-devel BuildRequires: libtool BuildRequires: libxml2-devel +BuildRequires: lua-devel BuildRequires: make +BuildRequires: nasm BuildRequires: ncurses-devel -BuildRequires: libicu-devel -BuildRequires: parted BuildRequires: patch BuildRequires: perl BuildRequires: pkgconfig BuildRequires: procps BuildRequires: python%{python3_pkgversion} +BuildRequires: python%{python3_pkgversion}-Cython BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: snappy-devel BuildRequires: sqlite-devel BuildRequires: sudo -BuildRequires: pkgconfig(udev) -BuildRequires: util-linux BuildRequires: valgrind-devel BuildRequires: which -BuildRequires: xfsprogs BuildRequires: xfsprogs-devel BuildRequires: xmlstarlet -BuildRequires: nasm -BuildRequires: lua-devel +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(udev) +%if 0%{with seastar} || 0%{with jaeger} +BuildRequires: yaml-cpp-devel >= 0.6 +%endif %if 0%{with amqp_endpoint} BuildRequires: librabbitmq-devel %endif @@ -237,22 +314,31 @@ BuildRequires: librdkafka-devel %endif %if 0%{with lua_packages} -BuildRequires: %{luarocks_package_name} +Requires: %{luarocks_package_name} %endif %if 0%{with make_check} +BuildRequires: hostname BuildRequires: jq BuildRequires: libuuid-devel +BuildRequires: python%{python3_pkgversion}-asyncssh BuildRequires: python%{python3_pkgversion}-bcrypt -BuildRequires: python%{python3_pkgversion}-pecan -BuildRequires: python%{python3_pkgversion}-requests -BuildRequires: python%{python3_pkgversion}-dateutil BuildRequires: python%{python3_pkgversion}-coverage +BuildRequires: python%{python3_pkgversion}-dateutil +BuildRequires: python%{python3_pkgversion}-natsort +BuildRequires: python%{python3_pkgversion}-pecan BuildRequires: python%{python3_pkgversion}-pyOpenSSL +BuildRequires: python%{python3_pkgversion}-requests BuildRequires: socat %endif %if 0%{with zbd} BuildRequires: libzbd-devel %endif +%if 0%{?suse_version} +BuildRequires: libthrift-devel >= 0.13.0 +%else +BuildRequires: thrift-devel >= 0.13.0 +%endif +BuildRequires: re2-devel %if 0%{with jaeger} BuildRequires: bison BuildRequires: flex @@ -263,83 +349,91 @@ BuildRequires: nlohmann_json-devel %endif BuildRequires: libevent-devel -BuildRequires: yaml-cpp-devel %endif %if 0%{with system_pmdk} +%if 0%{?suse_version} +BuildRequires: libndctl-devel >= 63 +%else +BuildRequires: daxctl-devel >= 63 +BuildRequires: ndctl-devel >= 63 +%endif BuildRequires: libpmem-devel -BuildRequires: libpmemobj-devel +BuildRequires: libpmemobj-devel >= 1.8 +%endif +%if 0%{with system_arrow} +BuildRequires: libarrow-devel +BuildRequires: parquet-libs-devel +BuildRequires: utf8proc-devel %endif %if 0%{with seastar} BuildRequires: c-ares-devel BuildRequires: gnutls-devel BuildRequires: hwloc-devel +BuildRequires: libasan BuildRequires: libpciaccess-devel +BuildRequires: libubsan BuildRequires: lksctp-tools-devel -BuildRequires: protobuf-devel BuildRequires: ragel BuildRequires: systemtap-sdt-devel -BuildRequires: yaml-cpp-devel -%if 0%{?fedora} -BuildRequires: libubsan -BuildRequires: libasan -%endif -%if 0%{?rhel} -BuildRequires: gcc-toolset-9-annobin -BuildRequires: gcc-toolset-9-libubsan-devel -BuildRequires: gcc-toolset-9-libasan-devel -BuildRequires: gcc-toolset-9-libatomic-devel +%if 0%{?rhel} == 8 +BuildRequires: %{gts_prefix}-annobin +BuildRequires: %{gts_prefix}-annobin-plugin-gcc +BuildRequires: %{gts_prefix}-libasan-devel +BuildRequires: %{gts_prefix}-libubsan-devel %endif %endif ################################################################################# # distro-conditional dependencies ################################################################################# %if 0%{?suse_version} -BuildRequires: pkgconfig(systemd) BuildRequires: systemd-rpm-macros +BuildRequires: pkgconfig(systemd) %{?systemd_requires} PreReq: %fillup_prereq BuildRequires: fdupes -BuildRequires: net-tools -BuildRequires: libbz2-devel -BuildRequires: mozilla-nss-devel BuildRequires: keyutils-devel +BuildRequires: libbz2-devel BuildRequires: libopenssl-devel +BuildRequires: memory-constraints +BuildRequires: mozilla-nss-devel +BuildRequires: net-tools +BuildRequires: ninja BuildRequires: openldap2-devel #BuildRequires: krb5 #BuildRequires: krb5-devel BuildRequires: cunit-devel -BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: (python%{python3_pkgversion}-Cython >= 0.29 with python%{python3_pkgversion}-Cython < 3) +BuildRequires: liblz4-devel >= 1.7 BuildRequires: python%{python3_pkgversion}-PrettyTable +BuildRequires: python%{python3_pkgversion}-PyYAML BuildRequires: python%{python3_pkgversion}-Sphinx BuildRequires: rdma-core-devel -BuildRequires: liblz4-devel >= 1.7 # for prometheus-alerts BuildRequires: golang-github-prometheus-prometheus +BuildRequires: jsonnet %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} Requires: systemd BuildRequires: boost-random -BuildRequires: nss-devel BuildRequires: keyutils-libs-devel BuildRequires: libatomic BuildRequires: libibverbs-devel BuildRequires: librdmacm-devel +BuildRequires: ninja-build +BuildRequires: nss-devel BuildRequires: openldap-devel #BuildRequires: krb5-devel BuildRequires: openssl-devel BuildRequires: CUnit-devel +BuildRequires: lz4-devel >= 1.7 BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: python%{python3_pkgversion}-Cython BuildRequires: python%{python3_pkgversion}-prettytable +BuildRequires: python%{python3_pkgversion}-pyyaml BuildRequires: python%{python3_pkgversion}-sphinx -BuildRequires: lz4-devel >= 1.7 %endif # distro-conditional make check dependencies %if 0%{with make_check} BuildRequires: golang -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} BuildRequires: golang-github-prometheus BuildRequires: libtool-ltdl-devel BuildRequires: xmlsec1 @@ -347,22 +441,21 @@ %ifarch x86_64 BuildRequires: xmlsec1-nss %endif -BuildRequires: xmlsec1-openssl -BuildRequires: xmlsec1-openssl-devel BuildRequires: python%{python3_pkgversion}-cherrypy -BuildRequires: python%{python3_pkgversion}-jwt +BuildRequires: python%{python3_pkgversion}-pyOpenSSL BuildRequires: python%{python3_pkgversion}-routes BuildRequires: python%{python3_pkgversion}-scipy BuildRequires: python%{python3_pkgversion}-werkzeug -BuildRequires: python%{python3_pkgversion}-pyOpenSSL +BuildRequires: xmlsec1-openssl +BuildRequires: xmlsec1-openssl-devel %endif +BuildRequires: jsonnet %if 0%{?suse_version} BuildRequires: golang-github-prometheus-prometheus BuildRequires: libxmlsec1-1 BuildRequires: libxmlsec1-nss1 BuildRequires: libxmlsec1-openssl1 BuildRequires: python%{python3_pkgversion}-CherryPy -BuildRequires: python%{python3_pkgversion}-PyJWT BuildRequires: python%{python3_pkgversion}-Routes BuildRequires: python%{python3_pkgversion}-Werkzeug BuildRequires: python%{python3_pkgversion}-numpy-devel @@ -372,30 +465,32 @@ %endif # lttng and babeltrace for rbd-replay-prep %if %{with lttng} -%if 0%{?fedora} || 0%{?rhel} -BuildRequires: lttng-ust-devel +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} BuildRequires: libbabeltrace-devel +BuildRequires: lttng-ust-devel %endif %if 0%{?suse_version} -BuildRequires: lttng-ust-devel BuildRequires: babeltrace-devel +BuildRequires: lttng-ust-devel %endif %endif %if 0%{?suse_version} BuildRequires: libexpat-devel %endif -%if 0%{?rhel} || 0%{?fedora} +%if 0%{?rhel} || 0%{?fedora} || 0%{?openEuler} BuildRequires: expat-devel %endif #hardened-cc1 %if 0%{?fedora} || 0%{?rhel} BuildRequires: redhat-rpm-config %endif +%if 0%{?openEuler} +BuildRequires: openEuler-rpm-config +%endif %if 0%{with seastar} -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} BuildRequires: cryptopp-devel BuildRequires: numactl-devel -BuildRequires: protobuf-compiler %endif %if 0%{?suse_version} BuildRequires: libcryptopp-devel @@ -414,30 +509,26 @@ ################################################################################# # subpackages ################################################################################# + %package base Summary: Ceph Base Package %if 0%{?suse_version} Group: System/Filesystems %endif Provides: ceph-test:/usr/bin/ceph-kvstore-tool -Requires: ceph-common = %{_epoch_prefix}%{version} -Requires: librbd1 = %{_epoch_prefix}%{version} -Requires: librados2 = %{_epoch_prefix}%{version} -Requires: libcephfs2 = %{_epoch_prefix}%{version} -Requires: librgw2 = %{_epoch_prefix}%{version} +Requires: ceph-common = %{_epoch_prefix}%{version}-%{release} +Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} +Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} +Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} %if 0%{with selinux} -Requires: ceph-selinux = %{_epoch_prefix}%{version} +Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release} %endif -Requires: cryptsetup -Requires: e2fsprogs Requires: findutils Requires: grep Requires: logrotate -Requires: parted Requires: psmisc -Requires: python%{python3_pkgversion}-setuptools Requires: util-linux -Requires: xfsprogs Requires: which %if 0%{?rhel} && 0%{?rhel} < 8 # The following is necessary due to tracker 36508 and can be removed once the @@ -455,6 +546,7 @@ Recommends: smartmontools %endif %endif + %description base Base is the package that includes all the files shared amongst ceph servers @@ -462,12 +554,15 @@ Summary: Utility to bootstrap Ceph clusters BuildArch: noarch Requires: lvm2 +Requires: openssh-server Requires: python%{python3_pkgversion} +Requires: which %if 0%{?weak_deps} Recommends: podman >= 2.0.2 %endif Provides: user(cephadm) Provides: group(cephadm) + %description -n cephadm Utility to bootstrap a Ceph cluster and manage Ceph daemons deployed with systemd and podman. @@ -477,28 +572,23 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: librbd1 = %{_epoch_prefix}%{version} -Requires: librados2 = %{_epoch_prefix}%{version} -Requires: libcephfs2 = %{_epoch_prefix}%{version} -Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version} -Requires: python%{python3_pkgversion}-rbd = %{_epoch_prefix}%{version} -Requires: python%{python3_pkgversion}-cephfs = %{_epoch_prefix}%{version} -Requires: python%{python3_pkgversion}-rgw = %{_epoch_prefix}%{version} -Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version} -Requires: python%{python3_pkgversion}-ceph-common = %{_epoch_prefix}%{version} -%if 0%{with jaeger} -Requires: libjaeger = %{_epoch_prefix}%{version} -%endif -%if 0%{?fedora} || 0%{?rhel} +Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} +Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-ceph-common = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-cephfs = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-rbd = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-rgw = %{_epoch_prefix}%{version}-%{release} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} Requires: python%{python3_pkgversion}-prettytable %endif %if 0%{?suse_version} Requires: python%{python3_pkgversion}-PrettyTable %endif %if 0%{with libradosstriper} -Requires: libradosstriper1 = %{_epoch_prefix}%{version} -%else -Obsoletes: libradosstriper1 <= %{_epoch_prefix}%{version}-%{release} +Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release} %endif %{?systemd_requires} %if 0%{?suse_version} @@ -507,6 +597,7 @@ %endif Provides: user(ceph) Provides: group(ceph) + %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. @@ -516,7 +607,8 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-base = %{_epoch_prefix}%{version} +Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} + %description mds ceph-mds is the metadata server daemon for the Ceph distributed file system. One or more instances of ceph-mds collectively manage the file system @@ -528,10 +620,8 @@ Group: System/Filesystems %endif Provides: ceph-test:/usr/bin/ceph-monstore-tool -Requires: ceph-base = %{_epoch_prefix}%{version} -%if 0%{with jaeger} -Requires: libjaeger = %{_epoch_prefix}%{version} -%endif +Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} + %description mon ceph-mon is the cluster monitor daemon for the Ceph distributed file system. One or more instances of ceph-mon form a Paxos part-time @@ -543,16 +633,19 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-base = %{_epoch_prefix}%{version} -Requires: ceph-mgr-modules-core = %{_epoch_prefix}%{version} -Requires: libcephsqlite = %{_epoch_prefix}%{version} +Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} +Requires: ceph-mgr-modules-core = %{_epoch_prefix}%{version}-%{release} +Requires: libcephsqlite = %{_epoch_prefix}%{version}-%{release} %if 0%{?weak_deps} +%if !%{with ringdisabled} +Recommends: ceph-mgr-cephadm = %{_epoch_prefix}%{version}-%{release} +%endif Recommends: ceph-mgr-dashboard = %{_epoch_prefix}%{version}-%{release} Recommends: ceph-mgr-diskprediction-local = %{_epoch_prefix}%{version}-%{release} Recommends: ceph-mgr-k8sevents = %{_epoch_prefix}%{version}-%{release} -Recommends: ceph-mgr-cephadm = %{_epoch_prefix}%{version}-%{release} Recommends: python%{python3_pkgversion}-influxdb %endif + %description mgr ceph-mgr enables python modules that provide services (such as the REST module derived from Calamari) and expose CLI hooks. ceph-mgr gathers @@ -565,13 +658,12 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-mgr = %{_epoch_prefix}%{version} -Requires: ceph-grafana-dashboards = %{_epoch_prefix}%{version} -Requires: ceph-prometheus-alerts = %{_epoch_prefix}%{version} +Requires: ceph-grafana-dashboards = %{_epoch_prefix}%{version}-%{release} +Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} +Requires: ceph-prometheus-alerts = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-setuptools -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} Requires: python%{python3_pkgversion}-cherrypy -Requires: python%{python3_pkgversion}-jwt Requires: python%{python3_pkgversion}-routes Requires: python%{python3_pkgversion}-werkzeug %if 0%{?weak_deps} @@ -580,11 +672,11 @@ %endif %if 0%{?suse_version} Requires: python%{python3_pkgversion}-CherryPy -Requires: python%{python3_pkgversion}-PyJWT Requires: python%{python3_pkgversion}-Routes Requires: python%{python3_pkgversion}-Werkzeug Recommends: python%{python3_pkgversion}-python3-saml %endif + %description mgr-dashboard ceph-mgr-dashboard is a manager module, providing a web-based application to monitor and manage many aspects of a Ceph cluster and related components. @@ -597,12 +689,13 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-mgr = %{_epoch_prefix}%{version} +Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-numpy -%if 0%{?fedora} || 0%{?suse_version} +%if 0%{?fedora} || 0%{?suse_version} || 0%{?openEuler} Requires: python%{python3_pkgversion}-scikit-learn %endif Requires: python3-scipy + %description mgr-diskprediction-local ceph-mgr-diskprediction-local is a ceph-mgr module that tries to predict disk failures using local algorithms and machine-learning databases. @@ -614,12 +707,12 @@ Group: System/Filesystems %endif Requires: python%{python3_pkgversion}-bcrypt +Requires: python%{python3_pkgversion}-dateutil Requires: python%{python3_pkgversion}-pecan Requires: python%{python3_pkgversion}-pyOpenSSL Requires: python%{python3_pkgversion}-requests -Requires: python%{python3_pkgversion}-dateutil Requires: python%{python3_pkgversion}-setuptools -%if 0%{?fedora} || 0%{?rhel} >= 8 +%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?openEuler} Requires: python%{python3_pkgversion}-cherrypy Requires: python%{python3_pkgversion}-pyyaml Requires: python%{python3_pkgversion}-werkzeug @@ -632,6 +725,7 @@ %if 0%{?weak_deps} Recommends: ceph-mgr-rook = %{_epoch_prefix}%{version}-%{release} %endif + %description mgr-modules-core ceph-mgr-modules-core provides a set of modules which are always enabled by ceph-mgr. @@ -642,9 +736,10 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-mgr = %{_epoch_prefix}%{version} -Requires: python%{python3_pkgversion}-kubernetes +Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-jsonpatch +Requires: python%{python3_pkgversion}-kubernetes + %description mgr-rook ceph-mgr-rook is a ceph-mgr module for orchestration functions using a Rook backend. @@ -655,40 +750,48 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-mgr = %{_epoch_prefix}%{version} +Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-kubernetes + %description mgr-k8sevents ceph-mgr-k8sevents is a ceph-mgr module that sends every ceph-events to kubernetes' events API +%if !%{with ringdisabled} %package mgr-cephadm Summary: Ceph Manager module for cephadm-based orchestration BuildArch: noarch %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-mgr = %{_epoch_prefix}%{version} -Requires: python%{python3_pkgversion}-remoto -Requires: cephadm = %{_epoch_prefix}%{version} +Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} +Requires: cephadm = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-asyncssh +Requires: python%{python3_pkgversion}-natsort %if 0%{?suse_version} Requires: openssh +Requires: python%{python3_pkgversion}-CherryPy Requires: python%{python3_pkgversion}-Jinja2 %endif -%if 0%{?rhel} || 0%{?fedora} +%if 0%{?rhel} || 0%{?fedora} || 0%{?openEuler} Requires: openssh-clients +Requires: python%{python3_pkgversion}-cherrypy Requires: python%{python3_pkgversion}-jinja2 %endif + %description mgr-cephadm ceph-mgr-cephadm is a ceph-mgr module for orchestration functions using the integrated cephadm deployment tool management operations. +%endif %package fuse Summary: Ceph fuse-based client %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: fuse +Requires: fuse3 Requires: python%{python3_pkgversion} + %description fuse FUSE based client for Ceph distributed network file system @@ -697,19 +800,31 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-base = %{_epoch_prefix}%{version} -Requires: librados2 = %{_epoch_prefix}%{version} -Requires: libcephfs2 = %{_epoch_prefix}%{version} +Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} +Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} + %description -n cephfs-mirror Daemon for mirroring CephFS snapshots between Ceph clusters. +%package -n ceph-exporter +Summary: Daemon for exposing perf counters as Prometheus metrics +%if 0%{?suse_version} +Group: System/Filesystems +%endif +Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} + +%description -n ceph-exporter +Daemon for exposing perf counters as Prometheus metrics + %package -n rbd-fuse Summary: Ceph fuse-based client %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: librados2 = %{_epoch_prefix}%{version} -Requires: librbd1 = %{_epoch_prefix}%{version} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} +Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} + %description -n rbd-fuse FUSE based client to map Ceph rbd images to files @@ -718,9 +833,10 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-base = %{_epoch_prefix}%{version} -Requires: librados2 = %{_epoch_prefix}%{version} -Requires: librbd1 = %{_epoch_prefix}%{version} +Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} +Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} + %description -n rbd-mirror Daemon for mirroring RBD images between Ceph clusters, streaming changes asynchronously. @@ -730,8 +846,9 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-base = %{_epoch_prefix}%{version} -Requires: librados2 = %{_epoch_prefix}%{version} +Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} + %description immutable-object-cache Daemon for immutable object cache. @@ -740,8 +857,9 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: librados2 = %{_epoch_prefix}%{version} -Requires: librbd1 = %{_epoch_prefix}%{version} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} +Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} + %description -n rbd-nbd NBD based client to map Ceph rbd images to local device @@ -750,18 +868,19 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-base = %{_epoch_prefix}%{version} +Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} %if 0%{with selinux} -Requires: ceph-selinux = %{_epoch_prefix}%{version} +Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release} %endif -Requires: librados2 = %{_epoch_prefix}%{version} -Requires: librgw2 = %{_epoch_prefix}%{version} -%if 0%{?rhel} || 0%{?fedora} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} +Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} +%if 0%{?rhel} || 0%{?fedora} || 0%{?openEuler} Requires: mailcap %endif %if 0%{?weak_deps} Recommends: gawk %endif + %description radosgw RADOS is a distributed object store used by the Ceph distributed storage system. This package provides a REST gateway to the @@ -769,9 +888,11 @@ service as well as the OpenStack Object Storage ("Swift") API. %package -n cephfs-top -Summary: top(1) like utility for Ceph Filesystem +Summary: A top(1) like utility for Ceph Filesystem BuildArch: noarch +Requires: python%{python3_pkgversion}-base Requires: python%{python3_pkgversion}-rados + %description -n cephfs-top This package provides a top(1) like utility to display Ceph Filesystem metrics in realtime. @@ -779,11 +900,13 @@ %if %{with ocf} %package resource-agents Summary: OCF-compliant resource agents for Ceph daemons +BuildArch: noarch %if 0%{?suse_version} Group: System/Filesystems %endif Requires: ceph-base = %{_epoch_prefix}%{version} Requires: resource-agents + %description resource-agents Resource agents for monitoring and managing Ceph daemons under Open Cluster Framework (OCF) compliant resource @@ -796,11 +919,13 @@ Group: System/Filesystems %endif Provides: ceph-test:/usr/bin/ceph-osdomap-tool -Requires: ceph-base = %{_epoch_prefix}%{version} -Requires: lvm2 -Requires: sudo +Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} Requires: libstoragemgmt -Requires: python%{python3_pkgversion}-ceph-common = %{_epoch_prefix}%{version} +Requires: sudo +%if 0%{?weak_deps} +Recommends: ceph-volume = %{_epoch_prefix}%{version}-%{release} +%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 @@ -812,21 +937,46 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-osd = %{_epoch_prefix}%{version} +Requires: binutils +Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release} + %description crimson-osd crimson-osd is the object storage daemon for the Ceph distributed file system. It is responsible for storing objects on a local file system and providing access to them over the network. %endif +%package volume +Summary: Ceph OSD deployment and inspection tool +BuildArch: noarch +%if 0%{?suse_version} +Group: System/Filesystems +%endif +Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release} +Requires: cryptsetup +Requires: e2fsprogs +Requires: lvm2 +Requires: parted +Requires: python%{python3_pkgversion}-ceph-common = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-setuptools +Requires: python%{python3_pkgversion}-packaging +Requires: util-linux +Requires: xfsprogs + +%description volume +This package contains a tool to deploy OSD with different devices like +lvm or physical disks, and trying to follow a predictable, and robust +way of preparing, activating, and starting the deployed OSD. + %package -n librados2 Summary: RADOS distributed object store client library %if 0%{?suse_version} Group: System/Libraries %endif -%if 0%{?rhel} || 0%{?fedora} +%if 0%{?rhel} || 0%{?fedora} || 0%{?openEuler} Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} %endif + %description -n librados2 RADOS is a reliable, autonomic distributed object storage cluster developed as part of the Ceph distributed storage system. This is a @@ -838,21 +988,24 @@ %if 0%{?suse_version} Group: Development/Libraries/C and C++ %endif -Requires: librados2 = %{_epoch_prefix}%{version} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} Provides: librados2-devel = %{_epoch_prefix}%{version}-%{release} Obsoletes: librados2-devel < %{_epoch_prefix}%{version}-%{release} + %description -n librados-devel This package contains C libraries and headers needed to develop programs that use RADOS object store. %package -n libradospp-devel Summary: RADOS headers +BuildArch: noarch %if 0%{?suse_version} Group: Development/Libraries/C and C++ %endif -Requires: librados2 = %{_epoch_prefix}%{version} -Requires: librados-devel = %{_epoch_prefix}%{version} +Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} + %description -n libradospp-devel This package contains C++ libraries and headers needed to develop programs that use RADOS object store. @@ -862,7 +1015,8 @@ %if 0%{?suse_version} Group: System/Libraries %endif -Requires: librados2 = %{_epoch_prefix}%{version} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} + %description -n librgw2 This package provides a library implementation of the RADOS gateway (distributed object store with S3 and Swift personalities). @@ -872,10 +1026,11 @@ %if 0%{?suse_version} Group: Development/Libraries/C and C++ %endif -Requires: librados-devel = %{_epoch_prefix}%{version} -Requires: librgw2 = %{_epoch_prefix}%{version} +Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} +Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} Provides: librgw2-devel = %{_epoch_prefix}%{version}-%{release} Obsoletes: librgw2-devel < %{_epoch_prefix}%{version}-%{release} + %description -n librgw-devel This package contains libraries and headers needed to develop programs that use RADOS gateway client library. @@ -885,11 +1040,12 @@ %if 0%{?suse_version} Group: Development/Libraries/Python %endif -Requires: librgw2 = %{_epoch_prefix}%{version} -Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version} +Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} %{?python_provide:%python_provide python%{python3_pkgversion}-rgw} Provides: python-rgw = %{_epoch_prefix}%{version}-%{release} Obsoletes: python-rgw < %{_epoch_prefix}%{version}-%{release} + %description -n python%{python3_pkgversion}-rgw This package contains Python 3 libraries for interacting with Ceph RADOS gateway. @@ -899,11 +1055,12 @@ %if 0%{?suse_version} Group: Development/Libraries/Python %endif +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion} -Requires: librados2 = %{_epoch_prefix}%{version} %{?python_provide:%python_provide python%{python3_pkgversion}-rados} Provides: python-rados = %{_epoch_prefix}%{version}-%{release} Obsoletes: python-rados < %{_epoch_prefix}%{version}-%{release} + %description -n python%{python3_pkgversion}-rados This package contains Python 3 libraries for interacting with Ceph RADOS object store. @@ -913,7 +1070,8 @@ %if 0%{?suse_version} Group: System/Libraries %endif -Requires: librados2 = %{_epoch_prefix}%{version} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} + %description -n libcephsqlite A SQLite3 VFS for storing and manipulating databases stored on Ceph's RADOS distributed object store. @@ -923,13 +1081,14 @@ %if 0%{?suse_version} Group: Development/Libraries/C and C++ %endif +Requires: libcephsqlite = %{_epoch_prefix}%{version}-%{release} +Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} +Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release} Requires: sqlite-devel -Requires: libcephsqlite = %{_epoch_prefix}%{version} -Requires: librados-devel = %{_epoch_prefix}%{version} -Requires: libradospp-devel = %{_epoch_prefix}%{version} Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} Provides: libcephsqlite-devel = %{_epoch_prefix}%{version}-%{release} Obsoletes: libcephsqlite-devel < %{_epoch_prefix}%{version}-%{release} + %description -n libcephsqlite-devel A SQLite3 VFS for storing and manipulating databases stored on Ceph's RADOS distributed object store. @@ -940,7 +1099,8 @@ %if 0%{?suse_version} Group: System/Libraries %endif -Requires: librados2 = %{_epoch_prefix}%{version} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} + %description -n libradosstriper1 Striping interface built on top of the rados library, allowing to stripe bigger objects onto several standard rados objects using @@ -951,12 +1111,13 @@ %if 0%{?suse_version} Group: Development/Libraries/C and C++ %endif -Requires: libradosstriper1 = %{_epoch_prefix}%{version} -Requires: librados-devel = %{_epoch_prefix}%{version} -Requires: libradospp-devel = %{_epoch_prefix}%{version} +Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} +Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release} +Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release} Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} Provides: libradosstriper1-devel = %{_epoch_prefix}%{version}-%{release} Obsoletes: libradosstriper1-devel < %{_epoch_prefix}%{version}-%{release} + %description -n libradosstriper-devel This package contains libraries and headers needed to develop programs that use RADOS striping interface. @@ -967,13 +1128,14 @@ %if 0%{?suse_version} Group: System/Libraries %endif -Requires: librados2 = %{_epoch_prefix}%{version} +Requires: librados2 = %{_epoch_prefix}%{version}-%{release} %if 0%{?suse_version} Requires(post): coreutils %endif -%if 0%{?rhel} || 0%{?fedora} +%if 0%{?rhel} || 0%{?fedora} || 0%{?openEuler} Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} %endif + %description -n librbd1 RBD is a block device striped across multiple distributed objects in RADOS, a reliable, autonomic distributed object storage cluster @@ -985,12 +1147,13 @@ %if 0%{?suse_version} Group: Development/Libraries/C and C++ %endif -Requires: librbd1 = %{_epoch_prefix}%{version} -Requires: librados-devel = %{_epoch_prefix}%{version} -Requires: libradospp-devel = %{_epoch_prefix}%{version} +Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} +Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release} +Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} Provides: librbd1-devel = %{_epoch_prefix}%{version}-%{release} Obsoletes: librbd1-devel < %{_epoch_prefix}%{version}-%{release} + %description -n librbd-devel This package contains libraries and headers needed to develop programs that use RADOS block device. @@ -1000,11 +1163,12 @@ %if 0%{?suse_version} Group: Development/Libraries/Python %endif -Requires: librbd1 = %{_epoch_prefix}%{version} -Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version} +Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} %{?python_provide:%python_provide python%{python3_pkgversion}-rbd} Provides: python-rbd = %{_epoch_prefix}%{version}-%{release} Obsoletes: python-rbd < %{_epoch_prefix}%{version}-%{release} + %description -n python%{python3_pkgversion}-rbd This package contains Python 3 libraries for interacting with Ceph RADOS block device. @@ -1014,10 +1178,12 @@ %if 0%{?suse_version} Group: System/Libraries %endif -%if 0%{?rhel} || 0%{?fedora} -Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} +Obsoletes: libcephfs1 < %{_epoch_prefix}%{version}-%{release} +%if 0%{?rhel} || 0%{?fedora} || 0%{?openEuler} Obsoletes: ceph-libcephfs +Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} %endif + %description -n libcephfs2 Ceph is a distributed network file system designed to provide excellent performance, reliability, and scalability. This is a shared library @@ -1029,40 +1195,28 @@ %if 0%{?suse_version} Group: Development/Libraries/C and C++ %endif -Requires: libcephfs2 = %{_epoch_prefix}%{version} -Requires: librados-devel = %{_epoch_prefix}%{version} +Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} +Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} Provides: libcephfs2-devel = %{_epoch_prefix}%{version}-%{release} Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release} + %description -n libcephfs-devel This package contains libraries and headers needed to develop programs that use Ceph distributed file system. -%if 0%{with jaeger} -%package -n libjaeger -Summary: Ceph distributed file system tracing library -%if 0%{?suse_version} -Group: System/Libraries -%endif -Provides: libjaegertracing.so.0()(64bit) -Provides: libopentracing.so.1()(64bit) -Provides: libthrift.so.0.13.0()(64bit) -%description -n libjaeger -This package contains libraries needed to provide distributed -tracing for Ceph. -%endif - %package -n python%{python3_pkgversion}-cephfs Summary: Python 3 libraries for Ceph distributed file system %if 0%{?suse_version} Group: Development/Libraries/Python %endif -Requires: libcephfs2 = %{_epoch_prefix}%{version} -Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version} -Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version} +Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release} +Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} %{?python_provide:%python_provide python%{python3_pkgversion}-cephfs} Provides: python-cephfs = %{_epoch_prefix}%{version}-%{release} Obsoletes: python-cephfs < %{_epoch_prefix}%{version}-%{release} + %description -n python%{python3_pkgversion}-cephfs This package contains Python 3 libraries for interacting with Ceph distributed file system. @@ -1073,6 +1227,7 @@ Group: Development/Libraries/Python %endif %{?python_provide:%python_provide python%{python3_pkgversion}-ceph-argparse} + %description -n python%{python3_pkgversion}-ceph-argparse This package contains types and routines for Python 3 used by the Ceph CLI as well as the RESTful interface. These have to do with querying the daemons for @@ -1081,7 +1236,7 @@ %package -n python%{python3_pkgversion}-ceph-common Summary: Python 3 utility libraries for Ceph -%if 0%{?fedora} || 0%{?rhel} >= 8 +%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?openEuler} Requires: python%{python3_pkgversion}-pyyaml %endif %if 0%{?suse_version} @@ -1091,6 +1246,7 @@ Group: Development/Libraries/Python %endif %{?python_provide:%python_provide python%{python3_pkgversion}-ceph-common} + %description -n python%{python3_pkgversion}-ceph-common This package contains data structures, classes and functions used by Ceph. It also contains utilities used for the cephadm orchestrator. @@ -1098,9 +1254,10 @@ %if 0%{with cephfs_shell} %package -n cephfs-shell Summary: Interactive shell for Ceph file system +Requires: python%{python3_pkgversion}-cephfs Requires: python%{python3_pkgversion}-cmd2 Requires: python%{python3_pkgversion}-colorama -Requires: python%{python3_pkgversion}-cephfs + %description -n cephfs-shell This package contains an interactive tool that allows accessing a Ceph file system without mounting it by providing a nice pseudo-shell which @@ -1113,10 +1270,11 @@ %if 0%{?suse_version} Group: System/Benchmark %endif -Requires: ceph-common -Requires: xmlstarlet +Requires: ceph-common = %{_epoch_prefix}%{version}-%{release} Requires: jq Requires: socat +Requires: xmlstarlet + %description -n ceph-test This package contains Ceph benchmarks and test tools. %endif @@ -1129,7 +1287,8 @@ Group: System/Libraries %endif Requires: java -Requires: libcephfs2 = %{_epoch_prefix}%{version} +Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} + %description -n libcephfs_jni1 This package contains the Java Native Interface library for CephFS Java bindings. @@ -1140,10 +1299,11 @@ Group: Development/Libraries/Java %endif Requires: java -Requires: libcephfs_jni1 = %{_epoch_prefix}%{version} +Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release} Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} Provides: libcephfs_jni1-devel = %{_epoch_prefix}%{version}-%{release} Obsoletes: libcephfs_jni1-devel < %{_epoch_prefix}%{version}-%{release} + %description -n libcephfs_jni-devel This package contains the development files for CephFS Java Native Interface library. @@ -1154,9 +1314,10 @@ Group: System/Libraries %endif Requires: java -Requires: libcephfs_jni1 = %{_epoch_prefix}%{version} Requires: junit +Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release} BuildRequires: junit + %description -n cephfs-java This package contains the Java libraries for the Ceph File System. @@ -1164,10 +1325,12 @@ %package -n rados-objclass-devel Summary: RADOS object class development kit +BuildArch: noarch %if 0%{?suse_version} Group: Development/Libraries/C and C++ %endif -Requires: libradospp-devel = %{_epoch_prefix}%{version} +Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release} + %description -n rados-objclass-devel This package contains libraries and headers needed to develop RADOS object class plugins. @@ -1179,11 +1342,13 @@ %if 0%{?suse_version} Group: System/Filesystems %endif -Requires: ceph-base = %{_epoch_prefix}%{version} -Requires: policycoreutils, libselinux-utils -Requires(post): ceph-base = %{_epoch_prefix}%{version} +Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} +Requires: libselinux-utils +Requires: policycoreutils +Requires(post): ceph-base = %{_epoch_prefix}%{version}-%{release} Requires(post): selinux-policy-base >= %{_selinux_policy_version}, policycoreutils, gawk Requires(postun): policycoreutils + %description selinux This package contains SELinux support for Ceph MON, OSD and MDS. The package also performs file-system relabelling which can take a long time on heavily @@ -1197,6 +1362,7 @@ %if 0%{?suse_version} Group: System/Filesystems %endif + %description grafana-dashboards This package provides a set of Grafana dashboards for monitoring of Ceph clusters. The dashboards require a Prometheus server setup @@ -1208,14 +1374,36 @@ Summary: Prometheus alerts for a Ceph deployment BuildArch: noarch Group: System/Monitoring + %description prometheus-alerts This package provides Ceph default alerts for Prometheus. +%package mib +Summary: MIB for SNMP alerts +BuildArch: noarch +%if 0%{?suse_version} +Group: System/Monitoring +%endif + +%description mib +This package provides a Ceph MIB for SNMP traps. + +%package node-proxy +Summary: HW monitoring agent for Ceph +BuildArch: noarch +%if 0%{?suse_version} +Group: System/Monitoring +%endif + +%description node-proxy +This package provides a Ceph hardware monitoring agent. + ################################################################################# # common ################################################################################# + %prep -%autosetup -p1 -n ceph-16.2.15-84-gb9c09b69575 +%autosetup -p1 -n ceph-%{version} %build # Disable lto on systems that do not support symver attribute @@ -1224,10 +1412,6 @@ %define _lto_cflags %{nil} %endif -%if 0%{with seastar} && 0%{?rhel} -. /opt/rh/gcc-toolset-9/enable -%endif - %if 0%{with cephfs_java} # Find jni.h for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do @@ -1236,8 +1420,7 @@ %endif %if 0%{?suse_version} -# the following setting fixed an OOM condition we once encountered in the OBS -RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768" +%limit_build -m 3000 %endif %if %{with minimal_debugging_information} RPM_OPT_FLAGS="$(echo $RPM_OPT_FLAGS | sed -e 's/^-g /-g1 /g' -e 's/ -g / -g1 /g' -e 's/ -g$/ -g1/g')" @@ -1245,141 +1428,154 @@ export CPPFLAGS="$java_inc" export CFLAGS="$RPM_OPT_FLAGS" -export CXXFLAGS="$RPM_OPT_FLAGS -DFMT_DEPRECATED_OSTREAM" +export CXXFLAGS="$RPM_OPT_FLAGS" export LDFLAGS="$RPM_LD_FLAGS" -test "$RPM_LD_FLAGS" && echo "RPM_LD_FLAGS == $RPM_LD_FLAGS" || echo "RPM_LD_FLAGS is empty" %if 0%{with seastar} # seastar uses longjmp() to implement coroutine. and this annoys longjmp_chk() export CXXFLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g') +# remove from CFLAGS too because it causes the arrow submodule to fail with: +# warning _FORTIFY_SOURCE requires compiling with optimization (-O) +export CFLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g') %endif -# Parallel build settings ... -CEPH_MFLAGS_JOBS="%{?_smp_mflags}" -CEPH_SMP_NCPUS=$(echo "$CEPH_MFLAGS_JOBS" | sed 's/-j//') -%if 0%{?__isa_bits} == 32 -# 32-bit builds can use 3G memory max, which is not enough even for -j2 -CEPH_SMP_NCPUS="1" -%endif -# do not eat all memory -echo "Available memory:" -free -h -echo "System limits:" -ulimit -a -if test -n "$CEPH_SMP_NCPUS" -a "$CEPH_SMP_NCPUS" -gt 1 ; then - mem_per_process=2500 - max_mem=$(LANG=C free -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p") - max_jobs="$(($max_mem / $mem_per_process))" - test "$CEPH_SMP_NCPUS" -gt "$max_jobs" && CEPH_SMP_NCPUS="$max_jobs" && echo "Warning: Reducing build parallelism to -j$max_jobs because of memory limits" - test "$CEPH_SMP_NCPUS" -le 0 && CEPH_SMP_NCPUS="1" && echo "Warning: Not using parallel build at all because of memory limits" -fi -export CEPH_SMP_NCPUS -export CEPH_MFLAGS_JOBS="-j$CEPH_SMP_NCPUS" +export CMAKE_POLICY_VERSION_MINIMUM="3.5" env | sort -mkdir build -cd build -CMAKE=cmake -${CMAKE} .. \ +%{?!_vpath_builddir:%global _vpath_builddir %{_target_platform}} + +# TODO: drop this step once we can use `cmake -B` +mkdir -p %{_vpath_builddir} +pushd %{_vpath_builddir} +cmake .. \ +%if 0%{?suse_version} == 1500 + -DCMAKE_C_COMPILER=gcc-11 \ + -DCMAKE_CXX_COMPILER=g++-11 \ +%endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ - -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \ - -DCMAKE_INSTALL_LOCALSTATEDIR=%{_localstatedir} \ - -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \ - -DCMAKE_INSTALL_MANDIR=%{_mandir} \ - -DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \ - -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \ - -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=%{_unitdir} \ - -DWITH_MANPAGE=ON \ - -DWITH_PYTHON3=%{python3_version} \ - -DWITH_MGR_DASHBOARD_FRONTEND=OFF \ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \ + -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \ + -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \ + -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \ + -DCMAKE_INSTALL_MANDIR:PATH=%{_mandir} \ + -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/ceph \ + -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir} \ + -DSYSTEMD_SYSTEM_UNIT_DIR:PATH=%{_unitdir} \ + -DWITH_MANPAGE:BOOL=ON \ + -DWITH_PYTHON3:STRING=%{python3_version} \ + -DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF \ +%if 0%{?suse_version} + -DWITH_RADOSGW_SELECT_PARQUET:BOOL=OFF \ +%endif %if 0%{without ceph_test_package} - -DWITH_TESTS=OFF \ + -DWITH_TESTS:BOOL=OFF \ %endif %if 0%{with cephfs_java} - -DWITH_CEPHFS_JAVA=ON \ + -DJAVA_HOME=%{java_home} \ + -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \ + -DWITH_CEPHFS_JAVA:BOOL=ON \ %endif %if 0%{with selinux} - -DWITH_SELINUX=ON \ + -DWITH_SELINUX:BOOL=ON \ %endif %if %{with lttng} - -DWITH_LTTNG=ON \ - -DWITH_BABELTRACE=ON \ + -DWITH_LTTNG:BOOL=ON \ + -DWITH_BABELTRACE:BOOL=ON \ %else - -DWITH_LTTNG=OFF \ - -DWITH_BABELTRACE=OFF \ + -DWITH_LTTNG:BOOL=OFF \ + -DWITH_BABELTRACE:BOOL=OFF \ %endif $CEPH_EXTRA_CMAKE_ARGS \ %if 0%{with ocf} - -DWITH_OCF=ON \ + -DWITH_OCF:BOOL=ON \ %endif %if 0%{with cephfs_shell} - -DWITH_CEPHFS_SHELL=ON \ + -DWITH_CEPHFS_SHELL:BOOL=ON \ %endif %if 0%{with libradosstriper} - -DWITH_LIBRADOSSTRIPER=ON \ + -DWITH_LIBRADOSSTRIPER:BOOL=ON \ %else - -DWITH_LIBRADOSSTRIPER=OFF \ + -DWITH_LIBRADOSSTRIPER:BOOL=OFF \ %endif %if 0%{with amqp_endpoint} - -DWITH_RADOSGW_AMQP_ENDPOINT=ON \ + -DWITH_RADOSGW_AMQP_ENDPOINT:BOOL=ON \ %else - -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \ + -DWITH_RADOSGW_AMQP_ENDPOINT:BOOL=OFF \ %endif %if 0%{with kafka_endpoint} - -DWITH_RADOSGW_KAFKA_ENDPOINT=ON \ + -DWITH_RADOSGW_KAFKA_ENDPOINT:BOOL=ON \ %else - -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \ + -DWITH_RADOSGW_KAFKA_ENDPOINT:BOOL=OFF \ %endif %if 0%{without lua_packages} - -DWITH_RADOSGW_LUA_PACKAGES=OFF \ + -DWITH_RADOSGW_LUA_PACKAGES:BOOL=OFF \ %endif %if 0%{with zbd} - -DWITH_ZBD=ON \ + -DWITH_ZBD:BOOL=ON \ %endif %if 0%{with cmake_verbose_logging} - -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ %endif %if 0%{with rbd_rwl_cache} - -DWITH_RBD_RWL=ON \ + -DWITH_RBD_RWL:BOOL=ON \ %endif %if 0%{with rbd_ssd_cache} - -DWITH_RBD_SSD_CACHE=ON \ + -DWITH_RBD_SSD_CACHE:BOOL=ON \ %endif %if 0%{with system_pmdk} -DWITH_SYSTEM_PMDK:BOOL=ON \ %endif - -DBOOST_J=$CEPH_SMP_NCPUS \ +%if 0%{without jaeger} + -DWITH_JAEGER:BOOL=OFF \ +%endif +%if 0%{?suse_version} + -DBOOST_J:STRING=%{jobs} \ +%else + -DBOOST_J:STRING=%{_smp_build_ncpus} \ +%endif %if 0%{?rhel} -DWITH_FMT_HEADER_ONLY:BOOL=ON \ %endif - -DWITH_GRAFANA=ON +%if 0%{with system_arrow} + -DWITH_SYSTEM_ARROW:BOOL=ON \ + -DWITH_SYSTEM_UTF8PROC:BOOL=ON \ +%endif +%if 0%{with seastar} + -DWITH_SEASTAR:BOOL=ON \ + -DWITH_JAEGER:BOOL=OFF \ +%endif + -DWITH_GRAFANA:BOOL=ON %if %{with cmake_verbose_logging} cat ./CMakeFiles/CMakeOutput.log cat ./CMakeFiles/CMakeError.log %endif -make "$CEPH_MFLAGS_JOBS" +%if 0%{?suse_version} +make %{_smp_mflags} +%else +%make_build +%endif +popd %if 0%{with make_check} %check # run in-tree unittests -cd build -ctest "$CEPH_MFLAGS_JOBS" +pushd %{_vpath_builddir} +ctest %{_smp_mflags} +popd %endif - %install -pushd build -make DESTDIR=%{buildroot} install + +pushd %{_vpath_builddir} +%make_install # we have dropped sysvinit bits rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph popd -# # python's setuptools v76 introduces a simplified shebang # generation which results in cephfs-top and cephfs-shell just # saying "#!python", rather than "#!/usr/bin/python3.xx". @@ -1392,13 +1588,20 @@ sed -i s:^#\!python$:#\!$(readlink -f %{_bindir}/python3):g %{buildroot}%{_bindir}/cephfs-top sed -i s:^#\!python$:#\!$(readlink -f %{_bindir}/python3):g %{buildroot}%{_bindir}/cephfs-shell +# Fix /usr/bin/env usage +sed -i -e 's:#!/usr/bin/env bash:#!/usr/bin/bash:' \ + %{buildroot}%{_bindir}/ceph-post-file \ + %{buildroot}%{_bindir}/rgw-gap-list \ + %{buildroot}%{_bindir}/rgw-orphan-list \ + %{buildroot}%{_bindir}/rgw-restore-bucket-index + %if 0%{with seastar} # package crimson-osd with the name of ceph-osd install -m 0755 %{buildroot}%{_bindir}/crimson-osd %{buildroot}%{_bindir}/ceph-osd %endif install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph %endif %if 0%{?suse_version} @@ -1413,7 +1616,6 @@ install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf install -m 0755 -D src/tools/rbd_nbd/rbd-nbd_quiesce %{buildroot}%{_libexecdir}/rbd-nbd/rbd-nbd_quiesce -install -m 0755 src/cephadm/cephadm %{buildroot}%{_sbindir}/cephadm mkdir -p %{buildroot}%{_sharedstatedir}/cephadm chmod 0700 %{buildroot}%{_sharedstatedir}/cephadm mkdir -p %{buildroot}%{_sharedstatedir}/cephadm/.ssh @@ -1433,7 +1635,7 @@ # sudoers.d install -m 0440 -D sudoers.d/ceph-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-smartctl -%if 0%{?rhel} >= 8 +%if 0%{?rhel} >= 8 || 0%{?openEuler} pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/* pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_sbindir}/* %endif @@ -1460,6 +1662,13 @@ # prometheus alerts install -m 644 -D monitoring/ceph-mixin/prometheus_alerts.yml %{buildroot}/etc/prometheus/ceph/ceph_default_alerts.yml +# SNMP MIB +install -m 644 -D -t %{buildroot}%{_datadir}/snmp/mibs monitoring/snmp/CEPH-MIB.txt + +%if %{with ringdisabled} +rm -rf %{buildroot}%{_datadir}/ceph/mgr/cephadm +%endif + %if 0%{?suse_version} # create __pycache__ directories and their contents %py3_compile %{buildroot}%{python3_sitelib} @@ -1467,7 +1676,7 @@ %fdupes %{buildroot}%{_prefix} %endif -%if 0%{?rhel} == 8 +%if 0%{?rhel} == 8 || 0%{?openEuler} %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib} %endif @@ -1475,7 +1684,7 @@ rm -rf %{buildroot} # built binaries are no longer necessary at this point, # but are consuming ~17GB of disk in the build environment -rm -rf build +rm -rf %{_vpath_builddir} ################################################################################# # files and systemd scriptlets @@ -1489,10 +1698,6 @@ %{_bindir}/osdmaptool %{_bindir}/ceph-kvstore-tool %{_bindir}/ceph-run -%{_bindir}/ceph-dencoder -%{_bindir}/cephfs-data-scan -%{_bindir}/cephfs-journal-tool -%{_bindir}/cephfs-table-tool %{_presetdir}/50-ceph.preset %{_sbindir}/ceph-create-keys %dir %{_libexecdir}/ceph @@ -1502,6 +1707,8 @@ %dir %{_libdir}/ceph %dir %{_libdir}/ceph/erasure-code %{_libdir}/ceph/erasure-code/libec_*.so* +%dir %{_libdir}/ceph/extblkdev +%{_libdir}/ceph/extblkdev/libceph_*.so* %dir %{_libdir}/ceph/compressor %{_libdir}/ceph/compressor/libceph_*.so* %{_unitdir}/ceph-crash.service @@ -1512,17 +1719,13 @@ %{_libdir}/libosd_tp.so* %endif %config(noreplace) %{_sysconfdir}/logrotate.d/ceph -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %config(noreplace) %{_sysconfdir}/sysconfig/ceph %endif %if 0%{?suse_version} %{_fillupdir}/sysconfig.* %endif %{_unitdir}/ceph.target -%dir %{python3_sitelib}/ceph_volume -%{python3_sitelib}/ceph_volume/* -%{python3_sitelib}/ceph_volume-* -%{_mandir}/man8/ceph-deploy.8* %{_mandir}/man8/ceph-create-keys.8* %{_mandir}/man8/ceph-run.8* %{_mandir}/man8/crushtool.8* @@ -1539,7 +1742,7 @@ %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 +%config%{_sysconfdir}/sudoers.d/ceph-smartctl %post base /sbin/ldconfig @@ -1549,7 +1752,7 @@ /usr/bin/systemctl preset ceph.target ceph-crash.service >/dev/null 2>&1 || : fi %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_post ceph.target ceph-crash.service %endif if [ $1 -eq 1 ] ; then @@ -1560,7 +1763,7 @@ %if 0%{?suse_version} %service_del_preun ceph.target ceph-crash.service %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_preun ceph.target ceph-crash.service %endif @@ -1592,14 +1795,23 @@ %{_bindir}/ceph %{_bindir}/ceph-authtool %{_bindir}/ceph-conf +%{_bindir}/ceph-dencoder %{_bindir}/ceph-rbdnamer %{_bindir}/ceph-syn +%{_bindir}/cephfs-data-scan +%{_bindir}/cephfs-journal-tool +%{_bindir}/cephfs-table-tool +%{_bindir}/crushdiff %{_bindir}/rados %{_bindir}/radosgw-admin %{_bindir}/rbd %{_bindir}/rbd-replay %{_bindir}/rbd-replay-many %{_bindir}/rbdmap +%{_bindir}/rgw-gap-list +%{_bindir}/rgw-gap-list-comparator +%{_bindir}/rgw-orphan-list +%{_bindir}/rgw-restore-bucket-index %{_sbindir}/mount.ceph %if 0%{?suse_version} && 0%{?suse_version} < 1550 /sbin/mount.ceph @@ -1607,7 +1819,7 @@ %if %{with lttng} %{_bindir}/rbd-replay-prep %endif -%exclude %{_bindir}/ceph-post-file +%{_bindir}/ceph-post-file %dir %{_libdir}/ceph/denc %{_libdir}/ceph/denc/denc-mod-*.so %{_tmpfilesdir}/ceph-common.conf @@ -1619,6 +1831,7 @@ %{_mandir}/man8/ceph-syn.8* %{_mandir}/man8/ceph-post-file.8* %{_mandir}/man8/ceph.8* +%{_mandir}/man8/crushdiff.8* %{_mandir}/man8/mount.ceph.8* %{_mandir}/man8/rados.8* %{_mandir}/man8/radosgw-admin.8* @@ -1647,7 +1860,7 @@ %pre common CEPH_GROUP_ID=167 CEPH_USER_ID=167 -%if 0%{?rhel} || 0%{?fedora} +%if 0%{?rhel} || 0%{?fedora} || 0%{?openEuler} /usr/sbin/groupadd ceph -g $CEPH_GROUP_ID -o -r 2>/dev/null || : /usr/sbin/useradd ceph -u $CEPH_USER_ID -o -r -g ceph -s /sbin/nologin -c "Ceph daemons" -d %{_localstatedir}/lib/ceph 2>/dev/null || : %endif @@ -1693,7 +1906,7 @@ /usr/bin/systemctl preset ceph-mds@\*.service ceph-mds.target >/dev/null 2>&1 || : fi %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_post ceph-mds@\*.service ceph-mds.target %endif if [ $1 -eq 1 ] ; then @@ -1704,7 +1917,7 @@ %if 0%{?suse_version} %service_del_preun ceph-mds@\*.service ceph-mds.target %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_preun ceph-mds@\*.service ceph-mds.target %endif @@ -1727,6 +1940,7 @@ %dir %{_datadir}/ceph/mgr %{_datadir}/ceph/mgr/mgr_module.* %{_datadir}/ceph/mgr/mgr_util.* +%{_datadir}/ceph/mgr/object_format.* %{_unitdir}/ceph-mgr@.service %{_unitdir}/ceph-mgr.target %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mgr @@ -1737,7 +1951,7 @@ /usr/bin/systemctl preset ceph-mgr@\*.service ceph-mgr.target >/dev/null 2>&1 || : fi %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_post ceph-mgr@\*.service ceph-mgr.target %endif if [ $1 -eq 1 ] ; then @@ -1748,7 +1962,7 @@ %if 0%{?suse_version} %service_del_preun ceph-mgr@\*.service ceph-mgr.target %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_preun ceph-mgr@\*.service ceph-mgr.target %endif @@ -1813,6 +2027,7 @@ %{_datadir}/ceph/mgr/prometheus %{_datadir}/ceph/mgr/rbd_support %{_datadir}/ceph/mgr/restful +%{_datadir}/ceph/mgr/rgw %{_datadir}/ceph/mgr/selftest %{_datadir}/ceph/mgr/snap_schedule %{_datadir}/ceph/mgr/stats @@ -1849,6 +2064,7 @@ /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : fi +%if !%{with ringdisabled} %files mgr-cephadm %{_datadir}/ceph/mgr/cephadm @@ -1861,6 +2077,7 @@ if [ $1 -eq 1 ] ; then /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : fi +%endif %files mon %{_bindir}/ceph-mon @@ -1876,7 +2093,7 @@ /usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || : fi %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_post ceph-mon@\*.service ceph-mon.target %endif if [ $1 -eq 1 ] ; then @@ -1887,7 +2104,7 @@ %if 0%{?suse_version} %service_del_preun ceph-mon@\*.service ceph-mon.target %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_preun ceph-mon@\*.service ceph-mon.target %endif @@ -1925,7 +2142,7 @@ /usr/bin/systemctl preset cephfs-mirror@\*.service cephfs-mirror.target >/dev/null 2>&1 || : fi %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_post cephfs-mirror@\*.service cephfs-mirror.target %endif if [ $1 -eq 1 ] ; then @@ -1936,7 +2153,7 @@ %if 0%{?suse_version} %service_del_preun cephfs-mirror@\*.service cephfs-mirror.target %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_preun cephfs-mirror@\*.service cephfs-mirror.target %endif @@ -1954,6 +2171,10 @@ fi fi +%files -n ceph-exporter +%{_bindir}/ceph-exporter +%{_unitdir}/ceph-exporter.service + %files -n rbd-fuse %{_bindir}/rbd-fuse %{_mandir}/man8/rbd-fuse.8* @@ -1970,7 +2191,7 @@ /usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || : fi %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target %endif if [ $1 -eq 1 ] ; then @@ -1981,7 +2202,7 @@ %if 0%{?suse_version} %service_del_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target %endif @@ -2011,7 +2232,7 @@ /usr/bin/systemctl preset ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target >/dev/null 2>&1 || : fi %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_post ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target %endif if [ $1 -eq 1 ] ; then @@ -2022,7 +2243,7 @@ %if 0%{?suse_version} %service_del_preun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_preun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target %endif @@ -2052,23 +2273,20 @@ %{_bindir}/radosgw-token %{_bindir}/radosgw-es %{_bindir}/radosgw-object-expirer -%{_bindir}/rgw-gap-list -%{_bindir}/rgw-gap-list-comparator -%{_bindir}/rgw-orphan-list -%{_libdir}/libradosgw.so* +%{_bindir}/rgw-policy-check %{_mandir}/man8/radosgw.8* +%{_mandir}/man8/rgw-policy-check.8* %dir %{_localstatedir}/lib/ceph/radosgw %{_unitdir}/ceph-radosgw@.service %{_unitdir}/ceph-radosgw.target %post radosgw -/sbin/ldconfig %if 0%{?suse_version} if [ $1 -eq 1 ] ; then /usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || : fi %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_post ceph-radosgw@\*.service ceph-radosgw.target %endif if [ $1 -eq 1 ] ; then @@ -2079,12 +2297,11 @@ %if 0%{?suse_version} %service_del_preun ceph-radosgw@\*.service ceph-radosgw.target %endif -%if 0%{?fedora} || 0%{?rhel} +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} %systemd_preun ceph-radosgw@\*.service ceph-radosgw.target %endif %postun radosgw -/sbin/ldconfig %systemd_postun ceph-radosgw@\*.service ceph-radosgw.target if [ $1 -ge 1 ] ; then # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to @@ -2106,27 +2323,22 @@ %{_bindir}/ceph-osdomap-tool %{_bindir}/ceph-osd %{_libexecdir}/ceph/ceph-osd-prestart.sh -%{_sbindir}/ceph-volume -%{_sbindir}/ceph-volume-systemd %{_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* %{_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-volume@\*.service ceph-osd.target >/dev/null 2>&1 || : + /usr/bin/systemctl preset ceph-osd@\*.service ceph-osd.target >/dev/null 2>&1 || : fi %endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} +%systemd_post ceph-osd@\*.service ceph-osd.target %endif if [ $1 -eq 1 ] ; then /usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || : @@ -2139,10 +2351,10 @@ %preun osd %if 0%{?suse_version} -%service_del_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target +%service_del_preun ceph-osd@\*.service ceph-osd.target %endif -%if 0%{?fedora} || 0%{?rhel} -%systemd_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} +%systemd_preun ceph-osd@\*.service ceph-osd.target %endif %postun osd @@ -2164,6 +2376,48 @@ %{_bindir}/crimson-osd %endif +%files volume +%{_sbindir}/ceph-volume +%{_sbindir}/ceph-volume-systemd +%dir %{python3_sitelib}/ceph_volume +%{python3_sitelib}/ceph_volume/* +%{python3_sitelib}/ceph_volume-* +%{_mandir}/man8/ceph-volume.8* +%{_mandir}/man8/ceph-volume-systemd.8* +%{_unitdir}/ceph-volume@.service + +%post volume +%if 0%{?suse_version} +if [ $1 -eq 1 ] ; then + /usr/bin/systemctl preset ceph-volume@\*.service >/dev/null 2>&1 || : +fi +%endif +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} +%systemd_post ceph-volume@\*.service +%endif + +%preun volume +%if 0%{?suse_version} +%service_del_preun ceph-volume@\*.service +%endif +%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} +%systemd_preun ceph-volume@\*.service +%endif + +%postun volume +%systemd_postun ceph-volume@\*.service +if [ $1 -ge 1 ] ; then + # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to + # "yes". In any case: if units are not running, do not touch them. + SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph + if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then + source $SYSCONF_CEPH + fi + if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then + /usr/bin/systemctl try-restart ceph-volume@\*.service > /dev/null 2>&1 || : + fi +fi + %if %{with ocf} %files resource-agents @@ -2301,24 +2555,14 @@ %dir %{_includedir}/cephfs %{_includedir}/cephfs/libcephfs.h %{_includedir}/cephfs/ceph_ll_client.h +%{_includedir}/cephfs/types.h %dir %{_includedir}/cephfs/metrics %{_includedir}/cephfs/metrics/Types.h %{_libdir}/libcephfs.so -%if %{with jaeger} -%files -n libjaeger -%{_libdir}/libopentracing.so.* -%{_libdir}/libthrift.so.* -%{_libdir}/libjaegertracing.so.* -%post -n libjaeger -p /sbin/ldconfig -%postun -n libjaeger -p /sbin/ldconfig -%endif - %files -n python%{python3_pkgversion}-cephfs %{python3_sitearch}/cephfs.cpython*.so %{python3_sitearch}/cephfs-*.egg-info -%{python3_sitelib}/ceph_volume_client.py -%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py* %files -n python%{python3_pkgversion}-ceph-argparse %{python3_sitelib}/ceph_argparse.py @@ -2334,6 +2578,7 @@ %files -n cephfs-shell %{python3_sitelib}/cephfs_shell-*.egg-info %{_bindir}/cephfs-shell +%{_mandir}/man8/cephfs-shell.8* %endif %files -n cephfs-top @@ -2345,7 +2590,6 @@ %files -n ceph-test %{_bindir}/ceph-client-debug %{_bindir}/ceph_bench_log -%{_bindir}/ceph_kvstorebench %{_bindir}/ceph_multi_stress_watch %{_bindir}/ceph_erasure_code_benchmark %{_bindir}/ceph_omapbench @@ -2513,3 +2757,13 @@ %attr(0755,root,root) %dir %{_sysconfdir}/prometheus/ceph %config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml +%files mib +%attr(0755,root,root) %dir %{_datadir}/snmp +%{_datadir}/snmp/mibs + +%files node-proxy +%{_sbindir}/ceph-node-proxy +%dir %{python3_sitelib}/ceph_node_proxy +%{python3_sitelib}/ceph_node_proxy/* +%{python3_sitelib}/ceph_node_proxy-* + ++++++ ceph-16.2.15-84-gb9c09b69575.tar.bz2 -> ceph-18.2.7.tar.bz2 ++++++ /work/SRC/openSUSE:Factory/ceph/ceph-16.2.15-84-gb9c09b69575.tar.bz2 /work/SRC/openSUSE:Factory/.ceph.new.7067/ceph-18.2.7.tar.bz2 differ: char 11, line 1 ++++++ ceph-build-fix-fmt-version-check.patch ++++++ >From 686dd3d838b6de6bf1101f0b61f729426b0bccad Mon Sep 17 00:00:00 2001 From: Adam Emerson <aemer...@redhat.com> Date: Sat, 28 Oct 2023 13:29:59 -0400 Subject: [PATCH] build: Fix fmt version check Currently, when attempting to build ceph on a system with fmt installed, we try to build against it whatever the version. This constantly breaks people's builds, since newer versions of fmt often change the API. This change specifies that versions must be below 10 as well as at or above 8.1.1, so that on systems with a new format, we fall back to using the submodule. It also removes the `Findfmt.cmake` module, as that does not check the installed version. Instead, we use the cmake config file installed by the system package of fmt and does support version checking. Signed-off-by: Adam Emerson <aemer...@redhat.com> --- cmake/modules/Findfmt.cmake | 61 ------------------------------------- src/CMakeLists.txt | 12 +++++--- 2 files changed, 7 insertions(+), 66 deletions(-) delete mode 100644 cmake/modules/Findfmt.cmake --- a/cmake/modules/Findfmt.cmake +++ /dev/null @@ -1,61 +0,0 @@ -find_path(fmt_INCLUDE_DIR NAMES fmt/format.h) - -if(fmt_INCLUDE_DIR) - set(_fmt_version_file "${fmt_INCLUDE_DIR}/fmt/core.h") - if(NOT EXISTS "${_fmt_version_file}") - set(_fmt_version_file "${fmt_INCLUDE_DIR}/fmt/format.h") - endif() - if(EXISTS "${_fmt_version_file}") - # parse "#define FMT_VERSION 40100" to 4.1.0 - file(STRINGS "${_fmt_version_file}" fmt_VERSION_LINE - REGEX "^#define[ \t]+FMT_VERSION[ \t]+[0-9]+$") - string(REGEX REPLACE "^#define[ \t]+FMT_VERSION[ \t]+([0-9]+)$" - "\\1" fmt_VERSION "${fmt_VERSION_LINE}") - foreach(ver "fmt_VERSION_PATCH" "fmt_VERSION_MINOR" "fmt_VERSION_MAJOR") - math(EXPR ${ver} "${fmt_VERSION} % 100") - math(EXPR fmt_VERSION "(${fmt_VERSION} - ${${ver}}) / 100") - endforeach() - set(fmt_VERSION - "${fmt_VERSION_MAJOR}.${fmt_VERSION_MINOR}.${fmt_VERSION_PATCH}") - endif() -endif() - -find_library(fmt_LIBRARY NAMES fmt) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(fmt - REQUIRED_VARS fmt_INCLUDE_DIR fmt_LIBRARY - VERSION_VAR fmt_VERSION) -mark_as_advanced( - fmt_INCLUDE_DIR - fmt_LIBRARY - fmt_VERSION_MAJOR - fmt_VERSION_MINOR - fmt_VERSION_PATCH - fmt_VERSION_STRING) - -if(fmt_FOUND AND NOT (TARGET fmt::fmt)) - add_library(fmt-header-only INTERFACE) - set_target_properties(fmt-header-only PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${fmt_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS FMT_HEADER_ONLY=1 - INTERFACE_COMPILE_FEATURES cxx_std_11) - - add_library(fmt UNKNOWN IMPORTED GLOBAL) - set_target_properties(fmt PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${fmt_INCLUDE_DIR}" - INTERFACE_COMPILE_FEATURES cxx_std_11 - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${fmt_LIBRARY}") - - if(WITH_FMT_HEADER_ONLY) - # please note, this is different from how upstream defines fmt::fmt. - # in order to force 3rd party libraries to link against fmt-header-only if - # WITH_FMT_HEADER_ONLY is ON, we have to point fmt::fmt to fmt-header-only - # in this case. - add_library(fmt::fmt ALIAS fmt-header-only) - else() - add_library(fmt::fmt ALIAS fmt) - endif() - -endif() --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -322,13 +322,15 @@ if(NOT TARGET RapidJSON::RapidJSON) endif() option(WITH_FMT_HEADER_ONLY "use header-only version of fmt library" OFF) -set(WITH_FMT_VERSION "8.1.1" CACHE - STRING "build with fmt version") -find_package(fmt ${WITH_FMT_VERSION} QUIET) +find_package(fmt 8.1.1...<10.0.0) if(fmt_FOUND) - include_directories(SYSTEM "${fmt_INCLUDE_DIR}") + message(STATUS "Building with system fmt.") + if (WITH_FMT_HEADER_ONLY) + message(STATUS "Using fmt header-only.") + add_library(fmt::fmt ALIAS fmt::fmt-header-only) + endif() else() - message(STATUS "Could not find fmt, will build it") + message(STATUS "Building fmt as submodule") set(old_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) set(BUILD_SHARED_LIBS FALSE) add_subdirectory(fmt) ++++++ ceph-cmake-ensure-git-exists-before-executing-it.patch ++++++ >From 8615731637a116f7b9299c6122a0e058d43a4f6d Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger <dims...@opensuse.org> Date: Tue, 19 Dec 2023 13:28:29 +0100 Subject: [PATCH] cmake: Ensure git exists before executing it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CMake 3.28 has turned stricter when executing string(REPLACE …) and expects four or more commands. In case of distro package builds from tarball, it happens that git is not present. CTags.cmake tries to catch that by veriying the exit status of the command, but as there is in fact git | awk, awk returns 0 even when git does not exist. Ensure that the variable submodules has been defined before trying to replace substrings in this variable. Signed-off-by: Dominique Leuenberger <dims...@opensuse.org> --- cmake/modules/CTags.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/modules/CTags.cmake b/cmake/modules/CTags.cmake index c3e1b3799b024..772f647f947d7 100644 --- a/cmake/modules/CTags.cmake +++ b/cmake/modules/CTags.cmake @@ -3,13 +3,14 @@ find_program(CTAGS_EXECUTABLE ctags) function(add_tags name) cmake_parse_arguments(TAGS "" "SRC_DIR;TAG_FILE" "EXCLUDE_OPTS;EXCLUDES" ${ARGN}) set(excludes ${TAGS_EXCLUDES}) + find_package(Git) if(TAGS_EXCLUDE_OPTS) # always respect EXCLUDES_OPTS list(APPEND excludes ${TAGS_EXCLUDE_OPTS}) - else() + elseif(Git_FOUND) # exclude the submodules under SRC_DIR by default execute_process( - COMMAND git config --file .gitmodules --get-regexp path + COMMAND ${GIT_EXECUTABLE} config --file .gitmodules --get-regexp path COMMAND awk "/${TAGS_SRC_DIR}/ { print $2 }" WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE result_code ++++++ ceph-librbd-fix-atomic-shared-pointer.patch ++++++ >From 7e3f243eae129634359dac1943f85155f6ff3e61 Mon Sep 17 00:00:00 2001 From: Adam Emerson <aemer...@redhat.com> Date: Mon, 2 Dec 2024 20:21:37 -0500 Subject: [PATCH] librbd: Fix atomic shared pointer situation The `std::atomic_store<std::shared_ptr>` overload was deprecated in C++20. Also, to quote from https://en.cppreference.com/w/cpp/memory/shared_ptr/atomic > These functions are typically implemented using mutexes, stored in a > global hash table where the pointer value is used as the key. This is terrible. Sadly, GCC11, which we still have to use for all our test builds, doesn't support the `std::atomic<std::shared_ptr>` overload, so we keep the regular `std::shared_ptr` around for it in an `#ifdef`. Since `atomic_store` can accept any `std::atomic<T>*` as its first argument, we don't have to change the accesses. Signed-off-by: Adam Emerson <aemer...@redhat.com> --- src/librbd/ImageCtx.h | 4 ++++ 1 file changed, 4 insertions(+) --- a/src/librbd/ImageCtx.h +++ b/src/librbd/ImageCtx.h @@ -363,7 +363,11 @@ namespace librbd { ceph::mutex **timer_lock); private: +#if defined(__cpp_lib_atomic_shared_ptr) + std::atomic<std::shared_ptr<neorados::IOContext>> data_io_context; +#else std::shared_ptr<neorados::IOContext> data_io_context; +#endif // }; } ++++++ ceph-mgr-add-site-packages-paths.patch ++++++ >From 51a5774aa605f3b976ced47902e15ce450f50339 Mon Sep 17 00:00:00 2001 From: Kefu Chai <tchai...@gmail.com> Date: Sat, 3 Feb 2024 21:09:27 +0800 Subject: [PATCH] mgr: add site package paths in PyModuleRegistry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit before this change, we add the paths of site packages to sys.path when starting subinterpretors for each of the mgr modules. this works just fine. but in Python 3.11, it deprecates `PySys_SetPath()` in favor of PyConfig machinary, which sets the module search paths in PyConfig, before calling `Py_InitializeFromConfig()`. so, to set the module search paths with the new machinary, we need to do this in `PyModuleRegistry`, where we initialize the global Python interpretor using the new PyConfig machinary. and since we've switched to the new PyConfig machinary when compiling with Python 3.8 and up. in this change, we set the module search paths in PyModuleRegistry. because PyConfig imports the site packages by default, and we are allowed to append a new path to the existing search paths, we just append the configured `mgr_module_path`. this change should silence the compiling warning like: ``` /var/ssd/ceph/src/mgr/PyModule.cc:368:20: warning: ‘void PySys_SetPath(const wchar_t*)’ is deprecated [-Wdeprecated-declarations] 368 | PySys_SetPath(const_cast<wchar_t*>(sys_path.c_str())); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/python3.12/sysmodule.h:15:38: note: declared here 15 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetPath(const wchar_t *); | ^~~~~~~~~~~~~ ``` Fixes https://tracker.ceph.com/issues/66399 Signed-off-by: Kefu Chai <tchai...@gmail.com> --- src/mgr/PyModule.cc | 74 ------------------------------------ src/mgr/PyModule.h | 1 - src/mgr/PyModuleRegistry.cc | 75 +++++++++++++++++++++++++++++++++++++ src/mgr/PyModuleRegistry.h | 1 + 4 files changed, 76 insertions(+), 75 deletions(-) --- a/src/mgr/PyModule.cc +++ b/src/mgr/PyModule.cc @@ -47,7 +47,6 @@ std::string PyModule::mgr_store_prefix = using std::string; -using std::wstring; // decode a Python exception into a string std::string handle_pyerror( @@ -231,72 +230,6 @@ std::pair<int, std::string> PyModuleConf } } -std::string PyModule::get_site_packages() -{ - std::stringstream site_packages; - - // CPython doesn't auto-add site-packages dirs to sys.path for us, - // but it does provide a module that we can ask for them. - auto site_module = PyImport_ImportModule("site"); - ceph_assert(site_module); - - auto site_packages_fn = PyObject_GetAttrString(site_module, "getsitepackages"); - if (site_packages_fn != nullptr) { - auto site_packages_list = PyObject_CallObject(site_packages_fn, nullptr); - ceph_assert(site_packages_list); - - auto n = PyList_Size(site_packages_list); - for (Py_ssize_t i = 0; i < n; ++i) { - if (i != 0) { - site_packages << ":"; - } - site_packages << PyUnicode_AsUTF8(PyList_GetItem(site_packages_list, i)); - } - - Py_DECREF(site_packages_list); - Py_DECREF(site_packages_fn); - } else { - // Fall back to generating our own site-packages paths by imitating - // what the standard site.py does. This is annoying but it lets us - // run inside virtualenvs :-/ - - auto site_packages_fn = PyObject_GetAttrString(site_module, "addsitepackages"); - ceph_assert(site_packages_fn); - - auto known_paths = PySet_New(nullptr); - auto pArgs = PyTuple_Pack(1, known_paths); - PyObject_CallObject(site_packages_fn, pArgs); - Py_DECREF(pArgs); - Py_DECREF(known_paths); - Py_DECREF(site_packages_fn); - - auto sys_module = PyImport_ImportModule("sys"); - ceph_assert(sys_module); - auto sys_path = PyObject_GetAttrString(sys_module, "path"); - ceph_assert(sys_path); - - dout(1) << "sys.path:" << dendl; - auto n = PyList_Size(sys_path); - bool first = true; - for (Py_ssize_t i = 0; i < n; ++i) { - dout(1) << " " << PyUnicode_AsUTF8(PyList_GetItem(sys_path, i)) << dendl; - if (first) { - first = false; - } else { - site_packages << ":"; - } - site_packages << PyUnicode_AsUTF8(PyList_GetItem(sys_path, i)); - } - - Py_DECREF(sys_path); - Py_DECREF(sys_module); - } - - Py_DECREF(site_module); - - return site_packages.str(); -} - PyObject* PyModule::init_ceph_logger() { auto py_logger = PyModule_Create(&ceph_logger_module); @@ -357,13 +290,6 @@ int PyModule::load(PyThreadState *pMainT return -EINVAL; } else { pMyThreadState.set(thread_state); - // Configure sys.path to include mgr_module_path - string paths = (g_conf().get_val<std::string>("mgr_module_path") + ':' + - get_site_packages() + ':'); - wstring sys_path(wstring(begin(paths), end(paths)) + Py_GetPath()); - PySys_SetPath(const_cast<wchar_t*>(sys_path.c_str())); - dout(10) << "Computed sys.path '" - << string(begin(sys_path), end(sys_path)) << "'" << dendl; } } // Environment is all good, import the external module --- a/src/mgr/PyModule.h +++ b/src/mgr/PyModule.h @@ -51,7 +51,6 @@ class PyModule mutable ceph::mutex lock = ceph::make_mutex("PyModule::lock"); private: const std::string module_name; - std::string get_site_packages(); int load_subclass_of(const char* class_name, PyObject** py_class); // Did the MgrMap identify this module as one that should run? --- a/src/mgr/PyModuleRegistry.cc +++ b/src/mgr/PyModuleRegistry.cc @@ -80,6 +80,15 @@ void PyModuleRegistry::init() PyImport_AppendInittab("ceph_logger", PyModule::init_ceph_logger); } PyImport_AppendInittab("ceph_module", PyModule::init_ceph_module); + // Configure sys.path to include mgr_module_path + auto pythonpath_env = g_conf().get_val<std::string>("mgr_module_path"); + if (const char* pythonpath = getenv("PYTHONPATH")) { + pythonpath_env += ":"; + pythonpath_env += pythonpath; + } + status = PyConfig_SetBytesString(&py_config, &py_config.pythonpath_env, pythonpath_env.data()); + ceph_assertf(!PyStatus_Exception(status), "PyConfig_SetBytesString: %s:%s", status.func, status.err_msg); + dout(10) << "set PYTHONPATH to " << std::quoted(pythonpath_env) << dendl; status = Py_InitializeFromConfig(&py_config); ceph_assertf(!PyStatus_Exception(status), "Py_InitializeFromConfig: %s:%s", status.func, status.err_msg); #else @@ -303,6 +312,72 @@ void PyModuleRegistry::shutdown() Py_Finalize(); } +std::string PyModuleRegistry::get_site_packages() +{ + std::stringstream site_packages; + + // CPython doesn't auto-add site-packages dirs to sys.path for us, + // but it does provide a module that we can ask for them. + auto site_module = PyImport_ImportModule("site"); + ceph_assert(site_module); + + auto site_packages_fn = PyObject_GetAttrString(site_module, "getsitepackages"); + if (site_packages_fn != nullptr) { + auto site_packages_list = PyObject_CallObject(site_packages_fn, nullptr); + ceph_assert(site_packages_list); + + auto n = PyList_Size(site_packages_list); + for (Py_ssize_t i = 0; i < n; ++i) { + if (i != 0) { + site_packages << ":"; + } + site_packages << PyUnicode_AsUTF8(PyList_GetItem(site_packages_list, i)); + } + + Py_DECREF(site_packages_list); + Py_DECREF(site_packages_fn); + } else { + // Fall back to generating our own site-packages paths by imitating + // what the standard site.py does. This is annoying but it lets us + // run inside virtualenvs :-/ + + auto site_packages_fn = PyObject_GetAttrString(site_module, "addsitepackages"); + ceph_assert(site_packages_fn); + + auto known_paths = PySet_New(nullptr); + auto pArgs = PyTuple_Pack(1, known_paths); + PyObject_CallObject(site_packages_fn, pArgs); + Py_DECREF(pArgs); + Py_DECREF(known_paths); + Py_DECREF(site_packages_fn); + + auto sys_module = PyImport_ImportModule("sys"); + ceph_assert(sys_module); + auto sys_path = PyObject_GetAttrString(sys_module, "path"); + ceph_assert(sys_path); + + dout(1) << "sys.path:" << dendl; + auto n = PyList_Size(sys_path); + bool first = true; + for (Py_ssize_t i = 0; i < n; ++i) { + dout(1) << " " << PyUnicode_AsUTF8(PyList_GetItem(sys_path, i)) << dendl; + if (first) { + first = false; + } else { + site_packages << ":"; + } + site_packages << PyUnicode_AsUTF8(PyList_GetItem(sys_path, i)); + } + + Py_DECREF(sys_path); + Py_DECREF(sys_module); + } + + Py_DECREF(site_module); + + return site_packages.str(); +} + std::vector<std::string> PyModuleRegistry::probe_modules(const std::string &path) const { const auto opt = g_conf().get_val<std::string>("mgr_disabled_modules"); --- a/src/mgr/PyModuleRegistry.h +++ b/src/mgr/PyModuleRegistry.h @@ -55,6 +55,7 @@ private: // before ClusterState exists. MgrMap mgr_map; + static std::string get_site_packages(); /** * Discover python modules from local disk */ ++++++ ceph-mgr-do-not-require-NOTIFY_TYPES-in-python-modules.patch ++++++ >From 4589c4d8ac524206d4fb6349b07c5a4e83f926dc Mon Sep 17 00:00:00 2001 From: John Mulligan <jmulli...@redhat.com> Date: Fri, 26 Apr 2024 10:53:33 -0400 Subject: [PATCH] mgr: do not require NOTIFY_TYPES in python modules Many python mgr modules lack a NOTIFY_TYPES member apparently without any downsides beyond an annoying message in the logs. This includes commonly used mgr modules like 'volumes' and 'cephadm'. Stop emitting an error for missing NOTIFY_TYPES by not assuming all mgr modules in python should provide it. The return code is also changed to indicate that this is not an error but the return from this function is never checked and so it should have no impact. However, if someone started using the return value in the future this would match the log change. Fixes: https://tracker.ceph.com/issues/55835 Signed-off-by: John Mulligan <jmulli...@redhat.com> --- src/mgr/PyModule.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/src/mgr/PyModule.cc +++ b/src/mgr/PyModule.cc @@ -437,8 +437,8 @@ int PyModule::load_notify_types() { PyObject *ls = PyObject_GetAttrString(pClass, "NOTIFY_TYPES"); if (ls == nullptr) { - derr << "Module " << get_name() << " has missing NOTIFY_TYPES member" << dendl; - return -EINVAL; + dout(10) << "Module " << get_name() << " has no NOTIFY_TYPES member" << dendl; + return 0; } if (!PyObject_TypeCheck(ls, &PyList_Type)) { // Relatively easy mistake for human to make, e.g. defining COMMANDS ++++++ ceph-mgr-python-avoid-pyo3-errors.patch ++++++ ++++ 994 lines (skipped) ++++++ ceph-mgr-set-argv-for-python.patch ++++++ >From 07773617f339a2779aa7cf910c0361c937ffe4c2 Mon Sep 17 00:00:00 2001 From: Kefu Chai <tchai...@gmail.com> Date: Sat, 3 Feb 2024 19:49:13 +0800 Subject: [PATCH] mgr: set argv for python in PyModuleRegistry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit before this change, we setup the progname for Python interpreter, but setup the argv for it in PyModule. and we are using deprecated API to initialize Python interpreter. in this change, let's do this in a single place for better maintainability. also, take this opportunity, to use the non-deprecated API to initialize interpreter on Python >= 3.8. this silence the warning when compiling ceph-mgr with CPython 3.12: ``` /var/ssd/ceph/src/mgr/PyModule.cc: In member function ‘int PyModule::load(PyThreadState*)’: /var/ssd/ceph/src/mgr/PyModule.cc:363:20: warning: ‘void PySys_SetArgv(int, wchar_t**)’ is deprecated [-Wdeprecated-declarations] 363 | PySys_SetArgv(1, (wchar_t**)argv); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.12/Python.h:96, from /var/ssd/ceph/src/mgr/BaseMgrModule.h:4, from /var/ssd/ceph/src/mgr/PyModule.cc:14: /usr/include/python3.12/sysmodule.h:13:38: note: declared here 13 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgv(int, wchar_t **); | ^~~~~~~~~~~~~ ``` Signed-off-by: Kefu Chai <tchai...@gmail.com> --- src/mgr/PyModule.cc | 4 ---- src/mgr/PyModuleRegistry.cc | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) --- a/src/mgr/PyModule.cc +++ b/src/mgr/PyModule.cc @@ -357,10 +357,6 @@ int PyModule::load(PyThreadState *pMainT return -EINVAL; } else { pMyThreadState.set(thread_state); - // Some python modules do not cope with an unpopulated argv, so lets - // fake one. This step also picks up site-packages into sys.path. - const wchar_t *argv[] = {L"ceph-mgr"}; - PySys_SetArgv(1, (wchar_t**)argv); // Configure sys.path to include mgr_module_path string paths = (g_conf().get_val<std::string>("mgr_module_path") + ':' + get_site_packages() + ':'); --- a/src/mgr/PyModuleRegistry.cc +++ b/src/mgr/PyModuleRegistry.cc @@ -70,6 +70,11 @@ void PyModuleRegistry::init() PyStatus status; status = PyConfig_SetString(&py_config, &py_config.program_name, WCHAR(MGR_PYTHON_EXECUTABLE)); ceph_assertf(!PyStatus_Exception(status), "PyConfig_SetString: %s:%s", status.func, status.err_msg); + // Some python modules do not cope with an unpopulated argv, so lets + // fake one. This step also picks up site-packages into sys.path. + const wchar_t* argv[] = {L"ceph-mgr"}; + status = PyConfig_SetArgv(&py_config, 1, (wchar_t *const *)argv); + ceph_assertf(!PyStatus_Exception(status), "PyConfig_SetArgv: %s:%s", status.func, status.err_msg); // Add more modules if (g_conf().get_val<bool>("daemonize")) { PyImport_AppendInittab("ceph_logger", PyModule::init_ceph_logger); ++++++ ceph-mgr-stop-using-deprecated-api-to-initialize-python.patch ++++++ >From a21d80c6b4c9e27e5472fed837bb6308639b0492 Mon Sep 17 00:00:00 2001 From: Kefu Chai <tchai...@gmail.com> Date: Sat, 3 Feb 2024 19:22:15 +0800 Subject: [PATCH] mgr: stop using deprecated API to initialize Python MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Py_SetProgramName() is deprecated since CPython 3.11, see https://docs.python.org/3/c-api/init_config.html . `Py_InitializeFromConfig()` and friends were introduced by CPython 3.8, but we still need to support CPython 3.6 which is shipped by CentOS8. so we have to be backward compatible with the older Python versions. so let's use new machinary to initialize the Python interpretor if the tree is compiled with CPython 3.8 and up, i.e., PY_VERSION_HEX >= 0x03080000. so that this piece of code can be tested on ubuntu:jammy, which ships Python 3.10, see https://packages.ubuntu.com/jammy/amd64/python3 this change addresses following compiling warning: ``` [428/753] Building CXX object src/mgr/CMakeFiles/ceph-mgr.dir/PyModuleRegistry.cc.o /var/ssd/ceph/src/mgr/PyModuleRegistry.cc: In member function ‘void PyModuleRegistry::init()’: /var/ssd/ceph/src/mgr/PyModuleRegistry.cc:49:20: warning: ‘void Py_SetProgramName(const wchar_t*)’ is deprecated [-Wdeprecated-declarations] 49 | Py_SetProgramName(const_cast<wchar_t*>(WCHAR(MGR_PYTHON_EXECUTABLE))); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.12/Python.h:94, from /var/ssd/ceph/src/mgr/PyModule.h:22, from /var/ssd/ceph/src/mgr/PyModuleRegistry.h:18, from /var/ssd/ceph/src/mgr/PyModuleRegistry.cc:14: /usr/include/python3.12/pylifecycle.h:37:38: note: declared here 37 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *); | ^~~~~~~~~~~~~~~~~` ``` Signed-off-by: Kefu Chai <tchai...@gmail.com> --- src/mgr/PyModuleRegistry.cc | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/src/mgr/PyModuleRegistry.cc b/src/mgr/PyModuleRegistry.cc index eb2d2babe75fa..1fd92b9028290 100644 --- a/src/mgr/PyModuleRegistry.cc +++ b/src/mgr/PyModuleRegistry.cc @@ -14,6 +14,7 @@ #include "PyModuleRegistry.h" #include <filesystem> +#include <boost/scope_exit.hpp> #include "include/stringify.h" #include "common/errno.h" @@ -46,14 +47,47 @@ void PyModuleRegistry::init() // Set up global python interpreter #define WCHAR(s) L ## #s +#if PY_VERSION_HEX >= 0x03080000 + PyConfig py_config; + // do not enable isolated mode, otherwise we would not be able to have access + // to the site packages. since we cannot import any module before initializing + // the interpreter, we would not be able to use "site" module for retrieving + // the path to site packager. we import "site" module for retrieving + // sitepackages in Python < 3.8 though, this does not apply to the + // initialization with PyConfig. + PyConfig_InitPythonConfig(&py_config); + BOOST_SCOPE_EXIT_ALL(&py_config) { + PyConfig_Clear(&py_config); + }; +#if PY_VERSION_HEX >= 0x030b0000 + py_config.safe_path = 0; +#endif + py_config.parse_argv = 0; + py_config.configure_c_stdio = 0; + py_config.install_signal_handlers = 0; + py_config.pathconfig_warnings = 0; + + PyStatus status; + status = PyConfig_SetString(&py_config, &py_config.program_name, WCHAR(MGR_PYTHON_EXECUTABLE)); + ceph_assertf(!PyStatus_Exception(status), "PyConfig_SetString: %s:%s", status.func, status.err_msg); + // Add more modules + if (g_conf().get_val<bool>("daemonize")) { + PyImport_AppendInittab("ceph_logger", PyModule::init_ceph_logger); + } + PyImport_AppendInittab("ceph_module", PyModule::init_ceph_module); + status = Py_InitializeFromConfig(&py_config); + ceph_assertf(!PyStatus_Exception(status), "Py_InitializeFromConfig: %s:%s", status.func, status.err_msg); +#else Py_SetProgramName(const_cast<wchar_t*>(WCHAR(MGR_PYTHON_EXECUTABLE))); -#undef WCHAR // Add more modules if (g_conf().get_val<bool>("daemonize")) { PyImport_AppendInittab("ceph_logger", PyModule::init_ceph_logger); } PyImport_AppendInittab("ceph_module", PyModule::init_ceph_module); Py_InitializeEx(0); +#endif // PY_VERSION_HEX >= 0x03080000 +#undef WCHAR + #if PY_VERSION_HEX < 0x03090000 // Let CPython know that we will be calling it back from other // threads in future. ++++++ ceph-mgr-workaround-numpy-28271.patch ++++++ --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -11,7 +11,7 @@ from prettytable import PrettyTable try: from natsort import natsorted -except ImportError: +except (ImportError, RuntimeError): # fallback to normal sort natsorted = sorted # type: ignore ++++++ ceph-pybind-fix-c-type-errors-in-cython-generated-python-bindings.patch ++++++ >From a49d154f4a8e493baf2296a15c7b5c56cd25e993 Mon Sep 17 00:00:00 2001 From: Florian Weimer <fwei...@redhat.com> Date: Wed, 20 Dec 2023 14:59:19 +0100 Subject: [PATCH] pybind: Fix C type errors in Cython-generated Python bindings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several Ceph APIs use bool * types, which correspond to libcpp.bool * types in Cython. The bint type has an incorrect size 4 and cannot be used as a replacement. This prevents a compilation failure with future compilers: …-build/src/pybind/rbd/rbd.c: In function ‘__pyx_pf_3rbd_3RBD_104namespace_exists’: …-build/src/pybind/rbd/rbd.c:42165:76: error: passing argument 3 of ‘rbd_namespace_exists’ from incompatible pointer type 42165 | __pyx_v_ret = rbd_namespace_exists(__pyx_v__ioctx, __pyx_v__name, (&__pyx_v__exists)); | ~^~~~~~~~~~~~~~~~~ | | | int * In file included from …-build/src/pybind/rbd/rbd.c:1268: …/src/include/rbd/librbd.h:1496:45: note: expected ‘_Bool *’ but argument is of type ‘int *’ 1496 | bool *exists); | ^ Signed-off-by: Florian Weimer <fwei...@redhat.com> --- src/pybind/rbd/c_rbd.pxd | 5 +++-- src/pybind/rbd/mock_rbd.pxi | 9 +++++++-- src/pybind/rbd/rbd.pyx | 9 +++++---- src/pybind/rgw/mock_rgw.pxi | 9 +++++++-- src/pybind/rgw/rgw.pyx | 3 ++- 5 files changed, 24 insertions(+), 11 deletions(-) --- a/src/pybind/rbd/c_rbd.pxd +++ b/src/pybind/rbd/c_rbd.pxd @@ -2,6 +2,7 @@ from libc.stdint cimport * from ctime cimport time_t, timespec +cimport libcpp cdef extern from "rados/librados.h": enum: @@ -530,7 +531,7 @@ cdef extern from "rbd/librbd.h" nogil: int rbd_snap_unprotect(rbd_image_t image, const char *snap_name) int rbd_snap_is_protected(rbd_image_t image, const char *snap_name, int *is_protected) - int rbd_snap_exists(rbd_image_t image, const char *snapname, bint *exists) + int rbd_snap_exists(rbd_image_t image, const char *snapname, libcpp.bool *exists) int rbd_snap_get_limit(rbd_image_t image, uint64_t *limit) int rbd_snap_set_limit(rbd_image_t image, uint64_t limit) int rbd_snap_get_timestamp(rbd_image_t image, uint64_t snap_id, timespec *timestamp) @@ -721,7 +722,7 @@ cdef extern from "rbd/librbd.h" nogil: int rbd_namespace_list(rados_ioctx_t io, char *namespace_names, size_t *size) int rbd_namespace_exists(rados_ioctx_t io, const char *namespace_name, - bint *exists) + libcpp.bool *exists) int rbd_pool_init(rados_ioctx_t, bint force) --- a/src/pybind/rbd/mock_rbd.pxi +++ b/src/pybind/rbd/mock_rbd.pxi @@ -3,6 +3,11 @@ from libc.stdint cimport * from ctime cimport time_t, timespec +# Make the bool type available as libcpp.bool, for both C and C++. +cimport libcpp +cdef extern from "<stdbool.h>": + pass + cdef nogil: enum: _LIBRADOS_SNAP_HEAD "LIBRADOS_SNAP_HEAD" @@ -642,7 +647,7 @@ cdef nogil: int rbd_snap_is_protected(rbd_image_t image, const char *snap_name, int *is_protected): pass - int rbd_snap_exists(rbd_image_t image, const char *snapname, bint *exists): + int rbd_snap_exists(rbd_image_t image, const char *snapname, libcpp.bool *exists): pass int rbd_snap_get_limit(rbd_image_t image, uint64_t *limit): pass @@ -907,7 +912,7 @@ cdef nogil: size_t *size): pass int rbd_namespace_exists(rados_ioctx_t io, const char *namespace_name, - bint *exists): + libcpp.bool *exists): pass int rbd_pool_init(rados_ioctx_t io, bint force): pass --- a/src/pybind/rbd/rbd.pyx +++ b/src/pybind/rbd/rbd.pyx @@ -23,6 +23,7 @@ from libc cimport errno from libc.stdint cimport * from libc.stdlib cimport malloc, realloc, free from libc.string cimport strdup, memset +cimport libcpp try: from collections.abc import Iterable @@ -1952,12 +1953,12 @@ class RBD(object): cdef: rados_ioctx_t _ioctx = convert_ioctx(ioctx) const char *_name = name - bint _exists = False + libcpp.bool _exists = False with nogil: ret = rbd_namespace_exists(_ioctx, _name, &_exists) if ret != 0: raise make_ex(ret, 'error verifying namespace') - return bool(_exists != 0) + return _exists def namespace_list(self, ioctx): """ @@ -3707,12 +3708,12 @@ cdef class Image(object): name = cstr(name, 'name') cdef: char *_name = name - bint _exists = False + libcpp.bool _exists = False with nogil: ret = rbd_snap_exists(self.image, _name, &_exists) if ret != 0: raise make_ex(ret, 'error getting snapshot exists for %s' % self.name) - return bool(_exists != 0) + return _exists @requires_not_closed def get_snap_limit(self): --- a/src/pybind/rgw/mock_rgw.pxi +++ b/src/pybind/rgw/mock_rgw.pxi @@ -1,5 +1,10 @@ # cython: embedsignature=True +# Make the bool type available as libcpp.bool, for both C and C++. +cimport libcpp +cdef extern from "<stdbool.h>": + pass + cdef nogil: ctypedef void* librgw_t @@ -111,8 +116,8 @@ cdef nogil: int rgw_readdir(rgw_fs *fs, rgw_file_handle *parent_fh, uint64_t *offset, - bint (*cb)(const char *name, void *arg, uint64_t offset, stat *st, uint32_t st_mask, uint32_t flags) nogil except? -9000, - void *cb_arg, bint *eof, uint32_t flags) except? -9000: + libcpp.bool (*cb)(const char *name, void *arg, uint64_t offset, stat *st, uint32_t st_mask, uint32_t flags) nogil except? -9000, + void *cb_arg, libcpp.bool *eof, uint32_t flags) except? -9000: pass int rgw_getattr(rgw_fs *fs, --- a/src/pybind/rgw/rgw.pyx +++ b/src/pybind/rgw/rgw.pyx @@ -7,6 +7,7 @@ from cpython cimport PyObject, ref, exc, from libc.stdint cimport * from libc.stdlib cimport malloc, realloc, free from cstat cimport stat +cimport libcpp IF BUILD_DOC: include "mock_rgw.pxi" @@ -373,7 +374,7 @@ cdef class LibRGWFS(object): cdef: rgw_file_handle *_dir_handler = <rgw_file_handle*>dir_handler.handler uint64_t _offset = offset - bint _eof + libcpp.bool _eof uint32_t _flags = flags with nogil: ret = rgw_readdir(self.fs, _dir_handler, &_offset, &readdir_cb, ++++++ ceph-rocksdb-gcc15.patch ++++++ The uint_* types are no longer implicitly included by other imports in gcc15. --- a/src/rocksdb/db/blob/blob_file_meta.h +++ b/src/rocksdb/db/blob/blob_file_meta.h @@ -6,6 +6,7 @@ #pragma once #include <cassert> +#include <cstdint> #include <iosfwd> #include <memory> #include <string> --- a/src/rocksdb/include/rocksdb/trace_record.h +++ b/src/rocksdb/include/rocksdb/trace_record.h @@ -5,6 +5,7 @@ #pragma once +#include <cstdint> #include <memory> #include <string> #include <vector> ++++++ ceph-tracing-fix-c-type-errors-in-librados-tracing.patch ++++++ >From f9aea9105b6c1a8d7bff0ec0675f84f2ffb1db6f Mon Sep 17 00:00:00 2001 From: Florian Weimer <fwei...@redhat.com> Date: Wed, 20 Dec 2023 14:16:19 +0100 Subject: [PATCH] tracing: Fix C type errors in librados tracing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes type errors like this: In file included from /usr/include/lttng/tracepoint-event.h:69, from …-build/include/tracing/librados.h:4143, from …/src/tracing/librados.c:6 : …-build/include/tracing/librados.h: In function ‘lttng_ust__event_probe__librados___rados_mon_command_exit’: …-build/include/tracing/librados.h:477:9: error: initialization of ‘size_t’ {aka ‘long unsigned int’} from ‘size_t *’ {aka ‘long unsigned int *’} makes integer from pointer without a cast 477 | ceph_ctf_integerp(size_t, outslen, outslen) | ^~~~~~~~~~~~~~~~~ GCC 14 will likely treat these type mismatches as an error and fail the build. Signed-off-by: Florian Weimer <fwei...@redhat.com> --- src/tracing/librados.tp | 4 ++-- src/tracing/tracing-common.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tracing/librados.tp b/src/tracing/librados.tp index 8b5e78ef15d65..8e116124b83d5 100644 --- a/src/tracing/librados.tp +++ b/src/tracing/librados.tp @@ -2628,7 +2628,7 @@ TRACEPOINT_EVENT(librados, rados_watch3_enter, TP_FIELDS( ctf_integer_hex(rados_ioctx_t, ioctx, ioctx) ctf_string(oid, oid) - ctf_integer_hex(uint64_t, phandle, phandle) + ctf_integer_hex(uint64_t*, phandle, phandle) ctf_integer_hex(rados_watchcb2_t, callback, callback) ctf_integer(uint32_t, timeout, timeout) ctf_integer_hex(void*, arg, arg) @@ -2658,7 +2658,7 @@ TRACEPOINT_EVENT(librados, rados_aio_watch2_enter, ctf_integer_hex(rados_ioctx_t, ioctx, ioctx) ctf_string(oid, oid) ctf_integer_hex(rados_completion_t, completion, completion) - ctf_integer_hex(uint64_t, phandle, phandle) + ctf_integer_hex(uint64_t*, phandle, phandle) ctf_integer_hex(rados_watchcb2_t, callback, callback) ctf_integer(uint32_t, timeout, timeout) ctf_integer_hex(void*, arg, arg) diff --git a/src/tracing/tracing-common.h b/src/tracing/tracing-common.h index 3e07f9de8e85c..03449ab588615 100644 --- a/src/tracing/tracing-common.h +++ b/src/tracing/tracing-common.h @@ -21,7 +21,7 @@ // type should be an integer type // val should have type type* #define ceph_ctf_integerp(type, field, val) \ - ctf_integer(type, field, (val) == NULL ? 0 : (val)) \ + ctf_integer(type, field, (val) == NULL ? 0 : *(val)) \ ctf_integer(uint8_t, field##_isnull, (val) == NULL) // val should have type char* ++++++ ceph-volume-fix-importlib.metadata-compat.patch ++++++ >From 8c78a22d2cf69892570f635735d9735169b64a75 Mon Sep 17 00:00:00 2001 From: Peter Sabaini <peter.saba...@canonical.com> Date: Wed, 11 Sep 2024 16:56:50 +0200 Subject: [PATCH] ceph-volume: fix importlib.metadata compat The importlib.metadata library removed older shims in releases >5.0.0 where EntryPoints objects use .select() instead of dict-like access. Fixes: https://tracker.ceph.com/issues/68032 Signed-off-by: Peter Sabaini <peter.saba...@canonical.com> --- src/ceph-volume/ceph_volume/main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ceph-volume/ceph_volume/main.py b/src/ceph-volume/ceph_volume/main.py index f8eca65ec497c..4f27f429e89e2 100644 --- a/src/ceph-volume/ceph_volume/main.py +++ b/src/ceph-volume/ceph_volume/main.py @@ -11,8 +11,16 @@ from importlib.metadata import entry_points def get_entry_points(group: str): # type: ignore - return entry_points().get(group, []) # type: ignore + eps = entry_points() + if hasattr(eps, 'select'): + # New importlib.metadata uses .select() + return eps.select(group=group) + else: + # Fallback to older EntryPoints that returns dicts + return eps.get(group, []) # type: ignore + except ImportError: + # Fallback to `pkg_resources` for older versions from pkg_resources import iter_entry_points as entry_points # type: ignore def get_entry_points(group: str): # type: ignore ++++++ cephadm-fix-get_cluster_count_when_data_dir_is_missing.patch ++++++ >From f9f015beaa868c5901f0782543ef05a2ca260504 Mon Sep 17 00:00:00 2001 From: James Oakley <jf...@funktronics.ca> Date: Sun, 15 Jun 2025 12:04:35 -0300 Subject: [PATCH] cephadm: Fix get_cluster_count when data_dir is missing It is possible for cephadm, if it fails to create a cluster, to direct the user to delete the cluster even though the data_dir has not yet been created. Running that command would fail during the cluster count check. Signed-off-by: James Oakley <jf...@funktronics.ca> --- src/cephadm/cephadm.py | 4 +++- src/cephadm/tests/test_cephadm.py | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -8252,7 +8252,9 @@ def command_zap_osds(ctx: CephadmContext def get_ceph_cluster_count(ctx: CephadmContext) -> int: - return len([c for c in os.listdir(ctx.data_dir) if is_fsid(c)]) + if os.path.isdir(ctx.data_dir): + return len([c for c in os.listdir(ctx.data_dir) if is_fsid(c)]) + return 0 def command_rm_cluster(ctx: CephadmContext) -> None: --- a/src/cephadm/tests/test_cephadm.py +++ b/src/cephadm/tests/test_cephadm.py @@ -1136,6 +1136,11 @@ ff792c06d8544b983.scope not found.: OCI with mock.patch('os.listdir', return_value=test_input): assert _cephadm.get_ceph_cluster_count(ctx) == expected + def test_get_ceph_cluster_count_missing_datadir(self): + ctx = _cephadm.CephadmContext() + with mock.patch('os.path.isdir', return_value=False): + assert _cephadm.get_ceph_cluster_count(ctx) == 0 + def test_set_image_minimize_config(self): def throw_cmd(cmd): raise _cephadm.Error(' '.join(cmd))