aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald Klop <ronald@FreeBSD.org>2024-07-09 08:10:56 +0000
committerRonald Klop <ronald@FreeBSD.org>2024-07-10 09:47:15 +0000
commit0d2c09e668321a2d20b0c35bf6675f110305ba4c (patch)
treeaf1f495af3bc441eece786681c648d6557d319e1
parent51012f8fa86d27d22bcf6c55b7a94f195510f16f (diff)
downloadports-0d2c09e668321a2d20b0c35bf6675f110305ba4c.tar.gz
ports-0d2c09e668321a2d20b0c35bf6675f110305ba4c.zip
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.
-rw-r--r--databases/mongodb50/Makefile6
-rw-r--r--databases/mongodb50/distinfo6
-rwxr-xr-xdatabases/mongodb50/files/make.test.sh32
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"