git: ece9aacddfce - main - databases/mongosh: update to 2.14.0

From: Oleksii Samorukov <samm_at_FreeBSD.org>
Date: Sun, 01 Nov 2026 17:18:03 UTC
The branch main has been updated by samm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ece9aacddfce740a963d57b35474c505ff0c6b72

commit ece9aacddfce740a963d57b35474c505ff0c6b72
Author:     Oleksii Samorukov <samm@FreeBSD.org>
AuthorDate: 2026-11-01 17:16:38 +0000
Commit:     Oleksii Samorukov <samm@FreeBSD.org>
CommitDate: 2026-11-01 17:16:38 +0000

    databases/mongosh: update to 2.14.0
    
    Also unbreak on aarch64
    
    PR: 299015
---
 databases/mongosh/Makefile                         | 67 ++++++++++-------
 databases/mongosh/distinfo                         | 16 ++--
 .../patch-node__modules_boxednode_lib_index.js     | 87 ++++++++++++++++++++++
 ...ages_build_node__modules_boxednode_lib_index.js | 13 ----
 .../files/node-patches/011-src_node__cjs__lexer.cc | 21 ------
 ...js-patches_002-workaround-node-bug-52229.patch} |  4 +-
 .../mongosh/files/patch-scripts_prep-fle-addon.sh  | 10 +--
 7 files changed, 143 insertions(+), 75 deletions(-)

diff --git a/databases/mongosh/Makefile b/databases/mongosh/Makefile
index 93df40427c67..2432f2b2fa4c 100644
--- a/databases/mongosh/Makefile
+++ b/databases/mongosh/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	mongosh
 DISTVERSIONPREFIX=	v
-DISTVERSION=	2.8.3
-PORTREVISION=	1
+DISTVERSION=	2.14.0
 CATEGORIES=	databases shells net
 MASTER_SITES=	https://registry.npmjs.org/mongodb-client-encryption/-/:mongocrypt \
 		https://registry.npmjs.org/kerberos/-/:kerberos \
@@ -23,13 +22,14 @@ WWW=		https://github.com/mongodb-js/mongosh/
 
 LICENSE=	APACHE20
 
-ONLY_FOR_ARCHS=	amd64
+ONLY_FOR_ARCHS=	amd64 aarch64
+ONLY_FOR_ARCHS_REASON=	nx node_module error: Unsupported architecture on FreeBSD: ${ARCH}
 # issue created upstream https://github.com/nrwl/nx/issues/29257
 
 PATCH_DEPENDS=	npm${NODEJS_SUFFIX}>0:www/npm${NODEJS_SUFFIX}
 BUILD_DEPENDS=	objdump:devel/binutils \
 		bash>0:shells/bash \
-		git>0:devel/git
+		git:devel/git@tiny
 LIB_DEPENDS=	libada.so:devel/libada \
 		libbrotlidec.so:archivers/brotli \
 		libcares.so:dns/c-ares \
@@ -66,6 +66,9 @@ MAKE_ENV=	${CUSTOM_ENV} \
 		NODE_JS_VERSION=file://${DISTDIR}/${DIST_SUBDIR}/${NODEJS_TARBALL} \
 		BOXEDNODE_CONFIGURE_ARGS="--prefix=${PREFIX:S|^${DESTDIR}||},--shared-ada,--shared-brotli,--shared-cares,--shared-gtest,--shared-hdr-histogram,--shared-http-parser,--shared-libuv,--shared-merve,--shared-nbytes,--shared-nghttp2,--shared-nghttp3,--shared-ngtcp2,--shared-simdjson,--shared-sqlite,--shared-uvwasi,--shared-uvwasi-includes=${LOCALBASE}/include,--shared-zlib,--shared-zstd,--shared-openssl,--openssl-use-def-ca-store,--with-intl=system-icu,--without-corepack,--without-npm" \
 		BOXEDNODE_MAKE_ARGS="V=0" \
+		RUST_BACKTRACE=full \
+		CI=true \
+		NODE_OPTIONS=--max-old-space-size=8192 \
 		CC="${CCACHE_BIN} ${CC}" \
 		CFLAGS="${CFLAGS}" \
 		CXX="${CCACHE_BIN} ${CXX}" \
@@ -74,20 +77,18 @@ MAKE_ENV=	${CUSTOM_ENV} \
 		LINK="${CXX}"
 # CXXFLAGS+=	-DNODE_API_EXPERIMENTAL \
 # 		-DNODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT
