1 |
saispo |
65925 |
%define name xen |
2 |
tmb |
201370 |
%define version 4.1.2 |
3 |
alien |
226955 |
%define release %mkrel 4 |
4 |
saispo |
65925 |
%define major 3.0 |
5 |
|
|
%define libname %mklibname %{name} %{major} |
6 |
|
|
%define develname %mklibname %{name} -d |
7 |
|
|
|
8 |
|
|
Name: %{name} |
9 |
|
|
Version: %{version} |
10 |
|
|
Release: %{release} |
11 |
|
|
Summary: The basic tools for managing XEN virtual machines |
12 |
|
|
Group: System/Kernel and hardware |
13 |
|
|
License: GPL |
14 |
|
|
Source0: http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz |
15 |
|
|
Source1: %{name}.modules |
16 |
|
|
Source2: qemu-xen-4.0.0-rc4.tar.gz |
17 |
|
|
Source3: http://www.hyperrealm.com/libconfig/libconfig-1.3.2.tar.gz |
18 |
|
|
# stubdoms |
19 |
|
|
Source10: zlib-1.2.3.tar.gz |
20 |
|
|
Source11: newlib-1.16.0.tar.gz |
21 |
|
|
Source12: grub-0.97.tar.gz |
22 |
|
|
Source13: lwip-1.3.0.tar.gz |
23 |
|
|
Source14: pciutils-2.2.9.tar.bz2 |
24 |
|
|
Source15: ocaml-3.11.0.tar.gz |
25 |
tmb |
83034 |
Source16: ipxe-git-v1.0.0.tar.gz |
26 |
saispo |
65925 |
# initscripts |
27 |
|
|
Source20: init.xenstored |
28 |
|
|
Source21: init.xenconsoled |
29 |
|
|
Source22: init.blktapctrl |
30 |
|
|
Source23: init.xend |
31 |
|
|
Source30: sysconfig.xenstored |
32 |
|
|
Source31: sysconfig.xenconsoled |
33 |
|
|
Source32: sysconfig.blktapctrl |
34 |
tmb |
201370 |
Patch0: xen-4.1.2-fix-stubdom-Makefile.patch |
35 |
alien |
226955 |
# from unstable commit http://xenbits.xensource.com/hg/xen-unstable.hg/raw-rev/9eb9948904cd |
36 |
|
|
Patch1: xen-4.1.2-have-xz-kernel-support.patch |
37 |
saispo |
65925 |
# fedora patches |
38 |
|
|
Patch3: xen-xenstore-cli.patch |
39 |
|
|
Patch5: xen-net-disable-iptables-on-bridge.patch |
40 |
|
|
Patch10: xen-no-werror.patch |
41 |
|
|
Patch11: xen-4.0.1-gcc45.patch |
42 |
|
|
Patch12: xen-4.0.1-gcc451.patch |
43 |
|
|
Patch13: xen-4.0.1-py2.7.patch |
44 |
guillomovitch |
223229 |
# debian patch |
45 |
|
|
Patch20: fix_buffer_underflow_CVE-2012-0029.patch |
46 |
saispo |
65925 |
Requires: python |
47 |
|
|
Requires: python-twisted-core |
48 |
|
|
Requires: python-pyxml |
49 |
|
|
Requires: module-init-tools |
50 |
|
|
Requires: iptables |
51 |
|
|
Requires: bridge-utils |
52 |
|
|
Requires: glibc-xen |
53 |
|
|
Requires: grub |
54 |
tmb |
201346 |
Requires: kernel-server |
55 |
saispo |
65925 |
Requires: %{libname} = %{version}-%{release} |
56 |
|
|
BuildRequires: SDL-devel |
57 |
|
|
BuildRequires: libx11-devel |
58 |
|
|
BuildRequires: gtk2-devel |
59 |
|
|
BuildRequires: curl-devel |
60 |
|
|
Buildrequires: dev86-devel |
61 |
|
|
BuildRequires: libext2fs-devel |
62 |
|
|
BuildRequires: ncurses-devel |
63 |
|
|
BuildRequires: libpython-devel >= 2.4 |
64 |
|
|
BuildRequires: zlib-devel |
65 |
|
|
BuildRequires: bzip2-devel |
66 |
|
|
BuildRequires: lzma-devel |
67 |
|
|
BuildRequires: pciutils-devel |
68 |
|
|
BuildRequires: libidn-devel |
69 |
|
|
BuildRequires: openssl-devel |
70 |
|
|
BuildRequires: gnutls-devel |
71 |
fwang |
131424 |
BuildRequires: libgcrypt-devel |
72 |
saispo |
65925 |
BuildRequires: brlapi-devel |
73 |
|
|
BuildRequires: e2fsprogs-devel |
74 |
|
|
BuildRequires: libuuid-devel |
75 |
tmb |
83034 |
BuildRequires: ocaml |
76 |
|
|
BuildRequires: ocaml-findlib-devel |
77 |
saispo |
65925 |
BuildRequires: iasl |
78 |
tmb |
83034 |
BuildRequires: vde-devel |
79 |
saispo |
65925 |
BuildRequires: libaio-devel |
80 |
|
|
BuildRequires: gettext |
81 |
|
|
BuildRequires: libconfig-devel |
82 |
|
|
# documentation |
83 |
|
|
BuildRequires: ghostscript |
84 |
|
|
BuildRequires: transfig |
85 |
|
|
BuildRequires: texinfo |
86 |
|
|
BuildRequires: tetex-latex |
87 |
dmorgan |
161928 |
BuildRequires: texi2html |
88 |
saispo |
65925 |
Obsoletes: xen-uptodate |
89 |
|
|
Requires: xen-hypervisor = %{version} |
90 |
|
|
|
91 |
|
|
%description |
92 |
|
|
The basic tools for managing XEN virtual machines. |
93 |
|
|
|
94 |
malo |
219491 |
%package -n ocaml-xen |
95 |
tmb |
83034 |
Summary: OCaml bindings for Xen |
96 |
|
|
Group: Development/Other |
97 |
malo |
219491 |
Obsoletes: xen-ocaml < %{version}-%{release} |
98 |
tmb |
83034 |
|
99 |
malo |
219491 |
%description -n ocaml-xen |
100 |
tmb |
83034 |
This package contains the Ocaml bindings for Xen |
101 |
|
|
|
102 |
saispo |
65925 |
%package hypervisor |
103 |
|
|
Summary: Libraries for Xen tools |
104 |
|
|
Group: System/Kernel and hardware |
105 |
|
|
|
106 |
|
|
%description hypervisor |
107 |
|
|
This package contains the Xen hypervisor |
108 |
|
|
|
109 |
|
|
%package doc |
110 |
|
|
Summary: XEN documentation |
111 |
|
|
Group: System/Kernel and hardware |
112 |
|
|
Obsoletes: xen-uptodate-doc |
113 |
|
|
|
114 |
|
|
%description doc |
115 |
|
|
XEN documentation. |
116 |
|
|
|
117 |
|
|
%package -n %{libname} |
118 |
|
|
Summary: Libraries for %{name} |
119 |
|
|
Group: System/Libraries |
120 |
tmb |
83034 |
Conflicts: %{name} < 3.1.0-5 |
121 |
saispo |
65925 |
|
122 |
|
|
%description -n %{libname} |
123 |
|
|
This package contains the libraries needed to run programs dynamically |
124 |
|
|
linked with Xen libraries. |
125 |
|
|
|
126 |
|
|
%package -n %{develname} |
127 |
|
|
Summary: Static libraries and header files for %{name} |
128 |
|
|
Group: Development/C |
129 |
|
|
Requires: %{libname} = %{version}-%{release} |
130 |
|
|
Provides: %{name}-devel = %{version}-%{release} |
131 |
tmb |
83034 |
Conflicts: %{name} < 3.1.0-5 |
132 |
saispo |
65925 |
|
133 |
|
|
%description -n %{develname} |
134 |
|
|
This package contains the static development libraries and headers needed |
135 |
|
|
to compile applications linked with Xen libraries. |
136 |
|
|
|
137 |
|
|
%prep |
138 |
|
|
%setup -q |
139 |
|
|
%patch0 -p 1 |
140 |
alien |
226955 |
%patch1 -p 1 |
141 |
tmb |
83034 |
#patch3 -p 1 |
142 |
|
|
#patch5 -p 1 |
143 |
saispo |
65925 |
%patch10 -p 1 |
144 |
tmb |
83034 |
#patch11 -p 1 |
145 |
saispo |
65925 |
%patch12 -p1 |
146 |
tmb |
83034 |
#patch13 -p1 |
147 |
saispo |
65925 |
|
148 |
|
|
# stub domain |
149 |
|
|
cp %{SOURCE10} stubdom |
150 |
|
|
cp %{SOURCE11} stubdom |
151 |
|
|
cp %{SOURCE12} stubdom |
152 |
|
|
cp %{SOURCE13} stubdom |
153 |
|
|
cp %{SOURCE14} stubdom |
154 |
|
|
cp %{SOURCE15} stubdom |
155 |
|
|
|
156 |
tmb |
83034 |
cp %{SOURCE16} tools/firmware/etherboot/ipxe.tar.gz |
157 |
|
|
|
158 |
saispo |
65925 |
# qemu |
159 |
|
|
tar xf %{SOURCE2} -C tools |
160 |
guillomovitch |
223229 |
pushd tools/ioemu-qemu-xen |
161 |
|
|
%patch20 -p1 |
162 |
|
|
popd |
163 |
saispo |
65925 |
|
164 |
|
|
%build |
165 |
|
|
# clean all stuff |
166 |
|
|
export CFLAGS="%{optflags}" |
167 |
|
|
%make prefix=/usr dist-xen |
168 |
|
|
%make prefix=/usr dist-tools |
169 |
|
|
make prefix=/usr dist-docs |
170 |
|
|
unset CFLAGS |
171 |
|
|
make dist-stubdom |
172 |
|
|
|
173 |
|
|
%install |
174 |
|
|
rm -rf %{buildroot} |
175 |
|
|
make DESTDIR=%{buildroot} prefix=/usr install-xen |
176 |
|
|
make DESTDIR=%{buildroot} prefix=/usr install-tools |
177 |
|
|
make DESTDIR=%{buildroot} prefix=/usr install-docs |
178 |
|
|
make DESTDIR=%{buildroot} prefix=/usr install-stubdom |
179 |
|
|
|
180 |
|
|
# stubdom: newlib |
181 |
|
|
rm -rf %{buildroot}/usr/*-xen-elf |
182 |
|
|
|
183 |
|
|
# remove additional kernel symlink |
184 |
|
|
rm -f %{buildroot}/boot/xen-3.4.gz |
185 |
|
|
rm -f %{buildroot}/boot/xen-3.gz |
186 |
|
|
|
187 |
|
|
# remove unwanted firmware files |
188 |
|
|
rm -rf %{buildroot}/lib/firmware |
189 |
|
|
|
190 |
|
|
# remove pointless helper |
191 |
|
|
rm -f %{buildroot}%{_sbindir}/xen-python-path |
192 |
|
|
|
193 |
|
|
# remove README's not intended for end users |
194 |
|
|
rm -f %{buildroot}/%{_sysconfdir}/xen/README* |
195 |
|
|
|
196 |
|
|
# fix man pages |
197 |
|
|
install -d -m 755 %{buildroot}%{_mandir}/man{1,5} |
198 |
guillomovitch |
223229 |
install -m 644 docs/man/*.1 %{buildroot}%{_mandir}/man1 |
199 |
|
|
install -m 644 docs/man/*.5 %{buildroot}%{_mandir}/man5 |
200 |
saispo |
65925 |
|
201 |
|
|
# install doc manually |
202 |
|
|
rm -rf %{buildroot}%{_docdir}/qemu |
203 |
|
|
install -d -m 755 %{buildroot}%{_docdir}/%{name} |
204 |
|
|
install -m 644 README %{buildroot}%{_docdir}/%{name} |
205 |
|
|
install -m 644 docs/ps/* %{buildroot}%{_docdir}/%{name} |
206 |
|
|
install -m 644 docs/pdf/* %{buildroot}%{_docdir}/%{name} |
207 |
|
|
|
208 |
|
|
# install state directory |
209 |
|
|
install -d -m 755 %{buildroot}%{_localstatedir}/lib/xend/{domains,state,storage} |
210 |
|
|
|
211 |
|
|
# udev |
212 |
tmb |
83034 |
#rm -rf %{buildroot}/etc/udev/rules.d/xen*.rules |
213 |
|
|
#mv %{buildroot}/etc/udev/xen*.rules %{buildroot}/etc/udev/rules.d |
214 |
saispo |
65925 |
|
215 |
|
|
# init scripts |
216 |
tmb |
83034 |
#install -d -m 755 %{buildroot}%{_initrddir} |
217 |
|
|
#mv %{buildroot}%{_sysconfdir}/init.d/* %{buildroot}%{_initrddir} |
218 |
|
|
#rm -rf %{buildroot}%{_sysconfdir}/init.d |
219 |
saispo |
65925 |
|
220 |
|
|
install -m 755 %{SOURCE20} %{buildroot}%{_initrddir}/xenstored |
221 |
|
|
install -m 755 %{SOURCE21} %{buildroot}%{_initrddir}/xenconsoled |
222 |
|
|
install -m 755 %{SOURCE22} %{buildroot}%{_initrddir}/blktapctrl |
223 |
|
|
install -m 755 %{SOURCE23} %{buildroot}%{_initrddir}/xend |
224 |
|
|
|
225 |
|
|
# sysconfig |
226 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig |
227 |
|
|
install -m 644 %{SOURCE30} %{buildroot}%{_sysconfdir}/sysconfig/xenstored |
228 |
|
|
install -m 644 %{SOURCE31} %{buildroot}%{_sysconfdir}/sysconfig/xenconsoled |
229 |
|
|
install -m 644 %{SOURCE32} %{buildroot}%{_sysconfdir}/sysconfig/blktapctrl |
230 |
|
|
|
231 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/modules |
232 |
|
|
install -m 755 %{SOURCE1} \ |
233 |
|
|
%{buildroot}%{_sysconfdir}/sysconfig/modules/%{name}.modules |
234 |
|
|
|
235 |
|
|
# logrotate |
236 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d |
237 |
|
|
cat > %{buildroot}%{_sysconfdir}/logrotate.d/xen <<EOF |
238 |
|
|
/var/log/xen/xend-debug.log /var/log/xen/xen-hotplug.log |
239 |
|
|
/var/log/xen/domain-builder-ng.log { |
240 |
|
|
notifempty |
241 |
|
|
missingok |
242 |
|
|
copytruncate |
243 |
|
|
} |
244 |
|
|
EOF |
245 |
|
|
|
246 |
|
|
# standard gnu info files |
247 |
|
|
rm -rf %{buildroot}/usr/info |
248 |
|
|
|
249 |
|
|
# gprintify has a bug handling some constructs in xendomain |
250 |
|
|
export DONT_GPRINTIFY=1 |
251 |
|
|
|
252 |
|
|
%clean |
253 |
|
|
rm -rf %{buildroot} |
254 |
|
|
|
255 |
|
|
%files |
256 |
|
|
%dir %{_docdir}/%{name} |
257 |
|
|
%{_docdir}/%{name}/README |
258 |
|
|
%{_sysconfdir}/bash_completion.d/xl.sh |
259 |
|
|
%config(noreplace) %{_sysconfdir}/udev/rules.d/* |
260 |
|
|
%dir %{_sysconfdir}/xen |
261 |
|
|
%{_sysconfdir}/xen/scripts |
262 |
|
|
%{_sysconfdir}/xen/auto |
263 |
|
|
%config(noreplace) %{_sysconfdir}/xen/*.sxp |
264 |
|
|
%config(noreplace) %{_sysconfdir}/xen/*.xml |
265 |
|
|
%config(noreplace) %{_sysconfdir}/xen/xmexample* |
266 |
tmb |
83034 |
%config(noreplace) %{_sysconfdir}/xen/cpupool |
267 |
|
|
%config(noreplace) %{_sysconfdir}/xen/xl.conf |
268 |
saispo |
65925 |
%{_mandir}/man*/* |
269 |
|
|
%{_libdir}/xen |
270 |
|
|
%if "%{_lib}" != "lib" |
271 |
|
|
%{_prefix}/lib/xen |
272 |
|
|
%endif |
273 |
|
|
%{_libdir}/fs |
274 |
|
|
%{py_platsitedir}/xen |
275 |
|
|
%{py_platsitedir}/grub/* |
276 |
|
|
%{py_platsitedir}/fsimage.so |
277 |
|
|
%{py_platsitedir}/pygrub-0.3-py%{pyver}.egg-info |
278 |
|
|
%{py_platsitedir}/xen-3.0-py%{pyver}.egg-info |
279 |
|
|
%{_datadir}/xen |
280 |
|
|
# general xen state |
281 |
|
|
%{_localstatedir}/lib/xen |
282 |
|
|
%{_localstatedir}/lib/xend |
283 |
|
|
# xenstore state |
284 |
|
|
%{_localstatedir}/lib/xenstored |
285 |
|
|
%{_localstatedir}/run/xenstored |
286 |
|
|
# xend state |
287 |
|
|
%{_localstatedir}/run/xend |
288 |
|
|
%{_localstatedir}/run/xend/boot |
289 |
|
|
# init scripts |
290 |
|
|
%{_initrddir}/xend |
291 |
|
|
%{_initrddir}/xendomains |
292 |
|
|
%{_initrddir}/blktapctrl |
293 |
|
|
%{_initrddir}/xenstored |
294 |
|
|
%{_initrddir}/xenconsoled |
295 |
tmb |
83034 |
%{_initrddir}/xen-watchdog |
296 |
|
|
%{_initrddir}/xencommons |
297 |
saispo |
65925 |
%{_sysconfdir}/sysconfig/modules/xen.modules |
298 |
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/xendomains |
299 |
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/blktapctrl |
300 |
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/xenstored |
301 |
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/xenconsoled |
302 |
tmb |
83034 |
%config(noreplace) %{_sysconfdir}/sysconfig/xencommons |
303 |
saispo |
65925 |
%config(noreplace) %{_sysconfdir}/logrotate.d/xen |
304 |
|
|
%{_sbindir}/xenstored |
305 |
|
|
%{_sbindir}/xm |
306 |
|
|
%{_sbindir}/xend |
307 |
|
|
%{_sbindir}/xenconsoled |
308 |
|
|
%{_sbindir}/xentop |
309 |
|
|
%{_sbindir}/xen-bugtool |
310 |
|
|
%{_sbindir}/xenbaked |
311 |
|
|
%{_sbindir}/xenmon.py |
312 |
|
|
%{_sbindir}/blktapctrl |
313 |
|
|
%{_sbindir}/img2qcow |
314 |
|
|
%{_sbindir}/qcow-create |
315 |
|
|
%{_sbindir}/qcow2raw |
316 |
|
|
%{_sbindir}/tapdisk |
317 |
|
|
%{_sbindir}/xentrace_setmask |
318 |
|
|
%{_sbindir}/flask-loadpolicy |
319 |
|
|
%{_sbindir}/xsview |
320 |
|
|
%{_sbindir}/xenperf |
321 |
|
|
%{_sbindir}/xenpm |
322 |
|
|
%{_sbindir}/xenpmd |
323 |
|
|
%{_sbindir}/flask-getenforce |
324 |
|
|
%{_sbindir}/flask-setenforce |
325 |
|
|
%{_sbindir}/gtracestat |
326 |
|
|
%{_sbindir}/gtraceview |
327 |
|
|
%{_sbindir}/lock-util |
328 |
|
|
%{_sbindir}/tapdisk-client |
329 |
|
|
%{_sbindir}/tapdisk-diff |
330 |
|
|
%{_sbindir}/tapdisk-stream |
331 |
|
|
%{_sbindir}/tapdisk2 |
332 |
|
|
%{_sbindir}/td-util |
333 |
|
|
%{_sbindir}/vhd-update |
334 |
|
|
%{_sbindir}/vhd-util |
335 |
|
|
%{_sbindir}/xen-hvmctx |
336 |
|
|
%{_sbindir}/xen-tmem-list-parse |
337 |
|
|
%{_sbindir}/xenlockprof |
338 |
|
|
%{_sbindir}/xenpaging |
339 |
|
|
%{_sbindir}/xl |
340 |
|
|
%{_sbindir}/gdbsx |
341 |
tmb |
83034 |
%{_sbindir}/kdd |
342 |
|
|
%{_sbindir}/oxenstored |
343 |
|
|
%{_sbindir}/tap-ctl |
344 |
|
|
%{_sbindir}/xen-hptool |
345 |
|
|
%{_sbindir}/xen-hvmcrash |
346 |
|
|
%{_sbindir}/xenwatchdogd |
347 |
saispo |
65925 |
%{_bindir}/xencons |
348 |
|
|
%{_bindir}/xentrace |
349 |
|
|
%{_bindir}/xentrace_format |
350 |
|
|
%{_bindir}/xentrace_setsize |
351 |
|
|
%{_bindir}/xenstore-* |
352 |
|
|
%{_bindir}/pygrub |
353 |
|
|
%{_bindir}/remus |
354 |
|
|
%{_bindir}/xen-detect |
355 |
|
|
%{_bindir}/qemu-img-xen |
356 |
|
|
%{_bindir}/qemu-nbd-xen |
357 |
|
|
%{_bindir}/xenstore |
358 |
|
|
|
359 |
malo |
219491 |
%files -n ocaml-xen |
360 |
tmb |
83034 |
%{_libdir}/ocaml/eventchn |
361 |
|
|
%{_libdir}/ocaml/mmap |
362 |
|
|
%{_libdir}/ocaml/log |
363 |
|
|
%{_libdir}/ocaml/uuid |
364 |
|
|
%{_libdir}/ocaml/xb |
365 |
|
|
%{_libdir}/ocaml/xc |
366 |
|
|
%{_libdir}/ocaml/xl |
367 |
|
|
%{_libdir}/ocaml/xs |
368 |
|
|
|
369 |
saispo |
65925 |
%files hypervisor |
370 |
|
|
/boot/xen-syms-* |
371 |
|
|
/boot/xen-*.gz |
372 |
|
|
/boot/xen.gz |
373 |
|
|
|
374 |
|
|
%files doc |
375 |
|
|
%{_docdir}/%{name}/* |
376 |
|
|
%exclude %{_docdir}/%{name}/README |
377 |
|
|
%doc docs/ps/* docs/pdf/* |
378 |
|
|
|
379 |
|
|
%files -n %{libname} |
380 |
|
|
%{_libdir}/*.so.* |
381 |
|
|
|
382 |
|
|
%files -n %{develname} |
383 |
|
|
%{_includedir}/xen |
384 |
|
|
%{_includedir}/*.h |
385 |
|
|
%{_libdir}/*.so |
386 |
|
|
%{_libdir}/*.a |