]>
Commit | Line | Data |
---|---|---|
403a0e9f AM |
1 | # TODO: |
2 | # - pldized init scripts | |
f44888a4 | 3 | # - script for rc-boot |
b650a78f JK |
4 | # |
5 | # Conditional build: | |
da88b5cd | 6 | %bcond_without pae # build without PAE (HIGHMEM64G) support (PLD Xen* kernels require PAE) |
b650a78f | 7 | # |
adbb6385 | 8 | Summary: Xen - a virtual machine monitor |
f4c7726e | 9 | Summary(pl.UTF-8): Xen - monitor maszyny wirtualnej |
fda6847b | 10 | Name: xen |
9e18baed | 11 | Version: 3.0.2 |
f4c7726e | 12 | Release: 3 |
fda6847b | 13 | License: GPL |
129858a4 | 14 | Group: Applications/System |
dcba01a0 | 15 | Source0: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/%{name}-%{version}-src.tgz |
9e18baed | 16 | # Source0-md5: 544eab940a0734a55459d648e5c3b224 |
403a0e9f AM |
17 | Source1: %{name}-xend.init |
18 | Source2: %{name}-xendomains.init | |
47d65e01 JK |
19 | Patch0: %{name}-python_scripts.patch |
20 | Patch1: %{name}-bash_scripts.patch | |
f4c7726e | 21 | Patch2: %{name}-bridge_setup.patch |
22 | Patch3: %{name}-xenstore-version.patch | |
23 | Patch4: %{name}-reisermodule.patch | |
24 | Patch5: %{name}-libvncserver-detect-fix.patch | |
67494ff6 | 25 | URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html |
f4c7726e | 26 | BuildRequires: SDL-devel |
53503036 | 27 | BuildRequires: XFree86-devel |
f4c7726e | 28 | %ifarch %{ix86} |
29 | BuildRequires: bcc | |
30 | %endif | |
31 | BuildRequires: cpp | |
39eabac9 | 32 | BuildRequires: curl-devel |
f4c7726e | 33 | BuildRequires: e2fsprogs-devel |
47d65e01 | 34 | BuildRequires: latex2html |
403a0e9f | 35 | BuildRequires: libidn-devel |
f4c7726e | 36 | BuildRequires: libvncserver-devel |
403a0e9f | 37 | BuildRequires: ncurses-devel |
f4c7726e | 38 | BuildRequires: progsreiserfs-devel |
53503036 JB |
39 | BuildRequires: python-Twisted |
40 | BuildRequires: python-devel | |
48c47956 | 41 | BuildRequires: rpm-pythonprov |
129858a4 | 42 | BuildRequires: rpmbuild(macros) >= 1.268 |
53503036 | 43 | BuildRequires: tetex-dvips |
67494ff6 | 44 | BuildRequires: tetex-format-latex |
45 | BuildRequires: tetex-latex-psnfss | |
53503036 | 46 | BuildRequires: transfig |
12f352e2 | 47 | BuildRequires: which |
53503036 | 48 | BuildRequires: zlib-devel |
129858a4 | 49 | Requires(post,preun): /sbin/chkconfig |
f4c7726e | 50 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
53503036 JB |
51 | Requires: ZopeInterface |
52 | Requires: bridge-utils | |
f4c7726e | 53 | Requires: kernel(xen0) = %{version} |
53503036 | 54 | Requires: losetup |
f4c7726e | 55 | Requires: python-%{name} = %{version}-%{release} |
53503036 | 56 | Requires: python-TwistedWeb |
129858a4 | 57 | Requires: rc-scripts |
cef7399d | 58 | Obsoletes: xen-doc |
f4c7726e | 59 | ExclusiveArch: %{ix86} %{x8664} |
fda6847b AM |
60 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
61 | ||
da88b5cd | 62 | %ifnarch i686 athlon pentium3 pentium4 |
85bffc35 | 63 | %undefine with_pae |
da88b5cd JK |
64 | %endif |
65 | ||
fda6847b AM |
66 | %description |
67 | This package contains the Xen hypervisor and Xen tools, needed to run | |
68 | virtual machines on x86 systems, together with the kernel-xen* | |
69 | packages. Information on how to use Xen can be found at the Xen | |
70 | project pages. | |
71 | ||
72 | Virtualisation can be used to run multiple versions or multiple Linux | |
73 | distributions on one system, or to test untrusted applications in a | |
74 | sandboxed environment. Note that the Xen technology is still in | |
75 | development, and this RPM has received extremely little testing. Don't | |
76 | be surprised if this RPM eats your data, drinks your coffee or makes | |
77 | fun of you in front of your friends. | |
78 | ||
f4c7726e | 79 | %description -l pl.UTF-8 |
80 | Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do | |
adbb6385 | 81 | uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami |
f4c7726e | 82 | kernel-xen*. Informacje jak używać Xena można znaleźć na stronach |
adbb6385 JB |
83 | projektu. |
84 | ||
f4c7726e | 85 | Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu |
dcba01a0 | 86 | dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych |
f4c7726e | 87 | aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia |
88 | Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy | |
89 | być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie | |
90 | się wyśmiewał w obecności przyjaciół. | |
91 | ||
92 | %package libs | |
93 | Summary: xen libraries | |
94 | Summary(pl.UTF-8): Biblioteki xena | |
95 | Group: Libraries | |
96 | ||
97 | %description libs | |
98 | xen libraries. | |
99 | ||
100 | %description libs -l pl.UTF-8 | |
101 | Biblioteki xena. | |
403a0e9f AM |
102 | |
103 | %package devel | |
6eccf3e8 | 104 | Summary: Header files for xen |
f4c7726e | 105 | Summary(pl.UTF-8): Pliki nagłówkowe xena |
403a0e9f | 106 | Group: Development/Libraries |
f4c7726e | 107 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
403a0e9f AM |
108 | |
109 | %description devel | |
6eccf3e8 JB |
110 | Header files for xen. |
111 | ||
f4c7726e | 112 | %description devel -l pl.UTF-8 |
113 | Pliki nagłówkowe xena. | |
403a0e9f AM |
114 | |
115 | %package static | |
116 | Summary: Static xen libraries | |
f4c7726e | 117 | Summary(pl.UTF-8): Statyczne biblioteki xena |
403a0e9f AM |
118 | Group: Development/Libraries |
119 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
120 | ||
121 | %description static | |
122 | Static xen libraries. | |
adbb6385 | 123 | |
f4c7726e | 124 | %description static -l pl.UTF-8 |
6eccf3e8 JB |
125 | Statyczne biblioteki xena. |
126 | ||
f4c7726e | 127 | %package -n python-xen |
128 | Summary: xen Python modules | |
129 | Summary(pl.UTF-8): Moduły Pythona dla xena | |
130 | Group: Libraries | |
131 | Conflicts: xen < 3.0.2-2.1 | |
132 | ||
133 | %description -n python-xen | |
134 | xen Python modules. | |
135 | ||
136 | %description -n python-xen -l pl.UTF-8 | |
137 | Moduły Pythona dla xena. | |
138 | ||
fda6847b | 139 | %prep |
129858a4 | 140 | %setup -q |
47d65e01 JK |
141 | %patch0 -p1 |
142 | %patch1 -p1 | |
f4c7726e | 143 | %patch2 -p1 |
144 | %patch3 -p1 | |
145 | %patch4 -p1 | |
146 | %patch5 -p1 | |
bde4673c | 147 | |
403a0e9f | 148 | chmod -R u+w . |
fda6847b AM |
149 | |
150 | %build | |
47d65e01 JK |
151 | CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \ |
152 | CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \ | |
403a0e9f | 153 | %{__make} xen tools docs \ |
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 \ | |
b650a78f | 163 | %{?with_pae:XEN_TARGET_X86_PAE=y} \ |
da88b5cd | 164 | DESTDIR=$RPM_BUILD_ROOT \ |
47d65e01 | 165 | XEN_PYTHON_NATIVE_INSTALL=1 |
403a0e9f AM |
166 | |
167 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
168 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend | |
169 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains | |
170 | ||
171 | install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet} | |
f4c7726e | 172 | install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save |
fda6847b | 173 | |
f4c7726e | 174 | cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir} |
175 | cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir} | |
fda6847b | 176 | |
f4c7726e | 177 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
178 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
403a0e9f | 179 | |
f4c7726e | 180 | %py_postclean |
181 | rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING | |
182 | rm -rf $RPM_BUILD_ROOT%{_docdir}/xen | |
47d65e01 | 183 | rm -rf $RPM_BUILD_ROOT/etc/init.d |
f4c7726e | 184 | rm -f $RPM_BUILD_ROOT/boot/xen-3.0.gz |
185 | rm -f $RPM_BUILD_ROOT/boot/xen-3.gz | |
8992b6e4 | 186 | |
fda6847b AM |
187 | %clean |
188 | rm -rf $RPM_BUILD_ROOT | |
189 | ||
403a0e9f | 190 | %post |
403a0e9f AM |
191 | /sbin/chkconfig --add xend |
192 | /sbin/chkconfig --add xendomains | |
193 | ||
403a0e9f AM |
194 | %preun |
195 | if [ "$1" = "0" ]; then | |
129858a4 | 196 | %service xend stop |
403a0e9f | 197 | /sbin/chkconfig --del xend |
129858a4 ER |
198 | |
199 | %service xendomains stop | |
403a0e9f AM |
200 | /sbin/chkconfig --del xendomains |
201 | fi | |
202 | ||
f4c7726e | 203 | %post libs -p /sbin/ldconfig |
204 | %postun libs -p /sbin/ldconfig | |
205 | ||
fda6847b AM |
206 | %files |
207 | %defattr(644,root,root,755) | |
71894181 | 208 | %doc COPYING ChangeLog README docs/misc/* |
47d65e01 JK |
209 | %doc docs/html/* |
210 | /boot/%{name}-syms-%{version} | |
67494ff6 | 211 | /boot/%{name}-%{version}.gz |
fda6847b | 212 | /boot/%{name}.gz |
403a0e9f | 213 | %attr(754,root,root) /etc/rc.d/init.d/* |
47d65e01 JK |
214 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/* |
215 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/* | |
f4c7726e | 216 | %attr(755,root,root) /etc/hotplug/* |
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/* | |
f4c7726e | 230 | %ifarch %{ix86} |
231 | %dir %{_libdir}/%{name}/boot | |
232 | %attr(744,root,root) %{_libdir}/%{name}/boot/hvmloader | |
233 | %endif | |
47d65e01 | 234 | %{_datadir}/xen |
403a0e9f | 235 | %{_mandir}/man?/* |
47d65e01 JK |
236 | %{_sharedstatedir}/xen |
237 | %{_sharedstatedir}/xenstored | |
238 | %dir /var/run/xen-hotplug | |
239 | %dir %attr(700,root,root) /var/run/xend | |
240 | %dir /var/run/xenstored | |
403a0e9f | 241 | |
f4c7726e | 242 | %files libs |
243 | %defattr(644,root,root,755) | |
244 | %attr(755,root,root) %{_libdir}/lib*.so.* | |
245 | ||
403a0e9f AM |
246 | %files devel |
247 | %defattr(644,root,root,755) | |
248 | %attr(755,root,root) %{_libdir}/lib*.so | |
249 | %{_includedir}/* | |
250 | ||
251 | %files static | |
252 | %defattr(644,root,root,755) | |
253 | %{_libdir}/lib*.a | |
f4c7726e | 254 | |
255 | %files -n python-xen | |
256 | %defattr(644,root,root,755) | |
257 | %dir %{py_sitedir}/grub | |
258 | %{py_sitedir}/grub/*.py[co] | |
259 | %dir %{py_sitedir}/grub/fsys | |
260 | %{py_sitedir}/grub/fsys/*.py[co] | |
261 | %dir %{py_sitedir}/grub/fsys/reiser | |
262 | %{py_sitedir}/grub/fsys/reiser/*.py[co] | |
263 | %attr(755,root,root) %{py_sitedir}/grub/fsys/reiser/*.so | |
264 | %dir %{py_sitedir}/grub/fsys/ext2 | |
265 | %{py_sitedir}/grub/fsys/ext2/*.py[co] | |
266 | %attr(755,root,root) %{py_sitedir}/grub/fsys/ext2/*.so | |
267 | %dir %{py_sitedir}/xen | |
268 | %dir %{py_sitedir}/xen/lowlevel | |
269 | %{py_sitedir}/xen/lowlevel/*.py[co] | |
270 | %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so | |
271 | %{py_sitedir}/xen/sv | |
272 | %{py_sitedir}/xen/util | |
273 | %{py_sitedir}/xen/web | |
274 | %{py_sitedir}/xen/xend | |
275 | %{py_sitedir}/xen/xm | |
276 | %{py_sitedir}/xen/*.py[co] |