diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-11-09 05:11:44 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-03-15 17:17:20 +0000 |
commit | 3e1ee1fda758885c17be7d4d45f514d370b1b92b (patch) | |
tree | 0015fead4aaaa91abfe02dc6c9605f1e4fb19eb7 | |
parent | 628d9430a8316bde742e5defbc6be3733e183624 (diff) | |
download | meta-virtualization-3e1ee1fda758885c17be7d4d45f514d370b1b92b.tar.gz |
ceph: initial update to 18.2.0
The ability to detected our python is fixed, but we are now
failing in the compilation phase on some of the applications.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
16 files changed, 146 insertions, 1025 deletions
diff --git a/recipes-extended/ceph/ceph/0001-SnappyCompressor.h-fix-snappy-compiler-error.patch b/recipes-extended/ceph/ceph/0001-SnappyCompressor.h-fix-snappy-compiler-error.patch deleted file mode 100644 index 2ebd32d1..00000000 --- a/recipes-extended/ceph/ceph/0001-SnappyCompressor.h-fix-snappy-compiler-error.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 85bde55627cfbb35d8b4735dec32bf33fa30079f Mon Sep 17 00:00:00 2001 | ||
2 | From: Saul Wold <saul.wold@windriver.com> | ||
3 | Date: Fri, 28 May 2021 10:16:07 -0700 | ||
4 | Subject: [PATCH] SnappyCompressor.h: fix snappy compiler error | ||
5 | |||
6 | snappy quietly changed public type | ||
7 | |||
8 | Known issue in ceph: https://tracker.ceph.com/issues/50934 | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Saul Wold <saul.wold@windriver.com> | ||
13 | |||
14 | --- | ||
15 | src/compressor/snappy/SnappyCompressor.h | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/src/compressor/snappy/SnappyCompressor.h b/src/compressor/snappy/SnappyCompressor.h | ||
19 | index 0cfb819c..2fbe35b7 100644 | ||
20 | --- a/src/compressor/snappy/SnappyCompressor.h | ||
21 | +++ b/src/compressor/snappy/SnappyCompressor.h | ||
22 | @@ -96,7 +96,7 @@ class SnappyCompressor : public Compressor { | ||
23 | if (qat_enabled) | ||
24 | return qat_accel.decompress(p, compressed_len, dst); | ||
25 | #endif | ||
26 | - snappy::uint32 res_len = 0; | ||
27 | + uint32_t res_len = 0; | ||
28 | BufferlistSource source_1(p, compressed_len); | ||
29 | if (!snappy::GetUncompressedLength(&source_1, &res_len)) { | ||
30 | return -1; | ||
diff --git a/recipes-extended/ceph/ceph/0001-buffer.h-add-missing-header-file-due-to-gcc-upgrade.patch b/recipes-extended/ceph/ceph/0001-buffer.h-add-missing-header-file-due-to-gcc-upgrade.patch deleted file mode 100644 index 70d3eb94..00000000 --- a/recipes-extended/ceph/ceph/0001-buffer.h-add-missing-header-file-due-to-gcc-upgrade.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 496465d9238109a93612e28682273e5bf576823b Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Sun, 22 May 2022 19:40:59 -0700 | ||
4 | Subject: [PATCH 1/2] buffer.h: add missing header file due to gcc upgrade | ||
5 | |||
6 | The header file <memory> have been changed to be no longer included by other | ||
7 | heades, thus requiring explicit include. See https://gcc.gnu.org/gcc-12/porting_to.html | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
12 | --- | ||
13 | src/include/buffer.h | 1 + | ||
14 | 1 file changed, 1 insertion(+) | ||
15 | |||
16 | diff --git a/src/include/buffer.h b/src/include/buffer.h | ||
17 | index 5c8b427d..88845ee6 100644 | ||
18 | --- a/src/include/buffer.h | ||
19 | +++ b/src/include/buffer.h | ||
20 | @@ -43,6 +43,7 @@ | ||
21 | #include <list> | ||
22 | #include <vector> | ||
23 | #include <string> | ||
24 | +#include <memory> | ||
25 | #if __cplusplus >= 201703L | ||
26 | #include <string_view> | ||
27 | #endif // __cplusplus >= 201703L | ||
28 | -- | ||
29 | 2.36.0 | ||
30 | |||
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 index 4d54549f..9686becb 100644 --- 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 | |||
@@ -24,11 +24,11 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | |||
24 | src/pybind/rgw/setup.py | 8 -------- | 24 | src/pybind/rgw/setup.py | 8 -------- |
25 | 7 files changed, 8 insertions(+), 55 deletions(-) | 25 | 7 files changed, 8 insertions(+), 55 deletions(-) |
26 | 26 | ||
27 | diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake | 27 | Index: ceph-18.2.0/cmake/modules/Distutils.cmake |
28 | index 5fe929499d..802eb37e32 100644 | 28 | =================================================================== |
29 | --- a/cmake/modules/Distutils.cmake | 29 | --- ceph-18.2.0.orig/cmake/modules/Distutils.cmake |
30 | +++ b/cmake/modules/Distutils.cmake | 30 | +++ ceph-18.2.0/cmake/modules/Distutils.cmake |
31 | @@ -18,17 +18,8 @@ function(distutils_install_module name) | 31 | @@ -29,17 +29,10 @@ |
32 | cmake_parse_arguments(DU "" "INSTALL_SCRIPT" "" ${ARGN}) | 32 | cmake_parse_arguments(DU "" "INSTALL_SCRIPT" "" ${ARGN}) |
33 | install(CODE " | 33 | install(CODE " |
34 | set(options --prefix=${CMAKE_INSTALL_PREFIX}) | 34 | set(options --prefix=${CMAKE_INSTALL_PREFIX}) |
@@ -39,25 +39,25 @@ index 5fe929499d..802eb37e32 100644 | |||
39 | - list(APPEND options | 39 | - list(APPEND options |
40 | - --root=\$ENV{DESTDIR} | 40 | - --root=\$ENV{DESTDIR} |
41 | - --single-version-externally-managed) | 41 | - --single-version-externally-managed) |
42 | - if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\") | 42 | - endif() |
43 | - list(APPEND options --install-script=${DU_INSTALL_SCRIPT}) | 43 | if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\") |
44 | - endif() | 44 | list(APPEND options --install-script=${DU_INSTALL_SCRIPT}) |
45 | - endif() | 45 | - endif() |
46 | + list(APPEND options --root=${CMAKE_DESTDIR}) | 46 | + list(APPEND options --root=${CMAKE_DESTDIR}) |
47 | + list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR}) | 47 | + list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR}) |
48 | execute_process( | 48 | execute_process( |
49 | COMMAND ${Python3_EXECUTABLE} | 49 | COMMAND ${Python3_EXECUTABLE} |
50 | setup.py install \${options} | 50 | setup.py install \${options} |
51 | @@ -50,7 +41,7 @@ function(distutils_add_cython_module target name src) | 51 | @@ -65,7 +58,7 @@ |
52 | # Note: no quotes, otherwise distutils will execute "/usr/bin/ccache gcc" | 52 | if(DU_DISABLE_VTA AND HAS_VTA) |
53 | # CMake's implicit conversion between strings and lists is wonderful, isn't it? | 53 | list(APPEND PY_CFLAGS -fno-var-tracking-assignments) |
54 | string(REPLACE " " ";" cflags ${CMAKE_C_FLAGS}) | 54 | endif() |
55 | - list(APPEND cflags -iquote${CMAKE_SOURCE_DIR}/src/include -w) | 55 | - list(APPEND PY_CPPFLAGS -iquote${CMAKE_SOURCE_DIR}/src/include -w) |
56 | + list(APPEND cflags -iquote${CMAKE_SOURCE_DIR}/src/include -w --sysroot=${CMAKE_SYSROOT}) | 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() | 57 | # This little bit of magic wipes out __Pyx_check_single_interpreter() |
58 | # Note: this is reproduced in distutils_install_cython_module | 58 | # Note: this is reproduced in distutils_install_cython_module |
59 | list(APPEND cflags -D'void0=dead_function\(void\)') | 59 | list(APPEND PY_CPPFLAGS -D'void0=dead_function\(void\)') |
60 | @@ -108,14 +99,8 @@ function(distutils_install_cython_module name) | 60 | @@ -135,14 +128,8 @@ |
61 | set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\") | 61 | set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\") |
62 | 62 | ||
63 | set(options --prefix=${CMAKE_INSTALL_PREFIX}) | 63 | set(options --prefix=${CMAKE_INSTALL_PREFIX}) |
@@ -74,10 +74,10 @@ index 5fe929499d..802eb37e32 100644 | |||
74 | execute_process( | 74 | execute_process( |
75 | COMMAND | 75 | COMMAND |
76 | ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py | 76 | ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py |
77 | diff --git a/cmake/modules/FindRocksDB.cmake b/cmake/modules/FindRocksDB.cmake | 77 | Index: ceph-18.2.0/cmake/modules/FindRocksDB.cmake |
78 | index c5dd3dfaf6..be38597af2 100644 | 78 | =================================================================== |
79 | --- a/cmake/modules/FindRocksDB.cmake | 79 | --- ceph-18.2.0.orig/cmake/modules/FindRocksDB.cmake |
80 | +++ b/cmake/modules/FindRocksDB.cmake | 80 | +++ ceph-18.2.0/cmake/modules/FindRocksDB.cmake |
81 | @@ -9,9 +9,9 @@ | 81 | @@ -9,9 +9,9 @@ |
82 | # ROCKSDB_VERSION_MINOR | 82 | # ROCKSDB_VERSION_MINOR |
83 | # ROCKSDB_VERSION_PATCH | 83 | # ROCKSDB_VERSION_PATCH |
@@ -90,95 +90,100 @@ index c5dd3dfaf6..be38597af2 100644 | |||
90 | 90 | ||
91 | if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h") | 91 | if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h") |
92 | foreach(ver "MAJOR" "MINOR" "PATCH") | 92 | foreach(ver "MAJOR" "MINOR" "PATCH") |
93 | diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt | 93 | Index: ceph-18.2.0/src/pybind/cephfs/setup.py |
94 | index a5ebdaf538..a234068150 100644 | 94 | =================================================================== |
95 | --- a/src/compressor/zstd/CMakeLists.txt | 95 | --- ceph-18.2.0.orig/src/pybind/cephfs/setup.py |
96 | +++ b/src/compressor/zstd/CMakeLists.txt | 96 | +++ ceph-18.2.0/src/pybind/cephfs/setup.py |
97 | @@ -9,7 +9,7 @@ ExternalProject_Add(zstd_ext | 97 | @@ -135,20 +135,6 @@ |
98 | CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} | ||
99 | -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} | ||
100 | -DCMAKE_C_FLAGS=${ZSTD_C_FLAGS} | ||
101 | - -DCMAKE_AR=${CMAKE_AR} | ||
102 | + -DCMAKE_SYSROOT=${CMAKE_SYSROOT} | ||
103 | -DCMAKE_POSITION_INDEPENDENT_CODE=${ENABLE_SHARED} | ||
104 | -G${CMAKE_GENERATOR} | ||
105 | BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/libzstd | ||
106 | diff --git a/src/pybind/cephfs/setup.py b/src/pybind/cephfs/setup.py | ||
107 | index 19ae6c329a..c9a25ccfff 100755 | ||
108 | --- a/src/pybind/cephfs/setup.py | ||
109 | +++ b/src/pybind/cephfs/setup.py | ||
110 | @@ -135,14 +135,6 @@ def check_sanity(): | ||
111 | finally: | 98 | finally: |
112 | shutil.rmtree(tmp_dir) | 99 | shutil.rmtree(tmp_dir) |
113 | 100 | ||
114 | - | 101 | - |
115 | -if 'BUILD_DOC' in os.environ.keys(): | 102 | -if 'BUILD_DOC' in os.environ or 'READTHEDOCS' in os.environ: |
116 | - pass | 103 | - ext_args = {} |
104 | - cython_constants = dict(BUILD_DOC=True) | ||
105 | - cythonize_args = dict(compile_time_env=cython_constants) | ||
117 | -elif check_sanity(): | 106 | -elif check_sanity(): |
118 | - pass | 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) | ||
119 | -else: | 112 | -else: |
120 | - sys.exit(1) | 113 | - sys.exit(1) |
121 | - | 114 | - |
122 | cmdclass = {} | 115 | cmdclass = {} |
123 | try: | 116 | try: |
124 | from Cython.Build import cythonize | 117 | from Cython.Build import cythonize |
125 | diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py | 118 | Index: ceph-18.2.0/src/pybind/rados/setup.py |
126 | index e2c5696404..4e99d26721 100755 | 119 | =================================================================== |
127 | --- a/src/pybind/rados/setup.py | 120 | --- ceph-18.2.0.orig/src/pybind/rados/setup.py |
128 | +++ b/src/pybind/rados/setup.py | 121 | +++ ceph-18.2.0/src/pybind/rados/setup.py |
129 | @@ -134,14 +134,6 @@ def check_sanity(): | 122 | @@ -130,17 +130,6 @@ |
130 | finally: | 123 | finally: |
131 | shutil.rmtree(tmp_dir) | 124 | shutil.rmtree(tmp_dir) |
132 | 125 | ||
133 | - | 126 | - |
134 | -if 'BUILD_DOC' in os.environ.keys(): | 127 | -if 'BUILD_DOC' in os.environ or 'READTHEDOCS' in os.environ: |
135 | - pass | 128 | - ext_args = {} |
129 | - cython_constants = dict(BUILD_DOC=True) | ||
136 | -elif check_sanity(): | 130 | -elif check_sanity(): |
137 | - pass | 131 | - ext_args = get_python_flags(['rados']) |
132 | - cython_constants = dict(BUILD_DOC=False) | ||
138 | -else: | 133 | -else: |
139 | - sys.exit(1) | 134 | - sys.exit(1) |
140 | - | 135 | - |
141 | cmdclass = {} | 136 | -cmdclass = {} |
142 | try: | 137 | try: |
143 | from Cython.Build import cythonize | 138 | from Cython.Build import cythonize |
144 | diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py | 139 | from Cython.Distutils import build_ext |
145 | index 634484f140..f5bbbdab4f 100755 | 140 | Index: ceph-18.2.0/src/pybind/rbd/setup.py |
146 | --- a/src/pybind/rbd/setup.py | 141 | =================================================================== |
147 | +++ b/src/pybind/rbd/setup.py | 142 | --- ceph-18.2.0.orig/src/pybind/rbd/setup.py |
148 | @@ -133,14 +133,6 @@ def check_sanity(): | 143 | +++ ceph-18.2.0/src/pybind/rbd/setup.py |
144 | @@ -133,20 +133,6 @@ | ||
149 | finally: | 145 | finally: |
150 | shutil.rmtree(tmp_dir) | 146 | shutil.rmtree(tmp_dir) |
151 | 147 | ||
152 | - | 148 | - |
153 | -if 'BUILD_DOC' in os.environ.keys(): | 149 | -if 'BUILD_DOC' in os.environ or 'READTHEDOCS' in os.environ: |
154 | - pass | 150 | - ext_args = {} |
151 | - cython_constants = dict(BUILD_DOC=True) | ||
152 | - cythonize_args = dict(compile_time_env=cython_constants) | ||
155 | -elif check_sanity(): | 153 | -elif check_sanity(): |
156 | - pass | 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) | ||
157 | -else: | 159 | -else: |
158 | - sys.exit(1) | 160 | - sys.exit(1) |
159 | - | 161 | - |
160 | cmdclass = {} | 162 | cmdclass = {} |
161 | try: | 163 | try: |
162 | from Cython.Build import cythonize | 164 | from Cython.Build import cythonize |
163 | diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py | 165 | Index: ceph-18.2.0/src/pybind/rgw/setup.py |
164 | index eb1591a460..b9f2428cf9 100755 | 166 | =================================================================== |
165 | --- a/src/pybind/rgw/setup.py | 167 | --- ceph-18.2.0.orig/src/pybind/rgw/setup.py |
166 | +++ b/src/pybind/rgw/setup.py | 168 | +++ ceph-18.2.0/src/pybind/rgw/setup.py |
167 | @@ -134,14 +134,6 @@ def check_sanity(): | 169 | @@ -134,20 +134,6 @@ |
168 | finally: | 170 | finally: |
169 | shutil.rmtree(tmp_dir) | 171 | shutil.rmtree(tmp_dir) |
170 | 172 | ||
171 | - | 173 | - |
172 | -if 'BUILD_DOC' in os.environ.keys(): | 174 | -if 'BUILD_DOC' in os.environ or 'READTHEDOCS' in os.environ: |
173 | - pass | 175 | - ext_args = {} |
176 | - cython_constants = dict(BUILD_DOC=True) | ||
177 | - cythonize_args = dict(compile_time_env=cython_constants) | ||
174 | -elif check_sanity(): | 178 | -elif check_sanity(): |
175 | - pass | 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) | ||
176 | -else: | 184 | -else: |
177 | - sys.exit(1) | 185 | - sys.exit(1) |
178 | - | 186 | - |
179 | cmdclass = {} | 187 | cmdclass = {} |
180 | try: | 188 | try: |
181 | from Cython.Build import cythonize | 189 | from Cython.Build import cythonize |
182 | -- | ||
183 | 2.20.1 | ||
184 | |||
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 index c0b718a2..c72c91b2 100644 --- 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 | |||
@@ -16,19 +16,16 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com> | |||
16 | cmake/modules/FindPython/Support.cmake | 2 +- | 16 | cmake/modules/FindPython/Support.cmake | 2 +- |
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | 17 | 1 file changed, 1 insertion(+), 1 deletion(-) |
18 | 18 | ||
19 | diff --git a/cmake/modules/FindPython/Support.cmake b/cmake/modules/FindPython/Support.cmake | 19 | Index: ceph-18.2.0/cmake/modules/FindPython/Support.cmake |
20 | index 6584699b79..c05bbe3306 100644 | 20 | =================================================================== |
21 | --- a/cmake/modules/FindPython/Support.cmake | 21 | --- ceph-18.2.0.orig/cmake/modules/FindPython/Support.cmake |
22 | +++ b/cmake/modules/FindPython/Support.cmake | 22 | +++ ceph-18.2.0/cmake/modules/FindPython/Support.cmake |
23 | @@ -17,7 +17,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) | 23 | @@ -17,7 +17,7 @@ |
24 | message (FATAL_ERROR "FindPython: INTERNAL ERROR") | 24 | message (FATAL_ERROR "FindPython: INTERNAL ERROR") |
25 | endif() | 25 | endif() |
26 | if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3) | 26 | if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3) |
27 | - set(_${_PYTHON_PREFIX}_VERSIONS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) | 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) | 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) | 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) | 30 | set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) |
31 | else() | 31 | else() |
32 | -- | ||
33 | 2.18.2 | ||
34 | |||
diff --git a/recipes-extended/ceph/ceph/0001-common-fix-build-with-GCC-13-missing-cstdint-include.patch b/recipes-extended/ceph/ceph/0001-common-fix-build-with-GCC-13-missing-cstdint-include.patch deleted file mode 100644 index b6ba82b6..00000000 --- a/recipes-extended/ceph/ceph/0001-common-fix-build-with-GCC-13-missing-cstdint-include.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | From 59e6b44f7ed4020a860e347322acfdacc6e4560b Mon Sep 17 00:00:00 2001 | ||
2 | From: Sam James <sam@gentoo.org> | ||
3 | Date: Fri, 28 Oct 2022 16:47:38 +0100 | ||
4 | Subject: [PATCH] common: fix build with GCC 13 (missing <cstdint> include) | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Needed for uint8_t. Only worked by chance before (see | ||
10 | https://www.gnu.org/software/gcc/gcc-13/porting_to.html). | ||
11 | |||
12 | ``` | ||
13 | FAILED: src/CMakeFiles/common-objs.dir/mds/FSMapUser.cc.o | ||
14 | /usr/bin/x86_64-pc-linux-gnu-g++ -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -D__CEPH__ -D__STDC_FORMAT_MACROS -D__linux__ -I/var/tmp/portage/sys-cluster/ceph-17.2.5/work/ceph-17.2.5_build/src/include -I/var/tmp/portage/sys-cluster/ceph-17.2.5/work/ceph-17.2.5/src -isystem /var/tmp/portage/sys-cluster/ceph-17.2.5/work/ceph-17.2.5_build/include -isystem /var/tmp/portage/sys-cluster/ceph-17.2.5/work/ceph-17.2.5/src/xxHash -isystem /var/tmp/portage/sys-cluster/ceph-17.2.5/work/ceph-17.2.5/src/rapidjson/include -O2 -march=native -pipe -fPIC -U_FORTIFY_SOURCE -Wall -fno-strict-aliasing -fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith -Werror=format-security -Winit-self -Wno-unknown-pragmas -Wnon-virtual-dtor -Wno-ignored-qualifiers -ftemplate-depth-1024 -Wpessimizing-move -Wredundant-move -Wstrict-null-sentinel -Woverloaded-virtual -fno-new-ttp-matching -fstack-protector-strong -fdiagnostics-color=auto -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -std=c++17 -MD -MT src/CMakeFiles/common-objs.dir/mds/FSMapUser.cc.o -MF src/CMakeFiles/common-objs.dir/mds/FSMapUser.cc.o.d -o src/CMakeFiles/common-objs.dir/mds/FSMapUser.cc.o -c /var/tmp/portage/sys-cluster/ceph-17.2.5/work/ceph-17.2.5/src/mds/FSMapUser.cc | ||
15 | In file included from /var/tmp/portage/sys-cluster/ceph-17.2.5/work/ceph-17.2.5/src/log/SubsystemMap.h:12, | ||
16 | from /var/tmp/portage/sys-cluster/ceph-17.2.5/work/ceph-17.2.5/src/common/config.h:23, | ||
17 | from /var/tmp/portage/sys-cluster/ceph-17.2.5/work/ceph-17.2.5/src/mds/mdstypes.h:13, | ||
18 | from /var/tmp/portage/sys-cluster/ceph-17.2.5/work/ceph-17.2.5/src/mds/FSMapUser.h:21, | ||
19 | from /var/tmp/portage/sys-cluster/ceph-17.2.5/work/ceph-17.2.5/src/mds/FSMapUser.cc:1: | ||
20 | /var/tmp/portage/sys-cluster/ceph-17.2.5/work/ceph-17.2.5/src/common/subsys_types.h:56:23: error: ‘uint8_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’? | ||
21 | ``` | ||
22 | |||
23 | Bug: https://bugs.gentoo.org/878531 | ||
24 | Signed-off-by: Sam James <sam@gentoo.org> | ||
25 | Upstream-Status: Backport [https://github.com/ceph/ceph/commit/74794f9d6f5c6671438085bdba730b504901a7c0] | ||
26 | --- | ||
27 | src/common/subsys_types.h | 1 + | ||
28 | 1 file changed, 1 insertion(+) | ||
29 | |||
30 | diff --git a/src/common/subsys_types.h b/src/common/subsys_types.h | ||
31 | index 52171809..bd7cc439 100644 | ||
32 | --- a/src/common/subsys_types.h | ||
33 | +++ b/src/common/subsys_types.h | ||
34 | @@ -17,6 +17,7 @@ | ||
35 | |||
36 | #include <algorithm> | ||
37 | #include <array> | ||
38 | +#include <cstdint> | ||
39 | |||
40 | enum ceph_subsys_id_t { | ||
41 | ceph_subsys_, // default | ||
diff --git a/recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch b/recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch index 310bfa47..24fd0409 100644 --- a/recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch +++ b/recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch | |||
@@ -15,12 +15,12 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||
15 | src/pybind/rgw/setup.py | 6 +++++- | 15 | src/pybind/rgw/setup.py | 6 +++++- |
16 | 4 files changed, 20 insertions(+), 4 deletions(-) | 16 | 4 files changed, 20 insertions(+), 4 deletions(-) |
17 | 17 | ||
18 | diff --git a/src/pybind/cephfs/setup.py b/src/pybind/cephfs/setup.py | 18 | Index: ceph-18.2.0/src/pybind/cephfs/setup.py |
19 | index c9a25ccf..972f936c 100755 | 19 | =================================================================== |
20 | --- a/src/pybind/cephfs/setup.py | 20 | --- ceph-18.2.0.orig/src/pybind/cephfs/setup.py |
21 | +++ b/src/pybind/cephfs/setup.py | 21 | +++ ceph-18.2.0/src/pybind/cephfs/setup.py |
22 | @@ -63,9 +63,13 @@ def get_python_flags(libs): | 22 | @@ -63,9 +63,13 @@ |
23 | distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), []) | 23 | filter(lambda lib: lib.startswith('-l'), py_libs)] |
24 | compiler = new_compiler() | 24 | compiler = new_compiler() |
25 | distutils.sysconfig.customize_compiler(compiler) | 25 | distutils.sysconfig.customize_compiler(compiler) |
26 | + libpl = distutils.sysconfig.get_config_var('LIBPL') | 26 | + libpl = distutils.sysconfig.get_config_var('LIBPL') |
@@ -31,15 +31,15 @@ index c9a25ccf..972f936c 100755 | |||
31 | include_dirs=[distutils.sysconfig.get_python_inc()], | 31 | include_dirs=[distutils.sysconfig.get_python_inc()], |
32 | - library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), | 32 | - library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), |
33 | + library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], | 33 | + library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], |
34 | libraries=libs + [lib.replace('-l', '') for lib in py_libs], | 34 | libraries=libs + py_libs, |
35 | extra_compile_args=filter_unsupported_flags( | 35 | extra_compile_args=filter_unsupported_flags( |
36 | compiler.compiler[0], | 36 | compiler.compiler[0], |
37 | diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py | 37 | Index: ceph-18.2.0/src/pybind/rados/setup.py |
38 | index 4e99d267..de24f766 100755 | 38 | =================================================================== |
39 | --- a/src/pybind/rados/setup.py | 39 | --- ceph-18.2.0.orig/src/pybind/rados/setup.py |
40 | +++ b/src/pybind/rados/setup.py | 40 | +++ ceph-18.2.0/src/pybind/rados/setup.py |
41 | @@ -66,9 +66,13 @@ def get_python_flags(libs): | 41 | @@ -62,9 +62,13 @@ |
42 | distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), []) | 42 | filter(lambda lib: lib.startswith('-l'), py_libs)] |
43 | compiler = new_compiler() | 43 | compiler = new_compiler() |
44 | distutils.sysconfig.customize_compiler(compiler) | 44 | distutils.sysconfig.customize_compiler(compiler) |
45 | + libpl = distutils.sysconfig.get_config_var('LIBPL') | 45 | + libpl = distutils.sysconfig.get_config_var('LIBPL') |
@@ -50,15 +50,15 @@ index 4e99d267..de24f766 100755 | |||
50 | include_dirs=[distutils.sysconfig.get_python_inc()], | 50 | include_dirs=[distutils.sysconfig.get_python_inc()], |
51 | - library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), | 51 | - library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), |
52 | + library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], | 52 | + library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], |
53 | libraries=libs + [lib.replace('-l', '') for lib in py_libs], | 53 | libraries=libs + py_libs, |
54 | extra_compile_args=filter_unsupported_flags( | 54 | extra_compile_args=filter_unsupported_flags( |
55 | compiler.compiler[0], | 55 | compiler.compiler[0], |
56 | diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py | 56 | Index: ceph-18.2.0/src/pybind/rbd/setup.py |
57 | index f5bbbdab..a1f70e1d 100755 | 57 | =================================================================== |
58 | --- a/src/pybind/rbd/setup.py | 58 | --- ceph-18.2.0.orig/src/pybind/rbd/setup.py |
59 | +++ b/src/pybind/rbd/setup.py | 59 | +++ ceph-18.2.0/src/pybind/rbd/setup.py |
60 | @@ -63,9 +63,13 @@ def get_python_flags(libs): | 60 | @@ -63,9 +63,13 @@ |
61 | distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), []) | 61 | filter(lambda lib: lib.startswith('-l'), py_libs)] |
62 | compiler = new_compiler() | 62 | compiler = new_compiler() |
63 | distutils.sysconfig.customize_compiler(compiler) | 63 | distutils.sysconfig.customize_compiler(compiler) |
64 | + libpl = distutils.sysconfig.get_config_var('LIBPL') | 64 | + libpl = distutils.sysconfig.get_config_var('LIBPL') |
@@ -69,15 +69,15 @@ index f5bbbdab..a1f70e1d 100755 | |||
69 | include_dirs=[distutils.sysconfig.get_python_inc()], | 69 | include_dirs=[distutils.sysconfig.get_python_inc()], |
70 | - library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), | 70 | - library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), |
71 | + library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], | 71 | + library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], |
72 | libraries=libs + [lib.replace('-l', '') for lib in py_libs], | 72 | libraries=libs + py_libs, |
73 | extra_compile_args=filter_unsupported_flags( | 73 | extra_compile_args=filter_unsupported_flags( |
74 | compiler.compiler[0], | 74 | compiler.compiler[0], |
75 | diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py | 75 | Index: ceph-18.2.0/src/pybind/rgw/setup.py |
76 | index b9f2428c..f5119f73 100755 | 76 | =================================================================== |
77 | --- a/src/pybind/rgw/setup.py | 77 | --- ceph-18.2.0.orig/src/pybind/rgw/setup.py |
78 | +++ b/src/pybind/rgw/setup.py | 78 | +++ ceph-18.2.0/src/pybind/rgw/setup.py |
79 | @@ -64,9 +64,13 @@ def get_python_flags(libs): | 79 | @@ -64,9 +64,13 @@ |
80 | distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), []) | 80 | filter(lambda lib: lib.startswith('-l'), py_libs)] |
81 | compiler = new_compiler() | 81 | compiler = new_compiler() |
82 | distutils.sysconfig.customize_compiler(compiler) | 82 | distutils.sysconfig.customize_compiler(compiler) |
83 | + libpl = distutils.sysconfig.get_config_var('LIBPL') | 83 | + libpl = distutils.sysconfig.get_config_var('LIBPL') |
@@ -88,9 +88,6 @@ index b9f2428c..f5119f73 100755 | |||
88 | include_dirs=[distutils.sysconfig.get_python_inc()], | 88 | include_dirs=[distutils.sysconfig.get_python_inc()], |
89 | - library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), | 89 | - library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), |
90 | + library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], | 90 | + library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], |
91 | libraries=libs + [lib.replace('-l', '') for lib in py_libs], | 91 | libraries=libs + py_libs, |
92 | extra_compile_args=filter_unsupported_flags( | 92 | extra_compile_args=filter_unsupported_flags( |
93 | compiler.compiler[0], | 93 | compiler.compiler[0], |
94 | -- | ||
95 | 2.21.0 | ||
96 | |||
diff --git a/recipes-extended/ceph/ceph/0001-kv-rocksdb_cache-drop-ROCKSDB_PRIszt.patch b/recipes-extended/ceph/ceph/0001-kv-rocksdb_cache-drop-ROCKSDB_PRIszt.patch deleted file mode 100644 index 795c60fc..00000000 --- a/recipes-extended/ceph/ceph/0001-kv-rocksdb_cache-drop-ROCKSDB_PRIszt.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | From b7b58010fd10b95c681df78cc4322e6586a39099 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kefu Chai <kchai@redhat.com> | ||
3 | Date: Tue, 17 Aug 2021 15:20:24 +0800 | ||
4 | Subject: [PATCH 1/6] kv/rocksdb_cache: drop ROCKSDB_PRIszt | ||
5 | |||
6 | ROCKSDB_PRIszt is a macro for "zu", which is in turn use for printing an | ||
7 | (unsigned) size_t variable. | ||
8 | |||
9 | there is no point having it in the header file or define a macro for it, | ||
10 | as %zu is standard compliant, and we don't get any advantage by using a | ||
11 | macro for it. | ||
12 | |||
13 | Signed-off-by: Kefu Chai <kchai@redhat.com> | ||
14 | |||
15 | Upstream-Status: Backport [44f5b827eb3c65665373a86908bf5d47e7d02687] | ||
16 | |||
17 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
18 | |||
19 | --- | ||
20 | src/kv/rocksdb_cache/ShardedCache.cc | 2 +- | ||
21 | src/kv/rocksdb_cache/ShardedCache.h | 1 - | ||
22 | 2 files changed, 1 insertion(+), 2 deletions(-) | ||
23 | |||
24 | diff --git a/src/kv/rocksdb_cache/ShardedCache.cc b/src/kv/rocksdb_cache/ShardedCache.cc | ||
25 | index 367140a9..8e08deb8 100644 | ||
26 | --- a/src/kv/rocksdb_cache/ShardedCache.cc | ||
27 | +++ b/src/kv/rocksdb_cache/ShardedCache.cc | ||
28 | @@ -131,7 +131,7 @@ std::string ShardedCache::GetPrintableOptions() const { | ||
29 | char buffer[kBufferSize]; | ||
30 | { | ||
31 | std::lock_guard<std::mutex> l(capacity_mutex_); | ||
32 | - snprintf(buffer, kBufferSize, " capacity : %" ROCKSDB_PRIszt "\n", | ||
33 | + snprintf(buffer, kBufferSize, " capacity : %zu\n", | ||
34 | capacity_); | ||
35 | ret.append(buffer); | ||
36 | snprintf(buffer, kBufferSize, " num_shard_bits : %d\n", num_shard_bits_); | ||
37 | diff --git a/src/kv/rocksdb_cache/ShardedCache.h b/src/kv/rocksdb_cache/ShardedCache.h | ||
38 | index 4d64893a..8ab2587b 100644 | ||
39 | --- a/src/kv/rocksdb_cache/ShardedCache.h | ||
40 | +++ b/src/kv/rocksdb_cache/ShardedCache.h | ||
41 | @@ -22,7 +22,6 @@ | ||
42 | #ifndef CACHE_LINE_SIZE | ||
43 | #define CACHE_LINE_SIZE 64 // XXX arch-specific define | ||
44 | #endif | ||
45 | -#define ROCKSDB_PRIszt "zu" | ||
46 | |||
47 | namespace rocksdb_cache { | ||
48 | |||
49 | -- | ||
50 | 2.33.0 | ||
51 | |||
diff --git a/recipes-extended/ceph/ceph/0002-common-fix-FTBFS-due-to-dout-need_dynamic-on-GCC-12.patch b/recipes-extended/ceph/ceph/0002-common-fix-FTBFS-due-to-dout-need_dynamic-on-GCC-12.patch deleted file mode 100644 index d119bf1b..00000000 --- a/recipes-extended/ceph/ceph/0002-common-fix-FTBFS-due-to-dout-need_dynamic-on-GCC-12.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 841806de212226921eeaeb3eea054bda8ccce616 Mon Sep 17 00:00:00 2001 | ||
2 | From: Radoslaw Zarzynski <rzarzyns@redhat.com> | ||
3 | Date: Wed, 19 Jan 2022 15:24:11 +0000 | ||
4 | Subject: [PATCH 2/2] common: fix FTBFS due to dout & need_dynamic on GCC-12 | ||
5 | |||
6 | For details see: | ||
7 | https://gist.github.com/rzarzynski/d6d2df6888923bef6a3e764f4856853f. | ||
8 | |||
9 | Special thanks to Kaleb Keithley who reported the issue | ||
10 | and tested the fix! | ||
11 | |||
12 | Fixes: https://tracker.ceph.com/issues/53896 | ||
13 | Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com> | ||
14 | |||
15 | Upstream-Status: Backport [963d756ded40f5adf2efef53893c917bec1845c1] | ||
16 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
17 | --- | ||
18 | src/common/dout.h | 5 +++-- | ||
19 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/src/common/dout.h b/src/common/dout.h | ||
22 | index c7c08182..42f49915 100644 | ||
23 | --- a/src/common/dout.h | ||
24 | +++ b/src/common/dout.h | ||
25 | @@ -99,11 +99,12 @@ namespace ceph::dout { | ||
26 | template<typename T> | ||
27 | struct dynamic_marker_t { | ||
28 | T value; | ||
29 | - operator T() const { return value; } | ||
30 | + // constexpr ctor isn't needed as it's an aggregate type | ||
31 | + constexpr operator T() const { return value; } | ||
32 | }; | ||
33 | |||
34 | template<typename T> | ||
35 | -dynamic_marker_t<T> need_dynamic(T&& t) { | ||
36 | +constexpr dynamic_marker_t<T> need_dynamic(T&& t) { | ||
37 | return dynamic_marker_t<T>{ std::forward<T>(t) }; | ||
38 | } | ||
39 | |||
40 | -- | ||
41 | 2.36.0 | ||
42 | |||
diff --git a/recipes-extended/ceph/ceph/0002-common-replace-BitVector-NoInitAllocator-with-wrappe.patch b/recipes-extended/ceph/ceph/0002-common-replace-BitVector-NoInitAllocator-with-wrappe.patch deleted file mode 100644 index 4f46d223..00000000 --- a/recipes-extended/ceph/ceph/0002-common-replace-BitVector-NoInitAllocator-with-wrappe.patch +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | From cca3144aca7f7c19772065421f9b02205a84e0b8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Casey Bodley <cbodley@redhat.com> | ||
3 | Date: Tue, 15 Feb 2022 18:27:10 -0500 | ||
4 | Subject: [PATCH] common: replace BitVector::NoInitAllocator with wrapper | ||
5 | struct | ||
6 | |||
7 | in c++20, the deprecated `struct std::allocator<T>::rebind` template was | ||
8 | removed, so `BitVector` no longer compiles. without a `rebind` to | ||
9 | inherit, `std::allocator_traits<NoInitAllocator>::rebind_alloc<U>` was | ||
10 | looking for `NoInitAllocator<U>`, but it isn't a template class | ||
11 | |||
12 | further investigation found that in c++17, `vector<__u32, NoInitAllocator>` | ||
13 | was rebinding this `NoInitAllocator` to `std::allocator<__u32>` and | ||
14 | preventing the no-init optimization from taking effect | ||
15 | |||
16 | instead of messing with the allocator to avoid zero-initialization, wrap | ||
17 | each __u32 in a struct whose constructor does not initialize the value | ||
18 | |||
19 | Fixes: https://tracker.ceph.com/issues/54279 | ||
20 | |||
21 | Signed-off-by: Casey Bodley <cbodley@redhat.com> | ||
22 | --- | ||
23 | Fixes: | ||
24 | http://errors.yoctoproject.org/Errors/Details/701862/ | ||
25 | |||
26 | Upstream-Status: Backport [https://github.com/ceph/ceph/commit/4f0ad8aab6b21a1fd57a7c1630d298e31b5d9bb6] | ||
27 | |||
28 | src/common/bit_vector.hpp | 27 +++++++++++---------------- | ||
29 | 1 file changed, 11 insertions(+), 16 deletions(-) | ||
30 | |||
31 | diff --git a/src/common/bit_vector.hpp b/src/common/bit_vector.hpp | ||
32 | index 10ee6c3e..9ce3e8b1 100644 | ||
33 | --- a/src/common/bit_vector.hpp | ||
34 | +++ b/src/common/bit_vector.hpp | ||
35 | @@ -223,23 +223,18 @@ public: | ||
36 | |||
37 | static void generate_test_instances(std::list<BitVector *> &o); | ||
38 | private: | ||
39 | - struct NoInitAllocator : public std::allocator<__u32> { | ||
40 | - NoInitAllocator() {} | ||
41 | - NoInitAllocator(const std::allocator<__u32>& alloc) | ||
42 | - : std::allocator<__u32>(alloc) { | ||
43 | - } | ||
44 | - | ||
45 | - template <class U, class... Args> | ||
46 | - void construct(U* p, Args&&... args) const { | ||
47 | - } | ||
48 | - }; | ||
49 | - | ||
50 | bufferlist m_data; | ||
51 | uint64_t m_size; | ||
52 | bool m_crc_enabled; | ||
53 | |||
54 | mutable __u32 m_header_crc; | ||
55 | - mutable std::vector<__u32, NoInitAllocator> m_data_crcs; | ||
56 | + | ||
57 | + // inhibit value-initialization when used in std::vector | ||
58 | + struct u32_struct { | ||
59 | + u32_struct() {} | ||
60 | + __u32 val; | ||
61 | + }; | ||
62 | + mutable std::vector<u32_struct> m_data_crcs; | ||
63 | |||
64 | void resize(uint64_t elements, bool zero); | ||
65 | |||
66 | @@ -351,7 +346,7 @@ void BitVector<_b>::encode_data(bufferlist& bl, uint64_t data_byte_offset, | ||
67 | |||
68 | bufferlist bit; | ||
69 | bit.substr_of(m_data, data_byte_offset, len); | ||
70 | - m_data_crcs[data_byte_offset / BLOCK_SIZE] = bit.crc32c(0); | ||
71 | + m_data_crcs[data_byte_offset / BLOCK_SIZE].val = bit.crc32c(0); | ||
72 | |||
73 | bl.claim_append(bit); | ||
74 | data_byte_offset += BLOCK_SIZE; | ||
75 | @@ -385,7 +380,7 @@ void BitVector<_b>::decode_data(bufferlist::const_iterator& it, | ||
76 | bufferlist bit; | ||
77 | bit.append(ptr); | ||
78 | if (m_crc_enabled && | ||
79 | - m_data_crcs[data_byte_offset / BLOCK_SIZE] != bit.crc32c(0)) { | ||
80 | + m_data_crcs[data_byte_offset / BLOCK_SIZE].val != bit.crc32c(0)) { | ||
81 | throw buffer::malformed_input("invalid data block CRC"); | ||
82 | } | ||
83 | data.append(bit); | ||
84 | @@ -499,7 +494,7 @@ void BitVector<_b>::encode_data_crcs(bufferlist& bl, uint64_t offset, | ||
85 | compute_index(offset + length - 1, &index, &shift); | ||
86 | uint64_t end_crc_index = index / BLOCK_SIZE; | ||
87 | while (crc_index <= end_crc_index) { | ||
88 | - __u32 crc = m_data_crcs[crc_index++]; | ||
89 | + __u32 crc = m_data_crcs[crc_index++].val; | ||
90 | ceph::encode(crc, bl); | ||
91 | } | ||
92 | } | ||
93 | @@ -520,7 +515,7 @@ void BitVector<_b>::decode_data_crcs(bufferlist::const_iterator& it, | ||
94 | while (remaining > 0) { | ||
95 | __u32 crc; | ||
96 | ceph::decode(crc, it); | ||
97 | - m_data_crcs[crc_index++] = crc; | ||
98 | + m_data_crcs[crc_index++].val = crc; | ||
99 | --remaining; | ||
100 | } | ||
101 | } | ||
diff --git a/recipes-extended/ceph/ceph/0002-kv-rocksdb_cache-reorder-ShardedCache-methods-declar.patch b/recipes-extended/ceph/ceph/0002-kv-rocksdb_cache-reorder-ShardedCache-methods-declar.patch deleted file mode 100644 index 3fc8c860..00000000 --- a/recipes-extended/ceph/ceph/0002-kv-rocksdb_cache-reorder-ShardedCache-methods-declar.patch +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | From 6cdb1387a713fad765b5193d5acf4504f206a66f Mon Sep 17 00:00:00 2001 | ||
2 | From: Kefu Chai <kchai@redhat.com> | ||
3 | Date: Tue, 17 Aug 2021 15:39:00 +0800 | ||
4 | Subject: [PATCH 2/6] kv/rocksdb_cache: reorder ShardedCache methods | ||
5 | declarations | ||
6 | |||
7 | in the exact order in which rocksdb::Cache declare its public virtual | ||
8 | methods. | ||
9 | |||
10 | Signed-off-by: Kefu Chai <kchai@redhat.com> | ||
11 | |||
12 | Upstream-Status: Backport [633656f8ade2c1d67a66f8b7ca3aa0a2ae82e6b1] | ||
13 | |||
14 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
15 | --- | ||
16 | src/kv/rocksdb_cache/ShardedCache.h | 21 ++++++++++----------- | ||
17 | 1 file changed, 10 insertions(+), 11 deletions(-) | ||
18 | |||
19 | diff --git a/src/kv/rocksdb_cache/ShardedCache.h b/src/kv/rocksdb_cache/ShardedCache.h | ||
20 | index 8ab2587b..a16cf561 100644 | ||
21 | --- a/src/kv/rocksdb_cache/ShardedCache.h | ||
22 | +++ b/src/kv/rocksdb_cache/ShardedCache.h | ||
23 | @@ -56,34 +56,33 @@ class ShardedCache : public rocksdb::Cache, public PriorityCache::PriCache { | ||
24 | public: | ||
25 | ShardedCache(size_t capacity, int num_shard_bits, bool strict_capacity_limit); | ||
26 | virtual ~ShardedCache() = default; | ||
27 | + // rocksdb::Cache | ||
28 | virtual const char* Name() const override = 0; | ||
29 | - virtual CacheShard* GetShard(int shard) = 0; | ||
30 | - virtual const CacheShard* GetShard(int shard) const = 0; | ||
31 | - virtual void* Value(Handle* handle) override = 0; | ||
32 | - virtual size_t GetCharge(Handle* handle) const = 0; | ||
33 | - virtual uint32_t GetHash(Handle* handle) const = 0; | ||
34 | - virtual void DisownData() override = 0; | ||
35 | - | ||
36 | - virtual void SetCapacity(size_t capacity) override; | ||
37 | - virtual void SetStrictCapacityLimit(bool strict_capacity_limit) override; | ||
38 | - | ||
39 | virtual rocksdb::Status Insert(const rocksdb::Slice& key, void* value, size_t charge, | ||
40 | void (*deleter)(const rocksdb::Slice& key, void* value), | ||
41 | rocksdb::Cache::Handle** handle, Priority priority) override; | ||
42 | virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, rocksdb::Statistics* stats) override; | ||
43 | virtual bool Ref(rocksdb::Cache::Handle* handle) override; | ||
44 | virtual bool Release(rocksdb::Cache::Handle* handle, bool force_erase = false) override; | ||
45 | + virtual void* Value(Handle* handle) override = 0; | ||
46 | virtual void Erase(const rocksdb::Slice& key) override; | ||
47 | virtual uint64_t NewId() override; | ||
48 | - virtual size_t GetCapacity() const override; | ||
49 | + virtual void SetCapacity(size_t capacity) override; | ||
50 | + virtual void SetStrictCapacityLimit(bool strict_capacity_limit) override; | ||
51 | virtual bool HasStrictCapacityLimit() const override; | ||
52 | + virtual size_t GetCapacity() const override; | ||
53 | virtual size_t GetUsage() const override; | ||
54 | virtual size_t GetUsage(rocksdb::Cache::Handle* handle) const override; | ||
55 | virtual size_t GetPinnedUsage() const override; | ||
56 | + virtual size_t GetCharge(Handle* handle) const = 0; | ||
57 | + virtual void DisownData() override = 0; | ||
58 | virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t), | ||
59 | bool thread_safe) override; | ||
60 | virtual void EraseUnRefEntries() override; | ||
61 | virtual std::string GetPrintableOptions() const override; | ||
62 | + virtual CacheShard* GetShard(int shard) = 0; | ||
63 | + virtual const CacheShard* GetShard(int shard) const = 0; | ||
64 | + virtual uint32_t GetHash(Handle* handle) const = 0; | ||
65 | |||
66 | int GetNumShardBits() const { return num_shard_bits_; } | ||
67 | |||
68 | -- | ||
69 | 2.33.0 | ||
70 | |||
diff --git a/recipes-extended/ceph/ceph/0003-kv-rocksdb_cache-define-DeleterFn-function-pointer-t.patch b/recipes-extended/ceph/ceph/0003-kv-rocksdb_cache-define-DeleterFn-function-pointer-t.patch deleted file mode 100644 index 01144b79..00000000 --- a/recipes-extended/ceph/ceph/0003-kv-rocksdb_cache-define-DeleterFn-function-pointer-t.patch +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | From 29f1e556c1e7c5ab195983552387e1410e0b5b6c Mon Sep 17 00:00:00 2001 | ||
2 | From: Kefu Chai <kchai@redhat.com> | ||
3 | Date: Tue, 17 Aug 2021 16:25:32 +0800 | ||
4 | Subject: [PATCH 3/6] kv/rocksdb_cache: define DeleterFn function pointer type | ||
5 | |||
6 | this paves the road to rocksdb v6.22.1 compatible implementation | ||
7 | |||
8 | Signed-off-by: Kefu Chai <kchai@redhat.com> | ||
9 | |||
10 | Upstream-Status: Backport [c7a6c74b62dfcc96f676eb6d8844852c4705b66f] | ||
11 | |||
12 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
13 | --- | ||
14 | src/kv/rocksdb_cache/BinnedLRUCache.cc | 2 +- | ||
15 | src/kv/rocksdb_cache/BinnedLRUCache.h | 4 ++-- | ||
16 | src/kv/rocksdb_cache/ShardedCache.cc | 2 +- | ||
17 | src/kv/rocksdb_cache/ShardedCache.h | 6 ++++-- | ||
18 | 4 files changed, 8 insertions(+), 6 deletions(-) | ||
19 | |||
20 | diff --git a/src/kv/rocksdb_cache/BinnedLRUCache.cc b/src/kv/rocksdb_cache/BinnedLRUCache.cc | ||
21 | index 2391a7f6..4e5f4dd4 100644 | ||
22 | --- a/src/kv/rocksdb_cache/BinnedLRUCache.cc | ||
23 | +++ b/src/kv/rocksdb_cache/BinnedLRUCache.cc | ||
24 | @@ -344,7 +344,7 @@ bool BinnedLRUCacheShard::Release(rocksdb::Cache::Handle* handle, bool force_era | ||
25 | |||
26 | rocksdb::Status BinnedLRUCacheShard::Insert(const rocksdb::Slice& key, uint32_t hash, void* value, | ||
27 | size_t charge, | ||
28 | - void (*deleter)(const rocksdb::Slice& key, void* value), | ||
29 | + DeleterFn deleter, | ||
30 | rocksdb::Cache::Handle** handle, rocksdb::Cache::Priority priority) { | ||
31 | auto e = new BinnedLRUHandle(); | ||
32 | rocksdb::Status s; | ||
33 | diff --git a/src/kv/rocksdb_cache/BinnedLRUCache.h b/src/kv/rocksdb_cache/BinnedLRUCache.h | ||
34 | index 96023ce2..b0fb7148 100644 | ||
35 | --- a/src/kv/rocksdb_cache/BinnedLRUCache.h | ||
36 | +++ b/src/kv/rocksdb_cache/BinnedLRUCache.h | ||
37 | @@ -56,7 +56,7 @@ std::shared_ptr<rocksdb::Cache> NewBinnedLRUCache( | ||
38 | |||
39 | struct BinnedLRUHandle { | ||
40 | void* value; | ||
41 | - void (*deleter)(const rocksdb::Slice&, void* value); | ||
42 | + DeleterFn deleter; | ||
43 | BinnedLRUHandle* next_hash; | ||
44 | BinnedLRUHandle* next; | ||
45 | BinnedLRUHandle* prev; | ||
46 | @@ -189,7 +189,7 @@ class alignas(CACHE_LINE_SIZE) BinnedLRUCacheShard : public CacheShard { | ||
47 | // Like Cache methods, but with an extra "hash" parameter. | ||
48 | virtual rocksdb::Status Insert(const rocksdb::Slice& key, uint32_t hash, void* value, | ||
49 | size_t charge, | ||
50 | - void (*deleter)(const rocksdb::Slice& key, void* value), | ||
51 | + DeleterFn deleter, | ||
52 | rocksdb::Cache::Handle** handle, | ||
53 | rocksdb::Cache::Priority priority) override; | ||
54 | virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, uint32_t hash) override; | ||
55 | diff --git a/src/kv/rocksdb_cache/ShardedCache.cc b/src/kv/rocksdb_cache/ShardedCache.cc | ||
56 | index 8e08deb8..ef3b3b98 100644 | ||
57 | --- a/src/kv/rocksdb_cache/ShardedCache.cc | ||
58 | +++ b/src/kv/rocksdb_cache/ShardedCache.cc | ||
59 | @@ -44,7 +44,7 @@ void ShardedCache::SetStrictCapacityLimit(bool strict_capacity_limit) { | ||
60 | } | ||
61 | |||
62 | rocksdb::Status ShardedCache::Insert(const rocksdb::Slice& key, void* value, size_t charge, | ||
63 | - void (*deleter)(const rocksdb::Slice& key, void* value), | ||
64 | + DeleterFn deleter, | ||
65 | rocksdb::Cache::Handle** handle, Priority priority) { | ||
66 | uint32_t hash = HashSlice(key); | ||
67 | return GetShard(Shard(hash)) | ||
68 | diff --git a/src/kv/rocksdb_cache/ShardedCache.h b/src/kv/rocksdb_cache/ShardedCache.h | ||
69 | index a16cf561..674e5322 100644 | ||
70 | --- a/src/kv/rocksdb_cache/ShardedCache.h | ||
71 | +++ b/src/kv/rocksdb_cache/ShardedCache.h | ||
72 | @@ -25,6 +25,8 @@ | ||
73 | |||
74 | namespace rocksdb_cache { | ||
75 | |||
76 | +using DeleterFn = void (*)(const rocksdb::Slice& key, void* value); | ||
77 | + | ||
78 | // Single cache shard interface. | ||
79 | class CacheShard { | ||
80 | public: | ||
81 | @@ -33,7 +35,7 @@ class CacheShard { | ||
82 | |||
83 | virtual rocksdb::Status Insert(const rocksdb::Slice& key, uint32_t hash, void* value, | ||
84 | size_t charge, | ||
85 | - void (*deleter)(const rocksdb::Slice& key, void* value), | ||
86 | + DeleterFn deleter, | ||
87 | rocksdb::Cache::Handle** handle, rocksdb::Cache::Priority priority) = 0; | ||
88 | virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, uint32_t hash) = 0; | ||
89 | virtual bool Ref(rocksdb::Cache::Handle* handle) = 0; | ||
90 | @@ -59,7 +61,7 @@ class ShardedCache : public rocksdb::Cache, public PriorityCache::PriCache { | ||
91 | // rocksdb::Cache | ||
92 | virtual const char* Name() const override = 0; | ||
93 | virtual rocksdb::Status Insert(const rocksdb::Slice& key, void* value, size_t charge, | ||
94 | - void (*deleter)(const rocksdb::Slice& key, void* value), | ||
95 | + DeleterFn, | ||
96 | rocksdb::Cache::Handle** handle, Priority priority) override; | ||
97 | virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, rocksdb::Statistics* stats) override; | ||
98 | virtual bool Ref(rocksdb::Cache::Handle* handle) override; | ||
99 | -- | ||
100 | 2.33.0 | ||
101 | |||
diff --git a/recipes-extended/ceph/ceph/0003-librdb-fix-build-with-gcc-13.patch b/recipes-extended/ceph/ceph/0003-librdb-fix-build-with-gcc-13.patch deleted file mode 100644 index c27d6f3e..00000000 --- a/recipes-extended/ceph/ceph/0003-librdb-fix-build-with-gcc-13.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 937231991bd7e2cd578cf8cb6c1bedf611c5faef Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Sat, 29 Apr 2023 13:47:43 +0200 | ||
4 | Subject: [PATCH] librdb: fix build with gcc-13 | ||
5 | |||
6 | * fixes: | ||
7 | ceph-15.2.15/src/librbd/api/PoolMetadata.h:28:19: error: 'uint64_t' has not bee | ||
8 | n declared | ||
9 | ceph/15.2.15-r0/ceph-15.2.15/src/librbd/api/PoolMetadata.cc:133:5: error: no declaration matche | ||
10 | s 'int librbd::api::PoolMetadata<ImageCtxT>::list(librados::v14_2_0::IoCtx&, const std::string&, uint64_t, std::map<std::__cxx11::basic_string<cha | ||
11 | r>, ceph::buffer::v15_2_0::list>*)' | ||
12 | |||
13 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
14 | Upstream-Status: Pending | ||
15 | --- | ||
16 | src/librbd/api/PoolMetadata.h | 1 + | ||
17 | 1 file changed, 1 insertion(+) | ||
18 | |||
19 | diff --git a/src/librbd/api/PoolMetadata.h b/src/librbd/api/PoolMetadata.h | ||
20 | index c0a81735..69ab574a 100644 | ||
21 | --- a/src/librbd/api/PoolMetadata.h | ||
22 | +++ b/src/librbd/api/PoolMetadata.h | ||
23 | @@ -7,6 +7,7 @@ | ||
24 | #include "include/buffer_fwd.h" | ||
25 | #include "include/rados/librados_fwd.hpp" | ||
26 | |||
27 | +#include <cstdint> | ||
28 | #include <map> | ||
29 | #include <string> | ||
30 | |||
diff --git a/recipes-extended/ceph/ceph/0004-kv-rocksdb_cache-implement-methods-required-by-rocks.patch b/recipes-extended/ceph/ceph/0004-kv-rocksdb_cache-implement-methods-required-by-rocks.patch deleted file mode 100644 index ee1e1416..00000000 --- a/recipes-extended/ceph/ceph/0004-kv-rocksdb_cache-implement-methods-required-by-rocks.patch +++ /dev/null | |||
@@ -1,207 +0,0 @@ | |||
1 | From 90696cb3652eb307c6aadde4af7d9198dc00c15f Mon Sep 17 00:00:00 2001 | ||
2 | From: Kefu Chai <kchai@redhat.com> | ||
3 | Date: Tue, 17 Aug 2021 16:27:47 +0800 | ||
4 | Subject: [PATCH 4/6] kv/rocksdb_cache: implement methods required by rocksdb | ||
5 | v6.22.1 | ||
6 | |||
7 | rocksdb v6.22.1 added couple pure methods, so let's implement them. | ||
8 | |||
9 | Signed-off-by: Kefu Chai <kchai@redhat.com> | ||
10 | |||
11 | Upstream-Status: Backport [2c445598ce5280e85feb1f0e94d1940a444ee421] | ||
12 | |||
13 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
14 | --- | ||
15 | src/kv/rocksdb_cache/BinnedLRUCache.cc | 26 +++++++++++++++++++++++--- | ||
16 | src/kv/rocksdb_cache/BinnedLRUCache.h | 14 +++++++++++--- | ||
17 | src/kv/rocksdb_cache/ShardedCache.cc | 25 ++++++++++++++++++++++++- | ||
18 | src/kv/rocksdb_cache/ShardedCache.h | 20 ++++++++++++++++++-- | ||
19 | 4 files changed, 76 insertions(+), 9 deletions(-) | ||
20 | |||
21 | diff --git a/src/kv/rocksdb_cache/BinnedLRUCache.cc b/src/kv/rocksdb_cache/BinnedLRUCache.cc | ||
22 | index 4e5f4dd4..1e6ba7af 100644 | ||
23 | --- a/src/kv/rocksdb_cache/BinnedLRUCache.cc | ||
24 | +++ b/src/kv/rocksdb_cache/BinnedLRUCache.cc | ||
25 | @@ -150,13 +150,20 @@ void BinnedLRUCacheShard::EraseUnRefEntries() { | ||
26 | } | ||
27 | } | ||
28 | |||
29 | -void BinnedLRUCacheShard::ApplyToAllCacheEntries(void (*callback)(void*, size_t), | ||
30 | - bool thread_safe) { | ||
31 | +void BinnedLRUCacheShard::ApplyToAllCacheEntries( | ||
32 | + const std::function<void(const rocksdb::Slice& key, | ||
33 | + void* value, | ||
34 | + size_t charge, | ||
35 | + DeleterFn)>& callback, | ||
36 | + bool thread_safe) | ||
37 | +{ | ||
38 | if (thread_safe) { | ||
39 | mutex_.lock(); | ||
40 | } | ||
41 | table_.ApplyToAllCacheEntries( | ||
42 | - [callback](BinnedLRUHandle* h) { callback(h->value, h->charge); }); | ||
43 | + [callback](BinnedLRUHandle* h) { | ||
44 | + callback(h->key(), h->value, h->charge, h->deleter); | ||
45 | + }); | ||
46 | if (thread_safe) { | ||
47 | mutex_.unlock(); | ||
48 | } | ||
49 | @@ -463,6 +470,12 @@ std::string BinnedLRUCacheShard::GetPrintableOptions() const { | ||
50 | return std::string(buffer); | ||
51 | } | ||
52 | |||
53 | +DeleterFn BinnedLRUCacheShard::GetDeleter(rocksdb::Cache::Handle* h) const | ||
54 | +{ | ||
55 | + auto* handle = reinterpret_cast<BinnedLRUHandle*>(h); | ||
56 | + return handle->deleter; | ||
57 | +} | ||
58 | + | ||
59 | BinnedLRUCache::BinnedLRUCache(CephContext *c, | ||
60 | size_t capacity, | ||
61 | int num_shard_bits, | ||
62 | @@ -518,6 +531,13 @@ void BinnedLRUCache::DisownData() { | ||
63 | #endif // !__SANITIZE_ADDRESS__ | ||
64 | } | ||
65 | |||
66 | +#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22) | ||
67 | +DeleterFn BinnedLRUCache::GetDeleter(Handle* handle) const | ||
68 | +{ | ||
69 | + return reinterpret_cast<const BinnedLRUHandle*>(handle)->deleter; | ||
70 | +} | ||
71 | +#endif | ||
72 | + | ||
73 | size_t BinnedLRUCache::TEST_GetLRUSize() { | ||
74 | size_t lru_size_of_all_shards = 0; | ||
75 | for (int i = 0; i < num_shards_; i++) { | ||
76 | diff --git a/src/kv/rocksdb_cache/BinnedLRUCache.h b/src/kv/rocksdb_cache/BinnedLRUCache.h | ||
77 | index b0fb7148..ba0c2720 100644 | ||
78 | --- a/src/kv/rocksdb_cache/BinnedLRUCache.h | ||
79 | +++ b/src/kv/rocksdb_cache/BinnedLRUCache.h | ||
80 | @@ -205,13 +205,19 @@ class alignas(CACHE_LINE_SIZE) BinnedLRUCacheShard : public CacheShard { | ||
81 | virtual size_t GetUsage() const override; | ||
82 | virtual size_t GetPinnedUsage() const override; | ||
83 | |||
84 | - virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t), | ||
85 | - bool thread_safe) override; | ||
86 | + virtual void ApplyToAllCacheEntries( | ||
87 | + const std::function<void(const rocksdb::Slice& key, | ||
88 | + void* value, | ||
89 | + size_t charge, | ||
90 | + DeleterFn)>& callback, | ||
91 | + bool thread_safe) override; | ||
92 | |||
93 | virtual void EraseUnRefEntries() override; | ||
94 | |||
95 | virtual std::string GetPrintableOptions() const override; | ||
96 | |||
97 | + virtual DeleterFn GetDeleter(rocksdb::Cache::Handle* handle) const override; | ||
98 | + | ||
99 | void TEST_GetLRUList(BinnedLRUHandle** lru, BinnedLRUHandle** lru_low_pri); | ||
100 | |||
101 | // Retrieves number of elements in LRU, for unit test purpose only | ||
102 | @@ -303,7 +309,9 @@ class BinnedLRUCache : public ShardedCache { | ||
103 | virtual size_t GetCharge(Handle* handle) const override; | ||
104 | virtual uint32_t GetHash(Handle* handle) const override; | ||
105 | virtual void DisownData() override; | ||
106 | - | ||
107 | +#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22) | ||
108 | + virtual DeleterFn GetDeleter(Handle* handle) const override; | ||
109 | +#endif | ||
110 | // Retrieves number of elements in LRU, for unit test purpose only | ||
111 | size_t TEST_GetLRUSize(); | ||
112 | // Sets the high pri pool ratio | ||
113 | diff --git a/src/kv/rocksdb_cache/ShardedCache.cc b/src/kv/rocksdb_cache/ShardedCache.cc | ||
114 | index ef3b3b98..6cbd89ad 100644 | ||
115 | --- a/src/kv/rocksdb_cache/ShardedCache.cc | ||
116 | +++ b/src/kv/rocksdb_cache/ShardedCache.cc | ||
117 | @@ -109,13 +109,36 @@ size_t ShardedCache::GetPinnedUsage() const { | ||
118 | return usage; | ||
119 | } | ||
120 | |||
121 | +#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22) | ||
122 | +DeleterFn ShardedCache::GetDeleter(Handle* handle) const | ||
123 | +{ | ||
124 | + uint32_t hash = GetHash(handle); | ||
125 | + return GetShard(Shard(hash))->GetDeleter(handle); | ||
126 | +} | ||
127 | + | ||
128 | +void ShardedCache::ApplyToAllEntries( | ||
129 | + const std::function<void(const rocksdb::Slice& key, void* value, size_t charge, | ||
130 | + DeleterFn deleter)>& callback, | ||
131 | + const ApplyToAllEntriesOptions& opts) | ||
132 | +{ | ||
133 | + int num_shards = 1 << num_shard_bits_; | ||
134 | + for (int s = 0; s < num_shards; s++) { | ||
135 | + GetShard(s)->ApplyToAllCacheEntries(callback, true /* thread_safe */); | ||
136 | + } | ||
137 | +} | ||
138 | +#else | ||
139 | void ShardedCache::ApplyToAllCacheEntries(void (*callback)(void*, size_t), | ||
140 | bool thread_safe) { | ||
141 | int num_shards = 1 << num_shard_bits_; | ||
142 | for (int s = 0; s < num_shards; s++) { | ||
143 | - GetShard(s)->ApplyToAllCacheEntries(callback, thread_safe); | ||
144 | + GetShard(s)->ApplyToAllCacheEntries( | ||
145 | + [callback](const rocksdb::Slice&, void* value, size_t charge, DeleterFn) { | ||
146 | + callback(value, charge); | ||
147 | + }, | ||
148 | + thread_safe); | ||
149 | } | ||
150 | } | ||
151 | +#endif | ||
152 | |||
153 | void ShardedCache::EraseUnRefEntries() { | ||
154 | int num_shards = 1 << num_shard_bits_; | ||
155 | diff --git a/src/kv/rocksdb_cache/ShardedCache.h b/src/kv/rocksdb_cache/ShardedCache.h | ||
156 | index 674e5322..4d3ca302 100644 | ||
157 | --- a/src/kv/rocksdb_cache/ShardedCache.h | ||
158 | +++ b/src/kv/rocksdb_cache/ShardedCache.h | ||
159 | @@ -14,6 +14,7 @@ | ||
160 | #include <string> | ||
161 | #include <mutex> | ||
162 | |||
163 | +#include "rocksdb/version.h" | ||
164 | #include "rocksdb/cache.h" | ||
165 | #include "include/ceph_hash.h" | ||
166 | #include "common/PriorityCache.h" | ||
167 | @@ -45,10 +46,15 @@ class CacheShard { | ||
168 | virtual void SetStrictCapacityLimit(bool strict_capacity_limit) = 0; | ||
169 | virtual size_t GetUsage() const = 0; | ||
170 | virtual size_t GetPinnedUsage() const = 0; | ||
171 | - virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t), | ||
172 | - bool thread_safe) = 0; | ||
173 | + virtual void ApplyToAllCacheEntries( | ||
174 | + const std::function<void(const rocksdb::Slice& key, | ||
175 | + void* value, | ||
176 | + size_t charge, | ||
177 | + DeleterFn)>& callback, | ||
178 | + bool thread_safe) = 0; | ||
179 | virtual void EraseUnRefEntries() = 0; | ||
180 | virtual std::string GetPrintableOptions() const { return ""; } | ||
181 | + virtual DeleterFn GetDeleter(rocksdb::Cache::Handle* handle) const = 0; | ||
182 | }; | ||
183 | |||
184 | // Generic cache interface which shards cache by hash of keys. 2^num_shard_bits | ||
185 | @@ -77,9 +83,19 @@ class ShardedCache : public rocksdb::Cache, public PriorityCache::PriCache { | ||
186 | virtual size_t GetUsage(rocksdb::Cache::Handle* handle) const override; | ||
187 | virtual size_t GetPinnedUsage() const override; | ||
188 | virtual size_t GetCharge(Handle* handle) const = 0; | ||
189 | +#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22) | ||
190 | + virtual DeleterFn GetDeleter(Handle* handle) const override; | ||
191 | +#endif | ||
192 | virtual void DisownData() override = 0; | ||
193 | +#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22) | ||
194 | + virtual void ApplyToAllEntries( | ||
195 | + const std::function<void(const rocksdb::Slice& key, void* value, size_t charge, | ||
196 | + DeleterFn deleter)>& callback, | ||
197 | + const ApplyToAllEntriesOptions& opts) override; | ||
198 | +#else | ||
199 | virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t), | ||
200 | bool thread_safe) override; | ||
201 | +#endif | ||
202 | virtual void EraseUnRefEntries() override; | ||
203 | virtual std::string GetPrintableOptions() const override; | ||
204 | virtual CacheShard* GetShard(int shard) = 0; | ||
205 | -- | ||
206 | 2.33.0 | ||
207 | |||
diff --git a/recipes-extended/ceph/ceph/0005-kv-rocksdb_cache-mark-Shard-const.patch b/recipes-extended/ceph/ceph/0005-kv-rocksdb_cache-mark-Shard-const.patch deleted file mode 100644 index bc18574c..00000000 --- a/recipes-extended/ceph/ceph/0005-kv-rocksdb_cache-mark-Shard-const.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 52c57e25a5e2c617bc797b8ce50060b5894bd7fc Mon Sep 17 00:00:00 2001 | ||
2 | From: Kefu Chai <kchai@redhat.com> | ||
3 | Date: Tue, 17 Aug 2021 18:06:31 +0800 | ||
4 | Subject: [PATCH 5/6] kv/rocksdb_cache: mark Shard() const | ||
5 | |||
6 | it does not mutate anything, so mark it `const`. | ||
7 | |||
8 | Signed-off-by: Kefu Chai <kchai@redhat.com> | ||
9 | |||
10 | Upstream-Status: Backport [0296ac4458c0be0609f033e15b0fa8c6c9c20049] | ||
11 | |||
12 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
13 | --- | ||
14 | src/kv/rocksdb_cache/ShardedCache.h | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/src/kv/rocksdb_cache/ShardedCache.h b/src/kv/rocksdb_cache/ShardedCache.h | ||
18 | index 4d3ca302..f98421a0 100644 | ||
19 | --- a/src/kv/rocksdb_cache/ShardedCache.h | ||
20 | +++ b/src/kv/rocksdb_cache/ShardedCache.h | ||
21 | @@ -136,7 +136,7 @@ class ShardedCache : public rocksdb::Cache, public PriorityCache::PriCache { | ||
22 | // return Hash(s.data(), s.size(), 0); | ||
23 | } | ||
24 | |||
25 | - uint32_t Shard(uint32_t hash) { | ||
26 | + uint32_t Shard(uint32_t hash) const { | ||
27 | // Note, hash >> 32 yields hash in gcc, not the zero we expect! | ||
28 | return (num_shard_bits_ > 0) ? (hash >> (32 - num_shard_bits_)) : 0; | ||
29 | } | ||
30 | -- | ||
31 | 2.33.0 | ||
32 | |||
diff --git a/recipes-extended/ceph/ceph/CVE-2021-3979.patch b/recipes-extended/ceph/ceph/CVE-2021-3979.patch deleted file mode 100644 index 081b32ba..00000000 --- a/recipes-extended/ceph/ceph/CVE-2021-3979.patch +++ /dev/null | |||
@@ -1,158 +0,0 @@ | |||
1 | From 47c33179f9a15ae95cc1579a421be89378602656 Mon Sep 17 00:00:00 2001 | ||
2 | From: Guillaume Abrioux <gabrioux@redhat.com> | ||
3 | Date: Tue, 25 Jan 2022 10:25:53 +0100 | ||
4 | Subject: [PATCH] ceph-volume: honour osd_dmcrypt_key_size option | ||
5 | |||
6 | ceph-volume doesn't honour osd_dmcrypt_key_size. | ||
7 | It means the default size is always applied. | ||
8 | |||
9 | It also changes the default value in `get_key_size_from_conf()` | ||
10 | |||
11 | From cryptsetup manpage: | ||
12 | |||
13 | > For XTS mode you can optionally set a key size of 512 bits with the -s option. | ||
14 | |||
15 | Using more than 512bits will end up with the following error message: | ||
16 | |||
17 | ``` | ||
18 | Key size in XTS mode must be 256 or 512 bits. | ||
19 | ``` | ||
20 | |||
21 | Fixes: https://tracker.ceph.com/issues/54006 | ||
22 | |||
23 | Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com> | ||
24 | |||
25 | Upstream-Status: Backport | ||
26 | github.com/ceph/ceph.git | ||
27 | equivalent to cherry-pick of commit 47c33179f9a15ae95cc1579a421be89378602656 | ||
28 | |||
29 | CVE: CVE-2021-3979 | ||
30 | |||
31 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
32 | --- | ||
33 | .../ceph_volume/tests/util/test_encryption.py | 41 +++++++++++++------ | ||
34 | .../ceph_volume/util/encryption.py | 34 ++++++++++----- | ||
35 | 2 files changed, 51 insertions(+), 24 deletions(-) | ||
36 | |||
37 | diff --git a/src/ceph-volume/ceph_volume/tests/util/test_encryption.py b/src/ceph-volume/ceph_volume/tests/util/test_encryption.py | ||
38 | index e1420b440d3..c86dc50b7c7 100644 | ||
39 | --- a/src/ceph-volume/ceph_volume/tests/util/test_encryption.py | ||
40 | +++ b/src/ceph-volume/ceph_volume/tests/util/test_encryption.py | ||
41 | @@ -1,5 +1,31 @@ | ||
42 | from ceph_volume.util import encryption | ||
43 | +import base64 | ||
44 | |||
45 | +class TestGetKeySize(object): | ||
46 | + def test_get_size_from_conf_default(self, conf_ceph_stub): | ||
47 | + conf_ceph_stub(''' | ||
48 | + [global] | ||
49 | + fsid=asdf | ||
50 | + ''') | ||
51 | + assert encryption.get_key_size_from_conf() == '512' | ||
52 | + | ||
53 | + def test_get_size_from_conf_custom(self, conf_ceph_stub): | ||
54 | + conf_ceph_stub(''' | ||
55 | + [global] | ||
56 | + fsid=asdf | ||
57 | + [osd] | ||
58 | + osd_dmcrypt_key_size=256 | ||
59 | + ''') | ||
60 | + assert encryption.get_key_size_from_conf() == '256' | ||
61 | + | ||
62 | + def test_get_size_from_conf_custom_invalid(self, conf_ceph_stub): | ||
63 | + conf_ceph_stub(''' | ||
64 | + [global] | ||
65 | + fsid=asdf | ||
66 | + [osd] | ||
67 | + osd_dmcrypt_key_size=1024 | ||
68 | + ''') | ||
69 | + assert encryption.get_key_size_from_conf() == '512' | ||
70 | |||
71 | class TestStatus(object): | ||
72 | |||
73 | @@ -37,17 +63,6 @@ class TestDmcryptClose(object): | ||
74 | |||
75 | class TestDmcryptKey(object): | ||
76 | |||
77 | - def test_dmcrypt_with_default_size(self, conf_ceph_stub): | ||
78 | - conf_ceph_stub('[global]\nfsid=asdf-lkjh') | ||
79 | - result = encryption.create_dmcrypt_key() | ||
80 | - assert len(result) == 172 | ||
81 | - | ||
82 | - def test_dmcrypt_with_custom_size(self, conf_ceph_stub): | ||
83 | - conf_ceph_stub(''' | ||
84 | - [global] | ||
85 | - fsid=asdf | ||
86 | - [osd] | ||
87 | - osd_dmcrypt_size=8 | ||
88 | - ''') | ||
89 | + def test_dmcrypt(self): | ||
90 | result = encryption.create_dmcrypt_key() | ||
91 | - assert len(result) == 172 | ||
92 | + assert len(base64.b64decode(result)) == 128 | ||
93 | diff --git a/src/ceph-volume/ceph_volume/util/encryption.py b/src/ceph-volume/ceph_volume/util/encryption.py | ||
94 | index 72a0ccf121e..2a2c03337b6 100644 | ||
95 | --- a/src/ceph-volume/ceph_volume/util/encryption.py | ||
96 | +++ b/src/ceph-volume/ceph_volume/util/encryption.py | ||
97 | @@ -9,21 +9,29 @@ from .disk import lsblk, device_family, get_part_entry_type | ||
98 | |||
99 | logger = logging.getLogger(__name__) | ||
100 | |||
101 | - | ||
102 | -def create_dmcrypt_key(): | ||
103 | +def get_key_size_from_conf(): | ||
104 | """ | ||
105 | - Create the secret dm-crypt key used to decrypt a device. | ||
106 | + Return the osd dmcrypt key size from config file. | ||
107 | + Default is 512. | ||
108 | """ | ||
109 | - # get the customizable dmcrypt key size (in bits) from ceph.conf fallback | ||
110 | - # to the default of 1024 | ||
111 | - dmcrypt_key_size = conf.ceph.get_safe( | ||
112 | + default_key_size = '512' | ||
113 | + key_size = conf.ceph.get_safe( | ||
114 | 'osd', | ||
115 | 'osd_dmcrypt_key_size', | ||
116 | - default=1024, | ||
117 | - ) | ||
118 | - # The size of the key is defined in bits, so we must transform that | ||
119 | - # value to bytes (dividing by 8) because we read in bytes, not bits | ||
120 | - random_string = os.urandom(int(dmcrypt_key_size / 8)) | ||
121 | + default='512') | ||
122 | + | ||
123 | + if key_size not in ['256', '512']: | ||
124 | + logger.warning(("Invalid value set for osd_dmcrypt_key_size ({}). " | ||
125 | + "Falling back to {}bits".format(key_size, default_key_size))) | ||
126 | + return default_key_size | ||
127 | + | ||
128 | + return key_size | ||
129 | + | ||
130 | +def create_dmcrypt_key(): | ||
131 | + """ | ||
132 | + Create the secret dm-crypt key (KEK) used to encrypt/decrypt the Volume Key. | ||
133 | + """ | ||
134 | + random_string = os.urandom(128) | ||
135 | key = base64.b64encode(random_string).decode('utf-8') | ||
136 | return key | ||
137 | |||
138 | @@ -38,6 +46,8 @@ def luks_format(key, device): | ||
139 | command = [ | ||
140 | 'cryptsetup', | ||
141 | '--batch-mode', # do not prompt | ||
142 | + '--key-size', | ||
143 | + get_key_size_from_conf(), | ||
144 | '--key-file', # misnomer, should be key | ||
145 | '-', # because we indicate stdin for the key here | ||
146 | 'luksFormat', | ||
147 | @@ -83,6 +93,8 @@ def luks_open(key, device, mapping): | ||
148 | """ | ||
149 | command = [ | ||
150 | 'cryptsetup', | ||
151 | + '--key-size', | ||
152 | + get_key_size_from_conf(), | ||
153 | '--key-file', | ||
154 | '-', | ||
155 | '--allow-discards', # allow discards (aka TRIM) requests for device | ||
156 | -- | ||
157 | 2.35.1 | ||
158 | |||
diff --git a/recipes-extended/ceph/ceph_15.2.15.bb b/recipes-extended/ceph/ceph_18.2.0.bb index 2c5cdf58..35188106 100644 --- a/recipes-extended/ceph/ceph_15.2.15.bb +++ b/recipes-extended/ceph/ceph_18.2.0.bb | |||
@@ -2,7 +2,7 @@ SUMMARY = "User space components of the Ceph file system" | |||
2 | LICENSE = "LGPL-2.1-only & GPL-2.0-only & Apache-2.0 & MIT" | 2 | LICENSE = "LGPL-2.1-only & GPL-2.0-only & Apache-2.0 & MIT" |
3 | LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \ | 3 | LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \ |
4 | file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 4 | file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
5 | file://COPYING;md5=4eb012c221c5fd4b760029a2981a6754 \ | 5 | file://COPYING;md5=5351120989d78252e65dc1a2a92e3617 \ |
6 | " | 6 | " |
7 | inherit cmake pkgconfig python3native python3-dir systemd | 7 | inherit cmake pkgconfig python3native python3-dir systemd |
8 | # Disable python pybind support for ceph temporary, when corss compiling pybind, | 8 | # Disable python pybind support for ceph temporary, when corss compiling pybind, |
@@ -13,29 +13,17 @@ SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ | |||
13 | file://0001-fix-host-library-paths-were-used.patch \ | 13 | file://0001-fix-host-library-paths-were-used.patch \ |
14 | file://ceph.conf \ | 14 | file://ceph.conf \ |
15 | file://0001-cmake-add-support-for-python3.11.patch \ | 15 | file://0001-cmake-add-support-for-python3.11.patch \ |
16 | file://0001-SnappyCompressor.h-fix-snappy-compiler-error.patch \ | ||
17 | file://0001-buffer.h-add-missing-header-file-due-to-gcc-upgrade.patch \ | ||
18 | file://0002-common-fix-FTBFS-due-to-dout-need_dynamic-on-GCC-12.patch \ | ||
19 | file://CVE-2021-3979.patch \ | ||
20 | file://0001-kv-rocksdb_cache-drop-ROCKSDB_PRIszt.patch \ | ||
21 | file://0002-kv-rocksdb_cache-reorder-ShardedCache-methods-declar.patch \ | ||
22 | file://0003-kv-rocksdb_cache-define-DeleterFn-function-pointer-t.patch \ | ||
23 | file://0004-kv-rocksdb_cache-implement-methods-required-by-rocks.patch \ | ||
24 | file://0005-kv-rocksdb_cache-mark-Shard-const.patch \ | ||
25 | file://0006-rocksdb-build-with-rocksdb-7.y.z.patch \ | ||
26 | file://0001-common-fix-build-with-GCC-13-missing-cstdint-include.patch \ | ||
27 | file://0002-common-replace-BitVector-NoInitAllocator-with-wrappe.patch \ | ||
28 | file://0003-librdb-fix-build-with-gcc-13.patch \ | ||
29 | " | 16 | " |
30 | 17 | ||
31 | SRC_URI[sha256sum] = "5dccdaff2ebe18d435b32bfc06f8b5f474bf6ac0432a6a07d144b7c56700d0bf" | 18 | SRC_URI[sha256sum] = "495b63e1146c604018ae0cb29bf769b5d6235e3c95849c43513baf12bba1364d" |
32 | 19 | ||
33 | DEPENDS = "boost bzip2 curl expat gperf-native \ | 20 | DEPENDS = "boost bzip2 curl cryptsetup expat gperf-native \ |
34 | keyutils libaio libibverbs lz4 \ | 21 | keyutils libaio libibverbs lua lz4 \ |
35 | nspr nss \ | 22 | nspr nss ninja-native \ |
36 | oath openldap openssl \ | 23 | oath openldap openssl \ |
37 | python3 python3-cython-native rabbitmq-c rocksdb snappy udev \ | 24 | python3 python3-native python3-cython-native python3-pyyaml-native \ |
38 | valgrind xfsprogs zlib \ | 25 | rabbitmq-c rocksdb snappy thrift udev \ |
26 | valgrind xfsprogs zlib libgcc \ | ||
39 | " | 27 | " |
40 | SYSTEMD_SERVICE:${PN} = " \ | 28 | SYSTEMD_SERVICE:${PN} = " \ |
41 | ceph-radosgw@.service \ | 29 | ceph-radosgw@.service \ |
@@ -72,21 +60,48 @@ EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \ | |||
72 | -DWITH_SYSTEM_ROCKSDB=ON \ | 60 | -DWITH_SYSTEM_ROCKSDB=ON \ |
73 | -DWITH_RDMA=OFF \ | 61 | -DWITH_RDMA=OFF \ |
74 | -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \ | 62 | -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \ |
75 | -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 \ | ||
76 | -DPython3_EXECUTABLE=${PYTHON} \ | ||
77 | -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \ | 63 | -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \ |
78 | -DWITH_REENTRANT_STRSIGNAL=ON \ | 64 | -DWITH_REENTRANT_STRSIGNAL=ON \ |
79 | " | 65 | -DWITH_PYTHON3=3.12 \ |
66 | -DPYTHON_DESIRED=3 \ | ||
67 | -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${WORKDIR}/toolchain.cmake \ | ||
68 | " | ||
69 | |||
70 | EXTRA_OECMAKE += "-DThrift_INCLUDE_DIR:PATH=${STAGING_INCDIR} \ | ||
71 | -DThrift_LIBRARIES:PATH=${STAGING_LIBDIR} \ | ||
72 | " | ||
73 | |||
74 | # retired options: | ||
75 | # -DPython3_VERSION=${PYTHON_BASEVERSION} | ||
76 | # -DPython3_USE_STATIC_LIBS=FALSE | ||
77 | # -DPython3_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR} | ||
78 | # -DPython3_LIBRARY:PATH=${PYTHON_LIBRARY} | ||
79 | # -DPython3_ROOT_DIR:PATH=${PYTHON_SITEPACKAGES_DIR} | ||
80 | # -DPython3_EXECUTABLE:PATH="${PYTHON}" | ||
80 | 81 | ||
81 | CXXFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}" | 82 | CXXFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}" |
82 | CFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}" | 83 | CFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}" |
83 | 84 | ||
84 | export STAGING_DIR_HOST | 85 | export STAGING_DIR_HOST |
85 | 86 | ||
87 | do_compile:prepend() { | ||
88 | cmake_runcmake_build --target legacy-option-headers | ||
89 | } | ||
90 | |||
91 | # do_compile() { | ||
92 | # ninja -v ${PARALLEL_MAKE} | ||
93 | # } | ||
94 | do_compile() { | ||
95 | cmake_runcmake_build --target all | ||
96 | } | ||
97 | |||
86 | do_configure:prepend () { | 98 | do_configure:prepend () { |
87 | echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake | 99 | echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake |
88 | echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake | 100 | echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake |
89 | echo "set( PYTHON_SITEPACKAGES_DIR \"${PYTHON_SITEPACKAGES_DIR}\" )" >> ${WORKDIR}/toolchain.cmake | 101 | echo "set( PYTHON_SITEPACKAGES_DIR \"${PYTHON_SITEPACKAGES_DIR}\" )" >> ${WORKDIR}/toolchain.cmake |
102 | # echo "set( CMAKE_C_COMPILER_WORKS TRUE)" >> ${WORKDIR}/toolchain.cmake | ||
103 | # echo "set( CMAKE_CXX_COMPILER_FORCED TRUE)" >> ${WORKDIR}/toolchain.cmake | ||
104 | echo "set( CMAKE_C_COMPILER_FORCED TRUE )" >> ${WORKDIR}/toolchain.cmake | ||
90 | } | 105 | } |
91 | 106 | ||
92 | do_install:append () { | 107 | do_install:append () { |