diff --git a/0001-Extract-stats-functions-from-the-qemu-driver.patch b/0001-Extract-stats-functions-from-the-qemu-driver.patch index 039543d..4111d55 100644 --- a/0001-Extract-stats-functions-from-the-qemu-driver.patch +++ b/0001-Extract-stats-functions-from-the-qemu-driver.patch @@ -18,10 +18,10 @@ them. create mode 100644 src/conf/domain_stats.c create mode 100644 src/conf/domain_stats.h -Index: libvirt-5.2.0/src/conf/domain_stats.c +Index: libvirt-5.3.0/src/conf/domain_stats.c =================================================================== --- /dev/null -+++ libvirt-5.2.0/src/conf/domain_stats.c ++++ libvirt-5.3.0/src/conf/domain_stats.c @@ -0,0 +1,139 @@ +/* + * domain_stats.c: domain stats extraction helpers @@ -162,10 +162,10 @@ Index: libvirt-5.2.0/src/conf/domain_stats.c +} + +#undef STATS_ADD_NET_PARAM -Index: libvirt-5.2.0/src/conf/domain_stats.h +Index: libvirt-5.3.0/src/conf/domain_stats.h =================================================================== --- /dev/null -+++ libvirt-5.2.0/src/conf/domain_stats.h ++++ libvirt-5.3.0/src/conf/domain_stats.h @@ -0,0 +1,64 @@ +/* + * domain_stats.h: domain stats extraction helpers @@ -231,11 +231,11 @@ Index: libvirt-5.2.0/src/conf/domain_stats.h + int *maxparams); + +#endif /* __DOMAIN_STATS_H */ -Index: libvirt-5.2.0/src/libvirt_private.syms +Index: libvirt-5.3.0/src/libvirt_private.syms =================================================================== ---- libvirt-5.2.0.orig/src/libvirt_private.syms -+++ libvirt-5.2.0/src/libvirt_private.syms -@@ -672,6 +672,9 @@ virDomainConfNWFilterInstantiate; +--- libvirt-5.3.0.orig/src/libvirt_private.syms ++++ libvirt-5.3.0/src/libvirt_private.syms +@@ -678,6 +678,9 @@ virDomainConfNWFilterInstantiate; virDomainConfNWFilterTeardown; virDomainConfVMNWFilterTeardown; @@ -245,7 +245,7 @@ Index: libvirt-5.2.0/src/libvirt_private.syms # conf/interface_conf.h virInterfaceDefFormat; -@@ -1584,6 +1587,7 @@ virCgroupGetMemoryUsage; +@@ -1591,6 +1594,7 @@ virCgroupGetMemoryUsage; virCgroupGetMemSwapHardLimit; virCgroupGetMemSwapUsage; virCgroupGetPercpuStats; @@ -253,10 +253,10 @@ Index: libvirt-5.2.0/src/libvirt_private.syms virCgroupHasController; virCgroupHasEmptyTasks; virCgroupKillPainfully; -Index: libvirt-5.2.0/src/qemu/qemu_driver.c +Index: libvirt-5.3.0/src/qemu/qemu_driver.c =================================================================== ---- libvirt-5.2.0.orig/src/qemu/qemu_driver.c -+++ libvirt-5.2.0/src/qemu/qemu_driver.c +--- libvirt-5.3.0.orig/src/qemu/qemu_driver.c ++++ libvirt-5.3.0/src/qemu/qemu_driver.c @@ -67,6 +67,7 @@ #include "virarptable.h" #include "viruuid.h" @@ -265,7 +265,7 @@ Index: libvirt-5.2.0/src/qemu/qemu_driver.c #include "domain_audit.h" #include "node_device_conf.h" #include "virpci.h" -@@ -19941,21 +19942,7 @@ qemuDomainGetStatsState(virQEMUDriverPtr +@@ -19942,21 +19943,7 @@ qemuDomainGetStatsState(virQEMUDriverPtr int *maxparams, unsigned int privflags ATTRIBUTE_UNUSED) { @@ -288,7 +288,7 @@ Index: libvirt-5.2.0/src/qemu/qemu_driver.c } -@@ -20145,37 +20132,7 @@ qemuDomainGetStatsCpuCgroup(virDomainObj +@@ -20146,37 +20133,7 @@ qemuDomainGetStatsCpuCgroup(virDomainObj int *maxparams) { qemuDomainObjPrivatePtr priv = dom->privateData; @@ -327,7 +327,7 @@ Index: libvirt-5.2.0/src/qemu/qemu_driver.c } -@@ -20369,44 +20326,6 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr +@@ -20370,44 +20327,6 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr return ret; } @@ -372,7 +372,7 @@ Index: libvirt-5.2.0/src/qemu/qemu_driver.c static int qemuDomainGetStatsInterface(virQEMUDriverPtr driver ATTRIBUTE_UNUSED, virDomainObjPtr dom, -@@ -20414,68 +20333,9 @@ qemuDomainGetStatsInterface(virQEMUDrive +@@ -20415,68 +20334,9 @@ qemuDomainGetStatsInterface(virQEMUDrive int *maxparams, unsigned int privflags ATTRIBUTE_UNUSED) { @@ -442,7 +442,7 @@ Index: libvirt-5.2.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]; \ -@@ -20708,10 +20568,10 @@ qemuDomainGetStatsBlockExportHeader(virD +@@ -20709,10 +20569,10 @@ qemuDomainGetStatsBlockExportHeader(virD { int ret = -1; @@ -455,7 +455,7 @@ Index: libvirt-5.2.0/src/qemu/qemu_driver.c if (src->id) QEMU_ADD_BLOCK_PARAM_UI(records, nrecords, recordnr, "backingIndex", src->id); -@@ -20865,7 +20725,7 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr +@@ -20866,7 +20726,7 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr * after the iteration than it is to iterate twice; but we still * want count listed first. */ count_index = record->nparams; @@ -464,7 +464,7 @@ Index: libvirt-5.2.0/src/qemu/qemu_driver.c for (i = 0; i < dom->def->ndisks; i++) { if (qemuDomainGetStatsBlockExportDisk(dom->def->disks[i], stats, nodestats, -@@ -20890,8 +20750,6 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr +@@ -20891,8 +20751,6 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr #undef QEMU_ADD_BLOCK_PARAM_ULL @@ -473,7 +473,7 @@ Index: libvirt-5.2.0/src/qemu/qemu_driver.c #define QEMU_ADD_IOTHREAD_PARAM_UI(record, maxparams, id, name, value) \ do { \ char param_name[VIR_TYPED_PARAM_FIELD_LENGTH]; \ -@@ -20943,7 +20801,7 @@ qemuDomainGetStatsIOThread(virQEMUDriver +@@ -20944,7 +20802,7 @@ qemuDomainGetStatsIOThread(virQEMUDriver if (niothreads == 0) return 0; @@ -482,7 +482,7 @@ Index: libvirt-5.2.0/src/qemu/qemu_driver.c for (i = 0; i < niothreads; i++) { if (iothreads[i]->poll_valid) { -@@ -20976,8 +20834,6 @@ qemuDomainGetStatsIOThread(virQEMUDriver +@@ -20977,8 +20835,6 @@ qemuDomainGetStatsIOThread(virQEMUDriver #undef QEMU_ADD_IOTHREAD_PARAM_ULL @@ -491,11 +491,11 @@ Index: libvirt-5.2.0/src/qemu/qemu_driver.c static int qemuDomainGetStatsPerfOneEvent(virPerfPtr perf, virPerfEventType type, -Index: libvirt-5.2.0/src/util/vircgroup.c +Index: libvirt-5.3.0/src/util/vircgroup.c =================================================================== ---- libvirt-5.2.0.orig/src/util/vircgroup.c -+++ libvirt-5.2.0/src/util/vircgroup.c -@@ -2800,6 +2800,44 @@ virCgroupControllerAvailable(int control +--- libvirt-5.3.0.orig/src/util/vircgroup.c ++++ libvirt-5.3.0/src/util/vircgroup.c +@@ -2774,6 +2774,44 @@ virCgroupControllerAvailable(int control return ret; } @@ -540,7 +540,7 @@ Index: libvirt-5.2.0/src/util/vircgroup.c #else /* !__linux__ */ bool -@@ -2809,6 +2847,15 @@ virCgroupAvailable(void) +@@ -2783,6 +2821,15 @@ virCgroupAvailable(void) } @@ -556,11 +556,11 @@ Index: libvirt-5.2.0/src/util/vircgroup.c int virCgroupNewPartition(const char *path ATTRIBUTE_UNUSED, bool create ATTRIBUTE_UNUSED, -Index: libvirt-5.2.0/src/util/vircgroup.h +Index: libvirt-5.3.0/src/util/vircgroup.h =================================================================== ---- libvirt-5.2.0.orig/src/util/vircgroup.h -+++ libvirt-5.2.0/src/util/vircgroup.h -@@ -284,4 +284,9 @@ int virCgroupSetOwner(virCgroupPtr cgrou +--- libvirt-5.3.0.orig/src/util/vircgroup.h ++++ libvirt-5.3.0/src/util/vircgroup.h +@@ -285,4 +285,9 @@ int virCgroupSetOwner(virCgroupPtr cgrou int virCgroupHasEmptyTasks(virCgroupPtr cgroup, int controller); bool virCgroupControllerAvailable(int controller); @@ -570,11 +570,11 @@ Index: libvirt-5.2.0/src/util/vircgroup.h + int *maxparams); + #endif /* LIBVIRT_VIRCGROUP_H */ -Index: libvirt-5.2.0/src/conf/Makefile.inc.am +Index: libvirt-5.3.0/src/conf/Makefile.inc.am =================================================================== ---- libvirt-5.2.0.orig/src/conf/Makefile.inc.am -+++ libvirt-5.2.0/src/conf/Makefile.inc.am -@@ -20,6 +20,8 @@ DOMAIN_CONF_SOURCES = \ +--- libvirt-5.3.0.orig/src/conf/Makefile.inc.am ++++ libvirt-5.3.0/src/conf/Makefile.inc.am +@@ -22,6 +22,8 @@ DOMAIN_CONF_SOURCES = \ conf/domain_audit.h \ conf/domain_nwfilter.c \ conf/domain_nwfilter.h \ diff --git a/0001-libxl-add-support-for-BlockResize-API.patch b/0001-libxl-add-support-for-BlockResize-API.patch index ed77318..4eb0a9c 100644 --- a/0001-libxl-add-support-for-BlockResize-API.patch +++ b/0001-libxl-add-support-for-BlockResize-API.patch @@ -19,11 +19,11 @@ reworking this patch and submitting it to upstream libvirt. src/libxl/libxl_driver.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) -Index: libvirt-5.2.0/src/libxl/libxl_driver.c +Index: libvirt-5.3.0/src/libxl/libxl_driver.c =================================================================== ---- libvirt-5.2.0.orig/src/libxl/libxl_driver.c -+++ libvirt-5.2.0/src/libxl/libxl_driver.c -@@ -5245,6 +5245,97 @@ libxlDomainMemoryStats(virDomainPtr dom, +--- libvirt-5.3.0.orig/src/libxl/libxl_driver.c ++++ libvirt-5.3.0/src/libxl/libxl_driver.c +@@ -5266,6 +5266,97 @@ libxlDomainMemoryStats(virDomainPtr dom, #undef LIBXL_SET_MEMSTAT @@ -121,7 +121,7 @@ Index: libvirt-5.2.0/src/libxl/libxl_driver.c static int libxlDomainGetJobInfo(virDomainPtr dom, virDomainJobInfoPtr info) -@@ -6629,6 +6720,7 @@ static virHypervisorDriver libxlHypervis +@@ -6650,6 +6741,7 @@ static virHypervisorDriver libxlHypervis #endif .nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */ .nodeGetCellsFreeMemory = libxlNodeGetCellsFreeMemory, /* 1.1.1 */ diff --git a/0002-lxc-implement-connectGetAllDomainStats.patch b/0002-lxc-implement-connectGetAllDomainStats.patch index 9459d49..a2bc447 100644 --- a/0002-lxc-implement-connectGetAllDomainStats.patch +++ b/0002-lxc-implement-connectGetAllDomainStats.patch @@ -9,10 +9,10 @@ them using the existing API. src/lxc/lxc_driver.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) -Index: libvirt-5.2.0/src/lxc/lxc_driver.c +Index: libvirt-5.3.0/src/lxc/lxc_driver.c =================================================================== ---- libvirt-5.2.0.orig/src/lxc/lxc_driver.c -+++ libvirt-5.2.0/src/lxc/lxc_driver.c +--- libvirt-5.3.0.orig/src/lxc/lxc_driver.c ++++ libvirt-5.3.0/src/lxc/lxc_driver.c @@ -75,6 +75,7 @@ #include "viraccessapichecklxc.h" #include "virhostdev.h" @@ -21,7 +21,7 @@ Index: libvirt-5.2.0/src/lxc/lxc_driver.c #define VIR_FROM_THIS VIR_FROM_LXC -@@ -5374,6 +5375,142 @@ lxcDomainHasManagedSaveImage(virDomainPt +@@ -5393,6 +5394,142 @@ lxcDomainHasManagedSaveImage(virDomainPt return ret; } @@ -164,7 +164,7 @@ Index: libvirt-5.2.0/src/lxc/lxc_driver.c /* Function Tables */ static virHypervisorDriver lxcHypervisorDriver = { -@@ -5469,6 +5606,7 @@ static virHypervisorDriver lxcHypervisor +@@ -5488,6 +5625,7 @@ static virHypervisorDriver lxcHypervisor .nodeGetFreePages = lxcNodeGetFreePages, /* 1.2.6 */ .nodeAllocPages = lxcNodeAllocPages, /* 1.2.9 */ .domainHasManagedSaveImage = lxcDomainHasManagedSaveImage, /* 1.2.13 */ diff --git a/22dc3e94-revert-f1d65853.patch b/22dc3e94-revert-f1d65853.patch deleted file mode 100644 index 2366a8f..0000000 --- a/22dc3e94-revert-f1d65853.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit 22dc3e94c24b4d9a6c28beda91b9b283eb9b0251 -Author: Michal Privoznik -Date: Thu Apr 11 15:40:51 2019 +0200 - - Revert "domain_conf: check device address before attach" - - This reverts commit f1d6585300001c7b23b8796a0faa4411c3531996. - - Turns out, this caused a regression. There is this (perhaps less - known) semantic of virDomainAttachDevice() where if the device - the API is trying to attach is a CDROM/floppy that is already in - the domain the attach request is handled as 'change the media in - the drive'. - - We have a better fix anyways. - - Signed-off-by: Michal Privoznik - Tested-by: Daniel Henrique Barboza - Reviewed-by: Jim Fehlig - -Index: libvirt-5.2.0/src/conf/domain_conf.c -=================================================================== ---- libvirt-5.2.0.orig/src/conf/domain_conf.c -+++ libvirt-5.2.0/src/conf/domain_conf.c -@@ -28589,15 +28589,6 @@ virDomainDefCompatibleDevice(virDomainDe - if (oldDev) - data.oldInfo = virDomainDeviceGetInfo(oldDev); - -- if (action == VIR_DOMAIN_DEVICE_ACTION_ATTACH && -- data.newInfo && -- data.newInfo->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && -- virDomainDefHasDeviceAddress(def, data.newInfo)) { -- virReportError(VIR_ERR_OPERATION_INVALID, "%s", -- _("Domain already contains a device with the same address")); -- return -1; -- } -- - if (action == VIR_DOMAIN_DEVICE_ACTION_UPDATE && - live && - (data.newInfo && data.oldInfo && diff --git a/2a07c990-api-CVE-2019-3886.patch b/2a07c990-api-CVE-2019-3886.patch deleted file mode 100644 index a789212..0000000 --- a/2a07c990-api-CVE-2019-3886.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 2a07c990bd9143d7a0fe8d1b6b7c763c52185240 -Author: Daniel P. Berrangé -Date: Wed Mar 27 10:59:58 2019 +0000 - - api: disallow virDomainGetHostname for read-only connections - - The virDomainGetHostname API is fetching guest information and this may - involve use of an untrusted guest agent. As such its use must be - forbidden on a read-only connection to libvirt. - - Fixes CVE-2019-3886 - Reviewed-by: Jim Fehlig - Signed-off-by: Daniel P. Berrangé - -Index: libvirt-5.2.0/src/libvirt-domain.c -=================================================================== ---- libvirt-5.2.0.orig/src/libvirt-domain.c -+++ libvirt-5.2.0/src/libvirt-domain.c -@@ -11031,6 +11031,8 @@ virDomainGetHostname(virDomainPtr domain - virCheckDomainReturn(domain, NULL); - conn = domain->conn; - -+ virCheckReadOnlyGoto(domain->conn->flags, error); -+ - if (conn->driver->domainGetHostname) { - char *ret; - ret = conn->driver->domainGetHostname(domain, flags); diff --git a/89237d53-conf-expose-virDomainSCSIDriveAddressIsUsed.patch b/89237d53-conf-expose-virDomainSCSIDriveAddressIsUsed.patch deleted file mode 100644 index 9163a52..0000000 --- a/89237d53-conf-expose-virDomainSCSIDriveAddressIsUsed.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit 89237d534f0fe950d06a2081089154160c6c2224 -Author: Michal Privoznik -Date: Thu Apr 11 15:44:14 2019 +0200 - - conf: Expose virDomainSCSIDriveAddressIsUsed - - This function checks if given drive address is already present in - passed domain definition. Expose the function as it will be used - shortly. - - Signed-off-by: Michal Privoznik - Tested-by: Daniel Henrique Barboza - Reviewed-by: Jim Fehlig - -Index: libvirt-5.2.0/src/conf/domain_conf.c -=================================================================== ---- libvirt-5.2.0.orig/src/conf/domain_conf.c -+++ libvirt-5.2.0/src/conf/domain_conf.c -@@ -4644,7 +4644,7 @@ virDomainDriveAddressIsUsedByHostdev(con - * Return true if the SCSI drive address is already in use, false - * otherwise. - */ --static bool -+bool - virDomainSCSIDriveAddressIsUsed(const virDomainDef *def, - const virDomainDeviceDriveAddress *addr) - { -Index: libvirt-5.2.0/src/conf/domain_conf.h -=================================================================== ---- libvirt-5.2.0.orig/src/conf/domain_conf.h -+++ libvirt-5.2.0/src/conf/domain_conf.h -@@ -2697,6 +2697,10 @@ virDomainXMLNamespacePtr - virDomainXMLOptionGetNamespace(virDomainXMLOptionPtr xmlopt) - ATTRIBUTE_NONNULL(1); - -+bool -+virDomainSCSIDriveAddressIsUsed(const virDomainDef *def, -+ const virDomainDeviceDriveAddress *addr); -+ - int virDomainDefPostParse(virDomainDefPtr def, - virCapsPtr caps, - unsigned int parseFlags, -Index: libvirt-5.2.0/src/libvirt_private.syms -=================================================================== ---- libvirt-5.2.0.orig/src/libvirt_private.syms -+++ libvirt-5.2.0/src/libvirt_private.syms -@@ -534,6 +534,7 @@ virDomainRunningReasonTypeToString; - virDomainSaveConfig; - virDomainSaveStatus; - virDomainSaveXML; -+virDomainSCSIDriveAddressIsUsed; - virDomainSeclabelTypeFromString; - virDomainSeclabelTypeToString; - virDomainShmemDefEquals; diff --git a/ae076bb4-remote-CVE-2019-3886.patch b/ae076bb4-remote-CVE-2019-3886.patch deleted file mode 100644 index f60168d..0000000 --- a/ae076bb4-remote-CVE-2019-3886.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit ae076bb40e0e150aef41361b64001138d04d6c60 -Author: Daniel P. Berrangé -Date: Wed Mar 27 11:22:49 2019 +0000 - - remote: enforce ACL write permission for getting guest time & hostname - - Getting the guest time and hostname both require use of guest agent - commands. These must not be allowed for read-only users, so the - permissions check must validate "write" permission not "read". - - Fixes CVE-2019-3886 - Reviewed-by: Jim Fehlig - Signed-off-by: Daniel P. Berrangé - -Index: libvirt-5.2.0/src/remote/remote_protocol.x -=================================================================== ---- libvirt-5.2.0.orig/src/remote/remote_protocol.x -+++ libvirt-5.2.0/src/remote/remote_protocol.x -@@ -5513,7 +5513,7 @@ enum remote_procedure { - - /** - * @generate: both -- * @acl: domain:read -+ * @acl: domain:write - */ - REMOTE_PROC_DOMAIN_GET_HOSTNAME = 277, - -@@ -5908,7 +5908,7 @@ enum remote_procedure { - - /** - * @generate: none -- * @acl: domain:read -+ * @acl: domain:write - */ - REMOTE_PROC_DOMAIN_GET_TIME = 337, - diff --git a/blockcopy-check-dst-identical-device.patch b/blockcopy-check-dst-identical-device.patch index 53a8f85..18019a9 100644 --- a/blockcopy-check-dst-identical-device.patch +++ b/blockcopy-check-dst-identical-device.patch @@ -11,11 +11,11 @@ Signed-off-by: Chunyan Liu src/qemu/qemu_driver.c | 7 +++++++ 1 file changed, 7 insertions(+) -Index: libvirt-5.2.0/src/qemu/qemu_driver.c +Index: libvirt-5.3.0/src/qemu/qemu_driver.c =================================================================== ---- libvirt-5.2.0.orig/src/qemu/qemu_driver.c -+++ libvirt-5.2.0/src/qemu/qemu_driver.c -@@ -17735,6 +17735,14 @@ qemuDomainBlockCopyCommon(virDomainObjPt +--- libvirt-5.3.0.orig/src/qemu/qemu_driver.c ++++ libvirt-5.3.0/src/qemu/qemu_driver.c +@@ -17692,6 +17692,14 @@ qemuDomainBlockCopyCommon(virDomainObjPt goto endjob; } diff --git a/ddc72f99-qemu-check-dup-drive-address.patch b/ddc72f99-qemu-check-dup-drive-address.patch deleted file mode 100644 index 0bf1a1b..0000000 --- a/ddc72f99-qemu-check-dup-drive-address.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit ddc72f99027b063feaf34e5fda89916b6b2c8943 -Author: Michal Privoznik -Date: Thu Apr 11 15:45:27 2019 +0200 - - qemu_hotplug: Check for duplicate drive addresses - - This tries to fix the same problem as f1d65853000 but it's doing - so in a less invasive way. - - Signed-off-by: Michal Privoznik - Tested-by: Daniel Henrique Barboza - Reviewed-by: Jim Fehlig - -Index: libvirt-5.2.0/src/qemu/qemu_hotplug.c -=================================================================== ---- libvirt-5.2.0.orig/src/qemu/qemu_hotplug.c -+++ libvirt-5.2.0/src/qemu/qemu_hotplug.c -@@ -1181,6 +1181,12 @@ qemuDomainAttachSCSIDisk(virQEMUDriverPt - return -1; - } - -+ if (virDomainSCSIDriveAddressIsUsed(vm->def, &disk->info.addr.drive)) { -+ virReportError(VIR_ERR_OPERATION_INVALID, "%s", -+ _("Domain already contains a disk with that address")); -+ return -1; -+ } -+ - /* Let's make sure the disk has a controller defined and loaded before - * trying to add it. The controller used by the disk must exist before a - * qemu command line string is generated. diff --git a/ebe9c6ea-qemu-firmware-dirent.patch b/ebe9c6ea-qemu-firmware-dirent.patch deleted file mode 100644 index a3cfbfd..0000000 --- a/ebe9c6ea-qemu-firmware-dirent.patch +++ /dev/null @@ -1,43 +0,0 @@ -commit ebe9c6eab77e2da500c24430addfcd9f10b1676d -Author: Daniel P. Berrangé -Date: Tue Apr 2 13:27:44 2019 +0100 - - qemu: don't rely on the non-portable d_type field in dirent - - d_type is a non-portable extension to the struct dirent and even if it - exists, its value may be DT_UNKNOWN if the filesystem doesn't support - it. This is common with older versions of XFS which have ftype=0 - feature. - - Signed-off-by: Daniel P. Berrangé - -Index: libvirt-5.2.0/src/qemu/qemu_firmware.c -=================================================================== ---- libvirt-5.2.0.orig/src/qemu/qemu_firmware.c -+++ libvirt-5.2.0/src/qemu/qemu_firmware.c -@@ -924,9 +924,7 @@ qemuFirmwareBuildFileList(virHashTablePt - while ((rc = virDirRead(dirp, &ent, dir)) > 0) { - VIR_AUTOFREE(char *) filename = NULL; - VIR_AUTOFREE(char *) path = NULL; -- -- if (ent->d_type != DT_REG && ent->d_type != DT_LNK) -- continue; -+ struct stat sb; - - if (STRPREFIX(ent->d_name, ".")) - continue; -@@ -937,6 +935,14 @@ qemuFirmwareBuildFileList(virHashTablePt - if (virAsprintf(&path, "%s/%s", dir, filename) < 0) - goto cleanup; - -+ if (stat(path, &sb) < 0) { -+ virReportSystemError(errno, _("Unable to access %s"), path); -+ goto cleanup; -+ } -+ -+ if (!S_ISREG(sb.st_mode) && !S_ISLNK(sb.st_mode)) -+ continue; -+ - if (virHashUpdateEntry(files, filename, path) < 0) - goto cleanup; - diff --git a/ee2c5ef3-test-scsi-disk.patch b/ee2c5ef3-test-scsi-disk.patch deleted file mode 100644 index 54c5a96..0000000 --- a/ee2c5ef3-test-scsi-disk.patch +++ /dev/null @@ -1,56 +0,0 @@ -commit ee2c5ef39fd91345893904433c6f458685543af5 -Author: Michal Privoznik -Date: Thu Apr 11 16:23:38 2019 +0200 - - qemuhotplugtest: Don't plug a SCSI disk at unit 7 - - Unit number 7 is kind of special. It's reserved for SCSI - controller. The comment in virDomainSCSIDriveAddressIsUsed() - summarizes that pretty nicely. Libvirt would never generate - such address. - - Signed-off-by: Michal Privoznik - Tested-by: Daniel Henrique Barboza - Reviewed-by: Jim Fehlig - -Index: libvirt-5.2.0/tests/qemuhotplugtest.c -=================================================================== ---- libvirt-5.2.0.orig/tests/qemuhotplugtest.c -+++ libvirt-5.2.0/tests/qemuhotplugtest.c -@@ -715,7 +715,7 @@ mymain(void) - "device_del", QMP_OK, - "human-monitor-command", HMP("")); - DO_TEST_DETACH("base-with-scsi-controller-live", "disk-scsi-2", false, false, -- "device_del", QMP_DEVICE_DELETED("scsi3-0-5-7") QMP_OK, -+ "device_del", QMP_DEVICE_DELETED("scsi3-0-5-6") QMP_OK, - "human-monitor-command", HMP("")); - - DO_TEST_ATTACH("base-live", "qemu-agent", false, true, -Index: libvirt-5.2.0/tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-2.xml -=================================================================== ---- libvirt-5.2.0.orig/tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-2.xml -+++ libvirt-5.2.0/tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-2.xml -@@ -2,7 +2,7 @@ - - - --
-+
- - - -Index: libvirt-5.2.0/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml -=================================================================== ---- libvirt-5.2.0.orig/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml -+++ libvirt-5.2.0/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml -@@ -26,8 +26,8 @@ - - - -- --
-+ -+
- - - diff --git a/f66f70ac-snapshot-fix-use-after-free.patch b/f66f70ac-snapshot-fix-use-after-free.patch deleted file mode 100644 index 9b40870..0000000 --- a/f66f70ac-snapshot-fix-use-after-free.patch +++ /dev/null @@ -1,56 +0,0 @@ -commit f66f70acbe22527423b781cb6178859309843706 -Author: Eric Blake -Date: Mon Apr 8 11:45:47 2019 -0500 - - snapshot: Fix use-after-free during snapshot delete - - Commit b647d2195 introduced a use-after-free situation when the caller - is trying to delete a snapshot and its children: if the callback - function deletes the parent, it is no longer safe to query the parent - to learn which children also need to be deleted (where we previously - saved deleting the parent for last). To fix the problem, while still - maintaining support for topological visits of callback functions, we - have to stash off any information needed for later traversal prior to - using a callback function (virDomainMomentForEachChild already does - this, it is only virDomainMomentActOnDescendant that was running into - problems). - - Sadly, the testsuite did not cover the problem at the time. Worse, - even though I later added commit 280a2b41e to catch problems like - this, and even though that test is indeed sufficient to detect the - problem when run under valgrind or suitable MALLOC_PERTURB_ settings, - I'm guilty of not running the test in such an environment. Thus, - v5.2.0 has a regression that could have been prevented had we used the - testsuite to its full power. On the bright side, deleting snapshots - requires ACL domain:snapshot, which is arguably as powerful as - domain:write, so I don't think this use-after-free forms a security - hole. - - At some point, it would be nice to convert virDomainMomentObj into a - virObject, at which point, the solution is even simpler: add - virObjectRef/Unref around the callback. But as that will require - auditing even more places in the code, I went with the simplest patch - for the regression fix. - - Fixes: b647d2195 - Reported-by: Roman Bogorodskiy - Signed-off-by: Eric Blake - Tested-by: Roman Bogorodskiy - -Index: libvirt-5.2.0/src/conf/virdomainmomentobjlist.c -=================================================================== ---- libvirt-5.2.0.orig/src/conf/virdomainmomentobjlist.c -+++ libvirt-5.2.0/src/conf/virdomainmomentobjlist.c -@@ -80,9 +80,11 @@ virDomainMomentActOnDescendant(void *pay - { - virDomainMomentObjPtr obj = payload; - struct moment_act_on_descendant *curr = data; -+ virDomainMomentObj tmp = *obj; - -+ /* Careful: curr->iter can delete obj, hence the need for tmp */ - (curr->iter)(payload, name, curr->data); -- curr->number += 1 + virDomainMomentForEachDescendant(obj, -+ curr->number += 1 + virDomainMomentForEachDescendant(&tmp, - curr->iter, - curr->data); - return 0; diff --git a/ff376c62-tests-fix-mocking-stat-lstat.patch b/ff376c62-tests-fix-mocking-stat-lstat.patch deleted file mode 100644 index 36d9bc1..0000000 --- a/ff376c62-tests-fix-mocking-stat-lstat.patch +++ /dev/null @@ -1,1276 +0,0 @@ -commit ff376c6283c97217fa65766e3b24d27929e3ff6e -Author: Daniel P. Berrangé -Date: Mon Apr 1 17:47:25 2019 +0100 - - tests: fix mocking of stat() / lstat() functions - - Quite a few of the tests have a need to mock the stat() / lstat() - functions and they are taking somewhat different & inconsistent - approaches none of which are actually fully correct. This is shown - by fact that 'make check' fails on 32-bit hosts. Investigation - revealed that the code was calling into the native C library impl, - not getting intercepted by our mocks. - - The POSIX stat() function might resolve to any number of different - symbols in the C library. - - The may be an additional stat64() function exposed by the headers - too. - - On 64-bit hosts the stat & stat64 functions are identical, always - refering to the 64-bit ABI. - - On 32-bit hosts they refer to the 32-bit & 64-bit ABIs respectively. - - Libvirt uses _FILE_OFFSET_BITS=64 on 32-bit hosts, which causes the - C library to transparently rewrite stat() calls to be stat64() calls. - Libvirt will never see the 32-bit ABI from the traditional stat() - call. We cannot assume this rewriting is done using a macro. It might - be, but on GLibC it is done with a magic __asm__ statement to apply - the rewrite at link time instead of at preprocessing. - - In GLibC there may be two additional functions exposed by the headers, - __xstat() and __xstat64(). When these exist, stat() and stat64() are - transparently rewritten to call __xstat() and __xstat64() respectively. - The former symbols will not actally exist in the library at all, only - the header. The leading "__" indicates the symbols are a private impl - detail of the C library that applications should not care about. - Unfortunately, because we are trying to mock replace the C library, - we need to know about this internal impl detail. - - With all this in mind the list of functions we have to mock will depend - on several factors - - - If _FILE_OFFSET_BITS is set, then we are on a 32-bit host, and we - only need to mock stat64 and __xstat64. The other stat / __xstat - functions exist, but we'll never call them so they can be ignored - for mocking. - - - If _FILE_OFFSET_BITS is not set, then we are on a 64-bit host and - we should mock stat, stat64, __xstat & __xstat64. Either may be - called by app code. - - - If __xstat & __xstat64 exist, then stat & stat64 will not exist - as symbols in the library, so the latter should not be mocked. - - The same all applies to lstat() - - These rules are complex enough that we don't want to duplicate them - across every mock file, so this centralizes all the logic in a helper - file virmockstathelper.c that should be #included when needed. The - code merely need to provide a filename rewriting callback called - virMockStatRedirect(). Optionally VIR_MOCK_STAT_HOOK can be defined - as a macro if further processing is needed inline. - - Signed-off-by: Daniel P. Berrangé - -Index: libvirt-5.2.0/cfg.mk -=================================================================== ---- libvirt-5.2.0.orig/cfg.mk -+++ libvirt-5.2.0/cfg.mk -@@ -1272,10 +1272,10 @@ exclude_file_name_regexp--sc_prohibit_xm - exclude_file_name_regexp--sc_prohibit_return_as_function = \.py$$ - - exclude_file_name_regexp--sc_require_config_h = \ -- ^(examples/|tools/virsh-edit\.c$$) -+ ^(examples/|tools/virsh-edit\.c$$|tests/virmockstathelpers.c) - - exclude_file_name_regexp--sc_require_config_h_first = \ -- ^(examples/|tools/virsh-edit\.c$$) -+ ^(examples/|tools/virsh-edit\.c$$|tests/virmockstathelpers.c) - - exclude_file_name_regexp--sc_trailing_blank = \ - /sysinfodata/.*\.data|/virhostcpudata/.*\.cpuinfo|^gnulib/local/.*/.*diff$$ -Index: libvirt-5.2.0/tests/Makefile.am -=================================================================== ---- libvirt-5.2.0.orig/tests/Makefile.am -+++ libvirt-5.2.0/tests/Makefile.am -@@ -146,6 +146,7 @@ EXTRA_DIST = \ - virjsondata \ - virmacmaptestdata \ - virmock.h \ -+ virmockstathelpers.h \ - virnetdaemondata \ - virnetdevtestdata \ - virnwfilterbindingxml2xmldata \ -Index: libvirt-5.2.0/tests/qemusecuritymock.c -=================================================================== ---- libvirt-5.2.0.orig/tests/qemusecuritymock.c -+++ libvirt-5.2.0/tests/qemusecuritymock.c -@@ -50,10 +50,6 @@ - - - static int (*real_chown)(const char *path, uid_t uid, gid_t gid); --static int (*real_lstat)(const char *path, struct stat *sb); --static int (*real___lxstat)(int ver, const char *path, struct stat *sb); --static int (*real_stat)(const char *path, struct stat *sb); --static int (*real___xstat)(int ver, const char *path, struct stat *sb); - static int (*real_open)(const char *path, int flags, ...); - static int (*real_close)(int fd); - -@@ -106,8 +102,6 @@ init_syms(void) - return; - - VIR_MOCK_REAL_INIT(chown); -- VIR_MOCK_REAL_INIT_ALT(lstat, __lxstat); -- VIR_MOCK_REAL_INIT_ALT(stat, __xstat); - VIR_MOCK_REAL_INIT(open); - VIR_MOCK_REAL_INIT(close); - -@@ -211,36 +205,35 @@ int virFileRemoveXAttr(const char *path, - } - - --static int --mock_stat(const char *path, -- struct stat *sb) --{ -- uint32_t *val; -- -- virMutexLock(&m); -- init_hash(); -- -- memset(sb, 0, sizeof(*sb)); -- -- sb->st_mode = S_IFREG | 0666; -- sb->st_size = 123456; -- sb->st_ino = 1; -- -- if (!(val = virHashLookup(chown_paths, path))) { -- /* New path. Set the defaults */ -- sb->st_uid = DEFAULT_UID; -- sb->st_gid = DEFAULT_GID; -- } else { -- /* Known path. Set values passed to chown() earlier */ -- sb->st_uid = *val % 16; -- sb->st_gid = *val >> 16; -- } -- -- virMutexUnlock(&m); -- -- return 0; --} -- -+#define VIR_MOCK_STAT_HOOK \ -+ do { \ -+ if (getenv(ENVVAR)) { \ -+ uint32_t *val; \ -+\ -+ virMutexLock(&m); \ -+ init_hash(); \ -+\ -+ memset(sb, 0, sizeof(*sb)); \ -+\ -+ sb->st_mode = S_IFREG | 0666; \ -+ sb->st_size = 123456; \ -+ sb->st_ino = 1; \ -+\ -+ if (!(val = virHashLookup(chown_paths, path))) { \ -+ /* New path. Set the defaults */ \ -+ sb->st_uid = DEFAULT_UID; \ -+ sb->st_gid = DEFAULT_GID; \ -+ } else { \ -+ /* Known path. Set values passed to chown() earlier */ \ -+ sb->st_uid = *val % 16; \ -+ sb->st_gid = *val >> 16; \ -+ } \ -+\ -+ virMutexUnlock(&m); \ -+\ -+ return 0; \ -+ } \ -+ } while (0) - - static int - mock_chown(const char *path, -@@ -276,68 +269,12 @@ mock_chown(const char *path, - } - - --#ifdef HAVE___LXSTAT --int --__lxstat(int ver, const char *path, struct stat *sb) --{ -- int ret; -- -- init_syms(); -- -- if (getenv(ENVVAR)) -- ret = mock_stat(path, sb); -- else -- ret = real___lxstat(ver, path, sb); -- -- return ret; --} --#endif /* HAVE___LXSTAT */ -- --int --lstat(const char *path, struct stat *sb) --{ -- int ret; -- -- init_syms(); -+#include "virmockstathelpers.c" - -- if (getenv(ENVVAR)) -- ret = mock_stat(path, sb); -- else -- ret = real_lstat(path, sb); -- -- return ret; --} -- --#ifdef HAVE___XSTAT --int --__xstat(int ver, const char *path, struct stat *sb) --{ -- int ret; -- -- init_syms(); -- -- if (getenv(ENVVAR)) -- ret = mock_stat(path, sb); -- else -- ret = real___xstat(ver, path, sb); -- -- return ret; --} --#endif /* HAVE___XSTAT */ -- --int --stat(const char *path, struct stat *sb) -+static int -+virMockStatRedirect(const char *path ATTRIBUTE_UNUSED, char **newpath ATTRIBUTE_UNUSED) - { -- int ret; -- -- init_syms(); -- -- if (getenv(ENVVAR)) -- ret = mock_stat(path, sb); -- else -- ret = real_stat(path, sb); -- -- return ret; -+ return 0; - } - - -@@ -386,6 +323,8 @@ close(int fd) - { - int ret; - -+ init_syms(); -+ - if (fd == 42 && getenv(ENVVAR)) - ret = 0; - else -Index: libvirt-5.2.0/tests/vircgroupmock.c -=================================================================== ---- libvirt-5.2.0.orig/tests/vircgroupmock.c -+++ libvirt-5.2.0/tests/vircgroupmock.c -@@ -38,10 +38,6 @@ - static int (*real_open)(const char *path, int flags, ...); - static FILE *(*real_fopen)(const char *path, const char *mode); - static int (*real_access)(const char *path, int mode); --static int (*real_stat)(const char *path, struct stat *sb); --static int (*real___xstat)(int ver, const char *path, struct stat *sb); --static int (*real_lstat)(const char *path, struct stat *sb); --static int (*real___lxstat)(int ver, const char *path, struct stat *sb); - static int (*real_mkdir)(const char *path, mode_t mode); - - /* Don't make static, since it causes problems with clang -@@ -317,8 +313,6 @@ static void init_syms(void) - - VIR_MOCK_REAL_INIT(fopen); - VIR_MOCK_REAL_INIT(access); -- VIR_MOCK_REAL_INIT_ALT(lstat, __lxstat); -- VIR_MOCK_REAL_INIT_ALT(stat, __xstat); - VIR_MOCK_REAL_INIT(mkdir); - VIR_MOCK_REAL_INIT(open); - } -@@ -508,139 +502,41 @@ int access(const char *path, int mode) - return ret; - } - --int __lxstat(int ver, const char *path, struct stat *sb) --{ -- int ret; -- -- init_syms(); -- -- if (STRPREFIX(path, SYSFS_CGROUP_PREFIX)) { -- init_sysfs(); -- char *newpath; -- if (asprintf(&newpath, "%s%s", -- fakesysfscgroupdir, -- path + strlen(SYSFS_CGROUP_PREFIX)) < 0) { -- errno = ENOMEM; -- return -1; -- } -- ret = real___lxstat(ver, newpath, sb); -- free(newpath); -- } else if (STRPREFIX(path, fakedevicedir0)) { -- sb->st_mode = S_IFBLK; -- sb->st_rdev = makedev(8, 0); -- return 0; -- } else if (STRPREFIX(path, fakedevicedir1)) { -- sb->st_mode = S_IFBLK; -- sb->st_rdev = makedev(9, 0); -- return 0; -- } else { -- ret = real___lxstat(ver, path, sb); -- } -- return ret; --} -- --int lstat(const char *path, struct stat *sb) --{ -- int ret; -- -- init_syms(); -- -- if (STRPREFIX(path, SYSFS_CGROUP_PREFIX)) { -- init_sysfs(); -- char *newpath; -- if (asprintf(&newpath, "%s%s", -- fakesysfscgroupdir, -- path + strlen(SYSFS_CGROUP_PREFIX)) < 0) { -- errno = ENOMEM; -- return -1; -- } -- ret = real_lstat(newpath, sb); -- free(newpath); -- } else if (STRPREFIX(path, fakedevicedir0)) { -- sb->st_mode = S_IFBLK; -- sb->st_rdev = makedev(8, 0); -- return 0; -- } else if (STRPREFIX(path, fakedevicedir1)) { -- sb->st_mode = S_IFBLK; -- sb->st_rdev = makedev(9, 0); -- return 0; -- } else { -- ret = real_lstat(path, sb); -- } -- return ret; --} -- --int __xstat(int ver, const char *path, struct stat *sb) --{ -- int ret; -- -- init_syms(); -+# define VIR_MOCK_STAT_HOOK \ -+ do { \ -+ if (STRPREFIX(path, fakedevicedir0)) { \ -+ sb->st_mode = S_IFBLK; \ -+ sb->st_rdev = makedev(8, 0); \ -+ return 0; \ -+ } else if (STRPREFIX(path, fakedevicedir1)) { \ -+ sb->st_mode = S_IFBLK; \ -+ sb->st_rdev = makedev(9, 0); \ -+ return 0; \ -+ } \ -+ } while (0) - -- if (STRPREFIX(path, SYSFS_CGROUP_PREFIX)) { -- init_sysfs(); -- char *newpath; -- if (asprintf(&newpath, "%s%s", -- fakesysfscgroupdir, -- path + strlen(SYSFS_CGROUP_PREFIX)) < 0) { -- errno = ENOMEM; -- return -1; -- } -- ret = real___xstat(ver, newpath, sb); -- free(newpath); -- } else if (STRPREFIX(path, fakedevicedir0)) { -- sb->st_mode = S_IFBLK; -- sb->st_rdev = makedev(8, 0); -- return 0; -- } else if (STRPREFIX(path, fakedevicedir1)) { -- sb->st_mode = S_IFBLK; -- sb->st_rdev = makedev(9, 0); -- return 0; -- } else { -- ret = real___xstat(ver, path, sb); -- } -- return ret; --} -+# include "virmockstathelpers.c" - --int stat(const char *path, struct stat *sb) -+static int -+virMockStatRedirect(const char *path, char **newpath) - { -- char *newpath = NULL; -- int ret; -- -- init_syms(); -- - if (STREQ(path, SYSFS_CPU_PRESENT)) { - init_sysfs(); -- if (asprintf(&newpath, "%s/%s", -+ if (asprintf(newpath, "%s/%s", - fakesysfscgroupdir, -- SYSFS_CPU_PRESENT_MOCKED) < 0) { -- errno = ENOMEM; -+ SYSFS_CPU_PRESENT_MOCKED) < 0) - return -1; -- } - } else if (STRPREFIX(path, SYSFS_CGROUP_PREFIX)) { - init_sysfs(); -- if (asprintf(&newpath, "%s%s", -+ if (asprintf(newpath, "%s%s", - fakesysfscgroupdir, -- path + strlen(SYSFS_CGROUP_PREFIX)) < 0) { -- errno = ENOMEM; -- return -1; -- } -- } else if (STRPREFIX(path, fakedevicedir0)) { -- sb->st_mode = S_IFBLK; -- sb->st_rdev = makedev(8, 0); -- return 0; -- } else if (STRPREFIX(path, fakedevicedir1)) { -- sb->st_mode = S_IFBLK; -- sb->st_rdev = makedev(9, 0); -- return 0; -- } else { -- if (!(newpath = strdup(path))) -+ path + strlen(SYSFS_CGROUP_PREFIX)) < 0) - return -1; - } -- ret = real_stat(newpath, sb); -- free(newpath); -- return ret; -+ return 0; - } - -+ - int mkdir(const char *path, mode_t mode) - { - int ret; -Index: libvirt-5.2.0/tests/virfilewrapper.c -=================================================================== ---- libvirt-5.2.0.orig/tests/virfilewrapper.c -+++ libvirt-5.2.0/tests/virfilewrapper.c -@@ -39,15 +39,9 @@ static size_t nprefixes; - static const char **prefixes; - - /* TODO: callbacks */ -- -- - static int (*real_open)(const char *path, int flags, ...); - static FILE *(*real_fopen)(const char *path, const char *mode); - static int (*real_access)(const char *path, int mode); --static int (*real_stat)(const char *path, struct stat *sb); --static int (*real___xstat)(int ver, const char *path, struct stat *sb); --static int (*real_lstat)(const char *path, struct stat *sb); --static int (*real___lxstat)(int ver, const char *path, struct stat *sb); - static int (*real_mkdir)(const char *path, mode_t mode); - static DIR *(*real_opendir)(const char *path); - -@@ -58,8 +52,6 @@ static void init_syms(void) - - VIR_MOCK_REAL_INIT(fopen); - VIR_MOCK_REAL_INIT(access); -- VIR_MOCK_REAL_INIT_ALT(lstat, __lxstat); -- VIR_MOCK_REAL_INIT_ALT(stat, __xstat); - VIR_MOCK_REAL_INIT(mkdir); - VIR_MOCK_REAL_INIT(open); - VIR_MOCK_REAL_INIT(opendir); -@@ -115,10 +107,11 @@ virFileWrapperClearPrefixes(void) - VIR_FREE(overrides); - } - --static char * --virFileWrapperOverridePrefix(const char *path) -+# include "virmockstathelpers.c" -+ -+int -+virMockStatRedirect(const char *path, char **newpath) - { -- char *ret = NULL; - size_t i = 0; - - for (i = 0; i < noverrides; i++) { -@@ -127,16 +120,13 @@ virFileWrapperOverridePrefix(const char - if (!tmp) - continue; - -- if (virAsprintfQuiet(&ret, "%s%s", overrides[i], tmp) < 0) -- return NULL; -+ if (virAsprintfQuiet(newpath, "%s%s", overrides[i], tmp) < 0) -+ return -1; - - break; - } - -- if (!ret) -- ignore_value(VIR_STRDUP_QUIET(ret, path)); -- -- return ret; -+ return 0; - } - - -@@ -144,8 +134,7 @@ virFileWrapperOverridePrefix(const char - do { \ - init_syms(); \ - \ -- newpath = virFileWrapperOverridePrefix(path); \ -- if (!newpath) \ -+ if (virMockStatRedirect(path, &newpath) < 0) \ - abort(); \ - } while (0) - -@@ -156,7 +145,7 @@ FILE *fopen(const char *path, const char - - PATH_OVERRIDE(newpath, path); - -- return real_fopen(newpath, mode); -+ return real_fopen(newpath ? newpath : path, mode); - } - - int access(const char *path, int mode) -@@ -165,56 +154,7 @@ int access(const char *path, int mode) - - PATH_OVERRIDE(newpath, path); - -- return real_access(newpath, mode); --} -- --# ifdef HAVE___LXSTAT --int __lxstat(int ver, const char *path, struct stat *sb) --{ -- VIR_AUTOFREE(char *) newpath = NULL; -- -- PATH_OVERRIDE(newpath, path); -- -- return real___lxstat(ver, newpath, sb); --} --# endif /* HAVE___LXSTAT */ -- --int lstat(const char *path, struct stat *sb) --{ -- VIR_AUTOFREE(char *) newpath = NULL; -- -- PATH_OVERRIDE(newpath, path); -- -- return real_lstat(newpath, sb); --} -- --# ifdef HAVE___XSTAT --int __xstat(int ver, const char *path, struct stat *sb) --{ -- VIR_AUTOFREE(char *) newpath = NULL; -- -- PATH_OVERRIDE(newpath, path); -- -- return real___xstat(ver, newpath, sb); --} --# endif /* HAVE___XSTAT */ -- --int stat(const char *path, struct stat *sb) --{ -- VIR_AUTOFREE(char *) newpath = NULL; -- -- PATH_OVERRIDE(newpath, path); -- -- return real_stat(newpath, sb); --} -- --int mkdir(const char *path, mode_t mode) --{ -- VIR_AUTOFREE(char *) newpath = NULL; -- -- PATH_OVERRIDE(newpath, path); -- -- return real_mkdir(newpath, mode); -+ return real_access(newpath ? newpath : path, mode); - } - - int open(const char *path, int flags, ...) -@@ -234,7 +174,7 @@ int open(const char *path, int flags, .. - va_end(ap); - } - -- return real_open(newpath, flags, mode); -+ return real_open(newpath ? newpath : path, flags, mode); - } - - DIR *opendir(const char *path) -@@ -243,6 +183,7 @@ DIR *opendir(const char *path) - - PATH_OVERRIDE(newpath, path); - -- return real_opendir(newpath); -+ return real_opendir(newpath ? newpath : path); - } -+ - #endif -Index: libvirt-5.2.0/tests/virmock.h -=================================================================== ---- libvirt-5.2.0.orig/tests/virmock.h -+++ libvirt-5.2.0/tests/virmock.h -@@ -290,15 +290,4 @@ - } \ - } while (0) - --# define VIR_MOCK_REAL_INIT_ALT(name1, name2) \ -- do { \ -- real_ ## name1 = dlsym(RTLD_NEXT, #name1); \ -- real_ ## name2 = dlsym(RTLD_NEXT, #name2); \ -- if (!real_##name1 && !real_##name2) { \ -- fprintf(stderr, "Cannot find real '%s' or '%s' symbol\n", \ -- #name1, #name2); \ -- abort(); \ -- } \ -- } while (0) -- - #endif /* LIBVIRT_VIRMOCK_H */ -Index: libvirt-5.2.0/tests/virmockstathelpers.c -=================================================================== ---- /dev/null -+++ libvirt-5.2.0/tests/virmockstathelpers.c -@@ -0,0 +1,326 @@ -+/* -+ * Copyright (C) 2019 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 -+ * . -+ * -+ * Helpers for dealing with the many variants of stat(). This -+ * C file should be included from any file that wants to mock -+ * stat() correctly. -+ */ -+ -+#include "virmock.h" -+#include "viralloc.h" -+ -+#include -+#include -+ -+/* -+ * The POSIX stat() function might resolve to any number of different -+ * symbols in the C library. -+ * -+ * The may be an additional stat64() function exposed by the headers -+ * too. -+ * -+ * On 64-bit hosts the stat & stat64 functions are identical, always -+ * refering to the 64-bit ABI. -+ * -+ * On 32-bit hosts they refer to the 32-bit & 64-bit ABIs respectively. -+ * -+ * Libvirt uses _FILE_OFFSET_BITS=64 on 32-bit hosts, which causes the -+ * C library to transparently rewrite stat() calls to be stat64() calls. -+ * Libvirt will never see the 32-bit ABI from the traditional stat() -+ * call. We cannot assume this rewriting is done using a macro. It might -+ * be, but on GLibC it is done with a magic __asm__ statement to apply -+ * the rewrite at link time instead of at preprocessing. -+ * -+ * In GLibC there may be two additional functions exposed by the headers, -+ * __xstat() and __xstat64(). When these exist, stat() and stat64() are -+ * transparently rewritten to call __xstat() and __xstat64() respectively. -+ * The former symbols will not actally exist in the library at all, only -+ * the header. The leading "__" indicates the symbols are a private impl -+ * detail of the C library that applications should not care about. -+ * Unfortunately, because we are trying to mock replace the C library, -+ * we need to know about this internal impl detail. -+ * -+ * With all this in mind the list of functions we have to mock will depend -+ * on several factors -+ * -+ * - If _FILE_OFFSET_BITS is set, then we are on a 32-bit host, and we -+ * only need to mock stat64 and __xstat64. The other stat / __xstat -+ * functions exist, but we'll never call them so they can be ignored -+ * for mocking. -+ * -+ * - If _FILE_OFFSET_BITS is not set, then we are on a 64-bit host and -+ * we should mock stat, stat64, __xstat & __xstat64. Either may be -+ * called by app code. -+ * -+ * - If __xstat & __xstat64 exist, then stat & stat64 will not exist -+ * as symbols in the library, so the latter should not be mocked. -+ * -+ * The same all applies to lstat() -+ */ -+ -+ -+ -+#if defined(HAVE_STAT) && !defined(HAVE___XSTAT) && !defined(_FILE_OFFSET_BITS) -+# define MOCK_STAT -+#endif -+#if defined(HAVE_STAT64) && !defined(HAVE___XSTAT64) -+# define MOCK_STAT64 -+#endif -+#if defined(HAVE___XSTAT) && !defined(_FILE_OFFSET_BITS) -+# define MOCK___XSTAT -+#endif -+#if defined(HAVE___XSTAT64) -+# define MOCK___XSTAT64 -+#endif -+#if defined(HAVE_LSTAT) && !defined(HAVE___LXSTAT) && !defined(_FILE_OFFSET_BITS) -+# define MOCK_LSTAT -+#endif -+#if defined(HAVE_LSTAT64) && !defined(HAVE___LXSTAT64) -+# define MOCK_LSTAT64 -+#endif -+#if defined(HAVE___LXSTAT) && !defined(_FILE_OFFSET_BITS) -+# define MOCK___LXSTAT -+#endif -+#if defined(HAVE___LXSTAT64) -+# define MOCK___LXSTAT64 -+#endif -+ -+#ifdef MOCK_STAT -+static int (*real_stat)(const char *path, struct stat *sb); -+#endif -+#ifdef MOCK_STAT64 -+static int (*real_stat64)(const char *path, struct stat64 *sb); -+#endif -+#ifdef MOCK___XSTAT -+static int (*real___xstat)(int ver, const char *path, struct stat *sb); -+#endif -+#ifdef MOCK___XSTAT64 -+static int (*real___xstat64)(int ver, const char *path, struct stat64 *sb); -+#endif -+#ifdef MOCK_LSTAT -+static int (*real_lstat)(const char *path, struct stat *sb); -+#endif -+#ifdef MOCK_LSTAT64 -+static int (*real_lstat64)(const char *path, struct stat64 *sb); -+#endif -+#ifdef MOCK___LXSTAT -+static int (*real___lxstat)(int ver, const char *path, struct stat *sb); -+#endif -+#ifdef MOCK___LXSTAT64 -+static int (*real___lxstat64)(int ver, const char *path, struct stat64 *sb); -+#endif -+ -+static bool init; -+static bool debug; -+ -+#define fdebug(msg, ...) do { if (debug) fprintf(stderr, msg, __VA_ARGS__); } while (0) -+ -+static void virMockStatInit(void) -+{ -+ if (init) -+ return; -+ -+ init = true; -+ debug = getenv("VIR_MOCK_STAT_DEBUG"); -+ -+#ifdef MOCK_STAT -+ VIR_MOCK_REAL_INIT(stat); -+ fdebug("real stat %p\n", real_stat); -+#endif -+#ifdef MOCK_STAT64 -+ VIR_MOCK_REAL_INIT(stat64); -+ fdebug("real stat64 %p\n", real_stat64); -+#endif -+#ifdef MOCK___XSTAT -+ VIR_MOCK_REAL_INIT(__xstat); -+ fdebug("real __xstat %p\n", real___xstat); -+#endif -+#ifdef MOCK___XSTAT64 -+ VIR_MOCK_REAL_INIT(__xstat64); -+ fdebug("real __xstat64 %p\n", real___xstat64); -+#endif -+#ifdef MOCK_LSTAT -+ VIR_MOCK_REAL_INIT(lstat); -+ fdebug("real lstat %p\n", real_lstat); -+#endif -+#ifdef MOCK_LSTAT64 -+ VIR_MOCK_REAL_INIT(lstat64); -+ fdebug("real lstat64 %p\n", real_lstat64); -+#endif -+#ifdef MOCK___LXSTAT -+ VIR_MOCK_REAL_INIT(__lxstat); -+ fdebug("real __lxstat %p\n", real___lxstat); -+#endif -+#ifdef MOCK___LXSTAT64 -+ VIR_MOCK_REAL_INIT(__lxstat64); -+ fdebug("real __lxstat64 %p\n", real___lxstat64); -+#endif -+} -+ -+/* -+ * @stat: the path being queried -+ * @newpath: fill with redirected path, or leave NULL to use orig path -+ * -+ * Return 0 on success, -1 on allocation error -+ */ -+static int virMockStatRedirect(const char *path, char **newpath); -+ -+#ifndef VIR_MOCK_STAT_HOOK -+# define VIR_MOCK_STAT_HOOK do { } while (0) -+#endif -+ -+#ifdef MOCK_STAT -+int stat(const char *path, struct stat *sb) -+{ -+ VIR_AUTOFREE(char *) newpath = NULL; -+ -+ virMockStatInit(); -+ -+ if (virMockStatRedirect(path, &newpath) < 0) -+ abort(); -+ fdebug("stat redirect %s to %s sb=%p\n", path, newpath ? newpath : path, sb); -+ -+ VIR_MOCK_STAT_HOOK; -+ -+ return real_stat(newpath ? newpath : path, sb); -+} -+#endif -+ -+#ifdef MOCK_STAT64 -+int stat64(const char *path, struct stat64 *sb) -+{ -+ VIR_AUTOFREE(char *) newpath = NULL; -+ -+ virMockStatInit(); -+ -+ if (virMockStatRedirect(path, &newpath) < 0) -+ abort(); -+ fdebug("stat64 redirect %s to %s sb=%p\n", path, newpath ? newpath : path, sb); -+ -+ VIR_MOCK_STAT_HOOK; -+ -+ return real_stat64(newpath ? newpath : path, sb); -+} -+#endif -+ -+#ifdef MOCK___XSTAT -+int -+__xstat(int ver, const char *path, struct stat *sb) -+{ -+ VIR_AUTOFREE(char *) newpath = NULL; -+ -+ virMockStatInit(); -+ -+ if (virMockStatRedirect(path, &newpath) < 0) -+ abort(); -+ fdebug("__xstat redirect %s to %s sb=%p\n", path, newpath ? newpath : path, sb); -+ -+ VIR_MOCK_STAT_HOOK; -+ -+ return real___xstat(ver, newpath ? newpath : path, sb); -+} -+#endif -+ -+#ifdef MOCK___XSTAT64 -+int -+__xstat64(int ver, const char *path, struct stat64 *sb) -+{ -+ VIR_AUTOFREE(char *) newpath = NULL; -+ -+ virMockStatInit(); -+ -+ if (virMockStatRedirect(path, &newpath) < 0) -+ abort(); -+ fdebug("__xstat64 redirect %s to %s sb=%p\n", path, newpath ? newpath : path, sb); -+ -+ VIR_MOCK_STAT_HOOK; -+ -+ return real___xstat64(ver, newpath ? newpath : path, sb); -+} -+#endif -+ -+#ifdef MOCK_LSTAT -+int -+lstat(const char *path, struct stat *sb) -+{ -+ VIR_AUTOFREE(char *) newpath = NULL; -+ -+ virMockStatInit(); -+ -+ if (virMockStatRedirect(path, &newpath) < 0) -+ abort(); -+ fdebug("lstat redirect %s to %s sb=%p\n", path, newpath ? newpath : path, sb); -+ -+ VIR_MOCK_STAT_HOOK; -+ -+ return real_lstat(newpath ? newpath : path, sb); -+} -+#endif -+ -+#ifdef MOCK_LSTAT64 -+int -+lstat64(const char *path, struct stat64 *sb) -+{ -+ VIR_AUTOFREE(char *) newpath = NULL; -+ -+ virMockStatInit(); -+ -+ if (virMockStatRedirect(path, &newpath) < 0) -+ abort(); -+ fdebug("lstat64 redirect %s to %s sb=%p\n", path, newpath ? newpath : path, sb); -+ -+ VIR_MOCK_STAT_HOOK; -+ -+ return real_lstat64(newpath ? newpath : path, sb); -+} -+#endif -+ -+#ifdef MOCK___LXSTAT -+int -+__lxstat(int ver, const char *path, struct stat *sb) -+{ -+ VIR_AUTOFREE(char *) newpath = NULL; -+ -+ virMockStatInit(); -+ -+ if (virMockStatRedirect(path, &newpath) < 0) -+ abort(); -+ fdebug("__lxstat redirect %s to %s sb=%p\n", path, newpath ? newpath : path, sb); -+ -+ VIR_MOCK_STAT_HOOK; -+ -+ return real___lxstat(ver, newpath ? newpath : path, sb); -+} -+#endif -+ -+#ifdef MOCK___LXSTAT64 -+int -+__lxstat64(int ver, const char *path, struct stat64 *sb) -+{ -+ VIR_AUTOFREE(char *) newpath = NULL; -+ -+ virMockStatInit(); -+ -+ if (virMockStatRedirect(path, &newpath) < 0) -+ abort(); -+ fdebug("__lxstat64 redirect %s to %s sb=%p\n", path, newpath ? newpath : path, sb); -+ -+ VIR_MOCK_STAT_HOOK; -+ -+ return real___lxstat64(ver, newpath ? newpath : path, sb); -+} -+#endif -Index: libvirt-5.2.0/tests/virpcimock.c -=================================================================== ---- libvirt-5.2.0.orig/tests/virpcimock.c -+++ libvirt-5.2.0/tests/virpcimock.c -@@ -31,10 +31,6 @@ - # include "dirname.h" - - static int (*real_access)(const char *path, int mode); --static int (*real_lstat)(const char *path, struct stat *sb); --static int (*real___lxstat)(int ver, const char *path, struct stat *sb); --static int (*real_stat)(const char *path, struct stat *sb); --static int (*real___xstat)(int ver, const char *path, struct stat *sb); - static int (*real_open)(const char *path, int flags, ...); - static int (*real_close)(int fd); - static DIR * (*real_opendir)(const char *name); -@@ -365,15 +361,9 @@ pci_device_new_from_stub(const struct pc - if (virFileMakePath(devpath) < 0) - ABORT("Unable to create: %s", devpath); - -- if (real_stat && real_stat(configSrc, &sb) == 0) -+ if (stat(configSrc, &sb) == 0) - configSrcExists = true; - --# ifdef HAVE___XSTAT -- if (!configSrcExists && -- real___xstat && real___xstat(_STAT_VER, configSrc, &sb) == 0) -- configSrcExists = true; --# endif -- - /* If there is a config file for the device within virpcitestdata dir, - * symlink it. Otherwise create a dummy config file. */ - if (configSrcExists) { -@@ -813,8 +803,6 @@ init_syms(void) - return; - - VIR_MOCK_REAL_INIT(access); -- VIR_MOCK_REAL_INIT_ALT(lstat, __lxstat); -- VIR_MOCK_REAL_INIT_ALT(stat, __xstat); - VIR_MOCK_REAL_INIT(open); - VIR_MOCK_REAL_INIT(close); - VIR_MOCK_REAL_INIT(opendir); -@@ -896,85 +884,17 @@ access(const char *path, int mode) - return ret; - } - --# ifdef HAVE___LXSTAT --int --__lxstat(int ver, const char *path, struct stat *sb) --{ -- int ret; -- -- init_syms(); -- -- if (STRPREFIX(path, SYSFS_PCI_PREFIX)) { -- char *newpath; -- if (getrealpath(&newpath, path) < 0) -- return -1; -- ret = real___lxstat(ver, newpath, sb); -- VIR_FREE(newpath); -- } else { -- ret = real___lxstat(ver, path, sb); -- } -- return ret; --} --# endif /* HAVE___LXSTAT */ -- --int --lstat(const char *path, struct stat *sb) --{ -- int ret; -- -- init_syms(); -- -- if (STRPREFIX(path, SYSFS_PCI_PREFIX)) { -- char *newpath; -- if (getrealpath(&newpath, path) < 0) -- return -1; -- ret = real_lstat(newpath, sb); -- VIR_FREE(newpath); -- } else { -- ret = real_lstat(path, sb); -- } -- return ret; --} - --# ifdef HAVE___XSTAT --int --__xstat(int ver, const char *path, struct stat *sb) -+static int -+virMockStatRedirect(const char *path, char **newpath) - { -- int ret; -- -- init_syms(); -- - if (STRPREFIX(path, SYSFS_PCI_PREFIX)) { -- char *newpath; -- if (getrealpath(&newpath, path) < 0) -+ if (getrealpath(newpath, path) < 0) - return -1; -- ret = real___xstat(ver, newpath, sb); -- VIR_FREE(newpath); -- } else { -- ret = real___xstat(ver, path, sb); - } -- return ret; -+ return 0; - } --# endif /* HAVE___XSTAT */ - --int --stat(const char *path, struct stat *sb) --{ -- int ret; -- -- init_syms(); -- -- if (STRPREFIX(path, SYSFS_PCI_PREFIX)) { -- char *newpath; -- if (getrealpath(&newpath, path) < 0) -- return -1; -- ret = real_stat(newpath, sb); -- VIR_FREE(newpath); -- } else { -- ret = real_stat(path, sb); -- } -- return ret; --} - - int - open(const char *path, int flags, ...) -@@ -1058,6 +978,9 @@ virFileCanonicalizePath(const char *path - - return ret; - } -+ -+# include "virmockstathelpers.c" -+ - #else - /* Nothing to override on this platform */ - #endif -Index: libvirt-5.2.0/tests/virtestmock.c -=================================================================== ---- libvirt-5.2.0.orig/tests/virtestmock.c -+++ libvirt-5.2.0/tests/virtestmock.c -@@ -36,33 +36,9 @@ - #include "viralloc.h" - #include "virfile.h" - --/* stat can be a macro as follows: -- * -- * #define stat stat64 -- * -- * This wouldn't fly with our mock. Make sure that the macro (and -- * all its friends) are undefined. We don't want anybody mangling -- * our code. */ --#undef stat --#undef stat64 --#undef __xstat --#undef __xstat64 --#undef lstat --#undef lstat64 --#undef __lxstat --#undef __lxstat64 -- - static int (*real_open)(const char *path, int flags, ...); - static FILE *(*real_fopen)(const char *path, const char *mode); - static int (*real_access)(const char *path, int mode); --static int (*real_stat)(const char *path, struct stat *sb); --static int (*real_stat64)(const char *path, void *sb); --static int (*real___xstat)(int ver, const char *path, struct stat *sb); --static int (*real___xstat64)(int ver, const char *path, void *sb); --static int (*real_lstat)(const char *path, struct stat *sb); --static int (*real_lstat64)(const char *path, void *sb); --static int (*real___lxstat)(int ver, const char *path, struct stat *sb); --static int (*real___lxstat64)(int ver, const char *path, void *sb); - static int (*real_connect)(int fd, const struct sockaddr *addr, socklen_t addrlen); - - static const char *progname; -@@ -78,10 +54,6 @@ static void init_syms(void) - VIR_MOCK_REAL_INIT(open); - VIR_MOCK_REAL_INIT(fopen); - VIR_MOCK_REAL_INIT(access); -- VIR_MOCK_REAL_INIT_ALT(stat, __xstat); -- VIR_MOCK_REAL_INIT_ALT(stat64, __xstat64); -- VIR_MOCK_REAL_INIT_ALT(lstat, __lxstat); -- VIR_MOCK_REAL_INIT_ALT(lstat64, __lxstat64); - VIR_MOCK_REAL_INIT(connect); - } - -@@ -217,119 +189,15 @@ int access(const char *path, int mode) - return real_access(path, mode); - } - --/* Okay, the following ifdef rain forest may look messy at a -- * first glance. But here's the thing: during run time linking of -- * a binary, stat() may not be actually needing symbol stat. It -- * might as well not had been stat() in the first place (see the -- * reasoning at the beginning of this file). However, if we would -- * expose stat symbol here, we will poison the well and trick -- * dynamic linker into thinking we are some old binary that still -- * uses the symbol. So whenever code from upper layers calls -- * stat(), the control would get here, but real_stat can actually -- * be a NULL pointer because newer glibc have __xstat instead. -- * Worse, it can have __xstat64 instead __xstat. -- * -- * Anyway, these ifdefs are there to implement the following -- * preference function: -- * -- * stat < stat64 < __xstat < __xstat64 -- * -- * It's the same story with lstat. -- * Also, I feel sorry for you that you had to read this. -- */ --#if defined(HAVE_STAT) && !defined(HAVE___XSTAT) --int stat(const char *path, struct stat *sb) --{ -- init_syms(); -- -- checkPath(path, "stat"); -- -- return real_stat(path, sb); --} --#endif -- --#if defined(HAVE_STAT64) && !defined(HAVE___XSTAT64) --int stat64(const char *path, struct stat64 *sb) --{ -- init_syms(); -- -- checkPath(path, "stat"); -- -- return real_stat64(path, sb); --} --#endif -- --#if defined(HAVE___XSTAT) && !defined(HAVE___XSTAT64) --int --__xstat(int ver, const char *path, struct stat *sb) --{ -- init_syms(); -- -- checkPath(path, "stat"); - -- return real___xstat(ver, path, sb); --} --#endif -+#define VIR_MOCK_STAT_HOOK CHECK_PATH(path) - --#if defined(HAVE___XSTAT64) --int --__xstat64(int ver, const char *path, struct stat64 *sb) --{ -- init_syms(); -- -- checkPath(path, "stat"); -- -- return real___xstat64(ver, path, sb); --} --#endif -+#include "virmockstathelpers.c" - --#if defined(HAVE_LSTAT) && !defined(HAVE___LXSTAT) --int --lstat(const char *path, struct stat *sb) -+static int virMockStatRedirect(const char *path ATTRIBUTE_UNUSED, char **newpath ATTRIBUTE_UNUSED) - { -- init_syms(); -- -- checkPath(path, "lstat"); -- -- return real_lstat(path, sb); --} --#endif -- --#if defined(HAVE_LSTAT64) && !defined(HAVE___LXSTAT64) --int --lstat64(const char *path, struct stat64 *sb) --{ -- init_syms(); -- -- checkPath(path, "lstat"); -- -- return real_lstat64(path, sb); --} --#endif -- --#if defined(HAVE___LXSTAT) && !defined(HAVE___LXSTAT64) --int --__lxstat(int ver, const char *path, struct stat *sb) --{ -- init_syms(); -- -- checkPath(path, "lstat"); -- -- return real___lxstat(ver, path, sb); --} --#endif -- --#if defined(HAVE___LXSTAT64) --int --__lxstat64(int ver, const char *path, struct stat64 *sb) --{ -- init_syms(); -- -- checkPath(path, "lstat"); -- -- return real___lxstat64(ver, path, sb); -+ return 0; - } --#endif - - - int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) diff --git a/libvirt-5.2.0.tar.xz b/libvirt-5.2.0.tar.xz deleted file mode 100644 index 78aa04b..0000000 --- a/libvirt-5.2.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e51cfb41afe629ce0d46fb93182a4f4ae0c151490db97c49f722756e1154e63f -size 14992888 diff --git a/libvirt-5.2.0.tar.xz.asc b/libvirt-5.2.0.tar.xz.asc deleted file mode 100644 index 74c8e11..0000000 --- a/libvirt-5.2.0.tar.xz.asc +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQEcBAABAgAGBQJcpGGWAAoJEBVYiyZZa+pd7PsH/1dyb1XN36aF9mugMQcB5h7g -IiC0zfP+4pjrckaxEqDnLICEk/fPz97RPR4Rb/RmDJAPCSyvYE+UdM1Bj6LBgGa0 -3v/4pPIdkXTxL/My/FN9KloWtln85Z6XYYhHN8lfkTTflnWEpleiBk19M79etHOs -UyAUDezv2eIhZmerhZZSMNlU08ZGL5c9YKyKl9P3ZP5HrntQFHW+yhvEFpQxu449 -RogZWidY2XWuUpjO79WrUrLiL4xSk4i+RUNydOB6rHK9aprSg0mscQfEimTjJR83 -ThNf2xV26GyBeCkkOqcKbj34sroKMIbZC0QzMgO4ZEjfFF6jVUUq5CD9LTJ0AeI= -=dDMF ------END PGP SIGNATURE----- diff --git a/libvirt-5.3.0.tar.xz b/libvirt-5.3.0.tar.xz new file mode 100644 index 0000000..66d7cc5 --- /dev/null +++ b/libvirt-5.3.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8564bdd506817b3957fa67e4f06b217922d30f19e416c4dc620995fd155dc101 +size 12201620 diff --git a/libvirt-5.3.0.tar.xz.asc b/libvirt-5.3.0.tar.xz.asc new file mode 100644 index 0000000..b6c2919 --- /dev/null +++ b/libvirt-5.3.0.tar.xz.asc @@ -0,0 +1,10 @@ +-----BEGIN PGP SIGNATURE----- + +iQEcBAABAgAGBQJczdP/AAoJEBVYiyZZa+pdZ4QH/09HyqoXeIxhAePbFU2qKXC0 +AUxcag95/R/faI6gEoZQ9nGDYYU8HyD8bhoAeNSBDnbUp3Pco7ibyrNxR/C+42QW +Uy6arepoAmx33Gti1U9KuBWojlJYuemBsAf+DWc60QFEh9YuqhylKPiPS7bhrijX +oed21J0hCRnpurqO1YUTnqXW4Mlp6c8A9pB4+MLBJX0wTPqwUlxUrjR++iLgF6J+ +Gimmm0ivUu7/3eyKNZgVHj1Ury/PKq54pObEKRzQZKWBc/WsZbFjL/efz2DmDWEo +HKVx4eFWb0IhmqWz7LmZWC2eK07n/6s1oPWNpO3ZPoLxOt2vLB4U3jQjbO/yhBg= +=sc9o +-----END PGP SIGNATURE----- diff --git a/libvirt-power8-models.patch b/libvirt-power8-models.patch index e5ea6e2..718b45c 100644 --- a/libvirt-power8-models.patch +++ b/libvirt-power8-models.patch @@ -2,10 +2,10 @@ Add POWER8 v2.0 and v2.1 to cpu map XML From: -Index: libvirt-5.2.0/src/cpu_map/ppc64_POWER8.xml +Index: libvirt-5.3.0/src/cpu_map/ppc64_POWER8.xml =================================================================== ---- libvirt-5.2.0.orig/src/cpu_map/ppc64_POWER8.xml -+++ libvirt-5.2.0/src/cpu_map/ppc64_POWER8.xml +--- libvirt-5.3.0.orig/src/cpu_map/ppc64_POWER8.xml ++++ libvirt-5.3.0/src/cpu_map/ppc64_POWER8.xml @@ -4,5 +4,7 @@ diff --git a/libvirt-suse-netcontrol.patch b/libvirt-suse-netcontrol.patch index c8e00eb..08bbdb2 100644 --- a/libvirt-suse-netcontrol.patch +++ b/libvirt-suse-netcontrol.patch @@ -1,8 +1,8 @@ -Index: libvirt-5.2.0/configure.ac +Index: libvirt-5.3.0/configure.ac =================================================================== ---- libvirt-5.2.0.orig/configure.ac -+++ libvirt-5.2.0/configure.ac -@@ -256,6 +256,7 @@ LIBVIRT_ARG_LIBSSH +--- libvirt-5.3.0.orig/configure.ac ++++ libvirt-5.3.0/configure.ac +@@ -262,6 +262,7 @@ LIBVIRT_ARG_LIBSSH LIBVIRT_ARG_LIBXML LIBVIRT_ARG_MACVTAP LIBVIRT_ARG_NETCF @@ -10,7 +10,7 @@ Index: libvirt-5.2.0/configure.ac LIBVIRT_ARG_NLS LIBVIRT_ARG_NSS LIBVIRT_ARG_NUMACTL -@@ -300,6 +301,7 @@ LIBVIRT_CHECK_LIBSSH +@@ -306,6 +307,7 @@ LIBVIRT_CHECK_LIBSSH LIBVIRT_CHECK_LIBXML LIBVIRT_CHECK_MACVTAP LIBVIRT_CHECK_NETCF @@ -18,7 +18,7 @@ Index: libvirt-5.2.0/configure.ac LIBVIRT_CHECK_NLS LIBVIRT_CHECK_NUMACTL LIBVIRT_CHECK_NWFILTER -@@ -998,6 +1000,7 @@ LIBVIRT_RESULT_LIBXL +@@ -1004,6 +1006,7 @@ LIBVIRT_RESULT_LIBXL LIBVIRT_RESULT_LIBXML LIBVIRT_RESULT_MACVTAP LIBVIRT_RESULT_NETCF @@ -26,10 +26,10 @@ Index: libvirt-5.2.0/configure.ac LIBVIRT_RESULT_NLS LIBVIRT_RESULT_NSS LIBVIRT_RESULT_NUMACTL -Index: libvirt-5.2.0/tools/virsh.c +Index: libvirt-5.3.0/tools/virsh.c =================================================================== ---- libvirt-5.2.0.orig/tools/virsh.c -+++ libvirt-5.2.0/tools/virsh.c +--- libvirt-5.3.0.orig/tools/virsh.c ++++ libvirt-5.3.0/tools/virsh.c @@ -563,6 +563,8 @@ virshShowVersion(vshControl *ctl ATTRIBU vshPrint(ctl, " Interface"); # if defined(WITH_NETCF) @@ -39,10 +39,10 @@ Index: libvirt-5.2.0/tools/virsh.c # elif defined(WITH_UDEV) vshPrint(ctl, " udev"); # endif -Index: libvirt-5.2.0/src/interface/interface_backend_netcf.c +Index: libvirt-5.3.0/src/interface/interface_backend_netcf.c =================================================================== ---- libvirt-5.2.0.orig/src/interface/interface_backend_netcf.c -+++ libvirt-5.2.0/src/interface/interface_backend_netcf.c +--- libvirt-5.3.0.orig/src/interface/interface_backend_netcf.c ++++ libvirt-5.3.0/src/interface/interface_backend_netcf.c @@ -21,7 +21,12 @@ #include @@ -126,10 +126,10 @@ Index: libvirt-5.2.0/src/interface/interface_backend_netcf.c if (virRegisterConnectDriver(&interfaceConnectDriver, false) < 0) return -1; if (virSetSharedInterfaceDriver(&interfaceDriver) < 0) -Index: libvirt-5.2.0/src/interface/interface_driver.c +Index: libvirt-5.3.0/src/interface/interface_driver.c =================================================================== ---- libvirt-5.2.0.orig/src/interface/interface_driver.c -+++ libvirt-5.2.0/src/interface/interface_driver.c +--- libvirt-5.3.0.orig/src/interface/interface_driver.c ++++ libvirt-5.3.0/src/interface/interface_driver.c @@ -30,8 +30,15 @@ interfaceRegister(void) if (netcfIfaceRegister() == 0) return 0; @@ -147,10 +147,10 @@ Index: libvirt-5.2.0/src/interface/interface_driver.c if (udevIfaceRegister() == 0) return 0; #endif /* WITH_UDEV */ -Index: libvirt-5.2.0/m4/virt-netcontrol.m4 +Index: libvirt-5.3.0/m4/virt-netcontrol.m4 =================================================================== --- /dev/null -+++ libvirt-5.2.0/m4/virt-netcontrol.m4 ++++ libvirt-5.3.0/m4/virt-netcontrol.m4 @@ -0,0 +1,39 @@ +dnl The libnetcontrol library +dnl @@ -191,11 +191,11 @@ Index: libvirt-5.2.0/m4/virt-netcontrol.m4 +AC_DEFUN([LIBVIRT_RESULT_NETCONTROL],[ + LIBVIRT_RESULT_LIB([NETCONTROL]) +]) -Index: libvirt-5.2.0/src/interface/Makefile.inc.am +Index: libvirt-5.3.0/src/interface/Makefile.inc.am =================================================================== ---- libvirt-5.2.0.orig/src/interface/Makefile.inc.am -+++ libvirt-5.2.0/src/interface/Makefile.inc.am -@@ -4,6 +4,7 @@ INTERFACE_DRIVER_SOURCES = \ +--- libvirt-5.3.0.orig/src/interface/Makefile.inc.am ++++ libvirt-5.3.0/src/interface/Makefile.inc.am +@@ -6,6 +6,7 @@ INTERFACE_DRIVER_SOURCES = \ $(NULL) INTERFACE_DRIVER_NETCF_SOURCES = interface/interface_backend_netcf.c @@ -203,7 +203,7 @@ Index: libvirt-5.2.0/src/interface/Makefile.inc.am INTERFACE_DRIVER_UDEV_SOURCES = interface/interface_backend_udev.c DRIVER_SOURCE_FILES += $(INTERFACE_DRIVER_SOURCES) -@@ -33,6 +34,11 @@ libvirt_driver_interface_la_CFLAGS += $( +@@ -35,6 +36,11 @@ libvirt_driver_interface_la_CFLAGS += $( libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS) libvirt_driver_interface_la_SOURCES += $(INTERFACE_DRIVER_NETCF_SOURCES) endif WITH_NETCF diff --git a/libvirt.changes b/libvirt.changes index 4e9327a..686413e 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Wed May 8 17:03:43 UTC 2019 - James Fehlig + +- Update to libvirt 5.3.0 + - Many incremental improvements and bug fixes, see + http://libvirt.org/news.html + - Dropped patches: + ff376c62-tests-fix-mocking-stat-lstat.patch, + ebe9c6ea-qemu-firmware-dirent.patch, + 2a07c990-api-CVE-2019-3886.patch, + ae076bb4-remote-CVE-2019-3886.patch, + f66f70ac-snapshot-fix-use-after-free.patch, + 89237d53-conf-expose-virDomainSCSIDriveAddressIsUsed.patch, + ee2c5ef3-test-scsi-disk.patch, + ddc72f99-qemu-check-dup-drive-address.patch, + 22dc3e94-revert-f1d65853.patch + ------------------------------------------------------------------- Thu Apr 25 20:42:03 UTC 2019 - Jim Fehlig diff --git a/libvirt.spec b/libvirt.spec index 552b9cd..671fcb3 100644 --- a/libvirt.spec +++ b/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/ # @@ -183,7 +183,7 @@ Name: libvirt Url: http://libvirt.org/ -Version: 5.2.0 +Version: 5.3.0 Release: 0 Summary: Library providing a virtualization API License: LGPL-2.1-or-later @@ -337,15 +337,6 @@ Source6: libvirtd-relocation-server.xml Source99: baselibs.conf Source100: %{name}-rpmlintrc # Upstream patches -Patch0: ff376c62-tests-fix-mocking-stat-lstat.patch -Patch1: ebe9c6ea-qemu-firmware-dirent.patch -Patch2: 2a07c990-api-CVE-2019-3886.patch -Patch3: ae076bb4-remote-CVE-2019-3886.patch -Patch4: f66f70ac-snapshot-fix-use-after-free.patch -Patch5: 89237d53-conf-expose-virDomainSCSIDriveAddressIsUsed.patch -Patch6: ee2c5ef3-test-scsi-disk.patch -Patch7: ddc72f99-qemu-check-dup-drive-address.patch -Patch8: 22dc3e94-revert-f1d65853.patch # Patches pending upstream review Patch100: libxl-dom-reset.patch Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch @@ -879,15 +870,6 @@ libvirt plugin for NSS for translating domain names into IP addresses. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 %patch100 -p1 %patch101 -p1 %patch150 -p1 @@ -1690,6 +1672,7 @@ fi %doc %{_docdir}/%{name}/internals %doc %{_docdir}/%{name}/logos %doc %{_docdir}/%{name}/fonts +%doc %{_docdir}/%{name}/js # API docs %dir %{_datadir}/gtk-doc/html/%{name}/ diff --git a/libxl-dom-reset.patch b/libxl-dom-reset.patch index 94b0328..9e03b8e 100644 --- a/libxl-dom-reset.patch +++ b/libxl-dom-reset.patch @@ -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-5.2.0/src/libxl/libxl_driver.c +Index: libvirt-5.3.0/src/libxl/libxl_driver.c =================================================================== ---- libvirt-5.2.0.orig/src/libxl/libxl_driver.c -+++ libvirt-5.2.0/src/libxl/libxl_driver.c +--- libvirt-5.3.0.orig/src/libxl/libxl_driver.c ++++ libvirt-5.3.0/src/libxl/libxl_driver.c @@ -1343,6 +1343,61 @@ libxlDomainReboot(virDomainPtr dom, unsi } @@ -74,7 +74,7 @@ Index: libvirt-5.2.0/src/libxl/libxl_driver.c libxlDomainDestroyFlags(virDomainPtr dom, unsigned int flags) { -@@ -6504,6 +6559,7 @@ static virHypervisorDriver libxlHypervis +@@ -6525,6 +6580,7 @@ static virHypervisorDriver libxlHypervis .domainShutdown = libxlDomainShutdown, /* 0.9.0 */ .domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */ .domainReboot = libxlDomainReboot, /* 0.9.0 */ diff --git a/libxl-set-cach-mode.patch b/libxl-set-cach-mode.patch index 8cb9836..eb4f90d 100644 --- a/libxl-set-cach-mode.patch +++ b/libxl-set-cach-mode.patch @@ -3,11 +3,11 @@ https://bugzilla.novell.com/show_bug.cgi?id=879425 src/libxl/libxl_conf.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) -Index: libvirt-5.2.0/src/libxl/libxl_conf.c +Index: libvirt-5.3.0/src/libxl/libxl_conf.c =================================================================== ---- libvirt-5.2.0.orig/src/libxl/libxl_conf.c -+++ libvirt-5.2.0/src/libxl/libxl_conf.c -@@ -895,6 +895,30 @@ libxlDiskSetDiscard(libxl_device_disk *x +--- libvirt-5.3.0.orig/src/libxl/libxl_conf.c ++++ libvirt-5.3.0/src/libxl/libxl_conf.c +@@ -897,6 +897,30 @@ libxlDiskSetDiscard(libxl_device_disk *x #endif } @@ -38,7 +38,7 @@ Index: libvirt-5.2.0/src/libxl/libxl_conf.c static char * libxlMakeNetworkDiskSrcStr(virStorageSourcePtr src, const char *username, -@@ -1143,6 +1167,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk +@@ -1144,6 +1168,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk x_disk->is_cdrom = l_disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM ? 1 : 0; if (libxlDiskSetDiscard(x_disk, l_disk->discard) < 0) return -1; diff --git a/libxl-set-migration-constraints.patch b/libxl-set-migration-constraints.patch index 6dd13d2..d5177d6 100644 --- a/libxl-set-migration-constraints.patch +++ b/libxl-set-migration-constraints.patch @@ -16,10 +16,10 @@ Signed-off-by: Jim Fehlig tools/virsh.pod | 8 ++++++++ 6 files changed, 125 insertions(+), 6 deletions(-) -Index: libvirt-5.2.0/include/libvirt/libvirt-domain.h +Index: libvirt-5.3.0/include/libvirt/libvirt-domain.h =================================================================== ---- libvirt-5.2.0.orig/include/libvirt/libvirt-domain.h -+++ libvirt-5.2.0/include/libvirt/libvirt-domain.h +--- libvirt-5.3.0.orig/include/libvirt/libvirt-domain.h ++++ libvirt-5.3.0/include/libvirt/libvirt-domain.h @@ -1039,6 +1039,31 @@ typedef enum { */ # define VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS "parallel.connections" @@ -52,11 +52,11 @@ Index: libvirt-5.2.0/include/libvirt/libvirt-domain.h /* Domain migration. */ virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn, unsigned long flags, const char *dname, -Index: libvirt-5.2.0/src/libxl/libxl_driver.c +Index: libvirt-5.3.0/src/libxl/libxl_driver.c =================================================================== ---- libvirt-5.2.0.orig/src/libxl/libxl_driver.c -+++ libvirt-5.2.0/src/libxl/libxl_driver.c -@@ -6111,6 +6111,9 @@ libxlDomainMigratePerform3Params(virDoma +--- libvirt-5.3.0.orig/src/libxl/libxl_driver.c ++++ libvirt-5.3.0/src/libxl/libxl_driver.c +@@ -6132,6 +6132,9 @@ libxlDomainMigratePerform3Params(virDoma const char *dname = NULL; const char *uri = NULL; int ret = -1; @@ -66,7 +66,7 @@ Index: libvirt-5.2.0/src/libxl/libxl_driver.c #ifdef LIBXL_HAVE_NO_SUSPEND_RESUME virReportUnsupportedError(); -@@ -6127,6 +6130,18 @@ libxlDomainMigratePerform3Params(virDoma +@@ -6148,6 +6151,18 @@ libxlDomainMigratePerform3Params(virDoma virTypedParamsGetString(params, nparams, VIR_MIGRATE_PARAM_DEST_NAME, &dname) < 0 || @@ -85,7 +85,7 @@ Index: libvirt-5.2.0/src/libxl/libxl_driver.c virTypedParamsGetString(params, nparams, VIR_MIGRATE_PARAM_URI, &uri) < 0) -@@ -6141,11 +6156,11 @@ libxlDomainMigratePerform3Params(virDoma +@@ -6162,11 +6177,11 @@ libxlDomainMigratePerform3Params(virDoma if ((flags & (VIR_MIGRATE_TUNNELLED | VIR_MIGRATE_PEER2PEER))) { if (libxlDomainMigrationSrcPerformP2P(driver, vm, dom->conn, dom_xml, @@ -99,10 +99,10 @@ Index: libvirt-5.2.0/src/libxl/libxl_driver.c goto cleanup; } -Index: libvirt-5.2.0/src/libxl/libxl_migration.c +Index: libvirt-5.3.0/src/libxl/libxl_migration.c =================================================================== ---- libvirt-5.2.0.orig/src/libxl/libxl_migration.c -+++ libvirt-5.2.0/src/libxl/libxl_migration.c +--- libvirt-5.3.0.orig/src/libxl/libxl_migration.c ++++ libvirt-5.3.0/src/libxl/libxl_migration.c @@ -342,18 +342,39 @@ libxlMigrateDstReceive(virNetSocketPtr s static int libxlDoMigrateSrcSend(libxlDriverPrivatePtr driver, @@ -264,10 +264,10 @@ Index: libvirt-5.2.0/src/libxl/libxl_migration.c virObjectLock(vm); if (ret < 0) { -Index: libvirt-5.2.0/src/libxl/libxl_migration.h +Index: libvirt-5.3.0/src/libxl/libxl_migration.h =================================================================== ---- libvirt-5.2.0.orig/src/libxl/libxl_migration.h -+++ libvirt-5.2.0/src/libxl/libxl_migration.h +--- libvirt-5.3.0.orig/src/libxl/libxl_migration.h ++++ libvirt-5.3.0/src/libxl/libxl_migration.h @@ -36,6 +36,10 @@ VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \ VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \ @@ -312,11 +312,11 @@ Index: libvirt-5.2.0/src/libxl/libxl_migration.h virDomainPtr libxlDomainMigrationDstFinish(virConnectPtr dconn, -Index: libvirt-5.2.0/tools/virsh-domain.c +Index: libvirt-5.3.0/tools/virsh-domain.c =================================================================== ---- libvirt-5.2.0.orig/tools/virsh-domain.c -+++ libvirt-5.2.0/tools/virsh-domain.c -@@ -10570,6 +10570,22 @@ static const vshCmdOptDef opts_migrate[] +--- libvirt-5.3.0.orig/tools/virsh-domain.c ++++ libvirt-5.3.0/tools/virsh-domain.c +@@ -10576,6 +10576,22 @@ static const vshCmdOptDef opts_migrate[] .type = VSH_OT_INT, .help = N_("number of connections for parallel migration") }, @@ -339,7 +339,7 @@ Index: libvirt-5.2.0/tools/virsh-domain.c {.name = NULL} }; -@@ -10593,6 +10609,7 @@ doMigrate(void *opaque) +@@ -10599,6 +10615,7 @@ doMigrate(void *opaque) unsigned long long ullOpt = 0; int rv; virConnectPtr dconn = data->dconn; @@ -347,7 +347,7 @@ Index: libvirt-5.2.0/tools/virsh-domain.c sigemptyset(&sigmask); sigaddset(&sigmask, SIGINT); -@@ -10712,6 +10729,27 @@ doMigrate(void *opaque) +@@ -10718,6 +10735,27 @@ doMigrate(void *opaque) goto save_error; } @@ -375,11 +375,11 @@ Index: libvirt-5.2.0/tools/virsh-domain.c if (vshCommandOptStringReq(ctl, cmd, "xml", &opt) < 0) goto out; if (opt) { -Index: libvirt-5.2.0/tools/virsh.pod +Index: libvirt-5.3.0/tools/virsh.pod =================================================================== ---- libvirt-5.2.0.orig/tools/virsh.pod -+++ libvirt-5.2.0/tools/virsh.pod -@@ -2019,6 +2019,14 @@ I<--parallel-connections>. Parallel conn +--- libvirt-5.3.0.orig/tools/virsh.pod ++++ libvirt-5.3.0/tools/virsh.pod +@@ -2015,6 +2015,14 @@ I<--parallel-connections>. Parallel conn network link between the source and the target and thus speeding up the migration. diff --git a/libxl-support-block-script.patch b/libxl-support-block-script.patch index 166a078..2c82b68 100644 --- a/libxl-support-block-script.patch +++ b/libxl-support-block-script.patch @@ -7,11 +7,11 @@ and npiv. For more details, see bsc#954872 and FATE#319810 -Index: libvirt-5.2.0/src/libxl/libxl_conf.c +Index: libvirt-5.3.0/src/libxl/libxl_conf.c =================================================================== ---- libvirt-5.2.0.orig/src/libxl/libxl_conf.c -+++ libvirt-5.2.0/src/libxl/libxl_conf.c -@@ -895,6 +895,25 @@ libxlDiskSetDiscard(libxl_device_disk *x +--- libvirt-5.3.0.orig/src/libxl/libxl_conf.c ++++ libvirt-5.3.0/src/libxl/libxl_conf.c +@@ -897,6 +897,25 @@ libxlDiskSetDiscard(libxl_device_disk *x #endif } @@ -37,7 +37,7 @@ Index: libvirt-5.2.0/src/libxl/libxl_conf.c static void libxlDiskSetCacheMode(libxl_device_disk *x_disk, int cachemode) { -@@ -1040,6 +1059,7 @@ libxlMakeNetworkDiskSrc(virStorageSource +@@ -1041,6 +1060,7 @@ libxlMakeNetworkDiskSrc(virStorageSource int libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk) { @@ -45,7 +45,7 @@ Index: libvirt-5.2.0/src/libxl/libxl_conf.c const char *driver = virDomainDiskGetDriver(l_disk); int format = virDomainDiskGetFormat(l_disk); int actual_type = virStorageSourceGetActualType(l_disk->src); -@@ -1055,7 +1075,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk +@@ -1056,7 +1076,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk if (libxlMakeNetworkDiskSrc(l_disk->src, &x_disk->pdev_path) < 0) return -1; } else { @@ -54,7 +54,7 @@ Index: libvirt-5.2.0/src/libxl/libxl_conf.c return -1; } -@@ -1168,6 +1188,9 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk +@@ -1169,6 +1189,9 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk if (libxlDiskSetDiscard(x_disk, l_disk->discard) < 0) return -1; libxlDiskSetCacheMode(x_disk, l_disk->cachemode); diff --git a/lxc-wait-after-eth-del.patch b/lxc-wait-after-eth-del.patch index 980c17d..a6c5f3c 100644 --- a/lxc-wait-after-eth-del.patch +++ b/lxc-wait-after-eth-del.patch @@ -13,10 +13,10 @@ device with the same name that is being created. src/lxc/lxc_process.c | 1 + 3 files changed, 4 insertions(+) -Index: libvirt-5.2.0/src/lxc/lxc_controller.c +Index: libvirt-5.3.0/src/lxc/lxc_controller.c =================================================================== ---- libvirt-5.2.0.orig/src/lxc/lxc_controller.c -+++ libvirt-5.2.0/src/lxc/lxc_controller.c +--- libvirt-5.3.0.orig/src/lxc/lxc_controller.c ++++ libvirt-5.3.0/src/lxc/lxc_controller.c @@ -69,6 +69,7 @@ #include "rpc/virnetdaemon.h" #include "virstring.h" @@ -33,10 +33,10 @@ Index: libvirt-5.2.0/src/lxc/lxc_controller.c return ret; } -Index: libvirt-5.2.0/src/lxc/lxc_driver.c +Index: libvirt-5.3.0/src/lxc/lxc_driver.c =================================================================== ---- libvirt-5.2.0.orig/src/lxc/lxc_driver.c -+++ libvirt-5.2.0/src/lxc/lxc_driver.c +--- libvirt-5.3.0.orig/src/lxc/lxc_driver.c ++++ libvirt-5.3.0/src/lxc/lxc_driver.c @@ -70,6 +70,7 @@ #include "virtime.h" #include "virtypedparam.h" @@ -45,7 +45,7 @@ Index: libvirt-5.2.0/src/lxc/lxc_driver.c #include "virstring.h" #include "viraccessapicheck.h" #include "viraccessapichecklxc.h" -@@ -3908,6 +3909,7 @@ lxcDomainAttachDeviceNetLive(virConnectP +@@ -3916,6 +3917,7 @@ lxcDomainAttachDeviceNetLive(virConnectP case VIR_DOMAIN_NET_TYPE_NETWORK: case VIR_DOMAIN_NET_TYPE_ETHERNET: ignore_value(virNetDevVethDelete(veth)); @@ -53,7 +53,7 @@ Index: libvirt-5.2.0/src/lxc/lxc_driver.c break; case VIR_DOMAIN_NET_TYPE_DIRECT: -@@ -4351,6 +4353,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb +@@ -4360,6 +4362,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb virDomainAuditNet(vm, detach, NULL, "detach", false); goto cleanup; } @@ -61,10 +61,10 @@ Index: libvirt-5.2.0/src/lxc/lxc_driver.c break; /* It'd be nice to support this, but with macvlan -Index: libvirt-5.2.0/src/lxc/lxc_process.c +Index: libvirt-5.3.0/src/lxc/lxc_process.c =================================================================== ---- libvirt-5.2.0.orig/src/lxc/lxc_process.c -+++ libvirt-5.2.0/src/lxc/lxc_process.c +--- libvirt-5.3.0.orig/src/lxc/lxc_process.c ++++ libvirt-5.3.0/src/lxc/lxc_process.c @@ -51,6 +51,7 @@ #include "viratomic.h" #include "virprocess.h" @@ -73,9 +73,9 @@ Index: libvirt-5.2.0/src/lxc/lxc_process.c #include "netdev_bandwidth_conf.h" #define VIR_FROM_THIS VIR_FROM_LXC -@@ -226,6 +227,7 @@ static void virLXCProcessCleanup(virLXCD +@@ -232,6 +233,7 @@ static void virLXCProcessCleanup(virLXCD + VIR_WARN("Unable to release network device '%s'", NULLSTR(iface->ifname)); } - virDomainNetReleaseActualDevice(vm->def, iface); } + virWaitForDevices(); diff --git a/network-don-t-use-dhcp-authoritative-on-static-netwo.patch b/network-don-t-use-dhcp-authoritative-on-static-netwo.patch index 8649b9a..7fc1730 100644 --- a/network-don-t-use-dhcp-authoritative-on-static-netwo.patch +++ b/network-don-t-use-dhcp-authoritative-on-static-netwo.patch @@ -17,11 +17,11 @@ Signed-off-by: Martin Wilck tests/networkxml2confdata/dhcp6host-routed-network.conf | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) -Index: libvirt-5.2.0/src/network/bridge_driver.c +Index: libvirt-5.3.0/src/network/bridge_driver.c =================================================================== ---- libvirt-5.2.0.orig/src/network/bridge_driver.c -+++ libvirt-5.2.0/src/network/bridge_driver.c -@@ -1365,7 +1365,14 @@ networkDnsmasqConfContents(virNetworkObj +--- libvirt-5.3.0.orig/src/network/bridge_driver.c ++++ libvirt-5.3.0/src/network/bridge_driver.c +@@ -1388,7 +1388,14 @@ networkDnsmasqConfContents(virNetworkObj if (VIR_SOCKET_ADDR_IS_FAMILY(&ipdef->address, AF_INET)) { if (ipdef->nranges || ipdef->nhosts) { virBufferAddLit(&configbuf, "dhcp-no-override\n"); @@ -37,10 +37,10 @@ Index: libvirt-5.2.0/src/network/bridge_driver.c } if (ipdef->tftproot) { -Index: libvirt-5.2.0/tests/networkxml2confdata/dhcp6host-routed-network.conf +Index: libvirt-5.3.0/tests/networkxml2confdata/dhcp6host-routed-network.conf =================================================================== ---- libvirt-5.2.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf -+++ libvirt-5.2.0/tests/networkxml2confdata/dhcp6host-routed-network.conf +--- libvirt-5.3.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf ++++ libvirt-5.3.0/tests/networkxml2confdata/dhcp6host-routed-network.conf @@ -10,7 +10,6 @@ bind-dynamic interface=virbr1 dhcp-range=192.168.122.1,static diff --git a/ppc64le-canonical-name.patch b/ppc64le-canonical-name.patch index d1bf323..0b4b607 100644 --- a/ppc64le-canonical-name.patch +++ b/ppc64le-canonical-name.patch @@ -2,10 +2,10 @@ Canonicalize hostarch name ppc64le to ppc64 See bnc#894956 -Index: libvirt-5.2.0/src/util/virarch.c +Index: libvirt-5.3.0/src/util/virarch.c =================================================================== ---- libvirt-5.2.0.orig/src/util/virarch.c -+++ libvirt-5.2.0/src/util/virarch.c +--- libvirt-5.3.0.orig/src/util/virarch.c ++++ libvirt-5.3.0/src/util/virarch.c @@ -172,6 +172,8 @@ virArch virArchFromHost(void) arch = VIR_ARCH_I686; } else if (STREQ(ut.machine, "amd64")) { diff --git a/qemu-apparmor-screenshot.patch b/qemu-apparmor-screenshot.patch index 7f93c7a..5c671dd 100644 --- a/qemu-apparmor-screenshot.patch +++ b/qemu-apparmor-screenshot.patch @@ -1,7 +1,7 @@ -Index: libvirt-5.2.0/src/security/apparmor/libvirt-qemu +Index: libvirt-5.3.0/src/security/apparmor/libvirt-qemu =================================================================== ---- libvirt-5.2.0.orig/src/security/apparmor/libvirt-qemu -+++ libvirt-5.2.0/src/security/apparmor/libvirt-qemu +--- libvirt-5.3.0.orig/src/security/apparmor/libvirt-qemu ++++ libvirt-5.3.0/src/security/apparmor/libvirt-qemu @@ -227,3 +227,6 @@ # required for sasl GSSAPI plugin /etc/gss/mech.d/ r, diff --git a/support-managed-pci-xen-driver.patch b/support-managed-pci-xen-driver.patch index 94f6e19..8373d67 100644 --- a/support-managed-pci-xen-driver.patch +++ b/support-managed-pci-xen-driver.patch @@ -8,10 +8,10 @@ Subject: [PATCH] support managed pci devices in xen driver src/xenxs/xen_xm.c | 28 +++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 15 deletions(-) -Index: libvirt-5.2.0/src/xenconfig/xen_common.c +Index: libvirt-5.3.0/src/xenconfig/xen_common.c =================================================================== ---- libvirt-5.2.0.orig/src/xenconfig/xen_common.c -+++ libvirt-5.2.0/src/xenconfig/xen_common.c +--- libvirt-5.3.0.orig/src/xenconfig/xen_common.c ++++ libvirt-5.3.0/src/xenconfig/xen_common.c @@ -386,12 +386,19 @@ xenParsePCI(char *entry) int busID; int slotID; @@ -64,11 +64,11 @@ Index: libvirt-5.2.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-5.2.0/src/xenconfig/xen_sxpr.c +Index: libvirt-5.3.0/src/xenconfig/xen_sxpr.c =================================================================== ---- libvirt-5.2.0.orig/src/xenconfig/xen_sxpr.c -+++ libvirt-5.2.0/src/xenconfig/xen_sxpr.c -@@ -1053,6 +1053,7 @@ xenParseSxprPCI(virDomainDefPtr def, +--- libvirt-5.3.0.orig/src/xenconfig/xen_sxpr.c ++++ libvirt-5.3.0/src/xenconfig/xen_sxpr.c +@@ -1054,6 +1054,7 @@ xenParseSxprPCI(virDomainDefPtr def, int busID; int slotID; int funcID; @@ -76,7 +76,7 @@ Index: libvirt-5.2.0/src/xenconfig/xen_sxpr.c node = cur->u.s.car; if (!sexpr_lookup(node, "dev")) -@@ -1100,11 +1101,13 @@ xenParseSxprPCI(virDomainDefPtr def, +@@ -1101,11 +1102,13 @@ xenParseSxprPCI(virDomainDefPtr def, goto error; } @@ -91,7 +91,7 @@ Index: libvirt-5.2.0/src/xenconfig/xen_sxpr.c dev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI; dev->source.subsys.u.pci.addr.domain = domainID; dev->source.subsys.u.pci.addr.bus = busID; -@@ -1962,11 +1965,15 @@ static void +@@ -1964,11 +1967,15 @@ static void xenFormatSxprPCI(virDomainHostdevDefPtr def, virBufferPtr buf) { @@ -108,7 +108,7 @@ Index: libvirt-5.2.0/src/xenconfig/xen_sxpr.c } -@@ -1985,12 +1992,6 @@ xenFormatSxprOnePCI(virDomainHostdevDefP +@@ -1987,12 +1994,6 @@ xenFormatSxprOnePCI(virDomainHostdevDefP virBufferPtr buf, int detach) { @@ -121,7 +121,7 @@ Index: libvirt-5.2.0/src/xenconfig/xen_sxpr.c virBufferAddLit(buf, "(pci "); xenFormatSxprPCI(def, buf); if (detach) -@@ -2045,12 +2046,6 @@ xenFormatSxprAllPCI(virDomainDefPtr def, +@@ -2047,12 +2048,6 @@ xenFormatSxprAllPCI(virDomainDefPtr def, for (i = 0; i < def->nhostdevs; i++) { if (def->hostdevs[i]->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && def->hostdevs[i]->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) { diff --git a/suse-apparmor-libnl-paths.patch b/suse-apparmor-libnl-paths.patch index d2d6a91..d212ba9 100644 --- a/suse-apparmor-libnl-paths.patch +++ b/suse-apparmor-libnl-paths.patch @@ -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-5.2.0/src/security/apparmor/libvirt-qemu +Index: libvirt-5.3.0/src/security/apparmor/libvirt-qemu =================================================================== ---- libvirt-5.2.0.orig/src/security/apparmor/libvirt-qemu -+++ libvirt-5.2.0/src/security/apparmor/libvirt-qemu +--- libvirt-5.3.0.orig/src/security/apparmor/libvirt-qemu ++++ libvirt-5.3.0/src/security/apparmor/libvirt-qemu @@ -63,6 +63,7 @@ #/dev/fb* rw, @@ -20,10 +20,10 @@ Index: libvirt-5.2.0/src/security/apparmor/libvirt-qemu @{HOME}/.pulse-cookie rwk, owner /root/.pulse-cookie rwk, owner /root/.pulse/ rw, -Index: libvirt-5.2.0/src/security/apparmor/usr.lib.libvirt.virt-aa-helper +Index: libvirt-5.3.0/src/security/apparmor/usr.lib.libvirt.virt-aa-helper =================================================================== ---- libvirt-5.2.0.orig/src/security/apparmor/usr.lib.libvirt.virt-aa-helper -+++ libvirt-5.2.0/src/security/apparmor/usr.lib.libvirt.virt-aa-helper +--- libvirt-5.3.0.orig/src/security/apparmor/usr.lib.libvirt.virt-aa-helper ++++ libvirt-5.3.0/src/security/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, diff --git a/suse-libvirt-guests-service.patch b/suse-libvirt-guests-service.patch index cb27235..6c16acf 100644 --- a/suse-libvirt-guests-service.patch +++ b/suse-libvirt-guests-service.patch @@ -1,9 +1,9 @@ Adjust libvirt-guests service to conform to SUSE standards -Index: libvirt-5.2.0/tools/libvirt-guests.sh.in +Index: libvirt-5.3.0/tools/libvirt-guests.sh.in =================================================================== ---- libvirt-5.2.0.orig/tools/libvirt-guests.sh.in -+++ libvirt-5.2.0/tools/libvirt-guests.sh.in +--- libvirt-5.3.0.orig/tools/libvirt-guests.sh.in ++++ libvirt-5.3.0/tools/libvirt-guests.sh.in @@ -16,14 +16,13 @@ # License along with this library. If not, see # . @@ -163,10 +163,10 @@ Index: libvirt-5.2.0/tools/libvirt-guests.sh.in esac -exit $RETVAL +rc_exit -Index: libvirt-5.2.0/tools/libvirt-guests.sysconf +Index: libvirt-5.3.0/tools/libvirt-guests.sysconf =================================================================== ---- libvirt-5.2.0.orig/tools/libvirt-guests.sysconf -+++ libvirt-5.2.0/tools/libvirt-guests.sysconf +--- libvirt-5.3.0.orig/tools/libvirt-guests.sysconf ++++ libvirt-5.3.0/tools/libvirt-guests.sysconf @@ -1,19 +1,29 @@ +## Path: System/Virtualization/libvirt-guests + diff --git a/suse-libvirtd-disable-tls.patch b/suse-libvirtd-disable-tls.patch index 41e616e..cfd4584 100644 --- a/suse-libvirtd-disable-tls.patch +++ b/suse-libvirtd-disable-tls.patch @@ -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-5.2.0/src/remote/libvirtd.conf +Index: libvirt-5.3.0/src/remote/libvirtd.conf =================================================================== ---- libvirt-5.2.0.orig/src/remote/libvirtd.conf -+++ libvirt-5.2.0/src/remote/libvirtd.conf +--- libvirt-5.3.0.orig/src/remote/libvirtd.conf ++++ libvirt-5.3.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-5.2.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-5.2.0/src/remote/remote_daemon_config.c +Index: libvirt-5.3.0/src/remote/remote_daemon_config.c =================================================================== ---- libvirt-5.2.0.orig/src/remote/remote_daemon_config.c -+++ libvirt-5.2.0/src/remote/remote_daemon_config.c +--- libvirt-5.3.0.orig/src/remote/remote_daemon_config.c ++++ libvirt-5.3.0/src/remote/remote_daemon_config.c @@ -108,7 +108,7 @@ daemonConfigNew(bool privileged ATTRIBUT if (VIR_ALLOC(data) < 0) return NULL; @@ -31,10 +31,10 @@ Index: libvirt-5.2.0/src/remote/remote_daemon_config.c data->listen_tcp = 0; if (VIR_STRDUP(data->tls_port, LIBVIRTD_TLS_PORT) < 0 || -Index: libvirt-5.2.0/src/remote/test_libvirtd.aug.in +Index: libvirt-5.3.0/src/remote/test_libvirtd.aug.in =================================================================== ---- libvirt-5.2.0.orig/src/remote/test_libvirtd.aug.in -+++ libvirt-5.2.0/src/remote/test_libvirtd.aug.in +--- libvirt-5.3.0.orig/src/remote/test_libvirtd.aug.in ++++ libvirt-5.3.0/src/remote/test_libvirtd.aug.in @@ -2,7 +2,7 @@ module Test_libvirtd = ::CONFIG:: diff --git a/suse-libvirtd-service-xen.patch b/suse-libvirtd-service-xen.patch index b2dddcb..5e2c3c4 100644 --- a/suse-libvirtd-service-xen.patch +++ b/suse-libvirtd-service-xen.patch @@ -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-5.2.0/src/remote/libvirtd.service.in +Index: libvirt-5.3.0/src/remote/libvirtd.service.in =================================================================== ---- libvirt-5.2.0.orig/src/remote/libvirtd.service.in -+++ libvirt-5.2.0/src/remote/libvirtd.service.in +--- libvirt-5.3.0.orig/src/remote/libvirtd.service.in ++++ libvirt-5.3.0/src/remote/libvirtd.service.in @@ -17,6 +17,8 @@ After=local-fs.target After=remote-fs.target After=systemd-logind.service diff --git a/suse-libvirtd-sysconfig-settings.patch b/suse-libvirtd-sysconfig-settings.patch index 382ac67..10c44e3 100644 --- a/suse-libvirtd-sysconfig-settings.patch +++ b/suse-libvirtd-sysconfig-settings.patch @@ -1,9 +1,9 @@ Adjust libvirtd sysconfig file to conform to SUSE standards -Index: libvirt-5.2.0/src/remote/libvirtd.sysconf +Index: libvirt-5.3.0/src/remote/libvirtd.sysconf =================================================================== ---- libvirt-5.2.0.orig/src/remote/libvirtd.sysconf -+++ libvirt-5.2.0/src/remote/libvirtd.sysconf +--- libvirt-5.3.0.orig/src/remote/libvirtd.sysconf ++++ libvirt-5.3.0/src/remote/libvirtd.sysconf @@ -1,16 +1,25 @@ +## Path: System/Virtualization/libvirt + diff --git a/suse-libxl-disable-autoballoon.patch b/suse-libxl-disable-autoballoon.patch index 66d83d5..8f36518 100644 --- a/suse-libxl-disable-autoballoon.patch +++ b/suse-libxl-disable-autoballoon.patch @@ -6,10 +6,10 @@ autoballooning. This patch changes libvirt to also disable autoballooning by default. It can only be enabled with the 'autoballoon' setting in libxl.conf. See jsc#SLE-3059 for more details. -Index: libvirt-5.2.0/src/libxl/libxl.conf +Index: libvirt-5.3.0/src/libxl/libxl.conf =================================================================== ---- libvirt-5.2.0.orig/src/libxl/libxl.conf -+++ libvirt-5.2.0/src/libxl/libxl.conf +--- libvirt-5.3.0.orig/src/libxl/libxl.conf ++++ libvirt-5.3.0/src/libxl/libxl.conf @@ -4,12 +4,11 @@ # Enable autoballooning of domain0 @@ -27,10 +27,10 @@ Index: libvirt-5.2.0/src/libxl/libxl.conf # In order to prevent accidentally starting two domains that -Index: libvirt-5.2.0/src/libxl/libxl_conf.c +Index: libvirt-5.3.0/src/libxl/libxl_conf.c =================================================================== ---- libvirt-5.2.0.orig/src/libxl/libxl_conf.c -+++ libvirt-5.2.0/src/libxl/libxl_conf.c +--- libvirt-5.3.0.orig/src/libxl/libxl_conf.c ++++ libvirt-5.3.0/src/libxl/libxl_conf.c @@ -22,7 +22,6 @@ #include @@ -39,7 +39,7 @@ Index: libvirt-5.2.0/src/libxl/libxl_conf.c #include #include #include -@@ -1762,14 +1761,12 @@ libxlMakeBuildInfoVfb(virPortAllocatorRa +@@ -1763,14 +1762,12 @@ libxlMakeBuildInfoVfb(virPortAllocatorRa /* * Get domain0 autoballoon configuration. Honor user-specified * setting in libxl.conf first. If not specified, autoballooning @@ -55,7 +55,7 @@ Index: libvirt-5.2.0/src/libxl/libxl_conf.c int res; res = virConfGetValueBool(conf, "autoballoon", &cfg->autoballoon); -@@ -1778,21 +1775,8 @@ libxlGetAutoballoonConf(libxlDriverConfi +@@ -1779,21 +1776,8 @@ libxlGetAutoballoonConf(libxlDriverConfi else if (res == 1) return 0; diff --git a/suse-ovmf-paths.patch b/suse-ovmf-paths.patch index 0332a71..1b84493 100644 --- a/suse-ovmf-paths.patch +++ b/suse-ovmf-paths.patch @@ -1,10 +1,10 @@ Adjust paths of OVMF firmwares on SUSE distros -Index: libvirt-5.2.0/src/qemu/qemu.conf +Index: libvirt-5.3.0/src/qemu/qemu.conf =================================================================== ---- libvirt-5.2.0.orig/src/qemu/qemu.conf -+++ libvirt-5.2.0/src/qemu/qemu.conf -@@ -773,10 +773,9 @@ security_default_confined = 0 +--- libvirt-5.3.0.orig/src/qemu/qemu.conf ++++ libvirt-5.3.0/src/qemu/qemu.conf +@@ -781,10 +781,9 @@ security_default_confined = 0 # for x86_64 and i686, but it's AAVMF for aarch64. The libvirt default # follows this scheme. #nvram = [ @@ -18,10 +18,10 @@ Index: libvirt-5.2.0/src/qemu/qemu.conf #] # The backend to use for handling stdout/stderr output from -Index: libvirt-5.2.0/src/qemu/qemu_conf.c +Index: libvirt-5.3.0/src/qemu/qemu_conf.c =================================================================== ---- libvirt-5.2.0.orig/src/qemu/qemu_conf.c -+++ libvirt-5.2.0/src/qemu/qemu_conf.c +--- libvirt-5.3.0.orig/src/qemu/qemu_conf.c ++++ libvirt-5.3.0/src/qemu/qemu_conf.c @@ -116,10 +116,9 @@ void qemuDomainCmdlineDefFree(qemuDomain #ifndef DEFAULT_LOADER_NVRAM @@ -36,10 +36,10 @@ Index: libvirt-5.2.0/src/qemu/qemu_conf.c #endif -Index: libvirt-5.2.0/src/security/virt-aa-helper.c +Index: libvirt-5.3.0/src/security/virt-aa-helper.c =================================================================== ---- libvirt-5.2.0.orig/src/security/virt-aa-helper.c -+++ libvirt-5.2.0/src/security/virt-aa-helper.c +--- libvirt-5.3.0.orig/src/security/virt-aa-helper.c ++++ libvirt-5.3.0/src/security/virt-aa-helper.c @@ -506,7 +506,8 @@ valid_path(const char *path, const bool "/usr/share/ovmf/", /* for OVMF images */ "/usr/share/AAVMF/", /* for AAVMF images */ diff --git a/suse-qemu-conf.patch b/suse-qemu-conf.patch index 2b64437..544a167 100644 --- a/suse-qemu-conf.patch +++ b/suse-qemu-conf.patch @@ -7,10 +7,10 @@ suse-qemu-conf-secdriver.patch, suse-qemu-conf-lockmgr.patch, etc.), but for now they are all lumped together in this single patch. -Index: libvirt-5.2.0/src/qemu/qemu.conf +Index: libvirt-5.3.0/src/qemu/qemu.conf =================================================================== ---- libvirt-5.2.0.orig/src/qemu/qemu.conf -+++ libvirt-5.2.0/src/qemu/qemu.conf +--- libvirt-5.3.0.orig/src/qemu/qemu.conf ++++ libvirt-5.3.0/src/qemu/qemu.conf @@ -420,11 +420,20 @@ # isolation, but it cannot appear in a list of drivers. # diff --git a/suse-virtlockd-sysconfig-settings.patch b/suse-virtlockd-sysconfig-settings.patch index eb29838..c952aae 100644 --- a/suse-virtlockd-sysconfig-settings.patch +++ b/suse-virtlockd-sysconfig-settings.patch @@ -1,9 +1,9 @@ Adjust virtlockd sysconfig file to conform to SUSE standards -Index: libvirt-5.2.0/src/locking/virtlockd.sysconf +Index: libvirt-5.3.0/src/locking/virtlockd.sysconf =================================================================== ---- libvirt-5.2.0.orig/src/locking/virtlockd.sysconf -+++ libvirt-5.2.0/src/locking/virtlockd.sysconf +--- libvirt-5.3.0.orig/src/locking/virtlockd.sysconf ++++ libvirt-5.3.0/src/locking/virtlockd.sysconf @@ -1,3 +1,7 @@ +## Path: System/Virtualization/virtlockd + diff --git a/suse-virtlogd-sysconfig-settings.patch b/suse-virtlogd-sysconfig-settings.patch index b4cbf02..3e6c751 100644 --- a/suse-virtlogd-sysconfig-settings.patch +++ b/suse-virtlogd-sysconfig-settings.patch @@ -1,9 +1,9 @@ Adjust virtlogd sysconfig file to conform to SUSE standards -Index: libvirt-5.2.0/src/logging/virtlogd.sysconf +Index: libvirt-5.3.0/src/logging/virtlogd.sysconf =================================================================== ---- libvirt-5.2.0.orig/src/logging/virtlogd.sysconf -+++ libvirt-5.2.0/src/logging/virtlogd.sysconf +--- libvirt-5.3.0.orig/src/logging/virtlogd.sysconf ++++ libvirt-5.3.0/src/logging/virtlogd.sysconf @@ -1,3 +1,7 @@ +## Path: System/Virtualization/virtlogd + diff --git a/virt-create-rootfs.patch b/virt-create-rootfs.patch index 28ae90f..5c324d2 100644 --- a/virt-create-rootfs.patch +++ b/virt-create-rootfs.patch @@ -1,8 +1,8 @@ -Index: libvirt-5.0.0/tools/Makefile.am +Index: libvirt-5.3.0/tools/Makefile.am =================================================================== ---- libvirt-5.0.0.orig/tools/Makefile.am -+++ libvirt-5.0.0/tools/Makefile.am -@@ -53,6 +53,7 @@ PODFILES = \ +--- libvirt-5.3.0.orig/tools/Makefile.am ++++ libvirt-5.3.0/tools/Makefile.am +@@ -52,6 +52,7 @@ PODFILES = \ virt-sanlock-cleanup.pod \ virt-xml-validate.pod \ virsh.pod \ @@ -10,7 +10,7 @@ Index: libvirt-5.0.0/tools/Makefile.am $(NULL) MANINFILES = \ -@@ -88,7 +89,7 @@ MAINTAINERCLEANFILES = +@@ -87,7 +88,7 @@ MAINTAINERCLEANFILES = confdir = $(sysconfdir)/libvirt conf_DATA = @@ -19,7 +19,7 @@ Index: libvirt-5.0.0/tools/Makefile.am bin_PROGRAMS = virsh virt-admin libexec_SCRIPTS = libvirt-guests.sh man1_MANS = \ -@@ -114,6 +115,8 @@ bin_PROGRAMS += virt-host-validate +@@ -113,6 +114,8 @@ bin_PROGRAMS += virt-host-validate man1_MANS += virt-host-validate.1 endif WITH_HOST_VALIDATE @@ -28,10 +28,10 @@ Index: libvirt-5.0.0/tools/Makefile.am virt-xml-validate: virt-xml-validate.in Makefile $(AM_V_GEN)sed -e 's|[@]schemadir@|$(pkgdatadir)/schemas|g' \ -e 's|[@]VERSION@|$(VERSION)|g' \ -Index: libvirt-5.0.0/tools/virt-create-rootfs +Index: libvirt-5.3.0/tools/virt-create-rootfs =================================================================== --- /dev/null -+++ libvirt-5.0.0/tools/virt-create-rootfs ++++ libvirt-5.3.0/tools/virt-create-rootfs @@ -0,0 +1,214 @@ +#!/bin/sh +set -e @@ -247,10 +247,10 @@ Index: libvirt-5.0.0/tools/virt-create-rootfs + echo "pts/0" >> "$ROOT/etc/securetty" + chroot "$ROOT" /usr/bin/passwd +fi -Index: libvirt-5.0.0/tools/virt-create-rootfs.pod +Index: libvirt-5.3.0/tools/virt-create-rootfs.pod =================================================================== --- /dev/null -+++ libvirt-5.0.0/tools/virt-create-rootfs.pod ++++ libvirt-5.3.0/tools/virt-create-rootfs.pod @@ -0,0 +1,77 @@ +=head1 NAME + diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index a7a9449..a929da3 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -1,7 +1,7 @@ -Index: libvirt-5.2.0/src/xenconfig/xen_sxpr.c +Index: libvirt-5.3.0/src/xenconfig/xen_sxpr.c =================================================================== ---- libvirt-5.2.0.orig/src/xenconfig/xen_sxpr.c -+++ libvirt-5.2.0/src/xenconfig/xen_sxpr.c +--- libvirt-5.3.0.orig/src/xenconfig/xen_sxpr.c ++++ libvirt-5.3.0/src/xenconfig/xen_sxpr.c @@ -383,7 +383,7 @@ xenParseSxprVifRate(const char *rate, un static int xenParseSxprDisks(virDomainDefPtr def, diff --git a/xen-sxpr-disk-type.patch b/xen-sxpr-disk-type.patch index 2a94777..cdd055d 100644 --- a/xen-sxpr-disk-type.patch +++ b/xen-sxpr-disk-type.patch @@ -6,10 +6,10 @@ and 'file'. This was implicitly done prior to commit 9673418c. https://bugzilla.suse.com/show_bug.cgi?id=938228 -Index: libvirt-5.2.0/src/xenconfig/xen_sxpr.c +Index: libvirt-5.3.0/src/xenconfig/xen_sxpr.c =================================================================== ---- libvirt-5.2.0.orig/src/xenconfig/xen_sxpr.c -+++ libvirt-5.2.0/src/xenconfig/xen_sxpr.c +--- libvirt-5.3.0.orig/src/xenconfig/xen_sxpr.c ++++ libvirt-5.3.0/src/xenconfig/xen_sxpr.c @@ -497,10 +497,11 @@ xenParseSxprDisks(virDomainDefPtr def, omnipotent, we can revisit this, perhaps stat()'ing the src file in question */