Import virt-v2v 1.41.8.

This commit is contained in:
Richard W.M. Jones 2019-12-03 11:57:38 +00:00
parent 8beed2edaf
commit 4f8d3a8922
8 changed files with 614 additions and 269 deletions

3
.gitignore vendored
View File

@ -8,4 +8,5 @@
/results_virt-v2v/ /results_virt-v2v/
# Source # Source
/virt-v2v-v*.tar.gz /virt-v2v-*.tar.gz
/virt-v2v-*.tar.gz.sig

View File

@ -0,0 +1,48 @@
From f80f1c31c9446f326484ae93ba4919586f4f3df8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 19 Nov 2019 15:25:07 +0000
Subject: [PATCH 1/2] po: Remove some POTFILES-ml which aren't included in the
tarball.
---
Makefile.am | 2 ++
po/POTFILES-ml | 3 ---
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 638268d8b..50322eb69 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -113,6 +113,8 @@ po/POTFILES-ml: configure.ac
rm -f $@ $@-t
cd $(srcdir); \
find common/ml* v2v -name '*.ml' | \
+ grep -v '^common/mlprogress/' | \
+ grep -v '^common/mlvisit/' | \
grep -v '^v2v/config.ml$$' | \
LC_ALL=C sort > $@-t
mv $@-t $@
diff --git a/po/POTFILES-ml b/po/POTFILES-ml
index b5cebb2f8..eef7c5f3b 100644
--- a/po/POTFILES-ml
+++ b/po/POTFILES-ml
@@ -6,7 +6,6 @@ common/mlgettext/common_gettext.ml
common/mllibvirt/libvirt.ml
common/mlpcre/PCRE.ml
common/mlpcre/pcre_tests.ml
-common/mlprogress/progress.ml
common/mlstdutils/guestfs_config.ml
common/mlstdutils/std_utils.ml
common/mlstdutils/std_utils_tests.ml
@@ -34,8 +33,6 @@ common/mlutils/c_utils.ml
common/mlutils/c_utils_unit_tests.ml
common/mlutils/unix_utils.ml
common/mlv2v/uefi.ml
-common/mlvisit/visit.ml
-common/mlvisit/visit_tests.ml
common/mlxml/xml.ml
v2v/DOM.ml
v2v/changeuid.ml
--
2.23.0

371
0002-Add-license-file.patch Normal file
View File

@ -0,0 +1,371 @@
From 508cda917ad106ba4759eb2df98e28f97b4a4583 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 19 Nov 2019 15:36:53 +0000
Subject: [PATCH 2/2] Add license file.
---
COPYING | 339 ++++++++++++++++++++++++++++++++++++++++++++++++++++
Makefile.am | 1 +
2 files changed, 340 insertions(+)
create mode 100644 COPYING
diff --git a/COPYING b/COPYING
new file mode 100644
index 000000000..d159169d1
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/Makefile.am b/Makefile.am
index 50322eb69..e80076bbc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -72,6 +72,7 @@ EXTRA_DIST = \
check-mli.sh \
common/.gitignore \
common/README \
+ COPYING \
lib/guestfs-internal-all.h \
m4/.gitignore \
ocaml-link.sh \
--
2.23.0

BIN
libguestfs.keyring Normal file

Binary file not shown.

View File

@ -1 +1,2 @@
652decfdf85a6d9091de2c0d3cf59489 virt-v2v-v0.9.0.tar.gz SHA512 (virt-v2v-1.41.8.tar.gz) = c7d4f258aa347f3866193df3aa15938389f38f86d387a9b04fe2b250ff313edd4c9477e8ca5723a3bb3d536a2826ce5be93fb9b687865083afaab9fdeb473bd3
SHA512 (virt-v2v-1.41.8.tar.gz.sig) = bbcf4e36505b388390cc971a95f12105cded7e53c7632057918cb2503b7b05ad6a92b6b6e6b08d9dd822fb03715868996045022fc1f8e43580835004215d76c0

View File

