restructure iso map configs

This commit is contained in:
Louis Abel 2022-06-24 15:37:32 -07:00
parent b75fe62899
commit 6073066c84
Signed by: label
GPG Key ID: B37E62D143879B36
5 changed files with 101 additions and 130 deletions

View File

@ -30,44 +30,29 @@
- 'SAPHANA' - 'SAPHANA'
- 'extras' - 'extras'
- 'plus' - 'plus'
no_comps_or_groups:
- 'all'
- 'extras'
- 'plus'
comps_or_groups:
- 'BaseOS'
- 'AppStream'
- 'CRB'
- 'HighAvailability'
- 'ResilientStorage'
- 'RT'
- 'NFV'
- 'SAP'
- 'SAPHANA'
has_modules:
- 'AppStream'
- 'CRB'
structure: structure:
packages: 'os/Packages' packages: 'os/Packages'
repodata: 'os/repodata' repodata: 'os/repodata'
iso_map: iso_map:
xorrisofs: False xorrisofs: False
iso_level: False iso_level: False
hosts:
x86_64: ''
aarch64: ''
ppc64le: ''
s390x: ''
images: images:
dvd: dvd:
discnum: '1' discnum: '1'
variant: 'AppStream'
repos: repos:
- 'BaseOS' - 'BaseOS'
- 'AppStream' - 'AppStream'
lorax_variants: minimal:
- dvd isoskip: True
- minimal repos: []
- BaseOS BaseOS:
isoskip: True
variant: 'BaseOS'
repos:
- 'BaseOS'
- 'AppStream'
lorax:
repos: repos:
- 'BaseOS' - 'BaseOS'
- 'AppStream' - 'AppStream'

View File

@ -30,44 +30,29 @@
- 'SAPHANA' - 'SAPHANA'
- 'extras' - 'extras'
- 'plus' - 'plus'
no_comps_or_groups:
- 'all'
- 'extras'
- 'plus'
comps_or_groups:
- 'BaseOS'
- 'AppStream'
- 'CRB'
- 'HighAvailability'
- 'ResilientStorage'
- 'RT'
- 'NFV'
- 'SAP'
- 'SAPHANA'
has_modules:
- 'AppStream'
- 'CRB'
structure: structure:
packages: 'os/Packages' packages: 'os/Packages'
repodata: 'os/repodata' repodata: 'os/repodata'
iso_map: iso_map:
xorrisofs: False xorrisofs: False
iso_level: False iso_level: False
hosts:
x86_64: ''
aarch64: ''
ppc64le: ''
s390x: ''
images: images:
dvd: dvd:
discnum: '1' discnum: '1'
variant: 'AppStream'
repos: repos:
- 'BaseOS' - 'BaseOS'
- 'AppStream' - 'AppStream'
lorax_variants: minimal:
- dvd isoskip: True
- minimal repos: []
- BaseOS BaseOS:
isoskip: True
variant: 'BaseOS'
repos:
- 'BaseOS'
- 'AppStream'
lorax:
repos: repos:
- 'BaseOS' - 'BaseOS'
- 'AppStream' - 'AppStream'

View File

@ -30,44 +30,29 @@
- 'SAPHANA' - 'SAPHANA'
- 'extras' - 'extras'
- 'plus' - 'plus'
no_comps_or_groups:
- 'all'
- 'extras'
- 'plus'
comps_or_groups:
- 'BaseOS'
- 'AppStream'
- 'CRB'
- 'HighAvailability'
- 'ResilientStorage'
- 'RT'
- 'NFV'
- 'SAP'
- 'SAPHANA'
has_modules:
- 'AppStream'
- 'CRB'
structure: structure:
packages: 'os/Packages' packages: 'os/Packages'
repodata: 'os/repodata' repodata: 'os/repodata'
iso_map: iso_map:
xorrisofs: False xorrisofs: False
iso_level: False iso_level: False
hosts:
x86_64: ''
aarch64: ''
ppc64le: ''
s390x: ''
images: images:
dvd: dvd:
discnum: '1' discnum: '1'
variant: 'AppStream'
repos: repos:
- 'BaseOS' - 'BaseOS'
- 'AppStream' - 'AppStream'
lorax_variants: minimal:
- dvd isoskip: True
- minimal repos: []
- BaseOS BaseOS:
isoskip: True
variant: 'BaseOS'
repos:
- 'BaseOS'
- 'AppStream'
lorax:
repos: repos:
- 'BaseOS' - 'BaseOS'
- 'AppStream' - 'AppStream'

View File

@ -855,8 +855,8 @@ class RepoSync:
deploys extra files based on info of rlvars including a deploys extra files based on info of rlvars including a
extra_files.json extra_files.json
also deploys COMPOSE_ID and maybe in the future a metadata dir with a might also deploy COMPOSE_ID and maybe in the future a metadata dir with
bunch of compose-esque stuff. a bunch of compose-esque stuff.
""" """
cmd = self.git_cmd() cmd = self.git_cmd()
tmpclone = '/tmp/clone' tmpclone = '/tmp/clone'

View File

