Bump libvirt to 0.9.12
authorMarco Yuen <marcoy@gmail.com>
Tue, 3 Jul 2012 15:13:30 +0000 (11:13 -0400)
committerMarco Yuen <marcoy@cs.princeton.edu>
Tue, 3 Jul 2012 15:17:42 +0000 (11:17 -0400)
Makefile
libvirt.spec

index b3b6883..c6db35c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,8 @@ WEBFETCH                := wget
 SHA1SUM                 := sha1sum
 
 ALL                     += libvirt
-libvirt-URL            := ftp://libvirt.org/libvirt/libvirt-0.9.9.tar.gz
-libvirt-SHA1SUM        := d716303b4b00c2d8cc0ebd7e1a853e238d9723f8
+libvirt-URL            := ftp://libvirt.org/libvirt/libvirt-0.9.12.tar.gz
+libvirt-SHA1SUM        := 3743dc4f3e58d5912a98f568c3e854d97d81f216
 libvirt                := $(notdir $(libvirt-URL))
 
 all: $(ALL)
@@ -38,12 +38,12 @@ SPECFILE = libvirt.spec
 PWD=$(shell pwd)
 PREPARCH ?= noarch
 RPMDIRDEFS = --define "_sourcedir $(PWD)" --define "_builddir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_rpmdir $(PWD)"
-BUILDOPTS = --without storage-disk --without storage-iscsi --without storage-scsi \
-               --without storage-fs --without storage-lvm \
-               --without polkit --without sasl --without audit --with capng --with udev \
-               --without netcf --without avahi \
-               --without xen --without qemu --without hyperv --without phyp --without esx \
-            --define 'packager PlanetLab'
+BUILDOPTS = --without xen --without qemu --without hyperv --without phyp --without esx \
+                       --without netcf --without avahi --without polkit --without sasl --without audit \
+                       --without storage-iscsi --without storage-scsi --without storage-disk \
+                       --without storage-rbd --without selinux --without dtrace --without sanlock \
+                       --without libxl --with capng --with udev --with interface \
+                       --define 'packager PlanetLab'
 
 trees: sources
        rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bp --target $(PREPARCH) $(SPECFILE)
index 08efbd9..ba462a2 100644 (file)
@@ -22,7 +22,7 @@
 
 # RHEL-5 builds are client-only for s390, ppc
 %if 0%{?rhel} == 5
-%ifnarch i386 i586 i686 x86_64 ia64
+%ifnarch %{ix86} x86_64 ia64
 %define client_only        1
 %endif
 %endif
 %define with_libvirtd      0%{!?_without_libvirtd:%{server_drivers}}
 %define with_avahi         0%{!?_without_avahi:%{server_drivers}}
 
-# Then the hypervisor drivers that run on local host
+# Then the hypervisor drivers that run in libvirtd
 %define with_xen           0%{!?_without_xen:%{server_drivers}}
 %define with_qemu          0%{!?_without_qemu:%{server_drivers}}
-%define with_openvz        0%{!?_without_openvz:%{server_drivers}}
 %define with_lxc           0%{!?_without_lxc:%{server_drivers}}
-%define with_vbox          0%{!?_without_vbox:%{server_drivers}}
 %define with_uml           0%{!?_without_uml:%{server_drivers}}
 %define with_libxl         0%{!?_without_libxl:%{server_drivers}}
-%define with_vmware        0%{!?_without_vmware:%{server_drivers}}
 
-# Then the hypervisor drivers that talk via a native remote protocol
+%define with_qemu_tcg      %{with_qemu}
+# Change if we ever provide qemu-kvm binaries on non-x86 hosts
+%ifarch %{ix86} x86_64
+%define with_qemu_kvm      %{with_qemu}
+%else
+%define with_qemu_kvm      0
+%endif
+
+# Then the hypervisor drivers that run outside libvirtd, in libvirt.so
+%define with_openvz        0%{!?_without_openvz:1}
+%define with_vbox          0%{!?_without_vbox:1}
+%define with_vmware        0%{!?_without_vmware:1}
 %define with_phyp          0%{!?_without_phyp:1}
 %define with_esx           0%{!?_without_esx:1}
 %define with_hyperv        0%{!?_without_hyperv:1}
 %define with_xenapi        0%{!?_without_xenapi:1}
 
-# Then the secondary host drivers
+# Then the secondary host drivers, which run inside libvirtd
 %define with_network       0%{!?_without_network:%{server_drivers}}
 %define with_storage_fs    0%{!?_without_storage_fs:%{server_drivers}}
 %define with_storage_lvm   0%{!?_without_storage_lvm:%{server_drivers}}
@@ -84,6 +92,7 @@
 %define with_cgconfig      0%{!?_without_cgconfig:0}
 %define with_sanlock       0%{!?_without_sanlock:0}
 %define with_systemd       0%{!?_without_systemd:0}
+%define with_numad         0%{!?_without_numad:0}
 
 # Non-server/HV driver defaults which are always enabled
 %define with_python        0%{!?_without_python:1}
 # Finally set the OS / architecture specific special cases
 
 # Xen is available only on i386 x86_64 ia64
-%ifnarch i386 i586 i686 x86_64 ia64
+%ifnarch %{ix86} x86_64 ia64
 %define with_xen 0
 %define with_libxl 0
 %endif
 
 # RHEL-5 has restricted QEMU to x86_64 only and is too old for LXC
 %if 0%{?rhel} == 5
+%define with_qemu_tcg 0
 %ifnarch x86_64
 %define with_qemu 0
+%define with_qemu_kvm 0
 %endif
 %define with_lxc 0
 %endif
 # RHEL-6 has restricted QEMU to x86_64 only, stopped including Xen
 # on all archs. Other archs all have LXC available though
 %if 0%{?rhel} >= 6
+%define with_qemu_tcg 0
 %ifnarch x86_64
 %define with_qemu 0
+%define with_qemu_kvm 0
 %endif
 %define with_xen 0
 %endif
 
-# Fedora doesn't have any QEMU on ppc64 - only ppc
-%if 0%{?fedora}
+# Fedora doesn't have any QEMU on ppc64 until FC16 - only ppc
+%if 0%{?fedora} && 0%{?fedora} < 16
 %ifarch ppc64
 %define with_qemu 0
 %endif
 %define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
 %endif
 %if 0%{?rhel} >= 6
-%ifarch i386 i586 i686 x86_64
+%ifarch %{ix86} x86_64
 %define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
 %endif
 %endif
 %define with_storage_disk 0
 %endif
 
-# Enable libpcap library
-%if %{with_qemu}
+%if %{with_qemu} || %{with_lxc} || %{with_uml}
 %define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}}
+# Enable libpcap library
 %define with_libpcap  0%{!?_without_libpcap:%{server_drivers}}
 %define with_macvtap  0%{!?_without_macvtap:%{server_drivers}}
+
+# numad is used to manage the CPU and memory placement dynamically,
+# it's not available on s390[x] and ARM.
+%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
+%ifnarch s390 s390x %{arm}
+%define with_numad    0%{!?_without_numad:%{server_drivers}}
+%endif
+%endif
 %endif
 
 %if %{with_macvtap}
 
 Summary: Library providing a simple virtualization API
 Name: libvirt
-Version: 0.9.9
+Version: 0.9.12
 Release: 1%{?dist}%{?extra_release}
 License: LGPLv2+
 Group: Development/Libraries
-Source: http://libvirt.org/sources/libvirt-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 URL: http://libvirt.org/
 
-# All runtime requirements for the libvirt package (runtime requrements
-# for subpackages are listed later in those subpackages)
-
-# The client side, i.e. shared libs and virsh are in a subpackage
-Requires: %{name}-client = %{version}-%{release}
+%if %(echo %{version} | grep -o \\. | wc -l) == 3
+%define mainturl stable_updates/
+%endif
+Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz
 
-# Used by many of the drivers, so turn it on whenever the
-# daemon is present
 %if %{with_libvirtd}
-# for modprobe of pci devices
-Requires: module-init-tools
-# for /sbin/ip & /sbin/tc
-Requires: iproute
-%if %{with_avahi}
-Requires: avahi
-%endif
-%endif
+Requires: libvirt-daemon = %{version}-%{release}
 %if %{with_network}
-Requires: dnsmasq >= 2.41
-Requires: radvd
-%endif
-%if %{with_network} || %{with_nwfilter}
-Requires: iptables
-Requires: iptables-ipv6
+Requires: libvirt-daemon-config-network = %{version}-%{release}
 %endif
 %if %{with_nwfilter}
-Requires: ebtables
-%endif
-# needed for device enumeration
-%if %{with_hal}
-Requires: hal
-%endif
-%if %{with_udev}
-Requires: udev >= 145
-%endif
-%if %{with_polkit}
-%if 0%{?fedora} >= 12 || 0%{?rhel} >=6
-Requires: polkit >= 0.93
-%else
-Requires: PolicyKit >= 0.6
-%endif
-%endif
-%if %{with_storage_fs}
-Requires: nfs-utils
-# For mkfs
-Requires: util-linux-ng
-# For pool-build probing for existing pools
-BuildRequires: libblkid-devel >= 2.17
-# For glusterfs
-%if 0%{?fedora} >= 11
-Requires: glusterfs-client >= 2.0.1
-%endif
-%endif
-%if %{with_qemu}
-# From QEMU RPMs
-Requires: /usr/bin/qemu-img
-# For image compression
-Requires: gzip
-Requires: bzip2
-Requires: lzop
-Requires: xz
-%else
-%if %{with_xen}
-# From Xen RPMs
-Requires: /usr/sbin/qcow-create
-%endif
-%endif
-%if %{with_storage_lvm}
-# For LVM drivers
-Requires: lvm2
-%endif
-%if %{with_storage_iscsi}
-# For ISCSI driver
-Requires: iscsi-initiator-utils
-%endif
-%if %{with_storage_disk}
-# For disk driver
-Requires: parted
-Requires: device-mapper
-%endif
-%if %{with_storage_mpath}
-# For multipath support
-Requires: device-mapper
-%endif
-%if %{with_cgconfig}
-Requires: libcgroup
+Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
 %endif
-# For virConnectGetSysinfo
-Requires: dmidecode
-# For service management
-%if %{with_systemd}
-Requires(post): systemd-units
-Requires(post): systemd-sysv
-Requires(preun): systemd-units
-Requires(postun): systemd-units
+# XXX when we turn on driver modules, we need to add
+# deps on each driver (Requires: libvirt-daemon-drv-qemu)
 %endif
+Requires: libvirt-client = %{version}-%{release}
 
-# All build-time requirements
+# All build-time requirements. Run-time requirements are
+# listed against each sub-RPM
 %if 0%{?enable_autotools}
 BuildRequires: autoconf
 BuildRequires: automake
@@ -511,11 +453,229 @@ BuildRequires: nfs-utils
 # Fedora build root suckage
 BuildRequires: gawk
 
+# For storage wiping with different algorithms
+BuildRequires: scrub
+
+%if %{with_numad}
+BuildRequires: numad
+%endif
+
 %description
 Libvirt is a C toolkit to interact with the virtualization capabilities
 of recent versions of Linux (and other OSes). The main package includes
 the libvirtd server exporting the virtualization support.
 
+%package docs
+Summary: API reference and website documentation
+Group: Development/Libraries
+
+%description docs
+Includes the API reference for the libvirt C library, and a complete
+copy of the libvirt.org website documentation.
+
+%if %{with_libvirtd}
+%package daemon
+Summary: Server side daemon and supporting files for libvirt library
+Group: Development/Libraries
+
+# All runtime requirements for the libvirt package (runtime requrements
+# for subpackages are listed later in those subpackages)
+
+# The client side, i.e. shared libs and virsh are in a subpackage
+Requires: %{name}-client = %{version}-%{release}
+
+# for modprobe of pci devices
+Requires: module-init-tools
+# for /sbin/ip & /sbin/tc
+Requires: iproute
+%if %{with_avahi}
+Requires: avahi-libs
+%endif
+%if %{with_network}
+Requires: dnsmasq >= 2.41
+Requires: radvd
+%endif
+%if %{with_network} || %{with_nwfilter}
+Requires: iptables
+Requires: iptables-ipv6
+%endif
+%if %{with_nwfilter}
+Requires: ebtables
+%endif
+# needed for device enumeration
+%if %{with_hal}
+Requires: hal
+%endif
+%if %{with_udev}
+Requires: udev >= 145
+%endif
+%if %{with_polkit}
+%if 0%{?fedora} >= 12 || 0%{?rhel} >=6
+Requires: polkit >= 0.93
+%else
+Requires: PolicyKit >= 0.6
+%endif
+%endif
+%if %{with_storage_fs}
+Requires: nfs-utils
+# For mkfs
+Requires: util-linux-ng
+# For pool-build probing for existing pools
+BuildRequires: libblkid-devel >= 2.17
+# For glusterfs
+%if 0%{?fedora} >= 11
+Requires: glusterfs-client >= 2.0.1
+%endif
+%endif
+%if %{with_qemu}
+# From QEMU RPMs
+Requires: /usr/bin/qemu-img
+# For image compression
+Requires: gzip
+Requires: bzip2
+Requires: lzop
+Requires: xz
+%else
+%if %{with_xen}
+# From Xen RPMs
+Requires: /usr/sbin/qcow-create
+%endif
+%endif
+%if %{with_storage_lvm}
+# For LVM drivers
+Requires: lvm2
+%endif
+%if %{with_storage_iscsi}
+# For ISCSI driver
+Requires: iscsi-initiator-utils
+%endif
+%if %{with_storage_disk}
+# For disk driver
+Requires: parted
+Requires: device-mapper
+%endif
+%if %{with_storage_mpath}
+# For multipath support
+Requires: device-mapper
+%endif
+%if %{with_cgconfig}
+Requires: libcgroup
+%endif
+%ifarch %{ix86} x86_64 ia64
+# For virConnectGetSysinfo
+Requires: dmidecode
+%endif
+# For service management
+%if %{with_systemd}
+Requires(post): systemd-units
+Requires(post): systemd-sysv
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+%endif
+%if %{with_numad}
+Requires: numad
+%endif
+
+%description daemon
+Server side daemon required to manage the virtualization capabilities
+of recent versions of Linux. Requires a hypervisor specific sub-RPM
+for specific drivers.
+
+%if %{with_network}
+%package daemon-config-network
+Summary: Default configuration files for the libvirtd daemon
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+
+%description daemon-config-network
+Default configuration files for setting up NAT based networking
+%endif
+
+%if %{with_nwfilter}
+%package daemon-config-nwfilter
+Summary: Network filter configuration files for the libvirtd daemon
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+
+%description daemon-config-nwfilter
+Network filter configuration files for cleaning guest traffic
+%endif
+
+# XXX when we turn on driver modules, we will need to
+# create daemon-drv-XXX sub-RPMs and add them as deps
+# to all of the following  daemon-XXX RPMs
+
+%if %{with_qemu_tcg}
+%package daemon-qemu
+Summary: Server side daemon & driver required to run QEMU guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+Requires: qemu
+
+%description daemon-qemu
+Server side daemon and driver required to manage the virtualization
+capabilities of the QEMU TCG emulators
+%endif
+
+
+%if %{with_qemu_kvm}
+%package daemon-kvm
+Summary: Server side daemon & driver required to run KVM guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+Requires: qemu-kvm
+
+%description daemon-kvm
+Server side daemon and driver required to manage the virtualization
+capabilities of the KVM hypervisor
+%endif
+
+
+%if %{with_lxc}
+%package daemon-lxc
+Summary: Server side daemon & driver required to run LXC guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+
+%description daemon-lxc
+Server side daemon and driver required to manage the virtualization
+capabilities of LXC
+%endif
+
+
+%if %{with_uml}
+%package daemon-uml
+Summary: Server side daemon & driver required to run UML guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+# There are no UML kernel RPMs in Fedora/RHEL to depend on.
+
+%description daemon-uml
+Server side daemon and driver required to manage the virtualization
+capabilities of UML
+%endif
+
+
+%if %{with_xen} || %{with_libxl}
+%package daemon-xen
+Summary: Server side daemon & driver required to run XEN guests
+Group: Development/Libraries
+
+Requires: libvirt-daemon = %{version}-%{release}
+Requires: xen
+
+%description daemon-xen
+Server side daemon and driver required to manage the virtualization
+capabilities of XEN
+%endif
+%endif
+
 %package client
 Summary: Client side library and utilities of the libvirt library
 Group: Development/Libraries
