Rebase to virt-v2v 2.3.4

resolves: rhbz#2187961, rhbz#2175703, rhbz#2172075, rhbz#2168082, rhbz#1986386
This commit is contained in:
Richard W.M. Jones 2023-04-20 10:12:22 +01:00
parent 32f1dfd611
commit 5e9160dca7
34 changed files with 102 additions and 11820 deletions

View File

@ -1,4 +1,4 @@
From da3ae25bdd18db8e4330f8b9c4d1c7bbb1f0df39 Mon Sep 17 00:00:00 2001 From 3447e87d922d9d0bec765ce9ffeb21d13646bec2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 28 Sep 2014 19:14:43 +0100 Date: Sun, 28 Sep 2014 19:14:43 +0100
Subject: [PATCH] RHEL: v2v: Select correct qemu binary for -o qemu mode Subject: [PATCH] RHEL: v2v: Select correct qemu binary for -o qemu mode
@ -16,7 +16,7 @@ support cases.
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/output/output_qemu.ml b/output/output_qemu.ml diff --git a/output/output_qemu.ml b/output/output_qemu.ml
index b667e782..3a57a009 100644 index 57b1e58d..bb6b55c8 100644
--- a/output/output_qemu.ml --- a/output/output_qemu.ml
+++ b/output/output_qemu.ml +++ b/output/output_qemu.ml
@@ -142,7 +142,7 @@ module QEMU = struct @@ -142,7 +142,7 @@ module QEMU = struct

View File

@ -1,27 +0,0 @@
From 019809794742e1990af3c14b953f8c307f629b7c Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Thu, 12 Jan 2023 12:27:26 +0100
Subject: [PATCH] test-v2v-fedora-btrfs-conversion: spell out btrfs feature
group dependency
In case the libguestfs appliance lacks the btrfs feature group, we create
a zero-sized phony Fedora/BTRFS image variant, causing this test case to
fail. In that situation, the test should just be skipped.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
---
tests/test-v2v-fedora-btrfs-conversion.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/test-v2v-fedora-btrfs-conversion.sh b/tests/test-v2v-fedora-btrfs-conversion.sh
index c78f8ae2..14099893 100755
--- a/tests/test-v2v-fedora-btrfs-conversion.sh
+++ b/tests/test-v2v-fedora-btrfs-conversion.sh
@@ -27,5 +27,6 @@ set -x
skip_if_skipped
f=../test-data/phony-guests/fedora-btrfs.img
requires test -f $f
+requires test -s $f
$VG virt-v2v --debug-gc -i disk $f -o null

View File

@ -1,4 +1,4 @@
From b638c2083ee9af57d036859e8a807ad56e9e9361 Mon Sep 17 00:00:00 2001 From ebaa8a444b44e93e45ccbc2cddadffd19be6f19d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 30 Sep 2014 10:50:27 +0100 Date: Tue, 30 Sep 2014 10:50:27 +0100
Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option
@ -44,7 +44,7 @@ index d2a1c270..0be37f5e 100644
=item B<-o null> =item B<-o null>
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index b458607d..6cfe9e44 100644 index 4d2f241a..de27b795 100644
--- a/docs/virt-v2v.pod --- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod
@@ -144,11 +144,6 @@ Since F<guest-domain.xml> contains the path(s) to the guest disk @@ -144,11 +144,6 @@ Since F<guest-domain.xml> contains the path(s) to the guest disk
@ -59,7 +59,7 @@ index b458607d..6cfe9e44 100644
=head1 OPTIONS =head1 OPTIONS
=over 4 =over 4
@@ -507,9 +502,6 @@ This is similar to I<-o local>, except that a shell script is written @@ -517,9 +512,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 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>. shell script are written to the directory specified by I<-os>.
@ -69,7 +69,7 @@ index b458607d..6cfe9e44 100644
=item B<-o> B<rhev> =item B<-o> B<rhev>
This is the same as I<-o rhv>. This is the same as I<-o rhv>.
@@ -588,11 +580,6 @@ For I<-o openstack> (L<virt-v2v-output-openstack(1)>) only, set a guest ID @@ -598,11 +590,6 @@ For I<-o openstack> (L<virt-v2v-output-openstack(1)>) only, set a guest ID
which is saved on each Cinder volume in the C<virt_v2v_guest_id> which is saved on each Cinder volume in the C<virt_v2v_guest_id>
volume property. volume property.
@ -81,7 +81,7 @@ index b458607d..6cfe9e44 100644
=item B<-oo verify-server-certificate> =item B<-oo verify-server-certificate>
=item B<-oo verify-server-certificate=>C<true|false> =item B<-oo verify-server-certificate=>C<true|false>
@@ -763,10 +750,6 @@ Print information about the source guest and stop. This option is @@ -773,10 +760,6 @@ Print information about the source guest and stop. This option is
useful when you are setting up network and bridge maps. useful when you are setting up network and bridge maps.
See L</Networks and bridges>. See L</Networks and bridges>.
@ -93,7 +93,7 @@ index b458607d..6cfe9e44 100644
=item B<--quiet> =item B<--quiet>
diff --git a/output/output_qemu.ml b/output/output_qemu.ml diff --git a/output/output_qemu.ml b/output/output_qemu.ml
index 3a57a009..4be9b650 100644 index bb6b55c8..ae93fb89 100644
--- a/output/output_qemu.ml --- a/output/output_qemu.ml
+++ b/output/output_qemu.ml +++ b/output/output_qemu.ml
@@ -65,6 +65,9 @@ module QEMU = struct @@ -65,6 +65,9 @@ module QEMU = struct
@ -107,10 +107,10 @@ index 3a57a009..4be9b650 100644
let output_storage = let output_storage =
match options.output_storage with match options.output_storage with
diff --git a/v2v/v2v.ml b/v2v/v2v.ml diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 7a01eab5..dc747804 100644 index 3b2eafbd..696ef75e 100644
--- a/v2v/v2v.ml --- a/v2v/v2v.ml
+++ b/v2v/v2v.ml +++ b/v2v/v2v.ml
@@ -272,8 +272,6 @@ let rec main () = @@ -275,8 +275,6 @@ let rec main () =
s_"Same as -ip filename"; s_"Same as -ip filename";
[ L"print-source" ], Getopt.Set print_source, [ L"print-source" ], Getopt.Set print_source,
s_"Print source and stop"; s_"Print source and stop";

View File

@ -1,78 +0,0 @@
From 224243b8e26aa299bd99dd24662c4df10a3f612c Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Thu, 12 Jan 2023 12:31:10 +0100
Subject: [PATCH] test-v2v-i-ova: spell out ntfs feature group dependency
"windows.img" is created as an empty phony image if the libguestfs
appliance lacks the ntfs feature group.
"tests/Makefile.am" deals well with this, because for the "central"
"windows.vmdk" target, we restrict the VMDK conversion to a non-empty
"windows.img". Subsequently, dependent test cases check for "windows.vmdk"
specifically, and if that file is missing, the tests are skipped (they
exit with code 77).
"test-v2v-i-ova.sh" and "test-v2v-i-ova-directory.sh" are exceptions
however. They perform the same conversion manually (in their own separate
workspace directories). They assume that, if "windows.img" exists, it can
be converted to VMDK. When the image size is zero, the conversion breaks,
and both test cases fail. Skip both tests if "windows.img" is empty.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
[lersek@redhat.com: replace further occurrences of windows.img with $f]
---
tests/test-v2v-i-ova-directory.sh | 7 ++++---
tests/test-v2v-i-ova.sh | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/tests/test-v2v-i-ova-directory.sh b/tests/test-v2v-i-ova-directory.sh
index fff236f5..ec858464 100755
--- a/tests/test-v2v-i-ova-directory.sh
+++ b/tests/test-v2v-i-ova-directory.sh
@@ -25,7 +25,9 @@ set -e
set -x
skip_if_skipped
-requires test -f ../test-data/phony-guests/windows.img
+f=../test-data/phony-guests/windows.img
+requires test -f $f
+requires test -s $f
export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools"
export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win"
@@ -39,8 +41,7 @@ vmdk=test-ova.vmdk
ovf=test-v2v-i-ova.ovf
mf=test-ova.mf
-qemu-img convert ../test-data/phony-guests/windows.img \
- -O vmdk $d/$vmdk
+qemu-img convert $f -O vmdk $d/$vmdk
cp "$srcdir/$ovf" $d/$ovf
sha1=`do_sha1 $d/$ovf`
echo "SHA1($ovf)= $sha1" > $d/$mf
diff --git a/tests/test-v2v-i-ova.sh b/tests/test-v2v-i-ova.sh
index a55966a7..7d988330 100755
--- a/tests/test-v2v-i-ova.sh
+++ b/tests/test-v2v-i-ova.sh
@@ -25,7 +25,9 @@ set -e
set -x
skip_if_skipped
-requires test -f ../test-data/phony-guests/windows.img
+f=../test-data/phony-guests/windows.img
+requires test -f $f
+requires test -s $f
export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools"
export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win"
@@ -41,8 +43,7 @@ mf=test-ova.mf
ova=test-ova.ova
raw=TestOva-sda
-qemu-img convert ../test-data/phony-guests/windows.img \
- -O vmdk $d/$vmdk
+qemu-img convert $f -O vmdk $d/$vmdk
cp "$srcdir/$ovf" $d/$ovf
sha1=`do_sha1 $d/$ovf`
echo "SHA1($ovf)= $sha1" > $d/$mf