@ -77,7 +77,7 @@ class IsoBuild:
self.compose_base = config['compose_root'] + "/" + major self.compose_base = config['compose_root'] + "/" + major
self.iso_drop = config['compose_root'] + "/" + major + "/isos" self.iso_drop = config['compose_root'] + "/" + major + "/isos"
self.current_arch = config['arch'] self.current_arch = config['arch']
self.required_pkgs = rlvars['iso_map']['required_pkgs'] self.required_pkgs = rlvars['iso_map']['lorax']['required_pkgs']
self.mock_work_root = config['mock_work_root'] self.mock_work_root = config['mock_work_root']
self.lorax_result_root = config['mock_work_root'] + "/" + "lorax" self.lorax_result_root = config['mock_work_root'] + "/" + "lorax"
self.mock_isolation = isolation self.mock_isolation = isolation
@ -96,7 +96,7 @@ class IsoBuild:
self.minor_version = rlvars['minor'] self.minor_version = rlvars['minor']
self.revision = rlvars['revision'] + "-" + rlvars['rclvl'] self.revision = rlvars['revision'] + "-" + rlvars['rclvl']
self.rclvl = rlvars['rclvl'] self.rclvl = rlvars['rclvl']
self.repos = rlvars['iso_map']['repos'] self.repos = rlvars['iso_map']['lorax']['repos']
self.repo_base_url = config['repo_base_url'] self.repo_base_url = config['repo_base_url']
self.project_id = rlvars['project_id'] self.project_id = rlvars['project_id']
self.structure = rlvars['structure'] self.structure = rlvars['structure']
@ -273,8 +273,8 @@ class IsoBuild:
minor=self.minor_version, minor=self.minor_version,
shortname=self.shortname, shortname=self.shortname,
repos=self.repolist, repos=self.repolist,
variant=self.iso_map['variant'], variant=self.iso_map['lorax']['variant'],
lorax=self.iso_map['lorax_removes'], lorax=self.iso_map['lorax']['lorax_removes'],
distname=self.distname, distname=self.distname,
revision=self.release, revision=self.release,
rc=rclevel, rc=rclevel,
@ -411,7 +411,7 @@ class IsoBuild:
self.log.info( self.log.info(
'Copying base lorax for ' + Color.BOLD + arch + Color.END 'Copying base lorax for ' + Color.BOLD + arch + Color.END
) )
for variant in self.iso_map['lorax_variants']: for variant in self.iso_map['images']:
self._copy_lorax_to_variant(self.force_unpack, arch, variant) self._copy_lorax_to_variant(self.force_unpack, arch, variant)
self.log.info( self.log.info(
@ -424,6 +424,14 @@ class IsoBuild:
'Beginning treeinfo phase' 'Beginning treeinfo phase'
) )
for arch in arches_to_unpack:
for variant in self.iso_map['images']:
self.log.info(
'Configuring treeinfo for %s%s %s%s' % (Color.BOLD, arch, variant, Color.END)
)
self._treeinfo_wrapper(arch, variant)
def _s3_determine_latest(self): def _s3_determine_latest(self):
""" """
@ -614,7 +622,7 @@ class IsoBuild:
arches_to_unpack = [self.arch] arches_to_unpack = [self.arch]
self._sync_boot(force_unpack=self.force_unpack, arch=self.arch, image=None) self._sync_boot(force_unpack=self.force_unpack, arch=self.arch, image=None)
self.treeinfo_write(arch=self.arch) #self._treeinfo_write(arch=self.arch)
def _sync_boot(self, force_unpack, arch, image): def _sync_boot(self, force_unpack, arch, image):
""" """
@ -623,17 +631,18 @@ class IsoBuild:
self.log.info('Copying lorax to %s directory...' % image) self.log.info('Copying lorax to %s directory...' % image)
# checks here, report that it already exists # checks here, report that it already exists
def treeinfo_write(self, arch): def _treeinfo_wrapper(self, arch, variant):
""" """
Ensure treeinfo is written correctly Ensure treeinfo is written correctly based on the variant passed. Each
.treeinfo file should be configured similarly but also differently from
the next.
""" """
self.log.info('Starting treeinfo work...') image = os.path.join(self.lorax_work_dir, arch, variant)
treeinfo = os.path.join(image, '.treeinfo')
repos = self.iso_map['images'][variant]['repos']
def _treeinfo_from_lorax(self, arch, force_unpack, variant): #ti = productmd.treeinfo.TreeInfo()
""" #ti.load(treeinfo)
Fixes lorax treeinfo
"""
self.log.info('Fixing up lorax treeinfo for %s ...' % variant)
def discinfo_write(self): def discinfo_write(self):
""" """
@ -698,6 +707,13 @@ class IsoBuild:
images_to_build = [self.extra_iso] images_to_build = [self.extra_iso]
for y in images_to_build: for y in images_to_build:
if 'isoskip' in self.iso_map['images'][y] and self.iso_map['images'][y]['isoskip']:
self.log.info(
'[' + Color.BOLD + Color.YELLOW + 'WARN' + Color.END + '] ' +
'Skipping ' + y + ' image'
)
continue
for a in arches_to_build: for a in arches_to_build:
grafts = self._generate_graft_points( grafts = self._generate_graft_points(
a, a,