- 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.
This commit is contained in:
Richard W.M. Jones 2011-08-22 14:38:16 +01:00
parent 54fb49c5f3
commit c2522473e2
9 changed files with 99 additions and 9670 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@
# Source
/virt-v2v-v0.8.1.tar.gz
/virt-v2v-v0.8.3.tar.gz

View File

@ -1 +1 @@
e850297f55ae839b28c8417d0acd080b virt-v2v-v0.8.1.tar.gz
125315e4901b2dfae16590a746e35bfc virt-v2v-v0.8.3.tar.gz

File diff suppressed because it is too large Load Diff

View File

@ -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))

View File

@ -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

View File

@ -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

View File

@ -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';

View File

@ -0,0 +1,67 @@
From bd513aaf12a9cd27432eb36d341fd88f4d64dac4 Mon Sep 17 00:00:00 2001
From: Matthew Booth <mbooth@redhat.com>
Date: Fri, 19 Aug 2011 17:43:55 +0100
Subject: [PATCH] Fix whitespace issues in translations
---
po/es.po | 2 +-
po/nl.po | 2 +-
po/pl.po | 2 +-
po/uk.po | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/po/es.po b/po/es.po
index c24bf59..09fb7fe 100644
--- a/po/es.po
+++ b/po/es.po
@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Red Hat Inc.
# This file is distributed under the same license as the PACKAGE package.
-#
+#
# mdbooth <mbooth@redhat.com>, 2011.
# Héctor Daniel Cabrera <logan@fedoraproject.org>, 2011.
msgid ""
diff --git a/po/nl.po b/po/nl.po
index 3f88fa0..fe74413 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Red Hat Inc.
# This file is distributed under the same license as the PACKAGE package.
-#
+#
# mdbooth <mbooth@redhat.com>, 2011.
# Geert Warrink <geert.warrink@onsnet.nu>, 2011.
msgid ""
diff --git a/po/pl.po b/po/pl.po
index 6465997..9508124 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Red Hat Inc.
# This file is distributed under the same license as the PACKAGE package.
-#
+#
# mdbooth <mbooth@redhat.com>, 2011.
# Piotr Drąg <piotrdrag@gmail.com>, 2011.
msgid ""
diff --git a/po/uk.po b/po/uk.po
index 13172bd..21676bc 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Red Hat Inc.
# This file is distributed under the same license as the PACKAGE package.
-#
+#
# mdbooth <mbooth@redhat.com>, 2011.
# Yuri Chornoivan <yurchor@ukr.net>, 2011.
msgid ""
--
1.7.6

View File

@ -1,6 +1,6 @@
Name: virt-v2v
Version: 0.8.1
Release: 4%{?dist}
Version: 0.8.3
Release: 1%{?dist}
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
Patch1: virt-v2v-0.8.3-01-bd513aaf.patch
# Unfortunately, despite really being noarch, we have to make virt-v2v arch
# dependent to avoid build failures on architectures where libguestfs isn't
@ -48,19 +43,19 @@ BuildRequires: perl(Net::SSL)
BuildRequires: perl(Sys::Guestfs)
BuildRequires: perl(Sys::Guestfs::Lib)
BuildRequires: perl(Sys::Virt)
BuildRequires: perl(Term::ProgressBar)
BuildRequires: perl(URI)
BuildRequires: perl(XML::DOM)
BuildRequires: perl(XML::DOM::XPath)
BuildRequires: perl(XML::Writer)
# This is a bug introduced by f2c5c8fa337f361057353ffa3fe6539cb1a5823c
# perl(Term::ProgressBar) should not be a build requirement
BuildRequires: perl(Term::ProgressBar)
# Need an explicit package dependency for version requires
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
@ -72,6 +67,10 @@ Requires: perl-hivex >= 1.2.2
# discovered.
Requires: perl(Net::SSL)
# Term::ProgressBar is loaded conditionally. The dependency isn't automatically
# discovered
Requires: perl(Term::ProgressBar)
# Need >= 0.8.1 for rpc fix talking to RHEL 5 libvirt
Requires: libvirt >= 0.8.1
@ -81,83 +80,32 @@ Requires: /usr/bin/mkisofs
# For guest image inspection
Requires: /usr/bin/qemu-img
# For ssh transfers
Requires: /usr/bin/ssh
# For device_map lens
Requires: augeas-libs => augeas-libs-0.7.2-4
%description
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 \
@ -172,42 +120,19 @@ mkdir -p $statedir/software
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 +161,18 @@ 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
* 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