aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/libvirt/Manifest3
-rw-r--r--app-emulation/libvirt/files/README.gentoo-r3 (renamed from app-emulation/libvirt/files/README.gentoo-r2)6
-rw-r--r--app-emulation/libvirt/files/libvirt-1.2.16-fix_paths_in_libvirt-guests_sh.patch19
-rw-r--r--app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch77
-rw-r--r--app-emulation/libvirt/files/libvirt-4.10.0-fix_apparmor_rules.patch14
-rw-r--r--app-emulation/libvirt/files/libvirt-4.10.0-musl.patch10
-rw-r--r--app-emulation/libvirt/files/libvirt-4.5.0-do_not_use_sysconf.patch216
-rw-r--r--app-emulation/libvirt/files/libvirt-4.5.0-fix_typo_in_apparmor_rule.patch13
-rw-r--r--app-emulation/libvirt/files/libvirt-5.0.0-do-not-use-sysconf.patch216
-rw-r--r--app-emulation/libvirt/files/libvirt-5.0.0-fix-paths-for-apparmor.patch110
-rw-r--r--app-emulation/libvirt/files/libvirt-5.1.0-do-not-use-sysconf.patch216
-rw-r--r--app-emulation/libvirt/files/libvirt-6.0.0-fix_paths_in_libvirt-guests_sh.patch35
-rw-r--r--app-emulation/libvirt/files/libvirt-6.7.0-do-not-use-sysconfig.patch169
-rw-r--r--app-emulation/libvirt/files/libvirt-6.7.0-doc-path.patch9
-rw-r--r--app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch51
-rw-r--r--app-emulation/libvirt/files/libvirt-6.8.0-fix-libvirt-lxc-dbus.patch24
-rw-r--r--app-emulation/libvirt/files/libvirt-6.8.0-meson-properly-handle-libpcap-if-it-s-explicitly-dis.patch56
-rw-r--r--app-emulation/libvirt/files/libvirt-guests.init-r2235
-rw-r--r--app-emulation/libvirt/files/libvirt-guests.init-r4 (renamed from app-emulation/libvirt/files/libvirt-guests.init-r3)1
-rw-r--r--app-emulation/libvirt/files/libvirt/libvirt-fork-exec-deadlock.patch285
-rw-r--r--app-emulation/libvirt/files/libvirt/stderr-fix.patch13
-rw-r--r--app-emulation/libvirt/files/libvirtd.init-r19 (renamed from app-emulation/libvirt/files/libvirtd.init-r16)21
-rw-r--r--app-emulation/libvirt/files/libvirtd.service.conf10
-rw-r--r--app-emulation/libvirt/files/virtlockd.init-r2 (renamed from app-emulation/libvirt/files/virtlockd.init-r1)6
-rw-r--r--app-emulation/libvirt/files/virtlogd.init-r2 (renamed from app-emulation/libvirt/files/virtlogd.init-r1)6
-rw-r--r--app-emulation/libvirt/libvirt-4.10.0.ebuild388
-rw-r--r--app-emulation/libvirt/libvirt-6.8.0-r2.ebuild351
-rw-r--r--app-emulation/libvirt/libvirt-7.0.0-r1.ebuild348
-rw-r--r--app-emulation/libvirt/metadata.xml17
29 files changed, 1369 insertions, 1556 deletions
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index d9d32951..123787d8 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -1 +1,2 @@
-DIST libvirt-4.10.0.tar.xz 14841188 BLAKE2B b52f2ed1c4c65930339a6b6fc9e7b034c7661edc0defdd78642f305b97332c33247bfc552efc43aa75a8d360c0d721d1a58a22fa7a016e7cf14ee2219d70a762 SHA512 a4f97aed6299c7954518ab88738ab781cee0755bfd64094a44468f77f99cac5eb2bc74ecd6aec90177317606ebd073292f5b5d0056054d1d94973fa938589fbd
+DIST libvirt-6.8.0.tar.xz 8412092 BLAKE2B c118ca6b263054bb6941c62f3d1415f7ed1a3f29a35294272d04bc726643247ee5691e0310a1bf013faeba856d7aadd00a90fe8dbdca6ff4c7eb480e94d92fa2 SHA512 9b69f3dcceb5e40470a78908654faf51b643f6793e556f3115daa4bfe08743af290882dd51f15eb27c38d589eb210d495de7c44a40b363420ab4f4d3a6393cc9
+DIST libvirt-7.0.0.tar.xz 8567648 BLAKE2B 0c0b360c371a14b6d82dc6bef4b228bf7a4a17db1a8425d1354128b0705365a04440217ed0862761b2a8eaf81d81494177d777e734a9045bbc87fc613b56eb05 SHA512 dd6db5ec4971cf4c6059795fd81d5a3a889b10740e34c3c92271eda1c683c99df2c8f923398065d8a7c4f987a20eb1da617d5297ba8ea5a31f154412af50c343
diff --git a/app-emulation/libvirt/files/README.gentoo-r2 b/app-emulation/libvirt/files/README.gentoo-r3
index 1c086c1e..1fec12f0 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"
@@ -53,6 +53,6 @@ must change the unix sock group and/or perms in /etc/libvirt/libvirtd.conf
in order to allow normal users to connect to libvirtd.
-If libvirtd is built with USE=caps, libvirt will now start qemu/kvm VMs
+If libvirt is built with USE=caps, libvirt will now start qemu/kvm VMs
with non-root privileges. Ensure any resources your VMs use are accessible
by qemu:qemu.
diff --git a/app-emulation/libvirt/files/libvirt-1.2.16-fix_paths_in_libvirt-guests_sh.patch b/app-emulation/libvirt/files/libvirt-1.2.16-fix_paths_in_libvirt-guests_sh.patch
deleted file mode 100644
index ddedb1f9..00000000
--- a/app-emulation/libvirt/files/libvirt-1.2.16-fix_paths_in_libvirt-guests_sh.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in
-index 7f74b85..ea58119 100644
---- a/tools/libvirt-guests.sh.in
-+++ b/tools/libvirt-guests.sh.in
-@@ -41,11 +41,11 @@ CONNECT_RETRIES=10
- RETRIES_SLEEP=1
- SYNC_TIME=0
-
--test -f "$sysconfdir"/sysconfig/libvirt-guests &&
-- . "$sysconfdir"/sysconfig/libvirt-guests
-+test -f "$sysconfdir"/libvirt/libvirt-guests.conf &&
-+ . "$sysconfdir"/libvirt/libvirt-guests.conf
-
- LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
--VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
-+VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/libvirt-guests
-
- RETVAL=0
-
diff --git a/app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch b/app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch
deleted file mode 100644
index f1360ae4..00000000
--- a/app-emulation/libvirt/files/libvirt-3.10.0-r2-fix_paths_for_apparmor.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff --git a/examples/Makefile.am b/examples/Makefile.am
-index ef2f79db3..d8cdb9b3f 100644
---- a/examples/Makefile.am
-+++ b/examples/Makefile.am
-@@ -23,7 +23,7 @@ EXTRA_DIST = \
- apparmor/TEMPLATE.lxc \
- apparmor/libvirt-qemu \
- apparmor/libvirt-lxc \
-- apparmor/usr.lib.libvirt.virt-aa-helper \
-+ apparmor/usr.libexec.virt-aa-helper \
- apparmor/usr.sbin.libvirtd \
- lxcconvert/virt-lxc-convert \
- polkit/libvirt-acl.rules \
-@@ -70,7 +70,7 @@ admin_logging_SOURCES = admin/logging.c
- if WITH_APPARMOR_PROFILES
- apparmordir = $(sysconfdir)/apparmor.d/
- apparmor_DATA = \
-- apparmor/usr.lib.libvirt.virt-aa-helper \
-+ apparmor/usr.libexec.virt-aa-helper \
- apparmor/usr.sbin.libvirtd \
- $(NULL)
-
-diff --git a/examples/apparmor/libvirt-qemu b/examples/apparmor/libvirt-qemu
-index d4fad85a1..0b22009e5 100644
---- a/examples/apparmor/libvirt-qemu
-+++ b/examples/apparmor/libvirt-qemu
-@@ -86,6 +86,8 @@
- /usr/share/AAVMF/** r,
- /usr/share/qemu-efi/** r,
- /usr/share/slof/** r,
-+ /usr/share/seavgabios/** r,
-+ /usr/share/edk2-ovmf/** r,
-
- # access PKI infrastructure
- /etc/pki/libvirt-vnc/** r,
-diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.libexec.virt-aa-helper
-similarity index 92%
-rename from examples/apparmor/usr.lib.libvirt.virt-aa-helper
-rename to examples/apparmor/usr.libexec.virt-aa-helper
-index bd6181d00..4086f140a 100644
---- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
-+++ b/examples/apparmor/usr.libexec.virt-aa-helper
-@@ -1,7 +1,7 @@
- # Last Modified: Mon Apr 5 15:10:27 2010
- #include <tunables/global>
-
--profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
-+profile virt-aa-helper /usr/libexec/virt-aa-helper {
- #include <abstractions/base>
-
- # needed for searching directories
-@@ -32,7 +32,7 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
- deny /dev/mapper/ r,
- deny /dev/mapper/* r,
-
-- /usr/{lib,lib64}/libvirt/virt-aa-helper mr,
-+ /usr/libexec/virt-aa-helper mr,
- /{usr/,}sbin/apparmor_parser Ux,
-
- /etc/apparmor.d/libvirt/* r,
-diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd
-index 8d61d154e..656a5595b 100644
---- a/examples/apparmor/usr.sbin.libvirtd
-+++ b/examples/apparmor/usr.sbin.libvirtd
-@@ -84,8 +84,10 @@
- audit deny /sys/kernel/security/apparmor/.* rwxl,
- /sys/kernel/security/apparmor/profiles r,
- /usr/{lib,lib64}/libvirt/* PUxr,
-- /usr/{lib,lib64}/libvirt/libvirt_parthelper ix,
-- /usr/{lib,lib64}/libvirt/libvirt_iohelper ix,
-+ /usr/libexec/virt-aa-helper PUxr,
-+ /usr/libexec/libvirt_lxc PUxr,
-+ /usr/libexec/libvirt_parthelper ix,
-+ /usr/libexec/libvirt_iohelper ix,
- /etc/libvirt/hooks/** rmix,
- /etc/xen/scripts/** rmix,
-
diff --git a/app-emulation/libvirt/files/libvirt-4.10.0-fix_apparmor_rules.patch b/app-emulation/libvirt/files/libvirt-4.10.0-fix_apparmor_rules.patch
deleted file mode 100644
index e561bf42..00000000
--- a/app-emulation/libvirt/files/libvirt-4.10.0-fix_apparmor_rules.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
-index de94368..5fbae27 100644
---- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
-+++ b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
-@@ -39,6 +39,9 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
- /etc/apparmor.d/libvirt/* r,
- /etc/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
-
-+ # Gentoo specific path for uefi firmware
-+ /usr/share/edk2-ovmf/* r,
-+
- # for backingstore -- allow access to non-hidden files in @{HOME} as well
- # as storage pools
- audit deny @{HOME}/.* mrwkl,
diff --git a/app-emulation/libvirt/files/libvirt-4.10.0-musl.patch b/app-emulation/libvirt/files/libvirt-4.10.0-musl.patch
deleted file mode 100644
index 6f826c76..00000000
--- a/app-emulation/libvirt/files/libvirt-4.10.0-musl.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/storage/storage_backend_fs.c
-+++ b/src/storage/storage_backend_fs.c
-@@ -26,6 +26,7 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
-+#include <paths.h>
-
- #include "virerror.h"
- #include "storage_backend_fs.h" \ No newline at end of file
diff --git a/app-emulation/libvirt/files/libvirt-4.5.0-do_not_use_sysconf.patch b/app-emulation/libvirt/files/libvirt-4.5.0-do_not_use_sysconf.patch
deleted file mode 100644
index 3e430cba..00000000
--- a/app-emulation/libvirt/files/libvirt-4.5.0-do_not_use_sysconf.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From a365e2d5b4af1ab2be743773412fe265579a9a0b Mon Sep 17 00:00:00 2001
-Message-Id: <a365e2d5b4af1ab2be743773412fe265579a9a0b.1529989118.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Tue, 26 Jun 2018 06:51:06 +0200
-Subject: [PATCH] gentoo: do not use sysconf
-
-Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
----
- src/Makefile.am | 29 ++++++-----------------------
- src/locking/virtlockd.service.in | 3 +--
- src/logging/virtlogd.service.in | 3 +--
- src/remote/libvirtd.service.in | 3 +--
- tools/Makefile.am | 17 ++++-------------
- tools/libvirt-guests.service.in | 2 +-
- tools/libvirt-guests.sysconf | 7 +++++++
- 7 files changed, 21 insertions(+), 43 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index db8c8ebd1a..63d7a9ca46 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -757,23 +757,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 || :
--
- SYSVINIT_FILES_IN += \
- locking/virtlockd.init.in \
- $(NULL)
-@@ -814,14 +797,14 @@ uninstall-logrotate:
- endif ! WITH_LIBVIRTD
-
- if LIBVIRT_INIT_SCRIPT_RED_HAT
--install-init:: $(SYSVINIT_FILES) install-sysconfig
-+install-init:: $(SYSVINIT_FILES)
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
- for f in $(SYSVINIT_FILES:%.init=%) ; \
- do \
- $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/$$f; \
- done
-
--uninstall-init:: uninstall-sysconfig
-+uninstall-init::
- rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(sysconfdir)/rc.d/init.d/%)
- rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
-
-@@ -859,14 +842,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) || :
- else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
-@@ -884,7 +867,7 @@ EXTRA_DIST += $(UPSTART_FILES)
- if WITH_LIBVIRTD
- if LIBVIRT_INIT_SCRIPT_UPSTART
-
--install-upstart: install-sysconfig
-+install-upstart:
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
- for f in $(UPSTART_FILES:%.upstart=%); \
- do \
-@@ -893,7 +876,7 @@ install-upstart: install-sysconfig
- $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
- done
-
--uninstall-upstart: uninstall-sysconfig
-+uninstall-upstart:
- for f in $(UPSTART_FILES:%.upstart=%); \
- do \
- tgt=`basename $$f` ; \
-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 1452d984a0..cef08741cb 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -336,15 +336,6 @@ install-data-local: install-init install-systemd install-nss \
- uninstall-local: uninstall-init 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.init.in
-
- install-initscript: libvirt-guests.init
-@@ -359,8 +350,8 @@ uninstall-initscript:
-
- if LIBVIRT_INIT_SCRIPT_RED_HAT
- BUILT_SOURCES += libvirt-guests.init
--install-init: install-sysconfig install-initscript
--uninstall-init: uninstall-sysconfig uninstall-initscript
-+install-init: install-initscript
-+uninstall-init: uninstall-initscript
- else ! LIBVIRT_INIT_SCRIPT_RED_HAT
- install-init:
- uninstall-init:
-@@ -391,12 +382,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.16.4
-
diff --git a/app-emulation/libvirt/files/libvirt-4.5.0-fix_typo_in_apparmor_rule.patch b/app-emulation/libvirt/files/libvirt-4.5.0-fix_typo_in_apparmor_rule.patch
deleted file mode 100644
index 4d1bfaf5..00000000
--- a/app-emulation/libvirt/files/libvirt-4.5.0-fix_typo_in_apparmor_rule.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/examples/apparmor/usr.libexec.virt-aa-helper b/examples/apparmor/usr.libexec.virt-aa-helper
-index d21723f..99ab4ea 100644
---- a/examples/apparmor/usr.libexec.virt-aa-helper
-+++ b/examples/apparmor/usr.libexec.virt-aa-helper
-@@ -50,7 +50,7 @@ profile virt-aa-helper /usr/libexec/virt-aa-helper {
- @{HOME}/** r,
- /var/lib/libvirt/images/ r,
- /var/lib/libvirt/images/** r,
-- /var/lib/nova/instances/_base/* r
-+ /var/lib/nova/instances/_base/* r,
- /{media,mnt,opt,srv}/** r,
- # For virt-sandbox
- /{,var/}run/libvirt/**/[sv]d[a-z] r,
diff --git a/app-emulation/libvirt/files/libvirt-5.0.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.0.0-do-not-use-sysconf.patch
deleted file mode 100644
index d4e37e41..00000000
--- a/app-emulation/libvirt/files/libvirt-5.0.0-do-not-use-sysconf.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From 947ef7a44e94989f324e0d533499454d540fdef9 Mon Sep 17 00:00:00 2001
-Message-Id: <947ef7a44e94989f324e0d533499454d540fdef9.1547196492.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Tue, 26 Jun 2018 06:51:06 +0200
-Subject: [PATCH] gentoo: do not use sysconf
-
-Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
----
- src/Makefile.am | 29 ++++++-----------------------
- src/locking/virtlockd.service.in | 3 +--
- src/logging/virtlogd.service.in | 3 +--
- src/remote/libvirtd.service.in | 3 +--
- tools/Makefile.am | 17 ++++-------------
- tools/libvirt-guests.service.in | 2 +-
- tools/libvirt-guests.sysconf | 7 +++++++
- 7 files changed, 21 insertions(+), 43 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index cd386297ed..52a63885d6 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -756,23 +756,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 || :
--
- SYSVINIT_FILES_IN += \
- locking/virtlockd.init.in \
- $(NULL)
-@@ -816,14 +799,14 @@ if WITH_LIBVIRTD
- if LIBVIRT_INIT_SCRIPT_RED_HAT
- initdir = $(sysconfdir)/rc.d/init.d
-
--install-init:: $(SYSVINIT_FILES) install-sysconfig
-+install-init:: $(SYSVINIT_FILES)
- $(MKDIR_P) $(DESTDIR)$(initdir)
- for f in $(SYSVINIT_FILES:%.init=%) ; \
- do \
- $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(initdir)/$$f; \
- done
-
--uninstall-init:: uninstall-sysconfig
-+uninstall-init::
- rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(initdir)/%)
- rmdir $(DESTDIR)$(initdir) || :
-
-@@ -862,14 +845,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) || :
-
-@@ -884,7 +867,7 @@ EXTRA_DIST += $(UPSTART_FILES)
- if WITH_LIBVIRTD
- if LIBVIRT_INIT_SCRIPT_UPSTART
-
--install-upstart: install-sysconfig
-+install-upstart:
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
- for f in $(UPSTART_FILES:%.upstart=%); \
- do \
-@@ -893,7 +876,7 @@ install-upstart: install-sysconfig
- $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
- done
-
--uninstall-upstart: uninstall-sysconfig
-+uninstall-upstart:
- for f in $(UPSTART_FILES:%.upstart=%); \
- do \
- tgt=`basename $$f` ; \
-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 613c9a77f0..224b511074 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -339,15 +339,6 @@ install-data-local: install-init install-systemd install-nss \
- uninstall-local: uninstall-init 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.init.in
-
- install-initscript: libvirt-guests.init
-@@ -362,8 +353,8 @@ uninstall-initscript:
-
- if LIBVIRT_INIT_SCRIPT_RED_HAT
- BUILT_SOURCES += libvirt-guests.init
--install-init: install-sysconfig install-initscript
--uninstall-init: uninstall-sysconfig uninstall-initscript
-+install-init: install-initscript
-+uninstall-init: uninstall-initscript
- else ! LIBVIRT_INIT_SCRIPT_RED_HAT
- install-init:
- uninstall-init:
-@@ -394,12 +385,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.0.0-fix-paths-for-apparmor.patch b/app-emulation/libvirt/files/libvirt-5.0.0-fix-paths-for-apparmor.patch
deleted file mode 100644
index ca9f952a..00000000
--- a/app-emulation/libvirt/files/libvirt-5.0.0-fix-paths-for-apparmor.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 563706143779166624812b3faf498d869f5dd383 Mon Sep 17 00:00:00 2001
-Message-Id: <563706143779166624812b3faf498d869f5dd383.1547196492.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Fri, 11 Jan 2019 09:41:06 +0100
-Subject: [PATCH] gentoo: fix paths for apparmor
-
-Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
----
- src/security/Makefile.inc.am | 10 +++++-----
- src/security/apparmor/libvirt-qemu | 2 ++
- ...bvirt.virt-aa-helper => usr.libexec.virt-aa-helper} | 4 ++--
- src/security/apparmor/usr.sbin.libvirtd | 6 ++++--
- 4 files changed, 13 insertions(+), 9 deletions(-)
- rename src/security/apparmor/{usr.lib.libvirt.virt-aa-helper => usr.libexec.virt-aa-helper} (93%)
-
-diff --git a/src/security/Makefile.inc.am b/src/security/Makefile.inc.am
-index b24cdfd083..ae8e979b84 100644
---- a/src/security/Makefile.inc.am
-+++ b/src/security/Makefile.inc.am
-@@ -36,7 +36,7 @@ EXTRA_DIST += \
- security/apparmor/TEMPLATE.lxc \
- security/apparmor/libvirt-qemu \
- security/apparmor/libvirt-lxc \
-- security/apparmor/usr.lib.libvirt.virt-aa-helper \
-+ security/apparmor/usr.libexec.virt-aa-helper \
- security/apparmor/usr.sbin.libvirtd \
- $(NULL)
-
-@@ -90,7 +90,7 @@ endif WITH_SECDRIVER_APPARMOR
- if WITH_APPARMOR_PROFILES
- apparmordir = $(sysconfdir)/apparmor.d/
- apparmor_DATA = \
-- security/apparmor/usr.lib.libvirt.virt-aa-helper \
-+ security/apparmor/usr.libexec.virt-aa-helper \
- security/apparmor/usr.sbin.libvirtd \
- $(NULL)
-
-@@ -110,11 +110,11 @@ APPARMOR_LOCAL_DIR = "$(DESTDIR)$(apparmordir)/local"
- install-apparmor-local:
- $(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/libvirt-qemu b/src/security/apparmor/libvirt-qemu
-index eaa5167525..9be50bbbe0 100644
---- a/src/security/apparmor/libvirt-qemu
-+++ b/src/security/apparmor/libvirt-qemu
-@@ -87,6 +87,8 @@
- /usr/share/AAVMF/** r,
- /usr/share/qemu-efi/** r,
- /usr/share/slof/** r,
-+ /usr/share/seavgabios/** r,
-+ /usr/share/edk2-ovmf/** r,
-
- # pki for libvirt-vnc and libvirt-spice (LP: #901272, #1690140)
- /etc/pki/CA/ r,
-diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper b/src/security/apparmor/usr.libexec.virt-aa-helper
-similarity index 93%
-rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper
-rename to src/security/apparmor/usr.libexec.virt-aa-helper
-index de9436872c..99ab4ea527 100644
---- a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper
-+++ b/src/security/apparmor/usr.libexec.virt-aa-helper
-@@ -1,7 +1,7 @@
- # Last Modified: Mon Apr 5 15:10:27 2010
- #include <tunables/global>
-
--profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
-+profile virt-aa-helper /usr/libexec/virt-aa-helper {
- #include <abstractions/base>
-
- # needed for searching directories
-@@ -33,7 +33,7 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
- deny /dev/mapper/ r,
- deny /dev/mapper/* r,
-
-- /usr/{lib,lib64}/libvirt/virt-aa-helper mr,
-+ /usr/libexec/virt-aa-helper mr,
- /{usr/,}sbin/apparmor_parser Ux,
-
- /etc/apparmor.d/libvirt/* r,
-diff --git a/src/security/apparmor/usr.sbin.libvirtd b/src/security/apparmor/usr.sbin.libvirtd
-index f0ffc53008..8a402bd6ec 100644
---- a/src/security/apparmor/usr.sbin.libvirtd
-+++ b/src/security/apparmor/usr.sbin.libvirtd
-@@ -98,8 +98,10 @@
- audit deny /sys/kernel/security/apparmor/.* rwxl,
- /sys/kernel/security/apparmor/profiles r,
- /usr/{lib,lib64}/libvirt/* PUxr,
-- /usr/{lib,lib64}/libvirt/libvirt_parthelper ix,
-- /usr/{lib,lib64}/libvirt/libvirt_iohelper ix,
-+ /usr/libexec/virt-aa-helper PUxr,
-+ /usr/libexec/libvirt_lxc PUxr,
-+ /usr/libexec/libvirt_parthelper ix,
-+ /usr/libexec/libvirt_iohelper ix,
- /etc/libvirt/hooks/** rmix,
- /etc/xen/scripts/** rmix,
-
---
-2.19.2
-
diff --git a/app-emulation/libvirt/files/libvirt-5.1.0-do-not-use-sysconf.patch b/app-emulation/libvirt/files/libvirt-5.1.0-do-not-use-sysconf.patch
deleted file mode 100644
index 3c32ab81..00000000
--- a/app-emulation/libvirt/files/libvirt-5.1.0-do-not-use-sysconf.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From cbc26250bcdc4eb3b1c4e7e09c824f3504d41b27 Mon Sep 17 00:00:00 2001
-Message-Id: <cbc26250bcdc4eb3b1c4e7e09c824f3504d41b27.1548428073.git.mprivozn@redhat.com>
-From: Michal Privoznik <mprivozn@redhat.com>
-Date: Tue, 26 Jun 2018 06:51:06 +0200
-Subject: [PATCH] gentoo: do not use sysconf
-
-Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
----
- src/Makefile.am | 29 ++++++-----------------------
- src/locking/virtlockd.service.in | 3 +--
- src/logging/virtlogd.service.in | 3 +--
- src/remote/libvirtd.service.in | 3 +--
- tools/Makefile.am | 17 ++++-------------
- tools/libvirt-guests.service.in | 2 +-
- tools/libvirt-guests.sysconf | 7 +++++++
- 7 files changed, 21 insertions(+), 43 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 8c8dfe3dcf..25ced3abf3 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -756,23 +756,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 || :
--
- SYSVINIT_FILES_IN += \
- locking/virtlockd.init.in \
- $(NULL)
-@@ -816,14 +799,14 @@ if WITH_LIBVIRTD
- if LIBVIRT_INIT_SCRIPT_RED_HAT
- initdir = $(sysconfdir)/rc.d/init.d
-
--install-init: $(SYSVINIT_FILES) install-sysconfig
-+install-init: $(SYSVINIT_FILES)
- $(MKDIR_P) $(DESTDIR)$(initdir)
- for f in $(SYSVINIT_FILES:%.init=%) ; \
- do \
- $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(initdir)/$$f; \
- done
-
--uninstall-init: uninstall-sysconfig
-+uninstall-init:
- rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(initdir)/%)
- rmdir $(DESTDIR)$(initdir) || :
-
-@@ -862,14 +845,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) || :
-
-@@ -884,7 +867,7 @@ EXTRA_DIST += $(UPSTART_FILES)
- if WITH_LIBVIRTD
- if LIBVIRT_INIT_SCRIPT_UPSTART
-
--install-upstart: install-sysconfig
-+install-upstart:
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d
- for f in $(UPSTART_FILES:%.upstart=%); \
- do \
-@@ -893,7 +876,7 @@ install-upstart: install-sysconfig
- $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
- done
-
--uninstall-upstart: uninstall-sysconfig
-+uninstall-upstart:
- for f in $(UPSTART_FILES:%.upstart=%); \
- do \
- tgt=`basename $$f` ; \
-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 613c9a77f0..224b511074 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -339,15 +339,6 @@ install-data-local: install-init install-systemd install-nss \
- uninstall-local: uninstall-init 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.init.in
-
- install-initscript: libvirt-guests.init
-@@ -362,8 +353,8 @@ uninstall-initscript:
-
- if LIBVIRT_INIT_SCRIPT_RED_HAT
- BUILT_SOURCES += libvirt-guests.init
--install-init: install-sysconfig install-initscript
--uninstall-init: uninstall-sysconfig uninstall-initscript
-+install-init: install-initscript
-+uninstall-init: uninstall-initscript
- else ! LIBVIRT_INIT_SCRIPT_RED_HAT
- install-init:
- uninstall-init:
-@@ -394,12 +385,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-6.0.0-fix_paths_in_libvirt-guests_sh.patch b/app-emulation/libvirt/files/libvirt-6.0.0-fix_paths_in_libvirt-guests_sh.patch
new file mode 100644
index 00000000..bf7a328f
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-6.0.0-fix_paths_in_libvirt-guests_sh.patch
@@ -0,0 +1,35 @@
+From e97700d867ffa949c97f8a635a76b9ce510e806f Mon Sep 17 00:00:00 2001
+Message-Id: <e97700d867ffa949c97f8a635a76b9ce510e806f.1580460243.git.mprivozn@redhat.com>
+In-Reply-To: <5965f20fe0275b324c9b84ab7f48dd7db0494495.1580460243.git.mprivozn@redhat.com>
+References: <5965f20fe0275b324c9b84ab7f48dd7db0494495.1580460243.git.mprivozn@redhat.com>
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Fri, 31 Jan 2020 09:42:14 +0100
+Subject: [PATCH 2/3] Fix paths in libvirt-guests.sh.in
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ tools/libvirt-guests.sh.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in
+index a881f6266e..79d38b3e9a 100644
+--- a/tools/libvirt-guests.sh.in
++++ b/tools/libvirt-guests.sh.in
+@@ -39,11 +39,11 @@ START_DELAY=0
+ BYPASS_CACHE=0
+ SYNC_TIME=0
+
+-test -f "$sysconfdir"/sysconfig/libvirt-guests &&
+- . "$sysconfdir"/sysconfig/libvirt-guests
++test -f "$sysconfdir"/libvirt/libvirt-guests.conf &&
++ . "$sysconfdir"/libvirt/libvirt-guests.conf
+
+ LISTFILE="$localstatedir"/lib/libvirt/libvirt-guests
+-VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/subsys/libvirt-guests
++VAR_SUBSYS_LIBVIRT_GUESTS="$localstatedir"/lock/libvirt-guests
+
+ RETVAL=0
+
+--
+2.24.1
+
diff --git a/app-emulation/libvirt/files/libvirt-6.7.0-do-not-use-sysconfig.patch b/app-emulation/libvirt/files/libvirt-6.7.0-do-not-use-sysconfig.patch
new file mode 100644
index 00000000..f3d2e3c3
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-6.7.0-do-not-use-sysconfig.patch
@@ -0,0 +1,169 @@
+--- a/src/interface/virtinterfaced.service.in
++++ b/src/interface/virtinterfaced.service.in
+@@ -13,7 +13,6 @@
+
+ [Service]
+ Type=notify
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced
+ ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS
+ ExecReload=/bin/kill -HUP $MAINPID
+ Restart=on-failure
+--- a/src/libxl/virtxend.service.in
++++ b/src/libxl/virtxend.service.in
+@@ -17,7 +17,6 @@
+
+ [Service]
+ Type=notify
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtxend
+ ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS
+ ExecReload=/bin/kill -HUP $MAINPID
+ Restart=on-failure
+--- a/src/locking/virtlockd.service.in
++++ b/src/locking/virtlockd.service.in
+@@ -7,8 +7,7 @@
+ 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
+--- a/src/logging/virtlogd.service.in
++++ b/src/logging/virtlogd.service.in
+@@ -7,8 +7,7 @@
+ 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
+--- a/src/lxc/virtlxcd.service.in
++++ b/src/lxc/virtlxcd.service.in
+@@ -18,7 +18,6 @@
+
+ [Service]
+ Type=notify
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd
+ ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS
+ ExecReload=/bin/kill -HUP $MAINPID
+ KillMode=process
+--- a/src/network/virtnetworkd.service.in
++++ b/src/network/virtnetworkd.service.in
+@@ -16,7 +16,6 @@
+
+ [Service]
+ Type=notify
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd
+ ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS
+ ExecReload=/bin/kill -HUP $MAINPID
+ Restart=on-failure
+--- a/src/node_device/virtnodedevd.service.in
++++ b/src/node_device/virtnodedevd.service.in
+@@ -13,7 +13,6 @@
+
+ [Service]
+ Type=notify
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd
+ ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS
+ ExecReload=/bin/kill -HUP $MAINPID
+ Restart=on-failure
+--- a/src/nwfilter/virtnwfilterd.service.in
++++ b/src/nwfilter/virtnwfilterd.service.in
+@@ -13,7 +13,6 @@
+
+ [Service]
+ Type=notify
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd
+ ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS
+ ExecReload=/bin/kill -HUP $MAINPID
+ Restart=on-failure
+--- a/src/qemu/virtqemud.service.in
++++ b/src/qemu/virtqemud.service.in
+@@ -18,7 +18,6 @@
+
+ [Service]
+ Type=notify
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud
+ ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS
+ ExecReload=/bin/kill -HUP $MAINPID
+ KillMode=process
+--- a/src/remote/libvirtd.service.in
++++ b/src/remote/libvirtd.service.in
+@@ -28,8 +28,7 @@
+
+ [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
+--- a/src/remote/virtproxyd.service.in
++++ b/src/remote/virtproxyd.service.in
+@@ -13,7 +13,6 @@
+
+ [Service]
+ Type=notify
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd
+ ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS
+ ExecReload=/bin/kill -HUP $MAINPID
+ Restart=on-failure
+--- a/src/secret/virtsecretd.service.in
++++ b/src/secret/virtsecretd.service.in
+@@ -13,7 +13,6 @@
+
+ [Service]
+ Type=notify
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd
+ ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS
+ ExecReload=/bin/kill -HUP $MAINPID
+ Restart=on-failure
+--- a/src/storage/virtstoraged.service.in
++++ b/src/storage/virtstoraged.service.in
+@@ -15,7 +15,6 @@
+
+ [Service]
+ Type=notify
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged
+ ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS
+ ExecReload=/bin/kill -HUP $MAINPID
+ Restart=on-failure
+--- a/src/vbox/virtvboxd.service.in
++++ b/src/vbox/virtvboxd.service.in
+@@ -14,7 +14,6 @@
+
+ [Service]
+ Type=notify
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd
+ ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS
+ ExecReload=/bin/kill -HUP $MAINPID
+ Restart=on-failure
+--- a/tools/libvirt-guests.service.in
++++ b/tools/libvirt-guests.service.in
+@@ -10,7 +10,7 @@
+ 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
+--- 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
diff --git a/app-emulation/libvirt/files/libvirt-6.7.0-doc-path.patch b/app-emulation/libvirt/files/libvirt-6.7.0-doc-path.patch
new file mode 100644
index 00000000..65eb35f3
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-6.7.0-doc-path.patch
@@ -0,0 +1,9 @@
+--- a/meson.build 2020-09-26 21:25:08.557345415 +0000
++++ b/meson.build 2020-09-26 21:25:59.507348156 +0000
+@@ -84,7 +84,7 @@ sbindir = prefix / get_option('sbindir')
+ sharedstatedir = prefix / get_option('sharedstatedir')
+
+ confdir = sysconfdir / meson.project_name()
+-docdir = datadir / 'doc' / meson.project_name()
++docdir = datadir / 'doc' / '@0@-@1@'.format(meson.project_name(), meson.project_version())
+ pkgdatadir = datadir / meson.project_name()
diff --git a/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch b/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch
new file mode 100644
index 00000000..18e7ef2d
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch
@@ -0,0 +1,51 @@
+diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu
+index 80986ae..d550d8c 100644
+--- a/src/security/apparmor/libvirt-qemu
++++ b/src/security/apparmor/libvirt-qemu
+@@ -88,6 +88,7 @@
+ /usr/share/sgabios/** r,
+ /usr/share/slof/** r,
+ /usr/share/vgabios/** r,
++ /usr/share/seavgabios/** r,
+
+ # pki for libvirt-vnc and libvirt-spice (LP: #901272, #1690140)
+ /etc/pki/CA/ r,
+
+--- a/src/security/apparmor/meson.build 2020-10-06 17:45:18.590000000 +0100
++++ b/src/security/apparmor/meson.build 2020-10-06 17:45:07.044000000 +0100
+@@ -1,5 +1,5 @@
+ apparmor_gen_profiles = [
+- 'usr.lib.libvirt.virt-aa-helper',
++ 'usr.libexec.libvirt.virt-aa-helper',
+ 'usr.sbin.libvirtd',
+ ]
+
+@@ -32,7 +32,7 @@ install_data(
+ )
+
+ install_data(
+- 'usr.lib.libvirt.virt-aa-helper.local',
++ 'usr.libexec.libvirt.virt-aa-helper.local',
+ install_dir: apparmor_dir / 'local',
+- rename: 'usr.lib.libvirt.virt-aa-helper',
++ rename: 'usr.libexec.libvirt.virt-aa-helper',
+ )
+
+diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in b/src/security/apparmor/usr.libexec.libvirt.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.libvirt.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.libvirt.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.libvirt.virt-aa-helper>
+ }
+diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.local
+similarity index 100%
+rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local
+rename to src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.local
diff --git a/app-emulation/libvirt/files/libvirt-6.8.0-fix-libvirt-lxc-dbus.patch b/app-emulation/libvirt/files/libvirt-6.8.0-fix-libvirt-lxc-dbus.patch
new file mode 100644
index 00000000..ea1a2379
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-6.8.0-fix-libvirt-lxc-dbus.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/753761
+
+diff --git a/src/util/virgdbus.c b/src/util/virgdbus.c
+index 4360a6a..4ad1a5c 100644
+--- a/src/util/virgdbus.c
++++ b/src/util/virgdbus.c
+@@ -54,11 +54,15 @@ virGDBusBusInit(GBusType type, GError **error)
+ if (sharedBus) {
+ return g_bus_get_sync(type, NULL, error);
+ } else {
++ GDBusConnectionFlags dbusFlags =
++ G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
++ G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION;
++
+ address = g_dbus_address_get_for_bus_sync(type, NULL, error);
+- if (error)
++ if (*error)
+ return NULL;
+ return g_dbus_connection_new_for_address_sync(address,
+- G_DBUS_CONNECTION_FLAGS_NONE,
++ dbusFlags,
+ NULL,
+ NULL,
+ error);
diff --git a/app-emulation/libvirt/files/libvirt-6.8.0-meson-properly-handle-libpcap-if-it-s-explicitly-dis.patch b/app-emulation/libvirt/files/libvirt-6.8.0-meson-properly-handle-libpcap-if-it-s-explicitly-dis.patch
new file mode 100644
index 00000000..46da07af
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-6.8.0-meson-properly-handle-libpcap-if-it-s-explicitly-dis.patch
@@ -0,0 +1,56 @@
+From c8be9ccc36a32cc756d05b2c0838c43a57be15f7 Mon Sep 17 00:00:00 2001
+Message-Id: <c8be9ccc36a32cc756d05b2c0838c43a57be15f7.1607284606.git.mprivozn@redhat.com>
+From: Pavel Hrdina <phrdina@redhat.com>
+Date: Thu, 8 Oct 2020 13:09:45 +0200
+Subject: [PATCH] meson: properly handle libpcap if it's explicitly disabled
+
+If libpcap is detected using pkg-config it would ignore the libpcap
+option.
+
+Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
+Reviewed-by: Andrea Bolognani <abologna@redhat.com>
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ meson.build | 25 +++++++++++++++----------
+ 1 file changed, 15 insertions(+), 10 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index e5a8316668..ec252ddf39 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1101,17 +1101,22 @@ if libparted_dep.found()
+ endif
+
+ libpcap_version = '1.5.0'
+-libpcap_dep = dependency('libpcap', version: '>=' + libpcap_version, required: false)
+-if not libpcap_dep.found()
+- pcap_config_prog = find_program('pcap-config', required: get_option('libpcap'))
+- if pcap_config_prog.found()
+- pcap_args = run_command(pcap_config_prog, '--cflags').stdout().strip().split()
+- pcap_libs = run_command(pcap_config_prog, '--libs').stdout().strip().split()
+- libpcap_dep = declare_dependency(
+- compile_args: pcap_args,
+- link_args: pcap_libs,
+- )
++if not get_option('libpcap').disabled()
++ libpcap_dep = dependency('libpcap', version: '>=' + libpcap_version, required: false)
++
++ if not libpcap_dep.found()
++ pcap_config_prog = find_program('pcap-config', required: get_option('libpcap'))
++ if pcap_config_prog.found()
++ pcap_args = run_command(pcap_config_prog, '--cflags').stdout().strip().split()
++ pcap_libs = run_command(pcap_config_prog, '--libs').stdout().strip().split()
++ libpcap_dep = declare_dependency(
++ compile_args: pcap_args,
++ link_args: pcap_libs,
++ )
++ endif
+ endif
++else
++ libpcap_dep = dependency('', required: false)
+ endif
+ if libpcap_dep.found()
+ conf.set('WITH_LIBPCAP', 1)
+--
+2.26.2
+
diff --git a/app-emulation/libvirt/files/libvirt-guests.init-r2 b/app-emulation/libvirt/files/libvirt-guests.init-r2
deleted file mode 100644
index 84559189..00000000
--- a/app-emulation/libvirt/files/libvirt-guests.init-r2
+++ /dev/null
@@ -1,235 +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
-
- do_virsh "${hvuri}" list --uuid $@
-}
-
-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/libvirt-guests.init-r3 b/app-emulation/libvirt/files/libvirt-guests.init-r4
index 10797e1b..b29f04c2 100644
--- a/app-emulation/libvirt/files/libvirt-guests.init-r3
+++ b/app-emulation/libvirt/files/libvirt-guests.init-r4
@@ -206,6 +206,7 @@ start() {
name=$(do_virsh "${uri}" domname ${uuid})
einfo " ${name}"
do_virsh "${uri}" start ${uuid} > /dev/null
+ do_virsh "${uri}" domtime --sync ${uuid} > /dev/null
done <"${gueststatefile}"
eend 0
}
diff --git a/app-emulation/libvirt/files/libvirt/libvirt-fork-exec-deadlock.patch b/app-emulation/libvirt/files/libvirt/libvirt-fork-exec-deadlock.patch
new file mode 100644
index 00000000..badc17fc
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt/libvirt-fork-exec-deadlock.patch
@@ -0,0 +1,285 @@
+From c0c3240552c833c354c3cf2deb86f928df7e7e4f Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 12 Aug 2020 19:51:05 +0200
+Subject: [PATCH 1/2] util: avoid free() when reset log after fork
+
+Doing malloc/free after fork is techincally not allowed in POSIX and
+deadlocks[1] with musl libc.
+
+[1]: https://gitlab.com/libvirt/libvirt/-/issues/52
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ src/util/vircommand.c | 4 ++--
+ src/util/virlog.c | 44 +++++++++++++++++++++++++++++++++----------
+ src/util/virlog.h | 1 +
+ 3 files changed, 37 insertions(+), 12 deletions(-)
+
+diff --git a/src/util/vircommand.c b/src/util/vircommand.c
+index 76f7eb9a3d..17e5bb00d3 100644
+--- a/src/util/vircommand.c
++++ b/src/util/vircommand.c
+@@ -304,7 +304,7 @@ virFork(void)
+ /* Make sure any hook logging is sent to stderr, since child
+ * process may close the logfile FDs */
+ logprio = virLogGetDefaultPriority();
+- virLogReset();
++ virLogResetWithoutFree();
+ virLogSetDefaultPriority(logprio);
+
+ /* Clear out all signal handlers from parent so nothing
+@@ -861,7 +861,7 @@ virExec(virCommandPtr cmd)
+ goto fork_error;
+
+ /* Close logging again to ensure no FDs leak to child */
+- virLogReset();
++ virLogResetWithoutFree();
+
+ if (cmd->env)
+ execve(binary, cmd->args, cmd->env);
+diff --git a/src/util/virlog.c b/src/util/virlog.c
+index 3217e5eb73..3959de5ca7 100644
+--- a/src/util/virlog.c
++++ b/src/util/virlog.c
+@@ -108,8 +108,8 @@ static size_t virLogNbOutputs;
+ */
+ static virLogPriority virLogDefaultPriority = VIR_LOG_DEFAULT;
+
+-static void virLogResetFilters(void);
+-static void virLogResetOutputs(void);
++static void virLogResetFilters(bool freemem);
++static void virLogResetOutputs(bool freemem);
+ static void virLogOutputToFd(virLogSourcePtr src,
+ virLogPriority priority,
+ const char *filename,
+@@ -284,8 +284,30 @@ virLogReset(void)
+ return -1;
+
+ virLogLock();
+- virLogResetFilters();
+- virLogResetOutputs();
++ virLogResetFilters(true);
++ virLogResetOutputs(true);
++ virLogDefaultPriority = VIR_LOG_DEFAULT;
++ virLogUnlock();
++ return 0;
++}
++
++/**
++ * virLogResetWithoutFree:
++ *
++ * Reset the logging module to its default initial state, but avoid doing
++ * free() so it can be used after fork and before exec.
++ *
++ * Returns 0 if successful, and -1 in case or error
++ */
++int
++virLogResetWithoutFree(void)
++{
++ if (virLogInitialize() < 0)
++ return -1;
++
++ virLogLock();
++ virLogResetFilters(false);
++ virLogResetOutputs(false);
+ virLogDefaultPriority = VIR_LOG_DEFAULT;
+ virLogUnlock();
+ return 0;
+@@ -324,9 +346,10 @@ virLogSetDefaultPriority(virLogPriority priority)
+ * Removes the set of logging filters defined.
+ */
+ static void
+-virLogResetFilters(void)
++virLogResetFilters(bool freemem)
+ {
+- virLogFilterListFree(virLogFilters, virLogNbFilters);
++ if (freemem)
++ virLogFilterListFree(virLogFilters, virLogNbFilters);
+ virLogFilters = NULL;
+ virLogNbFilters = 0;
+ virLogFiltersSerial++;
+@@ -371,9 +394,10 @@ virLogFilterListFree(virLogFilterPtr *list, int count)
+ * Removes the set of logging output defined.
+ */
+ static void
+-virLogResetOutputs(void)
++virLogResetOutputs(bool freemem)
+ {
+- virLogOutputListFree(virLogOutputs, virLogNbOutputs);
++ if (freemem)
++ virLogOutputListFree(virLogOutputs, virLogNbOutputs);
+ virLogOutputs = NULL;
+ virLogNbOutputs = 0;
+ }
+@@ -1392,7 +1416,7 @@ virLogDefineOutputs(virLogOutputPtr *outputs, size_t noutputs)
+ return -1;
+
+ virLogLock();
+- virLogResetOutputs();
++ virLogResetOutputs(true);
+
+ #if HAVE_SYSLOG_H
+ /* syslog needs to be special-cased, since it keeps the fd in private */
+@@ -1435,7 +1459,7 @@ virLogDefineFilters(virLogFilterPtr *filters, size_t nfilters)
+ return -1;
+
+ virLogLock();
+- virLogResetFilters();
++ virLogResetFilters(true);
+ virLogFilters = filters;
+ virLogNbFilters = nfilters;
+ virLogUnlock();
+diff --git a/src/util/virlog.h b/src/util/virlog.h
+index 984a9d5a43..69f7b1ef94 100644
+--- a/src/util/virlog.h
++++ b/src/util/virlog.h
+@@ -168,6 +168,7 @@ void virLogSetDefaultOutput(const char *fname, bool godaemon, bool privileged);
+ void virLogLock(void);
+ void virLogUnlock(void);
+ int virLogReset(void);
++int virLogResetWithoutFree(void);
+ int virLogParseDefaultPriority(const char *priority);
+ int virLogPriorityFromSyslog(int priority);
+ void virLogMessage(virLogSourcePtr source,
+--
+2.28.0
+
+
+From 9d070b977c7031263504e32a753facc6a28f5980 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 19 Aug 2020 11:28:43 +0200
+Subject: [PATCH 2/2] util: command: improve generic mass close of fds
+
+Add a portable generic implementation of virMassClose as fallback on
+non-FreeBSD and non-glibc.
+
+This implementation uses poll(2) to look for open files to keep
+performance reasonable while not using any mallocs.
+
+This solves a deadlock with musl libc.
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ src/util/vircommand.c | 76 +++++++++++++++++++++++++++++++++----------
+ 1 file changed, 58 insertions(+), 18 deletions(-)
+
+diff --git a/src/util/vircommand.c b/src/util/vircommand.c
+index 17e5bb00d3..06579cfb44 100644
+--- a/src/util/vircommand.c
++++ b/src/util/vircommand.c
+@@ -443,7 +443,7 @@ virExecCommon(virCommandPtr cmd, gid_t *groups, int ngroups)
+ return 0;
+ }
+
+-# ifdef __linux__
++# if defined(__linux__) && defined(__GLIBC__)
+ /* On Linux, we can utilize procfs and read the table of opened
+ * FDs and selectively close only those FDs we don't want to pass
+ * onto child process (well, the one we will exec soon since this
+@@ -482,17 +482,7 @@ virCommandMassCloseGetFDsLinux(virCommandPtr cmd G_GNUC_UNUSED,
+ VIR_DIR_CLOSE(dp);
+ return ret;
+ }
+-
+-# else /* !__linux__ */
+-
+-static int
+-virCommandMassCloseGetFDsGeneric(virCommandPtr cmd G_GNUC_UNUSED,
+- virBitmapPtr fds)
+-{
+- virBitmapSetAll(fds);
+- return 0;
+-}
+-# endif /* !__linux__ */
++# endif /* __linux__ && __GLIBC__ */
+
+ # ifdef __FreeBSD__
+
+@@ -546,7 +536,7 @@ virCommandMassClose(virCommandPtr cmd,
+ return 0;
+ }
+
+-# else /* ! __FreeBSD__ */
++# elif defined(__GLIBC__) /* ! __FreeBSD__ */
+
+ static int
+ virCommandMassClose(virCommandPtr cmd,
+@@ -574,13 +564,8 @@ virCommandMassClose(virCommandPtr cmd,
+ if (!(fds = virBitmapNew(openmax)))
+ return -1;
+
+-# ifdef __linux__
+ if (virCommandMassCloseGetFDsLinux(cmd, fds) < 0)
+ return -1;
+-# else
+- if (virCommandMassCloseGetFDsGeneric(cmd, fds) < 0)
+- return -1;
+-# endif
+
+ fd = virBitmapNextSetBit(fds, 2);
+ for (; fd >= 0; fd = virBitmapNextSetBit(fds, fd)) {
+@@ -598,6 +583,61 @@ virCommandMassClose(virCommandPtr cmd,
+ return 0;
+ }
+
++#else /* ! __FreeBSD__ && ! __GLIBC__ */
++static int
++virCommandMassClose(virCommandPtr cmd,
++ int childin,
++ int childout,
++ int childerr)
++{
++ static struct pollfd pfds[1024];
++ int fd = 0;
++ int i, total;
++ int max_fd = sysconf(_SC_OPEN_MAX);
++
++ if (max_fd < 0) {
++ virReportSystemError(errno, "%s", _("sysconf(_SC_OPEN_MAX) failed"));
++ return -1;
++ }
++
++ total = max_fd - fd;
++ for (i = 0; i < (total < 1024 ? total : 1024); i++)
++ pfds[i].events = 0;
++
++ while (fd < max_fd) {
++ int nfds, r = 0;
++
++ total = max_fd - fd;
++ nfds = total < 1024 ? total : 1024;
++
++ for (i = 0; i < nfds; i++)
++ pfds[i].fd = fd + i;
++
++ do {
++ r = poll(pfds, nfds, 0);
++ } while (r == -1 && errno == EINTR);
++
++ if (r < 0) {
++ virReportSystemError(errno, "%s", _("poll() failed"));
++ return -1;
++ }
++
++ for (i = 0; i < nfds; i++)
++ if (pfds[i].revents != POLLNVAL) {
++ if (pfds[i].fd == childin || pfds[i].fd == childout || pfds[i].fd == childerr)
++ continue;
++ if (!virCommandFDIsSet(cmd, pfds[i].fd)) {
++ VIR_MASS_CLOSE(pfds[i].fd);
++ } else if (virSetInherit(pfds[i].fd, true) < 0) {
++ virReportSystemError(errno, _("failed to preserve fd %d"), pfds[i].fd);
++ return -1;
++ }
++ }
++ fd += nfds;
++ }
++ return 0;
++}
++
+ # endif /* ! __FreeBSD__ */
+
+ /*
+--
+2.28.0
+
diff --git a/app-emulation/libvirt/files/libvirt/stderr-fix.patch b/app-emulation/libvirt/files/libvirt/stderr-fix.patch
new file mode 100644
index 00000000..9d267218
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt/stderr-fix.patch
@@ -0,0 +1,13 @@
+--- a/src/qemu/qemu_process.c 2019-03-07 18:52:23.722271821 +0100
++++ b/src/qemu/qemu_process.c 2019-03-07 18:53:53.129064501 +0100
+@@ -92,6 +92,10 @@
+
+ VIR_LOG_INIT("qemu.qemu_process");
+
++#ifdef stderr
++# undef stderr
++#endif
++
+ /**
+ * qemuProcessRemoveDomainStatus
+ *
diff --git a/app-emulation/libvirt/files/libvirtd.init-r16 b/app-emulation/libvirt/files/libvirtd.init-r19
index be660e35..ee3a6515 100644
--- a/app-emulation/libvirt/files/libvirtd.init-r16
+++ b/app-emulation/libvirt/files/libvirtd.init-r19
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2021 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"
-pidfile="/var/run/libvirtd.pid"
+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() {
@@ -29,6 +26,8 @@ start_pre() {
checkpath --directory /etc/libvirt/lxc || return 1
checkpath --directory /etc/libvirt/nwfilter || return 1
- checkpath --directory /etc/libvirt/qemu || return 1
- checkpath --directory /etc/libvirt/storage || return 1
+ [ -L /etc/libvirt/qemu ] ||
+ checkpath --directory /etc/libvirt/qemu || return 1
+ [ -L /etc/libvirt/storage ] ||
+ checkpath --directory /etc/libvirt/storage || return 1
}
diff --git a/app-emulation/libvirt/files/libvirtd.service.conf b/app-emulation/libvirt/files/libvirtd.service.conf
deleted file mode 100644
index f0879226..00000000
--- 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-r1 b/app-emulation/libvirt/files/virtlockd.init-r2
index e7c3db29..2978f396 100644
--- a/app-emulation/libvirt/files/virtlockd.init-r1
+++ b/app-emulation/libvirt/files/virtlockd.init-r2
@@ -1,11 +1,11 @@
#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="libvirt virtual machine lock manager"
command="/usr/sbin/virtlockd"
-command_args="-d"
-pidfile="/var/run/virtlockd.pid"
+start_stop_daemon_args="-b"
+pidfile="/run/virtlockd.pid"
extra_started_commands="reload"
description_reload="re-exec the daemon, while maintaining locks and clients"
diff --git a/app-emulation/libvirt/files/virtlogd.init-r1 b/app-emulation/libvirt/files/virtlogd.init-r2
index 438070e3..7f22f407 100644
--- a/app-emulation/libvirt/files/virtlogd.init-r1
+++ b/app-emulation/libvirt/files/virtlogd.init-r2
@@ -1,11 +1,11 @@
#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="libvirt virtual machine logging manager"
command="/usr/sbin/virtlogd"
-command_args="-d"
-pidfile="/var/run/virtlogd.pid"
+start_stop_daemon_args="-b"
+pidfile="/run/virtlogd.pid"
extra_started_commands="reload"
description_reload="re-exec the daemon, while maintaining open connections"
diff --git a/app-emulation/libvirt/libvirt-4.10.0.ebuild b/app-emulation/libvirt/libvirt-4.10.0.ebuild
deleted file mode 100644
index 51b79a46..00000000
--- a/app-emulation/libvirt/libvirt-4.10.0.ebuild
+++ /dev/null
@@ -1,388 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_7 )
-
-inherit autotools bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd user
-
-if [[ ${PV} = *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://libvirt.org/git/libvirt.git"
- SRC_URI=""
- KEYWORDS=""
- SLOT="0"
-else
- # Versions with 4 numbers are stable updates:
- if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then
- SRC_URI="https://libvirt.org/sources/stable_updates/${P}.tar.xz"
- else
- SRC_URI="https://libvirt.org/sources/${P}.tar.xz"
- fi
- KEYWORDS="~amd64 ~arm64 ~x86"
- SLOT="0/${PV}"
-fi
-
-DESCRIPTION="C toolkit to manipulate virtual machines"
-HOMEPAGE="http://www.libvirt.org/"
-LICENSE="LGPL-2.1"
-IUSE="
- apparmor audit +caps +dbus firewalld fuse glusterfs iscsi +libvirtd lvm
- libssh lxc +macvtap nfs nls numa openvz parted pcap phyp policykit
- +qemu rbd sasl selinux +udev uml +vepa virtualbox virt-network
- wireshark-plugins xen zeroconf zfs
-"
-
-REQUIRED_USE="
- firewalld? ( virt-network )
- libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) )
- lxc? ( caps libvirtd )
- openvz? ( libvirtd )
- policykit? ( dbus )
- qemu? ( libvirtd )
- uml? ( libvirtd )
- vepa? ( macvtap )
- virt-network? ( libvirtd )
- virtualbox? ( libvirtd )
- xen? ( libvirtd )"
-
-# gettext.sh command is used by the libvirt command wrappers, and it's
-# non-optional, so put it into RDEPEND.
-# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
-# package will use 3 by default. Since we don't have slot pinning in an API,
-# we must go with the most recent
-RDEPEND="
- app-misc/scrub
- dev-libs/libgcrypt:0
- dev-libs/libnl:3
- >=dev-libs/libxml2-2.7.6
- || (
- >=net-analyzer/gnu-netcat-0.7.1-r3
- >=net-analyzer/netcat-110-r9
- >=net-analyzer/netcat6-1.0-r2
- >=net-analyzer/openbsd-netcat-1.105-r1
- )
- >=net-libs/gnutls-1.0.25:0=
- net-libs/libssh2
- net-libs/libtirpc
- net-libs/rpcsvc-proto
- >=net-misc/curl-7.18.0
- sys-apps/dmidecode
- >=sys-apps/util-linux-2.17
- sys-devel/gettext
- sys-libs/ncurses:0=
- sys-libs/readline:=
- apparmor? ( sys-libs/libapparmor )
- audit? ( sys-process/audit )
- caps? ( sys-libs/libcap-ng )
- dbus? ( sys-apps/dbus )
- firewalld? ( net-firewall/firewalld )
- fuse? ( >=sys-fs/fuse-2.8.6:= )
- glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
- iscsi? ( sys-block/open-iscsi )
- libssh? ( net-libs/libssh )
- lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
- nfs? ( net-fs/nfs-utils )
- numa? (
- >sys-process/numactl-2.0.2
- sys-process/numad
- )
- parted? (
- >=sys-block/parted-1.8[device-mapper]
- sys-fs/lvm2[-device-mapper-only(-)]
- )
- pcap? ( >=net-libs/libpcap-1.0.0 )
- policykit? ( >=sys-auth/polkit-0.9 )
- qemu? (
- >=app-emulation/qemu-1.5.0
- dev-libs/yajl
- )
- rbd? ( sys-cluster/ceph )
- sasl? ( dev-libs/cyrus-sasl )
- selinux? ( >=sys-libs/libselinux-2.0.85 )
- virt-network? (
- net-dns/dnsmasq[script]
- net-firewall/ebtables
- >=net-firewall/iptables-1.4.10[ipv6]
- net-misc/radvd
- sys-apps/iproute2[-minimal]
- )
- virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) )
- wireshark-plugins? ( net-analyzer/wireshark:= )
- xen? (
- >=app-emulation/xen-4.6.0
- app-emulation/xen-tools:=
- )
- udev? (
- virtual/udev
- >=x11-libs/libpciaccess-0.10.9
- )
- zeroconf? ( >=net-dns/avahi-0.6[dbus] )
- zfs? ( sys-fs/zfs )"
-
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- app-text/xhtml1
- dev-lang/perl
- dev-libs/libxslt
- dev-perl/XML-XPath
- virtual/pkgconfig"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-4.5.0-do_not_use_sysconf.patch
- "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch
- "${FILESDIR}"/${PN}-4.10.0-fix_apparmor_rules.patch
- "${FILESDIR}"/${PN}-4.10.0-musl.patch
-)
-
-pkg_setup() {
- if use qemu; then
- enewgroup qemu 77
- enewuser qemu 77 -1 -1 "qemu,kvm"
- fi
-
- use policykit && enewgroup libvirt
-
- # Check kernel configuration:
- CONFIG_CHECK=""
- use fuse && CONFIG_CHECK+="
- ~FUSE_FS"
-
- use lvm && CONFIG_CHECK+="
- ~BLK_DEV_DM
- ~DM_MULTIPATH
- ~DM_SNAPSHOT"
-
- use lxc && CONFIG_CHECK+="
- ~BLK_CGROUP
- ~CGROUP_CPUACCT
- ~CGROUP_DEVICE
- ~CGROUP_FREEZER
- ~CGROUP_NET_PRIO
- ~CGROUP_PERF
- ~CGROUPS
- ~CGROUP_SCHED
- ~CPUSETS
- ~IPC_NS
- ~MACVLAN
- ~NAMESPACES
- ~NET_CLS_CGROUP
- ~NET_NS
- ~PID_NS
- ~POSIX_MQUEUE
- ~SECURITYFS
- ~USER_NS
- ~UTS_NS
- ~VETH
- ~!GRKERNSEC_CHROOT_MOUNT
- ~!GRKERNSEC_CHROOT_DOUBLE
- ~!GRKERNSEC_CHROOT_PIVOT
- ~!GRKERNSEC_CHROOT_CHMOD
- ~!GRKERNSEC_CHROOT_CAPS"
-
- kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
- ~DEVPTS_MULTIPLE_INSTANCES"
-
- use macvtap && CONFIG_CHECK+="
- ~MACVTAP"
-
- use virt-network && CONFIG_CHECK+="
- ~BRIDGE_EBT_MARK_T
- ~BRIDGE_NF_EBTABLES
- ~NETFILTER_ADVANCED
- ~NETFILTER_XT_CONNMARK
- ~NETFILTER_XT_MARK
- ~NETFILTER_XT_TARGET_CHECKSUM"
- # Bandwidth Limiting Support
- use virt-network && CONFIG_CHECK+="
- ~BRIDGE_EBT_T_NAT
- ~IP_NF_TARGET_REJECT
- ~NET_ACT_POLICE
- ~NET_CLS_FW
- ~NET_CLS_U32
- ~NET_SCH_HTB
- ~NET_SCH_INGRESS
- ~NET_SCH_SFQ"
-
- # Handle specific kernel versions for different features
- kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
- if kernel_is ge 3 6; then
- CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP "
- kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM "
- fi
-
- ERROR_USER_NS="Optional depending on LXC configuration."
-
- if [[ -n ${CONFIG_CHECK} ]]; then
- linux-info_pkg_setup
- fi
-}
-
-src_prepare() {
- touch "${S}/.mailmap"
-
- default
-
- if [[ ${PV} = *9999* ]]; then
- # git checkouts require bootstrapping to create the configure script.
- # Additionally the submodules must be cloned to the right locations
- # bug #377279
- ./bootstrap || die "bootstrap failed"
- (
- git submodule status | sed 's/^[ +-]//;s/ .*//'
- git hash-object bootstrap.conf
- ) >.git-module-status
- fi
-
- # Tweak the init script:
- cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die
- sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
- -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \
- -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \
- -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \
- -i "${S}/libvirtd.init" || die "sed failed"
-
- eautoreconf
-}
-
-src_configure() {
- local myeconfargs=(
- $(use_with apparmor)
- $(use_with apparmor apparmor-profiles)
- $(use_with audit)
- $(use_with caps capng)
- $(use_with dbus)
- $(use_with firewalld)
- $(use_with fuse)
- $(use_with glusterfs)
- $(use_with glusterfs storage-gluster)
- $(use_with iscsi storage-iscsi)
- $(use_with libvirtd)
- $(use_with libssh)
- $(use_with lvm storage-lvm)
- $(use_with lvm storage-mpath)
- $(use_with lxc)
- $(use_with macvtap)
- $(use_enable nls)
- $(use_with numa numactl)
- $(use_with numa numad)
- $(use_with openvz)
- $(use_with parted storage-disk)
- $(use_with pcap libpcap)
- $(use_with phyp)
- $(use_with policykit polkit)
- $(use_with qemu)
- $(use_with qemu yajl)
- $(use_with rbd storage-rbd)
- $(use_with sasl)
- $(use_with selinux)
- $(use_with udev)
- $(use_with uml)
- $(use_with vepa virtualport)
- $(use_with virt-network network)
- $(use_with wireshark-plugins wireshark-dissector)
- $(use_with xen libxl)
- $(use_with zeroconf avahi)
- $(use_with zfs storage-zfs)
-
- --without-hal
- --without-netcf
- --without-sanlock
-
- --with-esx
- --with-init-script=systemd
- --with-qemu-group=$(usex caps qemu root)
- --with-qemu-user=$(usex caps qemu root)
- --with-remote
- --with-storage-fs
- --with-vmware
-
- --disable-static
- --disable-werror
-
- --with-html-subdir=${PF}/html
- --localstatedir=/var
- )
-
- if use virtualbox && has_version app-emulation/virtualbox-ose; then
- myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ )
- else
- myeconfargs+=( $(use_with virtualbox vbox) )
- fi
-
- econf "${myeconfargs[@]}"
-
- if [[ ${PV} = *9999* ]]; then
- # Restore gnulib's config.sub and config.guess
- # bug #377279
- (cd .gnulib && git reset --hard > /dev/null)
- fi
-}
-
-src_test() {
- cd "${BUILD_DIR}"
-
- # remove problematic tests, bug #591416, bug #591418
- sed -i -e 's#commandtest$(EXEEXT) # #' \
- -e 's#virfirewalltest$(EXEEXT) # #' \
- -e 's#nwfilterebiptablestest$(EXEEXT) # #' \
- -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \
- tests/Makefile
-
- export VIR_TEST_DEBUG=1
- HOME="${T}" emake check || die "tests failed"
-}
-
-src_install() {
- emake DESTDIR="${D}" \
- SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install
-
- find "${D}" -name '*.la' -delete || die
-
- # Remove bogus, empty directories. They are either not used, or
- # libvirtd is able to create them on demand
- rm -rf "${D}"/etc/sysconfig
- rm -rf "${D}"/var
-
- use libvirtd || return 0
- # From here, only libvirtd-related instructions, be warned!
-
- systemd_install_serviced \
- "${FILESDIR}"/libvirtd.service.conf libvirtd.service
-
- systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
-
- newinitd "${S}/libvirtd.init" libvirtd || die
- newinitd "${FILESDIR}/libvirt-guests.init-r3" libvirt-guests || die
- newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die
- newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die
-
- newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die
- newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die
-
- newbashcomp "${S}/tools/bash-completion/vsh" vsh
- bashcomp_alias vsh virsh virt-admin
-
- DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2")
- DISABLE_AUTOFORMATTING=true
- readme.gentoo_create_doc
-}
-
-pkg_preinst() {
- # we only ever want to generate this once
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
- rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
- fi
-}
-
-pkg_postinst() {
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
- touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml
- fi
-
- use libvirtd || return 0
- # From here, only libvirtd-related instructions, be warned!
-
- readme.gentoo_print_elog
-}
diff --git a/app-emulation/libvirt/libvirt-6.8.0-r2.ebuild b/app-emulation/libvirt/libvirt-6.8.0-r2.ebuild
new file mode 100644
index 00000000..1eae6122
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-6.8.0-r2.ebuild
@@ -0,0 +1,351 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit meson bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 tmpfiles
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git"
+ SRC_URI=""
+ SLOT="0"
+else
+ SRC_URI="https://libvirt.org/sources/${P}.tar.xz"
+ KEYWORDS="amd64 ~arm64 ~ppc64 x86"
+ SLOT="0/${PV}"
+fi
+
+DESCRIPTION="C toolkit to manipulate virtual machines"
+HOMEPAGE="https://www.libvirt.org/"
+LICENSE="LGPL-2.1"
+IUSE="
+ apparmor audit +caps +dbus dtrace firewalld fuse glusterfs iscsi
+ iscsi-direct +libvirtd lvm libssh lxc +macvtap nfs nls numa openvz
+ parted pcap policykit +qemu rbd sasl selinux +udev +vepa
+ virtualbox +virt-network wireshark-plugins xen zfs
+"
+
+REQUIRED_USE="
+ firewalld? ( virt-network )
+ libvirtd? ( || ( lxc openvz qemu virtualbox xen ) )
+ lxc? ( caps libvirtd )
+ openvz? ( libvirtd )
+ policykit? ( dbus )
+ qemu? ( libvirtd )
+ vepa? ( macvtap )
+ virt-network? ( libvirtd )
+ virtualbox? ( libvirtd )
+ xen? ( libvirtd )"
+
+BDEPEND="
+ acct-user/qemu
+ policykit? ( acct-group/libvirt )
+ app-text/xhtml1
+ dev-lang/perl
+ dev-libs/libxslt
+ dev-perl/XML-XPath
+ dev-python/docutils
+ virtual/pkgconfig"
+
+# gettext.sh command is used by the libvirt command wrappers, and it's
+# non-optional, so put it into RDEPEND.
+# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
+# package will use 3 by default. Since we don't have slot pinning in an API,
+# we must go with the most recent
+RDEPEND="
+ app-misc/scrub
+ >=dev-libs/glib-2.48.0
+ dev-libs/libgcrypt:0
+ dev-libs/libnl:3
+ >=dev-libs/libxml2-2.7.6
+ >=net-analyzer/openbsd-netcat-1.105-r1
+ >=net-libs/gnutls-1.0.25:0=
+ net-libs/libssh2
+ net-libs/libtirpc
+ net-libs/rpcsvc-proto
+ >=net-misc/curl-7.18.0
+ sys-apps/dmidecode
+ sys-devel/gettext
+ sys-libs/ncurses:0=
+ sys-libs/readline:=
+ apparmor? ( sys-libs/libapparmor )
+ audit? ( sys-process/audit )
+ caps? ( sys-libs/libcap-ng )
+ dbus? ( sys-apps/dbus )
+ dtrace? ( dev-util/systemtap )
+ firewalld? ( >=net-firewall/firewalld-0.6.3 )
+ fuse? ( sys-fs/fuse:0= )
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
+ iscsi? ( sys-block/open-iscsi )
+ iscsi-direct? ( >=net-libs/libiscsi-1.18.0 )
+ libssh? ( net-libs/libssh )
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
+ nfs? ( net-fs/nfs-utils )
+ numa? (
+ >sys-process/numactl-2.0.2
+ sys-process/numad
+ )
+ parted? (
+ >=sys-block/parted-1.8[device-mapper]
+ sys-fs/lvm2[-device-mapper-only(-)]
+ )
+ pcap? ( >=net-libs/libpcap-1.0.0 )
+ policykit? ( >=sys-auth/polkit-0.9 )
+ qemu? (
+ >=app-emulation/qemu-1.5.0
+ dev-libs/yajl
+ )
+ rbd? ( sys-cluster/ceph )
+ sasl? ( dev-libs/cyrus-sasl )
+ selinux? ( >=sys-libs/libselinux-2.0.85 )
+ virt-network? (
+ net-dns/dnsmasq[script]
+ net-firewall/ebtables
+ >=net-firewall/iptables-1.4.10[ipv6]
+ net-misc/radvd
+ sys-apps/iproute2[-minimal]
+ )
+ wireshark-plugins? ( net-analyzer/wireshark:= )
+ xen? (
+ >=app-emulation/xen-4.6.0
+ app-emulation/xen-tools:=
+ )
+ udev? (
+ virtual/libudev
+ >=x11-libs/libpciaccess-0.10.9
+ )
+ zfs? ( sys-fs/zfs )"
+
+DEPEND="${BDEPEND}
+ ${RDEPEND}
+ ${PYTHON_DEPS}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
+ "${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch
+ "${FILESDIR}"/${PN}-6.7.0-doc-path.patch
+ "${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
+ "${FILESDIR}"/${PN}-6.8.0-fix-libvirt-lxc-dbus.patch
+ "${FILESDIR}"/${PN}-6.8.0-meson-properly-handle-libpcap-if-it-s-explicitly-dis.patch
+
+ # musl
+ "${FILESDIR}"/libvirt-fork-exec-deadlock.patch
+ "${FILESDIR}"/stderr-fix.patch
+ "${FILESDIR}"/musl-fix-includes.patch
+)
+
+pkg_setup() {
+ # Check kernel configuration:
+ CONFIG_CHECK=""
+ use fuse && CONFIG_CHECK+="
+ ~FUSE_FS"
+
+ use lvm && CONFIG_CHECK+="
+ ~BLK_DEV_DM
+ ~DM_MULTIPATH
+ ~DM_SNAPSHOT"
+
+ use lxc && CONFIG_CHECK+="
+ ~BLK_CGROUP
+ ~CGROUP_CPUACCT
+ ~CGROUP_DEVICE
+ ~CGROUP_FREEZER
+ ~CGROUP_NET_PRIO
+ ~CGROUP_PERF
+ ~CGROUPS
+ ~CGROUP_SCHED
+ ~CPUSETS
+ ~IPC_NS
+ ~MACVLAN
+ ~NAMESPACES
+ ~NET_CLS_CGROUP
+ ~NET_NS
+ ~PID_NS
+ ~POSIX_MQUEUE
+ ~SECURITYFS
+ ~USER_NS
+ ~UTS_NS
+ ~VETH
+ ~!GRKERNSEC_CHROOT_MOUNT
+ ~!GRKERNSEC_CHROOT_DOUBLE
+ ~!GRKERNSEC_CHROOT_PIVOT
+ ~!GRKERNSEC_CHROOT_CHMOD
+ ~!GRKERNSEC_CHROOT_CAPS"
+
+ kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
+ ~DEVPTS_MULTIPLE_INSTANCES"
+
+ use macvtap && CONFIG_CHECK+="
+ ~MACVTAP"
+
+ use virt-network && CONFIG_CHECK+="
+ ~BRIDGE_EBT_MARK_T
+ ~BRIDGE_NF_EBTABLES
+ ~NETFILTER_ADVANCED
+ ~NETFILTER_XT_CONNMARK
+ ~NETFILTER_XT_MARK
+ ~NETFILTER_XT_TARGET_CHECKSUM
+ ~IP_NF_FILTER
+ ~IP_NF_MANGLE
+ ~IP_NF_NAT
+ ~IP_NF_TARGET_MASQUERADE
+ ~IP6_NF_FILTER
+ ~IP6_NF_MANGLE
+ ~IP6_NF_NAT"
+ # Bandwidth Limiting Support
+ use virt-network && CONFIG_CHECK+="
+ ~BRIDGE_EBT_T_NAT
+ ~IP_NF_TARGET_REJECT
+ ~NET_ACT_POLICE
+ ~NET_CLS_FW
+ ~NET_CLS_U32
+ ~NET_SCH_HTB
+ ~NET_SCH_INGRESS
+ ~NET_SCH_SFQ"
+
+ # Handle specific kernel versions for different features
+ kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
+ if kernel_is ge 3 6; then
+ CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP "
+ kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM "
+ fi
+
+ ERROR_USER_NS="Optional depending on LXC configuration."
+
+ if [[ -n ${CONFIG_CHECK} ]]; then
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ touch "${S}/.mailmap" || die
+
+ default
+
+ # Tweak the init script:
+ cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die
+ sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
+ -i "${S}/libvirtd.init" || die "sed failed"
+}
+
+src_configure() {
+ local emesonargs=(
+ $(meson_feature apparmor)
+ $(meson_use apparmor apparmor_profiles)
+ $(meson_feature audit)
+ $(meson_feature caps capng)
+ $(meson_feature dbus)
+ $(meson_feature dtrace)
+ $(meson_feature firewalld)
+ $(meson_feature fuse)
+ $(meson_feature glusterfs)
+ $(meson_feature glusterfs storage_gluster)
+ $(meson_feature iscsi storage_iscsi)
+ $(meson_feature iscsi-direct storage_iscsi_direct)
+ $(meson_feature libvirtd driver_libvirtd)
+ $(meson_feature libssh)
+ $(meson_feature lvm storage_lvm)
+ $(meson_feature lvm storage_mpath)
+ $(meson_feature lxc driver_lxc)
+ $(meson_feature macvtap)
+ $(meson_feature nls)
+ $(meson_feature numa numactl)
+ $(meson_feature numa numad)
+ $(meson_feature openvz driver_openvz)
+ $(meson_feature parted storage_disk)
+ $(meson_feature pcap libpcap)
+ $(meson_feature policykit polkit)
+ $(meson_feature qemu driver_qemu)
+ $(meson_feature qemu yajl)
+ $(meson_feature rbd storage_rbd)
+ $(meson_feature sasl)
+ $(meson_feature selinux)
+ $(meson_feature udev)
+ $(meson_feature vepa virtualport)
+ $(meson_feature virt-network driver_network)
+ $(meson_feature virtualbox driver_vbox)
+ $(meson_feature wireshark-plugins wireshark_dissector)
+ $(meson_feature xen driver_libxl)
+ $(meson_feature zfs storage_zfs)
+
+ -Dhal=disabled
+ -Dnetcf=disabled
+ -Dsanlock=disabled
+
+ -Ddriver_esx=enabled
+ -Dinit_script=systemd
+ -Dqemu_user=$(usex caps qemu root)
+ -Dqemu_group=$(usex caps qemu root)
+ -Ddriver_remote=enabled
+ -Dstorage_fs=enabled
+ -Ddriver_vmware=enabled
+
+ --localstatedir="${EPREFIX}/var"
+ -Drunstatedir="${EPREFIX}/run"
+ )
+
+ meson_src_configure
+}
+
+src_test() {
+ # remove problematic tests, bug #591416, bug #591418
+ sed -i -e 's#commandtest$(EXEEXT) # #' \
+ -e 's#virfirewalltest$(EXEEXT) # #' \
+ -e 's#nwfilterebiptablestest$(EXEEXT) # #' \
+ -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \
+ tests/Makefile
+
+ export VIR_TEST_DEBUG=1
+ meson_src_test
+}
+
+src_install() {
+ meson_src_install
+
+ # Remove bogus, empty directories. They are either not used, or
+ # libvirtd is able to create them on demand
+ rm -rf "${D}"/etc/sysconfig || die
+ rm -rf "${D}"/var || die
+ rm -rf "${D}"/run || die
+
+ newbashcomp "${S}/tools/bash-completion/vsh" virsh
+ bashcomp_alias virsh virt-admin
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ newtmpfiles "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
+
+ newinitd "${S}/libvirtd.init" libvirtd
+ newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests
+ newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd
+ newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd
+
+ newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd
+ newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests
+
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3")
+ DISABLE_AUTOFORMATTING=true
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ # we only ever want to generate this once
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
+ rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml || die
+ fi
+}
+
+pkg_postinst() {
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
+ touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die
+ fi
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ readme.gentoo_print_elog
+}
diff --git a/app-emulation/libvirt/libvirt-7.0.0-r1.ebuild b/app-emulation/libvirt/libvirt-7.0.0-r1.ebuild
new file mode 100644
index 00000000..2370f97a
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-7.0.0-r1.ebuild
@@ -0,0 +1,348 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit meson bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 tmpfiles
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git"
+ SRC_URI=""
+ SLOT="0"
+else
+ SRC_URI="https://libvirt.org/sources/${P}.tar.xz"
+ KEYWORDS="amd64 ~arm64 ~ppc64 x86"
+ SLOT="0/${PV}"
+fi
+
+DESCRIPTION="C toolkit to manipulate virtual machines"
+HOMEPAGE="https://www.libvirt.org/"
+LICENSE="LGPL-2.1"
+IUSE="
+ apparmor audit +caps dtrace firewalld fuse glusterfs iscsi
+ iscsi-direct +libvirtd lvm libssh lxc nfs nls numa openvz
+ parted pcap policykit +qemu rbd sasl selinux +udev
+ virtualbox +virt-network wireshark-plugins xen zfs
+"
+
+REQUIRED_USE="
+ firewalld? ( virt-network )
+ libvirtd? ( || ( lxc openvz qemu virtualbox xen ) )
+ lxc? ( caps libvirtd )
+ openvz? ( libvirtd )
+ qemu? ( libvirtd )
+ virt-network? ( libvirtd )
+ virtualbox? ( libvirtd )
+ xen? ( libvirtd )"
+
+BDEPEND="
+ app-text/xhtml1
+ dev-lang/perl
+ dev-libs/libxslt
+ dev-perl/XML-XPath
+ dev-python/docutils
+ virtual/pkgconfig"
+
+# gettext.sh command is used by the libvirt command wrappers, and it's
+# non-optional, so put it into RDEPEND.
+# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
+# package will use 3 by default. Since we don't have slot pinning in an API,
+# we must go with the most recent
+RDEPEND="
+ acct-user/qemu
+ app-misc/scrub
+ >=dev-libs/glib-2.48.0
+ dev-libs/libgcrypt:0
+ dev-libs/libnl:3
+ >=dev-libs/libxml2-2.7.6
+ >=net-analyzer/openbsd-netcat-1.105-r1
+ >=net-libs/gnutls-1.0.25:0=
+ net-libs/libssh2
+ net-libs/libtirpc
+ net-libs/rpcsvc-proto
+ >=net-misc/curl-7.18.0
+ sys-apps/dbus
+ sys-apps/dmidecode
+ sys-devel/gettext
+ sys-libs/ncurses:0=
+ sys-libs/readline:=
+ virtual/acl
+ apparmor? ( sys-libs/libapparmor )
+ audit? ( sys-process/audit )
+ caps? ( sys-libs/libcap-ng )
+ dtrace? ( dev-util/systemtap )
+ firewalld? ( >=net-firewall/firewalld-0.6.3 )
+ fuse? ( sys-fs/fuse:0= )
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
+ iscsi? ( sys-block/open-iscsi )
+ iscsi-direct? ( >=net-libs/libiscsi-1.18.0 )
+ libssh? ( net-libs/libssh )
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
+ lxc? ( !sys-apps/systemd[cgroup-hybrid(-)] )
+ nfs? ( net-fs/nfs-utils )
+ numa? (
+ >sys-process/numactl-2.0.2
+ sys-process/numad
+ )
+ parted? (
+ >=sys-block/parted-1.8[device-mapper]
+ sys-fs/lvm2[-device-mapper-only(-)]
+ )
+ pcap? ( >=net-libs/libpcap-1.0.0 )
+ policykit? (
+ acct-group/libvirt
+ >=sys-auth/polkit-0.9
+ )
+ qemu? (
+ >=app-emulation/qemu-1.5.0
+ dev-libs/yajl
+ )
+ rbd? ( sys-cluster/ceph )
+ sasl? ( dev-libs/cyrus-sasl )
+ selinux? ( >=sys-libs/libselinux-2.0.85 )
+ virt-network? (
+ net-dns/dnsmasq[dhcp,ipv6,script]
+ net-firewall/ebtables
+ >=net-firewall/iptables-1.4.10[ipv6]
+ net-misc/radvd
+ sys-apps/iproute2[-minimal]
+ )
+ wireshark-plugins? ( net-analyzer/wireshark:= )
+ xen? (
+ >=app-emulation/xen-4.6.0
+ app-emulation/xen-tools:=
+ )
+ udev? (
+ virtual/libudev
+ >=x11-libs/libpciaccess-0.10.9
+ )
+ zfs? ( sys-fs/zfs )"
+
+DEPEND="${BDEPEND}
+ ${RDEPEND}
+ ${PYTHON_DEPS}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
+ "${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch
+ "${FILESDIR}"/${PN}-6.7.0-doc-path.patch
+ "${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
+
+ # musl
+ "${FILESDIR}"/libvirt-fork-exec-deadlock.patch
+ "${FILESDIR}"/stderr-fix.patch
+ "${FILESDIR}"/musl-fix-includes.patch
+)
+
+pkg_setup() {
+ # Check kernel configuration:
+ CONFIG_CHECK=""
+ use fuse && CONFIG_CHECK+="
+ ~FUSE_FS"
+
+ use lvm && CONFIG_CHECK+="
+ ~BLK_DEV_DM
+ ~DM_MULTIPATH
+ ~DM_SNAPSHOT"
+
+ use lxc && CONFIG_CHECK+="
+ ~BLK_CGROUP
+ ~CGROUP_CPUACCT
+ ~CGROUP_DEVICE
+ ~CGROUP_FREEZER
+ ~CGROUP_NET_PRIO
+ ~CGROUP_PERF
+ ~CGROUPS
+ ~CGROUP_SCHED
+ ~CPUSETS
+ ~IPC_NS
+ ~MACVLAN
+ ~NAMESPACES
+ ~NET_CLS_CGROUP
+ ~NET_NS
+ ~PID_NS
+ ~POSIX_MQUEUE
+ ~SECURITYFS
+ ~USER_NS
+ ~UTS_NS
+ ~VETH
+ ~!GRKERNSEC_CHROOT_MOUNT
+ ~!GRKERNSEC_CHROOT_DOUBLE
+ ~!GRKERNSEC_CHROOT_PIVOT
+ ~!GRKERNSEC_CHROOT_CHMOD
+ ~!GRKERNSEC_CHROOT_CAPS"
+
+ kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
+ ~DEVPTS_MULTIPLE_INSTANCES"
+
+ use virt-network && CONFIG_CHECK+="
+ ~BRIDGE_EBT_MARK_T
+ ~BRIDGE_NF_EBTABLES
+ ~NETFILTER_ADVANCED
+ ~NETFILTER_XT_CONNMARK
+ ~NETFILTER_XT_MARK
+ ~NETFILTER_XT_TARGET_CHECKSUM
+ ~IP_NF_FILTER
+ ~IP_NF_MANGLE
+ ~IP_NF_NAT
+ ~IP_NF_TARGET_MASQUERADE
+ ~IP6_NF_FILTER
+ ~IP6_NF_MANGLE
+ ~IP6_NF_NAT"
+ # Bandwidth Limiting Support
+ use virt-network && CONFIG_CHECK+="
+ ~BRIDGE_EBT_T_NAT
+ ~IP_NF_TARGET_REJECT
+ ~NET_ACT_POLICE
+ ~NET_CLS_FW
+ ~NET_CLS_U32
+ ~NET_SCH_HTB
+ ~NET_SCH_INGRESS
+ ~NET_SCH_SFQ"
+
+ # Handle specific kernel versions for different features
+ kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
+ if kernel_is ge 3 6; then
+ CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP "
+ kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM "
+ fi
+
+ ERROR_USER_NS="Optional depending on LXC configuration."
+
+ if [[ -n ${CONFIG_CHECK} ]]; then
+ linux-info_pkg_setup
+ fi
+
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ touch "${S}/.mailmap" || die
+
+ default
+ python_fix_shebang .
+
+ # Tweak the init script:
+ cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die
+ sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
+ -i "${S}/libvirtd.init" || die "sed failed"
+
+ eapply_user
+}
+
+src_configure() {
+ local emesonargs=(
+ $(meson_feature apparmor)
+ $(meson_use apparmor apparmor_profiles)
+ $(meson_feature audit)
+ $(meson_feature caps capng)
+ $(meson_feature dtrace)
+ $(meson_feature firewalld)
+ $(meson_feature fuse)
+ $(meson_feature glusterfs)
+ $(meson_feature glusterfs storage_gluster)
+ $(meson_feature iscsi storage_iscsi)
+ $(meson_feature iscsi-direct storage_iscsi_direct)
+ $(meson_feature libvirtd driver_libvirtd)
+ $(meson_feature libssh)
+ $(meson_feature lvm storage_lvm)
+ $(meson_feature lvm storage_mpath)
+ $(meson_feature lxc driver_lxc)
+ $(meson_feature nls)
+ $(meson_feature numa numactl)
+ $(meson_feature numa numad)
+ $(meson_feature openvz driver_openvz)
+ $(meson_feature parted storage_disk)
+ $(meson_feature pcap libpcap)
+ $(meson_feature policykit polkit)
+ $(meson_feature qemu driver_qemu)
+ $(meson_feature qemu yajl)
+ $(meson_feature rbd storage_rbd)
+ $(meson_feature sasl)
+ $(meson_feature selinux)
+ $(meson_feature udev)
+ $(meson_feature virt-network driver_network)
+ $(meson_feature virtualbox driver_vbox)
+ $(meson_feature wireshark-plugins wireshark_dissector)
+ $(meson_feature xen driver_libxl)
+ $(meson_feature zfs storage_zfs)
+
+ -Dnetcf=disabled
+ -Dsanlock=disabled
+
+ -Ddriver_esx=enabled
+ -Dinit_script=systemd
+ -Dqemu_user=$(usex caps qemu root)
+ -Dqemu_group=$(usex caps qemu root)
+ -Ddriver_remote=enabled
+ -Dstorage_fs=enabled
+ -Ddriver_vmware=enabled
+
+ --localstatedir="${EPREFIX}/var"
+ -Drunstatedir="${EPREFIX}/run"
+ )
+
+ meson_src_configure
+}
+
+src_test() {
+ export VIR_TEST_DEBUG=1
+ meson_src_test
+}
+
+src_install() {
+ meson_src_install
+
+ # Remove bogus, empty directories. They are either not used, or
+ # libvirtd is able to create them on demand
+ rm -rf "${D}"/etc/sysconfig || die
+ rm -rf "${D}"/var || die
+ rm -rf "${D}"/run || die
+
+ # Fix up doc paths for revisions
+ if [ $PV != $PVR ]; then
+ mv "${D}"/usr/share/doc/${PN}-${PV}/* "${D}"/usr/share/doc/${PF} || die
+ rmdir "${D}"/usr/share/doc/${PN}-${PV} || die
+ fi
+
+ newbashcomp "${S}/tools/bash-completion/vsh" virsh
+ bashcomp_alias virsh virt-admin
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ newtmpfiles "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
+
+ newinitd "${S}/libvirtd.init" libvirtd
+ newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests
+ newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd
+ newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd
+
+ newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd
+ newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests
+
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3")
+ DISABLE_AUTOFORMATTING=true
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ # we only ever want to generate this once
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
+ rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml || die
+ fi
+}
+
+pkg_postinst() {
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
+ touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die
+ fi
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ readme.gentoo_print_elog
+}
diff --git a/app-emulation/libvirt/metadata.xml b/app-emulation/libvirt/metadata.xml
index 06697bca..5151b9df 100644
--- a/app-emulation/libvirt/metadata.xml
+++ b/app-emulation/libvirt/metadata.xml
@@ -11,6 +11,9 @@
</maintainer>
<use>
<!-- Pool backend flags -->
+ <flag name="iscsi-direct">
+ Allow using libiscsi for iSCSI storage pool backend
+ </flag>
<flag name="iscsi">
Allow using an iSCSI remote storage server as pool for disk image storage
</flag>
@@ -35,9 +38,6 @@
<flag name="openvz">
Support management of OpenVZ virtualisation (openvz-sources)
</flag>
- <flag name="uml">
- Support management of User Mode Linux virtualisation
- </flag>
<flag name="qemu">
Support management of QEMU virtualisation (<pkg>app-emulation/qemu</pkg>)
</flag>
@@ -45,14 +45,11 @@
Support management of Xen virtualisation (<pkg>app-emulation/xen</pkg>)
</flag>
<flag name="virtualbox">
- Support management of VirtualBox virtualisation (one of <pkg>app-emulation/virtualbox</pkg> or
- <pkg>app-emulation/virtualbox-bin</pkg>)
- </flag>
- <flag name="phyp">
- Support IBM HMC / IVM hypervisor via PHYP protocol
+ Support management of VirtualBox virtualisation (<pkg>app-emulation/virtualbox</pkg>)
</flag>
<!-- Miscellaneous flags -->
<flag name="apparmor">Enable AppArmor support</flag>
+ <flag name="dtrace">Enable dtrace support via <pkg>dev-util/systemtap</pkg></flag>
<flag name="fuse">Allow LXC to use <pkg>sys-fs/fuse</pkg> for mount
points</flag>
<flag name="numa">
@@ -72,9 +69,7 @@
</flag>
<flag name="macvtap">
Support for MAC-based TAP (macvlan/macvtap). For networking instead
- of the normal TUN/TAP. It has its advantages and disadvantages.
- macvtap support requires very new kernels and is
- currently evolving. Support for this is experimental at best.
+ of the normal TUN/TAP.
</flag>
<flag name="vepa">Virtual Ethernet Port Aggregator (VEPA) / 802.1Qbg
support. Relies on macvtap support.</flag>