]>
Commit | Line | Data |
---|---|---|
fec4200b | 1 | # sanlock, xenapi (libxenserver), xenlight (libxenlight)? |
7ce5923d | 2 | # --with-driver-modules ? |
94462445 ER |
3 | # |
4 | # Conditional build: | |
5 | %bcond_with xen # xen | |
5296d739 | 6 | %bcond_without xen_proxy # Xen proxy |
94462445 | 7 | %bcond_without qemu # Qemu |
4e034fd2 | 8 | %bcond_without polkit # PolicyKit |
36a3330a | 9 | %bcond_with netcf # host interfaces support |
94462445 | 10 | |
148a9af3 JB |
11 | # qemu available only on x86 and ppc |
12 | %ifnarch %{ix86} %{x8664} ppc | |
13 | %undefine with_qemu | |
14 | %endif | |
15 | # Xen is available only on i686 x86_64 ia64 | |
94462445 ER |
16 | %ifnarch %{ix86} %{x8664} ia64 |
17 | %undefine with_xen | |
18 | %endif | |
19 | %ifarch i386 i486 i586 | |
20 | %undefine with_xen | |
21 | %endif | |
94462445 ER |
22 | %if %{without xen} |
23 | %undefine with_xen_proxy | |
24 | %endif | |
25 | ||
94462445 | 26 | Summary: Toolkit to interact with virtualization capabilities |
148a9af3 | 27 | Summary(pl.UTF-8): Narzędzia współpracujące z funkcjami wirtualizacji |
94462445 | 28 | Name: libvirt |
a73c464c AM |
29 | Version: 0.9.6 |
30 | Release: 1 | |
148a9af3 | 31 | License: LGPL v2.1+ |
94462445 | 32 | Group: Base/Kernel |
94462445 | 33 | Source0: ftp://ftp.libvirt.org/libvirt/%{name}-%{version}.tar.gz |
a73c464c | 34 | # Source0-md5: b74df374b524d00a22a6c89cfc23099f |
e285e5e5 | 35 | Source1: %{name}.init |
5296d739 JB |
36 | Patch0: %{name}-sasl.patch |
37 | URL: http://www.libvirt.org/ | |
7ce5923d | 38 | BuildRequires: audit-libs-devel |
fa080175 | 39 | BuildRequires: augeas-devel |
148a9af3 | 40 | BuildRequires: autoconf >= 2.50 |
69187f5d | 41 | BuildRequires: automake |
4e034fd2 | 42 | BuildRequires: avahi-devel >= 0.6.0 |
4e034fd2 | 43 | BuildRequires: curl-devel >= 7.18.0 |
69187f5d | 44 | BuildRequires: cyrus-sasl-devel |
4e034fd2 | 45 | BuildRequires: device-mapper-devel >= 1.0.0 |
7ce5923d | 46 | BuildRequires: gettext-devel >= 0.17 |
4e034fd2 | 47 | BuildRequires: gnutls-devel >= 1.0.25 |
69187f5d | 48 | BuildRequires: libapparmor-devel |
7ce5923d JB |
49 | BuildRequires: libblkid-devel >= 2.17 |
50 | BuildRequires: libcap-ng-devel >= 0.4.0 | |
51 | BuildRequires: libgcrypt-devel | |
52 | BuildRequires: libnl1-devel >= 1.1 | |
53 | BuildRequires: libpcap-devel >= 1.0.0 | |
54 | BuildRequires: libselinux-devel >= 2.0.82 | |
55 | BuildRequires: libssh2-devel >= 1.0 | |
69187f5d | 56 | BuildRequires: libstdc++-devel |
57 | BuildRequires: libtool | |
7ce5923d | 58 | BuildRequires: libxml2-devel >= 1:2.6.0 |
fa080175 | 59 | BuildRequires: libxslt-devel |
60 | BuildRequires: openldap-devel | |
fec4200b | 61 | BuildRequires: openwsman-devel >= 2.2.3 |
94462445 | 62 | BuildRequires: ncurses-devel |
36a3330a | 63 | %{?with_netcf:BuildRequires: netcf-devel >= 0.1.4} |
69187f5d | 64 | BuildRequires: numactl-devel |
36a3330a | 65 | BuildRequires: parted-devel >= 1.8.0 |
69187f5d | 66 | BuildRequires: perl-tools-pod |
36a3330a | 67 | %{?with_polkit:BuildRequires: polkit >= 0.90} |
69187f5d | 68 | BuildRequires: pkgconfig |
36a3330a | 69 | BuildRequires: python |
94462445 ER |
70 | BuildRequires: python-devel |
71 | BuildRequires: readline-devel | |
69187f5d | 72 | BuildRequires: rpm-pythonprov |
5296d739 | 73 | BuildRequires: rpmbuild(macros) >= 1.219 |
69187f5d | 74 | BuildRequires: udev-devel >= 145 |
98574323 | 75 | %{?with_xen:BuildRequires: xen-devel >= 3.0.4} |
94462445 | 76 | # For disk driver |
7ce5923d | 77 | BuildRequires: xorg-lib-libpciaccess-devel >= 0.10.0 |
36a3330a | 78 | BuildRequires: yajl-devel |
7ce5923d JB |
79 | Requires: curl-libs >= 7.18.0 |
80 | Requires: device-mapper >= 1.0.0 | |
81 | Requires: gnutls >= 1.0.25 | |
82 | Requires: libcap-ng >= 0.4.0 | |
83 | Requires: libnl1 >= 1.1 | |
84 | Requires: libpcap >= 1.0.0 | |
85 | Requires: libselinux >= 2.0.82 | |
86 | Requires: libssh2 >= 1.0 | |
87 | Requires: libxml2 >= 1:2.6.0 | |
fec4200b | 88 | Requires: openwsman-libs >= 2.2.3 |
94462445 ER |
89 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
90 | ||
91 | # libxenstore is not versionned properly | |
92 | %define _noautoreq devel(libxenstore.*) | |
93 | ||
94 | %description | |
95 | Libvirt is a C toolkit to interact with the virtualization | |
96 | capabilities of recent versions of Linux. | |
97 | ||
98 | Virtualization of the Linux Operating System means the ability to run | |
99 | multiple instances of Operating Systems concurently on a single | |
100 | hardware system where the basic resources are driven by a Linux | |
101 | instance. The library aim at providing long term stable C API | |
102 | initially for the Xen paravirtualization but should be able to | |
103 | integrate other virtualization mechanisms if needed. | |
104 | ||
148a9af3 JB |
105 | %description -l pl.UTF-8 |
106 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami | |
107 | wirtualizacji obecnych wersji Linuksa. | |
108 | ||
109 | Wirtualizacja w systemie operacyjnym Linux oznacza możliwość | |
110 | jednoczesnego uruchamiania wielu instancji systemu operacyjnego na | |
111 | pojedynczym systemie sprzętowym, którego podstawowe zasoby są | |
112 | zarządzane przez instancję Linuksa. Celem biblioteki jest zapewnienie | |
113 | długotrwale stabilnego API C, początkowo do parawirtualizacji Xen, ale | |
114 | dającej się zintegrować w razie potrzeby z innymi mechanizmami | |
115 | wirtualizacji. | |
116 | ||
94462445 | 117 | %package devel |
148a9af3 JB |
118 | Summary: Development files for programs using libvirt |
119 | Summary(pl.UTF-8): Pliki programistyczne do programów wykorzystujących libvirt | |
94462445 ER |
120 | Group: Development/Libraries |
121 | Requires: %{name} = %{version}-%{release} | |
7f159b90 JB |
122 | Requires: audit-libs-devel |
123 | Requires: curl-devel >= 7.18.0 | |
124 | Requires: device-mapper-devel >= 1.0.0 | |
125 | Requires: gnutls-devel >= 1.0.25 | |
126 | Requires: libapparmor-devel | |
127 | Requires: libcap-ng-devel >= 0.4.0 | |
128 | Requires: libgcrypt-devel | |
129 | Requires: libnl1-devel >= 1.1 | |
130 | Requires: libpcap-devel >= 1.0.0 | |
131 | Requires: libselinux-devel >= 2.0.82 | |
132 | Requires: libxml2-devel >= 1:2.6.0 | |
133 | Requires: numactl-devel | |
fec4200b | 134 | Requires: openwsman-devel >= 2.2.3 |
94462445 | 135 | %{?with_xen:Requires: xen-devel} |
7f159b90 | 136 | Requires: yajl-devel |
94462445 ER |
137 | |
138 | %description devel | |
139 | Libvirt is a C toolkit to interact with the virtualization | |
140 | capabilities of recent versions of Linux. | |
141 | ||
148a9af3 JB |
142 | This package contains the header files needed for developing programs |
143 | using the libvirt library. | |
144 | ||
145 | %description devel -l pl.UTF-8 | |
146 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami | |
147 | wirtualizacji obecnych wersji Linuksa. | |
148 | ||
149 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów | |
150 | wykorzystujących bibliotekę libvirt. | |
94462445 ER |
151 | |
152 | %package static | |
153 | Summary: Development static libraries for programs using libvirt | |
148a9af3 | 154 | Summary(pl.UTF-8): Statyczne biblioteki programistyczne do programów wykorzystujących libvirt |
94462445 | 155 | Group: Development/Libraries |
148a9af3 | 156 | Requires: %{name}-devel = %{version}-%{release} |
94462445 ER |
157 | |
158 | %description static | |
159 | Libvirt is a C toolkit to interact with the virtualization | |
160 | capabilities of recent versions of Linux. | |
161 | ||
148a9af3 JB |
162 | This package contains the static libraries for developing programs |
163 | using the libvirt library. | |
164 | ||
165 | %description static -l pl.UTF-8 | |
166 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami | |
167 | wirtualizacji obecnych wersji Linuksa. | |
168 | ||
169 | Ten pakiet zawiera biblioteki statyczne do tworzenia programów | |
170 | wykorzystujących bibliotekę libvirt. | |
94462445 | 171 | |
5296d739 | 172 | %package -n python-%{name} |
94462445 | 173 | Summary: Python bindings to interact with virtualization capabilities |
148a9af3 | 174 | Summary(pl.UTF-8): Wiązania Pythona do współpracy z funkcjami wirtualizacji |
94462445 ER |
175 | Group: Development/Languages/Python |
176 | Requires: %{name} = %{version}-%{release} | |
177 | ||
178 | %description -n python-%{name} | |
179 | Libvirt is a C toolkit to interact with the virtualization | |
180 | capabilities of recent versions of Linux. | |
181 | ||
182 | This package contains the Python bindings for the libvirt library. | |
183 | ||
148a9af3 JB |
184 | %description -n python-%{name} -l pl.UTF-8 |
185 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami | |
186 | wirtualizacji obecnych wersji Linuksa. | |
187 | ||
188 | Ten pakiet zawiera wiązania Pythona do biblioteki libvirt. | |
189 | ||
94462445 ER |
190 | %package utils |
191 | Summary: Tools to interact with virtualization capabilities | |
148a9af3 | 192 | Summary(pl.UTF-8): Narzędzia do współpracy z funkcjami wirtualizacyjnymi |
94462445 ER |
193 | Group: Base/Kernel |
194 | Requires: %{name} = %{version}-%{release} | |
7ce5923d JB |
195 | Requires: avahi-libs >= 0.6.0 |
196 | Requires: libblkid >= 2.17 | |
197 | Requires: parted-libs >= 1.8.0 | |
198 | Requires: udev-libs >= 145 | |
199 | Requires: xorg-lib-libpciaccess >= 0.10.0 | |
8a8149a9 | 200 | Suggests: iptables |
624d0ccc | 201 | Suggests: bridge-utils |
8a8149a9 | 202 | Suggests: dmidecode |
624d0ccc | 203 | Suggests: dnsmasq |
8a8149a9 JR |
204 | Suggests: ebtables |
205 | Suggests: gawk | |
206 | Suggests: iptables | |
624d0ccc | 207 | Suggests: lvm2 |
8a8149a9 JR |
208 | # for management through ssh |
209 | Suggests: netcat-openbsd | |
7ce5923d | 210 | Suggests: polkit >= 0.90 |
94462445 ER |
211 | |
212 | %description utils | |
213 | Libvirt is a C toolkit to interact with the virtualization | |
214 | capabilities of recent versions of Linux. | |
215 | ||
216 | This package contains tools for the libvirt library. | |
217 | ||
148a9af3 JB |
218 | %description utils -l pl.UTF-8 |
219 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami | |
220 | wirtualizacji obecnych wersji Linuksa. | |
221 | ||
222 | Ten pakiet zawiera narzędzia do biblioteki libvirt. | |
223 | ||
94462445 ER |
224 | %prep |
225 | %setup -q | |
5296d739 JB |
226 | %patch0 -p1 |
227 | ||
2c74cc69 | 228 | # weird translations |
5296d739 | 229 | %{__rm} po/{my,eu_ES}.{po,gmo} |
94462445 | 230 | |
01260398 AF |
231 | mv po/vi_VN.po po/vi.po |
232 | mv po/vi_VN.gmo po/vi.gmo | |
233 | ||
94462445 | 234 | %build |
4e034fd2 AF |
235 | %{__libtoolize} |
236 | %{__aclocal} -I gnulib/m4 -I m4 | |
4e034fd2 | 237 | %{__autoconf} |
7ce5923d | 238 | %{__autoheader} |
4e034fd2 AF |
239 | %{__automake} |
240 | ||
241 | %configure \ | |
242 | --disable-silent-rules \ | |
e74f18c1 | 243 | --with-html-dir=%{_gtkdocdir} \ |
46ab7552 | 244 | --with-html-subdir=%{name} \ |
624d0ccc | 245 | --x-libraries=%{_libdir} \ |
94462445 ER |
246 | %{!?with_xen:--without-xen} \ |
247 | %{!?with_qemu:--without-qemu} \ | |
36a3330a | 248 | %{!?with_netcf:--without-netcf} \ |
94462445 | 249 | --with-init-script=redhat \ |
624d0ccc | 250 | --with-storage-lvm \ |
4e034fd2 AF |
251 | --without-hal \ |
252 | --with-udev \ | |
624d0ccc | 253 | PVCREATE=/sbin/pvcreate \ |
254 | VGCREATE=/sbin/vgcreate \ | |
255 | LVCREATE=/sbin/lvcreate \ | |
256 | PVREMOVE=/sbin/pvremove \ | |
257 | VGREMOVE=/sbin/vgremove \ | |
258 | LVREMOVE=/sbin/lvremove \ | |
259 | VGCHANGE=/sbin/vgchange \ | |
260 | VGSCAN=/sbin/vgscan \ | |
261 | PVS=/sbin/pvs \ | |
262 | VGS=/sbin/vgs \ | |
263 | LVS=/sbin/lvs \ | |
7ce5923d | 264 | TC=/sbin/tc \ |
624d0ccc | 265 | BRCTL=/sbin/brctl \ |
7ce5923d JB |
266 | MOUNT=/bin/mount \ |
267 | UMOUNT=/bin/umount \ | |
268 | MKFS=/sbin/mkfs \ | |
36a3330a | 269 | SHOWMOUNT=/usr/sbin/showmount \ |
270 | IPTABLES_PATH=/usr/sbin/iptables \ | |
271 | IP6TABLES_PATH=/usr/sbin/ip6tables \ | |
d9fa538f | 272 | EBTABLES_PATH=/usr/sbin/ebtables \ |
7ce5923d JB |
273 | ISCSIADM=/sbin/iscsiadm \ |
274 | DNSMASQ=/usr/sbin/dnsmasq \ | |
275 | RADVD=/usr/sbin/radvd \ | |
276 | UDEVADM=/sbin/udevadm \ | |
277 | MODPROBE=/sbin/modprobe | |
278 | ||
279 | %{__make} \ | |
280 | AWK=gawk | |
94462445 ER |
281 | |
282 | %install | |
283 | rm -rf $RPM_BUILD_ROOT | |
284 | %{__make} install \ | |
46ab7552 | 285 | DEVHELP_DIR=%{_gtkdocdir}/%{name}/devhelp \ |
94462445 ER |
286 | DESTDIR=$RPM_BUILD_ROOT |
287 | ||
e285e5e5 SP |
288 | install -d $RPM_BUILD_ROOT/etc/sysconfig |
289 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
290 | ||
feec3441 | 291 | #install qemud/libvirtd.sysconf $RPM_BUILD_ROOT/etc/sysconfig/libvirtd |
e285e5e5 SP |
292 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/libvirtd |
293 | ||
5296d739 JB |
294 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
295 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
296 | %py_postclean | |
7f159b90 | 297 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la |
5296d739 | 298 | |
94462445 ER |
299 | %find_lang %{name} |
300 | ||
301 | %clean | |
302 | rm -rf $RPM_BUILD_ROOT | |
303 | ||
5296d739 JB |
304 | %post -p /sbin/ldconfig |
305 | %postun -p /sbin/ldconfig | |
94462445 ER |
306 | |
307 | %files -f %{name}.lang | |
308 | %defattr(644,root,root,755) | |
309 | %doc ChangeLog README TODO NEWS | |
5296d739 JB |
310 | %attr(755,root,root) %{_libdir}/libvirt.so.*.*.* |
311 | %attr(755,root,root) %ghost %{_libdir}/libvirt.so.0 | |
312 | %attr(755,root,root) %{_libdir}/libvirt-qemu.so.*.*.* | |
313 | %attr(755,root,root) %ghost %{_libdir}/libvirt-qemu.so.0 | |
8c29141c | 314 | %attr(755,root,root) %{_libdir}/libvirt_lxc |
36a3330a | 315 | %attr(755,root,root) %{_libdir}/libvirt_iohelper |
e74f18c1 JR |
316 | %dir %{_datadir}/libvirt |
317 | %dir %{_datadir}/libvirt/schemas | |
a73c464c | 318 | %{_datadir}/libvirt/schemas/basictypes.rng |
feec3441 | 319 | %{_datadir}/libvirt/schemas/capability.rng |
320 | %{_datadir}/libvirt/schemas/domain.rng | |
a73c464c | 321 | %{_datadir}/libvirt/schemas/domaincommon.rng |
fa080175 | 322 | %{_datadir}/libvirt/schemas/domainsnapshot.rng |
feec3441 | 323 | %{_datadir}/libvirt/schemas/interface.rng |
324 | %{_datadir}/libvirt/schemas/network.rng | |
a73c464c | 325 | %{_datadir}/libvirt/schemas/networkcommon.rng |
feec3441 | 326 | %{_datadir}/libvirt/schemas/nodedev.rng |
4e034fd2 | 327 | %{_datadir}/libvirt/schemas/nwfilter.rng |
feec3441 | 328 | %{_datadir}/libvirt/schemas/secret.rng |
329 | %{_datadir}/libvirt/schemas/storageencryption.rng | |
330 | %{_datadir}/libvirt/schemas/storagepool.rng | |
331 | %{_datadir}/libvirt/schemas/storagevol.rng | |
3ac3cd0c | 332 | |
94462445 ER |
333 | %files devel |
334 | %defattr(644,root,root,755) | |
5296d739 JB |
335 | %attr(755,root,root) %{_libdir}/libvirt.so |
336 | %attr(755,root,root) %{_libdir}/libvirt-qemu.so | |
337 | %{_libdir}/libvirt.la | |
338 | %{_libdir}/libvirt-qemu.la | |
339 | %{_gtkdocdir}/%{name} | |
340 | %{_includedir}/%{name} | |
94462445 ER |
341 | %{_pkgconfigdir}/%{name}.pc |
342 | ||
343 | %files static | |
344 | %defattr(644,root,root,755) | |
5296d739 JB |
345 | %{_libdir}/libvirt.a |
346 | %{_libdir}/libvirt-qemu.a | |
94462445 ER |
347 | |
348 | %files -n python-%{name} | |
349 | %defattr(644,root,root,755) | |
350 | %doc %{_docdir}/%{name}-python-%{version} | |
a73c464c AM |
351 | %attr(755,root,root) %{py_sitedir}/libvirtmod.so |
352 | %attr(755,root,root) %{py_sitedir}/libvirtmod_qemu.so | |
5296d739 JB |
353 | %{py_sitedir}/libvirt.py[co] |
354 | %{py_sitedir}/libvirt_qemu.py[co] | |
94462445 ER |
355 | |
356 | %files utils | |
357 | %defattr(644,root,root,755) | |
358 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt | |
72b1baa0 | 359 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sasl/libvirt.conf |
94462445 ER |
360 | %attr(755,root,root) %{_bindir}/virsh |
361 | %attr(755,root,root) %{_sbindir}/libvirtd | |
e285e5e5 | 362 | %attr(754,root,root) /etc/rc.d/init.d/libvirtd |
fa080175 | 363 | %attr(754,root,root) /etc/rc.d/init.d/libvirt-guests |
3ac3cd0c | 364 | %attr(755,root,root) %{_bindir}/virt-xml-validate |
feec3441 | 365 | %attr(755,root,root) %{_bindir}/virt-pki-validate |
e285e5e5 | 366 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirtd |
fa080175 | 367 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirt-guests |
36a3330a | 368 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd |
4e034fd2 AF |
369 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.lxc |
370 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.qemu | |
371 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.uml | |
94462445 | 372 | %{_libdir}/libvirt_parthelper |
fa080175 | 373 | %{_libdir}/virt-aa-helper |
5296d739 | 374 | %{?with_polkit:%{_datadir}/polkit-1/actions/org.libvirt.unix.policy} |
94462445 | 375 | %{_mandir}/man1/virsh.1* |
3ac3cd0c | 376 | %{_mandir}/man1/virt-xml-validate.1* |
feec3441 | 377 | %{_mandir}/man1/virt-pki-validate.1* |
e4177f0c | 378 | %{_mandir}/man8/libvirtd.8* |
feec3441 | 379 | %{_datadir}/%{name}/*.xml |
fa080175 | 380 | %{_datadir}/augeas/lenses/*.aug |
381 | %{_datadir}/augeas/lenses/tests/*.aug | |
7131199b | 382 | %dir /var/run/libvirt |
d5a575f6 | 383 | %dir /var/lib/libvirt |