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