View File

@ -1,4 +1,4 @@
From d8a6a0577f0a85387a6acf394f3523674c1b704f Mon Sep 17 00:00:00 2001 From 389c370a34f805e744cb8352e3e980fbd0b52044 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 24 Apr 2015 09:45:41 -0400 Date: Fri, 24 Apr 2015 09:45:41 -0400
Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu
@ -9,7 +9,7 @@ Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu
1 file changed, 3 insertions(+), 2 deletions(-) 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/utils.ml b/lib/utils.ml diff --git a/lib/utils.ml b/lib/utils.ml
index 281868b5..e63ec7ce 100644 index 174c01b1..54431307 100644
--- a/lib/utils.ml --- a/lib/utils.ml
+++ b/lib/utils.ml +++ b/lib/utils.ml
@@ -60,13 +60,14 @@ let kvm_arch = function @@ -60,13 +60,14 @@ let kvm_arch = function

View File

@ -1,44 +0,0 @@
From d78c3bdcda04885ee7b826a5ce43d07e778641cd Mon Sep 17 00:00:00 2001
From: Jan Kuparinen <copper_fin@hotmail.com>
Date: Fri, 13 Jan 2023 21:20:28 +0100
Subject: [PATCH] Translated using Weblate (Finnish)
Currently translated at 1.9% (25 of 1305 strings)
Translation: libguestfs/virt-v2v-docs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-docs-master/fi/
---
po-docs/fi.po | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/po-docs/fi.po b/po-docs/fi.po
index 29d8ee26..5da30f77 100644
--- a/po-docs/fi.po
+++ b/po-docs/fi.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: virt-v2v 1.43.1\n"
"Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
"POT-Creation-Date: 2020-08-13 13:17+0200\n"
-"PO-Revision-Date: 2022-01-25 17:16+0000\n"
+"PO-Revision-Date: 2023-01-13 20:20+0000\n"
"Last-Translator: Jan Kuparinen <copper_fin@hotmail.com>\n"
"Language-Team: Finnish <https://translate.fedoraproject.org/projects/"
"libguestfs/virt-v2v-docs-master/fi/>\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.10.1\n"
+"X-Generator: Weblate 4.15\n"
#. type: =end
#: common/mlcustomize/customize-options.pod:1
@@ -4694,7 +4694,7 @@ msgstr ""
#. type: =item
#: docs/virt-v2v-support.pod:86
msgid "Oracle Linux"
-msgstr ""
+msgstr "Oracle Linux"
#. type: =item
#: docs/virt-v2v-support.pod:88

View File

@ -1,23 +1,26 @@
From 94f4aaeea12ac37a5b7515251040ce3e6fd86171 Mon Sep 17 00:00:00 2001 From c0bb624a151be3291e0c10c1002577615b98e74c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 30 Aug 2015 03:21:57 -0400 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 tests we cannot use guestfish for arbitrary Windows edits.
In virt-v2v helpers we must set the program name to virt-v2v. 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 + convert/convert.ml | 1 +
convert/windows_virtio.ml | 1 +
test-data/phony-guests/make-windows-img.sh | 1 + test-data/phony-guests/make-windows-img.sh | 1 +
tests/test-v2v-block-driver.sh | 6 +++++-
tests/test-v2v-virtio-win-iso.sh | 8 +++++++- tests/test-v2v-virtio-win-iso.sh | 8 +++++++-
tests/test-v2v-windows-conversion.sh | 8 +++++++- tests/test-v2v-windows-conversion.sh | 8 +++++++-
5 files changed, 17 insertions(+), 2 deletions(-) 5 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/convert/convert.ml b/convert/convert.ml diff --git a/convert/convert.ml b/convert/convert.ml
index d0d5b773..c3dd4151 100644 index 9c76f76d..caaa707e 100644
--- a/convert/convert.ml --- a/convert/convert.ml
+++ b/convert/convert.ml +++ b/convert/convert.ml
@@ -51,6 +51,7 @@ let rec convert dir options source = @@ -52,6 +52,7 @@ let rec convert dir options source =
message (f_"Opening the source"); message (f_"Opening the source");
let g = open_guestfs ~identifier:"v2v" () in let g = open_guestfs ~identifier:"v2v" () in
@ -25,18 +28,6 @@ index d0d5b773..c3dd4151 100644
g#set_memsize (g#get_memsize () * 2); g#set_memsize (g#get_memsize () * 2);
(* Setting the number of vCPUs allows parallel mkinitrd, but make (* Setting the number of vCPUs allows parallel mkinitrd, but make
* sure this is not too large because each vCPU consumes guest RAM. * sure this is not too large because each vCPU consumes guest RAM.
diff --git a/convert/windows_virtio.ml b/convert/windows_virtio.ml
index 6b642d21..2cef4234 100644
--- a/convert/windows_virtio.ml
+++ b/convert/windows_virtio.ml
@@ -256,6 +256,7 @@ and copy_from_virtio_win g inspect srcdir destdir filter missing =
let g2 =
try
let g2 = open_guestfs ~identifier:"virtio_win" () in
+ g#set_program "virt-v2v";
g2#add_drive_opts virtio_win ~readonly:true;
g2#launch ();
g2
diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh
index 30908a91..73cf5144 100755 index 30908a91..73cf5144 100755
--- a/test-data/phony-guests/make-windows-img.sh --- a/test-data/phony-guests/make-windows-img.sh
@ -49,6 +40,23 @@ index 30908a91..73cf5144 100755
sparse windows.img-t 512M sparse windows.img-t 512M
run run
diff --git a/tests/test-v2v-block-driver.sh b/tests/test-v2v-block-driver.sh
index db59a2cf..a0e56bed 100755
--- a/tests/test-v2v-block-driver.sh
+++ b/tests/test-v2v-block-driver.sh
@@ -100,7 +100,11 @@ check_driver_presence ()
local virtio_dir="/Windows/Drivers/VirtIO"
- guestfish --ro -a "$img" -i >$response <<-EOM
+ guestfish >$response <<-EOM
+ add-ro $img
+ set-program virt-testing
+ run
+ mount-ro /dev/sda2 /
is-dir $virtio_dir
is-file $virtio_dir/$drv.cat
is-file $virtio_dir/$drv.inf
diff --git a/tests/test-v2v-virtio-win-iso.sh b/tests/test-v2v-virtio-win-iso.sh diff --git a/tests/test-v2v-virtio-win-iso.sh b/tests/test-v2v-virtio-win-iso.sh
index 69f6f414..b9b806fb 100755 index 69f6f414..b9b806fb 100755
--- a/tests/test-v2v-virtio-win-iso.sh --- a/tests/test-v2v-virtio-win-iso.sh

View File

@ -1,49 +0,0 @@
From f395335881974767e4dbdbf73c1abf3bed961f5d Mon Sep 17 00:00:00 2001
From: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Date: Fri, 13 Jan 2023 21:20:28 +0100
Subject: [PATCH] Translated using Weblate (Georgian)
Currently translated at 8.6% (38 of 439 strings)
Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/ka/
---
po/ka.po | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/po/ka.po b/po/ka.po
index 4dc891df..26d41f6b 100644
--- a/po/ka.po
+++ b/po/ka.po
@@ -6,10 +6,10 @@
msgid ""
msgstr ""
"Project-Id-Version: virt-v2v 2.1.1\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug."
+"cgi?component=libguestfs&product=Virtualization+Tools\n"
"POT-Creation-Date: 2022-12-10 12:01+0000\n"
-"PO-Revision-Date: 2022-12-06 18:19+0000\n"
+"PO-Revision-Date: 2023-01-13 20:20+0000\n"
"Last-Translator: Temuri Doghonadze <temuri.doghonadze@gmail.com>\n"
"Language-Team: Georgian <https://translate.fedoraproject.org/projects/"
"libguestfs/virt-v2v-master/ka/>\n"
@@ -18,7 +18,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.14.2\n"
+"X-Generator: Weblate 4.15\n"
#: input/input_ova.ml:134 common/mltools/tools_utils.ml:235
msgid "%s"
@@ -2062,7 +2062,7 @@ msgstr ""
#: common/mltools/getopt-c.c:198
#, c-format
msgid "%s: %s: integer out of range\n"
-msgstr ""
+msgstr "%s: %s: მთელი მნიშვნელობა დიაპაზონს გარეთაა\n"
#: common/mltools/getopt-c.c:388
#, c-format

View File

@ -1,4 +1,4 @@
From ffcd5358b8f6e39962edc91aa036089adc4fcdb0 Mon Sep 17 00:00:00 2001 From eaf5279f486590d24843ff63c9f95af33abffe39 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Mar 2017 14:21:37 +0100 Date: Thu, 2 Mar 2017 14:21:37 +0100
Subject: [PATCH] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) Subject: [PATCH] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671)

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
From 907b8c0f9f0aaf3cf5ec71c8371ea252c4acf357 Mon Sep 17 00:00:00 2001 From 71ab7854f53b0b9338de12d7dadb2c4754dfcff6 Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com> From: Pino Toscano <ptoscano@redhat.com>
Date: Wed, 8 Mar 2017 11:03:40 +0100 Date: Wed, 8 Mar 2017 11:03:40 +0100
Subject: [PATCH] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) Subject: [PATCH] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203)

