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