From d1091c67209cadb4630796f23b50793e4b7def6306ba1ecdfb02f8a9a4bb63bf Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Tue, 29 Dec 2009 17:35:03 +0000 Subject: [PATCH 1/8] Update to libvirt version 0.7.5 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=27 --- detach-disk.patch | 20 +-- libvirt-0.7.4.tar.bz2 | 3 - libvirt-0.7.5.tar.bz2 | 3 + libvirt.changes | 16 +++ libvirt.spec | 279 +++++++++++++++++++++++++++++-------- libvirtd-defaults.patch | 16 +-- migrate-params.patch | 8 +- snapshots.patch | 246 ++++++++++++++++---------------- suse-network.patch | 26 ++-- xen-list-defined.patch | 36 ----- xen-pv-cdrom.patch | 8 +- xen-shr-pages.patch | 248 +++++++++++++++++++++++++++++++++ xend-description-tag.patch | 36 ----- 13 files changed, 650 insertions(+), 295 deletions(-) delete mode 100644 libvirt-0.7.4.tar.bz2 create mode 100644 libvirt-0.7.5.tar.bz2 delete mode 100644 xen-list-defined.patch create mode 100644 xen-shr-pages.patch delete mode 100644 xend-description-tag.patch diff --git a/detach-disk.patch b/detach-disk.patch index c70c688..5ae9775 100644 --- a/detach-disk.patch +++ b/detach-disk.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/src/xen/xend_internal.c +Index: libvirt-0.7.5/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -4109,13 +4109,12 @@ xenDaemonAttachDevice(virDomainPtr domai +--- libvirt-0.7.5.orig/src/xen/xend_internal.c ++++ libvirt-0.7.5/src/xen/xend_internal.c +@@ -4123,13 +4123,12 @@ xenDaemonAttachDevice(virDomainPtr domai priv = (xenUnifiedPrivatePtr) domain->conn->privateData; @@ -21,7 +21,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c if (!(def = xenDaemonDomainFetch(domain->conn, domain->id, domain->name, -@@ -4213,12 +4212,11 @@ xenDaemonDetachDevice(virDomainPtr domai +@@ -4229,12 +4228,11 @@ xenDaemonDetachDevice(virDomainPtr domai priv = (xenUnifiedPrivatePtr) domain->conn->privateData; @@ -38,11 +38,11 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c if (!(def = xenDaemonDomainFetch(domain->conn, domain->id, -Index: libvirt-0.7.4/src/libvirt.c +Index: libvirt-0.7.5/src/libvirt.c =================================================================== ---- libvirt-0.7.4.orig/src/libvirt.c -+++ libvirt-0.7.4/src/libvirt.c -@@ -4919,7 +4919,8 @@ error: +--- libvirt-0.7.5.orig/src/libvirt.c ++++ libvirt-0.7.5/src/libvirt.c +@@ -5066,7 +5066,8 @@ error: * @domain: pointer to domain object * @xml: pointer to XML description of one device * @@ -52,7 +52,7 @@ Index: libvirt-0.7.4/src/libvirt.c * * Returns 0 in case of success, -1 in case of failure. */ -@@ -4962,7 +4963,8 @@ error: +@@ -5109,7 +5110,8 @@ error: * @domain: pointer to domain object * @xml: pointer to XML description of one device * diff --git a/libvirt-0.7.4.tar.bz2 b/libvirt-0.7.4.tar.bz2 deleted file mode 100644 index c5fa49f..0000000 --- a/libvirt-0.7.4.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6316a53b4cfaf184e795c7be69a371c5dc90a8a6dd6cd05c4208a1314aac10d4 -size 5692288 diff --git a/libvirt-0.7.5.tar.bz2 b/libvirt-0.7.5.tar.bz2 new file mode 100644 index 0000000..fbb1fb3 --- /dev/null +++ b/libvirt-0.7.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0763b11fc054a82d47cce8566173e589e08f34cd7adab46c9c3de80b6eacc4c7 +size 5997827 diff --git a/libvirt.changes b/libvirt.changes index 3eb631f..e0f728b 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Tue Dec 29 10:26:55 MST 2009 - jfehlig@novell.com + +- Updated to version 0.7.5 + - Add new API virDomainMemoryStats to header and drivers + - Public API and domain extension for CPU flags + - expose SR IOV physical/virtual function relationships + - Support for JSON mode monitor [deactivated] + - Support for interface model='netfront' + - vbox: Add support for version 3.1 + - Support QEMU's virtual FAT block device driver + - lots of improvements and bug fixes +- Fix libvirt xen hypervisor driver to work with domctl interface + version 6 + xen-shr-pages.patch + ------------------------------------------------------------------- Mon Dec 7 14:51:36 MST 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index bf9c90e..39df825 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,5 +1,5 @@ # -# spec file for package libvirt (Version 0.7.4) +# spec file for package libvirt (Version 0.7.5) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -17,25 +17,73 @@ # norootforbuild +# hypervisor drivers that run on local host %define with_xen 1 -%define with_lxc 0 -%define with_selinux 0 +%define with_qemu 1 +%define with_lxc 1 +%define with_openvz 1 +%define with_vbox 1 +%define with_uml 0 +# hypervisor drivers that use a native remote protocol %define with_phyp 0 +%define with_esx 0 +# host drivers +%define with_network 1 +%define with_storage_fs 1 +%define with_storage_lvm 1 +%define with_storage_iscsi 1 +%define with_storage_disk 1 +%define with_storage_mpath 1 +%define with_numactl 1 +%define with_selinux 1 +%define with_apparmor 0 +# options +%define with_capng 0 +%define with_netcf 0 +%define with_udev 0 +%define with_hal 0 +%define with_yajl 0 + # Xen is available only on i386 x86_64 %ifnarch %ix86 x86_64 %define with_xen 0 %endif -%if 0%{?suse_version} > 1100 -%define with_lxc 1 -%define with_selinux 1 +# LXC and selinux are not available on anything < openSUSE 11.1 +%if 0%{?suse_version} < 1110 +%define with_lxc 0 +%define with_selinux 0 %endif -# Build phyp backend for IBM Power systems +# Enable phyp driver for IBM Power systems %ifarch ppc64 %define with_phyp 1 %endif +# numactl only on x86_64 and ia64 +%ifnarch x86_64 ia64 +%define with_numactl 0 +%endif +# SLES doesn't contain OpenVZ, VBox, UML, OpenNebula, or ESX +%if 0%{?sles_version} +%define with_openvz 0 +%define with_vbox 0 +%define with_uml 0 +%define with_one 0 +%define with_esx 0 +%endif +%if 0%{?suse_version} > 1110 +%define with_udev 1 +%else +%define with_hal 1 +%endif Name: libvirt -BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel hal-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel python-xml readline-devel util-linux xhtml-dtd +BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel python-xml readline-devel util-linux xhtml-dtd +%if %{with_hal} +BuildRequires: hal-devel +%endif +%if %{with_udev} +BuildRequires: libudev-devel >= 145 +BuildRequires: libpciaccess-devel >= 0.10.9 +%endif %if %{with_xen} BuildRequires: xen-devel %endif @@ -47,7 +95,7 @@ BuildRequires: avahi-devel %if %{with_selinux} BuildRequires: libselinux-devel %endif -%ifarch x86_64 ia64 +%if %{with_numactl} BuildRequires: libnuma-devel %endif %if 0%{?suse_version} > 1110 @@ -64,22 +112,19 @@ Url: http://libvirt.org/ License: LGPLv2.1+ Group: Development/Libraries/C and C++ AutoReqProv: yes -Version: 0.7.4 -Release: 1 +Version: 0.7.5 +Release: 3 Summary: A C toolkit to interract with the virtualization capabilities of Linux -Requires: readline -Requires: ncurses +# The client side, i.e. shared libs and virsh are in a subpackage +Requires: libvirt-client = %{version}-%{release} Requires: bridge-utils Requires: iptables -Requires: cyrus-sasl Requires: lvm2 Requires: parted #Requires: /usr/bin/qemu-img -Recommends: cyrus-sasl-digestmd5 Recommends: logrotate Requires: dnsmasq Requires: PolicyKit >= 0.6 -Requires: socat Requires: open-iscsi Requires: nfs-client Requires: hal @@ -91,9 +136,8 @@ Requires: PolicyKit >= 0.6 Source0: %{name}-%{version}.tar.bz2 Source1: libvirtd.init # Upstream patches -Patch0: xen-list-defined.patch -Patch1: detach-disk.patch -Patch2: xend-description-tag.patch +Patch0: detach-disk.patch +Patch1: xen-shr-pages.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -116,6 +160,29 @@ integrate other virtualization mechanisms if needed. +Authors: +-------- + Daniel Veillard + Karel Zak + +%package client +License: LGPLv2.1+ +Summary: Client side library and utilities of the libvirt library +Group: Development/Libraries/C and C++ +Requires: readline +Requires: ncurses +# So remote clients can access libvirt over SSH tunnel +# (client invokes 'socat' against the UNIX socket on the server) +Requires: socat +Requires: cyrus-sasl +Recommends: cyrus-sasl-digestmd5 + +%description client +Shared libraries and client binaries needed to access to the +virtualization capabilities of recent versions of Linux (and other OSes). + + + Authors: -------- Daniel Veillard @@ -196,7 +263,6 @@ Authors: %setup -q %patch0 -p1 %patch1 -p1 -%patch2 -p1 %patch100 -p1 %patch101 %patch102 -p1 @@ -209,22 +275,75 @@ Authors: %if ! %{with_xen} %define _without_xen --without-xen %endif +%if ! %{with_qemu} +%define _without_qemu --without-qemu +%endif %if ! %{with_lxc} %define _without_lxc --without-lxc %endif -%if %{with_selinux} -%define _with_selinux --with-selinux +%if ! %{with_openvz} +%define _without_openvz --without-openvz +%endif +%if ! %{with_vbox} +%define _without_vbox --without-vbox +%endif +%if ! %{with_uml} +%define _without_uml --without-uml +%endif +%if ! %{with_phyp} +%define _without_phyp --without-phyp +%endif +%if ! %{with_esx} +%define _without_esx --without-esx +%endif +%if ! %{with_numactl} +%define _without_numactl --without-numactl +%endif +%if ! %{with_selinux} +%define _without_selinux --without-selinux +%endif +%if ! %{with_apparmor} +%define _without_apparmor --without-apparmor +%endif +%if ! %{with_capng} +%define _without_capng --without-capng +%endif +%if ! %{with_netcf} +%define _without_netcf --without-netcf +%endif +%if ! %{with_hal} +%define _without_hal --without-hal +%endif +%if ! %{with_udev} +%define _without_udev --without-udev +%endif +%if ! %{with_yajl} +%define _without_yajl --without-yajl %endif autoreconf -f -i export CFLAGS="$RPM_OPT_FLAGS" %configure --disable-static --with-pic \ %{?_without_xen} \ + %{?_without_qemu} \ %{?_without_lxc} \ + %{?_without_openvz} \ + %{?_without_vbox} \ + %{?_without_uml} \ + %{?_without_phyp} \ + %{?_without_esx} \ + %{?_without_numactl} \ %{?_with_selinux} \ + %{?_without_capng} \ + %{?_without_netcf} \ + %{?_without_selinux} \ + %{?_without_apparmor} \ + %{?_without_hal} \ + %{?_without_udev} \ + %{?_without_yajl} \ + --without-xen-proxy \ --libexecdir=%{_libdir}/%{name} \ --with-init-script=none \ --with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \ - --with-xen-proxy=no \ ac_cv_path_DNSMASQ=/usr/sbin/dnsmasq \ ac_cv_path_QEMU_IMG=/usr/bin/qemu-img-xen \ ac_cv_path_ISCSIADM=/sbin/iscsiadm \ @@ -244,6 +363,14 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/libvirt mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/libvirt rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a +%if ! %{with_lxc} +rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug +%endif +%if ! %{with_qemu} +rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug +%endif ln_dupes() { target="" @@ -279,49 +406,86 @@ rm -rf $RPM_BUILD_ROOT %restart_on_update libvirtd %insserv_cleanup -%files -f %{name}.lang +%post client -p /sbin/ldconfig + +%postun client -p /sbin/ldconfig + +%files %defattr(-, root, root) -%{_bindir}/virsh -%{_bindir}/virt-xml-validate -%{_bindir}/virt-pki-validate %{_sbindir}/libvirtd +%dir %{_libdir}/%{name} +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart +%config /etc/init.d/libvirtd +%{_sbindir}/rclibvirtd +%config %{_sysconfdir}/libvirt/libvirtd.conf +%config %{_sysconfdir}/logrotate.d/libvirtd +%config %{_sysconfdir}/libvirt/qemu/networks/default.xml +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/ +%dir %{_localstatedir}/run/libvirt/ +%dir %{_localstatedir}/lib/libvirt/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/images/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/boot/ +%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/ +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/ +%if 0%{?suse_version} > 1110 +%{_datadir}/polkit-1/actions/org.libvirt.unix.policy +%else +%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy +%endif +%{_datadir}/augeas +%if %{with_qemu} +%config %{_sysconfdir}/libvirt/qemu.conf +%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/qemu/ +%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/qemu/ +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/ +%endif +%if %{with_lxc} +%config %{_sysconfdir}/libvirt/lxc.conf +%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/lxc/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/ +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/ +%attr(0755, root, root) %{_libdir}/%{name}/libvirt_lxc +%endif +%if %{with_uml} +%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/uml/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/ +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/ +%endif +%if 0%{with_storage_disk} +%{_libdir}/%{name}/libvirt_parthelper +%endif + +%files client -f %{name}.lang +%defattr(-, root, root) %doc %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/[CNRT]* %doc %{_docdir}/%{name}/AUTHORS %doc %{_mandir}/man1/virsh.1* %doc %{_mandir}/man1/virt-xml-validate.1* %doc %{_mandir}/man1/virt-pki-validate.1* -%{_libdir}/*.so.* -%dir %{_libdir}/%{name} -%if 0%{?suse_version} > 1030 -%{_libdir}/%{name}/libvirt_parthelper -%endif -%if %{with_lxc} -%attr(0755, root, root) %{_libdir}/%{name}/libvirt_lxc -%endif -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart -%if %{with_lxc} -%config %{_sysconfdir}/libvirt/lxc.conf -%endif -%config %{_sysconfdir}/libvirt/qemu/networks/default.xml -%config %{_sysconfdir}/logrotate.d/libvirtd -%dir /%{_localstatedir}/run/libvirt/ -%dir /%{_localstatedir}/lib/libvirt/ -%config /etc/init.d/libvirtd -%{_sbindir}/rclibvirtd -%config %{_sysconfdir}/libvirt/libvirtd.conf -%config %{_sysconfdir}/libvirt/qemu.conf +%{_bindir}/virsh +%{_bindir}/virt-xml-validate +%{_bindir}/virt-pki-validate +%{_libdir}/lib*.so.* + +%dir %{_datadir}/libvirt/ +%dir %{_datadir}/libvirt/schemas/ + +%{_datadir}/libvirt/schemas/domain.rng +%{_datadir}/libvirt/schemas/network.rng +%{_datadir}/libvirt/schemas/storagepool.rng +%{_datadir}/libvirt/schemas/storagevol.rng +%{_datadir}/libvirt/schemas/nodedev.rng +%{_datadir}/libvirt/schemas/capability.rng +%{_datadir}/libvirt/schemas/interface.rng +%{_datadir}/libvirt/schemas/secret.rng +%{_datadir}/libvirt/schemas/storageencryption.rng +%{_datadir}/libvirt/cpu_map.xml %config %{_sysconfdir}/sasl2/libvirt.conf -%if 0%{?suse_version} > 1110 -%{_datadir}/polkit-1/actions/org.libvirt.unix.policy -%else -%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy -%endif -%{_datadir}/libvirt -%{_datadir}/augeas %files devel %defattr(-, root, root) @@ -341,6 +505,5 @@ rm -rf $RPM_BUILD_ROOT %doc %{_docdir}/%{name}-python %{py_sitedir}/libvirt.py* %{py_sitedir}/libvirtmod* -#%attr(0755, root, root) %{_libdir}/%{name}/virt-aa-helper %changelog diff --git a/libvirtd-defaults.patch b/libvirtd-defaults.patch index ac89e2a..e030d0b 100644 --- a/libvirtd-defaults.patch +++ b/libvirtd-defaults.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.2/daemon/libvirtd.conf +Index: libvirt-0.7.5/daemon/libvirtd.conf =================================================================== ---- libvirt-0.7.2.orig/daemon/libvirtd.conf -+++ libvirt-0.7.2/daemon/libvirtd.conf +--- libvirt-0.7.5.orig/daemon/libvirtd.conf ++++ libvirt-0.7.5/daemon/libvirtd.conf @@ -18,8 +18,8 @@ # It is necessary to setup a CA and issue server certificates before # using this capability. @@ -28,11 +28,11 @@ Index: libvirt-0.7.2/daemon/libvirtd.conf # Override the default mDNS advertizement name. This must be # unique on the immediate broadcast network. -Index: libvirt-0.7.2/daemon/libvirtd.c +Index: libvirt-0.7.5/daemon/libvirtd.c =================================================================== ---- libvirt-0.7.2.orig/daemon/libvirtd.c -+++ libvirt-0.7.2/daemon/libvirtd.c -@@ -135,7 +135,7 @@ static int sigwrite = -1; /* Signa +--- libvirt-0.7.5.orig/daemon/libvirtd.c ++++ libvirt-0.7.5/daemon/libvirtd.c +@@ -137,7 +137,7 @@ static int sigwrite = -1; /* Signa static int ipsock = 0; /* -l Listen for TCP/IP */ /* Defaults for configuration file elements */ @@ -41,7 +41,7 @@ Index: libvirt-0.7.2/daemon/libvirtd.c static int listen_tcp = 0; static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR; static char *tls_port = (char *) LIBVIRTD_TLS_PORT; -@@ -157,7 +157,7 @@ static int auth_tcp = REMOTE_AUTH_NONE; +@@ -159,7 +159,7 @@ static int auth_tcp = REMOTE_AUTH_NONE; #endif static int auth_tls = REMOTE_AUTH_NONE; diff --git a/migrate-params.patch b/migrate-params.patch index 2720c04..70585c9 100644 --- a/migrate-params.patch +++ b/migrate-params.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/src/xen/xend_internal.c +Index: libvirt-0.7.5/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -4517,6 +4517,8 @@ xenDaemonDomainMigratePerform (virDomain +--- libvirt-0.7.5.orig/src/xen/xend_internal.c ++++ libvirt-0.7.5/src/xen/xend_internal.c +@@ -4559,6 +4559,8 @@ xenDaemonDomainMigratePerform (virDomain "node", "-1", "ssl", "0", "resource", "0", /* required, xend ignores it */ diff --git a/snapshots.patch b/snapshots.patch index 72fd6de..b6ba9da 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/include/libvirt/libvirt.h.in +Index: libvirt-0.7.5/include/libvirt/libvirt.h.in =================================================================== ---- libvirt-0.7.4.orig/include/libvirt/libvirt.h.in -+++ libvirt-0.7.4/include/libvirt/libvirt.h.in -@@ -565,6 +565,21 @@ int virDomainRestore +--- libvirt-0.7.5.orig/include/libvirt/libvirt.h.in ++++ libvirt-0.7.5/include/libvirt/libvirt.h.in +@@ -621,6 +621,21 @@ int virDomainRestore const char *from); /* @@ -24,11 +24,11 @@ Index: libvirt-0.7.4/include/libvirt/libvirt.h.in * Domain core dump */ int virDomainCoreDump (virDomainPtr domain, -Index: libvirt-0.7.4/src/libvirt.c +Index: libvirt-0.7.5/src/libvirt.c =================================================================== ---- libvirt-0.7.4.orig/src/libvirt.c -+++ libvirt-0.7.4/src/libvirt.c -@@ -2281,6 +2281,166 @@ error: +--- libvirt-0.7.5.orig/src/libvirt.c ++++ libvirt-0.7.5/src/libvirt.c +@@ -2339,6 +2339,166 @@ error: } /** @@ -195,10 +195,10 @@ Index: libvirt-0.7.4/src/libvirt.c * virDomainCoreDump: * @domain: a domain object * @to: path for the core file -Index: libvirt-0.7.4/src/driver.h +Index: libvirt-0.7.5/src/driver.h =================================================================== ---- libvirt-0.7.4.orig/src/driver.h -+++ libvirt-0.7.4/src/driver.h +--- libvirt-0.7.5.orig/src/driver.h ++++ libvirt-0.7.5/src/driver.h @@ -136,6 +136,21 @@ typedef int (*virDrvDomainRestore) (virConnectPtr conn, const char *from); @@ -221,10 +221,10 @@ Index: libvirt-0.7.4/src/driver.h (*virDrvDomainCoreDump) (virDomainPtr domain, const char *to, int flags); -@@ -435,6 +450,11 @@ struct _virDriver { - virDrvConnectIsSecure isSecure; +@@ -448,6 +463,11 @@ struct _virDriver { virDrvDomainIsActive domainIsActive; virDrvDomainIsPersistent domainIsPersistent; + virDrvCPUCompare cpuCompare; + virDrvDomainSnapshotCreate domainSnapshotCreate; + virDrvDomainSnapshotApply domainSnapshotApply; + virDrvDomainSnapshotDelete domainSnapshotDelete; @@ -233,10 +233,10 @@ Index: libvirt-0.7.4/src/driver.h }; typedef int -Index: libvirt-0.7.4/src/xen/xen_driver.c +Index: libvirt-0.7.5/src/xen/xen_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_driver.c -+++ libvirt-0.7.4/src/xen/xen_driver.c +--- libvirt-0.7.5.orig/src/xen/xen_driver.c ++++ libvirt-0.7.5/src/xen/xen_driver.c @@ -1052,6 +1052,81 @@ xenUnifiedDomainRestore (virConnectPtr c } @@ -319,22 +319,22 @@ Index: libvirt-0.7.4/src/xen/xen_driver.c xenUnifiedDomainCoreDump (virDomainPtr dom, const char *to, int flags) { GET_PRIVATE(dom->conn); -@@ -1860,6 +1935,11 @@ static virDriver xenUnifiedDriver = { - xenUnifiedIsSecure, +@@ -1862,6 +1937,11 @@ static virDriver xenUnifiedDriver = { xenUnifiedDomainIsActive, xenUnifiedDomainisPersistent, -+ xenUnifiedDomainSnapshotCreate, -+ xenUnifiedDomainSnapshotApply, -+ xenUnifiedDomainSnapshotDelete, -+ xenUnifiedDomainNumOfSnapshots, -+ xenUnifiedDomainListSnapshots, + NULL, /* cpuCompare */ ++ xenUnifiedDomainSnapshotCreate, /* domainSnapshotCreate */ ++ xenUnifiedDomainSnapshotApply, /* domainSnapshotApply */ ++ xenUnifiedDomainSnapshotDelete, /* domainSnapshotDelete */ ++ xenUnifiedDomainNumOfSnapshots, /* domainNumOfSnapshots */ ++ xenUnifiedDomainListSnapshots, /* domainListSnapshots */ }; /** -Index: libvirt-0.7.4/src/xen/xen_driver.h +Index: libvirt-0.7.5/src/xen/xen_driver.h =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_driver.h -+++ libvirt-0.7.4/src/xen/xen_driver.h +--- libvirt-0.7.5.orig/src/xen/xen_driver.h ++++ libvirt-0.7.5/src/xen/xen_driver.h @@ -100,6 +100,11 @@ struct xenUnifiedDriver { virDrvDomainGetSchedulerType domainGetSchedulerType; virDrvDomainGetSchedulerParameters domainGetSchedulerParameters; @@ -347,10 +347,10 @@ Index: libvirt-0.7.4/src/xen/xen_driver.h }; typedef struct xenXMConfCache *xenXMConfCachePtr; -Index: libvirt-0.7.4/src/xen/xend_internal.c +Index: libvirt-0.7.5/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c +--- libvirt-0.7.5.orig/src/xen/xend_internal.c ++++ libvirt-0.7.5/src/xen/xend_internal.c @@ -53,6 +53,12 @@ #ifndef PROXY @@ -364,7 +364,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c /* * The number of Xen scheduler parameters */ -@@ -3271,6 +3277,87 @@ xenDaemonDomainRestore(virConnectPtr con +@@ -3282,6 +3288,87 @@ xenDaemonDomainRestore(virConnectPtr con } return xend_op(conn, "", "op", "restore", "file", filename, NULL); } @@ -452,7 +452,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c #endif /* !PROXY */ /** -@@ -5123,6 +5210,11 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -5165,6 +5252,11 @@ struct xenUnifiedDriver xenDaemonDriver xenDaemonGetSchedulerType, /* domainGetSchedulerType */ xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */ xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -464,10 +464,10 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c }; /************************************************************************ -Index: libvirt-0.7.4/src/xen/proxy_internal.c +Index: libvirt-0.7.5/src/xen/proxy_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/proxy_internal.c -+++ libvirt-0.7.4/src/xen/proxy_internal.c +--- libvirt-0.7.5.orig/src/xen/proxy_internal.c ++++ libvirt-0.7.5/src/xen/proxy_internal.c @@ -83,6 +83,11 @@ struct xenUnifiedDriver xenProxyDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -480,11 +480,11 @@ Index: libvirt-0.7.4/src/xen/proxy_internal.c }; -Index: libvirt-0.7.4/src/xen/xen_hypervisor.c +Index: libvirt-0.7.5/src/xen/xen_hypervisor.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_hypervisor.c -+++ libvirt-0.7.4/src/xen/xen_hypervisor.c -@@ -750,6 +750,11 @@ struct xenUnifiedDriver xenHypervisorDri +--- libvirt-0.7.5.orig/src/xen/xen_hypervisor.c ++++ libvirt-0.7.5/src/xen/xen_hypervisor.c +@@ -800,6 +800,11 @@ struct xenUnifiedDriver xenHypervisorDri xenHypervisorGetSchedulerType, /* domainGetSchedulerType */ xenHypervisorGetSchedulerParameters, /* domainGetSchedulerParameters */ xenHypervisorSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -496,10 +496,10 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c }; #endif /* !PROXY */ -Index: libvirt-0.7.4/src/xen/xm_internal.c +Index: libvirt-0.7.5/src/xen/xm_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xm_internal.c -+++ libvirt-0.7.4/src/xen/xm_internal.c +--- libvirt-0.7.5.orig/src/xen/xm_internal.c ++++ libvirt-0.7.5/src/xen/xm_internal.c @@ -116,6 +116,11 @@ struct xenUnifiedDriver xenXMDriver = { NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -512,10 +512,10 @@ Index: libvirt-0.7.4/src/xen/xm_internal.c }; #define xenXMError(conn, code, fmt...) \ -Index: libvirt-0.7.4/src/xen/xs_internal.c +Index: libvirt-0.7.5/src/xen/xs_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xs_internal.c -+++ libvirt-0.7.4/src/xen/xs_internal.c +--- libvirt-0.7.5.orig/src/xen/xs_internal.c ++++ libvirt-0.7.5/src/xen/xs_internal.c @@ -83,6 +83,11 @@ struct xenUnifiedDriver xenStoreDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -528,11 +528,11 @@ Index: libvirt-0.7.4/src/xen/xs_internal.c }; #endif /* ! PROXY */ -Index: libvirt-0.7.4/tools/virsh.c +Index: libvirt-0.7.5/tools/virsh.c =================================================================== ---- libvirt-0.7.4.orig/tools/virsh.c -+++ libvirt-0.7.4/tools/virsh.c -@@ -1179,6 +1179,188 @@ cmdSave(vshControl *ctl, const vshCmd *c +--- libvirt-0.7.5.orig/tools/virsh.c ++++ libvirt-0.7.5/tools/virsh.c +@@ -1233,6 +1233,188 @@ cmdSave(vshControl *ctl, const vshCmd *c } /* @@ -721,7 +721,7 @@ Index: libvirt-0.7.4/tools/virsh.c * "schedinfo" command */ static const vshCmdInfo info_schedinfo[] = { -@@ -7298,6 +7480,12 @@ static const vshCmdDef commands[] = { +@@ -7431,6 +7613,12 @@ static const vshCmdDef commands[] = { {"undefine", cmdUndefine, opts_undefine, info_undefine}, {"uri", cmdURI, NULL, info_uri}, @@ -734,14 +734,14 @@ Index: libvirt-0.7.4/tools/virsh.c {"vol-create", cmdVolCreate, opts_vol_create, info_vol_create}, {"vol-create-from", cmdVolCreateFrom, opts_vol_create_from, info_vol_create_from}, {"vol-create-as", cmdVolCreateAs, opts_vol_create_as, info_vol_create_as}, -Index: libvirt-0.7.4/src/lxc/lxc_driver.c +Index: libvirt-0.7.5/src/lxc/lxc_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/lxc/lxc_driver.c -+++ libvirt-0.7.4/src/lxc/lxc_driver.c -@@ -2404,6 +2404,11 @@ static virDriver lxcDriver = { - lxcIsSecure, +--- libvirt-0.7.5.orig/src/lxc/lxc_driver.c ++++ libvirt-0.7.5/src/lxc/lxc_driver.c +@@ -2456,6 +2456,11 @@ static virDriver lxcDriver = { lxcDomainIsActive, lxcDomainIsPersistent, + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -750,14 +750,14 @@ Index: libvirt-0.7.4/src/lxc/lxc_driver.c }; static virStateDriver lxcStateDriver = { -Index: libvirt-0.7.4/src/openvz/openvz_driver.c +Index: libvirt-0.7.5/src/openvz/openvz_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/openvz/openvz_driver.c -+++ libvirt-0.7.4/src/openvz/openvz_driver.c -@@ -1534,6 +1534,11 @@ static virDriver openvzDriver = { - openvzIsSecure, +--- libvirt-0.7.5.orig/src/openvz/openvz_driver.c ++++ libvirt-0.7.5/src/openvz/openvz_driver.c +@@ -1535,6 +1535,11 @@ static virDriver openvzDriver = { openvzDomainIsActive, openvzDomainIsPersistent, + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -766,14 +766,14 @@ Index: libvirt-0.7.4/src/openvz/openvz_driver.c }; int openvzRegister(void) { -Index: libvirt-0.7.4/src/qemu/qemu_driver.c +Index: libvirt-0.7.5/src/qemu/qemu_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/qemu/qemu_driver.c -+++ libvirt-0.7.4/src/qemu/qemu_driver.c -@@ -7559,6 +7559,11 @@ static virDriver qemuDriver = { - qemuIsSecure, +--- libvirt-0.7.5.orig/src/qemu/qemu_driver.c ++++ libvirt-0.7.5/src/qemu/qemu_driver.c +@@ -7990,6 +7990,11 @@ static virDriver qemuDriver = { qemuDomainIsActive, qemuDomainIsPersistent, + qemuCPUCompare, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -782,14 +782,14 @@ Index: libvirt-0.7.4/src/qemu/qemu_driver.c }; -Index: libvirt-0.7.4/src/esx/esx_driver.c +Index: libvirt-0.7.5/src/esx/esx_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/esx/esx_driver.c -+++ libvirt-0.7.4/src/esx/esx_driver.c -@@ -3425,6 +3425,11 @@ static virDriver esxDriver = { - esxIsSecure, /* isSecure */ +--- libvirt-0.7.5.orig/src/esx/esx_driver.c ++++ libvirt-0.7.5/src/esx/esx_driver.c +@@ -3455,6 +3455,11 @@ static virDriver esxDriver = { esxDomainIsActive, /* domainIsActive */ esxDomainIsPersistent, /* domainIsPersistent */ + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -798,14 +798,14 @@ Index: libvirt-0.7.4/src/esx/esx_driver.c }; -Index: libvirt-0.7.4/src/test/test_driver.c +Index: libvirt-0.7.5/src/test/test_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/test/test_driver.c -+++ libvirt-0.7.4/src/test/test_driver.c -@@ -5233,6 +5233,11 @@ static virDriver testDriver = { - testIsSecure, /* isEncrypted */ +--- libvirt-0.7.5.orig/src/test/test_driver.c ++++ libvirt-0.7.5/src/test/test_driver.c +@@ -5238,6 +5238,11 @@ static virDriver testDriver = { testDomainIsActive, /* domainIsActive */ testDomainIsPersistent, /* domainIsPersistent */ + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -814,14 +814,14 @@ Index: libvirt-0.7.4/src/test/test_driver.c }; static virNetworkDriver testNetworkDriver = { -Index: libvirt-0.7.4/src/uml/uml_driver.c +Index: libvirt-0.7.5/src/uml/uml_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/uml/uml_driver.c -+++ libvirt-0.7.4/src/uml/uml_driver.c -@@ -1888,6 +1888,11 @@ static virDriver umlDriver = { - umlIsSecure, +--- libvirt-0.7.5.orig/src/uml/uml_driver.c ++++ libvirt-0.7.5/src/uml/uml_driver.c +@@ -1924,6 +1924,11 @@ static virDriver umlDriver = { umlDomainIsActive, umlDomainIsPersistent, + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -830,14 +830,14 @@ Index: libvirt-0.7.4/src/uml/uml_driver.c }; -Index: libvirt-0.7.4/src/vbox/vbox_tmpl.c +Index: libvirt-0.7.5/src/vbox/vbox_tmpl.c =================================================================== ---- libvirt-0.7.4.orig/src/vbox/vbox_tmpl.c -+++ libvirt-0.7.4/src/vbox/vbox_tmpl.c -@@ -6571,6 +6571,11 @@ virDriver NAME(Driver) = { - vboxIsSecure, +--- libvirt-0.7.5.orig/src/vbox/vbox_tmpl.c ++++ libvirt-0.7.5/src/vbox/vbox_tmpl.c +@@ -7051,6 +7051,11 @@ virDriver NAME(Driver) = { vboxDomainIsActive, vboxDomainIsPersistent, + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -846,14 +846,14 @@ Index: libvirt-0.7.4/src/vbox/vbox_tmpl.c }; virNetworkDriver NAME(NetworkDriver) = { -Index: libvirt-0.7.4/src/opennebula/one_driver.c +Index: libvirt-0.7.5/src/opennebula/one_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/opennebula/one_driver.c -+++ libvirt-0.7.4/src/opennebula/one_driver.c -@@ -781,6 +781,11 @@ static virDriver oneDriver = { - oneIsSecure, +--- libvirt-0.7.5.orig/src/opennebula/one_driver.c ++++ libvirt-0.7.5/src/opennebula/one_driver.c +@@ -783,6 +783,11 @@ static virDriver oneDriver = { NULL, /* domainIsActive */ NULL, /* domainIsPersistent */ + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -862,14 +862,14 @@ Index: libvirt-0.7.4/src/opennebula/one_driver.c }; static virStateDriver oneStateDriver = { -Index: libvirt-0.7.4/src/phyp/phyp_driver.c +Index: libvirt-0.7.5/src/phyp/phyp_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/phyp/phyp_driver.c -+++ libvirt-0.7.4/src/phyp/phyp_driver.c -@@ -1650,6 +1650,11 @@ virDriver phypDriver = { - phypIsSecure, +--- libvirt-0.7.5.orig/src/phyp/phyp_driver.c ++++ libvirt-0.7.5/src/phyp/phyp_driver.c +@@ -1651,6 +1651,11 @@ virDriver phypDriver = { NULL, /* domainIsActive */ NULL, /* domainIsPersistent */ + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -878,14 +878,14 @@ Index: libvirt-0.7.4/src/phyp/phyp_driver.c }; int -Index: libvirt-0.7.4/src/remote/remote_driver.c +Index: libvirt-0.7.5/src/remote/remote_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/remote/remote_driver.c -+++ libvirt-0.7.4/src/remote/remote_driver.c -@@ -8847,6 +8847,11 @@ static virDriver remote_driver = { - remoteIsSecure, /* isSecure */ +--- libvirt-0.7.5.orig/src/remote/remote_driver.c ++++ libvirt-0.7.5/src/remote/remote_driver.c +@@ -8940,6 +8940,11 @@ static virDriver remote_driver = { remoteDomainIsActive, /* domainIsActive */ remoteDomainIsPersistent, /* domainIsPersistent */ + remoteCPUCompare, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -894,11 +894,11 @@ Index: libvirt-0.7.4/src/remote/remote_driver.c }; static virNetworkDriver network_driver = { -Index: libvirt-0.7.4/docs/libvirt-api.xml +Index: libvirt-0.7.5/docs/libvirt-api.xml =================================================================== ---- libvirt-0.7.4.orig/docs/libvirt-api.xml -+++ libvirt-0.7.4/docs/libvirt-api.xml -@@ -271,6 +271,11 @@ +--- libvirt-0.7.5.orig/docs/libvirt-api.xml ++++ libvirt-0.7.5/docs/libvirt-api.xml +@@ -293,6 +293,11 @@ @@ -910,7 +910,7 @@ Index: libvirt-0.7.4/docs/libvirt-api.xml -@@ -1878,6 +1883,36 @@ This function may requires privileged ac +@@ -1972,6 +1977,36 @@ This function may requires privileged ac @@ -947,10 +947,10 @@ Index: libvirt-0.7.4/docs/libvirt-api.xml -Index: libvirt-0.7.4/src/libvirt_public.syms +Index: libvirt-0.7.5/src/libvirt_public.syms =================================================================== ---- libvirt-0.7.4.orig/src/libvirt_public.syms -+++ libvirt-0.7.4/src/libvirt_public.syms +--- libvirt-0.7.5.orig/src/libvirt_public.syms ++++ libvirt-0.7.5/src/libvirt_public.syms @@ -215,6 +215,11 @@ LIBVIRT_0.4.2 { LIBVIRT_0.4.5 { global: @@ -963,11 +963,11 @@ Index: libvirt-0.7.4/src/libvirt_public.syms } LIBVIRT_0.4.2; LIBVIRT_0.5.0 { -Index: libvirt-0.7.4/python/generator.py +Index: libvirt-0.7.5/python/generator.py =================================================================== ---- libvirt-0.7.4.orig/python/generator.py -+++ libvirt-0.7.4/python/generator.py -@@ -287,6 +287,7 @@ skip_impl = ( +--- libvirt-0.7.5.orig/python/generator.py ++++ libvirt-0.7.5/python/generator.py +@@ -288,6 +288,7 @@ skip_impl = ( 'virDomainSetSchedulerParameters', 'virDomainGetVcpus', 'virDomainPinVcpu', @@ -975,11 +975,11 @@ Index: libvirt-0.7.4/python/generator.py 'virSecretGetValue', 'virSecretSetValue', 'virSecretGetUUID', -Index: libvirt-0.7.4/python/libvirt-override.c +Index: libvirt-0.7.5/python/libvirt-override.c =================================================================== ---- libvirt-0.7.4.orig/python/libvirt-override.c -+++ libvirt-0.7.4/python/libvirt-override.c -@@ -1400,6 +1400,34 @@ libvirt_virStoragePoolGetInfo(PyObject * +--- libvirt-0.7.5.orig/python/libvirt-override.c ++++ libvirt-0.7.5/python/libvirt-override.c +@@ -1516,6 +1516,34 @@ libvirt_virStoragePoolGetInfo(PyObject * return(py_retval); } @@ -1014,7 +1014,7 @@ Index: libvirt-0.7.4/python/libvirt-override.c static PyObject * libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -@@ -2557,6 +2585,7 @@ static PyMethodDef libvirtMethods[] = { +@@ -2690,6 +2718,7 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL}, {(char *) "virStoragePoolListVolumes", libvirt_virStoragePoolListVolumes, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetInfo", libvirt_virStoragePoolGetInfo, METH_VARARGS, NULL}, @@ -1022,11 +1022,11 @@ Index: libvirt-0.7.4/python/libvirt-override.c {(char *) "virStorageVolGetInfo", libvirt_virStorageVolGetInfo, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetUUID", libvirt_virStoragePoolGetUUID, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetUUIDString", libvirt_virStoragePoolGetUUIDString, METH_VARARGS, NULL}, -Index: libvirt-0.7.4/python/libvirt-override-api.xml +Index: libvirt-0.7.5/python/libvirt-override-api.xml =================================================================== ---- libvirt-0.7.4.orig/python/libvirt-override-api.xml -+++ libvirt-0.7.4/python/libvirt-override-api.xml -@@ -140,6 +140,11 @@ +--- libvirt-0.7.5.orig/python/libvirt-override-api.xml ++++ libvirt-0.7.5/python/libvirt-override-api.xml +@@ -145,6 +145,11 @@ @@ -1038,10 +1038,10 @@ Index: libvirt-0.7.4/python/libvirt-override-api.xml list the storage pools, stores the pointers to the names in @names -Index: libvirt-0.7.4/src/xen/xen_inotify.c +Index: libvirt-0.7.5/src/xen/xen_inotify.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_inotify.c -+++ libvirt-0.7.4/src/xen/xen_inotify.c +--- libvirt-0.7.5.orig/src/xen/xen_inotify.c ++++ libvirt-0.7.5/src/xen/xen_inotify.c @@ -86,6 +86,11 @@ struct xenUnifiedDriver xenInotifyDriver NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ diff --git a/suse-network.patch b/suse-network.patch index 5a1146c..e9630f7 100644 --- a/suse-network.patch +++ b/suse-network.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/src/conf/network_conf.c +Index: libvirt-0.7.5/src/conf/network_conf.c =================================================================== ---- libvirt-0.7.4.orig/src/conf/network_conf.c -+++ libvirt-0.7.4/src/conf/network_conf.c -@@ -865,6 +865,137 @@ error: +--- libvirt-0.7.5.orig/src/conf/network_conf.c ++++ libvirt-0.7.5/src/conf/network_conf.c +@@ -863,6 +863,137 @@ error: return NULL; } @@ -140,7 +140,7 @@ Index: libvirt-0.7.4/src/conf/network_conf.c int virNetworkLoadAllConfigs(virConnectPtr conn, virNetworkObjListPtr nets, const char *configDir, -@@ -904,6 +1035,7 @@ int virNetworkLoadAllConfigs(virConnectP +@@ -902,6 +1033,7 @@ int virNetworkLoadAllConfigs(virConnectP closedir(dir); @@ -148,10 +148,10 @@ Index: libvirt-0.7.4/src/conf/network_conf.c return 0; } -Index: libvirt-0.7.4/src/conf/network_conf.h +Index: libvirt-0.7.5/src/conf/network_conf.h =================================================================== ---- libvirt-0.7.4.orig/src/conf/network_conf.h -+++ libvirt-0.7.4/src/conf/network_conf.h +--- libvirt-0.7.5.orig/src/conf/network_conf.h ++++ libvirt-0.7.5/src/conf/network_conf.h @@ -94,6 +94,7 @@ struct _virNetworkObj { unsigned int active : 1; unsigned int autostart : 1; @@ -160,11 +160,11 @@ Index: libvirt-0.7.4/src/conf/network_conf.h virNetworkDefPtr def; /* The current definition */ virNetworkDefPtr newDef; /* New definition to activate at shutdown */ -Index: libvirt-0.7.4/src/network/bridge_driver.c +Index: libvirt-0.7.5/src/network/bridge_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/network/bridge_driver.c -+++ libvirt-0.7.4/src/network/bridge_driver.c -@@ -994,6 +994,11 @@ static int networkShutdownNetworkDaemon( +--- libvirt-0.7.5.orig/src/network/bridge_driver.c ++++ libvirt-0.7.5/src/network/bridge_driver.c +@@ -1010,6 +1010,11 @@ static int networkShutdownNetworkDaemon( unlink(stateFile); VIR_FREE(stateFile); @@ -176,7 +176,7 @@ Index: libvirt-0.7.4/src/network/bridge_driver.c if (network->dnsmasqPid > 0) kill(network->dnsmasqPid, SIGTERM); -@@ -1494,6 +1499,12 @@ static int networkSetAutostart(virNetwor +@@ -1510,6 +1515,12 @@ static int networkSetAutostart(virNetwor goto cleanup; } diff --git a/xen-list-defined.patch b/xen-list-defined.patch deleted file mode 100644 index 8b5cc01..0000000 --- a/xen-list-defined.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 7cfbb17978c467625afab866b7a22119789abee0 -Author: Matthias Bolte -Date: Thu Nov 26 00:09:40 2009 +0100 - - xen: Fix unconditional freeing in xenDaemonListDefinedDomains() - - Commit 790f0b3057787bb64da8c46c111ff8d3eff7b2af causes the contents of - the names array to be freed even on success, resulting in no listing of - defined but inactive Xen domains. - - Spotted by Jim Fehlig - -diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c -index e370eb8..4d9dcd1 100644 ---- a/src/xen/xend_internal.c -+++ b/src/xen/xend_internal.c -@@ -4696,12 +4696,17 @@ xenDaemonListDefinedDomains(virConnectPtr conn, char **const names, int maxnames - break; - } - -+cleanup: -+ sexpr_free(root); -+ return(ret); -+ - error: - for (i = 0; i < ret; ++i) - VIR_FREE(names[i]); - -- sexpr_free(root); -- return(ret); -+ ret = -1; -+ -+ goto cleanup; - } - - /** diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 87e6ca6..b174db7 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/src/xen/xend_internal.c +Index: libvirt-0.7.5/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -5365,7 +5365,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +--- libvirt-0.7.5.orig/src/xen/xend_internal.c ++++ libvirt-0.7.5/src/xen/xend_internal.c +@@ -5409,7 +5409,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else { diff --git a/xen-shr-pages.patch b/xen-shr-pages.patch new file mode 100644 index 0000000..fbb074c --- /dev/null +++ b/xen-shr-pages.patch @@ -0,0 +1,248 @@ +Index: libvirt-0.7.4/src/xen/xen_hypervisor.c +=================================================================== +--- libvirt-0.7.4.orig/src/xen/xen_hypervisor.c ++++ libvirt-0.7.4/src/xen/xen_hypervisor.c +@@ -215,10 +215,26 @@ struct xen_v2d5_getdomaininfo { + }; + typedef struct xen_v2d5_getdomaininfo xen_v2d5_getdomaininfo; + ++struct xen_v2d6_getdomaininfo { ++ domid_t domain; /* the domain number */ ++ uint32_t flags; /* flags, see before */ ++ uint64_t tot_pages ALIGN_64; /* total number of pages used */ ++ uint64_t max_pages ALIGN_64; /* maximum number of pages allowed */ ++ uint64_t shr_pages ALIGN_64; /* number of shared pages */ ++ uint64_t shared_info_frame ALIGN_64; /* MFN of shared_info struct */ ++ uint64_t cpu_time ALIGN_64; /* CPU time used */ ++ uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */ ++ uint32_t max_vcpu_id; /* Maximum VCPUID in use by this domain. */ ++ uint32_t ssidref; ++ xen_domain_handle_t handle; ++}; ++typedef struct xen_v2d6_getdomaininfo xen_v2d6_getdomaininfo; ++ + union xen_getdomaininfo { + struct xen_v0_getdomaininfo v0; + struct xen_v2_getdomaininfo v2; + struct xen_v2d5_getdomaininfo v2d5; ++ struct xen_v2d6_getdomaininfo v2d6; + }; + typedef union xen_getdomaininfo xen_getdomaininfo; + +@@ -226,6 +242,7 @@ union xen_getdomaininfolist { + struct xen_v0_getdomaininfo *v0; + struct xen_v2_getdomaininfo *v2; + struct xen_v2d5_getdomaininfo *v2d5; ++ struct xen_v2d6_getdomaininfo *v2d6; + }; + typedef union xen_getdomaininfolist xen_getdomaininfolist; + +@@ -263,114 +280,147 @@ typedef struct xen_v2s5_availheap xen_v + #define XEN_GETDOMAININFOLIST_ALLOC(domlist, size) \ + (hypervisor_version < 2 ? \ + (VIR_ALLOC_N(domlist.v0, (size)) == 0) : \ +- (dom_interface_version < 5 ? \ +- (VIR_ALLOC_N(domlist.v2, (size)) == 0) : \ +- (VIR_ALLOC_N(domlist.v2d5, (size)) == 0))) ++ (dom_interface_version == 6 ? \ ++ (VIR_ALLOC_N(domlist.v2d6, (size)) == 0) : \ ++ (dom_interface_version == 5 ? \ ++ (VIR_ALLOC_N(domlist.v2d5, (size)) == 0) : \ ++ (VIR_ALLOC_N(domlist.v2, (size)) == 0)))) + + #define XEN_GETDOMAININFOLIST_FREE(domlist) \ + (hypervisor_version < 2 ? \ + VIR_FREE(domlist.v0) : \ +- (dom_interface_version < 5 ? \ +- VIR_FREE(domlist.v2) : \ +- VIR_FREE(domlist.v2d5))) ++ (dom_interface_version == 6 ? \ ++ VIR_FREE(domlist.v2d6) : \ ++ (dom_interface_version == 5 ? \ ++ VIR_FREE(domlist.v2d5) : \ ++ VIR_FREE(domlist.v2)))) + + #define XEN_GETDOMAININFOLIST_CLEAR(domlist, size) \ + (hypervisor_version < 2 ? \ + memset(domlist.v0, 0, sizeof(*domlist.v0) * size) : \ +- (dom_interface_version < 5 ? \ +- memset(domlist.v2, 0, sizeof(*domlist.v2) * size) : \ +- memset(domlist.v2d5, 0, sizeof(*domlist.v2d5) * size))) ++ (dom_interface_version == 6 ? \ ++ memset(domlist.v2d6, 0, sizeof(*domlist.v2d6) * size) : \ ++ (dom_interface_version == 5 ? \ ++ memset(domlist.v2d5, 0, sizeof(*domlist.v2d5) * size) : \ ++ memset(domlist.v2, 0, sizeof(*domlist.v2) * size)))) + + #define XEN_GETDOMAININFOLIST_DOMAIN(domlist, n) \ + (hypervisor_version < 2 ? \ + domlist.v0[n].domain : \ +- (dom_interface_version < 5 ? \ +- domlist.v2[n].domain : \ +- domlist.v2d5[n].domain)) ++ (dom_interface_version == 6 ? \ ++ domlist.v2d6[n].domain : \ ++ (dom_interface_version == 5 ? \ ++ domlist.v2d5[n].domain : \ ++ domlist.v2[n].domain))) + + #define XEN_GETDOMAININFOLIST_UUID(domlist, n) \ + (hypervisor_version < 2 ? \ + domlist.v0[n].handle : \ +- (dom_interface_version < 5 ? \ +- domlist.v2[n].handle : \ +- domlist.v2d5[n].handle)) ++ (dom_interface_version == 6 ? \ ++ domlist.v2d6[n].handle : \ ++ (dom_interface_version == 5 ? \ ++ domlist.v2d5[n].handle : \ ++ domlist.v2[n].handle))) + + #define XEN_GETDOMAININFOLIST_DATA(domlist) \ + (hypervisor_version < 2 ? \ + (void*)(domlist->v0) : \ +- (dom_interface_version < 5 ? \ +- (void*)(domlist->v2) : \ +- (void*)(domlist->v2d5))) ++ (dom_interface_version == 6 ? \ ++ (void*)(domlist->v2d6) : \ ++ (dom_interface_version == 5 ? \ ++ (void*)(domlist->v2d5) : \ ++ (void*)(domlist->v2)))) + + #define XEN_GETDOMAININFO_SIZE \ + (hypervisor_version < 2 ? \ + sizeof(xen_v0_getdomaininfo) : \ +- (dom_interface_version < 5 ? \ +- sizeof(xen_v2_getdomaininfo) : \ +- sizeof(xen_v2d5_getdomaininfo))) ++ (dom_interface_version == 6 ? \ ++ sizeof(xen_v2d6_getdomaininfo) : \ ++ (dom_interface_version == 5 ? \ ++ sizeof(xen_v2d5_getdomaininfo) : \ ++ sizeof(xen_v2_getdomaininfo)))) + + #define XEN_GETDOMAININFO_CLEAR(dominfo) \ + (hypervisor_version < 2 ? \ + memset(&(dominfo.v0), 0, sizeof(xen_v0_getdomaininfo)) : \ +- (dom_interface_version < 5 ? \ +- memset(&(dominfo.v2), 0, sizeof(xen_v2_getdomaininfo)) : \ +- memset(&(dominfo.v2d5), 0, sizeof(xen_v2d5_getdomaininfo)))) ++ (dom_interface_version == 6 ? \ ++ memset(&(dominfo.v2d6), 0, sizeof(xen_v2d6_getdomaininfo)) : \ ++ (dom_interface_version == 5 ? \ ++ memset(&(dominfo.v2d5), 0, sizeof(xen_v2d5_getdomaininfo)) : \ ++ memset(&(dominfo.v2), 0, sizeof(xen_v2_getdomaininfo))))) + + #define XEN_GETDOMAININFO_DOMAIN(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.domain : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.domain : \ +- dominfo.v2d5.domain)) ++ (dom_interface_version == 6 ? \ ++ dominfo.v2d6.domain : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.domain : \ ++ dominfo.v2.domain))) + + #define XEN_GETDOMAININFO_CPUTIME(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.cpu_time : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.cpu_time : \ +- dominfo.v2d5.cpu_time)) ++ (dom_interface_version == 6 ? \ ++ dominfo.v2d6.cpu_time : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.cpu_time : \ ++ dominfo.v2.cpu_time))) ++ + + #define XEN_GETDOMAININFO_CPUCOUNT(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.nr_online_vcpus : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.nr_online_vcpus : \ +- dominfo.v2d5.nr_online_vcpus)) ++ (dom_interface_version == 6 ? \ ++ dominfo.v2d6.nr_online_vcpus : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.nr_online_vcpus : \ ++ dominfo.v2.nr_online_vcpus))) + + #define XEN_GETDOMAININFO_MAXCPUID(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.max_vcpu_id : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.max_vcpu_id : \ +- dominfo.v2d5.max_vcpu_id)) ++ (dom_interface_version == 6 ? \ ++ dominfo.v2d6.max_vcpu_id : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.max_vcpu_id : \ ++ dominfo.v2.max_vcpu_id))) + + #define XEN_GETDOMAININFO_FLAGS(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.flags : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.flags : \ +- dominfo.v2d5.flags)) ++ (dom_interface_version == 6 ? \ ++ dominfo.v2d6.flags : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.flags : \ ++ dominfo.v2.flags))) + + #define XEN_GETDOMAININFO_TOT_PAGES(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.tot_pages : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.tot_pages : \ +- dominfo.v2d5.tot_pages)) ++ (dom_interface_version == 6 ? \ ++ dominfo.v2d6.tot_pages : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.tot_pages : \ ++ dominfo.v2.tot_pages))) + + #define XEN_GETDOMAININFO_MAX_PAGES(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.max_pages : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.max_pages : \ +- dominfo.v2d5.max_pages)) ++ (dom_interface_version == 6 ? \ ++ dominfo.v2d6.max_pages : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.max_pages : \ ++ dominfo.v2.max_pages))) + + #define XEN_GETDOMAININFO_UUID(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.handle : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.handle : \ +- dominfo.v2d5.handle)) ++ (dom_interface_version == 6 ? \ ++ dominfo.v2d6.handle : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.handle : \ ++ dominfo.v2.handle))) + + + static int +@@ -2050,6 +2100,12 @@ xenHypervisorInit(void) + DEBUG0("Using hypervisor call v2, sys ver6 dom ver5\n"); + goto done; + } ++ /* Xen 4.0 */ ++ dom_interface_version = 6; /* XEN_DOMCTL_INTERFACE_VERSION */ ++ if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){ ++ DEBUG0("Using hypervisor call v2, sys ver6 dom ver6\n"); ++ goto done; ++ } + } + + hypervisor_version = 1; diff --git a/xend-description-tag.patch b/xend-description-tag.patch deleted file mode 100644 index cd0ef24..0000000 --- a/xend-description-tag.patch +++ /dev/null @@ -1,36 +0,0 @@ -From acba9b620128c4dcdbb95a1ea06604f3013a0518 Mon Sep 17 00:00:00 2001 -From: Jim Fehlig -Date: Mon, 7 Dec 2009 14:24:21 -0700 -Subject: [PATCH] Plumb domain description tag in xend backend - -xen-unstable changesets 20321 and 20521 added support for -description in xend domain config. This patch extends that -support in xend backend. ---- - src/xen/xend_internal.c | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) - -Index: libvirt-0.7.4/src/xen/xend_internal.c -=================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -2360,6 +2360,9 @@ xenDaemonParseSxpr(virConnectPtr conn, - } - virUUIDParse(tmp, def->uuid); - -+ if (sexpr_node_copy(root, "domain/description", &def->description) < 0) -+ goto no_memory; -+ - hvm = sexpr_lookup(root, "domain/image/hvm") ? 1 : 0; - if (!hvm) { - if (sexpr_node_copy(root, "domain/bootloader", -@@ -5676,6 +5679,9 @@ xenDaemonFormatSxpr(virConnectPtr conn, - virUUIDFormat(def->uuid, uuidstr); - virBufferVSprintf(&buf, "(uuid '%s')", uuidstr); - -+ if (def->description) -+ virBufferVSprintf(&buf, "(description '%s')", def->description); -+ - if (def->os.bootloader) { - if (def->os.bootloader[0]) - virBufferVSprintf(&buf, "(bootloader '%s')", def->os.bootloader); From d35330154e56d82bfbda39ad2495648fb9950a6815623ea87fcf0d4a39f87fd1 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Tue, 29 Dec 2009 18:50:56 +0000 Subject: [PATCH 2/8] Don't build OpenNebula driver for SLES OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=28 --- libvirt.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libvirt.spec b/libvirt.spec index 39df825..8423819 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -24,6 +24,7 @@ %define with_openvz 1 %define with_vbox 1 %define with_uml 0 +%define with_one 0 # hypervisor drivers that use a native remote protocol %define with_phyp 0 %define with_esx 0 @@ -290,6 +291,9 @@ Authors: %if ! %{with_uml} %define _without_uml --without-uml %endif +%if ! %{with_one} +%define _without_one --without-one +%endif %if ! %{with_phyp} %define _without_phyp --without-phyp %endif @@ -329,6 +333,7 @@ export CFLAGS="$RPM_OPT_FLAGS" %{?_without_openvz} \ %{?_without_vbox} \ %{?_without_uml} \ + %{?_without_one} \ %{?_without_phyp} \ %{?_without_esx} \ %{?_without_numactl} \ From 5d5151eb412ba490ef291b1bb38a07c97395cbafe43f3ad6e74eb00c12b80a5e Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Tue, 29 Dec 2009 18:51:43 +0000 Subject: [PATCH 3/8] Use libpciaccess0-devel instead of libpciaccess-devel OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=29 --- libvirt.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt.spec b/libvirt.spec index 8423819..89daa59 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -83,7 +83,7 @@ BuildRequires: hal-devel %endif %if %{with_udev} BuildRequires: libudev-devel >= 145 -BuildRequires: libpciaccess-devel >= 0.10.9 +BuildRequires: libpciaccess0-devel >= 0.10.9 %endif %if %{with_xen} BuildRequires: xen-devel From d9104d8657385a77cf0b0f6d3a352e018c76e696e1fd581dde6b61ca665bf431 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 4 Jan 2010 21:16:47 +0000 Subject: [PATCH 4/8] Require virt-utils package for common tools such as qemu-img OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=30 --- libvirt.changes | 5 +++++ libvirt.spec | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/libvirt.changes b/libvirt.changes index e0f728b..e0b6362 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 4 14:14:41 MST 2010 - jfehlig@novell.com + +- Require virt-utils package for common tools such as qemu-img + ------------------------------------------------------------------- Tue Dec 29 10:26:55 MST 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index 89daa59..b5650a5 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -122,13 +122,15 @@ Requires: bridge-utils Requires: iptables Requires: lvm2 Requires: parted -#Requires: /usr/bin/qemu-img +Requires: virt-utils Recommends: logrotate Requires: dnsmasq Requires: PolicyKit >= 0.6 Requires: open-iscsi Requires: nfs-client +%if %{with_hal} Requires: hal +%endif %if 0%{?suse_version} > 1110 Requires: polkit >= 0.9 %else @@ -196,8 +198,8 @@ Group: Development/Libraries/C and C++ Requires: %{name} = %{version} libxml2-devel %if %{with_xen} Requires: xen-devel -Requires: pkg-config %endif +Requires: pkg-config %description devel Libvirt is a C toolkit to interract with the virtualization @@ -350,7 +352,6 @@ export CFLAGS="$RPM_OPT_FLAGS" --with-init-script=none \ --with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \ ac_cv_path_DNSMASQ=/usr/sbin/dnsmasq \ - ac_cv_path_QEMU_IMG=/usr/bin/qemu-img-xen \ ac_cv_path_ISCSIADM=/sbin/iscsiadm \ ac_cv_path_MODPROBE=/sbin/modprobe \ ac_cv_path_UDEVADM=/sbin/udevadm \ @@ -401,7 +402,11 @@ ln -s /etc/init.d/libvirtd $RPM_BUILD_ROOT/usr/sbin/rclibvirtd %clean rm -rf $RPM_BUILD_ROOT -%post -p /sbin/ldconfig +%post +/sbin/ldconfig +%if 0%{?sles_version} +%{fillup_and_insserv -f -y libvirtd} +%endif %preun %stop_on_removal libvirtd From 7d0d7ba181a156e830677056834cebb5f694bfc40c579a13bb7c7411c21028d7 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Thu, 7 Jan 2010 01:07:13 +0000 Subject: [PATCH 5/8] Fix freeing of uninitialized pointer OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=31 --- libvirt.changes | 7 +++++++ libvirt.spec | 43 +++++++++++++++++-------------------------- xen-shr-pages.patch | 38 +++++++++++++++++++------------------- 3 files changed, 43 insertions(+), 45 deletions(-) diff --git a/libvirt.changes b/libvirt.changes index e0b6362..8303ac2 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jan 6 18:02:00 MST 2010 - jfehlig@novell.com + +- Fix freeing of uninitialized pointer when using HAL in + node device driver + node-dev-free.patch + ------------------------------------------------------------------- Mon Jan 4 14:14:41 MST 2010 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index b5650a5..d1b98d3 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,7 +1,7 @@ # # spec file for package libvirt (Version 0.7.5) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -141,6 +141,7 @@ Source1: libvirtd.init # Upstream patches Patch0: detach-disk.patch Patch1: xen-shr-pages.patch +Patch2: node-dev-free.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -153,13 +154,12 @@ Patch202: snapshots.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Libvirt is a C toolkit to interract with the virtualization -capabilities Linux. Virtualization of the Linux Operating System means -the ability to run multiple instances of Operating Systems concurently +Libvirt is a C toolkit to interact with the virtualization +capabilities of Linux. Virtualization of the Linux Operating System means +the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance. The library aims to provide long term stable C API -initially for the Xen paravirtualization but should be able to -integrate other virtualization mechanisms if needed. +to interact with Linux virtualization technologies. @@ -181,8 +181,10 @@ Requires: cyrus-sasl Recommends: cyrus-sasl-digestmd5 %description client -Shared libraries and client binaries needed to access to the -virtualization capabilities of recent versions of Linux (and other OSes). +Libvirt is a C toolkit to interract with the virtualization +capabilities of Linux. The libvirt-client package contains shared +libraries and client binaries needed to access the virtualization +capabilities of recent versions of Linux (and other OSes). @@ -203,12 +205,8 @@ Requires: pkg-config %description devel Libvirt is a C toolkit to interract with the virtualization -capabilities Linux. Virtualization of the Linux Operating System means -the ability to run multiple instances of Operating Systems concurently -on a single hardware system where the basic resources are driven by a -Linux instance. The library aims to provide long term stable C API -initially for the Xen paravirtualization but should be able to -integrate other virtualization mechanisms if needed. +capabilities of Linux. The libvirt-devel package contains headers +and libraries needed for developing libvirt applications. @@ -225,12 +223,8 @@ Requires: %{name} = %{version} %description doc Libvirt is a C toolkit to interract with the virtualization -capabilities Linux. Virtualization of the Linux Operating System means -the ability to run multiple instances of Operating Systems concurently -on a single hardware system where the basic resources are driven by a -Linux instance. The library aims to provide long term stable C API -initially for the Xen paravirtualization but should be able to -integrate other virtualization mechanisms if needed. +capabilities of Linux. The libvirt-doc packages contains documentation +for the libvirt API and tools. @@ -248,12 +242,8 @@ Requires: %{name} = %{version} %description python Libvirt is a C toolkit to interract with the virtualization -capabilities Linux. Virtualization of the Linux Operating System means -the ability to run multiple instances of Operating Systems concurently -on a single hardware system where the basic resources are driven by a -Linux instance. The library aims to provide long term stable C API -initially for the Xen paravirtualization but should be able to -integrate other virtualization mechanisms if needed. +capabilities of Linux. The libvirt-python package provides python +bindings for the libvirt C API. @@ -266,6 +256,7 @@ Authors: %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %patch100 -p1 %patch101 %patch102 -p1 diff --git a/xen-shr-pages.patch b/xen-shr-pages.patch index fbb074c..ed5afb9 100644 --- a/xen-shr-pages.patch +++ b/xen-shr-pages.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.4/src/xen/xen_hypervisor.c +Index: libvirt-0.7.5/src/xen/xen_hypervisor.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_hypervisor.c -+++ libvirt-0.7.4/src/xen/xen_hypervisor.c +--- libvirt-0.7.5.orig/src/xen/xen_hypervisor.c ++++ libvirt-0.7.5/src/xen/xen_hypervisor.c @@ -215,10 +215,26 @@ struct xen_v2d5_getdomaininfo { }; typedef struct xen_v2d5_getdomaininfo xen_v2d5_getdomaininfo; @@ -44,7 +44,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - (VIR_ALLOC_N(domlist.v2, (size)) == 0) : \ - (VIR_ALLOC_N(domlist.v2d5, (size)) == 0))) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + (VIR_ALLOC_N(domlist.v2d6, (size)) == 0) : \ + (dom_interface_version == 5 ? \ + (VIR_ALLOC_N(domlist.v2d5, (size)) == 0) : \ @@ -56,7 +56,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - VIR_FREE(domlist.v2) : \ - VIR_FREE(domlist.v2d5))) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + VIR_FREE(domlist.v2d6) : \ + (dom_interface_version == 5 ? \ + VIR_FREE(domlist.v2d5) : \ @@ -68,7 +68,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - memset(domlist.v2, 0, sizeof(*domlist.v2) * size) : \ - memset(domlist.v2d5, 0, sizeof(*domlist.v2d5) * size))) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + memset(domlist.v2d6, 0, sizeof(*domlist.v2d6) * size) : \ + (dom_interface_version == 5 ? \ + memset(domlist.v2d5, 0, sizeof(*domlist.v2d5) * size) : \ @@ -80,7 +80,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - domlist.v2[n].domain : \ - domlist.v2d5[n].domain)) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + domlist.v2d6[n].domain : \ + (dom_interface_version == 5 ? \ + domlist.v2d5[n].domain : \ @@ -92,7 +92,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - domlist.v2[n].handle : \ - domlist.v2d5[n].handle)) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + domlist.v2d6[n].handle : \ + (dom_interface_version == 5 ? \ + domlist.v2d5[n].handle : \ @@ -104,7 +104,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - (void*)(domlist->v2) : \ - (void*)(domlist->v2d5))) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + (void*)(domlist->v2d6) : \ + (dom_interface_version == 5 ? \ + (void*)(domlist->v2d5) : \ @@ -116,7 +116,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - sizeof(xen_v2_getdomaininfo) : \ - sizeof(xen_v2d5_getdomaininfo))) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + sizeof(xen_v2d6_getdomaininfo) : \ + (dom_interface_version == 5 ? \ + sizeof(xen_v2d5_getdomaininfo) : \ @@ -128,7 +128,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - memset(&(dominfo.v2), 0, sizeof(xen_v2_getdomaininfo)) : \ - memset(&(dominfo.v2d5), 0, sizeof(xen_v2d5_getdomaininfo)))) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + memset(&(dominfo.v2d6), 0, sizeof(xen_v2d6_getdomaininfo)) : \ + (dom_interface_version == 5 ? \ + memset(&(dominfo.v2d5), 0, sizeof(xen_v2d5_getdomaininfo)) : \ @@ -140,7 +140,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - dominfo.v2.domain : \ - dominfo.v2d5.domain)) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + dominfo.v2d6.domain : \ + (dom_interface_version == 5 ? \ + dominfo.v2d5.domain : \ @@ -152,7 +152,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - dominfo.v2.cpu_time : \ - dominfo.v2d5.cpu_time)) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + dominfo.v2d6.cpu_time : \ + (dom_interface_version == 5 ? \ + dominfo.v2d5.cpu_time : \ @@ -165,7 +165,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - dominfo.v2.nr_online_vcpus : \ - dominfo.v2d5.nr_online_vcpus)) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + dominfo.v2d6.nr_online_vcpus : \ + (dom_interface_version == 5 ? \ + dominfo.v2d5.nr_online_vcpus : \ @@ -177,7 +177,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - dominfo.v2.max_vcpu_id : \ - dominfo.v2d5.max_vcpu_id)) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + dominfo.v2d6.max_vcpu_id : \ + (dom_interface_version == 5 ? \ + dominfo.v2d5.max_vcpu_id : \ @@ -189,7 +189,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - dominfo.v2.flags : \ - dominfo.v2d5.flags)) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + dominfo.v2d6.flags : \ + (dom_interface_version == 5 ? \ + dominfo.v2d5.flags : \ @@ -201,7 +201,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - dominfo.v2.tot_pages : \ - dominfo.v2d5.tot_pages)) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + dominfo.v2d6.tot_pages : \ + (dom_interface_version == 5 ? \ + dominfo.v2d5.tot_pages : \ @@ -213,7 +213,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - dominfo.v2.max_pages : \ - dominfo.v2d5.max_pages)) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + dominfo.v2d6.max_pages : \ + (dom_interface_version == 5 ? \ + dominfo.v2d5.max_pages : \ @@ -225,7 +225,7 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c - (dom_interface_version < 5 ? \ - dominfo.v2.handle : \ - dominfo.v2d5.handle)) -+ (dom_interface_version == 6 ? \ ++ (dom_interface_version >= 6 ? \ + dominfo.v2d6.handle : \ + (dom_interface_version == 5 ? \ + dominfo.v2d5.handle : \ From 3e50316f0e1f1a78eaf88ab38e12b6883b37d7291aad57765a11817337de136c Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Thu, 7 Jan 2010 01:08:02 +0000 Subject: [PATCH 6/8] Add missing node-dev-free.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=32 --- node-dev-free.patch | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 node-dev-free.patch diff --git a/node-dev-free.patch b/node-dev-free.patch new file mode 100644 index 0000000..e2700ee --- /dev/null +++ b/node-dev-free.patch @@ -0,0 +1,29 @@ +This invalid free results in heap corruption. Some symptoms I saw +because of this were libvirtd crashing and virt-manager hanging +while trying to enumerate devices. +--- + src/node_device/node_device_driver.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +Index: libvirt-0.7.5/src/node_device/node_device_driver.c +=================================================================== +--- libvirt-0.7.5.orig/src/node_device/node_device_driver.c ++++ libvirt-0.7.5/src/node_device/node_device_driver.c +@@ -78,7 +78,7 @@ static int update_driver_name(virConnect + virNodeDeviceObjPtr dev) + { + char *driver_link = NULL; +- char *devpath; ++ char *devpath = NULL; + char *p; + int ret = -1; + +@@ -114,7 +114,7 @@ static int update_driver_name(virConnect + + cleanup: + VIR_FREE(driver_link); +- free(devpath); ++ VIR_FREE(devpath); + return ret; + } + #else From 6f0cda5d802c162fdf444ce92d26b9204359255f4541b6f2c56a673394b93809 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 8 Jan 2010 00:37:04 +0000 Subject: [PATCH 7/8] checked in OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=33 --- detach-disk.patch | 20 +-- libvirt-0.7.4.tar.bz2 | 3 + libvirt-0.7.5.tar.bz2 | 3 - libvirt.changes | 28 ---- libvirt.spec | 334 ++++++++++--------------------------- libvirtd-defaults.patch | 16 +- migrate-params.patch | 8 +- node-dev-free.patch | 29 ---- snapshots.patch | 246 +++++++++++++-------------- suse-network.patch | 26 +-- xen-list-defined.patch | 36 ++++ xen-pv-cdrom.patch | 8 +- xen-shr-pages.patch | 248 --------------------------- xend-description-tag.patch | 36 ++++ 14 files changed, 322 insertions(+), 719 deletions(-) create mode 100644 libvirt-0.7.4.tar.bz2 delete mode 100644 libvirt-0.7.5.tar.bz2 delete mode 100644 node-dev-free.patch create mode 100644 xen-list-defined.patch delete mode 100644 xen-shr-pages.patch create mode 100644 xend-description-tag.patch diff --git a/detach-disk.patch b/detach-disk.patch index 5ae9775..c70c688 100644 --- a/detach-disk.patch +++ b/detach-disk.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.5/src/xen/xend_internal.c +Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.5.orig/src/xen/xend_internal.c -+++ libvirt-0.7.5/src/xen/xend_internal.c -@@ -4123,13 +4123,12 @@ xenDaemonAttachDevice(virDomainPtr domai +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -4109,13 +4109,12 @@ xenDaemonAttachDevice(virDomainPtr domai priv = (xenUnifiedPrivatePtr) domain->conn->privateData; @@ -21,7 +21,7 @@ Index: libvirt-0.7.5/src/xen/xend_internal.c if (!(def = xenDaemonDomainFetch(domain->conn, domain->id, domain->name, -@@ -4229,12 +4228,11 @@ xenDaemonDetachDevice(virDomainPtr domai +@@ -4213,12 +4212,11 @@ xenDaemonDetachDevice(virDomainPtr domai priv = (xenUnifiedPrivatePtr) domain->conn->privateData; @@ -38,11 +38,11 @@ Index: libvirt-0.7.5/src/xen/xend_internal.c if (!(def = xenDaemonDomainFetch(domain->conn, domain->id, -Index: libvirt-0.7.5/src/libvirt.c +Index: libvirt-0.7.4/src/libvirt.c =================================================================== ---- libvirt-0.7.5.orig/src/libvirt.c -+++ libvirt-0.7.5/src/libvirt.c -@@ -5066,7 +5066,8 @@ error: +--- libvirt-0.7.4.orig/src/libvirt.c ++++ libvirt-0.7.4/src/libvirt.c +@@ -4919,7 +4919,8 @@ error: * @domain: pointer to domain object * @xml: pointer to XML description of one device * @@ -52,7 +52,7 @@ Index: libvirt-0.7.5/src/libvirt.c * * Returns 0 in case of success, -1 in case of failure. */ -@@ -5109,7 +5110,8 @@ error: +@@ -4962,7 +4963,8 @@ error: * @domain: pointer to domain object * @xml: pointer to XML description of one device * diff --git a/libvirt-0.7.4.tar.bz2 b/libvirt-0.7.4.tar.bz2 new file mode 100644 index 0000000..c5fa49f --- /dev/null +++ b/libvirt-0.7.4.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6316a53b4cfaf184e795c7be69a371c5dc90a8a6dd6cd05c4208a1314aac10d4 +size 5692288 diff --git a/libvirt-0.7.5.tar.bz2 b/libvirt-0.7.5.tar.bz2 deleted file mode 100644 index fbb1fb3..0000000 --- a/libvirt-0.7.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0763b11fc054a82d47cce8566173e589e08f34cd7adab46c9c3de80b6eacc4c7 -size 5997827 diff --git a/libvirt.changes b/libvirt.changes index 8303ac2..3eb631f 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,31 +1,3 @@ -------------------------------------------------------------------- -Wed Jan 6 18:02:00 MST 2010 - jfehlig@novell.com - -- Fix freeing of uninitialized pointer when using HAL in - node device driver - node-dev-free.patch - -------------------------------------------------------------------- -Mon Jan 4 14:14:41 MST 2010 - jfehlig@novell.com - -- Require virt-utils package for common tools such as qemu-img - -------------------------------------------------------------------- -Tue Dec 29 10:26:55 MST 2009 - jfehlig@novell.com - -- Updated to version 0.7.5 - - Add new API virDomainMemoryStats to header and drivers - - Public API and domain extension for CPU flags - - expose SR IOV physical/virtual function relationships - - Support for JSON mode monitor [deactivated] - - Support for interface model='netfront' - - vbox: Add support for version 3.1 - - Support QEMU's virtual FAT block device driver - - lots of improvements and bug fixes -- Fix libvirt xen hypervisor driver to work with domctl interface - version 6 - xen-shr-pages.patch - ------------------------------------------------------------------- Mon Dec 7 14:51:36 MST 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index d1b98d3..bf9c90e 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,7 +1,7 @@ # -# spec file for package libvirt (Version 0.7.5) +# spec file for package libvirt (Version 0.7.4) # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,74 +17,25 @@ # norootforbuild -# hypervisor drivers that run on local host %define with_xen 1 -%define with_qemu 1 -%define with_lxc 1 -%define with_openvz 1 -%define with_vbox 1 -%define with_uml 0 -%define with_one 0 -# hypervisor drivers that use a native remote protocol +%define with_lxc 0 +%define with_selinux 0 %define with_phyp 0 -%define with_esx 0 -# host drivers -%define with_network 1 -%define with_storage_fs 1 -%define with_storage_lvm 1 -%define with_storage_iscsi 1 -%define with_storage_disk 1 -%define with_storage_mpath 1 -%define with_numactl 1 -%define with_selinux 1 -%define with_apparmor 0 -# options -%define with_capng 0 -%define with_netcf 0 -%define with_udev 0 -%define with_hal 0 -%define with_yajl 0 - # Xen is available only on i386 x86_64 %ifnarch %ix86 x86_64 %define with_xen 0 %endif -# LXC and selinux are not available on anything < openSUSE 11.1 -%if 0%{?suse_version} < 1110 -%define with_lxc 0 -%define with_selinux 0 +%if 0%{?suse_version} > 1100 +%define with_lxc 1 +%define with_selinux 1 %endif -# Enable phyp driver for IBM Power systems +# Build phyp backend for IBM Power systems %ifarch ppc64 %define with_phyp 1 %endif -# numactl only on x86_64 and ia64 -%ifnarch x86_64 ia64 -%define with_numactl 0 -%endif -# SLES doesn't contain OpenVZ, VBox, UML, OpenNebula, or ESX -%if 0%{?sles_version} -%define with_openvz 0 -%define with_vbox 0 -%define with_uml 0 -%define with_one 0 -%define with_esx 0 -%endif -%if 0%{?suse_version} > 1110 -%define with_udev 1 -%else -%define with_hal 1 -%endif Name: libvirt -BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel python-xml readline-devel util-linux xhtml-dtd -%if %{with_hal} -BuildRequires: hal-devel -%endif -%if %{with_udev} -BuildRequires: libudev-devel >= 145 -BuildRequires: libpciaccess0-devel >= 0.10.9 -%endif +BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel hal-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel python-xml readline-devel util-linux xhtml-dtd %if %{with_xen} BuildRequires: xen-devel %endif @@ -96,7 +47,7 @@ BuildRequires: avahi-devel %if %{with_selinux} BuildRequires: libselinux-devel %endif -%if %{with_numactl} +%ifarch x86_64 ia64 BuildRequires: libnuma-devel %endif %if 0%{?suse_version} > 1110 @@ -113,24 +64,25 @@ Url: http://libvirt.org/ License: LGPLv2.1+ Group: Development/Libraries/C and C++ AutoReqProv: yes -Version: 0.7.5 -Release: 3 +Version: 0.7.4 +Release: 1 Summary: A C toolkit to interract with the virtualization capabilities of Linux -# The client side, i.e. shared libs and virsh are in a subpackage -Requires: libvirt-client = %{version}-%{release} +Requires: readline +Requires: ncurses Requires: bridge-utils Requires: iptables +Requires: cyrus-sasl Requires: lvm2 Requires: parted -Requires: virt-utils +#Requires: /usr/bin/qemu-img +Recommends: cyrus-sasl-digestmd5 Recommends: logrotate Requires: dnsmasq Requires: PolicyKit >= 0.6 +Requires: socat Requires: open-iscsi Requires: nfs-client -%if %{with_hal} Requires: hal -%endif %if 0%{?suse_version} > 1110 Requires: polkit >= 0.9 %else @@ -139,9 +91,9 @@ Requires: PolicyKit >= 0.6 Source0: %{name}-%{version}.tar.bz2 Source1: libvirtd.init # Upstream patches -Patch0: detach-disk.patch -Patch1: xen-shr-pages.patch -Patch2: node-dev-free.patch +Patch0: xen-list-defined.patch +Patch1: detach-disk.patch +Patch2: xend-description-tag.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -154,37 +106,13 @@ Patch202: snapshots.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Libvirt is a C toolkit to interact with the virtualization -capabilities of Linux. Virtualization of the Linux Operating System means -the ability to run multiple instances of Operating Systems concurrently +Libvirt is a C toolkit to interract with the virtualization +capabilities Linux. Virtualization of the Linux Operating System means +the ability to run multiple instances of Operating Systems concurently on a single hardware system where the basic resources are driven by a Linux instance. The library aims to provide long term stable C API -to interact with Linux virtualization technologies. - - - -Authors: --------- - Daniel Veillard - Karel Zak - -%package client -License: LGPLv2.1+ -Summary: Client side library and utilities of the libvirt library -Group: Development/Libraries/C and C++ -Requires: readline -Requires: ncurses -# So remote clients can access libvirt over SSH tunnel -# (client invokes 'socat' against the UNIX socket on the server) -Requires: socat -Requires: cyrus-sasl -Recommends: cyrus-sasl-digestmd5 - -%description client -Libvirt is a C toolkit to interract with the virtualization -capabilities of Linux. The libvirt-client package contains shared -libraries and client binaries needed to access the virtualization -capabilities of recent versions of Linux (and other OSes). +initially for the Xen paravirtualization but should be able to +integrate other virtualization mechanisms if needed. @@ -200,13 +128,17 @@ Group: Development/Libraries/C and C++ Requires: %{name} = %{version} libxml2-devel %if %{with_xen} Requires: xen-devel -%endif Requires: pkg-config +%endif %description devel Libvirt is a C toolkit to interract with the virtualization -capabilities of Linux. The libvirt-devel package contains headers -and libraries needed for developing libvirt applications. +capabilities Linux. Virtualization of the Linux Operating System means +the ability to run multiple instances of Operating Systems concurently +on a single hardware system where the basic resources are driven by a +Linux instance. The library aims to provide long term stable C API +initially for the Xen paravirtualization but should be able to +integrate other virtualization mechanisms if needed. @@ -223,8 +155,12 @@ Requires: %{name} = %{version} %description doc Libvirt is a C toolkit to interract with the virtualization -capabilities of Linux. The libvirt-doc packages contains documentation -for the libvirt API and tools. +capabilities Linux. Virtualization of the Linux Operating System means +the ability to run multiple instances of Operating Systems concurently +on a single hardware system where the basic resources are driven by a +Linux instance. The library aims to provide long term stable C API +initially for the Xen paravirtualization but should be able to +integrate other virtualization mechanisms if needed. @@ -242,8 +178,12 @@ Requires: %{name} = %{version} %description python Libvirt is a C toolkit to interract with the virtualization -capabilities of Linux. The libvirt-python package provides python -bindings for the libvirt C API. +capabilities Linux. Virtualization of the Linux Operating System means +the ability to run multiple instances of Operating Systems concurently +on a single hardware system where the basic resources are driven by a +Linux instance. The library aims to provide long term stable C API +initially for the Xen paravirtualization but should be able to +integrate other virtualization mechanisms if needed. @@ -269,80 +209,24 @@ Authors: %if ! %{with_xen} %define _without_xen --without-xen %endif -%if ! %{with_qemu} -%define _without_qemu --without-qemu -%endif %if ! %{with_lxc} %define _without_lxc --without-lxc %endif -%if ! %{with_openvz} -%define _without_openvz --without-openvz -%endif -%if ! %{with_vbox} -%define _without_vbox --without-vbox -%endif -%if ! %{with_uml} -%define _without_uml --without-uml -%endif -%if ! %{with_one} -%define _without_one --without-one -%endif -%if ! %{with_phyp} -%define _without_phyp --without-phyp -%endif -%if ! %{with_esx} -%define _without_esx --without-esx -%endif -%if ! %{with_numactl} -%define _without_numactl --without-numactl -%endif -%if ! %{with_selinux} -%define _without_selinux --without-selinux -%endif -%if ! %{with_apparmor} -%define _without_apparmor --without-apparmor -%endif -%if ! %{with_capng} -%define _without_capng --without-capng -%endif -%if ! %{with_netcf} -%define _without_netcf --without-netcf -%endif -%if ! %{with_hal} -%define _without_hal --without-hal -%endif -%if ! %{with_udev} -%define _without_udev --without-udev -%endif -%if ! %{with_yajl} -%define _without_yajl --without-yajl +%if %{with_selinux} +%define _with_selinux --with-selinux %endif autoreconf -f -i export CFLAGS="$RPM_OPT_FLAGS" %configure --disable-static --with-pic \ %{?_without_xen} \ - %{?_without_qemu} \ %{?_without_lxc} \ - %{?_without_openvz} \ - %{?_without_vbox} \ - %{?_without_uml} \ - %{?_without_one} \ - %{?_without_phyp} \ - %{?_without_esx} \ - %{?_without_numactl} \ %{?_with_selinux} \ - %{?_without_capng} \ - %{?_without_netcf} \ - %{?_without_selinux} \ - %{?_without_apparmor} \ - %{?_without_hal} \ - %{?_without_udev} \ - %{?_without_yajl} \ - --without-xen-proxy \ --libexecdir=%{_libdir}/%{name} \ --with-init-script=none \ --with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \ + --with-xen-proxy=no \ ac_cv_path_DNSMASQ=/usr/sbin/dnsmasq \ + ac_cv_path_QEMU_IMG=/usr/bin/qemu-img-xen \ ac_cv_path_ISCSIADM=/sbin/iscsiadm \ ac_cv_path_MODPROBE=/sbin/modprobe \ ac_cv_path_UDEVADM=/sbin/udevadm \ @@ -360,14 +244,6 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/libvirt mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/libvirt rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a -%if ! %{with_lxc} -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug -%endif -%if ! %{with_qemu} -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf -rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug -%endif ln_dupes() { target="" @@ -393,11 +269,7 @@ ln -s /etc/init.d/libvirtd $RPM_BUILD_ROOT/usr/sbin/rclibvirtd %clean rm -rf $RPM_BUILD_ROOT -%post -/sbin/ldconfig -%if 0%{?sles_version} -%{fillup_and_insserv -f -y libvirtd} -%endif +%post -p /sbin/ldconfig %preun %stop_on_removal libvirtd @@ -407,86 +279,49 @@ rm -rf $RPM_BUILD_ROOT %restart_on_update libvirtd %insserv_cleanup -%post client -p /sbin/ldconfig - -%postun client -p /sbin/ldconfig - -%files +%files -f %{name}.lang %defattr(-, root, root) +%{_bindir}/virsh +%{_bindir}/virt-xml-validate +%{_bindir}/virt-pki-validate %{_sbindir}/libvirtd -%dir %{_libdir}/%{name} -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart -%config /etc/init.d/libvirtd -%{_sbindir}/rclibvirtd -%config %{_sysconfdir}/libvirt/libvirtd.conf -%config %{_sysconfdir}/logrotate.d/libvirtd -%config %{_sysconfdir}/libvirt/qemu/networks/default.xml -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/ -%dir %{_localstatedir}/run/libvirt/ -%dir %{_localstatedir}/lib/libvirt/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/images/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/boot/ -%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/ -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/ -%if 0%{?suse_version} > 1110 -%{_datadir}/polkit-1/actions/org.libvirt.unix.policy -%else -%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy -%endif -%{_datadir}/augeas -%if %{with_qemu} -%config %{_sysconfdir}/libvirt/qemu.conf -%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/qemu/ -%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/qemu/ -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/ -%endif -%if %{with_lxc} -%config %{_sysconfdir}/libvirt/lxc.conf -%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/lxc/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/ -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/ -%attr(0755, root, root) %{_libdir}/%{name}/libvirt_lxc -%endif -%if %{with_uml} -%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/uml/ -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/ -%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/ -%endif -%if 0%{with_storage_disk} -%{_libdir}/%{name}/libvirt_parthelper -%endif - -%files client -f %{name}.lang -%defattr(-, root, root) %doc %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/[CNRT]* %doc %{_docdir}/%{name}/AUTHORS %doc %{_mandir}/man1/virsh.1* %doc %{_mandir}/man1/virt-xml-validate.1* %doc %{_mandir}/man1/virt-pki-validate.1* -%{_bindir}/virsh -%{_bindir}/virt-xml-validate -%{_bindir}/virt-pki-validate -%{_libdir}/lib*.so.* - -%dir %{_datadir}/libvirt/ -%dir %{_datadir}/libvirt/schemas/ - -%{_datadir}/libvirt/schemas/domain.rng -%{_datadir}/libvirt/schemas/network.rng -%{_datadir}/libvirt/schemas/storagepool.rng -%{_datadir}/libvirt/schemas/storagevol.rng -%{_datadir}/libvirt/schemas/nodedev.rng -%{_datadir}/libvirt/schemas/capability.rng -%{_datadir}/libvirt/schemas/interface.rng -%{_datadir}/libvirt/schemas/secret.rng -%{_datadir}/libvirt/schemas/storageencryption.rng -%{_datadir}/libvirt/cpu_map.xml +%{_libdir}/*.so.* +%dir %{_libdir}/%{name} +%if 0%{?suse_version} > 1030 +%{_libdir}/%{name}/libvirt_parthelper +%endif +%if %{with_lxc} +%attr(0755, root, root) %{_libdir}/%{name}/libvirt_lxc +%endif +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart +%if %{with_lxc} +%config %{_sysconfdir}/libvirt/lxc.conf +%endif +%config %{_sysconfdir}/libvirt/qemu/networks/default.xml +%config %{_sysconfdir}/logrotate.d/libvirtd +%dir /%{_localstatedir}/run/libvirt/ +%dir /%{_localstatedir}/lib/libvirt/ +%config /etc/init.d/libvirtd +%{_sbindir}/rclibvirtd +%config %{_sysconfdir}/libvirt/libvirtd.conf +%config %{_sysconfdir}/libvirt/qemu.conf %config %{_sysconfdir}/sasl2/libvirt.conf +%if 0%{?suse_version} > 1110 +%{_datadir}/polkit-1/actions/org.libvirt.unix.policy +%else +%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy +%endif +%{_datadir}/libvirt +%{_datadir}/augeas %files devel %defattr(-, root, root) @@ -506,5 +341,6 @@ rm -rf $RPM_BUILD_ROOT %doc %{_docdir}/%{name}-python %{py_sitedir}/libvirt.py* %{py_sitedir}/libvirtmod* +#%attr(0755, root, root) %{_libdir}/%{name}/virt-aa-helper %changelog diff --git a/libvirtd-defaults.patch b/libvirtd-defaults.patch index e030d0b..ac89e2a 100644 --- a/libvirtd-defaults.patch +++ b/libvirtd-defaults.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.5/daemon/libvirtd.conf +Index: libvirt-0.7.2/daemon/libvirtd.conf =================================================================== ---- libvirt-0.7.5.orig/daemon/libvirtd.conf -+++ libvirt-0.7.5/daemon/libvirtd.conf +--- libvirt-0.7.2.orig/daemon/libvirtd.conf ++++ libvirt-0.7.2/daemon/libvirtd.conf @@ -18,8 +18,8 @@ # It is necessary to setup a CA and issue server certificates before # using this capability. @@ -28,11 +28,11 @@ Index: libvirt-0.7.5/daemon/libvirtd.conf # Override the default mDNS advertizement name. This must be # unique on the immediate broadcast network. -Index: libvirt-0.7.5/daemon/libvirtd.c +Index: libvirt-0.7.2/daemon/libvirtd.c =================================================================== ---- libvirt-0.7.5.orig/daemon/libvirtd.c -+++ libvirt-0.7.5/daemon/libvirtd.c -@@ -137,7 +137,7 @@ static int sigwrite = -1; /* Signa +--- libvirt-0.7.2.orig/daemon/libvirtd.c ++++ libvirt-0.7.2/daemon/libvirtd.c +@@ -135,7 +135,7 @@ static int sigwrite = -1; /* Signa static int ipsock = 0; /* -l Listen for TCP/IP */ /* Defaults for configuration file elements */ @@ -41,7 +41,7 @@ Index: libvirt-0.7.5/daemon/libvirtd.c static int listen_tcp = 0; static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR; static char *tls_port = (char *) LIBVIRTD_TLS_PORT; -@@ -159,7 +159,7 @@ static int auth_tcp = REMOTE_AUTH_NONE; +@@ -157,7 +157,7 @@ static int auth_tcp = REMOTE_AUTH_NONE; #endif static int auth_tls = REMOTE_AUTH_NONE; diff --git a/migrate-params.patch b/migrate-params.patch index 70585c9..2720c04 100644 --- a/migrate-params.patch +++ b/migrate-params.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.5/src/xen/xend_internal.c +Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.5.orig/src/xen/xend_internal.c -+++ libvirt-0.7.5/src/xen/xend_internal.c -@@ -4559,6 +4559,8 @@ xenDaemonDomainMigratePerform (virDomain +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -4517,6 +4517,8 @@ xenDaemonDomainMigratePerform (virDomain "node", "-1", "ssl", "0", "resource", "0", /* required, xend ignores it */ diff --git a/node-dev-free.patch b/node-dev-free.patch deleted file mode 100644 index e2700ee..0000000 --- a/node-dev-free.patch +++ /dev/null @@ -1,29 +0,0 @@ -This invalid free results in heap corruption. Some symptoms I saw -because of this were libvirtd crashing and virt-manager hanging -while trying to enumerate devices. ---- - src/node_device/node_device_driver.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -Index: libvirt-0.7.5/src/node_device/node_device_driver.c -=================================================================== ---- libvirt-0.7.5.orig/src/node_device/node_device_driver.c -+++ libvirt-0.7.5/src/node_device/node_device_driver.c -@@ -78,7 +78,7 @@ static int update_driver_name(virConnect - virNodeDeviceObjPtr dev) - { - char *driver_link = NULL; -- char *devpath; -+ char *devpath = NULL; - char *p; - int ret = -1; - -@@ -114,7 +114,7 @@ static int update_driver_name(virConnect - - cleanup: - VIR_FREE(driver_link); -- free(devpath); -+ VIR_FREE(devpath); - return ret; - } - #else diff --git a/snapshots.patch b/snapshots.patch index b6ba9da..72fd6de 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.5/include/libvirt/libvirt.h.in +Index: libvirt-0.7.4/include/libvirt/libvirt.h.in =================================================================== ---- libvirt-0.7.5.orig/include/libvirt/libvirt.h.in -+++ libvirt-0.7.5/include/libvirt/libvirt.h.in -@@ -621,6 +621,21 @@ int virDomainRestore +--- libvirt-0.7.4.orig/include/libvirt/libvirt.h.in ++++ libvirt-0.7.4/include/libvirt/libvirt.h.in +@@ -565,6 +565,21 @@ int virDomainRestore const char *from); /* @@ -24,11 +24,11 @@ Index: libvirt-0.7.5/include/libvirt/libvirt.h.in * Domain core dump */ int virDomainCoreDump (virDomainPtr domain, -Index: libvirt-0.7.5/src/libvirt.c +Index: libvirt-0.7.4/src/libvirt.c =================================================================== ---- libvirt-0.7.5.orig/src/libvirt.c -+++ libvirt-0.7.5/src/libvirt.c -@@ -2339,6 +2339,166 @@ error: +--- libvirt-0.7.4.orig/src/libvirt.c ++++ libvirt-0.7.4/src/libvirt.c +@@ -2281,6 +2281,166 @@ error: } /** @@ -195,10 +195,10 @@ Index: libvirt-0.7.5/src/libvirt.c * virDomainCoreDump: * @domain: a domain object * @to: path for the core file -Index: libvirt-0.7.5/src/driver.h +Index: libvirt-0.7.4/src/driver.h =================================================================== ---- libvirt-0.7.5.orig/src/driver.h -+++ libvirt-0.7.5/src/driver.h +--- libvirt-0.7.4.orig/src/driver.h ++++ libvirt-0.7.4/src/driver.h @@ -136,6 +136,21 @@ typedef int (*virDrvDomainRestore) (virConnectPtr conn, const char *from); @@ -221,10 +221,10 @@ Index: libvirt-0.7.5/src/driver.h (*virDrvDomainCoreDump) (virDomainPtr domain, const char *to, int flags); -@@ -448,6 +463,11 @@ struct _virDriver { +@@ -435,6 +450,11 @@ struct _virDriver { + virDrvConnectIsSecure isSecure; virDrvDomainIsActive domainIsActive; virDrvDomainIsPersistent domainIsPersistent; - virDrvCPUCompare cpuCompare; + virDrvDomainSnapshotCreate domainSnapshotCreate; + virDrvDomainSnapshotApply domainSnapshotApply; + virDrvDomainSnapshotDelete domainSnapshotDelete; @@ -233,10 +233,10 @@ Index: libvirt-0.7.5/src/driver.h }; typedef int -Index: libvirt-0.7.5/src/xen/xen_driver.c +Index: libvirt-0.7.4/src/xen/xen_driver.c =================================================================== ---- libvirt-0.7.5.orig/src/xen/xen_driver.c -+++ libvirt-0.7.5/src/xen/xen_driver.c +--- libvirt-0.7.4.orig/src/xen/xen_driver.c ++++ libvirt-0.7.4/src/xen/xen_driver.c @@ -1052,6 +1052,81 @@ xenUnifiedDomainRestore (virConnectPtr c } @@ -319,22 +319,22 @@ Index: libvirt-0.7.5/src/xen/xen_driver.c xenUnifiedDomainCoreDump (virDomainPtr dom, const char *to, int flags) { GET_PRIVATE(dom->conn); -@@ -1862,6 +1937,11 @@ static virDriver xenUnifiedDriver = { +@@ -1860,6 +1935,11 @@ static virDriver xenUnifiedDriver = { + xenUnifiedIsSecure, xenUnifiedDomainIsActive, xenUnifiedDomainisPersistent, - NULL, /* cpuCompare */ -+ xenUnifiedDomainSnapshotCreate, /* domainSnapshotCreate */ -+ xenUnifiedDomainSnapshotApply, /* domainSnapshotApply */ -+ xenUnifiedDomainSnapshotDelete, /* domainSnapshotDelete */ -+ xenUnifiedDomainNumOfSnapshots, /* domainNumOfSnapshots */ -+ xenUnifiedDomainListSnapshots, /* domainListSnapshots */ ++ xenUnifiedDomainSnapshotCreate, ++ xenUnifiedDomainSnapshotApply, ++ xenUnifiedDomainSnapshotDelete, ++ xenUnifiedDomainNumOfSnapshots, ++ xenUnifiedDomainListSnapshots, }; /** -Index: libvirt-0.7.5/src/xen/xen_driver.h +Index: libvirt-0.7.4/src/xen/xen_driver.h =================================================================== ---- libvirt-0.7.5.orig/src/xen/xen_driver.h -+++ libvirt-0.7.5/src/xen/xen_driver.h +--- libvirt-0.7.4.orig/src/xen/xen_driver.h ++++ libvirt-0.7.4/src/xen/xen_driver.h @@ -100,6 +100,11 @@ struct xenUnifiedDriver { virDrvDomainGetSchedulerType domainGetSchedulerType; virDrvDomainGetSchedulerParameters domainGetSchedulerParameters; @@ -347,10 +347,10 @@ Index: libvirt-0.7.5/src/xen/xen_driver.h }; typedef struct xenXMConfCache *xenXMConfCachePtr; -Index: libvirt-0.7.5/src/xen/xend_internal.c +Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.5.orig/src/xen/xend_internal.c -+++ libvirt-0.7.5/src/xen/xend_internal.c +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c @@ -53,6 +53,12 @@ #ifndef PROXY @@ -364,7 +364,7 @@ Index: libvirt-0.7.5/src/xen/xend_internal.c /* * The number of Xen scheduler parameters */ -@@ -3282,6 +3288,87 @@ xenDaemonDomainRestore(virConnectPtr con +@@ -3271,6 +3277,87 @@ xenDaemonDomainRestore(virConnectPtr con } return xend_op(conn, "", "op", "restore", "file", filename, NULL); } @@ -452,7 +452,7 @@ Index: libvirt-0.7.5/src/xen/xend_internal.c #endif /* !PROXY */ /** -@@ -5165,6 +5252,11 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -5123,6 +5210,11 @@ struct xenUnifiedDriver xenDaemonDriver xenDaemonGetSchedulerType, /* domainGetSchedulerType */ xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */ xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -464,10 +464,10 @@ Index: libvirt-0.7.5/src/xen/xend_internal.c }; /************************************************************************ -Index: libvirt-0.7.5/src/xen/proxy_internal.c +Index: libvirt-0.7.4/src/xen/proxy_internal.c =================================================================== ---- libvirt-0.7.5.orig/src/xen/proxy_internal.c -+++ libvirt-0.7.5/src/xen/proxy_internal.c +--- libvirt-0.7.4.orig/src/xen/proxy_internal.c ++++ libvirt-0.7.4/src/xen/proxy_internal.c @@ -83,6 +83,11 @@ struct xenUnifiedDriver xenProxyDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -480,11 +480,11 @@ Index: libvirt-0.7.5/src/xen/proxy_internal.c }; -Index: libvirt-0.7.5/src/xen/xen_hypervisor.c +Index: libvirt-0.7.4/src/xen/xen_hypervisor.c =================================================================== ---- libvirt-0.7.5.orig/src/xen/xen_hypervisor.c -+++ libvirt-0.7.5/src/xen/xen_hypervisor.c -@@ -800,6 +800,11 @@ struct xenUnifiedDriver xenHypervisorDri +--- libvirt-0.7.4.orig/src/xen/xen_hypervisor.c ++++ libvirt-0.7.4/src/xen/xen_hypervisor.c +@@ -750,6 +750,11 @@ struct xenUnifiedDriver xenHypervisorDri xenHypervisorGetSchedulerType, /* domainGetSchedulerType */ xenHypervisorGetSchedulerParameters, /* domainGetSchedulerParameters */ xenHypervisorSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -496,10 +496,10 @@ Index: libvirt-0.7.5/src/xen/xen_hypervisor.c }; #endif /* !PROXY */ -Index: libvirt-0.7.5/src/xen/xm_internal.c +Index: libvirt-0.7.4/src/xen/xm_internal.c =================================================================== ---- libvirt-0.7.5.orig/src/xen/xm_internal.c -+++ libvirt-0.7.5/src/xen/xm_internal.c +--- libvirt-0.7.4.orig/src/xen/xm_internal.c ++++ libvirt-0.7.4/src/xen/xm_internal.c @@ -116,6 +116,11 @@ struct xenUnifiedDriver xenXMDriver = { NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -512,10 +512,10 @@ Index: libvirt-0.7.5/src/xen/xm_internal.c }; #define xenXMError(conn, code, fmt...) \ -Index: libvirt-0.7.5/src/xen/xs_internal.c +Index: libvirt-0.7.4/src/xen/xs_internal.c =================================================================== ---- libvirt-0.7.5.orig/src/xen/xs_internal.c -+++ libvirt-0.7.5/src/xen/xs_internal.c +--- libvirt-0.7.4.orig/src/xen/xs_internal.c ++++ libvirt-0.7.4/src/xen/xs_internal.c @@ -83,6 +83,11 @@ struct xenUnifiedDriver xenStoreDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -528,11 +528,11 @@ Index: libvirt-0.7.5/src/xen/xs_internal.c }; #endif /* ! PROXY */ -Index: libvirt-0.7.5/tools/virsh.c +Index: libvirt-0.7.4/tools/virsh.c =================================================================== ---- libvirt-0.7.5.orig/tools/virsh.c -+++ libvirt-0.7.5/tools/virsh.c -@@ -1233,6 +1233,188 @@ cmdSave(vshControl *ctl, const vshCmd *c +--- libvirt-0.7.4.orig/tools/virsh.c ++++ libvirt-0.7.4/tools/virsh.c +@@ -1179,6 +1179,188 @@ cmdSave(vshControl *ctl, const vshCmd *c } /* @@ -721,7 +721,7 @@ Index: libvirt-0.7.5/tools/virsh.c * "schedinfo" command */ static const vshCmdInfo info_schedinfo[] = { -@@ -7431,6 +7613,12 @@ static const vshCmdDef commands[] = { +@@ -7298,6 +7480,12 @@ static const vshCmdDef commands[] = { {"undefine", cmdUndefine, opts_undefine, info_undefine}, {"uri", cmdURI, NULL, info_uri}, @@ -734,14 +734,14 @@ Index: libvirt-0.7.5/tools/virsh.c {"vol-create", cmdVolCreate, opts_vol_create, info_vol_create}, {"vol-create-from", cmdVolCreateFrom, opts_vol_create_from, info_vol_create_from}, {"vol-create-as", cmdVolCreateAs, opts_vol_create_as, info_vol_create_as}, -Index: libvirt-0.7.5/src/lxc/lxc_driver.c +Index: libvirt-0.7.4/src/lxc/lxc_driver.c =================================================================== ---- libvirt-0.7.5.orig/src/lxc/lxc_driver.c -+++ libvirt-0.7.5/src/lxc/lxc_driver.c -@@ -2456,6 +2456,11 @@ static virDriver lxcDriver = { +--- libvirt-0.7.4.orig/src/lxc/lxc_driver.c ++++ libvirt-0.7.4/src/lxc/lxc_driver.c +@@ -2404,6 +2404,11 @@ static virDriver lxcDriver = { + lxcIsSecure, lxcDomainIsActive, lxcDomainIsPersistent, - NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -750,14 +750,14 @@ Index: libvirt-0.7.5/src/lxc/lxc_driver.c }; static virStateDriver lxcStateDriver = { -Index: libvirt-0.7.5/src/openvz/openvz_driver.c +Index: libvirt-0.7.4/src/openvz/openvz_driver.c =================================================================== ---- libvirt-0.7.5.orig/src/openvz/openvz_driver.c -+++ libvirt-0.7.5/src/openvz/openvz_driver.c -@@ -1535,6 +1535,11 @@ static virDriver openvzDriver = { +--- libvirt-0.7.4.orig/src/openvz/openvz_driver.c ++++ libvirt-0.7.4/src/openvz/openvz_driver.c +@@ -1534,6 +1534,11 @@ static virDriver openvzDriver = { + openvzIsSecure, openvzDomainIsActive, openvzDomainIsPersistent, - NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -766,14 +766,14 @@ Index: libvirt-0.7.5/src/openvz/openvz_driver.c }; int openvzRegister(void) { -Index: libvirt-0.7.5/src/qemu/qemu_driver.c +Index: libvirt-0.7.4/src/qemu/qemu_driver.c =================================================================== ---- libvirt-0.7.5.orig/src/qemu/qemu_driver.c -+++ libvirt-0.7.5/src/qemu/qemu_driver.c -@@ -7990,6 +7990,11 @@ static virDriver qemuDriver = { +--- libvirt-0.7.4.orig/src/qemu/qemu_driver.c ++++ libvirt-0.7.4/src/qemu/qemu_driver.c +@@ -7559,6 +7559,11 @@ static virDriver qemuDriver = { + qemuIsSecure, qemuDomainIsActive, qemuDomainIsPersistent, - qemuCPUCompare, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -782,14 +782,14 @@ Index: libvirt-0.7.5/src/qemu/qemu_driver.c }; -Index: libvirt-0.7.5/src/esx/esx_driver.c +Index: libvirt-0.7.4/src/esx/esx_driver.c =================================================================== ---- libvirt-0.7.5.orig/src/esx/esx_driver.c -+++ libvirt-0.7.5/src/esx/esx_driver.c -@@ -3455,6 +3455,11 @@ static virDriver esxDriver = { +--- libvirt-0.7.4.orig/src/esx/esx_driver.c ++++ libvirt-0.7.4/src/esx/esx_driver.c +@@ -3425,6 +3425,11 @@ static virDriver esxDriver = { + esxIsSecure, /* isSecure */ esxDomainIsActive, /* domainIsActive */ esxDomainIsPersistent, /* domainIsPersistent */ - NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -798,14 +798,14 @@ Index: libvirt-0.7.5/src/esx/esx_driver.c }; -Index: libvirt-0.7.5/src/test/test_driver.c +Index: libvirt-0.7.4/src/test/test_driver.c =================================================================== ---- libvirt-0.7.5.orig/src/test/test_driver.c -+++ libvirt-0.7.5/src/test/test_driver.c -@@ -5238,6 +5238,11 @@ static virDriver testDriver = { +--- libvirt-0.7.4.orig/src/test/test_driver.c ++++ libvirt-0.7.4/src/test/test_driver.c +@@ -5233,6 +5233,11 @@ static virDriver testDriver = { + testIsSecure, /* isEncrypted */ testDomainIsActive, /* domainIsActive */ testDomainIsPersistent, /* domainIsPersistent */ - NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -814,14 +814,14 @@ Index: libvirt-0.7.5/src/test/test_driver.c }; static virNetworkDriver testNetworkDriver = { -Index: libvirt-0.7.5/src/uml/uml_driver.c +Index: libvirt-0.7.4/src/uml/uml_driver.c =================================================================== ---- libvirt-0.7.5.orig/src/uml/uml_driver.c -+++ libvirt-0.7.5/src/uml/uml_driver.c -@@ -1924,6 +1924,11 @@ static virDriver umlDriver = { +--- libvirt-0.7.4.orig/src/uml/uml_driver.c ++++ libvirt-0.7.4/src/uml/uml_driver.c +@@ -1888,6 +1888,11 @@ static virDriver umlDriver = { + umlIsSecure, umlDomainIsActive, umlDomainIsPersistent, - NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -830,14 +830,14 @@ Index: libvirt-0.7.5/src/uml/uml_driver.c }; -Index: libvirt-0.7.5/src/vbox/vbox_tmpl.c +Index: libvirt-0.7.4/src/vbox/vbox_tmpl.c =================================================================== ---- libvirt-0.7.5.orig/src/vbox/vbox_tmpl.c -+++ libvirt-0.7.5/src/vbox/vbox_tmpl.c -@@ -7051,6 +7051,11 @@ virDriver NAME(Driver) = { +--- libvirt-0.7.4.orig/src/vbox/vbox_tmpl.c ++++ libvirt-0.7.4/src/vbox/vbox_tmpl.c +@@ -6571,6 +6571,11 @@ virDriver NAME(Driver) = { + vboxIsSecure, vboxDomainIsActive, vboxDomainIsPersistent, - NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -846,14 +846,14 @@ Index: libvirt-0.7.5/src/vbox/vbox_tmpl.c }; virNetworkDriver NAME(NetworkDriver) = { -Index: libvirt-0.7.5/src/opennebula/one_driver.c +Index: libvirt-0.7.4/src/opennebula/one_driver.c =================================================================== ---- libvirt-0.7.5.orig/src/opennebula/one_driver.c -+++ libvirt-0.7.5/src/opennebula/one_driver.c -@@ -783,6 +783,11 @@ static virDriver oneDriver = { +--- libvirt-0.7.4.orig/src/opennebula/one_driver.c ++++ libvirt-0.7.4/src/opennebula/one_driver.c +@@ -781,6 +781,11 @@ static virDriver oneDriver = { + oneIsSecure, NULL, /* domainIsActive */ NULL, /* domainIsPersistent */ - NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -862,14 +862,14 @@ Index: libvirt-0.7.5/src/opennebula/one_driver.c }; static virStateDriver oneStateDriver = { -Index: libvirt-0.7.5/src/phyp/phyp_driver.c +Index: libvirt-0.7.4/src/phyp/phyp_driver.c =================================================================== ---- libvirt-0.7.5.orig/src/phyp/phyp_driver.c -+++ libvirt-0.7.5/src/phyp/phyp_driver.c -@@ -1651,6 +1651,11 @@ virDriver phypDriver = { +--- libvirt-0.7.4.orig/src/phyp/phyp_driver.c ++++ libvirt-0.7.4/src/phyp/phyp_driver.c +@@ -1650,6 +1650,11 @@ virDriver phypDriver = { + phypIsSecure, NULL, /* domainIsActive */ NULL, /* domainIsPersistent */ - NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -878,14 +878,14 @@ Index: libvirt-0.7.5/src/phyp/phyp_driver.c }; int -Index: libvirt-0.7.5/src/remote/remote_driver.c +Index: libvirt-0.7.4/src/remote/remote_driver.c =================================================================== ---- libvirt-0.7.5.orig/src/remote/remote_driver.c -+++ libvirt-0.7.5/src/remote/remote_driver.c -@@ -8940,6 +8940,11 @@ static virDriver remote_driver = { +--- libvirt-0.7.4.orig/src/remote/remote_driver.c ++++ libvirt-0.7.4/src/remote/remote_driver.c +@@ -8847,6 +8847,11 @@ static virDriver remote_driver = { + remoteIsSecure, /* isSecure */ remoteDomainIsActive, /* domainIsActive */ remoteDomainIsPersistent, /* domainIsPersistent */ - remoteCPUCompare, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -894,11 +894,11 @@ Index: libvirt-0.7.5/src/remote/remote_driver.c }; static virNetworkDriver network_driver = { -Index: libvirt-0.7.5/docs/libvirt-api.xml +Index: libvirt-0.7.4/docs/libvirt-api.xml =================================================================== ---- libvirt-0.7.5.orig/docs/libvirt-api.xml -+++ libvirt-0.7.5/docs/libvirt-api.xml -@@ -293,6 +293,11 @@ +--- libvirt-0.7.4.orig/docs/libvirt-api.xml ++++ libvirt-0.7.4/docs/libvirt-api.xml +@@ -271,6 +271,11 @@ @@ -910,7 +910,7 @@ Index: libvirt-0.7.5/docs/libvirt-api.xml -@@ -1972,6 +1977,36 @@ This function may requires privileged ac +@@ -1878,6 +1883,36 @@ This function may requires privileged ac @@ -947,10 +947,10 @@ Index: libvirt-0.7.5/docs/libvirt-api.xml -Index: libvirt-0.7.5/src/libvirt_public.syms +Index: libvirt-0.7.4/src/libvirt_public.syms =================================================================== ---- libvirt-0.7.5.orig/src/libvirt_public.syms -+++ libvirt-0.7.5/src/libvirt_public.syms +--- libvirt-0.7.4.orig/src/libvirt_public.syms ++++ libvirt-0.7.4/src/libvirt_public.syms @@ -215,6 +215,11 @@ LIBVIRT_0.4.2 { LIBVIRT_0.4.5 { global: @@ -963,11 +963,11 @@ Index: libvirt-0.7.5/src/libvirt_public.syms } LIBVIRT_0.4.2; LIBVIRT_0.5.0 { -Index: libvirt-0.7.5/python/generator.py +Index: libvirt-0.7.4/python/generator.py =================================================================== ---- libvirt-0.7.5.orig/python/generator.py -+++ libvirt-0.7.5/python/generator.py -@@ -288,6 +288,7 @@ skip_impl = ( +--- libvirt-0.7.4.orig/python/generator.py ++++ libvirt-0.7.4/python/generator.py +@@ -287,6 +287,7 @@ skip_impl = ( 'virDomainSetSchedulerParameters', 'virDomainGetVcpus', 'virDomainPinVcpu', @@ -975,11 +975,11 @@ Index: libvirt-0.7.5/python/generator.py 'virSecretGetValue', 'virSecretSetValue', 'virSecretGetUUID', -Index: libvirt-0.7.5/python/libvirt-override.c +Index: libvirt-0.7.4/python/libvirt-override.c =================================================================== ---- libvirt-0.7.5.orig/python/libvirt-override.c -+++ libvirt-0.7.5/python/libvirt-override.c -@@ -1516,6 +1516,34 @@ libvirt_virStoragePoolGetInfo(PyObject * +--- libvirt-0.7.4.orig/python/libvirt-override.c ++++ libvirt-0.7.4/python/libvirt-override.c +@@ -1400,6 +1400,34 @@ libvirt_virStoragePoolGetInfo(PyObject * return(py_retval); } @@ -1014,7 +1014,7 @@ Index: libvirt-0.7.5/python/libvirt-override.c static PyObject * libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -@@ -2690,6 +2718,7 @@ static PyMethodDef libvirtMethods[] = { +@@ -2557,6 +2585,7 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL}, {(char *) "virStoragePoolListVolumes", libvirt_virStoragePoolListVolumes, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetInfo", libvirt_virStoragePoolGetInfo, METH_VARARGS, NULL}, @@ -1022,11 +1022,11 @@ Index: libvirt-0.7.5/python/libvirt-override.c {(char *) "virStorageVolGetInfo", libvirt_virStorageVolGetInfo, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetUUID", libvirt_virStoragePoolGetUUID, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetUUIDString", libvirt_virStoragePoolGetUUIDString, METH_VARARGS, NULL}, -Index: libvirt-0.7.5/python/libvirt-override-api.xml +Index: libvirt-0.7.4/python/libvirt-override-api.xml =================================================================== ---- libvirt-0.7.5.orig/python/libvirt-override-api.xml -+++ libvirt-0.7.5/python/libvirt-override-api.xml -@@ -145,6 +145,11 @@ +--- libvirt-0.7.4.orig/python/libvirt-override-api.xml ++++ libvirt-0.7.4/python/libvirt-override-api.xml +@@ -140,6 +140,11 @@ @@ -1038,10 +1038,10 @@ Index: libvirt-0.7.5/python/libvirt-override-api.xml list the storage pools, stores the pointers to the names in @names -Index: libvirt-0.7.5/src/xen/xen_inotify.c +Index: libvirt-0.7.4/src/xen/xen_inotify.c =================================================================== ---- libvirt-0.7.5.orig/src/xen/xen_inotify.c -+++ libvirt-0.7.5/src/xen/xen_inotify.c +--- libvirt-0.7.4.orig/src/xen/xen_inotify.c ++++ libvirt-0.7.4/src/xen/xen_inotify.c @@ -86,6 +86,11 @@ struct xenUnifiedDriver xenInotifyDriver NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ diff --git a/suse-network.patch b/suse-network.patch index e9630f7..5a1146c 100644 --- a/suse-network.patch +++ b/suse-network.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.5/src/conf/network_conf.c +Index: libvirt-0.7.4/src/conf/network_conf.c =================================================================== ---- libvirt-0.7.5.orig/src/conf/network_conf.c -+++ libvirt-0.7.5/src/conf/network_conf.c -@@ -863,6 +863,137 @@ error: +--- libvirt-0.7.4.orig/src/conf/network_conf.c ++++ libvirt-0.7.4/src/conf/network_conf.c +@@ -865,6 +865,137 @@ error: return NULL; } @@ -140,7 +140,7 @@ Index: libvirt-0.7.5/src/conf/network_conf.c int virNetworkLoadAllConfigs(virConnectPtr conn, virNetworkObjListPtr nets, const char *configDir, -@@ -902,6 +1033,7 @@ int virNetworkLoadAllConfigs(virConnectP +@@ -904,6 +1035,7 @@ int virNetworkLoadAllConfigs(virConnectP closedir(dir); @@ -148,10 +148,10 @@ Index: libvirt-0.7.5/src/conf/network_conf.c return 0; } -Index: libvirt-0.7.5/src/conf/network_conf.h +Index: libvirt-0.7.4/src/conf/network_conf.h =================================================================== ---- libvirt-0.7.5.orig/src/conf/network_conf.h -+++ libvirt-0.7.5/src/conf/network_conf.h +--- libvirt-0.7.4.orig/src/conf/network_conf.h ++++ libvirt-0.7.4/src/conf/network_conf.h @@ -94,6 +94,7 @@ struct _virNetworkObj { unsigned int active : 1; unsigned int autostart : 1; @@ -160,11 +160,11 @@ Index: libvirt-0.7.5/src/conf/network_conf.h virNetworkDefPtr def; /* The current definition */ virNetworkDefPtr newDef; /* New definition to activate at shutdown */ -Index: libvirt-0.7.5/src/network/bridge_driver.c +Index: libvirt-0.7.4/src/network/bridge_driver.c =================================================================== ---- libvirt-0.7.5.orig/src/network/bridge_driver.c -+++ libvirt-0.7.5/src/network/bridge_driver.c -@@ -1010,6 +1010,11 @@ static int networkShutdownNetworkDaemon( +--- libvirt-0.7.4.orig/src/network/bridge_driver.c ++++ libvirt-0.7.4/src/network/bridge_driver.c +@@ -994,6 +994,11 @@ static int networkShutdownNetworkDaemon( unlink(stateFile); VIR_FREE(stateFile); @@ -176,7 +176,7 @@ Index: libvirt-0.7.5/src/network/bridge_driver.c if (network->dnsmasqPid > 0) kill(network->dnsmasqPid, SIGTERM); -@@ -1510,6 +1515,12 @@ static int networkSetAutostart(virNetwor +@@ -1494,6 +1499,12 @@ static int networkSetAutostart(virNetwor goto cleanup; } diff --git a/xen-list-defined.patch b/xen-list-defined.patch new file mode 100644 index 0000000..8b5cc01 --- /dev/null +++ b/xen-list-defined.patch @@ -0,0 +1,36 @@ +commit 7cfbb17978c467625afab866b7a22119789abee0 +Author: Matthias Bolte +Date: Thu Nov 26 00:09:40 2009 +0100 + + xen: Fix unconditional freeing in xenDaemonListDefinedDomains() + + Commit 790f0b3057787bb64da8c46c111ff8d3eff7b2af causes the contents of + the names array to be freed even on success, resulting in no listing of + defined but inactive Xen domains. + + Spotted by Jim Fehlig + +diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c +index e370eb8..4d9dcd1 100644 +--- a/src/xen/xend_internal.c ++++ b/src/xen/xend_internal.c +@@ -4696,12 +4696,17 @@ xenDaemonListDefinedDomains(virConnectPtr conn, char **const names, int maxnames + break; + } + ++cleanup: ++ sexpr_free(root); ++ return(ret); ++ + error: + for (i = 0; i < ret; ++i) + VIR_FREE(names[i]); + +- sexpr_free(root); +- return(ret); ++ ret = -1; ++ ++ goto cleanup; + } + + /** diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index b174db7..87e6ca6 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.5/src/xen/xend_internal.c +Index: libvirt-0.7.4/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.5.orig/src/xen/xend_internal.c -+++ libvirt-0.7.5/src/xen/xend_internal.c -@@ -5409,7 +5409,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -5365,7 +5365,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else { diff --git a/xen-shr-pages.patch b/xen-shr-pages.patch deleted file mode 100644 index ed5afb9..0000000 --- a/xen-shr-pages.patch +++ /dev/null @@ -1,248 +0,0 @@ -Index: libvirt-0.7.5/src/xen/xen_hypervisor.c -=================================================================== ---- libvirt-0.7.5.orig/src/xen/xen_hypervisor.c -+++ libvirt-0.7.5/src/xen/xen_hypervisor.c -@@ -215,10 +215,26 @@ struct xen_v2d5_getdomaininfo { - }; - typedef struct xen_v2d5_getdomaininfo xen_v2d5_getdomaininfo; - -+struct xen_v2d6_getdomaininfo { -+ domid_t domain; /* the domain number */ -+ uint32_t flags; /* flags, see before */ -+ uint64_t tot_pages ALIGN_64; /* total number of pages used */ -+ uint64_t max_pages ALIGN_64; /* maximum number of pages allowed */ -+ uint64_t shr_pages ALIGN_64; /* number of shared pages */ -+ uint64_t shared_info_frame ALIGN_64; /* MFN of shared_info struct */ -+ uint64_t cpu_time ALIGN_64; /* CPU time used */ -+ uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */ -+ uint32_t max_vcpu_id; /* Maximum VCPUID in use by this domain. */ -+ uint32_t ssidref; -+ xen_domain_handle_t handle; -+}; -+typedef struct xen_v2d6_getdomaininfo xen_v2d6_getdomaininfo; -+ - union xen_getdomaininfo { - struct xen_v0_getdomaininfo v0; - struct xen_v2_getdomaininfo v2; - struct xen_v2d5_getdomaininfo v2d5; -+ struct xen_v2d6_getdomaininfo v2d6; - }; - typedef union xen_getdomaininfo xen_getdomaininfo; - -@@ -226,6 +242,7 @@ union xen_getdomaininfolist { - struct xen_v0_getdomaininfo *v0; - struct xen_v2_getdomaininfo *v2; - struct xen_v2d5_getdomaininfo *v2d5; -+ struct xen_v2d6_getdomaininfo *v2d6; - }; - typedef union xen_getdomaininfolist xen_getdomaininfolist; - -@@ -263,114 +280,147 @@ typedef struct xen_v2s5_availheap xen_v - #define XEN_GETDOMAININFOLIST_ALLOC(domlist, size) \ - (hypervisor_version < 2 ? \ - (VIR_ALLOC_N(domlist.v0, (size)) == 0) : \ -- (dom_interface_version < 5 ? \ -- (VIR_ALLOC_N(domlist.v2, (size)) == 0) : \ -- (VIR_ALLOC_N(domlist.v2d5, (size)) == 0))) -+ (dom_interface_version >= 6 ? \ -+ (VIR_ALLOC_N(domlist.v2d6, (size)) == 0) : \ -+ (dom_interface_version == 5 ? \ -+ (VIR_ALLOC_N(domlist.v2d5, (size)) == 0) : \ -+ (VIR_ALLOC_N(domlist.v2, (size)) == 0)))) - - #define XEN_GETDOMAININFOLIST_FREE(domlist) \ - (hypervisor_version < 2 ? \ - VIR_FREE(domlist.v0) : \ -- (dom_interface_version < 5 ? \ -- VIR_FREE(domlist.v2) : \ -- VIR_FREE(domlist.v2d5))) -+ (dom_interface_version >= 6 ? \ -+ VIR_FREE(domlist.v2d6) : \ -+ (dom_interface_version == 5 ? \ -+ VIR_FREE(domlist.v2d5) : \ -+ VIR_FREE(domlist.v2)))) - - #define XEN_GETDOMAININFOLIST_CLEAR(domlist, size) \ - (hypervisor_version < 2 ? \ - memset(domlist.v0, 0, sizeof(*domlist.v0) * size) : \ -- (dom_interface_version < 5 ? \ -- memset(domlist.v2, 0, sizeof(*domlist.v2) * size) : \ -- memset(domlist.v2d5, 0, sizeof(*domlist.v2d5) * size))) -+ (dom_interface_version >= 6 ? \ -+ memset(domlist.v2d6, 0, sizeof(*domlist.v2d6) * size) : \ -+ (dom_interface_version == 5 ? \ -+ memset(domlist.v2d5, 0, sizeof(*domlist.v2d5) * size) : \ -+ memset(domlist.v2, 0, sizeof(*domlist.v2) * size)))) - - #define XEN_GETDOMAININFOLIST_DOMAIN(domlist, n) \ - (hypervisor_version < 2 ? \ - domlist.v0[n].domain : \ -- (dom_interface_version < 5 ? \ -- domlist.v2[n].domain : \ -- domlist.v2d5[n].domain)) -+ (dom_interface_version >= 6 ? \ -+ domlist.v2d6[n].domain : \ -+ (dom_interface_version == 5 ? \ -+ domlist.v2d5[n].domain : \ -+ domlist.v2[n].domain))) - - #define XEN_GETDOMAININFOLIST_UUID(domlist, n) \ - (hypervisor_version < 2 ? \ - domlist.v0[n].handle : \ -- (dom_interface_version < 5 ? \ -- domlist.v2[n].handle : \ -- domlist.v2d5[n].handle)) -+ (dom_interface_version >= 6 ? \ -+ domlist.v2d6[n].handle : \ -+ (dom_interface_version == 5 ? \ -+ domlist.v2d5[n].handle : \ -+ domlist.v2[n].handle))) - - #define XEN_GETDOMAININFOLIST_DATA(domlist) \ - (hypervisor_version < 2 ? \ - (void*)(domlist->v0) : \ -- (dom_interface_version < 5 ? \ -- (void*)(domlist->v2) : \ -- (void*)(domlist->v2d5))) -+ (dom_interface_version >= 6 ? \ -+ (void*)(domlist->v2d6) : \ -+ (dom_interface_version == 5 ? \ -+ (void*)(domlist->v2d5) : \ -+ (void*)(domlist->v2)))) - - #define XEN_GETDOMAININFO_SIZE \ - (hypervisor_version < 2 ? \ - sizeof(xen_v0_getdomaininfo) : \ -- (dom_interface_version < 5 ? \ -- sizeof(xen_v2_getdomaininfo) : \ -- sizeof(xen_v2d5_getdomaininfo))) -+ (dom_interface_version >= 6 ? \ -+ sizeof(xen_v2d6_getdomaininfo) : \ -+ (dom_interface_version == 5 ? \ -+ sizeof(xen_v2d5_getdomaininfo) : \ -+ sizeof(xen_v2_getdomaininfo)))) - - #define XEN_GETDOMAININFO_CLEAR(dominfo) \ - (hypervisor_version < 2 ? \ - memset(&(dominfo.v0), 0, sizeof(xen_v0_getdomaininfo)) : \ -- (dom_interface_version < 5 ? \ -- memset(&(dominfo.v2), 0, sizeof(xen_v2_getdomaininfo)) : \ -- memset(&(dominfo.v2d5), 0, sizeof(xen_v2d5_getdomaininfo)))) -+ (dom_interface_version >= 6 ? \ -+ memset(&(dominfo.v2d6), 0, sizeof(xen_v2d6_getdomaininfo)) : \ -+ (dom_interface_version == 5 ? \ -+ memset(&(dominfo.v2d5), 0, sizeof(xen_v2d5_getdomaininfo)) : \ -+ memset(&(dominfo.v2), 0, sizeof(xen_v2_getdomaininfo))))) - - #define XEN_GETDOMAININFO_DOMAIN(dominfo) \ - (hypervisor_version < 2 ? \ - dominfo.v0.domain : \ -- (dom_interface_version < 5 ? \ -- dominfo.v2.domain : \ -- dominfo.v2d5.domain)) -+ (dom_interface_version >= 6 ? \ -+ dominfo.v2d6.domain : \ -+ (dom_interface_version == 5 ? \ -+ dominfo.v2d5.domain : \ -+ dominfo.v2.domain))) - - #define XEN_GETDOMAININFO_CPUTIME(dominfo) \ - (hypervisor_version < 2 ? \ - dominfo.v0.cpu_time : \ -- (dom_interface_version < 5 ? \ -- dominfo.v2.cpu_time : \ -- dominfo.v2d5.cpu_time)) -+ (dom_interface_version >= 6 ? \ -+ dominfo.v2d6.cpu_time : \ -+ (dom_interface_version == 5 ? \ -+ dominfo.v2d5.cpu_time : \ -+ dominfo.v2.cpu_time))) -+ - - #define XEN_GETDOMAININFO_CPUCOUNT(dominfo) \ - (hypervisor_version < 2 ? \ - dominfo.v0.nr_online_vcpus : \ -- (dom_interface_version < 5 ? \ -- dominfo.v2.nr_online_vcpus : \ -- dominfo.v2d5.nr_online_vcpus)) -+ (dom_interface_version >= 6 ? \ -+ dominfo.v2d6.nr_online_vcpus : \ -+ (dom_interface_version == 5 ? \ -+ dominfo.v2d5.nr_online_vcpus : \ -+ dominfo.v2.nr_online_vcpus))) - - #define XEN_GETDOMAININFO_MAXCPUID(dominfo) \ - (hypervisor_version < 2 ? \ - dominfo.v0.max_vcpu_id : \ -- (dom_interface_version < 5 ? \ -- dominfo.v2.max_vcpu_id : \ -- dominfo.v2d5.max_vcpu_id)) -+ (dom_interface_version >= 6 ? \ -+ dominfo.v2d6.max_vcpu_id : \ -+ (dom_interface_version == 5 ? \ -+ dominfo.v2d5.max_vcpu_id : \ -+ dominfo.v2.max_vcpu_id))) - - #define XEN_GETDOMAININFO_FLAGS(dominfo) \ - (hypervisor_version < 2 ? \ - dominfo.v0.flags : \ -- (dom_interface_version < 5 ? \ -- dominfo.v2.flags : \ -- dominfo.v2d5.flags)) -+ (dom_interface_version >= 6 ? \ -+ dominfo.v2d6.flags : \ -+ (dom_interface_version == 5 ? \ -+ dominfo.v2d5.flags : \ -+ dominfo.v2.flags))) - - #define XEN_GETDOMAININFO_TOT_PAGES(dominfo) \ - (hypervisor_version < 2 ? \ - dominfo.v0.tot_pages : \ -- (dom_interface_version < 5 ? \ -- dominfo.v2.tot_pages : \ -- dominfo.v2d5.tot_pages)) -+ (dom_interface_version >= 6 ? \ -+ dominfo.v2d6.tot_pages : \ -+ (dom_interface_version == 5 ? \ -+ dominfo.v2d5.tot_pages : \ -+ dominfo.v2.tot_pages))) - - #define XEN_GETDOMAININFO_MAX_PAGES(dominfo) \ - (hypervisor_version < 2 ? \ - dominfo.v0.max_pages : \ -- (dom_interface_version < 5 ? \ -- dominfo.v2.max_pages : \ -- dominfo.v2d5.max_pages)) -+ (dom_interface_version >= 6 ? \ -+ dominfo.v2d6.max_pages : \ -+ (dom_interface_version == 5 ? \ -+ dominfo.v2d5.max_pages : \ -+ dominfo.v2.max_pages))) - - #define XEN_GETDOMAININFO_UUID(dominfo) \ - (hypervisor_version < 2 ? \ - dominfo.v0.handle : \ -- (dom_interface_version < 5 ? \ -- dominfo.v2.handle : \ -- dominfo.v2d5.handle)) -+ (dom_interface_version >= 6 ? \ -+ dominfo.v2d6.handle : \ -+ (dom_interface_version == 5 ? \ -+ dominfo.v2d5.handle : \ -+ dominfo.v2.handle))) - - - static int -@@ -2050,6 +2100,12 @@ xenHypervisorInit(void) - DEBUG0("Using hypervisor call v2, sys ver6 dom ver5\n"); - goto done; - } -+ /* Xen 4.0 */ -+ dom_interface_version = 6; /* XEN_DOMCTL_INTERFACE_VERSION */ -+ if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){ -+ DEBUG0("Using hypervisor call v2, sys ver6 dom ver6\n"); -+ goto done; -+ } - } - - hypervisor_version = 1; diff --git a/xend-description-tag.patch b/xend-description-tag.patch new file mode 100644 index 0000000..cd0ef24 --- /dev/null +++ b/xend-description-tag.patch @@ -0,0 +1,36 @@ +From acba9b620128c4dcdbb95a1ea06604f3013a0518 Mon Sep 17 00:00:00 2001 +From: Jim Fehlig +Date: Mon, 7 Dec 2009 14:24:21 -0700 +Subject: [PATCH] Plumb domain description tag in xend backend + +xen-unstable changesets 20321 and 20521 added support for +description in xend domain config. This patch extends that +support in xend backend. +--- + src/xen/xend_internal.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +Index: libvirt-0.7.4/src/xen/xend_internal.c +=================================================================== +--- libvirt-0.7.4.orig/src/xen/xend_internal.c ++++ libvirt-0.7.4/src/xen/xend_internal.c +@@ -2360,6 +2360,9 @@ xenDaemonParseSxpr(virConnectPtr conn, + } + virUUIDParse(tmp, def->uuid); + ++ if (sexpr_node_copy(root, "domain/description", &def->description) < 0) ++ goto no_memory; ++ + hvm = sexpr_lookup(root, "domain/image/hvm") ? 1 : 0; + if (!hvm) { + if (sexpr_node_copy(root, "domain/bootloader", +@@ -5676,6 +5679,9 @@ xenDaemonFormatSxpr(virConnectPtr conn, + virUUIDFormat(def->uuid, uuidstr); + virBufferVSprintf(&buf, "(uuid '%s')", uuidstr); + ++ if (def->description) ++ virBufferVSprintf(&buf, "(description '%s')", def->description); ++ + if (def->os.bootloader) { + if (def->os.bootloader[0]) + virBufferVSprintf(&buf, "(bootloader '%s')", def->os.bootloader); From f6a13ec8ddbf04434a7cc85c581d16636e9938edee1f65bc64db739e540fec5b Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Fri, 8 Jan 2010 00:37:05 +0000 Subject: [PATCH 8/8] Updating link to change in openSUSE:Factory/libvirt revision 47.0 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=9730892990ebb1adac0309ca98451aa5 --- detach-disk.patch | 20 +-- libvirt-0.7.4.tar.bz2 | 3 - libvirt-0.7.5.tar.bz2 | 3 + libvirt.changes | 28 ++++ libvirt.spec | 328 +++++++++++++++++++++++++++---------- libvirtd-defaults.patch | 16 +- migrate-params.patch | 8 +- node-dev-free.patch | 29 ++++ snapshots.patch | 246 ++++++++++++++-------------- suse-network.patch | 26 +-- xen-list-defined.patch | 36 ---- xen-pv-cdrom.patch | 8 +- xen-shr-pages.patch | 248 ++++++++++++++++++++++++++++ xend-description-tag.patch | 36 ---- 14 files changed, 714 insertions(+), 321 deletions(-) delete mode 100644 libvirt-0.7.4.tar.bz2 create mode 100644 libvirt-0.7.5.tar.bz2 create mode 100644 node-dev-free.patch delete mode 100644 xen-list-defined.patch create mode 100644 xen-shr-pages.patch delete mode 100644 xend-description-tag.patch diff --git a/detach-disk.patch b/detach-disk.patch index c70c688..5ae9775 100644 --- a/detach-disk.patch +++ b/detach-disk.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/src/xen/xend_internal.c +Index: libvirt-0.7.5/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -4109,13 +4109,12 @@ xenDaemonAttachDevice(virDomainPtr domai +--- libvirt-0.7.5.orig/src/xen/xend_internal.c ++++ libvirt-0.7.5/src/xen/xend_internal.c +@@ -4123,13 +4123,12 @@ xenDaemonAttachDevice(virDomainPtr domai priv = (xenUnifiedPrivatePtr) domain->conn->privateData; @@ -21,7 +21,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c if (!(def = xenDaemonDomainFetch(domain->conn, domain->id, domain->name, -@@ -4213,12 +4212,11 @@ xenDaemonDetachDevice(virDomainPtr domai +@@ -4229,12 +4228,11 @@ xenDaemonDetachDevice(virDomainPtr domai priv = (xenUnifiedPrivatePtr) domain->conn->privateData; @@ -38,11 +38,11 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c if (!(def = xenDaemonDomainFetch(domain->conn, domain->id, -Index: libvirt-0.7.4/src/libvirt.c +Index: libvirt-0.7.5/src/libvirt.c =================================================================== ---- libvirt-0.7.4.orig/src/libvirt.c -+++ libvirt-0.7.4/src/libvirt.c -@@ -4919,7 +4919,8 @@ error: +--- libvirt-0.7.5.orig/src/libvirt.c ++++ libvirt-0.7.5/src/libvirt.c +@@ -5066,7 +5066,8 @@ error: * @domain: pointer to domain object * @xml: pointer to XML description of one device * @@ -52,7 +52,7 @@ Index: libvirt-0.7.4/src/libvirt.c * * Returns 0 in case of success, -1 in case of failure. */ -@@ -4962,7 +4963,8 @@ error: +@@ -5109,7 +5110,8 @@ error: * @domain: pointer to domain object * @xml: pointer to XML description of one device * diff --git a/libvirt-0.7.4.tar.bz2 b/libvirt-0.7.4.tar.bz2 deleted file mode 100644 index c5fa49f..0000000 --- a/libvirt-0.7.4.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6316a53b4cfaf184e795c7be69a371c5dc90a8a6dd6cd05c4208a1314aac10d4 -size 5692288 diff --git a/libvirt-0.7.5.tar.bz2 b/libvirt-0.7.5.tar.bz2 new file mode 100644 index 0000000..fbb1fb3 --- /dev/null +++ b/libvirt-0.7.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0763b11fc054a82d47cce8566173e589e08f34cd7adab46c9c3de80b6eacc4c7 +size 5997827 diff --git a/libvirt.changes b/libvirt.changes index 3eb631f..8303ac2 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Wed Jan 6 18:02:00 MST 2010 - jfehlig@novell.com + +- Fix freeing of uninitialized pointer when using HAL in + node device driver + node-dev-free.patch + +------------------------------------------------------------------- +Mon Jan 4 14:14:41 MST 2010 - jfehlig@novell.com + +- Require virt-utils package for common tools such as qemu-img + +------------------------------------------------------------------- +Tue Dec 29 10:26:55 MST 2009 - jfehlig@novell.com + +- Updated to version 0.7.5 + - Add new API virDomainMemoryStats to header and drivers + - Public API and domain extension for CPU flags + - expose SR IOV physical/virtual function relationships + - Support for JSON mode monitor [deactivated] + - Support for interface model='netfront' + - vbox: Add support for version 3.1 + - Support QEMU's virtual FAT block device driver + - lots of improvements and bug fixes +- Fix libvirt xen hypervisor driver to work with domctl interface + version 6 + xen-shr-pages.patch + ------------------------------------------------------------------- Mon Dec 7 14:51:36 MST 2009 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index bf9c90e..eca333d 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,7 +1,7 @@ # -# spec file for package libvirt (Version 0.7.4) +# spec file for package libvirt (Version 0.7.5) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,24 +18,71 @@ # norootforbuild %define with_xen 1 -%define with_lxc 0 -%define with_selinux 0 +%define with_qemu 1 +%define with_lxc 1 +%define with_openvz 1 +%define with_vbox 1 +%define with_uml 0 +%define with_one 0 +# hypervisor drivers that use a native remote protocol %define with_phyp 0 +%define with_esx 0 +# host drivers +%define with_network 1 +%define with_storage_fs 1 +%define with_storage_lvm 1 +%define with_storage_iscsi 1 +%define with_storage_disk 1 +%define with_storage_mpath 1 +%define with_numactl 1 +%define with_selinux 1 +%define with_apparmor 0 +# options +%define with_capng 0 +%define with_netcf 0 +%define with_udev 0 +%define with_hal 0 +%define with_yajl 0 # Xen is available only on i386 x86_64 %ifnarch %ix86 x86_64 %define with_xen 0 %endif -%if 0%{?suse_version} > 1100 -%define with_lxc 1 -%define with_selinux 1 +# LXC and selinux are not available on anything < openSUSE 11.1 +%if 0%{?suse_version} < 1110 +%define with_lxc 0 +%define with_selinux 0 %endif -# Build phyp backend for IBM Power systems +# Enable phyp driver for IBM Power systems %ifarch ppc64 %define with_phyp 1 %endif +# numactl only on x86_64 and ia64 +%ifnarch x86_64 ia64 +%define with_numactl 0 +%endif +# SLES doesn't contain OpenVZ, VBox, UML, OpenNebula, or ESX +%if 0%{?sles_version} +%define with_openvz 0 +%define with_vbox 0 +%define with_uml 0 +%define with_one 0 +%define with_esx 0 +%endif +%if 0%{?suse_version} > 1110 +%define with_udev 1 +%else +%define with_hal 1 +%endif Name: libvirt -BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel hal-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel python-xml readline-devel util-linux xhtml-dtd +BuildRequires: bridge-utils cyrus-sasl-devel device-mapper-devel fdupes gettext gnutls-devel iptables-devel libxml2-devel lvm2 ncurses-devel parted-devel pkg-config python-devel python-xml readline-devel util-linux xhtml-dtd +%if %{with_hal} +BuildRequires: hal-devel +%endif +%if %{with_udev} +BuildRequires: libudev-devel >= 145 +BuildRequires: libpciaccess0-devel >= 0.10.9 +%endif %if %{with_xen} BuildRequires: xen-devel %endif @@ -47,7 +94,7 @@ BuildRequires: avahi-devel %if %{with_selinux} BuildRequires: libselinux-devel %endif -%ifarch x86_64 ia64 +%if %{with_numactl} BuildRequires: libnuma-devel %endif %if 0%{?suse_version} > 1110 @@ -64,25 +111,24 @@ Url: http://libvirt.org/ License: LGPLv2.1+ Group: Development/Libraries/C and C++ AutoReqProv: yes -Version: 0.7.4 +Version: 0.7.5 Release: 1 Summary: A C toolkit to interract with the virtualization capabilities of Linux -Requires: readline -Requires: ncurses +# The client side, i.e. shared libs and virsh are in a subpackage +Requires: libvirt-client = %{version}-%{release} Requires: bridge-utils Requires: iptables -Requires: cyrus-sasl Requires: lvm2 Requires: parted -#Requires: /usr/bin/qemu-img -Recommends: cyrus-sasl-digestmd5 +Requires: virt-utils Recommends: logrotate Requires: dnsmasq Requires: PolicyKit >= 0.6 -Requires: socat Requires: open-iscsi Requires: nfs-client +%if %{with_hal} Requires: hal +%endif %if 0%{?suse_version} > 1110 Requires: polkit >= 0.9 %else @@ -91,9 +137,9 @@ Requires: PolicyKit >= 0.6 Source0: %{name}-%{version}.tar.bz2 Source1: libvirtd.init # Upstream patches -Patch0: xen-list-defined.patch -Patch1: detach-disk.patch -Patch2: xend-description-tag.patch +Patch0: detach-disk.patch +Patch1: xen-shr-pages.patch +Patch2: node-dev-free.patch # Need to go upstream Patch100: socat.patch Patch101: clone.patch @@ -106,13 +152,37 @@ Patch202: snapshots.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Libvirt is a C toolkit to interract with the virtualization -capabilities Linux. Virtualization of the Linux Operating System means -the ability to run multiple instances of Operating Systems concurently +Libvirt is a C toolkit to interact with the virtualization +capabilities of Linux. Virtualization of the Linux Operating System means +the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance. The library aims to provide long term stable C API -initially for the Xen paravirtualization but should be able to -integrate other virtualization mechanisms if needed. +to interact with Linux virtualization technologies. + + + +Authors: +-------- + Daniel Veillard + Karel Zak + +%package client +License: LGPLv2.1+ +Summary: Client side library and utilities of the libvirt library +Group: Development/Libraries/C and C++ +Requires: readline +Requires: ncurses +# So remote clients can access libvirt over SSH tunnel +# (client invokes 'socat' against the UNIX socket on the server) +Requires: socat +Requires: cyrus-sasl +Recommends: cyrus-sasl-digestmd5 + +%description client +Libvirt is a C toolkit to interract with the virtualization +capabilities of Linux. The libvirt-client package contains shared +libraries and client binaries needed to access the virtualization +capabilities of recent versions of Linux (and other OSes). @@ -128,17 +198,13 @@ Group: Development/Libraries/C and C++ Requires: %{name} = %{version} libxml2-devel %if %{with_xen} Requires: xen-devel -Requires: pkg-config %endif +Requires: pkg-config %description devel Libvirt is a C toolkit to interract with the virtualization -capabilities Linux. Virtualization of the Linux Operating System means -the ability to run multiple instances of Operating Systems concurently -on a single hardware system where the basic resources are driven by a -Linux instance. The library aims to provide long term stable C API -initially for the Xen paravirtualization but should be able to -integrate other virtualization mechanisms if needed. +capabilities of Linux. The libvirt-devel package contains headers +and libraries needed for developing libvirt applications. @@ -155,12 +221,8 @@ Requires: %{name} = %{version} %description doc Libvirt is a C toolkit to interract with the virtualization -capabilities Linux. Virtualization of the Linux Operating System means -the ability to run multiple instances of Operating Systems concurently -on a single hardware system where the basic resources are driven by a -Linux instance. The library aims to provide long term stable C API -initially for the Xen paravirtualization but should be able to -integrate other virtualization mechanisms if needed. +capabilities of Linux. The libvirt-doc packages contains documentation +for the libvirt API and tools. @@ -178,12 +240,8 @@ Requires: %{name} = %{version} %description python Libvirt is a C toolkit to interract with the virtualization -capabilities Linux. Virtualization of the Linux Operating System means -the ability to run multiple instances of Operating Systems concurently -on a single hardware system where the basic resources are driven by a -Linux instance. The library aims to provide long term stable C API -initially for the Xen paravirtualization but should be able to -integrate other virtualization mechanisms if needed. +capabilities of Linux. The libvirt-python package provides python +bindings for the libvirt C API. @@ -209,24 +267,80 @@ Authors: %if ! %{with_xen} %define _without_xen --without-xen %endif +%if ! %{with_qemu} +%define _without_qemu --without-qemu +%endif %if ! %{with_lxc} %define _without_lxc --without-lxc %endif -%if %{with_selinux} -%define _with_selinux --with-selinux +%if ! %{with_openvz} +%define _without_openvz --without-openvz +%endif +%if ! %{with_vbox} +%define _without_vbox --without-vbox +%endif +%if ! %{with_uml} +%define _without_uml --without-uml +%endif +%if ! %{with_one} +%define _without_one --without-one +%endif +%if ! %{with_phyp} +%define _without_phyp --without-phyp +%endif +%if ! %{with_esx} +%define _without_esx --without-esx +%endif +%if ! %{with_numactl} +%define _without_numactl --without-numactl +%endif +%if ! %{with_selinux} +%define _without_selinux --without-selinux +%endif +%if ! %{with_apparmor} +%define _without_apparmor --without-apparmor +%endif +%if ! %{with_capng} +%define _without_capng --without-capng +%endif +%if ! %{with_netcf} +%define _without_netcf --without-netcf +%endif +%if ! %{with_hal} +%define _without_hal --without-hal +%endif +%if ! %{with_udev} +%define _without_udev --without-udev +%endif +%if ! %{with_yajl} +%define _without_yajl --without-yajl %endif autoreconf -f -i export CFLAGS="$RPM_OPT_FLAGS" %configure --disable-static --with-pic \ %{?_without_xen} \ + %{?_without_qemu} \ %{?_without_lxc} \ + %{?_without_openvz} \ + %{?_without_vbox} \ + %{?_without_uml} \ + %{?_without_one} \ + %{?_without_phyp} \ + %{?_without_esx} \ + %{?_without_numactl} \ %{?_with_selinux} \ + %{?_without_capng} \ + %{?_without_netcf} \ + %{?_without_selinux} \ + %{?_without_apparmor} \ + %{?_without_hal} \ + %{?_without_udev} \ + %{?_without_yajl} \ + --without-xen-proxy \ --libexecdir=%{_libdir}/%{name} \ --with-init-script=none \ --with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \ - --with-xen-proxy=no \ ac_cv_path_DNSMASQ=/usr/sbin/dnsmasq \ - ac_cv_path_QEMU_IMG=/usr/bin/qemu-img-xen \ ac_cv_path_ISCSIADM=/sbin/iscsiadm \ ac_cv_path_MODPROBE=/sbin/modprobe \ ac_cv_path_UDEVADM=/sbin/udevadm \ @@ -244,6 +358,14 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/libvirt mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/libvirt rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a +%if ! %{with_lxc} +rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug +%endif +%if ! %{with_qemu} +rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug +%endif ln_dupes() { target="" @@ -269,7 +391,11 @@ ln -s /etc/init.d/libvirtd $RPM_BUILD_ROOT/usr/sbin/rclibvirtd %clean rm -rf $RPM_BUILD_ROOT -%post -p /sbin/ldconfig +%post +/sbin/ldconfig +%if 0%{?sles_version} +%{fillup_and_insserv -f -y libvirtd} +%endif %preun %stop_on_removal libvirtd @@ -279,49 +405,84 @@ rm -rf $RPM_BUILD_ROOT %restart_on_update libvirtd %insserv_cleanup -%files -f %{name}.lang +%post client -p /sbin/ldconfig + +%postun client -p /sbin/ldconfig + +%files %defattr(-, root, root) -%{_bindir}/virsh -%{_bindir}/virt-xml-validate -%{_bindir}/virt-pki-validate %{_sbindir}/libvirtd +%dir %{_libdir}/%{name} +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ +%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart +%config /etc/init.d/libvirtd +%{_sbindir}/rclibvirtd +%config %{_sysconfdir}/libvirt/libvirtd.conf +%config %{_sysconfdir}/logrotate.d/libvirtd +%config %{_sysconfdir}/libvirt/qemu/networks/default.xml +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/ +%dir %{_localstatedir}/run/libvirt/ +%dir %{_localstatedir}/lib/libvirt/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/images/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/boot/ +%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/ +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/ +%if 0%{?suse_version} > 1110 +%{_datadir}/polkit-1/actions/org.libvirt.unix.policy +%else +%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy +%endif +%{_datadir}/augeas +%if %{with_qemu} +%config %{_sysconfdir}/libvirt/qemu.conf +%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/qemu/ +%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/qemu/ +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/ +%endif +%if %{with_lxc} +%config %{_sysconfdir}/libvirt/lxc.conf +%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/lxc/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/ +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/ +%attr(0755, root, root) %{_libdir}/%{name}/libvirt_lxc +%endif +%if %{with_uml} +%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/uml/ +%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/ +%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/ +%endif +%if 0%{with_storage_disk} +%{_libdir}/%{name}/libvirt_parthelper +%endif + +%files client -f %{name}.lang +%defattr(-, root, root) %doc %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/[CNRT]* %doc %{_docdir}/%{name}/AUTHORS %doc %{_mandir}/man1/virsh.1* %doc %{_mandir}/man1/virt-xml-validate.1* %doc %{_mandir}/man1/virt-pki-validate.1* -%{_libdir}/*.so.* -%dir %{_libdir}/%{name} -%if 0%{?suse_version} > 1030 -%{_libdir}/%{name}/libvirt_parthelper -%endif -%if %{with_lxc} -%attr(0755, root, root) %{_libdir}/%{name}/libvirt_lxc -%endif -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/ -%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart -%if %{with_lxc} -%config %{_sysconfdir}/libvirt/lxc.conf -%endif -%config %{_sysconfdir}/libvirt/qemu/networks/default.xml -%config %{_sysconfdir}/logrotate.d/libvirtd -%dir /%{_localstatedir}/run/libvirt/ -%dir /%{_localstatedir}/lib/libvirt/ -%config /etc/init.d/libvirtd -%{_sbindir}/rclibvirtd -%config %{_sysconfdir}/libvirt/libvirtd.conf -%config %{_sysconfdir}/libvirt/qemu.conf +%{_bindir}/virsh +%{_bindir}/virt-xml-validate +%{_bindir}/virt-pki-validate +%{_libdir}/lib*.so.* +%dir %{_datadir}/libvirt/ +%dir %{_datadir}/libvirt/schemas/ +%{_datadir}/libvirt/schemas/domain.rng +%{_datadir}/libvirt/schemas/network.rng +%{_datadir}/libvirt/schemas/storagepool.rng +%{_datadir}/libvirt/schemas/storagevol.rng +%{_datadir}/libvirt/schemas/nodedev.rng +%{_datadir}/libvirt/schemas/capability.rng +%{_datadir}/libvirt/schemas/interface.rng +%{_datadir}/libvirt/schemas/secret.rng +%{_datadir}/libvirt/schemas/storageencryption.rng +%{_datadir}/libvirt/cpu_map.xml %config %{_sysconfdir}/sasl2/libvirt.conf -%if 0%{?suse_version} > 1110 -%{_datadir}/polkit-1/actions/org.libvirt.unix.policy -%else -%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy -%endif -%{_datadir}/libvirt -%{_datadir}/augeas %files devel %defattr(-, root, root) @@ -341,6 +502,5 @@ rm -rf $RPM_BUILD_ROOT %doc %{_docdir}/%{name}-python %{py_sitedir}/libvirt.py* %{py_sitedir}/libvirtmod* -#%attr(0755, root, root) %{_libdir}/%{name}/virt-aa-helper %changelog diff --git a/libvirtd-defaults.patch b/libvirtd-defaults.patch index ac89e2a..e030d0b 100644 --- a/libvirtd-defaults.patch +++ b/libvirtd-defaults.patch @@ -1,7 +1,7 @@ -Index: libvirt-0.7.2/daemon/libvirtd.conf +Index: libvirt-0.7.5/daemon/libvirtd.conf =================================================================== ---- libvirt-0.7.2.orig/daemon/libvirtd.conf -+++ libvirt-0.7.2/daemon/libvirtd.conf +--- libvirt-0.7.5.orig/daemon/libvirtd.conf ++++ libvirt-0.7.5/daemon/libvirtd.conf @@ -18,8 +18,8 @@ # It is necessary to setup a CA and issue server certificates before # using this capability. @@ -28,11 +28,11 @@ Index: libvirt-0.7.2/daemon/libvirtd.conf # Override the default mDNS advertizement name. This must be # unique on the immediate broadcast network. -Index: libvirt-0.7.2/daemon/libvirtd.c +Index: libvirt-0.7.5/daemon/libvirtd.c =================================================================== ---- libvirt-0.7.2.orig/daemon/libvirtd.c -+++ libvirt-0.7.2/daemon/libvirtd.c -@@ -135,7 +135,7 @@ static int sigwrite = -1; /* Signa +--- libvirt-0.7.5.orig/daemon/libvirtd.c ++++ libvirt-0.7.5/daemon/libvirtd.c +@@ -137,7 +137,7 @@ static int sigwrite = -1; /* Signa static int ipsock = 0; /* -l Listen for TCP/IP */ /* Defaults for configuration file elements */ @@ -41,7 +41,7 @@ Index: libvirt-0.7.2/daemon/libvirtd.c static int listen_tcp = 0; static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR; static char *tls_port = (char *) LIBVIRTD_TLS_PORT; -@@ -157,7 +157,7 @@ static int auth_tcp = REMOTE_AUTH_NONE; +@@ -159,7 +159,7 @@ static int auth_tcp = REMOTE_AUTH_NONE; #endif static int auth_tls = REMOTE_AUTH_NONE; diff --git a/migrate-params.patch b/migrate-params.patch index 2720c04..70585c9 100644 --- a/migrate-params.patch +++ b/migrate-params.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/src/xen/xend_internal.c +Index: libvirt-0.7.5/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -4517,6 +4517,8 @@ xenDaemonDomainMigratePerform (virDomain +--- libvirt-0.7.5.orig/src/xen/xend_internal.c ++++ libvirt-0.7.5/src/xen/xend_internal.c +@@ -4559,6 +4559,8 @@ xenDaemonDomainMigratePerform (virDomain "node", "-1", "ssl", "0", "resource", "0", /* required, xend ignores it */ diff --git a/node-dev-free.patch b/node-dev-free.patch new file mode 100644 index 0000000..e2700ee --- /dev/null +++ b/node-dev-free.patch @@ -0,0 +1,29 @@ +This invalid free results in heap corruption. Some symptoms I saw +because of this were libvirtd crashing and virt-manager hanging +while trying to enumerate devices. +--- + src/node_device/node_device_driver.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +Index: libvirt-0.7.5/src/node_device/node_device_driver.c +=================================================================== +--- libvirt-0.7.5.orig/src/node_device/node_device_driver.c ++++ libvirt-0.7.5/src/node_device/node_device_driver.c +@@ -78,7 +78,7 @@ static int update_driver_name(virConnect + virNodeDeviceObjPtr dev) + { + char *driver_link = NULL; +- char *devpath; ++ char *devpath = NULL; + char *p; + int ret = -1; + +@@ -114,7 +114,7 @@ static int update_driver_name(virConnect + + cleanup: + VIR_FREE(driver_link); +- free(devpath); ++ VIR_FREE(devpath); + return ret; + } + #else diff --git a/snapshots.patch b/snapshots.patch index 72fd6de..b6ba9da 100644 --- a/snapshots.patch +++ b/snapshots.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/include/libvirt/libvirt.h.in +Index: libvirt-0.7.5/include/libvirt/libvirt.h.in =================================================================== ---- libvirt-0.7.4.orig/include/libvirt/libvirt.h.in -+++ libvirt-0.7.4/include/libvirt/libvirt.h.in -@@ -565,6 +565,21 @@ int virDomainRestore +--- libvirt-0.7.5.orig/include/libvirt/libvirt.h.in ++++ libvirt-0.7.5/include/libvirt/libvirt.h.in +@@ -621,6 +621,21 @@ int virDomainRestore const char *from); /* @@ -24,11 +24,11 @@ Index: libvirt-0.7.4/include/libvirt/libvirt.h.in * Domain core dump */ int virDomainCoreDump (virDomainPtr domain, -Index: libvirt-0.7.4/src/libvirt.c +Index: libvirt-0.7.5/src/libvirt.c =================================================================== ---- libvirt-0.7.4.orig/src/libvirt.c -+++ libvirt-0.7.4/src/libvirt.c -@@ -2281,6 +2281,166 @@ error: +--- libvirt-0.7.5.orig/src/libvirt.c ++++ libvirt-0.7.5/src/libvirt.c +@@ -2339,6 +2339,166 @@ error: } /** @@ -195,10 +195,10 @@ Index: libvirt-0.7.4/src/libvirt.c * virDomainCoreDump: * @domain: a domain object * @to: path for the core file -Index: libvirt-0.7.4/src/driver.h +Index: libvirt-0.7.5/src/driver.h =================================================================== ---- libvirt-0.7.4.orig/src/driver.h -+++ libvirt-0.7.4/src/driver.h +--- libvirt-0.7.5.orig/src/driver.h ++++ libvirt-0.7.5/src/driver.h @@ -136,6 +136,21 @@ typedef int (*virDrvDomainRestore) (virConnectPtr conn, const char *from); @@ -221,10 +221,10 @@ Index: libvirt-0.7.4/src/driver.h (*virDrvDomainCoreDump) (virDomainPtr domain, const char *to, int flags); -@@ -435,6 +450,11 @@ struct _virDriver { - virDrvConnectIsSecure isSecure; +@@ -448,6 +463,11 @@ struct _virDriver { virDrvDomainIsActive domainIsActive; virDrvDomainIsPersistent domainIsPersistent; + virDrvCPUCompare cpuCompare; + virDrvDomainSnapshotCreate domainSnapshotCreate; + virDrvDomainSnapshotApply domainSnapshotApply; + virDrvDomainSnapshotDelete domainSnapshotDelete; @@ -233,10 +233,10 @@ Index: libvirt-0.7.4/src/driver.h }; typedef int -Index: libvirt-0.7.4/src/xen/xen_driver.c +Index: libvirt-0.7.5/src/xen/xen_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_driver.c -+++ libvirt-0.7.4/src/xen/xen_driver.c +--- libvirt-0.7.5.orig/src/xen/xen_driver.c ++++ libvirt-0.7.5/src/xen/xen_driver.c @@ -1052,6 +1052,81 @@ xenUnifiedDomainRestore (virConnectPtr c } @@ -319,22 +319,22 @@ Index: libvirt-0.7.4/src/xen/xen_driver.c xenUnifiedDomainCoreDump (virDomainPtr dom, const char *to, int flags) { GET_PRIVATE(dom->conn); -@@ -1860,6 +1935,11 @@ static virDriver xenUnifiedDriver = { - xenUnifiedIsSecure, +@@ -1862,6 +1937,11 @@ static virDriver xenUnifiedDriver = { xenUnifiedDomainIsActive, xenUnifiedDomainisPersistent, -+ xenUnifiedDomainSnapshotCreate, -+ xenUnifiedDomainSnapshotApply, -+ xenUnifiedDomainSnapshotDelete, -+ xenUnifiedDomainNumOfSnapshots, -+ xenUnifiedDomainListSnapshots, + NULL, /* cpuCompare */ ++ xenUnifiedDomainSnapshotCreate, /* domainSnapshotCreate */ ++ xenUnifiedDomainSnapshotApply, /* domainSnapshotApply */ ++ xenUnifiedDomainSnapshotDelete, /* domainSnapshotDelete */ ++ xenUnifiedDomainNumOfSnapshots, /* domainNumOfSnapshots */ ++ xenUnifiedDomainListSnapshots, /* domainListSnapshots */ }; /** -Index: libvirt-0.7.4/src/xen/xen_driver.h +Index: libvirt-0.7.5/src/xen/xen_driver.h =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_driver.h -+++ libvirt-0.7.4/src/xen/xen_driver.h +--- libvirt-0.7.5.orig/src/xen/xen_driver.h ++++ libvirt-0.7.5/src/xen/xen_driver.h @@ -100,6 +100,11 @@ struct xenUnifiedDriver { virDrvDomainGetSchedulerType domainGetSchedulerType; virDrvDomainGetSchedulerParameters domainGetSchedulerParameters; @@ -347,10 +347,10 @@ Index: libvirt-0.7.4/src/xen/xen_driver.h }; typedef struct xenXMConfCache *xenXMConfCachePtr; -Index: libvirt-0.7.4/src/xen/xend_internal.c +Index: libvirt-0.7.5/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c +--- libvirt-0.7.5.orig/src/xen/xend_internal.c ++++ libvirt-0.7.5/src/xen/xend_internal.c @@ -53,6 +53,12 @@ #ifndef PROXY @@ -364,7 +364,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c /* * The number of Xen scheduler parameters */ -@@ -3271,6 +3277,87 @@ xenDaemonDomainRestore(virConnectPtr con +@@ -3282,6 +3288,87 @@ xenDaemonDomainRestore(virConnectPtr con } return xend_op(conn, "", "op", "restore", "file", filename, NULL); } @@ -452,7 +452,7 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c #endif /* !PROXY */ /** -@@ -5123,6 +5210,11 @@ struct xenUnifiedDriver xenDaemonDriver +@@ -5165,6 +5252,11 @@ struct xenUnifiedDriver xenDaemonDriver xenDaemonGetSchedulerType, /* domainGetSchedulerType */ xenDaemonGetSchedulerParameters, /* domainGetSchedulerParameters */ xenDaemonSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -464,10 +464,10 @@ Index: libvirt-0.7.4/src/xen/xend_internal.c }; /************************************************************************ -Index: libvirt-0.7.4/src/xen/proxy_internal.c +Index: libvirt-0.7.5/src/xen/proxy_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/proxy_internal.c -+++ libvirt-0.7.4/src/xen/proxy_internal.c +--- libvirt-0.7.5.orig/src/xen/proxy_internal.c ++++ libvirt-0.7.5/src/xen/proxy_internal.c @@ -83,6 +83,11 @@ struct xenUnifiedDriver xenProxyDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -480,11 +480,11 @@ Index: libvirt-0.7.4/src/xen/proxy_internal.c }; -Index: libvirt-0.7.4/src/xen/xen_hypervisor.c +Index: libvirt-0.7.5/src/xen/xen_hypervisor.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_hypervisor.c -+++ libvirt-0.7.4/src/xen/xen_hypervisor.c -@@ -750,6 +750,11 @@ struct xenUnifiedDriver xenHypervisorDri +--- libvirt-0.7.5.orig/src/xen/xen_hypervisor.c ++++ libvirt-0.7.5/src/xen/xen_hypervisor.c +@@ -800,6 +800,11 @@ struct xenUnifiedDriver xenHypervisorDri xenHypervisorGetSchedulerType, /* domainGetSchedulerType */ xenHypervisorGetSchedulerParameters, /* domainGetSchedulerParameters */ xenHypervisorSetSchedulerParameters, /* domainSetSchedulerParameters */ @@ -496,10 +496,10 @@ Index: libvirt-0.7.4/src/xen/xen_hypervisor.c }; #endif /* !PROXY */ -Index: libvirt-0.7.4/src/xen/xm_internal.c +Index: libvirt-0.7.5/src/xen/xm_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xm_internal.c -+++ libvirt-0.7.4/src/xen/xm_internal.c +--- libvirt-0.7.5.orig/src/xen/xm_internal.c ++++ libvirt-0.7.5/src/xen/xm_internal.c @@ -116,6 +116,11 @@ struct xenUnifiedDriver xenXMDriver = { NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -512,10 +512,10 @@ Index: libvirt-0.7.4/src/xen/xm_internal.c }; #define xenXMError(conn, code, fmt...) \ -Index: libvirt-0.7.4/src/xen/xs_internal.c +Index: libvirt-0.7.5/src/xen/xs_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xs_internal.c -+++ libvirt-0.7.4/src/xen/xs_internal.c +--- libvirt-0.7.5.orig/src/xen/xs_internal.c ++++ libvirt-0.7.5/src/xen/xs_internal.c @@ -83,6 +83,11 @@ struct xenUnifiedDriver xenStoreDriver = NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ @@ -528,11 +528,11 @@ Index: libvirt-0.7.4/src/xen/xs_internal.c }; #endif /* ! PROXY */ -Index: libvirt-0.7.4/tools/virsh.c +Index: libvirt-0.7.5/tools/virsh.c =================================================================== ---- libvirt-0.7.4.orig/tools/virsh.c -+++ libvirt-0.7.4/tools/virsh.c -@@ -1179,6 +1179,188 @@ cmdSave(vshControl *ctl, const vshCmd *c +--- libvirt-0.7.5.orig/tools/virsh.c ++++ libvirt-0.7.5/tools/virsh.c +@@ -1233,6 +1233,188 @@ cmdSave(vshControl *ctl, const vshCmd *c } /* @@ -721,7 +721,7 @@ Index: libvirt-0.7.4/tools/virsh.c * "schedinfo" command */ static const vshCmdInfo info_schedinfo[] = { -@@ -7298,6 +7480,12 @@ static const vshCmdDef commands[] = { +@@ -7431,6 +7613,12 @@ static const vshCmdDef commands[] = { {"undefine", cmdUndefine, opts_undefine, info_undefine}, {"uri", cmdURI, NULL, info_uri}, @@ -734,14 +734,14 @@ Index: libvirt-0.7.4/tools/virsh.c {"vol-create", cmdVolCreate, opts_vol_create, info_vol_create}, {"vol-create-from", cmdVolCreateFrom, opts_vol_create_from, info_vol_create_from}, {"vol-create-as", cmdVolCreateAs, opts_vol_create_as, info_vol_create_as}, -Index: libvirt-0.7.4/src/lxc/lxc_driver.c +Index: libvirt-0.7.5/src/lxc/lxc_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/lxc/lxc_driver.c -+++ libvirt-0.7.4/src/lxc/lxc_driver.c -@@ -2404,6 +2404,11 @@ static virDriver lxcDriver = { - lxcIsSecure, +--- libvirt-0.7.5.orig/src/lxc/lxc_driver.c ++++ libvirt-0.7.5/src/lxc/lxc_driver.c +@@ -2456,6 +2456,11 @@ static virDriver lxcDriver = { lxcDomainIsActive, lxcDomainIsPersistent, + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -750,14 +750,14 @@ Index: libvirt-0.7.4/src/lxc/lxc_driver.c }; static virStateDriver lxcStateDriver = { -Index: libvirt-0.7.4/src/openvz/openvz_driver.c +Index: libvirt-0.7.5/src/openvz/openvz_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/openvz/openvz_driver.c -+++ libvirt-0.7.4/src/openvz/openvz_driver.c -@@ -1534,6 +1534,11 @@ static virDriver openvzDriver = { - openvzIsSecure, +--- libvirt-0.7.5.orig/src/openvz/openvz_driver.c ++++ libvirt-0.7.5/src/openvz/openvz_driver.c +@@ -1535,6 +1535,11 @@ static virDriver openvzDriver = { openvzDomainIsActive, openvzDomainIsPersistent, + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -766,14 +766,14 @@ Index: libvirt-0.7.4/src/openvz/openvz_driver.c }; int openvzRegister(void) { -Index: libvirt-0.7.4/src/qemu/qemu_driver.c +Index: libvirt-0.7.5/src/qemu/qemu_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/qemu/qemu_driver.c -+++ libvirt-0.7.4/src/qemu/qemu_driver.c -@@ -7559,6 +7559,11 @@ static virDriver qemuDriver = { - qemuIsSecure, +--- libvirt-0.7.5.orig/src/qemu/qemu_driver.c ++++ libvirt-0.7.5/src/qemu/qemu_driver.c +@@ -7990,6 +7990,11 @@ static virDriver qemuDriver = { qemuDomainIsActive, qemuDomainIsPersistent, + qemuCPUCompare, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -782,14 +782,14 @@ Index: libvirt-0.7.4/src/qemu/qemu_driver.c }; -Index: libvirt-0.7.4/src/esx/esx_driver.c +Index: libvirt-0.7.5/src/esx/esx_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/esx/esx_driver.c -+++ libvirt-0.7.4/src/esx/esx_driver.c -@@ -3425,6 +3425,11 @@ static virDriver esxDriver = { - esxIsSecure, /* isSecure */ +--- libvirt-0.7.5.orig/src/esx/esx_driver.c ++++ libvirt-0.7.5/src/esx/esx_driver.c +@@ -3455,6 +3455,11 @@ static virDriver esxDriver = { esxDomainIsActive, /* domainIsActive */ esxDomainIsPersistent, /* domainIsPersistent */ + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -798,14 +798,14 @@ Index: libvirt-0.7.4/src/esx/esx_driver.c }; -Index: libvirt-0.7.4/src/test/test_driver.c +Index: libvirt-0.7.5/src/test/test_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/test/test_driver.c -+++ libvirt-0.7.4/src/test/test_driver.c -@@ -5233,6 +5233,11 @@ static virDriver testDriver = { - testIsSecure, /* isEncrypted */ +--- libvirt-0.7.5.orig/src/test/test_driver.c ++++ libvirt-0.7.5/src/test/test_driver.c +@@ -5238,6 +5238,11 @@ static virDriver testDriver = { testDomainIsActive, /* domainIsActive */ testDomainIsPersistent, /* domainIsPersistent */ + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -814,14 +814,14 @@ Index: libvirt-0.7.4/src/test/test_driver.c }; static virNetworkDriver testNetworkDriver = { -Index: libvirt-0.7.4/src/uml/uml_driver.c +Index: libvirt-0.7.5/src/uml/uml_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/uml/uml_driver.c -+++ libvirt-0.7.4/src/uml/uml_driver.c -@@ -1888,6 +1888,11 @@ static virDriver umlDriver = { - umlIsSecure, +--- libvirt-0.7.5.orig/src/uml/uml_driver.c ++++ libvirt-0.7.5/src/uml/uml_driver.c +@@ -1924,6 +1924,11 @@ static virDriver umlDriver = { umlDomainIsActive, umlDomainIsPersistent, + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -830,14 +830,14 @@ Index: libvirt-0.7.4/src/uml/uml_driver.c }; -Index: libvirt-0.7.4/src/vbox/vbox_tmpl.c +Index: libvirt-0.7.5/src/vbox/vbox_tmpl.c =================================================================== ---- libvirt-0.7.4.orig/src/vbox/vbox_tmpl.c -+++ libvirt-0.7.4/src/vbox/vbox_tmpl.c -@@ -6571,6 +6571,11 @@ virDriver NAME(Driver) = { - vboxIsSecure, +--- libvirt-0.7.5.orig/src/vbox/vbox_tmpl.c ++++ libvirt-0.7.5/src/vbox/vbox_tmpl.c +@@ -7051,6 +7051,11 @@ virDriver NAME(Driver) = { vboxDomainIsActive, vboxDomainIsPersistent, + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -846,14 +846,14 @@ Index: libvirt-0.7.4/src/vbox/vbox_tmpl.c }; virNetworkDriver NAME(NetworkDriver) = { -Index: libvirt-0.7.4/src/opennebula/one_driver.c +Index: libvirt-0.7.5/src/opennebula/one_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/opennebula/one_driver.c -+++ libvirt-0.7.4/src/opennebula/one_driver.c -@@ -781,6 +781,11 @@ static virDriver oneDriver = { - oneIsSecure, +--- libvirt-0.7.5.orig/src/opennebula/one_driver.c ++++ libvirt-0.7.5/src/opennebula/one_driver.c +@@ -783,6 +783,11 @@ static virDriver oneDriver = { NULL, /* domainIsActive */ NULL, /* domainIsPersistent */ + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -862,14 +862,14 @@ Index: libvirt-0.7.4/src/opennebula/one_driver.c }; static virStateDriver oneStateDriver = { -Index: libvirt-0.7.4/src/phyp/phyp_driver.c +Index: libvirt-0.7.5/src/phyp/phyp_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/phyp/phyp_driver.c -+++ libvirt-0.7.4/src/phyp/phyp_driver.c -@@ -1650,6 +1650,11 @@ virDriver phypDriver = { - phypIsSecure, +--- libvirt-0.7.5.orig/src/phyp/phyp_driver.c ++++ libvirt-0.7.5/src/phyp/phyp_driver.c +@@ -1651,6 +1651,11 @@ virDriver phypDriver = { NULL, /* domainIsActive */ NULL, /* domainIsPersistent */ + NULL, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -878,14 +878,14 @@ Index: libvirt-0.7.4/src/phyp/phyp_driver.c }; int -Index: libvirt-0.7.4/src/remote/remote_driver.c +Index: libvirt-0.7.5/src/remote/remote_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/remote/remote_driver.c -+++ libvirt-0.7.4/src/remote/remote_driver.c -@@ -8847,6 +8847,11 @@ static virDriver remote_driver = { - remoteIsSecure, /* isSecure */ +--- libvirt-0.7.5.orig/src/remote/remote_driver.c ++++ libvirt-0.7.5/src/remote/remote_driver.c +@@ -8940,6 +8940,11 @@ static virDriver remote_driver = { remoteDomainIsActive, /* domainIsActive */ remoteDomainIsPersistent, /* domainIsPersistent */ + remoteCPUCompare, /* cpuCompare */ + NULL, /* domainSnapshotCreate */ + NULL, /* domainSnapshotApply */ + NULL, /* domainSnapshotDelete */ @@ -894,11 +894,11 @@ Index: libvirt-0.7.4/src/remote/remote_driver.c }; static virNetworkDriver network_driver = { -Index: libvirt-0.7.4/docs/libvirt-api.xml +Index: libvirt-0.7.5/docs/libvirt-api.xml =================================================================== ---- libvirt-0.7.4.orig/docs/libvirt-api.xml -+++ libvirt-0.7.4/docs/libvirt-api.xml -@@ -271,6 +271,11 @@ +--- libvirt-0.7.5.orig/docs/libvirt-api.xml ++++ libvirt-0.7.5/docs/libvirt-api.xml +@@ -293,6 +293,11 @@ @@ -910,7 +910,7 @@ Index: libvirt-0.7.4/docs/libvirt-api.xml -@@ -1878,6 +1883,36 @@ This function may requires privileged ac +@@ -1972,6 +1977,36 @@ This function may requires privileged ac @@ -947,10 +947,10 @@ Index: libvirt-0.7.4/docs/libvirt-api.xml -Index: libvirt-0.7.4/src/libvirt_public.syms +Index: libvirt-0.7.5/src/libvirt_public.syms =================================================================== ---- libvirt-0.7.4.orig/src/libvirt_public.syms -+++ libvirt-0.7.4/src/libvirt_public.syms +--- libvirt-0.7.5.orig/src/libvirt_public.syms ++++ libvirt-0.7.5/src/libvirt_public.syms @@ -215,6 +215,11 @@ LIBVIRT_0.4.2 { LIBVIRT_0.4.5 { global: @@ -963,11 +963,11 @@ Index: libvirt-0.7.4/src/libvirt_public.syms } LIBVIRT_0.4.2; LIBVIRT_0.5.0 { -Index: libvirt-0.7.4/python/generator.py +Index: libvirt-0.7.5/python/generator.py =================================================================== ---- libvirt-0.7.4.orig/python/generator.py -+++ libvirt-0.7.4/python/generator.py -@@ -287,6 +287,7 @@ skip_impl = ( +--- libvirt-0.7.5.orig/python/generator.py ++++ libvirt-0.7.5/python/generator.py +@@ -288,6 +288,7 @@ skip_impl = ( 'virDomainSetSchedulerParameters', 'virDomainGetVcpus', 'virDomainPinVcpu', @@ -975,11 +975,11 @@ Index: libvirt-0.7.4/python/generator.py 'virSecretGetValue', 'virSecretSetValue', 'virSecretGetUUID', -Index: libvirt-0.7.4/python/libvirt-override.c +Index: libvirt-0.7.5/python/libvirt-override.c =================================================================== ---- libvirt-0.7.4.orig/python/libvirt-override.c -+++ libvirt-0.7.4/python/libvirt-override.c -@@ -1400,6 +1400,34 @@ libvirt_virStoragePoolGetInfo(PyObject * +--- libvirt-0.7.5.orig/python/libvirt-override.c ++++ libvirt-0.7.5/python/libvirt-override.c +@@ -1516,6 +1516,34 @@ libvirt_virStoragePoolGetInfo(PyObject * return(py_retval); } @@ -1014,7 +1014,7 @@ Index: libvirt-0.7.4/python/libvirt-override.c static PyObject * libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { -@@ -2557,6 +2585,7 @@ static PyMethodDef libvirtMethods[] = { +@@ -2690,6 +2718,7 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virStoragePoolGetAutostart", libvirt_virStoragePoolGetAutostart, METH_VARARGS, NULL}, {(char *) "virStoragePoolListVolumes", libvirt_virStoragePoolListVolumes, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetInfo", libvirt_virStoragePoolGetInfo, METH_VARARGS, NULL}, @@ -1022,11 +1022,11 @@ Index: libvirt-0.7.4/python/libvirt-override.c {(char *) "virStorageVolGetInfo", libvirt_virStorageVolGetInfo, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetUUID", libvirt_virStoragePoolGetUUID, METH_VARARGS, NULL}, {(char *) "virStoragePoolGetUUIDString", libvirt_virStoragePoolGetUUIDString, METH_VARARGS, NULL}, -Index: libvirt-0.7.4/python/libvirt-override-api.xml +Index: libvirt-0.7.5/python/libvirt-override-api.xml =================================================================== ---- libvirt-0.7.4.orig/python/libvirt-override-api.xml -+++ libvirt-0.7.4/python/libvirt-override-api.xml -@@ -140,6 +140,11 @@ +--- libvirt-0.7.5.orig/python/libvirt-override-api.xml ++++ libvirt-0.7.5/python/libvirt-override-api.xml +@@ -145,6 +145,11 @@ @@ -1038,10 +1038,10 @@ Index: libvirt-0.7.4/python/libvirt-override-api.xml list the storage pools, stores the pointers to the names in @names -Index: libvirt-0.7.4/src/xen/xen_inotify.c +Index: libvirt-0.7.5/src/xen/xen_inotify.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xen_inotify.c -+++ libvirt-0.7.4/src/xen/xen_inotify.c +--- libvirt-0.7.5.orig/src/xen/xen_inotify.c ++++ libvirt-0.7.5/src/xen/xen_inotify.c @@ -86,6 +86,11 @@ struct xenUnifiedDriver xenInotifyDriver NULL, /* domainGetSchedulerType */ NULL, /* domainGetSchedulerParameters */ diff --git a/suse-network.patch b/suse-network.patch index 5a1146c..e9630f7 100644 --- a/suse-network.patch +++ b/suse-network.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/src/conf/network_conf.c +Index: libvirt-0.7.5/src/conf/network_conf.c =================================================================== ---- libvirt-0.7.4.orig/src/conf/network_conf.c -+++ libvirt-0.7.4/src/conf/network_conf.c -@@ -865,6 +865,137 @@ error: +--- libvirt-0.7.5.orig/src/conf/network_conf.c ++++ libvirt-0.7.5/src/conf/network_conf.c +@@ -863,6 +863,137 @@ error: return NULL; } @@ -140,7 +140,7 @@ Index: libvirt-0.7.4/src/conf/network_conf.c int virNetworkLoadAllConfigs(virConnectPtr conn, virNetworkObjListPtr nets, const char *configDir, -@@ -904,6 +1035,7 @@ int virNetworkLoadAllConfigs(virConnectP +@@ -902,6 +1033,7 @@ int virNetworkLoadAllConfigs(virConnectP closedir(dir); @@ -148,10 +148,10 @@ Index: libvirt-0.7.4/src/conf/network_conf.c return 0; } -Index: libvirt-0.7.4/src/conf/network_conf.h +Index: libvirt-0.7.5/src/conf/network_conf.h =================================================================== ---- libvirt-0.7.4.orig/src/conf/network_conf.h -+++ libvirt-0.7.4/src/conf/network_conf.h +--- libvirt-0.7.5.orig/src/conf/network_conf.h ++++ libvirt-0.7.5/src/conf/network_conf.h @@ -94,6 +94,7 @@ struct _virNetworkObj { unsigned int active : 1; unsigned int autostart : 1; @@ -160,11 +160,11 @@ Index: libvirt-0.7.4/src/conf/network_conf.h virNetworkDefPtr def; /* The current definition */ virNetworkDefPtr newDef; /* New definition to activate at shutdown */ -Index: libvirt-0.7.4/src/network/bridge_driver.c +Index: libvirt-0.7.5/src/network/bridge_driver.c =================================================================== ---- libvirt-0.7.4.orig/src/network/bridge_driver.c -+++ libvirt-0.7.4/src/network/bridge_driver.c -@@ -994,6 +994,11 @@ static int networkShutdownNetworkDaemon( +--- libvirt-0.7.5.orig/src/network/bridge_driver.c ++++ libvirt-0.7.5/src/network/bridge_driver.c +@@ -1010,6 +1010,11 @@ static int networkShutdownNetworkDaemon( unlink(stateFile); VIR_FREE(stateFile); @@ -176,7 +176,7 @@ Index: libvirt-0.7.4/src/network/bridge_driver.c if (network->dnsmasqPid > 0) kill(network->dnsmasqPid, SIGTERM); -@@ -1494,6 +1499,12 @@ static int networkSetAutostart(virNetwor +@@ -1510,6 +1515,12 @@ static int networkSetAutostart(virNetwor goto cleanup; } diff --git a/xen-list-defined.patch b/xen-list-defined.patch deleted file mode 100644 index 8b5cc01..0000000 --- a/xen-list-defined.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 7cfbb17978c467625afab866b7a22119789abee0 -Author: Matthias Bolte -Date: Thu Nov 26 00:09:40 2009 +0100 - - xen: Fix unconditional freeing in xenDaemonListDefinedDomains() - - Commit 790f0b3057787bb64da8c46c111ff8d3eff7b2af causes the contents of - the names array to be freed even on success, resulting in no listing of - defined but inactive Xen domains. - - Spotted by Jim Fehlig - -diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c -index e370eb8..4d9dcd1 100644 ---- a/src/xen/xend_internal.c -+++ b/src/xen/xend_internal.c -@@ -4696,12 +4696,17 @@ xenDaemonListDefinedDomains(virConnectPtr conn, char **const names, int maxnames - break; - } - -+cleanup: -+ sexpr_free(root); -+ return(ret); -+ - error: - for (i = 0; i < ret; ++i) - VIR_FREE(names[i]); - -- sexpr_free(root); -- return(ret); -+ ret = -1; -+ -+ goto cleanup; - } - - /** diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 87e6ca6..b174db7 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,8 +1,8 @@ -Index: libvirt-0.7.4/src/xen/xend_internal.c +Index: libvirt-0.7.5/src/xen/xend_internal.c =================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -5365,7 +5365,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co +--- libvirt-0.7.5.orig/src/xen/xend_internal.c ++++ libvirt-0.7.5/src/xen/xend_internal.c +@@ -5409,7 +5409,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); } else { diff --git a/xen-shr-pages.patch b/xen-shr-pages.patch new file mode 100644 index 0000000..ed5afb9 --- /dev/null +++ b/xen-shr-pages.patch @@ -0,0 +1,248 @@ +Index: libvirt-0.7.5/src/xen/xen_hypervisor.c +=================================================================== +--- libvirt-0.7.5.orig/src/xen/xen_hypervisor.c ++++ libvirt-0.7.5/src/xen/xen_hypervisor.c +@@ -215,10 +215,26 @@ struct xen_v2d5_getdomaininfo { + }; + typedef struct xen_v2d5_getdomaininfo xen_v2d5_getdomaininfo; + ++struct xen_v2d6_getdomaininfo { ++ domid_t domain; /* the domain number */ ++ uint32_t flags; /* flags, see before */ ++ uint64_t tot_pages ALIGN_64; /* total number of pages used */ ++ uint64_t max_pages ALIGN_64; /* maximum number of pages allowed */ ++ uint64_t shr_pages ALIGN_64; /* number of shared pages */ ++ uint64_t shared_info_frame ALIGN_64; /* MFN of shared_info struct */ ++ uint64_t cpu_time ALIGN_64; /* CPU time used */ ++ uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */ ++ uint32_t max_vcpu_id; /* Maximum VCPUID in use by this domain. */ ++ uint32_t ssidref; ++ xen_domain_handle_t handle; ++}; ++typedef struct xen_v2d6_getdomaininfo xen_v2d6_getdomaininfo; ++ + union xen_getdomaininfo { + struct xen_v0_getdomaininfo v0; + struct xen_v2_getdomaininfo v2; + struct xen_v2d5_getdomaininfo v2d5; ++ struct xen_v2d6_getdomaininfo v2d6; + }; + typedef union xen_getdomaininfo xen_getdomaininfo; + +@@ -226,6 +242,7 @@ union xen_getdomaininfolist { + struct xen_v0_getdomaininfo *v0; + struct xen_v2_getdomaininfo *v2; + struct xen_v2d5_getdomaininfo *v2d5; ++ struct xen_v2d6_getdomaininfo *v2d6; + }; + typedef union xen_getdomaininfolist xen_getdomaininfolist; + +@@ -263,114 +280,147 @@ typedef struct xen_v2s5_availheap xen_v + #define XEN_GETDOMAININFOLIST_ALLOC(domlist, size) \ + (hypervisor_version < 2 ? \ + (VIR_ALLOC_N(domlist.v0, (size)) == 0) : \ +- (dom_interface_version < 5 ? \ +- (VIR_ALLOC_N(domlist.v2, (size)) == 0) : \ +- (VIR_ALLOC_N(domlist.v2d5, (size)) == 0))) ++ (dom_interface_version >= 6 ? \ ++ (VIR_ALLOC_N(domlist.v2d6, (size)) == 0) : \ ++ (dom_interface_version == 5 ? \ ++ (VIR_ALLOC_N(domlist.v2d5, (size)) == 0) : \ ++ (VIR_ALLOC_N(domlist.v2, (size)) == 0)))) + + #define XEN_GETDOMAININFOLIST_FREE(domlist) \ + (hypervisor_version < 2 ? \ + VIR_FREE(domlist.v0) : \ +- (dom_interface_version < 5 ? \ +- VIR_FREE(domlist.v2) : \ +- VIR_FREE(domlist.v2d5))) ++ (dom_interface_version >= 6 ? \ ++ VIR_FREE(domlist.v2d6) : \ ++ (dom_interface_version == 5 ? \ ++ VIR_FREE(domlist.v2d5) : \ ++ VIR_FREE(domlist.v2)))) + + #define XEN_GETDOMAININFOLIST_CLEAR(domlist, size) \ + (hypervisor_version < 2 ? \ + memset(domlist.v0, 0, sizeof(*domlist.v0) * size) : \ +- (dom_interface_version < 5 ? \ +- memset(domlist.v2, 0, sizeof(*domlist.v2) * size) : \ +- memset(domlist.v2d5, 0, sizeof(*domlist.v2d5) * size))) ++ (dom_interface_version >= 6 ? \ ++ memset(domlist.v2d6, 0, sizeof(*domlist.v2d6) * size) : \ ++ (dom_interface_version == 5 ? \ ++ memset(domlist.v2d5, 0, sizeof(*domlist.v2d5) * size) : \ ++ memset(domlist.v2, 0, sizeof(*domlist.v2) * size)))) + + #define XEN_GETDOMAININFOLIST_DOMAIN(domlist, n) \ + (hypervisor_version < 2 ? \ + domlist.v0[n].domain : \ +- (dom_interface_version < 5 ? \ +- domlist.v2[n].domain : \ +- domlist.v2d5[n].domain)) ++ (dom_interface_version >= 6 ? \ ++ domlist.v2d6[n].domain : \ ++ (dom_interface_version == 5 ? \ ++ domlist.v2d5[n].domain : \ ++ domlist.v2[n].domain))) + + #define XEN_GETDOMAININFOLIST_UUID(domlist, n) \ + (hypervisor_version < 2 ? \ + domlist.v0[n].handle : \ +- (dom_interface_version < 5 ? \ +- domlist.v2[n].handle : \ +- domlist.v2d5[n].handle)) ++ (dom_interface_version >= 6 ? \ ++ domlist.v2d6[n].handle : \ ++ (dom_interface_version == 5 ? \ ++ domlist.v2d5[n].handle : \ ++ domlist.v2[n].handle))) + + #define XEN_GETDOMAININFOLIST_DATA(domlist) \ + (hypervisor_version < 2 ? \ + (void*)(domlist->v0) : \ +- (dom_interface_version < 5 ? \ +- (void*)(domlist->v2) : \ +- (void*)(domlist->v2d5))) ++ (dom_interface_version >= 6 ? \ ++ (void*)(domlist->v2d6) : \ ++ (dom_interface_version == 5 ? \ ++ (void*)(domlist->v2d5) : \ ++ (void*)(domlist->v2)))) + + #define XEN_GETDOMAININFO_SIZE \ + (hypervisor_version < 2 ? \ + sizeof(xen_v0_getdomaininfo) : \ +- (dom_interface_version < 5 ? \ +- sizeof(xen_v2_getdomaininfo) : \ +- sizeof(xen_v2d5_getdomaininfo))) ++ (dom_interface_version >= 6 ? \ ++ sizeof(xen_v2d6_getdomaininfo) : \ ++ (dom_interface_version == 5 ? \ ++ sizeof(xen_v2d5_getdomaininfo) : \ ++ sizeof(xen_v2_getdomaininfo)))) + + #define XEN_GETDOMAININFO_CLEAR(dominfo) \ + (hypervisor_version < 2 ? \ + memset(&(dominfo.v0), 0, sizeof(xen_v0_getdomaininfo)) : \ +- (dom_interface_version < 5 ? \ +- memset(&(dominfo.v2), 0, sizeof(xen_v2_getdomaininfo)) : \ +- memset(&(dominfo.v2d5), 0, sizeof(xen_v2d5_getdomaininfo)))) ++ (dom_interface_version >= 6 ? \ ++ memset(&(dominfo.v2d6), 0, sizeof(xen_v2d6_getdomaininfo)) : \ ++ (dom_interface_version == 5 ? \ ++ memset(&(dominfo.v2d5), 0, sizeof(xen_v2d5_getdomaininfo)) : \ ++ memset(&(dominfo.v2), 0, sizeof(xen_v2_getdomaininfo))))) + + #define XEN_GETDOMAININFO_DOMAIN(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.domain : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.domain : \ +- dominfo.v2d5.domain)) ++ (dom_interface_version >= 6 ? \ ++ dominfo.v2d6.domain : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.domain : \ ++ dominfo.v2.domain))) + + #define XEN_GETDOMAININFO_CPUTIME(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.cpu_time : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.cpu_time : \ +- dominfo.v2d5.cpu_time)) ++ (dom_interface_version >= 6 ? \ ++ dominfo.v2d6.cpu_time : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.cpu_time : \ ++ dominfo.v2.cpu_time))) ++ + + #define XEN_GETDOMAININFO_CPUCOUNT(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.nr_online_vcpus : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.nr_online_vcpus : \ +- dominfo.v2d5.nr_online_vcpus)) ++ (dom_interface_version >= 6 ? \ ++ dominfo.v2d6.nr_online_vcpus : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.nr_online_vcpus : \ ++ dominfo.v2.nr_online_vcpus))) + + #define XEN_GETDOMAININFO_MAXCPUID(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.max_vcpu_id : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.max_vcpu_id : \ +- dominfo.v2d5.max_vcpu_id)) ++ (dom_interface_version >= 6 ? \ ++ dominfo.v2d6.max_vcpu_id : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.max_vcpu_id : \ ++ dominfo.v2.max_vcpu_id))) + + #define XEN_GETDOMAININFO_FLAGS(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.flags : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.flags : \ +- dominfo.v2d5.flags)) ++ (dom_interface_version >= 6 ? \ ++ dominfo.v2d6.flags : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.flags : \ ++ dominfo.v2.flags))) + + #define XEN_GETDOMAININFO_TOT_PAGES(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.tot_pages : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.tot_pages : \ +- dominfo.v2d5.tot_pages)) ++ (dom_interface_version >= 6 ? \ ++ dominfo.v2d6.tot_pages : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.tot_pages : \ ++ dominfo.v2.tot_pages))) + + #define XEN_GETDOMAININFO_MAX_PAGES(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.max_pages : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.max_pages : \ +- dominfo.v2d5.max_pages)) ++ (dom_interface_version >= 6 ? \ ++ dominfo.v2d6.max_pages : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.max_pages : \ ++ dominfo.v2.max_pages))) + + #define XEN_GETDOMAININFO_UUID(dominfo) \ + (hypervisor_version < 2 ? \ + dominfo.v0.handle : \ +- (dom_interface_version < 5 ? \ +- dominfo.v2.handle : \ +- dominfo.v2d5.handle)) ++ (dom_interface_version >= 6 ? \ ++ dominfo.v2d6.handle : \ ++ (dom_interface_version == 5 ? \ ++ dominfo.v2d5.handle : \ ++ dominfo.v2.handle))) + + + static int +@@ -2050,6 +2100,12 @@ xenHypervisorInit(void) + DEBUG0("Using hypervisor call v2, sys ver6 dom ver5\n"); + goto done; + } ++ /* Xen 4.0 */ ++ dom_interface_version = 6; /* XEN_DOMCTL_INTERFACE_VERSION */ ++ if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){ ++ DEBUG0("Using hypervisor call v2, sys ver6 dom ver6\n"); ++ goto done; ++ } + } + + hypervisor_version = 1; diff --git a/xend-description-tag.patch b/xend-description-tag.patch deleted file mode 100644 index cd0ef24..0000000 --- a/xend-description-tag.patch +++ /dev/null @@ -1,36 +0,0 @@ -From acba9b620128c4dcdbb95a1ea06604f3013a0518 Mon Sep 17 00:00:00 2001 -From: Jim Fehlig -Date: Mon, 7 Dec 2009 14:24:21 -0700 -Subject: [PATCH] Plumb domain description tag in xend backend - -xen-unstable changesets 20321 and 20521 added support for -description in xend domain config. This patch extends that -support in xend backend. ---- - src/xen/xend_internal.c | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) - -Index: libvirt-0.7.4/src/xen/xend_internal.c -=================================================================== ---- libvirt-0.7.4.orig/src/xen/xend_internal.c -+++ libvirt-0.7.4/src/xen/xend_internal.c -@@ -2360,6 +2360,9 @@ xenDaemonParseSxpr(virConnectPtr conn, - } - virUUIDParse(tmp, def->uuid); - -+ if (sexpr_node_copy(root, "domain/description", &def->description) < 0) -+ goto no_memory; -+ - hvm = sexpr_lookup(root, "domain/image/hvm") ? 1 : 0; - if (!hvm) { - if (sexpr_node_copy(root, "domain/bootloader", -@@ -5676,6 +5679,9 @@ xenDaemonFormatSxpr(virConnectPtr conn, - virUUIDFormat(def->uuid, uuidstr); - virBufferVSprintf(&buf, "(uuid '%s')", uuidstr); - -+ if (def->description) -+ virBufferVSprintf(&buf, "(description '%s')", def->description); -+ - if (def->os.bootloader) { - if (def->os.bootloader[0]) - virBufferVSprintf(&buf, "(bootloader '%s')", def->os.bootloader);