View File

@ -1,66 +0,0 @@
From e8c61da73b62b6acf13543e9421db0b0e2a43a1a Mon Sep 17 00:00:00 2001
From: Yuri Chornoivan <yurchor@ukr.net>
Date: Sat, 14 Jan 2023 22:20:05 +0100
Subject: [PATCH] Translated using Weblate (Ukrainian)
Currently translated at 100.0% (441 of 441 strings)
Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/uk/
---
po/uk.po | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/po/uk.po b/po/uk.po
index bf21a0ed..f524482a 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -12,10 +12,10 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug."
+"cgi?component=libguestfs&product=Virtualization+Tools\n"
"POT-Creation-Date: 2023-01-10 14:53+0000\n"
-"PO-Revision-Date: 2022-12-24 19:20+0000\n"
+"PO-Revision-Date: 2023-01-14 21:20+0000\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <https://translate.fedoraproject.org/projects/"
"libguestfs/virt-v2v-master/uk/>\n"
@@ -23,8 +23,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
+"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.15\n"
#: input/input_ova.ml:134 common/mltools/tools_utils.ml:235
@@ -316,12 +316,10 @@ msgid "-o disk: unknown output option -oo %s"
msgstr "-o disk: невідомий параметр виведення — «-oo %s»"
#: output/output_kubevirt.ml:56
-#, fuzzy
-#| msgid "-o disk: output directory was not specified, use '-os /dir'"
msgid "-o kubevirt: output directory was not specified, use '-os /dir'"
msgstr ""
-"-o disk: не вказано каталогу для виведення даних, скористайтеся «-os /"
-"каталог»"
+"-o kubevirt: не вказано каталогу для виведення даних, скористайтеся «-os "
+"/каталог»"
#: output/output_libvirt.ml:115
msgid ""
@@ -1204,6 +1202,8 @@ msgid ""
"YAML block contains newline character. This should not happen, please "
"report a bug against virt-v2v."
msgstr ""
+"Блок YAML містить символ розриву рядка. Такого не мало трапитися. Будь "
+"ласка, повідомте про цю ваду у virt-v2v."
#: input/input_vddk.ml:98
msgid ""

View File

@ -1,4 +1,4 @@
From ee2bf7286e96419df09d86ddf0eeb31ad869ff92 Mon Sep 17 00:00:00 2001 From 134fb5cd6925e8af155d1f84db55d3742f2f256f Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com> From: Pino Toscano <ptoscano@redhat.com>
Date: Tue, 26 Mar 2019 09:42:25 +0100 Date: Tue, 26 Mar 2019 09:42:25 +0100
Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests 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(+), 100 deletions(-) 1 file changed, 4 insertions(+), 100 deletions(-)
diff --git a/docs/virt-v2v-support.pod b/docs/virt-v2v-support.pod diff --git a/docs/virt-v2v-support.pod b/docs/virt-v2v-support.pod
index 9815f51f..1ffc0f9d 100644 index 8b64a5ea..1ffc0f9d 100644
--- a/docs/virt-v2v-support.pod --- a/docs/virt-v2v-support.pod
+++ b/docs/virt-v2v-support.pod +++ b/docs/virt-v2v-support.pod
@@ -8,106 +8,10 @@ systems and guests in virt-v2v @@ -8,106 +8,10 @@ systems and guests in virt-v2v
@ -84,11 +84,11 @@ index 9815f51f..1ffc0f9d 100644
- -
-=over 4 -=over 4
- -
-=item Red Hat Enterprise Linux 3, 4, 5, 6, 7 -=item Red Hat Enterprise Linux 4, 5, 6, 7
- -
-=item CentOS 3, 4, 5, 6, 7 -=item CentOS 4, 5, 6, 7
- -
-=item Scientific Linux 3, 4, 5, 6, 7 -=item Scientific Linux 4, 5, 6, 7
- -
-=item Oracle Linux -=item Oracle Linux
- -

View File

