Update to 1.2.0 release with python binding split off

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2013-12-03 15:10:43 +00:00
parent 0f6f9b973a
commit 8c9e40d383

View File

@ -98,6 +98,11 @@
%else
%define with_storage_sheepdog 0
%endif
%if 0%{?fedora} >= 19
%define with_storage_gluster 0%{!?_without_storage_gluster:%{server_drivers}}
%else
%define with_storage_gluster 0
%endif
%define with_numactl 0%{!?_without_numactl:%{server_drivers}}
%define with_selinux 0%{!?_without_selinux:%{server_drivers}}
@ -126,7 +131,6 @@
%define with_libssh2 0%{!?_without_libssh2:0}
# Non-server/HV driver defaults which are always enabled
%define with_python 0%{!?_without_python:1}
%define with_sasl 0%{!?_without_sasl:1}
@ -281,6 +285,7 @@
%define with_storage_mpath 0
%define with_storage_rbd 0
%define with_storage_sheepdog 0
%define with_storage_gluster 0
%define with_storage_disk 0
%endif
@ -366,8 +371,8 @@
Summary: Library providing a simple virtualization API
Name: libvirt
Version: 1.1.4
Release: 2%{?dist}%{?extra_release}
Version: 1.2.0
Release: 1%{?dist}%{?extra_release}
License: LGPLv2+
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@ -378,9 +383,6 @@ URL: http://libvirt.org/
%endif
Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz
# virsh nodedev-detach fails if device has no driver (bz #1028629)
Patch0001: 0001-virpci-Don-t-error-on-unbinded-devices.patch
%if %{with_libvirtd}
Requires: libvirt-daemon = %{version}-%{release}
%if %{with_network}
@ -428,7 +430,7 @@ BuildRequires: gettext-devel
BuildRequires: libtool
BuildRequires: /usr/bin/pod2man
%endif
BuildRequires: python-devel
BuildRequires: python
%if %{with_systemd}
BuildRequires: systemd-units
%endif
@ -558,6 +560,10 @@ BuildRequires: device-mapper-devel
BuildRequires: ceph-devel
%endif
%endif
%if %{with_storage_gluster}
BuildRequires: glusterfs-api-devel >= 3.4.1
BuildRequires: glusterfs-devel >= 3.4.1
%endif
%if %{with_numactl}
# For QEMU/LXC numa info
BuildRequires: numactl-devel
@ -1148,25 +1154,9 @@ Includes the Sanlock lock manager plugin for the QEMU
driver
%endif
%if %{with_python}
%package python
Summary: Python bindings for the libvirt library
Group: Development/Libraries
Requires: %{name}-client = %{version}-%{release}
%description python
The libvirt-python package contains a module that permits applications
written in the Python programming language to use the interface
supplied by the libvirt library to use the virtualization capabilities
of recent versions of Linux (and other OSes).
%endif
%prep
%setup -q
# virsh nodedev-detach fails if device has no driver (bz #1028629)
%patch0001 -p1
%build
%if ! %{with_xen}
%define _without_xen --without-xen
@ -1228,10 +1218,6 @@ of recent versions of Linux (and other OSes).
%define _without_polkit --without-polkit
%endif
%if ! %{with_python}
%define _without_python --without-python
%endif
%if ! %{with_libvirtd}
%define _without_libvirtd --without-libvirtd
%endif
@ -1280,6 +1266,10 @@ of recent versions of Linux (and other OSes).
%define _without_storage_sheepdog --without-storage-sheepdog
%endif
%if ! %{with_storage_gluster}
%define _without_storage_gluster --without-storage-gluster
%endif
%if ! %{with_numactl}
%define _without_numactl --without-numactl
%endif
@ -1384,7 +1374,6 @@ of recent versions of Linux (and other OSes).
%{?_without_sasl} \
%{?_without_avahi} \
%{?_without_polkit} \
%{?_without_python} \
%{?_without_libvirtd} \
%{?_without_uml} \
%{?_without_phyp} \
@ -1402,6 +1391,7 @@ of recent versions of Linux (and other OSes).
%{?_without_storage_mpath} \
%{?_without_storage_rbd} \
%{?_without_storage_sheepdog} \
%{?_without_storage_gluster} \
%{?_without_numactl} \
%{?_without_numad} \
%{?_without_capng} \
@ -1438,14 +1428,12 @@ rm -fr %{buildroot}
# on RHEL 5, thus we need to expand it here.
make install DESTDIR=%{?buildroot} SYSTEMD_UNIT_DIR=%{_unitdir}
for i in domain-events/events-c dominfo domsuspend hellolibvirt openauth python xml/nwfilter systemtap
for i in domain-events/events-c dominfo domsuspend hellolibvirt openauth xml/nwfilter systemtap
do
(cd examples/$i ; make clean ; rm -rf .deps .libs Makefile Makefile.in)
done
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a
%if %{with_driver_modules}
@ -1497,8 +1485,8 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
%endif
mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version} \
$RPM_BUILD_ROOT%{_datadir}/doc/libvirt-docs-%{version}
# Copied into libvirt-docs subpackage eventually
mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version} libvirt-docs
%if %{with_dtrace}
%ifarch %{power64} s390x x86_64 ia64 alpha sparc64
@ -1712,7 +1700,7 @@ fi
/sbin/ldconfig
%if %{with_systemd}
%if %{with_systemd_macros}
%systemd_postun_with_restart libvirt-guests.service
%systemd_postun libvirt-guests.service
%endif
%triggerun client -- libvirt < 0.9.4
%{_bindir}/systemd-sysv-convert --save libvirt-guests >/dev/null 2>&1 ||:
@ -1720,9 +1708,8 @@ fi
# If the package is allowed to autostart:
/bin/systemctl --no-reload enable libvirt-guests.service >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
# Run this because the SysV package being removed won't do them
/sbin/chkconfig --del libvirt-guests >/dev/null 2>&1 || :
/bin/systemctl try-restart libvirt-guests.service >/dev/null 2>&1 || :
%endif
%if %{with_sanlock}
@ -1733,17 +1720,18 @@ if getent group sanlock > /dev/null ; then
fi
%endif
%if %{with_lxc}
%pre login-shell
getent group virtlogin >/dev/null || groupadd -r virtlogin
exit 0
%endif
%files
%defattr(-, root, root)
%files docs
%defattr(-, root, root)
%doc AUTHORS ChangeLog.gz NEWS README TODO
# Website
%dir %{_datadir}/doc/libvirt-docs-%{version}
%dir %{_datadir}/doc/libvirt-docs-%{version}/html
%{_datadir}/doc/libvirt-docs-%{version}/html/*
%doc AUTHORS ChangeLog.gz NEWS README TODO libvirt-docs/*
# API docs
%dir %{_datadir}/gtk-doc/html/libvirt/
@ -2083,7 +2071,7 @@ fi
%if %{with_lxc}
%files login-shell
%attr(4755, root, root) %{_bindir}/virt-login-shell
%attr(4750, root, virtlogin) %{_bindir}/virt-login-shell
%config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf
%{_mandir}/man1/virt-login-shell.1*
%endif
@ -2111,19 +2099,10 @@ fi
%doc examples/xml
%doc examples/systemtap
%if %{with_python}
%files python
%defattr(-, root, root)
%{_libdir}/python*/site-packages/libvirt.py*
%{_libdir}/python*/site-packages/libvirt_qemu.py*
%{_libdir}/python*/site-packages/libvirt_lxc.py*
%{_libdir}/python*/site-packages/libvirtmod*
%doc examples/python
%doc examples/domain-events/events-python
%endif
%changelog
* Mon Dec 2 2013 Daniel P. Berrange <berrange@redhat.com> - 1.2.0-1
- Update to 1.2.0 release with python in a separte srpm
* Tue Nov 12 2013 Cole Robinson <crobinso@redhat.com> - 1.1.4-2
- virsh nodedev-detach fails if device has no driver (bz #1028629)