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 mongodb60-6.0.26:
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 Rasperry Pi can work but is unsupported upstream.
Please read https://jira.mongodb.org/browse/SERVER-71772 if you run this
on a non-LSE ARM cpu.
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/
Reason:
MongoDB version 6.0 is End of Life starting August 2025.
Please make sure you are running MongoDB version 7.0 or higher.
In-place upgrades are supported from version 6.0 to 7.0.
For an in-place upgrade it is important that the
'featureCompatibilityVersion' is set to 6.0 before the upgrade.
See: https://www.mongodb.com/docs/v7.0/release-notes/7.0-upgrade-standalone/#feature-compatibility-version
TL;DR, run these commands in mongodb60 before upgrading:
(see `pkg info -D mongodb60` how to install mongosh)
$ npx mongosh mongodb://127.0.0.1:27017/ # or use non-default port
> db.adminCommand( { setFeatureCompatibilityVersion: "6.0" } )
> exit
Affects: users of databases/mongodb50, databases/mongodb44 and databases/mongodb60
Author: ronald@FreeBSD.org
Reason:
MongoDB removed the settings 'fork' and 'pidFilePath' from the default
etc/mongodb.conf file.
This does not affect mongod started by etc/rc.d/mongod as the settings are
passed as arguments. Please verify custom uses of mongod.
port moved to databases/mongodb70 on 2025-11-01 REASON: Has expired: EOL starting August 2025, see https://www.mongodb.com/legal/support-policy/lifecycles, please use databases/mongodb70
port moved here from databases/mongodb50 on 2025-07-31 REASON: Has expired: EOL from October 2024, see https://www.mongodb.com/legal/support-policy/lifecycles, please use databases/mongodb60
databases/mongodb60: reduce warning output
The build outputs MBs of reports like:
"warning: builtin __has_trivial_assign is deprecated; use
__is_trivially_assignable instead [-Wdeprecated-builtins]"
This might somehow supress the error output (or cause the error) of the sporadic
"Error -9".
Suggested by: des@ via
https://lists.freebsd.org/archives/freebsd-ports/2025-May/007910.html
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/mongodb60: unbreak on 15 + llvm 19.1.2
stick to <= llvm18 on FreeBSD 15
fixes:
[00:05:15] In file included from
src/third_party/mozjs/platform/aarch64/freebsd/build/Unified_cpp_js_src13.cpp:2:
[00:05:15] In file included from
src/third_party/mozjs/extract/js/src/vm/ArrayBufferObject.cpp:7:
[00:05:15] In file included from
src/third_party/mozjs/extract/js/src/vm/ArrayBufferObject-inl.h:13:
[00:05:15] In file included from
src/third_party/mozjs/extract/js/src/vm/ArrayBufferObject.h:20:
[00:05:15] In file included from
src/third_party/mozjs/extract/js/src/vm/Runtime.h:55:
[00:05:15] In file included from
src/third_party/mozjs/extract/js/src/vm/Caches.h:22:
[00:05:15] In file included from
src/third_party/mozjs/extract/js/src/vm/JSScript.h:46:
[00:05:15] In file included from
src/third_party/mozjs/extract/js/src/vm/SharedImmutableStringsCache.h:22:
[00:05:15]
src/third_party/mozjs/extract/js/src/threading/ExclusiveData.h:113:29: error:
reference to non-static member function must be called
[00:05:15] 113 | : lock_(std::move(rhs.lock)),
value_(std::move(rhs.value_)) {
[00:05:15] | ~~~~^~~~
databases/mongodb60: update to 6.0.17
Changes:
https://www.mongodb.com/docs/manual/release-notes/6.0/#6.0.17---aug-21--2024
Sync with improvements in mongodb80:
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.
commit 5d8274d264 :
Also found some manual pages in the src tree.
commit f2c9ba7c53 :
add pre-configure check if downloaded mozjs version matches
get-sources.sh.
databases/mongodb60: add do-test target
The port has had situation in which the code compiled, but the
executables did not work. Try to catch this early.
- 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/mongodb60: turn off LTO by default
Got an error report that was fixed by turning this off.
ld-elf.so.1: /usr/local/bin/mongod: Undefined symbol
"_ZN6snappy8CompressEPKcmPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE"
PR: 279821
databases/mongodb60: enable non-AVX CPUs by default
Similar to the change in mongodb50.
Preparation so this can become the default mongodb port for net-mgmt/unifi8.
PR: 277990
databases/mongodb60: fix build with llvm16/clang16
* BOOST_NO_CXX98_FUNCTION_BASE fixes:
In file included from src/third_party/boost/boost/functional/hash.hpp:6:
src/third_party/boost/boost/container_hash/hash.hpp:131:33: error: no template
named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
struct hash_base : std::unary_function<T, std::size_t> {};
~~~~~^~~~~~~~~~~~~~
__unary_function
/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function'
declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
* And "#if 1" fixes:
In file included from src/third_party/boost/boost/mpl/integral_c.hpp:32:
src/third_party/boost/boost/mpl/aux_/integral_wrapper.hpp:73:31: error:
integer value -1 is outside the valid range of values [0, 3] for the enumeration
type 'lock_access_mode' [-Wenum-constexpr-conversion]
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE,
(value - 1)) ) prior;
PR: 272295
databases/mongodb60: update to 6.0.6
trivial version bump
one patchfiles is included in the source now
poudriere stage-qa: ok
Changes:
https://www.mongodb.com/docs/manual/release-notes/6.0/#6.0.6---may-12--2023
Please read the release notes: Some past releases have critical issues.
Followed an upstream change in mongod.conf about removal of 2 settings. See
UPDATING 20230416.
databases/mongodb60: fix segmentation fault on startup
Upstream fixed the issue in the upcoming version. The patch applies cleanly.
And there was much rejoice...
PR: 267668
Approved by: rene (mentor)
Differential Revision: https://reviews.freebsd.org/D38622
databases/mongodb60: update to 6.0.4
- Use in-source boost as it does not compile with boost-1.81.0 from ports.
- Keep IGNORE as it still segfaults on start up. Issue is open upstream.
Approved by: rene (mentor)
Differential Revision: https://reviews.freebsd.org/D38168
databases/mongodb60: Mark IGNORE
forgot to uncomment in the previous commit
Approved by: rene (mentor)
Differential Revision: https://reviews.freebsd.org/D38016
databases/mongodb60: update to 6.0.3
- Trivial version bump.
- Mark IGNORE as it fails on runtime. Upstream has an issue on this open. (See:
PR #267668)
- Add option NOAVX to support building for older CPUs. (Thanks to Borja Marcos)
- Make portmft/portlint/portclippy even more happy.
PR: 268510
Approved by: rene (mentor)
Differential Revision: https://reviews.freebsd.org/D38016
databases/mongodb60: mark ignore on FreeBSD 12.3.
Summary:
Llvm in FreeBSD 12.3 gives several compile errors.
One example:
src/mongo/s/sharding_initialization.cpp:171:49: error: no viable constructor or
deduction guide for deduction of template arguments of 'weak_ptr'
connPoolOptions.controllerFactory = [srwp = std::weak_ptr(srsp)] {
http://beefy6.nyi.freebsd.org/data/123amd64-default/0116f5c59197/logs/errors/mongodb60-6.0.2.log
12.4 is expected to work again due to new libc++
PR: 266587
Approved by: rene (mentor)
MFH: 2022Q4
Differential Revision: https://reviews.freebsd.org/D37230
databases/mongodb60: update to 6.0.2
Summary:
- automate mozjs configuration
- enables powerpc64le support
- overwrites the upstream amd64 configuration which fixes the build
- removes almost 1 MB of patches for aarch64
- use more system libs and llvm-ar (thanks to dizzy@)
- Fix removal of (lib)zstd/zstandard directory which fixes the build on all
supported platforms
- change my maintainer email to @FreeBSD.org
changes:
https://www.mongodb.com/docs/manual/release-notes/6.0/#6.0.2---sep-28--2022
PR: 266587
Tested by: dizzy (libs), pkubaj (powerpc64le)
Approved by: pkubaj (mentor), rene (mentor)
Co-Authored-By: dizzy, pkubaj
Differential Revision: https://reviews.freebsd.org/D37130