diff --git a/app-emulation/qemu-softmmu/ChangeLog b/app-emulation/qemu-softmmu/ChangeLog deleted file mode 100644 index 0146f9a0..00000000 --- a/app-emulation/qemu-softmmu/ChangeLog +++ /dev/null @@ -1,263 +0,0 @@ -# ChangeLog for app-emulation/qemu-softmmu -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-softmmu/ChangeLog,v 1.55 2008/07/28 19:11:06 cardoe Exp $ - - 28 Jul 2008; Doug Goldstein metadata.xml: - add GLEP 56 USE flag desc from use.local.desc - - 14 May 2008; Markus Meier - qemu-softmmu-0.9.1-r3.ebuild: - amd64 stable, bug #221943 - - 14 May 2008; Luca Barbato - qemu-softmmu-0.9.1-r3.ebuild: - Marked ppc - - 14 May 2008; Christian Faulhammer - qemu-softmmu-0.9.1-r3.ebuild: - stable x86, security bug 212351 - -*qemu-softmmu-0.9.1-r3 (14 May 2008) - - 14 May 2008; Luca Barbato - +files/qemu-softmmu-0.9.1-CVE-2008-2004.patch, - +qemu-softmmu-0.9.1-r3.ebuild: - Address CVE-2008-2004, fix bug #221943, thanks to Celso Fernandes - (icezimm) - -*qemu-softmmu-0.9.1-r2 (12 May 2008) - - 12 May 2008; Peter Volkov - +files/qemu-softmmu-0.9.1-CVE-2008-0928.patch, - +qemu-softmmu-0.9.1-r2.ebuild: - Updated patch for security bug #212351 to avoid qcow2 image regression. - Filtering CFLAGS to allow building with gcc-3.4. - - 20 Apr 2008; Luca Barbato - qemu-softmmu-0.9.1-r1.ebuild: - Move the gcc check in src_unpack - - 09 Mar 2008; Luca Barbato - qemu-softmmu-0.9.1-r1.ebuild: - Marked ppc - -*qemu-softmmu-0.9.1-r1 (05 Mar 2008) - - 05 Mar 2008; Luca Barbato - +files/qemu-softmmu-0.9.1-block-device-address-range.patch, - +qemu-softmmu-0.9.1-r1.ebuild: - Fix CVE-2008-0928, patch from the red hat bugzilla - - 01 Feb 2008; Luca Barbato - -files/qemu-0.8.0-gcc4-hacks.patch, -files/qemu-0.8.0-gcc4-opts.patch, - -files/qemu-0.8.2-linux-headers.patch, -files/qemu-0.8.2-sparc-fp.patch, - -qemu-softmmu-0.8.0.ebuild, -qemu-softmmu-0.8.0.20060329.ebuild, - -qemu-softmmu-0.8.1.ebuild, -qemu-softmmu-0.8.1-r1.ebuild, - -qemu-softmmu-0.8.2.ebuild, -qemu-softmmu-0.8.2-r1.ebuild: - Remove qemu-0.8 series - -*qemu-softmmu-0.9.1 (25 Jan 2008) - - 25 Jan 2008; Luca Barbato +qemu-softmmu-0.9.1.ebuild: - New version, improved ebuild by Carlo Marcelo Arenas Belon - , bugs #204675 - - 13 Nov 2007; Luca Barbato - qemu-softmmu-0.9.0-r1.ebuild: - Mark the revision stable - -*qemu-softmmu-0.9.0-r1 (12 Nov 2007) - - 12 Nov 2007; Luca Barbato - +files/qemu-softmmu-0.9.0-block-qcow2.patch, - +qemu-softmmu-0.9.0-r1.ebuild: - address qcow2 corruption, thanks to Chris Williams - for the patch, see bug #187075 - - 09 Sep 2007; Luca Barbato - +files/qemu-softmmu-0.9.0-ide-cd.patch, qemu-softmmu-0.9.0.ebuild: - Address a glitch in the ide/cdrom emulation, thanks to Carlo Marcelo Arenas - Belon for pointing the patch and reporting the - issue - - 02 Jul 2007; Piotr Jaroszyński - qemu-softmmu-0.8.0.ebuild, qemu-softmmu-0.8.0.20060329.ebuild, - qemu-softmmu-0.8.1.ebuild, qemu-softmmu-0.8.1-r1.ebuild, - qemu-softmmu-0.8.2.ebuild, qemu-softmmu-0.8.2-r1.ebuild, - qemu-softmmu-0.9.0.ebuild: - (QA) RESTRICT clean up. - - 20 May 2007; Christian Faulhammer - qemu-softmmu-0.9.0.ebuild: - stable amd64, security bug 176674 - - 16 May 2007; Luca Barbato qemu-softmmu-0.9.0.ebuild: - Marked ppc - - 08 May 2007; Markus Ullmann qemu-softmmu-0.9.0.ebuild: - Stable on x86 wrt security bug #176674 - - 21 Feb 2007; Piotr Jaroszyński ChangeLog: - Transition to Manifest2. - - 10 Feb 2007; Luca Barbato qemu-softmmu-0.9.0.ebuild: - Fix bug #164491 - - 10 Feb 2007; Luca Barbato qemu-softmmu-0.9.0.ebuild: - Minor update - -*qemu-softmmu-0.9.0 (07 Feb 2007) - - 07 Feb 2007; Luca Barbato +qemu-softmmu-0.9.0.ebuild: - New version - - 06 Feb 2007; Simon Stelling - qemu-softmmu-0.8.2-r1.ebuild: - stable on amd64; bug 159522 - - 02 Jan 2007; Christian Faulhammer - qemu-softmmu-0.8.2-r1.ebuild: - stable x86, bug #159522 - - 31 Dec 2006; Mike Frysinger - +files/qemu-0.8.2-linux-headers.patch, qemu-softmmu-0.8.2-r1.ebuild: - Fix building with sanitized headers. - - 31 Dec 2006; Luca Barbato - qemu-softmmu-0.8.2-r1.ebuild: - Marked ppc - - 22 Nov 2006; Kevin F. Quinn - qemu-softmmu-0.8.2-r1.ebuild: - Add QA variables indicating which files contain textrels, require - execstack, and contain WX PT_LOAD segments. The TEXTRELs are a feature of how - qemu works. The execstack/wx_load markings are for a foreign binary. - - 18 Aug 2006; Luca Barbato qemu-softmmu-0.8.2.ebuild: - remove stray dep - - 17 Aug 2006; Luca Barbato qemu-softmmu-0.8.2.ebuild, - qemu-softmmu-0.8.2-r1.ebuild: - Remove stray bits from the older ebuild - -*qemu-softmmu-0.8.2-r1 (17 Aug 2006) - - 17 Aug 2006; Luca Barbato - qemu-softmmu-0.8.2-r1.ebuild, files/digest-qemu-softmmu-0.8.2-r1: - Added alsa support as requested in bug #116599 by Ivan Yosifov - and adlib support as requested by Jan Simons on the same bug; - use tc-getCC, patch from Damien THEBAULT in - bug #132602, set correct kqemu deps, should solve bug #141721 - - 01 Aug 2006; Luca Barbato qemu-softmmu-0.8.2.ebuild: - False hope, gcc-3 is still required. - -*qemu-softmmu-0.8.2 (01 Aug 2006) - - 01 Aug 2006; Luca Barbato - +files/qemu-0.8.2-sparc-fp.patch, +qemu-softmmu-0.8.2.ebuild: - New version, should work better with gcc-4 - -*qemu-softmmu-0.8.1-r1 (12 Jul 2006) - - 12 Jul 2006; Luca Barbato - +files/qemu-0.8.0-gcc4-hacks.patch, +files/qemu-0.8.0-gcc4-opts.patch, - +qemu-softmmu-0.8.1-r1.ebuild: - Updated revision, with alsa and partial gcc4 support on x86 (phreak and - genstef found the patches) - - 09 Jun 2006; Michael Sterrett - -files/qemu-softmmu-0.7.0-errno.patch, -files/kqemu-0.7.1-sysfs.patch, - -files/kqemu-sysfs.patch, -qemu-softmmu-0.7.0-r1.ebuild, - -qemu-softmmu-0.7.1.ebuild, -qemu-softmmu-0.7.1-r1.ebuild, - -qemu-softmmu-0.7.2.ebuild: - clean out old files - -*qemu-softmmu-0.8.1 (06 May 2006) - - 06 May 2006; Luca Barbato +qemu-softmmu-0.8.1.ebuild: - New version - - 28 Apr 2006; Luca Barbato - qemu-softmmu-0.8.0.20060329.ebuild: - Stray epatch removed - - 27 Apr 2006; Marien Zwart - files/digest-qemu-softmmu-0.7.0-r1, files/digest-qemu-softmmu-0.7.1, - files/digest-qemu-softmmu-0.7.1-r1, files/digest-qemu-softmmu-0.7.2, - files/digest-qemu-softmmu-0.8.0, files/digest-qemu-softmmu-0.8.0.20060329, - Manifest: - Fixing SHA256 digest for real, pass three... - - 27 Apr 2006; Marien Zwart - files/digest-qemu-softmmu-0.7.0-r1, files/digest-qemu-softmmu-0.7.1, - files/digest-qemu-softmmu-0.7.1-r1, files/digest-qemu-softmmu-0.7.2, - files/digest-qemu-softmmu-0.8.0, files/digest-qemu-softmmu-0.8.0.20060329, - Manifest: - Fixing SHA256 digest, pass two. - - 19 Apr 2006; Daniel Gryniewicz ChangeLog: - Marked stable on amd64 per bug# 123972 - - 16 Apr 2006; Michael Hanselmann - qemu-softmmu-0.8.0.ebuild: - Stable on ppc. - - 01 Apr 2006; Luca Barbato qemu-softmmu-0.8.0.ebuild: - Restricted test feature - - 29 Mar 2006; Chris White - qemu-softmmu-0.8.0.ebuild: - x86 stable for qemu-softmmu-0.8.0 bug #123972. - - 08 Jan 2006; Luca Barbato qemu-softmmu-0.8.0.ebuild: - Disable gcc checks, thanks to Robert Führicht - -*qemu-softmmu-0.8.0 (23 Dec 2005) - - 23 Dec 2005; Luca Barbato +qemu-softmmu-0.8.0.ebuild: - New version - - 01 Dec 2005; qemu-softmmu-0.7.0-r1.ebuild, - qemu-softmmu-0.7.1.ebuild, qemu-softmmu-0.7.1-r1.ebuild, - qemu-softmmu-0.7.2.ebuild: - Mark 0.7.2 stable, with workign kqemu. Remove amd64 from older, nonworking - versions - -*qemu-softmmu-0.7.2 (11 Sep 2005) - - 11 Sep 2005; Luca Barbato +qemu-softmmu-0.7.2.ebuild: - New release - - 19 Aug 2005; Aron Griffis - qemu-softmmu-0.7.1-r1.ebuild: - Minor ebuild fixups, particularly move MODULE_NAMES setting into pkg_setup. - The kqemu-sysfs patch is not compatible with 2.6.13-rc1+ because the new - interfaces are GPL-only, so refrain from applying the patch on those - versions; http://lkml.org/lkml/2005/7/4/5 - -*qemu-softmmu-0.7.1-r1 (06 Aug 2005) - - 06 Aug 2005; Luca Barbato - +qemu-softmmu-0.7.1-r1.ebuild: - Fix bug #101524 - - 26 Jul 2005; Luca Barbato - +files/kqemu-0.7.1-sysfs.patch, qemu-softmmu-0.7.1.ebuild: - updated the sysfs patch, thanks to Philippe Weibel - - 26 Jul 2005; Luca Barbato qemu-softmmu-0.7.1.ebuild: - Fixes and workarounds for the latest kernels. - -*qemu-softmmu-0.7.1 (25 Jul 2005) - - 25 Jul 2005; Luca Barbato +qemu-softmmu-0.7.1.ebuild: - New version - -*qemu-softmmu-0.7.0-r1 (18 Jun 2005) - - 18 Jun 2005; Luca Barbato - +files/qemu-softmmu-0.7.0-errno.patch, +files/kqemu-sysfs.patch, - +metadata.xml, +qemu-softmmu-0.7.0-r1.ebuild: - qemu split ebuild, system emulators - diff --git a/app-emulation/qemu-softmmu/Manifest b/app-emulation/qemu-softmmu/Manifest deleted file mode 100644 index f93d99f7..00000000 --- a/app-emulation/qemu-softmmu/Manifest +++ /dev/null @@ -1,8 +0,0 @@ -AUX hotfix.patch 2316 RMD160 c969ffd31a69f3e4394dd97e186943e2081a408c SHA1 3f3c98935deefa1ede830f3fc6caf0295462a37d SHA256 620b04fcbc4ca288e965183f7156c237ed978bd92edb3eec7133fb49e55d7c3f -AUX qemu-0.9.1-gcc4.patch 12472 RMD160 18c9cd2fe148d8aa53cf97118ad5f204f52b5362 SHA1 8cff8dec4b06edafeac8659df657f480fb04feea SHA256 65cd8a53c8c1242e0fcccc02748bc8730f62f1b2b1fec4646ff26d524f852332 -AUX qemu-softmmu-0.9.1-CVE-2008-0928.patch 9346 RMD160 79e4dbf7643d7057da4a74350833c907342fba1e SHA1 2ec9c89e6a995db97aa03cdab490fc0e5cef650c SHA256 ca040bdb401e6cdfe4f009e6874d25853103965370b19756724127b0fd4df559 -AUX qemu-softmmu-0.9.1-CVE-2008-2004.patch 2002 RMD160 88f121766426b1b564d829bf6287aa0b99733ca7 SHA1 208701bd008b119f80553ff4dc441de87ddc98aa SHA256 15918d0e46a23d9b7283088489ce08be41a6ec9ced5df0f55ce1f8bcaa50fac3 -DIST qemu-0.9.1.tar.gz 2804104 RMD160 ee7bdb55a4540df2082d4bde9ebfd2f4e6f201a5 SHA1 630ea20b5989f0df00128de7f7be661c573ed041 SHA256 4756d0b4a4dc7dd88354bc6b37d381e4462dd328d0feef94803e90c0455835a5 -EBUILD qemu-softmmu-0.9.1-r3.ebuild 3271 RMD160 c6f1821d2b661fb3f3146c44c16af05d21fba87a SHA1 dcfbcf62e7f1da096549b8568b1dc32929386bc6 SHA256 e18eccfb3514acb1e09a9a8bba97ac755d5aeaa6974e0646e46fb0f8679d35e4 -MISC ChangeLog 9553 RMD160 8f8bd1c79ea13d18d2dff387cab19611114b9386 SHA1 c4648c024c2507421e212e7d4d66b723bbbbd80a SHA256 f0a6e4970b1f13ec5f2cb7f449beb0b388698e6bcfac305e1bb1ed51c52df223 -MISC metadata.xml 317 RMD160 ec5f64543d9db447cef26e8c71489ec7c732385c SHA1 f159811a9bba96ae163582b6d2aea10fc238f32b SHA256 46819898b75a387dea3828f35205aa0caab4a9b6fe7b44fea8f7b694e9fcbafd diff --git a/app-emulation/qemu-softmmu/files/hotfix.patch b/app-emulation/qemu-softmmu/files/hotfix.patch deleted file mode 100644 index d1adeba0..00000000 --- a/app-emulation/qemu-softmmu/files/hotfix.patch +++ /dev/null @@ -1,38 +0,0 @@ -# --- T2-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# T2 SDE: package/.../qemu/hotfix.patch -# Copyright (C) 2008 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- T2-COPYRIGHT-NOTE-END --- - -Currently not compiling architectures to due our gcc4 patchery relating to: - -dyngen: Unable to replace ret with jmp in op_cmp_str_T0_T1 - - - Rene Rebe - ---- qemu-0.9.1/configure.vanilla 2008-01-22 13:56:47.000000000 +0100 -+++ qemu-0.9.1/configure 2008-01-22 13:56:56.000000000 +0100 -@@ -522,11 +522,11 @@ - if test -z "$target_list" ; then - # these targets are portable - if [ "$softmmu" = "yes" ] ; then -- target_list="i386-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu arm-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu m68k-softmmu sh4-softmmu sh4eb-softmmu cris-softmmu" -+ target_list="i386-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu arm-softmmu cris-softmmu" - fi - # the following are Linux specific - if [ "$linux_user" = "yes" ] ; then -- target_list="i386-linux-user arm-linux-user armeb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user mips-linux-user mipsel-linux-user m68k-linux-user alpha-linux-user sh4-linux-user sh4eb-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user x86_64-linux-user cris-linux-user $target_list" -+ target_list="i386-linux-user arm-linux-user armeb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user mips-linux-user mipsel-linux-user m68k-linux-user alpha-linux-user sh4-linux-user sh4eb-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user x86_64-linux-user cris-linux-user $target_list" - fi - # the following are Darwin specific - if [ "$darwin_user" = "yes" ] ; then diff --git a/app-emulation/qemu-softmmu/files/qemu-0.9.1-gcc4.patch b/app-emulation/qemu-softmmu/files/qemu-0.9.1-gcc4.patch deleted file mode 100644 index 5f1100e5..00000000 --- a/app-emulation/qemu-softmmu/files/qemu-0.9.1-gcc4.patch +++ /dev/null @@ -1,348 +0,0 @@ -diff -Naur qemu-0.9.1.orig/configure qemu-0.9.1/configure ---- qemu-0.9.1.orig/configure 2008-01-06 20:38:42.000000000 +0100 -+++ qemu-0.9.1/configure 2008-02-06 10:19:59.000000000 +0100 -@@ -790,6 +790,12 @@ - if test "$cpu" = "i386" ; then - echo "ARCH=i386" >> $config_mak - echo "#define HOST_I386 1" >> $config_h -+ -+ # add check for gcc4 breakage -+ echo "#if (__GNUC__ > 3)" >> $config_h -+ echo "#define GCC_BREAKS_T_REGISTER" >> $config_h -+ echo "#endif" >> $config_h -+ - elif test "$cpu" = "x86_64" ; then - echo "ARCH=x86_64" >> $config_mak - echo "#define HOST_X86_64 1" >> $config_h -diff -Naur qemu-0.9.1.orig/dyngen.c qemu-0.9.1/dyngen.c ---- qemu-0.9.1.orig/dyngen.c 2008-01-06 20:38:42.000000000 +0100 -+++ qemu-0.9.1/dyngen.c 2008-02-06 10:31:41.000000000 +0100 -@@ -1488,6 +1488,16 @@ - if (get32((uint32_t *)p) != 0x4e800020) - error("blr expected at the end of %s", name); - copy_size = p - p_start; -+ -+/* blr check for inline returns */ -+ -+ if(strstart(name, "op_", NULL) && !strstart(name, "op_exit", NULL)) { -+ for(p=p_start; p < p_end - 4; p+=4) { -+ if ((get32((uint32_t *)p) & 0xfc00fff0) == 0x4c000020) { -+ error("Inline blr detected in %s. Please append FORCE_RET to the function.", name); -+ } -+ } -+ } - } - #elif defined(HOST_S390) - { -@@ -1931,6 +1941,17 @@ - type = ELF32_R_TYPE(rel->r_info); - addend = rel->r_addend; - reloc_offset = rel->r_offset - start_offset; -+ if (strstart(sym_name, "__op_jmp", &p)) { -+ int n; -+ n = strtol(p, NULL, 10); -+ /* __op_jmp relocations are done at -+ runtime to do translated block -+ chaining: the offset of the instruction -+ needs to be stored */ -+ fprintf(outfile, " jmp_offsets[%d] = %d + (gen_code_ptr - gen_code_buf);\n", -+ n, reloc_offset); -+ continue; -+ } - switch(type) { - case R_X86_64_32: - fprintf(outfile, " *(uint32_t *)(gen_code_ptr + %d) = (uint32_t)%s + %d;\n", -diff -Naur qemu-0.9.1.orig/exec-all.h qemu-0.9.1/exec-all.h ---- qemu-0.9.1.orig/exec-all.h 2008-01-06 20:38:42.000000000 +0100 -+++ qemu-0.9.1/exec-all.h 2008-02-06 10:31:41.000000000 +0100 -@@ -142,6 +142,9 @@ - #if defined(__i386__) && !defined(_WIN32) - #define USE_DIRECT_JUMP - #endif -+#if defined(__x86_64__) -+#define USE_DIRECT_JUMP -+#endif - - typedef struct TranslationBlock { - target_ulong pc; /* simulated PC corresponding to this block (EIP + CS base) */ -@@ -228,7 +231,7 @@ - asm volatile ("sync" : : : "memory"); - asm volatile ("isync" : : : "memory"); - } --#elif defined(__i386__) -+#elif defined(__i386__) || defined(__x86_64__) - static inline void tb_set_jmp_target1(unsigned long jmp_addr, unsigned long addr) - { - /* patch the branch destination */ -@@ -320,6 +323,18 @@ - "1:\n");\ - } while (0) - -+#elif defined(__x86_64__) && defined(USE_DIRECT_JUMP) -+ -+#define GOTO_TB(opname, tbparam, n)\ -+do {\ -+ asm volatile (ASM_DATA_SECTION\ -+ ASM_OP_LABEL_NAME(n, opname) ":\n"\ -+ ".quad 1f\n"\ -+ ASM_PREVIOUS_SECTION \ -+ "jmp " ASM_NAME(__op_jmp) #n "\n"\ -+ "1:\n");\ -+} while (0) -+ - #else - - /* jump to next block operations (more portable code, does not need -diff -Naur qemu-0.9.1.orig/softmmu_header.h qemu-0.9.1/softmmu_header.h ---- qemu-0.9.1.orig/softmmu_header.h 2008-01-06 20:38:42.000000000 +0100 -+++ qemu-0.9.1/softmmu_header.h 2008-02-06 10:19:59.000000000 +0100 -@@ -189,9 +189,15 @@ - #else - #error unsupported size - #endif -+#ifdef GCC_BREAKS_T_REGISTER -+ "pushl %%ecx\n" -+#endif - "pushl %6\n" - "call %7\n" - "popl %%eax\n" -+#ifdef GCC_BREAKS_T_REGISTER -+ "popl %%ecx\n" -+#endif - "jmp 2f\n" - "1:\n" - "addl 8(%%edx), %%eax\n" -@@ -209,14 +215,22 @@ - : "r" (ptr), - /* NOTE: 'q' would be needed as constraint, but we could not use it - with T1 ! */ -+#if (DATA_SIZE == 1 || DATA_SIZE == 2) && defined(GCC_BREAKS_T_REGISTER) -+ "q" (v), -+#else - "r" (v), -+#endif - "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS), - "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS), - "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)), - "m" (*(uint32_t *)offsetof(CPUState, tlb_table[CPU_MMU_INDEX][0].addr_write)), - "i" (CPU_MMU_INDEX), - "m" (*(uint8_t *)&glue(glue(__st, SUFFIX), MMUSUFFIX)) -+#ifdef GCC_BREAKS_T_REGISTER -+ : "%eax", "%edx", "memory", "cc"); -+#else - : "%eax", "%ecx", "%edx", "memory", "cc"); -+#endif - } - - #else -diff -Naur qemu-0.9.1.orig/target-alpha/cpu.h qemu-0.9.1/target-alpha/cpu.h ---- qemu-0.9.1.orig/target-alpha/cpu.h 2008-01-06 20:38:44.000000000 +0100 -+++ qemu-0.9.1/target-alpha/cpu.h 2008-02-06 10:19:59.000000000 +0100 -@@ -275,6 +275,8 @@ - * used to emulate 64 bits target on 32 bits hosts - */ - target_ulong t0, t1, t2; -+#elif defined(GCC_BREAKS_T_REGISTER) -+ target_ulong t2; - #endif - /* */ - double ft0, ft1, ft2; -diff -Naur qemu-0.9.1.orig/target-alpha/exec.h qemu-0.9.1/target-alpha/exec.h ---- qemu-0.9.1.orig/target-alpha/exec.h 2008-01-06 20:38:44.000000000 +0100 -+++ qemu-0.9.1/target-alpha/exec.h 2008-02-06 10:19:59.000000000 +0100 -@@ -36,6 +36,12 @@ - #define T1 (env->t1) - #define T2 (env->t2) - -+#elif defined(GCC_BREAKS_T_REGISTER) -+ -+register uint64_t T0 asm(AREG1); -+register uint64_t T1 asm(AREG2); -+#define T2 (env->t2) -+ - #else - - register uint64_t T0 asm(AREG1); -diff -Naur qemu-0.9.1.orig/target-alpha/op_template.h qemu-0.9.1/target-alpha/op_template.h ---- qemu-0.9.1.orig/target-alpha/op_template.h 2008-01-06 20:38:44.000000000 +0100 -+++ qemu-0.9.1/target-alpha/op_template.h 2008-02-06 10:31:23.000000000 +0100 -@@ -29,7 +29,26 @@ - #if !defined(HOST_SPARC) && !defined(HOST_SPARC64) - void OPPROTO glue(op_reset_FT, REG) (void) - { -+#ifdef HOST_PPC -+ /* We have a problem with HOST_PPC here: -+ We want this code: -+ glue(FT, REG) = 0; -+ unfortunately GCC4 notices that this stores (double)0.0 into -+ env->ft0 and emits that constant into the .rodata, and instructions -+ to load that zero from there. But that construct can't be parsed by dyngen. -+ We could add -ffast-math for compiling op.c, that would just make it generate -+ two stores of zeros into both words of ft0. But -ffast-math may have other -+ side-effects regarding the emulation. We could use __builtin_memset, -+ which perhaps would be the sanest. That relies on -O2 and our other options -+ to inline that memset, which currently it does, but who knows for how long. -+ So, we simply do that by hand, and a barely typesafe way :-/ */ -+ union baeh { double d; unsigned int i[2];}; -+ union baeh *p = (union baeh*)&(glue(FT, REG)); -+ p->i[0] = 0; -+ p->i[1] = 0; -+#else - glue(FT, REG) = 0; -+#endif - RETURN(); - } - #else -diff -Naur qemu-0.9.1.orig/target-arm/cpu.h qemu-0.9.1/target-arm/cpu.h ---- qemu-0.9.1.orig/target-arm/cpu.h 2008-01-06 20:38:44.000000000 +0100 -+++ qemu-0.9.1/target-arm/cpu.h 2008-02-06 10:19:59.000000000 +0100 -@@ -66,6 +66,9 @@ - */ - - typedef struct CPUARMState { -+#if defined(GCC_BREAKS_T_REGISTER) -+ uint32_t t2; -+#endif - /* Regs for current mode. */ - uint32_t regs[16]; - /* Frequently accessed CPSR bits are stored separately for efficiently. -diff -Naur qemu-0.9.1.orig/target-arm/exec.h qemu-0.9.1/target-arm/exec.h ---- qemu-0.9.1.orig/target-arm/exec.h 2008-01-06 20:38:44.000000000 +0100 -+++ qemu-0.9.1/target-arm/exec.h 2008-02-06 10:19:59.000000000 +0100 -@@ -23,7 +23,12 @@ - register struct CPUARMState *env asm(AREG0); - register uint32_t T0 asm(AREG1); - register uint32_t T1 asm(AREG2); -+#if defined(GCC_BREAKS_T_REGISTER) -+#define T2 (env->t2) -+#else - register uint32_t T2 asm(AREG3); -+#endif -+ - - /* TODO: Put these in FP regs on targets that have such things. */ - /* It is ok for FT0s and FT0d to overlap. Likewise FT1s and FT1d. */ -diff -Naur qemu-0.9.1.orig/target-i386/cpu.h qemu-0.9.1/target-i386/cpu.h ---- qemu-0.9.1.orig/target-i386/cpu.h 2008-01-06 20:38:45.000000000 +0100 -+++ qemu-0.9.1/target-i386/cpu.h 2008-02-06 10:19:59.000000000 +0100 -@@ -470,6 +470,8 @@ - #if TARGET_LONG_BITS > HOST_LONG_BITS - /* temporaries if we cannot store them in host registers */ - target_ulong t0, t1, t2; -+#elif defined(GCC_BREAKS_T_REGISTER) -+ target_ulong t1; - #endif - - /* standard registers */ -diff -Naur qemu-0.9.1.orig/target-i386/exec.h qemu-0.9.1/target-i386/exec.h ---- qemu-0.9.1.orig/target-i386/exec.h 2008-01-06 20:38:45.000000000 +0100 -+++ qemu-0.9.1/target-i386/exec.h 2008-02-06 10:19:59.000000000 +0100 -@@ -39,6 +39,12 @@ - #define T1 (env->t1) - #define T2 (env->t2) - -+#elif defined(GCC_BREAKS_T_REGISTER) -+ -+register target_ulong T0 asm(AREG1); -+#define T1 (env->t1) -+register target_ulong T2 asm(AREG3); -+ - #else - - /* XXX: use unsigned long instead of target_ulong - better code will -diff -Naur qemu-0.9.1.orig/target-i386/op.c qemu-0.9.1/target-i386/op.c ---- qemu-0.9.1.orig/target-i386/op.c 2008-01-06 20:38:45.000000000 +0100 -+++ qemu-0.9.1/target-i386/op.c 2008-02-06 10:31:17.000000000 +0100 -@@ -290,6 +290,7 @@ - EDX = (uint32_t)(res >> 32); - CC_DST = res; - CC_SRC = (res != (int32_t)res); -+ FORCE_RET(); - } - - void OPPROTO op_imulw_T0_T1(void) -@@ -299,6 +300,7 @@ - T0 = res; - CC_DST = res; - CC_SRC = (res != (int16_t)res); -+ FORCE_RET(); - } - - void OPPROTO op_imull_T0_T1(void) -@@ -308,6 +310,7 @@ - T0 = res; - CC_DST = res; - CC_SRC = (res != (int32_t)res); -+ FORCE_RET(); - } - - #ifdef TARGET_X86_64 -diff -Naur qemu-0.9.1.orig/target-i386/ops_template.h qemu-0.9.1/target-i386/ops_template.h ---- qemu-0.9.1.orig/target-i386/ops_template.h 2008-01-06 20:38:45.000000000 +0100 -+++ qemu-0.9.1/target-i386/ops_template.h 2008-02-06 10:31:17.000000000 +0100 -@@ -467,6 +467,7 @@ - int count; - count = T1 & SHIFT_MASK; - CC_SRC = T0 >> count; -+ FORCE_RET(); - } - - void OPPROTO glue(glue(op_bts, SUFFIX), _T0_T1_cc)(void) -diff -Naur qemu-0.9.1.orig/target-mips/cpu.h qemu-0.9.1/target-mips/cpu.h ---- qemu-0.9.1.orig/target-mips/cpu.h 2008-01-06 20:38:45.000000000 +0100 -+++ qemu-0.9.1/target-mips/cpu.h 2008-02-06 10:19:59.000000000 +0100 -@@ -149,6 +149,8 @@ - target_ulong t0; - target_ulong t1; - target_ulong t2; -+#elif defined(GCC_BREAKS_T_REGISTER) -+ target_ulong t2; - #endif - target_ulong HI[MIPS_DSP_ACC][MIPS_TC_MAX]; - target_ulong LO[MIPS_DSP_ACC][MIPS_TC_MAX]; -diff -Naur qemu-0.9.1.orig/target-mips/exec.h qemu-0.9.1/target-mips/exec.h ---- qemu-0.9.1.orig/target-mips/exec.h 2008-01-06 20:38:45.000000000 +0100 -+++ qemu-0.9.1/target-mips/exec.h 2008-02-06 10:19:59.000000000 +0100 -@@ -14,6 +14,10 @@ - #define T0 (env->t0) - #define T1 (env->t1) - #define T2 (env->t2) -+#elif defined(GCC_BREAKS_T_REGISTER) -+register target_ulong T0 asm(AREG1); -+register target_ulong T1 asm(AREG2); -+#define T2 (env->t2) - #else - register target_ulong T0 asm(AREG1); - register target_ulong T1 asm(AREG2); -diff -Naur qemu-0.9.1.orig/target-ppc/exec.h qemu-0.9.1/target-ppc/exec.h ---- qemu-0.9.1.orig/target-ppc/exec.h 2008-01-06 20:38:45.000000000 +0100 -+++ qemu-0.9.1/target-ppc/exec.h 2008-02-06 10:29:35.000000000 +0100 -@@ -38,6 +38,10 @@ - #define T1 (env->t1) - #define T2 (env->t2) - #define TDX "%016" PRIx64 -+#elif defined(GCC_BREAKS_T_REGISTER) -+register unsigned long T0 asm(AREG1); -+register unsigned long T1 asm(AREG2); -+#define T2 (env->t2) - #else - register unsigned long T0 asm(AREG1); - register unsigned long T1 asm(AREG2); -diff -Naur qemu-0.9.1.orig/target-sparc/exec.h qemu-0.9.1/target-sparc/exec.h ---- qemu-0.9.1.orig/target-sparc/exec.h 2008-01-06 20:38:45.000000000 +0100 -+++ qemu-0.9.1/target-sparc/exec.h 2008-02-06 10:19:59.000000000 +0100 -@@ -32,9 +32,13 @@ - - #else - #define REGWPTR env->regwptr -+#if !defined(GCC_BREAKS_T_REGISTER) - register uint32_t T2 asm(AREG3); --#endif - #define reg_T2 -+#else -+#define T2 (env->t2) -+#endif -+#endif - #endif - - #define FT0 (env->ft0) diff --git a/app-emulation/qemu-softmmu/files/qemu-softmmu-0.9.1-CVE-2008-0928.patch b/app-emulation/qemu-softmmu/files/qemu-softmmu-0.9.1-CVE-2008-0928.patch deleted file mode 100644 index ee410d64..00000000 --- a/app-emulation/qemu-softmmu/files/qemu-softmmu-0.9.1-CVE-2008-0928.patch +++ /dev/null @@ -1,239 +0,0 @@ -https://bugzilla.redhat.com/show_bug.cgi?id=433560 - -Revised block device address range patch - -The original patch adds checks to the main bdrv_XXX apis to validate that -the I/O operation does not exceed the bounds of the disk - ie beyond the -total_sectors count. This works correctly for bdrv_XXX calls from the IDE -driver. With disk formats like QCow though, bdrv_XXX is re-entrant, -because the QCow driver uses the block APIs for dealing with its underlying -file. The problem is that QCow files are grow-on-demand, so writes will -*explicitly* be beyond the end of the file. The original patch blocks any -I/O operation which would cause the QCow file to grow, resulting it more -or less catasatrophic data loss. - -Basically the bounds checking needs to distinguish between checking for -the logical disk extents, vs the physical disk extents. For raw files -these are the same so initial tests showed no problems, but for QCow -format disks they are different & thus we see a problem - -What follows is a revised patch which introduces a flag BDRV_O_AUTOGROW -which can be passed to bdrv_open to indicate that the files can be allowed -to automatically extend their extents. This flag should only be used by -internal block drivers such as block-qcow2.c, block-vmdk.c In my testing -this has fixed the qcow corruption, and still maintains the goal of Ian's -original patch which was to prevent the guest VM writing beyond the logical -disk extents. - -diff -rup kvm-60.orig/qemu/block.c kvm-60.new/qemu/block.c ---- kvm-60.orig/qemu/block.c 2008-02-26 18:44:28.000000000 -0500 -+++ kvm-60.new/qemu/block.c 2008-02-26 18:44:52.000000000 -0500 -@@ -124,6 +124,60 @@ void path_combine(char *dest, int dest_s - } - } - -+static int bdrv_rd_badreq_sectors(BlockDriverState *bs, -+ int64_t sector_num, int nb_sectors) -+{ -+ return -+ nb_sectors < 0 || -+ sector_num < 0 || -+ nb_sectors > bs->total_sectors || -+ sector_num > bs->total_sectors - nb_sectors; -+} -+ -+static int bdrv_rd_badreq_bytes(BlockDriverState *bs, -+ int64_t offset, int count) -+{ -+ int64_t size = bs->total_sectors << SECTOR_BITS; -+ return -+ count < 0 || -+ size < 0 || -+ count > size || -+ offset > size - count; -+} -+ -+static int bdrv_wr_badreq_sectors(BlockDriverState *bs, -+ int64_t sector_num, int nb_sectors) -+{ -+ if (sector_num < 0 || -+ nb_sectors < 0) -+ return 1; -+ -+ if (sector_num > bs->total_sectors - nb_sectors) { -+ if (bs->autogrow) -+ bs->total_sectors = sector_num + nb_sectors; -+ else -+ return 1; -+ } -+ return 0; -+} -+ -+static int bdrv_wr_badreq_bytes(BlockDriverState *bs, -+ int64_t offset, int count) -+{ -+ int64_t size = bs->total_sectors << SECTOR_BITS; -+ if (count < 0 || -+ offset < 0) -+ return 1; -+ -+ if (offset > size - count) { -+ if (bs->autogrow) -+ bs->total_sectors = (offset + count + SECTOR_SIZE - 1) >> SECTOR_BITS; -+ else -+ return 1; -+ } -+ return 0; -+} -+ - - static void bdrv_register(BlockDriver *bdrv) - { -@@ -332,6 +386,10 @@ int bdrv_open2(BlockDriverState *bs, con - bs->read_only = 0; - bs->is_temporary = 0; - bs->encrypted = 0; -+ bs->autogrow = 0; -+ -+ if (flags & BDRV_O_AUTOGROW) -+ bs->autogrow = 1; - - if (flags & BDRV_O_SNAPSHOT) { - BlockDriverState *bs1; -@@ -376,6 +434,7 @@ int bdrv_open2(BlockDriverState *bs, con - } - bs->drv = drv; - bs->opaque = qemu_mallocz(drv->instance_size); -+ bs->total_sectors = 0; /* driver will set if it does not do getlength */ - if (bs->opaque == NULL && drv->instance_size > 0) - return -1; - /* Note: for compatibility, we open disk image files as RDWR, and -@@ -441,6 +500,7 @@ void bdrv_close(BlockDriverState *bs) - bs->drv = NULL; - - /* call the change callback */ -+ bs->total_sectors = 0; - bs->media_changed = 1; - if (bs->change_cb) - bs->change_cb(bs->change_opaque); -@@ -506,6 +566,8 @@ int bdrv_read(BlockDriverState *bs, int6 - if (!drv) - return -ENOMEDIUM; - -+ if (bdrv_rd_badreq_sectors(bs, sector_num, nb_sectors)) -+ return -EDOM; - if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { - memcpy(buf, bs->boot_sector_data, 512); - sector_num++; -@@ -546,6 +608,8 @@ int bdrv_write(BlockDriverState *bs, int - return -ENOMEDIUM; - if (bs->read_only) - return -EACCES; -+ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors)) -+ return -EDOM; - if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { - memcpy(bs->boot_sector_data, buf, 512); - } -@@ -671,6 +735,8 @@ int bdrv_pread(BlockDriverState *bs, int - return -ENOMEDIUM; - if (!drv->bdrv_pread) - return bdrv_pread_em(bs, offset, buf1, count1); -+ if (bdrv_rd_badreq_bytes(bs, offset, count1)) -+ return -EDOM; - return drv->bdrv_pread(bs, offset, buf1, count1); - } - -@@ -686,6 +752,8 @@ int bdrv_pwrite(BlockDriverState *bs, in - return -ENOMEDIUM; - if (!drv->bdrv_pwrite) - return bdrv_pwrite_em(bs, offset, buf1, count1); -+ if (bdrv_wr_badreq_bytes(bs, offset, count1)) -+ return -EDOM; - return drv->bdrv_pwrite(bs, offset, buf1, count1); - } - -@@ -1091,6 +1159,8 @@ int bdrv_write_compressed(BlockDriverSta - return -ENOMEDIUM; - if (!drv->bdrv_write_compressed) - return -ENOTSUP; -+ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors)) -+ return -EDOM; - return drv->bdrv_write_compressed(bs, sector_num, buf, nb_sectors); - } - -@@ -1237,6 +1307,8 @@ BlockDriverAIOCB *bdrv_aio_read(BlockDri - - if (!drv) - return NULL; -+ if (bdrv_rd_badreq_sectors(bs, sector_num, nb_sectors)) -+ return NULL; - - /* XXX: we assume that nb_sectors == 0 is suppored by the async read */ - if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { -@@ -1268,6 +1340,8 @@ BlockDriverAIOCB *bdrv_aio_write(BlockDr - return NULL; - if (bs->read_only) - return NULL; -+ if (bdrv_wr_badreq_sectors(bs, sector_num, nb_sectors)) -+ return NULL; - if (sector_num == 0 && bs->boot_sector_enabled && nb_sectors > 0) { - memcpy(bs->boot_sector_data, buf, 512); - } -diff -rup kvm-60.orig/qemu/block.h kvm-60.new/qemu/block.h ---- kvm-60.orig/qemu/block.h 2008-01-20 07:35:04.000000000 -0500 -+++ kvm-60.new/qemu/block.h 2008-02-26 18:44:52.000000000 -0500 -@@ -45,6 +45,7 @@ typedef struct QEMUSnapshotInfo { - it (default for - bdrv_file_open()) */ - #define BDRV_O_DIRECT 0x0020 -+#define BDRV_O_AUTOGROW 0x0040 /* Allow backing file to extend when writing past end of file */ - - #ifndef QEMU_IMG - void bdrv_info(void); -diff -rup kvm-60.orig/qemu/block_int.h kvm-60.new/qemu/block_int.h ---- kvm-60.orig/qemu/block_int.h 2008-01-20 07:35:04.000000000 -0500 -+++ kvm-60.new/qemu/block_int.h 2008-02-26 18:44:52.000000000 -0500 -@@ -97,6 +97,7 @@ struct BlockDriverState { - int locked; /* if true, the media cannot temporarily be ejected */ - int encrypted; /* if true, the media is encrypted */ - int sg; /* if true, the device is a /dev/sg* */ -+ int autogrow; /* if true, the backing store can auto-extend to allocate new extents */ - /* event callback when inserting/removing */ - void (*change_cb)(void *opaque); - void *change_opaque; -diff -rup kvm-60.orig/qemu/block-qcow2.c kvm-60.new/qemu/block-qcow2.c ---- kvm-60.orig/qemu/block-qcow2.c 2008-01-20 07:35:04.000000000 -0500 -+++ kvm-60.new/qemu/block-qcow2.c 2008-02-26 18:44:52.000000000 -0500 -@@ -191,7 +191,7 @@ static int qcow_open(BlockDriverState *b - int len, i, shift, ret; - QCowHeader header; - -- ret = bdrv_file_open(&s->hd, filename, flags); -+ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW); - if (ret < 0) - return ret; - if (bdrv_pread(s->hd, 0, &header, sizeof(header)) != sizeof(header)) -diff -rup kvm-60.orig/qemu/block-qcow.c kvm-60.new/qemu/block-qcow.c ---- kvm-60.orig/qemu/block-qcow.c 2008-01-20 07:35:04.000000000 -0500 -+++ kvm-60.new/qemu/block-qcow.c 2008-02-26 18:44:52.000000000 -0500 -@@ -95,7 +95,7 @@ static int qcow_open(BlockDriverState *b - int len, i, shift, ret; - QCowHeader header; - -- ret = bdrv_file_open(&s->hd, filename, flags); -+ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW); - if (ret < 0) - return ret; - if (bdrv_pread(s->hd, 0, &header, sizeof(header)) != sizeof(header)) -diff -rup kvm-60.orig/qemu/block-vmdk.c kvm-60.new/qemu/block-vmdk.c ---- kvm-60.orig/qemu/block-vmdk.c 2008-01-20 07:35:04.000000000 -0500 -+++ kvm-60.new/qemu/block-vmdk.c 2008-02-26 18:44:52.000000000 -0500 -@@ -375,7 +375,7 @@ static int vmdk_open(BlockDriverState *b - flags = BDRV_O_RDONLY; - fprintf(stderr, "(VMDK) image open: flags=0x%x filename=%s\n", flags, bs->filename); - -- ret = bdrv_file_open(&s->hd, filename, flags); -+ ret = bdrv_file_open(&s->hd, filename, flags | BDRV_O_AUTOGROW); - if (ret < 0) - return ret; - if (bdrv_pread(s->hd, 0, &magic, sizeof(magic)) != sizeof(magic)) diff --git a/app-emulation/qemu-softmmu/files/qemu-softmmu-0.9.1-CVE-2008-2004.patch b/app-emulation/qemu-softmmu/files/qemu-softmmu-0.9.1-CVE-2008-2004.patch deleted file mode 100644 index c30a54de..00000000 --- a/app-emulation/qemu-softmmu/files/qemu-softmmu-0.9.1-CVE-2008-2004.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- vl.c 2008-01-06 14:38:42.000000000 -0500 -+++ vl.c 2008-05-13 09:56:45.000000000 -0400 -@@ -4877,13 +4877,14 @@ - int bus_id, unit_id; - int cyls, heads, secs, translation; - BlockDriverState *bdrv; -+ BlockDriver *drv = NULL; - int max_devs; - int index; - int cache; - int bdrv_flags; - char *params[] = { "bus", "unit", "if", "index", "cyls", "heads", - "secs", "trans", "media", "snapshot", "file", -- "cache", NULL }; -+ "cache", "format", NULL }; - - if (check_params(buf, sizeof(buf), params, str) < 0) { - fprintf(stderr, "qemu: unknowm parameter '%s' in '%s'\n", -@@ -5051,6 +5052,14 @@ - } - } - -+ if (get_param_value(buf, sizeof(buf), "format", str)) { -+ drv = bdrv_find_format(buf); -+ if (!drv) { -+ fprintf(stderr, "qemu: '%s' invalid format\n", buf); -+ return -1; -+ } -+ } -+ - get_param_value(file, sizeof(file), "file", str); - - /* compute bus and unit according index */ -@@ -5150,7 +5159,7 @@ - bdrv_flags |= BDRV_O_SNAPSHOT; - if (!cache) - bdrv_flags |= BDRV_O_DIRECT; -- if (bdrv_open(bdrv, file, bdrv_flags) < 0 || qemu_key_check(bdrv, file)) { -+ if (bdrv_open2(bdrv, file, bdrv_flags, drv) < 0 || qemu_key_check(bdrv, file)) { - fprintf(stderr, "qemu: could not open disk image %s\n", - file); - return -1; ---- qemu-doc.texi 2008-01-06 14:38:42.000000000 -0500 -+++ qemu-doc.texi 2008-05-13 09:57:57.000000000 -0400 -@@ -252,6 +252,10 @@ - @var{snapshot} is "on" or "off" and allows to enable snapshot for given drive (see @option{-snapshot}). - @item cache=@var{cache} - @var{cache} is "on" or "off" and allows to disable host cache to access data. -+@item format=@var{format} -+Specify which disk @var{format} will be used rather than detecting -+the format. Can be used to specifiy format=raw to avoid interpreting -+an untrusted format header. - @end table - - Instead of @option{-cdrom} you can use: diff --git a/app-emulation/qemu-softmmu/metadata.xml b/app-emulation/qemu-softmmu/metadata.xml deleted file mode 100644 index 07a9d971..00000000 --- a/app-emulation/qemu-softmmu/metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - -no-herd - - lu_zero@gentoo.org - - - Enables the kernel acceleration module on a x86 - cpu - - diff --git a/app-emulation/qemu-softmmu/qemu-softmmu-0.9.1-r3.ebuild b/app-emulation/qemu-softmmu/qemu-softmmu-0.9.1-r3.ebuild deleted file mode 100644 index 50b19f79..00000000 --- a/app-emulation/qemu-softmmu/qemu-softmmu-0.9.1-r3.ebuild +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-softmmu/qemu-softmmu-0.9.1-r3.ebuild,v 1.4 2008/05/14 20:25:37 maekke Exp $ - -inherit eutils flag-o-matic toolchain-funcs - -DESCRIPTION="Multi-platform & multi-targets cpu emulator and dynamic translator" -HOMEPAGE="http://fabrice.bellard.free.fr/qemu/" -SRC_URI="${HOMEPAGE}${P/-softmmu/}.tar.gz" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="-alpha amd64 ppc -sparc x86" -IUSE="sdl kqemu gnutls alsa" -RESTRICT="binchecks test" - -DEPEND="virtual/libc - sys-libs/zlib - sdl? ( media-libs/libsdl ) - !<=app-emulation/qemu-0.7.0 - kqemu? ( >=app-emulation/kqemu-1.3.0_pre10 ) - gnutls? ( - dev-util/pkgconfig - net-libs/gnutls - ) - app-text/texi2html" -RDEPEND="sys-libs/zlib - sdl? ( media-libs/libsdl ) - gnutls? ( net-libs/gnutls ) - alsa? ( media-libs/alsa-lib )" - -S=${WORKDIR}/${P/-softmmu/} - -src_unpack() { - unpack ${A} - - cd "${S}" - epatch "${FILESDIR}/qemu-0.9.1-gcc4.patch" - epatch "${FILESDIR}/hotfix.patch" - epatch "${FILESDIR}/${P}-CVE-2008-0928.patch" #212351 - epatch "${FILESDIR}/${P}-CVE-2008-2004.patch" #221943 - # Alter target makefiles to accept CFLAGS set via flag-o. - sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ - Makefile Makefile.target tests/Makefile - # Ensure mprotect restrictions are relaxed for emulator binaries - [[ -x /sbin/paxctl ]] && \ - sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \ - Makefile.target - # Prevent install of kernel module by qemu's makefile - sed -i 's/\(.\/install.sh\)/#\1/' Makefile - # avoid strip - sed -i 's:$(INSTALL) -m 755 -s:$(INSTALL) -m 755:' Makefile Makefile.target -} - -src_compile() { - if use x86 ; then - # Force -march=pentium-mmx or lower. Fixes bug #212351. - local march - march=$(echo "${CFLAGS}" | sed 's:^.*-march=\([[:alnum:]-]\+\)\([[:blank:]].*\)\?$:\1:p;d') - case ${march} in - i386|i486|i586|pentium) ;; - *) # Either march is not enough low or not exists at all - case ${CHOST} in - i486-*-*) march=i486 ;; - i586-*-*) march=i586 ;; - *) march=pentium-mmx ;; - esac ;; - esac - #Let the application set its cflags - unset CFLAGS - append-flags -march=${march} - else - #Let the application set its cflags - unset CFLAGS - fi - - # Switch off hardened tech - filter-flags -fpie -fstack-protector - - myconf="--disable-gcc-check" - if use alsa; then - myconf="$myconf --enable-alsa" - fi - if ! use gnutls; then - myconf="$myconf --disable-vnc-tls" - fi - if ! use kqemu; then - myconf="$myconf --disable-kqemu" - fi - if ! use sdl ; then - myconf="$myconf --disable-sdl --disable-gfx-check" - fi - # econf does not work - ./configure \ - --prefix=/usr \ - --enable-adlib \ - --cc=$(tc-getCC) \ - --host-cc=$(tc-getCC) \ - --disable-linux-user \ - --enable-system \ - ${myconf} \ - || die "could not configure" - - emake OS_CFLAGS="${CFLAGS}" || die "make failed" -} - -src_install() { - emake install \ - prefix="${D}/usr" \ - bindir="${D}/usr/bin" \ - datadir="${D}/usr/share/qemu" \ - docdir="${D}/usr/share/doc/${P}" \ - mandir="${D}/usr/share/man" || die - - chmod -x "${D}/usr/share/man/*/*" -} - -pkg_postinst() { - einfo "You will need the Universal TUN/TAP driver compiled into" - einfo "kernel or as a module to use the virtual network device." -}