@ -1,34 +0,0 @@
From fd9694a3a2ea2911335cd3a85558a92b14d946fc Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 16 Jan 2023 12:19:29 +0000
Subject: [PATCH] convert: windows: Remove extraneous blank lines in source
---
convert/convert_windows.ml | 1 -
convert/windows_virtio.ml | 1 -
2 files changed, 2 deletions(-)
diff --git a/convert/convert_windows.ml b/convert/convert_windows.ml
index 57a7ff03..b0436fe4 100644
--- a/convert/convert_windows.ml
+++ b/convert/convert_windows.ml
@@ -476,7 +476,6 @@ let convert (g : G.guestfs) _ inspect _ static_ips =
(sprintf "install-%s.ps1" msi_path) !psh_script;
) files
-
and unconfigure_xenpv () =
match xenpv_uninst with
| None -> () (* nothing to be uninstalled *)
diff --git a/convert/windows_virtio.ml b/convert/windows_virtio.ml
index d9fda13f..2ce92ece 100644
--- a/convert/windows_virtio.ml
+++ b/convert/windows_virtio.ml
@@ -215,7 +215,6 @@ and copy_qemu_ga g inspect =
(fun () ->
error (f_"root directory / is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log."))
-
(* Copy all files from virtio_win directory/ISO located in [srcdir]
* subdirectory and all its subdirectories to the [destdir]. The directory
* hierarchy is not preserved, meaning all files will be directly in [destdir].

View File

@ -1,19 +1,19 @@
From 2d85522fe7b03207573952a7d95b0f621e3ff52e Mon Sep 17 00:00:00 2001 From e4ffc4800bd8a4bbec56b374cc6d21dff88f15ae Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 30 Jun 2021 11:15:52 +0100 Date: Wed, 30 Jun 2021 11:15:52 +0100
Subject: [PATCH] RHEL: Disable -o glance Subject: [PATCH] RHEL: Disable -o glance
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1977539 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1977539
--- ---
docs/virt-v2v-output-openstack.pod | 56 ++---------------------------- docs/virt-v2v-output-openstack.pod | 54 ++----------------------------
docs/virt-v2v.pod | 20 ----------- docs/virt-v2v.pod | 20 -----------
output/output_glance.mli | 2 +- output/output_glance.mli | 2 +-
tests/test-v2v-o-glance.sh | 3 ++ tests/test-v2v-o-glance.sh | 3 ++
v2v/v2v.ml | 7 +--- v2v/v2v.ml | 7 +---
5 files changed, 7 insertions(+), 81 deletions(-) 5 files changed, 7 insertions(+), 79 deletions(-)
diff --git a/docs/virt-v2v-output-openstack.pod b/docs/virt-v2v-output-openstack.pod diff --git a/docs/virt-v2v-output-openstack.pod b/docs/virt-v2v-output-openstack.pod
index f5a3abad..1ab356e8 100644 index cd4862b1..54cd276e 100644
--- a/docs/virt-v2v-output-openstack.pod --- a/docs/virt-v2v-output-openstack.pod
+++ b/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 @@ -10,13 +10,10 @@ virt-v2v-output-openstack - Using virt-v2v to convert guests to OpenStack
@ -47,7 +47,7 @@ index f5a3abad..1ab356e8 100644
=back =back
=head1 OUTPUT TO OPENSTACK =head1 OUTPUT TO OPENSTACK
@@ -170,50 +158,10 @@ no Cinder volume type is used. @@ -176,48 +164,10 @@ no Cinder volume type is used.
The following options are B<not> supported with OpenStack: I<-oa>, The following options are B<not> supported with OpenStack: I<-oa>,
I<-of>. I<-of>.
@ -60,10 +60,8 @@ index f5a3abad..1ab356e8 100644
- -
-This runs the L<glance(1)> CLI program which must be installed on the -This runs the L<glance(1)> CLI program which must be installed on the
-virt-v2v conversion host. For authentication to work, you will need -virt-v2v conversion host. For authentication to work, you will need
-to set C<OS_*> environment variables. -to set C<OS_*> environment variables. See
- -L</OpenStack: Authentication> above.
-Normally there is a file called C<overcloudrc> or C<keystonerc_admin>
-which you can simply C<source> to set everything up.
- -
-Virt-v2v adds metadata for the guest to Glance, describing such things -Virt-v2v adds metadata for the guest to Glance, describing such things
-as the guest operating system and what drivers it requires. The -as the guest operating system and what drivers it requires. The
@ -100,10 +98,10 @@ index f5a3abad..1ab356e8 100644
=head1 AUTHOR =head1 AUTHOR
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 6cfe9e44..d161b63f 100644 index de27b795..e5400ca7 100644
--- a/docs/virt-v2v.pod --- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod
@@ -421,14 +421,6 @@ See L</Networks and bridges> below. @@ -431,14 +431,6 @@ See L</Networks and bridges> below.
This is the same as I<-o local>. This is the same as I<-o local>.
@ -118,7 +116,7 @@ index 6cfe9e44..d161b63f 100644
=item B<-o> B<kubevirt> =item B<-o> B<kubevirt>
Set the output method to I<kubevirt>. B<Note the way this mode works Set the output method to I<kubevirt>. B<Note the way this mode works
@@ -1172,11 +1164,6 @@ and output methods may use disk space, as outlined in the table below. @@ -1182,11 +1174,6 @@ and output methods may use disk space, as outlined in the table below.
This temporarily places a full copy of the uncompressed source disks This temporarily places a full copy of the uncompressed source disks
in C<$VIRT_V2V_TMPDIR> (or F</var/tmp>). in C<$VIRT_V2V_TMPDIR> (or F</var/tmp>).
@ -130,7 +128,7 @@ index 6cfe9e44..d161b63f 100644
=item I<-o local> =item I<-o local>
=item I<-o qemu> =item I<-o qemu>
@@ -1360,13 +1347,6 @@ instance. @@ -1370,13 +1357,6 @@ instance.
Because of how Cinder volumes are presented as F</dev> block devices, Because of how Cinder volumes are presented as F</dev> block devices,
using I<-o openstack> normally requires that virt-v2v is run as root. using I<-o openstack> normally requires that virt-v2v is run as root.
@ -169,10 +167,10 @@ index c0db9115..074b5e16 100755
set -e set -e
set -x set -x
diff --git a/v2v/v2v.ml b/v2v/v2v.ml diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index dc747804..392c3dad 100644 index 696ef75e..47d2da79 100644
--- a/v2v/v2v.ml --- a/v2v/v2v.ml
+++ b/v2v/v2v.ml +++ b/v2v/v2v.ml
@@ -194,7 +194,6 @@ let rec main () = @@ -195,7 +195,6 @@ let rec main () =
if !output_mode <> `Not_set then if !output_mode <> `Not_set then
error (f_"%s option used more than once on the command line") "-o"; error (f_"%s option used more than once on the command line") "-o";
match mode with match mode with
@ -180,7 +178,7 @@ index dc747804..392c3dad 100644
| "kubevirt" -> output_mode := `Kubevirt | "kubevirt" -> output_mode := `Kubevirt
| "libvirt" -> output_mode := `Libvirt | "libvirt" -> output_mode := `Libvirt
| "disk" | "local" -> output_mode := `Disk | "disk" | "local" -> output_mode := `Disk
@@ -252,7 +251,7 @@ let rec main () = @@ -255,7 +254,7 @@ let rec main () =
s_"Map network in to out"; s_"Map network in to out";
[ L"no-trim" ], Getopt.String ("-", no_trim_warning), [ L"no-trim" ], Getopt.String ("-", no_trim_warning),
s_"Ignored for backwards compatibility"; s_"Ignored for backwards compatibility";
@ -189,7 +187,7 @@ index dc747804..392c3dad 100644
s_"Set output mode (default: libvirt)"; s_"Set output mode (default: libvirt)";
[ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc), [ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc),
s_"Set output allocation mode"; s_"Set output allocation mode";
@@ -320,8 +319,6 @@ virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp @@ -323,8 +322,6 @@ virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp
virt-v2v -i disk disk.img -o local -os /var/tmp virt-v2v -i disk disk.img -o local -os /var/tmp
@ -198,7 +196,7 @@ index dc747804..392c3dad 100644
There is a companion front-end called \"virt-p2v\" which comes as an There is a companion front-end called \"virt-p2v\" which comes as an
ISO or CD image that can be booted on physical machines. ISO or CD image that can be booted on physical machines.
@@ -390,7 +387,6 @@ read the man page virt-v2v(1). @@ -399,7 +396,6 @@ read the man page virt-v2v(1).
pr "input:libvirtxml\n"; pr "input:libvirtxml\n";
pr "input:ova\n"; pr "input:ova\n";
pr "input:vmx\n"; pr "input:vmx\n";
@ -206,7 +204,7 @@ index dc747804..392c3dad 100644
pr "output:kubevirt\n"; pr "output:kubevirt\n";
pr "output:libvirt\n"; pr "output:libvirt\n";
pr "output:local\n"; pr "output:local\n";
@@ -487,7 +483,6 @@ read the man page virt-v2v(1). @@ -496,7 +492,6 @@ read the man page virt-v2v(1).
| `Disk -> (module Output_disk.Disk) | `Disk -> (module Output_disk.Disk)
| `Null -> (module Output_null.Null) | `Null -> (module Output_null.Null)
| `QEmu -> (module Output_qemu.QEMU) | `QEmu -> (module Output_qemu.QEMU)

View File

@ -1,30 +0,0 @@
From 9a5c900fdb532d553a78339a6887417dd6de70e5 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 16 Jan 2023 12:22:17 +0000
Subject: [PATCH] convert: windows: Document what copy_qemu_ga function returns
Just updates the comment.
(cherry picked from commit 7499ab10ea387b1dfd6fdd6feb2632b66545a257)
---
convert/windows_virtio.mli | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/convert/windows_virtio.mli b/convert/windows_virtio.mli
index 73ec95c7..82aad69b 100644
--- a/convert/windows_virtio.mli
+++ b/convert/windows_virtio.mli
@@ -39,8 +39,11 @@ val install_drivers
devices if we managed to install those, or legacy devices if we didn't. *)
val copy_qemu_ga : Guestfs.guestfs -> Types.inspect -> string list
-(** copy MSIs (idealy just one) with QEMU Guest Agent to Windows guest. The
- MSIs are not installed by this function. *)
+(** copy MSIs (ideally just one) with QEMU Guest Agent to Windows guest. The
+ MSIs are not installed by this function.
+
+ Returns a list of the copied [*.msi] files (empty list indicates no
+ qemu-ga installer(s) could be located). *)
(**/**)

View File

@ -1,4 +1,4 @@
From 8fbfb57de81e9962eacc493338aee6162fefb510 Mon Sep 17 00:00:00 2001 From 8eb1f90c3e894da7f528dbc1c54960ebcf0f759b Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Dec 2021 11:56:05 +0000 Date: Thu, 2 Dec 2021 11:56:05 +0000
Subject: [PATCH] RHEL: Remove the --in-place option Subject: [PATCH] RHEL: Remove the --in-place option
@ -12,7 +12,7 @@ wish to support in RHEL.
3 files changed, 17 deletions(-) 3 files changed, 17 deletions(-)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index d161b63f..0394b421 100644 index e5400ca7..fc7e0d82 100644
--- a/docs/virt-v2v.pod --- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod
@@ -24,9 +24,6 @@ virtualize those machines (physical to virtual, or p2v). @@ -24,9 +24,6 @@ virtualize those machines (physical to virtual, or p2v).
@ -36,7 +36,7 @@ index d161b63f..0394b421 100644
=head2 Other virt-v2v topics =head2 Other virt-v2v topics
L<virt-v2v-support(1)> — Supported hypervisors, virtualization L<virt-v2v-support(1)> — Supported hypervisors, virtualization
@@ -1612,7 +1605,6 @@ L<https://rwmj.wordpress.com/2015/09/18/importing-kvm-guests-to-ovirt-or-rhev/#c @@ -1622,7 +1615,6 @@ L<https://rwmj.wordpress.com/2015/09/18/importing-kvm-guests-to-ovirt-or-rhev/#c
L<virt-p2v(1)>, L<virt-p2v(1)>,
L<virt-v2v-inspector(1)>, L<virt-v2v-inspector(1)>,
@ -45,7 +45,7 @@ index d161b63f..0394b421 100644
L<virt-df(1)>, L<virt-df(1)>,
L<virt-filesystems(1)>, L<virt-filesystems(1)>,
diff --git a/tests/Makefile.am b/tests/Makefile.am diff --git a/tests/Makefile.am b/tests/Makefile.am
index a4c87398..998b871d 100644 index 5c523204..5190d055 100644
--- a/tests/Makefile.am --- a/tests/Makefile.am
+++ b/tests/Makefile.am +++ b/tests/Makefile.am
@@ -77,7 +77,6 @@ TESTS = \ @@ -77,7 +77,6 @@ TESTS = \
@ -53,14 +53,14 @@ index a4c87398..998b871d 100644
test-v2v-i-disk.sh \ test-v2v-i-disk.sh \
test-v2v-i-ova.sh \ test-v2v-i-ova.sh \
- test-v2v-in-place.sh \ - test-v2v-in-place.sh \
test-v2v-block-driver.sh \
test-v2v-inspector.sh \ test-v2v-inspector.sh \
test-v2v-mac.sh \ test-v2v-mac.sh \
test-v2v-machine-readable.sh \
diff --git a/v2v/v2v.ml b/v2v/v2v.ml diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 392c3dad..18a694ee 100644 index 47d2da79..19f08aae 100644
--- a/v2v/v2v.ml --- a/v2v/v2v.ml
+++ b/v2v/v2v.ml +++ b/v2v/v2v.ml
@@ -216,12 +216,6 @@ let rec main () = @@ -217,12 +217,6 @@ let rec main () =
warning (f_"the --vmtype option has been removed and now does nothing") warning (f_"the --vmtype option has been removed and now does nothing")
in in
@ -73,7 +73,7 @@ index 392c3dad..18a694ee 100644
let argspec = [ let argspec = [
[ L"bandwidth" ], Getopt.String ("bps", set_string_option_once "--bandwidth" bandwidth), [ L"bandwidth" ], Getopt.String ("bps", set_string_option_once "--bandwidth" bandwidth),
s_"Set bandwidth to bits per sec"; s_"Set bandwidth to bits per sec";
@@ -243,8 +237,6 @@ let rec main () = @@ -246,8 +240,6 @@ let rec main () =
s_"Use password from file to connect to input hypervisor"; s_"Use password from file to connect to input hypervisor";
[ M"it" ], Getopt.String ("transport", set_string_option_once "-it" input_transport), [ M"it" ], Getopt.String ("transport", set_string_option_once "-it" input_transport),
s_"Input transport"; s_"Input transport";

View File

@ -1,25 +0,0 @@
From 48f15935cff53836eae4c1c9afb0be8ab4f13bea Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 16 Jan 2023 15:12:16 +0000
Subject: [PATCH] convert: windows: Remove unused 'open Utils'
No function from Utils was being used by Windows_virtio, so remove the
unnecessary line.
(cherry picked from commit 26b9cd1f87f06c31cdf3020e003078737a417889)
---
convert/windows_virtio.ml | 1 -
1 file changed, 1 deletion(-)
diff --git a/convert/windows_virtio.ml b/convert/windows_virtio.ml
index 2ce92ece..6b642d21 100644
--- a/convert/windows_virtio.ml
+++ b/convert/windows_virtio.ml
@@ -25,7 +25,6 @@ open Common_gettext.Gettext
open Regedit
open Types
-open Utils
module G = Guestfs

View File

@ -1,4 +1,4 @@
From b04577d80b8933a04b1863727cabefc48d6ae0da Mon Sep 17 00:00:00 2001 From dbf8c50d6d0e157c13e505a22f6f397cb991139c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 5 Jul 2022 11:56:54 +0100 Date: Tue, 5 Jul 2022 11:56:54 +0100
Subject: [PATCH] RHEL 9: -oo compressed: Remove nbdcopy version check and test Subject: [PATCH] RHEL 9: -oo compressed: Remove nbdcopy version check and test
@ -34,10 +34,10 @@ index e419c13d..c8f743c2 100644
let g = open_guestfs () in let g = open_guestfs () in
diff --git a/tests/Makefile.am b/tests/Makefile.am diff --git a/tests/Makefile.am b/tests/Makefile.am
index 998b871d..8cf17f94 100644 index 5190d055..5169e2a6 100644
--- a/tests/Makefile.am --- a/tests/Makefile.am
+++ b/tests/Makefile.am +++ b/tests/Makefile.am
@@ -83,7 +83,6 @@ TESTS = \ @@ -84,7 +84,6 @@ TESTS = \
test-v2v-networks-and-bridges.sh \ test-v2v-networks-and-bridges.sh \
test-v2v-o-glance.sh \ test-v2v-o-glance.sh \
test-v2v-o-libvirt.sh \ test-v2v-o-libvirt.sh \

View File

@ -1,28 +0,0 @@
From 4623b2aab891fdbeda0486ad00f1fa2a7f5533fe Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 19 Jan 2023 08:51:30 +0000
Subject: [PATCH] -o kubevirt: Fix mistake in error message
The error message was copied from output_local.ml:
virt-v2v: error: -o local: -op option cannot be used in this output mode
Reported-by: Xiaodai Wang
(cherry picked from commit be322ed49b1131e30a0b70f16d31fd29fca32b81)
---
output/output_kubevirt.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/output/output_kubevirt.ml b/output/output_kubevirt.ml
index 63ee8197..0a74dbbe 100644
--- a/output/output_kubevirt.ml
+++ b/output/output_kubevirt.ml
@@ -47,7 +47,7 @@ module Kubevirt = struct
if options.output_options <> [] then
error (f_"no -oo (output options) are allowed here");
if options.output_password <> None then
- error_option_cannot_be_used_in_output_mode "local" "-op";
+ error_option_cannot_be_used_in_output_mode "kubevirt" "-op";
(* -os must be set to a directory. *)
let output_storage =

View File

@ -1,4 +1,4 @@
From 462f9b9eb810a5ac26f610d03b601906c9bc674e Mon Sep 17 00:00:00 2001 From 81b28218e676cdc57bd6f8427cfd5faf85162d4a Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 5 Jul 2022 11:58:09 +0100 Date: Tue, 5 Jul 2022 11:58:09 +0100
Subject: [PATCH] RHEL 9: tests: Remove btrfs test Subject: [PATCH] RHEL 9: tests: Remove btrfs test
@ -9,10 +9,10 @@ RHEL does not have btrfs so this test always fails.
1 file changed, 1 deletion(-) 1 file changed, 1 deletion(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8cf17f94..8b2a8685 100644 index 5169e2a6..a1c61f8f 100644
--- a/tests/Makefile.am --- a/tests/Makefile.am
+++ b/tests/Makefile.am +++ b/tests/Makefile.am
@@ -97,7 +97,6 @@ TESTS = \ @@ -98,7 +98,6 @@ TESTS = \
test-v2v-sound.sh \ test-v2v-sound.sh \
test-v2v-virtio-win-iso.sh \ test-v2v-virtio-win-iso.sh \
test-v2v-fedora-conversion.sh \ test-v2v-fedora-conversion.sh \

View File

@ -1,46 +0,0 @@
From 6b7ef3efe748a72edad0faa508e91b340038a586 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 20 Jan 2023 09:11:52 +0000
Subject: [PATCH] -o kubevirt: Move "cpu" element under "domain"
Apparently this element doesn't go in the obvious place (under
"resources", next to memory), but in a whole new section under "cpu",
which makes no logical sense but here we are. Also verified this
against Kubevirt examples/vm-template-fedora.yaml
Reported-by: Ming Xie
Fixes: commit bfa62b4683d312fc2fa9bb3c08963fc4846831b9
(cherry picked from commit 8db50a85f0363d90918edd1af4fc20ddc245b421)
---
output/create_kubevirt_yaml.ml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/output/create_kubevirt_yaml.ml b/output/create_kubevirt_yaml.ml
index 205e9be3..689555e4 100644
--- a/output/create_kubevirt_yaml.ml
+++ b/output/create_kubevirt_yaml.ml
@@ -65,13 +65,13 @@ let create_kubevirt_yaml source inspect
let memory_str = sprintf "%LdMi" (source.s_memory /^ 1024_L /^ 1024_L) in
List.push_back resources ("requests", Assoc ["memory", String memory_str]);
- (* # vCPUs. XXX vendor, model, topology *)
- List.push_back resources ("cpu", Assoc ["cores", Int source.s_vcpu]);
-
(* Machine features. *)
let features = List.map (fun name -> name, List []) source.s_features in
List.push_back resources ("features", Assoc features);
+ (* # vCPUs. XXX vendor, model, topology *)
+ let cpu = "cpu", Assoc ["cores", Int source.s_vcpu] in
+
(* XXX firmware, display, sound *)
(* XXX guestcaps: rng, balloon, vsock, virtio 1.0 *)
@@ -109,6 +109,7 @@ let create_kubevirt_yaml source inspect
if !devices <> [] then
List.push_back domain ("devices", Assoc !devices);
List.push_back domain ("resources", Assoc !resources);
+ List.push_back domain cpu;
let spec = ref [] in
List.push_back spec ("domain", Assoc !domain);

View File

@ -1,51 +0,0 @@
From 8009825c396358137576af522acc0b6b20243bac Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 20 Jan 2023 09:49:04 +0000
Subject: [PATCH] -o kubevirt: Error on invalid output guest names
Kubevirt supports something like RFC 1123 names (without the length
restriction). Helpfully it prints the regexp that it uses the
validate the names, so just use the same regexp.
Note that virt-v2v never renames guests (since that would add
unpredictability for automation). You must use the -on option to
rename the guest if the name is wrong. Hence this is an error, not a
warning or an attempt to rename the guest.
Reported-by: Ming Xie
Fixes: commit bfa62b4683d312fc2fa9bb3c08963fc4846831b9
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2162332
(cherry picked from commit 8a9c914544a49bed13eb5baf42290f835bdee7b5)
---
output/output_kubevirt.ml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/output/output_kubevirt.ml b/output/output_kubevirt.ml
index 0a74dbbe..00e6a8a5 100644
--- a/output/output_kubevirt.ml
+++ b/output/output_kubevirt.ml
@@ -29,6 +29,11 @@ open Utils
open Output
open Create_kubevirt_yaml
+(* Valid output names for Kubevirt (RHBZ#2162332). *)
+let rfc1123_re =
+ PCRE.compile ~anchored:true
+ "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
+
module Kubevirt = struct
type poptions = output_allocation * string * string * string
@@ -60,6 +65,12 @@ module Kubevirt = struct
let output_name = Option.default source.s_name options.output_name in
+ if not (PCRE.matches rfc1123_re output_name) then
+ error (f_"-o kubevirt: the guest name must contain only lowercase \
+ alphanumeric characters, '-' or '.', and must start and \
+ end with an alphanumeric character. Rerun virt-v2v with \
+ the '-on name' option to rename it.");
+
options.output_alloc, options.output_format, output_name, output_storage
let setup dir options source =

File diff suppressed because it is too large Load Diff

View File

@ -1,83 +0,0 @@
From 64a86bb9ef0298496a992a3a76d190b3895ffeee Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 20 Jan 2023 10:35:55 +0000
Subject: [PATCH] -o kubevirt: Implement -oo compressed for qcow2 files
Reported-by: Xiaodai Wang
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2162444
Updates: commit 53690a0c602a4286fdb9408fdf6a01cc352697ec
(cherry picked from commit ada18150543466955ff73a24a9b9a66ddfac270e)
---
output/output_kubevirt.ml | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/output/output_kubevirt.ml b/output/output_kubevirt.ml
index d41b5d8e..ee89fdbf 100644
--- a/output/output_kubevirt.ml
+++ b/output/output_kubevirt.ml
@@ -35,7 +35,7 @@ let rfc1123_re =
"[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
module Kubevirt = struct
- type poptions = output_allocation * string * string * string
+ type poptions = bool * output_allocation * string * string * string
type t = unit
@@ -46,11 +46,22 @@ module Kubevirt = struct
| None -> ""
let query_output_options () =
- printf (f_"No output options can be used in this mode.\n")
+ printf (f_"Output options that can be used with -o kubevirt:
+
+ -oo compressed Compress the output file (used only with -of qcow2)
+")
+
let parse_options options source =
- if options.output_options <> [] then
- error (f_"no -oo (output options) are allowed here");
+ let compressed = ref false in
+ List.iter (
+ function
+ | "compressed", "" -> compressed := true
+ | "compressed", v -> compressed := bool_of_string v
+ | k, _ ->
+ error (f_"-o kubevirt: unknown output option -oo %s") k
+ ) options.output_options;
+
if options.output_password <> None then
error_option_cannot_be_used_in_output_mode "kubevirt" "-op";
@@ -73,11 +84,13 @@ module Kubevirt = struct
end with an alphanumeric character. Rerun virt-v2v with \
the '-on name' option to rename it.");
- options.output_alloc, options.output_format, output_name, output_storage
+ !compressed, options.output_alloc, options.output_format,
+ output_name, output_storage
let setup dir options source =
let disks = get_disks dir in
- let output_alloc, output_format, output_name, output_storage = options in
+ let compressed, output_alloc, output_format, output_name, output_storage =
+ options in
List.iter (
fun (i, size) ->
@@ -86,11 +99,12 @@ module Kubevirt = struct
(* Create the actual output disk. *)
let outdisk = disk_path output_storage output_name i in
- output_to_local_file output_alloc output_format outdisk size socket
+ output_to_local_file ~compressed output_alloc output_format
+ outdisk size socket
) disks
let finalize dir options () source inspect target_meta =
- let output_alloc, output_format, output_name, output_storage = options in
+ let _, output_alloc, output_format, output_name, output_storage = options in
let doc = create_kubevirt_yaml source inspect target_meta
(disk_path output_storage output_name)

View File

@ -1,62 +0,0 @@
From 8802e8b4135c913f206508c8f7650a9f99ee6667 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 30 Jan 2023 09:17:33 +0000
Subject: [PATCH] v2v: Remove use of ~anchored
In various places we used PCRE.compile ~anchored:true (PCRE2_ANCHORED)
thinking it means that the regular expression is anchored at both
ends. However this is not what it means (it only anchors the start).
Replace with ^...$
(cherry picked from commit 8c316ed125e26583edc72eb9e953499b0078dcbd)
---
in-place/in_place.ml | 4 ++--
inspector/inspector.ml | 4 ++--
v2v/v2v.ml | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/in-place/in_place.ml b/in-place/in_place.ml
index 55541814..f76651e6 100644
--- a/in-place/in_place.ml
+++ b/in-place/in_place.ml
@@ -29,8 +29,8 @@ open Types
open Utils
(* Matches --mac command line parameters. *)
-let mac_re = PCRE.compile ~anchored:true "([[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}):(network|bridge|ip):(.*)"
-let mac_ip_re = PCRE.compile ~anchored:true "([[:xdigit:]]|:|\\.)+"
+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:]]|:|\\.)+$"
let rec main () =
let set_string_option_once optname optref arg =
diff --git a/inspector/inspector.ml b/inspector/inspector.ml
index 13d58df3..d12d85c2 100644
--- a/inspector/inspector.ml
+++ b/inspector/inspector.ml
@@ -30,8 +30,8 @@ open Utils
open DOM
(* Matches --mac command line parameters. *)
-let mac_re = PCRE.compile ~anchored:true "([[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}):(network|bridge|ip):(.*)"
-let mac_ip_re = PCRE.compile ~anchored:true "([[:xdigit:]]|:|\\.)+"
+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:]]|:|\\.)+$"
let rec main () =
let set_string_option_once optname optref arg =
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 1e8d03ef..7a01eab5 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -34,8 +34,8 @@ open Types
open Utils
(* Matches --mac command line parameters. *)
-let mac_re = PCRE.compile ~anchored:true "([[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}):(network|bridge|ip):(.*)"
-let mac_ip_re = PCRE.compile ~anchored:true "([[:xdigit:]]|:|\\.)+"
+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:]]|:|\\.)+$"
let rec main () =
let set_string_option_once optname optref arg =

View File

@ -1,34 +0,0 @@
From 628ee708464ee3d266609167c48e92f883849e4d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 30 Jan 2023 09:01:38 +0000
Subject: [PATCH] -o kubevirt: Replace PCRE ~anchored with ^...$
Because this regexp was not anchored at both ends it would still
report a match for incorrect names.
Fixes: commit 8a9c914544a49bed13eb5baf42290f835bdee7b5
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2162332
Reported-by: Ming Xie
Cherry picked from commit 050a0ba714ddf2a5d81515c886032016aa75342c.
I did not include the update to the common module since picking that
would pull in the large changes made to the virtio driver code.
---
output/output_kubevirt.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/output/output_kubevirt.ml b/output/output_kubevirt.ml
index ee89fdbf..fdf0f279 100644
--- a/output/output_kubevirt.ml
+++ b/output/output_kubevirt.ml
@@ -31,8 +31,8 @@ open Create_kubevirt_yaml
(* Valid output names for Kubevirt (RHBZ#2162332). *)
let rfc1123_re =
- PCRE.compile ~anchored:true
- "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
+ PCRE.compile
+ "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
module Kubevirt = struct
type poptions = bool * output_allocation * string * string * string

View File

@ -1,48 +0,0 @@
From a9630d3981cbf7f6083e82f4e22cff981d11a8b3 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Feb 2023 12:29:00 +0000
Subject: [PATCH] -o libvirt: Add correct xmlns:libosinfo for Rocky Linux
Also a small whitespace fix and improve the warning message.
Updates: commit db831c167b7bf757aa79dbe3db5fa8c5fd8cfc99
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2166618
Reported-by: Ming Xie
(cherry picked from commit ebfdca56bca69284f289e3db8a6e6baf6bc617f0)
---
output/create_libvirt_xml.ml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/output/create_libvirt_xml.ml b/output/create_libvirt_xml.ml
index e1c1f616..388fae5b 100644
--- a/output/create_libvirt_xml.ml
+++ b/output/create_libvirt_xml.ml
@@ -47,6 +47,10 @@ let get_osinfo_id = function
when major >= 8 ->
Some (sprintf "http://centos.org/centos/%d" major)
+ | { i_type = "linux"; i_distro = "rocky";
+ i_major_version = major; i_minor_version = minor } ->
+ Some (sprintf "http://rockylinux.org/rocky/%d.%d" major minor)
+
| { i_type = "linux"; i_distro = "sles";
i_major_version = major; i_minor_version = 0;
i_product_name = product } when String.find product "Desktop" >= 0 ->
@@ -140,7 +144,8 @@ let get_osinfo_id = function
| { i_type = typ; i_distro = distro;
i_major_version = major; i_minor_version = minor; i_arch = arch;
i_product_name = product } ->
- warning (f_"unknown guest operating system: %s %s %d.%d %s (%s)")
+ warning (f_"get_osinfo_id: unknown guest operating system: \
+ %s %s %d.%d %s (%s)")
typ distro major minor arch product;
None
@@ -160,7 +165,6 @@ let create_libvirt_xml ?pool source inspect
| Some genid -> List.push_back body (e "genid" [] [PCData genid])
);
-
(match get_osinfo_id inspect with
| None -> ()
| Some osinfo_id ->

View File

@ -1,42 +0,0 @@
From 227313ca73d24eaaa0b82aca94de2278bca0f95b Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 6 Feb 2023 12:13:25 +0000
Subject: [PATCH] convert: linux: Require host cpu for all RHEL-alike >= 9
RHEL >= 9 and compatible distros like Rocky >= 9 will not boot using
the default qemu CPU. You will see an error at boot:
Fatal glibc error: CPU does not support x86-64-v2
Instead you need to use -cpu host.
In commit f28757c6d1 ("convert_linux: set "gcaps_default_cpu = false"
for x86_64 RHEL-9.0+ guests") we fixed this specifically for RHEL >= 9.
This commit extends the same fix to all RHEL family distros.
Updates: commit f28757c6d100060c65212ea55cfa59d308dcb850
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2166619
Reported-by: Ming Xie
Thanks: Laszlo Ersek
(cherry picked from commit 9f12b95bbe7bc2850ce4ba134c46a3cc5fd1167d)
---
convert/convert_linux.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/convert/convert_linux.ml b/convert/convert_linux.ml
index 41767e62..27bc4ae4 100644
--- a/convert/convert_linux.ml
+++ b/convert/convert_linux.ml
@@ -202,9 +202,9 @@ let convert (g : G.guestfs) source inspect keep_serial_console _ =
(* RHEL >= 9.0 on x86_64 requires the processor to support the "x86-64-v2"
* microarchitecture level, which the default QEMU VCPU model does not
- * satisfy. Refer to RHBZ#2076013.
+ * satisfy. Refer to RHBZ#2076013 RHBZ#2166619.
*)
- let default_cpu_suffices = inspect.i_distro <> "rhel" ||
+ let default_cpu_suffices = family <> `RHEL_family ||
inspect.i_arch <> "x86_64" ||
inspect.i_major_version < 9 in

View File

@ -1,34 +0,0 @@
From e7aa456e26e59bfa5cca1299ef2cb5299592d9da Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Wed, 5 Apr 2023 17:08:28 +0200
Subject: [PATCH] detect_kernels: tighten "try" scope
We want to catch Not_found from (our own implementation of)
"List.find_map". There's no need (and it makes no sense) to push the
"prefix_len" calculation down into the "try" scope. Keep the "try" scope
as narrow as possible.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2175703
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Vera Wu <vwu@redhat.com>
(ported from libguestfs-common commit 4003815a994944cab38d48cfc96f16382de62987)
Message-Id: <20230405150829.171720-2-lersek@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
---
convert/linux_kernels.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/convert/linux_kernels.ml b/convert/linux_kernels.ml
index 6e9d2bdd..75ab94c4 100644
--- a/convert/linux_kernels.ml
+++ b/convert/linux_kernels.ml
@@ -122,8 +122,8 @@ let detect_kernels (g : G.guestfs) inspect family bootloader =
*)
let modpath, version =
let prefix = "/lib/modules/" in
+ let prefix_len = String.length prefix in
try
- let prefix_len = String.length prefix in
List.find_map (
fun filename ->
let filename_len = String.length filename in

View File

@ -1,97 +0,0 @@
From 9449d21eeae81d4283e74d7cdccf776e695783f0 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Wed, 5 Apr 2023 17:08:29 +0200
Subject: [PATCH] detect_kernels: deal with RHEL's kernel-core /
kernel-modules-core split
In "kernel-5.14.0-269.el9", the "kernel-modules-core" subpackage got split
from the "kernel-core" subpackage. Therefore, a single binary RPM
containing *both* the "/boot/vmlinuz-5.14.0-269.el9.x86_64" file *and* the
"/lib/modules/5.14.0-269.el9.x86_64" directory no longer exists. The file
now belongs to "kernel-core", and the directory to "kernel-modules-core".
As a result, when we investigate the file list of "kernel-core" (based on
"kernel-core" providing "/boot/vmlinuz-5.14.0-269.el9.x86_64"), the first
match against "/lib/modules/" is not the actual module root directory
"/lib/modules/5.14.0-269.el9.x86_64", but the nonsensical
"/lib/modules/5.14.0-269.el9.x86_64/.vmlinuz.hmac" regular file. This
latter file is never a directory, therefore we rule out "kernel-core" as a
kernel package.
We also rule out "kernel-modules-core" (even earlier) because it does not
contain "/boot/vmlinuz-5.14.0-269.el9.x86_64".
Now, the code already deals with the case if the prospective kernel
package *does not provide a match* for the "/lib/modules/" prefix: in that
case, we construct the modpath manually, from said prefix, and the version
number found in "/boot/vmlinuz-<version>". This fallback is good, but it's
unreachable if *there is* a candidate, it's just wrong (i.e., not a
directory).
Perform the "is_dir" check on the candidate modpath earlier, so that we
can fall back to the manual modpath construction if the modpath candidate
exists, but is wrong.
With this, the original "is_dir" check becomes superfluous (duplicated)
*except* when the "Not_found" branch is taken. Therefore, hoist the
original "is_dir" check into that branch.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2175703
Reported-by: Vera Wu <vwu@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Vera Wu <vwu@redhat.com>
(ported from libguestfs-common commit 70c10a079a30ff3a84f38596d725a6c5d46e2470)
Message-Id: <20230405150829.171720-3-lersek@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
---
convert/linux_kernels.ml | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/convert/linux_kernels.ml b/convert/linux_kernels.ml
index 75ab94c4..d0b31643 100644
--- a/convert/linux_kernels.ml
+++ b/convert/linux_kernels.ml
@@ -124,7 +124,7 @@ let detect_kernels (g : G.guestfs) inspect family bootloader =
let prefix = "/lib/modules/" in
let prefix_len = String.length prefix in
try
- List.find_map (
+ let modpath, version = List.find_map (
fun filename ->
let filename_len = String.length filename in
if filename_len > prefix_len &&
@@ -134,17 +134,29 @@ let detect_kernels (g : G.guestfs) inspect family bootloader =
Some (filename, version)
) else
None
- ) files
+ ) files in
+ (* Fall back to the version in the vmlinuz file name not only if
+ * a candidate pathname couldn't be found under /lib/modules/,
+ * but also in case the candidate pathname doesn't reference a
+ * directory. See RHBZ#2175703.
+ *
+ * Note that this "is_dir" check is deliberately kept outside of
+ * the "find_map"'s mapper function above: we want the first
+ * candidate *to be* a directory, and not the first candidate
+ * *that is* a directory.
+ *)
+ if not (g#is_dir ~followsymlinks:true modpath) then
+ raise Not_found;
+ modpath, version
with Not_found ->
let version =
String.sub vmlinuz 14 (String.length vmlinuz - 14) in
let modpath = prefix ^ version in
+ (* Check that the modpath exists. *)
+ if not (g#is_dir ~followsymlinks:true modpath) then
+ raise Not_found;
modpath, version in
- (* Check that the modpath exists. *)
- if not (g#is_dir ~followsymlinks:true modpath) then
- raise Not_found;
-
(* Find the initramfs which corresponds to the kernel.
* Since the initramfs is built at runtime, and doesn't have
* to be covered by the RPM file list, this is basically

View File

@ -7,7 +7,7 @@ set -e
# ./copy-patches.sh # ./copy-patches.sh
project=virt-v2v project=virt-v2v
rhel_version=9.2 rhel_version=9.3
# Check we're in the right directory. # Check we're in the right directory.
if [ ! -f $project.spec ]; then if [ ! -f $project.spec ]; then

View File

@ -1,2 +1,2 @@
SHA512 (virt-v2v-2.2.0.tar.gz) = 8251d8b232cc93d2ebd8a9d21d6807795559928c557a34dbc84a72473f548df85268521b7a803ef26b3abe2ef21170ab8d8d923a99d5228b761586d43bebb81f SHA512 (virt-v2v-2.3.4.tar.gz) = 0ed49b4bcfc17d1ef769eb740fc70f16d1c8a53b0f6135e758bbc7bbad619302ec158db17bba7673bcfcf702c90f324c34135a4fc3221f7324af0b1780d9d75f
SHA512 (virt-v2v-2.2.0.tar.gz.sig) = 40ceb183c48d673dcd2a42b394ade98753f5cb2abc6978c7ba33c461dee77c4b1c461cce55fa188d594297c47e9d8cff9d01e8eabd63fdc2eadeea65327156c2 SHA512 (virt-v2v-2.3.4.tar.gz.sig) = 6a59411c1a9fa14ee065076d1e96df4071eccbef6415c70889f02234fd3fe4daba854e70b1b7c761d3017f1c8ebf640fa4c1663da35b1c5763e350f1eb6adf10

View File

@ -11,12 +11,12 @@
%endif %endif
# The source directory. # The source directory.
%global source_directory 2.2-stable %global source_directory 2.3-development
Name: virt-v2v Name: virt-v2v
Epoch: 1 Epoch: 1
Version: 2.2.0 Version: 2.3.4
Release: 6%{?dist} Release: 1%{?dist}
Summary: Convert a virtual machine to run on KVM Summary: Convert a virtual machine to run on KVM
License: GPLv2+ License: GPLv2+
@ -33,40 +33,20 @@ Source2: libguestfs.keyring
Source3: copy-patches.sh Source3: copy-patches.sh
# Patches are maintained in the following repository: # Patches are maintained in the following repository:
# https://github.com/libguestfs/virt-v2v/commits/rhel-9.2 # https://github.com/libguestfs/virt-v2v/commits/rhel-9.3
# Patches. # Patches.
Patch0001: 0001-test-v2v-fedora-btrfs-conversion-spell-out-btrfs-fea.patch Patch0001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch0002: 0002-test-v2v-i-ova-spell-out-ntfs-feature-group-dependen.patch Patch0002: 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Patch0003: 0003-Translated-using-Weblate-Finnish.patch Patch0003: 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch0004: 0004-Translated-using-Weblate-Georgian.patch Patch0004: 0004-RHEL-Fixes-for-libguestfs-winsupport.patch
Patch0005: 0005-Update-translation-files.patch Patch0005: 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch0006: 0006-Translated-using-Weblate-Ukrainian.patch Patch0006: 0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch
Patch0007: 0007-convert-windows-Remove-extraneous-blank-lines-in-sou.patch Patch0007: 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch0008: 0008-convert-windows-Document-what-copy_qemu_ga-function-.patch Patch0008: 0008-RHEL-Disable-o-glance.patch
Patch0009: 0009-convert-windows-Remove-unused-open-Utils.patch Patch0009: 0009-RHEL-Remove-the-in-place-option.patch
Patch0010: 0010-o-kubevirt-Fix-mistake-in-error-message.patch Patch0010: 0010-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch
Patch0011: 0011-o-kubevirt-Move-cpu-element-under-domain.patch Patch0011: 0011-RHEL-9-tests-Remove-btrfs-test.patch
Patch0012: 0012-o-kubevirt-Error-on-invalid-output-guest-names.patch
Patch0013: 0013-Split-long-lines-in-messages.patch
Patch0014: 0014-o-kubevirt-Implement-oo-compressed-for-qcow2-files.patch
Patch0015: 0015-v2v-Remove-use-of-anchored.patch
Patch0016: 0016-o-kubevirt-Replace-PCRE-anchored-with.patch
Patch0017: 0017-o-libvirt-Add-correct-xmlns-libosinfo-for-Rocky-Linu.patch
Patch0018: 0018-convert-linux-Require-host-cpu-for-all-RHEL-alike-9.patch
Patch0019: 0019-detect_kernels-tighten-try-scope.patch
Patch0020: 0020-detect_kernels-deal-with-RHEL-s-kernel-core-kernel-m.patch
Patch0021: 0021-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch0022: 0022-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Patch0023: 0023-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch0024: 0024-RHEL-Fixes-for-libguestfs-winsupport.patch
Patch0025: 0025-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch0026: 0026-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch
Patch0027: 0027-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch0028: 0028-RHEL-Disable-o-glance.patch
Patch0029: 0029-RHEL-Remove-the-in-place-option.patch
Patch0030: 0030-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch
Patch0031: 0031-RHEL-9-tests-Remove-btrfs-test.patch
%if !0%{?rhel} %if !0%{?rhel}
# libguestfs hasn't been built on i686 for a while since there is no # libguestfs hasn't been built on i686 for a while since there is no
@ -94,7 +74,7 @@ BuildRequires: /usr/bin/pod2man
BuildRequires: gcc BuildRequires: gcc
BuildRequires: ocaml >= 4.04 BuildRequires: ocaml >= 4.04
BuildRequires: libguestfs-devel >= 1:1.44 BuildRequires: libguestfs-devel >= 1:1.49.8-1
BuildRequires: augeas-devel BuildRequires: augeas-devel
BuildRequires: bash-completion BuildRequires: bash-completion
BuildRequires: file-devel BuildRequires: file-devel
@ -137,8 +117,8 @@ BuildRequires: glibc-static
BuildRequires: gnupg2 BuildRequires: gnupg2
%endif %endif
Requires: libguestfs%{?_isa} >= 1:1.48.4-4.el9 Requires: libguestfs%{?_isa} >= 1:1.49.8-1
Requires: guestfs-tools >= 1.42 Requires: guestfs-tools >= 1.49.7-1
# XFS is the default filesystem in Fedora and RHEL. # XFS is the default filesystem in Fedora and RHEL.
Requires: libguestfs-xfs Requires: libguestfs-xfs
@ -355,9 +335,15 @@ done
%changelog %changelog
* Thu Apr 20 2023 Richard W.M. Jones <rjones@redhat.com> - 1:2.3.4-1
- Rebase to virt-v2v 2.3.4
resolves: rhbz#2187961, rhbz#2175703, rhbz#2172075, rhbz#2168082,
rhbz#1986386
* Sun Apr 09 2023 Laszlo Ersek <lersek@redhat.com> - 1:2.2.0-6 * Sun Apr 09 2023 Laszlo Ersek <lersek@redhat.com> - 1:2.2.0-6
- cope with kernel-core / kernel-modules-core subpackage split in RHEL-9.2 guests - cope with kernel-core / kernel-modules-core subpackage split in RHEL-9.2 guests
resolves: rhbz#2184970 resolves: rhbz#2184970
* Mon Feb 06 2023 Richard W.M. Jones <rjones@redhat.com> - 1:2.2.0-5 * Mon Feb 06 2023 Richard W.M. Jones <rjones@redhat.com> - 1:2.2.0-5
- Rebase to virt-v2v 2.2.0 - Rebase to virt-v2v 2.2.0
resolves: rhbz#2135762 resolves: rhbz#2135762