Accepting request 295137 from Virtualization

1

OBS-URL: https://build.opensuse.org/request/show/295137
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=175
This commit is contained in:
Dominique Leuenberger 2015-04-10 07:54:40 +00:00 committed by Git OBS Bridge
commit 8b02f73712
27 changed files with 253 additions and 377 deletions

View File

@ -1,7 +1,7 @@
Index: libvirt-1.2.13/examples/apparmor/libvirt-qemu
Index: libvirt-1.2.14/examples/apparmor/libvirt-qemu
===================================================================
--- libvirt-1.2.13.orig/examples/apparmor/libvirt-qemu
+++ libvirt-1.2.13/examples/apparmor/libvirt-qemu
--- libvirt-1.2.14.orig/examples/apparmor/libvirt-qemu
+++ libvirt-1.2.14/examples/apparmor/libvirt-qemu
@@ -59,6 +59,7 @@
# access to firmware's etc
/usr/share/kvm/** r,

View File

@ -1,7 +1,7 @@
Index: libvirt-1.2.13/examples/apparmor/libvirt-lxc
Index: libvirt-1.2.14/examples/apparmor/libvirt-lxc
===================================================================
--- libvirt-1.2.13.orig/examples/apparmor/libvirt-lxc
+++ libvirt-1.2.13/examples/apparmor/libvirt-lxc
--- libvirt-1.2.14.orig/examples/apparmor/libvirt-lxc
+++ libvirt-1.2.14/examples/apparmor/libvirt-lxc
@@ -2,39 +2,15 @@
#include <abstractions/base>

View File

@ -11,13 +11,13 @@ Signed-off-by: Chunyan Liu <cyliu@suse.com>
src/qemu/qemu_driver.c | 7 +++++++
1 file changed, 7 insertions(+)
Index: libvirt-1.2.13/src/qemu/qemu_driver.c
Index: libvirt-1.2.14/src/qemu/qemu_driver.c
===================================================================
--- libvirt-1.2.13.orig/src/qemu/qemu_driver.c
+++ libvirt-1.2.13/src/qemu/qemu_driver.c
@@ -16129,6 +16129,15 @@ qemuDomainBlockCopyCommon(virDomainObjPt
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
--- libvirt-1.2.14.orig/src/qemu/qemu_driver.c
+++ libvirt-1.2.14/src/qemu/qemu_driver.c
@@ -16644,6 +16644,15 @@ qemuDomainBlockCopyCommon(virDomainObjPt
_("non-file destination not supported yet"));
goto endjob;
}
+
+ if (STREQ_NULLABLE(realpath(disk->src->path, NULL),

View File

@ -0,0 +1,38 @@
From da33a1ac1f6c0ae2ebe72bc385bbc7c407026956 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Wed, 8 Apr 2015 19:16:52 +0200
Subject: [PATCH] lxc: create the required directories upon driver start
/var/run may reside on a tmpfs and we fail to create the PID file if
/var/run/lxc does not exist.
Since commit 0a8addc1, the lxc driver's state directory isn't
automatically created before starting a domain. Now, the lxc driver
makes sure the state directory exists when it initializes.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
src/lxc/lxc_driver.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 245000d..8dfa686 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1648,6 +1648,13 @@ static int lxcStateInitialize(bool privileged,
if (!(caps = virLXCDriverGetCapabilities(lxc_driver, false)))
goto cleanup;
+ if (virFileMakePath(cfg->stateDir) < 0) {
+ virReportSystemError(errno,
+ _("Failed to mkdir %s"),
+ cfg->stateDir);
+ goto cleanup;
+ }
+
/* Get all the running persistent or transient configs first */
if (virDomainObjListLoadAllConfigs(lxc_driver->domains,
cfg->stateDir,
--
2.1.4

View File

@ -1,22 +0,0 @@
tests: disable hugepages-pages6 test on ppc architectures
hugepages-pages6 test in qemuxml2argvtest fails on all ppc, ppc64,
and ppc64le with the following error:
libvirt: QEMU Driver error : internal error: hugepage backing not
supported by '/usr/bin/qemu'.
Disable the test by applying this patch for arch in 'ppc ppc64 ppc64le'.
Index: libvirt-1.2.12/tests/qemuxml2argvtest.c
===================================================================
--- libvirt-1.2.12.orig/tests/qemuxml2argvtest.c
+++ libvirt-1.2.12/tests/qemuxml2argvtest.c
@@ -716,7 +716,6 @@ mymain(void)
DO_TEST_FAILURE("hugepages-pages4", QEMU_CAPS_MEM_PATH,
QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST("hugepages-pages5", QEMU_CAPS_MEM_PATH);
- DO_TEST("hugepages-pages6", NONE);
DO_TEST("nosharepages", QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_MEM_MERGE);
DO_TEST("disk-cdrom", NONE);
DO_TEST("disk-cdrom-network-http", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE,

View File

@ -1,16 +1,16 @@
Index: libvirt-1.2.13/tests/vircgrouptest.c
Index: libvirt-1.2.14/tests/vircgrouptest.c
===================================================================
--- libvirt-1.2.13.orig/tests/vircgrouptest.c
+++ libvirt-1.2.13/tests/vircgrouptest.c
@@ -33,7 +33,6 @@
# include "virlog.h"
--- libvirt-1.2.14.orig/tests/vircgrouptest.c
+++ libvirt-1.2.14/tests/vircgrouptest.c
@@ -34,7 +34,6 @@
# include "virfile.h"
# include "virbuffer.h"
# include "testutilslxc.h"
-# include "nodeinfo.h"
# define VIR_FROM_THIS VIR_FROM_NONE
@@ -533,91 +532,6 @@ static int testCgroupAvailable(const voi
@@ -586,91 +585,6 @@ static int testCgroupAvailable(const voi
return 0;
}
@ -102,7 +102,7 @@ Index: libvirt-1.2.13/tests/vircgrouptest.c
static int testCgroupGetMemoryUsage(const void *args ATTRIBUTE_UNUSED)
{
virCgroupPtr cgroup = NULL;
@@ -823,9 +737,6 @@ mymain(void)
@@ -895,9 +809,6 @@ mymain(void)
if (virtTestRun("virCgroupGetMemoryUsage works", testCgroupGetMemoryUsage, NULL) < 0)
ret = -1;

View File

@ -1,42 +0,0 @@
Fix PCI device attach in xend driver
When attaching PCI device using the xend driver, the 'device_create'
RPC is called, which is not sufficient to fully prepare/configure
the device for attachment to a domain. In the xen tools, xm pci-attach
uses the 'device_configure' RPC.
This patch changes the xend driver to always call 'device_configure' for
PCI devices to be consistent with the usage in the xen tools.
Index: libvirt-1.2.13/src/xen/xend_internal.c
===================================================================
--- libvirt-1.2.13.orig/src/xen/xend_internal.c
+++ libvirt-1.2.13/src/xen/xend_internal.c
@@ -2216,6 +2216,7 @@ xenDaemonAttachDeviceFlags(virConnectPtr
virBuffer buf = VIR_BUFFER_INITIALIZER;
char class[8], ref[80];
char *target = NULL;
+ int new_dev;
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1);
@@ -2314,8 +2315,18 @@ xenDaemonAttachDeviceFlags(virConnectPtr
}
sexpr = virBufferContentAndReset(&buf);
+ new_dev = virDomainXMLDevID(conn, minidef, dev, class, ref, sizeof(ref));
- if (virDomainXMLDevID(conn, minidef, dev, class, ref, sizeof(ref))) {
+ /* always call 'device_configure' for pci device */
+ 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) {
+ ret = xend_op(conn, def->name, "op", "device_configure",
+ "config", sexpr, "dev", ref, NULL);
+ goto cleanup;
+ }
+
+ if (new_dev) {
/* device doesn't exist, define it */
ret = xend_op(conn, def->name, "op", "device_create",
"config", sexpr, NULL);

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:944163d93949db61f49eace85838b1bd55ce855e88b014df16c50fd2102bdaf6
size 30861600

View File

@ -1,7 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEABECAAYFAlTz2rcACgkQRga4pd6VvB85+gCeLPbCKrp12D69dbcjucQ9JtOw
BfQAoI6GJ5ZSsudyTcIB76rt0haEA6Au
=KAmO
-----END PGP SIGNATURE-----

3
libvirt-1.2.14.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b8e8e6f1fc91eb8694fa21f9c57a736fa4a5af10562e14e4aa2c7e23510c4c07
size 28947850

View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEABECAAYFAlUc9BMACgkQRga4pd6VvB9YcwCeKTfxcm3uFtYaWRJVLLygtIHV
cdYAnRTKsdMBJBTSzlFRLvKt1rBGtsVo
=LYrN
-----END PGP SIGNATURE-----

View File

@ -1,9 +1,9 @@
Adjust libvirt-guests init files to conform to SUSE standards
Index: libvirt-1.2.13/tools/libvirt-guests.init.in
Index: libvirt-1.2.14/tools/libvirt-guests.init.in
===================================================================
--- libvirt-1.2.13.orig/tools/libvirt-guests.init.in
+++ libvirt-1.2.13/tools/libvirt-guests.init.in
--- libvirt-1.2.14.orig/tools/libvirt-guests.init.in
+++ libvirt-1.2.14/tools/libvirt-guests.init.in
@@ -3,15 +3,15 @@
# the following is the LSB init header
#
@ -28,10 +28,10 @@ Index: libvirt-1.2.13/tools/libvirt-guests.init.in
### END INIT INFO
# the following is chkconfig init header
Index: libvirt-1.2.13/tools/libvirt-guests.sh.in
Index: libvirt-1.2.14/tools/libvirt-guests.sh.in
===================================================================
--- libvirt-1.2.13.orig/tools/libvirt-guests.sh.in
+++ libvirt-1.2.13/tools/libvirt-guests.sh.in
--- libvirt-1.2.14.orig/tools/libvirt-guests.sh.in
+++ libvirt-1.2.14/tools/libvirt-guests.sh.in
@@ -16,14 +16,13 @@
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
@ -191,10 +191,10 @@ Index: libvirt-1.2.13/tools/libvirt-guests.sh.in
esac
-exit $RETVAL
+rc_exit
Index: libvirt-1.2.13/tools/libvirt-guests.sysconf
Index: libvirt-1.2.14/tools/libvirt-guests.sysconf
===================================================================
--- libvirt-1.2.13.orig/tools/libvirt-guests.sysconf
+++ libvirt-1.2.13/tools/libvirt-guests.sysconf
--- libvirt-1.2.14.orig/tools/libvirt-guests.sysconf
+++ libvirt-1.2.14/tools/libvirt-guests.sysconf
@@ -1,19 +1,29 @@
+## Path: System/Virtualization/libvirt-guests
+

View File

@ -1,8 +1,8 @@
Index: libvirt-1.2.13/src/cpu/cpu_map.xml
Index: libvirt-1.2.14/src/cpu/cpu_map.xml
===================================================================
--- libvirt-1.2.13.orig/src/cpu/cpu_map.xml
+++ libvirt-1.2.13/src/cpu/cpu_map.xml
@@ -658,6 +658,16 @@
--- libvirt-1.2.14.orig/src/cpu/cpu_map.xml
+++ libvirt-1.2.14/src/cpu/cpu_map.xml
@@ -668,6 +668,16 @@
<pvr value='0x004d0000'/>
</model>

View File

@ -1,7 +1,7 @@
Index: libvirt-1.2.13/configure.ac
Index: libvirt-1.2.14/configure.ac
===================================================================
--- libvirt-1.2.13.orig/configure.ac
+++ libvirt-1.2.13/configure.ac
--- libvirt-1.2.14.orig/configure.ac
+++ libvirt-1.2.14/configure.ac
@@ -237,6 +237,7 @@ LIBVIRT_CHECK_FUSE
LIBVIRT_CHECK_GLUSTER
LIBVIRT_CHECK_HAL
@ -10,7 +10,7 @@ Index: libvirt-1.2.13/configure.ac
LIBVIRT_CHECK_NUMACTL
LIBVIRT_CHECK_OPENWSMAN
LIBVIRT_CHECK_PCIACCESS
@@ -2466,11 +2467,12 @@ if test "$with_libvirtd" = "no" ; then
@@ -2495,11 +2496,12 @@ if test "$with_libvirtd" = "no" ; then
with_interface=no
fi
@ -26,7 +26,7 @@ Index: libvirt-1.2.13/configure.ac
esac
if test "$with_interface" = "yes" ; then
@@ -2922,6 +2924,7 @@ LIBVIRT_RESULT_FUSE
@@ -2887,6 +2889,7 @@ LIBVIRT_RESULT_FUSE
LIBVIRT_RESULT_GLUSTER
LIBVIRT_RESULT_HAL
LIBVIRT_RESULT_NETCF
@ -34,11 +34,11 @@ Index: libvirt-1.2.13/configure.ac
LIBVIRT_RESULT_NUMACTL
LIBVIRT_RESULT_OPENWSMAN
LIBVIRT_RESULT_PCIACCESS
Index: libvirt-1.2.13/src/Makefile.am
Index: libvirt-1.2.14/src/Makefile.am
===================================================================
--- libvirt-1.2.13.orig/src/Makefile.am
+++ libvirt-1.2.13/src/Makefile.am
@@ -845,6 +845,10 @@ if WITH_NETCF
--- libvirt-1.2.14.orig/src/Makefile.am
+++ libvirt-1.2.14/src/Makefile.am
@@ -847,6 +847,10 @@ if WITH_NETCF
INTERFACE_DRIVER_SOURCES += \
interface/interface_backend_netcf.c
endif WITH_NETCF
@ -49,26 +49,21 @@ Index: libvirt-1.2.13/src/Makefile.am
if WITH_UDEV
INTERFACE_DRIVER_SOURCES += \
interface/interface_backend_udev.c
@@ -1457,10 +1461,15 @@ if WITH_NETCF
@@ -1455,6 +1459,10 @@ if WITH_NETCF
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
else ! WITH_NETCF
endif WITH_NETCF
+if WITH_NETCONTROL
+libvirt_driver_interface_la_CFLAGS += $(NETCONTROL_CFLAGS)
+libvirt_driver_interface_la_LIBADD += $(NETCONTROL_LIBS)
+else ! WITH_NETCONTROL
+endif WITH_NETCONTROL
if WITH_UDEV
libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
endif WITH_UDEV
+endif ! WITH_NETCONTROL
endif ! WITH_NETCF
if WITH_DRIVER_MODULES
libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la
Index: libvirt-1.2.13/tools/virsh.c
Index: libvirt-1.2.14/tools/virsh.c
===================================================================
--- libvirt-1.2.13.orig/tools/virsh.c
+++ libvirt-1.2.13/tools/virsh.c
--- libvirt-1.2.14.orig/tools/virsh.c
+++ libvirt-1.2.14/tools/virsh.c
@@ -3360,6 +3360,8 @@ vshShowVersion(vshControl *ctl ATTRIBUTE
vshPrint(ctl, " Interface");
# if defined(WITH_NETCF)
@ -78,10 +73,10 @@ Index: libvirt-1.2.13/tools/virsh.c
# elif defined(WITH_UDEV)
vshPrint(ctl, " udev");
# endif
Index: libvirt-1.2.13/src/interface/interface_backend_netcf.c
Index: libvirt-1.2.14/src/interface/interface_backend_netcf.c
===================================================================
--- libvirt-1.2.13.orig/src/interface/interface_backend_netcf.c
+++ libvirt-1.2.13/src/interface/interface_backend_netcf.c
--- libvirt-1.2.14.orig/src/interface/interface_backend_netcf.c
+++ libvirt-1.2.14/src/interface/interface_backend_netcf.c
@@ -23,7 +23,12 @@
#include <config.h>
@ -165,10 +160,10 @@ Index: libvirt-1.2.13/src/interface/interface_backend_netcf.c
if (virSetSharedInterfaceDriver(&interfaceDriver) < 0)
return -1;
if (virRegisterStateDriver(&interfaceStateDriver) < 0)
Index: libvirt-1.2.13/src/interface/interface_driver.c
Index: libvirt-1.2.14/src/interface/interface_driver.c
===================================================================
--- libvirt-1.2.13.orig/src/interface/interface_driver.c
+++ libvirt-1.2.13/src/interface/interface_driver.c
--- libvirt-1.2.14.orig/src/interface/interface_driver.c
+++ libvirt-1.2.14/src/interface/interface_driver.c
@@ -30,8 +30,15 @@ interfaceRegister(void)
if (netcfIfaceRegister() == 0)
return 0;
@ -186,10 +181,10 @@ Index: libvirt-1.2.13/src/interface/interface_driver.c
if (udevIfaceRegister() == 0)
return 0;
#endif /* WITH_UDEV */
Index: libvirt-1.2.13/m4/virt-netcontrol.m4
Index: libvirt-1.2.14/m4/virt-netcontrol.m4
===================================================================
--- /dev/null
+++ libvirt-1.2.13/m4/virt-netcontrol.m4
+++ libvirt-1.2.14/m4/virt-netcontrol.m4
@@ -0,0 +1,35 @@
+dnl The libnetcontrol library
+dnl

View File

@ -1,3 +1,41 @@
-------------------------------------------------------------------
Thu Apr 9 09:35:26 UTC 2015 - cbosdonnat@suse.com
- boo#926153: make sure /var/run/libvirt/lxc folder exists when
starting the driver. da33a1ac-lxc-init-statedir.patch
- Fix lxc-enter-namespace for 3.19+ kernels.
open-ns-files-readonly.patch
-------------------------------------------------------------------
Thu Apr 2 08:38:03 MDT 2015 - jfehlig@suse.com
- Disable building wireshark dissector. Commit 37397320
requires wireshark pkgconfig, which SUSE wireshark packages
do not provide.
- Disable building the legacy Xen driver since Xen no longer
provides the xend toolstack. Remove xend-specific patches
while at it: fix-pci-attach-xen-driver.patch,
xen-name-for-devid.patch
-------------------------------------------------------------------
Thu Apr 2 08:18:55 MDT 2015 - jfehlig@suse.com
- Update to libvirt 1.2.14
- qemu: Implement memory device hotplug
- Implement public API for virDomainPinIOThread
- Implement public API for virDomainGetIOThreadsInfo
- SRIOV NIC offload feature discovery
- Many incremental improvements and bug fixes, see
http://libvirt.org/news.html
- Drop disable-hugepage-test.patch in favor of upstream fix
-------------------------------------------------------------------
Tue Mar 31 14:39:20 MDT 2015 - jfehlig@suse.com
- Fix build on older distros containing a polkit package that lacks
support for /etc/polkit-1/rules.d drop directory
-------------------------------------------------------------------
Wed Mar 25 09:10:46 MDT 2015 - jfehlig@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package libvirt
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015 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
@ -77,6 +77,7 @@
%define with_netcontrol 0%{!?_without_netcontrol:%{server_drivers}}
# A few optional bits off by default, we enable later
%define with_polkit_rules 0
%define with_capng 0%{!?_without_capng:0}
%define with_fuse 0%{!?_without_fuse:0}
%define with_netcf 0%{!?_without_netcf:0}
@ -90,8 +91,12 @@
%define with_numad 0%{!?_without_numad:0}
%define with_firewalld 0%{!?_without_firewalld:0}
%define with_libssh2 0%{!?_without_libssh2:0}
%define with_wireshark 0%{!?_without_wireshark:0}
%define with_systemd_daemon 0%{!?_without_systemd_daemon:0}
# Xen no longer contains xm/xend so disable building the legacy Xen driver
%define with_xen 0%{!?_without_xen:0}
# Non-server/HV driver defaults which are always enabled
%define with_sasl 0%{!?_without_sasl:1}
@ -168,6 +173,11 @@
%define with_libssh2 0%{!?_without_libssh2:1}
%endif
# libvirt commit 37397320 changed the configure check for wireshark to
# use pkgconfig, but our wireshark packages do not provide wireshark.pc.
# Disable the dissector for now
%define with_wireshark 0
# Disable some drivers when building without libvirt daemon.
# The logic is the same as in configure.ac
%if ! %{with_libvirtd}
@ -235,7 +245,7 @@
Name: libvirt
Url: http://libvirt.org/
Version: 1.2.13
Version: 1.2.14
Release: 0
Summary: Library providing a simple virtualization API
License: LGPL-2.1+
@ -362,6 +372,9 @@ BuildRequires: ebtables
BuildRequires: cyrus-sasl-devel
%endif
%if %{with_polkit}
%if 0%{?suse_version} > 1140
%define with_polkit_rules 1
%endif
%if 0%{?suse_version} > 1110
BuildRequires: polkit >= 0.9
BuildRequires: polkit-devel >= 0.9
@ -424,7 +437,7 @@ BuildRequires: systemtap-sdt-devel
%if %{with_numad}
BuildRequires: numad
%endif
%if 0%{?suse_version} >= 1210
%if %{with_wireshark}
BuildRequires: wireshark-devel
%endif
@ -436,28 +449,25 @@ Source4: libvirtd-relocation-server.fw
Source5: polkit-10-virt.rules
Source99: baselibs.conf
# Upstream patches
Patch0: da33a1ac-lxc-init-statedir.patch
# Patches pending upstream review
Patch100: open-ns-files-readonly.patch
# Need to go upstream
Patch150: xen-name-for-devid.patch
Patch151: xen-pv-cdrom.patch
Patch152: blockcopy-check-dst-identical-device.patch
Patch153: libvirt-power8-models.patch
Patch154: ppc64le-canonical-name.patch
Patch155: apparmor-fixes.patch
Patch150: xen-pv-cdrom.patch
Patch151: blockcopy-check-dst-identical-device.patch
Patch152: libvirt-power8-models.patch
Patch153: ppc64le-canonical-name.patch
Patch154: apparmor-fixes.patch
# Our patches
Patch200: libvirtd-defaults.patch
Patch201: libvirtd-init-script.patch
Patch202: libvirt-guests-init-script.patch
Patch203: virtlockd-init-script.patch
Patch204: suse-qemu-conf.patch
Patch205: fix-pci-attach-xen-driver.patch
Patch206: support-managed-pci-xen-driver.patch
Patch207: systemd-service-xen.patch
Patch205: support-managed-pci-xen-driver.patch
Patch206: systemd-service-xen.patch
# Disable failing virCgroupGetPercpuStats unit test
Patch208: disable-virCgroupGetPercpuStats-test.patch
%ifarch ppc ppc64 ppc64le
Patch209: disable-hugepage-test.patch
%endif
Patch207: disable-virCgroupGetPercpuStats-test.patch
%if %{with_apparmor}
Patch250: apparmor-no-mount.patch
Patch251: qemu-apparmor-screenshot.patch
@ -957,8 +967,7 @@ connect a user to an LXC container when they login, by switching
namespaces.
%endif
# Older version contain too old wireshark
%if 0%{?suse_version} >= 1210
%if %{with_wireshark}
%package -n wireshark-plugin-libvirt
Summary: Wireshark plugin for Libvirt RPC protocol
@ -971,12 +980,13 @@ Provides a dissector for the libvirt RPC protocol to help debugging it.
%prep
%setup -q
%patch0 -p1
%patch100 -p1
%patch150 -p1
%patch151 -p1
%patch152 -p1
%patch153 -p1
%patch154 -p1
%patch155 -p1
%patch200 -p1
%patch201 -p1
%patch202 -p1
@ -985,10 +995,6 @@ Provides a dissector for the libvirt RPC protocol to help debugging it.
%patch205 -p1
%patch206 -p1
%patch207 -p1
%patch208 -p1
%ifarch ppc ppc64 ppc64le
%patch209 -p1
%endif
%if %{with_apparmor}
%patch250 -p1
%patch251 -p1
@ -1137,6 +1143,9 @@ Provides a dissector for the libvirt RPC protocol to help debugging it.
%if %{with_firewalld}
%define _with_firewalld --with-firewalld
%endif
%if ! %{with_wireshark}
%define _without_wireshark --without-wireshark-dissector
%endif
%if ! %{with_systemd_daemon}
%define _without_systemd_daemon --without-systemd-daemon
%endif
@ -1194,6 +1203,7 @@ export CFLAGS="$RPM_OPT_FLAGS"
%{?_without_dtrace} \
%{?_without_driver_modules} \
%{?_with_firewalld} \
%{?_without_wireshark} \
%{?_without_systemd_daemon} \
--libexecdir=%{_libdir}/%{name} \
--with-qemu-user=%{qemu_user} \
@ -1213,7 +1223,7 @@ do
done
cp examples/lxcconvert/virt-lxc-convert $RPM_BUILD_ROOT%{_bindir}
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%if 0%{?suse_version} >= 1210
%if %{with_wireshark}
rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.la
%endif
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
@ -1340,11 +1350,9 @@ mkdir -p $RPM_BUILD_ROOT%{_sbindir}
ln -s %{_sysconfdir}/init.d/libvirt-guests $RPM_BUILD_ROOT%{_sbindir}/rclibvirt-guests
%endif
mv $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/libvirt-guests $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.libvirt-guests
%if %{with_polkit}
%if 0%{?suse_version} > 1110
%if %{with_polkit_rules}
install -d $RPM_BUILD_ROOT%{_sysconfdir}/polkit-1/rules.d/
install %SOURCE5 $RPM_BUILD_ROOT%{_sysconfdir}/polkit-1/rules.d/10-virt.rules
%endif
%endif
%fdupes -s $RPM_BUILD_ROOT
@ -1510,9 +1518,11 @@ fi
%dir %attr(0755, root, root) %{_libdir}/%{name}/lock-driver
%attr(0755, root, root) %{_libdir}/%{name}/lock-driver/lockd.so
%if %{with_polkit}
%if %{with_polkit_rules}
%{_sysconfdir}/polkit-1/rules.d/10-virt.rules
%endif
%if 0%{?suse_version} > 1110
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
%{_sysconfdir}/polkit-1/rules.d/10-virt.rules
%else
%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy
%endif
@ -1876,7 +1886,7 @@ fi
%{_bindir}/virt-login-shell
%endif
%if 0%{?suse_version} >= 1210
%if %{with_wireshark}
%files -n wireshark-plugin-libvirt
%defattr(-, root, root)

View File

@ -1,7 +1,7 @@
Index: libvirt-1.2.13/daemon/libvirtd.conf
Index: libvirt-1.2.14/daemon/libvirtd.conf
===================================================================
--- libvirt-1.2.13.orig/daemon/libvirtd.conf
+++ libvirt-1.2.13/daemon/libvirtd.conf
--- libvirt-1.2.14.orig/daemon/libvirtd.conf
+++ libvirt-1.2.14/daemon/libvirtd.conf
@@ -18,8 +18,8 @@
# It is necessary to setup a CA and issue server certificates before
# using this capability.
@ -13,10 +13,10 @@ Index: libvirt-1.2.13/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-1.2.13/daemon/libvirtd-config.c
Index: libvirt-1.2.14/daemon/libvirtd-config.c
===================================================================
--- libvirt-1.2.13.orig/daemon/libvirtd-config.c
+++ libvirt-1.2.13/daemon/libvirtd-config.c
--- libvirt-1.2.14.orig/daemon/libvirtd-config.c
+++ libvirt-1.2.14/daemon/libvirtd-config.c
@@ -242,7 +242,7 @@ daemonConfigNew(bool privileged ATTRIBUT
if (VIR_ALLOC(data) < 0)
return NULL;
@ -26,10 +26,10 @@ Index: libvirt-1.2.13/daemon/libvirtd-config.c
data->listen_tcp = 0;
if (VIR_STRDUP(data->tls_port, LIBVIRTD_TLS_PORT) < 0 ||
Index: libvirt-1.2.13/daemon/test_libvirtd.aug.in
Index: libvirt-1.2.14/daemon/test_libvirtd.aug.in
===================================================================
--- libvirt-1.2.13.orig/daemon/test_libvirtd.aug.in
+++ libvirt-1.2.13/daemon/test_libvirtd.aug.in
--- libvirt-1.2.14.orig/daemon/test_libvirtd.aug.in
+++ libvirt-1.2.14/daemon/test_libvirtd.aug.in
@@ -2,7 +2,7 @@ module Test_libvirtd =
::CONFIG::

View File

@ -1,9 +1,9 @@
Adjust libvirtd sysconfig file to conform to SUSE standards
Index: libvirt-1.2.13/daemon/libvirtd.sysconf
Index: libvirt-1.2.14/daemon/libvirtd.sysconf
===================================================================
--- libvirt-1.2.13.orig/daemon/libvirtd.sysconf
+++ libvirt-1.2.13/daemon/libvirtd.sysconf
--- libvirt-1.2.14.orig/daemon/libvirtd.sysconf
+++ libvirt-1.2.14/daemon/libvirtd.sysconf
@@ -1,16 +1,25 @@
+## Path: System/Virtualization/libvirt
+

View File

@ -0,0 +1,29 @@
From cc21badc5c30ddeeb89abfa9ecdfbacd512f33c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
Date: Thu, 9 Apr 2015 09:22:43 +0200
Subject: [PATCH] Open /proc/PID/ns/* read-only to avoid getting permission
denied
lxc-enter-namespace stopped working on recent kernels (at least 3.19+)
due to /proc/PID/ns/* file descriptors being opened RW. From outside
the namespace these can only be opened RO.
---
src/util/virprocess.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index ab1e039..7a79970 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -628,7 +628,7 @@ int virProcessGetNamespaces(pid_t pid,
ns[i]) < 0)
goto cleanup;
- if ((fd = open(nsfile, O_RDWR)) >= 0) {
+ if ((fd = open(nsfile, O_RDONLY)) >= 0) {
if (VIR_EXPAND_N(*fdlist, *nfdlist, 1) < 0) {
VIR_FORCE_CLOSE(fd);
goto cleanup;
--
2.1.4

View File

@ -2,10 +2,10 @@ Canonicalize hostarch name ppc64le to ppc64
See bnc#894956
Index: libvirt-1.2.13/src/util/virarch.c
Index: libvirt-1.2.14/src/util/virarch.c
===================================================================
--- libvirt-1.2.13.orig/src/util/virarch.c
+++ libvirt-1.2.13/src/util/virarch.c
--- libvirt-1.2.14.orig/src/util/virarch.c
+++ libvirt-1.2.14/src/util/virarch.c
@@ -169,6 +169,8 @@ virArch virArchFromHost(void)
arch = VIR_ARCH_I686;
} else if (STREQ(ut.machine, "amd64")) {

View File

@ -1,7 +1,7 @@
Index: libvirt-1.2.13/examples/apparmor/libvirt-qemu
Index: libvirt-1.2.14/examples/apparmor/libvirt-qemu
===================================================================
--- libvirt-1.2.13.orig/examples/apparmor/libvirt-qemu
+++ libvirt-1.2.13/examples/apparmor/libvirt-qemu
--- libvirt-1.2.14.orig/examples/apparmor/libvirt-qemu
+++ libvirt-1.2.14/examples/apparmor/libvirt-qemu
@@ -132,6 +132,9 @@
/sys/bus/ r,
/sys/class/ r,

View File

@ -8,11 +8,11 @@ Subject: [PATCH] support managed pci devices in xen driver
src/xenxs/xen_xm.c | 28 +++++++++++++++++++++++++++-
2 files changed, 35 insertions(+), 15 deletions(-)
Index: libvirt-1.2.13/src/xenconfig/xen_common.c
Index: libvirt-1.2.14/src/xenconfig/xen_common.c
===================================================================
--- libvirt-1.2.13.orig/src/xenconfig/xen_common.c
+++ libvirt-1.2.13/src/xenconfig/xen_common.c
@@ -401,6 +401,8 @@ xenParsePCI(virConfPtr conf, virDomainDe
--- libvirt-1.2.14.orig/src/xenconfig/xen_common.c
+++ libvirt-1.2.14/src/xenconfig/xen_common.c
@@ -403,6 +403,8 @@ xenParsePCI(virConfPtr conf, virDomainDe
{
virConfValuePtr list = virConfGetValue(conf, "pci");
virDomainHostdevDefPtr hostdev = NULL;
@ -21,7 +21,7 @@ Index: libvirt-1.2.13/src/xenconfig/xen_common.c
if (list && list->type == VIR_CONF_LIST) {
list = list->list;
@@ -422,6 +424,11 @@ xenParsePCI(virConfPtr conf, virDomainDe
@@ -424,6 +426,11 @@ xenParsePCI(virConfPtr conf, virDomainDe
/* pci=['0000:00:1b.0','0000:00:13.0'] */
if (!(key = list->str))
goto skippci;
@ -33,7 +33,7 @@ Index: libvirt-1.2.13/src/xenconfig/xen_common.c
if (!(nextkey = strchr(key, ':')))
goto skippci;
if (virStrncpy(domain, key, (nextkey - key), sizeof(domain)) == NULL) {
@@ -465,10 +472,31 @@ xenParsePCI(virConfPtr conf, virDomainDe
@@ -467,10 +474,31 @@ xenParsePCI(virConfPtr conf, virDomainDe
goto skippci;
if (virStrToLong_i(func, NULL, 16, &funcID) < 0)
goto skippci;
@ -66,10 +66,10 @@ Index: libvirt-1.2.13/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-1.2.13/src/xenconfig/xen_sxpr.c
Index: libvirt-1.2.14/src/xenconfig/xen_sxpr.c
===================================================================
--- libvirt-1.2.13.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-1.2.13/src/xenconfig/xen_sxpr.c
--- libvirt-1.2.14.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-1.2.14/src/xenconfig/xen_sxpr.c
@@ -999,6 +999,7 @@ xenParseSxprPCI(virDomainDefPtr def,
int busID;
int slotID;
@ -93,7 +93,7 @@ Index: libvirt-1.2.13/src/xenconfig/xen_sxpr.c
dev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI;
dev->source.subsys.u.pci.addr.domain = domainID;
dev->source.subsys.u.pci.addr.bus = busID;
@@ -2005,11 +2008,15 @@ static void
@@ -2006,11 +2009,15 @@ static void
xenFormatSxprPCI(virDomainHostdevDefPtr def,
virBufferPtr buf)
{
@ -110,7 +110,7 @@ Index: libvirt-1.2.13/src/xenconfig/xen_sxpr.c
}
@@ -2028,12 +2035,6 @@ xenFormatSxprOnePCI(virDomainHostdevDefP
@@ -2029,12 +2036,6 @@ xenFormatSxprOnePCI(virDomainHostdevDefP
virBufferPtr buf,
int detach)
{
@ -123,7 +123,7 @@ Index: libvirt-1.2.13/src/xenconfig/xen_sxpr.c
virBufferAddLit(buf, "(pci ");
xenFormatSxprPCI(def, buf);
if (detach)
@@ -2088,12 +2089,6 @@ xenFormatSxprAllPCI(virDomainDefPtr def,
@@ -2089,12 +2090,6 @@ xenFormatSxprAllPCI(virDomainDefPtr def,
for (i = 0; i < def->nhostdevs; i++) {
if (def->hostdevs[i]->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
def->hostdevs[i]->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) {

View File

@ -1,7 +1,7 @@
Index: libvirt-1.2.13/src/qemu/qemu.conf
Index: libvirt-1.2.14/src/qemu/qemu.conf
===================================================================
--- libvirt-1.2.13.orig/src/qemu/qemu.conf
+++ libvirt-1.2.13/src/qemu/qemu.conf
--- libvirt-1.2.14.orig/src/qemu/qemu.conf
+++ libvirt-1.2.14/src/qemu/qemu.conf
@@ -201,11 +201,20 @@
# isolation, but it cannot appear in a list of drivers.
#

View File

@ -1,7 +1,7 @@
Index: libvirt-1.2.13/daemon/libvirtd.service.in
Index: libvirt-1.2.14/daemon/libvirtd.service.in
===================================================================
--- libvirt-1.2.13.orig/daemon/libvirtd.service.in
+++ libvirt-1.2.13/daemon/libvirtd.service.in
--- libvirt-1.2.14.orig/daemon/libvirtd.service.in
+++ libvirt-1.2.14/daemon/libvirtd.service.in
@@ -5,6 +5,8 @@ After=network.target
After=dbus.service
After=iscsid.service

View File

@ -1,9 +1,9 @@
Adjust virtlockd init files to conform to SUSE standards
Index: libvirt-1.2.13/src/locking/virtlockd.sysconf
Index: libvirt-1.2.14/src/locking/virtlockd.sysconf
===================================================================
--- libvirt-1.2.13.orig/src/locking/virtlockd.sysconf
+++ libvirt-1.2.13/src/locking/virtlockd.sysconf
--- libvirt-1.2.14.orig/src/locking/virtlockd.sysconf
+++ libvirt-1.2.14/src/locking/virtlockd.sysconf
@@ -1,3 +1,7 @@
+## Path: System/Virtualization/virtlockd
+
@ -12,10 +12,10 @@ Index: libvirt-1.2.13/src/locking/virtlockd.sysconf
#
# Pass extra arguments to virtlockd
#VIRTLOCKD_ARGS=
Index: libvirt-1.2.13/src/locking/virtlockd.init.in
Index: libvirt-1.2.14/src/locking/virtlockd.init.in
===================================================================
--- libvirt-1.2.13.orig/src/locking/virtlockd.init.in
+++ libvirt-1.2.13/src/locking/virtlockd.init.in
--- libvirt-1.2.14.orig/src/locking/virtlockd.init.in
+++ libvirt-1.2.14/src/locking/virtlockd.init.in
@@ -4,12 +4,14 @@
# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV
#

View File

@ -1,170 +0,0 @@
Do not search xenstore for disk/network/PCI device IDs
Disk, network, and PCI devices can be referenced by name in Xen,
e.g. when modifying their configuration or remvoving them. As such,
don't search xenstore for a device ID corresponding to these devices.
Instead, search the devices contained in the domain definition and use
the devices's target name if found.
Note that for network devices, the mac address is used for the device
name. For PCI devices, the bdf (bus:dev:fun) specifier is used for
the device name.
This approach allows removing a disk/network/PCI device when domain
is inactive. We obviously can't search xenstore when the domain is
inactive.
Index: libvirt-1.2.13/src/xen/xend_internal.c
===================================================================
--- libvirt-1.2.13.orig/src/xen/xend_internal.c
+++ libvirt-1.2.13/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
-virDomainXMLDevID(virConnectPtr conn, virDomainDefPtr domain,
+virDomainXMLDevID(virConnectPtr conn ATTRIBUTE_UNUSED, virDomainDefPtr domain,
virDomainDeviceDefPtr dev, char *class,
char *ref, int ref_len);
@@ -3319,18 +3319,18 @@ xenDaemonDomainBlockPeek(virConnectPtr c
* Returns 0 in case of success, -1 in case of failure.
*/
static int
-virDomainXMLDevID(virConnectPtr conn,
+virDomainXMLDevID(virConnectPtr conn ATTRIBUTE_UNUSED,
virDomainDefPtr def,
virDomainDeviceDefPtr dev,
char *class,
char *ref,
int ref_len)
{
- xenUnifiedPrivatePtr priv = conn->privateData;
- char *xref;
- char *tmp;
+ size_t i;
if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
+ if (dev->data.disk->dst == NULL)
+ return -1;
const char *driver = virDomainDiskGetDriver(dev->data.disk);
if (STREQ_NULLABLE(driver, "tap") || STREQ_NULLABLE(driver, "tap2"))
@@ -3338,19 +3338,17 @@ virDomainXMLDevID(virConnectPtr conn,
else
strcpy(class, "vbd");
- if (dev->data.disk->dst == NULL)
- return -1;
- xenUnifiedLock(priv);
- xref = xenStoreDomainGetDiskID(conn, def->id,
- dev->data.disk->dst);
- xenUnifiedUnlock(priv);
- if (xref == NULL)
- return -1;
-
- tmp = virStrcpy(ref, xref, ref_len);
- VIR_FREE(xref);
- if (tmp == NULL)
- return -1;
+ /* For disks, the device name can be used directly. */
+ for (i = 0; i < def->ndisks; i++) {
+ virDomainDiskDefPtr disk = def->disks[i];
+ if (STREQ(dev->data.disk->dst, disk->dst)) {
+ if (virStrcpy(ref, disk->dst, ref_len) == NULL)
+ return -1;
+ else
+ return 0;
+ }
+ }
+ return -1;
} else if (dev->type == VIR_DOMAIN_DEVICE_NET) {
char mac[VIR_MAC_STRING_BUFLEN];
virDomainNetDefPtr netdef = dev->data.net;
@@ -3358,16 +3356,22 @@ virDomainXMLDevID(virConnectPtr conn,
strcpy(class, "vif");
- xenUnifiedLock(priv);
- xref = xenStoreDomainGetNetworkID(conn, def->id, mac);
- xenUnifiedUnlock(priv);
- if (xref == NULL)
- return -1;
-
- tmp = virStrcpy(ref, xref, ref_len);
- VIR_FREE(xref);
- if (tmp == NULL)
- return -1;
+ /* For nics, the mac address can be used directly. */
+ for (i = 0; i < def->nnets; i++) {
+ char dst_mac[30];
+ virDomainNetDefPtr dst_net = def->nets[i];
+ snprintf(dst_mac, sizeof(dst_mac), "%02x:%02x:%02x:%02x:%02x:%02x",
+ dst_net->mac.addr[0], dst_net->mac.addr[1],
+ dst_net->mac.addr[2], dst_net->mac.addr[3],
+ dst_net->mac.addr[4], dst_net->mac.addr[5]);
+ if (STREQ(mac, dst_mac)) {
+ if (virStrcpy(ref, dst_mac, ref_len) == NULL)
+ return -1;
+ else
+ return 0;
+ }
+ }
+ return -1;
} 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) {
@@ -3383,17 +3387,43 @@ virDomainXMLDevID(virConnectPtr conn,
strcpy(class, "pci");
- xenUnifiedLock(priv);
- xref = xenStoreDomainGetPCIID(conn, def->id, bdf);
- xenUnifiedUnlock(priv);
- VIR_FREE(bdf);
- if (xref == NULL)
- return -1;
+ /* For PCI devices, the device BFD can be used directly. */
+ for (i = 0; i < def->nhostdevs; i++) {
+ char *dst_bdf;
+ virDomainHostdevDefPtr hostdev = def->hostdevs[i];
+
+ if (hostdev->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS)
+ continue;
+ if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI)
+ continue;
+
+ if (virAsprintf(&dst_bdf, "%04x:%02x:%02x.%0x",
+ hostdev->source.subsys.u.pci.addr.domain,
+ hostdev->source.subsys.u.pci.addr.bus,
+ hostdev->source.subsys.u.pci.addr.slot,
+ hostdev->source.subsys.u.pci.addr.function) < 0) {
+ virReportOOMError();
+ VIR_FREE(bdf);
+ return -1;
+ }
- tmp = virStrcpy(ref, xref, ref_len);
- VIR_FREE(xref);
- if (tmp == NULL)
- return -1;
+ if (STREQ(bdf, dst_bdf)) {
+ if (virStrcpy(ref, dst_bdf, ref_len) == NULL) {
+ virReportOOMError();
+ VIR_FREE(dst_bdf);
+ VIR_FREE(bdf);
+ return -1;
+ } else {
+ VIR_FREE(dst_bdf);
+ VIR_FREE(bdf);
+ return 0;
+ }
+ }
+ VIR_FREE(dst_bdf);
+ }
+
+ VIR_FREE(bdf);
+ return -1;
} else {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("hotplug of device type not supported"));

View File

@ -1,7 +1,7 @@
Index: libvirt-1.2.13/src/xenconfig/xen_sxpr.c
Index: libvirt-1.2.14/src/xenconfig/xen_sxpr.c
===================================================================
--- libvirt-1.2.13.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-1.2.13/src/xenconfig/xen_sxpr.c
--- libvirt-1.2.14.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-1.2.14/src/xenconfig/xen_sxpr.c
@@ -334,7 +334,7 @@ xenParseSxprChar(const char *value,
static int
xenParseSxprDisks(virDomainDefPtr def,