mirror of
https://github.com/rocky-linux/createhdds.git
synced 2024-12-22 10:08:30 +00:00
Build desktop images for aarch64 upgrade tests
We want to run the desktop upgrade tests on aarch64; to do that, we need the required base images to be built. We also need to do the `console=tty0 quiet` boot args for the desktopencrypt image so the decrypt prompt is visible on boot; to handle this, we extend the existing hack for using a release-specific ks to be more generic and allow for a more specific kickstart by arch, release or both. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
5b3cf53c25
commit
dc500293d1
@ -23,6 +23,7 @@ import argparse
|
|||||||
import logging
|
import logging
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import os.path
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
@ -227,6 +228,26 @@ class VirtInstallImage(object):
|
|||||||
self.variant = "Everything"
|
self.variant = "Everything"
|
||||||
self.bootopts = bootopts
|
self.bootopts = bootopts
|
||||||
|
|
||||||
|
@property
|
||||||
|
def kickstart_file(self):
|
||||||
|
"""Find the most specific kickstart file to use for a given
|
||||||
|
name, release and arch. Order of preference:
|
||||||
|
* name-release-arch.ks
|
||||||
|
* name-release.ks
|
||||||
|
* name-arch.ks
|
||||||
|
* name.ks
|
||||||
|
"""
|
||||||
|
cands = [
|
||||||
|
f"{self.name}-{self.release}-{self.arch}.ks",
|
||||||
|
f"{self.name}-{self.release}.ks",
|
||||||
|
f"{self.name}-{self.arch}.ks",
|
||||||
|
f"{self.name}.ks"
|
||||||
|
]
|
||||||
|
for cand in cands:
|
||||||
|
if os.path.isfile("/".join((SCRIPTDIR, cand))):
|
||||||
|
logger.debug("Using kickstart %s", cand)
|
||||||
|
return cand
|
||||||
|
|
||||||
def create(self, textinst, retries=3):
|
def create(self, textinst, retries=3):
|
||||||
"""Create the image."""
|
"""Create the image."""
|
||||||
if self.arch not in supported_arches():
|
if self.arch not in supported_arches():
|
||||||
@ -292,14 +313,8 @@ class VirtInstallImage(object):
|
|||||||
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:
|
||||||
loctmp = "https://download.fedoraproject.org/pub/{0}/releases/{1}/{2}/{3}/os/"
|
loctmp = "https://download.fedoraproject.org/pub/{0}/releases/{1}/{2}/{3}/os/"
|
||||||
ksfile = "{0}.ks".format(self.name)
|
ksfile = self.kickstart_file
|
||||||
if str(self.release) == "33" and self.name == "kde":
|
|
||||||
# FIXME: icky hack for https://bugzilla.redhat.com/show_bug.cgi?id=1960458
|
|
||||||
# would be good to improve this, otherwise drop it when F33 is EOL
|
|
||||||
ksfile = "{0}-{1}.ks".format(self.name, str(self.release))
|
|
||||||
xargs = "inst.ks=file:/{0}".format(ksfile)
|
xargs = "inst.ks=file:/{0}".format(ksfile)
|
||||||
if str(self.release) == "33" and self.name == "kde":
|
|
||||||
xargs = "inst.ks=file:/{0}-{1}.ks".format(self.name, str(self.release))
|
|
||||||
args = ["virt-install", "--disk", "size={0},path={1}".format(self.size, tmpfile),
|
args = ["virt-install", "--disk", "size={0},path={1}".format(self.size, tmpfile),
|
||||||
"--os-variant", shortid, "-x", xargs, "--initrd-inject",
|
"--os-variant", shortid, "-x", xargs, "--initrd-inject",
|
||||||
"{0}/{1}".format(SCRIPTDIR, ksfile), "--location",
|
"{0}/{1}".format(SCRIPTDIR, ksfile), "--location",
|
||||||
|
18
desktopencrypt-aarch64.ks
Normal file
18
desktopencrypt-aarch64.ks
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
bootloader --location=mbr --append="console=tty0 quiet"
|
||||||
|
network --bootproto=dhcp
|
||||||
|
url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
|
||||||
|
repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
|
||||||
|
lang en_US.UTF-8
|
||||||
|
keyboard us
|
||||||
|
timezone --utc America/New_York
|
||||||
|
clearpart --all
|
||||||
|
autopart --encrypted --passphrase=weakpassword
|
||||||
|
rootpw --plaintext weakpassword
|
||||||
|
user --name=test --password=weakpassword --plaintext
|
||||||
|
firstboot --enable
|
||||||
|
poweroff
|
||||||
|
|
||||||
|
%packages
|
||||||
|
@^workstation-product-environment
|
||||||
|
-selinux-policy-minimum
|
||||||
|
%end
|
10
hdds.json
10
hdds.json
@ -149,9 +149,9 @@
|
|||||||
{
|
{
|
||||||
"name" : "desktop",
|
"name" : "desktop",
|
||||||
"releases" : {
|
"releases" : {
|
||||||
"-1" : ["aarch64", "ppc64le"],
|
"-1" : ["ppc64le"],
|
||||||
"stable" : ["x86_64"],
|
"stable" : ["x86_64", "aarch64"],
|
||||||
"branched": ["x86_64"]
|
"branched": ["x86_64", "aarch64"]
|
||||||
},
|
},
|
||||||
"size" : "20",
|
"size" : "20",
|
||||||
"imgver": "4",
|
"imgver": "4",
|
||||||
@ -160,8 +160,8 @@
|
|||||||
{
|
{
|
||||||
"name" : "desktopencrypt",
|
"name" : "desktopencrypt",
|
||||||
"releases" : {
|
"releases" : {
|
||||||
"stable" : ["x86_64"],
|
"stable" : ["x86_64", "aarch64"],
|
||||||
"branched" : ["x86_64"]
|
"branched" : ["x86_64", "aarch64"]
|
||||||
},
|
},
|
||||||
"size" : "20",
|
"size" : "20",
|
||||||
"variant": "Workstation"
|
"variant": "Workstation"
|
||||||
|
Loading…
Reference in New Issue
Block a user