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