dev-db/mongodb: move all patches to devspae

Wanted to do this after because the patches are a mess and having
some history for them is good.

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-05-06 20:27:34 +01:00
parent 07da7cbf83
commit 8ee176dbe6
38 changed files with 81 additions and 2609 deletions

View File

@@ -1,4 +1,8 @@
DIST mongodb-5.0.30-patches.tar.xz 9652 BLAKE2B d0780026c4b2dd4e0968e3699eeeed4c4db14bce93bf6bce8141f9d6a3b3b4579b4496494b2e0ebdb00ac1e316a55723625b64bac9ebf032d4ae6dc7e1691fd7 SHA512 8d1032b99f1cf0087f1562c53fbed33815a2becd8641ab9373c8a474e23f1bb148b712cbebac1da4038ec9e4e3a5249fb9bdfe864ca626d4b9fc221bd91b7dd6
DIST mongodb-5.0.30.gh.tar.gz 57312372 BLAKE2B 72b026115cf3c8b1b81857bc5bffcd5b72bae4b581a7ada598bc7bbe594f264f581212159788113c5709ab751dd8a57943a3cc9b78f0d31aeb50375fa1da2c28 SHA512 97642da12cf199fa3f17825b1eb20e4d9bc1f65c8950f54b36347af11b6964cdd2007d11b01147d0c253077ef14121de52517c1739b433b49a9cbbe2596d9d05
DIST mongodb-6.0.22-patches.tar.xz 8820 BLAKE2B 973e58d0a09d8fb160beefd46b425b0f5dd7ad531f9ccec433fd201517035613c171cddaf5d3cf2883f57d4728438572062cc5c8b9166e15d8e5701efcd8b84c SHA512 fa8f18d259e829df07ec26ab570de9b3968b9b02ed195b47d7a2bfc832f2b7e74a5aaf58e54cfe6d01ea7e3d76efdad2e1efca0da4af0b0d3f50944dfd1fd4e0
DIST mongodb-6.0.22.gh.tar.gz 87688277 BLAKE2B 1ff5206cb996763ca051129572eb9bf6f8cff0ceeae7f86c4472e49a7d2210de602beead53d3aba7d8ee3b168a50a2505b8cfc91cd22968dd39a42ba13432e73 SHA512 4a3258b22d31ee81d5932d82dc5d19aec0b3648593d57cedd21b74c46bf4bfea833a519f4e90c1f2f860aa46781297dd16b7324145713e36eee81d41e684c420
DIST mongodb-7.0.18-patches.tar.xz 9036 BLAKE2B d52032a7bd82a5bffd3536a14d346750b9c093387dd5cb2cf618e32410ccc22e3c5e89a4947d948c16dc8fa4c34388b7ffcc3321723dfa2b2730db763acc2f69 SHA512 5e6e5b29a2c500e6be7fb3e9b83a5f88fde0182e070af15e4d04dede82a6cea8957e1fc0ea329f0cd8a51565de9e51c7ae1d0e7f2ca021e5391cabb337752d40
DIST mongodb-7.0.18.gh.tar.gz 87225100 BLAKE2B 7ede32f4c6b6968ee8d797ce71457133020a3e4a039cd0db914e344e5042a0b871deb5741f86098b2e82b9ff619a511a754a06a29dcbb9527a3b7a7edf52b3ac SHA512 599767db66e95d8dd0bd0e6d51fd70129ea6df1e18a0cdaa52bc6cbe301c982684ff5aab446c50cb825573051e372d8f791aeab7df58e2a4d855e6073f2b46d5
DIST mongodb-8.0.8-patches.tar.xz 8076 BLAKE2B 860c76266f7db7de846c7a791c8a0eb680b0587f6600e6d71bcaae666dda12073fb3613bfe768aa042b54081287b271cb91f4f8c4d5c9232ce7f318ffcff08bb SHA512 c9d96fd16d7790ec459ac839be4aa0076d48e936abdd80e910d1ebc6010652c43291f69e379dd4322f76276c8bb2072c52977e7f30a36d92efbda1161f9a5a13
DIST mongodb-8.0.8.gh.tar.gz 94643838 BLAKE2B c559af9f3b2d1a3ad7139cd9476114bd6c990a1269f4dedf3010118c5e182689703c731ca04fba0bcce91c4f05c521fbbf0556c8b76af27fa10298f0258b5921 SHA512 28fb8455ae4290f9f704e69fcc78c939751ed95a4cbff6f6af55786a10606c1431f9c450b343486bc7b21177b0a3dab04fe088a76a9b8740a207e2cd770cd5eb

View File

