Gentoo Archives: gentoo-commits

From: "Luca Barbato (lu_zero)" <lu_zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/qemu-softmmu: ChangeLog qemu-softmmu-0.9.1-r1.ebuild
Date: Wed, 05 Mar 2008 17:58:57
Message-Id: E1JWxtF-0003Cy-9t@stork.gentoo.org
1 lu_zero 08/03/05 17:58:53
2
3 Modified: ChangeLog
4 Added: qemu-softmmu-0.9.1-r1.ebuild
5 Log:
6 fix CVE-2008-0928, see bug #212351
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.47 app-emulation/qemu-softmmu/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/qemu-softmmu/ChangeLog?rev=1.47&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/qemu-softmmu/ChangeLog?rev=1.47&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/qemu-softmmu/ChangeLog?r1=1.46&r2=1.47
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu-softmmu/ChangeLog,v
19 retrieving revision 1.46
20 retrieving revision 1.47
21 diff -u -r1.46 -r1.47
22 --- ChangeLog 1 Feb 2008 19:37:00 -0000 1.46
23 +++ ChangeLog 5 Mar 2008 17:58:52 -0000 1.47
24 @@ -1,6 +1,13 @@
25 # ChangeLog for app-emulation/qemu-softmmu
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-softmmu/ChangeLog,v 1.46 2008/02/01 19:37:00 lu_zero Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-softmmu/ChangeLog,v 1.47 2008/03/05 17:58:52 lu_zero Exp $
29 +
30 +*qemu-softmmu-0.9.1-r1 (05 Mar 2008)
31 +
32 + 05 Mar 2008; Luca Barbato <lu_zero@g.o>
33 + +files/qemu-softmmu-0.9.1-block-device-address-range.patch,
34 + +qemu-softmmu-0.9.1-r1.ebuild:
35 + Fix CVE-2008-0928, patch from the red hat bugzilla
36
37 01 Feb 2008; Luca Barbato <lu_zero@g.o>
38 -files/qemu-0.8.0-gcc4-hacks.patch, -files/qemu-0.8.0-gcc4-opts.patch,
39
40
41
42 1.1 app-emulation/qemu-softmmu/qemu-softmmu-0.9.1-r1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/qemu-softmmu/qemu-softmmu-0.9.1-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/qemu-softmmu/qemu-softmmu-0.9.1-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: qemu-softmmu-0.9.1-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2008 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-softmmu/qemu-softmmu-0.9.1-r1.ebuild,v 1.1 2008/03/05 17:58:52 lu_zero Exp $
52
53 inherit eutils flag-o-matic toolchain-funcs
54
55 DESCRIPTION="Multi-platform & multi-targets cpu emulator and dynamic translator"
56 HOMEPAGE="http://fabrice.bellard.free.fr/qemu/"
57 SRC_URI="${HOMEPAGE}${P/-softmmu/}.tar.gz"
58
59 LICENSE="GPL-2 LGPL-2.1"
60 SLOT="0"
61 KEYWORDS="-alpha ~amd64 ~ppc -sparc ~x86"
62 IUSE="sdl kqemu gnutls alsa"
63 RESTRICT="binchecks test"
64
65 DEPEND="virtual/libc
66 sys-libs/zlib
67 sdl? ( media-libs/libsdl )
68 !<=app-emulation/qemu-0.7.0
69 kqemu? ( >=app-emulation/kqemu-1.3.0_pre10 )
70 gnutls? (
71 dev-util/pkgconfig
72 net-libs/gnutls
73 )
74 app-text/texi2html"
75 RDEPEND="sys-libs/zlib
76 sdl? ( media-libs/libsdl )
77 gnutls? ( net-libs/gnutls )
78 alsa? ( media-libs/alsa-lib )"
79
80 S="${WORKDIR}/${P/-softmmu/}"
81
82 pkg_setup() {
83 if [ "$(gcc-major-version)" == "4" ]; then
84 eerror "qemu requires gcc-3 in order to build and work correctly"
85 eerror "please compile it switching to gcc-3."
86 eerror "We are aware that qemu can guess a gcc-3 but this feature"
87 eerror "could be harmful."
88 die "gcc 4 cannot build qemu"
89 fi
90 }
91
92 src_unpack() {
93 unpack ${A}
94
95 cd "${S}"
96 # Fix CVE-2008-0928
97 epatch "${FILESDIR}/${P}-block-device-address-range.patch"
98 # Alter target makefiles to accept CFLAGS set via flag-o.
99 sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
100 Makefile Makefile.target tests/Makefile
101 # Ensure mprotect restrictions are relaxed for emulator binaries
102 [[ -x /sbin/paxctl ]] && \
103 sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \
104 Makefile.target
105 # Prevent install of kernel module by qemu's makefile
106 sed -i 's/\(.\/install.sh\)/#\1/' Makefile
107 # avoid strip
108 sed -i 's:$(INSTALL) -m 755 -s:$(INSTALL) -m 755:' Makefile Makefile.target
109 }
110
111 src_compile() {
112 #Let the application set its cflags
113 unset CFLAGS
114
115 # Switch off hardened tech
116 filter-flags -fpie -fstack-protector
117
118 myconf="--disable-gcc-check"
119 if use alsa; then
120 myconf="$myconf --enable-alsa"
121 fi
122 if ! use gnutls; then
123 myconf="$myconf --disable-vnc-tls"
124 fi
125 if ! use kqemu; then
126 myconf="$myconf --disable-kqemu"
127 fi
128 if ! use sdl ; then
129 myconf="$myconf --disable-sdl --disable-gfx-check"
130 fi
131 ./configure \
132 --prefix=/usr \
133 --enable-adlib \
134 --cc=$(tc-getCC) \
135 --host-cc=$(tc-getCC) \
136 --disable-linux-user \
137 --enable-system \
138 ${myconf} \
139 || die "could not configure"
140
141 emake || die "make failed"
142 }
143
144 src_install() {
145 make install \
146 prefix="${D}/usr" \
147 bindir="${D}/usr/bin" \
148 datadir="${D}/usr/share/qemu" \
149 docdir="${D}/usr/share/doc/${P}" \
150 mandir="${D}/usr/share/man" || die
151
152 chmod -x "${D}/usr/share/man/*/*"
153 }
154
155 pkg_postinst() {
156 einfo "You will need the Universal TUN/TAP driver compiled into"
157 einfo "kernel or as a module to use the virtual network device."
158 }
159
160
161
162 --
163 gentoo-commits@l.g.o mailing list