diff --git a/databases/mongodb60/Makefile b/databases/mongodb60/Makefile index 264d4320c3f7..35d8e71366df 100644 --- a/databases/mongodb60/Makefile +++ b/databases/mongodb60/Makefile @@ -1,152 +1,156 @@ PORTNAME= mongodb DISTVERSIONPREFIX= r -DISTVERSION= 6.0.16 -PORTREVISION= 1 +DISTVERSION= 6.0.17 CATEGORIES= databases net PKGNAMESUFFIX= ${DISTVERSION:R:S/.//} MAINTAINER= ronald@FreeBSD.org COMMENT= MongoDB Community Edition (6.0.x Branch) WWW= https://www.mongodb.com/docs/v6.0/ LICENSE= APACHE20 SSPLv1 # mongodb is SSPLv1, C++ driver is APACHE20 LICENSE_COMB= multi LICENSE_NAME_SSPLv1= Server Side Public License Version 1 LICENSE_FILE_SSPLv1= ${WRKSRC}/LICENSE-Community.txt LICENSE_PERMS_SSPLv1= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept ONLY_FOR_ARCHS= aarch64 amd64 powerpc64le ONLY_FOR_ARCHS_REASON= only ported to amd64, aarch64, and powerpc64le on FreeBSD; upstream supports arm64, ppc64le, s390x, and x86-64 BUILD_DEPENDS= ${PY_SETUPTOOLS} \ ${PYTHON_PKGNAMEPREFIX}cheetah3>0:devel/py-cheetah3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pymongo>0:databases/py-pymongo@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyyaml>=3.11:devel/py-pyyaml@${PY_FLAVOR} # build depends used while running ${WRKSRC}/src/third_party/mozjs/gen-config.sh BUILD_DEPENDS+= autoconf2.13:devel/autoconf2.13 \ gsed:textproc/gsed LIB_DEPENDS= libcurl.so:ftp/curl \ libicuuc.so:devel/icu \ libpcre.so:devel/pcre \ libsnappy.so:archivers/snappy \ libstemmer.so:textproc/snowballstemmer \ libunwind.so:devel/libunwind \ 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 # mozjs tag comes from ${WRKSRC}/src/third_party/mozjs/get-sources.sh MOZJS_TAG= 82aac6af18abcd5bf188afbc821779ccb0ca0902 USE_GITHUB= yes GH_ACCOUNT= mongodb mongodb-forks:mozjs GH_PROJECT= mongo spidermonkey:mozjs GH_TAGNAME= ${MOZJS_TAG}:mozjs USE_RC_SUBR= mongod SHEBANG_FILES= buildscripts/scons.py python_OLD_CMD= @python_interpreter@ EXTRACT_AFTER_ARGS= --exclude src/third_party/icu4c-* \ --exclude src/third_party/pcre-* \ --exclude src/third_party/snappy-* \ --exclude src/third_party/libstemmer_c \ --exclude src/third_party/unwind \ --exclude src/third_party/yaml-cpp \ --exclude src/third_party/zlib-* \ --exclude src/third_party/zstandard \ --no-same-owner --no-same-permissions MAKE_ARGS= --cxx-std=17 \ --disable-warnings-as-errors \ --libc++ \ --runtime-hardening=on \ + --ssl \ --use-system-icu \ --use-system-libunwind \ --use-system-pcre \ --use-system-snappy \ --use-system-stemmer \ --use-system-yaml \ --use-system-zlib \ --use-system-zstd \ -j${MAKE_JOBS_NUMBER} \ AR=llvm-ar \ MONGO_VERSION=${DISTVERSION} \ VERBOSE=on CFLAGS+= -DBOOST_NO_CXX98_FUNCTION_BASE 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+)" LTO_MAKE_ARGS= --lto=on 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 ALL_TARGET= install-core # This ports is only following the Major Release. # https://docs.mongodb.com/manual/reference/versioning/ PORTSCOUT= limit:^6\.0\. CPE_PRODUCT= mongodb .if ${ARCH} == amd64 MOZJS_ARCH= x86_64 .elif ${ARCH} == powerpc64le MOZJS_ARCH= ppc64le .elif ${ARCH} == aarch64 MOZJS_ARCH= ${ARCH} .endif post-patch: # fix build with python-3.11 ${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/util.py ${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/preprocessor.py ${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 cd ${WRKSRC}/src/third_party/mozjs/mozilla-release/js/src && ${LOCALBASE}/bin/autoconf2.13 cd ${WRKSRC}/src/third_party/mozjs && PYTHON3="${PYTHON_CMD}" ${SH} ./gen-config.sh ${MOZJS_ARCH} freebsd do-build: ${WRKSRC}/buildscripts/scons.py -C ${WRKSRC} ${MAKE_ARGS} do-install: .for f in mongod mongos ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f} .endfor ${INSTALL_DATA} ${WRKSRC}/rpm/mongod.conf ${STAGEDIR}${PREFIX}/etc/mongodb.conf.sample ${MKDIR} ${STAGEDIR}${DOCSDIR} .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: ${SH} ${FILESDIR}/make.test.sh "${STAGEDIR}${PREFIX}/bin" .include 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 @@ -1,31 +1,31 @@ #! /bin/sh set -e usage() { echo "Usage: $0 " echo " path to the executables" } test "$#" -eq 1 || ( usage && exit 1 ) set -x PATH="$1:$PATH" 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" tail -F "$DBDIR/log" | ( grep -qFe "Waiting for connections" && kill $(cat "$DBDIR/pid") ) & script -eF "$DBDIR/log" \ timeout -s TERM -k 30s 60s \ mongod --dbpath "$DBDIR/db" --pidfilepath "$DBDIR/pid" echo "Test successful" 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 @@ -1,44 +1,42 @@ --- SConstruct.orig 2022-08-05 16:21:29 UTC +++ SConstruct @@ -1342,9 +1342,9 @@ if has_option('variables-help'): 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.") @@ -2427,13 +2427,12 @@ if env.TargetOSIs('posix'): # If runtime hardening is requested, then build anything # destined for an executable with the necessary flags for PIE. env.AppendUnique( - PROGCCFLAGS=['-fPIE'], + PROGCCFLAGS=['-fpic'], PROGLINKFLAGS=['-pie'], ) # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. env.Append( CCFLAGS=["-fasynchronous-unwind-tables", - "-ggdb" if not env.TargetOSIs('emscripten') else "-g", "-Wall", "-Wsign-compare", "-Wno-unknown-pragmas", @@ -2600,8 +2599,12 @@ if not env.TargetOSIs('windows', 'macOS') and (env.Too # setting it for both C and C++ by setting both of CFLAGS and # CXXFLAGS. + arm_march_flag = "armv8-a" + if get_option('use-hardware-crc32') == "on": + arm_march_flag += "+crc" + default_targeting_flags_for_architecture = { - "aarch64" : { "-march=" : "armv8.2-a", "-mtune=" : "generic" }, + "aarch64" : { "-march=" : arm_march_flag, "-mtune=" : "generic" }, "i386" : { "-march=" : "nocona", "-mtune=" : "generic" }, "ppc64le" : { "-mcpu=" : "power8", "-mtune=" : "power8", "-mcmodel=" : "medium" }, "s390x" : { "-march=" : "z196", "-mtune=" : "zEC12" }, 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 @@ -1,7 +1,10 @@ bin/mongod bin/mongos @sample etc/mongodb.conf.sample %%DOCSDIR%%/LICENSE-Community.txt %%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