aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstefson <herrtimson@yahoo.de>2018-06-17 10:19:08 +0200
committerAnthony G. Basile <blueness@gentoo.org>2018-06-17 05:37:31 -0400
commitec3a03d8e569b0b7a679ea7f42517e4b2a68c130 (patch)
tree64f5734b7b5862c8d33d83a971af62044d0883c0 /app-emulation
parentnet-misc/rsync: fix manifest (diff)
downloadmusl-ec3a03d8e569b0b7a679ea7f42517e4b2a68c130.tar.gz
musl-ec3a03d8e569b0b7a679ea7f42517e4b2a68c130.tar.bz2
musl-ec3a03d8e569b0b7a679ea7f42517e4b2a68c130.zip
app-emulation/libvirt: fixed in tree
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/libvirt/Manifest1
-rw-r--r--app-emulation/libvirt/files/README.gentoo-r258
-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-1.3.0-do_not_use_sysconf.patch114
-rw-r--r--app-emulation/libvirt/files/libvirt-1.3.4-glibc-2.23.patch86
-rw-r--r--app-emulation/libvirt/files/libvirt-3.0.0-fix_paths_for_apparmor.patch79
-rw-r--r--app-emulation/libvirt/files/libvirt-3.1.0-musl-fix-includes.patch10
-rw-r--r--app-emulation/libvirt/files/libvirt-guests.confd68
-rw-r--r--app-emulation/libvirt/files/libvirt-guests.init-r2235
-rw-r--r--app-emulation/libvirt/files/libvirtd.confd-r518
-rw-r--r--app-emulation/libvirt/files/libvirtd.init-r1634
-rw-r--r--app-emulation/libvirt/files/libvirtd.service.conf10
-rw-r--r--app-emulation/libvirt/files/libvirtd.tmpfiles.conf1
-rw-r--r--app-emulation/libvirt/files/virtlockd.init-r123
-rw-r--r--app-emulation/libvirt/files/virtlogd.init-r123
-rw-r--r--app-emulation/libvirt/libvirt-3.3.0.ebuild383
-rw-r--r--app-emulation/libvirt/metadata.xml102
17 files changed, 0 insertions, 1264 deletions
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
deleted file mode 100644
index e96a082b..00000000
--- a/app-emulation/libvirt/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST libvirt-3.3.0.tar.xz 14043384 SHA256 29e00984174e33cf2183b478382c017de26860452ffee17b73871051264ebb1b SHA512 69166ddd7d4b9ef3b1bf2466e781139ef9b4d224a64acc7b8e6fca8786d36482138a1fe7b7407c0fca3b3d012cb418d168671a3e65e428f023c16493b7718c2d WHIRLPOOL 1b2688f6b9a89608677070b5ce1fd2b2af115336126d4214071bc1abba25056d54dbbf16d6bdfab7582b252a833d3e53e51175d552d5c936b08973c0eed76643
diff --git a/app-emulation/libvirt/files/README.gentoo-r2 b/app-emulation/libvirt/files/README.gentoo-r2
deleted file mode 100644
index 1c086c1e..00000000
--- a/app-emulation/libvirt/files/README.gentoo-r2
+++ /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:
-
- Please use /etc/systemd/system/libvirtd.service.d/00gentoo.conf
- to control the '--listen' parameter for libvirtd.
-
- 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 libvirtd 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-1.3.0-do_not_use_sysconf.patch b/app-emulation/libvirt/files/libvirt-1.3.0-do_not_use_sysconf.patch
deleted file mode 100644
index 47010c4f..00000000
--- a/app-emulation/libvirt/files/libvirt-1.3.0-do_not_use_sysconf.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-diff --git a/daemon/Makefile.am b/daemon/Makefile.am
-index be1b5a9..5ce0e1e 100644
---- a/daemon/Makefile.am
-+++ b/daemon/Makefile.am
-@@ -385,9 +385,7 @@ uninstall-logrotate:
- rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || :
-
- install-sysconfig:
-- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
-- $(INSTALL_DATA) $(srcdir)/libvirtd.sysconf \
-- $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
-+
- uninstall-sysconfig:
- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
- rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
-diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in
-index 608221c..63708f4 100644
---- a/daemon/libvirtd.service.in
-+++ b/daemon/libvirtd.service.in
-@@ -12,8 +12,7 @@ Documentation=http://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/src/Makefile.am b/src/Makefile.am
-index 7219f7c..c474a23 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -2473,11 +2473,6 @@ EXTRA_DIST += \
- logging/virtlogd.sysconf
-
- install-sysconfig:
-- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
-- $(INSTALL_DATA) $(srcdir)/locking/virtlockd.sysconf \
-- $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd
-- $(INSTALL_DATA) $(srcdir)/logging/virtlogd.sysconf \
-- $(DESTDIR)$(sysconfdir)/sysconfig/virtlogd
-
- uninstall-sysconfig:
- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlogd
-diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
-index 57089b0..ace0c83 100644
---- a/src/locking/virtlockd.service.in
-+++ b/src/locking/virtlockd.service.in
-@@ -5,8 +5,7 @@ Documentation=man:virtlockd(8)
- Documentation=http://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 a264d3a..b467884 100644
---- a/src/logging/virtlogd.service.in
-+++ b/src/logging/virtlogd.service.in
-@@ -5,8 +5,7 @@ Documentation=man:virtlogd(8)
- Documentation=http://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/tools/Makefile.am b/tools/Makefile.am
-index 9180564..e72d5f4 100644
---- a/tools/Makefile.am
-+++ b/tools/Makefile.am
-@@ -293,7 +293,7 @@ uninstall-local: uninstall-init uninstall-systemd
- install-sysconfig:
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
- $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
-- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
-+ $(DESTDIR)$(sysconfdir)/libvirt/libvirt-guests.conf
-
- uninstall-sysconfig:
- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
-diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
-index c31f663..71cb79d 100644
---- a/tools/libvirt-guests.service.in
-+++ b/tools/libvirt-guests.service.in
-@@ -5,7 +5,7 @@ Documentation=man:libvirtd(8)
- Documentation=http://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 2770056..accd4f5 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:/// vbox+tcp://host/system lxc:///'
- #URIS=default
diff --git a/app-emulation/libvirt/files/libvirt-1.3.4-glibc-2.23.patch b/app-emulation/libvirt/files/libvirt-1.3.4-glibc-2.23.patch
deleted file mode 100644
index adeff5c3..00000000
--- a/app-emulation/libvirt/files/libvirt-1.3.4-glibc-2.23.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-get major/minor macros by using AC_HEADER_MAJOR
-
-https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html#AC_HEADER_MAJOR
-
-https://bugs.gentoo.org/579960
-diff --git a/configure.ac b/configure.ac
-index 93d347c..1e7ee51 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -282,2 +282,5 @@ AC_CHECK_SIZEOF([long])
-
-+dnl detect system-specific headers for major()/minor()
-+AC_HEADER_MAJOR
-+
- dnl Availability of various common functions (non-fatal if missing),
-diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
-index bd2eeb6..74b2487 100644
---- a/src/conf/domain_audit.c
-+++ b/src/conf/domain_audit.c
-@@ -28,2 +28,9 @@
-
-+#ifdef MAJOR_IN_MKDEV
-+# include <sys/mkdev.h>
-+#endif
-+#ifdef MAJOR_IN_SYSMACROS
-+# include <sys/sysmacros.h>
-+#endif
-+
- #include "domain_audit.h"
-diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
-index 76bef82..49c0648 100644
---- a/src/lxc/lxc_controller.c
-+++ b/src/lxc/lxc_controller.c
-@@ -48,2 +48,9 @@
-
-+#ifdef MAJOR_IN_MKDEV
-+# include <sys/mkdev.h>
-+#endif
-+#ifdef MAJOR_IN_SYSMACROS
-+# include <sys/sysmacros.h>
-+#endif
-+
- #include "virerror.h"
-diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
-index 3c6c839..983cd21 100644
---- a/src/lxc/lxc_driver.c
-+++ b/src/lxc/lxc_driver.c
-@@ -38,2 +38,9 @@
-
-+#ifdef MAJOR_IN_MKDEV
-+# include <sys/mkdev.h>
-+#endif
-+#ifdef MAJOR_IN_SYSMACROS
-+# include <sys/sysmacros.h>
-+#endif
-+
- #include "virerror.h"
-diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
-index 38398fd..4b45458 100644
---- a/src/util/vircgroup.c
-+++ b/src/util/vircgroup.c
-@@ -31,2 +31,10 @@
- #endif
-+
-+#ifdef MAJOR_IN_MKDEV
-+# include <sys/mkdev.h>
-+#endif
-+#ifdef MAJOR_IN_SYSMACROS
-+# include <sys/sysmacros.h>
-+#endif
-+
- #include <fcntl.h>
-diff --git a/src/util/virutil.c b/src/util/virutil.c
-index bb9604a..9840a9e 100644
---- a/src/util/virutil.c
-+++ b/src/util/virutil.c
-@@ -68,2 +68,9 @@
-
-+#ifdef MAJOR_IN_MKDEV
-+# include <sys/mkdev.h>
-+#endif
-+#ifdef MAJOR_IN_SYSMACROS
-+# include <sys/sysmacros.h>
-+#endif
-+
- #include "c-ctype.h"
diff --git a/app-emulation/libvirt/files/libvirt-3.0.0-fix_paths_for_apparmor.patch b/app-emulation/libvirt/files/libvirt-3.0.0-fix_paths_for_apparmor.patch
deleted file mode 100644
index c9c7eb6a..00000000
--- a/app-emulation/libvirt/files/libvirt-3.0.0-fix_paths_for_apparmor.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From baad1483ed0a699509f66abac6708797f370f888 Mon Sep 17 00:00:00 2001
-From: Matthias Maier <tamiko@kyomu.43-1.org>
-Date: Sun, 22 Jan 2017 09:07:57 -0600
-Subject: [PATCH] Update paths to Gentoo layout
-
----
- examples/Makefile.am | 4 ++--
- .../{usr.lib.libvirt.virt-aa-helper => usr.libexec.virt-aa-helper} | 4 ++--
- examples/apparmor/usr.sbin.libvirtd | 6 ++++--
- 3 files changed, 8 insertions(+), 6 deletions(-)
- rename examples/apparmor/{usr.lib.libvirt.virt-aa-helper => usr.libexec.virt-aa-helper} (90%)
-
-diff --git a/examples/Makefile.am b/examples/Makefile.am
-index 2956e14..d81e34b 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/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.libexec.virt-aa-helper
-similarity index 90%
-rename from examples/apparmor/usr.lib.libvirt.virt-aa-helper
-rename to examples/apparmor/usr.libexec.virt-aa-helper
-index 4a8f197..a6072f1 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
-@@ -20,7 +20,7 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
- /sys/devices/ r,
- /sys/devices/** 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 8893e75..f0b471c 100644
---- a/examples/apparmor/usr.sbin.libvirtd
-+++ b/examples/apparmor/usr.sbin.libvirtd
-@@ -59,8 +59,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.10.2
-
diff --git a/app-emulation/libvirt/files/libvirt-3.1.0-musl-fix-includes.patch b/app-emulation/libvirt/files/libvirt-3.1.0-musl-fix-includes.patch
deleted file mode 100644
index 70fb1686..00000000
--- a/app-emulation/libvirt/files/libvirt-3.1.0-musl-fix-includes.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/storage/storage_backend_fs.c
-+++ b/src/storage/storage_backend_fs.c
-@@ -30,6 +30,7 @@
- #include <dirent.h>
- #include <errno.h>
- #include <fcntl.h>
-+#include <paths.h>
- #include <unistd.h>
- #include <string.h>
-
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-r2 b/app-emulation/libvirt/files/libvirt-guests.init-r2
deleted file mode 100644
index 9db6d959..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
- echo -n "."
- done
-
- if [ "${shutdown_type}" = "shutdown" ]; then
- # grab all domains still running
- dom_ids=$(libvirtd_dom_list ${uri} ${persist})
- for uuid in ${dom_ids}; do
- dom_name=$(do_virsh ${uri} domname ${uuid})
- eerror " ${dom_name} forcibly stopped"
- do_virsh "${uri}" destroy ${uuid} > /dev/null
- done
- fi
-}
-
-libvirtd_net_stop() {
- # stops all persistent or transient domains for a given URI
- # $1 - uri
- # $2 - persisent/transient
-
- local uri=$1
- local persist=$2
- local uuid=
- local net_name=
-
- if [ "${LIBVIRT_NET_SHUTDOWN}" != "no" ]; then
-
- einfo " Shutting down network(s):"
- for uuid in $(libvirtd_net_list ${uri} ${persist}); do
- net_name=$(do_virsh ${uri} net-name ${uuid})
- einfo " ${net_name}"
-
- if [ "${persist}" = "--persistent" ]; then
- # Save our running state
- echo "${uri} ${uuid}" >> ${netstatefile}
-
- fi
-
- # Actually stop the network
- do_virsh qemu net-destroy ${uuid} > /dev/null
- done
-
- fi
-}
-
-start() {
- local uri=
- local uuid=
- local name=
-
- for uri in ${LIBVIRT_URIS}; do
- do_virsh "${uri}" connect
- if [ $? -ne 0 ]; then
- eerror "Failed to connect to '${uri}'. Domains may not start."
- fi
- done
-
- [ ! -e "${netstatefile}" ] && touch "${netstatefile}"
- [ ! -e "${gueststatefile}" ] && touch "${gueststatefile}"
-
- # if the user didn't want to start any guests up then respect their wish
- [ "x${LIBVIRT_START}" = "xno" ] && return 0
-
- # start networks
- ebegin "Starting libvirt networks"
- while read -r uri uuid
- do
- # ignore trash
- [ -z "${uri}" ] || [ -z "${uuid}" ] && continue
-
- name=$(do_virsh "${uri}" net-name ${uuid})
- einfo " ${name}"
- do_virsh "${uri}" net-start ${uuid} > /dev/null
- done <"${netstatefile}"
- eend 0
-
- # start domains
- ebegin "Starting libvirt domains"
- while read -r uri uuid
- do
- # ignore trash
- [ -z "${uri}" ] || [ -z "${uuid}" ] && continue
-
- name=$(do_virsh "${uri}" domname ${uuid})
- einfo " ${name}"
- do_virsh "${uri}" start ${uuid} > /dev/null
- done <"${gueststatefile}"
- eend 0
-}
-
-stop() {
- local counter=
- local dom_name=
- local net_name=
- local dom_ids=
- local uuid=
- local dom_count=
-
- rm -f "${gueststatefile}"
- [ $? -ne 0 ] && eerror "Unable to save domain state"
- rm -f "${netstatefile}"
- [ $? -ne 0 ] && eerror "Unable to save net state"
-
- for uri in ${LIBVIRT_URIS}; do
- einfo "Stopping libvirt domains and networks for ${uri}"
-
- libvirtd_dom_stop "${uri}" "--persistent"
- libvirtd_dom_stop "${uri}" "--transient"
- libvirtd_net_stop "${uri}" "--persistent"
- libvirtd_net_stop "${uri}" "--transient"
-
- einfo "Done stopping domains and networks for ${uri}"
- done
-}
diff --git a/app-emulation/libvirt/files/libvirtd.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-r16 b/app-emulation/libvirt/files/libvirtd.init-r16
deleted file mode 100644
index be660e35..00000000
--- a/app-emulation/libvirt/files/libvirtd.init-r16
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# 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="-d ${LIBVIRTD_OPTS}"
-start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab"
-pidfile="/var/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_FLAG_FIREWALLD
- USE_FLAG_AVAHI
- USE_FLAG_ISCSI
- USE_FLAG_RBD
-}
-
-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
- checkpath --directory /etc/libvirt/qemu || return 1
- 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/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-r1 b/app-emulation/libvirt/files/virtlockd.init-r1
deleted file mode 100644
index e7c3db29..00000000
--- a/app-emulation/libvirt/files/virtlockd.init-r1
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# 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"
-
-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-r1 b/app-emulation/libvirt/files/virtlogd.init-r1
deleted file mode 100644
index 438070e3..00000000
--- a/app-emulation/libvirt/files/virtlogd.init-r1
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# 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"
-
-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-3.3.0.ebuild b/app-emulation/libvirt/libvirt-3.3.0.ebuild
deleted file mode 100644
index ca90f19a..00000000
--- a/app-emulation/libvirt/libvirt-3.3.0.ebuild
+++ /dev/null
@@ -1,383 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools eutils user linux-info systemd readme.gentoo-r1
-
-if [[ ${PV} = *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="git://libvirt.org/libvirt.git"
- SRC_URI=""
- KEYWORDS="amd64 x86"
- SLOT="0"
-else
- # Versions with 4 numbers are stable updates:
- if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then
- SRC_URI="http://libvirt.org/sources/stable_updates/${P}.tar.xz"
- else
- SRC_URI="http://libvirt.org/sources/${P}.tar.xz"
- fi
- KEYWORDS="amd64 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 elibc_glibc
-"
-
-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/netcat6-1.0-r2 >=net-analyzer/openbsd-netcat-1.105-r1 )
- >=net-libs/gnutls-1.0.25:0=
- net-libs/libssh2
- >=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 )
- elibc_glibc? ( sys-libs/glibc[rpc(+)] )
- elibc_musl? ( net-libs/libtirpc )
- 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
- )
- openvz? ( sys-kernel/openvz-sources:* )
- 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-0.13.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
- 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}
- app-text/xhtml1
- dev-lang/perl
- dev-libs/libxslt
- dev-perl/XML-XPath
- virtual/pkgconfig"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.3.0-do_not_use_sysconf.patch
- "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch
- "${FILESDIR}"/${PN}-3.0.0-fix_paths_for_apparmor.patch
- "${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch
- "${FILESDIR}"/${PN}-3.1.0-musl-fix-includes.patch # bug #609488
-)
-
-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
- ~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)
- $(use_with xen xen-inotify)
- $(use_with xen libxl)
- $(use_with zeroconf avahi)
- $(use_with zfs storage-zfs)
-
- --without-hal
- --without-netcf
- --without-sanlock
- --without-xenapi
-
- --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/cache
- rm -rf "${D}"/var/run
- rm -rf "${D}"/var/log
-
- 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-r2" 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
-
- 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/metadata.xml b/app-emulation/libvirt/metadata.xml
deleted file mode 100644
index 48462a7f..00000000
--- a/app-emulation/libvirt/metadata.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://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">
- 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-emulation/lxc</pkg>)
- </flag>
- <flag name="openvz">
- Support management of OpenVZ virtualisation (see <pkg>sys-kernel/openvz-sources</pkg>)
- </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>
- <flag name="xen">
- 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
- </flag>
- <!-- Miscellaneous flags -->
- <flag name="apparmor">Enable AppArmor support</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. It has its advantages and disadvantages.
- macvtap support requires very new kernels and is
- currently evolving. Support for this is experimental at best.
- </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>