]>
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 | |
fda6847b AM |
176 | rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING |
177 | ||
47d65e01 JK |
178 | %{py_comp} $RPM_BUILD_ROOT%{py_sitedir} |
179 | %{py_ocomp} $RPM_BUILD_ROOT%{py_sitedir} | |
180 | %{py_comp} $RPM_BUILD_ROOT%{py_sitescriptdir} | |
181 | %{py_ocomp} $RPM_BUILD_ROOT%{py_sitescriptdir} | |
403a0e9f | 182 | |
2f3b83cd | 183 | cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir} |
67494ff6 | 184 | |
2f3b83cd AG |
185 | # remove unneeded files |
186 | #find $RPM_BUILD_ROOT%{py_sitedir} -name '*.py' -exec rm "{}" ";" | |
1b8eabc3 | 187 | #find $RPM_BUILD_ROOT%{py_sitescriptdir} -name '*.py' -exec rm "{}" ";" |
003ca0fe | 188 | rm -rf $RPM_BUILD_ROOT%{_docdir}/xen |
47d65e01 | 189 | rm -rf $RPM_BUILD_ROOT/etc/init.d |
2f3b83cd AG |
190 | rm -f $RPM_BUILD_ROOT/boot/xen-3.2.gz |
191 | rm -f $RPM_BUILD_ROOT/boot/xen-3.gz | |
074c7479 | 192 | |
fda6847b AM |
193 | %clean |
194 | rm -rf $RPM_BUILD_ROOT | |
195 | ||
403a0e9f | 196 | %post |
403a0e9f AM |
197 | /sbin/chkconfig --add xend |
198 | /sbin/chkconfig --add xendomains | |
199 | ||
403a0e9f AM |
200 | %preun |
201 | if [ "$1" = "0" ]; then | |
129858a4 | 202 | %service xend stop |
403a0e9f | 203 | /sbin/chkconfig --del xend |
129858a4 ER |
204 | |
205 | %service xendomains stop | |
403a0e9f AM |
206 | /sbin/chkconfig --del xendomains |
207 | fi | |
208 | ||
26412ee3 JB |
209 | %post libs -p /sbin/ldconfig |
210 | %postun libs -p /sbin/ldconfig | |
211 | ||
fda6847b AM |
212 | %files |
213 | %defattr(644,root,root,755) | |
b924b9f5 | 214 | %doc COPYING README docs/misc/* |
47d65e01 | 215 | %doc docs/html/* |
98fa2458 AM |
216 | /boot/%{name}-syms-%{version} |
217 | /boot/%{name}-%{version}.gz | |
fda6847b | 218 | /boot/%{name}.gz |
403a0e9f | 219 | %attr(754,root,root) /etc/rc.d/init.d/* |
47d65e01 | 220 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/* |
403a0e9f | 221 | %dir %{_sysconfdir}/xen |
47d65e01 | 222 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup |
403a0e9f | 223 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.* |
67494ff6 | 224 | #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/b* |
403a0e9f AM |
225 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[12] |
226 | %dir %{_sysconfdir}/xen/auto | |
227 | %dir %{_sysconfdir}/xen/scripts | |
228 | %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/* | |
229 | %attr(755,root,root) %{_bindir}/* | |
230 | %attr(755,root,root) %{_sbindir}/* | |
47d65e01 JK |
231 | %dir %{_libdir}/%{name} |
232 | %dir %{_libdir}/%{name}/bin | |
233 | %attr(744,root,root) %{_libdir}/%{name}/bin/* | |
81c76053 AM |
234 | %dir %{_prefix}/lib/%{name} |
235 | %dir %{_prefix}/lib/%{name}/boot | |
236 | %attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader | |
47d65e01 | 237 | %{_datadir}/xen |
4015585b | 238 | %{py_sitedir}/fsimage.so |
239 | %{py_sitedir}/grub | |
47d65e01 JK |
240 | %dir %{py_sitedir}/%{name} |
241 | %dir %{py_sitedir}/%{name}/lowlevel | |
242 | %{py_sitedir}/%{name}/lowlevel/*.py* | |
243 | %attr(755,root,root) %{py_sitedir}/%{name}/lowlevel/*.so | |
244 | %{py_sitedir}/%{name}/sv | |
245 | %{py_sitedir}/%{name}/util | |
246 | %{py_sitedir}/%{name}/web | |
247 | %{py_sitedir}/%{name}/xend | |
248 | %{py_sitedir}/%{name}/xm | |
2f3b83cd | 249 | %{py_sitedir}/%{name}/xsview |
47d65e01 | 250 | %{py_sitedir}/%{name}/*.py* |
4b02d844 | 251 | %if "%{py_ver}" > "2.4" |
2f3b83cd | 252 | %{py_sitedir}/*.egg-info |
4b02d844 | 253 | %endif |
1b8eabc3 | 254 | #%{py_sitescriptdir}/* |
403a0e9f | 255 | %{_mandir}/man?/* |
47d65e01 JK |
256 | %{_sharedstatedir}/xen |
257 | %{_sharedstatedir}/xenstored | |
258 | %dir /var/run/xen-hotplug | |
259 | %dir %attr(700,root,root) /var/run/xend | |
260 | %dir /var/run/xenstored | |
403a0e9f | 261 | |
26412ee3 | 262 | %files libs |
403a0e9f | 263 | %defattr(644,root,root,755) |
26412ee3 | 264 | %attr(755,root,root) %{_libdir}/lib*.so.* |
4015585b | 265 | %dir %{_libdir}/fs |
d9ee3ddc | 266 | %dir %{_libdir}/fs/ext2fs-lib |
2f3b83cd AG |
267 | %dir %{_libdir}/fs/fat |
268 | %dir %{_libdir}/fs/iso9660 | |
4015585b | 269 | %dir %{_libdir}/fs/reiserfs |
270 | %dir %{_libdir}/fs/ufs | |
271 | %attr(755,root,root) %{_libdir}/fs/*/*.so | |
26412ee3 | 272 | |
4b02d844 | 273 | %if %{without hvm} |
2f3b83cd AG |
274 | %files hotplug |
275 | %defattr(644,root,root,755) | |
276 | %attr(755,root,root) /etc/hotplug/* | |
81c76053 | 277 | %endif |
2f3b83cd AG |
278 | |
279 | %files udev | |
280 | %defattr(644,root,root,755) | |
281 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/* | |
282 | ||
26412ee3 JB |
283 | %files devel |
284 | %defattr(644,root,root,755) | |
285 | %attr(755,root,root) %{_libdir}/lib*.so | |
403a0e9f AM |
286 | %{_includedir}/* |
287 | ||
288 | %files static | |
289 | %defattr(644,root,root,755) | |
290 | %{_libdir}/lib*.a |