From 853e6d8f47f13be24a34a4ad11fe7ded1df5a1bc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 15 Apr 2025 17:06:32 +0100 Subject: [PATCH] Rebase to virt-v2v 2.7.12 related: RHEL-81735 Document dracut network-legacy conversion failure related: RHEL-55732 --- ...correct-qemu-binary-for-o-qemu-mode-.patch | 2 +- ...2v_unit_tests.ml-Remove-use-of-oUnit.patch | 119 -- ...-the-qemu-boot-oo-qemu-boot-option-R.patch | 16 +- 0002-build-Remove-use-of-oUnit.patch | 1415 ----------------- ...-supported-sound-cards-to-match-RHEL.patch | 2 +- ...-Use-nbdcopy-blkhash-in-verbose-mode.patch | 77 - ...RHEL-Fixes-for-libguestfs-winsupport.patch | 10 +- ...sk-force-VNC-as-display-RHBZ-1372671.patch | 2 +- ...-for-supported-v2v-hypervisors-guest.patch | 2 +- ...h => 0007-RHEL-Remove-input-from-Xen.patch | 30 +- ...e.patch => 0008-RHEL-Remove-o-glance.patch | 22 +- ...=> 0009-RHEL-tests-Remove-btrfs-test.patch | 4 +- ...0010-RHEL-Remove-block-driver-option.patch | 26 +- ...-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch | 48 +- ...-about-virt-v2v-in-place-not-being-s.patch | 8 +- sources | 4 +- virt-v2v.spec | 35 +- 17 files changed, 105 insertions(+), 1717 deletions(-) rename 0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch => 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch (94%) delete mode 100644 0001-v2v-v2v_unit_tests.ml-Remove-use-of-oUnit.patch rename 0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch => 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch (89%) delete mode 100644 0002-build-Remove-use-of-oUnit.patch rename 0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch => 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch (92%) delete mode 100644 0003-v2v-Use-nbdcopy-blkhash-in-verbose-mode.patch rename 0007-RHEL-Fixes-for-libguestfs-winsupport.patch => 0004-RHEL-Fixes-for-libguestfs-winsupport.patch (95%) rename 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch => 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch (93%) rename 0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch => 0006-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch (97%) rename 0010-RHEL-Remove-input-from-Xen.patch => 0007-RHEL-Remove-input-from-Xen.patch (96%) rename 0011-RHEL-Remove-o-glance.patch => 0008-RHEL-Remove-o-glance.patch (92%) rename 0012-RHEL-tests-Remove-btrfs-test.patch => 0009-RHEL-tests-Remove-btrfs-test.patch (86%) rename 0013-RHEL-Remove-block-driver-option.patch => 0010-RHEL-Remove-block-driver-option.patch (89%) rename 0014-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch => 0011-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch (99%) rename 0015-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch => 0012-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch (88%) diff --git a/0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch similarity index 94% rename from 0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch rename to 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch index 5e3292d..35306ce 100644 --- a/0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +++ b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -1,4 +1,4 @@ -From 7236e9f76c1c0e41d1e95971adc638e39887dea8 Mon Sep 17 00:00:00 2001 +From 6db9961b52eee526f5a685c78d48e64e5ef429db 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 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 deleted file mode 100644 index 9608039..0000000 --- a/0001-v2v-v2v_unit_tests.ml-Remove-use-of-oUnit.patch +++ /dev/null @@ -1,119 +0,0 @@ -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/0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch b/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch similarity index 89% rename from 0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch rename to 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch index 1db34cd..742423d 100644 --- a/0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +++ b/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch @@ -1,4 +1,4 @@ -From dabda2010e51d05ccab05d29e5977c58908b5440 Mon Sep 17 00:00:00 2001 +From f6ee4c28511072d5091048b482c7a1fb6751bc48 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 @@ -44,10 +44,10 @@ index 5a342434..bdf12c5d 100644 =item B<-o null> diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 084f29e7..97d9397f 100644 +index dfeefed5..d4b87e7f 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 +@@ -159,11 +159,6 @@ Since F contains the path(s) to the guest disk image(s) you do not need to specify the name of the disk image on the command line. @@ -59,7 +59,7 @@ index 084f29e7..97d9397f 100644 =head1 OPTIONS =over 4 -@@ -533,9 +528,6 @@ This is similar to I<-o local>, except that a shell script is written +@@ -535,9 +530,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>. @@ -69,7 +69,7 @@ index 084f29e7..97d9397f 100644 =item B<-o> B This is the same as I<-o rhv>. -@@ -618,11 +610,6 @@ For I<-o openstack> (L) only, set a guest ID +@@ -620,11 +612,6 @@ For I<-o openstack> (L) only, set a guest ID which is saved on each Cinder volume in the C volume property. @@ -81,7 +81,7 @@ index 084f29e7..97d9397f 100644 =item B<-oo verify-server-certificate> =item B<-oo verify-server-certificate=>C -@@ -806,10 +793,6 @@ Print information about the source guest and stop. This option is +@@ -808,10 +795,6 @@ Print information about the source guest and stop. This option is useful when you are setting up network and bridge maps. See L. @@ -107,10 +107,10 @@ index 39778724..416000cd 100644 let output_storage = match options.output_storage with diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index 1fcf8e61..77a37eca 100644 +index d0a5432f..70f506cd 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml -@@ -280,8 +280,6 @@ let rec main () = +@@ -273,8 +273,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"; diff --git a/0002-build-Remove-use-of-oUnit.patch b/0002-build-Remove-use-of-oUnit.patch deleted file mode 100644 index 5d6c643..0000000 --- a/0002-build-Remove-use-of-oUnit.patch +++ /dev/null @@ -1,1415 +0,0 @@ -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/0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch similarity index 92% rename from 0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch rename to 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch index ea0454b..be376c7 100644 --- a/0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +++ b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch @@ -1,4 +1,4 @@ -From 6f02c25c8000ccfa7eb0daa6c886fa6b99c15eef Mon Sep 17 00:00:00 2001 +From 32759b5c09eded1f9203deab4bbdd2e18aff15ec 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 diff --git a/0003-v2v-Use-nbdcopy-blkhash-in-verbose-mode.patch b/0003-v2v-Use-nbdcopy-blkhash-in-verbose-mode.patch deleted file mode 100644 index 01d67b6..0000000 --- a/0003-v2v-Use-nbdcopy-blkhash-in-verbose-mode.patch +++ /dev/null @@ -1,77 +0,0 @@ -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/0007-RHEL-Fixes-for-libguestfs-winsupport.patch b/0004-RHEL-Fixes-for-libguestfs-winsupport.patch similarity index 95% rename from 0007-RHEL-Fixes-for-libguestfs-winsupport.patch rename to 0004-RHEL-Fixes-for-libguestfs-winsupport.patch index 1f11c4f..7733077 100644 --- a/0007-RHEL-Fixes-for-libguestfs-winsupport.patch +++ b/0004-RHEL-Fixes-for-libguestfs-winsupport.patch @@ -1,4 +1,4 @@ -From c30041193a17787a7904b3154213f145cc798a15 Mon Sep 17 00:00:00 2001 +From 6922ab78c58d6c6da604d88f0be482bb0d2e8273 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 @@ -19,7 +19,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=2187961#c1 7 files changed, 40 insertions(+), 5 deletions(-) diff --git a/convert/convert.ml b/convert/convert.ml -index 1deb1478..ed8ad537 100644 +index c05ed61f..676a4f2a 100644 --- a/convert/convert.ml +++ b/convert/convert.ml @@ -53,6 +53,7 @@ let rec convert dir options source = @@ -136,10 +136,10 @@ index bfe04904..eeddcb86 100755 # 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 +index 4e931731..007e6dc9 100755 --- a/tests/test-windows-phony.sh +++ b/tests/test-windows-phony.sh -@@ -69,6 +69,17 @@ mktest () +@@ -71,6 +71,17 @@ mktest () :> "$script" :> "$expected" @@ -157,7 +157,7 @@ index 066ff0ff..3f761b68 100755 firstboot_dir="/Program Files/Guestfs/Firstboot" mktest "is-dir \"$firstboot_dir\"" true mktest "is-file \"$firstboot_dir/firstboot.bat\"" true -@@ -78,5 +89,5 @@ mktest "ls \"$virtio_dir\"" "$(cat test-phony-$guestname-ls.txt)" +@@ -80,5 +91,5 @@ mktest "ls \"$virtio_dir\"" "$(cat test-phony-$guestname-ls.txt)" osinfo_name="${guestname%-32}" mktest "inspect-get-osinfo /dev/sda2" "$osinfo_name" diff --git a/0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch similarity index 93% rename from 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch rename to 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch index 2c8fbf0..6951ad7 100644 --- a/0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +++ b/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch @@ -1,4 +1,4 @@ -From 1fdd651db409b8432a836f4097296d551d22ff07 Mon Sep 17 00:00:00 2001 +From 10b274ecf973868431abe20073684d74934bff4d 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) diff --git a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0006-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch similarity index 97% rename from 0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch rename to 0006-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch index d0aa6df..8610df4 100644 --- a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +++ b/0006-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch @@ -1,4 +1,4 @@ -From aea6d02693e0f3afc36c5052d70e04ff58b95c32 Mon Sep 17 00:00:00 2001 +From 868473dc34a7c9764bd3369cb0c98d6a46c851c4 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 diff --git a/0010-RHEL-Remove-input-from-Xen.patch b/0007-RHEL-Remove-input-from-Xen.patch similarity index 96% rename from 0010-RHEL-Remove-input-from-Xen.patch rename to 0007-RHEL-Remove-input-from-Xen.patch index 7d8bf38..39ff2aa 100644 --- a/0010-RHEL-Remove-input-from-Xen.patch +++ b/0007-RHEL-Remove-input-from-Xen.patch @@ -1,4 +1,4 @@ -From 9657cdcf89cd7ae09fe1890908655fb9e08b64fa Mon Sep 17 00:00:00 2001 +From 3bac67c131798ee43018302260e4e3f28a283d1b 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 @@ -23,7 +23,7 @@ Fixes: https://issues.redhat.com/browse/RHEL-37687 delete mode 100644 input/input_xen_ssh.mli diff --git a/docs/Makefile.am b/docs/Makefile.am -index dc36487c..36a831bf 100644 +index e86ee777..3faa8c7d 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -23,7 +23,6 @@ EXTRA_DIST = \ @@ -34,7 +34,7 @@ index dc36487c..36a831bf 100644 virt-v2v-inspector.pod \ virt-v2v-output-local.pod \ virt-v2v-output-openstack.pod \ -@@ -43,7 +42,6 @@ man_MANS = \ +@@ -44,7 +43,6 @@ man_MANS = \ virt-v2v-hacking.1 \ virt-v2v-in-place.1 \ virt-v2v-input-vmware.1 \ @@ -42,7 +42,7 @@ index dc36487c..36a831bf 100644 virt-v2v-inspector.1 \ virt-v2v-output-local.1 \ virt-v2v-output-openstack.1 \ -@@ -60,7 +58,6 @@ noinst_DATA = \ +@@ -62,7 +60,6 @@ noinst_DATA = \ $(top_builddir)/website/virt-v2v-hacking.1.html \ $(top_builddir)/website/virt-v2v-in-place.1.html \ $(top_builddir)/website/virt-v2v-input-vmware.1.html \ @@ -50,7 +50,7 @@ index dc36487c..36a831bf 100644 $(top_builddir)/website/virt-v2v-inspector.1.html \ $(top_builddir)/website/virt-v2v-output-local.1.html \ $(top_builddir)/website/virt-v2v-output-openstack.1.html \ -@@ -119,17 +116,6 @@ stamp-virt-v2v-input-vmware.pod: virt-v2v-input-vmware.pod +@@ -122,17 +119,6 @@ stamp-virt-v2v-input-vmware.pod: virt-v2v-input-vmware.pod $< touch $@ @@ -229,7 +229,7 @@ index 0417e89f..00000000 - -Copyright (C) 2009-2025 Red Hat Inc. diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 97d9397f..036b72ab 100644 +index d4b87e7f..db28b91f 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -12,7 +12,7 @@ virt-v2v - Convert a guest to use KVM @@ -250,7 +250,7 @@ index 97d9397f..036b72ab 100644 L — Output to local files or local libvirt. L — Output to oVirt or RHV. -@@ -186,10 +184,6 @@ This is only supported for: +@@ -188,10 +186,6 @@ This is only supported for: =item * @@ -261,7 +261,7 @@ index 97d9397f..036b72ab 100644 L when using the SSH transport method -@@ -305,12 +299,10 @@ hypervisor. See L. +@@ -307,12 +301,10 @@ hypervisor. See L. Specify a libvirt connection URI to use when reading the guest. This is only used when S>. @@ -277,7 +277,7 @@ index 97d9397f..036b72ab 100644 =item B<-if> format -@@ -872,38 +864,6 @@ __CUSTOMIZE_OPTIONS__ +@@ -871,38 +863,6 @@ __CUSTOMIZE_OPTIONS__ =head1 NOTES @@ -316,7 +316,7 @@ index 97d9397f..036b72ab 100644 =head2 Enabling virtio "Virtio" is the name for a set of drivers which make disk (block -@@ -1229,7 +1189,7 @@ bandwidth. Virt-v2v should be able to copy guest data at gigabit +@@ -1242,7 +1202,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 @@ -513,10 +513,10 @@ index 339309b8..00000000 - -module XenSSH : Input.INPUT diff --git a/inspector/inspector.ml b/inspector/inspector.ml -index 0a04b312..47d50347 100644 +index d4e07e60..63a6f24f 100644 --- a/inspector/inspector.ml +++ b/inspector/inspector.ml -@@ -296,10 +296,6 @@ read the man page virt-v2v-inspector(1). +@@ -289,10 +289,6 @@ read the man page virt-v2v-inspector(1). | Some server, Some ("esx"|"gsx"|"vpx"), Some `VDDK -> (module Input_vddk.VDDK) @@ -528,10 +528,10 @@ index 0a04b312..47d50347 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 77a37eca..9999b639 100644 +index 70f506cd..edd2ba0f 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml -@@ -404,7 +404,6 @@ read the man page virt-v2v(1). +@@ -397,7 +397,6 @@ read the man page virt-v2v(1). pr "virt-v2v-2.0\n"; pr "libguestfs-rewrite\n"; pr "vcenter-https\n"; @@ -539,7 +539,7 @@ index 77a37eca..9999b639 100644 pr "vddk\n"; pr "colours-option\n"; pr "vdsm-compat-option\n"; -@@ -470,10 +469,6 @@ read the man page virt-v2v(1). +@@ -463,10 +462,6 @@ read the man page virt-v2v(1). | Some server, Some ("esx"|"gsx"|"vpx"), Some `VDDK -> (module Input_vddk.VDDK) diff --git a/0011-RHEL-Remove-o-glance.patch b/0008-RHEL-Remove-o-glance.patch similarity index 92% rename from 0011-RHEL-Remove-o-glance.patch rename to 0008-RHEL-Remove-o-glance.patch index 1881a90..e35a6c0 100644 --- a/0011-RHEL-Remove-o-glance.patch +++ b/0008-RHEL-Remove-o-glance.patch @@ -1,4 +1,4 @@ -From 96eafd9ddef8733602d1c517e0cabe29afb5e414 Mon Sep 17 00:00:00 2001 +From 02e759299c0da04d589f3909b45835d27829d322 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 @@ -98,10 +98,10 @@ index 9bef76ea..04595816 100644 =head1 AUTHOR diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 036b72ab..45ccd4d7 100644 +index db28b91f..040baae2 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod -@@ -438,14 +438,6 @@ See L below. +@@ -440,14 +440,6 @@ See L below. This is the same as I<-o local>. @@ -116,7 +116,7 @@ index 036b72ab..45ccd4d7 100644 =item B<-o> B Set the output method to I. B (or F). @@ -128,7 +128,7 @@ index 036b72ab..45ccd4d7 100644 =item I<-o local> =item I<-o qemu> -@@ -1418,13 +1405,6 @@ See also L. +@@ -1431,13 +1418,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. @@ -167,10 +167,10 @@ index 9e32d2bf..632579ee 100755 set -e set -x diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index 9999b639..c1eb12ab 100644 +index edd2ba0f..08177280 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml -@@ -198,7 +198,6 @@ let rec main () = +@@ -191,7 +191,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 9999b639..c1eb12ab 100644 | "kubevirt" -> output_mode := `Kubevirt | "libvirt" -> output_mode := `Libvirt | "disk" | "local" -> output_mode := `Disk -@@ -258,7 +257,7 @@ let rec main () = +@@ -251,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"; @@ -187,7 +187,7 @@ index 9999b639..c1eb12ab 100644 s_"Set output mode (default: libvirt)"; [ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc), s_"Set output allocation mode"; -@@ -336,8 +335,6 @@ virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp +@@ -329,8 +328,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 9999b639..c1eb12ab 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. -@@ -418,7 +415,6 @@ read the man page virt-v2v(1). +@@ -411,7 +408,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 9999b639..c1eb12ab 100644 pr "output:kubevirt\n"; pr "output:libvirt\n"; pr "output:local\n"; -@@ -511,7 +507,6 @@ read the man page virt-v2v(1). +@@ -504,7 +500,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/0012-RHEL-tests-Remove-btrfs-test.patch b/0009-RHEL-tests-Remove-btrfs-test.patch similarity index 86% rename from 0012-RHEL-tests-Remove-btrfs-test.patch rename to 0009-RHEL-tests-Remove-btrfs-test.patch index f5fef21..67fade3 100644 --- a/0012-RHEL-tests-Remove-btrfs-test.patch +++ b/0009-RHEL-tests-Remove-btrfs-test.patch @@ -1,4 +1,4 @@ -From 0e086ed0e10eee2e51cd7cbb767c9943308c8f27 Mon Sep 17 00:00:00 2001 +From 5b58bee765577287069b3e51fc41079ed980b61c 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 @@ -9,7 +9,7 @@ RHEL does not have btrfs so this test always fails. 1 file changed, 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am -index 51faa63d..d5ce6bd3 100644 +index 07819679..cedd99bc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -64,7 +64,6 @@ TESTS = \ diff --git a/0013-RHEL-Remove-block-driver-option.patch b/0010-RHEL-Remove-block-driver-option.patch similarity index 89% rename from 0013-RHEL-Remove-block-driver-option.patch rename to 0010-RHEL-Remove-block-driver-option.patch index 42b1ef1..398cf0a 100644 --- a/0013-RHEL-Remove-block-driver-option.patch +++ b/0010-RHEL-Remove-block-driver-option.patch @@ -1,4 +1,4 @@ -From 9b6362a804d2e1350b365308edcffbc5def1353d Mon Sep 17 00:00:00 2001 +From 26f191d0762238d0f5b76b5c055cd01d128d0db5 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,7 +16,7 @@ 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 fb3bc9a4..3e73bfc1 100644 +index 6c02a99c..3d0d1b28 100644 --- a/docs/virt-v2v-in-place.pod +++ b/docs/virt-v2v-in-place.pod @@ -72,16 +72,6 @@ Display help. @@ -37,10 +37,10 @@ index fb3bc9a4..3e73bfc1 100644 =item B<--colours> diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 45ccd4d7..661c18e9 100644 +index 040baae2..af19bfb0 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod -@@ -209,16 +209,6 @@ The options are silently ignored for other input methods. +@@ -211,16 +211,6 @@ The options are silently ignored for other input methods. See I<--network> below. @@ -58,7 +58,7 @@ index 45ccd4d7..661c18e9 100644 =item B<--colours> diff --git a/in-place/in_place.ml b/in-place/in_place.ml -index 70af0dfb..caf34a0b 100644 +index 5b00884d..84e783dc 100644 --- a/in-place/in_place.ml +++ b/in-place/in_place.ml @@ -49,7 +49,6 @@ let rec main () = @@ -69,7 +69,7 @@ index 70af0dfb..caf34a0b 100644 let input_conn = ref None in let input_format = ref None in let input_password = ref None in -@@ -172,8 +171,6 @@ let rec main () = +@@ -165,8 +164,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 70af0dfb..caf34a0b 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), -@@ -240,12 +237,6 @@ read the man page virt-v2v-in-place(1). +@@ -233,12 +230,6 @@ read the man page virt-v2v-in-place(1). (* Dereference the arguments. *) let args = List.rev !args in @@ -91,7 +91,7 @@ index 70af0dfb..caf34a0b 100644 let customize_ops = get_customize_ops () in let input_conn = !input_conn in let input_mode = !input_mode in -@@ -333,7 +324,7 @@ read the man page virt-v2v-in-place(1). +@@ -326,7 +317,7 @@ read the man page virt-v2v-in-place(1). (* Get the conversion options. *) let conv_options = { @@ -101,7 +101,7 @@ index 70af0dfb..caf34a0b 100644 ks = opthandle.ks; network_map; diff --git a/tests/Makefile.am b/tests/Makefile.am -index d5ce6bd3..ffcbf722 100644 +index cedd99bc..befa9337 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -57,7 +57,6 @@ TESTS_ENVIRONMENT = $(top_builddir)/run --test @@ -113,7 +113,7 @@ index d5ce6bd3..ffcbf722 100644 test-checksum-bad.sh \ test-checksum-good-qcow2.sh \ diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index c1eb12ab..40782651 100644 +index 08177280..e656afa3 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -48,7 +48,6 @@ let rec main () = @@ -124,7 +124,7 @@ index c1eb12ab..40782651 100644 let input_conn = ref None in let input_format = ref None in let input_password = ref None in -@@ -233,8 +232,6 @@ let rec main () = +@@ -226,8 +225,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 c1eb12ab..40782651 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), -@@ -363,12 +360,6 @@ read the man page virt-v2v(1). +@@ -356,12 +353,6 @@ read the man page virt-v2v(1). (* Dereference the arguments. *) let args = List.rev !args in @@ -146,7 +146,7 @@ index c1eb12ab..40782651 100644 let customize_ops = get_customize_ops () in let input_conn = !input_conn in let input_mode = !input_mode in -@@ -541,7 +532,7 @@ read the man page virt-v2v(1). +@@ -534,7 +525,7 @@ read the man page virt-v2v(1). (* Get the conversion options. *) let conv_options = { diff --git a/0014-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch b/0011-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch similarity index 99% rename from 0014-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch rename to 0011-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch index fc9824f..aa1f30e 100644 --- a/0014-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch +++ b/0011-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch @@ -1,4 +1,4 @@ -From 5c9deb0c0f4dc4c7ed23c094b908f203ff017913 Mon Sep 17 00:00:00 2001 +From 821a2ad91d5ddcefa9b74c87a86ca64b35c65c85 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 @@ -75,7 +75,7 @@ Fixes: https://issues.redhat.com/browse/RHEL-36712 delete mode 100755 tests/test-o-vdsm-options.sh diff --git a/docs/Makefile.am b/docs/Makefile.am -index 36a831bf..d7c2cb85 100644 +index 3faa8c7d..200aa70c 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -26,7 +26,6 @@ EXTRA_DIST = \ @@ -86,7 +86,7 @@ index 36a831bf..d7c2cb85 100644 virt-v2v-release-notes-1.42.pod \ virt-v2v-release-notes-2.0.pod \ virt-v2v-release-notes-2.2.pod \ -@@ -45,7 +44,6 @@ man_MANS = \ +@@ -46,7 +45,6 @@ man_MANS = \ virt-v2v-inspector.1 \ virt-v2v-output-local.1 \ virt-v2v-output-openstack.1 \ @@ -94,7 +94,7 @@ index 36a831bf..d7c2cb85 100644 virt-v2v-release-notes-1.42.1 \ virt-v2v-release-notes-2.0.1 \ virt-v2v-release-notes-2.2.1 \ -@@ -61,7 +59,6 @@ noinst_DATA = \ +@@ -63,7 +61,6 @@ noinst_DATA = \ $(top_builddir)/website/virt-v2v-inspector.1.html \ $(top_builddir)/website/virt-v2v-output-local.1.html \ $(top_builddir)/website/virt-v2v-output-openstack.1.html \ @@ -102,7 +102,7 @@ index 36a831bf..d7c2cb85 100644 $(top_builddir)/website/virt-v2v-release-notes-1.42.1.html \ $(top_builddir)/website/virt-v2v-release-notes-2.0.1.html \ $(top_builddir)/website/virt-v2v-release-notes-2.2.1.html \ -@@ -150,17 +147,6 @@ stamp-virt-v2v-output-openstack.pod: virt-v2v-output-openstack.pod +@@ -153,17 +150,6 @@ stamp-virt-v2v-output-openstack.pod: virt-v2v-output-openstack.pod $< touch $@ @@ -359,7 +359,7 @@ index e12702fa..00000000 - -Copyright (C) 2009-2025 Red Hat Inc. diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 661c18e9..b5476745 100644 +index af19bfb0..5f3dba5c 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -14,7 +14,7 @@ virt-v2v - Convert a guest to use KVM @@ -380,7 +380,7 @@ index 661c18e9..b5476745 100644 L — Output to OpenStack. L — Release notes for 1.42 release. -@@ -92,21 +90,6 @@ disks to F. +@@ -94,21 +92,6 @@ disks to F. For more information see L. @@ -402,7 +402,7 @@ index 661c18e9..b5476745 100644 =head2 Convert from ESXi hypervisor over SSH to local libvirt You have an ESXi hypervisor called C with SSH access -@@ -486,14 +469,6 @@ no metadata is written. +@@ -488,14 +471,6 @@ no metadata is written. Set the output method to OpenStack. See L. @@ -417,7 +417,7 @@ index 661c18e9..b5476745 100644 =item B<-o> B Set the output method to I. -@@ -502,40 +477,6 @@ This is similar to I<-o local>, except that a shell script is written +@@ -504,40 +479,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 661c18e9..b5476745 100644 =item B<-oa> B =item B<-oa> B -@@ -598,117 +539,11 @@ For I<-o openstack> (L) only, set optional +@@ -600,117 +541,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 661c18e9..b5476745 100644 =item B<-op> file Supply a file containing a password to be used when connecting to the -@@ -726,28 +561,8 @@ For I<-o libvirt>, this is a libvirt directory pool +@@ -728,28 +563,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. @@ -605,7 +605,7 @@ index 661c18e9..b5476745 100644 =item B<--parallel> N Enable parallel copying if the guest has multiple disks. I is the -@@ -1356,26 +1171,6 @@ require either root or a special user: +@@ -1369,26 +1184,6 @@ require either root or a special user: =over 4 @@ -632,7 +632,7 @@ index 661c18e9..b5476745 100644 =item Writing to libvirt When using I<-o libvirt>, you may need to run virt-v2v as root so that -@@ -1483,7 +1278,6 @@ virt-v2v binary. Typical output looks like this: +@@ -1496,7 +1291,6 @@ virt-v2v binary. Typical output looks like this: virt-v2v libguestfs-rewrite colours-option @@ -3565,7 +3565,7 @@ index 42cc24e8..00000000 - -# Otherwise everything is OK, exit with no error. diff --git a/tests/Makefile.am b/tests/Makefile.am -index ffcbf722..e54569f1 100644 +index befa9337..73b84958 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -99,11 +99,6 @@ TESTS = \ @@ -3580,7 +3580,7 @@ index ffcbf722..e54569f1 100644 test-oa-option-qcow2.sh \ test-oa-option-raw.sh \ test-of-option.sh \ -@@ -288,16 +283,6 @@ EXTRA_DIST += \ +@@ -291,16 +286,6 @@ EXTRA_DIST += \ test-o-null.sh \ test-o-openstack.sh \ test-o-qemu.sh \ @@ -4628,10 +4628,10 @@ index a8c5b208..00000000 -diff -u "$srcdir/test-o-vdsm-options.ovf.expected" \ - "$OVF" diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index 40782651..2e23642a 100644 +index e656afa3..8678dce7 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml -@@ -202,11 +202,7 @@ let rec main () = +@@ -195,11 +195,7 @@ let rec main () = | "disk" | "local" -> output_mode := `Disk | "null" -> output_mode := `Null | "openstack" | "osp" | "rhosp" -> output_mode := `Openstack @@ -4643,7 +4643,7 @@ index 40782651..2e23642a 100644 | s -> error (f_"unknown -o option: %s") s in -@@ -254,7 +250,7 @@ let rec main () = +@@ -247,7 +243,7 @@ let rec main () = s_"Map network ‘in’ to ‘out’"; [ L"no-trim" ], Getopt.String ("-", no_trim_warning), s_"Ignored for backwards compatibility"; @@ -4652,7 +4652,7 @@ index 40782651..2e23642a 100644 s_"Set output mode (default: libvirt)"; [ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc), s_"Set output allocation mode"; -@@ -294,18 +290,6 @@ let rec main () = +@@ -287,18 +283,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’"; @@ -4671,7 +4671,7 @@ index 40782651..2e23642a 100644 [ L"vmtype" ], Getopt.String ("-", vmtype_warning), s_"Ignored for backwards compatibility"; ] in -@@ -325,9 +309,6 @@ let rec main () = +@@ -318,9 +302,6 @@ let rec main () = virt-v2v -ic vpx://vcenter.example.com/Datacenter/esxi -os imported esx_guest @@ -4681,7 +4681,7 @@ index 40782651..2e23642a 100644 virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp virt-v2v -i disk disk.img -o local -os /var/tmp -@@ -394,7 +375,6 @@ read the man page virt-v2v(1). +@@ -387,7 +368,6 @@ read the man page virt-v2v(1). pr "vcenter-https\n"; pr "vddk\n"; pr "colours-option\n"; @@ -4689,7 +4689,7 @@ index 40782651..2e23642a 100644 pr "io/oo\n"; pr "mac-option\n"; pr "bandwidth-option\n"; -@@ -412,9 +392,6 @@ read the man page virt-v2v(1). +@@ -405,9 +385,6 @@ read the man page virt-v2v(1). pr "output:null\n"; pr "output:openstack\n"; pr "output:qemu\n"; @@ -4699,7 +4699,7 @@ index 40782651..2e23642a 100644 pr "convert:linux\n"; pr "convert:windows\n"; List.iter (pr "ovf:%s\n") Create_ovf.ovf_flavours; -@@ -499,10 +476,7 @@ read the man page virt-v2v(1). +@@ -492,10 +469,7 @@ read the man page virt-v2v(1). | `Null -> (module Output_null.Null) | `QEmu -> (module Output_qemu.QEMU) | `Kubevirt -> (module Output_kubevirt.Kubevirt) @@ -4711,7 +4711,7 @@ index 40782651..2e23642a 100644 let output_options = { Output.output_alloc = output_alloc; -@@ -527,7 +501,6 @@ read the man page virt-v2v(1). +@@ -520,7 +494,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/0012-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch similarity index 88% rename from 0015-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch rename to 0012-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch index c8b194a..5b68d9b 100644 --- a/0015-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch +++ b/0012-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch @@ -1,4 +1,4 @@ -From 7ac8099864720bbca1001a2abbdbfe7296ebd7fe Mon Sep 17 00:00:00 2001 +From 597a67b31d506ff076e694be21e2e45d767f7e46 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 @@ -10,7 +10,7 @@ Fixes: https://issues.redhat.com/browse/RHEL-40903 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 +index 3d0d1b28..9714bbac 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 @@ -25,10 +25,10 @@ index 3e73bfc1..bd959fe4 100644 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 +index 84e783dc..0b9cc753 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). +@@ -214,6 +214,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; diff --git a/sources b/sources index 05e0263..7ea33b9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.10.tar.gz) = dc45a1af2ee19f8952d84e3d4da95993c6cfe45e488df4160e87bae702ef970a0d752a85cdd90a9c6a0a350708f3f16f2658eacb9820810a14da989d4b773926 -SHA512 (virt-v2v-2.7.10.tar.gz.sig) = 4b3defa5619d8a212a5c0f62a41f2a88256acb115721b36b576ff24d9503c522a7f3bcaa34c16505bda7e1a42959cd40dcc0fb05ee43364647487f629d636e13 +SHA512 (virt-v2v-2.7.12.tar.gz) = 0de36782f19570ca48610e6d8a277ec6d3ed77f1dbe084bbc485fa21b380282c71311de650eaa2c1bff8f17e2073a9b5fd97bca67d576ba7c83a4b0c0a6d2d91 +SHA512 (virt-v2v-2.7.12.tar.gz.sig) = ec991f3e6444b9fa58a6b645649458c13b3ba76833d75087a0cdb733d628ef5f82ac6ed8ab35a7ec8b0bd4cd086faa62db1877a769c9832a71038c3161ac5531 diff --git a/virt-v2v.spec b/virt-v2v.spec index 7a8a50b..22bc744 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.10 +Version: 2.7.12 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -27,21 +27,18 @@ Source3: copy-patches.sh # https://github.com/libguestfs/virt-v2v/commits/rhel-10.1 # Patches. -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 +Patch0001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +Patch0002: 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +Patch0003: 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +Patch0004: 0004-RHEL-Fixes-for-libguestfs-winsupport.patch +Patch0005: 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +Patch0006: 0006-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +Patch0007: 0007-RHEL-Remove-input-from-Xen.patch +Patch0008: 0008-RHEL-Remove-o-glance.patch +Patch0009: 0009-RHEL-tests-Remove-btrfs-test.patch +Patch0010: 0010-RHEL-Remove-block-driver-option.patch +Patch0011: 0011-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch +Patch0012: 0012-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 @@ -327,13 +324,15 @@ done %changelog -* Mon Mar 31 2025 Richard W.M. Jones - 1:2.7.10-1 -- Rebase to virt-v2v 2.7.10 +* Tue Apr 15 2025 Richard W.M. Jones - 1:2.7.12-1 +- Rebase to virt-v2v 2.7.12 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 +- Document dracut network-legacy conversion failure + related: RHEL-55732 * Tue Feb 11 2025 Richard W.M. Jones - 1:2.7.1-4 - Rebase to virt-v2v 2.7.1