git: 0d2c09e66832 - main - databases/mongodb50: update to 5.0.28 and add do-test
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 10 Jul 2024 09:48:11 UTC
The branch main has been updated by ronald: URL: https://cgit.FreeBSD.org/ports/commit/?id=0d2c09e668321a2d20b0c35bf6675f110305ba4c commit 0d2c09e668321a2d20b0c35bf6675f110305ba4c Author: Ronald Klop <ronald@FreeBSD.org> AuthorDate: 2024-07-09 08:10:56 +0000 Commit: Ronald Klop <ronald@FreeBSD.org> CommitDate: 2024-07-10 09:47:15 +0000 databases/mongodb50: update to 5.0.28 and add do-test Changes: https://www.mongodb.com/docs/manual/release-notes/5.0/#5.0.28---jul-09--2024 do-test: The port has had situations in which the code compiled, but the executables did not work. Try to catch this early with make test. --- databases/mongodb50/Makefile | 6 ++++-- databases/mongodb50/distinfo | 6 +++--- databases/mongodb50/files/make.test.sh | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/databases/mongodb50/Makefile b/databases/mongodb50/Makefile index ec3e7e3ba4f9..18a6ac7fe6b1 100644 --- a/databases/mongodb50/Makefile +++ b/databases/mongodb50/Makefile @@ -1,7 +1,6 @@ PORTNAME= mongodb DISTVERSIONPREFIX= r -DISTVERSION= 5.0.27 -PORTREVISION= 1 +DISTVERSION= 5.0.28 CATEGORIES= databases net PKGNAMESUFFIX= ${DISTVERSION:R:S/.//} @@ -119,4 +118,7 @@ do-install: .endfor ${RM} ${STAGEDIR}${PREFIX}/bin/resmoke.py +do-test: + ${SH} ${FILESDIR}/make.test.sh "${STAGEDIR}${PREFIX}/bin" + .include <bsd.port.post.mk> diff --git a/databases/mongodb50/distinfo b/databases/mongodb50/distinfo index 9a982189d7f7..f7eb08cae711 100644 --- a/databases/mongodb50/distinfo +++ b/databases/mongodb50/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1719241119 -SHA256 (mongodb-mongo-r5.0.27_GH0.tar.gz) = 62a51dee664b6d2722edc8443c2a8d2e1e7400bf48d44ae25b1ad799d3bee5da -SIZE (mongodb-mongo-r5.0.27_GH0.tar.gz) = 57287707 +TIMESTAMP = 1720509272 +SHA256 (mongodb-mongo-r5.0.28_GH0.tar.gz) = d3d21296ec71e199ff2b66ecf9385210519e37a230ef180f4a92f81439db94f2 +SIZE (mongodb-mongo-r5.0.28_GH0.tar.gz) = 57289502 diff --git a/databases/mongodb50/files/make.test.sh b/databases/mongodb50/files/make.test.sh new file mode 100755 index 000000000000..d479bd7df132 --- /dev/null +++ b/databases/mongodb50/files/make.test.sh @@ -0,0 +1,32 @@ +#! /bin/sh + +set -e + +usage() { + echo "Usage: $0 <path>" + echo "<path> 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 +mongo --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"