pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/databases/mongodb



Module Name:    pkgsrc
Committed By:   adam
Date:           Sat Jul 29 11:45:44 UTC 2023

Modified Files:
        pkgsrc/databases/mongodb: Makefile PLIST distinfo
        pkgsrc/databases/mongodb/patches: patch-SConstruct
            patch-site__scons_site__tools_libtool.py
            patch-src_mongo_base_initializer.h
            patch-src_mongo_db_query_collation_collator__interface__icu.h
            patch-src_mongo_db_storage_storage__repair__observer.cpp
            patch-src_mongo_platform_random.cpp
            patch-src_mongo_platform_stack__locator__netbsd.cpp
            patch-src_mongo_shell_shell__utils__extended.cpp
            patch-src_mongo_util_processinfo__netbsd.cpp
            patch-src_third__party_wiredtiger_src_os__posix_os__fs.c
Added Files:
        pkgsrc/databases/mongodb/patches:
            patch-src_mongo_db_repl_tenant__file__cloner.h
            patch-src_mongo_db_storage_wiredtiger_wiredtiger__kv__engine.cpp
            patch-src_mongo_platform_process__id.cpp
            patch-src_third__party_mozjs_SConscript
            patch-src_third__party_mozjs_platform_x86__64_netbsd_build_js-confdefs.h
Removed Files:
        pkgsrc/databases/mongodb/patches:
            patch-src_mongo_db_storage_wiredtiger_wiredtiger__util.cpp

Log Message:
mongodb: updated to 6.0.8

https://www.mongodb.com/docs/manual/release-notes/6.0/


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 pkgsrc/databases/mongodb/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/databases/mongodb/PLIST
cvs rdiff -u -r1.36 -r1.37 pkgsrc/databases/mongodb/distinfo
cvs rdiff -u -r1.10 -r1.11 pkgsrc/databases/mongodb/patches/patch-SConstruct
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/databases/mongodb/patches/patch-site__scons_site__tools_libtool.py \
    pkgsrc/databases/mongodb/patches/patch-src_mongo_db_query_collation_collator__interface__icu.h \
    pkgsrc/databases/mongodb/patches/patch-src_mongo_db_storage_storage__repair__observer.cpp \
    pkgsrc/databases/mongodb/patches/patch-src_mongo_shell_shell__utils__extended.cpp
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/databases/mongodb/patches/patch-src_mongo_base_initializer.h
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/databases/mongodb/patches/patch-src_mongo_db_repl_tenant__file__cloner.h \
    pkgsrc/databases/mongodb/patches/patch-src_mongo_db_storage_wiredtiger_wiredtiger__kv__engine.cpp \
    pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_process__id.cpp \
    pkgsrc/databases/mongodb/patches/patch-src_third__party_mozjs_SConscript \
    pkgsrc/databases/mongodb/patches/patch-src_third__party_mozjs_platform_x86__64_netbsd_build_js-confdefs.h
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/databases/mongodb/patches/patch-src_mongo_db_storage_wiredtiger_wiredtiger__util.cpp
cvs rdiff -u -r1.5 -r1.6 \
    pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_random.cpp
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp \
    pkgsrc/databases/mongodb/patches/patch-src_third__party_wiredtiger_src_os__posix_os__fs.c
cvs rdiff -u -r1.4 -r1.5 \
    pkgsrc/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/databases/mongodb/Makefile
diff -u pkgsrc/databases/mongodb/Makefile:1.80 pkgsrc/databases/mongodb/Makefile:1.81
--- pkgsrc/databases/mongodb/Makefile:1.80      Mon Jul 24 18:39:28 2023
+++ pkgsrc/databases/mongodb/Makefile   Sat Jul 29 11:45:43 2023
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.80 2023/07/24 18:39:28 wiz Exp $
+# $NetBSD: Makefile,v 1.81 2023/07/29 11:45:43 adam Exp $
 
