]>
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} |
86497794 | 21 | Release: 0.2 |
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 |
86497794 | 47 | Requires: %{name}-libs = %{epoch}:%{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 |
129858a4 | 57 | Requires: rc-scripts |
e77e45ff AM |
58 | Requires: sed |
59 | Requires: util-linux-ng | |
60 | Requires: which | |
cef7399d | 61 | Obsoletes: xen-doc |
971d1e2c | 62 | ExclusiveArch: %{ix86} %{x8664} |
fda6847b AM |
63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
64 | ||
da88b5cd | 65 | %ifnarch i686 athlon pentium3 pentium4 |
85bffc35 | 66 | %undefine with_pae |
da88b5cd JK |
67 | %endif |
68 | ||
fda6847b AM |
69 | %description |
70 | This package contains the Xen hypervisor and Xen tools, needed to run | |
71 | virtual machines on x86 systems, together with the kernel-xen* | |
72 | packages. Information on how to use Xen can be found at the Xen | |
73 | project pages. | |
74 | ||
75 | Virtualisation can be used to run multiple versions or multiple Linux | |
76 | distributions on one system, or to test untrusted applications in a | |
77 | sandboxed environment. Note that the Xen technology is still in | |
78 | development, and this RPM has received extremely little testing. Don't | |
79 | be surprised if this RPM eats your data, drinks your coffee or makes | |
80 | fun of you in front of your friends. | |
81 | ||
d2a30a0d JR |
82 | %description -l pl.UTF-8 |
83 | Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do | |
adbb6385 | 84 | uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami |
d2a30a0d | 85 | kernel-xen*. Informacje jak używać Xena można znaleźć na stronach |
adbb6385 JB |
86 | projektu. |
87 | ||
d2a30a0d | 88 | Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu |
dcba01a0 | 89 | dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych |
d2a30a0d JR |
90 | aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia |
91 | Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy | |
92 | być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie | |
93 | się wyśmiewał w obecności przyjaciół. | |
403a0e9f | 94 | |
26412ee3 JB |
95 | %package libs |
96 | Summary: xen libraries | |
97 | Summary(pl.UTF-8): Biblioteki xena | |
98 | Group: Libraries | |
99 | ||
100 | %description libs | |
101 | xen libraries. | |
102 | ||
103 | %description libs -l pl.UTF-8 | |
104 | Biblioteki xena. | |
105 | ||
2f3b83cd AG |
106 | %package hotplug |
107 | Summary: xen hotplug | |
108 | Group: Application/System | |
109 | ||
110 | %description hotplug | |
111 | xen hotplug. | |
112 | ||
113 | %package udev | |
114 | Summary: xen udev | |
115 | Group: Application/System | |
116 | ||
117 | %description udev | |
118 | xen udev. | |
119 | ||
403a0e9f | 120 | %package devel |
6eccf3e8 | 121 | Summary: Header files for xen |
a1a3c257 | 122 | Summary(pl.UTF-8): Pliki nagłówkowe xena |
403a0e9f | 123 | Group: Development/Libraries |
26412ee3 | 124 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
403a0e9f AM |
125 | |
126 | %description devel | |
6eccf3e8 JB |
127 | Header files for xen. |
128 | ||
d2a30a0d JR |
129 | %description devel -l pl.UTF-8 |
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 AM |
135 | Group: Development/Libraries |
136 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
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 | ||
fda6847b | 144 | %prep |
98fa2458 | 145 | %setup -q |
47d65e01 JK |
146 | %patch0 -p1 |
147 | %patch1 -p1 | |
4015585b | 148 | |
fc7816dc | 149 | find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv |
fda6847b AM |
150 | |
151 | %build | |
47d65e01 JK |
152 | CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \ |
153 | CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \ | |
2f3b83cd | 154 | %{__make} -j1 xen tools \ |
da88b5cd | 155 | %{?with_pae:XEN_TARGET_X86_PAE=y} \ |
403a0e9f | 156 | CC="%{__cc}" \ |
da88b5cd | 157 | CXX="%{__cxx}" |
fda6847b AM |
158 | |
159 | %install | |
160 | rm -rf $RPM_BUILD_ROOT | |
47d65e01 | 161 | install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored} |
adbb6385 JB |
162 | |
163 | %{__make} install-xen install-tools install-docs \ | |
4b02d844 ER |
164 | CC="%{__cc}" \ |
165 | CXX="%{__cxx}" \ | |
b650a78f | 166 | %{?with_pae:XEN_TARGET_X86_PAE=y} \ |
da88b5cd | 167 | DESTDIR=$RPM_BUILD_ROOT \ |
47d65e01 | 168 | XEN_PYTHON_NATIVE_INSTALL=1 |
403a0e9f AM |
169 | |
170 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
171 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend | |
172 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains | |
173 | ||
174 | install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet} | |
1d25433e | 175 | install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save |
fda6847b | 176 | |
2f3b83cd | 177 | cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir} |
38e9ca75 | 178 | cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir} |
67494ff6 | 179 | |
90eccaeb ER |
180 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
181 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
182 | ||
183 | %py_postclean | |
86497794 | 184 | # remove unneeded files |
90eccaeb | 185 | rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING |
003ca0fe | 186 | rm -rf $RPM_BUILD_ROOT%{_docdir}/xen |
86497794 | 187 | rm -rf $RPM_BUILD_ROOT/''etc/init.d |
2f3b83cd AG |
188 | rm -f $RPM_BUILD_ROOT/boot/xen-3.2.gz |
189 | rm -f $RPM_BUILD_ROOT/boot/xen-3.gz | |
074c7479 | 190 | |
86497794 ER |
191 | # conflict with qemu |
192 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu-img.1 | |
193 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu.1 | |
194 | ||
fda6847b AM |
195 | %clean |
196 | rm -rf $RPM_BUILD_ROOT | |
197 | ||
403a0e9f | 198 | %post |
403a0e9f AM |
199 | /sbin/chkconfig --add xend |
200 | /sbin/chkconfig --add xendomains | |
201 | ||
403a0e9f AM |
202 | %preun |
203 | if [ "$1" = "0" ]; then | |
129858a4 | 204 | %service xend stop |
403a0e9f | 205 | /sbin/chkconfig --del xend |
129858a4 ER |
206 | |
207 | %service xendomains stop | |
403a0e9f AM |
208 | /sbin/chkconfig --del xendomains |
209 | fi | |
210 | ||
26412ee3 JB |
211 | %post libs -p /sbin/ldconfig |
212 | %postun libs -p /sbin/ldconfig | |
213 | ||
fda6847b AM |
214 | %files |
215 | %defattr(644,root,root,755) | |
b924b9f5 | 216 | %doc COPYING README docs/misc/* |
47d65e01 | 217 | %doc docs/html/* |
98fa2458 AM |
218 | /boot/%{name}-syms-%{version} |
219 | /boot/%{name}-%{version}.gz | |
fda6847b | 220 | /boot/%{name}.gz |
403a0e9f | 221 | %attr(754,root,root) /etc/rc.d/init.d/* |
47d65e01 | 222 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/* |
403a0e9f | 223 | %dir %{_sysconfdir}/xen |
47d65e01 | 224 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup |
403a0e9f | 225 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.* |
67494ff6 | 226 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/b* |
403a0e9f AM |
227 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[12] |
228 | %dir %{_sysconfdir}/xen/auto | |
229 | %dir %{_sysconfdir}/xen/scripts | |
230 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/* | |
231 | %attr(755,root,root) %{_bindir}/* | |
232 | %attr(755,root,root) %{_sbindir}/* | |
47d65e01 JK |
233 | %dir %{_libdir}/%{name} |
234 | %dir %{_libdir}/%{name}/bin | |
235 | %attr(744,root,root) %{_libdir}/%{name}/bin/* | |
38e9ca75 | 236 | %if "%{_lib}" != "lib" |
81c76053 | 237 | %dir %{_prefix}/lib/%{name} |
38e9ca75 | 238 | %endif |
81c76053 AM |
239 | %dir %{_prefix}/lib/%{name}/boot |
240 | %attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader | |
47d65e01 | 241 | %{_datadir}/xen |
4015585b | 242 | %{py_sitedir}/fsimage.so |
243 | %{py_sitedir}/grub | |
90eccaeb ER |
244 | %dir %{py_sitedir}/xen |
245 | %dir %{py_sitedir}/xen/lowlevel | |
246 | %{py_sitedir}/xen/lowlevel/*.py* | |
247 | %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so | |
248 | %{py_sitedir}/xen/sv | |
249 | %{py_sitedir}/xen/util | |
250 | %{py_sitedir}/xen/web | |
251 | %{py_sitedir}/xen/xend | |
252 | %{py_sitedir}/xen/xm | |
253 | %{py_sitedir}/xen/xsview | |
254 | %{py_sitedir}/xen/*.py* | |
4b02d844 | 255 | %if "%{py_ver}" > "2.4" |
2f3b83cd | 256 | %{py_sitedir}/*.egg-info |
4b02d844 | 257 | %endif |
403a0e9f | 258 | %{_mandir}/man?/* |
47d65e01 JK |
259 | %{_sharedstatedir}/xen |
260 | %{_sharedstatedir}/xenstored | |
261 | %dir /var/run/xen-hotplug | |
262 | %dir %attr(700,root,root) /var/run/xend | |
263 | %dir /var/run/xenstored | |
403a0e9f | 264 | |
26412ee3 | 265 | %files libs |
403a0e9f | 266 | %defattr(644,root,root,755) |
26412ee3 | 267 | %attr(755,root,root) %{_libdir}/lib*.so.* |
4015585b | 268 | %dir %{_libdir}/fs |
d9ee3ddc | 269 | %dir %{_libdir}/fs/ext2fs-lib |
2f3b83cd AG |
270 | %dir %{_libdir}/fs/fat |
271 | %dir %{_libdir}/fs/iso9660 | |
4015585b | 272 | %dir %{_libdir}/fs/reiserfs |
273 | %dir %{_libdir}/fs/ufs | |
274 | %attr(755,root,root) %{_libdir}/fs/*/*.so | |
26412ee3 | 275 | |
4b02d844 | 276 | %if %{without hvm} |
2f3b83cd AG |
277 | %files hotplug |
278 | %defattr(644,root,root,755) | |
279 | %attr(755,root,root) /etc/hotplug/* | |
81c76053 | 280 | %endif |
2f3b83cd AG |
281 | |
282 | %files udev | |
283 | %defattr(644,root,root,755) | |
284 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/* | |
285 | ||
26412ee3 JB |
286 | %files devel |
287 | %defattr(644,root,root,755) | |
288 | %attr(755,root,root) %{_libdir}/lib*.so | |
403a0e9f AM |
289 | %{_includedir}/* |
290 | ||
291 | %files static | |
292 | %defattr(644,root,root,755) | |
293 | %{_libdir}/lib*.a |