1 |
commit: c87a500d3cf68b754f525e32cdc161c2aeb5de10 |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 28 09:24:02 2014 +0000 |
4 |
Commit: Lan Yixun <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 28 09:24:02 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/virtualization.git;a=commit;h=c87a500d |
7 |
|
8 |
app-emulation/xen-tools: bump 4.4.0_rc6 |
9 |
|
10 |
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org> |
11 |
|
12 |
--- |
13 |
app-emulation/xen-tools/Manifest | 1 + |
14 |
app-emulation/xen-tools/files/fix-gold-ld.patch | 14 + |
15 |
.../xen-tools/files/xen-4.2-configsxp.patch | 24 ++ |
16 |
.../xen-tools/files/xen-4.3-jserver.patch | 32 ++ |
17 |
.../xen-tools/files/xen-4.4-nostrip.patch | 13 + |
18 |
.../xen-tools/files/xen-4.4-qemu-bridge.patch | 79 ++++ |
19 |
.../files/xen-tools-4-unbundle-ipxe.patch | 33 ++ |
20 |
.../xen-tools/files/xen-tools-4.3-ar-cc.patch | 84 ++++ |
21 |
.../xen-tools/files/xen-tools-4.4-api-fix.patch | 48 +++ |
22 |
app-emulation/xen-tools/files/xencommons.confd | 4 + |
23 |
app-emulation/xen-tools/files/xencommons.initd | 80 ++++ |
24 |
app-emulation/xen-tools/files/xenconsoled.initd | 23 +- |
25 |
app-emulation/xen-tools/files/xend.initd-r2 | 10 +- |
26 |
.../xen-tools/files/xendomains-screen.confd | 4 +- |
27 |
app-emulation/xen-tools/files/xendomains.initd-r2 | 12 +- |
28 |
app-emulation/xen-tools/files/xenqemudev.confd | 7 + |
29 |
app-emulation/xen-tools/files/xenqemudev.initd | 81 ++++ |
30 |
app-emulation/xen-tools/files/xenstored.initd | 28 +- |
31 |
app-emulation/xen-tools/metadata.xml | 6 +- |
32 |
app-emulation/xen-tools/xen-tools-4.4.0_rc6.ebuild | 435 +++++++++++++++++++++ |
33 |
20 files changed, 991 insertions(+), 27 deletions(-) |
34 |
|
35 |
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest |
36 |
index c7c17da..18f3b2a 100644 |
37 |
--- a/app-emulation/xen-tools/Manifest |
38 |
+++ b/app-emulation/xen-tools/Manifest |
39 |
@@ -3,3 +3,4 @@ DIST seabios-0-20121121.tar.bz2 2199282 SHA256 f7f67181c6c0b4cea3a9db48e2569fdcb |
40 |
DIST seabios-dir-remote-20130720.tar.gz 3201017 SHA256 0cf06b54e8ae1cfc25f2942eea1490a9e7e01f478541577025f6eef76e0c76de SHA512 e9ebe3711e3f678d3632f8e8e645f8be4fb65608aff04aeeb0e1152521bf571bc4d879f136d23bb0aa8bd4c4ec20f294b472cf54dc70916e52d330328aadd357 WHIRLPOOL 6138271f72fd96fabe3cffc07a6efcb9c0e195ed96f4ad708d00e85e0a84a03900dc41389cd4f26d533a3aa42142a9e17708d7b87d722f1c9348f61a5db3e59d |
41 |
DIST xen-4.2.2.tar.gz 15602746 SHA256 c9bfe91a5e72f8545acebad9889d64368020359bfe18044c0e683133e55ae005 SHA512 4943b18016ed8c2b194a3b55e6655b3b734b39ffb8cb7ee0a0580f2f4460a1d0e92e1de8ac23f5186272914fad1650586af51fd7c3644d0310eb16f2e11c5e80 WHIRLPOOL 519eb87cb2da694696cbc3e72070a0a3bdb07c46fa266d855d8379eec3a92adfa4d434af3ac01c37834ce4a9174081a6c40030b185a70902329b185cb8d0bbea |
42 |
DIST xen-4.3.0.tar.gz 16425975 SHA256 e1e9faabe4886e2227aacdbde74410653b233d66642ca1972a860cbec6439961 SHA512 e6b8f64e15e48704ea5cee5585cd6151fe6a5a62bc4670caf0b762c1aa71c9598db236c637ac34c42c92c6e8a5001acdd3d9d4b9305401a26273279358f481d6 WHIRLPOOL a91f14bc6535127ab17d3867b92fb3e008089453d5ba7996fd1d0b5c6d32a881c07df320f018c928e919f28de7b4ab4757c6bdb020e0cdb7d67960d4cab9dda0 |
43 |
+DIST xen-4.4.0-rc6.tar.gz 18116817 SHA256 0949d3d5c79312e3f053e6456216206e0c062d4f6962545521e972bc09a290dc SHA512 84d499ca725fd12fefb0cb345a5fd3ad52245863ca1700d90739a317349ea130418dc1bb83063b1c89378a862f4501847684e76363a338962ed64504ad935d6b WHIRLPOOL 20ff9d1f5317c228cf6d0bd01fab85864be49b3d3e72c928d6245363854693f9808c1bc002e99340592ed187d40f5257397505b5ec7547ef814774f9fe787292 |
44 |
|
45 |
diff --git a/app-emulation/xen-tools/files/fix-gold-ld.patch b/app-emulation/xen-tools/files/fix-gold-ld.patch |
46 |
new file mode 100644 |
47 |
index 0000000..654eb25 |
48 |
--- /dev/null |
49 |
+++ b/app-emulation/xen-tools/files/fix-gold-ld.patch |
50 |
@@ -0,0 +1,14 @@ |
51 |
+diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile |
52 |
+index cbd60b4..d2b83dd 100644 |
53 |
+--- a/tools/libfsimage/common/Makefile |
54 |
++++ b/tools/libfsimage/common/Makefile |
55 |
+@@ -5,7 +5,7 @@ MAJOR = 1.0 |
56 |
+ MINOR = 0 |
57 |
+ |
58 |
+ LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS |
59 |
+-LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU |
60 |
++LDFLAGS-$(CONFIG_Linux) = |
61 |
+ LDFLAGS = $(LDFLAGS-y) |
62 |
+ |
63 |
+ CFLAGS += $(PTHREAD_CFLAGS) |
64 |
+ |
65 |
|
66 |
diff --git a/app-emulation/xen-tools/files/xen-4.2-configsxp.patch b/app-emulation/xen-tools/files/xen-4.2-configsxp.patch |
67 |
new file mode 100644 |
68 |
index 0000000..4c159c1 |
69 |
--- /dev/null |
70 |
+++ b/app-emulation/xen-tools/files/xen-4.2-configsxp.patch |
71 |
@@ -0,0 +1,24 @@ |
72 |
+diff -ur xen-4.2.1.orig/tools/examples/xend-config.sxp xen-4.2.1/tools/examples/xend-config.sxp |
73 |
+--- tools/examples/xend-config.sxp 2012-12-17 23:00:23.000000000 +0800 |
74 |
++++ tools/examples/xend-config.sxp 2013-06-27 21:32:50.198221774 +0800 |
75 |
+@@ -200,7 +200,7 @@ |
76 |
+ #(network-script network-nat) |
77 |
+ #(vif-script vif-nat) |
78 |
+ |
79 |
+-# dom0-min-mem is the lowest permissible memory level (in MB) for dom0. |
80 |
++# dom0-min-mem is the lowest permissible memory level (in kb) for dom0. |
81 |
+ # This is a minimum both for auto-ballooning (as enabled by |
82 |
+ # enable-dom0-ballooning below) and for xm mem-set when applied to dom0. |
83 |
+ (dom0-min-mem 196) |
84 |
+diff -ur xen-4.2.1.orig/tools/python/xen/xend/tests/xend-config.sxp xen-4.2.1/tools/python/xen/xend/tests/xend-config.sxp |
85 |
+--- tools/python/xen/xend/tests/xend-config.sxp 2012-12-17 23:01:27.000000000 +0800 |
86 |
++++ tools/python/xen/xend/tests/xend-config.sxp 2013-06-27 21:32:02.726225130 +0800 |
87 |
+@@ -116,7 +116,7 @@ |
88 |
+ |
89 |
+ |
90 |
+ # Dom0 will balloon out when needed to free memory for domU. |
91 |
+-# dom0-min-mem is the lowest memory level (in MB) dom0 will get down to. |
92 |
++# dom0-min-mem is the lowest memory level (in kb) dom0 will get down to. |
93 |
+ # If dom0-min-mem=0, dom0 will never balloon out. |
94 |
+ (dom0-min-mem 196) |
95 |
+ |
96 |
|
97 |
diff --git a/app-emulation/xen-tools/files/xen-4.3-jserver.patch b/app-emulation/xen-tools/files/xen-4.3-jserver.patch |
98 |
new file mode 100644 |
99 |
index 0000000..514fd05 |
100 |
--- /dev/null |
101 |
+++ b/app-emulation/xen-tools/files/xen-4.3-jserver.patch |
102 |
@@ -0,0 +1,32 @@ |
103 |
+diff -ur xen-4.2.0.orig/tools/tests/x86_emulator/Makefile xen-4.2.0/tools/tests/x86_emulator/Makefile |
104 |
+--- tools/tests/x86_emulator/Makefile 2012-09-17 18:21:19.000000000 +0800 |
105 |
++++ tools/tests/x86_emulator/Makefile 2012-11-24 05:06:24.355778737 +0800 |
106 |
+@@ -14,13 +14,13 @@ |
107 |
+ .PHONY: blowfish.h |
108 |
+ blowfish.h: |
109 |
+ rm -f blowfish.bin |
110 |
+- XEN_TARGET_ARCH=x86_32 make -f blowfish.mk all |
111 |
++ XEN_TARGET_ARCH=x86_32 $(MAKE) -f blowfish.mk all |
112 |
+ (echo "static unsigned int blowfish32_code[] = {"; \ |
113 |
+ od -v -t x blowfish.bin | sed 's/^[0-9]* /0x/' | sed 's/ /, 0x/g' | sed 's/$$/,/';\ |
114 |
+ echo "};") >$@ |
115 |
+ rm -f blowfish.bin |
116 |
+ ifeq ($(XEN_COMPILE_ARCH),x86_64) |
117 |
+- XEN_TARGET_ARCH=x86_64 make -f blowfish.mk all |
118 |
++ XEN_TARGET_ARCH=x86_64 $(MAKE) -f blowfish.mk all |
119 |
+ (echo "static unsigned int blowfish64_code[] = {"; \ |
120 |
+ od -v -t x blowfish.bin | sed 's/^[0-9]* /0x/' | sed 's/ /, 0x/g' | sed 's/$$/,/';\ |
121 |
+ echo "};") >>$@ |
122 |
+ |
123 |
+diff -ur xen-4.2.0.orig/tools/firmware/vgabios/Makefile xen-4.2.0/tools/firmware/vgabios/Makefile |
124 |
+--- tools/firmware/vgabios/Makefile 2013-02-04 13:56:50.973533544 +0800 |
125 |
++++ tools/firmware/vgabios/Makefile 2013-02-04 13:57:21.380535958 +0800 |
126 |
+@@ -27,7 +27,7 @@ |
127 |
+ |
128 |
+ .PHONY: release |
129 |
+ release: |
130 |
+- VGABIOS_VERS=\"-DVGABIOS_VERS=\\\"$(RELVERS)\\\"\" make bios cirrus-bios |
131 |
++ VGABIOS_VERS=\"-DVGABIOS_VERS=\\\"$(RELVERS)\\\"\" $(MAKE) bios cirrus-bios |
132 |
+ /bin/rm -f *.o *.s *.ld86 \ |
133 |
+ temp.awk.* vgabios.*.orig _vgabios_.*.c core *.bak .#* |
134 |
+ cp VGABIOS-lgpl-latest.bin ../$(RELEASE).bin |
135 |
|
136 |
diff --git a/app-emulation/xen-tools/files/xen-4.4-nostrip.patch b/app-emulation/xen-tools/files/xen-4.4-nostrip.patch |
137 |
new file mode 100644 |
138 |
index 0000000..7ddd354 |
139 |
--- /dev/null |
140 |
+++ b/app-emulation/xen-tools/files/xen-4.4-nostrip.patch |
141 |
@@ -0,0 +1,13 @@ |
142 |
+diff -ur xen-4.2.0.orig/tools/qemu-xen/Makefile.target xen-4.2.0/tools/qemu-xen/Makefile.target |
143 |
+--- tools/qemu-xen/Makefile.target 2012-09-11 02:10:52.000000000 +0800 |
144 |
++++ tools/qemu-xen/Makefile.target 2012-11-22 07:13:38.894263291 +0800 |
145 |
+@@ -437,9 +437,6 @@ |
146 |
+ install: all |
147 |
+ ifneq ($(PROGS),) |
148 |
+ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)" |
149 |
+-ifneq ($(STRIP),) |
150 |
+- $(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS)) |
151 |
+-endif |
152 |
+ endif |
153 |
+ ifdef CONFIG_TRACE_SYSTEMTAP |
154 |
+ ifdef CONFIG_TRACE_SYSTEMTAP |
155 |
|
156 |
diff --git a/app-emulation/xen-tools/files/xen-4.4-qemu-bridge.patch b/app-emulation/xen-tools/files/xen-4.4-qemu-bridge.patch |
157 |
new file mode 100644 |
158 |
index 0000000..8544561 |
159 |
--- /dev/null |
160 |
+++ b/app-emulation/xen-tools/files/xen-4.4-qemu-bridge.patch |
161 |
@@ -0,0 +1,79 @@ |
162 |
+diff --git a/tools/qemu-xen/Makefile b/tools/qemu-xen/Makefile |
163 |
+index 4d257f1..db2c2ad 100644 |
164 |
+--- a/tools/qemu-xen/Makefile |
165 |
++++ b/tools/qemu-xen/Makefile |
166 |
+@@ -62,7 +62,7 @@ $(call set-vpath, $(SRC_PATH)) |
167 |
+ |
168 |
+ LIBS+=-lz $(LIBS_TOOLS) |
169 |
+ |
170 |
+-HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF) |
171 |
++HELPERS-$(CONFIG_LINUX) = xen-bridge-helper$(EXESUF) |
172 |
+ |
173 |
+ ifdef BUILD_DOCS |
174 |
+ DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt |
175 |
+@@ -186,7 +186,7 @@ qemu-img$(EXESUF): qemu-img.o $(block-obj-y) libqemuutil.a libqemustub.a |
176 |
+ qemu-nbd$(EXESUF): qemu-nbd.o $(block-obj-y) libqemuutil.a libqemustub.a |
177 |
+ qemu-io$(EXESUF): qemu-io.o $(block-obj-y) libqemuutil.a libqemustub.a |
178 |
+ |
179 |
+-qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o |
180 |
++xen-bridge-helper$(EXESUF): xen-bridge-helper.o |
181 |
+ |
182 |
+ fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o libqemuutil.a libqemustub.a |
183 |
+ fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap |
184 |
+diff --git a/tools/qemu-xen/include/net/net.h b/tools/qemu-xen/include/net/net.h |
185 |
+index 30e4b04..6691ff0 100644 |
186 |
+--- a/tools/qemu-xen/include/net/net.h |
187 |
++++ b/tools/qemu-xen/include/net/net.h |
188 |
+@@ -178,7 +178,7 @@ NetClientState *net_hub_port_find(int hub_id); |
189 |
+ |
190 |
+ #define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup" |
191 |
+ #define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown" |
192 |
+-#define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper" |
193 |
++#define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/xen-bridge-helper" |
194 |
+ #define DEFAULT_BRIDGE_INTERFACE "br0" |
195 |
+ |
196 |
+ void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd); |
197 |
+diff --git a/tools/qemu-xen/qemu-bridge-helper.c b/tools/qemu-xen/qemu-bridge-helper.c |
198 |
+index 6a0974e..74b4635 100644 |
199 |
+--- a/tools/qemu-xen/qemu-bridge-helper.c |
200 |
++++ b/tools/qemu-xen/qemu-bridge-helper.c |
201 |
+@@ -67,7 +67,7 @@ typedef QSIMPLEQ_HEAD(ACLList, ACLRule) ACLList; |
202 |
+ static void usage(void) |
203 |
+ { |
204 |
+ fprintf(stderr, |
205 |
+- "Usage: qemu-bridge-helper [--use-vnet] --br=bridge --fd=unixfd\n"); |
206 |
++ "Usage: xen-bridge-helper [--use-vnet] --br=bridge --fd=unixfd\n"); |
207 |
+ } |
208 |
+ |
209 |
+ static int parse_acl_file(const char *filename, ACLList *acl_list) |
210 |
+diff --git a/tools/qemu-xen/qemu-options.hx b/tools/qemu-xen/qemu-options.hx |
211 |
+index d15338e..f7104f1 100644 |
212 |
+--- a/tools/qemu-xen/qemu-options.hx |
213 |
++++ b/tools/qemu-xen/qemu-options.hx |
214 |
+@@ -1601,7 +1601,7 @@ to disable script execution. |
215 |
+ |
216 |
+ If running QEMU as an unprivileged user, use the network helper |
217 |
+ @var{helper} to configure the TAP interface. The default network |
218 |
+-helper executable is @file{/usr/local/libexec/qemu-bridge-helper}. |
219 |
++helper executable is @file{/usr/local/libexec/xen-bridge-helper}. |
220 |
+ |
221 |
+ @option{fd}=@var{h} can be used to specify the handle of an already |
222 |
+ opened host TAP interface. |
223 |
+@@ -1625,7 +1625,7 @@ qemu-system-i386 linux.img \ |
224 |
+ #launch a QEMU instance with the default network helper to |
225 |
+ #connect a TAP device to bridge br0 |
226 |
+ qemu-system-i386 linux.img \ |
227 |
+- -net nic -net tap,"helper=/usr/local/libexec/qemu-bridge-helper" |
228 |
++ -net nic -net tap,"helper=/usr/local/libexec/xen-bridge-helper" |
229 |
+ @end example |
230 |
+ |
231 |
+ @item -netdev bridge,id=@var{id}[,br=@var{bridge}][,helper=@var{helper}] |
232 |
+@@ -1634,7 +1634,7 @@ Connect a host TAP network interface to a host bridge device. |
233 |
+ |
234 |
+ Use the network helper @var{helper} to configure the TAP interface and |
235 |
+ attach it to the bridge. The default network helper executable is |
236 |
+-@file{/usr/local/libexec/qemu-bridge-helper} and the default bridge |
237 |
++@file{/usr/local/libexec/xen-bridge-helper} and the default bridge |
238 |
+ device is @file{br0}. |
239 |
+ |
240 |
+ Examples: |
241 |
|
242 |
diff --git a/app-emulation/xen-tools/files/xen-tools-4-unbundle-ipxe.patch b/app-emulation/xen-tools/files/xen-tools-4-unbundle-ipxe.patch |
243 |
new file mode 100644 |
244 |
index 0000000..902c9ac |
245 |
--- /dev/null |
246 |
+++ b/app-emulation/xen-tools/files/xen-tools-4-unbundle-ipxe.patch |
247 |
@@ -0,0 +1,33 @@ |
248 |
+--- xen-4.2.0/tools/firmware/hvmloader/Makefile.orig 2012-05-27 21:57:04.481812859 +0100 |
249 |
++++ xen-4.2.0/tools/firmware/hvmloader/Makefile 2012-06-02 18:52:44.935034128 +0100 |
250 |
+@@ -48,7 +48,7 @@ |
251 |
+ else |
252 |
+ CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl-latest.cirrus.bin |
253 |
+ endif |
254 |
+-ETHERBOOT_ROMS := $(addprefix ../etherboot/ipxe/src/bin/, $(addsuffix .rom, $(ETHERBOOT_NICS))) |
255 |
++ETHERBOOT_ROMS := $(addprefix /usr/share/ipxe/, $(addsuffix .rom, $(ETHERBOOT_NICS))) |
256 |
+ endif |
257 |
+ |
258 |
+ ROMS := |
259 |
+--- xen-4.2.0/Config.mk.orig 2012-05-27 21:57:04.479812884 +0100 |
260 |
++++ xen-4.2.0/Config.mk 2012-06-02 18:55:14.087169469 +0100 |
261 |
+@@ -206,7 +206,7 @@ |
262 |
+ # Wed Jun 26 16:30:45 2013 +0100 |
263 |
+ # xen: Don't perform SMP setup. |
264 |
+ |
265 |
+-ETHERBOOT_NICS ?= rtl8139 8086100e |
266 |
++ETHERBOOT_NICS ?= 10ec8139 8086100e |
267 |
+ |
268 |
+ # Specify which qemu-dm to use. This may be `ioemu' to use the old |
269 |
+ # Mercurial in-tree version, or a local directory, or a git URL. |
270 |
+--- xen-4.2.0/tools/firmware/Makefile.orig 2012-05-27 21:57:04.480812871 +0100 |
271 |
++++ xen-4.2.0/tools/firmware/Makefile 2012-06-02 19:03:52.254691484 +0100 |
272 |
+@@ -10,7 +10,7 @@ |
273 |
+ #SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir |
274 |
+ SUBDIRS-$(CONFIG_ROMBIOS) += rombios |
275 |
+ SUBDIRS-$(CONFIG_ROMBIOS) += vgabios |
276 |
+-SUBDIRS-$(CONFIG_ROMBIOS) += etherboot |
277 |
++#SUBDIRS-$(CONFIG_ROMBIOS) += etherboot |
278 |
+ SUBDIRS-y += hvmloader |
279 |
+ |
280 |
+ ovmf: |
281 |
|
282 |
diff --git a/app-emulation/xen-tools/files/xen-tools-4.3-ar-cc.patch b/app-emulation/xen-tools/files/xen-tools-4.3-ar-cc.patch |
283 |
new file mode 100644 |
284 |
index 0000000..174b404 |
285 |
--- /dev/null |
286 |
+++ b/app-emulation/xen-tools/files/xen-tools-4.3-ar-cc.patch |
287 |
@@ -0,0 +1,84 @@ |
288 |
+diff -ur xen-4.3.0.orig/tools/debugger/gdbsx/gx/Makefile xen-4.3.0/tools/debugger/gdbsx/gx/Makefile |
289 |
+--- tools/debugger/gdbsx/gx/Makefile 2013-07-09 18:46:56.000000000 +0800 |
290 |
++++ tools/debugger/gdbsx/gx/Makefile 2013-07-23 16:14:53.930752663 +0800 |
291 |
+@@ -3,6 +3,7 @@ |
292 |
+ |
293 |
+ GX_OBJS := gx_comm.o gx_main.o gx_utils.o gx_local.o |
294 |
+ GX_HDRS := $(wildcard *.h) |
295 |
++AR="ar" |
296 |
+ |
297 |
+ .PHONY: all |
298 |
+ all: gx_all.a |
299 |
+@@ -16,5 +17,5 @@ |
300 |
+ # $(CC) -c $(CFLAGS) -o $@ $< |
301 |
+ |
302 |
+ gx_all.a: $(GX_OBJS) Makefile $(GX_HDRS) |
303 |
+- ar cr $@ $(GX_OBJS) # problem with ld using -m32 |
304 |
++ $(AR) cr $@ $(GX_OBJS) # problem with ld using -m32 |
305 |
+ |
306 |
+diff -ur xen-4.3.0.orig/tools/firmware/rombios/Makefile xen-4.3.0/tools/firmware/rombios/Makefile |
307 |
+--- tools/firmware/rombios/Makefile 2013-07-09 18:46:56.000000000 +0800 |
308 |
++++ tools/firmware/rombios/Makefile 2013-07-23 21:57:21.258085143 +0800 |
309 |
+@@ -1,5 +1,6 @@ |
310 |
+ XEN_ROOT = $(CURDIR)/../../.. |
311 |
+ include $(XEN_ROOT)/tools/Rules.mk |
312 |
++CC="gcc" |
313 |
+ |
314 |
+ SUBDIRS := 32bit |
315 |
+ |
316 |
+@@ -16,7 +17,7 @@ |
317 |
+ rm -f $(DEPS) |
318 |
+ |
319 |
+ BIOS-bochs-latest: rombios.c biossums 32bitgateway.c tcgbios.c |
320 |
+- gcc -DBX_SMP_PROCESSORS=1 -E -P $< > _rombios_.c |
321 |
++ $(CC) -DBX_SMP_PROCESSORS=1 -E -P $< > _rombios_.c |
322 |
+ bcc -o rombios.s -C-c -D__i86__ -0 -S _rombios_.c |
323 |
+ sed -e 's/^\.text//' -e 's/^\.data//' rombios.s > _rombios_.s |
324 |
+ as86 _rombios_.s -b tmp.bin -u- -w- -g -0 -j -O -l rombios.txt |
325 |
+@@ -26,6 +27,6 @@ |
326 |
+ rm -f _rombios_.s |
327 |
+ |
328 |
+ biossums: biossums.c |
329 |
+- gcc -o biossums biossums.c |
330 |
++ $(CC) -o biossums biossums.c |
331 |
+ |
332 |
+ -include $(DEPS) |
333 |
+diff -ur xen-4.3.0.orig/tools/firmware/vgabios/Makefile xen-4.3.0/tools/firmware/vgabios/Makefile |
334 |
+--- tools/firmware/vgabios/Makefile 2013-07-09 18:46:56.000000000 +0800 |
335 |
++++ tools/firmware/vgabios/Makefile 2013-07-23 22:42:39.041261388 +0800 |
336 |
+@@ -37,7 +37,7 @@ |
337 |
+ tar czvf ../$(RELEASE).tgz --exclude CVS -C .. $(RELEASE)/ |
338 |
+ |
339 |
+ vgabios.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbetables.h |
340 |
+- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE $(VGABIOS_DATE) > _vgabios_.c |
341 |
++ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE $(VGABIOS_DATE) > _vgabios_.c |
342 |
+ $(BCC) -o vgabios.s -C-c -D__i86__ -S -0 _vgabios_.c |
343 |
+ sed -e 's/^\.text//' -e 's/^\.data//' vgabios.s > _vgabios_.s |
344 |
+ $(AS86) _vgabios_.s -b vgabios.bin -u -w- -g -0 -j -O -l vgabios.txt |
345 |
+@@ -47,7 +47,7 @@ |
346 |
+ ls -l VGABIOS-lgpl-latest.bin |
347 |
+ |
348 |
+ vgabios.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbetables.h |
349 |
+- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE -DDEBUG $(VGABIOS_DATE) > _vgabios-debug_.c |
350 |
++ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE -DDEBUG $(VGABIOS_DATE) > _vgabios-debug_.c |
351 |
+ $(BCC) -o vgabios-debug.s -C-c -D__i86__ -S -0 _vgabios-debug_.c |
352 |
+ sed -e 's/^\.text//' -e 's/^\.data//' vgabios-debug.s > _vgabios-debug_.s |
353 |
+ $(AS86) _vgabios-debug_.s -b vgabios.debug.bin -u -w- -g -0 -j -O -l vgabios.debug.txt |
354 |
+@@ -57,7 +57,7 @@ |
355 |
+ ls -l VGABIOS-lgpl-latest.debug.bin |
356 |
+ |
357 |
+ vgabios-cirrus.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c |
358 |
+- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus_.c |
359 |
++ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus_.c |
360 |
+ $(BCC) -o vgabios-cirrus.s -C-c -D__i86__ -S -0 _vgabios-cirrus_.c |
361 |
+ sed -e 's/^\.text//' -e 's/^\.data//' vgabios-cirrus.s > _vgabios-cirrus_.s |
362 |
+ $(AS86) _vgabios-cirrus_.s -b vgabios-cirrus.bin -u -w- -g -0 -j -O -l vgabios-cirrus.txt |
363 |
+@@ -67,7 +67,7 @@ |
364 |
+ ls -l VGABIOS-lgpl-latest.cirrus.bin |
365 |
+ |
366 |
+ vgabios-cirrus.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c |
367 |
+- $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DCIRRUS_DEBUG -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus-debug_.c |
368 |
++ $(CC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DCIRRUS_DEBUG -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus-debug_.c |
369 |
+ $(BCC) -o vgabios-cirrus-debug.s -C-c -D__i86__ -S -0 _vgabios-cirrus-debug_.c |
370 |
+ sed -e 's/^\.text//' -e 's/^\.data//' vgabios-cirrus-debug.s > _vgabios-cirrus-debug_.s |
371 |
+ $(AS86) _vgabios-cirrus-debug_.s -b vgabios-cirrus.debug.bin -u -w- -g -0 -j -O -l vgabios-cirrus.debug.txt |
372 |
|
373 |
diff --git a/app-emulation/xen-tools/files/xen-tools-4.4-api-fix.patch b/app-emulation/xen-tools/files/xen-tools-4.4-api-fix.patch |
374 |
new file mode 100644 |
375 |
index 0000000..fc0124c |
376 |
--- /dev/null |
377 |
+++ b/app-emulation/xen-tools/files/xen-tools-4.4-api-fix.patch |
378 |
@@ -0,0 +1,48 @@ |
379 |
+diff --git a/tools/configure b/tools/configure |
380 |
+index afc3000..6187468 100755 |
381 |
+--- a/tools/configure |
382 |
++++ b/tools/configure |
383 |
+@@ -4615,7 +4615,7 @@ if test x"${PERL}" = x"no" |
384 |
+ then |
385 |
+ as_fn_error $? "Unable to find perl, please install perl" "$LINENO" 5 |
386 |
+ fi |
387 |
+-if test "x$xapi" = "xy"; then : |
388 |
++if test "x$xenapi" = "xy"; then : |
389 |
+ |
390 |
+ # Extract the first word of "curl-config", so it can be a program name with args. |
391 |
+ set dummy curl-config; ac_word=$2 |
392 |
+diff --git a/tools/configure.ac b/tools/configure.ac |
393 |
+index 0754f0e..cc884f7 100644 |
394 |
+--- a/tools/configure.ac |
395 |
++++ b/tools/configure.ac |
396 |
+@@ -150,7 +150,7 @@ AC_PROG_INSTALL |
397 |
+ AC_PATH_PROG([BISON], [bison]) |
398 |
+ AC_PATH_PROG([FLEX], [flex]) |
399 |
+ AX_PATH_PROG_OR_FAIL([PERL], [perl]) |
400 |
+-AS_IF([test "x$xapi" = "xy"], [ |
401 |
++AS_IF([test "x$xenapi" = "xy"], [ |
402 |
+ AX_PATH_PROG_OR_FAIL([CURL], [curl-config]) |
403 |
+ AX_PATH_PROG_OR_FAIL([XML], [xml2-config]) |
404 |
+ ]) |
405 |
+diff --git a/tools/libxen/Makefile b/tools/libxen/Makefile |
406 |
+index b66f0bc..94b854b 100644 |
407 |
+--- a/tools/libxen/Makefile |
408 |
++++ b/tools/libxen/Makefile |
409 |
+@@ -22,12 +22,15 @@ MAJOR = 1.0 |
410 |
+ MINOR = 0 |
411 |
+ |
412 |
+ CFLAGS += -Iinclude \ |
413 |
+- $(shell $(XML2_CONFIG) --cflags) \ |
414 |
+- $(shell $(CURL_CONFIG) --cflags) \ |
415 |
+ -fPIC |
416 |
+ |
417 |
++ifeq ($(LIBXENAPI_BINDINGS),y) |
418 |
++CFLAGS += $(shell $(XML2_CONFIG) --cflags) \ |
419 |
++ $(shell $(CURL_CONFIG) --cflags) |
420 |
++ |
421 |
+ LDFLAGS += $(shell $(XML2_CONFIG) --libs) \ |
422 |
+ $(shell $(CURL_CONFIG) --libs) |
423 |
++endif |
424 |
+ |
425 |
+ LIBXENAPI_HDRS = $(wildcard include/xen/api/*.h) include/xen/api/xen_all.h |
426 |
+ LIBXENAPI_OBJS = $(patsubst %.c, %.o, $(wildcard src/*.c)) |
427 |
|
428 |
diff --git a/app-emulation/xen-tools/files/xencommons.confd b/app-emulation/xen-tools/files/xencommons.confd |
429 |
new file mode 100644 |
430 |
index 0000000..b9e2248 |
431 |
--- /dev/null |
432 |
+++ b/app-emulation/xen-tools/files/xencommons.confd |
433 |
@@ -0,0 +1,4 @@ |
434 |
+# /etc/conf.d/xencommons |
435 |
+ |
436 |
+# Load xen's kernel modules, and this will override defaults |
437 |
+XEN_KERNEL_MODULES="" |
438 |
|
439 |
diff --git a/app-emulation/xen-tools/files/xencommons.initd b/app-emulation/xen-tools/files/xencommons.initd |
440 |
new file mode 100644 |
441 |
index 0000000..5ece118 |
442 |
--- /dev/null |
443 |
+++ b/app-emulation/xen-tools/files/xencommons.initd |
444 |
@@ -0,0 +1,80 @@ |
445 |
+#!/sbin/runscript |
446 |
+# Copyright 1999-2013 Gentoo Foundation |
447 |
+# Distributed under the terms of the GNU General Public License v2 |
448 |
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xencommons.initd,v 1.1 2013/12/06 23:34:11 idella4 Exp $ |
449 |
+ |
450 |
+depend() { |
451 |
+ before xenstored |
452 |
+} |
453 |
+ |
454 |
+is_privileged_domain() { |
455 |
+ grep -qsE '^control_d$' /proc/xen/capabilities |
456 |
+ return $? |
457 |
+} |
458 |
+ |
459 |
+handle_kernel_modules() { |
460 |
+ local XEN_DEFAULT_KERNEL_MODULES=" |
461 |
+ xen-evtchn |
462 |
+ xen-gntdev |
463 |
+ xen-gntalloc |
464 |
+ xen-blkback |
465 |
+ xen-netback |
466 |
+ xen-pciback |
467 |
+ gntdev |
468 |
+ netbk |
469 |
+ blkbk |
470 |
+ xen-scsibk |
471 |
+ usbbk |
472 |
+ pciback |
473 |
+ xen-acpi-processor |
474 |
+ blktap2 |
475 |
+ blktap |
476 |
+ " |
477 |
+ |
478 |
+ [ "$1" = "remove" ] && OPTS="-r" |
479 |
+ |
480 |
+ XEN_KERNEL_MODULES="${XEN_KERNEL_MODULES:-${XEN_DEFAULT_KERNEL_MODULES}}" |
481 |
+ for i in ${XEN_KERNEL_MODULES}; do |
482 |
+ modprobe ${OPTS} $i 2>/dev/null |
483 |
+ done |
484 |
+ return 0 |
485 |
+} |
486 |
+ |
487 |
+start() { |
488 |
+ ebegin "Starting xencommons daemon" |
489 |
+ |
490 |
+ # not running in Xen dom0 or domU |
491 |
+ if [ ! -d /proc/xen ]; then |
492 |
+ eend 1 "Not running in Xen mode" |
493 |
+ return 1 |
494 |
+ fi |
495 |
+ |
496 |
+ # mount xenfs in dom0 or domU with a pv_ops kernel |
497 |
+ if ! test -f /proc/xen/capabilities && \ |
498 |
+ ! grep '^xenfs ' /proc/mounts >/dev/null; |
499 |
+ then |
500 |
+ mount -t xenfs xenfs /proc/xen |
501 |
+ fi |
502 |
+ |
503 |
+ if ! is_privileged_domain; then |
504 |
+ eend 1 "Not running on a privileged domain. xencommons not started" |
505 |
+ return 1 |
506 |
+ fi |
507 |
+ |
508 |
+ handle_kernel_modules |
509 |
+ |
510 |
+ eend $? "Failed to start xencommons" |
511 |
+} |
512 |
+ |
513 |
+stop () { |
514 |
+ ebegin "Stopping xencommons" |
515 |
+ if ! is_privileged_domain; then |
516 |
+ eend 1 "Not running on a privileged domain. xencommons not started" |
517 |
+ return 1 |
518 |
+ fi |
519 |
+ |
520 |
+ handle_kernel_modules remove |
521 |
+ |
522 |
+ eend $? "Failed to stop xencommons" |
523 |
+} |
524 |
+ |
525 |
|
526 |
diff --git a/app-emulation/xen-tools/files/xenconsoled.initd b/app-emulation/xen-tools/files/xenconsoled.initd |
527 |
index 12e4381..e2d245f 100644 |
528 |
--- a/app-emulation/xen-tools/files/xenconsoled.initd |
529 |
+++ b/app-emulation/xen-tools/files/xenconsoled.initd |
530 |
@@ -1,25 +1,34 @@ |
531 |
#!/sbin/runscript |
532 |
-# Copyright 1999-2011 Gentoo Foundation |
533 |
+# Copyright 1999-2014 Gentoo Foundation |
534 |
# Distributed under the terms of the GNU General Public License v2 |
535 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenconsoled.initd,v 1.1 2011/04/05 19:23:05 alexxy Exp $ |
536 |
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenconsoled.initd,v 1.6 2014/02/13 07:59:09 dlan Exp $ |
537 |
|
538 |
depend() { |
539 |
need xenstored |
540 |
+ after lvm |
541 |
+} |
542 |
+ |
543 |
+# bug #498720 |
544 |
+shutdown_all_domU() { |
545 |
+ # Note: shutdown all domU, including manually started ones |
546 |
+ local V=$(xl info| awk "/xen_minor/ { print \$3 }") |
547 |
+ # 4.2.2 do not support "-a" option |
548 |
+ [ $V -gt 2 ] && xl shutdown -a -w >/dev/null |
549 |
} |
550 |
|
551 |
start() { |
552 |
ebegin "Starting xenconsoled daemon" |
553 |
start-stop-daemon --start --exec /usr/sbin/xenconsoled \ |
554 |
- --pidfile /var/run/xenconsoled.pid \ |
555 |
- -- --pid-file=/var/run/xenconsoled.pid \ |
556 |
+ --pidfile /run/xenconsoled.pid \ |
557 |
+ -- --pid-file=/run/xenconsoled.pid \ |
558 |
${XENCONSOLED_OPTS} |
559 |
eend $* |
560 |
} |
561 |
|
562 |
stop() { |
563 |
- ebegin "Stoping xenconsoled daemon" |
564 |
+ ebegin "Stopping xenconsoled daemon" |
565 |
+ shutdown_all_domU |
566 |
start-stop-daemon --stop --exec /usr/sbin/xenconsoled \ |
567 |
- --pidfile /var/run/xenconsoled.pid |
568 |
+ --pidfile /run/xenconsoled.pid |
569 |
eend $* |
570 |
} |
571 |
- |
572 |
|
573 |
diff --git a/app-emulation/xen-tools/files/xend.initd-r2 b/app-emulation/xen-tools/files/xend.initd-r2 |
574 |
index e7b6ec0..837decc 100644 |
575 |
--- a/app-emulation/xen-tools/files/xend.initd-r2 |
576 |
+++ b/app-emulation/xen-tools/files/xend.initd-r2 |
577 |
@@ -1,7 +1,9 @@ |
578 |
#!/sbin/runscript |
579 |
-# Copyright 1999-2011 Gentoo Foundation |
580 |
+# Copyright 1999-2014 Gentoo Foundation |
581 |
# Distributed under the terms of the GNU General Public License v2 |
582 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xend.initd-r2,v 1.2 2011/09/10 17:22:46 alexxy Exp $ |
583 |
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xend.initd-r2,v 1.5 2014/01/02 04:58:53 idella4 Exp $ |
584 |
+ |
585 |
+extra_commands="status" |
586 |
|
587 |
depend() { |
588 |
need net xenconsoled xenstored |
589 |
@@ -44,3 +46,7 @@ stop() { |
590 |
/usr/sbin/xend stop |
591 |
eend $? |
592 |
} |
593 |
+ |
594 |
+status() { |
595 |
+ is_privileged_domain && /usr/sbin/xend status |
596 |
+} |
597 |
|
598 |
diff --git a/app-emulation/xen-tools/files/xendomains-screen.confd b/app-emulation/xen-tools/files/xendomains-screen.confd |
599 |
index a180c13..e75e19d 100644 |
600 |
--- a/app-emulation/xen-tools/files/xendomains-screen.confd |
601 |
+++ b/app-emulation/xen-tools/files/xendomains-screen.confd |
602 |
@@ -2,11 +2,11 @@ |
603 |
|
604 |
# Directory of domains to boot. AUTODIR should contain one or more symlinks |
605 |
# to domain config files in /etc/xen |
606 |
-AUTODIR=/etc/xen/auto |
607 |
+# AUTODIR=/etc/xen/auto |
608 |
|
609 |
# Send shutdown commands to all domains in parallel instead of waiting for |
610 |
# each to shutdown individually |
611 |
-PARALLEL_SHUTDOWN=yes |
612 |
+# PARALLEL_SHUTDOWN=yes |
613 |
|
614 |
# When SCREEN="yes", domains in AUTODIR have their consoles connected to a |
615 |
# screen session named SCREEN_NAME, with output logged to individual files |
616 |
|
617 |
diff --git a/app-emulation/xen-tools/files/xendomains.initd-r2 b/app-emulation/xen-tools/files/xendomains.initd-r2 |
618 |
index b7c72e1..103384c 100644 |
619 |
--- a/app-emulation/xen-tools/files/xendomains.initd-r2 |
620 |
+++ b/app-emulation/xen-tools/files/xendomains.initd-r2 |
621 |
@@ -1,7 +1,7 @@ |
622 |
#!/sbin/runscript |
623 |
# Copyright 1999-2013 Gentoo Foundation |
624 |
# Distributed under the terms of the GNU General Public License v2 |
625 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd-r2,v 1.6 2013/02/24 10:39:11 idella4 Exp $ |
626 |
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd-r2,v 1.8 2013/07/27 06:11:03 idella4 Exp $ |
627 |
|
628 |
extra_commands="status" |
629 |
|
630 |
@@ -13,10 +13,10 @@ depend() { |
631 |
get_domname() { |
632 |
local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1) |
633 |
|
634 |
- if [[ -z ${name_from_file} ]] ; then |
635 |
+ if [ -z ${name_from_file} ] ; then |
636 |
basename "${1}" |
637 |
else |
638 |
- echo ${name_from_file} |
639 |
+ echo ${name_from_file} |
640 |
fi |
641 |
} |
642 |
|
643 |
@@ -25,7 +25,7 @@ is_running() { |
644 |
} |
645 |
|
646 |
using_screen() { |
647 |
- [[ "${SCREEN}" == "yes" || "${SCREEN}" == "YES" ]] |
648 |
+ [ "${SCREEN}" = "yes" -o "${SCREEN}" = "YES" ] |
649 |
} |
650 |
|
651 |
set_screen_cmd() { |
652 |
@@ -46,7 +46,7 @@ start() { |
653 |
&& ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \ |
654 |
&& ${screen_cmd} log on \ |
655 |
&& ${screen_cmd} deflog on ) >/dev/null |
656 |
- if [[ $? -ne 0 ]] ; then |
657 |
+ if [ $? -ne 0 ] ; then |
658 |
eend 1 |
659 |
return 1 |
660 |
else |
661 |
@@ -77,7 +77,7 @@ stop() { |
662 |
# Stop all domains with config files in AUTODIR. |
663 |
DOMAINS="$(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort -r)" |
664 |
|
665 |
- if [[ "$PARALLEL_SHUTDOWN" = "yes" ]] ; then |
666 |
+ if [[ "$PARALLEL_SHUTDOWN" == "yes" ]] ; then |
667 |
for dom in $DOMAINS ; do |
668 |
name=$(get_domname ${dom}) |
669 |
if is_running ${name} ; then |
670 |
|
671 |
diff --git a/app-emulation/xen-tools/files/xenqemudev.confd b/app-emulation/xen-tools/files/xenqemudev.confd |
672 |
new file mode 100644 |
673 |
index 0000000..5b49520 |
674 |
--- /dev/null |
675 |
+++ b/app-emulation/xen-tools/files/xenqemudev.confd |
676 |
@@ -0,0 +1,7 @@ |
677 |
+# /etc/conf.d/xenqemudev |
678 |
+ |
679 |
+# To enable QEMU file backend, set to 'yes' |
680 |
+XENQEMUDEV_FILE_BACKEND_ENABLE="" |
681 |
+ |
682 |
+# Common options for xenqemudev |
683 |
+XENQEMUDEV_OPTS="" |
684 |
|
685 |
diff --git a/app-emulation/xen-tools/files/xenqemudev.initd b/app-emulation/xen-tools/files/xenqemudev.initd |
686 |
new file mode 100644 |
687 |
index 0000000..6f7066e |
688 |
--- /dev/null |
689 |
+++ b/app-emulation/xen-tools/files/xenqemudev.initd |
690 |
@@ -0,0 +1,81 @@ |
691 |
+#!/sbin/runscript |
692 |
+# Copyright 1999-2013 Gentoo Foundation |
693 |
+# Distributed under the terms of the GNU General Public License v2 |
694 |
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenqemudev.initd,v 1.2 2013/12/07 06:49:41 idella4 Exp $ |
695 |
+ |
696 |
+depend() { |
697 |
+ need xencommons xenstored xenconsoled |
698 |
+} |
699 |
+ |
700 |
+is_privileged_domain() { |
701 |
+ grep -qsE '^control_d$' /proc/xen/capabilities |
702 |
+ return $? |
703 |
+} |
704 |
+ |
705 |
+xen_setvars() { |
706 |
+ . /etc/xen/scripts/hotplugpath.sh |
707 |
+ |
708 |
+ XENQEMUDEV_PIDFILE=/run/xenqemudev.pid |
709 |
+ XEN_QEMU="${LIBEXEC}/qemu-system-i386" |
710 |
+} |
711 |
+ |
712 |
+xen_qemu_start() { |
713 |
+ if [ -z "${XENQEMUDEV_FILE_BACKEND_ENABLE}" ]; then |
714 |
+ ewarn " QEMU disk backend not enabled" |
715 |
+ ewarn " enable XENQEMUDEV_FILE_BACKEND_ENABLE in /etc/conf.d/xenqemudev" |
716 |
+ return 1 |
717 |
+ fi |
718 |
+ |
719 |
+ xen_setvars |
720 |
+ |
721 |
+ if [ ! -c /dev/xen/gntdev ]; then |
722 |
+ einfo " Xen gntdev driver not loaded" |
723 |
+ return 1 |
724 |
+ fi |
725 |
+ |
726 |
+ if [ -e "${XEN_QEMU}" ]; then |
727 |
+ einfo " Starting QEMU as disk backend for dom0" |
728 |
+ |
729 |
+ XENQEMUDEV_DEFAULT_OPTS="-xen-domid 0 -xen-attach -name dom0 \ |
730 |
+ -nographic -M xenpv -daemonize \ |
731 |
+ -monitor /dev/null -serial /dev/null -parallel /dev/null" |
732 |
+ |
733 |
+ XENQEMUDEV_OPTS=${XENQEMUDEV_OPTS:-${XENQEMUDEV_DEFAULT_OPTS}} |
734 |
+ |
735 |
+ start-stop-daemon --start --exec ${XEN_QEMU} \ |
736 |
+ --pidfile ${XENQEMUDEV_PIDFILE} \ |
737 |
+ -- -pidfile ${XENQEMUDEV_PIDFILE} \ |
738 |
+ ${XENQEMUDEV_OPTS} |
739 |
+ return $? |
740 |
+ fi |
741 |
+} |
742 |
+ |
743 |
+start() { |
744 |
+ ebegin "Starting xenqemudev daemon" |
745 |
+ |
746 |
+ # not running in Xen dom0 or domU |
747 |
+ if [ ! -d /proc/xen ]; then |
748 |
+ eend 1 "Not running in Xen mode" |
749 |
+ return 1 |
750 |
+ fi |
751 |
+ |
752 |
+ if ! is_privileged_domain; then |
753 |
+ eend 1 "Not running on a privileged domain. xenqemudev not started" |
754 |
+ return 1 |
755 |
+ fi |
756 |
+ |
757 |
+ xen_qemu_start |
758 |
+ |
759 |
+ eend $? "Failed to start xenqemudev" |
760 |
+} |
761 |
+ |
762 |
+stop () { |
763 |
+ ebegin "Stopping xenqemudev" |
764 |
+ |
765 |
+ xen_setvars |
766 |
+ |
767 |
+ start-stop-daemon --stop --exec ${XEN_QEMU} \ |
768 |
+ --pidfile ${XENQEMUDEV_PIDFILE} |
769 |
+ |
770 |
+ eend $? "Stopping xenqemudev, as it cannot be restarted." |
771 |
+} |
772 |
|
773 |
diff --git a/app-emulation/xen-tools/files/xenstored.initd b/app-emulation/xen-tools/files/xenstored.initd |
774 |
index 108da29..09009ea 100755 |
775 |
--- a/app-emulation/xen-tools/files/xenstored.initd |
776 |
+++ b/app-emulation/xen-tools/files/xenstored.initd |
777 |
@@ -1,28 +1,44 @@ |
778 |
#!/sbin/runscript |
779 |
-# Copyright 1999-2013 Gentoo Foundation |
780 |
+# Copyright 1999-2014 Gentoo Foundation |
781 |
# Distributed under the terms of the GNU General Public License v2 |
782 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenstored.initd,v 1.3 2013/03/16 16:46:57 idella4 Exp $ |
783 |
|
784 |
depend() { |
785 |
before xendomains xend sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp |
786 |
+ need xencommons |
787 |
+} |
788 |
+ |
789 |
+xenstored_dir_check() { |
790 |
+ # create dir dynamically |
791 |
+ local i |
792 |
+ for i in /var/lock/subsys /run/xen /run/xend/boot /run/xenstored; do |
793 |
+ [ -x $i ] || mkdir -p $i |
794 |
+ done |
795 |
} |
796 |
|
797 |
start() { |
798 |
ebegin "Starting xenstored daemon" |
799 |
+ xenstored_dir_check |
800 |
start-stop-daemon --start --exec /usr/sbin/xenstored \ |
801 |
- --pidfile /var/run/xenstored.pid \ |
802 |
- -- --pid-file=/var/run/xenstored.pid \ |
803 |
+ --pidfile /run/xenstored.pid \ |
804 |
+ -- --pid-file=/run/xenstored.pid \ |
805 |
$XENSTORED_OPTS |
806 |
- sleep 15 |
807 |
+ until xenstore-exists \ || ((15 < ++i)) |
808 |
+ do |
809 |
+ echo -n . |
810 |
+ sleep 1 |
811 |
+ done |
812 |
einfo "Setting domain0 name record" |
813 |
/usr/bin/xenstore-write "/local/domain/0/name" "Domain-0" |
814 |
+ local V=$(xl info| awk "/xen_minor/ { print \$3 }") |
815 |
+ [ $V -ge 4 ] && /usr/bin/xenstore-write "/local/domain/0/domid" 0 |
816 |
+ |
817 |
eend $* |
818 |
} |
819 |
|
820 |
stop() { |
821 |
ebegin "Stopping xenstored daemon" |
822 |
start-stop-daemon --stop --exec /usr/sbin/xenstored \ |
823 |
- --pidfile /var/run/xenstored.pid |
824 |
+ --pidfile /run/xenstored.pid |
825 |
eend $? |
826 |
} |
827 |
|
828 |
|
829 |
diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml |
830 |
index 6101069..bd4d8c1 100644 |
831 |
--- a/app-emulation/xen-tools/metadata.xml |
832 |
+++ b/app-emulation/xen-tools/metadata.xml |
833 |
@@ -2,10 +2,6 @@ |
834 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
835 |
<pkgmetadata> |
836 |
<herd>xen</herd> |
837 |
- <maintainer> |
838 |
- <email>idella4@g.o</email> |
839 |
- <name>Ian Delaney</name> |
840 |
- </maintainer> |
841 |
<use> |
842 |
<flag name='api'>Build the C libxenapi bindings</flag> |
843 |
<flag name='flask'>Enable the Flask XSM module from NSA</flag> |
844 |
@@ -14,5 +10,7 @@ |
845 |
<flag name='pygrub'>Install the pygrub boot loader</flag> |
846 |
<flag name='screen'>Enable support for running domain U console in an <pkg>app-misc/screen</pkg> session</flag> |
847 |
<flag name='xend'>Enable support the xend and xm to manage xen</flag> |
848 |
+ <flag name='ocaml'>Enable support for the ocaml language</flag> |
849 |
+ <flag name='pam'>Enable pam support</flag> |
850 |
</use> |
851 |
</pkgmetadata> |
852 |
|
853 |
diff --git a/app-emulation/xen-tools/xen-tools-4.4.0_rc6.ebuild b/app-emulation/xen-tools/xen-tools-4.4.0_rc6.ebuild |
854 |
new file mode 100644 |
855 |
index 0000000..29af48a |
856 |
--- /dev/null |
857 |
+++ b/app-emulation/xen-tools/xen-tools-4.4.0_rc6.ebuild |
858 |
@@ -0,0 +1,435 @@ |
859 |
+# Copyright 1999-2013 Gentoo Foundation |
860 |
+# Distributed under the terms of the GNU General Public License v2 |
861 |
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.3.1-r3.ebuild,v 1.4 2013/12/22 12:01:08 idella4 Exp $ |
862 |
+ |
863 |
+EAPI=5 |
864 |
+ |
865 |
+MY_PV=${PV/_/-} |
866 |
+ |
867 |
+PYTHON_COMPAT=( python{2_6,2_7} ) |
868 |
+PYTHON_REQ_USE='xml,threads' |
869 |
+ |
870 |
+if [[ $PV == *9999 ]]; then |
871 |
+ KEYWORDS="" |
872 |
+ REPO="xen-unstable.hg" |
873 |
+ EHG_REPO_URI="http://xenbits.xensource.com/${REPO}" |
874 |
+ S="${WORKDIR}/${REPO}" |
875 |
+ live_eclass="mercurial" |
876 |
+else |
877 |
+ KEYWORDS="~amd64 ~x86" |
878 |
+ UPSTREAM_VER= |
879 |
+ GENTOO_VER= |
880 |
+ |
881 |
+ [[ -n ${UPSTREAM_VER} ]] && \ |
882 |
+ UPSTRAM_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
883 |
+ [[ -n ${GENTOO_VER} ]] && \ |
884 |
+ GENTOO_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz" |
885 |
+ |
886 |
+ SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz |
887 |
+ ${UPSTRAM_PATCHSET_URI} |
888 |
+ ${GENTOO_PATCHSET_URI}" |
889 |
+ S="${WORKDIR}/xen-${MY_PV}" |
890 |
+fi |
891 |
+ |
892 |
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass} |
893 |
+ |
894 |
+DESCRIPTION="Xend daemon and tools" |
895 |
+HOMEPAGE="http://xen.org/" |
896 |
+DOCS=( README docs/README.xen-bugtool ) |
897 |
+ |
898 |
+LICENSE="GPL-2" |
899 |
+SLOT="0" |
900 |
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make |
901 |
+# >=dev-lang/ocaml-4 stable |
902 |
+# Masked in profiles/eapi-5-files instead |
903 |
+IUSE="api custom-cflags debug doc xsm flask hvm qemu ocaml +pam python pygrub screen static-libs xend" |
904 |
+ |
905 |
+REQUIRED_USE="hvm? ( qemu ) |
906 |
+ ${PYTHON_REQUIRED_USE} |
907 |
+ pygrub? ( python )" |
908 |
+ |
909 |
+DEPEND="dev-libs/lzo:2 |
910 |
+ dev-libs/glib:2 |
911 |
+ dev-libs/yajl |
912 |
+ dev-libs/libgcrypt |
913 |
+ dev-python/lxml[${PYTHON_USEDEP}] |
914 |
+ pam? ( dev-python/pypam[${PYTHON_USEDEP}] ) |
915 |
+ sys-libs/zlib |
916 |
+ sys-power/iasl |
917 |
+ sys-firmware/seabios |
918 |
+ sys-firmware/ipxe |
919 |
+ hvm? ( media-libs/libsdl ) |
920 |
+ ${PYTHON_DEPS} |
921 |
+ api? ( dev-libs/libxml2 |
922 |
+ net-misc/curl ) |
923 |
+ pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} ) |
924 |
+ sys-devel/bin86 |
925 |
+ sys-devel/dev86 |
926 |
+ dev-lang/perl |
927 |
+ app-misc/pax-utils |
928 |
+ dev-python/markdown |
929 |
+ doc? ( |
930 |
+ app-doc/doxygen |
931 |
+ dev-tex/latex2html[png,gif] |
932 |
+ media-gfx/graphviz |
933 |
+ dev-tex/xcolor |
934 |
+ media-gfx/transfig |
935 |
+ dev-texlive/texlive-latexextra |
936 |
+ virtual/latex-base |
937 |
+ dev-tex/latexmk |
938 |
+ dev-texlive/texlive-latex |
939 |
+ dev-texlive/texlive-pictures |
940 |
+ dev-texlive/texlive-latexrecommended |
941 |
+ ) |
942 |
+ hvm? ( x11-proto/xproto |
943 |
+ !net-libs/libiscsi ) |
944 |
+ qemu? ( x11-libs/pixman ) |
945 |
+ ocaml? ( dev-ml/findlib |
946 |
+ >=dev-lang/ocaml-4 )" |
947 |
+RDEPEND="sys-apps/iproute2 |
948 |
+ net-misc/bridge-utils |
949 |
+ screen? ( |
950 |
+ app-misc/screen |
951 |
+ app-admin/logrotate |
952 |
+ ) |
953 |
+ virtual/udev" |
954 |
+ |
955 |
+# hvmloader is used to bootstrap a fully virtualized kernel |
956 |
+# Approved by QA team in bug #144032 |
957 |
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader" |
958 |
+ |
959 |
+RESTRICT="test" |
960 |
+ |
961 |
+pkg_setup() { |
962 |
+ python-single-r1_pkg_setup |
963 |
+ export "CONFIG_LOMOUNT=y" |
964 |
+ |
965 |
+ if has_version dev-libs/libgcrypt; then |
966 |
+ export "CONFIG_GCRYPT=y" |
967 |
+ fi |
968 |
+ if use xsm; then |
969 |
+ export "XSM_ENABLE=y" |
970 |
+ if use flask; then |
971 |
+ export "FLASK_ENABLE=y" |
972 |
+ fi |
973 |
+ else |
974 |
+ export "XSM_ENABLE=n" |
975 |
+ fi |
976 |
+ |
977 |
+ if use qemu; then |
978 |
+ export "CONFIG_IOEMU=y" |
979 |
+ else |
980 |
+ export "CONFIG_IOEMU=n" |
981 |
+ fi |
982 |
+ |
983 |
+ if use xend; then |
984 |
+ export "CONFIG_XEND=y" |
985 |
+ else |
986 |
+ export "CONFIG_XEND=n" |
987 |
+ fi |
988 |
+ |
989 |
+ if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then |
990 |
+ eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or" |
991 |
+ eerror "an amd64 multilib profile is required. Remove the hvm use flag" |
992 |
+ eerror "to build xen-tools on your current profile." |
993 |
+ die "USE=hvm is unsupported on this system." |
994 |
+ fi |
995 |
+ |
996 |
+ if [[ -z ${XEN_TARGET_ARCH} ]] ; then |
997 |
+ if use x86 && use amd64; then |
998 |
+ die "Confusion! Both x86 and amd64 are set in your use flags!" |
999 |
+ elif use x86; then |
1000 |
+ export XEN_TARGET_ARCH="x86_32" |
1001 |
+ elif use amd64 ; then |
1002 |
+ export XEN_TARGET_ARCH="x86_64" |
1003 |
+ else |
1004 |
+ die "Unsupported architecture!" |
1005 |
+ fi |
1006 |
+ fi |
1007 |
+ #bug 472438 |
1008 |
+ export BASH_COMPLETION_DIR=/usr/share/bash-completion |
1009 |
+} |
1010 |
+ |
1011 |
+src_prepare() { |
1012 |
+ # Upstream's patchset |
1013 |
+ if [[ -n ${UPSTREAM_VER} ]]; then |
1014 |
+ EPATCH_SUFFIX="patch" \ |
1015 |
+ EPATCH_FORCE="yes" \ |
1016 |
+ epatch "${WORKDIR}"/patches-upstream |
1017 |
+ fi |
1018 |
+ |
1019 |
+ # Gentoo's patchset |
1020 |
+ if [[ -n ${GENTOO_VER} ]]; then |
1021 |
+ EPATCH_SUFFIX="patch" \ |
1022 |
+ EPATCH_FORCE="yes" \ |
1023 |
+ epatch "${WORKDIR}"/patches-gentoo |
1024 |
+ fi |
1025 |
+ |
1026 |
+ # Fix texi2html build error with new texi2html, qemu.doc.html |
1027 |
+ epatch "${FILESDIR}"/${PN}-4-docfix.patch |
1028 |
+ |
1029 |
+ # Fix network broadcast on bridged networks |
1030 |
+ epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch" |
1031 |
+ |
1032 |
+ # Bug 496708 |
1033 |
+ epatch "${FILESDIR}"/${PN}-4-unbundle-ipxe.patch |
1034 |
+ |
1035 |
+ # Fix bridge by idella4, bug #362575 |
1036 |
+ epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch" |
1037 |
+ |
1038 |
+ # Prevent double stripping of files at install |
1039 |
+ epatch "${FILESDIR}"/${PN/-tools/}-4.4-nostrip.patch |
1040 |
+ |
1041 |
+ # fix jobserver in Makefile |
1042 |
+ epatch "${FILESDIR}"/${PN/-tools/}-4.3-jserver.patch |
1043 |
+ |
1044 |
+ # Set dom0-min-mem to kb; Bug #472982 |
1045 |
+ epatch "${FILESDIR}"/${PN/-tools/}-4.2-configsxp.patch |
1046 |
+ |
1047 |
+ # Bug 477676 |
1048 |
+ epatch "${FILESDIR}"/${PN}-4.3-ar-cc.patch |
1049 |
+ |
1050 |
+ # Bug 379537 |
1051 |
+ epatch "${FILESDIR}"/fix-gold-ld.patch |
1052 |
+ |
1053 |
+ # Prevent file collision with qemu package Bug 478064 |
1054 |
+ epatch "${FILESDIR}"/xen-4.4-qemu-bridge.patch |
1055 |
+ mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die |
1056 |
+ |
1057 |
+ epatch "${FILESDIR}"/${PN}-4.4-api-fix.patch |
1058 |
+ |
1059 |
+ use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die |
1060 |
+ sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \ |
1061 |
+ -i tools/firmware/Makefile || die |
1062 |
+ |
1063 |
+ # Drop .config, fixes to gcc-4.6 |
1064 |
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
1065 |
+ |
1066 |
+ # if the user *really* wants to use their own custom-cflags, let them |
1067 |
+ if use custom-cflags; then |
1068 |
+ einfo "User wants their own CFLAGS - removing defaults" |
1069 |
+ |
1070 |
+ # try and remove all the default cflags |
1071 |
+ find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \ |
1072 |
+ -exec sed \ |
1073 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
1074 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
1075 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
1076 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
1077 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
1078 |
+ -i {} + || die "failed to re-set custom-cflags" |
1079 |
+ fi |
1080 |
+ |
1081 |
+ if ! use pygrub; then |
1082 |
+ sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die |
1083 |
+ fi |
1084 |
+ |
1085 |
+ if ! use python; then |
1086 |
+ sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die |
1087 |
+ fi |
1088 |
+ |
1089 |
+ # Disable hvm support on systems that don't support x86_32 binaries. |
1090 |
+ if ! use hvm; then |
1091 |
+ sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die |
1092 |
+ fi |
1093 |
+ |
1094 |
+ # Don't bother with qemu, only needed for fully virtualised guests |
1095 |
+ if ! use qemu; then |
1096 |
+ sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die |
1097 |
+ fi |
1098 |
+ |
1099 |
+ # Bug 472438 |
1100 |
+ sed -e 's:^BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(SHARE_DIR)/bash-completion:' \ |
1101 |
+ -i Config.mk || die |
1102 |
+ |
1103 |
+ |
1104 |
+ # xencommons, Bug #492332, sed lighter weight than patching |
1105 |
+ sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \ |
1106 |
+ -i tools/hotplug/Linux/init.d/xencommons || die |
1107 |
+ |
1108 |
+ # respect multilib, usr/lib/libcacard.so.0.0.0 |
1109 |
+ sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \ |
1110 |
+ -i tools/qemu-xen/configure || die |
1111 |
+ |
1112 |
+ # fix QA warning, create /var/run/, /var/lock dynamically |
1113 |
+ sed -i -e "/\$(INSTALL_DIR) \$(DESTDIR)\$(XEN_RUN_DIR)/d" \ |
1114 |
+ tools/libxl/Makefile || die |
1115 |
+ |
1116 |
+ sed -i -e "/\/var\/run\//d" \ |
1117 |
+ tools/xenstore/Makefile \ |
1118 |
+ tools/pygrub/Makefile || die |
1119 |
+ |
1120 |
+ sed -i -e "/\/var\/lock\/subsys/d" \ |
1121 |
+ tools/Makefile || die |
1122 |
+ |
1123 |
+ epatch_user |
1124 |
+} |
1125 |
+ |
1126 |
+src_configure() { |
1127 |
+ local myconf="--prefix=/usr \ |
1128 |
+ --libdir=/usr/$(get_libdir) \ |
1129 |
+ --disable-werror \ |
1130 |
+ --with-system-seabios=/usr/share/seabios/bios.bin \ |
1131 |
+ $(use_enable pam) \ |
1132 |
+ $(use_enable api xenapi) \ |
1133 |
+ $(use_enable ocaml ocamltools) \ |
1134 |
+ " |
1135 |
+ econf ${myconf} |
1136 |
+} |
1137 |
+ |
1138 |
+src_compile() { |
1139 |
+ export VARTEXFONTS="${T}/fonts" |
1140 |
+ local myopt |
1141 |
+ use debug && myopt="${myopt} debug=y" |
1142 |
+ |
1143 |
+ use custom-cflags || unset CFLAGS |
1144 |
+ if test-flag-CC -fno-strict-overflow; then |
1145 |
+ append-flags -fno-strict-overflow |
1146 |
+ fi |
1147 |
+ |
1148 |
+ unset LDFLAGS |
1149 |
+ unset CFLAGS |
1150 |
+ emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt} |
1151 |
+ |
1152 |
+ use doc && emake -C docs txt html |
1153 |
+ emake -C docs man-pages |
1154 |
+} |
1155 |
+ |
1156 |
+src_install() { |
1157 |
+ # Override auto-detection in the build system, bug #382573 |
1158 |
+ export INITD_DIR=/tmp/init.d |
1159 |
+ export CONFIG_LEAF_DIR=../tmp/default |
1160 |
+ |
1161 |
+ # Let the build system compile installed Python modules. |
1162 |
+ local PYTHONDONTWRITEBYTECODE |
1163 |
+ export PYTHONDONTWRITEBYTECODE |
1164 |
+ |
1165 |
+ emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \ |
1166 |
+ XEN_PYTHON_NATIVE_INSTALL=y install-tools |
1167 |
+ |
1168 |
+ # Fix the remaining Python shebangs. |
1169 |
+ python_fix_shebang "${D}" |
1170 |
+ |
1171 |
+ # Remove RedHat-specific stuff |
1172 |
+ rm -rf "${D}"tmp || die |
1173 |
+ |
1174 |
+ # uncomment lines in xl.conf |
1175 |
+ sed -e 's:^#autoballoon=1:autoballoon=1:' \ |
1176 |
+ -e 's:^#lockfile="/var/lock/xl":lockfile="/var/lock/xl":' \ |
1177 |
+ -e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \ |
1178 |
+ -i tools/examples/xl.conf || die |
1179 |
+ |
1180 |
+ # Reset bash completion dir; Bug 472438 |
1181 |
+ mv "${D}"bash-completion "${D}"usr/share/ || die |
1182 |
+ |
1183 |
+ if use doc; then |
1184 |
+ emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs |
1185 |
+ |
1186 |
+ dohtml -r docs/ |
1187 |
+ docinto pdf |
1188 |
+ dodoc ${DOCS[@]} |
1189 |
+ [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html |
1190 |
+ fi |
1191 |
+ |
1192 |
+ rm -rf "${D}"/usr/share/doc/xen/ |
1193 |
+ doman docs/man?/* |
1194 |
+ |
1195 |
+ if use xend; then |
1196 |
+ newinitd "${FILESDIR}"/xend.initd-r2 xend || die "Couldn't install xen.initd" |
1197 |
+ fi |
1198 |
+ newconfd "${FILESDIR}"/xendomains.confd xendomains |
1199 |
+ newconfd "${FILESDIR}"/xenstored.confd xenstored |
1200 |
+ newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled |
1201 |
+ newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains |
1202 |
+ newinitd "${FILESDIR}"/xenstored.initd xenstored |
1203 |
+ newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled |
1204 |
+ newinitd "${FILESDIR}"/xencommons.initd xencommons |
1205 |
+ newconfd "${FILESDIR}"/xencommons.confd xencommons |
1206 |
+ newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev |
1207 |
+ newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev |
1208 |
+ |
1209 |
+ if use screen; then |
1210 |
+ cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die |
1211 |
+ cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die |
1212 |
+ keepdir /var/log/xen-consoles |
1213 |
+ fi |
1214 |
+ |
1215 |
+ # Move files built with use qemu, Bug #477884 |
1216 |
+ if [[ "${ARCH}" == 'amd64' ]] && use qemu; then |
1217 |
+ mkdir -p "${D}"usr/$(get_libdir)/xen/bin || die |
1218 |
+ mv "${D}"usr/lib/xen/bin/* "${D}"usr/$(get_libdir)/xen/bin/ || die |
1219 |
+ fi |
1220 |
+ |
1221 |
+ # For -static-libs wrt Bug 384355 |
1222 |
+ if ! use static-libs; then |
1223 |
+ rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a |
1224 |
+ fi |
1225 |
+ |
1226 |
+ # xend expects these to exist |
1227 |
+ keepdir /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen |
1228 |
+ |
1229 |
+ # for xendomains |
1230 |
+ keepdir /etc/xen/auto |
1231 |
+ |
1232 |
+ # Temp QA workaround |
1233 |
+ dodir "$(udev_get_udevdir)" |
1234 |
+ mv "${D}"/etc/udev/* "${D}/$(udev_get_udevdir)" |
1235 |
+ rm -rf "${D}"/etc/udev |
1236 |
+ |
1237 |
+ # Remove files failing QA AFTER emake installs them, avoiding seeking absent files |
1238 |
+ find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \ |
1239 |
+ -o -name openbios-ppc -o -name palcode-clipper \) -delete || die |
1240 |
+} |
1241 |
+ |
1242 |
+pkg_postinst() { |
1243 |
+ elog "Official Xen Guide and the offical wiki page:" |
1244 |
+ elog "https://wiki.gentoo.org/wiki/Xen" |
1245 |
+ elog "http://wiki.xen.org/wiki/Main_Page" |
1246 |
+ elog "" |
1247 |
+ elog "Recommended to utilise the xencommons script to config sytem At boot" |
1248 |
+ elog "Add by use of rc-update on completion of the install" |
1249 |
+ |
1250 |
+ if [[ "$(scanelf -s __guard -q "${PYTHON}")" ]] ; then |
1251 |
+ echo |
1252 |
+ ewarn "xend may not work when python is built with stack smashing protection (ssp)." |
1253 |
+ ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866" |
1254 |
+ ewarn "This problem may be resolved as of Xen 3.0.4, if not post in the bug." |
1255 |
+ fi |
1256 |
+ |
1257 |
+ # TODO: we need to have the current Python slot here. |
1258 |
+ if ! has_version "dev-lang/python[ncurses]"; then |
1259 |
+ echo |
1260 |
+ ewarn "NB: Your dev-lang/python is built without USE=ncurses." |
1261 |
+ ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py." |
1262 |
+ fi |
1263 |
+ |
1264 |
+ if has_version "sys-apps/iproute2[minimal]"; then |
1265 |
+ echo |
1266 |
+ ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking" |
1267 |
+ ewarn "will not work until you rebuild iproute2 without USE=minimal." |
1268 |
+ fi |
1269 |
+ |
1270 |
+ if ! use hvm; then |
1271 |
+ echo |
1272 |
+ elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm" |
1273 |
+ elog "support enable the hvm use flag." |
1274 |
+ elog "An x86 or amd64 multilib system is required to build HVM support." |
1275 |
+ fi |
1276 |
+ |
1277 |
+ if use xend; then |
1278 |
+ elog"";elog "xend capability has been enabled and installed" |
1279 |
+ fi |
1280 |
+ |
1281 |
+ if use qemu; then |
1282 |
+ elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source" |
1283 |
+ elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently" |
1284 |
+ elog "with the qemu capable xen. It is up to the user to distinguish between and utilise" |
1285 |
+ elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise" |
1286 |
+ fi |
1287 |
+ |
1288 |
+ if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then |
1289 |
+ echo |
1290 |
+ elog "xensv is broken upstream (Gentoo bug #142011)." |
1291 |
+ elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed." |
1292 |
+ fi |
1293 |
+} |