]>
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 | # |
fc7816dc ER |
15 | %define major 3.2 |
16 | %define minor 1 | |
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} |
8e6e2740 | 21 | Release: 0.3 |
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 AM |
59 | Requires: sed |
60 | Requires: util-linux-ng | |
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 | ||
2f3b83cd AG |
107 | %package hotplug |
108 | Summary: xen hotplug | |
109 | Group: Application/System | |
110 | ||
111 | %description hotplug | |
112 | xen hotplug. | |
113 | ||
114 | %package udev | |
115 | Summary: xen udev | |
116 | Group: Application/System | |
117 | ||
118 | %description udev | |
119 | xen udev. | |
120 | ||
8e6e2740 ER |
121 | %package -n python-xen |
122 | Summary: xen Python modules | |
123 | Group: Libraries | |
124 | ||
125 | %description -n python-xen | |
126 | xen Python modules | |
127 | ||
403a0e9f | 128 | %package devel |
6eccf3e8 | 129 | Summary: Header files for xen |
a1a3c257 | 130 | Summary(pl.UTF-8): Pliki nagłówkowe xena |
403a0e9f | 131 | Group: Development/Libraries |
9f9b2612 | 132 | Requires: %{name}-libs = %{version}-%{release} |
403a0e9f AM |
133 | |
134 | %description devel | |
6eccf3e8 JB |
135 | Header files for xen. |
136 | ||
d2a30a0d JR |
137 | %description devel -l pl.UTF-8 |
138 | Pliki nagłówkowe xena. | |
403a0e9f AM |
139 | |
140 | %package static | |
141 | Summary: Static xen libraries | |
a1a3c257 | 142 | Summary(pl.UTF-8): Statyczne biblioteki xena |
403a0e9f | 143 | Group: Development/Libraries |
9f9b2612 | 144 | Requires: %{name}-devel = %{version}-%{release} |
403a0e9f AM |
145 | |
146 | %description static | |
147 | Static xen libraries. | |
adbb6385 | 148 | |
d2a30a0d | 149 | %description static -l pl.UTF-8 |
6eccf3e8 JB |
150 | Statyczne biblioteki xena. |
151 | ||
fda6847b | 152 | %prep |
98fa2458 | 153 | %setup -q |
47d65e01 JK |
154 | %patch0 -p1 |
155 | %patch1 -p1 | |
4015585b | 156 | |
fc7816dc | 157 | find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv |
fda6847b AM |
158 | |
159 | %build | |
47d65e01 JK |
160 | CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \ |
161 | CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \ | |
2f3b83cd | 162 | %{__make} -j1 xen tools \ |
da88b5cd | 163 | %{?with_pae:XEN_TARGET_X86_PAE=y} \ |
403a0e9f | 164 | CC="%{__cc}" \ |
da88b5cd | 165 | CXX="%{__cxx}" |
fda6847b AM |
166 | |
167 | %install | |
168 | rm -rf $RPM_BUILD_ROOT | |
47d65e01 | 169 | install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored} |
adbb6385 JB |
170 | |
171 | %{__make} install-xen install-tools install-docs \ | |
4b02d844 ER |
172 | CC="%{__cc}" \ |
173 | CXX="%{__cxx}" \ | |
b650a78f | 174 | %{?with_pae:XEN_TARGET_X86_PAE=y} \ |
da88b5cd | 175 | DESTDIR=$RPM_BUILD_ROOT \ |
47d65e01 | 176 | XEN_PYTHON_NATIVE_INSTALL=1 |
403a0e9f AM |
177 | |
178 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
179 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend | |
180 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains | |
181 | ||
182 | install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet} | |
1d25433e | 183 | install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save |
fda6847b | 184 | |
2f3b83cd | 185 | cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir} |
38e9ca75 | 186 | cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir} |
67494ff6 | 187 | |
90eccaeb ER |
188 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
189 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
190 | ||
191 | %py_postclean | |
86497794 | 192 | # remove unneeded files |
90eccaeb | 193 | rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING |
003ca0fe | 194 | rm -rf $RPM_BUILD_ROOT%{_docdir}/xen |
8e6e2740 | 195 | rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-doc.html |
86497794 | 196 | rm -rf $RPM_BUILD_ROOT/''etc/init.d |
2f3b83cd AG |
197 | rm -f $RPM_BUILD_ROOT/boot/xen-3.2.gz |
198 | rm -f $RPM_BUILD_ROOT/boot/xen-3.gz | |
074c7479 | 199 | |
86497794 ER |
200 | # conflict with qemu |
201 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu-img.1 | |
202 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu.1 | |
203 | ||
fda6847b AM |
204 | %clean |
205 | rm -rf $RPM_BUILD_ROOT | |
206 | ||
403a0e9f | 207 | %post |
403a0e9f AM |
208 | /sbin/chkconfig --add xend |
209 | /sbin/chkconfig --add xendomains | |
210 | ||
403a0e9f AM |
211 | %preun |
212 | if [ "$1" = "0" ]; then | |
129858a4 | 213 | %service xend stop |
403a0e9f | 214 | /sbin/chkconfig --del xend |
129858a4 ER |
215 | |
216 | %service xendomains stop | |
403a0e9f AM |
217 | /sbin/chkconfig --del xendomains |
218 | fi | |
219 | ||
26412ee3 JB |
220 | %post libs -p /sbin/ldconfig |
221 | %postun libs -p /sbin/ldconfig | |
222 | ||
fda6847b AM |
223 | %files |
224 | %defattr(644,root,root,755) | |
b924b9f5 | 225 | %doc COPYING README docs/misc/* |
47d65e01 | 226 | %doc docs/html/* |
98fa2458 AM |
227 | /boot/%{name}-syms-%{version} |
228 | /boot/%{name}-%{version}.gz | |
fda6847b | 229 | /boot/%{name}.gz |
403a0e9f | 230 | %attr(754,root,root) /etc/rc.d/init.d/* |
47d65e01 | 231 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/* |
403a0e9f | 232 | %dir %{_sysconfdir}/xen |
47d65e01 | 233 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup |
403a0e9f | 234 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.* |
67494ff6 | 235 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/b* |
403a0e9f AM |
236 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[12] |
237 | %dir %{_sysconfdir}/xen/auto | |
238 | %dir %{_sysconfdir}/xen/scripts | |
239 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/* | |
240 | %attr(755,root,root) %{_bindir}/* | |
241 | %attr(755,root,root) %{_sbindir}/* | |
47d65e01 JK |
242 | %dir %{_libdir}/%{name} |
243 | %dir %{_libdir}/%{name}/bin | |
244 | %attr(744,root,root) %{_libdir}/%{name}/bin/* | |
38e9ca75 | 245 | %if "%{_lib}" != "lib" |
81c76053 | 246 | %dir %{_prefix}/lib/%{name} |
38e9ca75 | 247 | %endif |
81c76053 AM |
248 | %dir %{_prefix}/lib/%{name}/boot |
249 | %attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader | |
47d65e01 | 250 | %{_datadir}/xen |
403a0e9f | 251 | %{_mandir}/man?/* |
47d65e01 JK |
252 | %{_sharedstatedir}/xen |
253 | %{_sharedstatedir}/xenstored | |
254 | %dir /var/run/xen-hotplug | |
255 | %dir %attr(700,root,root) /var/run/xend | |
256 | %dir /var/run/xenstored | |
403a0e9f | 257 | |
26412ee3 | 258 | %files libs |
403a0e9f | 259 | %defattr(644,root,root,755) |
26412ee3 | 260 | %attr(755,root,root) %{_libdir}/lib*.so.* |
4015585b | 261 | %dir %{_libdir}/fs |
d9ee3ddc | 262 | %dir %{_libdir}/fs/ext2fs-lib |
2f3b83cd AG |
263 | %dir %{_libdir}/fs/fat |
264 | %dir %{_libdir}/fs/iso9660 | |
4015585b | 265 | %dir %{_libdir}/fs/reiserfs |
266 | %dir %{_libdir}/fs/ufs | |
267 | %attr(755,root,root) %{_libdir}/fs/*/*.so | |
26412ee3 | 268 | |
4b02d844 | 269 | %if %{without hvm} |
2f3b83cd AG |
270 | %files hotplug |
271 | %defattr(644,root,root,755) | |
272 | %attr(755,root,root) /etc/hotplug/* | |
81c76053 | 273 | %endif |
2f3b83cd AG |
274 | |
275 | %files udev | |
276 | %defattr(644,root,root,755) | |
277 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/* | |
278 | ||
8e6e2740 ER |
279 | %files -n python-xen |
280 | %defattr(644,root,root,755) | |
281 | %{py_sitedir}/fsimage.so | |
282 | %{py_sitedir}/grub | |
283 | %dir %{py_sitedir}/xen | |
284 | %dir %{py_sitedir}/xen/lowlevel | |
285 | %{py_sitedir}/xen/lowlevel/*.py* | |
286 | %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so | |
287 | %{py_sitedir}/xen/sv | |
288 | %{py_sitedir}/xen/util | |
289 | %{py_sitedir}/xen/web | |
290 | %{py_sitedir}/xen/xend | |
291 | %{py_sitedir}/xen/xm | |
292 | %{py_sitedir}/xen/xsview | |
293 | %{py_sitedir}/xen/*.py* | |
294 | %if "%{py_ver}" > "2.4" | |
295 | %{py_sitedir}/*.egg-info | |
296 | %endif | |
297 | ||
26412ee3 JB |
298 | %files devel |
299 | %defattr(644,root,root,755) | |
300 | %attr(755,root,root) %{_libdir}/lib*.so | |
403a0e9f AM |
301 | %{_includedir}/* |
302 | ||
303 | %files static | |
304 | %defattr(644,root,root,755) | |
305 | %{_libdir}/lib*.a |