aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/ceph/ceph
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/ceph/ceph')
-rw-r--r--recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch73
-rw-r--r--recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch183
-rw-r--r--recipes-extended/ceph/ceph/0001-cephadm-build.py-avoid-using-python3-from-sysroot-wh.patch43
-rw-r--r--recipes-extended/ceph/ceph/0001-common-rgw-workaround-for-boost-1.72.patch62
-rw-r--r--recipes-extended/ceph/ceph/0001-delete-install-layout-deb.patch39
-rw-r--r--recipes-extended/ceph/ceph/0001-fix-host-library-paths-were-used.patch93
-rw-r--r--recipes-extended/ceph/ceph/0001-rgw-add-executor-type-for-basic_waitable_timers.patch58
-rw-r--r--recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch67
-rw-r--r--recipes-extended/ceph/ceph/0006-rocksdb-build-with-rocksdb-7.y.z.patch109
9 files changed, 357 insertions, 370 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
+