-DISTNAME=      mongodb-src-r4.2.15
+DISTNAME=      mongodb-src-r6.0.8
 PKGNAME=       ${DISTNAME:S/src-r//}
-PKGREVISION=   11
 CATEGORIES=    databases
 MASTER_SITES=  http://fastdl.mongodb.org/src/
 
@@ -16,13 +15,19 @@ NOT_FOR_PLATFORM+=  *-*-i386
 
 EXTRACT_USING= bsdtar
 
+# etc/pip/compile-requirements.txt
 TOOL_DEPENDS+= ${PYPKGPREFIX}-cheetah-[0-9]*:../../devel/py-cheetah3
+TOOL_DEPENDS+= ${PYPKGPREFIX}-mongo>=3.9:../../databases/py-mongo
+TOOL_DEPENDS+= ${PYPKGPREFIX}-packaging-[0-9]*:../../devel/py-packaging
 TOOL_DEPENDS+= ${PYPKGPREFIX}-psutil-[0-9]*:../../sysutils/py-psutil
 TOOL_DEPENDS+= ${PYPKGPREFIX}-regex-[0-9]*:../../textproc/py-regex
-TOOL_DEPENDS+= ${PYPKGPREFIX}-yaml-[0-9]*:../../textproc/py-yaml
+TOOL_DEPENDS+= ${PYPKGPREFIX}-requests>=2.0.0:../../devel/py-requests
+TOOL_DEPENDS+= ${PYPKGPREFIX}-types-yaml>=6.0.5:../../textproc/py-types-yaml
+TOOL_DEPENDS+= ${PYPKGPREFIX}-yaml>=3.0.0:../../textproc/py-yaml
 
 # https://github.com/mongodb/mongo/blob/master/docs/building.md
-USE_LANGUAGES= c99 c++17
+USE_LANGUAGES=         c99 c++17
+USE_CXX_FEATURES+=     c++17 filesystem
 
 USE_TOOLS+=    pkg-config
 
@@ -33,36 +38,36 @@ SCONS_BUILD_ARGS+=  --release
 SCONS_BUILD_ARGS+=     --runtime-hardening=off # on: does not produce executables
 #SCONS_BUILD_ARGS+=    --use-system-asio
 SCONS_BUILD_ARGS+=     --use-system-boost
+#SCONS_BUILD_ARGS+=    --use-system-fmt
 SCONS_BUILD_ARGS+=     --use-system-icu
 SCONS_BUILD_ARGS+=     --use-system-mongo-c
 SCONS_BUILD_ARGS+=     --use-system-pcre
 SCONS_BUILD_ARGS+=     --use-system-snappy
-SCONS_BUILD_ARGS+=     --use-system-sqlite
 SCONS_BUILD_ARGS+=     --use-system-tcmalloc
 #SCONS_BUILD_ARGS+=    --use-system-wiredtiger
 SCONS_BUILD_ARGS+=     --use-system-yaml
 SCONS_BUILD_ARGS+=     --use-system-zlib
 SCONS_BUILD_ARGS+=     --use-system-zstd
 
-USE_CXX_FEATURES+=     c++17
-
 PYTHON_VERSIONS_INCOMPATIBLE=  27
 
 .include "../../mk/bsd.prefs.mk"
 
-CPPFLAGS+=     -fno-jump-tables  # XXX: still needed?
 INCL_PATH+=    ${BUILDLINK_PREFIX.mongo-c-driver}/include/libbson-1.0
 INCL_PATH+=    ${BUILDLINK_PREFIX.mongo-c-driver}/include/libmongoc-1.0
 LDFLAGS+=      ${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib
 
+# needed for linking against boost_log, otherwise some symbols are not found
+SCONS_BUILD_ARGS+=     CPPDEFINES=-DBOOST_LOG_DYN_LINK=1
 SCONS_BUILD_ARGS+=     CC=${CC:Q}
 SCONS_BUILD_ARGS+=     CXX=${CXX:Q}
 SCONS_BUILD_ARGS+=     CFLAGS=${CFLAGS:Q}
 SCONS_BUILD_ARGS+=     CXXFLAGS=${CXXFLAGS:Q}
 SCONS_BUILD_ARGS+=     LINKFLAGS=${LDFLAGS:Q}
 SCONS_BUILD_ARGS+=     CPPPATH=${INCL_PATH:Q}
-SCONS_BUILD_ARGS+=     core
-SCONS_INSTALL_ARGS+=   --prefix=${DESTDIR}${PREFIX}
+INSTALL_TARGET=                install-devcore
+SCONS_INSTALL_ARGS+=   DESTDIR=${DESTDIR}
+SCONS_INSTALL_ARGS+=   PREFIX=${PREFIX}
 
 .include "options.mk"
 
@@ -100,7 +105,7 @@ FILES_SUBST+=               MONGODB_LOGPATH=${MONGODB
 SUBST_CLASSES+=                path
 SUBST_STAGE.path=      pre-build
 SUBST_MESSAGE.path=    Replacing database paths.
-SUBST_FILES.path=      debian/mongo.1 debian/mongod.1
+SUBST_FILES.path=      debian/mongod.1 debian/mongoldap.1 debian/mongos.1
 SUBST_FILES.path+=     src/mongo/db/storage/storage_options.cpp
 SUBST_SED.path=                -e 's,/data/db,${MONGODB_DBPATH},g'
 SUBST_SED.path+=       -e 's,/data/configdb,${MONGODB_CONFIGDBPATH},g'
@@ -115,7 +120,7 @@ SUBST_SED.varbase+= -e 's,/var/log/mongo
 
 REPLACE_PYTHON+=       src/mongo/installer/compass/install_compass
 
-NOT_PAX_MPROTECT_SAFE+=        bin/mongo bin/mongod
+NOT_PAX_MPROTECT_SAFE+=        bin/mongo bin/mongod bin/mongos
 
 RCD_SCRIPTS=           mongodb
 
@@ -124,15 +129,16 @@ INSTALLATION_DIRS+=       share/doc/mongodb sh
 CONF_FILES+=           share/examples/mongodb/mongod.conf \
                        ${PKG_SYSCONFDIR}/mongod.conf
 
-CHECK_PORTABILITY_SKIP=        src/mongo/gotools/src/github.com/mongodb/mongo-tools/vendor/go.mongodb.org/mongo-driver/etc/add-license.sh
+CHECK_PORTABILITY_SKIP+=       src/mongo/gotools/src/github.com/mongodb/mongo-tools/vendor/go.mongodb.org/mongo-driver/etc/add-license.sh
+CHECK_PORTABILITY_SKIP+=       src/third_party/unwind/dist/tests/check-namespace.sh.in
 
 # Copy system specific files for NetBSD and DragonFly
 post-extract:
        ${CHMOD} -R g-w ${WRKSRC}
-       ${CP} -R ${WRKSRC}/src/third_party/mozjs-60/platform/x86_64/freebsd \
-               ${WRKSRC}/src/third_party/mozjs-60/platform/x86_64/dragonfly
-       ${CP} -R ${WRKSRC}/src/third_party/mozjs-60/platform/x86_64/freebsd \
-               ${WRKSRC}/src/third_party/mozjs-60/platform/x86_64/netbsd
+       ${CP} -R ${WRKSRC}/src/third_party/mozjs/platform/x86_64/freebsd \
+               ${WRKSRC}/src/third_party/mozjs/platform/x86_64/dragonfly
+       ${CP} -R ${WRKSRC}/src/third_party/mozjs/platform/x86_64/freebsd \
+               ${WRKSRC}/src/third_party/mozjs/platform/x86_64/netbsd
        ${CP} ${WRKSRC}/src/mongo/db/ftdc/ftdc_system_stats_openbsd.cpp \
                ${WRKSRC}/src/mongo/db/ftdc/ftdc_system_stats_netbsd.cpp
        ${CP} ${WRKSRC}/src/mongo/db/ftdc/ftdc_system_stats_freebsd.cpp \
@@ -155,13 +161,15 @@ do-configure:
        ${DO_NADA}
 
 post-install:
+.for junk in LICENSE-Community.txt MPL-2 README THIRD-PARTY-NOTICES bin/resmoke.py macos_mongodb.plist
+       ${RM} -f ${DESTDIR}${PREFIX}/${junk}
+.endfor
        ${INSTALL_MAN} ${WRKSRC}/debian/*.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
        ${INSTALL_DATA} ${WRKSRC}/debian/mongod.conf \
                ${DESTDIR}${PREFIX}/share/examples/mongodb
 
 .include "../../archivers/zstd/buildlink3.mk"
 .include "../../databases/mongo-c-driver/buildlink3.mk"
-.include "../../databases/sqlite3/buildlink3.mk"
 #.include "../../databases/wiredtiger/buildlink3.mk"
 #.include "../../devel/asio/buildlink3.mk"
 .include "../../devel/boost-headers/buildlink3.mk"
@@ -175,6 +183,7 @@ _SCONS_BUILD_ARGS+=     ${SCONS_BUILD_AR
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../lang/python/application.mk"
 .include "../../net/libpcap/buildlink3.mk"
+#.include "../../textproc/fmtlib/buildlink3.mk"
 .include "../../textproc/icu/buildlink3.mk"
 .include "../../textproc/yaml-cpp/buildlink3.mk"
 .include "../../www/curl/buildlink3.mk"

Index: pkgsrc/databases/mongodb/PLIST
diff -u pkgsrc/databases/mongodb/PLIST:1.4 pkgsrc/databases/mongodb/PLIST:1.5
--- pkgsrc/databases/mongodb/PLIST:1.4  Sat Feb  1 20:00:08 2020
+++ pkgsrc/databases/mongodb/PLIST      Sat Jul 29 11:45:43 2023
@@ -1,19 +1,9 @@
-@comment $NetBSD: PLIST,v 1.4 2020/02/01 20:00:08 adam Exp $
-bin/install_compass
+@comment $NetBSD: PLIST,v 1.5 2023/07/29 11:45:43 adam Exp $
 bin/mongo
 bin/mongod
 bin/mongos
-man/man1/bsondump.1
-man/man1/mongo.1
 man/man1/mongod.1
-man/man1/mongodump.1
-man/man1/mongoexport.1
-man/man1/mongofiles.1
-man/man1/mongoimport.1
+man/man1/mongokerberos.1
 man/man1/mongoldap.1
-man/man1/mongoreplay.1
-man/man1/mongorestore.1
 man/man1/mongos.1
-man/man1/mongostat.1
-man/man1/mongotop.1
 share/examples/mongodb/mongod.conf

Index: pkgsrc/databases/mongodb/distinfo
diff -u pkgsrc/databases/mongodb/distinfo:1.36 pkgsrc/databases/mongodb/distinfo:1.37
--- pkgsrc/databases/mongodb/distinfo:1.36      Sun Jan 22 17:36:31 2023
+++ pkgsrc/databases/mongodb/distinfo   Sat Jul 29 11:45:43 2023
@@ -1,27 +1,31 @@
-$NetBSD: distinfo,v 1.36 2023/01/22 17:36:31 ryoon Exp $
+$NetBSD: distinfo,v 1.37 2023/07/29 11:45:43 adam Exp $
 
-BLAKE2s (mongodb-src-r4.2.15.tar.gz) = 917d4e65f16a7ba228bf335965c2608f73645fe24e764e8f49f19ae052f47d48
-SHA512 (mongodb-src-r4.2.15.tar.gz) = ee46a2dfb7ae23ad38da49bf126a2bc7932bded8f01d34516ad575d2aed5d6233c5ad620b2a4424a98afb9e80e26acf40c66982cdd0637c13f0f7aaae8b746a0
-Size (mongodb-src-r4.2.15.tar.gz) = 62187847 bytes
-SHA1 (patch-SConstruct) = 34749f069c6e6415f1b496e5c8ac2cc838c0ea5b
+BLAKE2s (mongodb-src-r6.0.8.tar.gz) = f436ef2f5e9e8ab566effa8bad60272bb4f83cfab9ed9e6144c20d509b43b786
+SHA512 (mongodb-src-r6.0.8.tar.gz) = cd4619e3653f686e28f0a8523ced7988a153e83049c1875c620734f53638bc38a9e1304a5ac8f0b5c21c37cd8681213519f4059a65121fbaa2c44b41b9e5382f
+Size (mongodb-src-r6.0.8.tar.gz) = 89692574 bytes
+SHA1 (patch-SConstruct) = 247af4df0f9f13da774e58d0f22994b5e092f166
 SHA1 (patch-site__scons_mongo_platform.py) = 6a6daba04876f9779a26c579e6f6a66f55e1cbe6
-SHA1 (patch-site__scons_site__tools_libtool.py) = 2fb5947703f4292acc1306f92ca7938e8cbc62e0
-SHA1 (patch-src_mongo_base_initializer.h) = efaec2e3b5b8a4bfb15c65c6952924cd1469bdc7
-SHA1 (patch-src_mongo_db_query_collation_collator__interface__icu.h) = f6382a3dcdbaed26fe692aa1ea43b2640168b253
+SHA1 (patch-site__scons_site__tools_libtool.py) = 72ec0ff7fa1c06d6d7d3881d7ed521c8c1285124
+SHA1 (patch-src_mongo_base_initializer.h) = 955a3762a26a89af6b91331289885de8f0cc8585
+SHA1 (patch-src_mongo_db_query_collation_collator__interface__icu.h) = c45861a0e57410c3a2b90f71c51852de3f7531da
 SHA1 (patch-src_mongo_db_repl_isself.cpp) = b7931feac26dcffa7eac68f5cb348feb6b993c37
-SHA1 (patch-src_mongo_db_storage_storage__repair__observer.cpp) = a45223c828f249cdb6f2e6f12b42f7ef4671379b
-SHA1 (patch-src_mongo_db_storage_wiredtiger_wiredtiger__util.cpp) = 5d76b8bc20b8142d325613b5d1781a0599903ebe
-SHA1 (patch-src_mongo_platform_random.cpp) = 0b42d1b8bf41f8a7448daca0b72bfed1ba462b99
-SHA1 (patch-src_mongo_platform_stack__locator__netbsd.cpp) = 0826e976048c79598ead6146f143ab3b4a2577fb
+SHA1 (patch-src_mongo_db_repl_tenant__file__cloner.h) = baac73a2b7d3766bd001321f38dcb3ea6cc2885e
+SHA1 (patch-src_mongo_db_storage_storage__repair__observer.cpp) = 8d3be42e52f8bd68c210316341f5af4359111df7
+SHA1 (patch-src_mongo_db_storage_wiredtiger_wiredtiger__kv__engine.cpp) = 73c781aa6a258319f366ad8672e0d7e043439e5c
+SHA1 (patch-src_mongo_platform_process__id.cpp) = 393f0ba30d68ad20a178440873a9d0c1453117fa
+SHA1 (patch-src_mongo_platform_random.cpp) = 11829afcfc6153c84e42a5f8c1fde9f85c52d5bd
+SHA1 (patch-src_mongo_platform_stack__locator__netbsd.cpp) = 7b79cc0548c4336947555f312f93338b5bcdc22f
 SHA1 (patch-src_mongo_shell_linenoise__utf8.h) = a29cbf034716ce48a23192320caf4928282b6c1a
-SHA1 (patch-src_mongo_shell_shell__utils__extended.cpp) = d639465e37855591b5ca7b23fea798f0eaab94a4
+SHA1 (patch-src_mongo_shell_shell__utils__extended.cpp) = fd70d82aa152e98f0b608377df88502fffe6882a
+SHA1 (patch-src_mongo_util_dns__query__posix-impl.h) = 09712e9ce9feb3c14a39e9647e3ffcb8ced57dcd
 SHA1 (patch-src_mongo_util_intrusive__counter.h) = 4c8e0d2e834686403a557de489ad518071851911
-SHA1 (patch-src_mongo_util_processinfo__netbsd.cpp) = 9f3161c0693b3905299e0e022b9eb68d466d30c4
+SHA1 (patch-src_mongo_util_processinfo__netbsd.cpp) = fe62de77e5ccb737dfad1b492d8e918e81ca420a
 SHA1 (patch-src_mongo_util_time__support.cpp) = d576d8d39b10c496e492c8f0faf7e81f09ca875c
 SHA1 (patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_op__system.h) = 3c168389b9288df9055df0b01e8d26cf2f67293e
 SHA1 (patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h) = aed897879501d74b19dd06a142ded0abf910898d
 SHA1 (patch-src_third__party_asio-master_asio_include_asio_detail_impl_kqueue__reactor.ipp) = 49a74ef12f20c4b243d328a2cd8317aa1a668b18
-SHA1 (patch-src_third__party_mozjs-60_platform_x86__64_netbsd_build_js-confdefs.h) = 2474fc221f0c59381c8529e986db1f3f67c405ec
+SHA1 (patch-src_third__party_mozjs_SConscript) = b0e7318f735b3fce46745ab4221bc5690089b94e
+SHA1 (patch-src_third__party_mozjs_platform_x86__64_netbsd_build_js-confdefs.h) = 4c08643abe225e326d7ed52572b7293b1f5fe981
 SHA1 (patch-src_third__party_s2_base_port.h) = 892ce91b5aaa432f34e1e7c169b7fd6eea2a3e94
 SHA1 (patch-src_third__party_wiredtiger_SConscript) = e97dea310463f246c0a8007a1ba9c5385105036d
-SHA1 (patch-src_third__party_wiredtiger_src_os__posix_os__fs.c) = f965c0919573f17ca910a7ba0530826741978f80
+SHA1 (patch-src_third__party_wiredtiger_src_os__posix_os__fs.c) = 07188f44d7aa0fefaa5ef9cbefef8c046beb0047

Index: pkgsrc/databases/mongodb/patches/patch-SConstruct
diff -u pkgsrc/databases/mongodb/patches/patch-SConstruct:1.10 pkgsrc/databases/mongodb/patches/patch-SConstruct:1.11
--- pkgsrc/databases/mongodb/patches/patch-SConstruct:1.10      Mon Dec 27 09:36:10 2021
+++ pkgsrc/databases/mongodb/patches/patch-SConstruct   Sat Jul 29 11:45:43 2023
@@ -1,22 +1,23 @@
-$NetBSD: patch-SConstruct,v 1.10 2021/12/27 09:36:10 nia Exp $
+$NetBSD: patch-SConstruct,v 1.11 2023/07/29 11:45:43 adam Exp $
 
 Add support for NetBSD and Dragonfly.
+Avoid -fatal-warnings: ld might complain about conflicting versions.
 Fix locations.
 Don't compile with debug info.
 Don't mess with the linker.
 Respect LDFLAGS and CXXFLAGS.
 
---- SConstruct.orig    2021-06-30 17:39:08.000000000 +0000
+--- SConstruct.orig    2023-06-29 13:37:52.000000000 +0000
 +++ SConstruct
-@@ -1043,6 +1043,7 @@ envDict = dict(BUILD_ROOT=buildDir,
-                INSTALL_DIR=installDir,
+@@ -1266,6 +1266,7 @@ envDict = dict(BUILD_ROOT=buildDir,
+                CONFIGURELOG='$BUILD_ROOT/scons/config.log',
                 CONFIG_HEADER_DEFINES={},
                 LIBDEPS_TAG_EXPANSIONS=[],
 +               ENV=os.environ,
                 )
  
- env = Environment(variables=env_vars, **envDict)
-@@ -1193,7 +1194,9 @@ def CheckForProcessor(context, which_arc
+ # By default, we will get the normal SCons tool search. But if the
+@@ -1455,7 +1456,9 @@ def CheckForProcessor(context, which_arc
  os_macros = {
      "windows": "defined(_WIN32)",
      "solaris": "defined(__sun)",
@@ -26,16 +27,25 @@ Respect LDFLAGS and CXXFLAGS.
      "openbsd": "defined(__OpenBSD__)",
      "iOS": "defined(__APPLE__) && TARGET_OS_IOS && !TARGET_OS_SIMULATOR",
      "iOS-sim": "defined(__APPLE__) && TARGET_OS_IOS && TARGET_OS_SIMULATOR",
-@@ -1590,7 +1593,7 @@ if env['_LIBDEPS'] == '$_LIBDEPS_LIBS':
+@@ -1591,7 +1594,7 @@ if env.TargetOSIs('posix'):
+         env.Append(
+             CCFLAGS_WERROR=["-Werror"],
+             CXXFLAGS_WERROR=['-Werror=unused-result'] if env.ToolchainIs('clang') else [],
+-            LINKFLAGS_WERROR=['-Wl,-fatal_warnings' if env.TargetOSIs('darwin') else "-Wl,--fatal-warnings"],
++            LINKFLAGS_WERROR=[''],
+         )
+ elif env.TargetOSIs('windows'):
+         env.Append(
+@@ -2006,7 +2009,7 @@ if env['_LIBDEPS'] == '$_LIBDEPS_LIBS':
      if not env.TargetOSIs('solaris', 'darwin', 'windows', 'openbsd'):
          env.Tool('thin_archive')
  
 -if env.TargetOSIs('linux', 'freebsd', 'openbsd'):
-+if env.TargetOSIs('linux', 'dragonfly', 'freebsd', 'netbsd', 'openbsd'):
-     env['LINK_LIBGROUP_START'] = '-Wl,--start-group'
-     env['LINK_LIBGROUP_END'] = '-Wl,--end-group'
-     # NOTE: The leading and trailing spaces here are important. Do not remove them.
-@@ -1626,14 +1629,14 @@ if env.TargetOSIs('linux'):
++if env.TargetOSIs('linux', 'freebsd', 'openbsd', 'netbsd', 'dragonfly'):
+     env['LINK_WHOLE_ARCHIVE_LIB_START'] = '-Wl,--whole-archive'
+     env['LINK_WHOLE_ARCHIVE_LIB_END'] = '-Wl,--no-whole-archive'
+     env['LINK_AS_NEEDED_LIB_START'] = '-Wl,--as-needed'
+@@ -2183,14 +2186,14 @@ if env.TargetOSIs('linux'):
  elif env.TargetOSIs('solaris'):
       env.Append( LIBS=["socket","resolv","lgrp"] )
  
@@ -52,37 +62,43 @@ Respect LDFLAGS and CXXFLAGS.
      env.Append( LIBS=[ "kvm" ] )
  
  elif env.TargetOSIs('windows'):
-@@ -1891,7 +1894,6 @@ if env.TargetOSIs('posix'):
+@@ -2492,7 +2495,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=["-fno-omit-frame-pointer",
-                          "-fno-strict-aliasing",
+     env.Append( CCFLAGS=["-fasynchronous-unwind-tables",
 -                         "-ggdb" if not env.TargetOSIs('emscripten') else "-g",
-                          "-pthread",
                           "-Wall",
                           "-Wsign-compare",
-@@ -2533,9 +2535,9 @@ def doConfigure(myenv):
+                          "-Wno-unknown-pragmas",
+@@ -3019,7 +3021,7 @@ def doConfigure(myenv):
+         myenv.AddMethod(
+             functools.partial(var_func, var=var, func=CheckFlag), f"Check{var}Supported")
+ 
+-    if myenv.ToolchainIs('gcc', 'clang'):
++    if myenv.ToolchainIs('gcc', 'clang') and get_option('runtime-hardening') == "on":
+         # 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.
+@@ -3415,9 +3417,6 @@ def doConfigure(myenv):
      if usingLibStdCxx:
          def CheckModernLibStdCxx(context):
              test_body = """
 -            #if !__has_include(<experimental/filesystem>)
 -            #error "libstdc++ from GCC 5.3.0 or newer is required"
 -            #endif
-+            //#if !__has_include(<experimental/filesystem>)
-+            //#error "libstdc++ from GCC 5.3.0 or newer is required"
-+            //#endif
              """
  
              context.Message('Checking for libstdc++ 5.3.0 or better... ')
-@@ -2779,7 +2781,7 @@ def doConfigure(myenv):
-         #
-         myenv.Append( CCFLAGS=["/Zc:inline"])
- 
--    if myenv.ToolchainIs('gcc', 'clang'):
-+    if myenv.ToolchainIs('gcc', 'clang') and get_option('runtime-hardening') == "on":
-         # 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.
-@@ -3021,8 +3023,9 @@ def doConfigure(myenv):
+@@ -3828,7 +3827,7 @@ def doConfigure(myenv):
+         # Explicitly use the new gnu hash section if the linker offers
+         # it, except on android since older runtimes seem to not
+         # support it. For that platform, use 'both'.
+-        if env.TargetOSIs('android'):
++        if env.TargetOSIs('android') or env.TargetOSIs('netbsd'):
+             myenv.AddToLINKFLAGSIfSupported('-Wl,--hash-style=both')
+         else:
+             myenv.AddToLINKFLAGSIfSupported('-Wl,--hash-style=gnu')
+@@ -4119,8 +4118,9 @@ def doConfigure(myenv):
      def checkOpenSSL(conf):
          sslLibName = "ssl"
          cryptoLibName = "crypto"
@@ -94,7 +110,7 @@ Respect LDFLAGS and CXXFLAGS.
              sslLinkDependencies = ["crypto"]
  
          if conf.env.TargetOSIs('windows'):
-@@ -3368,7 +3371,7 @@ def doConfigure(myenv):
+@@ -4457,7 +4457,7 @@ def doConfigure(myenv):
          myenv.ConfError("Couldn't find SASL header/libraries")
  
      # requires ports devel/libexecinfo to be installed

Index: pkgsrc/databases/mongodb/patches/patch-site__scons_site__tools_libtool.py
diff -u pkgsrc/databases/mongodb/patches/patch-site__scons_site__tools_libtool.py:1.1 pkgsrc/databases/mongodb/patches/patch-site__scons_site__tools_libtool.py:1.2
--- pkgsrc/databases/mongodb/patches/patch-site__scons_site__tools_libtool.py:1.1       Tue Mar  5 19:35:58 2019
+++ pkgsrc/databases/mongodb/patches/patch-site__scons_site__tools_libtool.py   Sat Jul 29 11:45:43 2023
@@ -1,15 +1,15 @@
-$NetBSD: patch-site__scons_site__tools_libtool.py,v 1.1 2019/03/05 19:35:58 adam Exp $
+$NetBSD: patch-site__scons_site__tools_libtool.py,v 1.2 2023/07/29 11:45:43 adam Exp $
 
 Use system libtool (Darwin only).
 
---- site_scons/site_tools/libtool.py.orig      2019-03-04 18:25:28.000000000 +0000
+--- site_scons/site_tools/libtool.py.orig      2023-06-29 13:37:52.000000000 +0000
 +++ site_scons/site_tools/libtool.py
-@@ -2,7 +2,7 @@ import SCons
+@@ -25,7 +25,7 @@ import SCons
  
  def generate(env):
  
--    env['AR'] = 'libtool'
-+    env['AR'] = '/usr/bin/libtool'
-     env['ARCOM'] = '$AR -static -o $TARGET $ARFLAGS $SOURCES'
-     env['ARFLAGS'] = ["-s", "-no_warning_for_no_symbols"]
+-    env["AR"] = "libtool"
++    env["AR"] = "/usr/bin/libtool"
+     env["ARCOM"] = "$AR -static -o $TARGET $ARFLAGS $SOURCES"
+     env["ARFLAGS"] = ["-s", "-no_warning_for_no_symbols"]
  
Index: pkgsrc/databases/mongodb/patches/patch-src_mongo_db_query_collation_collator__interface__icu.h
diff -u pkgsrc/databases/mongodb/patches/patch-src_mongo_db_query_collation_collator__interface__icu.h:1.1 
pkgsrc/databases/mongodb/patches/patch-src_mongo_db_query_collation_collator__interface__icu.h:1.2
--- pkgsrc/databases/mongodb/patches/patch-src_mongo_db_query_collation_collator__interface__icu.h:1.1  Sat Feb  1 20:00:08 2020
+++ pkgsrc/databases/mongodb/patches/patch-src_mongo_db_query_collation_collator__interface__icu.h      Sat Jul 29 11:45:43 2023
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_mongo_db_query_collation_collator__interface__icu.h,v 1.1 2020/02/01 20:00:08 adam Exp $
+$NetBSD: patch-src_mongo_db_query_collation_collator__interface__icu.h,v 1.2 2023/07/29 11:45:43 adam Exp $
 
 Fix for newer ICU.
 
---- src/mongo/db/query/collation/collator_interface_icu.h.orig 2020-01-26 09:25:13.000000000 +0000
+--- src/mongo/db/query/collation/collator_interface_icu.h.orig 2023-06-29 13:37:52.000000000 +0000
 +++ src/mongo/db/query/collation/collator_interface_icu.h
 @@ -33,9 +33,7 @@
  
@@ -19,8 +19,8 @@ Fix for newer ICU.
   */
  class CollatorInterfaceICU final : public CollatorInterface {
  public:
--    CollatorInterfaceICU(CollationSpec spec, std::unique_ptr<icu::Collator> collator);
-+    CollatorInterfaceICU(CollationSpec spec, std::unique_ptr<U_ICU_NAMESPACE::Collator> collator);
+-    CollatorInterfaceICU(Collation spec, std::unique_ptr<icu::Collator> collator);
++    CollatorInterfaceICU(Collation spec, std::unique_ptr<U_ICU_NAMESPACE::Collator> collator);
  
      std::unique_ptr<CollatorInterface> clone() const final;
  
Index: pkgsrc/databases/mongodb/patches/patch-src_mongo_db_storage_storage__repair__observer.cpp
diff -u pkgsrc/databases/mongodb/patches/patch-src_mongo_db_storage_storage__repair__observer.cpp:1.1 pkgsrc/databases/mongodb/patches/patch-src_mongo_db_storage_storage__repair__observer.cpp:1.2
--- pkgsrc/databases/mongodb/patches/patch-src_mongo_db_storage_storage__repair__observer.cpp:1.1       Sun Jan 22 17:36:31 2023
+++ pkgsrc/databases/mongodb/patches/patch-src_mongo_db_storage_storage__repair__observer.cpp   Sat Jul 29 11:45:43 2023
@@ -1,6 +1,8 @@
-$NetBSD: patch-src_mongo_db_storage_storage__repair__observer.cpp,v 1.1 2023/01/22 17:36:31 ryoon Exp $
+$NetBSD: patch-src_mongo_db_storage_storage__repair__observer.cpp,v 1.2 2023/07/29 11:45:43 adam Exp $
 
---- src/mongo/db/storage/storage_repair_observer.cpp.orig      2021-06-30 17:39:08.000000000 +0000
+boost::filesystem::ofstream is deprected, use std::ofstream instead.
+
+--- src/mongo/db/storage/storage_repair_observer.cpp.orig      2023-06-29 13:37:52.000000000 +0000
 +++ src/mongo/db/storage/storage_repair_observer.cpp
 @@ -34,6 +34,7 @@
  #include <algorithm>
@@ -10,12 +12,12 @@ $NetBSD: patch-src_mongo_db_storage_stor
  
  #ifdef __linux__
  #include <fcntl.h>
-@@ -120,7 +121,7 @@ bool StorageRepairObserver::isDataInvali
+@@ -121,7 +122,7 @@ bool StorageRepairObserver::isDataInvali
  }
  
  void StorageRepairObserver::_touchRepairIncompleteFile() {
 -    boost::filesystem::ofstream fileStream(_repairIncompleteFilePath);
-+    std::ofstream fileStream(_repairIncompleteFilePath);
++    std::ofstream fileStream(_repairIncompleteFilePath.string());
      fileStream << "This file indicates that a repair operation is in progress or incomplete.";
      if (fileStream.fail()) {
-         severe() << "Failed to write to file " << _repairIncompleteFilePath.string() << ": "
+         LOGV2_FATAL_NOTRACE(50920,
Index: pkgsrc/databases/mongodb/patches/patch-src_mongo_shell_shell__utils__extended.cpp
diff -u pkgsrc/databases/mongodb/patches/patch-src_mongo_shell_shell__utils__extended.cpp:1.1 pkgsrc/databases/mongodb/patches/patch-src_mongo_shell_shell__utils__extended.cpp:1.2
--- pkgsrc/databases/mongodb/patches/patch-src_mongo_shell_shell__utils__extended.cpp:1.1       Sun Jan 22 17:36:31 2023
+++ pkgsrc/databases/mongodb/patches/patch-src_mongo_shell_shell__utils__extended.cpp   Sat Jul 29 11:45:43 2023
@@ -1,15 +1,24 @@
-$NetBSD: patch-src_mongo_shell_shell__utils__extended.cpp,v 1.1 2023/01/22 17:36:31 ryoon Exp $
+$NetBSD: patch-src_mongo_shell_shell__utils__extended.cpp,v 1.2 2023/07/29 11:45:43 adam Exp $
 
-* boost::filesystem::ofstream deprected, use std::ofstream instead.
+boost::filesystem::ofstream is deprected, use std::ofstream instead.
 
 --- src/mongo/shell/shell_utils_extended.cpp.orig      2021-06-30 17:39:08.000000000 +0000
 +++ src/mongo/shell/shell_utils_extended.cpp
-@@ -318,7 +318,7 @@ BSONObj writeFile(const BSONObj& args, v
+@@ -390,7 +390,7 @@ BSONObj writeFile(const BSONObj& args, v
              mode |= std::ios::binary;
      }
  
 -    boost::filesystem::ofstream ofs{normalizedFilePath, mode};
-+    std::ofstream ofs{normalizedFilePath, mode};
++    std::ofstream ofs{normalizedFilePath.string(), mode};
      uassert(40346,
              str::stream() << "failed to open file " << normalizedFilePath.string()
                            << " for writing",
+@@ -454,7 +454,7 @@ BSONObj readDumpFile(const BSONObj& a, v
+ 
+     // Open the file for reading in binary mode.
+     const auto pathStr = a.firstElement().String();
+-    boost::filesystem::ifstream stream(pathStr, std::ios::in | std::ios::binary);
++    ifstream stream(pathStr, std::ios::in | std::ios::binary);
+     uassert(31405,
+             str::stream() << "readDumpFile(): Unable to open file \"" << pathStr
+                           << "\" for reading",

Index: pkgsrc/databases/mongodb/patches/patch-src_mongo_base_initializer.h
diff -u pkgsrc/databases/mongodb/patches/patch-src_mongo_base_initializer.h:1.3 pkgsrc/databases/mongodb/patches/patch-src_mongo_base_initializer.h:1.4
--- pkgsrc/databases/mongodb/patches/patch-src_mongo_base_initializer.h:1.3     Sat Feb  1 20:00:08 2020
+++ pkgsrc/databases/mongodb/patches/patch-src_mongo_base_initializer.h Sat Jul 29 11:45:43 2023
@@ -1,14 +1,14 @@
-$NetBSD: patch-src_mongo_base_initializer.h,v 1.3 2020/02/01 20:00:08 adam Exp $
+$NetBSD: patch-src_mongo_base_initializer.h,v 1.4 2023/07/29 11:45:43 adam Exp $
 
 Fixes at least SunOS.
 
---- src/mongo/base/initializer.h.orig  2019-12-04 23:29:59.000000000 +0000
+--- src/mongo/base/initializer.h.orig  2023-06-29 13:37:52.000000000 +0000
 +++ src/mongo/base/initializer.h
-@@ -31,6 +31,7 @@
- 
+@@ -32,6 +32,7 @@
+ #include <functional>
  #include <string>
  #include <vector>
 +#include <unistd.h>
  
- #include "mongo/base/initializer_context.h"
- #include "mongo/base/initializer_dependency_graph.h"
+ #include "mongo/base/status.h"
+ 

Index: pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_random.cpp
diff -u pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_random.cpp:1.5 pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_random.cpp:1.6
--- pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_random.cpp:1.5    Sat Feb  1 20:00:08 2020
+++ pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_random.cpp        Sat Jul 29 11:45:43 2023
@@ -1,15 +1,15 @@
-$NetBSD: patch-src_mongo_platform_random.cpp,v 1.5 2020/02/01 20:00:08 adam Exp $
+$NetBSD: patch-src_mongo_platform_random.cpp,v 1.6 2023/07/29 11:45:43 adam Exp $
 
 Add NetBSD and DragonFly support.
 
---- src/mongo/platform/random.cpp.orig 2019-12-04 23:29:59.000000000 +0000
+--- src/mongo/platform/random.cpp.orig 2023-06-29 13:37:52.000000000 +0000
 +++ src/mongo/platform/random.cpp
-@@ -148,7 +148,7 @@ std::unique_ptr<SecureRandom> SecureRand
- }
- 
+@@ -57,7 +57,7 @@
+ #ifdef _WIN32
+ #define SECURE_RANDOM_BCRYPT
  #elif defined(__linux__) || defined(__sun) || defined(__APPLE__) || defined(__FreeBSD__) || \
 -    defined(__EMSCRIPTEN__)
 +    defined(__EMSCRIPTEN__) || defined(__DragonFly__) || defined(__NetBSD__)
- 
- class InputStreamSecureRandom : public SecureRandom {
- public:
+ #define SECURE_RANDOM_URANDOM
+ #elif defined(__OpenBSD__)
+ #define SECURE_RANDOM_ARCFOUR

Index: pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp
diff -u pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp:1.2 pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp:1.3
--- pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp:1.2    Tue Mar  5 19:35:58 2019
+++ pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp        Sat Jul 29 11:45:43 2023
@@ -1,10 +1,10 @@
-$NetBSD: patch-src_mongo_platform_stack__locator__netbsd.cpp,v 1.2 2019/03/05 19:35:58 adam Exp $
+$NetBSD: patch-src_mongo_platform_stack__locator__netbsd.cpp,v 1.3 2023/07/29 11:45:43 adam Exp $
 
 Add NetBSD support.
 
---- src/mongo/platform/stack_locator_netbsd.cpp.orig   2019-03-05 15:19:27.000000000 +0000
+--- src/mongo/platform/stack_locator_netbsd.cpp.orig   2023-07-28 17:26:23.000000000 +0000
 +++ src/mongo/platform/stack_locator_netbsd.cpp
-@@ -33,7 +31,6 @@
+@@ -32,7 +32,6 @@
  #include "mongo/platform/stack_locator.h"
  
  #include <pthread.h>
@@ -12,7 +12,7 @@ Add NetBSD support.
  
  #include "mongo/util/assert_util.h"
  #include "mongo/util/scopeguard.h"
-@@ -53,7 +50,7 @@ StackLocator::StackLocator() {
+@@ -52,7 +51,7 @@ StackLocator::StackLocator() {
  
      invariant(pthread_attr_getstack(&attr, &_end, &size) == 0);
  
Index: pkgsrc/databases/mongodb/patches/patch-src_third__party_wiredtiger_src_os__posix_os__fs.c
diff -u pkgsrc/databases/mongodb/patches/patch-src_third__party_wiredtiger_src_os__posix_os__fs.c:1.2 pkgsrc/databases/mongodb/patches/patch-src_third__party_wiredtiger_src_os__posix_os__fs.c:1.3
--- pkgsrc/databases/mongodb/patches/patch-src_third__party_wiredtiger_src_os__posix_os__fs.c:1.2       Tue Mar 24 14:34:06 2020
+++ pkgsrc/databases/mongodb/patches/patch-src_third__party_wiredtiger_src_os__posix_os__fs.c   Sat Jul 29 11:45:43 2023
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_third__party_wiredtiger_src_os__posix_os__fs.c,v 1.2 2020/03/24 14:34:06 adam Exp $
+$NetBSD: patch-src_third__party_wiredtiger_src_os__posix_os__fs.c,v 1.3 2023/07/29 11:45:43 adam Exp $
 
 The fdatasync call is specified by POSIX, and the definition has changed:
   https://pubs.opengroup.org/onlinepubs/009695399/functions/fdatasync.html
@@ -9,14 +9,14 @@ crashing on EBADF, at the possible expen
 
 \todo Change NetBSD to follow the current standard.
 
---- src/third_party/wiredtiger/src/os_posix/os_fs.c.orig       2020-03-19 16:16:51.000000000 +0000
+--- src/third_party/wiredtiger/src/os_posix/os_fs.c.orig       2023-06-29 13:37:52.000000000 +0000
 +++ src/third_party/wiredtiger/src/os_posix/os_fs.c
-@@ -94,7 +94,7 @@ __posix_sync(WT_SESSION_IMPL *session, i
+@@ -89,7 +89,7 @@ __posix_sync(WT_SESSION_IMPL *session, i
  #if defined(HAVE_FDATASYNC)
      /* See comment in __posix_sync(): sync cannot be retried or fail. */
      WT_SYSCALL(fdatasync(fd), ret);
 -    if (ret == 0)
 +    if (ret == 0 || errno == EBADF)
          return (0);
-     WT_PANIC_RET(session, ret, "%s: %s: fdatasync", name, func);
+     WT_RET_PANIC(session, ret, "%s: %s: fdatasync", name, func);
  #else

Index: pkgsrc/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp
diff -u pkgsrc/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp:1.4 pkgsrc/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp:1.5
--- pkgsrc/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp:1.4   Sat Feb  1 20:00:08 2020
+++ pkgsrc/databases/mongodb/patches/patch-src_mongo_util_processinfo__netbsd.cpp       Sat Jul 29 11:45:43 2023
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_mongo_util_processinfo__netbsd.cpp,v 1.4 2020/02/01 20:00:08 adam Exp $
+$NetBSD: patch-src_mongo_util_processinfo__netbsd.cpp,v 1.5 2023/07/29 11:45:43 adam Exp $
 
 Add NetBSD support.
 
---- src/mongo/util/processinfo_netbsd.cpp.orig 2020-01-27 09:41:08.452841019 +0000
+--- src/mongo/util/processinfo_netbsd.cpp.orig 2023-07-26 08:58:34.000000000 +0000
 +++ src/mongo/util/processinfo_netbsd.cpp
 @@ -26,6 +26,7 @@
   *    exception statement from all source files in the program, then also delete
@@ -10,7 +10,7 @@ Add NetBSD support.
   */
 +#define _KMEMUSER
  
- #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl
+ #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl
  
 @@ -38,7 +39,6 @@
  #include <sys/param.h>
@@ -29,7 +29,7 @@ Add NetBSD support.
      char value[256] = {0};
      size_t len = sizeof(value);
      if (sysctl(sysctlID, idLen, &value, &len, NULL, 0) == -1) {
-@@ -109,7 +109,7 @@ int ProcessInfo::getVirtualMemorySize() 
+@@ -105,7 +105,7 @@ int ProcessInfo::getVirtualMemorySize() 
          return -1;
      }
  
@@ -38,8 +38,8 @@ Add NetBSD support.
      int vss = ((task->p_vm_dsize + task->p_vm_ssize + task->p_vm_tsize) * sysconf(_SC_PAGESIZE)) /
          1048576;
      kvm_close(kd);
-@@ -124,7 +124,7 @@ int ProcessInfo::getResidentSize() {
-         log() << "Unable to get res mem size: " << err;
+@@ -120,7 +120,7 @@ int ProcessInfo::getResidentSize() {
+         LOGV2(23344, "Unable to get res mem size: {err}", "err"_attr = err);
          return -1;
      }
 -    kinfo_proc* task = kvm_getprocs(kd, KERN_PROC_PID, _pid.toNative(), sizeof(kinfo_proc), &cnt);
@@ -47,7 +47,7 @@ Add NetBSD support.
      int rss = (task->p_vm_rssize * sysconf(_SC_PAGESIZE)) / 1048576;  // convert from pages to MB
      kvm_close(kd);
      return rss;
-@@ -136,7 +136,7 @@ double ProcessInfo::getSystemMemoryPress
+@@ -128,7 +128,7 @@ int ProcessInfo::getResidentSize() {
  
  void ProcessInfo::SystemInfo::collectSystemInfo() {
      osType = "BSD";

Added files:

Index: pkgsrc/databases/mongodb/patches/patch-src_mongo_db_repl_tenant__file__cloner.h
diff -u /dev/null pkgsrc/databases/mongodb/patches/patch-src_mongo_db_repl_tenant__file__cloner.h:1.1
--- /dev/null   Sat Jul 29 11:45:44 2023
+++ pkgsrc/databases/mongodb/patches/patch-src_mongo_db_repl_tenant__file__cloner.h     Sat Jul 29 11:45:43 2023
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_mongo_db_repl_tenant__file__cloner.h,v 1.1 2023/07/29 11:45:43 adam Exp $
+
+boost::filesystem::ofstream deprected, use std::ofstream instead.
+
+--- src/mongo/db/repl/tenant_file_cloner.h.orig        2023-07-26 18:58:00.000000000 +0000
++++ src/mongo/db/repl/tenant_file_cloner.h
+@@ -30,6 +30,7 @@
+ #pragma once
+ 
+ #include <boost/filesystem.hpp>
++#include <fstream>
+ #include <memory>
+ #include <vector>
+ 
Index: pkgsrc/databases/mongodb/patches/patch-src_mongo_db_storage_wiredtiger_wiredtiger__kv__engine.cpp
diff -u /dev/null pkgsrc/databases/mongodb/patches/patch-src_mongo_db_storage_wiredtiger_wiredtiger__kv__engine.cpp:1.1
--- /dev/null   Sat Jul 29 11:45:44 2023
+++ pkgsrc/databases/mongodb/patches/patch-src_mongo_db_storage_wiredtiger_wiredtiger__kv__engine.cpp   Sat Jul 29 11:45:43 2023
@@ -0,0 +1,23 @@
+$NetBSD: patch-src_mongo_db_storage_wiredtiger_wiredtiger__kv__engine.cpp,v 1.1 2023/07/29 11:45:43 adam Exp $
+
+boost::filesystem::ofstream deprected, use std::ofstream instead.
+
+--- src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp.orig      2023-07-26 16:17:08.000000000 +0000
++++ src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
+@@ -43,6 +43,7 @@
+ 
+ #include <fmt/format.h>
+ #include <iomanip>
++#include <fstream>
+ #include <memory>
+ 
+ #include "mongo/db/storage/wiredtiger/wiredtiger_kv_engine.h"
+@@ -1268,7 +1269,7 @@ WiredTigerKVEngine::beginNonBlockingBack
+ 
+     // 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()); }
++    { std::ofstream ongoingBackup(getOngoingBackupPath().string()); }
+ 
+     // Oplog truncation thread won't remove oplog since the checkpoint pinned by the backup cursor.
+     stdx::lock_guard<Latch> lock(_oplogPinnedByBackupMutex);
Index: pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_process__id.cpp
diff -u /dev/null pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_process__id.cpp:1.1
--- /dev/null   Sat Jul 29 11:45:44 2023
+++ pkgsrc/databases/mongodb/patches/patch-src_mongo_platform_process__id.cpp   Sat Jul 29 11:45:43 2023
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_mongo_platform_process__id.cpp,v 1.1 2023/07/29 11:45:43 adam Exp $
+
+NetBSD support.
+
+--- src/mongo/platform/process_id.cpp.orig     2023-07-28 09:20:38.330632095 +0000
++++ src/mongo/platform/process_id.cpp
+@@ -81,6 +81,10 @@ inline NativeProcessId getCurrentNativeT
+ inline NativeProcessId getCurrentNativeThreadId() {
+     return pthread_getthreadid_np();
+ }
++#elif __NetBSD__
++inline NativeProcessId getCurrentNativeThreadId() {
++    return (intptr_t)pthread_self();
++}
+ #else
+ inline NativeProcessId getCurrentNativeThreadId() {
+     return ::syscall(SYS_gettid);
Index: pkgsrc/databases/mongodb/patches/patch-src_third__party_mozjs_SConscript
diff -u /dev/null pkgsrc/databases/mongodb/patches/patch-src_third__party_mozjs_SConscript:1.1
--- /dev/null   Sat Jul 29 11:45:44 2023
+++ pkgsrc/databases/mongodb/patches/patch-src_third__party_mozjs_SConscript    Sat Jul 29 11:45:43 2023
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_third__party_mozjs_SConscript,v 1.1 2023/07/29 11:45:43 adam Exp $
+
+Do not redefine what is in include/unicode/uconfig.h, or linking might fail.
+
+--- src/third_party/mozjs/SConscript.orig      2023-07-27 17:48:28.000000000 +0000
++++ src/third_party/mozjs/SConscript
+@@ -25,15 +25,6 @@ env.Prepend(CPPDEFINES=[
+         ('IMPL_MFBT', 1),
+         ('JS_USE_CUSTOM_ALLOCATOR', 1),
+         ('STATIC_JS_API', 1),
+-        ('U_NO_DEFAULT_INCLUDE_UTF_HEADERS', 1),
+-        ('UCONFIG_NO_BREAK_ITERATION', 1),
+-        ('UCONFIG_NO_FORMATTING', 1),
+-        ('UCONFIG_NO_TRANSLITERATION', 1),
+-        ('UCONFIG_NO_REGULAR_EXPRESSIONS', 1),
+-        ('U_CHARSET_IS_UTF8', 1),
+-        ('U_DISABLE_RENAMING', 1),
+-        ('U_STATIC_IMPLEMENTATION', 1),
+-        ('U_USING_ICU_NAMESPACE', 0),
+         ])
+ 
+ if get_option('spider-monkey-dbg') == "on":
Index: pkgsrc/databases/mongodb/patches/patch-src_third__party_mozjs_platform_x86__64_netbsd_build_js-confdefs.h
diff -u /dev/null pkgsrc/databases/mongodb/patches/patch-src_third__party_mozjs_platform_x86__64_netbsd_build_js-confdefs.h:1.1
--- /dev/null   Sat Jul 29 11:45:44 2023
+++ pkgsrc/databases/mongodb/patches/patch-src_third__party_mozjs_platform_x86__64_netbsd_build_js-confdefs.h   Sat Jul 29 11:45:43 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_third__party_mozjs_platform_x86__64_netbsd_build_js-confdefs.h,v 1.1 2023/07/29 11:45:43 adam Exp $
+
+On NetBSD, malloc() is defined in stdlib.h.
+
+--- src/third_party/mozjs/platform/x86_64/netbsd/build/js-confdefs.h.orig      2023-07-28 17:26:23.000000000 +0000
++++ src/third_party/mozjs/platform/x86_64/netbsd/build/js-confdefs.h
+@@ -60,7 +60,7 @@
+ #define JS_PUNBOX64 1
+ #define JS_STANDALONE 1
+ #define JS_WITHOUT_NSPR 1
+-#define MALLOC_H <malloc.h>
++#define MALLOC_H <stdlib.h>
+ #define MALLOC_USABLE_SIZE_CONST_PTR const
+ #define MOZILLA_UAVERSION "91.0"
+ #define MOZILLA_VERSION "91.3.0"



Home | Main Index | Thread Index | Old Index