Gentoo Archives: gentoo-commits

From: Ian Delaney <della5@×××××××××.au>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/virtualization:master commit in: app-emulation/xen/
Date: Thu, 01 Aug 2013 16:55:09
Message-Id: 1375375973.1a7b23e34740b376b183e8a9c1c63083aff05672.idella4@gentoo
1 commit: 1a7b23e34740b376b183e8a9c1c63083aff05672
2 Author: Ian Delaney <della5 <AT> iinet <DOT> com <DOT> au>
3 AuthorDate: Thu Aug 1 16:52:53 2013 +0000
4 Commit: Ian Delaney <della5 <AT> iinet <DOT> com <DOT> au>
5 CommitDate: Thu Aug 1 16:52:53 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/virtualization.git;a=commit;h=1a7b23e3
7
8 bump, re-written live ebuild bu 'dlan', tested fine
9
10 Package-Manager: portage-2.1.11.63
11
12 ---
13 app-emulation/xen/Manifest | 1 +
14 .../xen/{xen-9999.ebuild => xen-4.3.0.ebuild} | 51 ++++++++++++++--------
15 app-emulation/xen/xen-9999.ebuild | 10 ++---
16 3 files changed, 37 insertions(+), 25 deletions(-)
17
18 diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
19 index 44e619d..de1e250 100644
20 --- a/app-emulation/xen/Manifest
21 +++ b/app-emulation/xen/Manifest
22 @@ -1 +1,2 @@
23 DIST xen-4.2.2.tar.gz 15602746 SHA256 c9bfe91a5e72f8545acebad9889d64368020359bfe18044c0e683133e55ae005 SHA512 4943b18016ed8c2b194a3b55e6655b3b734b39ffb8cb7ee0a0580f2f4460a1d0e92e1de8ac23f5186272914fad1650586af51fd7c3644d0310eb16f2e11c5e80 WHIRLPOOL 519eb87cb2da694696cbc3e72070a0a3bdb07c46fa266d855d8379eec3a92adfa4d434af3ac01c37834ce4a9174081a6c40030b185a70902329b185cb8d0bbea
24 +DIST xen-4.3.0.tar.gz 16425975 SHA256 e1e9faabe4886e2227aacdbde74410653b233d66642ca1972a860cbec6439961 SHA512 e6b8f64e15e48704ea5cee5585cd6151fe6a5a62bc4670caf0b762c1aa71c9598db236c637ac34c42c92c6e8a5001acdd3d9d4b9305401a26273279358f481d6 WHIRLPOOL a91f14bc6535127ab17d3867b92fb3e008089453d5ba7996fd1d0b5c6d32a881c07df320f018c928e919f28de7b4ab4757c6bdb020e0cdb7d67960d4cab9dda0
25
26 diff --git a/app-emulation/xen/xen-9999.ebuild b/app-emulation/xen/xen-4.3.0.ebuild
27 similarity index 69%
28 copy from app-emulation/xen/xen-9999.ebuild
29 copy to app-emulation/xen/xen-4.3.0.ebuild
30 index c3e1126..815d84a 100644
31 --- a/app-emulation/xen/xen-9999.ebuild
32 +++ b/app-emulation/xen/xen-4.3.0.ebuild
33 @@ -1,8 +1,10 @@
34 -# Copyright 1999-2011 Gentoo Foundation
35 +# Copyright 1999-2013 Gentoo Foundation
36 # Distributed under the terms of the GNU General Public License v2
37 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-9999.ebuild,v 1.4 2011/09/11 14:48:15 alexxy Exp $
38 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-4.3.0.ebuild,v 1.1 2013/07/21 05:45:45 idella4 Exp $
39
40 -EAPI="4"
41 +EAPI=5
42 +
43 +PYTHON_COMPAT=( python2_7 )
44
45 if [[ $PV == *9999 ]]; then
46 KEYWORDS=""
47 @@ -15,17 +17,17 @@ else
48 SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
49 fi
50
51 -inherit mount-boot flag-o-matic toolchain-funcs ${live_eclass}
52 +inherit mount-boot flag-o-matic python-single-r1 toolchain-funcs ${live_eclass}
53
54 DESCRIPTION="The Xen virtual machine monitor"
55 HOMEPAGE="http://xen.org/"
56 -
57 LICENSE="GPL-2"
58 SLOT="0"
59 -IUSE="custom-cflags debug flask pae xsm"
60 +IUSE="custom-cflags debug efi flask pae xsm"
61
62 -RDEPEND="|| ( sys-boot/grub
63 - sys-boot/grub-static )"
64 +DEPEND="efi? ( >=sys-devel/binutils-2.22[multitarget] )
65 + !efi? ( >=sys-devel/binutils-2.22[-multitarget] )"
66 +RDEPEND=""
67 PDEPEND="~app-emulation/xen-tools-${PV}"
68
69 RESTRICT="test"
70 @@ -36,6 +38,7 @@ QA_WX_LOAD="boot/xen-syms-${PV}"
71 REQUIRED_USE="flask? ( xsm )"
72
73 pkg_setup() {
74 + python-single-r1_pkg_setup
75 if [[ -z ${XEN_TARGET_ARCH} ]]; then
76 if use x86 && use amd64; then
77 die "Confusion! Both x86 and amd64 are set in your use flags!"
78 @@ -57,8 +60,14 @@ pkg_setup() {
79 }
80
81 src_prepare() {
82 - # Drop .config
83 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
84 + # Drop .config and fix gcc-4.6
85 + epatch "${FILESDIR}"/${PN/-pvgrub/}-4.3-fix_dotconfig-gcc.patch
86 +
87 + if use efi; then
88 + epatch "${FILESDIR}"/${PN}-4.2-efi.patch
89 + export EFI_VENDOR="gentoo"
90 + export EFI_MOUNTPOINT="boot"
91 + fi
92
93 # if the user *really* wants to use their own custom-cflags, let them
94 if use custom-cflags; then
95 @@ -70,14 +79,15 @@ src_prepare() {
96 -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
97 -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
98 -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
99 - -i {} \;
100 + -i {} \; || die "failed to re-set custom-cflags"
101 fi
102
103 - # remove -Werror for gcc-4.6's sake
104 - find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
105 - xargs sed -i 's/ *-Werror */ /'
106 # not strictly necessary to fix this
107 sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
108 +
109 + #Security patches
110 +
111 + epatch_user
112 }
113
114 src_configure() {
115 @@ -94,7 +104,7 @@ src_configure() {
116
117 src_compile() {
118 # Send raw LDFLAGS so that --as-needed works
119 - emake CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
120 + emake CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
121 }
122
123 src_install() {
124 @@ -102,6 +112,11 @@ src_install() {
125 use debug && myopt="${myopt} debug=y"
126 use pae && myopt="${myopt} pae=y"
127
128 + # The 'make install' doesn't 'mkdir -p' the subdirs
129 + if use efi; then
130 + mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
131 + fi
132 +
133 emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
134 }
135
136 @@ -110,8 +125,6 @@ pkg_postinst() {
137 elog " http://www.gentoo.org/doc/en/xen-guide.xml"
138 elog " http://en.gentoo-wiki.com/wiki/Xen/"
139
140 - if use pae; then
141 - echo
142 - ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!"
143 - fi
144 + use pae && ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!"
145 + use efi && einfo "The efi executable is installed in boot/efi/gentoo"
146 }
147
148 diff --git a/app-emulation/xen/xen-9999.ebuild b/app-emulation/xen/xen-9999.ebuild
149 index c3e1126..6b16d5c 100644
150 --- a/app-emulation/xen/xen-9999.ebuild
151 +++ b/app-emulation/xen/xen-9999.ebuild
152 @@ -2,14 +2,12 @@
153 # Distributed under the terms of the GNU General Public License v2
154 # $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-9999.ebuild,v 1.4 2011/09/11 14:48:15 alexxy Exp $
155
156 -EAPI="4"
157 +EAPI="5"
158
159 if [[ $PV == *9999 ]]; then
160 KEYWORDS=""
161 - REPO="xen-unstable.hg"
162 - EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
163 - S="${WORKDIR}/${REPO}"
164 - live_eclass="mercurial"
165 + EGIT_REPO_URI="git://xenbits.xen.org/${PN}.git"
166 + live_eclass="git-2"
167 else
168 KEYWORDS="~amd64 ~x86"
169 SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
170 @@ -94,7 +92,7 @@ src_configure() {
171
172 src_compile() {
173 # Send raw LDFLAGS so that --as-needed works
174 - emake CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
175 + emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
176 }
177
178 src_install() {