Add tests to build a Silverblue installer image and install it
This is like the existing tests that build network install and
live images then install them, only for Silverblue. First we
build an ostree, using the standard configuration for the release
and subvariant but with the 'advisory' and 'workarounds' repos
included, so it will contain current stable packages plus the
packages from the update and any workarounds. Then we build an
ostree installer image with the ostree embedded, again including
advisory and workarounds repos in the installer build config so
packages from them will be included in the installer environment.
The image is uploaded, which completes the _ostree_build test.
Then an install_default_update_ostree test runs, which does a
standard install and boot from the installer image.
We do make a change that affects other tests, too. We now run
_advisory_post on live image install tests, as well as this new
ostree install image install test. It was skipped before because
of an exception that's really only needed for the netinst image
install test. In that test, packages from the update won't be
included in the installed system, so we can't run _advisory_post
on it. But for ostree and live image build/install tests, the
installed system *should* include packages from the update, so
we should check and make sure that it does.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-07-22 19:22:19 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
import re
|
|
|
|
import sys
|
|
|
|
|
|
|
|
# the "current" base platform version, i.e. the one that the GNOME
|
|
|
|
# app builds currently tagged "stable" need
|
|
|
|
BASEVER = "37"
|
|
|
|
# a regex to find where we replace that
|
|
|
|
BASEPATT = re.compile(r"(runtime/org.fedoraproject.Platform/.*?/f)(\d+)")
|
|
|
|
|
|
|
|
flavor = sys.argv[1]
|
|
|
|
arch = sys.argv[2]
|
|
|
|
|
|
|
|
started = 0
|
|
|
|
finished = 0
|
|
|
|
ostree = ""
|
|
|
|
with open("fedora.conf", "r") as conffh:
|
|
|
|
for line in conffh.readlines():
|
|
|
|
if line == "ostree_installer = [\n":
|
|
|
|
started = 1
|
|
|
|
if started and not finished:
|
|
|
|
ostree += line
|
|
|
|
if started and line == "]\n":
|
|
|
|
finished = 1
|
|
|
|
# don't do this at home, kids!
|
|
|
|
exec(ostree)
|
|
|
|
|
|
|
|
for (gotflav, dic) in ostree_installer:
|
|
|
|
if flavor in gotflav.lower():
|
|
|
|
args = dic[arch]
|
|
|
|
break
|
|
|
|
|
|
|
|
cmd = "--rootfs-size=" + args["rootfs_size"]
|
|
|
|
for addtemp in args["add_template"]:
|
|
|
|
cmd += f" --add-template=/fedora-lorax-templates/{addtemp}"
|
|
|
|
for addtempvar in args["add_template_var"]:
|
|
|
|
# this changes e.g. "runtime/org.fedoraproject.Platform/x86_64/f35"
|
|
|
|
# to "runtime/org.fedoraproject.Platform/x86_64/f37" , if BASEVER
|
|
|
|
# is "37"
|
|
|
|
addtempvar = BASEPATT.sub(r"\g<1>" + BASEVER, addtempvar)
|
|
|
|
cmd += f" --add-template-var=\"{addtempvar}\""
|
|
|
|
|
|
|
|
# this is where the previous step of the openQA test created the
|
|
|
|
# ostree repo
|
2022-12-03 20:36:52 +00:00
|
|
|
cmd = cmd.replace("https://kojipkgs.fedoraproject.org/compose/ostree/repo/", "file:///var/tmp/ostree/repo")
|
Add tests to build a Silverblue installer image and install it
This is like the existing tests that build network install and
live images then install them, only for Silverblue. First we
build an ostree, using the standard configuration for the release
and subvariant but with the 'advisory' and 'workarounds' repos
included, so it will contain current stable packages plus the
packages from the update and any workarounds. Then we build an
ostree installer image with the ostree embedded, again including
advisory and workarounds repos in the installer build config so
packages from them will be included in the installer environment.
The image is uploaded, which completes the _ostree_build test.
Then an install_default_update_ostree test runs, which does a
standard install and boot from the installer image.
We do make a change that affects other tests, too. We now run
_advisory_post on live image install tests, as well as this new
ostree install image install test. It was skipped before because
of an exception that's really only needed for the netinst image
install test. In that test, packages from the update won't be
included in the installed system, so we can't run _advisory_post
on it. But for ostree and live image build/install tests, the
installed system *should* include packages from the update, so
we should check and make sure that it does.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-07-22 19:22:19 +00:00
|
|
|
|
|
|
|
print(cmd)
|