From e27e06d4828cfa6f9f410da17f94e58890bbc4c5590f2223d943608a89a76460 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Sat, 13 Aug 2016 00:51:10 +0000 Subject: [PATCH 1/2] Accepting request 419115 from home:jfehlig:branches:Virtualization - Update to libvirt 2.1.0 - New subpackages libvirt-libs and libvirt-admin - Many incremental improvements and bug fixes, see http://libvirt.org/news.html - Dropped patches: c8f08e48-systemd-notify-fix.patch - qemu: fix qemu.conf security_driver regression in 2.1.0 release 856965b3-qemu-secdriver.patch OBS-URL: https://build.opensuse.org/request/show/419115 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=562 --- 856965b3-qemu-secdriver.patch | 28 +++++++ apparmor-fixes.patch | 6 +- apparmor-no-mount.patch | 6 +- apparmor-qemu-bridge-helper.patch | 21 +++--- blockcopy-check-dst-identical-device.patch | 8 +- c8f08e48-systemd-notify-fix.patch | 46 ------------ cpumodel-vendor-crash-fix.patch | 6 +- libvirt-2.0.0.tar.xz | 3 - libvirt-2.0.0.tar.xz.asc | 7 -- libvirt-2.1.0.tar.xz | 3 + libvirt-2.1.0.tar.xz.asc | 7 ++ libvirt-guests-init-script.patch | 18 ++--- libvirt-power8-models.patch | 6 +- libvirt-suse-netcontrol.patch | 38 +++++----- libvirt.changes | 12 +++ libvirt.spec | 85 ++++++++++++++-------- libvirtd-defaults.patch | 20 ++--- libvirtd-init-script.patch | 6 +- libxl-dom-reset.patch | 10 +-- libxl-qemu-emulator-caps.patch | 6 +- libxl-set-cach-mode.patch | 8 +- libxl-set-migration-constraints.patch | 46 ++++++------ libxl-support-block-script.patch | 12 +-- lxc-wait-after-eth-del.patch | 22 +++--- pci-use-driver-override-sysfs.patch | 6 +- ppc64le-canonical-name.patch | 6 +- qemu-apparmor-screenshot.patch | 6 +- support-managed-pci-xen-driver.patch | 12 +-- suse-qemu-conf.patch | 6 +- systemd-service-xen.patch | 6 +- virtlockd-init-script.patch | 12 +-- virtlogd-init-script.patch | 12 +-- xen-pv-cdrom.patch | 6 +- xen-sxpr-disk-type.patch | 6 +- 34 files changed, 262 insertions(+), 246 deletions(-) create mode 100644 856965b3-qemu-secdriver.patch delete mode 100644 c8f08e48-systemd-notify-fix.patch delete mode 100644 libvirt-2.0.0.tar.xz delete mode 100644 libvirt-2.0.0.tar.xz.asc create mode 100644 libvirt-2.1.0.tar.xz create mode 100644 libvirt-2.1.0.tar.xz.asc diff --git a/856965b3-qemu-secdriver.patch b/856965b3-qemu-secdriver.patch new file mode 100644 index 0000000..e47b576 --- /dev/null +++ b/856965b3-qemu-secdriver.patch @@ -0,0 +1,28 @@ +commit 856965b36246b26002af409262846317477ea631 +Author: Cole Robinson +Date: Wed Aug 10 10:32:03 2016 -0400 + + qemu: fix qemu.conf security_driver + + Since a9331394 (first release v2.1.0), specifying a manual + security_driver setting in qemu.conf causes the daemon to fail to + start, erroring with 'Duplicate security driver X'. + + The duplicate checking was incorrectly comparing every entry + against itself, guaranteeing a false positive. + + https://bugzilla.redhat.com/show_bug.cgi?id=1365607 + +Index: libvirt-2.1.0/src/qemu/qemu_conf.c +=================================================================== +--- libvirt-2.1.0.orig/src/qemu/qemu_conf.c ++++ libvirt-2.1.0/src/qemu/qemu_conf.c +@@ -431,7 +431,7 @@ int virQEMUDriverConfigLoadFile(virQEMUD + goto cleanup; + + for (i = 0; cfg->securityDriverNames && cfg->securityDriverNames[i] != NULL; i++) { +- for (j = i; cfg->securityDriverNames[j] != NULL; j++) { ++ for (j = i + 1; cfg->securityDriverNames[j] != NULL; j++) { + if (STREQ(cfg->securityDriverNames[i], + cfg->securityDriverNames[j])) { + virReportError(VIR_ERR_CONF_SYNTAX, diff --git a/apparmor-fixes.patch b/apparmor-fixes.patch index 37f34b9..df8b5c6 100644 --- a/apparmor-fixes.patch +++ b/apparmor-fixes.patch @@ -1,7 +1,7 @@ -Index: libvirt-2.0.0/examples/apparmor/libvirt-qemu +Index: libvirt-2.1.0/examples/apparmor/libvirt-qemu =================================================================== ---- libvirt-2.0.0.orig/examples/apparmor/libvirt-qemu -+++ libvirt-2.0.0/examples/apparmor/libvirt-qemu +--- libvirt-2.1.0.orig/examples/apparmor/libvirt-qemu ++++ libvirt-2.1.0/examples/apparmor/libvirt-qemu @@ -143,6 +143,9 @@ # for restore /bin/bash rmix, diff --git a/apparmor-no-mount.patch b/apparmor-no-mount.patch index ed32d54..f7ae4d4 100644 --- a/apparmor-no-mount.patch +++ b/apparmor-no-mount.patch @@ -1,7 +1,7 @@ -Index: libvirt-2.0.0/examples/apparmor/libvirt-lxc +Index: libvirt-2.1.0/examples/apparmor/libvirt-lxc =================================================================== ---- libvirt-2.0.0.orig/examples/apparmor/libvirt-lxc -+++ libvirt-2.0.0/examples/apparmor/libvirt-lxc +--- libvirt-2.1.0.orig/examples/apparmor/libvirt-lxc ++++ libvirt-2.1.0/examples/apparmor/libvirt-lxc @@ -2,39 +2,15 @@ #include diff --git a/apparmor-qemu-bridge-helper.patch b/apparmor-qemu-bridge-helper.patch index c472caa..a3fddca 100644 --- a/apparmor-qemu-bridge-helper.patch +++ b/apparmor-qemu-bridge-helper.patch @@ -10,11 +10,11 @@ from the qemu domain abstraction to the usr.sbin.libvirtd profile. examples/apparmor/usr.sbin.libvirtd | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 19 deletions(-) -diff --git a/examples/apparmor/libvirt-qemu b/examples/apparmor/libvirt-qemu -index efb4873..11381d4 100644 ---- a/examples/apparmor/libvirt-qemu -+++ b/examples/apparmor/libvirt-qemu -@@ -148,22 +148,3 @@ +Index: libvirt-2.1.0/examples/apparmor/libvirt-qemu +=================================================================== +--- libvirt-2.1.0.orig/examples/apparmor/libvirt-qemu ++++ libvirt-2.1.0/examples/apparmor/libvirt-qemu +@@ -151,22 +151,3 @@ /etc/udev/udev.conf r, /sys/bus/ r, /sys/class/ r, @@ -37,10 +37,10 @@ index efb4873..11381d4 100644 - - /usr/{lib,libexec}/qemu-bridge-helper rmix, - } -diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd -index 23f70f5..48651b2 100644 ---- a/examples/apparmor/usr.sbin.libvirtd -+++ b/examples/apparmor/usr.sbin.libvirtd +Index: libvirt-2.1.0/examples/apparmor/usr.sbin.libvirtd +=================================================================== +--- libvirt-2.1.0.orig/examples/apparmor/usr.sbin.libvirtd ++++ libvirt-2.1.0/examples/apparmor/usr.sbin.libvirtd @@ -67,4 +67,22 @@ # allow changing to our UUID-based named profiles change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*, @@ -64,6 +64,3 @@ index 23f70f5..48651b2 100644 + /usr/{lib,libexec}/qemu-bridge-helper rmix, + } } --- -2.6.6 - diff --git a/blockcopy-check-dst-identical-device.patch b/blockcopy-check-dst-identical-device.patch index 7a41296..d3fe4b9 100644 --- a/blockcopy-check-dst-identical-device.patch +++ b/blockcopy-check-dst-identical-device.patch @@ -11,11 +11,11 @@ Signed-off-by: Chunyan Liu src/qemu/qemu_driver.c | 7 +++++++ 1 file changed, 7 insertions(+) -Index: libvirt-2.0.0/src/qemu/qemu_driver.c +Index: libvirt-2.1.0/src/qemu/qemu_driver.c =================================================================== ---- libvirt-2.0.0.orig/src/qemu/qemu_driver.c -+++ libvirt-2.0.0/src/qemu/qemu_driver.c -@@ -16292,6 +16292,15 @@ qemuDomainBlockCopyCommon(virDomainObjPt +--- libvirt-2.1.0.orig/src/qemu/qemu_driver.c ++++ libvirt-2.1.0/src/qemu/qemu_driver.c +@@ -16327,6 +16327,15 @@ qemuDomainBlockCopyCommon(virDomainObjPt _("non-file destination not supported yet")); goto endjob; } diff --git a/c8f08e48-systemd-notify-fix.patch b/c8f08e48-systemd-notify-fix.patch deleted file mode 100644 index 19cf089..0000000 --- a/c8f08e48-systemd-notify-fix.patch +++ /dev/null @@ -1,46 +0,0 @@ -commit c8f08e487672afcaa53629bddbc6703b5d90e846 -Author: Jim Fehlig -Date: Mon Jul 11 17:26:48 2016 -0600 - - systemd: fix ready notification on abstract socket - - At least with systemd v210, NOTIFY_SOCKET is abstact, e.g. - @/org/freedesktop/systemd1/notify. sendmsg() fails on such a socket - with "Connection refused". The unix(7) man page contains the following - details wrt abstract socket addresses - - abstract: an abstract socket address is distinguished (from a - pathname socket) by the fact that sun_path[0] is a null byte - ('\0'). The socket's address in this namespace is given by the - additional bytes in sun_path that are covered by the specified - length of the address structure. (Null bytes in the name have - no special significance.) - - So we need to be more precise about the address length, setting it to - the sizeof sa_family_t + length of address copied to sun_path instead - of setting it to the sizeof the entire sockaddr_un struct. - - Resolves: https://bugzilla.opensuse.org/show_bug.cgi?id=987668 - Signed-off-by: Jim Fehlig - -Index: libvirt-2.0.0/src/util/virsystemd.c -=================================================================== ---- libvirt-2.0.0.orig/src/util/virsystemd.c -+++ libvirt-2.0.0/src/util/virsystemd.c -@@ -495,7 +495,6 @@ virSystemdNotifyStartup(void) - }; - struct msghdr mh = { - .msg_name = &un, -- .msg_namelen = sizeof(un), - .msg_iov = &iov, - .msg_iovlen = 1, - }; -@@ -515,6 +514,8 @@ virSystemdNotifyStartup(void) - if (un.sun_path[0] == '@') - un.sun_path[0] = '\0'; - -+ mh.msg_namelen = offsetof(struct sockaddr_un, sun_path) + strlen(path); -+ - fd = socket(AF_UNIX, SOCK_DGRAM, 0); - if (fd < 0) { - VIR_WARN("Unable to create socket FD"); diff --git a/cpumodel-vendor-crash-fix.patch b/cpumodel-vendor-crash-fix.patch index 51aab51..f3b6422 100644 --- a/cpumodel-vendor-crash-fix.patch +++ b/cpumodel-vendor-crash-fix.patch @@ -41,10 +41,10 @@ Signed-off-by: Jim Fehlig src/cpu/cpu_x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: libvirt-2.0.0/src/cpu/cpu_x86.c +Index: libvirt-2.1.0/src/cpu/cpu_x86.c =================================================================== ---- libvirt-2.0.0.orig/src/cpu/cpu_x86.c -+++ libvirt-2.0.0/src/cpu/cpu_x86.c +--- libvirt-2.1.0.orig/src/cpu/cpu_x86.c ++++ libvirt-2.1.0/src/cpu/cpu_x86.c @@ -1576,7 +1576,7 @@ x86Compute(virCPUDefPtr host, if (!(guest_model = x86ModelCopy(host_model))) goto error; diff --git a/libvirt-2.0.0.tar.xz b/libvirt-2.0.0.tar.xz deleted file mode 100644 index 4b39480..0000000 --- a/libvirt-2.0.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:10e90af55e613953c0ddc60b4ac3a10c73c0f3493d7014259e3f012b2ffc9acb -size 13161096 diff --git a/libvirt-2.0.0.tar.xz.asc b/libvirt-2.0.0.tar.xz.asc deleted file mode 100644 index 1c6f845..0000000 --- a/libvirt-2.0.0.tar.xz.asc +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iEYEABECAAYFAld2MUcACgkQRga4pd6VvB8KZwCgmfElUahCJKGN6KEKIdDmjNWT -snoAnAn/J4imekmwJeGGJTBY4S8Izdv4 -=UgFQ ------END PGP SIGNATURE----- diff --git a/libvirt-2.1.0.tar.xz b/libvirt-2.1.0.tar.xz new file mode 100644 index 0000000..0947943 --- /dev/null +++ b/libvirt-2.1.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a799562337472ab00f76aa30a53d54c623c96633070ec53286c9cc2a456316b +size 13212368 diff --git a/libvirt-2.1.0.tar.xz.asc b/libvirt-2.1.0.tar.xz.asc new file mode 100644 index 0000000..e001503 --- /dev/null +++ b/libvirt-2.1.0.tar.xz.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iEYEABECAAYFAlegWv0ACgkQRga4pd6VvB/vGQCfejAVwz1SJ4U7YX8PmACZpvtd +1ooAn0QkbzRWsIsMr7WINWK3pb2HELFy +=NPFm +-----END PGP SIGNATURE----- diff --git a/libvirt-guests-init-script.patch b/libvirt-guests-init-script.patch index 4d4ab71..9fb817d 100644 --- a/libvirt-guests-init-script.patch +++ b/libvirt-guests-init-script.patch @@ -1,9 +1,9 @@ Adjust libvirt-guests init files to conform to SUSE standards -Index: libvirt-2.0.0/tools/libvirt-guests.init.in +Index: libvirt-2.1.0/tools/libvirt-guests.init.in =================================================================== ---- libvirt-2.0.0.orig/tools/libvirt-guests.init.in -+++ libvirt-2.0.0/tools/libvirt-guests.init.in +--- libvirt-2.1.0.orig/tools/libvirt-guests.init.in ++++ libvirt-2.1.0/tools/libvirt-guests.init.in @@ -4,27 +4,27 @@ # http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html # @@ -45,10 +45,10 @@ Index: libvirt-2.0.0/tools/libvirt-guests.init.in # exec @libexecdir@/libvirt-guests.sh "$@" -Index: libvirt-2.0.0/tools/libvirt-guests.sh.in +Index: libvirt-2.1.0/tools/libvirt-guests.sh.in =================================================================== ---- libvirt-2.0.0.orig/tools/libvirt-guests.sh.in -+++ libvirt-2.0.0/tools/libvirt-guests.sh.in +--- libvirt-2.1.0.orig/tools/libvirt-guests.sh.in ++++ libvirt-2.1.0/tools/libvirt-guests.sh.in @@ -16,14 +16,13 @@ # License along with this library. If not, see # . @@ -208,10 +208,10 @@ Index: libvirt-2.0.0/tools/libvirt-guests.sh.in esac -exit $RETVAL +rc_exit -Index: libvirt-2.0.0/tools/libvirt-guests.sysconf +Index: libvirt-2.1.0/tools/libvirt-guests.sysconf =================================================================== ---- libvirt-2.0.0.orig/tools/libvirt-guests.sysconf -+++ libvirt-2.0.0/tools/libvirt-guests.sysconf +--- libvirt-2.1.0.orig/tools/libvirt-guests.sysconf ++++ libvirt-2.1.0/tools/libvirt-guests.sysconf @@ -1,19 +1,29 @@ +## Path: System/Virtualization/libvirt-guests + diff --git a/libvirt-power8-models.patch b/libvirt-power8-models.patch index 27b3f5b..fad9fd9 100644 --- a/libvirt-power8-models.patch +++ b/libvirt-power8-models.patch @@ -1,7 +1,7 @@ -Index: libvirt-2.0.0/src/cpu/cpu_map.xml +Index: libvirt-2.1.0/src/cpu/cpu_map.xml =================================================================== ---- libvirt-2.0.0.orig/src/cpu/cpu_map.xml -+++ libvirt-2.0.0/src/cpu/cpu_map.xml +--- libvirt-2.1.0.orig/src/cpu/cpu_map.xml ++++ libvirt-2.1.0/src/cpu/cpu_map.xml @@ -1542,6 +1542,16 @@ diff --git a/libvirt-suse-netcontrol.patch b/libvirt-suse-netcontrol.patch index a277060..85a09d6 100644 --- a/libvirt-suse-netcontrol.patch +++ b/libvirt-suse-netcontrol.patch @@ -1,7 +1,7 @@ -Index: libvirt-2.0.0/configure.ac +Index: libvirt-2.1.0/configure.ac =================================================================== ---- libvirt-2.0.0.orig/configure.ac -+++ libvirt-2.0.0/configure.ac +--- libvirt-2.1.0.orig/configure.ac ++++ libvirt-2.1.0/configure.ac @@ -248,6 +248,7 @@ LIBVIRT_CHECK_FUSE LIBVIRT_CHECK_GLUSTER LIBVIRT_CHECK_HAL @@ -34,11 +34,11 @@ Index: libvirt-2.0.0/configure.ac LIBVIRT_RESULT_NUMACTL LIBVIRT_RESULT_OPENWSMAN LIBVIRT_RESULT_PCIACCESS -Index: libvirt-2.0.0/src/Makefile.am +Index: libvirt-2.1.0/src/Makefile.am =================================================================== ---- libvirt-2.0.0.orig/src/Makefile.am -+++ libvirt-2.0.0/src/Makefile.am -@@ -943,6 +943,10 @@ if WITH_NETCF +--- libvirt-2.1.0.orig/src/Makefile.am ++++ libvirt-2.1.0/src/Makefile.am +@@ -945,6 +945,10 @@ if WITH_NETCF INTERFACE_DRIVER_SOURCES += \ interface/interface_backend_netcf.c endif WITH_NETCF @@ -49,7 +49,7 @@ Index: libvirt-2.0.0/src/Makefile.am if WITH_UDEV INTERFACE_DRIVER_SOURCES += \ interface/interface_backend_udev.c -@@ -1589,6 +1593,10 @@ if WITH_NETCF +@@ -1590,6 +1594,10 @@ if WITH_NETCF libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS) libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS) endif WITH_NETCF @@ -60,10 +60,10 @@ Index: libvirt-2.0.0/src/Makefile.am if WITH_UDEV libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS) libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS) -Index: libvirt-2.0.0/tools/virsh.c +Index: libvirt-2.1.0/tools/virsh.c =================================================================== ---- libvirt-2.0.0.orig/tools/virsh.c -+++ libvirt-2.0.0/tools/virsh.c +--- libvirt-2.1.0.orig/tools/virsh.c ++++ libvirt-2.1.0/tools/virsh.c @@ -636,6 +636,8 @@ virshShowVersion(vshControl *ctl ATTRIBU vshPrint(ctl, " Interface"); # if defined(WITH_NETCF) @@ -73,10 +73,10 @@ Index: libvirt-2.0.0/tools/virsh.c # elif defined(WITH_UDEV) vshPrint(ctl, " udev"); # endif -Index: libvirt-2.0.0/src/interface/interface_backend_netcf.c +Index: libvirt-2.1.0/src/interface/interface_backend_netcf.c =================================================================== ---- libvirt-2.0.0.orig/src/interface/interface_backend_netcf.c -+++ libvirt-2.0.0/src/interface/interface_backend_netcf.c +--- libvirt-2.1.0.orig/src/interface/interface_backend_netcf.c ++++ libvirt-2.1.0/src/interface/interface_backend_netcf.c @@ -23,7 +23,12 @@ #include @@ -160,10 +160,10 @@ Index: libvirt-2.0.0/src/interface/interface_backend_netcf.c if (virSetSharedInterfaceDriver(&interfaceDriver) < 0) return -1; if (virRegisterStateDriver(&interfaceStateDriver) < 0) -Index: libvirt-2.0.0/src/interface/interface_driver.c +Index: libvirt-2.1.0/src/interface/interface_driver.c =================================================================== ---- libvirt-2.0.0.orig/src/interface/interface_driver.c -+++ libvirt-2.0.0/src/interface/interface_driver.c +--- libvirt-2.1.0.orig/src/interface/interface_driver.c ++++ libvirt-2.1.0/src/interface/interface_driver.c @@ -30,8 +30,15 @@ interfaceRegister(void) if (netcfIfaceRegister() == 0) return 0; @@ -181,10 +181,10 @@ Index: libvirt-2.0.0/src/interface/interface_driver.c if (udevIfaceRegister() == 0) return 0; #endif /* WITH_UDEV */ -Index: libvirt-2.0.0/m4/virt-netcontrol.m4 +Index: libvirt-2.1.0/m4/virt-netcontrol.m4 =================================================================== --- /dev/null -+++ libvirt-2.0.0/m4/virt-netcontrol.m4 ++++ libvirt-2.1.0/m4/virt-netcontrol.m4 @@ -0,0 +1,35 @@ +dnl The libnetcontrol library +dnl diff --git a/libvirt.changes b/libvirt.changes index 0460a11..f6ec8f8 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Aug 12 15:29:37 UTC 2016 - jfehlig@suse.com + +- Update to libvirt 2.1.0 + - New subpackages libvirt-libs and libvirt-admin + - Many incremental improvements and bug fixes, see + http://libvirt.org/news.html + - Dropped patches: + c8f08e48-systemd-notify-fix.patch +- qemu: fix qemu.conf security_driver regression in 2.1.0 release + 856965b3-qemu-secdriver.patch + ------------------------------------------------------------------- Fri Aug 5 22:27:44 UTC 2016 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index de2575d..e2be5d2 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -127,7 +127,7 @@ # For arm %ifarch aarch64 -# enable on anything newer than 1320, or SLE12 family newer than 120100 +# enable on anything newer than 1320, or SLE12 newer than 120100 # use librbd-devel as build dependency %if 0%{?suse_version} > 1320 || ( 0%{?is_opensuse} == 0 && 0%{?sle_version} > 120100 ) %define with_storage_rbd 0%{!?_without_storage_rbd:1} @@ -174,7 +174,7 @@ Name: libvirt Url: http://libvirt.org/ -Version: 2.0.0 +Version: 2.1.0 Release: 0 Summary: Library providing a simple virtualization API License: LGPL-2.1+ @@ -208,6 +208,7 @@ Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} Requires: libvirt-daemon-driver-secret = %{version}-%{release} Requires: libvirt-daemon-driver-storage = %{version}-%{release} +Requires: libvirt-libs = %{version}-%{release} # All build-time requirements. Run-time requirements are # listed against each sub-RPM @@ -297,7 +298,7 @@ BuildRequires: systemtap-sdt-devel BuildRequires: numad %endif %if %{with_wireshark} -BuildRequires: wireshark-devel +BuildRequires: wireshark-devel >= 1.12.1 %endif %if %{with_qemu} # BuildRequire qemu-tools so configure can detect qemu-bridge-helper @@ -313,7 +314,7 @@ Source4: libvirtd-relocation-server.fw Source99: baselibs.conf Source100: %{name}-rpmlintrc # Upstream patches -Patch0: c8f08e48-systemd-notify-fix.patch +Patch0: 856965b3-qemu-secdriver.patch # Patches pending upstream review Patch100: libxl-dom-reset.patch Patch101: pci-use-driver-override-sysfs.patch @@ -376,8 +377,8 @@ Group: Development/Libraries/C and C++ # All runtime requirements for the libvirt package (runtime requirements # for subpackages are listed later in those subpackages) -# The client side, i.e. shared libs and virsh are in a subpackage -Requires: %{name}-client = %{version}-%{release} +# The client side, i.e. shared libs are in a subpackage +Requires: %{name}-libs = %{version}-%{release} # for modprobe of pci devices Requires: modutils @@ -700,25 +701,42 @@ capabilities of VirtualBox %endif %package client -Summary: Client side library and utilities of the libvirt library +Summary: Client side utilities of the libvirt library Group: Development/Libraries/C and C++ +Requires: %{name}-libs = %{version}-%{release} Requires: ncurses Requires: readline -# So remote clients can access libvirt over SSH tunnel -# (client invokes 'nc' against the UNIX socket on the server) -Requires: netcat-openbsd # Needed by libvirt-guests init script. Requires: gettext-runtime # Needed by virt-pki-validate script. Requires: cyrus-sasl Requires: gnutls + +%description client +The client binaries needed to access the virtualization +capabilities of recent versions of Linux (and other OSes). + +%package libs +Summary: Client side libraries +Group: Development/Libraries/C and C++ +# So remote clients can access libvirt over SSH tunnel +# (client invokes 'nc' against the UNIX socket on the server) +Requires: netcat-openbsd # Not technically required, but makes 'out-of-box' config # work correctly & doesn't have onerous dependencies Requires: 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). +%description libs +Shared libraries for accessing the libvirt daemon. + +%package admin +Summary: Set of tools to control libvirt daemon +Group: Development/Libraries/C and C++ +Requires: %{name}-libs = %{version}-%{release} +Requires: readline + +%description admin +The client side utilities to control the libvirt daemon. %package devel Summary: Libraries, includes, etc. to compile with the libvirt library @@ -738,8 +756,8 @@ Summary: Sanlock lock manager plugin for QEMU driver Group: Development/Libraries/C and C++ Requires: sanlock >= 2.4 # for virt-sanlock-cleanup require augeas -Requires: %{name}-client = %{version}-%{release} Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} Requires: augeas %description lock-sanlock @@ -751,7 +769,7 @@ Includes the Sanlock lock manager plugin for the QEMU driver %package -n wireshark-plugin-libvirt Summary: Wireshark plugin for libvirt RPC protocol Group: Productivity/Networking/Diagnostic -Requires: %{name}-client = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} Requires: wireshark %description -n wireshark-plugin-libvirt @@ -984,9 +1002,7 @@ make -C examples distclean cp examples/lxcconvert/virt-lxc-convert $RPM_BUILD_ROOT%{_bindir} rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %if %{with_wireshark} -rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.la -mv $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.so \ - $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/libvirt.so +rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/libvirt.la %endif rm -f $RPM_BUILD_ROOT%{_libdir}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lock-driver/*.la @@ -1240,7 +1256,6 @@ fi %endif %post client -/sbin/ldconfig %if %{with_systemd} %service_add_post libvirt-guests.service %endif @@ -1257,12 +1272,17 @@ if [ $1 = 0 ]; then fi %postun client -/sbin/ldconfig %if %{with_systemd} %service_del_postun libvirt-guests.service %endif %insserv_cleanup +%post libs +/sbin/ldconfig + +%postun libs +/sbin/ldconfig + %post nss /sbin/ldconfig @@ -1481,25 +1501,16 @@ fi %doc %{_docdir}/%{name}/libvirt-daemon-vbox.README %endif -%files client -f %{name}.lang -%doc AUTHORS ChangeLog.gz NEWS README COPYING COPYING.LESSER TODO +%files client %doc %{_mandir}/man1/virsh.1* -%doc %{_mandir}/man1/virt-admin.1* %doc %{_mandir}/man1/virt-xml-validate.1* %doc %{_mandir}/man1/virt-pki-validate.1* %doc %{_mandir}/man1/virt-host-validate.1* -%config(noreplace) %{_sysconfdir}/%{name}/libvirt.conf -%config(noreplace) %{_sysconfdir}/%{name}/libvirt-admin.conf %{_bindir}/virsh -%{_bindir}/virt-admin %{_bindir}/virt-xml-validate %{_bindir}/virt-pki-validate %{_bindir}/virt-host-validate %dir %{_libdir}/%{name} -%{_libdir}/libvirt.so.* -%{_libdir}/libvirt-qemu.so.* -%{_libdir}/libvirt-lxc.so.* -%{_libdir}/libvirt-admin.so.* %attr(0755, root, root) %{_libdir}/%{name}/libvirt-guests.sh %{_localstatedir}/adm/fillup-templates/sysconfig.libvirt-guests %if %{with_systemd} @@ -1509,8 +1520,17 @@ fi %endif %{_sbindir}/rclibvirt-guests +%files libs -f %{name}.lang +%doc AUTHORS ChangeLog.gz NEWS README COPYING COPYING.LESSER TODO +%config(noreplace) %{_sysconfdir}/%{name}/libvirt.conf +%config(noreplace) %{_sysconfdir}/%{name}/libvirt-admin.conf +%{_libdir}/libvirt.so.* +%{_libdir}/libvirt-qemu.so.* +%{_libdir}/libvirt-lxc.so.* +%{_libdir}/libvirt-admin.so.* %dir %{_datadir}/libvirt/ %dir %{_datadir}/libvirt/schemas/ +%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/ %{_datadir}/libvirt/schemas/basictypes.rng %{_datadir}/libvirt/schemas/capability.rng @@ -1529,9 +1549,14 @@ fi %{_datadir}/libvirt/schemas/storagevol.rng %{_datadir}/libvirt/cpu_map.xml %{_datadir}/libvirt/libvirtLogo.png + %dir %{_sysconfdir}/sasl2/ %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf +%files admin +%doc %{_mandir}/man1/virt-admin.1* +%{_bindir}/virt-admin + %files devel %{_libdir}/libvirt.so %{_libdir}/libvirt-admin.so diff --git a/libvirtd-defaults.patch b/libvirtd-defaults.patch index 728431b..7b9013a 100644 --- a/libvirtd-defaults.patch +++ b/libvirtd-defaults.patch @@ -1,7 +1,7 @@ -Index: libvirt-2.0.0/daemon/libvirtd.conf +Index: libvirt-2.1.0/daemon/libvirtd.conf =================================================================== ---- libvirt-2.0.0.orig/daemon/libvirtd.conf -+++ libvirt-2.0.0/daemon/libvirtd.conf +--- libvirt-2.1.0.orig/daemon/libvirtd.conf ++++ libvirt-2.1.0/daemon/libvirtd.conf @@ -18,8 +18,8 @@ # It is necessary to setup a CA and issue server certificates before # using this capability. @@ -13,11 +13,11 @@ Index: libvirt-2.0.0/daemon/libvirtd.conf # Listen for unencrypted TCP connections on the public TCP/IP port. # NB, must pass the --listen flag to the libvirtd process for this to -Index: libvirt-2.0.0/daemon/libvirtd-config.c +Index: libvirt-2.1.0/daemon/libvirtd-config.c =================================================================== ---- libvirt-2.0.0.orig/daemon/libvirtd-config.c -+++ libvirt-2.0.0/daemon/libvirtd-config.c -@@ -242,7 +242,7 @@ daemonConfigNew(bool privileged ATTRIBUT +--- libvirt-2.1.0.orig/daemon/libvirtd-config.c ++++ libvirt-2.1.0/daemon/libvirtd-config.c +@@ -109,7 +109,7 @@ daemonConfigNew(bool privileged ATTRIBUT if (VIR_ALLOC(data) < 0) return NULL; @@ -26,10 +26,10 @@ Index: libvirt-2.0.0/daemon/libvirtd-config.c data->listen_tcp = 0; if (VIR_STRDUP(data->tls_port, LIBVIRTD_TLS_PORT) < 0 || -Index: libvirt-2.0.0/daemon/test_libvirtd.aug.in +Index: libvirt-2.1.0/daemon/test_libvirtd.aug.in =================================================================== ---- libvirt-2.0.0.orig/daemon/test_libvirtd.aug.in -+++ libvirt-2.0.0/daemon/test_libvirtd.aug.in +--- libvirt-2.1.0.orig/daemon/test_libvirtd.aug.in ++++ libvirt-2.1.0/daemon/test_libvirtd.aug.in @@ -2,7 +2,7 @@ module Test_libvirtd = ::CONFIG:: diff --git a/libvirtd-init-script.patch b/libvirtd-init-script.patch index 5951e35..e3331fc 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-2.0.0/daemon/libvirtd.sysconf +Index: libvirt-2.1.0/daemon/libvirtd.sysconf =================================================================== ---- libvirt-2.0.0.orig/daemon/libvirtd.sysconf -+++ libvirt-2.0.0/daemon/libvirtd.sysconf +--- libvirt-2.1.0.orig/daemon/libvirtd.sysconf ++++ libvirt-2.1.0/daemon/libvirtd.sysconf @@ -1,16 +1,25 @@ +## Path: System/Virtualization/libvirt + diff --git a/libxl-dom-reset.patch b/libxl-dom-reset.patch index 6bdb28b..e85a4a5 100644 --- a/libxl-dom-reset.patch +++ b/libxl-dom-reset.patch @@ -8,11 +8,11 @@ Date: Mon Jun 23 15:51:20 2014 -0600 option, but domainReset can be implemented in the libxl driver by forcibly destroying the domain and starting it again. -Index: libvirt-2.0.0/src/libxl/libxl_driver.c +Index: libvirt-2.1.0/src/libxl/libxl_driver.c =================================================================== ---- libvirt-2.0.0.orig/src/libxl/libxl_driver.c -+++ libvirt-2.0.0/src/libxl/libxl_driver.c -@@ -1327,6 +1327,61 @@ libxlDomainReboot(virDomainPtr dom, unsi +--- libvirt-2.1.0.orig/src/libxl/libxl_driver.c ++++ libvirt-2.1.0/src/libxl/libxl_driver.c +@@ -1348,6 +1348,61 @@ libxlDomainReboot(virDomainPtr dom, unsi } static int @@ -74,7 +74,7 @@ Index: libvirt-2.0.0/src/libxl/libxl_driver.c libxlDomainDestroyFlags(virDomainPtr dom, unsigned int flags) { -@@ -5763,6 +5818,7 @@ static virHypervisorDriver libxlHypervis +@@ -6161,6 +6216,7 @@ static virHypervisorDriver libxlHypervis .domainShutdown = libxlDomainShutdown, /* 0.9.0 */ .domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */ .domainReboot = libxlDomainReboot, /* 0.9.0 */ diff --git a/libxl-qemu-emulator-caps.patch b/libxl-qemu-emulator-caps.patch index 3257b79..564bf5d 100644 --- a/libxl-qemu-emulator-caps.patch +++ b/libxl-qemu-emulator-caps.patch @@ -8,10 +8,10 @@ as the default , instead of the qemu-xen one. See FATE#320638 for details. -Index: libvirt-2.0.0/src/libxl/libxl_capabilities.c +Index: libvirt-2.1.0/src/libxl/libxl_capabilities.c =================================================================== ---- libvirt-2.0.0.orig/src/libxl/libxl_capabilities.c -+++ libvirt-2.0.0/src/libxl/libxl_capabilities.c +--- libvirt-2.1.0.orig/src/libxl/libxl_capabilities.c ++++ libvirt-2.1.0/src/libxl/libxl_capabilities.c @@ -36,6 +36,7 @@ #include "domain_capabilities.h" #include "vircommand.h" diff --git a/libxl-set-cach-mode.patch b/libxl-set-cach-mode.patch index b724563..eb8e86d 100644 --- a/libxl-set-cach-mode.patch +++ b/libxl-set-cach-mode.patch @@ -3,10 +3,10 @@ https://bugzilla.novell.com/show_bug.cgi?id=879425 src/libxl/libxl_conf.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) -Index: libvirt-2.0.0/src/libxl/libxl_conf.c +Index: libvirt-2.1.0/src/libxl/libxl_conf.c =================================================================== ---- libvirt-2.0.0.orig/src/libxl/libxl_conf.c -+++ libvirt-2.0.0/src/libxl/libxl_conf.c +--- libvirt-2.1.0.orig/src/libxl/libxl_conf.c ++++ libvirt-2.1.0/src/libxl/libxl_conf.c @@ -562,6 +562,30 @@ libxlDiskSetDiscard(libxl_device_disk *x #endif } @@ -38,7 +38,7 @@ Index: libvirt-2.0.0/src/libxl/libxl_conf.c static char * libxlMakeNetworkDiskSrcStr(virStorageSourcePtr src, const char *username, -@@ -803,6 +827,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk +@@ -804,6 +828,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk x_disk->is_cdrom = l_disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM ? 1 : 0; if (libxlDiskSetDiscard(x_disk, l_disk->discard) < 0) return -1; diff --git a/libxl-set-migration-constraints.patch b/libxl-set-migration-constraints.patch index 35b1cc4..acf7ef8 100644 --- a/libxl-set-migration-constraints.patch +++ b/libxl-set-migration-constraints.patch @@ -16,11 +16,11 @@ Signed-off-by: Jim Fehlig tools/virsh.pod | 8 ++++++++ 6 files changed, 125 insertions(+), 6 deletions(-) -Index: libvirt-2.0.0/include/libvirt/libvirt-domain.h +Index: libvirt-2.1.0/include/libvirt/libvirt-domain.h =================================================================== ---- libvirt-2.0.0.orig/include/libvirt/libvirt-domain.h -+++ libvirt-2.0.0/include/libvirt/libvirt-domain.h -@@ -864,6 +864,31 @@ typedef enum { +--- libvirt-2.1.0.orig/include/libvirt/libvirt-domain.h ++++ libvirt-2.1.0/include/libvirt/libvirt-domain.h +@@ -873,6 +873,31 @@ typedef enum { */ # define VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT "auto_converge.increment" @@ -52,11 +52,11 @@ Index: libvirt-2.0.0/include/libvirt/libvirt-domain.h /* Domain migration. */ virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn, unsigned long flags, const char *dname, -Index: libvirt-2.0.0/src/libxl/libxl_driver.c +Index: libvirt-2.1.0/src/libxl/libxl_driver.c =================================================================== ---- libvirt-2.0.0.orig/src/libxl/libxl_driver.c -+++ libvirt-2.0.0/src/libxl/libxl_driver.c -@@ -5428,6 +5428,9 @@ libxlDomainMigratePerform3Params(virDoma +--- libvirt-2.1.0.orig/src/libxl/libxl_driver.c ++++ libvirt-2.1.0/src/libxl/libxl_driver.c +@@ -5826,6 +5826,9 @@ libxlDomainMigratePerform3Params(virDoma const char *dname = NULL; const char *uri = NULL; int ret = -1; @@ -66,7 +66,7 @@ Index: libvirt-2.0.0/src/libxl/libxl_driver.c #ifdef LIBXL_HAVE_NO_SUSPEND_RESUME virReportUnsupportedError(); -@@ -5444,6 +5447,18 @@ libxlDomainMigratePerform3Params(virDoma +@@ -5842,6 +5845,18 @@ libxlDomainMigratePerform3Params(virDoma virTypedParamsGetString(params, nparams, VIR_MIGRATE_PARAM_DEST_NAME, &dname) < 0 || @@ -85,7 +85,7 @@ Index: libvirt-2.0.0/src/libxl/libxl_driver.c virTypedParamsGetString(params, nparams, VIR_MIGRATE_PARAM_URI, &uri) < 0) -@@ -5458,11 +5473,11 @@ libxlDomainMigratePerform3Params(virDoma +@@ -5856,11 +5871,11 @@ libxlDomainMigratePerform3Params(virDoma if (flags & VIR_MIGRATE_PEER2PEER) { if (libxlDomainMigrationPerformP2P(driver, vm, dom->conn, dom_xml, @@ -99,10 +99,10 @@ Index: libvirt-2.0.0/src/libxl/libxl_driver.c goto cleanup; } -Index: libvirt-2.0.0/src/libxl/libxl_migration.c +Index: libvirt-2.1.0/src/libxl/libxl_migration.c =================================================================== ---- libvirt-2.0.0.orig/src/libxl/libxl_migration.c -+++ libvirt-2.0.0/src/libxl/libxl_migration.c +--- libvirt-2.1.0.orig/src/libxl/libxl_migration.c ++++ libvirt-2.1.0/src/libxl/libxl_migration.c @@ -357,18 +357,39 @@ libxlMigrateReceive(virNetSocketPtr sock static int libxlDoMigrateSend(libxlDriverPrivatePtr driver, @@ -217,10 +217,10 @@ Index: libvirt-2.0.0/src/libxl/libxl_migration.c virObjectLock(vm); cleanup: -Index: libvirt-2.0.0/src/libxl/libxl_migration.h +Index: libvirt-2.1.0/src/libxl/libxl_migration.h =================================================================== ---- libvirt-2.0.0.orig/src/libxl/libxl_migration.h -+++ libvirt-2.0.0/src/libxl/libxl_migration.h +--- libvirt-2.1.0.orig/src/libxl/libxl_migration.h ++++ libvirt-2.1.0/src/libxl/libxl_migration.h @@ -37,6 +37,10 @@ VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \ VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \ @@ -265,10 +265,10 @@ Index: libvirt-2.0.0/src/libxl/libxl_migration.h virDomainPtr libxlDomainMigrationFinish(virConnectPtr dconn, -Index: libvirt-2.0.0/tools/virsh-domain.c +Index: libvirt-2.1.0/tools/virsh-domain.c =================================================================== ---- libvirt-2.0.0.orig/tools/virsh-domain.c -+++ libvirt-2.0.0/tools/virsh-domain.c +--- libvirt-2.1.0.orig/tools/virsh-domain.c ++++ libvirt-2.1.0/tools/virsh-domain.c @@ -9977,6 +9977,22 @@ static const vshCmdOptDef opts_migrate[] .type = VSH_OT_INT, .help = N_("CPU throttling rate increment for auto-convergence") @@ -328,11 +328,11 @@ Index: libvirt-2.0.0/tools/virsh-domain.c if (vshCommandOptStringReq(ctl, cmd, "xml", &opt) < 0) goto out; if (opt) { -Index: libvirt-2.0.0/tools/virsh.pod +Index: libvirt-2.1.0/tools/virsh.pod =================================================================== ---- libvirt-2.0.0.orig/tools/virsh.pod -+++ libvirt-2.0.0/tools/virsh.pod -@@ -1631,6 +1631,14 @@ compression. I<--comp-mt-threads> and I< +--- libvirt-2.1.0.orig/tools/virsh.pod ++++ libvirt-2.1.0/tools/virsh.pod +@@ -1662,6 +1662,14 @@ compression. I<--comp-mt-threads> and I< of compress threads on source and the number of decompress threads on target respectively. I<--comp-xbzrle-cache> sets size of page cache in bytes. diff --git a/libxl-support-block-script.patch b/libxl-support-block-script.patch index 2f78ef4..09482f0 100644 --- a/libxl-support-block-script.patch +++ b/libxl-support-block-script.patch @@ -7,10 +7,10 @@ and npiv. For more details, see bsc#954872 and FATE#319810 -Index: libvirt-2.0.0/src/libxl/libxl_conf.c +Index: libvirt-2.1.0/src/libxl/libxl_conf.c =================================================================== ---- libvirt-2.0.0.orig/src/libxl/libxl_conf.c -+++ libvirt-2.0.0/src/libxl/libxl_conf.c +--- libvirt-2.1.0.orig/src/libxl/libxl_conf.c ++++ libvirt-2.1.0/src/libxl/libxl_conf.c @@ -562,6 +562,25 @@ libxlDiskSetDiscard(libxl_device_disk *x #endif } @@ -37,7 +37,7 @@ Index: libvirt-2.0.0/src/libxl/libxl_conf.c static void libxlDiskSetCacheMode(libxl_device_disk *x_disk, int cachemode) { -@@ -705,6 +724,7 @@ libxlMakeNetworkDiskSrc(virStorageSource +@@ -706,6 +725,7 @@ libxlMakeNetworkDiskSrc(virStorageSource int libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk) { @@ -45,7 +45,7 @@ Index: libvirt-2.0.0/src/libxl/libxl_conf.c const char *driver = virDomainDiskGetDriver(l_disk); int format = virDomainDiskGetFormat(l_disk); int actual_type = virStorageSourceGetActualType(l_disk->src); -@@ -720,7 +740,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk +@@ -721,7 +741,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk if (libxlMakeNetworkDiskSrc(l_disk->src, &x_disk->pdev_path) < 0) return -1; } else { @@ -54,7 +54,7 @@ Index: libvirt-2.0.0/src/libxl/libxl_conf.c return -1; } -@@ -828,6 +848,9 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk +@@ -829,6 +849,9 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk if (libxlDiskSetDiscard(x_disk, l_disk->discard) < 0) return -1; libxlDiskSetCacheMode(x_disk, l_disk->cachemode); diff --git a/lxc-wait-after-eth-del.patch b/lxc-wait-after-eth-del.patch index f85c610..8abd147 100644 --- a/lxc-wait-after-eth-del.patch +++ b/lxc-wait-after-eth-del.patch @@ -13,10 +13,10 @@ device with the same name that is being created. src/lxc/lxc_process.c | 1 + 3 files changed, 4 insertions(+) -Index: libvirt-2.0.0/src/lxc/lxc_controller.c +Index: libvirt-2.1.0/src/lxc/lxc_controller.c =================================================================== ---- libvirt-2.0.0.orig/src/lxc/lxc_controller.c -+++ libvirt-2.0.0/src/lxc/lxc_controller.c +--- libvirt-2.1.0.orig/src/lxc/lxc_controller.c ++++ libvirt-2.1.0/src/lxc/lxc_controller.c @@ -2009,6 +2009,7 @@ static int virLXCControllerDeleteInterfa if (virNetDevVethDelete(ctrl->veths[i]) < 0) ret = -1; @@ -25,11 +25,11 @@ Index: libvirt-2.0.0/src/lxc/lxc_controller.c return ret; } -Index: libvirt-2.0.0/src/lxc/lxc_driver.c +Index: libvirt-2.1.0/src/lxc/lxc_driver.c =================================================================== ---- libvirt-2.0.0.orig/src/lxc/lxc_driver.c -+++ libvirt-2.0.0/src/lxc/lxc_driver.c -@@ -4026,6 +4026,7 @@ lxcDomainAttachDeviceNetLive(virConnectP +--- libvirt-2.1.0.orig/src/lxc/lxc_driver.c ++++ libvirt-2.1.0/src/lxc/lxc_driver.c +@@ -4025,6 +4025,7 @@ lxcDomainAttachDeviceNetLive(virConnectP case VIR_DOMAIN_NET_TYPE_NETWORK: case VIR_DOMAIN_NET_TYPE_ETHERNET: ignore_value(virNetDevVethDelete(veth)); @@ -37,7 +37,7 @@ Index: libvirt-2.0.0/src/lxc/lxc_driver.c break; case VIR_DOMAIN_NET_TYPE_DIRECT: -@@ -4455,6 +4456,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb +@@ -4454,6 +4455,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb virDomainAuditNet(vm, detach, NULL, "detach", false); goto cleanup; } @@ -45,10 +45,10 @@ Index: libvirt-2.0.0/src/lxc/lxc_driver.c break; /* It'd be nice to support this, but with macvlan -Index: libvirt-2.0.0/src/lxc/lxc_process.c +Index: libvirt-2.1.0/src/lxc/lxc_process.c =================================================================== ---- libvirt-2.0.0.orig/src/lxc/lxc_process.c -+++ libvirt-2.0.0/src/lxc/lxc_process.c +--- libvirt-2.1.0.orig/src/lxc/lxc_process.c ++++ libvirt-2.1.0/src/lxc/lxc_process.c @@ -221,6 +221,7 @@ static void virLXCProcessCleanup(virLXCD } networkReleaseActualDevice(vm->def, iface); diff --git a/pci-use-driver-override-sysfs.patch b/pci-use-driver-override-sysfs.patch index 445e7a4..50d414f 100644 --- a/pci-use-driver-override-sysfs.patch +++ b/pci-use-driver-override-sysfs.patch @@ -29,10 +29,10 @@ Signed-off-by: Jim Fehlig src/util/virpci.c | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 149 insertions(+), 2 deletions(-) -Index: libvirt-2.0.0/src/util/virpci.c +Index: libvirt-2.1.0/src/util/virpci.c =================================================================== ---- libvirt-2.0.0.orig/src/util/virpci.c -+++ libvirt-2.0.0/src/util/virpci.c +--- libvirt-2.1.0.orig/src/util/virpci.c ++++ libvirt-2.1.0/src/util/virpci.c @@ -1089,8 +1089,54 @@ virPCIDeviceUnbind(virPCIDevicePtr dev) return ret; } diff --git a/ppc64le-canonical-name.patch b/ppc64le-canonical-name.patch index 126a321..fe051b1 100644 --- a/ppc64le-canonical-name.patch +++ b/ppc64le-canonical-name.patch @@ -2,10 +2,10 @@ Canonicalize hostarch name ppc64le to ppc64 See bnc#894956 -Index: libvirt-2.0.0/src/util/virarch.c +Index: libvirt-2.1.0/src/util/virarch.c =================================================================== ---- libvirt-2.0.0.orig/src/util/virarch.c -+++ libvirt-2.0.0/src/util/virarch.c +--- libvirt-2.1.0.orig/src/util/virarch.c ++++ libvirt-2.1.0/src/util/virarch.c @@ -169,6 +169,8 @@ virArch virArchFromHost(void) arch = VIR_ARCH_I686; } else if (STREQ(ut.machine, "amd64")) { diff --git a/qemu-apparmor-screenshot.patch b/qemu-apparmor-screenshot.patch index 8dc46f6..e2aacfc 100644 --- a/qemu-apparmor-screenshot.patch +++ b/qemu-apparmor-screenshot.patch @@ -1,7 +1,7 @@ -Index: libvirt-2.0.0/examples/apparmor/libvirt-qemu +Index: libvirt-2.1.0/examples/apparmor/libvirt-qemu =================================================================== ---- libvirt-2.0.0.orig/examples/apparmor/libvirt-qemu -+++ libvirt-2.0.0/examples/apparmor/libvirt-qemu +--- libvirt-2.1.0.orig/examples/apparmor/libvirt-qemu ++++ libvirt-2.1.0/examples/apparmor/libvirt-qemu @@ -151,3 +151,6 @@ /etc/udev/udev.conf r, /sys/bus/ r, diff --git a/support-managed-pci-xen-driver.patch b/support-managed-pci-xen-driver.patch index 2dfd103..5ab674a 100644 --- a/support-managed-pci-xen-driver.patch +++ b/support-managed-pci-xen-driver.patch @@ -8,10 +8,10 @@ Subject: [PATCH] support managed pci devices in xen driver src/xenxs/xen_xm.c | 28 +++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 15 deletions(-) -Index: libvirt-2.0.0/src/xenconfig/xen_common.c +Index: libvirt-2.1.0/src/xenconfig/xen_common.c =================================================================== ---- libvirt-2.0.0.orig/src/xenconfig/xen_common.c -+++ libvirt-2.0.0/src/xenconfig/xen_common.c +--- libvirt-2.1.0.orig/src/xenconfig/xen_common.c ++++ libvirt-2.1.0/src/xenconfig/xen_common.c @@ -394,6 +394,8 @@ xenParsePCI(virConfPtr conf, virDomainDe { virConfValuePtr list = virConfGetValue(conf, "pci"); @@ -66,10 +66,10 @@ Index: libvirt-2.0.0/src/xenconfig/xen_common.c hostdev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI; hostdev->source.subsys.u.pci.addr.domain = domainID; hostdev->source.subsys.u.pci.addr.bus = busID; -Index: libvirt-2.0.0/src/xenconfig/xen_sxpr.c +Index: libvirt-2.1.0/src/xenconfig/xen_sxpr.c =================================================================== ---- libvirt-2.0.0.orig/src/xenconfig/xen_sxpr.c -+++ libvirt-2.0.0/src/xenconfig/xen_sxpr.c +--- libvirt-2.1.0.orig/src/xenconfig/xen_sxpr.c ++++ libvirt-2.1.0/src/xenconfig/xen_sxpr.c @@ -1062,6 +1062,7 @@ xenParseSxprPCI(virDomainDefPtr def, int busID; int slotID; diff --git a/suse-qemu-conf.patch b/suse-qemu-conf.patch index 77f5a31..0da959c 100644 --- a/suse-qemu-conf.patch +++ b/suse-qemu-conf.patch @@ -7,10 +7,10 @@ suse-qemu-conf-secdriver.patch, suse-qemu-conf-lockmgr.patch, etc.), but for now they are all lumped together in this single patch. -Index: libvirt-2.0.0/src/qemu/qemu.conf +Index: libvirt-2.1.0/src/qemu/qemu.conf =================================================================== ---- libvirt-2.0.0.orig/src/qemu/qemu.conf -+++ libvirt-2.0.0/src/qemu/qemu.conf +--- libvirt-2.1.0.orig/src/qemu/qemu.conf ++++ libvirt-2.1.0/src/qemu/qemu.conf @@ -212,11 +212,20 @@ # isolation, but it cannot appear in a list of drivers. # diff --git a/systemd-service-xen.patch b/systemd-service-xen.patch index dbb9b02..d6685c5 100644 --- a/systemd-service-xen.patch +++ b/systemd-service-xen.patch @@ -1,7 +1,7 @@ -Index: libvirt-2.0.0/daemon/libvirtd.service.in +Index: libvirt-2.1.0/daemon/libvirtd.service.in =================================================================== ---- libvirt-2.0.0.orig/daemon/libvirtd.service.in -+++ libvirt-2.0.0/daemon/libvirtd.service.in +--- libvirt-2.1.0.orig/daemon/libvirtd.service.in ++++ libvirt-2.1.0/daemon/libvirtd.service.in @@ -12,6 +12,7 @@ After=iscsid.service After=apparmor.service After=local-fs.target diff --git a/virtlockd-init-script.patch b/virtlockd-init-script.patch index b51253d..85e15e6 100644 --- a/virtlockd-init-script.patch +++ b/virtlockd-init-script.patch @@ -1,9 +1,9 @@ Adjust virtlockd init files to conform to SUSE standards -Index: libvirt-2.0.0/src/locking/virtlockd.sysconf +Index: libvirt-2.1.0/src/locking/virtlockd.sysconf =================================================================== ---- libvirt-2.0.0.orig/src/locking/virtlockd.sysconf -+++ libvirt-2.0.0/src/locking/virtlockd.sysconf +--- libvirt-2.1.0.orig/src/locking/virtlockd.sysconf ++++ libvirt-2.1.0/src/locking/virtlockd.sysconf @@ -1,3 +1,7 @@ +## Path: System/Virtualization/virtlockd + @@ -12,10 +12,10 @@ Index: libvirt-2.0.0/src/locking/virtlockd.sysconf # # Pass extra arguments to virtlockd #VIRTLOCKD_ARGS= -Index: libvirt-2.0.0/src/locking/virtlockd.init.in +Index: libvirt-2.1.0/src/locking/virtlockd.init.in =================================================================== ---- libvirt-2.0.0.orig/src/locking/virtlockd.init.in -+++ libvirt-2.0.0/src/locking/virtlockd.init.in +--- libvirt-2.1.0.orig/src/locking/virtlockd.init.in ++++ libvirt-2.1.0/src/locking/virtlockd.init.in @@ -4,59 +4,57 @@ # http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html # diff --git a/virtlogd-init-script.patch b/virtlogd-init-script.patch index 1a3cfd2..6e77ed3 100644 --- a/virtlogd-init-script.patch +++ b/virtlogd-init-script.patch @@ -1,9 +1,9 @@ Adjust virtlogd init files to conform to SUSE standards -Index: libvirt-2.0.0/src/logging/virtlogd.init.in +Index: libvirt-2.1.0/src/logging/virtlogd.init.in =================================================================== ---- libvirt-2.0.0.orig/src/logging/virtlogd.init.in -+++ libvirt-2.0.0/src/logging/virtlogd.init.in +--- libvirt-2.1.0.orig/src/logging/virtlogd.init.in ++++ libvirt-2.1.0/src/logging/virtlogd.init.in @@ -4,59 +4,56 @@ # http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html # @@ -126,10 +126,10 @@ Index: libvirt-2.0.0/src/logging/virtlogd.init.in esac -exit $RETVAL +rc_exit -Index: libvirt-2.0.0/src/logging/virtlogd.sysconf +Index: libvirt-2.1.0/src/logging/virtlogd.sysconf =================================================================== ---- libvirt-2.0.0.orig/src/logging/virtlogd.sysconf -+++ libvirt-2.0.0/src/logging/virtlogd.sysconf +--- libvirt-2.1.0.orig/src/logging/virtlogd.sysconf ++++ libvirt-2.1.0/src/logging/virtlogd.sysconf @@ -1,3 +1,7 @@ +## Path: System/Virtualization/virtlogd + diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index 317a263..edaa972 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,7 +1,7 @@ -Index: libvirt-2.0.0/src/xenconfig/xen_sxpr.c +Index: libvirt-2.1.0/src/xenconfig/xen_sxpr.c =================================================================== ---- libvirt-2.0.0.orig/src/xenconfig/xen_sxpr.c -+++ libvirt-2.0.0/src/xenconfig/xen_sxpr.c +--- libvirt-2.1.0.orig/src/xenconfig/xen_sxpr.c ++++ libvirt-2.1.0/src/xenconfig/xen_sxpr.c @@ -392,7 +392,7 @@ xenParseSxprVifRate(const char *rate, un static int xenParseSxprDisks(virDomainDefPtr def, diff --git a/xen-sxpr-disk-type.patch b/xen-sxpr-disk-type.patch index 997e225..e3a0bdd 100644 --- a/xen-sxpr-disk-type.patch +++ b/xen-sxpr-disk-type.patch @@ -6,10 +6,10 @@ and 'file'. This was implicitly done prior to commit 9673418c. https://bugzilla.suse.com/show_bug.cgi?id=938228 -Index: libvirt-2.0.0/src/xenconfig/xen_sxpr.c +Index: libvirt-2.1.0/src/xenconfig/xen_sxpr.c =================================================================== ---- libvirt-2.0.0.orig/src/xenconfig/xen_sxpr.c -+++ libvirt-2.0.0/src/xenconfig/xen_sxpr.c +--- libvirt-2.1.0.orig/src/xenconfig/xen_sxpr.c ++++ libvirt-2.1.0/src/xenconfig/xen_sxpr.c @@ -506,10 +506,11 @@ xenParseSxprDisks(virDomainDefPtr def, omnipotent, we can revisit this, perhaps stat()'ing the src file in question */ From 27f2ad74e2ca1108821f176931af578387d68eb00e968b873efe13833089ee52 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Sat, 20 Aug 2016 23:29:36 +0000 Subject: [PATCH 2/2] Add a few SLE12 SP2 bug fixes to Factory/Tumbleweed libvirt package. - libxl: allow vendor/product addressing for USB hostdevs virHostdevFindUSBDevice-privsyms.patch, libxl-usb-vendor.patch bsc#989646 - qemu: fix auth for rbd network disks d53d4650-qemu-rbd-auth.patch bsc#988998 - Replace cpumodel-vendor-crash-fix.patch with upstream variant 541e9ae6-cpu-vendor-crash-fix.patch bsc#992425 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=563 --- 541e9ae6-cpu-vendor-crash-fix.patch | 45 +++++++++++++++++++ cpumodel-vendor-crash-fix.patch | 56 ----------------------- d53d4650-qemu-rbd-auth.patch | 51 +++++++++++++++++++++ libvirt.changes | 13 ++++++ libvirt.spec | 8 +++- libxl-usb-vendor.patch | 61 ++++++++++++++++++++++++++ virHostdevFindUSBDevice-privsyms.patch | 51 +++++++++++++++++++++ 7 files changed, 228 insertions(+), 57 deletions(-) create mode 100644 541e9ae6-cpu-vendor-crash-fix.patch delete mode 100644 cpumodel-vendor-crash-fix.patch create mode 100644 d53d4650-qemu-rbd-auth.patch create mode 100644 libxl-usb-vendor.patch create mode 100644 virHostdevFindUSBDevice-privsyms.patch diff --git a/541e9ae6-cpu-vendor-crash-fix.patch b/541e9ae6-cpu-vendor-crash-fix.patch new file mode 100644 index 0000000..448b655 --- /dev/null +++ b/541e9ae6-cpu-vendor-crash-fix.patch @@ -0,0 +1,45 @@ +commit 541e9ae6d4290b9004ed73648ea663563b329b3d +Author: Jim Fehlig +Date: Fri Aug 5 15:23:47 2016 -0600 + + cpu_x86: fix libvirtd crash when host cpu vendor is not available + + When starting a guest and copying host vendor cpuid to the guest + cpu, libvirtd would crash if the host cpu contained a NULL vendor + field. Avoid the crash by checking for a valid vendor in the host + cpu before copying the cpuid to the guest cpu. + + For completeness, here is a backtrace from the crash + + (gdb) bt + f0 0x00007ffff739bf33 in x86DataCpuid (cpuid=0x8, cpuid=0x8, + data=data@entry=0x7fffb800ee78) at cpu/cpu_x86.c:287 + f1 virCPUx86DataAddCPUID (data=data@entry=0x7fffb800ee78, cpuid=0x8) + at cpu/cpu_x86.c:355 + f2 0x00007ffff739ef47 in x86Compute (host=, cpu=0x7fffb8000cc0, + guest=0x7fffecca7348, message=) at cpu/cpu_x86.c:1580 + f3 0x00007fffd2b38e53 in qemuBuildCpuModelArgStr (migrating=false, + hasHwVirt=, qemuCaps=0x7fffb8001040, buf=0x7fffecca7360, + def=0x7fffc400ce20, driver=0x1c) at qemu/qemu_command.c:6283 + f4 qemuBuildCpuCommandLine (cmd=cmd@entry=0x7fffb8002f60, + driver=driver@entry=0x7fffc80882c0, def=def@entry=0x7fffc400ce20, + qemuCaps=qemuCaps@entry=0x7fffb8001040, migrating=) + at qemu/qemu_command.c:6445 + (gdb) f2 + (gdb) p *host_model + $23 = {name = 0x7fffb800ec50 "qemu64", vendor = 0x0, signature = 0, data = { + len = 2, data = 0x7fffb800e720}} + +Index: libvirt-2.1.0/src/cpu/cpu_x86.c +=================================================================== +--- libvirt-2.1.0.orig/src/cpu/cpu_x86.c ++++ libvirt-2.1.0/src/cpu/cpu_x86.c +@@ -1576,7 +1576,7 @@ x86Compute(virCPUDefPtr host, + if (!(guest_model = x86ModelCopy(host_model))) + goto error; + +- if (cpu->vendor && ++ if (cpu->vendor && host_model->vendor && + virCPUx86DataAddCPUID(&guest_model->data, + &host_model->vendor->cpuid) < 0) + goto error; diff --git a/cpumodel-vendor-crash-fix.patch b/cpumodel-vendor-crash-fix.patch deleted file mode 100644 index f3b6422..0000000 --- a/cpumodel-vendor-crash-fix.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 341445ce85d91a105f8183f22226d9d90853b27b Mon Sep 17 00:00:00 2001 -From: Jim Fehlig -Date: Fri, 5 Aug 2016 15:23:47 -0600 -Subject: [PATCH] cpu_x86: fix libvirtd crash when host cpu is 'qemu64' - -When starting an L2 nested VM with on an -L1 VM with cpu 'qemu64', libvirtd crashes with - -Program received signal SIGSEGV, Segmentation fault. -0x00007ffff739bf33 in x86DataCpuid (cpuid=0x8, cpuid=0x8, - data=data@entry=0x7fffb800ee78) at cpu/cpu_x86.c:287 -287 for (i = 0; i < data->len; i++) { -(gdb) bt -f0 0x00007ffff739bf33 in x86DataCpuid (cpuid=0x8, cpuid=0x8, - data=data@entry=0x7fffb800ee78) at cpu/cpu_x86.c:287 -f1 virCPUx86DataAddCPUID (data=data@entry=0x7fffb800ee78, cpuid=0x8) - at cpu/cpu_x86.c:355 -f2 0x00007ffff739ef47 in x86Compute (host=, cpu=0x7fffb8000cc0, - guest=0x7fffecca7348, message=) at cpu/cpu_x86.c:1580 -f3 0x00007fffd2b38e53 in qemuBuildCpuModelArgStr (migrating=false, - hasHwVirt=, qemuCaps=0x7fffb8001040, buf=0x7fffecca7360, - def=0x7fffc400ce20, driver=0x1c) at qemu/qemu_command.c:6283 -f4 qemuBuildCpuCommandLine (cmd=cmd@entry=0x7fffb8002f60, - driver=driver@entry=0x7fffc80882c0, def=def@entry=0x7fffc400ce20, - qemuCaps=qemuCaps@entry=0x7fffb8001040, migrating=) - at qemu/qemu_command.c:6445 - -In frame 2, &host_model->vendor->cpuid is passed to virCPUx86DataAddCPUID(), -but - -(gdb) p *host_model -$23 = {name = 0x7fffb800ec50 "qemu64", vendor = 0x0, signature = 0, data = { - len = 2, data = 0x7fffb800e720}} - -With vendor = 0x0, &host_model->vendor->cpuid evaluates to 8, which -is not a nice value to pass to virCPUx86DataAddCPUID(). Check for a -non-null host_model->vendor before calling virCPUx86DataAddCPUID(). - -Signed-off-by: Jim Fehlig ---- - src/cpu/cpu_x86.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: libvirt-2.1.0/src/cpu/cpu_x86.c -=================================================================== ---- libvirt-2.1.0.orig/src/cpu/cpu_x86.c -+++ libvirt-2.1.0/src/cpu/cpu_x86.c -@@ -1576,7 +1576,7 @@ x86Compute(virCPUDefPtr host, - if (!(guest_model = x86ModelCopy(host_model))) - goto error; - -- if (cpu->vendor && -+ if (cpu->vendor && host_model->vendor && - virCPUx86DataAddCPUID(&guest_model->data, - &host_model->vendor->cpuid) < 0) - goto error; diff --git a/d53d4650-qemu-rbd-auth.patch b/d53d4650-qemu-rbd-auth.patch new file mode 100644 index 0000000..c4e3db4 --- /dev/null +++ b/d53d4650-qemu-rbd-auth.patch @@ -0,0 +1,51 @@ +commit d53d465083edeb64cc7b78249c030734c0d91c6b +Author: John Ferlan +Date: Tue Aug 16 16:50:15 2016 -0400 + + qemu: Fix the command line generation for rbd auth using aes secrets + + https://bugzilla.redhat.com/show_bug.cgi?id=1182074 + + Since libvirt still uses a legacy qemu arg format to add a disk, the + manner in which the 'password-secret' argument is passed to qemu needs + to change to prepend a 'file.' If in the future, usage of the more + modern disk format, then the prepended 'file.' can be removed. + + Fix based on Jim Fehlig posting and subsequent + upstream list followups, see: + + http://www.redhat.com/archives/libvir-list/2016-August/msg00777.html + + for details. Introduced by commit id 'a1344f70'. + +Index: libvirt-2.1.0/src/qemu/qemu_command.c +=================================================================== +--- libvirt-2.1.0.orig/src/qemu/qemu_command.c ++++ libvirt-2.1.0/src/qemu/qemu_command.c +@@ -1296,7 +1296,12 @@ qemuBuildDriveSourceStr(virDomainDiskDef + virBufferAddLit(buf, ","); + + if (secinfo && secinfo->type == VIR_DOMAIN_SECRET_INFO_TYPE_AES) { +- virBufferAsprintf(buf, "password-secret=%s,", ++ /* NB: If libvirt starts using the more modern option based ++ * syntax to build the command line (e.g., "-drive driver=rbd, ++ * filename=%s,...") instead of the legacy model (e.g."-drive ++ * file=%s,..."), then the "file." prefix can be removed ++ */ ++ virBufferAsprintf(buf, "file.password-secret=%s,", + secinfo->s.aes.alias); + } + +Index: libvirt-2.1.0/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth-AES.args +=================================================================== +--- libvirt-2.1.0.orig/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth-AES.args ++++ libvirt-2.1.0/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth-AES.args +@@ -26,7 +26,7 @@ data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1 + keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \ + -drive 'file=rbd:pool/image:id=myname:auth_supported=cephx\;none:\ + mon_host=mon1.example.org\:6321\;mon2.example.org\:6322\;mon3.example.org\:\ +-6322,password-secret=virtio-disk0-secret0,format=raw,if=none,\ ++6322,file.password-secret=virtio-disk0-secret0,format=raw,if=none,\ + id=drive-virtio-disk0' \ + -device virtio-blk-pci,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,\ + id=virtio-disk0 diff --git a/libvirt.changes b/libvirt.changes index f6ec8f8..8c20242 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Sat Aug 20 23:25:09 UTC 2016 - jfehlig@suse.com + +- libxl: allow vendor/product addressing for USB hostdevs + virHostdevFindUSBDevice-privsyms.patch, libxl-usb-vendor.patch + bsc#989646 +- qemu: fix auth for rbd network disks + d53d4650-qemu-rbd-auth.patch + bsc#988998 +- Replace cpumodel-vendor-crash-fix.patch with upstream variant + 541e9ae6-cpu-vendor-crash-fix.patch + bsc#992425 + ------------------------------------------------------------------- Fri Aug 12 15:29:37 UTC 2016 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index e2be5d2..49a2272 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -315,10 +315,13 @@ Source99: baselibs.conf Source100: %{name}-rpmlintrc # Upstream patches Patch0: 856965b3-qemu-secdriver.patch +Patch1: 541e9ae6-cpu-vendor-crash-fix.patch +Patch2: d53d4650-qemu-rbd-auth.patch # Patches pending upstream review Patch100: libxl-dom-reset.patch Patch101: pci-use-driver-override-sysfs.patch -Patch102: cpumodel-vendor-crash-fix.patch +Patch102: virHostdevFindUSBDevice-privsyms.patch +Patch103: libxl-usb-vendor.patch # Need to go upstream Patch150: xen-pv-cdrom.patch Patch151: blockcopy-check-dst-identical-device.patch @@ -787,9 +790,12 @@ libvirt plugin for NSS for translating domain names into IP addresses. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %patch100 -p1 %patch101 -p1 %patch102 -p1 +%patch103 -p1 %patch150 -p1 %patch151 -p1 %patch152 -p1 diff --git a/libxl-usb-vendor.patch b/libxl-usb-vendor.patch new file mode 100644 index 0000000..4231057 --- /dev/null +++ b/libxl-usb-vendor.patch @@ -0,0 +1,61 @@ +commit e7af9dcf1fb0703828ef9740cb9b9c00f2fa00a4 +Author: Cédric Bosdonnat +Date: Fri Aug 5 09:10:50 2016 +0200 + + libxl: allow vendor/product addressing for USB hostdevs + + libxl only has API to address the host USB devices by bus/device. + Find the bus/device if the user only provided the vendor/product + of the USB device. + +Index: libvirt-2.1.0/src/libxl/libxl_conf.c +=================================================================== +--- libvirt-2.1.0.orig/src/libxl/libxl_conf.c ++++ libvirt-2.1.0/src/libxl/libxl_conf.c +@@ -1483,23 +1483,36 @@ int + libxlMakeUSB(virDomainHostdevDefPtr hostdev, libxl_device_usbdev *usbdev) + { + virDomainHostdevSubsysUSBPtr usbsrc = &hostdev->source.subsys.u.usb; ++ virUSBDevicePtr usb = NULL; ++ int ret = -1; + + if (hostdev->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) +- return -1; ++ goto cleanup; + if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB) +- return -1; ++ goto cleanup; + +- if (usbsrc->bus <= 0 || usbsrc->device <= 0) { +- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", +- _("libxenlight supports only USB device " +- "specified by busnum:devnum")); +- return -1; ++ if (usbsrc->bus > 0 && usbsrc->device > 0) { ++ usbdev->u.hostdev.hostbus = usbsrc->bus; ++ usbdev->u.hostdev.hostaddr = usbsrc->device; ++ } else { ++ if (virHostdevFindUSBDevice(hostdev, true, &usb) < 0) { ++ virReportError(VIR_ERR_OPERATION_FAILED, ++ _("failed to find USB device busnum:devnum " ++ "for %x:%x"), ++ usbsrc->vendor, usbsrc->product); ++ goto cleanup; ++ } ++ ++ usbdev->u.hostdev.hostbus = virUSBDeviceGetBus(usb); ++ usbdev->u.hostdev.hostaddr = virUSBDeviceGetDevno(usb); + } + +- usbdev->u.hostdev.hostbus = usbsrc->bus; +- usbdev->u.hostdev.hostaddr = usbsrc->device; ++ ret = 0; ++ ++ cleanup: ++ virUSBDeviceFree(usb); + +- return 0; ++ return ret; + } + + static int diff --git a/virHostdevFindUSBDevice-privsyms.patch b/virHostdevFindUSBDevice-privsyms.patch new file mode 100644 index 0000000..29f2d7f --- /dev/null +++ b/virHostdevFindUSBDevice-privsyms.patch @@ -0,0 +1,51 @@ +commit e05e2dba970d3f4b5ec9bed80a7f0bb4ccc43dc8 +Author: Cédric Bosdonnat +Date: Fri Aug 5 09:10:49 2016 +0200 + + Add virHostdevFindUSBDevice to private symbols + + Finding an USB device from the vendor/device values will be needed + by libxl driver to convert from vendor/device to bus/dev addresses. + +Index: libvirt-2.1.0/src/libvirt_private.syms +=================================================================== +--- libvirt-2.1.0.orig/src/libvirt_private.syms ++++ libvirt-2.1.0/src/libvirt_private.syms +@@ -1641,6 +1641,7 @@ virHookPresent; + + + # util/virhostdev.h ++virHostdevFindUSBDevice; + virHostdevManagerGetDefault; + virHostdevPCINodeDeviceDetach; + virHostdevPCINodeDeviceReAttach; +Index: libvirt-2.1.0/src/util/virhostdev.c +=================================================================== +--- libvirt-2.1.0.orig/src/util/virhostdev.c ++++ libvirt-2.1.0/src/util/virhostdev.c +@@ -1178,7 +1178,7 @@ virHostdevMarkUSBDevices(virHostdevManag + } + + +-static int ++int + virHostdevFindUSBDevice(virDomainHostdevDefPtr hostdev, + bool mandatory, + virUSBDevicePtr *usb) +Index: libvirt-2.1.0/src/util/virhostdev.h +=================================================================== +--- libvirt-2.1.0.orig/src/util/virhostdev.h ++++ libvirt-2.1.0/src/util/virhostdev.h +@@ -66,6 +66,12 @@ virHostdevPreparePCIDevices(virHostdevMa + unsigned int flags) + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) + ATTRIBUTE_NONNULL(4); ++ ++int ++virHostdevFindUSBDevice(virDomainHostdevDefPtr hostdev, ++ bool mandatory, ++ virUSBDevicePtr *usb) ++ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3); + int + virHostdevPrepareUSBDevices(virHostdevManagerPtr hostdev_mgr, + const char *drv_name,