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