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