]>
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 |
2d6e7f7e JB |
30 | Version: 0.10.1 |
31 | Release: 0.1 | |
148a9af3 | 32 | License: LGPL v2.1+ |
423a0b96 | 33 | Group: Libraries |
21f7b4fc | 34 | Source0: ftp://ftp.libvirt.org/libvirt/%{name}-%{version}.tar.gz |
2d6e7f7e | 35 | # Source0-md5: 5f628e53437b0b0e78477904ba3310af |
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 |
2d6e7f7e JB |
401 | # TODO |
402 | #patch1 -p1 | |
d6de3d6a | 403 | %patch2 -p1 |
c8f65936 | 404 | %patch3 -p1 |
5296d739 | 405 | |
2c74cc69 | 406 | # weird translations |
5296d739 | 407 | %{__rm} po/{my,eu_ES}.{po,gmo} |
94462445 | 408 | |
01260398 AF |
409 | mv po/vi_VN.po po/vi.po |
410 | mv po/vi_VN.gmo po/vi.gmo | |
411 | ||
94462445 | 412 | %build |
4e034fd2 AF |
413 | %{__libtoolize} |
414 | %{__aclocal} -I gnulib/m4 -I m4 | |
4e034fd2 | 415 | %{__autoconf} |
7ce5923d | 416 | %{__autoheader} |
4e034fd2 AF |
417 | %{__automake} |
418 | ||
419 | %configure \ | |
624d0ccc | 420 | PVCREATE=/sbin/pvcreate \ |
421 | VGCREATE=/sbin/vgcreate \ | |
422 | LVCREATE=/sbin/lvcreate \ | |
423 | PVREMOVE=/sbin/pvremove \ | |
424 | VGREMOVE=/sbin/vgremove \ | |
425 | LVREMOVE=/sbin/lvremove \ | |
426 | VGCHANGE=/sbin/vgchange \ | |
a1550d89 | 427 | LVCHANGE=/sbin/lvchange \ |
624d0ccc | 428 | VGSCAN=/sbin/vgscan \ |
429 | PVS=/sbin/pvs \ | |
430 | VGS=/sbin/vgs \ | |
431 | LVS=/sbin/lvs \ | |
7ce5923d | 432 | TC=/sbin/tc \ |
624d0ccc | 433 | BRCTL=/sbin/brctl \ |
5cbe4501 | 434 | ISCSIADM=/sbin/iscsiadm \ |
435 | SHOWMOUNT=/usr/sbin/showmount \ | |
7ce5923d JB |
436 | MOUNT=/bin/mount \ |
437 | UMOUNT=/bin/umount \ | |
438 | MKFS=/sbin/mkfs \ | |
36a3330a | 439 | SHOWMOUNT=/usr/sbin/showmount \ |
440 | IPTABLES_PATH=/usr/sbin/iptables \ | |
441 | IP6TABLES_PATH=/usr/sbin/ip6tables \ | |
d9fa538f | 442 | EBTABLES_PATH=/usr/sbin/ebtables \ |
7ce5923d JB |
443 | ISCSIADM=/sbin/iscsiadm \ |
444 | DNSMASQ=/usr/sbin/dnsmasq \ | |
445 | RADVD=/usr/sbin/radvd \ | |
446 | UDEVADM=/sbin/udevadm \ | |
621ed3d1 | 447 | MODPROBE=/sbin/modprobe \ |
bf949ec1 | 448 | SCRUB=/usr/bin/scrub \ |
f4fa2857 | 449 | OVSVSCTL=/usr/bin/ovs-vsctl \ |
423a0b96 | 450 | NUMAD=/usr/bin/numad \ |
621ed3d1 JB |
451 | --disable-silent-rules \ |
452 | --with-html-dir=%{_gtkdocdir} \ | |
453 | --with-html-subdir=%{name} \ | |
454 | --with-init-script=redhat \ | |
455 | --with-storage-lvm \ | |
bf949ec1 JR |
456 | --with-storage-fs \ |
457 | --with-storage-iscsi \ | |
458 | --with-storage-scsi \ | |
459 | --with-storage-mpath \ | |
460 | --with-storage-disk \ | |
461 | --with-macvtap \ | |
462 | --with-virtualport \ | |
621ed3d1 | 463 | --with-udev \ |
423a0b96 JR |
464 | --with-libssh2 \ |
465 | --with-avahi \ | |
466 | --with-audit \ | |
467 | --with-libblkid \ | |
468 | --with-macvtap \ | |
469 | --with-virtualport \ | |
470 | --with-numad \ | |
471 | --with-numactl \ | |
472 | --with-sasl \ | |
473 | --with-yajl \ | |
474 | --with-selinux \ | |
475 | --with-apparmor \ | |
476 | --with-qemu-user=qemu \ | |
477 | --with-qemu-group=qemu \ | |
621ed3d1 | 478 | --without-hal \ |
423a0b96 JR |
479 | --with-driver-modules \ |
480 | %{__with_without polkit} \ | |
481 | %{__with_without esx} \ | |
482 | %{__with_without hyperv} \ | |
483 | %{__with_without libxl} \ | |
484 | %{__with_without lxc} \ | |
485 | %{__with_without netcf} \ | |
486 | %{__with_without openvz} \ | |
487 | %{__with_without phyp} \ | |
488 | %{__with_without qemu} \ | |
489 | %{__with_without sanlock} \ | |
490 | %{__with_without uml} \ | |
491 | %{__with_without vbox vbox %{_libdir}/VirtualBox} \ | |
492 | %{__with_without vmware} \ | |
493 | %{__with_without xen} \ | |
494 | %{__with_without xenapi} \ | |
bf949ec1 JR |
495 | --x-libraries=%{_libdir} \ |
496 | --with-init-script=systemd | |
7ce5923d JB |
497 | |
498 | %{__make} \ | |
499 | AWK=gawk | |
94462445 ER |
500 | |
501 | %install | |
502 | rm -rf $RPM_BUILD_ROOT | |
ed4dd5b7 | 503 | install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d} \ |
423a0b96 | 504 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
ed4dd5b7 | 505 | |
94462445 | 506 | %{__make} install \ |
46ab7552 | 507 | DEVHELP_DIR=%{_gtkdocdir}/%{name}/devhelp \ |
94462445 ER |
508 | DESTDIR=$RPM_BUILD_ROOT |
509 | ||
e285e5e5 | 510 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/libvirtd |
423a0b96 | 511 | install %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
e285e5e5 | 512 | |
5296d739 JB |
513 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
514 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
515 | %py_postclean | |
7f159b90 | 516 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la |
5296d739 | 517 | |
423a0b96 JR |
518 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la |
519 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.{a,la} | |
520 | ||
621ed3d1 JB |
521 | %if %{with sanlock} |
522 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.{a,la} | |
523 | %endif | |
524 | ||
94462445 ER |
525 | %find_lang %{name} |
526 | ||
527 | %clean | |
528 | rm -rf $RPM_BUILD_ROOT | |
529 | ||
5296d739 JB |
530 | %post -p /sbin/ldconfig |
531 | %postun -p /sbin/ldconfig | |
94462445 | 532 | |
423a0b96 | 533 | %post daemon |
bf949ec1 | 534 | %systemd_post libvirtd.service |
423a0b96 JR |
535 | |
536 | %preun daemon | |
537 | %systemd_preun libvirtd.service | |
538 | ||
539 | %postun daemon | |
540 | %systemd_reload | |
541 | ||
542 | %post client | |
bf949ec1 JR |
543 | NORESTART=1 |
544 | %systemd_post libvirt-guests.service | |
545 | ||
423a0b96 | 546 | %preun client |
bf949ec1 JR |
547 | %systemd_preun libvirt-guests.service |
548 | ||
423a0b96 | 549 | %postun client |
bf949ec1 JR |
550 | %systemd_reload |
551 | ||
94462445 ER |
552 | %files -f %{name}.lang |
553 | %defattr(644,root,root,755) | |
554 | %doc ChangeLog README TODO NEWS | |
cf4bec93 | 555 | %dir %{_sysconfdir}/libvirt |
423a0b96 | 556 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/libvirt.conf |
5296d739 JB |
557 | %attr(755,root,root) %{_libdir}/libvirt.so.*.*.* |
558 | %attr(755,root,root) %ghost %{_libdir}/libvirt.so.0 | |
423a0b96 | 559 | %if %{with qemu} |
5296d739 JB |
560 | %attr(755,root,root) %{_libdir}/libvirt-qemu.so.*.*.* |
561 | %attr(755,root,root) %ghost %{_libdir}/libvirt-qemu.so.0 | |
fa6419a6 | 562 | %endif |
423a0b96 | 563 | %dir %{_libdir}/libvirt |
c47719f5 | 564 | %dir %{_datadir}/libvirt |
3ac3cd0c | 565 | |
94462445 ER |
566 | %files devel |
567 | %defattr(644,root,root,755) | |
5296d739 JB |
568 | %attr(755,root,root) %{_libdir}/libvirt.so |
569 | %attr(755,root,root) %{_libdir}/libvirt-qemu.so | |
f4fa2857 | 570 | %{_datadir}/%{name}/api |
5296d739 JB |
571 | %{_gtkdocdir}/%{name} |
572 | %{_includedir}/%{name} | |
94462445 ER |
573 | %{_pkgconfigdir}/%{name}.pc |
574 | ||
575 | %files static | |
576 | %defattr(644,root,root,755) | |
5296d739 JB |
577 | %{_libdir}/libvirt.a |
578 | %{_libdir}/libvirt-qemu.a | |
94462445 ER |
579 | |
580 | %files -n python-%{name} | |
581 | %defattr(644,root,root,755) | |
582 | %doc %{_docdir}/%{name}-python-%{version} | |
a73c464c AM |
583 | %attr(755,root,root) %{py_sitedir}/libvirtmod.so |
584 | %attr(755,root,root) %{py_sitedir}/libvirtmod_qemu.so | |
5296d739 JB |
585 | %{py_sitedir}/libvirt.py[co] |
586 | %{py_sitedir}/libvirt_qemu.py[co] | |
94462445 | 587 | |
cf4bec93 JB |
588 | %if %{with sanlock} |
589 | %files lock-sanlock | |
590 | %defattr(644,root,root,755) | |
591 | %attr(755,root,root) %{_sbindir}/virt-sanlock-cleanup | |
592 | %dir %{_libdir}/libvirt/lock-driver | |
593 | %attr(755,root,root) %{_libdir}/libvirt/lock-driver/sanlock.so | |
594 | %{_datadir}/augeas/lenses/libvirt_sanlock.aug | |
595 | %{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug | |
596 | %dir /var/lib/libvirt/sanlock | |
597 | %{_mandir}/man8/virt-sanlock-cleanup.8* | |
598 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu-sanlock.conf | |
599 | %endif | |
600 | ||
423a0b96 | 601 | %files daemon |
94462445 | 602 | %defattr(644,root,root,755) |
423a0b96 | 603 | %doc docs/*.xml |
423a0b96 JR |
604 | %dir %attr(700,root,root) %{_sysconfdir}/libvirt/nwfilter |
605 | %dir %attr(700,root,root) %{_sysconfdir}/libvirt/qemu | |
606 | %dir %attr(700,root,root) %{_sysconfdir}/libvirt/qemu/networks | |
607 | %dir %attr(700,root,root) %{_sysconfdir}/libvirt/qemu/networks/autostart | |
608 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/libvirtd.conf | |
609 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu/networks/default.xml | |
610 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml | |
611 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/nwfilter/*.xml | |
72b1baa0 | 612 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sasl/libvirt.conf |
e285e5e5 | 613 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirtd |
bf949ec1 | 614 | %attr(754,root,root) /etc/rc.d/init.d/libvirtd |
bf949ec1 | 615 | %{systemdunitdir}/libvirtd.service |
bf949ec1 | 616 | %config(noreplace) %verify(not md5 mtime size) /etc/sysctl.d/libvirtd |
423a0b96 JR |
617 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd |
618 | %attr(755,root,root) %{_libdir}/libvirt_iohelper | |
621ed3d1 | 619 | %attr(755,root,root) %{_libdir}/libvirt_parthelper |
423a0b96 JR |
620 | %attr(755,root,root) %{_libdir}/virt-aa-helper |
621 | %attr(755,root,root) %{_sbindir}/libvirtd | |
622 | %{_datadir}/augeas/lenses/libvirtd.aug | |
623 | %{_datadir}/augeas/lenses/tests/test_libvirtd.aug | |
5296d739 | 624 | %{?with_polkit:%{_datadir}/polkit-1/actions/org.libvirt.unix.policy} |
e4177f0c | 625 | %{_mandir}/man8/libvirtd.8* |
d5a575f6 | 626 | %dir /var/lib/libvirt |
621ed3d1 | 627 | %dir /var/lib/libvirt/dnsmasq |
423a0b96 | 628 | %attr(711,root,root) %dir /var/lib/libvirt/boot |
621ed3d1 | 629 | %attr(700,root,root) %dir /var/lib/libvirt/network |
423a0b96 JR |
630 | %attr(711,root,root) %dir /var/lib/libvirt/images |
631 | %attr(711,root,root) %dir /var/lib/libvirt/filesystems | |
632 | %attr(700,root,root) %dir /var/log/libvirt | |
633 | %attr(711,root,root) %dir /var/cache/libvirt | |
621ed3d1 | 634 | %dir /var/run/libvirt |
423a0b96 JR |
635 | %dir /var/run/libvirt/network |
636 | %{systemdtmpfilesdir}/%{name}.conf | |
637 | %dir %{_libdir}/libvirt/connection-driver | |
273917b1 JR |
638 | %{?with_netcf:%attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_interface.so} |
639 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_network.so | |
640 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_nodedev.so | |
641 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_nwfilter.so | |
642 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_secret.so | |
643 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_storage.so | |
423a0b96 | 644 | |
eae1555f | 645 | %if %{with libxl} |
423a0b96 JR |
646 | %files daemon-libxl |
647 | %defattr(644,root,root,755) | |
273917b1 | 648 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_libxl.so |
423a0b96 JR |
649 | %attr(700,root,root) %dir /var/lib/libvirt/libxl |
650 | %attr(700,root,root) %dir /var/run/libvirt/libxl | |
651 | %attr(700,root,root) %dir /var/log/libvirt/libxl | |
652 | %endif | |
653 | ||
eae1555f | 654 | %if %{with lxc} |
423a0b96 JR |
655 | %files daemon-lxc |
656 | %defattr(644,root,root,755) | |
657 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/lxc.conf | |
658 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.lxc | |
659 | %attr(700,root,root) %dir /var/lib/libvirt/lxc | |
621ed3d1 | 660 | %attr(700,root,root) %dir /var/run/libvirt/lxc |
423a0b96 JR |
661 | %attr(700,root,root) %dir /var/log/libvirt/lxc |
662 | %{_datadir}/augeas/lenses/libvirtd_lxc.aug | |
663 | %{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug | |
664 | %attr(755,root,root) %{_libdir}/libvirt_lxc | |
273917b1 | 665 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_lxc.so |
423a0b96 JR |
666 | %endif |
667 | ||
621ed3d1 | 668 | %if %{with qemu} |
423a0b96 JR |
669 | %files daemon-qemu |
670 | %defattr(644,root,root,755) | |
671 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt/qemu.conf | |
672 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.qemu | |
673 | %attr(750,qemu,qemu) %dir /var/cache/libvirt/qemu | |
674 | %attr(750,qemu,qemu) %dir /var/lib/libvirt/qemu | |
621ed3d1 JB |
675 | %attr(700,root,root) %dir /var/log/libvirt/qemu |
676 | %attr(700,root,root) %dir /var/run/libvirt/qemu | |
423a0b96 JR |
677 | %{_datadir}/augeas/lenses/libvirtd_qemu.aug |
678 | %{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug | |
273917b1 | 679 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_qemu.so |
423a0b96 JR |
680 | %endif |
681 | ||
eae1555f | 682 | %if %{with uml} |
423a0b96 JR |
683 | %files daemon-uml |
684 | %defattr(644,root,root,755) | |
273917b1 | 685 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_uml.so |
423a0b96 JR |
686 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.uml |
687 | %attr(700,root,root) %dir /var/lib/libvirt/uml | |
688 | %attr(700,root,root) %dir /var/run/libvirt/uml | |
689 | %attr(700,root,root) %dir /var/log/libvirt/uml | |
621ed3d1 | 690 | %endif |
423a0b96 | 691 | |
eae1555f | 692 | %if %{with xen} |
423a0b96 JR |
693 | %files daemon-xen |
694 | %defattr(644,root,root,755) | |
273917b1 | 695 | %attr(755,root,root) %{_libdir}/libvirt/connection-driver/libvirt_driver_xen.so |
423a0b96 JR |
696 | %endif |
697 | ||
698 | %files client | |
699 | %defattr(644,root,root,755) | |
700 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirt-guests | |
701 | %attr(754,root,root) /etc/rc.d/init.d/libvirt-guests | |
702 | %{systemdunitdir}/libvirt-guests.service | |
703 | %attr(755,root,root) %{_bindir}/virsh | |
704 | %attr(755,root,root) %{_bindir}/virt-host-validate | |
705 | %attr(755,root,root) %{_bindir}/virt-xml-validate | |
706 | %attr(755,root,root) %{_bindir}/virt-pki-validate | |
707 | %{_mandir}/man1/virsh.1* | |
708 | %{_mandir}/man1/virt-host-validate.1* | |
709 | %{_mandir}/man1/virt-xml-validate.1* | |
710 | %{_mandir}/man1/virt-pki-validate.1* | |
423a0b96 JR |
711 | %{_datadir}/libvirt/cpu_map.xml |
712 | %dir %{_datadir}/libvirt/schemas | |
713 | %{_datadir}/libvirt/schemas/basictypes.rng | |
714 | %{_datadir}/libvirt/schemas/capability.rng | |
715 | %{_datadir}/libvirt/schemas/domain.rng | |
716 | %{_datadir}/libvirt/schemas/domaincommon.rng | |
717 | %{_datadir}/libvirt/schemas/domainsnapshot.rng | |
718 | %{_datadir}/libvirt/schemas/interface.rng | |
719 | %{_datadir}/libvirt/schemas/network.rng | |
720 | %{_datadir}/libvirt/schemas/networkcommon.rng | |
721 | %{_datadir}/libvirt/schemas/nodedev.rng | |
722 | %{_datadir}/libvirt/schemas/nwfilter.rng | |
723 | %{_datadir}/libvirt/schemas/secret.rng | |
724 | %{_datadir}/libvirt/schemas/storageencryption.rng | |
725 | %{_datadir}/libvirt/schemas/storagepool.rng | |
726 | %{_datadir}/libvirt/schemas/storagevol.rng | |
727 | ||
728 | %files utils | |
729 | %defattr(644,root,root,755) |