Compare commits

...
4 Commits
Author SHA1 Message Date
CyberMind 73f8a4463b Merge pull request #440 from CyberMind-FR/fix/436-build-scripts-stub-systemctl-handle-rasp
build scripts: stub systemctl + handle raspi-firmware /boot/firmware in qemu chroot
2026-06-01 10:34:56 +02:00
gandalf 11c9984e2a fix(rpi-usb): relative symlink for graphical.target.wants (ref #436)
v2.13.8 still failed the kiosk assertion. PR #439's `ln -sf
"/etc/systemd/system/secubox-kiosk.service"` created an *absolute*
symlink that, from the host's perspective, points to
`/etc/systemd/system/secubox-kiosk.service` on the HOST filesystem
(which doesn't exist there). `[[ -e symlink ]]` follows the target,
so the check returned false even though the symlink itself was
present at the right path.

Switch to a *relative* target (`../secubox-kiosk.service`) :
- matches systemctl's own convention for WantedBy symlinks
- resolves correctly inside the chroot at runtime
- resolves correctly from the host's assertion check at build time

This should be the actual last piece. Build chain: chroot safety net
(PR #437) → bigger tmpfs + /proc/sys (PR #438) → WantedBy symlink
(PR #439 absolute, this PR relative) → assertion passes → image ships.
2026-06-01 10:34:40 +02:00
CyberMind e2acd4cb88 Merge pull request #439 from CyberMind-FR/fix/436-build-scripts-stub-systemctl-handle-rasp
build scripts: stub systemctl + handle raspi-firmware /boot/firmware in qemu chroot
2026-06-01 09:09:37 +02:00
gandalf e4447e0a2a fix(rpi-usb): force graphical.target.wants symlink for kiosk (ref #436)
Follow-up to PR #438. v2.13.7 build progressed all the way to the
build-time assertion, which then failed with:

  [WARN] secubox-kiosk.service not in graphical.target.wants/
  [FAIL] Kiosk artefacts incomplete — refusing to publish a broken image

Under SYSTEMD_OFFLINE=1 inside a qemu-arm64 chroot, `systemctl enable
secubox-kiosk.service` returns 0 but doesn't always materialise the
WantedBy symlink. Create it explicitly right after the enable call
(belt-and-suspenders against any quirk of offline systemctl behaviour).

This is the last piece: chroot safety net (PR #437), bigger tmpfs +
/proc + /sys (PR #438), and now the WantedBy symlink. Expected v2.13.8:
the assertion finally passes, Step 7 rsyncs, image ships.

Chain: #423#433 (PR #435) → #436 (PRs #437, #438, this).
2026-06-01 09:09:22 +02:00
+11
View File
@@ -911,6 +911,17 @@ KIOSKSVC
chroot "${ROOTFS}" systemctl enable secubox-kiosk.service \
|| err "systemctl enable secubox-kiosk.service failed"
# Belt-and-suspenders: `systemctl enable` under SYSTEMD_OFFLINE in a qemu
# chroot doesn't always materialise the WantedBy symlink (observed v2.13.7).
# Create it with a *relative* target (matches systemctl's own convention
# and resolves correctly both inside the chroot AND from the host's
# assertion check — v2.13.8 used an absolute "/etc/..." path which the
# host's `[[ -e symlink ]]` could not resolve because the absolute target
# doesn't exist on the host fs).
install -d "${ROOTFS}/etc/systemd/system/graphical.target.wants"
ln -sf "../secubox-kiosk.service" \
"${ROOTFS}/etc/systemd/system/graphical.target.wants/secubox-kiosk.service"
# Build-time assertion (#433): verify EVERY kiosk artefact made it into
# the rootfs before Step 7's rsync. If any of these is missing, the .img
# would ship without kiosk despite the CI logging "Kiosk mode installed".