diff options
Diffstat (limited to 'recipes-extended/ceph')
-rw-r--r-- | recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch | 73 | ||||
-rw-r--r-- | recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch | 183 | ||||
-rw-r--r-- | recipes-extended/ceph/ceph/0001-cephadm-build.py-avoid-using-python3-from-sysroot-wh.patch | 43 | ||||
-rw-r--r-- | recipes-extended/ceph/ceph/0001-common-rgw-workaround-for-boost-1.72.patch | 62 | ||||
-rw-r--r-- | recipes-extended/ceph/ceph/0001-delete-install-layout-deb.patch | 39 | ||||
-rw-r--r-- | recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch | 93 | ||||
-rw-r--r-- | recipes-extended/ceph/ceph/0001-rgw-add-executor-type-for-basic_waitable_timers.patch | 58 | ||||
-rw-r--r-- | recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch | 67 | ||||
-rw-r--r-- | recipes-extended/ceph/ceph/0006-rocksdb-build-with-rocksdb-7.y.z.patch | 109 | ||||
-rw-r--r-- | recipes-extended/ceph/ceph_18.2.2.bb (renamed from recipes-extended/ceph/ceph_14.2.7.bb) | 105 |
10 files changed, 430 insertions, 402 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 @@ +From f807220d13adc0656c30d3207d11c70360b88d06 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Wed, 13 Mar 2024 03:14:55 -0700 +Subject: [PATCH] avoid to_string error + +Upstream-Status: Pending + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + src/rgw/rgw_asio_client.cc | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/src/rgw/rgw_asio_client.cc b/src/rgw/rgw_asio_client.cc +index a0ec0bf5c..17880eda5 100644 +--- a/src/rgw/rgw_asio_client.cc ++++ b/src/rgw/rgw_asio_client.cc +@@ -3,6 +3,7 @@ + + #include <boost/algorithm/string/predicate.hpp> + #include <boost/asio/write.hpp> ++#include <string_view> + + #include "rgw_asio_client.h" + #include "rgw_perf_counters.h" +@@ -39,11 +40,11 @@ int ClientIO::init_env(CephContext *cct) + const auto& value = header->value(); + + if (field == beast::http::field::content_length) { +- env.set("CONTENT_LENGTH", value.to_string()); ++ env.set("CONTENT_LENGTH", std::string(value)); + continue; + } + if (field == beast::http::field::content_type) { +- env.set("CONTENT_TYPE", value.to_string()); ++ env.set("CONTENT_TYPE", std::string(value)); + continue; + } + +@@ -62,26 +63,26 @@ int ClientIO::init_env(CephContext *cct) + } + *dest = '\0'; + +- env.set(buf, value.to_string()); ++ env.set(buf, std::string(value)); + } + + int major = request.version() / 10; + int minor = request.version() % 10; + env.set("HTTP_VERSION", std::to_string(major) + '.' + std::to_string(minor)); + +- env.set("REQUEST_METHOD", request.method_string().to_string()); ++ env.set("REQUEST_METHOD", std::string(request.method_string())); + + // split uri from query + auto uri = request.target(); + auto pos = uri.find('?'); + if (pos != uri.npos) { + auto query = uri.substr(pos + 1); +- env.set("QUERY_STRING", query.to_string()); ++ env.set("QUERY_STRING", std::string(query)); + uri = uri.substr(0, pos); + } +- env.set("SCRIPT_URI", uri.to_string()); ++ env.set("SCRIPT_URI", std::string(uri)); + +- env.set("REQUEST_URI", request.target().to_string()); ++ env.set("REQUEST_URI", std::string(request.target())); + + char port_buf[16]; + snprintf(port_buf, sizeof(port_buf), "%d", local_endpoint.port()); +-- +2.42.0 + 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 4f009f0f..00000000 --- a/recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch +++ /dev/null @@ -1,183 +0,0 @@ -From 9b97824ad0da2c0d3dcc0cf41f4506aa7e458e9f Mon Sep 17 00:00:00 2001 -From: Dengke Du <dengke.du@windriver.com> -Date: Mon, 11 Mar 2019 09:14:09 +0800 -Subject: [PATCH] ceph: fix build errors for cross compile - -1. set the cross compile sysroot to find the rocksdb library -2. correct the install path for library in Distutils.cmake - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Dengke Du <dengke.du@windriver.com> - -Adjust context for v14.2.3 - -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - cmake/modules/Distutils.cmake | 25 +++++-------------------- - cmake/modules/FindRocksDB.cmake | 4 ++-- - src/compressor/zstd/CMakeLists.txt | 2 +- - src/pybind/cephfs/setup.py | 8 -------- - src/pybind/rados/setup.py | 8 -------- - src/pybind/rbd/setup.py | 8 -------- - src/pybind/rgw/setup.py | 8 -------- - 7 files changed, 8 insertions(+), 55 deletions(-) - -diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake -index f70265f..b2f4223 100644 ---- a/cmake/modules/Distutils.cmake -+++ b/cmake/modules/Distutils.cmake -@@ -16,17 +16,8 @@ function(distutils_install_module name) - cmake_parse_arguments(DU "" INSTALL_SCRIPT "" ${ARGN}) - install(CODE " - set(options --prefix=${CMAKE_INSTALL_PREFIX}) -- if(DEFINED ENV{DESTDIR}) -- if(EXISTS /etc/debian_version) -- list(APPEND options --install-layout=deb) -- endif() -- list(APPEND options -- --root=\$ENV{DESTDIR} -- --single-version-externally-managed) -- if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\") -- list(APPEND options --install-script=${DU_INSTALL_SCRIPT}) -- endif() -- endif() -+ list(APPEND options --root=${CMAKE_DESTDIR}) -+ list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR}) - execute_process( - COMMAND ${PYTHON${PYTHON_VERSION}_EXECUTABLE} - setup.py install \${options} -@@ -48,7 +39,7 @@ function(distutils_add_cython_module name src) - # Note: no quotes, otherwise distutils will execute "/usr/bin/ccache gcc" - # CMake's implicit conversion between strings and lists is wonderful, isn't it? - string(REPLACE " " ";" cflags ${CMAKE_C_FLAGS}) -- list(APPEND cflags -iquote${CMAKE_SOURCE_DIR}/src/include -w) -+ list(APPEND cflags -iquote${CMAKE_SOURCE_DIR}/src/include -w --sysroot=${CMAKE_SYSROOT}) - # This little bit of magic wipes out __Pyx_check_single_interpreter() - # Note: this is reproduced in distutils_install_cython_module - list(APPEND cflags -D'void0=dead_function\(void\)') -@@ -89,14 +80,8 @@ function(distutils_install_cython_module name) - set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\") - - set(options --prefix=${CMAKE_INSTALL_PREFIX}) -- if(DEFINED ENV{DESTDIR}) -- if(EXISTS /etc/debian_version) -- list(APPEND options --install-layout=deb) -- endif() -- list(APPEND options --root=\$ENV{DESTDIR}) -- else() -- list(APPEND options --root=/) -- endif() -+ list(APPEND options --root=${CMAKE_DESTDIR}) -+ list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR}) - execute_process( - COMMAND - ${PYTHON${PYTHON_VERSION}_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py -diff --git a/cmake/modules/FindRocksDB.cmake b/cmake/modules/FindRocksDB.cmake -index c5dd3df..be38597 100644 ---- a/cmake/modules/FindRocksDB.cmake -+++ b/cmake/modules/FindRocksDB.cmake -@@ -9,9 +9,9 @@ - # ROCKSDB_VERSION_MINOR - # ROCKSDB_VERSION_PATCH - --find_path(ROCKSDB_INCLUDE_DIR rocksdb/db.h) -+find_path(ROCKSDB_INCLUDE_DIR rocksdb/db.h ${CMAKE_SYSROOT}) - --find_library(ROCKSDB_LIBRARIES rocksdb) -+find_library(ROCKSDB_LIBRARIES rocksdb ${CMAKE_SYSROOT}) - - if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h") - foreach(ver "MAJOR" "MINOR" "PATCH") -diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt -index 76709bb..95bba4a 100644 ---- a/src/compressor/zstd/CMakeLists.txt -+++ b/src/compressor/zstd/CMakeLists.txt -@@ -9,7 +9,7 @@ ExternalProject_Add(zstd_ext - CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} - -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} - -DCMAKE_C_FLAGS=${ZSTD_C_FLAGS} -- -DCMAKE_AR=${CMAKE_AR} -+ -DCMAKE_SYSROOT=${CMAKE_SYSROOT} - -DCMAKE_POSITION_INDEPENDENT_CODE=${ENABLE_SHARED} - BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/libzstd - BUILD_COMMAND $(MAKE) libzstd_static -diff --git a/src/pybind/cephfs/setup.py b/src/pybind/cephfs/setup.py -index 1f95005..8a6d136 100755 ---- a/src/pybind/cephfs/setup.py -+++ b/src/pybind/cephfs/setup.py -@@ -142,14 +142,6 @@ def check_sanity(): - finally: - shutil.rmtree(tmp_dir) - -- --if 'BUILD_DOC' in os.environ.keys(): -- pass --elif check_sanity(): -- pass --else: -- sys.exit(1) -- - cmdclass = {} - try: - from Cython.Build import cythonize -diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py -index 75081df..4d1591c 100755 ---- a/src/pybind/rados/setup.py -+++ b/src/pybind/rados/setup.py -@@ -138,14 +138,6 @@ def check_sanity(): - finally: - shutil.rmtree(tmp_dir) - -- --if 'BUILD_DOC' in os.environ.keys(): -- pass --elif check_sanity(): -- pass --else: -- sys.exit(1) -- - cmdclass = {} - try: - from Cython.Build import cythonize -diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py -index 8dd5c12..b8f4d91 100755 ---- a/src/pybind/rbd/setup.py -+++ b/src/pybind/rbd/setup.py -@@ -141,14 +141,6 @@ def check_sanity(): - finally: - shutil.rmtree(tmp_dir) - -- --if 'BUILD_DOC' in os.environ.keys(): -- pass --elif check_sanity(): -- pass --else: -- sys.exit(1) -- - cmdclass = {} - try: - from Cython.Build import cythonize -diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py -index 4ee4f49..91dc7d4 100755 ---- a/src/pybind/rgw/setup.py -+++ b/src/pybind/rgw/setup.py -@@ -143,14 +143,6 @@ def check_sanity(): - finally: - shutil.rmtree(tmp_dir) - -- --if 'BUILD_DOC' in os.environ.keys(): -- pass --elif check_sanity(): -- pass --else: -- sys.exit(1) -- - cmdclass = {} - try: - from Cython.Build import cythonize --- -2.7.4 - 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 @@ +From b9867e6b744b77d97d22333eca3ab3d23d47e2e2 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Thu, 14 Mar 2024 00:19:19 -0700 +Subject: [PATCH] cephadm/build.py: avoid using python3 from sysroot when + creating zipapp archive + +ceph has the assumption that the python used during build +is the python used at target, but this is not true for +cross compilation. We'll need to use the target python3 here, +otherwise, the cephadm zipapp cannot be executed. + +Upstream-Status: Pending + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + src/cephadm/build.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/cephadm/build.py b/src/cephadm/build.py +index 4264b814f1e..a4483d6f79d 100755 +--- a/src/cephadm/build.py ++++ b/src/cephadm/build.py +@@ -93,7 +93,7 @@ def _compile(dest, tempdir): + zipapp.create_archive( + source=tempdir, + target=dest, +- interpreter=sys.executable, ++ interpreter='/usr/bin/python3', + compressed=True, + ) + log.info("Zipapp created with compression") +@@ -102,7 +102,7 @@ def _compile(dest, tempdir): + zipapp.create_archive( + source=tempdir, + target=dest, +- interpreter=sys.executable, ++ interpreter='/usr/bin/python3', + ) + log.info("Zipapp created without compression") + +-- +2.42.0 + diff --git a/recipes-extended/ceph/ceph/0001-common-rgw-workaround-for-boost-1.72.patch b/recipes-extended/ceph/ceph/0001-common-rgw-workaround-for-boost-1.72.patch deleted file mode 100644 index 44bda1a2..00000000 --- a/recipes-extended/ceph/ceph/0001-common-rgw-workaround-for-boost-1.72.patch +++ /dev/null @@ -1,62 +0,0 @@ -From ea64c4909ffeae10e5d8e0a23604030e8849f803 Mon Sep 17 00:00:00 2001 -From: Kefu Chai <kchai@redhat.com> -Date: Mon, 23 Dec 2019 16:26:13 +0800 -Subject: [PATCH] common,rgw: workaround for boost 1.72 - -see also https://github.com/boostorg/coroutine/issues/46 - -will need to remove this change once we require boost >= 1.73 - -Signed-off-by: Kefu Chai <kchai@redhat.com> - -Upstream-Status: Backport [https://github.com/ceph/ceph/commit/ea64c4909ffeae10e5d8e0a23604030e8849f803] - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/common/async/yield_context.h | 2 ++ - src/rgw/rgw_asio_frontend.cc | 2 ++ - src/test/librados/asio.cc | 2 ++ - 3 files changed, 6 insertions(+) - -diff --git a/src/common/async/yield_context.h b/src/common/async/yield_context.h -index fda9541eb4..436192c02f 100644 ---- a/src/common/async/yield_context.h -+++ b/src/common/async/yield_context.h -@@ -14,6 +14,8 @@ - - #pragma once - -+#include <boost/range/begin.hpp> -+#include <boost/range/end.hpp> - #include <boost/asio/io_context.hpp> - - #include "acconfig.h" -diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc -index 7df74225f6..deab1b0c66 100644 ---- a/src/rgw/rgw_asio_frontend.cc -+++ b/src/rgw/rgw_asio_frontend.cc -@@ -7,6 +7,8 @@ - - #include <boost/asio.hpp> - #define BOOST_COROUTINES_NO_DEPRECATION_WARNING -+#include <boost/range/begin.hpp> -+#include <boost/range/end.hpp> - #include <boost/asio/spawn.hpp> - #include <boost/intrusive/list.hpp> - -diff --git a/src/test/librados/asio.cc b/src/test/librados/asio.cc -index 9c86ad420c..8fa4bab197 100644 ---- a/src/test/librados/asio.cc -+++ b/src/test/librados/asio.cc -@@ -21,6 +21,8 @@ - - #ifdef HAVE_BOOST_CONTEXT - #define BOOST_COROUTINES_NO_DEPRECATION_WARNING -+#include <boost/range/begin.hpp> -+#include <boost/range/end.hpp> - #include <boost/asio/spawn.hpp> - #endif - #include <boost/asio/use_future.hpp> --- -2.17.1 - 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..3cd8edba --- /dev/null +++ b/recipes-extended/ceph/ceph/0001-delete-install-layout-deb.patch @@ -0,0 +1,39 @@ +From 903bb882a44eb5567f8b1fc7f7c4857c2f03579d Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Wed, 13 Mar 2024 03:41:47 -0700 +Subject: [PATCH] delete install-layout=deb + +Upstream-Status: Pending + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + cmake/modules/Distutils.cmake | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake +index daaae4ba6..e606e3890 100644 +--- a/cmake/modules/Distutils.cmake ++++ b/cmake/modules/Distutils.cmake +@@ -30,9 +30,6 @@ function(distutils_install_module name) + install(CODE " + set(options --prefix=${CMAKE_INSTALL_PREFIX}) + if(DEFINED ENV{DESTDIR}) +- if(EXISTS /etc/debian_version) +- list(APPEND options --install-layout=deb) +- endif() + list(APPEND options + --root=\$ENV{DESTDIR} + --single-version-externally-managed) +@@ -136,9 +133,6 @@ function(distutils_install_cython_module name) + + set(options --prefix=${CMAKE_INSTALL_PREFIX}) + if(DEFINED ENV{DESTDIR}) +- if(EXISTS /etc/debian_version) +- list(APPEND options --install-layout=deb) +- endif() + list(APPEND options --root=\$ENV{DESTDIR}) + else() + list(APPEND options --root=/) +-- +2.42.0 + 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 new file mode 100644 index 00000000..24fd0409 --- /dev/null +++ b/recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch @@ -0,0 +1,93 @@ +From bbf1cba8feb0e43492a1f6a6b31d024117cad262 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Mon, 13 Apr 2020 23:35:41 -0700 +Subject: [PATCH] fix host library paths were used + +Test the existence of recipe-sysrooot, add it back if lost + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + src/pybind/cephfs/setup.py | 6 +++++- + src/pybind/rados/setup.py | 6 +++++- + src/pybind/rbd/setup.py | 6 +++++- + src/pybind/rgw/setup.py | 6 +++++- + 4 files changed, 20 insertions(+), 4 deletions(-) + +Index: ceph-18.2.0/src/pybind/cephfs/setup.py +=================================================================== +--- ceph-18.2.0.orig/src/pybind/cephfs/setup.py ++++ ceph-18.2.0/src/pybind/cephfs/setup.py +@@ -63,9 +63,13 @@ + filter(lambda lib: lib.startswith('-l'), py_libs)] + compiler = new_compiler() + distutils.sysconfig.customize_compiler(compiler) ++ libpl = distutils.sysconfig.get_config_var('LIBPL') ++ sysroot = os.environ.get('STAGING_DIR_HOST') ++ if not libpl.startswith(sysroot): ++ libpl = sysroot + libpl + return dict( + include_dirs=[distutils.sysconfig.get_python_inc()], +- library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), ++ library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], + libraries=libs + py_libs, + extra_compile_args=filter_unsupported_flags( + compiler.compiler[0], +Index: ceph-18.2.0/src/pybind/rados/setup.py +=================================================================== +--- ceph-18.2.0.orig/src/pybind/rados/setup.py ++++ ceph-18.2.0/src/pybind/rados/setup.py +@@ -62,9 +62,13 @@ + filter(lambda lib: lib.startswith('-l'), py_libs)] + compiler = new_compiler() + distutils.sysconfig.customize_compiler(compiler) ++ libpl = distutils.sysconfig.get_config_var('LIBPL') ++ sysroot = os.environ.get('STAGING_DIR_HOST') ++ if not libpl.startswith(sysroot): ++ libpl = sysroot + libpl + return dict( + include_dirs=[distutils.sysconfig.get_python_inc()], +- library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), ++ library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], + libraries=libs + py_libs, + extra_compile_args=filter_unsupported_flags( + compiler.compiler[0], +Index: ceph-18.2.0/src/pybind/rbd/setup.py +=================================================================== +--- ceph-18.2.0.orig/src/pybind/rbd/setup.py ++++ ceph-18.2.0/src/pybind/rbd/setup.py +@@ -63,9 +63,13 @@ + filter(lambda lib: lib.startswith('-l'), py_libs)] + compiler = new_compiler() + distutils.sysconfig.customize_compiler(compiler) ++ libpl = distutils.sysconfig.get_config_var('LIBPL') ++ sysroot = os.environ.get('STAGING_DIR_HOST') ++ if not libpl.startswith(sysroot): ++ libpl = sysroot + libpl + return dict( + include_dirs=[distutils.sysconfig.get_python_inc()], +- library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), ++ library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], + libraries=libs + py_libs, + extra_compile_args=filter_unsupported_flags( + compiler.compiler[0], +Index: ceph-18.2.0/src/pybind/rgw/setup.py +=================================================================== +--- ceph-18.2.0.orig/src/pybind/rgw/setup.py ++++ ceph-18.2.0/src/pybind/rgw/setup.py +@@ -64,9 +64,13 @@ + filter(lambda lib: lib.startswith('-l'), py_libs)] + compiler = new_compiler() + distutils.sysconfig.customize_compiler(compiler) ++ libpl = distutils.sysconfig.get_config_var('LIBPL') ++ sysroot = os.environ.get('STAGING_DIR_HOST') ++ if not libpl.startswith(sysroot): ++ libpl = sysroot + libpl + return dict( + include_dirs=[distutils.sysconfig.get_python_inc()], +- library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), ++ library_dirs=[distutils.sysconfig.get_config_var('LIBDIR'), libpl], + libraries=libs + py_libs, + extra_compile_args=filter_unsupported_flags( + compiler.compiler[0], diff --git a/recipes-extended/ceph/ceph/0001-rgw-add-executor-type-for-basic_waitable_timers.patch b/recipes-extended/ceph/ceph/0001-rgw-add-executor-type-for-basic_waitable_timers.patch deleted file mode 100644 index b7a9dd96..00000000 --- a/recipes-extended/ceph/ceph/0001-rgw-add-executor-type-for-basic_waitable_timers.patch +++ /dev/null @@ -1,58 +0,0 @@ -From f1651b8c509d60787d10c4115e29fecfd2da237c Mon Sep 17 00:00:00 2001 -From: Casey Bodley <cbodley@redhat.com> -Date: Tue, 23 Apr 2019 15:41:45 -0400 -Subject: [PATCH] rgw: add executor type for basic_waitable_timers - -as of boost 1.70, the timer no longer depends on io_context directly, -so we have to specify its executor as a template parameter - -Signed-off-by: Casey Bodley <cbodley@redhat.com> - -Upstream-Status: Backport [f1651b8c509d60787d10c4115e29fecfd2da237c] - -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - src/rgw/rgw_dmclock_async_scheduler.h | 5 +++++ - src/rgw/rgw_reshard.h | 9 ++++++++- - 2 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/src/rgw/rgw_dmclock_async_scheduler.h b/src/rgw/rgw_dmclock_async_scheduler.h -index 70487a5253..1d454acd2e 100644 ---- a/src/rgw/rgw_dmclock_async_scheduler.h -+++ b/src/rgw/rgw_dmclock_async_scheduler.h -@@ -82,7 +82,12 @@ class AsyncScheduler : public md_config_obs_t, public Scheduler { - using Completion = async::Completion<Signature, async::AsBase<Request>>; - - using Clock = ceph::coarse_real_clock; -+#if BOOST_VERSION < 107000 - using Timer = boost::asio::basic_waitable_timer<Clock>; -+#else -+ using Timer = boost::asio::basic_waitable_timer<Clock, -+ boost::asio::wait_traits<Clock>, executor_type>; -+#endif - Timer timer; //< timer for the next scheduled request - - CephContext *const cct; -diff --git a/src/rgw/rgw_reshard.h b/src/rgw/rgw_reshard.h -index d99a6ff68d..213fc238d2 100644 ---- a/src/rgw/rgw_reshard.h -+++ b/src/rgw/rgw_reshard.h -@@ -183,7 +183,14 @@ class RGWReshardWait { - ceph::condition_variable cond; - - struct Waiter : boost::intrusive::list_base_hook<> { -- boost::asio::basic_waitable_timer<Clock> timer; -+#if BOOST_VERSION < 107000 -+ using Timer = boost::asio::basic_waitable_timer<Clock>; -+#else -+ using Executor = boost::asio::io_context::executor_type; -+ using Timer = boost::asio::basic_waitable_timer<Clock, -+ boost::asio::wait_traits<Clock>, Executor>; -+#endif -+ Timer timer; - explicit Waiter(boost::asio::io_context& ioc) : timer(ioc) {} - }; - boost::intrusive::list<Waiter> waiters; --- -2.21.0 - diff --git a/recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch b/recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch deleted file mode 100644 index d18e00a1..00000000 --- a/recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch +++ /dev/null @@ -1,67 +0,0 @@ -Backport patch from upstream and update context to fix compile error: - -| /path/to/tmp-glibc/work/core2-64-wrs-linux/ceph/14.2.6-r0/ceph-14.2.6/src/rgw/rgw_asio_frontend.cc:165:38: error: 'class boost::asio::basic_socket<boost::asio::ip::tcp, boost::asio::executor>' has no member named 'get_io_context' -| 165 | auto y = optional_yield{socket.get_io_context(), yield}; -| | ~~~~~~~^~~~~~~~~~~~~~ - -Upstream-Status: Backport [https://github.com/ceph/ceph/commit/064f142] - -Signed-off-by: Kai Kang <kai.kang@windriver.com> - -From 064f142746ae97f54865069cdacf5aae2b1b14f6 Mon Sep 17 00:00:00 2001 -From: Casey Bodley <cbodley@redhat.com> -Date: Tue, 23 Apr 2019 15:40:01 -0400 -Subject: [PATCH] rgw: beast handle_connection() takes io_context - -as of boost 1.70, the socket no longer has a get_io_context(), so we -have to pass it in as an argument - -Signed-off-by: Casey Bodley <cbodley@redhat.com> ---- - src/rgw/rgw_asio_frontend.cc | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc -index 0e1e09a..f7c13e1 100644 ---- a/src/rgw/rgw_asio_frontend.cc -+++ b/src/rgw/rgw_asio_frontend.cc -@@ -84,7 +84,8 @@ class StreamIO : public rgw::asio::ClientIO { - using SharedMutex = ceph::async::SharedMutex<boost::asio::io_context::executor_type>; - - template <typename Stream> --void handle_connection(RGWProcessEnv& env, Stream& stream, -+void handle_connection(boost::asio::io_context& context, -+ RGWProcessEnv& env, Stream& stream, - parse_buffer& buffer, bool is_ssl, - SharedMutex& pause_mutex, - rgw::dmclock::Scheduler *scheduler, -@@ -161,7 +162,7 @@ void handle_connection(RGWProcessEnv& env, Stream& stream, - rgw::io::add_conlen_controlling( - &real_client)))); - RGWRestfulIO client(cct, &real_client_io); -- auto y = optional_yield{socket.get_io_context(), yield}; -+ auto y = optional_yield{context, yield}; - process_request(env.store, env.rest, &req, env.uri_prefix, - *env.auth_registry, &client, env.olog, y, scheduler); - } -@@ -605,7 +606,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec) - return; - } - buffer->consume(bytes); -- handle_connection(env, stream, *buffer, true, pause_mutex, -+ handle_connection(context, env, stream, *buffer, true, pause_mutex, - scheduler.get(), ec, yield); - if (!ec) { - // ssl shutdown (ignoring errors) -@@ -623,7 +624,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec) - auto c = connections.add(conn); - auto buffer = std::make_unique<parse_buffer>(); - boost::system::error_code ec; -- handle_connection(env, s, *buffer, false, pause_mutex, -+ handle_connection(context, env, s, *buffer, false, pause_mutex, - scheduler.get(), ec, yield); - s.shutdown(tcp::socket::shutdown_both, ec); - }); --- -2.20.1 - diff --git a/recipes-extended/ceph/ceph/0006-rocksdb-build-with-rocksdb-7.y.z.patch b/recipes-extended/ceph/ceph/0006-rocksdb-build-with-rocksdb-7.y.z.patch new file mode 100644 index 00000000..c7ca704f --- /dev/null +++ b/recipes-extended/ceph/ceph/0006-rocksdb-build-with-rocksdb-7.y.z.patch @@ -0,0 +1,109 @@ +From 06f23837c757ff7a8aa8db4e5965e25e9ca69f45 Mon Sep 17 00:00:00 2001 +From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com> +Date: Mon, 23 May 2022 07:41:26 -0400 +Subject: [PATCH 6/6] rocksdb: build with rocksdb-7.y.z + +RocksDB 7, specifically 7.2.2 has landed in Fedora 37/rawhide. + +https://tracker.ceph.com/issues/55730 + +Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> +(cherry picked from commit eea10281e6f4078f261b05b6bd9c9c9aec129201) + +Upstream-Status: Backport [be3ca10e60ade9dbe7d3e5cb018f32c7cc97e2ed] + +Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> +--- + src/kv/RocksDBStore.cc | 7 ++----- + src/kv/rocksdb_cache/BinnedLRUCache.cc | 2 +- + src/kv/rocksdb_cache/BinnedLRUCache.h | 2 +- + src/kv/rocksdb_cache/ShardedCache.cc | 2 +- + src/kv/rocksdb_cache/ShardedCache.h | 4 ++-- + 5 files changed, 7 insertions(+), 10 deletions(-) + +diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc +index 328277e5..115d28fc 100644 +--- a/src/kv/RocksDBStore.cc ++++ b/src/kv/RocksDBStore.cc +@@ -728,19 +728,16 @@ int64_t RocksDBStore::estimate_prefix_size(const string& prefix, + { + auto cf = get_cf_handle(prefix); + uint64_t size = 0; +- uint8_t flags = +- //rocksdb::DB::INCLUDE_MEMTABLES | // do not include memtables... +- rocksdb::DB::INCLUDE_FILES; + if (cf) { + string start = key_prefix + string(1, '\x00'); + string limit = key_prefix + string("\xff\xff\xff\xff"); + rocksdb::Range r(start, limit); +- db->GetApproximateSizes(cf, &r, 1, &size, flags); ++ db->GetApproximateSizes(cf, &r, 1, &size); + } else { + string start = combine_strings(prefix , key_prefix); + string limit = combine_strings(prefix , key_prefix + "\xff\xff\xff\xff"); + rocksdb::Range r(start, limit); +- db->GetApproximateSizes(default_cf, &r, 1, &size, flags); ++ db->GetApproximateSizes(default_cf, &r, 1, &size); + } + return size; + } +diff --git a/src/kv/rocksdb_cache/BinnedLRUCache.cc b/src/kv/rocksdb_cache/BinnedLRUCache.cc +index 1e6ba7af..c4918355 100644 +--- a/src/kv/rocksdb_cache/BinnedLRUCache.cc ++++ b/src/kv/rocksdb_cache/BinnedLRUCache.cc +@@ -531,7 +531,7 @@ void BinnedLRUCache::DisownData() { + #endif // !__SANITIZE_ADDRESS__ + } + +-#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22) ++#if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22)) + DeleterFn BinnedLRUCache::GetDeleter(Handle* handle) const + { + return reinterpret_cast<const BinnedLRUHandle*>(handle)->deleter; +diff --git a/src/kv/rocksdb_cache/BinnedLRUCache.h b/src/kv/rocksdb_cache/BinnedLRUCache.h +index ba0c2720..266667f0 100644 +--- a/src/kv/rocksdb_cache/BinnedLRUCache.h ++++ b/src/kv/rocksdb_cache/BinnedLRUCache.h +@@ -309,7 +309,7 @@ class BinnedLRUCache : public ShardedCache { + virtual size_t GetCharge(Handle* handle) const override; + virtual uint32_t GetHash(Handle* handle) const override; + virtual void DisownData() override; +-#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22) ++#if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22)) + virtual DeleterFn GetDeleter(Handle* handle) const override; + #endif + // Retrieves number of elements in LRU, for unit test purpose only +diff --git a/src/kv/rocksdb_cache/ShardedCache.cc b/src/kv/rocksdb_cache/ShardedCache.cc +index 6cbd89ad..7d160f9c 100644 +--- a/src/kv/rocksdb_cache/ShardedCache.cc ++++ b/src/kv/rocksdb_cache/ShardedCache.cc +@@ -109,7 +109,7 @@ size_t ShardedCache::GetPinnedUsage() const { + return usage; + } + +-#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22) ++#if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22)) + DeleterFn ShardedCache::GetDeleter(Handle* handle) const + { + uint32_t hash = GetHash(handle); +diff --git a/src/kv/rocksdb_cache/ShardedCache.h b/src/kv/rocksdb_cache/ShardedCache.h +index f98421a0..855912d7 100644 +--- a/src/kv/rocksdb_cache/ShardedCache.h ++++ b/src/kv/rocksdb_cache/ShardedCache.h +@@ -83,11 +83,11 @@ class ShardedCache : public rocksdb::Cache, public PriorityCache::PriCache { + virtual size_t GetUsage(rocksdb::Cache::Handle* handle) const override; + virtual size_t GetPinnedUsage() const override; + virtual size_t GetCharge(Handle* handle) const = 0; +-#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22) ++#if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22)) + virtual DeleterFn GetDeleter(Handle* handle) const override; + #endif + virtual void DisownData() override = 0; +-#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22) ++#if (ROCKSDB_MAJOR >= 7 || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR >= 22)) + virtual void ApplyToAllEntries( + const std::function<void(const rocksdb::Slice& key, void* value, size_t charge, + DeleterFn deleter)>& callback, +-- +2.33.0 + diff --git a/recipes-extended/ceph/ceph_14.2.7.bb b/recipes-extended/ceph/ceph_18.2.2.bb index 18df8b4b..e6c44188 100644 --- a/recipes-extended/ceph/ceph_14.2.7.bb +++ b/recipes-extended/ceph/ceph_18.2.2.bb @@ -1,32 +1,40 @@ SUMMARY = "User space components of the Ceph file system" -LICENSE = "LGPLv2.1 & GPLv2 & Apache-2.0 & MIT" +LICENSE = "LGPL-2.1-only & GPL-2.0-only & Apache-2.0 & MIT" LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \ file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING;md5=601c21a554d728c3038ca292b83b8af0 \ + file://COPYING;md5=5351120989d78252e65dc1a2a92e3617 \ " -inherit cmake python3native python3-dir systemd +inherit cmake pkgconfig python3native python3-dir systemd useradd # Disable python pybind support for ceph temporary, when corss compiling pybind, # pybind mix cmake and python setup environment, would case a lot of errors. SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ - file://0001-ceph-fix-build-errors-for-cross-compile.patch \ + file://0001-fix-host-library-paths-were-used.patch \ file://ceph.conf \ - file://0001-rgw-add-executor-type-for-basic_waitable_timers.patch \ - file://0001-common-rgw-workaround-for-boost-1.72.patch \ - file://0001-rgw-beast-handle_connection-takes-io_context.patch \ + file://0001-avoid-to_string-error.patch \ + file://0001-delete-install-layout-deb.patch \ + file://0001-cephadm-build.py-avoid-using-python3-from-sysroot-wh.patch \ " -SRC_URI[md5sum] = "8100ce9820714554e6d4717f6f0aa4da" -SRC_URI[sha256sum] = "9606dc80553bd97e138cd80b6bbbc117b6b26c66248e490a4e49fc0d4d853862" +SRC_URI[sha256sum] = "e70bb5246b4a5d7aa78eb548677a05cc21d0d47945ba2937fddc7511134ffb57" -DEPENDS = "boost bzip2 curl expat gperf-native \ - keyutils libaio libibverbs lz4 \ - nspr nss \ +DEPENDS = "boost bzip2 curl cryptsetup expat gperf-native \ + keyutils libaio libibverbs lua lz4 \ + nspr nss ninja-native \ oath openldap openssl \ - python3 python3-cython-native rabbitmq-c rocksdb snappy udev \ - valgrind xfsprogs zlib \ + python3 python3-native python3-cython-native python3-pyyaml-native \ + rabbitmq-c rocksdb snappy thrift udev \ + valgrind xfsprogs zlib libgcc zstd re2 \ " -SYSTEMD_SERVICE_${PN} = " \ + + +OECMAKE_C_COMPILER = "${@oecmake_map_compiler('CC', d)[0]} --sysroot=${RECIPE_SYSROOT}" +OECMAKE_CXX_COMPILER = "${@oecmake_map_compiler('CXX', d)[0]} --sysroot=${RECIPE_SYSROOT}" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --user-group --home-dir /var/lib/ceph --shell /sbin/nologin ceph" + +SYSTEMD_SERVICE:${PN} = " \ ceph-radosgw@.service \ ceph-radosgw.target \ ceph-mon@.service \ @@ -35,6 +43,8 @@ SYSTEMD_SERVICE_${PN} = " \ ceph-mds.target \ ceph-osd@.service \ ceph-osd.target \ + cephfs-mirror@.service \ + cephfs-mirror.target \ ceph.target \ ceph-rbd-mirror@.service \ ceph-rbd-mirror.target \ @@ -43,49 +53,68 @@ SYSTEMD_SERVICE_${PN} = " \ ceph-mgr.target \ ceph-crash.service \ rbdmap.service \ + ceph-immutable-object-cache@.service \ + ceph-immutable-object-cache.target \ " -OECMAKE_GENERATOR = "Unix Makefiles" -EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \ +EXTRA_OECMAKE += "-DWITH_MANPAGE=OFF \ + -DWITH_JAEGER=OFF \ + -DWITH_SYSTEM_ZSTD=ON \ -DWITH_FUSE=OFF \ -DWITH_SPDK=OFF \ -DWITH_LEVELDB=OFF \ -DWITH_LTTNG=OFF \ -DWITH_BABELTRACE=OFF \ -DWITH_TESTS=OFF \ + -DWITH_RADOSGW_SELECT_PARQUET=OFF \ + -DWITH_RADOSGW_ARROW_FLIGHT=OFF \ -DWITH_MGR=OFF \ -DWITH_MGR_DASHBOARD_FRONTEND=OFF \ -DWITH_SYSTEM_BOOST=ON \ -DWITH_SYSTEM_ROCKSDB=ON \ -DWITH_RDMA=OFF \ -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \ - -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 \ - -DPYTHON_EXECUTABLE=${PYTHON} \ -" + -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \ + -DWITH_REENTRANT_STRSIGNAL=ON \ + -DWITH_PYTHON3=3.12 \ + -DPYTHON_DESIRED=3 \ + -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${WORKDIR}/toolchain.cmake \ + " -do_configure_prepend () { +do_configure:prepend () { echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake echo "set( PYTHON_SITEPACKAGES_DIR \"${PYTHON_SITEPACKAGES_DIR}\" )" >> ${WORKDIR}/toolchain.cmake + # echo "set( CMAKE_C_COMPILER_WORKS TRUE)" >> ${WORKDIR}/toolchain.cmake + # echo "set( CMAKE_CXX_COMPILER_FORCED TRUE)" >> ${WORKDIR}/toolchain.cmake + echo "set( CMAKE_C_COMPILER_FORCED TRUE )" >> ${WORKDIR}/toolchain.cmake } -do_install_append () { +do_compile:prepend() { + export BUILD_DOC=1 +} + +do_install:prepend() { + export BUILD_DOC=1 +} + +do_install:append () { sed -i -e 's:^#!/usr/bin/python$:&3:' \ -e 's:${WORKDIR}.*python3:${bindir}/python3:' \ ${D}${bindir}/ceph ${D}${bindir}/ceph-crash \ - ${D}${bindir}/ceph-volume ${D}${bindir}/ceph-volume-systemd + ${D}${bindir}/cephfs-top \ + ${D}${sbindir}/ceph-volume ${D}${sbindir}/ceph-volume-systemd find ${D} -name SOURCES.txt | xargs sed -i -e 's:${WORKDIR}::' install -d ${D}${sysconfdir}/ceph install -m 644 ${WORKDIR}/ceph.conf ${D}${sysconfdir}/ceph/ install -d ${D}${systemd_unitdir} - mv ${D}${libexecdir}/systemd/system ${D}${systemd_unitdir} mv ${D}${libexecdir}/ceph/ceph-osd-prestart.sh ${D}${libdir}/ceph mv ${D}${libexecdir}/ceph/ceph_common.sh ${D}${libdir}/ceph # WITH_FUSE is set to OFF, remove ceph-fuse related units rm ${D}${systemd_unitdir}/system/ceph-fuse.target ${D}${systemd_unitdir}/system/ceph-fuse@.service } -do_install_append_class-target () { +do_install:append:class-target () { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/tmpfiles.d echo "d /var/lib/ceph/crash/posted 0755 root root - -" > ${D}${sysconfdir}/tmpfiles.d/ceph-placeholder.conf @@ -97,40 +126,52 @@ do_install_append_class-target () { fi } -pkg_postinst_${PN}() { +pkg_postinst:${PN}() { if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then ${sysconfdir}/init.d/populate-volatile.sh update fi } -FILES_${PN} += "\ +FILES:${PN} += "\ ${libdir}/rados-classes/*.so.* \ ${libdir}/ceph/compressor/*.so \ ${libdir}/rados-classes/*.so \ ${libdir}/ceph/*.so \ + ${libdir}/libcephsqlite.so \ " -FILES_${PN} += " \ +FILES:${PN} += " \ /etc/tmpfiles.d/ceph-placeholder.conf \ /etc/default/volatiles/99_ceph-placeholder \ " -FILES_${PN}-python = "\ +FILES:${PN}-dev = " \ + ${includedir} \ + ${libdir}/libcephfs.so \ + ${libdir}/librados*.so \ + ${libdir}/librbd.so \ + ${libdir}/librgw.so \ +" + +FILES:${PN}-python = "\ ${PYTHON_SITEPACKAGES_DIR}/* \ " -RDEPENDS_${PN} += "\ +RDEPENDS:${PN} += "\ python3-core \ python3-misc \ python3-modules \ python3-prettytable \ ${PN}-python \ + gawk \ + bash \ " COMPATIBLE_HOST = "(x86_64).*" PACKAGES += " \ ${PN}-python \ " -INSANE_SKIP_${PN}-python += "ldflags" -INSANE_SKIP_${PN} += "dev-so" +INSANE_SKIP:${PN}-python += "ldflags buildpaths" +INSANE_SKIP:${PN} += "dev-so" +INSANE_SKIP:${PN}-dbg += "buildpaths" CCACHE_DISABLE = "1" CVE_PRODUCT = "ceph ceph_storage ceph_storage_mon ceph_storage_osd" |