From b800288550534ceb65241455316950e2c0c20f3c Mon Sep 17 00:00:00 2001 From: Dorian Date: Mon, 13 Jul 2026 15:23:34 +0100 Subject: [PATCH] fix(iso): repo-root paths broke when builder moved into _archived/ BUILD_VERSION/EXPECTED_VERSION/LOCAL_RELEASE, the backend container build context, and the neode-ui/web-dist/apps/demo/docker copies all resolved one level short (image-recipe/ instead of the repo root), so the builder never found the prebuilt binary and its container fallback died on 'COPY core ./core'. configs/ references were already correct. Co-Authored-By: Claude Fable 5 --- .../_archived/build-auto-installer-iso.sh | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/image-recipe/_archived/build-auto-installer-iso.sh b/image-recipe/_archived/build-auto-installer-iso.sh index 06d11c7e..5025cb4f 100755 --- a/image-recipe/_archived/build-auto-installer-iso.sh +++ b/image-recipe/_archived/build-auto-installer-iso.sh @@ -67,7 +67,7 @@ echo "$BUILD_NUM" | sudo tee "$BUILD_COUNTER_FILE" > /dev/null 2>/dev/null || BU GIT_SHORT=$(cd "$SCRIPT_DIR/.." && git rev-parse --short HEAD 2>/dev/null || echo "dev") # Version format: major.minor.patch-prerelease (semver) # Read version from Cargo.toml (single source of truth) -BUILD_VERSION=$(grep '^version' "$SCRIPT_DIR/../core/archipelago/Cargo.toml" 2>/dev/null | head -1 | sed 's/version = "//;s/"//' || echo "0.0.0") +BUILD_VERSION=$(grep '^version' "$SCRIPT_DIR/../../core/archipelago/Cargo.toml" 2>/dev/null | head -1 | sed 's/version = "//;s/"//' || echo "0.0.0") echo "Build #${BUILD_NUM} (${BUILD_VERSION}, commit ${GIT_SHORT})" # Architecture-dependent variables @@ -1073,7 +1073,7 @@ BACKEND_CAPTURED=0 # ISO — it grabbed an Apr-18 1.4.0 binary and the fleet rejected the # fips.yaml it wrote out on Activate). The expected version is the one # compiled into this build run. -EXPECTED_VERSION="$(grep '^version' "$(cd "$SCRIPT_DIR/.." && pwd)/core/archipelago/Cargo.toml" | head -1 | sed 's/.*"\(.*\)".*/\1/')" +EXPECTED_VERSION="$(grep '^version' "$(cd "$SCRIPT_DIR/../.." && pwd)/core/archipelago/Cargo.toml" | head -1 | sed 's/.*"\(.*\)".*/\1/')" echo " Expected backend version (from Cargo.toml): $EXPECTED_VERSION" verify_backend_version() { @@ -1093,7 +1093,7 @@ verify_backend_version() { } # Check for local release binary first (works for both BUILD_FROM_SOURCE and normal mode) -LOCAL_RELEASE="$(cd "$SCRIPT_DIR/.." && pwd)/core/target/release/archipelago" +LOCAL_RELEASE="$(cd "$SCRIPT_DIR/../.." && pwd)/core/target/release/archipelago" if [ -f "$LOCAL_RELEASE" ]; then if verify_backend_version "$LOCAL_RELEASE"; then cp "$LOCAL_RELEASE" "$ARCH_DIR/bin/archipelago" @@ -1141,7 +1141,7 @@ RUN cd core && cargo build --release --bin archipelago BACKENDFILE BACKEND_IMAGE="localhost/archipelago-backend:iso" - if $CONTAINER_CMD build --platform $CONTAINER_PLATFORM -t "$BACKEND_IMAGE" -f "$BACKEND_DOCKERFILE" "$SCRIPT_DIR/.."; then + if $CONTAINER_CMD build --platform $CONTAINER_PLATFORM -t "$BACKEND_IMAGE" -f "$BACKEND_DOCKERFILE" "$SCRIPT_DIR/../.."; then echo " Extracting backend binary..." BACKEND_CONTAINER=$($CONTAINER_CMD create --platform $CONTAINER_PLATFORM "$BACKEND_IMAGE") $CONTAINER_CMD cp "$BACKEND_CONTAINER:/build/core/target/release/archipelago" "$ARCH_DIR/bin/" && \ @@ -1211,9 +1211,9 @@ if [ -f "$WORK_DIR/archipelago-wg" ]; then fi # Copy NostrVPN UI dashboard for nginx serving -if [ -d "$SCRIPT_DIR/../docker/nostr-vpn-ui" ]; then +if [ -d "$SCRIPT_DIR/../../docker/nostr-vpn-ui" ]; then mkdir -p "$ARCH_DIR/web-ui/nostr-vpn" - cp "$SCRIPT_DIR/../docker/nostr-vpn-ui/index.html" "$ARCH_DIR/web-ui/nostr-vpn/" + cp "$SCRIPT_DIR/../../docker/nostr-vpn-ui/index.html" "$ARCH_DIR/web-ui/nostr-vpn/" echo " ✅ NostrVPN UI dashboard included" fi @@ -1247,24 +1247,24 @@ if [ "$WEBUI_CAPTURED" = "0" ]; then if [ "$BUILD_FROM_SOURCE" != "1" ]; then echo " ⚠️ Could not capture from live server, building from source..." fi - cd "$SCRIPT_DIR/../neode-ui" + cd "$SCRIPT_DIR/../../neode-ui" echo " Installing frontend dependencies..." npm ci --prefer-offline 2>&1 | tail -3 if npm run build 2>&1 | tail -5; then - if [ -d "$SCRIPT_DIR/../web/dist/neode-ui" ]; then + if [ -d "$SCRIPT_DIR/../../web/dist/neode-ui" ]; then echo " Including web UI from web/dist/neode-ui..." - cp -r "$SCRIPT_DIR/../web/dist/neode-ui/"* "$ARCH_DIR/web-ui/" + cp -r "$SCRIPT_DIR/../../web/dist/neode-ui/"* "$ARCH_DIR/web-ui/" echo " ✅ Web UI built ($(du -sh "$ARCH_DIR/web-ui" | cut -f1))" fi else echo " ⚠️ Web UI build failed" # Try to use existing build - if [ -d "$SCRIPT_DIR/../web/dist/neode-ui" ]; then + if [ -d "$SCRIPT_DIR/../../web/dist/neode-ui" ]; then echo " Using existing web UI build..." - cp -r "$SCRIPT_DIR/../web/dist/neode-ui/"* "$ARCH_DIR/web-ui/" - elif [ -d "$SCRIPT_DIR/../neode-ui/dist" ]; then + cp -r "$SCRIPT_DIR/../../web/dist/neode-ui/"* "$ARCH_DIR/web-ui/" + elif [ -d "$SCRIPT_DIR/../../neode-ui/dist" ]; then echo " Using neode-ui/dist..." - cp -r "$SCRIPT_DIR/../neode-ui/dist/"* "$ARCH_DIR/web-ui/" + cp -r "$SCRIPT_DIR/../../neode-ui/dist/"* "$ARCH_DIR/web-ui/" else echo " ❌ No web UI available" exit 1 @@ -1280,7 +1280,7 @@ AIUI_INCLUDED=0 # tried first so ISO builds on a fresh clone work without needing any # external AIUI checkout. for AIUI_DIR in \ - "$SCRIPT_DIR/../demo/aiui" \ + "$SCRIPT_DIR/../../demo/aiui" \ "$SCRIPT_DIR/../../AIUI/packages/app/dist" \ "$HOME/AIUI/packages/app/dist" \ "/home/archipelago/AIUI/packages/app/dist" \ @@ -1307,9 +1307,9 @@ if [ "$AIUI_INCLUDED" = "0" ]; then fi # Copy app manifests -if [ -d "$SCRIPT_DIR/../apps" ]; then +if [ -d "$SCRIPT_DIR/../../apps" ]; then echo " Including app manifests..." - cp -r "$SCRIPT_DIR/../apps" "$ARCH_DIR/" + cp -r "$SCRIPT_DIR/../../apps" "$ARCH_DIR/" fi # Copy Plymouth theme files for installation on target @@ -1925,7 +1925,7 @@ fi # Bundle docker UI source files for building custom UIs on first boot # Always bundle — these are tiny HTML/CSS files, not container images if true; then - DOCKER_UI_DIR="$SCRIPT_DIR/../docker" + DOCKER_UI_DIR="$SCRIPT_DIR/../../docker" if [ -d "$DOCKER_UI_DIR" ]; then echo " Bundling docker UI source files..." mkdir -p "$ARCH_DIR/docker"