Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

# This macro is used for the continuous automated builds. It just
# allows an extra fragment based on the timestamp to be appended
# to the release. This distinguishes automated builds, from formal
# Fedora RPM builds
%define _extra_release %{?dist:%{dist}}%{!?dist:%{?extra_release:%{extra_release}}}

%define appname virtinst

Summary: Python modules for starting Xen guest installations
Name: python-%{appname}
Version: 0.300.3
Release: 3%{_extra_release}
Source0: http://virt-manager.org/download/sources/%{appname}/%{appname}-%{version}.tar.gz
Patch1: %{appname}-%{version}-keep-qemu-cdrom.patch
Patch2: %{appname}-%{version}-fix-default-arch.patch
Patch3: %{appname}-%{version}-fv-extraargs.patch
Patch4: %{appname}-%{version}-update-polish-trans.patch
License: GPLv2+
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Url: http://virt-manager.org/
Requires: libvirt-python >= 0.2.1
# Disabled to allow minimal non-X installs
#Requires: virt-viewer
Requires: urlgrabber
Requires: libxml2-python
Requires: python-urlgrabber
BuildRequires: python-devel
BuildRequires: libxml2-python
BuildRequires: python-urlgrabber
BuildRequires: libvirt-python
BuildRequires: gettext

%description
virtinst is a module to help in starting installations of Fedora/Red
Hat Enterprise Linux related distributions inside of virtual machines.  It
supports both paravirt guests (for which only FC and RHEL guests are
currently supported) as well as fully virtualized guests.  It uses
libvirt (http://www.libvirt.org) for starting things.

Also contained is a simple script virt-install which uses
virtinst in a command line mode.

%prep
%setup -q -n %{appname}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%build
python setup.py build

%install
rm -rf $RPM_BUILD_ROOT
python setup.py install -O1 --root=$RPM_BUILD_ROOT
# Back compat in case people hardcoded old /usr/sbin/virt-install location
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
ln -s ../bin/virt-install $RPM_BUILD_ROOT/%{_sbindir}/virt-install

%find_lang %{appname} || echo 0

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{appname}.lang
%defattr(-,root,root)
%doc README AUTHORS NEWS ChangeLog doc/image.rng doc/example1.xml
%dir %{python_sitelib}/%{appname}
%{python_sitelib}/%{appname}/*
%{python_sitelib}/%{appname}-*.egg-info
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_sbindir}/virt-install
%{_bindir}/virt-install
%{_bindir}/virt-clone
%{_bindir}/virt-image

%changelog
* Tue Apr 1 2008 Cole Robinson <crobinso@redhat.com> - 0.300.3-3.fc9
- Revert unintentionally committed spec change.

* Thu Mar 27 2008 Cole Robinson <crobinso@redhat.com> - 0.300.3-2.fc9
- Keep qemu cdrom device after first stage of install. (rhbz #244802)
- Fix default guest arch regression from virt-install
- Pass extra args to a fullvirt guest from virt-install
- Update polish translation

* Mon Mar 10 2008 Daniel P. Berrange <berrange@redhat.com> - 0.300.3-1.fc9
- Update to 0.300.3 release

* Thu Jan 31 2008 Daniel P. Berrange <berrange@redhat.com> - 0.300.2-3.fc9
- Disable virt-viewer dep to allow non-X installs (rhbz #387971)

* Thu Jan 10 2008 Daniel P. Berrange <berrange@redhat.com> - 0.300.2-2.fc9
- Added dep on libxml2-python and python-urlgrabber

* Thu Jan 10 2008 Daniel P. Berrange <berrange@redhat.com> - 0.300.2-1.fc9
- Update to 0.300.2 release

* Thu Oct 11 2007 Daniel P. Berrange <berrange@redhat.com> - 0.300.1-3.fc8
- Fix missing file exception check with NFS installs (rhbz #325591)

* Thu Oct  4 2007 Daniel P. Berrange <berrange@redhat.com> - 0.300.1-2.fc8
- Remove USB tablet for all except Windows (rhbz #302951)

* Tue Sep 25 2007 Daniel P. Berrange <berrange@redhat.com> - 0.300.1-1.fc8
- Update to 0.300.1 release
- Added PXE support

* Wed Sep 19 2007 Daniel P. Berrange <berrange@redhat.com> - 0.300.0-4.fc8
- Fix post install CDROM config for KVM guests

* Tue Sep 11 2007 Daniel P. Berrange <berrange@redhat.com> - 0.300.0-3.fc8
- Fixed default architecture. Again.

* Tue Sep 11 2007 Daniel P. Berrange <berrange@redhat.com> - 0.300.0-2.fc8
- Fixed detection of Fedora 8 distro trees (rhbz #273781)

* Wed Aug 29 2007 Daniel P. Berrange <berrange@redhat.com> - 0.300.0-1.fc8
- Updated to 0.300.0
- Added virt-image tool
- Switched to calling virsh console and virt-viewer
- Improved user input validation

* Fri Aug 24 2007 Daniel P. Berrange <berrange@redhat.com> - 0.200.0-3.fc8
- Remove ExludeArch since libvirt is now available everywhere

* Thu Jul 26 2007 Daniel P. Berrange <berrange@redhat.com> - 0.200.0-2.fc8
- Fixed default architecture

* Tue Jul 18 2007 Daniel P. Berrange <berrange@redhat.com> - 0.200.0-1.fc8
- Updated to 0.200.0
- Added virt-clone tool
- Added manual pages

* Tue May  1 2007 Daniel P. Berrange <berrange@redhat.com> - 0.103.0-3.fc7
- Fixed module import when using --accelerate
- Fixed detection of RHEL5 client distro
- Fixed default 'network's selection & default URI choice to
  not be Xen specific
- Fixed features XML when using initrd for fullvirt

* Tue Apr 17 2007 Mark McLoughlin <markmc@redhat.com> - 0.103.0-2.fc7
- Fix urlgrabber import error

* Mon Apr 16 2007 Daniel P. Berrange <berrange@redhat.com> - 0.103.0-1.fc7
- Updated to 0.103.0 release
- More validation of UUIDs
- Automatically reboot Windows guests with CDROM still attached
- Allow '-'  in guest names
- Adjust way distro detection is done

* Tue Mar 20 2007 Daniel P. Berrange <berrange@redhat.com> - 0.102.0-1.fc7
- Updated to 0.102.0 release

* Thu Mar  8 2007 Daniel P. Berrange <berrange@redhat.com> - 0.101.0-4.fc7
- Fixed install of paravirt Xen guests

* Fri Mar  2 2007 Daniel P. Berrange <berrange@redhat.com> - 0.101.0-3.fc7
- Fixed restart of guests after install completes

* Tue Feb 20 2007 Daniel P. Berrange <berrange@redhat.com> - 0.101.0-2.fc7
- Remove obsolete patches

* Tue Feb 20 2007 Daniel P. Berrange <berrange@redhat.com> - 0.101.0-1.fc7
- Updated to 0.101.0 to enable QEMU support

* Thu Jan 25 2007 Daniel P. Berrange <berrange@redhat.com> - 0.100.0-3.fc7
- Make back-compat with old APIs for Cobbler sanity

* Thu Jan 25 2007 Daniel P. Berrange <berrange@redhat.com> - 0.100.0-2.fc7
- Fix errors with NFS mount based installs

* Mon Jan 22 2007 Daniel P. Berrange <berrange@redhat.com> - 0.100.0-1.fc7
- Updated to 0.100.0 which now uses libvirt inactive domain support
  needed to operate correctly against xen 3.0.4

* Tue Dec 18 2006 Daniel P. Berrange <berrange@redhat.com> - 0.98.0-3.fc7
- don't traceback on invalid memory param (gcosta, #219270)
- let the console come back quicker to help with HVM installs (#212024)

* Thu Dec  7 2006 Jeremy Katz <katzj@redhat.com> - 0.98.0-2
- rebuild for python 2.5

* Thu Nov 30 2006 Jeremy Katz <katzj@redhat.com> - 0.98.0-1
- add support for creating nonsparse disk images (#217764)
- remove xeninst compat bits

* Mon Nov 20 2006 Jeremy Katz <katzj@redhat.com> - 0.97.0-1
- handle multiple nics/disks on virt-install command line (#215726)
- buildrequire python

* Wed Oct 18 2006 Jeremy Katz <katzj@redhat.com> - 0.96.0-1
- improve check for if a machine is hvm capable to catch when support isn't
  allowed by the bios (#211276)
- cleanup after nfs mount failure on pv install (#206196)
- support for setting vcpus (#210516)

* Thu Oct 12 2006 Jeremy Katz <katzj@redhat.com> - 0.95.0-1
- support for blktap (danpb)
- name change

* Tue Oct  3 2006 Jeremy Katz <katzj@redhat.com> - 0.94.0-1
- Fix using block device as backing (#209138)
- Fix error handling for invalid install locations (danpb)
- Write out vcpu config (danpb)

* Wed Sep 20 2006 Jeremy Katz <katzj@redhat.com> - 0.93.0-1
- Fix hvm network xm config (danpb)
- Enable PAE with pae hvm hosts (danpb)
- Fix hvm block backed cds (danpb)
- Fix handling of block devs backed by vbds (danpb)
- Ensure we're on a xen kernel (#205889)
- Default to vncunused

* Wed Sep  6 2006 Jeremy Katz <katzj@redhat.com> - 0.92.0-2
- add patch to fix memory parsing in interactive mode
- fix deps

* Wed Aug 30 2006 Jeremy Katz <katzj@redhat.com> - 0.92.0-1
- Fix silly loop when asking about graphics support (misa)
- Fix passing macaddr
- Add support so that we reboot into the guest after installation finishes 

* Tue Aug 29 2006 Jeremy Katz <katzj@redhat.com> - 0.91.0-1
- add support for paravirt guests with framebuffer. 

* Mon Aug 21 2006 Jeremy Katz <katzj@redhat.com> - 0.90.1-1
- fix tab/space whitespace inconsistency

* Wed Aug 16 2006 Jeremy Katz <katzj@redhat.com> - 0.90.0-2
- set ExcludeArch so that it doesn't get pulled into all trees

* Wed Aug 16 2006 Jeremy Katz <katzj@redhat.com> - 0.90.0-1
- update to version with fixed HVM domain creation

* Wed Aug 16 2006 Jeremy Katz <katzj@redhat.com> - 0.9-2
- add some missing requires

* Tue Aug 15 2006 Jeremy Katz <katzj@redhat.com> - 0.9-1
- Initial build