From nobody Tue May 02 20:34:26 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9sJ22nBKz49NZQ; Tue, 2 May 2023 20:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9sJ22dBrz4JnQ; Tue, 2 May 2023 20:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683059666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6JgLK5Dhom2mBXtIC+dI035bjG262CkryncmsNfRQ+Q=; b=MaJtntQDM06DYXA4YPMos3SU8q15v7BeWUGCnoB4gTWML98ygi84yAO7q/zC7uLHQPqYLc P4zADoaAsDrLD/CdQpsBw7tjucmfEpUg5hCUvKdG50Xb6EYXPxTaoL+q4hOm90HgfbhXBT NR+El+fgKDq/l50E+44L9UXRoB8thucZrXX2Gm2T31XfvB88nuFyyVnX186YGgb2vpuzX3 ZCSCmq2kYqEFF8C3/DEMMCrp6Vg9IkIikbKASMHaUTqRzSXnAwpBbIL+YbOki2PTNWFCmb DS1iEDsIpiirB7rfdMpwjoUa+dTXkvo2S9eyh0/6OIFN3gWaiOH0oe46IPjGDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683059666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6JgLK5Dhom2mBXtIC+dI035bjG262CkryncmsNfRQ+Q=; b=RUNOJSa3fMLa1Vmmg/G9S6c3mtP3ohBMox/zd+RzX0l9TGTbVWMFLyi4rvg+srkBgCPXG8 V+sFdhgsF200/AKtMlnrG3CZMlc4gKr+6jD5ZqlVUZkhbhcCDGVqKNAglYcVhspOB9H1A1 /xKsCdcvTc+01VHZtq/H/orDm6+X7Xi3CW+D55m4++KVaOZGdVV9yb2nuG7PpB/vlnpTe5 mEv2I81YGNpqT4xrTy9ctTfhDut6WNP4OdQOuXiZPJmuIvYBKYo6mTxskANi/dwFK1eAf7 bJA/JWGZcglKaY6eEu6zW+kXqqCFGAD8Yepdotcj1hdx2n0967/aWv1wabIPKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683059666; a=rsa-sha256; cv=none; b=BlTdM/pn9Q2KYb7rG0olZkFL4i+SjMnVHdRichmvaE9lWp0F1pYtI4X+WY8kaEwsnHhaEX SAACn653obzMSoRKPaS3vKgCVK5iOni7fHslYxJkXqZd/0Q1Edf99e3WvvFocR5J3Xtwp4 fekTxycOIcvY+yGOjcCVKT86OUAakng6GEurGlvtu50XqxpD4l4sNvyxr5GKqMO6PnkIzy 2PN5OpoTc3m/GsB5upu/66xSAyex3QQDnDD4XeKHC5Es1N1H+o74ruw9dFd5GFignNHN1V 8iPteF3xrRoEWCY55pi1ei7B3O+1SKhTNCQn2AwP8ZJwqpNIufOrdg3EQfnodg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9sJ21jjrz12kR; Tue, 2 May 2023 20:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342KYQr9091556; Tue, 2 May 2023 20:34:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342KYQ9w091555; Tue, 2 May 2023 20:34:26 GMT (envelope-from git) Date: Tue, 2 May 2023 20:34:26 GMT Message-Id: <202305022034.342KYQ9w091555@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Ronald Klop Subject: git: a677d700a675 - main - databases/mongodb70: add new port List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ronald X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a677d700a675abbbf6587954d9e2afd7eb772af7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ronald: URL: https://cgit.FreeBSD.org/ports/commit/?id=a677d700a675abbbf6587954d9e2afd7eb772af7 commit a677d700a675abbbf6587954d9e2afd7eb772af7 Author: Ronald Klop AuthorDate: 2023-02-15 19:30:54 +0000 Commit: Ronald Klop CommitDate: 2023-05-02 20:29:48 +0000 databases/mongodb70: add new port Mind that this is still a RC. Changelog: https://www.mongodb.com/docs/v7.0/release-notes/7.0/ * based on databases/mongodb60 * disabled --use-system-icu as version from ports gives an error on start-up: https://www.mongodb.com/community/forums/t/mongodb-7-0-rc0-cycle-in-dependency-graph-loadicudata/224571 * patch to compile asio-master with c++20 * commented out 'metrics_client' in SConstruct, symbol is not available in the repo, doesn't seem to be needed for the build --- databases/Makefile | 1 + databases/mongodb70/Makefile | 135 +++++++++++++++++++++ databases/mongodb70/distinfo | 5 + databases/mongodb70/files/mongod.in | 53 ++++++++ databases/mongodb70/files/patch-SConstruct | 98 +++++++++++++++ .../mongodb70/files/patch-buildscripts_scons.py | 25 ++++ databases/mongodb70/files/patch-rpm_mongod.conf | 16 +++ ...asio-master_asio_include_asio_detail_config.hpp | 10 ++ .../patch-src_third__party_mozjs_gen-config.sh | 30 +++++ .../patch-src_third__party_mozjs_get-sources.sh | 14 +++ databases/mongodb70/pkg-descr | 3 + databases/mongodb70/pkg-plist | 7 ++ 12 files changed, 397 insertions(+) diff --git a/databases/Makefile b/databases/Makefile index 8461aebf6a59..d37418e340f8 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -194,6 +194,7 @@ SUBDIR += mongodb44 SUBDIR += mongodb50 SUBDIR += mongodb60 + SUBDIR += mongodb70 SUBDIR += movine SUBDIR += mroonga SUBDIR += mtop diff --git a/databases/mongodb70/Makefile b/databases/mongodb70/Makefile new file mode 100644 index 000000000000..87f7dcdd2cbf --- /dev/null +++ b/databases/mongodb70/Makefile @@ -0,0 +1,135 @@ +PORTNAME= mongodb +DISTVERSIONPREFIX= r +DISTVERSION= 7.0.0-rc0 +CATEGORIES= databases net +PKGNAMESUFFIX= ${DISTVERSION:R:S/.//} + +MAINTAINER= ronald@FreeBSD.org +COMMENT= Distributed document-oriented "NoSQL" database (7.0.x Branch) +WWW= https://www.mongodb.com/docs/v7.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= ${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}yaml>=3.11:devel/py-yaml@${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 \ + libpcre2-8.so:devel/pcre2 \ + 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++20-lang cpe python:build scons shebangfix +# 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@ + +MAKE_ARGS= --cxx-std=20 \ + --disable-warnings-as-errors \ + --libc++ \ + --runtime-hardening=on \ + --use-system-libunwind \ + --use-system-pcre2 \ + --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 + +CONFLICTS_INSTALL= mongodb[0-9][0-9] + +USERS= mongodb +GROUPS= mongodb + +OPTIONS_DEFINE= LTO SASL SSL NOAVX +OPTIONS_DEFAULT= LTO SASL SSL + +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:^7\.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: + ${RM} -rf ${WRKSRC}/src/third_party/pcre2 + ${RM} -rf ${WRKSRC}/src/third_party/snappy-* + ${RM} -rf ${WRKSRC}/src/third_party/libstemmer_c + ${RM} -rf ${WRKSRC}/src/third_party/unwind + ${RM} -rf ${WRKSRC}/src/third_party/yaml-cpp + ${RM} -rf ${WRKSRC}/src/third_party/zlib-* + ${RM} -rf ${WRKSRC}/src/third_party/zstandard + +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 + ${RM} ${STAGEDIR}${PREFIX}/bin/resmoke.py + +.include diff --git a/databases/mongodb70/distinfo b/databases/mongodb70/distinfo new file mode 100644 index 000000000000..059f36e9f251 --- /dev/null +++ b/databases/mongodb70/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1682425414 +SHA256 (mongodb-mongo-r7.0.0-rc0_GH0.tar.gz) = 2876591e26ff60b3228371e7d97faa5b9d188445d86187c1e77cef8e09978df2 +SIZE (mongodb-mongo-r7.0.0-rc0_GH0.tar.gz) = 113376874 +SHA256 (mongodb-forks-spidermonkey-82aac6af18abcd5bf188afbc821779ccb0ca0902_GH0.tar.gz) = a365bf54ef4e4fd6a136cf6afa9c620ba0c8982402473b9bfac38928a688a9e0 +SIZE (mongodb-forks-spidermonkey-82aac6af18abcd5bf188afbc821779ccb0ca0902_GH0.tar.gz) = 141291901 diff --git a/databases/mongodb70/files/mongod.in b/databases/mongodb70/files/mongod.in new file mode 100644 index 000000000000..20b0f5c0f43d --- /dev/null +++ b/databases/mongodb70/files/mongod.in @@ -0,0 +1,53 @@ +#!/bin/sh + +# PROVIDE: mongod +# REQUIRE: NETWORK ldconfig +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# mongod_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable mongod. +# mongod_dbpath (str): Default to "/var/db/mongodb" +# Base database directory. +# mongod_flags (str): Custom additional arguments to be passed to mongod. +# Default to "--logpath ${mongod_dbpath}/mongod.log --logappend". +# mongod_config (str): Default to "%%PREFIX%%/etc/mongodb.conf" +# Path to config file +# + +. /etc/rc.subr + +name="mongod" +rcvar=mongod_enable + +load_rc_config $name + +: ${mongod_enable="NO"} +: ${mongod_dbpath="/var/db/mongodb"} +: ${mongod_flags="--logpath ${mongod_dbpath}/mongod.log --logappend --setParameter=disabledSecureAllocatorDomains=\*"} +: ${mongod_user="mongodb"} +: ${mongod_group="mongodb"} +: ${mongod_config="%%PREFIX%%/etc/mongodb.conf"} + +pidfile="${mongod_dbpath}/mongod.lock" +command=%%PREFIX%%/bin/${name} +command_args="--config $mongod_config --dbpath $mongod_dbpath --fork >/dev/null 2>/dev/null" +start_precmd="${name}_prestart" + +mongod_create_dbpath() +{ + mkdir ${mongod_dbpath} >/dev/null 2>/dev/null + [ $? -eq 0 ] && chown -R ${mongod_user}:${mongod_group} ${mongod_dbpath} +} + +mongod_prestart() +{ + if [ ! -d ${mongod_dbpath} ]; then + mongod_create_dbpath || return 1 + fi + return 0 +} + +run_rc_command "$1" diff --git a/databases/mongodb70/files/patch-SConstruct b/databases/mongodb70/files/patch-SConstruct new file mode 100644 index 000000000000..1a7673bdce1c --- /dev/null +++ b/databases/mongodb70/files/patch-SConstruct @@ -0,0 +1,98 @@ +--- SConstruct.orig 2023-04-24 16:15:19 UTC ++++ SConstruct +@@ -23,9 +23,9 @@ import SCons.Script + + import SCons + import SCons.Script +-from mongo_tooling_metrics.client import get_mongo_metrics_client +-from mongo_tooling_metrics.errors import ExternalHostException +-from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics ++#from mongo_tooling_metrics.client import get_mongo_metrics_client ++#from mongo_tooling_metrics.errors import ExternalHostException ++#from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics + from site_scons.mongo import build_profiles + + # This must be first, even before EnsureSConsVersion, if +@@ -1659,22 +1659,22 @@ env.AddMethod(lambda env, name, **kwargs: add_option(n + + # The placement of this is intentional. Here we setup an atexit method to store tooling metrics. + # We should only register this function after env, env_vars and the parser have been properly initialized. +-try: +- metrics_client = get_mongo_metrics_client() +- metrics_client.register_metrics( +- SConsToolingMetrics, +- utc_starttime=datetime.utcnow(), +- artifact_dir=env.Dir('$BUILD_DIR').get_abspath(), +- env_vars=env_vars, +- env=env, +- parser=_parser, +- ) +-except ExternalHostException as _: +- pass +-except Exception as _: +- print( +- "This MongoDB Virtual Workstation could not connect to the internal cluster\nThis is a non-issue, but if this message persists feel free to reach out in #server-dev-platform" +- ) ++#try: ++# metrics_client = get_mongo_metrics_client() ++# metrics_client.register_metrics( ++# SConsToolingMetrics, ++# utc_starttime=datetime.utcnow(), ++# artifact_dir=env.Dir('$BUILD_DIR').get_abspath(), ++# env_vars=env_vars, ++# env=env, ++# parser=_parser, ++# ) ++#except ExternalHostException as _: ++# pass ++#except Exception as _: ++# print( ++# "This MongoDB Virtual Workstation could not connect to the internal cluster\nThis is a non-issue, but if this message persists feel free to reach out in #server-dev-platform" ++# ) + + if get_option('build-metrics'): + env['BUILD_METRICS_ARTIFACTS_DIR'] = '$BUILD_ROOT/$VARIANT_DIR' +@@ -1812,9 +1812,9 @@ if has_option('variables-help'): + print(env_vars.GenerateHelpText(env)) + Exit(0) + +-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()))) + + install_actions.setup(env, get_option('install-action')) + +@@ -3033,7 +3033,7 @@ 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'], + ) + +@@ -3041,7 +3041,6 @@ if env.TargetOSIs('posix'): + env.Append( + CCFLAGS=[ + "-fasynchronous-unwind-tables", +- "-g2" if not env.TargetOSIs('emscripten') else "-g", + "-Wall", + "-Wsign-compare", + "-Wno-unknown-pragmas", +@@ -3224,8 +3223,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/mongodb70/files/patch-buildscripts_scons.py b/databases/mongodb70/files/patch-buildscripts_scons.py new file mode 100644 index 000000000000..20d0429965af --- /dev/null +++ b/databases/mongodb70/files/patch-buildscripts_scons.py @@ -0,0 +1,25 @@ +--- buildscripts/scons.py.orig 2021-08-23 09:10:10 UTC ++++ buildscripts/scons.py +@@ -18,14 +18,14 @@ SITE_TOOLS_DIR = os.path.join(MONGODB_ROOT, 'site_scon + + sys.path = [SCONS_DIR, SITE_TOOLS_DIR] + sys.path + +-# pylint: disable=C0413 +-from mongo.pip_requirements import verify_requirements, MissingRequirements +- +-try: +- verify_requirements('etc/pip/compile-requirements.txt') +-except MissingRequirements as ex: +- print(ex) +- sys.exit(1) ++## pylint: disable=C0413 ++#from mongo.pip_requirements import verify_requirements, MissingRequirements ++# ++#try: ++# verify_requirements('etc/pip/compile-requirements.txt') ++#except MissingRequirements as ex: ++# print(ex) ++# sys.exit(1) + + try: + import SCons.Script diff --git a/databases/mongodb70/files/patch-rpm_mongod.conf b/databases/mongodb70/files/patch-rpm_mongod.conf new file mode 100644 index 000000000000..543ca8371f04 --- /dev/null +++ b/databases/mongodb70/files/patch-rpm_mongod.conf @@ -0,0 +1,16 @@ +--- rpm/mongod.conf.orig 2023-02-07 18:25:28 UTC ++++ rpm/mongod.conf +@@ -7,11 +7,11 @@ systemLog: + systemLog: + destination: file + logAppend: true +- path: /var/log/mongodb/mongod.log ++ path: /var/db/mongodb/mongod.log + + # Where and how to store data. + storage: +- dbPath: /var/lib/mongo ++ dbPath: /var/db/mongo + + # how the process runs + processManagement: diff --git a/databases/mongodb70/files/patch-src_third__party_asio-master_asio_include_asio_detail_config.hpp b/databases/mongodb70/files/patch-src_third__party_asio-master_asio_include_asio_detail_config.hpp new file mode 100644 index 000000000000..09713cbc0028 --- /dev/null +++ b/databases/mongodb70/files/patch-src_third__party_asio-master_asio_include_asio_detail_config.hpp @@ -0,0 +1,10 @@ +--- src/third_party/asio-master/asio/include/asio/detail/config.hpp.orig 2023-04-29 10:17:24 UTC ++++ src/third_party/asio-master/asio/include/asio/detail/config.hpp +@@ -19,6 +19,7 @@ + // individual scons objects. + # define ASIO_STANDALONE // MongoDB + # define ASIO_SEPARATE_COMPILATION // MongoDB ++# define ASIO_HAS_STD_INVOKE_RESULT // FreeBSD + + #if defined(ASIO_STANDALONE) + # define ASIO_DISABLE_BOOST_ARRAY 1 diff --git a/databases/mongodb70/files/patch-src_third__party_mozjs_gen-config.sh b/databases/mongodb70/files/patch-src_third__party_mozjs_gen-config.sh new file mode 100644 index 000000000000..58daab4bc056 --- /dev/null +++ b/databases/mongodb70/files/patch-src_third__party_mozjs_gen-config.sh @@ -0,0 +1,30 @@ +--- src/third_party/mozjs/gen-config.sh.orig 2022-08-05 16:21:29 UTC ++++ src/third_party/mozjs/gen-config.sh +@@ -29,6 +29,9 @@ case "$_Path" in + } + + case "$_Path" in ++ "platform/aarch64/freebsd") ++ _CONFIG_OPTS="--host=aarch64-freebsd" ++ ;; + "platform/aarch64/linux") + _CONFIG_OPTS="--host=aarch64-linux" + ;; +@@ -108,7 +111,7 @@ CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS" \ + --disable-js-shell \ + --disable-tests "$_CONFIG_OPTS" + +-make recurse_export ++gmake recurse_export + + cd ../../../.. + +@@ -159,7 +162,7 @@ find "$_Path/build" -name '*.cpp' | + find "$_Path/build" -name '*.cpp' | + while read unified_file ; do + echo "Processing $unified_file" +- sed $SEDOPTION \ ++ gsed $SEDOPTION \ + -e 's|#include ".*/js/src/|#include "|' \ + -e 's|#error ".*/js/src/|#error "|' \ + "$unified_file" diff --git a/databases/mongodb70/files/patch-src_third__party_mozjs_get-sources.sh b/databases/mongodb70/files/patch-src_third__party_mozjs_get-sources.sh new file mode 100644 index 000000000000..1ae6264dc459 --- /dev/null +++ b/databases/mongodb70/files/patch-src_third__party_mozjs_get-sources.sh @@ -0,0 +1,14 @@ +--- src/third_party/mozjs/get-sources.sh.orig 2022-09-08 09:53:27 UTC ++++ src/third_party/mozjs/get-sources.sh +@@ -12,9 +12,9 @@ LIB_GIT_REPO=git@github.com:mongodb-forks/spidermonkey + LIB_GIT_REVISION=82aac6af18abcd5bf188afbc821779ccb0ca0902 + LIB_GIT_REPO=git@github.com:mongodb-forks/spidermonkey.git + +-DEST_DIR=$(git rev-parse --show-toplevel)/src/third_party/mozjs ++DEST_DIR=$(realpath .) + +-LIB_GIT_DIR=$(mktemp -d /tmp/import-spidermonkey.XXXXXX) ++LIB_GIT_DIR=$(mktemp -d /var/tmp/import-spidermonkey.XXXXXX) + trap "rm -rf $LIB_GIT_DIR" EXIT + + git clone $LIB_GIT_REPO $LIB_GIT_DIR diff --git a/databases/mongodb70/pkg-descr b/databases/mongodb70/pkg-descr new file mode 100644 index 000000000000..59930ca8f679 --- /dev/null +++ b/databases/mongodb70/pkg-descr @@ -0,0 +1,3 @@ +Mongo (from "humongous") is a high-performance, open source, +schema-free, document-oriented database. A common name in the +"NOSQL" community. diff --git a/databases/mongodb70/pkg-plist b/databases/mongodb70/pkg-plist new file mode 100644 index 000000000000..feaf3313657d --- /dev/null +++ b/databases/mongodb70/pkg-plist @@ -0,0 +1,7 @@ +bin/mongod +bin/mongos +@sample etc/mongodb.conf.sample +%%DOCSDIR%%/LICENSE-Community.txt +%%DOCSDIR%%/MPL-2 +%%DOCSDIR%%/README +%%DOCSDIR%%/THIRD-PARTY-NOTICES