diff --git a/databases/mongodb70/Makefile b/databases/mongodb70/Makefile index 90e59327216b..2429fdb96534 100644 --- a/databases/mongodb70/Makefile +++ b/databases/mongodb70/Makefile @@ -1,187 +1,186 @@ PORTNAME= mongodb DISTVERSIONPREFIX= r -DISTVERSION= 7.0.34 -PORTREVISION= 2 +DISTVERSION= 7.0.35 CATEGORIES= databases net PKGNAMESUFFIX= ${DISTVERSION:R:S/.//} PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ # https://github.com/mongodb/mongo/pull/1619/ # "Modernize dynamic module loading to work with Python3.12" -PATCHFILES+= 0877732109589e441cbf234dce17ec0e7b614902.patch:-p1 +#PATCHFILES+= 0877732109589e441cbf234dce17ec0e7b614902.patch:-p1 MAINTAINER= ronald@FreeBSD.org COMMENT= MongoDB Community Edition (7.0.x Branch) WWW= https://www.mongodb.com/docs/v7.0/ LICENSE= APACHE20 SSPLv1 # mongodb is SSPLv1, C++ driver is APACHE20 LICENSE_COMB= multi LICENSE_NAME_SSPLv1= Server Side Public License Version 1 LICENSE_FILE_SSPLv1= ${WRKSRC}/LICENSE-Community.txt LICENSE_PERMS_SSPLv1= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept ONLY_FOR_ARCHS= aarch64 amd64 powerpc64le ONLY_FOR_ARCHS_REASON= only ported to amd64, aarch64, and powerpc64le on FreeBSD; upstream supports arm64, ppc64le, s390x, and x86-64 BUILD_DEPENDS= ${PY_SETUPTOOLS} \ ${PYTHON_PKGNAMEPREFIX}cheetah3>0:devel/py-cheetah3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pymongo>0:databases/py-pymongo@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyyaml>=3.11:devel/py-pyyaml@${PY_FLAVOR} \ rust-cbindgen>0:devel/rust-cbindgen -# build depends used while running ${WRKSRC}/src/third_party/mozjs/gen-config.sh +# build depends used while running ${WRKSRC}/src/third_party/mozjs/scripts/gen-config.sh BUILD_DEPENDS+= gm4:devel/m4 \ gsed:textproc/gsed LIB_DEPENDS= libcurl.so:ftp/curl \ libsnappy.so:archivers/snappy \ libstemmer.so:textproc/snowballstemmer \ libunwind.so:devel/libunwind \ libyaml-cpp.so:devel/yaml-cpp \ libzstd.so:archivers/zstd FLAVORS= default armv80a armv80a_PKGNAMESUFFIX= ${DISTVERSION:R:S/.//}-armv80a USES= compiler:c++20-lang cpe python:build scons shebangfix ssl -# gmake is used while running ${WRKSRC}/src/third_party/mozjs/gen-config.sh +# gmake is used while running ${WRKSRC}/src/third_party/mozjs/scripts/gen-config.sh USES+= gmake pkgconfig CPE_PRODUCT= mongodb -# mozjs tag comes from ${WRKSRC}/src/third_party/mozjs/get-sources.sh -MOZJS_TAG= 692674d55f1c4acfae4316efab0f79cd67250341 +# mozjs tag comes from ${WRKSRC}/src/third_party/mozjs/scripts/import.sh +MOZJS_TAG= dd4a007275927572d0b10857d3f11b28550d0095 USE_GITHUB= yes GH_ACCOUNT= mongodb mongodb-forks:mozjs GH_PROJECT= mongo spidermonkey:mozjs GH_TAGNAME= ${MOZJS_TAG}:mozjs USE_RC_SUBR= mongod SHEBANG_FILES= buildscripts/scons.py python_OLD_CMD= @python_interpreter@ HAS_CONFIGURE= yes -CONFIGURE_SCRIPT= gen-config.sh +CONFIGURE_SCRIPT= scripts/gen-config.sh CONFIGURE_ARGS= ${MOZJS_ARCH} \ freebsd CONFIGURE_ENV+= PYTHON3="${PYTHON_CMD}" MAKE_ARGS= --allocator=system \ --cxx-std=20 \ --disable-warnings-as-errors \ --libc++ \ --runtime-hardening=on \ --ssl \ --use-system-libunwind \ --use-system-snappy \ --use-system-stemmer \ --use-system-yaml \ --use-system-zlib \ --use-system-zstd \ -j${MAKE_JOBS_NUMBER} \ AR=llvm-ar \ MONGO_VERSION=${DISTVERSION} \ VERBOSE=on ALL_TARGET= install-core CFLAGS+= -DBOOST_NO_CXX98_FUNCTION_BASE CONFLICTS_INSTALL= mongodb[0-9][0-9] EXTRACT_AFTER_ARGS= --exclude src/third_party/snappy-* \ --exclude src/third_party/libstemmer_c \ --exclude src/third_party/unwind \ --exclude src/third_party/yaml-cpp \ --exclude src/third_party/zlib-* \ --exclude src/third_party/zstandard \ --no-same-owner --no-same-permissions # This ports is only following the Major Release. # https://docs.mongodb.com/manual/reference/versioning/ PORTSCOUT= limit:^7\.0\. CONFIGURE_WRKSRC= ${MOZJS_WRKSRC} USERS= mongodb GROUPS= mongodb OPTIONS_DEFINE= LTO NOAVX SASL OPTIONS_DEFINE_aarch64= ARMV80A OPTIONS_DEFAULT= NOAVX SASL # MongoDB on non-LSE ARM cpu like Raspberry Pi can work but is unsupported upstream. # Can give corruption on high concurrency. # Please read https://jira.mongodb.org/browse/SERVER-71772. ARMV80A_DESC= Enable non-LSE ARM64 CPUs like RPI4. NOAVX_DESC= "Disable AVX instructions on amd64 (Sandybridge+)" ARMV80A_EXTRA_PATCHES= ${FILESDIR}/extrapatch-SConstruct LTO_MAKE_ARGS= --lto=on NOAVX_MAKE_ARGS= --experimental-optimization="-sandybridge" NOAVX_EXTRA_PATCHES= ${FILESDIR}/extrapatch-src_third__party_mozjs_SConscript \ ${FILESDIR}/extrapatch-src_third__party_mozjs_extract_mozglue_misc_SIMD.cpp SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 SASL_MAKE_ARGS= --use-sasl-client MOZJS_WRKSRC= ${WRKSRC}/src/third_party/mozjs .if ${FLAVOR:U} == armv80a OPTIONS_SET+= ARMV80A MAKE_JOBS_UNSAFE= yes .endif .include .if ${FLAVOR:U} == armv80a && ${ARCH} != aarch64 IGNORE= flavor armv80a is only valid on aarch64 .endif .if ${ARCH} == amd64 MOZJS_ARCH= x86_64 .elif ${ARCH} == powerpc64le MOZJS_ARCH= ppc64le .elif ${ARCH} == aarch64 MOZJS_ARCH= ${ARCH} .endif post-extract: # Verify we downloaded the proper mozjs git tag. - ${SH} -xc "test \"X`grep -E '^LIB_GIT_REVISION=' ${MOZJS_WRKSRC}/get-sources.sh`\" = \"XLIB_GIT_REVISION=${MOZJS_TAG}\"" + ${SH} -xc "test \"X`grep -E '^LIB_GIT_REVISION=' ${MOZJS_WRKSRC}/scripts/import.sh`\" = \"XLIB_GIT_REVISION=${MOZJS_TAG}\"" ${PATCH} -d ${WRKDIR}/spidermonkey-${MOZJS_TAG} -p1 < ${PATCHDIR}/d497aa4f770ca02f6083e93b94996a8fe32c2ff4.patch post-patch: # fix build with python-3.11 ${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/util.py ${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/preprocessor.py ${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/backend/base.py ${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/action/process_define_files.py pre-configure: -# Replacement of ${WRKSRC}/src/third_party/mozjs/get-sources.sh +# Replacement of ${WRKSRC}/src/third_party/mozjs/scripts/import.sh ${LN} -sF ${WRKDIR}/spidermonkey-${MOZJS_TAG} ${MOZJS_WRKSRC}/mozilla-release do-build: ${WRKSRC}/buildscripts/scons.py -C ${WRKSRC} ${MAKE_ARGS} do-install: .for f in mongod mongos ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f} .endfor ${INSTALL_DATA} ${WRKSRC}/rpm/mongod.conf ${STAGEDIR}${PREFIX}/etc/mongodb.conf.sample ${MKDIR} ${STAGEDIR}${DOCSDIR} .for doc in LICENSE-Community.txt MPL-2 README THIRD-PARTY-NOTICES ${MV} ${STAGEDIR}${PREFIX}/${doc} ${STAGEDIR}${DOCSDIR}/ .endfor ${INSTALL_MAN} ${WRKSRC}/debian/mongod.1 ${STAGEDIR}${PREFIX}/share/man/man1/ ${INSTALL_MAN} ${WRKSRC}/debian/mongos.1 ${STAGEDIR}${PREFIX}/share/man/man1/ ${INSTALL_MAN} ${WRKSRC}/debian/mongodb-parameters.5 ${STAGEDIR}${PREFIX}/share/man/man5/ ${RM} ${STAGEDIR}${PREFIX}/bin/resmoke.py do-test: ${SH} ${FILESDIR}/make.test.sh "${STAGEDIR}${PREFIX}/bin" .include diff --git a/databases/mongodb70/distinfo b/databases/mongodb70/distinfo index 5666eb3a7ca2..42bf8f64dc43 100644 --- a/databases/mongodb70/distinfo +++ b/databases/mongodb70/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1778755802 -SHA256 (mongodb-mongo-r7.0.34_GH0.tar.gz) = d98f8904d1a0a5683ffd29b320fd1f3615f6090f6bd9447fd016b428e674a8a1 -SIZE (mongodb-mongo-r7.0.34_GH0.tar.gz) = 91412914 -SHA256 (mongodb-forks-spidermonkey-692674d55f1c4acfae4316efab0f79cd67250341_GH0.tar.gz) = 4fe01d2b3152763ddb2cc01a35b4dc2b55b58204d26d6fcf7c201d440535b711 -SIZE (mongodb-forks-spidermonkey-692674d55f1c4acfae4316efab0f79cd67250341_GH0.tar.gz) = 392214331 +TIMESTAMP = 1781638348 +SHA256 (mongodb-mongo-r7.0.35_GH0.tar.gz) = f4805dd606153f31415392864da585f986a84c8555924a946d3db8f73f215d62 +SIZE (mongodb-mongo-r7.0.35_GH0.tar.gz) = 91496228 +SHA256 (mongodb-forks-spidermonkey-dd4a007275927572d0b10857d3f11b28550d0095_GH0.tar.gz) = 6d5b5172734d0b53b1d05f528b50249970fef8757750fb2df2d0ebdbaea367e8 +SIZE (mongodb-forks-spidermonkey-dd4a007275927572d0b10857d3f11b28550d0095_GH0.tar.gz) = 392330689 SHA256 (0877732109589e441cbf234dce17ec0e7b614902.patch) = 96bcf70f8ee66424b5601632fb91dbcbb6b14df0553f59f36cd10325bfce7105 SIZE (0877732109589e441cbf234dce17ec0e7b614902.patch) = 1770 diff --git a/databases/mongodb70/files/extrapatch-src_third__party_mozjs_SConscript b/databases/mongodb70/files/extrapatch-src_third__party_mozjs_SConscript index 4370f13323a4..a28f759601d6 100644 --- a/databases/mongodb70/files/extrapatch-src_third__party_mozjs_SConscript +++ b/databases/mongodb70/files/extrapatch-src_third__party_mozjs_SConscript @@ -1,11 +1,11 @@ ---- src/third_party/mozjs/SConscript.orig 2024-08-14 20:38:09 UTC +--- src/third_party/mozjs/SConscript.orig 2026-06-16 06:40:34 UTC +++ src/third_party/mozjs/SConscript -@@ -144,7 +145,7 @@ sources = [ - "extract/js/src/wasm/WasmCode-platform.cpp", - ] +@@ -157,7 +157,7 @@ if get_option('spider-monkey-dbg') == "on": + if get_option('spider-monkey-dbg') == "on": + sources.append("extract/js/src/util/Utility.cpp") -if env['TARGET_ARCH'] == 'x86_64' and not env.TargetOSIs('windows'): +if False and env['TARGET_ARCH'] == 'x86_64' and not env.TargetOSIs('windows'): env.Append(CCFLAGS=['-mavx2']) sources.extend(["extract/mozglue/misc/SIMD_avx2.cpp", "extract/mozglue/misc/SSE.cpp"]) diff --git a/databases/mongodb70/files/patch-SConstruct b/databases/mongodb70/files/patch-SConstruct index bb82275bafdc..360def2fa356 100644 --- a/databases/mongodb70/files/patch-SConstruct +++ b/databases/mongodb70/files/patch-SConstruct @@ -1,11 +1,11 @@ ---- SConstruct.orig 2025-11-03 12:58:46 UTC +--- SConstruct.orig 2026-06-16 06:40:34 UTC +++ SConstruct -@@ -1798,7 +1798,7 @@ if unknown_vars: +@@ -1840,7 +1840,7 @@ if unknown_vars: unknown_vars = env_vars.UnknownVariables() if unknown_vars: - env.FatalError("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys()))) + print("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys()))) install_actions.setup(env, get_option('install-action')) diff --git a/databases/mongodb70/files/patch-src_mongo_util_net_openssl__init.cpp b/databases/mongodb70/files/patch-src_mongo_util_net_openssl__init.cpp new file mode 100644 index 000000000000..8306c2e4985c --- /dev/null +++ b/databases/mongodb70/files/patch-src_mongo_util_net_openssl__init.cpp @@ -0,0 +1,40 @@ +--- src/mongo/util/net/openssl_init.cpp.orig 2026-06-17 14:19:16 UTC ++++ src/mongo/util/net/openssl_init.cpp +@@ -230,37 +230,9 @@ MONGO_INITIALIZER_GENERAL(SetupOpenSSL, ("default"), ( + setupFIPS(); + } else { + #if OPENSSL_VERSION_NUMBER > 0x30000000L +- // When the OpenSSL 3 FIPS provider is disabled, OpenSSL uses a primary DRBG +- // to seed per-thread DRBGs. The primary DRBG relies on the system entropy source for +- // seeding and reseeding. In highly concurrent environments where many threads are +- // being spawned at once, the primary DRBG will receive many generate requests to +- // seed all the new threads. Both the reseed request and +- // the time intervals can be tuned via startup server parameters in response to +- // observed performance regressions. +- EVP_RAND_CTX* primary = RAND_get0_primary(NULL /* default OSSL_LIB_CTX */); +- if (primary == NULL) { + LOGV2_WARNING(12549200, + "Unable to fetch primary DRBG to adjust reseed parameters, continuing " + "with OpenSSL defaults"); +- } else { +- auto primaryReseedRequestsInterval = +- static_cast(crypto::opensslPrimaryDRBGReseedMaxRequests); +- auto primaryReseedTimeInterval = +- static_cast(crypto::opensslPrimaryDRBGReseedMaxTime); +- OSSL_PARAM params[3] = { +- OSSL_PARAM_construct_uint(OSSL_DRBG_PARAM_RESEED_REQUESTS, +- &primaryReseedRequestsInterval), +- OSSL_PARAM_construct_time_t(OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL, +- &primaryReseedTimeInterval), +- OSSL_PARAM_END}; +- if (!EVP_RAND_CTX_set_params(primary, params)) { +- LOGV2_WARNING(12549201, +- "Unable to reset primary DRBG reseed parameters, continuing with " +- "OpenSSL defaults", +- "error"_attr = +- SSLManagerInterface::getSSLErrorMessage(ERR_get_error())); +- } +- } + #endif + } + diff --git a/databases/mongodb70/files/patch-src_third__party_mozjs_gen-config.sh b/databases/mongodb70/files/patch-src_third__party_mozjs_scripts_gen-config.sh similarity index 89% rename from databases/mongodb70/files/patch-src_third__party_mozjs_gen-config.sh rename to databases/mongodb70/files/patch-src_third__party_mozjs_scripts_gen-config.sh index 441f53fff97d..0a7182d85854 100644 --- a/databases/mongodb70/files/patch-src_third__party_mozjs_gen-config.sh +++ b/databases/mongodb70/files/patch-src_third__party_mozjs_scripts_gen-config.sh @@ -1,45 +1,45 @@ ---- src/third_party/mozjs/gen-config.sh.orig 2025-12-22 19:50:59 UTC -+++ src/third_party/mozjs/gen-config.sh +--- src/third_party/mozjs/scripts/gen-config.sh.orig 2026-06-16 06:40:34 UTC ++++ src/third_party/mozjs/scripts/gen-config.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e set -v @@ -7,7 +7,7 @@ then if [ $# -ne 2 ] then echo "Please supply an arch: x86_64, i386, etc and a platform: osx, linux, windows, etc" - exit 0; + exit 1; fi _BuiltPathPrefix="mozilla-release/js/src/_build/js/src" @@ -29,6 +29,9 @@ case "$_Path" in } case "$_Path" in + "platform/aarch64/freebsd") + _CONFIG_OPTS="--host=aarch64-freebsd" + ;; "platform/aarch64/linux") _CONFIG_OPTS="--host=aarch64-linux" ;; @@ -111,7 +114,7 @@ CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS" \ --disable-wasm-moz-intgemm \ "$_CONFIG_OPTS" -make recurse_export +gmake recurse_export cd ../../../.. @@ -166,7 +169,7 @@ find "$_Path/build" -name '*.cpp' | find "$_Path/build" -name '*.cpp' | while read unified_file ; do echo "Processing $unified_file" - sed $SEDOPTION \ + gsed $SEDOPTION \ -e 's|#include ".*/js/src/|#include "|' \ -e 's|#error ".*/js/src/|#error "|' \ "$unified_file"