@@ -545,28 +705,25 @@ virtualization capabilities of recent versions of Linux (and other OSes).
 Summary: Libraries, includes, etc. to compile with the libvirt library
 Group: Development/Libraries
 Requires: %{name}-client = %{version}-%{release}
+Requires: %{name}-docs = %{version}-%{release}
 Requires: pkgconfig
-%if %{with_xen}
-Requires: xen-devel
-%endif
 
 %description devel
-Includes and documentations for the C library providing an API to use
-the virtualization capabilities of recent versions of Linux (and other OSes).
+Include header files & development libraries for the libvirt C library.
 
-#%if %{with_sanlock}
-#%package lock-sanlock
-#Summary: Sanlock lock manager plugin for QEMU driver
-#Group: Development/Libraries
-#Requires: sanlock >= 1.8
-##for virt-sanlock-cleanup require augeas
-#Requires: augeas
-#Requires: %{name} = %{version}-%{release}
-
-#%description lock-sanlock
-#Includes the Sanlock lock manager plugin for the QEMU
-#driver
-#%endif
+%if %{with_sanlock}
+%package lock-sanlock
+Summary: Sanlock lock manager plugin for QEMU driver
+Group: Development/Libraries
+Requires: sanlock >= 1.8
+#for virt-sanlock-cleanup require augeas
+Requires: augeas
+Requires: %{name} = %{version}-%{release}
+
+%description lock-sanlock
+Includes the Sanlock lock manager plugin for the QEMU
+driver
+%endif
 
 %if %{with_python}
 %package python
@@ -685,6 +842,10 @@ of recent versions of Linux (and other OSes).
 %define _without_numactl --without-numactl
 %endif
 
+%if ! %{with_numad}
+%define _without_numad --without-numad
+%endif
+
 %if ! %{with_capng}
 %define _without_capng --without-capng
 %endif
@@ -751,6 +912,7 @@ autoreconf -if
            %{?_without_openvz} \
            %{?_without_lxc} \
            %{?_without_vbox} \
+           %{?_without_libxl} \
            %{?_without_xenapi} \
            %{?_without_sasl} \
            %{?_without_avahi} \
@@ -770,6 +932,7 @@ autoreconf -if
            %{?_without_storage_disk} \
            %{?_without_storage_mpath} \
            %{?_without_numactl} \
+           %{?_without_numad} \
            %{?_without_capng} \
            %{?_without_netcf} \
            %{?_without_selinux} \
@@ -783,12 +946,11 @@ autoreconf -if
            %{?_without_dtrace} \
            %{with_packager} \
            %{with_packager_version} \
-           --with-capng \
-           --with-udev \
            --with-qemu-user=%{qemu_user} \
            --with-qemu-group=%{qemu_group} \
-           %{init_scripts} \
-           --with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid
+           --with-capng \
+           --with-udev \
+           %{init_scripts}
 make %{?_smp_mflags}
 gzip -9 ChangeLog
 
@@ -838,16 +1000,6 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-python-%{version}
 %endif
 
-%if %{client_only}
-rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version}
-%endif
-
-%if ! %{with_libvirtd}
-rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter
-mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version}/html \
-   $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-devel-%{version}/
-%endif
-
 %if ! %{with_qemu}
 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf
 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
@@ -860,6 +1012,9 @@ 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}
+
 %clean
 rm -fr %{buildroot}
 
@@ -874,7 +1029,8 @@ do
 done
 #make check
 
-%pre
+%if %{with_libvirtd}
+%pre daemon
 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
 # Normally 'setup' adds this in /etc/passwd, but this is
 # here for case of upgrades from earlier Fedora/RHEL. This
@@ -886,22 +1042,9 @@ getent passwd qemu >/dev/null || \
     -c "qemu user" qemu
 %endif
 
-%post
+%post daemon
 
-%if %{with_libvirtd}
 %if %{with_network}
