]> git.99rst.org Git - openwrt-packages.git/commitdiff
nut: add version test overrides
authorDaniel F. Dickinson <redacted>
Sun, 10 May 2026 02:35:51 +0000 (22:35 -0400)
committerJosef Schlehofer <redacted>
Thu, 2 Jul 2026 04:43:08 +0000 (06:43 +0200)
Allow CI to pass by skipping the generic version
check where it not appropriate.

Signed-off-by: Daniel F. Dickinson <redacted>
net/nut/test-version.sh [new file with mode: 0644]

diff --git a/net/nut/test-version.sh b/net/nut/test-version.sh
new file mode 100644 (file)
index 0000000..2b07817
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+if [ "$PKG_NAME" = "nut" ]; then
+       exit 0
+fi
+
+EXEC="${PKG_NAME#nut-}"
+
+case "$EXEC" in
+common | upsmon-sendmail-notify | avahi-service)
+       exit 0
+       ;;
+driver-*)
+       DRIVER="${EXEC#driver-}"
+       /usr/libexec/nut/"$DRIVER" -V 2>&1 | grep -qF "${PKG_VERSION}"
+       ;;
+server)
+       "upsd" -V 2>&1 | grep -qF "${PKG_VERSION}" && "upsdrvctl" -V 2>&1 | grep -qF "${PKG_VERSION}"
+       ;;
+upssched)
+       # Only intended to be run from upsmon
+       exit 0
+       ;;
+web-cgi)
+       # Only runs as CGI scripts
+       exit 0
+       ;;
+*)
+       "$EXEC" -V 2>&1 | grep -qF "${PKG_VERSION}"
+       ;;
+esac
git clone https://git.99rst.org/PROJECT