From eef74a139b437531b81296927754cada5207c39e Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 2 Jan 2025 13:27:48 +0000 Subject: [PATCH 1/2] ceph: add upstream patch for GCC 14 Closes: #369777 --- pkgs/tools/filesystems/ceph/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index ddaa688be613..df4f6c745da0 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -358,6 +358,12 @@ rec { stripLen = 1; extraPrefix = "src/s3select/"; }) + + (fetchpatch2 { + name = "ceph-gcc-14.patch"; + url = "https://github.com/ceph/ceph/commit/0eace4ea9ea42412d4d6a16d24a8660642e41173.patch?full_index=1"; + hash = "sha256-v+AExf/npe4NgmVl2j6o8860nwF9YuzC/vR0TWxTrIE="; + }) ]; nativeBuildInputs = [ From 047670d138533b04114312f44cdc8e46ed872cad Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 2 Jan 2025 13:32:49 +0000 Subject: [PATCH 2/2] ceph: add patches for Boost 1.86 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently this is the only package keeping Boost 1.82 around; upstream install 1.85 on the development branch and have merged patches for 1.86 compatibility, so let’s unpin it and deal with pinning again if we run into compilation errors in the future. All but one patch has already been merged upstream. --- pkgs/tools/filesystems/ceph/boost-1.85.patch | 69 +++++++++++++++++++ .../ceph/boost-1.86-PyModule.patch | 20 ++++++ pkgs/tools/filesystems/ceph/default.nix | 20 +++++- 3 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 pkgs/tools/filesystems/ceph/boost-1.85.patch create mode 100644 pkgs/tools/filesystems/ceph/boost-1.86-PyModule.patch diff --git a/pkgs/tools/filesystems/ceph/boost-1.85.patch b/pkgs/tools/filesystems/ceph/boost-1.85.patch new file mode 100644 index 000000000000..575bc94acc5f --- /dev/null +++ b/pkgs/tools/filesystems/ceph/boost-1.85.patch @@ -0,0 +1,69 @@ +Backported from . + +Original author: Adam Emerson + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bbd63a6a006..bbd7c737feb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -666,7 +666,7 @@ option(WITH_SYSTEM_BOOST "require and build with system Boost" OFF) + # Boost::thread depends on Boost::atomic, so list it explicitly. + set(BOOST_COMPONENTS + atomic chrono thread system regex random program_options date_time +- iostreams context coroutine) ++ iostreams context coroutine url) + set(BOOST_HEADER_COMPONENTS container) + + if(WITH_MGR) +diff --git a/src/mds/BoostUrlImpl.cc b/src/mds/BoostUrlImpl.cc +deleted file mode 100644 +index 479f4c6d75d..00000000000 +--- a/src/mds/BoostUrlImpl.cc ++++ /dev/null +@@ -1,8 +0,0 @@ +-/* +- * https://www.boost.org/doc/libs/1_82_0/libs/url/doc/html/url/overview.html#url.overview.requirements +- * +- * To use the library as header-only; that is, to eliminate the requirement +- * to link a program to a static or dynamic Boost.URL library, +- * simply place the following line in exactly one source file in your project. +- */ +-#include +diff --git a/src/mds/CMakeLists.txt b/src/mds/CMakeLists.txt +index 0c6c31a3c51..5c98db76e4d 100644 +--- a/src/mds/CMakeLists.txt ++++ b/src/mds/CMakeLists.txt +@@ -45,12 +45,12 @@ set(mds_srcs + QuiesceDbManager.cc + QuiesceAgent.cc + MDSRankQuiesce.cc +- BoostUrlImpl.cc + ${CMAKE_SOURCE_DIR}/src/common/TrackedOp.cc + ${CMAKE_SOURCE_DIR}/src/common/MemoryModel.cc + ${CMAKE_SOURCE_DIR}/src/osdc/Journaler.cc + ${CMAKE_SOURCE_DIR}/src/mgr/MDSPerfMetricTypes.cc) + add_library(mds STATIC ${mds_srcs}) + target_link_libraries(mds PRIVATE ++ Boost::url + heap_profiler cpu_profiler osdc ${LUA_LIBRARIES}) + target_include_directories(mds PRIVATE "${LUA_INCLUDE_DIR}") +diff --git a/src/test/mds/CMakeLists.txt b/src/test/mds/CMakeLists.txt +index f80abe75083..18ebb648e68 100644 +--- a/src/test/mds/CMakeLists.txt ++++ b/src/test/mds/CMakeLists.txt +@@ -18,11 +18,10 @@ target_link_libraries(unittest_mds_sessionfilter mds osdc ceph-common global ${B + add_executable(unittest_mds_quiesce_db + TestQuiesceDb.cc + ../../../src/mds/QuiesceDbManager.cc +- ../../../src/mds/BoostUrlImpl.cc + $ + ) + add_ceph_unittest(unittest_mds_quiesce_db) +-target_link_libraries(unittest_mds_quiesce_db ceph-common global) ++target_link_libraries(unittest_mds_quiesce_db ceph-common global Boost::url) + + # unittest_mds_quiesce_agent + add_executable(unittest_mds_quiesce_agent +-- +2.47.0 + diff --git a/pkgs/tools/filesystems/ceph/boost-1.86-PyModule.patch b/pkgs/tools/filesystems/ceph/boost-1.86-PyModule.patch new file mode 100644 index 000000000000..631844081d4a --- /dev/null +++ b/pkgs/tools/filesystems/ceph/boost-1.86-PyModule.patch @@ -0,0 +1,20 @@ +Excerpted from . + +Original author: Bazaah + +diff --git a/src/mgr/PyModule.cc b/src/mgr/PyModule.cc +index 084cf3ffc1e..010a1177a88 100644 +--- a/src/mgr/PyModule.cc ++++ b/src/mgr/PyModule.cc +@@ -36,6 +36,11 @@ std::string PyModule::mgr_store_prefix = "mgr/"; + + // Courtesy of http://stackoverflow.com/questions/1418015/how-to-get-python-exception-text + #define BOOST_BIND_GLOBAL_PLACEHOLDERS ++// Fix instances of "'BOOST_PP_ITERATION_02' was not declared in this scope; did you mean 'BOOST_PP_ITERATION_05'" ++// and related macro error bullshit that spans 300 lines of errors ++// ++// Apparently you can't include boost/python stuff _and_ have this header defined ++#undef BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + // Boost apparently can't be bothered to fix its own usage of its own + // deprecated features. + #include diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index df4f6c745da0..911fbba3e2a2 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -26,7 +26,7 @@ # Runtime dependencies arrow-cpp, babeltrace, - boost182, # using the version installed by ceph's `install-deps.sh` + boost, bzip2, cryptsetup, cunit, @@ -289,7 +289,7 @@ let }; }; - boost = boost182.override { + boost' = boost.override { enablePython = true; inherit python; }; @@ -364,6 +364,20 @@ rec { url = "https://github.com/ceph/ceph/commit/0eace4ea9ea42412d4d6a16d24a8660642e41173.patch?full_index=1"; hash = "sha256-v+AExf/npe4NgmVl2j6o8860nwF9YuzC/vR0TWxTrIE="; }) + + ./boost-1.85.patch + + (fetchpatch2 { + name = "ceph-boost-1.86-uuid.patch"; + url = "https://github.com/ceph/ceph/commit/01306208eac492ee0e67bff143fc32d0551a2a6f.patch?full_index=1"; + hash = "sha256-OnDrr72inzGXXYxPFQevsRZImSvI0uuqFHqtFU2dPQE="; + }) + + # See: + # * + # * + # * + ./boost-1.86-PyModule.patch ]; nativeBuildInputs = [ @@ -391,7 +405,7 @@ rec { ++ [ arrow-cpp babeltrace - boost + boost' bzip2 # Adding `ceph-python-env` here adds the env's `site-packages` to `PYTHONPATH` during the build. # This is important, otherwise the build system may not find the Python deps and then