Update to release 0.8.0

This commit is contained in:
Matthew Booth 2011-04-19 11:43:55 +01:00
parent 69db354ea8
commit 333d6b2ca7
3 changed files with 136 additions and 17 deletions

14
.gitignore vendored
View File

@ -1,3 +1,11 @@
virt-v2v-v0.6.1.tar.gz
/virt-v2v-v0.7.0.tar.gz
/virt-v2v-v0.7.1.tar.gz
# RPM target directories
/noarch
/x86_64
# Version-dependent build artifacts
/.build-0.8.0-1.fc14.log
/virt-v2v-v0.8.0
/virt-v2v-0.8.0-1.fc14.src.rpm
# Source
/virt-v2v-v0.8.0.tar.gz

View File

@ -1 +1 @@
04ea97d57abf71fcb45eb37528d821a5 virt-v2v-v0.7.1.tar.gz
862ef9c8373946f5e6d2680b1d7f3116 virt-v2v-v0.8.0.tar.gz

View File

@ -1,11 +1,11 @@
Name: virt-v2v
Version: 0.7.1
Version: 0.8.0
Release: 1%{?dist}
Summary: Convert a virtual machine to run on KVM
Group: Applications/System
License: GPLv2+ and LGPLv2+
URL: http://git.fedoraproject.org/git/virt-v2v.git
URL: http://git.fedorahosted.org/git/virt-v2v.git
Source0: https://fedorahosted.org/releases/v/i/virt-v2v/%{name}-v%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -51,14 +51,19 @@ BuildRequires: perl(XML::Writer)
BuildRequires: perl-libguestfs >= 1:1.6.0
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))
# Need an explicit package dependency for version requires
Requires: perl-libguestfs >= 1:1.6.0
Requires: perl-hivex >= 1.2.2
# Net::SSL is loaded dynamically by Net::HTTPS in Sys::VirtV2V::Transfer::ESX.
# The dependency isn't automatically discovered.
# Net::SSL is loaded dynamically by Net::HTTPS in
# Sys::VirtConvert::Transfer::ESX. The dependency isn't automatically
# discovered.
Requires: perl(Net::SSL)
# Need >= 0.8.1 for rpc fix talking to RHEL 5 libvirt
@ -76,6 +81,56 @@ 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}
@ -84,37 +139,66 @@ variety of guest operating systems from libvirt-managed hosts and VMware ESX.
%{__perl} Build.PL
./Build
# Perl doesn't need debuginfo
pushd p2v-client
rake gem
popd
# Neither perl nor ruby need debuginfo
%define debug_package %{nil}
%install
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
./Build install \
--destdir $RPM_BUILD_ROOT \
--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
statedir=$RPM_BUILD_ROOT%{_localstatedir}/lib/virt-v2v
statedir=%{buildroot}%{_localstatedir}/lib/virt-v2v
mkdir -p $statedir/software
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
cp v2v/virt-v2v.conf $RPM_BUILD_ROOT%{_sysconfdir}/
mkdir -p %{buildroot}%{_sysconfdir}
cp v2v/virt-v2v.conf %{buildroot}%{_sysconfdir}/
%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 $RPM_BUILD_ROOT/%{perl_archlib} -name .packlist -type f | xargs rm
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
%check
./Build test
pushd p2v-client
# No tests yet
#rake test
popd
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
%files -f %{name}.lang
@ -134,15 +218,42 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man5/*.5*
# Executables
%attr(0755,root,root) %{_bindir}/*
%attr(0755,root,root) %{_bindir}/virt-v2v
%attr(0755,root,root) %{_bindir}/virt-p2v-server
%dir %{_localstatedir}/lib/virt-v2v
%config(noreplace) %{_sysconfdir}/virt-v2v.conf
%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 Apr 19 2011 Matthew Booth <mbooth@redhat.com> - 0.8.0-1
- Update to release 0.8.0
- Include virt-p2v
* Thu Jan 27 2011 Matthew Booth <mbooth@redhat.com> - 0.7.1-1
- Update to release 0.7.1