add loongarch support for ceph
This commit is contained in:
parent
65e94f8975
commit
3b958eb678
@ -0,0 +1,29 @@
|
||||
From 46d99c8020dae9372328399618246cd9bc7b4e2b Mon Sep 17 00:00:00 2001
|
||||
From: Wenlong Zhang <zhangwenlong@loongson.cn>
|
||||
Date: Thu, 12 Jan 2023 09:03:33 +0800
|
||||
Subject: [PATCH] rgw_string.h: has missing includes when compiling with
|
||||
boost 1.78
|
||||
|
||||
ceph compilation failure: invalid use of incomplete type in rgw
|
||||
https://tracker.ceph.com/issues/50952
|
||||
https://tracker.ceph.com/issues/50924
|
||||
---
|
||||
src/rgw/rgw_string.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/rgw/rgw_string.h b/src/rgw/rgw_string.h
|
||||
index 257daa9c1..90e64f98a 100644
|
||||
--- a/src/rgw/rgw_string.h
|
||||
+++ b/src/rgw/rgw_string.h
|
||||
@@ -8,6 +8,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <string_view>
|
||||
+#include <string>
|
||||
+#include <stdexcept>
|
||||
|
||||
#include <boost/container/small_vector.hpp>
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
25
0013-add-atomic-library-for-loongarch64.patch
Normal file
25
0013-add-atomic-library-for-loongarch64.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 4f6828fc2b7d29557e80ebce6a31a7aa0a1b3e17 Mon Sep 17 00:00:00 2001
|
||||
From: Wenlong Zhang <zhangwenlong@loongson.cn>
|
||||
Date: Thu, 12 Jan 2023 16:17:54 +0800
|
||||
Subject: [PATCH] add atomic library for loongarch64
|
||||
|
||||
---
|
||||
cmake/modules/CheckCxxAtomic.cmake | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmake/modules/CheckCxxAtomic.cmake b/cmake/modules/CheckCxxAtomic.cmake
|
||||
index 0b06d5ee4..a2a2a3bfa 100644
|
||||
--- a/cmake/modules/CheckCxxAtomic.cmake
|
||||
+++ b/cmake/modules/CheckCxxAtomic.cmake
|
||||
@@ -11,7 +11,7 @@ function(check_cxx_atomics var)
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
|
||||
-#if defined(__s390x__) || defined(__sw_64__)
|
||||
+#if defined(__s390x__) || defined(__sw_64__) || defined(__loongarch64)
|
||||
// Boost needs 16-byte atomics for tagged pointers.
|
||||
// These are implemented via inline instructions on the platform
|
||||
// if 16-byte alignment can be proven, and are delegated to libatomic
|
||||
--
|
||||
2.33.0
|
||||
|
||||
19
ceph.spec
19
ceph.spec
@ -125,7 +125,7 @@
|
||||
#################################################################################
|
||||
Name: ceph
|
||||
Version: 16.2.7
|
||||
Release: 13
|
||||
Release: 14
|
||||
%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
|
||||
Epoch: 2
|
||||
%endif
|
||||
@ -154,6 +154,8 @@ Patch8: 0008-enable-sw64-architecture.patch
|
||||
Patch9: 0009-fix-CVE-2022-0670.patch
|
||||
Patch10: 0010-fix-CVE-2022-3650.patch
|
||||
Patch11: 0011-fix-no-module-named-v1_event-for-mgr-k8sevent.patch
|
||||
Patch12: 0012-add-missing-includes-when-compiling-with-boost-1.75.patch
|
||||
Patch13: 0013-add-atomic-library-for-loongarch64.patch
|
||||
%if 0%{?suse_version}
|
||||
# _insert_obs_source_lines_here
|
||||
ExclusiveArch: x86_64 aarch64 ppc64le s390x
|
||||
@ -404,6 +406,11 @@ BuildRequires: libnuma-devel
|
||||
%if 0%{?rhel} >= 8 || 0%{?openEuler}
|
||||
BuildRequires: /usr/bin/pathfix.py
|
||||
%endif
|
||||
%ifarch loongarch64
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: boost-random
|
||||
BuildRequires: libatomic
|
||||
%endif
|
||||
|
||||
%description
|
||||
Ceph is a massively scalable, open-source, distributed storage system that runs
|
||||
@ -1207,7 +1214,9 @@ This package provides Ceph default alerts for Prometheus.
|
||||
#################################################################################
|
||||
%prep
|
||||
%autosetup -p1 -n ceph-16.2.7
|
||||
%ifnarch sw_64
|
||||
|
||||
%ifnarch loongarch64 sw_64
|
||||
%patch13 -R -p1
|
||||
%patch8 -R -p1
|
||||
%endif
|
||||
|
||||
@ -1343,6 +1352,9 @@ ${CMAKE} .. \
|
||||
-DBOOST_J=$CEPH_SMP_NCPUS \
|
||||
%if 0%{?rhel}
|
||||
-DWITH_FMT_HEADER_ONLY:BOOL=ON \
|
||||
%endif
|
||||
%ifarch loongarch64
|
||||
-DWITH_SYSTEM_BOOST=ON \
|
||||
%endif
|
||||
-DWITH_GRAFANA=ON
|
||||
|
||||
@ -2489,6 +2501,9 @@ exit 0
|
||||
%config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml
|
||||
|
||||
%changelog
|
||||
* Thu Jan 12 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 2:16.2.7-14
|
||||
- add loongarch support for ceph
|
||||
|
||||
* Wed Dec 28 2022 yaoguangzhong <yaoguangzhong@xfusion.com> - 2:16.2.7-13
|
||||
- fix no module named v1_event for mgr/k8sevent
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user