-EXTRACT_AFTER_ARGS=	--exclude scripts/nodejs-patches/008-windows-tcp-connect-crash-fix-node-62561.patch \
-			--no-same-owner --no-same-permissions
+EXTRACT_AFTER_ARGS=	--no-same-owner --no-same-permissions
 REINPLACE_ARGS=	-i ''
 
-MONGO_CRYPT_VER=7.0.0
+MONGO_CRYPT_VER=7.2.0
 KERBEROS_VER=	7.0.0
 OSDNSNATIVE_VER=2.0.1
-MODULES=	\
-	mongodb-client-encryption ${MONGO_CRYPT_VER} \
-	kerberos ${KERBEROS_VER} \
-	os-dns-native ${OSDNSNATIVE_VER}
+MODULES=	mongodb-client-encryption ${MONGO_CRYPT_VER} \
+		kerberos ${KERBEROS_VER} \
+		os-dns-native ${OSDNSNATIVE_VER}
 
 NODE_MODULES_DIR=	${WRKSRC}/node_modules
-BOXEDNODE_DIR=		${WRKSRC}/packages/build/node_modules/boxednode
+BOXEDNODE_DIR=		${NODE_MODULES_DIR}/boxednode
 NODE_MODULES_TARBALL=	${PORTNAME}-${DISTVERSIONFULL}-${ARCH}-node-modules.tar.xz
 NPM_CACHE_DIR=		${TMPDIR}/.npm
 NODEJS_TARBALL=		node-v${NODEJS_PORTVERSION}.tar.gz
@@ -106,20 +107,12 @@ post-extract:
 .if !exists(${NODE_MODULES_DIR})
 	${TAR} -xzf ${DISTDIR}/${DIST_SUBDIR}/${NODE_MODULES_TARBALL} -C ${WRKSRC}
 	${MKDIR} -v ${WRKDIR}/boxednode/mongosh
-	${REINPLACE_CMD} -e "s|'make'|'${GMAKE}'|g" \
-		-e "s/if (inputIsFileUrl)/if (false)/g" \
-		-e 's/(await nv_1.default(range)).pop()/{"version":"${NODEJS_PORTVERSION}"}/g' \
-		-e 's/path_1.default.join(dir, tarballName)/url_1.fileURLToPath(range)/g' \
-		-e "s|\$${releaseBaseUrl}/SHASUMS256.txt|${DISTDIR}/${DIST_SUBDIR}/${NODEJS_SHAFILE}|g" \
-		-e 's/await node_fetch_1.default(shaSumsUrl)/{"ok":1}/g' \
-		-e "s/shaSums.text()/fs_1.promises.readFile(shaSumsUrl, 'utf8')/g" \
-		-e "s/catch (_a) { }/catch (_a) { console.error(_a) }/g" \
-		-e "s|os_1.default.tmpdir()|'${WRKDIR}'|g" \
+	${REINPLACE_CMD} -e "s|%%GMAKE%%|${GMAKE}|g" \
+		-e "s|%%NODEJS_PORTVERSION%%|${NODEJS_PORTVERSION}|g" \
+		-e "s|%%NODEJS_SHAFILE%%|${DISTDIR}/${DIST_SUBDIR}/${NODEJS_SHAFILE}|g" \
+		-e "s|%%WRKDIR%%|${WRKDIR}|g" \
 		${BOXEDNODE_DIR}/lib/index.js
 	${GREP} -A36 "let version;" ${BOXEDNODE_DIR}/lib/index.js
-	${REINPLACE_CMD} -e "s|'install', '--ignore-scripts', '--production'|'--version'|g" \
-		${BOXEDNODE_DIR}/lib/native-addons.js
-	${GREP} "version" ${BOXEDNODE_DIR}/lib/native-addons.js
 .endif
 
 post-patch:
@@ -141,6 +134,16 @@ do-build:
 .endfor
 	${REINPLACE_CMD} -E 's/"version": ".*"/"version": "${DISTVERSION}"/g' \
 		${WRKSRC}/packages/cli-repl/package.json
