Accepting request 831542 from home:jfehlig:branches:Virtualization

- spec: Enable the same hypervisor drivers for openSUSE and SLE
  jsc#SLE-11772
- spec: Enable the same storage drivers for openSUSE and SLE
  jsc#SLE-11877

- qemu: Reprobe capabilities if the qemu modules directory changes
  2ad009ea-qemu-check-modules-dir.patch
  boo#1175320

- Update to libvirt 6.7.0
  - jsc#SLE-14253, jsc#SLE-15159
  - CVE-2020-14339
  - Many incremental improvements and bug fixes, see
    https://libvirt.org/news.html
  - Dropped patches:
    2edd63a0-fix-virFileSetCOW-logic.patch,
    82bb167f-dont-cache-devmapper-major.patch,
    feb8564a-handle-no-devmapper.patch,
    53d9af1e-ignore-devmapper-open-errors.patch,
    support-managed-pci-xen-driver.patch,
    disable-multipath-pr-tests.patch

OBS-URL: https://build.opensuse.org/request/show/831542
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=840
This commit is contained in:
James Fehlig 2020-09-02 22:47:08 +00:00 committed by Git OBS Bridge
parent 92aa53bd73
commit b495b9f65b
38 changed files with 620 additions and 912 deletions

View File

@ -18,10 +18,10 @@ them.
create mode 100644 src/conf/domain_stats.c
create mode 100644 src/conf/domain_stats.h
Index: libvirt-6.6.0/src/conf/domain_stats.c
Index: libvirt-6.7.0/src/conf/domain_stats.c
===================================================================
--- /dev/null
+++ libvirt-6.6.0/src/conf/domain_stats.c
+++ libvirt-6.7.0/src/conf/domain_stats.c
@@ -0,0 +1,119 @@
+/*
+ * domain_stats.c: domain stats extraction helpers
@ -142,10 +142,10 @@ Index: libvirt-6.6.0/src/conf/domain_stats.c
+}
+
+#undef STATS_ADD_NET_PARAM
Index: libvirt-6.6.0/src/conf/domain_stats.h
Index: libvirt-6.7.0/src/conf/domain_stats.h
===================================================================
--- /dev/null
+++ libvirt-6.6.0/src/conf/domain_stats.h
+++ libvirt-6.7.0/src/conf/domain_stats.h
@@ -0,0 +1,62 @@
+/*
+ * domain_stats.h: domain stats extraction helpers
@ -209,11 +209,11 @@ Index: libvirt-6.6.0/src/conf/domain_stats.h
+ virTypedParamListPtr params);
+
+#endif /* __DOMAIN_STATS_H */
Index: libvirt-6.6.0/src/libvirt_private.syms
Index: libvirt-6.7.0/src/libvirt_private.syms
===================================================================
--- libvirt-6.6.0.orig/src/libvirt_private.syms
+++ libvirt-6.6.0/src/libvirt_private.syms
@@ -732,6 +732,9 @@ virDomainConfNWFilterInstantiate;
--- libvirt-6.7.0.orig/src/libvirt_private.syms
+++ libvirt-6.7.0/src/libvirt_private.syms
@@ -737,6 +737,9 @@ virDomainConfNWFilterInstantiate;
virDomainConfNWFilterTeardown;
virDomainConfVMNWFilterTeardown;
@ -223,7 +223,7 @@ Index: libvirt-6.6.0/src/libvirt_private.syms
# conf/interface_conf.h
virInterfaceDefFormat;
@@ -1778,6 +1781,7 @@ virCgroupGetMemoryUsage;
@@ -1783,6 +1786,7 @@ virCgroupGetMemoryUsage;
virCgroupGetMemSwapHardLimit;
virCgroupGetMemSwapUsage;
virCgroupGetPercpuStats;
@ -231,11 +231,11 @@ Index: libvirt-6.6.0/src/libvirt_private.syms
virCgroupHasController;
virCgroupHasEmptyTasks;
virCgroupKillPainfully;
Index: libvirt-6.6.0/src/qemu/qemu_driver.c
Index: libvirt-6.7.0/src/qemu/qemu_driver.c
===================================================================
--- libvirt-6.6.0.orig/src/qemu/qemu_driver.c
+++ libvirt-6.6.0/src/qemu/qemu_driver.c
@@ -64,6 +64,7 @@
--- libvirt-6.7.0.orig/src/qemu/qemu_driver.c
+++ libvirt-6.7.0/src/qemu/qemu_driver.c
@@ -67,6 +67,7 @@
#include "virarptable.h"
#include "viruuid.h"
#include "domain_conf.h"
@ -243,7 +243,7 @@ Index: libvirt-6.6.0/src/qemu/qemu_driver.c
#include "domain_audit.h"
#include "domain_cgroup.h"
#include "domain_driver.h"
@@ -20645,13 +20646,7 @@ qemuDomainGetStatsState(virQEMUDriverPtr
@@ -17528,13 +17529,7 @@ qemuDomainGetStatsState(virQEMUDriverPtr
virTypedParamListPtr params,
unsigned int privflags G_GNUC_UNUSED)
{
@ -258,7 +258,15 @@ Index: libvirt-6.6.0/src/qemu/qemu_driver.c
}
@@ -20954,17 +20949,7 @@ qemuDomainGetStatsCpuCgroup(virDomainObj
@@ -17829,25 +17824,11 @@ qemuDomainGetStatsCpuCgroup(virDomainObj
virTypedParamListPtr params)
{
qemuDomainObjPrivatePtr priv = dom->privateData;
- unsigned long long cpu_time = 0;
- unsigned long long user_time = 0;
- unsigned long long sys_time = 0;
- int err = 0;
if (!priv->cgroup)
return 0;
@ -277,7 +285,7 @@ Index: libvirt-6.6.0/src/qemu/qemu_driver.c
}
@@ -21132,76 +21117,15 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr
@@ -18015,76 +17996,15 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr
return ret;
}
@ -355,10 +363,10 @@ Index: libvirt-6.6.0/src/qemu/qemu_driver.c
/* refresh information by opening images on the disk */
static int
Index: libvirt-6.6.0/src/util/vircgroup.c
Index: libvirt-6.7.0/src/util/vircgroup.c
===================================================================
--- libvirt-6.6.0.orig/src/util/vircgroup.c
+++ libvirt-6.6.0/src/util/vircgroup.c
--- libvirt-6.7.0.orig/src/util/vircgroup.c
+++ libvirt-6.7.0/src/util/vircgroup.c
@@ -2776,6 +2776,31 @@ virCgroupControllerAvailable(int control
return ret;
}
@ -406,10 +414,10 @@ Index: libvirt-6.6.0/src/util/vircgroup.c
int
virCgroupNewPartition(const char *path G_GNUC_UNUSED,
bool create G_GNUC_UNUSED,
Index: libvirt-6.6.0/src/util/vircgroup.h
Index: libvirt-6.7.0/src/util/vircgroup.h
===================================================================
--- libvirt-6.6.0.orig/src/util/vircgroup.h
+++ libvirt-6.6.0/src/util/vircgroup.h
--- libvirt-6.7.0.orig/src/util/vircgroup.h
+++ libvirt-6.7.0/src/util/vircgroup.h
@@ -23,6 +23,7 @@
#include "virbitmap.h"
@ -425,16 +433,15 @@ Index: libvirt-6.6.0/src/util/vircgroup.h
+
+int virCgroupGetStatsCpu(virCgroupPtr cgroup,
+ virTypedParamListPtr params);
Index: libvirt-6.6.0/src/conf/Makefile.inc.am
Index: libvirt-6.7.0/src/conf/meson.build
===================================================================
--- libvirt-6.6.0.orig/src/conf/Makefile.inc.am
+++ libvirt-6.6.0/src/conf/Makefile.inc.am
@@ -28,6 +28,8 @@ DOMAIN_CONF_SOURCES = \
conf/domain_audit.h \
conf/domain_nwfilter.c \
conf/domain_nwfilter.h \
+ conf/domain_stats.c \
+ conf/domain_stats.h \
conf/virsavecookie.c \
conf/virsavecookie.h \
conf/moment_conf.c \
--- libvirt-6.7.0.orig/src/conf/meson.build
+++ libvirt-6.7.0/src/conf/meson.build
@@ -14,6 +14,7 @@ domain_conf_sources = [
'domain_capabilities.c',
'domain_conf.c',
'domain_nwfilter.c',
+ 'domain_stats.c',
'moment_conf.c',
'numa_conf.c',
'snapshot_conf.c',

View File

@ -19,11 +19,11 @@ reworking this patch and submitting it to upstream libvirt.
src/libxl/libxl_driver.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
Index: libvirt-6.6.0/src/libxl/libxl_driver.c
Index: libvirt-6.7.0/src/libxl/libxl_driver.c
===================================================================
--- libvirt-6.6.0.orig/src/libxl/libxl_driver.c
+++ libvirt-6.6.0/src/libxl/libxl_driver.c
@@ -5323,6 +5323,96 @@ libxlDomainMemoryStats(virDomainPtr dom,
--- libvirt-6.7.0.orig/src/libxl/libxl_driver.c
+++ libvirt-6.7.0/src/libxl/libxl_driver.c
@@ -5328,6 +5328,96 @@ libxlDomainMemoryStats(virDomainPtr dom,
#undef LIBXL_SET_MEMSTAT
@ -120,7 +120,7 @@ Index: libvirt-6.6.0/src/libxl/libxl_driver.c
static int
libxlDomainGetJobInfo(virDomainPtr dom,
virDomainJobInfoPtr info)
@@ -6792,6 +6882,7 @@ static virHypervisorDriver libxlHypervis
@@ -6797,6 +6887,7 @@ static virHypervisorDriver libxlHypervis
#endif
.nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */
.nodeGetCellsFreeMemory = libxlNodeGetCellsFreeMemory, /* 1.1.1 */

View File

@ -9,19 +9,20 @@ them using the existing API.
src/lxc/lxc_driver.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 138 insertions(+)
Index: libvirt-6.6.0/src/lxc/lxc_driver.c
Index: libvirt-6.7.0/src/lxc/lxc_driver.c
===================================================================
--- libvirt-6.6.0.orig/src/lxc/lxc_driver.c
+++ libvirt-6.6.0/src/lxc/lxc_driver.c
@@ -73,6 +73,7 @@
--- libvirt-6.7.0.orig/src/lxc/lxc_driver.c
+++ libvirt-6.7.0/src/lxc/lxc_driver.c
@@ -73,6 +73,8 @@
#include "netdev_bandwidth_conf.h"
#include "virsocket.h"
#include "virutil.h"
+#include "viralloc.h"
+#include "domain_stats.h"
#define VIR_FROM_THIS VIR_FROM_LXC
@@ -5065,6 +5066,128 @@ lxcDomainHasManagedSaveImage(virDomainPt
@@ -5066,6 +5068,129 @@ lxcDomainHasManagedSaveImage(virDomainPt
return ret;
}
@ -117,7 +118,8 @@ Index: libvirt-6.6.0/src/lxc/lxc_driver.c
+ return -1;
+ }
+
+ tmpstats = g_new0(virDomainStatsRecord, nvms + 1);
+ if (VIR_ALLOC_N(tmpstats, nvms + 1) < 0)
+ goto cleanup;
+
+ for (i = 0; i < nvms; i++) {
+ virDomainStatsRecordPtr tmp = NULL;
@ -150,7 +152,7 @@ Index: libvirt-6.6.0/src/lxc/lxc_driver.c
/* Function Tables */
static virHypervisorDriver lxcHypervisorDriver = {
@@ -5162,6 +5285,7 @@ static virHypervisorDriver lxcHypervisor
@@ -5163,6 +5288,7 @@ static virHypervisorDriver lxcHypervisor
.nodeGetFreePages = lxcNodeGetFreePages, /* 1.2.6 */
.nodeAllocPages = lxcNodeAllocPages, /* 1.2.9 */
.domainHasManagedSaveImage = lxcDomainHasManagedSaveImage, /* 1.2.13 */

View File

@ -0,0 +1,124 @@
commit 2ad009eadde27491ff4248f481560953776b2a87
Author: Jim Fehlig <jfehlig@suse.com>
Date: Thu Aug 20 15:52:17 2020 -0600
qemu: Check for changes in qemu modules directory
Add a configuration option for specifying location of the qemu modules
directory, defaulting to /usr/lib64/qemu. Then use this location to
check for changes in the directory, indicating that a qemu module has
changed and capabilities need to be reprobed.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Index: libvirt-6.7.0/meson.build
===================================================================
--- libvirt-6.7.0.orig/meson.build
+++ libvirt-6.7.0/meson.build
@@ -1758,6 +1758,12 @@ if not get_option('driver_qemu').disable
if use_qemu
conf.set('WITH_QEMU', 1)
+ qemu_moddir = get_option('qemu_moddir')
+ if qemu_moddir == ''
+ qemu_moddir = '/usr' / libdir / 'qemu'
+ endif
+ conf.set_quoted('QEMU_MODDIR', qemu_moddir)
+
if host_machine.system() in ['freebsd', 'darwin']
default_qemu_user = 'root'
default_qemu_group = 'wheel'
Index: libvirt-6.7.0/meson_options.txt
===================================================================
--- libvirt-6.7.0.orig/meson_options.txt
+++ libvirt-6.7.0/meson_options.txt
@@ -60,6 +60,7 @@ option('driver_openvz', type: 'feature',
option('driver_qemu', type: 'feature', value: 'auto', description: 'QEMU/KVM driver')
option('qemu_user', type: 'string', value: '', description: 'username to run QEMU system instance as')
option('qemu_group', type: 'string', value: '', description: 'groupname to run QEMU system instance as')
+option('qemu_moddir', type: 'string', value: '', description: 'set the directory where QEMU modules are located')
option('driver_remote', type: 'feature', value: 'enabled', description: 'remote driver')
option('remote_default_mode', type: 'combo', choices: ['legacy', 'direct'], value: 'legacy', description: 'remote driver default mode')
option('driver_secrets', type: 'feature', value: 'auto', description: 'local secrets management driver')
Index: libvirt-6.7.0/src/qemu/qemu_capabilities.c
===================================================================
--- libvirt-6.7.0.orig/src/qemu/qemu_capabilities.c
+++ libvirt-6.7.0/src/qemu/qemu_capabilities.c
@@ -677,6 +677,7 @@ struct _virQEMUCaps {
char *binary;
time_t ctime;
time_t libvirtCtime;
+ time_t modDirMtime;
bool invalidation;
virBitmapPtr flags;
@@ -4194,6 +4195,7 @@ virQEMUCapsParseSEVInfo(virQEMUCapsPtr q
* <qemuCaps>
* <emulator>/some/path</emulator>
* <qemuctime>234235253</qemuctime>
+ * <qemumoddirmtime>234235253</qemumoddirmtime>
* <selfctime>234235253</selfctime>
* <selfvers>1002016</selfvers>
* <flag name='foo'/>
@@ -4283,6 +4285,9 @@ virQEMUCapsLoadCache(virArch hostArch,
}
qemuCaps->ctime = (time_t)l;
+ if (virXPathLongLong("string(./qemumoddirmtime)", ctxt, &l) == 0)
+ qemuCaps->modDirMtime = (time_t)l;
+
if ((n = virXPathNodeSet("./flag", ctxt, &nodes)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("failed to parse qemu capabilities flags"));
@@ -4615,6 +4620,10 @@ virQEMUCapsFormatCache(virQEMUCapsPtr qe
qemuCaps->binary);
virBufferAsprintf(&buf, "<qemuctime>%llu</qemuctime>\n",
(long long)qemuCaps->ctime);
+ if (qemuCaps->modDirMtime > 0) {
+ virBufferAsprintf(&buf, "<qemumoddirmtime>%llu</qemumoddirmtime>\n",
+ (long long)qemuCaps->modDirMtime);
+ }
virBufferAsprintf(&buf, "<selfctime>%llu</selfctime>\n",
(long long)qemuCaps->libvirtCtime);
virBufferAsprintf(&buf, "<selfvers>%lu</selfvers>\n",
@@ -4881,6 +4890,23 @@ virQEMUCapsIsValid(void *data,
if (!qemuCaps->binary)
return true;
+ if (virFileExists(QEMU_MODDIR)) {
+ if (stat(QEMU_MODDIR, &sb) < 0) {
+ VIR_DEBUG("Failed to stat QEMU module directory '%s': %s",
+ QEMU_MODDIR,
+ g_strerror(errno));
+ return false;
+ }
+
+ if (sb.st_mtime != qemuCaps->modDirMtime) {
+ VIR_DEBUG("Outdated capabilities for '%s': QEMU modules "
+ "directory '%s' changed (%lld vs %lld)",
+ qemuCaps->binary, QEMU_MODDIR,
+ (long long)sb.st_mtime, (long long)qemuCaps->modDirMtime);
+ return false;
+ }
+ }
+
if (qemuCaps->libvirtCtime != virGetSelfLastChanged() ||
qemuCaps->libvirtVersion != LIBVIR_VERSION_NUMBER) {
VIR_DEBUG("Outdated capabilities for '%s': libvirt changed "
@@ -5463,6 +5489,15 @@ virQEMUCapsNewForBinaryInternal(virArch
goto error;
}
+ if (virFileExists(QEMU_MODDIR)) {
+ if (stat(QEMU_MODDIR, &sb) < 0) {
+ virReportSystemError(errno, _("Cannot check QEMU module directory %s"),
+ QEMU_MODDIR);
+ goto error;
+ }
+ qemuCaps->modDirMtime = sb.st_mtime;
+ }
+
if (virQEMUCapsInitQMP(qemuCaps, libDir, runUid, runGid) < 0)
goto error;

View File

@ -1,29 +0,0 @@
commit 2edd63a0dbd445112db23596ee0128521e8f1ff5
Author: Jiri Denemark <jdenemar@redhat.com>
Date: Wed Aug 5 10:01:45 2020 +0200
util: Fix logic in virFileSetCOW
When COW is not explicitly requested to be disabled or enabled, the
function is supposed to do nothing on non-BTRFS file systems.
Fixes commit 7230bc95aa78379c9ee20cf59394c5fc4305b75b.
https://bugzilla.redhat.com/show_bug.cgi?id=1866157
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Index: libvirt-6.6.0/src/util/virfile.c
===================================================================
--- libvirt-6.6.0.orig/src/util/virfile.c
+++ libvirt-6.6.0/src/util/virfile.c
@@ -4550,7 +4550,7 @@ virFileSetCOW(const char *path,
}
if (buf.f_type != BTRFS_SUPER_MAGIC) {
- if (state == VIR_TRISTATE_BOOL_ABSENT) {
+ if (state != VIR_TRISTATE_BOOL_ABSENT) {
virReportSystemError(ENOSYS,
_("unable to control COW flag on '%s', not btrfs"),
path);

View File

@ -1,74 +0,0 @@
commit 53d9af1e7924757e3b5f661131dd707d7110d094
Author: Michal Prívozník <mprivozn@redhat.com>
Date: Wed Aug 19 13:35:55 2020 +0200
virdevmapper: Ignore all errors when opening /dev/mapper/control
So far, only ENOENT is ignored (to deal with kernels without
devmapper). However, as reported on the list, under certain
scenarios a different error can occur. For instance, when libvirt
is running inside a container which doesn't have permissions to
talk to the devmapper. If this is the case, then open() returns
-1 and sets errno=EPERM.
Assuming that multipath devices are fairly narrow use case and
using them in a restricted container is even more narrow the best
fix seems to be to ignore all open errors BUT produce a warning
on failure. To avoid flooding logs with warnings on kernels
without devmapper the level is reduced to a plain debug message.
Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Reviewed-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Index: libvirt-6.6.0/src/util/virdevmapper.c
===================================================================
--- libvirt-6.6.0.orig/src/util/virdevmapper.c
+++ libvirt-6.6.0/src/util/virdevmapper.c
@@ -35,9 +35,12 @@
# include "viralloc.h"
# include "virstring.h"
# include "virfile.h"
+# include "virlog.h"
# define VIR_FROM_THIS VIR_FROM_STORAGE
+VIR_LOG_INIT("util.virdevmapper");
+
# define PROC_DEVICES "/proc/devices"
# define DM_NAME "device-mapper"
# define DEV_DM_DIR "/dev/" DM_DIR
@@ -130,11 +133,15 @@ virDMOpen(void)
memset(&dm, 0, sizeof(dm));
if ((controlFD = open(CONTROL_PATH, O_RDWR)) < 0) {
- if (errno == ENOENT)
- return -2;
-
- virReportSystemError(errno, _("Unable to open %s"), CONTROL_PATH);
- return -1;
+ /* We can't talk to devmapper. Produce a warning and let
+ * the caller decide what to do next. */
+ if (errno == ENOENT) {
+ VIR_DEBUG("device mapper not available");
+ } else {
+ VIR_WARN("unable to open %s: %s",
+ CONTROL_PATH, g_strerror(errno));
+ }
+ return -2;
}
if (!virDMIoctl(controlFD, DM_VERSION, &dm, &tmp)) {
@@ -310,9 +317,9 @@ virDevMapperGetTargets(const char *path,
if ((controlFD = virDMOpen()) < 0) {
if (controlFD == -2) {
- /* The CONTROL_PATH doesn't exist. Probably the
- * module isn't loaded, yet. Don't error out, just
- * exit. */
+ /* The CONTROL_PATH doesn't exist or is unusable.
+ * Probably the module isn't loaded, yet. Don't error
+ * out, just exit. */
return 0;
}

View File

@ -1,86 +0,0 @@
commit 82bb167f0d15b733b23931205be3488b83cb9ec6
Author: Michal Prívozník <mprivozn@redhat.com>
Date: Tue Aug 18 11:08:15 2020 +0200
virdevmapper: Don't cache device-mapper major
The device mapper major is needed in virIsDevMapperDevice() which
determines whether given device is managed by device-mapper. This
number is obtained by parsing /proc/devices and then stored in a
global variable so that the file doesn't have to be parsed again.
However, as it turns out this logic is flawed - the major number
is not static and can change as it can be specified as a
parameter when loading the dm-mod module.
Unfortunately, I was not able to come up with a good solution and
thus the /proc/devices file is being parsed every time we need
the device mapper major.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Index: libvirt-6.6.0/src/util/virdevmapper.c
===================================================================
--- libvirt-6.6.0.orig/src/util/virdevmapper.c
+++ libvirt-6.6.0/src/util/virdevmapper.c
@@ -46,11 +46,9 @@
G_STATIC_ASSERT(BUF_SIZE > sizeof(struct dm_ioctl));
-static unsigned int virDMMajor;
-
static int
-virDevMapperOnceInit(void)
+virDevMapperGetMajor(unsigned int *major)
{
g_autofree char *buf = NULL;
VIR_AUTOSTRINGLIST lines = NULL;
@@ -69,7 +67,7 @@ virDevMapperOnceInit(void)
if (sscanf(lines[i], "%u %ms\n", &maj, &dev) == 2 &&
STREQ(dev, DM_NAME)) {
- virDMMajor = maj;
+ *major = maj;
break;
}
}
@@ -85,9 +83,6 @@ virDevMapperOnceInit(void)
}
-VIR_ONCE_GLOBAL_INIT(virDevMapper);
-
-
static void *
virDMIoctl(int controlFD, int cmd, struct dm_ioctl *dm, char **buf)
{
@@ -305,9 +300,6 @@ virDevMapperGetTargets(const char *path,
* consist of devices or yet another targets. If that's the
* case, we have to stop recursion somewhere. */
- if (virDevMapperInitialize() < 0)
- return -1;
-
if ((controlFD = virDMOpen()) < 0)
return -1;
@@ -319,13 +311,14 @@ bool
virIsDevMapperDevice(const char *dev_name)
{
struct stat buf;
+ unsigned int major;
- if (virDevMapperInitialize() < 0)
+ if (virDevMapperGetMajor(&major) < 0)
return false;
if (!stat(dev_name, &buf) &&
S_ISBLK(buf.st_mode) &&
- major(buf.st_rdev) == virDMMajor)
+ major(buf.st_rdev) == major)
return true;
return false;

View File

@ -1,36 +0,0 @@
tests: temporarily disable the new multipath PR tests
The new multipath PR tests are failing in a build root env.
Disable them for now until discussing a solution with upstream.
Index: libvirt-6.6.0/tests/qemuhotplugtest.c
===================================================================
--- libvirt-6.6.0.orig/tests/qemuhotplugtest.c
+++ libvirt-6.6.0/tests/qemuhotplugtest.c
@@ -87,8 +87,6 @@ qemuHotplugCreateObjects(virDomainXMLOpt
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VNC);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SPICE);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SPICE_FILE_XFER_DISABLE);
- virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_PR_MANAGER_HELPER);
- virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_BLOCK);
if (qemuTestCapsCacheInsert(driver.qemuCapsCache, priv->qemuCaps) < 0)
return -1;
@@ -762,17 +760,6 @@ mymain(void)
"device_del", QMP_DEVICE_DELETED("scsi3-0-5-6") QMP_OK,
"human-monitor-command", HMP(""));
- DO_TEST_ATTACH("base-live", "disk-scsi-multipath", false, true,
- "object-add", QMP_OK,
- "human-monitor-command", HMP("OK\\r\\n"),
- "device_add", QMP_OK);
- DO_TEST_DETACH("base-live", "disk-scsi-multipath", true, true,
- "device_del", QMP_OK);
- DO_TEST_DETACH("base-live", "disk-scsi-multipath", false, false,
- "device_del", QMP_DEVICE_DELETED("scsi0-0-0-0") QMP_OK,
- "human-monitor-command", HMP(""),
- "object-del", QMP_OK);
-
DO_TEST_ATTACH("base-live", "qemu-agent", false, true,
"chardev-add", QMP_OK,
"device_add", QMP_OK);

View File

@ -1,74 +0,0 @@
commit feb8564a3cc63bc8f68284063d53ec0d2d81a1cc
Author: Michal Prívozník <mprivozn@redhat.com>
Date: Tue Aug 18 11:04:24 2020 +0200
virdevmapper: Handle kernel without device-mapper support
In one of my latest patch (v6.6.0~30) I was trying to remove
libdevmapper use in favor of our own implementation. However, the
code did not take into account that device mapper can be not
compiled into the kernel (e.g. be a separate module that's not
loaded) in which case /proc/devices won't have the device-mapper
major number and thus virDevMapperGetTargets() and/or
virIsDevMapperDevice() fails.
However, such failure is safe to ignore, because if device mapper
is missing then there can't be any multipath devices and thus we
don't need to allow the deps in CGroups, nor create them in the
domain private namespace, etc.
Fixes: 22494556542c676d1b9e7f1c1f2ea13ac17e1e3e
Reported-by: Andrea Bolognani <abologna@redhat.com>
Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Index: libvirt-6.6.0/src/util/virdevmapper.c
===================================================================
--- libvirt-6.6.0.orig/src/util/virdevmapper.c
+++ libvirt-6.6.0/src/util/virdevmapper.c
@@ -54,6 +54,9 @@ virDevMapperGetMajor(unsigned int *major
VIR_AUTOSTRINGLIST lines = NULL;
size_t i;
+ if (!virFileExists(CONTROL_PATH))
+ return -2;
+
if (virFileReadAll(PROC_DEVICES, BUF_SIZE, &buf) < 0)
return -1;
@@ -126,8 +129,13 @@ virDMOpen(void)
memset(&dm, 0, sizeof(dm));
- if ((controlFD = open(CONTROL_PATH, O_RDWR)) < 0)
+ if ((controlFD = open(CONTROL_PATH, O_RDWR)) < 0) {
+ if (errno == ENOENT)
+ return -2;
+
+ virReportSystemError(errno, _("Unable to open %s"), CONTROL_PATH);
return -1;
+ }
if (!virDMIoctl(controlFD, DM_VERSION, &dm, &tmp)) {
virReportSystemError(errno, "%s",
@@ -300,8 +308,16 @@ virDevMapperGetTargets(const char *path,
* consist of devices or yet another targets. If that's the
* case, we have to stop recursion somewhere. */
- if ((controlFD = virDMOpen()) < 0)
+ if ((controlFD = virDMOpen()) < 0) {
+ if (controlFD == -2) {
+ /* The CONTROL_PATH doesn't exist. Probably the
+ * module isn't loaded, yet. Don't error out, just
+ * exit. */
+ return 0;
+ }
+
return -1;
+ }
return virDevMapperGetTargetsImpl(controlFD, path, devPaths, ttl);
}

View File

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

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEERTtlMQWVVihVRxGZymi+gBAITJwFAl8nPNQACgkQymi+gBAI
TJyRhw//U6aClk7b/6M4NqTVZYM1siSCWDcGWUlTPKziOfTPFUzHu4qfNRMjJ4rh
RdExShtlV1hCOHnbyiPKkIgyh3/l90pi38SQT8xHn+qWDr5YyejTwtoevLb+Ifr5
Lg48owG25cBJTRzJ4mWXeiT9d4O58oy0fEIRaeKX8SA8+hd6ee51YLdhBnDe69PS
cJrWME7okFrdpYCHX6CQkAo9lLlM1a0s0Px+IyV5bojnvzl/GTMrTElkdFYEdf9U
izR2PLDbSY0O+xeVvqNgU85OoP5P/sce8YVJsJAm3N9BbAdery+xsgIKdn5dQK6J
+NEnkchWilSHqvkODAr7jJplr9Ljtgt2VU8j/7CSh5VTTFf8SthfsR4xlhMr8f3K
EcqqhwiX408rfWM7iHnVqC921XTiObvZx/6LX3ELJF3cpccIG8wk24MsmjcpZSEx
duB0DFFUBgw7gYDNru+hyTXjZ5KuB5PLPlPDJNvSTs/cCDwEUoACiu0IH2Xd1gq2
4vzDoEvr2xh6bTVGthjICeWVoIrUHuKo/xpUOIDBrXv8tyOjrqAclsLtjWcUYKwz
7CTBjEz+OSspgydYZ+4zToh866O1pZuTRR3F8SPbISHm864FkgNFBOU8Sp1EDcTE
Ru0ol+eGSg8p3fzQgyHAqS/bfHwwPdCNzsQVZzSIKeZRm5KKG/U=
=SptM
-----END PGP SIGNATURE-----

3
libvirt-6.7.0.tar.xz Normal file
View File

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

16
libvirt-6.7.0.tar.xz.asc Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEERTtlMQWVVihVRxGZymi+gBAITJwFAl9N8/gACgkQymi+gBAI
TJxc/g//byuzhYbB4+YF1nDWD7UN6pGz/N+23Rj1LX2qGlJkFrzW1quMiGTgviFV
V0y1D211WNkbJvZ2b4BtPY/rS0DDqlLAxT8Z8B5+2rmJeOfmbRkHUSobxBRrjDMP
jCRo2Vc1uh0YIQxde5/Su+fXkrRU5+kFzAwmtS8Q2EobiXRWBVcUwHtM3Ix2R+3y
gUMOqag3NhDc1rVyAcszOnxhYjVeoHmaOaBfLOYLLQsZoESofXgugx9ybWGFSPsW
CtKIkBZLG/w9cDDJperN4runDu9O1FNgaCFd/2lX51f75b9DxHQcOL7HW15E6H9l
ssu7djcrxS1DQefgTe1tpDfBl5nILKvlUSrVStBVOe41SM/in4AcS5PkQk2HDEiS
omVa5cs6DsezNSEkXGgKXMyGNq+I/MdF+F67lrL/a9qS2hr8euBs5EuZAi3ussZc
4pzMtW+nRsrnz4pPXb82NVWGbGrYyxBkbhYd148iaOCcp4/RRKtDpvICVaJAHKbN
TAHxy82SUGcdlI8RGu3nAT260ZEQ008pu+GF3cwJMqQoK9S/C4i+GiR+WmvE6MAd
KQtdKXyRkXqP8n+fTZSfEfZm2cWVCSvOW5fC3wzWiEIvy7fIG5pH1TOTFai9+ARv
Owmo7nFNH2cjy1EdVIBk1mR3ccc26TED/P3SE2KlH9z3saEQuRE=
=nU1U
-----END PGP SIGNATURE-----

View File

@ -2,10 +2,10 @@ Add POWER8 v2.0 and v2.1 to cpu map XML
From: <ro@suse.de>
Index: libvirt-6.6.0/src/cpu_map/ppc64_POWER8.xml
Index: libvirt-6.7.0/src/cpu_map/ppc64_POWER8.xml
===================================================================
--- libvirt-6.6.0.orig/src/cpu_map/ppc64_POWER8.xml
+++ libvirt-6.6.0/src/cpu_map/ppc64_POWER8.xml
--- libvirt-6.7.0.orig/src/cpu_map/ppc64_POWER8.xml
+++ libvirt-6.7.0/src/cpu_map/ppc64_POWER8.xml
@@ -4,5 +4,7 @@
<pvr value='0x004b0000' mask='0xffff0000'/>
<pvr value='0x004c0000' mask='0xffff0000'/>

View File

@ -1,35 +1,7 @@
Index: libvirt-6.6.0/configure.ac
Index: libvirt-6.7.0/tools/virsh.c
===================================================================
--- libvirt-6.6.0.orig/configure.ac
+++ libvirt-6.6.0/configure.ac
@@ -289,6 +289,7 @@ LIBVIRT_ARG_LIBSSH
LIBVIRT_ARG_LIBXML
LIBVIRT_ARG_MACVTAP
LIBVIRT_ARG_NETCF
+LIBVIRT_ARG_NETCONTROL
LIBVIRT_ARG_NLS
LIBVIRT_ARG_NSS
LIBVIRT_ARG_NUMACTL
@@ -332,6 +333,7 @@ LIBVIRT_CHECK_LIBSSH
LIBVIRT_CHECK_LIBXML
LIBVIRT_CHECK_MACVTAP
LIBVIRT_CHECK_NETCF
+LIBVIRT_CHECK_NETCONTROL
LIBVIRT_CHECK_NLS
LIBVIRT_CHECK_NUMACTL
LIBVIRT_CHECK_NWFILTER
@@ -1011,6 +1013,7 @@ LIBVIRT_RESULT_LIBXL
LIBVIRT_RESULT_LIBXML
LIBVIRT_RESULT_MACVTAP
LIBVIRT_RESULT_NETCF
+LIBVIRT_RESULT_NETCONTROL
LIBVIRT_RESULT_NLS
LIBVIRT_RESULT_NSS
LIBVIRT_RESULT_NUMACTL
Index: libvirt-6.6.0/tools/virsh.c
===================================================================
--- libvirt-6.6.0.orig/tools/virsh.c
+++ libvirt-6.6.0/tools/virsh.c
--- libvirt-6.7.0.orig/tools/virsh.c
+++ libvirt-6.7.0/tools/virsh.c
@@ -547,6 +547,8 @@ virshShowVersion(vshControl *ctl G_GNUC_
vshPrint(ctl, " Interface");
# if defined(WITH_NETCF)
@ -39,10 +11,10 @@ Index: libvirt-6.6.0/tools/virsh.c
# elif defined(WITH_UDEV)
vshPrint(ctl, " udev");
# endif
Index: libvirt-6.6.0/src/interface/interface_backend_netcf.c
Index: libvirt-6.7.0/src/interface/interface_backend_netcf.c
===================================================================
--- libvirt-6.6.0.orig/src/interface/interface_backend_netcf.c
+++ libvirt-6.6.0/src/interface/interface_backend_netcf.c
--- libvirt-6.7.0.orig/src/interface/interface_backend_netcf.c
+++ libvirt-6.7.0/src/interface/interface_backend_netcf.c
@@ -21,7 +21,12 @@
#include <config.h>
@ -154,10 +126,10 @@ Index: libvirt-6.6.0/src/interface/interface_backend_netcf.c
if (virRegisterConnectDriver(&interfaceConnectDriver, false) < 0)
return -1;
if (virSetSharedInterfaceDriver(&interfaceDriver) < 0)
Index: libvirt-6.6.0/src/interface/interface_driver.c
Index: libvirt-6.7.0/src/interface/interface_driver.c
===================================================================
--- libvirt-6.6.0.orig/src/interface/interface_driver.c
+++ libvirt-6.6.0/src/interface/interface_driver.c
--- libvirt-6.7.0.orig/src/interface/interface_driver.c
+++ libvirt-6.7.0/src/interface/interface_driver.c
@@ -30,8 +30,15 @@ interfaceRegister(void)
if (netcfIfaceRegister() == 0)
return 0;
@ -175,71 +147,74 @@ Index: libvirt-6.6.0/src/interface/interface_driver.c
if (udevIfaceRegister() == 0)
return 0;
#endif /* WITH_UDEV */
Index: libvirt-6.6.0/m4/virt-netcontrol.m4
Index: libvirt-6.7.0/meson.build
===================================================================
--- /dev/null
+++ libvirt-6.6.0/m4/virt-netcontrol.m4
@@ -0,0 +1,39 @@
+dnl The libnetcontrol library
+dnl
+dnl Copyright (C) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License, or (at your option) any later version.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library. If not, see
+dnl <http://www.gnu.org/licenses/>.
+dnl
--- libvirt-6.7.0.orig/meson.build
+++ libvirt-6.7.0/meson.build
@@ -1201,6 +1201,12 @@ if netcf_dep.found()
conf.set('WITH_NETCF', 1)
endif
+netcontrol_version = '0.2.0'
+netcontrol_dep = dependency('netcontrol', version: '>=' + netcontrol_version, require: get_option('netcontrol'))
+if netcontrol_dep.found()
+ conf.set('WITH_NETCONTROL', 1)
+endif
+
+AC_DEFUN([LIBVIRT_ARG_NETCONTROL],[
+ LIBVIRT_ARG_WITH_FEATURE([NETCONTROL], [netcontrol], [check], [0.2.0])
+])
+
+AC_DEFUN([LIBVIRT_CHECK_NETCONTROL],[
+ LIBVIRT_CHECK_PKG([NETCONTROL], [netcontrol], [0.2.0])
+
+ if test "$with_netcontrol" = "yes" ; then
+ old_CFLAGS="$CFLAGS"
+ old_LIBS="$CFLAGS"
+ CFLAGS="$CFLAGS $NETCONTROL_CFLAGS"
+ LIBS="$LIBS $NETCONTROL_LIBS"
+ CFLAGS="$old_CFLAGS"
+ LIBS="$old_LIBS"
+ fi
+])
+
+AC_DEFUN([LIBVIRT_RESULT_NETCONTROL],[
+ LIBVIRT_RESULT_LIB([NETCONTROL])
+])
Index: libvirt-6.6.0/src/interface/Makefile.inc.am
have_gnu_gettext_tools = false
if not get_option('nls').disabled()
have_gettext = cc.has_function('gettext')
@@ -1632,10 +1638,10 @@ elif get_option('driver_hyperv').enabled
error('openwsman is required for the Hyper-V driver')
endif
-if not get_option('driver_interface').disabled() and conf.has('WITH_LIBVIRTD') and (udev_dep.found() or netcf_dep.found())
+if not get_option('driver_interface').disabled() and conf.has('WITH_LIBVIRTD') and (udev_dep.found() or netcf_dep.found() or netcontrol_dep.found())
conf.set('WITH_INTERFACE', 1)
elif get_option('driver_interface').enabled()
- error('Requested the Interface driver without netcf or udev and libvirtd support')
+ error('Requested the Interface driver without netcf, netcontrol or udev and libvirtd support')
endif
if not get_option('driver_libxl').disabled() and conf.has('WITH_LIBVIRTD')
@@ -2442,6 +2448,7 @@ libs_summary = {
'libxml': libxml_dep.found(),
'macvtap': conf.has('WITH_MACVTAP'),
'netcf': netcf_dep.found(),
+ 'netcontrol': netcontrol_dep.found(),
'NLS': have_gnu_gettext_tools,
'nss': conf.has('WITH_NSS'),
'numactl': numactl_dep.found(),
Index: libvirt-6.7.0/src/interface/meson.build
===================================================================
--- libvirt-6.6.0.orig/src/interface/Makefile.inc.am
+++ libvirt-6.6.0/src/interface/Makefile.inc.am
@@ -6,6 +6,7 @@ INTERFACE_DRIVER_SOURCES = \
$(NULL)
--- libvirt-6.7.0.orig/src/interface/meson.build
+++ libvirt-6.7.0/src/interface/meson.build
@@ -2,7 +2,7 @@ interface_driver_sources = [
'interface_driver.c',
]
INTERFACE_DRIVER_NETCF_SOURCES = interface/interface_backend_netcf.c
+INTERFACE_DRIVER_NETCONTROL_SOURCES = interface/interface_backend_netcf.c
INTERFACE_DRIVER_UDEV_SOURCES = interface/interface_backend_udev.c
-if conf.has('WITH_NETCF')
+if conf.has('WITH_NETCF') or conf.has('WITH_NETCONTROL')
interface_driver_sources += 'interface_backend_netcf.c'
endif
DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(INTERFACE_DRIVER_SOURCES))
@@ -38,6 +39,11 @@ libvirt_driver_interface_la_CFLAGS += $(
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
libvirt_driver_interface_la_SOURCES += $(INTERFACE_DRIVER_NETCF_SOURCES)
endif WITH_NETCF
+if WITH_NETCONTROL
+libvirt_driver_interface_la_CFLAGS += $(NETCONTROL_CFLAGS)
+libvirt_driver_interface_la_LIBADD += $(NETCONTROL_LIBS)
+libvirt_driver_interface_la_SOURCES += $(INTERFACE_DRIVER_NETCONTROL_SOURCES)
+endif WITH_NETCONTROL
if WITH_UDEV
libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
@@ -23,6 +23,7 @@ if conf.has('WITH_INTERFACE')
access_dep,
libnl_dep,
netcf_dep,
+ netcontrol_dep,
udev_dep,
],
'link_args': [
Index: libvirt-6.7.0/meson_options.txt
===================================================================
--- libvirt-6.7.0.orig/meson_options.txt
+++ libvirt-6.7.0/meson_options.txt
@@ -30,6 +30,7 @@ option('libssh', type: 'feature', value:
option('libssh2', type: 'feature', value: 'auto', description: 'libssh2 support')
option('macvtap', type: 'feature', value: 'auto', description: 'enable macvtap device')
option('netcf', type: 'feature', value: 'auto', description: 'netcf support')
+option('netcontrol', type: 'feature', value: 'auto', description: 'netcontrol support')
option('nls', type: 'feature', value: 'auto', description: 'nls support')
option('numactl', type: 'feature', value: 'auto', description: 'numactl support')
option('openwsman', type: 'feature', value: 'auto', description: 'openwsman support')

View File

@ -1,3 +1,34 @@
-------------------------------------------------------------------
Wed Sep 2 17:18:34 UTC 2020 - James Fehlig <jfehlig@suse.com>
- spec: Enable the same hypervisor drivers for openSUSE and SLE
jsc#SLE-11772
- spec: Enable the same storage drivers for openSUSE and SLE
jsc#SLE-11877
-------------------------------------------------------------------
Tue Sep 1 23:04:48 UTC 2020 - James Fehlig <jfehlig@suse.com>
- qemu: Reprobe capabilities if the qemu modules directory changes
2ad009ea-qemu-check-modules-dir.patch
boo#1175320
-------------------------------------------------------------------
Tue Sep 1 19:59:58 UTC 2020 - James Fehlig <jfehlig@suse.com>
- Update to libvirt 6.7.0
- jsc#SLE-14253, jsc#SLE-15159
- CVE-2020-14339
- Many incremental improvements and bug fixes, see
https://libvirt.org/news.html
- Dropped patches:
2edd63a0-fix-virFileSetCOW-logic.patch,
82bb167f-dont-cache-devmapper-major.patch,
feb8564a-handle-no-devmapper.patch,
53d9af1e-ignore-devmapper-open-errors.patch,
support-managed-pci-xen-driver.patch,
disable-multipath-pr-tests.patch
-------------------------------------------------------------------
Wed Aug 19 19:36:52 UTC 2020 - James Fehlig <jfehlig@suse.com>

View File

@ -21,9 +21,6 @@
%define _fillupdir /var/adm/fillup-templates
%endif
# libvirt does not support building in srcdir
%define _vpath_builddir %{_target_platform}
# The hypervisor drivers that run in libvirtd
%define with_qemu 0%{!?_without_qemu:1}
%define with_lxc 0%{!?_without_lxc:1}
@ -31,14 +28,19 @@
%define with_vbox 0%{!?_without_vbox:0}
# Then the hypervisor drivers that run outside libvirtd, in libvirt.so
%define with_openvz 0%{!?_without_openvz:1}
# The vmware and esx drivers are built for both openSUSE and SLE, but they
# are not supported.
%define with_vmware 0%{!?_without_vmware:1}
%define with_esx 0%{!?_without_esx:1}
# Until we have requests for them, disable building the hyperv and openvz drivers
%define with_hyperv 0%{!?_without_hyperv:0}
%define with_openvz 0%{!?_without_openvz:0}
# Then the secondary host drivers, which run inside libvirtd
%define with_storage_rbd 0%{!?_without_storage_rbd:0}
%define with_storage_sheepdog 0
# The gluster storage backend is built for both openSUSE and SLE, but it is
# not supported
%define with_storage_gluster 0%{!?_without_storage_gluster:1}
%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:0}
%define with_apparmor 0%{!?_without_apparmor:1}
@ -48,9 +50,9 @@
%define with_polkit_rules 1
%define with_wireshark 0%{!?_without_wireshark:1}
%define with_libssh2 0%{!?_without_libssh2:1}
%define with_numactl 0%{!?_without_numactl:1}
# A few optional bits off by default, we enable later
%define with_numactl 0%{!?_without_numactl:0}
%define with_numad 0%{!?_without_numad:0}
%define with_firewalld 0%{!?_without_firewalld:0}
%define with_firewalld_zone 0%{!?_without_firewalld_zone:0}
@ -59,29 +61,14 @@
# Set the OS / architecture specific special cases
# Xen is available only on x86_64 and aarch64
%ifnarch x86_64 aarch64
# Xen is only available on x86_64
%ifnarch x86_64
%define with_libxl 0
%endif
# For SLE, further restrict Xen support to x86_64 only
%if ! 0%{?is_opensuse}
%ifarch %arm aarch64
%define with_libxl 0
%endif
%endif
# Enable numactl for most architectures. Handle aarch64 separately
%ifnarch s390 s390x %arm %ix86 aarch64
%define with_numactl 0%{!?_without_numactl:1}
%endif
# For aarch64, numactl is only available on newer than 1320, or SLE12
# family newer than 120100
%ifarch aarch64
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?sle_version} > 120100 ) )
%define with_numactl 0%{!?_without_numactl:1}
%endif
%ifarch s390 s390x %arm %ix86
%define with_numactl 0
%endif
# vbox is available only on i386 x86_64
@ -89,14 +76,6 @@
%define with_vbox 0
%endif
# Disable hypervisor drivers not supported in SLE
%if ! 0%{?is_opensuse}
%define with_openvz 0
%define with_vbox 0
%define with_vmware 0
%define with_hyperv 0
%endif
# Enable firewalld support in newer code bases
%if 0%{?suse_version} >= 1500
%define with_firewalld 1
@ -134,22 +113,13 @@
# For arm
%ifarch aarch64
# 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}
%define with_rbd_lib librbd-devel
%endif
%endif
# gluster storage backend is not supported in SLE
%if ! 0%{?is_opensuse}
%define with_storage_gluster 0
%define with_storage_rbd 0%{!?_without_storage_rbd:1}
%define with_rbd_lib librbd-devel
%endif
# libiscsi storage backend needs libiscsi >= 1.18.0 which is only available
# in suse_version >= 1500
%if 0%{?suse_version} > 1500
%if 0%{?suse_version} >= 1500
%define with_storage_iscsi_direct 1
%endif
@ -185,7 +155,7 @@
Name: libvirt
URL: http://libvirt.org/
Version: 6.6.0
Version: 6.7.0
Release: 0
Summary: Library providing a virtualization API
License: LGPL-2.1-or-later
@ -217,10 +187,9 @@ Requires: %{name}-libs = %{version}-%{release}
# All build-time requirements. Run-time requirements are
# listed against each sub-RPM
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext-tools
BuildRequires: libtool
BuildRequires: meson >= 0.54.0
BuildRequires: ninja
# Needed for virkmodtest in 'make check'
BuildRequires: modutils
BuildRequires: pkgconfig(systemd)
@ -230,6 +199,8 @@ BuildRequires: xen-devel
%if %{with_qemu}
# For managing ACLs
BuildRequires: libacl-devel
# For qemu-bridge-helper, qemu-pr-helper
BuildRequires: qemu-tools
%endif
%if %{with_bash_completion}
BuildRequires: bash-completion-devel >= 2.0
@ -283,6 +254,7 @@ BuildRequires: open-iscsi
BuildRequires: libiscsi-devel
%endif
# For disk driver
BuildRequires: parted
BuildRequires: parted-devel
# For Multipath support
BuildRequires: device-mapper-devel
@ -336,10 +308,7 @@ Source6: libvirtd-relocation-server.xml
Source99: baselibs.conf
Source100: %{name}-rpmlintrc
# Upstream patches
Patch0: 2edd63a0-fix-virFileSetCOW-logic.patch
Patch1: 82bb167f-dont-cache-devmapper-major.patch
Patch2: feb8564a-handle-no-devmapper.patch
Patch3: 53d9af1e-ignore-devmapper-open-errors.patch
Patch0: 2ad009ea-qemu-check-modules-dir.patch
# Patches pending upstream review
Patch100: libxl-dom-reset.patch
Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch
@ -360,19 +329,14 @@ Patch204: suse-virtlogd-sysconfig-settings.patch
Patch205: suse-qemu-conf.patch
Patch206: suse-ovmf-paths.patch
Patch207: suse-apparmor-libnl-paths.patch
Patch208: support-managed-pci-xen-driver.patch
Patch209: libxl-support-block-script.patch
Patch210: qemu-apparmor-screenshot.patch
Patch211: libvirt-suse-netcontrol.patch
Patch212: lxc-wait-after-eth-del.patch
Patch213: suse-libxl-disable-autoballoon.patch
Patch214: suse-xen-ovmf-loaders.patch
Patch215: suse-bump-xen-version.patch
Patch216: disable-multipath-pr-tests.patch
# SLES-Only patches
%if ! 0%{?is_opensuse}
Patch400: virt-create-rootfs.patch
%endif
Patch208: libxl-support-block-script.patch
Patch209: qemu-apparmor-screenshot.patch
Patch210: libvirt-suse-netcontrol.patch
Patch211: lxc-wait-after-eth-del.patch
Patch212: suse-libxl-disable-autoballoon.patch
Patch213: suse-xen-ovmf-loaders.patch
Patch214: suse-bump-xen-version.patch
Patch215: virt-create-rootfs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -648,9 +612,11 @@ Requires: %{name}-daemon-driver-storage-iscsi = %{version}-%{release}
Requires: %{name}-daemon-driver-storage-logical = %{version}-%{release}
Requires: %{name}-daemon-driver-storage-mpath = %{version}-%{release}
Requires: %{name}-daemon-driver-storage-scsi = %{version}-%{release}
%if %{with_storage_gluster}
Requires: %{name}-daemon-driver-storage-gluster = %{version}-%{release}
%endif
# Closing the Leap gap note:
# Generally we would have a conditional 'Requires:' for daemon-driver-storage-gluster
# similar to the other configurable storage backends, but gluster is not supported in
# SLE. We'll build the backend so it is available but not require it as part of the
# daemon-driver-storage metapackage
%if %{with_storage_rbd}
Requires: %{name}-daemon-driver-storage-rbd = %{version}-%{release}
%endif
@ -880,9 +846,6 @@ libvirt plugin for NSS for translating domain names into IP addresses.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch100 -p1
%patch101 -p1
%patch150 -p1
@ -908,110 +871,109 @@ libvirt plugin for NSS for translating domain names into IP addresses.
%patch213 -p1
%patch214 -p1
%patch215 -p1
%patch216 -p1
%if ! 0%{?is_opensuse}
%patch400 -p1
%endif
%build
%if %{with_qemu}
%define arg_qemu --with-qemu
%define arg_qemu -Ddriver_qemu=enabled
%else
%define arg_qemu --without-qemu
%define arg_qemu -Ddriver_qemu=disabled
%endif
%if %{with_openvz}
%define arg_openvz --with-openvz
%define arg_openvz -Ddriver_openvz=enabled
%else
%define arg_openvz --without-openvz
%define arg_openvz -Ddriver_openvz=disabled
%endif
%if %{with_lxc}
%define arg_lxc --with-lxc
%define arg_lxc -Ddriver_lxc=enabled
%else
%define arg_lxc --without-lxc
%define arg_lxc -Ddriver_lxc=disabled
%endif
%if %{with_vbox}
%define arg_vbox --with-vbox
%define arg_vbox -Ddriver_vbox=enabled
%else
%define arg_vbox --without-vbox
%define arg_vbox -Ddriver_vbox=disabled
%endif
%if %{with_esx}
%define arg_esx --with-esx
%define arg_esx -Ddriver_esx=enabled
%else
%define arg_esx --without-esx
%define arg_esx -Ddriver_esx=disabled
%endif
%if %{with_vmware}
%define arg_vmware --with-vmware
%define arg_vmware -Ddriver_vmware=enabled
%else
%define arg_vmware --without-vmware
%define arg_vmware -Ddriver_vmware=disabled
%endif
%if %{with_hyperv}
%define arg_hyperv --with-hyperv
%define arg_hyperv -Ddriver_hyperv=enabled
%define arg_openwsman -Dopenwsman=enabled
%else
%define arg_hyperv --without-hyperv
%define arg_hyperv -Ddriver_hyperv=disabled
%define arg_openwsman -Dopenwsman=disabled
%endif
%if %{with_libxl}
%define arg_libxl --with-libxl
%define arg_libxl -Ddriver_libxl=enabled
%else
%define arg_libxl --without-libxl
%define arg_libxl -Ddriver_libxl=disabled
%endif
%if %{with_storage_rbd}
%define arg_storage_rbd --with-storage-rbd
%define arg_storage_rbd -Dstorage_rbd=enabled
%else
%define arg_storage_rbd --without-storage-rbd
%define arg_storage_rbd -Dstorage_rbd=disabled
%endif
%if %{with_storage_sheepdog}
%define arg_storage_sheepdog --with-storage-sheepdog
%define arg_storage_sheepdog -Dstorage_sheepdog=enabled
%else
%define arg_storage_sheepdog --without-storage-sheepdog
%define arg_storage_sheepdog -Dstorage_sheepdog=disabled
%endif
%if %{with_storage_gluster}
%define arg_storage_gluster --with-storage-gluster
%define arg_storage_gluster -Dstorage_gluster=enabled
%else
%define arg_storage_gluster --without-storage-gluster
%define arg_storage_gluster -Dstorage_gluster=disabled
%endif
%if %{with_storage_iscsi_direct}
%define arg_storage_iscsi_direct --with-storage-iscsi-direct
%define arg_storage_iscsi_direct -Dstorage_iscsi_direct=enabled
%else
%define arg_storage_iscsi_direct --without-storage-iscsi-direct
%define arg_storage_iscsi_direct -Dstorage_iscsi_direct=disabled
%endif
%if %{with_numactl}
%define arg_numactl --with-numactl
%define arg_numactl -Dnumactl=enabled
%else
%define arg_numactl --without-numactl
%define arg_numactl -Dnumactl=disabled
%endif
%if %{with_numad}
%define arg_numad --with-numad
%define arg_numad -Dnumad=enabled
%else
%define arg_numad --without-numad
%define arg_numad -Dnumad=disabled
%endif
%if %{with_apparmor}
%define arg_apparmor --with-apparmor
%define arg_apparmor_profiles --with-apparmor-profiles
%define arg_apparmor -Dapparmor=enabled
%define arg_apparmor_profiles -Dapparmor_profiles=true
%else
%define arg_apparmor --without-apparmor
%define arg_apparmor -Dapparmor=disabled
%define arg_apparmor_profiles -Dapparmor_profiles=false
%endif
%if %{with_sanlock}
%define arg_sanlock --with-sanlock
%define arg_sanlock -Dsanlock=enabled
%else
%define arg_sanlock --without-sanlock
%define arg_sanlock -Dsanlock=disabled
%endif
%if %{with_firewalld}
%define arg_firewalld --with-firewalld
%define arg_firewalld -Dfirewalld=enabled
%else
%define arg_firewalld --without-firewalld
%define arg_firewalld -Dfirewalld=disabled
%endif
%if %{with_firewalld_zone}
%define arg_firewalld_zone --with-firewalld-zone
%define arg_firewalld_zone -Dfirewalld_zone=enabled
%else
%define arg_firewalld_zone --without-firewalld-zone
%define arg_firewalld_zone -Dfirewalld_zone=disabled
%endif
%if %{with_wireshark}
%define arg_wireshark --with-wireshark-dissector
%define arg_wireshark -Dwireshark_dissector=enabled
%else
%define arg_wireshark --without-wireshark-dissector
%define arg_wireshark -Dwireshark_dissector=disabled
%endif
%define arg_selinux_mount --with-selinux-mount="/selinux"
%define arg_selinux_mount -Dselinux_mount="/selinux"
# UEFI firmwares
# For SLE15 SP2 (Leap 15.2) and newer, use firmware descriptor files from the
@ -1030,89 +992,75 @@ libvirt plugin for NSS for translating domain names into IP addresses.
LOADERS="$LOADERS:/usr/share/qemu/ovmf-x86_64-ms-code.bin:/usr/share/qemu/ovmf-x86_64-ms-vars.bin"
# aarch64 UEFI firmwares
LOADERS="$LOADERS:/usr/share/qemu/aavmf-aarch64-code.bin:/usr/share/qemu/aavmf-aarch64-vars.bin"
%define arg_loader_nvram --with-loader-nvram="$LOADERS"
%define arg_loader_nvram -Dloader-nvram="$LOADERS"
%endif
autoreconf -f -i
%define _configure ../configure
mkdir %{_vpath_builddir}
cd %{_vpath_builddir}
export CFLAGS="%{optflags}"
export PYTHON=%{_bindir}/python3
%configure --disable-static \
--enable-dependency-tracking \
--with-runstatedir=%{_rundir} \
%meson \
--libexecdir=%{_libdir}/%{name} \
-Drunstatedir=%{_rundir} \
%{?arg_qemu} \
%{?arg_openvz} \
%{?arg_lxc} \
%{?arg_vbox} \
%{?arg_libxl} \
--with-sasl \
--with-polkit \
--with-libvirtd \
-Dsasl=enabled \
-Dpolkit=enabled \
-Ddriver_libvirtd=enabled \
%{?arg_esx} \
%{?arg_hyperv} \
%{?arg_openwsman} \
%{?arg_vmware} \
--without-vz \
--without-bhyve \
--with-remote-default-mode=legacy \
--with-interface \
--with-network \
--with-storage-fs \
--with-storage-lvm \
--with-storage-iscsi \
--with-storage-scsi \
--with-storage-disk \
--with-storage-mpath \
-Ddriver_vz=disabled \
-Ddriver_bhyve=disabled \
-Dremote_default_mode=legacy \
-Ddriver_interface=enabled \
-Ddriver_network=enabled \
-Dstorage_fs=enabled \
-Dstorage_lvm=enabled \
-Dstorage_iscsi=enabled \
-Dstorage_scsi=enabled \
-Dstorage_disk=enabled \
-Dstorage_mpath=enabled \
%{?arg_storage_rbd} \
%{?arg_storage_sheepdog} \
%{?arg_storage_gluster} \
%{?arg_storage_iscsi_direct} \
--without-storage-zfs \
--without-storage-vstorage \
-Dstorage_zfs=disabled \
-Dstorage_vstorage=disabled \
%{?arg_numactl} \
%{?arg_numad} \
--with-capng \
--with-fuse \
--without-netcf \
--with-netcontrol \
--with-selinux \
-Dcapng=enabled \
-Dfuse=enabled \
-Dnetcf=disabled \
-Dnetcontrol=enabled \
-Dselinux=enabled \
%{?arg_selinux_mount} \
%{?arg_apparmor} \
%{?arg_apparmor_profiles} \
--with-udev \
--with-yajl \
-Dhal=disabled \
-Dudev=enabled \
-Dyajl=enabled \
%{?arg_sanlock} \
--with-libpcap \
--with-macvtap \
--with-audit \
--with-dtrace \
--with-driver-modules \
-Dlibpcap=enabled \
-Dmacvtap=enabled \
-Daudit=enabled \
-Ddtrace=enabled \
%{?arg_firewalld} \
%{?arg_firewalld_zone} \
%{?arg_wireshark} \
--with-nss-plugin \
--libexecdir=%{_libdir}/%{name} \
--with-qemu-user=%{qemu_user} \
--with-qemu-group=%{qemu_group} \
-Dnss=enabled \
-Dqemu_user=%{qemu_user} \
-Dqemu_group=%{qemu_group} \
%{?arg_loader_nvram} \
--without-login-shell \
--with-init-script=systemd \
ac_cv_path_MODPROBE=/sbin/modprobe \
ac_cv_path_UDEVADM=/sbin/udevadm \
ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \
ac_cv_path_PARTED=/usr/sbin/parted \
ac_cv_path_QEMU_BRIDGE_HELPER=/usr/lib/qemu-bridge-helper
%make_build HTML_DIR=%{_docdir}/%{name}
-Dlogin_shell=disabled \
-Dinit_script=systemd \
%{nil}
%meson_build
%install
cd %{_vpath_builddir}
%make_install SYSTEMD_UNIT_DIR=%{_unitdir} HTML_DIR=%{_docdir}/%{name}
cp ../examples/sh/virt-lxc-convert %{buildroot}/%{_bindir}
%meson_install
rm -f %{buildroot}/%{_libdir}/*.la
%if %{with_wireshark}
rm -f %{buildroot}/%{wireshark_plugindir}/libvirt.la
%endif
rm -f %{buildroot}/%{_libdir}/*.a
rm -f %{buildroot}/%{_libdir}/%{name}/lock-driver/*.la
rm -f %{buildroot}/%{_libdir}/%{name}/lock-driver/*.a
@ -1122,6 +1070,9 @@ rm -f %{buildroot}/%{_libdir}/%{name}/storage-backend/*.la
rm -f %{buildroot}/%{_libdir}/%{name}/storage-backend/*.a
rm -f %{buildroot}/%{_libdir}/%{name}/storage-file/*.la
rm -f %{buildroot}/%{_libdir}/%{name}/storage-file/*.a
%if %{with_wireshark}
rm -f %{buildroot}/%{wireshark_plugindir}/libvirt.la
%endif
# remove currently unsupported locale(s)
for dir in %{buildroot}/usr/share/locale/*
do
@ -1235,23 +1186,7 @@ mv %{buildroot}/%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
%fdupes -s %{buildroot}
%check
cd tests
SKIP_TESTS=""
# virportallocatortest fails on aarch64 due to unsupported IPV6_V6ONLY flag
%ifarch aarch64
SKIP_TESTS="$SKIP_TESTS virportallocatortest"
%endif
for i in $SKIP_TESTS
do
rm -f $i
printf 'int main(void) { return 0; }' > $i.c
done
cd ../%{_vpath_builddir}
if ! %make_build check VIR_TEST_DEBUG=1
then
cat tests/test-suite.log || true
exit 1
fi
VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check
%pre daemon
%{_bindir}/getent group libvirt >/dev/null || %{_sbindir}/groupadd -r libvirt
@ -1777,11 +1712,8 @@ fi
%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
%dir %{_libdir}/%{name}/connection-driver
%{_libdir}/%{name}/connection-driver/libvirt_driver_lxc.so
%attr(0755, root, root) %{_bindir}/virt-lxc-convert
%if ! 0%{?is_opensuse}
%{_bindir}/virt-create-rootfs
%doc %{_mandir}/man1/virt-create-rootfs.1*
%endif
%endif
%if %{with_libxl}
@ -1862,7 +1794,7 @@ fi
%{_unitdir}/libvirt-guests.service
%{_sbindir}/rclibvirt-guests
%files libs -f %{_vpath_builddir}/%{name}.lang
%files libs -f %{name}.lang
%config(noreplace) %{_sysconfdir}/%{name}/libvirt.conf
%config(noreplace) %{_sysconfdir}/%{name}/libvirt-admin.conf
%{_libdir}/libvirt.so.*
@ -1928,10 +1860,8 @@ fi
%{_datadir}/%{name}/api/libvirt-lxc-api.xml
%files doc
%doc AUTHORS NEWS.rst README README.rst
%doc AUTHORS NEWS.rst README.rst
%license COPYING COPYING.LESSER
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/*
%dir %{_datadir}/doc/%{name}
%doc %{_datadir}/doc/%{name}/*

View File

@ -8,10 +8,10 @@ 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-6.6.0/src/libxl/libxl_driver.c
Index: libvirt-6.7.0/src/libxl/libxl_driver.c
===================================================================
--- libvirt-6.6.0.orig/src/libxl/libxl_driver.c
+++ libvirt-6.6.0/src/libxl/libxl_driver.c
--- libvirt-6.7.0.orig/src/libxl/libxl_driver.c
+++ libvirt-6.7.0/src/libxl/libxl_driver.c
@@ -1371,6 +1371,61 @@ libxlDomainReboot(virDomainPtr dom, unsi
}
@ -74,7 +74,7 @@ Index: libvirt-6.6.0/src/libxl/libxl_driver.c
libxlDomainDestroyFlags(virDomainPtr dom,
unsigned int flags)
{
@@ -6667,6 +6722,7 @@ static virHypervisorDriver libxlHypervis
@@ -6672,6 +6727,7 @@ static virHypervisorDriver libxlHypervis
.domainShutdown = libxlDomainShutdown, /* 0.9.0 */
.domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */
.domainReboot = libxlDomainReboot, /* 0.9.0 */

View File

@ -3,11 +3,11 @@ https://bugzilla.novell.com/show_bug.cgi?id=879425
src/libxl/libxl_conf.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
Index: libvirt-6.6.0/src/libxl/libxl_conf.c
Index: libvirt-6.7.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-6.6.0.orig/src/libxl/libxl_conf.c
+++ libvirt-6.6.0/src/libxl/libxl_conf.c
@@ -905,6 +905,30 @@ libxlDiskSetDiscard(libxl_device_disk *x
--- libvirt-6.7.0.orig/src/libxl/libxl_conf.c
+++ libvirt-6.7.0/src/libxl/libxl_conf.c
@@ -912,6 +912,30 @@ libxlDiskSetDiscard(libxl_device_disk *x
#endif
}
@ -38,7 +38,7 @@ Index: libvirt-6.6.0/src/libxl/libxl_conf.c
static char *
libxlMakeNetworkDiskSrcStr(virStorageSourcePtr src,
const char *username,
@@ -1142,6 +1166,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
@@ -1149,6 +1173,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;

View File

@ -16,10 +16,10 @@ Signed-off-by: Jim Fehlig <jfehlig@suse.com>
tools/virsh.pod | 8 ++++++++
6 files changed, 125 insertions(+), 6 deletions(-)
Index: libvirt-6.6.0/include/libvirt/libvirt-domain.h
Index: libvirt-6.7.0/include/libvirt/libvirt-domain.h
===================================================================
--- libvirt-6.6.0.orig/include/libvirt/libvirt-domain.h
+++ libvirt-6.6.0/include/libvirt/libvirt-domain.h
--- libvirt-6.7.0.orig/include/libvirt/libvirt-domain.h
+++ libvirt-6.7.0/include/libvirt/libvirt-domain.h
@@ -1065,6 +1065,31 @@ typedef enum {
*/
# define VIR_MIGRATE_PARAM_TLS_DESTINATION "tls.destination"
@ -52,11 +52,11 @@ Index: libvirt-6.6.0/include/libvirt/libvirt-domain.h
/* Domain migration. */
virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn,
unsigned long flags, const char *dname,
Index: libvirt-6.6.0/src/libxl/libxl_driver.c
Index: libvirt-6.7.0/src/libxl/libxl_driver.c
===================================================================
--- libvirt-6.6.0.orig/src/libxl/libxl_driver.c
+++ libvirt-6.6.0/src/libxl/libxl_driver.c
@@ -6232,6 +6232,9 @@ libxlDomainMigratePerform3Params(virDoma
--- libvirt-6.7.0.orig/src/libxl/libxl_driver.c
+++ libvirt-6.7.0/src/libxl/libxl_driver.c
@@ -6237,6 +6237,9 @@ libxlDomainMigratePerform3Params(virDoma
const char *dname = NULL;
const char *uri = NULL;
int ret = -1;
@ -66,7 +66,7 @@ Index: libvirt-6.6.0/src/libxl/libxl_driver.c
#ifdef LIBXL_HAVE_NO_SUSPEND_RESUME
virReportUnsupportedError();
@@ -6248,6 +6251,18 @@ libxlDomainMigratePerform3Params(virDoma
@@ -6253,6 +6256,18 @@ libxlDomainMigratePerform3Params(virDoma
virTypedParamsGetString(params, nparams,
VIR_MIGRATE_PARAM_DEST_NAME,
&dname) < 0 ||
@ -85,7 +85,7 @@ Index: libvirt-6.6.0/src/libxl/libxl_driver.c
virTypedParamsGetString(params, nparams,
VIR_MIGRATE_PARAM_URI,
&uri) < 0)
@@ -6262,11 +6277,11 @@ libxlDomainMigratePerform3Params(virDoma
@@ -6267,11 +6282,11 @@ libxlDomainMigratePerform3Params(virDoma
if ((flags & (VIR_MIGRATE_TUNNELLED | VIR_MIGRATE_PEER2PEER))) {
if (libxlDomainMigrationSrcPerformP2P(driver, vm, dom->conn, dom_xml,
@ -99,10 +99,10 @@ Index: libvirt-6.6.0/src/libxl/libxl_driver.c
goto cleanup;
}
Index: libvirt-6.6.0/src/libxl/libxl_migration.c
Index: libvirt-6.7.0/src/libxl/libxl_migration.c
===================================================================
--- libvirt-6.6.0.orig/src/libxl/libxl_migration.c
+++ libvirt-6.6.0/src/libxl/libxl_migration.c
--- libvirt-6.7.0.orig/src/libxl/libxl_migration.c
+++ libvirt-6.7.0/src/libxl/libxl_migration.c
@@ -345,18 +345,39 @@ libxlMigrateDstReceive(virNetSocketPtr s
static int
libxlDoMigrateSrcSend(libxlDriverPrivatePtr driver,
@ -264,10 +264,10 @@ Index: libvirt-6.6.0/src/libxl/libxl_migration.c
virObjectLock(vm);
if (ret == 0) {
Index: libvirt-6.6.0/src/libxl/libxl_migration.h
Index: libvirt-6.7.0/src/libxl/libxl_migration.h
===================================================================
--- libvirt-6.6.0.orig/src/libxl/libxl_migration.h
+++ libvirt-6.6.0/src/libxl/libxl_migration.h
--- libvirt-6.7.0.orig/src/libxl/libxl_migration.h
+++ libvirt-6.7.0/src/libxl/libxl_migration.h
@@ -35,6 +35,10 @@
VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \
VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \
@ -312,11 +312,11 @@ Index: libvirt-6.6.0/src/libxl/libxl_migration.h
virDomainPtr
libxlDomainMigrationDstFinish(virConnectPtr dconn,
Index: libvirt-6.6.0/tools/virsh-domain.c
Index: libvirt-6.7.0/tools/virsh-domain.c
===================================================================
--- libvirt-6.6.0.orig/tools/virsh-domain.c
+++ libvirt-6.6.0/tools/virsh-domain.c
@@ -10700,6 +10700,22 @@ static const vshCmdOptDef opts_migrate[]
--- libvirt-6.7.0.orig/tools/virsh-domain.c
+++ libvirt-6.7.0/tools/virsh-domain.c
@@ -10699,6 +10699,22 @@ static const vshCmdOptDef opts_migrate[]
.type = VSH_OT_STRING,
.help = N_("override the destination host name used for TLS verification")
},
@ -339,7 +339,7 @@ Index: libvirt-6.6.0/tools/virsh-domain.c
{.name = NULL}
};
@@ -10721,6 +10737,7 @@ doMigrate(void *opaque)
@@ -10720,6 +10736,7 @@ doMigrate(void *opaque)
unsigned long long ullOpt = 0;
int rv;
virConnectPtr dconn = data->dconn;
@ -347,7 +347,7 @@ Index: libvirt-6.6.0/tools/virsh-domain.c
#ifndef WIN32
sigset_t sigmask, oldsigmask;
@@ -10843,6 +10860,27 @@ doMigrate(void *opaque)
@@ -10842,6 +10859,27 @@ doMigrate(void *opaque)
goto save_error;
}
@ -375,11 +375,11 @@ Index: libvirt-6.6.0/tools/virsh-domain.c
if (vshCommandOptStringReq(ctl, cmd, "xml", &opt) < 0)
goto out;
if (opt) {
Index: libvirt-6.6.0/docs/manpages/virsh.rst
Index: libvirt-6.7.0/docs/manpages/virsh.rst
===================================================================
--- libvirt-6.6.0.orig/docs/manpages/virsh.rst
+++ libvirt-6.6.0/docs/manpages/virsh.rst
@@ -3102,6 +3102,8 @@ migrate
--- libvirt-6.7.0.orig/docs/manpages/virsh.rst
+++ libvirt-6.7.0/docs/manpages/virsh.rst
@@ -3113,6 +3113,8 @@ migrate
[--postcopy-bandwidth bandwidth]
[--parallel [--parallel-connections connections]]
[--bandwidth bandwidth] [--tls-destination hostname]
@ -388,7 +388,7 @@ Index: libvirt-6.6.0/docs/manpages/virsh.rst
Migrate domain to another host. Add *--live* for live migration; <--p2p>
for peer-2-peer migration; *--direct* for direct migration; or *--tunnelled*
@@ -3207,6 +3209,14 @@ parallel connections. The number of such
@@ -3218,6 +3220,14 @@ parallel connections. The number of such
network link between the source and the target and thus speeding up the
migration.

View File

@ -7,11 +7,11 @@ and npiv.
For more details, see bsc#954872 and FATE#319810
Index: libvirt-6.6.0/src/libxl/libxl_conf.c
Index: libvirt-6.7.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-6.6.0.orig/src/libxl/libxl_conf.c
+++ libvirt-6.6.0/src/libxl/libxl_conf.c
@@ -905,6 +905,22 @@ libxlDiskSetDiscard(libxl_device_disk *x
--- libvirt-6.7.0.orig/src/libxl/libxl_conf.c
+++ libvirt-6.7.0/src/libxl/libxl_conf.c
@@ -912,6 +912,22 @@ libxlDiskSetDiscard(libxl_device_disk *x
#endif
}
@ -34,7 +34,7 @@ Index: libvirt-6.6.0/src/libxl/libxl_conf.c
static void
libxlDiskSetCacheMode(libxl_device_disk *x_disk, int cachemode)
{
@@ -1041,6 +1057,7 @@ libxlMakeNetworkDiskSrc(virStorageSource
@@ -1048,6 +1064,7 @@ libxlMakeNetworkDiskSrc(virStorageSource
int
libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
{
@ -42,7 +42,7 @@ Index: libvirt-6.6.0/src/libxl/libxl_conf.c
const char *driver = virDomainDiskGetDriver(l_disk);
int format = virDomainDiskGetFormat(l_disk);
int actual_type = virStorageSourceGetActualType(l_disk->src);
@@ -1056,7 +1073,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
@@ -1063,7 +1080,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
if (libxlMakeNetworkDiskSrc(l_disk->src, &x_disk->pdev_path) < 0)
return -1;
} else {
@ -51,7 +51,7 @@ Index: libvirt-6.6.0/src/libxl/libxl_conf.c
}
x_disk->vdev = g_strdup(l_disk->dst);
@@ -1167,6 +1184,9 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
@@ -1174,6 +1191,9 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
if (libxlDiskSetDiscard(x_disk, l_disk->discard) < 0)
return -1;
libxlDiskSetCacheMode(x_disk, l_disk->cachemode);

View File

@ -13,11 +13,11 @@ device with the same name that is being created.
src/lxc/lxc_process.c | 1 +
3 files changed, 4 insertions(+)
Index: libvirt-6.6.0/src/lxc/lxc_controller.c
Index: libvirt-6.7.0/src/lxc/lxc_controller.c
===================================================================
--- libvirt-6.6.0.orig/src/lxc/lxc_controller.c
+++ libvirt-6.6.0/src/lxc/lxc_controller.c
@@ -2024,6 +2024,7 @@ static int virLXCControllerDeleteInterfa
--- libvirt-6.7.0.orig/src/lxc/lxc_controller.c
+++ libvirt-6.7.0/src/lxc/lxc_controller.c
@@ -2026,6 +2026,7 @@ static int virLXCControllerDeleteInterfa
if (virNetDevVethDelete(ctrl->veths[i]) < 0)
ret = -1;
}
@ -25,10 +25,10 @@ Index: libvirt-6.6.0/src/lxc/lxc_controller.c
return ret;
}
Index: libvirt-6.6.0/src/lxc/lxc_driver.c
Index: libvirt-6.7.0/src/lxc/lxc_driver.c
===================================================================
--- libvirt-6.6.0.orig/src/lxc/lxc_driver.c
+++ libvirt-6.6.0/src/lxc/lxc_driver.c
--- libvirt-6.7.0.orig/src/lxc/lxc_driver.c
+++ libvirt-6.7.0/src/lxc/lxc_driver.c
@@ -66,6 +66,7 @@
#include "virtime.h"
#include "virtypedparam.h"
@ -37,7 +37,7 @@ Index: libvirt-6.6.0/src/lxc/lxc_driver.c
#include "virstring.h"
#include "viraccessapicheck.h"
#include "viraccessapichecklxc.h"
@@ -3544,6 +3545,7 @@ lxcDomainAttachDeviceNetLive(virLXCDrive
@@ -3546,6 +3547,7 @@ lxcDomainAttachDeviceNetLive(virLXCDrive
case VIR_DOMAIN_NET_TYPE_NETWORK:
case VIR_DOMAIN_NET_TYPE_ETHERNET:
ignore_value(virNetDevVethDelete(veth));
@ -45,7 +45,7 @@ Index: libvirt-6.6.0/src/lxc/lxc_driver.c
break;
case VIR_DOMAIN_NET_TYPE_DIRECT:
@@ -3982,6 +3984,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb
@@ -3984,6 +3986,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb
virDomainAuditNet(vm, detach, NULL, "detach", false);
goto cleanup;
}
@ -53,10 +53,10 @@ Index: libvirt-6.6.0/src/lxc/lxc_driver.c
break;
/* It'd be nice to support this, but with macvlan
Index: libvirt-6.6.0/src/lxc/lxc_process.c
Index: libvirt-6.7.0/src/lxc/lxc_process.c
===================================================================
--- libvirt-6.6.0.orig/src/lxc/lxc_process.c
+++ libvirt-6.6.0/src/lxc/lxc_process.c
--- libvirt-6.7.0.orig/src/lxc/lxc_process.c
+++ libvirt-6.7.0/src/lxc/lxc_process.c
@@ -50,6 +50,7 @@
#include "virstring.h"
#include "virprocess.h"

View File

@ -17,10 +17,10 @@ Signed-off-by: Martin Wilck <mwilck@suse.com>
tests/networkxml2confdata/dhcp6host-routed-network.conf | 1 -
2 files changed, 8 insertions(+), 2 deletions(-)
Index: libvirt-6.6.0/src/network/bridge_driver.c
Index: libvirt-6.7.0/src/network/bridge_driver.c
===================================================================
--- libvirt-6.6.0.orig/src/network/bridge_driver.c
+++ libvirt-6.6.0/src/network/bridge_driver.c
--- libvirt-6.7.0.orig/src/network/bridge_driver.c
+++ libvirt-6.7.0/src/network/bridge_driver.c
@@ -1448,7 +1448,14 @@ networkDnsmasqConfContents(virNetworkObj
if (VIR_SOCKET_ADDR_IS_FAMILY(&ipdef->address, AF_INET)) {
if (ipdef->nranges || ipdef->nhosts) {
@ -37,10 +37,10 @@ Index: libvirt-6.6.0/src/network/bridge_driver.c
}
if (ipdef->tftproot) {
Index: libvirt-6.6.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
Index: libvirt-6.7.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
===================================================================
--- libvirt-6.6.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf
+++ libvirt-6.6.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
--- libvirt-6.7.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf
+++ libvirt-6.7.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
@@ -10,7 +10,6 @@ bind-dynamic
interface=virbr1
dhcp-range=192.168.122.1,static

View File

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

View File

@ -1,8 +1,8 @@
Index: libvirt-6.6.0/src/security/apparmor/libvirt-qemu
Index: libvirt-6.7.0/src/security/apparmor/libvirt-qemu
===================================================================
--- libvirt-6.6.0.orig/src/security/apparmor/libvirt-qemu
+++ libvirt-6.6.0/src/security/apparmor/libvirt-qemu
@@ -233,3 +233,6 @@
--- libvirt-6.7.0.orig/src/security/apparmor/libvirt-qemu
+++ libvirt-6.7.0/src/security/apparmor/libvirt-qemu
@@ -243,3 +243,6 @@
# /sys/bus/nd/devices
/ r, # harmless on any lsb compliant system
/sys/bus/nd/devices/{,**/} r,

View File

@ -1,66 +0,0 @@
>From 5aeda96eafd230af55343e7ef835e081ded484aa Mon Sep 17 00:00:00 2001
From: Chunyan Liu <cyliu@suse.com>
Date: Fri, 25 Jan 2013 17:37:14 +0800
Subject: [PATCH] support managed pci devices in xen driver
---
src/xenxs/xen_sxpr.c | 22 ++++++++--------------
src/xenxs/xen_xm.c | 28 +++++++++++++++++++++++++++-
2 files changed, 35 insertions(+), 15 deletions(-)
Index: libvirt-6.6.0/src/libxl/xen_common.c
===================================================================
--- libvirt-6.6.0.orig/src/libxl/xen_common.c
+++ libvirt-6.6.0/src/libxl/xen_common.c
@@ -381,12 +381,19 @@ xenParsePCI(char *entry)
int busID;
int slotID;
int funcID;
+ char *opt;
+ int managed = 0;
domain[0] = bus[0] = slot[0] = func[0] = '\0';
/* pci=['0000:00:1b.0','0000:00:13.0'] */
if (!(key = entry))
return NULL;
+
+ opt = strchr(key, ',');
+ if (opt)
+ opt++;
+
if (!(nextkey = strchr(key, ':')))
return NULL;
if (virStrncpy(domain, key, (nextkey - key), sizeof(domain)) < 0) {
@@ -431,10 +438,30 @@ xenParsePCI(char *entry)
if (virStrToLong_i(func, NULL, 16, &funcID) < 0)
return NULL;
+ if (opt) {
+ char opt_managed[2];
+ char *data;
+
+ opt_managed[0] = '\0';
+ data = strchr(opt, '=');
+ data++;
+
+ if (STRPREFIX(opt, "managed=")) {
+ if (virStrncpy(opt_managed, data, 1, sizeof(opt_managed)) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("managed option %s too big for destination"),
+ data);
+ return NULL;
+ }
+ }
+ if (virStrToLong_i(opt_managed, NULL, 10, &managed) < 0)
+ return NULL;
+ }
+
if (!(hostdev = virDomainHostdevDefNew()))
return NULL;
- hostdev->managed = false;
+ hostdev->managed = managed ? true : false;
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;

View File

@ -8,11 +8,11 @@ It was also noticed that the per-domain profiles need a libnl rule
to squelch a denial when starting confined domains.
Found while investigating bsc#1058847
Index: libvirt-6.6.0/src/security/apparmor/libvirt-qemu
Index: libvirt-6.7.0/src/security/apparmor/libvirt-qemu
===================================================================
--- libvirt-6.6.0.orig/src/security/apparmor/libvirt-qemu
+++ libvirt-6.6.0/src/security/apparmor/libvirt-qemu
@@ -61,6 +61,7 @@
--- libvirt-6.7.0.orig/src/security/apparmor/libvirt-qemu
+++ libvirt-6.7.0/src/security/apparmor/libvirt-qemu
@@ -64,6 +64,7 @@
#/dev/fb* rw,
/etc/pulse/client.conf r,
@ -20,10 +20,10 @@ Index: libvirt-6.6.0/src/security/apparmor/libvirt-qemu
@{HOME}/.pulse-cookie rwk,
owner /root/.pulse-cookie rwk,
owner /root/.pulse/ rw,
Index: libvirt-6.6.0/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
Index: libvirt-6.7.0/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
===================================================================
--- libvirt-6.6.0.orig/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
+++ libvirt-6.6.0/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
--- libvirt-6.7.0.orig/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
+++ libvirt-6.7.0/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
@@ -19,7 +19,7 @@ profile virt-aa-helper @libexecdir@/virt
# Used when internally running another command (namely apparmor_parser)
@{PROC}/@{pid}/fd/ r,

View File

@ -9,29 +9,11 @@ need backporting to anything older. The dependency on xen.git commit
c3999835df makes it hard to upstream this patch.
See bsc#1157490 and bsc#1167007 for more details
Index: libvirt-6.6.0/m4/virt-driver-libxl.m4
Index: libvirt-6.7.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-6.6.0.orig/m4/virt-driver-libxl.m4
+++ libvirt-6.6.0/m4/virt-driver-libxl.m4
@@ -26,11 +26,11 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_LIBXL], [
LIBXL_CFLAGS=""
LIBXL_FIRMWARE_DIR=""
LIBXL_EXECBIN_DIR=""
- LIBXL_API_VERSION="-DLIBXL_API_VERSION=0x040500"
+ LIBXL_API_VERSION="-DLIBXL_API_VERSION=0x040800"
dnl search for libxl, aka libxenlight
old_with_libxl="$with_libxl"
- LIBVIRT_CHECK_PKG([LIBXL], [xenlight], [4.6.0])
+ LIBVIRT_CHECK_PKG([LIBXL], [xenlight], [4.9.0])
if test "x$with_libxl" = "xyes" ; then
LIBXL_FIRMWARE_DIR=$($PKG_CONFIG --variable xenfirmwaredir xenlight)
LIBXL_EXECBIN_DIR=$($PKG_CONFIG --variable libexec_bin xenlight)
Index: libvirt-6.6.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-6.6.0.orig/src/libxl/libxl_conf.c
+++ libvirt-6.6.0/src/libxl/libxl_conf.c
@@ -1818,7 +1818,7 @@ libxlDriverConfigNew(void)
--- libvirt-6.7.0.orig/src/libxl/libxl_conf.c
+++ libvirt-6.7.0/src/libxl/libxl_conf.c
@@ -1825,7 +1825,7 @@ libxlDriverConfigNew(void)
int
libxlDriverConfigInit(libxlDriverConfigPtr cfg)
{
@ -40,10 +22,10 @@ Index: libvirt-6.6.0/src/libxl/libxl_conf.c
if (virFileMakePath(cfg->logDir) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
Index: libvirt-6.6.0/src/libxl/libxl_domain.c
Index: libvirt-6.7.0/src/libxl/libxl_domain.c
===================================================================
--- libvirt-6.6.0.orig/src/libxl/libxl_domain.c
+++ libvirt-6.6.0/src/libxl/libxl_domain.c
--- libvirt-6.7.0.orig/src/libxl/libxl_domain.c
+++ libvirt-6.7.0/src/libxl/libxl_domain.c
@@ -1020,8 +1020,8 @@ libxlDomainSetVcpuAffinities(libxlDriver
static int
libxlDomainFreeMem(libxl_ctx *ctx, libxl_domain_config *d_config)
@ -64,10 +46,10 @@ Index: libvirt-6.6.0/src/libxl/libxl_domain.c
&aop_console_how);
libxl_domain_restore_params_dispose(&params);
}
Index: libvirt-6.6.0/tests/libxlmock.c
Index: libvirt-6.7.0/tests/libxlmock.c
===================================================================
--- libvirt-6.6.0.orig/tests/libxlmock.c
+++ libvirt-6.6.0/tests/libxlmock.c
--- libvirt-6.7.0.orig/tests/libxlmock.c
+++ libvirt-6.7.0/tests/libxlmock.c
@@ -67,7 +67,7 @@ VIR_MOCK_IMPL_RET_ARGS(libxl_get_version
VIR_MOCK_STUB_RET_ARGS(libxl_get_free_memory,
int, 0,
@ -77,3 +59,25 @@ Index: libvirt-6.6.0/tests/libxlmock.c
VIR_MOCK_STUB_RET_ARGS(xc_interface_close,
int, 0,
Index: libvirt-6.7.0/meson.build
===================================================================
--- libvirt-6.7.0.orig/meson.build
+++ libvirt-6.7.0/meson.build
@@ -1645,7 +1645,7 @@ elif get_option('driver_interface').enab
endif
if not get_option('driver_libxl').disabled() and conf.has('WITH_LIBVIRTD')
- libxl_version = '4.6.0'
+ libxl_version = '4.9.0'
libxl_dep = dependency('xenlight', version: '>=' + libxl_version, required: get_option('driver_libxl'))
if libxl_dep.found()
@@ -1675,7 +1675,7 @@ if not get_option('driver_libxl').disabl
endif
libxl_dep = declare_dependency(
- compile_args: '-DLIBXL_API_VERSION=0x040500',
+ compile_args: '-DLIBXL_API_VERSION=0x040800',
dependencies: [
libxl_dep,
xtl_link_dep,

View File

@ -1,9 +1,9 @@
Adjust libvirt-guests service to conform to SUSE standards
Index: libvirt-6.6.0/tools/libvirt-guests.sh.in
Index: libvirt-6.7.0/tools/libvirt-guests.sh.in
===================================================================
--- libvirt-6.6.0.orig/tools/libvirt-guests.sh.in
+++ libvirt-6.6.0/tools/libvirt-guests.sh.in
--- libvirt-6.7.0.orig/tools/libvirt-guests.sh.in
+++ libvirt-6.7.0/tools/libvirt-guests.sh.in
@@ -16,14 +16,13 @@
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
@ -74,7 +74,7 @@ Index: libvirt-6.6.0/tools/libvirt-guests.sh.in
# check if URI is reachable
test_connect()
@@ -108,7 +129,7 @@ list_guests() {
local list=$(run_virsh_c "$uri" list --uuid $persistent)
local list="$(run_virsh_c "$uri" list --uuid $persistent)"
if [ $? -ne 0 ]; then
- RETVAL=1
@ -84,7 +84,7 @@ Index: libvirt-6.6.0/tools/libvirt-guests.sh.in
@@ -134,7 +155,7 @@ guest_is_on() {
guest_running=false
guest_running="false"
if [ $? -ne 0 ]; then
- RETVAL=1
+ rc_failed 1
@ -104,7 +104,7 @@ Index: libvirt-6.6.0/tools/libvirt-guests.sh.in
+
eval_gettext "Resuming guests on \$uri URI..."; echo
for guest in $list; do
local name=$(guest_name "$uri" "$guest")
local name="$(guest_name "$uri" "$guest")"
@@ -418,7 +446,7 @@ shutdown_guests_parallel()
timeout=$(($timeout - 1))
if [ $timeout -le 0 ]; then
@ -163,10 +163,10 @@ Index: libvirt-6.6.0/tools/libvirt-guests.sh.in
esac
-exit $RETVAL
+rc_exit
Index: libvirt-6.6.0/tools/libvirt-guests.sysconf
Index: libvirt-6.7.0/tools/libvirt-guests.sysconf
===================================================================
--- libvirt-6.6.0.orig/tools/libvirt-guests.sysconf
+++ libvirt-6.6.0/tools/libvirt-guests.sysconf
--- libvirt-6.7.0.orig/tools/libvirt-guests.sysconf
+++ libvirt-6.7.0/tools/libvirt-guests.sysconf
@@ -1,9 +1,14 @@
+## Path: System/Virtualization/libvirt-guests
# Customizations for the libvirt-guests.service systemd unit

View File

@ -3,10 +3,10 @@ Disable TLS by default
On SUSE distros, the default is for libvirtd to listen only on the
Unix Domain Socket. The libvirt client still provides remote access
via a SSH tunnel.
Index: libvirt-6.6.0/src/remote/remote_daemon_config.c
Index: libvirt-6.7.0/src/remote/remote_daemon_config.c
===================================================================
--- libvirt-6.6.0.orig/src/remote/remote_daemon_config.c
+++ libvirt-6.6.0/src/remote/remote_daemon_config.c
--- libvirt-6.7.0.orig/src/remote/remote_daemon_config.c
+++ libvirt-6.7.0/src/remote/remote_daemon_config.c
@@ -99,7 +99,7 @@ daemonConfigNew(bool privileged G_GNUC_U
#ifdef WITH_IP
@ -16,10 +16,10 @@ Index: libvirt-6.6.0/src/remote/remote_daemon_config.c
# else /* ! LIBVIRTD */
data->listen_tls = false; /* Always honoured, --listen doesn't exist. */
# endif /* ! LIBVIRTD */
Index: libvirt-6.6.0/src/remote/libvirtd.conf.in
Index: libvirt-6.7.0/src/remote/libvirtd.conf.in
===================================================================
--- libvirt-6.6.0.orig/src/remote/libvirtd.conf.in
+++ libvirt-6.6.0/src/remote/libvirtd.conf.in
--- libvirt-6.7.0.orig/src/remote/libvirtd.conf.in
+++ libvirt-6.7.0/src/remote/libvirtd.conf.in
@@ -17,8 +17,8 @@
# It is necessary to setup a CA and issue server certificates before
# using this capability.

View File

@ -1,9 +1,9 @@
Adjust libvirtd sysconfig file to conform to SUSE standards
Index: libvirt-6.6.0/src/remote/libvirtd.sysconf
Index: libvirt-6.7.0/src/remote/libvirtd.sysconf
===================================================================
--- libvirt-6.6.0.orig/src/remote/libvirtd.sysconf
+++ libvirt-6.6.0/src/remote/libvirtd.sysconf
--- libvirt-6.7.0.orig/src/remote/libvirtd.sysconf
+++ libvirt-6.7.0/src/remote/libvirtd.sysconf
@@ -1,5 +1,9 @@
+## Path: System/Virtualization/libvirt
# Customizations for the libvirtd.service systemd unit

View File

@ -6,10 +6,10 @@ autoballooning. This patch changes libvirt to also disable autoballooning
by default. It can only be enabled with the 'autoballoon' setting in
libxl.conf. See jsc#SLE-3059 for more details.
Index: libvirt-6.6.0/src/libxl/libxl.conf
Index: libvirt-6.7.0/src/libxl/libxl.conf
===================================================================
--- libvirt-6.6.0.orig/src/libxl/libxl.conf
+++ libvirt-6.6.0/src/libxl/libxl.conf
--- libvirt-6.7.0.orig/src/libxl/libxl.conf
+++ libvirt-6.7.0/src/libxl/libxl.conf
@@ -4,12 +4,11 @@
# Enable autoballooning of domain0
@ -27,11 +27,11 @@ Index: libvirt-6.6.0/src/libxl/libxl.conf
# In order to prevent accidentally starting two domains that
Index: libvirt-6.6.0/src/libxl/libxl_conf.c
Index: libvirt-6.7.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-6.6.0.orig/src/libxl/libxl_conf.c
+++ libvirt-6.6.0/src/libxl/libxl_conf.c
@@ -1732,15 +1732,12 @@ libxlMakeBuildInfoVfb(virPortAllocatorRa
--- libvirt-6.7.0.orig/src/libxl/libxl_conf.c
+++ libvirt-6.7.0/src/libxl/libxl_conf.c
@@ -1739,15 +1739,12 @@ libxlMakeBuildInfoVfb(virPortAllocatorRa
/*
* Get domain0 autoballoon configuration. Honor user-specified
* setting in libxl.conf first. If not specified, autoballooning
@ -48,7 +48,7 @@ Index: libvirt-6.6.0/src/libxl/libxl_conf.c
int res;
res = virConfGetValueBool(conf, "autoballoon", &cfg->autoballoon);
@@ -1749,15 +1746,8 @@ libxlGetAutoballoonConf(libxlDriverConfi
@@ -1756,15 +1753,8 @@ libxlGetAutoballoonConf(libxlDriverConfi
else if (res == 1)
return 0;

View File

@ -1,9 +1,9 @@
Adjust paths of OVMF firmwares on SUSE distros
Index: libvirt-6.6.0/src/qemu/qemu.conf
Index: libvirt-6.7.0/src/qemu/qemu.conf
===================================================================
--- libvirt-6.6.0.orig/src/qemu/qemu.conf
+++ libvirt-6.6.0/src/qemu/qemu.conf
--- libvirt-6.7.0.orig/src/qemu/qemu.conf
+++ libvirt-6.7.0/src/qemu/qemu.conf
@@ -844,10 +844,9 @@
# for x86_64 and i686, but it's AAVMF for aarch64. The libvirt default
# follows this scheme.
@ -18,11 +18,11 @@ Index: libvirt-6.6.0/src/qemu/qemu.conf
#]
# The backend to use for handling stdout/stderr output from
Index: libvirt-6.6.0/src/qemu/qemu_conf.c
Index: libvirt-6.7.0/src/qemu/qemu_conf.c
===================================================================
--- libvirt-6.6.0.orig/src/qemu/qemu_conf.c
+++ libvirt-6.6.0/src/qemu/qemu_conf.c
@@ -96,10 +96,9 @@ qemuDriverUnlock(virQEMUDriverPtr driver
--- libvirt-6.7.0.orig/src/qemu/qemu_conf.c
+++ libvirt-6.7.0/src/qemu/qemu_conf.c
@@ -97,10 +97,9 @@ qemuDriverUnlock(virQEMUDriverPtr driver
#ifndef DEFAULT_LOADER_NVRAM
# define DEFAULT_LOADER_NVRAM \
@ -36,10 +36,10 @@ Index: libvirt-6.6.0/src/qemu/qemu_conf.c
#endif
Index: libvirt-6.6.0/src/security/virt-aa-helper.c
Index: libvirt-6.7.0/src/security/virt-aa-helper.c
===================================================================
--- libvirt-6.6.0.orig/src/security/virt-aa-helper.c
+++ libvirt-6.6.0/src/security/virt-aa-helper.c
--- libvirt-6.7.0.orig/src/security/virt-aa-helper.c
+++ libvirt-6.7.0/src/security/virt-aa-helper.c
@@ -479,7 +479,8 @@ valid_path(const char *path, const bool
"/usr/share/ovmf/", /* for OVMF images */
"/usr/share/AAVMF/", /* for AAVMF images */

View File

@ -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-6.6.0/src/qemu/qemu.conf
Index: libvirt-6.7.0/src/qemu/qemu.conf
===================================================================
--- libvirt-6.6.0.orig/src/qemu/qemu.conf
+++ libvirt-6.6.0/src/qemu/qemu.conf
--- libvirt-6.7.0.orig/src/qemu/qemu.conf
+++ libvirt-6.7.0/src/qemu/qemu.conf
@@ -477,10 +477,19 @@
# isolation, but it cannot appear in a list of drivers.
#
@ -60,11 +60,11 @@ Index: libvirt-6.6.0/src/qemu/qemu.conf
#
#lock_manager = "lockd"
Index: libvirt-6.6.0/src/qemu/qemu_conf.c
Index: libvirt-6.7.0/src/qemu/qemu_conf.c
===================================================================
--- libvirt-6.6.0.orig/src/qemu/qemu_conf.c
+++ libvirt-6.6.0/src/qemu/qemu_conf.c
@@ -266,7 +266,7 @@ virQEMUDriverConfigPtr virQEMUDriverConf
--- libvirt-6.7.0.orig/src/qemu/qemu_conf.c
+++ libvirt-6.7.0/src/qemu/qemu_conf.c
@@ -267,7 +267,7 @@ virQEMUDriverConfigPtr virQEMUDriverConf
cfg->slirpHelperName = g_strdup(QEMU_SLIRP_HELPER);
cfg->dbusDaemonName = g_strdup(QEMU_DBUS_DAEMON);

View File

@ -1,9 +1,9 @@
Adjust virtlockd sysconfig file to conform to SUSE standards
Index: libvirt-6.6.0/src/locking/virtlockd.sysconf
Index: libvirt-6.7.0/src/locking/virtlockd.sysconf
===================================================================
--- libvirt-6.6.0.orig/src/locking/virtlockd.sysconf
+++ libvirt-6.6.0/src/locking/virtlockd.sysconf
--- libvirt-6.7.0.orig/src/locking/virtlockd.sysconf
+++ libvirt-6.7.0/src/locking/virtlockd.sysconf
@@ -1,3 +1,7 @@
+## Path: System/Virtualization/virtlockd
+

View File

@ -1,9 +1,9 @@
Adjust virtlogd sysconfig file to conform to SUSE standards
Index: libvirt-6.6.0/src/logging/virtlogd.sysconf
Index: libvirt-6.7.0/src/logging/virtlogd.sysconf
===================================================================
--- libvirt-6.6.0.orig/src/logging/virtlogd.sysconf
+++ libvirt-6.6.0/src/logging/virtlogd.sysconf
--- libvirt-6.7.0.orig/src/logging/virtlogd.sysconf
+++ libvirt-6.7.0/src/logging/virtlogd.sysconf
@@ -1,3 +1,7 @@
+## Path: System/Virtualization/virtlogd
+

View File

@ -5,11 +5,11 @@ upstream support for firmware autoselection in the xen driver. Sadly, the
upstream efforts to improve firmware handling in the qemu driver broke
the firmware handling in the xen driver.
Index: libvirt-6.6.0/src/libxl/libxl_conf.c
Index: libvirt-6.7.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-6.6.0.orig/src/libxl/libxl_conf.c
+++ libvirt-6.6.0/src/libxl/libxl_conf.c
@@ -1772,6 +1772,15 @@ libxlDriverConfigNew(void)
--- libvirt-6.7.0.orig/src/libxl/libxl_conf.c
+++ libvirt-6.7.0/src/libxl/libxl_conf.c
@@ -1779,6 +1779,15 @@ libxlDriverConfigNew(void)
cfg->autoDumpDir = g_strdup(LIBXL_DUMP_DIR);
cfg->channelDir = g_strdup(LIBXL_CHANNEL_DIR);

View File

@ -1,20 +1,7 @@
Index: libvirt-6.3.0/tools/Makefile.am
===================================================================
--- libvirt-6.3.0.orig/tools/Makefile.am
+++ libvirt-6.3.0/tools/Makefile.am
@@ -70,7 +70,7 @@ MAINTAINERCLEANFILES =
confdir = $(sysconfdir)/libvirt
conf_DATA =
-bin_SCRIPTS = virt-xml-validate virt-pki-validate
+bin_SCRIPTS = virt-xml-validate virt-pki-validate virt-create-rootfs
bin_PROGRAMS = virsh virt-admin
libexec_SCRIPTS = libvirt-guests.sh
Index: libvirt-6.3.0/tools/virt-create-rootfs
Index: libvirt-6.7.0/tools/virt-create-rootfs
===================================================================
--- /dev/null
+++ libvirt-6.3.0/tools/virt-create-rootfs
+++ libvirt-6.7.0/tools/virt-create-rootfs
@@ -0,0 +1,231 @@
+#!/bin/sh
+set -e
@ -247,22 +234,10 @@ Index: libvirt-6.3.0/tools/virt-create-rootfs
+ echo "pts/0" >> "$ROOT/etc/securetty"
+ chroot "$ROOT" /usr/bin/passwd
+fi
Index: libvirt-6.3.0/docs/Makefile.am
===================================================================
--- libvirt-6.3.0.orig/docs/Makefile.am
+++ libvirt-6.3.0/docs/Makefile.am
@@ -215,6 +215,7 @@ manpages1_rst = \
manpages/virt-xml-validate.rst \
manpages/virt-admin.rst \
manpages/virsh.rst \
+ manpages/virt-create-rootfs.rst \
$(NULL)
manpages7_rst = \
$(KEYCODES:%=manpages/virkeycode-%.rst) \
Index: libvirt-6.3.0/docs/manpages/virt-create-rootfs.rst
Index: libvirt-6.7.0/docs/manpages/virt-create-rootfs.rst
===================================================================
--- /dev/null
+++ libvirt-6.3.0/docs/manpages/virt-create-rootfs.rst
+++ libvirt-6.7.0/docs/manpages/virt-create-rootfs.rst
@@ -0,0 +1,88 @@
+==================
+virt-create-rootfs
@ -352,3 +327,28 @@ Index: libvirt-6.3.0/docs/manpages/virt-create-rootfs.rst
+========
+
+virsh(1), `https://libvirt.org/ <https://libvirt.org/>`_
Index: libvirt-6.7.0/docs/manpages/meson.build
===================================================================
--- libvirt-6.7.0.orig/docs/manpages/meson.build
+++ libvirt-6.7.0/docs/manpages/meson.build
@@ -15,6 +15,7 @@ docs_man_files = [
{ 'name': 'virt-pki-validate', 'section': '1', 'install': true },
{ 'name': 'virt-qemu-run', 'section': '1', 'install': conf.has('WITH_QEMU') },
{ 'name': 'virt-xml-validate', 'section': '1', 'install': true },
+ { 'name': 'virt-create-rootfs', 'section': '1', 'install': true },
{ 'name': 'libvirtd', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') },
{ 'name': 'virt-sanlock-cleanup', 'section': '8', 'install': conf.has('WITH_SANLOCK') },
Index: libvirt-6.7.0/tools/meson.build
===================================================================
--- libvirt-6.7.0.orig/tools/meson.build
+++ libvirt-6.7.0/tools/meson.build
@@ -149,6 +149,8 @@ else
virsh_icon_res = []
endif
+install_data('virt-create-rootfs', install_dir: bindir, install_mode: 'rwxr-xr-x',)
+
executable(
'virsh',
[