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