diff --git a/0001-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch b/0001-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch index 801f617..e59d4e9 100644 --- a/0001-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch +++ b/0001-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch @@ -1,4 +1,4 @@ -From e827be5bb317f3d50086e2987ee88cd931e1f1b1 Mon Sep 17 00:00:00 2001 +From dd696d00b4de2d255d66565b7207e04070656585 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 7 Jul 2015 09:28:03 -0400 Subject: [PATCH] RHEL: Reject use of libguestfs-winsupport features except for diff --git a/0002-RHEL-builder-Disable-opensuse-repository.patch b/0002-RHEL-builder-Disable-opensuse-repository.patch index de0f328..d2b1a45 100644 --- a/0002-RHEL-builder-Disable-opensuse-repository.patch +++ b/0002-RHEL-builder-Disable-opensuse-repository.patch @@ -1,4 +1,4 @@ -From 6738e0638a0997e4551292eec91baf07ad0cefdc Mon Sep 17 00:00:00 2001 +From c1261a19aa4cd137f2d2c34c3640d971bb62bcb4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 21 Nov 2022 13:03:22 +0000 Subject: [PATCH] RHEL: builder: Disable opensuse repository diff --git a/0003-customize-Implement-inject-blnsvr-operation.patch b/0003-customize-Implement-inject-blnsvr-operation.patch index ff7ae18..2c4bb5d 100644 --- a/0003-customize-Implement-inject-blnsvr-operation.patch +++ b/0003-customize-Implement-inject-blnsvr-operation.patch @@ -1,4 +1,4 @@ -From 566e21933505606a64fe6e7c154ffb90209e7101 Mon Sep 17 00:00:00 2001 +From d3153501860dd9327cdd9c9f5ead0883918b0643 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 16 May 2024 12:49:24 +0100 Subject: [PATCH] customize: Implement --inject-blnsvr operation @@ -12,7 +12,7 @@ libguestfs, and the implementation of Inject_virtio_win.inject_blnsvr. customize/customize_run.ml | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) -Submodule common 93a7f3af5..830cbdcf4: +Submodule common 7cbb3ba35...a78839676: diff --git a/common/mlcustomize/customize-options.pod b/common/mlcustomize/customize-options.pod index ff93630d8..b2ac57526 100644 --- a/common/mlcustomize/customize-options.pod @@ -108,7 +108,7 @@ index 51a156eae..ee62961a1 100644 (* --inject-qemu-ga METHOD *) | `InjectVirtioWin of string diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml -index 2a30b2008..4e0ed0e0e 100644 +index 0a4b8dac0..afec1e456 100644 --- a/common/mlcustomize/inject_virtio_win.ml +++ b/common/mlcustomize/inject_virtio_win.ml @@ -24,6 +24,8 @@ open Common_gettext.Gettext @@ -120,12 +120,19 @@ index 2a30b2008..4e0ed0e0e 100644 type t = { g : Guestfs.guestfs; (** guestfs handle *) -@@ -267,6 +269,18 @@ and inject_qemu_ga t = - configure_qemu_ga t msi_files; +@@ -274,6 +276,25 @@ and inject_qemu_ga ({ g; root } as t) = + configure_qemu_ga t tempdir_win msi_files; msi_files <> [] (* return true if we found some qemu-ga MSI files *) -+and inject_blnsvr t = -+ let files = copy_blnsvr t in ++and inject_blnsvr ({ g; root } as t) = ++ (* Copy the files to the guest. *) ++ let dir, dir_win = Firstboot.firstboot_dir g root in ++ let dir_win = Option.value dir_win ~default:dir in ++ let tempdir = sprintf "%s/Temp" dir in ++ let tempdir_win = sprintf "%s\\Temp" dir_win in ++ g#mkdir_p tempdir; ++ ++ let files = copy_blnsvr t tempdir in + match files with + | [] -> false (* Didn't find or install anything. *) + @@ -133,25 +140,50 @@ index 2a30b2008..4e0ed0e0e 100644 + * drivers/by-driver). Pick the first. + *) + | blnsvr :: _ -> -+ configure_blnsvr t blnsvr; ++ configure_blnsvr t tempdir_win blnsvr; + true + and add_guestor_to_registry t ((g, root) as reg) drv_name drv_pciid = let ddb_node = g#hivex_node_get_child root "DriverDatabase" in -@@ -351,6 +365,11 @@ and copy_qemu_ga t = +@@ -358,6 +379,11 @@ and copy_qemu_ga t tempdir = (fun () -> error (f_"root directory ‘/’ is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log.")) -+and copy_blnsvr t = -+ copy_from_virtio_win t "/" "/" (virtio_iso_path_matches_blnsvr t) ++and copy_blnsvr t tempdir = ++ copy_from_virtio_win t "/" tempdir (virtio_iso_path_matches_blnsvr t) + (fun () -> + error (f_"root directory ‘/’ is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log.")) + (* Copy all files from virtio_win directory/ISO located in [srcdir] * subdirectory and all its subdirectories to the [destdir]. The directory * hierarchy is not preserved, meaning all files will be directly in [destdir]. -@@ -513,6 +532,10 @@ and virtio_iso_path_matches_qemu_ga t path = +@@ -452,10 +478,7 @@ and virtio_iso_path_matches_guest_os t path = + * "./drivers/amd64/Win2012R2/netkvm.sys". + * Note we check lowercase paths. + *) +- let pathelem elem = +- String.find lc_path ("/" ^ elem ^ "/") >= 0 || +- String.is_prefix lc_path (elem ^ "/") +- in ++ let pathelem elem = String.find lc_path ("/" ^ elem ^ "/") >= 0 in + let p_arch = + if pathelem "x86" || pathelem "i386" then "i386" + else if pathelem "amd64" then "x86_64" +@@ -499,11 +522,7 @@ and virtio_iso_path_matches_guest_os t path = + else + raise Not_found in + +- let p_sriov = pathelem "sriov" in +- +- arch = p_arch && +- not p_sriov && (* always ignored, see RHEL-56383 *) +- os_major = p_os_major && os_minor = p_os_minor && ++ arch = p_arch && os_major = p_os_major && os_minor = p_os_minor && + match_os_variant os_variant && + match_osinfo osinfo + +@@ -527,6 +546,10 @@ and virtio_iso_path_matches_qemu_ga t path = | ("x86_64", "rhev-qga64.msi") -> true | _ -> false @@ -162,17 +194,17 @@ index 2a30b2008..4e0ed0e0e 100644 (* Look up in libosinfo for the OS, and copy all the locally * available files specified as drivers for that OS to the [destdir]. * -@@ -586,3 +609,10 @@ and configure_qemu_ga t files = - Firstboot.add_firstboot_powershell t.g t.root - (sprintf "install-%s.ps1" msi_path) !psh_script; - ) files +@@ -591,3 +614,10 @@ and configure_qemu_ga t tempdir_win files = + ) files; + + Firstboot.add_firstboot_powershell t.g t.root "install-qemu-ga" !script + -+and configure_blnsvr t blnsvr = ++and configure_blnsvr t tempdir_win blnsvr = + let cmd = sprintf "\ + @echo off\n\ + echo Installing %s\n\ -+ c:\\%s -i\n" blnsvr blnsvr in -+ Firstboot.add_firstboot_script t.g t.root (sprintf "install-%s" blnsvr) cmd ++ \"%s\\%s\" -i\n" blnsvr tempdir_win blnsvr in ++ Firstboot.add_firstboot_script t.g t.root "install-blnsvr" cmd diff --git a/common/mlcustomize/inject_virtio_win.mli b/common/mlcustomize/inject_virtio_win.mli index d14f04973..d273c4dd3 100644 --- a/common/mlcustomize/inject_virtio_win.mli diff --git a/0004-Update-common-submodule.patch b/0004-Update-common-submodule.patch deleted file mode 100644 index 3189ae8..0000000 --- a/0004-Update-common-submodule.patch +++ /dev/null @@ -1,344 +0,0 @@ -From f59b4fcf683f449a7dd1cad3c168f536cc10304a Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 6 Aug 2024 08:51:29 +0100 -Subject: [PATCH] Update common submodule - -Considerable changes have been made in virt-v2v to how powershell -scripts are run in Windows guests, and to qemu-ga installation (also -for Windows). This pulls in the following commits: - -Richard W.M. Jones (10): - mlcustomize: firstboot: Use Linux path for Powershell script path - mlcustomize: firstboot: Use powershell.exe instead of path - mlcustomize: firstboot: Use Powershell -NoProfile flag - mlcustomize: Revert delay installation of qemu-ga MSI - mldrivers/linux_kernels.ml: Prefix general information with ^info: - mlcustomize: Use Start-Process -Wait to run qemu-ga installer - mlcustomize: Add Firstboot.firstboot_dir function - mlcustomize: Place powershell scripts into \Temp - mlcustomize: Inject qemu-ga & blnsvr into /Temp - mlcustomize: Write qemu-ga log file name to log.txt - -(cherry picked from commit b8d57760ea9c9d3ec7a21ee41d74731ab81173df) ---- - common | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Submodule common 830cbdcf4..7b84a370e: -diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml -index 5dc012340..3bbba714d 100644 ---- a/common/mlcustomize/firstboot.ml -+++ b/common/mlcustomize/firstboot.ml -@@ -239,7 +239,22 @@ WantedBy=%s - end - - module Windows = struct -- let rec install_service (g : Guestfs.guestfs) root = -+ (* Create and return the firstboot directory. *) -+ let create_firstboot_dir (g : Guestfs.guestfs) = -+ let rec loop firstboot_dir firstboot_dir_win = function -+ | [] -> firstboot_dir, firstboot_dir_win -+ | dir :: path -> -+ let firstboot_dir = -+ if firstboot_dir = "" then "/" ^ dir else firstboot_dir // dir in -+ let firstboot_dir_win = firstboot_dir_win ^ "\\" ^ dir in -+ let firstboot_dir = g#case_sensitive_path firstboot_dir in -+ g#mkdir_p firstboot_dir; -+ loop firstboot_dir firstboot_dir_win path -+ in -+ loop "" "C:" ["Program Files"; "Guestfs"; "Firstboot"] -+ -+ let rec install_service (g : Guestfs.guestfs) root -+ firstboot_dir firstboot_dir_win = - (* Either rhsrvany.exe or pvvxsvc.exe must exist. - * - * (Check also that it's not a dangling symlink but a real file). -@@ -254,20 +269,7 @@ module Windows = struct - error (f_"One of rhsrvany.exe or pvvxsvc.exe is missing in %s. One of them is required in order to install Windows firstboot scripts. You can get one by building rhsrvany (https://github.com/rwmjones/rhsrvany)") - (virt_tools_data_dir ()) in - -- (* Create a directory for firstboot files in the guest. *) -- let firstboot_dir, firstboot_dir_win = -- let rec loop firstboot_dir firstboot_dir_win = function -- | [] -> firstboot_dir, firstboot_dir_win -- | dir :: path -> -- let firstboot_dir = -- if firstboot_dir = "" then "/" ^ dir else firstboot_dir // dir in -- let firstboot_dir_win = firstboot_dir_win ^ "\\" ^ dir in -- let firstboot_dir = g#case_sensitive_path firstboot_dir in -- g#mkdir_p firstboot_dir; -- loop firstboot_dir firstboot_dir_win path -- in -- loop "" "C:" ["Program Files"; "Guestfs"; "Firstboot"] in -- -+ (* Create a directory for firstboot scripts in the guest. *) - g#mkdir_p (firstboot_dir // "scripts"); - - (* Copy pvvxsvc or rhsrvany to the guest. *) -@@ -339,11 +341,25 @@ echo uninstalling firstboot service - "PWD", REG_SZ firstboot_dir_win ]; - ] in - reg_import reg regedits -- ); -- -- firstboot_dir -+ ) - end - -+let firstboot_dir (g : Guestfs.guestfs) root = -+ let typ = g#inspect_get_type root in -+ -+ match typ with -+ | "linux" -> -+ let dir = Linux.firstboot_dir in -+ g#mkdir_p dir; -+ dir, None -+ -+ | "windows" -> -+ let dir, dir_win = Windows.create_firstboot_dir g in -+ dir, Some dir_win -+ -+ | _ -> -+ error (f_"guest type %s is not supported") typ -+ - let script_count = ref 0 - - let add_firstboot_script (g : Guestfs.guestfs) root ?(prio = 5000) name -@@ -363,7 +379,8 @@ let add_firstboot_script (g : Guestfs.guestfs) root ?(prio = 5000) name - g#chmod 0o755 filename - - | "windows", _ -> -- let firstboot_dir = Windows.install_service g root in -+ let firstboot_dir, firstboot_dir_win = Windows.create_firstboot_dir g in -+ Windows.install_service g root firstboot_dir firstboot_dir_win; - let filename = firstboot_dir // "scripts" // filename ^ ".bat" in - g#write filename (String.unix2dos content) - -@@ -382,21 +399,18 @@ let add_firstboot_powershell g root ?prio name code = - *) - assert (g#inspect_get_type root = "windows"); - -- let windows_systemroot = g#inspect_get_windows_systemroot root in -- -- (* Create the temporary directory to put the Powershell file. *) -- let tempdir = sprintf "%s/Temp" windows_systemroot in -+ (* Place the Powershell script into firstboot_dir/Temp *) -+ let firstboot_dir, firstboot_dir_win = Windows.create_firstboot_dir g in -+ let tempdir = sprintf "%s/Temp" firstboot_dir in - g#mkdir_p tempdir; -+ -+ let ps_path = sprintf "%s/%s.ps1" tempdir name in -+ let ps_path_win = sprintf "%s\\Temp\\%s.ps1" firstboot_dir_win name in - let code = String.concat "\r\n" code ^ "\r\n" in -- g#write (sprintf "%s/%s" tempdir name) code; -+ g#write ps_path code; - -- (* Powershell interpreter. Should we check this exists? XXX *) -- let ps_exe = -- windows_systemroot ^ -- "\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" in -- -- (* Windows path to the Powershell script. *) -- let ps_path = windows_systemroot ^ "\\Temp\\" ^ name in -- -- let fb = sprintf "%s -ExecutionPolicy ByPass -file %s" ps_exe ps_path in -+ (* Create a regular firstboot bat that just invokes powershell *) -+ let fb = -+ sprintf "powershell.exe -ExecutionPolicy ByPass -NoProfile -file \"%s\"" -+ ps_path_win in - add_firstboot_script g root ?prio name fb -diff --git a/common/mlcustomize/firstboot.mli b/common/mlcustomize/firstboot.mli -index 8231af658..34ff06901 100644 ---- a/common/mlcustomize/firstboot.mli -+++ b/common/mlcustomize/firstboot.mli -@@ -16,6 +16,23 @@ - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -+val firstboot_dir : Guestfs.guestfs -> string -> string * string option -+(** [firstboot_dir g root] -+ returns the path of the firstboot directory, creating it in -+ the guest if necessary. -+ -+ This returns the name of the directory as a guestfs path, and -+ optionally the name as a Windows path (only for Windows guests). -+ -+ For Linux this could be [/usr/lib/virt-sysprep, None] -+ -+ For Windows this could be ["/Program Files/Guestfs/Firstboot", -+ Some "C:\Program Files\Guestfs\Firstboot"] -+ -+ Additional files that are used during firstboot can be placed -+ in this directory, but be careful not to conflict with files -+ and scripts added by the firstboot process itself. *) -+ - val add_firstboot_script : Guestfs.guestfs -> string -> ?prio:int -> string -> - string -> unit - (** [add_firstboot_script g root prio name content] adds a firstboot -diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml -index 4e0ed0e0e..afec1e456 100644 ---- a/common/mlcustomize/inject_virtio_win.ml -+++ b/common/mlcustomize/inject_virtio_win.ml -@@ -263,14 +263,28 @@ let rec inject_virtio_win_drivers ({ g } as t) reg = - } - ) - --and inject_qemu_ga t = -- let msi_files = copy_qemu_ga t in -+and inject_qemu_ga ({ g; root } as t) = -+ (* Copy the qemu-ga MSI(s) to the guest. *) -+ let dir, dir_win = Firstboot.firstboot_dir g root in -+ let dir_win = Option.value dir_win ~default:dir in -+ let tempdir = sprintf "%s/Temp" dir in -+ let tempdir_win = sprintf "%s\\Temp" dir_win in -+ g#mkdir_p tempdir; -+ -+ let msi_files = copy_qemu_ga t tempdir in - if msi_files <> [] then -- configure_qemu_ga t msi_files; -+ configure_qemu_ga t tempdir_win msi_files; - msi_files <> [] (* return true if we found some qemu-ga MSI files *) - --and inject_blnsvr t = -- let files = copy_blnsvr t in -+and inject_blnsvr ({ g; root } as t) = -+ (* Copy the files to the guest. *) -+ let dir, dir_win = Firstboot.firstboot_dir g root in -+ let dir_win = Option.value dir_win ~default:dir in -+ let tempdir = sprintf "%s/Temp" dir in -+ let tempdir_win = sprintf "%s\\Temp" dir_win in -+ g#mkdir_p tempdir; -+ -+ let files = copy_blnsvr t tempdir in - match files with - | [] -> false (* Didn't find or install anything. *) - -@@ -278,7 +292,7 @@ and inject_blnsvr t = - * drivers/by-driver). Pick the first. - *) - | blnsvr :: _ -> -- configure_blnsvr t blnsvr; -+ configure_blnsvr t tempdir_win blnsvr; - true - - and add_guestor_to_registry t ((g, root) as reg) drv_name drv_pciid = -@@ -360,13 +374,13 @@ and copy_drivers t driverdir = - (fun () -> - error (f_"root directory ‘/’ is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log.")) - --and copy_qemu_ga t = -- copy_from_virtio_win t "/" "/" (virtio_iso_path_matches_qemu_ga t) -+and copy_qemu_ga t tempdir = -+ copy_from_virtio_win t "/" tempdir (virtio_iso_path_matches_qemu_ga t) - (fun () -> - error (f_"root directory ‘/’ is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log.")) - --and copy_blnsvr t = -- copy_from_virtio_win t "/" "/" (virtio_iso_path_matches_blnsvr t) -+and copy_blnsvr t tempdir = -+ copy_from_virtio_win t "/" tempdir (virtio_iso_path_matches_blnsvr t) - (fun () -> - error (f_"root directory ‘/’ is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log.")) - -@@ -575,44 +589,35 @@ and copy_from_libosinfo { g; i_osinfo; i_arch } destdir = - ) driver.Libosinfo.files - with Not_found -> [] - --and configure_qemu_ga t files = -+(* Install qemu-ga. [files] is the non-empty list of possible qemu-ga -+ * installers we detected. -+ *) -+and configure_qemu_ga t tempdir_win files = -+ let script = ref [] in -+ let add = List.push_back script in -+ -+ add "# Virt-v2v script which installs QEMU Guest Agent"; -+ add ""; -+ add "# Uncomment this line for lots of debug output."; -+ add "# Set-PSDebug -Trace 2"; -+ add ""; -+ add "Write-Host Installing QEMU Guest Agent"; -+ add ""; -+ add "# Run qemu-ga installers"; - List.iter ( -- fun msi_path -> -- (* Windows is a trashfire. -- * https://stackoverflow.com/a/18730884 -- * https://bugzilla.redhat.com/show_bug.cgi?id=1895323 -- *) -- let psh_script = ref [] in -- let add = List.push_back psh_script in -+ fun msi -> -+ add (sprintf "Write-Host \"Writing log to %s\\%s.log\"" -+ tempdir_win msi); -+ (* [`] is an escape char for quotes *) -+ add (sprintf "Start-Process -Wait -FilePath \"%s\\%s\" -ArgumentList \"/norestart\",\"/qn\",\"/l+*vx\",\"`\"%s\\%s.log`\"\"" -+ tempdir_win msi tempdir_win msi) -+ ) files; - -- add "# Uncomment this line for lots of debug output."; -- add "# Set-PSDebug -Trace 2"; -- add ""; -- add "Write-Host Removing any previously scheduled qemu-ga installation"; -- add "schtasks.exe /Delete /TN Firstboot-qemu-ga /F"; -- add ""; -- add (sprintf -- "Write-Host Scheduling delayed installation of qemu-ga from %s" -- msi_path); -- add "$d = (get-date).AddSeconds(120)"; -- add "$dtfinfo = [System.Globalization.DateTimeFormatInfo]::CurrentInfo"; -- add "$sdp = $dtfinfo.ShortDatePattern"; -- add "$sdp = $sdp -replace 'y+', 'yyyy'"; -- add "$sdp = $sdp -replace 'M+', 'MM'"; -- add "$sdp = $sdp -replace 'd+', 'dd'"; -- add "schtasks.exe /Create /SC ONCE `"; -- add " /ST $d.ToString('HH:mm') /SD $d.ToString($sdp) `"; -- add " /RU SYSTEM /TN Firstboot-qemu-ga `"; -- add (sprintf " /TR \"C:\\%s /forcerestart /qn /l+*vx C:\\%s.log\"" -- msi_path msi_path); -+ Firstboot.add_firstboot_powershell t.g t.root "install-qemu-ga" !script - -- Firstboot.add_firstboot_powershell t.g t.root -- (sprintf "install-%s.ps1" msi_path) !psh_script; -- ) files -- --and configure_blnsvr t blnsvr = -+and configure_blnsvr t tempdir_win blnsvr = - let cmd = sprintf "\ - @echo off\n\ - echo Installing %s\n\ -- c:\\%s -i\n" blnsvr blnsvr in -- Firstboot.add_firstboot_script t.g t.root (sprintf "install-%s" blnsvr) cmd -+ \"%s\\%s\" -i\n" blnsvr tempdir_win blnsvr in -+ Firstboot.add_firstboot_script t.g t.root "install-blnsvr" cmd -diff --git a/common/mldrivers/linux_kernels.ml b/common/mldrivers/linux_kernels.ml -index 23ff76a55..e0b6b8a00 100644 ---- a/common/mldrivers/linux_kernels.ml -+++ b/common/mldrivers/linux_kernels.ml -@@ -102,7 +102,7 @@ let detect_kernels (g : G.guestfs) root bootloader apps = - ) apps in - if verbose () then ( - let names = List.map (fun { G.app2_name = name } -> name) kernel_pkgs in -- eprintf "candidate kernel packages in this guest: %s%!\n" -+ eprintf "info: candidate kernel packages in this guest: %s%!\n" - (String.concat " " names) - ); - List.filter_map ( -@@ -306,7 +306,7 @@ let detect_kernels (g : G.guestfs) root bootloader apps = - ) kernel_pkgs in - - if verbose () then ( -- eprintf "installed kernel packages in this guest:\n"; -+ eprintf "info: installed kernel packages in this guest:\n"; - List.iter (print_kernel_info stderr "\t") installed_kernels; - flush stderr - ); -@@ -343,7 +343,7 @@ let detect_kernels (g : G.guestfs) root bootloader apps = - ) vmlinuzes in - - if verbose () then ( -- eprintf "kernels offered by the bootloader in this guest (first in list is default):\n"; -+ eprintf "info: kernels offered by the bootloader in this guest (first in list is default):\n"; - List.iter (print_kernel_info stderr "\t") bootloader_kernels; - flush stderr - ); diff --git a/0005-Update-common-submodule.patch b/0005-Update-common-submodule.patch deleted file mode 100644 index e536917..0000000 --- a/0005-Update-common-submodule.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 7cffcb71c393da2ee636eb8bc9360bf83f5066f5 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sat, 10 Aug 2024 14:17:51 +0100 -Subject: [PATCH] Update common submodule - -Further refinements to Windows firstboot code. - -Richard W.M. Jones (2): - mlcustomize: Add some comments to firstboot batch file - mlcustomize: Reboot Windows between each firstboot script - -(cherry picked from commit d7719d6954f48c3a395da7486bcf55fbac66ea07) ---- - common | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Submodule common 7b84a370e..a78839676: -diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml -index 3bbba714d..52e76401e 100644 ---- a/common/mlcustomize/firstboot.ml -+++ b/common/mlcustomize/firstboot.ml -@@ -278,6 +278,9 @@ module Windows = struct - (* Write a firstboot.bat control script which just runs the other - * scripts in the directory. Note we need to use CRLF line endings - * in this script. -+ * -+ * XXX It would be better to use powershell here. For some ideas see -+ * https://github.com/HCK-CI/HLK-Setup-Scripts/ - *) - let firstboot_script = sprintf "\ - @echo off -@@ -299,6 +302,7 @@ if not exist \"%%scripts_done%%\" ( - mkdir \"%%scripts_done%%\" - ) - -+:: Pick the next script to run. - for %%%%f in (\"%%scripts%%\"\\*.bat) do ( - echo running \"%%%%f\" - move \"%%%%f\" \"%%scripts_done%%\" -@@ -307,8 +311,17 @@ for %%%%f in (\"%%scripts%%\"\\*.bat) do ( - set elvl=!errorlevel! - echo .... exit code !elvl! - popd -+ -+ :: Reboot the computer. This is necessary to free any locked -+ :: files which may prevent later scripts from running. -+ shutdown /r /t 0 /y -+ -+ :: Exit the script (in case shutdown returns before rebooting). -+ :: On next boot, the whole firstboot service will be called again. -+ exit /b - ) - -+:: Fallthrough here if there are no scripts. - echo uninstalling firstboot service - \"%%firstboot%%\\%s\" -s firstboot uninstall - " firstboot_dir_win srvany in diff --git a/guestfs-tools.spec b/guestfs-tools.spec index 7fea3f7..177eaea 100644 --- a/guestfs-tools.spec +++ b/guestfs-tools.spec @@ -8,7 +8,7 @@ %global verify_tarball_signature 1 # If there are patches which touch autotools files, set this to 1. -%global patches_touch_autotools %{nil} +%global patches_touch_autotools 1 # The source directory. %global source_directory 1.52-stable @@ -18,7 +18,7 @@ Summary: Tools to access and modify virtual machine disk images Name: guestfs-tools -Version: 1.52.1 +Version: 1.52.2 Release: 1%{?dist}.alma.1 License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -53,8 +53,6 @@ Source3: copy-patches.sh Patch0001: 0001-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch Patch0002: 0002-RHEL-builder-Disable-opensuse-repository.patch Patch0003: 0003-customize-Implement-inject-blnsvr-operation.patch -Patch0004: 0004-Update-common-submodule.patch -Patch0005: 0005-Update-common-submodule.patch %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool, gettext-devel @@ -413,9 +411,13 @@ end %changelog -* Thu Sep 05 2024 Eduard Abdullin - 1.52.1-1.alma.1 +* Mon Oct 14 2024 Eduard Abdullin - 1.52.2-1.alma.1 - Enable building for ppc64le +* Fri Oct 04 2024 Richard W.M. Jones - 1.52.2-1 +- Rebase to guestfs-tools 1.52.2 + resolves: RHEL-56812 + * Tue Aug 27 2024 Richard W.M. Jones - 1.52.1-1 - New stable version 1.52.1 - Rebase on top of patches from RHEL 9.5 diff --git a/sources b/sources index bab9436..416a0b1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (guestfs-tools-1.52.1.tar.gz) = 0db4b6cc49b18d26cb9a3a1e8f76fcb16127d41fac65b2e6e40e823b697a5581be0b85d54d2a36dbf4e45aea72ecddfc2cf6d198093c8cc52ce1a2712cc26d25 -SHA512 (guestfs-tools-1.52.1.tar.gz.sig) = 8fde96929e1f868aa5e4d76d08c899300d2b0dba7ab413c65cd9ae2e97a46426acddeede1be99a937e57cf5e5706463c21a071862e5df7add85c615123d1634c +SHA512 (guestfs-tools-1.52.2.tar.gz) = a4c0b4fbefcc7787a31a5869f12a6ce46b3de21ad19f1ac9563fac03806b227a4f6e872e6416e2dfe4c246582b04356d7dc3d70b0d694011ee9bdef6ba9c5ac3 +SHA512 (guestfs-tools-1.52.2.tar.gz.sig) = 5958d6e61274e7843d76112db587da685484635b69f2c053345986ef312fbb8d7b63430acdee1acb30cb523068fe7dec3fd5c82ef57a0a0bf62d14100cc09956