+#	Race condition randomly happening with Lerna/Nx that I don't have the time to dig in
+#	thread 'tui-logger::move_events' panicked at ./parking_lot_core-0.9.12/src/thread_parker/wasm.rs:26:9:
+#	Parking not supported on this platform
+#	cd ${WRKSRC} && ${MAKE_ENV} ${LOCALBASE}/bin/npm run compile-cli || \
+#		(cat ${WRKSRC}/lerna-debug.log && false)
+.for dir in errors history js-multiline-to-singleline types async-rewriter2 i18n \
+logging shell-bson arg-parser service-provider-core service-provider-node-driver \
+shell-api autocomplete shell-evaluator snippet-manager editor cli-repl
+	cd ${WRKSRC} && ${MAKE_ENV} ${LOCALBASE}/bin/npm run compile --workspace=@mongosh/${dir}
+.endfor
 	cd ${WRKSRC} && ${MAKE_ENV} ${LOCALBASE}/bin/npm run compile-exec || \
 		(cat ${WRKSRC}/lerna-debug.log && false)
 
@@ -178,16 +181,26 @@ node-modules-archive: patch
 	${TAR} -xzf ${DISTDIR}/${DIST_SUBDIR}/${module}-${ver}.tgz \
 		-C ${NODE_MODULES_DIR}/${module} --strip-components 1
 .endfor
-	cd ${WRKSRC} && ${LOCALBASE}/bin/npx cross-env ${CONFIGURE_ENV} \
+	cd ${WRKSRC} && ${LOCALBASE}/bin/npx --yes cross-env ${CONFIGURE_ENV} \
 		${LOCALBASE}/bin/npm clean-install \
 			--cache ${NPM_CACHE_DIR} --no-audit --no-fund
 
+	# cpu-features 0.0.10 bundles an old google/cpu_features revision with no
+	# FreeBSD/aarch64 backend, so its addon has an undefined GetAarch64Info and
+	# aborts the dynamic loader. It is only an optional ssh2 accelerator (ssh2
+	# falls back to its JS implementation), so drop it on non-amd64.
+	if [ "${ARCH}" != amd64 ]; then ${RM} -r ${NODE_MODULES_DIR}/cpu-features; fi
+
+	${REINPLACE_CMD} "s|'install', '--ignore-scripts', '--production'|'--version'|g" \
+		${BOXEDNODE_DIR}/lib/native-addons.js
+	${GREP} "version" ${BOXEDNODE_DIR}/lib/native-addons.js
 	for f in ${FILESDIR}/node-modules-patches/*; do ${PATCH} -Nd ${WRKSRC} < $$f; done
 	${FIND} ${WRKSRC} -name "*.orig" -or -name "*.bak" -delete
 
 	cd ${WRKSRC} && ${TAR} cf - node_modules packages/*/node_modules | \
