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