From e2d84e38284aeb9d522a7e935554340ddf0e4a6f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 15 Nov 2017 17:13:45 +0000 Subject: gentoo resync : 15.11.2017 --- app-emulation/libvirt/Manifest | 8 +- .../libvirt-3.6.0-ssh-malicious-hostname-fix.patch | 47 --- .../libvirt/files/libvirt-3.9.0-tirpc.patch | 13 + app-emulation/libvirt/libvirt-3.6.0.ebuild | 382 -------------------- app-emulation/libvirt/libvirt-3.8.0-r1.ebuild | 4 +- app-emulation/libvirt/libvirt-3.9.0.ebuild | 383 +++++++++++++++++++++ 6 files changed, 402 insertions(+), 435 deletions(-) delete mode 100644 app-emulation/libvirt/files/libvirt-3.6.0-ssh-malicious-hostname-fix.patch create mode 100644 app-emulation/libvirt/files/libvirt-3.9.0-tirpc.patch delete mode 100644 app-emulation/libvirt/libvirt-3.6.0.ebuild create mode 100644 app-emulation/libvirt/libvirt-3.9.0.ebuild (limited to 'app-emulation/libvirt') diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index e879cfa0e899..d259cb0a69cd 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -4,8 +4,8 @@ AUX libvirt-1.3.0-do_not_use_sysconf.patch 4072 SHA256 896d482d3aa9281977e6900e6 AUX libvirt-1.3.4-glibc-2.23.patch 2049 SHA256 8fa125da2a8e6dabf17fc47863597b2b3929d4d4b1e01ace1433a75ac4bc0ba2 SHA512 022b610c2e343c9cb595babcc8b2e5e0e0db1a19d6bfc9babdc817bc1e093ff12ee1c26304c188151fecc32481ffd225d7a3d36324613dd5b4ea7139280629c4 WHIRLPOOL 3cc039820865eafd1ea23eec81c3b4f842fe359e49a85d09925dddd5f8b0228adf62fa908cb345b9df0526ed9eb388f965d70ef99d73edcfaf20c5539fcb4559 AUX libvirt-3.0.0-fix_paths_for_apparmor.patch 2904 SHA256 77ccadc9bf80b029a3105ac7609b759d5b73c40fef03d4eabcb6c6c9bd3334f9 SHA512 be4aba4b9bd44bb2f1b4f269f573caafce746783e0a7c08ff72d03a96b9675261346ededaf1d6b6c89afaa6d2b88fe7fb0d9f120d40fd714179e6f9d209a6724 WHIRLPOOL 917b54d20a1a2567052de25f08b8296b392002292303eee11acfee486eb8437a767695325adc63a08f239edcbdceae9787f63cdebb313631c7e6880c97a54caf AUX libvirt-3.1.0-musl-fix-includes.patch 221 SHA256 40b1814d2a1d05a987242af46592a74feb612ccb3f064e93984bdad29d9c1fc7 SHA512 876c7dacedcce1d69938779b978b3a23b2f51128f121b4aa53f5f301d7740f90d77f335523210ed492b68b5f7a0b864b25a694ee562fb5e8ab1b6411d3da48e7 WHIRLPOOL d9d7f57cee28f1f6149f6de6f853f08679cbb9b3e82b019ff6046da525c1768ea3f7ef34cf3afa6033e87f80e8f5c74e5f2d129122d8df6edb371e743a3a3af5 -AUX libvirt-3.6.0-ssh-malicious-hostname-fix.patch 1770 SHA256 6dd8209b02a14f4db4cd4b3903d62418bec4a200b2c85eb597266eefc4fb0814 SHA512 177a85183d9a4b3e2a8be523cfd10c8dd8e7988aca69864c3ff55ebaf5576eebf904317ac0814e588be21909b21c1deb1dfca13f84f3af54ebbdb55e8f12f562 WHIRLPOOL 1935e293c8a438b326b6c617fd695f93e92c99b6bca13c7815a62ae04bc7c2dba885763595b02a7d4ec4f3235124ff03cea704f4e56ac7c613edbeca847c9225 AUX libvirt-3.8.0-CVE-2017-1000256.patch 3737 SHA256 af14abe57e4764eb35df8e104f992132e0ca9797d5b470adde6515f6c7c95c10 SHA512 2c3e88670ec9531207c60b89e8e2ec6188834e795cd0e698d63781209182801209d4097fd72607166853b54a9f301a160b575f757741da5aeb995d752bbcb80a WHIRLPOOL 61cfac579defb75b2d92622c3fafc25036f9b3d5260e296941188d541327b381397b4bf996c9e5c5b624aae82a76b43798bf3253b66d26e3f7f3e5fba70273f9 +AUX libvirt-3.9.0-tirpc.patch 550 SHA256 8f9ee62106e4a1689dc0b600969109ab1309454dbfad9257cda00382cdc6e876 SHA512 66ec3702d053f14534f1fd67bcaff970b3a8d7fe262ba379d299b6f9b9cefcb1e1ec0fae90669644d4d86ba0895586a04ab718a35ad0869384c9c6db74ccce49 WHIRLPOOL e637ccd06822aff4f66e2fc25d92ad3cad6b0637f57fe03fc87470a757495e828429a3ad936b9624af30ea3a67fdc3433b2510561e083b87a2ec1df2d33fc921 AUX libvirt-guests.confd 2430 SHA256 d5f85bb8c1d2010347f23badc422e98046b97a0066254739b5829fce07837d63 SHA512 78f419a89de7aabaad860903c24f1c070786fc1296d987e61dd537705b0e7f71a46c315888028f3826c3417e42861ca8471788be4ec5695e98427c5f18ae63fc WHIRLPOOL 4f06b9319f52b872f14f86da9aeeafecf176c46755955c7773badd0df239fdd76efaff50921565154fa24896d0e4b07df788e785ed6ff5f2308c0ba0e79a9418 AUX libvirt-guests.init-r2 5412 SHA256 f78ced5ebe644522c6ce102b3f6bcf932686243a50629559f988548c570cad3a SHA512 0f46ec5776c61d1776248779fa894b1a6d7b98d0eb8e8374b320c785c25d92468f087e350233b9152eb2cd0680f6b334c3a61684dabc7c5b559d3b55fdcb712d WHIRLPOOL 77ce5c6e615c94b437f13f8bfb2689cea7b8231a4aa227e83944fd66793a3daf0ada8c041c358f38c2f676dfc7fb071880df682dcc759f63e8e20f033e141d39 AUX libvirtd.confd-r5 740 SHA256 4f7fba7e64533868119c0f3355aa22932e163b208397323dc2cd96daadcc4079 SHA512 98f935589dbc5f2a99329f77fdf84c563fa0dc99404b7476603679478d68ce8dbea2c88645251d3c28f59e7bcae124ae632972146e8a8c3e0e9fcbfb27296f91 WHIRLPOOL cc40f10c1ab440efff318f4cac95c0923dfb3309e727d3de4a5dd5cd95181da76a6f1de4ad6740b99d0b65b6bbf5a5128ce24288f77a91268e74d2e8d8e95e49 @@ -14,10 +14,10 @@ AUX libvirtd.service.conf 401 SHA256 1cfb6f7dec5746364d9a4cccddb4b63f8ccd0ebf8bf AUX libvirtd.tmpfiles.conf 36 SHA256 0102a9bbbb6fc9764c2d49933a89d1661b3999aec53c6a66302cb0f21ce9c9fc SHA512 2b1c3c64dd6fa03d8c2ae24e7ce4aa7d754913214542a68a4e99f10fbc251fd23ee26e297a957d7b4b70eec8ef028c41fc915da3a85fbbd16143bb92d1de3aed WHIRLPOOL c51b2059f4eef0ceaf69e11018a6e51299be5aa21a56741366db4fe43a7998388fa6e5bf15d79c52ab66dd69d64c679003a0904c54033c8bdfc04c16bb5b8e4f AUX virtlockd.init-r1 570 SHA256 23ddea66fb2d85c17c382daa07abfabe7fa57d62406d2ca5df0c755f5dcc3834 SHA512 65a05d406200da9a534df5caa1b9cb2af97f0b03f64e6b4157322975fa754f59ae74fff9ec8301a6c0510e4b75e2b72a78cddf004a76109e18c375e83527cee5 WHIRLPOOL 7959e426986747165ef074ca52b8049aa4120b0206b7532330346552fe5811a46fa71b58e02fcd37e55b872e099ccc8688fcc3f30b2e2316e01a4220806d49b4 AUX virtlogd.init-r1 569 SHA256 1647c11779fd874bdc115234bae0f0f65278084541473d2825aa9864ad49f939 SHA512 0a3e083e742f9e0d8206ab9a48c63bbd395bdc24e5551e2cbeddffa3fb576a817b73dbafe646c392a35c354d6b65426a9b6f3ce3dcafc30077715e90684968c1 WHIRLPOOL e0fa334c60dac4aa1ff721c3c4e957a688e0a58297cb06249de50dd838c55eee3c1c00fcb4b1c06b74c1fb61c52354889a09bd2793c8623faa120489cac95c3a -DIST libvirt-3.6.0.tar.xz 14797704 SHA256 3a2c97f6950796f300f6a2e0404f4de8e51c3b9430cdb82738439adb0ac59e3d SHA512 6cde735a18cb71c9e6dbb25cd2a8f9c72d55ad7d74bdf97b00d784593f0bc59498917fb235ce04de4428899241520d87bf19c015b80282b3d0c12918d9b8b288 WHIRLPOOL 8185ad998158bac9aa6bc0dd0f590a3d9fb393ad94d308bdc84e60ac5c56e110d5f4a2355e2a10b01a6521d8261ae7484aee275e12a17cc7f2830f169e990596 DIST libvirt-3.8.0.tar.xz 14868712 SHA256 73eba834089ed0ce74e3183a7f12cf0c6f7de08e9a700b5456c62fb124f903f9 SHA512 fc48f29b493a5ec2b3586f6c5df0b8cb81f3f26be847bc42acfb6481d45970edc760dda0232ad57b95b8cf13382d0269dd3edf4a744040cda15b835d32d8c672 WHIRLPOOL af36d20c2713398f0d7aaf1b9fc2bcf978abc096d3070cb7cb1efa6680204e591e02b03340f4d862f6e7d1fabd4135cba23eef8ccd459264a44a052acf0e509e -EBUILD libvirt-3.6.0.ebuild 9705 SHA256 5d9511479f979dce30eef8ddc68a80b0e602461a459b8dd71f637d6628a44061 SHA512 e44a8cdfc9d9070c726610d6ec2f4191fdbc19fb2e3dceff4ac2a232aa73d43d8a7a2548909906c0d5d273c23e3fd2762d8a7379cdfa03a539d09d36d38dd9d9 WHIRLPOOL af6d2497a375d6639b3c0903abdc8c0cf1122b62a03de0825ade097eed2acefd18acc3781e3a05fc9a27afe26ddf69a5ae497ffc3b98cc00556674aaef84adc1 -EBUILD libvirt-3.8.0-r1.ebuild 9654 SHA256 18017ad471d8ba23b78489d29d6bb5f5833c6ade99fcf418b848d04b966eaa32 SHA512 81d1abce5b9fc4b3705b59d12d0383e178d0a443952ee8828d08fd4ba2c890129c6cae25d188ffe8bf19fbd8221073488fa6c57b41968b689ece539f0bca7e1b WHIRLPOOL cfff4b177ac911a659855445fe2842428dbdcedf1f403890a8049d5a418468847b7a8fa013fc2ae5898ddff9ba07062ff77e1286e6b74dee2593a4dc8936f3a8 +DIST libvirt-3.9.0.tar.xz 15010344 SHA256 89fc63213291d329d537ea96e363fd609160da080322973bd1126d431ff63424 SHA512 59878fe5f98ffb73f949315c02ec19f6a075cab21f695c9b98927d17fdc0820d6fd0aa6a9820a6bdb8e6957884a9dccc30b175bc5a3d8d25617546cccd460a38 WHIRLPOOL 9d00863262aefe3ee07653bb7b8fd5bd83efe08289edd106fd04acb93ddf9a65880fcc974b80f45057c410b87ea3233a2e09b4cc9475ee3fd65d597d2c4916ea +EBUILD libvirt-3.8.0-r1.ebuild 9661 SHA256 ef0648cada30b73ffe53dbc034d7e114770d2c323e825f2fbc22c23ef0ea9975 SHA512 66a28a319d1ed7263524c9c13e4331c3451ad321ccb39b4e608e05ad1e9d40fd1b4a75a05d5910a0a83c3bc47f8c5746aa80eedd16b1c0e8b0a4a4e093d79169 WHIRLPOOL cc1b9d73ea52c594427df28d421eba8c6e7f32d24f49c04826d8e1ecabf77a5ac355a7ec8e784888a611e20767ff6812116a5bc2160ebeeca2dda4f9171ba78a +EBUILD libvirt-3.9.0.ebuild 9661 SHA256 a7e6254c482d288abd3b203b68c1cf083c52811992ca9e193c32e4b9831600ca SHA512 b9be4e0360e391239691f2129ab7cd9f42e67c3c28e6e5d753ae005e584f8a13768a58b488fa414f9cbefd60565a3d732c09e6ed8b5513a89d85de767cad834f WHIRLPOOL 2564d291ccb2fa3aa643525ca6b5b320f2e36d0d13476d52730957fbc02e3343658ccc7d94cb76a40cfa9ad04003fb58044c6b905c224d9efd853f774c097364 EBUILD libvirt-9999.ebuild 9506 SHA256 d5af8cfea0f8f40cb4c1e474a64709440cd5fc31672af9be7bc607fcec880f04 SHA512 669472ae963372efc043f20dcf3a38d06fcdf45eb80ca13c7b76e6fed35590255206731ebd4a42b95017399bba309d49e734c14c07c9b5dc22cc7ae7819dbac2 WHIRLPOOL 1158f1338973b99a1dc518aae73e50015fff4cc2a7d8afee086784525571b2668b76dd5f6eaf5391d8a80d6817f4d8c5caf363d93e758b89202ee73e4c047f43 MISC ChangeLog 27207 SHA256 94b83a13739094fab2b993a9a833e735422f1117aa3511fc399ef7449977cbe4 SHA512 36eda4a70d13b8e06fc293ae0a31e0841e0bbb541b3c8294e9a3f341957739208836f353175cba6ff6f3b9f99c41d6be6ab69909812a5d28f2b3b79b6e386fa0 WHIRLPOOL 8721914e310158f81b907583aaeac8d2000a3db9e63f761cd7ee9674ec7834f953f9ffa248a06938d5af5ae98aee304a1e53467e8d134ebf56351ff37aaaaa48 MISC ChangeLog-2015 33229 SHA256 9b5ab13f86ef62f4eead3fc3ce0a20da725cf43437e4edc24c606fa56ca46831 SHA512 e1209249689918947d066bb91245d851f39a48b78819cb3265aa36cbe5e678e8374ef7a6279dffe678b7264a4d53aecf1d5e4f4e690e4a70df32dd84a067571a WHIRLPOOL 94ef57fc540991bc6fc9442a3d74cd6e7c10bccfee41275fca6ae4286fa73ef8bf1d9c1e9d76f10a6c2548250f5d1e72a9c1776c7b504efd9325f61b09bee55d diff --git a/app-emulation/libvirt/files/libvirt-3.6.0-ssh-malicious-hostname-fix.patch b/app-emulation/libvirt/files/libvirt-3.6.0-ssh-malicious-hostname-fix.patch deleted file mode 100644 index 628928412767..000000000000 --- a/app-emulation/libvirt/files/libvirt-3.6.0-ssh-malicious-hostname-fix.patch +++ /dev/null @@ -1,47 +0,0 @@ -From e4cb8500810a310a10a6cb359e1b53fac03ed597 Mon Sep 17 00:00:00 2001 -From: "Daniel P. Berrange" -Date: Fri, 11 Aug 2017 17:19:53 +0100 -Subject: [PATCH] rpc: avoid ssh interpreting malicious hostname as arguments - -Inspired by the recent GIT / Mercurial security flaws -(http://blog.recurity-labs.com/2017-08-10/scm-vulns), -consider someone/something manages to feed libvirt a bogus -URI such as: - - virsh -c qemu+ssh://-oProxyCommand=gnome-calculator/system - -In this case, the hosname "-oProxyCommand=gnome-calculator" -will get interpreted as an argument to ssh, not a hostname. -Fortunately, due to the set of args we have following the -hostname, SSH will then interpret our bit of shell script -that runs 'nc' on the remote host as a cipher name, which is -clearly invalid. This makes ssh exit during argv parsing and -so it never tries to run gnome-calculator. - -We are lucky this time, but lets be more paranoid, by using -'--' to explicitly tell SSH when it has finished seeing -command line options. This forces it to interpret -"-oProxyCommand=gnome-calculator" as a hostname, and thus -see a fail from hostname lookup. - -Signed-off-by: Daniel P. Berrange ---- - src/rpc/virnetsocket.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c -index d228c8a8c..23089afef 100644 ---- a/src/rpc/virnetsocket.c -+++ b/src/rpc/virnetsocket.c -@@ -868,7 +868,7 @@ int virNetSocketNewConnectSSH(const char *nodename, - if (!netcat) - netcat = "nc"; - -- virCommandAddArgList(cmd, nodename, "sh", "-c", NULL); -+ virCommandAddArgList(cmd, "--", nodename, "sh", "-c", NULL); - - virBufferEscapeShell(&buf, netcat); - if (virBufferCheckError(&buf) < 0) { --- -2.13.5 - diff --git a/app-emulation/libvirt/files/libvirt-3.9.0-tirpc.patch b/app-emulation/libvirt/files/libvirt-3.9.0-tirpc.patch new file mode 100644 index 000000000000..39e2bfafa63a --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-3.9.0-tirpc.patch @@ -0,0 +1,13 @@ +diff --git a/tools/Makefile.am b/tools/Makefile.am +index 5b73558..05bf8a5 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -428,7 +428,7 @@ if WITH_WIRESHARK_DISSECTOR + + ws_plugin_LTLIBRARIES = wireshark/src/libvirt.la + wireshark_src_libvirt_la_CPPFLAGS = \ +- -I wireshark/src $(WIRESHARK_DISSECTOR_CFLAGS) ++ -I wireshark/src -I/usr/include/tirpc $(WIRESHARK_DISSECTOR_CFLAGS) + wireshark_src_libvirt_la_LDFLAGS = -avoid-version -module + nodist_wireshark_src_libvirt_la_SOURCES = wireshark/src/plugin.c + wireshark_src_libvirt_la_SOURCES = \ diff --git a/app-emulation/libvirt/libvirt-3.6.0.ebuild b/app-emulation/libvirt/libvirt-3.6.0.ebuild deleted file mode 100644 index d4d2786ca147..000000000000 --- a/app-emulation/libvirt/libvirt-3.6.0.ebuild +++ /dev/null @@ -1,382 +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="" - 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 ~arm64 x86" - SLOT="0/${PV}" -fi - -DESCRIPTION="C toolkit to manipulate virtual machines" -HOMEPAGE="http://www.libvirt.org/" -LICENSE="LGPL-2.1" -IUSE=" - apparmor audit +caps +dbus firewalld fuse glusterfs iscsi +libvirtd lvm - libssh lxc +macvtap nfs nls numa openvz parted pcap phyp policykit - +qemu rbd sasl selinux +udev uml +vepa virtualbox virt-network - wireshark-plugins xen zeroconf zfs 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(+)] ) - firewalld? ( net-firewall/firewalld ) - fuse? ( >=sys-fs/fuse-2.8.6:= ) - glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) - iscsi? ( sys-block/open-iscsi ) - libssh? ( net-libs/libssh ) - lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) - nfs? ( net-fs/nfs-utils ) - numa? ( - >sys-process/numactl-2.0.2 - sys-process/numad - ) - parted? ( - >=sys-block/parted-1.8[device-mapper] - sys-fs/lvm2[-device-mapper-only(-)] - ) - pcap? ( >=net-libs/libpcap-1.0.0 ) - policykit? ( >=sys-auth/polkit-0.9 ) - qemu? ( - >=app-emulation/qemu-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 - "${FILESDIR}"/${PN}-3.6.0-ssh-malicious-hostname-fix.patch # bug #629462 -) - -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/libvirt-3.8.0-r1.ebuild b/app-emulation/libvirt/libvirt-3.8.0-r1.ebuild index 7ac23060bb18..e131f0e87239 100644 --- a/app-emulation/libvirt/libvirt-3.8.0-r1.ebuild +++ b/app-emulation/libvirt/libvirt-3.8.0-r1.ebuild @@ -9,7 +9,7 @@ if [[ ${PV} = *9999* ]]; then inherit git-r3 EGIT_REPO_URI="git://libvirt.org/libvirt.git" SRC_URI="" - KEYWORDS="" + KEYWORDS="amd64 x86" SLOT="0" else # Versions with 4 numbers are stable updates: @@ -18,7 +18,7 @@ else else SRC_URI="http://libvirt.org/sources/${P}.tar.xz" fi - KEYWORDS="~amd64 ~arm64 ~x86" + KEYWORDS="amd64 ~arm64 x86" SLOT="0/${PV}" fi diff --git a/app-emulation/libvirt/libvirt-3.9.0.ebuild b/app-emulation/libvirt/libvirt-3.9.0.ebuild new file mode 100644 index 000000000000..d20a55de19b0 --- /dev/null +++ b/app-emulation/libvirt/libvirt-3.9.0.ebuild @@ -0,0 +1,383 @@ +# 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="" + 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 ~arm64 ~x86" + SLOT="0/${PV}" +fi + +DESCRIPTION="C toolkit to manipulate virtual machines" +HOMEPAGE="http://www.libvirt.org/" +LICENSE="LGPL-2.1" +IUSE=" + apparmor audit +caps +dbus firewalld fuse glusterfs iscsi +libvirtd lvm + libssh lxc +macvtap nfs nls numa openvz parted pcap phyp policykit + +qemu rbd sasl selinux +udev uml +vepa virtualbox virt-network + wireshark-plugins xen zeroconf zfs +" + +REQUIRED_USE=" + firewalld? ( virt-network ) + libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) ) + lxc? ( caps libvirtd ) + openvz? ( libvirtd ) + policykit? ( dbus ) + qemu? ( libvirtd ) + uml? ( libvirtd ) + vepa? ( macvtap ) + virt-network? ( libvirtd ) + virtualbox? ( libvirtd ) + xen? ( libvirtd )" + +# gettext.sh command is used by the libvirt command wrappers, and it's +# non-optional, so put it into RDEPEND. +# We can use both libnl:1.1 and libnl:3, but if you have both installed, the +# package will use 3 by default. Since we don't have slot pinning in an API, +# we must go with the most recent +RDEPEND=" + app-misc/scrub + dev-libs/libgcrypt:0 + dev-libs/libnl:3 + >=dev-libs/libxml2-2.7.6 + || ( >=net-analyzer/netcat6-1.0-r2 >=net-analyzer/openbsd-netcat-1.105-r1 ) + >=net-libs/gnutls-1.0.25:0= + net-libs/libssh2 + net-libs/libtirpc + net-libs/rpcsvc-proto + >=net-misc/curl-7.18.0 + sys-apps/dmidecode + >=sys-apps/util-linux-2.17 + sys-devel/gettext + sys-libs/ncurses:0= + sys-libs/readline:= + apparmor? ( sys-libs/libapparmor ) + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap-ng ) + dbus? ( sys-apps/dbus ) + firewalld? ( net-firewall/firewalld ) + fuse? ( >=sys-fs/fuse-2.8.6:= ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) + iscsi? ( sys-block/open-iscsi ) + libssh? ( net-libs/libssh ) + lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) + nfs? ( net-fs/nfs-utils ) + numa? ( + >sys-process/numactl-2.0.2 + sys-process/numad + ) + parted? ( + >=sys-block/parted-1.8[device-mapper] + sys-fs/lvm2[-device-mapper-only(-)] + ) + pcap? ( >=net-libs/libpcap-1.0.0 ) + policykit? ( >=sys-auth/polkit-0.9 ) + qemu? ( + >=app-emulation/qemu-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 + "${FILESDIR}"/${PN}-3.9.0-tirpc.patch +) + +pkg_setup() { + if use qemu; then + enewgroup qemu 77 + enewuser qemu 77 -1 -1 "qemu,kvm" + fi + + use policykit && enewgroup libvirt + + # Check kernel configuration: + CONFIG_CHECK="" + use fuse && CONFIG_CHECK+=" + ~FUSE_FS" + + use lvm && CONFIG_CHECK+=" + ~BLK_DEV_DM + ~DM_MULTIPATH + ~DM_SNAPSHOT" + + use lxc && CONFIG_CHECK+=" + ~BLK_CGROUP + ~CGROUP_CPUACCT + ~CGROUP_DEVICE + ~CGROUP_FREEZER + ~CGROUP_NET_PRIO + ~CGROUP_PERF + ~CGROUPS + ~CGROUP_SCHED + ~CPUSETS + ~IPC_NS + ~MACVLAN + ~NAMESPACES + ~NET_CLS_CGROUP + ~NET_NS + ~PID_NS + ~POSIX_MQUEUE + ~SECURITYFS + ~USER_NS + ~UTS_NS + ~VETH + ~!GRKERNSEC_CHROOT_MOUNT + ~!GRKERNSEC_CHROOT_DOUBLE + ~!GRKERNSEC_CHROOT_PIVOT + ~!GRKERNSEC_CHROOT_CHMOD + ~!GRKERNSEC_CHROOT_CAPS" + + kernel_is lt 4 7 && use lxc && CONFIG_CHECK+=" + ~DEVPTS_MULTIPLE_INSTANCES" + + use macvtap && CONFIG_CHECK+=" + ~MACVTAP" + + use virt-network && CONFIG_CHECK+=" + ~BRIDGE_EBT_MARK_T + ~BRIDGE_NF_EBTABLES + ~NETFILTER_ADVANCED + ~NETFILTER_XT_CONNMARK + ~NETFILTER_XT_MARK + ~NETFILTER_XT_TARGET_CHECKSUM" + # Bandwidth Limiting Support + use virt-network && CONFIG_CHECK+=" + ~BRIDGE_EBT_T_NAT + ~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 +} -- cgit v1.2.3