Skip to content

Commit 7ddb3dc

Browse files
authored
Merge pull request #5840 from sysown/fix/clang-parsersql-cxx-and-arm64-verify-file
fix(build,ci): unblock clang packages + arm64 package verification (3.0.9)
2 parents cae8c76 + b41df66 commit 7ddb3dc

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

deps/parsersql/parsersql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
parsersql-1.0.8
1+
parsersql-1.0.9
-1.6 MB
Binary file not shown.
1.6 MB
Binary file not shown.

test/infra/control/verify-package-install.bash

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ set -euo pipefail
103103
PKG_TYPE="$1"
104104
HAS_PLUGINS="$2"
105105
106+
# Portable ELF check — minimal base images (debian-slim, etc.) may not ship
107+
# `file` or `which`, so validate the ELF magic bytes (7f 45 4c 46) directly.
108+
is_elf() { [ "$(head -c4 "$1" 2>/dev/null | od -An -tx1 | tr -d ' \n')" = "7f454c46" ]; }
109+
106110
echo "==> Installing package: /tmp/pkg.$PKG_TYPE"
107111
case "$PKG_TYPE" in
108112
deb)
@@ -135,7 +139,7 @@ if [[ "$HAS_PLUGINS" == "true" ]]; then
135139
path="/usr/lib/proxysql/${plugin}"
136140
if [[ -f "$path" ]]; then
137141
echo " OK ${plugin} (exists)"
138-
if file "$path" | grep -q 'ELF 64-bit'; then
142+
if is_elf "$path"; then
139143
echo " OK ${plugin} (valid ELF)"
140144
else
141145
echo " FAIL ${plugin} (not a valid ELF file)" >&2
@@ -151,7 +155,7 @@ else
151155
fi
152156
153157
# Binary sanity check
154-
if file "$(which proxysql)" | grep -q 'ELF 64-bit'; then
158+
if is_elf "$(command -v proxysql)"; then
155159
echo " OK proxysql binary (valid ELF)"
156160
else
157161
echo " FAIL proxysql binary (not a valid ELF file)" >&2

0 commit comments

Comments
 (0)