diff options
author | Marek Szuba <marecki@gentoo.org> | 2020-07-21 19:54:54 +0200 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2020-07-21 20:10:44 +0200 |
commit | c6543a38b2ab1f2372a3bc520eabb23c331cd347 (patch) | |
tree | 0081c5f0517fd5aa74c50bfd723fecd90da63f83 | |
parent | app-emulation/libvirt: remove old (diff) | |
download | gentoo-c6543a38b2ab1f2372a3bc520eabb23c331cd347.tar.gz gentoo-c6543a38b2ab1f2372a3bc520eabb23c331cd347.tar.bz2 gentoo-c6543a38b2ab1f2372a3bc520eabb23c331cd347.zip |
app-emulation/libvirt: bump to 6.5.0
Approved by tamiko on IRC.
Closes: https://bugs.gentoo.org/721620
Signed-off-by: Marek Szuba <marecki@gentoo.org>
-rw-r--r-- | app-emulation/libvirt/Manifest | 1 | ||||
-rw-r--r-- | app-emulation/libvirt/files/libvirt-6.5.0-do-not-use-sysconfig.patch (renamed from app-emulation/libvirt/files/libvirt-6.2.0-do-not-use-sysconfig.patch) | 118 | ||||
-rw-r--r-- | app-emulation/libvirt/libvirt-6.5.0.ebuild | 355 | ||||
-rw-r--r-- | app-emulation/libvirt/libvirt-9999.ebuild | 4 |
4 files changed, 377 insertions, 101 deletions
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index 2a98b7178af3..efead371cabe 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -1 +1,2 @@ DIST libvirt-6.2.0.tar.xz 8307248 BLAKE2B 9d449e041fc548a688f974d0801e625cf023ef0df49c40028e486e88fcf14181869e0dfd87f0eabcdd184df67dda5b5fbdc0c2375832f1534faff531779255dd SHA512 96bef701fd73aef93d1490f0bc331901a0ff6250a4f36a3e4844f76cc262dc0ae4cce8686a603c2a9c575ce489d8d5ed1521ebd22b92aff8301efdb74dee91e4 +DIST libvirt-6.5.0.tar.xz 9407160 BLAKE2B 592aace555a3b72311cb430784587180fa7dbf74f75509cd8373a046339b9c4c0707bf530dd2d06146d78a85f8af3dba5d0b146ecec180d3cc4d3bf78c19da61 SHA512 30a032270304b97945ff2c5087c72c2f5510634186f2eaf7c3d834a72cddcaec97bbe5ccc86802728a59f4c80b5bb54757400683df5f20175757cfe07ce67453 diff --git a/app-emulation/libvirt/files/libvirt-6.2.0-do-not-use-sysconfig.patch b/app-emulation/libvirt/files/libvirt-6.5.0-do-not-use-sysconfig.patch index 3dc2588b7bfd..74b5954a0cf1 100644 --- a/app-emulation/libvirt/files/libvirt-6.2.0-do-not-use-sysconfig.patch +++ b/app-emulation/libvirt/files/libvirt-6.5.0-do-not-use-sysconfig.patch @@ -1,37 +1,6 @@ -From c378ab3e7fe84ac69ad787c099f24fd32dbbf6e4 Mon Sep 17 00:00:00 2001 -Message-Id: <c378ab3e7fe84ac69ad787c099f24fd32dbbf6e4.1586091631.git.mprivozn@redhat.com> -From: Michal Privoznik <mprivozn@redhat.com> -Date: Sun, 5 Apr 2020 14:41:45 +0200 -Subject: [PATCH] Do not use sysconfig - -Signed-off-by: Michal Privoznik <mprivozn@redhat.com> ---- - src/Makefile.am | 21 ++------------------- - src/interface/virtinterfaced.service.in | 1 - - src/libxl/virtxend.service.in | 1 - - src/locking/virtlockd.service.in | 3 +-- - src/logging/virtlogd.service.in | 3 +-- - src/lxc/virtlxcd.service.in | 1 - - src/network/virtnetworkd.service.in | 1 - - src/node_device/virtnodedevd.service.in | 1 - - src/nwfilter/virtnwfilterd.service.in | 1 - - src/qemu/virtqemud.service.in | 1 - - src/remote/libvirtd.service.in | 3 +-- - src/remote/virtproxyd.service.in | 1 - - src/secret/virtsecretd.service.in | 1 - - src/storage/virtstoraged.service.in | 1 - - src/vbox/virtvboxd.service.in | 1 - - src/vz/virtvzd.service.in | 1 - - tools/Makefile.am | 13 ++----------- - tools/libvirt-guests.service.in | 2 +- - tools/libvirt-guests.sysconf | 6 ++++++ - 19 files changed, 14 insertions(+), 49 deletions(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index 12dd6b80e1..10f1bb769d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -522,23 +522,6 @@ EXTRA_DIST += \ +@@ -522,23 +522,6 @@ $(SYSCONF_FILES) \ $(OPENRC_CONF_FILES) @@ -55,7 +24,7 @@ index 12dd6b80e1..10f1bb769d 100644 OPENRC_CONF_DIR = $(sysconfdir)/conf.d install-openrc-conf: -@@ -604,14 +587,14 @@ SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system +@@ -604,14 +587,14 @@ BUILT_SOURCES += $(SYSTEMD_UNIT_FILES) DISTCLEANFILES += $(SYSTEMD_UNIT_FILES) @@ -72,11 +41,9 @@ index 12dd6b80e1..10f1bb769d 100644 rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%) rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || : -diff --git a/src/interface/virtinterfaced.service.in b/src/interface/virtinterfaced.service.in -index 73d409b81b..2d2c0138f5 100644 --- a/src/interface/virtinterfaced.service.in +++ b/src/interface/virtinterfaced.service.in -@@ -13,7 +13,6 @@ Documentation=https://libvirt.org +@@ -13,7 +13,6 @@ [Service] Type=notify @@ -84,11 +51,9 @@ index 73d409b81b..2d2c0138f5 100644 ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure -diff --git a/src/libxl/virtxend.service.in b/src/libxl/virtxend.service.in -index a863917467..5b2d16f627 100644 --- a/src/libxl/virtxend.service.in +++ b/src/libxl/virtxend.service.in -@@ -17,7 +17,6 @@ ConditionPathExists=/proc/xen/capabilities +@@ -17,7 +17,6 @@ [Service] Type=notify @@ -96,11 +61,9 @@ index a863917467..5b2d16f627 100644 ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure -diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in -index e7f8057c06..2449b201d9 100644 --- a/src/locking/virtlockd.service.in +++ b/src/locking/virtlockd.service.in -@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8) +@@ -7,8 +7,7 @@ Documentation=https://libvirt.org [Service] @@ -110,11 +73,9 @@ index e7f8057c06..2449b201d9 100644 ExecReload=/bin/kill -USR1 $MAINPID # Loosing the locks is a really bad thing that will # cause the machine to be fenced (rebooted), so make -diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in -index daff48e67d..43736191d5 100644 --- a/src/logging/virtlogd.service.in +++ b/src/logging/virtlogd.service.in -@@ -7,8 +7,7 @@ Documentation=man:virtlogd(8) +@@ -7,8 +7,7 @@ Documentation=https://libvirt.org [Service] @@ -124,11 +85,9 @@ index daff48e67d..43736191d5 100644 ExecReload=/bin/kill -USR1 $MAINPID # Loosing the logs is a really bad thing that will # cause the machine to be fenced (rebooted), so make -diff --git a/src/lxc/virtlxcd.service.in b/src/lxc/virtlxcd.service.in -index 3af7c1a52d..cff421d988 100644 --- a/src/lxc/virtlxcd.service.in +++ b/src/lxc/virtlxcd.service.in -@@ -18,7 +18,6 @@ Documentation=https://libvirt.org +@@ -18,7 +18,6 @@ [Service] Type=notify @@ -136,11 +95,9 @@ index 3af7c1a52d..cff421d988 100644 ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS ExecReload=/bin/kill -HUP $MAINPID KillMode=process -diff --git a/src/network/virtnetworkd.service.in b/src/network/virtnetworkd.service.in -index e7f1326945..49fb7b99ff 100644 --- a/src/network/virtnetworkd.service.in +++ b/src/network/virtnetworkd.service.in -@@ -13,7 +13,6 @@ Documentation=https://libvirt.org +@@ -16,7 +16,6 @@ [Service] Type=notify @@ -148,11 +105,9 @@ index e7f1326945..49fb7b99ff 100644 ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure -diff --git a/src/node_device/virtnodedevd.service.in b/src/node_device/virtnodedevd.service.in -index d2453dd620..847263e8b9 100644 --- a/src/node_device/virtnodedevd.service.in +++ b/src/node_device/virtnodedevd.service.in -@@ -13,7 +13,6 @@ Documentation=https://libvirt.org +@@ -13,7 +13,6 @@ [Service] Type=notify @@ -160,11 +115,9 @@ index d2453dd620..847263e8b9 100644 ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure -diff --git a/src/nwfilter/virtnwfilterd.service.in b/src/nwfilter/virtnwfilterd.service.in -index dda7c01a3d..bb0bf0afa4 100644 --- a/src/nwfilter/virtnwfilterd.service.in +++ b/src/nwfilter/virtnwfilterd.service.in -@@ -13,7 +13,6 @@ Documentation=https://libvirt.org +@@ -13,7 +13,6 @@ [Service] Type=notify @@ -172,11 +125,9 @@ index dda7c01a3d..bb0bf0afa4 100644 ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure -diff --git a/src/qemu/virtqemud.service.in b/src/qemu/virtqemud.service.in -index 8abc9d3a7f..3539be3c0b 100644 --- a/src/qemu/virtqemud.service.in +++ b/src/qemu/virtqemud.service.in -@@ -18,7 +18,6 @@ Documentation=https://libvirt.org +@@ -18,7 +18,6 @@ [Service] Type=notify @@ -184,11 +135,9 @@ index 8abc9d3a7f..3539be3c0b 100644 ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS ExecReload=/bin/kill -HUP $MAINPID KillMode=process -diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in -index 90b2cad5b0..d16b11ec8d 100644 --- a/src/remote/libvirtd.service.in +++ b/src/remote/libvirtd.service.in -@@ -25,8 +25,7 @@ Documentation=https://libvirt.org +@@ -28,8 +28,7 @@ [Service] Type=notify @@ -198,11 +147,9 @@ index 90b2cad5b0..d16b11ec8d 100644 ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure -diff --git a/src/remote/virtproxyd.service.in b/src/remote/virtproxyd.service.in -index f43ce9ee6e..9076e638a7 100644 --- a/src/remote/virtproxyd.service.in +++ b/src/remote/virtproxyd.service.in -@@ -13,7 +13,6 @@ Documentation=https://libvirt.org +@@ -13,7 +13,6 @@ [Service] Type=notify @@ -210,11 +157,9 @@ index f43ce9ee6e..9076e638a7 100644 ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure -diff --git a/src/secret/virtsecretd.service.in b/src/secret/virtsecretd.service.in -index 8444142a3a..57e74c2d38 100644 --- a/src/secret/virtsecretd.service.in +++ b/src/secret/virtsecretd.service.in -@@ -13,7 +13,6 @@ Documentation=https://libvirt.org +@@ -13,7 +13,6 @@ [Service] Type=notify @@ -222,11 +167,9 @@ index 8444142a3a..57e74c2d38 100644 ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure -diff --git a/src/storage/virtstoraged.service.in b/src/storage/virtstoraged.service.in -index fc3e9a1b69..a82319b214 100644 --- a/src/storage/virtstoraged.service.in +++ b/src/storage/virtstoraged.service.in -@@ -15,7 +15,6 @@ Documentation=https://libvirt.org +@@ -15,7 +15,6 @@ [Service] Type=notify @@ -234,11 +177,9 @@ index fc3e9a1b69..a82319b214 100644 ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure -diff --git a/src/vbox/virtvboxd.service.in b/src/vbox/virtvboxd.service.in -index ebb31dde07..21eec57bab 100644 --- a/src/vbox/virtvboxd.service.in +++ b/src/vbox/virtvboxd.service.in -@@ -14,7 +14,6 @@ Documentation=https://libvirt.org +@@ -14,7 +14,6 @@ [Service] Type=notify @@ -246,23 +187,9 @@ index ebb31dde07..21eec57bab 100644 ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure -diff --git a/src/vz/virtvzd.service.in b/src/vz/virtvzd.service.in -index f551cb8fbf..99b9b4f1bf 100644 ---- a/src/vz/virtvzd.service.in -+++ b/src/vz/virtvzd.service.in -@@ -14,7 +14,6 @@ Documentation=https://libvirt.org - - [Service] - Type=notify --EnvironmentFile=-@sysconfdir@/sysconfig/virtvzd - ExecStart=@sbindir@/virtvzd $VIRTVZD_ARGS - ExecReload=/bin/kill -HUP $MAINPID - Restart=on-failure -diff --git a/tools/Makefile.am b/tools/Makefile.am -index 53df930e0a..598a62ddef 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am -@@ -294,15 +294,6 @@ install-data-local: install-systemd install-nss \ +@@ -294,15 +294,6 @@ uninstall-local: uninstall-systemd uninstall-nss \ uninstall-bash-completion @@ -278,7 +205,7 @@ index 53df930e0a..598a62ddef 100644 EXTRA_DIST += libvirt-guests.sh.in libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status -@@ -322,12 +313,12 @@ EXTRA_DIST += libvirt-guests.service.in +@@ -322,12 +313,12 @@ SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system if LIBVIRT_INIT_SCRIPT_SYSTEMD @@ -293,11 +220,9 @@ index 53df930e0a..598a62ddef 100644 rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||: -diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in -index 10c664016a..f0f417bffb 100644 --- a/tools/libvirt-guests.service.in +++ b/tools/libvirt-guests.service.in -@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8) +@@ -10,7 +10,7 @@ Documentation=https://libvirt.org [Service] @@ -306,8 +231,6 @@ index 10c664016a..f0f417bffb 100644 # Hack just call traditional service until we factor # out the code ExecStart=@libexecdir@/libvirt-guests.sh start -diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf -index 0765efec21..a1a53d8a8d 100644 --- a/tools/libvirt-guests.sysconf +++ b/tools/libvirt-guests.sysconf @@ -1,3 +1,9 @@ @@ -320,6 +243,3 @@ index 0765efec21..a1a53d8a8d 100644 # Customizations for the libvirt-guests.service systemd unit # URIs to check for running guests --- -2.24.1 - diff --git a/app-emulation/libvirt/libvirt-6.5.0.ebuild b/app-emulation/libvirt/libvirt-6.5.0.ebuild new file mode 100644 index 000000000000..f236af9bf3a6 --- /dev/null +++ b/app-emulation/libvirt/libvirt-6.5.0.ebuild @@ -0,0 +1,355 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7} ) + +inherit autotools out-of-source bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd + +if [[ ${PV} = *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://libvirt.org/git/libvirt.git" + 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 )" + +# 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 + policykit? ( acct-group/libvirt ) + 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-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 ) + 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] + ) + virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) + wireshark-plugins? ( net-analyzer/wireshark:= ) + xen? ( + >=app-emulation/xen-4.6.0 + app-emulation/xen-tools:= + ) + udev? ( + virtual/udev + >=x11-libs/libpciaccess-0.10.9 + ) + zfs? ( sys-fs/zfs )" + +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + app-text/xhtml1 + dev-lang/perl + dev-libs/libxslt + dev-perl/XML-XPath + dev-python/docutils + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch + "${FILESDIR}"/${PN}-6.1.0-fix-paths-for-apparmor.patch + "${FILESDIR}"/${PN}-6.5.0-do-not-use-sysconfig.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" + + 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" + + eautoreconf +} + +my_src_configure() { + local myeconfargs=( + $(use_with apparmor) + $(use_with apparmor apparmor-profiles) + $(use_with audit) + $(use_with caps capng) + $(use_with dbus) + $(use_with dtrace) + $(use_with firewalld) + $(use_with fuse) + $(use_with glusterfs) + $(use_with glusterfs storage-gluster) + $(use_with iscsi storage-iscsi) + $(use_with iscsi-direct storage-iscsi-direct) + $(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 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 vepa virtualport) + $(use_with virt-network network) + $(use_with wireshark-plugins wireshark-dissector) + $(use_with xen libxl) + $(use_with zfs storage-zfs) + + --without-hal + --without-netcf + --without-sanlock + + --with-esx + --with-init-script=systemd + --with-qemu-group=$(usex caps qemu root) + --with-qemu-user=$(usex caps qemu root) + --with-remote + --with-storage-fs + --with-vmware + + --disable-static + --disable-werror + + --localstatedir=/var + --with-runstatedir=/run + --enable-dependency-tracking + ) + + 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[@]}" +} + +my_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 + HOME="${T}" emake check +} + +my_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 + rm -rf "${D}"/run + + newbashcomp "${S}/tools/bash-completion/vsh" virsh + bashcomp_alias virsh virt-admin + + use libvirtd || return 0 + # From here, only libvirtd-related instructions, be warned! + + systemd_newtmpfilesd "${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 + fi +} + +pkg_postinst() { + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then + touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml + fi + + use libvirtd || return 0 + # From here, only libvirtd-related instructions, be warned! + + readme.gentoo_print_elog +} diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild index 7325bbb67914..f0ec21a60c13 100644 --- a/app-emulation/libvirt/libvirt-9999.ebuild +++ b/app-emulation/libvirt/libvirt-9999.ebuild @@ -20,7 +20,7 @@ else fi DESCRIPTION="C toolkit to manipulate virtual machines" -HOMEPAGE="http://www.libvirt.org/" +HOMEPAGE="https://www.libvirt.org/" LICENSE="LGPL-2.1" IUSE=" apparmor audit +caps +dbus dtrace firewalld fuse glusterfs iscsi @@ -124,8 +124,8 @@ DEPEND="${RDEPEND} virtual/pkgconfig" PATCHES=( - "${FILESDIR}"/${PN}-6.2.0-do-not-use-sysconfig.patch "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch + "${FILESDIR}"/${PN}-6.5.0-do-not-use-sysconfig.patch ) pkg_setup() { |