ci(pi-gen): stage files into chroot via host-side 00-run.sh

Pi-gen doesn't auto-copy a sub-stage's files/ dir into the chroot. The
chroot script's install commands were reaching for /tmp/bf-files/... which
never existed. Add a host-side 00-run.sh that bulk-copies files/* into
ROOTFS_DIR/tmp/bf-files, then rename the chroot script to 01-run-chroot.sh
so it sorts AFTER the host copy ('-' < '.' bites you otherwise).
This commit is contained in:
Mitchell R 2026-05-20 02:31:35 +02:00
parent 771b94d387
commit 04d40adb93
No known key found for this signature in database
3 changed files with 11 additions and 1 deletions

View file

@ -174,7 +174,9 @@ jobs:
deploy/pi-gen/stage-betterframe-client/01-install-kiosk/files/ deploy/pi-gen/stage-betterframe-client/01-install-kiosk/files/
cp deploy/plymouth/betterframe/betterframe.script \ cp deploy/plymouth/betterframe/betterframe.script \
deploy/pi-gen/stage-betterframe-client/01-install-kiosk/files/ deploy/pi-gen/stage-betterframe-client/01-install-kiosk/files/
chmod +x deploy/pi-gen/stage-betterframe-client/01-install-kiosk/00-run-chroot.sh chmod +x deploy/pi-gen/stage-betterframe-client/01-install-kiosk/00-run.sh \
deploy/pi-gen/stage-betterframe-client/01-install-kiosk/01-run-chroot.sh \
deploy/pi-gen/stage-betterframe-client/prerun.sh
- name: Build Pi image (pi-gen) - name: Build Pi image (pi-gen)
uses: usimd/pi-gen-action@v1.11.0 uses: usimd/pi-gen-action@v1.11.0

View file

@ -0,0 +1,8 @@
#!/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).
install -d "${ROOTFS_DIR}/tmp/bf-files"
cp -r "${BASE_DIR}/stage-betterframe-client/01-install-kiosk/files/." \
"${ROOTFS_DIR}/tmp/bf-files/"