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