Fix image build: pi-gen wants qemu-user-binfmt, not qemu-user-static

The first CI build failed in under a second with 'Required dependencies not
installed: qemu-user-binfmt'. pi-gen checks for the binfmt handler rather than
the emulator binary, and I had guessed the package name. The list now comes
from pi-gen's own depends file at the pinned commit, and the workflow asserts
the aarch64 handler is registered before spending an hour discovering it is
not.
This commit is contained in:
2026-08-16 18:34:38 +01:00
parent 34f62222e1
commit 4eefd8816b
+11 -3
View File
@@ -43,10 +43,18 @@ jobs:
- name: Install build dependencies - name: Install build dependencies
run: | run: |
sudo apt-get update sudo apt-get update
# Taken from pi-gen's own `depends` file at the pinned commit rather
# than guessed. My first attempt installed qemu-user-static, and
# pi-gen wants qemu-user-binfmt: it checks for the binfmt handler, not
# the emulator binary, and failed in under a second.
sudo apt-get install -y --no-install-recommends \ sudo apt-get install -y --no-install-recommends \
coreutils quilt parted qemu-user-static debootstrap zerofree zip \ quilt parted coreutils qemu-user-binfmt debootstrap zerofree zip \
dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file \ dosfstools e2fsprogs libcap2-bin libarchive-tools grep rsync \
git curl bc gpg pigz kpartx arch-test xz-utils curl xxd file git kmod bc gpg pigz arch-test
# Prove the handler is actually registered before spending an hour.
test -f /proc/sys/fs/binfmt_misc/qemu-aarch64 \
|| sudo systemctl restart systemd-binfmt || true
ls /proc/sys/fs/binfmt_misc/ | head
# Pinned to a commit, not a branch. An image other people flash should not # Pinned to a commit, not a branch. An image other people flash should not
# change because an upstream branch moved between builds. # change because an upstream branch moved between builds.