Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
143746c252 | ||
|
|
18d06fd2de | ||
|
|
23b63368b1 | ||
|
|
36b1332657 | ||
|
|
6dc0ccc894 |
9 changed files with 145 additions and 9676 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
|
@ -3,9 +3,9 @@
|
|||
/x86_64
|
||||
|
||||
# Version-dependent build artifacts
|
||||
/.build-0.8.1-1.fc*.log
|
||||
/virt-v2v-v0.8.1
|
||||
/virt-v2v-0.8.1-1.fc*.src.rpm
|
||||
/.build-*.log
|
||||
/virt-v2v-v*/
|
||||
/virt-v2v-*.src.rpm
|
||||
|
||||
# Source
|
||||
/virt-v2v-v0.8.1.tar.gz
|
||||
/virt-v2v-v*.tar.gz
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
e850297f55ae839b28c8417d0acd080b virt-v2v-v0.8.1.tar.gz
|
||||
2caf55a34ae086d34cbe82375c1b12c5 virt-v2v-v0.8.5.tar.gz
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,57 +0,0 @@
|
|||
commit e34a8c0911f53cff64f9a33d3802ac7361f3fe19
|
||||
Author: Matthew Booth <mbooth@redhat.com>
|
||||
Date: Wed May 11 16:05:18 2011 +0100
|
||||
|
||||
p2v-client: Drop echoe for build
|
||||
|
||||
echoe changes incompatibly from F14->F15. We're not using the vast majority of
|
||||
its features, and it remains completely undocumented as far as I can tell. This
|
||||
patch drops it in favour of a simple, explicit gem build task.
|
||||
|
||||
diff --git a/p2v/client/Rakefile b/p2v/client/Rakefile
|
||||
index d190f08..23c26f5 100644
|
||||
--- a/p2v/client/Rakefile
|
||||
+++ b/p2v/client/Rakefile
|
||||
@@ -14,24 +14,10 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
-require 'rubygems'
|
||||
-require 'echoe'
|
||||
+require 'rake'
|
||||
+require 'rake/gempackagetask'
|
||||
|
||||
-Echoe.new("virt-p2v") do |p|
|
||||
- p.project = "Virt P2V"
|
||||
- p.version = `../../Build version`
|
||||
- p.author = "Matthew Booth"
|
||||
- p.summary = "Send a machine's storage and metadata to virt-p2v-server"
|
||||
- p.description = <<EOF
|
||||
-virt-p2v is a client which connects to a virt-p2v-server and transfer's the host
|
||||
-machine's storage and metadata. virt-p2v is intended to be run from a live
|
||||
-image, so it is unlikely you want to install it.
|
||||
-EOF
|
||||
- p.url = "http://libguestfs.org"
|
||||
- p.email = "libguestfs@redhat.com"
|
||||
- p.runtime_dependencies = [
|
||||
- 'gtk2',
|
||||
- 'gettext',
|
||||
- 'net-ssh'
|
||||
- ]
|
||||
-end
|
||||
+task :default => :gem
|
||||
+
|
||||
+load 'virt-p2v.gemspec'
|
||||
+Rake::GemPackageTask.new(GEMSPEC) {}
|
||||
diff --git a/virt-v2v.spec.PL b/virt-v2v.spec.PL
|
||||
index 2249b01..6a155e2 100644
|
||||
--- a/virt-v2v.spec.PL
|
||||
+++ b/virt-v2v.spec.PL
|
||||
@@ -79,7 +79,6 @@ BuildRequires: perl-hivex >= 1.2.2
|
||||
|
||||
# virt-p2v build requirements
|
||||
BuildRequires: rubygem(rake)
|
||||
-BuildRequires: rubygem(echoe)
|
||||
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
commit fadb1929b4a8447a719a34f07e5934badf694f45
|
||||
Author: Matthew Booth <mbooth@redhat.com>
|
||||
Date: Wed May 11 16:46:37 2011 +0100
|
||||
|
||||
p2v-client: Add missing gemspec
|
||||
|
||||
gemspec used to be auto-generated, so was explicitly ignored. It's no longer
|
||||
auto-generated, so we need it.
|
||||
|
||||
diff --git a/p2v/client/virt-p2v.gemspec b/p2v/client/virt-p2v.gemspec
|
||||
new file mode 100644
|
||||
index 0000000..d8edde8
|
||||
--- /dev/null
|
||||
+++ b/p2v/client/virt-p2v.gemspec
|
||||
@@ -0,0 +1,96 @@
|
||||
+# Copyright (C) 2011 Red Hat Inc.
|
||||
+#
|
||||
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
+
|
||||
+V2V_VERSION = `../../Build version`
|
||||
+abort "Failed to get version" unless $? == 0
|
||||
+
|
||||
+GEMSPEC = Gem::Specification.new do |s|
|
||||
+ s.name = %q{virt-p2v}
|
||||
+ s.version = V2V_VERSION
|
||||
+
|
||||
+ s.authors = ["Matthew Booth"]
|
||||
+ s.date = %q{2011-05-10}
|
||||
+ s.summary = %q{Send a machine's storage and metadata to virt-p2v-server}
|
||||
+ s.description = %q{
|
||||
+ virt-p2v is a client which connects to a virt-p2v-server and transfer's
|
||||
+ the host machine's storage and metadata. virt-p2v is intended to be run
|
||||
+ from a live image, so it is unlikely you want to install it.
|
||||
+ }
|
||||
+ s.email = %q{libguestfs@redhat.com}
|
||||
+ s.homepage = %q{http://libguestfs.org}
|
||||
+
|
||||
+ s.default_executable = %q{virt-p2v}
|
||||
+ s.executables = ["virt-p2v"]
|
||||
+ s.files = [
|
||||
+ "Rakefile",
|
||||
+ "bin/virt-p2v",
|
||||
+ "lib/virt-p2v/blockdevice.rb",
|
||||
+ "lib/virt-p2v/connection.rb",
|
||||
+ "lib/virt-p2v/converter.rb",
|
||||
+ "lib/virt-p2v/gtk-queue.rb",
|
||||
+ "lib/virt-p2v/netdevice.rb",
|
||||
+ "lib/virt-p2v/ui/connect.rb",
|
||||
+ "lib/virt-p2v/ui/convert.rb",
|
||||
+ "lib/virt-p2v/ui/main.rb",
|
||||
+ "lib/virt-p2v/ui/network.rb",
|
||||
+ "lib/virt-p2v/ui/p2v.ui",
|
||||
+ "lib/virt-p2v/ui/success.rb",
|
||||
+ "virt-p2v.gemspec",
|
||||
+ "Manifest"
|
||||
+ ]
|
||||
+ s.require_paths = ["lib"]
|
||||
+
|
||||
+ if s.respond_to? :specification_version then
|
||||
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
||||
+ s.specification_version = 3
|
||||
+
|
||||
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
||||
+ s.add_runtime_dependency(%q<gtk2>, [">= 0"])
|
||||
+ s.add_runtime_dependency(%q<gettext>, [">= 0"])
|
||||
+ s.add_runtime_dependency(%q<net-ssh>, [">= 0"])
|
||||
+ else
|
||||
+ s.add_dependency(%q<gtk2>, [">= 0"])
|
||||
+ s.add_dependency(%q<gettext>, [">= 0"])
|
||||
+ s.add_dependency(%q<net-ssh>, [">= 0"])
|
||||
+ end
|
||||
+ else
|
||||
+ s.add_dependency(%q<gtk2>, [">= 0"])
|
||||
+ s.add_dependency(%q<gettext>, [">= 0"])
|
||||
+ s.add_dependency(%q<net-ssh>, [">= 0"])
|
||||
+ end
|
||||
+
|
||||
+# Source doesn't contain any rdoc
|
||||
+# s.extra_rdoc_files = [
|
||||
+# "bin/virt-p2v",
|
||||
+# "lib/virt-p2v/blockdevice.rb",
|
||||
+# "lib/virt-p2v/connection.rb",
|
||||
+# "lib/virt-p2v/converter.rb",
|
||||
+# "lib/virt-p2v/gtk-queue.rb",
|
||||
+# "lib/virt-p2v/netdevice.rb",
|
||||
+# "lib/virt-p2v/ui/connect.rb",
|
||||
+# "lib/virt-p2v/ui/convert.rb",
|
||||
+# "lib/virt-p2v/ui/main.rb",
|
||||
+# "lib/virt-p2v/ui/network.rb",
|
||||
+# "lib/virt-p2v/ui/p2v.ui",
|
||||
+# "lib/virt-p2v/ui/success.rb"
|
||||
+# ]
|
||||
+# s.rdoc_options = [
|
||||
+# "--line-numbers",
|
||||
+# "--inline-source",
|
||||
+# "--title",
|
||||
+# "Virt-p2v"
|
||||
+# ]
|
||||
+end
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
commit a965f7e0609acc6107ffbbf70054776ee3c81918
|
||||
Author: Matthew Booth <mbooth@redhat.com>
|
||||
Date: Thu May 12 10:07:06 2011 +0100
|
||||
|
||||
p2v-client: Build rdoc with options
|
||||
|
||||
Use rdoc options taken from gemspec generated by echoe.
|
||||
|
||||
diff --git a/p2v/client/virt-p2v.gemspec b/p2v/client/virt-p2v.gemspec
|
||||
index d8edde8..610c2a3 100644
|
||||
--- a/p2v/client/virt-p2v.gemspec
|
||||
+++ b/p2v/client/virt-p2v.gemspec
|
||||
@@ -72,25 +72,23 @@ GEMSPEC = Gem::Specification.new do |s|
|
||||
s.add_dependency(%q<net-ssh>, [">= 0"])
|
||||
end
|
||||
|
||||
-# Source doesn't contain any rdoc
|
||||
-# s.extra_rdoc_files = [
|
||||
-# "bin/virt-p2v",
|
||||
-# "lib/virt-p2v/blockdevice.rb",
|
||||
-# "lib/virt-p2v/connection.rb",
|
||||
-# "lib/virt-p2v/converter.rb",
|
||||
-# "lib/virt-p2v/gtk-queue.rb",
|
||||
-# "lib/virt-p2v/netdevice.rb",
|
||||
-# "lib/virt-p2v/ui/connect.rb",
|
||||
-# "lib/virt-p2v/ui/convert.rb",
|
||||
-# "lib/virt-p2v/ui/main.rb",
|
||||
-# "lib/virt-p2v/ui/network.rb",
|
||||
-# "lib/virt-p2v/ui/p2v.ui",
|
||||
-# "lib/virt-p2v/ui/success.rb"
|
||||
-# ]
|
||||
-# s.rdoc_options = [
|
||||
-# "--line-numbers",
|
||||
-# "--inline-source",
|
||||
-# "--title",
|
||||
-# "Virt-p2v"
|
||||
-# ]
|
||||
+ s.extra_rdoc_files = [
|
||||
+ "bin/virt-p2v",
|
||||
+ "lib/virt-p2v/blockdevice.rb",
|
||||
+ "lib/virt-p2v/connection.rb",
|
||||
+ "lib/virt-p2v/converter.rb",
|
||||
+ "lib/virt-p2v/gtk-queue.rb",
|
||||
+ "lib/virt-p2v/netdevice.rb",
|
||||
+ "lib/virt-p2v/ui/connect.rb",
|
||||
+ "lib/virt-p2v/ui/convert.rb",
|
||||
+ "lib/virt-p2v/ui/main.rb",
|
||||
+ "lib/virt-p2v/ui/network.rb",
|
||||
+ "lib/virt-p2v/ui/p2v.ui",
|
||||
+ "lib/virt-p2v/ui/success.rb"
|
||||
+ ]
|
||||
+ s.rdoc_options = [
|
||||
+ "--line-numbers",
|
||||
+ "--inline-source",
|
||||
+ "--title", "virt-p2v"
|
||||
+ ]
|
||||
end
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
commit 77bd79083879c7bca15c00d96c570da6faa16839
|
||||
Author: Matthew Booth <mbooth@redhat.com>
|
||||
Date: Tue May 17 10:00:34 2011 +0100
|
||||
|
||||
p2v-server: Fix YAML error parsing metadata
|
||||
|
||||
The YAML perl module will produce a parse error when receiving metadata YAML
|
||||
produced by virt-p2v. YAML::Tiny and YAML::Syck both parse it fine.
|
||||
Unfortunately, YAML::Any is only provided by the YAML module, so it will always
|
||||
be installed on Fedora, and will always break. We therefore need to pick one of
|
||||
the others explicitly. I picked YAML::Tiny as it has fewer dependencies.
|
||||
|
||||
diff --git a/p2v/server/virt-p2v-server.pl b/p2v/server/virt-p2v-server.pl
|
||||
index d062d9d..2dfae24 100755
|
||||
--- a/p2v/server/virt-p2v-server.pl
|
||||
+++ b/p2v/server/virt-p2v-server.pl
|
||||
@@ -20,7 +20,11 @@ use warnings;
|
||||
use strict;
|
||||
|
||||
use IO::Handle;
|
||||
-use YAML::Any;
|
||||
+
|
||||
+# The YAML module doesn't support YAML generated by Ruby. YAML::Tiny and
|
||||
+# YAML::Syck are both fine. We can't use YAML::Any here because that breaks by
|
||||
+# default.
|
||||
+use YAML::Tiny;
|
||||
|
||||
use Locale::TextDomain 'virt-v2v';
|
||||
|
||||
101
virt-v2v-0.8.5-00-786a74f0.patch
Normal file
101
virt-v2v-0.8.5-00-786a74f0.patch
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
commit 786a74f0f1c14cfb54a65ea8c5fc097f612b03a5
|
||||
Author: Matthew Booth <mbooth@redhat.com>
|
||||
Date: Tue Dec 13 14:18:10 2011 +0000
|
||||
|
||||
Fix crash during format conversions
|
||||
|
||||
Fix a regression introduced by commit 6dec2753fd9e7d726e140bb246ccf32df8af9fb5.
|
||||
We didn't update the format conversion code when updating the GuestfsHandle API.
|
||||
This change updates the API again, removing an unnecessary dependency between
|
||||
GuestfsHandle and Volume.
|
||||
|
||||
diff --git a/lib/Sys/VirtConvert/GuestfsHandle.pm b/lib/Sys/VirtConvert/GuestfsHandle.pm
|
||||
index f6fa63f..fe34d14 100644
|
||||
--- a/lib/Sys/VirtConvert/GuestfsHandle.pm
|
||||
+++ b/lib/Sys/VirtConvert/GuestfsHandle.pm
|
||||
@@ -57,9 +57,9 @@ close() method, and the ability to register pre-close callbacks.
|
||||
=item new(disks, transferiso, isrhev)
|
||||
|
||||
Create a new object. Open a new Sys::Guestfs handle to proxy, using the disks
|
||||
-defined in I<disks>, which is taken from the guest metadata. Add I<transferiso>
|
||||
-as a read-only drive if it is given. If I<isrhev> is true, the handle will use
|
||||
-user and group 36:36.
|
||||
+defined in I<disks>, which is list of disk metadata defined as: [ [ name, path,
|
||||
+format ], ... ]. Add I<transferiso> as a read-only drive if it is given. If
|
||||
+I<isrhev> is true, the handle will use user and group 36:36.
|
||||
|
||||
=cut
|
||||
|
||||
@@ -77,12 +77,12 @@ sub new
|
||||
|
||||
$g = Sys::Guestfs->new();
|
||||
foreach my $disk (@{$disks}) {
|
||||
- my $vol = $disk->{dst};
|
||||
+ my ($name, $path, $format) = @$disk;
|
||||
|
||||
- $g->add_drive_opts($vol->get_path(),
|
||||
- format => $vol->get_format(),
|
||||
+ $g->add_drive_opts($path,
|
||||
+ format => $format,
|
||||
iface => $interface,
|
||||
- name => $disk->{device});
|
||||
+ name => $name);
|
||||
}
|
||||
|
||||
# Add the transfer iso if there is one
|
||||
diff --git a/lib/Sys/VirtConvert/Transfer/Local.pm b/lib/Sys/VirtConvert/Transfer/Local.pm
|
||||
index 667b282..5053ccb 100644
|
||||
--- a/lib/Sys/VirtConvert/Transfer/Local.pm
|
||||
+++ b/lib/Sys/VirtConvert/Transfer/Local.pm
|
||||
@@ -179,12 +179,13 @@ package Sys::VirtConvert::Transfer::GuestfsStream;
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
- my ($path) = @_;
|
||||
+ my ($path, $format) = @_;
|
||||
|
||||
my $self = {};
|
||||
bless($self, $class);
|
||||
|
||||
- $self->{g} = new Sys::VirtConvert::GuestfsHandle([$path], undef, 0);
|
||||
+ $self->{g} = new Sys::VirtConvert::GuestfsHandle([['sda', $path, $format]],
|
||||
+ undef, 0);
|
||||
|
||||
return $self;
|
||||
}
|
||||
diff --git a/p2v/server/virt-p2v-server.pl b/p2v/server/virt-p2v-server.pl
|
||||
index 8c52b08..7427055 100755
|
||||
--- a/p2v/server/virt-p2v-server.pl
|
||||
+++ b/p2v/server/virt-p2v-server.pl
|
||||
@@ -343,8 +343,12 @@ sub convert
|
||||
eval {
|
||||
my $transferiso = $config->get_transfer_iso();
|
||||
|
||||
+ my @disks = map { [ $_->{device},
|
||||
+ $_->{dst}->get_path(),
|
||||
+ $_->{dst}->get_format() ] } @{$meta->{disks}};
|
||||
+
|
||||
$g = new Sys::VirtConvert::GuestfsHandle(
|
||||
- $meta->{disks},
|
||||
+ \@disks,
|
||||
$transferiso,
|
||||
$target->isa('Sys::VirtConvert::Connection::RHEVTarget')
|
||||
);
|
||||
diff --git a/v2v/virt-v2v.pl b/v2v/virt-v2v.pl
|
||||
index dead384..b438766 100755
|
||||
--- a/v2v/virt-v2v.pl
|
||||
+++ b/v2v/virt-v2v.pl
|
||||
@@ -518,8 +518,12 @@ v2vdie __('Guest doesn\'t define any storage devices')
|
||||
$source->copy_storage($target, $output_format, $output_sparse);
|
||||
|
||||
# Open a libguestfs handle on the guest's storage devices
|
||||
+my @disks = map { [ $_->{device},
|
||||
+ $_->{dst}->get_path(),
|
||||
+ $_->{dst}->get_format() ] } @{$meta->{disks}};
|
||||
+
|
||||
my $g = new Sys::VirtConvert::GuestfsHandle(
|
||||
- $meta->{disks},
|
||||
+ \@disks,
|
||||
$transferiso,
|
||||
$output_method eq 'rhev'
|
||||
);
|
||||
160
virt-v2v.spec
160
virt-v2v.spec
|
|
@ -1,6 +1,6 @@
|
|||
Name: virt-v2v
|
||||
Version: 0.8.1
|
||||
Release: 4%{?dist}
|
||||
Version: 0.8.5
|
||||
Release: 2%{?dist}%{?extra_release}
|
||||
Summary: Convert a virtual machine to run on KVM
|
||||
|
||||
Group: Applications/System
|
||||
|
|
@ -16,12 +16,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|||
# local seq no: the order the patches should be applied in
|
||||
# git commit: the first 8 characters of the git commit hash
|
||||
|
||||
# Upstream patches to fix p2v client build in rawhide/f15
|
||||
Patch0: virt-v2v-0.8.1-00-44eb9021-modified.patch
|
||||
Patch1: virt-v2v-0.8.1-01-e34a8c09.patch
|
||||
Patch2: virt-v2v-0.8.1-02-fadb1929.patch
|
||||
Patch3: virt-v2v-0.8.1-03-a965f7e0.patch
|
||||
Patch4: virt-v2v-0.8.1-04-77bd7908.patch
|
||||
Patch0: virt-v2v-0.8.5-00-786a74f0.patch
|
||||
|
||||
# Unfortunately, despite really being noarch, we have to make virt-v2v arch
|
||||
# dependent to avoid build failures on architectures where libguestfs isn't
|
||||
|
|
@ -44,9 +39,7 @@ BuildRequires: perl(IO::String)
|
|||
BuildRequires: perl(Locale::TextDomain)
|
||||
BuildRequires: perl(Module::Pluggable)
|
||||
BuildRequires: perl(Net::HTTPS)
|
||||
BuildRequires: perl(Net::SSL)
|
||||
BuildRequires: perl(Sys::Guestfs)
|
||||
BuildRequires: perl(Sys::Guestfs::Lib)
|
||||
BuildRequires: perl(Sys::Virt)
|
||||
BuildRequires: perl(Term::ProgressBar)
|
||||
BuildRequires: perl(URI)
|
||||
|
|
@ -58,15 +51,15 @@ BuildRequires: perl(XML::Writer)
|
|||
BuildRequires: perl-libguestfs >= 1:1.6.0
|
||||
BuildRequires: perl-hivex >= 1.2.2
|
||||
|
||||
# virt-p2v build requirements
|
||||
BuildRequires: rubygem(rake)
|
||||
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
|
||||
# Need an explicit package dependency for version requires
|
||||
Requires: perl-libguestfs >= 1:1.6.0
|
||||
Requires: perl-hivex >= 1.2.2
|
||||
|
||||
# Required for passing flags to get_xml_description
|
||||
Requires: perl(Sys::Virt) >= 0.2.4
|
||||
|
||||
# Net::SSL is loaded dynamically by Net::HTTPS in
|
||||
# Sys::VirtConvert::Transfer::ESX. The dependency isn't automatically
|
||||
# discovered.
|
||||
|
|
@ -79,7 +72,10 @@ Requires: libvirt >= 0.8.1
|
|||
Requires: /usr/bin/mkisofs
|
||||
|
||||
# For guest image inspection
|
||||
Requires: /usr/bin/qemu-img
|
||||
Requires: /usr/bin/qemu-img
|
||||
|
||||
# For ssh transfers
|
||||
Requires: /usr/bin/ssh
|
||||
|
||||
|
||||
%description
|
||||
|
|
@ -87,77 +83,21 @@ virt-v2v is a tool for converting and importing virtual machines to
|
|||
libvirt-managed KVM, or Red Hat Enterprise Virtualization. It can import a
|
||||
variety of guest operating systems from libvirt-managed hosts and VMware ESX.
|
||||
|
||||
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
||||
%global gemname virt-p2v
|
||||
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
|
||||
%global rubyabi 1.8
|
||||
|
||||
%package -n rubygem-%{gemname}
|
||||
Summary: Send a machine's storage and metadata to virt-p2v-server
|
||||
BuildArch: noarch
|
||||
Requires: ruby(abi) = %{rubyabi}
|
||||
Requires: rubygem(gtk2)
|
||||
Requires: rubygem(gettext)
|
||||
Requires: rubygem(net-ssh)
|
||||
Requires: ruby(dbus)
|
||||
|
||||
Requires: /sbin/blockdev
|
||||
Requires: /usr/bin/hwloc-info
|
||||
Requires: NetworkManager
|
||||
|
||||
Provides: rubygem(%{gemname}) = %{version}
|
||||
|
||||
%description -n rubygem-%{gemname}
|
||||
virt-p2v is a client which connects to a virt-p2v-server and transfer's the host
|
||||
machine's storage and metadata. virt-p2v is intended to be run from a live
|
||||
image, so it is unlikely you want to install it directly.
|
||||
|
||||
%package -n rubygem-%{gemname}-doc
|
||||
Summary: Documentation for rubygem-%{gemname}
|
||||
Group: Documentation
|
||||
BuildArch: noarch
|
||||
Requires: rubygem-%{gemname} = %{version}-%{release}
|
||||
|
||||
%description -n rubygem-%{gemname}-doc
|
||||
Documentation for rubygem-%{gemname}
|
||||
|
||||
%package -n virt-p2v-image-builder
|
||||
Summary: Create a virt-p2v bootable image
|
||||
BuildArch: noarch
|
||||
|
||||
# image builder script requires
|
||||
Requires: /usr/bin/ksflatten
|
||||
Requires: /usr/sbin/setenforce
|
||||
Requires: /usr/bin/livecd-creator
|
||||
|
||||
# Kickstart nochroot scripts requires
|
||||
Requires: /usr/bin/livecd-iso-to-disk
|
||||
Requires: /usr/bin/livecd-iso-to-pxeboot
|
||||
Requires: /usr/bin/image-minimizer
|
||||
|
||||
%description -n virt-p2v-image-builder
|
||||
virt-p2v-image-builder is a tool to create a bootable virt-p2v live image.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-v%{version}
|
||||
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
|
||||
%build
|
||||
%{__perl} Build.PL
|
||||
./Build
|
||||
|
||||
pushd p2v/client
|
||||
rake gem
|
||||
popd
|
||||
|
||||
# Neither perl nor ruby need debuginfo
|
||||
# perl doesn't need debuginfo
|
||||
%define debug_package %{nil}
|
||||
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
./Build install \
|
||||
|
|
@ -170,44 +110,27 @@ rm -rf %{buildroot}
|
|||
statedir=%{buildroot}%{_localstatedir}/lib/virt-v2v
|
||||
mkdir -p $statedir/software
|
||||
|
||||
# Copy Windows dependencies into place
|
||||
windir=$statedir/software/windows
|
||||
mkdir -p $windir
|
||||
|
||||
cp windows/rhsrvany.exe windows/firstboot.bat $windir/
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}
|
||||
cp v2v/virt-v2v.conf %{buildroot}%{_sysconfdir}/
|
||||
cp v2v/virt-v2v.db $statedir/
|
||||
|
||||
%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.
|
||||
find %{buildroot}/%{perl_archlib} -name .packlist -type f | xargs rm
|
||||
|
||||
# Install p2v-client
|
||||
mkdir -p %{buildroot}/%{_bindir}
|
||||
mkdir -p %{buildroot}/%{gemdir}
|
||||
|
||||
gem install --local --install-dir %{buildroot}%{gemdir} \
|
||||
--force --rdoc p2v/client/pkg/%{gemname}-%{version}.gem
|
||||
mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
|
||||
find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
|
||||
cp COPYING %{buildroot}/%{geminstdir}
|
||||
|
||||
# Install p2v-image-builder
|
||||
%global builderdir %{_datadir}/virt-p2v-image-builder
|
||||
builder=%{buildroot}/%{_bindir}/virt-p2v-image-builder
|
||||
mkdir -p %{buildroot}%{builderdir}
|
||||
cp p2v/image-builder/*.ks %{buildroot}%{builderdir}
|
||||
cp p2v/image-builder/virt-p2v-image-builder $builder
|
||||
|
||||
# Set the default data directory
|
||||
sed -i -e 's,^DEFAULT_DATADIR=.*,DEFAULT_DATADIR=%{builderdir},' $builder
|
||||
[ -d "%{buildroot}/%{perl_archlib}" ] &&
|
||||
find %{buildroot}/%{perl_archlib} -name .packlist -type f | xargs rm
|
||||
|
||||
|
||||
%check
|
||||
./Build test
|
||||
|
||||
pushd p2v/client
|
||||
# No tests yet
|
||||
#rake test
|
||||
popd
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
|
@ -236,32 +159,27 @@ rm -rf %{buildroot}
|
|||
%dir %{_localstatedir}/lib/virt-v2v
|
||||
|
||||
%config(noreplace) %{_sysconfdir}/virt-v2v.conf
|
||||
%config %{_localstatedir}/lib/virt-v2v/virt-v2v.db
|
||||
%config(noreplace) %{_localstatedir}/lib/virt-v2v/software
|
||||
|
||||
%files -n rubygem-%{gemname}
|
||||
%defattr(-, root, root, -)
|
||||
%{_bindir}/virt-p2v
|
||||
%dir %{geminstdir}
|
||||
%{geminstdir}/bin
|
||||
%{geminstdir}/lib
|
||||
%doc %{geminstdir}/COPYING
|
||||
%doc %{geminstdir}/Manifest
|
||||
%doc %{geminstdir}/Rakefile
|
||||
%doc %{geminstdir}/%{gemname}.gemspec
|
||||
%{gemdir}/cache/%{gemname}-%{version}.gem
|
||||
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
||||
|
||||
%files -n rubygem-%{gemname}-doc
|
||||
%defattr(-, root, root, -)
|
||||
%{gemdir}/doc/%{gemname}-%{version}
|
||||
|
||||
%files -n virt-p2v-image-builder
|
||||
%defattr(-, root, root, -)
|
||||
%{_bindir}/virt-p2v-image-builder
|
||||
%{builderdir}
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Dec 13 2011 Matthew Booth <mbooth@redhat.com> - 0.8.5-2
|
||||
- Fix crash during format conversion (BZ#767197)
|
||||
|
||||
* Mon Dec 5 2011 Matthew Booth <mbooth@redhat.com> - 0.8.5-1
|
||||
- New upstream release 0.8.5
|
||||
|
||||
* Mon Sep 19 2011 Richard W.M. Jones <rjones@redhat.com> - 0.8.4-1
|
||||
- New upstream release 0.8.4
|
||||
|
||||
* 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue