Update spec to 1.2.5
[archive/platform/upstream/libvirt.git] / libvirt.spec.in
1 # -*- rpm-spec -*-
2
3 # If neither fedora nor rhel was defined, try to guess them from %{dist}
4 %if !0%{?rhel} && !0%{?fedora}
5 %{expand:%(echo "%{?dist}" | \
6   sed -ne 's/^\.el\([0-9]\+\).*/%%define rhel \1/p')}
7 %{expand:%(echo "%{?dist}" | \
8   sed -ne 's/^\.fc\?\([0-9]\+\).*/%%define fedora \1/p')}
9 %endif
10
11 # Default to skipping autoreconf.  Distros can change just this one line
12 # (or provide a command-line override) if they backport any patches that
13 # touch configure.ac or Makefile.am.
14 %{!?enable_autotools:%define enable_autotools 0}
15
16 # A client only build will create a libvirt.so only containing
17 # the generic RPC driver, and test driver and no libvirtd
18 # Default to a full server + client build, but with the possibility
19 # of a command-line or ~/.rpmmacros override for client-only.
20 %{!?client_only:%define client_only 0}
21
22 # Now turn off server build in certain cases
23
24 # RHEL-5 builds are client-only for s390, ppc
25 %if 0%{?rhel} == 5
26     %ifnarch %{ix86} x86_64 ia64
27         %define client_only        1
28     %endif
29 %endif
30
31 # Disable all server side drivers if client only build requested
32 %if %{client_only}
33     %define server_drivers     0
34 %else
35     %define server_drivers     1
36 %endif
37
38 # Always build with dlopen'd modules
39 %define with_driver_modules 1
40
41 # Now set the defaults for all the important features, independent
42 # of any particular OS
43
44 # First the daemon itself
45 %define with_libvirtd      0%{!?_without_libvirtd:%{server_drivers}}
46 %define with_avahi         0%{!?_without_avahi:%{server_drivers}}
47
48 # Then the hypervisor drivers that run in libvirtd
49 %define with_xen           0%{!?_without_xen:%{server_drivers}}
50 %define with_qemu          0%{!?_without_qemu:%{server_drivers}}
51 %define with_lxc           0%{!?_without_lxc:%{server_drivers}}
52 %define with_uml           0%{!?_without_uml:%{server_drivers}}
53 %define with_libxl         0%{!?_without_libxl:%{server_drivers}}
54 %define with_vbox          0%{!?_without_vbox:%{server_drivers}}
55
56 %define with_qemu_tcg      %{with_qemu}
57 # Change if we ever provide qemu-kvm binaries on non-x86 hosts
58 %if 0%{?fedora} >= 18
59     %if 0%{?fedora} >= 20
60         %define qemu_kvm_arches    %{ix86} x86_64 ppc64 s390x %{arm}
61     %else
62         %define qemu_kvm_arches    %{ix86} x86_64 ppc64 s390x
63     %endif
64 %else
65     %define qemu_kvm_arches    %{ix86} x86_64
66 %endif
67
68 %ifarch %{qemu_kvm_arches}
69     %define with_qemu_kvm      %{with_qemu}
70 %else
71     %define with_qemu_kvm      0
72 %endif
73
74 # Then the hypervisor drivers that run outside libvirtd, in libvirt.so
75 %define with_openvz        0%{!?_without_openvz:1}
76 %define with_vmware        0%{!?_without_vmware:1}
77 %define with_phyp          0%{!?_without_phyp:1}
78 %define with_esx           0%{!?_without_esx:1}
79 %define with_hyperv        0%{!?_without_hyperv:1}
80 %define with_xenapi        0%{!?_without_xenapi:1}
81 %define with_parallels     0%{!?_without_parallels:1}
82 # No test for bhyve, because it does not build on Linux
83
84 # Then the secondary host drivers, which run inside libvirtd
85 %define with_interface        0%{!?_without_interface:%{server_drivers}}
86 %define with_network          0%{!?_without_network:%{server_drivers}}
87 %define with_storage_fs       0%{!?_without_storage_fs:%{server_drivers}}
88 %define with_storage_lvm      0%{!?_without_storage_lvm:%{server_drivers}}
89 %define with_storage_iscsi    0%{!?_without_storage_iscsi:%{server_drivers}}
90 %define with_storage_disk     0%{!?_without_storage_disk:%{server_drivers}}
91 %define with_storage_mpath    0%{!?_without_storage_mpath:%{server_drivers}}
92 %if 0%{?fedora} >= 16
93     %define with_storage_rbd      0%{!?_without_storage_rbd:%{server_drivers}}
94 %else
95     %define with_storage_rbd      0
96 %endif
97 %if 0%{?fedora} >= 17
98     %define with_storage_sheepdog 0%{!?_without_storage_sheepdog:%{server_drivers}}
99 %else
100     %define with_storage_sheepdog 0
101 %endif
102 %if 0%{?fedora} >= 19 || 0%{?rhel} >= 6
103     %define with_storage_gluster 0%{!?_without_storage_gluster:%{server_drivers}}
104 %else
105     %define with_storage_gluster 0
106 %endif
107 %define with_numactl          0%{!?_without_numactl:%{server_drivers}}
108 %define with_selinux          0%{!?_without_selinux:%{server_drivers}}
109
110 # Just hardcode to off, since few people ever have apparmor RPMs installed
111 %define with_apparmor         0%{!?_without_apparmor:0}
112
113 # A few optional bits off by default, we enable later
114 %define with_polkit        0%{!?_without_polkit:0}
115 %define with_capng         0%{!?_without_capng:0}
116 %define with_fuse          0%{!?_without_fuse:0}
117 %define with_netcf         0%{!?_without_netcf:0}
118 %define with_udev          0%{!?_without_udev:0}
119 %define with_hal           0%{!?_without_hal:0}
120 %define with_yajl          0%{!?_without_yajl:0}
121 %define with_nwfilter      0%{!?_without_nwfilter:0}
122 %define with_libpcap       0%{!?_without_libpcap:0}
123 %define with_macvtap       0%{!?_without_macvtap:0}
124 %define with_libnl         0%{!?_without_libnl:0}
125 %define with_audit         0%{!?_without_audit:0}
126 %define with_dtrace        0%{!?_without_dtrace:0}
127 %define with_cgconfig      0%{!?_without_cgconfig:0}
128 %define with_sanlock       0%{!?_without_sanlock:0}
129 %define with_systemd       0%{!?_without_systemd:0}
130 %define with_numad         0%{!?_without_numad:0}
131 %define with_firewalld     0%{!?_without_firewalld:0}
132 %define with_libssh2       0%{!?_without_libssh2:0}
133 %define with_wireshark     0%{!?_without_wireshark:0}
134 %define with_systemd_daemon 0%{!?_without_systemd_daemon:0}
135 %define with_pm_utils      1
136
137 # Non-server/HV driver defaults which are always enabled
138 %define with_sasl          0%{!?_without_sasl:1}
139
140
141 # Finally set the OS / architecture specific special cases
142
143 # Xen is available only on i386 x86_64 ia64
144 %ifnarch %{ix86} x86_64 ia64
145     %define with_xen 0
146     %define with_libxl 0
147 %endif
148
149 # vbox is available only on i386 x86_64
150 %ifnarch %{ix86} x86_64
151     %define with_vbox 0
152 %endif
153
154 # Numactl is not available on s390[x] and ARM
155 %ifarch s390 s390x %{arm}
156     %define with_numactl 0
157 %endif
158
159 # libgfapi is built only on x86_64 on rhel
160 %ifnarch x86_64
161     %if 0%{?rhel} >= 6
162         %define with_storage_gluster 0
163     %endif
164 %endif
165
166 # RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor,
167 # VMWare, libxenserver (xenapi), libxenlight (Xen 4.1 and newer),
168 # or HyperV.
169 %if 0%{?rhel}
170     %define with_openvz 0
171     %define with_vbox 0
172     %define with_uml 0
173     %define with_phyp 0
174     %define with_vmware 0
175     %define with_xenapi 0
176     %define with_libxl 0
177     %define with_hyperv 0
178     %define with_parallels 0
179 %endif
180
181 # Fedora 17 / RHEL-7 are first where we use systemd. Although earlier
182 # Fedora has systemd, libvirt still used sysvinit there.
183 %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
184     %define with_systemd 1
185     %define with_systemd_daemon 1
186     %define with_pm_utils 0
187 %endif
188
189 # Fedora 18 / RHEL-7 are first where firewalld support is enabled
190 %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
191     %define with_firewalld 1
192 %endif
193
194 # RHEL-5 has restricted QEMU to x86_64 only and is too old for LXC
195 %if 0%{?rhel} == 5
196     %define with_qemu_tcg 0
197     %ifnarch x86_64
198         %define with_qemu 0
199         %define with_qemu_kvm 0
200     %endif
201     %define with_lxc 0
202 %endif
203
204 # RHEL-6 has restricted QEMU to x86_64 only, stopped including Xen
205 # on all archs. Other archs all have LXC available though
206 %if 0%{?rhel} >= 6
207     %define with_qemu_tcg 0
208     %ifnarch x86_64
209         %define with_qemu 0
210         %define with_qemu_kvm 0
211     %endif
212     %define with_xen 0
213 %endif
214
215 # Fedora doesn't have any QEMU on ppc64 until FC16 - only ppc
216 %if 0%{?fedora} && 0%{?fedora} < 16
217     %ifarch ppc64
218         %define with_qemu 0
219     %endif
220 %endif
221
222 # Fedora doesn't have new enough Xen for libxl until F18
223 %if 0%{?fedora} && 0%{?fedora} < 18
224     %define with_libxl 0
225 %endif
226
227 # PolicyKit was introduced in Fedora 8 / RHEL-6 or newer
228 %if 0%{?fedora} >= 8 || 0%{?rhel} >= 6
229     %define with_polkit    0%{!?_without_polkit:1}
230 %endif
231
232 # libcapng is used to manage capabilities in Fedora 12 / RHEL-6 or newer
233 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
234     %define with_capng     0%{!?_without_capng:1}
235 %endif
236
237 # fuse is used to provide virtualized /proc for LXC
238 %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
239     %define with_fuse      0%{!?_without_fuse:1}
240 %endif
241
242 # netcf is used to manage network interfaces in Fedora 12 / RHEL-6 or newer
243 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
244     %define with_netcf     0%{!?_without_netcf:%{server_drivers}}
245 %endif
246
247 # udev is used to manage host devices in Fedora 12 / RHEL-6 or newer
248 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
249     %define with_udev     0%{!?_without_udev:%{server_drivers}}
250 %else
251     %define with_hal       0%{!?_without_hal:%{server_drivers}}
252 %endif
253
254 # interface requires netcf
255 %if ! 0%{?with_netcf}
256     %define with_interface     0
257 %endif
258
259 # Enable yajl library for JSON mode with QEMU
260 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6
261     %define with_yajl     0%{!?_without_yajl:%{server_drivers}}
262 %endif
263
264 # Enable sanlock library for lock management with QEMU
265 # Sanlock is available only on x86_64 for RHEL
266 %if 0%{?fedora} >= 16
267     %define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
268 %endif
269 %if 0%{?rhel} >= 6
270     %ifarch x86_64
271         %define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
272     %endif
273 %endif
274
275 # Enable libssh2 transport for new enough distros
276 %if 0%{?fedora} >= 17
277     %define with_libssh2 0%{!?_without_libssh2:1}
278 %endif
279
280 # Enable wireshark plugins for all distros shipping libvirt 1.2.2 or newer
281 %if 0%{?fedora} >= 21
282     %define with_wireshark 0%{!?_without_wireshark:1}
283 %endif
284
285 # Disable some drivers when building without libvirt daemon.
286 # The logic is the same as in configure.ac
287 %if ! %{with_libvirtd}
288     %define with_interface 0
289     %define with_network 0
290     %define with_qemu 0
291     %define with_lxc 0
292     %define with_uml 0
293     %define with_hal 0
294     %define with_udev 0
295     %define with_storage_fs 0
296     %define with_storage_lvm 0
297     %define with_storage_iscsi 0
298     %define with_storage_mpath 0
299     %define with_storage_rbd 0
300     %define with_storage_sheepdog 0
301     %define with_storage_gluster 0
302     %define with_storage_disk 0
303 %endif
304
305 %if %{with_qemu} || %{with_lxc} || %{with_uml}
306     %define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}}
307 # Enable libpcap library
308     %define with_libpcap  0%{!?_without_libpcap:%{server_drivers}}
309     %define with_macvtap  0%{!?_without_macvtap:%{server_drivers}}
310
311 # numad is used to manage the CPU and memory placement dynamically,
312 # it's not available on s390[x] and ARM.
313     %if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
314         %ifnarch s390 s390x %{arm}
315             %define with_numad    0%{!?_without_numad:%{server_drivers}}
316         %endif
317     %endif
318 %endif
319
320 %if %{with_macvtap}
321     %define with_libnl 1
322 %endif
323
324 %if 0%{?fedora} >= 11 || 0%{?rhel} >= 5
325     %define with_audit    0%{!?_without_audit:1}
326 %endif
327
328 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6
329     %define with_dtrace 1
330 %endif
331
332 # Pull in cgroups config system
333 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
334     %if %{with_qemu} || %{with_lxc}
335         %define with_cgconfig 0%{!?_without_cgconfig:1}
336     %endif
337 %endif
338
339 %if %{with_udev} || %{with_hal}
340     %define with_nodedev 1
341 %else
342     %define with_nodedev 0
343 %endif
344
345 %if %{with_storage_fs} || %{with_storage_mpath} || %{with_storage_iscsi} || %{with_storage_lvm} || %{with_storage_disk}
346     %define with_storage 1
347 %else
348     %define with_storage 0
349 %endif
350
351
352 # Force QEMU to run as non-root
353 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
354     %define qemu_user  qemu
355     %define qemu_group  qemu
356 %else
357     %define qemu_user  root
358     %define qemu_group  root
359 %endif
360
361
362 # The RHEL-5 Xen package has some feature backports. This
363 # flag is set to enable use of those special bits on RHEL-5
364 %if 0%{?rhel} == 5
365     %define with_rhel5  1
366 %else
367     %define with_rhel5  0
368 %endif
369
370 %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
371     %define with_systemd_macros 1
372 %else
373     %define with_systemd_macros 0
374 %endif
375
376
377 # RHEL releases provide stable tool chains and so it is safe to turn
378 # compiler warning into errors without being worried about frequent
379 # changes in reported warnings
380 %if 0%{?rhel}
381     %define enable_werror --enable-werror
382 %endif
383
384
385 Summary: Library providing a simple virtualization API
386 Name: libvirt
387 Version: @VERSION@
388 Release: 1%{?dist}%{?extra_release}
389 License: LGPLv2+
390 Group: Development/Libraries
391 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
392 URL: http://libvirt.org/
393
394 %if %(echo %{version} | grep -o \\. | wc -l) == 3
395     %define mainturl stable_updates/
396 %endif
397 Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz
398
399 %if %{with_libvirtd}
400 Requires: libvirt-daemon = %{version}-%{release}
401     %if %{with_network}
402 Requires: libvirt-daemon-config-network = %{version}-%{release}
403     %endif
404     %if %{with_nwfilter}
405 Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
406     %endif
407     %if %{with_driver_modules}
408         %if %{with_libxl}
409 Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
410         %endif
411         %if %{with_lxc}
412 Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
413         %endif
414         %if %{with_qemu}
415 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
416         %endif
417         %if %{with_uml}
418 Requires: libvirt-daemon-driver-uml = %{version}-%{release}
419         %endif
420         %if %{with_xen}
421 Requires: libvirt-daemon-driver-xen = %{version}-%{release}
422         %endif
423         %if %{with_vbox}
424 Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
425         %endif
426         %if %{with_nwfilter}
427 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
428         %endif
429
430         %if %{with_interface}
431 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
432         %endif
433 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
434 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
435 Requires: libvirt-daemon-driver-network = %{version}-%{release}
436 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
437     %endif
438 %endif
439 Requires: libvirt-client = %{version}-%{release}
440
441 # All build-time requirements. Run-time requirements are
442 # listed against each sub-RPM
443 %if 0%{?enable_autotools}
444 BuildRequires: autoconf
445 BuildRequires: automake
446 BuildRequires: gettext-devel
447 BuildRequires: libtool
448 BuildRequires: /usr/bin/pod2man
449 %endif
450 BuildRequires: python
451 %if %{with_systemd}
452 BuildRequires: systemd-units
453 %endif
454 %if %{with_systemd_daemon}
455 BuildRequires: systemd-devel
456 %endif
457 %if %{with_xen} || %{with_libxl}
458 BuildRequires: xen-devel
459 %endif
460 BuildRequires: libxml2-devel
461 BuildRequires: xhtml1-dtds
462 BuildRequires: libxslt
463 BuildRequires: readline-devel
464 BuildRequires: ncurses-devel
465 BuildRequires: gettext
466 BuildRequires: libtasn1-devel
467 %if (0%{?rhel} && 0%{?rhel} < 7) || (0%{?fedora} && 0%{?fedora} < 19)
468 BuildRequires: libgcrypt-devel
469 %endif
470 BuildRequires: gnutls-devel
471 BuildRequires: libattr-devel
472 %if %{with_libvirtd}
473 # For pool-build probing for existing pools
474 BuildRequires: libblkid-devel >= 2.17
475 %endif
476 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
477 # for augparse, optionally used in testing
478 BuildRequires: augeas
479 %endif
480 %if %{with_hal}
481 BuildRequires: hal-devel
482 %endif
483 %if %{with_udev}
484     %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
485 BuildRequires: systemd-devel >= 185
486     %else
487 BuildRequires: libudev-devel >= 145
488     %endif
489 BuildRequires: libpciaccess-devel >= 0.10.9
490 %endif
491 %if %{with_yajl}
492 BuildRequires: yajl-devel
493 %endif
494 %if %{with_sanlock}
495 # make sure libvirt is built with new enough sanlock on
496 # distros that have it; required for on_lockfailure
497     %if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
498 BuildRequires: sanlock-devel >= 2.4
499     %else
500 BuildRequires: sanlock-devel >= 1.8
501     %endif
502 %endif
503 %if %{with_libpcap}
504 BuildRequires: libpcap-devel
505 %endif
506 %if %{with_libnl}
507     %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
508 BuildRequires: libnl3-devel
509     %else
510 BuildRequires: libnl-devel
511     %endif
512 %endif
513 %if %{with_avahi}
514 BuildRequires: avahi-devel
515 %endif
516 %if %{with_selinux}
517 BuildRequires: libselinux-devel
518 %endif
519 %if %{with_apparmor}
520 BuildRequires: libapparmor-devel
521 %endif
522 %if %{with_network}
523 BuildRequires: dnsmasq >= 2.41
524 BuildRequires: iptables
525 BuildRequires: iptables-ipv6
526 BuildRequires: radvd
527 %endif
528 %if %{with_nwfilter}
529 BuildRequires: ebtables
530 %endif
531 BuildRequires: module-init-tools
532 %if %{with_sasl}
533 BuildRequires: cyrus-sasl-devel
534 %endif
535 %if %{with_polkit}
536     %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
537 BuildRequires: polkit-devel >= 0.93
538     %else
539 BuildRequires: PolicyKit-devel >= 0.6
540     %endif
541 %endif
542 %if %{with_storage_fs}
543 # For mount/umount in FS driver
544 BuildRequires: util-linux
545 %endif
546 %if %{with_qemu}
547 # From QEMU RPMs
548 BuildRequires: /usr/bin/qemu-img
549 %else
550     %if %{with_xen}
551 # From Xen RPMs
552 BuildRequires: /usr/sbin/qcow-create
553     %endif
554 %endif
555 %if %{with_storage_lvm}
556 # For LVM drivers
557 BuildRequires: lvm2
558 %endif
559 %if %{with_storage_iscsi}
560 # For ISCSI driver
561 BuildRequires: iscsi-initiator-utils
562 %endif
563 %if %{with_storage_disk}
564 # For disk driver
565 BuildRequires: parted-devel
566     %if 0%{?rhel} == 5
567 # Broken RHEL-5 parted RPM is missing a dep
568 BuildRequires: e2fsprogs-devel
569     %endif
570 %endif
571 %if %{with_storage_mpath} || %{with_storage_disk}
572 # For Multipath support
573     %if 0%{?rhel} == 5
574 # Broken RHEL-5 packaging has header files in main RPM :-(
575 BuildRequires: device-mapper
576     %else
577 BuildRequires: device-mapper-devel
578     %endif
579 %endif
580 %if %{with_storage_rbd}
581 BuildRequires: ceph-devel
582 %endif
583 %if %{with_storage_gluster}
584     %if 0%{?rhel} >= 6
585 BuildRequires: glusterfs-api-devel >= 3.4.0
586 BuildRequires: glusterfs-devel >= 3.4.0
587     %else
588 BuildRequires: glusterfs-api-devel >= 3.4.1
589 BuildRequires: glusterfs-devel >= 3.4.1
590     %endif
591 %endif
592 %if %{with_numactl}
593 # For QEMU/LXC numa info
594 BuildRequires: numactl-devel
595 %endif
596 %if %{with_capng}
597 BuildRequires: libcap-ng-devel >= 0.5.0
598 %endif
599 %if %{with_fuse}
600 BuildRequires: fuse-devel >= 2.8.6
601 %endif
602 %if %{with_phyp} || %{with_libssh2}
603 BuildRequires: libssh2-devel >= 1.3.0
604 %endif
605
606 %if %{with_netcf}
607     %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
608 BuildRequires: netcf-devel >= 0.2.2
609     %else
610         %if 0%{?fedora} >= 16 || 0%{?rhel} >= 6
611 BuildRequires: netcf-devel >= 0.1.8
612         %else
613 BuildRequires: netcf-devel >= 0.1.4
614         %endif
615     %endif
616 %endif
617 %if %{with_esx}
618     %if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
619 BuildRequires: libcurl-devel
620     %else
621 BuildRequires: curl-devel
622     %endif
623 %endif
624 %if %{with_hyperv}
625 BuildRequires: libwsman-devel >= 2.2.3
626 %endif
627 %if %{with_audit}
628 BuildRequires: audit-libs-devel
629 %endif
630 %if %{with_dtrace}
631 # we need /usr/sbin/dtrace
632 BuildRequires: systemtap-sdt-devel
633 %endif
634
635 %if %{with_storage_fs}
636 # For mount/umount in FS driver
637 BuildRequires: util-linux
638 # For showmount in FS driver (netfs discovery)
639 BuildRequires: nfs-utils
640 %endif
641
642 %if %{with_firewalld}
643 # Communication with the firewall daemon uses DBus
644 BuildRequires: dbus-devel
645 %endif
646
647 # Fedora build root suckage
648 BuildRequires: gawk
649
650 # For storage wiping with different algorithms
651 BuildRequires: scrub
652
653 %if %{with_numad}
654 BuildRequires: numad
655 %endif
656
657 %if %{with_wireshark}
658 BuildRequires: wireshark-devel
659 %endif
660
661 Provides: bundled(gnulib)
662
663 %description
664 Libvirt is a C toolkit to interact with the virtualization capabilities
665 of recent versions of Linux (and other OSes). The main package includes
666 the libvirtd server exporting the virtualization support.
667
668 %package docs
669 Summary: API reference and website documentation
670 Group: Development/Libraries
671
672 %description docs
673 Includes the API reference for the libvirt C library, and a complete
674 copy of the libvirt.org website documentation.
675
676 %if %{with_libvirtd}
677 %package daemon
678 Summary: Server side daemon and supporting files for libvirt library
679 Group: Development/Libraries
680
681 # All runtime requirements for the libvirt package (runtime requrements
682 # for subpackages are listed later in those subpackages)
683
684 # The client side, i.e. shared libs and virsh are in a subpackage
685 Requires: %{name}-client = %{version}-%{release}
686
687 # for modprobe of pci devices
688 Requires: module-init-tools
689 # for /sbin/ip & /sbin/tc
690 Requires: iproute
691     %if %{with_avahi}
692         %if 0%{?rhel} == 5
693 Requires: avahi
694         %else
695 Requires: avahi-libs
696         %endif
697     %endif
698     %if %{with_polkit}
699         %if 0%{?fedora} >= 12 || 0%{?rhel} >=6
700 Requires: polkit >= 0.93
701         %else
702 Requires: PolicyKit >= 0.6
703         %endif
704     %endif
705     %if %{with_cgconfig}
706 Requires: libcgroup
707     %endif
708     %ifarch %{ix86} x86_64 ia64
709 # For virConnectGetSysinfo
710 Requires: dmidecode
711     %endif
712 # For service management
713     %if %{with_systemd}
714 Requires(post): systemd-units
715 Requires(post): systemd-sysv
716 Requires(preun): systemd-units
717 Requires(postun): systemd-units
718     %endif
719     %if %{with_numad}
720 Requires: numad
721     %endif
722 # libvirtd depends on 'messagebus' service
723 Requires: dbus
724 # For uid creation during pre
725 Requires(pre): shadow-utils
726
727 %description daemon
728 Server side daemon required to manage the virtualization capabilities
729 of recent versions of Linux. Requires a hypervisor specific sub-RPM
730 for specific drivers.
731
732     %if %{with_network}
733 %package daemon-config-network
734 Summary: Default configuration files for the libvirtd daemon
735 Group: Development/Libraries
736
737 Requires: libvirt-daemon = %{version}-%{release}
738         %if %{with_driver_modules}
739 Requires: libvirt-daemon-driver-network = %{version}-%{release}
740         %endif
741
742 %description daemon-config-network
743 Default configuration files for setting up NAT based networking
744     %endif
745
746     %if %{with_nwfilter}
747 %package daemon-config-nwfilter
748 Summary: Network filter configuration files for the libvirtd daemon
749 Group: Development/Libraries
750
751 Requires: libvirt-daemon = %{version}-%{release}
752         %if %{with_driver_modules}
753 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
754         %endif
755
756 %description daemon-config-nwfilter
757 Network filter configuration files for cleaning guest traffic
758     %endif
759
760     %if %{with_driver_modules}
761         %if %{with_network}
762 %package daemon-driver-network
763 Summary: Network driver plugin for the libvirtd daemon
764 Group: Development/Libraries
765 Requires: libvirt-daemon = %{version}-%{release}
766 Requires: dnsmasq >= 2.41
767 Requires: radvd
768 Requires: iptables
769 Requires: iptables-ipv6
770
771 %description daemon-driver-network
772 The network driver plugin for the libvirtd daemon, providing
773 an implementation of the virtual network APIs using the Linux
774 bridge capabilities.
775         %endif
776
777
778         %if %{with_nwfilter}
779 %package daemon-driver-nwfilter
780 Summary: Nwfilter driver plugin for the libvirtd daemon
781 Group: Development/Libraries
782 Requires: libvirt-daemon = %{version}-%{release}
783 Requires: iptables
784 Requires: iptables-ipv6
785 Requires: ebtables
786
787 %description daemon-driver-nwfilter
788 The nwfilter driver plugin for the libvirtd daemon, providing
789 an implementation of the firewall APIs using the ebtables,
790 iptables and ip6tables capabilities
791         %endif
792
793
794         %if %{with_nodedev}
795 %package daemon-driver-nodedev
796 Summary: Nodedev driver plugin for the libvirtd daemon
797 Group: Development/Libraries
798 Requires: libvirt-daemon = %{version}-%{release}
799 # needed for device enumeration
800             %if %{with_hal}
801 Requires: hal
802             %endif
803             %if %{with_udev}
804                 %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
805 Requires: systemd >= 185
806                 %else
807 Requires: udev >= 145
808                 %endif
809             %endif
810
811 %description daemon-driver-nodedev
812 The nodedev driver plugin for the libvirtd daemon, providing
813 an implementation of the node device APIs using the udev
814 capabilities.
815         %endif
816
817
818         %if %{with_interface}
819 %package daemon-driver-interface
820 Summary: Interface driver plugin for the libvirtd daemon
821 Group: Development/Libraries
822 Requires: libvirt-daemon = %{version}-%{release}
823             %if %{with_netcf} && (0%{?fedora} >= 18 || 0%{?rhel} >= 7)
824 Requires: netcf-libs >= 0.2.2
825             %endif
826
827 %description daemon-driver-interface
828 The interface driver plugin for the libvirtd daemon, providing
829 an implementation of the network interface APIs using the
830 netcf library
831         %endif
832
833
834 %package daemon-driver-secret
835 Summary: Secret driver plugin for the libvirtd daemon
836 Group: Development/Libraries
837 Requires: libvirt-daemon = %{version}-%{release}
838
839 %description daemon-driver-secret
840 The secret driver plugin for the libvirtd daemon, providing
841 an implementation of the secret key APIs.
842
843
844         %if %{with_storage}
845 %package daemon-driver-storage
846 Summary: Storage driver plugin for the libvirtd daemon
847 Group: Development/Libraries
848 Requires: libvirt-daemon = %{version}-%{release}
849             %if %{with_storage_fs}
850 Requires: nfs-utils
851 # For mkfs
852 Requires: util-linux
853 # For glusterfs
854                 %if 0%{?fedora} >= 11
855 Requires: glusterfs-client >= 2.0.1
856                 %endif
857             %endif
858             %if %{with_storage_lvm}
859 # For LVM drivers
860 Requires: lvm2
861             %endif
862             %if %{with_storage_iscsi}
863 # For ISCSI driver
864 Requires: iscsi-initiator-utils
865             %endif
866             %if %{with_storage_disk}
867 # For disk driver
868 Requires: parted
869 Requires: device-mapper
870             %endif
871             %if %{with_storage_mpath}
872 # For multipath support
873 Requires: device-mapper
874             %endif
875             %if %{with_storage_sheepdog}
876 # For Sheepdog support
877 Requires: sheepdog
878             %endif
879             %if %{with_qemu}
880 # From QEMU RPMs
881 Requires: /usr/bin/qemu-img
882             %else
883                 %if %{with_xen}
884 # From Xen RPMs
885 Requires: /usr/sbin/qcow-create
886                 %endif
887             %endif
888
889 %description daemon-driver-storage
890 The storage driver plugin for the libvirtd daemon, providing
891 an implementation of the storage APIs using LVM, iSCSI,
892 parted and more.
893         %endif
894
895
896         %if %{with_qemu}
897 %package daemon-driver-qemu
898 Summary: Qemu driver plugin for the libvirtd daemon
899 Group: Development/Libraries
900 Requires: libvirt-daemon = %{version}-%{release}
901 # There really is a hard cross-driver dependency here
902 Requires: libvirt-daemon-driver-network = %{version}-%{release}
903 Requires: /usr/bin/qemu-img
904 # For image compression
905 Requires: gzip
906 Requires: bzip2
907 Requires: lzop
908 Requires: xz
909
910 %description daemon-driver-qemu
911 The qemu driver plugin for the libvirtd daemon, providing
912 an implementation of the hypervisor driver APIs using
913 QEMU
914         %endif
915
916
917         %if %{with_lxc}
918 %package daemon-driver-lxc
919 Summary: LXC driver plugin for the libvirtd daemon
920 Group: Development/Libraries
921 Requires: libvirt-daemon = %{version}-%{release}
922 # There really is a hard cross-driver dependency here
923 Requires: libvirt-daemon-driver-network = %{version}-%{release}
924
925 %description daemon-driver-lxc
926 The LXC driver plugin for the libvirtd daemon, providing
927 an implementation of the hypervisor driver APIs using
928 the Linux kernel
929         %endif
930
931
932         %if %{with_uml}
933 %package daemon-driver-uml
934 Summary: Uml driver plugin for the libvirtd daemon
935 Group: Development/Libraries
936 Requires: libvirt-daemon = %{version}-%{release}
937
938 %description daemon-driver-uml
939 The UML driver plugin for the libvirtd daemon, providing
940 an implementation of the hypervisor driver APIs using
941 User Mode Linux
942         %endif
943
944
945         %if %{with_xen}
946 %package daemon-driver-xen
947 Summary: Xen driver plugin for the libvirtd daemon
948 Group: Development/Libraries
949 Requires: libvirt-daemon = %{version}-%{release}
950
951 %description daemon-driver-xen
952 The Xen driver plugin for the libvirtd daemon, providing
953 an implementation of the hypervisor driver APIs using
954 Xen
955         %endif
956
957
958         %if %{with_vbox}
959 %package daemon-driver-vbox
960 Summary: VirtualBox driver plugin for the libvirtd daemon
961 Group: Development/Libraries
962 Requires: libvirt-daemon = %{version}-%{release}
963
964 %description daemon-driver-vbox
965 The vbox driver plugin for the libvirtd daemon, providing
966 an implementation of the hypervisor driver APIs using
967 VirtualBox
968         %endif
969
970
971         %if %{with_libxl}
972 %package daemon-driver-libxl
973 Summary: Libxl driver plugin for the libvirtd daemon
974 Group: Development/Libraries
975 Requires: libvirt-daemon = %{version}-%{release}
976
977 %description daemon-driver-libxl
978 The Libxl driver plugin for the libvirtd daemon, providing
979 an implementation of the hypervisor driver APIs using
980 Libxl
981         %endif
982     %endif # %{with_driver_modules}
983
984
985
986     %if %{with_qemu_tcg}
987 %package daemon-qemu
988 Summary: Server side daemon & driver required to run QEMU guests
989 Group: Development/Libraries
990
991 Requires: libvirt-daemon = %{version}-%{release}
992         %if %{with_driver_modules}
993 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
994 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
995 Requires: libvirt-daemon-driver-network = %{version}-%{release}
996 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
997 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
998 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
999 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
1000         %endif
1001 Requires: qemu
1002
1003 %description daemon-qemu
1004 Server side daemon and driver required to manage the virtualization
1005 capabilities of the QEMU TCG emulators
1006     %endif
1007
1008
1009     %if %{with_qemu_kvm}
1010 %package daemon-kvm
1011 Summary: Server side daemon & driver required to run KVM guests
1012 Group: Development/Libraries
1013
1014 Requires: libvirt-daemon = %{version}-%{release}
1015         %if %{with_driver_modules}
1016 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
1017 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
1018 Requires: libvirt-daemon-driver-network = %{version}-%{release}
1019 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
1020 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
1021 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
1022 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
1023         %endif
1024 Requires: qemu-kvm
1025
1026 %description daemon-kvm
1027 Server side daemon and driver required to manage the virtualization
1028 capabilities of the KVM hypervisor
1029     %endif
1030
1031
1032     %if %{with_lxc}
1033 %package daemon-lxc
1034 Summary: Server side daemon & driver required to run LXC guests
1035 Group: Development/Libraries
1036
1037 Requires: libvirt-daemon = %{version}-%{release}
1038         %if %{with_driver_modules}
1039 Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
1040 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
1041 Requires: libvirt-daemon-driver-network = %{version}-%{release}
1042 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
1043 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
1044 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
1045 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
1046         %endif
1047
1048 %description daemon-lxc
1049 Server side daemon and driver required to manage the virtualization
1050 capabilities of LXC
1051     %endif
1052
1053
1054     %if %{with_uml}
1055 %package daemon-uml
1056 Summary: Server side daemon & driver required to run UML guests
1057 Group: Development/Libraries
1058
1059 Requires: libvirt-daemon = %{version}-%{release}
1060         %if %{with_driver_modules}
1061 Requires: libvirt-daemon-driver-uml = %{version}-%{release}
1062 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
1063 Requires: libvirt-daemon-driver-network = %{version}-%{release}
1064 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
1065 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
1066 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
1067 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
1068         %endif
1069 # There are no UML kernel RPMs in Fedora/RHEL to depend on.
1070
1071 %description daemon-uml
1072 Server side daemon and driver required to manage the virtualization
1073 capabilities of UML
1074     %endif
1075
1076
1077     %if %{with_xen} || %{with_libxl}
1078 %package daemon-xen
1079 Summary: Server side daemon & driver required to run XEN guests
1080 Group: Development/Libraries
1081
1082 Requires: libvirt-daemon = %{version}-%{release}
1083         %if %{with_driver_modules}
1084             %if %{with_xen}
1085 Requires: libvirt-daemon-driver-xen = %{version}-%{release}
1086             %endif
1087             %if %{with_libxl}
1088 Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
1089             %endif
1090 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
1091 Requires: libvirt-daemon-driver-network = %{version}-%{release}
1092 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
1093 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
1094 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
1095 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
1096         %endif
1097 Requires: xen
1098
1099 %description daemon-xen
1100 Server side daemon and driver required to manage the virtualization
1101 capabilities of XEN
1102     %endif
1103
1104     %if %{with_vbox}
1105 %package daemon-vbox
1106 Summary: Server side daemon & driver required to run VirtualBox guests
1107 Group: Development/Libraries
1108
1109 Requires: libvirt-daemon = %{version}-%{release}
1110         %if %{with_driver_modules}
1111 Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
1112 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
1113 Requires: libvirt-daemon-driver-network = %{version}-%{release}
1114 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
1115 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
1116 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
1117 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
1118         %endif
1119
1120 %description daemon-vbox
1121 Server side daemon and driver required to manage the virtualization
1122 capabilities of VirtualBox
1123     %endif
1124 %endif # %{with_libvirtd}
1125
1126 %package client
1127 Summary: Client side library and utilities of the libvirt library
1128 Group: Development/Libraries
1129 Requires: readline
1130 Requires: ncurses
1131 # So remote clients can access libvirt over SSH tunnel
1132 # (client invokes 'nc' against the UNIX socket on the server)
1133 Requires: nc
1134 # Needed by /usr/libexec/libvirt-guests.sh script.
1135 Requires: gettext
1136 # Needed by virt-pki-validate script.
1137 Requires: gnutls-utils
1138 %if %{with_pm_utils}
1139 # Needed for probing the power management features of the host.
1140 Requires: pm-utils
1141 %endif
1142 %if %{with_sasl}
1143 Requires: cyrus-sasl
1144 # Not technically required, but makes 'out-of-box' config
1145 # work correctly & doesn't have onerous dependencies
1146 Requires: cyrus-sasl-md5
1147 %endif
1148
1149 %description client
1150 Shared libraries and client binaries needed to access to the
1151 virtualization capabilities of recent versions of Linux (and other OSes).
1152
1153 %if %{with_wireshark}
1154 %package wireshark
1155 Summary: Wireshark dissector plugin for libvirt RPC transactions
1156 Group: Development/Libraries
1157 Requires: wireshark
1158 Requires: %{name}-client = %{version}-%{release}
1159
1160 %description wireshark
1161 Wireshark dissector plugin for better analysis of libvirt RPC traffic.
1162 %endif
1163
1164 %if %{with_lxc}
1165 %package login-shell
1166 Summary: Login shell for connecting users to an LXC container
1167 Group: Development/Libraries
1168 Requires: %{name}-client = %{version}-%{release}
1169
1170 %description login-shell
1171 Provides the set-uid virt-login-shell binary that is used to
1172 connect a user to an LXC container when they login, by switching
1173 namespaces.
1174 %endif
1175
1176 %package devel
1177 Summary: Libraries, includes, etc. to compile with the libvirt library
1178 Group: Development/Libraries
1179 Requires: %{name}-client = %{version}-%{release}
1180 Requires: %{name}-docs = %{version}-%{release}
1181 Requires: pkgconfig
1182
1183 %description devel
1184 Include header files & development libraries for the libvirt C library.
1185
1186 %if %{with_sanlock}
1187 %package lock-sanlock
1188 Summary: Sanlock lock manager plugin for QEMU driver
1189 Group: Development/Libraries
1190     %if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
1191 Requires: sanlock >= 2.4
1192     %else
1193 Requires: sanlock >= 1.8
1194     %endif
1195 #for virt-sanlock-cleanup require augeas
1196 Requires: augeas
1197 Requires: %{name}-daemon = %{version}-%{release}
1198 Requires: %{name}-client = %{version}-%{release}
1199
1200 %description lock-sanlock
1201 Includes the Sanlock lock manager plugin for the QEMU
1202 driver
1203 %endif
1204
1205 %prep
1206 %setup -q
1207
1208 %build
1209 %if ! %{with_xen}
1210     %define _without_xen --without-xen
1211 %endif
1212
1213 %if ! %{with_qemu}
1214     %define _without_qemu --without-qemu
1215 %endif
1216
1217 %if ! %{with_openvz}
1218     %define _without_openvz --without-openvz
1219 %endif
1220
1221 %if ! %{with_lxc}
1222     %define _without_lxc --without-lxc
1223 %endif
1224
1225 %if ! %{with_vbox}
1226     %define _without_vbox --without-vbox
1227 %endif
1228
1229 %if ! %{with_xenapi}
1230     %define _without_xenapi --without-xenapi
1231 %endif
1232
1233 %if ! %{with_libxl}
1234     %define _without_libxl --without-libxl
1235 %endif
1236
1237 %if ! %{with_sasl}
1238     %define _without_sasl --without-sasl
1239 %endif
1240
1241 %if ! %{with_avahi}
1242     %define _without_avahi --without-avahi
1243 %endif
1244
1245 %if ! %{with_phyp}
1246     %define _without_phyp --without-phyp
1247 %endif
1248
1249 %if ! %{with_esx}
1250     %define _without_esx --without-esx
1251 %endif
1252
1253 %if ! %{with_hyperv}
1254     %define _without_hyperv --without-hyperv
1255 %endif
1256
1257 %if ! %{with_vmware}
1258     %define _without_vmware --without-vmware
1259 %endif
1260
1261 %if ! %{with_parallels}
1262     %define _without_parallels --without-parallels
1263 %endif
1264
1265 %if ! %{with_polkit}
1266     %define _without_polkit --without-polkit
1267 %endif
1268
1269 %if ! %{with_libvirtd}
1270     %define _without_libvirtd --without-libvirtd
1271 %endif
1272
1273 %if ! %{with_uml}
1274     %define _without_uml --without-uml
1275 %endif
1276
1277 %if %{with_rhel5}
1278     %define _with_rhel5_api --with-rhel5-api
1279 %endif
1280
1281 %if ! %{with_interface}
1282     %define _without_interface --without-interface
1283 %endif
1284
1285 %if ! %{with_network}
1286     %define _without_network --without-network
1287 %endif
1288
1289 %if ! %{with_storage_fs}
1290     %define _without_storage_fs --without-storage-fs
1291 %endif
1292
1293 %if ! %{with_storage_lvm}
1294     %define _without_storage_lvm --without-storage-lvm
1295 %endif
1296
1297 %if ! %{with_storage_iscsi}
1298     %define _without_storage_iscsi --without-storage-iscsi
1299 %endif
1300
1301 %if ! %{with_storage_disk}
1302     %define _without_storage_disk --without-storage-disk
1303 %endif
1304
1305 %if ! %{with_storage_mpath}
1306     %define _without_storage_mpath --without-storage-mpath
1307 %endif
1308
1309 %if ! %{with_storage_rbd}
1310     %define _without_storage_rbd --without-storage-rbd
1311 %endif
1312
1313 %if ! %{with_storage_sheepdog}
1314     %define _without_storage_sheepdog --without-storage-sheepdog
1315 %endif
1316
1317 %if ! %{with_storage_gluster}
1318     %define _without_storage_gluster --without-storage-gluster
1319 %endif
1320
1321 %if ! %{with_numactl}
1322     %define _without_numactl --without-numactl
1323 %endif
1324
1325 %if ! %{with_numad}
1326     %define _without_numad --without-numad
1327 %endif
1328
1329 %if ! %{with_capng}
1330     %define _without_capng --without-capng
1331 %endif
1332
1333 %if ! %{with_fuse}
1334     %define _without_fuse --without-fuse
1335 %endif
1336
1337 %if ! %{with_netcf}
1338     %define _without_netcf --without-netcf
1339 %endif
1340
1341 %if ! %{with_selinux}
1342     %define _without_selinux --without-selinux
1343 %endif
1344
1345 %if ! %{with_apparmor}
1346     %define _without_apparmor --without-apparmor
1347 %endif
1348
1349 %if ! %{with_hal}
1350     %define _without_hal --without-hal
1351 %endif
1352
1353 %if ! %{with_udev}
1354     %define _without_udev --without-udev
1355 %endif
1356
1357 %if ! %{with_yajl}
1358     %define _without_yajl --without-yajl
1359 %endif
1360
1361 %if ! %{with_sanlock}
1362     %define _without_sanlock --without-sanlock
1363 %endif
1364
1365 %if ! %{with_libpcap}
1366     %define _without_libpcap --without-libpcap
1367 %endif
1368
1369 %if ! %{with_macvtap}
1370     %define _without_macvtap --without-macvtap
1371 %endif
1372
1373 %if ! %{with_audit}
1374     %define _without_audit --without-audit
1375 %endif
1376
1377 %if ! %{with_dtrace}
1378     %define _without_dtrace --without-dtrace
1379 %endif
1380
1381 %if ! %{with_driver_modules}
1382     %define _without_driver_modules --without-driver-modules
1383 %endif
1384
1385 %if %{with_firewalld}
1386     %define _with_firewalld --with-firewalld
1387 %endif
1388
1389 %if ! %{with_wireshark}
1390     %define _without_wireshark --without-wireshark-dissector
1391 %endif
1392
1393 %if ! %{with_systemd_daemon}
1394     %define _without_systemd_daemon --without-systemd-daemon
1395 %endif
1396
1397 %if ! %{with_pm_utils}
1398     %define _without_pm_utils --without-pm-utils
1399 %endif
1400
1401 %define when  %(date +"%%F-%%T")
1402 %define where %(hostname)
1403 %define who   %{?packager}%{!?packager:Unknown}
1404 %define with_packager --with-packager="%{who}, %{when}, %{where}"
1405 %define with_packager_version --with-packager-version="%{release}"
1406
1407 %if %{with_systemd}
1408     %define init_scripts --with-init_script=systemd
1409 %else
1410     %define init_scripts --with-init_script=redhat
1411 %endif
1412
1413 %if %{with_selinux}
1414     %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
1415         %define with_selinux_mount --with-selinux-mount="/sys/fs/selinux"
1416     %else
1417         %define with_selinux_mount --with-selinux-mount="/selinux"
1418     %endif
1419 %endif
1420
1421 # place macros above and build commands below this comment
1422
1423 %if 0%{?enable_autotools}
1424  autoreconf -if
1425 %endif
1426
1427 rm -f po/stamp-po
1428 %configure %{?_without_xen} \
1429            %{?_without_qemu} \
1430            %{?_without_openvz} \
1431            %{?_without_lxc} \
1432            %{?_without_vbox} \
1433            %{?_without_libxl} \
1434            %{?_without_xenapi} \
1435            %{?_without_sasl} \
1436            %{?_without_avahi} \
1437            %{?_without_polkit} \
1438            %{?_without_libvirtd} \
1439            %{?_without_uml} \
1440            %{?_without_phyp} \
1441            %{?_without_esx} \
1442            %{?_without_hyperv} \
1443            %{?_without_vmware} \
1444            %{?_without_parallels} \
1445            --without-bhyve \
1446            %{?_without_interface} \
1447            %{?_without_network} \
1448            %{?_with_rhel5_api} \
1449            %{?_without_storage_fs} \
1450            %{?_without_storage_lvm} \
1451            %{?_without_storage_iscsi} \
1452            %{?_without_storage_disk} \
1453            %{?_without_storage_mpath} \
1454            %{?_without_storage_rbd} \
1455            %{?_without_storage_sheepdog} \
1456            %{?_without_storage_gluster} \
1457            %{?_without_numactl} \
1458            %{?_without_numad} \
1459            %{?_without_capng} \
1460            %{?_without_fuse} \
1461            %{?_without_netcf} \
1462            %{?_without_selinux} \
1463            %{?_with_selinux_mount} \
1464            %{?_without_apparmor} \
1465            %{?_without_hal} \
1466            %{?_without_udev} \
1467            %{?_without_yajl} \
1468            %{?_without_sanlock} \
1469            %{?_without_libpcap} \
1470            %{?_without_macvtap} \
1471            %{?_without_audit} \
1472            %{?_without_dtrace} \
1473            %{?_without_driver_modules} \
1474            %{?_with_firewalld} \
1475            %{?_without_wireshark} \
1476            %{?_without_systemd_daemon} \
1477            %{?_without_pm_utils} \
1478            %{with_packager} \
1479            %{with_packager_version} \
1480            --with-qemu-user=%{qemu_user} \
1481            --with-qemu-group=%{qemu_group} \
1482            %{?enable_werror} \
1483            --enable-expensive-tests \
1484            %{init_scripts}
1485 make %{?_smp_mflags}
1486 gzip -9 ChangeLog
1487
1488 %install
1489 rm -fr %{buildroot}
1490
1491 # Avoid using makeinstall macro as it changes prefixes rather than setting
1492 # DESTDIR. Newer make_install macro would be better but it's not available
1493 # on RHEL 5, thus we need to expand it here.
1494 make install DESTDIR=%{?buildroot} SYSTEMD_UNIT_DIR=%{_unitdir}
1495
1496 for i in object-events dominfo domsuspend hellolibvirt openauth xml/nwfilter systemtap dommigrate
1497 do
1498   (cd examples/$i ; make clean ; rm -rf .deps .libs Makefile Makefile.in)
1499 done
1500 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
1501 rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
1502 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la
1503 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a
1504 %if %{with_driver_modules}
1505 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la
1506 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a
1507 %endif
1508 %if %{with_wireshark}
1509 rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.la
1510 %endif
1511
1512 %if %{with_network}
1513 install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/
1514 # We don't want to install /etc/libvirt/qemu/networks in the main %files list
1515 # because if the admin wants to delete the default network completely, we don't
1516 # want to end up re-incarnating it on every RPM upgrade.
1517 install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/
1518 cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \
1519    $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
1520 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
1521 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
1522 # Strip auto-generated UUID - we need it generated per-install
1523 sed -i -e "/<uuid>/d" $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
1524 %else
1525 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
1526 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
1527 %endif
1528 %if ! %{with_qemu}
1529 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug
1530 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
1531 %endif
1532 %find_lang %{name}
1533
1534 %if ! %{with_sanlock}
1535 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirt_sanlock.aug
1536 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
1537 %endif
1538
1539 %if ! %{with_lxc}
1540 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug
1541 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
1542 %endif
1543
1544 %if ! %{with_qemu}
1545 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf
1546 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
1547 %endif
1548 %if ! %{with_lxc}
1549 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
1550 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc
1551 %endif
1552 %if ! %{with_uml}
1553 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
1554 %endif
1555
1556 # Copied into libvirt-docs subpackage eventually
1557 mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version} libvirt-docs
1558
1559 %if %{with_dtrace}
1560     %ifarch %{power64} s390x x86_64 ia64 alpha sparc64
1561 mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \
1562    $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp
1563 mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
1564    $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes-64.stp
1565     %endif
1566 %endif
1567
1568 %if 0%{?fedora} < 14 && 0%{?rhel} < 6
1569 rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/libvirtd.conf
1570 %endif
1571
1572 %clean
1573 rm -fr %{buildroot}
1574
1575 %check
1576 cd tests
1577 make
1578 # These tests don't current work in a mock build root
1579 for i in nodeinfotest seclabeltest
1580 do
1581   rm -f $i
1582   printf 'int main(void) { return 0; }' > $i.c
1583   printf '#!/bin/sh\nexit 0\n' > $i
1584   chmod +x $i
1585 done
1586 if ! make check VIR_TEST_DEBUG=1
1587 then
1588   cat test-suite.log || true
1589   exit 1
1590 fi
1591
1592 %if %{with_libvirtd}
1593     %if ! %{with_driver_modules}
1594         %if %{with_qemu}
1595 %pre daemon
1596             %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
1597 # We want soft static allocation of well-known ids, as disk images
1598 # are commonly shared across NFS mounts by id rather than name; see
1599 # https://fedoraproject.org/wiki/Packaging:UsersAndGroups
1600 getent group kvm >/dev/null || groupadd -f -g 36 -r kvm
1601 getent group qemu >/dev/null || groupadd -f -g 107 -r qemu
1602 if ! getent passwd qemu >/dev/null; then
1603   if ! getent passwd 107 >/dev/null; then
1604     useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu
1605   else
1606     useradd -r -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu
1607   fi
1608 fi
1609 exit 0
1610             %endif
1611         %endif
1612     %endif
1613
1614 %post daemon
1615
1616     %if %{with_network}
1617 # All newly defined networks will have a mac address for the bridge
1618 # auto-generated, but networks already existing at the time of upgrade
1619 # will not. We need to go through all the network configs, look for
1620 # those that don't have a mac address, and add one.
1621
1622 network_files=$( (cd %{_localstatedir}/lib/libvirt/network && \
1623                   grep -L "mac address" *.xml; \
1624                   cd %{_sysconfdir}/libvirt/qemu/networks && \
1625                   grep -L "mac address" *.xml) 2>/dev/null \
1626                 | sort -u)
1627
1628 for file in $network_files
1629 do
1630    # each file exists in either the config or state directory (or both) and
1631    # does not have a mac address specified in either. We add the same mac
1632    # address to both files (or just one, if the other isn't there)
1633
1634    mac4=`printf '%X' $(($RANDOM % 256))`
1635    mac5=`printf '%X' $(($RANDOM % 256))`
1636    mac6=`printf '%X' $(($RANDOM % 256))`
1637    for dir in %{_localstatedir}/lib/libvirt/network \
1638               %{_sysconfdir}/libvirt/qemu/networks
1639    do
1640       if test -f $dir/$file
1641       then
1642          sed -i.orig -e \
1643            "s|\(<bridge.*$\)|\0\n  <mac address='52:54:00:$mac4:$mac5:$mac6'/>|" \
1644            $dir/$file
1645          if test $? != 0
1646          then
1647              echo "failed to add <mac address='52:54:00:$mac4:$mac5:$mac6'/>" \
1648                   "to $dir/$file"
1649              mv -f $dir/$file.orig $dir/$file
1650          else
1651              rm -f $dir/$file.orig
1652          fi
1653       fi
1654    done
1655 done
1656     %endif
1657
1658     %if %{with_systemd}
1659         %if %{with_systemd_macros}
1660             %systemd_post virtlockd.socket libvirtd.service
1661         %else
1662 if [ $1 -eq 1 ] ; then
1663     # Initial installation
1664     /bin/systemctl enable virtlockd.socket libvirtd.service >/dev/null 2>&1 || :
1665 fi
1666         %endif
1667     %else
1668         %if %{with_cgconfig}
1669 # Starting with Fedora 16/RHEL-7, systemd automounts all cgroups,
1670 # and cgconfig is no longer a necessary service.
1671             %if (0%{?rhel} && 0%{?rhel} < 7) || (0%{?fedora} && 0%{?fedora} < 16)
1672 if [ "$1" -eq "1" ]; then
1673 /sbin/chkconfig cgconfig on
1674 fi
1675             %endif
1676         %endif
1677
1678 /sbin/chkconfig --add libvirtd
1679 /sbin/chkconfig --add virtlockd
1680     %endif
1681
1682 %preun daemon
1683     %if %{with_systemd}
1684         %if %{with_systemd_macros}
1685             %systemd_preun libvirtd.service virtlockd.socket virtlockd.service
1686         %else
1687 if [ $1 -eq 0 ] ; then
1688     # Package removal, not upgrade
1689     /bin/systemctl --no-reload disable libvirtd.service virtlockd.socket virtlockd.service > /dev/null 2>&1 || :
1690     /bin/systemctl stop libvirtd.service virtlockd.socket virtlockd.service > /dev/null 2>&1 || :
1691 fi
1692         %endif
1693     %else
1694 if [ $1 = 0 ]; then
1695     /sbin/service libvirtd stop 1>/dev/null 2>&1
1696     /sbin/chkconfig --del libvirtd
1697     /sbin/service virtlockd stop 1>/dev/null 2>&1
1698     /sbin/chkconfig --del virtlockd
1699 fi
1700     %endif
1701
1702 %postun daemon
1703     %if %{with_systemd}
1704 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1705 if [ $1 -ge 1 ] ; then
1706     /bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || :
1707     /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
1708 fi
1709     %else
1710 if [ $1 -ge 1 ]; then
1711     /sbin/service virtlockd reload > /dev/null 2>&1 || :
1712     /sbin/service libvirtd condrestart > /dev/null 2>&1
1713 fi
1714     %endif
1715
1716     %if %{with_systemd}
1717     %else
1718 %triggerpostun daemon -- libvirt-daemon < 1.2.1
1719 if [ "$1" -ge "1" ]; then
1720     /sbin/service virtlockd reload > /dev/null 2>&1 || :
1721     /sbin/service libvirtd condrestart > /dev/null 2>&1
1722 fi
1723     %endif
1724
1725     %if %{with_network}
1726 %post daemon-config-network
1727 if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then
1728     UUID=`/usr/bin/uuidgen`
1729     sed -e "s,</name>,</name>\n  <uuid>$UUID</uuid>," \
1730          < %{_datadir}/libvirt/networks/default.xml \
1731          > %{_sysconfdir}/libvirt/qemu/networks/default.xml
1732     ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
1733 fi
1734     %endif
1735
1736     %if %{with_systemd}
1737 %triggerun -- libvirt < 0.9.4
1738 %{_bindir}/systemd-sysv-convert --save libvirtd >/dev/null 2>&1 ||:
1739
1740 # If the package is allowed to autostart:
1741 /bin/systemctl --no-reload enable libvirtd.service >/dev/null 2>&1 ||:
1742
1743 # Run these because the SysV package being removed won't do them
1744 /sbin/chkconfig --del libvirtd >/dev/null 2>&1 || :
1745 /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
1746     %endif
1747
1748     %if %{with_driver_modules}
1749         %if %{with_qemu}
1750 %pre daemon-driver-qemu
1751             %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
1752 # We want soft static allocation of well-known ids, as disk images
1753 # are commonly shared across NFS mounts by id rather than name; see
1754 # https://fedoraproject.org/wiki/Packaging:UsersAndGroups
1755 getent group kvm >/dev/null || groupadd -f -g 36 -r kvm
1756 getent group qemu >/dev/null || groupadd -f -g 107 -r qemu
1757 if ! getent passwd qemu >/dev/null; then
1758   if ! getent passwd 107 >/dev/null; then
1759     useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu
1760   else
1761     useradd -r -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu
1762   fi
1763 fi
1764 exit 0
1765             %endif
1766         %endif
1767     %endif
1768 %endif # %{with_libvirtd}
1769
1770 %preun client
1771
1772 %if %{with_systemd}
1773     %if %{with_systemd_macros}
1774         %systemd_preun libvirt-guests.service
1775     %endif
1776 %else
1777 if [ $1 = 0 ]; then
1778     /sbin/chkconfig --del libvirt-guests
1779     rm -f /var/lib/libvirt/libvirt-guests
1780 fi
1781 %endif
1782
1783 %post client
1784
1785 /sbin/ldconfig
1786 %if %{with_systemd}
1787     %if %{with_systemd_macros}
1788         %systemd_post libvirt-guests.service
1789     %endif
1790 %else
1791 /sbin/chkconfig --add libvirt-guests
1792 %endif
1793
1794 %postun client
1795
1796 /sbin/ldconfig
1797 %if %{with_systemd}
1798     %if %{with_systemd_macros}
1799         %systemd_postun libvirt-guests.service
1800     %endif
1801 %triggerun client -- libvirt < 0.9.4
1802 %{_bindir}/systemd-sysv-convert --save libvirt-guests >/dev/null 2>&1 ||:
1803
1804 # If the package is allowed to autostart:
1805 /bin/systemctl --no-reload enable libvirt-guests.service >/dev/null 2>&1 ||:
1806
1807 # Run this because the SysV package being removed won't do them
1808 /sbin/chkconfig --del libvirt-guests >/dev/null 2>&1 || :
1809 %endif
1810
1811 %if %{with_sanlock}
1812 %post lock-sanlock
1813 if getent group sanlock > /dev/null ; then
1814     chmod 0770 %{_localstatedir}/lib/libvirt/sanlock
1815     chown root:sanlock %{_localstatedir}/lib/libvirt/sanlock
1816 fi
1817 %endif
1818
1819 %if %{with_lxc}
1820 %pre login-shell
1821 getent group virtlogin >/dev/null || groupadd -r virtlogin
1822 exit 0
1823 %endif
1824
1825 %files
1826 %defattr(-, root, root)
1827
1828 %files docs
1829 %defattr(-, root, root)
1830 %doc AUTHORS ChangeLog.gz NEWS README TODO libvirt-docs/*
1831
1832 # API docs
1833 %dir %{_datadir}/gtk-doc/html/libvirt/
1834 %doc %{_datadir}/gtk-doc/html/libvirt/*.devhelp
1835 %doc %{_datadir}/gtk-doc/html/libvirt/*.html
1836 %doc %{_datadir}/gtk-doc/html/libvirt/*.png
1837 %doc %{_datadir}/gtk-doc/html/libvirt/*.css
1838
1839 %if %{with_libvirtd}
1840 %files daemon
1841 %defattr(-, root, root)
1842
1843 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
1844
1845     %if %{with_systemd}
1846 %{_unitdir}/libvirtd.service
1847 %{_unitdir}/virtlockd.service
1848 %{_unitdir}/virtlockd.socket
1849     %else
1850 %{_sysconfdir}/rc.d/init.d/libvirtd
1851 %{_sysconfdir}/rc.d/init.d/virtlockd
1852     %endif
1853 %doc daemon/libvirtd.upstart
1854 %config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
1855 %config(noreplace) %{_sysconfdir}/sysconfig/virtlockd
1856 %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
1857 %config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
1858     %if 0%{?fedora} >= 14 || 0%{?rhel} >= 6
1859 %config(noreplace) %{_prefix}/lib/sysctl.d/libvirtd.conf
1860     %endif
1861
1862 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
1863 %dir %{_datadir}/libvirt/
1864
1865 %ghost %dir %{_localstatedir}/run/libvirt/
1866
1867 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
1868 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/
1869 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
1870 %dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/
1871
1872
1873 %dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver
1874 %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so
1875
1876 %{_datadir}/augeas/lenses/libvirtd.aug
1877 %{_datadir}/augeas/lenses/tests/test_libvirtd.aug
1878 %{_datadir}/augeas/lenses/virtlockd.aug
1879 %{_datadir}/augeas/lenses/tests/test_virtlockd.aug
1880 %{_datadir}/augeas/lenses/libvirt_lockd.aug
1881     %if %{with_qemu}
1882 %{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug
1883     %endif
1884
1885     %if %{with_polkit}
1886         %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
1887 %{_datadir}/polkit-1/actions/org.libvirt.unix.policy
1888 %{_datadir}/polkit-1/actions/org.libvirt.api.policy
1889         %else
1890 %{_datadir}/PolicyKit/policy/org.libvirt.unix.policy
1891         %endif
1892     %endif
1893
1894 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
1895
1896 %attr(0755, root, root) %{_libexecdir}/libvirt_iohelper
1897
1898     %if %{with_apparmor}
1899 %attr(0755, root, root) %{_libexecdir}/virt-aa-helper
1900     %endif
1901
1902 %attr(0755, root, root) %{_sbindir}/libvirtd
1903 %attr(0755, root, root) %{_sbindir}/virtlockd
1904
1905 %{_mandir}/man8/libvirtd.8*
1906 %{_mandir}/man8/virtlockd.8*
1907
1908     %if ! %{with_driver_modules}
1909         %if %{with_network} || %{with_qemu}
1910 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
1911         %endif
1912         %if %{with_network} || %{with_nwfilter}
1913 %ghost %dir %{_localstatedir}/run/libvirt/network/
1914         %endif
1915         %if %{with_network}
1916 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
1917 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
1918 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
1919 %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
1920         %endif
1921         %if %{with_nwfilter}
1922 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
1923         %endif
1924         %if %{with_storage_disk}
1925 %attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
1926         %endif
1927         %if %{with_qemu}
1928 %config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
1929 %config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf
1930 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
1931 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
1932 %ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
1933 %dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
1934 %dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/channel/
1935 %dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/channel/target/
1936 %dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
1937 %{_datadir}/augeas/lenses/libvirtd_qemu.aug
1938 %{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
1939         %endif
1940         %if %{with_lxc}
1941 %config(noreplace) %{_sysconfdir}/libvirt/lxc.conf
1942 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc
1943 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
1944 %ghost %dir %{_localstatedir}/run/libvirt/lxc/
1945 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/
1946 %{_datadir}/augeas/lenses/libvirtd_lxc.aug
1947 %{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
1948 %attr(0755, root, root) %{_libexecdir}/libvirt_lxc
1949         %endif
1950         %if %{with_uml}
1951 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.uml
1952 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
1953 %ghost %dir %{_localstatedir}/run/libvirt/uml/
1954 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/
1955         %endif
1956         %if %{with_libxl}
1957 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/
1958 %ghost %dir %{_localstatedir}/run/libvirt/libxl/
1959 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
1960         %endif
1961         %if %{with_xen}
1962 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/xen/
1963         %endif
1964     %endif # ! %{with_driver_modules}
1965
1966     %if %{with_network}
1967 %files daemon-config-network
1968 %defattr(-, root, root)
1969 %dir %{_datadir}/libvirt/networks/
1970 %{_datadir}/libvirt/networks/default.xml
1971     %endif
1972
1973     %if %{with_nwfilter}
1974 %files daemon-config-nwfilter
1975 %defattr(-, root, root)
1976 %{_sysconfdir}/libvirt/nwfilter/*.xml
1977     %endif
1978
1979     %if %{with_driver_modules}
1980         %if %{with_interface}
1981 %files daemon-driver-interface
1982 %defattr(-, root, root)
1983 %{_libdir}/%{name}/connection-driver/libvirt_driver_interface.so
1984         %endif
1985
1986         %if %{with_network}
1987 %files daemon-driver-network
1988 %defattr(-, root, root)
1989 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
1990 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
1991 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
1992 %ghost %dir %{_localstatedir}/run/libvirt/network/
1993 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
1994 %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
1995 %{_libdir}/%{name}/connection-driver/libvirt_driver_network.so
1996         %endif
1997
1998         %if %{with_nodedev}
1999 %files daemon-driver-nodedev
2000 %defattr(-, root, root)
2001 %{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so
2002         %endif
2003
2004         %if %{with_nwfilter}
2005 %files daemon-driver-nwfilter
2006 %defattr(-, root, root)
2007 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
2008 %ghost %dir %{_localstatedir}/run/libvirt/network/
2009 %{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so
2010         %endif
2011
2012 %files daemon-driver-secret
2013 %defattr(-, root, root)
2014 %{_libdir}/%{name}/connection-driver/libvirt_driver_secret.so
2015
2016         %if %{with_storage}
2017 %files daemon-driver-storage
2018 %defattr(-, root, root)
2019             %if %{with_storage_disk}
2020 %attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
2021             %endif
2022 %{_libdir}/%{name}/connection-driver/libvirt_driver_storage.so
2023         %endif
2024
2025         %if %{with_qemu}
2026 %files daemon-driver-qemu
2027 %defattr(-, root, root)
2028 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
2029 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
2030 %config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
2031 %config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf
2032 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
2033 %ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
2034 %dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
2035 %dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/channel/
2036 %dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/channel/target/
2037 %dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
2038 %{_datadir}/augeas/lenses/libvirtd_qemu.aug
2039 %{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
2040 %{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so
2041         %endif
2042
2043         %if %{with_lxc}
2044 %files daemon-driver-lxc
2045 %defattr(-, root, root)
2046 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
2047 %config(noreplace) %{_sysconfdir}/libvirt/lxc.conf
2048 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc
2049 %ghost %dir %{_localstatedir}/run/libvirt/lxc/
2050 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/
2051 %{_datadir}/augeas/lenses/libvirtd_lxc.aug
2052 %{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
2053 %attr(0755, root, root) %{_libexecdir}/libvirt_lxc
2054 %{_libdir}/%{name}/connection-driver/libvirt_driver_lxc.so
2055         %endif
2056
2057         %if %{with_uml}
2058 %files daemon-driver-uml
2059 %defattr(-, root, root)
2060 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
2061 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.uml
2062 %ghost %dir %{_localstatedir}/run/libvirt/uml/
2063 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/
2064 %{_libdir}/%{name}/connection-driver/libvirt_driver_uml.so
2065         %endif
2066
2067         %if %{with_xen}
2068 %files daemon-driver-xen
2069 %defattr(-, root, root)
2070 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/xen/
2071 %{_libdir}/%{name}/connection-driver/libvirt_driver_xen.so
2072         %endif
2073
2074         %if %{with_libxl}
2075 %files daemon-driver-libxl
2076 %defattr(-, root, root)
2077 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/
2078 %ghost %dir %{_localstatedir}/run/libvirt/libxl/
2079 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
2080 %{_libdir}/%{name}/connection-driver/libvirt_driver_libxl.so
2081         %endif
2082
2083         %if %{with_vbox}
2084 %files daemon-driver-vbox
2085 %defattr(-, root, root)
2086 %{_libdir}/%{name}/connection-driver/libvirt_driver_vbox.so
2087         %endif
2088     %endif # %{with_driver_modules}
2089
2090     %if %{with_qemu_tcg}
2091 %files daemon-qemu
2092 %defattr(-, root, root)
2093     %endif
2094
2095     %if %{with_qemu_kvm}
2096 %files daemon-kvm
2097 %defattr(-, root, root)
2098     %endif
2099
2100     %if %{with_lxc}
2101 %files daemon-lxc
2102 %defattr(-, root, root)
2103     %endif
2104
2105     %if %{with_uml}
2106 %files daemon-uml
2107 %defattr(-, root, root)
2108     %endif
2109
2110     %if %{with_xen} || %{with_libxl}
2111 %files daemon-xen
2112 %defattr(-, root, root)
2113     %endif
2114
2115     %if %{with_vbox}
2116 %files daemon-vbox
2117 %defattr(-, root, root)
2118     %endif
2119 %endif # %{with_libvirtd}
2120
2121 %if %{with_sanlock}
2122 %files lock-sanlock
2123 %defattr(-, root, root)
2124     %if %{with_qemu}
2125 %config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf
2126     %endif
2127 %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so
2128 %{_datadir}/augeas/lenses/libvirt_sanlock.aug
2129 %{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
2130 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/sanlock
2131 %{_sbindir}/virt-sanlock-cleanup
2132 %{_mandir}/man8/virt-sanlock-cleanup.8*
2133 %attr(0755, root, root) %{_libexecdir}/libvirt_sanlock_helper
2134 %endif
2135
2136 %files client -f %{name}.lang
2137 %defattr(-, root, root)
2138 %doc COPYING COPYING.LESSER
2139
2140 %config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
2141 %{_mandir}/man1/virsh.1*
2142 %{_mandir}/man1/virt-xml-validate.1*
2143 %{_mandir}/man1/virt-pki-validate.1*
2144 %{_mandir}/man1/virt-host-validate.1*
2145 %{_bindir}/virsh
2146 %{_bindir}/virt-xml-validate
2147 %{_bindir}/virt-pki-validate
2148 %{_bindir}/virt-host-validate
2149 %{_libdir}/lib*.so.*
2150
2151 %if %{with_dtrace}
2152 %{_datadir}/systemtap/tapset/libvirt_probes*.stp
2153 %{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp
2154 %{_datadir}/systemtap/tapset/libvirt_functions.stp
2155 %endif
2156
2157 %dir %{_datadir}/libvirt/
2158 %dir %{_datadir}/libvirt/schemas/
2159
2160 %{_datadir}/libvirt/schemas/basictypes.rng
2161 %{_datadir}/libvirt/schemas/capability.rng
2162 %{_datadir}/libvirt/schemas/domain.rng
2163 %{_datadir}/libvirt/schemas/domaincommon.rng
2164 %{_datadir}/libvirt/schemas/domainsnapshot.rng
2165 %{_datadir}/libvirt/schemas/interface.rng
2166 %{_datadir}/libvirt/schemas/network.rng
2167 %{_datadir}/libvirt/schemas/networkcommon.rng
2168 %{_datadir}/libvirt/schemas/nodedev.rng
2169 %{_datadir}/libvirt/schemas/nwfilter.rng
2170 %{_datadir}/libvirt/schemas/secret.rng
2171 %{_datadir}/libvirt/schemas/storagecommon.rng
2172 %{_datadir}/libvirt/schemas/storagepool.rng
2173 %{_datadir}/libvirt/schemas/storagevol.rng
2174
2175 %{_datadir}/libvirt/cpu_map.xml
2176 %{_datadir}/libvirt/libvirtLogo.png
2177
2178 %if %{with_systemd}
2179 %{_unitdir}/libvirt-guests.service
2180 %else
2181 %{_sysconfdir}/rc.d/init.d/libvirt-guests
2182 %endif
2183 %config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
2184 %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh
2185 %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/
2186
2187 %if %{with_sasl}
2188 %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
2189 %endif
2190
2191 %if %{with_wireshark}
2192 %files wireshark
2193 %{_libdir}/wireshark/plugins/*/libvirt.so
2194 %endif
2195
2196 %if %{with_lxc}
2197 %files login-shell
2198 %attr(4750, root, virtlogin) %{_bindir}/virt-login-shell
2199 %config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf
2200 %{_mandir}/man1/virt-login-shell.1*
2201 %endif
2202
2203 %files devel
2204 %defattr(-, root, root)
2205
2206 %{_libdir}/lib*.so
2207 %dir %{_includedir}/libvirt
2208 %{_includedir}/libvirt/*.h
2209 %{_libdir}/pkgconfig/libvirt.pc
2210
2211 %dir %{_datadir}/libvirt/api/
2212 %{_datadir}/libvirt/api/libvirt-api.xml
2213 %{_datadir}/libvirt/api/libvirt-qemu-api.xml
2214 %{_datadir}/libvirt/api/libvirt-lxc-api.xml
2215
2216 %doc docs/*.html docs/html docs/*.gif
2217 %doc docs/libvirt-api.xml
2218 %doc examples/hellolibvirt
2219 %doc examples/object-events
2220 %doc examples/dominfo
2221 %doc examples/domsuspend
2222 %doc examples/dommigrate
2223 %doc examples/openauth
2224 %doc examples/xml
2225 %doc examples/systemtap
2226
2227 %changelog
2228 * Sun May  4 2014 Daniel Veillard <veillard@redhat.com> - 1.2.4-1
2229 - various improvements and bug fixes
2230 - lot of internal code refactoring
2231
2232 * Tue Apr  1 2014 Daniel Veillard <veillard@redhat.com> - 1.2.3-1
2233 - add new virDomainCoreDumpWithFormat API
2234 - conf: Introduce virDomainDeviceGetInfo API
2235 - more features and fixes on bhyve driver
2236 - lot of cleanups and improvement on the Xen driver
2237 - a lot of various improvements and bug fixes
2238
2239 * Sun Mar  2 2014 Daniel Veillard <veillard@redhat.com> - 1.2.2-1
2240 - add LXC from native conversion tool
2241 - vbox: add support for v4.2.20+ and v4.3.4+
2242 - Introduce Libvirt Wireshark dissector
2243 - Fix CVE-2013-6456: Avoid unsafe use of /proc/$PID/root in LXC
2244 - a lot of various improvements and bug fixes
2245
2246 * Thu Jan 16 2014 Daniel Veillard <veillard@redhat.com> - 1.2.1-1
2247 - Fix s CVE-2014-0028 event: filter global events by domain:getattr ACL
2248 - Fix CVE-2014-1447 Don't crash if a connection closes early
2249 - Fix CVE-2013-6458-1 qemu: Do not access stale data in virDomainBlockStats
2250 - Fix CVE-2013-6457 libxl: avoid crashing if calling `virsh numatune' on inactive domain
2251 - Fix CVE-2013-6436: fix crash in lxcDomainGetMemoryParameters
2252 - many doc and bug fixes and improvements
2253
2254 * Mon Dec  2 2013 Daniel Veillard <veillard@redhat.com> - 1.2.0-1
2255 - Separation of python binding as libvirt-python srpm
2256 - Add support for gluster pool
2257 - vbox: add support for 4.3 APIs
2258 - a number of doc, bug fixes and various improvements
2259
2260 * Mon Nov  4 2013 Daniel Veillard <veillard@redhat.com> - 1.1.4-1
2261 - Add support for AArch64 architecture
2262 - Various improvements on test code and test driver
2263 - 4 security bug fixes
2264 - a lot of bug fixes and various improvements
2265
2266 * Tue Oct  1 2013 Daniel Veillard <veillard@redhat.com> - 1.1.3-1
2267 - VMware: Initial VMware Fusion support and various improvements
2268 - libvirt: add new public API virConnectGetCPUModelNames
2269 - various libxl driver improvements
2270 - LXC many container driver improvement
2271 - ARM cpu improvements
2272 - 3 security bug fixes
2273 - a lot of bug and leak fixes and various improvements
2274
2275 * Mon Sep  2 2013 Daniel Veillard <veillard@redhat.com> - 1.1.2-1
2276 - various improvements to libxl driver
2277 - systemd integration improvements
2278 - Add flag to BaselineCPU API to return detailed CPU features
2279 - Introduce a virt-login-shell binary
2280 - conf: add startupPolicy attribute for harddisk
2281 - various bug fixes and improvements including localizations
2282
2283 * Tue Jul 30 2013 Daniel Veillard <veillard@redhat.com> - 1.1.1-1
2284 - Adding device removal or deletion events
2285 - Introduce new domain create APIs to pass pre-opened FDs to LXC
2286 - Add interface versions for Xen 4.3
2287 - Add new public API virDomainSetMemoryStatsPeriod
2288 - Various LXC improvements
2289 - various bug fixes and improvements including localizations
2290
2291 * Mon Jul  1 2013 Daniel Veillard <veillard@redhat.com> - 1.1.0-1
2292 - CVE-2013-2218: Fix crash listing network interfaces with filters
2293 - Fine grained ACL support for the API
2294 - Extensible migration APIs
2295 - various improvements in the Xen driver
2296 - agent based vCPU hotplug support
2297 - various bug fixes and improvements including localizations
2298
2299 * Mon Jun  3 2013 Daniel Veillard <veillard@redhat.com> - 1.0.6-1
2300 - Move VirtualBox driver into libvirtd
2301 - Support for static routes on a virtual bridge
2302 - Various improvement for hostdev SCSI support
2303 - Switch to VIR_STRDUP and VIR_STRNDUP
2304 - Various cleanups and improvement in Xen and LXC drivers
2305 - various bug fixes and improvements including localizations
2306
2307 * Thu May  2 2013 Daniel Veillard <veillard@redhat.com> - 1.0.5-1
2308 - add support for NVRAM device
2309 - Add XML config for resource partitions
2310 - Add support for TPM
2311 - NPIV storage migration support
2312 - various bug fixes and improvements including localizations
2313
2314 * Mon Apr  1 2013 Daniel Veillard <veillard@redhat.com> - 1.0.4-1
2315 - qemu: support passthrough for iscsi disks
2316 - various S390 improvements
2317 - various LXC bugs fixes and improvements
2318 - Add API for thread cancellation
2319 - various bug fixes and improvements
2320
2321 * Tue Mar  5 2013 Daniel Veillard <veillard@redhat.com> - 1.0.3-1
2322 - Introduce virDomainMigrate*CompressionCache APIs
2323 - Introduce virDomainGetJobStats API
2324 - Add basic support for VDI images
2325 - Introduce API virNodeDeviceLookupSCSIHostByWWN
2326 - Various locking improvements
2327 - a lot of bug fixes and overall improvements
2328
2329 * Wed Jan 30 2013 Daniel Veillard <veillard@redhat.com> - 1.0.2-1
2330 - LXC improvements
2331 - S390 architecture improvement
2332 - Power architecture improvement
2333 - large Coverity report cleanups and associated bug fixes
2334 - virTypedParams* APIs to helps with those data structures
2335 - a lot of bug fixes and overall improvements
2336
2337 * Fri Nov  2 2012 Daniel Veillard <veillard@redhat.com> - 1.0.0-1
2338 - virNodeGetCPUMap: Define public API
2339 - Add systemd journal support
2340 - Add a qemu capabilities cache manager
2341 - USB migration support
2342 - various improvement and fixes when using QMP QEmu interface
2343 - Support for Xen 4.2
2344 - Lot of localization enhancements
2345 - a lot of bug fixes, improvements and portability work
2346
2347 * Mon Sep 24 2012 Daniel Veillard <veillard@redhat.com> - 0.10.2-1
2348 - network: define new API virNetworkUpdate
2349 - add support for QEmu sandbox support
2350 - blockjob: add virDomainBlockCommit
2351 - New APIs to get/set Node memory parameters
2352 - new API virConnectListAllSecrets
2353 - new API virConnectListAllNWFilters
2354 - new API virConnectListAllNodeDevices
2355 - parallels: add support of containers to the driver
2356 - new API virConnectListAllInterfaces
2357 - new API virConnectListAllNetworks
2358 - new API virStoragePoolListAllVolumes
2359 - Add PMSUSPENDED life cycle event
2360 - new API virStorageListAllStoragePools
2361 - Add per-guest S3/S4 state configuration
2362 - qemu: Support for Block Device IO Limits
2363 - a lot of bug fixes, improvements and portability work
2364
2365 * Fri Aug 31 2012 Daniel Veillard <veillard@redhat.com> - 0.10.1-1
2366 - bugfixes and a brown paper bag
2367
2368 * Wed Aug 29 2012 Daniel Veillard <veillard@redhat.com> - 0.10.0-1
2369 - agent: add qemuAgentArbitraryCommand() for general qemu agent command
2370 - Introduce virDomainPinEmulator and virDomainGetEmulatorPinInfo functions
2371 - network: use firewalld instead of iptables, when available
2372 - network: make network driver vlan-aware
2373 - esx: Implement network driver
2374 - driver for parallels hypervisor
2375 - Various LXC improvements
2376 - Add virDomainGetHostname
2377 - a lot of bug fixes, improvements and portability work
2378
2379 * Mon Jul  2 2012 Daniel Veillard <veillard@redhat.com> - 0.9.13-1
2380 - S390: support for s390(x)
2381 - snapshot: implement new APIs for esx and vbox
2382 - snapshot: new query APIs and many improvements
2383 - virsh: Allow users to reedit rejected XML
2384 - nwfilter: add DHCP snooping
2385 - Enable driver modules in libvirt RPM
2386 - Default to enable driver modules for libvirtd
2387 - storage backend: Add RBD (RADOS Block Device) support
2388 - sVirt support for LXC domains inprovement
2389 - a lot of bug fixes, improvements and portability work
2390
2391 * Mon May 14 2012 Daniel Veillard <veillard@redhat.com> - 0.9.12-1
2392 - qemu: allow snapshotting of sheepdog and rbd disks
2393 - blockjob: add new APIs
2394 - a lot of bug fixes, improvements and portability work
2395
2396 * Tue Apr  3 2012 Daniel Veillard <veillard@redhat.com> - 0.9.11-1
2397 - Add support for the suspend event
2398 - Add support for event tray moved of removable disks
2399 - qemu: Support numad
2400 - cpustats: API, improvements and qemu support
2401 - qemu: support type='hostdev' network devices at domain start
2402 - Introduce virDomainPMWakeup API
2403 - network: support Open vSwitch
2404 - a number of snapshot improvements
2405 - many improvements and bug fixes
2406
2407 * Mon Feb 13 2012 Daniel Veillard <veillard@redhat.com> - 0.9.10-1
2408 - Add support for sVirt in the LXC driver
2409 - block rebase: add new API virDomainBlockRebase
2410 - API: Add api to set and get domain metadata
2411 - virDomainGetDiskErrors public API
2412 - conf: add rawio attribute to disk element of domain XML
2413 - Add new public API virDomainGetCPUStats()
2414 - Introduce virDomainPMSuspendForDuration API
2415 - resize: add virStorageVolResize() API
2416 - Add a virt-host-validate command to sanity check HV config
2417 - Add new virDomainShutdownFlags API
2418 - QEMU guest agent support
2419 - many improvements and bug fixes
2420
2421 * Sat Jan  7 2012 Daniel Veillard <veillard@redhat.com> - 0.9.9-1
2422 - Add API virDomain{S,G}etInterfaceParameters
2423 - Add API virDomain{G, S}etNumaParameters
2424 - Add support for ppc64 qemu
2425 - Support Xen domctl v8
2426 - many improvements and bug fixes
2427
2428 * Thu Dec  8 2011 Daniel Veillard <veillard@redhat.com> - 0.9.8-1
2429 - Add support for QEMU 1.0
2430 - Add preliminary PPC cpu driver
2431 - Add new API virDomain{Set, Get}BlockIoTune
2432 - block_resize: Define the new API
2433 - Add a public API to invoke suspend/resume on the host
2434 - various improvements for LXC containers
2435 - Define keepalive protocol and add virConnectIsAlive API
2436 - Add support for STP and VLAN filtering
2437 - many improvements and bug fixes
2438
2439 * Tue Nov  8 2011 Daniel Veillard <veillard@redhat.com> - 0.9.7-1
2440 - esx: support vSphere 5.x
2441 - vbox: support for VirtualBox 4.1
2442 - Introduce the virDomainOpenGraphics API
2443 - Add AHCI support to qemu driver
2444 - snapshot: many improvements and 2 new APIs
2445 - api: Add public api for 'reset'
2446 - many improvements and bug fixes
2447
2448 * Thu Sep 22 2011 Daniel Veillard <veillard@redhat.com> - 0.9.6-1
2449 - Fix the qemu reboot bug and a few others bug fixes
2450
2451 * Tue Sep 20 2011 Daniel Veillard <veillard@redhat.com> - 0.9.5-1
2452 - many snapshot improvements (Eric Blake)
2453 - latency: Define new public API and structure (Osier Yang)
2454 - USB2 and various USB improvements (Marc-André Lureau)
2455 - storage: Add fs pool formatting (Osier Yang)
2456 - Add public API for getting migration speed (Jim Fehlig)
2457 - Add basic driver for Microsoft Hyper-V (Matthias Bolte)
2458 - many improvements and bug fixes
2459
2460 * Wed Aug  3 2011 Daniel Veillard <veillard@redhat.com> - 0.9.4-1
2461 - network bandwidth QoS control
2462 - Add new API virDomainBlockPull*
2463 - save: new API to manipulate save file images
2464 - CPU bandwidth limits support
2465 - allow to send NMI and key event to guests
2466 - new API virDomainUndefineFlags
2467 - Implement code to attach to external QEMU instances
2468 - bios: Add support for SGA
2469 - various missing python binding
2470 - many improvements and bug fixes
2471
2472 * Mon Jul  4 2011 Daniel Veillard <veillard@redhat.com> - 0.9.3-1
2473 - new API virDomainGetVcpupinInfo
2474 - Add TXT record support for virtual DNS service
2475 - Support reboots with the QEMU driver
2476 - New API virDomainGetControlInfo API
2477 - New API virNodeGetMemoryStats
2478 - New API virNodeGetCPUTime
2479 - New API for send-key
2480 - New API virDomainPinVcpuFlags
2481 - support multifunction PCI device
2482 - lxc: various improvements
2483 - many improvements and bug fixes
2484
2485 * Mon Jun  6 2011 Daniel Veillard <veillard@redhat.com> - 0.9.2-1
2486 - Framework for lock manager plugins
2487 - API for network config change transactions
2488 - flags for setting memory parameters
2489 - virDomainGetState public API
2490 - qemu: allow blkstat/blkinfo calls during migration
2491 - Introduce migration v3 API
2492 - Defining the Screenshot public API
2493 - public API for NMI injection
2494 - Various improvements and bug fixes
2495
2496 * Thu May  5 2011 Daniel Veillard <veillard@redhat.com> - 0.9.1-1
2497 - support various persistent domain updates
2498 - improvements on memory APIs
2499 - Add virDomainEventRebootNew
2500 - various improvements to libxl driver
2501 - Spice: support audio, images and stream compression
2502 - Various improvements and bug fixes
2503
2504 * Mon Apr  4 2011 Daniel Veillard <veillard@redhat.com> - 0.9.0-1
2505 - Support cputune cpu usage tuning
2506 - Add public APIs for storage volume upload/download
2507 - Add public API for setting migration speed on the fly
2508 - Add libxenlight driver
2509 - qemu: support migration to fd
2510 - libvirt: add virDomain{Get,Set}BlkioParameters
2511 - setmem: introduce a new libvirt API (virDomainSetMemoryFlags)
2512 - Expose event loop implementation as a public API
2513 - Dump the debug buffer to libvirtd.log on fatal signal
2514 - Audit support
2515 - Various improvements and bug fixes
2516
2517 * Thu Feb 17 2011 Daniel Veillard <veillard@redhat.com> - 0.8.8-1
2518 - expose new API for sysinfo extraction
2519 - cgroup blkio weight support
2520 - smartcard device support
2521 - qemu: Support per-device boot ordering
2522 - Various improvements and bug fixes
2523
2524 * Tue Jan  4 2011 Daniel Veillard <veillard@redhat.com> - 0.8.7-1
2525 - Preliminary support for VirtualBox 4.0
2526 - IPv6 support
2527 - Add VMware Workstation and Player driver driver
2528 - Add network disk support
2529 - Various improvements and bug fixes
2530
2531 * Tue Nov 30 2010 Daniel Veillard <veillard@redhat.com> - 0.8.6-1
2532 - Add support for iSCSI target auto-discovery
2533 - QED: Basic support for QED images
2534 - remote console support
2535 - support for SPICE graphics
2536 - sysinfo and VMBIOS support
2537 - virsh qemu-monitor-command
2538 - various improvements and bug fixes
2539
2540 * Fri Oct 29 2010 Daniel Veillard <veillard@redhat.com> - 0.8.5-1
2541 - Enable JSON and netdev features in QEMU >= 0.13
2542 - framework for auditing integration
2543 - framework DTrace/SystemTap integration
2544 - Setting the number of vcpu at boot
2545 - Enable support for nested SVM
2546 - Virtio plan9fs filesystem QEMU
2547 - Memory parameter controls
2548 - various improvements and bug fixes
2549
2550 * Fri Sep 10 2010 Daniel Veillard <veillard@redhat.com> - 0.8.4-1
2551 - big improvements to UML driver
2552 - various improvements and bug fixes
2553
2554 * Wed Aug  4 2010 Daniel Veillard <veillard@redhat.com> - 0.8.3-1
2555 - esx: Support vSphere 4.1
2556 - Qemu arbitrary monitor commands
2557 - Qemu Monitor API entry point
2558 - various improvements and bug fixes
2559
2560 * Mon Jul  5 2010 Daniel Veillard <veillard@redhat.com> - 0.8.2-1
2561 - phyp: adding support for IVM
2562 - libvirt: introduce domainCreateWithFlags API
2563 - add 802.1Qbh and 802.1Qbg switches handling
2564 - Support for VirtualBox version 3.2
2565 - Init script for handling guests on shutdown/boot
2566 - qemu: live migration with non-shared storage for kvm
2567
2568 * Fri Apr 30 2010 Daniel Veillard <veillard@redhat.com> - 0.8.1-1
2569 - Starts dnsmasq from libvirtd with --dhcp-hostsfile
2570 - Add virDomainGetBlockInfo API to query disk sizing
2571 - a lot of bug fixes and cleanups
2572
2573 * Mon Apr 12 2010 Daniel Veillard <veillard@redhat.com> - 0.8.0-1
2574 - Snapshotting support (QEmu/VBox/ESX)
2575 - Network filtering API
2576 - XenAPI driver
2577 - new APIs for domain events
2578 - Libvirt managed save API
2579 - timer subselection for domain clock
2580 - synchronous hooks
2581 - API to update guest CPU to host CPU
2582 - virDomainUpdateDeviceFlags new API
2583 - migrate max downtime API
2584 - volume wiping API
2585 - and many bug fixes
2586
2587 * Fri Mar  5 2010 Daniel Veillard <veillard@redhat.com> - 0.7.7-1
2588 - macvtap support
2589 - async job handling
2590 - virtio channel
2591 - computing baseline CPU
2592 - virDomain{Attach,Detach}DeviceFlags
2593 - assorted bug fixes and lots of cleanups
2594
2595 * Wed Feb  3 2010 Daniel Veillard <veillard@redhat.com> - 0.7.6-1
2596
2597 * Wed Dec 23 2009 Daniel Veillard <veillard@redhat.com> - 0.7.5-1
2598 - Add new API virDomainMemoryStats
2599 - Public API and domain extension for CPU flags
2600 - vbox: Add support for version 3.1
2601 - Support QEMU's virtual FAT block device driver
2602 - a lot of fixes
2603
2604 * Fri Nov 20 2009 Daniel Veillard <veillard@redhat.com> - 0.7.3-1
2605 - udev node device backend
2606 - API to check object properties
2607 - better QEmu monitor processing
2608 - MAC address based port filtering for qemu
2609 - support IPv6 and multiple addresses per interfaces
2610 - a lot of fixes
2611
2612 * Tue Sep 15 2009 Daniel Veillard <veillard@redhat.com> - 0.7.1-1
2613 - ESX, VBox driver updates
2614 - mutipath support
2615 - support for encrypted (qcow) volume
2616 - compressed save image format for Qemu/KVM
2617 - QEmu host PCI device hotplug support
2618 - configuration of huge pages in guests
2619 - a lot of fixes
2620
2621 * Wed Aug  5 2009 Daniel Veillard <veillard@redhat.com> - 0.7.0-1
2622 - ESX, VBox3, Power Hypervisor drivers
2623 - new net filesystem glusterfs
2624 - Storage cloning for LVM and Disk backends
2625 - interface implementation based on netcf
2626 - Support cgroups in QEMU driver
2627 - QEmu hotplug NIC support
2628 - a lot of fixes
2629
2630 * Fri Jul  3 2009 Daniel Veillard <veillard@redhat.com> - 0.6.5-1
2631 - release of 0.6.5
2632
2633 * Fri May 29 2009 Daniel Veillard <veillard@redhat.com> - 0.6.4-1
2634 - release of 0.6.4
2635 - various new APIs
2636
2637 * Fri Apr 24 2009 Daniel Veillard <veillard@redhat.com> - 0.6.3-1
2638 - release of 0.6.3
2639 - VirtualBox driver
2640
2641 * Fri Apr  3 2009 Daniel Veillard <veillard@redhat.com> - 0.6.2-1
2642 - release of 0.6.2
2643
2644 * Wed Mar  4 2009 Daniel Veillard <veillard@redhat.com> - 0.6.1-1
2645 - release of 0.6.1
2646
2647 * Sat Jan 31 2009 Daniel Veillard <veillard@redhat.com> - 0.6.0-1
2648 - release of 0.6.0
2649
2650 * Tue Nov 25 2008 Daniel Veillard <veillard@redhat.com> - 0.5.0-1
2651 - release of 0.5.0
2652
2653 * Tue Sep 23 2008 Daniel Veillard <veillard@redhat.com> - 0.4.6-1
2654 - release of 0.4.6
2655
2656 * Mon Sep  8 2008 Daniel Veillard <veillard@redhat.com> - 0.4.5-1
2657 - release of 0.4.5
2658
2659 * Wed Jun 25 2008 Daniel Veillard <veillard@redhat.com> - 0.4.4-1
2660 - release of 0.4.4
2661 - mostly a few bug fixes from 0.4.3
2662
2663 * Thu Jun 12 2008 Daniel Veillard <veillard@redhat.com> - 0.4.3-1
2664 - release of 0.4.3
2665 - lots of bug fixes and small improvements
2666
2667 * Tue Apr  8 2008 Daniel Veillard <veillard@redhat.com> - 0.4.2-1
2668 - release of 0.4.2
2669 - lots of bug fixes and small improvements
2670
2671 * Mon Mar  3 2008 Daniel Veillard <veillard@redhat.com> - 0.4.1-1
2672 - Release of 0.4.1
2673 - Storage APIs
2674 - xenner support
2675 - lots of assorted improvements, bugfixes and cleanups
2676 - documentation and localization improvements
2677
2678 * Tue Dec 18 2007 Daniel Veillard <veillard@redhat.com> - 0.4.0-1
2679 - Release of 0.4.0
2680 - SASL based authentication
2681 - PolicyKit authentication
2682 - improved NUMA and statistics support
2683 - lots of assorted improvements, bugfixes and cleanups
2684 - documentation and localization improvements
2685
2686 * Sun Sep 30 2007 Daniel Veillard <veillard@redhat.com> - 0.3.3-1
2687 - Release of 0.3.3
2688 - Avahi support
2689 - NUMA support
2690 - lots of assorted improvements, bugfixes and cleanups
2691 - documentation and localization improvements
2692
2693 * Tue Aug 21 2007 Daniel Veillard <veillard@redhat.com> - 0.3.2-1
2694 - Release of 0.3.2
2695 - API for domains migration
2696 - APIs for collecting statistics on disks and interfaces
2697 - lots of assorted bugfixes and cleanups
2698 - documentation and localization improvements
2699
2700 * Tue Jul 24 2007 Daniel Veillard <veillard@redhat.com> - 0.3.1-1
2701 - Release of 0.3.1
2702 - localtime clock support
2703 - PS/2 and USB input devices
2704 - lots of assorted bugfixes and cleanups
2705 - documentation and localization improvements
2706
2707 * Mon Jul  9 2007 Daniel Veillard <veillard@redhat.com> - 0.3.0-1
2708 - Release of 0.3.0
2709 - Secure remote access support
2710 - unification of daemons
2711 - lots of assorted bugfixes and cleanups
2712 - documentation and localization improvements
2713
2714 * Fri Jun  8 2007 Daniel Veillard <veillard@redhat.com> - 0.2.3-1
2715 - Release of 0.2.3
2716 - lot of assorted bugfixes and cleanups
2717 - support for Xen-3.1
2718 - new scheduler API
2719
2720 * Tue Apr 17 2007 Daniel Veillard <veillard@redhat.com> - 0.2.2-1
2721 - Release of 0.2.2
2722 - lot of assorted bugfixes and cleanups
2723 - preparing for Xen-3.0.5
2724
2725 * Thu Mar 22 2007 Jeremy Katz <katzj@redhat.com> - 0.2.1-2.fc7
2726 - don't require xen; we don't need the daemon and can control non-xen now
2727 - fix scriptlet error (need to own more directories)
2728 - update description text
2729
2730 * Fri Mar 16 2007 Daniel Veillard <veillard@redhat.com> - 0.2.1-1
2731 - Release of 0.2.1
2732 - lot of bug and portability fixes
2733 - Add support for network autostart and init scripts
2734 - New API to detect the virtualization capabilities of a host
2735 - Documentation updates
2736
2737 * Fri Feb 23 2007 Daniel P. Berrange <berrange@redhat.com> - 0.2.0-4.fc7
2738 - Fix loading of guest & network configs
2739
2740 * Fri Feb 16 2007 Daniel P. Berrange <berrange@redhat.com> - 0.2.0-3.fc7
2741 - Disable kqemu support since its not in Fedora qemu binary
2742 - Fix for -vnc arg syntax change in 0.9.0  QEMU
2743
2744 * Thu Feb 15 2007 Daniel P. Berrange <berrange@redhat.com> - 0.2.0-2.fc7
2745 - Fixed path to qemu daemon for autostart
2746 - Fixed generation of <features> block in XML
2747 - Pre-create config directory at startup
2748
2749 * Wed Feb 14 2007 Daniel Veillard <veillard@redhat.com> 0.2.0-1.fc7
2750 - support for KVM and QEmu
2751 - support for network configuration
2752 - assorted fixes
2753
2754 * Mon Jan 22 2007 Daniel Veillard <veillard@redhat.com> 0.1.11-1.fc7
2755 - finish inactive Xen domains support
2756 - memory leak fix
2757 - RelaxNG schemas for XML configs
2758
2759 * Wed Dec 20 2006 Daniel Veillard <veillard@redhat.com> 0.1.10-1.fc7
2760 - support for inactive Xen domains
2761 - improved support for Xen display and vnc
2762 - a few bug fixes
2763 - localization updates
2764
2765 * Thu Dec  7 2006 Jeremy Katz <katzj@redhat.com> - 0.1.9-2
2766 - rebuild against python 2.5
2767
2768 * Wed Nov 29 2006 Daniel Veillard <veillard@redhat.com> 0.1.9-1
2769 - better error reporting
2770 - python bindings fixes and extensions
2771 - add support for shareable drives
2772 - add support for non-bridge style networking
2773 - hot plug device support
2774 - added support for inactive domains
2775 - API to dump core of domains
2776 - various bug fixes, cleanups and improvements
2777 - updated the localization
2778
2779 * Tue Nov  7 2006 Daniel Veillard <veillard@redhat.com> 0.1.8-3
2780 - it's pkgconfig not pgkconfig !
2781
2782 * Mon Nov  6 2006 Daniel Veillard <veillard@redhat.com> 0.1.8-2
2783 - fixing spec file, added %%dist, -devel requires pkgconfig and xen-devel
2784 - Resolves: rhbz#202320
2785
2786 * Mon Oct 16 2006 Daniel Veillard <veillard@redhat.com> 0.1.8-1
2787 - fix missing page size detection code for ia64
2788 - fix mlock size when getting domain info list from hypervisor
2789 - vcpu number initialization
2790 - don't label crashed domains as shut off
2791 - fix virsh man page
2792 - blktapdd support for alternate drivers like blktap
2793 - memory leak fixes (xend interface and XML parsing)
2794 - compile fix
2795 - mlock/munlock size fixes
2796
2797 * Fri Sep 22 2006 Daniel Veillard <veillard@redhat.com> 0.1.7-1
2798 - Fix bug when running against xen-3.0.3 hypercalls
2799 - Fix memory bug when getting vcpus info from xend
2800
2801 * Fri Sep 22 2006 Daniel Veillard <veillard@redhat.com> 0.1.6-1
2802 - Support for localization
2803 - Support for new Xen-3.0.3 cdrom and disk configuration
2804 - Support for setting VNC port
2805 - Fix bug when running against xen-3.0.2 hypercalls
2806 - Fix reconnection problem when talking directly to http xend
2807
2808 * Tue Sep  5 2006 Jeremy Katz <katzj@redhat.com> - 0.1.5-3
2809 - patch from danpb to support new-format cd devices for HVM guests
2810
2811 * Tue Sep  5 2006 Daniel Veillard <veillard@redhat.com> 0.1.5-2
2812 - reactivating ia64 support
2813
2814 * Tue Sep  5 2006 Daniel Veillard <veillard@redhat.com> 0.1.5-1
2815 - new release
2816 - bug fixes
2817 - support for new hypervisor calls
2818 - early code for config files and defined domains
2819
2820 * Mon Sep  4 2006 Daniel Berrange <berrange@redhat.com> - 0.1.4-5
2821 - add patch to address dom0_ops API breakage in Xen 3.0.3 tree
2822
2823 * Mon Aug 28 2006 Jeremy Katz <katzj@redhat.com> - 0.1.4-4
2824 - add patch to support paravirt framebuffer in Xen
2825
2826 * Mon Aug 21 2006 Daniel Veillard <veillard@redhat.com> 0.1.4-3
2827 - another patch to fix network handling in non-HVM guests
2828
2829 * Thu Aug 17 2006 Daniel Veillard <veillard@redhat.com> 0.1.4-2
2830 - patch to fix virParseUUID()
2831
2832 * Wed Aug 16 2006 Daniel Veillard <veillard@redhat.com> 0.1.4-1
2833 - vCPUs and affinity support
2834 - more complete XML, console and boot options
2835 - specific features support
2836 - enforced read-only connections
2837 - various improvements, bug fixes
2838
2839 * Wed Aug  2 2006 Jeremy Katz <katzj@redhat.com> - 0.1.3-6
2840 - add patch from pvetere to allow getting uuid from libvirt
2841
2842 * Wed Aug  2 2006 Jeremy Katz <katzj@redhat.com> - 0.1.3-5
2843 - build on ia64 now
2844
2845 * Thu Jul 27 2006 Jeremy Katz <katzj@redhat.com> - 0.1.3-4
2846 - don't BR xen, we just need xen-devel
2847
2848 * Thu Jul 27 2006 Daniel Veillard <veillard@redhat.com> 0.1.3-3
2849 - need rebuild since libxenstore is now versionned
2850
2851 * Mon Jul 24 2006 Mark McLoughlin <markmc@redhat.com> - 0.1.3-2
2852 - Add BuildRequires: xen-devel
2853
2854 * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.1.3-1.1
2855 - rebuild
2856
2857 * Tue Jul 11 2006 Daniel Veillard <veillard@redhat.com> 0.1.3-1
2858 - support for HVM Xen guests
2859 - various bugfixes
2860
2861 * Mon Jul  3 2006 Daniel Veillard <veillard@redhat.com> 0.1.2-1
2862 - added a proxy mechanism for read only access using httpu
2863 - fixed header includes paths
2864
2865 * Wed Jun 21 2006 Daniel Veillard <veillard@redhat.com> 0.1.1-1
2866 - extend and cleanup the driver infrastructure and code
2867 - python examples
2868 - extend uuid support
2869 - bug fixes, buffer handling cleanups
2870 - support for new Xen hypervisor API
2871 - test driver for unit testing
2872 - virsh --conect argument
2873
2874 * Mon Apr 10 2006 Daniel Veillard <veillard@redhat.com> 0.1.0-1
2875 - various fixes
2876 - new APIs: for Node information and Reboot
2877 - virsh improvements and extensions
2878 - documentation updates and man page
2879 - enhancement and fixes of the XML description format
2880
2881 * Tue Feb 28 2006 Daniel Veillard <veillard@redhat.com> 0.0.6-1
2882 - added error handling APIs
2883 - small bug fixes
2884 - improve python bindings
2885 - augment documentation and regression tests
2886
2887 * Thu Feb 23 2006 Daniel Veillard <veillard@redhat.com> 0.0.5-1
2888 - new domain creation API
2889 - new UUID based APIs
2890 - more tests, documentation, devhelp
2891 - bug fixes
2892
2893 * Fri Feb 10 2006 Daniel Veillard <veillard@redhat.com> 0.0.4-1
2894 - fixes some problems in 0.0.3 due to the change of names
2895
2896 * Wed Feb  8 2006 Daniel Veillard <veillard@redhat.com> 0.0.3-1
2897 - changed library name to libvirt from libvir, complete and test the python
2898   bindings
2899
2900 * Sun Jan 29 2006 Daniel Veillard <veillard@redhat.com> 0.0.2-1
2901 - upstream release of 0.0.2, use xend, save and restore added, python bindings
2902   fixed
2903
2904 * Wed Nov  2 2005 Daniel Veillard <veillard@redhat.com> 0.0.1-1
2905 - created