1
0
mirror of https://pagure.io/fedora-qa/createhdds.git synced 2024-11-21 23:03:08 +00:00

Add ELN support and an ELN minimal x86_64 image

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2024-09-04 11:44:57 -07:00
parent 5b21872830
commit ce56ab829c
3 changed files with 29 additions and 8 deletions

View File

@ -208,12 +208,12 @@ class VirtInstallImage(object):
maximum age of the image file (in days) - if the image is older maximum age of the image file (in days) - if the image is older
than this, 'check' will report it as 'outdated' and 'all' will than this, 'check' will report it as 'outdated' and 'all' will
rebuild it. 'bootopts' are used to pass boot options to the rebuild it. 'bootopts' are used to pass boot options to the
virtual image to provide better control of the VM. 'branched' virtual image to provide better control of the VM. 'branched',
and 'rawhide' are flags for whether this is a branched or Rawhide 'rawhide' and 'eln' are flags for whether this is a branched,
release (which affects the paths). Rawhide or ELN release (which affects the paths).
""" """
def __init__(self, name, release, arch, size, variant=None, imgver='', maxage=3, def __init__(self, name, release, arch, size, variant=None, imgver='', maxage=3,
bootopts=None, branched=False, rawhide=False): bootopts=None, branched=False, rawhide=False, eln=False):
self.name = name self.name = name
self.size = size self.size = size
self.filename = "disk_f{0}_{1}".format(str(release), name) self.filename = "disk_f{0}_{1}".format(str(release), name)
@ -234,6 +234,7 @@ class VirtInstallImage(object):
self.bootopts = bootopts self.bootopts = bootopts
self.rawhide = rawhide self.rawhide = rawhide
self.branched = branched self.branched = branched
self.eln = eln
@property @property
def kickstart_file(self): def kickstart_file(self):
@ -315,6 +316,8 @@ class VirtInstallImage(object):
# rawhide and branched locations at present # rawhide and branched locations at present
if self.rawhide: if self.rawhide:
loctmp = "https://dl.fedoraproject.org/pub/{0}/development/rawhide/{2}/{3}/os" loctmp = "https://dl.fedoraproject.org/pub/{0}/development/rawhide/{2}/{3}/os"
elif self.eln:
loctmp = "https://dl.fedoraproject.org/pub/eln/BaseOS/{3}/os"
elif self.branched: elif self.branched:
loctmp = "https://dl.fedoraproject.org/pub/{0}/development/{1}/{2}/{3}/os/" loctmp = "https://dl.fedoraproject.org/pub/{0}/development/{1}/{2}/{3}/os/"
else: else:
@ -509,6 +512,7 @@ def get_virtinstall_images(imggrp, nextrel=None, releases=None):
for (release, arches) in releases.items(): for (release, arches) in releases.items():
branched = release.lower() == 'branched' branched = release.lower() == 'branched'
rawhide = release.lower() == 'rawhide' rawhide = release.lower() == 'rawhide'
eln = release.lower() == 'eln'
if branched: if branched:
# find Branched, if it exists # find Branched, if it exists
curr = fedfind.helpers.get_current_release(branched=False) curr = fedfind.helpers.get_current_release(branched=False)
@ -525,14 +529,14 @@ def get_virtinstall_images(imggrp, nextrel=None, releases=None):
elif release.lower() == 'stable': elif release.lower() == 'stable':
# this means "all current stable releases" # this means "all current stable releases"
rels = fedfind.helpers.get_current_stables() rels = fedfind.helpers.get_current_stables()
elif release != 'rawhide' and int(release) < 0: elif release not in ('rawhide', 'eln') and int(release) < 0:
# negative release indicates 'relative to next release' # negative release indicates 'relative to next release'
# -1 is CURRREL, -2 is PREVREL # -1 is CURRREL, -2 is PREVREL
if not nextrel: if not nextrel:
nextrel = fedfind.helpers.get_current_release() + 1 nextrel = fedfind.helpers.get_current_release() + 1
rels = [int(nextrel) + int(release)] rels = [int(nextrel) + int(release)]
else: else:
# assume a single integer release number # assume a single integer release number, or 'eln'
rels = [release] rels = [release]
for arch in arches: for arch in arches:
for rel in rels: for rel in rels:
@ -540,7 +544,7 @@ def get_virtinstall_images(imggrp, nextrel=None, releases=None):
# using a dict here avoids dupes # using a dict here avoids dupes
imgs[key] = VirtInstallImage(name, rel, arch, variant=variant, size=size, imgs[key] = VirtInstallImage(name, rel, arch, variant=variant, size=size,
imgver=imgver, maxage=maxage, bootopts=bootopts, imgver=imgver, maxage=maxage, bootopts=bootopts,
branched=branched, rawhide=rawhide) branched=branched, rawhide=rawhide, eln=eln)
return list(imgs.values()) return list(imgs.values())
def get_all_images(hdds, nextrel=None): def get_all_images(hdds, nextrel=None):

View File

@ -136,7 +136,8 @@
"-2" : ["x86_64", "aarch64", "ppc64le"], "-2" : ["x86_64", "aarch64", "ppc64le"],
"stable": ["x86_64", "aarch64"], "stable": ["x86_64", "aarch64"],
"branched": ["x86_64", "aarch64"], "branched": ["x86_64", "aarch64"],
"rawhide": ["x86_64"] "rawhide": ["x86_64"],
"eln": ["x86_64"]
}, },
"size" : "10", "size" : "10",
"imgver": "4", "imgver": "4",

16
minimal-eln.ks Normal file
View File

@ -0,0 +1,16 @@
bootloader --location=mbr
network --bootproto=dhcp
# FIXME: use mirrorlist when https://github.com/fedora-infra/mirrormanager2/issues/382 is done
url --url=https://dl.fedoraproject.org/pub/eln/BaseOS/$basearch/os/
repo --name=appstream --baseurl=https://dl.fedoraproject.org/pub/eln/AppStream/$basearch/os/
lang en_US.UTF-8
keyboard us
timezone --utc America/New_York
clearpart --all
autopart
rootpw weakpassword
poweroff
%packages
@core
%end