Update guestfs-tools firstboot.bat to match virt-v2v

resolves: RHEL-109521
This commit is contained in:
Richard W.M. Jones 2025-08-15 17:01:55 +01:00
parent f38e293dda
commit a5963ff35d
2 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,51 @@
From 6fc2e63a599311eeff6f02588b9a8f7851141483 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 15 Aug 2025 16:58:08 +0100
Subject: [PATCH] Update common submodule
Pick up the commit below, to ensure that the firstboot.bat file we
inject into Windows is the same as the one from virt-v2v.
commit b40e534fefb74af32bd496904e44ce9bca1a7b34
Author: Vadim Rozenfeld <vrozenfe@redhat.com>
Date: Thu Jul 10 10:48:04 2025 +1000
Modify the firstboot script to check the scripts
execution return status
Related: https://issues.redhat.com/browse/RHEL-100682
Signed-off-by: Vadim Rozenfeld <vrozenfe@redhat.com>
Fixes: https://issues.redhat.com/browse/RHEL-109521
---
common | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Submodule common 31d279a79..6a822ba7b:
diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml
index 52e76401e..aa3ea98ad 100644
--- a/common/mlcustomize/firstboot.ml
+++ b/common/mlcustomize/firstboot.ml
@@ -305,13 +305,19 @@ if not exist \"%%scripts_done%%\" (
:: Pick the next script to run.
for %%%%f in (\"%%scripts%%\"\\*.bat) do (
echo running \"%%%%f\"
- move \"%%%%f\" \"%%scripts_done%%\"
- pushd \"%%scripts_done%%\"
+ pushd \"%%scripts%%\"
call \"%%%%~nf\"
set elvl=!errorlevel!
echo .... exit code !elvl!
popd
+ if !elvl! NEQ 249 (
+ echo Script succeeded, moving to scripts-done
+ move \"%%%%f\" \"%%scripts_done%%\"
+ ) else (
+ echo Script failed, will retry on next boot
+ )
+
:: Reboot the computer. This is necessary to free any locked
:: files which may prevent later scripts from running.
shutdown /r /t 0 /y

View File

@ -19,7 +19,7 @@
Summary: Tools to access and modify virtual machine disk images
Name: guestfs-tools
Version: 1.52.2
Release: 5%{?dist}
Release: 6%{?dist}
License: GPL-2.0-or-later AND LGPL-2.0-or-later
# Build only for architectures that have a kernel
@ -58,6 +58,7 @@ Patch0007: 0007-test-data-phony-fedora-Add-simple-static-bin-sh.patch
Patch0008: 0008-drivers-Handle-large-output-from-rpm-ql-command.patch
Patch0009: 0009-Update-common-submodule.patch
Patch0010: 0010-builder-Update-link-to-templates-to-use-https.patch
Patch0011: 0011-Update-common-submodule.patch
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool, gettext-devel
@ -415,6 +416,10 @@ end
%changelog
* Fri Aug 15 2025 Richard W.M. Jones <rjones@redhat.com> - 1.52.2-6
- Update guestfs-tools firstboot.bat to match virt-v2v
resolves: RHEL-109521
* Tue Jun 10 2025 Richard W.M. Jones <rjones@redhat.com> - 1.52.2-5
- builder: Update link to templates to use https
resolves: RHEL-94874