From 9ee1ae942dd9d95fccefc51c641f5de3660de7db Mon Sep 17 00:00:00 2001 From: ckyrouac Date: Fri, 16 Oct 2026 10:22:17 -0500 Subject: [PATCH] ci: Fetch grub-cc from Fedora Koji The ELN latest image no longer provides a reliable source for grub-cc. Fetch the architecture-specific RPM from a pinned Fedora Koji build instead. This is temporary until bootupd supports installing grub-cc into the ESP. Assisted-by: AI Signed-off-by: ckyrouac --- Dockerfile | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/Dockerfile b/Dockerfile index ea876c5edc..36a36986b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -110,32 +110,8 @@ RUN --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp <&2 - exit 1 - ;; -esac - -mv ./*.rpm grub-cc.rpm - -EOF - FROM scratch as fetch COPY --from=target-base /target-rootfs/ / -COPY --from=grub-cc-download /grub-cc.rpm /var/grub-cc.rpm # SKIP_CONFIGS=1 skips LBIs, test kargs, and install configs (for FCOS testing) ARG SKIP_CONFIGS ARG boot_type @@ -172,6 +148,24 @@ RUN --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp \ dnf install -y "${pkgs_to_install[@]}" fi + if [[ "$bootloader" == "grub-cc" ]]; then + case "$(uname -m)" in + x86_64) + grub_cc_url=https://kojipkgs.fedoraproject.org/packages/grub2/2.12/60.eln156/x86_64/grub2-efi-x64-cc-2.12-60.eln156.x86_64.rpm + ;; + aarch64) + grub_cc_url=https://kojipkgs.fedoraproject.org/packages/grub2/2.12/60.eln156/aarch64/grub2-efi-aa64-cc-2.12-60.eln156.aarch64.rpm + ;; + *) + echo "Unsupported architecture: $(uname -m)" >&2 + exit 1 + ;; + esac + + curl --fail --location --retry 5 --retry-all-errors --retry-delay 1 \ + --output /var/grub-cc.rpm "$grub_cc_url" + fi + # Currently dnf installs grub-cc at /usr/lib/efi/grub2/1:2.12-60.eln156/EFI/eln/cc/grubx64-cc.efi # which is less than ideal because: # - the "cc" subdirectory @@ -181,7 +175,8 @@ RUN --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp \ # we can copy the EFI binary to the ESP if [[ "$bootloader" == "grub-cc" ]]; then mkdir /var/grub-cc - rpm2archive /var/grub-cc.rpm | tar -xvz -C /var/grub-cc + rpm2archive /var/grub-cc.rpm > /tmp/grub-cc.tar.gz + tar -xvz -f /tmp/grub-cc.tar.gz -C /var/grub-cc file=$(find /var/grub-cc -name '*.efi') mkdir -p /usr/lib/grub-cc cp "$file" /usr/lib/grub-cc/grub-cc.efi