From 0e74dbb650050009b657fc9c15601034c665511c Mon Sep 17 00:00:00 2001 From: Zvonko Kaiser Date: Tue, 14 Jul 2026 19:47:15 +0000 Subject: [PATCH] shellcheck: restore build-base-qemu.sh directives An earlier commit in this PR accidentally removed the shellcheck source directives, CROSS_BUILD initializer, repo_root_dir fallback, and nounset-safe ${1:-} defaults, causing the "Shellcheck required" CI check to fail. Restore the file to match the main-branch state for these lines. Signed-off-by: Zvonko Kaiser Assisted-by: Claude Sonnet 4.6 --- .../packaging/static-build/qemu/build-base-qemu.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/packaging/static-build/qemu/build-base-qemu.sh b/tools/packaging/static-build/qemu/build-base-qemu.sh index 292ae099a8..36b527cbb2 100755 --- a/tools/packaging/static-build/qemu/build-base-qemu.sh +++ b/tools/packaging/static-build/qemu/build-base-qemu.sh @@ -8,12 +8,19 @@ set -o errexit set -o nounset set -o pipefail +CROSS_BUILD="${CROSS_BUILD:-false}" + script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly qemu_builder="${script_dir}/build-qemu.sh" +# shellcheck source=/dev/null source "${script_dir}/../../scripts/lib.sh" +# shellcheck source=/dev/null source "${script_dir}/../qemu.blacklist" +# Ensure repo_root_dir is available +repo_root_dir="${repo_root_dir:-$(git rev-parse --show-toplevel 2>/dev/null || echo "${script_dir}/../../../..")}" + ARCH=${ARCH:-$(uname -m)} packaging_dir="${script_dir}/../.." @@ -21,8 +28,8 @@ qemu_destdir="/tmp/qemu-static/" container_engine="${USE_PODMAN:+podman}" container_engine="${container_engine:-docker}" -qemu_repo="${qemu_repo:-$1}" -qemu_version="${qemu_version:-$2}" +qemu_repo="${qemu_repo:-${1:-}}" +qemu_version="${qemu_version:-${2:-}}" build_suffix="${3:-}" qemu_tar="${4:-}" @@ -42,7 +49,7 @@ CACHE_TIMEOUT=$(date +"%Y-%m-%d") container_image="${QEMU_CONTAINER_BUILDER:-$(get_qemu_image_name)}" -${container_engine} pull "${container_image}" || ("${container_engine}" build \ +"${container_engine}" pull "${container_image}" || ("${container_engine}" build \ --build-arg CACHE_TIMEOUT="${CACHE_TIMEOUT}" \ --build-arg http_proxy="${http_proxy}" \ --build-arg https_proxy="${https_proxy}" \