mirror of
https://git.freebsd.org/ports.git
synced 2025-05-04 07:27:38 -04:00
databases/mongosh: update to 2.3.8
Changelog: https://github.com/mongodb-js/mongosh/releases PR: 284440
This commit is contained in:
parent
99d4fce824
commit
661b9c7c30
10 changed files with 74 additions and 126 deletions
|
@ -1,6 +1,6 @@
|
|||
PORTNAME= mongosh
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 2.2.5
|
||||
DISTVERSION= 2.3.8
|
||||
CATEGORIES= databases shells net
|
||||
MASTER_SITES= https://registry.npmjs.org/mongodb-client-encryption/-/:mongocrypt \
|
||||
https://registry.npmjs.org/kerberos/-/:kerberos \
|
||||
|
@ -10,7 +10,7 @@ MASTER_SITES= https://registry.npmjs.org/mongodb-client-encryption/-/:mongocrypt
|
|||
DISTFILES= mongodb-client-encryption-${MONGO_CRYPT_VER}.tgz:mongocrypt \
|
||||
kerberos-${KERBEROS_VER}.tgz:kerberos \
|
||||
os-dns-native-${OSDNSNATIVE_VER}.tgz:dns \
|
||||
${NODE_MODULES_TARBALL}:modules \
|
||||
${NODE_MODULES_TARBALL}:modules
|
||||
# ${NODEJS_TARBALL}:node \
|
||||
# SHASUMS256.txt:node
|
||||
DIST_SUBDIR= ${PORTNAME}
|
||||
|
@ -22,33 +22,31 @@ WWW= https://github.com/mongodb-js/mongosh/
|
|||
|
||||
LICENSE= APACHE20
|
||||
|
||||
BROKEN_aarch64= fails to compile: nx/src/native/index.js:147 Error: Unsupported architecture on FreeBSD: arm64
|
||||
BROKEN_armv7= fails to compile: nx/src/native/index.js:147 Error: Unsupported architecture on FreeBSD: arm
|
||||
BROKEN_i386= fails to compile: nx/src/native/index.js:147 Error: Unsupported architecture on FreeBSD: ia32
|
||||
BROKEN_FreeBSD_15= clang19?, string:820:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>'
|
||||
ONLY_FOR_ARCHS= amd64
|
||||
# issue created upstream https://github.com/nrwl/nx/issues/29257
|
||||
|
||||
FETCH_DEPENDS= npm${NODEJS_SUFFIX}>0:www/npm${NODEJS_SUFFIX}
|
||||
BUILD_DEPENDS= bash>0:shells/bash \
|
||||
brotli>=1.0.9,1:archivers/brotli \
|
||||
PATCH_DEPENDS= npm${NODEJS_SUFFIX}>0:www/npm${NODEJS_SUFFIX}
|
||||
BUILD_DEPENDS= brotli>=1.0.9,1:archivers/brotli \
|
||||
c-ares>=1.17.2:dns/c-ares \
|
||||
libnghttp2>=1.45.1:www/libnghttp2 \
|
||||
libuv>=1.42.0:devel/libuv \
|
||||
objdump:devel/binutils \
|
||||
bash>0:shells/bash \
|
||||
git>0:devel/git
|
||||
LIB_DEPENDS= libmongocrypt.so:databases/libmongocrypt \
|
||||
libbrotlidec.so:archivers/brotli \
|
||||
LIB_DEPENDS= libbrotlidec.so:archivers/brotli \
|
||||
libcares.so:dns/c-ares \
|
||||
libnghttp2.so:www/libnghttp2 \
|
||||
libuv.so:devel/libuv
|
||||
libuv.so:devel/libuv \
|
||||
libmongocrypt.so:databases/libmongocrypt
|
||||
RUN_DEPENDS= ca_root_nss>=0:security/ca_root_nss
|
||||
|
||||
USES= compiler:c++11-lib gmake gssapi:mit localbase pkgconfig nodejs:20,build python:build ssl
|
||||
USES= compiler:c++11-lib gmake gssapi:mit localbase nodejs:lts,build pkgconfig python:build ssl tar:xz
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= VultureProject
|
||||
GH_PROJECT= mongosh
|
||||
|
||||
CUSTOM_ENV= SEGMENT_API_KEY=dummy BUILD_TYPE=dynamic
|
||||
CUSTOM_ENV= SEGMENT_API_KEY=dummy GYP_DEFINES="libmongocrypt_link_type=dynamic"
|
||||
CONFIGURE_ENV= ${CUSTOM_ENV}
|
||||
MAKE_ENV= ${CUSTOM_ENV} \
|
||||
NODE_JS_VERSION=file://${_DISTDIR}/${NODEJS_TARBALL} \
|
||||
|
@ -60,11 +58,11 @@ REINPLACE_ARGS= -i ''
|
|||
|
||||
MPROTECT_DISABLE= bin/mongosh
|
||||
|
||||
MONGO_CRYPT_VER=6.0.0
|
||||
MONGO_CRYPT_VER=6.1.0
|
||||
KERBEROS_VER= 2.1.0
|
||||
OSDNSNATIVE_VER=1.2.0
|
||||
OSDNSNATIVE_VER=1.2.1
|
||||
NODE_MODULES_DIR= ${WRKSRC}/node_modules
|
||||
NODE_MODULES_TARBALL= ${PORTNAME}-${DISTVERSIONFULL}-node-modules.tar.xz
|
||||
NODE_MODULES_TARBALL= ${PORTNAME}-${DISTVERSIONFULL}-${ARCH}-node-modules.tar.xz
|
||||
NPM_CACHE_DIR= /tmp/.npm
|
||||
NODEJS_TARBALL= node-v${NODEJS_PORTVERSION}.tar.gz
|
||||
|
||||
|
@ -77,7 +75,7 @@ post-fetch:
|
|||
|
||||
post-extract:
|
||||
.if !exists(${NODE_MODULES_DIR})
|
||||
${TAR} -xzf /${_DISTDIR}/${NODE_MODULES_TARBALL} -C ${WRKSRC}
|
||||
${TAR} -xzf ${_DISTDIR}/${NODE_MODULES_TARBALL} -C ${WRKSRC}
|
||||
${REINPLACE_CMD} -e "s/'make'/'gmake'/g" \
|
||||
-e "s/'V='/'V=0'/g" \
|
||||
-e 's/(await (0, nv_1.default)(range)).pop()/{"version": "${NODEJS_PORTVERSION}"}/g' \
|
||||
|
@ -106,6 +104,7 @@ do-build:
|
|||
cd ${NODE_MODULES_DIR}/${module} && ${MAKE_ENV} ${MAKE_CMD} BUILDTYPE=Release -C build -d
|
||||
.endfor
|
||||
${REINPLACE_CMD} 's/"version": "0.0.0-dev.0"/"version": "${DISTVERSION}"/g' ${WRKSRC}/packages/cli-repl/package.json
|
||||
${RM} ${WRKSRC}/scripts/nodejs-patches/005-windows-escape-product-dir-abs-in-openssl-node-56111.patch
|
||||
cd ${WRKSRC} && ${MAKE_ENV} ${LOCALBASE}/bin/npm run compile-exec
|
||||
|
||||
do-install:
|
||||
|
@ -128,23 +127,22 @@ npm-pkg-list: extract
|
|||
> ${FILESDIR}/npm-pkg-${module}.list
|
||||
.endfor
|
||||
|
||||
node-modules-archive: build
|
||||
${RM} -R ${NODE_MODULES_DIR}
|
||||
node-modules-archive: patch
|
||||
cd ${WRKSRC} && ${LOCALBASE}/bin/npx cross-env PUPPETEER_SKIP_DOWNLOAD=1 ${LOCALBASE}/bin/npm install --cache ${NPM_CACHE_DIR} --no-audit --no-fund --no-prune
|
||||
cd ${WRKSRC} && ${LOCALBASE}/bin/npx cross-env ${LOCALBASE}/bin/npm install ipv6-normalize --cache ${NPM_CACHE_DIR} --no-audit --no-fund --no-prune
|
||||
|
||||
.for module in mongodb-client-encryption kerberos os-dns-native
|
||||
${MKDIR} -v ${NODE_MODULES_DIR}/${module}
|
||||
${TAR} -xzf ${_DISTDIR}/${module}-*.tgz -C ${NODE_MODULES_DIR}/${module} --strip-components 1
|
||||
.endfor
|
||||
for f in ${FILESDIR}/node-modules-patches/*; do ${PATCH} -N -d ${WRKSRC} < $$f; done
|
||||
|
||||
cd ${WRKSRC} && npx cross-env PUPPETEER_SKIP_DOWNLOAD=1 ${LOCALBASE}/bin/npm install --cache ${NPM_CACHE_DIR}
|
||||
|
||||
.for module in mongodb-client-encryption kerberos os-dns-native mongodb-crypt-library-version glibc-version
|
||||
${LOCALBASE}/bin/npm cache add $$(cat ${FILESDIR}/npm-pkg-${module}.list) --cache ${NPM_CACHE_DIR} || true
|
||||
cd ${NODE_MODULES_DIR}/${module} && ${CONFIGURE_ENV} ${LOCALBASE}/bin/npm install --ignore-scripts --cache ${NPM_CACHE_DIR}
|
||||
.endfor
|
||||
${FIND} ${WRKSRC} -name "*.orig" -or -name "*.bak" -delete
|
||||
|
||||
cd ${WRKSRC} && ${TAR} -cJf /tmp/${NODE_MODULES_TARBALL} node_modules
|
||||
.for module in mongodb-client-encryption kerberos os-dns-native mongodb-crypt-library-version glibc-version
|
||||
cd ${NODE_MODULES_DIR}/${module} && ${CONFIGURE_ENV} ${LOCALBASE}/bin/npm install --ignore-scripts --cache ${NPM_CACHE_DIR} --no-audit --no-fund --no-prune
|
||||
.endfor
|
||||
|
||||
cd ${WRKSRC} && ${TAR} cf - node_modules | ${LOCALBASE}/bin/pv -s $$(du -sAk node_modules | awk '{print $$1}')000 | xz > /tmp/${NODE_MODULES_TARBALL}
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.include "${PORTSDIR}/www/node${NODEJS_VERSION}/Makefile.version"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
TIMESTAMP = 1731685667
|
||||
SHA256 (mongosh/mongodb-client-encryption-6.0.0.tgz) = b72d6ad4e4c449ba4548f8f4f8708d37c1490c6615caefa8c56a02f22897b64a
|
||||
SIZE (mongosh/mongodb-client-encryption-6.0.0.tgz) = 15734
|
||||
TIMESTAMP = 1738594106
|
||||
SHA256 (mongosh/mongodb-client-encryption-6.1.0.tgz) = 6a1384d1b9411abcdc25423553a965bd18ee9a4e1052b1c083a53cb11a90b6dd
|
||||
SIZE (mongosh/mongodb-client-encryption-6.1.0.tgz) = 30442
|
||||
SHA256 (mongosh/kerberos-2.1.0.tgz) = eeb1d33472dcf15be8ae46e30ffc76455a62356a91cee52bb8d48f97a35a58c7
|
||||
SIZE (mongosh/kerberos-2.1.0.tgz) = 28988
|
||||
SHA256 (mongosh/os-dns-native-1.2.0.tgz) = cfe145091dd469c4fe6923b61ef85621222526a0ed74b01b6b3739069d244f7d
|
||||
SIZE (mongosh/os-dns-native-1.2.0.tgz) = 6525
|
||||
SHA256 (mongosh/mongosh-v2.2.5-node-modules.tar.xz) = 2a1f75f49bcb49a93bd58d38d8a3fdbae685d57ade77e85b95ceba10c5b047c3
|
||||
SIZE (mongosh/mongosh-v2.2.5-node-modules.tar.xz) = 155537736
|
||||
SHA256 (mongosh/VultureProject-mongosh-v2.2.5_GH0.tar.gz) = 38fd3c21433d2b8d371161941843a3c6a6652e41c4a9d3cfa3917164630f3928
|
||||
SIZE (mongosh/VultureProject-mongosh-v2.2.5_GH0.tar.gz) = 8653615
|
||||
SHA256 (mongosh/os-dns-native-1.2.1.tgz) = 9baa54587fed81884735aee59d82eaf95870d344b83f5060a75256f4852d964d
|
||||
SIZE (mongosh/os-dns-native-1.2.1.tgz) = 6535
|
||||
SHA256 (mongosh/mongosh-v2.3.8-amd64-node-modules.tar.xz) = 2b7a04f96596eb13b7b2c9392ca841faebee0c9bfac99c7972df74282d176fe3
|
||||
SIZE (mongosh/mongosh-v2.3.8-amd64-node-modules.tar.xz) = 159374104
|
||||
SHA256 (mongosh/VultureProject-mongosh-v2.3.8_GH0.tar.gz) = d7a0ae00cdf9ac45eb969796d4cb5d908a7ff025df2d518633cd9fdb24dcd285
|
||||
SIZE (mongosh/VultureProject-mongosh-v2.3.8_GH0.tar.gz) = 8259565
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- node_modules/kerberos/binding.gyp.orig 2024-05-13 15:16:38 UTC
|
||||
+++ node_modules/kerberos/binding.gyp
|
||||
@@ -34,14 +34,18 @@
|
||||
@@ -34,14 +34,17 @@
|
||||
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
|
||||
}
|
||||
}],
|
||||
|
@ -14,7 +14,6 @@
|
|||
}],
|
||||
- ['(OS=="mac" or OS=="linux") and (kerberos_use_rtld!="true")', {
|
||||
+ ['(OS=="mac" or OS=="linux" or OS=="freebsd") and (kerberos_use_rtld!="true")', {
|
||||
+ 'defines': ['NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT'],
|
||||
+ 'include_dirs': [
|
||||
+ '/usr/local/include'
|
||||
+ ],
|
||||
|
|
|
@ -1,35 +1,15 @@
|
|||
--- node_modules/mongodb-client-encryption/binding.gyp.orig 2024-05-13 14:10:24 UTC
|
||||
--- node_modules/mongodb-client-encryption/binding.gyp.orig 2024-11-15 19:23:54 UTC
|
||||
+++ node_modules/mongodb-client-encryption/binding.gyp
|
||||
@@ -38,9 +38,14 @@
|
||||
@@ -42,7 +42,11 @@
|
||||
}
|
||||
}],
|
||||
['build_type=="dynamic"', {
|
||||
+ 'defines': [ 'NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT' ],
|
||||
['libmongocrypt_link_type=="dynamic"', {
|
||||
- 'link_settings': { 'libraries': ['-lmongocrypt'] }
|
||||
+ 'include_dirs': [
|
||||
+ '/usr/include',
|
||||
+ '/usr/local/include'
|
||||
+ ],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
- '-lmongocrypt'
|
||||
+ '-L/usr/local/lib -lmongocrypt'
|
||||
]
|
||||
}
|
||||
+ 'link_settings': { 'libraries': ['-L/usr/local/lib -lmongocrypt'] }
|
||||
}],
|
||||
@@ -48,13 +53,12 @@
|
||||
['libmongocrypt_link_type=="static"', {
|
||||
'conditions': [
|
||||
['OS!="win"', {
|
||||
'include_dirs': [
|
||||
- '<(module_root_dir)/deps/include'
|
||||
+ '/usr/include',
|
||||
+ '/usr/local/include'
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
- '<(module_root_dir)/deps/lib/libmongocrypt-static.a',
|
||||
- '<(module_root_dir)/deps/lib/libkms_message-static.a',
|
||||
- '<(module_root_dir)/deps/lib/libbson-static-for-libmongocrypt.a'
|
||||
+ '-L/usr/local/lib -lmongocrypt'
|
||||
]
|
||||
}
|
||||
}],
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- node_modules/mongodb-client-encryption/package.json.orig 2024-05-13 13:50:11 UTC
|
||||
+++ node_modules/mongodb-client-encryption/package.json
|
||||
@@ -16,7 +16,7 @@
|
||||
"lib": "lib"
|
||||
},
|
||||
"scripts": {
|
||||
- "install": "prebuild-install --runtime napi --tag-prefix node-v || node-gyp rebuild",
|
||||
+ "install": "prebuild-install --runtime napi --tag-prefix node-v || BUILD_TYPE=dynamic node-gyp rebuild",
|
||||
"build:ts": "tsc",
|
||||
"clang-format": "clang-format --style=file:.clang-format --Werror -i addon/*",
|
||||
"check:eslint": "eslint src test",
|
|
@ -1,15 +0,0 @@
|
|||
--- a/src/crypto/crypto_util.cc 2023-05-16 06:58:21 UTC
|
||||
+++ b/src/crypto/crypto_util.cc
|
||||
@@ -205,10 +205,12 @@ void InitCryptoOnce() {
|
||||
// No-op with OPENSSL_NO_COMP builds of OpenSSL.
|
||||
sk_SSL_COMP_zero(SSL_COMP_get_compression_methods());
|
||||
|
||||
+#if OPENSSL_VERSION_MAJOR < 3
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ERR_load_ENGINE_strings();
|
||||
ENGINE_load_builtin_engines();
|
||||
#endif // !OPENSSL_NO_ENGINE
|
||||
+#endif
|
||||
}
|
||||
|
||||
void GetFipsCrypto(const FunctionCallbackInfo<Value>& args) {
|
|
@ -0,0 +1,10 @@
|
|||
--- a/deps/v8/src/base/small-vector.h 2024-04-24 14:03:50 UTC
|
||||
+++ b/deps/v8/src/base/small-vector.h
|
||||
@@ -22,7 +22,6 @@ class SmallVector {
|
||||
class SmallVector {
|
||||
// Currently only support trivially copyable and trivially destructible data
|
||||
// types, as it uses memcpy to copy elements and never calls destructors.
|
||||
- ASSERT_TRIVIALLY_COPYABLE(T);
|
||||
static_assert(std::is_trivially_destructible<T>::value);
|
||||
|
||||
public:
|
|
@ -1,14 +1,5 @@
|
|||
--- package.json.orig 2024-05-15 14:01:43 UTC
|
||||
--- package.json.orig 2024-10-28 16:25:21 UTC
|
||||
+++ package.json
|
||||
@@ -9,7 +9,7 @@
|
||||
"author": "Compass Team <compass@mongodb.com>",
|
||||
"scripts": {
|
||||
"bootstrap-with-chromium": "npm install && npm run compile",
|
||||
- "bootstrap": "npx cross-env PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 npm install && npm run compile",
|
||||
+ "bootstrap": "npx cross-env PUPPETEER_SKIP_DOWNLOAD=1 npm install && npm run compile",
|
||||
"clean": "lerna clean -y && rm -Rf node_modules",
|
||||
"check": "lerna run check --since HEAD --exclude-dependents",
|
||||
"check-ci": "npm run check --workspaces --if-present",
|
||||
@@ -33,7 +33,7 @@
|
||||
"start-browser": "npm run start --workspace @mongosh/browser-repl",
|
||||
"start": "npm run start-cli",
|
||||
|
@ -18,19 +9,19 @@
|
|||
"compile-all": "npm run compile-compass && npm run compile-exec",
|
||||
"evergreen-release": "cd packages/build && npm run evergreen-release --",
|
||||
"release": "cd packages/build && npm run release --",
|
||||
@@ -59,7 +59,6 @@
|
||||
"create-vulnerability-tickets": "mongodb-sbom-tools generate-vulnerability-report --snyk-reports=.sbom/snyk-test-result.json,.sbom/node-js-vuln.json --dependencies=.sbom/dependencies.json,.sbom/node-js-dep.json --create-jira-issues",
|
||||
@@ -66,7 +66,6 @@
|
||||
"postcreate-static-analysis-report": "mongodb-sbom-tools sarif-to-markdown --sarif=.sbom/codeql.sarif.json --md=.sbom/codeql.md",
|
||||
"where": "monorepo-where",
|
||||
"reformat": "npm run reformat --workspaces --if-present",
|
||||
- "prepare": "husky install",
|
||||
- "prepare": "husky",
|
||||
"precommit": "precommit",
|
||||
"preinstall": "node scripts/sort-workspaces.js"
|
||||
},
|
||||
@@ -101,7 +100,6 @@
|
||||
@@ -108,7 +107,6 @@
|
||||
"duplexpair": "^1.0.2",
|
||||
"find-up": "^5.0.0",
|
||||
"glob": "^10.3.12",
|
||||
- "husky": "^8.0.3",
|
||||
- "husky": "^9.0.11",
|
||||
"mocha": "^10.2.0",
|
||||
"mongodb": "^6.5.0",
|
||||
"mongodb-runner": "^5.4.6",
|
||||
"mongodb": "^6.9.0",
|
||||
"mongodb-runner": "^5.7.0",
|
||||
|
|
|
@ -1,20 +1,16 @@
|
|||
--- scripts/prep-fle-addon.sh.orig 2024-05-13 17:26:57 UTC
|
||||
--- scripts/prep-fle-addon.sh.orig 2024-10-28 16:25:21 UTC
|
||||
+++ scripts/prep-fle-addon.sh
|
||||
@@ -62,7 +62,7 @@ if [ x"$PREBUILT_OSNAME" != x"" ]; then
|
||||
mv -v prebuilts/nocrypto/include include
|
||||
mv -v prebuilts/$LIB/*bson* lib
|
||||
rm -rf prebuilts
|
||||
-else
|
||||
+elif [ `uname` != FreeBSD ]; then
|
||||
if [ `uname` = Darwin ]; then
|
||||
export CFLAGS="-mmacosx-version-min=10.15";
|
||||
fi
|
||||
@@ -86,7 +86,7 @@ else
|
||||
cd ../../
|
||||
fi
|
||||
@@ -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 [ x"$FLE_NODE_SOURCE_PATH" != x"" ]; then
|
||||
+if [ x"$FLE_NODE_SOURCE_PATH" != x"" -a `uname` != FreeBSD -a "$BUILD_TYPE" != dynamic ]; then
|
||||
mkdir -p "$FLE_NODE_SOURCE_PATH"/deps/lib
|
||||
mkdir -p "$FLE_NODE_SOURCE_PATH"/deps/include
|
||||
cp -rv "$BUILDROOT"/lib*/*-static* "$FLE_NODE_SOURCE_PATH"/deps/lib
|
||||
+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
|
||||
cp -rv ./deps/include/*mongocrypt* "$FLE_NODE_SOURCE_PATH"/deps/include
|
||||
+fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue