diff options
author | 2014-11-08 18:11:52 +0000 | |
---|---|---|
committer | 2014-11-08 18:11:52 +0000 | |
commit | 50481261de4ad4c58bdf6d3cb2c2a5757ef09e1c (patch) | |
tree | b2c530d5d78d2e5fb3b70590ad1b56e7d245ca9c /app-emulation | |
parent | Stable for x86, wrt bug #528440 (diff) | |
download | historical-50481261de4ad4c58bdf6d3cb2c2a5757ef09e1c.tar.gz historical-50481261de4ad4c58bdf6d3cb2c2a5757ef09e1c.tar.bz2 historical-50481261de4ad4c58bdf6d3cb2c2a5757ef09e1c.zip |
Remove old
Package-Manager: portage-2.2.8-r2/cvs/Linux x86_64
Manifest-Sign-Key: 0x7194459F
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/qemu/ChangeLog | 7 | ||||
-rw-r--r-- | app-emulation/qemu/Manifest | 34 | ||||
-rw-r--r-- | app-emulation/qemu/files/qemu-2.1.0-CVE-2014-5388.patch | 36 | ||||
-rw-r--r-- | app-emulation/qemu/qemu-2.1.0-r1.ebuild | 595 | ||||
-rw-r--r-- | app-emulation/qemu/qemu-2.1.1.ebuild | 597 | ||||
-rw-r--r-- | app-emulation/qemu/qemu-2.1.2.ebuild | 597 |
6 files changed, 20 insertions, 1846 deletions
diff --git a/app-emulation/qemu/ChangeLog b/app-emulation/qemu/ChangeLog index 0777ab99d553..f2310de0f5f0 100644 --- a/app-emulation/qemu/ChangeLog +++ b/app-emulation/qemu/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-emulation/qemu # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.304 2014/11/08 18:09:33 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.305 2014/11/08 18:11:51 ago Exp $ + + 08 Nov 2014; Agostino Sarubbo <ago@gentoo.org> + -files/qemu-2.1.0-CVE-2014-5388.patch, -qemu-2.1.0-r1.ebuild, + -qemu-2.1.1.ebuild, -qemu-2.1.2.ebuild: + Remove old 08 Nov 2014; Agostino Sarubbo <ago@gentoo.org> qemu-2.1.2-r1.ebuild: Stable for x86, wrt bug #527088 diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest index a76e4cfb7b3d..db2ee914ccae 100644 --- a/app-emulation/qemu/Manifest +++ b/app-emulation/qemu/Manifest @@ -4,37 +4,31 @@ Hash: SHA256 AUX 65-kvm.rules 40 SHA256 c16a8dc7855880b2651f1a3ff488ecc54d4ac1036c71fffd5007021d8d18a7c5 SHA512 98aad2a2f212a7ac0ee5b60a9c92744fa462bce5f26594845c7a31d692aaaca2d52cb57bdbede7dfc60b9862c2a6510665dbb03215d5cf76e62516a283decdd6 WHIRLPOOL 937de93a23930f6b8533f0c3e0dd249c99ddf7d54446dea857607266ac0a4b435c5b4a52b2986b138bace9c0a7ade66f94116b38e2bc4767ead54bd11baf0920 AUX bridge.conf 454 SHA256 a51850dd39923f3482e4c575b48ad9fef9c9ebb2f2176225da399b79ce48c69d SHA512 a907ee86b81a1b61033bb7621ded65112504131ef7b698c53e4014b958ee6fc79e66f63069015a01e41362cb70a7d0ed26dd9a03033cf776f4846f0e1f8f1533 WHIRLPOOL 8fcbd4abf9b8f7ca3d16fe0eaf17196ebf708dfecf85ce0f020e0de22b64905114f7b310f361826c81bb961c6b1bbbf984bff1e595bb949993b8966ccb222c35 AUX qemu-1.7.0-cflags.patch 300 SHA256 8f35e55c4bae93e82f9580eabe2d6a2d4660bd05343e1f4e6c33815deeede91e SHA512 54446cb555b623b2306f8a323713e4dfb1b8b7bbf3af3771d5b62e164e0672cc21cbe44f08ca8b58052523e8d629e16355a44ebb544a999a44d11ac3af671f1c WHIRLPOOL b903b4abefeeb09a2ab2d1ee224de5d3694f99f50aacfe33882fce0c1c87c23dae4d57b001d1c35cc96fffa93d43fac4a8ab30a3e45fe1f380580162c0332e78 -AUX qemu-2.1.0-CVE-2014-5388.patch 1093 SHA256 df7c11ffb519f9a4c0db177359c5fe9772d5463fbd61d29905b8177e598d6887 SHA512 1f0c4b5b306f85a9a796b906cdd79106ea87a07217aee5b84ac45db0235440b55484591eeb4d0c05fbae6011879ac957304e82cb8a7b58ee77c550e32602367f WHIRLPOOL 33a09191ba765f72764ce5396e9a14c8f900efaf7e1707d535cadca38c46bf0dde0e99f6e8f0f37bd58ae512049edf78977976678088a1dc4d26f544e90cfc29 AUX qemu-2.1.1-readlink-self.patch 2933 SHA256 3133ec1a0f0126d3362c9420602a1fdfc76fafacac8b41f5bd755e7542ee4188 SHA512 7ee06e119007e6dc08f254cbfdcc6de1c914181f60e69434190fe507a80b7d0f9e8682f0213d447481f39e145fcb0be2e118516238addb5c4326533fc0db143f WHIRLPOOL 54edcb4510546c69dedf78a2070f22e7ef2809b35a66dc2e5d356f2f1b22eea8baa5b17ed4a4d9860ee6b864fac92eb9d1bbb6daeb6e2d80e3cc702f32039996 AUX qemu-2.1.2-vnc-sanitize-bits.patch 1279 SHA256 ef1e748fd9ffa0eb8ef412e6ea3cc96522e0ca91cf7201e6702d260ca50cbac5 SHA512 7e1a744928eb8edb76b18e58cf94da38ad1030f49ceb38f5e081d852573f8f314f998639c8e97fee27a53f51abe495b27406daa02b670a620ab2db165a47429e WHIRLPOOL bc024286739b56038bfebd6c2ad71addd9565a833f21a7a48cadbe7403c3e93c889cb2223d044448634cc93b6dc45a268299ea1b5b18c09b3477bb6e12fb0506 AUX qemu-9999-cflags.patch 347 SHA256 fe3bcbe83e81225b2c722578a0a976fcb724419d5208bbd6d02fb543e80b7e12 SHA512 e1b8be744170d61a2155b23a8394db01f8af6dc70ec033e71b2ff46f72975704836d42b96d7904e5d462289c5f8f24317f2fb28698f18a77ab1de02829e585eb WHIRLPOOL 2d972c7e40292f424fd37a4c1af04d2be095c215211ec2e1d15d8457df553342ffc02a7d39985f817fbbf5342e422d30e439c35a925341cf9b852ca7ff15a308 AUX qemu-9999-virtfs-proxy-helper-accept.patch 973 SHA256 91cc9e024aa09ea3dd23ec52c561047656acc89f0ad0d5ddccce354c1ac4d282 SHA512 031cb1c35b479b18032f56a07fa2fa6d392a7f0919acd3636bf122ab7f75dcfbb5fc0e26e18a8a31a9888409f81c2e08438a1af999232418d940167c5031a92b WHIRLPOOL ea4dc08230289a147fd55d0bd9e32896cd4491130084fc45b4043f41caf611f07d4587cc485e6d25ba3f6fbc66939ed8faf3c2017bf33ab10e1885277fa3f6ff AUX qemu-binfmt.initd-r1 8078 SHA256 2560f1d12374a2dea74e18365ac3d759c2eab35eb9a77b989e1bb8346d9bc3f8 SHA512 82d8ebdb5a4c452f03281c28f074ea52acfb730f1c3ddf68de2ce496c7ca23fd379041948371b021355f00f9c260383fdecf47218ddf2764ab75d6ec8a7a2715 WHIRLPOOL a0f54e133fbda2fd050ef8168fee676a763bb94a890f8c1d99d44e37e4a29322d513d9f5ddad9247f44e3ee0ac779050a3b06cf909678fdfb9f46777701de492 AUX qemu-kvm-1.4 68 SHA256 8b1adf198129f001e75a2311fc420c168094d1084d2163cdf6a32b3b23c96137 SHA512 706fab4d155c410acc292e67fb354ce7dcd17f7e33f2ca8c9c44035ea128f8d36f89e27cf87ebe22721f5676be9e7f2ae5484fd000183c8ffd7854e02eb3d120 WHIRLPOOL ef795330b592cef8e3d92f52a77eb77a671e6aa1a47d07531917b5c1c09e72e5df1a44aea939b086e0a3c5ef2a5cea9223556a46ceae73e55300475c42f07067 -DIST qemu-2.1.0.tar.bz2 23563306 SHA256 397e23184f4bf613589a8fe0c6542461dc2afdf17ed337e97e6fd2f31e8f8802 SHA512 8c00fd61432420229d762fa2ccf91cb8cec20206e2ec02ab2df13c6b3b9de7605fbfacb0fadd21f20f13c1de4c5216d8b11538738c0d0e5094582ded7c668f2e WHIRLPOOL 9d28aab8e20a5a60e85709d7a192a45425605693e54452f54decd65ecc77b504f1bc6ff60f5e9428314fb04911f966753f39a189adc8aa85776fd3c49b5a6858 -DIST qemu-2.1.1.tar.bz2 23567029 SHA256 be57bac8a8a1b47d76eecaa58b7eda390b7be8e5fdcbecfdf1a174380fc493e9 SHA512 4307b4d3d1227d69007391d87e1a3936dfbf188bbf512a0d97fbfdb475e7bf74593d5c5578b4e3aee396caa654a50ae3c132043087c1da78c182dad91b322295 WHIRLPOOL a1ff00a6f21e6667db87581f5975775c51ec0ef703ee6715ee8cc0b3cdca8b1c08607abfda956e8da2daa7be4f794e8f693f23d6fd15981c5c50b98388b0418d DIST qemu-2.1.2.tar.bz2 23563255 SHA256 fd10f5e45cf5a736fa5a3e1c279ae9821534e700beb7d1aab88a07648a394885 SHA512 73ef758c82b23eec649c807bee8937d7fbf267278f7777adbdb22b738672543b826d211a4b523f38cee3e2b01f05ccf40a75756fc19c911362988d8e86d5cd58 WHIRLPOOL 5703d0aa8bb4366bb7aeb44fa4f3d1b54f188de42cd8c82e894584f627802b80a3dde1aa3b15fe8602a1891ec61ac66b3cd44ec031385cca88768f375c15b554 -EBUILD qemu-2.1.0-r1.ebuild 18294 SHA256 a45c3f14dd0cfbcda427a0ef2d043c1d5ad9afd9b15759f4c0629ed297ce9832 SHA512 0aec2867cf75d14e2b6f2a8b79a0c2a58d4cf7032a83c56a49893ecdf741d24de2960378694d47565687ec75a11df546250b603179228c826d673bfd8b7700a9 WHIRLPOOL ec71357433a41e7e58102b64f1e51b1f19260300b1d291a1308942e66654e92ff0c55b9c307467573add51f5359b2286e5fd4448f86616da633d87cb65eba876 -EBUILD qemu-2.1.1.ebuild 18302 SHA256 921006c0e700885dbd8d0ffcf593213005e4b3766726ac819fc1b1f954463e79 SHA512 1243b9cd79b3e1b505073ebb7f848f62a3864eac3e853aedba0c6137225224cf311168c64714573064d28088cf2049a2b4f25d7998d6bfbbe87f85944ca6d941 WHIRLPOOL fb4987f902026f07747366e6e00f0644cddb23220405e752d92f86d86f3d0f61f7329f576ab3fba140704cc558c33914d66d2976013649aaacd3ef2105fec309 EBUILD qemu-2.1.2-r1.ebuild 18369 SHA256 757ae230ccc08a3d805cd81381e19c3fd965aa3a7386cd5e8bb8f5a9d288d452 SHA512 48cb0c8f2dd40c83b71c5b7be49170fddb05bbee8ad80b8237b4f29f6cbe9882f7d0ec23bba3c39e3c05e91c47a52520dde126d74ec6526489a2c948cf9cafac WHIRLPOOL 83a2bdd24137cfcdc2cbaf8bedc6f9bbb3369e82de3c70ab974931f0b315725b82094f0cff07a43c45c494aca1a86bbfd3896c94d1207653173accfa728c64e5 -EBUILD qemu-2.1.2.ebuild 18304 SHA256 9662ee4d9b088f679ebba7dec085fd376a294df085a2caba7c5967a7e3790d28 SHA512 6761e589170fee9e05b112e278f5983ec5c4f4e5de51efd6b8aec08b8f986d0494e35223049d6e22a28124da758c2abeb37b6213388a884e36010e5aa2be9815 WHIRLPOOL 71e6a16e009ff826be8881313f85276f79b07ceae27fc71e4b71b4ba5ff258600c6ed8b47aa21ea136ff3c19fd5f1edaeae6fdaaa6af62cb8f8e2831355f4e8d EBUILD qemu-9999.ebuild 18250 SHA256 8d82ea3f78994e9c51500c9e77cfdf2aed0c4fb9c02be23b75ff388e46365e40 SHA512 746f194f274b253e43ffbbdaf1b9f3edc694a50aca44ccca9a87bcc73cdf89004bffa04f3073a4987d2e926c57ec784f9e7d809f53acac57dfc007dc6e7dc086 WHIRLPOOL 3dd569c40d450029d3e1b757e540ce6bff912e99cbb60c431805af202669fc75fd33ee1e91cd627e1992cf1194bf300924df6c5296b3d8135f80e778356f9b72 -MISC ChangeLog 50205 SHA256 e33f6f96b9283e5a9de1f127a102af31b69f58573823fb9aa5be85aa3200421e SHA512 e1945abba43547be31746bf275d259de98bd6922786861dda084b7c548b88dde3b929ed558eb021de6e88ffd42d659afae0ae92875f5abd422ea4a919163edef WHIRLPOOL 3d667237ae56ad29ff2d20a4b29eea15653d49862d9aef066db0d22a423a2e464dac004228f366831ca5217041e488f0beba1cf1950f19f90ce6ea9b3a9f782a +MISC ChangeLog 50374 SHA256 01c6f2c99b5a9846d0335956408daa5e5df08830722ba4e0430523fe1dcbdca0 SHA512 4ee7074b28e5f5ebd4a3f2aff94843c848c8d9f56ac157b58793137134c205c9018edd8342d0b7c59c521ae07cf16ec4db667f6bb5feba03acf5fd7bfbb1c3b0 WHIRLPOOL 47f58bb45036b9830e2a8179f0b8f1a822d4607d41b7c6d16bd103bbdf0c4b1a9ad37f6842f3be297d52c8ee192f9dd25aac8d5469309fcd9a6b56071acc45f3 MISC metadata.xml 3774 SHA256 45d220d5c3fedecb5c318e2ab1fa796391f5fd3db09e4ef218b3bc7cb3cb10e1 SHA512 90b16206b5398b4044132d930b417372e1d305a93b062c895bc3b46ae64a19aa96d2471b5838f960cca7c6c30ce58571f332731f02eaeee17e4204469c5d6330 WHIRLPOOL f5498b8cb14aeeacdfd1da30c26ceca282bba3042a6288496d624d91c3c26c1bed34c42374db04e06378c8efd78010d3bef76c41c1aa529ccf17cec513ed1fa8 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQIcBAEBCAAGBQJUXlxeAAoJELp701BxlEWfIccQAL0pl9nc3x/bow2YtHX2YgTT -7+Z0HqS+uZKsYOl5/UDNj6oA2LOos2IYAYje9UouhacUwCIQZJDJMQOQFD7Rq5pG -ucjCDX8p91MOVEShnDUng4EYCg4e2pLnmg8Zl/a2Q1M27jkjfCxRw39FS7GoOJ6L -oPmGTW48gUJPgo3zMCQ8Br5z3WIWTof+Asrn7vLvJ5l8gnB3NP5UrPM+enbzRBY0 -9QvzjH0a9cYaxl+GYO9UzFExZnFv9ro/SV/0ly+jZbXDxERUCz27FKHYCSrgR+zu -w7G0864VLLu/K318MZNCyUO7piZBwjs7jHGvCFzMCfa5eTQrdnuPT1AruSUmG0Nh -p7Kp/O48kWWpQIxYMLg/Kd92pQunbXx0miRGOUS2F7803Q2XxgLJ2v5tJlLt/KCG -dR5CMzbifOddAsDlXpZq+pN2TGEbbT49qaHEbdbbucZjOpAdOK7JHCIN2vlmPS9G -4QWDZLfFdBuXZzs/pSI2dh5exlUpRX/wffi8S3ukY684hT8ddEPDNhPhYaGz5cot -yPchBmaw11ZKkdL129RSUV1xpCBeucJ9ujG7PoIavdYAXHdPiXP3etxtXDO5EMX/ -DPEARxG8osFrJ9jIiWXB5qzd04b22iw6Jj+m4jkiHvYPHF72uVvfZs/yPrtz51Sy -OMgn9dPRJW/7sG6fywDA -=qCp+ +iQIcBAEBCAAGBQJUXlzoAAoJELp701BxlEWfFlQP/1UMCVgSDJQmjQC9UJSQOUzF +CXd+lVCx+P+vaQXFJ1N2rT5J+5Jl6sCrBT0kKA9HxwjTXbZnSbutSjceM3mUk+r9 +WUuZBA43SWXgl0SGs+xlGcTYTIzA5j0IBNbiAw0SfiQWF6UsAjVR5GZybDS2fZfF +18CtmZBUWToStySfz1um3+5DtwMWwfsu0hIBWrBgPLf014qt2rN+J/jfI9RPbbTF +fGg03ZlPdCXIMlqWqSCdXDigQiWKmzTn8EwcefNO/Bkap+TcNs8w55K/sFA9gLwf +6tE+ZJurksLgGuHkrdVe5JLxNWYEh3BMjX3kjWROZq3/JrOEmJqP28mjd1sVtYTN +Z6xzZyZu4NM7ONmZ8SJ+ZWaw7dnzRrtGwlACXH89aeGfewJdfklVJUf1QrgMmINa +wVsYALz6iv+PpIcHxR4RyBp+HnzaRWdnknv+2L+V1B/fO5mTiyuGiQXUgrpQ0z1t +gpjfVdOLBhgqikqDj16AJ7Wgs09zD0krMaYmDMJZtMoHk8thlmw6iwX9g3mk9QAY +p4ahqWO3Sz9E5nwvwHk6fAhHaCol62vpgw22W85xtC7PjyEvXG992GKsXIhYsRFy +5FT6j2z9vdC1ARsshgxHqbgssVge5aK8uDqlsevYAV+/hrelfCKS3ZlX+d4VKYYl +iGZAIim7WWI5F5dCnByg +=7hQG -----END PGP SIGNATURE----- diff --git a/app-emulation/qemu/files/qemu-2.1.0-CVE-2014-5388.patch b/app-emulation/qemu/files/qemu-2.1.0-CVE-2014-5388.patch deleted file mode 100644 index 26a012bef7e8..000000000000 --- a/app-emulation/qemu/files/qemu-2.1.0-CVE-2014-5388.patch +++ /dev/null @@ -1,36 +0,0 @@ -https://bugs.gentoo.org/520688 - -From fa365d7cd11185237471823a5a33d36765454e16 Mon Sep 17 00:00:00 2001 -From: Gonglei <arei.gonglei@huawei.com> -Date: Wed, 20 Aug 2014 13:52:30 +0800 -Subject: [PATCH] pcihp: fix possible array out of bounds - -Prevent out-of-bounds array access on -acpi_pcihp_pci_status. - -Signed-off-by: Gonglei <arei.gonglei@huawei.com> -Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> -Reviewed-by: Michael S. Tsirkin <mst@redhat.com> -Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -Cc: qemu-stable@nongnu.org -Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> ---- - hw/acpi/pcihp.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c -index fae663a..34dedf1 100644 ---- a/hw/acpi/pcihp.c -+++ b/hw/acpi/pcihp.c -@@ -231,7 +231,7 @@ static uint64_t pci_read(void *opaque, hwaddr addr, unsigned int size) - uint32_t val = 0; - int bsel = s->hotplug_select; - -- if (bsel < 0 || bsel > ACPI_PCIHP_MAX_HOTPLUG_BUS) { -+ if (bsel < 0 || bsel >= ACPI_PCIHP_MAX_HOTPLUG_BUS) { - return 0; - } - --- -2.0.0 - diff --git a/app-emulation/qemu/qemu-2.1.0-r1.ebuild b/app-emulation/qemu/qemu-2.1.0-r1.ebuild deleted file mode 100644 index 9767a4f9f336..000000000000 --- a/app-emulation/qemu/qemu-2.1.0-r1.ebuild +++ /dev/null @@ -1,595 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-2.1.0-r1.ebuild,v 1.6 2014/09/13 17:07:04 ago Exp $ - -EAPI=5 - -PYTHON_COMPAT=( python{2_6,2_7} ) -PYTHON_REQ_USE="ncurses,readline" - -inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \ - user udev fcaps readme.gentoo pax-utils - -BACKPORTS= - -if [[ ${PV} = *9999* ]]; then - EGIT_REPO_URI="git://git.qemu.org/qemu.git" - inherit git-2 - SRC_URI="" - KEYWORDS="" -else - SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2 - ${BACKPORTS:+ - http://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz}" - KEYWORDS="amd64 ~ppc ~ppc64 x86 ~x86-fbsd" -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 +caps +curl debug +fdt glusterfs \ -gtk infiniband iscsi +jpeg \ -kernel_linux kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs -+png pulseaudio python \ -rbd sasl +seccomp sdl selinux smartcard snappy spice ssh static static-softmmu \ -static-user systemtap tci test +threads tls usb usbredir +uuid vde +vhost-net \ -virtfs +vnc xattr xen xfs" - -COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips -mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64 unicore32 -x86_64" -IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb xtensa xtensaeb" -IUSE_USER_TARGETS="${COMMON_TARGETS} armeb mipsn32 mipsn32el ppc64abi32 sparc32plus" - -use_targets=" - $(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) - $(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) -" -IUSE+=" ${use_targets}" - -# Require at least one softmmu or user target. -# Block USE flag configurations known to not work. -REQUIRED_USE="|| ( ${use_targets} ) - python? ( ${PYTHON_REQUIRED_USE} ) - qemu_softmmu_targets_arm? ( fdt ) - qemu_softmmu_targets_microblaze? ( fdt ) - qemu_softmmu_targets_ppc? ( fdt ) - qemu_softmmu_targets_ppc64? ( fdt ) - static? ( static-softmmu static-user ) - static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk ) - virtfs? ( xattr )" - -# 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. -COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)] - sys-libs/zlib[static-libs(+)] - xattr? ( sys-apps/attr[static-libs(+)] )" -SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND} - >=x11-libs/pixman-0.28.0[static-libs(+)] - aio? ( dev-libs/libaio[static-libs(+)] ) - caps? ( sys-libs/libcap-ng[static-libs(+)] ) - curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) - fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] ) - glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) - infiniband? ( sys-infiniband/librdmacm[static-libs(+)] ) - jpeg? ( virtual/jpeg[static-libs(+)] ) - lzo? ( dev-libs/lzo:2[static-libs(+)] ) - ncurses? ( sys-libs/ncurses[static-libs(+)] ) - nfs? ( >=net-fs/libnfs-1.9.3[static-libs(+)] ) - numa? ( sys-process/numactl[static-libs(+)] ) - png? ( media-libs/libpng[static-libs(+)] ) - rbd? ( sys-cluster/ceph[static-libs(+)] ) - sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) - sdl? ( >=media-libs/libsdl-1.2.11[static-libs(+)] ) - seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) - snappy? ( app-arch/snappy[static-libs(+)] ) - spice? ( >=app-emulation/spice-0.12.0[static-libs(+)] ) - ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] ) - tls? ( net-libs/gnutls[static-libs(+)] ) - usb? ( >=dev-libs/libusb-1.0.18[static-libs(+)] ) - uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] ) - vde? ( net-misc/vde[static-libs(+)] ) - xfs? ( sys-fs/xfsprogs[static-libs(+)] )" -USER_LIB_DEPEND="${COMMON_LIB_DEPEND}" -X86_FIRMWARE_DEPEND=" - >=sys-firmware/ipxe-1.0.0_p20130624 - pin-upstream-blobs? ( - ~sys-firmware/seabios-1.7.5 - ~sys-firmware/sgabios-0.1_pre8 - ~sys-firmware/vgabios-0.7a - ) - !pin-upstream-blobs? ( - sys-firmware/seabios - sys-firmware/sgabios - sys-firmware/vgabios - )" -RDEPEND="!static-softmmu? ( ${SOFTMMU_LIB_DEPEND//\[static-libs(+)]} ) - !static-user? ( ${USER_LIB_DEPEND//\[static-libs(+)]} ) - qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) - qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) - accessibility? ( app-accessibility/brltty ) - alsa? ( >=media-libs/alsa-lib-1.0.13 ) - bluetooth? ( net-wireless/bluez ) - gtk? ( - x11-libs/gtk+:3 - x11-libs/vte:2.90 - ) - iscsi? ( net-libs/libiscsi ) - opengl? ( virtual/opengl ) - pulseaudio? ( media-sound/pulseaudio ) - python? ( ${PYTHON_DEPS} ) - sdl? ( media-libs/libsdl[X] ) - selinux? ( sec-policy/selinux-qemu ) - smartcard? ( dev-libs/nss !app-emulation/libcacard ) - spice? ( >=app-emulation/spice-protocol-0.12.3 ) - systemtap? ( dev-util/systemtap ) - usbredir? ( >=sys-apps/usbredir-0.6 ) - virtfs? ( sys-libs/libcap ) - xen? ( app-emulation/xen-tools )" -DEPEND="${RDEPEND} - 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-softmmu? ( ${SOFTMMU_LIB_DEPEND} ) - static-user? ( ${USER_LIB_DEPEND} ) - test? ( - dev-libs/glib[utils] - sys-devel/bc - )" - -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/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-or32 - 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.\n -For AMD CPUs the module is called 'kvm-amd'\n -For Intel CPUs the module is called 'kvm-intel'\n -Please review /etc/conf.d/modules for how to load these\n\n -Make sure your user is in the 'kvm' group\n -Just run 'gpasswd -a <USER> kvm', then have <USER> re-login." - -qemu_support_kvm() { - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \ - use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \ - use qemu_softmmu_targets_s390x; then - return 0 - fi - - return 1 -} - -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 - CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL" - 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 -} - -src_prepare() { - # 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 - - # Cheap hack to disable gettext .mo generation. - use nls || rm -f po/*.po - - epatch "${FILESDIR}"/qemu-1.7.0-cflags.patch - epatch "${FILESDIR}"/${P}-CVE-2014-5388.patch #520688 - [[ -n ${BACKPORTS} ]] && \ - EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \ - epatch - - # Fix ld and objcopy being called directly - tc-export AR LD OBJCOPY - - # Verbose builds - MAKEOPTS+=" V=1" - - epatch_user -} - -## -# 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=$2 - local static_flag="static-${buildtype}" - - # 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}" - - 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 - --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 as the default configure - # options will autoprobe and try to link in a bunch of unused junk. - conf_softmmu() { - if [[ ${buildtype} == "user" ]] ; then - echo "--disable-${2:-$1}" - else - use_enable "$@" - fi - } - conf_opts+=( - $(conf_softmmu accessibility brlapi) - $(conf_softmmu aio linux-aio) - $(conf_softmmu bluetooth bluez) - $(conf_softmmu caps cap-ng) - $(conf_softmmu curl) - $(conf_softmmu fdt) - $(conf_softmmu glusterfs) - $(conf_softmmu gtk) - $(conf_softmmu infiniband rdma) - $(conf_softmmu iscsi libiscsi) - $(conf_softmmu jpeg vnc-jpeg) - $(conf_softmmu kernel_linux kvm) - $(conf_softmmu lzo) - $(conf_softmmu ncurses curses) - $(conf_softmmu nfs libnfs) - $(conf_softmmu numa) - $(conf_softmmu opengl glx) - $(conf_softmmu png vnc-png) - $(conf_softmmu rbd) - $(conf_softmmu sasl vnc-sasl) - $(conf_softmmu sdl) - $(conf_softmmu seccomp) - $(conf_softmmu smartcard smartcard-nss) - $(conf_softmmu snappy) - $(conf_softmmu spice) - $(conf_softmmu ssh libssh2) - $(conf_softmmu tls quorum) - $(conf_softmmu tls vnc-tls) - $(conf_softmmu tls vnc-ws) - $(conf_softmmu usb libusb) - $(conf_softmmu usbredir usb-redir) - $(conf_softmmu uuid) - $(conf_softmmu vde) - $(conf_softmmu vhost-net) - $(conf_softmmu virtfs) - $(conf_softmmu vnc) - $(conf_softmmu xen) - $(conf_softmmu xen xen-pci-passthrough) - $(conf_softmmu xfs xfsctl) - ) - - case ${buildtype} in - user) - conf_opts+=( - --enable-linux-user - --disable-system - --target-list="${user_targets}" - --disable-blobs - --disable-tools - ) - ;; - softmmu) - conf_opts+=( - --disable-linux-user - --enable-system - --target-list="${softmmu_targets}" - --with-system-pixman - --audio-drv-list="${audio_opts}" - ) - use gtk && conf_opts+=( --with-gtkabi=3.0 ) - ;; - esac - - # 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 - gcc-specs-pie && conf_opts+=( --enable-pie ) - fi - - einfo "./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_export_best - - 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 - - [[ -n ${softmmu_targets} ]] && \ - einfo "Building the following softmmu targets: ${softmmu_targets}" - - [[ -n ${user_targets} ]] && \ - einfo "Building the following user targets: ${user_targets}" - - if [[ -n ${softmmu_targets} ]]; then - mkdir "${S}/softmmu-build" - qemu_src_configure "softmmu" "${S}/softmmu-build" - fi - - if [[ -n ${user_targets} ]]; then - mkdir "${S}/user-build" - qemu_src_configure "user" "${S}/user-build" - fi -} - -src_compile() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - default - fi - - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - default - fi -} - -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/kvm_stat" - python_doscript "${S}/scripts/kvm/vmxcap" - python_doscript "${S}/scripts/qmp/qmp-shell" - python_doscript "${S}/scripts/qmp/qemu-ga-client" -} - -src_install() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - emake DESTDIR="${ED}" install - - # Install binfmt handler init script for user targets - newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt - 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_dorules "${FILESDIR}"/65-kvm.rules - fi - - if use python; then - python_foreach_impl qemu_python_install - fi - fi - - # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 - pushd "${ED}"/usr/bin >/dev/null - pax-mark m "${softmmu_bins[@]}" "${user_bins[@]}" - popd >/dev/null - - # Install config file example for qemu-bridge-helper - insinto "/etc/qemu" - doins "${FILESDIR}/bridge.conf" - - # Remove the docdir placed qmp-commands.txt - mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/docs/qmp/" - - cd "${S}" - dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt - newdoc pc-bios/README README.pc-bios - dodoc docs/qmp/*.txt - - # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin - fi - - # Remove vgabios since we're using the vgabios packaged one - if [[ -n ${softmmu_targets} ]]; then - 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-vmware.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin - dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin - dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin - dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin - dosym ../vgabios/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 - - qemu_support_kvm && readme.gentoo_create_doc -} - -pkg_postinst() { - if qemu_support_kvm; then - readme.gentoo_print_elog - ewarn "Migration from qemu-kvm instances and loading qemu-kvm created" - ewarn "save states has been removed starting with the 1.6.2 release" - ewarn - ewarn "It is recommended that you migrate any VMs that may be running" - ewarn "on qemu-kvm to a host with a newer qemu and regenerate" - ewarn "any saved states with a newer qemu." - ewarn - ewarn "qemu-kvm was the primary qemu provider in Gentoo through 1.2.x" - - if use x86 || use amd64; then - ewarn - ewarn "The /usr/bin/kvm and /usr/bin/qemu-kvm wrappers are no longer" - ewarn "installed. In order to use kvm acceleration, pass the flag" - ewarn "-enable-kvm when running your system target." - fi - fi - - fcaps cap_net_admin /usr/libexec/qemu-bridge-helper - if use virtfs && [ -n "${softmmu_targets}" ]; then - local virtfs_caps="cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_setgid,cap_mknod,cap_setuid" - fcaps ${virtfs_caps} /usr/bin/virtfs-proxy-helper - fi -} - -pkg_info() { - echo "Using:" - echo " $(best_version app-emulation/spice-protocol)" - 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/vgabios)" -} diff --git a/app-emulation/qemu/qemu-2.1.1.ebuild b/app-emulation/qemu/qemu-2.1.1.ebuild deleted file mode 100644 index 1c79bb688d52..000000000000 --- a/app-emulation/qemu/qemu-2.1.1.ebuild +++ /dev/null @@ -1,597 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-2.1.1.ebuild,v 1.5 2014/11/02 11:57:18 swift Exp $ - -EAPI=5 - -PYTHON_COMPAT=( python{2_6,2_7} ) -PYTHON_REQ_USE="ncurses,readline" - -inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \ - user udev fcaps readme.gentoo pax-utils - -BACKPORTS= - -if [[ ${PV} = *9999* ]]; then - EGIT_REPO_URI="git://git.qemu.org/qemu.git" - inherit git-2 - SRC_URI="" - KEYWORDS="" -else - SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2 - ${BACKPORTS:+ - http://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz}" - KEYWORDS="amd64 ~ppc ~ppc64 x86 ~x86-fbsd" -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 +caps +curl debug +fdt glusterfs \ -gtk infiniband iscsi +jpeg \ -kernel_linux kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs -+png pulseaudio python \ -rbd sasl +seccomp sdl selinux smartcard snappy spice ssh static static-softmmu \ -static-user systemtap tci test +threads tls usb usbredir +uuid vde +vhost-net \ -virtfs +vnc xattr xen xfs" - -COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips -mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64 unicore32 -x86_64" -IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb xtensa xtensaeb" -IUSE_USER_TARGETS="${COMMON_TARGETS} armeb mipsn32 mipsn32el ppc64abi32 sparc32plus" - -use_targets=" - $(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) - $(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) -" -IUSE+=" ${use_targets}" - -# Require at least one softmmu or user target. -# Block USE flag configurations known to not work. -REQUIRED_USE="|| ( ${use_targets} ) - ${PYTHON_REQUIRED_USE} - qemu_softmmu_targets_arm? ( fdt ) - qemu_softmmu_targets_microblaze? ( fdt ) - qemu_softmmu_targets_ppc? ( fdt ) - qemu_softmmu_targets_ppc64? ( fdt ) - static? ( static-softmmu static-user ) - static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk ) - virtfs? ( xattr )" - -# 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. -COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)] - sys-libs/zlib[static-libs(+)] - xattr? ( sys-apps/attr[static-libs(+)] )" -SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND} - >=x11-libs/pixman-0.28.0[static-libs(+)] - aio? ( dev-libs/libaio[static-libs(+)] ) - caps? ( sys-libs/libcap-ng[static-libs(+)] ) - curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) - fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] ) - glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) - infiniband? ( sys-infiniband/librdmacm[static-libs(+)] ) - jpeg? ( virtual/jpeg[static-libs(+)] ) - lzo? ( dev-libs/lzo:2[static-libs(+)] ) - ncurses? ( sys-libs/ncurses[static-libs(+)] ) - nfs? ( >=net-fs/libnfs-1.9.3[static-libs(+)] ) - numa? ( sys-process/numactl[static-libs(+)] ) - png? ( media-libs/libpng[static-libs(+)] ) - rbd? ( sys-cluster/ceph[static-libs(+)] ) - sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) - sdl? ( >=media-libs/libsdl-1.2.11[static-libs(+)] ) - seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) - snappy? ( app-arch/snappy[static-libs(+)] ) - spice? ( >=app-emulation/spice-0.12.0[static-libs(+)] ) - ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] ) - tls? ( net-libs/gnutls[static-libs(+)] ) - usb? ( >=dev-libs/libusb-1.0.18[static-libs(+)] ) - uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] ) - vde? ( net-misc/vde[static-libs(+)] ) - xfs? ( sys-fs/xfsprogs[static-libs(+)] )" -USER_LIB_DEPEND="${COMMON_LIB_DEPEND}" -X86_FIRMWARE_DEPEND=" - >=sys-firmware/ipxe-1.0.0_p20130624 - pin-upstream-blobs? ( - ~sys-firmware/seabios-1.7.5 - ~sys-firmware/sgabios-0.1_pre8 - ~sys-firmware/vgabios-0.7a - ) - !pin-upstream-blobs? ( - sys-firmware/seabios - sys-firmware/sgabios - sys-firmware/vgabios - )" -CDEPEND="!static-softmmu? ( ${SOFTMMU_LIB_DEPEND//\[static-libs(+)]} ) - !static-user? ( ${USER_LIB_DEPEND//\[static-libs(+)]} ) - qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) - qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) - accessibility? ( app-accessibility/brltty ) - alsa? ( >=media-libs/alsa-lib-1.0.13 ) - bluetooth? ( net-wireless/bluez ) - gtk? ( - x11-libs/gtk+:3 - x11-libs/vte:2.90 - ) - iscsi? ( net-libs/libiscsi ) - opengl? ( virtual/opengl ) - pulseaudio? ( media-sound/pulseaudio ) - python? ( ${PYTHON_DEPS} ) - sdl? ( media-libs/libsdl[X] ) - smartcard? ( dev-libs/nss !app-emulation/libcacard ) - spice? ( >=app-emulation/spice-protocol-0.12.3 ) - systemtap? ( dev-util/systemtap ) - usbredir? ( >=sys-apps/usbredir-0.6 ) - virtfs? ( sys-libs/libcap ) - xen? ( app-emulation/xen-tools )" -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-softmmu? ( ${SOFTMMU_LIB_DEPEND} ) - static-user? ( ${USER_LIB_DEPEND} ) - test? ( - dev-libs/glib[utils] - sys-devel/bc - )" -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-qemu ) -" - -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/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-or32 - 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.\n -For AMD CPUs the module is called 'kvm-amd'\n -For Intel CPUs the module is called 'kvm-intel'\n -Please review /etc/conf.d/modules for how to load these\n\n -Make sure your user is in the 'kvm' group\n -Just run 'gpasswd -a <USER> kvm', then have <USER> re-login." - -qemu_support_kvm() { - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \ - use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \ - use qemu_softmmu_targets_s390x; then - return 0 - fi - - return 1 -} - -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 - CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL" - 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 -} - -src_prepare() { - # 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 - - # Cheap hack to disable gettext .mo generation. - use nls || rm -f po/*.po - - epatch "${FILESDIR}"/qemu-1.7.0-cflags.patch - epatch "${FILESDIR}"/${PN}-2.1.1-readlink-self.patch - [[ -n ${BACKPORTS} ]] && \ - EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \ - epatch - - # Fix ld and objcopy being called directly - tc-export AR LD OBJCOPY - - # Verbose builds - MAKEOPTS+=" V=1" - - epatch_user -} - -## -# 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=$2 - local static_flag="static-${buildtype}" - - # 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}" - - 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 - --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 as the default configure - # options will autoprobe and try to link in a bunch of unused junk. - conf_softmmu() { - if [[ ${buildtype} == "user" ]] ; then - echo "--disable-${2:-$1}" - else - use_enable "$@" - fi - } - conf_opts+=( - $(conf_softmmu accessibility brlapi) - $(conf_softmmu aio linux-aio) - $(conf_softmmu bluetooth bluez) - $(conf_softmmu caps cap-ng) - $(conf_softmmu curl) - $(conf_softmmu fdt) - $(conf_softmmu glusterfs) - $(conf_softmmu gtk) - $(conf_softmmu infiniband rdma) - $(conf_softmmu iscsi libiscsi) - $(conf_softmmu jpeg vnc-jpeg) - $(conf_softmmu kernel_linux kvm) - $(conf_softmmu lzo) - $(conf_softmmu ncurses curses) - $(conf_softmmu nfs libnfs) - $(conf_softmmu numa) - $(conf_softmmu opengl glx) - $(conf_softmmu png vnc-png) - $(conf_softmmu rbd) - $(conf_softmmu sasl vnc-sasl) - $(conf_softmmu sdl) - $(conf_softmmu seccomp) - $(conf_softmmu smartcard smartcard-nss) - $(conf_softmmu snappy) - $(conf_softmmu spice) - $(conf_softmmu ssh libssh2) - $(conf_softmmu tls quorum) - $(conf_softmmu tls vnc-tls) - $(conf_softmmu tls vnc-ws) - $(conf_softmmu usb libusb) - $(conf_softmmu usbredir usb-redir) - $(conf_softmmu uuid) - $(conf_softmmu vde) - $(conf_softmmu vhost-net) - $(conf_softmmu virtfs) - $(conf_softmmu vnc) - $(conf_softmmu xen) - $(conf_softmmu xen xen-pci-passthrough) - $(conf_softmmu xfs xfsctl) - ) - - case ${buildtype} in - user) - conf_opts+=( - --enable-linux-user - --disable-system - --target-list="${user_targets}" - --disable-blobs - --disable-tools - ) - ;; - softmmu) - conf_opts+=( - --disable-linux-user - --enable-system - --target-list="${softmmu_targets}" - --with-system-pixman - --audio-drv-list="${audio_opts}" - ) - use gtk && conf_opts+=( --with-gtkabi=3.0 ) - ;; - esac - - # 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 - gcc-specs-pie && conf_opts+=( --enable-pie ) - fi - - einfo "./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_export_best - - 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 - - [[ -n ${softmmu_targets} ]] && \ - einfo "Building the following softmmu targets: ${softmmu_targets}" - - [[ -n ${user_targets} ]] && \ - einfo "Building the following user targets: ${user_targets}" - - if [[ -n ${softmmu_targets} ]]; then - mkdir "${S}/softmmu-build" - qemu_src_configure "softmmu" "${S}/softmmu-build" - fi - - if [[ -n ${user_targets} ]]; then - mkdir "${S}/user-build" - qemu_src_configure "user" "${S}/user-build" - fi -} - -src_compile() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - default - fi - - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - default - fi -} - -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/kvm_stat" - python_doscript "${S}/scripts/kvm/vmxcap" - python_doscript "${S}/scripts/qmp/qmp-shell" - python_doscript "${S}/scripts/qmp/qemu-ga-client" -} - -src_install() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - emake DESTDIR="${ED}" install - - # Install binfmt handler init script for user targets - newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt - 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_dorules "${FILESDIR}"/65-kvm.rules - fi - - if use python; then - python_foreach_impl qemu_python_install - fi - fi - - # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 - pushd "${ED}"/usr/bin >/dev/null - pax-mark m "${softmmu_bins[@]}" "${user_bins[@]}" - popd >/dev/null - - # Install config file example for qemu-bridge-helper - insinto "/etc/qemu" - doins "${FILESDIR}/bridge.conf" - - # Remove the docdir placed qmp-commands.txt - mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/docs/qmp/" - - cd "${S}" - dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt - newdoc pc-bios/README README.pc-bios - dodoc docs/qmp/*.txt - - # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin - fi - - # Remove vgabios since we're using the vgabios packaged one - if [[ -n ${softmmu_targets} ]]; then - 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-vmware.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin - dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin - dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin - dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin - dosym ../vgabios/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 - - qemu_support_kvm && readme.gentoo_create_doc -} - -pkg_postinst() { - if qemu_support_kvm; then - readme.gentoo_print_elog - ewarn "Migration from qemu-kvm instances and loading qemu-kvm created" - ewarn "save states has been removed starting with the 1.6.2 release" - ewarn - ewarn "It is recommended that you migrate any VMs that may be running" - ewarn "on qemu-kvm to a host with a newer qemu and regenerate" - ewarn "any saved states with a newer qemu." - ewarn - ewarn "qemu-kvm was the primary qemu provider in Gentoo through 1.2.x" - - if use x86 || use amd64; then - ewarn - ewarn "The /usr/bin/kvm and /usr/bin/qemu-kvm wrappers are no longer" - ewarn "installed. In order to use kvm acceleration, pass the flag" - ewarn "-enable-kvm when running your system target." - fi - fi - - fcaps cap_net_admin /usr/libexec/qemu-bridge-helper - if use virtfs && [ -n "${softmmu_targets}" ]; then - local virtfs_caps="cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_setgid,cap_mknod,cap_setuid" - fcaps ${virtfs_caps} /usr/bin/virtfs-proxy-helper - fi -} - -pkg_info() { - echo "Using:" - echo " $(best_version app-emulation/spice-protocol)" - 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/vgabios)" -} diff --git a/app-emulation/qemu/qemu-2.1.2.ebuild b/app-emulation/qemu/qemu-2.1.2.ebuild deleted file mode 100644 index bafdfe9784ba..000000000000 --- a/app-emulation/qemu/qemu-2.1.2.ebuild +++ /dev/null @@ -1,597 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-2.1.2.ebuild,v 1.2 2014/11/02 11:57:18 swift Exp $ - -EAPI=5 - -PYTHON_COMPAT=( python{2_6,2_7} ) -PYTHON_REQ_USE="ncurses,readline" - -inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \ - user udev fcaps readme.gentoo pax-utils - -BACKPORTS= - -if [[ ${PV} = *9999* ]]; then - EGIT_REPO_URI="git://git.qemu.org/qemu.git" - inherit git-2 - SRC_URI="" - KEYWORDS="" -else - SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2 - ${BACKPORTS:+ - http://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz}" - KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" -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 +caps +curl debug +fdt glusterfs \ -gtk infiniband iscsi +jpeg \ -kernel_linux kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs -+png pulseaudio python \ -rbd sasl +seccomp sdl selinux smartcard snappy spice ssh static static-softmmu \ -static-user systemtap tci test +threads tls usb usbredir +uuid vde +vhost-net \ -virtfs +vnc xattr xen xfs" - -COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips -mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64 unicore32 -x86_64" -IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb xtensa xtensaeb" -IUSE_USER_TARGETS="${COMMON_TARGETS} armeb mipsn32 mipsn32el ppc64abi32 sparc32plus" - -use_targets=" - $(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) - $(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) -" -IUSE+=" ${use_targets}" - -# Require at least one softmmu or user target. -# Block USE flag configurations known to not work. -REQUIRED_USE="|| ( ${use_targets} ) - ${PYTHON_REQUIRED_USE} - qemu_softmmu_targets_arm? ( fdt ) - qemu_softmmu_targets_microblaze? ( fdt ) - qemu_softmmu_targets_ppc? ( fdt ) - qemu_softmmu_targets_ppc64? ( fdt ) - static? ( static-softmmu static-user ) - static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk ) - virtfs? ( xattr )" - -# 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. -COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)] - sys-libs/zlib[static-libs(+)] - xattr? ( sys-apps/attr[static-libs(+)] )" -SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND} - >=x11-libs/pixman-0.28.0[static-libs(+)] - aio? ( dev-libs/libaio[static-libs(+)] ) - caps? ( sys-libs/libcap-ng[static-libs(+)] ) - curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) - fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] ) - glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) - infiniband? ( sys-infiniband/librdmacm[static-libs(+)] ) - jpeg? ( virtual/jpeg[static-libs(+)] ) - lzo? ( dev-libs/lzo:2[static-libs(+)] ) - ncurses? ( sys-libs/ncurses[static-libs(+)] ) - nfs? ( >=net-fs/libnfs-1.9.3[static-libs(+)] ) - numa? ( sys-process/numactl[static-libs(+)] ) - png? ( media-libs/libpng[static-libs(+)] ) - rbd? ( sys-cluster/ceph[static-libs(+)] ) - sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) - sdl? ( >=media-libs/libsdl-1.2.11[static-libs(+)] ) - seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) - snappy? ( app-arch/snappy[static-libs(+)] ) - spice? ( >=app-emulation/spice-0.12.0[static-libs(+)] ) - ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] ) - tls? ( net-libs/gnutls[static-libs(+)] ) - usb? ( >=dev-libs/libusb-1.0.18[static-libs(+)] ) - uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] ) - vde? ( net-misc/vde[static-libs(+)] ) - xfs? ( sys-fs/xfsprogs[static-libs(+)] )" -USER_LIB_DEPEND="${COMMON_LIB_DEPEND}" -X86_FIRMWARE_DEPEND=" - >=sys-firmware/ipxe-1.0.0_p20130624 - pin-upstream-blobs? ( - ~sys-firmware/seabios-1.7.5 - ~sys-firmware/sgabios-0.1_pre8 - ~sys-firmware/vgabios-0.7a - ) - !pin-upstream-blobs? ( - sys-firmware/seabios - sys-firmware/sgabios - sys-firmware/vgabios - )" -CDEPEND="!static-softmmu? ( ${SOFTMMU_LIB_DEPEND//\[static-libs(+)]} ) - !static-user? ( ${USER_LIB_DEPEND//\[static-libs(+)]} ) - qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) - qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) - accessibility? ( app-accessibility/brltty ) - alsa? ( >=media-libs/alsa-lib-1.0.13 ) - bluetooth? ( net-wireless/bluez ) - gtk? ( - x11-libs/gtk+:3 - x11-libs/vte:2.90 - ) - iscsi? ( net-libs/libiscsi ) - opengl? ( virtual/opengl ) - pulseaudio? ( media-sound/pulseaudio ) - python? ( ${PYTHON_DEPS} ) - sdl? ( media-libs/libsdl[X] ) - smartcard? ( dev-libs/nss !app-emulation/libcacard ) - spice? ( >=app-emulation/spice-protocol-0.12.3 ) - systemtap? ( dev-util/systemtap ) - usbredir? ( >=sys-apps/usbredir-0.6 ) - virtfs? ( sys-libs/libcap ) - xen? ( app-emulation/xen-tools )" -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-softmmu? ( ${SOFTMMU_LIB_DEPEND} ) - static-user? ( ${USER_LIB_DEPEND} ) - test? ( - dev-libs/glib[utils] - sys-devel/bc - )" -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-qemu ) -" - -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/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-or32 - 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.\n -For AMD CPUs the module is called 'kvm-amd'\n -For Intel CPUs the module is called 'kvm-intel'\n -Please review /etc/conf.d/modules for how to load these\n\n -Make sure your user is in the 'kvm' group\n -Just run 'gpasswd -a <USER> kvm', then have <USER> re-login." - -qemu_support_kvm() { - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \ - use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \ - use qemu_softmmu_targets_s390x; then - return 0 - fi - - return 1 -} - -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 - CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL" - 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 -} - -src_prepare() { - # 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 - - # Cheap hack to disable gettext .mo generation. - use nls || rm -f po/*.po - - epatch "${FILESDIR}"/qemu-1.7.0-cflags.patch - epatch "${FILESDIR}"/${PN}-2.1.1-readlink-self.patch - [[ -n ${BACKPORTS} ]] && \ - EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \ - epatch - - # Fix ld and objcopy being called directly - tc-export AR LD OBJCOPY - - # Verbose builds - MAKEOPTS+=" V=1" - - epatch_user -} - -## -# 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=$2 - local static_flag="static-${buildtype}" - - # 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}" - - 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 - --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 as the default configure - # options will autoprobe and try to link in a bunch of unused junk. - conf_softmmu() { - if [[ ${buildtype} == "user" ]] ; then - echo "--disable-${2:-$1}" - else - use_enable "$@" - fi - } - conf_opts+=( - $(conf_softmmu accessibility brlapi) - $(conf_softmmu aio linux-aio) - $(conf_softmmu bluetooth bluez) - $(conf_softmmu caps cap-ng) - $(conf_softmmu curl) - $(conf_softmmu fdt) - $(conf_softmmu glusterfs) - $(conf_softmmu gtk) - $(conf_softmmu infiniband rdma) - $(conf_softmmu iscsi libiscsi) - $(conf_softmmu jpeg vnc-jpeg) - $(conf_softmmu kernel_linux kvm) - $(conf_softmmu lzo) - $(conf_softmmu ncurses curses) - $(conf_softmmu nfs libnfs) - $(conf_softmmu numa) - $(conf_softmmu opengl glx) - $(conf_softmmu png vnc-png) - $(conf_softmmu rbd) - $(conf_softmmu sasl vnc-sasl) - $(conf_softmmu sdl) - $(conf_softmmu seccomp) - $(conf_softmmu smartcard smartcard-nss) - $(conf_softmmu snappy) - $(conf_softmmu spice) - $(conf_softmmu ssh libssh2) - $(conf_softmmu tls quorum) - $(conf_softmmu tls vnc-tls) - $(conf_softmmu tls vnc-ws) - $(conf_softmmu usb libusb) - $(conf_softmmu usbredir usb-redir) - $(conf_softmmu uuid) - $(conf_softmmu vde) - $(conf_softmmu vhost-net) - $(conf_softmmu virtfs) - $(conf_softmmu vnc) - $(conf_softmmu xen) - $(conf_softmmu xen xen-pci-passthrough) - $(conf_softmmu xfs xfsctl) - ) - - case ${buildtype} in - user) - conf_opts+=( - --enable-linux-user - --disable-system - --target-list="${user_targets}" - --disable-blobs - --disable-tools - ) - ;; - softmmu) - conf_opts+=( - --disable-linux-user - --enable-system - --target-list="${softmmu_targets}" - --with-system-pixman - --audio-drv-list="${audio_opts}" - ) - use gtk && conf_opts+=( --with-gtkabi=3.0 ) - ;; - esac - - # 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 - gcc-specs-pie && conf_opts+=( --enable-pie ) - fi - - einfo "./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_export_best - - 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 - - [[ -n ${softmmu_targets} ]] && \ - einfo "Building the following softmmu targets: ${softmmu_targets}" - - [[ -n ${user_targets} ]] && \ - einfo "Building the following user targets: ${user_targets}" - - if [[ -n ${softmmu_targets} ]]; then - mkdir "${S}/softmmu-build" - qemu_src_configure "softmmu" "${S}/softmmu-build" - fi - - if [[ -n ${user_targets} ]]; then - mkdir "${S}/user-build" - qemu_src_configure "user" "${S}/user-build" - fi -} - -src_compile() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - default - fi - - if [[ -n ${softmmu_targets} ]]; then - cd "${S}/softmmu-build" - default - fi -} - -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/kvm_stat" - python_doscript "${S}/scripts/kvm/vmxcap" - python_doscript "${S}/scripts/qmp/qmp-shell" - python_doscript "${S}/scripts/qmp/qemu-ga-client" -} - -src_install() { - if [[ -n ${user_targets} ]]; then - cd "${S}/user-build" - emake DESTDIR="${ED}" install - - # Install binfmt handler init script for user targets - newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt - 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_dorules "${FILESDIR}"/65-kvm.rules - fi - - if use python; then - python_foreach_impl qemu_python_install - fi - fi - - # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 - pushd "${ED}"/usr/bin >/dev/null - pax-mark m "${softmmu_bins[@]}" "${user_bins[@]}" - popd >/dev/null - - # Install config file example for qemu-bridge-helper - insinto "/etc/qemu" - doins "${FILESDIR}/bridge.conf" - - # Remove the docdir placed qmp-commands.txt - mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/docs/qmp/" - - cd "${S}" - dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt - newdoc pc-bios/README README.pc-bios - dodoc docs/qmp/*.txt - - # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin - fi - - # Remove vgabios since we're using the vgabios packaged one - if [[ -n ${softmmu_targets} ]]; then - 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-vmware.bin" - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin - dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin - dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin - dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin - dosym ../vgabios/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 - - qemu_support_kvm && readme.gentoo_create_doc -} - -pkg_postinst() { - if qemu_support_kvm; then - readme.gentoo_print_elog - ewarn "Migration from qemu-kvm instances and loading qemu-kvm created" - ewarn "save states has been removed starting with the 1.6.2 release" - ewarn - ewarn "It is recommended that you migrate any VMs that may be running" - ewarn "on qemu-kvm to a host with a newer qemu and regenerate" - ewarn "any saved states with a newer qemu." - ewarn - ewarn "qemu-kvm was the primary qemu provider in Gentoo through 1.2.x" - - if use x86 || use amd64; then - ewarn - ewarn "The /usr/bin/kvm and /usr/bin/qemu-kvm wrappers are no longer" - ewarn "installed. In order to use kvm acceleration, pass the flag" - ewarn "-enable-kvm when running your system target." - fi - fi - - fcaps cap_net_admin /usr/libexec/qemu-bridge-helper - if use virtfs && [ -n "${softmmu_targets}" ]; then - local virtfs_caps="cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_setgid,cap_mknod,cap_setuid" - fcaps ${virtfs_caps} /usr/bin/virtfs-proxy-helper - fi -} - -pkg_info() { - echo "Using:" - echo " $(best_version app-emulation/spice-protocol)" - 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/vgabios)" -} |