Bug 242002 - [NEW PORT] databases/mongodb42: Distributed document-oriented "NoSQL" database (4.2.* Branch)
Summary: [NEW PORT] databases/mongodb42: Distributed document-oriented "NoSQL" databas...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL: https://docs.mongodb.com/manual/relea...
Keywords: feature, patch
Depends on: 227220 241463
Blocks:
  Show dependency treegraph
 
Reported: 2019-11-16 13:24 UTC by Ronald Klop
Modified: 2020-06-10 12:59 UTC (History)
5 users (show)

See Also:
ronald-lists: maintainer-feedback+


Attachments
fresh files based on mongodb40 (148.31 KB, patch)
2019-11-16 13:24 UTC, Ronald Klop
no flags Details | Diff
fresh files based on mongodb40 (148.31 KB, patch)
2019-11-16 18:44 UTC, Ronald Klop
no flags Details | Diff
diff against mongodb40 (svn copy) (253.64 KB, patch)
2019-11-29 19:34 UTC, Ronald Klop
ronald-lists: maintainer-approval+
Details | Diff
add conflicts to other mongodb* ports and adds to databases/Makefile (1.75 KB, patch)
2019-11-29 19:35 UTC, Ronald Klop
ronald-lists: maintainer-approval+
Details | Diff
diff against mongodb40 (svn copy) (164.33 KB, patch)
2020-05-16 11:09 UTC, Ronald Klop
ronald-lists: maintainer-approval+
Details | Diff
diff against mongodb40 (svn copy) (164.33 KB, patch)
2020-05-19 19:59 UTC, Ronald Klop
ronald-lists: maintainer-approval+
Details | Diff
diff against mongodb40 (svn copy) (164.08 KB, patch)
2020-05-26 11:29 UTC, Ronald Klop
ronald-lists: maintainer-approval+
Details | Diff
diff against mongodb40 (svn copy) (164.08 KB, patch)
2020-05-28 12:03 UTC, Ronald Klop
ronald-lists: maintainer-approval+
Details | Diff
diff against mongodb40 (svn copy) (164.08 KB, patch)
2020-05-28 12:16 UTC, Ronald Klop
ronald-lists: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald Klop 2019-11-16 13:24:54 UTC
Created attachment 209183 [details]
fresh files based on mongodb40

Initial port of MongoDB 4.2.1 for amd64 and aarch64.
Does not compile with clang currently, so uses USE_GCC.
https://jira.mongodb.org/browse/SERVER-44270
This depends on bug #241463 for python3 support for devel/scons,
Comment 1 Ronald Klop 2019-11-16 18:44:29 UTC
Created attachment 209191 [details]
fresh files based on mongodb40

Port needs snappy >= 1.1.7. And set myself as maintainer.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-11-17 01:14:17 UTC
Thank you Ronald. Could you please:

- Base this new port on an svn copy of an existing databases/mongodbXY port
- Re-attach an updated patch showing only the diffs after creating it with svn copy
- Modify the COMMENT to make it 4.x specific, like "(4.2.* Branch)" or similar"
- Confirm the port passes QA (portlint & poudriere in particular)

It appears the upstream issue regarding the build failure with Clang has been fixed [1]. Please backport/include the commit(s) fixing the issue in the port in order to remove USE_GCC

[1] https://github.com/mongodb/mongo/commit/aac59681b3ae4d3806174227ba4c88aaf8e89ea2
Comment 3 Ronald Klop 2019-11-29 19:34:17 UTC
Created attachment 209534 [details]
diff against mongodb40 (svn copy)

