diff --git a/SOURCES/0001-Switch-from-YAJL-to-Jansson.patch b/SOURCES/0001-Switch-from-YAJL-to-Jansson.patch index 0ec2f15..e773fea 100644 --- a/SOURCES/0001-Switch-from-YAJL-to-Jansson.patch +++ b/SOURCES/0001-Switch-from-YAJL-to-Jansson.patch @@ -26,13 +26,13 @@ API of our OCaml Yajl module. contrib/p2v/aux-scripts/do-build.sh | 8 +- contrib/p2v/build-p2v-iso.sh | 3 +- daemon/Makefile.am | 4 +- - daemon/ldm.c | 113 ++++++++++++---------------- + daemon/ldm.c | 115 ++++++++++++---------------- docs/guestfs-building.pod | 2 +- lib/Makefile.am | 4 +- - lib/info.c | 113 +++++++++++----------------- + lib/info.c | 113 +++++++++++---------------- lib/qemu.c | 64 ++++++---------- m4/guestfs-libraries.m4 | 4 +- - 12 files changed, 168 insertions(+), 230 deletions(-) + 12 files changed, 169 insertions(+), 231 deletions(-) diff --git a/appliance/packagelist.in b/appliance/packagelist.in index 8ded2588a..f92a6ce95 100644 @@ -472,6 +472,10 @@ index 2f4d2aef3..be4fb9701 100644 - if (! YAJL_IS_OBJECT (tree)) + if (!json_is_object (tree)) ++ goto bad_type; ++ ++ node = json_object_get (tree, key); ++ if (node == NULL) goto bad_type; - len = YAJL_GET_OBJECT (tree)->len; @@ -491,10 +495,7 @@ index 2f4d2aef3..be4fb9701 100644 - reply_with_perror ("strdup"); - - yajl_tree_free (tree); -+ node = json_object_get (tree, key); -+ if (node == NULL) -+ goto bad_type; - +- - return ret; - } + if ((flags & GET_STRING_NULL_TO_EMPTY) && json_is_null (node)) @@ -796,10 +797,10 @@ index 93fadcd39..2eadc1c11 100644 - /* 'input' is not \0-terminated; we have to make it so. */ - input_copy = safe_strndup (g, input, len); +- +- debug (g, "%s: qemu-img info JSON output:\n%s\n", __func__, input_copy); + debug (g, "%s: qemu-img info JSON output:\n%.*s\n", __func__, (int) len, input); -- debug (g, "%s: qemu-img info JSON output:\n%s\n", __func__, input_copy); -- - *tree_ret = yajl_tree_parse (input_copy, parse_error, sizeof parse_error); + *tree_ret = json_loadb (input, len, 0, &err); if (*tree_ret == NULL) { diff --git a/SOURCES/0082-RHEL-8-p2v-ignore-rhv-upload-driver-RHBZ-1590220.patch b/SOURCES/0082-RHEL-8-p2v-ignore-rhv-upload-driver-RHBZ-1590220.patch deleted file mode 100644 index 36c0b8a..0000000 --- a/SOURCES/0082-RHEL-8-p2v-ignore-rhv-upload-driver-RHBZ-1590220.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 93f372409647c43c0a67b5491c84f262938d517e Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Thu, 19 Jul 2018 13:30:17 +0200 -Subject: [PATCH] RHEL 8: p2v: ignore 'rhv-upload' driver (RHBZ#1590220) - -The 'rhv-upload' output mode requires few options, and virt-p2v does not -have the GUI bits for specifying them. ---- - p2v/ssh.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/p2v/ssh.c b/p2v/ssh.c -index 15f53b692..654121a22 100644 ---- a/p2v/ssh.c -+++ b/p2v/ssh.c -@@ -1021,8 +1021,12 @@ add_input_driver (const char *name, size_t len) - static void - add_output_driver (const char *name, size_t len) - { -- /* Ignore the 'vdsm' driver, since that should only be used by VDSM. */ -- if (len != 4 || memcmp (name, "vdsm", 4) != 0) -+ /* Ignore the 'vdsm' driver, since that should only be used by VDSM. -+ * Ignore the 'rhv-upload' driver, since we do not support passing all the -+ * options for it. -+ */ -+ if ((len != 4 || memcmp (name, "vdsm", 4) != 0) && -+ (len != 10 || memcmp (name, "rhv-upload", 10) != 0)) - add_option ("output", &output_drivers, name, len); - } - --- -2.21.0 - diff --git a/SOURCES/0082-RHEL-8-use-python3-as-nbdkit-plugin.patch b/SOURCES/0082-RHEL-8-use-python3-as-nbdkit-plugin.patch new file mode 100644 index 0000000..3f8a864 --- /dev/null +++ b/SOURCES/0082-RHEL-8-use-python3-as-nbdkit-plugin.patch @@ -0,0 +1,26 @@ +From ff4f831122bd04c77d4363042eab4b82ad789c6b Mon Sep 17 00:00:00 2001 +From: Pino Toscano +Date: Sun, 16 Dec 2018 16:32:46 +0100 +Subject: [PATCH] RHEL 8: use "python3" as nbdkit plugin + +RHEL uses "python3" as name for the nbdkit Python plugin. +--- + v2v/output_rhv_upload.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml +index 3977c0296..13c175f2d 100644 +--- a/v2v/output_rhv_upload.ml ++++ b/v2v/output_rhv_upload.ml +@@ -79,7 +79,7 @@ let parse_output_options options = + { rhv_cafile; rhv_cluster; rhv_direct; rhv_verifypeer } + + let python3 = "python3" (* Defined by PEP 394 *) +-let nbdkit_python_plugin = "python" ++let nbdkit_python_plugin = "python3" + let pidfile_timeout = 30 + let finalization_timeout = 5*60 + +-- +2.21.0 + diff --git a/SOURCES/0083-RHEL-8-use-platform-python.patch b/SOURCES/0083-RHEL-8-use-platform-python.patch new file mode 100644 index 0000000..7d9e27d --- /dev/null +++ b/SOURCES/0083-RHEL-8-use-platform-python.patch @@ -0,0 +1,38 @@ +From 83e68a8844c9c20fbee98dc784fd82f60e225417 Mon Sep 17 00:00:00 2001 +From: Pino Toscano +Date: Sun, 16 Dec 2018 16:42:46 +0100 +Subject: [PATCH] RHEL 8: use platform-python + +Use the stable platform-python provided in BaseOS, instead of relying on +some arbitrary version installed by the user. +--- + v2v/output_rhv_upload.ml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml +index 13c175f2d..f95ac0d65 100644 +--- a/v2v/output_rhv_upload.ml ++++ b/v2v/output_rhv_upload.ml +@@ -78,7 +78,7 @@ let parse_output_options options = + + { rhv_cafile; rhv_cluster; rhv_direct; rhv_verifypeer } + +-let python3 = "python3" (* Defined by PEP 394 *) ++let python3 = "/usr/libexec/platform-python" + let nbdkit_python_plugin = "python3" + let pidfile_timeout = 30 + let finalization_timeout = 5*60 +@@ -121,8 +121,8 @@ class output_rhv_upload output_alloc output_conn + + (* Check that the Python binary is available. *) + let error_unless_python_binary_on_path () = +- try ignore (which python3) +- with Executable_not_found _ -> ++ try ignore (Unix.access python3 [Unix.X_OK]) ++ with Unix_error _ -> + error (f_"no python binary called ā€˜%sā€™ can be found on the $PATH") + python3 + in +-- +2.21.0 + diff --git a/SOURCES/0083-RHEL-8-use-python3-as-nbdkit-plugin.patch b/SOURCES/0083-RHEL-8-use-python3-as-nbdkit-plugin.patch deleted file mode 100644 index 27673b0..0000000 --- a/SOURCES/0083-RHEL-8-use-python3-as-nbdkit-plugin.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 4cab81b3b3d69d618c7e36d9767b49834fa63b98 Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Sun, 16 Dec 2018 16:32:46 +0100 -Subject: [PATCH] RHEL 8: use "python3" as nbdkit plugin - -RHEL uses "python3" as name for the nbdkit Python plugin. ---- - v2v/output_rhv_upload.ml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml -index 3977c0296..13c175f2d 100644 ---- a/v2v/output_rhv_upload.ml -+++ b/v2v/output_rhv_upload.ml -@@ -79,7 +79,7 @@ let parse_output_options options = - { rhv_cafile; rhv_cluster; rhv_direct; rhv_verifypeer } - - let python3 = "python3" (* Defined by PEP 394 *) --let nbdkit_python_plugin = "python" -+let nbdkit_python_plugin = "python3" - let pidfile_timeout = 30 - let finalization_timeout = 5*60 - --- -2.21.0 - diff --git a/SOURCES/0084-RHEL-8-use-platform-python.patch b/SOURCES/0084-RHEL-8-use-platform-python.patch deleted file mode 100644 index 1f43058..0000000 --- a/SOURCES/0084-RHEL-8-use-platform-python.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 04e1cfaae9deaf43774fcdbe6ef57aeba332ba81 Mon Sep 17 00:00:00 2001 -From: Pino Toscano -Date: Sun, 16 Dec 2018 16:42:46 +0100 -Subject: [PATCH] RHEL 8: use platform-python - -Use the stable platform-python provided in BaseOS, instead of relying on -some arbitrary version installed by the user. ---- - v2v/output_rhv_upload.ml | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml -index 13c175f2d..f95ac0d65 100644 ---- a/v2v/output_rhv_upload.ml -+++ b/v2v/output_rhv_upload.ml -@@ -78,7 +78,7 @@ let parse_output_options options = - - { rhv_cafile; rhv_cluster; rhv_direct; rhv_verifypeer } - --let python3 = "python3" (* Defined by PEP 394 *) -+let python3 = "/usr/libexec/platform-python" - let nbdkit_python_plugin = "python3" - let pidfile_timeout = 30 - let finalization_timeout = 5*60 -@@ -121,8 +121,8 @@ class output_rhv_upload output_alloc output_conn - - (* Check that the Python binary is available. *) - let error_unless_python_binary_on_path () = -- try ignore (which python3) -- with Executable_not_found _ -> -+ try ignore (Unix.access python3 [Unix.X_OK]) -+ with Unix_error _ -> - error (f_"no python binary called ā€˜%sā€™ can be found on the $PATH") - python3 - in --- -2.21.0 - diff --git a/SPECS/libguestfs.spec b/SPECS/libguestfs.spec index f24a9f1..1b82d8a 100644 --- a/SPECS/libguestfs.spec +++ b/SPECS/libguestfs.spec @@ -37,7 +37,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.38.4 -Release: 14%{?dist} +Release: 15%{?dist} License: LGPLv2+ # Source and patches. @@ -47,7 +47,7 @@ Source0: http://libguestfs.org/download/1.38-stable/%{name}-%{version}.tar Source1: http://libguestfs.org/download/1.38-stable/%{name}-%{version}.tar.gz.sig %endif -ExclusiveArch: x86_64 %{power64} aarch64 s390x %{arm} +ExclusiveArch: x86_64 %{power64} aarch64 s390x # RHEL 8 git repository is: # https://github.com/libguestfs/libguestfs/tree/rhel-8.0 @@ -136,9 +136,8 @@ Patch0078: 0078-RHEL-8-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch Patch0079: 0079-RHEL-8-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-143020.patch Patch0080: 0080-RHEL-8-v2v-disable-unconfig-of-manually-installed-VM.patch Patch0081: 0081-RHEL-8-v2v-rhv-upload-Remove-restriction-on-oa-spars.patch -Patch0082: 0082-RHEL-8-p2v-ignore-rhv-upload-driver-RHBZ-1590220.patch -Patch0083: 0083-RHEL-8-use-python3-as-nbdkit-plugin.patch -Patch0084: 0084-RHEL-8-use-platform-python.patch +Patch0082: 0082-RHEL-8-use-python3-as-nbdkit-plugin.patch +Patch0083: 0083-RHEL-8-use-platform-python.patch # Use git for patch management. BuildRequires: git @@ -216,8 +215,6 @@ BuildRequires: /usr/bin/ping BuildRequires: /usr/bin/wget BuildRequires: curl BuildRequires: xz -BuildRequires: gtk3-devel -BuildRequires: dbus-devel BuildRequires: /usr/bin/qemu-img BuildRequires: perl(Win::Hivex) BuildRequires: perl(Win::Hivex::Regedit) @@ -637,32 +634,6 @@ Virt-v2v converts virtual machines from non-KVM hypervisors to run under KVM. To convert physical machines, see the virt-p2v-maker package. - - -%package -n virt-p2v-maker -Summary: Convert a physical machine to run on KVM -License: GPLv2+ - -Requires: gawk -Requires: gzip - -# virt-p2v-make-disk runs virt-builder: -Requires: %{name}-tools-c = %{epoch}:%{version}-%{release} - -# virt-p2v-make-kickstart runs strip: -Requires: binutils - - -%description -n virt-p2v-maker -Virt-p2v converts (virtualizes) physical machines so they can be run -as virtual machines under KVM. - -This package contains the tools needed to make a virt-p2v boot CD or -USB key which is booted on the physical machine to perform the -conversion. You also need virt-v2v installed somewhere else to -complete the conversion. - -To convert virtual machines from other hypervisors, see virt-v2v. %endif @@ -882,6 +853,7 @@ export PYTHON=%{__python3} --disable-haskell \ --disable-erlang \ --disable-golang \ + --with-gtk=no \ $extra # Building index-parse.c by hand works around a race condition in the @@ -997,12 +969,8 @@ cp %{SOURCE96} $RPM_BUILD_ROOT%{_datadir}/virt-tools/rhsrvany.exe cp %{SOURCE97} $RPM_BUILD_ROOT%{_datadir}/virt-tools/rhev-apt.exe %ifnarch %{v2v_arches} -rm $RPM_BUILD_ROOT%{_bindir}/virt-p2v* rm $RPM_BUILD_ROOT%{_bindir}/virt-v2v* -rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-p2v* rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v* -rm -r $RPM_BUILD_ROOT%{_libdir}/virt-p2v -rm -r $RPM_BUILD_ROOT%{_datadir}/virt-p2v rm -r $RPM_BUILD_ROOT%{_datadir}/virt-tools %endif @@ -1013,15 +981,13 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/v2v_test_harness rm -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-test-harness.1* -%ifarch %{v2v_arches} -# Delete kiwi tools. -rm $RPM_BUILD_ROOT%{_bindir}/virt-p2v-make-kiwi -rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-p2v-make-kiwi.1* -%endif - # Remove the .gitignore file from ocaml/html which will be copied to docdir. rm ocaml/html/.gitignore +# Delete virt-p2v bash completion files, as virt-p2v was moved +# to its own source. +rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/virt-p2v-* + %ifarch %{benchmark_arches} # Copy the benchmarking tools and man pages, since upstream doesn't # install them by default. NB Don't install the libtool wrapper scripts. @@ -1191,17 +1157,6 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %{_mandir}/man1/virt-v2v.1* %{_mandir}/man1/virt-v2v-copy-to-local.1* %{_datadir}/virt-tools - - -%files -n virt-p2v-maker -%doc COPYING README -%{_bindir}/virt-p2v-make-disk -%{_bindir}/virt-p2v-make-kickstart -%{_mandir}/man1/virt-p2v.1* -%{_mandir}/man1/virt-p2v-make-disk.1* -%{_mandir}/man1/virt-p2v-make-kickstart.1* -%{_datadir}/virt-p2v -%{_libdir}/virt-p2v %endif @@ -1305,6 +1260,10 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %changelog +* Tue Dec 10 2019 Pino Toscano - 1:1.38.4-15 +- Stop building virt-p2v-maker, as it will be built by its own source + resolves: rhbz#1777924 + * Thu Aug 08 2019 Pino Toscano - 1:1.38.4-14 - v2v: use -T as argument of scp when copying vmx files via ssh resolves: rhbz#1738886