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