From 2d446203bcf1a0db08e99abca43513d246dfa73d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 5 Apr 2018 21:52:00 +0100 Subject: gentoo resync : 05.04.2018 --- app-emulation/Manifest.gz | Bin 19008 -> 19018 bytes app-emulation/containerd/Manifest | 4 +- app-emulation/containerd/containerd-1.0.0.ebuild | 52 -- app-emulation/containerd/containerd-1.0.3.ebuild | 52 ++ app-emulation/docker/Manifest | 2 - app-emulation/docker/docker-18.02.0.ebuild | 316 -------- app-emulation/edumips64/Manifest | 4 +- app-emulation/edumips64/edumips64-1.1.ebuild | 4 +- app-emulation/edumips64/edumips64-1.2.ebuild | 4 +- app-emulation/fuse/Manifest | 4 +- app-emulation/fuse/fuse-1.5.0.ebuild | 64 -- app-emulation/fuse/fuse-1.5.2.ebuild | 64 ++ app-emulation/libguestfs/Manifest | 2 +- app-emulation/libguestfs/libguestfs-1.36.13.ebuild | 2 +- app-emulation/lxc/Manifest | 2 +- app-emulation/lxc/lxc-2.1.1.ebuild | 2 +- app-emulation/lxd/Manifest | 6 - app-emulation/lxd/files/lxd-2.14-dont-go-get.patch | 16 - app-emulation/lxd/files/lxd-2.14-fix-fr-po.patch | 11 - app-emulation/lxd/files/lxd-2.14.confd | 27 - app-emulation/lxd/files/lxd-2.14.initd | 46 -- app-emulation/lxd/files/lxd-2.14.service | 10 - app-emulation/lxd/files/lxd-2.19-dont-go-get.patch | 16 - app-emulation/qemu/Manifest | 10 +- app-emulation/qemu/qemu-2.11.0.ebuild | 805 --------------------- app-emulation/qemu/qemu-2.11.1-r1.ebuild | 805 --------------------- app-emulation/qemu/qemu-2.11.1-r2.ebuild | 805 +++++++++++++++++++++ app-emulation/qemu/qemu-2.11.1-r52.ebuild | 805 --------------------- app-emulation/qemu/qemu-2.11.1-r53.ebuild | 805 +++++++++++++++++++++ app-emulation/qemu/qemu-9999.ebuild | 4 +- 30 files changed, 1746 insertions(+), 3003 deletions(-) delete mode 100644 app-emulation/containerd/containerd-1.0.0.ebuild create mode 100644 app-emulation/containerd/containerd-1.0.3.ebuild delete mode 100644 app-emulation/docker/docker-18.02.0.ebuild delete mode 100644 app-emulation/fuse/fuse-1.5.0.ebuild create mode 100644 app-emulation/fuse/fuse-1.5.2.ebuild delete mode 100644 app-emulation/lxd/files/lxd-2.14-dont-go-get.patch delete mode 100644 app-emulation/lxd/files/lxd-2.14-fix-fr-po.patch delete mode 100644 app-emulation/lxd/files/lxd-2.14.confd delete mode 100644 app-emulation/lxd/files/lxd-2.14.initd delete mode 100644 app-emulation/lxd/files/lxd-2.14.service delete mode 100644 app-emulation/lxd/files/lxd-2.19-dont-go-get.patch delete mode 100644 app-emulation/qemu/qemu-2.11.0.ebuild delete mode 100644 app-emulation/qemu/qemu-2.11.1-r1.ebuild create mode 100644 app-emulation/qemu/qemu-2.11.1-r2.ebuild delete mode 100644 app-emulation/qemu/qemu-2.11.1-r52.ebuild create mode 100644 app-emulation/qemu/qemu-2.11.1-r53.ebuild (limited to 'app-emulation') diff --git a/app-emulation/Manifest.gz b/app-emulation/Manifest.gz index 8ec5fa52ea3d..f619bd484cce 100644 Binary files a/app-emulation/Manifest.gz and b/app-emulation/Manifest.gz differ diff --git a/app-emulation/containerd/Manifest b/app-emulation/containerd/Manifest index fab3a0608258..36c1634b8dfa 100644 --- a/app-emulation/containerd/Manifest +++ b/app-emulation/containerd/Manifest @@ -1,10 +1,10 @@ DIST containerd-0.2.9_p20170917.tar.gz 1140788 BLAKE2B 96effa85f9cb03c3e416d53438376af6c7965660bf9c9931fdfa7fee94cca9386f2732e70dc88ee32b83e902b7d4a3072e22a817d9970ed1e07dc1271e8b33ab SHA512 c749bda691197ec8a7603db9ad92f2800a3f065143430a660333b7862518deb4c158a1c1fd01671dff438b40988d4a64d8f06bab05496b8728c6e2f57cd7da0a -DIST containerd-1.0.0.tar.gz 3763785 BLAKE2B cd4af679c9028b616aeedd594518f796a350523899c13da5a848a5843b318394166ddfbf5e7ed1f473a3759b26d134659f928d8e15da17ebdf65a41d2fd5f914 SHA512 8c1a03de7f30976675e4482b4f18f4b87da56108de4d92f2e33b4cb4f8c188af5b3fad87971a294eac8442a0fb6ddae48cda81334c363203a8c8bdfc09176a7a DIST containerd-1.0.1.tar.gz 3766659 BLAKE2B 36c96a9e3cba22578daff31e46d9a876095e9de7e20e1e84a41076d9936f30a5681e41187a90f9a01884fd02086fa3c9a6ee29c8261401988a1cfa2026952431 SHA512 351c0e298ba6a9a14df2f367df23049a8a833eb18238e3d41cf0066feb2e0b8f2aa7b25fb4484a1b5c95bccf5cba3a8076a5bcfe25602b5368e7cf2a20872160 DIST containerd-1.0.2.tar.gz 3772144 BLAKE2B 7549f47d1f0ff0244d7dedd41aabb76d2c2fc4942f8da3cf45fe0ca7b808b3aed4e39e0338d30ccc63cf37db3e59412442d43d272d3b073823e210a24d4d991a SHA512 d6b8eeaa942e1dccb21feb0723bb1ee29c878992c0f7128038c967580b4c6a1b4110371aa60962a331627d869d027a20ca47e6c625aedf68cac5d532d7f7094a +DIST containerd-1.0.3.tar.gz 3776722 BLAKE2B 31e9f2e56b23d09341e4cdd546198233517893e1596c9aefd084044f04b1e1831219343142eef09159a5698720fa307e3ec1dbb86304e071a9d8e1f8f8436519 SHA512 31aa462f357a77434033ae4bff2e453ce849cbd91e4981383be3c7cdea77ea1f57081c4f8121d15c151145defc2003348fe23b26a11568b38780fa2fb9cf114c EBUILD containerd-0.2.9_p20170917.ebuild 1000 BLAKE2B e207ebb992d1c1e47a13c5ebae2004a6e8bb887ab605d9aaf7ac053762aecb58224b0d21cf13cc59fd1d9bc508fc6c0be5d3f7c4fd6a22136059a1a12b0df072 SHA512 c258fd617c1006ccc09506c1ff28d2edfe2e15966cacc62ea4e1194f3cdf96d74a60db5bf1f009a05b97f84bac44c23cef33e73e77ba272b8861244be7dbbe36 -EBUILD containerd-1.0.0.ebuild 1239 BLAKE2B 93aeb4bb834e6d79835d9eee995d0e8ec82d042d344eb2082366c71e56dc3f9376f3621a57b050f88478f5f9874c6cfd458a3c04a4866d3e583ed925bd49726f SHA512 b68d0bf59a5bdcbb98a8d480e5db49b182fcedf16962a6d9570dfeef22670d84215b8dd2b1c372108f92e6dd3b0f6c0b5478b1ce2c61ab2a2f4063820fcce97e EBUILD containerd-1.0.1.ebuild 1238 BLAKE2B 58cebf0f2ec0958892599bbbe2f518e42cf6d98a91880c1393bbff38d51958b918ccd838d92e7a39bda493b1b4c52d1ecfa02ffb2dbb9ba46b165acf47abe1a7 SHA512 3e3013ed0bec752ddff0bc524cb6c003b8c41db036201f9212bff1a298abf4486c64b7d65e3fd1e9d972e53b2c18d1d87f5f9db12d28ef9bca7f4c4981b6ce3d EBUILD containerd-1.0.2.ebuild 1239 BLAKE2B ddaeffc83657567642894a9d43322704364bbdaba0ee5081ca24cef78b007871b85b565e1743107c5aebfc0f8f6d2cc462e9ffd2ebf31b844bc1eccdcc74f060 SHA512 2739a6f4e78bc64e7dd579444caa0b5a34e88cd9f3c9ceec52f1479936124302bb1e745ab66e3e841521bd5ce9244d92811e475add00db695901e1d681b01b2a +EBUILD containerd-1.0.3.ebuild 1239 BLAKE2B d7259c625404bb432bd75fa6a65146ae22a572cef59be1d81151ce835fde40674c7111027729ac62a6765b2d65bdf682cc7002c3af5c2ea6e0e4e3b2b5d8c5d5 SHA512 0e085fe0331c7222ab4f7dcd14fcf17502d0f9ccdc558afa87dd79fcff9c54736adcc971a1a703ee17dd6fbeef8cadf5efc9c0a4fb7c5ce5ef9e1bb922d5576c EBUILD containerd-9999.ebuild 965 BLAKE2B b671ff0dd3c5b8c72f2d713c04926047a304b7eec201051b5051a4ce49550176683a934d0b03350d5302fdff242e8e11f31b3db0b3962b73bcac85a0ed1a116d SHA512 b2acd6bd1c237a1058cec02875877d82e2e8c568bf3143cca020c64e13a0649975e3adcdb68540216e8ce1bcdbc7141eda8476c1c01ee2ca313120eca2850012 MISC metadata.xml 985 BLAKE2B fbef8e091234b75e89ef860f1b43114cfefa79ab65b434592bf4f8699ef1c95b6e126e7f848e401b9c1bb1d9c0ed67a86f0147169aaa3727bc26029d9f92d869 SHA512 d6ef315f79b599a8d47fda31e6e6a8c82e6dd52c3ca8339984ea72b43d6dd255d1b46fb7c566771231eba208796d3438b39cac22e0823430d9f59fafdef96147 diff --git a/app-emulation/containerd/containerd-1.0.0.ebuild b/app-emulation/containerd/containerd-1.0.0.ebuild deleted file mode 100644 index cd55fba553cc..000000000000 --- a/app-emulation/containerd/containerd-1.0.0.ebuild +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -EGO_PN="github.com/containerd/${PN}" - -inherit toolchain-funcs - -if [[ ${PV} == *9999 ]]; then - inherit golang-vcs -else - MY_PV="${PV/_rc/-rc.}" - EGIT_COMMIT="v${MY_PV}" - CONTAINERD_COMMIT="89623f2" - SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~ppc64" - inherit golang-vcs-snapshot -fi - -DESCRIPTION="A daemon to control runC" -HOMEPAGE="https://containerd.tools" - -LICENSE="Apache-2.0" -SLOT="0" -IUSE="+btrfs hardened" - -DEPEND="btrfs? ( sys-fs/btrfs-progs )" -RDEPEND="|| ( >=app-emulation/docker-runc-1.0.0_rc4 - >=app-emulation/runc-1.0.0_rc4 ) - sys-libs/libseccomp" - -S=${WORKDIR}/${P}/src/${EGO_PN} - -src_prepare() { - default - if [[ ${PV} != *9999* ]]; then - sed -i -e "s/git describe --match.*$/echo ${PV})/"\ - -e "s/git rev-parse HEAD.*$/echo $CONTAINERD_COMMIT)/"\ - -e "s/-s -w//" \ - Makefile || die - fi -} - -src_compile() { - local options=( $(usex btrfs "" "no_btrfs") ) - export GOPATH="${WORKDIR}/${P}" # ${PWD}/vendor - LDFLAGS=$(usex hardened '-extldflags -fno-PIC' '') emake BUILDTAGS="${options[@]}" -} - -src_install() { - dobin bin/containerd{-shim,-stress,} bin/ctr -} diff --git a/app-emulation/containerd/containerd-1.0.3.ebuild b/app-emulation/containerd/containerd-1.0.3.ebuild new file mode 100644 index 000000000000..e516515b3394 --- /dev/null +++ b/app-emulation/containerd/containerd-1.0.3.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +EGO_PN="github.com/containerd/${PN}" + +inherit toolchain-funcs + +if [[ ${PV} == *9999 ]]; then + inherit golang-vcs +else + MY_PV="${PV/_rc/-rc.}" + EGIT_COMMIT="v${MY_PV}" + CONTAINERD_COMMIT="773c489" + SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~ppc64" + inherit golang-vcs-snapshot +fi + +DESCRIPTION="A daemon to control runC" +HOMEPAGE="https://containerd.tools" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="+btrfs hardened" + +DEPEND="btrfs? ( sys-fs/btrfs-progs )" +RDEPEND="|| ( >=app-emulation/docker-runc-1.0.0_rc4 + >=app-emulation/runc-1.0.0_rc4 ) + sys-libs/libseccomp" + +S=${WORKDIR}/${P}/src/${EGO_PN} + +src_prepare() { + default + if [[ ${PV} != *9999* ]]; then + sed -i -e "s/git describe --match.*$/echo ${PV})/"\ + -e "s/git rev-parse HEAD.*$/echo $CONTAINERD_COMMIT)/"\ + -e "s/-s -w//" \ + Makefile || die + fi +} + +src_compile() { + local options=( $(usex btrfs "" "no_btrfs") ) + export GOPATH="${WORKDIR}/${P}" # ${PWD}/vendor + LDFLAGS=$(usex hardened '-extldflags -fno-PIC' '') emake BUILDTAGS="${options[@]}" +} + +src_install() { + dobin bin/containerd{-shim,-stress,} bin/ctr +} diff --git a/app-emulation/docker/Manifest b/app-emulation/docker/Manifest index c9acce4a4f54..6c84e273f7b2 100644 --- a/app-emulation/docker/Manifest +++ b/app-emulation/docker/Manifest @@ -1,10 +1,8 @@ DIST docker-17.09.1.tar.gz 10135978 BLAKE2B 4c2dea48b3593332ac7b02bfcc7bf037b858adf87e5dd8ff84b03aca75d711375fafb06683a6a57cd2549c1a0a0edb2d7c7c1d4cf1b9ceefce18f4f91164b931 SHA512 e968ced32c379b74602053d1e9fe9ee5abe595078bb8d5f0d994c7eafd1557158d58fa48489ca8d7d578dbc7a5241182288b3ab37885b53abb8364d7aa9d2a4f DIST docker-17.12.1.tar.gz 11046888 BLAKE2B f50236826d8b064023e76a6c23a52c307eada73338d25fcc4fd3448a855f91b0f1d3080408bc9e58102467a9605c54c20080773b46851135566b85ce00f7dfb8 SHA512 ca9c28a489c6c65de27cb64e68c783336e2ddca7e7b2d241e9557a43e62e33146afb644aa67fe92afce658522c02fbe0378b3c1318a32628c1a1a046c67a4fb7 -DIST docker-18.02.0.tar.gz 12659242 BLAKE2B 0aac95ec6e6cbf980ec163cd40d9646207ef46df93dab9dab397ddc9a5a29addd25c014b810056a48f7498b5e2cb0d5772f99eed0b2b4d12eac815822ac22609 SHA512 4d1bd0ffc893e70fc524f46cacdc4ab035d8b7e0fd7e8de9faf6d9c30b9920b68a99764101e47a8375425b774fe93c317213509b2d1ace87c7598b2b939b849b DIST docker-18.03.0.tar.gz 12751925 BLAKE2B ea28cb4904673c8bbc71add57c880db8593ba68afd40f60029f0b509bde4a61cd1c59ac8f12fd9d3a99571ffaf597745187bab47b897170c54bf9b05d67c0983 SHA512 6385d720a58275d3e415c89f6953b64fdf96c2297ea7a86baf8f044530bb55fef40479e8a018055b85fce73f30dfb36a9904ff13bc12acc6ec4b565431145dbe EBUILD docker-17.09.1.ebuild 8766 BLAKE2B 79466ae75ff1b04af6fa51414d0d63b56f400d8c5879bd53ce37a99f824720559c323fad6129da7720ed252c9b5f70d3cb2d63afe25eaa177072272b98e5da3b SHA512 744bf909f82262827d04307bc71f9ec18ce194e3e213ce8f0ebfe172565d84d9c31ccf92ccf9ccadf7457780246427e82cd1f2082a49524e6b35d17ffec6131e EBUILD docker-17.12.1.ebuild 8284 BLAKE2B 74fb65654ca7792a04c749b357e513be7e4fc6c0f980ed1061b88a48a55518cb68575e00c1285d8bc5903ad24a767ffd38b4e1090542b81b899c92f2dffaf4fd SHA512 a9c53326a1b8ac22058f4f5a7102c1a9444799aa21f4651c5336f241c17ab46f1e3108618468041fcd5f1c13ffc0d7e4aa1e6f29956de09cfdbd1ccbcd7b2918 -EBUILD docker-18.02.0.ebuild 8807 BLAKE2B 14b1a57179ff2b0faa384521e1e31ca6d947cc511121af3969a35517dd5e1247195e76cac103a731273b0dfb747c2a7963b87cff5a824de8cc67b449a0774101 SHA512 ff2bd5edd6787e69de06cb4ecb5d162fa0c580345432e160cf4ac1848c1348389c53f4e5206f34432106ac0c5c5682fc0ce8dfd6970d498ff442708cac5f2589 EBUILD docker-18.03.0.ebuild 8267 BLAKE2B 6407b0b3d70cd2e9d8d726984e203c26e0bb897b5494ff925ce7bdbedf8d27dc85b5a659a323699069e85f0cd41674fe793185650c5f39375ec0473f39549700 SHA512 ba878265b53483150d4bd7323ca978143ceed9636a67c14c88b2b2dadb7afea4dcd6623200d7e598ed2b4a1147ff87cb712c741ddbc94fd7463a3f3ce6ff49a0 EBUILD docker-9999.ebuild 8077 BLAKE2B 8b65d3c59a41acd2020f1a43cf79bea2871fb7b911170741eb3c217e9acd4a5a24b2c2e204e3635cac3e392c72bdafc332b25fe0613991e37cb3d7c55700d399 SHA512 1fb9025bd12796909a623a3ebc9da52e4e8fd73d11f60e25907530fcb62039d7dcf580e4e6f22f103cf1a07aee8bfd6975fa11bd0829952d23613d4ae7ade9c4 MISC metadata.xml 1637 BLAKE2B 14c56a84e41ebd76827cf37c27fe21259ca06e00d8c7fe318bd5eca609a77a9e23fc5ea13caba1616e47d17978402f715e6a8bc40643ce0cfb3ee87494ee6858 SHA512 bdaea32036a7f65f7015634d45bdf4f13322f3266cda389b49d2c57ad86e9811731194af5786e312d5ea40dab8b8eb78fc7b79a2ffee186b8eaabae9cc3c7a1b diff --git a/app-emulation/docker/docker-18.02.0.ebuild b/app-emulation/docker/docker-18.02.0.ebuild deleted file mode 100644 index 8fdca0531b78..000000000000 --- a/app-emulation/docker/docker-18.02.0.ebuild +++ /dev/null @@ -1,316 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -EGO_PN="github.com/docker/docker-ce" - -if [[ ${PV} = *9999* ]]; then - # Docker cannot be fetched via "go get", thanks to autogenerated code - EGIT_REPO_URI="https://${EGO_PN}.git" - EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}" - inherit git-r3 -else - inherit versionator - if [ "$(get_version_component_count)" = 4 ]; then - MY_PV="$(replace_version_separator 3 '-ce-')" - else - MY_PV="$PV-ce" - fi - DOCKER_GITCOMMIT="fc4de44" - EGIT_COMMIT="v${MY_PV}" - SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm" - [ "$DOCKER_GITCOMMIT" ] || die "DOCKER_GITCOMMIT must be added manually for each bump!" - inherit golang-vcs-snapshot -fi -inherit bash-completion-r1 golang-base linux-info systemd udev user - -DESCRIPTION="The core functions you need to create Docker images and run Docker containers" -HOMEPAGE="https://dockerproject.org" -LICENSE="Apache-2.0" -SLOT="0" -IUSE="apparmor aufs btrfs +container-init +device-mapper hardened overlay pkcs11 seccomp" - -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies -CDEPEND=" - >=dev-db/sqlite-3.7.9:3 - device-mapper? ( - >=sys-fs/lvm2-2.02.89[thin] - ) - seccomp? ( >=sys-libs/libseccomp-2.2.1 ) - apparmor? ( sys-libs/libapparmor ) -" - -DEPEND=" - ${CDEPEND} - - dev-go/go-md2man - - btrfs? ( - >=sys-fs/btrfs-progs-3.16.1 - ) -" - -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#optional-dependencies -RDEPEND=" - ${CDEPEND} - >=net-firewall/iptables-1.4 - sys-process/procps - >=dev-vcs/git-1.7 - >=app-arch/xz-utils-4.9 - dev-libs/libltdl - ~app-emulation/containerd-1.0.1 - ~app-emulation/docker-runc-1.0.0_rc4_p20180122[apparmor?,seccomp?] - >=app-emulation/docker-proxy-0.8.0_p20180112 - container-init? ( >=sys-process/tini-0.16.1[static] ) -" - -RESTRICT="installsources strip" - -S="${WORKDIR}/${P}/src/${EGO_PN}" - -# see "contrib/check-config.sh" from upstream's sources -CONFIG_CHECK=" - ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS - ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG - ~KEYS - ~VETH ~BRIDGE ~BRIDGE_NETFILTER - ~NF_NAT_IPV4 ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE - ~NETFILTER_XT_MATCH_ADDRTYPE ~NETFILTER_XT_MATCH_CONNTRACK - ~NF_NAT ~NF_NAT_NEEDED - ~POSIX_MQUEUE - - ~USER_NS - ~SECCOMP - ~CGROUP_PIDS - ~MEMCG_SWAP ~MEMCG_SWAP_ENABLED - - ~BLK_CGROUP ~BLK_DEV_THROTTLING ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED - ~CGROUP_PERF - ~CGROUP_HUGETLB - ~NET_CLS_CGROUP - ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED ~RT_GROUP_SCHED - ~IP_VS ~IP_VS_PROTO_TCP ~IP_VS_PROTO_UDP ~IP_VS_NFCT ~IP_VS_RR - - ~VXLAN - ~XFRM_ALGO ~XFRM_USER - ~IPVLAN - ~MACVLAN ~DUMMY -" - -ERROR_KEYS="CONFIG_KEYS: is mandatory" -ERROR_MEMCG_SWAP="CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers" -ERROR_RESOURCE_COUNTERS="CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering" - -ERROR_BLK_CGROUP="CONFIG_BLK_CGROUP: is optional for container statistics gathering" -ERROR_IOSCHED_CFQ="CONFIG_IOSCHED_CFQ: is optional for container statistics gathering" -ERROR_CGROUP_PERF="CONFIG_CGROUP_PERF: is optional for container statistics gathering" -ERROR_CFS_BANDWIDTH="CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering" -ERROR_XFRM_ALGO="CONFIG_XFRM_ALGO: is optional for secure networks" -ERROR_XFRM_USER="CONFIG_XFRM_USER: is optional for secure networks" - -pkg_setup() { - if kernel_is lt 3 10; then - ewarn "" - ewarn "Using Docker with kernels older than 3.10 is unstable and unsupported." - ewarn " - http://docs.docker.com/engine/installation/binaries/#check-kernel-dependencies" - fi - - # for where these kernel versions come from, see: - # https://www.google.com/search?q=945b2b2d259d1a4364a2799e80e8ff32f8c6ee6f+site%3Akernel.org%2Fpub%2Flinux%2Fkernel+file%3AChangeLog* - if ! { - kernel_is ge 3 16 \ - || { kernel_is 3 15 && kernel_is ge 3 15 5; } \ - || { kernel_is 3 14 && kernel_is ge 3 14 12; } \ - || { kernel_is 3 12 && kernel_is ge 3 12 25; } - }; then - ewarn "" - ewarn "There is a serious Docker-related kernel panic that has been fixed in 3.16+" - ewarn " (and was backported to 3.15.5+, 3.14.12+, and 3.12.25+)" - ewarn "" - ewarn "See also https://github.com/docker/docker/issues/2960" - fi - - if kernel_is le 3 18; then - CONFIG_CHECK+=" - ~RESOURCE_COUNTERS - " - fi - - if kernel_is le 3 13; then - CONFIG_CHECK+=" - ~NETPRIO_CGROUP - " - else - CONFIG_CHECK+=" - ~CGROUP_NET_PRIO - " - fi - - if kernel_is lt 4 5; then - CONFIG_CHECK+=" - ~MEMCG_KMEM - " - ERROR_MEMCG_KMEM="CONFIG_MEMCG_KMEM: is optional" - fi - - if kernel_is lt 4 7; then - CONFIG_CHECK+=" - ~DEVPTS_MULTIPLE_INSTANCES - " - fi - - if use aufs; then - CONFIG_CHECK+=" - ~AUFS_FS - ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY - " - ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set if and only if aufs-sources are used instead of aufs4/aufs3" - fi - - if use btrfs; then - CONFIG_CHECK+=" - ~BTRFS_FS - ~BTRFS_FS_POSIX_ACL - " - fi - - if use device-mapper; then - CONFIG_CHECK+=" - ~BLK_DEV_DM ~DM_THIN_PROVISIONING ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY - " - fi - - if use overlay; then - CONFIG_CHECK+=" - ~OVERLAY_FS ~EXT4_FS_SECURITY ~EXT4_FS_POSIX_ACL - " - fi - - linux-info_pkg_setup - - # create docker group for the code checking for it in /etc/group - enewgroup docker -} - -src_compile() { - export GOPATH="${WORKDIR}/${P}" - - # setup CFLAGS and LDFLAGS for separate build target - # see https://github.com/tianon/docker-overlay/pull/10 - export CGO_CFLAGS="-I${ROOT}/usr/include" - export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)" - - # if we're building from a tarball, we need the GITCOMMIT value - [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT - - # fake golang layout - ln -s docker-ce/components/engine ../docker || die - ln -s docker-ce/components/cli ../cli || die - - # let's set up some optional features :) - export DOCKER_BUILDTAGS='' - for gd in aufs btrfs device-mapper overlay; do - if ! use $gd; then - DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}" - fi - done - - for tag in apparmor pkcs11 seccomp; do - if use $tag; then - DOCKER_BUILDTAGS+=" $tag" - fi - done - - pushd components/engine || die - - if use hardened; then - sed -i "s/EXTLDFLAGS_STATIC='/&-fno-PIC /" hack/make.sh || die - grep -q -- '-fno-PIC' hack/make.sh || die 'hardened sed failed' - sed "s/LDFLAGS_STATIC_DOCKER='/&-extldflags -fno-PIC /" \ - -i hack/make/dynbinary-daemon || die - grep -q -- '-fno-PIC' hack/make/dynbinary-daemon || die 'hardened sed failed' - fi - - # build daemon - VERSION="$(cat ../../VERSION)" \ - ./hack/make.sh dynbinary || die 'dynbinary failed' - - popd || die # components/engine - - pushd components/cli || die - - # build cli - emake \ - LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" \ - VERSION="$(cat ../../VERSION)" \ - GITCOMMIT="${DOCKER_GITCOMMIT}" \ - DISABLE_WARN_OUTSIDE_CONTAINER=1 \ - dynbinary || die - - # build man pages - go build -o gen-manpages github.com/docker/cli/man || die - ./gen-manpages --root . --target ./man/man1 || die - ./man/md2man-all.sh -q || die - rm gen-manpages || die - # see "components/cli/scripts/docs/generate-man.sh" (which also does "go get" for go-md2man) - - popd || die # components/cli -} - -src_install() { - dosym containerd /usr/bin/docker-containerd - dosym containerd-shim /usr/bin/docker-containerd-shim - dosym runc /usr/bin/docker-runc - use container-init && dosym tini /usr/bin/docker-init - - pushd components/engine || die - newbin "$(readlink -f bundles/latest/dynbinary-daemon/dockerd)" dockerd - - newinitd contrib/init/openrc/docker.initd docker - newconfd contrib/init/openrc/docker.confd docker - - systemd_dounit contrib/init/systemd/docker.{service,socket} - - udev_dorules contrib/udev/*.rules - - dodoc AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md - dodoc -r docs/* - - insinto /usr/share/vim/vimfiles - doins -r contrib/syntax/vim/ftdetect - doins -r contrib/syntax/vim/syntax - - # note: intentionally not using "doins" so that we preserve +x bits - dodir /usr/share/${PN}/contrib - cp -R contrib/* "${ED}/usr/share/${PN}/contrib" - popd || die # components/engine - - pushd components/cli || die - - newbin build/docker-* docker - - doman man/man*/* - - dobashcomp contrib/completion/bash/* - insinto /usr/share/zsh/site-functions - doins contrib/completion/zsh/_* - popd || die # components/cli -} - -pkg_postinst() { - udev_reload - - elog - elog "To use Docker, the Docker daemon must be running as root. To automatically" - elog "start the Docker daemon at boot, add Docker to the default runlevel:" - elog " rc-update add docker default" - elog "Similarly for systemd:" - elog " systemctl enable docker.service" - elog - elog "To use Docker as a non-root user, add yourself to the 'docker' group:" - elog " usermod -aG docker youruser" - elog -} diff --git a/app-emulation/edumips64/Manifest b/app-emulation/edumips64/Manifest index 2160b5a66225..a7b978c5dc78 100644 --- a/app-emulation/edumips64/Manifest +++ b/app-emulation/edumips64/Manifest @@ -2,6 +2,6 @@ AUX edumips64-1.2-javadoc-cp.patch 483 BLAKE2B a419aaafa7839115cfdcb911c501b973a AUX edumips64-javadoc-cp.patch 530 BLAKE2B ac98978ce391c3af6486b327d90bc0364d42afa0c72dcdc0681e84ce99974d4f8d94c2c177781f115c28b89a36961989a33d081615e5e9996ec397941c259921 SHA512 5a0d51507542a484cda3c812a536bef7c58f8d7cff68a07d5c6ead2d4c3bc73ea9b20a550404fac3682d129f8b3f95a8819760420170d08dfe7360657181730f DIST edumips64-1.1.tar.bz2 551083 BLAKE2B c76b29d1fbcfe6b03afae11e5c99717db2ef2c3046b66411b0d98ffc3bb119aac147d2283c938ef9947d4737fde141bfd89cee6f46d5db72f75a949a25b74cff SHA512 ca4884bbdb5bb41fe96abca566500af7dc31b330390f352bc6413aacb0561f58b5e95a90e22f58d18065324c155c97bd4d79beb7769efdafc3541cc37145579c DIST edumips64-1.2.tar.bz2 551455 BLAKE2B 614bf851964ea32d6954fb5345f6b07b6292bf90e24dca5d3ea8d86c1b910e1e9ade6ebfece054922ad3506586e9f32c1f6570a7248023e6a867a8b5c09b1203 SHA512 93a5bcae3ab96c35688de7589b9ecb465fe841b007a50e1b04f8194d12a45a4e7134951584f4fbfad5cee51925d1d21b0f425f182999f66fe57a31adbd3f6602 -EBUILD edumips64-1.1.ebuild 1054 BLAKE2B f3c82bfe02198570f099de6b076b79a359c4ed9392cfdeb0d998f0c38a8a7f06bf3eb6f7b8cb86d647a7e41e7b2b2a4394bfe43f43d80a0d4a482e5e92d56d3e SHA512 5da3739053184c550067d7d9ffd13e57c43489c7f92dc30744632a59ca161f9e656aa21874329342d2e747af23ac923a6985ea9ccea5b68e4259e1f25b06892f -EBUILD edumips64-1.2.ebuild 1075 BLAKE2B 437ed52fe62706a28307fb0a835484290e8f3b70eccf51b80bee50fe553f357ce170013503e1d2ec718e8ffc06f0fdf15b4620fae8cb7417fe535c8171ef464f SHA512 53ed766d61b905cb69e7b202492acc675430c0b3d89625e291eed57d3b9813433658a1f5cf8416f9731e38bd121958af0997d60df631ffe39665ede5aa365ef4 +EBUILD edumips64-1.1.ebuild 1055 BLAKE2B 57dfaa0cd8a3a0c929e5f719830181ad0075a2ee496054a194d1a7ae2abdd911dab64c8d1dc318ccb7eb0023b446d87216c974285af0265b58091f943740f73b SHA512 4d6411ac753d68c7887b1f40d3f006ae7fa78831bda5898ef546c21d3331b3830775ad5ce638b4ac9ace901b447d49b509e61bdaf04ceaf6ccd6c515827540db +EBUILD edumips64-1.2.ebuild 1076 BLAKE2B b0fd1593dc9915b86f1424b804ccb292a36b21df434ca8494b424249e46613f49cccacdda0bd480e908a6468df6acc521caa6600bcb37821cf4ecbfb377da356 SHA512 bd3ab8afa73b8a4fb2624669f61ab92c1aa7ac8cec9b0e282fb3ca13e84aa462bf44ef8e6a01aa7624913e681a204f73d705dca5f2e42c4da7e11237f96461b3 MISC metadata.xml 325 BLAKE2B fa644dd786234b486da85e620556900d3ddf69fdaad914f35e888780c2c5a3e17b5ee62fde9919a725e07f9203092741d8e68af7c3418416d182078751ffacce SHA512 e6541353f8d7f6c508bfa2996a938b41c5f98f163f03119c5885e60cf447f1820bc8ab17aa57d45241189e4c1528ec6667048a019042b70df2ecbf95505d2882 diff --git a/app-emulation/edumips64/edumips64-1.1.ebuild b/app-emulation/edumips64/edumips64-1.1.ebuild index 4ce8b841534a..9a2d22592836 100644 --- a/app-emulation/edumips64/edumips64-1.1.ebuild +++ b/app-emulation/edumips64/edumips64-1.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI="5" @@ -8,7 +8,7 @@ JAVA_PKG_IUSE="doc test" inherit eutils java-pkg-2 java-ant-2 DESCRIPTION="A visual and cross-platform MIPS64 CPU Simulator" -HOMEPAGE="http://www.edumips.org" +HOMEPAGE="https://www.edumips.org" SLOT="0" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="GPL-2" diff --git a/app-emulation/edumips64/edumips64-1.2.ebuild b/app-emulation/edumips64/edumips64-1.2.ebuild index d557edb9f82e..518464fb1ce0 100644 --- a/app-emulation/edumips64/edumips64-1.2.ebuild +++ b/app-emulation/edumips64/edumips64-1.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI="5" @@ -8,7 +8,7 @@ JAVA_PKG_IUSE="doc test" inherit eutils java-pkg-2 java-ant-2 DESCRIPTION="A visual and cross-platform MIPS64 CPU Simulator" -HOMEPAGE="http://www.edumips.org" +HOMEPAGE="https://www.edumips.org" SLOT="0" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="GPL-2" diff --git a/app-emulation/fuse/Manifest b/app-emulation/fuse/Manifest index 6ee9c0333acf..616e78d88d7a 100644 --- a/app-emulation/fuse/Manifest +++ b/app-emulation/fuse/Manifest @@ -1,5 +1,5 @@ -DIST fuse-1.5.0.tar.gz 1619748 BLAKE2B 6ffbea1c7a6572f2cdd3d293a438f6e37da2eadf299396358bed2e65db3aa9720333b62b28b4f0064ec5434c99a6a0b790737230f8ec0c01f96e50f594305bd1 SHA512 c13fdef6b23377e7d2b53e7f5b2db01447d12eafc0b9114fd8b83cd5058964a655a720810ab7dc6a6e1a1d9a33ffc787b5e46bf54df1259f4ba0ff78c3189421 DIST fuse-1.5.1.tar.gz 1623081 BLAKE2B 4b6cf747d15bc2d33a0baba88254a08187e8a615564236835da19d32f9afb312d5a5c90ac07a88d904019626b153546ecd8cd09b88fa16731af94ea54cd0e346 SHA512 d5f5b8a0e61f298a955450de208b29f8ab4fc0133c5c58e596f36f3834c088c946e19d7437dd1a6e73a89d32dcaf6ca9ce0fed8ec310c37aa6a6568be482abe4 -EBUILD fuse-1.5.0.ebuild 1507 BLAKE2B fe247d5184e1a7e62824e04e09befd94294a673405cdbc0e0ece8e04f55d8aa52299050ff866ecace56d6f606fc884803a21f6628974c6d4962d69a61414925d SHA512 46c71560082e570e34eeb6d04ff6c2352e2f0cc8a2564879ef7737de7678cd075463524e5b2ba6d136d975a1391ff0ebc07f8f646716330751df560ce56db5f9 +DIST fuse-1.5.2.tar.gz 1626746 BLAKE2B 38236b9457e975fe227e2a19ed0fb80cac022fbb0bd8fcb1e51666103c4abe8960b1bd166fc1d12ab4e0f32954f7c3f59625d57d456313f75ca023bf51477e0b SHA512 45507834eb70d1e74c8f58017f4ae0bb54e2560456eeadfa8b6888a1c79e9c9443cccb7ae9733b96a895f94040be820c57a7d698115c2f483e64ebc4fd734268 EBUILD fuse-1.5.1.ebuild 1651 BLAKE2B df947b65938e55d0216c6ad3cdc2fee0e9e623920db6685009e498ea01c099cf829ffdab62381830bc1986f4a5a0c544be0d73683b33f7a64a8c964afc01c4b4 SHA512 e2c95c56de793c5cad085622bfff258766c7a13b9f80aac908c1384f1ad797486e44f58e3d2269b576421dabd9311f7cf468efd3cbb057d5d531adff9dbbe95e +EBUILD fuse-1.5.2.ebuild 1683 BLAKE2B 33346f57ba010e229850efe44c67a60054c1ec1a5396f68a3a560668da9a955f5b9f9bdf7056f729dc1ce3447d2afc09394a3ff5e78c72c3cd305d848d1e0f6e SHA512 7847feacb66510323681665de612fdb4496c3228ba23c6f357f12e2f790296d6be9f86b4058177e5d469985e2729d7682d5556c43e0f97f72c304025b36946d7 MISC metadata.xml 792 BLAKE2B 6dac563b6c30b8552db0b2c52b12d570a38e8803e75b842ea634eb45a6ef353940773b303f269588a212c2a266d34f0a985dc8190f9a072c3781c75f1bded363 SHA512 cbe2169118bbc0e56208080a7691ae1c626827278b22e4b63c1dccfef4c2f3d808e3e0f6a78481b60fd03db188216ea6cf4d1da81ac27820a8e95ccf10067301 diff --git a/app-emulation/fuse/fuse-1.5.0.ebuild b/app-emulation/fuse/fuse-1.5.0.ebuild deleted file mode 100644 index 36d3680379f3..000000000000 --- a/app-emulation/fuse/fuse-1.5.0.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DESCRIPTION="Free Unix Spectrum Emulator by Philip Kendall" -HOMEPAGE="http://fuse-emulator.sourceforge.net" -SRC_URI="mirror://sourceforge/fuse-emulator/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="alsa ao fbcon gpm gtk joystick memlimit png sdl svga X xml" - -# Only one UI back-end can be enabled at a time -REQUIRED_USE="^^ ( X fbcon gtk sdl svga )" - -RDEPEND=">=app-emulation/libspectrum-1.4.1 - dev-libs/glib:2 - alsa? ( media-libs/alsa-lib ) - ao? ( media-libs/libao ) - gpm? ( sys-libs/gpm ) - gtk? ( x11-libs/gtk+:3 ) - joystick? ( media-libs/libjsw ) - png? ( media-libs/libpng:0= sys-libs/zlib ) - sdl? ( media-libs/libsdl ) - svga? ( media-libs/svgalib ) - X? ( x11-libs/libX11 - x11-libs/libXext ) - xml? ( dev-libs/libxml2:2 )" -DEPEND="${RDEPEND} - fbcon? ( virtual/linux-sources ) - dev-lang/perl - virtual/pkgconfig" - -DOCS=( AUTHORS ChangeLog README THANKS ) - -src_configure() { - local guiflag - - if use gtk; then - guiflag="" - elif use sdl; then - guiflag="--with-sdl" - elif use X; then - guiflag="--without-gtk" - elif use svga; then - guiflag="--with-svgalib" - elif use fbcon; then - guiflag="--with-fb" - fi - - econf \ - --without-win32 \ - ${guiflag} \ - $(use_with alsa) \ - $(use_with ao libao) \ - $(use_with gpm) \ - $(use_with joystick) \ - $(use_enable joystick ui-joystick) \ - $(use_enable memlimit smallmem) \ - $(use_with png) \ - $(use_with xml libxml2) -} diff --git a/app-emulation/fuse/fuse-1.5.2.ebuild b/app-emulation/fuse/fuse-1.5.2.ebuild new file mode 100644 index 000000000000..de133ea69920 --- /dev/null +++ b/app-emulation/fuse/fuse-1.5.2.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Free Unix Spectrum Emulator by Philip Kendall" +HOMEPAGE="http://fuse-emulator.sourceforge.net" +SRC_URI="mirror://sourceforge/fuse-emulator/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="alsa ao backend-fbcon backend-sdl backend-svga backend-X gpm joystick memlimit png xml" + +# Only one UI back-end can be enabled at a time +REQUIRED_USE="?? ( backend-fbcon backend-sdl backend-svga backend-X )" + +RDEPEND=" + >=app-emulation/libspectrum-1.4.1 + dev-libs/glib:2 + alsa? ( media-libs/alsa-lib ) + ao? ( media-libs/libao ) + backend-sdl? ( media-libs/libsdl ) + backend-svga? ( media-libs/svgalib ) + backend-X? ( x11-libs/libX11 x11-libs/libXext ) + !backend-fbcon? ( !backend-sdl? ( !backend-svga? ( !backend-X? ( x11-libs/gtk+:3 ) ) ) ) + gpm? ( sys-libs/gpm ) + joystick? ( media-libs/libjsw ) + png? ( media-libs/libpng:0= sys-libs/zlib ) + xml? ( dev-libs/libxml2:2 )" +DEPEND="${RDEPEND} + backend-fbcon? ( virtual/linux-sources ) + dev-lang/perl + virtual/pkgconfig" + +DOCS=( AUTHORS ChangeLog README THANKS ) + +src_configure() { + local myconf=( + --without-win32 + $(use_with alsa) + $(use_with ao libao) + $(use_with gpm) + $(use_with joystick) + $(use_enable joystick ui-joystick) + $(use_enable memlimit smallmem) + $(use_with png) + $(use_with xml libxml2) + ) + + if use backend-sdl; then + myconf+=("--with-sdl") + elif use backend-X; then + myconf+=("--without-gtk") + elif use backend-svga; then + myconf+=("--with-svgalib") + elif use backend-fbcon; then + myconf+=("--with-fb") + else + myconf+=("--with-gtk") + fi + + econf "${myconf[@]}" +} diff --git a/app-emulation/libguestfs/Manifest b/app-emulation/libguestfs/Manifest index d7f762792d5f..f8d0ca08dd3a 100644 --- a/app-emulation/libguestfs/Manifest +++ b/app-emulation/libguestfs/Manifest @@ -10,6 +10,6 @@ DIST libguestfs-1.28.5.tar.gz 12747537 BLAKE2B b0cc023efef41955c4b448b68bd5578d8 DIST libguestfs-1.36.13.tar.gz 22886310 BLAKE2B b0961cc6b941f1b68bba23af72e8b5478ed33da6f343e453f90decd7454cfc6a94cf67a81ad59c443df744727afa9bd4e98c77411efc4134e3422eaae59ffff5 SHA512 7c9799d5d563ffd8296f70a8402582aba85f3bf3c0dcaa18c44ecff5b7f771a3bc3f297aa85a4056351758298c79752d456a4b46e41924ff9acf196c992d51fb DIST libguestfs-1.36.5.tar.gz 23012703 BLAKE2B 31dcbef2ae1c287c4a353f671e6073cdb4eb2c7173666ff9589ed0e0ce909c2dfa00f2da14b40a0a6a9384dd830082f1f721b0c1dafabe2862391f0f75ff3f3d SHA512 01f10ab902386130f0565f53d0c361b903d6790b572e5562a2180e896952ead2e7661795bd976a7e2442887ea17014a6767db8b6e575de634f32de82ca4124c6 EBUILD libguestfs-1.28.5-r3.ebuild 3754 BLAKE2B ca8d0cdcb60e7ba34805c64c932e2f06cbd72bbdca8e7777744a37cd43a69bb6964db5f72835d7473c505450396a6f2fa544ffc17a856e541561ce95fbc1acce SHA512 098c67112a8ff3c648351c060837154cb4ccb666ddb056a6e54ee4901e3d7e9b78e20bd73cef7fcd6895a248522242456bd721ab9123faf4e09dc3c6cd6631bd -EBUILD libguestfs-1.36.13.ebuild 4147 BLAKE2B e28d2e8f24026cecfaa5d5debc539e844e9f0f943f2a43fde1f8c177dd4331a17e296d5c6ca4c45f5701543bcbf9938bc507a3989d582d9be8bbcd2cc8c83c5e SHA512 cb223b885822b06b808f13c4491f040810ff6a249aa8b0980b39b49acf18efcbb61facffda559e6f53139f52b301812161e83cd18d90408b4b214681c62b3311 +EBUILD libguestfs-1.36.13.ebuild 4146 BLAKE2B 844f1d8bb2fafeb0cc9a010c481d037b8299379893c067c7fa94ef6106171be1025a036300716bb59338423f30948dd73f25b741ef57f247518bd14e94e5fe93 SHA512 5a286426e8f2f4e6e28dc75a80d4c7f3fb57aab8da220d46b294feb0b48978b6779f5546d0998350e8db3a52e9a3645aa601056b1a872fe0e00510dd09056fa4 EBUILD libguestfs-1.36.5.ebuild 3877 BLAKE2B 6f64972ce85db716ae89a73c7f27248c9fcd8427e2eabbeb277a887b27937756463057805287ba955430b37561e034fa40f020ff32539ba77b9b7b9b5a7dd2b0 SHA512 749338dfb6c0dc81ff122085f71fd0861ee6b5b71cbd8591d0392896ee28d59f2f09f3a970dd2f93cc3f520f81767690c8d58bb6ed100de1066a23151b8d33e2 MISC metadata.xml 1002 BLAKE2B 993cf56b6beea1ff609bf9be15d981426357cdaa15c5c6af9a054dbbb241bb2a12e0bb84b7f5f171ba111bd68545254f197c65b5f8956af4facced3bc1d9fc65 SHA512 56525b6489f81fd7555f5953e5ca0ccb468831a433264326f8cf2dee18f8bc5d12a6c479e7fed9c252d17d87efeebac77c0543e4e19207d0e8f720789bd68ce8 diff --git a/app-emulation/libguestfs/libguestfs-1.36.13.ebuild b/app-emulation/libguestfs/libguestfs-1.36.13.ebuild index 16835babf72e..0044509fdf69 100644 --- a/app-emulation/libguestfs/libguestfs-1.36.13.ebuild +++ b/app-emulation/libguestfs/libguestfs-1.36.13.ebuild @@ -140,7 +140,7 @@ src_configure() { --without-java \ $(use_enable perl) \ $(use_enable fuse) \ - $($use_enable ocaml) \ + $(use_enable ocaml) \ $(use_enable ruby) \ --disable-haskell \ --disable-golang \ diff --git a/app-emulation/lxc/Manifest b/app-emulation/lxc/Manifest index 27f70f76d7f6..1182482c056c 100644 --- a/app-emulation/lxc/Manifest +++ b/app-emulation/lxc/Manifest @@ -19,5 +19,5 @@ EBUILD lxc-1.0.11.ebuild 5899 BLAKE2B 015dd027c8ac9e51f7f93a0fe6e82ac66122929179 EBUILD lxc-1.0.8.ebuild 5932 BLAKE2B f8f4843c5da5405e69ebee0b3c5e1d50057d15baa841f4b20edf8acc22cc6f761d1723fe1f9cac93b4129ce10ab5eec0c52c44172dd724f0f2c65d24e293e7e1 SHA512 6af1e114ecc64264eafb85e77fba744e4b8dfdf19c8d2b769959d642df237e29813f71bcf370ea75685cb728592c6b9f9a9637d0b4b00f13d40ee8c110045619 EBUILD lxc-2.0.7.ebuild 6343 BLAKE2B 9b93d611f9ab364779579bbab92b0e11245f2df2bce41e2c0aa87dc3886278eda9d41466c8922cbc587bbb34933341e6afd26ed675df1571504629d2176c1814 SHA512 91312a9209a731026aa53f3d7bb73a0dc8f90f9fc37680cf56439067bd63aa3f35c60d2d320d5fae3d8469ea1a3fcd8e83ee5093ea4252643fd82e776ea5d58f EBUILD lxc-2.0.9.ebuild 6597 BLAKE2B 33bef88cb3a507674824f6dc38a61a633d16a2da037c40d06455a5b5b11cdcfa73e7f7975bf52bab6288017261bc031d0407fdbe4a5ce001d18c59f4bc77bf88 SHA512 def7c5c687e8a91fc3b763747ce7a311fb000c8fc1d9cf8270c2863694e79a7b6e84b578eb441139c9051c93bba90a82821d3cc930b171d53a6c4c7fd9ad514d -EBUILD lxc-2.1.1.ebuild 6749 BLAKE2B 9d0090eecbadcace30a4ff6cf6c287b28d12c4483798f50b31b7d3d5e082ef365840612800850075bb5f1a5bc0cac3d104631b0b2245ff4d54eb3f8c35d9be1d SHA512 09b9ca583bc81bcd7a1962db22de636d4ae452bda70991b071a2458df3970387f3a574a8d101fa9ab396029232b139c73afdf500d03ea842564fd62ab250152f +EBUILD lxc-2.1.1.ebuild 6766 BLAKE2B 229ebab9afd710c885c08794463464c8acbc11eb4fb47a4fc0747ad65d80da71960bbfea46292819fdbfedcf4fcbce8434067a36898e42f0842d191c08c79ddf SHA512 ae74ded64f600cb6034169c7dfbdbbacc98a7cbdd283743a7d4b95087868e286d91aa653795467a3989d7fdf3133052e709f802e48133fbccdccb44cfd31d8b8 MISC metadata.xml 811 BLAKE2B 433a5cbe39002614c88eae4829c998493e95cb0b8eeb0a9f546e08e33a82fe5edb384e9a9f747d1129e0cdb7b8a634bdf4a0b7cf385bc3d243dc83cab06b899c SHA512 fea5f647ca7eb616307378375af86051034e03170f6ce62e2219f78343797072902102515f93cc0f809558fbfbca88eb81e9f8d0fa621ae18381d39a12c31aa2 diff --git a/app-emulation/lxc/lxc-2.1.1.ebuild b/app-emulation/lxc/lxc-2.1.1.ebuild index 304701cf0053..e02adaf47ad3 100644 --- a/app-emulation/lxc/lxc-2.1.1.ebuild +++ b/app-emulation/lxc/lxc-2.1.1.ebuild @@ -146,7 +146,7 @@ src_configure() { } python_compile() { - distutils-r1_python_compile build_ext -I ../ -L ../${PN} + distutils-r1_python_compile build_ext -I.. -L../lxc/.libs --no-pkg-config } src_compile() { diff --git a/app-emulation/lxd/Manifest b/app-emulation/lxd/Manifest index 1b9c968587a5..53b5b1df9cd9 100644 --- a/app-emulation/lxd/Manifest +++ b/app-emulation/lxd/Manifest @@ -1,9 +1,3 @@ -AUX lxd-2.14-dont-go-get.patch 428 BLAKE2B fef476db95d5e3a2730d718b72725e5af86581dc0c25dc8665fdbf6c2914c056224f4f45318eea873f9ecb95ee33b0195f19b1d203fbce3bf8e1b8e7ced13b30 SHA512 eff965ddc918da9bf2bb9293b08a1aad33f1f7a69027767a74f8872a8eb045ef2a002536329c3cbd6730f1710ebb6f5e7e5c284121157e824a1aabef3a0de8b8 -AUX lxd-2.14-fix-fr-po.patch 388 BLAKE2B 21fc34b14f026cfd654b57d87be18dac364132275013a84144f6bfdfc33fc630f9da5a1673596e73260b26b467f34897e34036a5fdd01b21cec0bc83014f79dd SHA512 8fe1ad58315f138bd2afa7d35f8beb039f0241831f31507794d2973abcbcd78cf95663b9efcc1d16a8d319b020db4e8ae942899ac5aaafa6603069aa63f72cf4 -AUX lxd-2.14.confd 589 BLAKE2B a4ee8e9643f7add254baf2f83900e15029577b69460818640220197af8ad56862c9c96b82d6a0c38bbe7023893a787b3eeda80e64359ed44863e9aa4c61cc07a SHA512 14892b2efa96f4938497a7ea0b7b2b7ab630b287c8444b666d24b4aa4fd7af265d2dcb91b4defdfa0b33da610cdc04dc3c8751f00df9209a7933bf30ea9f0790 -AUX lxd-2.14.initd 852 BLAKE2B 3e5c53ffe4e478bb6e170055f637dc4d95c20ab72ef0fbd3281d939fca476ae317adf519f43564563bee9234079948cf8b944a2964d881fff0a2dafd504b4782 SHA512 ee3a83960d52a956a638f741289ad32e98a1687248d1c3d26f035cfdda55bdcdbc4a7d91d8258dc8e93671a89ddd97c6d1f65de5237a03c6a3fb92bb02387b73 -AUX lxd-2.14.service 174 BLAKE2B 8686d57a79fbc3a9ec2e1a3197012599a5d6b81b62188e779cdb9a86f9f413fa485090c79dab8c4aa8891e0e35604b85fb1cdb1da313918b34a974b61699b24a SHA512 6f9d71d5c08c49653f28511bc793d1365604af6bf105789caea27f4685d721fbb283f888e3b7310997b73ff2fc5bb1a47e7500c4678cb3d39124cab723523140 -AUX lxd-2.19-dont-go-get.patch 428 BLAKE2B fef476db95d5e3a2730d718b72725e5af86581dc0c25dc8665fdbf6c2914c056224f4f45318eea873f9ecb95ee33b0195f19b1d203fbce3bf8e1b8e7ced13b30 SHA512 eff965ddc918da9bf2bb9293b08a1aad33f1f7a69027767a74f8872a8eb045ef2a002536329c3cbd6730f1710ebb6f5e7e5c284121157e824a1aabef3a0de8b8 AUX lxd-dont-go-get.patch 428 BLAKE2B fef476db95d5e3a2730d718b72725e5af86581dc0c25dc8665fdbf6c2914c056224f4f45318eea873f9ecb95ee33b0195f19b1d203fbce3bf8e1b8e7ced13b30 SHA512 eff965ddc918da9bf2bb9293b08a1aad33f1f7a69027767a74f8872a8eb045ef2a002536329c3cbd6730f1710ebb6f5e7e5c284121157e824a1aabef3a0de8b8 AUX lxd.confd 589 BLAKE2B a4ee8e9643f7add254baf2f83900e15029577b69460818640220197af8ad56862c9c96b82d6a0c38bbe7023893a787b3eeda80e64359ed44863e9aa4c61cc07a SHA512 14892b2efa96f4938497a7ea0b7b2b7ab630b287c8444b666d24b4aa4fd7af265d2dcb91b4defdfa0b33da610cdc04dc3c8751f00df9209a7933bf30ea9f0790 AUX lxd.initd 853 BLAKE2B 0b48de1a596767db356850adcb5682c5c351e7477b0d49d81aebf857a01e4eb75067087d323ba4b5d6fbf8765a76cf161ad2cfaa0eba480fb86e91fdb95b0e79 SHA512 960aceb2845cc3b454b2f916c73273f4b1ec6f87e5d569c27c8c58e0db153c084e03addbdcc91dc8761fc6f0e306261d87db73f8610fda197e55f9ec6756fd56 diff --git a/app-emulation/lxd/files/lxd-2.14-dont-go-get.patch b/app-emulation/lxd/files/lxd-2.14-dont-go-get.patch deleted file mode 100644 index a6e25e325b95..000000000000 --- a/app-emulation/lxd/files/lxd-2.14-dont-go-get.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- /src/github.com/lxc/lxd/Makefile.orig 2016-07-11 23:34:40.299664675 +0000 -+++ /src/github.com/lxc/lxd/Makefile 2016-07-11 23:37:00.816018727 +0000 -@@ -13,13 +13,11 @@ - - .PHONY: default - default: -- go get -t -v -d ./... - go install -v $(TAGS) $(DEBUG) ./... - @echo "LXD built successfully" - - .PHONY: client - client: -- go get -t -v -d ./... - go install -v $(TAGS) $(DEBUG) ./lxc - @echo "LXD client built successfully" - diff --git a/app-emulation/lxd/files/lxd-2.14-fix-fr-po.patch b/app-emulation/lxd/files/lxd-2.14-fix-fr-po.patch deleted file mode 100644 index 410efd9987e8..000000000000 --- a/app-emulation/lxd/files/lxd-2.14-fix-fr-po.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /src/github.com/lxc/lxd/po/fr.po -+++ /src/github.com/lxc/lxd/po/fr.po -@@ -1110,7 +1110,7 @@ msgstr "" - "Toutes les fonctionnalités de LXD peuvent être utilisées à l'aide des " - "commandes ci-dessous.\n" - "Pour de l'aide avec l'une des commandes, simplement les utiliser avec --" --"help.\n" -+"help." - - #: lxc/action.go:45 - msgid "Time to wait for the container before killing it" diff --git a/app-emulation/lxd/files/lxd-2.14.confd b/app-emulation/lxd/files/lxd-2.14.confd deleted file mode 100644 index 3d553276a5e3..000000000000 --- a/app-emulation/lxd/files/lxd-2.14.confd +++ /dev/null @@ -1,27 +0,0 @@ -# Group which owns the shared socket -LXD_OPTIONS+=" --group lxd" - - - -# Enable cpu profiling into the specified file -#LXD_OPTIONS+=" --cpuprofile /tmp/lxc_cpu_profile" - -# Enable memory profiling into the specified file -#LXD_OPTIONS+=" --memprofile /tmp/lxc_mem_profile" - - - -# Enables debug mode -#LXD_OPTIONS+=" --debug" - -# For debugging, print a complete stack trace every n seconds -#LXD_OPTIONS+=" --print-goroutines-every 5" - -# Enables verbose mode -#LXD_OPTIONS+=" -v" - -# Logfile to log to -#LXD_OPTIONS+=" --logfile /var/log/lxd/lxd.log" - -# Enables syslog logging -#LXD_OPTIONS+=" --syslog" diff --git a/app-emulation/lxd/files/lxd-2.14.initd b/app-emulation/lxd/files/lxd-2.14.initd deleted file mode 100644 index 51c8e7e06553..000000000000 --- a/app-emulation/lxd/files/lxd-2.14.initd +++ /dev/null @@ -1,46 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -DAEMON=/usr/sbin/lxd -PIDFILE=/run/lxd.pid - -extra_commands="stopall" - -depend() { - need net - use lxcfs -} - -start() { - ebegin "Starting lxd server" - - start-stop-daemon --start \ - --pidfile ${PIDFILE} \ - --exec ${DAEMON} \ - --background \ - --make-pidfile \ - -- \ - ${LXD_OPTIONS} - - eend $? -} - -stop() { - if [ "$RC_GOINGDOWN" = "YES" ] || [ "$RC_REBOOT" = "YES" ]; then - stopall - else - ebegin "Stopping lxd service (but not containers)" - start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE} - eend $? - fi -} - -stopall() { - ebegin "Stopping lxd service and containers" - if "${DAEMON}" shutdown; then - /etc/init.d/lxd zap - rm -f ${PIDFILE} - fi - eend $? -} diff --git a/app-emulation/lxd/files/lxd-2.14.service b/app-emulation/lxd/files/lxd-2.14.service deleted file mode 100644 index d00635fbcdd9..000000000000 --- a/app-emulation/lxd/files/lxd-2.14.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Container hypervisor based on LXC - -[Service] -ExecStart=/usr/sbin/lxd --group lxd -KillMode=process -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/app-emulation/lxd/files/lxd-2.19-dont-go-get.patch b/app-emulation/lxd/files/lxd-2.19-dont-go-get.patch deleted file mode 100644 index a6e25e325b95..000000000000 --- a/app-emulation/lxd/files/lxd-2.19-dont-go-get.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- /src/github.com/lxc/lxd/Makefile.orig 2016-07-11 23:34:40.299664675 +0000 -+++ /src/github.com/lxc/lxd/Makefile 2016-07-11 23:37:00.816018727 +0000 -@@ -13,13 +13,11 @@ - - .PHONY: default - default: -- go get -t -v -d ./... - go install -v $(TAGS) $(DEBUG) ./... - @echo "LXD built successfully" - - .PHONY: client - client: -- go get -t -v -d ./... - go install -v $(TAGS) $(DEBUG) ./lxc - @echo "LXD client built successfully" - diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest index 77e069e685c8..5bf143985cc0 100644 --- a/app-emulation/qemu/Manifest +++ b/app-emulation/qemu/Manifest @@ -6,12 +6,10 @@ AUX qemu-2.5.0-cflags.patch 410 BLAKE2B 1d072b5dd00369bb565b30c2aa7047de92b441bf AUX qemu-2.5.0-sysmacros.patch 333 BLAKE2B 8c38410c6ea789f669d89c7321cdc9e5c734bb3db332272657302977241f157b04fb07e27bda4f67ee560e39a7494344ad79616835e6ff483927f2b72ed9c597 SHA512 329632c5bff846ca3ffcdb4bc94ae62f17c6bdbb566f9bec0784357c943523e8ca7773790b83a9617734cab3b003baa3d636cbd08f7385810a63b0fa0383c4f0 AUX qemu-binfmt.initd.head 1445 BLAKE2B 5762a38034331a13e308f6fc8cb979e38ae01a053691726edfc1d99e1bca1698919ad564a593e018308f1fd00e2f887865fd9db157d8de83941295bc47c1db6c SHA512 a735268ae9ac84d8f2f2893bf018ee6de33231fa94a823bd8502b529bb456635c1ab5cf9b440df5ede8e414291f8bf45fc53898c2f3939c50d5ec4ffa554396a AUX qemu-binfmt.initd.tail 245 BLAKE2B dd59f2944c6e3f0c4d282b94b687a9b5c51dd77c5103fb9889bd9ce56874495397676ae6c8375d9e9e23094828477240778d9e0f361e68cdd63fdad574851561 SHA512 bcca16805f8380d52cc591ea3d65a8f6e5de456730618f6aee301510edb75d235a22d4d7aeed224882210392840adb403eb53234b6cb76a4cb24533852a8b737 -DIST qemu-2.11.0-patches-r0.tar.xz 16140 BLAKE2B 2e23908075195a7c28df574525a159e171277a2da6d7c0656a341a2db6a622237106d2dd8de5c9d61b5fb62fa5a163e9657406a2996cebc05baa53d42c5f5d15 SHA512 f7d92c2232398565b8cde294d38dc281c13503fb5967cc7871a2233b7fa354799619445e9ec89c285ef051f62ecef0bd38a135b0093bf5528c0b28c6e580c839 -DIST qemu-2.11.0.tar.bz2 32816398 BLAKE2B 2014a8246f3cba9069186629d9ec8c221672fcfd3e8cd28a7e57f467add81f7bd84363183ef5cc5d18af91bde9186a4da49c0133c8ead83eae4626b9fc364e99 SHA512 3681700833573c0aa6283af950bfa298970056f1b44489088d8863840a7694512138321f86961ef43b256abf15eddd2612fb9cdbe3d9a358542d4e7037cc2004 DIST qemu-2.11.1-patches-r1.tar.xz 2064 BLAKE2B 533c916b01c014bcfa6c733b76aa6da1f12cdf5f0d4ae33136453705a8aca9fdfeef998747cfdc72d19e08fa40ea97e2fd4c21412c030af314605059282f49ef SHA512 12de7b4777ec98871d0786291534f61b37534feef64b556caeab72e020ff14d61fe19d24cb151ebfdb912df2a7ba72c0d882566b368d88d02c9f1354c2adae4a +DIST qemu-2.11.1-patches-r2.tar.xz 3652 BLAKE2B 4c3bf7503a838c2a978bcc973ee7d8909d662980aa2ccb71f3bff69a7aa79cc2ed405ed4648914808c64a538c0ceeef2904380cae38ee6c94176a11c9ebdbed3 SHA512 35d3aaeffe7655e739cd6d7c420692fcc6d2d76e49a8fd288f09bec81146075485675d1f912a7fc531ac8497977bcd259e97c260b61a7e854c378f6b9b2d4a79 DIST qemu-2.11.1.tar.bz2 32819412 BLAKE2B 6b6d4e7b8dcf33aeedb0b33bad267da07ad17c2eeeb5fbd2c038d760bc03224e55ba0f03eb248c62bc0e8636c2c660ea76b367eaea96bee16388053f82c8b8a9 SHA512 1b692bbdfc3dc785738c7192aa2a3f9cf53d9f5bf3b3f49fa8692050dc50f7056c8a4d1b527d48ffb2a674a0fd3a46d87addd1eaaa758f35eec1ab5adfe32354 -EBUILD qemu-2.11.0.ebuild 23630 BLAKE2B 0a6a289e37840774e92c506ad332d39213dc692ea5cfab4b3f54c45e159e0c3eb07f4831b27a808aefa1184697810336985cc79039773d40e1a50fd6780e6013 SHA512 74cb6375469740801198daa99606f26cf570a2298c8cd78eff362105474128d082d59aaefef627abb16484feee901f53c3b37b958d8c32843437dadb1655cb0e -EBUILD qemu-2.11.1-r1.ebuild 23630 BLAKE2B f081ef952d4ca075474d62bd60ac9a0ecfe82c6f8032d64386cfef8d23bc891c00369d8a6646eed9fcea69f696c388236970b96b793be9123541a8f50b3ad19f SHA512 21c831ece5422d66074874e3e0c19bb449631f402f9718c402862550c84e723edcf52b8688b3447cc996ee613877dca9d41011f25e58ae77154373fe9962903a -EBUILD qemu-2.11.1-r52.ebuild 23723 BLAKE2B 30b62d91f4e6e2a09822ebcb404b809c0ffaea8bf84c5cacb8c5c63b34875886542622466602e23497e46a4af7477b490599fb945911854742bd8480b2a36498 SHA512 7c439a895d64cd64f5ea892978a8283dea90b767cb303ec51bd2c301a99652d3485f679d7153c2f5cf630a408025c11e3f5de830ba64f77245db40a3efe4c300 -EBUILD qemu-9999.ebuild 23576 BLAKE2B 851d4d1ea9b7a92339ca280f9f9806ef7839cf13cba9a97c5d78a5641668725e37212af380d20c23b5bef1d3cd6c06d77889c0c5a662595543edafa4811e273b SHA512 44d44335d6fb4c60d389072ac7779602f7b94caff6871456f4ff2b0b0219de3d552f4d36f183325e882feb5f8c7ae2f213da4c815bd075be719d8ed1116e7e20 +EBUILD qemu-2.11.1-r2.ebuild 23622 BLAKE2B cd2249a4ae34c67ccadfce510e9def671a147d0eb921db68b02d0a5d13ff45548cdbfcca1dd086be1436bed77ddec3c9215139ed361c485fbd5e87de7177177d SHA512 af5677ff0fd37b77305b41f963767cceff6d4dd5074eefc2239447607e64587464f3fb989c3cee7110c65c1aecabd29b47ab48bfee25705007a9edffac533af5 +EBUILD qemu-2.11.1-r53.ebuild 23715 BLAKE2B 6961fcb404b94bd7ade1223ef10b9347f87b927079798de996b80f5bdb344ce5cfdce67699c5a0f37241612636049f6bcdfd2a14f51cdf64d6ab382e51f5a706 SHA512 2bfdbe8ff483476e40a0f6a0d7069304bdd0f8150d77865647fa312eefaafa273e6aa9749d1dd3a1d62c038acdeb5089eccfddf07d0246404154447e956768ab +EBUILD qemu-9999.ebuild 23566 BLAKE2B 54612e651b7b71a07d4b918ce9d7f0cc5fe3583eda3e36bee4ee01c6a8a7b3df95188ba551f09c14a70396bd138335097d14f614979932431d16887b2552b96f SHA512 6273eb8b09a6305306b00f532c4205a2c9511573ea5537855e7f55ee746b377b9abc4c39fbfa6c726f5247d0d2ea875ee927e7b04622dcf7a15c15f5819be743 MISC metadata.xml 3886 BLAKE2B cdb2e81e36f77af3faba1142d5d58360d2cf9e7bd832bff49a7c0968066093c42e0d032d85a6a2aacbe6b1daa56d2ea42d918a2d75cf8a3a202dd8d0ce71239e SHA512 f1c489986c357f17b36686705d58378550684a43660522298f73283e2caffd2f68239b30d43999f04b7e71092c79d58169583d95f77a9fd5160080dd91f8bee5 diff --git a/app-emulation/qemu/qemu-2.11.0.ebuild b/app-emulation/qemu/qemu-2.11.0.ebuild deleted file mode 100644 index 237bb73e4b39..000000000000 --- a/app-emulation/qemu/qemu-2.11.0.ebuild +++ /dev/null @@ -1,805 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python2_7 ) -PYTHON_REQ_USE="ncurses,readline" - -PLOCALES="bg de_DE fr_FR hu it tr zh_CN" - -FIRMWARE_ABI_VERSION="2.9.0-r52" - -inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \ - user udev fcaps readme.gentoo-r1 pax-utils l10n - -if [[ ${PV} = *9999* ]]; then - EGIT_REPO_URI="git://git.qemu.org/qemu.git" - inherit git-r3 - SRC_URI="" -else - SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2" - KEYWORDS="amd64 ~arm64 ~ppc ~ppc64 x86 ~x86-fbsd" - - # Gentoo specific patchsets: - SRC_URI+=" https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r0.tar.xz" -fi - -DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" -HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org" - -LICENSE="GPL-2 LGPL-2 BSD-2" -SLOT="0" -IUSE="accessibility +aio alsa bluetooth bzip2 +caps +curl debug +fdt - glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux - kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png - pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy - spice ssh static static-user systemtap tci test usb usbredir vde - +vhost-net virgl virtfs +vnc vte xattr xen xfs" - -COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel - mips mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc - sparc64 x86_64" -IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} - lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb" -IUSE_USER_TARGETS="${COMMON_TARGETS} - armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx" - -use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) -use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) -IUSE+=" ${use_softmmu_targets} ${use_user_targets}" - -# Allow no targets to be built so that people can get a tools-only build. -# Block USE flag configurations known to not work. -REQUIRED_USE="${PYTHON_REQUIRED_USE} - gtk2? ( gtk ) - qemu_softmmu_targets_arm? ( fdt ) - qemu_softmmu_targets_microblaze? ( fdt ) - qemu_softmmu_targets_mips64el? ( fdt ) - qemu_softmmu_targets_ppc? ( fdt ) - qemu_softmmu_targets_ppc64? ( fdt ) - sdl2? ( sdl ) - static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio ) - virtfs? ( xattr ) - vte? ( gtk )" - -# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) -# and user/softmmu targets (qemu-*, qemu-system-*). -# -# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. -# -# The attr lib isn't always linked in (although the USE flag is always -# respected). This is because qemu supports using the C library's API -# when available rather than always using the extranl library. -ALL_DEPEND=" - >=dev-libs/glib-2.0[static-libs(+)] - sys-libs/zlib[static-libs(+)] - python? ( ${PYTHON_DEPS} ) - systemtap? ( dev-util/systemtap ) - xattr? ( sys-apps/attr[static-libs(+)] )" - -# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) -# softmmu targets (qemu-system-*). -SOFTMMU_TOOLS_DEPEND=" - >=x11-libs/pixman-0.28.0[static-libs(+)] - accessibility? ( - app-accessibility/brltty[api] - app-accessibility/brltty[static-libs(+)] - ) - aio? ( dev-libs/libaio[static-libs(+)] ) - alsa? ( >=media-libs/alsa-lib-1.0.13 ) - bluetooth? ( net-wireless/bluez ) - bzip2? ( app-arch/bzip2[static-libs(+)] ) - caps? ( sys-libs/libcap-ng[static-libs(+)] ) - curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) - fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] ) - glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) - gnutls? ( - dev-libs/nettle:=[static-libs(+)] - >=net-libs/gnutls-3.0:=[static-libs(+)] - ) - gtk? ( - gtk2? ( - x11-libs/gtk+:2 - vte? ( x11-libs/vte:0 ) - ) - !gtk2? ( - x11-libs/gtk+:3 - vte? ( x11-libs/vte:2.91 ) - ) - ) - infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] ) - iscsi? ( net-libs/libiscsi ) - jpeg? ( virtual/jpeg:0=[static-libs(+)] ) - lzo? ( dev-libs/lzo:2[static-libs(+)] ) - ncurses? ( - sys-libs/ncurses:0=[unicode] - sys-libs/ncurses:0=[static-libs(+)] - ) - nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) - numa? ( sys-process/numactl[static-libs(+)] ) - opengl? ( - virtual/opengl - media-libs/libepoxy[static-libs(+)] - media-libs/mesa[static-libs(+)] - media-libs/mesa[egl,gbm] - ) - png? ( media-libs/libpng:0=[static-libs(+)] ) - pulseaudio? ( media-sound/pulseaudio ) - rbd? ( sys-cluster/ceph[static-libs(+)] ) - sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) - sdl? ( - !sdl2? ( - media-libs/libsdl[X] - >=media-libs/libsdl-1.2.11[static-libs(+)] - ) - sdl2? ( - media-libs/libsdl2[X] - media-libs/libsdl2[static-libs(+)] - ) - ) - seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) - smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) - snappy? ( app-arch/snappy:=[static-libs(+)] ) - spice? ( - >=app-emulation/spice-protocol-0.12.3 - >=app-emulation/spice-0.12.0[static-libs(+)] - ) - ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] ) - usb? ( >=virtual/libusb-1-r2[static-libs(+)] ) - usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) - vde? ( net-misc/vde[static-libs(+)] ) - virgl? ( media-libs/virglrenderer[static-libs(+)] ) - virtfs? ( sys-libs/libcap ) - xen? ( app-emulation/xen-tools:= ) - xfs? ( sys-fs/xfsprogs[static-libs(+)] )" - -X86_FIRMWARE_DEPEND=" - pin-upstream-blobs? ( - ~sys-firmware/edk2-ovmf-2017_pre20170505[binary] - ~sys-firmware/ipxe-1.0.0_p20160620 - ~sys-firmware/seabios-1.10.2[binary,seavgabios] - ~sys-firmware/sgabios-0.1_pre8 - ) - !pin-upstream-blobs? ( - sys-firmware/edk2-ovmf - sys-firmware/ipxe - >=sys-firmware/seabios-1.10.2[seavgabios] - sys-firmware/sgabios - )" -PPC64_FIRMWARE_DEPEND=" - pin-upstream-blobs? ( - ~sys-firmware/seabios-1.10.2[binary,seavgabios] - ) - !pin-upstream-blobs? ( - >=sys-firmware/seabios-1.10.2[seavgabios] - ) -" - -CDEPEND=" - !static? ( - ${ALL_DEPEND//\[static-libs(+)]} - ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} - ) - qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) - qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) - qemu_softmmu_targets_ppc64? ( ${PPC64_FIRMWARE_DEPEND} ) -" -DEPEND="${CDEPEND} - dev-lang/perl - =dev-lang/python-2* - sys-apps/texinfo - virtual/pkgconfig - kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) - gtk? ( nls? ( sys-devel/gettext ) ) - static? ( - ${ALL_DEPEND} - ${SOFTMMU_TOOLS_DEPEND} - ) - static-user? ( ${ALL_DEPEND} ) - test? ( - dev-libs/glib[utils] - sys-devel/bc - )" -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-qemu )" - -PATCHES=( - "${FILESDIR}"/${PN}-2.5.0-cflags.patch - "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch - "${FILESDIR}"/${PN}-2.11.0-glibc-2.27.patch - "${WORKDIR}"/patches -) - -STRIP_MASK="/usr/share/qemu/palcode-clipper" - -QA_PREBUILT=" - usr/share/qemu/openbios-ppc - usr/share/qemu/openbios-sparc64 - usr/share/qemu/openbios-sparc32 - usr/share/qemu/palcode-clipper - usr/share/qemu/s390-ccw.img - usr/share/qemu/s390-netboot.img - usr/share/qemu/u-boot.e500" - -QA_WX_LOAD="usr/bin/qemu-i386 - usr/bin/qemu-x86_64 - usr/bin/qemu-alpha - usr/bin/qemu-arm - usr/bin/qemu-cris - usr/bin/qemu-m68k - usr/bin/qemu-microblaze - usr/bin/qemu-microblazeel - usr/bin/qemu-mips - usr/bin/qemu-mipsel - usr/bin/qemu-or1k - usr/bin/qemu-ppc - usr/bin/qemu-ppc64 - usr/bin/qemu-ppc64abi32 - usr/bin/qemu-sh4 - usr/bin/qemu-sh4eb - usr/bin/qemu-sparc - usr/bin/qemu-sparc64 - usr/bin/qemu-armeb - usr/bin/qemu-sparc32plus - usr/bin/qemu-s390x - usr/bin/qemu-unicore32" - -DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the -kernel module loaded before running kvm. The easiest way to ensure that the -kernel module is loaded is to load it on boot. - For AMD CPUs the module is called 'kvm-amd'. - For Intel CPUs the module is called 'kvm-intel'. -Please review /etc/conf.d/modules for how to load these. - -Make sure your user is in the 'kvm' group. Just run - $ gpasswd -a kvm -then have re-login. - -For brand new installs, the default permissions on /dev/kvm might not let -you access it. You can tell udev to reset ownership/perms: - $ udevadm trigger -c add /dev/kvm - -If you want to register binfmt handlers for qemu user targets: -For openrc: - # rc-update add qemu-binfmt -For systemd: - # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" - -pkg_pretend() { - if use kernel_linux && kernel_is lt 2 6 25; then - eerror "This version of KVM requres a host kernel of 2.6.25 or higher." - elif use kernel_linux; then - if ! linux_config_exists; then - eerror "Unable to check your kernel for KVM support" - else - CONFIG_CHECK="~KVM ~TUN ~BRIDGE" - ERROR_KVM="You must enable KVM in your kernel to continue" - ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" - ERROR_KVM_AMD+=" your kernel configuration." - ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" - ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." - ERROR_TUN="You will need the Universal TUN/TAP driver compiled" - ERROR_TUN+=" into your kernel or loaded as a module to use the" - ERROR_TUN+=" virtual network device if using -net tap." - ERROR_BRIDGE="You will also need support for 802.1d" - ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." - use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" - ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" - ERROR_VHOST_NET+=" support" - - if use amd64 || use x86 || use amd64-linux || use x86-linux; then - if grep -q AuthenticAMD /proc/cpuinfo; then - CONFIG_CHECK+=" ~KVM_AMD" - elif grep -q GenuineIntel /proc/cpuinfo; then - CONFIG_CHECK+=" ~KVM_INTEL" - fi - fi - - use python && CONFIG_CHECK+=" ~DEBUG_FS" - ERROR_DEBUG_FS="debugFS support required for kvm_stat" - - # Now do the actual checks setup above - check_extra_config - fi - fi - - if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then - eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" - eerror "instances are still pointing to it. Please update your" - eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" - eerror "and the right system binary (e.g. qemu-system-x86_64)." - die "update your virt configs to not use qemu-kvm" - fi -} - -pkg_setup() { - enewgroup kvm 78 -} - -# Sanity check to make sure target lists are kept up-to-date. -check_targets() { - local var=$1 mak=$2 - local detected sorted - - pushd "${S}"/default-configs >/dev/null || die - - # Force C locale until glibc is updated. #564936 - detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) - sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) - if [[ ${sorted} != "${detected}" ]] ; then - eerror "The ebuild needs to be kept in sync." - eerror "${var}: ${sorted}" - eerror "$(printf '%-*s' ${#var} configure): ${detected}" - die "sync ${var} to the list of targets" - fi - - popd >/dev/null -} - -handle_locales() { - # Make sure locale list is kept up-to-date. - local detected sorted - detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u)) - sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u)) - if [[ ${sorted} != "${detected}" ]] ; then - eerror "The ebuild needs to be kept in sync." - eerror "PLOCALES: ${sorted}" - eerror " po/*.po: ${detected}" - die "sync PLOCALES" - fi - - # Deal with selective install of locales. - if use nls ; then - # Delete locales the user does not want. #577814 - rm_loc() { rm po/$1.po || die; } - l10n_for_each_disabled_locale_do rm_loc - else - # Cheap hack to disable gettext .mo generation. - rm -f po/*.po - fi -} - -src_prepare() { - check_targets IUSE_SOFTMMU_TARGETS softmmu - check_targets IUSE_USER_TARGETS linux-user - - # Alter target makefiles to accept CFLAGS set via flag-o - sed -i -r \ - -e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \ - Makefile Makefile.target || die - - default - - # Fix ld and objcopy being called directly - tc-export AR LD OBJCOPY - - # Verbose builds - MAKEOPTS+=" V=1" - - # Run after we've applied all patches. - handle_locales - - # Remove bundled copy of libfdt - rm -r dtc || die -} - -## -# configures qemu based on the build directory and the build type -# we are using. -# -qemu_src_configure() { - debug-print-function ${FUNCNAME} "$@" - - local buildtype=$1 - local builddir="${S}/${buildtype}-build" - - mkdir "${builddir}" - - local conf_opts=( - --prefix=/usr - --sysconfdir=/etc - --libdir=/usr/$(get_libdir) - --docdir=/usr/share/doc/${PF}/html - --disable-bsd-user - --disable-guest-agent - --disable-strip - --disable-werror - # We support gnutls/nettle for crypto operations. It is possible - # to use gcrypt when gnutls/nettle are disabled (but not when they - # are enabled), but it's not really worth the hassle. Disable it - # all the time to avoid automatically detecting it. #568856 - --disable-gcrypt - --python="${PYTHON}" - --cc="$(tc-getCC)" - --cxx="$(tc-getCXX)" - --host-cc="$(tc-getBUILD_CC)" - $(use_enable debug debug-info) - $(use_enable debug debug-tcg) - --enable-docs - $(use_enable tci tcg-interpreter) - $(use_enable xattr attr) - ) - - # Disable options not used by user targets. This simplifies building - # static user targets (USE=static-user) considerably. - conf_notuser() { - if [[ ${buildtype} == "user" ]] ; then - echo "--disable-${2:-$1}" - else - use_enable "$@" - fi - } - conf_opts+=( - $(conf_notuser accessibility brlapi) - $(conf_notuser aio linux-aio) - $(conf_notuser bzip2) - $(conf_notuser bluetooth bluez) - $(conf_notuser caps cap-ng) - $(conf_notuser curl) - $(conf_notuser fdt) - $(conf_notuser glusterfs) - $(conf_notuser gnutls) - $(conf_notuser gnutls nettle) - $(conf_notuser gtk) - $(conf_notuser infiniband rdma) - $(conf_notuser iscsi libiscsi) - $(conf_notuser jpeg vnc-jpeg) - $(conf_notuser kernel_linux kvm) - $(conf_notuser lzo) - $(conf_notuser ncurses curses) - $(conf_notuser nfs libnfs) - $(conf_notuser numa) - $(conf_notuser opengl) - $(conf_notuser png vnc-png) - $(conf_notuser rbd) - $(conf_notuser sasl vnc-sasl) - $(conf_notuser sdl) - $(conf_notuser seccomp) - $(conf_notuser smartcard) - $(conf_notuser snappy) - $(conf_notuser spice) - $(conf_notuser ssh libssh2) - $(conf_notuser usb libusb) - $(conf_notuser usbredir usb-redir) - $(conf_notuser vde) - $(conf_notuser vhost-net) - $(conf_notuser virgl virglrenderer) - $(conf_notuser virtfs) - $(conf_notuser vnc) - $(conf_notuser vte) - $(conf_notuser xen) - $(conf_notuser xen xen-pci-passthrough) - $(conf_notuser xfs xfsctl) - ) - - if [[ ! ${buildtype} == "user" ]] ; then - # audio options - local audio_opts="oss" - use alsa && audio_opts="alsa,${audio_opts}" - use sdl && audio_opts="sdl,${audio_opts}" - use pulseaudio && audio_opts="pa,${audio_opts}" - conf_opts+=( - --audio-drv-list="${audio_opts}" - ) - use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) ) - use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) ) - fi - - case ${buildtype} in - user) - conf_opts+=( - --enable-linux-user - --disable-system - --disable-blobs - --disable-tools - ) - local static_flag="static-user" - ;; - softmmu) - conf_opts+=( - --disable-linux-user - --enable-system - --disable-tools - ) - local static_flag="static" - ;; - tools) - conf_opts+=( - --disable-linux-user - --disable-system - --disable-blobs - --enable-tools - ) - local static_flag="static" - ;; - esac - - local targets="${buildtype}_targets" - [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) - - # Add support for SystemTAP - use systemtap && conf_opts+=( --enable-trace-backend=dtrace ) - - # We always want to attempt to build with PIE support as it results - # in a more secure binary. But it doesn't work with static or if - # the current GCC doesn't have PIE support. - if use ${static_flag}; then - conf_opts+=( --static --disable-pie ) - else - tc-enables-pie && conf_opts+=( --enable-pie ) - fi - - #bug #647570 - conf_opts+=( --disable-capstone ) - - echo "../configure ${conf_opts[*]}" - cd "${builddir}" - ../configure "${conf_opts[@]}" || die "configure failed" - - # FreeBSD's kernel does not support QEMU assigning/grabbing - # host USB devices yet - use kernel_FreeBSD && \ - sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak -} - -src_configure() { - local target - - python_setup - - softmmu_targets= softmmu_bins=() - user_targets= user_bins=() - - for target in ${IUSE_SOFTMMU_TARGETS} ; do - if use "qemu_softmmu_targets_${target}"; then - softmmu_targets+=",${target}-softmmu" - softmmu_bins+=( "qemu-system-${target}" ) - fi - done - - for target in ${IUSE_USER_TARGETS} ; do - if use "qemu_user_targets_${target}"; then - user_targets+=",${target}-linux-user" - user_bins+=( "qemu-${target}" ) - fi - done - - softmmu_targets=${softmmu_targets#,} - user_targets=${user_targets#,} - - [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" - [[ -n ${user_targets} ]] && qemu_src_configure "user" - qemu_src_configure "tools" -} - -src_compile() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - default - fi - - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - default - fi - - cd "${S}/tools-build" - default -} - -src_test() { - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - pax-mark m */qemu-system-* #515550 - emake -j1 check - emake -j1 check-report.html - fi -} - -qemu_python_install() { - python_domodule "${S}/scripts/qmp/qmp.py" - - python_doscript "${S}/scripts/kvm/vmxcap" - python_doscript "${S}/scripts/qmp/qmp-shell" - python_doscript "${S}/scripts/qmp/qemu-ga-client" -} - -# Generate binfmt support files. -# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) -# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) -generate_initd() { - local out="${T}/qemu-binfmt" - local out_systemd="${T}/qemu.conf" - local d="${T}/binfmt.d" - - einfo "Generating qemu binfmt scripts and configuration files" - - # Generate the debian fragments first. - mkdir -p "${d}" - "${S}"/scripts/qemu-binfmt-conf.sh \ - --debian \ - --exportdir "${d}" \ - --qemu-path "${EPREFIX}/usr/bin" \ - || die - # Then turn the fragments into a shell script we can source. - sed -E -i \ - -e 's:^([^ ]+) (.*)$:\1="\2":' \ - "${d}"/* || die - - # Generate the init.d script by assembling the fragments from above. - local f qcpu package interpreter magic mask - cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die - for f in "${d}"/qemu-* ; do - source "${f}" - - # Normalize the cpu logic like we do in the init.d for the native cpu. - qcpu=${package#qemu-} - case ${qcpu} in - arm*) qcpu="arm";; - mips*) qcpu="mips";; - ppc*) qcpu="ppc";; - s390*) qcpu="s390";; - sh*) qcpu="sh";; - sparc*) qcpu="sparc";; - esac - - cat <>"${out}" - if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then - echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register - fi -EOF - - echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" - - done - cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die -} - -src_install() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - emake DESTDIR="${ED}" install - - # Install binfmt handler init script for user targets. - generate_initd - doinitd "${T}/qemu-binfmt" - - # Install binfmt/qemu.conf. - insinto "/usr/share/qemu/binfmt.d" - doins "${T}/qemu.conf" - fi - - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - emake DESTDIR="${ED}" install - - # This might not exist if the test failed. #512010 - [[ -e check-report.html ]] && dohtml check-report.html - - if use kernel_linux; then - udev_newrules "${FILESDIR}"/65-kvm.rules-r1 65-kvm.rules - fi - - if use python; then - python_foreach_impl qemu_python_install - fi - fi - - cd "${S}/tools-build" - emake DESTDIR="${ED}" install - - # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 - pushd "${ED}"/usr/bin >/dev/null - pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 - popd >/dev/null - - # Install config file example for qemu-bridge-helper - insinto "/etc/qemu" - doins "${FILESDIR}/bridge.conf" - - cd "${S}" - dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt - newdoc pc-bios/README README.pc-bios - - if [[ -n ${softmmu_targets} ]]; then - # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - rm "${ED}/usr/share/qemu/bios-256k.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin - dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin - fi - - # Remove vgabios since we're using the seavgabios packaged one - rm "${ED}/usr/share/qemu/vgabios.bin" - rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" - rm "${ED}/usr/share/qemu/vgabios-qxl.bin" - rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" - rm "${ED}/usr/share/qemu/vgabios-virtio.bin" - rm "${ED}/usr/share/qemu/vgabios-vmware.bin" - # PPC64 loads vgabios-stdvga - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc64; then - dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin - dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin - dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin - dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin - dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin - dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin - fi - - # Remove sgabios since we're using the sgabios packaged one - rm "${ED}/usr/share/qemu/sgabios.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin - fi - - # Remove iPXE since we're using the iPXE packaged one - rm "${ED}"/usr/share/qemu/pxe-*.rom - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom - dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom - dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom - dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom - dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom - dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom - fi - fi - - DISABLE_AUTOFORMATTING=true - readme.gentoo_create_doc -} - -firmware_abi_change() { - local pv - for pv in ${REPLACING_VERSIONS}; do - if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then - return 0 - fi - done - return 1 -} - -pkg_postinst() { - if [[ -n ${softmmu_targets} ]] && use kernel_linux; then - udev_reload - fi - - fcaps cap_net_admin /usr/libexec/qemu-bridge-helper - - DISABLE_AUTOFORMATTING=true - readme.gentoo_print_elog - - if use pin-upstream-blobs && firmware_abi_change; then - ewarn "This version of qemu pins new versions of firmware blobs:" - ewarn " $(best_version sys-firmware/edk2-ovmf)" - ewarn " $(best_version sys-firmware/ipxe)" - ewarn " $(best_version sys-firmware/seabios)" - ewarn " $(best_version sys-firmware/sgabios)" - ewarn "This might break resume of hibernated guests (started with a different" - ewarn "firmware version) and live migration to/from qemu versions with different" - ewarn "firmware. Please (cold) restart all running guests. For functional" - ewarn "guest migration ensure that all" - ewarn "hosts run at least" - ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." - fi -} - -pkg_info() { - echo "Using:" - echo " $(best_version app-emulation/spice-protocol)" - echo " $(best_version sys-firmware/edk2-ovmf)" - if has_version 'sys-firmware/edk2-ovmf[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi - echo " $(best_version sys-firmware/ipxe)" - echo " $(best_version sys-firmware/seabios)" - if has_version 'sys-firmware/seabios[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi - echo " $(best_version sys-firmware/sgabios)" -} diff --git a/app-emulation/qemu/qemu-2.11.1-r1.ebuild b/app-emulation/qemu/qemu-2.11.1-r1.ebuild deleted file mode 100644 index 482424fd1a80..000000000000 --- a/app-emulation/qemu/qemu-2.11.1-r1.ebuild +++ /dev/null @@ -1,805 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python2_7 ) -PYTHON_REQ_USE="ncurses,readline" - -PLOCALES="bg de_DE fr_FR hu it tr zh_CN" - -FIRMWARE_ABI_VERSION="2.9.0-r52" - -inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \ - user udev fcaps readme.gentoo-r1 pax-utils l10n - -if [[ ${PV} = *9999* ]]; then - EGIT_REPO_URI="git://git.qemu.org/qemu.git" - inherit git-r3 - SRC_URI="" -else - SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2" - KEYWORDS="amd64 ~arm64 ~ppc ~ppc64 x86 ~x86-fbsd" - - # Gentoo specific patchsets: - SRC_URI+=" https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r1.tar.xz" -fi - -DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" -HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org" - -LICENSE="GPL-2 LGPL-2 BSD-2" -SLOT="0" -IUSE="accessibility +aio alsa bluetooth bzip2 +caps +curl debug +fdt - glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux - kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png - pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy - spice ssh static static-user systemtap tci test usb usbredir vde - +vhost-net virgl virtfs +vnc vte xattr xen xfs" - -COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel - mips mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc - sparc64 x86_64" -IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} - lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb" -IUSE_USER_TARGETS="${COMMON_TARGETS} - armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx" - -use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) -use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) -IUSE+=" ${use_softmmu_targets} ${use_user_targets}" - -# Allow no targets to be built so that people can get a tools-only build. -# Block USE flag configurations known to not work. -REQUIRED_USE="${PYTHON_REQUIRED_USE} - gtk2? ( gtk ) - qemu_softmmu_targets_arm? ( fdt ) - qemu_softmmu_targets_microblaze? ( fdt ) - qemu_softmmu_targets_mips64el? ( fdt ) - qemu_softmmu_targets_ppc? ( fdt ) - qemu_softmmu_targets_ppc64? ( fdt ) - sdl2? ( sdl ) - static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio ) - virtfs? ( xattr ) - vte? ( gtk )" - -# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) -# and user/softmmu targets (qemu-*, qemu-system-*). -# -# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. -# -# The attr lib isn't always linked in (although the USE flag is always -# respected). This is because qemu supports using the C library's API -# when available rather than always using the extranl library. -ALL_DEPEND=" - >=dev-libs/glib-2.0[static-libs(+)] - sys-libs/zlib[static-libs(+)] - python? ( ${PYTHON_DEPS} ) - systemtap? ( dev-util/systemtap ) - xattr? ( sys-apps/attr[static-libs(+)] )" - -# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) -# softmmu targets (qemu-system-*). -SOFTMMU_TOOLS_DEPEND=" - >=x11-libs/pixman-0.28.0[static-libs(+)] - accessibility? ( - app-accessibility/brltty[api] - app-accessibility/brltty[static-libs(+)] - ) - aio? ( dev-libs/libaio[static-libs(+)] ) - alsa? ( >=media-libs/alsa-lib-1.0.13 ) - bluetooth? ( net-wireless/bluez ) - bzip2? ( app-arch/bzip2[static-libs(+)] ) - caps? ( sys-libs/libcap-ng[static-libs(+)] ) - curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) - fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] ) - glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) - gnutls? ( - dev-libs/nettle:=[static-libs(+)] - >=net-libs/gnutls-3.0:=[static-libs(+)] - ) - gtk? ( - gtk2? ( - x11-libs/gtk+:2 - vte? ( x11-libs/vte:0 ) - ) - !gtk2? ( - x11-libs/gtk+:3 - vte? ( x11-libs/vte:2.91 ) - ) - ) - infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] ) - iscsi? ( net-libs/libiscsi ) - jpeg? ( virtual/jpeg:0=[static-libs(+)] ) - lzo? ( dev-libs/lzo:2[static-libs(+)] ) - ncurses? ( - sys-libs/ncurses:0=[unicode] - sys-libs/ncurses:0=[static-libs(+)] - ) - nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) - numa? ( sys-process/numactl[static-libs(+)] ) - opengl? ( - virtual/opengl - media-libs/libepoxy[static-libs(+)] - media-libs/mesa[static-libs(+)] - media-libs/mesa[egl,gbm] - ) - png? ( media-libs/libpng:0=[static-libs(+)] ) - pulseaudio? ( media-sound/pulseaudio ) - rbd? ( sys-cluster/ceph[static-libs(+)] ) - sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) - sdl? ( - !sdl2? ( - media-libs/libsdl[X] - >=media-libs/libsdl-1.2.11[static-libs(+)] - ) - sdl2? ( - media-libs/libsdl2[X] - media-libs/libsdl2[static-libs(+)] - ) - ) - seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) - smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) - snappy? ( app-arch/snappy:=[static-libs(+)] ) - spice? ( - >=app-emulation/spice-protocol-0.12.3 - >=app-emulation/spice-0.12.0[static-libs(+)] - ) - ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] ) - usb? ( >=virtual/libusb-1-r2[static-libs(+)] ) - usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) - vde? ( net-misc/vde[static-libs(+)] ) - virgl? ( media-libs/virglrenderer[static-libs(+)] ) - virtfs? ( sys-libs/libcap ) - xen? ( app-emulation/xen-tools:= ) - xfs? ( sys-fs/xfsprogs[static-libs(+)] )" - -X86_FIRMWARE_DEPEND=" - pin-upstream-blobs? ( - ~sys-firmware/edk2-ovmf-2017_pre20170505[binary] - ~sys-firmware/ipxe-1.0.0_p20160620 - ~sys-firmware/seabios-1.10.2[binary,seavgabios] - ~sys-firmware/sgabios-0.1_pre8 - ) - !pin-upstream-blobs? ( - sys-firmware/edk2-ovmf - sys-firmware/ipxe - >=sys-firmware/seabios-1.10.2[seavgabios] - sys-firmware/sgabios - )" -PPC64_FIRMWARE_DEPEND=" - pin-upstream-blobs? ( - ~sys-firmware/seabios-1.10.2[binary,seavgabios] - ) - !pin-upstream-blobs? ( - >=sys-firmware/seabios-1.10.2[seavgabios] - ) -" - -CDEPEND=" - !static? ( - ${ALL_DEPEND//\[static-libs(+)]} - ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} - ) - qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) - qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) - qemu_softmmu_targets_ppc64? ( ${PPC64_FIRMWARE_DEPEND} ) -" -DEPEND="${CDEPEND} - dev-lang/perl - =dev-lang/python-2* - sys-apps/texinfo - virtual/pkgconfig - kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) - gtk? ( nls? ( sys-devel/gettext ) ) - static? ( - ${ALL_DEPEND} - ${SOFTMMU_TOOLS_DEPEND} - ) - static-user? ( ${ALL_DEPEND} ) - test? ( - dev-libs/glib[utils] - sys-devel/bc - )" -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-qemu )" - -PATCHES=( - "${FILESDIR}"/${PN}-2.5.0-cflags.patch - "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch - "${FILESDIR}"/${PN}-2.11.0-glibc-2.27.patch - "${WORKDIR}"/patches -) - -STRIP_MASK="/usr/share/qemu/palcode-clipper" - -QA_PREBUILT=" - usr/share/qemu/openbios-ppc - usr/share/qemu/openbios-sparc64 - usr/share/qemu/openbios-sparc32 - usr/share/qemu/palcode-clipper - usr/share/qemu/s390-ccw.img - usr/share/qemu/s390-netboot.img - usr/share/qemu/u-boot.e500" - -QA_WX_LOAD="usr/bin/qemu-i386 - usr/bin/qemu-x86_64 - usr/bin/qemu-alpha - usr/bin/qemu-arm - usr/bin/qemu-cris - usr/bin/qemu-m68k - usr/bin/qemu-microblaze - usr/bin/qemu-microblazeel - usr/bin/qemu-mips - usr/bin/qemu-mipsel - usr/bin/qemu-or1k - usr/bin/qemu-ppc - usr/bin/qemu-ppc64 - usr/bin/qemu-ppc64abi32 - usr/bin/qemu-sh4 - usr/bin/qemu-sh4eb - usr/bin/qemu-sparc - usr/bin/qemu-sparc64 - usr/bin/qemu-armeb - usr/bin/qemu-sparc32plus - usr/bin/qemu-s390x - usr/bin/qemu-unicore32" - -DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the -kernel module loaded before running kvm. The easiest way to ensure that the -kernel module is loaded is to load it on boot. - For AMD CPUs the module is called 'kvm-amd'. - For Intel CPUs the module is called 'kvm-intel'. -Please review /etc/conf.d/modules for how to load these. - -Make sure your user is in the 'kvm' group. Just run - $ gpasswd -a kvm -then have re-login. - -For brand new installs, the default permissions on /dev/kvm might not let -you access it. You can tell udev to reset ownership/perms: - $ udevadm trigger -c add /dev/kvm - -If you want to register binfmt handlers for qemu user targets: -For openrc: - # rc-update add qemu-binfmt -For systemd: - # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" - -pkg_pretend() { - if use kernel_linux && kernel_is lt 2 6 25; then - eerror "This version of KVM requres a host kernel of 2.6.25 or higher." - elif use kernel_linux; then - if ! linux_config_exists; then - eerror "Unable to check your kernel for KVM support" - else - CONFIG_CHECK="~KVM ~TUN ~BRIDGE" - ERROR_KVM="You must enable KVM in your kernel to continue" - ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" - ERROR_KVM_AMD+=" your kernel configuration." - ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" - ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." - ERROR_TUN="You will need the Universal TUN/TAP driver compiled" - ERROR_TUN+=" into your kernel or loaded as a module to use the" - ERROR_TUN+=" virtual network device if using -net tap." - ERROR_BRIDGE="You will also need support for 802.1d" - ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." - use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" - ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" - ERROR_VHOST_NET+=" support" - - if use amd64 || use x86 || use amd64-linux || use x86-linux; then - if grep -q AuthenticAMD /proc/cpuinfo; then - CONFIG_CHECK+=" ~KVM_AMD" - elif grep -q GenuineIntel /proc/cpuinfo; then - CONFIG_CHECK+=" ~KVM_INTEL" - fi - fi - - use python && CONFIG_CHECK+=" ~DEBUG_FS" - ERROR_DEBUG_FS="debugFS support required for kvm_stat" - - # Now do the actual checks setup above - check_extra_config - fi - fi - - if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then - eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" - eerror "instances are still pointing to it. Please update your" - eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" - eerror "and the right system binary (e.g. qemu-system-x86_64)." - die "update your virt configs to not use qemu-kvm" - fi -} - -pkg_setup() { - enewgroup kvm 78 -} - -# Sanity check to make sure target lists are kept up-to-date. -check_targets() { - local var=$1 mak=$2 - local detected sorted - - pushd "${S}"/default-configs >/dev/null || die - - # Force C locale until glibc is updated. #564936 - detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) - sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) - if [[ ${sorted} != "${detected}" ]] ; then - eerror "The ebuild needs to be kept in sync." - eerror "${var}: ${sorted}" - eerror "$(printf '%-*s' ${#var} configure): ${detected}" - die "sync ${var} to the list of targets" - fi - - popd >/dev/null -} - -handle_locales() { - # Make sure locale list is kept up-to-date. - local detected sorted - detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u)) - sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u)) - if [[ ${sorted} != "${detected}" ]] ; then - eerror "The ebuild needs to be kept in sync." - eerror "PLOCALES: ${sorted}" - eerror " po/*.po: ${detected}" - die "sync PLOCALES" - fi - - # Deal with selective install of locales. - if use nls ; then - # Delete locales the user does not want. #577814 - rm_loc() { rm po/$1.po || die; } - l10n_for_each_disabled_locale_do rm_loc - else - # Cheap hack to disable gettext .mo generation. - rm -f po/*.po - fi -} - -src_prepare() { - check_targets IUSE_SOFTMMU_TARGETS softmmu - check_targets IUSE_USER_TARGETS linux-user - - # Alter target makefiles to accept CFLAGS set via flag-o - sed -i -r \ - -e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \ - Makefile Makefile.target || die - - default - - # Fix ld and objcopy being called directly - tc-export AR LD OBJCOPY - - # Verbose builds - MAKEOPTS+=" V=1" - - # Run after we've applied all patches. - handle_locales - - # Remove bundled copy of libfdt - rm -r dtc || die -} - -## -# configures qemu based on the build directory and the build type -# we are using. -# -qemu_src_configure() { - debug-print-function ${FUNCNAME} "$@" - - local buildtype=$1 - local builddir="${S}/${buildtype}-build" - - mkdir "${builddir}" - - local conf_opts=( - --prefix=/usr - --sysconfdir=/etc - --libdir=/usr/$(get_libdir) - --docdir=/usr/share/doc/${PF}/html - --disable-bsd-user - --disable-guest-agent - --disable-strip - --disable-werror - # We support gnutls/nettle for crypto operations. It is possible - # to use gcrypt when gnutls/nettle are disabled (but not when they - # are enabled), but it's not really worth the hassle. Disable it - # all the time to avoid automatically detecting it. #568856 - --disable-gcrypt - --python="${PYTHON}" - --cc="$(tc-getCC)" - --cxx="$(tc-getCXX)" - --host-cc="$(tc-getBUILD_CC)" - $(use_enable debug debug-info) - $(use_enable debug debug-tcg) - --enable-docs - $(use_enable tci tcg-interpreter) - $(use_enable xattr attr) - ) - - # Disable options not used by user targets. This simplifies building - # static user targets (USE=static-user) considerably. - conf_notuser() { - if [[ ${buildtype} == "user" ]] ; then - echo "--disable-${2:-$1}" - else - use_enable "$@" - fi - } - conf_opts+=( - $(conf_notuser accessibility brlapi) - $(conf_notuser aio linux-aio) - $(conf_notuser bzip2) - $(conf_notuser bluetooth bluez) - $(conf_notuser caps cap-ng) - $(conf_notuser curl) - $(conf_notuser fdt) - $(conf_notuser glusterfs) - $(conf_notuser gnutls) - $(conf_notuser gnutls nettle) - $(conf_notuser gtk) - $(conf_notuser infiniband rdma) - $(conf_notuser iscsi libiscsi) - $(conf_notuser jpeg vnc-jpeg) - $(conf_notuser kernel_linux kvm) - $(conf_notuser lzo) - $(conf_notuser ncurses curses) - $(conf_notuser nfs libnfs) - $(conf_notuser numa) - $(conf_notuser opengl) - $(conf_notuser png vnc-png) - $(conf_notuser rbd) - $(conf_notuser sasl vnc-sasl) - $(conf_notuser sdl) - $(conf_notuser seccomp) - $(conf_notuser smartcard) - $(conf_notuser snappy) - $(conf_notuser spice) - $(conf_notuser ssh libssh2) - $(conf_notuser usb libusb) - $(conf_notuser usbredir usb-redir) - $(conf_notuser vde) - $(conf_notuser vhost-net) - $(conf_notuser virgl virglrenderer) - $(conf_notuser virtfs) - $(conf_notuser vnc) - $(conf_notuser vte) - $(conf_notuser xen) - $(conf_notuser xen xen-pci-passthrough) - $(conf_notuser xfs xfsctl) - ) - - if [[ ! ${buildtype} == "user" ]] ; then - # audio options - local audio_opts="oss" - use alsa && audio_opts="alsa,${audio_opts}" - use sdl && audio_opts="sdl,${audio_opts}" - use pulseaudio && audio_opts="pa,${audio_opts}" - conf_opts+=( - --audio-drv-list="${audio_opts}" - ) - use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) ) - use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) ) - fi - - case ${buildtype} in - user) - conf_opts+=( - --enable-linux-user - --disable-system - --disable-blobs - --disable-tools - ) - local static_flag="static-user" - ;; - softmmu) - conf_opts+=( - --disable-linux-user - --enable-system - --disable-tools - ) - local static_flag="static" - ;; - tools) - conf_opts+=( - --disable-linux-user - --disable-system - --disable-blobs - --enable-tools - ) - local static_flag="static" - ;; - esac - - local targets="${buildtype}_targets" - [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) - - # Add support for SystemTAP - use systemtap && conf_opts+=( --enable-trace-backend=dtrace ) - - # We always want to attempt to build with PIE support as it results - # in a more secure binary. But it doesn't work with static or if - # the current GCC doesn't have PIE support. - if use ${static_flag}; then - conf_opts+=( --static --disable-pie ) - else - tc-enables-pie && conf_opts+=( --enable-pie ) - fi - - #bug #647570 - conf_opts+=( --disable-capstone ) - - echo "../configure ${conf_opts[*]}" - cd "${builddir}" - ../configure "${conf_opts[@]}" || die "configure failed" - - # FreeBSD's kernel does not support QEMU assigning/grabbing - # host USB devices yet - use kernel_FreeBSD && \ - sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak -} - -src_configure() { - local target - - python_setup - - softmmu_targets= softmmu_bins=() - user_targets= user_bins=() - - for target in ${IUSE_SOFTMMU_TARGETS} ; do - if use "qemu_softmmu_targets_${target}"; then - softmmu_targets+=",${target}-softmmu" - softmmu_bins+=( "qemu-system-${target}" ) - fi - done - - for target in ${IUSE_USER_TARGETS} ; do - if use "qemu_user_targets_${target}"; then - user_targets+=",${target}-linux-user" - user_bins+=( "qemu-${target}" ) - fi - done - - softmmu_targets=${softmmu_targets#,} - user_targets=${user_targets#,} - - [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" - [[ -n ${user_targets} ]] && qemu_src_configure "user" - qemu_src_configure "tools" -} - -src_compile() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - default - fi - - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - default - fi - - cd "${S}/tools-build" - default -} - -src_test() { - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - pax-mark m */qemu-system-* #515550 - emake -j1 check - emake -j1 check-report.html - fi -} - -qemu_python_install() { - python_domodule "${S}/scripts/qmp/qmp.py" - - python_doscript "${S}/scripts/kvm/vmxcap" - python_doscript "${S}/scripts/qmp/qmp-shell" - python_doscript "${S}/scripts/qmp/qemu-ga-client" -} - -# Generate binfmt support files. -# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) -# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) -generate_initd() { - local out="${T}/qemu-binfmt" - local out_systemd="${T}/qemu.conf" - local d="${T}/binfmt.d" - - einfo "Generating qemu binfmt scripts and configuration files" - - # Generate the debian fragments first. - mkdir -p "${d}" - "${S}"/scripts/qemu-binfmt-conf.sh \ - --debian \ - --exportdir "${d}" \ - --qemu-path "${EPREFIX}/usr/bin" \ - || die - # Then turn the fragments into a shell script we can source. - sed -E -i \ - -e 's:^([^ ]+) (.*)$:\1="\2":' \ - "${d}"/* || die - - # Generate the init.d script by assembling the fragments from above. - local f qcpu package interpreter magic mask - cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die - for f in "${d}"/qemu-* ; do - source "${f}" - - # Normalize the cpu logic like we do in the init.d for the native cpu. - qcpu=${package#qemu-} - case ${qcpu} in - arm*) qcpu="arm";; - mips*) qcpu="mips";; - ppc*) qcpu="ppc";; - s390*) qcpu="s390";; - sh*) qcpu="sh";; - sparc*) qcpu="sparc";; - esac - - cat <>"${out}" - if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then - echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register - fi -EOF - - echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" - - done - cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die -} - -src_install() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - emake DESTDIR="${ED}" install - - # Install binfmt handler init script for user targets. - generate_initd - doinitd "${T}/qemu-binfmt" - - # Install binfmt/qemu.conf. - insinto "/usr/share/qemu/binfmt.d" - doins "${T}/qemu.conf" - fi - - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - emake DESTDIR="${ED}" install - - # This might not exist if the test failed. #512010 - [[ -e check-report.html ]] && dohtml check-report.html - - if use kernel_linux; then - udev_newrules "${FILESDIR}"/65-kvm.rules-r1 65-kvm.rules - fi - - if use python; then - python_foreach_impl qemu_python_install - fi - fi - - cd "${S}/tools-build" - emake DESTDIR="${ED}" install - - # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 - pushd "${ED}"/usr/bin >/dev/null - pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 - popd >/dev/null - - # Install config file example for qemu-bridge-helper - insinto "/etc/qemu" - doins "${FILESDIR}/bridge.conf" - - cd "${S}" - dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt - newdoc pc-bios/README README.pc-bios - - if [[ -n ${softmmu_targets} ]]; then - # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - rm "${ED}/usr/share/qemu/bios-256k.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin - dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin - fi - - # Remove vgabios since we're using the seavgabios packaged one - rm "${ED}/usr/share/qemu/vgabios.bin" - rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" - rm "${ED}/usr/share/qemu/vgabios-qxl.bin" - rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" - rm "${ED}/usr/share/qemu/vgabios-virtio.bin" - rm "${ED}/usr/share/qemu/vgabios-vmware.bin" - # PPC64 loads vgabios-stdvga - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc64; then - dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin - dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin - dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin - dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin - dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin - dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin - fi - - # Remove sgabios since we're using the sgabios packaged one - rm "${ED}/usr/share/qemu/sgabios.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin - fi - - # Remove iPXE since we're using the iPXE packaged one - rm "${ED}"/usr/share/qemu/pxe-*.rom - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom - dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom - dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom - dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom - dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom - dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom - fi - fi - - DISABLE_AUTOFORMATTING=true - readme.gentoo_create_doc -} - -firmware_abi_change() { - local pv - for pv in ${REPLACING_VERSIONS}; do - if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then - return 0 - fi - done - return 1 -} - -pkg_postinst() { - if [[ -n ${softmmu_targets} ]] && use kernel_linux; then - udev_reload - fi - - fcaps cap_net_admin /usr/libexec/qemu-bridge-helper - - DISABLE_AUTOFORMATTING=true - readme.gentoo_print_elog - - if use pin-upstream-blobs && firmware_abi_change; then - ewarn "This version of qemu pins new versions of firmware blobs:" - ewarn " $(best_version sys-firmware/edk2-ovmf)" - ewarn " $(best_version sys-firmware/ipxe)" - ewarn " $(best_version sys-firmware/seabios)" - ewarn " $(best_version sys-firmware/sgabios)" - ewarn "This might break resume of hibernated guests (started with a different" - ewarn "firmware version) and live migration to/from qemu versions with different" - ewarn "firmware. Please (cold) restart all running guests. For functional" - ewarn "guest migration ensure that all" - ewarn "hosts run at least" - ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." - fi -} - -pkg_info() { - echo "Using:" - echo " $(best_version app-emulation/spice-protocol)" - echo " $(best_version sys-firmware/edk2-ovmf)" - if has_version 'sys-firmware/edk2-ovmf[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi - echo " $(best_version sys-firmware/ipxe)" - echo " $(best_version sys-firmware/seabios)" - if has_version 'sys-firmware/seabios[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi - echo " $(best_version sys-firmware/sgabios)" -} diff --git a/app-emulation/qemu/qemu-2.11.1-r2.ebuild b/app-emulation/qemu/qemu-2.11.1-r2.ebuild new file mode 100644 index 000000000000..8922d6793f0b --- /dev/null +++ b/app-emulation/qemu/qemu-2.11.1-r2.ebuild @@ -0,0 +1,805 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="ncurses,readline" + +PLOCALES="bg de_DE fr_FR hu it tr zh_CN" + +FIRMWARE_ABI_VERSION="2.9.0-r52" + +inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \ + user udev fcaps readme.gentoo-r1 pax-utils l10n + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="git://git.qemu.org/qemu.git" + inherit git-r3 + SRC_URI="" +else + SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2" + KEYWORDS="amd64 ~arm64 ~ppc ~ppc64 x86 ~x86-fbsd" + + # Gentoo specific patchsets: + SRC_URI+=" https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r1.tar.xz" +fi + +DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" +HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org" + +LICENSE="GPL-2 LGPL-2 BSD-2" +SLOT="0" +IUSE="accessibility +aio alsa bluetooth bzip2 +caps +curl debug +fdt + glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux + kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png + pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy + spice ssh static static-user systemtap tci test usb usbredir vde + +vhost-net virgl virtfs +vnc vte xattr xen xfs" + +COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel + mips mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc + sparc64 x86_64" +IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} + lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb" +IUSE_USER_TARGETS="${COMMON_TARGETS} + armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx" + +use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) +use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) +IUSE+=" ${use_softmmu_targets} ${use_user_targets}" + +# Allow no targets to be built so that people can get a tools-only build. +# Block USE flag configurations known to not work. +REQUIRED_USE="${PYTHON_REQUIRED_USE} + gtk2? ( gtk ) + qemu_softmmu_targets_arm? ( fdt ) + qemu_softmmu_targets_microblaze? ( fdt ) + qemu_softmmu_targets_mips64el? ( fdt ) + qemu_softmmu_targets_ppc? ( fdt ) + qemu_softmmu_targets_ppc64? ( fdt ) + sdl2? ( sdl ) + static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio !snappy ) + virtfs? ( xattr ) + vte? ( gtk )" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# and user/softmmu targets (qemu-*, qemu-system-*). +# +# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. +# +# The attr lib isn't always linked in (although the USE flag is always +# respected). This is because qemu supports using the C library's API +# when available rather than always using the extranl library. +ALL_DEPEND=" + >=dev-libs/glib-2.0[static-libs(+)] + sys-libs/zlib[static-libs(+)] + python? ( ${PYTHON_DEPS} ) + systemtap? ( dev-util/systemtap ) + xattr? ( sys-apps/attr[static-libs(+)] )" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# softmmu targets (qemu-system-*). +SOFTMMU_TOOLS_DEPEND=" + >=x11-libs/pixman-0.28.0[static-libs(+)] + accessibility? ( + app-accessibility/brltty[api] + app-accessibility/brltty[static-libs(+)] + ) + aio? ( dev-libs/libaio[static-libs(+)] ) + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bluetooth? ( net-wireless/bluez ) + bzip2? ( app-arch/bzip2[static-libs(+)] ) + caps? ( sys-libs/libcap-ng[static-libs(+)] ) + curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) + gnutls? ( + dev-libs/nettle:=[static-libs(+)] + >=net-libs/gnutls-3.0:=[static-libs(+)] + ) + gtk? ( + gtk2? ( + x11-libs/gtk+:2 + vte? ( x11-libs/vte:0 ) + ) + !gtk2? ( + x11-libs/gtk+:3 + vte? ( x11-libs/vte:2.91 ) + ) + ) + infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] ) + iscsi? ( net-libs/libiscsi ) + jpeg? ( virtual/jpeg:0=[static-libs(+)] ) + lzo? ( dev-libs/lzo:2[static-libs(+)] ) + ncurses? ( + sys-libs/ncurses:0=[unicode] + sys-libs/ncurses:0=[static-libs(+)] + ) + nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) + numa? ( sys-process/numactl[static-libs(+)] ) + opengl? ( + virtual/opengl + media-libs/libepoxy[static-libs(+)] + media-libs/mesa[static-libs(+)] + media-libs/mesa[egl,gbm] + ) + png? ( media-libs/libpng:0=[static-libs(+)] ) + pulseaudio? ( media-sound/pulseaudio ) + rbd? ( sys-cluster/ceph[static-libs(+)] ) + sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) + sdl? ( + !sdl2? ( + media-libs/libsdl[X] + >=media-libs/libsdl-1.2.11[static-libs(+)] + ) + sdl2? ( + media-libs/libsdl2[X] + media-libs/libsdl2[static-libs(+)] + ) + ) + seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) + smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) + snappy? ( app-arch/snappy:= ) + spice? ( + >=app-emulation/spice-protocol-0.12.3 + >=app-emulation/spice-0.12.0[static-libs(+)] + ) + ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] ) + usb? ( >=virtual/libusb-1-r2[static-libs(+)] ) + usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) + vde? ( net-misc/vde[static-libs(+)] ) + virgl? ( media-libs/virglrenderer[static-libs(+)] ) + virtfs? ( sys-libs/libcap ) + xen? ( app-emulation/xen-tools:= ) + xfs? ( sys-fs/xfsprogs[static-libs(+)] )" + +X86_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/edk2-ovmf-2017_pre20170505[binary] + ~sys-firmware/ipxe-1.0.0_p20160620 + ~sys-firmware/seabios-1.10.2[binary,seavgabios] + ~sys-firmware/sgabios-0.1_pre8 + ) + !pin-upstream-blobs? ( + sys-firmware/edk2-ovmf + sys-firmware/ipxe + >=sys-firmware/seabios-1.10.2[seavgabios] + sys-firmware/sgabios + )" +PPC64_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/seabios-1.10.2[binary,seavgabios] + ) + !pin-upstream-blobs? ( + >=sys-firmware/seabios-1.10.2[seavgabios] + ) +" + +CDEPEND=" + !static? ( + ${ALL_DEPEND//\[static-libs(+)]} + ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} + ) + qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc64? ( ${PPC64_FIRMWARE_DEPEND} ) +" +DEPEND="${CDEPEND} + dev-lang/perl + =dev-lang/python-2* + sys-apps/texinfo + virtual/pkgconfig + kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) + gtk? ( nls? ( sys-devel/gettext ) ) + static? ( + ${ALL_DEPEND} + ${SOFTMMU_TOOLS_DEPEND} + ) + static-user? ( ${ALL_DEPEND} ) + test? ( + dev-libs/glib[utils] + sys-devel/bc + )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-qemu )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.5.0-cflags.patch + "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch + "${FILESDIR}"/${PN}-2.11.0-glibc-2.27.patch + "${WORKDIR}"/patches +) + +STRIP_MASK="/usr/share/qemu/palcode-clipper" + +QA_PREBUILT=" + usr/share/qemu/openbios-ppc + usr/share/qemu/openbios-sparc64 + usr/share/qemu/openbios-sparc32 + usr/share/qemu/palcode-clipper + usr/share/qemu/s390-ccw.img + usr/share/qemu/s390-netboot.img + usr/share/qemu/u-boot.e500" + +QA_WX_LOAD="usr/bin/qemu-i386 + usr/bin/qemu-x86_64 + usr/bin/qemu-alpha + usr/bin/qemu-arm + usr/bin/qemu-cris + usr/bin/qemu-m68k + usr/bin/qemu-microblaze + usr/bin/qemu-microblazeel + usr/bin/qemu-mips + usr/bin/qemu-mipsel + usr/bin/qemu-or1k + usr/bin/qemu-ppc + usr/bin/qemu-ppc64 + usr/bin/qemu-ppc64abi32 + usr/bin/qemu-sh4 + usr/bin/qemu-sh4eb + usr/bin/qemu-sparc + usr/bin/qemu-sparc64 + usr/bin/qemu-armeb + usr/bin/qemu-sparc32plus + usr/bin/qemu-s390x + usr/bin/qemu-unicore32" + +DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the +kernel module loaded before running kvm. The easiest way to ensure that the +kernel module is loaded is to load it on boot. + For AMD CPUs the module is called 'kvm-amd'. + For Intel CPUs the module is called 'kvm-intel'. +Please review /etc/conf.d/modules for how to load these. + +Make sure your user is in the 'kvm' group. Just run + $ gpasswd -a kvm +then have re-login. + +For brand new installs, the default permissions on /dev/kvm might not let +you access it. You can tell udev to reset ownership/perms: + $ udevadm trigger -c add /dev/kvm + +If you want to register binfmt handlers for qemu user targets: +For openrc: + # rc-update add qemu-binfmt +For systemd: + # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" + +pkg_pretend() { + if use kernel_linux && kernel_is lt 2 6 25; then + eerror "This version of KVM requres a host kernel of 2.6.25 or higher." + elif use kernel_linux; then + if ! linux_config_exists; then + eerror "Unable to check your kernel for KVM support" + else + CONFIG_CHECK="~KVM ~TUN ~BRIDGE" + ERROR_KVM="You must enable KVM in your kernel to continue" + ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" + ERROR_KVM_AMD+=" your kernel configuration." + ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" + ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." + ERROR_TUN="You will need the Universal TUN/TAP driver compiled" + ERROR_TUN+=" into your kernel or loaded as a module to use the" + ERROR_TUN+=" virtual network device if using -net tap." + ERROR_BRIDGE="You will also need support for 802.1d" + ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." + use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" + ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" + ERROR_VHOST_NET+=" support" + + if use amd64 || use x86 || use amd64-linux || use x86-linux; then + if grep -q AuthenticAMD /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_AMD" + elif grep -q GenuineIntel /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_INTEL" + fi + fi + + use python && CONFIG_CHECK+=" ~DEBUG_FS" + ERROR_DEBUG_FS="debugFS support required for kvm_stat" + + # Now do the actual checks setup above + check_extra_config + fi + fi + + if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then + eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" + eerror "instances are still pointing to it. Please update your" + eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" + eerror "and the right system binary (e.g. qemu-system-x86_64)." + die "update your virt configs to not use qemu-kvm" + fi +} + +pkg_setup() { + enewgroup kvm 78 +} + +# Sanity check to make sure target lists are kept up-to-date. +check_targets() { + local var=$1 mak=$2 + local detected sorted + + pushd "${S}"/default-configs >/dev/null || die + + # Force C locale until glibc is updated. #564936 + detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) + sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "${var}: ${sorted}" + eerror "$(printf '%-*s' ${#var} configure): ${detected}" + die "sync ${var} to the list of targets" + fi + + popd >/dev/null +} + +handle_locales() { + # Make sure locale list is kept up-to-date. + local detected sorted + detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u)) + sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "PLOCALES: ${sorted}" + eerror " po/*.po: ${detected}" + die "sync PLOCALES" + fi + + # Deal with selective install of locales. + if use nls ; then + # Delete locales the user does not want. #577814 + rm_loc() { rm po/$1.po || die; } + l10n_for_each_disabled_locale_do rm_loc + else + # Cheap hack to disable gettext .mo generation. + rm -f po/*.po + fi +} + +src_prepare() { + check_targets IUSE_SOFTMMU_TARGETS softmmu + check_targets IUSE_USER_TARGETS linux-user + + # Alter target makefiles to accept CFLAGS set via flag-o + sed -i -r \ + -e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \ + Makefile Makefile.target || die + + default + + # Fix ld and objcopy being called directly + tc-export AR LD OBJCOPY + + # Verbose builds + MAKEOPTS+=" V=1" + + # Run after we've applied all patches. + handle_locales + + # Remove bundled copy of libfdt + rm -r dtc || die +} + +## +# configures qemu based on the build directory and the build type +# we are using. +# +qemu_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + local buildtype=$1 + local builddir="${S}/${buildtype}-build" + + mkdir "${builddir}" + + local conf_opts=( + --prefix=/usr + --sysconfdir=/etc + --libdir=/usr/$(get_libdir) + --docdir=/usr/share/doc/${PF}/html + --disable-bsd-user + --disable-guest-agent + --disable-strip + --disable-werror + # We support gnutls/nettle for crypto operations. It is possible + # to use gcrypt when gnutls/nettle are disabled (but not when they + # are enabled), but it's not really worth the hassle. Disable it + # all the time to avoid automatically detecting it. #568856 + --disable-gcrypt + --python="${PYTHON}" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + $(use_enable debug debug-info) + $(use_enable debug debug-tcg) + --enable-docs + $(use_enable tci tcg-interpreter) + $(use_enable xattr attr) + ) + + # Disable options not used by user targets. This simplifies building + # static user targets (USE=static-user) considerably. + conf_notuser() { + if [[ ${buildtype} == "user" ]] ; then + echo "--disable-${2:-$1}" + else + use_enable "$@" + fi + } + conf_opts+=( + $(conf_notuser accessibility brlapi) + $(conf_notuser aio linux-aio) + $(conf_notuser bzip2) + $(conf_notuser bluetooth bluez) + $(conf_notuser caps cap-ng) + $(conf_notuser curl) + $(conf_notuser fdt) + $(conf_notuser glusterfs) + $(conf_notuser gnutls) + $(conf_notuser gnutls nettle) + $(conf_notuser gtk) + $(conf_notuser infiniband rdma) + $(conf_notuser iscsi libiscsi) + $(conf_notuser jpeg vnc-jpeg) + $(conf_notuser kernel_linux kvm) + $(conf_notuser lzo) + $(conf_notuser ncurses curses) + $(conf_notuser nfs libnfs) + $(conf_notuser numa) + $(conf_notuser opengl) + $(conf_notuser png vnc-png) + $(conf_notuser rbd) + $(conf_notuser sasl vnc-sasl) + $(conf_notuser sdl) + $(conf_notuser seccomp) + $(conf_notuser smartcard) + $(conf_notuser snappy) + $(conf_notuser spice) + $(conf_notuser ssh libssh2) + $(conf_notuser usb libusb) + $(conf_notuser usbredir usb-redir) + $(conf_notuser vde) + $(conf_notuser vhost-net) + $(conf_notuser virgl virglrenderer) + $(conf_notuser virtfs) + $(conf_notuser vnc) + $(conf_notuser vte) + $(conf_notuser xen) + $(conf_notuser xen xen-pci-passthrough) + $(conf_notuser xfs xfsctl) + ) + + if [[ ! ${buildtype} == "user" ]] ; then + # audio options + local audio_opts="oss" + use alsa && audio_opts="alsa,${audio_opts}" + use sdl && audio_opts="sdl,${audio_opts}" + use pulseaudio && audio_opts="pa,${audio_opts}" + conf_opts+=( + --audio-drv-list="${audio_opts}" + ) + use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) ) + use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) ) + fi + + case ${buildtype} in + user) + conf_opts+=( + --enable-linux-user + --disable-system + --disable-blobs + --disable-tools + ) + local static_flag="static-user" + ;; + softmmu) + conf_opts+=( + --disable-linux-user + --enable-system + --disable-tools + ) + local static_flag="static" + ;; + tools) + conf_opts+=( + --disable-linux-user + --disable-system + --disable-blobs + --enable-tools + ) + local static_flag="static" + ;; + esac + + local targets="${buildtype}_targets" + [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) + + # Add support for SystemTAP + use systemtap && conf_opts+=( --enable-trace-backend=dtrace ) + + # We always want to attempt to build with PIE support as it results + # in a more secure binary. But it doesn't work with static or if + # the current GCC doesn't have PIE support. + if use ${static_flag}; then + conf_opts+=( --static --disable-pie ) + else + tc-enables-pie && conf_opts+=( --enable-pie ) + fi + + #bug #647570 + conf_opts+=( --disable-capstone ) + + echo "../configure ${conf_opts[*]}" + cd "${builddir}" + ../configure "${conf_opts[@]}" || die "configure failed" + + # FreeBSD's kernel does not support QEMU assigning/grabbing + # host USB devices yet + use kernel_FreeBSD && \ + sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak +} + +src_configure() { + local target + + python_setup + + softmmu_targets= softmmu_bins=() + user_targets= user_bins=() + + for target in ${IUSE_SOFTMMU_TARGETS} ; do + if use "qemu_softmmu_targets_${target}"; then + softmmu_targets+=",${target}-softmmu" + softmmu_bins+=( "qemu-system-${target}" ) + fi + done + + for target in ${IUSE_USER_TARGETS} ; do + if use "qemu_user_targets_${target}"; then + user_targets+=",${target}-linux-user" + user_bins+=( "qemu-${target}" ) + fi + done + + softmmu_targets=${softmmu_targets#,} + user_targets=${user_targets#,} + + [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" + [[ -n ${user_targets} ]] && qemu_src_configure "user" + qemu_src_configure "tools" +} + +src_compile() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" + default + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + default + fi + + cd "${S}/tools-build" + default +} + +src_test() { + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + pax-mark m */qemu-system-* #515550 + emake -j1 check + emake -j1 check-report.html + fi +} + +qemu_python_install() { + python_domodule "${S}/scripts/qmp/qmp.py" + + python_doscript "${S}/scripts/kvm/vmxcap" + python_doscript "${S}/scripts/qmp/qmp-shell" + python_doscript "${S}/scripts/qmp/qemu-ga-client" +} + +# Generate binfmt support files. +# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) +# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) +generate_initd() { + local out="${T}/qemu-binfmt" + local out_systemd="${T}/qemu.conf" + local d="${T}/binfmt.d" + + einfo "Generating qemu binfmt scripts and configuration files" + + # Generate the debian fragments first. + mkdir -p "${d}" + "${S}"/scripts/qemu-binfmt-conf.sh \ + --debian \ + --exportdir "${d}" \ + --qemu-path "${EPREFIX}/usr/bin" \ + || die + # Then turn the fragments into a shell script we can source. + sed -E -i \ + -e 's:^([^ ]+) (.*)$:\1="\2":' \ + "${d}"/* || die + + # Generate the init.d script by assembling the fragments from above. + local f qcpu package interpreter magic mask + cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die + for f in "${d}"/qemu-* ; do + source "${f}" + + # Normalize the cpu logic like we do in the init.d for the native cpu. + qcpu=${package#qemu-} + case ${qcpu} in + arm*) qcpu="arm";; + mips*) qcpu="mips";; + ppc*) qcpu="ppc";; + s390*) qcpu="s390";; + sh*) qcpu="sh";; + sparc*) qcpu="sparc";; + esac + + cat <>"${out}" + if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then + echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register + fi +EOF + + echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" + + done + cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die +} + +src_install() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" + emake DESTDIR="${ED}" install + + # Install binfmt handler init script for user targets. + generate_initd + doinitd "${T}/qemu-binfmt" + + # Install binfmt/qemu.conf. + insinto "/usr/share/qemu/binfmt.d" + doins "${T}/qemu.conf" + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + emake DESTDIR="${ED}" install + + # This might not exist if the test failed. #512010 + [[ -e check-report.html ]] && dohtml check-report.html + + if use kernel_linux; then + udev_newrules "${FILESDIR}"/65-kvm.rules-r1 65-kvm.rules + fi + + if use python; then + python_foreach_impl qemu_python_install + fi + fi + + cd "${S}/tools-build" + emake DESTDIR="${ED}" install + + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 + pushd "${ED}"/usr/bin >/dev/null + pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 + popd >/dev/null + + # Install config file example for qemu-bridge-helper + insinto "/etc/qemu" + doins "${FILESDIR}/bridge.conf" + + cd "${S}" + dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt + newdoc pc-bios/README README.pc-bios + + if [[ -n ${softmmu_targets} ]]; then + # Remove SeaBIOS since we're using the SeaBIOS packaged one + rm "${ED}/usr/share/qemu/bios.bin" + rm "${ED}/usr/share/qemu/bios-256k.bin" + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../seabios/bios.bin /usr/share/qemu/bios.bin + dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin + fi + + # Remove vgabios since we're using the seavgabios packaged one + rm "${ED}/usr/share/qemu/vgabios.bin" + rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" + rm "${ED}/usr/share/qemu/vgabios-qxl.bin" + rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" + rm "${ED}/usr/share/qemu/vgabios-virtio.bin" + rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + # PPC64 loads vgabios-stdvga + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc64; then + dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin + dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin + dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin + dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin + dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin + dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin + fi + + # Remove sgabios since we're using the sgabios packaged one + rm "${ED}/usr/share/qemu/sgabios.bin" + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin + fi + + # Remove iPXE since we're using the iPXE packaged one + rm "${ED}"/usr/share/qemu/pxe-*.rom + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom + dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom + dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom + dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom + dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom + dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom + fi + fi + + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +firmware_abi_change() { + local pv + for pv in ${REPLACING_VERSIONS}; do + if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then + return 0 + fi + done + return 1 +} + +pkg_postinst() { + if [[ -n ${softmmu_targets} ]] && use kernel_linux; then + udev_reload + fi + + fcaps cap_net_admin /usr/libexec/qemu-bridge-helper + + DISABLE_AUTOFORMATTING=true + readme.gentoo_print_elog + + if use pin-upstream-blobs && firmware_abi_change; then + ewarn "This version of qemu pins new versions of firmware blobs:" + ewarn " $(best_version sys-firmware/edk2-ovmf)" + ewarn " $(best_version sys-firmware/ipxe)" + ewarn " $(best_version sys-firmware/seabios)" + ewarn " $(best_version sys-firmware/sgabios)" + ewarn "This might break resume of hibernated guests (started with a different" + ewarn "firmware version) and live migration to/from qemu versions with different" + ewarn "firmware. Please (cold) restart all running guests. For functional" + ewarn "guest migration ensure that all" + ewarn "hosts run at least" + ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." + fi +} + +pkg_info() { + echo "Using:" + echo " $(best_version app-emulation/spice-protocol)" + echo " $(best_version sys-firmware/edk2-ovmf)" + if has_version 'sys-firmware/edk2-ovmf[binary]'; then + echo " USE=binary" + else + echo " USE=''" + fi + echo " $(best_version sys-firmware/ipxe)" + echo " $(best_version sys-firmware/seabios)" + if has_version 'sys-firmware/seabios[binary]'; then + echo " USE=binary" + else + echo " USE=''" + fi + echo " $(best_version sys-firmware/sgabios)" +} diff --git a/app-emulation/qemu/qemu-2.11.1-r52.ebuild b/app-emulation/qemu/qemu-2.11.1-r52.ebuild deleted file mode 100644 index a95eff6a1e6d..000000000000 --- a/app-emulation/qemu/qemu-2.11.1-r52.ebuild +++ /dev/null @@ -1,805 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -PYTHON_COMPAT=( python2_7 ) -PYTHON_REQ_USE="ncurses,readline" - -PLOCALES="bg de_DE fr_FR hu it tr zh_CN" - -FIRMWARE_ABI_VERSION="2.11.1-r50" - -inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \ - user udev fcaps readme.gentoo-r1 pax-utils l10n - -if [[ ${PV} = *9999* ]]; then - EGIT_REPO_URI="git://git.qemu.org/qemu.git" - inherit git-r3 - SRC_URI="" -else - SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2" - KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd" - - # Gentoo specific patchsets: - SRC_URI+=" https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r1.tar.xz" -fi - -DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" -HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org" - -LICENSE="GPL-2 LGPL-2 BSD-2" -SLOT="0" -IUSE="accessibility +aio alsa bluetooth bzip2 capstone +caps +curl debug - +fdt glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux - kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png - pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy - spice ssh static static-user systemtap tci test usb usbredir vde - +vhost-net virgl virtfs +vnc vte xattr xen xfs" - -COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel - mips mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc - sparc64 x86_64" -IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} - lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb" -IUSE_USER_TARGETS="${COMMON_TARGETS} - armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx" - -use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) -use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) -IUSE+=" ${use_softmmu_targets} ${use_user_targets}" - -# Allow no targets to be built so that people can get a tools-only build. -# Block USE flag configurations known to not work. -REQUIRED_USE="${PYTHON_REQUIRED_USE} - gtk2? ( gtk ) - qemu_softmmu_targets_arm? ( fdt ) - qemu_softmmu_targets_microblaze? ( fdt ) - qemu_softmmu_targets_mips64el? ( fdt ) - qemu_softmmu_targets_ppc? ( fdt ) - qemu_softmmu_targets_ppc64? ( fdt ) - sdl2? ( sdl ) - static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio ) - virtfs? ( xattr ) - vte? ( gtk )" - -# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) -# and user/softmmu targets (qemu-*, qemu-system-*). -# -# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. -# -# The attr lib isn't always linked in (although the USE flag is always -# respected). This is because qemu supports using the C library's API -# when available rather than always using the external library. -ALL_DEPEND=" - >=dev-libs/glib-2.0[static-libs(+)] - sys-libs/zlib[static-libs(+)] - python? ( ${PYTHON_DEPS} ) - systemtap? ( dev-util/systemtap ) - xattr? ( sys-apps/attr[static-libs(+)] )" - -# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) -# softmmu targets (qemu-system-*). -SOFTMMU_TOOLS_DEPEND=" - >=x11-libs/pixman-0.28.0[static-libs(+)] - accessibility? ( - app-accessibility/brltty[api] - app-accessibility/brltty[static-libs(+)] - ) - aio? ( dev-libs/libaio[static-libs(+)] ) - alsa? ( >=media-libs/alsa-lib-1.0.13 ) - bluetooth? ( net-wireless/bluez ) - bzip2? ( app-arch/bzip2[static-libs(+)] ) - capstone? ( dev-libs/capstone ) - caps? ( sys-libs/libcap-ng[static-libs(+)] ) - curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) - fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] ) - glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) - gnutls? ( - dev-libs/nettle:=[static-libs(+)] - >=net-libs/gnutls-3.0:=[static-libs(+)] - ) - gtk? ( - gtk2? ( - x11-libs/gtk+:2 - vte? ( x11-libs/vte:0 ) - ) - !gtk2? ( - x11-libs/gtk+:3 - vte? ( x11-libs/vte:2.91 ) - ) - ) - infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] ) - iscsi? ( net-libs/libiscsi ) - jpeg? ( virtual/jpeg:0=[static-libs(+)] ) - lzo? ( dev-libs/lzo:2[static-libs(+)] ) - ncurses? ( - sys-libs/ncurses:0=[unicode] - sys-libs/ncurses:0=[static-libs(+)] - ) - nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) - numa? ( sys-process/numactl[static-libs(+)] ) - opengl? ( - virtual/opengl - media-libs/libepoxy[static-libs(+)] - media-libs/mesa[static-libs(+)] - media-libs/mesa[egl,gbm] - ) - png? ( media-libs/libpng:0=[static-libs(+)] ) - pulseaudio? ( media-sound/pulseaudio ) - rbd? ( sys-cluster/ceph[static-libs(+)] ) - sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) - sdl? ( - !sdl2? ( - media-libs/libsdl[X] - >=media-libs/libsdl-1.2.11[static-libs(+)] - ) - sdl2? ( - media-libs/libsdl2[X] - media-libs/libsdl2[static-libs(+)] - ) - ) - seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) - smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) - snappy? ( app-arch/snappy:=[static-libs(+)] ) - spice? ( - >=app-emulation/spice-protocol-0.12.3 - >=app-emulation/spice-0.12.0[static-libs(+)] - ) - ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] ) - usb? ( >=virtual/libusb-1-r2[static-libs(+)] ) - usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) - vde? ( net-misc/vde[static-libs(+)] ) - virgl? ( media-libs/virglrenderer[static-libs(+)] ) - virtfs? ( sys-libs/libcap ) - xen? ( app-emulation/xen-tools:= ) - xfs? ( sys-fs/xfsprogs[static-libs(+)] )" - -X86_FIRMWARE_DEPEND=" - pin-upstream-blobs? ( - ~sys-firmware/edk2-ovmf-2017_p20180211[binary] - ~sys-firmware/ipxe-1.0.0_p20180211[binary] - ~sys-firmware/seabios-1.11.0[binary,seavgabios] - ~sys-firmware/sgabios-0.1_pre8[binary] - ) - !pin-upstream-blobs? ( - sys-firmware/edk2-ovmf - sys-firmware/ipxe - >=sys-firmware/seabios-1.10.2[seavgabios] - sys-firmware/sgabios - )" -PPC64_FIRMWARE_DEPEND=" - pin-upstream-blobs? ( - ~sys-firmware/seabios-1.11.0[binary,seavgabios] - ) - !pin-upstream-blobs? ( - >=sys-firmware/seabios-1.10.2[seavgabios] - ) -" - -CDEPEND=" - !static? ( - ${ALL_DEPEND//\[static-libs(+)]} - ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} - ) - qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) - qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) - qemu_softmmu_targets_ppc64? ( ${PPC64_FIRMWARE_DEPEND} ) -" -DEPEND="${CDEPEND} - dev-lang/perl - =dev-lang/python-2* - sys-apps/texinfo - virtual/pkgconfig - kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) - gtk? ( nls? ( sys-devel/gettext ) ) - static? ( - ${ALL_DEPEND} - ${SOFTMMU_TOOLS_DEPEND} - ) - static-user? ( ${ALL_DEPEND} ) - test? ( - dev-libs/glib[utils] - sys-devel/bc - )" -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-qemu )" - -PATCHES=( - "${FILESDIR}"/${PN}-2.5.0-cflags.patch - "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch - "${FILESDIR}"/${PN}-2.11.0-glibc-2.27.patch - "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch - "${WORKDIR}"/patches -) - -STRIP_MASK="/usr/share/qemu/palcode-clipper" - -QA_PREBUILT=" - usr/share/qemu/openbios-ppc - usr/share/qemu/openbios-sparc64 - usr/share/qemu/openbios-sparc32 - usr/share/qemu/palcode-clipper - usr/share/qemu/s390-ccw.img - usr/share/qemu/s390-netboot.img - usr/share/qemu/u-boot.e500" - -QA_WX_LOAD="usr/bin/qemu-i386 - usr/bin/qemu-x86_64 - usr/bin/qemu-alpha - usr/bin/qemu-arm - usr/bin/qemu-cris - usr/bin/qemu-m68k - usr/bin/qemu-microblaze - usr/bin/qemu-microblazeel - usr/bin/qemu-mips - usr/bin/qemu-mipsel - usr/bin/qemu-or1k - usr/bin/qemu-ppc - usr/bin/qemu-ppc64 - usr/bin/qemu-ppc64abi32 - usr/bin/qemu-sh4 - usr/bin/qemu-sh4eb - usr/bin/qemu-sparc - usr/bin/qemu-sparc64 - usr/bin/qemu-armeb - usr/bin/qemu-sparc32plus - usr/bin/qemu-s390x - usr/bin/qemu-unicore32" - -DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the -kernel module loaded before running kvm. The easiest way to ensure that the -kernel module is loaded is to load it on boot. - For AMD CPUs the module is called 'kvm-amd'. - For Intel CPUs the module is called 'kvm-intel'. -Please review /etc/conf.d/modules for how to load these. - -Make sure your user is in the 'kvm' group. Just run - $ gpasswd -a kvm -then have re-login. - -For brand new installs, the default permissions on /dev/kvm might not let -you access it. You can tell udev to reset ownership/perms: - $ udevadm trigger -c add /dev/kvm - -If you want to register binfmt handlers for qemu user targets: -For openrc: - # rc-update add qemu-binfmt -For systemd: - # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" - -pkg_pretend() { - if use kernel_linux && kernel_is lt 2 6 25; then - eerror "This version of KVM requres a host kernel of 2.6.25 or higher." - elif use kernel_linux; then - if ! linux_config_exists; then - eerror "Unable to check your kernel for KVM support" - else - CONFIG_CHECK="~KVM ~TUN ~BRIDGE" - ERROR_KVM="You must enable KVM in your kernel to continue" - ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" - ERROR_KVM_AMD+=" your kernel configuration." - ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" - ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." - ERROR_TUN="You will need the Universal TUN/TAP driver compiled" - ERROR_TUN+=" into your kernel or loaded as a module to use the" - ERROR_TUN+=" virtual network device if using -net tap." - ERROR_BRIDGE="You will also need support for 802.1d" - ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." - use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" - ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" - ERROR_VHOST_NET+=" support" - - if use amd64 || use x86 || use amd64-linux || use x86-linux; then - if grep -q AuthenticAMD /proc/cpuinfo; then - CONFIG_CHECK+=" ~KVM_AMD" - elif grep -q GenuineIntel /proc/cpuinfo; then - CONFIG_CHECK+=" ~KVM_INTEL" - fi - fi - - use python && CONFIG_CHECK+=" ~DEBUG_FS" - ERROR_DEBUG_FS="debugFS support required for kvm_stat" - - # Now do the actual checks setup above - check_extra_config - fi - fi - - if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then - eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" - eerror "instances are still pointing to it. Please update your" - eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" - eerror "and the right system binary (e.g. qemu-system-x86_64)." - die "update your virt configs to not use qemu-kvm" - fi -} - -pkg_setup() { - enewgroup kvm 78 -} - -# Sanity check to make sure target lists are kept up-to-date. -check_targets() { - local var=$1 mak=$2 - local detected sorted - - pushd "${S}"/default-configs >/dev/null || die - - # Force C locale until glibc is updated. #564936 - detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) - sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) - if [[ ${sorted} != "${detected}" ]] ; then - eerror "The ebuild needs to be kept in sync." - eerror "${var}: ${sorted}" - eerror "$(printf '%-*s' ${#var} configure): ${detected}" - die "sync ${var} to the list of targets" - fi - - popd >/dev/null -} - -handle_locales() { - # Make sure locale list is kept up-to-date. - local detected sorted - detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u)) - sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u)) - if [[ ${sorted} != "${detected}" ]] ; then - eerror "The ebuild needs to be kept in sync." - eerror "PLOCALES: ${sorted}" - eerror " po/*.po: ${detected}" - die "sync PLOCALES" - fi - - # Deal with selective install of locales. - if use nls ; then - # Delete locales the user does not want. #577814 - rm_loc() { rm po/$1.po || die; } - l10n_for_each_disabled_locale_do rm_loc - else - # Cheap hack to disable gettext .mo generation. - rm -f po/*.po - fi -} - -src_prepare() { - check_targets IUSE_SOFTMMU_TARGETS softmmu - check_targets IUSE_USER_TARGETS linux-user - - # Alter target makefiles to accept CFLAGS set via flag-o - sed -i -r \ - -e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \ - Makefile Makefile.target || die - - default - - # Fix ld and objcopy being called directly - tc-export AR LD OBJCOPY - - # Verbose builds - MAKEOPTS+=" V=1" - - # Run after we've applied all patches. - handle_locales - - # Remove bundled copy of libfdt - rm -r dtc || die -} - -## -# configures qemu based on the build directory and the build type -# we are using. -# -qemu_src_configure() { - debug-print-function ${FUNCNAME} "$@" - - local buildtype=$1 - local builddir="${S}/${buildtype}-build" - - mkdir "${builddir}" - - local conf_opts=( - --prefix=/usr - --sysconfdir=/etc - --libdir=/usr/$(get_libdir) - --docdir=/usr/share/doc/${PF}/html - --disable-bsd-user - --disable-guest-agent - --disable-strip - --disable-werror - # We support gnutls/nettle for crypto operations. It is possible - # to use gcrypt when gnutls/nettle are disabled (but not when they - # are enabled), but it's not really worth the hassle. Disable it - # all the time to avoid automatically detecting it. #568856 - --disable-gcrypt - --python="${PYTHON}" - --cc="$(tc-getCC)" - --cxx="$(tc-getCXX)" - --host-cc="$(tc-getBUILD_CC)" - $(use_enable debug debug-info) - $(use_enable debug debug-tcg) - --enable-docs - $(use_enable tci tcg-interpreter) - $(use_enable xattr attr) - ) - - # Disable options not used by user targets. This simplifies building - # static user targets (USE=static-user) considerably. - conf_notuser() { - if [[ ${buildtype} == "user" ]] ; then - echo "--disable-${2:-$1}" - else - use_enable "$@" - fi - } - conf_opts+=( - $(conf_notuser accessibility brlapi) - $(conf_notuser aio linux-aio) - $(conf_notuser bzip2) - $(conf_notuser bluetooth bluez) - $(conf_notuser capstone) - $(conf_notuser caps cap-ng) - $(conf_notuser curl) - $(conf_notuser fdt) - $(conf_notuser glusterfs) - $(conf_notuser gnutls) - $(conf_notuser gnutls nettle) - $(conf_notuser gtk) - $(conf_notuser infiniband rdma) - $(conf_notuser iscsi libiscsi) - $(conf_notuser jpeg vnc-jpeg) - $(conf_notuser kernel_linux kvm) - $(conf_notuser lzo) - $(conf_notuser ncurses curses) - $(conf_notuser nfs libnfs) - $(conf_notuser numa) - $(conf_notuser opengl) - $(conf_notuser png vnc-png) - $(conf_notuser rbd) - $(conf_notuser sasl vnc-sasl) - $(conf_notuser sdl) - $(conf_notuser seccomp) - $(conf_notuser smartcard) - $(conf_notuser snappy) - $(conf_notuser spice) - $(conf_notuser ssh libssh2) - $(conf_notuser usb libusb) - $(conf_notuser usbredir usb-redir) - $(conf_notuser vde) - $(conf_notuser vhost-net) - $(conf_notuser virgl virglrenderer) - $(conf_notuser virtfs) - $(conf_notuser vnc) - $(conf_notuser vte) - $(conf_notuser xen) - $(conf_notuser xen xen-pci-passthrough) - $(conf_notuser xfs xfsctl) - ) - - if [[ ! ${buildtype} == "user" ]] ; then - # audio options - local audio_opts="oss" - use alsa && audio_opts="alsa,${audio_opts}" - use sdl && audio_opts="sdl,${audio_opts}" - use pulseaudio && audio_opts="pa,${audio_opts}" - conf_opts+=( - --audio-drv-list="${audio_opts}" - ) - use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) ) - use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) ) - fi - - case ${buildtype} in - user) - conf_opts+=( - --enable-linux-user - --disable-system - --disable-blobs - --disable-tools - ) - local static_flag="static-user" - ;; - softmmu) - conf_opts+=( - --disable-linux-user - --enable-system - --disable-tools - ) - local static_flag="static" - ;; - tools) - conf_opts+=( - --disable-linux-user - --disable-system - --disable-blobs - --enable-tools - ) - local static_flag="static" - ;; - esac - - local targets="${buildtype}_targets" - [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) - - # Add support for SystemTAP - use systemtap && conf_opts+=( --enable-trace-backend=dtrace ) - - # We always want to attempt to build with PIE support as it results - # in a more secure binary. But it doesn't work with static or if - # the current GCC doesn't have PIE support. - if use ${static_flag}; then - conf_opts+=( --static --disable-pie ) - else - tc-enables-pie && conf_opts+=( --enable-pie ) - fi - - echo "../configure ${conf_opts[*]}" - cd "${builddir}" - ../configure "${conf_opts[@]}" || die "configure failed" - - # FreeBSD's kernel does not support QEMU assigning/grabbing - # host USB devices yet - use kernel_FreeBSD && \ - sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak -} - -src_configure() { - local target - - python_setup - - softmmu_targets= softmmu_bins=() - user_targets= user_bins=() - - for target in ${IUSE_SOFTMMU_TARGETS} ; do - if use "qemu_softmmu_targets_${target}"; then - softmmu_targets+=",${target}-softmmu" - softmmu_bins+=( "qemu-system-${target}" ) - fi - done - - for target in ${IUSE_USER_TARGETS} ; do - if use "qemu_user_targets_${target}"; then - user_targets+=",${target}-linux-user" - user_bins+=( "qemu-${target}" ) - fi - done - - softmmu_targets=${softmmu_targets#,} - user_targets=${user_targets#,} - - [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" - [[ -n ${user_targets} ]] && qemu_src_configure "user" - qemu_src_configure "tools" -} - -src_compile() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - default - fi - - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - default - fi - - cd "${S}/tools-build" - default -} - -src_test() { - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - pax-mark m */qemu-system-* #515550 - emake -j1 check - emake -j1 check-report.html - fi -} - -qemu_python_install() { - python_domodule "${S}/scripts/qmp/qmp.py" - - python_doscript "${S}/scripts/kvm/vmxcap" - python_doscript "${S}/scripts/qmp/qmp-shell" - python_doscript "${S}/scripts/qmp/qemu-ga-client" -} - -# Generate binfmt support files. -# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) -# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) -generate_initd() { - local out="${T}/qemu-binfmt" - local out_systemd="${T}/qemu.conf" - local d="${T}/binfmt.d" - - einfo "Generating qemu binfmt scripts and configuration files" - - # Generate the debian fragments first. - mkdir -p "${d}" - "${S}"/scripts/qemu-binfmt-conf.sh \ - --debian \ - --exportdir "${d}" \ - --qemu-path "${EPREFIX}/usr/bin" \ - || die - # Then turn the fragments into a shell script we can source. - sed -E -i \ - -e 's:^([^ ]+) (.*)$:\1="\2":' \ - "${d}"/* || die - - # Generate the init.d script by assembling the fragments from above. - local f qcpu package interpreter magic mask - cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die - for f in "${d}"/qemu-* ; do - source "${f}" - - # Normalize the cpu logic like we do in the init.d for the native cpu. - qcpu=${package#qemu-} - case ${qcpu} in - arm*) qcpu="arm";; - mips*) qcpu="mips";; - ppc*) qcpu="ppc";; - s390*) qcpu="s390";; - sh*) qcpu="sh";; - sparc*) qcpu="sparc";; - esac - - cat <>"${out}" - if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then - echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register - fi -EOF - - echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" - - done - cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die -} - -src_install() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - emake DESTDIR="${ED}" install - - # Install binfmt handler init script for user targets. - generate_initd - doinitd "${T}/qemu-binfmt" - - # Install binfmt/qemu.conf. - insinto "/usr/share/qemu/binfmt.d" - doins "${T}/qemu.conf" - fi - - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - emake DESTDIR="${ED}" install - - # This might not exist if the test failed. #512010 - [[ -e check-report.html ]] && dohtml check-report.html - - if use kernel_linux; then - udev_newrules "${FILESDIR}"/65-kvm.rules-r1 65-kvm.rules - fi - - if use python; then - python_foreach_impl qemu_python_install - fi - fi - - cd "${S}/tools-build" - emake DESTDIR="${ED}" install - - # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 - pushd "${ED}"/usr/bin >/dev/null - pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 - popd >/dev/null - - # Install config file example for qemu-bridge-helper - insinto "/etc/qemu" - doins "${FILESDIR}/bridge.conf" - - cd "${S}" - dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt - newdoc pc-bios/README README.pc-bios - - if [[ -n ${softmmu_targets} ]]; then - # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - rm "${ED}/usr/share/qemu/bios-256k.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin - dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin - fi - - # Remove vgabios since we're using the seavgabios packaged one - rm "${ED}/usr/share/qemu/vgabios.bin" - rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" - rm "${ED}/usr/share/qemu/vgabios-qxl.bin" - rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" - rm "${ED}/usr/share/qemu/vgabios-virtio.bin" - rm "${ED}/usr/share/qemu/vgabios-vmware.bin" - # PPC64 loads vgabios-stdvga - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc64; then - dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin - dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin - dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin - dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin - dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin - dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin - fi - - # Remove sgabios since we're using the sgabios packaged one - rm "${ED}/usr/share/qemu/sgabios.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin - fi - - # Remove iPXE since we're using the iPXE packaged one - rm "${ED}"/usr/share/qemu/pxe-*.rom - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom - dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom - dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom - dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom - dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom - dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom - fi - fi - - DISABLE_AUTOFORMATTING=true - readme.gentoo_create_doc -} - -firmware_abi_change() { - local pv - for pv in ${REPLACING_VERSIONS}; do - if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then - return 0 - fi - done - return 1 -} - -pkg_postinst() { - if [[ -n ${softmmu_targets} ]] && use kernel_linux; then - udev_reload - fi - - fcaps cap_net_admin /usr/libexec/qemu-bridge-helper - - DISABLE_AUTOFORMATTING=true - readme.gentoo_print_elog - - if use pin-upstream-blobs && firmware_abi_change; then - ewarn "This version of qemu pins new versions of firmware blobs:" - ewarn " $(best_version sys-firmware/edk2-ovmf)" - ewarn " $(best_version sys-firmware/ipxe)" - ewarn " $(best_version sys-firmware/seabios)" - ewarn " $(best_version sys-firmware/sgabios)" - ewarn "This might break resume of hibernated guests (started with a different" - ewarn "firmware version) and live migration to/from qemu versions with different" - ewarn "firmware. Please (cold) restart all running guests. For functional" - ewarn "guest migration ensure that all" - ewarn "hosts run at least" - ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." - fi -} - -pkg_info() { - echo "Using:" - echo " $(best_version app-emulation/spice-protocol)" - echo " $(best_version sys-firmware/edk2-ovmf)" - if has_version 'sys-firmware/edk2-ovmf[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi - echo " $(best_version sys-firmware/ipxe)" - echo " $(best_version sys-firmware/seabios)" - if has_version 'sys-firmware/seabios[binary]'; then - echo " USE=binary" - else - echo " USE=''" - fi - echo " $(best_version sys-firmware/sgabios)" -} diff --git a/app-emulation/qemu/qemu-2.11.1-r53.ebuild b/app-emulation/qemu/qemu-2.11.1-r53.ebuild new file mode 100644 index 000000000000..0fd33474552e --- /dev/null +++ b/app-emulation/qemu/qemu-2.11.1-r53.ebuild @@ -0,0 +1,805 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="ncurses,readline" + +PLOCALES="bg de_DE fr_FR hu it tr zh_CN" + +FIRMWARE_ABI_VERSION="2.11.1-r50" + +inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \ + user udev fcaps readme.gentoo-r1 pax-utils l10n + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="git://git.qemu.org/qemu.git" + inherit git-r3 + SRC_URI="" +else + SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2" + KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd" + + # Gentoo specific patchsets: + SRC_URI+=" https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r2.tar.xz" +fi + +DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" +HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org" + +LICENSE="GPL-2 LGPL-2 BSD-2" +SLOT="0" +IUSE="accessibility +aio alsa bluetooth bzip2 capstone +caps +curl debug + +fdt glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux + kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png + pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy + spice ssh static static-user systemtap tci test usb usbredir vde + +vhost-net virgl virtfs +vnc vte xattr xen xfs" + +COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel + mips mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc + sparc64 x86_64" +IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} + lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb" +IUSE_USER_TARGETS="${COMMON_TARGETS} + armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx" + +use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) +use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) +IUSE+=" ${use_softmmu_targets} ${use_user_targets}" + +# Allow no targets to be built so that people can get a tools-only build. +# Block USE flag configurations known to not work. +REQUIRED_USE="${PYTHON_REQUIRED_USE} + gtk2? ( gtk ) + qemu_softmmu_targets_arm? ( fdt ) + qemu_softmmu_targets_microblaze? ( fdt ) + qemu_softmmu_targets_mips64el? ( fdt ) + qemu_softmmu_targets_ppc? ( fdt ) + qemu_softmmu_targets_ppc64? ( fdt ) + sdl2? ( sdl ) + static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio !snappy ) + virtfs? ( xattr ) + vte? ( gtk )" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# and user/softmmu targets (qemu-*, qemu-system-*). +# +# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. +# +# The attr lib isn't always linked in (although the USE flag is always +# respected). This is because qemu supports using the C library's API +# when available rather than always using the external library. +ALL_DEPEND=" + >=dev-libs/glib-2.0[static-libs(+)] + sys-libs/zlib[static-libs(+)] + python? ( ${PYTHON_DEPS} ) + systemtap? ( dev-util/systemtap ) + xattr? ( sys-apps/attr[static-libs(+)] )" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# softmmu targets (qemu-system-*). +SOFTMMU_TOOLS_DEPEND=" + >=x11-libs/pixman-0.28.0[static-libs(+)] + accessibility? ( + app-accessibility/brltty[api] + app-accessibility/brltty[static-libs(+)] + ) + aio? ( dev-libs/libaio[static-libs(+)] ) + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bluetooth? ( net-wireless/bluez ) + bzip2? ( app-arch/bzip2[static-libs(+)] ) + capstone? ( dev-libs/capstone ) + caps? ( sys-libs/libcap-ng[static-libs(+)] ) + curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) + gnutls? ( + dev-libs/nettle:=[static-libs(+)] + >=net-libs/gnutls-3.0:=[static-libs(+)] + ) + gtk? ( + gtk2? ( + x11-libs/gtk+:2 + vte? ( x11-libs/vte:0 ) + ) + !gtk2? ( + x11-libs/gtk+:3 + vte? ( x11-libs/vte:2.91 ) + ) + ) + infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] ) + iscsi? ( net-libs/libiscsi ) + jpeg? ( virtual/jpeg:0=[static-libs(+)] ) + lzo? ( dev-libs/lzo:2[static-libs(+)] ) + ncurses? ( + sys-libs/ncurses:0=[unicode] + sys-libs/ncurses:0=[static-libs(+)] + ) + nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) + numa? ( sys-process/numactl[static-libs(+)] ) + opengl? ( + virtual/opengl + media-libs/libepoxy[static-libs(+)] + media-libs/mesa[static-libs(+)] + media-libs/mesa[egl,gbm] + ) + png? ( media-libs/libpng:0=[static-libs(+)] ) + pulseaudio? ( media-sound/pulseaudio ) + rbd? ( sys-cluster/ceph[static-libs(+)] ) + sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) + sdl? ( + !sdl2? ( + media-libs/libsdl[X] + >=media-libs/libsdl-1.2.11[static-libs(+)] + ) + sdl2? ( + media-libs/libsdl2[X] + media-libs/libsdl2[static-libs(+)] + ) + ) + seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) + smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) + snappy? ( app-arch/snappy:= ) + spice? ( + >=app-emulation/spice-protocol-0.12.3 + >=app-emulation/spice-0.12.0[static-libs(+)] + ) + ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] ) + usb? ( >=virtual/libusb-1-r2[static-libs(+)] ) + usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) + vde? ( net-misc/vde[static-libs(+)] ) + virgl? ( media-libs/virglrenderer[static-libs(+)] ) + virtfs? ( sys-libs/libcap ) + xen? ( app-emulation/xen-tools:= ) + xfs? ( sys-fs/xfsprogs[static-libs(+)] )" + +X86_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/edk2-ovmf-2017_p20180211[binary] + ~sys-firmware/ipxe-1.0.0_p20180211[binary] + ~sys-firmware/seabios-1.11.0[binary,seavgabios] + ~sys-firmware/sgabios-0.1_pre8[binary] + ) + !pin-upstream-blobs? ( + sys-firmware/edk2-ovmf + sys-firmware/ipxe + >=sys-firmware/seabios-1.10.2[seavgabios] + sys-firmware/sgabios + )" +PPC64_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/seabios-1.11.0[binary,seavgabios] + ) + !pin-upstream-blobs? ( + >=sys-firmware/seabios-1.10.2[seavgabios] + ) +" + +CDEPEND=" + !static? ( + ${ALL_DEPEND//\[static-libs(+)]} + ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} + ) + qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc64? ( ${PPC64_FIRMWARE_DEPEND} ) +" +DEPEND="${CDEPEND} + dev-lang/perl + =dev-lang/python-2* + sys-apps/texinfo + virtual/pkgconfig + kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) + gtk? ( nls? ( sys-devel/gettext ) ) + static? ( + ${ALL_DEPEND} + ${SOFTMMU_TOOLS_DEPEND} + ) + static-user? ( ${ALL_DEPEND} ) + test? ( + dev-libs/glib[utils] + sys-devel/bc + )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-qemu )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.5.0-cflags.patch + "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch + "${FILESDIR}"/${PN}-2.11.0-glibc-2.27.patch + "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch + "${WORKDIR}"/patches +) + +STRIP_MASK="/usr/share/qemu/palcode-clipper" + +QA_PREBUILT=" + usr/share/qemu/openbios-ppc + usr/share/qemu/openbios-sparc64 + usr/share/qemu/openbios-sparc32 + usr/share/qemu/palcode-clipper + usr/share/qemu/s390-ccw.img + usr/share/qemu/s390-netboot.img + usr/share/qemu/u-boot.e500" + +QA_WX_LOAD="usr/bin/qemu-i386 + usr/bin/qemu-x86_64 + usr/bin/qemu-alpha + usr/bin/qemu-arm + usr/bin/qemu-cris + usr/bin/qemu-m68k + usr/bin/qemu-microblaze + usr/bin/qemu-microblazeel + usr/bin/qemu-mips + usr/bin/qemu-mipsel + usr/bin/qemu-or1k + usr/bin/qemu-ppc + usr/bin/qemu-ppc64 + usr/bin/qemu-ppc64abi32 + usr/bin/qemu-sh4 + usr/bin/qemu-sh4eb + usr/bin/qemu-sparc + usr/bin/qemu-sparc64 + usr/bin/qemu-armeb + usr/bin/qemu-sparc32plus + usr/bin/qemu-s390x + usr/bin/qemu-unicore32" + +DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the +kernel module loaded before running kvm. The easiest way to ensure that the +kernel module is loaded is to load it on boot. + For AMD CPUs the module is called 'kvm-amd'. + For Intel CPUs the module is called 'kvm-intel'. +Please review /etc/conf.d/modules for how to load these. + +Make sure your user is in the 'kvm' group. Just run + $ gpasswd -a kvm +then have re-login. + +For brand new installs, the default permissions on /dev/kvm might not let +you access it. You can tell udev to reset ownership/perms: + $ udevadm trigger -c add /dev/kvm + +If you want to register binfmt handlers for qemu user targets: +For openrc: + # rc-update add qemu-binfmt +For systemd: + # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" + +pkg_pretend() { + if use kernel_linux && kernel_is lt 2 6 25; then + eerror "This version of KVM requres a host kernel of 2.6.25 or higher." + elif use kernel_linux; then + if ! linux_config_exists; then + eerror "Unable to check your kernel for KVM support" + else + CONFIG_CHECK="~KVM ~TUN ~BRIDGE" + ERROR_KVM="You must enable KVM in your kernel to continue" + ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" + ERROR_KVM_AMD+=" your kernel configuration." + ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" + ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." + ERROR_TUN="You will need the Universal TUN/TAP driver compiled" + ERROR_TUN+=" into your kernel or loaded as a module to use the" + ERROR_TUN+=" virtual network device if using -net tap." + ERROR_BRIDGE="You will also need support for 802.1d" + ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." + use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" + ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" + ERROR_VHOST_NET+=" support" + + if use amd64 || use x86 || use amd64-linux || use x86-linux; then + if grep -q AuthenticAMD /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_AMD" + elif grep -q GenuineIntel /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_INTEL" + fi + fi + + use python && CONFIG_CHECK+=" ~DEBUG_FS" + ERROR_DEBUG_FS="debugFS support required for kvm_stat" + + # Now do the actual checks setup above + check_extra_config + fi + fi + + if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then + eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" + eerror "instances are still pointing to it. Please update your" + eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" + eerror "and the right system binary (e.g. qemu-system-x86_64)." + die "update your virt configs to not use qemu-kvm" + fi +} + +pkg_setup() { + enewgroup kvm 78 +} + +# Sanity check to make sure target lists are kept up-to-date. +check_targets() { + local var=$1 mak=$2 + local detected sorted + + pushd "${S}"/default-configs >/dev/null || die + + # Force C locale until glibc is updated. #564936 + detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) + sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "${var}: ${sorted}" + eerror "$(printf '%-*s' ${#var} configure): ${detected}" + die "sync ${var} to the list of targets" + fi + + popd >/dev/null +} + +handle_locales() { + # Make sure locale list is kept up-to-date. + local detected sorted + detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u)) + sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "PLOCALES: ${sorted}" + eerror " po/*.po: ${detected}" + die "sync PLOCALES" + fi + + # Deal with selective install of locales. + if use nls ; then + # Delete locales the user does not want. #577814 + rm_loc() { rm po/$1.po || die; } + l10n_for_each_disabled_locale_do rm_loc + else + # Cheap hack to disable gettext .mo generation. + rm -f po/*.po + fi +} + +src_prepare() { + check_targets IUSE_SOFTMMU_TARGETS softmmu + check_targets IUSE_USER_TARGETS linux-user + + # Alter target makefiles to accept CFLAGS set via flag-o + sed -i -r \ + -e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \ + Makefile Makefile.target || die + + default + + # Fix ld and objcopy being called directly + tc-export AR LD OBJCOPY + + # Verbose builds + MAKEOPTS+=" V=1" + + # Run after we've applied all patches. + handle_locales + + # Remove bundled copy of libfdt + rm -r dtc || die +} + +## +# configures qemu based on the build directory and the build type +# we are using. +# +qemu_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + local buildtype=$1 + local builddir="${S}/${buildtype}-build" + + mkdir "${builddir}" + + local conf_opts=( + --prefix=/usr + --sysconfdir=/etc + --libdir=/usr/$(get_libdir) + --docdir=/usr/share/doc/${PF}/html + --disable-bsd-user + --disable-guest-agent + --disable-strip + --disable-werror + # We support gnutls/nettle for crypto operations. It is possible + # to use gcrypt when gnutls/nettle are disabled (but not when they + # are enabled), but it's not really worth the hassle. Disable it + # all the time to avoid automatically detecting it. #568856 + --disable-gcrypt + --python="${PYTHON}" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + $(use_enable debug debug-info) + $(use_enable debug debug-tcg) + --enable-docs + $(use_enable tci tcg-interpreter) + $(use_enable xattr attr) + ) + + # Disable options not used by user targets. This simplifies building + # static user targets (USE=static-user) considerably. + conf_notuser() { + if [[ ${buildtype} == "user" ]] ; then + echo "--disable-${2:-$1}" + else + use_enable "$@" + fi + } + conf_opts+=( + $(conf_notuser accessibility brlapi) + $(conf_notuser aio linux-aio) + $(conf_notuser bzip2) + $(conf_notuser bluetooth bluez) + $(conf_notuser capstone) + $(conf_notuser caps cap-ng) + $(conf_notuser curl) + $(conf_notuser fdt) + $(conf_notuser glusterfs) + $(conf_notuser gnutls) + $(conf_notuser gnutls nettle) + $(conf_notuser gtk) + $(conf_notuser infiniband rdma) + $(conf_notuser iscsi libiscsi) + $(conf_notuser jpeg vnc-jpeg) + $(conf_notuser kernel_linux kvm) + $(conf_notuser lzo) + $(conf_notuser ncurses curses) + $(conf_notuser nfs libnfs) + $(conf_notuser numa) + $(conf_notuser opengl) + $(conf_notuser png vnc-png) + $(conf_notuser rbd) + $(conf_notuser sasl vnc-sasl) + $(conf_notuser sdl) + $(conf_notuser seccomp) + $(conf_notuser smartcard) + $(conf_notuser snappy) + $(conf_notuser spice) + $(conf_notuser ssh libssh2) + $(conf_notuser usb libusb) + $(conf_notuser usbredir usb-redir) + $(conf_notuser vde) + $(conf_notuser vhost-net) + $(conf_notuser virgl virglrenderer) + $(conf_notuser virtfs) + $(conf_notuser vnc) + $(conf_notuser vte) + $(conf_notuser xen) + $(conf_notuser xen xen-pci-passthrough) + $(conf_notuser xfs xfsctl) + ) + + if [[ ! ${buildtype} == "user" ]] ; then + # audio options + local audio_opts="oss" + use alsa && audio_opts="alsa,${audio_opts}" + use sdl && audio_opts="sdl,${audio_opts}" + use pulseaudio && audio_opts="pa,${audio_opts}" + conf_opts+=( + --audio-drv-list="${audio_opts}" + ) + use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) ) + use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) ) + fi + + case ${buildtype} in + user) + conf_opts+=( + --enable-linux-user + --disable-system + --disable-blobs + --disable-tools + ) + local static_flag="static-user" + ;; + softmmu) + conf_opts+=( + --disable-linux-user + --enable-system + --disable-tools + ) + local static_flag="static" + ;; + tools) + conf_opts+=( + --disable-linux-user + --disable-system + --disable-blobs + --enable-tools + ) + local static_flag="static" + ;; + esac + + local targets="${buildtype}_targets" + [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) + + # Add support for SystemTAP + use systemtap && conf_opts+=( --enable-trace-backend=dtrace ) + + # We always want to attempt to build with PIE support as it results + # in a more secure binary. But it doesn't work with static or if + # the current GCC doesn't have PIE support. + if use ${static_flag}; then + conf_opts+=( --static --disable-pie ) + else + tc-enables-pie && conf_opts+=( --enable-pie ) + fi + + echo "../configure ${conf_opts[*]}" + cd "${builddir}" + ../configure "${conf_opts[@]}" || die "configure failed" + + # FreeBSD's kernel does not support QEMU assigning/grabbing + # host USB devices yet + use kernel_FreeBSD && \ + sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak +} + +src_configure() { + local target + + python_setup + + softmmu_targets= softmmu_bins=() + user_targets= user_bins=() + + for target in ${IUSE_SOFTMMU_TARGETS} ; do + if use "qemu_softmmu_targets_${target}"; then + softmmu_targets+=",${target}-softmmu" + softmmu_bins+=( "qemu-system-${target}" ) + fi + done + + for target in ${IUSE_USER_TARGETS} ; do + if use "qemu_user_targets_${target}"; then + user_targets+=",${target}-linux-user" + user_bins+=( "qemu-${target}" ) + fi + done + + softmmu_targets=${softmmu_targets#,} + user_targets=${user_targets#,} + + [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" + [[ -n ${user_targets} ]] && qemu_src_configure "user" + qemu_src_configure "tools" +} + +src_compile() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" + default + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + default + fi + + cd "${S}/tools-build" + default +} + +src_test() { + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + pax-mark m */qemu-system-* #515550 + emake -j1 check + emake -j1 check-report.html + fi +} + +qemu_python_install() { + python_domodule "${S}/scripts/qmp/qmp.py" + + python_doscript "${S}/scripts/kvm/vmxcap" + python_doscript "${S}/scripts/qmp/qmp-shell" + python_doscript "${S}/scripts/qmp/qemu-ga-client" +} + +# Generate binfmt support files. +# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) +# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) +generate_initd() { + local out="${T}/qemu-binfmt" + local out_systemd="${T}/qemu.conf" + local d="${T}/binfmt.d" + + einfo "Generating qemu binfmt scripts and configuration files" + + # Generate the debian fragments first. + mkdir -p "${d}" + "${S}"/scripts/qemu-binfmt-conf.sh \ + --debian \ + --exportdir "${d}" \ + --qemu-path "${EPREFIX}/usr/bin" \ + || die + # Then turn the fragments into a shell script we can source. + sed -E -i \ + -e 's:^([^ ]+) (.*)$:\1="\2":' \ + "${d}"/* || die + + # Generate the init.d script by assembling the fragments from above. + local f qcpu package interpreter magic mask + cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die + for f in "${d}"/qemu-* ; do + source "${f}" + + # Normalize the cpu logic like we do in the init.d for the native cpu. + qcpu=${package#qemu-} + case ${qcpu} in + arm*) qcpu="arm";; + mips*) qcpu="mips";; + ppc*) qcpu="ppc";; + s390*) qcpu="s390";; + sh*) qcpu="sh";; + sparc*) qcpu="sparc";; + esac + + cat <>"${out}" + if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then + echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register + fi +EOF + + echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" + + done + cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die +} + +src_install() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" + emake DESTDIR="${ED}" install + + # Install binfmt handler init script for user targets. + generate_initd + doinitd "${T}/qemu-binfmt" + + # Install binfmt/qemu.conf. + insinto "/usr/share/qemu/binfmt.d" + doins "${T}/qemu.conf" + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + emake DESTDIR="${ED}" install + + # This might not exist if the test failed. #512010 + [[ -e check-report.html ]] && dohtml check-report.html + + if use kernel_linux; then + udev_newrules "${FILESDIR}"/65-kvm.rules-r1 65-kvm.rules + fi + + if use python; then + python_foreach_impl qemu_python_install + fi + fi + + cd "${S}/tools-build" + emake DESTDIR="${ED}" install + + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 + pushd "${ED}"/usr/bin >/dev/null + pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 + popd >/dev/null + + # Install config file example for qemu-bridge-helper + insinto "/etc/qemu" + doins "${FILESDIR}/bridge.conf" + + cd "${S}" + dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt + newdoc pc-bios/README README.pc-bios + + if [[ -n ${softmmu_targets} ]]; then + # Remove SeaBIOS since we're using the SeaBIOS packaged one + rm "${ED}/usr/share/qemu/bios.bin" + rm "${ED}/usr/share/qemu/bios-256k.bin" + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../seabios/bios.bin /usr/share/qemu/bios.bin + dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin + fi + + # Remove vgabios since we're using the seavgabios packaged one + rm "${ED}/usr/share/qemu/vgabios.bin" + rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" + rm "${ED}/usr/share/qemu/vgabios-qxl.bin" + rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" + rm "${ED}/usr/share/qemu/vgabios-virtio.bin" + rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + # PPC64 loads vgabios-stdvga + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc64; then + dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin + dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin + dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin + dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin + dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin + dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin + fi + + # Remove sgabios since we're using the sgabios packaged one + rm "${ED}/usr/share/qemu/sgabios.bin" + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin + fi + + # Remove iPXE since we're using the iPXE packaged one + rm "${ED}"/usr/share/qemu/pxe-*.rom + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom + dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom + dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom + dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom + dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom + dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom + fi + fi + + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +firmware_abi_change() { + local pv + for pv in ${REPLACING_VERSIONS}; do + if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then + return 0 + fi + done + return 1 +} + +pkg_postinst() { + if [[ -n ${softmmu_targets} ]] && use kernel_linux; then + udev_reload + fi + + fcaps cap_net_admin /usr/libexec/qemu-bridge-helper + + DISABLE_AUTOFORMATTING=true + readme.gentoo_print_elog + + if use pin-upstream-blobs && firmware_abi_change; then + ewarn "This version of qemu pins new versions of firmware blobs:" + ewarn " $(best_version sys-firmware/edk2-ovmf)" + ewarn " $(best_version sys-firmware/ipxe)" + ewarn " $(best_version sys-firmware/seabios)" + ewarn " $(best_version sys-firmware/sgabios)" + ewarn "This might break resume of hibernated guests (started with a different" + ewarn "firmware version) and live migration to/from qemu versions with different" + ewarn "firmware. Please (cold) restart all running guests. For functional" + ewarn "guest migration ensure that all" + ewarn "hosts run at least" + ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." + fi +} + +pkg_info() { + echo "Using:" + echo " $(best_version app-emulation/spice-protocol)" + echo " $(best_version sys-firmware/edk2-ovmf)" + if has_version 'sys-firmware/edk2-ovmf[binary]'; then + echo " USE=binary" + else + echo " USE=''" + fi + echo " $(best_version sys-firmware/ipxe)" + echo " $(best_version sys-firmware/seabios)" + if has_version 'sys-firmware/seabios[binary]'; then + echo " USE=binary" + else + echo " USE=''" + fi + echo " $(best_version sys-firmware/sgabios)" +} diff --git a/app-emulation/qemu/qemu-9999.ebuild b/app-emulation/qemu/qemu-9999.ebuild index ef5e44d1ccb7..2df4a751f826 100644 --- a/app-emulation/qemu/qemu-9999.ebuild +++ b/app-emulation/qemu/qemu-9999.ebuild @@ -57,7 +57,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE} qemu_softmmu_targets_ppc? ( fdt ) qemu_softmmu_targets_ppc64? ( fdt ) sdl2? ( sdl ) - static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio ) + static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio !snappy ) virtfs? ( xattr ) vte? ( gtk )" @@ -139,7 +139,7 @@ SOFTMMU_TOOLS_DEPEND=" ) seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) - snappy? ( app-arch/snappy:=[static-libs(+)] ) + snappy? ( app-arch/snappy ) spice? ( >=app-emulation/spice-protocol-0.12.3 >=app-emulation/spice-0.12.0[static-libs(+)] -- cgit v1.2.3