diff --git a/deps/parsersql/parsersql b/deps/parsersql/parsersql index 536fc15c3..1d0d4e7fb 120000 --- a/deps/parsersql/parsersql +++ b/deps/parsersql/parsersql @@ -1 +1 @@ -parsersql-1.0.8 \ No newline at end of file +parsersql-1.0.9 \ No newline at end of file diff --git a/deps/parsersql/parsersql-1.0.8.tar.gz b/deps/parsersql/parsersql-1.0.8.tar.gz deleted file mode 100644 index c50af4555..000000000 Binary files a/deps/parsersql/parsersql-1.0.8.tar.gz and /dev/null differ diff --git a/deps/parsersql/parsersql-1.0.9.tar.gz b/deps/parsersql/parsersql-1.0.9.tar.gz new file mode 100644 index 000000000..e5a1504d5 Binary files /dev/null and b/deps/parsersql/parsersql-1.0.9.tar.gz differ diff --git a/test/infra/control/verify-package-install.bash b/test/infra/control/verify-package-install.bash index dec6d10bc..450bb0902 100755 --- a/test/infra/control/verify-package-install.bash +++ b/test/infra/control/verify-package-install.bash @@ -103,6 +103,10 @@ set -euo pipefail PKG_TYPE="$1" HAS_PLUGINS="$2" +# Portable ELF check — minimal base images (debian-slim, etc.) may not ship +# `file` or `which`, so validate the ELF magic bytes (7f 45 4c 46) directly. +is_elf() { [ "$(head -c4 "$1" 2>/dev/null | od -An -tx1 | tr -d ' \n')" = "7f454c46" ]; } + echo "==> Installing package: /tmp/pkg.$PKG_TYPE" case "$PKG_TYPE" in deb) @@ -135,7 +139,7 @@ if [[ "$HAS_PLUGINS" == "true" ]]; then path="/usr/lib/proxysql/${plugin}" if [[ -f "$path" ]]; then echo " OK ${plugin} (exists)" - if file "$path" | grep -q 'ELF 64-bit'; then + if is_elf "$path"; then echo " OK ${plugin} (valid ELF)" else echo " FAIL ${plugin} (not a valid ELF file)" >&2 @@ -151,7 +155,7 @@ else fi # Binary sanity check -if file "$(which proxysql)" | grep -q 'ELF 64-bit'; then +if is_elf "$(command -v proxysql)"; then echo " OK proxysql binary (valid ELF)" else echo " FAIL proxysql binary (not a valid ELF file)" >&2