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