From 906f09abf99665b7f2f4d0077e2da5c8e3cdeee7bde2e6702d6250f1647a7926 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Tue, 18 Jan 2022 18:01:54 +0000 Subject: [PATCH] Accepting request 947275 from home:jfehlig:branches:Virtualization - sysconfig files have not been distributed for many months. Add upstream patches that improve documentation and moves service default settings to the associated systemd service file. - Update to libvirt 8.0.0 - CVE-2021-4147 - bsc#1191511 - jsc#SLE-11435, jsc#SLE-18354 - Many incremental improvements and bug fixes, see https://libvirt.org/news.html#v8-0-0-2022-01-14 OBS-URL: https://build.opensuse.org/request/show/947275 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=918 --- ...stats-functions-from-the-qemu-driver.patch | 52 +- ...ibxl-add-support-for-BlockResize-API.patch | 16 +- ...n-pkttyagent-when-stdin-is-not-a-tty.patch | 6 +- ...c-implement-connectGetAllDomainStats.patch | 10 +- 16172741-libvirt-guests-manpage.patch | 214 ++++ 23b51d7b-libxl-disable-death-event.patch | 105 -- 3be5ba11-libvirt-guests-install.patch | 66 ++ 5c5df531-libxl-search-domid-in-thread.patch | 167 --- 8eb44616-remove-sysconfig-files.patch | 1034 +++++++++++++++++ a4e6fba0-libxl-rename-threadinfo-struct.patch | 63 - a7a03324-libxl-protect-logger-access.patch | 84 -- b9a5faea-libxl-handle-death-thread.patch | 140 --- cbae4eaa-libxl-add-domainGetMessages.patch | 62 - e4f7589a-libxl-shutdown-thread-name.patch | 27 - libvirt-7.10.0.tar.xz | 3 - libvirt-7.10.0.tar.xz.asc | 16 - libvirt-8.0.0.tar.xz | 3 + libvirt-8.0.0.tar.xz.asc | 16 + libvirt-power8-models.patch | 6 +- libvirt-suse-netcontrol.patch | 42 +- libvirt.changes | 28 + libvirt.spec | 115 +- libxl-dom-reset.patch | 10 +- libxl-set-cach-mode.patch | 6 +- libxl-set-migration-constraints.patch | 84 +- libxl-support-block-script.patch | 6 +- lxc-wait-after-eth-del.patch | 24 +- ...e-dhcp-authoritative-on-static-netwo.patch | 14 +- ppc64le-canonical-name.patch | 6 +- qemu-apparmor-screenshot.patch | 6 +- suse-libvirt-guests-service.patch | 6 +- suse-libvirtd-disable-tls.patch | 18 +- suse-libxl-disable-autoballoon.patch | 18 +- suse-qemu-conf.patch | 18 +- suse-qemu-ovmf-paths.patch | 24 +- suse-xen-ovmf-paths.patch | 6 +- virt-create-rootfs.patch | 24 +- 37 files changed, 1597 insertions(+), 948 deletions(-) create mode 100644 16172741-libvirt-guests-manpage.patch delete mode 100644 23b51d7b-libxl-disable-death-event.patch create mode 100644 3be5ba11-libvirt-guests-install.patch delete mode 100644 5c5df531-libxl-search-domid-in-thread.patch create mode 100644 8eb44616-remove-sysconfig-files.patch delete mode 100644 a4e6fba0-libxl-rename-threadinfo-struct.patch delete mode 100644 a7a03324-libxl-protect-logger-access.patch delete mode 100644 b9a5faea-libxl-handle-death-thread.patch delete mode 100644 cbae4eaa-libxl-add-domainGetMessages.patch delete mode 100644 e4f7589a-libxl-shutdown-thread-name.patch delete mode 100644 libvirt-7.10.0.tar.xz delete mode 100644 libvirt-7.10.0.tar.xz.asc create mode 100644 libvirt-8.0.0.tar.xz create mode 100644 libvirt-8.0.0.tar.xz.asc diff --git a/0001-Extract-stats-functions-from-the-qemu-driver.patch b/0001-Extract-stats-functions-from-the-qemu-driver.patch index ee3962c..4be7781 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-7.10.0/src/conf/domain_stats.c +Index: libvirt-8.0.0/src/conf/domain_stats.c =================================================================== --- /dev/null -+++ libvirt-7.10.0/src/conf/domain_stats.c ++++ libvirt-8.0.0/src/conf/domain_stats.c @@ -0,0 +1,117 @@ +/* + * domain_stats.c: domain stats extraction helpers @@ -140,10 +140,10 @@ Index: libvirt-7.10.0/src/conf/domain_stats.c +} + +#undef STATS_ADD_NET_PARAM -Index: libvirt-7.10.0/src/conf/domain_stats.h +Index: libvirt-8.0.0/src/conf/domain_stats.h =================================================================== --- /dev/null -+++ libvirt-7.10.0/src/conf/domain_stats.h ++++ libvirt-8.0.0/src/conf/domain_stats.h @@ -0,0 +1,60 @@ +/* + * domain_stats.h: domain stats extraction helpers @@ -205,11 +205,11 @@ Index: libvirt-7.10.0/src/conf/domain_stats.h + virTypedParamList *params); + +#endif /* __DOMAIN_STATS_H */ -Index: libvirt-7.10.0/src/libvirt_private.syms +Index: libvirt-8.0.0/src/libvirt_private.syms =================================================================== ---- libvirt-7.10.0.orig/src/libvirt_private.syms -+++ libvirt-7.10.0/src/libvirt_private.syms -@@ -770,6 +770,11 @@ virDomainConfNWFilterTeardown; +--- libvirt-8.0.0.orig/src/libvirt_private.syms ++++ libvirt-8.0.0/src/libvirt_private.syms +@@ -772,6 +772,11 @@ virDomainConfNWFilterTeardown; virDomainConfVMNWFilterTeardown; @@ -221,7 +221,7 @@ Index: libvirt-7.10.0/src/libvirt_private.syms # conf/domain_validate.h virDomainActualNetDefValidate; virDomainDefValidate; -@@ -1950,6 +1955,7 @@ virCgroupGetMemoryUsage; +@@ -1942,6 +1947,7 @@ virCgroupGetMemoryUsage; virCgroupGetMemSwapHardLimit; virCgroupGetMemSwapUsage; virCgroupGetPercpuStats; @@ -229,10 +229,10 @@ Index: libvirt-7.10.0/src/libvirt_private.syms virCgroupHasController; virCgroupHasEmptyTasks; virCgroupKillPainfully; -Index: libvirt-7.10.0/src/qemu/qemu_driver.c +Index: libvirt-8.0.0/src/qemu/qemu_driver.c =================================================================== ---- libvirt-7.10.0.orig/src/qemu/qemu_driver.c -+++ libvirt-7.10.0/src/qemu/qemu_driver.c +--- libvirt-8.0.0.orig/src/qemu/qemu_driver.c ++++ libvirt-8.0.0/src/qemu/qemu_driver.c @@ -68,6 +68,7 @@ #include "virarptable.h" #include "viruuid.h" @@ -241,7 +241,7 @@ Index: libvirt-7.10.0/src/qemu/qemu_driver.c #include "domain_audit.h" #include "domain_cgroup.h" #include "domain_driver.h" -@@ -17530,13 +17531,7 @@ qemuDomainGetStatsState(virQEMUDriver *d +@@ -17407,13 +17408,7 @@ qemuDomainGetStatsState(virQEMUDriver *d virTypedParamList *params, unsigned int privflags G_GNUC_UNUSED) { @@ -256,7 +256,7 @@ Index: libvirt-7.10.0/src/qemu/qemu_driver.c } -@@ -17828,25 +17823,11 @@ qemuDomainGetStatsCpuCgroup(virDomainObj +@@ -17705,25 +17700,11 @@ qemuDomainGetStatsCpuCgroup(virDomainObj virTypedParamList *params) { qemuDomainObjPrivate *priv = dom->privateData; @@ -283,7 +283,7 @@ Index: libvirt-7.10.0/src/qemu/qemu_driver.c } static int -@@ -18039,76 +18020,15 @@ qemuDomainGetStatsVcpu(virQEMUDriver *dr +@@ -17916,76 +17897,15 @@ qemuDomainGetStatsVcpu(virQEMUDriver *dr return ret; } @@ -361,11 +361,11 @@ Index: libvirt-7.10.0/src/qemu/qemu_driver.c /* refresh information by opening images on the disk */ static int -Index: libvirt-7.10.0/src/util/vircgroup.c +Index: libvirt-8.0.0/src/util/vircgroup.c =================================================================== ---- libvirt-7.10.0.orig/src/util/vircgroup.c -+++ libvirt-7.10.0/src/util/vircgroup.c -@@ -3033,6 +3033,31 @@ virCgroupGetInode(virCgroup *cgroup) +--- libvirt-8.0.0.orig/src/util/vircgroup.c ++++ libvirt-8.0.0/src/util/vircgroup.c +@@ -3022,6 +3022,31 @@ virCgroupGetInode(virCgroup *cgroup) return st.st_ino; } @@ -397,7 +397,7 @@ Index: libvirt-7.10.0/src/util/vircgroup.c #else /* !__linux__ */ bool -@@ -3042,6 +3067,14 @@ virCgroupAvailable(void) +@@ -3031,6 +3056,14 @@ virCgroupAvailable(void) } @@ -412,10 +412,10 @@ Index: libvirt-7.10.0/src/util/vircgroup.c int virCgroupNewPartition(const char *path G_GNUC_UNUSED, bool create G_GNUC_UNUSED, -Index: libvirt-7.10.0/src/util/vircgroup.h +Index: libvirt-8.0.0/src/util/vircgroup.h =================================================================== ---- libvirt-7.10.0.orig/src/util/vircgroup.h -+++ libvirt-7.10.0/src/util/vircgroup.h +--- libvirt-8.0.0.orig/src/util/vircgroup.h ++++ libvirt-8.0.0/src/util/vircgroup.h @@ -23,6 +23,7 @@ #include "virbitmap.h" @@ -432,10 +432,10 @@ Index: libvirt-7.10.0/src/util/vircgroup.h + virTypedParamList *params); + int virCgroupGetInode(virCgroup *cgroup); -Index: libvirt-7.10.0/src/conf/meson.build +Index: libvirt-8.0.0/src/conf/meson.build =================================================================== ---- libvirt-7.10.0.orig/src/conf/meson.build -+++ libvirt-7.10.0/src/conf/meson.build +--- libvirt-8.0.0.orig/src/conf/meson.build ++++ libvirt-8.0.0/src/conf/meson.build @@ -15,6 +15,7 @@ domain_conf_sources = [ 'domain_conf.c', 'domain_nwfilter.c', diff --git a/0001-libxl-add-support-for-BlockResize-API.patch b/0001-libxl-add-support-for-BlockResize-API.patch index 5882b5d..55ca2c0 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-7.10.0/src/libxl/libxl_driver.c +Index: libvirt-8.0.0/src/libxl/libxl_driver.c =================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_driver.c -+++ libvirt-7.10.0/src/libxl/libxl_driver.c -@@ -5254,6 +5254,95 @@ libxlDomainMemoryStats(virDomainPtr dom, +--- libvirt-8.0.0.orig/src/libxl/libxl_driver.c ++++ libvirt-8.0.0/src/libxl/libxl_driver.c +@@ -5241,6 +5241,95 @@ libxlDomainMemoryStats(virDomainPtr dom, #undef LIBXL_SET_MEMSTAT @@ -119,7 +119,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_driver.c static int libxlDomainGetJobInfo(virDomainPtr dom, virDomainJobInfoPtr info) -@@ -6575,6 +6664,7 @@ static virHypervisorDriver libxlHypervis +@@ -6554,6 +6643,7 @@ static virHypervisorDriver libxlHypervis .domainGetNumaParameters = libxlDomainGetNumaParameters, /* 1.1.1 */ .nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */ .nodeGetCellsFreeMemory = libxlNodeGetCellsFreeMemory, /* 1.1.1 */ @@ -127,10 +127,10 @@ Index: libvirt-7.10.0/src/libxl/libxl_driver.c .domainGetJobInfo = libxlDomainGetJobInfo, /* 1.3.1 */ .domainGetJobStats = libxlDomainGetJobStats, /* 1.3.1 */ .domainMemoryStats = libxlDomainMemoryStats, /* 1.3.0 */ -Index: libvirt-7.10.0/src/libxl/libxl_api_wrapper.h +Index: libvirt-8.0.0/src/libxl/libxl_api_wrapper.h =================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_api_wrapper.h -+++ libvirt-7.10.0/src/libxl/libxl_api_wrapper.h +--- libvirt-8.0.0.orig/src/libxl/libxl_api_wrapper.h ++++ libvirt-8.0.0/src/libxl/libxl_api_wrapper.h @@ -215,3 +215,18 @@ libxlSetMemoryTargetWrapper(libxl_ctx *c return ret; diff --git a/0001-util-Don-t-spawn-pkttyagent-when-stdin-is-not-a-tty.patch b/0001-util-Don-t-spawn-pkttyagent-when-stdin-is-not-a-tty.patch index 49a3845..a81f032 100644 --- a/0001-util-Don-t-spawn-pkttyagent-when-stdin-is-not-a-tty.patch +++ b/0001-util-Don-t-spawn-pkttyagent-when-stdin-is-not-a-tty.patch @@ -18,10 +18,10 @@ Signed-off-by: Martin Kletzander src/util/virpolkit.c | 3 +++ 1 file changed, 3 insertions(+) -Index: libvirt-7.10.0/src/util/virpolkit.c +Index: libvirt-8.0.0/src/util/virpolkit.c =================================================================== ---- libvirt-7.10.0.orig/src/util/virpolkit.c -+++ libvirt-7.10.0/src/util/virpolkit.c +--- libvirt-8.0.0.orig/src/util/virpolkit.c ++++ libvirt-8.0.0/src/util/virpolkit.c @@ -237,6 +237,9 @@ virPolkitAgentAvailable(void) const char *termid = ctermid(NULL); VIR_AUTOCLOSE fd = -1; diff --git a/0002-lxc-implement-connectGetAllDomainStats.patch b/0002-lxc-implement-connectGetAllDomainStats.patch index 6526d02..399f1fb 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-7.10.0/src/lxc/lxc_driver.c +Index: libvirt-8.0.0/src/lxc/lxc_driver.c =================================================================== ---- libvirt-7.10.0.orig/src/lxc/lxc_driver.c -+++ libvirt-7.10.0/src/lxc/lxc_driver.c +--- libvirt-8.0.0.orig/src/lxc/lxc_driver.c ++++ libvirt-8.0.0/src/lxc/lxc_driver.c @@ -74,6 +74,8 @@ #include "netdev_bandwidth_conf.h" #include "virsocket.h" @@ -22,7 +22,7 @@ Index: libvirt-7.10.0/src/lxc/lxc_driver.c #define VIR_FROM_THIS VIR_FROM_LXC -@@ -5075,6 +5077,128 @@ lxcDomainHasManagedSaveImage(virDomainPt +@@ -5036,6 +5038,128 @@ lxcDomainHasManagedSaveImage(virDomainPt return ret; } @@ -151,7 +151,7 @@ Index: libvirt-7.10.0/src/lxc/lxc_driver.c /* Function Tables */ static virHypervisorDriver lxcHypervisorDriver = { -@@ -5172,6 +5296,7 @@ static virHypervisorDriver lxcHypervisor +@@ -5133,6 +5257,7 @@ static virHypervisorDriver lxcHypervisor .nodeGetFreePages = lxcNodeGetFreePages, /* 1.2.6 */ .nodeAllocPages = lxcNodeAllocPages, /* 1.2.9 */ .domainHasManagedSaveImage = lxcDomainHasManagedSaveImage, /* 1.2.13 */ diff --git a/16172741-libvirt-guests-manpage.patch b/16172741-libvirt-guests-manpage.patch new file mode 100644 index 0000000..3d73391 --- /dev/null +++ b/16172741-libvirt-guests-manpage.patch @@ -0,0 +1,214 @@ +commit 161727417a91bdddf8f3167cf70c3de2829be81c +Author: Jim Fehlig +Date: Fri Jan 7 14:35:10 2022 -0700 + + docs: Add man page for libvirt-guests + + Signed-off-by: Jim Fehlig + Reviewed-by: Andrea Bolognani + +Index: libvirt-8.0.0/docs/manpages/index.rst +=================================================================== +--- libvirt-8.0.0.orig/docs/manpages/index.rst ++++ libvirt-8.0.0/docs/manpages/index.rst +@@ -41,6 +41,7 @@ Tools + * `virt-admin(1) `__ - daemon administration interface + * `virsh(1) `__ - management user interface + * `virt-qemu-run(1) `__ - run standalone QEMU instances ++* `libvirt-guests(8) `__ - suspend/resume running libvirt guests + + Key codes + ========= +Index: libvirt-8.0.0/docs/manpages/libvirt-guests.rst +=================================================================== +--- /dev/null ++++ libvirt-8.0.0/docs/manpages/libvirt-guests.rst +@@ -0,0 +1,151 @@ ++============== ++libvirt-guests ++============== ++ ++------------------------------------- ++suspend/resume running libvirt guests ++------------------------------------- ++ ++:Manual section: 8 ++:Manual group: Virtualization Support ++ ++.. contents:: ++ ++SYNOPSIS ++======== ++ ++``libvirt-guests`` *COMMAND* ++ ++ ++DESCRIPTION ++=========== ++ ++``libvirt-guests`` is a service that can be used to coordinate guest and host ++lifecyle actions. By default, ``libvirt-guests`` will suspend running guests ++when the host shuts down, and restore them to their pre-shutdown state when ++the host reboots. ++ ++``libvirt-guests`` is typically under control of systemd. When ++``libvirt-guests.service`` is enabled, systemd will call ``libvirt-guests`` ++with the ``start`` *COMMAND* when the host boots. Conversely, systemd will call ++``libvirt-guests`` with the ``stop`` *COMMAND* when the host shuts down. ++ ++``libvirt-guests`` can be used directly. In addition to the ``start`` and ++``stop`` *COMMAND*\s, it also supports ``status``, ``restart``, ``condrestart``, ++``try-restart``, ``reload``, ``force-reload``, ``gueststatus``, and ++``shutdown`` *COMMAND*\s. ++ ++ ++FILES ++===== ++ ++``libvirt-guests`` defines several variables to control service behavior. ++The default vaule of these variables can be overridden in: ++ ++* ``@SYSCONFDIR@/sysconfig/libvirt-guests`` ++ ++The following variables are supported: ++ ++- URIS=default ++ ++ URIs to check for running guests. Example: ++ ``URIS='default xen:///system xen+tcp://host/system lxc:///system'`` ++ ++- ON_BOOT=start ++ ++ Action taken on host boot ++ ++ * start ++ ++ All guests which were running on shutdown are started on boot regardless ++ of their autostart settings ++ ++ * ignore ++ ++ ``libvirt-guests`` won't start any guest on boot, however, guests marked ++ as autostart will still be automatically started by libvirtd ++ ++- START_DELAY=0 ++ ++ Number of seconds to wait between each guest start. Set to 0 to allow parallel ++ startup. ++ ++- ON_SHUTDOWN=suspend ++ ++ Action taken on host shutdown ++ ++ * suspend ++ ++ All running guests are suspended using virsh managedsave ++ ++ * shutdown ++ ++ All running guests are asked to shutdown. Please be careful with this ++ settings since there is no way to distinguish between a guest which is ++ stuck or ignores shutdown requests and a guest which just needs a long ++ time to shutdown. When setting ON_SHUTDOWN=shutdown, you must also set ++ SHUTDOWN_TIMEOUT to a value suitable for your guests. ++ ++- PARALLEL_SHUTDOWN=0 ++ ++ Number of guests will be shutdown concurrently, taking effect when ++ "ON_SHUTDOWN" is set to "shutdown". If Set to 0, guests will be shutdown one ++ after another. Number of guests on shutdown at any time will not exceed number ++ set in this variable. ++ ++- SHUTDOWN_TIMEOUT=300 ++ ++ Number of seconds we're willing to wait for a guest to shut down. If parallel ++ shutdown is enabled, this timeout applies as a timeout for shutting down all ++ guests on a single URI defined in the variable URIS. If this is 0, then there ++ is no time out (use with caution, as guests might not respond to a shutdown ++ request). The default value is 300 seconds (5 minutes). ++ ++- BYPASS_CACHE=0 ++ ++ If non-zero, try to bypass the file system cache when saving and ++ restoring guests, even though this may give slower operation for ++ some file systems. ++ ++- SYNC_TIME=0 ++ ++ If non-zero, try to sync guest time on domain resume. Be aware, that ++ this requires guest agent with support for time synchronization ++ running in the guest. By default, this functionality is turned off. ++ ++ ++BUGS ++==== ++ ++Please report all bugs you discover. This should be done via either: ++ ++#. the mailing list ++ ++ `https://libvirt.org/contact.html `_ ++ ++#. the bug tracker ++ ++ `https://libvirt.org/bugs.html `_ ++ ++Alternatively, you may report bugs to your software distributor / vendor. ++ ++ ++AUTHORS ++======= ++ ++Please refer to the AUTHORS file distributed with libvirt. ++ ++ ++LICENSE ++======= ++ ++``libvirt-guests`` is distributed under the terms of the GNU LGPL v2.1+. ++This is free software; see the source for copying conditions. There ++is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR ++PURPOSE ++ ++ ++SEE ALSO ++======== ++ ++libvirtd(8), `https://libvirt.org/ `_ +Index: libvirt-8.0.0/docs/manpages/meson.build +=================================================================== +--- libvirt-8.0.0.orig/docs/manpages/meson.build ++++ libvirt-8.0.0/docs/manpages/meson.build +@@ -21,6 +21,7 @@ docs_man_files = [ + { 'name': 'virt-qemu-run', 'section': '1', 'install': conf.has('WITH_QEMU') }, + { 'name': 'virt-xml-validate', 'section': '1', 'install': true }, + ++ { 'name': 'libvirt-guests', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') }, + { 'name': 'libvirtd', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') }, + { 'name': 'virt-sanlock-cleanup', 'section': '8', 'install': conf.has('WITH_SANLOCK') }, + { 'name': 'virt-ssh-helper', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') }, +Index: libvirt-8.0.0/libvirt.spec.in +=================================================================== +--- libvirt-8.0.0.orig/libvirt.spec.in ++++ libvirt-8.0.0/libvirt.spec.in +@@ -1694,6 +1694,7 @@ exit 0 + %{_mandir}/man1/virt-admin.1* + %{_mandir}/man1/virt-host-validate.1* + %{_mandir}/man8/virt-ssh-helper.8* ++%{_mandir}/man8/libvirt-guests.8* + %{_mandir}/man8/libvirtd.8* + %{_mandir}/man8/virtlogd.8* + %{_mandir}/man8/virtlockd.8* +Index: libvirt-8.0.0/tools/libvirt-guests.service.in +=================================================================== +--- libvirt-8.0.0.orig/tools/libvirt-guests.service.in ++++ libvirt-8.0.0/tools/libvirt-guests.service.in +@@ -6,7 +6,7 @@ After=network.target + After=time-sync.target + After=libvirtd.service + After=virt-guest-shutdown.target +-Documentation=man:libvirtd(8) ++Documentation=man:libvirt-guests(8) + Documentation=https://libvirt.org + + [Service] diff --git a/23b51d7b-libxl-disable-death-event.patch b/23b51d7b-libxl-disable-death-event.patch deleted file mode 100644 index acab70f..0000000 --- a/23b51d7b-libxl-disable-death-event.patch +++ /dev/null @@ -1,105 +0,0 @@ -commit 23b51d7b8ec885e97a9277cf0a6c2833db4636e8 -Author: Jim Fehlig -Date: Fri Oct 29 14:16:33 2021 -0600 - - libxl: Disable death events after receiving a shutdown event - - The libxl driver will handle all domain destruction and cleanup - when receiving a domain shutdown event from libxl. Commit fa30ee04a2a - introduced the ignoreDeathEvent boolean in the DomainObjPrivate struct - to ignore subsequent death events from libxl. But libxl already provides - a mechanism to disable death events via libxl_evdisable_domain_death. - - This patch partially reverts commit fa30ee04a2a and instead uses - libxl_evdisable_domain_death to disable subsequent death events when - processing a shutdown event. - - Signed-off-by: Jim Fehlig - Reviewed-by: Daniel P. Berrangé - Reviewed-by: Ján Tomko - -Index: libvirt-7.10.0/src/libxl/libxl_domain.c -=================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_domain.c -+++ libvirt-7.10.0/src/libxl/libxl_domain.c -@@ -616,12 +616,6 @@ static void - libxlDomainHandleDeath(libxlDriverPrivate *driver, virDomainObj *vm) - { - virObjectEvent *dom_event = NULL; -- libxlDomainObjPrivate *priv = vm->privateData; -- -- if (priv->ignoreDeathEvent) { -- priv->ignoreDeathEvent = false; -- return; -- } - - if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0) - return; -@@ -671,7 +665,6 @@ libxlDomainEventHandler(void *data, libx - } - - if (event->type == LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN) { -- libxlDomainObjPrivate *priv = vm->privateData; - struct libxlShutdownThreadInfo *shutdown_info = NULL; - virThread thread; - g_autofree char *name = NULL; -@@ -688,12 +681,9 @@ libxlDomainEventHandler(void *data, libx - name = g_strdup_printf("ev-%d", event->domid); - /* - * Cleanup will be handled by the shutdown thread. -- * Ignore the forthcoming death event from libxl - */ -- priv->ignoreDeathEvent = true; - if (virThreadCreateFull(&thread, false, libxlDomainShutdownThread, - name, false, shutdown_info) < 0) { -- priv->ignoreDeathEvent = false; - /* - * Not much we can do on error here except log it. - */ -@@ -859,18 +849,17 @@ libxlDomainDestroyInternal(libxlDriverPr - libxlDomainObjPrivate *priv = vm->privateData; - int ret = -1; - -- /* Ignore next LIBXL_EVENT_TYPE_DOMAIN_DEATH as the caller will handle -- * domain death appropriately already (having more info, like the reason). -- */ -- priv->ignoreDeathEvent = true; -+ if (priv->deathW) { -+ libxl_evdisable_domain_death(cfg->ctx, priv->deathW); -+ priv->deathW = NULL; -+ } -+ - /* Unlock virDomainObj during destroy, which can take considerable - * time on large memory domains. - */ - virObjectUnlock(vm); - ret = libxl_domain_destroy(cfg->ctx, vm->def->id, NULL); - virObjectLock(vm); -- if (ret) -- priv->ignoreDeathEvent = false; - - return ret; - } -@@ -921,8 +910,6 @@ libxlDomainCleanup(libxlDriverPrivate *d - priv->deathW = NULL; - } - -- priv->ignoreDeathEvent = false; -- - if (!!g_atomic_int_dec_and_test(&driver->nactive) && driver->inhibitCallback) - driver->inhibitCallback(false, driver->inhibitOpaque); - -Index: libvirt-7.10.0/src/libxl/libxl_domain.h -=================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_domain.h -+++ libvirt-7.10.0/src/libxl/libxl_domain.h -@@ -54,9 +54,6 @@ struct _libxlDomainObjPrivate { - /* console */ - virChrdevs *devs; - libxl_evgen_domain_death *deathW; -- /* Flag to indicate the upcoming LIBXL_EVENT_TYPE_DOMAIN_DEATH is caused -- * by libvirt and should not be handled separately */ -- bool ignoreDeathEvent; - virThread *migrationDstReceiveThr; - unsigned short migrationPort; - char *lockState; diff --git a/3be5ba11-libvirt-guests-install.patch b/3be5ba11-libvirt-guests-install.patch new file mode 100644 index 0000000..bd24466 --- /dev/null +++ b/3be5ba11-libvirt-guests-install.patch @@ -0,0 +1,66 @@ +commit 3be5ba11a2c6fcb2dfdffa03ab4f847113f36b85 +Author: Jim Fehlig +Date: Mon Jan 10 11:42:58 2022 -0700 + + build: Only install libvirt-guests when building libvirtd + + libvirt-guests was already moved to the libvirt daemon package in commit + d800c50349. It only needs to be installed when building libvirtd. + + Signed-off-by: Jim Fehlig + Reviewed-by: Andrea Bolognani + +Index: libvirt-8.0.0/tools/meson.build +=================================================================== +--- libvirt-8.0.0.orig/tools/meson.build ++++ libvirt-8.0.0/tools/meson.build +@@ -297,29 +297,31 @@ if conf.has('WITH_SANLOCK') + ) + endif + +-configure_file( +- input: 'libvirt-guests.sh.in', +- output: '@BASENAME@', +- configuration: tools_conf, +- install: true, +- install_dir: libexecdir, +- install_mode: 'rwxrwxr-x', +-) +- +-if init_script == 'systemd' +- install_data( +- 'libvirt-guests.sysconf', +- install_dir: sysconfdir / 'sysconfig', +- rename: 'libvirt-guests', +- ) +- ++if conf.has('WITH_LIBVIRTD') + configure_file( +- input: 'libvirt-guests.service.in', ++ input: 'libvirt-guests.sh.in', + output: '@BASENAME@', + configuration: tools_conf, + install: true, +- install_dir: prefix / 'lib' / 'systemd' / 'system', ++ install_dir: libexecdir, ++ install_mode: 'rwxrwxr-x', + ) ++ ++ if init_script == 'systemd' ++ install_data( ++ 'libvirt-guests.sysconf', ++ install_dir: sysconfdir / 'sysconfig', ++ rename: 'libvirt-guests', ++ ) ++ ++ configure_file( ++ input: 'libvirt-guests.service.in', ++ output: '@BASENAME@', ++ configuration: tools_conf, ++ install: true, ++ install_dir: prefix / 'lib' / 'systemd' / 'system', ++ ) ++ endif + endif + + if bash_completion_dep.found() diff --git a/5c5df531-libxl-search-domid-in-thread.patch b/5c5df531-libxl-search-domid-in-thread.patch deleted file mode 100644 index a421d82..0000000 --- a/5c5df531-libxl-search-domid-in-thread.patch +++ /dev/null @@ -1,167 +0,0 @@ -commit 5c5df5310f72be4878a71ace47074c54e0d1a27d -Author: Jim Fehlig -Date: Wed Nov 24 11:48:51 2021 -0700 - - libxl: Search for virDomainObj in event handler threads - - libxl can deliver events and invoke callbacks on any application thread - calling into libxl. This can cause deadlock in the libvirt libxl driver - - Thread 19 (Thread 0x7f31411ec700 (LWP 14068) "libvirtd"): - #0 0x00007f318520cc7d in __lll_lock_wait () from /lib64/libpthread.so.0 - #1 0x00007f3185205ed5 in pthread_mutex_lock () from /lib64/libpthread.so.0 - #2 0x00007f3189488015 in virMutexLock (m=) at ../../src/util/virthread.c:79 - #3 0x00007f3189463f3b in virObjectLock (anyobj=) at ../../src/util/virobject.c:433 - #4 0x00007f31894f2f41 in virDomainObjListSearchID (payload=0x7f317400a6d0, name=, data=0x7f31411eaeac) at ../../src/conf/virdomainobjlist.c:105 - #5 0x00007f3189437ac5 in virHashSearch (ctable=0x7f3124025a30, iter=iter@entry=0x7f31894f2f30 , data=data@entry=0x7f31411eaeac, name=name@entry=0x0) at ../../src/util/virhash.c:745 - #6 0x00007f31894f3919 in virDomainObjListFindByID (doms=0x7f3124025430, id=) at ../../src/conf/virdomainobjlist.c:121 - #7 0x00007f3152f292e5 in libxlDomainEventHandler (data=0x7f3124023d80, event=0x7f310c010ae0) at ../../src/libxl/libxl_domain.c:660 - #8 0x00007f3152c6ff5d in egc_run_callbacks (egc=egc@entry=0x7f31411eaf50) at libxl_event.c:1427 - #9 0x00007f3152c718bd in libxl__egc_cleanup (egc=0x7f31411eaf50) at libxl_event.c:1458 - #10 libxl__ao_inprogress (ao=ao@entry=0x7f310c00b8a0, file=file@entry=0x7f3152cce987 "libxl_domain.c", line=line@entry=730, func=func@entry=0x7f3152ccf750 <__func__.22238> "libxl_domain_unpause") at libxl_event.c:2047 - #11 0x00007f3152c8c5b8 in libxl_domain_unpause (ctx=0x7f3124015a40, domid=, ao_how=ao_how@entry=0x0) at libxl_domain.c:730 - #12 0x00007f3152f2a584 in libxl_domain_unpause_0x041200 (domid=, ctx=) at /usr/include/libxl.h:1756 - #13 libxlDomainStart (driver=driver@entry=0x7f3124023d80, vm=vm@entry=0x7f317400a6d0, start_paused=start_paused@entry=false, restore_fd=restore_fd@entry=-1, restore_ver=, restore_ver@entry=2) at ../../src/libxl/libxl_domain.c:1482 - #14 0x00007f3152f2a6e3 in libxlDomainStartNew (driver=driver@entry=0x7f3124023d80, vm=vm@entry=0x7f317400a6d0, start_paused=start_paused@entry=false) at ../../src/libxl/libxl_domain.c:1545 - #15 0x00007f3152f2a789 in libxlDomainShutdownHandleRestart (driver=0x7f3124023d80, vm=0x7f317400a6d0) at ../../src/libxl/libxl_domain.c:464 - #16 0x00007f3152f2a9e4 in libxlDomainShutdownThread (opaque=) at ../../src/libxl/libxl_domain.c:559 - #17 0x00007f3189487ee2 in virThreadHelper (data=) at ../../src/util/virthread.c:196 - #18 0x00007f3185203539 in start_thread () from /lib64/libpthread.so.0 - #19 0x00007f3184f3becf in clone () from /lib64/libc.so.6 - - Frame 16 runs a thread created to handle domain shutdown processing for - domid 28712. In this case the event contained the reboot reason, so the - old domain is destroyed and a new one is created by libxlDomainStart new. - After starting the domain, it is unpaused by calling libxl_domain_unpause - in frame 12. While the thread is running within libxl, libxl takes the - opportunity to deliver a pending domain shutdown event for unrelated domid - 28710. While searching for the associated virDomainObj by ID, a deadlock is - encountered when attempting to lock the virDomainObj for domid 28712, which - is already locked since this thread is processing its shutdown event. - - The deadlock can be avoided by moving the search for a virDomainObj - associated with the event domid to the shutdown thread. The same is done - for the death thread. - - Signed-off-by: Jim Fehlig - Reviewed-by: Daniel P. Berrangé - Reviewed-by: Ján Tomko - -Index: libvirt-7.10.0/src/libxl/libxl_domain.c -=================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_domain.c -+++ libvirt-7.10.0/src/libxl/libxl_domain.c -@@ -480,7 +480,6 @@ libxlDomainShutdownHandleRestart(libxlDr - struct libxlEventHandlerThreadInfo - { - libxlDriverPrivate *driver; -- virDomainObj *vm; - libxl_event *event; - }; - -@@ -489,7 +488,7 @@ static void - libxlDomainShutdownThread(void *opaque) - { - struct libxlEventHandlerThreadInfo *shutdown_info = opaque; -- virDomainObj *vm = shutdown_info->vm; -+ virDomainObj *vm = NULL; - libxl_event *ev = shutdown_info->event; - libxlDriverPrivate *driver = shutdown_info->driver; - virObjectEvent *dom_event = NULL; -@@ -499,6 +498,12 @@ libxlDomainShutdownThread(void *opaque) - - libxl_domain_config_init(&d_config); - -+ vm = virDomainObjListFindByID(driver->domains, ev->domid); -+ if (!vm) { -+ /* Nothing to do if we can't find the virDomainObj */ -+ goto cleanup; -+ } -+ - if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0) - goto cleanup; - -@@ -616,12 +621,18 @@ static void - libxlDomainDeathThread(void *opaque) - { - struct libxlEventHandlerThreadInfo *death_info = opaque; -- virDomainObj *vm = death_info->vm; -+ virDomainObj *vm = NULL; - libxl_event *ev = death_info->event; - libxlDriverPrivate *driver = death_info->driver; - virObjectEvent *dom_event = NULL; - g_autoptr(libxlDriverConfig) cfg = libxlDriverConfigGet(driver); - -+ vm = virDomainObjListFindByID(driver->domains, ev->domid); -+ if (!vm) { -+ /* Nothing to do if we can't find the virDomainObj */ -+ goto cleanup; -+ } -+ - if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0) - goto cleanup; - -@@ -650,7 +661,6 @@ libxlDomainEventHandler(void *data, libx - { - libxlDriverPrivate *driver = data; - libxl_shutdown_reason xl_reason = event->u.domain_shutdown.shutdown_reason; -- virDomainObj *vm = NULL; - g_autoptr(libxlDriverConfig) cfg = NULL; - struct libxlEventHandlerThreadInfo *thread_info = NULL; - virThread thread; -@@ -671,12 +681,6 @@ libxlDomainEventHandler(void *data, libx - if (xl_reason == LIBXL_SHUTDOWN_REASON_SUSPEND) - goto cleanup; - -- vm = virDomainObjListFindByID(driver->domains, event->domid); -- if (!vm) { -- /* Nothing to do if we can't find the virDomainObj */ -- goto cleanup; -- } -- - /* - * Start event-specific threads to handle shutdown and death. - * They are potentially lengthy operations and we don't want to be -@@ -686,7 +690,6 @@ libxlDomainEventHandler(void *data, libx - thread_info = g_new0(struct libxlEventHandlerThreadInfo, 1); - - thread_info->driver = driver; -- thread_info->vm = vm; - thread_info->event = (libxl_event *)event; - thread_name = g_strdup_printf("shutdown-event-%d", event->domid); - /* -@@ -701,15 +704,14 @@ libxlDomainEventHandler(void *data, libx - goto cleanup; - } - /* -- * virDomainObjEndAPI is called in the shutdown thread, where -- * libxlEventHandlerThreadInfo and libxl_event are also freed. -+ * libxlEventHandlerThreadInfo and libxl_event are freed in the -+ * shutdown thread - */ - return; - } else if (event->type == LIBXL_EVENT_TYPE_DOMAIN_DEATH) { - thread_info = g_new0(struct libxlEventHandlerThreadInfo, 1); - - thread_info->driver = driver; -- thread_info->vm = vm; - thread_info->event = (libxl_event *)event; - thread_name = g_strdup_printf("death-event-%d", event->domid); - /* -@@ -724,14 +726,13 @@ libxlDomainEventHandler(void *data, libx - goto cleanup; - } - /* -- * virDomainObjEndAPI is called in the death thread, where -- * libxlEventHandlerThreadInfo and libxl_event are also freed. -+ * libxlEventHandlerThreadInfo and libxl_event are freed in the -+ * death thread - */ - return; - } - - cleanup: -- virDomainObjEndAPI(&vm); - VIR_FREE(thread_info); - cfg = libxlDriverConfigGet(driver); - /* Cast away any const */ diff --git a/8eb44616-remove-sysconfig-files.patch b/8eb44616-remove-sysconfig-files.patch new file mode 100644 index 0000000..a3fb851 --- /dev/null +++ b/8eb44616-remove-sysconfig-files.patch @@ -0,0 +1,1034 @@ +commit 8eb4461645c5738674232ee26c15f5555230b7ff +Author: Olaf Hering +Date: Wed Jan 12 11:45:08 2022 +0100 + + remove sysconfig files + + sysconfig files are owned by the admin of the host. They have the + liberty to put anything they want into these files. This makes it + difficult to provide different built-in defaults. + + Remove the sysconfig file and place the current desired default into + the service file. + + Local customizations can now go either into /etc/sysconfig/name + or /etc/systemd/system/name.service.d/my-knobs.conf + + Attempt to handle upgrades in libvirt.spec. + Dirty files which are marked as %config will be renamed to file.rpmsave. + To restore them automatically, move stale .rpmsave files away, and + catch any new rpmsave files in %posttrans. + + Signed-off-by: Olaf Hering + Reviewed-by: Andrea Bolognani + +Index: libvirt-8.0.0/docs/daemons.rst +=================================================================== +--- libvirt-8.0.0.orig/docs/daemons.rst ++++ libvirt-8.0.0/docs/daemons.rst +@@ -686,3 +686,24 @@ socket unit names into the service. When + ``unix_sock_dir`` setting in ``virtlockd.conf`` must be changed in + lock-step with the equivalent setting in the unit files to ensure that + ``virtlockd`` can identify the sockets. ++ ++Changing command line options for daemons ++========================================= ++ ++Two ways exist to override the defaults in the provided service files: ++either a systemd "drop-in" configuration file, or a ``/etc/sysconfig/$daemon`` ++file must be created. For example, to change the command line option ++for a debug session of ``libvirtd``, create a file ++``/etc/systemd/system/libvirtd.service.d/debug.conf`` with the following content: ++ ++ :: ++ ++ [Unit] ++ Description=Virtualization daemon, with override from debug.conf ++ ++ [Service] ++ Environment=G_DEBUG=fatal-warnings ++ Environment=LIBVIRTD_ARGS="--listen --verbose" ++ ++After changes to systemd "drop-in" configuration files it is required to run ++``systemctl daemon-reload``. +Index: libvirt-8.0.0/docs/remote.html.in +=================================================================== +--- libvirt-8.0.0.orig/docs/remote.html.in ++++ libvirt-8.0.0/docs/remote.html.in +@@ -138,9 +138,9 @@ Blank lines and comments beginning with + 1 (on) + + Listen for secure TLS connections on the public TCP/IP port. +- Note: it is also necessary to start the server in listening mode by +- running it with --listen or editing /etc/sysconfig/libvirtd by uncommenting the LIBVIRTD_ARGS="--listen" line +- to cause the server to come up in listening mode whenever it is started. ++ Note: it is also necessary to start the server in listening mode ++ by running it with --listen or adding a LIBVIRTD_ARGS="--listen" ++ line to /etc/sysconfig/libvirtd. + + + +Index: libvirt-8.0.0/libvirt.spec.in +=================================================================== +--- libvirt-8.0.0.orig/libvirt.spec.in ++++ libvirt-8.0.0/libvirt.spec.in +@@ -206,6 +206,24 @@ + + %define tls_priority "@LIBVIRT,SYSTEM" + ++# libvirt 8.1.0 stops distributing any sysconfig files. ++# If the user has customized their sysconfig file, ++# the RPM upgrade path will rename it to .rpmsave ++# because the file is no longer managed by RPM. ++# To prevent a regression we rename it back after the ++# transaction to preserve the user's modifications ++%define libvirt_sysconfig_pre() \ ++ for sc in %{?*} ; do \ ++ test -f "%{_sysconfdir}/sysconfig/${sc}.rpmsave" || continue ; \ ++ mv -v "%{_sysconfdir}/sysconfig/${sc}.rpmsave" "%{_sysconfdir}/sysconfig/${sc}.rpmsave.old" ; \ ++ done \ ++ %{nil} ++%define libvirt_sysconfig_posttrans() \ ++ for sc in %{?*} ; do \ ++ test -f "%{_sysconfdir}/sysconfig/${sc}.rpmsave" || continue ; \ ++ mv -v "%{_sysconfdir}/sysconfig/${sc}.rpmsave" "%{_sysconfdir}/sysconfig/${sc}" ; \ ++ done \ ++ %{nil} + + Summary: Library providing a simple virtualization API + Name: libvirt +@@ -1286,6 +1304,7 @@ fi \ + %define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket %1.socket + + %pre daemon ++%libvirt_sysconfig_pre libvirtd virtproxyd virtlogd virtlockd libvirt-guests + # 'libvirt' group is just to allow password-less polkit access to + # libvirtd. The uid number is irrelevant, so we use dynamic allocation + # described at the above link. +@@ -1334,6 +1353,7 @@ if [ $1 -ge 1 ] ; then + fi + + %posttrans daemon ++%libvirt_sysconfig_posttrans libvirtd virtproxyd virtlogd virtlockd libvirt-guests + if test %libvirt_daemon_needs_restart libvirtd + then + # See if user has previously modified their install to +@@ -1374,6 +1394,9 @@ fi + + %libvirt_daemon_finish_restart libvirtd + ++%pre daemon-driver-network ++%libvirt_sysconfig_pre virtnetworkd ++ + %post daemon-driver-network + %if %{with_firewalld_zone} + %firewalld_reload +@@ -1393,8 +1416,11 @@ fi + %endif + + %posttrans daemon-driver-network ++%libvirt_sysconfig_posttrans virtnetworkd + %libvirt_daemon_perform_restart virtnetworkd + ++%pre daemon-driver-nwfilter ++%libvirt_sysconfig_pre virtnwfilterd + + %post daemon-driver-nwfilter + %if %{with_modular_daemons} +@@ -1406,8 +1432,11 @@ fi + %libvirt_daemon_systemd_preun virtnwfilterd + + %posttrans daemon-driver-nwfilter ++%libvirt_sysconfig_posttrans virtnwfilterd + %libvirt_daemon_perform_restart virtnwfilterd + ++%pre daemon-driver-nodedev ++%libvirt_sysconfig_pre virtnodedevd + + %post daemon-driver-nodedev + %if %{with_modular_daemons} +@@ -1419,8 +1448,11 @@ fi + %libvirt_daemon_systemd_preun virtnodedevd + + %posttrans daemon-driver-nodedev ++%libvirt_sysconfig_posttrans virtnodedevd + %libvirt_daemon_perform_restart virtnodedevd + ++%pre daemon-driver-interface ++%libvirt_sysconfig_pre virtinterfaced + + %post daemon-driver-interface + %if %{with_modular_daemons} +@@ -1432,8 +1464,11 @@ fi + %libvirt_daemon_systemd_preun virtinterfaced + + %posttrans daemon-driver-interface ++%libvirt_sysconfig_posttrans virtinterfaced + %libvirt_daemon_perform_restart virtinterfaced + ++%pre daemon-driver-secret ++%libvirt_sysconfig_pre virtsecretd + + %post daemon-driver-secret + %if %{with_modular_daemons} +@@ -1445,9 +1480,13 @@ fi + %libvirt_daemon_systemd_preun virtsecretd + + %posttrans daemon-driver-secret ++%libvirt_sysconfig_posttrans virtsecretd + %libvirt_daemon_perform_restart virtsecretd + + ++%pre daemon-driver-storage ++%libvirt_sysconfig_pre virtstoraged ++ + %post daemon-driver-storage + %if %{with_modular_daemons} + %libvirt_daemon_systemd_post virtstoraged +@@ -1458,11 +1497,13 @@ fi + %libvirt_daemon_systemd_preun virtstoraged + + %posttrans daemon-driver-storage ++%libvirt_sysconfig_posttrans virtstoraged + %libvirt_daemon_perform_restart virtstoraged + + + %if %{with_qemu} + %pre daemon-driver-qemu ++%libvirt_sysconfig_pre virtqemud + # We want soft static allocation of well-known ids, as disk images + # are commonly shared across NFS mounts by id rather than name; see + # https://fedoraproject.org/wiki/Packaging:UsersAndGroups +@@ -1487,11 +1528,15 @@ exit 0 + %libvirt_daemon_systemd_preun virtqemud + + %posttrans daemon-driver-qemu ++%libvirt_sysconfig_posttrans virtqemud + %libvirt_daemon_perform_restart virtqemud + %endif + + + %if %{with_lxc} ++%pre daemon-driver-lxc ++%libvirt_sysconfig_pre virtlxcd ++ + %post daemon-driver-lxc + %if %{with_modular_daemons} + %libvirt_daemon_systemd_post virtlxcd +@@ -1502,6 +1547,7 @@ exit 0 + %libvirt_daemon_systemd_preun virtlxcd + + %posttrans daemon-driver-lxc ++%libvirt_sysconfig_posttrans virtlxcd + %libvirt_daemon_perform_restart virtlxcd + %endif + +@@ -1513,10 +1559,14 @@ exit 0 + %endif + %libvirt_daemon_schedule_restart virtvboxd + ++%pre daemon-driver-vbox ++%libvirt_sysconfig_pre virtvboxd ++ + %preun daemon-driver-vbox + %libvirt_daemon_systemd_preun virtvboxd + + %posttrans daemon-driver-vbox ++%libvirt_sysconfig_posttrans virtvboxd + %libvirt_daemon_perform_restart virtvboxd + %endif + +@@ -1528,10 +1578,14 @@ exit 0 + %endif + %libvirt_daemon_schedule_restart virtxend + ++%pre daemon-driver-libxl ++%libvirt_sysconfig_pre virtxend ++ + %preun daemon-driver-libxl + %libvirt_daemon_systemd_preun virtxend + + %posttrans daemon-driver-libxl ++%libvirt_sysconfig_posttrans virtxend + %libvirt_daemon_perform_restart virtxend + %endif + +@@ -1634,16 +1688,11 @@ exit 0 + %{_unitdir}/virtlockd.socket + %{_unitdir}/virtlockd-admin.socket + %{_unitdir}/libvirt-guests.service +-%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd +-%config(noreplace) %{_sysconfdir}/sysconfig/virtproxyd +-%config(noreplace) %{_sysconfdir}/sysconfig/virtlogd +-%config(noreplace) %{_sysconfdir}/sysconfig/virtlockd + %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf + %config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf + %config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf + %config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf + %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf +-%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests + %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf + + %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd +@@ -1717,7 +1766,6 @@ exit 0 + %ghost %{_sysconfdir}/libvirt/nwfilter/*.xml + + %files daemon-driver-interface +-%config(noreplace) %{_sysconfdir}/sysconfig/virtinterfaced + %config(noreplace) %{_sysconfdir}/libvirt/virtinterfaced.conf + %{_datadir}/augeas/lenses/virtinterfaced.aug + %{_datadir}/augeas/lenses/tests/test_virtinterfaced.aug +@@ -1730,7 +1778,6 @@ exit 0 + %{_mandir}/man8/virtinterfaced.8* + + %files daemon-driver-network +-%config(noreplace) %{_sysconfdir}/sysconfig/virtnetworkd + %config(noreplace) %{_sysconfdir}/libvirt/virtnetworkd.conf + %{_datadir}/augeas/lenses/virtnetworkd.aug + %{_datadir}/augeas/lenses/tests/test_virtnetworkd.aug +@@ -1754,7 +1801,6 @@ exit 0 + %endif + + %files daemon-driver-nodedev +-%config(noreplace) %{_sysconfdir}/sysconfig/virtnodedevd + %config(noreplace) %{_sysconfdir}/libvirt/virtnodedevd.conf + %{_datadir}/augeas/lenses/virtnodedevd.aug + %{_datadir}/augeas/lenses/tests/test_virtnodedevd.aug +@@ -1767,7 +1813,6 @@ exit 0 + %{_mandir}/man8/virtnodedevd.8* + + %files daemon-driver-nwfilter +-%config(noreplace) %{_sysconfdir}/sysconfig/virtnwfilterd + %config(noreplace) %{_sysconfdir}/libvirt/virtnwfilterd.conf + %{_datadir}/augeas/lenses/virtnwfilterd.aug + %{_datadir}/augeas/lenses/tests/test_virtnwfilterd.aug +@@ -1782,7 +1827,6 @@ exit 0 + %{_mandir}/man8/virtnwfilterd.8* + + %files daemon-driver-secret +-%config(noreplace) %{_sysconfdir}/sysconfig/virtsecretd + %config(noreplace) %{_sysconfdir}/libvirt/virtsecretd.conf + %{_datadir}/augeas/lenses/virtsecretd.aug + %{_datadir}/augeas/lenses/tests/test_virtsecretd.aug +@@ -1797,7 +1841,6 @@ exit 0 + %files daemon-driver-storage + + %files daemon-driver-storage-core +-%config(noreplace) %{_sysconfdir}/sysconfig/virtstoraged + %config(noreplace) %{_sysconfdir}/libvirt/virtstoraged.conf + %{_datadir}/augeas/lenses/virtstoraged.aug + %{_datadir}/augeas/lenses/tests/test_virtstoraged.aug +@@ -1855,7 +1898,6 @@ exit 0 + + %if %{with_qemu} + %files daemon-driver-qemu +-%config(noreplace) %{_sysconfdir}/sysconfig/virtqemud + %config(noreplace) %{_sysconfdir}/libvirt/virtqemud.conf + %config(noreplace) %{_prefix}/lib/sysctl.d/60-qemu-postcopy-migration.conf + %{_datadir}/augeas/lenses/virtqemud.aug +@@ -1885,7 +1927,6 @@ exit 0 + + %if %{with_lxc} + %files daemon-driver-lxc +-%config(noreplace) %{_sysconfdir}/sysconfig/virtlxcd + %config(noreplace) %{_sysconfdir}/libvirt/virtlxcd.conf + %{_datadir}/augeas/lenses/virtlxcd.aug + %{_datadir}/augeas/lenses/tests/test_virtlxcd.aug +@@ -1908,7 +1949,6 @@ exit 0 + + %if %{with_libxl} + %files daemon-driver-libxl +-%config(noreplace) %{_sysconfdir}/sysconfig/virtxend + %config(noreplace) %{_sysconfdir}/libvirt/virtxend.conf + %{_datadir}/augeas/lenses/virtxend.aug + %{_datadir}/augeas/lenses/tests/test_virtxend.aug +@@ -1931,7 +1971,6 @@ exit 0 + + %if %{with_vbox} + %files daemon-driver-vbox +-%config(noreplace) %{_sysconfdir}/sysconfig/virtvboxd + %config(noreplace) %{_sysconfdir}/libvirt/virtvboxd.conf + %{_datadir}/augeas/lenses/virtvboxd.aug + %{_datadir}/augeas/lenses/tests/test_virtvboxd.aug +Index: libvirt-8.0.0/src/ch/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/ch/meson.build ++++ libvirt-8.0.0/src/ch/meson.build +@@ -63,11 +63,6 @@ if conf.has('WITH_CH') + 'sockets': [ 'main', 'ro', 'admin' ], + } + +- sysconf_files += { +- 'name': 'virtchd', +- 'file': files('virtchd.sysconf'), +- } +- + virt_install_dirs += [ + localstatedir / 'lib' / 'libvirt' / 'ch', + runstatedir / 'libvirt' / 'ch', +Index: libvirt-8.0.0/src/ch/virtchd.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/ch/virtchd.service.in ++++ libvirt-8.0.0/src/ch/virtchd.service.in +@@ -18,6 +18,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=VIRTCHD_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtchd + ExecStart=@sbindir@/virtchd $VIRTCHD_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/ch/virtchd.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/ch/virtchd.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtchd.service systemd unit +- +-VIRTCHD_ARGS="--timeout 120" +Index: libvirt-8.0.0/src/interface/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/interface/meson.build ++++ libvirt-8.0.0/src/interface/meson.build +@@ -54,9 +54,4 @@ if conf.has('WITH_INTERFACE') + 'name': 'virtinterfaced', + 'in_file': files('virtinterfaced.init.in') + } +- +- sysconf_files += { +- 'name': 'virtinterfaced', +- 'file': files('virtinterfaced.sysconf'), +- } + endif +Index: libvirt-8.0.0/src/interface/virtinterfaced.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/interface/virtinterfaced.service.in ++++ libvirt-8.0.0/src/interface/virtinterfaced.service.in +@@ -13,6 +13,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=VIRTINTERFACED_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced + ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/interface/virtinterfaced.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/interface/virtinterfaced.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtinterfaced.service systemd unit +- +-VIRTINTERFACED_ARGS="--timeout 120" +Index: libvirt-8.0.0/src/libxl/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/libxl/meson.build ++++ libvirt-8.0.0/src/libxl/meson.build +@@ -78,11 +78,6 @@ if conf.has('WITH_LIBXL') + 'in_file': files('virtxend.init.in'), + } + +- sysconf_files += { +- 'name': 'virtxend', +- 'file': files('virtxend.sysconf'), +- } +- + virt_install_dirs += [ + localstatedir / 'lib' / 'libvirt' / 'libxl', + runstatedir / 'libvirt' / 'libxl', +Index: libvirt-8.0.0/src/libxl/virtxend.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/libxl/virtxend.service.in ++++ libvirt-8.0.0/src/libxl/virtxend.service.in +@@ -18,6 +18,7 @@ ConditionPathExists=/proc/xen/capabiliti + + [Service] + Type=notify ++Environment=VIRTXEND_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtxend + ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/libxl/virtxend.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/libxl/virtxend.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtxend.service systemd unit +- +-VIRTXEND_ARGS="--timeout 120" +Index: libvirt-8.0.0/src/locking/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/locking/meson.build ++++ libvirt-8.0.0/src/locking/meson.build +@@ -156,11 +156,6 @@ if conf.has('WITH_LIBVIRTD') + 'in_file': files('virtlockd.init.in'), + } + +- sysconf_files += { +- 'name': 'virtlockd', +- 'file': files('virtlockd.sysconf'), +- } +- + if conf.has('WITH_SANLOCK') + virt_helpers += { + 'name': 'libvirt_sanlock_helper', +Index: libvirt-8.0.0/src/locking/virtlockd.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/locking/virtlockd.service.in ++++ libvirt-8.0.0/src/locking/virtlockd.service.in +@@ -7,6 +7,7 @@ Documentation=man:virtlockd(8) + Documentation=https://libvirt.org + + [Service] ++Environment=VIRTLOCKD_ARGS= + EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd + ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS + ExecReload=/bin/kill -USR1 $MAINPID +Index: libvirt-8.0.0/src/locking/virtlockd.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/locking/virtlockd.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtlockd.service systemd unit +- +-VIRTLOCKD_ARGS="" +Index: libvirt-8.0.0/src/logging/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/logging/meson.build ++++ libvirt-8.0.0/src/logging/meson.build +@@ -101,11 +101,6 @@ if conf.has('WITH_LIBVIRTD') + 'name': 'virtlogd', + 'in_file': files('virtlogd.init.in'), + } +- +- sysconf_files += { +- 'name': 'virtlogd', +- 'file': files('virtlogd.sysconf'), +- } + endif + + log_inc_dir = include_directories('.') +Index: libvirt-8.0.0/src/logging/virtlogd.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/logging/virtlogd.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtlogd.service systemd unit +- +-VIRTLOGD_ARGS="" +Index: libvirt-8.0.0/src/lxc/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/lxc/meson.build ++++ libvirt-8.0.0/src/lxc/meson.build +@@ -175,11 +175,6 @@ if conf.has('WITH_LXC') + 'in_file': files('virtlxcd.init.in'), + } + +- sysconf_files += { +- 'name': 'virtlxcd', +- 'file': files('virtlxcd.sysconf'), +- } +- + virt_install_dirs += [ + localstatedir / 'lib' / 'libvirt' / 'lxc', + runstatedir / 'libvirt' / 'lxc', +Index: libvirt-8.0.0/src/lxc/virtlxcd.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/lxc/virtlxcd.service.in ++++ libvirt-8.0.0/src/lxc/virtlxcd.service.in +@@ -18,6 +18,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=VIRTLXCD_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd + ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/lxc/virtlxcd.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/lxc/virtlxcd.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtlxcd.service systemd unit +- +-VIRTLXCD_ARGS="--timeout 120" +Index: libvirt-8.0.0/src/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/meson.build ++++ libvirt-8.0.0/src/meson.build +@@ -208,12 +208,6 @@ virt_daemon_units = [] + # * in_file - source init file (required) + openrc_init_files = [] + +-# sysconf_files +-# install libvirt daemon sysconf files +-# * name - daemon name (required) +-# * file - source sysconf file (required) +-sysconf_files = [] +- + # virt_install_dirs: + # list of directories to create during installation + virt_install_dirs = [] +@@ -868,16 +862,6 @@ if conf.has('WITH_LIBVIRTD') + endif + endif + +-if init_script != 'none' +- foreach sysconf : sysconf_files +- install_data( +- sysconf['file'], +- install_dir: sysconfdir / 'sysconfig', +- rename: [ sysconf['name'] ], +- ) +- endforeach +-endif +- + if conf.has('WITH_DTRACE_PROBES') + custom_target( + 'libvirt_functions.stp', +Index: libvirt-8.0.0/src/network/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/network/meson.build ++++ libvirt-8.0.0/src/network/meson.build +@@ -72,11 +72,6 @@ if conf.has('WITH_NETWORK') + 'in_file': files('virtnetworkd.init.in'), + } + +- sysconf_files += { +- 'name': 'virtnetworkd', +- 'file': files('virtnetworkd.sysconf'), +- } +- + virt_install_dirs += [ + localstatedir / 'lib' / 'libvirt' / 'network', + localstatedir / 'lib' / 'libvirt' / 'dnsmasq', +Index: libvirt-8.0.0/src/network/virtnetworkd.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/network/virtnetworkd.service.in ++++ libvirt-8.0.0/src/network/virtnetworkd.service.in +@@ -16,6 +16,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=VIRTNETWORKD_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd + ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/network/virtnetworkd.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/network/virtnetworkd.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtnetworkd.service systemd unit +- +-VIRTNETWORKD_ARGS="--timeout 120" +Index: libvirt-8.0.0/src/node_device/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/node_device/meson.build ++++ libvirt-8.0.0/src/node_device/meson.build +@@ -62,9 +62,4 @@ if conf.has('WITH_NODE_DEVICES') + 'name': 'virtnodedevd', + 'in_file': files('virtnodedevd.init.in'), + } +- +- sysconf_files += { +- 'name': 'virtnodedevd', +- 'file': files('virtnodedevd.sysconf'), +- } + endif +Index: libvirt-8.0.0/src/node_device/virtnodedevd.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/node_device/virtnodedevd.service.in ++++ libvirt-8.0.0/src/node_device/virtnodedevd.service.in +@@ -13,6 +13,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=VIRTNODEDEVD_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd + ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/node_device/virtnodedevd.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/node_device/virtnodedevd.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtnodedevd.service systemd unit +- +-VIRTNODEDEVD_ARGS="--timeout 120" +Index: libvirt-8.0.0/src/nwfilter/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/nwfilter/meson.build ++++ libvirt-8.0.0/src/nwfilter/meson.build +@@ -61,10 +61,5 @@ if conf.has('WITH_NWFILTER') + 'in_file': files('virtnwfilterd.init.in'), + } + +- sysconf_files += { +- 'name': 'virtnwfilterd', +- 'file': files('virtnwfilterd.sysconf'), +- } +- + subdir('xml') + endif +Index: libvirt-8.0.0/src/nwfilter/virtnwfilterd.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/nwfilter/virtnwfilterd.service.in ++++ libvirt-8.0.0/src/nwfilter/virtnwfilterd.service.in +@@ -13,6 +13,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=VIRTNWFILTERD_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd + ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/nwfilter/virtnwfilterd.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/nwfilter/virtnwfilterd.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtnwfilterd.service systemd unit +- +-VIRTNWFILTERD_ARGS="--timeout 120" +Index: libvirt-8.0.0/src/qemu/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/qemu/meson.build ++++ libvirt-8.0.0/src/qemu/meson.build +@@ -165,11 +165,6 @@ if conf.has('WITH_QEMU') + 'in_file': files('virtqemud.init.in'), + } + +- sysconf_files += { +- 'name': 'virtqemud', +- 'file': files('virtqemud.sysconf'), +- } +- + if conf.has('WITH_SYSCTL') + install_data( + 'postcopy-migration.sysctl', +Index: libvirt-8.0.0/src/qemu/virtqemud.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/qemu/virtqemud.service.in ++++ libvirt-8.0.0/src/qemu/virtqemud.service.in +@@ -20,6 +20,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=VIRTQEMUD_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud + ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/qemu/virtqemud.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/qemu/virtqemud.sysconf ++++ /dev/null +@@ -1,12 +0,0 @@ +-# Customizations for the virtqemud.service systemd unit +- +-VIRTQEMUD_ARGS="--timeout 120" +- +-# Override the QEMU/SDL default audio driver probing when +-# starting virtual machines using SDL graphics +-# +-# NB these have no effect for VMs using VNC, unless vnc_allow_host_audio +-# is enabled in /etc/libvirt/qemu.conf +-#QEMU_AUDIO_DRV=sdl +-# +-#SDL_AUDIODRIVER=pulse +Index: libvirt-8.0.0/src/remote/libvirtd.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/remote/libvirtd.service.in ++++ libvirt-8.0.0/src/remote/libvirtd.service.in +@@ -28,6 +28,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=LIBVIRTD_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd + ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/remote/libvirtd.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/remote/libvirtd.sysconf ++++ /dev/null +@@ -1,21 +0,0 @@ +-# Customizations for the libvirtd.service systemd unit +- +-# Default behaviour is for libvirtd.service to start on boot +-# so that VM autostart can be performed. We then want it to +-# shutdown again if nothing was started and rely on systemd +-# socket activation to start it again when some client app +-# connects. +-LIBVIRTD_ARGS="--timeout 120" +- +-# If systemd socket activation is disabled, then the following +-# can be used to listen on TCP/TLS sockets +-#LIBVIRTD_ARGS="--listen" +- +-# Override the QEMU/SDL default audio driver probing when +-# starting virtual machines using SDL graphics +-# +-# NB these have no effect for VMs using VNC, unless vnc_allow_host_audio +-# is enabled in /etc/libvirt/qemu.conf +-#QEMU_AUDIO_DRV=sdl +-# +-#SDL_AUDIODRIVER=pulse +Index: libvirt-8.0.0/src/remote/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/remote/meson.build ++++ libvirt-8.0.0/src/remote/meson.build +@@ -204,11 +204,6 @@ if conf.has('WITH_REMOTE') + 'confd': files('libvirtd.confd'), + } + +- sysconf_files += { +- 'name': 'libvirtd', +- 'file': files('libvirtd.sysconf'), +- } +- + virt_daemons += { + 'name': 'virtproxyd', + 'c_args': [ +@@ -239,11 +234,6 @@ if conf.has('WITH_REMOTE') + 'confd': files('virtproxyd.confd'), + } + +- sysconf_files += { +- 'name': 'virtproxyd', +- 'file': files('virtproxyd.sysconf'), +- } +- + virt_install_dirs += [ + localstatedir / 'log' / 'libvirt', + ] +Index: libvirt-8.0.0/src/remote/virtproxyd.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/remote/virtproxyd.service.in ++++ libvirt-8.0.0/src/remote/virtproxyd.service.in +@@ -13,6 +13,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=VIRTPROXYD_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd + ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/remote/virtproxyd.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/remote/virtproxyd.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtproxyd.service systemd unit +- +-VIRTPROXYD_ARGS="--timeout 120" +Index: libvirt-8.0.0/src/secret/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/secret/meson.build ++++ libvirt-8.0.0/src/secret/meson.build +@@ -43,9 +43,4 @@ if conf.has('WITH_SECRETS') + 'name': 'virtsecretd', + 'in_file': files('virtsecretd.init.in'), + } +- +- sysconf_files += { +- 'name': 'virtsecretd', +- 'file': files('virtsecretd.sysconf'), +- } + endif +Index: libvirt-8.0.0/src/secret/virtsecretd.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/secret/virtsecretd.service.in ++++ libvirt-8.0.0/src/secret/virtsecretd.service.in +@@ -13,6 +13,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=VIRTSECRETD_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd + ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/secret/virtsecretd.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/secret/virtsecretd.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtsecretd.service systemd unit +- +-VIRTSECRETD_ARGS="--timeout 120" +Index: libvirt-8.0.0/src/storage/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/storage/meson.build ++++ libvirt-8.0.0/src/storage/meson.build +@@ -125,11 +125,6 @@ if conf.has('WITH_STORAGE') + 'name': 'virtstoraged', + 'in_file': files('virtstoraged.init.in'), + } +- +- sysconf_files += { +- 'name': 'virtstoraged', +- 'file': files('virtstoraged.sysconf'), +- } + endif + + if conf.has('WITH_STORAGE_DISK') +Index: libvirt-8.0.0/src/storage/virtstoraged.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/storage/virtstoraged.service.in ++++ libvirt-8.0.0/src/storage/virtstoraged.service.in +@@ -15,6 +15,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=VIRTSTORAGED_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged + ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/storage/virtstoraged.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/storage/virtstoraged.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtstoraged.service systemd unit +- +-VIRTSTORAGED_ARGS="--timeout 120" +Index: libvirt-8.0.0/src/vbox/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/vbox/meson.build ++++ libvirt-8.0.0/src/vbox/meson.build +@@ -68,9 +68,4 @@ if conf.has('WITH_VBOX') + 'name': 'virtvboxd', + 'in_file': files('virtvboxd.init.in'), + } +- +- sysconf_files += { +- 'name': 'virtvboxd', +- 'file': files('virtvboxd.sysconf'), +- } + endif +Index: libvirt-8.0.0/src/vbox/virtvboxd.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/vbox/virtvboxd.service.in ++++ libvirt-8.0.0/src/vbox/virtvboxd.service.in +@@ -14,6 +14,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=VIRTVBOXD_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd + ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/vbox/virtvboxd.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/vbox/virtvboxd.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtvboxd.service systemd unit +- +-VIRTVBOXD_ARGS="--timeout 120" +Index: libvirt-8.0.0/src/vz/meson.build +=================================================================== +--- libvirt-8.0.0.orig/src/vz/meson.build ++++ libvirt-8.0.0/src/vz/meson.build +@@ -58,9 +58,4 @@ if conf.has('WITH_VZ') + 'name': 'virtvzd', + 'in_file': files('virtvzd.init.in'), + } +- +- sysconf_files += { +- 'name': 'virtvzd', +- 'file': files('virtvzd.sysconf'), +- } + endif +Index: libvirt-8.0.0/src/vz/virtvzd.service.in +=================================================================== +--- libvirt-8.0.0.orig/src/vz/virtvzd.service.in ++++ libvirt-8.0.0/src/vz/virtvzd.service.in +@@ -14,6 +14,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify ++Environment=VIRTVZD_ARGS="--timeout 120" + EnvironmentFile=-@sysconfdir@/sysconfig/virtvzd + ExecStart=@sbindir@/virtvzd $VIRTVZD_ARGS + ExecReload=/bin/kill -HUP $MAINPID +Index: libvirt-8.0.0/src/vz/virtvzd.sysconf +=================================================================== +--- libvirt-8.0.0.orig/src/vz/virtvzd.sysconf ++++ /dev/null +@@ -1,3 +0,0 @@ +-# Customizations for the virtvzd.service systemd unit +- +-VIRTVZD_ARGS="--timeout 120" +Index: libvirt-8.0.0/tools/libvirt-guests.sysconf +=================================================================== +--- libvirt-8.0.0.orig/tools/libvirt-guests.sysconf ++++ /dev/null +@@ -1,50 +0,0 @@ +-# Customizations for the libvirt-guests.service systemd unit +- +-# URIs to check for running guests +-# example: URIS='default xen:///system vbox+tcp://host/system lxc:///system' +-#URIS=default +- +-# action taken on host boot +-# - start all guests which were running on shutdown are started on boot +-# regardless on their autostart settings +-# - ignore libvirt-guests init script won't start any guest on boot, however, +-# guests marked as autostart will still be automatically started by +-# libvirtd +-#ON_BOOT=start +- +-# Number of seconds to wait between each guest start. Set to 0 to allow +-# parallel startup. +-#START_DELAY=0 +- +-# action taken on host shutdown +-# - suspend all running guests are suspended using virsh managedsave +-# - shutdown all running guests are asked to shutdown. Please be careful with +-# this settings since there is no way to distinguish between a +-# guest which is stuck or ignores shutdown requests and a guest +-# which just needs a long time to shutdown. When setting +-# ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a +-# value suitable for your guests. +-#ON_SHUTDOWN=suspend +- +-# Number of guests will be shutdown concurrently, taking effect when +-# "ON_SHUTDOWN" is set to "shutdown". If Set to 0, guests will be shutdown one +-# after another. Number of guests on shutdown at any time will not exceed number +-# set in this variable. +-#PARALLEL_SHUTDOWN=0 +- +-# Number of seconds we're willing to wait for a guest to shut down. If parallel +-# shutdown is enabled, this timeout applies as a timeout for shutting down all +-# guests on a single URI defined in the variable URIS. If this is 0, then there +-# is no time out (use with caution, as guests might not respond to a shutdown +-# request). The default value is 300 seconds (5 minutes). +-#SHUTDOWN_TIMEOUT=300 +- +-# If non-zero, try to bypass the file system cache when saving and +-# restoring guests, even though this may give slower operation for +-# some file systems. +-#BYPASS_CACHE=0 +- +-# If non-zero, try to sync guest time on domain resume. Be aware, that +-# this requires guest agent with support for time synchronization +-# running in the guest. By default, this functionality is turned off. +-#SYNC_TIME=1 +Index: libvirt-8.0.0/tools/meson.build +=================================================================== +--- libvirt-8.0.0.orig/tools/meson.build ++++ libvirt-8.0.0/tools/meson.build +@@ -308,12 +308,6 @@ if conf.has('WITH_LIBVIRTD') + ) + + if init_script == 'systemd' +- install_data( +- 'libvirt-guests.sysconf', +- install_dir: sysconfdir / 'sysconfig', +- rename: 'libvirt-guests', +- ) +- + configure_file( + input: 'libvirt-guests.service.in', + output: '@BASENAME@', diff --git a/a4e6fba0-libxl-rename-threadinfo-struct.patch b/a4e6fba0-libxl-rename-threadinfo-struct.patch deleted file mode 100644 index a3b43f6..0000000 --- a/a4e6fba0-libxl-rename-threadinfo-struct.patch +++ /dev/null @@ -1,63 +0,0 @@ -commit a4e6fba069c0809b8b5dde5e9db62d2efd91b4a0 -Author: Jim Fehlig -Date: Wed Nov 24 11:10:19 2021 -0700 - - libxl: Rename libxlShutdownThreadInfo struct - - An upcoming change will use the struct in a thread created to process - death events. Rename libxlShutdownThreadInfo to libxlEventHandlerThreadInfo - to reflect the more generic usage. - - Signed-off-by: Jim Fehlig - Reviewed-by: Daniel P. Berrangé - Reviewed-by: Ján Tomko - -Index: libvirt-7.10.0/src/libxl/libxl_domain.c -=================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_domain.c -+++ libvirt-7.10.0/src/libxl/libxl_domain.c -@@ -477,7 +477,7 @@ libxlDomainShutdownHandleRestart(libxlDr - } - - --struct libxlShutdownThreadInfo -+struct libxlEventHandlerThreadInfo - { - libxlDriverPrivate *driver; - virDomainObj *vm; -@@ -488,7 +488,7 @@ struct libxlShutdownThreadInfo - static void - libxlDomainShutdownThread(void *opaque) - { -- struct libxlShutdownThreadInfo *shutdown_info = opaque; -+ struct libxlEventHandlerThreadInfo *shutdown_info = opaque; - virDomainObj *vm = shutdown_info->vm; - libxl_event *ev = shutdown_info->event; - libxlDriverPrivate *driver = shutdown_info->driver; -@@ -665,7 +665,7 @@ libxlDomainEventHandler(void *data, libx - } - - if (event->type == LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN) { -- struct libxlShutdownThreadInfo *shutdown_info = NULL; -+ struct libxlEventHandlerThreadInfo *shutdown_info = NULL; - virThread thread; - g_autofree char *name = NULL; - -@@ -673,7 +673,7 @@ libxlDomainEventHandler(void *data, libx - * Start a thread to handle shutdown. We don't want to be tying up - * libxl's event machinery by doing a potentially lengthy shutdown. - */ -- shutdown_info = g_new0(struct libxlShutdownThreadInfo, 1); -+ shutdown_info = g_new0(struct libxlEventHandlerThreadInfo, 1); - - shutdown_info->driver = driver; - shutdown_info->vm = vm; -@@ -693,7 +693,7 @@ libxlDomainEventHandler(void *data, libx - } - /* - * virDomainObjEndAPI is called in the shutdown thread, where -- * libxlShutdownThreadInfo and libxl_event are also freed. -+ * libxlEventHandlerThreadInfo and libxl_event are also freed. - */ - return; - } else if (event->type == LIBXL_EVENT_TYPE_DOMAIN_DEATH) { diff --git a/a7a03324-libxl-protect-logger-access.patch b/a7a03324-libxl-protect-logger-access.patch deleted file mode 100644 index 2ee943f..0000000 --- a/a7a03324-libxl-protect-logger-access.patch +++ /dev/null @@ -1,84 +0,0 @@ -commit a7a03324d86e111f81687b5315b8f296dde84340 -Author: Jim Fehlig -Date: Thu Nov 18 12:03:20 2021 -0700 - - libxl: Protect access to libxlLogger files hash table - - The hash table of log file objects in libxlLogger is not protected against - concurrent access. It is possible for one thread to remove an entry while - another is updating it. Add a mutex to the libxlLogger object and lock it - when accessing the files hash table. - - Signed-off-by: Jim Fehlig - Reviewed-by: Daniel P. Berrangé - Reviewed-by: Ján Tomko - -Index: libvirt-7.10.0/src/libxl/libxl_logger.c -=================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_logger.c -+++ libvirt-7.10.0/src/libxl/libxl_logger.c -@@ -28,6 +28,7 @@ - #include "util/virfile.h" - #include "util/virhash.h" - #include "util/virstring.h" -+#include "util/virthread.h" - #include "util/virtime.h" - - #define VIR_FROM_THIS VIR_FROM_LIBXL -@@ -43,6 +44,7 @@ struct xentoollog_logger_libvirt { - - /* map storing the opened fds: "domid" -> FILE* */ - GHashTable *files; -+ virMutex tableLock; - FILE *defaultLogFile; - }; - -@@ -85,7 +87,9 @@ libvirt_vmessage(xentoollog_logger *logg - start = start + 9; - *end = '\0'; - -+ virMutexLock(&lg->tableLock); - domainLogFile = virHashLookup(lg->files, start); -+ virMutexUnlock(&lg->tableLock); - if (domainLogFile) - logFile = domainLogFile; - -@@ -158,6 +162,12 @@ libxlLoggerNew(const char *logDir, virLo - return NULL; - } - -+ if (virMutexInit(&logger.tableLock) < 0) { -+ VIR_FORCE_FCLOSE(logger.defaultLogFile); -+ virHashFree(logger.files); -+ return NULL; -+ } -+ - return XTL_NEW_LOGGER(libvirt, logger); - } - -@@ -168,6 +178,7 @@ libxlLoggerFree(libxlLogger *logger) - if (logger->defaultLogFile) - VIR_FORCE_FCLOSE(logger->defaultLogFile); - virHashFree(logger->files); -+ virMutexDestroy(&logger->tableLock); - xtl_logger_destroy(xtl_logger); - } - -@@ -189,7 +200,9 @@ libxlLoggerOpenFile(libxlLogger *logger, - path, g_strerror(errno)); - return; - } -+ virMutexLock(&logger->tableLock); - ignore_value(virHashAddEntry(logger->files, domidstr, logFile)); -+ virMutexUnlock(&logger->tableLock); - - /* domain_config is non NULL only when starting a new domain */ - if (domain_config) { -@@ -204,5 +217,7 @@ libxlLoggerCloseFile(libxlLogger *logger - g_autofree char *domidstr = NULL; - domidstr = g_strdup_printf("%d", id); - -+ virMutexLock(&logger->tableLock); - ignore_value(virHashRemoveEntry(logger->files, domidstr)); -+ virMutexUnlock(&logger->tableLock); - } diff --git a/b9a5faea-libxl-handle-death-thread.patch b/b9a5faea-libxl-handle-death-thread.patch deleted file mode 100644 index 90315f1..0000000 --- a/b9a5faea-libxl-handle-death-thread.patch +++ /dev/null @@ -1,140 +0,0 @@ -commit b9a5faea49b7412e26d7389af4c32fc2b3ee80e5 -Author: Jim Fehlig -Date: Wed Nov 24 11:36:55 2021 -0700 - - libxl: Handle domain death events in a thread - - Similar to domain shutdown events, processing domain death events can be a - lengthy process and we don't want to block the event handler while the - operation completes. Move the death handling function to a thread. - - Signed-off-by: Jim Fehlig - Reviewed-by: Daniel P. Berrangé - Reviewed-by: Ján Tomko - -Index: libvirt-7.10.0/src/libxl/libxl_domain.c -=================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_domain.c -+++ libvirt-7.10.0/src/libxl/libxl_domain.c -@@ -613,12 +613,17 @@ libxlDomainShutdownThread(void *opaque) - } - - static void --libxlDomainHandleDeath(libxlDriverPrivate *driver, virDomainObj *vm) -+libxlDomainDeathThread(void *opaque) - { -+ struct libxlEventHandlerThreadInfo *death_info = opaque; -+ virDomainObj *vm = death_info->vm; -+ libxl_event *ev = death_info->event; -+ libxlDriverPrivate *driver = death_info->driver; - virObjectEvent *dom_event = NULL; -+ g_autoptr(libxlDriverConfig) cfg = libxlDriverConfigGet(driver); - - if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0) -- return; -+ goto cleanup; - - virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, VIR_DOMAIN_SHUTOFF_DESTROYED); - dom_event = virDomainEventLifecycleNewFromObj(vm, -@@ -629,6 +634,11 @@ libxlDomainHandleDeath(libxlDriverPrivat - virDomainObjListRemove(driver->domains, vm); - libxlDomainObjEndJob(driver, vm); - virObjectEventStateQueue(driver->domainEventState, dom_event); -+ -+ cleanup: -+ virDomainObjEndAPI(&vm); -+ libxl_event_free(cfg->ctx, ev); -+ VIR_FREE(death_info); - } - - -@@ -642,6 +652,9 @@ libxlDomainEventHandler(void *data, libx - libxl_shutdown_reason xl_reason = event->u.domain_shutdown.shutdown_reason; - virDomainObj *vm = NULL; - g_autoptr(libxlDriverConfig) cfg = NULL; -+ struct libxlEventHandlerThreadInfo *thread_info = NULL; -+ virThread thread; -+ g_autofree char *thread_name = NULL; - - VIR_DEBUG("Received libxl event '%d' for domid '%d'", event->type, event->domid); - -@@ -664,31 +677,27 @@ libxlDomainEventHandler(void *data, libx - goto cleanup; - } - -+ /* -+ * Start event-specific threads to handle shutdown and death. -+ * They are potentially lengthy operations and we don't want to be -+ * blocking this event handler while they are in progress. -+ */ - if (event->type == LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN) { -- struct libxlEventHandlerThreadInfo *shutdown_info = NULL; -- virThread thread; -- g_autofree char *name = NULL; -- -- /* -- * Start a thread to handle shutdown. We don't want to be tying up -- * libxl's event machinery by doing a potentially lengthy shutdown. -- */ -- shutdown_info = g_new0(struct libxlEventHandlerThreadInfo, 1); -+ thread_info = g_new0(struct libxlEventHandlerThreadInfo, 1); - -- shutdown_info->driver = driver; -- shutdown_info->vm = vm; -- shutdown_info->event = (libxl_event *)event; -- name = g_strdup_printf("shutdown-event-%d", event->domid); -+ thread_info->driver = driver; -+ thread_info->vm = vm; -+ thread_info->event = (libxl_event *)event; -+ thread_name = g_strdup_printf("shutdown-event-%d", event->domid); - /* - * Cleanup will be handled by the shutdown thread. - */ - if (virThreadCreateFull(&thread, false, libxlDomainShutdownThread, -- name, false, shutdown_info) < 0) { -+ thread_name, false, thread_info) < 0) { - /* - * Not much we can do on error here except log it. - */ - VIR_ERROR(_("Failed to create thread to handle domain shutdown")); -- VIR_FREE(shutdown_info); - goto cleanup; - } - /* -@@ -697,15 +706,33 @@ libxlDomainEventHandler(void *data, libx - */ - return; - } else if (event->type == LIBXL_EVENT_TYPE_DOMAIN_DEATH) { -+ thread_info = g_new0(struct libxlEventHandlerThreadInfo, 1); -+ -+ thread_info->driver = driver; -+ thread_info->vm = vm; -+ thread_info->event = (libxl_event *)event; -+ thread_name = g_strdup_printf("death-event-%d", event->domid); -+ /* -+ * Cleanup will be handled by the death thread. -+ */ -+ if (virThreadCreateFull(&thread, false, libxlDomainDeathThread, -+ thread_name, false, thread_info) < 0) { -+ /* -+ * Not much we can do on error here except log it. -+ */ -+ VIR_ERROR(_("Failed to create thread to handle domain death")); -+ goto cleanup; -+ } - /* -- * On death the domain is cleaned up from Xen's perspective. -- * Cleanup on the libvirt side can be done synchronously. -+ * virDomainObjEndAPI is called in the death thread, where -+ * libxlEventHandlerThreadInfo and libxl_event are also freed. - */ -- libxlDomainHandleDeath(driver, vm); -+ return; - } - - cleanup: - virDomainObjEndAPI(&vm); -+ VIR_FREE(thread_info); - cfg = libxlDriverConfigGet(driver); - /* Cast away any const */ - libxl_event_free(cfg->ctx, (libxl_event *)event); diff --git a/cbae4eaa-libxl-add-domainGetMessages.patch b/cbae4eaa-libxl-add-domainGetMessages.patch deleted file mode 100644 index 4cf1133..0000000 --- a/cbae4eaa-libxl-add-domainGetMessages.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit cbae4eaa19dd97da8b4330af80cf1e1f7cb21931 -Author: Jim Fehlig -Date: Mon Dec 13 16:59:55 2021 -0700 - - libxl: Implement domainGetMessages API - - Since commit 46783e6307a, the 'virsh dominfo' command calls - virDomainGetMessages to report any messages from the domain. - Hypervisors not implementing the API now get the following - libvirtd log message when clients invoke 'virsh dominfo' - - this function is not supported by the connection driver: virDomainGetMessages - - Although libxl currently does not support any tainting or - deprecation messages, provide an implementation to squelch - the previously unseen error message when collecting dominfo. - - Signed-off-by: Jim Fehlig - Reviewed-by: Michal Privoznik - -Index: libvirt-7.10.0/src/libxl/libxl_driver.c -=================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_driver.c -+++ libvirt-7.10.0/src/libxl/libxl_driver.c -@@ -6406,6 +6406,29 @@ libxlDomainGetMetadata(virDomainPtr dom, - return ret; - } - -+static int -+libxlDomainGetMessages(virDomainPtr dom, -+ char ***msgs, -+ unsigned int flags) -+{ -+ virDomainObj *vm = NULL; -+ int ret = -1; -+ -+ virCheckFlags(0, -1); -+ -+ if (!(vm = libxlDomObjFromDomain(dom))) -+ return -1; -+ -+ if (virDomainGetMessagesEnsureACL(dom->conn, vm->def) < 0) -+ goto cleanup; -+ -+ ret = virDomainObjGetMessages(vm, msgs, flags); -+ -+ cleanup: -+ virDomainObjEndAPI(&vm); -+ return ret; -+} -+ - static virHypervisorDriver libxlHypervisorDriver = { - .name = LIBXL_DRIVER_EXTERNAL_NAME, - .connectURIProbe = libxlConnectURIProbe, -@@ -6519,6 +6542,7 @@ static virHypervisorDriver libxlHypervis - .connectBaselineCPU = libxlConnectBaselineCPU, /* 2.3.0 */ - .domainSetMetadata = libxlDomainSetMetadata, /* 5.7.0 */ - .domainGetMetadata = libxlDomainGetMetadata, /* 5.7.0 */ -+ .domainGetMessages = libxlDomainGetMessages, /* 8.0.0 */ - - }; - diff --git a/e4f7589a-libxl-shutdown-thread-name.patch b/e4f7589a-libxl-shutdown-thread-name.patch deleted file mode 100644 index a44b49e..0000000 --- a/e4f7589a-libxl-shutdown-thread-name.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit e4f7589a3ec285489618ca04c8c0230cc31f3d99 -Author: Jim Fehlig -Date: Wed Nov 24 11:16:38 2021 -0700 - - libxl: Modify name of shutdown thread - - The current thread name 'ev-' is a bit terse. Change the name - to 'shutdown-event-', allowing it to be distinguished between - thread handling other event types. - - Signed-off-by: Jim Fehlig - Reviewed-by: Daniel P. Berrangé - Reviewed-by: Ján Tomko - -Index: libvirt-7.10.0/src/libxl/libxl_domain.c -=================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_domain.c -+++ libvirt-7.10.0/src/libxl/libxl_domain.c -@@ -678,7 +678,7 @@ libxlDomainEventHandler(void *data, libx - shutdown_info->driver = driver; - shutdown_info->vm = vm; - shutdown_info->event = (libxl_event *)event; -- name = g_strdup_printf("ev-%d", event->domid); -+ name = g_strdup_printf("shutdown-event-%d", event->domid); - /* - * Cleanup will be handled by the shutdown thread. - */ diff --git a/libvirt-7.10.0.tar.xz b/libvirt-7.10.0.tar.xz deleted file mode 100644 index df28ac9..0000000 --- a/libvirt-7.10.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cb318014af097327928c6e3d72922e3be02a3e6401247b2aa52d9ab8e0b480f9 -size 8798000 diff --git a/libvirt-7.10.0.tar.xz.asc b/libvirt-7.10.0.tar.xz.asc deleted file mode 100644 index a8bb056..0000000 --- a/libvirt-7.10.0.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEERTtlMQWVVihVRxGZymi+gBAITJwFAmGnRisACgkQymi+gBAI -TJx/DA//SSeuKY/Z/T2UrkaPOGnMR1kYJA9GKcC7XzHQ7exLrz5TbMpROsP1a1cD -K7ys53NHesxs9RHCPj/QpX4eFW4K8h+NiYZyQPO1O/Gu8PWzTdHYFTIFEzpktnsk -qjB/24bJ57QJ8mRnj+n16ch0KmSYzF2qY1WFOOUgyJ21JbL87ULx0TaQ83oq7TdJ -09AJ9dGlUjiOnLXCH54cUto4Ccb2sXxVdqy5UvmzUuA3RIFhGmVbZYdicl2nWrl4 -5lGBOVGcIvjojoj6SLunO149nQqotJ85Z/jOc9OQLYBDgVE+/BPIGsQZcFnCSEDw -MYUab/RMkVky2UeNTXKv4YMXIkYO5FTrIwKfWiWpHhZgN0ZgoDg8BPJLQDi4INPY -nom8u7mpQmNk/UpLNYomMiDpP34xt1XhRwT+jrrSpgyFHJf7BSYn/+qUp0kVEjNY -StLjUufcIGxDM+0dCnSQKVl7zYwvjt9vlD2B9wXnm92xAIIZaVVe3yN3MGC2HCwN -8kSM266ZeP4yPb716GFXhvFhqC0Y1MX48y3IpNtut8O7x4a5qAsSgLIXZ/3Vp8sk -uCN9S7h942NfgoeWbjm3nbeoKUx3iiuvX5B1HVceu+mu4juEcFqCecFmKABSr8Uv -6h4/D84wqGZHHQEhrvvR0Eqq+rFfkKgwZKXhrTZDL/9/weuHscY= -=JMZi ------END PGP SIGNATURE----- diff --git a/libvirt-8.0.0.tar.xz b/libvirt-8.0.0.tar.xz new file mode 100644 index 0000000..15ccd02 --- /dev/null +++ b/libvirt-8.0.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51e6e8ff04bafe96d7e314b213dcd41fb1163d9b4f0f75cdab01e663728f4cf6 +size 8860124 diff --git a/libvirt-8.0.0.tar.xz.asc b/libvirt-8.0.0.tar.xz.asc new file mode 100644 index 0000000..5a68eac --- /dev/null +++ b/libvirt-8.0.0.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEERTtlMQWVVihVRxGZymi+gBAITJwFAmHhhg0ACgkQymi+gBAI +TJyHTA/9F7mEVTE7lu/5Jtk738golxj2/75H+vurBFZM5gIDPHBlNPH7RLPHtxNw +nS4rtWR0ThajITQ+3lP2ttjLE6jvsMpIhKIizHqoyVEcW/LlR55RxGfR6K+0+lrh +CE7ycJujl0CVvkfjt7fFp1IkVD6mtxOciVwjRg5VtHBdNnmh6HWJQV+D9MfDhod5 +3ayzq3y3NZDfgWtOt4ZbTyhKh22VgTdIue0iHI+eRPI9xdp67bRjDh+rvjJ3SEGc +inEXaa1aj4O/VPcrsyjwBdg+O52YLZN/KG3cpZ/kmbQdFNiYOti8APM9t9NShNf7 +4egKeQthG90S3d2mFsyuVoIN7xk26NyMC3fgwKZeTEaMPbG1P+Y2f1k/efzVVqL0 +q6tCY74oQXbQ6XF/hANaM/HRvQnlt2JjWiTZ6DJ/+U0jW9MAEwzt/WRqrZfhT8i4 +gtemB/sYoZo1BTjZuW5e+pNRmaxyxZkzGUFwIJz+q86mvxi8IDWCGy9NOuypHUWQ +iavGE8vULDgZczd1fWMrmjWzDXe49L1b0mLqLOFdNpjbWxSnF3Bj7AR8GjTM0Bsu +5JpQ1Tjgz6IiW2DnL3EMZ4pKGMXiTgcqL/lYJH4a8yNJ4sV2+coVGijhhfQ2JW+O +x0ymOq77z/VyMI+ZffMeV00tiQF3TYZnwvaqU3e9TnVxmr3Ghx8= +=6QUv +-----END PGP SIGNATURE----- diff --git a/libvirt-power8-models.patch b/libvirt-power8-models.patch index b9ae4a8..49441db 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-7.10.0/src/cpu_map/ppc64_POWER8.xml +Index: libvirt-8.0.0/src/cpu_map/ppc64_POWER8.xml =================================================================== ---- libvirt-7.10.0.orig/src/cpu_map/ppc64_POWER8.xml -+++ libvirt-7.10.0/src/cpu_map/ppc64_POWER8.xml +--- libvirt-8.0.0.orig/src/cpu_map/ppc64_POWER8.xml ++++ libvirt-8.0.0/src/cpu_map/ppc64_POWER8.xml @@ -4,5 +4,7 @@ diff --git a/libvirt-suse-netcontrol.patch b/libvirt-suse-netcontrol.patch index 67c60d1..0ad2c5b 100644 --- a/libvirt-suse-netcontrol.patch +++ b/libvirt-suse-netcontrol.patch @@ -1,7 +1,7 @@ -Index: libvirt-7.10.0/tools/virsh.c +Index: libvirt-8.0.0/tools/virsh.c =================================================================== ---- libvirt-7.10.0.orig/tools/virsh.c -+++ libvirt-7.10.0/tools/virsh.c +--- libvirt-8.0.0.orig/tools/virsh.c ++++ libvirt-8.0.0/tools/virsh.c @@ -552,6 +552,8 @@ virshShowVersion(vshControl *ctl G_GNUC_ vshPrint(ctl, " Interface"); # if defined(WITH_NETCF) @@ -11,10 +11,10 @@ Index: libvirt-7.10.0/tools/virsh.c # elif defined(WITH_UDEV) vshPrint(ctl, " udev"); # endif -Index: libvirt-7.10.0/src/interface/interface_backend_netcf.c +Index: libvirt-8.0.0/src/interface/interface_backend_netcf.c =================================================================== ---- libvirt-7.10.0.orig/src/interface/interface_backend_netcf.c -+++ libvirt-7.10.0/src/interface/interface_backend_netcf.c +--- libvirt-8.0.0.orig/src/interface/interface_backend_netcf.c ++++ libvirt-8.0.0/src/interface/interface_backend_netcf.c @@ -21,7 +21,12 @@ #include @@ -126,10 +126,10 @@ Index: libvirt-7.10.0/src/interface/interface_backend_netcf.c if (virRegisterConnectDriver(&interfaceConnectDriver, false) < 0) return -1; if (virSetSharedInterfaceDriver(&interfaceDriver) < 0) -Index: libvirt-7.10.0/src/interface/interface_driver.c +Index: libvirt-8.0.0/src/interface/interface_driver.c =================================================================== ---- libvirt-7.10.0.orig/src/interface/interface_driver.c -+++ libvirt-7.10.0/src/interface/interface_driver.c +--- libvirt-8.0.0.orig/src/interface/interface_driver.c ++++ libvirt-8.0.0/src/interface/interface_driver.c @@ -30,8 +30,15 @@ interfaceRegister(void) if (netcfIfaceRegister() == 0) return 0; @@ -147,11 +147,11 @@ Index: libvirt-7.10.0/src/interface/interface_driver.c if (udevIfaceRegister() == 0) return 0; #endif /* WITH_UDEV */ -Index: libvirt-7.10.0/meson.build +Index: libvirt-8.0.0/meson.build =================================================================== ---- libvirt-7.10.0.orig/meson.build -+++ libvirt-7.10.0/meson.build -@@ -1116,6 +1116,12 @@ else +--- libvirt-8.0.0.orig/meson.build ++++ libvirt-8.0.0/meson.build +@@ -1098,6 +1098,12 @@ else netcf_dep = dependency('', required: false) endif @@ -164,7 +164,7 @@ Index: libvirt-7.10.0/meson.build have_gnu_gettext_tools = false if not get_option('nls').disabled() have_gettext = cc.has_function('gettext') -@@ -1512,10 +1518,10 @@ elif get_option('driver_hyperv').enabled +@@ -1505,10 +1511,10 @@ elif get_option('driver_hyperv').enabled error('openwsman is required for the Hyper-V driver') endif @@ -177,7 +177,7 @@ Index: libvirt-7.10.0/meson.build endif if not get_option('driver_libxl').disabled() and conf.has('WITH_LIBVIRTD') -@@ -2352,6 +2358,7 @@ libs_summary = { +@@ -2345,6 +2351,7 @@ libs_summary = { 'libssh2': libssh2_dep.found(), 'libutil': libutil_dep.found(), 'netcf': conf.has('WITH_NETCF'), @@ -185,10 +185,10 @@ Index: libvirt-7.10.0/meson.build 'NLS': have_gnu_gettext_tools, 'numactl': numactl_dep.found(), 'openwsman': openwsman_dep.found(), -Index: libvirt-7.10.0/src/interface/meson.build +Index: libvirt-8.0.0/src/interface/meson.build =================================================================== ---- libvirt-7.10.0.orig/src/interface/meson.build -+++ libvirt-7.10.0/src/interface/meson.build +--- libvirt-8.0.0.orig/src/interface/meson.build ++++ libvirt-8.0.0/src/interface/meson.build @@ -2,7 +2,7 @@ interface_driver_sources = [ 'interface_driver.c', ] @@ -206,10 +206,10 @@ Index: libvirt-7.10.0/src/interface/meson.build udev_dep, ], 'link_args': [ -Index: libvirt-7.10.0/meson_options.txt +Index: libvirt-8.0.0/meson_options.txt =================================================================== ---- libvirt-7.10.0.orig/meson_options.txt -+++ libvirt-7.10.0/meson_options.txt +--- libvirt-8.0.0.orig/meson_options.txt ++++ libvirt-8.0.0/meson_options.txt @@ -29,6 +29,7 @@ option('libpcap', type: 'feature', value option('libssh', type: 'feature', value: 'auto', description: 'libssh support') option('libssh2', type: 'feature', value: 'auto', description: 'libssh2 support') diff --git a/libvirt.changes b/libvirt.changes index 6dedcdd..45341c7 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Tue Jan 18 17:11:13 UTC 2022 - James Fehlig + +- sysconfig files have not been distributed for many months. Add + upstream patches that improve documentation and moves service + default settings to the associated systemd service file. + 3be5ba11-libvirt-guests-install.patch, + 16172741-libvirt-guests-manpage.patch, + 8eb44616-remove-sysconfig-files.patch + +------------------------------------------------------------------- +Tue Jan 18 03:06:25 UTC 2022 - James Fehlig + +- Update to libvirt 8.0.0 + - CVE-2021-4147 + - bsc#1191511 + - jsc#SLE-11435, jsc#SLE-18354 + - Many incremental improvements and bug fixes, see + https://libvirt.org/news.html#v8-0-0-2022-01-14 + - Dropped patches: + 23b51d7b-libxl-disable-death-event.patch, + a4e6fba0-libxl-rename-threadinfo-struct.patch, + e4f7589a-libxl-shutdown-thread-name.patch, + b9a5faea-libxl-handle-death-thread.patch, + 5c5df531-libxl-search-domid-in-thread.patch, + a7a03324-libxl-protect-logger-access.patch, + cbae4eaa-libxl-add-domainGetMessages.patch + ------------------------------------------------------------------- Tue Dec 14 16:36:15 UTC 2021 - James Fehlig diff --git a/libvirt.spec b/libvirt.spec index fad51ae..08545c5 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,7 +1,7 @@ # # spec file for package libvirt # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -138,9 +138,27 @@ %define wireshark_plugindir %(pkg-config --variable plugindir wireshark)/epan %endif +# libvirt no longer distributes sysconfig files. +# If the user has customized a sysconfig file, the RPM upgrade path will rename +# it to .rpmsave since the file is no longer managed by RPM. To prevent a +# regression, we rename it back after the transaction to preserve the user's +# modifications +%define libvirt_sysconfig_pre() \ + for sc in %{?*} ; do \ + test -f "%{_sysconfdir}/sysconfig/${sc}.rpmsave" || continue ; \ + mv -v "%{_sysconfdir}/sysconfig/${sc}.rpmsave" "%{_sysconfdir}/sysconfig/${sc}.rpmsave.old" ; \ + done \ + %{nil} +%define libvirt_sysconfig_posttrans() \ + for sc in %{?*} ; do \ + test -f "%{_sysconfdir}/sysconfig/${sc}.rpmsave" || continue ; \ + mv -v "%{_sysconfdir}/sysconfig/${sc}.rpmsave" "%{_sysconfdir}/sysconfig/${sc}" ; \ + done \ + %{nil} + Name: libvirt URL: http://libvirt.org/ -Version: 7.10.0 +Version: 8.0.0 Release: 0 Summary: Library providing a virtualization API License: LGPL-2.1-or-later @@ -219,7 +237,6 @@ BuildRequires: dnsmasq >= 2.41 BuildRequires: ebtables BuildRequires: iptables BuildRequires: polkit >= 0.112 -BuildRequires: radvd # For mount/umount in FS driver BuildRequires: util-linux # For LVM drivers @@ -235,8 +252,6 @@ BuildRequires: parted BuildRequires: parted-devel # For Multipath support BuildRequires: device-mapper-devel -# For XFS reflink clone support -BuildRequires: xfsprogs-devel %if %{with_storage_rbd} BuildRequires: %{with_rbd_lib} %endif @@ -286,13 +301,9 @@ Source6: libvirtd-relocation-server.xml Source99: baselibs.conf Source100: %{name}-rpmlintrc # Upstream patches -Patch0: 23b51d7b-libxl-disable-death-event.patch -Patch1: a4e6fba0-libxl-rename-threadinfo-struct.patch -Patch2: e4f7589a-libxl-shutdown-thread-name.patch -Patch3: b9a5faea-libxl-handle-death-thread.patch -Patch4: 5c5df531-libxl-search-domid-in-thread.patch -Patch5: a7a03324-libxl-protect-logger-access.patch -Patch6: cbae4eaa-libxl-add-domainGetMessages.patch +Patch0: 3be5ba11-libvirt-guests-install.patch +Patch1: 16172741-libvirt-guests-manpage.patch +Patch2: 8eb44616-remove-sysconfig-files.patch # Patches pending upstream review Patch100: libxl-dom-reset.patch Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch @@ -345,9 +356,10 @@ Group: System/Management Requires: %{name}-libs = %{version}-%{release} -# So remote clients can access libvirt over SSH tunnel -# (client invokes 'nc' against the UNIX socket on the server) -Requires: netcat-openbsd +# netcat is needed on the server side so that clients that have +# libvirt < 6.9.0 can connect, but newer versions will prefer +# virt-ssh-helper +Recommends: netcat-openbsd # for modprobe of pci devices Requires: modutils # for /sbin/ip & /sbin/tc @@ -427,7 +439,6 @@ Requires: %{name}-daemon = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} Requires: dnsmasq >= 2.41 Requires: iptables -Requires: radvd %description daemon-driver-network The network driver plugin for the libvirtd daemon, providing @@ -1071,17 +1082,6 @@ rm -f %{buildroot}/%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug # init scripts rm -f %{buildroot}/usr/lib/sysctl.d/60-libvirtd.conf -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/libvirtd -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtproxyd -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtlogd -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtlockd -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtinterfaced -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtnetworkd -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtnodedevd -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtnwfilterd -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtsecretd -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtstoraged -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/libvirt-guests # Provide rc symlink backward compatibility ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rclibvirtd ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcvirtproxyd @@ -1096,19 +1096,15 @@ ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcvirtstoraged ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rclibvirt-guests %if %{with_qemu} -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtqemud ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcvirtqemud %endif %if %{with_lxc} -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtlxcd ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcvirtlxcd %endif %if %{with_libxl} -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtxend ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcvirtxend %endif %if %{with_vbox} -rm -f %{buildroot}/%{_sysconfdir}/sysconfig/virtvboxd ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcvirtvboxd %endif @@ -1136,6 +1132,7 @@ mv %{buildroot}/%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \ VIR_TEST_DEBUG=1 %meson_test -t 5 --no-suite syntax-check %pre daemon +%libvirt_sysconfig_pre libvirtd virtproxyd virtlogd virtlockd libvirt-guests %service_add_pre libvirtd.service libvirtd.socket libvirtd-ro.socket libvirt-guests.service libvirtd-admin.socket libvirtd-tcp.socket libvirtd-tls.socket virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket virtproxyd.service virtproxyd.socket virtproxyd-ro.socket virtproxyd-admin.socket virtproxyd-tcp.socket virtproxyd-tls.socket %post daemon @@ -1157,64 +1154,20 @@ fi %service_del_postun_without_restart libvirtd.service libvirtd.socket libvirtd-ro.socket libvirt-guests.service libvirtd-admin.socket libvirtd-tcp.socket libvirtd-tls.socket virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket virtproxyd.service virtproxyd.socket virtproxyd-ro.socket virtproxyd-admin.socket virtproxyd-tcp.socket virtproxyd-tls.socket %posttrans daemon +%libvirt_sysconfig_posttrans libvirtd virtproxyd virtlogd virtlockd libvirt-guests # virtlockd and virtlogd must not be restarted, particularly virtlockd since the # locks it uses to protect VM resources would be lost. Both are safe to re-exec. %{_bindir}/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || : %{_bindir}/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || : -# The '--listen' option is incompatible with socket activation. -# Check if the existing install uses --listen -listen_mode=no -if test -f %{_sysconfdir}/sysconfig/libvirtd; then - if grep -q -E '^LIBVIRTD_ARGS=.*--listen' %{_sysconfdir}/sysconfig/libvirtd; then - listen_mode=yes - fi - # A benefit of socket activation is libvirtd doesn't need to be running - # when unused. If sockets are enabled, set a timeout value if it doesn't - # already exist - if test "$listen_mode" = no && \ - %{_bindir}/systemctl -q is-enabled libvirtd.socket; then - awk -i inplace " - /^LIBVIRTD_ARGS=/ { - gsub(\"^LIBVIRTD_ARGS=\", \"\") - gsub(\"^['\\\"]\", \"\") - gsub(\"['\\\"]$\", \"\") - printf \"LIBVIRTD_ARGS='\" - num = split(\$0, values) - got_timeout = 0 - for ( i = 1; i <= num ; i++) { - if (values[i] ~ /^--timeout=/) - got_timeout = 1 - if (values[i] ~ /^--timeout$/) { - if (i < num) { - got_timeout = 1 - printf \"%%s \",values[i] - i++ - } else { - continue - } - } - printf \"%%s\",values[i] - if (i >= 1 && i < num) - printf \" \" - } - if (got_timeout == 0) - if (num == 0) - printf \"--timeout 120\" - else - printf \" --timeout 120\" - printf \"'\n\" - next - } - { print } " "%{_sysconfdir}/sysconfig/libvirtd" || : - fi -fi # All connection drivers should be installed post transaction. # Time to restart the daemon test -f %{_sysconfdir}/sysconfig/services -a \ -z "$DISABLE_RESTART_ON_UPDATE" && . %{_sysconfdir}/sysconfig/services if test "$DISABLE_RESTART_ON_UPDATE" != yes -a \ "$DISABLE_RESTART_ON_UPDATE" != 1; then - if test "$listen_mode" = yes; then + # See if user has previously modified their install to + # tell libvirtd to use --listen + if grep -q -E '^LIBVIRTD_ARGS=.*--listen' %{_sysconfdir}/sysconfig/libvirtd; then # Keep honouring --listen and *not* use systemd socket activation. # Switching things might confuse management tools that expect the old # style libvirtd @@ -1450,6 +1403,8 @@ fi %attr(0755, root, root) %{_bindir}/virt-ssh-helper %doc %{_mandir}/man1/virt-admin.1* %doc %{_mandir}/man1/virt-host-validate.1* +%doc %{_mandir}/man8/virt-ssh-helper.8* +%doc %{_mandir}/man8/libvirt-guests.8* %doc %{_mandir}/man8/libvirtd.8* %doc %{_mandir}/man8/virtlogd.8* %doc %{_mandir}/man8/virtlockd.8* @@ -1630,6 +1585,7 @@ fi %files daemon-driver-qemu %config(noreplace) %{_sysconfdir}/%{name}/virtqemud.conf %config(noreplace) %{_sysconfdir}/apparmor.d/usr.sbin.virtqemud +%config(noreplace) %{_prefix}/lib/sysctl.d/60-qemu-postcopy-migration.conf %{_datadir}/augeas/lenses/virtqemud.aug %{_datadir}/augeas/lenses/tests/test_virtqemud.aug %{_unitdir}/virtqemud.service @@ -1747,6 +1703,7 @@ fi %files client %doc %{_mandir}/man1/virsh.1* %doc %{_mandir}/man1/virt-xml-validate.1* +%doc %{_mandir}/man1/virt-pki-query-dn.1* %doc %{_mandir}/man1/virt-pki-validate.1* %{_bindir}/virsh %{_bindir}/virt-xml-validate diff --git a/libxl-dom-reset.patch b/libxl-dom-reset.patch index 2751ff7..b034d2c 100644 --- a/libxl-dom-reset.patch +++ b/libxl-dom-reset.patch @@ -8,11 +8,11 @@ Date: Mon Jun 23 15:51:20 2014 -0600 option, but domainReset can be implemented in the libxl driver by forcibly destroying the domain and starting it again. -Index: libvirt-7.10.0/src/libxl/libxl_driver.c +Index: libvirt-8.0.0/src/libxl/libxl_driver.c =================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_driver.c -+++ libvirt-7.10.0/src/libxl/libxl_driver.c -@@ -1340,6 +1340,63 @@ libxlDomainReboot(virDomainPtr dom, unsi +--- libvirt-8.0.0.orig/src/libxl/libxl_driver.c ++++ libvirt-8.0.0/src/libxl/libxl_driver.c +@@ -1338,6 +1338,63 @@ libxlDomainReboot(virDomainPtr dom, unsi } static int @@ -76,7 +76,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_driver.c libxlDomainDestroyFlags(virDomainPtr dom, unsigned int flags) { -@@ -6453,6 +6510,7 @@ static virHypervisorDriver libxlHypervis +@@ -6432,6 +6489,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 ce4be30..c35f6da 100644 --- a/libxl-set-cach-mode.patch +++ b/libxl-set-cach-mode.patch @@ -3,10 +3,10 @@ https://bugzilla.novell.com/show_bug.cgi?id=879425 src/libxl/libxl_conf.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) -Index: libvirt-7.10.0/src/libxl/libxl_conf.c +Index: libvirt-8.0.0/src/libxl/libxl_conf.c =================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_conf.c -+++ libvirt-7.10.0/src/libxl/libxl_conf.c +--- libvirt-8.0.0.orig/src/libxl/libxl_conf.c ++++ libvirt-8.0.0/src/libxl/libxl_conf.c @@ -941,6 +941,28 @@ libxlDiskSetDiscard(libxl_device_disk *x } } diff --git a/libxl-set-migration-constraints.patch b/libxl-set-migration-constraints.patch index 5a154a1..6546950 100644 --- a/libxl-set-migration-constraints.patch +++ b/libxl-set-migration-constraints.patch @@ -16,21 +16,19 @@ Signed-off-by: Jim Fehlig tools/virsh.pod | 8 ++++++++ 6 files changed, 125 insertions(+), 6 deletions(-) -Index: libvirt-7.10.0/docs/manpages/virsh.rst +Index: libvirt-8.0.0/docs/manpages/virsh.rst =================================================================== ---- libvirt-7.10.0.orig/docs/manpages/virsh.rst -+++ libvirt-7.10.0/docs/manpages/virsh.rst -@@ -3175,7 +3175,8 @@ migrate - [--postcopy-bandwidth bandwidth] +--- libvirt-8.0.0.orig/docs/manpages/virsh.rst ++++ libvirt-8.0.0/docs/manpages/virsh.rst +@@ -3237,6 +3237,7 @@ migrate [--parallel [--parallel-connections connections]] [--bandwidth bandwidth] [--tls-destination hostname] -- [--disks-uri URI] -+ [--disks-uri URI] [--max_iters num] -+ [--min_remaining num] [--abort_if_busy] + [--disks-uri URI] [--copy-storage-synchronous-writes] ++ [--max_iters num] [--min_remaining num] [--abort_if_busy] Migrate domain to another host. Add *--live* for live migration; <--p2p> for peer-2-peer migration; *--direct* for direct migration; or *--tunnelled* -@@ -3281,6 +3282,12 @@ parallel connections. The number of such +@@ -3354,6 +3355,12 @@ parallel connections. The number of such network link between the source and the target and thus speeding up the migration. @@ -43,11 +41,11 @@ Index: libvirt-7.10.0/docs/manpages/virsh.rst Running migration can be canceled by interrupting virsh (usually using ``Ctrl-C``) or by ``domjobabort`` command sent from another virsh instance. -Index: libvirt-7.10.0/include/libvirt/libvirt-domain.h +Index: libvirt-8.0.0/include/libvirt/libvirt-domain.h =================================================================== ---- libvirt-7.10.0.orig/include/libvirt/libvirt-domain.h -+++ libvirt-7.10.0/include/libvirt/libvirt-domain.h -@@ -1079,6 +1079,25 @@ typedef enum { +--- libvirt-8.0.0.orig/include/libvirt/libvirt-domain.h ++++ libvirt-8.0.0/include/libvirt/libvirt-domain.h +@@ -1089,6 +1089,25 @@ typedef enum { */ # define VIR_MIGRATE_PARAM_TLS_DESTINATION "tls.destination" @@ -73,11 +71,11 @@ Index: libvirt-7.10.0/include/libvirt/libvirt-domain.h /* Domain migration. */ virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn, unsigned long flags, const char *dname, -Index: libvirt-7.10.0/src/libxl/libxl_driver.c +Index: libvirt-8.0.0/src/libxl/libxl_driver.c =================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_driver.c -+++ libvirt-7.10.0/src/libxl/libxl_driver.c -@@ -5994,6 +5994,9 @@ libxlDomainMigratePerform3Params(virDoma +--- libvirt-8.0.0.orig/src/libxl/libxl_driver.c ++++ libvirt-8.0.0/src/libxl/libxl_driver.c +@@ -5973,6 +5973,9 @@ libxlDomainMigratePerform3Params(virDoma const char *dname = NULL; const char *uri = NULL; int ret = -1; @@ -87,7 +85,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_driver.c #ifdef LIBXL_HAVE_NO_SUSPEND_RESUME virReportUnsupportedError(); -@@ -6010,6 +6013,15 @@ libxlDomainMigratePerform3Params(virDoma +@@ -5989,6 +5992,15 @@ libxlDomainMigratePerform3Params(virDoma virTypedParamsGetString(params, nparams, VIR_MIGRATE_PARAM_DEST_NAME, &dname) < 0 || @@ -103,7 +101,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_driver.c virTypedParamsGetString(params, nparams, VIR_MIGRATE_PARAM_URI, &uri) < 0) -@@ -6024,11 +6036,11 @@ libxlDomainMigratePerform3Params(virDoma +@@ -6003,11 +6015,11 @@ libxlDomainMigratePerform3Params(virDoma if ((flags & (VIR_MIGRATE_TUNNELLED | VIR_MIGRATE_PEER2PEER))) { if (libxlDomainMigrationSrcPerformP2P(driver, vm, dom->conn, dom_xml, @@ -117,10 +115,10 @@ Index: libvirt-7.10.0/src/libxl/libxl_driver.c goto cleanup; } -Index: libvirt-7.10.0/src/libxl/libxl_migration.c +Index: libvirt-8.0.0/src/libxl/libxl_migration.c =================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_migration.c -+++ libvirt-7.10.0/src/libxl/libxl_migration.c +--- libvirt-8.0.0.orig/src/libxl/libxl_migration.c ++++ libvirt-8.0.0/src/libxl/libxl_migration.c @@ -334,18 +334,38 @@ libxlMigrateDstReceive(virNetSocket *soc static int libxlDoMigrateSrcSend(libxlDriverPrivate *driver, @@ -162,7 +160,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c if (ret != 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Failed to send migration data to destination host")); -@@ -885,7 +905,7 @@ struct libxlTunnelControl { +@@ -884,7 +904,7 @@ struct libxlTunnelControl { static int libxlMigrationSrcStartTunnel(libxlDriverPrivate *driver, virDomainObj *vm, @@ -171,7 +169,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c virStreamPtr st, struct libxlTunnelControl **tnl) { -@@ -918,7 +938,7 @@ libxlMigrationSrcStartTunnel(libxlDriver +@@ -917,7 +937,7 @@ libxlMigrationSrcStartTunnel(libxlDriver virObjectUnlock(vm); /* Send data to pipe */ @@ -180,7 +178,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c virObjectLock(vm); /* libxlMigrationSrcStopTunnel will be called in libxlDoMigrateSrcP2P -@@ -953,7 +973,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivate +@@ -952,7 +972,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivate const char *dconnuri G_GNUC_UNUSED, const char *dname, const char *uri, @@ -189,7 +187,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c { virDomainPtr ddomain = NULL; virTypedParameterPtr params = NULL; -@@ -998,11 +1018,11 @@ libxlDoMigrateSrcP2P(libxlDriverPrivate +@@ -997,11 +1017,11 @@ libxlDoMigrateSrcP2P(libxlDriverPrivate /* We don't require the destination to have P2P support * as it looks to be normal migration from the receiver perspective. */ @@ -203,7 +201,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c if (!(st = virStreamNew(dconn, 0))) goto confirm; ret = dconn->driver->domainMigratePrepareTunnel3Params -@@ -1016,7 +1036,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivate +@@ -1015,7 +1035,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivate if (ret == -1) goto confirm; @@ -212,7 +210,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c if (uri_out) { if (virTypedParamsReplaceString(¶ms, &nparams, VIR_MIGRATE_PARAM_URI, uri_out) < 0) { -@@ -1031,11 +1051,11 @@ libxlDoMigrateSrcP2P(libxlDriverPrivate +@@ -1030,11 +1050,11 @@ libxlDoMigrateSrcP2P(libxlDriverPrivate } VIR_DEBUG("Perform3 uri=%s", NULLSTR(uri_out)); @@ -227,7 +225,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c if (ret < 0) { notify_source = false; virErrorPreserveLast(&orig_err); -@@ -1070,7 +1090,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivate +@@ -1069,7 +1089,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivate confirm: if (notify_source) { VIR_DEBUG("Confirm3 cancelled=%d vm=%p", cancelled, vm); @@ -236,7 +234,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c if (ret < 0) VIR_WARN("Guest %s probably left in 'paused' state on source", -@@ -1078,7 +1098,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivate +@@ -1077,7 +1097,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivate } cleanup: @@ -245,7 +243,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c libxlMigrationSrcStopTunnel(tc); virObjectUnref(st); } -@@ -1122,7 +1142,7 @@ libxlDomainMigrationSrcPerformP2P(libxlD +@@ -1121,7 +1141,7 @@ libxlDomainMigrationSrcPerformP2P(libxlD const char *dconnuri, const char *uri_str G_GNUC_UNUSED, const char *dname, @@ -254,7 +252,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c { int ret = -1; int useParams; -@@ -1159,7 +1179,7 @@ libxlDomainMigrationSrcPerformP2P(libxlD +@@ -1155,7 +1175,7 @@ libxlDomainMigrationSrcPerformP2P(libxlD } ret = libxlDoMigrateSrcP2P(driver, vm, sconn, xmlin, dconn, dconnuri, @@ -263,7 +261,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c if (ret < 0) { /* -@@ -1186,7 +1206,7 @@ libxlDomainMigrationSrcPerform(libxlDriv +@@ -1182,7 +1202,7 @@ libxlDomainMigrationSrcPerform(libxlDriv const char *dconnuri G_GNUC_UNUSED, const char *uri_str, const char *dname G_GNUC_UNUSED, @@ -272,7 +270,7 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c { libxlDomainObjPrivate *priv = vm->privateData; char *hostname = NULL; -@@ -1222,7 +1242,7 @@ libxlDomainMigrationSrcPerform(libxlDriv +@@ -1218,7 +1238,7 @@ libxlDomainMigrationSrcPerform(libxlDriv /* suspend vm and send saved data to dst through socket fd */ virObjectUnlock(vm); @@ -281,10 +279,10 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.c virObjectLock(vm); if (ret == 0) { -Index: libvirt-7.10.0/src/libxl/libxl_migration.h +Index: libvirt-8.0.0/src/libxl/libxl_migration.h =================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_migration.h -+++ libvirt-7.10.0/src/libxl/libxl_migration.h +--- libvirt-8.0.0.orig/src/libxl/libxl_migration.h ++++ libvirt-8.0.0/src/libxl/libxl_migration.h @@ -35,6 +35,9 @@ VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \ VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \ @@ -327,11 +325,11 @@ Index: libvirt-7.10.0/src/libxl/libxl_migration.h virDomainPtr libxlDomainMigrationDstFinish(virConnectPtr dconn, -Index: libvirt-7.10.0/tools/virsh-domain.c +Index: libvirt-8.0.0/tools/virsh-domain.c =================================================================== ---- libvirt-7.10.0.orig/tools/virsh-domain.c -+++ libvirt-7.10.0/tools/virsh-domain.c -@@ -10683,6 +10683,18 @@ static const vshCmdOptDef opts_migrate[] +--- libvirt-8.0.0.orig/tools/virsh-domain.c ++++ libvirt-8.0.0/tools/virsh-domain.c +@@ -10841,6 +10841,18 @@ static const vshCmdOptDef opts_migrate[] .completer = virshCompleteEmpty, .help = N_("override the destination host name used for TLS verification") }, @@ -350,7 +348,7 @@ Index: libvirt-7.10.0/tools/virsh-domain.c {.name = NULL} }; -@@ -10703,6 +10715,7 @@ doMigrate(void *opaque) +@@ -10861,6 +10873,7 @@ doMigrate(void *opaque) unsigned long long ullOpt = 0; int rv; virConnectPtr dconn = data->dconn; @@ -358,7 +356,7 @@ Index: libvirt-7.10.0/tools/virsh-domain.c #ifndef WIN32 sigset_t sigmask, oldsigmask; -@@ -10833,6 +10846,22 @@ doMigrate(void *opaque) +@@ -10991,6 +11004,22 @@ doMigrate(void *opaque) goto save_error; } diff --git a/libxl-support-block-script.patch b/libxl-support-block-script.patch index dce8de4..c0de0f4 100644 --- a/libxl-support-block-script.patch +++ b/libxl-support-block-script.patch @@ -7,10 +7,10 @@ and npiv. For more details, see bsc#954872 and FATE#319810 -Index: libvirt-7.10.0/src/libxl/libxl_conf.c +Index: libvirt-8.0.0/src/libxl/libxl_conf.c =================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_conf.c -+++ libvirt-7.10.0/src/libxl/libxl_conf.c +--- libvirt-8.0.0.orig/src/libxl/libxl_conf.c ++++ libvirt-8.0.0/src/libxl/libxl_conf.c @@ -942,6 +942,20 @@ libxlDiskSetDiscard(libxl_device_disk *x } diff --git a/lxc-wait-after-eth-del.patch b/lxc-wait-after-eth-del.patch index 4bfab87..430b802 100644 --- a/lxc-wait-after-eth-del.patch +++ b/lxc-wait-after-eth-del.patch @@ -13,11 +13,11 @@ device with the same name that is being created. src/lxc/lxc_process.c | 1 + 3 files changed, 4 insertions(+) -Index: libvirt-7.10.0/src/lxc/lxc_controller.c +Index: libvirt-8.0.0/src/lxc/lxc_controller.c =================================================================== ---- libvirt-7.10.0.orig/src/lxc/lxc_controller.c -+++ libvirt-7.10.0/src/lxc/lxc_controller.c -@@ -2012,6 +2012,7 @@ static int virLXCControllerDeleteInterfa +--- libvirt-8.0.0.orig/src/lxc/lxc_controller.c ++++ libvirt-8.0.0/src/lxc/lxc_controller.c +@@ -2006,6 +2006,7 @@ static int virLXCControllerDeleteInterfa if (virNetDevVethDelete(ctrl->veths[i]) < 0) ret = -1; } @@ -25,10 +25,10 @@ Index: libvirt-7.10.0/src/lxc/lxc_controller.c return ret; } -Index: libvirt-7.10.0/src/lxc/lxc_driver.c +Index: libvirt-8.0.0/src/lxc/lxc_driver.c =================================================================== ---- libvirt-7.10.0.orig/src/lxc/lxc_driver.c -+++ libvirt-7.10.0/src/lxc/lxc_driver.c +--- libvirt-8.0.0.orig/src/lxc/lxc_driver.c ++++ libvirt-8.0.0/src/lxc/lxc_driver.c @@ -67,6 +67,7 @@ #include "virtime.h" #include "virtypedparam.h" @@ -37,7 +37,7 @@ Index: libvirt-7.10.0/src/lxc/lxc_driver.c #include "virstring.h" #include "viraccessapicheck.h" #include "viraccessapichecklxc.h" -@@ -3539,6 +3540,7 @@ lxcDomainAttachDeviceNetLive(virLXCDrive +@@ -3508,6 +3509,7 @@ lxcDomainAttachDeviceNetLive(virLXCDrive case VIR_DOMAIN_NET_TYPE_NETWORK: case VIR_DOMAIN_NET_TYPE_ETHERNET: ignore_value(virNetDevVethDelete(veth)); @@ -45,7 +45,7 @@ Index: libvirt-7.10.0/src/lxc/lxc_driver.c break; case VIR_DOMAIN_NET_TYPE_DIRECT: -@@ -3978,6 +3980,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb +@@ -3947,6 +3949,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb virDomainAuditNet(vm, detach, NULL, "detach", false); goto cleanup; } @@ -53,10 +53,10 @@ Index: libvirt-7.10.0/src/lxc/lxc_driver.c break; /* It'd be nice to support this, but with macvlan -Index: libvirt-7.10.0/src/lxc/lxc_process.c +Index: libvirt-8.0.0/src/lxc/lxc_process.c =================================================================== ---- libvirt-7.10.0.orig/src/lxc/lxc_process.c -+++ libvirt-7.10.0/src/lxc/lxc_process.c +--- libvirt-8.0.0.orig/src/lxc/lxc_process.c ++++ libvirt-8.0.0/src/lxc/lxc_process.c @@ -51,6 +51,7 @@ #include "virstring.h" #include "virprocess.h" 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 368283a..9df71b8 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-7.10.0/src/network/bridge_driver.c +Index: libvirt-8.0.0/src/network/bridge_driver.c =================================================================== ---- libvirt-7.10.0.orig/src/network/bridge_driver.c -+++ libvirt-7.10.0/src/network/bridge_driver.c -@@ -1449,7 +1449,14 @@ networkDnsmasqConfContents(virNetworkObj +--- libvirt-8.0.0.orig/src/network/bridge_driver.c ++++ libvirt-8.0.0/src/network/bridge_driver.c +@@ -1347,7 +1347,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-7.10.0/src/network/bridge_driver.c } if (ipdef->tftproot) { -Index: libvirt-7.10.0/tests/networkxml2confdata/dhcp6host-routed-network.conf +Index: libvirt-8.0.0/tests/networkxml2confdata/dhcp6host-routed-network.conf =================================================================== ---- libvirt-7.10.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf -+++ libvirt-7.10.0/tests/networkxml2confdata/dhcp6host-routed-network.conf +--- libvirt-8.0.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf ++++ libvirt-8.0.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 c4b299a..f00cb67 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-7.10.0/src/util/virarch.c +Index: libvirt-8.0.0/src/util/virarch.c =================================================================== ---- libvirt-7.10.0.orig/src/util/virarch.c -+++ libvirt-7.10.0/src/util/virarch.c +--- libvirt-8.0.0.orig/src/util/virarch.c ++++ libvirt-8.0.0/src/util/virarch.c @@ -222,6 +222,8 @@ virArch virArchFromHost(void) arch = VIR_ARCH_X86_64; } else if (STREQ(ut.machine, "arm64")) { diff --git a/qemu-apparmor-screenshot.patch b/qemu-apparmor-screenshot.patch index a25ec14..1860e61 100644 --- a/qemu-apparmor-screenshot.patch +++ b/qemu-apparmor-screenshot.patch @@ -1,7 +1,7 @@ -Index: libvirt-7.10.0/src/security/apparmor/libvirt-qemu +Index: libvirt-8.0.0/src/security/apparmor/libvirt-qemu =================================================================== ---- libvirt-7.10.0.orig/src/security/apparmor/libvirt-qemu -+++ libvirt-7.10.0/src/security/apparmor/libvirt-qemu +--- libvirt-8.0.0.orig/src/security/apparmor/libvirt-qemu ++++ libvirt-8.0.0/src/security/apparmor/libvirt-qemu @@ -248,3 +248,6 @@ # /sys/bus/nd/devices / r, # harmless on any lsb compliant system diff --git a/suse-libvirt-guests-service.patch b/suse-libvirt-guests-service.patch index 13418d3..f14173f 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-7.10.0/tools/libvirt-guests.sh.in +Index: libvirt-8.0.0/tools/libvirt-guests.sh.in =================================================================== ---- libvirt-7.10.0.orig/tools/libvirt-guests.sh.in -+++ libvirt-7.10.0/tools/libvirt-guests.sh.in +--- libvirt-8.0.0.orig/tools/libvirt-guests.sh.in ++++ libvirt-8.0.0/tools/libvirt-guests.sh.in @@ -20,10 +20,6 @@ sysconfdir="@sysconfdir@" localstatedir="@localstatedir@" libvirtd="@sbindir@"/libvirtd diff --git a/suse-libvirtd-disable-tls.patch b/suse-libvirtd-disable-tls.patch index ee62489..88cbc6b 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-7.10.0/src/remote/remote_daemon_config.c +Index: libvirt-8.0.0/src/remote/remote_daemon_config.c =================================================================== ---- libvirt-7.10.0.orig/src/remote/remote_daemon_config.c -+++ libvirt-7.10.0/src/remote/remote_daemon_config.c +--- libvirt-8.0.0.orig/src/remote/remote_daemon_config.c ++++ libvirt-8.0.0/src/remote/remote_daemon_config.c @@ -98,7 +98,7 @@ daemonConfigNew(bool privileged G_GNUC_U #ifdef WITH_IP @@ -16,10 +16,10 @@ Index: libvirt-7.10.0/src/remote/remote_daemon_config.c # else /* ! LIBVIRTD */ data->listen_tls = false; /* Always honoured, --listen doesn't exist. */ # endif /* ! LIBVIRTD */ -Index: libvirt-7.10.0/src/remote/libvirtd.conf.in +Index: libvirt-8.0.0/src/remote/libvirtd.conf.in =================================================================== ---- libvirt-7.10.0.orig/src/remote/libvirtd.conf.in -+++ libvirt-7.10.0/src/remote/libvirtd.conf.in +--- libvirt-8.0.0.orig/src/remote/libvirtd.conf.in ++++ libvirt-8.0.0/src/remote/libvirtd.conf.in @@ -17,8 +17,8 @@ # It is necessary to setup a CA and issue server certificates before # using this capability. @@ -31,10 +31,10 @@ Index: libvirt-7.10.0/src/remote/libvirtd.conf.in # Listen for unencrypted TCP connections on the public TCP/IP port. # NB, must pass the --listen flag to the @DAEMON_NAME@ process for this to -Index: libvirt-7.10.0/src/remote/test_libvirtd.aug.in +Index: libvirt-8.0.0/src/remote/test_libvirtd.aug.in =================================================================== ---- libvirt-7.10.0.orig/src/remote/test_libvirtd.aug.in -+++ libvirt-7.10.0/src/remote/test_libvirtd.aug.in +--- libvirt-8.0.0.orig/src/remote/test_libvirtd.aug.in ++++ libvirt-8.0.0/src/remote/test_libvirtd.aug.in @@ -3,7 +3,7 @@ module Test_@DAEMON_NAME@ = test @DAEMON_NAME_UC@.lns get conf = diff --git a/suse-libxl-disable-autoballoon.patch b/suse-libxl-disable-autoballoon.patch index 3589470..3a8d9dc 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-7.10.0/src/libxl/libxl.conf +Index: libvirt-8.0.0/src/libxl/libxl.conf =================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl.conf -+++ libvirt-7.10.0/src/libxl/libxl.conf +--- libvirt-8.0.0.orig/src/libxl/libxl.conf ++++ libvirt-8.0.0/src/libxl/libxl.conf @@ -4,12 +4,11 @@ # Enable autoballooning of domain0 @@ -27,10 +27,10 @@ Index: libvirt-7.10.0/src/libxl/libxl.conf # In order to prevent accidentally starting two domains that -Index: libvirt-7.10.0/src/libxl/libxl_conf.c +Index: libvirt-8.0.0/src/libxl/libxl_conf.c =================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_conf.c -+++ libvirt-7.10.0/src/libxl/libxl_conf.c +--- libvirt-8.0.0.orig/src/libxl/libxl_conf.c ++++ libvirt-8.0.0/src/libxl/libxl_conf.c @@ -1746,15 +1746,12 @@ libxlMakeBuildInfoVfb(virPortAllocatorRa /* * Get domain0 autoballoon configuration. Honor user-specified @@ -66,10 +66,10 @@ Index: libvirt-7.10.0/src/libxl/libxl_conf.c return 0; } -Index: libvirt-7.10.0/src/libxl/test_libvirtd_libxl.aug.in +Index: libvirt-8.0.0/src/libxl/test_libvirtd_libxl.aug.in =================================================================== ---- libvirt-7.10.0.orig/src/libxl/test_libvirtd_libxl.aug.in -+++ libvirt-7.10.0/src/libxl/test_libvirtd_libxl.aug.in +--- libvirt-8.0.0.orig/src/libxl/test_libvirtd_libxl.aug.in ++++ libvirt-8.0.0/src/libxl/test_libvirtd_libxl.aug.in @@ -2,7 +2,7 @@ module Test_libvirtd_libxl = @CONFIG@ diff --git a/suse-qemu-conf.patch b/suse-qemu-conf.patch index c36e2ba..5401840 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-7.10.0/src/qemu/qemu.conf +Index: libvirt-8.0.0/src/qemu/qemu.conf =================================================================== ---- libvirt-7.10.0.orig/src/qemu/qemu.conf -+++ libvirt-7.10.0/src/qemu/qemu.conf +--- libvirt-8.0.0.orig/src/qemu/qemu.conf ++++ libvirt-8.0.0/src/qemu/qemu.conf @@ -491,10 +491,19 @@ # isolation, but it cannot appear in a list of drivers. # @@ -60,10 +60,10 @@ Index: libvirt-7.10.0/src/qemu/qemu.conf # #lock_manager = "lockd" -Index: libvirt-7.10.0/src/qemu/qemu_conf.c +Index: libvirt-8.0.0/src/qemu/qemu_conf.c =================================================================== ---- libvirt-7.10.0.orig/src/qemu/qemu_conf.c -+++ libvirt-7.10.0/src/qemu/qemu_conf.c +--- libvirt-8.0.0.orig/src/qemu/qemu_conf.c ++++ libvirt-8.0.0/src/qemu/qemu_conf.c @@ -272,7 +272,7 @@ virQEMUDriverConfig *virQEMUDriverConfig cfg->slirpHelperName = g_strdup(QEMU_SLIRP_HELPER); cfg->dbusDaemonName = g_strdup(QEMU_DBUS_DAEMON); @@ -73,10 +73,10 @@ Index: libvirt-7.10.0/src/qemu/qemu_conf.c cfg->securityRequireConfined = false; cfg->keepAliveInterval = 5; -Index: libvirt-7.10.0/src/qemu/test_libvirtd_qemu.aug.in +Index: libvirt-8.0.0/src/qemu/test_libvirtd_qemu.aug.in =================================================================== ---- libvirt-7.10.0.orig/src/qemu/test_libvirtd_qemu.aug.in -+++ libvirt-7.10.0/src/qemu/test_libvirtd_qemu.aug.in +--- libvirt-8.0.0.orig/src/qemu/test_libvirtd_qemu.aug.in ++++ libvirt-8.0.0/src/qemu/test_libvirtd_qemu.aug.in @@ -45,6 +45,7 @@ module Test_libvirtd_qemu = { "remote_websocket_port_min" = "5700" } { "remote_websocket_port_max" = "65535" } diff --git a/suse-qemu-ovmf-paths.patch b/suse-qemu-ovmf-paths.patch index abcdffb..6b49c86 100644 --- a/suse-qemu-ovmf-paths.patch +++ b/suse-qemu-ovmf-paths.patch @@ -5,10 +5,10 @@ advertised and used by libvirt are automatically detected. Until upstream removes the old DEFAULT_LOADER_NVRAM approach and associated code, this patch will stay. -Index: libvirt-7.10.0/src/qemu/qemu.conf +Index: libvirt-8.0.0/src/qemu/qemu.conf =================================================================== ---- libvirt-7.10.0.orig/src/qemu/qemu.conf -+++ libvirt-7.10.0/src/qemu/qemu.conf +--- libvirt-8.0.0.orig/src/qemu/qemu.conf ++++ libvirt-8.0.0/src/qemu/qemu.conf @@ -857,10 +857,9 @@ # for x86_64 and i686, but it's AAVMF for aarch64. The libvirt default # follows this scheme. @@ -23,10 +23,10 @@ Index: libvirt-7.10.0/src/qemu/qemu.conf #] # The backend to use for handling stdout/stderr output from -Index: libvirt-7.10.0/src/qemu/qemu_conf.c +Index: libvirt-8.0.0/src/qemu/qemu_conf.c =================================================================== ---- libvirt-7.10.0.orig/src/qemu/qemu_conf.c -+++ libvirt-7.10.0/src/qemu/qemu_conf.c +--- libvirt-8.0.0.orig/src/qemu/qemu_conf.c ++++ libvirt-8.0.0/src/qemu/qemu_conf.c @@ -98,10 +98,9 @@ qemuDriverUnlock(virQEMUDriver *driver) #ifndef DEFAULT_LOADER_NVRAM @@ -41,10 +41,10 @@ Index: libvirt-7.10.0/src/qemu/qemu_conf.c #endif -Index: libvirt-7.10.0/src/security/virt-aa-helper.c +Index: libvirt-8.0.0/src/security/virt-aa-helper.c =================================================================== ---- libvirt-7.10.0.orig/src/security/virt-aa-helper.c -+++ libvirt-7.10.0/src/security/virt-aa-helper.c +--- libvirt-8.0.0.orig/src/security/virt-aa-helper.c ++++ libvirt-8.0.0/src/security/virt-aa-helper.c @@ -480,7 +480,8 @@ valid_path(const char *path, const bool "/usr/share/ovmf/", /* for OVMF images */ "/usr/share/AAVMF/", /* for AAVMF images */ @@ -55,10 +55,10 @@ Index: libvirt-7.10.0/src/security/virt-aa-helper.c }; /* override the above with these */ const char * const override[] = { -Index: libvirt-7.10.0/src/qemu/test_libvirtd_qemu.aug.in +Index: libvirt-8.0.0/src/qemu/test_libvirtd_qemu.aug.in =================================================================== ---- libvirt-7.10.0.orig/src/qemu/test_libvirtd_qemu.aug.in -+++ libvirt-7.10.0/src/qemu/test_libvirtd_qemu.aug.in +--- libvirt-8.0.0.orig/src/qemu/test_libvirtd_qemu.aug.in ++++ libvirt-8.0.0/src/qemu/test_libvirtd_qemu.aug.in @@ -96,10 +96,9 @@ module Test_libvirtd_qemu = { "migration_port_max" = "49215" } { "log_timestamp" = "0" } diff --git a/suse-xen-ovmf-paths.patch b/suse-xen-ovmf-paths.patch index 974240a..c247d47 100644 --- a/suse-xen-ovmf-paths.patch +++ b/suse-xen-ovmf-paths.patch @@ -5,10 +5,10 @@ June 2021 ovmf only supports one firmware for Xen. This patch adjusts the firmware path to match the one provided by the ovmf package. -Index: libvirt-7.10.0/src/libxl/libxl_conf.c +Index: libvirt-8.0.0/src/libxl/libxl_conf.c =================================================================== ---- libvirt-7.10.0.orig/src/libxl/libxl_conf.c -+++ libvirt-7.10.0/src/libxl/libxl_conf.c +--- libvirt-8.0.0.orig/src/libxl/libxl_conf.c ++++ libvirt-8.0.0/src/libxl/libxl_conf.c @@ -1797,7 +1797,7 @@ libxlDriverConfigNew(void) cfg->firmwares = g_new0(virFirmware *, 1); cfg->nfirmwares = 1; diff --git a/virt-create-rootfs.patch b/virt-create-rootfs.patch index 48aa5e8..22b773f 100644 --- a/virt-create-rootfs.patch +++ b/virt-create-rootfs.patch @@ -1,7 +1,7 @@ -Index: libvirt-7.10.0/tools/virt-create-rootfs +Index: libvirt-8.0.0/tools/virt-create-rootfs =================================================================== --- /dev/null -+++ libvirt-7.10.0/tools/virt-create-rootfs ++++ libvirt-8.0.0/tools/virt-create-rootfs @@ -0,0 +1,236 @@ +#!/bin/sh +set -e @@ -239,10 +239,10 @@ Index: libvirt-7.10.0/tools/virt-create-rootfs + echo "pts/0" >> "$ROOT/etc/securetty" + chroot "$ROOT" /usr/bin/passwd +fi -Index: libvirt-7.10.0/docs/manpages/virt-create-rootfs.rst +Index: libvirt-8.0.0/docs/manpages/virt-create-rootfs.rst =================================================================== --- /dev/null -+++ libvirt-7.10.0/docs/manpages/virt-create-rootfs.rst ++++ libvirt-8.0.0/docs/manpages/virt-create-rootfs.rst @@ -0,0 +1,88 @@ +================== +virt-create-rootfs @@ -332,22 +332,22 @@ Index: libvirt-7.10.0/docs/manpages/virt-create-rootfs.rst +======== + +virsh(1), `https://libvirt.org/ `_ -Index: libvirt-7.10.0/docs/manpages/meson.build +Index: libvirt-8.0.0/docs/manpages/meson.build =================================================================== ---- libvirt-7.10.0.orig/docs/manpages/meson.build -+++ libvirt-7.10.0/docs/manpages/meson.build -@@ -19,6 +19,7 @@ docs_man_files = [ +--- libvirt-8.0.0.orig/docs/manpages/meson.build ++++ libvirt-8.0.0/docs/manpages/meson.build +@@ -20,6 +20,7 @@ docs_man_files = [ { 'name': 'virt-pki-validate', 'section': '1', 'install': true }, { 'name': 'virt-qemu-run', 'section': '1', 'install': conf.has('WITH_QEMU') }, { 'name': 'virt-xml-validate', 'section': '1', 'install': true }, + { 'name': 'virt-create-rootfs', 'section': '1', 'install': true }, + { 'name': 'libvirt-guests', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') }, { 'name': 'libvirtd', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') }, - { 'name': 'virt-sanlock-cleanup', 'section': '8', 'install': conf.has('WITH_SANLOCK') }, -Index: libvirt-7.10.0/tools/meson.build +Index: libvirt-8.0.0/tools/meson.build =================================================================== ---- libvirt-7.10.0.orig/tools/meson.build -+++ libvirt-7.10.0/tools/meson.build +--- libvirt-8.0.0.orig/tools/meson.build ++++ libvirt-8.0.0/tools/meson.build @@ -154,6 +154,8 @@ else virsh_icon_res = [] endif