diff options
Diffstat (limited to 'databases/mongodb70')
-rw-r--r-- | databases/mongodb70/Makefile | 8 | ||||
-rw-r--r-- | databases/mongodb70/distinfo | 8 | ||||
-rw-r--r-- | databases/mongodb70/files/patch-src_mongo_platform_waitable__atomic.cpp | 64 |
3 files changed, 76 insertions, 4 deletions
diff --git a/databases/mongodb70/Makefile b/databases/mongodb70/Makefile index cae523d04275..3c730b15a992 100644 --- a/databases/mongodb70/Makefile +++ b/databases/mongodb70/Makefile @@ -1,9 +1,15 @@ PORTNAME= mongodb DISTVERSIONPREFIX= r -DISTVERSION= 7.0.22 +DISTVERSION= 7.0.23 +PORTREVISION= 2 CATEGORIES= databases net PKGNAMESUFFIX= ${DISTVERSION:R:S/.//} +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +# https://github.com/mongodb/mongo/pull/1619/ +# "Modernize dynamic module loading to work with Python3.12" +PATCHFILES+= 0877732109589e441cbf234dce17ec0e7b614902.patch:-p1 + MAINTAINER= ronald@FreeBSD.org COMMENT= MongoDB Community Edition (7.0.x Branch) WWW= https://www.mongodb.com/docs/v7.0/ diff --git a/databases/mongodb70/distinfo b/databases/mongodb70/distinfo index cfdc23e0420e..1e85422dedb1 100644 --- a/databases/mongodb70/distinfo +++ b/databases/mongodb70/distinfo @@ -1,5 +1,7 @@ -TIMESTAMP = 1752738065 -SHA256 (mongodb-mongo-r7.0.22_GH0.tar.gz) = 031f7e924d1094c001621075f87cb466a84c975702a42796827d1456d4d57857 -SIZE (mongodb-mongo-r7.0.22_GH0.tar.gz) = 87803554 +TIMESTAMP = 1756387935 +SHA256 (mongodb-mongo-r7.0.23_GH0.tar.gz) = 31a59b83ecdf65ba26453eb244682f18aa02204a0017e872dd28008b8d471bde +SIZE (mongodb-mongo-r7.0.23_GH0.tar.gz) = 87871275 SHA256 (mongodb-forks-spidermonkey-5acd3be6c9563ad3e7ca6182285c69a38de47bab_GH0.tar.gz) = 1420533e23970171ff7a420e3ded1ea493e1976fb8896a5fd6f35e5b2d75733b SIZE (mongodb-forks-spidermonkey-5acd3be6c9563ad3e7ca6182285c69a38de47bab_GH0.tar.gz) = 280439685 +SHA256 (0877732109589e441cbf234dce17ec0e7b614902.patch) = 96bcf70f8ee66424b5601632fb91dbcbb6b14df0553f59f36cd10325bfce7105 +SIZE (0877732109589e441cbf234dce17ec0e7b614902.patch) = 1770 diff --git a/databases/mongodb70/files/patch-src_mongo_platform_waitable__atomic.cpp b/databases/mongodb70/files/patch-src_mongo_platform_waitable__atomic.cpp new file mode 100644 index 000000000000..73e0befd876d --- /dev/null +++ b/databases/mongodb70/files/patch-src_mongo_platform_waitable__atomic.cpp @@ -0,0 +1,64 @@ +# Original upstream implementation: +# https://jira.mongodb.org/browse/SERVER-81797 +# Attempt to upstream this patch: +# https://github.com/mongodb/mongo/pull/1607 +# https://jira.mongodb.org/browse/SERVER-99225 +# +--- src/mongo/platform/waitable_atomic.cpp.orig 2024-11-20 23:53:48 UTC ++++ src/mongo/platform/waitable_atomic.cpp +@@ -34,6 +34,9 @@ + #ifdef __linux__ + #include <linux/futex.h> + #include <sys/syscall.h> ++#elif defined(__FreeBSD__) ++#include <sys/types.h> ++#include <sys/umtx.h> + #elif defined(_WIN32) + #include <synchapi.h> + #endif +@@ -233,6 +236,45 @@ bool waitUntil(const void* uaddr, + // There isn't a good list of possible errors, so assuming that anything other than a timeout + // error is a possible spurious wakeup. + return timeoutOverflow || errno != ETIMEDOUT; ++} ++ ++#elif defined(__FreeBSD__) ++ ++void notifyOne(const void* uaddr) { ++ _umtx_op(const_cast<void*>(uaddr), UMTX_OP_WAKE_PRIVATE, 1, NULL, NULL); ++} ++ ++void notifyMany(const void* uaddr, int nToWake) { ++ _umtx_op(const_cast<void*>(uaddr), UMTX_OP_WAKE_PRIVATE, nToWake, NULL, NULL); ++} ++ ++void notifyAll(const void* uaddr) { ++ _umtx_op(const_cast<void*>(uaddr), UMTX_OP_WAKE_PRIVATE, INT_MAX, NULL, NULL); ++} ++ ++bool waitUntil(const void* uaddr, ++ uint32_t old, ++ boost::optional<system_clock::time_point> deadline) { ++ struct _umtx_time umtx_deadline; ++ void* uaddr2 = nullptr; ++ ++ if (deadline) { ++ umtx_deadline._timeout.tv_sec = durationCount<Seconds>(deadline->time_since_epoch()); ++ umtx_deadline._timeout.tv_nsec = durationCount<Nanoseconds>( ++ deadline->time_since_epoch() - stdx::chrono::seconds(umtx_deadline._timeout.tv_sec)); ++ umtx_deadline._flags = UMTX_ABSTIME; ++ umtx_deadline._clockid = CLOCK_REALTIME_FAST; ++ uaddr2 = &umtx_deadline; ++ } ++ ++ int umtxOpRet; ++ if ((umtxOpRet = _umtx_op(const_cast<void*>(uaddr), UMTX_OP_WAIT_UINT_PRIVATE, old, (void*)sizeof(struct _umtx_time), uaddr2)) == -1) { ++ if (errno == ETIMEDOUT) { ++ return false; ++ } ++ invariant(umtxOpRet == 0, errorMessage(lastSystemError())); ++ } ++ return true; + } + + #else |