%if 0%{?rhel} < 9
%bcond_with system_pmdk
%else
+%ifarch s390x aarch64
+%bcond_with system_pmdk
+%else
%bcond_without system_pmdk
%endif
+%endif
%bcond_without selinux
%if 0%{?rhel} >= 8
%bcond_with cephfs_java
%{!?python3_pkgversion: %global python3_pkgversion 3}
%{!?python3_version_nodots: %global python3_version_nodots 3}
%{!?python3_version: %global python3_version 3}
+%{!?gts_prefix: %global gts_prefix gcc-toolset-11}
%if ! 0%{?suse_version}
# use multi-threaded xz compression: xz level 7 using ncpus threads
%endif
%endif
-%if 0%{with seastar}
-# disable -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1, as gcc-toolset-{9,10}-annobin
+# 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
#################################################################################
BuildRequires: gperf
BuildRequires: cmake > 3.5
BuildRequires: fuse-devel
-%if 0%{with seastar} && 0%{?rhel}
-BuildRequires: gcc-toolset-9-gcc-c++ >= 9.2.1-2.3
-%else
-BuildRequires: gcc-c++
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 9
+BuildRequires: gcc-c++ >= 11
+%endif
+%if 0%{?rhel} == 8
+BuildRequires: %{gts_prefix}-gcc-c++
+BuildRequires: %{gts_prefix}-build
+%ifarch aarch64
+BuildRequires: %{gts_prefix}-libatomic-devel
+%endif
+%endif
+%if 0%{?fedora} || 0%{?rhel} == 9
+BuildRequires: libatomic
%endif
%if 0%{with tcmalloc}
# libprofiler did not build on ppc64le until 2.7.90
BuildRequires: python%{python3_pkgversion}-coverage
BuildRequires: python%{python3_pkgversion}-pyOpenSSL
BuildRequires: socat
+BuildRequires: python%{python3_pkgversion}-asyncssh
+BuildRequires: python%{python3_pkgversion}-natsort
%endif
%if 0%{with zbd}
BuildRequires: libzbd-devel
%if 0%{?fedora}
BuildRequires: libubsan
BuildRequires: libasan
-BuildRequires: libatomic
%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}-libubsan-devel
+BuildRequires: %{gts_prefix}-libasan-devel
%endif
%endif
#################################################################################
BuildRequires: liblz4-devel >= 1.7
# for prometheus-alerts
BuildRequires: golang-github-prometheus-prometheus
+BuildRequires: jsonnet
%endif
%if 0%{?fedora} || 0%{?rhel}
Requires: systemd
%endif
%if 0%{?suse_version}
BuildRequires: golang-github-prometheus-prometheus
+BuildRequires: jsonnet
BuildRequires: libxmlsec1-1
BuildRequires: libxmlsec1-nss1
BuildRequires: libxmlsec1-openssl1
Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
Requires: ceph-grafana-dashboards = %{_epoch_prefix}%{version}-%{release}
Requires: ceph-prometheus-alerts = %{_epoch_prefix}%{version}-%{release}
+Requires: python%{python3_pkgversion}-setuptools
%if 0%{?fedora} || 0%{?rhel}
Requires: python%{python3_pkgversion}-cherrypy
Requires: python%{python3_pkgversion}-jwt
%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}
%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
-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:BOOL=OFF \
%endif
%endif
%if 0%{with system_utf8proc}
-DWITH_SYSTEM_UTF8PROC:BOOL=ON \
+%endif
+%if 0%{with seastar}
+ -DWITH_SEASTAR:BOOL=ON \
+ -DWITH_JAEGER:BOOL=OFF \
%endif
-DWITH_GRAFANA:BOOL=ON
%install
+
pushd %{_vpath_builddir}
%make_install
# we have dropped sysvinit bits
%if ! 0%{?suse_version}
%postun -n cephadm
-userdel -r cephadm || true
-exit 0
+[ $1 -ne 0 ] || userdel cephadm || :
%endif
%files -n cephadm
fi
fi
+%files -n ceph-exporter
+%{_bindir}/ceph-exporter
+
%files -n rbd-fuse
%{_bindir}/rbd-fuse
%{_mandir}/man8/rbd-fuse.8*