]> git.99rst.org Git - openwrt-packages.git/commitdiff
tree-wide: remove quiet mode from grep in test version checks
authorJosef Schlehofer <redacted>
Wed, 29 Jul 2026 05:47:42 +0000 (07:47 +0200)
committerJosef Schlehofer <redacted>
Mon, 10 Aug 2026 08:01:46 +0000 (10:01 +0200)
Remove the quiet mode flag (-q) from grep in version check commands
to ensure that their stdout output is visible.

While at it, switch the remaining regex matches (perl, sscep, awscli) to
fixed-string matching where appropriate, so that special characters in the
version string are matched literally.

For libzip, the zipcmp and zipmerge branches ran grep and then
unconditionally exited 0, so a version mismatch was never reported and
the version check override always passed.

Signed-off-by: Josef Schlehofer <redacted>
admin/rsyslog/test.sh
devel/delve/test.sh
devel/lttng-tools/test.sh
lang/perl/test-version.sh
lang/python/python-awscli/test.sh
libs/libzip/test-version.sh
libs/lmdb/test-version.sh
net/fail2ban/test.sh
net/sscep/test.sh
sound/upmpdcli/test.sh
utils/coreutils/test-version.sh

index 7dd5f660473c54c8e77e704b0f1983a3577dabdb..6bb1baed01bc35fb23d3271933fa5779afc664f7 100644 (file)
@@ -2,7 +2,7 @@
 
 case "$1" in
 rsyslog)
-       rsyslogd -v 2>&1 | grep -qF "$2" || {
+       rsyslogd -v 2>&1 | grep -F "$2" || {
                echo "FAIL: rsyslogd -v did not print expected version '$2'"
                exit 1
        }
index 67ab392128da40c2dfb71c0944fda47c9a94e859..52ce50a76aa5b88009b305e66bc30f82dea0ccd7 100644 (file)
@@ -2,7 +2,7 @@
 
 case "$1" in
 delve)
-       dlv version 2>&1 | grep -qF "$2" || {
+       dlv version 2>&1 | grep -F "$2" || {
                echo "FAIL: dlv version did not print expected version '$2'"
                exit 1
        }
index 36481c0ba1eef665ec723acd593c858566f8c01a..c3a9f1f0105654b0d531342225d5f1619ddaef51 100644 (file)
@@ -2,7 +2,7 @@
 
 case "$1" in
 lttng-tools)
-       lttng --version 2>&1 | grep -qF "$2" || {
+       lttng --version 2>&1 | grep -F "$2" || {
                echo "FAIL: lttng --version did not print expected version '$2'"
                exit 1
        }
index 2920cae615c38487851df89da0cd9005bbd84f79..e19bf8513dc6bbd5bc492d1e0675ca84e4a1d3aa 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 case "$PKG_NAME" in
 perl)
-       perl -v 2>&1 | grep -q "v$PKG_VERSION"
+       perl -v 2>&1 | grep -F "v$PKG_VERSION"
        ;;
 perlbase-archive|perlbase-pod|perlbase-test)
        # Perl script wrappers do not output the OpenWrt package version string
index cf015ee6b6cb8fcae3d62227fd0f699389dfd2e9..e24f988c6b1c753eaa9c0d34273db7aff7d27b8b 100755 (executable)
@@ -11,7 +11,7 @@ assert driver is not None
 EOF
 
 # Verify the aws binary runs --version
-aws --version 2>&1 | grep -q "aws-cli" || {
+aws --version 2>&1 | grep -F "aws-cli" || {
     echo "ERROR: 'aws --version' did not produce expected output"
     exit 1
 }
index f7b063b3f335c2adbf287563dc58c3f9d4f5e0de..7e35000ca504068b5f1392648ae9346becf3c015 100755 (executable)
@@ -9,12 +9,12 @@ libzip-*)
        ;;
 
 zipcmp)
-       zipcmp -V 2>&1 | grep -qF "libzip $PKG_VERSION"
+       zipcmp -V 2>&1 | grep -F "libzip $PKG_VERSION" || exit 1
        exit 0
        ;;
 
 zipmerge)
-       zipmerge -V 2>&1 | grep -qF "libzip $PKG_VERSION"
+       zipmerge -V 2>&1 | grep -F "libzip $PKG_VERSION" || exit 1
        exit 0
        ;;
 
index 5ec4e2b6065267afcde24aa93814fe215c93e05b..54c516099202e8b81573d8cb6016a76ec5df0d8f 100755 (executable)
@@ -11,7 +11,7 @@ lmdb-test)
        exit 0
        ;;
 lmdb-utils)
-       mdb_dump -V 2>&1 | grep -qF "LMDB $ver" || exit 1
+       mdb_dump -V 2>&1 | grep -F "LMDB $ver" || exit 1
        exit 0
        ;;
 *)
index 3d9df8d162583db51e8ad5528370c6f5ccde9896..facb36c8979937241297bd285f6c5e4bdcd6983e 100755 (executable)
@@ -3,7 +3,7 @@
 [ "$1" = fail2ban ] || exit 0
 
 # Verify fail2ban-client binary is present and functional
-fail2ban-client --version 2>&1 | grep -qi "fail2ban" || \
+fail2ban-client --version 2>&1 | grep -i "fail2ban" || \
     { echo "fail2ban-client --version did not produce expected output"; exit 1; }
 
 python3 - << 'EOF'
index da49bf55015c3ac3d5eb744a6008107ecc14ff53..c9764e33bdc94891b1e508c1ed5252730fb0c60b 100644 (file)
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-sscep | grep -q "$PKG_VERSION"
+sscep | grep -F "$PKG_VERSION"
index 34dbfe4060e08ee9526b6e4ab9aa92109fc35d83..5a498352323c163f8ba7e6bfc253ecbf2ba3db42 100644 (file)
@@ -5,11 +5,11 @@ upmpdcli)
        # Version check: upmpdcli prints version to stderr on bad args, or to
        # stdout with --version; try both.
        ver_out=$(upmpdcli --version 2>&1 || upmpdcli -v 2>&1 || true)
-       echo "$ver_out" | grep -qF "$2" || {
+       echo "$ver_out" | grep -F "$2" || {
                # Some builds print only the short semver, not the full string;
                # check for the major.minor part at minimum.
                major_minor=$(echo "$2" | cut -d. -f1-2)
-               echo "$ver_out" | grep -qF "$major_minor" || {
+               echo "$ver_out" | grep -F "$major_minor" || {
                        echo "FAIL: version '$2' not found in: $ver_out"
                        exit 1
                }
index 0b211d999d2db42740c11bbac17ec876fab50a9c..b07486835148a8b2e7841b1730b7537e1bb6d83d 100755 (executable)
@@ -11,6 +11,6 @@ echo|false|kill|printf|pwd|test|true)
        exit 0
        ;;
 *)
-       "$EXEC" --version 2>&1 | grep -qF "$PKG_VERSION"
+       "$EXEC" --version 2>&1 | grep -F "$PKG_VERSION"
        ;;
 esac
git clone https://git.99rst.org/PROJECT