extra-iso: Use correct efiboot.img file
If the file is generated, Pungi will modify it at the end of buildinstall phase. We need to point ISO creation to the modified file, otherwise the checksum in .treeinfo will be incorrect. It's sufficient to just update the graft point to correct file, copying is not needed. JIRA: COMPOSE-2976 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
a00ea3d4a6
commit
cbfb556f7c
@ -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]
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user