@@ -1,16 +0,0 @@
--- a/SConstruct
+++ b/SConstruct
@@ -3217,8 +3205,12 @@ if not env.TargetOSIs('windows', 'macOS') and (env.Too
# setting it for both C and C++ by setting both of CFLAGS and
# CXXFLAGS.
+ arm_march_flag = "armv8-a"
+ if get_option('use-hardware-crc32') == "on":
+ arm_march_flag += "+crc"
+
default_targeting_flags_for_architecture = {
- "aarch64": {"-march=": "armv8.2-a", "-mtune=": "generic"},
+ "aarch64": {"-march=": arm_march_flag, "-mtune=": "generic"},
"i386": {"-march=": "nocona", "-mtune=": "generic"},
"ppc64le": {"-mcpu=": "power8", "-mtune=": "power8", "-mcmodel=": "medium"},
"s390x": {"-march=": "z196", "-mtune=": "zEC12"},

View File

@@ -1,21 +0,0 @@
--- a/SConstruct
+++ b/SConstruct
@@ -3511,17 +3511,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")

View File

@@ -1,317 +0,0 @@
https://bugs.gentoo.org/887037
Workaround https://github.com/boostorg/container/commit/99091420ae553b27345e04279fd19fe24fb684c1
in Boost 1.81.
Upstream s2 (as in real upstream, not MongoDB) has deviated substantially
from the version vendored.
--- a/src/third_party/s2/base/stl_decl_msvc.h
+++ b/src/third_party/s2/base/stl_decl_msvc.h
@@ -118,8 +118,8 @@ namespace msvchash {
class hash_multimap;
} // end namespace msvchash
-using msvchash::hash_set;
-using msvchash::hash_map;
+using msvchash::hash_set = my_hash_set;
+using msvchash::hash_map = my_hash_map;
using msvchash::hash;
using msvchash::hash_multimap;
using msvchash::hash_multiset;
--- a/src/third_party/s2/base/stl_decl_osx.h
+++ b/src/third_party/s2/base/stl_decl_osx.h
@@ -68,8 +68,8 @@ using std::string;
using namespace std;
using __gnu_cxx::hash;
-using __gnu_cxx::hash_set;
-using __gnu_cxx::hash_map;
+using __gnu_cxx::hash_set = my_hash_set;
+using __gnu_cxx::hash_map = my_hash_map;
using __gnu_cxx::select1st;
/* On Linux (and gdrive on OSX), this comes from places like
--- a/src/third_party/s2/hash.h
+++ b/src/third_party/s2/hash.h
@@ -2,10 +2,10 @@
#define THIRD_PARTY_S2_HASH_H_
#include <unordered_map>
-#define hash_map std::unordered_map
+#define my_hash_map std::unordered_map
#include <unordered_set>
-#define hash_set std::unordered_set
+#define my_hash_set std::unordered_set
#define HASH_NAMESPACE_START namespace std {
#define HASH_NAMESPACE_END }
--- a/src/third_party/s2/s2_test.cc
+++ b/src/third_party/s2/s2_test.cc
@@ -10,7 +10,7 @@ using std::reverse;
#include <hash_set>
#include <hash_map>
-using __gnu_cxx::hash_set;
+using __gnu_cxx::hash_set = my_hash_map;
#include "s2.h"
#include "base/logging.h"
@@ -709,8 +709,8 @@ TEST(S2, Frames) {
#if 0
TEST(S2, S2PointHashSpreads) {
int kTestPoints = 1 << 16;
- hash_set<size_t> set;
- hash_set<S2Point> points;
+ my_hash_set<size_t> set;
+ my_hash_set<S2Point> points;
hash<S2Point> hasher;
S2Point base = S2Point(1, 1, 1);
for (int i = 0; i < kTestPoints; ++i) {
@@ -733,7 +733,7 @@ TEST(S2, S2PointHashCollapsesZero) {
double minus_zero = -zero;
EXPECT_NE(*reinterpret_cast<uint64 const*>(&zero),
*reinterpret_cast<uint64 const*>(&minus_zero));
- hash_map<S2Point, int> map;
+ my_hash_map<S2Point, int> map;
S2Point zero_pt(zero, zero, zero);
S2Point minus_zero_pt(minus_zero, minus_zero, minus_zero);
--- a/src/third_party/s2/s2cellid_test.cc
+++ b/src/third_party/s2/s2cellid_test.cc
@@ -10,7 +10,7 @@ using std::reverse;
#include <cstdio>
#include <hash_map>
-using __gnu_cxx::hash_map;
+using __gnu_cxx::hash_map = my_hash_map;
#include <sstream>
#include <vector>
@@ -170,7 +170,7 @@ TEST(S2CellId, Tokens) {
static const int kMaxExpandLevel = 3;
static void ExpandCell(S2CellId const& parent, vector<S2CellId>* cells,
- hash_map<S2CellId, S2CellId>* parent_map) {
+ my_hash_map<S2CellId, S2CellId>* parent_map) {
cells->push_back(parent);
if (parent.level() == kMaxExpandLevel) return;
int i, j, orientation;
@@ -194,7 +194,7 @@ static void ExpandCell(S2CellId const& parent, vector<S2CellId>* cells,
TEST(S2CellId, Containment) {
// Test contains() and intersects().
- hash_map<S2CellId, S2CellId> parent_map;
+ my_hash_map<S2CellId, S2CellId> parent_map;
vector<S2CellId> cells;
for (int face = 0; face < 6; ++face) {
ExpandCell(S2CellId::FromFacePosLevel(face, 0, 0), &cells, &parent_map);
--- a/src/third_party/s2/s2loop.cc
+++ b/src/third_party/s2/s2loop.cc
@@ -120,7 +120,7 @@ bool S2Loop::IsValid(string* err) const {
}
}
// Loops are not allowed to have any duplicate vertices.
- hash_map<S2Point, int> vmap;
+ my_hash_map<S2Point, int> vmap;
for (int i = 0; i < num_vertices(); ++i) {
if (!vmap.insert(make_pair(vertex(i), i)).second) {
VLOG(2) << "Duplicate vertices: " << vmap[vertex(i)] << " and " << i;
--- a/src/third_party/s2/s2polygon.cc
+++ b/src/third_party/s2/s2polygon.cc
@@ -117,7 +117,7 @@ HASH_NAMESPACE_END
bool S2Polygon::IsValid(const vector<S2Loop*>& loops, string* err) {
// If a loop contains an edge AB, then no other loop may contain AB or BA.
if (loops.size() > 1) {
- hash_map<S2PointPair, pair<int, int> > edges;
+ my_hash_map<S2PointPair, pair<int, int> > edges;
for (size_t i = 0; i < loops.size(); ++i) {
S2Loop* lp = loops[i];
for (int j = 0; j < lp->num_vertices(); ++j) {
--- a/src/third_party/s2/s2polygonbuilder.cc
+++ b/src/third_party/s2/s2polygonbuilder.cc
@@ -175,7 +175,7 @@ S2Loop* S2PolygonBuilder::AssembleLoop(S2Point const& v0, S2Point const& v1,
// This ensures that only CCW loops are constructed when possible.
vector<S2Point> path; // The path so far.
- hash_map<S2Point, int> index; // Maps a vertex to its index in "path".
+ my_hash_map<S2Point, int> index; // Maps a vertex to its index in "path".
path.push_back(v0);
path.push_back(v1);
index[v1] = 1;
@@ -361,7 +361,7 @@ void S2PolygonBuilder::BuildMergeMap(PointIndex* index, MergeMap* merge_map) {
// First, we build the set of all the distinct vertices in the input.
// We need to include the source and destination of every edge.
- hash_set<S2Point> vertices;
+ my_hash_set<S2Point> vertices;
for (EdgeSet::const_iterator i = edges_->begin(); i != edges_->end(); ++i) {
vertices.insert(i->first);
VertexSet const& vset = i->second;
@@ -370,7 +370,7 @@ void S2PolygonBuilder::BuildMergeMap(PointIndex* index, MergeMap* merge_map) {
}
// Build a spatial index containing all the distinct vertices.
- for (hash_set<S2Point>::const_iterator i = vertices.begin();
+ for (my_hash_set<S2Point>::const_iterator i = vertices.begin();
i != vertices.end(); ++i) {
index->Insert(*i);
}
@@ -378,7 +378,7 @@ void S2PolygonBuilder::BuildMergeMap(PointIndex* index, MergeMap* merge_map) {
// Next, we loop through all the vertices and attempt to grow a maximial
// mergeable group starting from each vertex.
vector<S2Point> frontier, mergeable;
- for (hash_set<S2Point>::const_iterator vstart = vertices.begin();
+ for (my_hash_set<S2Point>::const_iterator vstart = vertices.begin();
vstart != vertices.end(); ++vstart) {
// Skip any vertices that have already been merged with another vertex.
if (merge_map->find(*vstart) != merge_map->end()) continue;
--- a/src/third_party/s2/s2polygonbuilder.h
+++ b/src/third_party/s2/s2polygonbuilder.h
@@ -262,7 +262,7 @@ class S2PolygonBuilder {
// current position to a new position, and also returns a spatial index
// containing all of the vertices that do not need to be moved.
class PointIndex;
- typedef hash_map<S2Point, S2Point> MergeMap;
+ typedef my_hash_map<S2Point, S2Point> MergeMap;
void BuildMergeMap(PointIndex* index, MergeMap* merge_map);
// Moves a set of vertices from old to new positions.
@@ -282,7 +282,7 @@ class S2PolygonBuilder {
// once. We could have also used a multiset<pair<S2Point, S2Point> >,
// but this representation is a bit more convenient.
typedef multiset<S2Point> VertexSet;
- typedef hash_map<S2Point, VertexSet> EdgeSet;
+ typedef my_hash_map<S2Point, VertexSet> EdgeSet;
scoped_ptr<EdgeSet> edges_;
// Unique collection of the starting (first) vertex of all edges,
--- a/src/third_party/s2/s2regioncoverer.cc
+++ b/src/third_party/s2/s2regioncoverer.cc
@@ -321,7 +321,7 @@ void S2RegionCoverer::GetInteriorCellUnion(S2Region const& region,
void S2RegionCoverer::FloodFill(
S2Region const& region, S2CellId const& start, vector<S2CellId>* output) {
- hash_set<S2CellId> all;
+ my_hash_set<S2CellId> all;
vector<S2CellId> frontier;
output->clear();
all.insert(start);
--- a/src/third_party/s2/s2regioncoverer_test.cc
+++ b/src/third_party/s2/s2regioncoverer_test.cc
@@ -11,7 +11,7 @@ using std::swap;
using std::reverse;
#include <hash_map>
-using __gnu_cxx::hash_map;
+using __gnu_cxx::hash_map = my_hash_map;
#include <queue>
using std::priority_queue;
@@ -65,7 +65,7 @@ static void CheckCovering(S2RegionCoverer const& coverer,
vector<S2CellId> const& covering,
bool interior) {
// Keep track of how many cells have the same coverer.min_level() ancestor.
- hash_map<S2CellId, int> min_level_cells;
+ my_hash_map<S2CellId, int> min_level_cells;
for (int i = 0; i < covering.size(); ++i) {
int level = covering[i].level();
EXPECT_GE(level, coverer.min_level());
@@ -76,7 +76,7 @@ static void CheckCovering(S2RegionCoverer const& coverer,
if (covering.size() > coverer.max_cells()) {
// If the covering has more than the requested number of cells, then check
// that the cell count cannot be reduced by using the parent of some cell.
- for (hash_map<S2CellId, int>::const_iterator i = min_level_cells.begin();
+ for (my_hash_map<S2CellId, int>::const_iterator i = min_level_cells.begin();
i != min_level_cells.end(); ++i) {
EXPECT_EQ(i->second, 1);
}
--- a/src/third_party/s2/strings/split.cc
+++ b/src/third_party/s2/strings/split.cc
@@ -156,7 +156,7 @@ struct simple_insert_iterator {
// SplitStringToIterator{Using|AllowEmpty}().
template <typename T>
struct simple_hash_map_iterator {
- typedef hash_map<T, T> hashmap;
+ typedef my_hash_map<T, T> hashmap;
hashmap* t;
bool even;
typename hashmap::iterator curr;
@@ -246,8 +246,8 @@ void SplitStringAllowEmpty(const string& full, const char* delim,
}
void SplitStringToHashsetAllowEmpty(const string& full, const char* delim,
- hash_set<string>* result) {
- simple_insert_iterator<hash_set<string> > it(result);
+ my_hash_set<string>* result) {
+ simple_insert_iterator<my_hash_set<string> > it(result);
SplitStringToIteratorAllowEmpty(full, delim, 0, it);
}
@@ -258,7 +258,7 @@ void SplitStringToSetAllowEmpty(const string& full, const char* delim,
}
void SplitStringToHashmapAllowEmpty(const string& full, const char* delim,
- hash_map<string, string>* result) {
+ my_hash_map<string, string>* result) {
simple_hash_map_iterator<string> it(result);
SplitStringToIteratorAllowEmpty(full, delim, 0, it);
}
@@ -352,8 +352,8 @@ void SplitStringUsing(const string& full,
}
void SplitStringToHashsetUsing(const string& full, const char* delim,
- hash_set<string>* result) {
- simple_insert_iterator<hash_set<string> > it(result);
+ my_hash_set<string>* result) {
+ simple_insert_iterator<my_hash_set<string> > it(result);
SplitStringToIteratorUsing(full, delim, it);
}
@@ -364,7 +364,7 @@ void SplitStringToSetUsing(const string& full, const char* delim,
}
void SplitStringToHashmapUsing(const string& full, const char* delim,
- hash_map<string, string>* result) {
+ my_hash_map<string, string>* result) {
simple_hash_map_iterator<string> it(result);
SplitStringToIteratorUsing(full, delim, it);
}
--- a/src/third_party/s2/strings/split.h
+++ b/src/third_party/s2/strings/split.h
@@ -41,7 +41,7 @@ using namespace std;
void SplitStringAllowEmpty(const string& full, const char* delim,
vector<string>* res);
void SplitStringToHashsetAllowEmpty(const string& full, const char* delim,
- hash_set<string>* res);
+ my_hash_set<string>* res);
void SplitStringToSetAllowEmpty(const string& full, const char* delim,
set<string>* res);
// The even-positioned (0-based) components become the keys for the
@@ -50,7 +50,7 @@ void SplitStringToSetAllowEmpty(const string& full, const char* delim,
// if the key was already present in the hash table, or will be the
// empty string if the key is a newly inserted key.
void SplitStringToHashmapAllowEmpty(const string& full, const char* delim,
- hash_map<string, string>* result);
+ my_hash_map<string, string>* result);
// ----------------------------------------------------------------------
// SplitStringUsing()
@@ -66,7 +66,7 @@ void SplitStringToHashmapAllowEmpty(const string& full, const char* delim,
void SplitStringUsing(const string& full, const char* delim,
vector<string>* res);
void SplitStringToHashsetUsing(const string& full, const char* delim,
- hash_set<string>* res);
+ my_hash_set<string>* res);
void SplitStringToSetUsing(const string& full, const char* delim,
set<string>* res);
// The even-positioned (0-based) components become the keys for the
@@ -75,7 +75,7 @@ void SplitStringToSetUsing(const string& full, const char* delim,
// if the key was already present in the hash table, or will be the
// empty string if the key is a newly inserted key.
void SplitStringToHashmapUsing(const string& full, const char* delim,
- hash_map<string, string>* result);
+ my_hash_map<string, string>* result);
// ----------------------------------------------------------------------
// SplitOneIntToken()

View File

@@ -1,24 +0,0 @@
buildscripts/moduleconfig.py | 3 ---
1 file changed, 3 deletions(-)
diff --git a/buildscripts/moduleconfig.py b/buildscripts/moduleconfig.py
index b4d0bba0490..03541fab940 100644
--- a/buildscripts/moduleconfig.py
+++ b/buildscripts/moduleconfig.py
@@ -27,7 +27,6 @@ MongoDB SConscript files do.
__all__ = ('discover_modules', 'discover_module_directories', 'configure_modules',
'register_module_test') # pylint: disable=undefined-all-variable
-import imp
import inspect
import os
@@ -71,8 +70,6 @@ def discover_modules(module_root, allowed_modules):
print("adding module: %s" % (name))
fp = open(build_py, "r")
try:
- module = imp.load_module("module_" + name, fp, build_py,
- (".py", "r", imp.PY_SOURCE))
if getattr(module, "name", None) is None:
module.name = name
found_modules.append(module)

View File

@@ -1,16 +0,0 @@
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<long long> requests{0};
};
CacheAligned<Together> _together{};
- static_assert(sizeof(decltype(_together)) <= stdx::hardware_constructive_interference_size,
- "cache line spill");
CacheAligned<AtomicWord<long long>> _logicalBytesOut{0};

View File

@@ -1,71 +0,0 @@
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_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 <pcrecpp.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>

View File

@@ -1,47 +0,0 @@
wrt PATH:
"""
https://jira.mongodb.org/browse/SERVER-94430 Upstream respond:
> we intentionally do not ingest the environment PATH as this makes build
> reproducibility and hermiticity much harder. Instead, you should set the
> absolute paths to the tools you want to use on the command line, instead of
> relying on the PATH.
Gentoo bug https://bugs.gentoo.org/829340
In Gentoo, we have LLVM slotted and we put clang in /usr/lib/llvm/18/bin (or
whatever), not in /usr/bin, and if upstream strip PATH and construct it
themselves, they surely won't contain this location.
So we add PATH backup for scons.
"""
--- a/SConstruct
+++ b/SConstruct
@@ -2366,7 +2366,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",
@@ -2422,6 +2421,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
@@ -2473,8 +2474,8 @@ if env.TargetOSIs('posix'):
],
)
- #make scons colorgcc friendly
- for key in ('HOME', 'TERM'):
+ #make scons colorgcc, distcc, ccache friendly
+ for key in ('HOME', 'PATH', 'TERM'):
try:
env['ENV'][key] = os.environ[key]
except KeyError:

View File

@@ -1,12 +0,0 @@
diff --git a/src/mongo/installer/SConscript b/src/mongo/installer/SConscript
index 5bd89fe9..489e70ac 100644
--- a/src/mongo/installer/SConscript
+++ b/src/mongo/installer/SConscript
@@ -7,7 +7,6 @@ env = env.Clone()
env.SConscript(
dirs=[
- 'compass',
'msi',
],
exports=[

View File

@@ -1,13 +0,0 @@
diff --git a/SConstruct b/SConstruct
index 613110b7..4987e24e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2958,7 +2958,7 @@ def doConfigure(myenv):
# This warning was added in clang-5 and incorrectly flags our implementation of
# exceptionToStatus(). See https://bugs.llvm.org/show_bug.cgi?id=34804
- AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions")
+ #AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions")
# Enable sized deallocation support.
AddToCXXFLAGSIfSupported(myenv, '-fsized-deallocation')

View File

@@ -1,24 +0,0 @@
diff --git a/buildscripts/scons.py b/buildscripts/scons.py
index 534fca32..c38f64df 100755
--- a/buildscripts/scons.py
+++ b/buildscripts/scons.py
@@ -19,13 +19,13 @@ SITE_TOOLS_DIR = os.path.join(MONGODB_ROOT, 'site_scons')
sys.path = [SCONS_DIR, SITE_TOOLS_DIR] + sys.path
# pylint: disable=C0413
-from mongo.pip_requirements import verify_requirements, MissingRequirements
+#from mongo.pip_requirements import verify_requirements, MissingRequirements
-try:
- verify_requirements('etc/pip/compile-requirements.txt')
-except MissingRequirements as ex:
- print(ex)
- sys.exit(1)
+#try:
+# verify_requirements('etc/pip/compile-requirements.txt')
+#except MissingRequirements as ex:
+# print(ex)
+# sys.exit(1)
try:
import SCons.Script

View File

@@ -1,16 +0,0 @@
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
@@ -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);

View File

@@ -1,130 +0,0 @@
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 <boost/filesystem/operations.hpp>
+#include <boost/filesystem.hpp>
#include <fmt/format.h>
#include <iostream>
#include <memory>
--- 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>
--- 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 <algorithm>
#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/directory.hpp>
#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 <boost/iostreams/stream.hpp>
#include <boost/iostreams/stream_buffer.hpp>
#include <boost/iostreams/tee.hpp>
+#include <boost/filesystem.hpp>
#include <fcntl.h>
#include <fmt/format.h>
#include <iostream>
@@ -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 <boost/filesystem/convenience.hpp>
+#include <boost/filesystem/path.hpp>
#include <map>
#include <sstream>
#include <string>

View File

@@ -1,25 +0,0 @@
https://phabricator.services.mozilla.com/D209108
https://github.com/mozilla/gecko-dev/commit/33cdc6655b0de44cb7a431216dcbb0d5a552aec6
clang 19 will report error if w/o this patch:
src/third_party/mozjs-60/extract/js/src/threading/ExclusiveData.h:124:33: error: reference to non-static member function must be called
diff --git a/src/third_party/mozjs-60/extract/js/src/threading/ExclusiveData.h b/src/third_party/mozjs-60/extract/js/src/threading/ExclusiveData.h
index 25b977e..379a509 100644
--- a/src/third_party/mozjs-60/extract/js/src/threading/ExclusiveData.h
+++ b/src/third_party/mozjs-60/extract/js/src/threading/ExclusiveData.h
@@ -120,13 +120,6 @@ class ExclusiveData
release();
}
- ExclusiveData(ExclusiveData&& rhs)
- : lock_(mozilla::Move(rhs.lock))
- {
- MOZ_ASSERT(&rhs != this, "self-move disallowed!");
- new (mozilla::KnownNotNull, value_.addr()) T(mozilla::Move(*rhs.value_.addr()));
- }
-
ExclusiveData& operator=(ExclusiveData&& rhs) {
this->~ExclusiveData();
new (mozilla::KnownNotNull, this) ExclusiveData(mozilla::Move(rhs));

View File

@@ -1,27 +0,0 @@
https://jira.mongodb.org/browse/SERVER-94430 Upstream respond:
> we intentionally do not ingest the environment PATH as this makes build
> reproducibility and hermiticity much harder. Instead, you should set the
> absolute paths to the tools you want to use on the command line, instead of
> relying on the PATH.
Gentoo bug https://bugs.gentoo.org/829340
In Gentoo, we have LLVM slotted and we put clang in /usr/lib/llvm/18/bin (or
whatever), not in /usr/bin, and if upstream strip PATH and construct it
themselves, they surely won't contain this location.
So we add PATH backup for scons.
diff --git a/SConstruct b/SConstruct
index 3d831c9..f07feeb 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1201,7 +1201,7 @@ envDict = dict(BUILD_ROOT=buildDir,
if get_option('build-tools') == 'next':
SCons.Tool.DefaultToolpath.insert(0, os.path.abspath('site_scons/site_tools/next'))
-env = Environment(variables=env_vars, **envDict)
+env = Environment(variables=env_vars, ENV={'PATH': os.environ['PATH']}, **envDict)
del envDict
if get_option('cache-signature-mode') == 'validate':

View File

@@ -1,12 +0,0 @@
https://bugs.gentoo.org/768339
--- a/src/mongo/db/exec/plan_stats.h
+++ b/src/mongo/db/exec/plan_stats.h
@@ -33,6 +33,7 @@
#include <cstdlib>
#include <string>
#include <vector>
+#include <optional>
#include "mongo/db/index/multikey_paths.h"
#include "mongo/db/jsobj.h"

View File

@@ -1,13 +0,0 @@
https://github.com/abseil/abseil-cpp/commit/809e5de7b92950849289236a5a09e9cb4f32c7b9
diff --git a/src/third_party/abseil-cpp-master/abseil-cpp/absl/container/internal/container_memory.h b/src/third_party/abseil-cpp-master/abseil-cpp/absl/container/internal/container_memory.h
index e67529ecb6e..d777480d604 100644
--- a/src/third_party/abseil-cpp-master/abseil-cpp/absl/container/internal/container_memory.h
+++ b/src/third_party/abseil-cpp-master/abseil-cpp/absl/container/internal/container_memory.h
@@ -17,6 +17,7 @@
#include <cassert>
#include <cstddef>
+#include <cstdint>
#include <memory>
#include <new>
#include <tuple>

View File

@@ -1,11 +0,0 @@
https://bugs.gentoo.org/889020
--- a/src/mongo/util/boost_assert_shim.cpp
+++ b/src/mongo/util/boost_assert_shim.cpp
@@ -31,6 +31,7 @@
#if defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG)
+#include <exception>
#include <boost/assert.hpp>
namespace mongo {

View File

@@ -1,49 +0,0 @@
Don't automagically force lld > gold > bfd. Leave it up to the user.
In particular, avoids issues with LTO enabled (via the flag/scons option)
where using GCC as compiler, as lld can't do LTO with GCC.
https://bugs.gentoo.org/769986
--- a/SConstruct
+++ b/SConstruct
@@ -2824,40 +2824,6 @@ def doConfigure(myenv):
def AddToSHLINKFLAGSIfSupported(env, flag):
return AddFlagIfSupported(env, 'C', '.c', flag, True, SHLINKFLAGS=[flag])
- 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 AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=lld'):
- AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=gold')
- else:
- AddToLINKFLAGSIfSupported(myenv, '-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 AddToLINKFLAGSIfSupported(myenv, f'-fuse-ld={linker_ld}'):
- myenv.FatalError(f"Linker {linker_ld} could not be configured.")
-
detectCompiler = Configure(myenv, help=False, custom_tests = {
'CheckForCXXLink': CheckForCXXLink,
})

View File

@@ -1,81 +0,0 @@
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>

View File

@@ -1,12 +0,0 @@
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"

View File

@@ -1,110 +0,0 @@
wrt PATH:
"""
https://jira.mongodb.org/browse/SERVER-94430 Upstream respond:
> we intentionally do not ingest the environment PATH as this makes build
> reproducibility and hermiticity much harder. Instead, you should set the
> absolute paths to the tools you want to use on the command line, instead of
> relying on the PATH.
Gentoo bug https://bugs.gentoo.org/829340
In Gentoo, we have LLVM slotted and we put clang in /usr/lib/llvm/18/bin (or
whatever), not in /usr/bin, and if upstream strip PATH and construct it
themselves, they surely won't contain this location.
So we add PATH backup for scons.
"""
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")

View File

@@ -1,182 +0,0 @@
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>

View File

@@ -1,24 +0,0 @@
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

View File

@@ -1,286 +0,0 @@
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

View File

@@ -1,12 +0,0 @@
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 {

View File

@@ -1,132 +0,0 @@
wrt PATH:
"""
https://jira.mongodb.org/browse/SERVER-94430 Upstream respond:
> we intentionally do not ingest the environment PATH as this makes build
> reproducibility and hermiticity much harder. Instead, you should set the
> absolute paths to the tools you want to use on the command line, instead of
> relying on the PATH.
Gentoo bug https://bugs.gentoo.org/829340
In Gentoo, we have LLVM slotted and we put clang in /usr/lib/llvm/18/bin (or
whatever), not in /usr/bin, and if upstream strip PATH and construct it
themselves, they surely won't contain this location.
So we add PATH backup for scons.
"""
diff --git a/SConstruct b/SConstruct
index 2ebeb0e..44ce93a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -23,7 +23,6 @@ from pkg_resources import parse_version
import SCons
import SCons.Script
-from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics
from site_scons.mongo import build_profiles
# This must be first, even before EnsureSConsVersion, if
@@ -1657,13 +1656,6 @@ env.AddMethod(lambda env, name, **kwargs: add_option(name, **kwargs), 'AddOption
# The placement of this is intentional. Here we setup an atexit method to store tooling metrics.
# We should only register this function after env, env_vars and the parser have been properly initialized.
-SConsToolingMetrics.register_metrics(
- utc_starttime=datetime.utcnow(),
- artifact_dir=env.Dir('$BUILD_DIR').get_abspath(),
- env_vars=env_vars,
- env=env,
- parser=_parser,
-)
if get_option('build-metrics'):
env['BUILD_METRICS_ARTIFACTS_DIR'] = '$BUILD_ROOT/$VARIANT_DIR'
@@ -3034,7 +3026,6 @@ if env.TargetOSIs('posix'):
env.Append(
CCFLAGS=[
"-fasynchronous-unwind-tables",
- "-g2" if not env.TargetOSIs('emscripten') else "-g",
"-Wall",
"-Wsign-compare",
"-Wno-unknown-pragmas",
@@ -3101,6 +3092,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
@@ -3151,7 +3144,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:
@@ -3553,33 +3546,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':
- if not env.TargetOSIs('darwin', 'macOS'):
- if not myenv.AddToLINKFLAGSIfSupported('-fuse-ld=lld'):
- myenv.FatalError(
- f"The recommended linker 'lld' is not supported with the current compiler configuration, you can try the 'gold' linker with '--linker=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,
@@ -5119,17 +5085,13 @@ def doConfigure(myenv):
"BOOST_LOG_NO_SHORTHAND_NAMES",
"BOOST_LOG_USE_NATIVE_SYSLOG",
"BOOST_LOG_WITHOUT_THREAD_ATTR",
+ "BOOST_LOG_DYN_LINK",
"BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS",
"BOOST_SYSTEM_NO_DEPRECATED",
"BOOST_THREAD_USES_DATETIME",
("BOOST_THREAD_VERSION", "5"),
])
- 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")
@@ -5326,6 +5288,9 @@ def doConfigure(myenv):
mongoc_mode = get_option('use-system-mongo-c')
conf.env['MONGO_HAVE_LIBMONGOC'] = False
+ conf.env.ParseConfig('pkg-config libbson-1.0 libmongoc-1.0 --cflags')
+ conf.env['LIBDEPS_LIBBSON_SYSLIBDEP'] = 'bson-1.0'
+
if mongoc_mode != 'off':
if conf.CheckLibWithHeader(
["mongoc-1.0"],

View File

@@ -1,204 +0,0 @@
From 50d52404a69171052a9a55259ba7cd1ec9ce6a18 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Valenduc?= <francoisvalenduc@gmail.com>
Date: Sat, 26 Apr 2025 12:07:21 +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 | 1 +
src/mongo/shell/shell_utils_launcher.cpp | 13 +++++++------
src/mongo/shell/shell_utils_launcher.h | 2 +-
src/mongo/unittest/golden_test_base.cpp | 2 +-
9 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/src/mongo/db/initialize_server_global_state.cpp b/src/mongo/db/initialize_server_global_state.cpp
index 02a30aac334..e774cc4019a 100644
--- a/src/mongo/db/initialize_server_global_state.cpp
+++ b/src/mongo/db/initialize_server_global_state.cpp
@@ -33,7 +33,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>
@@ -310,7 +310,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 af81012ad41..c334e4b386c 100644
--- a/src/mongo/db/startup_warnings_mongod.cpp
+++ b/src/mongo/db/startup_warnings_mongod.cpp
@@ -33,6 +33,7 @@
#include "mongo/db/startup_warnings_mongod.h"
#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/exception.hpp>
#include <fstream>
#ifdef __linux__
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 41fefe73cdf..e8d1d0c08ed 100644
--- a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
+++ b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
@@ -57,7 +57,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",
@@ -66,7 +66,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 4008ac80d9b..fe2abacbfca 100644
--- a/src/mongo/db/storage/storage_engine_metadata.cpp
+++ b/src/mongo/db/storage/storage_engine_metadata.cpp
@@ -222,7 +222,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",
@@ -231,7 +231,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 7faf89e5ae8..c5e21a62c4d 100644
--- a/src/mongo/scripting/engine.cpp
+++ b/src/mongo/scripting/engine.cpp
@@ -34,6 +34,7 @@
#include <algorithm>
#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/directory.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 30a04df5a89..1ff93db38be 100644
--- a/src/mongo/shell/shell_utils_launcher.cpp
+++ b/src/mongo/shell/shell_utils_launcher.cpp
@@ -36,6 +36,7 @@
#include <boost/iostreams/stream_buffer.hpp>
#include <boost/iostreams/tee.hpp>
#include <csignal>
+#include <boost/filesystem.hpp>
#include <fcntl.h>
#include <fmt/format.h>
#include <fstream>
@@ -316,26 +317,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 65337f061b3..b92d1126c5d 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/unittest/golden_test_base.cpp b/src/mongo/unittest/golden_test_base.cpp
index 1544fd3a37b..14f96d0ec75 100644
--- a/src/mongo/unittest/golden_test_base.cpp
+++ b/src/mongo/unittest/golden_test_base.cpp
@@ -95,7 +95,7 @@ GoldenTestEnvironment::GoldenTestEnvironment() : _goldenDataRoot(".") {
fs::path outputRoot;
if (opts.outputRootPattern) {
fs::path pattern(*opts.outputRootPattern);
- outputRoot = pattern.parent_path() / fs::unique_path(pattern.leaf());
+ outputRoot = pattern.parent_path() / fs::unique_path(pattern.filename());
} else {
outputRoot = fs::temp_directory_path() / fs::unique_path("out-%%%%-%%%%-%%%%-%%%%");
}
--
2.49.0

View File

@@ -1,253 +0,0 @@
wrt PATH:
"""
https://jira.mongodb.org/browse/SERVER-94430 Upstream respond:
> we intentionally do not ingest the environment PATH as this makes build
> reproducibility and hermiticity much harder. Instead, you should set the
> absolute paths to the tools you want to use on the command line, instead of
> relying on the PATH.
Gentoo bug https://bugs.gentoo.org/829340
In Gentoo, we have LLVM slotted and we put clang in /usr/lib/llvm/18/bin (or
whatever), not in /usr/bin, and if upstream strip PATH and construct it
themselves, they surely won't contain this location.
So we add PATH backup for scons.
"""
diff --git a/SConstruct2 b/SConstruct
index e9aa2ca..5814f4a 100644
--- a/SConstruct2
+++ b/SConstruct
@@ -25,7 +25,7 @@ from pkg_resources import parse_version
import SCons
import SCons.Script
-from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics
+#from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics
from site_scons.mongo import build_profiles
# This must be first, even before EnsureSConsVersion, if
@@ -1724,13 +1724,13 @@ env.AddMethod(lambda env, name, **kwargs: add_option(name, **kwargs), 'AddOption
# The placement of this is intentional. Here we setup an atexit method to store tooling metrics.
# We should only register this function after env, env_vars and the parser have been properly initialized.
-SConsToolingMetrics.register_metrics(
- utc_starttime=datetime.utcnow(),
- artifact_dir=env.Dir('$BUILD_DIR').get_abspath(),
- env_vars=env_vars,
- env=env,
- parser=_parser,
-)
+#SConsToolingMetrics.register_metrics(
+# utc_starttime=datetime.utcnow(),
+# artifact_dir=env.Dir('$BUILD_DIR').get_abspath(),
+# env_vars=env_vars,
+# env=env,
+# parser=_parser,
+#)
if get_option('build-metrics'):
env['BUILD_METRICS_ARTIFACTS_DIR'] = '$BUILD_ROOT/$VARIANT_DIR'
@@ -3132,7 +3132,7 @@ if env.TargetOSIs('posix'):
env.Append(
CCFLAGS=[
"-fasynchronous-unwind-tables",
- "-g2" if not env.TargetOSIs('emscripten') else "-g",
+# "-g2" if not env.TargetOSIs('emscripten') else "-g",
"-Wall",
"-Wsign-compare",
"-Wno-unknown-pragmas",
@@ -3200,6 +3200,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
@@ -3250,7 +3252,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:
@@ -3644,35 +3646,35 @@ 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 == "bfd" and env.get("BAZEL_BUILD_ENABLED"):
- myenv.FatalError(f"The linker 'bfd' is not supported with BAZEL_BUILD_ENABLED.")
- elif linker_ld == 'auto':
- if not env.TargetOSIs('darwin', 'macOS'):
- if not myenv.AddToLINKFLAGSIfSupported('-fuse-ld=lld'):
- myenv.FatalError(
- f"The recommended linker 'lld' is not supported with the current compiler configuration, you can try the 'gold' linker with '--linker=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'])
+# 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 == "bfd" and env.get("BAZEL_BUILD_ENABLED"):
+# myenv.FatalError(f"The linker 'bfd' is not supported with BAZEL_BUILD_ENABLED.")
+# elif linker_ld == 'auto':
+# if not env.TargetOSIs('darwin', 'macOS'):
+# if not myenv.AddToLINKFLAGSIfSupported('-fuse-ld=lld'):
+# myenv.FatalError(
+# f"The recommended linker 'lld' is not supported with the current compiler configuration, you can try the 'gold' linker with '--linker=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,
@@ -4765,42 +4767,42 @@ def doConfigure(myenv):
if optBuild == "off" and myenv.ToolchainIs('clang') and env.TargetOSIs('darwin'):
myenv.AddToLINKFLAGSIfSupported("-Wl,-no_deduplicate")
- # Apply any link time optimization settings as selected by the 'lto' option.
- if has_option('lto'):
- if myenv.ToolchainIs('msvc'):
- # Note that this is actually more aggressive than LTO, it is whole program
- # optimization due to /GL. However, this is historically what we have done for
- # windows, so we are keeping it.
- #
- # /GL implies /LTCG, so no need to say it in CCFLAGS, but we do need /LTCG on the
- # link flags.
- myenv.Append(CCFLAGS=['/GL'])
- myenv.Append(LINKFLAGS=['/LTCG'])
- myenv.Append(ARFLAGS=['/LTCG'])
- elif myenv.ToolchainIs('gcc', 'clang'):
- # For GCC and clang, the flag is -flto, and we need to pass it both on the compile
- # and link lines.
- if not myenv.AddToCCFLAGSIfSupported('-flto') or \
- not myenv.AddToLINKFLAGSIfSupported('-flto'):
- myenv.ConfError("Link time optimization requested, "
- "but selected compiler does not honor -flto")
-
- if myenv.TargetOSIs('darwin'):
- myenv.AddToLINKFLAGSIfSupported('-Wl,-object_path_lto,${TARGET}.lto')
- else:
- # According to intel benchmarks -fno-plt increases perf
- # See PM-2215
- if linker_ld != "gold":
- myenv.ConfError("lto compilation currently only works with the --linker=gold")
- if link_model != "object":
- myenv.ConfError(
- "lto compilation currently only works with the --link-model=object")
- if not myenv.AddToCCFLAGSIfSupported('-fno-plt') or \
- not myenv.AddToLINKFLAGSIfSupported('-fno-plt'):
- myenv.ConfError("-fno-plt is not supported by the compiler")
-
- else:
- myenv.ConfError("Don't know how to enable --lto on current toolchain")
+# # Apply any link time optimization settings as selected by the 'lto' option.
+# if has_option('lto'):
+# if myenv.ToolchainIs('msvc'):
+# # Note that this is actually more aggressive than LTO, it is whole program
+# # optimization due to /GL. However, this is historically what we have done for
+# # windows, so we are keeping it.
+# #
+# # /GL implies /LTCG, so no need to say it in CCFLAGS, but we do need /LTCG on the
+# # link flags.
+# myenv.Append(CCFLAGS=['/GL'])
+# myenv.Append(LINKFLAGS=['/LTCG'])
+# myenv.Append(ARFLAGS=['/LTCG'])
+# elif myenv.ToolchainIs('gcc', 'clang'):
+# # For GCC and clang, the flag is -flto, and we need to pass it both on the compile
+# # and link lines.
+# if not myenv.AddToCCFLAGSIfSupported('-flto') or \
+# not myenv.AddToLINKFLAGSIfSupported('-flto'):
+# myenv.ConfError("Link time optimization requested, "
+# "but selected compiler does not honor -flto")
+#
+# if myenv.TargetOSIs('darwin'):
+# myenv.AddToLINKFLAGSIfSupported('-Wl,-object_path_lto,${TARGET}.lto')
+# else:
+# # According to intel benchmarks -fno-plt increases perf
+# # See PM-2215
+# if linker_ld != "gold":
+# myenv.ConfError("lto compilation currently only works with the --linker=gold")
+# if link_model != "object":
+# myenv.ConfError(
+# "lto compilation currently only works with the --link-model=object")
+# if not myenv.AddToCCFLAGSIfSupported('-fno-plt') or \
+# not myenv.AddToLINKFLAGSIfSupported('-fno-plt'):
+# myenv.ConfError("-fno-plt is not supported by the compiler")
+#
+# else:
+# myenv.ConfError("Don't know how to enable --lto on current toolchain")
if get_option('runtime-hardening') == "on" and optBuild != "off":
# Older glibc doesn't work well with _FORTIFY_SOURCE=2. Selecting 2.11 as the minimum was an
@@ -5263,16 +5265,17 @@ def doConfigure(myenv):
"BOOST_LOG_NO_SHORTHAND_NAMES",
"BOOST_LOG_USE_NATIVE_SYSLOG",
"BOOST_LOG_WITHOUT_THREAD_ATTR",
+ "BOOST_LOG_DYN_LINK",
"BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS",
"BOOST_SYSTEM_NO_DEPRECATED",
"BOOST_THREAD_USES_DATETIME",
("BOOST_THREAD_VERSION", "5"),
])
- if link_model.startswith("dynamic") and not link_model == 'dynamic-sdk':
- conf.env.AppendUnique(CPPDEFINES=[
- "BOOST_LOG_DYN_LINK",
- ])
+# 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"):
@@ -5473,6 +5476,8 @@ def doConfigure(myenv):
mongoc_mode = get_option('use-system-mongo-c')
conf.env['MONGO_HAVE_LIBMONGOC'] = False
+ # conf.env.ParseConfig('pkg-config libbson-1.0 libmongoc-1.0 --cflags')
+ # conf.env['LIBDEPS_LIBBSON_SYSLIBDEP'] = 'bson-1.0'
if mongoc_mode != 'off':
if conf.CheckLibWithHeader(
["mongoc-1.0"],

View File

@@ -1,40 +0,0 @@
From bc8f2b53c1b99943e49f7bd42ee4d0e1bd8d4562 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Valenduc?= <francoisvalenduc@gmail.com>
Date: Mon, 28 Apr 2025 13:46:34 +0200
Subject: [PATCH] add PATH backup for scons
https://jira.mongodb.org/browse/SERVER-94430 Upstream respond:
> we intentionally do not ingest the environment PATH as this makes build
> reproducibility and hermiticity much harder. Instead, you should set the
> absolute paths to the tools you want to use on the command line, instead of
> relying on the PATH.
Gentoo bug https://bugs.gentoo.org/829340
In Gentoo, we have LLVM slotted and we put clang in /usr/lib/llvm/18/bin (or
whatever), not in /usr/bin, and if upstream strip PATH and construct it
themselves, they surely won't contain this location.
So we add PATH backup for scons.
---
SConstruct | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SConstruct b/SConstruct
index e9aa2ca0b16..2f04bc9b8f6 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1718,7 +1718,7 @@ envDict = dict(
if get_option('build-tools') == 'next':
SCons.Tool.DefaultToolpath.insert(0, os.path.abspath('site_scons/site_tools/next'))
-env = Environment(variables=env_vars, **envDict)
+env = Environment(variables=env_vars, ENV={'PATH': os.environ['PATH']}, **envDict)
del envDict
env.AddMethod(lambda env, name, **kwargs: add_option(name, **kwargs), 'AddOption')
--
2.49.0

View File

@@ -1,267 +0,0 @@
From 9a65b01b0d86c48af4e8b40c6142ae501dc11141 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Valenduc?= <francoisvalenduc@gmail.com>
Date: Thu, 17 Apr 2025 17:49:59 +0200
Subject: [PATCH] fixes for boost 1.85
---
src/mongo/client/sdam/sdam_json_test_runner.cpp | 2 +-
.../sdam/server_selection_json_test_runner.cpp | 2 +-
src/mongo/db/initialize_server_global_state.cpp | 2 +-
src/mongo/db/startup_warnings_mongod.cpp | 3 ++-
.../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 | 3 ++-
src/mongo/shell/shell_utils_launcher.cpp | 12 ++++++------
src/mongo/shell/shell_utils_launcher.h | 2 +-
src/mongo/unittest/golden_test.cpp | 2 +-
src/mongo/unittest/golden_test.h | 2 +-
src/mongo/unittest/golden_test_base.cpp | 4 ++--
src/mongo/unittest/golden_test_test.cpp | 2 +-
src/mongo/util/options_parser/options_parser.cpp | 2 +-
14 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/src/mongo/client/sdam/sdam_json_test_runner.cpp b/src/mongo/client/sdam/sdam_json_test_runner.cpp
index b10f7a25971..e29907a089f 100644
--- a/src/mongo/client/sdam/sdam_json_test_runner.cpp
+++ b/src/mongo/client/sdam/sdam_json_test_runner.cpp
@@ -41,7 +41,7 @@
#include <absl/container/node_hash_set.h>
#include <boost/filesystem/directory.hpp>
#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/path_traits.hpp>
+#include <boost/filesystem.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/move/utility_core.hpp>
diff --git a/src/mongo/client/sdam/server_selection_json_test_runner.cpp b/src/mongo/client/sdam/server_selection_json_test_runner.cpp
index 5b916ff7ce7..d20909fce74 100644
--- a/src/mongo/client/sdam/server_selection_json_test_runner.cpp
+++ b/src/mongo/client/sdam/server_selection_json_test_runner.cpp
@@ -29,7 +29,7 @@
#include <boost/filesystem/directory.hpp>
#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/path_traits.hpp>
+#include <boost/filesystem.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/none.hpp>
diff --git a/src/mongo/db/initialize_server_global_state.cpp b/src/mongo/db/initialize_server_global_state.cpp
index 2e03433fabb..64481d9e227 100644
--- a/src/mongo/db/initialize_server_global_state.cpp
+++ b/src/mongo/db/initialize_server_global_state.cpp
@@ -332,7 +332,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 a7fcc3e632b..6bf12381704 100644
--- a/src/mongo/db/startup_warnings_mongod.cpp
+++ b/src/mongo/db/startup_warnings_mongod.cpp
@@ -28,7 +28,8 @@
*/
#include "mongo/db/startup_warnings_mongod.h"
-
+#include <boost/filesystem.hpp>
+#include <boost/filesystem/operations.hpp>
#include <fmt/format.h>
#include <fstream>
#include <ios>
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 5116a72bc0e..39182f0e6a0 100644
--- a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
+++ b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
@@ -72,7 +72,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,
"flushMyDirectory couldn't find parent dir for file",
"file"_attr = file.generic_string());
@@ -80,7 +80,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 690e34d2630..6ecfb48de5b 100644
--- a/src/mongo/db/storage/storage_engine_metadata.cpp
+++ b/src/mongo/db/storage/storage_engine_metadata.cpp
@@ -232,7 +232,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,
"flushMyDirectory couldn't find parent dir for file",
"file"_attr = file.generic_string());
@@ -240,7 +240,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 ff6c81e38db..632a142ef28 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
@@ -69,6 +69,7 @@
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
+#include <boost/system/error_code.hpp>
#include <boost/none.hpp>
#include <boost/none_t.hpp>
#include <boost/optional.hpp>
@@ -182,7 +183,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();
}
bool WiredTigerFileVersion::shouldDowngrade(bool hasRecoveryTimestamp) {
diff --git a/src/mongo/shell/shell_utils_launcher.cpp b/src/mongo/shell/shell_utils_launcher.cpp
index ae5175a2a6d..b89fa59ac0d 100644
--- a/src/mongo/shell/shell_utils_launcher.cpp
+++ b/src/mongo/shell/shell_utils_launcher.cpp
@@ -331,26 +331,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 65337f061b3..fc15c8c0d85 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/operations.hpp>
#include <map>
#include <sstream>
#include <string>
diff --git a/src/mongo/unittest/golden_test.cpp b/src/mongo/unittest/golden_test.cpp
index e01961b6060..be8f70148cf 100644
--- a/src/mongo/unittest/golden_test.cpp
+++ b/src/mongo/unittest/golden_test.cpp
@@ -33,7 +33,7 @@
#include <iostream>
#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/path_traits.hpp>
+#include <boost/filesystem.hpp>
#include <boost/optional/optional.hpp>
#include "mongo/base/init.h" // IWYU pragma: keep
diff --git a/src/mongo/unittest/golden_test.h b/src/mongo/unittest/golden_test.h
index 4c83503a9d3..75390265c75 100644
--- a/src/mongo/unittest/golden_test.h
+++ b/src/mongo/unittest/golden_test.h
@@ -30,7 +30,7 @@
#pragma once
#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/path_traits.hpp>
+#include <boost/filesystem.hpp>
#include <boost/optional/optional.hpp>
#include <functional>
#include <string>
diff --git a/src/mongo/unittest/golden_test_base.cpp b/src/mongo/unittest/golden_test_base.cpp
index 1d6c4331c32..a000658b099 100644
--- a/src/mongo/unittest/golden_test_base.cpp
+++ b/src/mongo/unittest/golden_test_base.cpp
@@ -31,7 +31,7 @@
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/path_traits.hpp>
+#include <boost/filesystem.hpp>
#include <boost/function/function_base.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/none.hpp>
@@ -116,7 +116,7 @@ GoldenTestEnvironment::GoldenTestEnvironment() : _goldenDataRoot(".") {
fs::path outputRoot;
if (opts.outputRootPattern) {
fs::path pattern(*opts.outputRootPattern);
- outputRoot = pattern.parent_path() / fs::unique_path(pattern.leaf());
+ outputRoot = pattern.parent_path() / fs::unique_path(pattern.filename());
} else {
outputRoot = fs::temp_directory_path() / fs::unique_path("out-%%%%-%%%%-%%%%-%%%%");
}
diff --git a/src/mongo/unittest/golden_test_test.cpp b/src/mongo/unittest/golden_test_test.cpp
index 874d73bf52a..fb64834cfc7 100644
--- a/src/mongo/unittest/golden_test_test.cpp
+++ b/src/mongo/unittest/golden_test_test.cpp
@@ -32,7 +32,7 @@
#include <string>
#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/path_traits.hpp>
+#include <boost/filesystem.hpp>
#include <fmt/format.h>
#include "mongo/base/string_data.h"
diff --git a/src/mongo/util/options_parser/options_parser.cpp b/src/mongo/util/options_parser/options_parser.cpp
index 46255631358..100b4c7c2bb 100644
--- a/src/mongo/util/options_parser/options_parser.cpp
+++ b/src/mongo/util/options_parser/options_parser.cpp
@@ -35,7 +35,7 @@
#include <boost/any/bad_any_cast.hpp>
#include <boost/core/typeinfo.hpp>
#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/path_traits.hpp>
+#include <boost/filesystem.hpp>
#include <boost/iostreams/categories.hpp>
#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/imbue.hpp>
--
2.49.0

View File

@@ -1,28 +0,0 @@
From 67320f150c65ece68118d1c9ecfd1c0a1f69ba6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Valenduc?= <francoisvalenduc@gmail.com>
Date: Mon, 28 Apr 2025 14:16:08 +0200
Subject: [PATCH] remove unused constructor
---
.../mozjs/extract/js/src/threading/ExclusiveData.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/third_party/mozjs/extract/js/src/threading/ExclusiveData.h b/src/third_party/mozjs/extract/js/src/threading/ExclusiveData.h
index 38e89f10a1d..2d8ca831bf7 100644
--- a/src/third_party/mozjs/extract/js/src/threading/ExclusiveData.h
+++ b/src/third_party/mozjs/extract/js/src/threading/ExclusiveData.h
@@ -109,11 +109,6 @@ class ExclusiveData {
explicit ExclusiveData(const MutexId& id, Args&&... args)
: lock_(id), value_(std::forward<Args>(args)...) {}
- ExclusiveData(ExclusiveData&& rhs)
- : lock_(std::move(rhs.lock)), value_(std::move(rhs.value_)) {
- MOZ_ASSERT(&rhs != this, "self-move disallowed!");
- }
-
ExclusiveData& operator=(ExclusiveData&& rhs) {
this->~ExclusiveData();
new (mozilla::KnownNotNull, this) ExclusiveData(std::move(rhs));
--
2.49.0

View File

@@ -1,24 +0,0 @@
diff --git a/buildscripts/scons2.py b/buildscripts/scons.py
index b1ddc85..b2e61e9 100755
--- a/buildscripts/scons2.py
+++ b/buildscripts/scons.py
@@ -19,13 +19,13 @@ SITE_TOOLS_DIR = os.path.join(MONGODB_ROOT, 'site_scons')
sys.path = [SCONS_DIR, SITE_TOOLS_DIR] + sys.path
# pylint: disable=C0413
-from mongo.pip_requirements import verify_requirements, MissingRequirements
+#from mongo.pip_requirements import verify_requirements, MissingRequirements
-try:
- verify_requirements()
-except MissingRequirements as ex:
- print(ex)
- sys.exit(1)
+#try:
+# verify_requirements()
+#except MissingRequirements as ex:
+# print(ex)
+# sys.exit(1)
try:
import SCons.Script

View File

@@ -1,37 +0,0 @@
From 4903458dd8933b0754da3b00109a042a5ccf23a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Valenduc?= <francoisvalenduc@gmail.com>
Date: Tue, 29 Apr 2025 18:52:54 +0200
Subject: [PATCH] replace retry by tenacity
the retry decorator is used in site_scons/site_tools/integrate_bazel.py
which is part of the retry package not available in Gentoo.
Replace it by tenacity which is well included in Gentoo.
---
site_scons/site_tools/integrate_bazel.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/site_scons/site_tools/integrate_bazel.py b/site_scons/site_tools/integrate_bazel.py
index b9e2143f23c..995df696d10 100644
--- a/site_scons/site_tools/integrate_bazel.py
+++ b/site_scons/site_tools/integrate_bazel.py
@@ -16,7 +16,7 @@ import threading
from typing import List, Dict, Set, Tuple, Any
import urllib.request
import requests
-from retry import retry
+from tenacity import retry, stop_after_attempt, wait_fixed
import sys
import SCons
@@ -477,7 +477,7 @@ def generate_bazel_info_for_ninja(env: SCons.Environment.Environment) -> None:
env["NINJA_BAZEL_INPUTS"] = ninja_bazel_ins
-@retry(tries=5, delay=3)
+@retry(stop=stop_after_attempt(3), wait=wait_fixed(0.1))
def download_path_with_retry(*args, **kwargs):
urllib.request.urlretrieve(*args, **kwargs)
--
2.49.0

View File

@@ -18,6 +18,7 @@ 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"
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-5.0.30-patches.tar.xz"
S="${WORKDIR}/${MY_P}"
LICENSE="Apache-2.0 SSPL-1"
@@ -63,23 +64,23 @@ PDEPEND="
"
PATCHES=(
"${FILESDIR}/${PN}-4.4.1-boost.patch"
"${FILESDIR}/${PN}-5.0.30-gcc-11.patch"
"${FILESDIR}/${PN}-5.0.2-fix-scons.patch"
"${FILESDIR}/${PN}-5.0.2-no-compass.patch"
"${FILESDIR}/${PN}-5.0.2-skip-no-exceptions.patch"
"${FILESDIR}/${PN}-5.0.2-skip-reqs-check.patch"
"${FILESDIR}/${PN}-5.0.2-boost-1.79.patch"
"${FILESDIR}/${PN}-5.0.5-no-force-lld.patch"
"${FILESDIR}/${PN}-4.4.10-boost-1.81.patch"
"${FILESDIR}/${PN}-5.0.5-boost-1.81-extra.patch"
"${FILESDIR}/${PN}-5.0.16-arm64-assert.patch"
"${FILESDIR}/${PN}-4.4.29-no-enterprise.patch"
"${FILESDIR}/${PN}-5.0.26-boost-1.85.patch"
"${FILESDIR}/${PN}-5.0.26-boost-1.85-extra.patch"
"${FILESDIR}/${PN}-5.0.30-gcc-15.patch"
"${FILESDIR}/${PN}-5.0.26-scons.patch"
"${FILESDIR}/${PN}-5.0.26-mozjs-remove-unused-constructor.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-4.4.1-boost.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.30-gcc-11.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.2-fix-scons.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.2-no-compass.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.2-skip-no-exceptions.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.2-skip-reqs-check.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.2-boost-1.79.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.5-no-force-lld.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-4.4.10-boost-1.81.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.5-boost-1.81-extra.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.16-arm64-assert.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-4.4.29-no-enterprise.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.26-boost-1.85.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.26-boost-1.85-extra.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.30-gcc-15.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.26-scons.patch"
"${WORKDIR}/mongodb-5.0.30-patches/${PN}-5.0.26-mozjs-remove-unused-constructor.patch"
)
python_check_deps() {
@@ -185,19 +186,19 @@ src_install() {
doman debian/mongo*.1
dodoc README docs/building.md
newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
newinitd "${FILESDIR}/mongos.initd-r3" mongos
newconfd "${FILESDIR}/mongos.confd-r3" mongos
newinitd "${WORKDIR}/mongodb-5.0.30-patches/${PN}.initd-r3" ${PN}
newconfd "${WORKDIR}/mongodb-5.0.30-patches/${PN}.confd-r3" ${PN}
newinitd "${WORKDIR}/mongodb-5.0.30-patches/mongos.initd-r3" mongos
newconfd "${WORKDIR}/mongodb-5.0.30-patches/mongos.confd-r3" mongos
insinto /etc
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
newins "${FILESDIR}/mongos.conf-r2" mongos.conf
newins "${WORKDIR}/mongodb-5.0.30-patches/${PN}.conf-r3" ${PN}.conf
newins "${WORKDIR}/mongodb-5.0.30-patches/mongos.conf-r2" mongos.conf
systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
systemd_newunit "${WORKDIR}/mongodb-5.0.30-patches/${PN}.service-r1" "${PN}.service"
insinto /etc/logrotate.d/
newins "${FILESDIR}/${PN}.logrotate" ${PN}
newins "${WORKDIR}/mongodb-5.0.30-patches/${PN}.logrotate" ${PN}
# see bug #526114
pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}

View File

@@ -18,6 +18,7 @@ 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"
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-6.0.22-patches.tar.xz"
S="${WORKDIR}/${MY_P}"
LICENSE="Apache-2.0 SSPL-1"
@@ -63,15 +64,15 @@ PDEPEND="
"
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"
"${WORKDIR}/mongodb-6.0.22-patches/mongodb-4.4.29-no-enterprise.patch"
"${WORKDIR}/mongodb-6.0.22-patches/${PN}-5.0.2-no-compass.patch"
"${WORKDIR}/mongodb-6.0.22-patches/${PN}-5.0.2-skip-reqs-check.patch"
"${WORKDIR}/mongodb-6.0.22-patches/${PN}-4.4.10-boost-1.81.patch"
"${WORKDIR}/mongodb-6.0.22-patches/mongodb-6.0.0-boost-1.79.patch"
"${WORKDIR}/mongodb-6.0.22-patches/mongodb-6.0.0-gcc12.patch"
"${WORKDIR}/mongodb-6.0.22-patches/mongodb-6.0.7-gcc-13.patch"
"${WORKDIR}/mongodb-6.0.22-patches/mongodb-6.0.21-boost-1.85.patch"
"${WORKDIR}/mongodb-6.0.22-patches/mongodb-6.0.2-sconstruct-changes.patch"
)
python_check_deps() {
@@ -176,19 +177,19 @@ src_install() {
doman debian/mongo*.1
dodoc docs/building.md
newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
newinitd "${FILESDIR}/mongos.initd-r3" mongos
newconfd "${FILESDIR}/mongos.confd-r3" mongos
newinitd "${WORKDIR}/mongodb-6.0.22-patches/${PN}.initd-r3" ${PN}
newconfd "${WORKDIR}/mongodb-6.0.22-patches/${PN}.confd-r3" ${PN}
newinitd "${WORKDIR}/mongodb-6.0.22-patches/mongos.initd-r3" mongos
newconfd "${WORKDIR}/mongodb-6.0.22-patches/mongos.confd-r3" mongos
insinto /etc
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
newins "${FILESDIR}/mongos.conf-r2" mongos.conf
newins "${WORKDIR}/mongodb-6.0.22-patches/${PN}.conf-r3" ${PN}.conf
newins "${WORKDIR}/mongodb-6.0.22-patches/mongos.conf-r2" mongos.conf
systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
systemd_newunit "${WORKDIR}/mongodb-6.0.22-patches/${PN}.service-r1" "${PN}.service"
insinto /etc/logrotate.d/
newins "${FILESDIR}/${PN}.logrotate" ${PN}
newins "${WORKDIR}/mongodb-6.0.22-patches/${PN}.logrotate" ${PN}
# see bug #526114
pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}

View File

@@ -18,6 +18,7 @@ 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"
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-7.0.18-patches.tar.xz"
S="${WORKDIR}/${MY_P}"
LICENSE="Apache-2.0 SSPL-1"
@@ -66,13 +67,13 @@ PDEPEND="
"
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}/${PN}-7.0.1-sconstruct.patch"
"${FILESDIR}/extrapatch-sconstruct.patch"
"${FILESDIR}/mongodb-7.0.18-boost-1.85.patch"
"${WORKDIR}/mongodb-7.0.18-patches/mongodb-4.4.29-no-enterprise.patch"
"${WORKDIR}/mongodb-7.0.18-patches/${PN}-5.0.2-no-compass.patch"
"${WORKDIR}/mongodb-7.0.18-patches/${PN}-5.0.2-skip-reqs-check.patch"
"${WORKDIR}/mongodb-7.0.18-patches/${PN}-4.4.10-boost-1.81.patch"
"${WORKDIR}/mongodb-7.0.18-patches/${PN}-7.0.1-sconstruct.patch"
"${WORKDIR}/mongodb-7.0.18-patches/extrapatch-sconstruct.patch"
"${WORKDIR}/mongodb-7.0.18-patches/mongodb-7.0.18-boost-1.85.patch"
)
python_check_deps() {
@@ -178,19 +179,19 @@ src_install() {
doman debian/mongo*.1
dodoc docs/building.md
newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
newinitd "${FILESDIR}/mongos.initd-r3" mongos
newconfd "${FILESDIR}/mongos.confd-r3" mongos
newinitd "${WORKDIR}/mongodb-7.0.18-patches/${PN}.initd-r3" ${PN}
newconfd "${WORKDIR}/mongodb-7.0.18-patches/${PN}.confd-r3" ${PN}
newinitd "${WORKDIR}/mongodb-7.0.18-patches/mongos.initd-r3" mongos
newconfd "${WORKDIR}/mongodb-7.0.18-patches/mongos.confd-r3" mongos
insinto /etc
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
newins "${FILESDIR}/mongos.conf-r2" mongos.conf
newins "${WORKDIR}/mongodb-7.0.18-patches/${PN}.conf-r3" ${PN}.conf
newins "${WORKDIR}/mongodb-7.0.18-patches/mongos.conf-r2" mongos.conf
systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
systemd_newunit "${WORKDIR}/mongodb-7.0.18-patches/${PN}.service-r1" "${PN}.service"
insinto /etc/logrotate.d/
newins "${FILESDIR}/${PN}.logrotate" ${PN}
newins "${WORKDIR}/mongodb-7.0.18-patches/${PN}.logrotate" ${PN}
# see bug #526114
pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}

View File

@@ -18,6 +18,7 @@ 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"
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-8.0.8-patches.tar.xz"
S="${WORKDIR}/${MY_P}"
LICENSE="Apache-2.0 SSPL-1"
@@ -68,14 +69,14 @@ PDEPEND="
"
PATCHES=(
"${FILESDIR}/mongodb-4.4.29-no-enterprise.patch"
"${FILESDIR}/${PN}-5.0.2-no-compass.patch"
"${FILESDIR}/${PN}-7.0.2-sconstruct.patch"
"${FILESDIR}/${PN}-8.0.6-skip-reqs-check.patch"
"${FILESDIR}/${PN}-8.0.6-fixes-for-boost-1.85.patch"
"${FILESDIR}/${PN}-8.0.4-scons.patch"
"${FILESDIR}/${PN}-8.0.6-mozjs-remove-unused-constructor.patch"
"${FILESDIR}/${PN}-8.0.6-use-tenacity.patch"
"${WORKDIR}/mongodb-8.0.8-patches/mongodb-4.4.29-no-enterprise.patch"
"${WORKDIR}/mongodb-8.0.8-patches/${PN}-5.0.2-no-compass.patch"
"${WORKDIR}/mongodb-8.0.8-patches/${PN}-7.0.2-sconstruct.patch"
"${WORKDIR}/mongodb-8.0.8-patches/${PN}-8.0.6-skip-reqs-check.patch"
"${WORKDIR}/mongodb-8.0.8-patches/${PN}-8.0.6-fixes-for-boost-1.85.patch"
"${WORKDIR}/mongodb-8.0.8-patches/${PN}-8.0.4-scons.patch"
"${WORKDIR}/mongodb-8.0.8-patches/${PN}-8.0.6-mozjs-remove-unused-constructor.patch"
"${WORKDIR}/mongodb-8.0.8-patches/${PN}-8.0.6-use-tenacity.patch"
)
python_check_deps() {
@@ -184,19 +185,19 @@ src_install() {
doman debian/mongo*.1
dodoc docs/building.md
newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
newinitd "${FILESDIR}/mongos.initd-r3" mongos
newconfd "${FILESDIR}/mongos.confd-r3" mongos
newinitd "${WORKDIR}/mongodb-8.0.8-patches/${PN}.initd-r3" ${PN}
newconfd "${WORKDIR}/mongodb-8.0.8-patches/${PN}.confd-r3" ${PN}
newinitd "${WORKDIR}/mongodb-8.0.8-patches/mongos.initd-r3" mongos
newconfd "${WORKDIR}/mongodb-8.0.8-patches/mongos.confd-r3" mongos
insinto /etc
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
newins "${FILESDIR}/mongos.conf-r2" mongos.conf
newins "${WORKDIR}/mongodb-8.0.8-patches/${PN}.conf-r3" ${PN}.conf
newins "${WORKDIR}/mongodb-8.0.8-patches/mongos.conf-r2" mongos.conf
systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
systemd_newunit "${WORKDIR}/mongodb-8.0.8-patches/${PN}.service-r1" "${PN}.service"
insinto /etc/logrotate.d/
newins "${FILESDIR}/${PN}.logrotate" ${PN}
newins "${WORKDIR}/mongodb-8.0.8-patches/${PN}.logrotate" ${PN}
# see bug #526114
pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}