diff --git a/0001-lib-OVF-Add-preliminary-support-for-Windows-Server-2.patch b/0001-lib-OVF-Add-preliminary-support-for-Windows-Server-2.patch deleted file mode 100644 index d853d9b..0000000 --- a/0001-lib-OVF-Add-preliminary-support-for-Windows-Server-2.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 8dd5577174fe23ace5ecba7a81d2516315a0b301 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 30 Oct 2024 10:16:35 +0000 -Subject: [PATCH] lib: OVF: Add preliminary support for Windows Server 2025 - -Unfortunately support has not yet been added to oVirt. However I have -inferred the correct ostype value based on existing entries. - -Also pull in the following commit from the common submodule: - - Richard W.M. Jones (1): - mlcustomize: Add heuristic support for Windows Server 2025 - -Related: https://issues.redhat.com/browse/RHEL-65009 -Related: https://issues.redhat.com/browse/RHEL-65010 -Reported-by: Ming Xie ---- - common | 2 +- - lib/create_ovf.ml | 4 +++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -Submodule common e9eea65a..2d42128e: -diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml -index 88c1c8cf..7e46f318 100644 ---- a/common/mlcustomize/inject_virtio_win.ml -+++ b/common/mlcustomize/inject_virtio_win.ml -@@ -522,6 +522,8 @@ and virtio_iso_path_matches_guest_os t path = - (10, 0, not_client, ((=) "win2k19")) - else if pathelem "2k22" || pathelem "win2022" then - (10, 0, not_client, ((=) "win2k22")) -+ else if pathelem "2k25" || pathelem "win2025" then -+ (10, 0, not_client, ((=) "win2k25")) - else - raise Not_found in - -diff --git a/lib/create_ovf.ml b/lib/create_ovf.ml -index f0b32e01..e2c19b08 100644 ---- a/lib/create_ovf.ml -+++ b/lib/create_ovf.ml -@@ -242,10 +242,11 @@ and get_ostype = function - | "win2k16" -> "windows_2016x64" - | "win2k19" -> "windows_2019x64" - | "win2k22" -> "windows_2022" -+ | "win2k25" -> "windows_2025" - | _ -> - warning (f_"unknown Windows 10 variant: %s (%s)") - osinfo product; -- "windows_2022" -+ "windows_2025" - ) - - | { i_type = typ; i_distro = distro; -@@ -448,6 +449,7 @@ and get_ovirt_osid = function - | "win2k16" -> (* windows_2016x64 *) 29 - | "win2k19" -> (* windows_2019x64 *) 31 - | "win2k22" -> (* windows_2022 *) 37 -+ (*| "win2k25" -> (* windows_2025 *) not yet known - 2024/10 *) - | _ -> - warning (f_"unknown Windows 10 variant: %s (%s)") - osinfo product; diff --git a/0001-v2v-v2v_unit_tests.ml-Remove-use-of-oUnit.patch b/0001-v2v-v2v_unit_tests.ml-Remove-use-of-oUnit.patch new file mode 100644 index 0000000..9608039 --- /dev/null +++ b/0001-v2v-v2v_unit_tests.ml-Remove-use-of-oUnit.patch @@ -0,0 +1,119 @@ +From 610a5d66eca090169cc91e76a16f5a045139e607 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 22 Mar 2025 13:11:58 +0000 +Subject: [PATCH] v2v/v2v_unit_tests.ml: Remove use of oUnit + +--- + v2v/Makefile.am | 12 +++--------- + v2v/v2v_unit_tests.ml | 29 ++++++++++++----------------- + 2 files changed, 15 insertions(+), 26 deletions(-) + +diff --git a/v2v/Makefile.am b/v2v/Makefile.am +index 9747c3a2..2e0ecaaa 100644 +--- a/v2v/Makefile.am ++++ b/v2v/Makefile.am +@@ -125,12 +125,8 @@ virt_v2v_LINK = \ + + virttoolsdatadir = $(datadir)/virt-tools + +-if HAVE_OCAML_PKG_OUNIT +-TESTS = \ +- v2v_unit_tests +-check_PROGRAMS = \ +- v2v_unit_tests +-endif ++TESTS = v2v_unit_tests ++check_PROGRAMS = v2v_unit_tests + + v2v_unit_tests_BOBJECTS = \ + ../lib/create_ovf.cmo \ +@@ -146,10 +142,8 @@ v2v_unit_tests_CFLAGS = $(virt_v2v_CFLAGS) + if !HAVE_OCAMLOPT + # Can't call this v2v_unit_tests_OBJECTS because automake gets confused. + v2v_unit_tests_THEOBJECTS = $(v2v_unit_tests_BOBJECTS) +-v2v_unit_tests.cmo: OCAMLPACKAGES += -package ounit2 + else + v2v_unit_tests_THEOBJECTS = $(v2v_unit_tests_XOBJECTS) +-v2v_unit_tests.cmx: OCAMLPACKAGES += -package ounit2 + endif + + v2v_unit_tests_DEPENDENCIES = \ +@@ -166,7 +160,7 @@ v2v_unit_tests_DEPENDENCIES = \ + v2v_unit_tests_LINK = \ + $(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \ + $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) \ +- $(OCAMLPACKAGES) -package ounit2 \ ++ $(OCAMLPACKAGES) \ + $(OCAMLLINKFLAGS) \ + $(v2v_unit_tests_THEOBJECTS) -o $@ + +diff --git a/v2v/v2v_unit_tests.ml b/v2v/v2v_unit_tests.ml +index 89da6488..581b0e11 100644 +--- a/v2v/v2v_unit_tests.ml ++++ b/v2v/v2v_unit_tests.ml +@@ -20,14 +20,19 @@ + + open Printf + +-open OUnit2 +- + open Std_utils + open Tools_utils + + open Types + open Utils + ++let assert_equal ?(cmp = fun a b -> a = b) ~printer a b = ++ if not (cmp a b) then ++ failwithf "FAIL: %s <> %s" (printer a) (printer b) ++ ++let assert_bool name b = ++ if not b then failwithf "FAIL: %s" name ++ + let inspect_defaults = { + i_type = ""; i_distro = ""; i_osinfo = ""; i_arch = ""; + i_major_version = 0; i_minor_version = 0; +@@ -40,7 +45,8 @@ let inspect_defaults = { + i_drive_mappings = []; + } + +-let test_get_ostype ctx = ++(* Test Create_ovf.get_ostype *) ++let () = + let printer = identity in + assert_equal ~printer "RHEL6" + (Create_ovf.get_ostype { +@@ -112,14 +118,15 @@ let test_get_ostype ctx = + i_product_variant = "Server"; + i_arch = "x86_64" }) + +-let test_qemu_img_supports ctx = ++(* Test Utils.qemu_img_supports_offset_and_size *) ++let () = + (* No assertion here, we don't know if qemu-img supports the + * feature, so just run the code and make sure it doesn't crash. + *) + ignore (Utils.qemu_img_supports_offset_and_size ()) + + (* Test the VMX file parser in the Parse_vmx module. *) +-let test_vmx_parse_string ctx = ++let () = + let cmp = Parse_vmx.equal in + let printer = Parse_vmx.to_string 0 in + +@@ -259,15 +266,3 @@ foo.a.b = \"abc\" + foo.a.c = \"abc\" + " in + assert_equal ~cmp ~printer t2 t1 +- +-(* Suites declaration. *) +-let suite = +- "virt-v2v" >::: +- [ +- "Create_ovf.get_ostype" >:: test_get_ostype; +- "Utils.qemu_img_supports" >:: test_qemu_img_supports; +- "Parse_vmx.parse_string" >::test_vmx_parse_string; +- ] +- +-let () = +- run_test_tt_main suite diff --git a/0002-build-Remove-use-of-oUnit.patch b/0002-build-Remove-use-of-oUnit.patch new file mode 100644 index 0000000..5d6c643 --- /dev/null +++ b/0002-build-Remove-use-of-oUnit.patch @@ -0,0 +1,1415 @@ +From b43ba3ee618e392f523ffcefa57302841a23dbfb Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sat, 22 Mar 2025 16:03:46 +0000 +Subject: [PATCH] build: Remove use of oUnit + +This also pulls in the following update to the common submodule. The +changes to Windows virtio driver injection should be neutral. + +Cole Robinson (5): + mlcustomize: Only use osinfo id for virtio-win path matching + mlcustomize: virtio-win: clarify virtio-1.0 support + mlcustomize: make windows q35 check independent of virtio drivers + mlcustomize: virtio-win: stop checking osinfo for virtio drivers + mltools: Strip out all libosinfo driver plumbing + +Richard W.M. Jones (4): + mlutils: Remove need for OCaml OUnit2 + mltools: Remove need for OCaml OUnit2 + mlstdutils: Remove need for OCaml OUnit2 + mltools: Fix de-oUnit-ized tests +--- + .gitignore | 2 -- + README | 2 -- + common | 2 +- + common-rules.mk | 3 --- + m4/guestfs-ocaml.m4 | 11 ----------- + 5 files changed, 1 insertion(+), 19 deletions(-) + +diff --git a/.gitignore b/.gitignore +index 3f8c5a52..11eb1653 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -85,7 +85,6 @@ Makefile.in + /ocaml-dep.sh + /ocaml-link.sh + /output/.depend +-/output/oUnit-anon.cache + /output/output_rhv_upload_*_source.ml + /output/var_expander_tests + /po-docs/*/*.1 +@@ -133,7 +132,6 @@ Makefile.in + /tests/test-sound.xml + /tests/windows.vmdk + /v2v/.depend +-/v2v/oUnit-virt-v2v.cache + /v2v/real-*.d/ + /v2v/real-*.img + /v2v/real-*.xml +diff --git a/README b/README +index 4c0c2894..4f0d26f4 100644 +--- a/README ++++ b/README +@@ -88,5 +88,3 @@ Optional, for enhancements to the basic program: + Optional, used by the test suite: + + * guestfish +- +-* OCaml oUnit2 +\ No newline at end of file +Submodule common e89534fc..ba9e127d: +diff --git a/common/.gitignore b/common/.gitignore +index 44f49eb6..b72d7770 100644 +--- a/common/.gitignore ++++ b/common/.gitignore +@@ -45,7 +45,6 @@ Makefile.in + /mlstdutils/bytes.ml + /mlstdutils/bytes.mli + /mlstdutils/guestfs_config.ml +-/mlstdutils/oUnit-* + /mlstdutils/std_utils_tests + /mltools/.depend + /mltools/getopt_tests +@@ -54,10 +53,8 @@ Makefile.in + /mltools/machine_readable_tests + /mltools/tools_messages_tests + /mltools/tools_utils_tests +-/mltools/oUnit-* + /mlutils/.depend + /mlutils/c_utils_unit_tests +-/mlutils/oUnit-* + /mlvisit/.depend + /mlvisit/visit_tests + /mlxml/.depend +diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml +index 4cb5ffa9..1c26a485 100644 +--- a/common/mlcustomize/inject_virtio_win.ml ++++ b/common/mlcustomize/inject_virtio_win.ml +@@ -132,45 +132,27 @@ let rec inject_virtio_win_drivers ({ g } as t) reg = + (* XXX Inelegant hack copied originally from [Convert_windows]. + * We should be able to work this into the code properly later. + *) +- let (machine : machine_type), virtio_1_0 = ++ let (machine : machine_type) = + match t.i_arch with + | ("i386"|"x86_64") -> + (try +- (* Fall back to the decision that's based on the year that the OS +- * was released in under three circumstances: +- * - the user specified the location of the Windows virtio drivers +- * through an environment variable, or +- * - "Libosinfo_utils.get_os_by_short_id" fails to look up the OS, +- * or +- * - "Libosinfo_utils.best_driver" cannot find any matching driver. +- * In each of these cases, a "Not_found" exception is raised. This +- * behavior exactly mirrors that of "Windows_virtio.copy_drivers". +- *) +- if t.was_set then raise Not_found; + let os = Libosinfo_utils.get_os_by_short_id t.i_osinfo in +- let devices = os#get_devices () +- and drivers = os#get_device_drivers () in +- let best_drv_devs = +- (Libosinfo_utils.best_driver drivers t.i_arch).devices in +- debug "libosinfo internal devices for OS \"%s\":\n%s" +- t.i_osinfo ++ let devices = os#get_devices () in ++ debug "libosinfo devices for OS \"%s\":\n%s" t.i_osinfo + (Libosinfo_utils.string_of_osinfo_device_list devices); +- debug "libosinfo \"best driver\" devices for OS \"%s\":\n%s" +- t.i_osinfo +- (Libosinfo_utils.string_of_osinfo_device_list best_drv_devs); +- let { Libosinfo_utils.q35; vio10 } = +- Libosinfo_utils.os_support_of_osinfo_device_list +- (devices @ best_drv_devs) in +- (if q35 then Q35 else I440FX), vio10 ++ let { Libosinfo_utils.q35; _ } = ++ Libosinfo_utils.os_support_of_osinfo_device_list devices in ++ (if q35 then Q35 else I440FX) + with + | Not_found -> + (* Pivot on the year 2007. Any Windows version from earlier than + * 2007 should use i440fx, anything 2007 or newer should use q35. + * Luckily this coincides almost exactly with the release of NT 6. + *) +- (if t.i_major_version < 6 then I440FX else Q35), true ++ debug "osinfo lookup failed. falling back to heuristic for windows machine type"; ++ (if t.i_major_version < 6 then I440FX else Q35) + ) +- | _ -> Virt, true ++ | _ -> Virt + in + + if not (copy_drivers t driverdir) then ( +@@ -180,7 +162,7 @@ let rec inject_virtio_win_drivers ({ g } as t) reg = + { block_driver = IDE; net_driver = RTL8139; + virtio_rng = false; virtio_balloon = false; + isa_pvpanic = false; virtio_socket = false; +- machine; virtio_1_0; } ++ machine; virtio_1_0 = true; } + ) + else ( + (* Can we install the block driver? *) +@@ -259,7 +241,7 @@ let rec inject_virtio_win_drivers ({ g } as t) reg = + virtio_balloon = g#exists (driverdir // "balloon.inf"); + isa_pvpanic = g#exists (driverdir // "pvpanic.inf"); + virtio_socket = g#exists (driverdir // "viosock.inf"); +- machine; virtio_1_0; ++ machine; virtio_1_0 = true; + } + ) + +@@ -368,7 +350,6 @@ and ddb_regedits inspect drv_name drv_pciid = + * been copied. + *) + and copy_drivers t driverdir = +- (not t.was_set && [] <> copy_from_libosinfo t driverdir) || + [] <> copy_from_virtio_win t "/" driverdir + (virtio_iso_path_matches_guest_os t) + (fun () -> +@@ -463,8 +444,7 @@ and copy_from_virtio_win ({ g } as t) srcdir destdir filter missing = + * specific Windows flavor of the current guest. + *) + and virtio_iso_path_matches_guest_os t path = +- let { i_major_version = os_major; i_minor_version = os_minor; +- i_arch = arch; i_product_variant = os_variant; ++ let { i_arch = arch; + i_osinfo = osinfo } = t in + try + (* Lowercased path, since the ISO may contain upper or lowercase path +@@ -487,43 +467,39 @@ and virtio_iso_path_matches_guest_os t path = + else if pathelem "amd64" then "x86_64" + else raise Not_found in + +- let is_client os_variant = os_variant = "Client" +- and not_client os_variant = os_variant <> "Client" +- and any_variant os_variant = true +- and any_osinfo osinfo = true in +- let p_os_major, p_os_minor, match_os_variant, match_osinfo = ++ let match_osinfo = + if pathelem "xp" then +- (5, 1, any_variant, any_osinfo) ++ ((=) "winxp") + else if pathelem "2k3" then +- (5, 2, any_variant, any_osinfo) ++ (function "win2k3" | "win2k3r2" -> true | _ -> false) + else if pathelem "vista" then +- (6, 0, is_client, any_osinfo) ++ ((=) "winvista") + else if pathelem "2k8" then +- (6, 0, not_client, any_osinfo) ++ ((=) "win2k8") + else if pathelem "w7" then +- (6, 1, is_client, any_osinfo) ++ ((=) "win7") + else if pathelem "2k8r2" then +- (6, 1, not_client, any_osinfo) ++ ((=) "win2k8r2") + else if pathelem "w8" then +- (6, 2, is_client, any_osinfo) ++ ((=) "win8") + else if pathelem "2k12" then +- (6, 2, not_client, any_osinfo) ++ ((=) "win2k12") + else if pathelem "w8.1" then +- (6, 3, is_client, any_osinfo) ++ ((=) "win8.1") + else if pathelem "2k12r2" then +- (6, 3, not_client, any_osinfo) ++ ((=) "win2k12r2") + else if pathelem "w10" then +- (10, 0, is_client, ((=) "win10")) ++ ((=) "win10") + else if pathelem "w11" then +- (10, 0, is_client, ((=) "win11")) ++ ((=) "win11") + else if pathelem "2k16" then +- (10, 0, not_client, ((=) "win2k16")) ++ ((=) "win2k16") + else if pathelem "2k19" then +- (10, 0, not_client, ((=) "win2k19")) ++ ((=) "win2k19") + else if pathelem "2k22" then +- (10, 0, not_client, ((=) "win2k22")) ++ ((=) "win2k22") + else if pathelem "2k25" then +- (10, 0, not_client, ((=) "win2k25")) ++ ((=) "win2k25") + else + raise Not_found in + +@@ -543,8 +519,6 @@ and virtio_iso_path_matches_guest_os t path = + arch = p_arch && + not p_sriov && + not p_pdb && +- os_major = p_os_major && os_minor = p_os_minor && +- match_os_variant os_variant && + match_osinfo osinfo + + with Not_found -> false +@@ -571,45 +545,6 @@ and virtio_iso_path_matches_qemu_ga t path = + and virtio_iso_path_matches_blnsvr t path = + virtio_iso_path_matches_guest_os t path && PCRE.matches re_blnsvr path + +-(* Look up in libosinfo for the OS, and copy all the locally +- * available files specified as drivers for that OS to the [destdir]. +- * +- * This function does nothing in case either: +- * - the osinfo short ID is not found in the libosinfo DB +- * - the OS does not have any driver for the architecture of the guest +- * - the location of the drivers is not a local directory +- * +- * Files that do not exist are silently skipped. +- * +- * Returns list of copied files. +- *) +-and copy_from_libosinfo { g; i_osinfo; i_arch } destdir = +- try +- let os = Libosinfo_utils.get_os_by_short_id i_osinfo in +- let drivers = os#get_device_drivers () in +- let driver = Libosinfo_utils.best_driver drivers i_arch in +- let uri = Xml.parse_uri driver.Libosinfo.location in +- let basedir = +- match uri.Xml.uri_path with +- | Some p -> p +- | None -> assert false in +- List.filter_map ( +- fun f -> +- let source = basedir // f in +- if not (Sys.file_exists source) then +- None +- else ( +- let target_name = String.lowercase_ascii (Filename.basename f) in +- let target = destdir ^ "/" ^ target_name in +- debug "windows: copying guest tools bits (via libosinfo): 'host:%s' -> '%s'" +- source target; +- +- g#write target (read_whole_file source); +- Some target_name +- ) +- ) driver.Libosinfo.files +- with Not_found -> [] +- + (* Install qemu-ga. [files] is the non-empty list of possible qemu-ga + * installers we detected. + *) +diff --git a/common/mlstdutils/Makefile.am b/common/mlstdutils/Makefile.am +index 2b73bc6d..b9632b07 100644 +--- a/common/mlstdutils/Makefile.am ++++ b/common/mlstdutils/Makefile.am +@@ -72,9 +72,6 @@ OCAMLPACKAGES = \ + -package str,unix \ + -I $(builddir) + OCAMLPACKAGES_TESTS = $(MLSTDUTILS_CMA) +-if HAVE_OCAML_PKG_OUNIT +-OCAMLPACKAGES_TESTS += -package ounit2 +-endif + + OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)' + +@@ -126,13 +123,8 @@ std_utils_tests_LINK = \ + + TESTS_ENVIRONMENT = $(top_builddir)/run --test + +-TESTS = +-check_PROGRAMS = +- +-if HAVE_OCAML_PKG_OUNIT +-check_PROGRAMS += std_utils_tests +-TESTS += std_utils_tests +-endif ++check_PROGRAMS = std_utils_tests ++TESTS = std_utils_tests + + check-valgrind: + $(MAKE) VG="@VG@" check +diff --git a/common/mlstdutils/std_utils_tests.ml b/common/mlstdutils/std_utils_tests.ml +index 4e368152..109af52e 100644 +--- a/common/mlstdutils/std_utils_tests.ml ++++ b/common/mlstdutils/std_utils_tests.ml +@@ -1,5 +1,5 @@ + (* Utilities for OCaml tools in libguestfs. +- * Copyright (C) 2011-2019 Red Hat Inc. ++ * Copyright (C) 2011-2025 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -20,25 +20,50 @@ + + open Printf + +-open OUnit2 + open Std_utils + +-(* Utils. *) +-let assert_equal_string = assert_equal ~printer:(fun x -> x) +-let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x) +-let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x) +-let assert_equal_stringlist = assert_equal ~printer:(fun x -> "(" ^ (String.escaped (String.concat "," x)) ^ ")") +-let assert_equal_stringpair = assert_equal ~printer:(fun (x, y) -> sprintf "%S, %S" x y) ++let assert_equal ~printer a b = ++ if a <> b then ++ failwithf "FAIL: %s <> %s" (printer a) (printer b) ++ ++let assert_raises exn fn = ++ try ++ fn (); ++ failwithf "FAIL: expected function to raise an exception" ++ with exn' -> ++ if exn <> exn' then ( ++ eprintf "FAIL: function raised the wrong exception:\n\ ++ expected %s\n\ ++ actual %s\n" ++ (Printexc.to_string exn) (Printexc.to_string exn'); ++ exit 1 ++ ) ++ ++let assert_equal_string = ++ assert_equal ~printer:identity ++let assert_equal_int = ++ assert_equal ~printer:(fun x -> string_of_int x) ++let assert_equal_int64 = ++ assert_equal ~printer:(fun x -> Int64.to_string x) ++let assert_equal_stringlist = ++ assert_equal ~printer:(fun x -> "(" ^ (String.escaped (String.concat "," x)) ^ ")") ++let assert_equal_stringpair = ++ assert_equal ~printer:(fun (x, y) -> sprintf "%S, %S" x y) + let assert_nonempty_string str = +- if str = "" then +- assert_failure (sprintf "Expected empty string, got '%s'" str) ++ if str = "" then ( ++ eprintf "Expected empty string, got '%s'\n" str; ++ exit 1 ++ ) + let assert_raises_executable_not_found exe = + assert_raises (Executable_not_found exe) (fun () -> which exe) + ++let assert_bool name b = ++ if not b then failwithf "FAIL: %s" name ++ + (* Test Std_utils.int_of_X and Std_utils.X_of_int byte swapping + * functions. + *) +-let rec test_byteswap ctx = ++let rec test_byteswap () = + test_swap int_of_le16 le16_of_int 0x2040L "\x40\x20"; + test_swap int_of_le32 le32_of_int 0x20406080L "\x80\x60\x40\x20"; + test_swap int_of_le64 le64_of_int +@@ -52,8 +77,10 @@ and test_swap int_of_x x_of_int i s = + assert_equal_int64 i (int_of_x s); + assert_equal_string s (x_of_int i) + ++let () = test_byteswap () ++ + (* Test Std_utils.Char.mem. *) +-let test_char_mem ctx = ++let () = + assert_bool "Char.mem" (Char.mem 'a' "abc"); + assert_bool "Char.mem" (Char.mem 'b' "abc"); + assert_bool "Char.mem" (Char.mem 'c' "abc"); +@@ -61,7 +88,7 @@ let test_char_mem ctx = + assert_bool "Char.mem" (not (Char.mem 'a' "")) + + (* Test Std_utils.String.is_prefix. *) +-let test_string_is_prefix ctx = ++let () = + assert_bool "String.is_prefix,," (String.is_prefix "" ""); + assert_bool "String.is_prefix,foo," (String.is_prefix "foo" ""); + assert_bool "String.is_prefix,foo,foo" (String.is_prefix "foo" "foo"); +@@ -69,7 +96,7 @@ let test_string_is_prefix ctx = + assert_bool "not (String.is_prefix,,foo" (not (String.is_prefix "" "foo")) + + (* Test Std_utils.String.is_suffix. *) +-let test_string_is_suffix ctx = ++let () = + assert_bool "String.is_suffix,," (String.is_suffix "" ""); + assert_bool "String.is_suffix,foo," (String.is_suffix "foo" ""); + assert_bool "String.is_suffix,foo,foo" (String.is_suffix "foo" "foo"); +@@ -77,7 +104,7 @@ let test_string_is_suffix ctx = + assert_bool "not String.is_suffix,,foo" (not (String.is_suffix "" "foo")) + + (* Test Std_utils.String.find. *) +-let test_string_find ctx = ++let () = + assert_equal_int 0 (String.find "" ""); + assert_equal_int 0 (String.find "foo" ""); + assert_equal_int 1 (String.find "foo" "o"); +@@ -86,7 +113,7 @@ let test_string_find ctx = + assert_equal_int (-1) (String.find "foobar" "baz") + + (* Test Std_utils.String.break. *) +-let test_string_break ctx = ++let () = + assert_equal_stringpair ("a", "b") (String.break 1 "ab"); + assert_equal_stringpair ("", "ab") (String.break 0 "ab"); + assert_equal_stringpair ("", "ab") (String.break (-1) "ab"); +@@ -98,7 +125,7 @@ let test_string_break ctx = + assert_equal_stringpair ("", "") (String.break 2 "") + + (* Test Std_utils.String.split. *) +-let test_string_split ctx = ++let () = + assert_equal_stringpair ("a", "b") (String.split " " "a b"); + assert_equal_stringpair ("", "ab") (String.split " " " ab"); + assert_equal_stringpair ("", "abc") (String.split "" "abc"); +@@ -106,7 +133,7 @@ let test_string_split ctx = + assert_equal_stringpair ("", "") (String.split " " "") + + (* Test Std_utils.String.nsplit. *) +-let test_string_nsplit ctx = ++let () = + (* XXX Not clear if the next test case indicates an error in + * String.nsplit. However this is how it has historically worked. + *) +@@ -128,7 +155,7 @@ let test_string_nsplit ctx = + assert_equal_stringlist xs (String.nsplit " " xs_concat) + + (* Test Std_utils.String.lines_split. *) +-let test_string_lines_split ctx = ++let () = + assert_equal_stringlist [""] (String.lines_split ""); + assert_equal_stringlist ["A"] (String.lines_split "A"); + assert_equal_stringlist ["A"; ""] (String.lines_split "A\n"); +@@ -144,7 +171,7 @@ let test_string_lines_split ctx = + assert_equal_stringlist ["A\nB\n"] (String.lines_split "A\\\nB\\\n") + + (* Test Std_utils.String.span and cspan. *) +-let test_string_span ctx = ++let () = + assert_equal_int 3 (String.span "aaabb" "a"); + assert_equal_int 3 (String.span "aaaba" "a"); + assert_equal_int 3 (String.span "aba" "ab"); +@@ -155,7 +182,7 @@ let test_string_span ctx = + assert_equal_int 0 (String.cspan "" "ab") + + (* Test Std_utils.String.chomp. *) +-let test_string_chomp ctx = ++let () = + assert_equal_string "a" (String.chomp "a"); + assert_equal_string "a" (String.chomp "a\n"); + assert_equal_string "a\nb" (String.chomp "a\nb"); +@@ -164,38 +191,17 @@ let test_string_chomp ctx = + assert_equal_string "\n" (String.chomp "\n\n") (* only removes one *) + + (* Test Std_utils.which. *) +-let test_which ctx = ++let () = + assert_nonempty_string (which "true"); + assert_raises_executable_not_found "this-command-does-not-really-exist"; + begin + let exe_name = "true" in + let exe = which exe_name in + assert_equal_string exe (which exe); +- with_bracket_chdir ctx (Filename.dirname exe) ( +- fun ctx -> +- let exe_relative = "./" ^ exe_name in +- assert_equal_string exe_relative (which exe_relative) +- ) ++ let pwd = Sys.getcwd () in ++ Sys.chdir (Filename.dirname exe); ++ let exe_relative = "./" ^ exe_name in ++ assert_equal_string exe_relative (which exe_relative); ++ Sys.chdir pwd + end; + () +- +-(* Suites declaration. *) +-let suite = +- "mllib Std_utils" >::: +- [ +- "numeric.byteswap" >:: test_byteswap; +- "char.mem" >:: test_char_mem; +- "strings.is_prefix" >:: test_string_is_prefix; +- "strings.is_suffix" >:: test_string_is_suffix; +- "strings.break" >:: test_string_break; +- "strings.find" >:: test_string_find; +- "strings.split" >:: test_string_split; +- "strings.nsplit" >:: test_string_nsplit; +- "strings.lines_split" >:: test_string_lines_split; +- "strings.span" >:: test_string_span; +- "strings.chomp" >:: test_string_chomp; +- "which" >:: test_which; +- ] +- +-let () = +- run_test_tt_main suite +diff --git a/common/mltools/JSON_parser_tests.ml b/common/mltools/JSON_parser_tests.ml +index 28672461..65d3240a 100644 +--- a/common/mltools/JSON_parser_tests.ml ++++ b/common/mltools/JSON_parser_tests.ml +@@ -1,5 +1,5 @@ + (* virt-builder +- * Copyright (C) 2015 Red Hat Inc. ++ * Copyright (C) 2015-2025 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -18,15 +18,35 @@ + + (* This file tests the JSON_parser module. *) + +-open OUnit2 ++open Printf ++ ++open Std_utils + open JSON_parser + +-(* Utils. *) +-let assert_equal_string = assert_equal ~printer:(fun x -> x) ++let assert_equal ~printer a b = ++ if a <> b then ++ failwithf "FAIL: %s <> %s" (printer a) (printer b) ++let assert_equal_string = assert_equal ~printer:identity + let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x) + let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x) + let assert_equal_bool = assert_equal ~printer:(fun x -> string_of_bool x) + ++let assert_bool name b = ++ if not b then failwithf "FAIL: %s" name ++ ++let assert_raises exn fn = ++ try ++ fn (); ++ failwithf "FAIL: expected function to raise an exception" ++ with exn' -> ++ if exn <> exn' then ( ++ eprintf "FAIL: function raised the wrong exception:\n\ ++ expected %s\n\ ++ actual %s\n" ++ (Printexc.to_string exn) (Printexc.to_string exn'); ++ exit 1 ++ ) ++ + let string_of_json_t = function + | JSON.Null -> "null" + | JSON.String _ -> "string" +@@ -57,28 +77,29 @@ let assert_is_object value = + (match value with | JSON.Dict _ -> true | _ -> false) + let assert_is_string exp = function + | JSON.String s -> assert_equal_string exp s +- | _ as v -> assert_failure (type_mismatch_string "string" v) ++ | _ as v -> failwith (type_mismatch_string "string" v) + let assert_is_number exp = function + | JSON.Int i -> assert_equal_int64 exp i + | JSON.Float f -> assert_equal_int64 exp (Int64.of_float f) +- | _ as v -> assert_failure (type_mismatch_string "number/double" v) ++ | _ as v -> failwith (type_mismatch_string "number/double" v) + let assert_is_array value = + assert_bool + (type_mismatch_string "list" value) + (match value with | JSON.List _ -> true | _ -> false) + let assert_is_bool exp = function + | JSON.Bool b -> assert_equal_bool exp b +- | _ as v -> assert_failure (type_mismatch_string "bool" v) ++ | _ as v -> failwith (type_mismatch_string "bool" v) + + let get_dict = function + | JSON.Dict x -> x +- | _ as v -> assert_failure (type_mismatch_string "dict" v) ++ | _ as v -> failwith (type_mismatch_string "dict" v) + let get_list = function + | JSON.List x -> x +- | _ as v -> assert_failure (type_mismatch_string "list" v) ++ | _ as v -> failwith (type_mismatch_string "list" v) + + +-let test_tree_parse_invalid ctx = ++(* tree parse invalid *) ++let () = + assert_raises_invalid_argument ""; + assert_raises_invalid_argument "invalid"; + assert_raises_invalid_argument ":5"; +@@ -89,7 +110,8 @@ let test_tree_parse_invalid ctx = + let str = "{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":{\"a\":5}}}}}}}}}}}}}}}}}}}}}" in + assert_raises_nested str + +-let test_tree_parse_basic ctx = ++(* tree parse basic *) ++let () = + let value = json_parser_tree_parse "{}" in + assert_is_object value; + +@@ -99,7 +121,8 @@ let test_tree_parse_basic ctx = + let value = json_parser_tree_parse "[]" in + assert_is_array value + +-let test_tree_parse_inspect ctx = ++(* tree parse inspect *) ++let () = + let value = json_parser_tree_parse "{\"foo\":5}" in + let l = get_dict value in + assert_equal_int 1 (List.length l); +@@ -122,9 +145,11 @@ let test_tree_parse_inspect ctx = + assert_is_number 10_L (List.nth a 2); + assert_is_number 2_L (List.assoc "second" l) + +-let test_tree_parse_file_basic ctx = ++(* tree parse file basic *) ++let () = + begin +- let tmpfile, chan = bracket_tmpfile ctx in ++ let tmpfile, chan = Filename.open_temp_file "tmp" ".tmp" in ++ On_exit.unlink tmpfile; + output_string chan "{}\n"; + flush chan; + close_out chan; +@@ -132,7 +157,8 @@ let test_tree_parse_file_basic ctx = + assert_is_object value + end; + begin +- let tmpfile, chan = bracket_tmpfile ctx in ++ let tmpfile, chan = Filename.open_temp_file "tmp" ".tmp" in ++ On_exit.unlink tmpfile; + output_string chan "{\"foo\":5}\n"; + flush chan; + close_out chan; +@@ -143,16 +169,3 @@ let test_tree_parse_file_basic ctx = + assert_is_number 5_L (snd (List.hd l)); + end; + () +- +-(* Suites declaration. *) +-let suite = +- "mltools JSON_parser" >::: +- [ +- "tree_parse.invalid" >:: test_tree_parse_invalid; +- "tree_parse.basic" >:: test_tree_parse_basic; +- "tree_parse.inspect" >:: test_tree_parse_inspect; +- "tree_parse_file.basic" >:: test_tree_parse_file_basic; +- ] +- +-let () = +- run_test_tt_main suite +diff --git a/common/mltools/JSON_tests.ml b/common/mltools/JSON_tests.ml +index 6bd98af2..e295fea2 100644 +--- a/common/mltools/JSON_tests.ml ++++ b/common/mltools/JSON_tests.ml +@@ -1,5 +1,5 @@ + (* mltools JSON tests +- * Copyright (C) 2015 Red Hat Inc. ++ * Copyright (C) 2015-2025 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -20,19 +20,20 @@ + + open Std_utils + +-open OUnit2 +- +-(* Utils. *) +-let assert_equal_string = assert_equal ~printer:(fun x -> x) ++let assert_equal ~printer a b = ++ if a <> b then ++ failwithf "FAIL: %s <> %s" (printer a) (printer b) ++let assert_equal_string = assert_equal ~printer:identity + + (* "basic" suite. *) +-let test_empty ctx = ++let () = + let doc = [] in + assert_equal_string "{}" (JSON.string_of_doc doc); + assert_equal_string "{ + }" (JSON.string_of_doc ~fmt:JSON.Indented doc) + +-let test_string ctx = ++(* string *) ++let () = + let doc = [ "test_string", JSON.String "foo"; ] in + assert_equal_string "{ \"test_string\": \"foo\" }" + (JSON.string_of_doc doc); +@@ -41,7 +42,8 @@ let test_string ctx = + }" + (JSON.string_of_doc ~fmt:JSON.Indented doc) + +-let test_bool ctx = ++(* bool *) ++let () = + let doc = [ "test_true", JSON.Bool true; + "test_false", JSON.Bool false ] in + assert_equal_string +@@ -54,7 +56,8 @@ let test_bool ctx = + }" + (JSON.string_of_doc ~fmt:JSON.Indented doc) + +-let test_int ctx = ++(* int *) ++let () = + let doc = [ "test_zero", JSON.Int 0L; + "test_pos", JSON.Int 5L; + "test_neg", JSON.Int (-5L); +@@ -73,7 +76,8 @@ let test_int ctx = + }" + (JSON.string_of_doc ~fmt:JSON.Indented doc) + +-let test_float ctx = ++(* float *) ++let () = + let doc = [ "test_zero", JSON.Float 0.; + "test_one", JSON.Float 1.; + "test_frac", JSON.Float 1.5; +@@ -92,7 +96,8 @@ let test_float ctx = + }" + (JSON.string_of_doc ~fmt:JSON.Indented doc) + +-let test_list ctx = ++(* list *) ++let () = + let doc = [ "item", JSON.List [ JSON.String "foo"; JSON.Int 10L; JSON.Bool true ] ] in + assert_equal_string + "{ \"item\": [ \"foo\", 10, true ] }" +@@ -107,7 +112,8 @@ let test_list ctx = + }" + (JSON.string_of_doc ~fmt:JSON.Indented doc) + +-let test_nested_dict ctx = ++(* nested dict *) ++let () = + let doc = [ + "item", JSON.Dict [ "int", JSON.Int 5L; "string", JSON.String "foo"; ]; + "last", JSON.Int 10L; +@@ -125,7 +131,8 @@ let test_nested_dict ctx = + }" + (JSON.string_of_doc ~fmt:JSON.Indented doc) + +-let test_nested_nested_dict ctx = ++(* nested x2 dict *) ++let () = + let doc = [ + "item", JSON.Dict [ "int", JSON.Int 5L; + "item2", JSON.Dict [ "int", JSON.Int 0L; ]; +@@ -147,7 +154,8 @@ let test_nested_nested_dict ctx = + }" + (JSON.string_of_doc ~fmt:JSON.Indented doc) + +-let test_escape ctx = ++(* escapes *) ++let () = + let doc = [ "test_string", JSON.String "test \" ' \n \b \r \t"; ] in + assert_equal_string "{ \"test_string\": \"test \\\" ' \\n \\b \\r \\t\" }" + (JSON.string_of_doc doc); +@@ -157,7 +165,7 @@ let test_escape ctx = + (JSON.string_of_doc ~fmt:JSON.Indented doc) + + (* "examples" suite. *) +-let test_qemu ctx = ++let () = + let doc = [ + "file.driver", JSON.String "https"; + "file.url", JSON.String "https://libguestfs.org"; +@@ -176,7 +184,8 @@ let test_qemu ctx = + }" + (JSON.string_of_doc ~fmt:JSON.Indented doc) + +-let test_builder ctx = ++(* builder *) ++let () = + let doc = [ + "version", JSON.Int 1L; + "sources", JSON.List [ +@@ -239,23 +248,3 @@ let test_builder ctx = + ] + }" + (JSON.string_of_doc ~fmt:JSON.Indented doc) +- +-(* Suites declaration. *) +-let suite = +- "mltools JSON" >::: +- [ +- "basic.empty" >:: test_empty; +- "basic.string" >:: test_string; +- "basic.bool" >:: test_bool; +- "basic.int" >:: test_int; +- "basic.float" >:: test_float; +- "basic.list" >:: test_list; +- "basic.nested_dict" >:: test_nested_dict; +- "basic.nested_nested dict" >:: test_nested_nested_dict; +- "basic.escape" >:: test_escape; +- "examples.qemu" >:: test_qemu; +- "examples.virt-builder" >:: test_builder; +- ] +- +-let () = +- run_test_tt_main suite +diff --git a/common/mltools/Makefile.am b/common/mltools/Makefile.am +index 684c2694..e9e0398c 100644 +--- a/common/mltools/Makefile.am ++++ b/common/mltools/Makefile.am +@@ -138,9 +138,6 @@ OCAMLPACKAGES_TESTS = $(MLTOOLS_CMA) + if HAVE_OCAML_PKG_GETTEXT + OCAMLPACKAGES += -package gettext-stub + endif +-if HAVE_OCAML_PKG_OUNIT +-OCAMLPACKAGES_TESTS += -package ounit2 +-endif + + OCAMLCLIBS = \ + -lutils \ +@@ -366,7 +363,10 @@ TESTS_ENVIRONMENT = $(top_builddir)/run --test + + TESTS = \ + test-getopt.sh \ +- test-machine-readable.sh ++ test-machine-readable.sh \ ++ JSON_tests \ ++ JSON_parser_tests \ ++ tools_utils_tests + if HAVE_PYTHON + TESTS += \ + test-tools-messages.sh +@@ -374,12 +374,10 @@ endif + check_PROGRAMS = \ + getopt_tests \ + machine_readable_tests \ +- tools_messages_tests +- +-if HAVE_OCAML_PKG_OUNIT +-check_PROGRAMS += JSON_tests JSON_parser_tests tools_utils_tests +-TESTS += JSON_tests JSON_parser_tests tools_utils_tests +-endif ++ tools_messages_tests \ ++ JSON_tests \ ++ JSON_parser_tests \ ++ tools_utils_tests + + check-valgrind: + $(MAKE) VG="@VG@" check +diff --git a/common/mltools/libosinfo-c.c b/common/mltools/libosinfo-c.c +index a48c8989..11df1fea 100644 +--- a/common/mltools/libosinfo-c.c ++++ b/common/mltools/libosinfo-c.c +@@ -191,25 +191,6 @@ v2v_osinfo_os_get_id (value osv) + CAMLreturn (copyv); + } + +-static value +-glist_to_value_list (GList *list) +-{ +- CAMLparam0 (); +- CAMLlocal3 (rv, v, copyv); +- GList *l; +- +- rv = Val_emptylist; +- for (l = list; l != NULL; l = l->next) { +- v = caml_alloc (2, 0); +- copyv = caml_copy_string (l->data); +- Store_field (v, 0, copyv); +- Store_field (v, 1, rv); +- rv = v; +- } +- +- CAMLreturn (rv); +-} +- + /* Collect OsinfoDevice properties from two levels: + * + * - The OSINFO_ENTITY_PROP_ID property, originating from the OsinfoEntity base +@@ -274,65 +255,6 @@ v2v_osinfo_device_list_to_value_list (OsinfoDeviceList *dev_list) + CAMLreturn (retvalv); + } + +-value +-v2v_osinfo_os_get_device_drivers (value osv) +-{ +- CAMLparam1 (osv); +- CAMLlocal4 (rv, v, vi, copyv); +- OsinfoDeviceDriverList *list; +- gint i, len; +- +- list = osinfo_os_get_device_drivers (OsinfoOs_t_val (osv)); +- len = osinfo_list_get_length (OSINFO_LIST(list)); +- +- rv = Val_emptylist; +- for (i = len - 1; i >= 0; --i) { +- OsinfoDeviceDriver *driver; +- const gchar *str; +- gboolean b; +- GList *l; +- gint64 i64; +- OsinfoDeviceList *dev_list; +- +- driver = OSINFO_DEVICE_DRIVER(osinfo_list_get_nth (OSINFO_LIST(list), i)); +- +- vi = caml_alloc (7, 0); +- str = osinfo_device_driver_get_architecture (driver); +- copyv = caml_copy_string (str); +- Store_field (vi, 0, copyv); +- str = osinfo_device_driver_get_location (driver); +- copyv = caml_copy_string (str); +- Store_field (vi, 1, copyv); +- b = osinfo_device_driver_get_pre_installable (driver); +- Store_field (vi, 2, Val_bool (b)); +- b = osinfo_device_driver_get_signed (driver); +- Store_field (vi, 3, Val_bool (b)); +-#if IS_LIBOSINFO_VERSION(1, 7, 0) +- i64 = osinfo_device_driver_get_priority (driver); +-#else +- /* Same as OSINFO_DEVICE_DRIVER_DEFAULT_PRIORITY in libosinfo 1.7.0+. */ +- i64 = 50; +-#endif +- copyv = caml_copy_int64 (i64); +- Store_field (vi, 4, copyv); +- l = osinfo_device_driver_get_files (driver); +- Store_field (vi, 5, glist_to_value_list (l)); +- g_list_free (l); +- dev_list = osinfo_device_driver_get_devices (driver); +- v = (dev_list == NULL) ? +- Val_emptylist : +- v2v_osinfo_device_list_to_value_list (dev_list); +- Store_field (vi, 6, v); +- +- v = caml_alloc (2, 0); +- Store_field (v, 0, vi); +- Store_field (v, 1, rv); +- rv = v; +- } +- +- CAMLreturn (rv); +-} +- + value + v2v_osinfo_os_get_all_devices (value osv) + { +diff --git a/common/mltools/libosinfo.ml b/common/mltools/libosinfo.ml +index 8ea0a279..3c25ca75 100644 +--- a/common/mltools/libosinfo.ml ++++ b/common/mltools/libosinfo.ml +@@ -35,24 +35,12 @@ type osinfo_device = { + subsystem : string; + } + +-type osinfo_device_driver = { +- architecture : string; +- location : string; +- pre_installable : bool; +- signed : bool; +- priority : int64; +- files : string list; +- devices : osinfo_device list; +-} +- + external osinfo_os_get_id : osinfo_os_t -> string = "v2v_osinfo_os_get_id" +-external osinfo_os_get_device_drivers : osinfo_os_t -> osinfo_device_driver list = "v2v_osinfo_os_get_device_drivers" + external osinfo_os_get_devices : osinfo_os_t -> osinfo_device list = "v2v_osinfo_os_get_all_devices" + + class osinfo_os h = + object (self) + method get_id () = osinfo_os_get_id h +- method get_device_drivers () = osinfo_os_get_device_drivers h + method get_devices () = osinfo_os_get_devices h + end + +diff --git a/common/mltools/libosinfo.mli b/common/mltools/libosinfo.mli +index aa436370..316dc378 100644 +--- a/common/mltools/libosinfo.mli ++++ b/common/mltools/libosinfo.mli +@@ -32,21 +32,9 @@ type osinfo_device = { + subsystem : string; + } + +-type osinfo_device_driver = { +- architecture : string; +- location : string; +- pre_installable : bool; +- signed : bool; +- priority : int64; +- files : string list; +- devices : osinfo_device list; +-} +- + class osinfo_os : osinfo_os_t -> object + method get_id : unit -> string + (** Return the ID. *) +- method get_device_drivers : unit -> osinfo_device_driver list +- (** Return the list of device drivers. *) + method get_devices : unit -> osinfo_device list + (** Return the list of devices. *) + end +diff --git a/common/mltools/libosinfo_utils.ml b/common/mltools/libosinfo_utils.ml +index 8504e2b2..d9fe61a6 100644 +--- a/common/mltools/libosinfo_utils.ml ++++ b/common/mltools/libosinfo_utils.ml +@@ -68,52 +68,6 @@ let string_of_osinfo_device_list dev_list = + String.concat "\n" + (List.map (fun dev -> columnate (listify dev) max_widths) dev_list) + +-let string_of_osinfo_device_driver { Libosinfo.architecture; location; +- pre_installable; signed; priority; +- files; devices } = +- Printf.sprintf "%s: [%s, %s, %s, priority %Ld]\nFiles:\n%s\nDevices:\n%s" +- location architecture +- (if pre_installable then "pre-installable" else "not pre-installable") +- (if signed then "signed" else "unsigned") +- priority +- (String.concat "\n" files) +- (string_of_osinfo_device_list devices) +- +-let best_driver drivers arch = +- let debug_drivers = +- List.iter (fun d -> debug "Driver: %s" (string_of_osinfo_device_driver d)) +- (* The architecture that "inspect.i_arch" from libguestfs +- * ("daemon/filearch.ml") calls "i386", the osinfo-db schema +- * ("data/schema/osinfo.rng.in") calls "i686". +- *) +- and arch = if arch = "i386" then "i686" else arch in +- debug "libosinfo drivers before filtering:"; +- debug_drivers drivers; +- let drivers = +- List.filter ( +- fun { Libosinfo.architecture; location; pre_installable } -> +- if architecture <> arch || not pre_installable then +- false +- else +- try +- (match Xml.parse_uri location with +- | { Xml.uri_scheme = Some scheme; +- Xml.uri_path = Some _ } when scheme = "file" -> true +- | _ -> false +- ) +- with Invalid_argument _ -> false +- ) drivers in +- debug "libosinfo drivers after filtering:"; +- debug_drivers drivers; +- let drivers = +- List.sort ( +- fun { Libosinfo.priority = prioA } { Libosinfo.priority = prioB } -> +- compare prioB prioA +- ) drivers in +- if drivers = [] then +- raise Not_found; +- List.hd drivers +- + type os_support = { + q35 : bool; + vio10 : bool; +diff --git a/common/mltools/libosinfo_utils.mli b/common/mltools/libosinfo_utils.mli +index 14991bc2..95acad9b 100644 +--- a/common/mltools/libosinfo_utils.mli ++++ b/common/mltools/libosinfo_utils.mli +@@ -28,21 +28,6 @@ val get_os_by_short_id : string -> Libosinfo.osinfo_os + val string_of_osinfo_device_list : Libosinfo.osinfo_device list -> string + (** Convert an [osinfo_device] list to a printable string for debugging. *) + +-val string_of_osinfo_device_driver : Libosinfo.osinfo_device_driver -> string +-(** Convert a [osinfo_device_driver] to a printable string for debugging. *) +- +-val best_driver : Libosinfo.osinfo_device_driver list -> +- string -> +- Libosinfo.osinfo_device_driver +-(** [best_driver drivers arch] picks the best driver from [drivers] as follows: +- - filters out drivers that: +- - target a different architecture, +- - are not pre-installable, +- - have an invalid or non-local URL; +- - sorts the remaining drivers by priority, like libosinfo does; +- - picks the top driver of the sorted list. +- Raises Not_found if no driver in [drivers] survives filtering. *) +- + type os_support = { + q35 : bool; + vio10 : bool; +diff --git a/common/mltools/tools_utils_tests.ml b/common/mltools/tools_utils_tests.ml +index 1489fe69..9784a7b3 100644 +--- a/common/mltools/tools_utils_tests.ml ++++ b/common/mltools/tools_utils_tests.ml +@@ -1,5 +1,5 @@ + (* Common utilities for OCaml tools in libguestfs. +- * Copyright (C) 2011-2019 Red Hat Inc. ++ * Copyright (C) 2011-2025 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -18,19 +18,27 @@ + + (* This file tests the Tools_utils module. *) + +-open OUnit2 +- + open Std_utils + open Tools_utils + +-(* Utils. *) +-let assert_equal_string = assert_equal ~printer:(fun x -> x) +-let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x) +-let assert_equal_int64 = assert_equal ~printer:(fun x -> Int64.to_string x) +-let assert_equal_intlist = assert_equal ~printer:(fun x -> "(" ^ (String.concat ";" (List.map string_of_int x)) ^ ")") ++let assert_equal ~printer a b = ++ if a <> b then ++ failwithf "FAIL: %s <> %s" (printer a) (printer b) ++ ++let assert_equal_string = ++ assert_equal ~printer:identity ++let assert_equal_int = ++ assert_equal ~printer:(fun x -> string_of_int x) ++let assert_equal_int64 = ++ assert_equal ~printer:(fun x -> Int64.to_string x) ++let assert_equal_intlist = ++ assert_equal ~printer:(fun x -> "(" ^ (String.concat ";" (List.map string_of_int x)) ^ ")") ++ ++let assert_bool name b = ++ if not b then failwithf "FAIL: %s" name + + (* Test Tools_utils.parse_size and Tools_utils.parse_resize. *) +-let test_parse_resize ctx = ++let () = + assert_equal_int64 1_L (parse_size "1b"); + assert_equal_int64 10_L (parse_size "10b"); + assert_equal_int64 1024_L (parse_size "1K"); +@@ -77,7 +85,7 @@ let test_parse_resize ctx = + assert_equal_int64 101100_L (parse_resize 100000_L "+1.12%") + + (* Test Tools_utils.human_size. *) +-let test_human_size ctx = ++let () = + assert_equal_string "100" (human_size 100_L); + assert_equal_string "-100" (human_size (-100_L)); + assert_equal_string "1.0K" (human_size 1024_L); +@@ -90,17 +98,19 @@ let test_human_size ctx = + assert_equal_string "-3.4G" (human_size (-3650722201_L)) + + (* Test Tools_utils.run_command. *) +-let test_run_command ctx = ++let () = + assert_equal_int 0 (run_command ["true"]); + begin +- let tmpfile, chan = bracket_tmpfile ctx in ++ let tmpfile, chan = Filename.open_temp_file "tmp" ".tmp" in ++ On_exit.unlink tmpfile; + let res = run_command ["echo"; "this is a test"] ~stdout_fd:(Unix.descr_of_out_channel chan) in + assert_equal_int 0 res; + let content = read_whole_file tmpfile in + assert_equal_string "this is a test\n" content + end; + begin +- let tmpfile, chan = bracket_tmpfile ctx in ++ let tmpfile, chan = Filename.open_temp_file "tmp" ".tmp" in ++ On_exit.unlink tmpfile; + let res = run_command ["ls"; "/this-directory-is-unlikely-to-exist"] ~stderr_fd:(Unix.descr_of_out_channel chan) in + assert_equal_int 2 res; + let content = read_whole_file tmpfile in +@@ -109,7 +119,7 @@ let test_run_command ctx = + () + + (* Test Tools_utils.run_commands. *) +-let test_run_commands ctx = ++let () = + begin + let res = run_commands [] in + assert_equal_intlist [] res +@@ -127,44 +137,35 @@ let test_run_commands ctx = + assert_equal_intlist [127] res + end; + begin +- let tmpfile, chan = bracket_tmpfile ctx in ++ let tmpfile, chan = Filename.open_temp_file "tmp" ".tmp" in ++ On_exit.unlink tmpfile; + let res = run_commands [(["echo"; "this is a test"], Some (Unix.descr_of_out_channel chan), None)] in + assert_equal_intlist [0] res; + let content = read_whole_file tmpfile in + assert_equal_string "this is a test\n" content + end; + begin +- let tmpfile, chan = bracket_tmpfile ctx in ++ let tmpfile, chan = Filename.open_temp_file "tmp" ".tmp" in ++ On_exit.unlink tmpfile; + let res = run_commands [(["ls"; "/this-directory-is-unlikely-to-exist"], None, Some (Unix.descr_of_out_channel chan))] in + assert_equal_intlist [2] res; + let content = read_whole_file tmpfile in + assert_bool "test_run_commands/not-existing/content" (String.length content > 0) + end; + begin +- let tmpfile, chan = bracket_tmpfile ctx in ++ let tmpfile, chan = Filename.open_temp_file "tmp" ".tmp" in ++ On_exit.unlink tmpfile; + let res = run_commands [(["echo"; "this is a test"], Some (Unix.descr_of_out_channel chan), None); (["false"], None, None)] in + assert_equal_intlist [0; 1] res; + let content = read_whole_file tmpfile in + assert_equal_string "this is a test\n" content + end; + begin +- let tmpfile, chan = bracket_tmpfile ctx in ++ let tmpfile, chan = Filename.open_temp_file "tmp" ".tmp" in ++ On_exit.unlink tmpfile; + let res = run_commands [(["this-command-does-not-really-exist"], None, None); (["echo"; "this is a test"], Some (Unix.descr_of_out_channel chan), None)] in + assert_equal_intlist [127; 0] res; + let content = read_whole_file tmpfile in + assert_equal_string "this is a test\n" content + end; + () +- +-(* Suites declaration. *) +-let suite = +- "mltools Tools_utils" >::: +- [ +- "sizes.parse_resize" >:: test_parse_resize; +- "sizes.human_size" >:: test_human_size; +- "run_command" >:: test_run_command; +- "run_commands" >:: test_run_commands; +- ] +- +-let () = +- run_test_tt_main suite +diff --git a/common/mlutils/Makefile.am b/common/mlutils/Makefile.am +index 17dfac3f..d52cb9c8 100644 +--- a/common/mlutils/Makefile.am ++++ b/common/mlutils/Makefile.am +@@ -93,13 +93,8 @@ $(MLCUTILS_CMA): $(OBJECTS) libmlcutils.a + + # Tests. + +-TESTS = +-check_PROGRAMS = +- +-if HAVE_OCAML_PKG_OUNIT +-TESTS += c_utils_unit_tests +-check_PROGRAMS += c_utils_unit_tests +-endif ++TESTS = c_utils_unit_tests ++check_PROGRAMS = c_utils_unit_tests + + c_utils_unit_tests_BOBJECTS = \ + c_utils_unit_tests.cmo +@@ -112,10 +107,8 @@ c_utils_unit_tests_CFLAGS = $(libmlcutils_a_CFLAGS) + if !HAVE_OCAMLOPT + # Can't call this c_utils_unit_tests_OBJECTS because automake gets confused. + c_utils_unit_tests_THEOBJECTS = $(c_utils_unit_tests_BOBJECTS) +-c_utils_unit_tests.cmo: OCAMLPACKAGES += -package ounit2 + else + c_utils_unit_tests_THEOBJECTS = $(c_utils_unit_tests_XOBJECTS) +-c_utils_unit_tests.cmx: OCAMLPACKAGES += -package ounit2 + endif + + OCAMLLINKFLAGS = \ +@@ -131,7 +124,7 @@ c_utils_unit_tests_DEPENDENCIES = \ + c_utils_unit_tests_LINK = \ + $(top_srcdir)/ocaml-link.sh -cclib '-lutils -lgnu' -- \ + $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) \ +- $(OCAMLPACKAGES) -package ounit2 \ ++ $(OCAMLPACKAGES) \ + $(OCAMLLINKFLAGS) \ + $(c_utils_unit_tests_THEOBJECTS) -o $@ + +diff --git a/common/mlutils/c_utils_unit_tests.ml b/common/mlutils/c_utils_unit_tests.ml +index ebc5db1a..961dac54 100644 +--- a/common/mlutils/c_utils_unit_tests.ml ++++ b/common/mlutils/c_utils_unit_tests.ml +@@ -1,5 +1,5 @@ + (* virt-v2v +- * Copyright (C) 2011-2019 Red Hat Inc. ++ * Copyright (C) 2011-2025 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -20,12 +20,28 @@ + + open Printf + +-open OUnit2 +- + open Std_utils + open C_utils + +-let test_drive_name ctx = ++let assert_equal ~printer a b = ++ if a <> b then ++ failwithf "FAIL: %s <> %s" (printer a) (printer b) ++ ++let assert_raises exn fn = ++ try ++ fn (); ++ failwithf "FAIL: expected function to raise an exception" ++ with exn' -> ++ if exn <> exn' then ( ++ eprintf "FAIL: function raised the wrong exception:\n\ ++ expected %s\n\ ++ actual %s\n" ++ (Printexc.to_string exn) (Printexc.to_string exn'); ++ exit 1 ++ ) ++ ++(* Test drive_name function. *) ++let () = + let printer = identity in + assert_equal ~printer "a" (drive_name 0); + assert_equal ~printer "z" (drive_name 25); +@@ -37,7 +53,8 @@ let test_drive_name ctx = + assert_equal ~printer "aaa" (drive_name 702); + assert_equal ~printer "zzz" (drive_name 18277) + +-let test_drive_index ctx = ++(* Test drive_index function. *) ++let () = + let printer = string_of_int in + assert_equal ~printer 0 (drive_index "a"); + assert_equal ~printer 25 (drive_index "z"); +@@ -55,7 +72,8 @@ let test_drive_index ctx = + assert_raises exn (fun () -> drive_index "Z"); + assert_raises exn (fun () -> drive_index "aB") + +-let test_shell_unquote ctx = ++(* Test shell_unquote function. *) ++let () = + let printer = identity in + assert_equal ~printer "a" (shell_unquote "a"); + assert_equal ~printer "b" (shell_unquote "'b'"); +@@ -67,15 +85,3 @@ let test_shell_unquote ctx = + assert_equal ~printer "h\\-h" (shell_unquote "\"h\\-h\""); + assert_equal ~printer "i`" (shell_unquote "\"i\\`\""); + assert_equal ~printer "j\"" (shell_unquote "\"j\\\"\"") +- +-(* Suites declaration. *) +-let suite = +- "C_utils" >::: +- [ +- "C_utils.drive_name" >:: test_drive_name; +- "C_utils.drive_index" >:: test_drive_index; +- "C_utils.shell_unquote" >:: test_shell_unquote; +- ] +- +-let () = +- run_test_tt_main suite +diff --git a/common-rules.mk b/common-rules.mk +index b2e8ead2..4df1e33f 100644 +--- a/common-rules.mk ++++ b/common-rules.mk +@@ -36,9 +36,6 @@ CLEANFILES += *.cmi *.cmo *.cma *.cmx *.cmxa dll*.so *.a + # OCaml -annot files (used for displaying types in some IDEs). + CLEANFILES += *.annot + +-# OCaml oUnit generated files. +-CLEANFILES += oUnit-*.cache oUnit-*.log +- + # Manual pages - these are all generated from *.pod, so the + # pages themselves should all be removed by 'make clean'. + CLEANFILES += *.1 *.3 *.5 *.8 +diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4 +index 7ca0a6d5..aa397f40 100644 +--- a/m4/guestfs-ocaml.m4 ++++ b/m4/guestfs-ocaml.m4 +@@ -99,8 +99,6 @@ if test "x$OCAML_PKG_nbd" = "xno"; then + fi + + OCAML_PKG_gettext=no +-OCAML_PKG_ounit2=no +-ounit_is_v2=no + AS_IF([test "x$OCAMLC" != "xno"],[ + # Create common/mlgettext/common_gettext.ml gettext functions or stubs. + +@@ -109,18 +107,9 @@ AS_IF([test "x$OCAMLC" != "xno"],[ + mkdir -p common/mlgettext + + GUESTFS_CREATE_COMMON_GETTEXT_ML([common/mlgettext/common_gettext.ml]) +- +- AC_CHECK_OCAML_PKG(ounit2) +- +- # oUnit >= 2 is required, so check that it has OUnit2. +- if test "x$OCAML_PKG_ounit2" != "xno"; then +- AC_CHECK_OCAML_MODULE(ounit_is_v2,[OUnit.OUnit2],OUnit2,[+ounit2]) +- fi + ]) + AM_CONDITIONAL([HAVE_OCAML_PKG_GETTEXT], + [test "x$OCAML_PKG_gettext" != "xno"]) +-AM_CONDITIONAL([HAVE_OCAML_PKG_OUNIT], +- [test "x$OCAML_PKG_ounit2" != "xno" && test "x$ounit_is_v2" != "xno"]) + + AC_CHECK_PROG([OCAML_GETTEXT],[ocaml-gettext],[ocaml-gettext],[no]) + AM_CONDITIONAL([HAVE_OCAML_GETTEXT], diff --git a/0003-v2v-Use-nbdcopy-blkhash-in-verbose-mode.patch b/0003-v2v-Use-nbdcopy-blkhash-in-verbose-mode.patch new file mode 100644 index 0000000..01d67b6 --- /dev/null +++ b/0003-v2v-Use-nbdcopy-blkhash-in-verbose-mode.patch @@ -0,0 +1,77 @@ +From cffd129d8fd47554255d52ad611d58a30b6b9951 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 31 Mar 2025 11:06:09 +0100 +Subject: [PATCH] v2v: Use nbdcopy --blkhash in verbose mode + +In verbose mode, and if nbdcopy supports it, add the nbdcopy --blkhash +option. This will compute and print a hash of the disk as we are +copying it (more precisely, a hash of the source disk after conversion +changes have been made). This will allow users to detect any +corruption during or after writing the output. + +This feature requires nbdcopy >= 1.23.1 + +It adds some overhead to the copy, but (a) we're almost always copying +over the network which is slow anyway and (b) this is only done in +verbose mode where there's a lot of overhead from the output anyway. +However keep an eye on this overhead. + +Note what is printed is a blkhash, not a regular checksum. See: +https://gitlab.com/nirs/blkhash/ + +Fixes: https://issues.redhat.com/browse/RHEL-85508 +Fixes: https://issues.redhat.com/browse/RHEL-85512 +Fixes: https://issues.redhat.com/browse/RHEL-85514 +--- + lib/utils.ml | 8 ++++++++ + lib/utils.mli | 3 +++ + v2v/v2v.ml | 3 +++ + 3 files changed, 14 insertions(+) + +diff --git a/lib/utils.ml b/lib/utils.ml +index eab69d5a..9568a9d9 100644 +--- a/lib/utils.ml ++++ b/lib/utils.ml +@@ -180,6 +180,14 @@ let error_if_no_ssh_agent () = + is not set). This is required by qemu to do passwordless \ + ssh access. See the virt-v2v(1) man page for more information.") + ++let nbdcopy_supports_blkhash = ++ let check = ++ lazy ( ++ let cmd = sprintf "%s --help | grep -sq -- --blkhash" Config.nbdcopy in ++ 0 = Sys.command cmd ++ ) in ++ fun () -> Lazy.force check ++ + (* Create the directory containing inX and outX sockets. *) + let create_v2v_directory () = + let d = Mkdtemp.temp_dir "v2v." in +diff --git a/lib/utils.mli b/lib/utils.mli +index 9c394eca..a79628bd 100644 +--- a/lib/utils.mli ++++ b/lib/utils.mli +@@ -68,6 +68,9 @@ val chown_for_libvirt_rhbz_1045069 : string -> unit + + val error_if_no_ssh_agent : unit -> unit + ++val nbdcopy_supports_blkhash : unit -> bool ++(** Return true if [nbdcopy] supports the [--blkhash] flag. *) ++ + val create_v2v_directory : unit -> string + (** Create the directory containing inX and outX sockets. *) + +diff --git a/v2v/v2v.ml b/v2v/v2v.ml +index c0ca26ec..1fcf8e61 100644 +--- a/v2v/v2v.ml ++++ b/v2v/v2v.ml +@@ -728,6 +728,9 @@ and nbdcopy ?request_size output_alloc input_uri output_uri = + min 64 (target_buffer_size / request_size) in + List.push_back cmd (sprintf "--requests=%d" requests); + ++ if verbose () && nbdcopy_supports_blkhash () then ++ List.push_back cmd "--blkhash"; ++ + List.push_back cmd "--flush"; + (*List.push_back cmd "--verbose";*) + diff --git a/0002-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch similarity index 87% rename from 0002-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch rename to 0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch index 6beaf92..5e3292d 100644 --- a/0002-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +++ b/0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -1,4 +1,4 @@ -From 8d792ee85d5fc188cba79faff477ef5f73d73022 Mon Sep 17 00:00:00 2001 +From 7236e9f76c1c0e41d1e95971adc638e39887dea8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 28 Sep 2014 19:14:43 +0100 Subject: [PATCH] RHEL: v2v: Select correct qemu binary for -o qemu mode @@ -16,10 +16,10 @@ support cases. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/output_qemu.ml b/output/output_qemu.ml -index 26c1ba48..07dae8c2 100644 +index 2a21b5cf..39778724 100644 --- a/output/output_qemu.ml +++ b/output/output_qemu.ml -@@ -131,7 +131,7 @@ module QEMU = struct +@@ -159,7 +159,7 @@ module QEMU = struct * module deals with shell and qemu comma quoting. *) let cmd = Qemuopts.create () in diff --git a/0003-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch b/0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch similarity index 91% rename from 0003-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch rename to 0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch index dc52156..1db34cd 100644 --- a/0003-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +++ b/0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch @@ -1,4 +1,4 @@ -From f2dbe2f1c595c1201b0f404950b3c4c57f11c04b Mon Sep 17 00:00:00 2001 +From dabda2010e51d05ccab05d29e5977c58908b5440 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Sep 2014 10:50:27 +0100 Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option @@ -17,7 +17,7 @@ qemu script. 4 files changed, 5 insertions(+), 23 deletions(-) diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod -index d2a1c270..0be37f5e 100644 +index 5a342434..bdf12c5d 100644 --- a/docs/virt-v2v-output-local.pod +++ b/docs/virt-v2v-output-local.pod @@ -9,7 +9,7 @@ or libvirt @@ -44,7 +44,7 @@ index d2a1c270..0be37f5e 100644 =item B<-o null> diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 5345a6c9..a1e8fb30 100644 +index 084f29e7..97d9397f 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -157,11 +157,6 @@ Since F contains the path(s) to the guest disk @@ -81,7 +81,7 @@ index 5345a6c9..a1e8fb30 100644 =item B<-oo verify-server-certificate> =item B<-oo verify-server-certificate=>C -@@ -793,10 +780,6 @@ Print information about the source guest and stop. This option is +@@ -806,10 +793,6 @@ Print information about the source guest and stop. This option is useful when you are setting up network and bridge maps. See L. @@ -93,7 +93,7 @@ index 5345a6c9..a1e8fb30 100644 =item B<--quiet> diff --git a/output/output_qemu.ml b/output/output_qemu.ml -index 07dae8c2..b6f24565 100644 +index 39778724..416000cd 100644 --- a/output/output_qemu.ml +++ b/output/output_qemu.ml @@ -65,6 +65,9 @@ module QEMU = struct @@ -107,11 +107,11 @@ index 07dae8c2..b6f24565 100644 let output_storage = match options.output_storage with diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index 194e6233..6baa111f 100644 +index 1fcf8e61..77a37eca 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml -@@ -277,8 +277,6 @@ let rec main () = - s_"Same as ‘-ip filename’"; +@@ -280,8 +280,6 @@ let rec main () = + s_"Run up to N instances of nbdcopy in parallel"; [ L"print-source" ], Getopt.Set print_source, s_"Print source and stop"; - [ L"qemu-boot" ], Getopt.Unit (fun () -> set_output_option_compat "qemu-boot" ""), diff --git a/0004-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch similarity index 71% rename from 0004-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch rename to 0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch index 095cd87..ea0454b 100644 --- a/0004-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +++ b/0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch @@ -1,4 +1,4 @@ -From c9da5056aa7b0d939724b325808a587f79fdb01e Mon Sep 17 00:00:00 2001 +From 6f02c25c8000ccfa7eb0daa6c886fa6b99c15eef Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 24 Apr 2015 09:45:41 -0400 Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu @@ -9,10 +9,10 @@ Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/utils.ml b/lib/utils.ml -index bf010a0a..4c9b7415 100644 +index 9568a9d9..b30ac256 100644 --- a/lib/utils.ml +++ b/lib/utils.ml -@@ -60,13 +60,14 @@ let kvm_arch = function +@@ -66,13 +66,14 @@ let kvm_arch = function (* Does qemu support the given sound card? *) let qemu_supports_sound_card = function | Types.AC97 @@ -27,5 +27,5 @@ index bf010a0a..4c9b7415 100644 - -> true + -> false - (* Find the UEFI firmware. *) - let find_uefi_firmware guest_arch = + let compare_app2_versions app1 app2 = + let i = compare app1.Guestfs.app2_epoch app2.Guestfs.app2_epoch in diff --git a/0005-RHEL-Fixes-for-libguestfs-winsupport.patch b/0007-RHEL-Fixes-for-libguestfs-winsupport.patch similarity index 56% rename from 0005-RHEL-Fixes-for-libguestfs-winsupport.patch rename to 0007-RHEL-Fixes-for-libguestfs-winsupport.patch index 5519983..1f11c4f 100644 --- a/0005-RHEL-Fixes-for-libguestfs-winsupport.patch +++ b/0007-RHEL-Fixes-for-libguestfs-winsupport.patch @@ -1,7 +1,7 @@ -From de77ecd123658dd28362da72783424f4a3ff5deb Mon Sep 17 00:00:00 2001 +From c30041193a17787a7904b3154213f145cc798a15 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 30 Aug 2015 03:21:57 -0400 -Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport. +Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport In tests we cannot use guestfish for arbitrary Windows edits. In virt-v2v helpers we must set the program name to virt-v2v. @@ -9,16 +9,17 @@ In virt-v2v helpers we must set the program name to virt-v2v. For RHEL 9.3 and above, see this comment: https://bugzilla.redhat.com/show_bug.cgi?id=2187961#c1 --- - convert/convert.ml | 1 + - test-data/phony-guests/make-windows-img.sh | 1 + - tests/test-v2v-block-driver.sh | 6 +++++- - tests/test-v2v-in-place.sh | 8 +++++++- - tests/test-v2v-virtio-win-iso.sh | 8 +++++++- - tests/test-v2v-windows-conversion.sh | 8 +++++++- - 6 files changed, 28 insertions(+), 4 deletions(-) + convert/convert.ml | 1 + + test-data/phony-guests/make-windows-img.sh | 1 + + tests/test-block-driver.sh | 6 +++++- + tests/test-in-place.sh | 8 +++++++- + tests/test-virtio-win-iso.sh | 8 +++++++- + tests/test-windows-conversion.sh | 8 +++++++- + tests/test-windows-phony.sh | 13 ++++++++++++- + 7 files changed, 40 insertions(+), 5 deletions(-) diff --git a/convert/convert.ml b/convert/convert.ml -index 64b36c97..604902d1 100644 +index 1deb1478..ed8ad537 100644 --- a/convert/convert.ml +++ b/convert/convert.ml @@ -53,6 +53,7 @@ let rec convert dir options source = @@ -30,21 +31,21 @@ index 64b36c97..604902d1 100644 (* Setting the number of vCPUs allows parallel mkinitrd, but make * sure this is not too large because each vCPU consumes guest RAM. diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh -index 501c2a93..28b2744f 100755 +index b52d2522..8d036ee6 100755 --- a/test-data/phony-guests/make-windows-img.sh +++ b/test-data/phony-guests/make-windows-img.sh -@@ -37,6 +37,7 @@ fi +@@ -49,6 +49,7 @@ fi # Create a disk image. guestfish < "$script" :> "$expected" @@ -84,10 +85,10 @@ index 4373f140..2b31b0bb 100755 diff -u "$expected" "$response" # Test the base image remained untouched -diff --git a/tests/test-v2v-virtio-win-iso.sh b/tests/test-v2v-virtio-win-iso.sh -index 68fb879b..2e133034 100755 ---- a/tests/test-v2v-virtio-win-iso.sh -+++ b/tests/test-v2v-virtio-win-iso.sh +diff --git a/tests/test-virtio-win-iso.sh b/tests/test-virtio-win-iso.sh +index ccc42550..cd92db92 100755 +--- a/tests/test-virtio-win-iso.sh ++++ b/tests/test-virtio-win-iso.sh @@ -82,6 +82,12 @@ mktest () :> "$script" :> "$expected" @@ -108,10 +109,10 @@ index 68fb879b..2e133034 100755 -guestfish --ro -a "$d/windows-sda" -i < "$script" > "$response" +guestfish --ro -a "$d/windows-sda" < "$script" > "$response" diff -u "$expected" "$response" -diff --git a/tests/test-v2v-windows-conversion.sh b/tests/test-v2v-windows-conversion.sh -index a4cf191d..1ff41f6a 100755 ---- a/tests/test-v2v-windows-conversion.sh -+++ b/tests/test-v2v-windows-conversion.sh +diff --git a/tests/test-windows-conversion.sh b/tests/test-windows-conversion.sh +index bfe04904..eeddcb86 100755 +--- a/tests/test-windows-conversion.sh ++++ b/tests/test-windows-conversion.sh @@ -76,6 +76,12 @@ mktest () :> "$script" :> "$expected" @@ -125,12 +126,41 @@ index a4cf191d..1ff41f6a 100755 firstboot_dir="/Program Files/Guestfs/Firstboot" mktest "is-dir \"$firstboot_dir\"" true mktest "is-file \"$firstboot_dir/firstboot.bat\"" true -@@ -88,7 +94,7 @@ for drv in netkvm vioscsi viostor; do - done - done +@@ -83,7 +89,7 @@ mktest "is-dir \"$firstboot_dir/scripts\"" true + virtio_dir="/Windows/Drivers/VirtIO" + mktest "ls \"$virtio_dir\"" "$(cat test-windows-conversion-ls.txt)" -guestfish --ro -a "$d/windows-sda" -i < "$script" > "$response" +guestfish --ro -a "$d/windows-sda" < "$script" > "$response" diff -u "$expected" "$response" # We also update the Registry several times, for firstboot, and (ONLY +diff --git a/tests/test-windows-phony.sh b/tests/test-windows-phony.sh +index 066ff0ff..3f761b68 100755 +--- a/tests/test-windows-phony.sh ++++ b/tests/test-windows-phony.sh +@@ -69,6 +69,17 @@ mktest () + :> "$script" + :> "$expected" + ++cat >> "$script" <> "$expected" < "$response" ++guestfish --ro -a "$d/$guestname-sda" < "$script" > "$response" + diff -u "$expected" "$response" diff --git a/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch similarity index 80% rename from 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch rename to 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch index e2c0759..2c8fbf0 100644 --- a/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +++ b/0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch @@ -1,4 +1,4 @@ -From 1c85b582fc38f379b54efe344dc2323db95acc78 Mon Sep 17 00:00:00 2001 +From 1fdd651db409b8432a836f4097296d551d22ff07 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Mar 2017 14:21:37 +0100 Subject: [PATCH] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) @@ -9,12 +9,12 @@ The SDL output mode is not supported in RHEL's qemu-kvm. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/input_disk.ml b/input/input_disk.ml -index cf1f811b..27fc80de 100644 +index 61ac9a8b..a54f06f9 100644 --- a/input/input_disk.ml +++ b/input/input_disk.ml -@@ -77,7 +77,7 @@ module Disk = struct - s_features = [ "acpi"; "apic"; "pae" ]; +@@ -78,7 +78,7 @@ module Disk = struct s_firmware = UnknownFirmware; (* causes virt-v2v to autodetect *) + s_uefi_secureboot = false; s_display = - Some { s_display_type = Window; s_keymap = None; s_password = None; + Some { s_display_type = VNC; s_keymap = None; s_password = None; diff --git a/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch similarity index 96% rename from 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch rename to 0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch index 1245224..d0aa6df 100644 --- a/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +++ b/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch @@ -1,4 +1,4 @@ -From 6b7b2934d54d5273bb6c444ddabccef3a64c5eee Mon Sep 17 00:00:00 2001 +From aea6d02693e0f3afc36c5052d70e04ff58b95c32 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 26 Mar 2019 09:42:25 +0100 Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests @@ -8,7 +8,7 @@ Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests 1 file changed, 4 insertions(+), 92 deletions(-) diff --git a/docs/virt-v2v-support.pod b/docs/virt-v2v-support.pod -index e6415692..1ffc0f9d 100644 +index 60cd1b69..f563389e 100644 --- a/docs/virt-v2v-support.pod +++ b/docs/virt-v2v-support.pod @@ -8,98 +8,10 @@ systems and guests in virt-v2v diff --git a/0008-RHEL-Remove-input-from-Xen.patch b/0010-RHEL-Remove-input-from-Xen.patch similarity index 95% rename from 0008-RHEL-Remove-input-from-Xen.patch rename to 0010-RHEL-Remove-input-from-Xen.patch index 8b2a665..7d8bf38 100644 --- a/0008-RHEL-Remove-input-from-Xen.patch +++ b/0010-RHEL-Remove-input-from-Xen.patch @@ -1,4 +1,4 @@ -From 0b4fc69b54bf5a8fafc9bed62749ff2c91eeb21d Mon Sep 17 00:00:00 2001 +From 9657cdcf89cd7ae09fe1890908655fb9e08b64fa Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 8 Jul 2024 09:35:54 +0100 Subject: [PATCH] RHEL: Remove input from Xen @@ -11,19 +11,19 @@ Fixes: https://issues.redhat.com/browse/RHEL-37687 --- docs/Makefile.am | 14 ---- docs/virt-v2v-input-xen.pod | 154 ------------------------------------ - docs/virt-v2v.pod | 52 ++---------- + docs/virt-v2v.pod | 50 ++---------- input/Makefile.am | 4 +- input/input_xen_ssh.ml | 132 ------------------------------- input/input_xen_ssh.mli | 21 ----- inspector/inspector.ml | 4 - v2v/v2v.ml | 5 -- - 8 files changed, 6 insertions(+), 380 deletions(-) + 8 files changed, 6 insertions(+), 378 deletions(-) delete mode 100644 docs/virt-v2v-input-xen.pod delete mode 100644 input/input_xen_ssh.ml delete mode 100644 input/input_xen_ssh.mli diff --git a/docs/Makefile.am b/docs/Makefile.am -index 0f6a3e21..7cb6e09a 100644 +index dc36487c..36a831bf 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -23,7 +23,6 @@ EXTRA_DIST = \ @@ -70,7 +70,7 @@ index 0f6a3e21..7cb6e09a 100644 stamp-virt-v2v-inspector.pod: virt-v2v-inspector.pod diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod deleted file mode 100644 -index 4a0544f8..00000000 +index 0417e89f..00000000 --- a/docs/virt-v2v-input-xen.pod +++ /dev/null @@ -1,154 +0,0 @@ @@ -227,9 +227,9 @@ index 4a0544f8..00000000 - -=head1 COPYRIGHT - --Copyright (C) 2009-2020 Red Hat Inc. +-Copyright (C) 2009-2025 Red Hat Inc. diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index a1e8fb30..ca75c255 100644 +index 97d9397f..036b72ab 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -12,7 +12,7 @@ virt-v2v - Convert a guest to use KVM @@ -277,7 +277,7 @@ index a1e8fb30..ca75c255 100644 =item B<-if> format -@@ -859,40 +851,6 @@ __CUSTOMIZE_OPTIONS__ +@@ -872,38 +864,6 @@ __CUSTOMIZE_OPTIONS__ =head1 NOTES @@ -292,8 +292,6 @@ index a1e8fb30..ca75c255 100644 -installed. For some older Linux distributions, this means installing -a kernel from the table below: - -- RHEL 3 (Does not apply, as there was no Xen PV kernel) -- - RHEL 4 i686 with > 10GB of RAM: install 'kernel-hugemem' - i686 SMP: install 'kernel-smp' - other i686: install 'kernel' @@ -318,7 +316,7 @@ index a1e8fb30..ca75c255 100644 =head2 Enabling virtio "Virtio" is the name for a set of drivers which make disk (block -@@ -1184,7 +1142,7 @@ bandwidth. Virt-v2v should be able to copy guest data at gigabit +@@ -1229,7 +1189,7 @@ bandwidth. Virt-v2v should be able to copy guest data at gigabit ethernet speeds or greater. Ensure that the network connections between servers (conversion @@ -328,7 +326,7 @@ index a1e8fb30..ca75c255 100644 =head3 Disk space diff --git a/input/Makefile.am b/input/Makefile.am -index 4153f878..2f4ceb0c 100644 +index 19f30b47..a33b826a 100644 --- a/input/Makefile.am +++ b/input/Makefile.am @@ -29,7 +29,6 @@ SOURCES_MLI = \ @@ -351,12 +349,12 @@ index 4153f878..2f4ceb0c 100644 # compilation of the C sources for us. At the end we take the C diff --git a/input/input_xen_ssh.ml b/input/input_xen_ssh.ml deleted file mode 100644 -index c4235a4b..00000000 +index 77ee0ea1..00000000 --- a/input/input_xen_ssh.ml +++ /dev/null @@ -1,132 +0,0 @@ -(* helper-v2v-input -- * Copyright (C) 2009-2021 Red Hat Inc. +- * Copyright (C) 2009-2025 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by @@ -489,12 +487,12 @@ index c4235a4b..00000000 -end diff --git a/input/input_xen_ssh.mli b/input/input_xen_ssh.mli deleted file mode 100644 -index fa048231..00000000 +index 339309b8..00000000 --- a/input/input_xen_ssh.mli +++ /dev/null @@ -1,21 +0,0 @@ -(* virt-v2v -- * Copyright (C) 2009-2021 Red Hat Inc. +- * Copyright (C) 2009-2025 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by @@ -515,7 +513,7 @@ index fa048231..00000000 - -module XenSSH : Input.INPUT diff --git a/inspector/inspector.ml b/inspector/inspector.ml -index 1ad67bbc..d7cbf449 100644 +index 0a04b312..47d50347 100644 --- a/inspector/inspector.ml +++ b/inspector/inspector.ml @@ -296,10 +296,6 @@ read the man page virt-v2v-inspector(1). @@ -530,10 +528,10 @@ index 1ad67bbc..d7cbf449 100644 * deliberately not supporting this in new virt-v2v. Don't * use virt-v2v if a guest already runs on KVM. diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index 6baa111f..9a622da0 100644 +index 77a37eca..9999b639 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml -@@ -398,7 +398,6 @@ read the man page virt-v2v(1). +@@ -404,7 +404,6 @@ read the man page virt-v2v(1). pr "virt-v2v-2.0\n"; pr "libguestfs-rewrite\n"; pr "vcenter-https\n"; @@ -541,7 +539,7 @@ index 6baa111f..9a622da0 100644 pr "vddk\n"; pr "colours-option\n"; pr "vdsm-compat-option\n"; -@@ -463,10 +462,6 @@ read the man page virt-v2v(1). +@@ -470,10 +469,6 @@ read the man page virt-v2v(1). | Some server, Some ("esx"|"gsx"|"vpx"), Some `VDDK -> (module Input_vddk.VDDK) diff --git a/0010-RHEL-Remove-the-in-place-option.patch b/0010-RHEL-Remove-the-in-place-option.patch deleted file mode 100644 index 098ee73..0000000 --- a/0010-RHEL-Remove-the-in-place-option.patch +++ /dev/null @@ -1,84 +0,0 @@ -From af62ac81540fc6baf10c572ae5440dd4b678b073 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 2 Dec 2021 11:56:05 +0000 -Subject: [PATCH] RHEL: Remove the --in-place option - -This disables the virt-v2v --in-place option which we do not -wish to support in RHEL. ---- - docs/virt-v2v.pod | 8 -------- - tests/Makefile.am | 1 - - v2v/v2v.ml | 8 -------- - 3 files changed, 17 deletions(-) - -diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 6e26e62c..2230a556 100644 ---- a/docs/virt-v2v.pod -+++ b/docs/virt-v2v.pod -@@ -25,9 +25,6 @@ virtualize those machines (physical to virtual, or p2v). - To estimate the disk space needed before conversion, see - L. - --For in-place conversion, there is a separate tool called --L. -- - =head2 Input and Output - - You normally run virt-v2v with several I<-i*> options controlling the -@@ -40,10 +37,6 @@ The input and output sides of virt-v2v are separate and unrelated. - Virt-v2v can read from any input and write to any output. Therefore - these sides of virt-v2v are documented separately in this manual. - --Virt-v2v normally copies from the input to the output, called "copying --mode". In this case the source guest is always left unchanged. --In-place conversions may be done using L. -- - =head2 Customization - - Virt-v2v can also customize the guest during conversion, using the -@@ -1639,7 +1632,6 @@ L, - L, --L, - L, - L, - L, -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 1c3d6064..cee516c4 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -77,7 +77,6 @@ TESTS = \ - test-v2v-floppy.sh \ - test-v2v-i-disk.sh \ - test-v2v-i-ova.sh \ -- test-v2v-in-place.sh \ - test-v2v-block-driver.sh \ - test-v2v-inspector.sh \ - test-v2v-mac.sh \ -diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index 801aaf7d..c18aeaa1 100644 ---- a/v2v/v2v.ml -+++ b/v2v/v2v.ml -@@ -219,12 +219,6 @@ let rec main () = - warning (f_"the --vmtype option has been removed and now does nothing") - in - -- (* Options that are errors. *) -- let in_place_error _ = -- error (f_"The --in-place option has been replaced by the \ -- ‘virt-v2v-in-place’ program") -- in -- - let argspec = [ - [ L"bandwidth" ], Getopt.String ("bps", set_string_option_once "--bandwidth" bandwidth), - s_"Set bandwidth to bits per sec"; -@@ -248,8 +242,6 @@ let rec main () = - s_"Use password from file to connect to input hypervisor"; - [ M"it" ], Getopt.String ("transport", set_string_option_once "-it" input_transport), - s_"Input transport"; -- [ L"in-place" ], Getopt.Unit in_place_error, -- s_"Use virt-v2v-in-place instead"; - [ L"mac" ], Getopt.String ("mac:network|bridge|ip:out", add_mac), - s_"Map NIC to network or bridge or assign static IP"; - [ S 'n'; L"network" ], Getopt.String ("in:out", add_network), diff --git a/0009-RHEL-Remove-o-glance.patch b/0011-RHEL-Remove-o-glance.patch similarity index 90% rename from 0009-RHEL-Remove-o-glance.patch rename to 0011-RHEL-Remove-o-glance.patch index 5ca40e5..1881a90 100644 --- a/0009-RHEL-Remove-o-glance.patch +++ b/0011-RHEL-Remove-o-glance.patch @@ -1,4 +1,4 @@ -From dce2fe3c583cb6a8259667337df31c6c361fa670 Mon Sep 17 00:00:00 2001 +From 96eafd9ddef8733602d1c517e0cabe29afb5e414 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 30 Jun 2021 11:15:52 +0100 Subject: [PATCH] RHEL: Remove -o glance @@ -8,12 +8,12 @@ Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1977539 docs/virt-v2v-output-openstack.pod | 54 ++---------------------------- docs/virt-v2v.pod | 20 ----------- output/output_glance.mli | 2 +- - tests/test-v2v-o-glance.sh | 3 ++ + tests/test-o-glance.sh | 3 ++ v2v/v2v.ml | 7 +--- 5 files changed, 7 insertions(+), 79 deletions(-) diff --git a/docs/virt-v2v-output-openstack.pod b/docs/virt-v2v-output-openstack.pod -index cd4862b1..54cd276e 100644 +index 9bef76ea..04595816 100644 --- a/docs/virt-v2v-output-openstack.pod +++ b/docs/virt-v2v-output-openstack.pod @@ -10,13 +10,10 @@ virt-v2v-output-openstack - Using virt-v2v to convert guests to OpenStack @@ -98,7 +98,7 @@ index cd4862b1..54cd276e 100644 =head1 AUTHOR diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index ca75c255..6e26e62c 100644 +index 036b72ab..45ccd4d7 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -438,14 +438,6 @@ See L below. @@ -116,7 +116,7 @@ index ca75c255..6e26e62c 100644 =item B<-o> B Set the output method to I. B (or F). @@ -128,7 +128,7 @@ index ca75c255..6e26e62c 100644 =item I<-o local> =item I<-o qemu> -@@ -1371,13 +1358,6 @@ See also L. +@@ -1418,13 +1405,6 @@ See also L. Because of how Cinder volumes are presented as F block devices, using I<-o openstack> normally requires that virt-v2v is run as root. @@ -143,7 +143,7 @@ index ca75c255..6e26e62c 100644 This normally requires root. See the next section. diff --git a/output/output_glance.mli b/output/output_glance.mli -index 972320a2..9befc461 100644 +index 83d67576..7ab1503c 100644 --- a/output/output_glance.mli +++ b/output/output_glance.mli @@ -18,4 +18,4 @@ @@ -152,10 +152,10 @@ index 972320a2..9befc461 100644 -module Glance : Output.OUTPUT +(*module Glance : Output.OUTPUT*) -diff --git a/tests/test-v2v-o-glance.sh b/tests/test-v2v-o-glance.sh -index c0db9115..074b5e16 100755 ---- a/tests/test-v2v-o-glance.sh -+++ b/tests/test-v2v-o-glance.sh +diff --git a/tests/test-o-glance.sh b/tests/test-o-glance.sh +index 9e32d2bf..632579ee 100755 +--- a/tests/test-o-glance.sh ++++ b/tests/test-o-glance.sh @@ -20,6 +20,9 @@ set -e @@ -167,10 +167,10 @@ index c0db9115..074b5e16 100755 set -e set -x diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index 9a622da0..801aaf7d 100644 +index 9999b639..c1eb12ab 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml -@@ -197,7 +197,6 @@ let rec main () = +@@ -198,7 +198,6 @@ let rec main () = if !output_mode <> `Not_set then error (f_"%s option used more than once on the command line") "-o"; match mode with @@ -178,7 +178,7 @@ index 9a622da0..801aaf7d 100644 | "kubevirt" -> output_mode := `Kubevirt | "libvirt" -> output_mode := `Libvirt | "disk" | "local" -> output_mode := `Disk -@@ -257,7 +256,7 @@ let rec main () = +@@ -258,7 +257,7 @@ let rec main () = s_"Map network ‘in’ to ‘out’"; [ L"no-trim" ], Getopt.String ("-", no_trim_warning), s_"Ignored for backwards compatibility"; @@ -187,7 +187,7 @@ index 9a622da0..801aaf7d 100644 s_"Set output mode (default: libvirt)"; [ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc), s_"Set output allocation mode"; -@@ -333,8 +332,6 @@ virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp +@@ -336,8 +335,6 @@ virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp virt-v2v -i disk disk.img -o local -os /var/tmp @@ -196,7 +196,7 @@ index 9a622da0..801aaf7d 100644 There is a companion front-end called \"virt-p2v\" which comes as an ISO or CD image that can be booted on physical machines. -@@ -411,7 +408,6 @@ read the man page virt-v2v(1). +@@ -418,7 +415,6 @@ read the man page virt-v2v(1). pr "input:libvirtxml\n"; pr "input:ova\n"; pr "input:vmx\n"; @@ -204,7 +204,7 @@ index 9a622da0..801aaf7d 100644 pr "output:kubevirt\n"; pr "output:libvirt\n"; pr "output:local\n"; -@@ -504,7 +500,6 @@ read the man page virt-v2v(1). +@@ -511,7 +507,6 @@ read the man page virt-v2v(1). | `Disk -> (module Output_disk.Disk) | `Null -> (module Output_null.Null) | `QEmu -> (module Output_qemu.QEMU) diff --git a/0011-RHEL-tests-Remove-btrfs-test.patch b/0011-RHEL-tests-Remove-btrfs-test.patch deleted file mode 100644 index 4083bc9..0000000 --- a/0011-RHEL-tests-Remove-btrfs-test.patch +++ /dev/null @@ -1,22 +0,0 @@ -From b7614e03e7e6584296fb4b74d951997bfd24b848 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 5 Jul 2022 11:58:09 +0100 -Subject: [PATCH] RHEL: tests: Remove btrfs test - -RHEL does not have btrfs so this test always fails. ---- - tests/Makefile.am | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index cee516c4..ddecdfbf 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -101,7 +101,6 @@ TESTS = \ - test-v2v-sound.sh \ - test-v2v-virtio-win-iso.sh \ - test-v2v-fedora-conversion.sh \ -- test-v2v-fedora-btrfs-conversion.sh \ - test-v2v-fedora-luks-on-lvm-conversion.sh \ - test-v2v-fedora-lvm-on-luks-conversion.sh \ - test-v2v-fedora-md-conversion.sh \ diff --git a/0012-RHEL-tests-Remove-btrfs-test.patch b/0012-RHEL-tests-Remove-btrfs-test.patch new file mode 100644 index 0000000..f5fef21 --- /dev/null +++ b/0012-RHEL-tests-Remove-btrfs-test.patch @@ -0,0 +1,22 @@ +From 0e086ed0e10eee2e51cd7cbb767c9943308c8f27 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 5 Jul 2022 11:58:09 +0100 +Subject: [PATCH] RHEL: tests: Remove btrfs test + +RHEL does not have btrfs so this test always fails. +--- + tests/Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 51faa63d..d5ce6bd3 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -64,7 +64,6 @@ TESTS = \ + test-checksum-good.sh \ + test-checksum-print.sh \ + test-customize.sh \ +- test-fedora-btrfs-conversion.sh \ + test-fedora-conversion.sh \ + test-fedora-luks-on-lvm-conversion.sh \ + test-fedora-lvm-on-luks-conversion.sh \ diff --git a/0012-RHEL-Remove-block-driver-option.patch b/0013-RHEL-Remove-block-driver-option.patch similarity index 84% rename from 0012-RHEL-Remove-block-driver-option.patch rename to 0013-RHEL-Remove-block-driver-option.patch index 59eee07..42b1ef1 100644 --- a/0012-RHEL-Remove-block-driver-option.patch +++ b/0013-RHEL-Remove-block-driver-option.patch @@ -1,4 +1,4 @@ -From e0af932e291fdb9f87b071a873152f757f8ad71c Mon Sep 17 00:00:00 2001 +From 9b6362a804d2e1350b365308edcffbc5def1353d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 28 Apr 2023 12:28:19 +0100 Subject: [PATCH] RHEL: Remove --block-driver option @@ -16,10 +16,10 @@ Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2190387 5 files changed, 2 insertions(+), 41 deletions(-) diff --git a/docs/virt-v2v-in-place.pod b/docs/virt-v2v-in-place.pod -index 4304c0d6..b7384210 100644 +index fb3bc9a4..3e73bfc1 100644 --- a/docs/virt-v2v-in-place.pod +++ b/docs/virt-v2v-in-place.pod -@@ -51,16 +51,6 @@ Display help. +@@ -72,16 +72,6 @@ Display help. See I<--network> below. @@ -37,10 +37,10 @@ index 4304c0d6..b7384210 100644 =item B<--colours> diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 2230a556..eb7da9ca 100644 +index 45ccd4d7..661c18e9 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod -@@ -202,16 +202,6 @@ The options are silently ignored for other input methods. +@@ -209,16 +209,6 @@ The options are silently ignored for other input methods. See I<--network> below. @@ -58,10 +58,10 @@ index 2230a556..eb7da9ca 100644 =item B<--colours> diff --git a/in-place/in_place.ml b/in-place/in_place.ml -index 8286dbc5..2dc406e2 100644 +index 70af0dfb..caf34a0b 100644 --- a/in-place/in_place.ml +++ b/in-place/in_place.ml -@@ -43,7 +43,6 @@ let rec main () = +@@ -49,7 +49,6 @@ let rec main () = let bandwidth = ref None in let bandwidth_file = ref None in @@ -69,7 +69,7 @@ index 8286dbc5..2dc406e2 100644 let input_conn = ref None in let input_format = ref None in let input_password = ref None in -@@ -159,8 +158,6 @@ let rec main () = +@@ -172,8 +171,6 @@ let rec main () = let argspec = [ [ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge), s_"Map bridge ‘in’ to ‘out’"; @@ -78,7 +78,7 @@ index 8286dbc5..2dc406e2 100644 [ S 'i' ], Getopt.String ("disk|libvirt|libvirtxml|ova|vmx", set_input_mode), s_"Set input mode (default: libvirt)"; [ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn), -@@ -225,12 +222,6 @@ read the man page virt-v2v-in-place(1). +@@ -240,12 +237,6 @@ read the man page virt-v2v-in-place(1). (* Dereference the arguments. *) let args = List.rev !args in @@ -91,7 +91,7 @@ index 8286dbc5..2dc406e2 100644 let customize_ops = get_customize_ops () in let input_conn = !input_conn in let input_mode = !input_mode in -@@ -316,7 +307,7 @@ read the man page virt-v2v-in-place(1). +@@ -333,7 +324,7 @@ read the man page virt-v2v-in-place(1). (* Get the conversion options. *) let conv_options = { @@ -101,19 +101,19 @@ index 8286dbc5..2dc406e2 100644 ks = opthandle.ks; network_map; diff --git a/tests/Makefile.am b/tests/Makefile.am -index ddecdfbf..b41fed7f 100644 +index d5ce6bd3..ffcbf722 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -77,7 +77,6 @@ TESTS = \ - test-v2v-floppy.sh \ - test-v2v-i-disk.sh \ - test-v2v-i-ova.sh \ -- test-v2v-block-driver.sh \ - test-v2v-inspector.sh \ - test-v2v-mac.sh \ - test-v2v-machine-readable.sh \ +@@ -57,7 +57,6 @@ TESTS_ENVIRONMENT = $(top_builddir)/run --test + + TESTS = \ + test-bad-networks-and-bridges.sh \ +- test-block-driver.sh \ + test-cdrom.sh \ + test-checksum-bad.sh \ + test-checksum-good-qcow2.sh \ diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index c18aeaa1..d09c200c 100644 +index c1eb12ab..40782651 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -48,7 +48,6 @@ let rec main () = @@ -124,7 +124,7 @@ index c18aeaa1..d09c200c 100644 let input_conn = ref None in let input_format = ref None in let input_password = ref None in -@@ -226,8 +225,6 @@ let rec main () = +@@ -233,8 +232,6 @@ let rec main () = s_"Set bandwidth dynamically from file"; [ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge), s_"Map bridge ‘in’ to ‘out’"; @@ -133,7 +133,7 @@ index c18aeaa1..d09c200c 100644 [ L"compressed" ], Getopt.Unit (fun () -> set_output_option_compat "compressed" ""), s_"Compress output file (-of qcow2 only)"; [ S 'i' ], Getopt.String ("disk|libvirt|libvirtxml|ova|vmx", set_input_mode), -@@ -352,12 +349,6 @@ read the man page virt-v2v(1). +@@ -363,12 +360,6 @@ read the man page virt-v2v(1). (* Dereference the arguments. *) let args = List.rev !args in @@ -146,7 +146,7 @@ index c18aeaa1..d09c200c 100644 let customize_ops = get_customize_ops () in let input_conn = !input_conn in let input_mode = !input_mode in -@@ -526,7 +517,7 @@ read the man page virt-v2v(1). +@@ -541,7 +532,7 @@ read the man page virt-v2v(1). (* Get the conversion options. *) let conv_options = { diff --git a/0014-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch b/0014-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch deleted file mode 100644 index a663815..0000000 --- a/0014-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch +++ /dev/null @@ -1,24 +0,0 @@ -From fe167d94ed81b41b025f55cbd6ca97ce404986ce Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 9 Jul 2024 11:30:09 +0100 -Subject: [PATCH] RHEL: Add warning about virt-v2v-in-place not being supported - -Fixes: https://issues.redhat.com/browse/RHEL-40903 ---- - in-place/in_place.ml | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/in-place/in_place.ml b/in-place/in_place.ml -index 2dc406e2..9d24de78 100644 ---- a/in-place/in_place.ml -+++ b/in-place/in_place.ml -@@ -206,6 +206,9 @@ read the man page virt-v2v-in-place(1). - let opthandle = create_standard_options argspec ~anon_fun ~key_opts:true ~machine_readable:true usage_msg in - Getopt.parse opthandle.getopt; - -+ warning "virt-v2v-in-place is NOT SUPPORTED for command line use. \ -+ It is almost always better to use virt-v2v instead of this tool."; -+ - (* Print the version, easier than asking users to tell us. *) - debug "info: %s: %s %s (%s)" - prog Config.package_name Config.package_version_full diff --git a/0013-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch b/0014-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch similarity index 95% rename from 0013-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch rename to 0014-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch index 2534b7d..fc9824f 100644 --- a/0013-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch +++ b/0014-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch @@ -1,4 +1,4 @@ -From 4a460f0ae97f59d9bff9ff568d45588fe4241b7e Mon Sep 17 00:00:00 2001 +From 5c9deb0c0f4dc4c7ed23c094b908f203ff017913 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 8 Jul 2024 09:56:54 +0100 Subject: [PATCH] RHEL: Remove -o rhv, -o rhv-upload and -o vdsm modes @@ -30,16 +30,16 @@ Fixes: https://issues.redhat.com/browse/RHEL-36712 output/rhv-upload-transfer.py | 298 ---------- output/rhv-upload-vmcheck.py | 72 --- tests/Makefile.am | 15 - - tests/test-v2v-o-rhv-upload-module/imageio.py | 71 --- + tests/test-o-rhv-upload-module/imageio.py | 71 --- .../ovirtsdk4/__init__.py | 150 ----- .../ovirtsdk4/types.py | 184 ------ - tests/test-v2v-o-rhv-upload-oo-query.sh | 41 -- - tests/test-v2v-o-rhv-upload.sh | 74 --- - tests/test-v2v-o-rhv.ovf.expected | 113 ---- - tests/test-v2v-o-rhv.sh | 87 --- - tests/test-v2v-o-vdsm-oo-query.sh | 41 -- - tests/test-v2v-o-vdsm-options.ovf.expected | 113 ---- - tests/test-v2v-o-vdsm-options.sh | 96 ---- + tests/test-o-rhv-upload-oo-query.sh | 41 -- + tests/test-o-rhv-upload.sh | 74 --- + tests/test-o-rhv.ovf.expected | 113 ---- + tests/test-o-rhv.sh | 87 --- + tests/test-o-vdsm-oo-query.sh | 41 -- + tests/test-o-vdsm-options.ovf.expected | 113 ---- + tests/test-o-vdsm-options.sh | 96 ---- v2v/v2v.ml | 31 +- 36 files changed, 5 insertions(+), 4226 deletions(-) delete mode 100644 docs/virt-v2v-output-rhv.pod @@ -63,19 +63,19 @@ Fixes: https://issues.redhat.com/browse/RHEL-36712 delete mode 100644 output/rhv-upload-precheck.py delete mode 100644 output/rhv-upload-transfer.py delete mode 100644 output/rhv-upload-vmcheck.py - delete mode 100755 tests/test-v2v-o-rhv-upload-module/imageio.py - delete mode 100644 tests/test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py - delete mode 100644 tests/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py - delete mode 100755 tests/test-v2v-o-rhv-upload-oo-query.sh - delete mode 100755 tests/test-v2v-o-rhv-upload.sh - delete mode 100644 tests/test-v2v-o-rhv.ovf.expected - delete mode 100755 tests/test-v2v-o-rhv.sh - delete mode 100755 tests/test-v2v-o-vdsm-oo-query.sh - delete mode 100644 tests/test-v2v-o-vdsm-options.ovf.expected - delete mode 100755 tests/test-v2v-o-vdsm-options.sh + delete mode 100755 tests/test-o-rhv-upload-module/imageio.py + delete mode 100644 tests/test-o-rhv-upload-module/ovirtsdk4/__init__.py + delete mode 100644 tests/test-o-rhv-upload-module/ovirtsdk4/types.py + delete mode 100755 tests/test-o-rhv-upload-oo-query.sh + delete mode 100755 tests/test-o-rhv-upload.sh + delete mode 100644 tests/test-o-rhv.ovf.expected + delete mode 100755 tests/test-o-rhv.sh + delete mode 100755 tests/test-o-vdsm-oo-query.sh + delete mode 100644 tests/test-o-vdsm-options.ovf.expected + delete mode 100755 tests/test-o-vdsm-options.sh diff --git a/docs/Makefile.am b/docs/Makefile.am -index 7cb6e09a..4c341f8b 100644 +index 36a831bf..d7c2cb85 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -26,7 +26,6 @@ EXTRA_DIST = \ @@ -122,7 +122,7 @@ index 7cb6e09a..4c341f8b 100644 stamp-virt-v2v-release-notes-1.42.pod: virt-v2v-release-notes-1.42.pod diff --git a/docs/virt-v2v-output-rhv.pod b/docs/virt-v2v-output-rhv.pod deleted file mode 100644 -index 2ce697f4..00000000 +index e12702fa..00000000 --- a/docs/virt-v2v-output-rhv.pod +++ /dev/null @@ -1,232 +0,0 @@ @@ -357,9 +357,9 @@ index 2ce697f4..00000000 - -=head1 COPYRIGHT - --Copyright (C) 2009-2020 Red Hat Inc. +-Copyright (C) 2009-2025 Red Hat Inc. diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index eb7da9ca..de92db84 100644 +index 661c18e9..b5476745 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -14,7 +14,7 @@ virt-v2v - Convert a guest to use KVM @@ -371,7 +371,7 @@ index eb7da9ca..de92db84 100644 other targets. It can modify the guest to make it bootable on KVM and install virtio drivers so it will run quickly. -@@ -54,8 +54,6 @@ L — Input from VMware. +@@ -61,8 +61,6 @@ L — Input from VMware. L — Output to local files or local libvirt. @@ -380,7 +380,7 @@ index eb7da9ca..de92db84 100644 L — Output to OpenStack. L — Release notes for 1.42 release. -@@ -85,21 +83,6 @@ disks to F. +@@ -92,21 +90,6 @@ disks to F. For more information see L. @@ -402,7 +402,7 @@ index eb7da9ca..de92db84 100644 =head2 Convert from ESXi hypervisor over SSH to local libvirt You have an ESXi hypervisor called C with SSH access -@@ -479,14 +462,6 @@ no metadata is written. +@@ -486,14 +469,6 @@ no metadata is written. Set the output method to OpenStack. See L. @@ -417,7 +417,7 @@ index eb7da9ca..de92db84 100644 =item B<-o> B Set the output method to I. -@@ -495,40 +470,6 @@ This is similar to I<-o local>, except that a shell script is written +@@ -502,40 +477,6 @@ This is similar to I<-o local>, except that a shell script is written which you can use to boot the guest in qemu. The converted disks and shell script are written to the directory specified by I<-os>. @@ -458,7 +458,7 @@ index eb7da9ca..de92db84 100644 =item B<-oa> B =item B<-oa> B -@@ -591,117 +532,11 @@ For I<-o openstack> (L) only, set optional +@@ -598,117 +539,11 @@ For I<-o openstack> (L) only, set optional OpenStack authentication. For example I<-oo os-username=>NAME is equivalent to C. @@ -576,7 +576,7 @@ index eb7da9ca..de92db84 100644 =item B<-op> file Supply a file containing a password to be used when connecting to the -@@ -719,28 +554,8 @@ For I<-o libvirt>, this is a libvirt directory pool +@@ -726,28 +561,8 @@ For I<-o libvirt>, this is a libvirt directory pool For I<-o local> and I<-o qemu>, this is a directory name. The directory must exist. @@ -602,10 +602,10 @@ index eb7da9ca..de92db84 100644 -You will get an error if virt-v2v is unable to mount/write to the -Export Storage Domain. - - =item B<--print-source> + =item B<--parallel> N - Print information about the source guest and stop. This option is -@@ -1302,26 +1117,6 @@ require either root or a special user: + Enable parallel copying if the guest has multiple disks. I is the +@@ -1356,26 +1171,6 @@ require either root or a special user: =over 4 @@ -632,7 +632,7 @@ index eb7da9ca..de92db84 100644 =item Writing to libvirt When using I<-o libvirt>, you may need to run virt-v2v as root so that -@@ -1428,7 +1223,6 @@ virt-v2v binary. Typical output looks like this: +@@ -1483,7 +1278,6 @@ virt-v2v binary. Typical output looks like this: virt-v2v libguestfs-rewrite colours-option @@ -641,7 +641,7 @@ index eb7da9ca..de92db84 100644 [...] output:local diff --git a/output/Makefile.am b/output/Makefile.am -index 1e6799c3..09638c25 100644 +index 69f5393e..981cf589 100644 --- a/output/Makefile.am +++ b/output/Makefile.am @@ -17,14 +17,7 @@ @@ -671,7 +671,7 @@ index 1e6799c3..09638c25 100644 - rhv-upload-precheck.py \ - rhv-upload-transfer.py \ - rhv-upload-vmcheck.py \ - test-v2v-python-syntax.sh + test-python-syntax.sh SOURCES_MLI = \ @@ -54,16 +40,6 @@ SOURCES_MLI = \ @@ -739,12 +739,12 @@ index 1e6799c3..09638c25 100644 # objects and OCaml objects and link them into the OCaml library. diff --git a/output/output_rhv.ml b/output/output_rhv.ml deleted file mode 100644 -index 13c2d8dc..00000000 +index e10b2010..00000000 --- a/output/output_rhv.ml +++ /dev/null @@ -1,317 +0,0 @@ -(* virt-v2v -- * Copyright (C) 2009-2021 Red Hat Inc. +- * Copyright (C) 2009-2025 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by @@ -1062,12 +1062,12 @@ index 13c2d8dc..00000000 -end diff --git a/output/output_rhv.mli b/output/output_rhv.mli deleted file mode 100644 -index 08f3f2d0..00000000 +index ceb12c3f..00000000 --- a/output/output_rhv.mli +++ /dev/null @@ -1,21 +0,0 @@ -(* virt-v2v -- * Copyright (C) 2009-2021 Red Hat Inc. +- * Copyright (C) 2009-2025 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by @@ -1089,12 +1089,12 @@ index 08f3f2d0..00000000 -module RHV : Output.OUTPUT diff --git a/output/output_rhv_upload.ml b/output/output_rhv_upload.ml deleted file mode 100644 -index 63624860..00000000 +index 8133db2b..00000000 --- a/output/output_rhv_upload.ml +++ /dev/null @@ -1,520 +0,0 @@ -(* virt-v2v -- * Copyright (C) 2009-2021 Red Hat Inc. +- * Copyright (C) 2009-2025 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by @@ -1615,12 +1615,12 @@ index 63624860..00000000 -end diff --git a/output/output_rhv_upload.mli b/output/output_rhv_upload.mli deleted file mode 100644 -index 35457596..00000000 +index 7106a3f1..00000000 --- a/output/output_rhv_upload.mli +++ /dev/null @@ -1,21 +0,0 @@ -(* virt-v2v -- * Copyright (C) 2009-2021 Red Hat Inc. +- * Copyright (C) 2009-2025 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by @@ -1817,12 +1817,12 @@ index c1bafa15..00000000 -val code : string diff --git a/output/output_vdsm.ml b/output/output_vdsm.ml deleted file mode 100644 -index 3052fb9c..00000000 +index 8ab2e766..00000000 --- a/output/output_vdsm.ml +++ /dev/null @@ -1,237 +0,0 @@ -(* virt-v2v -- * Copyright (C) 2009-2021 Red Hat Inc. +- * Copyright (C) 2009-2025 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by @@ -2060,12 +2060,12 @@ index 3052fb9c..00000000 -end diff --git a/output/output_vdsm.mli b/output/output_vdsm.mli deleted file mode 100644 -index 2260d7e6..00000000 +index c598f5df..00000000 --- a/output/output_vdsm.mli +++ /dev/null @@ -1,21 +0,0 @@ -(* virt-v2v -- * Copyright (C) 2009-2021 Red Hat Inc. +- * Copyright (C) 2009-2025 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by @@ -2087,13 +2087,13 @@ index 2260d7e6..00000000 -module VDSM : Output.OUTPUT diff --git a/output/rhv-upload-cancel.py b/output/rhv-upload-cancel.py deleted file mode 100644 -index b36e1904..00000000 +index 82122a2a..00000000 --- a/output/rhv-upload-cancel.py +++ /dev/null @@ -1,96 +0,0 @@ -# -*- python -*- -# oVirt or RHV upload cancel used by ‘virt-v2v -o rhv-upload’ --# Copyright (C) 2019-2021 Red Hat Inc. +-# Copyright (C) 2019-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by @@ -2332,13 +2332,13 @@ index 9af2c167..00000000 - " Jobs still running for correlation id %s" % correlation_id) diff --git a/output/rhv-upload-finalize.py b/output/rhv-upload-finalize.py deleted file mode 100644 -index 12fd39ec..00000000 +index ee14873e..00000000 --- a/output/rhv-upload-finalize.py +++ /dev/null @@ -1,174 +0,0 @@ -# -*- python -*- -# oVirt or RHV upload finalize used by ‘virt-v2v -o rhv-upload’ --# Copyright (C) 2018-2021 Red Hat Inc. +-# Copyright (C) 2018-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by @@ -2512,13 +2512,13 @@ index 12fd39ec..00000000 -connection.close() diff --git a/output/rhv-upload-plugin.py b/output/rhv-upload-plugin.py deleted file mode 100644 -index 8bc79a4a..00000000 +index b7a42005..00000000 --- a/output/rhv-upload-plugin.py +++ /dev/null @@ -1,525 +0,0 @@ -# -*- python -*- -# oVirt or RHV upload nbdkit plugin used by ‘virt-v2v -o rhv-upload’ --# Copyright (C) 2018-2021 Red Hat Inc. +-# Copyright (C) 2018-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by @@ -3043,13 +3043,13 @@ index 8bc79a4a..00000000 - (r.status, r.reason)) diff --git a/output/rhv-upload-precheck.py b/output/rhv-upload-precheck.py deleted file mode 100644 -index 0bbb738d..00000000 +index 539a7508..00000000 --- a/output/rhv-upload-precheck.py +++ /dev/null @@ -1,135 +0,0 @@ -# -*- python -*- -# oVirt or RHV pre-upload checks used by ‘virt-v2v -o rhv-upload’ --# Copyright (C) 2018-2020 Red Hat Inc. +-# Copyright (C) 2018-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by @@ -3184,13 +3184,13 @@ index 0bbb738d..00000000 -json.dump(results, sys.stdout) diff --git a/output/rhv-upload-transfer.py b/output/rhv-upload-transfer.py deleted file mode 100644 -index ed96153b..00000000 +index 322418e2..00000000 --- a/output/rhv-upload-transfer.py +++ /dev/null @@ -1,298 +0,0 @@ -# -*- python -*- -# oVirt or RHV upload start transfer used by ‘virt-v2v -o rhv-upload’ --# Copyright (C) 2018-2021 Red Hat Inc. +-# Copyright (C) 2018-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by @@ -3488,13 +3488,13 @@ index ed96153b..00000000 -json.dump(results, sys.stdout) diff --git a/output/rhv-upload-vmcheck.py b/output/rhv-upload-vmcheck.py deleted file mode 100644 -index cd500574..00000000 +index 42cc24e8..00000000 --- a/output/rhv-upload-vmcheck.py +++ /dev/null @@ -1,72 +0,0 @@ -# -*- python -*- -# oVirt or RHV VM existence check used by ‘virt-v2v -o rhv-upload’ --# Copyright (C) 2018-2020 Red Hat Inc. +-# Copyright (C) 2018-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by @@ -3565,54 +3565,47 @@ index cd500574..00000000 - -# Otherwise everything is OK, exit with no error. diff --git a/tests/Makefile.am b/tests/Makefile.am -index b41fed7f..2cf57248 100644 +index ffcbf722..e54569f1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -70,8 +70,6 @@ TESTS = \ - test-v2v-i-ova-two-disks.sh \ - test-v2v-i-vmx.sh \ - test-v2v-it-vddk-io-query.sh \ -- test-v2v-o-rhv-upload-oo-query.sh \ -- test-v2v-o-vdsm-oo-query.sh \ - test-v2v-bad-networks-and-bridges.sh \ - test-v2v-cdrom.sh \ - test-v2v-floppy.sh \ -@@ -89,9 +87,6 @@ TESTS = \ - test-v2v-o-null.sh \ - test-v2v-o-openstack.sh \ - test-v2v-o-qemu.sh \ -- test-v2v-o-rhv.sh \ -- test-v2v-o-rhv-upload.sh \ -- test-v2v-o-vdsm-options.sh \ - test-v2v-oa-option-qcow2.sh \ - test-v2v-oa-option-raw.sh \ - test-v2v-of-option.sh \ -@@ -258,16 +253,6 @@ EXTRA_DIST += \ - test-v2v-o-null.sh \ - test-v2v-o-openstack.sh \ - test-v2v-o-qemu.sh \ -- test-v2v-o-rhv.ovf.expected \ -- test-v2v-o-rhv.sh \ -- test-v2v-o-rhv-upload.sh \ -- test-v2v-o-rhv-upload-module/imageio.py \ -- test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py \ -- test-v2v-o-rhv-upload-module/ovirtsdk4/types.py \ -- test-v2v-o-rhv-upload-oo-query.sh \ -- test-v2v-o-vdsm-oo-query.sh \ -- test-v2v-o-vdsm-options.ovf.expected \ -- test-v2v-o-vdsm-options.sh \ - test-v2v-oa-option-qcow2.sh \ - test-v2v-oa-option-raw.sh \ - test-v2v-of-option.sh \ -diff --git a/tests/test-v2v-o-rhv-upload-module/imageio.py b/tests/test-v2v-o-rhv-upload-module/imageio.py +@@ -99,11 +99,6 @@ TESTS = \ + test-o-null.sh \ + test-o-openstack.sh \ + test-o-qemu.sh \ +- test-o-rhv-upload-oo-query.sh \ +- test-o-rhv-upload.sh \ +- test-o-rhv.sh \ +- test-o-vdsm-oo-query.sh \ +- test-o-vdsm-options.sh \ + test-oa-option-qcow2.sh \ + test-oa-option-raw.sh \ + test-of-option.sh \ +@@ -288,16 +283,6 @@ EXTRA_DIST += \ + test-o-null.sh \ + test-o-openstack.sh \ + test-o-qemu.sh \ +- test-o-rhv-upload-module/imageio.py \ +- test-o-rhv-upload-module/ovirtsdk4/__init__.py \ +- test-o-rhv-upload-module/ovirtsdk4/types.py \ +- test-o-rhv-upload-oo-query.sh \ +- test-o-rhv-upload.sh \ +- test-o-rhv.ovf.expected \ +- test-o-rhv.sh \ +- test-o-vdsm-oo-query.sh \ +- test-o-vdsm-options.ovf.expected \ +- test-o-vdsm-options.sh \ + test-oa-option-qcow2.sh \ + test-oa-option-raw.sh \ + test-of-option.sh \ +diff --git a/tests/test-o-rhv-upload-module/imageio.py b/tests/test-o-rhv-upload-module/imageio.py deleted file mode 100755 -index b9a491d7..00000000 ---- a/tests/test-v2v-o-rhv-upload-module/imageio.py +index 70ea2ef4..00000000 +--- a/tests/test-o-rhv-upload-module/imageio.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python3 -# -*- python -*- --# Copyright (C) 2018-2021 Red Hat Inc. +-# Copyright (C) 2018-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by @@ -3629,7 +3622,7 @@ index b9a491d7..00000000 -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# Fake imageio web server used as a test harness. --# See v2v/test-v2v-o-rhv-upload.sh +-# See v2v/test-o-rhv-upload.sh - -import sys -import threading @@ -3681,10 +3674,10 @@ index b9a491d7..00000000 -sys.stdout.flush() - -httpd.serve_forever() -diff --git a/tests/test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py b/tests/test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py +diff --git a/tests/test-o-rhv-upload-module/ovirtsdk4/__init__.py b/tests/test-o-rhv-upload-module/ovirtsdk4/__init__.py deleted file mode 100644 -index e33d0714..00000000 ---- a/tests/test-v2v-o-rhv-upload-module/ovirtsdk4/__init__.py +index fefc9821..00000000 +--- a/tests/test-o-rhv-upload-module/ovirtsdk4/__init__.py +++ /dev/null @@ -1,150 +0,0 @@ -# -*- python -*- @@ -3705,7 +3698,7 @@ index e33d0714..00000000 -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# Fake ovirtsdk4 module used as a test harness. --# See v2v/test-v2v-o-rhv-upload.sh +-# See v2v/test-o-rhv-upload.sh - -class Error(Exception): - pass @@ -3837,10 +3830,10 @@ index e33d0714..00000000 - - def list(self, search=None): - return [] -diff --git a/tests/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py b/tests/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py +diff --git a/tests/test-o-rhv-upload-module/ovirtsdk4/types.py b/tests/test-o-rhv-upload-module/ovirtsdk4/types.py deleted file mode 100644 -index 38d89573..00000000 ---- a/tests/test-v2v-o-rhv-upload-module/ovirtsdk4/types.py +index 397432f1..00000000 +--- a/tests/test-o-rhv-upload-module/ovirtsdk4/types.py +++ /dev/null @@ -1,184 +0,0 @@ -# -*- python -*- @@ -3861,7 +3854,7 @@ index 38d89573..00000000 -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# Fake ovirtsdk4 module used as a test harness. --# See v2v/test-v2v-o-rhv-upload.sh +-# See v2v/test-o-rhv-upload.sh - -import os -from enum import Enum @@ -4027,10 +4020,10 @@ index 38d89573..00000000 - name = "DC" - storage_domains = [StorageDomain()] - clusters = [Cluster()] -diff --git a/tests/test-v2v-o-rhv-upload-oo-query.sh b/tests/test-v2v-o-rhv-upload-oo-query.sh +diff --git a/tests/test-o-rhv-upload-oo-query.sh b/tests/test-o-rhv-upload-oo-query.sh deleted file mode 100755 -index 5ef56b90..00000000 ---- a/tests/test-v2v-o-rhv-upload-oo-query.sh +index 5dda6e04..00000000 +--- a/tests/test-o-rhv-upload-oo-query.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - @@ -4062,9 +4055,9 @@ index 5ef56b90..00000000 -skip_if_skipped - -export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" --export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" +-export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win/drivers" - --f=test-v2v-o-rhv-upload-oo-query.actual +-f=test-o-rhv-upload-oo-query.actual -rm -f $f - -$VG virt-v2v --debug-gc \ @@ -4074,10 +4067,10 @@ index 5ef56b90..00000000 -grep -- "-oo rhv-verifypeer" $f - -rm $f -diff --git a/tests/test-v2v-o-rhv-upload.sh b/tests/test-v2v-o-rhv-upload.sh +diff --git a/tests/test-o-rhv-upload.sh b/tests/test-o-rhv-upload.sh deleted file mode 100755 -index 15d5d028..00000000 ---- a/tests/test-v2v-o-rhv-upload.sh +index 718f6ce8..00000000 +--- a/tests/test-o-rhv-upload.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash - @@ -4101,7 +4094,7 @@ index 15d5d028..00000000 -# Test -o rhv-upload. -# -# These uses a test harness (see --# tests/test-v2v-o-rhv-upload-module/ovirtsdk4) to fake responses from +-# tests/test-o-rhv-upload-module/ovirtsdk4) to fake responses from -# oVirt. - -set -e @@ -4113,21 +4106,21 @@ index 15d5d028..00000000 - -skip_if_skipped -requires python3 --version --requires nbdkit $VIRT_V2V_NBDKIT_PYTHON_PLUGIN --version --requires test -f ../test-data/phony-guests/windows.img +-requires nbdkit python --version +-requires test -s ../test-data/phony-guests/windows.img - -libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests.xml" -f=../test-data/phony-guests/windows.img - -export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" --export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" --export PYTHONPATH=$srcdir/test-v2v-o-rhv-upload-module:$PYTHONPATH +-export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win/drivers" +-export PYTHONPATH=$srcdir/test-o-rhv-upload-module:$PYTHONPATH - -# Run the imageio process and get the port number. --log=test-v2v-o-rhv-upload.webserver.log +-log=test-o-rhv-upload.webserver.log -rm -f $log -cleanup_fn rm -f $log --$srcdir/test-v2v-o-rhv-upload-module/imageio.py >$log 2>&1 & +-$srcdir/test-o-rhv-upload-module/imageio.py >$log 2>&1 & -pid=$! -cleanup_fn kill $pid -export IMAGEIO_PORT= @@ -4154,10 +4147,10 @@ index 15d5d028..00000000 - -oo rhv-cafile=/dev/null \ - -op /dev/null \ - -os Storage -diff --git a/tests/test-v2v-o-rhv.ovf.expected b/tests/test-v2v-o-rhv.ovf.expected +diff --git a/tests/test-o-rhv.ovf.expected b/tests/test-o-rhv.ovf.expected deleted file mode 100644 index 4f437d88..00000000 ---- a/tests/test-v2v-o-rhv.ovf.expected +--- a/tests/test-o-rhv.ovf.expected +++ /dev/null @@ -1,113 +0,0 @@ - @@ -4273,10 +4266,10 @@ index 4f437d88..00000000 - - - -diff --git a/tests/test-v2v-o-rhv.sh b/tests/test-v2v-o-rhv.sh +diff --git a/tests/test-o-rhv.sh b/tests/test-o-rhv.sh deleted file mode 100755 -index e6ec7c61..00000000 ---- a/tests/test-v2v-o-rhv.sh +index 173d762c..00000000 +--- a/tests/test-o-rhv.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - @@ -4306,15 +4299,15 @@ index e6ec7c61..00000000 -set -x - -skip_if_skipped --requires test -f ../test-data/phony-guests/windows.img +-requires test -s ../test-data/phony-guests/windows.img - -libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests.xml" -f=../test-data/phony-guests/windows.img - -export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" --export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" +-export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win/drivers" - --d=test-v2v-o-rhv.d +-d=test-o-rhv.d -rm -rf $d -cleanup_fn rm -r $d -mkdir $d @@ -4365,11 +4358,11 @@ index e6ec7c61..00000000 - -e 's/\ @@ -4532,15 +4525,15 @@ index 9f71a44e..00000000 - - - -diff --git a/tests/test-v2v-o-vdsm-options.sh b/tests/test-v2v-o-vdsm-options.sh +diff --git a/tests/test-o-vdsm-options.sh b/tests/test-o-vdsm-options.sh deleted file mode 100755 -index e8f8c538..00000000 ---- a/tests/test-v2v-o-vdsm-options.sh +index a8c5b208..00000000 +--- a/tests/test-o-vdsm-options.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash - -# libguestfs virt-v2v test script --# Copyright (C) 2014-2020 Red Hat Inc. +-# Copyright (C) 2014-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by @@ -4566,15 +4559,15 @@ index e8f8c538..00000000 -set -x - -skip_if_skipped --requires test -f ../test-data/phony-guests/windows.img +-requires test -s ../test-data/phony-guests/windows.img - -libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests.xml" -f=../test-data/phony-guests/windows.img - -export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" --export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" +-export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win/drivers" - --d=test-v2v-o-vdsm-options.d +-d=test-o-vdsm-options.d -rm -rf $d -cleanup_fn rm -r $d -mkdir $d @@ -4632,13 +4625,13 @@ index e8f8c538..00000000 - -e 's/\ output_mode := `Disk | "null" -> output_mode := `Null | "openstack" | "osp" | "rhosp" -> output_mode := `Openstack @@ -4650,7 +4643,7 @@ index d09c200c..8be1e5cb 100644 | s -> error (f_"unknown -o option: %s") s in -@@ -245,7 +241,7 @@ let rec main () = +@@ -254,7 +250,7 @@ let rec main () = s_"Map network ‘in’ to ‘out’"; [ L"no-trim" ], Getopt.String ("-", no_trim_warning), s_"Ignored for backwards compatibility"; @@ -4659,7 +4652,7 @@ index d09c200c..8be1e5cb 100644 s_"Set output mode (default: libvirt)"; [ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc), s_"Set output allocation mode"; -@@ -283,18 +279,6 @@ let rec main () = +@@ -294,18 +290,6 @@ let rec main () = s_"Same as ‘-io vddk-thumbprint=thumbprint’"; [ L"vddk-transports" ], Getopt.String ("transports", set_input_option_compat "vddk-transports"), s_"Same as ‘-io vddk-transports=transports’"; @@ -4678,7 +4671,7 @@ index d09c200c..8be1e5cb 100644 [ L"vmtype" ], Getopt.String ("-", vmtype_warning), s_"Ignored for backwards compatibility"; ] in -@@ -314,9 +298,6 @@ let rec main () = +@@ -325,9 +309,6 @@ let rec main () = virt-v2v -ic vpx://vcenter.example.com/Datacenter/esxi -os imported esx_guest @@ -4688,7 +4681,7 @@ index d09c200c..8be1e5cb 100644 virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp virt-v2v -i disk disk.img -o local -os /var/tmp -@@ -380,7 +361,6 @@ read the man page virt-v2v(1). +@@ -394,7 +375,6 @@ read the man page virt-v2v(1). pr "vcenter-https\n"; pr "vddk\n"; pr "colours-option\n"; @@ -4696,7 +4689,7 @@ index d09c200c..8be1e5cb 100644 pr "io/oo\n"; pr "mac-option\n"; pr "bandwidth-option\n"; -@@ -397,9 +377,6 @@ read the man page virt-v2v(1). +@@ -412,9 +392,6 @@ read the man page virt-v2v(1). pr "output:null\n"; pr "output:openstack\n"; pr "output:qemu\n"; @@ -4706,7 +4699,7 @@ index d09c200c..8be1e5cb 100644 pr "convert:linux\n"; pr "convert:windows\n"; List.iter (pr "ovf:%s\n") Create_ovf.ovf_flavours; -@@ -484,10 +461,7 @@ read the man page virt-v2v(1). +@@ -499,10 +476,7 @@ read the man page virt-v2v(1). | `Null -> (module Output_null.Null) | `QEmu -> (module Output_qemu.QEMU) | `Kubevirt -> (module Output_kubevirt.Kubevirt) @@ -4718,7 +4711,7 @@ index d09c200c..8be1e5cb 100644 let output_options = { Output.output_alloc = output_alloc; -@@ -512,7 +486,6 @@ read the man page virt-v2v(1). +@@ -527,7 +501,6 @@ read the man page virt-v2v(1). *) let remove_serial_console = match output_mode with diff --git a/0015-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch b/0015-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch new file mode 100644 index 0000000..c8b194a --- /dev/null +++ b/0015-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch @@ -0,0 +1,40 @@ +From 7ac8099864720bbca1001a2abbdbfe7296ebd7fe Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 9 Jul 2024 11:30:09 +0100 +Subject: [PATCH] RHEL: Add warning about virt-v2v-in-place not being supported + +Fixes: https://issues.redhat.com/browse/RHEL-40903 +--- + docs/virt-v2v-in-place.pod | 4 ++++ + in-place/in_place.ml | 3 +++ + 2 files changed, 7 insertions(+) + +diff --git a/docs/virt-v2v-in-place.pod b/docs/virt-v2v-in-place.pod +index 3e73bfc1..bd959fe4 100644 +--- a/docs/virt-v2v-in-place.pod ++++ b/docs/virt-v2v-in-place.pod +@@ -16,6 +16,10 @@ virt-v2v-in-place - Convert a guest to use KVM in-place + + =head1 DESCRIPTION + ++B. It is almost always better to use L ++instead of this tool. ++ + Virt-v2v-in-place converts a single guest from a foreign hypervisor to + run on KVM. It does this conversion in place, modifying the original + disk. +diff --git a/in-place/in_place.ml b/in-place/in_place.ml +index caf34a0b..fe436b37 100644 +--- a/in-place/in_place.ml ++++ b/in-place/in_place.ml +@@ -221,6 +221,9 @@ read the man page virt-v2v-in-place(1). + let opthandle = create_standard_options argspec ~anon_fun ~key_opts:true ~machine_readable:true usage_msg in + Getopt.parse opthandle.getopt; + ++ warning "virt-v2v-in-place is NOT SUPPORTED for command line use. \ ++ It is almost always better to use virt-v2v instead of this tool."; ++ + (* Print the version, easier than asking users to tell us. *) + debug "info: %s: %s %s (%s)" + prog Config.package_name Config.package_version_full diff --git a/0015-in-place-Add-a-warning-about-checking-the-exit-code.patch b/0015-in-place-Add-a-warning-about-checking-the-exit-code.patch deleted file mode 100644 index d02003f..0000000 --- a/0015-in-place-Add-a-warning-about-checking-the-exit-code.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d903b78c675ca51a6d62fb83bc5b94a64861b0d9 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 30 Oct 2024 15:39:31 +0000 -Subject: [PATCH] in-place: Add a warning about checking the exit code - -(cherry picked from commit 8b768fd9b17412ee8893447dc0f1e75bc612df58) -(cherry picked from commit a794e7936064812540f0bb8b37827fa562a6fba4) ---- - docs/virt-v2v-in-place.pod | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/docs/virt-v2v-in-place.pod b/docs/virt-v2v-in-place.pod -index b7384210..4057dae5 100644 ---- a/docs/virt-v2v-in-place.pod -+++ b/docs/virt-v2v-in-place.pod -@@ -35,6 +35,17 @@ If the guest has been copied to local libvirt then: - - virt-v2v-in-place -i libvirt guest - -+=head2 Exit code -+ -+If virt-v2v-in-place fails it will return a non-zero (error) exit -+code. In this case, the disk image will be in an B. -+ -+If the image contains important information you should ensure you have -+a backup before trying a virt-v2v-in-place conversion. And you should -+check the exit code is zero before using the disk image after a -+conversion. -+ - =head1 EXAMPLES - - =head1 OPTIONS diff --git a/0016-i-libvirt-Trim-whitespace-around-name.patch b/0016-i-libvirt-Trim-whitespace-around-name.patch deleted file mode 100644 index a04886b..0000000 --- a/0016-i-libvirt-Trim-whitespace-around-name.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 837646d510e74d77ad80d4859aa03012682ce01b Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 15 Nov 2024 14:00:07 +0000 -Subject: [PATCH] -i libvirt: Trim whitespace around name - -In -i libvirt / -i libvirtxml we didn't trim whitespace -around the name, so: - - foo - -would set the input name to the literal string " foo ". - -(cherry picked from commit 9cb76069040543ce25003ac8c620aff3724964fc) -(cherry picked from commit 669acaf0f56ffdb85a1d72fb37ff2958600003cc) ---- - input/parse_libvirt_xml.ml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/input/parse_libvirt_xml.ml b/input/parse_libvirt_xml.ml -index 4d0fcdf3..8009a05a 100644 ---- a/input/parse_libvirt_xml.ml -+++ b/input/parse_libvirt_xml.ml -@@ -78,7 +78,7 @@ let parse_libvirt_xml ?conn xml = - match xpath_string "/domain/name/text()" with - | None | Some "" -> - error (f_"in the libvirt XML metadata, is missing or empty") -- | Some s -> s in -+ | Some s -> String.trim s in - let genid = - match xpath_string "/domain/genid/text()" with - | None | Some "" -> None diff --git a/0017-o-qemu-Replace-hard-coded-UEFI-paths.patch b/0017-o-qemu-Replace-hard-coded-UEFI-paths.patch deleted file mode 100644 index c824810..0000000 --- a/0017-o-qemu-Replace-hard-coded-UEFI-paths.patch +++ /dev/null @@ -1,963 +0,0 @@ -From 49e77856e1e127eabe14ac07ee9c33ce6b8c067b Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 15 Nov 2024 11:49:26 +0000 -Subject: [PATCH] -o qemu: Replace hard-coded UEFI paths - -Update the qemu shell script to simply find the UEFI paths as -required. - -Remove lib/uefi.ml:find_uefi_firmware as this function is no longer -needed. - -Remove common/mlv2v/ everywhere. This contained a list of UEFI code -and NVRAM files which is no longer used. - -Update common submodule. This pulls in: - - Richard W.M. Jones (5): - mlcustomize/customize_run.ml: Move 'in' to new line - mlstdutils/guestfs_config: Define host_os - mlcustomize, mltools: Check guest OS is compatible before allowing --run - Remove mlv2v/ subdirectory - qemuopts: Add ability to add raw, unquoted output to qemu scripts - qemuopts: Fix missing break statement - -(cherry picked from commit 69b4e83935b03e10c5da9b93f987eb8ddd2cde31) -(cherry picked from commit faf29e12e7928345ca0178923f468fee34d067e8) ---- - Makefile.am | 1 - - common | 2 +- - configure.ac | 1 - - convert/Makefile.am | 2 - - in-place/Makefile.am | 4 +- - input/Makefile.am | 2 - - inspector/Makefile.am | 4 +- - lib/Makefile.am | 1 - - lib/utils.ml | 20 ------- - lib/utils.mli | 4 -- - ocaml-dep.sh.in | 1 - - output/Makefile.am | 2 - - output/output_qemu.ml | 121 +++++++++++++++++++++++------------------- - output/qemuopts-c.c | 12 +++++ - output/qemuopts.ml | 1 + - output/qemuopts.mli | 4 ++ - po/POTFILES-ml | 1 - - v2v/Makefile.am | 5 +- - 18 files changed, 87 insertions(+), 101 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 51370188..4cc87324 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -37,7 +37,6 @@ SUBDIRS += common/mlxml - SUBDIRS += common/mltools - SUBDIRS += common/mlcustomize - SUBDIRS += common/mldrivers --SUBDIRS += common/mlv2v - SUBDIRS += lib - SUBDIRS += input - SUBDIRS += output -Submodule common 2d42128e..faee2645: -diff --git a/common/.gitignore b/common/.gitignore -index 49915e31..44f49eb6 100644 ---- a/common/.gitignore -+++ b/common/.gitignore -@@ -58,7 +58,6 @@ Makefile.in - /mlutils/.depend - /mlutils/c_utils_unit_tests - /mlutils/oUnit-* --/mlv2v/.depend - /mlvisit/.depend - /mlvisit/visit_tests - /mlxml/.depend -diff --git a/common/mlcustomize/customize_run.ml b/common/mlcustomize/customize_run.ml -index 1d7c13ea..5ec5ed11 100644 ---- a/common/mlcustomize/customize_run.ml -+++ b/common/mlcustomize/customize_run.ml -@@ -44,21 +44,13 @@ let run (g : G.guestfs) root (ops : ops) = - let debug_logfile () = - try g#download logfile "/dev/stderr" - with exn -> -- warning (f_"log file %s: %s (ignored)") logfile (Printexc.to_string exn) in -+ warning (f_"log file %s: %s (ignored)") logfile (Printexc.to_string exn) -+ in - - (* Useful wrapper for scripts. *) - let do_run ~display ?(warn_failed_no_network = false) cmd = -- let incompatible_fn () = -- let guest_arch = g#inspect_get_arch root in -- error (f_"host cpu (%s) and guest arch (%s) are not compatible, \ -- so you cannot use command line options that involve \ -- running commands in the guest. Use --firstboot scripts \ -- instead.") -- Guestfs_config.host_cpu guest_arch -- in -- - try -- run_in_guest_command g root ~logfile ~incompatible_fn cmd -+ run_in_guest_command g root ~logfile cmd - with - G.Error msg -> - debug_logfile (); -diff --git a/common/mlstdutils/guestfs_config.ml.in b/common/mlstdutils/guestfs_config.ml.in -index 0ab95bd9..84929581 100644 ---- a/common/mlstdutils/guestfs_config.ml.in -+++ b/common/mlstdutils/guestfs_config.ml.in -@@ -22,4 +22,5 @@ let package_version = "@PACKAGE_VERSION@" - let package_version_full = "@PACKAGE_VERSION_FULL@" - let prefix = "@prefix@" - let datadir = prefix ^ "/share" -+let host_os = "@host_os@" - let host_cpu = "@host_cpu@" -diff --git a/common/mlstdutils/guestfs_config.mli b/common/mlstdutils/guestfs_config.mli -index 78df3040..70161c01 100644 ---- a/common/mlstdutils/guestfs_config.mli -+++ b/common/mlstdutils/guestfs_config.mli -@@ -31,5 +31,8 @@ val prefix : string - val datadir : string - (** The configure value [@datadir@] *) - -+val host_os : string -+(** The configure value [@host_os@] *) -+ - val host_cpu : string - (** The configure value [@host_cpu@] *) -diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml -index 23f16c51..1ff72ff3 100644 ---- a/common/mltools/tools_utils.ml -+++ b/common/mltools/tools_utils.ml -@@ -737,11 +737,21 @@ let run_in_guest_command g root ?logfile ?incompatible_fn cmd = - (* Is the host_cpu compatible with the guest arch? ie. Can we - * run commands in this guest? - *) -+ let guest_os = g#inspect_get_type root in -+ let guest_os_compatible = -+ String.is_prefix Guestfs_config.host_os "linux" && -+ guest_os = "linux" in - let guest_arch = g#inspect_get_arch root in - let guest_arch_compatible = guest_arch_compatible guest_arch in -- if not guest_arch_compatible then ( -+ if not guest_os_compatible || not guest_arch_compatible then ( - match incompatible_fn with -- | None -> () -+ | None -> -+ error (f_"host (%s/%s) and guest (%s/%s) are not compatible, \ -+ so you cannot use command line options that involve \ -+ running commands in the guest. Use --firstboot scripts \ -+ instead.") -+ Guestfs_config.host_os Guestfs_config.host_cpu -+ guest_os guest_arch - | Some fn -> fn () - ) - else ( -diff --git a/common/mltools/tools_utils.mli b/common/mltools/tools_utils.mli -index 193ba7b6..4d627676 100644 ---- a/common/mltools/tools_utils.mli -+++ b/common/mltools/tools_utils.mli -@@ -233,9 +233,15 @@ val with_timeout : string -> int -> ?sleep:int -> (unit -> 'a option) -> 'a - val run_in_guest_command : Guestfs.guestfs -> string -> ?logfile:string -> ?incompatible_fn:(unit -> unit) -> string -> unit - (** [run_in_guest_command g root ?incompatible_archs_fn cmd] - runs a command in the guest, which is already mounted for the -- specified [root]. The command is run directly in case the -- architecture of the host and the guest are compatible, optionally -- calling [?incompatible_fn] in case they are not. -+ specified [root]. -+ -+ The command is run directly in the case that the host and guest -+ are compatible. -+ -+ If they are not compatible, the command is not run and an error -+ is printed. However you can override the error by setting -+ [?incompatible_fn], which is called so you can do something else -+ (like install a firstboot script). - - [?logfile] is an optional file in the guest to where redirect - stdout and stderr of the command. *) -diff --git a/common/mlv2v/Makefile.am b/common/mlv2v/Makefile.am -deleted file mode 100644 -index 945f9813..00000000 ---- a/common/mlv2v/Makefile.am -+++ /dev/null -@@ -1,91 +0,0 @@ --# libguestfs OCaml virt-v2v generated code --# Copyright (C) 2011-2019 Red Hat Inc. --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- --include $(top_srcdir)/subdir-rules.mk -- --EXTRA_DIST = \ -- $(generator_built) \ -- $(SOURCES_MLI) \ -- $(SOURCES_ML) \ -- $(SOURCES_C) -- --generator_built = \ -- uefi.mli \ -- uefi.ml -- --SOURCES_MLI = \ -- uefi.mli -- --SOURCES_ML = \ -- uefi.ml -- --SOURCES_C = \ -- dummy.c -- --# We pretend that we're building a C library. automake handles the --# compilation of the C sources for us. At the end we take the C --# objects and OCaml objects and link them into the OCaml library. --# This C library is never used. -- --noinst_LIBRARIES = libmlv2v.a -- --if !HAVE_OCAMLOPT --MLV2V_CMA = mlv2v.cma --else --MLV2V_CMA = mlv2v.cmxa --endif -- --noinst_DATA = $(MLV2V_CMA) -- --libmlv2v_a_SOURCES = $(SOURCES_C) --libmlv2v_a_CPPFLAGS = \ -- -DCAML_NAME_SPACE \ -- -I. \ -- -I$(top_builddir) \ -- -I$(shell $(OCAMLC) -where) --libmlv2v_a_CFLAGS = \ -- $(WARN_CFLAGS) $(WERROR_CFLAGS) \ -- -fPIC -- --BOBJECTS = $(SOURCES_ML:.ml=.cmo) --XOBJECTS = $(BOBJECTS:.cmo=.cmx) -- --OCAMLPACKAGES = \ -- -package str,unix \ -- -I $(builddir) --OCAMLPACKAGES_TESTS = $(MLV2V_CMA) -- --OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)' -- --if !HAVE_OCAMLOPT --OBJECTS = $(BOBJECTS) --else --OBJECTS = $(XOBJECTS) --endif -- --libmlv2v_a_DEPENDENCIES = $(OBJECTS) -- --$(MLV2V_CMA): $(OBJECTS) libmlv2v.a -- $(OCAMLFIND) mklib $(OCAMLPACKAGES) \ -- $(OBJECTS) $(libmlv2v_a_OBJECTS) -o mlv2v -- --# OCaml dependencies. --.depend: $(srcdir)/*.mli $(srcdir)/*.ml -- $(top_builddir)/ocaml-dep.sh $^ ---include .depend -- --.PHONY: docs -diff --git a/common/mlv2v/dummy.c b/common/mlv2v/dummy.c -deleted file mode 100644 -index ebab6198..00000000 ---- a/common/mlv2v/dummy.c -+++ /dev/null -@@ -1,2 +0,0 @@ --/* Dummy source, to be used for OCaml-based tools with no C sources. */ --enum { foo = 1 }; -diff --git a/common/mlv2v/uefi.ml b/common/mlv2v/uefi.ml -deleted file mode 100644 -index 7a2610f2..00000000 ---- a/common/mlv2v/uefi.ml -+++ /dev/null -@@ -1,71 +0,0 @@ --(* libguestfs generated file -- * WARNING: THIS FILE IS GENERATED -- * from the code in the generator/ subdirectory. -- * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. -- * -- * Copyright (C) 2009-2023 Red Hat Inc. -- * -- * This program is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License along -- * with this program; if not, write to the Free Software Foundation, Inc., -- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- *) -- --type uefi_firmware = { -- code : string; -- code_debug : string option; -- vars : string; -- flags : uefi_flags; --} --and uefi_flags = uefi_flag list --and uefi_flag = UEFI_FLAG_SECURE_BOOT_REQUIRED -- --let uefi_aarch64_firmware = [ -- { code = "/usr/share/AAVMF/AAVMF_CODE.fd"; -- code_debug = Some "/usr/share/AAVMF/AAVMF_CODE.verbose.fd"; -- vars = "/usr/share/AAVMF/AAVMF_VARS.fd"; -- flags = []; -- }; -- { code = "/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw"; -- code_debug = None; -- vars = "/usr/share/edk2/aarch64/vars-template-pflash.raw"; -- flags = []; -- }; --] -- --let uefi_x86_64_firmware = [ -- { code = "/usr/share/OVMF/OVMF_CODE.fd"; -- code_debug = None; -- vars = "/usr/share/OVMF/OVMF_VARS.fd"; -- flags = []; -- }; -- { code = "/usr/share/OVMF/OVMF_CODE.secboot.fd"; -- code_debug = None; -- vars = "/usr/share/OVMF/OVMF_VARS.fd"; -- flags = [UEFI_FLAG_SECURE_BOOT_REQUIRED]; -- }; -- { code = "/usr/share/edk2/ovmf/OVMF_CODE.fd"; -- code_debug = None; -- vars = "/usr/share/edk2/ovmf/OVMF_VARS.fd"; -- flags = []; -- }; -- { code = "/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd"; -- code_debug = None; -- vars = "/usr/share/edk2/ovmf/OVMF_VARS.fd"; -- flags = [UEFI_FLAG_SECURE_BOOT_REQUIRED]; -- }; -- { code = "/usr/share/qemu/ovmf-x86_64-code.bin"; -- code_debug = None; -- vars = "/usr/share/qemu/ovmf-x86_64-vars.bin"; -- flags = []; -- }; --] -diff --git a/common/mlv2v/uefi.mli b/common/mlv2v/uefi.mli -deleted file mode 100644 -index 33789979..00000000 ---- a/common/mlv2v/uefi.mli -+++ /dev/null -@@ -1,35 +0,0 @@ --(* libguestfs generated file -- * WARNING: THIS FILE IS GENERATED -- * from the code in the generator/ subdirectory. -- * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. -- * -- * Copyright (C) 2009-2023 Red Hat Inc. -- * -- * This program is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License along -- * with this program; if not, write to the Free Software Foundation, Inc., -- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -- *) -- --(** UEFI paths. *) -- --type uefi_firmware = { -- code : string; (** code file *) -- code_debug : string option; (** code debug file *) -- vars : string; (** vars template file *) -- flags : uefi_flags; (** flags *) --} --and uefi_flags = uefi_flag list --and uefi_flag = UEFI_FLAG_SECURE_BOOT_REQUIRED -- --val uefi_aarch64_firmware : uefi_firmware list --val uefi_x86_64_firmware : uefi_firmware list -diff --git a/common/qemuopts/qemuopts.c b/common/qemuopts/qemuopts.c -index b12fe38f..7dd9136d 100644 ---- a/common/qemuopts/qemuopts.c -+++ b/common/qemuopts/qemuopts.c -@@ -76,13 +76,14 @@ enum qopt_type { - QOPT_FLAG, - QOPT_ARG, - QOPT_ARG_NOQUOTE, -+ QOPT_RAW, - QOPT_ARG_LIST, - }; - - struct qopt { - enum qopt_type type; - char *flag; /* eg. "-m" */ -- char *value; /* Value, for QOPT_ARG, QOPT_ARG_NOQUOTE. */ -+ char *value; /* Value, for QOPT_ARG, QOPT_ARG_NOQUOTE, QOPT_RAW */ - char **values; /* List of values, for QOPT_ARG_LIST. */ - }; - -@@ -353,6 +354,27 @@ qemuopts_add_arg_noquote (struct qemuopts *qopts, const char *flag, - return 0; - } - -+int -+qemuopts_add_raw (struct qemuopts *qopts, const char *str) -+{ -+ struct qopt *qopt; -+ char *value_copy; -+ -+ value_copy = strdup (str); -+ if (value_copy == NULL) -+ return -1; -+ -+ if ((qopt = extend_options (qopts)) == NULL) { -+ free (value_copy); -+ return -1; -+ } -+ -+ qopt->type = QOPT_RAW; -+ qopt->value = value_copy; -+ -+ return 0; -+} -+ - /** - * Start an argument that takes a comma-separated list of fields. - * -@@ -724,6 +746,12 @@ qemuopts_to_channel (struct qemuopts *qopts, FILE *fp) - shell_and_comma_quote (qopts->options[i].values[j], fp); - } - break; -+ -+ case QOPT_RAW: -+ fprintf (fp, "%s%s", -+ nl, qopts->options[i].value); -+ break; -+ - } - } - fputc ('\n', fp); -@@ -769,6 +797,12 @@ qemuopts_to_argv (struct qemuopts *qopts) - case QOPT_ARG: - case QOPT_ARG_LIST: - n += 2; -+ break; -+ -+ /* Raw is incompatible with using argv. */ -+ case QOPT_RAW: -+ errno = EINVAL; -+ return NULL; - } - } - -@@ -845,6 +879,10 @@ qemuopts_to_argv (struct qemuopts *qopts) - } - ret[n][len] = '\0'; - n++; -+ break; -+ -+ case QOPT_RAW: -+ abort (); - } - } - -@@ -924,7 +962,8 @@ qemuopts_to_config_channel (struct qemuopts *qopts, FILE *fp) - return -1; - - case QOPT_ARG_NOQUOTE: -- /* arg_noquote is incompatible with this function. */ -+ case QOPT_RAW: -+ /* arg_noquote and raw are incompatible with this function. */ - errno = EINVAL; - return -1; - -@@ -960,6 +999,7 @@ qemuopts_to_config_channel (struct qemuopts *qopts, FILE *fp) - case QOPT_FLAG: - case QOPT_ARG_NOQUOTE: - case QOPT_ARG: -+ case QOPT_RAW: - abort (); - - case QOPT_ARG_LIST: -diff --git a/common/qemuopts/qemuopts.h b/common/qemuopts/qemuopts.h -index 08efcd9a..29f81475 100644 ---- a/common/qemuopts/qemuopts.h -+++ b/common/qemuopts/qemuopts.h -@@ -31,6 +31,7 @@ extern int qemuopts_add_flag (struct qemuopts *qopts, const char *flag); - extern int qemuopts_add_arg (struct qemuopts *qopts, const char *flag, const char *value); - extern int qemuopts_add_arg_format (struct qemuopts *qopts, const char *flag, const char *fs, ...) __attribute__((format (printf,3,4))); - extern int qemuopts_add_arg_noquote (struct qemuopts *qopts, const char *flag, const char *value); -+extern int qemuopts_add_raw (struct qemuopts *qopts, const char *str); - extern int qemuopts_start_arg_list (struct qemuopts *qopts, const char *flag); - extern int qemuopts_append_arg_list (struct qemuopts *qopts, const char *value); - extern int qemuopts_append_arg_list_format (struct qemuopts *qopts, const char *fs, ...) __attribute__((format (printf,2,3))); -diff --git a/configure.ac b/configure.ac -index 0c8473bd..8d6a506b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -137,7 +137,6 @@ AC_CONFIG_FILES([Makefile - common/mlstdutils/guestfs_config.ml - common/mltools/Makefile - common/mlutils/Makefile -- common/mlv2v/Makefile - common/mlxml/Makefile - common/qemuopts/Makefile - common/utils/Makefile -diff --git a/convert/Makefile.am b/convert/Makefile.am -index 2d34fe7c..2809c555 100644 ---- a/convert/Makefile.am -+++ b/convert/Makefile.am -@@ -83,7 +83,6 @@ OCAMLPACKAGES = \ - -I $(top_builddir)/common/mlpcre \ - -I $(top_builddir)/common/mltools \ - -I $(top_builddir)/common/mldrivers \ -- -I $(top_builddir)/common/mlv2v \ - -I $(top_builddir)/common/mlxml - if HAVE_OCAML_PKG_GETTEXT - OCAMLPACKAGES += -package gettext-stub -@@ -113,7 +112,6 @@ OCAMLLINKFLAGS = \ - mltools.$(MLARCHIVE) \ - mlcustomize.$(MLARCHIVE) \ - mldrivers.$(MLARCHIVE) \ -- mlv2v.$(MLARCHIVE) \ - mlv2vlib.$(MLARCHIVE) \ - $(LINK_CUSTOM_OCAMLC_ONLY) - -diff --git a/in-place/Makefile.am b/in-place/Makefile.am -index 2217ff40..2fecb3a7 100644 ---- a/in-place/Makefile.am -+++ b/in-place/Makefile.am -@@ -64,8 +64,7 @@ OCAMLPACKAGES = \ - -I $(top_builddir)/common/mlxml \ - -I $(top_builddir)/common/mltools \ - -I $(top_builddir)/common/mlcustomize \ -- -I $(top_builddir)/common/mldrivers \ -- -I $(top_builddir)/common/mlv2v -+ -I $(top_builddir)/common/mldrivers - if HAVE_OCAML_PKG_GETTEXT - OCAMLPACKAGES += -package gettext-stub - endif -@@ -101,7 +100,6 @@ OCAMLLINKFLAGS = \ - mllibvirt.$(MLARCHIVE) \ - mlcustomize.$(MLARCHIVE) \ - mldrivers.$(MLARCHIVE) \ -- mlv2v.$(MLARCHIVE) \ - mlv2vlib.$(MLARCHIVE) \ - mlconvert.$(MLARCHIVE) \ - mlinput.$(MLARCHIVE) \ -diff --git a/input/Makefile.am b/input/Makefile.am -index 2f4ceb0c..0b97074a 100644 ---- a/input/Makefile.am -+++ b/input/Makefile.am -@@ -102,7 +102,6 @@ OCAMLPACKAGES = \ - -I $(top_builddir)/common/mlgettext \ - -I $(top_builddir)/common/mlpcre \ - -I $(top_builddir)/common/mltools \ -- -I $(top_builddir)/common/mlv2v \ - -I $(top_builddir)/common/mlxml - if HAVE_OCAML_PKG_GETTEXT - OCAMLPACKAGES += -package gettext-stub -@@ -130,7 +129,6 @@ OCAMLLINKFLAGS = \ - mlxml.$(MLARCHIVE) \ - mltools.$(MLARCHIVE) \ - mllibvirt.$(MLARCHIVE) \ -- mlv2v.$(MLARCHIVE) \ - mlv2vlib.$(MLARCHIVE) \ - $(LINK_CUSTOM_OCAMLC_ONLY) - -diff --git a/inspector/Makefile.am b/inspector/Makefile.am -index 51ac71f9..172b2dc0 100644 ---- a/inspector/Makefile.am -+++ b/inspector/Makefile.am -@@ -64,8 +64,7 @@ OCAMLPACKAGES = \ - -I $(top_builddir)/common/mlxml \ - -I $(top_builddir)/common/mltools \ - -I $(top_builddir)/common/mlcustomize \ -- -I $(top_builddir)/common/mldrivers \ -- -I $(top_builddir)/common/mlv2v -+ -I $(top_builddir)/common/mldrivers - if HAVE_OCAML_PKG_GETTEXT - OCAMLPACKAGES += -package gettext-stub - endif -@@ -101,7 +100,6 @@ OCAMLLINKFLAGS = \ - mllibvirt.$(MLARCHIVE) \ - mlcustomize.$(MLARCHIVE) \ - mldrivers.$(MLARCHIVE) \ -- mlv2v.$(MLARCHIVE) \ - mlv2vlib.$(MLARCHIVE) \ - mlconvert.$(MLARCHIVE) \ - mlinput.$(MLARCHIVE) \ -diff --git a/lib/Makefile.am b/lib/Makefile.am -index a8776019..5cec771c 100644 ---- a/lib/Makefile.am -+++ b/lib/Makefile.am -@@ -87,7 +87,6 @@ OCAMLPACKAGES = \ - -I $(top_builddir)/common/mlstdutils \ - -I $(top_builddir)/common/mltools \ - -I $(top_builddir)/common/mlutils \ -- -I $(top_builddir)/common/mlv2v \ - -I $(top_builddir)/common/mlxml - OCAMLPACKAGES_TESTS = $(MLV2VLIB_CMA) - -diff --git a/lib/utils.ml b/lib/utils.ml -index 4c9b7415..c4cfd89b 100644 ---- a/lib/utils.ml -+++ b/lib/utils.ml -@@ -69,26 +69,6 @@ let qemu_supports_sound_card = function - | Types.USBAudio - -> false - --(* Find the UEFI firmware. *) --let find_uefi_firmware guest_arch = -- let files = -- (* The lists of firmware are actually defined in common/utils/uefi.c. *) -- match guest_arch with -- | "x86_64" -> Uefi.uefi_x86_64_firmware -- | "aarch64" -> Uefi.uefi_aarch64_firmware -- | arch -> -- error (f_"don’t know how to convert UEFI guests for architecture %s") -- guest_arch in -- let rec loop = function -- | [] -> -- error (f_"cannot find firmware for UEFI guests.\n\nYou probably \ -- need to install OVMF (x86-64), or AAVMF (aarch64)") -- | ({ Uefi.code; vars = vars_template } as ret) :: rest -> -- if Sys.file_exists code && Sys.file_exists vars_template then ret -- else loop rest -- in -- loop files -- - let compare_app2_versions app1 app2 = - let i = compare app1.Guestfs.app2_epoch app2.Guestfs.app2_epoch in - if i <> 0 then i -diff --git a/lib/utils.mli b/lib/utils.mli -index 46d05306..afe61a4e 100644 ---- a/lib/utils.mli -+++ b/lib/utils.mli -@@ -36,10 +36,6 @@ val kvm_arch : string -> string - val qemu_supports_sound_card : Types.source_sound_model -> bool - (** Does qemu support the given sound card? *) - --val find_uefi_firmware : string -> Uefi.uefi_firmware --(** Find the UEFI firmware for the guest architecture. -- This cannot return an error, it calls [error] and fails instead. *) -- - val compare_app2_versions : Guestfs.application2 -> Guestfs.application2 -> int - (** Compare two app versions. *) - -diff --git a/ocaml-dep.sh.in b/ocaml-dep.sh.in -index 7f3130e5..565f880f 100755 ---- a/ocaml-dep.sh.in -+++ b/ocaml-dep.sh.in -@@ -41,7 +41,6 @@ common/mlprogress - common/mlstdutils - common/mltools - common/mlutils --common/mlv2v - common/mlvisit - common/mlxml - lib -diff --git a/output/Makefile.am b/output/Makefile.am -index 09638c25..e71891eb 100644 ---- a/output/Makefile.am -+++ b/output/Makefile.am -@@ -107,7 +107,6 @@ OCAMLPACKAGES = \ - -I $(top_builddir)/common/mlgettext \ - -I $(top_builddir)/common/mlpcre \ - -I $(top_builddir)/common/mltools \ -- -I $(top_builddir)/common/mlv2v \ - -I $(top_builddir)/common/mlxml - if HAVE_OCAML_PKG_GETTEXT - OCAMLPACKAGES += -package gettext-stub -@@ -138,7 +137,6 @@ OCAMLLINKFLAGS = \ - mlxml.$(MLARCHIVE) \ - mltools.$(MLARCHIVE) \ - mllibvirt.$(MLARCHIVE) \ -- mlv2v.$(MLARCHIVE) \ - mlv2vlib.$(MLARCHIVE) \ - $(LINK_CUSTOM_OCAMLC_ONLY) - -diff --git a/output/output_qemu.ml b/output/output_qemu.ml -index b6f24565..fd0182d6 100644 ---- a/output/output_qemu.ml -+++ b/output/output_qemu.ml -@@ -105,30 +105,56 @@ module QEMU = struct - - let { guestcaps; target_buses; target_firmware } = target_meta in - -+ (* Start the shell script. Write it to a temporary file -+ * which we rename at the end. -+ *) - let file = output_storage // output_name ^ ".sh" in -+ let tmpfile = file ^ ".tmp" in -+ On_exit.unlink tmpfile; - -- let uefi_firmware = -- match target_firmware with -- | TargetBIOS -> None -- | TargetUEFI -> Some (find_uefi_firmware guestcaps.gcaps_arch) in -- let machine, secure_boot_required = -- match guestcaps.gcaps_machine, uefi_firmware with -- | _, Some { Uefi.flags } -- when List.mem Uefi.UEFI_FLAG_SECURE_BOOT_REQUIRED flags -> -- (* Force machine type to Q35 because PC does not support -- * secure boot. We must remove this when we get the -- * correct machine type from libosinfo in future. XXX -- *) -- Q35, true -- | machine, _ -> -- machine, false in -- let smm = secure_boot_required in -+ let chan = open_out tmpfile in -+ let fpf fs = fprintf chan fs in -+ fpf "#!/bin/sh -\n"; -+ fpf "\n"; - -- let machine_str = -- match machine with -- | I440FX -> "pc" -- | Q35 -> "q35" -- | Virt -> "virt" in -+ (* Allow the user to override our choice of machine type. *) -+ let () = -+ let machine_str = -+ match guestcaps.gcaps_machine with -+ | I440FX -> "pc" -+ | Q35 -> "q35" -+ | Virt -> "virt" in -+ fpf "machine=%s\n" machine_str; -+ fpf "\n" in -+ -+ (* If the firmware is UEFI, locate the OVMF files. *) -+ (match target_firmware with -+ | TargetBIOS -> () -+ | TargetUEFI -> -+ let prefix = -+ match guestcaps.gcaps_arch with -+ | "x86_64" -> -+ fpf "uefi_dir=/usr/share/OVMF\n"; "OVMF" -+ | "aarch64" -> -+ fpf "uefi_dir=/usr/share/AAVMF\n"; "AAVMF" -+ | arch -> -+ error (f_"don’t know how to convert UEFI guests \ -+ for architecture %s") -+ arch in -+ fpf "uefi_code=\"$( \ -+ find $uefi_dir -name '%s_CODE*.fd' -print -quit )\"\n" -+ prefix; -+ fpf "uefi_vars_template=\"$( \ -+ find $uefi_dir -name '%s_VARS.fd' -print -quit )\"\n" -+ prefix; -+ fpf "\n"; -+ fpf "# Make a copy of the UEFI variables template\n"; -+ fpf "uefi_vars=\"$(mktemp)\"\n"; -+ fpf "cp \"$uefi_vars_template\" \"$uefi_vars\"\n"; -+ fpf "\n"; -+ fpf "# You may need to set this 'on' to use secure boot\n"; -+ fpf "smm=off\n"; -+ ); - - (* Construct the command line. Note that the [Qemuopts] - * module deals with shell and qemu comma quoting. -@@ -152,20 +178,17 @@ module QEMU = struct - - if not guestcaps.gcaps_rtc_utc then arg "-rtc" "base=localtime"; - -- arg_list "-machine" (machine_str :: -- (if smm then ["smm=on"] else []) @ -- ["accel=kvm:tcg"]); -+ arg_noquote "-machine" "$machine${smm:+,smm=$smm},accel=kvm:tcg"; - -- (match uefi_firmware with -- | None -> () -- | Some { Uefi.code } -> -- if secure_boot_required then -- arg_list "-global" -- ["driver=cfi.pflash01"; "property=secure"; "value=on"]; -- arg_list "-drive" -- ["if=pflash"; "format=raw"; "file=" ^ code; "readonly=on"]; -- arg_noquote "-drive" "if=pflash,format=raw,file=\"$uefi_vars\""; -- ); -+ fpf "if [ \"$uefi_code\" != \"\" ]; then\n"; -+ fpf " uefi_args=\"\\\n"; -+ fpf " -global driver=cfi.pflash01,property=secure,value=$smm \\\n"; -+ fpf " -drive if=pflash,format=raw,file=$uefi_code,readonly=on \\\n"; -+ fpf " -drive if=pflash,format=raw,file=$uefi_vars \\\n"; -+ fpf " \"\n"; -+ fpf "fi\n"; -+ fpf "\n"; -+ Qemuopts.raw cmd "$uefi_args"; - - arg "-m" (Int64.to_string (source.s_memory /^ 1024L /^ 1024L)); - -@@ -209,7 +232,7 @@ module QEMU = struct - Array.exists floppy_filter target_buses.target_floppy_bus in - - if ide_ctrl_needed then ( -- match machine with -+ match guestcaps.gcaps_machine with - | I440FX -> () - (* The PC machine has a built-in controller of type "piix3-ide" - * providing buses "ide.0" and "ide.1", with each bus fitting two -@@ -232,7 +255,7 @@ module QEMU = struct - arg_list "-device" [ "virtio-scsi-pci"; "id=scsi0" ]; - - if floppy_ctrl_needed then ( -- match machine with -+ match guestcaps.gcaps_machine with - | I440FX -> () - (* The PC machine has a built-in controller of type "isa-fdc" - * providing bus "floppy-bus.0", fitting two devices. -@@ -283,7 +306,7 @@ module QEMU = struct - *) - let backend_name = sprintf "drive-ide-%d" frontend_ctr - and ide_bus, ide_unit = -- match machine with -+ match guestcaps.gcaps_machine with - | I440FX -> frontend_ctr / 2, frontend_ctr mod 2 - | Q35 -> frontend_ctr, 0 - | Virt -> 0, 0 (* should never happen, see warning above *) in -@@ -450,25 +473,13 @@ module QEMU = struct - if inspect.i_type = "linux" then - arg "-serial" "stdio"; - -- (* Write the qemu script. *) -- with_open_out file ( -- fun chan -> -- let fpf fs = fprintf chan fs in -- fpf "#!/bin/sh -\n"; -- fpf "\n"; -- -- (match uefi_firmware with -- | None -> () -- | Some { Uefi.vars = vars_template } -> -- fpf "# Make a copy of the UEFI variables template\n"; -- fpf "uefi_vars=\"$(mktemp)\"\n"; -- fpf "cp %s \"$uefi_vars\"\n" (quote vars_template); -- fpf "\n" -- ); -- -- Qemuopts.to_chan cmd chan -- ); -+ (* Write the qemu command. *) -+ Qemuopts.to_chan cmd chan; - -+ (* Finish off by renaming the temporary file to the final file -+ * and making it executable. -+ *) -+ Unix.rename tmpfile file; - Unix.chmod file 0o755; - - (* If -oo qemu-boot option was specified then we should boot the guest. *) -diff --git a/output/qemuopts-c.c b/output/qemuopts-c.c -index 03c40206..1d080737 100644 ---- a/output/qemuopts-c.c -+++ b/output/qemuopts-c.c -@@ -176,6 +176,18 @@ guestfs_int_qemuopts_arg_list (value qoptsv, value flagv, value valuesv) - CAMLreturn (Val_unit); - } - -+value -+guestfs_int_qemuopts_raw (value qoptsv, value strv) -+{ -+ CAMLparam2 (qoptsv, strv); -+ struct qemuopts *qopts = Qopts_val (qoptsv); -+ -+ if (qemuopts_add_raw (qopts, String_val (strv)) == -1) -+ unix_error (errno, (char *) "qemuopts_add_raw", strv); -+ -+ CAMLreturn (Val_unit); -+} -+ - value - guestfs_int_qemuopts_to_script (value qoptsv, value strv) - { -diff --git a/output/qemuopts.ml b/output/qemuopts.ml -index 1ba57dba..bc4e33d7 100644 ---- a/output/qemuopts.ml -+++ b/output/qemuopts.ml -@@ -25,6 +25,7 @@ external flag : t -> string -> unit = "guestfs_int_qemuopts_flag" - external arg : t -> string -> string -> unit = "guestfs_int_qemuopts_arg" - external arg_noquote : t -> string -> string -> unit = "guestfs_int_qemuopts_arg_noquote" - external arg_list : t -> string -> string list -> unit = "guestfs_int_qemuopts_arg_list" -+external raw : t -> string -> unit = "guestfs_int_qemuopts_raw" - external to_script : t -> string -> unit = "guestfs_int_qemuopts_to_script" - - external _to_chan : t -> Unix.file_descr -> unit = "guestfs_int_qemuopts_to_chan" -diff --git a/output/qemuopts.mli b/output/qemuopts.mli -index 5c39a32f..bd65405f 100644 ---- a/output/qemuopts.mli -+++ b/output/qemuopts.mli -@@ -53,6 +53,10 @@ val arg_list : t -> string -> string list -> unit - - This does both qemu comma-quoting and shell-quoting as required. *) - -+val raw : t -> string -> unit -+(** [raw "stuff"] adds [stuff] to the command line completely -+ unquoted. Use with care. *) -+ - val to_script : t -> string -> unit - (** [to_script t "./file.sh"] writes the resulting command line to - a file. The file begins with [#!/bin/sh] and is chmod 0755. *) -diff --git a/po/POTFILES-ml b/po/POTFILES-ml -index e88a18b0..7f1d1cdb 100644 ---- a/po/POTFILES-ml -+++ b/po/POTFILES-ml -@@ -42,7 +42,6 @@ common/mltools/urandom.ml - common/mltools/xpath_helpers.ml - common/mlutils/c_utils.ml - common/mlutils/unix_utils.ml --common/mlv2v/uefi.ml - common/mlxml/xml.ml - in-place/in_place.ml - input/OVA.ml -diff --git a/v2v/Makefile.am b/v2v/Makefile.am -index d609ab02..9378eb89 100644 ---- a/v2v/Makefile.am -+++ b/v2v/Makefile.am -@@ -67,8 +67,7 @@ OCAMLPACKAGES = \ - -I $(top_builddir)/common/mlxml \ - -I $(top_builddir)/common/mltools \ - -I $(top_builddir)/common/mlcustomize \ -- -I $(top_builddir)/common/mldrivers \ -- -I $(top_builddir)/common/mlv2v -+ -I $(top_builddir)/common/mldrivers - if HAVE_OCAML_PKG_GETTEXT - OCAMLPACKAGES += -package gettext-stub - endif -@@ -104,7 +103,6 @@ OCAMLLINKFLAGS = \ - mllibvirt.$(MLARCHIVE) \ - mlcustomize.$(MLARCHIVE) \ - mldrivers.$(MLARCHIVE) \ -- mlv2v.$(MLARCHIVE) \ - mlv2vlib.$(MLARCHIVE) \ - mlconvert.$(MLARCHIVE) \ - mlinput.$(MLARCHIVE) \ -@@ -164,7 +162,6 @@ v2v_unit_tests_DEPENDENCIES = \ - ../common/mltools/mltools.$(MLARCHIVE) \ - ../common/mlcustomize/mlcustomize.$(MLARCHIVE) \ - ../common/mldrivers/mldrivers.$(MLARCHIVE) \ -- ../common/mlv2v/mlv2v.$(MLARCHIVE) \ - $(top_srcdir)/ocaml-link.sh - v2v_unit_tests_LINK = \ - $(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \ diff --git a/0018-o-qemu-Add-set-e-x-at-the-top-of-the-output-script.patch b/0018-o-qemu-Add-set-e-x-at-the-top-of-the-output-script.patch deleted file mode 100644 index d365776..0000000 --- a/0018-o-qemu-Add-set-e-x-at-the-top-of-the-output-script.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 6da3da6a74890e055a5f29d123632358c4fbd462 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 15 Nov 2024 14:04:48 +0000 -Subject: [PATCH] -o qemu: Add set -e, -x at the top of the output script - -This adds: - - set -e - #set -x - -The second command is commented so that users can enable it if they -want to see the output. - -(cherry picked from commit e09aaad7e787803ff5e383fa6b5276c888b42ef5) -(cherry picked from commit f43d92473d3da0a5f6a2da6e44ca8416ad824d8f) ---- - output/output_qemu.ml | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/output/output_qemu.ml b/output/output_qemu.ml -index fd0182d6..b0c2ff01 100644 ---- a/output/output_qemu.ml -+++ b/output/output_qemu.ml -@@ -116,6 +116,9 @@ module QEMU = struct - let fpf fs = fprintf chan fs in - fpf "#!/bin/sh -\n"; - fpf "\n"; -+ fpf "set -e\n"; -+ fpf "#set -x\n"; -+ fpf "\n"; - - (* Allow the user to override our choice of machine type. *) - let () = diff --git a/0019-v2v-Implement-parallel-N-for-parallel-disk-copies.patch b/0019-v2v-Implement-parallel-N-for-parallel-disk-copies.patch deleted file mode 100644 index 7c308dd..0000000 --- a/0019-v2v-Implement-parallel-N-for-parallel-disk-copies.patch +++ /dev/null @@ -1,277 +0,0 @@ -From de71ce60bff586dad2d554d3de344dd7d2d13c86 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 2 Dec 2024 15:22:43 +0000 -Subject: [PATCH] v2v: Implement --parallel=N for parallel disk copies - -When set, run up to N copies of nbdcopy in parallel. This only -applies for guests with multiple disks. - -The default, as for all older versions of virt-v2v, is to copy disks -one at a time. - -(cherry picked from commit fd1148f79581b148525eb12154aef7603ccf0baa) -(cherry picked from commit 037a603c2d5cf9d2d5f8157116dbf14945277dc2) ---- - docs/virt-v2v.pod | 13 +++++++ - lib/utils.ml | 6 ++++ - lib/utils.mli | 4 +++ - tests/Makefile.am | 2 ++ - tests/test-v2v-i-disk-parallel.sh | 54 +++++++++++++++++++++++++++++ - v2v/v2v.ml | 56 +++++++++++++++++++++++++------ - 6 files changed, 125 insertions(+), 10 deletions(-) - create mode 100755 tests/test-v2v-i-disk-parallel.sh - -diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index de92db84..f0857ebf 100644 ---- a/docs/virt-v2v.pod -+++ b/docs/virt-v2v.pod -@@ -556,6 +556,19 @@ The directory must exist. - - For I<-o openstack>, this is the optional Cinder volume type. - -+=item B<--parallel> N -+ -+Enable parallel copying if the guest has multiple disks. I is the -+maximum number of parallel L instances to run. -+ -+The default is to run at most one instance of nbdcopy -+(ie. I<--parallel=1>). All versions of virt-v2v E 2.7.2 also did -+disk copies one at a time. -+ -+Within each guest disk, nbdcopy tries to copy in parallel if the -+underlying endpoints support that. This is not affected by this -+command line option. See the L manual page for details. -+ - =item B<--print-source> - - Print information about the source guest and stop. This option is -diff --git a/lib/utils.ml b/lib/utils.ml -index c4cfd89b..f2da9e80 100644 ---- a/lib/utils.ml -+++ b/lib/utils.ml -@@ -29,6 +29,12 @@ let large_tmpdir = - try Sys.getenv "VIRT_V2V_TMPDIR" - with Not_found -> (open_guestfs ())#get_cachedir () - -+let string_of_process_status = function -+ | Unix.WEXITED 0 -> s_"success" -+ | WEXITED i -> sprintf (f_"exited with non-zero error code %d") i -+ | WSIGNALED i -> sprintf (f_"signalled by signal %d") i -+ | WSTOPPED i -> sprintf (f_"stopped by signal %d") i -+ - (* Is SELinux enabled and enforcing on the host? *) - let have_selinux = - 0 = Sys.command "getenforce 2>/dev/null | grep -isq Enforcing" -diff --git a/lib/utils.mli b/lib/utils.mli -index afe61a4e..e7ee13d1 100644 ---- a/lib/utils.mli -+++ b/lib/utils.mli -@@ -23,6 +23,10 @@ val large_tmpdir : string - such as overlays in this directory. Small temporary files can - use the default behaviour eg. of {!Filename.temp_file} *) - -+val string_of_process_status : Unix.process_status -> string -+(** Convert a process status (such as returned by {!Unix.wait}) into -+ a printable string. *) -+ - val have_selinux : bool - (** True if SELinux is enabled and enforcing on the host. *) - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 2cf57248..0035262e 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -74,6 +74,7 @@ TESTS = \ - test-v2v-cdrom.sh \ - test-v2v-floppy.sh \ - test-v2v-i-disk.sh \ -+ test-v2v-i-disk-parallel.sh \ - test-v2v-i-ova.sh \ - test-v2v-inspector.sh \ - test-v2v-mac.sh \ -@@ -185,6 +186,7 @@ EXTRA_DIST += \ - test-v2v-floppy.expected \ - test-v2v-floppy.sh \ - test-v2v-i-disk.sh \ -+ test-v2v-i-disk-parallel.sh \ - test-v2v-i-ova-as-root.ovf \ - test-v2v-i-ova-as-root.sh \ - test-v2v-i-ova-bad-sha1.sh \ -diff --git a/tests/test-v2v-i-disk-parallel.sh b/tests/test-v2v-i-disk-parallel.sh -new file mode 100755 -index 00000000..a6470fdd ---- /dev/null -+++ b/tests/test-v2v-i-disk-parallel.sh -@@ -0,0 +1,54 @@ -+#!/bin/bash - -+# libguestfs virt-v2v test script -+# Copyright (C) 2014-2024 Red Hat Inc. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ -+# Test --parallel option. -+ -+set -e -+ -+source ./functions.sh -+set -e -+set -x -+ -+skip_if_skipped -+windows=../test-data/phony-guests/windows.img -+requires test -f $windows -+ -+export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" -+ -+d=test-v2v-i-disk-parallel.d -+rm -rf $d -+cleanup_fn rm -rf $d -+mkdir $d -+ -+truncate -s $((100*1024*1024)) $d/disk-2.img $d/disk-3.img $d/disk-4.img -+ -+$VG virt-v2v --debug-gc \ -+ --parallel=2 \ -+ -i disk \ -+ $windows \ -+ $d/disk-2.img \ -+ $d/disk-3.img \ -+ $d/disk-4.img \ -+ -o local -os $d -+ -+# Test the libvirt XML metadata and output disks were created. -+test -f $d/windows.xml -+test -f $d/windows-sda -+test -f $d/windows-sdb -+test -f $d/windows-sdc -+test -f $d/windows-sdd -diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index 8be1e5cb..b7dbce3a 100644 ---- a/v2v/v2v.ml -+++ b/v2v/v2v.ml -@@ -79,6 +79,7 @@ let rec main () = - ) - in - -+ let parallel = ref 1 in - let network_map = Networks.create () in - let static_ips = ref [] in - let rec add_network str = -@@ -259,6 +260,8 @@ let rec main () = - s_"Set output storage location"; - [ L"password-file" ], Getopt.String ("filename", set_string_option_once "-ip" input_password), - s_"Same as ‘-ip filename’"; -+ [ L"parallel" ], Getopt.Set_int ("N", parallel), -+ s_"Run up to N instances of nbdcopy in parallel"; - [ L"print-source" ], Getopt.Set print_source, - s_"Print source and stop"; - [ L"root" ], Getopt.String ("ask|... ", set_root_choice), -@@ -346,6 +349,7 @@ read the man page virt-v2v(1). - | `Preallocated -> Types.Preallocated in - let output_mode = !output_mode in - let output_name = !output_name in -+ let parallel = !parallel in - let print_source = !print_source in - let root_choice = !root_choice in - let static_ips = !static_ips in -@@ -365,6 +369,7 @@ read the man page virt-v2v(1). - pr "mac-option\n"; - pr "bandwidth-option\n"; - pr "mac-ip-option\n"; -+ pr "parallel-option\n"; - pr "customize-ops\n"; - pr "input:disk\n"; - pr "input:libvirt\n"; -@@ -551,12 +556,15 @@ read the man page virt-v2v(1). - else - List.rev acc - in -- let disks = loop [] 0 in -- let nr_disks = List.length disks in -+ let disks = ref (loop [] 0) in -+ let nr_disks = List.length !disks in - - (* Copy the disks. *) -- List.iter ( -- fun (i, input_socket, output_socket) -> -+ let nbdcopy_pids = ref [] in -+ let rec copy_loop () = -+ if List.length !nbdcopy_pids < parallel && !disks <> [] then ( -+ (* Schedule another nbdcopy process. *) -+ let i, input_socket, output_socket = List.pop_front disks in - message (f_"Copying disk %d/%d") (i+1) nr_disks; - - let request_size = Output_module.request_size -@@ -576,8 +584,33 @@ read the man page virt-v2v(1). - flush Stdlib.stderr - ); - -- nbdcopy ?request_size output_alloc input_uri output_uri -- ) disks; -+ let pid = nbdcopy ?request_size output_alloc input_uri output_uri in -+ List.push_front pid nbdcopy_pids; -+ -+ copy_loop (); -+ ) -+ else if !nbdcopy_pids <> [] then ( -+ (* Wait for one nbdcopy instance to exit. *) -+ let pid, status = wait () in -+ (* If this internal error turns up in real world scenarios then -+ * we may need to change the [wait] above so it only waits on -+ * the nbdcopy PIDs. -+ *) -+ if not (List.mem pid !nbdcopy_pids) then -+ error (f_"internal error: wait returned unexpected \ -+ process ID %d status \"%s\"") -+ pid (string_of_process_status status); -+ nbdcopy_pids := List.filter ((<>) pid) !nbdcopy_pids; -+ (match status with -+ | WEXITED 0 -> copy_loop () -+ | WEXITED _ | WSIGNALED _ | WSTOPPED _ -> -+ error "nbdcopy %s" (string_of_process_status status) -+ ); -+ ) -+ in -+ copy_loop (); -+ assert (!disks == []); -+ assert (!nbdcopy_pids == []); - - (* End of copying phase. *) - unlink (v2vdir // "copy"); -@@ -615,6 +648,7 @@ and check_host_free_space () = - \"Minimum free space check in the host\".") - large_tmpdir (human_size free_space) - -+(* Start nbdcopy as a background process, returning the PID. *) - and nbdcopy ?request_size output_alloc input_uri output_uri = - (* XXX It's possible that some output modes know whether - * --target-is-zero which would be a useful optimization. -@@ -642,10 +676,12 @@ and nbdcopy ?request_size output_alloc input_uri output_uri = - if not (quiet ()) then List.push_back cmd "--progress"; - if output_alloc = Types.Preallocated then List.push_back cmd "--allocated"; - -- let cmd = !cmd in -- -- if run_command cmd <> 0 then -- error (f_"nbdcopy command failed, see earlier error messages") -+ let args = Array.of_list !cmd in -+ match fork () with -+ | 0 -> -+ (* Child process (nbdcopy). *) -+ execvp "nbdcopy" args -+ | pid -> pid - - (* Run nbdinfo on a URI and collect the information. However don't - * fail if nbdinfo is not installed since this is just used for debugging. diff --git a/0020-tests-Rename-all-test-v2v-to-test.patch b/0020-tests-Rename-all-test-v2v-to-test.patch deleted file mode 100644 index e117450..0000000 --- a/0020-tests-Rename-all-test-v2v-to-test.patch +++ /dev/null @@ -1,1931 +0,0 @@ -From 4b850f47086de43bdfb53485597ef10459921258 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 5 Dec 2024 14:40:39 +0000 -Subject: [PATCH] tests: Rename all test-v2v-* to test-* - -When virt-v2v was part of libguestfs, before it was a separate -component, we prefixed all test names with 'test-v2v-*' in order to -distinguish them from tests for other components. Since virt-v2v is -now separate, we no longer need to do this. Thus we can remove the -'-v2v-' part of every test name, which reduces typing and makes the -names nicer. - -Note that we cannot remove the 'test-' prefix. This is because -automake reserves an unspecified list of words (eg. "compile") and -tests using those names will fail. Keeping the 'test-' prefix avoids -this. - -(cherry picked from commit 67d6fd45f3f9521523aac5650dcdd7b756dc3547) -(cherry picked from commit d368bd7024994b0486ce8026965498f9316b91b2) ---- - .gitignore | 14 +- - configure.ac | 12 +- - docs/Makefile.am | 4 +- - docs/{test-v2v-docs.sh => test-docs.sh} | 0 - output/Makefile.am | 4 +- - ...python-syntax.sh => test-python-syntax.sh} | 0 - tests/Makefile.am | 325 +++++++++--------- - ...es.sh => test-bad-networks-and-bridges.sh} | 2 +- - ...v-block-driver.sh => test-block-driver.sh} | 2 +- - ...v2v-cdrom.expected => test-cdrom.expected} | 0 - tests/{test-v2v-cdrom.sh => test-cdrom.sh} | 6 +- - ...est-v2v-cdrom.xml.in => test-cdrom.xml.in} | 0 - ...conversion-of.sh => test-conversion-of.sh} | 0 - ...est-v2v-customize.sh => test-customize.sh} | 2 +- - ...ion.sh => test-fedora-btrfs-conversion.sh} | 0 - ...onversion.sh => test-fedora-conversion.sh} | 0 - ... => test-fedora-luks-on-lvm-conversion.sh} | 0 - ... => test-fedora-lvm-on-luks-conversion.sh} | 0 - ...ersion.sh => test-fedora-md-conversion.sh} | 0 - ...v-floppy.expected => test-floppy.expected} | 0 - tests/{test-v2v-floppy.sh => test-floppy.sh} | 6 +- - ...t-v2v-floppy.xml.in => test-floppy.xml.in} | 0 - ...sk-parallel.sh => test-i-disk-parallel.sh} | 2 +- - tests/{test-v2v-i-disk.sh => test-i-disk.sh} | 2 +- - ...ova-as-root.ovf => test-i-ova-as-root.ovf} | 0 - ...i-ova-as-root.sh => test-i-ova-as-root.sh} | 4 +- - ...ova-bad-sha1.sh => test-i-ova-bad-sha1.sh} | 4 +- - ...bad-sha256.sh => test-i-ova-bad-sha256.sh} | 4 +- - ...checksums.ovf => test-i-ova-checksums.ovf} | 0 - ...a-directory.sh => test-i-ova-directory.sh} | 4 +- - ...s.expected => test-i-ova-formats.expected} | 0 - ...ova-formats.ovf => test-i-ova-formats.ovf} | 0 - ...i-ova-formats.sh => test-i-ova-formats.sh} | 12 +- - ...cksums.sh => test-i-ova-good-checksums.sh} | 4 +- - ...ova-gz.expected => test-i-ova-gz.expected} | 0 - ...est-v2v-i-ova-gz.ovf => test-i-ova-gz.ovf} | 0 - ...{test-v2v-i-ova-gz.sh => test-i-ova-gz.sh} | 8 +- - ...st1.sh => test-i-ova-invalid-manifest1.sh} | 4 +- - ...st2.sh => test-i-ova-invalid-manifest2.sh} | 4 +- - ...expected => test-i-ova-snapshots.expected} | 0 - ...pected2 => test-i-ova-snapshots.expected2} | 0 - ...snapshots.ovf => test-i-ova-snapshots.ovf} | 0 - ...a-snapshots.sh => test-i-ova-snapshots.sh} | 10 +- - ...xpected => test-i-ova-subfolders.expected} | 0 - ...ected2 => test-i-ova-subfolders.expected2} | 0 - ...bfolders.ovf => test-i-ova-subfolders.ovf} | 0 - ...subfolders.sh => test-i-ova-subfolders.sh} | 8 +- - ...a-tar.expected => test-i-ova-tar.expected} | 0 - ...tar.expected2 => test-i-ova-tar.expected2} | 0 - ...t-v2v-i-ova-tar.ovf => test-i-ova-tar.ovf} | 0 - ...est-v2v-i-ova-tar.sh => test-i-ova-tar.sh} | 10 +- - ...expected => test-i-ova-two-disks.expected} | 0 - ...pected2 => test-i-ova-two-disks.expected2} | 0 - ...two-disks.ovf => test-i-ova-two-disks.ovf} | 0 - ...a-two-disks.sh => test-i-ova-two-disks.sh} | 10 +- - tests/{test-v2v-i-ova.ovf => test-i-ova.ovf} | 0 - tests/{test-v2v-i-ova.sh => test-i-ova.sh} | 6 +- - tests/{test-v2v-i-ova.xml => test-i-ova.xml} | 0 - ...i-vmx-1.expected => test-i-vmx-1.expected} | 0 - ...{test-v2v-i-vmx-1.vmx => test-i-vmx-1.vmx} | 0 - ...i-vmx-2.expected => test-i-vmx-2.expected} | 0 - ...{test-v2v-i-vmx-2.vmx => test-i-vmx-2.vmx} | 0 - ...i-vmx-3.expected => test-i-vmx-3.expected} | 0 - ...{test-v2v-i-vmx-3.vmx => test-i-vmx-3.vmx} | 0 - ...i-vmx-4.expected => test-i-vmx-4.expected} | 0 - ...{test-v2v-i-vmx-4.vmx => test-i-vmx-4.vmx} | 0 - ...i-vmx-5.expected => test-i-vmx-5.expected} | 0 - ...{test-v2v-i-vmx-5.vmx => test-i-vmx-5.vmx} | 0 - ...i-vmx-6.expected => test-i-vmx-6.expected} | 0 - ...{test-v2v-i-vmx-6.vmx => test-i-vmx-6.vmx} | 0 - ...i-vmx-7.expected => test-i-vmx-7.expected} | 0 - ...{test-v2v-i-vmx-7.vmx => test-i-vmx-7.vmx} | 0 - tests/{test-v2v-i-vmx.sh => test-i-vmx.sh} | 16 +- - ...{test-v2v-in-place.sh => test-in-place.sh} | 2 +- - ...est-v2v-inspector.sh => test-inspector.sh} | 2 +- - ...k-io-query.sh => test-it-vddk-io-query.sh} | 2 +- - ...mac-expected.xml => test-mac-expected.xml} | 0 - tests/{test-v2v-mac.sh => test-mac.sh} | 6 +- - .../{test-v2v-mac.xml.in => test-mac.xml.in} | 0 - ...e-readable.sh => test-machine-readable.sh} | 8 +- - ...=> test-networks-and-bridges-expected.xml} | 0 - ...ridges.sh => test-networks-and-bridges.sh} | 6 +- - ...ml.in => test-networks-and-bridges.xml.in} | 0 - ...{test-v2v-o-glance.sh => test-o-glance.sh} | 0 - ...rt-fedora.sh => test-o-kubevirt-fedora.sh} | 4 +- - ...d => test-o-kubevirt-fedora.yaml.expected} | 0 - ...-windows.sh => test-o-kubevirt-windows.sh} | 4 +- - ... => test-o-kubevirt-windows.yaml.expected} | 0 - ...est-v2v-o-libvirt.sh => test-o-libvirt.sh} | 2 +- - ...ed.sh => test-o-local-qcow2-compressed.sh} | 2 +- - tests/{test-v2v-o-null.sh => test-o-null.sh} | 0 - ...v2v-o-openstack.sh => test-o-openstack.sh} | 4 +- - tests/{test-v2v-o-qemu.sh => test-o-qemu.sh} | 2 +- - ...ption-qcow2.sh => test-oa-option-qcow2.sh} | 2 +- - ...oa-option-raw.sh => test-oa-option-raw.sh} | 2 +- - ...est-v2v-of-option.sh => test-of-option.sh} | 2 +- - ...est-v2v-on-option.sh => test-on-option.sh} | 2 +- - ...ce.expected => test-print-source.expected} | 0 - ...v-print-source.sh => test-print-source.sh} | 6 +- - ...source.xml.in => test-print-source.xml.in} | 0 - tests/{test-v2v-sound.sh => test-sound.sh} | 4 +- - ...est-v2v-sound.xml.in => test-sound.xml.in} | 0 - tests/{test-v2v-trim.sh => test-trim.sh} | 2 +- - ...rtio-win-iso.sh => test-virtio-win-iso.sh} | 2 +- - ...nversion.sh => test-windows-conversion.sh} | 2 +- - 105 files changed, 279 insertions(+), 278 deletions(-) - rename docs/{test-v2v-docs.sh => test-docs.sh} (100%) - rename output/{test-v2v-python-syntax.sh => test-python-syntax.sh} (100%) - rename tests/{test-v2v-bad-networks-and-bridges.sh => test-bad-networks-and-bridges.sh} (97%) - rename tests/{test-v2v-block-driver.sh => test-block-driver.sh} (99%) - rename tests/{test-v2v-cdrom.expected => test-cdrom.expected} (100%) - rename tests/{test-v2v-cdrom.sh => test-cdrom.sh} (92%) - rename tests/{test-v2v-cdrom.xml.in => test-cdrom.xml.in} (100%) - rename tests/{test-v2v-conversion-of.sh => test-conversion-of.sh} (100%) - rename tests/{test-v2v-customize.sh => test-customize.sh} (98%) - rename tests/{test-v2v-fedora-btrfs-conversion.sh => test-fedora-btrfs-conversion.sh} (100%) - rename tests/{test-v2v-fedora-conversion.sh => test-fedora-conversion.sh} (100%) - rename tests/{test-v2v-fedora-luks-on-lvm-conversion.sh => test-fedora-luks-on-lvm-conversion.sh} (100%) - rename tests/{test-v2v-fedora-lvm-on-luks-conversion.sh => test-fedora-lvm-on-luks-conversion.sh} (100%) - rename tests/{test-v2v-fedora-md-conversion.sh => test-fedora-md-conversion.sh} (100%) - rename tests/{test-v2v-floppy.expected => test-floppy.expected} (100%) - rename tests/{test-v2v-floppy.sh => test-floppy.sh} (92%) - rename tests/{test-v2v-floppy.xml.in => test-floppy.xml.in} (100%) - rename tests/{test-v2v-i-disk-parallel.sh => test-i-disk-parallel.sh} (98%) - rename tests/{test-v2v-i-disk.sh => test-i-disk.sh} (98%) - rename tests/{test-v2v-i-ova-as-root.ovf => test-i-ova-as-root.ovf} (100%) - rename tests/{test-v2v-i-ova-as-root.sh => test-i-ova-as-root.sh} (96%) - rename tests/{test-v2v-i-ova-bad-sha1.sh => test-i-ova-bad-sha1.sh} (95%) - rename tests/{test-v2v-i-ova-bad-sha256.sh => test-i-ova-bad-sha256.sh} (95%) - rename tests/{test-v2v-i-ova-checksums.ovf => test-i-ova-checksums.ovf} (100%) - rename tests/{test-v2v-i-ova-directory.sh => test-i-ova-directory.sh} (96%) - rename tests/{test-v2v-i-ova-formats.expected => test-i-ova-formats.expected} (100%) - rename tests/{test-v2v-i-ova-formats.ovf => test-i-ova-formats.ovf} (100%) - rename tests/{test-v2v-i-ova-formats.sh => test-i-ova-formats.sh} (83%) - rename tests/{test-v2v-i-ova-good-checksums.sh => test-i-ova-good-checksums.sh} (95%) - rename tests/{test-v2v-i-ova-gz.expected => test-i-ova-gz.expected} (100%) - rename tests/{test-v2v-i-ova-gz.ovf => test-i-ova-gz.ovf} (100%) - rename tests/{test-v2v-i-ova-gz.sh => test-i-ova-gz.sh} (88%) - rename tests/{test-v2v-i-ova-invalid-manifest1.sh => test-i-ova-invalid-manifest1.sh} (95%) - rename tests/{test-v2v-i-ova-invalid-manifest2.sh => test-i-ova-invalid-manifest2.sh} (95%) - rename tests/{test-v2v-i-ova-snapshots.expected => test-i-ova-snapshots.expected} (100%) - rename tests/{test-v2v-i-ova-snapshots.expected2 => test-i-ova-snapshots.expected2} (100%) - rename tests/{test-v2v-i-ova-snapshots.ovf => test-i-ova-snapshots.ovf} (100%) - rename tests/{test-v2v-i-ova-snapshots.sh => test-i-ova-snapshots.sh} (89%) - rename tests/{test-v2v-i-ova-subfolders.expected => test-i-ova-subfolders.expected} (100%) - rename tests/{test-v2v-i-ova-subfolders.expected2 => test-i-ova-subfolders.expected2} (100%) - rename tests/{test-v2v-i-ova-subfolders.ovf => test-i-ova-subfolders.ovf} (100%) - rename tests/{test-v2v-i-ova-subfolders.sh => test-i-ova-subfolders.sh} (88%) - rename tests/{test-v2v-i-ova-tar.expected => test-i-ova-tar.expected} (100%) - rename tests/{test-v2v-i-ova-tar.expected2 => test-i-ova-tar.expected2} (100%) - rename tests/{test-v2v-i-ova-tar.ovf => test-i-ova-tar.ovf} (100%) - rename tests/{test-v2v-i-ova-tar.sh => test-i-ova-tar.sh} (88%) - rename tests/{test-v2v-i-ova-two-disks.expected => test-i-ova-two-disks.expected} (100%) - rename tests/{test-v2v-i-ova-two-disks.expected2 => test-i-ova-two-disks.expected2} (100%) - rename tests/{test-v2v-i-ova-two-disks.ovf => test-i-ova-two-disks.ovf} (100%) - rename tests/{test-v2v-i-ova-two-disks.sh => test-i-ova-two-disks.sh} (87%) - rename tests/{test-v2v-i-ova.ovf => test-i-ova.ovf} (100%) - rename tests/{test-v2v-i-ova.sh => test-i-ova.sh} (95%) - rename tests/{test-v2v-i-ova.xml => test-i-ova.xml} (100%) - rename tests/{test-v2v-i-vmx-1.expected => test-i-vmx-1.expected} (100%) - rename tests/{test-v2v-i-vmx-1.vmx => test-i-vmx-1.vmx} (100%) - rename tests/{test-v2v-i-vmx-2.expected => test-i-vmx-2.expected} (100%) - rename tests/{test-v2v-i-vmx-2.vmx => test-i-vmx-2.vmx} (100%) - rename tests/{test-v2v-i-vmx-3.expected => test-i-vmx-3.expected} (100%) - rename tests/{test-v2v-i-vmx-3.vmx => test-i-vmx-3.vmx} (100%) - rename tests/{test-v2v-i-vmx-4.expected => test-i-vmx-4.expected} (100%) - rename tests/{test-v2v-i-vmx-4.vmx => test-i-vmx-4.vmx} (100%) - rename tests/{test-v2v-i-vmx-5.expected => test-i-vmx-5.expected} (100%) - rename tests/{test-v2v-i-vmx-5.vmx => test-i-vmx-5.vmx} (100%) - rename tests/{test-v2v-i-vmx-6.expected => test-i-vmx-6.expected} (100%) - rename tests/{test-v2v-i-vmx-6.vmx => test-i-vmx-6.vmx} (100%) - rename tests/{test-v2v-i-vmx-7.expected => test-i-vmx-7.expected} (100%) - rename tests/{test-v2v-i-vmx-7.vmx => test-i-vmx-7.vmx} (100%) - rename tests/{test-v2v-i-vmx.sh => test-i-vmx.sh} (83%) - rename tests/{test-v2v-in-place.sh => test-in-place.sh} (99%) - rename tests/{test-v2v-inspector.sh => test-inspector.sh} (98%) - rename tests/{test-v2v-it-vddk-io-query.sh => test-it-vddk-io-query.sh} (97%) - rename tests/{test-v2v-mac-expected.xml => test-mac-expected.xml} (100%) - rename tests/{test-v2v-mac.sh => test-mac.sh} (93%) - rename tests/{test-v2v-mac.xml.in => test-mac.xml.in} (100%) - rename tests/{test-v2v-machine-readable.sh => test-machine-readable.sh} (81%) - rename tests/{test-v2v-networks-and-bridges-expected.xml => test-networks-and-bridges-expected.xml} (100%) - rename tests/{test-v2v-networks-and-bridges.sh => test-networks-and-bridges.sh} (90%) - rename tests/{test-v2v-networks-and-bridges.xml.in => test-networks-and-bridges.xml.in} (100%) - rename tests/{test-v2v-o-glance.sh => test-o-glance.sh} (100%) - rename tests/{test-v2v-o-kubevirt-fedora.sh => test-o-kubevirt-fedora.sh} (94%) - rename tests/{test-v2v-o-kubevirt-fedora.yaml.expected => test-o-kubevirt-fedora.yaml.expected} (100%) - rename tests/{test-v2v-o-kubevirt-windows.sh => test-o-kubevirt-windows.sh} (94%) - rename tests/{test-v2v-o-kubevirt-windows.yaml.expected => test-o-kubevirt-windows.yaml.expected} (100%) - rename tests/{test-v2v-o-libvirt.sh => test-o-libvirt.sh} (98%) - rename tests/{test-v2v-o-local-qcow2-compressed.sh => test-o-local-qcow2-compressed.sh} (97%) - rename tests/{test-v2v-o-null.sh => test-o-null.sh} (100%) - rename tests/{test-v2v-o-openstack.sh => test-o-openstack.sh} (97%) - rename tests/{test-v2v-o-qemu.sh => test-o-qemu.sh} (98%) - rename tests/{test-v2v-oa-option-qcow2.sh => test-oa-option-qcow2.sh} (98%) - rename tests/{test-v2v-oa-option-raw.sh => test-oa-option-raw.sh} (98%) - rename tests/{test-v2v-of-option.sh => test-of-option.sh} (98%) - rename tests/{test-v2v-on-option.sh => test-on-option.sh} (98%) - rename tests/{test-v2v-print-source.expected => test-print-source.expected} (100%) - rename tests/{test-v2v-print-source.sh => test-print-source.sh} (90%) - rename tests/{test-v2v-print-source.xml.in => test-print-source.xml.in} (100%) - rename tests/{test-v2v-sound.sh => test-sound.sh} (94%) - rename tests/{test-v2v-sound.xml.in => test-sound.xml.in} (100%) - rename tests/{test-v2v-trim.sh => test-trim.sh} (99%) - rename tests/{test-v2v-virtio-win-iso.sh => test-virtio-win-iso.sh} (99%) - rename tests/{test-v2v-windows-conversion.sh => test-windows-conversion.sh} (98%) - -diff --git a/.gitignore b/.gitignore -index 9d2f1d07..b8abc3f8 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -122,13 +122,13 @@ Makefile.in - /tests/functions.sh - /tests/libvirt-is-version - /tests/rhbz1232192.xml --/tests/test-v2v-cdrom.xml --/tests/test-v2v-conversion-of-*.sh --/tests/test-v2v-floppy.xml --/tests/test-v2v-mac.xml --/tests/test-v2v-networks-and-bridges.xml --/tests/test-v2v-print-source.xml --/tests/test-v2v-sound.xml -+/tests/test-cdrom.xml -+/tests/test-conversion-of-*.sh -+/tests/test-floppy.xml -+/tests/test-mac.xml -+/tests/test-networks-and-bridges.xml -+/tests/test-print-source.xml -+/tests/test-sound.xml - /tests/windows.vmdk - /v2v/.depend - /v2v/oUnit-virt-v2v.cache -diff --git a/configure.ac b/configure.ac -index 8d6a506b..300b421e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -164,12 +164,12 @@ AC_CONFIG_FILES([Makefile - tests/functions.sh - tests/Makefile - tests/rhbz1232192.xml -- tests/test-v2v-cdrom.xml -- tests/test-v2v-floppy.xml -- tests/test-v2v-mac.xml -- tests/test-v2v-networks-and-bridges.xml -- tests/test-v2v-print-source.xml -- tests/test-v2v-sound.xml -+ tests/test-cdrom.xml -+ tests/test-floppy.xml -+ tests/test-mac.xml -+ tests/test-networks-and-bridges.xml -+ tests/test-print-source.xml -+ tests/test-sound.xml - v2v/Makefile]) - - AC_OUTPUT -diff --git a/docs/Makefile.am b/docs/Makefile.am -index 4c341f8b..ae85c344 100644 ---- a/docs/Makefile.am -+++ b/docs/Makefile.am -@@ -18,7 +18,7 @@ - include $(top_srcdir)/subdir-rules.mk - - EXTRA_DIST = \ -- test-v2v-docs.sh \ -+ test-docs.sh \ - virt-v2v.pod \ - virt-v2v-hacking.pod \ - virt-v2v-in-place.pod \ -@@ -214,4 +214,4 @@ stamp-virt-v2v-support.pod: virt-v2v-support.pod - touch $@ - - TESTS_ENVIRONMENT = $(top_builddir)/run --test --TESTS = test-v2v-docs.sh -+TESTS = test-docs.sh -diff --git a/docs/test-v2v-docs.sh b/docs/test-docs.sh -similarity index 100% -rename from docs/test-v2v-docs.sh -rename to docs/test-docs.sh -diff --git a/output/Makefile.am b/output/Makefile.am -index e71891eb..08e618c4 100644 ---- a/output/Makefile.am -+++ b/output/Makefile.am -@@ -25,7 +25,7 @@ EXTRA_DIST = \ - $(SOURCES_C) \ - $(BUILT_SOURCES) \ - embed.sh \ -- test-v2v-python-syntax.sh -+ test-python-syntax.sh - - SOURCES_MLI = \ - changeuid.mli \ -@@ -149,7 +149,7 @@ $(MLOUTPUT_CMA): $(OBJECTS) libmloutput.a - - # Unit tests. - TESTS_ENVIRONMENT = $(top_builddir)/run --test --TESTS = test-v2v-python-syntax.sh -+TESTS = test-python-syntax.sh - - # Dependencies. - .depend: \ -diff --git a/output/test-v2v-python-syntax.sh b/output/test-python-syntax.sh -similarity index 100% -rename from output/test-v2v-python-syntax.sh -rename to output/test-python-syntax.sh -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 0035262e..c466b59a 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -56,51 +56,53 @@ libvirt_is_version_CFLAGS = \ - TESTS_ENVIRONMENT = $(top_builddir)/run --test - - TESTS = \ -- test-v2v-i-ova-bad-sha1.sh \ -- test-v2v-i-ova-bad-sha256.sh \ -- test-v2v-i-ova-directory.sh \ -- test-v2v-i-ova-formats.sh \ -- test-v2v-i-ova-good-checksums.sh \ -- test-v2v-i-ova-gz.sh \ -- test-v2v-i-ova-invalid-manifest1.sh \ -- test-v2v-i-ova-invalid-manifest2.sh \ -- test-v2v-i-ova-snapshots.sh \ -- test-v2v-i-ova-subfolders.sh \ -- test-v2v-i-ova-tar.sh \ -- test-v2v-i-ova-two-disks.sh \ -- test-v2v-i-vmx.sh \ -- test-v2v-it-vddk-io-query.sh \ -- test-v2v-bad-networks-and-bridges.sh \ -- test-v2v-cdrom.sh \ -- test-v2v-floppy.sh \ -- test-v2v-i-disk.sh \ -- test-v2v-i-disk-parallel.sh \ -- test-v2v-i-ova.sh \ -- test-v2v-inspector.sh \ -- test-v2v-mac.sh \ -- test-v2v-machine-readable.sh \ -- test-v2v-networks-and-bridges.sh \ -- test-v2v-o-glance.sh \ -- test-v2v-o-kubevirt-fedora.sh \ -- test-v2v-o-kubevirt-windows.sh \ -- test-v2v-o-libvirt.sh \ -- test-v2v-o-local-qcow2-compressed.sh \ -- test-v2v-o-null.sh \ -- test-v2v-o-openstack.sh \ -- test-v2v-o-qemu.sh \ -- test-v2v-oa-option-qcow2.sh \ -- test-v2v-oa-option-raw.sh \ -- test-v2v-of-option.sh \ -- test-v2v-on-option.sh \ -- test-v2v-print-source.sh \ -- test-v2v-sound.sh \ -- test-v2v-virtio-win-iso.sh \ -- test-v2v-fedora-conversion.sh \ -- test-v2v-fedora-luks-on-lvm-conversion.sh \ -- test-v2v-fedora-lvm-on-luks-conversion.sh \ -- test-v2v-fedora-md-conversion.sh \ -- test-v2v-windows-conversion.sh \ -- test-v2v-customize.sh \ -+ test-i-ova-bad-sha1.sh \ -+ test-i-ova-bad-sha256.sh \ -+ test-i-ova-directory.sh \ -+ test-i-ova-formats.sh \ -+ test-i-ova-good-checksums.sh \ -+ test-i-ova-gz.sh \ -+ test-i-ova-invalid-manifest1.sh \ -+ test-i-ova-invalid-manifest2.sh \ -+ test-i-ova-snapshots.sh \ -+ test-i-ova-subfolders.sh \ -+ test-i-ova-tar.sh \ -+ test-i-ova-two-disks.sh \ -+ test-i-vmx.sh \ -+ test-it-vddk-io-query.sh \ -+ test-bad-networks-and-bridges.sh \ -+ test-cdrom.sh \ -+ test-floppy.sh \ -+ test-i-disk.sh \ -+ test-i-disk-parallel.sh \ -+ test-i-ova.sh \ -+ test-in-place.sh \ -+ test-inspector.sh \ -+ test-mac.sh \ -+ test-machine-readable.sh \ -+ test-networks-and-bridges.sh \ -+ test-o-glance.sh \ -+ test-o-kubevirt-fedora.sh \ -+ test-o-kubevirt-windows.sh \ -+ test-o-libvirt.sh \ -+ test-o-local-qcow2-compressed.sh \ -+ test-o-null.sh \ -+ test-o-openstack.sh \ -+ test-o-qemu.sh \ -+ test-oa-option-qcow2.sh \ -+ test-oa-option-raw.sh \ -+ test-of-option.sh \ -+ test-on-option.sh \ -+ test-print-source.sh \ -+ test-sound.sh \ -+ test-virtio-win-iso.sh \ -+ test-fedora-conversion.sh \ -+ test-fedora-btrfs-conversion.sh \ -+ test-fedora-luks-on-lvm-conversion.sh \ -+ test-fedora-lvm-on-luks-conversion.sh \ -+ test-fedora-md-conversion.sh \ -+ test-windows-conversion.sh \ -+ test-customize.sh \ - rhbz1232192.sh \ - $(SLOW_TESTS) \ - $(ROOT_TESTS) -@@ -124,45 +126,45 @@ check-valgrind: - - SLOW_TESTS = \ - $(real_guests_scripts) \ -- test-v2v-trim.sh -+ test-trim.sh - - check-slow: - $(MAKE) check TESTS="$(SLOW_TESTS)" SLOW=1 - - ROOT_TESTS = \ -- test-v2v-i-ova-as-root.sh -+ test-i-ova-as-root.sh - - check-root: - $(MAKE) check TESTS="$(ROOT_TESTS)" - --# A selection of real guests that test-v2v-conversion-of.sh will -+# A selection of real guests that test-conversion-of.sh will - # try to convert. This is only used by 'make check-slow'. - - real_guests_scripts = \ -- test-v2v-conversion-of-centos-7.0.sh \ -- test-v2v-conversion-of-debian-6.sh \ -- test-v2v-conversion-of-debian-7.sh \ -- test-v2v-conversion-of-debian-8.sh \ -- test-v2v-conversion-of-debian-9.sh \ -- test-v2v-conversion-of-fedora-37.sh \ -- test-v2v-conversion-of-opensuse-13.1.sh \ -- test-v2v-conversion-of-opensuse-13.2.sh \ -- test-v2v-conversion-of-opensuse-42.1.sh \ -- test-v2v-conversion-of-rhel-5.11.sh \ -- test-v2v-conversion-of-rhel-6.10.sh \ -- test-v2v-conversion-of-rhel-7.9.sh \ -- test-v2v-conversion-of-rhel-8.7.sh \ -- test-v2v-conversion-of-ubuntu-16.04.sh \ -- test-v2v-conversion-of-ubuntu-18.04.sh \ -- test-v2v-conversion-of-ubuntu-20.04.sh \ -- test-v2v-conversion-of-windows-6.2-server.sh \ -- test-v2v-conversion-of-windows-6.3-server.sh \ -- test-v2v-conversion-of-windows-10.0-server.sh -+ test-conversion-of-centos-7.0.sh \ -+ test-conversion-of-debian-6.sh \ -+ test-conversion-of-debian-7.sh \ -+ test-conversion-of-debian-8.sh \ -+ test-conversion-of-debian-9.sh \ -+ test-conversion-of-fedora-37.sh \ -+ test-conversion-of-opensuse-13.1.sh \ -+ test-conversion-of-opensuse-13.2.sh \ -+ test-conversion-of-opensuse-42.1.sh \ -+ test-conversion-of-rhel-5.11.sh \ -+ test-conversion-of-rhel-6.10.sh \ -+ test-conversion-of-rhel-7.9.sh \ -+ test-conversion-of-rhel-8.7.sh \ -+ test-conversion-of-ubuntu-16.04.sh \ -+ test-conversion-of-ubuntu-18.04.sh \ -+ test-conversion-of-ubuntu-20.04.sh \ -+ test-conversion-of-windows-6.2-server.sh \ -+ test-conversion-of-windows-6.3-server.sh \ -+ test-conversion-of-windows-10.0-server.sh - --test-v2v-conversion-of-%.sh: -+test-conversion-of-%.sh: - rm -f $@ $@-t -- f=`echo "$@" | $(SED) 's/test-v2v-conversion-of-\(.*\).sh/\1/'`; \ -- echo 'script=$@ exec $$srcdir/test-v2v-conversion-of.sh' "$$f" > $@-t -+ f=`echo "$@" | $(SED) 's/test-conversion-of-\(.*\).sh/\1/'`; \ -+ echo 'script=$@ exec $$srcdir/test-conversion-of.sh' "$$f" > $@-t - chmod 0755 $@-t - mv $@-t $@ - -@@ -174,96 +176,95 @@ CLEANFILES += \ - real-*.xml - - EXTRA_DIST += \ -- test-v2v-bad-networks-and-bridges.sh \ -- test-v2v-cdrom.expected \ -- test-v2v-cdrom.sh \ -- test-v2v-customize.sh \ -- test-v2v-fedora-conversion.sh \ -- test-v2v-fedora-btrfs-conversion.sh \ -- test-v2v-fedora-luks-on-lvm-conversion.sh \ -- test-v2v-fedora-lvm-on-luks-conversion.sh \ -- test-v2v-fedora-md-conversion.sh \ -- test-v2v-floppy.expected \ -- test-v2v-floppy.sh \ -- test-v2v-i-disk.sh \ -- test-v2v-i-disk-parallel.sh \ -- test-v2v-i-ova-as-root.ovf \ -- test-v2v-i-ova-as-root.sh \ -- test-v2v-i-ova-bad-sha1.sh \ -- test-v2v-i-ova-bad-sha256.sh \ -- test-v2v-i-ova-checksums.ovf \ -- test-v2v-i-ova-directory.sh \ -- test-v2v-i-ova-formats.expected \ -- test-v2v-i-ova-formats.ovf \ -- test-v2v-i-ova-formats.sh \ -- test-v2v-i-ova-good-checksums.sh \ -- test-v2v-i-ova-gz.expected \ -- test-v2v-i-ova-gz.ovf \ -- test-v2v-i-ova-gz.sh \ -- test-v2v-i-ova-invalid-manifest1.sh \ -- test-v2v-i-ova-invalid-manifest2.sh \ -- test-v2v-i-ova-snapshots.expected \ -- test-v2v-i-ova-snapshots.expected2 \ -- test-v2v-i-ova-snapshots.ovf \ -- test-v2v-i-ova-snapshots.sh \ -- test-v2v-i-ova-subfolders.expected \ -- test-v2v-i-ova-subfolders.expected2 \ -- test-v2v-i-ova-subfolders.ovf \ -- test-v2v-i-ova-subfolders.sh \ -- test-v2v-i-ova-tar.expected \ -- test-v2v-i-ova-tar.expected2 \ -- test-v2v-i-ova-tar.ovf \ -- test-v2v-i-ova-tar.sh \ -- test-v2v-i-ova-two-disks.expected \ -- test-v2v-i-ova-two-disks.expected2 \ -- test-v2v-i-ova-two-disks.ovf \ -- test-v2v-i-ova-two-disks.sh \ -- test-v2v-i-ova.ovf \ -- test-v2v-i-ova.sh \ -- test-v2v-i-ova.xml \ -- test-v2v-i-vmx.sh \ -- test-v2v-i-vmx-1.expected \ -- test-v2v-i-vmx-2.expected \ -- test-v2v-i-vmx-3.expected \ -- test-v2v-i-vmx-4.expected \ -- test-v2v-i-vmx-5.expected \ -- test-v2v-i-vmx-6.expected \ -- test-v2v-i-vmx-7.expected \ -- test-v2v-i-vmx-1.vmx \ -- test-v2v-i-vmx-2.vmx \ -- test-v2v-i-vmx-3.vmx \ -- test-v2v-i-vmx-4.vmx \ -- test-v2v-i-vmx-5.vmx \ -- test-v2v-i-vmx-6.vmx \ -- test-v2v-i-vmx-7.vmx \ -- test-v2v-in-place.sh \ -- test-v2v-block-driver.sh \ -- test-v2v-inspector.sh \ -- test-v2v-it-vddk-io-query.sh \ -- test-v2v-machine-readable.sh \ -- test-v2v-mac-expected.xml \ -- test-v2v-mac.sh \ -- test-v2v-networks-and-bridges.sh \ -- test-v2v-networks-and-bridges-expected.xml \ -- test-v2v-o-glance.sh \ -- test-v2v-o-kubevirt-fedora.sh \ -- test-v2v-o-kubevirt-windows.sh \ -- test-v2v-o-kubevirt-fedora.yaml.expected \ -- test-v2v-o-kubevirt-windows.yaml.expected \ -- test-v2v-o-libvirt.sh \ -- test-v2v-o-local-qcow2-compressed.sh \ -- test-v2v-o-null.sh \ -- test-v2v-o-openstack.sh \ -- test-v2v-o-qemu.sh \ -- test-v2v-oa-option-qcow2.sh \ -- test-v2v-oa-option-raw.sh \ -- test-v2v-of-option.sh \ -- test-v2v-on-option.sh \ -- test-v2v-print-source.expected \ -- test-v2v-print-source.sh \ -- test-v2v-conversion-of.sh \ -- test-v2v-sound.sh \ -- test-v2v-trim.sh \ -- test-v2v-virtio-win-iso.sh \ -- test-v2v-windows-conversion.sh \ -+ test-bad-networks-and-bridges.sh \ -+ test-cdrom.expected \ -+ test-cdrom.sh \ -+ test-customize.sh \ -+ test-fedora-conversion.sh \ -+ test-fedora-btrfs-conversion.sh \ -+ test-fedora-luks-on-lvm-conversion.sh \ -+ test-fedora-lvm-on-luks-conversion.sh \ -+ test-fedora-md-conversion.sh \ -+ test-floppy.expected \ -+ test-floppy.sh \ -+ test-i-disk.sh \ -+ test-i-disk-parallel.sh \ -+ test-i-ova-as-root.ovf \ -+ test-i-ova-as-root.sh \ -+ test-i-ova-bad-sha1.sh \ -+ test-i-ova-bad-sha256.sh \ -+ test-i-ova-checksums.ovf \ -+ test-i-ova-directory.sh \ -+ test-i-ova-formats.expected \ -+ test-i-ova-formats.ovf \ -+ test-i-ova-formats.sh \ -+ test-i-ova-good-checksums.sh \ -+ test-i-ova-gz.expected \ -+ test-i-ova-gz.ovf \ -+ test-i-ova-gz.sh \ -+ test-i-ova-invalid-manifest1.sh \ -+ test-i-ova-invalid-manifest2.sh \ -+ test-i-ova-snapshots.expected \ -+ test-i-ova-snapshots.expected2 \ -+ test-i-ova-snapshots.ovf \ -+ test-i-ova-snapshots.sh \ -+ test-i-ova-subfolders.expected \ -+ test-i-ova-subfolders.expected2 \ -+ test-i-ova-subfolders.ovf \ -+ test-i-ova-subfolders.sh \ -+ test-i-ova-tar.expected \ -+ test-i-ova-tar.expected2 \ -+ test-i-ova-tar.ovf \ -+ test-i-ova-tar.sh \ -+ test-i-ova-two-disks.expected \ -+ test-i-ova-two-disks.expected2 \ -+ test-i-ova-two-disks.ovf \ -+ test-i-ova-two-disks.sh \ -+ test-i-ova.ovf \ -+ test-i-ova.sh \ -+ test-i-ova.xml \ -+ test-i-vmx.sh \ -+ test-i-vmx-1.expected \ -+ test-i-vmx-2.expected \ -+ test-i-vmx-3.expected \ -+ test-i-vmx-4.expected \ -+ test-i-vmx-5.expected \ -+ test-i-vmx-6.expected \ -+ test-i-vmx-7.expected \ -+ test-i-vmx-1.vmx \ -+ test-i-vmx-2.vmx \ -+ test-i-vmx-3.vmx \ -+ test-i-vmx-4.vmx \ -+ test-i-vmx-5.vmx \ -+ test-i-vmx-6.vmx \ -+ test-i-vmx-7.vmx \ -+ test-in-place.sh \ -+ test-inspector.sh \ -+ test-it-vddk-io-query.sh \ -+ test-machine-readable.sh \ -+ test-mac-expected.xml \ -+ test-mac.sh \ -+ test-networks-and-bridges.sh \ -+ test-networks-and-bridges-expected.xml \ -+ test-o-glance.sh \ -+ test-o-kubevirt-fedora.sh \ -+ test-o-kubevirt-windows.sh \ -+ test-o-kubevirt-fedora.yaml.expected \ -+ test-o-kubevirt-windows.yaml.expected \ -+ test-o-libvirt.sh \ -+ test-o-local-qcow2-compressed.sh \ -+ test-o-null.sh \ -+ test-o-openstack.sh \ -+ test-o-qemu.sh \ -+ test-oa-option-qcow2.sh \ -+ test-oa-option-raw.sh \ -+ test-of-option.sh \ -+ test-on-option.sh \ -+ test-print-source.expected \ -+ test-print-source.sh \ -+ test-conversion-of.sh \ -+ test-sound.sh \ -+ test-trim.sh \ -+ test-virtio-win-iso.sh \ -+ test-windows-conversion.sh \ - rhbz1232192.sh -diff --git a/tests/test-v2v-bad-networks-and-bridges.sh b/tests/test-bad-networks-and-bridges.sh -similarity index 97% -rename from tests/test-v2v-bad-networks-and-bridges.sh -rename to tests/test-bad-networks-and-bridges.sh -index f6bcfc8c..7dadead1 100755 ---- a/tests/test-v2v-bad-networks-and-bridges.sh -+++ b/tests/test-bad-networks-and-bridges.sh -@@ -29,7 +29,7 @@ skip_if_skipped - - # We expect all of these to print an error. NB: LANG=C is set. - --file=test-v2v-bad-networks-and-bridges.img -+file=test-bad-networks-and-bridges.img - touch $file - - cmd="virt-v2v -i disk -o null $file" -diff --git a/tests/test-v2v-block-driver.sh b/tests/test-block-driver.sh -similarity index 99% -rename from tests/test-v2v-block-driver.sh -rename to tests/test-block-driver.sh -index a0e56bed..ec9b8ea3 100755 ---- a/tests/test-v2v-block-driver.sh -+++ b/tests/test-block-driver.sh -@@ -31,7 +31,7 @@ requires test -f $img_base - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" - --d=$PWD/test-v2v-block-driver.d -+d=$PWD/test-block-driver.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -diff --git a/tests/test-v2v-cdrom.expected b/tests/test-cdrom.expected -similarity index 100% -rename from tests/test-v2v-cdrom.expected -rename to tests/test-cdrom.expected -diff --git a/tests/test-v2v-cdrom.sh b/tests/test-cdrom.sh -similarity index 92% -rename from tests/test-v2v-cdrom.sh -rename to tests/test-cdrom.sh -index d512e038..8f04b00c 100755 ---- a/tests/test-v2v-cdrom.sh -+++ b/tests/test-cdrom.sh -@@ -29,11 +29,11 @@ skip_if_skipped - requires test -f ../test-data/phony-guests/windows.img - requires test -f ../test-data/phony-guests/blank-disk.img - --libvirt_uri="test://$abs_builddir/test-v2v-cdrom.xml" -+libvirt_uri="test://$abs_builddir/test-cdrom.xml" - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" - --d=test-v2v-cdrom.d -+d=test-cdrom.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -@@ -51,7 +51,7 @@ awk '//{p=0;print;next} ;p' \ - $d/windows.xml | - grep -v ' $d/disks - --if ! diff -u "$srcdir/test-v2v-cdrom.expected" $d/disks; then -+if ! diff -u "$srcdir/test-cdrom.expected" $d/disks; then - echo "$0: unexpected disk assignments" - cat $d/disks - exit 1 -diff --git a/tests/test-v2v-cdrom.xml.in b/tests/test-cdrom.xml.in -similarity index 100% -rename from tests/test-v2v-cdrom.xml.in -rename to tests/test-cdrom.xml.in -diff --git a/tests/test-v2v-conversion-of.sh b/tests/test-conversion-of.sh -similarity index 100% -rename from tests/test-v2v-conversion-of.sh -rename to tests/test-conversion-of.sh -diff --git a/tests/test-v2v-customize.sh b/tests/test-customize.sh -similarity index 98% -rename from tests/test-v2v-customize.sh -rename to tests/test-customize.sh -index 89ab5b42..51584141 100755 ---- a/tests/test-v2v-customize.sh -+++ b/tests/test-customize.sh -@@ -28,7 +28,7 @@ skip_if_skipped - fedora=../test-data/phony-guests/fedora.img - requires test -f $fedora - --d=test-v2v-customize.d -+d=test-customize.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -diff --git a/tests/test-v2v-fedora-btrfs-conversion.sh b/tests/test-fedora-btrfs-conversion.sh -similarity index 100% -rename from tests/test-v2v-fedora-btrfs-conversion.sh -rename to tests/test-fedora-btrfs-conversion.sh -diff --git a/tests/test-v2v-fedora-conversion.sh b/tests/test-fedora-conversion.sh -similarity index 100% -rename from tests/test-v2v-fedora-conversion.sh -rename to tests/test-fedora-conversion.sh -diff --git a/tests/test-v2v-fedora-luks-on-lvm-conversion.sh b/tests/test-fedora-luks-on-lvm-conversion.sh -similarity index 100% -rename from tests/test-v2v-fedora-luks-on-lvm-conversion.sh -rename to tests/test-fedora-luks-on-lvm-conversion.sh -diff --git a/tests/test-v2v-fedora-lvm-on-luks-conversion.sh b/tests/test-fedora-lvm-on-luks-conversion.sh -similarity index 100% -rename from tests/test-v2v-fedora-lvm-on-luks-conversion.sh -rename to tests/test-fedora-lvm-on-luks-conversion.sh -diff --git a/tests/test-v2v-fedora-md-conversion.sh b/tests/test-fedora-md-conversion.sh -similarity index 100% -rename from tests/test-v2v-fedora-md-conversion.sh -rename to tests/test-fedora-md-conversion.sh -diff --git a/tests/test-v2v-floppy.expected b/tests/test-floppy.expected -similarity index 100% -rename from tests/test-v2v-floppy.expected -rename to tests/test-floppy.expected -diff --git a/tests/test-v2v-floppy.sh b/tests/test-floppy.sh -similarity index 92% -rename from tests/test-v2v-floppy.sh -rename to tests/test-floppy.sh -index 6f9e297d..96b60836 100755 ---- a/tests/test-v2v-floppy.sh -+++ b/tests/test-floppy.sh -@@ -29,12 +29,12 @@ skip_if_skipped - requires test -f ../test-data/phony-guests/windows.img - requires test -f ../test-data/phony-guests/blank-disk.img - --libvirt_uri="test://$abs_builddir/test-v2v-floppy.xml" -+libvirt_uri="test://$abs_builddir/test-floppy.xml" - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" - --d=test-v2v-floppy.d -+d=test-floppy.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -@@ -52,7 +52,7 @@ awk '//{p=0;print;next} ;p' \ - $d/windows.xml | - grep -v ' $d/disks - --if ! diff -u "$srcdir/test-v2v-floppy.expected" $d/disks; then -+if ! diff -u "$srcdir/test-floppy.expected" $d/disks; then - echo "$0: unexpected disk assignments" - cat $d/disks - exit 1 -diff --git a/tests/test-v2v-floppy.xml.in b/tests/test-floppy.xml.in -similarity index 100% -rename from tests/test-v2v-floppy.xml.in -rename to tests/test-floppy.xml.in -diff --git a/tests/test-v2v-i-disk-parallel.sh b/tests/test-i-disk-parallel.sh -similarity index 98% -rename from tests/test-v2v-i-disk-parallel.sh -rename to tests/test-i-disk-parallel.sh -index a6470fdd..9779722c 100755 ---- a/tests/test-v2v-i-disk-parallel.sh -+++ b/tests/test-i-disk-parallel.sh -@@ -30,7 +30,7 @@ requires test -f $windows - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-disk-parallel.d -+d=test-i-disk-parallel.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -diff --git a/tests/test-v2v-i-disk.sh b/tests/test-i-disk.sh -similarity index 98% -rename from tests/test-v2v-i-disk.sh -rename to tests/test-i-disk.sh -index c96b0535..21593977 100755 ---- a/tests/test-v2v-i-disk.sh -+++ b/tests/test-i-disk.sh -@@ -29,7 +29,7 @@ requires test -f ../test-data/phony-guests/windows.img - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-disk.d -+d=test-i-disk.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -diff --git a/tests/test-v2v-i-ova-as-root.ovf b/tests/test-i-ova-as-root.ovf -similarity index 100% -rename from tests/test-v2v-i-ova-as-root.ovf -rename to tests/test-i-ova-as-root.ovf -diff --git a/tests/test-v2v-i-ova-as-root.sh b/tests/test-i-ova-as-root.sh -similarity index 96% -rename from tests/test-v2v-i-ova-as-root.sh -rename to tests/test-i-ova-as-root.sh -index 81a90ccd..4f35fc25 100755 ---- a/tests/test-v2v-i-ova-as-root.sh -+++ b/tests/test-i-ova-as-root.sh -@@ -43,7 +43,7 @@ fi - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-ova-as-root.d -+d=test-i-ova-as-root.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -@@ -51,7 +51,7 @@ mkdir $d - pushd $d - - # Create the test OVA. --cp "$abs_srcdir/test-v2v-i-ova-as-root.ovf" test.ovf -+cp "$abs_srcdir/test-i-ova-as-root.ovf" test.ovf - cp ../windows.vmdk disk.vmdk - - echo "SHA1(test.ovf)=" `do_sha1 test.ovf` > test.mf -diff --git a/tests/test-v2v-i-ova-bad-sha1.sh b/tests/test-i-ova-bad-sha1.sh -similarity index 95% -rename from tests/test-v2v-i-ova-bad-sha1.sh -rename to tests/test-i-ova-bad-sha1.sh -index cbe1db7a..614142c3 100755 ---- a/tests/test-v2v-i-ova-bad-sha1.sh -+++ b/tests/test-i-ova-bad-sha1.sh -@@ -34,7 +34,7 @@ fi - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-ova-bad-sha1.d -+d=test-i-ova-bad-sha1.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -@@ -42,7 +42,7 @@ mkdir $d - pushd $d - - # Create the test OVA. --cp "$abs_srcdir/test-v2v-i-ova-checksums.ovf" test.ovf -+cp "$abs_srcdir/test-i-ova-checksums.ovf" test.ovf - cp ../windows.vmdk disk.vmdk - echo "SHA1(test.ovf)=" `do_sha1 test.ovf` > test.mf - sha1=`do_sha1 disk.vmdk | tr '0-5a-f6789' 'a-f0-58967'` -diff --git a/tests/test-v2v-i-ova-bad-sha256.sh b/tests/test-i-ova-bad-sha256.sh -similarity index 95% -rename from tests/test-v2v-i-ova-bad-sha256.sh -rename to tests/test-i-ova-bad-sha256.sh -index 234ab58c..c68aa100 100755 ---- a/tests/test-v2v-i-ova-bad-sha256.sh -+++ b/tests/test-i-ova-bad-sha256.sh -@@ -34,7 +34,7 @@ fi - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-ova-bad-sha256.d -+d=test-i-ova-bad-sha256.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -@@ -42,7 +42,7 @@ mkdir $d - pushd $d - - # Create the test OVA. --cp "$abs_srcdir/test-v2v-i-ova-checksums.ovf" test.ovf -+cp "$abs_srcdir/test-i-ova-checksums.ovf" test.ovf - cp ../windows.vmdk disk.vmdk - echo "SHA256(test.ovf)=" `do_sha256 test.ovf` > test.mf - sha256=`do_sha256 disk.vmdk | tr '0-5a-f6789' 'a-f0-58967'` -diff --git a/tests/test-v2v-i-ova-checksums.ovf b/tests/test-i-ova-checksums.ovf -similarity index 100% -rename from tests/test-v2v-i-ova-checksums.ovf -rename to tests/test-i-ova-checksums.ovf -diff --git a/tests/test-v2v-i-ova-directory.sh b/tests/test-i-ova-directory.sh -similarity index 96% -rename from tests/test-v2v-i-ova-directory.sh -rename to tests/test-i-ova-directory.sh -index ec858464..4f7d39ef 100755 ---- a/tests/test-v2v-i-ova-directory.sh -+++ b/tests/test-i-ova-directory.sh -@@ -32,13 +32,13 @@ requires test -s $f - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" - --d=test-v2v-i-ova-directory.d -+d=test-i-ova-directory.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d - - vmdk=test-ova.vmdk --ovf=test-v2v-i-ova.ovf -+ovf=test-i-ova.ovf - mf=test-ova.mf - - qemu-img convert $f -O vmdk $d/$vmdk -diff --git a/tests/test-v2v-i-ova-formats.expected b/tests/test-i-ova-formats.expected -similarity index 100% -rename from tests/test-v2v-i-ova-formats.expected -rename to tests/test-i-ova-formats.expected -diff --git a/tests/test-v2v-i-ova-formats.ovf b/tests/test-i-ova-formats.ovf -similarity index 100% -rename from tests/test-v2v-i-ova-formats.ovf -rename to tests/test-i-ova-formats.ovf -diff --git a/tests/test-v2v-i-ova-formats.sh b/tests/test-i-ova-formats.sh -similarity index 83% -rename from tests/test-v2v-i-ova-formats.sh -rename to tests/test-i-ova-formats.sh -index 483ce1b9..9e5e1cb7 100755 ---- a/tests/test-v2v-i-ova-formats.sh -+++ b/tests/test-i-ova-formats.sh -@@ -32,7 +32,7 @@ formats="zip tar-gz tar-xz" - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-ova-formats.d -+d=test-i-ova-formats.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -@@ -44,19 +44,19 @@ pushd $d - guestfish disk-create disk1.vmdk raw 10K - sha=`do_sha1 disk1.vmdk` - echo -e "SHA1(disk1.vmdk)= $sha\r" > disk1.mf --cp "$abs_srcdir/test-v2v-i-ova-formats.ovf" . -+cp "$abs_srcdir/test-i-ova-formats.ovf" . - - for format in $formats; do - case "$format" in - zip) -- zip -r test test-v2v-i-ova-formats.ovf disk1.vmdk disk1.mf -+ zip -r test test-i-ova-formats.ovf disk1.vmdk disk1.mf - mv test.zip test-$format.ova - ;; - tar-gz) -- tar -czf test-$format.ova test-v2v-i-ova-formats.ovf disk1.vmdk disk1.mf -+ tar -czf test-$format.ova test-i-ova-formats.ovf disk1.vmdk disk1.mf - ;; - tar-xz) -- tar -cJf test-$format.ova test-v2v-i-ova-formats.ovf disk1.vmdk disk1.mf -+ tar -cJf test-$format.ova test-i-ova-formats.ovf disk1.vmdk disk1.mf - ;; - *) - echo "Unhandled format '$format'" -@@ -75,5 +75,5 @@ for format in $formats; do - sed 's,[^ \t]*\(disk.*.vmdk\),\1,' > $d/source - - # Check the parsed source is what we expect. -- diff -u "$srcdir/test-v2v-i-ova-formats.expected" $d/source -+ diff -u "$srcdir/test-i-ova-formats.expected" $d/source - done -diff --git a/tests/test-v2v-i-ova-good-checksums.sh b/tests/test-i-ova-good-checksums.sh -similarity index 95% -rename from tests/test-v2v-i-ova-good-checksums.sh -rename to tests/test-i-ova-good-checksums.sh -index 76c7097e..bb5a53f8 100755 ---- a/tests/test-v2v-i-ova-good-checksums.sh -+++ b/tests/test-i-ova-good-checksums.sh -@@ -34,7 +34,7 @@ fi - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-ova-good-checksums.d -+d=test-i-ova-good-checksums.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -@@ -42,7 +42,7 @@ mkdir $d - pushd $d - - # Create the test OVA. --cp "$abs_srcdir/test-v2v-i-ova-checksums.ovf" test.ovf -+cp "$abs_srcdir/test-i-ova-checksums.ovf" test.ovf - cp ../windows.vmdk disk.vmdk - - # Test all types of checksum supported by the OVA format. -diff --git a/tests/test-v2v-i-ova-gz.expected b/tests/test-i-ova-gz.expected -similarity index 100% -rename from tests/test-v2v-i-ova-gz.expected -rename to tests/test-i-ova-gz.expected -diff --git a/tests/test-v2v-i-ova-gz.ovf b/tests/test-i-ova-gz.ovf -similarity index 100% -rename from tests/test-v2v-i-ova-gz.ovf -rename to tests/test-i-ova-gz.ovf -diff --git a/tests/test-v2v-i-ova-gz.sh b/tests/test-i-ova-gz.sh -similarity index 88% -rename from tests/test-v2v-i-ova-gz.sh -rename to tests/test-i-ova-gz.sh -index ba90d331..702b2592 100755 ---- a/tests/test-v2v-i-ova-gz.sh -+++ b/tests/test-i-ova-gz.sh -@@ -30,7 +30,7 @@ skip_if_skipped - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-ova-gz.d -+d=test-i-ova-gz.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -@@ -41,9 +41,9 @@ guestfish disk-create disk1.vmdk raw 10K - gzip disk1.vmdk - sha=`do_sha1 disk1.vmdk.gz` - echo -e "SHA1(disk1.vmdk.gz)= $sha\r" > disk1.mf --cp "$abs_srcdir/test-v2v-i-ova-gz.ovf" . -+cp "$abs_srcdir/test-i-ova-gz.ovf" . - --tar -cf test.ova test-v2v-i-ova-gz.ovf disk1.vmdk.gz disk1.mf -+tar -cf test.ova test-i-ova-gz.ovf disk1.vmdk.gz disk1.mf - popd - - # Run virt-v2v but only as far as the --print-source stage, and -@@ -54,4 +54,4 @@ $VG virt-v2v --debug-gc --quiet \ - sed 's,[^ \t]*\(\.vmdk\),\1,' > $d/source - - # Check the parsed source is what we expect. --diff -u "$srcdir/test-v2v-i-ova-gz.expected" $d/source -+diff -u "$srcdir/test-i-ova-gz.expected" $d/source -diff --git a/tests/test-v2v-i-ova-invalid-manifest1.sh b/tests/test-i-ova-invalid-manifest1.sh -similarity index 95% -rename from tests/test-v2v-i-ova-invalid-manifest1.sh -rename to tests/test-i-ova-invalid-manifest1.sh -index 0b4b4151..4297bda0 100755 ---- a/tests/test-v2v-i-ova-invalid-manifest1.sh -+++ b/tests/test-i-ova-invalid-manifest1.sh -@@ -34,7 +34,7 @@ fi - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-ova-invalid-manifest1.d -+d=test-i-ova-invalid-manifest1.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -@@ -42,7 +42,7 @@ mkdir $d - pushd $d - - # Create the test OVA. --cp "$abs_srcdir/test-v2v-i-ova-checksums.ovf" test.ovf -+cp "$abs_srcdir/test-i-ova-checksums.ovf" test.ovf - cp ../windows.vmdk disk.vmdk - echo "SHA1(test.ovf)=" `do_sha1 test.ovf` > test.mf - echo "SHA1(disk.vmdk)=" `do_sha1 disk.vmdk` >> test.mf -diff --git a/tests/test-v2v-i-ova-invalid-manifest2.sh b/tests/test-i-ova-invalid-manifest2.sh -similarity index 95% -rename from tests/test-v2v-i-ova-invalid-manifest2.sh -rename to tests/test-i-ova-invalid-manifest2.sh -index 37cf8f63..0be2558e 100755 ---- a/tests/test-v2v-i-ova-invalid-manifest2.sh -+++ b/tests/test-i-ova-invalid-manifest2.sh -@@ -34,7 +34,7 @@ fi - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-ova-invalid-manifest2.d -+d=test-i-ova-invalid-manifest2.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -@@ -42,7 +42,7 @@ mkdir $d - pushd $d - - # Create the test OVA. --cp "$abs_srcdir/test-v2v-i-ova-checksums.ovf" test.ovf -+cp "$abs_srcdir/test-i-ova-checksums.ovf" test.ovf - cp ../windows.vmdk disk.vmdk - echo "SHA1(test.ovf)=" `do_sha1 test.ovf` > test.mf - echo "SHA1(disk.vmdk)=$(do_sha1 disk.vmdk)" >> test.mf -diff --git a/tests/test-v2v-i-ova-snapshots.expected b/tests/test-i-ova-snapshots.expected -similarity index 100% -rename from tests/test-v2v-i-ova-snapshots.expected -rename to tests/test-i-ova-snapshots.expected -diff --git a/tests/test-v2v-i-ova-snapshots.expected2 b/tests/test-i-ova-snapshots.expected2 -similarity index 100% -rename from tests/test-v2v-i-ova-snapshots.expected2 -rename to tests/test-i-ova-snapshots.expected2 -diff --git a/tests/test-v2v-i-ova-snapshots.ovf b/tests/test-i-ova-snapshots.ovf -similarity index 100% -rename from tests/test-v2v-i-ova-snapshots.ovf -rename to tests/test-i-ova-snapshots.ovf -diff --git a/tests/test-v2v-i-ova-snapshots.sh b/tests/test-i-ova-snapshots.sh -similarity index 89% -rename from tests/test-v2v-i-ova-snapshots.sh -rename to tests/test-i-ova-snapshots.sh -index fb1a35eb..fae5c1f3 100755 ---- a/tests/test-v2v-i-ova-snapshots.sh -+++ b/tests/test-i-ova-snapshots.sh -@@ -31,7 +31,7 @@ skip_if_skipped - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-ova-snapshots.d -+d=test-i-ova-snapshots.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -@@ -54,8 +54,8 @@ sha=`do_sha1 disk1.vmdk.000000001` - echo -e "SHA1(disk1.vmdk.000000001)= $sha\r" > disk1.mf - sha=`do_sha1 disk1.vmdk.000000002` - echo -e "SHA1(disk1.vmdk.000000002)= $sha\r" > disk1.mf --cp "$abs_srcdir/test-v2v-i-ova-snapshots.ovf" . --tar -cf test-snapshots.ova test-v2v-i-ova-snapshots.ovf disk1.vmdk.00000000? disk1.mf -+cp "$abs_srcdir/test-i-ova-snapshots.ovf" . -+tar -cf test-snapshots.ova test-i-ova-snapshots.ovf disk1.vmdk.00000000? disk1.mf - - popd - -@@ -71,9 +71,9 @@ if grep -sq json: $d/source ; then - # Exact offset will vary because of tar. - sed -i -e "s,\"[^\"]*/$d/,\"," \ - -e "s|\"offset\": [0-9]*,|\"offset\": x,|" $d/source -- diff -u "$srcdir/test-v2v-i-ova-snapshots.expected2" $d/source -+ diff -u "$srcdir/test-i-ova-snapshots.expected2" $d/source - else - # normalize the output - sed -i -e 's,[^ \t]*\(disk.*.vmdk\),\1,' $d/source -- diff -u "$srcdir/test-v2v-i-ova-snapshots.expected" $d/source -+ diff -u "$srcdir/test-i-ova-snapshots.expected" $d/source - fi -diff --git a/tests/test-v2v-i-ova-subfolders.expected b/tests/test-i-ova-subfolders.expected -similarity index 100% -rename from tests/test-v2v-i-ova-subfolders.expected -rename to tests/test-i-ova-subfolders.expected -diff --git a/tests/test-v2v-i-ova-subfolders.expected2 b/tests/test-i-ova-subfolders.expected2 -similarity index 100% -rename from tests/test-v2v-i-ova-subfolders.expected2 -rename to tests/test-i-ova-subfolders.expected2 -diff --git a/tests/test-v2v-i-ova-subfolders.ovf b/tests/test-i-ova-subfolders.ovf -similarity index 100% -rename from tests/test-v2v-i-ova-subfolders.ovf -rename to tests/test-i-ova-subfolders.ovf -diff --git a/tests/test-v2v-i-ova-subfolders.sh b/tests/test-i-ova-subfolders.sh -similarity index 88% -rename from tests/test-v2v-i-ova-subfolders.sh -rename to tests/test-i-ova-subfolders.sh -index a64c60b3..b204433c 100755 ---- a/tests/test-v2v-i-ova-subfolders.sh -+++ b/tests/test-i-ova-subfolders.sh -@@ -30,12 +30,12 @@ skip_if_skipped - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-ova-subfolders.d -+d=test-i-ova-subfolders.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir -p $d/subfolder - --cp "$srcdir/test-v2v-i-ova-subfolders.ovf" $d/subfolder/ -+cp "$srcdir/test-i-ova-subfolders.ovf" $d/subfolder/ - - pushd $d/subfolder - -@@ -60,9 +60,9 @@ if grep -sq json: $d/source ; then - # Exact offset will vary because of tar. - sed -i -e "s,\"[^\"]*/$d/,\"," \ - -e "s|\"offset\": [0-9]*,|\"offset\": x,|" $d/source -- diff -u "$srcdir/test-v2v-i-ova-subfolders.expected2" $d/source -+ diff -u "$srcdir/test-i-ova-subfolders.expected2" $d/source - else - # normalize the output - sed -i -e 's,[^ \t]*\(subfolder/disk.*\.vmdk\),\1,' $d/source -- diff -u "$srcdir/test-v2v-i-ova-subfolders.expected" $d/source -+ diff -u "$srcdir/test-i-ova-subfolders.expected" $d/source - fi -diff --git a/tests/test-v2v-i-ova-tar.expected b/tests/test-i-ova-tar.expected -similarity index 100% -rename from tests/test-v2v-i-ova-tar.expected -rename to tests/test-i-ova-tar.expected -diff --git a/tests/test-v2v-i-ova-tar.expected2 b/tests/test-i-ova-tar.expected2 -similarity index 100% -rename from tests/test-v2v-i-ova-tar.expected2 -rename to tests/test-i-ova-tar.expected2 -diff --git a/tests/test-v2v-i-ova-tar.ovf b/tests/test-i-ova-tar.ovf -similarity index 100% -rename from tests/test-v2v-i-ova-tar.ovf -rename to tests/test-i-ova-tar.ovf -diff --git a/tests/test-v2v-i-ova-tar.sh b/tests/test-i-ova-tar.sh -similarity index 88% -rename from tests/test-v2v-i-ova-tar.sh -rename to tests/test-i-ova-tar.sh -index a311e0e8..403541c4 100755 ---- a/tests/test-v2v-i-ova-tar.sh -+++ b/tests/test-i-ova-tar.sh -@@ -30,7 +30,7 @@ skip_if_skipped - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-i-ova-tar.d -+d=test-i-ova-tar.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -@@ -42,8 +42,8 @@ pushd $d - guestfish disk-create disk1.vmdk raw 10k - sha=`do_sha1 disk1.vmdk` - echo -e "SHA1(disk1.vmdk)= $sha\r" > disk1.mf --cp "$abs_srcdir/test-v2v-i-ova-tar.ovf" . --tar -cf test-tar.ova test-v2v-i-ova-tar.ovf disk1.vmdk disk1.mf -+cp "$abs_srcdir/test-i-ova-tar.ovf" . -+tar -cf test-tar.ova test-i-ova-tar.ovf disk1.vmdk disk1.mf - - popd - -@@ -59,9 +59,9 @@ if grep -sq json: $d/source ; then - # Exact offset will vary because of tar. - sed -i -e "s,\"[^\"]*/$d/,\"," \ - -e "s|\"offset\": [0-9]*,|\"offset\": x,|" $d/source -- diff -u "$srcdir/test-v2v-i-ova-tar.expected2" $d/source -+ diff -u "$srcdir/test-i-ova-tar.expected2" $d/source - else - # normalize the output - sed -i -e 's,[^ \t]*\(disk.*.vmdk\),\1,' $d/source -- diff -u "$srcdir/test-v2v-i-ova-tar.expected" $d/source -+ diff -u "$srcdir/test-i-ova-tar.expected" $d/source - fi -diff --git a/tests/test-v2v-i-ova-two-disks.expected b/tests/test-i-ova-two-disks.expected -similarity index 100% -rename from tests/test-v2v-i-ova-two-disks.expected -rename to tests/test-i-ova-two-disks.expected -diff --git a/tests/test-v2v-i-ova-two-disks.expected2 b/tests/test-i-ova-two-disks.expected2 -similarity index 100% -rename from tests/test-v2v-i-ova-two-disks.expected2 -rename to tests/test-i-ova-two-disks.expected2 -diff --git a/tests/test-v2v-i-ova-two-disks.ovf b/tests/test-i-ova-two-disks.ovf -similarity index 100% -rename from tests/test-v2v-i-ova-two-disks.ovf -rename to tests/test-i-ova-two-disks.ovf -diff --git a/tests/test-v2v-i-ova-two-disks.sh b/tests/test-i-ova-two-disks.sh -similarity index 87% -rename from tests/test-v2v-i-ova-two-disks.sh -rename to tests/test-i-ova-two-disks.sh -index 9879946e..07155441 100755 ---- a/tests/test-v2v-i-ova-two-disks.sh -+++ b/tests/test-i-ova-two-disks.sh -@@ -31,7 +31,7 @@ skip_if_skipped - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" - --d=test-v2v-i-ova-two-disks.d -+d=test-i-ova-two-disks.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -@@ -46,9 +46,9 @@ echo -e "SHA1(disk1.vmdk)= $sha\r" > disk1.mf - guestfish disk-create disk2.vmdk raw 100K - sha=`do_sha1 disk2.vmdk` - echo -e "SHA1(disk2.vmdk)= $sha\r" > disk2.mf --cp "$abs_srcdir/test-v2v-i-ova-two-disks.ovf" . -+cp "$abs_srcdir/test-i-ova-two-disks.ovf" . - --tar -cf test.ova test-v2v-i-ova-two-disks.ovf disk1.vmdk disk1.mf disk2.vmdk disk2.mf -+tar -cf test.ova test-i-ova-two-disks.ovf disk1.vmdk disk1.mf disk2.vmdk disk2.mf - popd - - # Run virt-v2v but only as far as the --print-source stage, and -@@ -64,9 +64,9 @@ if grep -sq json: $d/source ; then - # Exact offset will vary because of tar. - sed -i -e "s,\"[^\"]*/$d/,\"," \ - -e "s|\"offset\": [0-9]*,|\"offset\": x,|" $d/source -- diff -u "$srcdir/test-v2v-i-ova-two-disks.expected2" $d/source -+ diff -u "$srcdir/test-i-ova-two-disks.expected2" $d/source - else - # normalize the output - sed -i -e 's,[^ \t]*\(disk.*.vmdk\),\1,' $d/source -- diff -u "$srcdir/test-v2v-i-ova-two-disks.expected" $d/source -+ diff -u "$srcdir/test-i-ova-two-disks.expected" $d/source - fi -diff --git a/tests/test-v2v-i-ova.ovf b/tests/test-i-ova.ovf -similarity index 100% -rename from tests/test-v2v-i-ova.ovf -rename to tests/test-i-ova.ovf -diff --git a/tests/test-v2v-i-ova.sh b/tests/test-i-ova.sh -similarity index 95% -rename from tests/test-v2v-i-ova.sh -rename to tests/test-i-ova.sh -index 7d988330..35c23e4f 100755 ---- a/tests/test-v2v-i-ova.sh -+++ b/tests/test-i-ova.sh -@@ -32,13 +32,13 @@ requires test -s $f - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" - --d=test-v2v-i-ova.d -+d=test-i-ova.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d - - vmdk=test-ova.vmdk --ovf=test-v2v-i-ova.ovf -+ovf=test-i-ova.ovf - mf=test-ova.mf - ova=test-ova.ova - raw=TestOva-sda -@@ -72,4 +72,4 @@ sed \ - < $d/TestOva.xml.old > $d/TestOva.xml - - # Check the libvirt XML output. --diff -u "$srcdir/test-v2v-i-ova.xml" $d/TestOva.xml -+diff -u "$srcdir/test-i-ova.xml" $d/TestOva.xml -diff --git a/tests/test-v2v-i-ova.xml b/tests/test-i-ova.xml -similarity index 100% -rename from tests/test-v2v-i-ova.xml -rename to tests/test-i-ova.xml -diff --git a/tests/test-v2v-i-vmx-1.expected b/tests/test-i-vmx-1.expected -similarity index 100% -rename from tests/test-v2v-i-vmx-1.expected -rename to tests/test-i-vmx-1.expected -diff --git a/tests/test-v2v-i-vmx-1.vmx b/tests/test-i-vmx-1.vmx -similarity index 100% -rename from tests/test-v2v-i-vmx-1.vmx -rename to tests/test-i-vmx-1.vmx -diff --git a/tests/test-v2v-i-vmx-2.expected b/tests/test-i-vmx-2.expected -similarity index 100% -rename from tests/test-v2v-i-vmx-2.expected -rename to tests/test-i-vmx-2.expected -diff --git a/tests/test-v2v-i-vmx-2.vmx b/tests/test-i-vmx-2.vmx -similarity index 100% -rename from tests/test-v2v-i-vmx-2.vmx -rename to tests/test-i-vmx-2.vmx -diff --git a/tests/test-v2v-i-vmx-3.expected b/tests/test-i-vmx-3.expected -similarity index 100% -rename from tests/test-v2v-i-vmx-3.expected -rename to tests/test-i-vmx-3.expected -diff --git a/tests/test-v2v-i-vmx-3.vmx b/tests/test-i-vmx-3.vmx -similarity index 100% -rename from tests/test-v2v-i-vmx-3.vmx -rename to tests/test-i-vmx-3.vmx -diff --git a/tests/test-v2v-i-vmx-4.expected b/tests/test-i-vmx-4.expected -similarity index 100% -rename from tests/test-v2v-i-vmx-4.expected -rename to tests/test-i-vmx-4.expected -diff --git a/tests/test-v2v-i-vmx-4.vmx b/tests/test-i-vmx-4.vmx -similarity index 100% -rename from tests/test-v2v-i-vmx-4.vmx -rename to tests/test-i-vmx-4.vmx -diff --git a/tests/test-v2v-i-vmx-5.expected b/tests/test-i-vmx-5.expected -similarity index 100% -rename from tests/test-v2v-i-vmx-5.expected -rename to tests/test-i-vmx-5.expected -diff --git a/tests/test-v2v-i-vmx-5.vmx b/tests/test-i-vmx-5.vmx -similarity index 100% -rename from tests/test-v2v-i-vmx-5.vmx -rename to tests/test-i-vmx-5.vmx -diff --git a/tests/test-v2v-i-vmx-6.expected b/tests/test-i-vmx-6.expected -similarity index 100% -rename from tests/test-v2v-i-vmx-6.expected -rename to tests/test-i-vmx-6.expected -diff --git a/tests/test-v2v-i-vmx-6.vmx b/tests/test-i-vmx-6.vmx -similarity index 100% -rename from tests/test-v2v-i-vmx-6.vmx -rename to tests/test-i-vmx-6.vmx -diff --git a/tests/test-v2v-i-vmx-7.expected b/tests/test-i-vmx-7.expected -similarity index 100% -rename from tests/test-v2v-i-vmx-7.expected -rename to tests/test-i-vmx-7.expected -diff --git a/tests/test-v2v-i-vmx-7.vmx b/tests/test-i-vmx-7.vmx -similarity index 100% -rename from tests/test-v2v-i-vmx-7.vmx -rename to tests/test-i-vmx-7.vmx -diff --git a/tests/test-v2v-i-vmx.sh b/tests/test-i-vmx.sh -similarity index 83% -rename from tests/test-v2v-i-vmx.sh -rename to tests/test-i-vmx.sh -index eff27e3d..1f36c938 100755 ---- a/tests/test-v2v-i-vmx.sh -+++ b/tests/test-i-vmx.sh -@@ -34,7 +34,7 @@ export LANG=C - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" - --rm -f test-v2v-i-vmx-*.actual -+rm -f test-i-vmx-*.actual - - # For the tests to succeed we need at least the fileName (VMDK input - # files) to exist. -@@ -49,21 +49,21 @@ for fn in $fns; do qemu-img create -f vmdk $fn 512; done - - for i in 1 2 3 4 5 6 7; do - $VG virt-v2v --debug-gc \ -- -i vmx test-v2v-i-vmx-$i.vmx \ -- --print-source > test-v2v-i-vmx-$i.actual -+ -i vmx test-i-vmx-$i.vmx \ -+ --print-source > test-i-vmx-$i.actual - - # Normalize the print-source output. -- mv test-v2v-i-vmx-$i.actual test-v2v-i-vmx-$i.actual.old -+ mv test-i-vmx-$i.actual test-i-vmx-$i.actual.old - sed \ - -e "s,.*Setting up the source.*,," \ - -e "s,.*Opening the source.*,," \ - -e "s,$(pwd),," \ -- < test-v2v-i-vmx-$i.actual.old > test-v2v-i-vmx-$i.actual -- rm test-v2v-i-vmx-$i.actual.old -+ < test-i-vmx-$i.actual.old > test-i-vmx-$i.actual -+ rm test-i-vmx-$i.actual.old - - # Check the output. -- diff -u "$srcdir/test-v2v-i-vmx-$i.expected" test-v2v-i-vmx-$i.actual -+ diff -u "$srcdir/test-i-vmx-$i.expected" test-i-vmx-$i.actual - done - --rm test-v2v-i-vmx-*.actual -+rm test-i-vmx-*.actual - for fn in $fns; do rm $fn; done -diff --git a/tests/test-v2v-in-place.sh b/tests/test-in-place.sh -similarity index 99% -rename from tests/test-v2v-in-place.sh -rename to tests/test-in-place.sh -index 2b31b0bb..f58f8c38 100755 ---- a/tests/test-v2v-in-place.sh -+++ b/tests/test-in-place.sh -@@ -35,7 +35,7 @@ img_base="$abs_top_builddir/test-data/phony-guests/windows.img" - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" - --d=$PWD/test-v2v-in-place.d -+d=$PWD/test-in-place.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -diff --git a/tests/test-v2v-inspector.sh b/tests/test-inspector.sh -similarity index 98% -rename from tests/test-v2v-inspector.sh -rename to tests/test-inspector.sh -index 05c2607e..55df7a3f 100755 ---- a/tests/test-v2v-inspector.sh -+++ b/tests/test-inspector.sh -@@ -34,7 +34,7 @@ img="$abs_top_builddir/test-data/phony-guests/windows.img" - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" - --d=$PWD/test-v2v-inspector.d -+d=$PWD/test-inspector.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -diff --git a/tests/test-v2v-it-vddk-io-query.sh b/tests/test-it-vddk-io-query.sh -similarity index 97% -rename from tests/test-v2v-it-vddk-io-query.sh -rename to tests/test-it-vddk-io-query.sh -index c3fb8eb2..54a8bb15 100755 ---- a/tests/test-v2v-it-vddk-io-query.sh -+++ b/tests/test-it-vddk-io-query.sh -@@ -29,7 +29,7 @@ skip_if_skipped - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" - --f=test-v2v-it-vddk-io-query.actual -+f=test-it-vddk-io-query.actual - rm -f $f - - $VG virt-v2v --debug-gc \ -diff --git a/tests/test-v2v-mac-expected.xml b/tests/test-mac-expected.xml -similarity index 100% -rename from tests/test-v2v-mac-expected.xml -rename to tests/test-mac-expected.xml -diff --git a/tests/test-v2v-mac.sh b/tests/test-mac.sh -similarity index 93% -rename from tests/test-v2v-mac.sh -rename to tests/test-mac.sh -index dae571d7..f880a4ea 100755 ---- a/tests/test-v2v-mac.sh -+++ b/tests/test-mac.sh -@@ -27,12 +27,12 @@ set -x - skip_if_skipped - requires test -f ../test-data/phony-guests/windows.img - --libvirt_uri="test://$abs_builddir/test-v2v-mac.xml" -+libvirt_uri="test://$abs_builddir/test-mac.xml" - f=../test-data/phony-guests/windows.img - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-mac.d -+d=test-mac.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -@@ -54,4 +54,4 @@ sed -n '/interface/,/\/interface/p' $d/windows.xml | - grep -v 'model type=' > $d/networks - - # Test that the output has mapped the networks and bridges correctly. --diff -ur "$srcdir/test-v2v-mac-expected.xml" $d/networks -+diff -ur "$srcdir/test-mac-expected.xml" $d/networks -diff --git a/tests/test-v2v-mac.xml.in b/tests/test-mac.xml.in -similarity index 100% -rename from tests/test-v2v-mac.xml.in -rename to tests/test-mac.xml.in -diff --git a/tests/test-v2v-machine-readable.sh b/tests/test-machine-readable.sh -similarity index 81% -rename from tests/test-v2v-machine-readable.sh -rename to tests/test-machine-readable.sh -index 4fdedff2..e176c037 100755 ---- a/tests/test-v2v-machine-readable.sh -+++ b/tests/test-machine-readable.sh -@@ -26,8 +26,8 @@ set -x - - skip_if_skipped - --$VG virt-v2v --debug-gc --machine-readable > test-v2v-machine-readable.out --grep virt-v2v test-v2v-machine-readable.out --grep libguestfs-rewrite test-v2v-machine-readable.out -+$VG virt-v2v --debug-gc --machine-readable > test-machine-readable.out -+grep virt-v2v test-machine-readable.out -+grep libguestfs-rewrite test-machine-readable.out - --rm test-v2v-machine-readable.out -+rm test-machine-readable.out -diff --git a/tests/test-v2v-networks-and-bridges-expected.xml b/tests/test-networks-and-bridges-expected.xml -similarity index 100% -rename from tests/test-v2v-networks-and-bridges-expected.xml -rename to tests/test-networks-and-bridges-expected.xml -diff --git a/tests/test-v2v-networks-and-bridges.sh b/tests/test-networks-and-bridges.sh -similarity index 90% -rename from tests/test-v2v-networks-and-bridges.sh -rename to tests/test-networks-and-bridges.sh -index c50711ca..94d3d24a 100755 ---- a/tests/test-v2v-networks-and-bridges.sh -+++ b/tests/test-networks-and-bridges.sh -@@ -27,12 +27,12 @@ set -x - skip_if_skipped - requires test -f ../test-data/phony-guests/windows.img - --libvirt_uri="test://$abs_builddir/test-v2v-networks-and-bridges.xml" -+libvirt_uri="test://$abs_builddir/test-networks-and-bridges.xml" - f=../test-data/phony-guests/windows.img - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-networks-and-bridges.d -+d=test-networks-and-bridges.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -@@ -57,4 +57,4 @@ sed -n '/interface/,/\/interface/p' $d/windows.xml | - grep -v 'model type=' > $d/networks - - # Test that the output has mapped the networks and bridges correctly. --diff -ur "$srcdir/test-v2v-networks-and-bridges-expected.xml" $d/networks -+diff -ur "$srcdir/test-networks-and-bridges-expected.xml" $d/networks -diff --git a/tests/test-v2v-networks-and-bridges.xml.in b/tests/test-networks-and-bridges.xml.in -similarity index 100% -rename from tests/test-v2v-networks-and-bridges.xml.in -rename to tests/test-networks-and-bridges.xml.in -diff --git a/tests/test-v2v-o-glance.sh b/tests/test-o-glance.sh -similarity index 100% -rename from tests/test-v2v-o-glance.sh -rename to tests/test-o-glance.sh -diff --git a/tests/test-v2v-o-kubevirt-fedora.sh b/tests/test-o-kubevirt-fedora.sh -similarity index 94% -rename from tests/test-v2v-o-kubevirt-fedora.sh -rename to tests/test-o-kubevirt-fedora.sh -index 959b37ba..2d4113ce 100755 ---- a/tests/test-v2v-o-kubevirt-fedora.sh -+++ b/tests/test-o-kubevirt-fedora.sh -@@ -31,7 +31,7 @@ requires test -f ../test-data/phony-guests/fedora.img - libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests.xml" - fedora=../test-data/phony-guests/fedora.img - --d=test-v2v-o-kubevirt-fedora.d -+d=test-o-kubevirt-fedora.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -@@ -54,4 +54,4 @@ sed -i \ - $d/test.yaml - - # Compare yaml to the expected output. --diff -u test-v2v-o-kubevirt-fedora.yaml.expected $d/test.yaml -+diff -u test-o-kubevirt-fedora.yaml.expected $d/test.yaml -diff --git a/tests/test-v2v-o-kubevirt-fedora.yaml.expected b/tests/test-o-kubevirt-fedora.yaml.expected -similarity index 100% -rename from tests/test-v2v-o-kubevirt-fedora.yaml.expected -rename to tests/test-o-kubevirt-fedora.yaml.expected -diff --git a/tests/test-v2v-o-kubevirt-windows.sh b/tests/test-o-kubevirt-windows.sh -similarity index 94% -rename from tests/test-v2v-o-kubevirt-windows.sh -rename to tests/test-o-kubevirt-windows.sh -index 4c82f1d0..ed9b84f0 100755 ---- a/tests/test-v2v-o-kubevirt-windows.sh -+++ b/tests/test-o-kubevirt-windows.sh -@@ -34,7 +34,7 @@ windows=../test-data/phony-guests/windows.img - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" - --d=test-v2v-o-kubevirt-windows.d -+d=test-o-kubevirt-windows.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -@@ -57,4 +57,4 @@ sed -i \ - $d/test.yaml - - # Compare yaml to the expected output. --diff -u test-v2v-o-kubevirt-windows.yaml.expected $d/test.yaml -+diff -u test-o-kubevirt-windows.yaml.expected $d/test.yaml -diff --git a/tests/test-v2v-o-kubevirt-windows.yaml.expected b/tests/test-o-kubevirt-windows.yaml.expected -similarity index 100% -rename from tests/test-v2v-o-kubevirt-windows.yaml.expected -rename to tests/test-o-kubevirt-windows.yaml.expected -diff --git a/tests/test-v2v-o-libvirt.sh b/tests/test-o-libvirt.sh -similarity index 98% -rename from tests/test-v2v-o-libvirt.sh -rename to tests/test-o-libvirt.sh -index d44f55dd..49f8c8da 100755 ---- a/tests/test-v2v-o-libvirt.sh -+++ b/tests/test-o-libvirt.sh -@@ -49,7 +49,7 @@ guestname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8) - # Generate a random pool name. - poolname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8) - --d=test-v2v-o-libvirt.d -+d=test-o-libvirt.d - rm -rf $d - - # Clean up. -diff --git a/tests/test-v2v-o-local-qcow2-compressed.sh b/tests/test-o-local-qcow2-compressed.sh -similarity index 97% -rename from tests/test-v2v-o-local-qcow2-compressed.sh -rename to tests/test-o-local-qcow2-compressed.sh -index 32c9ebbe..f5a7ac6c 100755 ---- a/tests/test-v2v-o-local-qcow2-compressed.sh -+++ b/tests/test-o-local-qcow2-compressed.sh -@@ -38,7 +38,7 @@ nbdcopy --version | { - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-o-local-qcow2-compressed.d -+d=test-o-local-qcow2-compressed.d - rm -rf $d - cleanup_fn rm -rf $d - mkdir $d -diff --git a/tests/test-v2v-o-null.sh b/tests/test-o-null.sh -similarity index 100% -rename from tests/test-v2v-o-null.sh -rename to tests/test-o-null.sh -diff --git a/tests/test-v2v-o-openstack.sh b/tests/test-o-openstack.sh -similarity index 97% -rename from tests/test-v2v-o-openstack.sh -rename to tests/test-o-openstack.sh -index fdad4c21..aea5be8c 100755 ---- a/tests/test-v2v-o-openstack.sh -+++ b/tests/test-o-openstack.sh -@@ -33,7 +33,7 @@ windows=../test-data/phony-guests/windows.img - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-o-openstack.d -+d=test-o-openstack.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -@@ -43,7 +43,7 @@ mkdir $d - # JSON output where required. - cat > $d/openstack <<'EOF' - #!/bin/bash - --echo "$@" >> test-v2v-o-openstack.d/log -+echo "$@" >> test-o-openstack.d/log - echo "$@" | grep -sq -- "-f json" && \ - echo '{ "id": "dummy-vol-id", "status": "available" }' - exit 0 -diff --git a/tests/test-v2v-o-qemu.sh b/tests/test-o-qemu.sh -similarity index 98% -rename from tests/test-v2v-o-qemu.sh -rename to tests/test-o-qemu.sh -index 2f36261d..539fac3d 100755 ---- a/tests/test-v2v-o-qemu.sh -+++ b/tests/test-o-qemu.sh -@@ -32,7 +32,7 @@ f=../test-data/phony-guests/windows.img - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-o-qemu.d -+d=test-o-qemu.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -diff --git a/tests/test-v2v-oa-option-qcow2.sh b/tests/test-oa-option-qcow2.sh -similarity index 98% -rename from tests/test-v2v-oa-option-qcow2.sh -rename to tests/test-oa-option-qcow2.sh -index 3fdd9ce5..cd9c8f05 100755 ---- a/tests/test-v2v-oa-option-qcow2.sh -+++ b/tests/test-oa-option-qcow2.sh -@@ -33,7 +33,7 @@ f=../test-data/phony-guests/windows.img - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-oa-option-qcow2.d -+d=test-oa-option-qcow2.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -diff --git a/tests/test-v2v-oa-option-raw.sh b/tests/test-oa-option-raw.sh -similarity index 98% -rename from tests/test-v2v-oa-option-raw.sh -rename to tests/test-oa-option-raw.sh -index 994d54fc..52b58f34 100755 ---- a/tests/test-v2v-oa-option-raw.sh -+++ b/tests/test-oa-option-raw.sh -@@ -33,7 +33,7 @@ f=../test-data/phony-guests/windows.img - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-oa-option-raw.d -+d=test-oa-option-raw.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -diff --git a/tests/test-v2v-of-option.sh b/tests/test-of-option.sh -similarity index 98% -rename from tests/test-v2v-of-option.sh -rename to tests/test-of-option.sh -index 6c5f5938..0a37e9b0 100755 ---- a/tests/test-v2v-of-option.sh -+++ b/tests/test-of-option.sh -@@ -33,7 +33,7 @@ f=../test-data/phony-guests/windows.img - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-of-option.d -+d=test-of-option.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -diff --git a/tests/test-v2v-on-option.sh b/tests/test-on-option.sh -similarity index 98% -rename from tests/test-v2v-on-option.sh -rename to tests/test-on-option.sh -index 47893294..985b3575 100755 ---- a/tests/test-v2v-on-option.sh -+++ b/tests/test-on-option.sh -@@ -32,7 +32,7 @@ f=../test-data/phony-guests/windows.img - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-on-option.d -+d=test-on-option.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -diff --git a/tests/test-v2v-print-source.expected b/tests/test-print-source.expected -similarity index 100% -rename from tests/test-v2v-print-source.expected -rename to tests/test-print-source.expected -diff --git a/tests/test-v2v-print-source.sh b/tests/test-print-source.sh -similarity index 90% -rename from tests/test-v2v-print-source.sh -rename to tests/test-print-source.sh -index e46fd126..17d6a851 100755 ---- a/tests/test-v2v-print-source.sh -+++ b/tests/test-print-source.sh -@@ -29,13 +29,13 @@ requires test -f ../test-data/phony-guests/windows.img - - export LANG=C - --d=test-v2v-print-source.d -+d=test-print-source.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d - - $VG virt-v2v --debug-gc \ -- -i libvirtxml test-v2v-print-source.xml \ -+ -i libvirtxml test-print-source.xml \ - -o local -os $d \ - --print-source > $d/output - -@@ -48,4 +48,4 @@ sed -e 's,/.*/windows.img,windows.img,' | - grep -v '^$' \ - > $d/output - --diff -u "$srcdir/test-v2v-print-source.expected" $d/output -+diff -u "$srcdir/test-print-source.expected" $d/output -diff --git a/tests/test-v2v-print-source.xml.in b/tests/test-print-source.xml.in -similarity index 100% -rename from tests/test-v2v-print-source.xml.in -rename to tests/test-print-source.xml.in -diff --git a/tests/test-v2v-sound.sh b/tests/test-sound.sh -similarity index 94% -rename from tests/test-v2v-sound.sh -rename to tests/test-sound.sh -index 16f8d720..0205bc82 100755 ---- a/tests/test-v2v-sound.sh -+++ b/tests/test-sound.sh -@@ -27,12 +27,12 @@ set -x - skip_if_skipped - requires test -f ../test-data/phony-guests/windows.img - --libvirt_uri="test://$abs_builddir/test-v2v-sound.xml" -+libvirt_uri="test://$abs_builddir/test-sound.xml" - f=../test-data/phony-guests/windows.img - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --d=test-v2v-sound.d -+d=test-sound.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -diff --git a/tests/test-v2v-sound.xml.in b/tests/test-sound.xml.in -similarity index 100% -rename from tests/test-v2v-sound.xml.in -rename to tests/test-sound.xml.in -diff --git a/tests/test-v2v-trim.sh b/tests/test-trim.sh -similarity index 99% -rename from tests/test-v2v-trim.sh -rename to tests/test-trim.sh -index ed6c031d..a3247666 100755 ---- a/tests/test-v2v-trim.sh -+++ b/tests/test-trim.sh -@@ -31,7 +31,7 @@ set -x - slow_test - skip_if_skipped - --d=test-v2v-trim.d -+d=test-trim.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -diff --git a/tests/test-v2v-virtio-win-iso.sh b/tests/test-virtio-win-iso.sh -similarity index 99% -rename from tests/test-v2v-virtio-win-iso.sh -rename to tests/test-virtio-win-iso.sh -index 2e133034..d2adbc6b 100755 ---- a/tests/test-v2v-virtio-win-iso.sh -+++ b/tests/test-virtio-win-iso.sh -@@ -49,7 +49,7 @@ function random_choice - choices=("/dev/sda2" "single" "first") - root=`random_choice` - --d=test-v2v-virtio-win-iso.d -+d=test-virtio-win-iso.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d -diff --git a/tests/test-v2v-windows-conversion.sh b/tests/test-windows-conversion.sh -similarity index 98% -rename from tests/test-v2v-windows-conversion.sh -rename to tests/test-windows-conversion.sh -index 1ff41f6a..2f9b0ca5 100755 ---- a/tests/test-v2v-windows-conversion.sh -+++ b/tests/test-windows-conversion.sh -@@ -43,7 +43,7 @@ function random_choice - choices=("/dev/sda2" "single" "first") - root=`random_choice` - --d=test-v2v-windows-conversion.d -+d=test-windows-conversion.d - rm -rf $d - cleanup_fn rm -r $d - mkdir $d diff --git a/0021-tests-Sort-the-tests-into-alphabetical-order.patch b/0021-tests-Sort-the-tests-into-alphabetical-order.patch deleted file mode 100644 index 7abd5ea..0000000 --- a/0021-tests-Sort-the-tests-into-alphabetical-order.patch +++ /dev/null @@ -1,244 +0,0 @@ -From a661b06677d7fdd63b6e7315b759ded900f3a540 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 5 Dec 2024 15:19:15 +0000 -Subject: [PATCH] tests: Sort the tests into alphabetical order - -The list of tests had grown organically over a very long time. - -Also rename the "odd one out" rhbz* to test-rhbz*. - -(cherry picked from commit d80c05a27098c6affaca4363372cae2354d9bc4f) -(cherry picked from commit a9d2eb43fdd5f1d115cc5b048a4b252a533d72cd) ---- - .gitignore | 2 +- - configure.ac | 2 +- - tests/Makefile.am | 58 +++++++++---------- - tests/rhbz1232192.xml | 26 +++++++++ - tests/{rhbz1232192.sh => test-rhbz1232192.sh} | 2 +- - ...1232192.xml.in => test-rhbz1232192.xml.in} | 0 - 6 files changed, 58 insertions(+), 32 deletions(-) - create mode 100644 tests/rhbz1232192.xml - rename tests/{rhbz1232192.sh => test-rhbz1232192.sh} (95%) - rename tests/{rhbz1232192.xml.in => test-rhbz1232192.xml.in} (100%) - -diff --git a/.gitignore b/.gitignore -index b8abc3f8..9dcd4611 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -121,13 +121,13 @@ Makefile.in - /test-data/phony-guests/windows-system - /tests/functions.sh - /tests/libvirt-is-version --/tests/rhbz1232192.xml - /tests/test-cdrom.xml - /tests/test-conversion-of-*.sh - /tests/test-floppy.xml - /tests/test-mac.xml - /tests/test-networks-and-bridges.xml - /tests/test-print-source.xml -+/tests/test-rhbz1232192.xml - /tests/test-sound.xml - /tests/windows.vmdk - /v2v/.depend -diff --git a/configure.ac b/configure.ac -index 300b421e..623c634d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -163,12 +163,12 @@ AC_CONFIG_FILES([Makefile - test-data/phony-guests/guests.xml - tests/functions.sh - tests/Makefile -- tests/rhbz1232192.xml - tests/test-cdrom.xml - tests/test-floppy.xml - tests/test-mac.xml - tests/test-networks-and-bridges.xml - tests/test-print-source.xml -+ tests/test-rhbz1232192.xml - tests/test-sound.xml - v2v/Makefile]) - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index c466b59a..fac18bbe 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -56,6 +56,17 @@ libvirt_is_version_CFLAGS = \ - TESTS_ENVIRONMENT = $(top_builddir)/run --test - - TESTS = \ -+ test-bad-networks-and-bridges.sh \ -+ test-cdrom.sh \ -+ test-customize.sh \ -+ test-fedora-btrfs-conversion.sh \ -+ test-fedora-conversion.sh \ -+ test-fedora-luks-on-lvm-conversion.sh \ -+ test-fedora-lvm-on-luks-conversion.sh \ -+ test-fedora-md-conversion.sh \ -+ test-floppy.sh \ -+ test-i-disk-parallel.sh \ -+ test-i-disk.sh \ - test-i-ova-bad-sha1.sh \ - test-i-ova-bad-sha256.sh \ - test-i-ova-directory.sh \ -@@ -68,16 +79,11 @@ TESTS = \ - test-i-ova-subfolders.sh \ - test-i-ova-tar.sh \ - test-i-ova-two-disks.sh \ -- test-i-vmx.sh \ -- test-it-vddk-io-query.sh \ -- test-bad-networks-and-bridges.sh \ -- test-cdrom.sh \ -- test-floppy.sh \ -- test-i-disk.sh \ -- test-i-disk-parallel.sh \ - test-i-ova.sh \ -+ test-i-vmx.sh \ - test-in-place.sh \ - test-inspector.sh \ -+ test-it-vddk-io-query.sh \ - test-mac.sh \ - test-machine-readable.sh \ - test-networks-and-bridges.sh \ -@@ -94,16 +100,10 @@ TESTS = \ - test-of-option.sh \ - test-on-option.sh \ - test-print-source.sh \ -+ test-rhbz1232192.sh \ - test-sound.sh \ - test-virtio-win-iso.sh \ -- test-fedora-conversion.sh \ -- test-fedora-btrfs-conversion.sh \ -- test-fedora-luks-on-lvm-conversion.sh \ -- test-fedora-lvm-on-luks-conversion.sh \ -- test-fedora-md-conversion.sh \ - test-windows-conversion.sh \ -- test-customize.sh \ -- rhbz1232192.sh \ - $(SLOW_TESTS) \ - $(ROOT_TESTS) - -@@ -179,16 +179,17 @@ EXTRA_DIST += \ - test-bad-networks-and-bridges.sh \ - test-cdrom.expected \ - test-cdrom.sh \ -+ test-conversion-of.sh \ - test-customize.sh \ -- test-fedora-conversion.sh \ - test-fedora-btrfs-conversion.sh \ -+ test-fedora-conversion.sh \ - test-fedora-luks-on-lvm-conversion.sh \ - test-fedora-lvm-on-luks-conversion.sh \ - test-fedora-md-conversion.sh \ - test-floppy.expected \ - test-floppy.sh \ -- test-i-disk.sh \ - test-i-disk-parallel.sh \ -+ test-i-disk.sh \ - test-i-ova-as-root.ovf \ - test-i-ova-as-root.sh \ - test-i-ova-bad-sha1.sh \ -@@ -223,33 +224,33 @@ EXTRA_DIST += \ - test-i-ova.ovf \ - test-i-ova.sh \ - test-i-ova.xml \ -- test-i-vmx.sh \ - test-i-vmx-1.expected \ -- test-i-vmx-2.expected \ -- test-i-vmx-3.expected \ -- test-i-vmx-4.expected \ -- test-i-vmx-5.expected \ -- test-i-vmx-6.expected \ -- test-i-vmx-7.expected \ - test-i-vmx-1.vmx \ -+ test-i-vmx-2.expected \ - test-i-vmx-2.vmx \ -+ test-i-vmx-3.expected \ - test-i-vmx-3.vmx \ -+ test-i-vmx-4.expected \ - test-i-vmx-4.vmx \ -+ test-i-vmx-5.expected \ - test-i-vmx-5.vmx \ -+ test-i-vmx-6.expected \ - test-i-vmx-6.vmx \ -+ test-i-vmx-7.expected \ - test-i-vmx-7.vmx \ -+ test-i-vmx.sh \ - test-in-place.sh \ - test-inspector.sh \ - test-it-vddk-io-query.sh \ -- test-machine-readable.sh \ - test-mac-expected.xml \ - test-mac.sh \ -- test-networks-and-bridges.sh \ -+ test-machine-readable.sh \ - test-networks-and-bridges-expected.xml \ -+ test-networks-and-bridges.sh \ - test-o-glance.sh \ - test-o-kubevirt-fedora.sh \ -- test-o-kubevirt-windows.sh \ - test-o-kubevirt-fedora.yaml.expected \ -+ test-o-kubevirt-windows.sh \ - test-o-kubevirt-windows.yaml.expected \ - test-o-libvirt.sh \ - test-o-local-qcow2-compressed.sh \ -@@ -262,9 +263,8 @@ EXTRA_DIST += \ - test-on-option.sh \ - test-print-source.expected \ - test-print-source.sh \ -- test-conversion-of.sh \ -+ test-rhbz1232192.sh \ - test-sound.sh \ - test-trim.sh \ - test-virtio-win-iso.sh \ -- test-windows-conversion.sh \ -- rhbz1232192.sh -+ test-windows-conversion.sh -diff --git a/tests/rhbz1232192.xml b/tests/rhbz1232192.xml -new file mode 100644 -index 00000000..cf0d7a45 ---- /dev/null -+++ b/tests/rhbz1232192.xml -@@ -0,0 +1,26 @@ -+ -+ rhbz1232192 -+ 1048576 -+ 2 -+ -+ hvm -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/tests/rhbz1232192.sh b/tests/test-rhbz1232192.sh -similarity index 95% -rename from tests/rhbz1232192.sh -rename to tests/test-rhbz1232192.sh -index d2180439..21eb2dbd 100755 ---- a/tests/rhbz1232192.sh -+++ b/tests/test-rhbz1232192.sh -@@ -32,4 +32,4 @@ requires test -f ../test-data/phony-guests/blank-disk.img - - export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" - --virt-v2v -i libvirtxml rhbz1232192.xml -o null -+virt-v2v -i libvirtxml test-rhbz1232192.xml -o null -diff --git a/tests/rhbz1232192.xml.in b/tests/test-rhbz1232192.xml.in -similarity index 100% -rename from tests/rhbz1232192.xml.in -rename to tests/test-rhbz1232192.xml.in diff --git a/0022-docs-Embolden-whole-O.patch b/0022-docs-Embolden-whole-O.patch deleted file mode 100644 index 1b769d1..0000000 --- a/0022-docs-Embolden-whole-O.patch +++ /dev/null @@ -1,27 +0,0 @@ -From f0e33d92b0fac09ea21fd74f85ec15728982ebed Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 5 Dec 2024 13:35:24 +0000 -Subject: [PATCH] docs: Embolden whole "-O -" - -Since this is typed literally make sure the whole string is -emboldened, according to our usual style. - -(cherry picked from commit 3b81441fdb9e43eae3619c247e0d945d143fc92f) -(cherry picked from commit 66a6afb741d32f998633b121c2fb9813e5195820) ---- - docs/virt-v2v-inspector.pod | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/docs/virt-v2v-inspector.pod b/docs/virt-v2v-inspector.pod -index 6b2ba2a9..8201fcf9 100644 ---- a/docs/virt-v2v-inspector.pod -+++ b/docs/virt-v2v-inspector.pod -@@ -138,7 +138,7 @@ Display help. - - Write the output to a file called F. - --=item B<-O> - -+=item B<-O -> - - Write the output to stdout. This is also the default if the I<-O> - option is omitted. diff --git a/0023-in-place-Fix-name-of-program-in-the-help-output.patch b/0023-in-place-Fix-name-of-program-in-the-help-output.patch deleted file mode 100644 index 9a15910..0000000 --- a/0023-in-place-Fix-name-of-program-in-the-help-output.patch +++ /dev/null @@ -1,27 +0,0 @@ -From ee644bada89eb1a00284e8ae3169488aba01b06c Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 5 Dec 2024 17:17:25 +0000 -Subject: [PATCH] in-place: Fix name of program in the --help output - -(cherry picked from commit 00bd17ceb1ce0ff1f837b7621596d3b1e16ccc65) -(cherry picked from commit 900641084045a53f9c59e099e7d49dbb43bda3eb) ---- - in-place/in_place.ml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/in-place/in_place.ml b/in-place/in_place.ml -index 9d24de78..42075139 100644 ---- a/in-place/in_place.ml -+++ b/in-place/in_place.ml -@@ -194,9 +194,9 @@ let rec main () = - Note this program modifies the guest in-place with no backup. - Normally you should use virt-v2v. - --virt-v2v -i libvirtxml guest-domain.xml -+virt-v2v-in-place -i libvirtxml guest-domain.xml - --virt-v2v -i disk disk.img -+virt-v2v-in-place -i disk disk.img - - A short summary of the options is given below. For detailed help please - read the man page virt-v2v-in-place(1). diff --git a/0024-inspector-Reorder-O-option-in-alphabetical-order.patch b/0024-inspector-Reorder-O-option-in-alphabetical-order.patch deleted file mode 100644 index b4d085c..0000000 --- a/0024-inspector-Reorder-O-option-in-alphabetical-order.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 73bf9cb9a51f3112e8a80c57586442efcf53cfc1 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 5 Dec 2024 17:27:38 +0000 -Subject: [PATCH] inspector: Reorder -O option in alphabetical order - -Updates: commit 0805ea93796b8b57e7c9f0bc04f83ea76a9820a5 -(cherry picked from commit 8efb3ac06467f32901fa0447176311ff71aa53f9) -(cherry picked from commit 908f4148d8479c0f5e74ec21471adc57696eed55) ---- - inspector/inspector.ml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/inspector/inspector.ml b/inspector/inspector.ml -index d7cbf449..3e039891 100644 ---- a/inspector/inspector.ml -+++ b/inspector/inspector.ml -@@ -178,10 +178,10 @@ let rec main () = - s_"Map NIC to network or bridge or assign static IP"; - [ S 'n'; L"network" ], Getopt.String ("in:out", add_network), - s_"Map network ‘in’ to ‘out’"; -- [ L"root" ], Getopt.String ("ask|... ", set_root_choice), -- s_"How to choose root filesystem"; - [ S 'O' ], Getopt.String ("output.xml", set_output_file_option), - s_"Set the output filename"; -+ [ L"root" ], Getopt.String ("ask|... ", set_root_choice), -+ s_"How to choose root filesystem"; - ] in - - (* Append virt-customize options. *) diff --git a/0025-v2v-Ensure-parallel-1.patch b/0025-v2v-Ensure-parallel-1.patch deleted file mode 100644 index b8a6b25..0000000 --- a/0025-v2v-Ensure-parallel-1.patch +++ /dev/null @@ -1,25 +0,0 @@ -From c38b6503fb7d2c39d6053b61cbe1a8cf0d85dcb1 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sat, 7 Dec 2024 11:13:09 +0000 -Subject: [PATCH] v2v: Ensure --parallel >= 1 - -Fixes: commit fd1148f79581b148525eb12154aef7603ccf0baa -(cherry picked from commit 755ce5dc08929ef4ef9dc0b0290d380574cb1235) -(cherry picked from commit b242c331e0e3a3d04369aaefe7e910c978491368) ---- - v2v/v2v.ml | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index b7dbce3a..b8430997 100644 ---- a/v2v/v2v.ml -+++ b/v2v/v2v.ml -@@ -350,6 +350,8 @@ read the man page virt-v2v(1). - let output_mode = !output_mode in - let output_name = !output_name in - let parallel = !parallel in -+ if parallel < 1 then -+ error (f_"--parallel parameter must be >= 1"); - let print_source = !print_source in - let root_choice = !root_choice in - let static_ips = !static_ips in diff --git a/0026-inspector-Move-the-code-that-creates-XML-output-to-a.patch b/0026-inspector-Move-the-code-that-creates-XML-output-to-a.patch deleted file mode 100644 index 398d50c..0000000 --- a/0026-inspector-Move-the-code-that-creates-XML-output-to-a.patch +++ /dev/null @@ -1,404 +0,0 @@ -From d185e68293d6a39583f0539af760377a8a478eb4 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 5 Dec 2024 13:26:43 +0000 -Subject: [PATCH] inspector: Move the code that creates XML output to a - separate file - -Simple code motion, so that we can reuse this code in -virt-v2v-in-place. - -(cherry picked from commit 3d2d65a04ae75716c084063b572ff916fa83fd1b) -(cherry picked from commit 479f2cc10e74304e2d6202ad13dd99bdc9a6923d) ---- - inspector/Makefile.am | 2 + - inspector/create_inspector_xml.ml | 167 +++++++++++++++++++++++++++++ - inspector/create_inspector_xml.mli | 22 ++++ - inspector/inspector.ml | 144 +------------------------ - 4 files changed, 193 insertions(+), 142 deletions(-) - create mode 100644 inspector/create_inspector_xml.ml - create mode 100644 inspector/create_inspector_xml.mli - -diff --git a/inspector/Makefile.am b/inspector/Makefile.am -index 172b2dc0..15f8cc34 100644 ---- a/inspector/Makefile.am -+++ b/inspector/Makefile.am -@@ -23,9 +23,11 @@ EXTRA_DIST = \ - $(SOURCES_C) - - SOURCES_MLI = \ -+ create_inspector_xml.mli \ - inspector.mli - - SOURCES_ML = \ -+ create_inspector_xml.ml \ - inspector.ml - - SOURCES_C = \ -diff --git a/inspector/create_inspector_xml.ml b/inspector/create_inspector_xml.ml -new file mode 100644 -index 00000000..a3281d46 ---- /dev/null -+++ b/inspector/create_inspector_xml.ml -@@ -0,0 +1,167 @@ -+(* virt-v2v-inspector -+ * Copyright (C) 2009-2022 Red Hat Inc. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ *) -+ -+open Printf -+ -+open Std_utils -+open Tools_utils -+ -+open Types -+open Utils -+open DOM -+ -+(* This is where we construct the final XML document based on -+ * these inputs: -+ * - Global configuration like the version of v2v etc. -+ * - The NBD input sockets: v2vdir // "in0", "in1", etc -+ * - The inspection data (Types.inspect) -+ *) -+let rec create_inspector_xml v2vdir inspect target_meta = -+ let body = ref [] in -+ -+ (* Record the version of virt-v2v etc, mainly for debugging. *) -+ List.push_back_list body [ -+ Comment generated_by; -+ e "program" [] [PCData "virt-v2v-inspector"]; -+ e "package" [] [PCData Config.package_name]; -+ e "version" [] [PCData Config.package_version]; -+ ]; -+ -+ (* The disks. *) -+ let disks = ref [] in -+ -+ List.iter ( -+ fun (i, virtual_size) -> -+ let elems = ref [] in -+ List.push_back elems (e "virtual-size" [] -+ [PCData (Int64.to_string virtual_size)]); -+ (match get_input_disk_allocated v2vdir i with -+ | None -> () -+ | Some real_size -> -+ List.push_back elems (e "allocated" [ "estimated", "true" ] -+ [PCData (Int64.to_string real_size)]) -+ ); -+ -+ List.push_back disks (e "disk" [ "index", string_of_int i ] !elems) -+ ) (get_disks v2vdir); -+ List.push_back body (e "disks" [] !disks); -+ -+ (* The field is outside the element, -+ * since firmware is not part of the OS, and also because this is -+ * consistent with virt-drivers output. -+ *) -+ List.push_back body -+ (e "firmware" -+ ["type", -+ string_of_target_firmware target_meta.target_firmware] -+ []); -+ -+ (* The inspection data. *) -+ (* NB: Keep these field names compatible with virt-inspector! *) -+ let os = ref [] in -+ List.push_back os (e "name" [] [PCData inspect.i_type]); -+ List.push_back os (e "distro" [] [PCData inspect.i_distro]); -+ List.push_back os (e "osinfo" [] [PCData inspect.i_osinfo]); -+ List.push_back os (e "arch" [] [PCData inspect.i_arch]); -+ List.push_back os (e "major_version" [] -+ [PCData (string_of_int inspect.i_major_version)]); -+ List.push_back os (e "minor_version" [] -+ [PCData (string_of_int inspect.i_minor_version)]); -+ if inspect.i_package_format <> "" then -+ List.push_back os (e "package_format" [] -+ [PCData inspect.i_package_format]); -+ if inspect.i_package_management <> "" then -+ List.push_back os (e "package_management" [] -+ [PCData inspect.i_package_management]); -+ if inspect.i_product_name <> "" then -+ List.push_back os (e "product_name" [] [PCData inspect.i_product_name]); -+ if inspect.i_product_variant <> "" then -+ List.push_back os (e "product_variant" [] -+ [PCData inspect.i_product_variant]); -+ -+ if inspect.i_windows_systemroot <> "" then -+ List.push_back os (e "windows_systemroot" [] -+ [PCData inspect.i_windows_systemroot]); -+ if inspect.i_windows_software_hive <> "" then -+ List.push_back os (e "windows_software_hive" [] -+ [PCData inspect.i_windows_software_hive]); -+ if inspect.i_windows_systemroot <> "" then -+ List.push_back os (e "windows_system_hive" [] -+ [PCData inspect.i_windows_system_hive]); -+ if inspect.i_windows_current_control_set <> "" then -+ List.push_back os (e "windows_current_control_set" [] -+ [PCData inspect.i_windows_current_control_set]); -+ -+ List.push_back os (e "root" [] [PCData inspect.i_root]); -+ let mps = ref [] in -+ List.iter ( -+ fun (fs, dev) -> -+ List.push_back mps (e "mountpoint" [ "dev", dev ] [PCData fs]) -+ ) inspect.i_mountpoints; -+ List.push_back os (e "mountpoints" [] !mps); -+ -+ List.push_back body (e "operatingsystem" [] !os); -+ -+ (* Construct the final document. *) -+ (doc "v2v-inspection" [] !body : DOM.doc) -+ -+ -+(* This is a copy of {!Output.get_disks}. *) -+and get_disks dir = -+ let rec loop acc i = -+ let socket = sprintf "%s/in%d" dir i in -+ if Sys.file_exists socket then ( -+ let size = Utils.with_nbd_connect_unix ~socket NBD.get_size in -+ loop ((i, size) :: acc) (i+1) -+ ) -+ else -+ List.rev acc -+ in -+ loop [] 0 -+ -+(* This is like {!Utils.get_disk_allocated} but works on the input disks. *) -+and get_input_disk_allocated dir i = -+ let socket = sprintf "%s/in%d" dir i -+ and alloc_ctx = "base:allocation" in -+ with_nbd_connect_unix ~socket ~meta_contexts:[alloc_ctx] -+ (fun nbd -> -+ if NBD.can_meta_context nbd alloc_ctx then ( -+ (* Get the list of extents, using a 2GiB chunk size as hint. *) -+ let size = NBD.get_size nbd -+ and allocated = ref 0_L -+ and fetch_offset = ref 0_L in -+ while !fetch_offset < size do -+ let remaining = size -^ !fetch_offset in -+ let fetch_size = min 0x8000_0000_L remaining in -+ NBD.block_status nbd fetch_size !fetch_offset -+ (fun ctx offset entries err -> -+ assert (ctx = alloc_ctx); -+ for i = 0 to Array.length entries / 2 - 1 do -+ let len = entries.(i * 2) -+ and typ = entries.(i * 2 + 1) in -+ assert (len > 0_L); -+ if typ &^ 1_L = 0_L then -+ allocated := !allocated +^ len; -+ fetch_offset := !fetch_offset +^ len -+ done; -+ 0 -+ ) -+ done; -+ Some !allocated -+ ) else None -+ ) -diff --git a/inspector/create_inspector_xml.mli b/inspector/create_inspector_xml.mli -new file mode 100644 -index 00000000..4f09269c ---- /dev/null -+++ b/inspector/create_inspector_xml.mli -@@ -0,0 +1,22 @@ -+(* virt-v2v-in-place -+ * Copyright (C) 2009-2024 Red Hat Inc. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ *) -+ -+val create_inspector_xml : string -> Types.inspect -> Types.target_meta -> -+ DOM.doc -+(** Create the XML output of virt-v2v-inspector which contains the -+ post-conversion metadata. *) -diff --git a/inspector/inspector.ml b/inspector/inspector.ml -index 3e039891..f881baf5 100644 ---- a/inspector/inspector.ml -+++ b/inspector/inspector.ml -@@ -27,7 +27,7 @@ open Getopt.OptionName - - open Types - open Utils --open DOM -+open Create_inspector_xml - - (* Matches --mac command line parameters. *) - let mac_re = PCRE.compile "^([[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}):(network|bridge|ip):(.*)$" -@@ -364,7 +364,7 @@ read the man page virt-v2v-inspector(1). - ); - - (* Dump out the information. *) -- let doc = inspector_xml v2vdir inspect target_meta in -+ let doc = create_inspector_xml v2vdir inspect target_meta in - let chan = - match output_file with - | None -> Stdlib.stdout -@@ -400,144 +400,4 @@ and check_host_free_space () = - \"Minimum free space check in the host\".") - large_tmpdir (human_size free_space) - --(* This is a copy of {!Output.get_disks}. *) --and get_disks dir = -- let rec loop acc i = -- let socket = sprintf "%s/in%d" dir i in -- if Sys.file_exists socket then ( -- let size = Utils.with_nbd_connect_unix ~socket NBD.get_size in -- loop ((i, size) :: acc) (i+1) -- ) -- else -- List.rev acc -- in -- loop [] 0 -- --(* This is like {!Utils.get_disk_allocated} but works on the input disks. *) --and get_input_disk_allocated dir i = -- let socket = sprintf "%s/in%d" dir i -- and alloc_ctx = "base:allocation" in -- with_nbd_connect_unix ~socket ~meta_contexts:[alloc_ctx] -- (fun nbd -> -- if NBD.can_meta_context nbd alloc_ctx then ( -- (* Get the list of extents, using a 2GiB chunk size as hint. *) -- let size = NBD.get_size nbd -- and allocated = ref 0_L -- and fetch_offset = ref 0_L in -- while !fetch_offset < size do -- let remaining = size -^ !fetch_offset in -- let fetch_size = min 0x8000_0000_L remaining in -- NBD.block_status nbd fetch_size !fetch_offset -- (fun ctx offset entries err -> -- assert (ctx = alloc_ctx); -- for i = 0 to Array.length entries / 2 - 1 do -- let len = entries.(i * 2) -- and typ = entries.(i * 2 + 1) in -- assert (len > 0_L); -- if typ &^ 1_L = 0_L then -- allocated := !allocated +^ len; -- fetch_offset := !fetch_offset +^ len -- done; -- 0 -- ) -- done; -- Some !allocated -- ) else None -- ) -- --(* This is where we construct the final XML document based on -- * these inputs: -- * - Global configuration like the version of v2v etc. -- * - The NBD input sockets: v2vdir // "in0", "in1", etc -- * - The inspection data (Types.inspect) -- *) --and inspector_xml v2vdir inspect target_meta = -- let body = ref [] in -- -- (* Record the version of virt-v2v etc, mainly for debugging. *) -- List.push_back_list body [ -- Comment generated_by; -- e "program" [] [PCData "virt-v2v-inspector"]; -- e "package" [] [PCData Config.package_name]; -- e "version" [] [PCData Config.package_version]; -- ]; -- -- (* The disks. *) -- let disks = ref [] in -- -- List.iter ( -- fun (i, virtual_size) -> -- let elems = ref [] in -- List.push_back elems (e "virtual-size" [] -- [PCData (Int64.to_string virtual_size)]); -- (match get_input_disk_allocated v2vdir i with -- | None -> () -- | Some real_size -> -- List.push_back elems (e "allocated" [ "estimated", "true" ] -- [PCData (Int64.to_string real_size)]) -- ); -- -- List.push_back disks (e "disk" [ "index", string_of_int i ] !elems) -- ) (get_disks v2vdir); -- List.push_back body (e "disks" [] !disks); -- -- (* The field is outside the element, -- * since firmware is not part of the OS, and also because this is -- * consistent with virt-drivers output. -- *) -- List.push_back body -- (e "firmware" -- ["type", -- string_of_target_firmware target_meta.target_firmware] -- []); -- -- (* The inspection data. *) -- (* NB: Keep these field names compatible with virt-inspector! *) -- let os = ref [] in -- List.push_back os (e "name" [] [PCData inspect.i_type]); -- List.push_back os (e "distro" [] [PCData inspect.i_distro]); -- List.push_back os (e "osinfo" [] [PCData inspect.i_osinfo]); -- List.push_back os (e "arch" [] [PCData inspect.i_arch]); -- List.push_back os (e "major_version" [] -- [PCData (string_of_int inspect.i_major_version)]); -- List.push_back os (e "minor_version" [] -- [PCData (string_of_int inspect.i_minor_version)]); -- if inspect.i_package_format <> "" then -- List.push_back os (e "package_format" [] -- [PCData inspect.i_package_format]); -- if inspect.i_package_management <> "" then -- List.push_back os (e "package_management" [] -- [PCData inspect.i_package_management]); -- if inspect.i_product_name <> "" then -- List.push_back os (e "product_name" [] [PCData inspect.i_product_name]); -- if inspect.i_product_variant <> "" then -- List.push_back os (e "product_variant" [] -- [PCData inspect.i_product_variant]); -- -- if inspect.i_windows_systemroot <> "" then -- List.push_back os (e "windows_systemroot" [] -- [PCData inspect.i_windows_systemroot]); -- if inspect.i_windows_software_hive <> "" then -- List.push_back os (e "windows_software_hive" [] -- [PCData inspect.i_windows_software_hive]); -- if inspect.i_windows_systemroot <> "" then -- List.push_back os (e "windows_system_hive" [] -- [PCData inspect.i_windows_system_hive]); -- if inspect.i_windows_current_control_set <> "" then -- List.push_back os (e "windows_current_control_set" [] -- [PCData inspect.i_windows_current_control_set]); -- -- List.push_back os (e "root" [] [PCData inspect.i_root]); -- let mps = ref [] in -- List.iter ( -- fun (fs, dev) -> -- List.push_back mps (e "mountpoint" [ "dev", dev ] [PCData fs]) -- ) inspect.i_mountpoints; -- List.push_back os (e "mountpoints" [] !mps); -- -- List.push_back body (e "operatingsystem" [] !os); -- -- (* Construct the final document. *) -- (doc "v2v-inspection" [] !body : DOM.doc) -- - let () = run_main_and_handle_errors main diff --git a/0027-build-Define-MLOBJECT-OCaml-object-file-as-either-cm.patch b/0027-build-Define-MLOBJECT-OCaml-object-file-as-either-cm.patch deleted file mode 100644 index 5fb783a..0000000 --- a/0027-build-Define-MLOBJECT-OCaml-object-file-as-either-cm.patch +++ /dev/null @@ -1,34 +0,0 @@ -From aa556d82d0ab27a552fbf2e884e8ba93cbe6c9dd Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 5 Dec 2024 15:28:38 +0000 -Subject: [PATCH] build: Define MLOBJECT (OCaml object file) as either cmo or - cmx - -This macro expands to either cmo or cmx depending on whether we are -compiling for bytecode or native code. - -This is a natural extension of the existing MLARCHIVE macro. - -(cherry picked from commit 7b43b226eb3af18a5bd58b2664fb064832404a47) -(cherry picked from commit e6f1a170002bff5db70aa8a8b6987ef1122d61e1) ---- - subdir-rules.mk | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/subdir-rules.mk b/subdir-rules.mk -index e969f357..05221b95 100644 ---- a/subdir-rules.mk -+++ b/subdir-rules.mk -@@ -47,10 +47,12 @@ $(top_builddir)/generator/generator: - - if !HAVE_OCAMLOPT - MLARCHIVE = cma -+MLOBJECT = cmo - LINK_CUSTOM_OCAMLC_ONLY = -output-complete-exe - BEST = c - else - MLARCHIVE = cmxa -+MLOBJECT = cmx - BEST = opt - endif - diff --git a/0028-in-place-Add-new-O-option-to-write-inspector-XML.patch b/0028-in-place-Add-new-O-option-to-write-inspector-XML.patch deleted file mode 100644 index 55a48f7..0000000 --- a/0028-in-place-Add-new-O-option-to-write-inspector-XML.patch +++ /dev/null @@ -1,285 +0,0 @@ -From 286cb463a01696250ede820971b34f9ad8717517 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 5 Dec 2024 13:36:29 +0000 -Subject: [PATCH] in-place: Add new -O option to write inspector XML - -When using virt-v2v-in-place there is no easy way to get the -post-conversion metadata, such as the operating system and firmware -that virt-v2v detected inside the guest. - -This commit adds new, optional '-O output.xml' to write this -information out to a file. The format is identical to -virt-v2v-inspector (and roughly a superset of virt-inspector). - -Fixes: https://issues.redhat.com/browse/RHEL-58032 -Thanks: Martin Necas -(cherry picked from commit 2f0958e5ac5c3442c2771518c5b73d6ebcd5bd4a) -(cherry picked from commit 3dc5eb5c76fd6be2108c5b3907d9d31bbacd00a5) ---- - docs/virt-v2v-in-place.pod | 18 +++++++++ - in-place/Makefile.am | 2 + - in-place/in_place.ml | 39 +++++++++++++----- - tests/Makefile.am | 2 + - tests/test-in-place-xml.sh | 81 ++++++++++++++++++++++++++++++++++++++ - 5 files changed, 132 insertions(+), 10 deletions(-) - create mode 100755 tests/test-in-place-xml.sh - -diff --git a/docs/virt-v2v-in-place.pod b/docs/virt-v2v-in-place.pod -index 4057dae5..34e99cf0 100644 ---- a/docs/virt-v2v-in-place.pod -+++ b/docs/virt-v2v-in-place.pod -@@ -7,10 +7,12 @@ virt-v2v-in-place - Convert a guest to use KVM in-place - virt-v2v-in-place -i disk [other -i* options] - [virt-customize options] - filename -+ [-O output.xml] - - virt-v2v-in-place -i libvirt|libvirtxml [other -i* options] - [virt-customize options] - guest -+ [-O output.xml] - - =head1 DESCRIPTION - -@@ -35,6 +37,14 @@ If the guest has been copied to local libvirt then: - - virt-v2v-in-place -i libvirt guest - -+=head2 Output XML -+ -+Optionally use the I<-O> option to write post-conversion metadata -+about the guest to an XML file. This is in the same format as -+L. This can be used, for example, to find out -+what operating system and firmware was found inside the guest during -+conversion. -+ - =head2 Exit code - - If virt-v2v-in-place fails it will return a non-zero (error) exit -@@ -205,6 +215,14 @@ are mapped to C. - - See L. - -+=item B<-O> output.xml -+ -+=item B<-O -> -+ -+If this option is present, write post-conversion metadata about the -+guest to the named XML file, or to stdout if I<-O -> is used. This is -+in the same format as L. -+ - =item B<--print-source> - - Print information about the source guest and stop. This option is -diff --git a/in-place/Makefile.am b/in-place/Makefile.am -index 2fecb3a7..89e3f5f3 100644 ---- a/in-place/Makefile.am -+++ b/in-place/Makefile.am -@@ -57,6 +57,7 @@ OCAMLPACKAGES = \ - -I $(top_builddir)/lib \ - -I $(top_builddir)/input \ - -I $(top_builddir)/convert \ -+ -I $(top_builddir)/inspector \ - -I $(top_builddir)/common/mlstdutils \ - -I $(top_builddir)/common/mlutils \ - -I $(top_builddir)/common/mlgettext \ -@@ -103,6 +104,7 @@ OCAMLLINKFLAGS = \ - mlv2vlib.$(MLARCHIVE) \ - mlconvert.$(MLARCHIVE) \ - mlinput.$(MLARCHIVE) \ -+ create_inspector_xml.$(MLOBJECT) \ - $(LINK_CUSTOM_OCAMLC_ONLY) - - virt_v2v_in_place_DEPENDENCIES = \ -diff --git a/in-place/in_place.ml b/in-place/in_place.ml -index 42075139..c77533e7 100644 ---- a/in-place/in_place.ml -+++ b/in-place/in_place.ml -@@ -28,6 +28,12 @@ open Getopt.OptionName - open Types - open Utils - -+open Create_inspector_xml -+ -+type output_xml_option = -+ | No_output_xml | Output_xml_to_stdout -+ | Output_xml_to_file of string -+ - (* Matches --mac command line parameters. *) - let mac_re = PCRE.compile "^([[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}):(network|bridge|ip):(.*)$" - let mac_ip_re = PCRE.compile "^([[:xdigit:]]|:|\\.)+$" -@@ -61,6 +67,13 @@ let rec main () = - in - - let network_map = Networks.create () in -+ -+ let output_xml = ref No_output_xml in -+ let set_output_xml_option filename = -+ if filename = "-" then output_xml := Output_xml_to_stdout -+ else output_xml := Output_xml_to_file filename -+ in -+ - let static_ips = ref [] in - let rec add_network str = - match String.split ":" str with -@@ -172,6 +185,8 @@ let rec main () = - s_"Map NIC to network or bridge or assign static IP"; - [ S 'n'; L"network" ], Getopt.String ("in:out", add_network), - s_"Map network ‘in’ to ‘out’"; -+ [ S 'O' ], Getopt.String ("output.xml", set_output_xml_option), -+ s_"Set the output filename"; - [ L"print-source" ], Getopt.Set print_source, - s_"Print source and stop"; - [ L"root" ], Getopt.String ("ask|... ", set_root_choice), -@@ -228,6 +243,7 @@ read the man page virt-v2v-in-place(1). - let customize_ops = get_customize_ops () in - let input_conn = !input_conn in - let input_mode = !input_mode in -+ let output_xml = !output_xml in - let print_source = !print_source in - let root_choice = !root_choice in - let static_ips = !static_ips in -@@ -246,6 +262,7 @@ read the man page virt-v2v-in-place(1). - pr "mac-option\n"; - pr "mac-ip-option\n"; - pr "customize-ops\n"; -+ pr "output-xml-option\n"; - pr "input:disk\n"; - pr "input:libvirt\n"; - pr "input:libvirtxml\n"; -@@ -348,16 +365,18 @@ read the man page virt-v2v-in-place(1). - ignore (Sys.command cmd) - ); - -- (* XXX Should we create target metadata and if so where? -- * -- * If the input mode is libvirt, there is an argument for -- * updating the libvirt XML of the guest. If the input -- * mode is disk, maybe we should write .xml. -- * -- * For the moment we just ignore the output from the -- * conversion step. -- *) -- ignore (inspect, target_meta); -+ (* Write the post-conversion metadata, if asked. *) -+ let chan = -+ match output_xml with -+ | No_output_xml -> None -+ | Output_xml_to_stdout -> Some Stdlib.stdout -+ | Output_xml_to_file filename -> Some (open_out filename) in -+ Option.iter ( -+ fun chan -> -+ let doc = create_inspector_xml v2vdir inspect target_meta in -+ DOM.doc_to_chan chan doc; -+ Stdlib.flush chan -+ ) chan; - - message (f_"Finishing off"); - (* As the last thing, write a file indicating success before -diff --git a/tests/Makefile.am b/tests/Makefile.am -index fac18bbe..209034b8 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -82,6 +82,7 @@ TESTS = \ - test-i-ova.sh \ - test-i-vmx.sh \ - test-in-place.sh \ -+ test-in-place-xml.sh \ - test-inspector.sh \ - test-it-vddk-io-query.sh \ - test-mac.sh \ -@@ -240,6 +241,7 @@ EXTRA_DIST += \ - test-i-vmx-7.vmx \ - test-i-vmx.sh \ - test-in-place.sh \ -+ test-in-place-xml.sh \ - test-inspector.sh \ - test-it-vddk-io-query.sh \ - test-mac-expected.xml \ -diff --git a/tests/test-in-place-xml.sh b/tests/test-in-place-xml.sh -new file mode 100755 -index 00000000..e9580006 ---- /dev/null -+++ b/tests/test-in-place-xml.sh -@@ -0,0 +1,81 @@ -+#!/bin/bash - -+# libguestfs virt-v2v test script -+# Copyright (C) 2014-2024 Red Hat Inc. -+# Copyright (C) 2015 Parallels IP Holdings GmbH. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ -+# Test virt-v2v-in-place -O option. -+ -+unset CDPATH -+export LANG=C -+set -e -+ -+source ./functions.sh -+set -e -+set -x -+ -+skip_if_skipped -+requires test -f ../test-data/phony-guests/windows.img -+ -+img_base="$abs_top_builddir/test-data/phony-guests/windows.img" -+ -+export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" -+export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win" -+ -+d=$PWD/test-v2v-in-place-xml.d -+rm -rf $d -+cleanup_fn rm -r $d -+mkdir $d -+ -+img="$d/test.qcow2" -+qemu-img convert -f raw $img_base -O qcow2 $img -+ -+out="$d/out.xml" -+ -+libvirt_xml="$d/test.xml" -+rm -f $libvirt_xml -+n=windows -+cat > $libvirt_xml < -+ -+ $n -+ 1048576 -+ -+ hvm -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+EOF -+ -+$VG virt-v2v-in-place --debug-gc -i libvirt -ic "test://$libvirt_xml" \ -+ $n -O $out -+cat $out -+ -+# Expect certain elements to be present. -+grep '^virt-v2v-inspector' $out -+grep '' $out -+grep "" $out -+grep 'windows' $out -+grep 'win2k22' $out diff --git a/0029-convert-Mention-operating-system-in-error-message.patch b/0029-convert-Mention-operating-system-in-error-message.patch deleted file mode 100644 index 9bae102..0000000 --- a/0029-convert-Mention-operating-system-in-error-message.patch +++ /dev/null @@ -1,49 +0,0 @@ -From c79bcda0c1a62a8b1000166126c37b0be08ff65c Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 2 Jan 2025 11:11:46 +0000 -Subject: [PATCH] convert: Mention "operating system" in error message - -A member of Red Hat's support team mentioned that the error "source -guest" is confusing. Since this refers to the operating system inside -the source guest, say that. - -(cherry picked from commit f58b02a64f4238d7e2ddec45082a6f9b2c98a0c8) ---- - convert/inspect_source.ml | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) - -diff --git a/convert/inspect_source.ml b/convert/inspect_source.ml -index 78447193..218e517a 100644 ---- a/convert/inspect_source.ml -+++ b/convert/inspect_source.ml -@@ -141,11 +141,11 @@ let rec inspect_source root_choice g = - and choose_root root_choice g = function - | [] -> - error (f_"inspection could not detect the source guest \ -- (or physical machine).\n\nAssuming that you are \ -- running virt-v2v/virt-p2v on a source which is \ -- supported (and not, for example, a blank disk), \ -- then this should not happen.\n\nNo root device \ -- found in this operating system image."); -+ (or physical machine) operating system.\n\n\ -+ Assuming that you are running virt-v2v/virt-p2v \ -+ on a source which is supported (and not, for example, \ -+ a blank disk), then this should not happen.\n\n\ -+ No root device found in this operating system image."); - | [root] -> root (* only one root, so return it *) - | roots -> - (* If there are multiple roots, use the [--root] option supplied -@@ -254,8 +254,9 @@ and sanity_check_inspection inspect = - and error_if_unknown fieldname value = - if value = "unknown" then - error (f_"inspection could not detect the source guest (or \ -- physical machine).\n\nAssuming that you are running \ -- virt-v2v/virt-p2v on a source which is supported (and \ -- not, for example, a blank disk), then this should not \ -- happen.\n\nInspection field ‘%s’ was ‘unknown’.") -+ physical machine) operating system.\n\n\ -+ Assuming that you are running virt-v2v/virt-p2v \ -+ on a source which is supported (and not, for example, \ -+ a blank disk), then this should not happen.\n\n\ -+ Inspection field ‘%s’ was ‘unknown’.") - fieldname diff --git a/0030-Update-common-submodule.patch b/0030-Update-common-submodule.patch deleted file mode 100644 index 46d2ea1..0000000 --- a/0030-Update-common-submodule.patch +++ /dev/null @@ -1,189 +0,0 @@ -From 1fb4afcd0573875e04913fdd85f6da76d574439a Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sun, 9 Feb 2025 17:35:14 +0000 -Subject: [PATCH] Update common submodule - -Pulls in the following fix: - - commit 38315604596ac747e44e38db79496610efee49f8 - Author: Richard W.M. Jones - Date: Thu Feb 6 08:04:38 2025 +0000 - - mldrivers/linux_bootloaders.ml: Don't overwrite EFI grub2 wrapper - - Fedora 34+ and RHEL 9.0+ unified BIOS and UEFI grub configuration into - a single file. This leaves /boot/efi/EFI//grub.cfg as a so-called - "wrapper" which just loads the real grub2 configuration at - /boot/grub2/grub.cfg. - - Running '/sbin/grub2-mkconfig -o /boot/efi/EFI//grub.cfg' - overwrites the wrapper instead of the real configuration file. - - RHEL 9.5 added a hard error if you try to do this, which broke - virt-v2v. The error message was: - - commandrvf: /sbin/grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg - Running `grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg' will - overwrite the GRUB wrapper. Please run `grub2-mkconfig -o - /boot/grub2/grub.cfg' instead to update grub.cfg. - - Try to detect this situation and substitute the real grub - configuration file instead. - - Reported-by: Robert Knipp, Fabian Deutsch - Thanks: Nijin Ashok, Marta Lewandowska - Fixes: https://issues.redhat.com/browse/RHEL-77989 - Related: https://issues.redhat.com/browse/RHEL-32099 - Related: https://fedoraproject.org/wiki/Changes/UnifyGrubConfig - -Fixes: https://issues.redhat.com/browse/RHEL-77989 -Related: https://issues.redhat.com/browse/RHEL-32099 -(cherry picked from commit 17610d1c9b37424fec55c39fbf83c971a843f45f) ---- - common | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Submodule common faee2645..2bb8c83c: -diff --git a/common/mldrivers/linux_bootloaders.ml b/common/mldrivers/linux_bootloaders.ml -index 91c5ab9e..a821a3f3 100644 ---- a/common/mldrivers/linux_bootloaders.ml -+++ b/common/mldrivers/linux_bootloaders.ml -@@ -375,8 +375,7 @@ let detect_bootloader (g : G.guestfs) root i_firmware = - with G.Error msg -> - error (f_"could not find bootloader mount point (%s): %s") mp msg in - -- (* -- * Workaround for older UEFI-based Debian which may not have -+ (* Workaround for older UEFI-based Debian which may not have - * /boot/efi/EFI/debian/grub.cfg. - *) - let paths = -@@ -410,6 +409,28 @@ let detect_bootloader (g : G.guestfs) root i_firmware = - in - loop paths in - -+ (* If we found a grub2 boot config called /boot/efi/EFI//grub.cfg -+ * check if it's a "wrapper" that redirects to /boot/grub2/grub.cfg. -+ * This is needed for Fedora 34+ and RHEL 9.0+. See: -+ * https://issues.redhat.com/browse/RHEL-32099 -+ * https://issues.redhat.com/browse/RHEL-77989 -+ * https://github.com/libguestfs/libguestfs-common/pull/6 -+ *) -+ let grub_config = -+ match typ with -+ | Grub1 -> grub_config -+ | Grub2 -> -+ let grub2_efi_rex = PCRE.compile "^/boot/efi/EFI/.*/grub.cfg$" in -+ let grub2_real = "/boot/grub2/grub.cfg" in -+ -+ if PCRE.matches grub2_efi_rex grub_config && -+ (* does it look like the "wrapper"? *) -+ g#grep "configfile \\$prefix/grub\\.cfg" grub_config <> [||] && -+ g#exists grub2_real then -+ grub2_real -+ else -+ grub_config in -+ - let bl = - match typ with - | Grub1 -> new bootloader_grub1 g root grub_config -diff --git a/common/mlpcre/pcre-c.c b/common/mlpcre/pcre-c.c -index ad9c6d11..3959fd56 100644 ---- a/common/mlpcre/pcre-c.c -+++ b/common/mlpcre/pcre-c.c -@@ -39,19 +39,6 @@ - - #pragma GCC diagnostic ignored "-Wmissing-prototypes" - --/* Replacement if caml_alloc_initialized_string is missing, added -- * to OCaml runtime in 2017. -- */ --#ifndef HAVE_CAML_ALLOC_INITIALIZED_STRING --static inline value --caml_alloc_initialized_string (mlsize_t len, const char *p) --{ -- value sv = caml_alloc_string (len); -- memcpy ((char *) String_val (sv), p, len); -- return sv; --} --#endif -- - /* Data on the most recent match is stored in this thread-local - * variable. It is freed either by the next call to PCRE.matches or - * by (clean) thread exit. -diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml -index 86b21a7c..5be358de 100644 ---- a/common/mlstdutils/std_utils.ml -+++ b/common/mlstdutils/std_utils.ml -@@ -392,21 +392,6 @@ module List = struct - let push_front_list xs xsp = xsp := xs @ !xsp - end - --module Option = struct -- let iter f = function -- | None -> () -- | Some x -> f x -- -- let map f = function -- | None -> None -- | Some x -> Some (f x) -- -- let value x ~default = -- match x with -- | None -> default -- | Some x -> x --end -- - let (//) = Filename.concat - let quote = Filename.quote - -diff --git a/common/mlstdutils/std_utils.mli b/common/mlstdutils/std_utils.mli -index a39ac5f3..c320b877 100644 ---- a/common/mlstdutils/std_utils.mli -+++ b/common/mlstdutils/std_utils.mli -@@ -290,21 +290,6 @@ module List : sig - end - (** Override the List module from stdlib. *) - --module Option : sig -- val iter : ('a -> unit) -> 'a option -> unit -- (** [iter f o] is [f v] if [o] is [Some v] and [()] otherwise *) -- -- val map : ('a -> 'b) -> 'a option -> 'b option -- (** [map f (Some x)] returns [Some (f x)]. [map f None] returns [None]. *) -- -- val value : 'a option -> default:'a -> 'a -- (** [value o ~default] is [v] if [o] is [Some v] and [default] otherwise. *) --end --(** Functions for dealing with option types. -- -- This module will be removed when we can use baseline OCaml 4.08 -- since that version introduces a compatible [Option] module. *) -- - val ( // ) : string -> string -> string - (** Concatenate directory and filename. *) - -diff --git a/common/mlxml/xml-c.c b/common/mlxml/xml-c.c -index e024bd8a..9259314f 100644 ---- a/common/mlxml/xml-c.c -+++ b/common/mlxml/xml-c.c -@@ -41,19 +41,6 @@ - - #pragma GCC diagnostic ignored "-Wmissing-prototypes" - --/* Replacement if caml_alloc_initialized_string is missing, added -- * to OCaml runtime in 2017. -- */ --#ifndef HAVE_CAML_ALLOC_INITIALIZED_STRING --static inline value --caml_alloc_initialized_string (mlsize_t len, const char *p) --{ -- value sv = caml_alloc_string (len); -- memcpy ((char *) String_val (sv), p, len); -- return sv; --} --#endif -- - /* xmlDocPtr type */ - #define docptr_val(v) (*((xmlDocPtr *)Data_custom_val(v))) - diff --git a/0031-convert-Use-yum-apt-.-for-package-removals-not-rpm-d.patch b/0031-convert-Use-yum-apt-.-for-package-removals-not-rpm-d.patch deleted file mode 100644 index 527966d..0000000 --- a/0031-convert-Use-yum-apt-.-for-package-removals-not-rpm-d.patch +++ /dev/null @@ -1,86 +0,0 @@ -From bbce081a6d6ad76b95a768ef04c62db29fe482de Mon Sep 17 00:00:00 2001 -From: Cole Robinson -Date: Mon, 10 Feb 2025 10:53:00 -0500 -Subject: [PATCH] convert: Use yum/apt/... for package removals, not rpm/dpkg - -Current package removal implementation uses `rpm -e`, which will -fail if anything depends on the package we are trying to remove. -Like when `spausedd` is dependent on `open-vm-tools`. - -Reuse the package uninstall logic from virt-customize, which -will handle this no problem. - -Just print a warning when package removal goes sideways. - -Fixes: https://issues.redhat.com/browse/RHEL-71522 -Signed-off-by: Cole Robinson -(cherry picked from commit b3268a13beca4da218e7ffe4648a18420296103a) ---- - convert/convert_linux.ml | 26 +++++++++++++++++++++----- - 1 file changed, 21 insertions(+), 5 deletions(-) - -diff --git a/convert/convert_linux.ml b/convert/convert_linux.ml -index 3d0e2b88..cbae5e3d 100644 ---- a/convert/convert_linux.ml -+++ b/convert/convert_linux.ml -@@ -131,6 +131,23 @@ let convert (g : G.guestfs) source inspect i_firmware _ keep_serial_console _ = - (*----------------------------------------------------------------------*) - (* Conversion step. *) - -+ let uninstall_packages pkgs = -+ if pkgs <> [] then ( -+ let cmd = -+ try Guest_packages.uninstall_command pkgs inspect.i_package_management -+ with -+ | Guest_packages.Unknown_package_manager msg -+ | Guest_packages.Unimplemented_package_manager msg -> -+ error "%s" msg -+ in -+ (try ignore (g#sh cmd) -+ with G.Error msg -> -+ warning (f_"could not uninstall packages ‘%s’: %s (ignored)") -+ (String.concat " " pkgs) msg -+ ) -+ ) -+ in -+ - let rec do_convert () = - augeas_grub_configuration (); - -@@ -237,7 +254,7 @@ let convert (g : G.guestfs) source inspect i_firmware _ keep_serial_console _ = - else - None - ) inspect.i_apps in -- Linux.remove g inspect.i_root xenmods; -+ uninstall_packages xenmods; - - (* Undo related nastiness if kmod-xenpv was installed. *) - if xenmods <> [] then ( -@@ -310,7 +327,7 @@ let convert (g : G.guestfs) source inspect i_firmware _ keep_serial_console _ = - fun { G.app2_name = name } -> name = package_name - ) inspect.i_apps in - if has_guest_additions then -- Linux.remove g inspect.i_root [package_name]; -+ uninstall_packages [package_name]; - - (* Guest Additions might have been installed from a tarball. The - * above code won't detect this case. Look for the uninstall tool -@@ -455,8 +472,7 @@ let convert (g : G.guestfs) source inspect i_firmware _ keep_serial_console _ = - ) - ); - -- let remove = !remove in -- Linux.remove g inspect.i_root remove; -+ uninstall_packages !remove; - - (* VMware Tools may have been installed from a tarball, so the - * above code won't remove it. Look for the uninstall tool and run -@@ -503,7 +519,7 @@ let convert (g : G.guestfs) source inspect i_firmware _ keep_serial_console _ = - let pkgs = List.map (fun { G.app2_name = name } -> name) pkgs in - - if pkgs <> [] then ( -- Linux.remove g inspect.i_root pkgs; -+ uninstall_packages pkgs; - - (* Installing these guest utilities automatically unconfigures - * ttys in /etc/inittab if the system uses it. We need to put diff --git a/copy-patches.sh b/copy-patches.sh index b811085..6fb8369 100755 --- a/copy-patches.sh +++ b/copy-patches.sh @@ -7,7 +7,7 @@ set -e # ./copy-patches.sh project=virt-v2v -rhel_version=10.0 +rhel_version=10.1 # Check we're in the right directory. if [ ! -f $project.spec ]; then diff --git a/sources b/sources index 09dd863..05e0263 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.1.tar.gz) = 11f5528a48208050fda9c64c8aa6dcfd28352e26c96f15059ef66230577e87cae79286dbe035ee5fdf3c43398cba1f94569e11ff3871b26f21e7a6265a4bfa6d -SHA512 (virt-v2v-2.7.1.tar.gz.sig) = a73bce78f116f68565e1288c130c0ea4adc4e1d87174f72fc9aeff747c541afd16404d59d12d0431d50b83a9d0dbe5ff12dddbfed97d2e1d431212a895078cad +SHA512 (virt-v2v-2.7.10.tar.gz) = dc45a1af2ee19f8952d84e3d4da95993c6cfe45e488df4160e87bae702ef970a0d752a85cdd90a9c6a0a350708f3f16f2658eacb9820810a14da989d4b773926 +SHA512 (virt-v2v-2.7.10.tar.gz.sig) = 4b3defa5619d8a212a5c0f62a41f2a88256acb115721b36b576ff24d9503c522a7f3bcaa34c16505bda7e1a42959cd40dcc0fb05ee43364647487f629d636e13 diff --git a/virt-v2v.spec b/virt-v2v.spec index f2c1512..7a8a50b 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,8 +6,8 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.1 -Release: 4%{?dist} +Version: 2.7.10 +Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -24,40 +24,24 @@ Source2: libguestfs.keyring Source3: copy-patches.sh # Patches are maintained in the following repository: -# https://github.com/libguestfs/virt-v2v/commits/rhel-10.0 +# https://github.com/libguestfs/virt-v2v/commits/rhel-10.1 # Patches. -Patch0001: 0001-lib-OVF-Add-preliminary-support-for-Windows-Server-2.patch -Patch0002: 0002-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch -Patch0003: 0003-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch -Patch0004: 0004-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch -Patch0005: 0005-RHEL-Fixes-for-libguestfs-winsupport.patch -Patch0006: 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch -Patch0007: 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch -Patch0008: 0008-RHEL-Remove-input-from-Xen.patch -Patch0009: 0009-RHEL-Remove-o-glance.patch -Patch0010: 0010-RHEL-Remove-the-in-place-option.patch -Patch0011: 0011-RHEL-tests-Remove-btrfs-test.patch -Patch0012: 0012-RHEL-Remove-block-driver-option.patch -Patch0013: 0013-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch -Patch0014: 0014-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch -Patch0015: 0015-in-place-Add-a-warning-about-checking-the-exit-code.patch -Patch0016: 0016-i-libvirt-Trim-whitespace-around-name.patch -Patch0017: 0017-o-qemu-Replace-hard-coded-UEFI-paths.patch -Patch0018: 0018-o-qemu-Add-set-e-x-at-the-top-of-the-output-script.patch -Patch0019: 0019-v2v-Implement-parallel-N-for-parallel-disk-copies.patch -Patch0020: 0020-tests-Rename-all-test-v2v-to-test.patch -Patch0021: 0021-tests-Sort-the-tests-into-alphabetical-order.patch -Patch0022: 0022-docs-Embolden-whole-O.patch -Patch0023: 0023-in-place-Fix-name-of-program-in-the-help-output.patch -Patch0024: 0024-inspector-Reorder-O-option-in-alphabetical-order.patch -Patch0025: 0025-v2v-Ensure-parallel-1.patch -Patch0026: 0026-inspector-Move-the-code-that-creates-XML-output-to-a.patch -Patch0027: 0027-build-Define-MLOBJECT-OCaml-object-file-as-either-cm.patch -Patch0028: 0028-in-place-Add-new-O-option-to-write-inspector-XML.patch -Patch0029: 0029-convert-Mention-operating-system-in-error-message.patch -Patch0030: 0030-Update-common-submodule.patch -Patch0031: 0031-convert-Use-yum-apt-.-for-package-removals-not-rpm-d.patch +Patch0001: 0001-v2v-v2v_unit_tests.ml-Remove-use-of-oUnit.patch +Patch0002: 0002-build-Remove-use-of-oUnit.patch +Patch0003: 0003-v2v-Use-nbdcopy-blkhash-in-verbose-mode.patch +Patch0004: 0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +Patch0005: 0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +Patch0006: 0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +Patch0007: 0007-RHEL-Fixes-for-libguestfs-winsupport.patch +Patch0008: 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +Patch0009: 0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +Patch0010: 0010-RHEL-Remove-input-from-Xen.patch +Patch0011: 0011-RHEL-Remove-o-glance.patch +Patch0012: 0012-RHEL-tests-Remove-btrfs-test.patch +Patch0013: 0013-RHEL-Remove-block-driver-option.patch +Patch0014: 0014-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch +Patch0015: 0015-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no @@ -80,7 +64,7 @@ BuildRequires: autoconf, automake, libtool BuildRequires: make BuildRequires: /usr/bin/pod2man BuildRequires: gcc -BuildRequires: ocaml >= 4.04 +BuildRequires: ocaml >= 4.08 BuildRequires: libguestfs-devel >= 1:1.49.8-1 BuildRequires: augeas-devel @@ -92,6 +76,7 @@ BuildRequires: libnbd-devel BuildRequires: libosinfo-devel BuildRequires: libvirt-daemon-kvm BuildRequires: libvirt-devel +BuildRequires: libxcrypt-devel BuildRequires: libxml2-devel BuildRequires: pcre2-devel BuildRequires: perl(Sys::Guestfs) @@ -105,9 +90,6 @@ BuildRequires: ocaml-libvirt-devel BuildRequires: ocaml-libnbd-devel BuildRequires: ocaml-fileutils-devel BuildRequires: ocaml-gettext-devel -%if !0%{?rhel} -BuildRequires: ocaml-ounit-devel -%endif # These are for running our limited test. BuildRequires: glibc-utils @@ -157,11 +139,13 @@ Requires: edk2-aarch64 %endif %if !0%{?rhel} -Requires: python3 -%elif %{?rhel} == 9 +Requires: /usr/bin/python3 +%else +%if 0%{?rhel} == 9 Requires: platform-python # Python is not needed by RHEL 10. %endif +%endif Requires: libnbd >= 1.10 Requires: %{_bindir}/qemu-nbd Requires: %{_bindir}/nbdcopy @@ -343,6 +327,14 @@ done %changelog +* Mon Mar 31 2025 Richard W.M. Jones - 1:2.7.10-1 +- Rebase to virt-v2v 2.7.10 + related: RHEL-81735 +- Fix virt-v2v -v --install dnf5 error + resolves: RHEL-83288 +- Print blkhash of converted image in virt-v2v debugging output + resolves: RHEL-85514 + * Tue Feb 11 2025 Richard W.M. Jones - 1:2.7.1-4 - Rebase to virt-v2v 2.7.1 resolves: RHEL-56814