1 |
commit: 73f23e40d4d51cbe2e92edb340eb174b044aab06 |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 18 02:55:00 2016 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 18 03:06:22 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73f23e40 |
7 |
|
8 |
app-emulation/xen-tools: bump to 4.6.1, update ovmf-20151110 |
9 |
|
10 |
Package-Manager: portage-2.2.27 |
11 |
|
12 |
app-emulation/xen-tools/Manifest | 3 + |
13 |
app-emulation/xen-tools/files/gentoo-patches.conf | 7 + |
14 |
app-emulation/xen-tools/xen-tools-4.6.1.ebuild | 470 ++++++++++++++++++++++ |
15 |
3 files changed, 480 insertions(+) |
16 |
|
17 |
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest |
18 |
index 4a880d3..e4b823f 100644 |
19 |
--- a/app-emulation/xen-tools/Manifest |
20 |
+++ b/app-emulation/xen-tools/Manifest |
21 |
@@ -1,11 +1,14 @@ |
22 |
DIST ovmf-20150629.tar.bz2 24265640 SHA256 9f316dc44e192fa9d5d7486cf1dae3f3094ab4f20f282f80d6251632c2cd6118 SHA512 b15a896b5222b920a500ec8a1eba5d670505441ffd02accf9b6c0deb9a12c1c5513a016f91eae5cb33f75ee9f28435dc957686e6ce8b5d0744c11a7d7262fffd WHIRLPOOL 8db4360dcb85f183dbd827f7381787c84065f94eaf746068b11ef7b30412b16cc0ba75effb04f01dea5f4f67967721f7aca11a2550035e95c59645c7964526ac |
23 |
+DIST ovmf-20151110.tar.bz2 27518370 SHA256 74199f6b5c6f756881323242742c396c52096db5f61700a4eb839343f9ab0604 SHA512 dda185af2fc0b9a8d5fc7e1e96db6aa31807782fe77d38491896164d125c30d2277db3d71a7dce7bbd569723b344b97dfebbc78ddddca0a095721f6b1ae3a1d3 WHIRLPOOL 145fb1c873cce96b81b269b44800987ca1b7350425b682fd5a5799648b0270c6c17bb337ad7e06650e6b66a9ac6eef8d9c9239f1478a687be4af187e60c3f3f5 |
24 |
DIST seabios-1.7.5.tar.gz 537566 SHA256 858d9eda4ad91efa1c45a5a401d560ef9ca8dd172f03b0a106f06661c252dc51 SHA512 ecf5fb9ac44dde6e4ac00baa6c920dde51b923f23dd74e62c5a02eceaf235e57b885975c5a8bd0927e268115c72bd1143a080fdfd4eff4e168ebeaa30436280e WHIRLPOOL 5e1e99b3bd82a8607c5986fde4592c7437bec4bd78abd5873710f6c431d075436725e8d0d32e9f0dd2921c9d84b8613108b21d31c5309a73e337ead7adf35e90 |
25 |
DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 SHA512 798d222d5f5725a805cde9e6000b5ce714d0551fd4a3c2642cc6e77b2bdab1a9e239939a358a23bbe0e00112f5ad70696c87d20b90655463c835541fc04e1a00 WHIRLPOOL 9cda0ad502a59dd718c543b759ac3fcf5acb4adee70c3da9bfea95ab188415acf6425827de77f45421ec3be8fd9e0c37fb486e62828217ba3e83f88d942a3f4a |
26 |
DIST xen-4.5.2.tar.gz 18416220 SHA256 4c9e5dac4eea484974e9f76da2756c8e0973b4e884d28d37e955df9ebf00e7e8 SHA512 e0ce01a5356c254bfde48fae0b0e005c42c1615a7ccf4c1ba7dcf90784777b53995e9a9ae4575e3f19ef341014b34cb8c06e39d68be359f7fd69830501a144dd WHIRLPOOL b50ce28e58d8419915f7f85de7ab23128719fa07c54f28165c4ba864ffe57230230fa7cb61dd2ed7608b8bc178a072124aedc30c61a45fb8b745fc616715219b |
27 |
DIST xen-4.6.0-upstream-patches-0.tar.xz 19280 SHA256 8ef2d139f86cb52d2208a17c974e5a85356183ee359ab4b91882067548806e0c SHA512 9fde8d9def1d75e50c10069af7f9fea4b5b6992b7089eb554e1e2a4c78dd080f2977128d0dd541eeb735b951e7d6614a07101f7703457e7743ac6b3be962cdfe WHIRLPOOL 861c7f150811912422f6f5eb77437744d1456740a43bef3dfd88a2e6d6836c0e8460b788ccd4f14a7144652d65a825c08aa984ec4240b2b1ac6d09237695d19d |
28 |
DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8 |
29 |
+DIST xen-4.6.1.tar.gz 19693042 SHA256 44cc2fccba1e147ef4c8da0584ce0f24189c8743de0e3e9a9226da88ddb5f589 SHA512 f01a0b7874abf8b3a81432428d7ba2d5aceb9d75ae20310f8ef49a3a0df927720a51d49090f74fda7f374c779e121ad26da6966a6f2623ed1a7743b4c080427c WHIRLPOOL b4eec12118d602d1b41edee32ed7c0c61646974060bc44e3eedaf78f7c3015c151998f72573fd2bab1992263dd98f09992772334bae7826048d187de7ed022e5 |
30 |
DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73acfdc4df694f7b29c1135180d902049 SHA512 3006ce4cd67e80a9f79d9ba3814a64704b0d762159a439a140b1ec0a2699473cd5537950f0913b55f8f7e3d0fd2e9861f3199793120d8d2502aa3f8ef7816c8f WHIRLPOOL 4a921103df2825ccd8b0481708e7cd692fa45d5aadae286c1522c144a1576920e7d3567648565bb9af85bb6bb597ea9d0ec04ea6abd2115db4caf7e739717b1a |
31 |
DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8 |
32 |
+DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633 |
33 |
DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798deff5c2c72d1efb5459c72f4278f00 SHA512 4fd0c663a733436188aca364e927ac430d9bbef9859da65c074d7fd66c330645b05ff1f3e849f4581dfcd7054801d65edcff8445c1c63c2725f11e3903415af0 WHIRLPOOL 5504d7ffbd3c1970026c1f43252d9c76f10c5448ede247719e2698aa8f8e93b20e4cc353da5582b3b6887fb3fd7d1e13765f664ea60daeb6020f052eaca9b9f4 |
34 |
DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb22687ccd9b2579767fe0ee013152980c76 SHA512 89c72897f18a86c2060bb76a182e7cca72ad2f33a3aab964ecae66e057aeecafee2e9986204d6feb98f81ccb740460ee2cb37663b1ab79f47adc1dd73e0091bc WHIRLPOOL c27e612b87b4a30abbf59e6be019e2c21a78bfbdf1715da5498d95607d390d616251768d419ac5ce76087bbf7cdfc410dd0088ba48e425082cea971efcb64346 |
35 |
DIST xen-security-patches-2.tar.gz 7370 SHA256 f24bf4b0cba29b51ee71f6ef82654cddf157c63d62fc1119f17255b2388e03ab SHA512 209dea670467ff1df18428c15b25229c05d676d1a2f646cddb221544ae888241ade48a22be037f97dce249ac322c1f30bb477675e5e2cc04a2fbd839e02f1f57 WHIRLPOOL ae66a2fbc0d0f0a555d407ebd3198fa58ee043515fb9821d7b9eda46d088bc87b3de16fe015fd1142294429dd2c1c7826e414a55980e27123185c1a86fb0a8a6 |
36 |
|
37 |
diff --git a/app-emulation/xen-tools/files/gentoo-patches.conf b/app-emulation/xen-tools/files/gentoo-patches.conf |
38 |
index 942f157..ea628ec 100644 |
39 |
--- a/app-emulation/xen-tools/files/gentoo-patches.conf |
40 |
+++ b/app-emulation/xen-tools/files/gentoo-patches.conf |
41 |
@@ -115,3 +115,10 @@ ${_gx022} ${_gx017} ${_gx031} |
42 |
${_gx027} ${_gx032} |
43 |
${_gx028} ${_gx029} |
44 |
" |
45 |
+# xen-tools-4.6.1 patches set |
46 |
+_gpv_xen_tools_461_0=" |
47 |
+${_gx008} ${_gx021} |
48 |
+${_gx022} ${_gx017} ${_gx031} |
49 |
+${_gx027} ${_gx032} |
50 |
+${_gx028} ${_gx029} |
51 |
+" |
52 |
|
53 |
diff --git a/app-emulation/xen-tools/xen-tools-4.6.1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1.ebuild |
54 |
new file mode 100644 |
55 |
index 0000000..c433fd8 |
56 |
--- /dev/null |
57 |
+++ b/app-emulation/xen-tools/xen-tools-4.6.1.ebuild |
58 |
@@ -0,0 +1,470 @@ |
59 |
+# Copyright 1999-2016 Gentoo Foundation |
60 |
+# Distributed under the terms of the GNU General Public License v2 |
61 |
+# $Id$ |
62 |
+ |
63 |
+EAPI=5 |
64 |
+ |
65 |
+PYTHON_COMPAT=( python2_7 ) |
66 |
+PYTHON_REQ_USE='ncurses,xml,threads' |
67 |
+ |
68 |
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator |
69 |
+ |
70 |
+MY_PV=${PV/_/-} |
71 |
+MAJOR_V="$(get_version_component_range 1-2)" |
72 |
+ |
73 |
+if [[ $PV == *9999 ]]; then |
74 |
+ inherit git-r3 |
75 |
+ KEYWORDS="" |
76 |
+ REPO="xen.git" |
77 |
+ EGIT_REPO_URI="git://xenbits.xen.org/${REPO}" |
78 |
+ S="${WORKDIR}/${REPO}" |
79 |
+else |
80 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
81 |
+ UPSTREAM_VER= |
82 |
+ SECURITY_VER= |
83 |
+ # vars set to reflect https://dev.gentoo.org/~idella4/ |
84 |
+ # first instance of UPS_VER (usptream ver) |
85 |
+ UPS_VER= |
86 |
+ SEC_VER= |
87 |
+ QEMU_VER= |
88 |
+ # xen-tools's gentoo patches tarball |
89 |
+ GENTOO_VER=4 |
90 |
+ # xen-tools's gentoo patches version which apply to this specific ebuild |
91 |
+ GENTOO_GPV=0 |
92 |
+ # xen-tools ovmf's patches |
93 |
+ OVMF_VER=2 |
94 |
+ |
95 |
+ SEABIOS_VER=1.8.2 |
96 |
+ # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d |
97 |
+ OVMF_PV=20151110 |
98 |
+ |
99 |
+ [[ -n ${UPSTREAM_VER} ]] && \ |
100 |
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz |
101 |
+ https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz" |
102 |
+ [[ -n ${SECURITY_VER} ]] && \ |
103 |
+ SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz |
104 |
+ https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz |
105 |
+ https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz" |
106 |
+ [[ -n ${GENTOO_VER} ]] && \ |
107 |
+ GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz" |
108 |
+ [[ -n ${OVMF_VER} ]] && \ |
109 |
+ OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz" |
110 |
+ |
111 |
+ SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz |
112 |
+ http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz |
113 |
+ https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz |
114 |
+ ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2 |
115 |
+ ${OVMF_PATCHSET_URI} ) |
116 |
+ ${UPSTREAM_PATCHSET_URI} |
117 |
+ ${SECURITY_PATCHSET_URI} |
118 |
+ ${GENTOO_PATCHSET_URI}" |
119 |
+ |
120 |
+ S="${WORKDIR}/xen-${MY_PV}" |
121 |
+fi |
122 |
+ |
123 |
+DESCRIPTION="Xen tools including QEMU and xl" |
124 |
+HOMEPAGE="http://xen.org/" |
125 |
+DOCS=( README docs/README.xen-bugtool ) |
126 |
+ |
127 |
+LICENSE="GPL-2" |
128 |
+SLOT="0/${MAJOR_V}" |
129 |
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make |
130 |
+# >=dev-lang/ocaml-4 stable |
131 |
+# Masked in profiles/eapi-5-files instead |
132 |
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios" |
133 |
+ |
134 |
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) ) |
135 |
+ ${PYTHON_REQUIRED_USE} |
136 |
+ pygrub? ( python ) |
137 |
+ ovmf? ( hvm ) |
138 |
+ qemu? ( !system-qemu )" |
139 |
+ |
140 |
+COMMON_DEPEND=" |
141 |
+ dev-libs/lzo:2 |
142 |
+ dev-libs/glib:2 |
143 |
+ dev-libs/yajl |
144 |
+ dev-libs/libaio |
145 |
+ dev-libs/libgcrypt:0 |
146 |
+ sys-libs/zlib |
147 |
+" |
148 |
+ |
149 |
+DEPEND="${COMMON_DEPEND} |
150 |
+ dev-python/lxml[${PYTHON_USEDEP}] |
151 |
+ x86? ( sys-devel/dev86 |
152 |
+ sys-power/iasl ) |
153 |
+ pam? ( dev-python/pypam[${PYTHON_USEDEP}] ) |
154 |
+ ${PYTHON_DEPS} |
155 |
+ api? ( dev-libs/libxml2 |
156 |
+ net-misc/curl ) |
157 |
+ ovmf? ( $(python_gen_impl_dep sqlite) ) |
158 |
+ !amd64? ( >=sys-apps/dtc-1.4.0 ) |
159 |
+ amd64? ( sys-devel/bin86 |
160 |
+ system-seabios? ( sys-firmware/seabios ) |
161 |
+ sys-firmware/ipxe |
162 |
+ sys-devel/dev86 |
163 |
+ sys-power/iasl ) |
164 |
+ dev-lang/perl |
165 |
+ app-misc/pax-utils |
166 |
+ doc? ( |
167 |
+ app-doc/doxygen |
168 |
+ dev-python/markdown[${PYTHON_USEDEP}] |
169 |
+ dev-tex/latex2html[png,gif] |
170 |
+ media-gfx/graphviz |
171 |
+ dev-tex/xcolor |
172 |
+ media-gfx/transfig |
173 |
+ dev-texlive/texlive-latexextra |
174 |
+ virtual/latex-base |
175 |
+ dev-tex/latexmk |
176 |
+ dev-texlive/texlive-latex |
177 |
+ dev-texlive/texlive-pictures |
178 |
+ dev-texlive/texlive-latexrecommended |
179 |
+ ) |
180 |
+ hvm? ( x11-proto/xproto |
181 |
+ !net-libs/libiscsi ) |
182 |
+ qemu? ( |
183 |
+ x11-libs/pixman |
184 |
+ sdl? ( media-libs/libsdl[X] ) |
185 |
+ ) |
186 |
+ system-qemu? ( app-emulation/qemu[xen] ) |
187 |
+ ocaml? ( dev-ml/findlib |
188 |
+ >=dev-lang/ocaml-4 )" |
189 |
+ |
190 |
+RDEPEND="${COMMON_DEPEND} |
191 |
+ sys-apps/iproute2[-minimal] |
192 |
+ net-misc/bridge-utils |
193 |
+ screen? ( |
194 |
+ app-misc/screen |
195 |
+ app-admin/logrotate |
196 |
+ )" |
197 |
+ |
198 |
+# hvmloader is used to bootstrap a fully virtualized kernel |
199 |
+# Approved by QA team in bug #144032 |
200 |
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader |
201 |
+ usr/share/qemu-xen/qemu/s390-ccw.img" |
202 |
+ |
203 |
+RESTRICT="test" |
204 |
+ |
205 |
+pkg_setup() { |
206 |
+ python-single-r1_pkg_setup |
207 |
+ export "CONFIG_LOMOUNT=y" |
208 |
+ |
209 |
+ #bug 522642, disable compile tools/tests |
210 |
+ export "CONFIG_TESTS=n" |
211 |
+ |
212 |
+ if has_version dev-libs/libgcrypt:0; then |
213 |
+ export "CONFIG_GCRYPT=y" |
214 |
+ fi |
215 |
+ |
216 |
+ if [[ -z ${XEN_TARGET_ARCH} ]] ; then |
217 |
+ if use x86 && use amd64; then |
218 |
+ die "Confusion! Both x86 and amd64 are set in your use flags!" |
219 |
+ elif use x86; then |
220 |
+ export XEN_TARGET_ARCH="x86_32" |
221 |
+ elif use amd64 ; then |
222 |
+ export XEN_TARGET_ARCH="x86_64" |
223 |
+ elif use arm; then |
224 |
+ export XEN_TARGET_ARCH="arm32" |
225 |
+ elif use arm64; then |
226 |
+ export XEN_TARGET_ARCH="arm64" |
227 |
+ else |
228 |
+ die "Unsupported architecture!" |
229 |
+ fi |
230 |
+ fi |
231 |
+} |
232 |
+ |
233 |
+src_prepare() { |
234 |
+ # Upstream's patchset |
235 |
+ if [[ -n ${UPSTREAM_VER} ]]; then |
236 |
+ einfo "Try to apply Xen Upstream patch set" |
237 |
+ EPATCH_SUFFIX="patch" \ |
238 |
+ EPATCH_FORCE="yes" \ |
239 |
+ EPATCH_OPTS="-p1" \ |
240 |
+ epatch "${WORKDIR}"/patches-upstream \ |
241 |
+ "${WORKDIR}"/libexec.patch |
242 |
+ fi |
243 |
+ |
244 |
+ # Security patchset |
245 |
+ if [[ -n ${SECURITY_VER} ]]; then |
246 |
+ einfo "Try to apply Xen Security patch set" |
247 |
+ source "${WORKDIR}"/patches-security/${PV}.conf |
248 |
+ # apply main xen patches |
249 |
+ # Two parallel systems, both work side by side |
250 |
+ # Over time they may concdense into one. This will suffice for now |
251 |
+ EPATCH_SUFFIX="patch" |
252 |
+ EPATCH_FORCE="yes" |
253 |
+ for i in ${XEN_SECURITY_MAIN}; do |
254 |
+ epatch "${WORKDIR}"/patches-security/xen/$i |
255 |
+ done |
256 |
+ |
257 |
+ for i in "${WORKDIR}"/xen-sec/xsa*.patch; do |
258 |
+ epatch $i |
259 |
+ done |
260 |
+ |
261 |
+ # apply qemu-traditional patches |
262 |
+ pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null |
263 |
+ for i in ${XEN_SECURITY_QEMUT}; do |
264 |
+ epatch "${WORKDIR}"/patches-security/qemut/$i |
265 |
+ done |
266 |
+ for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do |
267 |
+ epatch $i |
268 |
+ done |
269 |
+ popd > /dev/null |
270 |
+ |
271 |
+ # apply qemu-xen/upstream patches |
272 |
+ pushd "${S}"/tools/qemu-xen/ > /dev/null |
273 |
+ for i in ${XEN_SECURITY_QEMUU}; do |
274 |
+ epatch "${WORKDIR}"/patches-security/qemuu/$i |
275 |
+ done |
276 |
+ for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do |
277 |
+ epatch $i |
278 |
+ done |
279 |
+ popd > /dev/null |
280 |
+ fi |
281 |
+ |
282 |
+ # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err |
283 |
+ mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die |
284 |
+ pushd tools/firmware/ > /dev/null |
285 |
+ ln -s seabios-dir-remote seabios-dir || die |
286 |
+ popd > /dev/null |
287 |
+ |
288 |
+ # Gentoo's patchset |
289 |
+ if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then |
290 |
+ einfo "Try to apply Gentoo specific patch set" |
291 |
+ source "${FILESDIR}"/gentoo-patches.conf |
292 |
+ _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV} |
293 |
+ for i in ${!_gpv}; do |
294 |
+ EPATCH_SUFFIX="patch" \ |
295 |
+ EPATCH_FORCE="yes" \ |
296 |
+ epatch "${WORKDIR}"/patches-gentoo/$i |
297 |
+ done |
298 |
+ fi |
299 |
+ |
300 |
+ # Ovmf's patchset |
301 |
+ if [[ -n ${OVMF_VER} ]] && use ovmf; then |
302 |
+ einfo "Try to apply Ovmf patch set" |
303 |
+ pushd "${WORKDIR}"/ovmf-*/ > /dev/null |
304 |
+ EPATCH_SUFFIX="patch" \ |
305 |
+ EPATCH_FORCE="yes" \ |
306 |
+ EPATCH_OPTS="-p1" \ |
307 |
+ epatch "${WORKDIR}"/patches-ovmf |
308 |
+ popd > /dev/null |
309 |
+ fi |
310 |
+ mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die |
311 |
+ |
312 |
+ mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die |
313 |
+ |
314 |
+ # Fix texi2html build error with new texi2html, qemu.doc.html |
315 |
+ sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die |
316 |
+ |
317 |
+ use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die |
318 |
+ sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \ |
319 |
+ -i tools/firmware/Makefile || die |
320 |
+ |
321 |
+ # Drop .config, fixes to gcc-4.6 |
322 |
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
323 |
+ |
324 |
+ # if the user *really* wants to use their own custom-cflags, let them |
325 |
+ if use custom-cflags; then |
326 |
+ einfo "User wants their own CFLAGS - removing defaults" |
327 |
+ |
328 |
+ # try and remove all the default cflags |
329 |
+ find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \ |
330 |
+ -exec sed \ |
331 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
332 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
333 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
334 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
335 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
336 |
+ -i {} + || die "failed to re-set custom-cflags" |
337 |
+ else |
338 |
+ unset CFLAGS |
339 |
+ unset LDFLAGS |
340 |
+ unset ASFLAGS |
341 |
+ unset CPPFLAGS |
342 |
+ fi |
343 |
+ |
344 |
+ if ! use pygrub; then |
345 |
+ sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die |
346 |
+ fi |
347 |
+ |
348 |
+ if ! use python; then |
349 |
+ sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die |
350 |
+ fi |
351 |
+ |
352 |
+ if ! use hvm; then |
353 |
+ sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die |
354 |
+ # Bug 351648 |
355 |
+ elif ! use x86 && ! has x86 $(get_all_abis); then |
356 |
+ mkdir -p "${WORKDIR}"/extra-headers/gnu || die |
357 |
+ touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die |
358 |
+ export CPATH="${WORKDIR}"/extra-headers |
359 |
+ fi |
360 |
+ |
361 |
+ if use qemu; then |
362 |
+ if use sdl; then |
363 |
+ sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \ |
364 |
+ tools/Makefile || die |
365 |
+ else |
366 |
+ sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \ |
367 |
+ tools/qemu-xen-traditional/xen-setup || die |
368 |
+ sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \ |
369 |
+ tools/Makefile || die |
370 |
+ fi |
371 |
+ else |
372 |
+ # Don't bother with qemu, only needed for fully virtualised guests |
373 |
+ sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die |
374 |
+ fi |
375 |
+ |
376 |
+ # Reset bash completion dir; Bug 472438 |
377 |
+ sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \ |
378 |
+ -i Config.mk || die |
379 |
+ sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die |
380 |
+ |
381 |
+ # xencommons, Bug #492332, sed lighter weight than patching |
382 |
+ sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \ |
383 |
+ -i tools/hotplug/Linux/init.d/xencommons.in || die |
384 |
+ |
385 |
+ # respect multilib, usr/lib/libcacard.so.0.0.0 |
386 |
+ sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \ |
387 |
+ -i tools/qemu-xen/configure || die |
388 |
+ |
389 |
+ #bug 518136, don't build 32bit exactuable for nomultilib profile |
390 |
+ if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then |
391 |
+ sed -i -e "/x86_emulator/d" tools/tests/Makefile || die |
392 |
+ fi |
393 |
+ |
394 |
+ # use /var instead of /var/lib, consistat with previous ebuild |
395 |
+ sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \ |
396 |
+ m4/paths.m4 configure tools/configure || die |
397 |
+ # use /run instead of /var/run |
398 |
+ sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \ |
399 |
+ m4/paths.m4 configure tools/configure || die |
400 |
+ |
401 |
+ # uncomment lines in xl.conf |
402 |
+ sed -e 's:^#autoballoon=:autoballoon=:' \ |
403 |
+ -e 's:^#lockfile=:lockfile=:' \ |
404 |
+ -e 's:^#vif.default.script=:vif.default.script=:' \ |
405 |
+ -i tools/examples/xl.conf || die |
406 |
+ |
407 |
+ epatch_user |
408 |
+} |
409 |
+ |
410 |
+src_configure() { |
411 |
+ local myconf="--prefix=${PREFIX}/usr \ |
412 |
+ --libdir=${PREFIX}/usr/$(get_libdir) \ |
413 |
+ --libexecdir=${PREFIX}/usr/libexec \ |
414 |
+ --disable-werror \ |
415 |
+ --disable-xen \ |
416 |
+ --enable-tools \ |
417 |
+ --enable-docs \ |
418 |
+ $(use_with system-qemu) \ |
419 |
+ $(use_enable pam) \ |
420 |
+ $(use_enable api xenapi) \ |
421 |
+ $(use_enable ovmf) \ |
422 |
+ $(use_enable ocaml ocamltools) \ |
423 |
+ --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \ |
424 |
+ " |
425 |
+ |
426 |
+ use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin" |
427 |
+ use qemu || myconf+=" --with-system-qemu" |
428 |
+ use amd64 && myconf+=" $(use_enable qemu-traditional)" |
429 |
+ econf ${myconf} |
430 |
+} |
431 |
+ |
432 |
+src_compile() { |
433 |
+ export VARTEXFONTS="${T}/fonts" |
434 |
+ local myopt |
435 |
+ use debug && myopt="${myopt} debug=y" |
436 |
+ |
437 |
+ if test-flag-CC -fno-strict-overflow; then |
438 |
+ append-flags -fno-strict-overflow |
439 |
+ fi |
440 |
+ |
441 |
+ emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt} |
442 |
+ |
443 |
+ use doc && emake -C docs txt html |
444 |
+ emake -C docs man-pages |
445 |
+} |
446 |
+ |
447 |
+src_install() { |
448 |
+ # Override auto-detection in the build system, bug #382573 |
449 |
+ export INITD_DIR=/tmp/init.d |
450 |
+ export CONFIG_LEAF_DIR=../tmp/default |
451 |
+ |
452 |
+ # Let the build system compile installed Python modules. |
453 |
+ local PYTHONDONTWRITEBYTECODE |
454 |
+ export PYTHONDONTWRITEBYTECODE |
455 |
+ |
456 |
+ emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \ |
457 |
+ XEN_PYTHON_NATIVE_INSTALL=y install-tools |
458 |
+ |
459 |
+ # Fix the remaining Python shebangs. |
460 |
+ python_fix_shebang "${D}" |
461 |
+ |
462 |
+ # Remove RedHat-specific stuff |
463 |
+ rm -rf "${D}"tmp || die |
464 |
+ |
465 |
+ if use doc; then |
466 |
+ emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs |
467 |
+ |
468 |
+ dohtml -r docs/ |
469 |
+ docinto pdf |
470 |
+ dodoc ${DOCS[@]} |
471 |
+ [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html |
472 |
+ fi |
473 |
+ |
474 |
+ rm -rf "${D}"/usr/share/doc/xen/ |
475 |
+ doman docs/man?/* |
476 |
+ |
477 |
+ newconfd "${FILESDIR}"/xendomains.confd xendomains |
478 |
+ newconfd "${FILESDIR}"/xenstored.confd xenstored |
479 |
+ newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled |
480 |
+ newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains |
481 |
+ newinitd "${FILESDIR}"/xenstored.initd xenstored |
482 |
+ newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled |
483 |
+ newinitd "${FILESDIR}"/xencommons.initd xencommons |
484 |
+ newconfd "${FILESDIR}"/xencommons.confd xencommons |
485 |
+ newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev |
486 |
+ newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev |
487 |
+ |
488 |
+ if use screen; then |
489 |
+ cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die |
490 |
+ cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die |
491 |
+ keepdir /var/log/xen-consoles |
492 |
+ fi |
493 |
+ |
494 |
+ # For -static-libs wrt Bug 384355 |
495 |
+ if ! use static-libs; then |
496 |
+ rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a |
497 |
+ fi |
498 |
+ |
499 |
+ # for xendomains |
500 |
+ keepdir /etc/xen/auto |
501 |
+ |
502 |
+ # Remove files failing QA AFTER emake installs them, avoiding seeking absent files |
503 |
+ find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \ |
504 |
+ -o -name openbios-ppc -o -name palcode-clipper \) -delete || die |
505 |
+} |
506 |
+ |
507 |
+pkg_postinst() { |
508 |
+ elog "Official Xen Guide and the offical wiki page:" |
509 |
+ elog "https://wiki.gentoo.org/wiki/Xen" |
510 |
+ elog "http://wiki.xen.org/wiki/Main_Page" |
511 |
+ elog "" |
512 |
+ elog "Recommended to utilise the xencommons script to config sytem At boot" |
513 |
+ elog "Add by use of rc-update on completion of the install" |
514 |
+ |
515 |
+ if ! use hvm; then |
516 |
+ echo |
517 |
+ elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" |
518 |
+ elog "support enable the hvm use flag." |
519 |
+ elog "An x86 or amd64 system is required to build HVM support." |
520 |
+ fi |
521 |
+ |
522 |
+ if use qemu; then |
523 |
+ elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source" |
524 |
+ elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently" |
525 |
+ elog "with the qemu capable xen. It is up to the user to distinguish between and utilise" |
526 |
+ elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise" |
527 |
+ fi |
528 |
+} |