I attempted to build an image from the branch for PR #231 in a debian:bookworm-slim Docker container, and ended up with an initramfs that was 20 bytes:
This was because cpio was missing, but build.sh happily continued after the point it was needed, despite the set -e that I presume is to prevent exactly such a thing:
Adding dependency libffi.so.8 => tmp/usr/lib/arm-linux-gnueabihf/libffi.so.8
Adding dependency libgcc_s.so.1 => tmp/lib/arm-linux-gnueabihf/libgcc_s.so.1
./build.sh: line 463: cpio: command not found
adding: COPYING.linux (deflated 62%)
adding: LICENCE.broadcom (deflated 45%)
My understanding is that because the cpio command is in a pipe, its result is considered "used" and any errors from it are thus ignored even with set -e:
However, I don't know whether a blanket set -o pipefail would be wise for the whole script (if that is indeed what's required), or whether you need something more precise.
I attempted to build an image from the branch for PR #231 in a
debian:bookworm-slim
Docker container, and ended up with aninitramfs
that was 20 bytes:This was because
cpio
was missing, butbuild.sh
happily continued after the point it was needed, despite theset -e
that I presume is to prevent exactly such a thing:My understanding is that because the
cpio
command is in a pipe, its result is considered "used" and any errors from it are thus ignored even withset -e
:However, I don't know whether a blanket
set -o pipefail
would be wise for the whole script (if that is indeed what's required), or whether you need something more precise.