summaryrefslogtreecommitdiffstats
path: root/recipes-extended/ceph/ceph
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/ceph/ceph')
-rw-r--r--recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch73
-rw-r--r--recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch189
-rw-r--r--recipes-extended/ceph/ceph/0001-cephadm-build.py-avoid-using-python3-from-sysroot-wh.patch43
-rw-r--r--recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.11.patch31
-rw-r--r--recipes-extended/ceph/ceph/0001-delete-install-layout-deb.patch37
5 files changed, 153 insertions, 220 deletions
diff --git a/recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch b/recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch
new file mode 100644
index 00000000..0b4fc984
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch
@@ -0,0 +1,73 @@
1From f807220d13adc0656c30d3207d11c70360b88d06 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Wed, 13 Mar 2024 03:14:55 -0700
4Subject: [PATCH] avoid to_string error
5
6Upstream-Status: Pending
7
8Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
9---
10 src/rgw/rgw_asio_client.cc | 15 ++++++++-------
11 1 file changed, 8 insertions(+), 7 deletions(-)
12
13diff --git a/src/rgw/rgw_asio_client.cc b/src/rgw/rgw_asio_client.cc
14index a0ec0bf5c..17880eda5 100644
15--- a/src/rgw/rgw_asio_client.cc
16+++ b/src/rgw/rgw_asio_client.cc
17@@ -3,6 +3,7 @@
18
19 #include <boost/algorithm/string/predicate.hpp>
20 #include <boost/asio/write.hpp>
21+#include <string_view>
22
23 #include "rgw_asio_client.h"
24 #include "rgw_perf_counters.h"
25@@ -39,11 +40,11 @@ int ClientIO::init_env(CephContext *cct)
26 const auto& value = header->value();
27
28 if (field == beast::http::field::content_length) {
29- env.set("CONTENT_LENGTH", value.to_string());
30+ env.set("CONTENT_LENGTH", std::string(value));
31 continue;
32 }
33 if (field == beast::http::field::content_type) {
34- env.set("CONTENT_TYPE", value.to_string());
35+ env.set("CONTENT_TYPE", std::string(value));
36 continue;
37 }
38
39@@ -62,26 +63,26 @@ int ClientIO::init_env(CephContext *cct)
40 }
41 *dest = '\0';
42
43- env.set(buf, value.to_string());
44+ env.set(buf, std::string(value));
45 }
46
47 int major = request.version() / 10;
48 int minor = request.version() % 10;
49 env.set("HTTP_VERSION", std::to_string(major) + '.' + std::to_string(minor));
50
51- env.set("REQUEST_METHOD", request.method_string().to_string());
52+ env.set("REQUEST_METHOD", std::string(request.method_string()));
53
54 // split uri from query
55 auto uri = request.target();
56 auto pos = uri.find('?');
57 if (pos != uri.npos) {
58 auto query = uri.substr(pos + 1);
59- env.set("QUERY_STRING", query.to_string());
60+ env.set("QUERY_STRING", std::string(query));
61 uri = uri.substr(0, pos);
62 }
63- env.set("SCRIPT_URI", uri.to_string());
64+ env.set("SCRIPT_URI", std::string(uri));
65
66- env.set("REQUEST_URI", request.target().to_string());
67+ env.set("REQUEST_URI", std::string(request.target()));
68
69 char port_buf[16];
70 snprintf(port_buf, sizeof(port_buf), "%d", local_endpoint.port());
71--
722.42.0
73
diff --git a/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch b/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch
deleted file mode 100644
index 9686becb..00000000
--- a/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch
+++ /dev/null
@@ -1,189 +0,0 @@
1From 4712fe18405ffea31405308357a8e7fca358bcce Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Mon, 11 Mar 2019 09:14:09 +0800
4Subject: [PATCH] ceph: fix build errors for cross compile
5
61. set the cross compile sysroot to find the rocksdb library
72. correct the install path for library in Distutils.cmake
8
9Upstream-Status: Inappropriate [oe specific]
10
11Signed-off-by: Dengke Du <dengke.du@windriver.com>
12
13Adjust context for v14.2.3
14
15Signed-off-by: He Zhe <zhe.he@windriver.com>
16Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
17---
18 cmake/modules/Distutils.cmake | 25 +++++--------------------
19 cmake/modules/FindRocksDB.cmake | 4 ++--
20 src/compressor/zstd/CMakeLists.txt | 2 +-
21 src/pybind/cephfs/setup.py | 8 --------
22 src/pybind/rados/setup.py | 8 --------
23 src/pybind/rbd/setup.py | 8 --------
24 src/pybind/rgw/setup.py | 8 --------
25 7 files changed, 8 insertions(+), 55 deletions(-)
26
27Index: ceph-18.2.0/cmake/modules/Distutils.cmake
28===================================================================
29--- ceph-18.2.0.orig/cmake/modules/Distutils.cmake
30+++ ceph-18.2.0/cmake/modules/Distutils.cmake
31@@ -29,17 +29,10 @@
32 cmake_parse_arguments(DU "" "INSTALL_SCRIPT" "" ${ARGN})
33 install(CODE "
34 set(options --prefix=${CMAKE_INSTALL_PREFIX})
35- if(DEFINED ENV{DESTDIR})
36- if(EXISTS /etc/debian_version)
37- list(APPEND options --install-layout=deb)
38- endif()
39- list(APPEND options
40- --root=\$ENV{DESTDIR}
41- --single-version-externally-managed)
42- endif()
43 if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\")
44 list(APPEND options --install-script=${DU_INSTALL_SCRIPT})
45- endif()
46+ list(APPEND options --root=${CMAKE_DESTDIR})
47+ list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR})
48 execute_process(
49 COMMAND ${Python3_EXECUTABLE}
50 setup.py install \${options}
51@@ -65,7 +58,7 @@
52 if(DU_DISABLE_VTA AND HAS_VTA)
53 list(APPEND PY_CFLAGS -fno-var-tracking-assignments)
54 endif()
55- list(APPEND PY_CPPFLAGS -iquote${CMAKE_SOURCE_DIR}/src/include -w)
56+ list(APPEND PY_CPPFLAGS -iquote${CMAKE_SOURCE_DIR}/src/include -w --sysroot=${CMAKE_SYSROOT})
57 # This little bit of magic wipes out __Pyx_check_single_interpreter()
58 # Note: this is reproduced in distutils_install_cython_module
59 list(APPEND PY_CPPFLAGS -D'void0=dead_function\(void\)')
60@@ -135,14 +128,8 @@
61 set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\")
62
63 set(options --prefix=${CMAKE_INSTALL_PREFIX})
64- if(DEFINED ENV{DESTDIR})
65- if(EXISTS /etc/debian_version)
66- list(APPEND options --install-layout=deb)
67- endif()
68- list(APPEND options --root=\$ENV{DESTDIR})
69- else()
70- list(APPEND options --root=/)
71- endif()
72+ list(APPEND options --root=${CMAKE_DESTDIR})
73+ list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR})
74 execute_process(
75 COMMAND
76 ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py
77Index: ceph-18.2.0/cmake/modules/FindRocksDB.cmake
78===================================================================
79--- ceph-18.2.0.orig/cmake/modules/FindRocksDB.cmake
80+++ ceph-18.2.0/cmake/modules/FindRocksDB.cmake
81@@ -9,9 +9,9 @@
82 # ROCKSDB_VERSION_MINOR
83 # ROCKSDB_VERSION_PATCH
84
85-find_path(ROCKSDB_INCLUDE_DIR rocksdb/db.h)
86+find_path(ROCKSDB_INCLUDE_DIR rocksdb/db.h ${CMAKE_SYSROOT})
87
88-find_library(ROCKSDB_LIBRARIES rocksdb)
89+find_library(ROCKSDB_LIBRARIES rocksdb ${CMAKE_SYSROOT})
90
91 if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h")
92 foreach(ver "MAJOR" "MINOR" "PATCH")
93Index: ceph-18.2.0/src/pybind/cephfs/setup.py
94===================================================================
95--- ceph-18.2.0.orig/src/pybind/cephfs/setup.py
96+++ ceph-18.2.0/src/pybind/cephfs/setup.py
97@@ -135,20 +135,6 @@
98 finally:
99 shutil.rmtree(tmp_dir)
100
101-
102-if 'BUILD_DOC' in os.environ or 'READTHEDOCS' in os.environ:
103- ext_args = {}
104- cython_constants = dict(BUILD_DOC=True)
105- cythonize_args = dict(compile_time_env=cython_constants)
106-elif check_sanity():
107- ext_args = get_python_flags(['cephfs'])
108- cython_constants = dict(BUILD_DOC=False)
109- include_path = [os.path.join(os.path.dirname(__file__), "..", "rados")]
110- cythonize_args = dict(compile_time_env=cython_constants,
111- include_path=include_path)
112-else:
113- sys.exit(1)
114-
115 cmdclass = {}
116 try:
117 from Cython.Build import cythonize
118Index: ceph-18.2.0/src/pybind/rados/setup.py
119===================================================================
120--- ceph-18.2.0.orig/src/pybind/rados/setup.py
121+++ ceph-18.2.0/src/pybind/rados/setup.py
122@@ -130,17 +130,6 @@
123 finally:
124 shutil.rmtree(tmp_dir)
125
126-
127-if 'BUILD_DOC' in os.environ or 'READTHEDOCS' in os.environ:
128- ext_args = {}
129- cython_constants = dict(BUILD_DOC=True)
130-elif check_sanity():
131- ext_args = get_python_flags(['rados'])
132- cython_constants = dict(BUILD_DOC=False)
133-else:
134- sys.exit(1)
135-
136-cmdclass = {}
137 try:
138 from Cython.Build import cythonize
139 from Cython.Distutils import build_ext
140Index: ceph-18.2.0/src/pybind/rbd/setup.py
141===================================================================
142--- ceph-18.2.0.orig/src/pybind/rbd/setup.py
143+++ ceph-18.2.0/src/pybind/rbd/setup.py
144@@ -133,20 +133,6 @@
145 finally:
146 shutil.rmtree(tmp_dir)
147
148-
149-if 'BUILD_DOC' in os.environ or 'READTHEDOCS' in os.environ:
150- ext_args = {}
151- cython_constants = dict(BUILD_DOC=True)
152- cythonize_args = dict(compile_time_env=cython_constants)
153-elif check_sanity():
154- ext_args = get_python_flags(['rados', 'rbd'])
155- cython_constants = dict(BUILD_DOC=False)
156- include_path = [os.path.join(os.path.dirname(__file__), "..", "rados")]
157- cythonize_args = dict(compile_time_env=cython_constants,
158- include_path=include_path)
159-else:
160- sys.exit(1)
161-
162 cmdclass = {}
163 try:
164 from Cython.Build import cythonize
165Index: ceph-18.2.0/src/pybind/rgw/setup.py
166===================================================================
167--- ceph-18.2.0.orig/src/pybind/rgw/setup.py
168+++ ceph-18.2.0/src/pybind/rgw/setup.py
169@@ -134,20 +134,6 @@
170 finally:
171 shutil.rmtree(tmp_dir)
172
173-
174-if 'BUILD_DOC' in os.environ or 'READTHEDOCS' in os.environ:
175- ext_args = {}
176- cython_constants = dict(BUILD_DOC=True)
177- cythonize_args = dict(compile_time_env=cython_constants)
178-elif check_sanity():
179- ext_args = get_python_flags(['rados', 'rgw'])
180- cython_constants = dict(BUILD_DOC=False)
181- include_path = [os.path.join(os.path.dirname(__file__), "..", "rados")]
182- cythonize_args = dict(compile_time_env=cython_constants,
183- include_path=include_path)
184-else:
185- sys.exit(1)
186-
187 cmdclass = {}
188 try:
189 from Cython.Build import cythonize
diff --git a/recipes-extended/ceph/ceph/0001-cephadm-build.py-avoid-using-python3-from-sysroot-wh.patch b/recipes-extended/ceph/ceph/0001-cephadm-build.py-avoid-using-python3-from-sysroot-wh.patch
new file mode 100644
index 00000000..a353a2f7
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-cephadm-build.py-avoid-using-python3-from-sysroot-wh.patch
@@ -0,0 +1,43 @@
1From b9867e6b744b77d97d22333eca3ab3d23d47e2e2 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Thu, 14 Mar 2024 00:19:19 -0700
4Subject: [PATCH] cephadm/build.py: avoid using python3 from sysroot when
5 creating zipapp archive
6
7ceph has the assumption that the python used during build
8is the python used at target, but this is not true for
9cross compilation. We'll need to use the target python3 here,
10otherwise, the cephadm zipapp cannot be executed.
11
12Upstream-Status: Pending
13
14Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
15---
16 src/cephadm/build.py | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/src/cephadm/build.py b/src/cephadm/build.py
20index 4264b814f1e..a4483d6f79d 100755
21--- a/src/cephadm/build.py
22+++ b/src/cephadm/build.py
23@@ -93,7 +93,7 @@ def _compile(dest, tempdir):
24 zipapp.create_archive(
25 source=tempdir,
26 target=dest,
27- interpreter=sys.executable,
28+ interpreter='/usr/bin/python3',
29 compressed=True,
30 )
31 log.info("Zipapp created with compression")
32@@ -102,7 +102,7 @@ def _compile(dest, tempdir):
33 zipapp.create_archive(
34 source=tempdir,
35 target=dest,
36- interpreter=sys.executable,
37+ interpreter='/usr/bin/python3',
38 )
39 log.info("Zipapp created without compression")
40
41--
422.42.0
43
diff --git a/recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.11.patch b/recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.11.patch
deleted file mode 100644
index c72c91b2..00000000
--- a/recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.11.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 1060f2e4362ebd6db23870d442dcd158d219ee92 Mon Sep 17 00:00:00 2001
2From: Yanfei Xu <yanfei.xu@windriver.com>
3Date: Tue, 10 Nov 2020 17:17:30 +0800
4Subject: [PATCH] cmake: add support for python 3.9 and 3.10
5
6add support for python3.9.
7
8Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
9
10Add support for python 3.10.
11
12Upstream-Status: Submitted [https://github.com/ceph/ceph/pull/43630]
13
14Signed-off-by: Kai Kang <kai.kang@windriver.com>
15---
16 cmake/modules/FindPython/Support.cmake | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19Index: ceph-18.2.0/cmake/modules/FindPython/Support.cmake
20===================================================================
21--- ceph-18.2.0.orig/cmake/modules/FindPython/Support.cmake
22+++ ceph-18.2.0/cmake/modules/FindPython/Support.cmake
23@@ -17,7 +17,7 @@
24 message (FATAL_ERROR "FindPython: INTERNAL ERROR")
25 endif()
26 if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
27- set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
28+ set(_${_PYTHON_PREFIX}_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
29 elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
30 set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
31 else()
diff --git a/recipes-extended/ceph/ceph/0001-delete-install-layout-deb.patch b/recipes-extended/ceph/ceph/0001-delete-install-layout-deb.patch
new file mode 100644
index 00000000..91eacfa9
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-delete-install-layout-deb.patch
@@ -0,0 +1,37 @@
1From 903bb882a44eb5567f8b1fc7f7c4857c2f03579d Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Wed, 13 Mar 2024 03:41:47 -0700
4Subject: [PATCH] delete install-layout=deb
5
6Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
7---
8 cmake/modules/Distutils.cmake | 6 ------
9 1 file changed, 6 deletions(-)
10
11diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake
12index daaae4ba6..e606e3890 100644
13--- a/cmake/modules/Distutils.cmake
14+++ b/cmake/modules/Distutils.cmake
15@@ -30,9 +30,6 @@ function(distutils_install_module name)
16 install(CODE "
17 set(options --prefix=${CMAKE_INSTALL_PREFIX})
18 if(DEFINED ENV{DESTDIR})
19- if(EXISTS /etc/debian_version)
20- list(APPEND options --install-layout=deb)
21- endif()
22 list(APPEND options
23 --root=\$ENV{DESTDIR}
24 --single-version-externally-managed)
25@@ -136,9 +133,6 @@ function(distutils_install_cython_module name)
26
27 set(options --prefix=${CMAKE_INSTALL_PREFIX})
28 if(DEFINED ENV{DESTDIR})
29- if(EXISTS /etc/debian_version)
30- list(APPEND options --install-layout=deb)
31- endif()
32 list(APPEND options --root=\$ENV{DESTDIR})
33 else()
34 list(APPEND options --root=/)
35--
362.42.0
37