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