From nobody Sat Jun 24 08:05:17 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 4Qp69B0WNDz4gTGd; Sat, 24 Jun 2023 08:05:18 +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 4Qp69B04BBz3HcF; Sat, 24 Jun 2023 08:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687593918; 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=lQIe3/4n7kotKp+gwwHlZwqi7bqCyGr/6HfWGgJ50MM=; b=Q4S+8uLV4HnH8pZA599yn0Zcl/IEbyPoBjh17QgVlz4WfZhTFCAEpuZDBhLef0y+5L6DCj lE01ZUFdNUn0FdJnvZatzeCkvwzFTSCpHo71ASoNos56KND13ADbU22EkSfQkC/vy8dN1O d/Z15EXBX/7I5ZBjUvqg6GbFqGRxUQz0j7kwexbGxQFmd4aH3ShKlT3bnneQ/1jTu1VYuz 9ZQo70T76CQmw+94C6zkNhQuxsybCvqTeiu2tC2bmYYK7P6xN3H8dK9sQRGY8nRhjXEGte GdUPhrI7qrQSfE5xYafCIJ1hGA8NxOGlHMCTpMTEWFVv7x/mcoNVRVYX1DEAHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687593918; 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=lQIe3/4n7kotKp+gwwHlZwqi7bqCyGr/6HfWGgJ50MM=; b=LPunmNFjHcY0IJK+ZdiO+stMuPAiHJFM3FqEpVEAKh/c4qcwvY08fUhueUiQkCX8LjIjoE GdEO8OSNY6nKOnvAy2iumTDMBrVL2nlnsDBvWNMnOoEx1R9Vg7e3Kn+IgkEaL244RyDVkg e9x2XCW+f34pLDMiffe1+Oqs3I1FNRtvuYpv1xI9droioGLBfE9rhlw8rvf1zt0PbQAHrh tCNsn/3l94gzUKMzArHtTct/ihPaF92O2nC2iq0nLPcggOUd1x0SoybwwaSeBQhkpnAdq4 bA5lPalcfACPoUXoO/8nt6cBr9qRRt6GS9f6Ub89/HeV4kJnZ26VKfjUCgQ/Lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687593918; a=rsa-sha256; cv=none; b=HCApK99hLnQnIkUKvnbXezI9LPbaWFgoXD1eKro0JW6k8TUcfRyzjeKuuaXT/Dc6JpMKVR bXY7TOZQjZwaK0C356+tNs1oYvLEciphCZUCbrwrs03qLSMzROKWBhFZuEw1vo4c2+rGSC q2NByXlnP1oAZNLYISlWYjOBPWBnWfcX5+qowB0JLNrPe+c/LAO77mp+pJI5ycM9z6KbUd Pp88corOkHaiQJY4Jq4RkWPu/NkWI3PeUhm7mwiByWxsjfCztkHYPMux0LwqQU1Xbx2p1Y tgtYCiXUIX3O1Z7eKyEPjo9bxGxUQ29Bgcx0NNWiX2IoBDoIlijyTXRc15nKHw== 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 4Qp6996FQYzf8j; Sat, 24 Jun 2023 08:05:17 +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 35O85H4b019656; Sat, 24 Jun 2023 08:05:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35O85HTb019655; Sat, 24 Jun 2023 08:05:17 GMT (envelope-from git) Date: Sat, 24 Jun 2023 08:05:17 GMT Message-Id: <202306240805.35O85HTb019655@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: 3d3f9b4f57eb - main - databases/mongodb70: fix build on 14-current 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: 3d3f9b4f57eb9d6233325d45e7e6675e1599853b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ronald: URL: https://cgit.FreeBSD.org/ports/commit/?id=3d3f9b4f57eb9d6233325d45e7e6675e1599853b commit 3d3f9b4f57eb9d6233325d45e7e6675e1599853b Author: Dimitry Andric AuthorDate: 2023-06-24 07:52:10 +0000 Commit: Ronald Klop CommitDate: 2023-06-24 08:02:23 +0000 databases/mongodb70: fix build on 14-current Fixes provided by Dimitry in a private reply on https://lists.freebsd.org/archives/freebsd-ports/2023-May/003870.html. Dank je wel! poidriere stage-qa ok runtime tested: proper clean start and restart on existing db --- databases/mongodb70/Makefile | 2 + ...tch-src_mongo_db_exec_document__value_value.cpp | 15 +++++ ...mongo_db_exec_document__value_value__internal.h | 13 ++++ .../files/patch-src_mongo_db_exec_near.cpp | 46 ++++++++++++++ .../files/patch-src_mongo_s_write__ops_write__op.h | 74 ++++++++++++++++++++++ .../files/patch-src_mongo_util_net_ssl__types.h | 10 +++ ...rty_boost_boost_mpl_aux___integral__wrapper.hpp | 11 ++++ 7 files changed, 171 insertions(+) diff --git a/databases/mongodb70/Makefile b/databases/mongodb70/Makefile index 182724f20841..aead0f8dc076 100644 --- a/databases/mongodb70/Makefile +++ b/databases/mongodb70/Makefile @@ -86,6 +86,8 @@ SASL_MAKE_ARGS= --use-sasl-client SSL_USES= ssl SSL_MAKE_ARGS= --ssl +CFLAGS+= -DBOOST_NO_CXX98_FUNCTION_BASE + .include ALL_TARGET= install-core diff --git a/databases/mongodb70/files/patch-src_mongo_db_exec_document__value_value.cpp b/databases/mongodb70/files/patch-src_mongo_db_exec_document__value_value.cpp new file mode 100644 index 000000000000..194db618f3b2 --- /dev/null +++ b/databases/mongodb70/files/patch-src_mongo_db_exec_document__value_value.cpp @@ -0,0 +1,15 @@ +--- src/mongo/db/exec/document_value/value.cpp.orig 2023-06-15 22:07:57 UTC ++++ src/mongo/db/exec/document_value/value.cpp +@@ -59,6 +59,12 @@ using namespace std::string_literals; + using std::vector; + using namespace std::string_literals; + ++RCVector::RCVector() { ++} ++ ++RCVector::RCVector(std::vector v) : vec(std::move(v)) { ++} ++ + void ValueStorage::verifyRefCountingIfShould() const { + switch (type) { + case MinKey: diff --git a/databases/mongodb70/files/patch-src_mongo_db_exec_document__value_value__internal.h b/databases/mongodb70/files/patch-src_mongo_db_exec_document__value_value__internal.h new file mode 100644 index 000000000000..6770dde9e770 --- /dev/null +++ b/databases/mongodb70/files/patch-src_mongo_db_exec_document__value_value__internal.h @@ -0,0 +1,13 @@ +--- src/mongo/db/exec/document_value/value_internal.h.orig 2023-06-15 22:07:57 UTC ++++ src/mongo/db/exec/document_value/value_internal.h +@@ -51,8 +51,8 @@ class RCVector : public RefCountable { (public) + /// A heap-allocated reference-counted std::vector + class RCVector : public RefCountable { + public: +- RCVector() {} +- RCVector(std::vector v) : vec(std::move(v)) {} ++ RCVector(); ++ RCVector(std::vector v); + std::vector vec; + }; + diff --git a/databases/mongodb70/files/patch-src_mongo_db_exec_near.cpp b/databases/mongodb70/files/patch-src_mongo_db_exec_near.cpp new file mode 100644 index 000000000000..0bbdb149268d --- /dev/null +++ b/databases/mongodb70/files/patch-src_mongo_db_exec_near.cpp @@ -0,0 +1,46 @@ +--- src/mongo/db/exec/near.cpp.orig 2023-06-15 22:07:57 UTC ++++ src/mongo/db/exec/near.cpp +@@ -42,6 +42,21 @@ using std::vector; + using std::unique_ptr; + using std::vector; + ++/** ++ * Holds a generic search result with a distance computed in some fashion. ++ */ ++struct NearStage::SearchResult { ++ SearchResult(WorkingSetID resultID, double distance) : resultID(resultID), distance(distance) {} ++ ++ bool operator<(const SearchResult& other) const { ++ // We want increasing distance, not decreasing, so we reverse the < ++ return distance > other.distance; ++ } ++ ++ WorkingSetID resultID; ++ double distance; ++}; ++ + NearStage::NearStage(ExpressionContext* expCtx, + const char* typeName, + StageType type, +@@ -113,21 +128,6 @@ PlanStage::StageState NearStage::doWork(WorkingSetID* + + return nextState; + } +- +-/** +- * Holds a generic search result with a distance computed in some fashion. +- */ +-struct NearStage::SearchResult { +- SearchResult(WorkingSetID resultID, double distance) : resultID(resultID), distance(distance) {} +- +- bool operator<(const SearchResult& other) const { +- // We want increasing distance, not decreasing, so we reverse the < +- return distance > other.distance; +- } +- +- WorkingSetID resultID; +- double distance; +-}; + + // Set "toReturn" when NEED_YIELD. + PlanStage::StageState NearStage::bufferNext(WorkingSetID* toReturn) { diff --git a/databases/mongodb70/files/patch-src_mongo_s_write__ops_write__op.h b/databases/mongodb70/files/patch-src_mongo_s_write__ops_write__op.h new file mode 100644 index 000000000000..f5edb3f0748f --- /dev/null +++ b/databases/mongodb70/files/patch-src_mongo_s_write__ops_write__op.h @@ -0,0 +1,74 @@ +--- src/mongo/s/write_ops/write_op.h.orig 2023-06-15 22:07:57 UTC ++++ src/mongo/s/write_ops/write_op.h +@@ -38,7 +38,7 @@ struct TargetedWrite; + namespace mongo { + + struct TargetedWrite; +-struct ChildWriteOp; ++class WriteOp; + + enum WriteOpState { + // Item is ready to be targeted +@@ -63,6 +63,31 @@ enum WriteOpState { + }; + + /** ++ * State of a write in-progress (to a single shard) which is one part of a larger write ++ * operation. ++ * ++ * As above, the write op may finish in either a successful (_Completed) or unsuccessful ++ * (_Error) state. ++ */ ++struct ChildWriteOp { ++ ChildWriteOp(WriteOp* const parent) : parentOp(parent) {} ++ ++ const WriteOp* const parentOp; ++ ++ WriteOpState state{WriteOpState_Ready}; ++ ++ // non-zero when state == _Pending ++ // Not owned here but tracked for reporting ++ TargetedWrite* pendingWrite{nullptr}; ++ ++ // filled when state > _Pending ++ std::unique_ptr endpoint; ++ ++ // filled when state == _Error or (optionally) when state == _Cancelled ++ boost::optional error; ++}; ++ ++/** + * State of a single write item in-progress from a client request. + * + * The lifecyle of a write op: +@@ -182,30 +207,6 @@ class WriteOp { (private) + + // stores the shards where this write operation succeeded + absl::flat_hash_set _successfulShardSet; +-}; +-/** +- * State of a write in-progress (to a single shard) which is one part of a larger write +- * operation. +- * +- * As above, the write op may finish in either a successful (_Completed) or unsuccessful +- * (_Error) state. +- */ +-struct ChildWriteOp { +- ChildWriteOp(WriteOp* const parent) : parentOp(parent) {} +- +- const WriteOp* const parentOp; +- +- WriteOpState state{WriteOpState_Ready}; +- +- // non-zero when state == _Pending +- // Not owned here but tracked for reporting +- TargetedWrite* pendingWrite{nullptr}; +- +- // filled when state > _Pending +- std::unique_ptr endpoint; +- +- // filled when state == _Error or (optionally) when state == _Cancelled +- boost::optional error; + }; + + // First value is write item index in the batch, second value is child write op index diff --git a/databases/mongodb70/files/patch-src_mongo_util_net_ssl__types.h b/databases/mongodb70/files/patch-src_mongo_util_net_ssl__types.h new file mode 100644 index 000000000000..b74a1c248ddc --- /dev/null +++ b/databases/mongodb70/files/patch-src_mongo_util_net_ssl__types.h @@ -0,0 +1,10 @@ +--- src/mongo/util/net/ssl_types.h.orig 2023-06-15 22:07:57 UTC ++++ src/mongo/util/net/ssl_types.h +@@ -61,6 +61,7 @@ class SSLX509Name { (public) + auto equalityLens() const { + return std::tie(oid, type, value); + } ++ friend bool operator==(const Entry& lhs, const Entry& rhs); + }; + + SSLX509Name() = default; diff --git a/databases/mongodb70/files/patch-src_third__party_boost_boost_mpl_aux___integral__wrapper.hpp b/databases/mongodb70/files/patch-src_third__party_boost_boost_mpl_aux___integral__wrapper.hpp new file mode 100644 index 000000000000..f6e1178b4a65 --- /dev/null +++ b/databases/mongodb70/files/patch-src_third__party_boost_boost_mpl_aux___integral__wrapper.hpp @@ -0,0 +1,11 @@ +--- src/third_party/boost/boost/mpl/aux_/integral_wrapper.hpp.orig 2023-06-15 22:07:57 UTC ++++ src/third_party/boost/boost/mpl/aux_/integral_wrapper.hpp +@@ -56,7 +56,7 @@ struct AUX_WRAPPER_NAME + // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), + // while some other don't like 'value + 1' (Borland), and some don't like + // either +-#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) ++#if 1 //BOOST_WORKAROUND(__EDG_VERSION__, <= 243) + private: + BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1))); + BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)));