]>
Commit | Line | Data |
---|---|---|
2f3b83cd AG |
1 | # |
2 | # NOTE: | |
f03e6adf | 3 | # - this xen-3.3.0 kernel and userspace |
2f3b83cd AG |
4 | # if you are looking for xen-3.0.2 (kernel.spec:LINUX_2_6_16), checkout |
5 | # this spec from XEN_3_0_2 branch | |
f03e6adf | 6 | # - you will also need dom0 enabled kernel |
2f3b83cd | 7 | # |
403a0e9f AM |
8 | # TODO: |
9 | # - pldized init scripts | |
f44888a4 | 10 | # - script for rc-boot |
5ce5694e | 11 | # - %%build fails on i686 |
b650a78f JK |
12 | # |
13 | # Conditional build: | |
87ceed68 | 14 | %bcond_with pae # build with PAE (HIGHMEM64G) support |
9233bca4 | 15 | %bcond_with hvm # build with hvm (full virtualization) support |
b650a78f | 16 | # |
e05fb822 | 17 | %define major 3.4 |
8c7c30a3 | 18 | %define minor 3 |
adbb6385 | 19 | Summary: Xen - a virtual machine monitor |
a1a3c257 | 20 | Summary(pl.UTF-8): Xen - monitor maszyny wirtualnej |
fda6847b | 21 | Name: xen |
fc7816dc | 22 | Version: %{major}.%{minor} |
d26491b9 | 23 | Release: 0.1 |
fda6847b | 24 | License: GPL |
129858a4 | 25 | Group: Applications/System |
98fa2458 | 26 | Source0: http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz |
8c7c30a3 | 27 | # Source0-md5: f8d001eb9e08525c451d38deb93908b1 |
403a0e9f AM |
28 | Source1: %{name}-xend.init |
29 | Source2: %{name}-xendomains.init | |
47d65e01 | 30 | Patch0: %{name}-python_scripts.patch |
2f3b83cd | 31 | Patch1: %{name}-gcc.patch |
67494ff6 | 32 | URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html |
abdd4c6d | 33 | BuildRequires: SDL-devel |
fc7816dc | 34 | %{?with_hvm:BuildRequires: bcc} |
39eabac9 | 35 | BuildRequires: curl-devel |
d9ee3ddc | 36 | BuildRequires: e2fsprogs-devel |
fc7816dc | 37 | BuildRequires: gcc >= 5:3.4 |
abdd4c6d | 38 | BuildRequires: gettext-devel |
47d65e01 | 39 | BuildRequires: latex2html |
403a0e9f | 40 | BuildRequires: libidn-devel |
403a0e9f | 41 | BuildRequires: ncurses-devel |
abdd4c6d | 42 | BuildRequires: pkgconfig |
53503036 | 43 | BuildRequires: python-devel |
48c47956 | 44 | BuildRequires: rpm-pythonprov |
129858a4 | 45 | BuildRequires: rpmbuild(macros) >= 1.268 |
f03e6adf | 46 | BuildRequires: texlive-dvips |
abdd4c6d | 47 | #BuildRequires: texlive-latex-data |
f03e6adf | 48 | BuildRequires: texlive-latex-psnfss |
53503036 | 49 | BuildRequires: transfig |
12f352e2 | 50 | BuildRequires: which |
53503036 | 51 | BuildRequires: zlib-devel |
129858a4 | 52 | Requires(post,preun): /sbin/chkconfig |
9f9b2612 | 53 | Requires: %{name}-libs = %{version}-%{release} |
53503036 JB |
54 | Requires: ZopeInterface |
55 | Requires: bridge-utils | |
e77e45ff AM |
56 | Requires: coreutils |
57 | Requires: diffutils | |
d78769bd | 58 | Requires: gawk |
e77e45ff | 59 | Requires: iptables |
fb59b595 | 60 | Requires: kernel(xen0) |
53503036 | 61 | Requires: losetup |
e77e45ff | 62 | Requires: net-tools |
8e6e2740 | 63 | Requires: python-%{name} = %{version}-%{release} |
129858a4 | 64 | Requires: rc-scripts |
e77e45ff | 65 | Requires: sed |
a674a8b2 | 66 | Requires: util-linux |
e77e45ff | 67 | Requires: which |
cef7399d | 68 | Obsoletes: xen-doc |
971d1e2c | 69 | ExclusiveArch: %{ix86} %{x8664} |
fda6847b AM |
70 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
71 | ||
8f12ec8f | 72 | # some PPC/SPARC boot image in ELF format |
7fb9617b | 73 | %define _noautostrip .*%{_datadir}/xen/qemu/openbios-.* |
8f12ec8f | 74 | |
da88b5cd | 75 | %ifnarch i686 athlon pentium3 pentium4 |
85bffc35 | 76 | %undefine with_pae |
da88b5cd JK |
77 | %endif |
78 | ||
fda6847b AM |
79 | %description |
80 | This package contains the Xen hypervisor and Xen tools, needed to run | |
81 | virtual machines on x86 systems, together with the kernel-xen* | |
82 | packages. Information on how to use Xen can be found at the Xen | |
83 | project pages. | |
84 | ||
85 | Virtualisation can be used to run multiple versions or multiple Linux | |
86 | distributions on one system, or to test untrusted applications in a | |
87 | sandboxed environment. Note that the Xen technology is still in | |
88 | development, and this RPM has received extremely little testing. Don't | |
89 | be surprised if this RPM eats your data, drinks your coffee or makes | |
90 | fun of you in front of your friends. | |
91 | ||
d2a30a0d JR |
92 | %description -l pl.UTF-8 |
93 | Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do | |
adbb6385 | 94 | uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami |
d2a30a0d | 95 | kernel-xen*. Informacje jak używać Xena można znaleźć na stronach |
adbb6385 JB |
96 | projektu. |
97 | ||
d2a30a0d | 98 | Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu |
dcba01a0 | 99 | dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych |
d2a30a0d JR |
100 | aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia |
101 | Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy | |
102 | być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie | |
103 | się wyśmiewał w obecności przyjaciół. | |
403a0e9f | 104 | |
26412ee3 JB |
105 | %package libs |
106 | Summary: xen libraries | |
107 | Summary(pl.UTF-8): Biblioteki xena | |
108 | Group: Libraries | |
109 | ||
110 | %description libs | |
111 | xen libraries. | |
112 | ||
113 | %description libs -l pl.UTF-8 | |
114 | Biblioteki xena. | |
115 | ||
403a0e9f | 116 | %package devel |
6eccf3e8 | 117 | Summary: Header files for xen |
a1a3c257 | 118 | Summary(pl.UTF-8): Pliki nagłówkowe xena |
403a0e9f | 119 | Group: Development/Libraries |
9f9b2612 | 120 | Requires: %{name}-libs = %{version}-%{release} |
403a0e9f AM |
121 | |
122 | %description devel | |
6eccf3e8 JB |
123 | Header files for xen. |
124 | ||
d2a30a0d JR |
125 | %description devel -l pl.UTF-8 |
126 | Pliki nagłówkowe xena. | |
403a0e9f AM |
127 | |
128 | %package static | |
129 | Summary: Static xen libraries | |
a1a3c257 | 130 | Summary(pl.UTF-8): Statyczne biblioteki xena |
403a0e9f | 131 | Group: Development/Libraries |
9f9b2612 | 132 | Requires: %{name}-devel = %{version}-%{release} |
403a0e9f AM |
133 | |
134 | %description static | |
135 | Static xen libraries. | |
adbb6385 | 136 | |
d2a30a0d | 137 | %description static -l pl.UTF-8 |
6eccf3e8 JB |
138 | Statyczne biblioteki xena. |
139 | ||
5dd334af JB |
140 | %package hotplug |
141 | Summary: xen hotplug scripts | |
142 | Summary(pl.UTF-8): Skrypty hotplug dla xena | |
abdd4c6d | 143 | Group: Applications/System |
5dd334af JB |
144 | |
145 | %description hotplug | |
146 | xen hotplug scripts. | |
147 | ||
148 | %description hotplug -l pl.UTF-8 | |
149 | Skrypty hotplug dla xena. | |
150 | ||
151 | %package udev | |
152 | Summary: xen udev scripts | |
153 | Summary(pl.UTF-8): Skrypty udev dla xena | |
abdd4c6d | 154 | Group: Applications/System |
5dd334af JB |
155 | |
156 | %description udev | |
157 | xen udev scripts. | |
158 | ||
159 | %description udev -l pl.UTF-8 | |
160 | Skrypty udev dla xena. | |
161 | ||
162 | %package -n python-xen | |
163 | Summary: xen Python modules | |
164 | Summary(pl.UTF-8): Moduły Pythona dla xena | |
165 | Group: Libraries | |
e35fda92 | 166 | Conflicts: xen < 3.2.1-0.3 |
5dd334af JB |
167 | |
168 | %description -n python-xen | |
169 | xen Python modules. | |
170 | ||
171 | %description -n python-xen -l pl.UTF-8 | |
172 | Moduły Pythona dla xena. | |
173 | ||
fda6847b | 174 | %prep |
98fa2458 | 175 | %setup -q |
47d65e01 JK |
176 | %patch0 -p1 |
177 | %patch1 -p1 | |
4015585b | 178 | |
fc7816dc | 179 | find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv |
fda6847b AM |
180 | |
181 | %build | |
47d65e01 JK |
182 | CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \ |
183 | CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \ | |
2f3b83cd | 184 | %{__make} -j1 xen tools \ |
da88b5cd | 185 | %{?with_pae:XEN_TARGET_X86_PAE=y} \ |
403a0e9f | 186 | CC="%{__cc}" \ |
da88b5cd | 187 | CXX="%{__cxx}" |
fda6847b AM |
188 | |
189 | %install | |
190 | rm -rf $RPM_BUILD_ROOT | |
47d65e01 | 191 | install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored} |
adbb6385 JB |
192 | |
193 | %{__make} install-xen install-tools install-docs \ | |
4b02d844 ER |
194 | CC="%{__cc}" \ |
195 | CXX="%{__cxx}" \ | |
b650a78f | 196 | %{?with_pae:XEN_TARGET_X86_PAE=y} \ |
da88b5cd | 197 | DESTDIR=$RPM_BUILD_ROOT \ |
47d65e01 | 198 | XEN_PYTHON_NATIVE_INSTALL=1 |
403a0e9f AM |
199 | |
200 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
201 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend | |
202 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains | |
203 | ||
204 | install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet} | |
1d25433e | 205 | install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save |
fda6847b | 206 | |
2f3b83cd | 207 | cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir} |
38e9ca75 | 208 | cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir} |
67494ff6 | 209 | |
90eccaeb ER |
210 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
211 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
212 | ||
213 | %py_postclean | |
86497794 | 214 | # remove unneeded files |
90eccaeb | 215 | rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING |
003ca0fe | 216 | rm -rf $RPM_BUILD_ROOT%{_docdir}/xen |
8e6e2740 | 217 | rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-doc.html |
86497794 | 218 | rm -rf $RPM_BUILD_ROOT/''etc/init.d |
2f3b83cd AG |
219 | rm -f $RPM_BUILD_ROOT/boot/xen-3.2.gz |
220 | rm -f $RPM_BUILD_ROOT/boot/xen-3.gz | |
fb59b595 | 221 | # # strip - Unable to recognise the format of the input file |
222 | # rm -f $RPM_BUILD_ROOT%{_datadir}/xen/qemu/openbios-sparc32 | |
223 | # rm -f $RPM_BUILD_ROOT%{_datadir}/xen/qemu/openbios-sparc64 | |
d26491b9 | 224 | |
074c7479 | 225 | |
86497794 ER |
226 | # conflict with qemu |
227 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu-img.1 | |
228 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu.1 | |
229 | ||
fda6847b AM |
230 | %clean |
231 | rm -rf $RPM_BUILD_ROOT | |
232 | ||
403a0e9f | 233 | %post |
403a0e9f AM |
234 | /sbin/chkconfig --add xend |
235 | /sbin/chkconfig --add xendomains | |
236 | ||
403a0e9f AM |
237 | %preun |
238 | if [ "$1" = "0" ]; then | |
129858a4 | 239 | %service xend stop |
403a0e9f | 240 | /sbin/chkconfig --del xend |
129858a4 ER |
241 | |
242 | %service xendomains stop | |
403a0e9f AM |
243 | /sbin/chkconfig --del xendomains |
244 | fi | |
245 | ||
26412ee3 JB |
246 | %post libs -p /sbin/ldconfig |
247 | %postun libs -p /sbin/ldconfig | |
248 | ||
fda6847b AM |
249 | %files |
250 | %defattr(644,root,root,755) | |
b924b9f5 | 251 | %doc COPYING README docs/misc/* |
47d65e01 | 252 | %doc docs/html/* |
98fa2458 AM |
253 | /boot/%{name}-syms-%{version} |
254 | /boot/%{name}-%{version}.gz | |
fda6847b | 255 | /boot/%{name}.gz |
403a0e9f | 256 | %attr(754,root,root) /etc/rc.d/init.d/* |
47d65e01 | 257 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/* |
403a0e9f | 258 | %dir %{_sysconfdir}/xen |
47d65e01 | 259 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup |
403a0e9f | 260 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.* |
67494ff6 | 261 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/b* |
403a0e9f AM |
262 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[12] |
263 | %dir %{_sysconfdir}/xen/auto | |
264 | %dir %{_sysconfdir}/xen/scripts | |
265 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/* | |
266 | %attr(755,root,root) %{_bindir}/* | |
267 | %attr(755,root,root) %{_sbindir}/* | |
47d65e01 JK |
268 | %dir %{_libdir}/%{name} |
269 | %dir %{_libdir}/%{name}/bin | |
270 | %attr(744,root,root) %{_libdir}/%{name}/bin/* | |
38e9ca75 | 271 | %if "%{_lib}" != "lib" |
81c76053 | 272 | %dir %{_prefix}/lib/%{name} |
38e9ca75 | 273 | %endif |
81c76053 | 274 | %dir %{_prefix}/lib/%{name}/boot |
bbcbc194 | 275 | %{?with_hvm:%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader} |
47d65e01 | 276 | %{_datadir}/xen |
403a0e9f | 277 | %{_mandir}/man?/* |
47d65e01 JK |
278 | %{_sharedstatedir}/xen |
279 | %{_sharedstatedir}/xenstored | |
280 | %dir /var/run/xen-hotplug | |
281 | %dir %attr(700,root,root) /var/run/xend | |
282 | %dir /var/run/xenstored | |
403a0e9f | 283 | |
26412ee3 | 284 | %files libs |
403a0e9f | 285 | %defattr(644,root,root,755) |
26412ee3 | 286 | %attr(755,root,root) %{_libdir}/lib*.so.* |
4015585b | 287 | %dir %{_libdir}/fs |
d9ee3ddc | 288 | %dir %{_libdir}/fs/ext2fs-lib |
2f3b83cd AG |
289 | %dir %{_libdir}/fs/fat |
290 | %dir %{_libdir}/fs/iso9660 | |
4015585b | 291 | %dir %{_libdir}/fs/reiserfs |
292 | %dir %{_libdir}/fs/ufs | |
20aeda6e | 293 | %dir %{_libdir}/fs/zfs |
4015585b | 294 | %attr(755,root,root) %{_libdir}/fs/*/*.so |
26412ee3 | 295 | |
5dd334af JB |
296 | %files devel |
297 | %defattr(644,root,root,755) | |
298 | %attr(755,root,root) %{_libdir}/lib*.so | |
299 | %{_includedir}/* | |
300 | ||
301 | %files static | |
302 | %defattr(644,root,root,755) | |
303 | %{_libdir}/lib*.a | |
304 | ||
4b02d844 | 305 | %if %{without hvm} |
2f3b83cd AG |
306 | %files hotplug |
307 | %defattr(644,root,root,755) | |
308 | %attr(755,root,root) /etc/hotplug/* | |
81c76053 | 309 | %endif |
2f3b83cd AG |
310 | |
311 | %files udev | |
312 | %defattr(644,root,root,755) | |
313 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/* | |
314 | ||
8e6e2740 ER |
315 | %files -n python-xen |
316 | %defattr(644,root,root,755) | |
5dd334af | 317 | %attr(755,root,root) %{py_sitedir}/fsimage.so |
8e6e2740 ER |
318 | %{py_sitedir}/grub |
319 | %dir %{py_sitedir}/xen | |
320 | %dir %{py_sitedir}/xen/lowlevel | |
321 | %{py_sitedir}/xen/lowlevel/*.py* | |
322 | %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so | |
323 | %{py_sitedir}/xen/sv | |
324 | %{py_sitedir}/xen/util | |
325 | %{py_sitedir}/xen/web | |
326 | %{py_sitedir}/xen/xend | |
327 | %{py_sitedir}/xen/xm | |
328 | %{py_sitedir}/xen/xsview | |
329 | %{py_sitedir}/xen/*.py* | |
330 | %if "%{py_ver}" > "2.4" | |
331 | %{py_sitedir}/*.egg-info | |
332 | %endif |