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