-		${LOCALBASE}/bin/pv -s $$(/usr/bin/du -sAk node_modules | \
-		${AWK} '{print $$1}')000 | ${XZ_CMD} > ${TMPDIR}/${NODE_MODULES_TARBALL}
+		${LOCALBASE}/bin/pv -s $$(/usr/bin/du -sAk node_modules packages/*/node_modules | \
+		${AWK} '{sum += $$1} END {print sum}')K | \
+		${XZ_CMD} > ${TMPDIR}/${NODE_MODULES_TARBALL}
 
 .include <bsd.port.pre.mk>
 
diff --git a/databases/mongosh/distinfo b/databases/mongosh/distinfo
index 9f70e2f46c37..d45b3e13e79a 100644
--- a/databases/mongosh/distinfo
+++ b/databases/mongosh/distinfo
@@ -1,11 +1,13 @@
-TIMESTAMP = 1777881104
-SHA256 (mongosh/mongodb-client-encryption-7.0.0.tgz) = 4170688f9b745234346f33419394f54f0ad930bc9d83e56720b5b67dd8a2528e
-SIZE (mongosh/mongodb-client-encryption-7.0.0.tgz) = 34400
+TIMESTAMP = 1793121659
+SHA256 (mongosh/mongodb-client-encryption-7.2.0.tgz) = 0d3d70f7b9fa725232fdd6c12e1c0037f5b0b7f5007eed7942e3e239d6df93d2
+SIZE (mongosh/mongodb-client-encryption-7.2.0.tgz) = 34657
 SHA256 (mongosh/kerberos-7.0.0.tgz) = b3065aa5da1948b40b51eee14aa2e87220c71bd393152a976397db4179edb8ec
 SIZE (mongosh/kerberos-7.0.0.tgz) = 31619
 SHA256 (mongosh/os-dns-native-2.0.1.tgz) = 20199c29b82ca7576b6ede0540118803cf5cf3d162ed9b0e7e40be07170e93ef
 SIZE (mongosh/os-dns-native-2.0.1.tgz) = 6624
-SHA256 (mongosh/mongosh-v2.8.3-amd64-node-modules.tar.xz) = 34f601ba436c58528ca25cb58c53cd88bef38e043e9de77c6fe4c470219fc000
-SIZE (mongosh/mongosh-v2.8.3-amd64-node-modules.tar.xz) = 75340904
-SHA256 (mongosh/VultureProject-mongosh-v2.8.3_GH0.tar.gz) = a404b3c63131869a7507e9db0e647d96223954805f6a96adc0b25d5da9d87631
-SIZE (mongosh/VultureProject-mongosh-v2.8.3_GH0.tar.gz) = 9610581
+SHA256 (mongosh/mongosh-v2.14.0-amd64-node-modules.tar.xz) = bb465af6a2cc1d83be799f445cc79d003ec188c9d0b36d97b703d282fddbde74
+SIZE (mongosh/mongosh-v2.14.0-amd64-node-modules.tar.xz) = 69449724
+SHA256 (mongosh/mongosh-v2.14.0-aarch64-node-modules.tar.xz) = 16d86c3bffd1a534ad65fcdc760e0382e6d6aeef37b2835e1b2d1c1ff733627b
+SIZE (mongosh/mongosh-v2.14.0-aarch64-node-modules.tar.xz) = 62898568
+SHA256 (mongosh/VultureProject-mongosh-v2.14.0_GH0.tar.gz) = 61cd07d7401492f410bcb31321556a43f57122adedabd5906ddc514ad5b644f1
+SIZE (mongosh/VultureProject-mongosh-v2.14.0_GH0.tar.gz) = 9673662
diff --git a/databases/mongosh/files/node-modules-patches/patch-node__modules_boxednode_lib_index.js b/databases/mongosh/files/node-modules-patches/patch-node__modules_boxednode_lib_index.js
new file mode 100644
index 000000000000..17210ed1e2c7
--- /dev/null
+++ b/databases/mongosh/files/node-modules-patches/patch-node__modules_boxednode_lib_index.js
@@ -0,0 +1,87 @@
+--- node_modules/boxednode/lib/index.js.orig	2026-10-27 16:03:57 UTC
++++ node_modules/boxednode/lib/index.js
+@@ -50,8 +50,8 @@ async function getNodeSourceForVersion(range, dir, log
+     try {
+         inputIsFileUrl = new url_1.URL(range).protocol === 'file:';
+     }
+-    catch (_a) { }
+-    if (inputIsFileUrl) {
++    catch (_a) { console.error(_a) }
++    if (false) {
+         logger.stepStarting(`Extracting tarball from ${range} to ${dir}`);
+         await fs_1.promises.mkdir(dir, { recursive: true });
+         await (0, helpers_1.pipeline)((0, fs_1.createReadStream)((0, url_1.fileURLToPath)(range)), zlib_1.default.createGunzip(), tar.x({
+@@ -72,7 +72,7 @@ async function getNodeSourceForVersion(range, dir, log
+         releaseBaseUrl = `https://nodejs.org/download/nightly/${version}`;
+     }
+     else {
+-        const ver = (await (0, nv_1.default)(range)).pop();
++        const ver = {"version":"%%NODEJS_PORTVERSION%%"};
+         if (!ver) {
+             throw new Error(`No node version found for ${range}`);
+         }
+@@ -80,29 +80,29 @@ async function getNodeSourceForVersion(range, dir, log
+         releaseBaseUrl = `https://nodejs.org/download/release/${version}`;
+     }
+     const tarballName = `node-${version}.tar.gz`;
+-    const cachedTarballPath = path_1.default.join(dir, tarballName);
++    const cachedTarballPath = url_1.fileURLToPath(range);
+     let hasCachedTarball = false;
+     try {
+         hasCachedTarball = (await fs_1.promises.stat(cachedTarballPath)).size > 0;
+     }
+-    catch (_b) { }
++    catch (_b) { console.error(_b) }
+     if (hasCachedTarball) {
+-        const shaSumsUrl = `${releaseBaseUrl}/SHASUMS256.txt`;
++        const shaSumsUrl = `%%NODEJS_SHAFILE%%`;
+         logger.stepStarting(`Verifying existing tarball via ${shaSumsUrl}`);
+         const [expectedSha, realSha] = await Promise.all([
+             (async () => {
+                 try {
+-                    const shaSums = await (0, node_fetch_1.default)(shaSumsUrl);
++                    const shaSums = {"ok":1};
+                     if (!shaSums.ok)
+                         return;
+-                    const text = await shaSums.text();
++                    const text = await fs_1.promises.readFile(shaSumsUrl, 'utf8');
+                     for (const line of text.split('\n')) {
+                         if (line.trim().endsWith(tarballName)) {
+                             return line.match(/^([0-9a-fA-F]+)\b/)[0];
+                         }
+                     }
+                 }
+-                catch (_a) { }
++                catch (_a) { console.error(_a) }
+             })(),
+             (async () => {
+                 const hash = crypto_1.default.createHash('sha256');
+@@ -193,6 +193,10 @@ async function compileNode(sourcePath, linkedJSModules
+         for (const module of linkedJSModules) {
+             configure.push('--link-module', module);
+         }
++        for (const static_lib of ['ada', 'brotli', 'cares', 'corepack', 'googletest', 'histogram', 'icu-small', 'llhttp',
++            'merve', 'nbytes', 'nghttp2', 'ngtcp2', 'npm', 'simdjson', 'sqlite', 'uv', 'uvwasi', 'zlib', 'zstd']) {
++            await fs_1.promises.rm(path_1.default.join(sourcePath, 'deps', static_lib), { recursive: true, force: true });
++        }
+         await (0, helpers_1.spawnBuildCommand)(configure, options);
+         if (configure.includes('--fully-static') || configure.includes('--partly-static')) {
+             for (const file of [
+@@ -211,7 +215,7 @@ async function compileNode(sourcePath, linkedJSModules
+                 await fs_1.promises.writeFile(target, source);
+             }
+         }
+-        const make = ['make', ...makeArgs];
++        const make = ['%%GMAKE%%', ...makeArgs];
+         if (!make.some((arg) => /^-j/.test(arg))) {
+             make.push(`-j${cpus}`);
+         }
+@@ -259,7 +263,7 @@ async function compileJSFileAsBinaryImpl(options, logg
+     await fs_1.promises.access(options.sourceFile);
+     const namespace = options.namespace || path_1.default.basename(options.sourceFile, '.js');
+     if (!options.tmpdir) {
+-        options.tmpdir = path_1.default.join(os_1.default.tmpdir(), 'boxednode', namespace);
++        options.tmpdir = path_1.default.join('%%WRKDIR%%', 'boxednode', namespace);
+     }
+     const nodeSourcePath = await getNodeSourceForVersion(options.nodeVersionRange, options.tmpdir, logger);
+     const nodeVersion = await getNodeVersionFromSourceDirectory(nodeSourcePath);
diff --git a/databases/mongosh/files/node-modules-patches/patch-packages_build_node__modules_boxednode_lib_index.js b/databases/mongosh/files/node-modules-patches/patch-packages_build_node__modules_boxednode_lib_index.js
deleted file mode 100644
index 1d0839c2e361..000000000000
--- a/databases/mongosh/files/node-modules-patches/patch-packages_build_node__modules_boxednode_lib_index.js
+++ /dev/null
@@ -1,13 +0,0 @@
---- packages/build/node_modules/boxednode/lib/index.js.orig	2026-04-29 13:15:26 UTC
-+++ packages/build/node_modules/boxednode/lib/index.js
-@@ -170,6 +170,10 @@ async function compileNode(sourcePath, linkedJSModules
-         for (const module of linkedJSModules) {
-             configure.push('--link-module', module);
-         }
-+        for (const static_lib of ['ada', 'brotli', 'cares', 'corepack', 'googletest', 'histogram', 'icu-small', 'llhttp',
-+            'merve', 'nbytes', 'nghttp2', 'ngtcp2', 'npm', 'simdjson', 'sqlite', 'uv', 'uvwasi', 'zlib', 'zstd']) {
-+            await fs_1.promises.rm(path_1.default.join(sourcePath, 'deps', static_lib), { recursive: true, force: true });
-+        }
-         await helpers_1.spawnBuildCommand(configure, options);
-         if (configure.includes('--fully-static') || configure.includes('--partly-static')) {
-             for (const file of [
diff --git a/databases/mongosh/files/node-patches/011-src_node__cjs__lexer.cc b/databases/mongosh/files/node-patches/011-src_node__cjs__lexer.cc
deleted file mode 100644
index 2c15ef7be6a4..000000000000
--- a/databases/mongosh/files/node-patches/011-src_node__cjs__lexer.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-Obtained from:	https://github.com/nodejs/node/commit/59a522af24173b244cb86829de145d46b143a45c
-
---- a/src/node_cjs_lexer.cc.orig	2026-04-29 21:32:48 UTC
-+++ b/src/node_cjs_lexer.cc
-@@ -71,14 +71,14 @@ void Parse(const FunctionCallbackInfo<Value>& args) {
-   // Convert exports to JS Set
-   Local<Set> exports_set = Set::New(isolate);
-   for (const auto& exp : analysis.exports) {
--    exports_set->Add(context, CreateString(isolate, exp)).ToLocalChecked();
-+    exports_set->Add(context, CreateString(isolate, exp.name)).ToLocalChecked();
-   }
- 
-   // Convert reexports to JS array using batch creation
-   LocalVector<Value> reexports_vec(isolate);
-   reexports_vec.reserve(analysis.re_exports.size());
-   for (const auto& reexp : analysis.re_exports) {
--    reexports_vec.push_back(CreateString(isolate, reexp));
-+    reexports_vec.push_back(CreateString(isolate, reexp.name));
-   }
- 
-   // Create result array [exports (Set), reexports (Array)]
diff --git a/databases/mongosh/files/patch-scripts_nodejs-patches_002-workaround-node-bug-52229 b/databases/mongosh/files/patch-scripts_nodejs-patches_002-workaround-node-bug-52229.patch
similarity index 81%
rename from databases/mongosh/files/patch-scripts_nodejs-patches_002-workaround-node-bug-52229
rename to databases/mongosh/files/patch-scripts_nodejs-patches_002-workaround-node-bug-52229.patch
index b21fb545eb49..55a31fdffab4 100644
--- a/databases/mongosh/files/patch-scripts_nodejs-patches_002-workaround-node-bug-52229
+++ b/databases/mongosh/files/patch-scripts_nodejs-patches_002-workaround-node-bug-52229.patch
@@ -1,5 +1,5 @@
---- scripts/nodejs-patches/002-workaround-node-bug-52229.orig	2025-07-02 13:57:45 UTC
-+++ scripts/nodejs-patches/002-workaround-node-bug-52229
+--- scripts/nodejs-patches/002-workaround-node-bug-52229.patch.orig	2025-07-02 13:57:45 UTC
++++ scripts/nodejs-patches/002-workaround-node-bug-52229.patch
 @@ -2,7 +2,7 @@ diff --git a/common.gypi b/common.gypi
  index 888b8b94ca1a..375956862d2d 100644
  --- a/common.gypi
diff --git a/databases/mongosh/files/patch-scripts_prep-fle-addon.sh b/databases/mongosh/files/patch-scripts_prep-fle-addon.sh
index 5ef34c8af799..43d0dd302dac 100644
--- a/databases/mongosh/files/patch-scripts_prep-fle-addon.sh
+++ b/databases/mongosh/files/patch-scripts_prep-fle-addon.sh
@@ -1,16 +1,16 @@
---- scripts/prep-fle-addon.sh.orig	2024-10-28 16:25:21 UTC
+--- scripts/prep-fle-addon.sh.orig	2026-09-17 07:24:06 UTC
 +++ scripts/prep-fle-addon.sh
 @@ -20,6 +20,7 @@ set -x
  # This isn't a lot, but hopefully after https://jira.mongodb.org/browse/WRITING-7164
  # we'll be able to simplify this further.
  
-+if [ `uname` != FreeBSD ]; then
++if [ "$(uname)" != FreeBSD ]; then
  cd "$(dirname "$0")"/..
  MONGOSH_ROOT_DIR="$PWD"
  BUILDROOT="$MONGOSH_ROOT_DIR"/tmp/fle-buildroot
-@@ -77,4 +78,5 @@ if [ x"$FLE_NODE_SOURCE_PATH" != x"" ]; then
-   cp -rv ./deps/lib*/*-static* "$FLE_NODE_SOURCE_PATH"/deps/lib
-   cp -rv ./deps/include/*kms* "$FLE_NODE_SOURCE_PATH"/deps/include
+@@ -82,4 +83,5 @@ if [ x"$FLE_NODE_SOURCE_PATH" != x"" ]; then
+     cp -rv ./deps/include/*kms* "$FLE_NODE_SOURCE_PATH"/deps/include
+   fi
    cp -rv ./deps/include/*mongocrypt* "$FLE_NODE_SOURCE_PATH"/deps/include
 +fi
  fi