From 73f08780d957825b3e5d9cc6de758e8969a60646 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Wed, 6 Jul 2022 07:44:37 -0700 Subject: [PATCH] correct comments, fix livemap configs --- iso/empanadas/empanadas/configs/el9-beta.yaml | 10 +++--- iso/empanadas/empanadas/configs/el9.yaml | 10 +++--- iso/empanadas/empanadas/configs/el9lh.yaml | 8 ++--- .../empanadas/scripts/build_iso_live.py | 35 +++++++++++++++++++ iso/empanadas/empanadas/util/iso_utils.py | 8 +++-- 5 files changed, 54 insertions(+), 17 deletions(-) create mode 100755 iso/empanadas/empanadas/scripts/build_iso_live.py diff --git a/iso/empanadas/empanadas/configs/el9-beta.yaml b/iso/empanadas/empanadas/configs/el9-beta.yaml index 9d748eb..4233da6 100644 --- a/iso/empanadas/empanadas/configs/el9-beta.yaml +++ b/iso/empanadas/empanadas/configs/el9-beta.yaml @@ -77,12 +77,12 @@ - GenericCloud livemap: git_repo: 'https://git.resf.org/sig_core/kickstarts.git' - branch: 'r9' + branch: 'r9-beta' ksentry: - - rocky-live-workstation.ks - - rocky-live-workstation-lite.ks - - rocky-live-xfce.ks - - rocky-live-kde.ks + Workstation: rocky-live-workstation.ks + Workstation-Lite: rocky-live-workstation-lite.ks + XFCE: rocky-live-xfce.ks + KDE: rocky-live-kde.ks allowed_arches: - x86_64 repoclosure_map: diff --git a/iso/empanadas/empanadas/configs/el9.yaml b/iso/empanadas/empanadas/configs/el9.yaml index 84d5198..97e6e96 100644 --- a/iso/empanadas/empanadas/configs/el9.yaml +++ b/iso/empanadas/empanadas/configs/el9.yaml @@ -77,12 +77,12 @@ - GenericCloud livemap: git_repo: 'https://git.resf.org/sig_core/kickstarts.git' - branch: 'r9-beta' + branch: 'r9' ksentry: - - rocky-live-workstation.ks - - rocky-live-workstation-lite.ks - - rocky-live-xfce.ks - - rocky-live-kde.ks + Workstation: rocky-live-workstation.ks + Workstation-Lite: rocky-live-workstation-lite.ks + XFCE: rocky-live-xfce.ks + KDE: rocky-live-kde.ks allowed_arches: - x86_64 repoclosure_map: diff --git a/iso/empanadas/empanadas/configs/el9lh.yaml b/iso/empanadas/empanadas/configs/el9lh.yaml index 14ceafb..680d2d5 100644 --- a/iso/empanadas/empanadas/configs/el9lh.yaml +++ b/iso/empanadas/empanadas/configs/el9lh.yaml @@ -79,10 +79,10 @@ git_repo: 'https://git.resf.org/sig_core/kickstarts.git' branch: 'r9lh' ksentry: - - rocky-live-workstation.ks - - rocky-live-workstation-lite.ks - - rocky-live-xfce.ks - - rocky-live-kde.ks + Workstation: rocky-live-workstation.ks + Workstation-Lite: rocky-live-workstation-lite.ks + XFCE: rocky-live-xfce.ks + KDE: rocky-live-kde.ks allowed_arches: - x86_64 repoclosure_map: diff --git a/iso/empanadas/empanadas/scripts/build_iso_live.py b/iso/empanadas/empanadas/scripts/build_iso_live.py new file mode 100755 index 0000000..de979e5 --- /dev/null +++ b/iso/empanadas/empanadas/scripts/build_iso_live.py @@ -0,0 +1,35 @@ +# builds ISO's + +import argparse + +from empanadas.common import * +from empanadas.util import Checks +from empanadas.util import IsoBuild + +parser = argparse.ArgumentParser(description="Live ISO Compose") + +parser.add_argument('--release', type=str, help="Major Release Version or major-type (eg 9-beta)", required=True) +parser.add_argument('--arch', type=str, help="Architecture") +parser.add_argument('--isolation', type=str, help="Mock Isolation") +parser.add_argument('--local-compose', action='store_true', help="Compose Directory is Here") +parser.add_argument('--image', action='store_true', help="Compose Directory is Here") +parser.add_argument('--logger', type=str) +parser.add_argument('--live-iso-mode', type=str, default='local') +results = parser.parse_args() +rlvars = rldict[results.release] +major = rlvars['major'] + +a = IsoBuild( + rlvars, + config, + major=major, + arch=results.arch, + isolation=results.isolation, + extra_iso_mode=results.live_iso_mode, + image=results.image, + compose_dir_is_here=results.local_compose, + logger=results.logger +) + +def run(): + a.run_build_extra_iso() diff --git a/iso/empanadas/empanadas/util/iso_utils.py b/iso/empanadas/empanadas/util/iso_utils.py index ff91d99..bdb6cac 100644 --- a/iso/empanadas/empanadas/util/iso_utils.py +++ b/iso/empanadas/empanadas/util/iso_utils.py @@ -42,9 +42,8 @@ class IsoBuild: This helps us build the generic ISO's for a Rocky Linux release. In particular, this is for the boot images. - While there is a function for building the DVD and live images, this not - the main design of this class. The other functions can be called on their - own to facilitate those particular builds. + There are functions to build the DVD (and potentially other) images. Each + particular build or process starts with "run" in their name. """ def __init__( self, @@ -83,6 +82,7 @@ class IsoBuild: self.lorax_result_root = config['mock_work_root'] + "/" + "lorax" self.mock_isolation = isolation self.iso_map = rlvars['iso_map'] + self.livemap = rlvars['livemap'] self.cloudimages = rlvars['cloudimages'] self.release_candidate = rc self.s3 = s3 @@ -1617,6 +1617,8 @@ class IsoBuild: self.log.info(Color.INFO + 'Starting Live ISOs phase') + # Check that the arch we've assigned is valid... + self._live_iso_build_wrap() self.log.info('Compose repo directory: %s' % sync_root)