Accepting request 637737 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/637737 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=265
This commit is contained in:
commit
cdde2fc4a7
@ -18,10 +18,10 @@ them.
|
||||
create mode 100644 src/conf/domain_stats.c
|
||||
create mode 100644 src/conf/domain_stats.h
|
||||
|
||||
Index: libvirt-4.6.0/src/conf/domain_stats.c
|
||||
Index: libvirt-4.7.0/src/conf/domain_stats.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-4.6.0/src/conf/domain_stats.c
|
||||
+++ libvirt-4.7.0/src/conf/domain_stats.c
|
||||
@@ -0,0 +1,139 @@
|
||||
+/*
|
||||
+ * domain_stats.c: domain stats extraction helpers
|
||||
@ -162,10 +162,10 @@ Index: libvirt-4.6.0/src/conf/domain_stats.c
|
||||
+}
|
||||
+
|
||||
+#undef STATS_ADD_NET_PARAM
|
||||
Index: libvirt-4.6.0/src/conf/domain_stats.h
|
||||
Index: libvirt-4.7.0/src/conf/domain_stats.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-4.6.0/src/conf/domain_stats.h
|
||||
+++ libvirt-4.7.0/src/conf/domain_stats.h
|
||||
@@ -0,0 +1,64 @@
|
||||
+/*
|
||||
+ * domain_stats.h: domain stats extraction helpers
|
||||
@ -231,11 +231,11 @@ Index: libvirt-4.6.0/src/conf/domain_stats.h
|
||||
+ int *maxparams);
|
||||
+
|
||||
+#endif /* __DOMAIN_STATS_H */
|
||||
Index: libvirt-4.6.0/src/libvirt_private.syms
|
||||
Index: libvirt-4.7.0/src/libvirt_private.syms
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/libvirt_private.syms
|
||||
+++ libvirt-4.6.0/src/libvirt_private.syms
|
||||
@@ -647,6 +647,9 @@ virDomainConfNWFilterInstantiate;
|
||||
--- libvirt-4.7.0.orig/src/libvirt_private.syms
|
||||
+++ libvirt-4.7.0/src/libvirt_private.syms
|
||||
@@ -650,6 +650,9 @@ virDomainConfNWFilterInstantiate;
|
||||
virDomainConfNWFilterTeardown;
|
||||
virDomainConfVMNWFilterTeardown;
|
||||
|
||||
@ -245,18 +245,18 @@ Index: libvirt-4.6.0/src/libvirt_private.syms
|
||||
|
||||
# conf/interface_conf.h
|
||||
virInterfaceDefFormat;
|
||||
@@ -1537,6 +1540,7 @@ virCgroupGetMemoryUsage;
|
||||
@@ -1540,6 +1543,7 @@ virCgroupGetMemoryUsage;
|
||||
virCgroupGetMemSwapHardLimit;
|
||||
virCgroupGetMemSwapUsage;
|
||||
virCgroupGetPercpuStats;
|
||||
+virCgroupGetStatsCpu;
|
||||
virCgroupHasController;
|
||||
virCgroupHasEmptyTasks;
|
||||
virCgroupKill;
|
||||
Index: libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
virCgroupKillPainfully;
|
||||
Index: libvirt-4.7.0/src/qemu/qemu_driver.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/qemu/qemu_driver.c
|
||||
+++ libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
--- libvirt-4.7.0.orig/src/qemu/qemu_driver.c
|
||||
+++ libvirt-4.7.0/src/qemu/qemu_driver.c
|
||||
@@ -74,6 +74,7 @@
|
||||
#include "virarptable.h"
|
||||
#include "viruuid.h"
|
||||
@ -265,7 +265,7 @@ Index: libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
#include "domain_audit.h"
|
||||
#include "node_device_conf.h"
|
||||
#include "virpci.h"
|
||||
@@ -19597,21 +19598,7 @@ qemuDomainGetStatsState(virQEMUDriverPtr
|
||||
@@ -19641,21 +19642,7 @@ qemuDomainGetStatsState(virQEMUDriverPtr
|
||||
int *maxparams,
|
||||
unsigned int privflags ATTRIBUTE_UNUSED)
|
||||
{
|
||||
@ -288,7 +288,7 @@ Index: libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
}
|
||||
|
||||
|
||||
@@ -19634,37 +19621,7 @@ qemuDomainGetStatsCpu(virQEMUDriverPtr d
|
||||
@@ -19678,37 +19665,7 @@ qemuDomainGetStatsCpu(virQEMUDriverPtr d
|
||||
unsigned int privflags ATTRIBUTE_UNUSED)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = dom->privateData;
|
||||
@ -327,7 +327,7 @@ Index: libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -19844,44 +19801,6 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr
|
||||
@@ -19888,44 +19845,6 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -372,7 +372,7 @@ Index: libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
static int
|
||||
qemuDomainGetStatsInterface(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr dom,
|
||||
@@ -19889,68 +19808,9 @@ qemuDomainGetStatsInterface(virQEMUDrive
|
||||
@@ -19933,68 +19852,9 @@ qemuDomainGetStatsInterface(virQEMUDrive
|
||||
int *maxparams,
|
||||
unsigned int privflags ATTRIBUTE_UNUSED)
|
||||
{
|
||||
@ -442,20 +442,20 @@ Index: libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
#define QEMU_ADD_BLOCK_PARAM_UI(record, maxparams, num, name, value) \
|
||||
do { \
|
||||
char param_name[VIR_TYPED_PARAM_FIELD_LENGTH]; \
|
||||
@@ -20072,10 +19932,10 @@ qemuDomainGetStatsOneBlock(virQEMUDriver
|
||||
if (disk->info.alias)
|
||||
alias = qemuDomainStorageAlias(disk->info.alias, backing_idx);
|
||||
@@ -20227,10 +20087,10 @@ qemuDomainGetStatsBlockExportHeader(virD
|
||||
{
|
||||
int ret = -1;
|
||||
|
||||
- QEMU_ADD_NAME_PARAM(records, nrecords, "block", "name", recordnr, disk->dst);
|
||||
+ VIR_DOMAIN_STATS_ADD_NAME_PARAM(records, nrecords, "block", "name", recordnr, disk->dst);
|
||||
|
||||
- QEMU_ADD_NAME_PARAM(record, maxparams, "block", "name", block_idx,
|
||||
+ VIR_DOMAIN_STATS_ADD_NAME_PARAM(record, maxparams, "block", "name", block_idx,
|
||||
disk->dst);
|
||||
if (virStorageSourceIsLocalStorage(src) && src->path)
|
||||
- QEMU_ADD_NAME_PARAM(record, maxparams, "block", "path",
|
||||
+ VIR_DOMAIN_STATS_ADD_NAME_PARAM(record, maxparams, "block", "path",
|
||||
block_idx, src->path);
|
||||
if (backing_idx)
|
||||
QEMU_ADD_BLOCK_PARAM_UI(record, maxparams, block_idx, "backingIndex",
|
||||
@@ -20191,7 +20051,7 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr
|
||||
- QEMU_ADD_NAME_PARAM(records, nrecords, "block", "path", recordnr, src->path);
|
||||
+ VIR_DOMAIN_STATS_ADD_NAME_PARAM(records, nrecords, "block", "path", recordnr, src->path);
|
||||
if (src->id)
|
||||
QEMU_ADD_BLOCK_PARAM_UI(records, nrecords, recordnr, "backingIndex",
|
||||
src->id);
|
||||
@@ -20370,7 +20230,7 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr
|
||||
* after the iteration than it is to iterate twice; but we still
|
||||
* want count listed first. */
|
||||
count_index = record->nparams;
|
||||
@ -463,8 +463,8 @@ Index: libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
+ VIR_DOMAIN_STATS_ADD_COUNT_PARAM(record, maxparams, "block", 0);
|
||||
|
||||
for (i = 0; i < dom->def->ndisks; i++) {
|
||||
virDomainDiskDefPtr disk = dom->def->disks[i];
|
||||
@@ -20225,10 +20085,6 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr
|
||||
if (qemuDomainGetStatsBlockExportDisk(dom->def->disks[i], stats, nodestats,
|
||||
@@ -20395,10 +20255,6 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr
|
||||
|
||||
#undef QEMU_ADD_BLOCK_PARAM_ULL
|
||||
|
||||
@ -475,11 +475,11 @@ Index: libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
static int
|
||||
qemuDomainGetStatsPerfOneEvent(virPerfPtr perf,
|
||||
virPerfEventType type,
|
||||
Index: libvirt-4.6.0/src/util/vircgroup.c
|
||||
Index: libvirt-4.7.0/src/util/vircgroup.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/vircgroup.c
|
||||
+++ libvirt-4.6.0/src/util/vircgroup.c
|
||||
@@ -3956,6 +3956,44 @@ virCgroupControllerAvailable(int control
|
||||
--- libvirt-4.7.0.orig/src/util/vircgroup.c
|
||||
+++ libvirt-4.7.0/src/util/vircgroup.c
|
||||
@@ -4037,6 +4037,44 @@ virCgroupControllerAvailable(int control
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -524,7 +524,7 @@ Index: libvirt-4.6.0/src/util/vircgroup.c
|
||||
#else /* !VIR_CGROUP_SUPPORTED */
|
||||
|
||||
bool
|
||||
@@ -4733,6 +4771,14 @@ virCgroupControllerAvailable(int control
|
||||
@@ -4799,6 +4837,14 @@ virCgroupControllerAvailable(int control
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -539,11 +539,11 @@ Index: libvirt-4.6.0/src/util/vircgroup.c
|
||||
#endif /* !VIR_CGROUP_SUPPORTED */
|
||||
|
||||
|
||||
Index: libvirt-4.6.0/src/util/vircgroup.h
|
||||
Index: libvirt-4.7.0/src/util/vircgroup.h
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/vircgroup.h
|
||||
+++ libvirt-4.6.0/src/util/vircgroup.h
|
||||
@@ -297,4 +297,9 @@ int virCgroupSetOwner(virCgroupPtr cgrou
|
||||
--- libvirt-4.7.0.orig/src/util/vircgroup.h
|
||||
+++ libvirt-4.7.0/src/util/vircgroup.h
|
||||
@@ -286,4 +286,9 @@ int virCgroupSetOwner(virCgroupPtr cgrou
|
||||
int virCgroupHasEmptyTasks(virCgroupPtr cgroup, int controller);
|
||||
|
||||
bool virCgroupControllerAvailable(int controller);
|
||||
@ -553,10 +553,10 @@ Index: libvirt-4.6.0/src/util/vircgroup.h
|
||||
+ int *maxparams);
|
||||
+
|
||||
#endif /* __VIR_CGROUP_H__ */
|
||||
Index: libvirt-4.6.0/src/conf/Makefile.inc.am
|
||||
Index: libvirt-4.7.0/src/conf/Makefile.inc.am
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/conf/Makefile.inc.am
|
||||
+++ libvirt-4.6.0/src/conf/Makefile.inc.am
|
||||
--- libvirt-4.7.0.orig/src/conf/Makefile.inc.am
|
||||
+++ libvirt-4.7.0/src/conf/Makefile.inc.am
|
||||
@@ -20,6 +20,8 @@ DOMAIN_CONF_SOURCES = \
|
||||
conf/domain_audit.h \
|
||||
conf/domain_nwfilter.c \
|
||||
|
@ -19,10 +19,10 @@ reworking this patch and submitting it to upstream libvirt.
|
||||
src/libxl/libxl_driver.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 91 insertions(+)
|
||||
|
||||
Index: libvirt-4.6.0/src/libxl/libxl_driver.c
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-4.6.0/src/libxl/libxl_driver.c
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_driver.c
|
||||
@@ -5119,6 +5119,97 @@ libxlDomainMemoryStats(virDomainPtr dom,
|
||||
|
||||
#undef LIBXL_SET_MEMSTAT
|
||||
@ -121,7 +121,7 @@ Index: libvirt-4.6.0/src/libxl/libxl_driver.c
|
||||
static int
|
||||
libxlDomainGetJobInfo(virDomainPtr dom,
|
||||
virDomainJobInfoPtr info)
|
||||
@@ -6504,6 +6595,7 @@ static virHypervisorDriver libxlHypervis
|
||||
@@ -6497,6 +6588,7 @@ static virHypervisorDriver libxlHypervis
|
||||
#endif
|
||||
.nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */
|
||||
.nodeGetCellsFreeMemory = libxlNodeGetCellsFreeMemory, /* 1.1.1 */
|
||||
|
@ -9,10 +9,10 @@ them using the existing API.
|
||||
src/lxc/lxc_driver.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 138 insertions(+)
|
||||
|
||||
Index: libvirt-4.6.0/src/lxc/lxc_driver.c
|
||||
Index: libvirt-4.7.0/src/lxc/lxc_driver.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/lxc/lxc_driver.c
|
||||
+++ libvirt-4.6.0/src/lxc/lxc_driver.c
|
||||
--- libvirt-4.7.0.orig/src/lxc/lxc_driver.c
|
||||
+++ libvirt-4.7.0/src/lxc/lxc_driver.c
|
||||
@@ -79,6 +79,7 @@
|
||||
#include "viraccessapichecklxc.h"
|
||||
#include "virhostdev.h"
|
||||
|
239
0149464a-libxl-fix-job-handling-migdst.patch
Normal file
239
0149464a-libxl-fix-job-handling-migdst.patch
Normal file
@ -0,0 +1,239 @@
|
||||
commit 0149464afc7100f048a2468e40e84b6a50aeb3a3
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Wed Aug 29 11:11:00 2018 -0600
|
||||
|
||||
libxl: fix job handling across migration phases on dst
|
||||
|
||||
The libxlDomainMigrationDst* functions are a bit flawed in their
|
||||
handling of modify jobs. A job begins when the destination host
|
||||
begins receiving the incoming VM and ends after the VM is started.
|
||||
The finish phase contains another BeginJob/EndJob sequence.
|
||||
|
||||
This patch changes the logic to begin a job for the incoming VM
|
||||
in the prepare phase and end the job in the finish phase.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_driver.c
|
||||
@@ -6020,15 +6020,8 @@ libxlDomainMigrateFinish3Params(virConne
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0) {
|
||||
- virDomainObjEndAPI(&vm);
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
ret = libxlDomainMigrationDstFinish(dconn, vm, flags, cancelled);
|
||||
|
||||
- libxlDomainObjEndJob(driver, vm);
|
||||
-
|
||||
virDomainObjEndAPI(&vm);
|
||||
|
||||
return ret;
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_migration.c
|
||||
===================================================================
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_migration.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_migration.c
|
||||
@@ -266,9 +266,6 @@ libxlDoMigrateDstReceive(void *opaque)
|
||||
size_t i;
|
||||
|
||||
virObjectRef(vm);
|
||||
- virObjectLock(vm);
|
||||
- if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0)
|
||||
- goto cleanup;
|
||||
|
||||
/*
|
||||
* Always start the domain paused. If needed, unpause in the
|
||||
@@ -288,10 +285,6 @@ libxlDoMigrateDstReceive(void *opaque)
|
||||
args->nsocks = 0;
|
||||
VIR_FORCE_CLOSE(recvfd);
|
||||
virObjectUnref(args);
|
||||
-
|
||||
- libxlDomainObjEndJob(driver, vm);
|
||||
-
|
||||
- cleanup:
|
||||
virDomainObjEndAPI(&vm);
|
||||
}
|
||||
|
||||
@@ -583,6 +576,13 @@ libxlDomainMigrationDstPrepareTunnel3(vi
|
||||
goto error;
|
||||
*def = NULL;
|
||||
|
||||
+ /*
|
||||
+ * Unless an error is encountered in this function, the job will
|
||||
+ * be terminated in the finish phase.
|
||||
+ */
|
||||
+ if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0)
|
||||
+ goto error;
|
||||
+
|
||||
priv = vm->privateData;
|
||||
|
||||
if (taint_hook) {
|
||||
@@ -595,18 +595,18 @@ libxlDomainMigrationDstPrepareTunnel3(vi
|
||||
* stream -> pipe -> recvfd of libxlDomainStartRestore
|
||||
*/
|
||||
if (pipe(dataFD) < 0)
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
|
||||
/* Stream data will be written to pipeIn */
|
||||
if (virFDStreamOpen(st, dataFD[1]) < 0)
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
dataFD[1] = -1; /* 'st' owns the FD now & will close it */
|
||||
|
||||
if (libxlMigrationDstArgsInitialize() < 0)
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
|
||||
if (!(args = virObjectNew(libxlMigrationDstArgsClass)))
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
|
||||
args->conn = virObjectRef(dconn);
|
||||
args->vm = virObjectRef(vm);
|
||||
@@ -620,12 +620,15 @@ libxlDomainMigrationDstPrepareTunnel3(vi
|
||||
if (virThreadCreate(&thread, false, libxlDoMigrateDstReceive, args) < 0) {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
||||
_("Failed to create thread for receiving migration data"));
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
goto done;
|
||||
|
||||
+ endjob:
|
||||
+ libxlDomainObjEndJob(driver, vm);
|
||||
+
|
||||
error:
|
||||
libxlMigrationCookieFree(mig);
|
||||
VIR_FORCE_CLOSE(dataFD[1]);
|
||||
@@ -679,6 +682,13 @@ libxlDomainMigrationDstPrepare(virConnec
|
||||
goto error;
|
||||
*def = NULL;
|
||||
|
||||
+ /*
|
||||
+ * Unless an error is encountered in this function, the job will
|
||||
+ * be terminated in the finish phase.
|
||||
+ */
|
||||
+ if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0)
|
||||
+ goto error;
|
||||
+
|
||||
priv = vm->privateData;
|
||||
|
||||
if (taint_hook) {
|
||||
@@ -689,27 +699,27 @@ libxlDomainMigrationDstPrepare(virConnec
|
||||
/* Create socket connection to receive migration data */
|
||||
if (!uri_in) {
|
||||
if ((hostname = virGetHostname()) == NULL)
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
|
||||
if (STRPREFIX(hostname, "localhost")) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("hostname on destination resolved to localhost,"
|
||||
" but migration requires an FQDN"));
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
}
|
||||
|
||||
if (virPortAllocatorAcquire(driver->migrationPorts, &port) < 0)
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
|
||||
priv->migrationPort = port;
|
||||
if (virAsprintf(uri_out, "tcp://%s:%d", hostname, port) < 0)
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
} else {
|
||||
if (!(STRPREFIX(uri_in, "tcp://"))) {
|
||||
/* not full URI, add prefix tcp:// */
|
||||
char *tmp;
|
||||
if (virAsprintf(&tmp, "tcp://%s", uri_in) < 0)
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
uri = virURIParse(tmp);
|
||||
VIR_FREE(tmp);
|
||||
} else {
|
||||
@@ -720,20 +730,20 @@ libxlDomainMigrationDstPrepare(virConnec
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("unable to parse URI: %s"),
|
||||
uri_in);
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
}
|
||||
|
||||
if (uri->server == NULL) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("missing host in migration URI: %s"),
|
||||
uri_in);
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
}
|
||||
hostname = uri->server;
|
||||
|
||||
if (uri->port == 0) {
|
||||
if (virPortAllocatorAcquire(driver->migrationPorts, &port) < 0)
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
|
||||
priv->migrationPort = port;
|
||||
} else {
|
||||
@@ -741,7 +751,7 @@ libxlDomainMigrationDstPrepare(virConnec
|
||||
}
|
||||
|
||||
if (virAsprintf(uri_out, "tcp://%s:%d", hostname, port) < 0)
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
}
|
||||
|
||||
snprintf(portstr, sizeof(portstr), "%d", port);
|
||||
@@ -751,14 +761,14 @@ libxlDomainMigrationDstPrepare(virConnec
|
||||
&socks, &nsocks) < 0) {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
||||
_("Fail to create socket for incoming migration"));
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
}
|
||||
|
||||
if (libxlMigrationDstArgsInitialize() < 0)
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
|
||||
if (!(args = virObjectNew(libxlMigrationDstArgsClass)))
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
|
||||
args->conn = virObjectRef(dconn);
|
||||
args->vm = virObjectRef(vm);
|
||||
@@ -786,11 +796,14 @@ libxlDomainMigrationDstPrepare(virConnec
|
||||
}
|
||||
|
||||
if (!nsocks_listen)
|
||||
- goto error;
|
||||
+ goto endjob;
|
||||
|
||||
ret = 0;
|
||||
goto done;
|
||||
|
||||
+ endjob:
|
||||
+ libxlDomainObjEndJob(driver, vm);
|
||||
+
|
||||
error:
|
||||
for (i = 0; i < nsocks; i++) {
|
||||
virNetSocketClose(socks[i]);
|
||||
@@ -1354,6 +1367,8 @@ libxlDomainMigrationDstFinish(virConnect
|
||||
virDomainObjListRemove(driver->domains, vm);
|
||||
}
|
||||
|
||||
+ /* EndJob for corresponding BeginJob in prepare phase */
|
||||
+ libxlDomainObjEndJob(driver, vm);
|
||||
virObjectEventStateQueue(driver->domainEventState, event);
|
||||
virObjectUnref(cfg);
|
||||
return dom;
|
@ -1,28 +0,0 @@
|
||||
commit 074a7e14780e6aff78c7305c7dcad059a998c08a
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:40:25 2018 +0200
|
||||
|
||||
Revert "build: undef WITH_JANSSON for SETUID_RPC_CLIENT"
|
||||
|
||||
This reverts commit 93fdc9e0b0cbb2eec32745a868ac4633f0912ad5.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/config-post.h
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/config-post.h
|
||||
+++ libvirt-4.6.0/config-post.h
|
||||
@@ -36,7 +36,6 @@
|
||||
# undef WITH_DEVMAPPER
|
||||
# undef WITH_DTRACE_PROBES
|
||||
# undef WITH_GNUTLS
|
||||
-# undef WITH_JANSSON
|
||||
# undef WITH_LIBSSH
|
||||
# undef WITH_MACVTAP
|
||||
# undef WITH_NUMACTL
|
88
47da84e0-libxl-fix-job-handling-migsrc.patch
Normal file
88
47da84e0-libxl-fix-job-handling-migsrc.patch
Normal file
@ -0,0 +1,88 @@
|
||||
commit 47da84e09044e5af914a64469d06adef34279964
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Tue Aug 28 17:30:18 2018 -0600
|
||||
|
||||
libxl: fix job handling across migration phases on src
|
||||
|
||||
The libxlDomainMigrationSrc* functions are a bit flawed in their
|
||||
handling of modify jobs. A job begins at the start of the begin
|
||||
phase but ends before the phase completes. No job is running for
|
||||
the remaining phases of migration on the source host.
|
||||
|
||||
Change the logic to keep the job running after a successful begin
|
||||
phase, and end the job in the confirm phase. The job must also end
|
||||
in the perform phase in the case of error since confirm phase would
|
||||
not be executed.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_migration.c
|
||||
===================================================================
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_migration.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_migration.c
|
||||
@@ -399,6 +399,11 @@ libxlDomainMigrationSrcBegin(virConnectP
|
||||
virDomainDefPtr def;
|
||||
char *xml = NULL;
|
||||
|
||||
+ /*
|
||||
+ * In the case of successful migration, a job is started here and
|
||||
+ * terminated in the confirm phase. Errors in the begin or perform
|
||||
+ * phase will also terminate the job.
|
||||
+ */
|
||||
if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@@ -428,6 +433,9 @@ libxlDomainMigrationSrcBegin(virConnectP
|
||||
goto endjob;
|
||||
|
||||
xml = virDomainDefFormat(def, cfg->caps, VIR_DOMAIN_DEF_FORMAT_SECURE);
|
||||
+ /* Valid xml means success! EndJob in the confirm phase */
|
||||
+ if (xml)
|
||||
+ goto cleanup;
|
||||
|
||||
endjob:
|
||||
libxlDomainObjEndJob(driver, vm);
|
||||
@@ -1169,6 +1177,14 @@ libxlDomainMigrationSrcPerformP2P(libxlD
|
||||
ret = libxlDoMigrateSrcP2P(driver, vm, sconn, xmlin, dconn, dconnuri,
|
||||
dname, uri_str, flags);
|
||||
|
||||
+ if (ret < 0) {
|
||||
+ /*
|
||||
+ * Confirm phase will not be executed if perform fails. End the
|
||||
+ * job started in begin phase.
|
||||
+ */
|
||||
+ libxlDomainObjEndJob(driver, vm);
|
||||
+ }
|
||||
+
|
||||
cleanup:
|
||||
orig_err = virSaveLastError();
|
||||
virObjectUnlock(vm);
|
||||
@@ -1232,11 +1248,17 @@ libxlDomainMigrationSrcPerform(libxlDriv
|
||||
ret = libxlDoMigrateSrcSend(driver, vm, flags, sockfd);
|
||||
virObjectLock(vm);
|
||||
|
||||
- if (ret < 0)
|
||||
+ if (ret < 0) {
|
||||
virDomainLockProcessResume(driver->lockManager,
|
||||
"xen:///system",
|
||||
vm,
|
||||
priv->lockState);
|
||||
+ /*
|
||||
+ * Confirm phase will not be executed if perform fails. End the
|
||||
+ * job started in begin phase.
|
||||
+ */
|
||||
+ libxlDomainObjEndJob(driver, vm);
|
||||
+ }
|
||||
|
||||
cleanup:
|
||||
VIR_FORCE_CLOSE(sockfd);
|
||||
@@ -1386,6 +1408,8 @@ libxlDomainMigrationSrcConfirm(libxlDriv
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
+ /* EndJob for corresponding BeginJob in begin phase */
|
||||
+ libxlDomainObjEndJob(driver, vm);
|
||||
virObjectEventStateQueue(driver->domainEventState, event);
|
||||
virObjectUnref(cfg);
|
||||
return ret;
|
@ -1,37 +0,0 @@
|
||||
commit 54f2b5e330aa20c9745b2545fc88973539015b98
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:38:46 2018 +0200
|
||||
|
||||
Revert "util: jsoncompat: Stub out virJSONInitialize when compiling without jansson"
|
||||
|
||||
This reverts commit 9e44c2db8ad94d3c20acc1d081538c280af198b4.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/src/util/virjsoncompat.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/virjsoncompat.c
|
||||
+++ libvirt-4.6.0/src/util/virjsoncompat.c
|
||||
@@ -271,15 +271,4 @@ json_true_impl(void)
|
||||
return json_true_ptr();
|
||||
}
|
||||
|
||||
-
|
||||
-#else /* !WITH_JANSSON */
|
||||
-
|
||||
-
|
||||
-int
|
||||
-virJSONInitialize(void)
|
||||
-{
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-#endif /* !WITH_JANSSON */
|
||||
+#endif /* WITH_JANSSON */
|
@ -1,40 +0,0 @@
|
||||
commit 5a58b5ed6803e71e32e5d6f8c6e3b68874d085fb
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:39:48 2018 +0200
|
||||
|
||||
Revert "build: switch --with-qemu default from yes to check"
|
||||
|
||||
This reverts commit c5ae8e0c2b4b6bb3c667cfadaf65a66c3f4f3d85.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/m4/virt-driver-qemu.m4
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/m4/virt-driver-qemu.m4
|
||||
+++ libvirt-4.6.0/m4/virt-driver-qemu.m4
|
||||
@@ -18,7 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_DRIVER_ARG_QEMU], [
|
||||
- LIBVIRT_ARG_WITH_FEATURE([QEMU], [QEMU/KVM], [check])
|
||||
+ LIBVIRT_ARG_WITH_FEATURE([QEMU], [QEMU/KVM], [yes])
|
||||
LIBVIRT_ARG_WITH([QEMU_USER], [username to run QEMU system instance as],
|
||||
['platform dependent'])
|
||||
LIBVIRT_ARG_WITH([QEMU_GROUP], [groupname to run QEMU system instance as],
|
||||
@@ -26,10 +26,6 @@ AC_DEFUN([LIBVIRT_DRIVER_ARG_QEMU], [
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [
|
||||
- AC_REQUIRE([LIBVIRT_CHECK_JANSSON])
|
||||
- if test "$with_qemu" = "check"; then
|
||||
- with_qemu=$with_jansson
|
||||
- fi
|
||||
if test "$with_qemu" = "yes" ; then
|
||||
AC_DEFINE_UNQUOTED([WITH_QEMU], 1, [whether QEMU driver is enabled])
|
||||
fi
|
87
5ea2abb3-libxl-join-mig-rcv-thread.patch
Normal file
87
5ea2abb3-libxl-join-mig-rcv-thread.patch
Normal file
@ -0,0 +1,87 @@
|
||||
commit 5ea2abb3bfd552175dc2dfcc295fde3fbf17fc37
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Fri Aug 24 15:38:14 2018 -0600
|
||||
|
||||
libxl: join with thread receiving migration data
|
||||
|
||||
It is possible the incoming VM is not fully started when the finish
|
||||
phase of migration is executed. In libxlDomainMigrationDstFinish,
|
||||
wait for the thread receiving the VM to complete before executing
|
||||
finish phase tasks.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_domain.h
|
||||
===================================================================
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_domain.h
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_domain.h
|
||||
@@ -65,6 +65,7 @@ struct _libxlDomainObjPrivate {
|
||||
/* console */
|
||||
virChrdevsPtr devs;
|
||||
libxl_evgen_domain_death *deathW;
|
||||
+ virThreadPtr migrationDstReceiveThr;
|
||||
unsigned short migrationPort;
|
||||
char *lockState;
|
||||
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_migration.c
|
||||
===================================================================
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_migration.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_migration.c
|
||||
@@ -297,9 +297,9 @@ libxlMigrateDstReceive(virNetSocketPtr s
|
||||
libxlMigrationDstArgs *args = opaque;
|
||||
virNetSocketPtr *socks = args->socks;
|
||||
size_t nsocks = args->nsocks;
|
||||
+ libxlDomainObjPrivatePtr priv = args->vm->privateData;
|
||||
virNetSocketPtr client_sock;
|
||||
int recvfd = -1;
|
||||
- virThread thread;
|
||||
size_t i;
|
||||
|
||||
/* Accept migration connection */
|
||||
@@ -318,7 +318,10 @@ libxlMigrateDstReceive(virNetSocketPtr s
|
||||
* the migration data
|
||||
*/
|
||||
args->recvfd = recvfd;
|
||||
- if (virThreadCreate(&thread, false,
|
||||
+ VIR_FREE(priv->migrationDstReceiveThr);
|
||||
+ if (VIR_ALLOC(priv->migrationDstReceiveThr) < 0)
|
||||
+ goto fail;
|
||||
+ if (virThreadCreate(priv->migrationDstReceiveThr, true,
|
||||
libxlDoMigrateDstReceive, args) < 0) {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
||||
_("Failed to create thread for receiving migration data"));
|
||||
@@ -557,7 +560,6 @@ libxlDomainMigrationDstPrepareTunnel3(vi
|
||||
libxlDriverPrivatePtr driver = dconn->privateData;
|
||||
virDomainObjPtr vm = NULL;
|
||||
libxlMigrationDstArgs *args = NULL;
|
||||
- virThread thread;
|
||||
bool taint_hook = false;
|
||||
libxlDomainObjPrivatePtr priv = NULL;
|
||||
char *xmlout = NULL;
|
||||
@@ -617,7 +619,10 @@ libxlDomainMigrationDstPrepareTunnel3(vi
|
||||
args->nsocks = 0;
|
||||
mig = NULL;
|
||||
|
||||
- if (virThreadCreate(&thread, false, libxlDoMigrateDstReceive, args) < 0) {
|
||||
+ VIR_FREE(priv->migrationDstReceiveThr);
|
||||
+ if (VIR_ALLOC(priv->migrationDstReceiveThr) < 0)
|
||||
+ goto error;
|
||||
+ if (virThreadCreate(priv->migrationDstReceiveThr, true, libxlDoMigrateDstReceive, args) < 0) {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
||||
_("Failed to create thread for receiving migration data"));
|
||||
goto endjob;
|
||||
@@ -1291,6 +1296,13 @@ libxlDomainMigrationDstFinish(virConnect
|
||||
virObjectEventPtr event = NULL;
|
||||
virDomainPtr dom = NULL;
|
||||
|
||||
+ if (priv->migrationDstReceiveThr) {
|
||||
+ virObjectUnlock(vm);
|
||||
+ virThreadJoin(priv->migrationDstReceiveThr);
|
||||
+ virObjectLock(vm);
|
||||
+ VIR_FREE(priv->migrationDstReceiveThr);
|
||||
+ }
|
||||
+
|
||||
virPortAllocatorRelease(priv->migrationPort);
|
||||
priv->migrationPort = 0;
|
||||
|
44
60b4fd90-libxl-rm-vm-finish-phase.patch
Normal file
44
60b4fd90-libxl-rm-vm-finish-phase.patch
Normal file
@ -0,0 +1,44 @@
|
||||
commit 60b4fd90213135be0e471756d3d95c68eb3e8f59
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Fri Aug 24 14:55:03 2018 -0600
|
||||
|
||||
libxl: migration: defer removing VM until finish phase
|
||||
|
||||
If for any reason the restore of a VM fails on the destination host
|
||||
in a migration operation, the VM is removed (if not persistent) from
|
||||
the virDomainObjList, meaning it is no longer available for additional
|
||||
cleanup or processing in the finish phase. Defer removing the VM from
|
||||
the virDomainObjList until the finish phase, which already contains
|
||||
logic to remove the VM.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_migration.c
|
||||
===================================================================
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_migration.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_migration.c
|
||||
@@ -264,7 +264,6 @@ libxlDoMigrateDstReceive(void *opaque)
|
||||
libxlDriverPrivatePtr driver = args->conn->privateData;
|
||||
int recvfd = args->recvfd;
|
||||
size_t i;
|
||||
- int ret;
|
||||
|
||||
virObjectRef(vm);
|
||||
virObjectLock(vm);
|
||||
@@ -274,12 +273,10 @@ libxlDoMigrateDstReceive(void *opaque)
|
||||
/*
|
||||
* Always start the domain paused. If needed, unpause in the
|
||||
* finish phase, after transfer of the domain is complete.
|
||||
+ * Errors and cleanup are also handled in the finish phase.
|
||||
*/
|
||||
- ret = libxlDomainStartRestore(driver, vm, true, recvfd,
|
||||
- args->migcookie->xenMigStreamVer);
|
||||
-
|
||||
- if (ret < 0 && !vm->persistent)
|
||||
- virDomainObjListRemove(driver->domains, vm);
|
||||
+ libxlDomainStartRestore(driver, vm, true, recvfd,
|
||||
+ args->migcookie->xenMigStreamVer);
|
||||
|
||||
/* Remove all listen socks from event handler, and close them. */
|
||||
for (i = 0; i < nsocks; i++) {
|
@ -1,73 +0,0 @@
|
||||
commit 63f6e0e95036a0634ee8147ee7a463c4066fa720
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:39:56 2018 +0200
|
||||
|
||||
Revert "Remove virJSONValueNewStringLen"
|
||||
|
||||
This reverts commit 8f802c6d8659beb9eb3cab96ba2553e251728337.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/src/libvirt_private.syms
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/libvirt_private.syms
|
||||
+++ libvirt-4.6.0/src/libvirt_private.syms
|
||||
@@ -2098,6 +2098,7 @@ virJSONValueNewNumberUint;
|
||||
virJSONValueNewNumberUlong;
|
||||
virJSONValueNewObject;
|
||||
virJSONValueNewString;
|
||||
+virJSONValueNewStringLen;
|
||||
virJSONValueObjectAdd;
|
||||
virJSONValueObjectAddVArgs;
|
||||
virJSONValueObjectAppend;
|
||||
Index: libvirt-4.6.0/src/util/virjson.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/virjson.c
|
||||
+++ libvirt-4.6.0/src/util/virjson.c
|
||||
@@ -420,6 +420,28 @@ virJSONValueNewString(const char *data)
|
||||
}
|
||||
|
||||
|
||||
+virJSONValuePtr
|
||||
+virJSONValueNewStringLen(const char *data,
|
||||
+ size_t length)
|
||||
+{
|
||||
+ virJSONValuePtr val;
|
||||
+
|
||||
+ if (!data)
|
||||
+ return virJSONValueNewNull();
|
||||
+
|
||||
+ if (VIR_ALLOC(val) < 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ val->type = VIR_JSON_TYPE_STRING;
|
||||
+ if (VIR_STRNDUP(val->data.string, data, length) < 0) {
|
||||
+ VIR_FREE(val);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static virJSONValuePtr
|
||||
virJSONValueNewNumber(const char *data)
|
||||
{
|
||||
Index: libvirt-4.6.0/src/util/virjson.h
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/virjson.h
|
||||
+++ libvirt-4.6.0/src/util/virjson.h
|
||||
@@ -59,6 +59,7 @@ int virJSONValueObjectAddVArgs(virJSONVa
|
||||
|
||||
|
||||
virJSONValuePtr virJSONValueNewString(const char *data);
|
||||
+virJSONValuePtr virJSONValueNewStringLen(const char *data, size_t length);
|
||||
virJSONValuePtr virJSONValueNewNumberInt(int data);
|
||||
virJSONValuePtr virJSONValueNewNumberUint(unsigned int data);
|
||||
virJSONValuePtr virJSONValueNewNumberLong(long long data);
|
@ -1,496 +0,0 @@
|
||||
commit 6c3d66ac7409579752765c12e65adccec30e24fc
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:39:16 2018 +0200
|
||||
|
||||
Revert "util: avoid symbol clash between json libraries"
|
||||
|
||||
This reverts commit ce3c6ef6843f98d81be5423ece11fad79eaab920.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/libvirt.spec.in
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/libvirt.spec.in
|
||||
+++ libvirt-4.6.0/libvirt.spec.in
|
||||
@@ -898,8 +898,6 @@ Requires: ncurses
|
||||
Requires: gettext
|
||||
# Needed by virt-pki-validate script.
|
||||
Requires: gnutls-utils
|
||||
-# We dlopen(libjansson.so.4), so need an explicit dep
|
||||
-Requires: jansson
|
||||
%if %{with_bash_completion}
|
||||
Requires: %{name}-bash-completion = %{version}-%{release}
|
||||
%endif
|
||||
Index: libvirt-4.6.0/src/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/Makefile.am
|
||||
+++ libvirt-4.6.0/src/Makefile.am
|
||||
@@ -552,6 +552,7 @@ libvirt_admin_la_CFLAGS += \
|
||||
|
||||
libvirt_admin_la_LIBADD += \
|
||||
$(CAPNG_LIBS) \
|
||||
+ $(JANSSON_LIBS) \
|
||||
$(DEVMAPPER_LIBS) \
|
||||
$(LIBXML_LIBS) \
|
||||
$(SSH2_LIBS) \
|
||||
@@ -689,7 +690,6 @@ libvirt_setuid_rpc_client_la_SOURCES = \
|
||||
util/virhashcode.c \
|
||||
util/virhostcpu.c \
|
||||
util/virjson.c \
|
||||
- util/virjsoncompat.c \
|
||||
util/virlog.c \
|
||||
util/virobject.c \
|
||||
util/virpidfile.c \
|
||||
@@ -961,8 +961,6 @@ libvirt_nss_la_SOURCES = \
|
||||
util/virhashcode.h \
|
||||
util/virjson.c \
|
||||
util/virjson.h \
|
||||
- util/virjsoncompat.c \
|
||||
- util/virjsoncompat.h \
|
||||
util/virkmod.c \
|
||||
util/virkmod.h \
|
||||
util/virlease.c \
|
||||
@@ -1001,6 +999,10 @@ libvirt_nss_la_CFLAGS = \
|
||||
libvirt_nss_la_LDFLAGS = \
|
||||
$(AM_LDFLAGS) \
|
||||
$(NULL)
|
||||
+
|
||||
+libvirt_nss_la_LIBADD = \
|
||||
+ $(JANSSON_LIBS) \
|
||||
+ $(NULL)
|
||||
endif WITH_NSS
|
||||
|
||||
|
||||
Index: libvirt-4.6.0/src/util/Makefile.inc.am
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/Makefile.inc.am
|
||||
+++ libvirt-4.6.0/src/util/Makefile.inc.am
|
||||
@@ -86,8 +86,6 @@ UTIL_SOURCES = \
|
||||
util/viriscsi.h \
|
||||
util/virjson.c \
|
||||
util/virjson.h \
|
||||
- util/virjsoncompat.c \
|
||||
- util/virjsoncompat.h \
|
||||
util/virkeycode.c \
|
||||
util/virkeycode.h \
|
||||
util/virkeyfile.c \
|
||||
@@ -266,6 +264,7 @@ libvirt_util_la_CFLAGS = \
|
||||
$(NULL)
|
||||
libvirt_util_la_LIBADD = \
|
||||
$(CAPNG_LIBS) \
|
||||
+ $(JANSSON_LIBS) \
|
||||
$(LIBNL_LIBS) \
|
||||
$(THREAD_LIBS) \
|
||||
$(AUDIT_LIBS) \
|
||||
Index: libvirt-4.6.0/src/util/virjson.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/virjson.c
|
||||
+++ libvirt-4.6.0/src/util/virjson.c
|
||||
@@ -1437,8 +1437,7 @@ virJSONValueCopy(const virJSONValue *in)
|
||||
|
||||
|
||||
#if WITH_JANSSON
|
||||
-
|
||||
-# include "virjsoncompat.h"
|
||||
+# include <jansson.h>
|
||||
|
||||
static virJSONValuePtr
|
||||
virJSONValueFromJansson(json_t *json)
|
||||
@@ -1525,9 +1524,6 @@ virJSONValueFromString(const char *jsons
|
||||
size_t flags = JSON_REJECT_DUPLICATES |
|
||||
JSON_DECODE_ANY;
|
||||
|
||||
- if (virJSONInitialize() < 0)
|
||||
- return NULL;
|
||||
-
|
||||
if (!(json = json_loads(jsonstring, flags, &error))) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("failed to parse JSON %d:%d: %s"),
|
||||
@@ -1634,9 +1630,6 @@ virJSONValueToString(virJSONValuePtr obj
|
||||
json_t *json;
|
||||
char *str = NULL;
|
||||
|
||||
- if (virJSONInitialize() < 0)
|
||||
- return NULL;
|
||||
-
|
||||
if (pretty)
|
||||
flags |= JSON_INDENT(2);
|
||||
else
|
||||
Index: libvirt-4.6.0/src/util/virjsoncompat.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/virjsoncompat.c
|
||||
+++ /dev/null
|
||||
@@ -1,274 +0,0 @@
|
||||
-/*
|
||||
- * virjsoncompat.c: JSON object parsing/formatting
|
||||
- *
|
||||
- * Copyright (C) 2018 Red Hat, Inc.
|
||||
- *
|
||||
- * This library is free software; you can redistribute it and/or
|
||||
- * modify it under the terms of the GNU Lesser General Public
|
||||
- * License as published by the Free Software Foundation; either
|
||||
- * version 2.1 of the License, or (at your option) any later version.
|
||||
- *
|
||||
- * This library is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- * Lesser General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU Lesser General Public
|
||||
- * License along with this library. If not, see
|
||||
- * <http://www.gnu.org/licenses/>.
|
||||
- *
|
||||
- */
|
||||
-
|
||||
-#include <config.h>
|
||||
-
|
||||
-#include "virthread.h"
|
||||
-#include "virerror.h"
|
||||
-#define VIR_JSON_COMPAT_IMPL
|
||||
-#include "virjsoncompat.h"
|
||||
-
|
||||
-#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
-
|
||||
-#if WITH_JANSSON
|
||||
-
|
||||
-# include <dlfcn.h>
|
||||
-
|
||||
-json_t *(*json_array_ptr)(void);
|
||||
-int (*json_array_append_new_ptr)(json_t *array, json_t *value);
|
||||
-json_t *(*json_array_get_ptr)(const json_t *array, size_t index);
|
||||
-size_t (*json_array_size_ptr)(const json_t *array);
|
||||
-void (*json_delete_ptr)(json_t *json);
|
||||
-char *(*json_dumps_ptr)(const json_t *json, size_t flags);
|
||||
-json_t *(*json_false_ptr)(void);
|
||||
-json_t *(*json_integer_ptr)(json_int_t value);
|
||||
-json_int_t (*json_integer_value_ptr)(const json_t *integer);
|
||||
-json_t *(*json_loads_ptr)(const char *input, size_t flags, json_error_t *error);
|
||||
-json_t *(*json_null_ptr)(void);
|
||||
-json_t *(*json_object_ptr)(void);
|
||||
-void *(*json_object_iter_ptr)(json_t *object);
|
||||
-const char *(*json_object_iter_key_ptr)(void *iter);
|
||||
-void *(*json_object_iter_next_ptr)(json_t *object, void *iter);
|
||||
-json_t *(*json_object_iter_value_ptr)(void *iter);
|
||||
-void *(*json_object_key_to_iter_ptr)(const char *key);
|
||||
-int (*json_object_set_new_ptr)(json_t *object, const char *key, json_t *value);
|
||||
-json_t *(*json_real_ptr)(double value);
|
||||
-double (*json_real_value_ptr)(const json_t *real);
|
||||
-json_t *(*json_string_ptr)(const char *value);
|
||||
-const char *(*json_string_value_ptr)(const json_t *string);
|
||||
-json_t *(*json_true_ptr)(void);
|
||||
-
|
||||
-
|
||||
-static int
|
||||
-virJSONJanssonOnceInit(void)
|
||||
-{
|
||||
- void *handle = dlopen("libjansson.so.4", RTLD_LAZY|RTLD_LOCAL|RTLD_NODELETE);
|
||||
- if (!handle) {
|
||||
- virReportError(VIR_ERR_NO_SUPPORT,
|
||||
- _("libjansson.so.4 JSON library not available: %s"), dlerror());
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
-# define LOAD(name) \
|
||||
- do { \
|
||||
- if (!(name ## _ptr = dlsym(handle, #name))) { \
|
||||
- virReportError(VIR_ERR_NO_SUPPORT, \
|
||||
- _("missing symbol '%s' in libjansson.so.4: %s"), #name, dlerror()); \
|
||||
- return -1; \
|
||||
- } \
|
||||
- } while (0)
|
||||
-
|
||||
- LOAD(json_array);
|
||||
- LOAD(json_array_append_new);
|
||||
- LOAD(json_array_get);
|
||||
- LOAD(json_array_size);
|
||||
- LOAD(json_delete);
|
||||
- LOAD(json_dumps);
|
||||
- LOAD(json_false);
|
||||
- LOAD(json_integer);
|
||||
- LOAD(json_integer_value);
|
||||
- LOAD(json_loads);
|
||||
- LOAD(json_null);
|
||||
- LOAD(json_object);
|
||||
- LOAD(json_object_iter);
|
||||
- LOAD(json_object_iter_key);
|
||||
- LOAD(json_object_iter_next);
|
||||
- LOAD(json_object_iter_value);
|
||||
- LOAD(json_object_key_to_iter);
|
||||
- LOAD(json_object_set_new);
|
||||
- LOAD(json_real);
|
||||
- LOAD(json_real_value);
|
||||
- LOAD(json_string);
|
||||
- LOAD(json_string_value);
|
||||
- LOAD(json_true);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-VIR_ONCE_GLOBAL_INIT(virJSONJansson);
|
||||
-
|
||||
-int
|
||||
-virJSONInitialize(void)
|
||||
-{
|
||||
- return virJSONJanssonInitialize();
|
||||
-}
|
||||
-
|
||||
-json_t *
|
||||
-json_array_impl(void)
|
||||
-{
|
||||
- return json_array_ptr();
|
||||
-}
|
||||
-
|
||||
-
|
||||
-int
|
||||
-json_array_append_new_impl(json_t *array, json_t *value)
|
||||
-{
|
||||
- return json_array_append_new_ptr(array, value);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-json_t *
|
||||
-json_array_get_impl(const json_t *array, size_t index)
|
||||
-{
|
||||
- return json_array_get_ptr(array, index);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-size_t
|
||||
-json_array_size_impl(const json_t *array)
|
||||
-{
|
||||
- return json_array_size_ptr(array);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-void
|
||||
-json_delete_impl(json_t *json)
|
||||
-{
|
||||
- return json_delete_ptr(json);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-char *
|
||||
-json_dumps_impl(const json_t *json, size_t flags)
|
||||
-{
|
||||
- return json_dumps_ptr(json, flags);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-json_t *
|
||||
-json_false_impl(void)
|
||||
-{
|
||||
- return json_false_ptr();
|
||||
-}
|
||||
-
|
||||
-
|
||||
-json_t *
|
||||
-json_integer_impl(json_int_t value)
|
||||
-{
|
||||
- return json_integer_ptr(value);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-json_int_t
|
||||
-json_integer_value_impl(const json_t *integer)
|
||||
-{
|
||||
- return json_integer_value_ptr(integer);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-json_t *
|
||||
-json_loads_impl(const char *input, size_t flags, json_error_t *error)
|
||||
-{
|
||||
- return json_loads_ptr(input, flags, error);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-json_t *
|
||||
-json_null_impl(void)
|
||||
-{
|
||||
- return json_null_ptr();
|
||||
-}
|
||||
-
|
||||
-
|
||||
-json_t *
|
||||
-json_object_impl(void)
|
||||
-{
|
||||
- return json_object_ptr();
|
||||
-}
|
||||
-
|
||||
-
|
||||
-void *
|
||||
-json_object_iter_impl(json_t *object)
|
||||
-{
|
||||
- return json_object_iter_ptr(object);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-const char *
|
||||
-json_object_iter_key_impl(void *iter)
|
||||
-{
|
||||
- return json_object_iter_key_ptr(iter);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-void *
|
||||
-json_object_iter_next_impl(json_t *object, void *iter)
|
||||
-{
|
||||
- return json_object_iter_next_ptr(object, iter);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-json_t *
|
||||
-json_object_iter_value_impl(void *iter)
|
||||
-{
|
||||
- return json_object_iter_value_ptr(iter);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-void *
|
||||
-json_object_key_to_iter_impl(const char *key)
|
||||
-{
|
||||
- return json_object_key_to_iter_ptr(key);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-int
|
||||
-json_object_set_new_impl(json_t *object, const char *key, json_t *value)
|
||||
-{
|
||||
- return json_object_set_new_ptr(object, key, value);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-json_t *
|
||||
-json_real_impl(double value)
|
||||
-{
|
||||
- return json_real_ptr(value);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-double
|
||||
-json_real_value_impl(const json_t *real)
|
||||
-{
|
||||
- return json_real_value_ptr(real);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-json_t *
|
||||
-json_string_impl(const char *value)
|
||||
-{
|
||||
- return json_string_ptr(value);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-const char *
|
||||
-json_string_value_impl(const json_t *string)
|
||||
-{
|
||||
- return json_string_value_ptr(string);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-json_t *
|
||||
-json_true_impl(void)
|
||||
-{
|
||||
- return json_true_ptr();
|
||||
-}
|
||||
-
|
||||
-#endif /* WITH_JANSSON */
|
||||
Index: libvirt-4.6.0/src/util/virjsoncompat.h
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/virjsoncompat.h
|
||||
+++ /dev/null
|
||||
@@ -1,88 +0,0 @@
|
||||
-/*
|
||||
- * virjsoncompat.h: JSON object parsing/formatting
|
||||
- *
|
||||
- * Copyright (C) 2018 Red Hat, Inc.
|
||||
- *
|
||||
- * This library is free software; you can redistribute it and/or
|
||||
- * modify it under the terms of the GNU Lesser General Public
|
||||
- * License as published by the Free Software Foundation; either
|
||||
- * version 2.1 of the License, or (at your option) any later version.
|
||||
- *
|
||||
- * This library is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- * Lesser General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU Lesser General Public
|
||||
- * License along with this library. If not, see
|
||||
- * <http://www.gnu.org/licenses/>.
|
||||
- *
|
||||
- */
|
||||
-
|
||||
-
|
||||
-#ifndef __VIR_JSON_COMPAT_H_
|
||||
-# define __VIR_JSON_COMPAT_H_
|
||||
-
|
||||
-# if WITH_JANSSON
|
||||
-# ifndef VIR_JSON_COMPAT_IMPL
|
||||
-
|
||||
-# define json_array json_array_impl
|
||||
-# define json_array_append_new json_array_append_new_impl
|
||||
-# define json_array_get json_array_get_impl
|
||||
-# define json_array_size json_array_size_impl
|
||||
-# define json_delete json_delete_impl
|
||||
-# define json_dumps json_dumps_impl
|
||||
-# define json_false json_false_impl
|
||||
-# define json_integer json_integer_impl
|
||||
-# define json_integer_value json_integer_value_impl
|
||||
-# define json_loads json_loads_impl
|
||||
-# define json_null json_null_impl
|
||||
-# define json_object json_object_impl
|
||||
-# define json_object_iter json_object_iter_impl
|
||||
-# define json_object_iter_key json_object_iter_key_impl
|
||||
-# define json_object_iter_next json_object_iter_next_impl
|
||||
-# define json_object_iter_value json_object_iter_value_impl
|
||||
-# define json_object_key_to_iter json_object_key_to_iter_impl
|
||||
-# define json_object_set_new json_object_set_new_impl
|
||||
-# define json_real json_real_impl
|
||||
-# define json_real_value json_real_value_impl
|
||||
-# define json_string json_string_impl
|
||||
-# define json_string_value json_string_value_impl
|
||||
-# define json_true json_true_impl
|
||||
-
|
||||
-# endif /* ! VIR_JSON_COMPAT_IMPL */
|
||||
-
|
||||
-# include <jansson.h>
|
||||
-
|
||||
-# ifdef VIR_JSON_COMPAT_IMPL
|
||||
-
|
||||
-json_t *json_array_impl(void);
|
||||
-int json_array_append_new_impl(json_t *array, json_t *value);
|
||||
-json_t *json_array_get_impl(const json_t *array, size_t index);
|
||||
-size_t json_array_size_impl(const json_t *array);
|
||||
-void json_delete_impl(json_t *json);
|
||||
-char *json_dumps_impl(const json_t *json, size_t flags);
|
||||
-json_t *json_false_impl(void);
|
||||
-json_t *json_integer_impl(json_int_t value);
|
||||
-json_int_t json_integer_value_impl(const json_t *integer);
|
||||
-json_t *json_loads_impl(const char *input, size_t flags, json_error_t *error);
|
||||
-json_t *json_null_impl(void);
|
||||
-json_t *json_object_impl(void);
|
||||
-void *json_object_iter_impl(json_t *object);
|
||||
-const char *json_object_iter_key_impl(void *iter);
|
||||
-void *json_object_iter_next_impl(json_t *object, void *iter);
|
||||
-json_t *json_object_iter_value_impl(void *iter);
|
||||
-void *json_object_key_to_iter_impl(const char *key);
|
||||
-int json_object_set_new_impl(json_t *object, const char *key, json_t *value);
|
||||
-json_t *json_real_impl(double value);
|
||||
-double json_real_value_impl(const json_t *real);
|
||||
-json_t *json_string_impl(const char *value);
|
||||
-const char *json_string_value_impl(const json_t *string);
|
||||
-json_t *json_true_impl(void);
|
||||
-
|
||||
-# endif /* VIR_JSON_COMPAT_IMPL */
|
||||
-# endif /* WITH_JANSSON */
|
||||
-
|
||||
-int virJSONInitialize(void);
|
||||
-
|
||||
-#endif /* __VIR_JSON_COMPAT_H_ */
|
@ -1,174 +0,0 @@
|
||||
commit 6f99de314855296d52cdf0badcab5b12213f2ca4
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:39:33 2018 +0200
|
||||
|
||||
Revert "m4: Introduce STABLE_ORDERING_JANSSON"
|
||||
|
||||
This reverts commit 4dd60540007042bfc0087a67f57f3e9f3311a84a.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/m4/virt-jansson.m4
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/m4/virt-jansson.m4
|
||||
+++ libvirt-4.6.0/m4/virt-jansson.m4
|
||||
@@ -22,9 +22,6 @@ AC_DEFUN([LIBVIRT_ARG_JANSSON],[
|
||||
AC_DEFUN([LIBVIRT_CHECK_JANSSON],[
|
||||
dnl Jansson http://www.digip.org/jansson/
|
||||
LIBVIRT_CHECK_PKG([JANSSON], [jansson], [2.5])
|
||||
- dnl Older versions of Jansson did not preserve the order of object keys
|
||||
- dnl use this check to guard the tests that are sensitive to this
|
||||
- LIBVIRT_CHECK_PKG([STABLE_ORDERING_JANSSON], [jansson], [2.8], [true])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_JANSSON],[
|
||||
Index: libvirt-4.6.0/tests/qemublocktest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemublocktest.c
|
||||
+++ libvirt-4.6.0/tests/qemublocktest.c
|
||||
@@ -337,11 +337,6 @@ mymain(void)
|
||||
char *capslatest_x86_64 = NULL;
|
||||
virQEMUCapsPtr caps_x86_64 = NULL;
|
||||
|
||||
-#if !WITH_STABLE_ORDERING_JANSSON
|
||||
- fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
|
||||
- return EXIT_AM_SKIP;
|
||||
-#endif
|
||||
-
|
||||
if (qemuTestDriverInit(&driver) < 0)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
Index: libvirt-4.6.0/tests/qemucapabilitiestest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemucapabilitiestest.c
|
||||
+++ libvirt-4.6.0/tests/qemucapabilitiestest.c
|
||||
@@ -141,11 +141,6 @@ mymain(void)
|
||||
int ret = 0;
|
||||
testQemuData data;
|
||||
|
||||
-#if !WITH_STABLE_ORDERING_JANSSON
|
||||
- fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
|
||||
- return EXIT_AM_SKIP;
|
||||
-#endif
|
||||
-
|
||||
#if !WITH_JANSSON
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
Index: libvirt-4.6.0/tests/qemucommandutiltest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemucommandutiltest.c
|
||||
+++ libvirt-4.6.0/tests/qemucommandutiltest.c
|
||||
@@ -76,11 +76,6 @@ mymain(void)
|
||||
int ret = 0;
|
||||
testQemuCommandBuildObjectFromJSONData data1;
|
||||
|
||||
-#if !WITH_STABLE_ORDERING_JANSSON
|
||||
- fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
|
||||
- return EXIT_AM_SKIP;
|
||||
-#endif
|
||||
-
|
||||
#if !WITH_JANSSON
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
Index: libvirt-4.6.0/tests/qemuhotplugtest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemuhotplugtest.c
|
||||
+++ libvirt-4.6.0/tests/qemuhotplugtest.c
|
||||
@@ -593,11 +593,6 @@ mymain(void)
|
||||
struct qemuHotplugTestData data = {0};
|
||||
struct testQemuHotplugCpuParams cpudata;
|
||||
|
||||
-#if !WITH_STABLE_ORDERING_JANSSON
|
||||
- fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
|
||||
- return EXIT_AM_SKIP;
|
||||
-#endif
|
||||
-
|
||||
#if !WITH_JANSSON
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
Index: libvirt-4.6.0/tests/qemumigparamstest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemumigparamstest.c
|
||||
+++ libvirt-4.6.0/tests/qemumigparamstest.c
|
||||
@@ -203,11 +203,6 @@ mymain(void)
|
||||
virQEMUDriver driver;
|
||||
int ret = 0;
|
||||
|
||||
-#if !WITH_STABLE_ORDERING_JANSSON
|
||||
- fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
|
||||
- return EXIT_AM_SKIP;
|
||||
-#endif
|
||||
-
|
||||
#if !WITH_JANSSON
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
Index: libvirt-4.6.0/tests/qemumonitorjsontest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemumonitorjsontest.c
|
||||
+++ libvirt-4.6.0/tests/qemumonitorjsontest.c
|
||||
@@ -2863,11 +2863,6 @@ mymain(void)
|
||||
virJSONValuePtr metaschema = NULL;
|
||||
char *metaschemastr = NULL;
|
||||
|
||||
-#if !WITH_STABLE_ORDERING_JANSSON
|
||||
- fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
|
||||
- return EXIT_AM_SKIP;
|
||||
-#endif
|
||||
-
|
||||
#if !WITH_JANSSON
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
Index: libvirt-4.6.0/tests/virjsontest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/virjsontest.c
|
||||
+++ libvirt-4.6.0/tests/virjsontest.c
|
||||
@@ -479,11 +479,6 @@ mymain(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
-#if !WITH_STABLE_ORDERING_JANSSON
|
||||
- fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
|
||||
- return EXIT_AM_SKIP;
|
||||
-#endif
|
||||
-
|
||||
#define DO_TEST_FULL(name, cmd, doc, expect, pass) \
|
||||
do { \
|
||||
struct testInfo info = { doc, expect, pass }; \
|
||||
Index: libvirt-4.6.0/tests/virmacmaptest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/virmacmaptest.c
|
||||
+++ libvirt-4.6.0/tests/virmacmaptest.c
|
||||
@@ -157,11 +157,6 @@ mymain(void)
|
||||
int ret = 0;
|
||||
virMacMapPtr mgr = NULL;
|
||||
|
||||
-#if !WITH_STABLE_ORDERING_JANSSON
|
||||
- fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
|
||||
- return EXIT_AM_SKIP;
|
||||
-#endif
|
||||
-
|
||||
#define DO_TEST_BASIC(f, d, ...) \
|
||||
do { \
|
||||
const char * const m[] = {__VA_ARGS__, NULL }; \
|
||||
Index: libvirt-4.6.0/tests/virnetdaemontest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/virnetdaemontest.c
|
||||
+++ libvirt-4.6.0/tests/virnetdaemontest.c
|
||||
@@ -375,11 +375,6 @@ mymain(void)
|
||||
int ret = 0;
|
||||
const char *server_names[] = { "testServer0", "testServer1" };
|
||||
|
||||
-# if !WITH_STABLE_ORDERING_JANSSON
|
||||
- fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
|
||||
- return EXIT_AM_SKIP;
|
||||
-# endif
|
||||
-
|
||||
if (virInitialize() < 0 ||
|
||||
virEventRegisterDefaultImpl() < 0) {
|
||||
virDispatchError(NULL);
|
@ -1,29 +0,0 @@
|
||||
commit 8687eba5ca9a78b3a74a7c4e162d80633b8d877b
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:40:02 2018 +0200
|
||||
|
||||
Revert "build: remove references to WITH_YAJL for SETUID_RPC_CLIENT"
|
||||
|
||||
This reverts commit 1caf8441604b58e4a89aa2c09975b8346928c52a.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/config-post.h
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/config-post.h
|
||||
+++ libvirt-4.6.0/config-post.h
|
||||
@@ -44,6 +44,8 @@
|
||||
# undef WITH_SSH2
|
||||
# undef WITH_SYSTEMD_DAEMON
|
||||
# undef WITH_VIRTUALPORT
|
||||
+# undef WITH_YAJL
|
||||
+# undef WITH_YAJL2
|
||||
#endif
|
||||
|
||||
/*
|
@ -1,82 +0,0 @@
|
||||
commit 86db0db979c39df278f03dbf3b4239c873ddb637
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:41:14 2018 +0200
|
||||
|
||||
Revert "build: add --with-jansson"
|
||||
|
||||
This reverts commit 12b34f094e2f1c7f414f4bb8f880a9d65c8fcd85.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Conflicts:
|
||||
configure.ac:
|
||||
Commit 8aa85e0b introduced LIBVIRT_*_LIBISCSI macros.
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/configure.ac
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/configure.ac
|
||||
+++ libvirt-4.6.0/configure.ac
|
||||
@@ -250,7 +250,6 @@ LIBVIRT_ARG_FIREWALLD
|
||||
LIBVIRT_ARG_FUSE
|
||||
LIBVIRT_ARG_GLUSTER
|
||||
LIBVIRT_ARG_HAL
|
||||
-LIBVIRT_ARG_JANSSON
|
||||
LIBVIRT_ARG_LIBPCAP
|
||||
LIBVIRT_ARG_LIBSSH
|
||||
LIBVIRT_ARG_LIBXML
|
||||
@@ -291,7 +290,6 @@ LIBVIRT_CHECK_FUSE
|
||||
LIBVIRT_CHECK_GLUSTER
|
||||
LIBVIRT_CHECK_GNUTLS
|
||||
LIBVIRT_CHECK_HAL
|
||||
-LIBVIRT_CHECK_JANSSON
|
||||
LIBVIRT_CHECK_LIBNL
|
||||
LIBVIRT_CHECK_LIBPARTED
|
||||
LIBVIRT_CHECK_LIBPCAP
|
||||
@@ -972,7 +970,6 @@ LIBVIRT_RESULT_FUSE
|
||||
LIBVIRT_RESULT_GLUSTER
|
||||
LIBVIRT_RESULT_GNUTLS
|
||||
LIBVIRT_RESULT_HAL
|
||||
-LIBVIRT_RESULT_JANSSON
|
||||
LIBVIRT_RESULT_LIBNL
|
||||
LIBVIRT_RESULT_LIBPCAP
|
||||
LIBVIRT_RESULT_LIBSSH
|
||||
Index: libvirt-4.6.0/m4/virt-jansson.m4
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/m4/virt-jansson.m4
|
||||
+++ /dev/null
|
||||
@@ -1,29 +0,0 @@
|
||||
-dnl The jansson library
|
||||
-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
|
||||
-
|
||||
-AC_DEFUN([LIBVIRT_ARG_JANSSON],[
|
||||
- LIBVIRT_ARG_WITH_FEATURE([JANSSON], [jansson], [check])
|
||||
-])
|
||||
-
|
||||
-AC_DEFUN([LIBVIRT_CHECK_JANSSON],[
|
||||
- dnl Jansson http://www.digip.org/jansson/
|
||||
- LIBVIRT_CHECK_PKG([JANSSON], [jansson], [2.5])
|
||||
-])
|
||||
-
|
||||
-AC_DEFUN([LIBVIRT_RESULT_JANSSON],[
|
||||
- LIBVIRT_RESULT_LIB([JANSSON])
|
||||
-])
|
@ -1,31 +0,0 @@
|
||||
commit 8e373e6d80afa3b212464b8b1a9faa36ee684472
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:39:25 2018 +0200
|
||||
|
||||
Revert "tests: also skip qemuagenttest with old jansson"
|
||||
|
||||
This reverts commit c31146685f5c8558ff88d52d03a68533c9220feb.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/tests/qemuagenttest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemuagenttest.c
|
||||
+++ libvirt-4.6.0/tests/qemuagenttest.c
|
||||
@@ -907,8 +907,8 @@ mymain(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
-#if !WITH_STABLE_ORDERING_JANSSON
|
||||
- fputs("libvirt not compiled with recent enough Jansson, skipping this test\n", stderr);
|
||||
+#if !WITH_JANSSON
|
||||
+ fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
#endif
|
||||
|
@ -1,53 +0,0 @@
|
||||
commit 9ed59012d3ccdf8365f5e8119959017849bc89fd
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:38:38 2018 +0200
|
||||
|
||||
Revert "remote: daemon: Make sure that JSON symbols are properly loaded at startup"
|
||||
|
||||
This reverts commit 3251fc9c9b9639c3fec3181530599415523d671a.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/src/libvirt_private.syms
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/libvirt_private.syms
|
||||
+++ libvirt-4.6.0/src/libvirt_private.syms
|
||||
@@ -2135,10 +2135,6 @@ virJSONValueObjectStealObject;
|
||||
virJSONValueToString;
|
||||
|
||||
|
||||
-# util/virjsoncompat.h
|
||||
-virJSONInitialize;
|
||||
-
|
||||
-
|
||||
# util/virkeycode.h
|
||||
virKeycodeSetTypeFromString;
|
||||
virKeycodeSetTypeToString;
|
||||
Index: libvirt-4.6.0/src/remote/remote_daemon.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/remote/remote_daemon.c
|
||||
+++ libvirt-4.6.0/src/remote/remote_daemon.c
|
||||
@@ -59,7 +59,6 @@
|
||||
#include "virutil.h"
|
||||
#include "virgettext.h"
|
||||
#include "util/virnetdevopenvswitch.h"
|
||||
-#include "virjsoncompat.h"
|
||||
|
||||
#include "driver.h"
|
||||
|
||||
@@ -1184,9 +1183,6 @@ int main(int argc, char **argv) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
- if (virJSONInitialize() < 0)
|
||||
- exit(EXIT_FAILURE);
|
||||
-
|
||||
daemonSetupNetDevOpenvswitch(config);
|
||||
|
||||
if (daemonSetupAccessManager(config) < 0) {
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-4.6.0/examples/apparmor/libvirt-lxc
|
||||
Index: libvirt-4.7.0/examples/apparmor/libvirt-lxc
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/examples/apparmor/libvirt-lxc
|
||||
+++ libvirt-4.6.0/examples/apparmor/libvirt-lxc
|
||||
--- libvirt-4.7.0.orig/examples/apparmor/libvirt-lxc
|
||||
+++ libvirt-4.7.0/examples/apparmor/libvirt-lxc
|
||||
@@ -2,39 +2,15 @@
|
||||
|
||||
#include <abstractions/base>
|
||||
|
@ -1,36 +0,0 @@
|
||||
commit b56950fd277c0e31cbdf3a0e5b3c944f9857789a
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:39:09 2018 +0200
|
||||
|
||||
Revert "tests: qemucapsprobe: Fix output after switching to jansson"
|
||||
|
||||
This reverts commit 397447f80588438545994a86883792a5999cad15.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/tests/qemucapsprobemock.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemucapsprobemock.c
|
||||
+++ libvirt-4.6.0/tests/qemucapsprobemock.c
|
||||
@@ -76,7 +76,6 @@ qemuMonitorSend(qemuMonitorPtr mon,
|
||||
printLineSkipEmpty("\n", stdout);
|
||||
|
||||
printLineSkipEmpty(reformatted, stdout);
|
||||
- printLineSkipEmpty("\n", stdout);
|
||||
VIR_FREE(reformatted);
|
||||
|
||||
return realQemuMonitorSend(mon, msg);
|
||||
@@ -117,7 +116,6 @@ qemuMonitorJSONIOProcessLine(qemuMonitor
|
||||
printLineSkipEmpty("\n", stdout);
|
||||
|
||||
printLineSkipEmpty(json, stdout);
|
||||
- printLineSkipEmpty("\n", stdout);
|
||||
}
|
||||
|
||||
cleanup:
|
@ -11,11 +11,11 @@ Signed-off-by: Chunyan Liu <cyliu@suse.com>
|
||||
src/qemu/qemu_driver.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
Index: libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
Index: libvirt-4.7.0/src/qemu/qemu_driver.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/qemu/qemu_driver.c
|
||||
+++ libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
@@ -17484,6 +17484,14 @@ qemuDomainBlockCopyCommon(virDomainObjPt
|
||||
--- libvirt-4.7.0.orig/src/qemu/qemu_driver.c
|
||||
+++ libvirt-4.7.0/src/qemu/qemu_driver.c
|
||||
@@ -17511,6 +17511,14 @@ qemuDomainBlockCopyCommon(virDomainObjPt
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
|
@ -1,712 +0,0 @@
|
||||
commit d99a89592d65ab8adb51d695134bd347648d825f
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:40:18 2018 +0200
|
||||
|
||||
Revert "Switch from yajl to Jansson"
|
||||
|
||||
This reverts commit 9cf38263d05ca7f27dbbd9b1a0b48d338d9280e2.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/libvirt.spec.in
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/libvirt.spec.in
|
||||
+++ libvirt-4.6.0/libvirt.spec.in
|
||||
@@ -292,7 +292,7 @@ BuildRequires: libblkid-devel >= 2.17
|
||||
BuildRequires: augeas
|
||||
BuildRequires: systemd-devel >= 185
|
||||
BuildRequires: libpciaccess-devel >= 0.10.9
|
||||
-BuildRequires: jansson-devel
|
||||
+BuildRequires: yajl-devel
|
||||
%if %{with_sanlock}
|
||||
BuildRequires: sanlock-devel >= 2.4
|
||||
%endif
|
||||
@@ -1226,7 +1226,7 @@ rm -f po/stamp-po
|
||||
--without-apparmor \
|
||||
--without-hal \
|
||||
--with-udev \
|
||||
- --with-jansson \
|
||||
+ --with-yajl \
|
||||
%{?arg_sanlock} \
|
||||
--with-libpcap \
|
||||
--with-macvtap \
|
||||
Index: libvirt-4.6.0/m4/virt-nss.m4
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/m4/virt-nss.m4
|
||||
+++ libvirt-4.6.0/m4/virt-nss.m4
|
||||
@@ -27,9 +27,9 @@ AC_DEFUN([LIBVIRT_CHECK_NSS],[
|
||||
bsd_nss=no
|
||||
fail=0
|
||||
if test "x$with_nss_plugin" != "xno" ; then
|
||||
- if test "x$with_jansson" != "xyes" ; then
|
||||
+ if test "x$with_yajl" != "xyes" ; then
|
||||
if test "x$with_nss_plugin" = "xyes" ; then
|
||||
- AC_MSG_ERROR([Can't build nss plugin without JSON support])
|
||||
+ AC_MSG_ERROR([Can't build nss plugin without yajl])
|
||||
else
|
||||
with_nss_plugin=no
|
||||
fi
|
||||
Index: libvirt-4.6.0/m4/virt-yajl.m4
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/m4/virt-yajl.m4
|
||||
+++ libvirt-4.6.0/m4/virt-yajl.m4
|
||||
@@ -23,10 +23,31 @@ AC_DEFUN([LIBVIRT_ARG_YAJL],[
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_YAJL],[
|
||||
dnl YAJL JSON library http://lloyd.github.com/yajl/
|
||||
- if test "$with_yajl" = yes; then
|
||||
- AC_MSG_ERROR([Compilation with YAJL is no longer supported])
|
||||
+ if test "$with_qemu:$with_yajl" = yes:check; then
|
||||
+ dnl Some versions of qemu require the use of yajl; try to detect them
|
||||
+ dnl here, although we do not require qemu to exist in order to compile.
|
||||
+ dnl This check mirrors src/qemu/qemu_capabilities.c
|
||||
+ AC_PATH_PROGS([QEMU], [qemu-kvm qemu kvm qemu-system-x86_64],
|
||||
+ [], [$PATH:/usr/bin:/usr/libexec])
|
||||
+ if test -x "$QEMU"; then
|
||||
+ if $QEMU -help 2>/dev/null | grep -q libvirt; then
|
||||
+ with_yajl=yes
|
||||
+ else
|
||||
+ [qemu_version_sed='s/.*ersion \([0-9.,]*\).*/\1/']
|
||||
+ qemu_version=`$QEMU -version | sed "$qemu_version_sed"`
|
||||
+ case $qemu_version in
|
||||
+ [[1-9]].* | 0.15.* ) with_yajl=yes ;;
|
||||
+ 0.* | '' ) ;;
|
||||
+ *) AC_MSG_ERROR([Unexpected qemu version string]) ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ fi
|
||||
fi
|
||||
- with_yajl=no
|
||||
+
|
||||
+ LIBVIRT_CHECK_LIB_ALT([YAJL], [yajl],
|
||||
+ [yajl_parse_complete], [yajl/yajl_common.h],
|
||||
+ [YAJL2], [yajl],
|
||||
+ [yajl_tree_parse], [yajl/yajl_common.h])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_YAJL],[
|
||||
Index: libvirt-4.6.0/src/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/Makefile.am
|
||||
+++ libvirt-4.6.0/src/Makefile.am
|
||||
@@ -544,7 +544,7 @@ libvirt_admin_la_CFLAGS = \
|
||||
libvirt_admin_la_CFLAGS += \
|
||||
$(XDR_CFLAGS) \
|
||||
$(CAPNG_CFLAGS) \
|
||||
- $(JANSSON_CFLAGS) \
|
||||
+ $(YAJL_CFLAGS) \
|
||||
$(SSH2_CFLAGS) \
|
||||
$(SASL_CFLAGS) \
|
||||
$(GNUTLS_CFLAGS) \
|
||||
@@ -552,7 +552,7 @@ libvirt_admin_la_CFLAGS += \
|
||||
|
||||
libvirt_admin_la_LIBADD += \
|
||||
$(CAPNG_LIBS) \
|
||||
- $(JANSSON_LIBS) \
|
||||
+ $(YAJL_LIBS) \
|
||||
$(DEVMAPPER_LIBS) \
|
||||
$(LIBXML_LIBS) \
|
||||
$(SSH2_LIBS) \
|
||||
@@ -994,14 +994,14 @@ libvirt_nss_la_SOURCES = \
|
||||
libvirt_nss_la_CFLAGS = \
|
||||
-DLIBVIRT_NSS \
|
||||
$(AM_CFLAGS) \
|
||||
- $(JANSSON_CFLAGS) \
|
||||
+ $(YAJL_CFLAGS) \
|
||||
$(NULL)
|
||||
libvirt_nss_la_LDFLAGS = \
|
||||
$(AM_LDFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
libvirt_nss_la_LIBADD = \
|
||||
- $(JANSSON_LIBS) \
|
||||
+ $(YAJL_LIBS) \
|
||||
$(NULL)
|
||||
endif WITH_NSS
|
||||
|
||||
Index: libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/qemu/qemu_driver.c
|
||||
+++ libvirt-4.6.0/src/qemu/qemu_driver.c
|
||||
@@ -2092,7 +2092,7 @@ qemuDomainReboot(virDomainPtr dom, unsig
|
||||
*/
|
||||
if ((!useAgent) ||
|
||||
(ret < 0 && (acpiRequested || !flags))) {
|
||||
-#if !WITH_JANSSON
|
||||
+#if !WITH_YAJL
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("ACPI reboot is not supported without the JSON monitor"));
|
||||
goto endjob;
|
||||
Index: libvirt-4.6.0/src/util/Makefile.inc.am
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/Makefile.inc.am
|
||||
+++ libvirt-4.6.0/src/util/Makefile.inc.am
|
||||
@@ -251,7 +251,7 @@ libvirt_util_la_SOURCES = \
|
||||
$(NULL)
|
||||
libvirt_util_la_CFLAGS = \
|
||||
$(CAPNG_CFLAGS) \
|
||||
- $(JANSSON_CFLAGS) \
|
||||
+ $(YAJL_CFLAGS) \
|
||||
$(LIBNL_CFLAGS) \
|
||||
$(AM_CFLAGS) \
|
||||
$(AUDIT_CFLAGS) \
|
||||
@@ -264,7 +264,7 @@ libvirt_util_la_CFLAGS = \
|
||||
$(NULL)
|
||||
libvirt_util_la_LIBADD = \
|
||||
$(CAPNG_LIBS) \
|
||||
- $(JANSSON_LIBS) \
|
||||
+ $(YAJL_LIBS) \
|
||||
$(LIBNL_LIBS) \
|
||||
$(THREAD_LIBS) \
|
||||
$(AUDIT_LIBS) \
|
||||
Index: libvirt-4.6.0/src/util/virjson.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/virjson.c
|
||||
+++ libvirt-4.6.0/src/util/virjson.c
|
||||
@@ -1985,217 +1985,6 @@ virJSONValueToString(virJSONValuePtr obj
|
||||
}
|
||||
|
||||
|
||||
-#elif WITH_JANSSON
|
||||
-# include <jansson.h>
|
||||
-
|
||||
-static virJSONValuePtr
|
||||
-virJSONValueFromJansson(json_t *json)
|
||||
-{
|
||||
- virJSONValuePtr ret = NULL;
|
||||
- const char *key;
|
||||
- json_t *cur;
|
||||
- size_t i;
|
||||
-
|
||||
- switch (json_typeof(json)) {
|
||||
- case JSON_OBJECT:
|
||||
- ret = virJSONValueNewObject();
|
||||
- if (!ret)
|
||||
- goto error;
|
||||
-
|
||||
- json_object_foreach(json, key, cur) {
|
||||
- virJSONValuePtr val = virJSONValueFromJansson(cur);
|
||||
- if (!val)
|
||||
- goto error;
|
||||
-
|
||||
- if (virJSONValueObjectAppend(ret, key, val) < 0) {
|
||||
- virJSONValueFree(val);
|
||||
- goto error;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- break;
|
||||
-
|
||||
- case JSON_ARRAY:
|
||||
- ret = virJSONValueNewArray();
|
||||
- if (!ret)
|
||||
- goto error;
|
||||
-
|
||||
- json_array_foreach(json, i, cur) {
|
||||
- virJSONValuePtr val = virJSONValueFromJansson(cur);
|
||||
- if (!val)
|
||||
- goto error;
|
||||
-
|
||||
- if (virJSONValueArrayAppend(ret, val) < 0) {
|
||||
- virJSONValueFree(val);
|
||||
- goto error;
|
||||
- }
|
||||
- }
|
||||
- break;
|
||||
-
|
||||
- case JSON_STRING:
|
||||
- ret = virJSONValueNewString(json_string_value(json));
|
||||
- break;
|
||||
-
|
||||
- case JSON_INTEGER:
|
||||
- ret = virJSONValueNewNumberLong(json_integer_value(json));
|
||||
- break;
|
||||
-
|
||||
- case JSON_REAL:
|
||||
- ret = virJSONValueNewNumberDouble(json_real_value(json));
|
||||
- break;
|
||||
-
|
||||
- case JSON_TRUE:
|
||||
- ret = virJSONValueNewBoolean(true);
|
||||
- break;
|
||||
-
|
||||
- case JSON_FALSE:
|
||||
- ret = virJSONValueNewBoolean(false);
|
||||
- break;
|
||||
-
|
||||
- case JSON_NULL:
|
||||
- ret = virJSONValueNewNull();
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- return ret;
|
||||
-
|
||||
- error:
|
||||
- virJSONValueFree(ret);
|
||||
- return NULL;
|
||||
-}
|
||||
-
|
||||
-virJSONValuePtr
|
||||
-virJSONValueFromString(const char *jsonstring)
|
||||
-{
|
||||
- virJSONValuePtr ret = NULL;
|
||||
- json_t *json;
|
||||
- json_error_t error;
|
||||
- size_t flags = JSON_REJECT_DUPLICATES |
|
||||
- JSON_DECODE_ANY;
|
||||
-
|
||||
- if (!(json = json_loads(jsonstring, flags, &error))) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
- _("failed to parse JSON %d:%d: %s"),
|
||||
- error.line, error.column, error.text);
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
- ret = virJSONValueFromJansson(json);
|
||||
- json_decref(json);
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static json_t *
|
||||
-virJSONValueToJansson(virJSONValuePtr object)
|
||||
-{
|
||||
- json_t *ret = NULL;
|
||||
- size_t i;
|
||||
-
|
||||
- switch ((virJSONType)object->type) {
|
||||
- case VIR_JSON_TYPE_OBJECT:
|
||||
- ret = json_object();
|
||||
- if (!ret)
|
||||
- goto no_memory;
|
||||
- for (i = 0; i < object->data.object.npairs; i++) {
|
||||
- virJSONObjectPairPtr cur = object->data.object.pairs + i;
|
||||
- json_t *val = virJSONValueToJansson(cur->value);
|
||||
-
|
||||
- if (!val)
|
||||
- goto error;
|
||||
- if (json_object_set_new(ret, cur->key, val) < 0) {
|
||||
- json_decref(val);
|
||||
- goto no_memory;
|
||||
- }
|
||||
- }
|
||||
- break;
|
||||
-
|
||||
- case VIR_JSON_TYPE_ARRAY:
|
||||
- ret = json_array();
|
||||
- if (!ret)
|
||||
- goto no_memory;
|
||||
- for (i = 0; i < object->data.array.nvalues; i++) {
|
||||
- virJSONValuePtr cur = object->data.array.values[i];
|
||||
- json_t *val = virJSONValueToJansson(cur);
|
||||
-
|
||||
- if (!val)
|
||||
- goto error;
|
||||
- if (json_array_append_new(ret, val) < 0) {
|
||||
- json_decref(val);
|
||||
- goto no_memory;
|
||||
- }
|
||||
- }
|
||||
- break;
|
||||
-
|
||||
- case VIR_JSON_TYPE_STRING:
|
||||
- ret = json_string(object->data.string);
|
||||
- break;
|
||||
-
|
||||
- case VIR_JSON_TYPE_NUMBER: {
|
||||
- long long ll_val;
|
||||
- double d_val;
|
||||
- if (virStrToLong_ll(object->data.number, NULL, 10, &ll_val) < 0) {
|
||||
- if (virStrToDouble(object->data.number, NULL, &d_val) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("JSON value is not a number"));
|
||||
- return NULL;
|
||||
- }
|
||||
- ret = json_real(d_val);
|
||||
- } else {
|
||||
- ret = json_integer(ll_val);
|
||||
- }
|
||||
- }
|
||||
- break;
|
||||
-
|
||||
- case VIR_JSON_TYPE_BOOLEAN:
|
||||
- ret = json_boolean(object->data.boolean);
|
||||
- break;
|
||||
-
|
||||
- case VIR_JSON_TYPE_NULL:
|
||||
- ret = json_null();
|
||||
- break;
|
||||
-
|
||||
- default:
|
||||
- virReportEnumRangeError(virJSONType, object->type);
|
||||
- goto error;
|
||||
- }
|
||||
- if (!ret)
|
||||
- goto no_memory;
|
||||
- return ret;
|
||||
-
|
||||
- no_memory:
|
||||
- virReportOOMError();
|
||||
- error:
|
||||
- json_decref(ret);
|
||||
- return NULL;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-char *
|
||||
-virJSONValueToString(virJSONValuePtr object,
|
||||
- bool pretty)
|
||||
-{
|
||||
- size_t flags = JSON_ENCODE_ANY;
|
||||
- json_t *json;
|
||||
- char *str = NULL;
|
||||
-
|
||||
- if (pretty)
|
||||
- flags |= JSON_INDENT(2);
|
||||
- else
|
||||
- flags |= JSON_COMPACT;
|
||||
-
|
||||
- json = virJSONValueToJansson(object);
|
||||
- if (!json)
|
||||
- return NULL;
|
||||
-
|
||||
- str = json_dumps(json, flags);
|
||||
- if (!str)
|
||||
- virReportOOMError();
|
||||
- json_decref(json);
|
||||
- return str;
|
||||
-}
|
||||
-
|
||||
-
|
||||
#else
|
||||
virJSONValuePtr
|
||||
virJSONValueFromString(const char *jsonstring ATTRIBUTE_UNUSED)
|
||||
Index: libvirt-4.6.0/tests/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/Makefile.am
|
||||
+++ libvirt-4.6.0/tests/Makefile.am
|
||||
@@ -46,7 +46,7 @@ AM_CFLAGS = \
|
||||
$(SASL_CFLAGS) \
|
||||
$(SELINUX_CFLAGS) \
|
||||
$(APPARMOR_CFLAGS) \
|
||||
- $(JANSSON_CFLAGS) \
|
||||
+ $(YAJL_CFLAGS) \
|
||||
$(COVERAGE_CFLAGS) \
|
||||
$(XDR_CFLAGS) \
|
||||
$(WARN_CFLAGS)
|
||||
@@ -331,9 +331,9 @@ if WITH_CIL
|
||||
test_programs += objectlocking
|
||||
endif WITH_CIL
|
||||
|
||||
-if WITH_JANSSON
|
||||
+if WITH_YAJL
|
||||
test_programs += virjsontest
|
||||
-endif WITH_JANSSON
|
||||
+endif WITH_YAJL
|
||||
|
||||
test_programs += \
|
||||
networkxml2xmltest \
|
||||
@@ -1219,15 +1219,15 @@ virdeterministichashmock_la_LIBADD = $(M
|
||||
|
||||
test_libraries += virdeterministichashmock.la
|
||||
|
||||
-if WITH_JANSSON
|
||||
+if WITH_YAJL
|
||||
virmacmaptest_SOURCES = \
|
||||
virmacmaptest.c testutils.h testutils.c
|
||||
virmacmaptest_LDADD = $(LDADDS)
|
||||
|
||||
test_programs += virmacmaptest
|
||||
-else ! WITH_JANSSON
|
||||
+else ! WITH_YAJL
|
||||
EXTRA_DIST += virmacmaptest.c
|
||||
-endif ! WITH_JANSSON
|
||||
+endif ! WITH_YAJL
|
||||
|
||||
virnetdevtest_SOURCES = \
|
||||
virnetdevtest.c testutils.h testutils.c
|
||||
Index: libvirt-4.6.0/tests/cputest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/cputest.c
|
||||
+++ libvirt-4.6.0/tests/cputest.c
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "cpu/cpu_map.h"
|
||||
#include "virstring.h"
|
||||
|
||||
-#if WITH_QEMU && WITH_JANSSON
|
||||
+#if WITH_QEMU && WITH_YAJL
|
||||
# include "testutilsqemu.h"
|
||||
# include "qemumonitortestutils.h"
|
||||
# define __QEMU_CAPSPRIV_H_ALLOW__
|
||||
@@ -67,7 +67,7 @@ struct data {
|
||||
int result;
|
||||
};
|
||||
|
||||
-#if WITH_QEMU && WITH_JANSSON
|
||||
+#if WITH_QEMU && WITH_YAJL
|
||||
static virQEMUDriver driver;
|
||||
#endif
|
||||
|
||||
@@ -479,7 +479,7 @@ typedef enum {
|
||||
JSON_MODELS_REQUIRED,
|
||||
} cpuTestCPUIDJson;
|
||||
|
||||
-#if WITH_QEMU && WITH_JANSSON
|
||||
+#if WITH_QEMU && WITH_YAJL
|
||||
static virQEMUCapsPtr
|
||||
cpuTestMakeQEMUCaps(const struct data *data)
|
||||
{
|
||||
@@ -554,7 +554,7 @@ cpuTestGetCPUModels(const struct data *d
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#else /* if WITH_QEMU && WITH_JANSSON */
|
||||
+#else /* if WITH_QEMU && WITH_YAJL */
|
||||
|
||||
static int
|
||||
cpuTestGetCPUModels(const struct data *data,
|
||||
@@ -834,7 +834,7 @@ cpuTestUpdateLive(const void *arg)
|
||||
}
|
||||
|
||||
|
||||
-#if WITH_QEMU && WITH_JANSSON
|
||||
+#if WITH_QEMU && WITH_YAJL
|
||||
static int
|
||||
cpuTestJSONCPUID(const void *arg)
|
||||
{
|
||||
@@ -911,7 +911,7 @@ mymain(void)
|
||||
virDomainCapsCPUModelsPtr ppc_models = NULL;
|
||||
int ret = 0;
|
||||
|
||||
-#if WITH_QEMU && WITH_JANSSON
|
||||
+#if WITH_QEMU && WITH_YAJL
|
||||
if (qemuTestDriverInit(&driver) < 0)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
@@ -1004,7 +1004,7 @@ mymain(void)
|
||||
host "/" cpu " (" #models ")", \
|
||||
host, cpu, models, 0, result)
|
||||
|
||||
-#if WITH_QEMU && WITH_JANSSON
|
||||
+#if WITH_QEMU && WITH_YAJL
|
||||
# define DO_TEST_JSON(arch, host, json) \
|
||||
do { \
|
||||
if (json == JSON_MODELS) { \
|
||||
@@ -1205,7 +1205,7 @@ mymain(void)
|
||||
DO_TEST_CPUID(VIR_ARCH_X86_64, "Xeon-X5460", JSON_NONE);
|
||||
|
||||
cleanup:
|
||||
-#if WITH_QEMU && WITH_JANSSON
|
||||
+#if WITH_QEMU && WITH_YAJL
|
||||
qemuTestDriverFree(&driver);
|
||||
#endif
|
||||
|
||||
Index: libvirt-4.6.0/tests/libxlxml2domconfigtest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/libxlxml2domconfigtest.c
|
||||
+++ libvirt-4.6.0/tests/libxlxml2domconfigtest.c
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "testutils.h"
|
||||
|
||||
-#if defined(WITH_LIBXL) && defined(WITH_JANSSON) && defined(HAVE_LIBXL_DOMAIN_CONFIG_FROM_JSON)
|
||||
+#if defined(WITH_LIBXL) && defined(WITH_YAJL) && defined(HAVE_LIBXL_DOMAIN_CONFIG_FROM_JSON)
|
||||
|
||||
# include "internal.h"
|
||||
# include "viralloc.h"
|
||||
@@ -228,4 +228,4 @@ int main(void)
|
||||
return EXIT_AM_SKIP;
|
||||
}
|
||||
|
||||
-#endif /* WITH_LIBXL && WITH_JANSSON && HAVE_LIBXL_DOMAIN_CONFIG_FROM_JSON */
|
||||
+#endif /* WITH_LIBXL && WITH_YAJL && HAVE_LIBXL_DOMAIN_CONFIG_FROM_JSON */
|
||||
Index: libvirt-4.6.0/tests/qemuagenttest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemuagenttest.c
|
||||
+++ libvirt-4.6.0/tests/qemuagenttest.c
|
||||
@@ -907,7 +907,7 @@ mymain(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
-#if !WITH_JANSSON
|
||||
+#if !WITH_YAJL
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
#endif
|
||||
Index: libvirt-4.6.0/tests/qemublocktest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemublocktest.c
|
||||
+++ libvirt-4.6.0/tests/qemublocktest.c
|
||||
@@ -309,7 +309,6 @@ testQemuDiskXMLToPropsValidateFile(const
|
||||
goto cleanup;
|
||||
|
||||
virBufferAdd(&buf, jsonstr, -1);
|
||||
- virBufferAddLit(&buf, "\n");
|
||||
VIR_FREE(jsonstr);
|
||||
}
|
||||
|
||||
Index: libvirt-4.6.0/tests/qemucapabilitiestest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemucapabilitiestest.c
|
||||
+++ libvirt-4.6.0/tests/qemucapabilitiestest.c
|
||||
@@ -141,7 +141,7 @@ mymain(void)
|
||||
int ret = 0;
|
||||
testQemuData data;
|
||||
|
||||
-#if !WITH_JANSSON
|
||||
+#if !WITH_YAJL
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
#endif
|
||||
Index: libvirt-4.6.0/tests/qemucaps2xmltest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemucaps2xmltest.c
|
||||
+++ libvirt-4.6.0/tests/qemucaps2xmltest.c
|
||||
@@ -165,7 +165,7 @@ mymain(void)
|
||||
|
||||
testQemuData data;
|
||||
|
||||
-#if !WITH_JANSSON
|
||||
+#if !WITH_YAJL
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
#endif
|
||||
Index: libvirt-4.6.0/tests/qemucommandutiltest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemucommandutiltest.c
|
||||
+++ libvirt-4.6.0/tests/qemucommandutiltest.c
|
||||
@@ -76,7 +76,7 @@ mymain(void)
|
||||
int ret = 0;
|
||||
testQemuCommandBuildObjectFromJSONData data1;
|
||||
|
||||
-#if !WITH_JANSSON
|
||||
+#if !WITH_YAJL
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
#endif
|
||||
Index: libvirt-4.6.0/tests/qemuhotplugtest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemuhotplugtest.c
|
||||
+++ libvirt-4.6.0/tests/qemuhotplugtest.c
|
||||
@@ -593,7 +593,7 @@ mymain(void)
|
||||
struct qemuHotplugTestData data = {0};
|
||||
struct testQemuHotplugCpuParams cpudata;
|
||||
|
||||
-#if !WITH_JANSSON
|
||||
+#if !WITH_YAJL
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
#endif
|
||||
Index: libvirt-4.6.0/tests/qemumigparamsdata/empty.json
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemumigparamsdata/empty.json
|
||||
+++ libvirt-4.6.0/tests/qemumigparamsdata/empty.json
|
||||
@@ -1 +1,3 @@
|
||||
-{}
|
||||
+{
|
||||
+
|
||||
+}
|
||||
Index: libvirt-4.6.0/tests/qemumigparamsdata/unsupported.json
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemumigparamsdata/unsupported.json
|
||||
+++ libvirt-4.6.0/tests/qemumigparamsdata/unsupported.json
|
||||
@@ -1 +1,3 @@
|
||||
-{}
|
||||
+{
|
||||
+
|
||||
+}
|
||||
Index: libvirt-4.6.0/tests/qemumigparamstest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemumigparamstest.c
|
||||
+++ libvirt-4.6.0/tests/qemumigparamstest.c
|
||||
@@ -203,7 +203,7 @@ mymain(void)
|
||||
virQEMUDriver driver;
|
||||
int ret = 0;
|
||||
|
||||
-#if !WITH_JANSSON
|
||||
+#if !WITH_YAJL
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
#endif
|
||||
Index: libvirt-4.6.0/tests/qemumonitorjsontest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/qemumonitorjsontest.c
|
||||
+++ libvirt-4.6.0/tests/qemumonitorjsontest.c
|
||||
@@ -2863,7 +2863,7 @@ mymain(void)
|
||||
virJSONValuePtr metaschema = NULL;
|
||||
char *metaschemastr = NULL;
|
||||
|
||||
-#if !WITH_JANSSON
|
||||
+#if !WITH_YAJL
|
||||
fputs("libvirt not compiled with JSON support, skipping this test\n", stderr);
|
||||
return EXIT_AM_SKIP;
|
||||
#endif
|
||||
Index: libvirt-4.6.0/tests/virmacmaptestdata/empty.json
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/virmacmaptestdata/empty.json
|
||||
+++ libvirt-4.6.0/tests/virmacmaptestdata/empty.json
|
||||
@@ -1 +1,3 @@
|
||||
-[]
|
||||
+[
|
||||
+
|
||||
+]
|
||||
Index: libvirt-4.6.0/tests/virmocklibxl.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/virmocklibxl.c
|
||||
+++ libvirt-4.6.0/tests/virmocklibxl.c
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
-#if defined(WITH_LIBXL) && defined(WITH_JANSSON)
|
||||
+#if defined(WITH_LIBXL) && defined(WITH_YAJL)
|
||||
# include "virmock.h"
|
||||
# include <sys/stat.h>
|
||||
# include <unistd.h>
|
||||
@@ -136,4 +136,4 @@ VIR_MOCK_IMPL_RET_ARGS(stat, int,
|
||||
return real_stat(path, sb);
|
||||
}
|
||||
|
||||
-#endif /* WITH_LIBXL && WITH_JANSSON */
|
||||
+#endif /* WITH_LIBXL && WITH_YAJL */
|
||||
Index: libvirt-4.6.0/tests/virnetdaemontest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/virnetdaemontest.c
|
||||
+++ libvirt-4.6.0/tests/virnetdaemontest.c
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_RPC
|
||||
|
||||
-#if defined(HAVE_SOCKETPAIR) && defined(WITH_JANSSON)
|
||||
+#if defined(HAVE_SOCKETPAIR) && defined(WITH_YAJL)
|
||||
struct testClientPriv {
|
||||
int magic;
|
||||
};
|
||||
Index: libvirt-4.6.0/tests/virstoragetest.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/virstoragetest.c
|
||||
+++ libvirt-4.6.0/tests/virstoragetest.c
|
||||
@@ -1317,7 +1317,7 @@ mymain(void)
|
||||
" <host name='example.org' port='6000'/>\n"
|
||||
"</source>\n");
|
||||
|
||||
-#ifdef WITH_JANSSON
|
||||
+#ifdef WITH_YAJL
|
||||
TEST_BACKING_PARSE("json:", NULL);
|
||||
TEST_BACKING_PARSE("json:asdgsdfg", NULL);
|
||||
TEST_BACKING_PARSE("json:{}", NULL);
|
||||
@@ -1581,7 +1581,7 @@ mymain(void)
|
||||
"<source protocol='vxhs' name='c6718f6b-0401-441d-a8c3-1f0064d75ee0'>\n"
|
||||
" <host name='example.com' port='9999'/>\n"
|
||||
"</source>\n");
|
||||
-#endif /* WITH_JANSSON */
|
||||
+#endif /* WITH_YAJL */
|
||||
|
||||
cleanup:
|
||||
/* Final cleanup */
|
115
e39c66d3-libxl-fix-p2p-migration.patch
Normal file
115
e39c66d3-libxl-fix-p2p-migration.patch
Normal file
@ -0,0 +1,115 @@
|
||||
commit e39c66d3ce3e65170a1db1324eb1fb8e57d82ecb
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Tue Aug 28 17:13:54 2018 -0600
|
||||
|
||||
libxl: fix logic in P2P migration
|
||||
|
||||
libxlDoMigrateSrcP2P() performs all phases of the migration
|
||||
protocol for peer-to-peer migration. Unfortunately the logic
|
||||
was a bit flawed since it is possible to skip the confirm
|
||||
phase after a successfull begin and prepare phase. Fix the
|
||||
logic to always call the confirm phase after a successful begin
|
||||
and perform. Skip the confirm phase if begin or perform fail.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_migration.c
|
||||
===================================================================
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_migration.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_migration.c
|
||||
@@ -972,21 +972,13 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
char *cookieout = NULL;
|
||||
int cookieoutlen;
|
||||
bool cancelled = true;
|
||||
+ bool notify_source = true;
|
||||
virErrorPtr orig_err = NULL;
|
||||
int ret = -1;
|
||||
/* For tunnel migration */
|
||||
virStreamPtr st = NULL;
|
||||
struct libxlTunnelControl *tc = NULL;
|
||||
|
||||
- dom_xml = libxlDomainMigrationSrcBegin(sconn, vm, xmlin,
|
||||
- &cookieout, &cookieoutlen);
|
||||
- if (!dom_xml)
|
||||
- goto cleanup;
|
||||
-
|
||||
- if (virTypedParamsAddString(¶ms, &nparams, &maxparams,
|
||||
- VIR_MIGRATE_PARAM_DEST_XML, dom_xml) < 0)
|
||||
- goto cleanup;
|
||||
-
|
||||
if (dname &&
|
||||
virTypedParamsAddString(¶ms, &nparams, &maxparams,
|
||||
VIR_MIGRATE_PARAM_DEST_NAME, dname) < 0)
|
||||
@@ -997,6 +989,19 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
VIR_MIGRATE_PARAM_URI, uri) < 0)
|
||||
goto cleanup;
|
||||
|
||||
+ dom_xml = libxlDomainMigrationSrcBegin(sconn, vm, xmlin,
|
||||
+ &cookieout, &cookieoutlen);
|
||||
+ /*
|
||||
+ * If dom_xml is non-NULL the begin phase has succeeded, and the
|
||||
+ * confirm phase must be called to cleanup the migration operation.
|
||||
+ */
|
||||
+ if (!dom_xml)
|
||||
+ goto cleanup;
|
||||
+
|
||||
+ if (virTypedParamsAddString(¶ms, &nparams, &maxparams,
|
||||
+ VIR_MIGRATE_PARAM_DEST_XML, dom_xml) < 0)
|
||||
+ goto confirm;
|
||||
+
|
||||
/* We don't require the destination to have P2P support
|
||||
* as it looks to be normal migration from the receiver perpective.
|
||||
*/
|
||||
@@ -1006,7 +1011,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
virObjectUnlock(vm);
|
||||
if (flags & VIR_MIGRATE_TUNNELLED) {
|
||||
if (!(st = virStreamNew(dconn, 0)))
|
||||
- goto cleanup;
|
||||
+ goto confirm;
|
||||
ret = dconn->driver->domainMigratePrepareTunnel3Params
|
||||
(dconn, st, params, nparams, cookieout, cookieoutlen, NULL, NULL, destflags);
|
||||
} else {
|
||||
@@ -1016,7 +1021,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
virObjectLock(vm);
|
||||
|
||||
if (ret == -1)
|
||||
- goto cleanup;
|
||||
+ goto confirm;
|
||||
|
||||
if (!(flags & VIR_MIGRATE_TUNNELLED)) {
|
||||
if (uri_out) {
|
||||
@@ -1038,8 +1043,10 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
else
|
||||
ret = libxlDomainMigrationSrcPerform(driver, vm, NULL, NULL,
|
||||
uri_out, NULL, flags);
|
||||
- if (ret < 0)
|
||||
+ if (ret < 0) {
|
||||
+ notify_source = false;
|
||||
orig_err = virSaveLastError();
|
||||
+ }
|
||||
|
||||
cancelled = (ret < 0);
|
||||
|
||||
@@ -1067,12 +1074,15 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
if (!orig_err)
|
||||
orig_err = virSaveLastError();
|
||||
|
||||
- VIR_DEBUG("Confirm3 cancelled=%d vm=%p", cancelled, vm);
|
||||
- ret = libxlDomainMigrationSrcConfirm(driver, vm, flags, cancelled);
|
||||
-
|
||||
- if (ret < 0)
|
||||
- VIR_WARN("Guest %s probably left in 'paused' state on source",
|
||||
- vm->def->name);
|
||||
+ confirm:
|
||||
+ if (notify_source) {
|
||||
+ VIR_DEBUG("Confirm3 cancelled=%d vm=%p", cancelled, vm);
|
||||
+ ret = libxlDomainMigrationSrcConfirm(driver, vm, flags, cancelled);
|
||||
+
|
||||
+ if (ret < 0)
|
||||
+ VIR_WARN("Guest %s probably left in 'paused' state on source",
|
||||
+ vm->def->name);
|
||||
+ }
|
||||
|
||||
cleanup:
|
||||
if (flags & VIR_MIGRATE_TUNNELLED) {
|
@ -1,570 +0,0 @@
|
||||
commit e96e71d8d07eff9324f4df059dfcebaf0fe2eda9
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:40:11 2018 +0200
|
||||
|
||||
Revert "Remove functions using yajl"
|
||||
|
||||
This reverts commit bf114decb34f21cd225ead6dc4d929d35a8c5fe5.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/src/util/virjson.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/virjson.c
|
||||
+++ libvirt-4.6.0/src/util/virjson.c
|
||||
@@ -29,6 +29,22 @@
|
||||
#include "virstring.h"
|
||||
#include "virutil.h"
|
||||
|
||||
+#if WITH_YAJL
|
||||
+# include <yajl/yajl_gen.h>
|
||||
+# include <yajl/yajl_parse.h>
|
||||
+
|
||||
+# ifdef WITH_YAJL2
|
||||
+# define yajl_size_t size_t
|
||||
+# define VIR_YAJL_STATUS_OK(status) ((status) == yajl_status_ok)
|
||||
+# else
|
||||
+# define yajl_size_t unsigned int
|
||||
+# define yajl_complete_parse yajl_parse_complete
|
||||
+# define VIR_YAJL_STATUS_OK(status) \
|
||||
+ ((status) == yajl_status_ok || (status) == yajl_status_insufficient_data)
|
||||
+# endif
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
/* XXX fixme */
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
@@ -72,6 +88,23 @@ struct _virJSONValue {
|
||||
};
|
||||
|
||||
|
||||
+typedef struct _virJSONParserState virJSONParserState;
|
||||
+typedef virJSONParserState *virJSONParserStatePtr;
|
||||
+struct _virJSONParserState {
|
||||
+ virJSONValuePtr value;
|
||||
+ char *key;
|
||||
+};
|
||||
+
|
||||
+typedef struct _virJSONParser virJSONParser;
|
||||
+typedef virJSONParser *virJSONParserPtr;
|
||||
+struct _virJSONParser {
|
||||
+ virJSONValuePtr head;
|
||||
+ virJSONParserStatePtr state;
|
||||
+ size_t nstate;
|
||||
+ int wrap;
|
||||
+};
|
||||
+
|
||||
+
|
||||
virJSONType
|
||||
virJSONValueGetType(const virJSONValue *value)
|
||||
{
|
||||
@@ -1458,7 +1491,501 @@ virJSONValueCopy(const virJSONValue *in)
|
||||
}
|
||||
|
||||
|
||||
-#if WITH_JANSSON
|
||||
+#if WITH_YAJL
|
||||
+static int
|
||||
+virJSONParserInsertValue(virJSONParserPtr parser,
|
||||
+ virJSONValuePtr value)
|
||||
+{
|
||||
+ if (!parser->head) {
|
||||
+ parser->head = value;
|
||||
+ } else {
|
||||
+ virJSONParserStatePtr state;
|
||||
+ if (!parser->nstate) {
|
||||
+ VIR_DEBUG("got a value to insert without a container");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ state = &parser->state[parser->nstate-1];
|
||||
+
|
||||
+ switch (state->value->type) {
|
||||
+ case VIR_JSON_TYPE_OBJECT: {
|
||||
+ if (!state->key) {
|
||||
+ VIR_DEBUG("missing key when inserting object value");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (virJSONValueObjectAppend(state->value,
|
||||
+ state->key,
|
||||
+ value) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ VIR_FREE(state->key);
|
||||
+ } break;
|
||||
+
|
||||
+ case VIR_JSON_TYPE_ARRAY: {
|
||||
+ if (state->key) {
|
||||
+ VIR_DEBUG("unexpected key when inserting array value");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (virJSONValueArrayAppend(state->value,
|
||||
+ value) < 0)
|
||||
+ return -1;
|
||||
+ } break;
|
||||
+
|
||||
+ default:
|
||||
+ VIR_DEBUG("unexpected value type, not a container");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+virJSONParserHandleNull(void *ctx)
|
||||
+{
|
||||
+ virJSONParserPtr parser = ctx;
|
||||
+ virJSONValuePtr value = virJSONValueNewNull();
|
||||
+
|
||||
+ VIR_DEBUG("parser=%p", parser);
|
||||
+
|
||||
+ if (!value)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (virJSONParserInsertValue(parser, value) < 0) {
|
||||
+ virJSONValueFree(value);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+virJSONParserHandleBoolean(void *ctx,
|
||||
+ int boolean_)
|
||||
+{
|
||||
+ virJSONParserPtr parser = ctx;
|
||||
+ virJSONValuePtr value = virJSONValueNewBoolean(boolean_);
|
||||
+
|
||||
+ VIR_DEBUG("parser=%p boolean=%d", parser, boolean_);
|
||||
+
|
||||
+ if (!value)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (virJSONParserInsertValue(parser, value) < 0) {
|
||||
+ virJSONValueFree(value);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+virJSONParserHandleNumber(void *ctx,
|
||||
+ const char *s,
|
||||
+ yajl_size_t l)
|
||||
+{
|
||||
+ virJSONParserPtr parser = ctx;
|
||||
+ char *str;
|
||||
+ virJSONValuePtr value;
|
||||
+
|
||||
+ if (VIR_STRNDUP(str, s, l) < 0)
|
||||
+ return -1;
|
||||
+ value = virJSONValueNewNumber(str);
|
||||
+ VIR_FREE(str);
|
||||
+
|
||||
+ VIR_DEBUG("parser=%p str=%s", parser, str);
|
||||
+
|
||||
+ if (!value)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (virJSONParserInsertValue(parser, value) < 0) {
|
||||
+ virJSONValueFree(value);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+virJSONParserHandleString(void *ctx,
|
||||
+ const unsigned char *stringVal,
|
||||
+ yajl_size_t stringLen)
|
||||
+{
|
||||
+ virJSONParserPtr parser = ctx;
|
||||
+ virJSONValuePtr value = virJSONValueNewStringLen((const char *)stringVal,
|
||||
+ stringLen);
|
||||
+
|
||||
+ VIR_DEBUG("parser=%p str=%p", parser, (const char *)stringVal);
|
||||
+
|
||||
+ if (!value)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (virJSONParserInsertValue(parser, value) < 0) {
|
||||
+ virJSONValueFree(value);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+virJSONParserHandleMapKey(void *ctx,
|
||||
+ const unsigned char *stringVal,
|
||||
+ yajl_size_t stringLen)
|
||||
+{
|
||||
+ virJSONParserPtr parser = ctx;
|
||||
+ virJSONParserStatePtr state;
|
||||
+
|
||||
+ VIR_DEBUG("parser=%p key=%p", parser, (const char *)stringVal);
|
||||
+
|
||||
+ if (!parser->nstate)
|
||||
+ return 0;
|
||||
+
|
||||
+ state = &parser->state[parser->nstate-1];
|
||||
+ if (state->key)
|
||||
+ return 0;
|
||||
+ if (VIR_STRNDUP(state->key, (const char *)stringVal, stringLen) < 0)
|
||||
+ return 0;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+virJSONParserHandleStartMap(void *ctx)
|
||||
+{
|
||||
+ virJSONParserPtr parser = ctx;
|
||||
+ virJSONValuePtr value = virJSONValueNewObject();
|
||||
+
|
||||
+ VIR_DEBUG("parser=%p", parser);
|
||||
+
|
||||
+ if (!value)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (virJSONParserInsertValue(parser, value) < 0) {
|
||||
+ virJSONValueFree(value);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (VIR_REALLOC_N(parser->state,
|
||||
+ parser->nstate + 1) < 0) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ parser->state[parser->nstate].value = value;
|
||||
+ parser->state[parser->nstate].key = NULL;
|
||||
+ parser->nstate++;
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+virJSONParserHandleEndMap(void *ctx)
|
||||
+{
|
||||
+ virJSONParserPtr parser = ctx;
|
||||
+ virJSONParserStatePtr state;
|
||||
+
|
||||
+ VIR_DEBUG("parser=%p", parser);
|
||||
+
|
||||
+ if (!parser->nstate)
|
||||
+ return 0;
|
||||
+
|
||||
+ state = &(parser->state[parser->nstate-1]);
|
||||
+ if (state->key) {
|
||||
+ VIR_FREE(state->key);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ VIR_DELETE_ELEMENT(parser->state, parser->nstate - 1, parser->nstate);
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+virJSONParserHandleStartArray(void *ctx)
|
||||
+{
|
||||
+ virJSONParserPtr parser = ctx;
|
||||
+ virJSONValuePtr value = virJSONValueNewArray();
|
||||
+
|
||||
+ VIR_DEBUG("parser=%p", parser);
|
||||
+
|
||||
+ if (!value)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (virJSONParserInsertValue(parser, value) < 0) {
|
||||
+ virJSONValueFree(value);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (VIR_REALLOC_N(parser->state,
|
||||
+ parser->nstate + 1) < 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ parser->state[parser->nstate].value = value;
|
||||
+ parser->state[parser->nstate].key = NULL;
|
||||
+ parser->nstate++;
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+virJSONParserHandleEndArray(void *ctx)
|
||||
+{
|
||||
+ virJSONParserPtr parser = ctx;
|
||||
+ virJSONParserStatePtr state;
|
||||
+
|
||||
+ VIR_DEBUG("parser=%p", parser);
|
||||
+
|
||||
+ if (!(parser->nstate - parser->wrap))
|
||||
+ return 0;
|
||||
+
|
||||
+ state = &(parser->state[parser->nstate-1]);
|
||||
+ if (state->key) {
|
||||
+ VIR_FREE(state->key);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ VIR_DELETE_ELEMENT(parser->state, parser->nstate - 1, parser->nstate);
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static const yajl_callbacks parserCallbacks = {
|
||||
+ virJSONParserHandleNull,
|
||||
+ virJSONParserHandleBoolean,
|
||||
+ NULL,
|
||||
+ NULL,
|
||||
+ virJSONParserHandleNumber,
|
||||
+ virJSONParserHandleString,
|
||||
+ virJSONParserHandleStartMap,
|
||||
+ virJSONParserHandleMapKey,
|
||||
+ virJSONParserHandleEndMap,
|
||||
+ virJSONParserHandleStartArray,
|
||||
+ virJSONParserHandleEndArray
|
||||
+};
|
||||
+
|
||||
+
|
||||
+/* XXX add an incremental streaming parser - yajl trivially supports it */
|
||||
+virJSONValuePtr
|
||||
+virJSONValueFromString(const char *jsonstring)
|
||||
+{
|
||||
+ yajl_handle hand;
|
||||
+ virJSONParser parser = { NULL, NULL, 0, 0 };
|
||||
+ virJSONValuePtr ret = NULL;
|
||||
+ int rc;
|
||||
+ size_t len = strlen(jsonstring);
|
||||
+# ifndef WITH_YAJL2
|
||||
+ yajl_parser_config cfg = { 0, 1 }; /* Match yajl 2 default behavior */
|
||||
+ VIR_AUTOPTR(virJSONValue) tmp = NULL;
|
||||
+# endif
|
||||
+
|
||||
+ VIR_DEBUG("string=%s", jsonstring);
|
||||
+
|
||||
+# ifdef WITH_YAJL2
|
||||
+ hand = yajl_alloc(&parserCallbacks, NULL, &parser);
|
||||
+# else
|
||||
+ hand = yajl_alloc(&parserCallbacks, &cfg, NULL, &parser);
|
||||
+# endif
|
||||
+ if (!hand) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ _("Unable to create JSON parser"));
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ /* Yajl 2 is nice enough to default to rejecting trailing garbage.
|
||||
+ * Yajl 1.0.12 has yajl_get_bytes_consumed to make that detection
|
||||
+ * simpler. But we're stuck with yajl 1.0.7 on RHEL 6, which
|
||||
+ * happily quits parsing at the end of a valid JSON construct,
|
||||
+ * with no visibility into how much more input remains. Wrapping
|
||||
+ * things in an array forces yajl to confess the truth. */
|
||||
+# ifdef WITH_YAJL2
|
||||
+ rc = yajl_parse(hand, (const unsigned char *)jsonstring, len);
|
||||
+# else
|
||||
+ rc = yajl_parse(hand, (const unsigned char *)"[", 1);
|
||||
+ parser.wrap = 1;
|
||||
+ if (VIR_YAJL_STATUS_OK(rc))
|
||||
+ rc = yajl_parse(hand, (const unsigned char *)jsonstring, len);
|
||||
+ parser.wrap = 0;
|
||||
+ if (VIR_YAJL_STATUS_OK(rc))
|
||||
+ rc = yajl_parse(hand, (const unsigned char *)"]", 1);
|
||||
+# endif
|
||||
+ if (!VIR_YAJL_STATUS_OK(rc) ||
|
||||
+ yajl_complete_parse(hand) != yajl_status_ok) {
|
||||
+ unsigned char *errstr = yajl_get_error(hand, 1,
|
||||
+ (const unsigned char*)jsonstring,
|
||||
+ strlen(jsonstring));
|
||||
+
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
+ _("cannot parse json %s: %s"),
|
||||
+ jsonstring, (const char*) errstr);
|
||||
+ yajl_free_error(hand, errstr);
|
||||
+ virJSONValueFree(parser.head);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ if (parser.nstate != 0) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
+ _("cannot parse json %s: unterminated string/map/array"),
|
||||
+ jsonstring);
|
||||
+ virJSONValueFree(parser.head);
|
||||
+ } else {
|
||||
+ ret = parser.head;
|
||||
+# ifndef WITH_YAJL2
|
||||
+ /* Undo the array wrapping above */
|
||||
+ tmp = ret;
|
||||
+ ret = NULL;
|
||||
+ if (virJSONValueArraySize(tmp) > 1)
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
+ _("cannot parse json %s: too many items present"),
|
||||
+ jsonstring);
|
||||
+ else
|
||||
+ ret = virJSONValueArraySteal(tmp, 0);
|
||||
+# endif
|
||||
+ }
|
||||
+
|
||||
+ cleanup:
|
||||
+ yajl_free(hand);
|
||||
+
|
||||
+ if (parser.nstate) {
|
||||
+ size_t i;
|
||||
+ for (i = 0; i < parser.nstate; i++)
|
||||
+ VIR_FREE(parser.state[i].key);
|
||||
+ VIR_FREE(parser.state);
|
||||
+ }
|
||||
+
|
||||
+ VIR_DEBUG("result=%p", ret);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+virJSONValueToStringOne(virJSONValuePtr object,
|
||||
+ yajl_gen g)
|
||||
+{
|
||||
+ size_t i;
|
||||
+
|
||||
+ VIR_DEBUG("object=%p type=%d gen=%p", object, object->type, g);
|
||||
+
|
||||
+ switch (object->type) {
|
||||
+ case VIR_JSON_TYPE_OBJECT:
|
||||
+ if (yajl_gen_map_open(g) != yajl_gen_status_ok)
|
||||
+ return -1;
|
||||
+ for (i = 0; i < object->data.object.npairs; i++) {
|
||||
+ if (yajl_gen_string(g,
|
||||
+ (unsigned char *)object->data.object.pairs[i].key,
|
||||
+ strlen(object->data.object.pairs[i].key))
|
||||
+ != yajl_gen_status_ok)
|
||||
+ return -1;
|
||||
+ if (virJSONValueToStringOne(object->data.object.pairs[i].value, g) < 0)
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (yajl_gen_map_close(g) != yajl_gen_status_ok)
|
||||
+ return -1;
|
||||
+ break;
|
||||
+ case VIR_JSON_TYPE_ARRAY:
|
||||
+ if (yajl_gen_array_open(g) != yajl_gen_status_ok)
|
||||
+ return -1;
|
||||
+ for (i = 0; i < object->data.array.nvalues; i++) {
|
||||
+ if (virJSONValueToStringOne(object->data.array.values[i], g) < 0)
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (yajl_gen_array_close(g) != yajl_gen_status_ok)
|
||||
+ return -1;
|
||||
+ break;
|
||||
+
|
||||
+ case VIR_JSON_TYPE_STRING:
|
||||
+ if (yajl_gen_string(g, (unsigned char *)object->data.string,
|
||||
+ strlen(object->data.string)) != yajl_gen_status_ok)
|
||||
+ return -1;
|
||||
+ break;
|
||||
+
|
||||
+ case VIR_JSON_TYPE_NUMBER:
|
||||
+ if (yajl_gen_number(g, object->data.number,
|
||||
+ strlen(object->data.number)) != yajl_gen_status_ok)
|
||||
+ return -1;
|
||||
+ break;
|
||||
+
|
||||
+ case VIR_JSON_TYPE_BOOLEAN:
|
||||
+ if (yajl_gen_bool(g, object->data.boolean) != yajl_gen_status_ok)
|
||||
+ return -1;
|
||||
+ break;
|
||||
+
|
||||
+ case VIR_JSON_TYPE_NULL:
|
||||
+ if (yajl_gen_null(g) != yajl_gen_status_ok)
|
||||
+ return -1;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+char *
|
||||
+virJSONValueToString(virJSONValuePtr object,
|
||||
+ bool pretty)
|
||||
+{
|
||||
+ yajl_gen g;
|
||||
+ const unsigned char *str;
|
||||
+ char *ret = NULL;
|
||||
+ yajl_size_t len;
|
||||
+# ifndef WITH_YAJL2
|
||||
+ yajl_gen_config conf = { pretty ? 1 : 0, pretty ? " " : " "};
|
||||
+# endif
|
||||
+
|
||||
+ VIR_DEBUG("object=%p", object);
|
||||
+
|
||||
+# ifdef WITH_YAJL2
|
||||
+ g = yajl_gen_alloc(NULL);
|
||||
+ if (g) {
|
||||
+ yajl_gen_config(g, yajl_gen_beautify, pretty ? 1 : 0);
|
||||
+ yajl_gen_config(g, yajl_gen_indent_string, pretty ? " " : " ");
|
||||
+ yajl_gen_config(g, yajl_gen_validate_utf8, 1);
|
||||
+ }
|
||||
+# else
|
||||
+ g = yajl_gen_alloc(&conf, NULL);
|
||||
+# endif
|
||||
+ if (!g) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ _("Unable to create JSON formatter"));
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ if (virJSONValueToStringOne(object, g) < 0) {
|
||||
+ virReportOOMError();
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ if (yajl_gen_get_buf(g, &str, &len) != yajl_gen_status_ok) {
|
||||
+ virReportOOMError();
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ ignore_value(VIR_STRDUP(ret, (const char *)str));
|
||||
+
|
||||
+ cleanup:
|
||||
+ yajl_gen_free(g);
|
||||
+
|
||||
+ VIR_DEBUG("result=%s", NULLSTR(ret));
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+#elif WITH_JANSSON
|
||||
# include <jansson.h>
|
||||
|
||||
static virJSONValuePtr
|
@ -1,30 +0,0 @@
|
||||
commit f204cf51035f51b979dec18ee526e418139fa874
|
||||
Author: Ján Tomko <jtomko@redhat.com>
|
||||
Date: Mon Aug 13 13:39:39 2018 +0200
|
||||
|
||||
Revert "build: require Jansson if QEMU driver is enabled"
|
||||
|
||||
This reverts commit 01ce04375c3348fd683475e5aa5231149ef6a78a.
|
||||
|
||||
Jansson cannot parse QEMU's quirky JSON.
|
||||
Revert back to yajl.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1614569
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-4.6.0/m4/virt-driver-qemu.m4
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/m4/virt-driver-qemu.m4
|
||||
+++ libvirt-4.6.0/m4/virt-driver-qemu.m4
|
||||
@@ -27,9 +27,6 @@ AC_DEFUN([LIBVIRT_DRIVER_ARG_QEMU], [
|
||||
|
||||
AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [
|
||||
AC_REQUIRE([LIBVIRT_CHECK_JANSSON])
|
||||
- if test "$with_qemu:$with_jansson" = "yes:no"; then
|
||||
- AC_MSG_ERROR([Jansson >= 2.5 is required to build QEMU driver])
|
||||
- fi
|
||||
if test "$with_qemu" = "check"; then
|
||||
with_qemu=$with_jansson
|
||||
fi
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b4ac6cd1825d89b9bbafff53f6308f1ac292a44d78eee67bebe01973e2574066
|
||||
size 14760064
|
@ -1,10 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQEcBAABAgAGBQJbaBZOAAoJEBVYiyZZa+pdHE0H/0RkvhipAOBDymXtIpZyh2tJ
|
||||
m5mLcet12U0b179AsI1BdTVq3/fMgIww+KAd/l823hDd5E2dpUj68vd+n6UFNwU5
|
||||
05go+M7mFuzyZg+iSvfs2YGNeFvmdWGYnPqQdhg984mgnPHgciIG+fIQK8m/ayKy
|
||||
5coETDRp7GjeNX8Cw9Ll8VdgMk79OoS+dRZ+pMKEALyoIrY4IKbXI0vvQsF1hkLg
|
||||
zqmZlHAkwDkONfvrreMXQkjvOd5RVMzXy3mg1pDOdzH8SXusReBHe17uV914n/w3
|
||||
xL/tqkZKvnzYRAVeaYnyfxpCtImOwlmsDpCIYSUQa2VpylOVm/I1JJTPi58qTDs=
|
||||
=fejE
|
||||
-----END PGP SIGNATURE-----
|
3
libvirt-4.7.0.tar.xz
Normal file
3
libvirt-4.7.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:92c279f7321624ac5a37a81f8bbe8c8d2a16781da04c63c99c92d3de035767e4
|
||||
size 14813352
|
10
libvirt-4.7.0.tar.xz.asc
Normal file
10
libvirt-4.7.0.tar.xz.asc
Normal file
@ -0,0 +1,10 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQEcBAABAgAGBQJbjW0tAAoJEBVYiyZZa+pdVjgIAM1W7JkjCuOexxKUr+tQnKwU
|
||||
zyPHPP65VvZJs2lF3yvF+0NY3roQTCkVNoxiA9rwu2TEay3mTFxF5N9jypNu4kDs
|
||||
cuPgJSW8U68XUvDIeebNKEegxSWDJfND8ARr7OoMKSeaU09mUk3eNXwCQ7LEqU9r
|
||||
iXyRcIzZWuaW+HBMI5PprvE00yow3EFrSWFptmf8X4W5pIK1CVU1Lj6b6XKssPam
|
||||
WK72M9CJrulvtN+SnuoF3dB7FbARstevR5dtdREY9KdT2xEEOj3f8c/JEYCLZkZV
|
||||
HH/9tflDeQcplTEkHoFEj0aIJ3bS9OQqjghCZWerJDxlFrRxWySbclsCpF0jQxA=
|
||||
=YpT0
|
||||
-----END PGP SIGNATURE-----
|
@ -2,16 +2,15 @@ Add POWER8 v2.0 and v2.1 to cpu map XML
|
||||
|
||||
From: <ro@suse.de>
|
||||
|
||||
Index: libvirt-4.6.0/src/cpu/cpu_map.xml
|
||||
Index: libvirt-4.7.0/src/cpu_map/ppc64_POWER8.xml
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/cpu/cpu_map.xml
|
||||
+++ libvirt-4.6.0/src/cpu/cpu_map.xml
|
||||
@@ -2361,6 +2361,8 @@
|
||||
--- libvirt-4.7.0.orig/src/cpu_map/ppc64_POWER8.xml
|
||||
+++ libvirt-4.7.0/src/cpu_map/ppc64_POWER8.xml
|
||||
@@ -4,5 +4,7 @@
|
||||
<pvr value='0x004b0000' mask='0xffff0000'/>
|
||||
<pvr value='0x004c0000' mask='0xffff0000'/>
|
||||
<pvr value='0x004d0000' mask='0xffff0000'/>
|
||||
+ <pvr value='0x004b0200' mask='0xffffffff'/>
|
||||
+ <pvr value='0x004b0201' mask='0xffffffff'/>
|
||||
</model>
|
||||
|
||||
<model name='POWER9'>
|
||||
</cpus>
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: libvirt-4.6.0/configure.ac
|
||||
Index: libvirt-4.7.0/configure.ac
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/configure.ac
|
||||
+++ libvirt-4.6.0/configure.ac
|
||||
@@ -255,6 +255,7 @@ LIBVIRT_ARG_LIBSSH
|
||||
--- libvirt-4.7.0.orig/configure.ac
|
||||
+++ libvirt-4.7.0/configure.ac
|
||||
@@ -256,6 +256,7 @@ LIBVIRT_ARG_LIBSSH
|
||||
LIBVIRT_ARG_LIBXML
|
||||
LIBVIRT_ARG_MACVTAP
|
||||
LIBVIRT_ARG_NETCF
|
||||
@ -10,7 +10,7 @@ Index: libvirt-4.6.0/configure.ac
|
||||
LIBVIRT_ARG_NLS
|
||||
LIBVIRT_ARG_NSS
|
||||
LIBVIRT_ARG_NUMACTL
|
||||
@@ -297,6 +298,7 @@ LIBVIRT_CHECK_LIBSSH
|
||||
@@ -299,6 +300,7 @@ LIBVIRT_CHECK_LIBSSH
|
||||
LIBVIRT_CHECK_LIBXML
|
||||
LIBVIRT_CHECK_MACVTAP
|
||||
LIBVIRT_CHECK_NETCF
|
||||
@ -18,7 +18,7 @@ Index: libvirt-4.6.0/configure.ac
|
||||
LIBVIRT_CHECK_NLS
|
||||
LIBVIRT_CHECK_NUMACTL
|
||||
LIBVIRT_CHECK_NWFILTER
|
||||
@@ -977,6 +979,7 @@ LIBVIRT_RESULT_LIBXL
|
||||
@@ -984,6 +986,7 @@ LIBVIRT_RESULT_LIBXL
|
||||
LIBVIRT_RESULT_LIBXML
|
||||
LIBVIRT_RESULT_MACVTAP
|
||||
LIBVIRT_RESULT_NETCF
|
||||
@ -26,10 +26,10 @@ Index: libvirt-4.6.0/configure.ac
|
||||
LIBVIRT_RESULT_NLS
|
||||
LIBVIRT_RESULT_NSS
|
||||
LIBVIRT_RESULT_NUMACTL
|
||||
Index: libvirt-4.6.0/tools/virsh.c
|
||||
Index: libvirt-4.7.0/tools/virsh.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tools/virsh.c
|
||||
+++ libvirt-4.6.0/tools/virsh.c
|
||||
--- libvirt-4.7.0.orig/tools/virsh.c
|
||||
+++ libvirt-4.7.0/tools/virsh.c
|
||||
@@ -575,6 +575,8 @@ virshShowVersion(vshControl *ctl ATTRIBU
|
||||
vshPrint(ctl, " Interface");
|
||||
# if defined(WITH_NETCF)
|
||||
@ -39,10 +39,10 @@ Index: libvirt-4.6.0/tools/virsh.c
|
||||
# elif defined(WITH_UDEV)
|
||||
vshPrint(ctl, " udev");
|
||||
# endif
|
||||
Index: libvirt-4.6.0/src/interface/interface_backend_netcf.c
|
||||
Index: libvirt-4.7.0/src/interface/interface_backend_netcf.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/interface/interface_backend_netcf.c
|
||||
+++ libvirt-4.6.0/src/interface/interface_backend_netcf.c
|
||||
--- libvirt-4.7.0.orig/src/interface/interface_backend_netcf.c
|
||||
+++ libvirt-4.7.0/src/interface/interface_backend_netcf.c
|
||||
@@ -23,7 +23,12 @@
|
||||
|
||||
#include <config.h>
|
||||
@ -126,10 +126,10 @@ Index: libvirt-4.6.0/src/interface/interface_backend_netcf.c
|
||||
if (virRegisterConnectDriver(&interfaceConnectDriver, false) < 0)
|
||||
return -1;
|
||||
if (virSetSharedInterfaceDriver(&interfaceDriver) < 0)
|
||||
Index: libvirt-4.6.0/src/interface/interface_driver.c
|
||||
Index: libvirt-4.7.0/src/interface/interface_driver.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/interface/interface_driver.c
|
||||
+++ libvirt-4.6.0/src/interface/interface_driver.c
|
||||
--- libvirt-4.7.0.orig/src/interface/interface_driver.c
|
||||
+++ libvirt-4.7.0/src/interface/interface_driver.c
|
||||
@@ -30,8 +30,15 @@ interfaceRegister(void)
|
||||
if (netcfIfaceRegister() == 0)
|
||||
return 0;
|
||||
@ -147,10 +147,10 @@ Index: libvirt-4.6.0/src/interface/interface_driver.c
|
||||
if (udevIfaceRegister() == 0)
|
||||
return 0;
|
||||
#endif /* WITH_UDEV */
|
||||
Index: libvirt-4.6.0/m4/virt-netcontrol.m4
|
||||
Index: libvirt-4.7.0/m4/virt-netcontrol.m4
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-4.6.0/m4/virt-netcontrol.m4
|
||||
+++ libvirt-4.7.0/m4/virt-netcontrol.m4
|
||||
@@ -0,0 +1,39 @@
|
||||
+dnl The libnetcontrol library
|
||||
+dnl
|
||||
@ -191,10 +191,10 @@ Index: libvirt-4.6.0/m4/virt-netcontrol.m4
|
||||
+AC_DEFUN([LIBVIRT_RESULT_NETCONTROL],[
|
||||
+ LIBVIRT_RESULT_LIB([NETCONTROL])
|
||||
+])
|
||||
Index: libvirt-4.6.0/src/interface/Makefile.inc.am
|
||||
Index: libvirt-4.7.0/src/interface/Makefile.inc.am
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/interface/Makefile.inc.am
|
||||
+++ libvirt-4.6.0/src/interface/Makefile.inc.am
|
||||
--- libvirt-4.7.0.orig/src/interface/Makefile.inc.am
|
||||
+++ libvirt-4.7.0/src/interface/Makefile.inc.am
|
||||
@@ -4,6 +4,7 @@ INTERFACE_DRIVER_SOURCES = \
|
||||
$(NULL)
|
||||
|
||||
|
@ -1,3 +1,42 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 24 10:42:27 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Fix RPM groups. Remove idempotent %if..%endif guards.
|
||||
- Remove redundant %clean section.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 19 22:01:11 UTC 2018 - James Fehlig <jfehlig@suse.com>
|
||||
|
||||
- libxl: fix VM migration on busy hosts
|
||||
60b4fd90-libxl-rm-vm-finish-phase.patch,
|
||||
e39c66d3-libxl-fix-p2p-migration.patch,
|
||||
47da84e0-libxl-fix-job-handling-migsrc.patch,
|
||||
0149464a-libxl-fix-job-handling-migdst.patch,
|
||||
5ea2abb3-libxl-join-mig-rcv-thread.patch
|
||||
bsc#1108086
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 5 04:08:21 UTC 2018 - jfehlig@suse.com
|
||||
|
||||
- Update to libvirt 4.7.0
|
||||
- Many incremental improvements and bug fixes, see
|
||||
http://libvirt.org/news.html
|
||||
- Dropped patches:
|
||||
9ed59012--revert-jansson1.patch,
|
||||
54f2b5e3-revert-jansson2.patch,
|
||||
b56950fd-revert-jansson3.patch,
|
||||
6c3d66ac-revert-jansson4.patch,
|
||||
8e373e6d-revert-jansson5.patch,
|
||||
6f99de31-revert-jansson6.patch,
|
||||
f204cf51-revert-jansson7.patch,
|
||||
5a58b5ed-revert-jansson8.patch,
|
||||
63f6e0e9-revert-jansson9.patch,
|
||||
8687eba-revert-jansson10.patch,
|
||||
e96e71d8-revert-jansson11.patch,
|
||||
d99a8959-revert-jansson12.patch,
|
||||
074a7e14-revert-jansson13.patch,
|
||||
86db0db9-revert-jansson14.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 14 03:23:24 UTC 2018 - jfehlig@suse.com
|
||||
|
||||
|
206
libvirt.spec
206
libvirt.spec
@ -12,7 +12,7 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
%define with_storage_rbd 0%{!?_without_storage_rbd:0}
|
||||
%define with_storage_sheepdog 0
|
||||
%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}
|
||||
|
||||
# Optional bits on by default
|
||||
@ -146,6 +147,12 @@
|
||||
%define with_storage_gluster 0
|
||||
%endif
|
||||
|
||||
# libiscsi storage backend needs libiscsi >= 1.18.0 which is only available
|
||||
# in suse_version >= 1500
|
||||
%if 0%{?suse_version} > 1500
|
||||
%define with_storage_iscsi_direct 1
|
||||
%endif
|
||||
|
||||
# numad is used to manage the CPU and memory placement dynamically for
|
||||
# qemu, lxc, and uml drivers
|
||||
%if %{with_qemu} || %{with_lxc} || %{with_uml}
|
||||
@ -178,9 +185,9 @@
|
||||
|
||||
Name: libvirt
|
||||
Url: http://libvirt.org/
|
||||
Version: 4.6.0
|
||||
Version: 4.7.0
|
||||
Release: 0
|
||||
Summary: Library providing a simple virtualization API
|
||||
Summary: Library providing a virtualization API
|
||||
License: LGPL-2.1-or-later
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
@ -274,8 +281,12 @@ BuildRequires: radvd
|
||||
BuildRequires: util-linux
|
||||
# For LVM drivers
|
||||
BuildRequires: lvm2
|
||||
# For ISCSI driver
|
||||
# For pool type=iscsi
|
||||
BuildRequires: open-iscsi
|
||||
%if %{with_storage_iscsi_direct}
|
||||
# For pool type=iscsi-direct
|
||||
BuildRequires: libiscsi-devel
|
||||
%endif
|
||||
# For disk driver
|
||||
BuildRequires: parted-devel
|
||||
# For Multipath support
|
||||
@ -328,20 +339,11 @@ Source6: libvirtd-relocation-server.xml
|
||||
Source99: baselibs.conf
|
||||
Source100: %{name}-rpmlintrc
|
||||
# Upstream patches
|
||||
Patch0: 9ed59012--revert-jansson1.patch
|
||||
Patch1: 54f2b5e3-revert-jansson2.patch
|
||||
Patch2: b56950fd-revert-jansson3.patch
|
||||
Patch3: 6c3d66ac-revert-jansson4.patch
|
||||
Patch4: 8e373e6d-revert-jansson5.patch
|
||||
Patch5: 6f99de31-revert-jansson6.patch
|
||||
Patch6: f204cf51-revert-jansson7.patch
|
||||
Patch7: 5a58b5ed-revert-jansson8.patch
|
||||
Patch8: 63f6e0e9-revert-jansson9.patch
|
||||
Patch9: 8687eba-revert-jansson10.patch
|
||||
Patch10: e96e71d8-revert-jansson11.patch
|
||||
Patch11: d99a8959-revert-jansson12.patch
|
||||
Patch12: 074a7e14-revert-jansson13.patch
|
||||
Patch13: 86db0db9-revert-jansson14.patch
|
||||
Patch0: 60b4fd90-libxl-rm-vm-finish-phase.patch
|
||||
Patch1: e39c66d3-libxl-fix-p2p-migration.patch
|
||||
Patch2: 47da84e0-libxl-fix-job-handling-migsrc.patch
|
||||
Patch3: 0149464a-libxl-fix-job-handling-migdst.patch
|
||||
Patch4: 5ea2abb3-libxl-join-mig-rcv-thread.patch
|
||||
# Patches pending upstream review
|
||||
Patch100: libxl-dom-reset.patch
|
||||
Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch
|
||||
@ -390,6 +392,7 @@ to interact with Linux virtualization technologies.
|
||||
%package doc
|
||||
Summary: API reference and website documentation for libvirt
|
||||
Group: Documentation/HTML
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
Includes the API reference for the libvirt C library, and a complete
|
||||
@ -397,7 +400,7 @@ copy of the libvirt.org website documentation.
|
||||
|
||||
%package daemon
|
||||
Summary: Server side daemon and supporting files for libvirt
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
|
||||
# All runtime requirements for the libvirt package (runtime requirements
|
||||
# for subpackages are listed later in those subpackages)
|
||||
@ -411,7 +414,7 @@ Requires: iproute
|
||||
Requires: logrotate
|
||||
Requires: udev >= 145
|
||||
Recommends: polkit >= 0.112
|
||||
%ifarch i386 i586 i686 x86_64 ia64
|
||||
%ifarch %ix86 x86_64 ia64
|
||||
# For virConnectGetSysinfo
|
||||
Requires: dmidecode
|
||||
%endif
|
||||
@ -437,8 +440,7 @@ for specific drivers.
|
||||
|
||||
%package daemon-hooks
|
||||
Summary: Hook scripts for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: python3-lxml
|
||||
|
||||
@ -447,8 +449,7 @@ Default hook scripts for the libvirt daemon
|
||||
|
||||
%package daemon-config-network
|
||||
Summary: Default configuration files for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-network = %{version}-%{release}
|
||||
|
||||
@ -457,8 +458,7 @@ Default configuration files for setting up NAT based networking
|
||||
|
||||
%package daemon-config-nwfilter
|
||||
Summary: Network filter configuration files for the libvirtd
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-nwfilter = %{version}-%{release}
|
||||
|
||||
@ -468,7 +468,7 @@ cleaning guest network traffic.
|
||||
|
||||
%package daemon-driver-network
|
||||
Summary: Network driver plugin for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: dnsmasq >= 2.41
|
||||
@ -482,7 +482,7 @@ bridge capabilities.
|
||||
|
||||
%package daemon-driver-nwfilter
|
||||
Summary: A nwfilter driver plugin for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: ebtables
|
||||
@ -495,7 +495,7 @@ iptables and ip6tables capabilities
|
||||
|
||||
%package daemon-driver-nodedev
|
||||
Summary: Nodedev driver plugin for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
@ -506,7 +506,7 @@ capabilities.
|
||||
|
||||
%package daemon-driver-interface
|
||||
Summary: Interface driver plugin for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
@ -517,7 +517,7 @@ netcontrol library
|
||||
|
||||
%package daemon-driver-secret
|
||||
Summary: Secret driver plugin for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
|
||||
%description daemon-driver-secret
|
||||
@ -526,7 +526,7 @@ an implementation of the secret key APIs.
|
||||
|
||||
%package daemon-driver-storage-core
|
||||
Summary: Storage driver plugin including base backends for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: nfs-utils
|
||||
@ -544,7 +544,7 @@ iSCSI, and multipath storage.
|
||||
|
||||
%package daemon-driver-storage-logical
|
||||
Summary: Storage driver plugin for lvm volumes
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: lvm2
|
||||
@ -555,7 +555,7 @@ volumes using lvm.
|
||||
|
||||
%package daemon-driver-storage-disk
|
||||
Summary: Storage driver plugin for disk
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: device-mapper
|
||||
Requires: parted
|
||||
@ -566,7 +566,7 @@ volumes using the host disks.
|
||||
|
||||
%package daemon-driver-storage-scsi
|
||||
Summary: Storage driver plugin for local scsi devices
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
@ -576,7 +576,7 @@ host devices.
|
||||
|
||||
%package daemon-driver-storage-iscsi
|
||||
Summary: Storage driver plugin for iscsi
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: open-iscsi
|
||||
@ -585,9 +585,19 @@ Requires: open-iscsi
|
||||
The storage driver backend adding implementation of the storage APIs for iscsi
|
||||
volumes using the host iscsi stack.
|
||||
|
||||
%package daemon-driver-storage-iscsi-direct
|
||||
Summary: Storage driver plugin for iscsi-direct
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description daemon-driver-storage-iscsi-direct
|
||||
The storage driver backend adding implementation of the storage APIs for iscsi
|
||||
volumes using libiscsi direct connection.
|
||||
|
||||
%package daemon-driver-storage-mpath
|
||||
Summary: Storage driver plugin for multipath volumes
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: device-mapper
|
||||
@ -596,35 +606,29 @@ Requires: device-mapper
|
||||
The storage driver backend adding implementation of the storage APIs for
|
||||
multipath storage using device mapper.
|
||||
|
||||
|
||||
%if %{with_storage_gluster}
|
||||
%package daemon-driver-storage-gluster
|
||||
Summary: Storage driver plugin for gluster
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description daemon-driver-storage-gluster
|
||||
The storage driver backend adding implementation of the storage APIs for gluster
|
||||
volumes using libgfapi.
|
||||
%endif
|
||||
|
||||
%if %{with_storage_rbd}
|
||||
%package daemon-driver-storage-rbd
|
||||
Summary: Storage driver plugin for rbd
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description daemon-driver-storage-rbd
|
||||
The storage driver backend adding implementation of the storage APIs for rbd
|
||||
volumes using the ceph protocol.
|
||||
%endif
|
||||
|
||||
%if %{with_storage_sheepdog}
|
||||
%package daemon-driver-storage-sheepdog
|
||||
Summary: Storage driver plugin for sheepdog
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: sheepdog
|
||||
@ -632,11 +636,10 @@ Requires: sheepdog
|
||||
%description daemon-driver-storage-sheepdog
|
||||
The storage driver backend adding implementation of the storage APIs for
|
||||
sheepdog volumes using.
|
||||
%endif
|
||||
|
||||
%package daemon-driver-storage
|
||||
Summary: Storage driver plugin including all backends for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-storage-disk = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-storage-iscsi = %{version}-%{release}
|
||||
@ -652,17 +655,18 @@ Requires: %{name}-daemon-driver-storage-rbd = %{version}-%{release}
|
||||
%if %{with_storage_sheepdog}
|
||||
Requires: %{name}-daemon-driver-storage-sheepdog = %{version}-%{release}
|
||||
%endif
|
||||
%if %{with_storage_iscsi_direct}
|
||||
Requires: %{name}-daemon-driver-storage-iscsi-direct = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description daemon-driver-storage
|
||||
The storage driver plugin for the libvirtd daemon, providing
|
||||
an implementation of the storage APIs using LVM, iSCSI,
|
||||
parted and more.
|
||||
|
||||
%if %{with_qemu}
|
||||
|
||||
%package daemon-driver-qemu
|
||||
Summary: Qemu driver plugin for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
# There really is a hard cross-driver dependency here
|
||||
@ -679,13 +683,10 @@ Requires: xz
|
||||
%description daemon-driver-qemu
|
||||
The qemu driver plugin for the libvirtd daemon, providing
|
||||
an implementation of the hypervisor driver APIs using QEMU.
|
||||
%endif
|
||||
|
||||
%if %{with_lxc}
|
||||
|
||||
%package daemon-driver-lxc
|
||||
Summary: LXC driver plugin for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
# There really is a hard cross-driver dependency here
|
||||
@ -695,13 +696,10 @@ Requires: %{name}-daemon-driver-network = %{version}-%{release}
|
||||
The LXC driver plugin for the libvirtd daemon, providing
|
||||
an implementation of the hypervisor driver APIs using
|
||||
the Linux kernel
|
||||
%endif
|
||||
|
||||
%if %{with_uml}
|
||||
|
||||
%package daemon-driver-uml
|
||||
Summary: Uml driver plugin for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Summary: User Mode Linux driver plugin for the libvirtd daemon
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
@ -709,13 +707,10 @@ Requires: %{name}-libs = %{version}-%{release}
|
||||
The UML driver plugin for the libvirtd daemon, providing
|
||||
an implementation of the hypervisor driver APIs using
|
||||
User Mode Linux
|
||||
%endif
|
||||
|
||||
%if %{with_vbox}
|
||||
|
||||
%package daemon-driver-vbox
|
||||
Summary: VirtualBox driver plugin for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
@ -723,27 +718,20 @@ Requires: %{name}-libs = %{version}-%{release}
|
||||
The vbox driver plugin for the libvirtd daemon, providing
|
||||
an implementation of the hypervisor driver APIs using
|
||||
VirtualBox
|
||||
%endif
|
||||
|
||||
%if %{with_libxl}
|
||||
|
||||
%package daemon-driver-libxl
|
||||
Summary: Libxl driver plugin for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description daemon-driver-libxl
|
||||
The Libxl driver plugin for the libvirtd daemon, providing
|
||||
an implementation of the hypervisor driver APIs using libxl.
|
||||
%endif
|
||||
|
||||
%if %{with_qemu}
|
||||
|
||||
%package daemon-qemu
|
||||
Summary: Server side daemon & driver required to run QEMU guests
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-interface = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-network = %{version}-%{release}
|
||||
@ -756,14 +744,10 @@ Requires: %{name}-daemon-driver-storage = %{version}-%{release}
|
||||
%description daemon-qemu
|
||||
Server side daemon and driver required to manage the virtualization
|
||||
capabilities of the QEMU emulators
|
||||
%endif
|
||||
|
||||
%if %{with_lxc}
|
||||
|
||||
%package daemon-lxc
|
||||
Summary: Server side daemon & driver required to run LXC guests
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-interface = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-lxc = %{version}-%{release}
|
||||
@ -776,14 +760,10 @@ Requires: %{name}-daemon-driver-storage = %{version}-%{release}
|
||||
%description daemon-lxc
|
||||
Server side daemon and driver required to manage the virtualization
|
||||
capabilities of LXC
|
||||
%endif
|
||||
|
||||
%if %{with_uml}
|
||||
|
||||
%package daemon-uml
|
||||
Summary: Server side daemon & driver required to run UML guests
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-interface = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-network = %{version}-%{release}
|
||||
@ -796,14 +776,10 @@ Requires: %{name}-daemon-driver-uml = %{version}-%{release}
|
||||
%description daemon-uml
|
||||
Server side daemon and driver required to manage the virtualization
|
||||
capabilities of UML
|
||||
%endif
|
||||
|
||||
%if %{with_libxl}
|
||||
|
||||
%package daemon-xen
|
||||
Summary: Server side daemon & driver required to run XEN guests
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-interface = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-libxl = %{version}-%{release}
|
||||
@ -817,13 +793,10 @@ Requires: xen
|
||||
%description daemon-xen
|
||||
Server side daemon and driver required to manage the virtualization
|
||||
capabilities of XEN
|
||||
%endif
|
||||
|
||||
%if %{with_vbox}
|
||||
|
||||
%package daemon-vbox
|
||||
Summary: Server side daemon & driver required to run VirtualBox guests
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-interface = %{version}-%{release}
|
||||
Requires: %{name}-daemon-driver-network = %{version}-%{release}
|
||||
@ -839,11 +812,10 @@ Requires: virtualbox < 5.3
|
||||
%description daemon-vbox
|
||||
Server side daemon and driver required to manage the virtualization
|
||||
capabilities of VirtualBox
|
||||
%endif
|
||||
|
||||
%package client
|
||||
Summary: Client side utilities of the libvirt library
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: ncurses
|
||||
Requires: readline
|
||||
@ -864,7 +836,7 @@ capabilities of recent versions of Linux (and other OSes).
|
||||
Summary: Client side libraries for libvirt
|
||||
# So remote clients can access libvirt over SSH tunnel
|
||||
# (client invokes 'nc' against the UNIX socket on the server)
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Libraries
|
||||
Requires: netcat-openbsd
|
||||
# Not technically required, but makes 'out-of-box' config
|
||||
# work correctly & doesn't have onerous dependencies
|
||||
@ -875,7 +847,7 @@ Shared libraries for accessing the libvirt daemon.
|
||||
|
||||
%package admin
|
||||
Summary: Set of tools to control libvirt daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: readline
|
||||
%if %{with_bash_completion}
|
||||
@ -885,14 +857,13 @@ Requires: %{name}-bash-completion = %{version}-%{release}
|
||||
%description admin
|
||||
The client side utilities to control the libvirt daemon.
|
||||
|
||||
%if %{with_bash_completion}
|
||||
%package bash-completion
|
||||
Summary: Bash completion script
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Shells
|
||||
BuildArch: noarch
|
||||
|
||||
%description bash-completion
|
||||
Bash completion script stub.
|
||||
%endif
|
||||
|
||||
%package devel
|
||||
Summary: Libraries, includes, etc. to compile with the libvirt library
|
||||
@ -904,12 +875,9 @@ Requires: pkg-config
|
||||
%description devel
|
||||
Include header files & development libraries for the libvirt C library.
|
||||
|
||||
|
||||
%if %{with_sanlock}
|
||||
|
||||
%package lock-sanlock
|
||||
Summary: Sanlock lock manager plugin for QEMU driver
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: sanlock >= 2.4
|
||||
# for virt-sanlock-cleanup require augeas
|
||||
Requires: %{name}-daemon = %{version}-%{release}
|
||||
@ -918,9 +886,6 @@ Requires: augeas
|
||||
|
||||
%description lock-sanlock
|
||||
Includes the Sanlock lock manager plugin for the QEMU driver
|
||||
%endif
|
||||
|
||||
%if %{with_wireshark}
|
||||
|
||||
%package -n wireshark-plugin-libvirt
|
||||
Summary: Wireshark plugin for libvirt RPC protocol
|
||||
@ -930,11 +895,10 @@ Requires: wireshark
|
||||
|
||||
%description -n wireshark-plugin-libvirt
|
||||
Wireshark dissector plugin for better analysis of libvirt RPC traffic.
|
||||
%endif
|
||||
|
||||
%package nss
|
||||
Summary: Libvirt plugin for Name Service Switch
|
||||
Group: Development/Libraries/C and C++
|
||||
Group: System/Management
|
||||
Requires: %{name}-daemon-driver-network = %{version}-%{release}
|
||||
|
||||
%description nss
|
||||
@ -947,15 +911,6 @@ libvirt plugin for NSS for translating domain names into IP addresses.
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch150 -p1
|
||||
@ -1054,6 +1009,11 @@ libvirt plugin for NSS for translating domain names into IP addresses.
|
||||
%else
|
||||
%define arg_storage_gluster --without-storage-gluster
|
||||
%endif
|
||||
%if %{with_storage_iscsi_direct}
|
||||
%define arg_storage_iscsi_direct --with-storage-iscsi-direct
|
||||
%else
|
||||
%define arg_storage_iscsi_direct --without-storage-iscsi-direct
|
||||
%endif
|
||||
%if %{with_numactl}
|
||||
%define arg_numactl --with-numactl
|
||||
%else
|
||||
@ -1135,6 +1095,7 @@ export PYTHON=%{_bindir}/python3
|
||||
%{?arg_storage_rbd} \
|
||||
%{?arg_storage_sheepdog} \
|
||||
%{?arg_storage_gluster} \
|
||||
%{?arg_storage_iscsi_direct} \
|
||||
--without-storage-zfs \
|
||||
--without-storage-vstorage \
|
||||
%{?arg_numactl} \
|
||||
@ -1306,9 +1267,6 @@ mv %{buildroot}/%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
|
||||
%endif
|
||||
%fdupes -s %{buildroot}
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%check
|
||||
cd tests
|
||||
SKIP_TESTS=""
|
||||
@ -1577,6 +1535,11 @@ fi
|
||||
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so
|
||||
%endif
|
||||
|
||||
%if %{with_storage_iscsi_direct}
|
||||
%files daemon-driver-storage-iscsi-direct
|
||||
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi-direct.so
|
||||
%endif
|
||||
|
||||
%if %{with_qemu}
|
||||
|
||||
%files daemon-driver-qemu
|
||||
@ -1700,6 +1663,7 @@ fi
|
||||
%{_libdir}/libvirt-admin.so.*
|
||||
%dir %{_datadir}/%{name}/
|
||||
%dir %{_datadir}/%{name}/schemas/
|
||||
%dir %{_datadir}/%{name}/cpu_map/
|
||||
%dir %attr(0755, root, root) %{_localstatedir}/lib/%{name}/
|
||||
|
||||
%{_datadir}/%{name}/schemas/basictypes.rng
|
||||
@ -1720,7 +1684,7 @@ fi
|
||||
%{_datadir}/%{name}/schemas/storagecommon.rng
|
||||
%{_datadir}/%{name}/schemas/storagepool.rng
|
||||
%{_datadir}/%{name}/schemas/storagevol.rng
|
||||
%{_datadir}/%{name}/cpu_map.xml
|
||||
%{_datadir}/%{name}/cpu_map/*.xml
|
||||
%{_datadir}/%{name}/test-screenshot.png
|
||||
|
||||
%files admin
|
||||
|
@ -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-4.6.0/src/libxl/libxl_driver.c
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-4.6.0/src/libxl/libxl_driver.c
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_driver.c
|
||||
@@ -1344,6 +1344,61 @@ libxlDomainReboot(virDomainPtr dom, unsi
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ Index: libvirt-4.6.0/src/libxl/libxl_driver.c
|
||||
libxlDomainDestroyFlags(virDomainPtr dom,
|
||||
unsigned int flags)
|
||||
{
|
||||
@@ -6383,6 +6438,7 @@ static virHypervisorDriver libxlHypervis
|
||||
@@ -6376,6 +6431,7 @@ static virHypervisorDriver libxlHypervis
|
||||
.domainShutdown = libxlDomainShutdown, /* 0.9.0 */
|
||||
.domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */
|
||||
.domainReboot = libxlDomainReboot, /* 0.9.0 */
|
||||
|
@ -8,10 +8,10 @@ as the default <emulator>, instead of the qemu-xen one.
|
||||
|
||||
See FATE#320638 for details.
|
||||
|
||||
Index: libvirt-4.6.0/src/libxl/libxl_capabilities.c
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_capabilities.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/libxl/libxl_capabilities.c
|
||||
+++ libvirt-4.6.0/src/libxl/libxl_capabilities.c
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_capabilities.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_capabilities.c
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "libxl_capabilities.h"
|
||||
#include "cpu/cpu_x86.h"
|
||||
|
@ -3,10 +3,10 @@ https://bugzilla.novell.com/show_bug.cgi?id=879425
|
||||
src/libxl/libxl_conf.c | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
Index: libvirt-4.6.0/src/libxl/libxl_conf.c
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-4.6.0/src/libxl/libxl_conf.c
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_conf.c
|
||||
@@ -837,6 +837,30 @@ libxlDiskSetDiscard(libxl_device_disk *x
|
||||
#endif
|
||||
}
|
||||
|
@ -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-4.6.0/include/libvirt/libvirt-domain.h
|
||||
Index: libvirt-4.7.0/include/libvirt/libvirt-domain.h
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/include/libvirt/libvirt-domain.h
|
||||
+++ libvirt-4.6.0/include/libvirt/libvirt-domain.h
|
||||
--- libvirt-4.7.0.orig/include/libvirt/libvirt-domain.h
|
||||
+++ libvirt-4.7.0/include/libvirt/libvirt-domain.h
|
||||
@@ -1015,6 +1015,31 @@ typedef enum {
|
||||
*/
|
||||
# define VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT "auto_converge.increment"
|
||||
@ -52,10 +52,10 @@ Index: libvirt-4.6.0/include/libvirt/libvirt-domain.h
|
||||
/* Domain migration. */
|
||||
virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn,
|
||||
unsigned long flags, const char *dname,
|
||||
Index: libvirt-4.6.0/src/libxl/libxl_driver.c
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-4.6.0/src/libxl/libxl_driver.c
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_driver.c
|
||||
@@ -5985,6 +5985,9 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
const char *dname = NULL;
|
||||
const char *uri = NULL;
|
||||
@ -99,11 +99,11 @@ Index: libvirt-4.6.0/src/libxl/libxl_driver.c
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
Index: libvirt-4.6.0/src/libxl/libxl_migration.c
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_migration.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/libxl/libxl_migration.c
|
||||
+++ libvirt-4.6.0/src/libxl/libxl_migration.c
|
||||
@@ -353,18 +353,39 @@ libxlMigrateDstReceive(virNetSocketPtr s
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_migration.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_migration.c
|
||||
@@ -346,18 +346,39 @@ libxlMigrateDstReceive(virNetSocketPtr s
|
||||
static int
|
||||
libxlDoMigrateSrcSend(libxlDriverPrivatePtr driver,
|
||||
virDomainObjPtr vm,
|
||||
@ -145,7 +145,7 @@ Index: libvirt-4.6.0/src/libxl/libxl_migration.c
|
||||
if (ret != 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Failed to send migration data to destination host"));
|
||||
@@ -894,7 +915,7 @@ struct libxlTunnelControl {
|
||||
@@ -917,7 +938,7 @@ struct libxlTunnelControl {
|
||||
static int
|
||||
libxlMigrationSrcStartTunnel(libxlDriverPrivatePtr driver,
|
||||
virDomainObjPtr vm,
|
||||
@ -154,7 +154,7 @@ Index: libvirt-4.6.0/src/libxl/libxl_migration.c
|
||||
virStreamPtr st,
|
||||
struct libxlTunnelControl **tnl)
|
||||
{
|
||||
@@ -927,7 +948,7 @@ libxlMigrationSrcStartTunnel(libxlDriver
|
||||
@@ -950,7 +971,7 @@ libxlMigrationSrcStartTunnel(libxlDriver
|
||||
|
||||
virObjectUnlock(vm);
|
||||
/* Send data to pipe */
|
||||
@ -163,7 +163,7 @@ Index: libvirt-4.6.0/src/libxl/libxl_migration.c
|
||||
virObjectLock(vm);
|
||||
|
||||
out:
|
||||
@@ -963,7 +984,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
@@ -986,7 +1007,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
const char *dconnuri ATTRIBUTE_UNUSED,
|
||||
const char *dname,
|
||||
const char *uri,
|
||||
@ -172,7 +172,7 @@ Index: libvirt-4.6.0/src/libxl/libxl_migration.c
|
||||
{
|
||||
virDomainPtr ddomain = NULL;
|
||||
virTypedParameterPtr params = NULL;
|
||||
@@ -1003,11 +1024,11 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
@@ -1031,11 +1052,11 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
/* We don't require the destination to have P2P support
|
||||
* as it looks to be normal migration from the receiver perpective.
|
||||
*/
|
||||
@ -184,18 +184,18 @@ Index: libvirt-4.6.0/src/libxl/libxl_migration.c
|
||||
- if (flags & VIR_MIGRATE_TUNNELLED) {
|
||||
+ if (props->virFlags & VIR_MIGRATE_TUNNELLED) {
|
||||
if (!(st = virStreamNew(dconn, 0)))
|
||||
goto cleanup;
|
||||
goto confirm;
|
||||
ret = dconn->driver->domainMigratePrepareTunnel3Params
|
||||
@@ -1021,7 +1042,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
@@ -1049,7 +1070,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
if (ret == -1)
|
||||
goto cleanup;
|
||||
goto confirm;
|
||||
|
||||
- if (!(flags & VIR_MIGRATE_TUNNELLED)) {
|
||||
+ if (!(props->virFlags & VIR_MIGRATE_TUNNELLED)) {
|
||||
if (uri_out) {
|
||||
if (virTypedParamsReplaceString(¶ms, &nparams,
|
||||
VIR_MIGRATE_PARAM_URI, uri_out) < 0) {
|
||||
@@ -1036,11 +1057,11 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
@@ -1064,11 +1085,11 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
}
|
||||
|
||||
VIR_DEBUG("Perform3 uri=%s", NULLSTR(uri_out));
|
||||
@ -207,19 +207,20 @@ Index: libvirt-4.6.0/src/libxl/libxl_migration.c
|
||||
ret = libxlDomainMigrationSrcPerform(driver, vm, NULL, NULL,
|
||||
- uri_out, NULL, flags);
|
||||
+ uri_out, NULL, props);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
notify_source = false;
|
||||
orig_err = virSaveLastError();
|
||||
|
||||
@@ -1071,14 +1092,14 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
orig_err = virSaveLastError();
|
||||
|
||||
@@ -1103,7 +1124,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
confirm:
|
||||
if (notify_source) {
|
||||
VIR_DEBUG("Confirm3 cancelled=%d vm=%p", cancelled, vm);
|
||||
- ret = libxlDomainMigrationSrcConfirm(driver, vm, flags, cancelled);
|
||||
+ ret = libxlDomainMigrationSrcConfirm(driver, vm, props->virFlags, cancelled);
|
||||
|
||||
if (ret < 0)
|
||||
VIR_WARN("Guest %s probably left in 'paused' state on source",
|
||||
vm->def->name);
|
||||
@@ -1111,7 +1132,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivateP
|
||||
}
|
||||
|
||||
cleanup:
|
||||
- if (flags & VIR_MIGRATE_TUNNELLED) {
|
||||
@ -227,7 +228,7 @@ Index: libvirt-4.6.0/src/libxl/libxl_migration.c
|
||||
libxlMigrationSrcStopTunnel(tc);
|
||||
virObjectUnref(st);
|
||||
}
|
||||
@@ -1125,7 +1146,7 @@ libxlDomainMigrationSrcPerformP2P(libxlD
|
||||
@@ -1158,7 +1179,7 @@ libxlDomainMigrationSrcPerformP2P(libxlD
|
||||
const char *dconnuri,
|
||||
const char *uri_str ATTRIBUTE_UNUSED,
|
||||
const char *dname,
|
||||
@ -236,16 +237,16 @@ Index: libvirt-4.6.0/src/libxl/libxl_migration.c
|
||||
{
|
||||
int ret = -1;
|
||||
bool useParams;
|
||||
@@ -1160,7 +1181,7 @@ libxlDomainMigrationSrcPerformP2P(libxlD
|
||||
@@ -1193,7 +1214,7 @@ libxlDomainMigrationSrcPerformP2P(libxlD
|
||||
}
|
||||
|
||||
ret = libxlDoMigrateSrcP2P(driver, vm, sconn, xmlin, dconn, dconnuri,
|
||||
- dname, uri_str, flags);
|
||||
+ dname, uri_str, props);
|
||||
|
||||
cleanup:
|
||||
orig_err = virSaveLastError();
|
||||
@@ -1182,7 +1203,7 @@ libxlDomainMigrationSrcPerform(libxlDriv
|
||||
if (ret < 0) {
|
||||
/*
|
||||
@@ -1223,7 +1244,7 @@ libxlDomainMigrationSrcPerform(libxlDriv
|
||||
const char *dconnuri ATTRIBUTE_UNUSED,
|
||||
const char *uri_str,
|
||||
const char *dname ATTRIBUTE_UNUSED,
|
||||
@ -254,7 +255,7 @@ Index: libvirt-4.6.0/src/libxl/libxl_migration.c
|
||||
{
|
||||
libxlDomainObjPrivatePtr priv = vm->privateData;
|
||||
char *hostname = NULL;
|
||||
@@ -1222,7 +1243,7 @@ libxlDomainMigrationSrcPerform(libxlDriv
|
||||
@@ -1263,7 +1284,7 @@ libxlDomainMigrationSrcPerform(libxlDriv
|
||||
|
||||
/* suspend vm and send saved data to dst through socket fd */
|
||||
virObjectUnlock(vm);
|
||||
@ -262,11 +263,11 @@ Index: libvirt-4.6.0/src/libxl/libxl_migration.c
|
||||
+ ret = libxlDoMigrateSrcSend(driver, vm, props, sockfd);
|
||||
virObjectLock(vm);
|
||||
|
||||
if (ret < 0)
|
||||
Index: libvirt-4.6.0/src/libxl/libxl_migration.h
|
||||
if (ret < 0) {
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_migration.h
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/libxl/libxl_migration.h
|
||||
+++ libvirt-4.6.0/src/libxl/libxl_migration.h
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_migration.h
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_migration.h
|
||||
@@ -39,6 +39,10 @@
|
||||
VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \
|
||||
VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \
|
||||
@ -311,10 +312,10 @@ Index: libvirt-4.6.0/src/libxl/libxl_migration.h
|
||||
|
||||
virDomainPtr
|
||||
libxlDomainMigrationDstFinish(virConnectPtr dconn,
|
||||
Index: libvirt-4.6.0/tools/virsh-domain.c
|
||||
Index: libvirt-4.7.0/tools/virsh-domain.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tools/virsh-domain.c
|
||||
+++ libvirt-4.6.0/tools/virsh-domain.c
|
||||
--- libvirt-4.7.0.orig/tools/virsh-domain.c
|
||||
+++ libvirt-4.7.0/tools/virsh-domain.c
|
||||
@@ -10425,6 +10425,22 @@ static const vshCmdOptDef opts_migrate[]
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("use TLS for migration")
|
||||
@ -374,10 +375,10 @@ Index: libvirt-4.6.0/tools/virsh-domain.c
|
||||
if (vshCommandOptStringReq(ctl, cmd, "xml", &opt) < 0)
|
||||
goto out;
|
||||
if (opt) {
|
||||
Index: libvirt-4.6.0/tools/virsh.pod
|
||||
Index: libvirt-4.7.0/tools/virsh.pod
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tools/virsh.pod
|
||||
+++ libvirt-4.6.0/tools/virsh.pod
|
||||
--- libvirt-4.7.0.orig/tools/virsh.pod
|
||||
+++ libvirt-4.7.0/tools/virsh.pod
|
||||
@@ -1937,6 +1937,14 @@ Providing I<--tls> causes the migration
|
||||
the migration of the domain. Usage requires proper TLS setup for both source
|
||||
and target.
|
||||
|
@ -7,10 +7,10 @@ and npiv.
|
||||
|
||||
For more details, see bsc#954872 and FATE#319810
|
||||
|
||||
Index: libvirt-4.6.0/src/libxl/libxl_conf.c
|
||||
Index: libvirt-4.7.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-4.6.0/src/libxl/libxl_conf.c
|
||||
--- libvirt-4.7.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-4.7.0/src/libxl/libxl_conf.c
|
||||
@@ -837,6 +837,25 @@ libxlDiskSetDiscard(libxl_device_disk *x
|
||||
#endif
|
||||
}
|
||||
|
@ -13,10 +13,10 @@ device with the same name that is being created.
|
||||
src/lxc/lxc_process.c | 1 +
|
||||
3 files changed, 4 insertions(+)
|
||||
|
||||
Index: libvirt-4.6.0/src/lxc/lxc_controller.c
|
||||
Index: libvirt-4.7.0/src/lxc/lxc_controller.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/lxc/lxc_controller.c
|
||||
+++ libvirt-4.6.0/src/lxc/lxc_controller.c
|
||||
--- libvirt-4.7.0.orig/src/lxc/lxc_controller.c
|
||||
+++ libvirt-4.7.0/src/lxc/lxc_controller.c
|
||||
@@ -73,6 +73,7 @@
|
||||
#include "rpc/virnetdaemon.h"
|
||||
#include "virstring.h"
|
||||
@ -33,10 +33,10 @@ Index: libvirt-4.6.0/src/lxc/lxc_controller.c
|
||||
|
||||
return ret;
|
||||
}
|
||||
Index: libvirt-4.6.0/src/lxc/lxc_driver.c
|
||||
Index: libvirt-4.7.0/src/lxc/lxc_driver.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/lxc/lxc_driver.c
|
||||
+++ libvirt-4.6.0/src/lxc/lxc_driver.c
|
||||
--- libvirt-4.7.0.orig/src/lxc/lxc_driver.c
|
||||
+++ libvirt-4.7.0/src/lxc/lxc_driver.c
|
||||
@@ -74,6 +74,7 @@
|
||||
#include "virtime.h"
|
||||
#include "virtypedparam.h"
|
||||
@ -61,10 +61,10 @@ Index: libvirt-4.6.0/src/lxc/lxc_driver.c
|
||||
break;
|
||||
|
||||
/* It'd be nice to support this, but with macvlan
|
||||
Index: libvirt-4.6.0/src/lxc/lxc_process.c
|
||||
Index: libvirt-4.7.0/src/lxc/lxc_process.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/lxc/lxc_process.c
|
||||
+++ libvirt-4.6.0/src/lxc/lxc_process.c
|
||||
--- libvirt-4.7.0.orig/src/lxc/lxc_process.c
|
||||
+++ libvirt-4.7.0/src/lxc/lxc_process.c
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "viratomic.h"
|
||||
#include "virprocess.h"
|
||||
|
@ -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-4.6.0/src/network/bridge_driver.c
|
||||
Index: libvirt-4.7.0/src/network/bridge_driver.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/network/bridge_driver.c
|
||||
+++ libvirt-4.6.0/src/network/bridge_driver.c
|
||||
--- libvirt-4.7.0.orig/src/network/bridge_driver.c
|
||||
+++ libvirt-4.7.0/src/network/bridge_driver.c
|
||||
@@ -1463,7 +1463,14 @@ networkDnsmasqConfContents(virNetworkObj
|
||||
if (VIR_SOCKET_ADDR_IS_FAMILY(&ipdef->address, AF_INET)) {
|
||||
if (ipdef->nranges || ipdef->nhosts) {
|
||||
@ -37,10 +37,10 @@ Index: libvirt-4.6.0/src/network/bridge_driver.c
|
||||
}
|
||||
|
||||
if (ipdef->tftproot) {
|
||||
Index: libvirt-4.6.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
|
||||
Index: libvirt-4.7.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf
|
||||
+++ libvirt-4.6.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
|
||||
--- libvirt-4.7.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf
|
||||
+++ libvirt-4.7.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
|
||||
@@ -10,7 +10,6 @@ bind-dynamic
|
||||
interface=virbr1
|
||||
dhcp-range=192.168.122.1,static
|
||||
|
@ -2,11 +2,11 @@ Canonicalize hostarch name ppc64le to ppc64
|
||||
|
||||
See bnc#894956
|
||||
|
||||
Index: libvirt-4.6.0/src/util/virarch.c
|
||||
Index: libvirt-4.7.0/src/util/virarch.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/util/virarch.c
|
||||
+++ libvirt-4.6.0/src/util/virarch.c
|
||||
@@ -169,6 +169,8 @@ virArch virArchFromHost(void)
|
||||
--- libvirt-4.7.0.orig/src/util/virarch.c
|
||||
+++ libvirt-4.7.0/src/util/virarch.c
|
||||
@@ -172,6 +172,8 @@ virArch virArchFromHost(void)
|
||||
arch = VIR_ARCH_I686;
|
||||
} else if (STREQ(ut.machine, "amd64")) {
|
||||
arch = VIR_ARCH_X86_64;
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: libvirt-4.6.0/examples/apparmor/libvirt-qemu
|
||||
Index: libvirt-4.7.0/examples/apparmor/libvirt-qemu
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/examples/apparmor/libvirt-qemu
|
||||
+++ libvirt-4.6.0/examples/apparmor/libvirt-qemu
|
||||
@@ -205,3 +205,6 @@
|
||||
--- libvirt-4.7.0.orig/examples/apparmor/libvirt-qemu
|
||||
+++ libvirt-4.7.0/examples/apparmor/libvirt-qemu
|
||||
@@ -221,3 +221,6 @@
|
||||
# required for sasl GSSAPI plugin
|
||||
/etc/gss/mech.d/ r,
|
||||
/etc/gss/mech.d/* r,
|
||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] support managed pci devices in xen driver
|
||||
src/xenxs/xen_xm.c | 28 +++++++++++++++++++++++++++-
|
||||
2 files changed, 35 insertions(+), 15 deletions(-)
|
||||
|
||||
Index: libvirt-4.6.0/src/xenconfig/xen_common.c
|
||||
Index: libvirt-4.7.0/src/xenconfig/xen_common.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/xenconfig/xen_common.c
|
||||
+++ libvirt-4.6.0/src/xenconfig/xen_common.c
|
||||
--- libvirt-4.7.0.orig/src/xenconfig/xen_common.c
|
||||
+++ libvirt-4.7.0/src/xenconfig/xen_common.c
|
||||
@@ -402,12 +402,19 @@ xenParsePCI(char *entry)
|
||||
int busID;
|
||||
int slotID;
|
||||
@ -64,10 +64,10 @@ Index: libvirt-4.6.0/src/xenconfig/xen_common.c
|
||||
hostdev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI;
|
||||
hostdev->source.subsys.u.pci.addr.domain = domainID;
|
||||
hostdev->source.subsys.u.pci.addr.bus = busID;
|
||||
Index: libvirt-4.6.0/src/xenconfig/xen_sxpr.c
|
||||
Index: libvirt-4.7.0/src/xenconfig/xen_sxpr.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/xenconfig/xen_sxpr.c
|
||||
+++ libvirt-4.6.0/src/xenconfig/xen_sxpr.c
|
||||
--- libvirt-4.7.0.orig/src/xenconfig/xen_sxpr.c
|
||||
+++ libvirt-4.7.0/src/xenconfig/xen_sxpr.c
|
||||
@@ -1057,6 +1057,7 @@ xenParseSxprPCI(virDomainDefPtr def,
|
||||
int busID;
|
||||
int slotID;
|
||||
|
@ -8,10 +8,10 @@ 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-4.6.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||
Index: libvirt-4.7.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||
+++ libvirt-4.6.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||
--- libvirt-4.7.0.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||
+++ libvirt-4.7.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||
@@ -17,7 +17,7 @@ profile virt-aa-helper /usr/{lib,lib64}/
|
||||
owner @{PROC}/[0-9]*/status r,
|
||||
@{PROC}/filesystems r,
|
||||
@ -21,10 +21,10 @@ Index: libvirt-4.6.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||
|
||||
# for hostdev
|
||||
/sys/devices/ r,
|
||||
Index: libvirt-4.6.0/examples/apparmor/libvirt-qemu
|
||||
Index: libvirt-4.7.0/examples/apparmor/libvirt-qemu
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/examples/apparmor/libvirt-qemu
|
||||
+++ libvirt-4.6.0/examples/apparmor/libvirt-qemu
|
||||
--- libvirt-4.7.0.orig/examples/apparmor/libvirt-qemu
|
||||
+++ libvirt-4.7.0/examples/apparmor/libvirt-qemu
|
||||
@@ -62,6 +62,7 @@
|
||||
#/dev/fb* rw,
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
Adjust libvirt-guests service to conform to SUSE standards
|
||||
|
||||
Index: libvirt-4.6.0/tools/libvirt-guests.init.in
|
||||
Index: libvirt-4.7.0/tools/libvirt-guests.init.in
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tools/libvirt-guests.init.in
|
||||
+++ libvirt-4.6.0/tools/libvirt-guests.init.in
|
||||
--- libvirt-4.7.0.orig/tools/libvirt-guests.init.in
|
||||
+++ libvirt-4.7.0/tools/libvirt-guests.init.in
|
||||
@@ -4,27 +4,27 @@
|
||||
# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
|
||||
#
|
||||
@ -46,10 +46,10 @@ Index: libvirt-4.6.0/tools/libvirt-guests.init.in
|
||||
+
|
||||
|
||||
exec @libexecdir@/libvirt-guests.sh "$@"
|
||||
Index: libvirt-4.6.0/tools/libvirt-guests.sh.in
|
||||
Index: libvirt-4.7.0/tools/libvirt-guests.sh.in
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tools/libvirt-guests.sh.in
|
||||
+++ libvirt-4.6.0/tools/libvirt-guests.sh.in
|
||||
--- libvirt-4.7.0.orig/tools/libvirt-guests.sh.in
|
||||
+++ libvirt-4.7.0/tools/libvirt-guests.sh.in
|
||||
@@ -16,14 +16,13 @@
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
@ -209,10 +209,10 @@ Index: libvirt-4.6.0/tools/libvirt-guests.sh.in
|
||||
esac
|
||||
-exit $RETVAL
|
||||
+rc_exit
|
||||
Index: libvirt-4.6.0/tools/libvirt-guests.sysconf
|
||||
Index: libvirt-4.7.0/tools/libvirt-guests.sysconf
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/tools/libvirt-guests.sysconf
|
||||
+++ libvirt-4.6.0/tools/libvirt-guests.sysconf
|
||||
--- libvirt-4.7.0.orig/tools/libvirt-guests.sysconf
|
||||
+++ libvirt-4.7.0/tools/libvirt-guests.sysconf
|
||||
@@ -1,19 +1,29 @@
|
||||
+## Path: System/Virtualization/libvirt-guests
|
||||
+
|
||||
|
@ -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-4.6.0/src/remote/libvirtd.conf
|
||||
Index: libvirt-4.7.0/src/remote/libvirtd.conf
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/remote/libvirtd.conf
|
||||
+++ libvirt-4.6.0/src/remote/libvirtd.conf
|
||||
--- libvirt-4.7.0.orig/src/remote/libvirtd.conf
|
||||
+++ libvirt-4.7.0/src/remote/libvirtd.conf
|
||||
@@ -18,8 +18,8 @@
|
||||
# It is necessary to setup a CA and issue server certificates before
|
||||
# using this capability.
|
||||
@ -18,10 +18,10 @@ Index: libvirt-4.6.0/src/remote/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-4.6.0/src/remote/remote_daemon_config.c
|
||||
Index: libvirt-4.7.0/src/remote/remote_daemon_config.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/remote/remote_daemon_config.c
|
||||
+++ libvirt-4.6.0/src/remote/remote_daemon_config.c
|
||||
--- libvirt-4.7.0.orig/src/remote/remote_daemon_config.c
|
||||
+++ libvirt-4.7.0/src/remote/remote_daemon_config.c
|
||||
@@ -110,7 +110,7 @@ daemonConfigNew(bool privileged ATTRIBUT
|
||||
if (VIR_ALLOC(data) < 0)
|
||||
return NULL;
|
||||
@ -31,10 +31,10 @@ Index: libvirt-4.6.0/src/remote/remote_daemon_config.c
|
||||
data->listen_tcp = 0;
|
||||
|
||||
if (VIR_STRDUP(data->tls_port, LIBVIRTD_TLS_PORT) < 0 ||
|
||||
Index: libvirt-4.6.0/src/remote/test_libvirtd.aug.in
|
||||
Index: libvirt-4.7.0/src/remote/test_libvirtd.aug.in
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/remote/test_libvirtd.aug.in
|
||||
+++ libvirt-4.6.0/src/remote/test_libvirtd.aug.in
|
||||
--- libvirt-4.7.0.orig/src/remote/test_libvirtd.aug.in
|
||||
+++ libvirt-4.7.0/src/remote/test_libvirtd.aug.in
|
||||
@@ -2,7 +2,7 @@ module Test_libvirtd =
|
||||
::CONFIG::
|
||||
|
||||
|
@ -7,10 +7,10 @@ On SUSE distros, we promote libvirt and all the libvirt-based
|
||||
tools. If a user installs libvirt on their SUSE Xen host, then
|
||||
libvirt should be king and override xendomains. See bsc#1015348
|
||||
|
||||
Index: libvirt-4.6.0/src/remote/libvirtd.service.in
|
||||
Index: libvirt-4.7.0/src/remote/libvirtd.service.in
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/remote/libvirtd.service.in
|
||||
+++ libvirt-4.6.0/src/remote/libvirtd.service.in
|
||||
--- libvirt-4.7.0.orig/src/remote/libvirtd.service.in
|
||||
+++ libvirt-4.7.0/src/remote/libvirtd.service.in
|
||||
@@ -17,6 +17,8 @@ After=local-fs.target
|
||||
After=remote-fs.target
|
||||
After=systemd-logind.service
|
||||
|
@ -1,9 +1,9 @@
|
||||
Adjust libvirtd sysconfig file to conform to SUSE standards
|
||||
|
||||
Index: libvirt-4.6.0/src/remote/libvirtd.sysconf
|
||||
Index: libvirt-4.7.0/src/remote/libvirtd.sysconf
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/remote/libvirtd.sysconf
|
||||
+++ libvirt-4.6.0/src/remote/libvirtd.sysconf
|
||||
--- libvirt-4.7.0.orig/src/remote/libvirtd.sysconf
|
||||
+++ libvirt-4.7.0/src/remote/libvirtd.sysconf
|
||||
@@ -1,16 +1,25 @@
|
||||
+## Path: System/Virtualization/libvirt
|
||||
+
|
||||
|
@ -1,9 +1,9 @@
|
||||
Adjust paths of OVMF firmwares on SUSE distros
|
||||
|
||||
Index: libvirt-4.6.0/src/qemu/qemu.conf
|
||||
Index: libvirt-4.7.0/src/qemu/qemu.conf
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/qemu/qemu.conf
|
||||
+++ libvirt-4.6.0/src/qemu/qemu.conf
|
||||
--- libvirt-4.7.0.orig/src/qemu/qemu.conf
|
||||
+++ libvirt-4.7.0/src/qemu/qemu.conf
|
||||
@@ -769,10 +769,9 @@ security_default_confined = 0
|
||||
# for x86_64 and i686, but it's AAVMF for aarch64. The libvirt default
|
||||
# follows this scheme.
|
||||
@ -18,10 +18,10 @@ Index: libvirt-4.6.0/src/qemu/qemu.conf
|
||||
#]
|
||||
|
||||
# The backend to use for handling stdout/stderr output from
|
||||
Index: libvirt-4.6.0/src/qemu/qemu_conf.c
|
||||
Index: libvirt-4.7.0/src/qemu/qemu_conf.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/qemu/qemu_conf.c
|
||||
+++ libvirt-4.6.0/src/qemu/qemu_conf.c
|
||||
--- libvirt-4.7.0.orig/src/qemu/qemu_conf.c
|
||||
+++ libvirt-4.7.0/src/qemu/qemu_conf.c
|
||||
@@ -122,10 +122,9 @@ void qemuDomainCmdlineDefFree(qemuDomain
|
||||
|
||||
#ifndef DEFAULT_LOADER_NVRAM
|
||||
@ -36,10 +36,10 @@ Index: libvirt-4.6.0/src/qemu/qemu_conf.c
|
||||
#endif
|
||||
|
||||
|
||||
Index: libvirt-4.6.0/src/security/virt-aa-helper.c
|
||||
Index: libvirt-4.7.0/src/security/virt-aa-helper.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/security/virt-aa-helper.c
|
||||
+++ libvirt-4.6.0/src/security/virt-aa-helper.c
|
||||
--- libvirt-4.7.0.orig/src/security/virt-aa-helper.c
|
||||
+++ libvirt-4.7.0/src/security/virt-aa-helper.c
|
||||
@@ -515,7 +515,8 @@ valid_path(const char *path, const bool
|
||||
"/usr/share/ovmf/", /* for OVMF images */
|
||||
"/usr/share/AAVMF/", /* for AAVMF images */
|
||||
|
@ -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-4.6.0/src/qemu/qemu.conf
|
||||
Index: libvirt-4.7.0/src/qemu/qemu.conf
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/qemu/qemu.conf
|
||||
+++ libvirt-4.6.0/src/qemu/qemu.conf
|
||||
--- libvirt-4.7.0.orig/src/qemu/qemu.conf
|
||||
+++ libvirt-4.7.0/src/qemu/qemu.conf
|
||||
@@ -414,11 +414,20 @@
|
||||
# isolation, but it cannot appear in a list of drivers.
|
||||
#
|
||||
|
@ -1,9 +1,9 @@
|
||||
Adjust virtlockd sysconfig file to conform to SUSE standards
|
||||
|
||||
Index: libvirt-4.6.0/src/locking/virtlockd.sysconf
|
||||
Index: libvirt-4.7.0/src/locking/virtlockd.sysconf
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/locking/virtlockd.sysconf
|
||||
+++ libvirt-4.6.0/src/locking/virtlockd.sysconf
|
||||
--- libvirt-4.7.0.orig/src/locking/virtlockd.sysconf
|
||||
+++ libvirt-4.7.0/src/locking/virtlockd.sysconf
|
||||
@@ -1,3 +1,7 @@
|
||||
+## Path: System/Virtualization/virtlockd
|
||||
+
|
||||
|
@ -1,9 +1,9 @@
|
||||
Adjust virtlogd sysconfig file to conform to SUSE standards
|
||||
|
||||
Index: libvirt-4.6.0/src/logging/virtlogd.sysconf
|
||||
Index: libvirt-4.7.0/src/logging/virtlogd.sysconf
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/logging/virtlogd.sysconf
|
||||
+++ libvirt-4.6.0/src/logging/virtlogd.sysconf
|
||||
--- libvirt-4.7.0.orig/src/logging/virtlogd.sysconf
|
||||
+++ libvirt-4.7.0/src/logging/virtlogd.sysconf
|
||||
@@ -1,3 +1,7 @@
|
||||
+## Path: System/Virtualization/virtlogd
|
||||
+
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-4.6.0/src/xenconfig/xen_sxpr.c
|
||||
Index: libvirt-4.7.0/src/xenconfig/xen_sxpr.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/xenconfig/xen_sxpr.c
|
||||
+++ libvirt-4.6.0/src/xenconfig/xen_sxpr.c
|
||||
--- libvirt-4.7.0.orig/src/xenconfig/xen_sxpr.c
|
||||
+++ libvirt-4.7.0/src/xenconfig/xen_sxpr.c
|
||||
@@ -387,7 +387,7 @@ xenParseSxprVifRate(const char *rate, un
|
||||
static int
|
||||
xenParseSxprDisks(virDomainDefPtr def,
|
||||
|
@ -6,10 +6,10 @@ and 'file'. This was implicitly done prior to commit 9673418c.
|
||||
|
||||
https://bugzilla.suse.com/show_bug.cgi?id=938228
|
||||
|
||||
Index: libvirt-4.6.0/src/xenconfig/xen_sxpr.c
|
||||
Index: libvirt-4.7.0/src/xenconfig/xen_sxpr.c
|
||||
===================================================================
|
||||
--- libvirt-4.6.0.orig/src/xenconfig/xen_sxpr.c
|
||||
+++ libvirt-4.6.0/src/xenconfig/xen_sxpr.c
|
||||
--- libvirt-4.7.0.orig/src/xenconfig/xen_sxpr.c
|
||||
+++ libvirt-4.7.0/src/xenconfig/xen_sxpr.c
|
||||
@@ -501,10 +501,11 @@ xenParseSxprDisks(virDomainDefPtr def,
|
||||
omnipotent, we can revisit this, perhaps stat()'ing
|
||||
the src file in question */
|
||||
|
Loading…
Reference in New Issue
Block a user