%else
%bcond_with rbd_rwl_cache
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
-%if 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
+%if 0%{?openEuler} || 0%{?openruyi}
%bcond_with system_pmdk
%else
%ifarch s390x aarch64
%bcond_without system_pmdk
%endif
%endif
+%if 0%{?openruyi}
+%bcond_with selinux
+%else
%bcond_without selinux
+%endif
%bcond_without amqp_endpoint
%bcond_without kafka_endpoint
%bcond_without lttng
%else
%bcond_without jaeger
%endif
-%if 0%{?fedora} || 0%{?suse_version} >= 1500 || 0%{?rhel}
+%if 0%{?fedora} || 0%{?suse_version} >= 1500 || 0%{?rhel} || 0%{?openruyi}
# distros that ship cmd2 and/or colorama
%bcond_without cephfs_shell
%else
%{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0}
%endif
%endif
+%if 0%{?openruyi}
+%bcond_with cephadm_bundling
+%else
%bcond_without cephadm_bundling
+%endif
%bcond_without cephadm_pip_deps
%bcond_without dwz
%if %{with dwz}
%endif
%if 0%{with tcmalloc}
# libprofiler did not build on ppc64le until 2.7.90
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
BuildRequires: pkgconfig(libtcmalloc) >= 2.7.90
%endif
%if 0%{?suse_version}
BuildRequires: socat
BuildRequires: python3dist(asyncssh)
BuildRequires: python3dist(natsort)
+%if 0%{?openruyi}
+BuildRequires: python3dist(cryptography)
+BuildRequires: python3dist(jsonpatch)
+BuildRequires: python3dist(jinja2)
+BuildRequires: python3dist(werkzeug)
+BuildRequires: python3dist(mypy)
+BuildRequires: python3dist(pecan)
+BuildRequires: python3dist(requests-mock)
+BuildRequires: python3dist(kubernetes)
+BuildRequires: python3dist(asyncmock)
+BuildRequires: python3dist(types-pyyaml)
+%endif
%endif
BuildRequires: pkgconfig(thrift) >= 0.13.0
BuildRequires: pkgconfig(re2)
BuildRequires: CUnit-devel
BuildRequires: python3-devel
%endif
+%if 0%{?openruyi}
+BuildRequires: ninja
+%endif
# distro-conditional make check dependencies
%if 0%{with make_check}
BuildRequires: golang
BuildRequires: python3dist(scipy)
BuildRequires: python3dist(pyopenssl)
%endif
+%if 0%{?openruyi}
+BuildRequires: /usr/bin/promtool
+BuildRequires: python3dist(scipy)
+BuildRequires: python3dist(numpy)
+BuildRequires: python3dist(tox)
+BuildRequires: python3dist(pyfakefs)
+%endif
BuildRequires: jsonnet
%if 0%{?suse_version}
BuildRequires: golang-github-prometheus-prometheus
Requires: ceph-mgr-smb = %{_epoch_prefix}%{version}-%{release}
Requires: ceph-grafana-dashboards = %{_epoch_prefix}%{version}-%{release}
Requires: ceph-prometheus-alerts = %{_epoch_prefix}%{version}-%{release}
-%if 0%{?fedora} || 0%{?rhel}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openruyi}
Requires: python3dist(grpcio)
Requires: python3dist(grpcio-tools)
Requires: python3dist(jmespath)
%endif
Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
Requires: python3dist(numpy)
-%if 0%{?fedora} || 0%{?suse_version} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?openEuler} || 0%{?openruyi}
Requires: python3dist(scikit-learn)
%endif
Requires: python3dist(scipy)
%if 0%{?suse_version}
Requires: openssh
%endif
-%if 0%{?rhel} || 0%{?fedora} || 0%{?openEuler}
+%if 0%{?rhel} || 0%{?fedora} || 0%{?openEuler} || 0%{?openruyi}
Requires: openssh-clients
%endif
%description mgr-cephadm
%if 0%{with make_check}
%check
+%if 0%{?openruyi}
+export CEPH_PYTHON_SYSTEM_SITE=true
+%endif
# run in-tree unittests
pushd %{_vpath_builddir}
ctest %{_smp_mflags}
mv %{buildroot}%{_bindir}/ceph-osd %{buildroot}%{_bindir}/ceph-osd-classic
install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph
%endif
%if 0%{?suse_version}
# sudoers.d
install -m 0440 -D sudoers.d/ceph-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-smartctl
-%if 0%{?rhel} || 0%{?openEuler}
+%if 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
# Undefine -P flag as it is only supported with python version >= 3.11
%undefine _py3_shebang_P
%{_libdir}/libmgr_op_tp.so*
%endif
%config(noreplace) %{_sysconfdir}/logrotate.d/ceph
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%config(noreplace) %{_sysconfdir}/sysconfig/ceph
%endif
%if 0%{?suse_version}
/usr/bin/systemctl preset ceph.target ceph-crash.service >/dev/null 2>&1 || :
fi
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_post ceph.target ceph-crash.service
%endif
if [ $1 -eq 1 ] ; then
%if 0%{?suse_version}
%service_del_preun ceph.target ceph-crash.service
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_preun ceph.target ceph-crash.service
%endif
%pre common
CEPH_GROUP_ID=167
CEPH_USER_ID=167
-%if 0%{?rhel} || 0%{?fedora} || 0%{?openEuler}
+%if 0%{?rhel} || 0%{?fedora} || 0%{?openEuler} || 0%{?openruyi}
/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
/usr/bin/systemctl preset ceph-mds@\*.service ceph-mds.target >/dev/null 2>&1 || :
fi
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_post ceph-mds@\*.service ceph-mds.target
%endif
if [ $1 -eq 1 ] ; then
%if 0%{?suse_version}
%service_del_preun ceph-mds@\*.service ceph-mds.target
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_preun ceph-mds@\*.service ceph-mds.target
%endif
/usr/bin/systemctl preset ceph-mgr@\*.service ceph-mgr.target >/dev/null 2>&1 || :
fi
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_post ceph-mgr@\*.service ceph-mgr.target
%endif
if [ $1 -eq 1 ] ; then
%if 0%{?suse_version}
%service_del_preun ceph-mgr@\*.service ceph-mgr.target
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_preun ceph-mgr@\*.service ceph-mgr.target
%endif
/usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || :
fi
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_post ceph-mon@\*.service ceph-mon.target
%endif
if [ $1 -eq 1 ] ; then
%if 0%{?suse_version}
%service_del_preun ceph-mon@\*.service ceph-mon.target
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_preun ceph-mon@\*.service ceph-mon.target
%endif
/usr/bin/systemctl preset cephfs-mirror@\*.service cephfs-mirror.target >/dev/null 2>&1 || :
fi
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_post cephfs-mirror@\*.service cephfs-mirror.target
%endif
if [ $1 -eq 1 ] ; then
%if 0%{?suse_version}
%service_del_preun cephfs-mirror@\*.service cephfs-mirror.target
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_preun cephfs-mirror@\*.service cephfs-mirror.target
%endif
/usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || :
fi
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
%endif
if [ $1 -eq 1 ] ; then
%if 0%{?suse_version}
%service_del_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
%endif
/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} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_post ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target
%endif
if [ $1 -eq 1 ] ; then
%if 0%{?suse_version}
%service_del_preun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_preun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target
%endif
/usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || :
fi
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_post ceph-radosgw@\*.service ceph-radosgw.target
%endif
if [ $1 -eq 1 ] ; then
%if 0%{?suse_version}
%service_del_preun ceph-radosgw@\*.service ceph-radosgw.target
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_preun ceph-radosgw@\*.service ceph-radosgw.target
%endif
/usr/bin/systemctl preset ceph-osd@\*.service ceph-osd.target >/dev/null 2>&1 || :
fi
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_post ceph-osd@\*.service ceph-osd.target
%endif
if [ $1 -eq 1 ] ; then
%if 0%{?suse_version}
%service_del_preun ceph-osd@\*.service ceph-osd.target
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_preun ceph-osd@\*.service ceph-osd.target
%endif
/usr/bin/systemctl preset ceph-volume@\*.service >/dev/null 2>&1 || :
fi
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_post ceph-volume@\*.service
%endif
%if 0%{?suse_version}
%service_del_preun ceph-volume@\*.service
%endif
-%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
+%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} || 0%{?openruyi}
%systemd_preun ceph-volume@\*.service
%endif