From 4e652c6fd1c9dbde1a2489080aed77e955c85419 Mon Sep 17 00:00:00 2001 From: Mitchell R Date: Wed, 20 May 2026 02:57:41 +0200 Subject: [PATCH] fix(pi-gen): resolve files/ from sub-stage dir, not BASE_DIR \${BASE_DIR} is pi-gen's own checkout (/pi-gen), not the path of the custom stage. Resolve files/ relative to the script's own location. --- .../01-install-kiosk/00-run.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/deploy/pi-gen/stage-betterframe-client/01-install-kiosk/00-run.sh b/deploy/pi-gen/stage-betterframe-client/01-install-kiosk/00-run.sh index 92ab34c..140a1ee 100755 --- a/deploy/pi-gen/stage-betterframe-client/01-install-kiosk/00-run.sh +++ b/deploy/pi-gen/stage-betterframe-client/01-install-kiosk/00-run.sh @@ -1,8 +1,9 @@ #!/bin/bash -e -# Host-side (runs outside chroot, before 01-run-chroot.sh). Stages every -# file from the sub-stage's files/ dir into the chroot at /tmp/bf-files -# so the chroot script can install them. Files dir is populated by CI -# (build.yml's "Stage files for pi-gen" step). +# Host-side (runs outside chroot, before 01-run-chroot.sh). Pi-gen sets +# cwd to the sub-stage directory and exposes ROOTFS_DIR. Bulk-copy this +# sub-stage's files/ into the chroot at /tmp/bf-files so 01-run-chroot.sh +# can install them. files/ is populated by CI (build.yml's "Stage files +# for pi-gen" step). +SUB_STAGE_DIR="$(cd "$(dirname "$0")" && pwd)" install -d "${ROOTFS_DIR}/tmp/bf-files" -cp -r "${BASE_DIR}/stage-betterframe-client/01-install-kiosk/files/." \ - "${ROOTFS_DIR}/tmp/bf-files/" +cp -r "${SUB_STAGE_DIR}/files/." "${ROOTFS_DIR}/tmp/bf-files/"