From 5510d9d7d1c93c2ea71a2bd6f0666168808d5dd6 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 18 Mar 2018 04:54:42 +0000 Subject: gentoo resync : 18.03.2018 --- app-emulation/Manifest.gz | Bin 18840 -> 18844 bytes app-emulation/cloud-init/Manifest | 2 +- .../cloud-init/cloud-init-0.7.6-r2.ebuild | 2 +- app-emulation/fuse/Manifest | 4 +- app-emulation/fuse/fuse-1.5.1.ebuild | 25 +- app-emulation/fuse/metadata.xml | 7 + app-emulation/libvirt/Manifest | 5 +- .../files/libvirt-4.1.0-do_not_use_sysconf.patch | 204 ++++++ app-emulation/libvirt/libvirt-4.1.0.ebuild | 384 ++++++++++ app-emulation/libvirt/libvirt-9999.ebuild | 3 +- app-emulation/qemu/Manifest | 2 +- app-emulation/qemu/qemu-2.11.0-r50.ebuild | 806 --------------------- app-emulation/qemu/qemu-2.11.1-r50.ebuild | 806 +++++++++++++++++++++ 13 files changed, 1423 insertions(+), 827 deletions(-) create mode 100644 app-emulation/libvirt/files/libvirt-4.1.0-do_not_use_sysconf.patch create mode 100644 app-emulation/libvirt/libvirt-4.1.0.ebuild delete mode 100644 app-emulation/qemu/qemu-2.11.0-r50.ebuild create mode 100644 app-emulation/qemu/qemu-2.11.1-r50.ebuild (limited to 'app-emulation') diff --git a/app-emulation/Manifest.gz b/app-emulation/Manifest.gz index 26dc69fbab7c..87bdc988e83c 100644 Binary files a/app-emulation/Manifest.gz and b/app-emulation/Manifest.gz differ diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest index f420c2301af5..e41b38468a82 100644 --- a/app-emulation/cloud-init/Manifest +++ b/app-emulation/cloud-init/Manifest @@ -13,7 +13,7 @@ DIST cloud-init-0.7.9.tar.gz 602188 BLAKE2B c2e2b8538488474cd4674b976f859164f0ab DIST cloud-init-17.1.tar.gz 780532 BLAKE2B 10809da2e81d594542d83b2416481c493474cac2e790da25363e631f6dae9edc1e2fd160708121486dd3a2ebd19cfc29d18978cbe7d82eb1aec907762bf7bf0b SHA512 988cae4291c8d6a5bce012b78d651c602c02ad38c3790e9ed9aa7c815ae84c98767718ab9b0d346ddbc9c83cb886d455590128af750183618c0bf0f0c5a79564 DIST cloud-init-17.2.tar.gz 810821 BLAKE2B df1a7c1ed1fc48a7801a53bd89839d963debca6abf7f892d61bf7ec9222ab33bf78221e65d79028e0445cac4c5fe1e0c1620d49aea26c036ee17933d9c1893f5 SHA512 ad1c7f6ca9762b70a1f06a6b538032a7de0c5371fd792260d5959df113f4f51509d184b2207ffa23b41f395c1903d551d66aaf2a2ad60af3594cf1f18d1e4a38 EBUILD cloud-init-0.7.6-r1.ebuild 2585 BLAKE2B c2f9bd34d430b99f8b78be2c4d2cb8b5ca7613ab71ec02c8e21c4001b35f3c16d637243e93f55a872f7e4ab7b0c990bf78abc36c3a3e822389a191a57e005c2c SHA512 0c82e788cacd91e923ff57c240a3615c20157d2a4ba1fdf7d28eb6f0e9f7c55b64b3ef321dc1f2cadd40e47128d2ef0854f3488fe7aabf5cdcf3f8b326eb6ad8 -EBUILD cloud-init-0.7.6-r2.ebuild 1922 BLAKE2B c67031dd3b9e131e48a568fe4e97a8059d715be3f8721ec0f6c7dce60c6b089df8c27efc0901a50ad111f9b1a590833c449fca99fe7e19d5b8925d936dd4a19d SHA512 a3e22b4b2985670b8de5fe9af2f2ef16df626a3b3acfdf1d1656f247e44ae91b9629fc693829beb7ea931be38509b418c52f5257f24d1f02045f97735c8ff8f3 +EBUILD cloud-init-0.7.6-r2.ebuild 1916 BLAKE2B c4162b4ab96626c481db4d4f96aba3b0d85c18ad25afe510ece533b0aacaab91fe075b9ba36cbec945382d94ec7de964a774f818359a10f45a99dc60863acf8a SHA512 f5457fc4315e0533ab4d68b5a62d79516797b1aa1214539e9b56b1d9d6e3e2f14b069788843b09ae29ca64b70b6d3d8a6fb686f51e86318d90da59a32617f9ca EBUILD cloud-init-0.7.6_p1212-r1.ebuild 1989 BLAKE2B da729eef70d23a2a0df1bfdb28d74714ced55a097c8dcc2eb0c25d8d6e9acb57651340ca4d8190f100ca5fe0dcb8eee674e7e513bb8b50772383ef12fd23f11c SHA512 4e71e5ff1b4a2ea8bf600d627911f7eb197d5f90f354e553996388bdef13309ceecab732b168e1f4c3bd8d5fa3dfa736a34bc535eedb55ffe6c23a6b1eb873ce EBUILD cloud-init-0.7.6_p1212.ebuild 1952 BLAKE2B df5190629901c000c7a0aa49b41bd2537b26e65abc7a8830d1e5a8fce9d9367be7bd42613a0af0dcdeeba4a964a3d5d4698c9bc470e7beb79a43136a36481df0 SHA512 4e5064b3cf997f7cbcc3a615f0d1817a37608015c599aa718a60d8e1adcf994422c5fbccbcfe65ad98d93a208364e96382e78f4534e88b8f8e2b936c3c5c25f7 EBUILD cloud-init-0.7.7.ebuild 2399 BLAKE2B 54d7784a165c51d994259e70367551addbb015be284ad3b109cf6ec4cad961cb581e246d6824eff40e8bf875d405ec377cf1b0ffdada35d5ea4d43a4292dbb4b SHA512 1c171970b6e60cc075b3863dafbb527fe23ad2ff0005303b34dba2d5ccff640ade4cfc0bfe54f97d0dd424b95266624599fd585d8931e92ad78bf5b8dae38bce diff --git a/app-emulation/cloud-init/cloud-init-0.7.6-r2.ebuild b/app-emulation/cloud-init/cloud-init-0.7.6-r2.ebuild index 2254a19a64ca..f97fbc9cf6dc 100644 --- a/app-emulation/cloud-init/cloud-init-0.7.6-r2.ebuild +++ b/app-emulation/cloud-init/cloud-init-0.7.6-r2.ebuild @@ -12,7 +12,7 @@ SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" LICENSE="GPL-3" SLOT="0" -KEYWORDS="~amd64 ppc64 ~x86" +KEYWORDS="~amd64 ~x86" IUSE="test" CDEPEND=" diff --git a/app-emulation/fuse/Manifest b/app-emulation/fuse/Manifest index 0e4c8550616e..6ee9c0333acf 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 -EBUILD fuse-1.5.1.ebuild 1492 BLAKE2B d96f93cb03f97bda03e8d6e5fc7641befc064ece6d18a43cf9c0c00641db04ddc19883d0e995eee0b2e5a227fd9f89f0658d1fe4b42882472a296953523642ce SHA512 153e8cc20469ba0c19dfd1bd9935349c6ea285c56def18fc90cc08c34fa377e7208ec5e694891ff0dc5798836d7952aa11a09620ba4dafbc5696f22b876a5c8b -MISC metadata.xml 463 BLAKE2B 6d6d3856e855523101aec81d8643c3b21dfe9748c34953fcaa478e60ace0122ac3f307c2f21bd41e952a953b37488f3649c57e12549520e1b3fe9985c9f6c1f7 SHA512 dce77f13c89a1e08aeba516eef1c8ca0a6fcf43167ed309971181ff133f221a50a73f6588ce4556e3cfadf62df8f00eb4c8d001acb5062909d7cb9bfcf3f6a80 +EBUILD fuse-1.5.1.ebuild 1651 BLAKE2B df947b65938e55d0216c6ad3cdc2fee0e9e623920db6685009e498ea01c099cf829ffdab62381830bc1986f4a5a0c544be0d73683b33f7a64a8c964afc01c4b4 SHA512 e2c95c56de793c5cad085622bfff258766c7a13b9f80aac908c1384f1ad797486e44f58e3d2269b576421dabd9311f7cf468efd3cbb057d5d531adff9dbbe95e +MISC metadata.xml 792 BLAKE2B 6dac563b6c30b8552db0b2c52b12d570a38e8803e75b842ea634eb45a6ef353940773b303f269588a212c2a266d34f0a985dc8190f9a072c3781c75f1bded363 SHA512 cbe2169118bbc0e56208080a7691ae1c626827278b22e4b63c1dccfef4c2f3d808e3e0f6a78481b60fd03db188216ea6cf4d1da81ac27820a8e95ccf10067301 diff --git a/app-emulation/fuse/fuse-1.5.1.ebuild b/app-emulation/fuse/fuse-1.5.1.ebuild index 4b8b2fa01d8e..ab203809cef5 100644 --- a/app-emulation/fuse/fuse-1.5.1.ebuild +++ b/app-emulation/fuse/fuse-1.5.1.ebuild @@ -10,26 +10,25 @@ 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" +IUSE="alsa ao backend-fbcon +backend-gtk backend-sdl backend-svga backend-X gpm joystick memlimit png xml" # Only one UI back-end can be enabled at a time -REQUIRED_USE="^^ ( X fbcon gtk sdl svga )" +REQUIRED_USE="^^ ( backend-fbcon backend-gtk 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 ) 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 ) + backend-gtk? ( x11-libs/gtk+:3 ) + backend-sdl? ( media-libs/libsdl ) + backend-svga? ( media-libs/svgalib ) + backend-X? ( x11-libs/libX11 x11-libs/libXext ) xml? ( dev-libs/libxml2:2 )" DEPEND="${RDEPEND} - fbcon? ( virtual/linux-sources ) + backend-fbcon? ( virtual/linux-sources ) dev-lang/perl virtual/pkgconfig" @@ -48,15 +47,15 @@ src_configure() { $(use_with xml libxml2) ) - if use gtk; then + if use backend-gtk; then : - elif use sdl; then + elif use backend-sdl; then myconf+=("--with-sdl") - elif use X; then + elif use backend-X; then myconf+=("--without-gtk") - elif use svga; then + elif use backend-svga; then myconf+=("--with-svgalib") - elif use fbcon; then + elif use backend-fbcon; then myconf+=("--with-fb") fi diff --git a/app-emulation/fuse/metadata.xml b/app-emulation/fuse/metadata.xml index 3687ac68007d..bb6d65be18ac 100644 --- a/app-emulation/fuse/metadata.xml +++ b/app-emulation/fuse/metadata.xml @@ -12,4 +12,11 @@ fuse-emulator + + Use framebuffer rendering backend + Use GTK+ rendering backend + Use SDL rendering backend + Use svgalib rendering backend + Use X11 rendering backend + diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest index 354167df7296..fef7b8bca4c8 100644 --- a/app-emulation/libvirt/Manifest +++ b/app-emulation/libvirt/Manifest @@ -5,6 +5,7 @@ AUX libvirt-1.3.4-glibc-2.23.patch 2049 BLAKE2B 8e283846a2442ef4bf3fd5ca88033387 AUX libvirt-3.1.0-musl-fix-includes.patch 221 BLAKE2B 65f486f4055c0ccae59601970d770f23f570f127ba26ce1d932855e784b83fce99389f22f12630005be61e5de2e64e0125d0bf5270024f736fe597fa5b81ff78 SHA512 876c7dacedcce1d69938779b978b3a23b2f51128f121b4aa53f5f301d7740f90d77f335523210ed492b68b5f7a0b864b25a694ee562fb5e8ab1b6411d3da48e7 AUX libvirt-3.10.0-r2-fix_paths_for_apparmor.patch 2730 BLAKE2B ae92a37cdfb929862bd58d1cd208e3f8a3aab10dae98ec8e51d6c3ab579295e3f59ff091970499c6c57b625edec77b98421502df625b1d10c1c3d0be3dfbe489 SHA512 751b971fd0f109f3a4147feea8481adb9c868313ea57d293a89ee548661514f124318324823d9380839a7a5c8ae7c1e3ae8c4c6e62027587f163c8856e353a6a AUX libvirt-4.0.0-bash_completion_bugfixes.patch 1863 BLAKE2B ed54b4e308297907001bb2fbcba76197c341c292fc29139f50b9c03cb9ea61696dbd177a4d0055cdca3184a9ecbd283f576c491d2d3c581e31415465bd8e92e1 SHA512 f718408ce57c0abd68023356d5980c5e85dfb5c90759a6758309408dea7115b0ae18a18be2e625401d985fab7b1a374ab1e10caa27527ed002a852bb3f08ca73 +AUX libvirt-4.1.0-do_not_use_sysconf.patch 6867 BLAKE2B 3105dd0ff7c0275f1edb279acd2674f76029bdcb3649f4564d0b57e202b4353d9fca7bd1e98e2fb5ad9e2acafd5616f693058150f6696d00fe4a22d7374bf35a SHA512 a38061d6f9d100f40f429c1b4f5c0a1fe480c412ff9a59aa6c53c22809c88892928aae265e91b5561c02ef29aa075aa68f6e4f2f33bb24045ca82b2ec85087d7 AUX libvirt-guests.confd 2430 BLAKE2B 9d56477c9377e02503782e6d653579c6d149b292c43f37926f4646374e8aae05ca812b6a3a561811482861f8fe67dfdbe63851963326ddbbf2f4644c85411120 SHA512 78f419a89de7aabaad860903c24f1c070786fc1296d987e61dd537705b0e7f71a46c315888028f3826c3417e42861ca8471788be4ec5695e98427c5f18ae63fc AUX libvirt-guests.init-r2 5412 BLAKE2B 139c39b65e6297883ab13bb65f8799f6e417a3de841bca3b31fd161a7dd9f64b18dedc1a942d9ee6577c1253e9b45859dec006a17b25da9e6cde2507b88cd302 SHA512 0f46ec5776c61d1776248779fa894b1a6d7b98d0eb8e8374b320c785c25d92468f087e350233b9152eb2cd0680f6b334c3a61684dabc7c5b559d3b55fdcb712d AUX libvirtd.confd-r5 740 BLAKE2B 74a069f4902dd1352f06029c886200615a35870ff88496c91956d23a3172db0789086622422f545498e92b7f8de41225022185fe291dd580cbacdeb783163f4b SHA512 98f935589dbc5f2a99329f77fdf84c563fa0dc99404b7476603679478d68ce8dbea2c88645251d3c28f59e7bcae124ae632972146e8a8c3e0e9fcbfb27296f91 @@ -14,6 +15,8 @@ AUX libvirtd.tmpfiles.conf 36 BLAKE2B fa0e1dac4117dcb2a2e826c82c4c63e20156db47ab AUX virtlockd.init-r1 570 BLAKE2B 734d582d867b79649f863504fcd7c87fe3c59569b56b0996a6229d6eebadc9d4c356c10bbcf5637483fbc930d0c50233da4fffa357d423029b3828b7a3be56de SHA512 65a05d406200da9a534df5caa1b9cb2af97f0b03f64e6b4157322975fa754f59ae74fff9ec8301a6c0510e4b75e2b72a78cddf004a76109e18c375e83527cee5 AUX virtlogd.init-r1 569 BLAKE2B 20df60c23cee575577592d41d1a9913923255633d12de789c036e6085f9e7b4360e017155c61e3688332b493a0e96ffca55753bcc67a33bb877539b80eef81fe SHA512 0a3e083e742f9e0d8206ab9a48c63bbd395bdc24e5551e2cbeddffa3fb576a817b73dbafe646c392a35c354d6b65426a9b6f3ce3dcafc30077715e90684968c1 DIST libvirt-4.0.0.tar.xz 15002248 BLAKE2B 066794909d02be04a7d70ebd5e6d423736fdaf95b7521edd47ef19f9bec4f16d6d3e64117356394ce5916761ad77d5afab84ace2f4828c1f97373d0053b6924b SHA512 c99ea305f427859eb070b5f0c43de48645a5c53a2aa8efc60f54f278ec3fa0b504307861309e1852f8d7bff4436afe00c859aac27691366a0c36c91341cea7a1 +DIST libvirt-4.1.0.tar.xz 15046956 BLAKE2B e5d4fb47d6308b2f74d464b8a4b236fcda96ca71357847ce7bc9c787e89111ed99538e9f7815287d14af24db1bc774012682843edc1e067cdf710e82d0b349c9 SHA512 62d1a228adf3270cc6defe3cbf92dac8c4ce2c434c4d97219571ccef799a4f6304cfd1ba9938338356641285f53ac71145d7b398523021c5ea1dc8e3d49cf894 EBUILD libvirt-4.0.0.ebuild 9814 BLAKE2B 8d1c80ca2f028732bdcfcec2421d9bdc978a654652ef1381ab1d00d8302fbc3c6417ce606912187a7a1203f0099812bb238da1b63ca0e8dcaa310969862efd59 SHA512 d23e19e182ba63e2629fcc84f2ef63d7c97728159f6bc02640fe95f6768401fd0cbce43d4589dcf9cf30b023ec75aaedf15589712cdbea36bbf4a5d74d5fea97 -EBUILD libvirt-9999.ebuild 9617 BLAKE2B deaea5095a0c395f8a60d8aec71d14ac0752fac2a1b80f5a642d45291aeef758e351ae8665113de638f1df62e7636f943cda52bdf1270e17fe81fbbea6f63843 SHA512 f08d2183f086ec56e1764aeb05ae5c4dbffe89b4d4e5516c5f511d7319ab14b203cccee38edab41a09750a092217456aa0f7ea2dbd34d36b741d05869829e206 +EBUILD libvirt-4.1.0.ebuild 9684 BLAKE2B eb196286d2937b88f1f9c7302441e36be5f4bb2f1915cbdacd9621bfd2a75df3d797064af173ed578b1b958eff6db6ef67c715c2f2e0b8ae0f901bf906809b47 SHA512 a08601b87feea77fdaaa5b48b232803b6bbee0468692eae237886a2832aa2e9eccc82205359e75df801059e6ae3e2ebb3a2466d68ef7d57b9c231bbd66e21e25 +EBUILD libvirt-9999.ebuild 9573 BLAKE2B ba9be73c5c735790bda2605f928a0f4f41fdcd73023880af20f0b717726e021a0f4b1038e3311ba62d3fc066442cc9dcacb3d7d217f7004e90e40313172c344e SHA512 66545144ecbb4c91e8b489514fef9f6d9e66b05cfea59b69f36d16c27298e23293fd14f6f1f3892e7b8c1e037911ba3577cdd973dae70be1570d39162f4f70bc MISC metadata.xml 3766 BLAKE2B 38d8b1dfb815871ca19c35c80ab390a422e1833b6ef09c6691889d5d6c01e25bb9fb5d187231456c443cb22764583312a56ed8e1a772f810b58050752ba9f2de SHA512 10d96f652bdcf32e34ea415a37de0c3c4aae3a716403a0ca73228af640788734119cbf4ade26a450cc3cda81ef6182391a6f590a851a6834d52394b7c81c49ed diff --git a/app-emulation/libvirt/files/libvirt-4.1.0-do_not_use_sysconf.patch b/app-emulation/libvirt/files/libvirt-4.1.0-do_not_use_sysconf.patch new file mode 100644 index 000000000000..2c8339a8b519 --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-4.1.0-do_not_use_sysconf.patch @@ -0,0 +1,204 @@ +diff --git a/src/Makefile.am b/src/Makefile.am +index 3bf2da5..6b3f37a 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -2165,23 +2165,6 @@ EXTRA_DIST += \ + $(SYSCONF_FILES) \ + $(NULL) + +-install-sysconfig: +- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig +- for f in $(SYSCONF_FILES:%.sysconf=%) ; \ +- do \ +- tgt=`basename $$f`; \ +- $(INSTALL_SCRIPT) $(srcdir)/$$f.sysconf \ +- $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \ +- done +- +-uninstall-sysconfig: +- for f in $(SYSCONF_FILES:%.sysconf=%) ; \ +- do \ +- tgt=`basename $$f`; \ +- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/$$tgt; \ +- done +- rmdir $(DESTDIR)$(sysconfdir)/sysconfig || : +- + SYSVINIT_FILES_IN = \ + locking/virtlockd.init.in \ + logging/virtlogd.init.in \ +@@ -2268,14 +2251,14 @@ uninstall-polkit:: + endif ! WITH_POLKIT + + if LIBVIRT_INIT_SCRIPT_RED_HAT +-install-init:: $(SYSVINIT_FILES) install-sysconfig ++install-init:: $(SYSVINIT_FILES) + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d + for f in $(SYSVINIT_FILES:%.init=%) ; \ + do \ + $(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/$$f; \ + done + +-uninstall-init:: uninstall-sysconfig ++uninstall-init:: + rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(sysconfdir)/rc.d/init.d/%) + rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || : + +diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in +index 3c9d587..2449b20 100644 +--- a/src/locking/virtlockd.service.in ++++ b/src/locking/virtlockd.service.in +@@ -7,8 +7,7 @@ Documentation=man:virtlockd(8) + Documentation=https://libvirt.org + + [Service] +-EnvironmentFile=-/etc/sysconfig/virtlockd +-ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS ++ExecStart=@sbindir@/virtlockd + ExecReload=/bin/kill -USR1 $MAINPID + # Loosing the locks is a really bad thing that will + # cause the machine to be fenced (rebooted), so make +diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in +index 3d9ae36..4373619 100644 +--- a/src/logging/virtlogd.service.in ++++ b/src/logging/virtlogd.service.in +@@ -7,8 +7,7 @@ Documentation=man:virtlogd(8) + Documentation=https://libvirt.org + + [Service] +-EnvironmentFile=-/etc/sysconfig/virtlogd +-ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS ++ExecStart=@sbindir@/virtlogd + ExecReload=/bin/kill -USR1 $MAINPID + # Loosing the logs is a really bad thing that will + # cause the machine to be fenced (rebooted), so make +diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in +index 769702e..1830c72 100644 +--- a/src/remote/libvirtd.service.in ++++ b/src/remote/libvirtd.service.in +@@ -21,8 +21,7 @@ Documentation=https://libvirt.org + + [Service] + Type=notify +-EnvironmentFile=-/etc/sysconfig/libvirtd +-ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS ++ExecStart=@sbindir@/libvirtd + ExecReload=/bin/kill -HUP $MAINPID + KillMode=process + Restart=on-failure +diff --git a/tools/Makefile.am b/tools/Makefile.am +index 85e640b..99b9fa1 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -336,15 +336,6 @@ install-data-local: install-init install-systemd install-nss \ + uninstall-local: uninstall-init uninstall-systemd uninstall-nss \ + uninstall-bash-completion + +-install-sysconfig: +- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig +- $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \ +- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests +- +-uninstall-sysconfig: +- rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests +- rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||: +- + EXTRA_DIST += libvirt-guests.sh.in libvirt-guests.init.in + + install-initscript: libvirt-guests.init +@@ -359,8 +350,8 @@ uninstall-initscript: + + if LIBVIRT_INIT_SCRIPT_RED_HAT + BUILT_SOURCES += libvirt-guests.init +-install-init: install-sysconfig install-initscript +-uninstall-init: uninstall-sysconfig uninstall-initscript ++install-init: install-initscript ++uninstall-init: uninstall-initscript + else ! LIBVIRT_INIT_SCRIPT_RED_HAT + install-init: + uninstall-init: +diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in +index 491ca62..f0f417b 100644 +--- a/tools/libvirt-guests.service.in ++++ b/tools/libvirt-guests.service.in +@@ -10,7 +10,7 @@ Documentation=man:libvirtd(8) + Documentation=https://libvirt.org + + [Service] +-EnvironmentFile=-/etc/sysconfig/libvirt-guests ++EnvironmentFile=-/etc/libvirt/libvirt-guests.conf + # Hack just call traditional service until we factor + # out the code + ExecStart=@libexecdir@/libvirt-guests.sh start +diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf +index 08204ca..2da172b 100644 +--- a/tools/libvirt-guests.sysconf ++++ b/tools/libvirt-guests.sysconf +@@ -1,3 +1,10 @@ ++# ++# Warning: This configuration file is only sourced by the systemd ++# libvirt-guests.service unit. The coresponding openrc facility is in ++# /etc/init.d/libvirtd and /etc/conf.d/libvirtd ++# ++ ++ + # URIs to check for running guests + # example: URIS='default xen:/// vbox+tcp://host/system lxc:///' + #URIS=default +diff --git a/src/Makefile.am b/src/Makefile.am +index 6b3f37a..48e7133 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -2417,14 +2417,14 @@ SYSTEMD_UNIT_FILES = $(notdir $(SYSTEMD_UNIT_FILES_IN:%.in=%)) + BUILT_SOURCES += $(SYSTEMD_UNIT_FILES) + DISTCLEANFILES += $(SYSTEMD_UNIT_FILES) + +-install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig ++install-systemd: $(SYSTEMD_UNIT_FILES) + $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) + for f in $(SYSTEMD_UNIT_FILES); \ + do \ + $(INSTALL_DATA) $$f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/ ; \ + done + +-uninstall-systemd: uninstall-sysconfig ++uninstall-systemd: + rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%) + rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || : + else ! LIBVIRT_INIT_SCRIPT_SYSTEMD +@@ -2496,7 +2496,7 @@ EXTRA_DIST += $(UPSTART_FILES) + if WITH_LIBVIRTD + if LIBVIRT_INIT_SCRIPT_UPSTART + +-install-upstart: install-sysconfig ++install-upstart: + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/event.d + for f in $(UPSTART_FILES:%.upstart=%); \ + do \ +@@ -2505,7 +2505,7 @@ install-upstart: install-sysconfig + $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \ + done + +-uninstall-upstart: uninstall-sysconfig ++uninstall-upstart: + for f in $(UPSTART_FILES:%.upstart=%); \ + do \ + tgt=`basename $$f` ; \ +diff --git a/tools/Makefile.am b/tools/Makefile.am +index 99b9fa1..37e037c 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -382,12 +382,12 @@ EXTRA_DIST += libvirt-guests.service.in + SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system + + if LIBVIRT_INIT_SCRIPT_SYSTEMD +-install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh ++install-systemd: libvirt-guests.service libvirt-guests.sh + $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) + $(INSTALL_DATA) libvirt-guests.service \ + $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service + +-uninstall-systemd: uninstall-sysconfig ++uninstall-systemd: + rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service + rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||: + diff --git a/app-emulation/libvirt/libvirt-4.1.0.ebuild b/app-emulation/libvirt/libvirt-4.1.0.ebuild new file mode 100644 index 000000000000..a5b956a9b580 --- /dev/null +++ b/app-emulation/libvirt/libvirt-4.1.0.ebuild @@ -0,0 +1,384 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools eutils user linux-info systemd readme.gentoo-r1 bash-completion-r1 + +if [[ ${PV} = *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="git://libvirt.org/libvirt.git" + SRC_URI="" + KEYWORDS="amd64" + SLOT="0" +else + # Versions with 4 numbers are stable updates: + if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then + SRC_URI="http://libvirt.org/sources/stable_updates/${P}.tar.xz" + else + SRC_URI="http://libvirt.org/sources/${P}.tar.xz" + fi + KEYWORDS="amd64 ~arm64 ~x86" + SLOT="0/${PV}" +fi + +DESCRIPTION="C toolkit to manipulate virtual machines" +HOMEPAGE="http://www.libvirt.org/" +LICENSE="LGPL-2.1" +IUSE=" + apparmor audit +caps +dbus firewalld fuse glusterfs iscsi +libvirtd lvm + libssh lxc +macvtap nfs nls numa openvz parted pcap phyp policykit + +qemu rbd sasl selinux +udev uml +vepa virtualbox virt-network + wireshark-plugins xen zeroconf zfs +" + +REQUIRED_USE=" + firewalld? ( virt-network ) + libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) ) + lxc? ( caps libvirtd ) + openvz? ( libvirtd ) + policykit? ( dbus ) + qemu? ( libvirtd ) + uml? ( libvirtd ) + vepa? ( macvtap ) + virt-network? ( libvirtd ) + virtualbox? ( libvirtd ) + xen? ( libvirtd )" + +# gettext.sh command is used by the libvirt command wrappers, and it's +# non-optional, so put it into RDEPEND. +# We can use both libnl:1.1 and libnl:3, but if you have both installed, the +# package will use 3 by default. Since we don't have slot pinning in an API, +# we must go with the most recent +RDEPEND=" + app-misc/scrub + dev-libs/libgcrypt:0 + dev-libs/libnl:3 + >=dev-libs/libxml2-2.7.6 + || ( >=net-analyzer/netcat6-1.0-r2 >=net-analyzer/openbsd-netcat-1.105-r1 ) + >=net-libs/gnutls-1.0.25:0= + net-libs/libssh2 + net-libs/libtirpc + net-libs/rpcsvc-proto + >=net-misc/curl-7.18.0 + sys-apps/dmidecode + >=sys-apps/util-linux-2.17 + sys-devel/gettext + sys-libs/ncurses:0= + sys-libs/readline:= + apparmor? ( sys-libs/libapparmor ) + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap-ng ) + dbus? ( sys-apps/dbus ) + firewalld? ( net-firewall/firewalld ) + fuse? ( >=sys-fs/fuse-2.8.6:= ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) + iscsi? ( sys-block/open-iscsi ) + libssh? ( net-libs/libssh ) + lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) + nfs? ( net-fs/nfs-utils ) + numa? ( + >sys-process/numactl-2.0.2 + sys-process/numad + ) + parted? ( + >=sys-block/parted-1.8[device-mapper] + sys-fs/lvm2[-device-mapper-only(-)] + ) + pcap? ( >=net-libs/libpcap-1.0.0 ) + policykit? ( >=sys-auth/polkit-0.9 ) + qemu? ( + >=app-emulation/qemu-0.13.0 + dev-libs/yajl + ) + rbd? ( sys-cluster/ceph ) + sasl? ( dev-libs/cyrus-sasl ) + selinux? ( >=sys-libs/libselinux-2.0.85 ) + virt-network? ( + net-dns/dnsmasq[script] + net-firewall/ebtables + >=net-firewall/iptables-1.4.10[ipv6] + net-misc/radvd + sys-apps/iproute2[-minimal] + ) + virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) + wireshark-plugins? ( net-analyzer/wireshark:= ) + xen? ( + app-emulation/xen + app-emulation/xen-tools:= + ) + udev? ( + virtual/udev + >=x11-libs/libpciaccess-0.10.9 + ) + zeroconf? ( >=net-dns/avahi-0.6[dbus] ) + zfs? ( sys-fs/zfs )" + +DEPEND="${RDEPEND} + app-text/xhtml1 + dev-lang/perl + dev-libs/libxslt + dev-perl/XML-XPath + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-4.1.0-do_not_use_sysconf.patch + "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch + "${FILESDIR}"/${PN}-3.10.0-r2-fix_paths_for_apparmor.patch + "${FILESDIR}"/${PN}-3.1.0-musl-fix-includes.patch # bug #609488 +) + +pkg_setup() { + if use qemu; then + enewgroup qemu 77 + enewuser qemu 77 -1 -1 "qemu,kvm" + fi + + use policykit && enewgroup libvirt + + # Check kernel configuration: + CONFIG_CHECK="" + use fuse && CONFIG_CHECK+=" + ~FUSE_FS" + + use lvm && CONFIG_CHECK+=" + ~BLK_DEV_DM + ~DM_MULTIPATH + ~DM_SNAPSHOT" + + use lxc && CONFIG_CHECK+=" + ~BLK_CGROUP + ~CGROUP_CPUACCT + ~CGROUP_DEVICE + ~CGROUP_FREEZER + ~CGROUP_NET_PRIO + ~CGROUP_PERF + ~CGROUPS + ~CGROUP_SCHED + ~CPUSETS + ~IPC_NS + ~MACVLAN + ~NAMESPACES + ~NET_CLS_CGROUP + ~NET_NS + ~PID_NS + ~POSIX_MQUEUE + ~SECURITYFS + ~USER_NS + ~UTS_NS + ~VETH + ~!GRKERNSEC_CHROOT_MOUNT + ~!GRKERNSEC_CHROOT_DOUBLE + ~!GRKERNSEC_CHROOT_PIVOT + ~!GRKERNSEC_CHROOT_CHMOD + ~!GRKERNSEC_CHROOT_CAPS" + + kernel_is lt 4 7 && use lxc && CONFIG_CHECK+=" + ~DEVPTS_MULTIPLE_INSTANCES" + + use macvtap && CONFIG_CHECK+=" + ~MACVTAP" + + use virt-network && CONFIG_CHECK+=" + ~BRIDGE_EBT_MARK_T + ~BRIDGE_NF_EBTABLES + ~NETFILTER_ADVANCED + ~NETFILTER_XT_CONNMARK + ~NETFILTER_XT_MARK + ~NETFILTER_XT_TARGET_CHECKSUM" + # Bandwidth Limiting Support + use virt-network && CONFIG_CHECK+=" + ~BRIDGE_EBT_T_NAT + ~NET_ACT_POLICE + ~NET_CLS_FW + ~NET_CLS_U32 + ~NET_SCH_HTB + ~NET_SCH_INGRESS + ~NET_SCH_SFQ" + + # Handle specific kernel versions for different features + kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" + if kernel_is ge 3 6; then + CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP " + kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM " + fi + + ERROR_USER_NS="Optional depending on LXC configuration." + + if [[ -n ${CONFIG_CHECK} ]]; then + linux-info_pkg_setup + fi +} + +src_prepare() { + touch "${S}/.mailmap" + + default + + if [[ ${PV} = *9999* ]]; then + # git checkouts require bootstrapping to create the configure script. + # Additionally the submodules must be cloned to the right locations + # bug #377279 + ./bootstrap || die "bootstrap failed" + ( + git submodule status | sed 's/^[ +-]//;s/ .*//' + git hash-object bootstrap.conf + ) >.git-module-status + fi + + # Tweak the init script: + cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die + sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ + -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \ + -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ + -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ + -i "${S}/libvirtd.init" || die "sed failed" + + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_with apparmor) + $(use_with apparmor apparmor-profiles) + $(use_with audit) + $(use_with caps capng) + $(use_with dbus) + $(use_with firewalld) + $(use_with fuse) + $(use_with glusterfs) + $(use_with glusterfs storage-gluster) + $(use_with iscsi storage-iscsi) + $(use_with libvirtd) + $(use_with libssh) + $(use_with lvm storage-lvm) + $(use_with lvm storage-mpath) + $(use_with lxc) + $(use_with macvtap) + $(use_enable nls) + $(use_with numa numactl) + $(use_with numa numad) + $(use_with openvz) + $(use_with parted storage-disk) + $(use_with pcap libpcap) + $(use_with phyp) + $(use_with policykit polkit) + $(use_with qemu) + $(use_with qemu yajl) + $(use_with rbd storage-rbd) + $(use_with sasl) + $(use_with selinux) + $(use_with udev) + $(use_with uml) + $(use_with vepa virtualport) + $(use_with virt-network network) + $(use_with wireshark-plugins wireshark-dissector) + $(use_with xen) + $(use_with xen xen-inotify) + $(use_with xen libxl) + $(use_with zeroconf avahi) + $(use_with zfs storage-zfs) + + --without-hal + --without-netcf + --without-sanlock + --without-xenapi + + --with-esx + --with-init-script=systemd + --with-qemu-group=$(usex caps qemu root) + --with-qemu-user=$(usex caps qemu root) + --with-remote + --with-storage-fs + --with-vmware + + --disable-static + --disable-werror + + --with-html-subdir=${PF}/html + --localstatedir=/var + ) + + if use virtualbox && has_version app-emulation/virtualbox-ose; then + myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ ) + else + myeconfargs+=( $(use_with virtualbox vbox) ) + fi + + econf "${myeconfargs[@]}" + + if [[ ${PV} = *9999* ]]; then + # Restore gnulib's config.sub and config.guess + # bug #377279 + (cd .gnulib && git reset --hard > /dev/null) + fi +} + +src_test() { + cd "${BUILD_DIR}" + + # remove problematic tests, bug #591416, bug #591418 + sed -i -e 's#commandtest$(EXEEXT) # #' \ + -e 's#virfirewalltest$(EXEEXT) # #' \ + -e 's#nwfilterebiptablestest$(EXEEXT) # #' \ + -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \ + tests/Makefile + + export VIR_TEST_DEBUG=1 + HOME="${T}" emake check || die "tests failed" +} + +src_install() { + emake DESTDIR="${D}" \ + SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install + + find "${D}" -name '*.la' -delete || die + + # Remove bogus, empty directories. They are either not used, or + # libvirtd is able to create them on demand + rm -rf "${D}"/etc/sysconfig + rm -rf "${D}"/var/cache + rm -rf "${D}"/var/run + rm -rf "${D}"/var/log + + use libvirtd || return 0 + # From here, only libvirtd-related instructions, be warned! + + systemd_install_serviced \ + "${FILESDIR}"/libvirtd.service.conf libvirtd.service + + systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf + + newinitd "${S}/libvirtd.init" libvirtd || die + newinitd "${FILESDIR}/libvirt-guests.init-r2" libvirt-guests || die + newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die + newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die + + newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die + newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die + + newbashcomp "${S}/tools/bash-completion/vsh" vsh + bashcomp_alias vsh virsh virt-admin + + DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2") + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +pkg_preinst() { + # we only ever want to generate this once + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then + rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml + fi +} + +pkg_postinst() { + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then + touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml + fi + + use libvirtd || return 0 + # From here, only libvirtd-related instructions, be warned! + + readme.gentoo_print_elog +} diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild index 3e57dd9a00e4..0b482d5c1023 100644 --- a/app-emulation/libvirt/libvirt-9999.ebuild +++ b/app-emulation/libvirt/libvirt-9999.ebuild @@ -120,10 +120,9 @@ DEPEND="${RDEPEND} virtual/pkgconfig" PATCHES=( - "${FILESDIR}"/${PN}-1.3.0-do_not_use_sysconf.patch + "${FILESDIR}"/${PN}-4.1.0-do_not_use_sysconf.patch "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch "${FILESDIR}"/${PN}-3.10.0-r2-fix_paths_for_apparmor.patch - "${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch ) pkg_setup() { diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest index 7093c5024308..581eeb88161a 100644 --- a/app-emulation/qemu/Manifest +++ b/app-emulation/qemu/Manifest @@ -11,8 +11,8 @@ DIST qemu-2.11.0-patches-r0.tar.xz 16140 BLAKE2B 2e23908075195a7c28df574525a159e DIST qemu-2.11.0.tar.bz2 32816398 BLAKE2B 2014a8246f3cba9069186629d9ec8c221672fcfd3e8cd28a7e57f467add81f7bd84363183ef5cc5d18af91bde9186a4da49c0133c8ead83eae4626b9fc364e99 SHA512 3681700833573c0aa6283af950bfa298970056f1b44489088d8863840a7694512138321f86961ef43b256abf15eddd2612fb9cdbe3d9a358542d4e7037cc2004 DIST qemu-2.11.1-patches-r0.tar.xz 1640 BLAKE2B 8402a0bd086307413c3f088b7b2523adda5f370e3ce8e9ec39db905a5df495842cc2168b93b57e8516e98703ee1620e7cad77740529959a09a1d4224988829bc SHA512 2906f9497e61799da8efca0dac4a19addd3bf59770c742e3ed1600143b69397bbc4eecb2c1f64aef0e103447966d47ced1ec6908f78a793b8d06f99a0aa6dc4a DIST qemu-2.11.1.tar.bz2 32819412 BLAKE2B 6b6d4e7b8dcf33aeedb0b33bad267da07ad17c2eeeb5fbd2c038d760bc03224e55ba0f03eb248c62bc0e8636c2c660ea76b367eaea96bee16388053f82c8b8a9 SHA512 1b692bbdfc3dc785738c7192aa2a3f9cf53d9f5bf3b3f49fa8692050dc50f7056c8a4d1b527d48ffb2a674a0fd3a46d87addd1eaaa758f35eec1ab5adfe32354 -EBUILD qemu-2.11.0-r50.ebuild 23662 BLAKE2B d75c61bbf66d63b77ac32fd70075865fe0b468fd081e17c2b13b9d75bb6f1d011ab78ca2fa40fb889e875f087428cffb83e71d0a3fd18e8bb34cd78542d2a41a SHA512 478c89435d04e3535cb7d403ec5aa2928a647984806c3009ca740c8d7e3312d41b148cfaa80bc4b6081fc63727b0f0fcb769481f97f3a0b770383d0e88f45505 EBUILD qemu-2.11.0.ebuild 23630 BLAKE2B 0a6a289e37840774e92c506ad332d39213dc692ea5cfab4b3f54c45e159e0c3eb07f4831b27a808aefa1184697810336985cc79039773d40e1a50fd6780e6013 SHA512 74cb6375469740801198daa99606f26cf570a2298c8cd78eff362105474128d082d59aaefef627abb16484feee901f53c3b37b958d8c32843437dadb1655cb0e +EBUILD qemu-2.11.1-r50.ebuild 23664 BLAKE2B b232b1aa957997a2486ba3d8f950a778270dd8c049aefdda666343f3264fd88953d0ef9be6e1557af8a56aa17a782da93025d1ae8e9e3e090c5ac76677b5bade SHA512 31e92045e0ce4ec790b6478a9209a263dad862407566e1ed601f22b631c11dd221f3e9c126acb2fe85e493f2a59f56e4e1804e8a5a986256d1773d0cc5d812c1 EBUILD qemu-2.11.1.ebuild 23584 BLAKE2B 8b1db2fbffccbcbdb18282258a3e6e08fb7b6ead21381cbde62d98cd6f03e32d2dcfecb47458ad8c9431923537a183629b7a7fbbbc2c2c845b3dda7e9aec47ff SHA512 3258d4095ab1f941970eff407cf4cb883f5b8d1f4418b50ec935e4f9bb2fe5fdcd711ddf2784c5ea0027d06db900faa3d6652a2828417fc51f3c2931982b3001 EBUILD qemu-9999.ebuild 23472 BLAKE2B 41fa80019ffdf4df222a5cc024437ca8f7b174da0c0c7a60b1306debfcd9311193597e7d749bdc5f9d626cd4b31912f5c696e8df14a959ec2796089ba4688a0f SHA512 ff3c02a211739470fa1f412df69ac4e190decc96629e28828a6b4a23840dc0b1b23bb8ee6c06bec79ef0e244fdef26dd422087a6fff4cf9a4e884a5cc5275ec7 MISC metadata.xml 3794 BLAKE2B 626ed8aa0c868513122b44083f2c76fc758f09624600770b1b267328b08335cc60b4167b37a4f418985c810dfea23bb7792c9b874166842e8fd34ba2c24a146a SHA512 10f130f225b90dacf8262247d795a247abfdcbf3ad5fbe0693e8d4db79f755984f690cb150a7eb5a8e5d669ce404145c4fbb6b200d6362319be74759fd78b6d3 diff --git a/app-emulation/qemu/qemu-2.11.0-r50.ebuild b/app-emulation/qemu/qemu-2.11.0-r50.ebuild deleted file mode 100644 index 0ad79b0aea25..000000000000 --- a/app-emulation/qemu/qemu-2.11.0-r50.ebuild +++ /dev/null @@ -1,806 +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.0-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="" - # 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_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 - "${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-r50.ebuild b/app-emulation/qemu/qemu-2.11.1-r50.ebuild new file mode 100644 index 000000000000..355bcfb72d47 --- /dev/null +++ b/app-emulation/qemu/qemu-2.11.1-r50.ebuild @@ -0,0 +1,806 @@ +# 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="" + # KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd" + + # Gentoo specific patchsets: + SRC_URI+=" https://dev.gentoo.org/~chutzpah/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_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 + "${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)" +} -- cgit v1.2.3