-# We want to install the default network for initial RPM installs
-# or on the first upgrade from a non-network aware libvirt only.
-# We check this by looking to see if the daemon is already installed
-if ! /sbin/chkconfig libvirtd && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml
-then
-    UUID=`/usr/bin/uuidgen`
-    sed -e "s,</name>,</name>\n  <uuid>$UUID</uuid>," \
-         < %{_datadir}/libvirt/networks/default.xml \
-         > %{_sysconfdir}/libvirt/qemu/networks/default.xml
-    ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
-fi
-
 # All newly defined networks will have a mac address for the bridge
 # auto-generated, but networks already existing at the time of upgrade
 # will not. We need to go through all the network configs, look for
@@ -965,10 +1108,8 @@ if [ "$1" -ge "1" ]; then
        /sbin/service libvirtd condrestart > /dev/null 2>&1
 fi
 %endif
-%endif
 
-%preun
-%if %{with_libvirtd}
+%preun daemon
 %if %{with_systemd}
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
@@ -981,10 +1122,8 @@ if [ $1 = 0 ]; then
     /sbin/chkconfig --del libvirtd
 fi
 %endif
-%endif
 
-%postun
-%if %{with_libvirtd}
+%postun daemon
 %if %{with_systemd}
 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 if [ $1 -ge 1 ] ; then
@@ -992,6 +1131,17 @@ if [ $1 -ge 1 ] ; then
     /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
 fi
 %endif
+
+%if %{with_network}
+%post daemon-config-network
+if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then
+    UUID=`/usr/bin/uuidgen`
+    sed -e "s,</name>,</name>\n  <uuid>$UUID</uuid>," \
+         < %{_datadir}/libvirt/networks/default.xml \
+         > %{_sysconfdir}/libvirt/qemu/networks/default.xml
+    ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
+fi
+%endif
 %endif
 
 %if %{with_libvirtd}
@@ -1024,14 +1174,6 @@ fi
 %if %{with_systemd}
 %else
 /sbin/chkconfig --add libvirt-guests
-if [ $1 -ge 1 ]; then
-    level=$(/sbin/runlevel | /bin/cut -d ' ' -f 2)
-    if /sbin/chkconfig --levels $level libvirt-guests; then
-        # this doesn't do anything but allowing for libvirt-guests to be
-        # stopped on the first shutdown
-        /sbin/service libvirt-guests start > /dev/null 2>&1 || true
-    fi
-fi
 %endif
 
 %postun client -p /sbin/ldconfig
@@ -1048,10 +1190,27 @@ fi
 /bin/systemctl try-restart libvirt-guests.service >/dev/null 2>&1 || :
 %endif
 
-%if %{with_libvirtd}
 %files
 %defattr(-, root, root)
 
