diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2013-02-25 04:09:22 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2013-02-25 04:09:22 +0000 |
commit | 5cdfe290798741eec462840dd850165cc7abd88d (patch) | |
tree | 7fd525f3e5cb39175534489324ddac409a6b2abb /app-emulation/qemu | |
parent | Mask qemu-1.2.2-r4 while I work on the next stable patchset (diff) | |
download | historical-5cdfe290798741eec462840dd850165cc7abd88d.tar.gz historical-5cdfe290798741eec462840dd850165cc7abd88d.tar.bz2 historical-5cdfe290798741eec462840dd850165cc7abd88d.zip |
Support file capabilities for helper binaries
Package-Manager: portage-2.1.11.50/cvs/Linux x86_64
Manifest-Sign-Key: 0xD7DFA8D318FA9AEF!
Diffstat (limited to 'app-emulation/qemu')
-rw-r--r-- | app-emulation/qemu/ChangeLog | 8 | ||||
-rw-r--r-- | app-emulation/qemu/Manifest | 21 | ||||
-rw-r--r-- | app-emulation/qemu/qemu-1.2.2-r4.ebuild | 474 | ||||
-rw-r--r-- | app-emulation/qemu/qemu-1.4.0.ebuild | 13 |
4 files changed, 511 insertions, 5 deletions
diff --git a/app-emulation/qemu/ChangeLog b/app-emulation/qemu/ChangeLog index f53b540dde8e..4d9d788ebaae 100644 --- a/app-emulation/qemu/ChangeLog +++ b/app-emulation/qemu/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-emulation/qemu # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.187 2013/02/21 14:53:45 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.188 2013/02/25 04:08:48 cardoe Exp $ + +*qemu-1.2.2-r4 (25 Feb 2013) + + 25 Feb 2013; Doug Goldstein <cardoe@gentoo.org> +qemu-1.2.2-r4.ebuild, + qemu-1.4.0.ebuild: + Support file capabilities for helper binaries 21 Feb 2013; Doug Goldstein <cardoe@gentoo.org> qemu-1.2.2-r3.ebuild, +files/bridge.conf: diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest index 0c79df0bf46e..ef2bff9cb11f 100644 --- a/app-emulation/qemu/Manifest +++ b/app-emulation/qemu/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +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.2.0-cflags.patch 359 SHA256 8917142633d32497d63dd2f2934e17d86a2e2ab11be2c8551e7218c9251b66a1 SHA512 f60ecc9a0e6969436a77444193cdba4f3028db683de0963870cbac5bf3a1b47da815926236f127a5f56333efc21efc52eb732cfce6393b764bfa1b9f569df645 WHIRLPOOL e0b3b8e1e68a3b42ce7727f7fa2029dd382fe9c8f7260c29e52368a1cd3b29efcfc134cf9908b3590ed6fe57c785bd05bf676e61736dc321a7a4899dd8b0a861 @@ -19,9 +22,23 @@ EBUILD qemu-1.1.1-r1.ebuild 12063 SHA256 a3f92888f96d664c0dd26ca257ebce3dd1716c1 EBUILD qemu-1.1.2-r2.ebuild 12149 SHA256 b73be920f461c0d416483776750668ce68deb4214049a29e600b6268a1e6fae2 SHA512 368d8086ec85fddc60189c8e53d9e407f1321a6ac7a98da04d048f436dbd56088eaca3fd77a5888ea8865b4f6a0311d75f82a736ecda5f9ca8e02a2c03931a25 WHIRLPOOL 943f6cb80fc610a4615783e1bd5b3152366ba80877cce142ef00709a5d8461ebee5c2bb975c8b9dca6452075fc810c3e601bb4aee01f6700b7c7aa8c149e8d6e EBUILD qemu-1.2.2-r2.ebuild 13797 SHA256 fed8d1598f3f6087029a89b2d263c9c5cb43dc3a451087d4ab7aadc21514d263 SHA512 7d2bec002f0f470bb10d08d54ca133395a68f1d6eb2827211c27f84c05f5282c3a33712b2d657ed3f3bfbc5629dd39d00b6fb1b1dc62410984413919ca57b714 WHIRLPOOL b48726f91f9e92cbd648661c60be64208c260da05651591863292b7f3ee91f7fa0f791d46c3e3b19be2b533b92b795741cb358de8c2a694477c94d2f23f6aacf EBUILD qemu-1.2.2-r3.ebuild 15172 SHA256 15c56932017404d535a9b307b9f8966d771a4415f4823aa5b6e8c6a011bf557c SHA512 b324ce82dd1617606dc404b22a2b5f4c2cbd0524bf8ed6f09963e85521476628d4f49ecafee343da7d97b56bccbf147ff9714f0e0f30c2856df8f4309dca63e4 WHIRLPOOL 338f463cfb94f81ce4ce1b55b2f027e87404d2634d281356441826a184e29ba1149fdb0e1b8b69ce2add2013d94428ccdc508dc150348536617d7ee274b4e091 +EBUILD qemu-1.2.2-r4.ebuild 15374 SHA256 cddfd3f042e7e6f438fb082351d4d018f38c760a2e0ccc7a8768f738bd5f56c6 SHA512 16f1cc3d630b8f1c830af07489f946f0eac6bf9665137d20fd6fff80e2f54ed073e7d1e4aff61cd1c514bb82eeb257ec5340030c3e69a6fd34ffd3457bccf3ac WHIRLPOOL 1fb18142842bf62720efe6bed5bd41d9f17b0ecfa326839daec86eadd1c12cd9dae6bc26797481760c6c802c3eb057f14174904de254067ef30d3ab878da97a6 EBUILD qemu-1.3.0.ebuild 13711 SHA256 bda7012b27a54fc2cc0d0bb800a9192226237ab0fd04279304dea2bc15f5a9b9 SHA512 fd149229fd46f829490331cf48abf46e9ea1c59992d1bd7c4350ce7d1a70bcb4f7ffc14923130ad974ae9124a468cfafa6f746020f4c0e034d8ea50810681076 WHIRLPOOL 1ba4505219a2c28f14b303adae83b4474a40c424eae06b7ec2b0d20a12d14600251f495bb18e6bee498b4d51304a1675d3c7b61b8f959bbd8cf63757b21b1ed6 EBUILD qemu-1.3.1.ebuild 14978 SHA256 e2e24c04443a2358b8c3ca6c9b02ad1db034423a7c08017c21d533c0298dc3d1 SHA512 90d7827fa5dd4ab96edf6c878cef7276bc9931cdca6c02d96d038f338c8f029d77c2323e67bce13b5d428af840d5d79d18071cbc49c00a52af723c7debbc1cfa WHIRLPOOL a6cbfb4fa295aa27c952c3ac1888263ccd99a2328266cb5f5977e6236f71cb3ed65e4b38cfd15035f61c434cb9d88b269ba6124dadf31d11823fdb15a521b940 -EBUILD qemu-1.4.0.ebuild 14938 SHA256 28351db690475a562335643fe40c52c7fe864f25bd9f7bf74b7a7a6e65281da5 SHA512 754dc19ad0e9d5adb4ec11ec806bb6f47bdeeb7926dbd49529a9580b852c16ae8fb85d9cbf5c075791fd7f512e9d43df797a50fea33f02ba6ac8da6106024ece WHIRLPOOL 2c0104353b11cf1d11725010a88817761a52180df3afa5f8b4fddc0b8efa78956b06c9035fce6d67e2167ec8f25791cf915c1c9e55a33d7422c25f316756a47a +EBUILD qemu-1.4.0.ebuild 15249 SHA256 2465734e97273580f8bcc8db3279ff9b77e79f69e6b373f42635cd9643966293 SHA512 376fb50527727e33cfc119b92e13aed80aba9aa766a85bd04e895eb1e6c1a239396ff4bfe796054f758a65fcb8917de89454edf4e96d8336dd526b8815756378 WHIRLPOOL b04a3270752d707340b7cb3460ca0c8b63ba37ddbced8bb771cfa51d540bc17c21c076ada079bb73ba18171ba21e4b06576842df81d061bc91bffb37fe8ed371 EBUILD qemu-9999.ebuild 13648 SHA256 a694e912dcdb513b833fe629dd836580fdc541b26484d9f33a9da1ede74c86e4 SHA512 f5209038cfd83041bb0479a4c4a80df15e22f321d9ff7f9f543b2bb4b7cf42660fabed8d32cc455aaf3bcaa51fede305ceac933b8489ce7768370e9b560ac1cf WHIRLPOOL 34acbaef26fd45051d37b67767a4b5a686e299c82b005aef0cf542c42efdf54b29cb02b7ff987f7de9ee702eeb3ba4bac4a89d7bcda4b3ab53ca9ace7f9d9e02 -MISC ChangeLog 30511 SHA256 39a14a4e599940a4771e9769edb48a9788dd69e6d11945cbd276acce632d2bf6 SHA512 7bca897b14e1f471a25a5d6ebe6ec8cf2ed9573e28cbb9b0783fad931b3638943e4e4894f41b06831a154f19c625d19d0d6a34c117b395d0bca06588c506489a WHIRLPOOL f433f922480bb96211f1204efa1f1a46d413b95994228d973184a39ed38b72d6ec08c6dbba0a89b7f57a51da16f9a0780064ca0d7ce6f4cc7aa6b0a668ae4b0a +MISC ChangeLog 30684 SHA256 79164cff6f0ee2d36a7e7faf38716305de0a02862f00759082d163706d1f50fd SHA512 b30f84bbe0dd21b510986041299e50b890a3127dceae56f93a7e02dc6c95b1b62533dafb4d16694000165915880c815791c73a7f1e803c43c9371de968157a22 WHIRLPOOL 3b7fe1537d40407278e87e716f964fb7dce32ad0bc5e6363389f8aea2dede3d261c4671689af58d60ec3bc4907d52adca4b6abffc8599eda8477ccbbea06d452 MISC metadata.xml 2969 SHA256 9495aaec1c617cecbd822c10da0e53e7c9a17bab2e68c1c66e134f47bcd7c0ce SHA512 bf03f0e60734551dfe32909a7aea4737d08488e7452ad2e0426f3150573459adc6324809bf797a6943030e567672172a9cd7b32be50e5d246cf33046bea66e9c WHIRLPOOL 987c938ab4d5bb54e0af0ef13d295ac3c0004ebba8b2e1f8a7116d38b5db9590bbfef4bd1154e9e5e7a1f91ae2b816e4c572885d90910975df191c77d56ebaec +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iQF8BAEBCABmBQJRKuPtXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDMDRGNEJFMDZEQTJGRUY3NkI4MEM3NTlE +N0RGQThEMzE4RkE5QUVGAAoJENffqNMY+prv9Y0H/3OubgQe8SGpoymH5i7TRBke +6ExEuR6nnRWqDFAzEIAW9J3VNkajf4dsV4m3utpBUKxij2SCjPLK0hGOyeZo/ru1 +dw5gWij2dCQKvJR3yQBjp9V6qwfWDWCJZXReeWAmY1ykvyXo20ok4OfqJV2RYOTy +edTid5YTTERrMD/1HnDwU1+rk9D1N9VIoz9N2DZt+i4OQIqTJQOP9k6FWbnca5Yd +lt2x6fc1UszZ6L/y5HT6uTHA/nDC2yic2/HVUSUw7DXmLKhvvXSa3iXMTyNMFGg9 +qmxoBNQ3BHd+2TT7/aoNsMTZlNUJu3gG6eGQ8A9ZOLe9EQVgye93BLU4n61zZNQ= +=QBRz +-----END PGP SIGNATURE----- diff --git a/app-emulation/qemu/qemu-1.2.2-r4.ebuild b/app-emulation/qemu/qemu-1.2.2-r4.ebuild new file mode 100644 index 000000000000..79e4133b7ae9 --- /dev/null +++ b/app-emulation/qemu/qemu-1.2.2-r4.ebuild @@ -0,0 +1,474 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-1.2.2-r4.ebuild,v 1.1 2013/02/25 04:08:48 cardoe Exp $ + +EAPI=5 + +MY_PN="qemu-kvm" +MY_P=${MY_PN}-1.2.0 + +PYTHON_DEPEND="2:2.4" +inherit eutils flag-o-matic linux-info toolchain-funcs multilib python \ + user udev fcaps +BACKPORTS=7c9a3a87 + +if [[ ${PV} = *9999* ]]; then + EGIT_REPO_URI="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git" + inherit git-2 + SRC_URI="" + KEYWORDS="" +else + SRC_URI="mirror://sourceforge/kvm/${MY_PN}/${MY_P}.tar.gz + ${BACKPORTS:+ + http://dev.gentoo.org/~cardoe/distfiles/${MY_P}-${BACKPORTS}.tar.xz}" + KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" +fi + +DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" +HOMEPAGE="http://www.linux-kvm.org" + +LICENSE="GPL-2 LGPL-2 BSD-2" +SLOT="0" +IUSE="+aio alsa bluetooth brltty +caps +curl debug doc fdt +jpeg kernel_linux \ +kernel_FreeBSD mixemu ncurses opengl +png pulseaudio python rbd sasl +seccomp \ +sdl selinux smartcard spice static static-softmmu static-user systemtap tci \ ++threads tls usbredir +uuid vde +vhost-net virtfs +vnc xattr xen xfs" + +COMMON_TARGETS="i386 x86_64 alpha arm cris m68k microblaze microblazeel mips +mipsel or32 ppc ppc64 sh4 sh4eb sparc sparc64 s390x unicore32" +IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 mips64 mips64el ppcemb xtensa xtensaeb" +IUSE_USER_TARGETS="${COMMON_TARGETS} armeb ppc64abi32 sparc32plus" + +# Setup the default SoftMMU targets, while using the loops +# below to setup the other targets. +REQUIRED_USE="|| (" + +for target in ${IUSE_SOFTMMU_TARGETS}; do + IUSE="${IUSE} qemu_softmmu_targets_${target}" + REQUIRED_USE="${REQUIRED_USE} qemu_softmmu_targets_${target}" +done +REQUIRED_USE="${REQUIRED_USE} )" + +for target in ${IUSE_USER_TARGETS}; do + IUSE="${IUSE} qemu_user_targets_${target}" +done + +# Block USE flag configurations known to not work +REQUIRED_USE="${REQUIRED_USE} + static? ( static-softmmu static-user ) + static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl ) + virtfs? ( xattr )" + +# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. +LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)] + sys-apps/pciutils[static-libs(+)] + sys-libs/zlib[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.2.0[static-libs(+)] ) + jpeg? ( virtual/jpeg[static-libs(+)] ) + ncurses? ( sys-libs/ncurses[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-1.0.1[static-libs(+)] ) + spice? ( >=app-emulation/spice-0.9.0[static-libs(+)] ) + tls? ( net-libs/gnutls[static-libs(+)] ) + uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] ) + vde? ( net-misc/vde[static-libs(+)] ) + xattr? ( sys-apps/attr[static-libs(+)] ) + xfs? ( sys-fs/xfsprogs[static-libs(+)] )" +RDEPEND="!static-softmmu? ( ${LIB_DEPEND//\[static-libs(+)]} ) + !app-emulation/kqemu + qemu_softmmu_targets_i386? ( + sys-firmware/ipxe + ~sys-firmware/seabios-1.7.1 + ~sys-firmware/sgabios-0.1_pre8 + ~sys-firmware/vgabios-0.7a + ) + qemu_softmmu_targets_x86_64? ( + sys-firmware/ipxe + ~sys-firmware/seabios-1.7.1 + ~sys-firmware/sgabios-0.1_pre8 + ~sys-firmware/vgabios-0.7a + ) + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bluetooth? ( net-wireless/bluez ) + brltty? ( app-accessibility/brltty ) + opengl? ( virtual/opengl ) + pulseaudio? ( media-sound/pulseaudio ) + python? ( =dev-lang/python-2*[ncurses] ) + sdl? ( media-libs/libsdl[X] ) + selinux? ( sec-policy/selinux-qemu ) + smartcard? ( dev-libs/nss ) + spice? ( >=app-emulation/spice-protocol-0.12.2 ) + systemtap? ( dev-util/systemtap ) + usbredir? ( ~sys-apps/usbredir-0.4.4 ) + virtfs? ( sys-libs/libcap ) + xen? ( app-emulation/xen-tools )" + +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( app-text/texi2html ) + kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) + static-softmmu? ( ${LIB_DEPEND} )" + +S="${WORKDIR}/${MY_P}" + +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" + +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" + +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 +} + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + + enewgroup kvm 78 +} + +src_prepare() { + # Alter target makefiles to accept CFLAGS set via flag-o + sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ + Makefile Makefile.target || die + + python_convert_shebangs -r 2 "${S}/scripts/kvm/kvm_stat" + python_convert_shebangs -r 2 "${S}/scripts/kvm/vmxcap" + + epatch "${FILESDIR}"/qemu-1.2.0-cflags.patch + [[ -n ${BACKPORTS} ]] && \ + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \ + epatch + + # Fix ld and objcopy being called directly + tc-export 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 conf_opts audio_opts + local static_flag="static-${buildtype}" + + conf_opts="--prefix=/usr" + conf_opts+=" --sysconfdir=/etc" + conf_opts+=" --docdir=/usr/share/doc/${PF}/html" + conf_opts+=" --disable-bsd-user" + conf_opts+=" --disable-guest-agent" + conf_opts+=" --disable-libiscsi" + conf_opts+=" --disable-strip" + conf_opts+=" --disable-werror" + conf_opts+=" --python=python2" + + # audio options + audio_opts="oss" + use alsa && audio_opts="alsa,${audio_opts}" + use sdl && audio_opts="sdl,${audio_opts}" + use pulseaudio && audio_opts="pa,${audio_opts}" + + if [[ ${buildtype} == "user" ]]; then + conf_opts+=" --enable-linux-user" + conf_opts+=" --disable-system" + conf_opts+=" --target-list=${user_targets}" + conf_opts+=" --disable-bluez" + conf_opts+=" --disable-sdl" + fi + + if [[ ${buildtype} == "softmmu" ]]; then + conf_opts+=" --disable-linux-user" + conf_opts+=" --enable-system" + conf_opts+=" --target-list=${softmmu_targets}" + conf_opts+=" $(use_enable bluetooth bluez)" + conf_opts+=" $(use_enable sdl)" + conf_opts+=" $(use_enable aio linux-aio)" + conf_opts+=" $(use_enable brltty brlapi)" + conf_opts+=" $(use_enable caps cap-ng)" + conf_opts+=" $(use_enable curl)" + conf_opts+=" $(use_enable fdt)" + conf_opts+=" $(use_enable jpeg vnc-jpeg)" + conf_opts+=" $(use_enable kernel_linux kvm)" + conf_opts+=" $(use_enable kernel_linux nptl)" + conf_opts+=" $(use_enable ncurses curses)" + conf_opts+=" $(use_enable opengl)" + conf_opts+=" $(use_enable png vnc-png)" + conf_opts+=" $(use_enable rbd)" + conf_opts+=" $(use_enable sasl vnc-sasl)" + conf_opts+=" $(use_enable seccomp)" + conf_opts+=" $(use_enable smartcard smartcard)" + conf_opts+=" $(use_enable smartcard smartcard-nss)" + conf_opts+=" $(use_enable spice)" + conf_opts+=" $(use_enable tls vnc-tls)" + conf_opts+=" $(use_enable usbredir usb-redir)" + conf_opts+=" $(use_enable uuid)" + conf_opts+=" $(use_enable vde)" + conf_opts+=" $(use_enable vhost-net)" + conf_opts+=" $(use_enable virtfs)" + conf_opts+=" $(use_enable vnc)" + conf_opts+=" $(use_enable xattr attr)" + conf_opts+=" $(use_enable xen)" + conf_opts+=" $(use_enable xen xen-pci-passthrough)" + conf_opts+=" $(use_enable xfs xfsctl)" + use mixemu && conf_opts+=" --enable-mixemu" + conf_opts+=" --audio-drv-list=${audio_opts}" + fi + + conf_opts+=" $(use_enable debug debug-info)" + conf_opts+=" $(use_enable debug debug-tcg)" + conf_opts+=" $(use_enable doc docs)" + conf_opts+=" $(use_enable tci tcg-interpreter)" + + # Add support for SystemTAP + use systemtap && conf_opts="${conf_opts} --enable-trace-backend=dtrace" + + # Add support for static builds + use ${static_flag} && conf_opts="${conf_opts} --static --disable-pie" + + # 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} && gcc-specs-pie; then + conf_opts="${conf_opts} --enable-pie" + fi + + einfo "./configure ${conf_opts}" + cd ${builddir} + ../configure \ + --cc="$(tc-getCC)" \ + --host-cc="$(tc-getBUILD_CC)" \ + ${conf_opts} \ + || die "configure failed" + + # FreeBSD's kernel does not support QEMU assigning/grabbing + # host USB devices yet + use kernel_FreeBSD && \ + sed -E -e "s|^(HOST_USB=)bsd|\1stub|" -i "${S}"/config-host.mak +} + +src_configure() { + softmmu_targets= + user_targets= + + for target in ${IUSE_SOFTMMU_TARGETS} ; do + use "qemu_softmmu_targets_${target}" && \ + softmmu_targets="${softmmu_targets},${target}-softmmu" + done + + for target in ${IUSE_USER_TARGETS} ; do + use "qemu_user_targets_${target}" && \ + user_targets="${user_targets},${target}-linux-user" + 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_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 + + if use kernel_linux; then + udev_dorules "${FILESDIR}"/65-kvm.rules + fi + + if use qemu_softmmu_targets_x86_64 ; then + dosym /usr/bin/qemu-system-x86_64 /usr/bin/qemu-kvm + ewarn "The deprecated '/usr/bin/kvm' symlink is no longer installed" + ewarn "You should use '/usr/bin/qemu-kvm', you may need to edit" + ewarn "your libvirt configs or other wrappers for ${PN}" + elif use x86 || use amd64; then + elog "You disabled QEMU_SOFTMMU_TARGETS=x86_64, this disables install" + elog "of the /usr/bin/qemu-kvm symlink." + fi + + use python && dobin "${S}/scripts/kvm/kvm_stat" + use python && dobin "${S}/scripts/kvm/vmxcap" + fi + + # Install config file example for qemu-bridge-helper + insinto "/etc/qemu" + doins "${FILESDIR}/bridge.conf" + + cd "${S}" + dodoc Changelog MAINTAINERS TODO pci-ids.txt + newdoc pc-bios/README README.pc-bios + + # Avoid collision with app-emulation/libcacard + use smartcard && mv "${ED}/usr/bin/vscclient" "${ED}/usr/bin/qemu-vscclient" + + # 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 + 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/808610de.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 +} + +pkg_postinst() { + if qemu_support_kvm; then + elog "If you don't have kvm compiled into the kernel, make sure you have" + elog "the kernel module loaded before running kvm. The easiest way to" + elog "ensure that the kernel module is loaded is to load it on boot." + elog "For AMD CPUs the module is called 'kvm-amd'" + elog "For Intel CPUs the module is called 'kvm-intel'" + elog "Please review /etc/conf.d/modules for how to load these" + elog + elog "Make sure your user is in the 'kvm' group" + elog "Just run 'gpasswd -a <USER> kvm', then have <USER> re-login." + elog + fi + + fcaps cap_net_admin /usr/libexec/qemu-bridge-helper + use virtfs && fcaps cap_chown cap_dac_override cap_fowner cap_fsetid \ + cap_setgid cap_mknod cap_setuid /usr/libexec/virtfs-proxy-helper + + elog "The ssl USE flag was renamed to tls, so adjust your USE flags." + elog "The nss USE flag was renamed to smartcard, so adjust your USE flags." +} diff --git a/app-emulation/qemu/qemu-1.4.0.ebuild b/app-emulation/qemu/qemu-1.4.0.ebuild index dabed2e9d544..7b6aaa19c8d3 100644 --- a/app-emulation/qemu/qemu-1.4.0.ebuild +++ b/app-emulation/qemu/qemu-1.4.0.ebuild @@ -1,11 +1,12 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-1.4.0.ebuild,v 1.1 2013/02/16 21:43:26 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-1.4.0.ebuild,v 1.2 2013/02/25 04:08:48 cardoe Exp $ EAPI=5 PYTHON_DEPEND="2:2.4" -inherit eutils flag-o-matic linux-info toolchain-funcs multilib python user udev +inherit eutils flag-o-matic linux-info toolchain-funcs multilib python \ + user udev fcaps #BACKPORTS=7c9a3a87 if [[ ${PV} = *9999* ]]; then @@ -395,6 +396,10 @@ src_install() { use python && dobin "${S}/scripts/kvm/vmxcap" fi + # Install config file example for qemu-bridge-helper + insinto "/etc/qemu" + doins "${FILESDIR}/bridge.conf" + cd "${S}" dodoc Changelog MAINTAINERS TODO docs/specs/pci-ids.txt newdoc pc-bios/README README.pc-bios @@ -454,6 +459,10 @@ pkg_postinst() { elog fi + fcaps cap_net_admin /usr/libexec/qemu-bridge-helper + use virtfs && fcaps cap_chown cap_dac_override cap_fowner cap_fsetid \ + cap_setgid cap_mknod cap_setuid /usr/libexec/virtfs-proxy-helper + elog "The ssl USE flag was renamed to tls, so adjust your USE flags." elog "The nss USE flag was renamed to smartcard, so adjust your USE flags." } |