@ -1,15 +0,0 @@
--- virt-v2v-v0.9.0.old/lib/Sys/VirtConvert/GuestfsHandle.pm 2012-12-06 15:09:51.000000000 +0000
+++ virt-v2v-v0.9.0/lib/Sys/VirtConvert/GuestfsHandle.pm 2013-07-03 14:48:53.049335387 +0100
@@ -76,6 +76,12 @@
my $interface = "ide";
$g = Sys::Guestfs->new();
+
+ # Fedora-specific patch: The libvirt backend used in Fedora >=
+ # 18 does not support setting iface parameters. Therefore
+ # ensure we are using the direct (appliance) backend.
+ $g->set_attach_method ("appliance");
+
foreach my $disk (@{$disks}) {
my ($name, $path, $format) = @$disk;

View File

@ -1,34 +0,0 @@
From 6ea7529da49959ff164f39eae4423fdc730f9753 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Fri, 27 Jun 2014 17:20:00 +0200
Subject: [PATCH] The license metadata must be a list
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
CPAN::Meta::Spec defines the license value must be an array reference.
However current Build.PL uses simple scalar. This breaks generating
META.* files which breaks tests with recent Module::Build 0.4205.
https://bugzilla.redhat.com/show_bug.cgi?id=1083430
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
Build.PL | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Build.PL b/Build.PL
index 55cee55..0ccace3 100644
--- a/Build.PL
+++ b/Build.PL
@@ -316,7 +316,7 @@ my $build = $class->new (
script_files => [ 'v2v/virt-v2v.pl', 'p2v/server/virt-p2v-server.pl' ],
meta_add => {
resources => {
- license => "http://www.gnu.org/licenses/gpl.html",
+ license => [ "http://www.gnu.org/licenses/gpl.html" ],
homepage => "http://people.redhat.com/mbooth/virt-v2v/",
repository => "git://git.fedorahosted.org/virt-v2v.git",
MailingList => "http://www.redhat.com/mailman/listinfo/libguestfs",
--
1.9.3

View File

@ -1,269 +1,242 @@
Name: virt-v2v # If we should verify tarball signature with GPGv2.
Version: 0.9.0 %global verify_tarball_signature 1
Release: 8%{?dist}%{?extra_release}
Summary: Convert a virtual machine to run on KVM
License: GPLv2+ and LGPLv2+ # If there are patches which touch autotools files, set this to 1.
URL: http://git.fedorahosted.org/git/virt-v2v.git %global patches_touch_autotools 1
Source0: https://fedorahosted.org/releases/v/i/virt-v2v/%{name}-v%{version}.tar.gz # The source directory.
%global source_directory 1.41-development
# Non-upstream patch to default to using the appliance backend Name: virt-v2v
# for Fedora >= 18. Version: 1.41.8
Patch1: virt-v2v-use-appliance-backend.patch Release: 4%{?dist}
Summary: Convert a virtual machine to run on KVM
# Fix license metadata, bug #1083430 License: GPLv2+
Patch2: virt-v2v-v0.9.1-The-license-metadata-must-be-a-list.patch URL: https://github.com/libguestfs/virt-v2v
# Unfortunately, despite really being noarch, we have to make virt-v2v arch Source0: http://download.libguestfs.org/virt-v2v/%{source_directory}/%{name}-%{version}.tar.gz
# dependent to avoid build failures on architectures where libguestfs isn't %if 0%{verify_tarball_signature}
# available. Source1: http://download.libguestfs.org/virt-v2v/%{source_directory}/%{name}-%{version}.tar.gz.sig
%if 0%{?rhel} >= 6 # Keyring used to verify tarball signature.
ExclusiveArch: x86_64 Source2: libguestfs.keyring
%else
ExclusiveArch: %{ix86} x86_64
%endif %endif
# Build system direct requirements # Upstream patches.
BuildRequires: gettext Patch1: 0001-po-Remove-some-POTFILES-ml-which-aren-t-included-in-.patch
BuildRequires: perl Patch2: 0002-Add-license-file.patch
BuildRequires: perl(Module::Build)
BuildRequires: perl(ExtUtils::Manifest)
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(Module::Find)
# Runtime perl modules also required at build time for use_ok test # libguestfs hasn't been built on i686 for a while since there is no
BuildRequires: perl(Archive::Extract) # kernel built for this architecture any longer and libguestfs rather
BuildRequires: perl(DateTime) # fundamentally depends on the kernel. Therefore we must exclude this
BuildRequires: perl(Digest::SHA1) # arch. Note there is no bug filed for this because we do not ever
BuildRequires: perl(IO::String) # expect that libguestfs or virt-v2v will be available on i686 so
BuildRequires: perl(Locale::TextDomain) # there is nothing that needs fixing.
BuildRequires: perl(Module::Pluggable) ExcludeArch: %{ix86}
BuildRequires: perl(Net::HTTPS)
BuildRequires: perl(Net::SSL)
BuildRequires: perl(Sys::Guestfs)
BuildRequires: perl(Sys::Syslog)
BuildRequires: perl(Sys::Virt)
BuildRequires: perl(Term::ProgressBar)
BuildRequires: perl(URI)
BuildRequires: perl(XML::DOM)
BuildRequires: perl(XML::DOM::XPath)
BuildRequires: perl(XML::Writer)
BuildRequires: perl-Sys-Guestfs >= 1:1.14.0 %if 0%{patches_touch_autotools}
BuildRequires: perl-hivex >= 1.2.2 BuildRequires: autoconf, automake, libtool
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRequires: /usr/bin/pod2man
BuildRequires: gcc
BuildRequires: ocaml >= 4.01
BuildRequires: libguestfs-devel >= 1:1.40
# Required for the name optional argument to add_drive_opts BuildRequires: augeas-devel
Requires: perl-Sys-Guestfs >= 1:1.14.0 BuildRequires: bash-completion
BuildRequires: file-devel
BuildRequires: gettext-devel
BuildRequires: jansson-devel
BuildRequires: libvirt-devel
BuildRequires: libvirt-daemon-qemu
BuildRequires: libvirt-daemon-kvm
BuildRequires: libxml2-devel
BuildRequires: pcre-devel
BuildRequires: perl(Sys::Guestfs)
BuildRequires: po4a
BuildRequires: /usr/bin/virsh
# Undocumented from antiquity BuildRequires: ocaml-findlib-devel
Requires: perl-hivex >= 1.2.2 BuildRequires: ocaml-libguestfs-devel
BuildRequires: ocaml-fileutils-devel
BuildRequires: ocaml-gettext-devel
BuildRequires: ocaml-ounit-devel
# Required for passing flags to get_xml_description BuildRequires: nbdkit-python3-plugin
Requires: perl(Sys::Virt) >= 0.2.4
# Net::SSL and Net::HTTPS are loaded with require rather than use, which %if 0%{verify_tarball_signature}
# rpmbuild doesn't seem to discover automatically. BuildRequires: gnupg2
Requires: perl(Net::SSL) %endif
Requires: perl(Net::HTTPS)
# Need >= 0.8.1 for rpc fix talking to RHEL 5 libvirt Requires: libguestfs%{?_isa} >= 1:1.40
Requires: libvirt >= 0.8.1 Requires: libguestfs-tools-c >= 1:1.40
# For GuestOS transfer image Requires: gawk
Requires: /usr/bin/mkisofs Requires: gzip
Requires: unzip
Requires: curl
Requires: /usr/bin/virsh
# For guest image inspection Recommends: nbdkit
Requires: /usr/bin/qemu-img Recommends: nbdkit-curl-plugin
Recommends: nbdkit-python3-plugin
Recommends: nbdkit-ssh-plugin
Recommends: nbdkit-vddk-plugin
# For ssh transfers # For rhsrvany.exe, used to install firstboot scripts in Windows guests.
Requires: /usr/bin/ssh Requires: mingw32-srvany >= 1.0-13
%description %description
virt-v2v is a tool for converting and importing virtual machines to Virt-v2v converts a single guest from a foreign hypervisor to run on
libvirt-managed KVM, or Red Hat Enterprise Virtualization. It can import a KVM. It can read Linux and Windows guests running on VMware, Xen,
variety of guest operating systems from libvirt-managed hosts and VMware ESX. 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 %prep
%setup -q -n %{name}-v%{version} %if 0%{verify_tarball_signature}
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%patch1 -p1 %endif
%patch2 -p1 %autosetup -p1
%if 0%{patches_touch_autotools}
autoreconf -i
%endif
%build %build
%{__perl} Build.PL %configure
./Build make %{?_smp_mflags}
# perl doesn't need debuginfo
%define debug_package %{nil}
%install %install
./Build install \ %make_install
--destdir %{buildroot} \
--installdirs vendor \
--install_path locale=%{_datadir}/locale \
--install_path confdoc=%{_mandir}/man5
# Create lib directory, used for holding software to be installed in guests # Delete libtool crap.
statedir=%{buildroot}%{_localstatedir}/lib/virt-v2v find $RPM_BUILD_ROOT -name '*.la' -delete
mkdir -p $statedir/software
# Copy Windows dependencies into place # Virt-tools data directory. This contains a symlink to rhsrvany.exe
windir=$statedir/software/windows # which is satisfied by the dependency on mingw32-srvany.
mkdir -p $windir mkdir -p $RPM_BUILD_ROOT%{_datadir}/virt-tools
pushd $RPM_BUILD_ROOT%{_datadir}/virt-tools
ln -sf /usr/i686-w64-mingw32/sys-root/mingw/bin/rhsrvany.exe
popd
cp windows/rhsrvany.exe windows/firstboot.bat $windir/ # Delete the v2v test harness (except for the man page).
rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/v2v_test_harness
mkdir -p %{buildroot}%{_sysconfdir} rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness*
cp v2v/virt-v2v.conf %{buildroot}%{_sysconfdir}/
cp v2v/virt-v2v.db $statedir/
# Find locale files.
%find_lang %{name} %find_lang %{name}
# Not clear why this is being created as there is nothing arch-specific in
# virt-v2v. It isn't packaged, though, so we need to delete it.
[ -d "%{buildroot}/%{perl_archlib}" ] &&
find %{buildroot}/%{perl_archlib} -name .packlist -type f | xargs rm
%check %check
./Build test # 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 %files -f %{name}.lang
%doc TODO.txt %license COPYING
%doc META.yml #doc README
%doc ChangeLog %{_bindir}/virt-v2v
%doc COPYING COPYING.LIB %{_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-support.1*
%{_mandir}/man1/virt-v2v-test-harness.1*
%{_datadir}/virt-tools
# For noarch packages: vendorlib
%{perl_vendorlib}/*
# Man pages %files bash-completion
%{_mandir}/man1/*.1* %license COPYING
%{_mandir}/man3/*.3* %{_datadir}/bash-completion/completions/virt-v2v
%{_mandir}/man5/*.5* %{_datadir}/bash-completion/completions/virt-v2v-copy-to-local
# Executables
%attr(0755,root,root) %{_bindir}/virt-v2v
%attr(0755,root,root) %{_bindir}/virt-p2v-server
%dir %{_localstatedir}/lib/virt-v2v %files man-pages-ja
%license COPYING
%lang(ja) %{_mandir}/ja/man1/*.1*
%config(noreplace) %{_sysconfdir}/virt-v2v.conf
%config %{_localstatedir}/lib/virt-v2v/virt-v2v.db %files man-pages-uk
%config(noreplace) %{_localstatedir}/lib/virt-v2v/software %license COPYING
%lang(uk) %{_mandir}/uk/man1/*.1*
%changelog %changelog
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-8 * Wed Nov 27 2019 Richard W.M. Jones <rjones@redhat.com> - 1.41.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - Use license instead of doc for COPYING file.
- Include license in all subpackages.
- Use gpgverify macro.
- Don't own bash-completion directory because we Require the
bash-completion package which owns it already.
* Fri Jun 27 2014 Petr Pisar <ppisar@redhat.com> - 0.9.0-7 * Tue Nov 26 2019 Richard W.M. Jones <rjones@redhat.com> - 1.41.8-2
- Fix license metadata (bug #1083430) - Fix permissions on .sig file.
- Disable -oa preallocated test since it fails in reviewers mock environment.
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-6 * Fri Nov 15 2019 Richard W.M. Jones <rjones@redhat.com> - 1.41.8-1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - Initial release of separate virt-v2v program, was part of libguestfs.
* Thu Aug 08 2013 Petr Pisar <ppisar@redhat.com> - 0.9.0-5
- Perl 5.18 rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Jul 3 2013 Richard W.M. Jones <rjones@redhat.com> - 0.9.0-3
- Default to using the appliance backend, since in Fedora >= 18 the
libvirt backend doesn't support the 'iface' parameter which virt-v2v
requires.
- Add BR perl(Sys::Syslog), required to run the tests.
- Remove some cruft from the spec file.
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Dec 6 2012 Matthew Booth <mbooth@redhat.com> - 0.9.0-1
- New upstream release 0.9.0
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Jul 10 2012 Petr Pisar <ppisar@redhat.com> - 0.8.8-2
- Perl 5.16 rebuild
* Mon Jun 25 2012 Matthew Booth <mbooth@redhat.com> - 0.8.8-1
- Rebase to upstream version 0.8.8
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Aug 22 2011 Richard W.M. Jones <rjones@redhat.com> - 0.8.3-1
- New upstream release 0.8.3.
- Include upstream patch to fix whitespace problems in PO files.
- Remove virt-p2v from build by synchronizing the spec file so it
almost matches the one in RHEL 6.2. Note that virt-p2v is built in
a separate SRPM called rubygem-virt-p2v.
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 0.8.1-4
- Perl mass rebuild
* Tue Jul 19 2011 Petr Sabata <contyk@redhat.com> - 0.8.1-3
- Perl mass rebuild
* Tue May 17 2011 Matthew Booth <mbooth@redhat.com> - 0.8.1-2
- Remove echoe build dependency
- Fix YAML error during P2V (RHBZ#705113)
* Tue Apr 26 2011 Matthew Booth <mbooth@redhat.com> - 0.8.1-1
- Update to release 0.8.1
* Tue Apr 19 2011 Matthew Booth <mbooth@redhat.com> - 0.8.0-1
- Update to release 0.8.0
- Include virt-p2v
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Nov 4 2010 Matthew Booth <mbooth@redhat.com> - 0.7.0-1
- Update to release 0.7.0
* Thu Jul 1 2010 Matthew Booth <mbooth@redhat.com> - 0.6.1-1
- Only build virt-v2v on architectures where libguestfs is available
* Mon Jun 21 2010 Matthew Booth <mbooth@redhat.com> - 0.6.1-0
- Update to release 0.6.1
- Disable building of debuginfo
* Mon Feb 22 2010 Matthew Booth <mbooth@redhat.com> - 0.4.0-1
- Update to release 0.4.0
- Change dependency on genisofs to mkisofs
- Update libguestfs dependency to 1.0.84
- Add perl module dependencies: LWP::UserAgent, Net::HTTPS, Net::SSL, Net::URI
- Remove perl module dependency: Config::Tiny
- Add explicit build dependency on perl
- Add patch: virt-v2v-0.4.0-remove-fr.patch
- Add patch: virt-v2v-0.4.0-exechelper-cleanup.patch
- Add patch: virt-v2v-0.4.0-exechelper-tmpfile.patch
* Mon Dec 7 2009 Stepan Kasal <skasal@redhat.com> - 0.3.2-2
- rebuild against perl 5.10.1
* Mon Nov 9 2009 Matthew Booth <mbooth@redhat.com> - 0.3.2-1
- Update to release 0.3.2
- Add BuildRequires gettext
* Mon Nov 9 2009 Matthew Booth <mbooth@redhat.com> - 0.3.0-1
- Update to release 0.3.0
* Tue Sep 15 2009 Matthew Booth <mbooth@redhat.com> - 0.2.0-1
- Update to release 0.2.0
* Fri Sep 4 2009 Matthew Booth <mbooth@redhat.com> - 0.1.0-1
- Initial specfile