diff options
Diffstat (limited to 'dev-db')
| -rw-r--r-- | dev-db/mongodb/Manifest | 1 | ||||
| -rw-r--r-- | dev-db/mongodb/files/mongodb-6.0.0-boost-1.79.patch | 81 | ||||
| -rw-r--r-- | dev-db/mongodb/files/mongodb-6.0.0-gcc12.patch | 12 | ||||
| -rw-r--r-- | dev-db/mongodb/files/mongodb-6.0.2-sconstruct-changes.patch | 93 | ||||
| -rw-r--r-- | dev-db/mongodb/files/mongodb-6.0.21-boost-1.85.patch | 182 | ||||
| -rw-r--r-- | dev-db/mongodb/files/mongodb-6.0.21-cstdint.patch | 24 | ||||
| -rw-r--r-- | dev-db/mongodb/files/mongodb-6.0.22-boost-1.85.patch | 286 | ||||
| -rw-r--r-- | dev-db/mongodb/files/mongodb-6.0.7-gcc-13.patch | 12 | ||||
| -rw-r--r-- | dev-db/mongodb/mongodb-6.0.22.ebuild | 204 |
9 files changed, 895 insertions, 0 deletions
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest index 9c3d50fe7432..c0321b0ab545 100644 --- a/dev-db/mongodb/Manifest +++ b/dev-db/mongodb/Manifest @@ -1 +1,2 @@ DIST mongodb-5.0.30.gh.tar.gz 57312372 BLAKE2B 72b026115cf3c8b1b81857bc5bffcd5b72bae4b581a7ada598bc7bbe594f264f581212159788113c5709ab751dd8a57943a3cc9b78f0d31aeb50375fa1da2c28 SHA512 97642da12cf199fa3f17825b1eb20e4d9bc1f65c8950f54b36347af11b6964cdd2007d11b01147d0c253077ef14121de52517c1739b433b49a9cbbe2596d9d05 +DIST mongodb-6.0.22.gh.tar.gz 87688277 BLAKE2B 1ff5206cb996763ca051129572eb9bf6f8cff0ceeae7f86c4472e49a7d2210de602beead53d3aba7d8ee3b168a50a2505b8cfc91cd22968dd39a42ba13432e73 SHA512 4a3258b22d31ee81d5932d82dc5d19aec0b3648593d57cedd21b74c46bf4bfea833a519f4e90c1f2f860aa46781297dd16b7324145713e36eee81d41e684c420 diff --git a/dev-db/mongodb/files/mongodb-6.0.0-boost-1.79.patch b/dev-db/mongodb/files/mongodb-6.0.0-boost-1.79.patch new file mode 100644 index 000000000000..78dd84c50df1 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-6.0.0-boost-1.79.patch @@ -0,0 +1,81 @@ +https://bugs.gentoo.org/844235 +--- a/src/mongo/db/auth/security_key_test.cpp ++++ b/src/mongo/db/auth/security_key_test.cpp +@@ -30,6 +30,7 @@ + #include "mongo/platform/basic.h" + + #include <boost/filesystem.hpp> ++#include <boost/filesystem/fstream.hpp> + + #include "mongo/base/string_data.h" + #include "mongo/db/auth/authorization_manager.h" +--- a/src/mongo/db/storage/storage_repair_observer.cpp ++++ b/src/mongo/db/storage/storage_repair_observer.cpp +@@ -41,6 +41,7 @@ + #include <sys/types.h> + #endif + ++#include <boost/filesystem/fstream.hpp> + #include <boost/filesystem/path.hpp> + + #include "mongo/db/dbhelpers.h" +--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp ++++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp +@@ -34,6 +34,7 @@ + #include "mongo/db/storage/kv/kv_engine_test_harness.h" + + #include <boost/filesystem.hpp> ++#include <boost/filesystem/fstream.hpp> + #include <boost/filesystem/path.hpp> + #include <memory> + +--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp ++++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +@@ -48,6 +48,7 @@ + #include "mongo/db/storage/wiredtiger/wiredtiger_kv_engine.h" + + #include <boost/filesystem.hpp> ++#include <boost/filesystem/fstream.hpp> + #include <boost/filesystem/operations.hpp> + #include <boost/filesystem/path.hpp> + #include <boost/system/error_code.hpp> +--- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp ++++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp +@@ -36,6 +36,7 @@ + #include <limits> + + #include <boost/filesystem.hpp> ++#include <boost/filesystem/fstream.hpp> + #include <boost/filesystem/path.hpp> + + #include "mongo/base/simple_string_data_comparator.h" +--- a/src/mongo/shell/shell_utils_extended.cpp ++++ b/src/mongo/shell/shell_utils_extended.cpp +@@ -37,6 +37,7 @@ + #endif + + #include <boost/filesystem.hpp> ++#include <boost/filesystem/fstream.hpp> + #include <fmt/format.h> + #include <fstream> + +--- a/src/mongo/util/stacktrace_threads.cpp ++++ b/src/mongo/util/stacktrace_threads.cpp +@@ -36,6 +36,7 @@ + #include <array> + #include <atomic> + #include <boost/filesystem.hpp> ++#include <boost/filesystem/fstream.hpp> + #include <cstdint> + #include <cstdlib> + #include <dirent.h> +--- a/src/mongo/util/processinfo_linux.cpp ++++ b/src/mongo/util/processinfo_linux.cpp +@@ -36,6 +36,7 @@ + #include <iostream> + #include <malloc.h> + #include <pcrecpp.h> ++#include <fstream> + #include <sched.h> + #include <stdio.h> + #include <sys/mman.h> diff --git a/dev-db/mongodb/files/mongodb-6.0.0-gcc12.patch b/dev-db/mongodb/files/mongodb-6.0.0-gcc12.patch new file mode 100644 index 000000000000..ba71fd8d3e62 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-6.0.0-gcc12.patch @@ -0,0 +1,12 @@ +diff --git a/src/mongo/db/repl/tenant_file_cloner.h b/src/mongo/db/repl/tenant_file_cloner.h +index def0952..0625e46 100644 +--- a/src/mongo/db/repl/tenant_file_cloner.h ++++ b/src/mongo/db/repl/tenant_file_cloner.h +@@ -32,6 +32,7 @@ + #include <boost/filesystem.hpp> + #include <memory> + #include <vector> ++#include <fstream> + + #include "mongo/db/repl/base_cloner.h" + #include "mongo/db/repl/task_runner.h" diff --git a/dev-db/mongodb/files/mongodb-6.0.2-sconstruct-changes.patch b/dev-db/mongodb/files/mongodb-6.0.2-sconstruct-changes.patch new file mode 100644 index 000000000000..26d2b486ac68 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-6.0.2-sconstruct-changes.patch @@ -0,0 +1,93 @@ +diff --git a/SConstruct b/SConstruct +index 8367691..9061849 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -2441,7 +2441,6 @@ if env.TargetOSIs('posix'): + + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fasynchronous-unwind-tables", +- "-ggdb" if not env.TargetOSIs('emscripten') else "-g", + "-Wall", + "-Wsign-compare", + "-Wno-unknown-pragmas", +@@ -2497,6 +2496,8 @@ if env.TargetOSIs('posix'): + + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet + env.Append( CXXFLAGS=["-Woverloaded-virtual"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + + # On OS X, clang doesn't want the pthread flag at link time, or it + # issues warnings which make it impossible for us to declare link +@@ -2549,7 +2550,7 @@ if env.TargetOSIs('posix'): + ) + + #make scons colorgcc friendly +- for key in ('HOME', 'TERM'): ++ for key in ('HOME', 'TERM', 'PATH'): + try: + env['ENV'][key] = os.environ[key] + except KeyError: +@@ -2968,43 +2969,6 @@ def doConfigure(myenv): + myenv.AddMethod( + functools.partial(var_func, var=var, func=CheckFlag), f"Check{var}Supported") + +- if myenv.ToolchainIs('gcc', 'clang'): +- # This tells clang/gcc to use the gold linker if it is available - we prefer the gold linker +- # because it is much faster. Don't use it if the user has already configured another linker +- # selection manually. +- if any(flag.startswith('-fuse-ld=') for flag in env['LINKFLAGS']): +- myenv.FatalError(f"Use the '--linker' option instead of modifying the LINKFLAGS directly.") +- +- linker_ld = get_option('linker') +- if linker_ld == 'auto': +- # lld has problems with separate debug info on some platforms. See: +- # - https://bugzilla.mozilla.org/show_bug.cgi?id=1485556 +- # - https://bugzilla.mozilla.org/show_bug.cgi?id=1485556 +- # +- # lld also apparently has problems with symbol resolution +- # in some esoteric configurations that apply for us when +- # using --link-model=dynamic mode, so disable lld there +- # too. See: +- # - https://bugs.llvm.org/show_bug.cgi?id=46676 +- # +- # We should revisit all of these issues the next time we upgrade our clang minimum. +- if get_option('separate-debug') == 'off' and get_option('link-model') != 'dynamic': +- if not myenv.AddToLINKFLAGSIfSupported('-fuse-ld=lld'): +- myenv.AddToLINKFLAGSIfSupported('-fuse-ld=gold') +- else: +- myenv.AddToLINKFLAGSIfSupported('-fuse-ld=gold') +- elif link_model.startswith("dynamic") and linker_ld == 'bfd': +- # BFD is not supported due to issues with it causing warnings from some of +- # the third party libraries that mongodb is linked with: +- # https://jira.mongodb.org/browse/SERVER-49465 +- myenv.FatalError(f"Linker {linker_ld} is not supported with dynamic link model builds.") +- else: +- if not myenv.AddToLINKFLAGSIfSupported(f'-fuse-ld={linker_ld}'): +- myenv.FatalError(f"Linker {linker_ld} could not be configured.") +- +- if has_option('gcov') and myenv.AddToCCFLAGSIfSupported('-fprofile-update=single'): +- myenv.AppendUnique(LINKFLAGS=['-fprofile-update=single']) +- + detectCompiler = Configure(myenv, help=False, custom_tests = { + 'CheckForCXXLink': CheckForCXXLink, + }) +@@ -4344,17 +4308,11 @@ def doConfigure(myenv): + "BOOST_LOG_NO_SHORTHAND_NAMES", + "BOOST_LOG_USE_NATIVE_SYSLOG", + "BOOST_LOG_WITHOUT_THREAD_ATTR", ++ "BOOST_LOG_DYN_LINK", + "ABSL_FORCE_ALIGNED_ACCESS", + ] + ) + +- if link_model.startswith("dynamic") and not link_model == 'dynamic-sdk': +- conf.env.AppendUnique( +- CPPDEFINES=[ +- "BOOST_LOG_DYN_LINK", +- ] +- ) +- + if use_system_version_of_library("boost"): + if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ): + myenv.ConfError("can't find boost headers") diff --git a/dev-db/mongodb/files/mongodb-6.0.21-boost-1.85.patch b/dev-db/mongodb/files/mongodb-6.0.21-boost-1.85.patch new file mode 100644 index 000000000000..1c923e1fe698 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-6.0.21-boost-1.85.patch @@ -0,0 +1,182 @@ +From dbca1c7f472301ab93ee74bc3f40fba019428dea Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Valenduc?= <francoisvalenduc@gmail.com> +Date: Mon, 14 Apr 2025 09:50:42 +0200 +Subject: [PATCH] fix for boost 1.85 + +--- + src/mongo/db/initialize_server_global_state.cpp | 4 ++-- + src/mongo/db/startup_warnings_mongod.cpp | 1 + + src/mongo/db/storage/backup_block.cpp | 5 ++++- + .../db/storage/storage_engine_lock_file_posix.cpp | 4 ++-- + src/mongo/db/storage/storage_engine_metadata.cpp | 4 ++-- + src/mongo/scripting/engine.cpp | 2 +- + src/mongo/shell/shell_utils_launcher.cpp | 12 ++++++------ + src/mongo/shell/shell_utils_launcher.h | 2 +- + 10 files changed, 23 insertions(+), 15 deletions(-) + +diff --git a/src/mongo/db/initialize_server_global_state.cpp b/src/mongo/db/initialize_server_global_state.cpp +index 4dc953ff8ce..2e9e22bfd61 100644 +--- 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 <boost/filesystem/operations.hpp> ++#include <boost/filesystem.hpp> + #include <fmt/format.h> + #include <iostream> + #include <memory> +@@ -307,7 +307,7 @@ bool checkAndMoveLogFile(const std::string& absoluteLogpath) { + << "\" 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); +diff --git a/src/mongo/db/startup_warnings_mongod.cpp b/src/mongo/db/startup_warnings_mongod.cpp +index fb4969106af..f19aa6b32c4 100644 +--- 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 <boost/filesystem/operations.hpp> ++#include <boost/filesystem/exception.hpp> + #include <fstream> + #ifndef _WIN32 + #include <sys/resource.h> +diff --git a/src/mongo/db/storage/backup_block.cpp b/src/mongo/db/storage/backup_block.cpp +index 9b8dc29f209..10fd6632fc3 100644 +--- a/src/mongo/db/storage/backup_block.cpp ++++ b/src/mongo/db/storage/backup_block.cpp +@@ -30,6 +30,9 @@ + #include "mongo/db/storage/backup_block.h" + + #include <boost/filesystem.hpp> ++#include <boost/filesystem/fstream.hpp> ++#include <boost/filesystem/operations.hpp> ++#include <boost/filesystem/path.hpp> + #include <set> + + #include "mongo/base/string_data.h" +@@ -59,7 +62,7 @@ std::string extractIdentFromPath(const boost::filesystem::path& dbpath, + + // Remove the file extension and convert to generic form (i.e. replace "\" with "/" + // on windows, no-op on unix). +- return boost::filesystem::change_extension(identWithExtension, "").generic_string(); ++ return boost::filesystem::path(identWithExtension).replace_extension("").generic_string(); + } + + } // namespace details +diff --git a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp +index 0d67885718a..035b07c2eac 100644 +--- 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 @@ void flushMyDirectory(const boost::filesystem::path& file) { + // 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 @@ void flushMyDirectory(const boost::filesystem::path& file) { + } + + +- 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()); + +diff --git a/src/mongo/db/storage/storage_engine_metadata.cpp b/src/mongo/db/storage/storage_engine_metadata.cpp +index 07b21b448e1..87c7cd56cd1 100644 +--- a/src/mongo/db/storage/storage_engine_metadata.cpp ++++ b/src/mongo/db/storage/storage_engine_metadata.cpp +@@ -220,7 +220,7 @@ void flushMyDirectory(const boost::filesystem::path& file) { + // 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 @@ void flushMyDirectory(const boost::filesystem::path& file) { + } + + +- 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()); + +diff --git a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp +index 49e920bdf69..d198de51788 100644 +--- a/src/mongo/scripting/engine.cpp ++++ b/src/mongo/scripting/engine.cpp +@@ -34,7 +34,7 @@ + #include "mongo/scripting/engine.h" + + #include <algorithm> +-#include <boost/filesystem/operations.hpp> ++#include <boost/filesystem.hpp> + + #include "mongo/base/string_data.h" + #include "mongo/client/dbclient_base.h" +diff --git a/src/mongo/shell/shell_utils_launcher.cpp b/src/mongo/shell/shell_utils_launcher.cpp +index 0f6b6f2cf42..cf18b896c36 100644 +--- a/src/mongo/shell/shell_utils_launcher.cpp ++++ b/src/mongo/shell/shell_utils_launcher.cpp +@@ -1000,26 +1000,26 @@ void copyDir(const boost::filesystem::path& from, const boost::filesystem::path& + 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; +diff --git a/src/mongo/shell/shell_utils_launcher.h b/src/mongo/shell/shell_utils_launcher.h +index 14a6ce06390..960f78a71e8 100644 +--- a/src/mongo/shell/shell_utils_launcher.h ++++ b/src/mongo/shell/shell_utils_launcher.h +@@ -29,7 +29,7 @@ + + #pragma once + +-#include <boost/filesystem/convenience.hpp> ++#include <boost/filesystem/path.hpp> + #include <map> + #include <sstream> + #include <string> + + diff --git a/dev-db/mongodb/files/mongodb-6.0.21-cstdint.patch b/dev-db/mongodb/files/mongodb-6.0.21-cstdint.patch new file mode 100644 index 000000000000..f71c3e9cb055 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-6.0.21-cstdint.patch @@ -0,0 +1,24 @@ +From f7eb64bcdf8cc9c6af8761d96173243c416bcdbe Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Valenduc?= <francoisvalenduc@gmail.com> +Date: Mon, 14 Apr 2025 19:13:44 +0200 +Subject: [PATCH] ctype.h add cstdint + +--- + src/mongo/util/ctype.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/mongo/util/ctype.h b/src/mongo/util/ctype.h +index a3880e281a8..78ee57e3d0c 100644 +--- a/src/mongo/util/ctype.h ++++ b/src/mongo/util/ctype.h +@@ -67,6 +67,7 @@ + #pragma once + + #include <array> ++#include <cstdint> + + namespace mongo::ctype { + namespace detail { +-- +2.49.0 + diff --git a/dev-db/mongodb/files/mongodb-6.0.22-boost-1.85.patch b/dev-db/mongodb/files/mongodb-6.0.22-boost-1.85.patch new file mode 100644 index 000000000000..13312376de94 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-6.0.22-boost-1.85.patch @@ -0,0 +1,286 @@ +From e534a7e65efabd21e22b9243795e3cd06268f49a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Valenduc?= <francoisvalenduc@gmail.com> +Date: Wed, 30 Apr 2025 00:25:10 +0200 +Subject: [PATCH] fix boost + +--- + src/mongo/db/initialize_server_global_state.cpp | 4 ++-- + src/mongo/db/repl/tenant_file_cloner.h | 1 + + src/mongo/db/startup_warnings_mongod.cpp | 1 + + src/mongo/db/storage/backup_block.cpp | 5 ++++- + .../db/storage/storage_engine_lock_file_posix.cpp | 4 ++-- + src/mongo/db/storage/storage_engine_metadata.cpp | 4 ++-- + .../db/storage/wiredtiger/wiredtiger_kv_engine.cpp | 2 +- + src/mongo/scripting/engine.cpp | 2 +- + src/mongo/shell/shell_utils_extended.cpp | 9 +++++++++ + src/mongo/shell/shell_utils_launcher.cpp | 12 ++++++------ + src/mongo/shell/shell_utils_launcher.h | 2 +- + src/mongo/util/ctype.h | 1 + + src/mongo/util/processinfo_linux.cpp | 1 + + src/mongo/util/stacktrace_threads.cpp | 10 +++++++--- + 14 files changed, 39 insertions(+), 19 deletions(-) + +diff --git a/src/mongo/db/initialize_server_global_state.cpp b/src/mongo/db/initialize_server_global_state.cpp +index 4dc953ff8ce..2e9e22bfd61 100644 +--- 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 <boost/filesystem/operations.hpp> ++#include <boost/filesystem.hpp> + #include <fmt/format.h> + #include <iostream> + #include <memory> +@@ -307,7 +307,7 @@ bool checkAndMoveLogFile(const std::string& absoluteLogpath) { + << "\" 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); +diff --git a/src/mongo/db/repl/tenant_file_cloner.h b/src/mongo/db/repl/tenant_file_cloner.h +index def09528953..0625e4687f7 100644 +--- a/src/mongo/db/repl/tenant_file_cloner.h ++++ b/src/mongo/db/repl/tenant_file_cloner.h +@@ -32,6 +32,7 @@ + #include <boost/filesystem.hpp> + #include <memory> + #include <vector> ++#include <fstream> + + #include "mongo/db/repl/base_cloner.h" + #include "mongo/db/repl/task_runner.h" +diff --git a/src/mongo/db/startup_warnings_mongod.cpp b/src/mongo/db/startup_warnings_mongod.cpp +index fb4969106af..f19aa6b32c4 100644 +--- 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 <boost/filesystem/operations.hpp> ++#include <boost/filesystem/exception.hpp> + #include <fstream> + #ifndef _WIN32 + #include <sys/resource.h> +diff --git a/src/mongo/db/storage/backup_block.cpp b/src/mongo/db/storage/backup_block.cpp +index 9b8dc29f209..10fd6632fc3 100644 +--- a/src/mongo/db/storage/backup_block.cpp ++++ b/src/mongo/db/storage/backup_block.cpp +@@ -30,6 +30,9 @@ + #include "mongo/db/storage/backup_block.h" + + #include <boost/filesystem.hpp> ++#include <boost/filesystem/fstream.hpp> ++#include <boost/filesystem/operations.hpp> ++#include <boost/filesystem/path.hpp> + #include <set> + + #include "mongo/base/string_data.h" +@@ -59,7 +62,7 @@ std::string extractIdentFromPath(const boost::filesystem::path& dbpath, + + // Remove the file extension and convert to generic form (i.e. replace "\" with "/" + // on windows, no-op on unix). +- return boost::filesystem::change_extension(identWithExtension, "").generic_string(); ++ return boost::filesystem::path(identWithExtension).replace_extension("").generic_string(); + } + + } // namespace details +diff --git a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp +index 0d67885718a..035b07c2eac 100644 +--- 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 @@ void flushMyDirectory(const boost::filesystem::path& file) { + // 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 @@ void flushMyDirectory(const boost::filesystem::path& file) { + } + + +- 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()); + +diff --git a/src/mongo/db/storage/storage_engine_metadata.cpp b/src/mongo/db/storage/storage_engine_metadata.cpp +index 07b21b448e1..87c7cd56cd1 100644 +--- a/src/mongo/db/storage/storage_engine_metadata.cpp ++++ b/src/mongo/db/storage/storage_engine_metadata.cpp +@@ -220,7 +220,7 @@ void flushMyDirectory(const boost::filesystem::path& file) { + // 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 @@ void flushMyDirectory(const boost::filesystem::path& file) { + } + + +- 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()); + +diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +index 0de1c43284f..1f400f32612 100644 +--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp ++++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +@@ -1279,7 +1279,7 @@ WiredTigerKVEngine::beginNonBlockingBackup(OperationContext* opCtx, + + // Create ongoingBackup.lock file to signal recovery that it should delete WiredTiger.backup if + // we have an unclean shutdown with the cursor still open. +- { boost::filesystem::ofstream ongoingBackup(getOngoingBackupPath()); } ++ { boost::filesystem::std::ofstream ongoingBackup(getOngoingBackupPath()); } + + // Oplog truncation thread won't remove oplog since the checkpoint pinned by the backup cursor. + stdx::lock_guard<Latch> lock(_oplogPinnedByBackupMutex); +diff --git a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp +index 49e920bdf69..d198de51788 100644 +--- a/src/mongo/scripting/engine.cpp ++++ b/src/mongo/scripting/engine.cpp +@@ -34,7 +34,7 @@ + #include "mongo/scripting/engine.h" + + #include <algorithm> +-#include <boost/filesystem/operations.hpp> ++#include <boost/filesystem.hpp> + + #include "mongo/base/string_data.h" + #include "mongo/client/dbclient_base.h" +diff --git a/src/mongo/shell/shell_utils_extended.cpp b/src/mongo/shell/shell_utils_extended.cpp +index 6cd6dc6ed0d..29b886d6acf 100644 +--- a/src/mongo/shell/shell_utils_extended.cpp ++++ b/src/mongo/shell/shell_utils_extended.cpp +@@ -37,6 +37,15 @@ + #endif + + #include <boost/filesystem.hpp> ++#include <boost/filesystem/directory.hpp> ++#include <boost/filesystem/exception.hpp> ++#include <boost/filesystem/file_status.hpp> ++#include <boost/filesystem/fstream.hpp> ++#include <boost/filesystem/operations.hpp> ++#include <boost/filesystem/path.hpp> ++#include <boost/iterator/iterator_facade.hpp> ++#include <boost/move/utility_core.hpp> ++ + #include <fmt/format.h> + #include <fstream> + +diff --git a/src/mongo/shell/shell_utils_launcher.cpp b/src/mongo/shell/shell_utils_launcher.cpp +index 0f6b6f2cf42..cf18b896c36 100644 +--- a/src/mongo/shell/shell_utils_launcher.cpp ++++ b/src/mongo/shell/shell_utils_launcher.cpp +@@ -1000,26 +1000,26 @@ void copyDir(const boost::filesystem::path& from, const boost::filesystem::path& + 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; +diff --git a/src/mongo/shell/shell_utils_launcher.h b/src/mongo/shell/shell_utils_launcher.h +index 14a6ce06390..960f78a71e8 100644 +--- a/src/mongo/shell/shell_utils_launcher.h ++++ b/src/mongo/shell/shell_utils_launcher.h +@@ -29,7 +29,7 @@ + + #pragma once + +-#include <boost/filesystem/convenience.hpp> ++#include <boost/filesystem/path.hpp> + #include <map> + #include <sstream> + #include <string> +diff --git a/src/mongo/util/ctype.h b/src/mongo/util/ctype.h +index a3880e281a8..78ee57e3d0c 100644 +--- a/src/mongo/util/ctype.h ++++ b/src/mongo/util/ctype.h +@@ -67,6 +67,7 @@ + #pragma once + + #include <array> ++#include <cstdint> + + namespace mongo::ctype { + namespace detail { +diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp +index 7793011e901..ff3c940bab0 100644 +--- a/src/mongo/util/processinfo_linux.cpp ++++ b/src/mongo/util/processinfo_linux.cpp +@@ -36,6 +36,7 @@ + #include <iostream> + #include <malloc.h> + #include <pcrecpp.h> ++#include <fstream> + #include <sched.h> + #include <stdio.h> + #include <sys/mman.h> +diff --git a/src/mongo/util/stacktrace_threads.cpp b/src/mongo/util/stacktrace_threads.cpp +index 51581c4dc9b..99c30f153b0 100644 +--- a/src/mongo/util/stacktrace_threads.cpp ++++ b/src/mongo/util/stacktrace_threads.cpp +@@ -35,7 +35,11 @@ + + #include <array> + #include <atomic> +-#include <boost/filesystem.hpp> ++#include <boost/filesystem/directory.hpp> ++#include <boost/filesystem/fstream.hpp> ++#include <boost/filesystem/operations.hpp> ++#include <boost/filesystem/path.hpp> ++#include <boost/iterator/iterator_facade.hpp> + #include <cstdint> + #include <cstdlib> + #include <dirent.h> +@@ -243,8 +247,8 @@ bool tidExists(int tid) { + std::string readThreadName(int tid) { + std::string threadName; + try { +- boost::filesystem::ifstream in(taskDir() / std::to_string(tid) / "comm"); +- std::getline(in, threadName); ++ boost::filesystem::ifstream in(taskDir() / boost::filesystem::path(std::to_string(tid)) / "comm"); ++ std::getline(in, threadName); + } catch (...) { + } + return threadName; +-- +2.49.0 + diff --git a/dev-db/mongodb/files/mongodb-6.0.7-gcc-13.patch b/dev-db/mongodb/files/mongodb-6.0.7-gcc-13.patch new file mode 100644 index 000000000000..5473997e56c9 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-6.0.7-gcc-13.patch @@ -0,0 +1,12 @@ +diff --git a/src/mongo/util/ctype.h b/src/mongo/util/ctype.h +index a3880e2..78ee57e 100644 +--- a/src/mongo/util/ctype.h ++++ b/src/mongo/util/ctype.h +@@ -67,6 +67,7 @@ + #pragma once + + #include <array> ++#include <cstdint> + + namespace mongo::ctype { + namespace detail { diff --git a/dev-db/mongodb/mongodb-6.0.22.ebuild b/dev-db/mongodb/mongodb-6.0.22.ebuild new file mode 100644 index 000000000000..32cef59900d6 --- /dev/null +++ b/dev-db/mongodb/mongodb-6.0.22.ebuild @@ -0,0 +1,204 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..13} ) + +SCONS_MIN_VERSION="3.3.1" +CHECKREQS_DISK_BUILD="2400M" +CHECKREQS_DISK_USR="512M" +CHECKREQS_MEMORY="1024M" + +inherit check-reqs eapi9-ver flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs + +MY_PV=r${PV/_rc/-rc} +MY_P=mongo-${MY_PV} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="https://www.mongodb.com" +SRC_URI="https://github.com/mongodb/mongo/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="Apache-2.0 SSPL-1" +SLOT="0" +KEYWORDS="~amd64 ~arm64 -riscv" +CPU_FLAGS="cpu_flags_x86_avx" +IUSE="debug kerberos mongosh ssl +tools ${CPU_FLAGS}" + +# https://github.com/mongodb/mongo/wiki/Test-The-Mongodb-Server +# resmoke needs python packages not yet present in Gentoo +RESTRICT="test" + +RDEPEND="acct-group/mongodb + acct-user/mongodb + >=app-arch/snappy-1.1.7:= + app-arch/zstd:= + >=dev-cpp/yaml-cpp-0.6.2:= + dev-libs/boost:=[nls] + >=dev-libs/libpcre-8.42[cxx] + dev-libs/snowball-stemmer:= + net-misc/curl + >=sys-libs/zlib-1.2.12:= + kerberos? ( dev-libs/cyrus-sasl[kerberos] ) + ssl? ( + >=dev-libs/openssl-1.0.1g:0= + )" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + sys-libs/ncurses:0= + sys-libs/readline:0= + debug? ( dev-debug/valgrind )" +BDEPEND=" + $(python_gen_any_dep ' + >=dev-build/scons-3.1.1[${PYTHON_USEDEP}] + dev-python/cheetah3[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + ') +" +PDEPEND=" + mongosh? ( app-admin/mongosh-bin ) + tools? ( >=app-admin/mongo-tools-100 ) +" + +PATCHES=( + "${FILESDIR}/mongodb-4.4.29-no-enterprise.patch" + "${FILESDIR}/${PN}-5.0.2-no-compass.patch" + "${FILESDIR}/${PN}-5.0.2-skip-reqs-check.patch" + "${FILESDIR}/${PN}-4.4.10-boost-1.81.patch" + "${FILESDIR}/mongodb-6.0.0-boost-1.79.patch" + "${FILESDIR}/mongodb-6.0.0-gcc12.patch" + "${FILESDIR}/mongodb-6.0.7-gcc-13.patch" + "${FILESDIR}/mongodb-6.0.21-boost-1.85.patch" + "${FILESDIR}/mongodb-6.0.2-sconstruct-changes.patch" +) + +python_check_deps() { + python_has_version -b ">=dev-build/scons-3.1.1[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/cheetah3[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/psutil[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" +} + +pkg_pretend() { + # Bug 809692 + 890294 + if use amd64 && ! use cpu_flags_x86_avx; then + ewarn "MongoDB 5.0 requires use of the AVX instruction set." + ewarn "This ebuild will use --experimental-optimization=-sandybridge which" + ewarn "will result in an experimental build of MongoDB as per upstream." + ewarn "https://docs.mongodb.com/v5.0/administration/production-notes/" + fi + + if [[ -n ${REPLACING_VERSIONS} ]]; then + if ver_replacing -lt 4.4; then + ewarn "To upgrade from a versio |
