From 4df516b9b8ba500c77c9fc684eaade13df32d209ae4a5e9ecb83b91f797ba767 Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Tue, 5 May 2020 22:07:44 +0000 Subject: [PATCH] - Fix error: redefinition of 'glib_autoptr_clear_OsinfoList' fix-redefinition-error.patch - Initial package of virt-v2v version 1.42.0 * The rhv-upload output mode of virt-v2v is not listed as output driver, as virt-p2v does not provide all the GUI elements to properly use it * Virt-v2v is checked as requirement for the functional tests, in addition to guestfish, and virt-customize * Virt-p2v-make-disk now sets p2v.local as hostname in the generated disk image * Document p2v as initial password for the root user on the disk image generated by virt-p2v-make-disk, virt-p2v-make-kickstart, and virt-p2v-make-kiwi OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-v2v?expand=0&rev=1 --- .gitattributes | 23 ++++ .gitignore | 1 + fix-redefinition-error.patch | 50 +++++++ libguestfs.keyring | Bin 0 -> 2823 bytes virt-v2v-1.42.0.tar.gz | 3 + virt-v2v.changes | 21 +++ virt-v2v.spec | 253 +++++++++++++++++++++++++++++++++++ 7 files changed, 351 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 fix-redefinition-error.patch create mode 100644 libguestfs.keyring create mode 100644 virt-v2v-1.42.0.tar.gz create mode 100644 virt-v2v.changes create mode 100644 virt-v2v.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/fix-redefinition-error.patch b/fix-redefinition-error.patch new file mode 100644 index 0000000..2fd66fb --- /dev/null +++ b/fix-redefinition-error.patch @@ -0,0 +1,50 @@ +Fixes: + +[ 64s] In file included from /usr/lib64/glib-2.0/include/glibconfig.h:9, +[ 64s] from /usr/include/glib-2.0/glib/gtypes.h:32, +[ 64s] from /usr/include/glib-2.0/glib/galloca.h:32, +[ 64s] from /usr/include/glib-2.0/glib.h:30, +[ 64s] from /usr/include/glib-2.0/gobject/gbinding.h:28, +[ 64s] from /usr/include/glib-2.0/glib-object.h:22, +[ 64s] from /usr/include/libosinfo-1.0/osinfo/osinfo.h:28, +[ 64s] from libosinfo-c.c:25: +[ 64s] /usr/include/glib-2.0/glib/gmacros.h:1028:49: error: redefinition of 'glib_autoptr_clear_OsinfoList' +[ 64s] 1028 | #define _GLIB_AUTOPTR_CLEAR_FUNC_NAME(TypeName) glib_autoptr_clear_##TypeName +[ 64s] | ^~~~~~~~~~~~~~~~~~~ +[ 64s] /usr/include/glib-2.0/glib/gmacros.h:1044:36: note: in expansion of macro '_GLIB_AUTOPTR_CLEAR_FUNC_NAME' +[ 64s] 1044 | static G_GNUC_UNUSED inline void _GLIB_AUTOPTR_CLEAR_FUNC_NAME(TypeName) (TypeName *_ptr) \ +[ 64s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[ 64s] /usr/include/glib-2.0/glib/gmacros.h:1061:3: note: in expansion of macro '_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS' +[ 64s] 1061 | _GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS(TypeName, TypeName, func) +[ 64s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[ 64s] libosinfo-c.c:47:1: note: in expansion of macro 'G_DEFINE_AUTOPTR_CLEANUP_FUNC' +[ 64s] 47 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoList, g_object_unref) +[ 64s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[ 64s] /usr/include/glib-2.0/glib/gmacros.h:1028:49: note: previous definition of 'glib_autoptr_clear_OsinfoList' was here +[ 64s] 1028 | #define _GLIB_AUTOPTR_CLEAR_FUNC_NAME(TypeName) glib_autoptr_clear_##TypeName +[ 64s] | ^~~~~~~~~~~~~~~~~~~ +[ 64s] /usr/include/glib-2.0/glib/gmacros.h:1044:36: note: in expansion of macro '_GLIB_AUTOPTR_CLEAR_FUNC_NAME' +[ 64s] 1044 | static G_GNUC_UNUSED inline void _GLIB_AUTOPTR_CLEAR_FUNC_NAME(TypeName) (TypeName *_ptr) \ +[ 64s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[ 64s] /usr/include/glib-2.0/glib/gmacros.h:1056:3: note: in expansion of macro '_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS' +[ 64s] 1056 | _GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS(ModuleObjName, ParentName, _GLIB_AUTOPTR_CLEAR_FUNC_NAME(ParentName)) +[ 64s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[ 64s] /usr/include/glib-2.0/gobject/gtype.h:1500:3: note: in expansion of macro '_GLIB_DEFINE_AUTOPTR_CHAINUP' +[ 64s] 1500 | _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, ParentName) \ +[ 64s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[ 64s] /usr/include/libosinfo-1.0/osinfo/osinfo_list.h:33:1: note: in expansion of macro 'G_DECLARE_DERIVABLE_TYPE' +[ 64s] 33 | G_DECLARE_DERIVABLE_TYPE(OsinfoList, osinfo_list, OSINFO, LIST, GObject) +[ 64s] | ^~~~~~~~~~~~~~~~~~~~~~~~ + +Index: virt-v2v-1.42.0/v2v/libosinfo-c.c +=================================================================== +--- virt-v2v-1.42.0.orig/v2v/libosinfo-c.c ++++ virt-v2v-1.42.0/v2v/libosinfo-c.c +@@ -44,7 +44,6 @@ + + G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoFilter, g_object_unref) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoLoader, g_object_unref) +-G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoList, g_object_unref) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoOsList, g_object_unref) + + typedef OsinfoDb *OsinfoDb_t; diff --git a/libguestfs.keyring b/libguestfs.keyring new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..fc15a241c7f4d90d6eb0075e0628fec19a29608a07e1498a163819af0d0e729c GIT binary patch literal 2823 zcma*oXEYm(0><$qB7$nPViakqqNG)u+FR_sQdc{DRukabMCqKo^wCkug~Y-bN=ZdDzIiUZ#$40(0^!V6(C-KH79?s=m3cGghyAo z1|dJMm+eiM>Vb)QYy4I#;Xu&Z^B~&YVZ!Whl6YA`T0fY9jOhHw z+Y;*35;Jx(8F=n(3o5j*bNOr3S) zCOp0NiMsuh^>)x<=&*u##pa25u9;{ZZc=y@%)4CE$a$A}A*UQGOC-D04;}dULUfuV z)^qc0R62lhwbK5pAcC9hk{LK2KJQ&jd|seog-6NxEVm_4X)8y7DYjWwHK2eI$lRku zmeq4z0zkjTs4a++z4bu{k^$N0>0MkG^k~>}tQQd>eap=1)cK}mGM_yY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QVe8Z;T+VX2372^TDbVX-o_tL$y zfM36H?e10e)+AoUd;Ar?$c*rS7DBr*maRLN9n|78-|^BE1bP6RW%uVWO+Eh#-^#2q zU1o2OGeEnJe`vc1&bKa=PK5K>MrUoy*4Di*xQ~Hr8YK=ae$S@5;A6m-C*^N>H6QiE z+Z~%eGDDNK_vktjC^nxMUEXZReG3G^_uml$%lONCD~B)o&u@Ar}fQG5;T#E%^U88SI<&z@~yy|THGE%E1PbI z?F^r&ZTiw{?xi@{*DAy6C4z2C)^HACOJ!QTq)OKNiy$F_ao^+$ziBa!`o*phmK_>s za)NY_nGb%M+@h1zb zdfh2x>9W=SlC19X_yB5T8jPIITr(IuajP65y|~iU>niq=mN|NI*0)B&ixQw`dlhcIFP)G9WnV`}K3C{4m}cRO<&1vJ^K5DAVUo*Z<@ zunwMvxU0NO;ORRnw0-LRLg3}q^7?BlO`eOGFQ3pD@ literal 0 HcmV?d00001 diff --git a/virt-v2v-1.42.0.tar.gz b/virt-v2v-1.42.0.tar.gz new file mode 100644 index 0000000..96794e8 --- /dev/null +++ b/virt-v2v-1.42.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a177452d990be506e66a7fd986d8a7b727d48158bb564673babe34f94a857547 +size 7250373 diff --git a/virt-v2v.changes b/virt-v2v.changes new file mode 100644 index 0000000..94f6bd8 --- /dev/null +++ b/virt-v2v.changes @@ -0,0 +1,21 @@ +------------------------------------------------------------------- +Tue May 5 14:48:39 MDT 2020 - carnold@suse.com + +- Fix error: redefinition of 'glib_autoptr_clear_OsinfoList' + fix-redefinition-error.patch + +------------------------------------------------------------------- +Wed Apr 22 16:10:29 MDT 2020 - carnold@suse.com + +- Initial package of virt-v2v version 1.42.0 + * The rhv-upload output mode of virt-v2v is not listed as output + driver, as virt-p2v does not provide all the GUI elements to + properly use it + * Virt-v2v is checked as requirement for the functional tests, + in addition to guestfish, and virt-customize + * Virt-p2v-make-disk now sets p2v.local as hostname in the + generated disk image + * Document p2v as initial password for the root user on the disk + image generated by virt-p2v-make-disk, virt-p2v-make-kickstart, + and virt-p2v-make-kiwi + diff --git a/virt-v2v.spec b/virt-v2v.spec new file mode 100644 index 0000000..b646da3 --- /dev/null +++ b/virt-v2v.spec @@ -0,0 +1,253 @@ +# +# spec file for package virt-v2v +# +# Copyright (c) 2020 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# +# needsbinariesforbuild +# If we should verify tarball signature with GPGv2. + +%global verify_tarball_signature 0 + +# If there are patches which touch autotools files, set this to 1. +%global patches_touch_autotools %{nil} + +# The source directory. +%global source_directory 1.42-stable + +Name: virt-v2v +Version: 1.42.0 +Release: 1%{?dist} +%bcond_without bash_completion +URL: https://github.com/libguestfs/virt-v2v +Summary: Convert a virtual machine to run on KVM +License: GPL-2.0+ +Group: System/Management +Patch0: fix-redefinition-error.patch + +Source0: http://download.libguestfs.org/virt-v2v/%{source_directory}/%{name}-%{version}.tar.gz +%if 0%{verify_tarball_signature} +Source1: http://download.libguestfs.org/virt-v2v/%{source_directory}/%{name}-%{version}.tar.gz.sig +# Keyring used to verify tarball signature. +Source2: libguestfs.keyring +%endif + +# libguestfs hasn't been built on i686 for a while since there is no +# kernel built for this architecture any longer and libguestfs rather +# fundamentally depends on the kernel. Therefore we must exclude this +# arch. Note there is no bug filed for this because we do not ever +# expect that libguestfs or virt-v2v will be available on i686 so +# there is nothing that needs fixing. +ExcludeArch: %{ix86} + +%if 0%{patches_touch_autotools} +BuildRequires: autoconf, automake, libtool +%endif + +#BuildRequires: /usr/bin/pod2man +BuildRequires: gcc +BuildRequires: ocaml >= 4.01 +BuildRequires: libguestfs-devel >= 1.42 + +BuildRequires: augeas-devel +%if %{with bash_completion} +BuildRequires: bash-completion >= 2.0 +%if 0%{?suse_version} >= 1330 +BuildRequires: bash-completion-devel >= 2.0 +%endif +%endif +BuildRequires: file-devel +BuildRequires: gettext-devel +BuildRequires: glib2-devel +BuildRequires: libjansson-devel +BuildRequires: libosinfo-devel +BuildRequires: libvirt-devel +BuildRequires: libxml2-devel +BuildRequires: mkisofs +BuildRequires: pcre-devel +BuildRequires: perl(Sys::Guestfs) +BuildRequires: po4a + +BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-fileutils-devel +BuildRequires: ocaml-gettext-devel +BuildRequires: ocaml-gettext-stub-devel +BuildRequires: ocaml-hivex-devel +BuildRequires: ocaml-libguestfs +BuildRequires: ocaml-libguestfs-devel +BuildRequires: ocaml-libvirt-devel +BuildRequires: ocaml-ounit-devel + + +#BuildRequires: nbdkit-python-plugin + +%if 0%{verify_tarball_signature} +BuildRequires: gnupg2 +%endif + +Requires: libguestfs%{?_isa} >= 1.42 +Requires: libguestfs-tools-c >= 1.42 +Requires: gawk +Requires: gzip +Requires: unzip +Requires: curl +Requires: /usr/bin/virsh + +%if %{with bash_completion} +Recommends: bash-completion >= 2.0 +%endif +Recommends: nbdkit +Recommends: nbdkit-curl-plugin +Recommends: nbdkit-python-plugin +Recommends: nbdkit-ssh-plugin +Recommends: nbdkit-vddk-plugin + + +%description +Virt-v2v converts a single guest from a foreign hypervisor to run on +KVM. It can read Linux and Windows guests running on VMware, Xen, +Hyper-V and some other hypervisors, and convert them to KVM managed by +libvirt, OpenStack, oVirt, Red Hat Virtualisation (RHV) or several +other targets. It can modify the guest to make it bootable on KVM and +install virtio drivers so it will run quickly. + + +%package bash-completion +Summary: Bash tab-completion for %{name} +BuildArch: noarch +Requires: bash-completion >= 2.0 +Requires: %{name} = %{version}-%{release} + + +%description bash-completion +Install this package if you want intelligent bash tab-completion +for %{name}. + + +%package man-pages-ja +Summary: Japanese (ja) man pages for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description man-pages-ja +%{name}-man-pages-ja contains Japanese (ja) man pages +for %{name}. + + +%package man-pages-uk +Summary: Ukrainian (uk) man pages for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description man-pages-uk +%{name}-man-pages-uk contains Ukrainian (uk) man pages +for %{name}. + + +%prep +%if 0%{verify_tarball_signature} +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%endif +%autosetup -p1 +%if 0%{patches_touch_autotools} +autoreconf -i +%endif + + +%build +%configure +make %{?_smp_mflags} + + +%install +%make_install + +# Delete libtool crap. +find $RPM_BUILD_ROOT -name '*.la' -delete + +# Virt-tools data directory. This contains a symlink to rhsrvany.exe +# which is satisfied by the dependency on mingw32-srvany. +mkdir -p $RPM_BUILD_ROOT%{_datadir}/virt-tools + +# Delete the v2v test harness (except for the man page). +rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/v2v_test_harness +rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* + +# Find locale files. +%find_lang %{name} + + +%check +# All tests fail at the moment because of bugs in libvirt blockdev. +# # Tests fail on both armv7 and ppc64le in Fedora 31 because the kernel +# # cannot boot on qemu. +# %ifnarch %{arm} ppc64le + +# # On x86_64 this single test fails with: "virt-v2v: warning: the +# # target hypervisor does not support a x86_64 KVM guest". Missing +# # BuildRequires? +# %ifarch x86_64 +# truncate -s 0 tests/test-v2v-o-libvirt.sh +# %endif + +# # This test fails in mock. +# truncate -s 0 tests/test-v2v-oa-option.sh + +# # Make sure we can see the debug messages (RHBZ#1230160). +# export LIBGUESTFS_DEBUG=1 +# export LIBGUESTFS_TRACE=1 + +# make %{?_smp_mflags} check || { +# cat tests/test-suite.log +# exit 1 +# } + +# %endif + + +%files -f %{name}.lang +%license COPYING +#doc README +%{_bindir}/virt-v2v +%{_bindir}/virt-v2v-copy-to-local +%{_mandir}/man1/virt-v2v.1* +%{_mandir}/man1/virt-v2v-copy-to-local.1* +%{_mandir}/man1/virt-v2v-hacking.1* +%{_mandir}/man1/virt-v2v-input-vmware.1* +%{_mandir}/man1/virt-v2v-input-xen.1* +%{_mandir}/man1/virt-v2v-output-local.1* +%{_mandir}/man1/virt-v2v-output-openstack.1* +%{_mandir}/man1/virt-v2v-output-rhv.1* +%{_mandir}/man1/virt-v2v-release-notes-1.42.1* +%{_mandir}/man1/virt-v2v-support.1* +%{_mandir}/man1/virt-v2v-test-harness.1* +%{_datadir}/virt-tools + + +%files bash-completion +%license COPYING +%{_datadir}/bash-completion/completions/virt-v2v +%{_datadir}/bash-completion/completions/virt-v2v-copy-to-local + + +%files man-pages-ja +%license COPYING +%lang(ja) %{_mandir}/ja/man1/*.1* + + +%files man-pages-uk +%license COPYING +%lang(uk) %{_mandir}/uk/man1/*.1* + + +%changelog