libbpf / ci

BPF CI
Other
10 stars 23 forks source link

mkrootfs_debian.sh failing to build foreign architecture #55

Closed chantra closed 1 year ago

chantra commented 1 year ago

Building x-arch rootfs started failing. This is because a change may have happen in bullseye recently that calls a binary as part of debootstrap:

The exact error is:

I: Extracting zlib1g...
W: Failure trying to run: chroot "/home/chantra/devel/libbpf/ci/rootfs/tmp.jwLB9EVVaG" /bin/true
W: See /home/chantra/devel/libbpf/ci/rootfs/tmp.jwLB9EVVaG/debootstrap/debootstrap.log for details

and the actual log line:

chroot: failed to run command '/bin/true': Exec format error

The solution to this is to use the --foreign option of debootstrap and using qemu.

Example: https://askubuntu.com/questions/287789/what-is-debootstrap-second-stage-for