- based on svn copy from mongodb40 (svn diff didn't show removed files so used manual diff)
- includes upstream patch to build with clang
- uses llvm70 on pre 12.1 (does not build with clang 6)
- portlint friendly
- builds and installs fine
Comment 4 Ronald Klop 2019-11-29 19:35:40 UTC
Created attachment 209535 [details]
add conflicts to other mongodb* ports and adds to databases/Makefile

svn diff of existing ports dir
Comment 5 Ronald Klop 2020-05-16 11:09:30 UTC
Created attachment 214546 [details]
diff against mongodb40 (svn copy)

Updated patch of mongodb 4.2.6.
Comment 6 Ronald Klop 2020-05-19 19:59:15 UTC
Created attachment 214661 [details]
diff against mongodb40 (svn copy)

New patch compatible with upcoming changes in scons bug #246391.
Comment 7 Ronald Klop 2020-05-26 11:29:44 UTC
Created attachment 214871 [details]
diff against mongodb40 (svn copy)

Remove optional dependency for llvm70 on old FreeBSD versions. All supported FreeBSD versions (11.3 and 12.1) have llvm80 or newer.

AFAIK this port has no more blocking issues and can be committed.
Comment 8 Ronald Klop 2020-05-28 12:03:47 UTC
Created attachment 214962 [details]
diff against mongodb40 (svn copy)

Updated patch from 4.2.6 to 4.2.7.

https://docs.mongodb.com/manual/release-notes/4.2/#may-26-2020
Comment 9 Ronald Klop 2020-05-28 12:16:27 UTC
Created attachment 214963 [details]
diff against mongodb40 (svn copy)

Fix last portlint warnings by moving LICENSE_*_SSPL lower. 

# portlint
WARN: Makefile: "ONLY_FOR_ARCHS" has to appear earlier.
WARN: Makefile: "ONLY_FOR_ARCHS_REASON" has to appear earlier.
WARN: Makefile: "LIB_DEPENDS" has to appear earlier.
WARN: Makefile: "BUILD_DEPENDS" has to appear earlier.
WARN: Makefile: "USES" has to appear earlier.
0 fatal errors and 5 warnings found.

now:
# portlint
looks fine.
Comment 10 Kurt Jaeger freebsd_committer 2020-05-31 16:29:31 UTC
testbuild@work
Comment 11 Kurt Jaeger freebsd_committer 2020-05-31 18:29:42 UTC
testbuilds look fine. pending testbuild on arm64
Comment 12 Mikael Urankar freebsd_committer 2020-06-04 17:02:56 UTC
(In reply to Kurt Jaeger from comment #11)
ok on aarch64
Comment 13 Kurt Jaeger freebsd_committer 2020-06-07 09:45:28 UTC
(In reply to Mikael Urankar from comment #12)
Thanks for the report. I've tried it myself, but failed somehow 8-(
Comment 14 commit-hook freebsd_committer 2020-06-07 09:50:14 UTC
A commit references this bug:

Author: pi
Date: Sun Jun  7 09:50:07 UTC 2020
New revision: 538150
URL: https://svnweb.freebsd.org/changeset/ports/538150

Log:
  New port: databases/mongodb42

  Mongo (from "humongous") is a high-performance, open source,
  schema-free, document-oriented database. A common name in the
  "NOSQL" community.

  WWW: https://www.mongodb.com/

  PR:		242002
  Submitted by:	Ronald Klop <ronald-lists@klop.ws>
  Reviewed by:	koobs, mikael
  Relnotes:	https://docs.mongodb.com/manual/release-notes/4.2/

Changes:
  head/databases/Makefile
  head/databases/mongodb36/Makefile
  head/databases/mongodb40/Makefile
  head/databases/mongodb42/
  head/databases/mongodb42/Makefile
  head/databases/mongodb42/distinfo
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_gen-config.sh
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src0.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src1.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src10.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src11.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src12.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src13.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src14.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src15.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src16.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src17.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src18.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src19.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src2.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src20.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src21.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src22.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src23.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src24.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src25.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src26.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src27.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src28.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src29.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src3.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src30.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src31.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src32.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src33.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src34.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src35.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src36.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src37.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src38.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src39.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src4.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src40.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src41.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src42.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src43.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src44.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src45.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src5.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src6.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src7.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src8.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_Unified__cpp__js__src9.cpp
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_build_js-confdefs.h
  head/databases/mongodb42/files/aarch64/patch-src_third__party_mozjs-60_platform_aarch64_freebsd_include_js-config.h
  head/databases/mongodb42/files/patch-SConstruct
  head/databases/mongodb42/files/patch-asio-libc++7
  head/databases/mongodb42/files/patch-rpm_mongod.conf
Comment 15 Kurt Jaeger freebsd_committer 2020-06-07 09:50:27 UTC
Committed, thanks!
Comment 16 Matthias Fechner freebsd_committer 2020-06-07 10:23:15 UTC
If a user upgrades from mongo40 to mongo42 is there anything else required or can the user just deinstall mongo40 and install mongo42 and the existing database continues to work?
Comment 17 Ronald Klop 2020-06-07 11:56:10 UTC
(In reply to Matthias Fechner from comment #16)

Mongodb 4.2 uses the same path for the db, etc.
But please make a backup and read https://docs.mongodb.com/manual/release-notes/4.2/#upgrade-procedures before upgrading.
Comment 18 Matthias Fechner freebsd_committer 2020-06-10 09:11:57 UTC
(In reply to Ronald Klop from comment #17)
Thanks a lot for this link.
The upgrade should be straight forward which also allows you to do a burn in and later do the final migration to 4.2.

Just in case something fails you maybe would like to do a backup of the mongodb 4.2 database, but for this you would need mongodb42-tools or (which does currently not exist)?
Comment 19 Ronald Klop 2020-06-10 12:23:03 UTC
(In reply to Matthias Fechner from comment #18)
See bug #247021 for mongodb42-tools.
I don't have commit rights so need to wait for somebody to find some time to commit this.
Comment 20 Matthias Fechner freebsd_committer 2020-06-10 12:59:30 UTC
(In reply to Ronald Klop from comment #19)
Thanks, I will take care of it.