diff --git a/Dockerfile b/Dockerfile index a0a75e4c..cc642f3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,7 @@ rm -rf /var/log rm -rf /var/lib rm -rf /var/cache rm -rf /run/rhsm +rm -rf /tmp/* EORUN # Remove /var/roothome as workaround RUN <//EFI layout used by F44+ images. +test_bootupd_payload_file=/usr/lib/efi/test_bootupd_payload/1.0/EFI/fedora/test-bootupd.efi +test_bootupd_payload_file1=/usr/lib/efi/test_bootupd_payload/1.0/EFI/BOOT/test-bootupd1.efi build_rpm test_bootupd_payload \ files "${test_bootupd_payload_file} ${test_bootupd_payload_file1}" \ @@ -51,8 +52,8 @@ add_override() { if test -z "${e2e_skip_build:-}"; then echo "Building starting image" rm -f ${overrides}/rpm/*.rpm - # Version from F43 prior to GA - add_override grub2-2.12-38.fc43 + # Version from F44 prior to GA + add_override grub2-2.12-56.fc44 runv cosa build runv cosa osbuild qemu prev_image=$(runv cosa meta --image-path qemu) @@ -61,8 +62,8 @@ if test -z "${e2e_skip_build:-}"; then echo "packages: [test_bootupd_payload]" >> src/config/manifest.yaml rm -f ${overrides}/rpm/*.rpm echo "Building update ostree" - # Latest (current) version in F43 - add_override grub2-2.12-40.fc43 + # Latest (current) version in F44 + add_override grub2-2.12-58.fc44 mv ${test_tmpdir}/yumrepo/packages/$(arch)/*.rpm ${overrides}/rpm/ # Only build ostree update runv cosa build ostree diff --git a/tests/kola/test-bootupd b/tests/kola/test-bootupd index 4bf99406..86a4d702 100755 --- a/tests/kola/test-bootupd +++ b/tests/kola/test-bootupd @@ -39,7 +39,7 @@ usrlibefi=/usr/lib/efi # Path to /EFI/fedora tmpefisubdir=${tmpefidir}/${efisubdir} -if [ -d efilib ]; then efilib_exists=true; else efilib_exists=false; fi +if [ -d ${usrlibefi} ]; then efilib_exists=true; else efilib_exists=false; fi prepare_efi_update() { test -w /usr @@ -179,13 +179,17 @@ mount -o remount,rw /boot rm -f /boot/bootupd-state.json if [ -d /sys/firmware/efi ]; then - # EFI boot: verify update failed if metadata is missing EFI.json - # Backup EFI.json and restore it later, or validate will fail - update_metadata_move EFI EFI-bak - if bootupctl update 2>err.txt; then - fatal "Should fail as missing EFI update metadata (booted with EFI)" + # EFI boot: verify update failed if metadata is missing EFI.json. + # Skip this check when using /usr/lib/efi, as metadata is derived from + # the directory structure so removing EFI.json does not cause a failure. + if ! $efilib_exists; then + # Backup EFI.json and restore it later, or validate will fail + update_metadata_move EFI EFI-bak + if bootupctl update 2>err.txt; then + fatal "Should fail as missing EFI update metadata (booted with EFI)" + fi + update_metadata_move EFI-bak EFI fi - update_metadata_move EFI-bak EFI # Should succeed if BIOS metadata is missing rm -f ${bootupdir}/BIOS.json