]>
Commit | Line | Data |
---|---|---|
94462445 ER |
1 | # |
2 | # Conditional build: | |
423a0b96 JR |
3 | %bcond_without esx # VMware ESX support |
4 | %bcond_without hyperv # Hyper-V support | |
5 | %bcond_without libxl # libxenlight | |
6 | %bcond_without lxc # LXC support | |
7 | %bcond_without netcf # host interfaces support | |
bf949ec1 JR |
8 | %bcond_without openvz # OpenVZ support |
9 | %bcond_without phyp # PHYP support | |
423a0b96 JR |
10 | %bcond_without polkit # PolicyKit |
11 | %bcond_without qemu # Qemu | |
12 | %bcond_without sanlock # sanlock storage lock manager | |
13 | %bcond_without uml # UML support | |
14 | %bcond_without vbox # VirtualBox support | |
15 | %bcond_without vmware # VMware Workstation/Player support | |
16 | %bcond_with xenapi # XenAPI support | |
17 | %bcond_without xen_proxy # Xen proxy | |
18 | %bcond_without xen # xen | |
94462445 | 19 | |
148a9af3 JB |
20 | # qemu available only on x86 and ppc |
21 | %ifnarch %{ix86} %{x8664} ppc | |
22 | %undefine with_qemu | |
23 | %endif | |
bc484957 | 24 | # Xen is available only on x86 and ia64 |
94462445 ER |
25 | %ifnarch %{ix86} %{x8664} ia64 |
26 | %undefine with_xen | |
27 | %endif | |
94462445 ER |
28 | %if %{without xen} |
29 | %undefine with_xen_proxy | |
30 | %endif | |
31 | ||
94462445 | 32 | Summary: Toolkit to interact with virtualization capabilities |
148a9af3 | 33 | Summary(pl.UTF-8): Narzędzia współpracujące z funkcjami wirtualizacji |
94462445 | 34 | Name: libvirt |
f4fa2857 | 35 | Version: 0.9.11 |
334e389b | 36 | Release: 1 |
148a9af3 | 37 | License: LGPL v2.1+ |
423a0b96 | 38 | Group: Libraries |
21f7b4fc JR |
39 | Source0: ftp://ftp.libvirt.org/libvirt/%{name}-%{version}.tar.gz |
40 | # Source0-md5: 6e9fab115075a8fd21d9bd0d7e558a52 | |
e285e5e5 | 41 | Source1: %{name}.init |
ed4dd5b7 | 42 | Source2: %{name}.tmpfiles |
5296d739 | 43 | Patch0: %{name}-sasl.patch |
a5db73fd | 44 | Patch1: %{name}-lxc.patch |
423a0b96 JR |
45 | Patch2: %{name}-qemu-acl.patch |
46 | Patch3: %{name}-xend.patch | |
87bef338 | 47 | Patch4: lxc-without-selinux.patch |
423a0b96 | 48 | Patch5: %{name}-driver-modules.patch |
5296d739 | 49 | URL: http://www.libvirt.org/ |
7ce5923d | 50 | BuildRequires: audit-libs-devel |
fa080175 | 51 | BuildRequires: augeas-devel |
148a9af3 | 52 | BuildRequires: autoconf >= 2.50 |
69187f5d | 53 | BuildRequires: automake |
4e034fd2 | 54 | BuildRequires: avahi-devel >= 0.6.0 |
4e034fd2 | 55 | BuildRequires: curl-devel >= 7.18.0 |
69187f5d | 56 | BuildRequires: cyrus-sasl-devel |
4e034fd2 | 57 | BuildRequires: device-mapper-devel >= 1.0.0 |
5cbe4501 | 58 | BuildRequires: gawk |
7ce5923d | 59 | BuildRequires: gettext-devel >= 0.17 |
4e034fd2 | 60 | BuildRequires: gnutls-devel >= 1.0.25 |
69187f5d | 61 | BuildRequires: libapparmor-devel |
7ce5923d JB |
62 | BuildRequires: libblkid-devel >= 2.17 |
63 | BuildRequires: libcap-ng-devel >= 0.4.0 | |
64 | BuildRequires: libgcrypt-devel | |
65 | BuildRequires: libnl1-devel >= 1.1 | |
66 | BuildRequires: libpcap-devel >= 1.0.0 | |
67 | BuildRequires: libselinux-devel >= 2.0.82 | |
68 | BuildRequires: libssh2-devel >= 1.0 | |
69187f5d | 69 | BuildRequires: libstdc++-devel |
70 | BuildRequires: libtool | |
7ce5923d | 71 | BuildRequires: libxml2-devel >= 1:2.6.0 |
fa080175 | 72 | BuildRequires: libxslt-devel |
94462445 | 73 | BuildRequires: ncurses-devel |
36a3330a | 74 | %{?with_netcf:BuildRequires: netcf-devel >= 0.1.4} |
69187f5d | 75 | BuildRequires: numactl-devel |
423a0b96 JR |
76 | BuildRequires: openldap-devel |
77 | BuildRequires: openwsman-devel >= 2.2.3 | |
36a3330a | 78 | BuildRequires: parted-devel >= 1.8.0 |
69187f5d | 79 | BuildRequires: perl-tools-pod |
36a3330a | 80 | %{?with_polkit:BuildRequires: polkit >= 0.90} |
69187f5d | 81 | BuildRequires: pkgconfig |
36a3330a | 82 | BuildRequires: python |
94462445 ER |
83 | BuildRequires: python-devel |
84 | BuildRequires: readline-devel | |
69187f5d | 85 | BuildRequires: rpm-pythonprov |
bf949ec1 | 86 | BuildRequires: rpmbuild(macros) >= 1.627 |
621ed3d1 | 87 | %{?with_sanlock:BuildRequires: sanlock-devel >= 0.8} |
69187f5d | 88 | BuildRequires: udev-devel >= 145 |
bc484957 | 89 | %{?with_xen:BuildRequires: xen-devel >= 4.1.2} |
94462445 | 90 | # For disk driver |
7ce5923d | 91 | BuildRequires: xorg-lib-libpciaccess-devel >= 0.10.0 |
36a3330a | 92 | BuildRequires: yajl-devel |
7ce5923d JB |
93 | Requires: curl-libs >= 7.18.0 |
94 | Requires: device-mapper >= 1.0.0 | |
7ce5923d JB |
95 | Requires: libcap-ng >= 0.4.0 |
96 | Requires: libnl1 >= 1.1 | |
97 | Requires: libpcap >= 1.0.0 | |
98 | Requires: libselinux >= 2.0.82 | |
99 | Requires: libssh2 >= 1.0 | |
100 | Requires: libxml2 >= 1:2.6.0 | |
fec4200b | 101 | Requires: openwsman-libs >= 2.2.3 |
94462445 ER |
102 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
103 | ||
94462445 ER |
104 | %description |
105 | Libvirt is a C toolkit to interact with the virtualization | |
106 | capabilities of recent versions of Linux. | |
107 | ||
108 | Virtualization of the Linux Operating System means the ability to run | |
109 | multiple instances of Operating Systems concurently on a single | |
110 | hardware system where the basic resources are driven by a Linux | |
111 | instance. The library aim at providing long term stable C API | |
112 | initially for the Xen paravirtualization but should be able to | |
113 | integrate other virtualization mechanisms if needed. | |
114 | ||
148a9af3 | 115 | %description -l pl.UTF-8 |
423a0b96 JR |
116 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami wirtualizacji |
117 | obecnych wersji Linuksa. | |
148a9af3 JB |
118 | |
119 | Wirtualizacja w systemie operacyjnym Linux oznacza możliwość | |
120 | jednoczesnego uruchamiania wielu instancji systemu operacyjnego na | |
121 | pojedynczym systemie sprzętowym, którego podstawowe zasoby są | |
122 | zarządzane przez instancję Linuksa. Celem biblioteki jest zapewnienie | |
123 | długotrwale stabilnego API C, początkowo do parawirtualizacji Xen, ale | |
124 | dającej się zintegrować w razie potrzeby z innymi mechanizmami | |
125 | wirtualizacji. | |
126 | ||
94462445 | 127 | %package devel |
148a9af3 JB |
128 | Summary: Development files for programs using libvirt |
129 | Summary(pl.UTF-8): Pliki programistyczne do programów wykorzystujących libvirt | |
94462445 ER |
130 | Group: Development/Libraries |
131 | Requires: %{name} = %{version}-%{release} | |
7f159b90 JB |
132 | Requires: audit-libs-devel |
133 | Requires: curl-devel >= 7.18.0 | |
134 | Requires: device-mapper-devel >= 1.0.0 | |
135 | Requires: gnutls-devel >= 1.0.25 | |
136 | Requires: libapparmor-devel | |
137 | Requires: libcap-ng-devel >= 0.4.0 | |
138 | Requires: libgcrypt-devel | |
139 | Requires: libnl1-devel >= 1.1 | |
140 | Requires: libpcap-devel >= 1.0.0 | |
141 | Requires: libselinux-devel >= 2.0.82 | |
142 | Requires: libxml2-devel >= 1:2.6.0 | |
143 | Requires: numactl-devel | |
fec4200b | 144 | Requires: openwsman-devel >= 2.2.3 |
94462445 | 145 | %{?with_xen:Requires: xen-devel} |
7f159b90 | 146 | Requires: yajl-devel |
94462445 ER |
147 | |
148 | %description devel | |
149 | Libvirt is a C toolkit to interact with the virtualization | |
150 | capabilities of recent versions of Linux. | |
151 | ||
148a9af3 JB |
152 | This package contains the header files needed for developing programs |
153 | using the libvirt library. | |
154 | ||
155 | %description devel -l pl.UTF-8 | |
423a0b96 JR |
156 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami wirtualizacji |
157 | obecnych wersji Linuksa. | |
148a9af3 JB |
158 | |
159 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów | |
160 | wykorzystujących bibliotekę libvirt. | |
94462445 ER |
161 | |
162 | %package static | |
163 | Summary: Development static libraries for programs using libvirt | |
148a9af3 | 164 | Summary(pl.UTF-8): Statyczne biblioteki programistyczne do programów wykorzystujących libvirt |
94462445 | 165 | Group: Development/Libraries |
148a9af3 | 166 | Requires: %{name}-devel = %{version}-%{release} |
94462445 ER |
167 | |
168 | %description static | |
169 | Libvirt is a C toolkit to interact with the virtualization | |
170 | capabilities of recent versions of Linux. | |
171 | ||
148a9af3 JB |
172 | This package contains the static libraries for developing programs |
173 | using the libvirt library. | |
174 | ||
175 | %description static -l pl.UTF-8 | |
423a0b96 JR |
176 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami wirtualizacji |
177 | obecnych wersji Linuksa. | |
148a9af3 JB |
178 | |
179 | Ten pakiet zawiera biblioteki statyczne do tworzenia programów | |
180 | wykorzystujących bibliotekę libvirt. | |
94462445 | 181 | |
5296d739 | 182 | %package -n python-%{name} |
94462445 | 183 | Summary: Python bindings to interact with virtualization capabilities |
148a9af3 | 184 | Summary(pl.UTF-8): Wiązania Pythona do współpracy z funkcjami wirtualizacji |
94462445 ER |
185 | Group: Development/Languages/Python |
186 | Requires: %{name} = %{version}-%{release} | |
187 | ||
188 | %description -n python-%{name} | |
189 | Libvirt is a C toolkit to interact with the virtualization | |
190 | capabilities of recent versions of Linux. | |
191 | ||
192 | This package contains the Python bindings for the libvirt library. | |
193 | ||
148a9af3 | 194 | %description -n python-%{name} -l pl.UTF-8 |
423a0b96 JR |
195 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami wirtualizacji |
196 | obecnych wersji Linuksa. | |
148a9af3 JB |
197 | |
198 | Ten pakiet zawiera wiązania Pythona do biblioteki libvirt. | |
199 | ||
423a0b96 JR |
200 | %package lock-sanlock |
201 | Summary: Sanlock lock manager plugin for libvirt | |
202 | Summary(pl.UTF-8): Zarządca blokad sanlock dla biblioteki libvirt | |
203 | Group: Libraries | |
204 | Requires: %{name} = %{version}-%{release} | |
205 | ||
206 | %description lock-sanlock | |
207 | Sanlock lock manager plugin for libvirt. | |
208 | ||
209 | %description lock-sanlock -l pl.UTF-8 | |
210 | Zarządca blokad sanlock dla biblioteki libvirt. | |
211 | ||
212 | %package daemon | |
213 | Summary: Server side daemon and supporting files for libvirt library | |
214 | Group: Applications/System | |
94462445 | 215 | Requires: %{name} = %{version}-%{release} |
7ce5923d | 216 | Requires: avahi-libs >= 0.6.0 |
423a0b96 | 217 | Requires: iproute2 |
7ce5923d | 218 | Requires: libblkid >= 2.17 |
423a0b96 | 219 | Provides: libvirt(hypervisor) |
7ce5923d | 220 | Requires: parted-libs >= 1.8.0 |
423a0b96 JR |
221 | # Needed for probing the power management features of the host. |
222 | Requires: pm-utils | |
bf949ec1 | 223 | Requires: systemd-units >= 37-0.10 |
7ce5923d | 224 | Requires: udev-libs >= 145 |
423a0b96 JR |
225 | Requires: util-linux |
226 | Requires: virtual(module-tools) | |
7ce5923d | 227 | Requires: xorg-lib-libpciaccess >= 0.10.0 |
423a0b96 JR |
228 | Requires(post): systemd-units |
229 | Requires(preun): systemd-units | |
230 | Requires(postun): systemd-units | |
624d0ccc | 231 | Suggests: bridge-utils |
423a0b96 JR |
232 | Suggests: cyrus-sasl |
233 | Suggests: cyrus-sasl-digest-md5 | |
8a8149a9 | 234 | Suggests: dmidecode |
423a0b96 | 235 | Suggests: dnsmasq >= 2.41 |
8a8149a9 JR |
236 | Suggests: ebtables |
237 | Suggests: gawk | |
423a0b96 | 238 | Suggests: glusterfs-client >= 2.0.1 |
8a8149a9 | 239 | Suggests: iptables |
423a0b96 JR |
240 | Suggests: iptables |
241 | Suggests: libcgroup | |
624d0ccc | 242 | Suggests: lvm2 |
423a0b96 JR |
243 | Suggests: numad |
244 | Suggests: open-iscsi | |
245 | Suggests: parted | |
246 | Suggests: polkit >= 0.93 | |
247 | Suggests: radvd | |
bf949ec1 | 248 | Suggests: scrub |
94462445 | 249 | |
423a0b96 JR |
250 | %description daemon |
251 | Server side daemon required to manage the virtualization capabilities | |
252 | of recent versions of Linux. Requires a hypervisor specific sub-RPM | |
253 | for specific drivers. | |
254 | ||
255 | %package daemon-esx | |
256 | Summary: Server side daemon & driver required to run VMware ESX guests | |
257 | Group: Development/Libraries | |
258 | Requires: %{name}-daemon = %{version}-%{release} | |
259 | Provides: libvirt(hypervisor) | |
260 | ||
261 | %description daemon-esx | |
262 | Server side daemon and driver required to manage the virtualization | |
263 | capabilities of the VMware ESX emulators | |
264 | ||
265 | %package daemon-hyperv | |
266 | Summary: Server side daemon & driver required to run Microsoft Hyper-V guests | |
267 | Group: Development/Libraries | |
268 | Requires: %{name}-daemon = %{version}-%{release} | |
269 | Provides: libvirt(hypervisor) | |
270 | ||
271 | %description daemon-hyperv | |
272 | Server side daemon and driver required to manage the virtualization | |
273 | capabilities of the Microsoft Hyper-V emulators | |
274 | ||
275 | %package daemon-libxl | |
276 | Summary: Server side daemon & driver required to run XEN guests (xenlight) | |
277 | Group: Development/Libraries | |
278 | Requires: %{name}-daemon = %{version}-%{release} | |
279 | Requires: /usr/sbin/qcow-create | |
280 | Requires: xen | |
281 | Provides: libvirt(hypervisor) | |
282 | ||
283 | %description daemon-libxl | |
284 | Server side daemon and driver required to manage the virtualization | |
285 | capabilities of XEN via xenlight interface | |
286 | ||
287 | %package daemon-lxc | |
288 | Summary: Server side daemon & driver required to run LXC guests | |
289 | Group: Development/Libraries | |
290 | Requires: %{name}-daemon = %{version}-%{release} | |
291 | Provides: libvirt(hypervisor) | |
292 | ||
293 | %description daemon-lxc | |
294 | Server side daemon and driver required to manage the virtualization | |
295 | capabilities of LXC | |
296 | ||
297 | %package daemon-openvz | |
298 | Summary: Server side daemon & driver required to run OpenVZ guests | |
299 | Group: Development/Libraries | |
300 | Requires: %{name}-daemon = %{version}-%{release} | |
301 | Provides: libvirt(hypervisor) | |
302 | ||
303 | %description daemon-openvz | |
304 | Server side daemon and driver required to manage the virtualization | |
305 | capabilities of OpenVZ | |
306 | ||
307 | %package daemon-phyp | |
308 | Summary: Server side daemon & driver required to run Power Hypervisors guests | |
309 | Group: Development/Libraries | |
310 | Requires: %{name}-daemon = %{version}-%{release} | |
311 | Provides: libvirt(hypervisor) | |
312 | ||
313 | %description daemon-phyp | |
314 | Server side daemon and driver required to manage the virtualization | |
315 | capabilities of Power Hypervisors | |
316 | ||
317 | %package daemon-qemu | |
318 | Summary: Server side daemon & driver required to run QEMU guests | |
319 | Group: Development/Libraries | |
320 | Requires: %{name}-daemon = %{version}-%{release} | |
321 | Requires: /usr/bin/qemu-img | |
322 | Requires: qemu | |
323 | Requires: bzip2 | |
324 | Requires: gzip | |
325 | Requires: lzop | |
326 | Requires: xz | |
327 | Provides: libvirt(hypervisor) | |
328 | ||
329 | %description daemon-qemu | |
330 | Server side daemon and driver required to manage the virtualization | |
331 | capabilities of the QEMU emulators | |
332 | ||
333 | %package daemon-uml | |
334 | Summary: Server side daemon & driver required to run UML guests | |
335 | Group: Development/Libraries | |
336 | Requires: %{name}-daemon = %{version}-%{release} | |
337 | Provides: libvirt(hypervisor) | |
338 | ||
339 | %description daemon-uml | |
340 | Server side daemon and driver required to manage the virtualization | |
341 | capabilities of UML | |
342 | ||
343 | %package daemon-vbox | |
344 | Summary: Server side daemon & driver required to run Oracle VirtualBox guests | |
345 | Group: Development/Libraries | |
346 | Requires: %{name}-daemon = %{version}-%{release} | |
347 | Provides: libvirt(hypervisor) | |
348 | ||
349 | %description daemon-vbox | |
350 | Server side daemon and driver required to manage the virtualization | |
351 | capabilities of Oracle VirtualBox | |
352 | ||
353 | %package daemon-vmware | |
354 | Summary: Server side daemon & driver required to run VMware Workstation guests | |
355 | Group: Development/Libraries | |
356 | Requires: %{name}-daemon = %{version}-%{release} | |
357 | Provides: libvirt(hypervisor) | |
358 | ||
359 | %description daemon-vmware | |
360 | Server side daemon and driver required to manage the virtualization | |
361 | capabilities of VMware Workstation | |
362 | ||
363 | %package daemon-xen | |
364 | Summary: Server side daemon & driver required to run XEN guests | |
365 | Group: Development/Libraries | |
366 | Requires: %{name}-daemon = %{version}-%{release} | |
367 | Requires: /usr/sbin/qcow-create | |
368 | Requires: xen | |
369 | Requires: xen-xend | |
370 | Provides: libvirt(hypervisor) | |
371 | ||
372 | %description daemon-xen | |
373 | Server side daemon and driver required to manage the virtualization | |
374 | capabilities of XEN | |
375 | ||
376 | %package client | |
377 | Summary: Client side library and utilities of the libvirt library | |
378 | Group: Applications/System | |
379 | Requires: gettext >= 0.18.1.1-6 | |
380 | Requires: gnutls >= 1.0.25 | |
381 | Requires: netcat-openbsd | |
382 | Requires(post): systemd-units | |
383 | Requires(preun): systemd-units | |
384 | Requires(postun): systemd-units | |
385 | ||
386 | %description client | |
387 | Shared libraries and client binaries needed to access to the | |
388 | virtualization capabilities of recent versions of Linux (and other | |
389 | OSes). | |
390 | ||
391 | %package utils | |
392 | Summary: Tools to interact with virtualization capabilities | |
393 | Summary(pl.UTF-8): Narzędzia do współpracy z funkcjami wirtualizacyjnymi | |
394 | Group: Applications/System | |
395 | Requires: %{name}-client = %{version}-%{release} | |
396 | Requires: %{name}-daemon = %{version}-%{release} | |
397 | Requires: %{name}-daemon-esx = %{version}-%{release} | |
398 | Requires: %{name}-daemon-hyperv = %{version}-%{release} | |
399 | Requires: %{name}-daemon-libxl = %{version}-%{release} | |
400 | Requires: %{name}-daemon-lxc = %{version}-%{release} | |
401 | Requires: %{name}-daemon-openvz = %{version}-%{release} | |
402 | Requires: %{name}-daemon-phyp = %{version}-%{release} | |
403 | Requires: %{name}-daemon-qemu = %{version}-%{release} | |
404 | Requires: %{name}-daemon-uml = %{version}-%{release} | |
405 | Requires: %{name}-daemon-vbox = %{version}-%{release} | |
406 | Requires: %{name}-daemon-vmware = %{version}-%{release} | |
407 | Requires: %{name}-daemon-xen = %{version}-%{release} | |
408 | ||
94462445 ER |
409 | %description utils |
410 | Libvirt is a C toolkit to interact with the virtualization | |
411 | capabilities of recent versions of Linux. | |
412 | ||
413 | This package contains tools for the libvirt library. | |
414 | ||
148a9af3 | 415 | %description utils -l pl.UTF-8 |
423a0b96 JR |
416 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami wirtualizacji |
417 | obecnych wersji Linuksa. | |
148a9af3 JB |
418 | |
419 | Ten pakiet zawiera narzędzia do biblioteki libvirt. | |
420 | ||
94462445 ER |
421 | %prep |
422 | %setup -q | |
5296d739 | 423 | %patch0 -p1 |
a5db73fd | 424 | %patch1 -p1 |
d6de3d6a | 425 | %patch2 -p1 |
c8f65936 | 426 | %patch3 -p1 |
87bef338 | 427 | %patch4 -p1 |
423a0b96 | 428 | %patch5 -p1 |
5296d739 | 429 | |
2c74cc69 | 430 | # weird translations |
5296d739 | 431 | %{__rm} po/{my,eu_ES}.{po,gmo} |
94462445 | 432 | |
01260398 AF |
433 | mv po/vi_VN.po po/vi.po |
434 | mv po/vi_VN.gmo po/vi.gmo | |
435 | ||
94462445 | 436 | %build |
4e034fd2 AF |
437 | %{__libtoolize} |
438 | %{__aclocal} -I gnulib/m4 -I m4 | |
4e034fd2 | 439 | %{__autoconf} |
7ce5923d | 440 | %{__autoheader} |
4e034fd2 AF |
441 | %{__automake} |
442 | ||
443 | %configure \ | |
624d0ccc | 444 | PVCREATE=/sbin/pvcreate \ |
445 | VGCREATE=/sbin/vgcreate \ | |
446 | LVCREATE=/sbin/lvcreate \ | |
447 | PVREMOVE=/sbin/pvremove \ | |
448 | VGREMOVE=/sbin/vgremove \ | |
449 | LVREMOVE=/sbin/lvremove \ | |
450 | VGCHANGE=/sbin/vgchange \ | |
a1550d89 | 451 | LVCHANGE=/sbin/lvchange \ |
624d0ccc | 452 | VGSCAN=/sbin/vgscan \ |
453 | PVS=/sbin/pvs \ | |
454 | VGS=/sbin/vgs \ | |
455 | LVS=/sbin/lvs \ | |
7ce5923d | 456 | TC=/sbin/tc \ |
624d0ccc | 457 | BRCTL=/sbin/brctl \ |
5cbe4501 | 458 | ISCSIADM=/sbin/iscsiadm \ |
459 | SHOWMOUNT=/usr/sbin/showmount \ | |
7ce5923d JB |
460 | MOUNT=/bin/mount \ |
461 | UMOUNT=/bin/umount \ | |
462 | MKFS=/sbin/mkfs \ | |
36a3330a | 463 | SHOWMOUNT=/usr/sbin/showmount \ |
464 | IPTABLES_PATH=/usr/sbin/iptables \ | |
465 | IP6TABLES_PATH=/usr/sbin/ip6tables \ | |
d9fa538f | 466 | EBTABLES_PATH=/usr/sbin/ebtables \ |
7ce5923d JB |
467 | ISCSIADM=/sbin/iscsiadm \ |
468 | DNSMASQ=/usr/sbin/dnsmasq \ | |
469 | RADVD=/usr/sbin/radvd \ | |
470 | UDEVADM=/sbin/udevadm \ | |
621ed3d1 | 471 | MODPROBE=/sbin/modprobe \ |
bf949ec1 | 472 | SCRUB=/usr/bin/scrub \ |
f4fa2857 | 473 | OVSVSCTL=/usr/bin/ovs-vsctl \ |
423a0b96 | 474 | NUMAD=/usr/bin/numad \ |
621ed3d1 JB |
475 | --disable-silent-rules \ |
476 | --with-html-dir=%{_gtkdocdir} \ | |
477 | --with-html-subdir=%{name} \ | |
478 | --with-init-script=redhat \ | |
479 | --with-storage-lvm \ | |
bf949ec1 JR |
480 | --with-storage-fs \ |
481 | --with-storage-iscsi \ | |
482 | --with-storage-scsi \ | |
483 | --with-storage-mpath \ | |
484 | --with-storage-disk \ | |
485 | --with-macvtap \ | |
486 | --with-virtualport \ | |
621ed3d1 | 487 | --with-udev \ |
423a0b96 JR |
488 | --with-libssh2 \ |
489 | --with-avahi \ | |
490 | --with-audit \ | |
491 | --with-libblkid \ | |
492 | --with-macvtap \ | |
493 | --with-virtualport \ | |
494 | --with-numad \ | |
495 | --with-numactl \ | |
496 | --with-sasl \ | |
497 | --with-yajl \ | |
498 | --with-selinux \ | |
499 | --with-apparmor \ | |
500 | --with-qemu-user=qemu \ | |
501 | --with-qemu-group=qemu \ | |
621ed3d1 | 502 | --without-hal \ |
423a0b96 JR |
503 | --with-driver-modules \ |
504 | %{__with_without polkit} \ | |
505 | %{__with_without esx} \ | |
506 | %{__with_without hyperv} \ | |
507 | %{__with_without libxl} \ | |
508 | %{__with_without lxc} \ | |
509 | %{__with_without netcf} \ | |
510 | %{__with_without openvz} \ | |
511 | %{__with_without phyp} \ | |
512 | %{__with_without qemu} \ | |
513 | %{__with_without sanlock} \ | |
514 | %{__with_without uml} \ | |
515 | %{__with_without vbox vbox %{_libdir}/VirtualBox} \ | |
516 | %{__with_without vmware} \ | |
517 | %{__with_without xen} \ | |
518 | %{__with_without xenapi} \ | |
bf949ec1 JR |
519 | --x-libraries=%{_libdir} \ |
520 | --with-init-script=systemd | |
7ce5923d JB |
521 | |
522 | %{__make} \ | |
523 | AWK=gawk | |
94462445 ER |
524 | |
525 | %install | |
526 | rm -rf $RPM_BUILD_ROOT | |
ed4dd5b7 | 527 | install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d} \ |
423a0b96 | 528 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
ed4dd5b7 | 529 | |
94462445 | 530 | %{__make} install \ |
46ab7552 | 531 | DEVHELP_DIR=%{_gtkdocdir}/%{name}/devhelp \ |
94462445 ER |
532 | DESTDIR=$RPM_BUILD_ROOT |
533 | ||
e285e5e5 | 534 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/libvirtd |
423a0b96 | 535 | install %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
e285e5e5 | 536 | |
5296d739 JB |
537 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
538 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
539 | %py_postclean | |
7f159b90 | 540 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la |
5296d739 | 541 | |
423a0b96 JR |
542 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la |
543 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.{a,la} | |
544 | ||
621ed3d1 JB |
545 | %if %{with sanlock} |
546 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.{a,la} | |
547 | %endif | |
548 | ||
94462445 ER |
549 | %find_lang %{name} |
550 | ||
551 | %clean | |
552 | rm -rf $RPM_BUILD_ROOT | |
553 | ||
5296d739 JB |
554 | %post -p /sbin/ldconfig |
555 | %postun -p /sbin/ldconfig | |
94462445 | 556 | |
423a0b96 | 557 | %post daemon |
bf949ec1 | 558 | %systemd_post libvirtd.service |
423a0b96 JR |
559 | |
560 | %preun daemon | |
561 | %systemd_preun libvirtd.service | |
562 | ||
563 | %postun daemon | |
564 | %systemd_reload | |
565 | ||
566 | %post client | |
bf949ec1 JR |
567 | NORESTART=1 |
568 | %systemd_post libvirt-guests.service | |
569 | ||
423a0b96 | 570 | %preun client |
bf949ec1 JR |
571 | %systemd_preun libvirt-guests.service |
572 | ||
423a0b96 | 573 | %postun client |
bf949ec1 JR |
574 | %systemd_reload |
575 | ||
94462445 ER |
576 | %files -f %{name}.lang |
577 | %defattr(644,root,root,755) | |
578 | %doc ChangeLog README TODO NEWS | |
423a0b96 | 579 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/libvirt.conf |
5296d739 JB |
580 | %attr(755,root,root) %{_libdir}/libvirt.so.*.*.* |
581 | %attr(755,root,root) %ghost %{_libdir}/libvirt.so.0 | |
423a0b96 | 582 | %if %{with qemu} |
5296d739 JB |
583 | %attr(755,root,root) %{_libdir}/libvirt-qemu.so.*.*.* |
584 | %attr(755,root,root) %ghost %{_libdir}/libvirt-qemu.so.0 | |
fa6419a6 | 585 | %endif |
423a0b96 | 586 | %dir %{_libdir}/libvirt |
3ac3cd0c | 587 | |
621ed3d1 JB |
588 | %if %{with sanlock} |
589 | %files lock-sanlock | |
423a0b96 | 590 | %defattr(644,root,root,755) |
621ed3d1 | 591 | %attr(755,root,root) %{_sbindir}/virt-sanlock-cleanup |
423a0b96 | 592 | %dir %{_libdir}/libvirt/lock-driver |
621ed3d1 | 593 | %attr(755,root,root) %{_libdir}/libvirt/lock-driver/sanlock.so |
423a0b96 JR |
594 | %{_datadir}/augeas/lenses/libvirt_sanlock.aug |
595 | %{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug | |
621ed3d1 JB |
596 | %dir /var/lib/libvirt/sanlock |
597 | %{_mandir}/man8/virt-sanlock-cleanup.8* | |
423a0b96 | 598 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu-sanlock.conf |
621ed3d1 JB |
599 | %endif |
600 | ||
94462445 ER |
601 | %files devel |
602 | %defattr(644,root,root,755) | |
5296d739 JB |
603 | %attr(755,root,root) %{_libdir}/libvirt.so |
604 | %attr(755,root,root) %{_libdir}/libvirt-qemu.so | |
f4fa2857 | 605 | %{_datadir}/%{name}/api |
5296d739 JB |
606 | %{_gtkdocdir}/%{name} |
607 | %{_includedir}/%{name} | |
94462445 ER |
608 | %{_pkgconfigdir}/%{name}.pc |
609 | ||
610 | %files static | |
611 | %defattr(644,root,root,755) | |
5296d739 JB |
612 | %{_libdir}/libvirt.a |
613 | %{_libdir}/libvirt-qemu.a | |
94462445 ER |
614 | |
615 | %files -n python-%{name} | |
616 | %defattr(644,root,root,755) | |
617 | %doc %{_docdir}/%{name}-python-%{version} | |
a73c464c AM |
618 | %attr(755,root,root) %{py_sitedir}/libvirtmod.so |
619 | %attr(755,root,root) %{py_sitedir}/libvirtmod_qemu.so | |
5296d739 JB |
620 | %{py_sitedir}/libvirt.py[co] |
621 | %{py_sitedir}/libvirt_qemu.py[co] | |
94462445 | 622 | |
423a0b96 | 623 | %files daemon |
94462445 | 624 | %defattr(644,root,root,755) |
423a0b96 JR |
625 | %doc docs/*.xml |
626 | %dir %{_sysconfdir}/libvirt | |
627 | %dir %attr(700,root,root) %{_sysconfdir}/libvirt/nwfilter | |
628 | %dir %attr(700,root,root) %{_sysconfdir}/libvirt/qemu | |
629 | %dir %attr(700,root,root) %{_sysconfdir}/libvirt/qemu/networks | |
630 | %dir %attr(700,root,root) %{_sysconfdir}/libvirt/qemu/networks/autostart | |
631 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/libvirtd.conf | |
632 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu/networks/default.xml | |
633 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml | |
634 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/nwfilter/*.xml | |
72b1baa0 | 635 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sasl/libvirt.conf |
e285e5e5 | 636 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirtd |
bf949ec1 | 637 | %attr(754,root,root) /etc/rc.d/init.d/libvirtd |
bf949ec1 | 638 | %{systemdunitdir}/libvirtd.service |
bf949ec1 | 639 | %config(noreplace) %verify(not md5 mtime size) /etc/sysctl.d/libvirtd |
423a0b96 JR |
640 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd |
641 | %attr(755,root,root) %{_libdir}/libvirt_iohelper | |
621ed3d1 | 642 | %attr(755,root,root) %{_libdir}/libvirt_parthelper |
423a0b96 JR |
643 | %attr(755,root,root) %{_libdir}/virt-aa-helper |
644 | %attr(755,root,root) %{_sbindir}/libvirtd | |
645 | %{_datadir}/augeas/lenses/libvirtd.aug | |
646 | %{_datadir}/augeas/lenses/tests/test_libvirtd.aug | |
5296d739 | 647 | %{?with_polkit:%{_datadir}/polkit-1/actions/org.libvirt.unix.policy} |
e4177f0c | 648 | %{_mandir}/man8/libvirtd.8* |
d5a575f6 | 649 | %dir /var/lib/libvirt |
621ed3d1 | 650 | %dir /var/lib/libvirt/dnsmasq |
423a0b96 | 651 | %attr(711,root,root) %dir /var/lib/libvirt/boot |
621ed3d1 | 652 | %attr(700,root,root) %dir /var/lib/libvirt/network |
423a0b96 JR |
653 | %attr(711,root,root) %dir /var/lib/libvirt/images |
654 | %attr(711,root,root) %dir /var/lib/libvirt/filesystems | |
655 | %attr(700,root,root) %dir /var/log/libvirt | |
656 | %attr(711,root,root) %dir /var/cache/libvirt | |
621ed3d1 | 657 | %dir /var/run/libvirt |
423a0b96 JR |
658 | %dir /var/run/libvirt/network |
659 | %{systemdtmpfilesdir}/%{name}.conf | |
660 | %dir %{_libdir}/libvirt/connection-driver | |
273917b1 JR |
661 | %{?with_netcf:%attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_interface.so} |
662 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_network.so | |
663 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_nodedev.so | |
664 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_nwfilter.so | |
665 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_secret.so | |
666 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_storage.so | |
667 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_test.so | |
423a0b96 JR |
668 | |
669 | %if %{with_esx} | |
670 | %files daemon-esx | |
671 | %defattr(644,root,root,755) | |
273917b1 | 672 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_esx.so |
423a0b96 JR |
673 | %endif |
674 | ||
675 | %if %{with_hyperv} | |
676 | %files daemon-hyperv | |
677 | %defattr(644,root,root,755) | |
273917b1 | 678 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_hyperv.so |
423a0b96 JR |
679 | %endif |
680 | ||
681 | %if %{with_libxl} | |
682 | %files daemon-libxl | |
683 | %defattr(644,root,root,755) | |
273917b1 | 684 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_libxl.so |
423a0b96 JR |
685 | %attr(700,root,root) %dir /var/lib/libvirt/libxl |
686 | %attr(700,root,root) %dir /var/run/libvirt/libxl | |
687 | %attr(700,root,root) %dir /var/log/libvirt/libxl | |
688 | %endif | |
689 | ||
690 | %if %{with_lxc} | |
691 | %files daemon-lxc | |
692 | %defattr(644,root,root,755) | |
693 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/lxc.conf | |
694 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.lxc | |
695 | %attr(700,root,root) %dir /var/lib/libvirt/lxc | |
621ed3d1 | 696 | %attr(700,root,root) %dir /var/run/libvirt/lxc |
423a0b96 JR |
697 | %attr(700,root,root) %dir /var/log/libvirt/lxc |
698 | %{_datadir}/augeas/lenses/libvirtd_lxc.aug | |
699 | %{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug | |
700 | %attr(755,root,root) %{_libdir}/libvirt_lxc | |
273917b1 | 701 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_lxc.so |
423a0b96 JR |
702 | %endif |
703 | ||
704 | %if %{with_openvz} | |
705 | %files daemon-openvz | |
706 | %defattr(644,root,root,755) | |
273917b1 | 707 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_openvz.so |
423a0b96 JR |
708 | %endif |
709 | ||
710 | %if %{with_phyp} | |
711 | %files daemon-phyp | |
712 | %defattr(644,root,root,755) | |
273917b1 | 713 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_phyp.so |
423a0b96 JR |
714 | %endif |
715 | ||
621ed3d1 | 716 | %if %{with qemu} |
423a0b96 JR |
717 | %files daemon-qemu |
718 | %defattr(644,root,root,755) | |
719 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu.conf | |
720 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.qemu | |
721 | %attr(750,qemu,qemu) %dir /var/cache/libvirt/qemu | |
722 | %attr(750,qemu,qemu) %dir /var/lib/libvirt/qemu | |
621ed3d1 JB |
723 | %attr(700,root,root) %dir /var/log/libvirt/qemu |
724 | %attr(700,root,root) %dir /var/run/libvirt/qemu | |
423a0b96 JR |
725 | %{_datadir}/augeas/lenses/libvirtd_qemu.aug |
726 | %{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug | |
273917b1 | 727 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_qemu.so |
423a0b96 JR |
728 | %endif |
729 | ||
730 | %if %{with_uml} | |
731 | %files daemon-uml | |
732 | %defattr(644,root,root,755) | |
273917b1 | 733 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_uml.so |
423a0b96 JR |
734 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.uml |
735 | %attr(700,root,root) %dir /var/lib/libvirt/uml | |
736 | %attr(700,root,root) %dir /var/run/libvirt/uml | |
737 | %attr(700,root,root) %dir /var/log/libvirt/uml | |
621ed3d1 | 738 | %endif |
423a0b96 JR |
739 | |
740 | %if %{with_vbox} | |
741 | %files daemon-vbox | |
742 | %defattr(644,root,root,755) | |
273917b1 | 743 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_vbox.so |
423a0b96 JR |
744 | %endif |
745 | ||
746 | %if %{with_vmware} | |
747 | %files daemon-vmware | |
748 | %defattr(644,root,root,755) | |
273917b1 | 749 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_vmware.so |
423a0b96 JR |
750 | %endif |
751 | ||
752 | %if %{with_xen} | |
753 | %files daemon-xen | |
754 | %defattr(644,root,root,755) | |
273917b1 | 755 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_xen.so |
423a0b96 JR |
756 | %endif |
757 | ||
758 | %files client | |
759 | %defattr(644,root,root,755) | |
760 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirt-guests | |
761 | %attr(754,root,root) /etc/rc.d/init.d/libvirt-guests | |
762 | %{systemdunitdir}/libvirt-guests.service | |
763 | %attr(755,root,root) %{_bindir}/virsh | |
764 | %attr(755,root,root) %{_bindir}/virt-host-validate | |
765 | %attr(755,root,root) %{_bindir}/virt-xml-validate | |
766 | %attr(755,root,root) %{_bindir}/virt-pki-validate | |
767 | %{_mandir}/man1/virsh.1* | |
768 | %{_mandir}/man1/virt-host-validate.1* | |
769 | %{_mandir}/man1/virt-xml-validate.1* | |
770 | %{_mandir}/man1/virt-pki-validate.1* | |
771 | %dir %{_datadir}/libvirt | |
772 | %{_datadir}/libvirt/cpu_map.xml | |
773 | %dir %{_datadir}/libvirt/schemas | |
774 | %{_datadir}/libvirt/schemas/basictypes.rng | |
775 | %{_datadir}/libvirt/schemas/capability.rng | |
776 | %{_datadir}/libvirt/schemas/domain.rng | |
777 | %{_datadir}/libvirt/schemas/domaincommon.rng | |
778 | %{_datadir}/libvirt/schemas/domainsnapshot.rng | |
779 | %{_datadir}/libvirt/schemas/interface.rng | |
780 | %{_datadir}/libvirt/schemas/network.rng | |
781 | %{_datadir}/libvirt/schemas/networkcommon.rng | |
782 | %{_datadir}/libvirt/schemas/nodedev.rng | |
783 | %{_datadir}/libvirt/schemas/nwfilter.rng | |
784 | %{_datadir}/libvirt/schemas/secret.rng | |
785 | %{_datadir}/libvirt/schemas/storageencryption.rng | |
786 | %{_datadir}/libvirt/schemas/storagepool.rng | |
787 | %{_datadir}/libvirt/schemas/storagevol.rng | |
788 | ||
789 | %files utils | |
790 | %defattr(644,root,root,755) |