aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-05-31 01:31:02 +0100
committerSam James <sam@gentoo.org>2023-05-31 01:31:02 +0100
commit0ed6d9a3bdc9ac25764d908c9dc90aa6ca48ff5e (patch)
tree0dbf7c57bbf546fe5c6d53c044337c06e7cb3f55
parentsys-devel/gdb: use app-alternatives/yacc (diff)
downloadmusl-0ed6d9a3bdc9ac25764d908c9dc90aa6ca48ff5e.tar.gz
musl-0ed6d9a3bdc9ac25764d908c9dc90aa6ca48ff5e.tar.bz2
musl-0ed6d9a3bdc9ac25764d908c9dc90aa6ca48ff5e.zip
app-emulation/libvirt: treeclean
::gentoo should be OK now. Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--app-emulation/libvirt/Manifest2
-rw-r--r--app-emulation/libvirt/files/README.gentoo-r358
-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.confd68
-rw-r--r--app-emulation/libvirt/files/libvirt-guests.init-r4237
-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.confd-r518
-rw-r--r--app-emulation/libvirt/files/libvirtd.init-r1933
-rw-r--r--app-emulation/libvirt/files/libvirtd.tmpfiles.conf1
-rw-r--r--app-emulation/libvirt/files/virtlockd.init-r223
-rw-r--r--app-emulation/libvirt/files/virtlogd.init-r223
-rw-r--r--app-emulation/libvirt/libvirt-6.8.0-r3.ebuild351
-rw-r--r--app-emulation/libvirt/libvirt-7.0.0-r2.ebuild348
-rw-r--r--app-emulation/libvirt/metadata.xml97
20 files changed, 0 insertions, 1901 deletions
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
deleted file mode 100644
index 123787d8..00000000
--- a/app-emulation/libvirt/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-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-r3 b/app-emulation/libvirt/files/README.gentoo-r3
deleted file mode 100644
index 1fec12f0..00000000
--- a/app-emulation/libvirt/files/README.gentoo-r3
+++ /dev/null
@@ -1,58 +0,0 @@
-Important: The openrc libvirtd init script is now broken up into two
-separate services: libvirtd, that solely handles the daemon, and
-libvirt-guests, that takes care of clients during shutdown/restart of the
-host. In order to reenable client handling, edit /etc/conf.d/libvirt-guests
-and enable the service and start it:
-
- $ rc-update add libvirt-guests
- $ service libvirt-guests start
-
-
-For the basic networking support (bridged and routed networks) you don't
-need any extra software. For more complex network modes including but not
-limited to NATed network, you can enable the 'virt-network' USE flag. It
-will pull in required runtime dependencies
-
-
-If you are using dnsmasq on your system, you will have to configure
-/etc/dnsmasq.conf to enable the following settings:
-
- bind-interfaces
- interface or except-interface
-
-Otherwise you might have issues with your existing DNS server.
-
-
-For openrc users:
-
- Please use /etc/conf.d/libvirtd to control the '--listen' parameter for
- libvirtd.
-
- Use /etc/init.d/libvirt-guests to manage clients on restart/shutdown of
- the host. The default configuration will suspend and resume running kvm
- guests with 'managedsave'. This behavior can be changed under
- /etc/conf.d/libvirt-guests
-
-
-For systemd users:
-
- 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"
-
-
-If you have built libvirt with policykit support, a new group "libvirt" has
-been created. Simply add a user to the libvirt group in order to grant
-administrative access to libvirtd. Alternatively, drop a custom policykit
-rule into /etc/polkit-1/rules.d.
-
-If you have built libvirt without policykit support (USE=-policykit), you
-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 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-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
deleted file mode 100644
index bf7a328f..00000000
--- a/app-emulation/libvirt/files/libvirt-6.0.0-fix_paths_in_libvirt-guests_sh.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-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
deleted file mode 100644
index f3d2e3c3..00000000
--- a/app-emulation/libvirt/files/libvirt-6.7.0-do-not-use-sysconfig.patch
+++ /dev/null
@@ -1,169 +0,0 @@
---- 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
deleted file mode 100644
index 65eb35f3..00000000
--- a/app-emulation/libvirt/files/libvirt-6.7.0-doc-path.patch
+++ /dev/null
@@ -1,9 +0,0 @@
---- 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
deleted file mode 100644
index 18e7ef2d..00000000
--- a/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-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
deleted file mode 100644
index ea1a2379..00000000
--- a/app-emulation/libvirt/files/libvirt-6.8.0-fix-libvirt-lxc-dbus.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-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
deleted file mode 100644
index 46da07af..00000000
--- a/app-emulation/libvirt/files/libvirt-6.8.0-meson-properly-handle-libpcap-if-it-s-explicitly-dis.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-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.confd b/app-emulation/libvirt/files/libvirt-guests.confd
deleted file mode 100644
index ed2ce580..00000000
--- a/app-emulation/libvirt/files/libvirt-guests.confd
+++ /dev/null
@@ -1,68 +0,0 @@
-# /etc/conf.d/libvirtd
-
-# LIBVIRT_URIS
-# space separated list of libvirt URIs to communicate with to start/stop guests
-# Valid values are anything that can be passed to 'virsh connect'
-
-#LIBVIRT_URIS="qemu:///system"
-
-
-# LIBVIRT_SHUTDOWN
-# Valid options:
-# * managedsave - Performs a state save external to the VM (for hypervisors
-# supporting this operation). qemu-kvm will stop the CPU
-# and save off all state to a separate file. When the
-# machine is started again, it will resume like nothing
-# ever happened. This is guarenteed to always successfully
-# stop your machine and restart it.
-#
-# * shutdown - Sends an ACPI shutdown (think of this as a request to
-# your guest to shutdown). There is no way to distinguish
-# between guests that are ignoring the shutdown request or
-# are stuck or are taking a long time to shutdown. We will
-# wait LIBVIRT_MAXWAIT seconds before yanking the power
-# out.
-#
-# * destroy - Immediately stop all running guests. Use with caution as
-# this can leave the guest in a corrupted state and might
-# lead to data loss.
-#
-
-#LIBVIRT_SHUTDOWN="managedsave"
-
-
-# LIBVIRT_MAXWAIT
-# Timeout in seconds until stopping a guest and "pulling the plug" on the
-# guest
-# Valid values are any integer over 0
-
-#LIBVIRT_MAXWAIT="500"
-
-
-# LIBVIRT_START
-# If this value is set to 'no', then guests and networks that were shutdown
-# by this script when it was stopped will not be started when it is started
-# back up.
-# Valid values are yes or no
-
-#LIBVIRT_START="yes"
-
-
-# LIBVIRT_IGNORE_AUTOSTART
-# If the VM is marked for autostart in its XML configuration then we won't
-# save its start when the init script is stopped. The result is that when
-# the init script starts back up, no attempt will be made to start the VM or
-# confirm it is started.
-# Valid values are yes or no
-
-#LIBVIRT_IGNORE_AUTOSTART="no"
-
-
-# LIBVIRT_NET_SHUTDOWN
-# If libvirtd created networks for you (e.g. NATed networks) then this init
-# script will shut them down for you if this is set to 'yes'. Otherwise,
-# the networks will be left running. For this option to be useful you must
-# have enabled the 'virt-network' USE flag and have had libvirt create a
-# NATed network for you. Valid values: 'yes' or 'no'
-
-#LIBVIRT_NET_SHUTDOWN="yes"
diff --git a/app-emulation/libvirt/files/libvirt-guests.init-r4 b/app-emulation/libvirt/files/libvirt-guests.init-r4
deleted file mode 100644
index b29f04c2..00000000
--- a/app-emulation/libvirt/files/libvirt-guests.init-r4
+++ /dev/null
@@ -1,237 +0,0 @@
-#!/sbin/openrc-run
-
-description="Virtual Machine Management (libvirt) Guests"
-
-depend() {
- use libvirtd
-}
-
-# set the default to QEMU
-[ -z "${LIBVIRT_URIS}" ] && LIBVIRT_URIS="qemu:///system"
-
-# default to suspending the VM via managedsave
-case "${LIBVIRT_SHUTDOWN}" in
- managedsave|shutdown|destroy) ;;
- *) LIBVIRT_SHUTDOWN="managedsave" ;;
-esac
-
-# default to 500 seconds
-[ -z ${LIBVIRT_MAXWAIT} ] && LIBVIRT_MAXWAIT=500
-
-gueststatefile="/var/lib/libvirt/libvirt-guests.state"
-netstatefile="/var/lib/libvirt/libvirt-net.state"
-
-do_virsh() {
- local hvuri=$1
- shift
-
- # if unset, default to qemu
- [ -z ${hvuri} ] && hvuri="qemu:///system"
- # if only qemu was supplied then correct the value
- [ "xqemu" = x${hvuri} ] && hvuri="qemu:///system"
-
- # Silence errors because virsh always throws an error about
- # not finding the hypervisor version when connecting to libvirtd
- # lastly strip the blank line at the end
- LC_ALL=C virsh -c ${hvuri} "$@" 2>/dev/null | head -n -1
-}
-
-libvirtd_dom_list() {
- # Only work with domains by their UUIDs
- local hvuri=$1
- shift
-
- # The grep is to remove dom0 for xen domains. Otherwise we never hit 0
- do_virsh "${hvuri}" list --uuid $@ | grep -v 00000000-0000-0000-0000-000000000000
-}
-
-libvirtd_dom_count() {
- local hvuri=$1
- shift
-
- libvirtd_dom_list "${hvuri}" $@ | wc -l
-}
-
-libvirtd_net_list() {
- # Only work with networks by their UUIDs
- local hvuri=$1
- shift
-
- do_virsh "${hvuri}" net-list --uuid $@
-}
-
-libvirtd_net_count() {
- local hvuri=$1
- shift
-
- libvirtd_net_list "${hvuri}" $@ | wc -l
-}
-
-libvirtd_dom_stop() {
- # stops all persistent or transient domains for a given URI
- # $1 - uri
- # $2 - persisent/transient
-
- local uri=$1
- local persist=$2
- local shutdown_type=${LIBVIRT_SHUTDOWN}
- local counter=${LIBVIRT_MAXWAIT}
- local dom_name=
- local dom_as=
- local dom_ids=
- local uuid=
- local dom_count=
-
- [ "${persist}" = "--transient" ] && shutdown_type="shutdown"
- [ -n "${counter}" ] || counter=500
-
- einfo " Shutting down domain(s) ..."
-
- # grab all persistent or transient domains running
- dom_ids=$(libvirtd_dom_list ${uri} ${persist})
-
- for uuid in ${dom_ids}; do
- # Get the name
- dom_name=$(do_virsh ${uri} domname ${uuid})
- einfo " ${dom_name}"
- # Get autostart state
- dom_as=$(do_virsh ${uri} dominfo ${uuid} | \
- awk '$1 == "Autostart:" { print $2 }')
-
- if [ "${persist}" = "--persistent" ]; then
- # Save our running state only if LIBVIRT_IGNORE_AUTOSTART != yes
- if [ "x${LIBVIRT_IGNORE_AUTOSTART}" = "xyes" ] && \
- [ ${dom_as} = "enabled" ]; then
- :
- else
- echo "${uri} ${uuid}" >> ${gueststatefile}
- fi
-
- fi
-
- # Now let's stop it
- do_virsh "${uri}" ${shutdown_type} ${uuid} > /dev/null
-
- done
-
- dom_count="$(libvirtd_dom_count ${uri} ${persist})"
- while [ ${dom_count} -gt 0 ] && [ ${counter} -gt 0 ] ; do
- dom_count="$(libvirtd_dom_count ${uri} ${persist})"
- sleep 1
- if [ "${shutdown_type}" = "shutdown" ]; then
- counter=$((${counter} - 1))
- fi
- printf "."
- done
-
- if [ "${shutdown_type}" = "shutdown" ]; then
- # grab all domains still running
- dom_ids=$(libvirtd_dom_list ${uri} ${persist})
- for uuid in ${dom_ids}; do
- dom_name=$(do_virsh ${uri} domname ${uuid})
- eerror " ${dom_name} forcibly stopped"
- do_virsh "${uri}" destroy ${uuid} > /dev/null
- done
- fi
-}
-
-libvirtd_net_stop() {
- # stops all persistent or transient domains for a given URI
- # $1 - uri
- # $2 - persisent/transient
-
- local uri=$1
- local persist=$2
- local uuid=
- local net_name=
-
- if [ "${LIBVIRT_NET_SHUTDOWN}" != "no" ]; then
-
- einfo " Shutting down network(s):"
- for uuid in $(libvirtd_net_list ${uri} ${persist}); do
- net_name=$(do_virsh ${uri} net-name ${uuid})
- einfo " ${net_name}"
-
- if [ "${persist}" = "--persistent" ]; then
- # Save our running state
- echo "${uri} ${uuid}" >> ${netstatefile}
-
- fi
-
- # Actually stop the network
- do_virsh qemu net-destroy ${uuid} > /dev/null
- done
-
- fi
-}
-
-start() {
- local uri=
- local uuid=
- local name=
-
- for uri in ${LIBVIRT_URIS}; do
- do_virsh "${uri}" connect
- if [ $? -ne 0 ]; then
- eerror "Failed to connect to '${uri}'. Domains may not start."
- fi
- done
-
- [ ! -e "${netstatefile}" ] && touch "${netstatefile}"
- [ ! -e "${gueststatefile}" ] && touch "${gueststatefile}"
-
- # if the user didn't want to start any guests up then respect their wish
- [ "x${LIBVIRT_START}" = "xno" ] && return 0
-
- # start networks
- ebegin "Starting libvirt networks"
- while read -r uri uuid
- do
- # ignore trash
- [ -z "${uri}" ] || [ -z "${uuid}" ] && continue
-
- name=$(do_virsh "${uri}" net-name ${uuid})
- einfo " ${name}"
- do_virsh "${uri}" net-start ${uuid} > /dev/null
- done <"${netstatefile}"
- eend 0
-
- # start domains
- ebegin "Starting libvirt domains"
- while read -r uri uuid
- do
- # ignore trash
- [ -z "${uri}" ] || [ -z "${uuid}" ] && continue
-
- name=$(do_virsh "${uri}" domname ${uuid})
- einfo " ${name}"
- do_virsh "${uri}" start ${uuid} > /dev/null
- do_virsh "${uri}" domtime --sync ${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/libvirt-fork-exec-deadlock.patch b/app-emulation/libvirt/files/libvirt/libvirt-fork-exec-deadlock.patch
deleted file mode 100644
index badc17fc..00000000
--- a/app-emulation/libvirt/files/libvirt/libvirt-fork-exec-deadlock.patch
+++ /dev/null
@@ -1,285 +0,0 @@
-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
deleted file mode 100644
index 9d267218..00000000
--- a/app-emulation/libvirt/files/libvirt/stderr-fix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- 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.confd-r5 b/app-emulation/libvirt/files/libvirtd.confd-r5
deleted file mode 100644
index c326531d..00000000
--- a/app-emulation/libvirt/files/libvirtd.confd-r5
+++ /dev/null
@@ -1,18 +0,0 @@
-# /etc/conf.d/libvirtd
-
-# Startup dependency
-# libvirtd typically requires all networks to be up and settled which
-# is what rc_need="net" provides. However if you only use specific networks
-# for libvirtd, you may override this. Or if you only use libvirtd locally.
-rc_need="net"
-
-# The termination timeout (start-stop-daemon parameter "retry") ensures
-# that the service will be terminated within a given time (25 + 5 seconds
-# per default) when you are stopping the service.
-#LIBVIRTD_TERMTIMEOUT="TERM/25/KILL/5"
-
-# LIBVIRTD_OPTS
-# You may want to add '--listen' to have libvirtd listen for tcp/ip connections
-# if you want to use libvirt for remote control
-# Please consult 'libvirtd --help' for more options
-#LIBVIRTD_OPTS="--listen"
diff --git a/app-emulation/libvirt/files/libvirtd.init-r19 b/app-emulation/libvirt/files/libvirtd.init-r19
deleted file mode 100644
index ee3a6515..00000000
--- a/app-emulation/libvirt/files/libvirtd.init-r19
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-description="Virtual Machine Management daemon (libvirt)"
-
-LIBVIRTD_OPTS=${LIBVIRTD_OPTS:-"${LIBVIRTD_OPTS}"}
-LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"}
-
-command="/usr/sbin/libvirtd"
-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 ceph dbus iscsid virtlockd
- after cgconfig corosync ebtables iptables ip6tables nfs nfsmount ntp-client ntpdportmap rpc.statd sanlock xenconsoled
- USE_FLAG_FIREWALLD
-}
-
-start_pre() {
- # Test configuration directories in /etc/libvirt/ to be either not
- # present or a directory, i.e. not a regular file, bug #532892
-
- checkpath --directory /etc/libvirt/lxc || return 1
- checkpath --directory /etc/libvirt/nwfilter || 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.tmpfiles.conf b/app-emulation/libvirt/files/libvirtd.tmpfiles.conf
deleted file mode 100644
index c22c23dd..00000000
--- a/app-emulation/libvirt/files/libvirtd.tmpfiles.conf
+++ /dev/null
@@ -1 +0,0 @@
-d /run/libvirt/lxc 0755 root root -
diff --git a/app-emulation/libvirt/files/virtlockd.init-r2 b/app-emulation/libvirt/files/virtlockd.init-r2
deleted file mode 100644
index 2978f396..00000000
--- a/app-emulation/libvirt/files/virtlockd.init-r2
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/sbin/openrc-run
-# 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"
-start_stop_daemon_args="-b"
-pidfile="/run/virtlockd.pid"
-
-extra_started_commands="reload"
-description_reload="re-exec the daemon, while maintaining locks and clients"
-
-
-depend() {
- after ntp-client ntpd nfs nfsmount corosync
-}
-
-reload() {
- ebegin "re-exec() virtlockd"
-
- start-stop-daemon --signal SIGUSR1 \
- --exec "${command}" --pidfile "${pidfile}"
-}
diff --git a/app-emulation/libvirt/files/virtlogd.init-r2 b/app-emulation/libvirt/files/virtlogd.init-r2
deleted file mode 100644
index 7f22f407..00000000
--- a/app-emulation/libvirt/files/virtlogd.init-r2
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/sbin/openrc-run
-# 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"
-start_stop_daemon_args="-b"
-pidfile="/run/virtlogd.pid"
-
-extra_started_commands="reload"
-description_reload="re-exec the daemon, while maintaining open connections"
-
-
-depend() {
- after ntp-client ntpd nfs nfsmount corosync
-}
-
-reload() {
- ebegin "re-exec() virtlogd"
-
- start-stop-daemon --signal SIGUSR1 \
- --exec "${command}" --pidfile "${pidfile}"
-}
diff --git a/app-emulation/libvirt/libvirt-6.8.0-r3.ebuild b/app-emulation/libvirt/libvirt-6.8.0-r3.ebuild
deleted file mode 100644
index c542d7ad..00000000
--- a/app-emulation/libvirt/libvirt-6.8.0-r3.ebuild
+++ /dev/null
@@ -1,351 +0,0 @@
-# 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-r2.ebuild b/app-emulation/libvirt/libvirt-7.0.0-r2.ebuild
deleted file mode 100644
index afbae9fc..00000000
--- a/app-emulation/libvirt/libvirt-7.0.0-r2.ebuild
+++ /dev/null
@@ -1,348 +0,0 @@
-# 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
deleted file mode 100644
index 252e49ab..00000000
--- a/app-emulation/libvirt/metadata.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="person">
- <email>tamiko@gentoo.org</email>
- <name>Matthias Maier</name>
-</maintainer>
-<maintainer type="project">
- <email>virtualization@gentoo.org</email>
- <name>Gentoo Virtualization Project</name>
-</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>
- <flag name="lvm">
- Allow using the Logical Volume Manager (<pkg>sys-fs/lvm2</pkg>) as pool for disk image
- storage
- </flag>
- <flag name="nfs">
- Allow using Network File System mounts as pool for disk image storage
- </flag>
- <flag name="parted">
- Allow using real disk partitions as pool for disk image storage, using
- <pkg>sys-block/parted</pkg> to create, resize and delete them.
- </flag>
- <flag name="rbd">
- Enable rados block device support via <pkg>sys-cluster/ceph</pkg>
- </flag>
- <!-- Virtualisation backends -->
- <flag name="lxc">
- Support management of Linux Containers virtualisation (<pkg>app-containers/lxc</pkg>)
- </flag>
- <flag name="openvz">
- Support management of OpenVZ virtualisation (openvz-sources)
- </flag>
- <flag name="qemu">
- Support management of QEMU virtualisation (<pkg>app-emulation/qemu</pkg>)
- </flag>
- <flag name="xen">
- Support management of Xen virtualisation (<pkg>app-emulation/xen</pkg>)
- </flag>
- <flag name="virtualbox">
- 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">
- Use NUMA for memory segmenting via <pkg>sys-process/numactl</pkg> and
- <pkg>sys-process/numad</pkg>
- </flag>
- <flag name="libvirtd">
- Builds the libvirtd daemon as well as the client utilities instead of just the client
- utilities
- </flag>
- <flag name="libssh">
- Use <pkg>net-libs/libssh</pkg> to communicate with remote libvirtd hosts,
- for example: qemu+libssh://server/system
- </flag>
- <flag name="pcap">
- Support auto learning IP addreses for routing
- </flag>
- <flag name="macvtap">
- Support for MAC-based TAP (macvlan/macvtap). For networking instead
- of the normal TUN/TAP.
- </flag>
- <flag name="vepa">Virtual Ethernet Port Aggregator (VEPA) / 802.1Qbg
- support. Relies on macvtap support.</flag>
- <flag name="virt-network">
- Enable virtual networking (NAT) support for guests. Includes all
- the dependencies for NATed network mode. Effectively any network
- setup that relies on libvirt to setup and configure network
- interfaces on your host. This can include bridged and routed
- networks ONLY if you are allowing libvirt to create and manage
- the underlying devices for you. In some cases this requires
- enabling the 'netcf' USE flag (currently unavailable).
- </flag>
- <flag name="firewalld">DBus interface to iptables/ebtables allowing
- for better runtime management of your firewall.</flag>
- <flag name="wireshark-plugins">
- Build the <pkg>net-analyzer/wireshark</pkg> plugin for the Libvirt RPC protocol
- </flag>
- <flag name="glusterfs">
- Enable GlusterFS support via <pkg>sys-cluster/glusterfs</pkg>
- </flag>
- <flag name="zfs">
- Enable ZFS backend storage <pkg>sys-fs/zfs</pkg>
- </flag>
-</use>
-</pkgmetadata>