Skip to contentSkip to conversation

ceph: fix do_compile/do_install failures

PATCH New [email protected] 1 participant 1 message Mar 14, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ceph: fix do_compile/do_install failures

From: Chen Qi <[email protected]>

1. OECMAKE_C/CXX_COMPILER needs to have sysroot setting in it, because ceph's cmake files are using it to construct PY_CC. Without it, files such as stdlib.h cannot be found.
2. re2 is added to deps. Seems no way to disable it.
3. 0001-ceph-fix-build-errors-for-cross-compile.patch is dropped. It's useless and problematic for new version.
4. 0001-cmake-add-support-for-python3.11.patch is dropped as it's not needed anymore.
5. 0001-avoid-to_string-error.patch is added to fix build error, maybe caused by boost version incompatibility.
6. Some cleanups.
7. A few more options are set.
8. BUILD_DOC=1 is exported so that check_sanity() causes compilation error. This is a workaround and may need further visit in the future.
9. Delete the conditional check for /etc/debian_version which adds '--install-layout deb' and causes the following error.

     error: option --install-layout not recognized

The patch is 0001-delete-install-layout-deb.patch.
10. ceph-volume[-systemd] are now in sbin.
11. cephfs-mirror units are added to avoid package QA issue.
12. cephfs-top is seded to fix incorrect shebang.
13. Ensure libcephsqlite.so is packaged into ceph instead of ceph-dev.
14. Add bash to RDEPENDS as rbdmap needs it.
15. Skip buildpaths QA.
16. Add ceph user/group, because ceph-crash needs it in drop_privilege function call.
17. Patch the build.py which creates the cephadm zipapp to ensure it uses the correct interpreter. We cannot simply use 'sed' against the cephadm as it's zip format.

Runtime tests:
cephfs-top --help
cephadm --help
systemctl status rbdmap
systemctl --failed

---
 .../ceph/0001-avoid-to_string-error.patch     |  73 +++++++
 ...h-fix-build-errors-for-cross-compile.patch | 189 ------------------
 ...-avoid-using-python3-from-sysroot-wh.patch |  43 ++++
 ...001-cmake-add-support-for-python3.11.patch |  31 ---
 .../ceph/0001-delete-install-layout-deb.patch |  37 ++++
 recipes-extended/ceph/ceph_18.2.0.bb          |  79 ++++----
 6 files changed, 195 insertions(+), 257 deletions(-)
 create mode 100644 recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch
 delete mode 100644 recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch
 create mode 100644 recipes-extended/ceph/ceph/0001-cephadm-build.py-avoid-using-python3-from-sysroot-wh.patch
 delete mode 100644 recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.11.patch
 create mode 100644 recipes-extended/ceph/ceph/0001-delete-install-layout-deb.patch
recipes-extended/ceph/ceph/0001-avoid-to_string-error.patch new file +73 -0
new file mode 100644
index 00000000..0b4fc984
@@ -0,0 +1,73 @@
+From f807220d13adc0656c30d3207d11c70360b88d06 Mon Sep 17 00:00:00 2001
+From: Chen Qi <[email protected]>
+Date: Wed, 13 Mar 2024 03:14:55 -0700
+Subject: [PATCH] avoid to_string error
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ 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
+
recipes-extended/ceph/ceph/0001-ceph-fix-build-errors-for-cross-compile.patch deleted +0 -189

189 lines not on this page · raw message

recipes-extended/ceph/ceph/0001-cephadm-build.py-avoid-using-python3-from-sysroot-wh.patch new file +43 -0

43 lines not on this page · raw message

recipes-extended/ceph/ceph/0001-cmake-add-support-for-python3.11.patch deleted +0 -31
deleted file mode 100644
index c72c91b2..00000000
@@ -1,31 +0,0 @@
-From 1060f2e4362ebd6db23870d442dcd158d219ee92 Mon Sep 17 00:00:00 2001
-From: Yanfei Xu <[email protected]>
-Date: Tue, 10 Nov 2020 17:17:30 +0800
-Subject: [PATCH] cmake: add support for python 3.9 and 3.10
-
-add support for python3.9.
-
-Signed-off-by: Yanfei Xu <[email protected]>
-
-Add support for python 3.10.
-
-Upstream-Status: Submitted [https://github.com/ceph/ceph/pull/43630]
-
-Signed-off-by: Kai Kang <[email protected]>
----
- cmake/modules/FindPython/Support.cmake | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: ceph-18.2.0/cmake/modules/FindPython/Support.cmake
-===================================================================
---- ceph-18.2.0.orig/cmake/modules/FindPython/Support.cmake
-+++ ceph-18.2.0/cmake/modules/FindPython/Support.cmake
-@@ -17,7 +17,7 @@
-   message (FATAL_ERROR "FindPython: INTERNAL ERROR")
- endif()
- if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
--  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)
-+  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)
- elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
-   set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
- else()
recipes-extended/ceph/ceph/0001-delete-install-layout-deb.patch new file +37 -0
new file mode 100644
index 00000000..91eacfa9
@@ -0,0 +1,37 @@
+From 903bb882a44eb5567f8b1fc7f7c4857c2f03579d Mon Sep 17 00:00:00 2001
+From: Chen Qi <[email protected]>
+Date: Wed, 13 Mar 2024 03:41:47 -0700
+Subject: [PATCH] delete install-layout=deb
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ 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
+
recipes-extended/ceph/ceph_18.2.0.bb +42 -37

161 lines not on this page · raw message

Signature · 1 line
2.42.0