From ce56ab829c330aeb13a22d83c6f4e63f6e9476b1 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 4 Sep 2024 11:44:57 -0700 Subject: [PATCH] Add ELN support and an ELN minimal x86_64 image Signed-off-by: Adam Williamson --- createhdds.py | 18 +++++++++++------- hdds.json | 3 ++- minimal-eln.ks | 16 ++++++++++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 minimal-eln.ks diff --git a/createhdds.py b/createhdds.py index 10ec09f..5b36c89 100755 --- a/createhdds.py +++ b/createhdds.py @@ -208,12 +208,12 @@ class VirtInstallImage(object): maximum age of the image file (in days) - if the image is older than this, 'check' will report it as 'outdated' and 'all' will rebuild it. 'bootopts' are used to pass boot options to the - virtual image to provide better control of the VM. 'branched' - and 'rawhide' are flags for whether this is a branched or Rawhide - release (which affects the paths). + virtual image to provide better control of the VM. 'branched', + 'rawhide' and 'eln' are flags for whether this is a branched, + Rawhide or ELN release (which affects the paths). """ 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.size = size self.filename = "disk_f{0}_{1}".format(str(release), name) @@ -234,6 +234,7 @@ class VirtInstallImage(object): self.bootopts = bootopts self.rawhide = rawhide self.branched = branched + self.eln = eln @property def kickstart_file(self): @@ -315,6 +316,8 @@ class VirtInstallImage(object): # rawhide and branched locations at present if self.rawhide: 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: loctmp = "https://dl.fedoraproject.org/pub/{0}/development/{1}/{2}/{3}/os/" else: @@ -509,6 +512,7 @@ def get_virtinstall_images(imggrp, nextrel=None, releases=None): for (release, arches) in releases.items(): branched = release.lower() == 'branched' rawhide = release.lower() == 'rawhide' + eln = release.lower() == 'eln' if branched: # find Branched, if it exists 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': # this means "all current stable releases" 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' # -1 is CURRREL, -2 is PREVREL if not nextrel: nextrel = fedfind.helpers.get_current_release() + 1 rels = [int(nextrel) + int(release)] else: - # assume a single integer release number + # assume a single integer release number, or 'eln' rels = [release] for arch in arches: for rel in rels: @@ -540,7 +544,7 @@ def get_virtinstall_images(imggrp, nextrel=None, releases=None): # using a dict here avoids dupes imgs[key] = VirtInstallImage(name, rel, arch, variant=variant, size=size, imgver=imgver, maxage=maxage, bootopts=bootopts, - branched=branched, rawhide=rawhide) + branched=branched, rawhide=rawhide, eln=eln) return list(imgs.values()) def get_all_images(hdds, nextrel=None): diff --git a/hdds.json b/hdds.json index f6b35bf..5549867 100644 --- a/hdds.json +++ b/hdds.json @@ -136,7 +136,8 @@ "-2" : ["x86_64", "aarch64", "ppc64le"], "stable": ["x86_64", "aarch64"], "branched": ["x86_64", "aarch64"], - "rawhide": ["x86_64"] + "rawhide": ["x86_64"], + "eln": ["x86_64"] }, "size" : "10", "imgver": "4", diff --git a/minimal-eln.ks b/minimal-eln.ks new file mode 100644 index 0000000..3cc802e --- /dev/null +++ b/minimal-eln.ks @@ -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