diff options
Diffstat (limited to 'databases/mongodb70/files')
4 files changed, 49 insertions, 7 deletions
diff --git a/databases/mongodb70/files/make.test.sh b/databases/mongodb70/files/make.test.sh new file mode 100755 index 000000000000..3d74258a446a --- /dev/null +++ b/databases/mongodb70/files/make.test.sh @@ -0,0 +1,31 @@ +#! /bin/sh + +set -e + +usage() { + echo "Usage: $0 <path>" + echo "<path> path to the executables" +} + +test "$#" -eq 1 || ( usage && exit 1 ) + +set -x + +PATH="$1:$PATH" + +DBDIR=$( mktemp -d -t tmp.mongodb ) + +trap 'rm -rf "$DBDIR"' EXIT + +# Trivial check if the binaries execute at all. +mongod -version +mongos -version + +# Check if an empty database can be created. +mkdir "$DBDIR/db" +tail -F "$DBDIR/log" | ( grep -qFe "Waiting for connections" && kill $(cat "$DBDIR/pid") ) & +script -eF "$DBDIR/log" \ + timeout -s TERM -k 30s 60s \ + mongod --dbpath "$DBDIR/db" --pidfilepath "$DBDIR/pid" + +echo "Test successful" diff --git a/databases/mongodb70/files/patch-SConstruct b/databases/mongodb70/files/patch-SConstruct index a6da48e57114..816aa6946300 100644 --- a/databases/mongodb70/files/patch-SConstruct +++ b/databases/mongodb70/files/patch-SConstruct @@ -1,4 +1,4 @@ ---- SConstruct.orig 2023-06-07 17:07:38 UTC +--- SConstruct.orig 2024-06-19 03:26:19 UTC +++ SConstruct @@ -23,7 +23,6 @@ import SCons.Script @@ -8,7 +8,7 @@ from site_scons.mongo import build_profiles # This must be first, even before EnsureSConsVersion, if -@@ -1655,16 +1654,6 @@ env.AddMethod(lambda env, name, **kwargs: add_option(n +@@ -1653,16 +1652,6 @@ env.AddMethod(lambda env, name, **kwargs: add_option(n del envDict env.AddMethod(lambda env, name, **kwargs: add_option(name, **kwargs), 'AddOption') @@ -25,7 +25,7 @@ if get_option('build-metrics'): env['BUILD_METRICS_ARTIFACTS_DIR'] = '$BUILD_ROOT/$VARIANT_DIR' env.Tool('build_metrics') -@@ -1801,9 +1790,9 @@ if has_option('variables-help'): +@@ -1799,9 +1788,9 @@ if has_option('variables-help'): print(env_vars.GenerateHelpText(env)) Exit(0) @@ -38,7 +38,7 @@ install_actions.setup(env, get_option('install-action')) -@@ -3026,7 +3015,7 @@ if env.TargetOSIs('posix'): +@@ -3024,7 +3013,7 @@ if env.TargetOSIs('posix'): # If runtime hardening is requested, then build anything # destined for an executable with the necessary flags for PIE. env.AppendUnique( @@ -47,7 +47,7 @@ PROGLINKFLAGS=['-pie'], ) -@@ -3034,7 +3023,6 @@ if env.TargetOSIs('posix'): +@@ -3032,7 +3021,6 @@ if env.TargetOSIs('posix'): env.Append( CCFLAGS=[ "-fasynchronous-unwind-tables", diff --git a/databases/mongodb70/files/patch-src_mongo_db_exec_document__value_value.cpp b/databases/mongodb70/files/patch-src_mongo_db_exec_document__value_value.cpp index 194db618f3b2..3deb7c743027 100644 --- a/databases/mongodb70/files/patch-src_mongo_db_exec_document__value_value.cpp +++ b/databases/mongodb70/files/patch-src_mongo_db_exec_document__value_value.cpp @@ -1,6 +1,6 @@ ---- src/mongo/db/exec/document_value/value.cpp.orig 2023-06-15 22:07:57 UTC +--- src/mongo/db/exec/document_value/value.cpp.orig 2024-06-19 03:26:19 UTC +++ src/mongo/db/exec/document_value/value.cpp -@@ -59,6 +59,12 @@ using namespace std::string_literals; +@@ -60,6 +60,12 @@ using namespace std::string_literals; using std::vector; using namespace std::string_literals; diff --git a/databases/mongodb70/files/patch-src_third__party_libbson_dist_src_libbson_src_bson_bson-error.c b/databases/mongodb70/files/patch-src_third__party_libbson_dist_src_libbson_src_bson_bson-error.c new file mode 100644 index 000000000000..4ee39110eefd --- /dev/null +++ b/databases/mongodb70/files/patch-src_third__party_libbson_dist_src_libbson_src_bson_bson-error.c @@ -0,0 +1,11 @@ +--- src/third_party/libbson/dist/src/libbson/src/bson/bson-error.c.orig 2024-07-04 10:59:36 UTC ++++ src/third_party/libbson/dist/src/libbson/src/bson/bson-error.c +@@ -130,7 +130,7 @@ bson_strerror_r (int err_code, /* I + // required) by the POSIX spec (see: + // https://pubs.opengroup.org/onlinepubs/9699919799/functions/strerror.html#tag_16_574_08). + (void) strerror_r (err_code, buf, buflen); +-#elif defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 700 ++#elif defined(__FreeBSD__) || ( defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 700 ) + // The behavior (of `strerror_l`) is undefined if the locale argument to + // `strerror_l()` is the special locale object LC_GLOBAL_LOCALE or is not a + // valid locale object handle. |