diff --git a/.github/workflows/Build-Bootstraper.yaml b/.github/workflows/Build-Bootstraper.yaml index 3d5c862..8bff298 100644 --- a/.github/workflows/Build-Bootstraper.yaml +++ b/.github/workflows/Build-Bootstraper.yaml @@ -330,7 +330,7 @@ jobs: else printf "%s\n" "gunzip command is not present in the image." fi - for REQ_CMD in "bash" "basename" "cat" "chgrp" "chmod" "chown" "cp" "date" "dirname" "find" "grep" "head" "mkdir" "mv" "rm" "sed" ; do + for REQ_CMD in "bash" "basename" "cat" "chgrp" "chmod" "chown" "cp" "date" "dirname" "find" "grep" "head" "mkdir" "mv" "rm" "sed" "sha256sum" "sha512sum" ; do if docker exec test-container /bin/bash -c "which ${REQ_CMD}"; then printf "%s\n" "${REQ_CMD:-unknown} command is present in the image." ; printf "%s\n" "${REQ_CMD:-unknown} command is configured in the path." ; @@ -346,7 +346,7 @@ jobs: fi ; done ; printf "::endgroup::\n\n" - for REQ_PATH in "/bin" "/usr/bin" "/sbin" "/usr/bin" "/usr/local/bin" "/usr/local/sbin" "/usr/libexec" "/etc" "/var" "/" ; do + for REQ_PATH in "/bin" "/usr/" "/sbin" "/usr/bin" "/usr/local/bin" "/usr/local/sbin" "/usr/lib" "/usr/libexec" "/etc" "/var" "/" ; do printf "::group::%s\n" "${REQ_PATH}" if docker exec test-container /bin/bash -c "test -d ${REQ_PATH}"; then printf "%s\n" "${REQ_PATH:-unknown} path is present in the image." ; diff --git a/dockerfile b/dockerfile index 44700c0..9f29335 100644 --- a/dockerfile +++ b/dockerfile @@ -223,7 +223,10 @@ RUN set -eux \ ln -fns "$f" "${DESTDIR}"/lib/ld-musl.so.1 || true; \ done || true -# Stage 3: Create the final image +# Stage 3: Copy over featherHash (0BSD Licensed) +FROM --platform="linux/${TARGETARCH}" ghcr.io/reactive-firewall/featherhash-shasum:master AS mitl-featherhash + +# Stage 4: Create the final image # shellcheck disable=SC2154 FROM --platform="linux/${TARGETARCH}" scratch AS mitl-bootstrap @@ -243,6 +246,11 @@ COPY --from=builder /output/fs / # Ensure toybox is reachable at /bin/toybox (symlink if needed) COPY --from=builder /output/fs/usr/bin/toybox /bin/toybox +# Ensure sha256sum is reachable at /bin/sha256sum +COPY --from=mitl-featherhash /bin/sha256sum /bin/sha256sum +COPY --from=mitl-featherhash /bin/sha384sum /bin/sha384sum +COPY --from=mitl-featherhash /bin/sha512sum /bin/sha512sum + SHELL [ "/bin/bash", "--norc", "-c" ] # Set the entry point to Toybox