From e973f75af91323af617ea9c98ca94da271bdb81f Mon Sep 17 00:00:00 2001 From: Zephyron Date: Fri, 19 Sep 2025 13:27:47 +1000 Subject: [PATCH] ci: Fix shasum wrapper to properly handle -a 256 arguments - The AppImage build script uses 'shasum -a 256' but sha256sum doesn't accept -a flag - Updated wrapper to detect and strip -a 256 arguments before calling sha256sum - Added comprehensive testing of shasum compatibility in CI output - This should resolve the 'sha256sum: invalid option -- a' error - AppImage checksum verification should now work correctly --- .gitlab-ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d18c4cee3..20da0f018 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,7 +41,13 @@ build-linux: - pacman -S --noconfirm fuse2 gdb # Create shasum compatibility wrapper for AppImage build - echo '#!/bin/bash' > /usr/local/bin/shasum - - echo 'sha256sum "$@"' >> /usr/local/bin/shasum + - echo '# Wrapper to make sha256sum compatible with shasum -a 256 syntax' >> /usr/local/bin/shasum + - echo 'if [ "$1" = "-a" ] && [ "$2" = "256" ]; then' >> /usr/local/bin/shasum + - echo ' shift 2 # Remove -a 256 arguments' >> /usr/local/bin/shasum + - echo ' sha256sum "$@"' >> /usr/local/bin/shasum + - echo 'else' >> /usr/local/bin/shasum + - echo ' sha256sum "$@"' >> /usr/local/bin/shasum + - echo 'fi' >> /usr/local/bin/shasum - chmod +x /usr/local/bin/shasum script: - git submodule update --init --recursive @@ -60,8 +66,10 @@ build-linux: - export ARCH=x86_64 - export VERSION=$(git describe --tags --always) - echo "Testing shasum compatibility..." - - shasum --version || echo "shasum not working" - which shasum || echo "shasum not found in PATH" + - echo "Testing shasum -a 256 syntax..." + - echo "test" | shasum -a 256 || echo "shasum -a 256 failed" + - echo "test" | sha256sum || echo "sha256sum failed" - echo "Running AppImage build..." - ./AppImage-build-local.sh || echo "AppImage build failed, continuing..." - ls -la *.AppImage || echo "No AppImage files found"