+%files docs
+%defattr(-, root, root)
+# Website
+%dir %{_datadir}/doc/libvirt-docs-%{version}
+%dir %{_datadir}/doc/libvirt-docs-%{version}/html
+%{_datadir}/doc/libvirt-docs-%{version}/html/*
+
+# API docs
+%dir %{_datadir}/gtk-doc/html/libvirt/
+%doc %{_datadir}/gtk-doc/html/libvirt/*.devhelp
+%doc %{_datadir}/gtk-doc/html/libvirt/*.html
+%doc %{_datadir}/gtk-doc/html/libvirt/*.png
+%doc %{_datadir}/gtk-doc/html/libvirt/*.css
+
+%if %{with_libvirtd}
+%files daemon
+%defattr(-, root, root)
+
 %doc AUTHORS ChangeLog.gz NEWS README COPYING.LIB TODO
 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
 
@@ -1062,7 +1221,6 @@ fi
 %endif
 
 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
-%{_sysconfdir}/libvirt/nwfilter/*.xml
 
 %{_sysconfdir}/rc.d/init.d/libvirtd
 %if %{with_systemd}
@@ -1076,10 +1234,6 @@ fi
 %else
 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
 %endif
-%if %{with_dtrace}
-%{_datadir}/systemtap/tapset/libvirt_probes.stp
-%{_datadir}/systemtap/tapset/libvirt_functions.stp
-%endif
 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
@@ -1173,7 +1327,41 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
 
 %{_mandir}/man8/libvirtd.8*
 
-%doc docs/*.xml
+%if %{with_network}
+%files daemon-config-network
+%defattr(-, root, root)
+%endif
+
+%if %{with_nwfilter}
+%files daemon-config-nwfilter
+%defattr(-, root, root)
+%{_sysconfdir}/libvirt/nwfilter/*.xml
+%endif
+
+%if %{with_qemu_tcg}
+%files daemon-qemu
+%defattr(-, root, root)
+%endif
+
+%if %{with_qemu_kvm}
+%files daemon-kvm
+%defattr(-, root, root)
+%endif
+
+%if %{with_lxc}
+%files daemon-lxc
+%defattr(-, root, root)
+%endif
+
+%if %{with_uml}
+%files daemon-uml
+%defattr(-, root, root)
+%endif
+
+%if %{with_xen} || %{with_libxl}
+%files daemon-xen
+%defattr(-, root, root)
+%endif
 %endif
 
 #%if %{with_sanlock}
@@ -1198,11 +1386,18 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
 %{_mandir}/man1/virsh.1*
 %{_mandir}/man1/virt-xml-validate.1*
 %{_mandir}/man1/virt-pki-validate.1*
+%{_mandir}/man1/virt-host-validate.1*
 %{_bindir}/virsh
 %{_bindir}/virt-xml-validate
 %{_bindir}/virt-pki-validate
+%{_bindir}/virt-host-validate
 %{_libdir}/lib*.so.*
 
+%if %{with_dtrace}
+%{_datadir}/systemtap/tapset/libvirt_probes.stp
+%{_datadir}/systemtap/tapset/libvirt_functions.stp
+%endif
+
 %dir %{_datadir}/libvirt/
 %dir %{_datadir}/libvirt/schemas/
 
@@ -1241,11 +1436,10 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
 %dir %{_includedir}/libvirt
 %{_includedir}/libvirt/*.h
 %{_libdir}/pkgconfig/libvirt.pc
-%dir %{_datadir}/gtk-doc/html/libvirt/
-%doc %{_datadir}/gtk-doc/html/libvirt/*.devhelp
-%doc %{_datadir}/gtk-doc/html/libvirt/*.html
-%doc %{_datadir}/gtk-doc/html/libvirt/*.png
-%doc %{_datadir}/gtk-doc/html/libvirt/*.css
+
+%dir %{_datadir}/libvirt/api/
+%{_datadir}/libvirt/api/libvirt-api.xml
+%{_datadir}/libvirt/api/libvirt-qemu-api.xml
 
 %doc docs/*.html docs/html docs/*.gif
 %doc docs/libvirt-api.xml
@@ -1272,6 +1466,36 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
 %endif
 
 %changelog
+* Mon May 14 2012 Daniel Veillard <veillard@redhat.com> - 0.9.12-1
+- qemu: allow snapshotting of sheepdog and rbd disks
+- blockjob: add new APIs
+- a lot of bug fixes, improvements and portability work
+
+* Tue Apr  3 2012 Daniel Veillard <veillard@redhat.com> - 0.9.11-1
+- Add support for the suspend event
+- Add support for event tray moved of removable disks
+- qemu: Support numad
+- cpustats: API, improvements and qemu support
+- qemu: support type='hostdev' network devices at domain start
+- Introduce virDomainPMWakeup API
+- network: support Open vSwitch
+- a number of snapshot improvements
+- many improvements and bug fixes
+
+* Mon Feb 13 2012 Daniel Veillard <veillard@redhat.com> - 0.9.10-1
+- Add support for sVirt in the LXC driver
+- block rebase: add new API virDomainBlockRebase
+- API: Add api to set and get domain metadata
+- virDomainGetDiskErrors public API
+- conf: add rawio attribute to disk element of domain XML
+- Add new public API virDomainGetCPUStats()
+- Introduce virDomainPMSuspendForDuration API
+- resize: add virStorageVolResize() API
+- Add a virt-host-validate command to sanity check HV config
+- Add new virDomainShutdownFlags API
+- QEMU guest agent support
+- many improvements and bug fixes
+
 * Sat Jan  7 2012 Daniel Veillard <veillard@redhat.com> - 0.9.9-1
 - Add API virDomain{S,G}etInterfaceParameters
 - Add API virDomain{G, S}etNumaParameters