[libvirt] update to libvirt-0.9.8
Daniel Veillard
veillard at fedoraproject.org
Thu Dec 8 09:04:21 UTC 2011
commit 7069f75cb8dad58715f723fd542e4ff69dbff51b
Author: Daniel Veillard <veillard at redhat.com>
Date: Thu Dec 8 17:03:16 2011 +0800
update to libvirt-0.9.8
cleanup of old patches, of spec too
...ake-PCI-multifunction-support-more-manual.patch | 581 --------------------
libvirt-0.9.6-spec-F15-still-uses-cgconfig.patch | 56 --
libvirt.spec | 146 +++++-
sources | 2 +-
4 files changed, 125 insertions(+), 660 deletions(-)
---
diff --git a/libvirt.spec b/libvirt.spec
index 2eb4fba..4e9f507 100644
--- a/libvirt.spec
+++ b/libvirt.spec
@@ -78,6 +78,7 @@
%define with_dtrace 0%{!?_without_dtrace:0}
%define with_cgconfig 0%{!?_without_cgconfig:0}
%define with_sanlock 0%{!?_without_sanlock:0}
+%define with_systemd 0%{!?_without_systemd:0}
# Non-server/HV driver defaults which are always enabled
%define with_python 0%{!?_without_python:1}
@@ -111,6 +112,11 @@
%define with_hyperv 0
%endif
+# Although earlier Fedora has systemd, libvirt still used sysvinit
+%if 0%{?fedora} >= 17
+%define with_systemd 1
+%endif
+
# RHEL-5 has restricted QEMU to x86_64 only and is too old for LXC
%if 0%{?rhel} == 5
%ifnarch x86_64
@@ -168,8 +174,14 @@
%endif
# Enable sanlock library for lock management with QEMU
-%if 0%{?fedora} >= 16 || 0%{?rhel} >= 6
-%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
+# Sanlock is available only on i686 x86_64 for RHEL
+%if 0%{?fedora} >= 16
+%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
+%endif
+%if 0%{?rhel} >= 6
+%ifnarch i386 i586 i686 x86_64
+%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
+%endif
%endif
# Disable some drivers when building without libvirt daemon.
@@ -234,8 +246,8 @@
Summary: Library providing a simple virtualization API
Name: libvirt
-Version: 0.9.7
-Release: 3%{?dist}%{?extra_release}
+Version: 0.9.8
+Release: 1%{?dist}%{?extra_release}
License: LGPLv2+
Group: Development/Libraries
Source: http://libvirt.org/sources/libvirt-%{version}.tar.gz
@@ -251,7 +263,6 @@ Requires: %{name}-client = %{version}-%{release}
# Used by many of the drivers, so turn it on whenever the
# daemon is present
%if %{with_libvirtd}
-Requires: bridge-utils
# for modprobe of pci devices
Requires: module-init-tools
# for /sbin/ip & /sbin/tc
@@ -327,17 +338,28 @@ Requires: device-mapper
%if %{with_cgconfig}
Requires: libcgroup
%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
+%endif
# All build-time requirements
BuildRequires: python-devel
-
+%if %{with_systemd}
+BuildRequires: systemd-units
+%endif
%if %{with_xen}
BuildRequires: xen-devel
+%endif
# temporary explicit requireent missing from xen-4.1.0
%if %{with_libxl}
BuildRequires: libuuid-devel
%endif
-%endif
BuildRequires: libxml2-devel
BuildRequires: xhtml1-dtds
BuildRequires: libxslt
@@ -384,7 +406,6 @@ BuildRequires: radvd
%if %{with_nwfilter}
BuildRequires: ebtables
%endif
-BuildRequires: bridge-utils
BuildRequires: module-init-tools
%if %{with_sasl}
BuildRequires: cyrus-sasl-devel
@@ -497,6 +518,8 @@ Requires: nc
Requires: gettext
# Needed by virt-pki-validate script.
Requires: gnutls-utils
+# Needed for probing the power management features of the host.
+Requires: pm-utils
%if %{with_sasl}
Requires: cyrus-sasl
# Not technically required, but makes 'out-of-box' config
@@ -702,6 +725,13 @@ of recent versions of Linux (and other OSes).
%define with_packager --with-packager="%{who}, %{when}, %{where}"
%define with_packager_version --with-packager-version="%{release}"
+%if %{with_systemd}
+# We use 'systemd+redhat', so if someone installs upstart or
+# legacy init scripts, they can still start libvirtd, etc
+%define init_scripts --with-init_script=systemd+redhat
+%else
+%define init_scripts --with-init_script=redhat
+%endif
%configure %{?_without_xen} \
%{?_without_qemu} \
@@ -742,7 +772,7 @@ of recent versions of Linux (and other OSes).
%{with_packager_version} \
--with-qemu-user=%{qemu_user} \
--with-qemu-group=%{qemu_group} \
- --with-init-script=redhat \
+ %{init_scripts} \
--with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid
make %{?_smp_mflags}
gzip -9 ChangeLog
@@ -750,7 +780,7 @@ gzip -9 ChangeLog
%install
rm -fr %{buildroot}
-%makeinstall
+%makeinstall SYSTEMD_UNIT_DIR=%{_unitdir}
for i in domain-events/events-c dominfo domsuspend hellolibvirt openauth python xml/nwfilter systemtap
do
(cd examples/$i ; make clean ; rm -rf .deps .libs Makefile Makefile.in)
@@ -827,8 +857,6 @@ do
printf "#!/bin/sh\nexit 0\n" > $i
chmod +x $i
done
-# Fails on F17 rawhide for (currently) unknown reasons
-echo "int main(void) { return 0; }" > shunloadtest.c
make check
%pre
@@ -850,8 +878,7 @@ getent passwd qemu >/dev/null || \
# 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
-/sbin/chkconfig --list libvirtd 1>/dev/null 2>&1
-if test $? != 0 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml
+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>," \
@@ -901,6 +928,13 @@ do
done
%endif
+%if %{with_systemd}
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ /bin/systemctl enable libvirtd.service >/dev/null 2>&1 || :
+ /bin/systemctl enable cgconfig.service >/dev/null 2>&1 || :
+fi
+%else
%if %{with_cgconfig}
# Starting with Fedora 16, systemd automounts all cgroups, and cgconfig is
# no longer a necessary service.
@@ -916,38 +950,89 @@ if [ "$1" -ge "1" ]; then
/sbin/service libvirtd condrestart > /dev/null 2>&1
fi
%endif
+%endif
%preun
%if %{with_libvirtd}
+%if %{with_systemd}
+if [ $1 -eq 0 ] ; then
+ # Package removal, not upgrade
+ /bin/systemctl --no-reload disable libvirtd.service > /dev/null 2>&1 || :
+ /bin/systemctl stop libvirtd.service > /dev/null 2>&1 || :
+fi
+%else
if [ $1 = 0 ]; then
/sbin/service libvirtd stop 1>/dev/null 2>&1
/sbin/chkconfig --del libvirtd
fi
%endif
+%endif
+
+%postun
+%if %{with_libvirtd}
+%if %{with_systemd}
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ # Package upgrade, not uninstall
+ /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
+fi
+%endif
+%endif
+
+%if %{with_libvirtd}
+%if %{with_systemd}
+%triggerun -- libvirt < 0.9.4
+%{_bindir}/systemd-sysv-convert --save libvirtd >/dev/null 2>&1 ||:
+
+# If the package is allowed to autostart:
+/bin/systemctl --no-reload enable libvirtd.service >/dev/null 2>&1 ||:
+
+# Run these because the SysV package being removed won't do them
+/sbin/chkconfig --del libvirtd >/dev/null 2>&1 || :
+/bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
+%endif
+%endif
%preun client
+%if %{with_systemd}
+%else
if [ $1 = 0 ]; then
/sbin/chkconfig --del libvirt-guests
rm -f /var/lib/libvirt/libvirt-guests
fi
+%endif
%post client
/sbin/ldconfig
+%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 --list libvirt-guests 2>/dev/null \
- | /bin/grep -q $level:on ; then
+ 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
+%if %{with_systemd}
+%triggerun client -- libvirt < 0.9.4
+%{_bindir}/systemd-sysv-convert --save libvirt-guests >/dev/null 2>&1 ||:
+
+# 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
+/sbin/chkconfig --del libvirt-guests >/dev/null 2>&1 || :
+/bin/systemctl try-restart libvirt-guests.service >/dev/null 2>&1 || :
+%endif
+
%if %{with_libvirtd}
%files
%defattr(-, root, root)
@@ -965,6 +1050,9 @@ fi
%{_sysconfdir}/libvirt/nwfilter/*.xml
%{_sysconfdir}/rc.d/init.d/libvirtd
+%if %{with_systemd}
+%{_unitdir}/libvirtd.service
+%endif
%doc daemon/libvirtd.upstart
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
@@ -1004,7 +1092,7 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%{_datadir}/libvirt/networks/default.xml
%endif
-%dir %{_localstatedir}/run/libvirt/
+%ghost %dir %{_localstatedir}/run/libvirt/
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/
@@ -1012,24 +1100,24 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/
%if %{with_qemu}
-%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
+%ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
%endif
%if %{with_lxc}
-%dir %{_localstatedir}/run/libvirt/lxc/
+%ghost %dir %{_localstatedir}/run/libvirt/lxc/
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/
%endif
%if %{with_uml}
-%dir %{_localstatedir}/run/libvirt/uml/
+%ghost %dir %{_localstatedir}/run/libvirt/uml/
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/
%endif
%if %{with_libxl}
-%dir %{_localstatedir}/run/libvirt/libxl/
+%ghost %dir %{_localstatedir}/run/libvirt/libxl/
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
%endif
%if %{with_network}
-%dir %{_localstatedir}/run/libvirt/network/
+%ghost %dir %{_localstatedir}/run/libvirt/network/
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
%endif
@@ -1121,6 +1209,9 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%{_datadir}/libvirt/cpu_map.xml
%{_sysconfdir}/rc.d/init.d/libvirt-guests
+%if %{with_systemd}
+%{_unitdir}/libvirt-guests.service
+%endif
%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/
@@ -1166,6 +1257,17 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%endif
%changelog
+* Thu Dec 8 2011 Daniel Veillard <veillard at redhat.com> - 0.9.8-1
+- Add support for QEMU 1.0
+- Add preliminary PPC cpu driver
+- Add new API virDomain{Set, Get}BlockIoTune
+- block_resize: Define the new API
+- Add a public API to invoke suspend/resume on the host
+- various improvements for LXC containers
+- Define keepalive protocol and add virConnectIsAlive API
+- Add support for STP and VLAN filtering
+- many improvements and bug fixes
+
* Mon Nov 14 2011 Justin M. Forbes <jforbes at redhat.com> - 0.9.7-3
- Remove versioned buildreq for yajl as 2.0.x features are not required.
diff --git a/sources b/sources
index 5efd9ef..ee46000 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4308b3f4d23f5b0c5196260a9a22a38b libvirt-0.9.7.tar.gz
+5bb74092e469d773c3d63128a8c57501 libvirt-0.9.8.tar.gz
More information about the scm-commits
mailing list