From 1cf34cc55b0c2e35b45f597c98d01d1f5ad9a9c8 Mon Sep 17 00:00:00 2001 From: viewit Date: Wed, 10 Jun 2026 15:14:41 +0200 Subject: [PATCH] =?UTF-8?q?fix(tools):=20verify=5Fbuild.sh=20pr=C3=BCft=20?= =?UTF-8?q?echte=20ELF-Binary=20aus=20build/=20statt=20AppImage-Extract?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AppImage --appimage-extract scheiterte im Build-Agent (kein /dev/fuse, mkdir_p Permission denied) → Exit 127. Skript prüft jetzt direkt die unkomprimierte orca-slicer ELF-Binary aus dem build/-Baum (Fallback: AppImage-Extract). ELF-Typ-Filter statt erstem Treffer (4K-Wrapper). --- tools/verify_build.sh | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/tools/verify_build.sh b/tools/verify_build.sh index 6c653679c63..6576bdd299d 100755 --- a/tools/verify_build.sh +++ b/tools/verify_build.sh @@ -24,7 +24,7 @@ fi # Versionstring aus version.inc lesen SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(dirname "$SCRIPT_DIR")" -VERSION=$(grep 'set(SoftFever_VERSION' "$REPO_ROOT/version.inc" | grep -oP '"\K[^"]+') +VERSION=$(grep 'set(SoftFever_VERSION' "$REPO_ROOT/version.inc" | head -1 | grep -oP 'SoftFever_VERSION\s+"\K[^"]+') if [[ -z "$VERSION" ]]; then echo "FEHLER: Konnte VERSION nicht aus version.inc lesen" @@ -49,14 +49,34 @@ CHECKS=( BINARY="" if [[ "$PLATFORM" == "linux" ]]; then - echo "Extrahiere AppImage..." - chmod +x "$ARTIFACT" - cd "$TMPDIR" - "$ARTIFACT" --appimage-extract bin/orca-slicer 2>/dev/null || \ - "$ARTIFACT" --appimage-extract 2>/dev/null - BINARY=$(find "$TMPDIR/squashfs-root" -name "orca-slicer" -type f | head -1) + # Bevorzugt die unkomprimierte Binary aus dem build/-Baum prüfen (kein FUSE, + # keine AppImage-Extraktion nötig). Fällt nur zurück auf --appimage-extract, + # wenn keine lose Binary gefunden wird. + # Echte ELF-Binary suchen, nicht die 4K-Shell-Wrapper im build/-Root. + BUILD_ROOT="$(dirname "$ARTIFACT")" + BINARY="" + while IFS= read -r cand; do + [[ -z "$cand" ]] && continue + if file -b "$cand" 2>/dev/null | grep -q "ELF"; then + BINARY="$cand" + break + fi + done < <(find "$BUILD_ROOT" -name "orca-slicer" -type f -not -path "*/squashfs-root/*" 2>/dev/null) + if [[ -z "$BINARY" ]]; then - echo "FEHLER: orca-slicer Binary nicht im AppImage gefunden" + echo "Keine lose Binary gefunden — extrahiere AppImage..." + chmod +x "$ARTIFACT" + cd "$TMPDIR" + if ! "$ARTIFACT" --appimage-extract bin/orca-slicer >/dev/null 2>&1; then + "$ARTIFACT" --appimage-extract >/dev/null 2>&1 || true + fi + BINARY=$(find "$TMPDIR/squashfs-root" -name "orca-slicer" -type f 2>/dev/null | head -1) + else + echo "Prüfe lose Binary aus build/: $BINARY" + fi + + if [[ -z "$BINARY" || ! -f "$BINARY" ]]; then + echo "FEHLER: orca-slicer Binary weder im build/-Baum noch im AppImage gefunden" exit 1 fi