From 515cc1e59d78fe4c70f04d9212c35249120d5789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20F=C3=B6rster?= Date: Sat, 1 Jun 2024 03:51:38 +0200 Subject: [PATCH] [dev-db/mongodb] WIP, 6 still broken --- .../mongodb/files/mongodb-4.4.8-gcc-13.patch | 25 ---- .../files/mongodb-5.0.16-arm64-assert.patch | 16 ++ .../files/mongodb-5.0.26-boost-1.85.patch | 139 ++++++++++++++++++ dev-db/mongodb/mongodb-5.0.26.ebuild | 1 + dev-db/mongodb/mongodb-6.0.15.ebuild | 1 + 5 files changed, 157 insertions(+), 25 deletions(-) delete mode 100644 dev-db/mongodb/files/mongodb-4.4.8-gcc-13.patch create mode 100644 dev-db/mongodb/files/mongodb-5.0.16-arm64-assert.patch create mode 100644 dev-db/mongodb/files/mongodb-5.0.26-boost-1.85.patch diff --git a/dev-db/mongodb/files/mongodb-4.4.8-gcc-13.patch b/dev-db/mongodb/files/mongodb-4.4.8-gcc-13.patch deleted file mode 100644 index 00b82ac..0000000 --- a/dev-db/mongodb/files/mongodb-4.4.8-gcc-13.patch +++ /dev/null @@ -1,25 +0,0 @@ -https://cgit.openembedded.org/meta-openembedded-contrib/commit/?id=856c21b061e000640829e158b9bb9e978a974386 - -From 5d8218b8a1b5bc71e2a0cf543a000e194daba599 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 29 Jan 2023 17:15:30 -0800 -Subject: [PATCH] free_mon: Include missing - -gcc 13 moved some includes around and as a result is no -longer transitively included [1]. Explicitly include it -for uintXX_t. - -[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes - -Signed-off-by: Khem Raj ---- a/src/mongo/db/free_mon/free_mon_options.h -+++ b/src/mongo/db/free_mon/free_mon_options.h -@@ -29,6 +29,7 @@ - - #pragma once - -+#include - #include - #include - - diff --git a/dev-db/mongodb/files/mongodb-5.0.16-arm64-assert.patch b/dev-db/mongodb/files/mongodb-5.0.16-arm64-assert.patch new file mode 100644 index 0000000..6a6b9f1 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-5.0.16-arm64-assert.patch @@ -0,0 +1,16 @@ +The upstream patch for this is far too big to backport, so for now, just drop +the assert given it's somewhat harmless compared to not being able to build at all. + +https://jira.mongodb.org/browse/SERVER-65664 +https://bugs.gentoo.org/855128 +--- a/src/mongo/db/stats/counters.h ++++ b/src/mongo/db/stats/counters.h +@@ -221,8 +221,6 @@ private: + AtomicWord requests{0}; + }; + CacheAligned _together{}; +- static_assert(sizeof(decltype(_together)) <= stdx::hardware_constructive_interference_size, +- "cache line spill"); + + CacheAligned> _logicalBytesOut{0}; + diff --git a/dev-db/mongodb/files/mongodb-5.0.26-boost-1.85.patch b/dev-db/mongodb/files/mongodb-5.0.26-boost-1.85.patch new file mode 100644 index 0000000..71da50f --- /dev/null +++ b/dev-db/mongodb/files/mongodb-5.0.26-boost-1.85.patch @@ -0,0 +1,139 @@ +https://bugs.gentoo.org/932251 +https://github.com/mongodb/mongo/commit/f8e4be7f6da71f978b2aa9991febb4c7ad89c903#diff-010644a9158d28e5745762753c7ce454444c9fb9ab4c684e9f2fdcff50c6f539 +https://bugs.gentoo.org/932251#c3 + +--- a/src/mongo/db/initialize_server_global_state.cpp ++++ b/src/mongo/db/initialize_server_global_state.cpp +@@ -34,7 +34,7 @@ + #include "mongo/db/initialize_server_global_state.h" + #include "mongo/db/initialize_server_global_state_gen.h" + +-#include ++#include + #include + #include + #include +@@ -328,7 +328,7 @@ + << "\" should name a file, not a directory."); + } + +- if (!serverGlobalParams.logAppend && boost::filesystem::is_regular(absoluteLogpath)) { ++ if (!serverGlobalParams.logAppend && boost::filesystem::is_regular_file(absoluteLogpath)) { + std::string renameTarget = absoluteLogpath + "." + terseCurrentTimeForFilename(); + boost::system::error_code ec; + boost::filesystem::rename(absoluteLogpath, renameTarget, ec); +--- a/src/mongo/db/startup_warnings_mongod.cpp ++++ b/src/mongo/db/startup_warnings_mongod.cpp +@@ -34,6 +34,7 @@ + #include "mongo/db/startup_warnings_mongod.h" + + #include ++#include + #include + #ifndef _WIN32 + #include +--- a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp ++++ b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp +@@ -55,7 +55,7 @@ + // if called without a fully qualified path it asserts; that makes mongoperf fail. + // so make a warning. need a better solution longer term. + // massert(40389, str::stream() << "Couldn't find parent dir for file: " << file.string(),); +- if (!file.has_branch_path()) { ++ if (!file.has_parent_path()) { + LOGV2(22274, + "warning flushMyDirectory couldn't find parent dir for file: {file}", + "flushMyDirectory couldn't find parent dir for file", +@@ -64,7 +64,7 @@ + } + + +- boost::filesystem::path dir = file.branch_path(); // parent_path in new boosts ++ boost::filesystem::path dir = file.parent_path(); // parent_path in new boosts + + LOGV2_DEBUG(22275, 1, "flushing directory {dir_string}", "dir_string"_attr = dir.string()); + +--- a/src/mongo/db/storage/storage_engine_metadata.cpp ++++ b/src/mongo/db/storage/storage_engine_metadata.cpp +@@ -220,7 +220,7 @@ + // if called without a fully qualified path it asserts; that makes mongoperf fail. + // so make a warning. need a better solution longer term. + // massert(13652, str::stream() << "Couldn't find parent dir for file: " << file.string(),); +- if (!file.has_branch_path()) { ++ if (!file.has_parent_path()) { + LOGV2(22283, + "warning flushMyDirectory couldn't find parent dir for file: {file}", + "flushMyDirectory couldn't find parent dir for file", +@@ -229,7 +229,7 @@ + } + + +- boost::filesystem::path dir = file.branch_path(); // parent_path in new boosts ++ boost::filesystem::path dir = file.parent_path(); // parent_path in new boosts + + LOGV2_DEBUG(22284, 1, "flushing directory {dir_string}", "dir_string"_attr = dir.string()); + +--- a/src/mongo/scripting/engine.cpp ++++ b/src/mongo/scripting/engine.cpp +@@ -35,6 +35,7 @@ + + #include + #include ++#include + + #include "mongo/base/string_data.h" + #include "mongo/client/dbclient_base.h" +--- a/src/mongo/shell/shell_utils_launcher.cpp ++++ b/src/mongo/shell/shell_utils_launcher.cpp +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -947,26 +948,26 @@ + boost::filesystem::directory_iterator i(from); + while (i != end) { + boost::filesystem::path p = *i; +- if (p.leaf() == "metrics.interim" || p.leaf() == "metrics.interim.temp") { ++ if (p.filename() == "metrics.interim" || p.filename() == "metrics.interim.temp") { + // Ignore any errors for metrics.interim* files as these may disappear during copy + boost::system::error_code ec; +- boost::filesystem::copy_file(p, to / p.leaf(), ec); ++ boost::filesystem::copy_file(p, to / p.filename(), ec); + if (ec) { + LOGV2_INFO(22814, + "Skipping copying of file from '{from}' to " + "'{to}' due to: {error}", + "Skipping copying of file due to error" + "from"_attr = p.generic_string(), +- "to"_attr = (to / p.leaf()).generic_string(), ++ "to"_attr = (to / p.filename()).generic_string(), + "error"_attr = ec.message()); + } +- } else if (p.leaf() != "mongod.lock" && p.leaf() != "WiredTiger.lock") { ++ } else if (p.filename() != "mongod.lock" && p.filename() != "WiredTiger.lock") { + if (boost::filesystem::is_directory(p)) { +- boost::filesystem::path newDir = to / p.leaf(); ++ boost::filesystem::path newDir = to / p.filename(); + boost::filesystem::create_directory(newDir); + copyDir(p, newDir); + } else { +- boost::filesystem::copy_file(p, to / p.leaf()); ++ boost::filesystem::copy_file(p, to / p.filename()); + } + } + ++i; +--- a/src/mongo/shell/shell_utils_launcher.h ++++ b/src/mongo/shell/shell_utils_launcher.h +@@ -29,7 +29,7 @@ + + #pragma once + +-#include ++#include + #include + #include + #include + diff --git a/dev-db/mongodb/mongodb-5.0.26.ebuild b/dev-db/mongodb/mongodb-5.0.26.ebuild index f40515d..9178e5c 100644 --- a/dev-db/mongodb/mongodb-5.0.26.ebuild +++ b/dev-db/mongodb/mongodb-5.0.26.ebuild @@ -73,6 +73,7 @@ PATCHES=( "${FILESDIR}/${PN}-4.4.10-boost-1.81.patch" "${FILESDIR}/${PN}-5.0.5-boost-1.81-extra.patch" "${FILESDIR}/${PN}-4.4.29-no-enterprise.patch" + "${FILESDIR}/${PN}-5.0.26-boost-1.85.patch" ) python_check_deps() { diff --git a/dev-db/mongodb/mongodb-6.0.15.ebuild b/dev-db/mongodb/mongodb-6.0.15.ebuild index 1119fd5..39f70f8 100644 --- a/dev-db/mongodb/mongodb-6.0.15.ebuild +++ b/dev-db/mongodb/mongodb-6.0.15.ebuild @@ -75,6 +75,7 @@ PATCHES=( "${FILESDIR}/${PN}-4.4.10-boost-1.81.patch" "${FILESDIR}/${PN}-5.0.5-boost-1.81-extra.patch" "${FILESDIR}/${PN}-4.4.29-no-enterprise.patch" + "${FILESDIR}/${PN}-5.0.26-boost-1.85.patch" ) python_check_deps() {