diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-04-12 03:41:30 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-04-12 03:41:30 +0100 |
commit | 623ee73d661e5ed8475cb264511f683407d87365 (patch) | |
tree | 993eb27c93ec7a2d2d19550300d888fc1fed9e69 /app-emulation/libvirt/files | |
parent | ceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff) |
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'app-emulation/libvirt/files')
13 files changed, 487 insertions, 806 deletions
diff --git a/app-emulation/libvirt/files/README.gentoo-r2 b/app-emulation/libvirt/files/README.gentoo-r3 index 6d6fb18ed3c8..1fec12f0c025 100644 --- a/app-emulation/libvirt/files/README.gentoo-r2 +++ b/app-emulation/libvirt/files/README.gentoo-r3 @@ -36,8 +36,8 @@ For openrc users: For systemd users: - Please use /etc/systemd/system/libvirtd.service.d/00gentoo.conf - to control the '--listen' parameter for libvirtd. + The '--listen' parameter is unavailable when libvirtd is run as a + systemd unit. The configuration for the 'libvirt-guests.service' is found under /etc/libvirt/libvirt-guests.conf" diff --git a/app-emulation/libvirt/files/libvirt-5.2.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.2.0-do-not-use-sysconf.patch deleted file mode 100644 index 292af16b4915..000000000000 --- a/app-emulation/libvirt/files/libvirt-5.2.0-do-not-use-sysconf.patch +++ /dev/null @@ -1,170 +0,0 @@ -From 525d89d39f78a4099508f47a58c4ab65d1e59c0a Mon Sep 17 00:00:00 2001 -Message-Id: <525d89d39f78a4099508f47a58c4ab65d1e59c0a.1552736006.git.mprivozn@redhat.com> -From: Michal Privoznik <mprivozn@redhat.com> -Date: Sat, 16 Mar 2019 12:33:00 +0100 -Subject: [PATCH] gentoo: do not use sysconf - -Signed-off-by: Michal Privoznik <mprivozn@redhat.com> ---- - src/Makefile.am | 21 ++------------------- - src/locking/virtlockd.service.in | 3 +-- - src/logging/virtlogd.service.in | 3 +-- - src/remote/libvirtd.service.in | 3 +-- - tools/Makefile.am | 13 ++----------- - tools/libvirt-guests.service.in | 2 +- - tools/libvirt-guests.sysconf | 7 +++++++ - 7 files changed, 15 insertions(+), 37 deletions(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index a73f43c483..47dd55c112 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -747,23 +747,6 @@ endif WITH_SETUID_RPC_CLIENT - - EXTRA_DIST += $(SYSCONF_FILES) - --install-sysconfig: -- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig -- for f in $(SYSCONF_FILES:%.sysconf=%) ; \ -- do \ -- tgt=`basename $$f`; \ -- $(INSTALL_DATA) $(srcdir)/$$f.sysconf \ -- $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \ -- done -- --uninstall-sysconfig: -- for f in $(SYSCONF_FILES:%.sysconf=%) ; \ -- do \ -- tgt=`basename $$f`; \ -- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \ -- done -- rmdir $(DESTDIR)$(sysconfdir)/sysconfig || : -- - LOGROTATE_FILES := $(LOGROTATE_FILES_IN:remote/%.in=%) - - EXTRA_DIST += $(LOGROTATE_FILES_IN) -@@ -822,14 +805,14 @@ SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%)) - BUILT_SOURCES += $(SYSTEMD_UNIT_FILES) - DISTCLEANFILES += $(SYSTEMD_UNIT_FILES) - --install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig -+install-systemd: $(SYSTEMD_UNIT_FILES) - $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) - for f in $(SYSTEMD_UNIT_FILES); \ - do \ - $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \ - done - --uninstall-systemd: uninstall-sysconfig -+uninstall-systemd: - rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%) - rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || : - -diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in -index 3c9d587032..2449b201d9 100644 ---- a/src/locking/virtlockd.service.in -+++ b/src/locking/virtlockd.service.in -@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8) - Documentation=https://libvirt.org - - [Service] --EnvironmentFile=-/etc/sysconfig/virtlockd --ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS -+ExecStart=@sbindir@/virtlockd - ExecReload=/bin/kill -USR1 $MAINPID - # Loosing the locks is a really bad thing that will - # cause the machine to be fenced (rebooted), so make -diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in -index 3d9ae36150..43736191d5 100644 ---- a/src/logging/virtlogd.service.in -+++ b/src/logging/virtlogd.service.in -@@ -7,8 +7,7 @@ Documentation=man:virtlogd(8) - Documentation=https://libvirt.org - - [Service] --EnvironmentFile=-/etc/sysconfig/virtlogd --ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS -+ExecStart=@sbindir@/virtlogd - ExecReload=/bin/kill -USR1 $MAINPID - # Loosing the logs is a really bad thing that will - # cause the machine to be fenced (rebooted), so make -diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in -index 7f689e08a8..239beeced9 100644 ---- a/src/remote/libvirtd.service.in -+++ b/src/remote/libvirtd.service.in -@@ -22,8 +22,7 @@ Documentation=https://libvirt.org - - [Service] - Type=notify --EnvironmentFile=-/etc/sysconfig/libvirtd --ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS -+ExecStart=@sbindir@/libvirtd - ExecReload=/bin/kill -HUP $MAINPID - KillMode=process - Restart=on-failure -diff --git a/tools/Makefile.am b/tools/Makefile.am -index c6064dee08..40f41ddb38 100644 ---- a/tools/Makefile.am -+++ b/tools/Makefile.am -@@ -333,15 +333,6 @@ install-data-local: install-systemd install-nss \ - uninstall-local: uninstall-systemd uninstall-nss \ - uninstall-bash-completion - --install-sysconfig: -- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig -- $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \ -- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests -- --uninstall-sysconfig: -- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests -- rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||: -- - EXTRA_DIST += libvirt-guests.sh.in - - libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status -@@ -361,12 +352,12 @@ EXTRA_DIST += libvirt-guests.service.in - SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system - - if LIBVIRT_INIT_SCRIPT_SYSTEMD --install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh -+install-systemd: libvirt-guests.service libvirt-guests.sh - $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) - $(INSTALL_DATA) libvirt-guests.service \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service - --uninstall-systemd: uninstall-sysconfig -+uninstall-systemd: - rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service - rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||: - -diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in -index 491ca62138..f0f417bffb 100644 ---- a/tools/libvirt-guests.service.in -+++ b/tools/libvirt-guests.service.in -@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8) - Documentation=https://libvirt.org - - [Service] --EnvironmentFile=-/etc/sysconfig/libvirt-guests -+EnvironmentFile=-/etc/libvirt/libvirt-guests.conf - # Hack just call traditional service until we factor - # out the code - ExecStart=@libexecdir@/libvirt-guests.sh start -diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf -index 669b046507..45b0b9ea46 100644 ---- a/tools/libvirt-guests.sysconf -+++ b/tools/libvirt-guests.sysconf -@@ -1,3 +1,10 @@ -+# -+# Warning: This configuration file is only sourced by the systemd -+# libvirt-guests.service unit. The coresponding openrc facility is in -+# /etc/init.d/libvirtd and /etc/conf.d/libvirtd -+# -+ -+ - # URIs to check for running guests - # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system' - #URIS=default --- -2.19.2 - diff --git a/app-emulation/libvirt/files/libvirt-5.2.0-md-clear.patch b/app-emulation/libvirt/files/libvirt-5.2.0-md-clear.patch deleted file mode 100644 index cd14d0d539ae..000000000000 --- a/app-emulation/libvirt/files/libvirt-5.2.0-md-clear.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 538d873571d7a682852dc1d70e5f4478f4d64e85 Mon Sep 17 00:00:00 2001 -From: Jiri Denemark <jdenemar@redhat.com> -Date: Fri, 5 Apr 2019 15:11:20 +0200 -Subject: [PATCH] cpu_map: Define md-clear CPUID bit -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091 - -The bit is set when microcode provides the mechanism to invoke a flush -of various exploitable CPU buffers by invoking the VERW instruction. - -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> -Signed-off-by: Jiri Denemark <jdenemar@redhat.com> -Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> ---- - src/cpu_map/x86_features.xml | 3 +++ - -diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml -index efcc10b1ae..370807f88e 100644 ---- a/src/cpu_map/x86_features.xml -+++ b/src/cpu_map/x86_features.xml -@@ -320,6 +320,9 @@ - <feature name='avx512-4fmaps'> - <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000008'/> - </feature> -+ <feature name='md-clear'> <!-- md_clear --> -+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000400'/> -+ </feature> - <feature name='pconfig'> - <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00040000'/> - </feature> --- -2.21.0 - diff --git a/app-emulation/libvirt/files/libvirt-5.6.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.6.0-do-not-use-sysconf.patch deleted file mode 100644 index b847392cc13d..000000000000 --- a/app-emulation/libvirt/files/libvirt-5.6.0-do-not-use-sysconf.patch +++ /dev/null @@ -1,174 +0,0 @@ -From 8b27863cd4bd4eebefe6f39b42c181d073b457ff Mon Sep 17 00:00:00 2001 -Message-Id: <8b27863cd4bd4eebefe6f39b42c181d073b457ff.1564650738.git.mprivozn@redhat.com> -From: Michal Privoznik <mprivozn@redhat.com> -Date: Sat, 16 Mar 2019 12:33:00 +0100 -Subject: [PATCH] gentoo: do not use sysconf - -Signed-off-by: Michal Privoznik <mprivozn@redhat.com> ---- - src/Makefile.am | 21 ++------------------- - src/locking/virtlockd.service.in | 3 +-- - src/logging/virtlogd.service.in | 3 +-- - src/remote/libvirtd.service.in | 3 +-- - tools/Makefile.am | 13 ++----------- - tools/libvirt-guests.service.in | 2 +- - tools/libvirt-guests.sysconf | 7 +++++++ - 7 files changed, 15 insertions(+), 37 deletions(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index 4a8cae11dc..6c93435066 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -750,23 +750,6 @@ endif WITH_SETUID_RPC_CLIENT - - EXTRA_DIST += $(SYSCONF_FILES) - --install-sysconfig: -- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig -- for f in $(SYSCONF_FILES:%.sysconf=%) ; \ -- do \ -- tgt=`basename $$f`; \ -- $(INSTALL_DATA) $(srcdir)/$$f.sysconf \ -- $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \ -- done -- --uninstall-sysconfig: -- for f in $(SYSCONF_FILES:%.sysconf=%) ; \ -- do \ -- tgt=`basename $$f`; \ -- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \ -- done -- rmdir $(DESTDIR)$(sysconfdir)/sysconfig || : -- - LOGROTATE_FILES := $(LOGROTATE_FILES_IN:remote/%.in=%) - - EXTRA_DIST += $(LOGROTATE_FILES_IN) -@@ -825,14 +808,14 @@ SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%)) - BUILT_SOURCES += $(SYSTEMD_UNIT_FILES) - DISTCLEANFILES += $(SYSTEMD_UNIT_FILES) - --install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig -+install-systemd: $(SYSTEMD_UNIT_FILES) - $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) - for f in $(SYSTEMD_UNIT_FILES); \ - do \ - $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \ - done - --uninstall-systemd: uninstall-sysconfig -+uninstall-systemd: - rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%) - rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || : - -diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in -index 3c9d587032..2449b201d9 100644 ---- a/src/locking/virtlockd.service.in -+++ b/src/locking/virtlockd.service.in -@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8) - Documentation=https://libvirt.org - - [Service] --EnvironmentFile=-/etc/sysconfig/virtlockd --ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS -+ExecStart=@sbindir@/virtlockd - ExecReload=/bin/kill -USR1 $MAINPID - # Loosing the locks is a really bad thing that will - # cause the machine to be fenced (rebooted), so make -diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in -index 3d9ae36150..43736191d5 100644 ---- a/src/logging/virtlogd.service.in -+++ b/src/logging/virtlogd.service.in -@@ -7,8 +7,7 @@ Documentation=man:virtlogd(8) - Documentation=https://libvirt.org - - [Service] --EnvironmentFile=-/etc/sysconfig/virtlogd --ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS -+ExecStart=@sbindir@/virtlogd - ExecReload=/bin/kill -USR1 $MAINPID - # Loosing the logs is a really bad thing that will - # cause the machine to be fenced (rebooted), so make -diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in -index 3ddf0e229b..a38f2b08fa 100644 ---- a/src/remote/libvirtd.service.in -+++ b/src/remote/libvirtd.service.in -@@ -20,12 +20,11 @@ Documentation=https://libvirt.org - - [Service] - Type=notify --EnvironmentFile=-/etc/sysconfig/libvirtd - # libvirtd.service is set to run on boot so that autostart of - # VMs can be performed. We don't want it to stick around if - # unused though, so we set a timeout. The socket activation - # then ensures it gets started again if anything needs it --ExecStart=@sbindir@/libvirtd --timeout 120 $LIBVIRTD_ARGS -+ExecStart=@sbindir@/libvirtd --timeout 120 - ExecReload=/bin/kill -HUP $MAINPID - KillMode=process - Restart=on-failure -diff --git a/tools/Makefile.am b/tools/Makefile.am -index 2807b9f6fd..cde5dba193 100644 ---- a/tools/Makefile.am -+++ b/tools/Makefile.am -@@ -334,15 +334,6 @@ install-data-local: install-systemd install-nss \ - uninstall-local: uninstall-systemd uninstall-nss \ - uninstall-bash-completion - --install-sysconfig: -- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig -- $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \ -- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests -- --uninstall-sysconfig: -- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests -- rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||: -- - EXTRA_DIST += libvirt-guests.sh.in - - libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status -@@ -362,12 +353,12 @@ EXTRA_DIST += libvirt-guests.service.in - SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system - - if LIBVIRT_INIT_SCRIPT_SYSTEMD --install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh -+install-systemd: libvirt-guests.service libvirt-guests.sh - $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) - $(INSTALL_DATA) libvirt-guests.service \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service - --uninstall-systemd: uninstall-sysconfig -+uninstall-systemd: - rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service - rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||: - -diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in -index 491ca62138..f0f417bffb 100644 ---- a/tools/libvirt-guests.service.in -+++ b/tools/libvirt-guests.service.in -@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8) - Documentation=https://libvirt.org - - [Service] --EnvironmentFile=-/etc/sysconfig/libvirt-guests -+EnvironmentFile=-/etc/libvirt/libvirt-guests.conf - # Hack just call traditional service until we factor - # out the code - ExecStart=@libexecdir@/libvirt-guests.sh start -diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf -index 669b046507..45b0b9ea46 100644 ---- a/tools/libvirt-guests.sysconf -+++ b/tools/libvirt-guests.sysconf -@@ -1,3 +1,10 @@ -+# -+# Warning: This configuration file is only sourced by the systemd -+# libvirt-guests.service unit. The coresponding openrc facility is in -+# /etc/init.d/libvirtd and /etc/conf.d/libvirtd -+# -+ -+ - # URIs to check for running guests - # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system' - #URIS=default --- -2.21.0 - diff --git a/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch deleted file mode 100644 index 2ffffe492db3..000000000000 --- a/app-emulation/libvirt/files/libvirt-5.7.0-do-not-use-sysconf.patch +++ /dev/null @@ -1,170 +0,0 @@ -From e387be8671d0de88632d063e2ecd2c12eb1b2fdf Mon Sep 17 00:00:00 2001 -Message-Id: <e387be8671d0de88632d063e2ecd2c12eb1b2fdf.1567522968.git.mprivozn@redhat.com> -From: Michal Privoznik <mprivozn@redhat.com> -Date: Sat, 16 Mar 2019 12:33:00 +0100 -Subject: [PATCH] gentoo: do not use sysconf - -Signed-off-by: Michal Privoznik <mprivozn@redhat.com> ---- - src/Makefile.am | 21 ++------------------- - src/locking/virtlockd.service.in | 3 +-- - src/logging/virtlogd.service.in | 3 +-- - src/remote/libvirtd.service.in | 3 +-- - tools/Makefile.am | 13 ++----------- - tools/libvirt-guests.service.in | 2 +- - tools/libvirt-guests.sysconf | 7 +++++++ - 7 files changed, 15 insertions(+), 37 deletions(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index f5093b9c90..e2ebc51c87 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -672,23 +672,6 @@ libvirt_lxc_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD) - - EXTRA_DIST += $(SYSCONF_FILES) - --install-sysconfig: -- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig -- for f in $(SYSCONF_FILES:%.sysconf=%) ; \ -- do \ -- tgt=`basename $$f`; \ -- $(INSTALL_DATA) $(srcdir)/$$f.sysconf \ -- $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \ -- done -- --uninstall-sysconfig: -- for f in $(SYSCONF_FILES:%.sysconf=%) ; \ -- do \ -- tgt=`basename $$f`; \ -- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \ -- done -- rmdir $(DESTDIR)$(sysconfdir)/sysconfig || : -- - LOGROTATE_FILES := $(LOGROTATE_FILES_IN:remote/%.in=%) - - EXTRA_DIST += $(LOGROTATE_FILES_IN) -@@ -746,14 +729,14 @@ SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system - BUILT_SOURCES += $(SYSTEMD_UNIT_FILES) - DISTCLEANFILES += $(SYSTEMD_UNIT_FILES) - --install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig -+install-systemd: $(SYSTEMD_UNIT_FILES) - $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) - for f in $(SYSTEMD_UNIT_FILES); \ - do \ - $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \ - done - --uninstall-systemd: uninstall-sysconfig -+uninstall-systemd: - rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%) - rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || : - -diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in -index e7f8057c06..2449b201d9 100644 ---- a/src/locking/virtlockd.service.in -+++ b/src/locking/virtlockd.service.in -@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8) - Documentation=https://libvirt.org - - [Service] --EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd --ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS -+ExecStart=@sbindir@/virtlockd - ExecReload=/bin/kill -USR1 $MAINPID - # Loosing the locks is a really bad thing that will - # cause the machine to be fenced (rebooted), so make -diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in -index daff48e67d..43736191d5 100644 ---- a/src/logging/virtlogd.service.in -+++ b/src/logging/virtlogd.service.in -@@ -7,8 +7,7 @@ Documentation=man:virtlogd(8) - Documentation=https://libvirt.org - - [Service] --EnvironmentFile=-@sysconfdir@/sysconfig/virtlogd --ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS -+ExecStart=@sbindir@/virtlogd - ExecReload=/bin/kill -USR1 $MAINPID - # Loosing the logs is a really bad thing that will - # cause the machine to be fenced (rebooted), so make -diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in -index 9c8c54a2ef..a042280cef 100644 ---- a/src/remote/libvirtd.service.in -+++ b/src/remote/libvirtd.service.in -@@ -25,8 +25,7 @@ Documentation=https://libvirt.org - - [Service] - Type=notify --EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd --ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS -+ExecStart=@sbindir@/libvirtd - ExecReload=/bin/kill -HUP $MAINPID - KillMode=process - Restart=on-failure -diff --git a/tools/Makefile.am b/tools/Makefile.am -index 29fdbfe846..04b21eb54a 100644 ---- a/tools/Makefile.am -+++ b/tools/Makefile.am -@@ -360,15 +360,6 @@ install-data-local: install-systemd install-nss \ - uninstall-local: uninstall-systemd uninstall-nss \ - uninstall-bash-completion - --install-sysconfig: -- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig -- $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \ -- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests -- --uninstall-sysconfig: -- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests -- rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||: -- - EXTRA_DIST += libvirt-guests.sh.in - - libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status -@@ -388,12 +379,12 @@ EXTRA_DIST += libvirt-guests.service.in - SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system - - if LIBVIRT_INIT_SCRIPT_SYSTEMD --install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh -+install-systemd: libvirt-guests.service libvirt-guests.sh - $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) - $(INSTALL_DATA) libvirt-guests.service \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service - --uninstall-systemd: uninstall-sysconfig -+uninstall-systemd: - rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service - rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||: - -diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in -index 10c664016a..f0f417bffb 100644 ---- a/tools/libvirt-guests.service.in -+++ b/tools/libvirt-guests.service.in -@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8) - Documentation=https://libvirt.org - - [Service] --EnvironmentFile=-@sysconfdir@/sysconfig/libvirt-guests -+EnvironmentFile=-/etc/libvirt/libvirt-guests.conf - # Hack just call traditional service until we factor - # out the code - ExecStart=@libexecdir@/libvirt-guests.sh start -diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf -index 669b046507..45b0b9ea46 100644 ---- a/tools/libvirt-guests.sysconf -+++ b/tools/libvirt-guests.sysconf -@@ -1,3 +1,10 @@ -+# -+# Warning: This configuration file is only sourced by the systemd -+# libvirt-guests.service unit. The coresponding openrc facility is in -+# /etc/init.d/libvirtd and /etc/conf.d/libvirtd -+# -+ -+ - # URIs to check for running guests - # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system' - #URIS=default --- -2.21.0 - diff --git a/app-emulation/libvirt/files/libvirt-6.0.0-qemu-end-the-agent-job-in-qemuDomainSetTimeAgent.patch b/app-emulation/libvirt/files/libvirt-6.0.0-qemu-end-the-agent-job-in-qemuDomainSetTimeAgent.patch new file mode 100644 index 000000000000..62f89a378bcc --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-6.0.0-qemu-end-the-agent-job-in-qemuDomainSetTimeAgent.patch @@ -0,0 +1,39 @@ +From ba756e8d0928ac4ddb7decd1033de2121201d941 Mon Sep 17 00:00:00 2001 +Message-Id: <ba756e8d0928ac4ddb7decd1033de2121201d941.1585986243.git.mprivozn@redhat.com> +From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com> +Date: Mon, 20 Jan 2020 07:55:48 +0100 +Subject: [PATCH] qemu: end the agent job in qemuDomainSetTimeAgent +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This function grabs an agent job but ends a monitor job. +End the agent job instead. + +https://bugzilla.redhat.com/show_bug.cgi?id=1792723 + +Signed-off-by: Ján Tomko <jtomko@redhat.com> +Reported-by: Dan Zheng <dzheng@redhat.com> +Fixes: e005c95f56fee9ed780be7f8db103d690bd34cbd +(cherry picked from commit d61f95cf6a6fbd564e104c168d325581acd9cd8d) +Signed-off-by: Michal Privoznik <mprivozn@redhat.com> +--- + src/qemu/qemu_driver.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c +index d6b1e9f00c..48cd5b95d9 100644 +--- a/src/qemu/qemu_driver.c ++++ b/src/qemu/qemu_driver.c +@@ -20376,7 +20376,7 @@ qemuDomainSetTimeAgent(virQEMUDriverPtr driver, + qemuDomainObjExitAgent(vm, agent); + + endjob: +- qemuDomainObjEndJob(driver, vm); ++ qemuDomainObjEndAgentJob(vm); + return ret; + } + +-- +2.24.1 + diff --git a/app-emulation/libvirt/files/libvirt-6.1.0-fix-paths-for-apparmor.patch b/app-emulation/libvirt/files/libvirt-6.1.0-fix-paths-for-apparmor.patch new file mode 100644 index 000000000000..02592ea4a5c3 --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-6.1.0-fix-paths-for-apparmor.patch @@ -0,0 +1,70 @@ +diff --git a/src/Makefile.in b/src/Makefile.in +index 36bd280..07cebdf 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -4473,7 +4473,7 @@ SECURITY_DRIVER_APPARMOR_SOURCES = \ + $(NULL) + + SECURITY_DRIVER_APPARMOR_GENERATED_PROFILES_IN = \ +- security/apparmor/usr.lib.libvirt.virt-aa-helper.in \ ++ security/apparmor/usr.libexec.virt-aa-helper.in \ + security/apparmor/usr.sbin.libvirtd.in \ + $(NULL) + +@@ -13821,11 +13821,11 @@ security/apparmor/%: $(srcdir)/security/apparmor/%.in + @WITH_APPARMOR_PROFILES_TRUE@install-apparmor-local: $(SECURITY_DRIVER_APPARMOR_GENERATED_PROFILES) + @WITH_APPARMOR_PROFILES_TRUE@ $(MKDIR_P) "$(APPARMOR_LOCAL_DIR)" + @WITH_APPARMOR_PROFILES_TRUE@ echo "# Site-specific additions and overrides for \ +-@WITH_APPARMOR_PROFILES_TRUE@ 'usr.lib.libvirt.virt-aa-helper'" \ +-@WITH_APPARMOR_PROFILES_TRUE@ >"$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper" ++@WITH_APPARMOR_PROFILES_TRUE@ 'usr.libexec.virt-aa-helper'" \ ++@WITH_APPARMOR_PROFILES_TRUE@ >"$(APPARMOR_LOCAL_DIR)/usr.libexec.virt-aa-helper" + + @WITH_APPARMOR_PROFILES_TRUE@uninstall-apparmor-local: +-@WITH_APPARMOR_PROFILES_TRUE@ rm -f "$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper" ++@WITH_APPARMOR_PROFILES_TRUE@ rm -f "$(APPARMOR_LOCAL_DIR)/usr.libexec.virt-aa-helper" + @WITH_APPARMOR_PROFILES_TRUE@ rmdir "$(APPARMOR_LOCAL_DIR)" || : + + $(ACCESS_DRIVER_POLKIT_POLICY): $(srcdir)/access/viraccessperm.h \ +diff --git a/src/security/Makefile.inc.am b/src/security/Makefile.inc.am +index 5f2f4c8..d457cc6 100644 +--- a/src/security/Makefile.inc.am ++++ b/src/security/Makefile.inc.am +@@ -31,7 +31,7 @@ SECURITY_DRIVER_APPARMOR_SOURCES = \ + $(NULL) + + SECURITY_DRIVER_APPARMOR_GENERATED_PROFILES_IN = \ +- security/apparmor/usr.lib.libvirt.virt-aa-helper.in \ ++ security/apparmor/usr.libexec.virt-aa-helper.in \ + security/apparmor/usr.sbin.libvirtd.in \ + $(NULL) + +@@ -130,11 +130,11 @@ APPARMOR_LOCAL_DIR = "$(DESTDIR)$(apparmordir)/local" + install-apparmor-local: $(SECURITY_DRIVER_APPARMOR_GENERATED_PROFILES) + $(MKDIR_P) "$(APPARMOR_LOCAL_DIR)" + echo "# Site-specific additions and overrides for \ +- 'usr.lib.libvirt.virt-aa-helper'" \ +- >"$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper" ++ 'usr.libexec.virt-aa-helper'" \ ++ >"$(APPARMOR_LOCAL_DIR)/usr.libexec.virt-aa-helper" + + uninstall-apparmor-local: +- rm -f "$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper" ++ rm -f "$(APPARMOR_LOCAL_DIR)/usr.libexec.virt-aa-helper" + rmdir "$(APPARMOR_LOCAL_DIR)" || : + + INSTALL_DATA_LOCAL += install-apparmor-local +diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in b/src/security/apparmor/usr.libexec.virt-aa-helper.in +similarity index 97% +rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in +rename to src/security/apparmor/usr.libexec.virt-aa-helper.in +index dd18c8a..d06f9cb 100644 +--- a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in ++++ b/src/security/apparmor/usr.libexec.virt-aa-helper.in +@@ -69,5 +69,5 @@ profile virt-aa-helper @libexecdir@/virt-aa-helper { + /**.[iI][sS][oO] r, + /**/disk{,.*} r, + +- #include <local/usr.lib.libvirt.virt-aa-helper> ++ #include <local/usr.libexec.virt-aa-helper> + } diff --git a/app-emulation/libvirt/files/libvirt-6.2.0-do-not-use-sysconfig.patch b/app-emulation/libvirt/files/libvirt-6.2.0-do-not-use-sysconfig.patch new file mode 100644 index 000000000000..3dc2588b7bfd --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-6.2.0-do-not-use-sysconfig.patch @@ -0,0 +1,325 @@ +From c378ab3e7fe84ac69ad787c099f24fd32dbbf6e4 Mon Sep 17 00:00:00 2001 +Message-Id: <c378ab3e7fe84ac69ad787c099f24fd32dbbf6e4.1586091631.git.mprivozn@redhat.com> +From: Michal Privoznik <mprivozn@redhat.com> +Date: Sun, 5 Apr 2020 14:41:45 +0200 +Subject: [PATCH] Do not use sysconfig + +Signed-off-by: Michal Privoznik <mprivozn@redhat.com> +--- + src/Makefile.am | 21 ++------------------- + src/interface/virtinterfaced.service.in | 1 - + src/libxl/virtxend.service.in | 1 - + src/locking/virtlockd.service.in | 3 +-- + src/logging/virtlogd.service.in | 3 +-- + src/lxc/virtlxcd.service.in | 1 - + src/network/virtnetworkd.service.in | 1 - + src/node_device/virtnodedevd.service.in | 1 - + src/nwfilter/virtnwfilterd.service.in | 1 - + src/qemu/virtqemud.service.in | 1 - + src/remote/libvirtd.service.in | 3 +-- + src/remote/virtproxyd.service.in | 1 - + src/secret/virtsecretd.service.in | 1 - + src/storage/virtstoraged.service.in | 1 - + src/vbox/virtvboxd.service.in | 1 - + src/vz/virtvzd.service.in | 1 - + tools/Makefile.am | 13 ++----------- + tools/libvirt-guests.service.in | 2 +- + tools/libvirt-guests.sysconf | 6 ++++++ + 19 files changed, 14 insertions(+), 49 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 12dd6b80e1..10f1bb769d 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -522,23 +522,6 @@ EXTRA_DIST += \ + $(SYSCONF_FILES) \ + $(OPENRC_CONF_FILES) + +-install-sysconfig: +- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig +- for f in $(SYSCONF_FILES:%.sysconf=%) ; \ +- do \ +- tgt=`basename $$f`; \ +- $(INSTALL_DATA) $(srcdir)/$$f.sysconf \ +- $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \ +- done +- +-uninstall-sysconfig: +- for f in $(SYSCONF_FILES:%.sysconf=%) ; \ +- do \ +- tgt=`basename $$f`; \ +- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \ +- done +- rmdir $(DESTDIR)$(sysconfdir)/sysconfig || : +- + OPENRC_CONF_DIR = $(sysconfdir)/conf.d + + install-openrc-conf: +@@ -604,14 +587,14 @@ SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system + BUILT_SOURCES += $(SYSTEMD_UNIT_FILES) + DISTCLEANFILES += $(SYSTEMD_UNIT_FILES) + +-install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig ++install-systemd: $(SYSTEMD_UNIT_FILES) + $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) + for f in $(SYSTEMD_UNIT_FILES); \ + do \ + $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \ + done + +-uninstall-systemd: uninstall-sysconfig ++uninstall-systemd: + rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%) + rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || : + +diff --git a/src/interface/virtinterfaced.service.in b/src/interface/virtinterfaced.service.in +index 73d409b81b..2d2c0138f5 100644 +--- a/src/interface/virtinterfaced.service.in ++++ b/src/interface/virtinterfaced.service.in +@@ -13,7 +13,6 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced + ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS + ExecReload=/bin/kill -HUP $MAINPID + Restart=on-failure +diff --git a/src/libxl/virtxend.service.in b/src/libxl/virtxend.service.in +index a863917467..5b2d16f627 100644 +--- a/src/libxl/virtxend.service.in ++++ b/src/libxl/virtxend.service.in +@@ -17,7 +17,6 @@ ConditionPathExists=/proc/xen/capabilities + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/virtxend + ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS + ExecReload=/bin/kill -HUP $MAINPID + Restart=on-failure +diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in +index e7f8057c06..2449b201d9 100644 +--- a/src/locking/virtlockd.service.in ++++ b/src/locking/virtlockd.service.in +@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8) + Documentation=https://libvirt.org + + [Service] +-EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd +-ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS ++ExecStart=@sbindir@/virtlockd + ExecReload=/bin/kill -USR1 $MAINPID + # Loosing the locks is a really bad thing that will + # cause the machine to be fenced (rebooted), so make +diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in +index daff48e67d..43736191d5 100644 +--- a/src/logging/virtlogd.service.in ++++ b/src/logging/virtlogd.service.in +@@ -7,8 +7,7 @@ Documentation=man:virtlogd(8) + Documentation=https://libvirt.org + + [Service] +-EnvironmentFile=-@sysconfdir@/sysconfig/virtlogd +-ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS ++ExecStart=@sbindir@/virtlogd + ExecReload=/bin/kill -USR1 $MAINPID + # Loosing the logs is a really bad thing that will + # cause the machine to be fenced (rebooted), so make +diff --git a/src/lxc/virtlxcd.service.in b/src/lxc/virtlxcd.service.in +index 3af7c1a52d..cff421d988 100644 +--- a/src/lxc/virtlxcd.service.in ++++ b/src/lxc/virtlxcd.service.in +@@ -18,7 +18,6 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd + ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS + ExecReload=/bin/kill -HUP $MAINPID + KillMode=process +diff --git a/src/network/virtnetworkd.service.in b/src/network/virtnetworkd.service.in +index e7f1326945..49fb7b99ff 100644 +--- a/src/network/virtnetworkd.service.in ++++ b/src/network/virtnetworkd.service.in +@@ -13,7 +13,6 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd + ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS + ExecReload=/bin/kill -HUP $MAINPID + Restart=on-failure +diff --git a/src/node_device/virtnodedevd.service.in b/src/node_device/virtnodedevd.service.in +index d2453dd620..847263e8b9 100644 +--- a/src/node_device/virtnodedevd.service.in ++++ b/src/node_device/virtnodedevd.service.in +@@ -13,7 +13,6 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd + ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS + ExecReload=/bin/kill -HUP $MAINPID + Restart=on-failure +diff --git a/src/nwfilter/virtnwfilterd.service.in b/src/nwfilter/virtnwfilterd.service.in +index dda7c01a3d..bb0bf0afa4 100644 +--- a/src/nwfilter/virtnwfilterd.service.in ++++ b/src/nwfilter/virtnwfilterd.service.in +@@ -13,7 +13,6 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd + ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS + ExecReload=/bin/kill -HUP $MAINPID + Restart=on-failure +diff --git a/src/qemu/virtqemud.service.in b/src/qemu/virtqemud.service.in +index 8abc9d3a7f..3539be3c0b 100644 +--- a/src/qemu/virtqemud.service.in ++++ b/src/qemu/virtqemud.service.in +@@ -18,7 +18,6 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud + ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS + ExecReload=/bin/kill -HUP $MAINPID + KillMode=process +diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in +index 90b2cad5b0..d16b11ec8d 100644 +--- a/src/remote/libvirtd.service.in ++++ b/src/remote/libvirtd.service.in +@@ -25,8 +25,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd +-ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS ++ExecStart=@sbindir@/libvirtd + ExecReload=/bin/kill -HUP $MAINPID + KillMode=process + Restart=on-failure +diff --git a/src/remote/virtproxyd.service.in b/src/remote/virtproxyd.service.in +index f43ce9ee6e..9076e638a7 100644 +--- a/src/remote/virtproxyd.service.in ++++ b/src/remote/virtproxyd.service.in +@@ -13,7 +13,6 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd + ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS + ExecReload=/bin/kill -HUP $MAINPID + Restart=on-failure +diff --git a/src/secret/virtsecretd.service.in b/src/secret/virtsecretd.service.in +index 8444142a3a..57e74c2d38 100644 +--- a/src/secret/virtsecretd.service.in ++++ b/src/secret/virtsecretd.service.in +@@ -13,7 +13,6 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd + ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS + ExecReload=/bin/kill -HUP $MAINPID + Restart=on-failure +diff --git a/src/storage/virtstoraged.service.in b/src/storage/virtstoraged.service.in +index fc3e9a1b69..a82319b214 100644 +--- a/src/storage/virtstoraged.service.in ++++ b/src/storage/virtstoraged.service.in +@@ -15,7 +15,6 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged + ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS + ExecReload=/bin/kill -HUP $MAINPID + Restart=on-failure +diff --git a/src/vbox/virtvboxd.service.in b/src/vbox/virtvboxd.service.in +index ebb31dde07..21eec57bab 100644 +--- a/src/vbox/virtvboxd.service.in ++++ b/src/vbox/virtvboxd.service.in +@@ -14,7 +14,6 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd + ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS + ExecReload=/bin/kill -HUP $MAINPID + Restart=on-failure +diff --git a/src/vz/virtvzd.service.in b/src/vz/virtvzd.service.in +index f551cb8fbf..99b9b4f1bf 100644 +--- a/src/vz/virtvzd.service.in ++++ b/src/vz/virtvzd.service.in +@@ -14,7 +14,6 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-@sysconfdir@/sysconfig/virtvzd + ExecStart=@sbindir@/virtvzd $VIRTVZD_ARGS + ExecReload=/bin/kill -HUP $MAINPID + Restart=on-failure +diff --git a/tools/Makefile.am b/tools/Makefile.am +index 53df930e0a..598a62ddef 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -294,15 +294,6 @@ install-data-local: install-systemd install-nss \ + uninstall-local: uninstall-systemd uninstall-nss \ + uninstall-bash-completion + +-install-sysconfig: +- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig +- $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \ +- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests +- +-uninstall-sysconfig: +- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests +- rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||: +- + EXTRA_DIST += libvirt-guests.sh.in + + libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status +@@ -322,12 +313,12 @@ EXTRA_DIST += libvirt-guests.service.in + SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system + + if LIBVIRT_INIT_SCRIPT_SYSTEMD +-install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh ++install-systemd: libvirt-guests.service libvirt-guests.sh + $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) + $(INSTALL_DATA) libvirt-guests.service \ + $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service + +-uninstall-systemd: uninstall-sysconfig ++uninstall-systemd: + rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service + rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||: + +diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in +index 10c664016a..f0f417bffb 100644 +--- a/tools/libvirt-guests.service.in ++++ b/tools/libvirt-guests.service.in +@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8) + Documentation=https://libvirt.org + + [Service] +-EnvironmentFile=-@sysconfdir@/sysconfig/libvirt-guests ++EnvironmentFile=-/etc/libvirt/libvirt-guests.conf + # Hack just call traditional service until we factor + # out the code + ExecStart=@libexecdir@/libvirt-guests.sh start +diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf +index 0765efec21..a1a53d8a8d 100644 +--- a/tools/libvirt-guests.sysconf ++++ b/tools/libvirt-guests.sysconf +@@ -1,3 +1,9 @@ ++# ++# Warning: This configuration file is only sourced by the systemd ++# libvirt-guests.service unit. The coresponding openrc facility is in ++# /etc/init.d/libvirtd and /etc/conf.d/libvirtd ++# ++ + # Customizations for the libvirt-guests.service systemd unit + + # URIs to check for running guests +-- +2.24.1 + diff --git a/app-emulation/libvirt/files/libvirt-guests.init-r3 b/app-emulation/libvirt/files/libvirt-guests.init-r3 deleted file mode 100644 index 10797e1b8075..000000000000 --- a/app-emulation/libvirt/files/libvirt-guests.init-r3 +++ /dev/null @@ -1,236 +0,0 @@ -#!/sbin/openrc-run - -description="Virtual Machine Management (libvirt) Guests" - -depend() { - use libvirtd -} - -# set the default to QEMU -[ -z "${LIBVIRT_URIS}" ] && LIBVIRT_URIS="qemu:///system" - -# default to suspending the VM via managedsave -case "${LIBVIRT_SHUTDOWN}" in - managedsave|shutdown|destroy) ;; - *) LIBVIRT_SHUTDOWN="managedsave" ;; -esac - -# default to 500 seconds -[ -z ${LIBVIRT_MAXWAIT} ] && LIBVIRT_MAXWAIT=500 - -gueststatefile="/var/lib/libvirt/libvirt-guests.state" -netstatefile="/var/lib/libvirt/libvirt-net.state" - -do_virsh() { - local hvuri=$1 - shift - - # if unset, default to qemu - [ -z ${hvuri} ] && hvuri="qemu:///system" - # if only qemu was supplied then correct the value - [ "xqemu" = x${hvuri} ] && hvuri="qemu:///system" - - # Silence errors because virsh always throws an error about - # not finding the hypervisor version when connecting to libvirtd - # lastly strip the blank line at the end - LC_ALL=C virsh -c ${hvuri} "$@" 2>/dev/null | head -n -1 -} - -libvirtd_dom_list() { - # Only work with domains by their UUIDs - local hvuri=$1 - shift - - # The grep is to remove dom0 for xen domains. Otherwise we never hit 0 - do_virsh "${hvuri}" list --uuid $@ | grep -v 00000000-0000-0000-0000-000000000000 -} - -libvirtd_dom_count() { - local hvuri=$1 - shift - - libvirtd_dom_list "${hvuri}" $@ | wc -l -} - -libvirtd_net_list() { - # Only work with networks by their UUIDs - local hvuri=$1 - shift - - do_virsh "${hvuri}" net-list --uuid $@ -} - -libvirtd_net_count() { - local hvuri=$1 - shift - - libvirtd_net_list "${hvuri}" $@ | wc -l -} - -libvirtd_dom_stop() { - # stops all persistent or transient domains for a given URI - # $1 - uri - # $2 - persisent/transient - - local uri=$1 - local persist=$2 - local shutdown_type=${LIBVIRT_SHUTDOWN} - local counter=${LIBVIRT_MAXWAIT} - local dom_name= - local dom_as= - local dom_ids= - local uuid= - local dom_count= - - [ "${persist}" = "--transient" ] && shutdown_type="shutdown" - [ -n "${counter}" ] || counter=500 - - einfo " Shutting down domain(s) ..." - - # grab all persistent or transient domains running - dom_ids=$(libvirtd_dom_list ${uri} ${persist}) - - for uuid in ${dom_ids}; do - # Get the name - dom_name=$(do_virsh ${uri} domname ${uuid}) - einfo " ${dom_name}" - # Get autostart state - dom_as=$(do_virsh ${uri} dominfo ${uuid} | \ - awk '$1 == "Autostart:" { print $2 }') - - if [ "${persist}" = "--persistent" ]; then - # Save our running state only if LIBVIRT_IGNORE_AUTOSTART != yes - if [ "x${LIBVIRT_IGNORE_AUTOSTART}" = "xyes" ] && \ - [ ${dom_as} = "enabled" ]; then - : - else - echo "${uri} ${uuid}" >> ${gueststatefile} - fi - - fi - - # Now let's stop it - do_virsh "${uri}" ${shutdown_type} ${uuid} > /dev/null - - done - - dom_count="$(libvirtd_dom_count ${uri} ${persist})" - while [ ${dom_count} -gt 0 ] && [ ${counter} -gt 0 ] ; do - dom_count="$(libvirtd_dom_count ${uri} ${persist})" - sleep 1 - if [ "${shutdown_type}" = "shutdown" ]; then - counter=$((${counter} - 1)) - fi - printf "." - done - - if [ "${shutdown_type}" = "shutdown" ]; then - # grab all domains still running - dom_ids=$(libvirtd_dom_list ${uri} ${persist}) - for uuid in ${dom_ids}; do - dom_name=$(do_virsh ${uri} domname ${uuid}) - eerror " ${dom_name} forcibly stopped" - do_virsh "${uri}" destroy ${uuid} > /dev/null - done - fi -} - -libvirtd_net_stop() { - # stops all persistent or transient domains for a given URI - # $1 - uri - # $2 - persisent/transient - - local uri=$1 - local persist=$2 - local uuid= - local net_name= - - if [ "${LIBVIRT_NET_SHUTDOWN}" != "no" ]; then - - einfo " Shutting down network(s):" - for uuid in $(libvirtd_net_list ${uri} ${persist}); do - net_name=$(do_virsh ${uri} net-name ${uuid}) - einfo " ${net_name}" - - if [ "${persist}" = "--persistent" ]; then - # Save our running state - echo "${uri} ${uuid}" >> ${netstatefile} - - fi - - # Actually stop the network - do_virsh qemu net-destroy ${uuid} > /dev/null - done - - fi -} - -start() { - local uri= - local uuid= - local name= - - for uri in ${LIBVIRT_URIS}; do - do_virsh "${uri}" connect - if [ $? -ne 0 ]; then - eerror "Failed to connect to '${uri}'. Domains may not start." - fi - done - - [ ! -e "${netstatefile}" ] && touch "${netstatefile}" - [ ! -e "${gueststatefile}" ] && touch "${gueststatefile}" - - # if the user didn't want to start any guests up then respect their wish - [ "x${LIBVIRT_START}" = "xno" ] && return 0 - - # start networks - ebegin "Starting libvirt networks" - while read -r uri uuid - do - # ignore trash - [ -z "${uri}" ] || [ -z "${uuid}" ] && continue - - name=$(do_virsh "${uri}" net-name ${uuid}) - einfo " ${name}" - do_virsh "${uri}" net-start ${uuid} > /dev/null - done <"${netstatefile}" - eend 0 - - # start domains - ebegin "Starting libvirt domains" - while read -r uri uuid - do - # ignore trash - [ -z "${uri}" ] || [ -z "${uuid}" ] && continue - - name=$(do_virsh "${uri}" domname ${uuid}) - einfo " ${name}" - do_virsh "${uri}" start ${uuid} > /dev/null - done <"${gueststatefile}" - eend 0 -} - -stop() { - local counter= - local dom_name= - local net_name= - local dom_ids= - local uuid= - local dom_count= - - rm -f "${gueststatefile}" - [ $? -ne 0 ] && eerror "Unable to save domain state" - rm -f "${netstatefile}" - [ $? -ne 0 ] && eerror "Unable to save net state" - - for uri in ${LIBVIRT_URIS}; do - einfo "Stopping libvirt domains and networks for ${uri}" - - libvirtd_dom_stop "${uri}" "--persistent" - libvirtd_dom_stop "${uri}" "--transient" - libvirtd_net_stop "${uri}" "--persistent" - libvirtd_net_stop "${uri}" "--transient" - - einfo "Done stopping domains and networks for ${uri}" - done -} diff --git a/app-emulation/libvirt/files/libvirtd.init-r17 b/app-emulation/libvirt/files/libvirtd.init-r19 index 0f89df82db46..60dad6a791dc 100644 --- a/app-emulation/libvirt/files/libvirtd.init-r17 +++ b/app-emulation/libvirt/files/libvirtd.init-r19 @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 description="Virtual Machine Management daemon (libvirt)" @@ -8,19 +8,16 @@ LIBVIRTD_OPTS=${LIBVIRTD_OPTS:-"${LIBVIRTD_OPTS}"} LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"} command="/usr/sbin/libvirtd" -command_args="-d ${LIBVIRTD_OPTS}" -start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab" +command_args="${LIBVIRTD_OPTS}" +start_stop_daemon_args="-b --env KRB5_KTNAME=/etc/libvirt/krb5.tab" pidfile="/run/libvirtd.pid" retry="${LIBVIRTD_TERMTIMEOUT}" depend() { need virtlogd - use dbus virtlockd - after ntp-client ntpd nfs nfsmount portmap rpc.statd iptables ip6tables ebtables corosync sanlock cgconfig xenconsoled + use ceph dbus iscsid virtlockd + after cgconfig corosync ebtables iptables ip6tables nfs nfsmount ntp-client ntpdportmap rpc.statd sanlock xenconsoled USE_FLAG_FIREWALLD - USE_FLAG_AVAHI - USE_FLAG_ISCSI - USE_FLAG_RBD } start_pre() { diff --git a/app-emulation/libvirt/files/libvirtd.service.conf b/app-emulation/libvirt/files/libvirtd.service.conf deleted file mode 100644 index f08792260b72..000000000000 --- a/app-emulation/libvirt/files/libvirtd.service.conf +++ /dev/null @@ -1,10 +0,0 @@ -# Uncomment the following three lines to start libvirtd with the '--listen' -# directive such that it listens for TCP/IP connections (honoring the -# listen_tls and listen_tcp settings in /etc/libvirt/libvirtd.conf). If -# libvirtd is started without the '--listen' parameter, network connection -# (for the daemon) is globally disabled: - -# [Service] -# ExecStart= -# ExecStart=/usr/sbin/libvirtd --listen - diff --git a/app-emulation/libvirt/files/virtlockd.init-r2 b/app-emulation/libvirt/files/virtlockd.init-r2 new file mode 100644 index 000000000000..385dc1e62319 --- /dev/null +++ b/app-emulation/libvirt/files/virtlockd.init-r2 @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="libvirt virtual machine lock manager" +command="/usr/sbin/virtlockd" +start_stop_daemon_args="-b" +pidfile="/run/virtlockd.pid" + +extra_started_commands="reload" +description_reload="re-exec the daemon, while maintaining locks and clients" + + +depend() { + after ntp-client ntpd nfs nfsmount corosync +} + +reload() { + ebegin "re-exec() virtlockd" + + start-stop-daemon --signal SIGUSR1 \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/app-emulation/libvirt/files/virtlogd.init-r2 b/app-emulation/libvirt/files/virtlogd.init-r2 new file mode 100644 index 000000000000..442dcb8de48c --- /dev/null +++ b/app-emulation/libvirt/files/virtlogd.init-r2 @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="libvirt virtual machine logging manager" +command="/usr/sbin/virtlogd" +start_stop_daemon_args="-b" +pidfile="/run/virtlogd.pid" + +extra_started_commands="reload" +description_reload="re-exec the daemon, while maintaining open connections" + + +depend() { + after ntp-client ntpd nfs nfsmount corosync +} + +reload() { + ebegin "re-exec() virtlogd" + + start-stop-daemon --signal SIGUSR1 \ + --exec "${command}" --pidfile "${pidfile}" +} |