Distributed document-oriented "NoSQL" database.
Mongo (from "humongous") is a high-performance, open source,
schema-free, document-oriented database. A common name in the
"NOSQL" community.
===> The following configuration options are available for mongodb70-7.0.45:
LTO=off: Use Link-Time Optimization
NOAVX=on: "Disable AVX instructions on amd64 (Sandybridge+)"
SASL=on: SASL authentication support
===> Use 'make config' to modify these settings
MongoDB on Raspberry Pi <= 4 can work but is unsupported upstream.
Please read https://jira.mongodb.org/browse/SERVER-71772 and enable option
ARMV80A if you run this on a non-LSE ARM cpu like Raspberry Pi 4.
MongoDB 6.0 and up do not include the 'mongo' CLI shell anymore. You can
use the MongoDB Shell (https://github.com/mongodb-js/mongosh).
# pkg install npm
$ npm install mongosh
$ npx mongosh mongodb://127.0.0.1:27017/
Affects: users of databases/mongodb70, databases/mongodb80
Author: ronald@FreeBSD.org
Reason:
Ports mongodb70 7.0.23 and mongodb80 since 8.0.0 contain a patch to
implement waitable atomics for FreeBSD.
This patch is developed by me. It did not go through QA of MongoDB Inc.
I don't have full QA in place and could only do limited testing. I
can't take any responsibility for the quality of the patch.
Make backups and test for yourself in your setup before upgrading
any critical production environment.
Reason:
MongoDB on non-LSE ARM CPUs like Raspberry Pi 4 works but is
unsupported upstream and can give corruption on high concurrency.
Please read https://jira.mongodb.org/browse/SERVER-71772 for details.
Port mongodb70 is flavored to create two packages:
mongodb70 and mongodb70-armv80a
Please install mongodb70-armv80a on RPI4 or similar ARM systems as pkg
mongodb70 will fail on runtime with unsupported instruction error.
port moved here from databases/mongodb60 on 2025-11-01 REASON: Has expired: EOL starting August 2025, see https://www.mongodb.com/legal/support-policy/lifecycles, please use databases/mongodb70
databases/mongodb70: re-enable python3.12
The patch was disabled temporarily because it was in the way of the recent
upgrades.
NB: a test build was already running when this PR came in.
- Remove jobs_unsafe from a flavour. The build timed out with this.
- no portrevision bump as no pkg content changes.
PR: 296127
databases/mongodb70: 7.0.35
Release notes:
https://www.mongodb.com/docs/manual/release-notes/7.0/#7.0.35---june-9--2026
- gen-config.sh is move to scripts/gen-config.sh
- Patch added to circumvent these errors:
src/mongo/util/net/openssl_init.cpp:247:51: error: no member named
'opensslPrimaryDRBGReseedMaxRequests' in namespace 'mongo::crypto'
src/mongo/util/net/openssl_init.cpp:249:45: error: no member named
'opensslPrimaryDRBGReseedMaxTime' in namespace 'mongo::crypto'
- disabled PATCH_FILE for python3.12, didn't apply
- other patches just got a refresh
Security: CVE-2026-9740
Security: CVE-2026-9741
Security: CVE-2026-9746
Security: CVE-2026-9747
Security: CVE-2026-9748
Security: CVE-2026-9749
Security: CVE-2026-9750
Security: CVE-2026-9751
Security: CVE-2026-9752
Security: CVE-2026-9753
databases/mongodb70: fix build with clang 21
With clang 21 databases/mongodb70 fails to build, with errors similar to:
In file included from
src/third_party/boost/libs/log/src/default_sink.cpp:20:
In file included from src/third_party/boost/boost/thread/locks.hpp:10:
In file included from
src/third_party/boost/boost/thread/lock_algorithms.hpp:11:
In file included from src/third_party/boost/boost/thread/lock_types.hpp:18:
In file included from src/third_party/boost/boost/thread/thread_time.hpp:11:
In file included from
src/third_party/boost/boost/date_time/posix_time/posix_time_types.hpp:16:
In file included from
src/third_party/boost/boost/date_time/posix_time/posix_time_duration.hpp:15:
In file included from
src/third_party/boost/boost/numeric/conversion/cast.hpp:33:
In file included from
src/third_party/boost/boost/numeric/conversion/converter.hpp:13:
In file included from
src/third_party/boost/boost/numeric/conversion/conversion_traits.hpp:13:
In file included from
src/third_party/boost/boost/numeric/conversion/detail/conversion_traits.hpp:18:
(Only the first 15 lines of the commit message are shown above )
databases/mongodb70: harden the port to external CONFIGURE_ARGS
CONFIGURE_ARGS is directly connected to CONFIGURE_SCRIPT and the script
only accepts 2 parameters. Exit 1 on incorrect number of parameters.
And don't allow to += on CONFIGURE_ARGS.
Not bumping PORTREVISION, no content change intended.
PR: 291951
databases/mongodb70: make_jobs_unsafe
For unknown reasons this port tends to fail a lot on @armv80a flavor.
From the build log:
"scons: *** [build/opt/mongo/db/catalog/collection_uuid_mismatch.o] Error -9"
I can't reproduce this locally. Let's try to remove parallel jobs and
see if it improves the build stability.
Reported-by: https://portsfallout.com/fallout?port=databases%2Fmongodb%5B0-9%5D&maintainer=&env=&category=&flavor=
databases/mongodb[78]0: improve a patch
Be pedantic that '!= 0' is not the same as '== -1'. And indeed -1 is what
is documented in the man page of _umtx_op to indicate an error.
No functional change expected.
Reported
by: https://github.com/mongodb/mongo/pull/1607#pullrequestreview-2677292316
databases/mongodb70: fix build with python 3.12
Requests by a user who custom builds this port with python 3.12.
Tested to still build with the currently default python 3.11.
PR: 289086
databases/mongodb70: add flavor for RPI-compatible version
The default flavor is the upstream supported version. For older
ARM CPUs we have an -armv80a flavor now. MongoDB is known to be used by
net-mgmt/unifi* users on this hardware. MongoDB 6.0 is planned to go out
of support in July 2025 [1], so this is preparation to make MongoDB 7.0
the default dependency for Unifi.
[1] https://www.mongodb.com/legal/support-policy/lifecycles
databases/mongodb[67]0: forgot to commit a patch
Fixes: 38836ff12d "databases/mongodb60: fix build with llvm19"
Fixes: 895b2a5c0485 "databases/mongodb70: fix build with llvm19"
databases/mongodb[67]0: remove unused patch for get-sources.sh
The file is not used. We fetch the mozjs source via the ports Makefile.
This brings mongodb60 and mongodb70 more in line with mongodb80.
databases/mongodb[78]0: fix NOAVX option
bump portrevision as it did build but generated broken executables
piggyback a small portlint pacifier
PR: 282471
databases/mongodb70: unbreak on 15 + llvm 19.1.2
stick to <= llvm18 on FreeBSD 15
fixes:
In file included from
src/third_party/mozjs/platform/x86_64/freebsd/build/Unified_cpp_js_src4.cpp:20:
In file included from src/third_party/mozjs/extract/js/src/jsapi.cpp:42:
In file included from
src/third_party/mozjs/extract/js/src/gc/PublicIterators.h:17:
In file included from src/third_party/mozjs/extract/js/src/gc/Zone.h:33:
In file included from src/third_party/mozjs/extract/js/src/vm/JSScript.h:41:
In file included from
src/third_party/mozjs/extract/js/src/vm/SharedImmutableStringsCache.h:22:
src/third_party/mozjs/extract/js/src/threading/ExclusiveData.h:113:29: error:
reference to non-static member function must be called
113 | : lock_(std::move(rhs.lock)), value_(std::move(rhs.value_)) {
| ~~~~^~~~
1 error generated.
databases/mongodb70: update to 7.0.14
Changes:
https://www.mongodb.com/docs/manual/release-notes/7.0/#7.0.14---aug-26--2024
NB: 7.0.13 was tagged, but never released.
Sync with improvements in mongodb80:
from commit b44fe228ca :
Removed SSL from OPTIONS. It was inherited from the first versions
of databases/mongodb, long before I became maintainer.
Currently disabling the SSL option does not disable ssl as ssl is
auto-detected and disabling ssl needs explicit --ssl=off which is
not implemented in the port. I never had a request for this in years
so I decided to just remove the option and have ssl enabled always.
from commit 5d8274d264 :
Also found some manual pages in the src tree.
from commit f2c9ba7c53 :
- add pre-configure check if downloaded mozjs version matches
get-sources.sh.
- change comment to how the upstream project names the open source
variant.
databases/mongodb70: add do-test and update to 7.0.12
Changes:
https://www.mongodb.com/docs/manual/release-notes/7.0/#7.0.12---jun-28--2024
The port has had situations in which the code compiled, but the
executables did not work. Try to catch this early with make test.
- new mozjs version
- autoconf is unused now
- pet portclippy, portfmt, portlint
- pkg-message: use default mongo portnr instead of portnr used by unifi.
*/*: Add ${PY_SETUPTOOLS} to BUILD_DEPENDS
Fix build when setuptools is removed from RUN_DEPENDS in
Mk/Uses/python.mk.
PR: 270510
Approved by: portmgr (blanket)
databases/mongodb*: document replacement of mongo CLI shell
MongoDB 6.0 and up do not include the 'mongo' CLI shell anymore.
Point users to a replacement.
+ use canonical WWW
databases/mongodb70: update to 7.0.0 release
Changes: https://www.mongodb.com/docs/v7.0/release-notes/7.0/
* version bump
* new option ARMV80A to support older ARM cpus like Raspberry Pi 4
* pet portclippy and portfmt
* poudriere stage-qa: ok
As upstream has stopped supporting non-LSE ARM cpus I'm adapting
the port also. The option ARMV80A is for backwards compatibility,
but use at your own risk. See pkg-message for more info.
Revert "databases/mongodb70: Fix build with llvm16"
This reverts commit 4a6a3534dde02d293438a929e06950c64a71a33d.
There was a build failure in my local build instance but this was a
false positive and actually this ports build fine without the changes.
Reported by: fuz
Approved by: portmgr (blanket)
Sponsored by: The FreeBSD Foundation
databases/mongodb70: update to 7.0.0 RC4
Still Release Candidate status. Read the notes:
https://www.mongodb.com/docs/v7.0/release-notes/7.0/
I had no time to test fixes for FreeBSD 14 yet. So 14 is broken still.
databases/mongodb70: update to 7.0.0 RC3
Still Release Candidate status. Read the notes:
https://www.mongodb.com/docs/v7.0/release-notes/7.0/
I had no time to test fixes for FreeBSD 14 yet. So 14 is broken still.
*/*: llvm15 build fixes
llvm15 was also merged into 13.2-STABLE effective from OSVERSION
1302505. Fix the ports that failed to build with llvm15.
Approved by: portmgr (blanket)
databases/mongodb70: fix build on 14-CURRENT
Port does not build with clang15 but does with clang14.
/usr/include/c++/v1/__algorithm/comp.h:36:71: error: invalid operands to binary
expression ('const mongo::SSLX509Name::Entry' and 'const
mongo::SSLX509Name::Entry')
bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
~~~ ^ ~~~
databases/mongodb70: fix build on powerpc64le
In file included from
src/third_party/abseil-cpp/dist/absl/base/internal/unscaledcycleclock.cc:27:
/usr/include/sys/sysctl.h:1189:25: error: unknown type name 'u_int'
int sysctl(const int *, u_int, void *, size_t *, const void *, size_t);
^
src/third_party/abseil-cpp/dist/absl/base/internal/unscaledcycleclock.cc:95:10:
error: unknown type name 'once_flag'
static once_flag init_timebase_frequency_once;
^
src/third_party/abseil-cpp/dist/absl/base/internal/unscaledcycleclock.cc:97:18:
error: no member named 'LowLevelCallOnce' in namespace 'absl::base_internal'
base_internal::LowLevelCallOnce(&init_timebase_frequency_once, [&]() {
~~~~~~~~~~~~~~~^
3 errors generated.