From 36ec00cd38341d82353c9878183d7f7b77c6bfb85b9796ea896facc6d18cb1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Wed, 2 Apr 2014 12:48:46 +0000 Subject: [PATCH] Accepting request 228741 from home:cbosdonnat:branches:Virtualization Updated to 1.2.3 OBS-URL: https://build.opensuse.org/request/show/228741 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=362 --- disable-virCgroupGetPercpuStats-test.patch | 12 +++--- install-apparmor-profiles.patch | 48 +++++++++++----------- libvirt-1.2.2.tar.bz2 | 3 -- libvirt-1.2.3.tar.bz2 | 3 ++ libvirt-suse-netcontrol.patch | 2 +- libvirt.changes | 12 ++++++ libvirt.spec | 6 ++- libvirtd-init-script.patch | 30 +++++++++++--- libxl-hvm-vnc.patch | 12 +++--- suse-qemu-conf.patch | 25 ++++++----- systemd-service-xen.patch | 10 ++--- xen-name-for-devid.patch | 21 +++++----- 12 files changed, 106 insertions(+), 78 deletions(-) delete mode 100644 libvirt-1.2.2.tar.bz2 create mode 100644 libvirt-1.2.3.tar.bz2 diff --git a/disable-virCgroupGetPercpuStats-test.patch b/disable-virCgroupGetPercpuStats-test.patch index 3b102e2..166804a 100644 --- a/disable-virCgroupGetPercpuStats-test.patch +++ b/disable-virCgroupGetPercpuStats-test.patch @@ -1,7 +1,7 @@ -Index: libvirt-1.2.2/tests/vircgrouptest.c +Index: libvirt-1.2.3/tests/vircgrouptest.c =================================================================== ---- libvirt-1.2.2.orig/tests/vircgrouptest.c -+++ libvirt-1.2.2/tests/vircgrouptest.c +--- libvirt-1.2.3.orig/tests/vircgrouptest.c ++++ libvirt-1.2.3/tests/vircgrouptest.c @@ -33,7 +33,6 @@ # include "virlog.h" # include "virfile.h" @@ -10,7 +10,7 @@ Index: libvirt-1.2.2/tests/vircgrouptest.c # define VIR_FROM_THIS VIR_FROM_NONE -@@ -531,68 +530,6 @@ static int testCgroupAvailable(const voi +@@ -533,68 +532,6 @@ static int testCgroupAvailable(const voi return 0; } @@ -71,7 +71,7 @@ Index: libvirt-1.2.2/tests/vircgrouptest.c - - ret = 0; - --cleanup: +- cleanup: - virCgroupFree(&cgroup); - return ret; -} @@ -79,7 +79,7 @@ Index: libvirt-1.2.2/tests/vircgrouptest.c static int testCgroupGetMemoryUsage(const void *args ATTRIBUTE_UNUSED) { virCgroupPtr cgroup = NULL; -@@ -798,9 +735,6 @@ mymain(void) +@@ -800,9 +737,6 @@ mymain(void) if (virtTestRun("virCgroupGetMemoryUsage works", testCgroupGetMemoryUsage, NULL) < 0) ret = -1; diff --git a/install-apparmor-profiles.patch b/install-apparmor-profiles.patch index e2ff460..a78fd31 100644 --- a/install-apparmor-profiles.patch +++ b/install-apparmor-profiles.patch @@ -1,19 +1,13 @@ -Index: libvirt-1.2.2/examples/apparmor/Makefile.am +Index: libvirt-1.2.3/examples/apparmor/Makefile.am =================================================================== ---- libvirt-1.2.2.orig/examples/apparmor/Makefile.am -+++ libvirt-1.2.2/examples/apparmor/Makefile.am -@@ -14,13 +14,25 @@ - ## License along with this library. If not, see - ## . - --EXTRA_DIST= \ -- TEMPLATE \ -- libvirt-qemu \ +--- libvirt-1.2.3.orig/examples/apparmor/Makefile.am ++++ libvirt-1.2.3/examples/apparmor/Makefile.am +@@ -18,10 +18,22 @@ EXTRA_DIST= \ + TEMPLATE \ + libvirt-qemu \ + libvirt-lxc \ - usr.lib.libvirt.virt-aa-helper \ - usr.sbin.libvirtd -+EXTRA_DIST= \ -+ TEMPLATE \ -+ libvirt-qemu \ + usr.lib.libvirt.virt-aa-helper.in \ + usr.sbin.libvirtd.in @@ -33,10 +27,10 @@ Index: libvirt-1.2.2/examples/apparmor/Makefile.am apparmordir = $(sysconfdir)/apparmor.d/ apparmor_DATA = \ usr.lib.libvirt.virt-aa-helper \ -Index: libvirt-1.2.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in +Index: libvirt-1.2.3/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in =================================================================== --- /dev/null -+++ libvirt-1.2.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in ++++ libvirt-1.2.3/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in @@ -0,0 +1,48 @@ +# Last Modified: Mon Apr 5 15:10:27 2010 +#include @@ -86,11 +80,11 @@ Index: libvirt-1.2.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in + /**.[iI][sS][oO] r, + /**/disk{,.*} r, +} -Index: libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd.in +Index: libvirt-1.2.3/examples/apparmor/usr.sbin.libvirtd.in =================================================================== --- /dev/null -+++ libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd.in -@@ -0,0 +1,66 @@ ++++ libvirt-1.2.3/examples/apparmor/usr.sbin.libvirtd.in +@@ -0,0 +1,67 @@ +# Last Modified: Mon Apr 5 15:03:58 2010 +#include +@{LIBVIRT}="libvirt" @@ -106,7 +100,6 @@ Index: libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd.in + capability sys_admin, + capability sys_module, + capability sys_ptrace, -+ capability sys_pacct, + capability sys_nice, + capability sys_chroot, + capability setuid, @@ -118,7 +111,9 @@ Index: libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd.in + capability mknod, + capability fsetid, + capability audit_write, -+ capability ipc_lock, ++ ++ # Needed for vfio ++ capability sys_resource, + + network inet stream, + network inet dgram, @@ -157,9 +152,9 @@ Index: libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd.in + change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*, + +} -Index: libvirt-1.2.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper +Index: libvirt-1.2.3/examples/apparmor/usr.lib.libvirt.virt-aa-helper =================================================================== ---- libvirt-1.2.2.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper +--- libvirt-1.2.3.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper +++ /dev/null @@ -1,48 +0,0 @@ -# Last Modified: Mon Apr 5 15:10:27 2010 @@ -210,11 +205,11 @@ Index: libvirt-1.2.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper - /**.[iI][sS][oO] r, - /**/disk{,.*} r, -} -Index: libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd +Index: libvirt-1.2.3/examples/apparmor/usr.sbin.libvirtd =================================================================== ---- libvirt-1.2.2.orig/examples/apparmor/usr.sbin.libvirtd +--- libvirt-1.2.3.orig/examples/apparmor/usr.sbin.libvirtd +++ /dev/null -@@ -1,60 +0,0 @@ +@@ -1,63 +0,0 @@ -# Last Modified: Mon Apr 5 15:03:58 2010 -#include -@{LIBVIRT}="libvirt" @@ -242,6 +237,9 @@ Index: libvirt-1.2.2/examples/apparmor/usr.sbin.libvirtd - capability fsetid, - capability audit_write, - +- # Needed for vfio +- capability sys_resource, +- - network inet stream, - network inet dgram, - network inet6 stream, diff --git a/libvirt-1.2.2.tar.bz2 b/libvirt-1.2.2.tar.bz2 deleted file mode 100644 index 865b1c9..0000000 --- a/libvirt-1.2.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:237074ec79c2de75c79c05dfaa074543ae5fd75261e7e1f9fc4b8a424bf96692 -size 20497389 diff --git a/libvirt-1.2.3.tar.bz2 b/libvirt-1.2.3.tar.bz2 new file mode 100644 index 0000000..9be8790 --- /dev/null +++ b/libvirt-1.2.3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:030e1da22cbdd98427de96f087e0fbea5f15a2685799af161b4001f287175973 +size 20734026 diff --git a/libvirt-suse-netcontrol.patch b/libvirt-suse-netcontrol.patch index b4c577b..c4a6a34 100644 --- a/libvirt-suse-netcontrol.patch +++ b/libvirt-suse-netcontrol.patch @@ -128,7 +128,7 @@ Index: libvirt-1.2.2/src/interface/interface_backend_netcf.c + vp = VIR_LOG_DEBUG; + break; + } -+ virLogMessage(VIR_LOG_FROM_FILE, vp, file, line, func, 0, "%s", msg); ++ virLogMessage(&virLogSelf, vp, file, line, func, 0, "%s", msg); +} +#endif diff --git a/libvirt.changes b/libvirt.changes index 6c10d99..009b571 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Apr 2 12:06:04 UTC 2014 - cbosdonnat@suse.com + +- Update to libvirt 1.2.3 + - add new virDomainCoreDumpWithFormat API + - conf: Introduce virDomainDeviceGetInfo API + - more features and fixes on bhyve driver + - lot of cleanups and improvement on the Xen driver + - Many incremental improvements and bug fixes, see + http://libvirt.org/news.html + + ------------------------------------------------------------------- Fri Mar 14 13:44:06 MDT 2014 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index 0603a69..4302648 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -235,7 +235,7 @@ Name: libvirt Url: http://libvirt.org/ -Version: 1.2.2 +Version: 1.2.3 Release: 0 Summary: Library providing a simple virtualization API License: LGPL-2.1+ @@ -1319,7 +1319,8 @@ rm -rf $RPM_BUILD_ROOT cd tests make # These tests don't current work in a mock build root -for i in nodeinfotest seclabeltest +# qemuargv2xmltest: needs qemu user/group to be setup +for i in nodeinfotest seclabeltest qemuxml2argvtest do rm -f $i printf 'int main(void) { return 0; }' > $i.c @@ -1475,6 +1476,7 @@ fi %config(noreplace) %{_sysconfdir}/apparmor.d/usr.sbin.libvirtd %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.libvirt.virt-aa-helper %config(noreplace) %{_sysconfdir}/apparmor.d/abstractions/libvirt-qemu +%config(noreplace) %{_sysconfdir}/apparmor.d/abstractions/libvirt-lxc %config(noreplace) %{_sysconfdir}/apparmor.d/libvirt/TEMPLATE %{_libdir}/%{name}/virt-aa-helper %endif diff --git a/libvirtd-init-script.patch b/libvirtd-init-script.patch index eeb20e0..7c1f74f 100644 --- a/libvirtd-init-script.patch +++ b/libvirtd-init-script.patch @@ -1,9 +1,9 @@ Adjust libvirtd sysconfig file to conform to SUSE standards -Index: libvirt-1.2.2/daemon/libvirtd.sysconf +Index: libvirt-1.2.3/daemon/libvirtd.sysconf =================================================================== ---- libvirt-1.2.2.orig/daemon/libvirtd.sysconf -+++ libvirt-1.2.2/daemon/libvirtd.sysconf +--- libvirt-1.2.3.orig/daemon/libvirtd.sysconf ++++ libvirt-1.2.3/daemon/libvirtd.sysconf @@ -1,16 +1,25 @@ +## Path: System/Virtualization/libvirt + @@ -34,13 +34,31 @@ Index: libvirt-1.2.2/daemon/libvirtd.sysconf # Override the QEMU/SDL default audio driver probing when # starting virtual machines using SDL graphics # -@@ -20,5 +29,7 @@ +@@ -20,14 +29,16 @@ # #SDL_AUDIODRIVER=pulse --# Override the maximum number of opened files +-# Override the maximum number of opened files. +-# This only works with traditional init scripts. +-# In the systemd world, the limit can only be changed by overriding +-# LimitNOFILE for libvirtd.service. To do that, just create a *.conf +-# file in /etc/systemd/system/libvirtd.service.d/ (for example +-# /etc/systemd/system/libvirtd.service.d/openfiles.conf) and write +-# the following two lines in it: +-# [Service] +-# LimitNOFILE=2048 +-# -#LIBVIRTD_NOFILES_LIMIT=2048 +## Type: integer +## Default: 2048 -+## Override the maximum number of opened files ++## Override the maximum number of opened files. ++## This only works with traditional init scripts. ++## In the systemd world, the limit can only be changed by overriding ++## LimitNOFILE for libvirtd.service. To do that, just create a *.conf ++## file in /etc/systemd/system/libvirtd.service.d/ (for example ++## /etc/systemd/system/libvirtd.service.d/openfiles.conf) and write ++## the following two lines in it: ++## [Service] ++## LimitNOFILE=2048 ++## +LIBVIRTD_NOFILES_LIMIT=2048 diff --git a/libxl-hvm-vnc.patch b/libxl-hvm-vnc.patch index 66c37ae..e18c7f9 100644 --- a/libxl-hvm-vnc.patch +++ b/libxl-hvm-vnc.patch @@ -1,8 +1,8 @@ -Index: libvirt-1.2.2/src/libxl/libxl_conf.c +Index: libvirt-1.2.3/src/libxl/libxl_conf.c =================================================================== ---- libvirt-1.2.2.orig/src/libxl/libxl_conf.c -+++ libvirt-1.2.2/src/libxl/libxl_conf.c -@@ -565,6 +565,30 @@ libxlMakeChrdevStr(virDomainChrDefPtr de +--- libvirt-1.2.3.orig/src/libxl/libxl_conf.c ++++ libvirt-1.2.3/src/libxl/libxl_conf.c +@@ -567,6 +567,30 @@ libxlMakeChrdevStr(virDomainChrDefPtr de } static int @@ -33,8 +33,8 @@ Index: libvirt-1.2.2/src/libxl/libxl_conf.c libxlMakeDomBuildInfo(virDomainObjPtr vm, libxl_domain_config *d_config) { virDomainDefPtr def = vm->def; -@@ -1195,6 +1219,9 @@ libxlBuildDomainConfig(libxlDriverPrivat - if (libxlMakeVfbList(driver, def, d_config) < 0) +@@ -1322,6 +1346,9 @@ libxlBuildDomainConfig(libxlDriverPrivat + if (libxlMakePciList(def, d_config) < 0) return -1; + if (libxlFixupDomBuildInfo(def, d_config) < 0) diff --git a/suse-qemu-conf.patch b/suse-qemu-conf.patch index 095e46c..fd93293 100644 --- a/suse-qemu-conf.patch +++ b/suse-qemu-conf.patch @@ -1,7 +1,7 @@ -Index: libvirt-1.2.2/src/qemu/qemu.conf +Index: libvirt-1.2.3/src/qemu/qemu.conf =================================================================== ---- libvirt-1.2.2.orig/src/qemu/qemu.conf -+++ libvirt-1.2.2/src/qemu/qemu.conf +--- libvirt-1.2.3.orig/src/qemu/qemu.conf ++++ libvirt-1.2.3/src/qemu/qemu.conf @@ -200,7 +200,16 @@ # a special value; security_driver can be set to that value in # isolation, but it cannot appear in a list of drivers. @@ -19,13 +19,15 @@ Index: libvirt-1.2.2/src/qemu/qemu.conf # If set to non-zero, then the default security labeling # will make guests confined. If set to zero, then guests -@@ -402,10 +411,25 @@ +@@ -402,11 +411,22 @@ #allow_disk_format_probing = 1 --# To enable 'Sanlock' project based locking of the file --# content (to prevent two VMs writing to the same --# disk), uncomment this +-# In order to prevent accidentally starting two domains that +-# share one writable disk, libvirt offers two approaches for +-# locking files. The first one is sanlock, the other one, +-# virtlockd, is then our own implementation. Accepted values +-# are "sanlock" and "lockd". +# SUSE note: +# Two lock managers are supported: lockd and sanlock. lockd, which +# is provided by the virtlockd service, uses advisory locks (flock(2)) @@ -40,11 +42,8 @@ Index: libvirt-1.2.2/src/qemu/qemu.conf +# has the disadvantage of not being able to be restarted without +# first terminating all virtual machines for which it holds leases. +# -+# To enable lockd or sanlock based protection of virtual machine disk -+# content (to prevent two VMs writing to the same disk), uncomment one -+# of the following ++# Specify lockd or sanlock to enable protection of virtual machine disk ++# content. # -+#lock_manager = "lockd" - #lock_manager = "sanlock" - + #lock_manager = "lockd" diff --git a/systemd-service-xen.patch b/systemd-service-xen.patch index 30348f0..82ed548 100644 --- a/systemd-service-xen.patch +++ b/systemd-service-xen.patch @@ -1,11 +1,11 @@ -Index: libvirt-1.2.2/daemon/libvirtd.service.in +Index: libvirt-1.2.3/daemon/libvirtd.service.in =================================================================== ---- libvirt-1.2.2.orig/daemon/libvirtd.service.in -+++ libvirt-1.2.2/daemon/libvirtd.service.in -@@ -9,6 +9,8 @@ Before=libvirt-guests.service - After=network.target +--- libvirt-1.2.3.orig/daemon/libvirtd.service.in ++++ libvirt-1.2.3/daemon/libvirtd.service.in +@@ -10,6 +10,8 @@ After=network.target After=dbus.service After=iscsid.service + After=apparmor.service +Wants=xencommons.service +After=xencommons.service Documentation=man:libvirtd(8) diff --git a/xen-name-for-devid.patch b/xen-name-for-devid.patch index 2daf61d..5f7073f 100644 --- a/xen-name-for-devid.patch +++ b/xen-name-for-devid.patch @@ -14,11 +14,11 @@ is inactive. We obviously can't search xenstore when the domain is inactive. -Index: libvirt-1.2.2/src/xen/xend_internal.c +Index: libvirt-1.2.3/src/xen/xend_internal.c =================================================================== ---- libvirt-1.2.2.orig/src/xen/xend_internal.c -+++ libvirt-1.2.2/src/xen/xend_internal.c -@@ -70,7 +70,7 @@ +--- libvirt-1.2.3.orig/src/xen/xend_internal.c ++++ libvirt-1.2.3/src/xen/xend_internal.c +@@ -72,7 +72,7 @@ VIR_LOG_INIT("xen.xend_internal"); #define XEND_RCV_BUF_MAX_LEN (256 * 1024) static int @@ -27,7 +27,7 @@ Index: libvirt-1.2.2/src/xen/xend_internal.c virDomainDeviceDefPtr dev, char *class, char *ref, int ref_len); -@@ -3326,18 +3326,18 @@ xenDaemonDomainBlockPeek(virConnectPtr c +@@ -3328,37 +3328,35 @@ xenDaemonDomainBlockPeek(virConnectPtr c * Returns 0 in case of success, -1 in case of failure. */ static int @@ -43,14 +43,13 @@ Index: libvirt-1.2.2/src/xen/xend_internal.c - char *xref; - char *tmp; + unsigned int i; + const char *driver = virDomainDiskGetDriver(dev->data.disk); if (dev->type == VIR_DOMAIN_DEVICE_DISK) { + if (dev->data.disk->dst == NULL) + return -1; - if (dev->data.disk->driverName && - STREQ(dev->data.disk->driverName, "tap")) - strcpy(class, "tap"); -@@ -3347,19 +3347,17 @@ virDomainXMLDevID(virConnectPtr conn, + if (STREQ_NULLABLE(driver, "tap") || STREQ_NULLABLE(driver, "tap2")) + strcpy(class, driver); else strcpy(class, "vbd"); @@ -81,7 +80,7 @@ Index: libvirt-1.2.2/src/xen/xend_internal.c } else if (dev->type == VIR_DOMAIN_DEVICE_NET) { char mac[VIR_MAC_STRING_BUFLEN]; virDomainNetDefPtr netdef = dev->data.net; -@@ -3367,16 +3365,22 @@ virDomainXMLDevID(virConnectPtr conn, +@@ -3366,16 +3364,22 @@ virDomainXMLDevID(virConnectPtr conn, strcpy(class, "vif"); @@ -114,7 +113,7 @@ Index: libvirt-1.2.2/src/xen/xend_internal.c } else if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV && dev->data.hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && dev->data.hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) { -@@ -3392,17 +3396,44 @@ virDomainXMLDevID(virConnectPtr conn, +@@ -3391,17 +3395,44 @@ virDomainXMLDevID(virConnectPtr conn, strcpy(class, "pci");