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