From 5e8876c860717d75505ed24fe14bdf64c71c7001 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Thu, 30 Apr 2020 10:43:40 -0400 Subject: [PATCH] buildextend-live: unconditionally turn on osmet packing This is the final step in ratcheting osmet into place for offline installs by default. We drop the `--osmet` optional flag and now always perform osmet packing when generating the live ISO. (We could leave the switch around for a while just for compatibility, but meh... the only other place this exists right now is the coreos-installer CI, where we can trivially update it once this merges.) Closes: https://github.com/coreos/fedora-coreos-tracker/issues/352 --- .cci.jenkinsfile | 1 + src/cmd-buildextend-installer | 15 +++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.cci.jenkinsfile b/.cci.jenkinsfile index 0e8cfa0159..d58cd4d2d8 100644 --- a/.cci.jenkinsfile +++ b/.cci.jenkinsfile @@ -52,6 +52,7 @@ pod(image: 'registry.fedoraproject.org/fedora:31', runAsUser: 0, kvm: true, memo stage("Image tests") { shwrap("cd /srv && env TMPDIR=\$(pwd)/tmp/ kola testiso -S") + shwrap("cd /srv && env TMPDIR=\$(pwd)/tmp/ kola testiso -S --scenarios iso-offline-install") // and again this time with the 4k image shwrap("cd /srv && env TMPDIR=\$(pwd)/tmp/ kola testiso -S --qemu-native-4k --no-pxe") } diff --git a/src/cmd-buildextend-installer b/src/cmd-buildextend-installer index 015ab14293..8fef3ca34d 100755 --- a/src/cmd-buildextend-installer +++ b/src/cmd-buildextend-installer @@ -43,9 +43,6 @@ parser = argparse.ArgumentParser() parser.add_argument("--build", help="Build ID") parser.add_argument("--force", action='store_true', default=False, help="Overwrite previously generated installer") -# Temporary switch while we ratchet osmet in place -parser.add_argument("--osmet", action='store_true', default=False, - help="Generate osmet file") args = parser.parse_args() # Identify the builds and target the latest build if none provided @@ -174,13 +171,11 @@ def generate_iso(): tmp_squashfs = os.path.join(tmpdir, 'root.squashfs') tmp_cpio = os.path.join(tmpdir, 'root.cpio') tmp_initramfs = os.path.join(tmpdir, 'initramfs') - cpio_input_files = [os.path.basename(tmp_squashfs)] - if args.osmet: - tmp_osmet = os.path.join(tmpdir, img_metal_obj['path'] + '.osmet') - cpio_input_files += [os.path.basename(tmp_osmet)] - print(f'Generating osmet file') - run_verbose(['/usr/lib/coreos-assembler/osmet-pack', - img_metal, tmp_osmet, img_metal_checksum]) + tmp_osmet = os.path.join(tmpdir, img_metal_obj['path'] + '.osmet') + cpio_input_files = [os.path.basename(f) for f in [tmp_squashfs, tmp_osmet]] + print(f'Generating osmet file') + run_verbose(['/usr/lib/coreos-assembler/osmet-pack', + img_metal, tmp_osmet, img_metal_checksum]) print(f'Compressing squashfs with {squashfs_compression}') run_verbose(['/usr/lib/coreos-assembler/gf-mksquashfs',