From 17bae7ddbf576fb163b706852cd914462b7e38ae Mon Sep 17 00:00:00 2001 From: Michal Date: Wed, 1 Apr 2026 00:30:29 +0100 Subject: [PATCH] fix: pre-download rootfs ZIP to avoid macOS Python HTTP streaming issues The Asahi installer's urlcache.py fails with AssertionError on macOS when streaming ZIP via HTTP Range requests from Fastify. Fix: download the ZIP with curl first (reliable on macOS), then set REPO_BASE to the local directory so the installer opens it as a local file. Co-Authored-By: Claude Opus 4.6 (1M context) --- bastion/src/bastion/src/routes/asahi.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bastion/src/bastion/src/routes/asahi.ts b/bastion/src/bastion/src/routes/asahi.ts index 982a0e5..3622cab 100644 --- a/bastion/src/bastion/src/routes/asahi.ts +++ b/bastion/src/bastion/src/routes/asahi.ts @@ -87,8 +87,13 @@ tar xf "installer-\${PKG_VER}.tar.gz" echo " Downloading custom installer data from bastion..." curl -sfL -o installer_data.json "\${BASTION}/asahi/installer_data.json" -# Set REPO_BASE so the installer downloads rootfs from bastion (local, fast) -export REPO_BASE="\${BASTION}/asahi/repo/" +# Pre-download the rootfs package (avoids Python HTTP streaming issues on macOS) +echo " Downloading rootfs package from bastion..." +mkdir -p os +curl -# -L -o os/fedora-asahi-lab.zip "\${BASTION}/asahi/repo/fedora-asahi-lab.zip" + +# Point installer to local directory (REPO_BASE + /os/ + package name) +export REPO_BASE="\${PWD}" echo "" echo " Using custom partition layout + rootfs from bastion."