[kde-linux/os-autoinst-distri-kdelinux] utils: utils: archive the UEFI pflash_vars flash

Bhushan Shah <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit cd901eb954e634dcdd247b091d8b131ff026a867 by Bhushan Shah.
Committed on 29/07/2026 at 04:22.
Pushed by bshah into branch 'master'.

utils: archive the UEFI pflash_vars flash

This is used by the ovmf and systemd-boot to setup things like boot
entries, boot counter and boot ordering. Previously we used to throw it
away right after upgrading that made behavior like hiding bootloader
wrong in test suite. Fix it by archiving pflash overlay and making it
available for next job.

bootup test case will need adaption as it was built on wrong asumption.

M  +13   -1    utils/run_job.sh

https://invent.kde.org/kde-linux/os-autoinst-distri-kdelinux/-/commit/cd901eb954e634dcdd247b091d8b131ff026a867

diff --git a/utils/run_job.sh b/utils/run_job.sh
index 02b917f..364e67f 100755
--- a/utils/run_job.sh
+++ b/utils/run_job.sh
@@ -17,6 +17,7 @@ FDE=
 FLAVOR=
 AFTER=
 GROUP=
+PFLASH_PATH=/usr/share/qemu/ovmf-x86_64-4m-vars.bin
 
 while [[ $# -gt 0 ]]; do
     case "$1" in
@@ -146,6 +147,7 @@ stage_asset() {
 
 if [[ -n "$LIVE" ]]; then
     stage_asset "$LIVE"
+    stage_asset "$PFLASH_PATH"
 else
     stage_asset "$HDD"
 fi
@@ -176,6 +178,15 @@ produce_installed_hdd() {
     fi
 }
 
+produce_pflash_vars() {
+    local pflash_overlay=/var/lib/openqa/pool/1/raid/pflash-vars-overlay0
+    local pflash_factory=/var/lib/openqa/share/factory/hdd/ovmf-x86_64-4m-vars.bin
+    local tmp_pflash=/tmp/pflash-vars-overlay0
+    echo "[INFO] Updating $pflash_factory for the next job."
+    qemu-img convert -f qcow2 -O raw $pflash_overlay $tmp_pflash
+    mv $tmp_pflash $pflash_factory
+}
+
 # Clean up the pool ourselves, because we set `--no-cleanup` in the worker so we're able to
 # pre-seed the qcow2 image.
 clean_pool() {
@@ -285,7 +296,7 @@ JOB_RESPONSE=$(openqa -X POST jobs \
     BACKEND=qemu \
     UEFI=1 \
     UEFI_PFLASH_CODE=/usr/share/qemu/ovmf-x86_64-4m-code.bin \
-    UEFI_PFLASH_VARS=/usr/share/qemu/ovmf-x86_64-4m-vars.bin \
+    UEFI_PFLASH_VARS=ovmf-x86_64-4m-vars.bin \
     QEMUCPUS=4 \
     QEMURAM=4096 \
     QEMUCPU=host \
@@ -320,6 +331,7 @@ poll_openqa_job "$JOB_ID" "$OPENQA_HOST_ADDR" || poll_retcode=$?
 if [[ "$poll_retcode" -ne 1 ]]; then
     if [[ -n "$LIVE" || "$UPGRADE" -eq 1 ]]; then
         produce_installed_hdd "$(basename "$HDD")"
+        produce_pflash_vars
     fi
     clean_pool
 fi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.