parent
69c5ad5162
commit
d24eeb1bfb
114
libvirt.spec
114
libvirt.spec
|
@ -1,32 +1,41 @@
|
||||||
# -*- rpm-spec -*-
|
# -*- rpm-spec -*-
|
||||||
|
|
||||||
%if "%{fedora}" >= "8"
|
%define with_xen 1
|
||||||
%define with_polkit 1
|
%define with_xen_proxy 1
|
||||||
%define with_proxy no
|
%define with_qemu 1
|
||||||
%else
|
%define with_openvz 1
|
||||||
%define with_polkit 0
|
%define with_lxc 1
|
||||||
%define with_proxy yes
|
%define with_polkit 0
|
||||||
|
|
||||||
|
# Xen is available only on i386 x86_64 ia64
|
||||||
|
%ifnarch i386 i686 x86_64 ia64
|
||||||
|
%define with_xen 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if ! %{with_xen}
|
||||||
|
%define with_xen_proxy 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if "%{fedora}"
|
%if "%{fedora}"
|
||||||
%ifarch ppc64
|
%ifarch ppc64
|
||||||
%define with_qemu 0
|
%define with_qemu 0
|
||||||
%else
|
|
||||||
%define with_qemu 1
|
|
||||||
%endif
|
%endif
|
||||||
%else
|
%endif
|
||||||
%define with_qemu 0
|
|
||||||
|
%if 0%{fedora} >= 8
|
||||||
|
%define with_polkit 1
|
||||||
|
%define with_xen_proxy 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Summary: Library providing a simple API virtualization
|
Summary: Library providing a simple API virtualization
|
||||||
Name: libvirt
|
Name: libvirt
|
||||||
Version: 0.4.4
|
Version: 0.4.6
|
||||||
Release: 2%{?dist}%{?extra_release}
|
Release: 1%{?dist}%{?extra_release}
|
||||||
License: LGPL
|
License: LGPLv2+
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Source: libvirt-%{version}.tar.gz
|
Source: libvirt-%{version}.tar.gz
|
||||||
Patch1: %{name}-%{version}-boot-cdrom.patch
|
Patch0: python_make.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
URL: http://libvirt.org/
|
URL: http://libvirt.org/
|
||||||
BuildRequires: python python-devel
|
BuildRequires: python python-devel
|
||||||
Requires: libxml2
|
Requires: libxml2
|
||||||
|
@ -47,12 +56,14 @@ Requires: PolicyKit >= 0.6
|
||||||
%endif
|
%endif
|
||||||
# For mount/umount in FS driver
|
# For mount/umount in FS driver
|
||||||
BuildRequires: util-linux
|
BuildRequires: util-linux
|
||||||
# PPC64 has no Xen nor QEmu, try to build anyway
|
# For showmount in FS driver (netfs discovery)
|
||||||
%ifnarch ppc64
|
BuildRequires: nfs-utils
|
||||||
|
Requires: nfs-utils
|
||||||
%if %{with_qemu}
|
%if %{with_qemu}
|
||||||
# From QEMU RPMs
|
# From QEMU RPMs
|
||||||
Requires: /usr/bin/qemu-img
|
Requires: /usr/bin/qemu-img
|
||||||
%else
|
%else
|
||||||
|
%if %{with_xen}
|
||||||
# From Xen RPMs
|
# From Xen RPMs
|
||||||
Requires: /usr/sbin/qcow-create
|
Requires: /usr/sbin/qcow-create
|
||||||
%endif
|
%endif
|
||||||
|
@ -63,10 +74,11 @@ Requires: lvm2
|
||||||
Requires: iscsi-initiator-utils
|
Requires: iscsi-initiator-utils
|
||||||
# For disk driver
|
# For disk driver
|
||||||
Requires: parted
|
Requires: parted
|
||||||
%ifarch i386 x86_64 ia64
|
%if %{with_xen}
|
||||||
BuildRequires: xen-devel
|
BuildRequires: xen-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
|
BuildRequires: xhtml1-dtds
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
|
@ -84,12 +96,11 @@ BuildRequires: PolicyKit-devel >= 0.6
|
||||||
%endif
|
%endif
|
||||||
# For mount/umount in FS driver
|
# For mount/umount in FS driver
|
||||||
BuildRequires: util-linux
|
BuildRequires: util-linux
|
||||||
# PPC64 has no Xen nor QEmu, try to build anyway
|
|
||||||
%ifnarch ppc64
|
|
||||||
%if %{with_qemu}
|
%if %{with_qemu}
|
||||||
# From QEMU RPMs
|
# From QEMU RPMs
|
||||||
BuildRequires: /usr/bin/qemu-img
|
BuildRequires: /usr/bin/qemu-img
|
||||||
%else
|
%else
|
||||||
|
%if %{with_xen}
|
||||||
# From Xen RPMs
|
# From Xen RPMs
|
||||||
BuildRequires: /usr/sbin/qcow-create
|
BuildRequires: /usr/sbin/qcow-create
|
||||||
%endif
|
%endif
|
||||||
|
@ -114,7 +125,7 @@ Summary: Libraries, includes, etc. to compile with the libvirt library
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: libvirt = %{version}
|
Requires: libvirt = %{version}
|
||||||
Requires: pkgconfig
|
Requires: pkgconfig
|
||||||
%ifarch i386 x86_64 ia64
|
%if %{with_xen}
|
||||||
Requires: xen-devel
|
Requires: xen-devel
|
||||||
%endif
|
%endif
|
||||||
Obsoletes: libvir-devel
|
Obsoletes: libvir-devel
|
||||||
|
@ -137,31 +148,33 @@ of recent versions of Linux (and other OSes).
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch0 -p0
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Xen is available only on i386 x86_64 ia64
|
%if ! %{with_xen}
|
||||||
%ifarch i386 i686 x86_64 ia64
|
%define _without_xen --without-xen
|
||||||
%configure --with-init-script=redhat \
|
|
||||||
--with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \
|
|
||||||
--with-remote-file=%{_localstatedir}/run/libvirtd.pid \
|
|
||||||
--with-xen-proxy=%{with_proxy}
|
|
||||||
%else
|
|
||||||
%ifnarch ppc64
|
|
||||||
%configure --without-xen \
|
|
||||||
--with-init-script=redhat \
|
|
||||||
--with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \
|
|
||||||
--with-remote-file=%{_localstatedir}/run/libvirtd.pid
|
|
||||||
%else
|
|
||||||
%configure --without-xen \
|
|
||||||
--without-qemu \
|
|
||||||
--with-init-script=redhat \
|
|
||||||
--with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \
|
|
||||||
--with-remote-file=%{_localstatedir}/run/libvirtd.pid
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
make
|
%if ! %{with_qemu}
|
||||||
|
%define _without_qemu --without-qemu
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if ! %{with_openvz}
|
||||||
|
%define _without_openvz --without-openvz
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if ! %{with_lxc}
|
||||||
|
%define _without_lxc --without-lxc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%configure %{?_without_xen} \
|
||||||
|
%{?_without_qemu} \
|
||||||
|
%{?_without_openvz} \
|
||||||
|
%{?_without_lxc} \
|
||||||
|
--with-init-script=redhat \
|
||||||
|
--with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \
|
||||||
|
--with-remote-file=%{_localstatedir}/run/libvirtd.pid
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -fr %{buildroot}
|
rm -fr %{buildroot}
|
||||||
|
@ -176,6 +189,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
|
||||||
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/run/libvirt/
|
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/run/libvirt/
|
||||||
# Default dir for disk images defined in SELinux policy
|
# Default dir for disk images defined in SELinux policy
|
||||||
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/libvirt/images/
|
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/libvirt/images/
|
||||||
|
# Default dir for kernel+initrd images defnied in SELinux policy
|
||||||
|
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/libvirt/boot/
|
||||||
|
|
||||||
# We don't want to install /etc/libvirt/qemu/networks in the main %files list
|
# We don't want to install /etc/libvirt/qemu/networks in the main %files list
|
||||||
# because if the admin wants to delete the default network completely, we don't
|
# because if the admin wants to delete the default network completely, we don't
|
||||||
|
@ -241,14 +256,22 @@ fi
|
||||||
%dir %{_localstatedir}/run/libvirt/
|
%dir %{_localstatedir}/run/libvirt/
|
||||||
%dir %{_localstatedir}/lib/libvirt/
|
%dir %{_localstatedir}/lib/libvirt/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/images/
|
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/images/
|
||||||
|
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/boot/
|
||||||
|
%{_datadir}/augeas/lenses/libvirtd.aug
|
||||||
|
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
|
||||||
|
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
|
||||||
|
%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
|
||||||
%if %{with_polkit}
|
%if %{with_polkit}
|
||||||
%{_datadir}/PolicyKit/policy/libvirtd.policy
|
%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy
|
||||||
%endif
|
%endif
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
||||||
%if %{with_proxy} == "yes"
|
%if %{with_xen_proxy}
|
||||||
%attr(4755, root, root) %{_libexecdir}/libvirt_proxy
|
%attr(4755, root, root) %{_libexecdir}/libvirt_proxy
|
||||||
%endif
|
%endif
|
||||||
%attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
|
%attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
|
||||||
|
%if %{with_lxc}
|
||||||
|
%attr(0755, root, root) %{_libexecdir}/libvirt_lxc
|
||||||
|
%endif
|
||||||
%attr(0755, root, root) %{_sbindir}/libvirtd
|
%attr(0755, root, root) %{_sbindir}/libvirtd
|
||||||
%doc docs/*.rng
|
%doc docs/*.rng
|
||||||
%doc docs/*.xml
|
%doc docs/*.xml
|
||||||
|
@ -281,6 +304,9 @@ fi
|
||||||
%doc docs/examples/python
|
%doc docs/examples/python
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 30 2008 Daniel Veillard <veillard@redhat.com> - 0.4.6-1.f8
|
||||||
|
- update to latest upstream release
|
||||||
|
|
||||||
* Tue Jul 8 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.4-2.fc8
|
* Tue Jul 8 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.4-2.fc8
|
||||||
- Fix booting of CDROM images with KVM (rhbz #452355)
|
- Fix booting of CDROM images with KVM (rhbz #452355)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
Index: python/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
RCS file: /data/cvs/libxen/python/Makefile.am,v
|
||||||
|
retrieving revision 1.13
|
||||||
|
diff -u -p -r1.13 Makefile.am
|
||||||
|
--- python/Makefile.am 5 Feb 2008 19:27:37 -0000 1.13
|
||||||
|
+++ python/Makefile.am 24 Sep 2008 13:21:06 -0000
|
||||||
|
@@ -50,7 +50,7 @@ GENERATED= libvirt-export.c \
|
||||||
|
$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
|
||||||
|
$(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
|
||||||
|
|
||||||
|
-libvirt.py: $(srcdir)/libvir.py libvirtclass.py
|
||||||
|
+libvirt.py: $(srcdir)/libvir.py $(GENERATED)
|
||||||
|
cat $(srcdir)/libvir.py libvirtclass.py > $@-t
|
||||||
|
mv $@-t $@
|
||||||
|
|
||||||
|
*** python/Makefile.in.orig 2008-09-24 15:19:20.000000000 +0200
|
||||||
|
--- python/Makefile.in 2008-09-24 15:20:07.000000000 +0200
|
||||||
|
*************** uninstall-am: uninstall-local uninstall-
|
||||||
|
*** 1027,1033 ****
|
||||||
|
@WITH_PYTHON_TRUE@$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
|
||||||
|
@WITH_PYTHON_TRUE@ $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
|
||||||
|
|
||||||
|
! @WITH_PYTHON_TRUE@libvirt.py: $(srcdir)/libvir.py libvirtclass.py
|
||||||
|
@WITH_PYTHON_TRUE@ cat $(srcdir)/libvir.py libvirtclass.py > $@-t
|
||||||
|
@WITH_PYTHON_TRUE@ mv $@-t $@
|
||||||
|
|
||||||
|
--- 1027,1033 ----
|
||||||
|
@WITH_PYTHON_TRUE@$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
|
||||||
|
@WITH_PYTHON_TRUE@ $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
|
||||||
|
|
||||||
|
! @WITH_PYTHON_TRUE@libvirt.py: $(srcdir)/libvir.py $(GENERATED)
|
||||||
|
@WITH_PYTHON_TRUE@ cat $(srcdir)/libvir.py libvirtclass.py > $@-t
|
||||||
|
@WITH_PYTHON_TRUE@ mv $@-t $@
|
||||||
|
|
Loading…
Reference in New Issue