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