From 7fb1910c7b81a8bdb5b35e757eacb3eeda76796d Mon Sep 17 00:00:00 2001 From: charlesa <> Date: Fri, 28 Oct 2022 17:30:12 +0000 Subject: [PATCH] Update virt-v2v to version 2.0.7 / rev 8 via SR 1031599 https://build.opensuse.org/request/show/1031599 by user charlesa + dimstar_suse Sync with SLE15-SP5 changelog and spec file. Include ocaml compiler fixes for SLE15-SP5 --- packages/v/virt-v2v/.files | Bin 238 -> 374 bytes packages/v/virt-v2v/.rev | 8 ++ .../fix-compiler-error-Stdlib.stderr.patch | 70 ++++++++++++++ packages/v/virt-v2v/fix-linker-error.patch | 90 ++++++++++++++++++ packages/v/virt-v2v/virt-v2v.changes | 8 +- packages/v/virt-v2v/virt-v2v.spec | 2 + 6 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 packages/v/virt-v2v/fix-compiler-error-Stdlib.stderr.patch create mode 100644 packages/v/virt-v2v/fix-linker-error.patch diff --git a/packages/v/virt-v2v/.files b/packages/v/virt-v2v/.files index 602464305cca6bb483ed550acb0aa9057a20f990..f505b54fba92995e18b134445e186334c08d748f 100644 GIT binary patch literal 374 zcmZwBy=ufT48ZY&(hh+_mlnEZ>K0==mOq}OPaw(CUFh{LB;hE1`uc`!9R>RRrFq@# zWA|`49G<$qSWyryl!|4Wyapv6HAq#==3x2^?RPqvJA2;*Jb$J>UkowZne#3 z#*I&1PncrKk*kP!7hT~(fuJC9Vvo7C-tMjQbots#yOo?Pkc$DG0~W-R08`MMb%bJF zvoE)4*@m0H89w3VC~Mb?RJ0syM${Z*%E+}w$l`sgOU=l~jh|CgF|I(EIaoJJeQilhQ#yAutomatic submission by obs-autosubmit 990311 + + fb8962d352f46e9fa24da5c196b3cfa7 + 2.0.7 + + dimstar_suse + Sync with SLE15-SP5 changelog and spec file. Include ocaml compiler fixes for SLE15-SP5 + 1031599 + diff --git a/packages/v/virt-v2v/fix-compiler-error-Stdlib.stderr.patch b/packages/v/virt-v2v/fix-compiler-error-Stdlib.stderr.patch new file mode 100644 index 00000000000..3c1c78dd968 --- /dev/null +++ b/packages/v/virt-v2v/fix-compiler-error-Stdlib.stderr.patch @@ -0,0 +1,70 @@ +SLE15-SP5 uses ocamlc version 4.05 where the Pervasives module is +used and it has no Stdlib module. +In ocamlc version 4.07 and newer, Pervasives is deprecated +and Stdlib should be used. + +Index: virt-v2v-2.0.7/lib/create_ovf.ml +=================================================================== +--- virt-v2v-2.0.7.orig/lib/create_ovf.ml ++++ virt-v2v-2.0.7/lib/create_ovf.ml +@@ -769,7 +769,7 @@ let rec create_ovf source inspect + + if verbose () then ( + eprintf "OVF:\n"; +- doc_to_chan Stdlib.stderr ovf ++ doc_to_chan Pervasives.stderr ovf + ); + + (* Return the OVF document. *) +Index: virt-v2v-2.0.7/output/output_disk.ml +=================================================================== +--- virt-v2v-2.0.7.orig/output/output_disk.ml ++++ virt-v2v-2.0.7/output/output_disk.ml +@@ -109,7 +109,7 @@ module Disk = struct + + if verbose () then ( + eprintf "resulting local libvirt XML:\n"; +- DOM.doc_to_chan Stdlib.stderr doc; ++ DOM.doc_to_chan Pervasives.stderr doc; + eprintf "\n%!"; + ) + +Index: virt-v2v-2.0.7/output/output_json.ml +=================================================================== +--- virt-v2v-2.0.7.orig/output/output_json.ml ++++ virt-v2v-2.0.7/output/output_json.ml +@@ -138,7 +138,7 @@ module Json = struct + + if verbose () then ( + eprintf "resulting JSON:\n"; +- output_string Stdlib.stderr doc_string; ++ output_string Pervasives.stderr doc_string; + eprintf "\n\n%!"; + ); + +Index: virt-v2v-2.0.7/output/output_libvirt.ml +=================================================================== +--- virt-v2v-2.0.7.orig/output/output_libvirt.ml ++++ virt-v2v-2.0.7/output/output_libvirt.ml +@@ -171,7 +171,7 @@ module Libvirt_ = struct + + if verbose () then ( + eprintf "resulting XML for libvirt:\n%!"; +- DOM.doc_to_chan Stdlib.stderr doc; ++ DOM.doc_to_chan Pervasives.stderr doc; + eprintf "\n%!"; + ); + +Index: virt-v2v-2.0.7/convert/convert.ml +=================================================================== +--- virt-v2v-2.0.7.orig/convert/convert.ml ++++ virt-v2v-2.0.7/convert/convert.ml +@@ -130,7 +130,7 @@ and get_mpstats g = + if verbose () then ( + (* This is useful for debugging speed / fstrim issues. *) + eprintf "mpstats:\n"; +- List.iter (print_mpstat Stdlib.stderr) mpstats ++ List.iter (print_mpstat Pervasives.stderr) mpstats + ); + + mpstats diff --git a/packages/v/virt-v2v/fix-linker-error.patch b/packages/v/virt-v2v/fix-linker-error.patch new file mode 100644 index 00000000000..beb2e013fbf --- /dev/null +++ b/packages/v/virt-v2v/fix-linker-error.patch @@ -0,0 +1,90 @@ +Resolves the following error. +Similar to libguestfs commit 489b14b75e5f30010d8a8c8d3a10ecc52b629563 + +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/ocaml/guestfs/libmlguestfs.a(libguestfsocaml_a-guestfs-c.o): in function `guestfs_finalize': +/home/abuild/rpmbuild/BUILD/libguestfs-1.44.2/ocaml/guestfs-c.c:86: undefined reference to `rpl_free' +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/abuild/rpmbuild/BUILD/libguestfs-1.44.2/ocaml/guestfs-c.c:88: undefined reference to `rpl_free' +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/ocaml/guestfs/libmlguestfs.a(libguestfsocaml_a-guestfs-c.o): in function `guestfs_int_ocaml_set_event_callback': +/home/abuild/rpmbuild/BUILD/libguestfs-1.44.2/ocaml/guestfs-c.c:239: undefined reference to `rpl_free' +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/ocaml/guestfs/libmlguestfs.a(libguestfsocaml_a-guestfs-c.o): in function `guestfs_int_ocaml_delete_event_callback': +/home/abuild/rpmbuild/BUILD/libguestfs-1.44.2/ocaml/guestfs-c.c:266: undefined reference to `rpl_free' +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/ocaml/guestfs/libmlguestfs.a(libguestfsocaml_a-guestfs-c.o): in function `guestfs_int_ocaml_event_to_string': +/home/abuild/rpmbuild/BUILD/libguestfs-1.44.2/ocaml/guestfs-c.c:290: undefined reference to `rpl_free' +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/ocaml/guestfs/libmlguestfs.a(libguestfsocaml_a-guestfs-c-actions.o):/home/abuild/rpmbuild/BUILD/libguestfs-1.44.2/ocaml/guestfs-c-actions.c:1188: more undefined references to `rpl_free' follow +collect2: error: ld returned 1 exit status +File "caml_startup", line 1: +Error: Error during linking + + +Index: virt-v2v-1.44.0/gnulib/lib/free.c +=================================================================== +--- /dev/null ++++ virt-v2v-1.44.0/gnulib/lib/free.c +@@ -0,0 +1,53 @@ ++/* Make free() preserve errno. ++ ++ Copyright (C) 2003, 2006, 2009-2021 Free Software Foundation, Inc. ++ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. ++ ++ This file is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ ++ ++/* written by Paul Eggert */ ++ ++#include ++ ++/* Specification. */ ++#include ++ ++/* A function definition is only needed if HAVE_FREE_POSIX is not defined. */ ++#if !HAVE_FREE_POSIX ++ ++# include ++ ++void ++rpl_free (void *p) ++# undef free ++{ ++# if defined __GNUC__ && !defined __clang__ ++ /* An invalid GCC optimization ++ ++ would optimize away the assignments in the code below, when link-time ++ optimization (LTO) is enabled. Make the code more complicated, so that ++ GCC does not grok how to optimize it. */ ++ int err[2]; ++ err[0] = errno; ++ err[1] = errno; ++ errno = 0; ++ free (p); ++ errno = err[errno == 0]; ++# else ++ int err = errno; ++ free (p); ++ errno = err; ++# endif ++} ++ ++#endif +Index: virt-v2v-1.44.0/gnulib/lib/Makefile.am +=================================================================== +--- virt-v2v-1.44.0.orig/gnulib/lib/Makefile.am ++++ virt-v2v-1.44.0/gnulib/lib/Makefile.am +@@ -35,7 +35,8 @@ libgnu_la_SOURCES = \ + xstrtoll.c \ + xstrtoul.c \ + xstrtoull.c \ +- xstrtoumax.c ++ xstrtoumax.c \ ++ free.c + libutils_la_CFLAGS = \ + $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(GCC_VISIBILITY_HIDDEN) diff --git a/packages/v/virt-v2v/virt-v2v.changes b/packages/v/virt-v2v/virt-v2v.changes index 66d2965147f..96c3e12d897 100644 --- a/packages/v/virt-v2v/virt-v2v.changes +++ b/packages/v/virt-v2v/virt-v2v.changes @@ -1,8 +1,15 @@ +------------------------------------------------------------------- +Tue Oct 4 14:00:46 MDT 2022 - carnold@suse.com + +- jsc#PED-2113 [Virt Tools] Refresh Virtualization Tools for Xen + and KVM Management + ------------------------------------------------------------------- Tue Jul 12 16:03:38 MDT 2022 - carnold@suse.com - Update to version 2.0.7 * This is a bug fix release + fix-compiler-error-Stdlib.stderr.patch - Drop patch contained in new tarball CVE-2022-2211-options-fix-buffer-overflow-in-get_keys.patch @@ -52,7 +59,6 @@ Thu May 12 14:40:29 MDT 2022 - carnold@suse.com guests. This tool was deprecated and then removed in oVirt 4.3. * Deprecated tool virt-v2v-copy-to-local has been removed. This was deprecated in November 2018. -- Drop fix-linker-error.patch ------------------------------------------------------------------- Thu Jan 6 15:56:46 MST 2022 - carnold@suse.com diff --git a/packages/v/virt-v2v/virt-v2v.spec b/packages/v/virt-v2v/virt-v2v.spec index ef2c0e87471..410955bb31f 100644 --- a/packages/v/virt-v2v/virt-v2v.spec +++ b/packages/v/virt-v2v/virt-v2v.spec @@ -28,6 +28,8 @@ Summary: Tools to convert a virtual machine to run on KVM License: GPL-2.0-or-later Group: System/Management URL: https://github.com/libguestfs/virt-v2v +Patch0: fix-linker-error.patch +Patch1: fix-compiler-error-Stdlib.stderr.patch Source0: https://download.libguestfs.org/virt-v2v/%{source_directory}/%{name}-%{version}.tar.gz Source1: https://download.libguestfs.org/virt-v2v/%{source_directory}/%{name}-%{version}.tar.gz.sig