git: edda5a64b63c - main - databases/mongodb60: update to 6.0.17

From: Ronald Klop <ronald_at_FreeBSD.org>
Date: Sat, 24 Aug 2024 20:20:03 UTC
The branch main has been updated by ronald:

URL: https://cgit.FreeBSD.org/ports/commit/?id=edda5a64b63c4abc5a45a1926d43925a1df2599f

commit edda5a64b63c4abc5a45a1926d43925a1df2599f
Author:     Ronald Klop <ronald@FreeBSD.org>
AuthorDate: 2024-08-21 11:17:57 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2024-08-24 20:19:40 +0000

    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/Makefile               | 20 ++++++++++++--------
 databases/mongodb60/distinfo               |  6 +++---
 databases/mongodb60/files/make.test.sh     |  4 ++--
 databases/mongodb60/files/patch-SConstruct |  8 +++-----
 databases/mongodb60/pkg-plist              |  3 +++
 5 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/databases/mongodb60/Makefile b/databases/mongodb60/Makefile
index 264d4320c3f7..35d8e71366df 100644
--- a/databases/mongodb60/Makefile
+++ b/databases/mongodb60/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	mongodb
 DISTVERSIONPREFIX=	r
-DISTVERSION=	6.0.16
-PORTREVISION=	1
+DISTVERSION=	6.0.17
 CATEGORIES=	databases net
 PKGNAMESUFFIX=	${DISTVERSION:R:S/.//}
 
@@ -36,7 +35,7 @@ LIB_DEPENDS=	libcurl.so:ftp/curl \
 		libyaml-cpp.so:devel/yaml-cpp \
 		libzstd.so:archivers/zstd
 
-USES=		compiler:c++17-lang cpe python:build scons shebangfix
+USES=		compiler:c++17-lang cpe python:build scons shebangfix ssl
 # gmake is used while running ${WRKSRC}/src/third_party/mozjs/gen-config.sh
 USES+=		gmake pkgconfig
 
@@ -66,6 +65,7 @@ MAKE_ARGS=	--cxx-std=17 \
 		--disable-warnings-as-errors \
 		--libc++ \
 		--runtime-hardening=on \
+		--ssl \
 		--use-system-icu \
 		--use-system-libunwind \
 		--use-system-pcre \
@@ -86,8 +86,8 @@ CONFLICTS_INSTALL=	mongodb[0-9][0-9]
 USERS=		mongodb
 GROUPS=		mongodb
 
-OPTIONS_DEFINE=		LTO SASL SSL NOAVX
-OPTIONS_DEFAULT=	SASL SSL NOAVX
+OPTIONS_DEFINE=		LTO NOAVX SASL
+OPTIONS_DEFAULT=	NOAVX SASL
 
 NOAVX_DESC=	"Disable AVX instructions on amd64 (Sandybridge+)"
 
@@ -98,9 +98,6 @@ NOAVX_MAKE_ARGS=	--experimental-optimization="-sandybridge"
 SASL_LIB_DEPENDS=	libsasl2.so:security/cyrus-sasl2
 SASL_MAKE_ARGS=		--use-sasl-client
 
-SSL_USES=	ssl
-SSL_MAKE_ARGS=	--ssl
-
 .include <bsd.port.pre.mk>
 
 ALL_TARGET=	install-core
@@ -126,6 +123,10 @@ post-patch:
 	${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/backend/base.py
 	${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/action/process_define_files.py
 
+pre-configure:
+	# Verify we downloaded the proper mozjs git tag.
+	sh -c "test \"X`grep -E '^LIB_GIT_REVISION=' ${WRKSRC}/src/third_party/mozjs/get-sources.sh`\" = \"XLIB_GIT_REVISION=${MOZJS_TAG}\""
+
 do-configure:
 # Replacement of ${WRKSRC}/src/third_party/mozjs/get-sources.sh
 	${LN} -sF ${WRKDIR}/spidermonkey-${MOZJS_TAG} ${WRKSRC}/src/third_party/mozjs/mozilla-release
@@ -144,6 +145,9 @@ do-install:
 .for doc in LICENSE-Community.txt MPL-2 README THIRD-PARTY-NOTICES
 	${MV} ${STAGEDIR}${PREFIX}/${doc} ${STAGEDIR}${DOCSDIR}/
 .endfor
+	${INSTALL_MAN} ${WRKSRC}/debian/mongod.1 ${STAGEDIR}${PREFIX}/share/man/man1/
+	${INSTALL_MAN} ${WRKSRC}/debian/mongos.1 ${STAGEDIR}${PREFIX}/share/man/man1/
+	${INSTALL_MAN} ${WRKSRC}/debian/mongodb-parameters.5 ${STAGEDIR}${PREFIX}/share/man/man5/
 	${RM} ${STAGEDIR}${PREFIX}/bin/resmoke.py
 
 do-test:
diff --git a/databases/mongodb60/distinfo b/databases/mongodb60/distinfo
index ea02dfcff5d4..97fcb242d8da 100644
--- a/databases/mongodb60/distinfo
+++ b/databases/mongodb60/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1719396179
-SHA256 (mongodb-mongo-r6.0.16_GH0.tar.gz) = 8426949b47e8b0d6b8a048b698c2f80c856464bef4344752dc16f20efd6b10cf
-SIZE (mongodb-mongo-r6.0.16_GH0.tar.gz) = 91499982
+TIMESTAMP = 1724200537
+SHA256 (mongodb-mongo-r6.0.17_GH0.tar.gz) = 4ff208ae7f702165e178f56bd908d4792716f3f30aae984f8e98187fd4d5ee68
+SIZE (mongodb-mongo-r6.0.17_GH0.tar.gz) = 91534894
 SHA256 (mongodb-forks-spidermonkey-82aac6af18abcd5bf188afbc821779ccb0ca0902_GH0.tar.gz) = a365bf54ef4e4fd6a136cf6afa9c620ba0c8982402473b9bfac38928a688a9e0
 SIZE (mongodb-forks-spidermonkey-82aac6af18abcd5bf188afbc821779ccb0ca0902_GH0.tar.gz) = 141291901
diff --git a/databases/mongodb60/files/make.test.sh b/databases/mongodb60/files/make.test.sh
index 3d74258a446a..c42bb1973e6b 100755
--- a/databases/mongodb60/files/make.test.sh
+++ b/databases/mongodb60/files/make.test.sh
@@ -18,8 +18,8 @@ DBDIR=$( mktemp -d -t tmp.mongodb )
 trap 'rm -rf "$DBDIR"' EXIT
 
 # Trivial check if the binaries execute at all.
-mongod -version
-mongos -version
+mongod --version
+mongos --version
 
 # Check if an empty database can be created.
 mkdir "$DBDIR/db"
diff --git a/databases/mongodb60/files/patch-SConstruct b/databases/mongodb60/files/patch-SConstruct
index 84d453d69e95..ff903d7c8a83 100644
--- a/databases/mongodb60/files/patch-SConstruct
+++ b/databases/mongodb60/files/patch-SConstruct
@@ -4,12 +4,10 @@
      print(env_vars.GenerateHelpText(env))
      Exit(0)
  
--unknown_vars = env_vars.UnknownVariables()
--if unknown_vars:
+ unknown_vars = env_vars.UnknownVariables()
+ if unknown_vars:
 -    env.FatalError("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys())))
-+#unknown_vars = env_vars.UnknownVariables()
-+#if unknown_vars:
-+#    env.FatalError("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys())))
++    print("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys())))
  
  if get_option('install-action') != 'default' and get_option('ninja') != "disabled":
      env.FatalError("Cannot use non-default install actions when generating Ninja.")
diff --git a/databases/mongodb60/pkg-plist b/databases/mongodb60/pkg-plist
index feaf3313657d..46587b510b14 100644
--- a/databases/mongodb60/pkg-plist
+++ b/databases/mongodb60/pkg-plist
@@ -5,3 +5,6 @@ bin/mongos
 %%DOCSDIR%%/MPL-2
 %%DOCSDIR%%/README
 %%DOCSDIR%%/THIRD-PARTY-NOTICES
+share/man/man1/mongod.1.gz
+share/man/man1/mongos.1.gz
+share/man/man5/mongodb-parameters.5.gz