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