diff --git a/pungi/phases/extra_isos.py b/pungi/phases/extra_isos.py index 6a688bab..8462b517 100644 --- a/pungi/phases/extra_isos.py +++ b/pungi/phases/extra_isos.py @@ -155,6 +155,14 @@ def get_iso_contents(compose, variant, arch, include_variants, filename, bootabl copy_boot_images(buildinstall_dir, iso_dir) files = iso.get_graft_points([buildinstall_dir, iso_dir]) + # We need to point efiboot.img to compose/ tree, because it was + # modified in buildinstall phase and the file in work/ has different + # checksum to what is in the .treeinfo. + if "images/efiboot.img" in files: + files["images/efiboot.img"] = os.path.join( + compose.paths.compose.os_tree(arch, variant), "images/efiboot.img" + ) + variants = [variant.uid] + include_variants for variant_uid in variants: var = compose.all_variants[variant_uid] diff --git a/tests/test_extra_isos_phase.py b/tests/test_extra_isos_phase.py index e17202c1..7187a708 100644 --- a/tests/test_extra_isos_phase.py +++ b/tests/test_extra_isos_phase.py @@ -493,6 +493,7 @@ class GetIsoContentsTest(helpers.PungiTestCase): iso_dir = os.path.join(self.topdir, 'work/x86_64/iso/my.iso') helpers.touch(os.path.join(bi_dir, 'isolinux/isolinux.bin')) helpers.touch(os.path.join(bi_dir, 'images/boot.img')) + helpers.touch(os.path.join(bi_dir, 'images/efiboot.img')) gp = { 'compose/Client/x86_64/os/Packages': {'f/foo.rpm': '/mnt/f/foo.rpm'}, @@ -506,6 +507,7 @@ class GetIsoContentsTest(helpers.PungiTestCase): bi_gp = { 'isolinux/isolinux.bin': os.path.join(iso_dir, 'isolinux/isolinux.bin'), 'images/boot.img': os.path.join(iso_dir, 'images/boot.img'), + 'images/efiboot.img': os.path.join(iso_dir, 'images/efiboot.img'), } ggp.side_effect = lambda x: gp[x[0][len(self.topdir) + 1:]] if len(x) == 1 else bi_gp @@ -534,6 +536,9 @@ class GetIsoContentsTest(helpers.PungiTestCase): 'Server/repodata/repomd.xml': '/mnt/repodata/repomd.xml', 'isolinux/isolinux.bin': os.path.join(iso_dir, 'isolinux/isolinux.bin'), 'images/boot.img': os.path.join(iso_dir, 'images/boot.img'), + 'images/efiboot.img': os.path.join( + self.topdir, 'compose', self.variant.uid, 'x86_64/os/images/efiboot.img', + ), } self.assertItemsEqual(