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