chore: don't fetch ublue-os secureboot key (#104)

We already have this on the image, there is no need to fetch it here
again, if the keys are rotated/don't match what is
present on the booted image then we have a problem.

Co-authored-by: inffy <10782843+inffy@users.noreply.github.com>
This commit is contained in:
renner 2026-10-05 05:33:43 +00:00 committed by GitHub
parent 0a9dbbf9d1
commit 55ad2df87f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 6 deletions

View file

@ -71,7 +71,8 @@ bash \
"$SCRIPT_DIR/flatpak-mount-workaround.sh" && \ "$SCRIPT_DIR/flatpak-mount-workaround.sh" && \
"$SCRIPT_DIR/plasma-tweaks.sh" && \ "$SCRIPT_DIR/plasma-tweaks.sh" && \
"$SCRIPT_DIR/workarounds.sh" && \ "$SCRIPT_DIR/workarounds.sh" && \
"$SCRIPT_DIR/configure_iso_anaconda.sh" "$SCRIPT_DIR/configure_iso_anaconda.sh" && \
"$SCRIPT_DIR/smoke-tests.sh"
# image-builder needs gcdx64.efi / grub modules # image-builder needs gcdx64.efi / grub modules
_arch=$(uname -m) _arch=$(uname -m)

View file

@ -88,17 +88,13 @@ sync
%end %end
EOF EOF
# Fetch the Secureboot Public Key
sbkey='https://github.com/ublue-os/akmods/raw/main/certs/public_key.der'
curl --retry 15 -Lo /etc/sb_pubkey.der "$sbkey"
# Enroll Secureboot Key # Enroll Secureboot Key
tee /usr/share/anaconda/post-scripts/secureboot-enroll-key.ks <<'EOF' tee /usr/share/anaconda/post-scripts/secureboot-enroll-key.ks <<'EOF'
%post --erroronfail --nochroot %post --erroronfail --nochroot
set -oue pipefail set -oue pipefail
readonly ENROLLMENT_PASSWORD="universalblue" readonly ENROLLMENT_PASSWORD="universalblue"
readonly SECUREBOOT_KEY="/etc/sb_pubkey.der" readonly SECUREBOOT_KEY="/etc/pki/akmods/certs/akmods-ublue.der"
if [[ ! -d "/sys/firmware/efi" ]]; then if [[ ! -d "/sys/firmware/efi" ]]; then
echo "EFI mode not detected. Skipping key enrollment." echo "EFI mode not detected. Skipping key enrollment."

7
iso_files/smoke-tests.sh Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -eoux pipefail
# secureboot key that is enrolled on first-boot, we already have a test for
# kernel on the image build
stat /etc/pki/akmods/certs/akmods-ublue.der