e106be974f785a11f01664224b7b56549505a017
[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 # A client only build will create a libvirt.so only containing
12 # the generic RPC driver, and test driver and no libvirtd
13 # Default to a full server + client build
14 %define client_only        0
15
16 # Now turn off server build in certain cases
17
18 # RHEL-5 builds are client-only for s390, ppc
19 %if 0%{?rhel} == 5
20 %ifnarch i386 i586 i686 x86_64 ia64
21 %define client_only        1
22 %endif
23 %endif
24
25 # Disable all server side drivers if client only build requested
26 %if %{client_only}
27 %define server_drivers     0
28 %else
29 %define server_drivers     1
30 %endif
31
32
33 # Now set the defaults for all the important features, independent
34 # of any particular OS
35
36 # First the daemon itself
37 %define with_libvirtd      0%{!?_without_libvirtd:%{server_drivers}}
38 %define with_avahi         0%{!?_without_avahi:%{server_drivers}}
39
40 # Then the hypervisor drivers that run on local host
41 %define with_xen           0%{!?_without_xen:%{server_drivers}}
42 %define with_qemu          0%{!?_without_qemu:%{server_drivers}}
43 %define with_openvz        0%{!?_without_openvz:%{server_drivers}}
44 %define with_lxc           0%{!?_without_lxc:%{server_drivers}}
45 %define with_vbox          0%{!?_without_vbox:%{server_drivers}}
46 %define with_uml           0%{!?_without_uml:%{server_drivers}}
47 %define with_libxl         0%{!?_without_libxl:%{server_drivers}}
48 %define with_vmware        0%{!?_without_vmware:%{server_drivers}}
49
50 # Then the hypervisor drivers that talk via a native remote protocol
51 %define with_phyp          0%{!?_without_phyp:1}
52 %define with_esx           0%{!?_without_esx:1}
53 %define with_hyperv        0%{!?_without_hyperv:1}
54 %define with_xenapi        0%{!?_without_xenapi:1}
55
56 # Then the secondary host drivers
57 %define with_network       0%{!?_without_network:%{server_drivers}}
58 %define with_storage_fs    0%{!?_without_storage_fs:%{server_drivers}}
59 %define with_storage_lvm   0%{!?_without_storage_lvm:%{server_drivers}}
60 %define with_storage_iscsi 0%{!?_without_storage_iscsi:%{server_drivers}}
61 %define with_storage_disk  0%{!?_without_storage_disk:%{server_drivers}}
62 %define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}}
63 %define with_numactl       0%{!?_without_numactl:%{server_drivers}}
64 %define with_selinux       0%{!?_without_selinux:%{server_drivers}}
65
66 # A few optional bits off by default, we enable later
67 %define with_polkit        0%{!?_without_polkit:0}
68 %define with_capng         0%{!?_without_capng:0}
69 %define with_netcf         0%{!?_without_netcf:0}
70 %define with_udev          0%{!?_without_udev:0}
71 %define with_hal           0%{!?_without_hal:0}
72 %define with_yajl          0%{!?_without_yajl:0}
73 %define with_nwfilter      0%{!?_without_nwfilter:0}
74 %define with_libpcap       0%{!?_without_libpcap:0}
75 %define with_macvtap       0%{!?_without_macvtap:0}
76 %define with_libnl         0%{!?_without_libnl:0}
77 %define with_audit         0%{!?_without_audit:0}
78 %define with_dtrace        0%{!?_without_dtrace:0}
79 %define with_cgconfig      0%{!?_without_cgconfig:0}
80 %define with_sanlock       0%{!?_without_sanlock:0}
81 %define with_systemd       0%{!?_without_systemd:0}
82
83 # Non-server/HV driver defaults which are always enabled
84 %define with_python        0%{!?_without_python:1}
85 %define with_sasl          0%{!?_without_sasl:1}
86
87
88 # Finally set the OS / architecture specific special cases
89
90 # Xen is available only on i386 x86_64 ia64
91 %ifnarch i386 i586 i686 x86_64 ia64
92 %define with_xen 0
93 %define with_libxl 0
94 %endif
95
96 # Numactl is not available on s390[x] and ARM
97 %ifarch s390 s390x %{arm}
98 %define with_numactl 0
99 %endif
100
101 # RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor,
102 # VMWare, libxenserver (xenapi), libxenlight (Xen 4.1 and newer),
103 # or HyperV.
104 %if 0%{?rhel}
105 %define with_openvz 0
106 %define with_vbox 0
107 %define with_uml 0
108 %define with_phyp 0
109 %define with_vmware 0
110 %define with_xenapi 0
111 %define with_libxl 0
112 %define with_hyperv 0
113 %endif
114
115 # Although earlier Fedora has systemd, libvirt still used sysvinit
116 %if 0%{?fedora} >= 17
117 %define with_systemd 1
118 %endif
119
120 # RHEL-5 has restricted QEMU to x86_64 only and is too old for LXC
121 %if 0%{?rhel} == 5
122 %ifnarch x86_64
123 %define with_qemu 0
124 %endif
125 %define with_lxc 0
126 %endif
127
128 # RHEL-6 has restricted QEMU to x86_64 only, stopped including Xen
129 # on all archs. Other archs all have LXC available though
130 %if 0%{?rhel} >= 6
131 %ifnarch x86_64
132 %define with_qemu 0
133 %endif
134 %define with_xen 0
135 %endif
136
137 # Fedora doesn't have any QEMU on ppc64 - only ppc
138 %if 0%{?fedora}
139 %ifarch ppc64
140 %define with_qemu 0
141 %endif
142 %endif
143
144 # Fedora doesn't have new enough Xen for libxl until F16
145 %if 0%{?fedora} < 16
146 %define with_libxl 0
147 %endif
148
149 # PolicyKit was introduced in Fedora 8 / RHEL-6 or newer
150 %if 0%{?fedora} >= 8 || 0%{?rhel} >= 6
151 %define with_polkit    0%{!?_without_polkit:1}
152 %endif
153
154 # libcapng is used to manage capabilities in Fedora 12 / RHEL-6 or newer
155 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
156 %define with_capng     0%{!?_without_capng:1}
157 %endif
158
159 # netcf is used to manage network interfaces in Fedora 12 / RHEL-6 or newer
160 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
161 %define with_netcf     0%{!?_without_netcf:%{server_drivers}}
162 %endif
163
164 # udev is used to manage host devices in Fedora 12 / RHEL-6 or newer
165 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
166 %define with_udev     0%{!?_without_udev:%{server_drivers}}
167 %else
168 %define with_hal       0%{!?_without_hal:%{server_drivers}}
169 %endif
170
171 # Enable yajl library for JSON mode with QEMU
172 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6
173 %define with_yajl     0%{!?_without_yajl:%{server_drivers}}
174 %endif
175
176 # Enable sanlock library for lock management with QEMU
177 # Sanlock is available only on i686 x86_64 for RHEL
178 %if 0%{?fedora} >= 16
179 %define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
180 %endif
181 %if 0%{?rhel} >= 6
182 %ifnarch i386 i586 i686 x86_64
183 %define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
184 %endif
185 %endif
186
187 # Disable some drivers when building without libvirt daemon.
188 # The logic is the same as in configure.ac
189 %if ! %{with_libvirtd}
190 %define with_network 0
191 %define with_qemu 0
192 %define with_lxc 0
193 %define with_uml 0
194 %define with_hal 0
195 %define with_udev 0
196 %define with_storage_fs 0
197 %define with_storage_lvm 0
198 %define with_storage_iscsi 0
199 %define with_storage_mpath 0
200 %define with_storage_disk 0
201 %endif
202
203 # Enable libpcap library
204 %if %{with_qemu}
205 %define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}}
206 %define with_libpcap  0%{!?_without_libpcap:%{server_drivers}}
207 %define with_macvtap  0%{!?_without_macvtap:%{server_drivers}}
208 %endif
209
210 %if %{with_macvtap}
211 %define with_libnl 1
212 %endif
213
214 %if 0%{?fedora} >= 11 || 0%{?rhel} >= 5
215 %define with_audit    0%{!?_without_audit:1}
216 %endif
217
218 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6
219 %define with_dtrace 1
220 %endif
221
222 # Pull in cgroups config system
223 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
224 %if %{with_qemu} || %{with_lxc}
225 %define with_cgconfig 0%{!?_without_cgconfig:1}
226 %endif
227 %endif
228
229 # Force QEMU to run as non-root
230 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
231 %define qemu_user  qemu
232 %define qemu_group  qemu
233 %else
234 %define qemu_user  root
235 %define qemu_group  root
236 %endif
237
238
239 # The RHEL-5 Xen package has some feature backports. This
240 # flag is set to enable use of those special bits on RHEL-5
241 %if 0%{?rhel} == 5
242 %define with_rhel5  1
243 %else
244 %define with_rhel5  0
245 %endif
246
247 Summary: Library providing a simple virtualization API
248 Name: libvirt
249 Version: 0.9.8
250 Release: 1%{?dist}%{?extra_release}
251 License: LGPLv2+
252 Group: Development/Libraries
253 Source: http://libvirt.org/sources/libvirt-%{version}.tar.gz
254 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
255 URL: http://libvirt.org/
256
257 # All runtime requirements for the libvirt package (runtime requrements
258 # for subpackages are listed later in those subpackages)
259
260 # The client side, i.e. shared libs and virsh are in a subpackage
261 Requires: %{name}-client = %{version}-%{release}
262
263 # Used by many of the drivers, so turn it on whenever the
264 # daemon is present
265 %if %{with_libvirtd}
266 # for modprobe of pci devices
267 Requires: module-init-tools
268 # for /sbin/ip & /sbin/tc
269 Requires: iproute
270 %endif
271 %if %{with_network}
272 Requires: dnsmasq >= 2.41
273 Requires: radvd
274 %endif
275 %if %{with_network} || %{with_nwfilter}
276 Requires: iptables
277 Requires: iptables-ipv6
278 %endif
279 %if %{with_nwfilter}
280 Requires: ebtables
281 %endif
282 # needed for device enumeration
283 %if %{with_hal}
284 Requires: hal
285 %endif
286 %if %{with_udev}
287 Requires: udev >= 145
288 %endif
289 %if %{with_polkit}
290 %if 0%{?fedora} >= 12 || 0%{?rhel} >=6
291 Requires: polkit >= 0.93
292 %else
293 Requires: PolicyKit >= 0.6
294 %endif
295 %endif
296 %if %{with_storage_fs}
297 Requires: nfs-utils
298 # For mkfs
299 Requires: util-linux-ng
300 # For pool-build probing for existing pools
301 BuildRequires: libblkid-devel >= 2.17
302 # For glusterfs
303 %if 0%{?fedora} >= 11
304 Requires: glusterfs-client >= 2.0.1
305 %endif
306 %endif
307 %if %{with_qemu}
308 # From QEMU RPMs
309 Requires: /usr/bin/qemu-img
310 # For image compression
311 Requires: gzip
312 Requires: bzip2
313 Requires: lzop
314 Requires: xz
315 %else
316 %if %{with_xen}
317 # From Xen RPMs
318 Requires: /usr/sbin/qcow-create
319 %endif
320 %endif
321 %if %{with_storage_lvm}
322 # For LVM drivers
323 Requires: lvm2
324 %endif
325 %if %{with_storage_iscsi}
326 # For ISCSI driver
327 Requires: iscsi-initiator-utils
328 %endif
329 %if %{with_storage_disk}
330 # For disk driver
331 Requires: parted
332 Requires: device-mapper
333 %endif
334 %if %{with_storage_mpath}
335 # For multipath support
336 Requires: device-mapper
337 %endif
338 %if %{with_cgconfig}
339 Requires: libcgroup
340 %endif
341 # For virConnectGetSysinfo
342 Requires: dmidecode
343 # For service management
344 %if %{with_systemd}
345 Requires(post): systemd-units
346 Requires(post): systemd-sysv
347 Requires(preun): systemd-units
348 Requires(postun): systemd-units
349 %endif
350
351 # All build-time requirements
352 BuildRequires: python-devel
353 %if %{with_systemd}
354 BuildRequires: systemd-units
355 %endif
356 %if %{with_xen}
357 BuildRequires: xen-devel
358 %endif
359 BuildRequires: libxml2-devel
360 BuildRequires: xhtml1-dtds
361 BuildRequires: libxslt
362 BuildRequires: readline-devel
363 BuildRequires: ncurses-devel
364 BuildRequires: gettext
365 BuildRequires: libtasn1-devel
366 BuildRequires: gnutls-devel
367 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
368 # for augparse, optionally used in testing
369 BuildRequires: augeas
370 %endif
371 %if %{with_hal}
372 BuildRequires: hal-devel
373 %endif
374 %if %{with_udev}
375 BuildRequires: libudev-devel >= 145
376 BuildRequires: libpciaccess-devel >= 0.10.9
377 %endif
378 %if %{with_yajl}
379 BuildRequires: yajl-devel
380 %endif
381 %if %{with_sanlock}
382 BuildRequires: sanlock-devel >= 1.8
383 %endif
384 %if %{with_libpcap}
385 BuildRequires: libpcap-devel
386 %endif
387 %if %{with_libnl}
388 BuildRequires: libnl-devel
389 %endif
390 %if %{with_avahi}
391 BuildRequires: avahi-devel
392 %endif
393 %if %{with_selinux}
394 BuildRequires: libselinux-devel
395 %endif
396 %if %{with_network}
397 BuildRequires: dnsmasq >= 2.41
398 BuildRequires: iptables
399 BuildRequires: iptables-ipv6
400 BuildRequires: radvd
401 %endif
402 %if %{with_nwfilter}
403 BuildRequires: ebtables
404 %endif
405 BuildRequires: module-init-tools
406 %if %{with_sasl}
407 BuildRequires: cyrus-sasl-devel
408 %endif
409 %if %{with_polkit}
410 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
411 # Only need the binary, not -devel
412 BuildRequires: polkit >= 0.93
413 %else
414 BuildRequires: PolicyKit-devel >= 0.6
415 %endif
416 %endif
417 %if %{with_storage_fs}
418 # For mount/umount in FS driver
419 BuildRequires: util-linux
420 %endif
421 %if %{with_qemu}
422 # From QEMU RPMs
423 BuildRequires: /usr/bin/qemu-img
424 %else
425 %if %{with_xen}
426 # From Xen RPMs
427 BuildRequires: /usr/sbin/qcow-create
428 %endif
429 %endif
430 %if %{with_storage_lvm}
431 # For LVM drivers
432 BuildRequires: lvm2
433 %endif
434 %if %{with_storage_iscsi}
435 # For ISCSI driver
436 BuildRequires: iscsi-initiator-utils
437 %endif
438 %if %{with_storage_disk}
439 # For disk driver
440 BuildRequires: parted-devel
441 %if 0%{?rhel} == 5
442 # Broken RHEL-5 parted RPM is missing a dep
443 BuildRequires: e2fsprogs-devel
444 %endif
445 %endif
446 %if %{with_storage_mpath}
447 # For Multipath support
448 %if 0%{?rhel} == 5
449 # Broken RHEL-5 packaging has header files in main RPM :-(
450 BuildRequires: device-mapper
451 %else
452 BuildRequires: device-mapper-devel
453 %endif
454 %endif
455 %if %{with_numactl}
456 # For QEMU/LXC numa info
457 BuildRequires: numactl-devel
458 %endif
459 %if %{with_capng}
460 BuildRequires: libcap-ng-devel >= 0.5.0
461 %endif
462 %if %{with_phyp}
463 BuildRequires: libssh2-devel
464 %endif
465 %if %{with_netcf}
466 %if 0%{?fedora} >= 16 || 0%{?rhel} >= 6
467 BuildRequires: netcf-devel >= 0.1.8
468 %else
469 BuildRequires: netcf-devel >= 0.1.4
470 %endif
471 %endif
472 %if %{with_esx}
473 %if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
474 BuildRequires: libcurl-devel
475 %else
476 BuildRequires: curl-devel
477 %endif
478 %endif
479 %if %{with_hyperv}
480 BuildRequires: libwsman-devel >= 2.2.3
481 %endif
482 %if %{with_audit}
483 BuildRequires: audit-libs-devel
484 %endif
485 %if %{with_dtrace}
486 # we need /usr/sbin/dtrace
487 BuildRequires: systemtap-sdt-devel
488 %endif
489
490 %if %{with_storage_fs}
491 # For mount/umount in FS driver
492 BuildRequires: util-linux
493 # For showmount in FS driver (netfs discovery)
494 BuildRequires: nfs-utils
495 %endif
496
497 # Fedora build root suckage
498 BuildRequires: gawk
499
500 %description
501 Libvirt is a C toolkit to interact with the virtualization capabilities
502 of recent versions of Linux (and other OSes). The main package includes
503 the libvirtd server exporting the virtualization support.
504
505 %package client
506 Summary: Client side library and utilities of the libvirt library
507 Group: Development/Libraries
508 Requires: readline
509 Requires: ncurses
510 # So remote clients can access libvirt over SSH tunnel
511 # (client invokes 'nc' against the UNIX socket on the server)
512 Requires: nc
513 # Needed by libvirt-guests init script.
514 Requires: gettext
515 # Needed by virt-pki-validate script.
516 Requires: gnutls-utils
517 # Needed for probing the power management features of the host.
518 Requires: pm-utils
519 %if %{with_sasl}
520 Requires: cyrus-sasl
521 # Not technically required, but makes 'out-of-box' config
522 # work correctly & doesn't have onerous dependencies
523 Requires: cyrus-sasl-md5
524 %endif
525
526 %description client
527 Shared libraries and client binaries needed to access to the
528 virtualization capabilities of recent versions of Linux (and other OSes).
529
530 %package devel
531 Summary: Libraries, includes, etc. to compile with the libvirt library
532 Group: Development/Libraries
533 Requires: %{name}-client = %{version}-%{release}
534 Requires: pkgconfig
535 %if %{with_xen}
536 Requires: xen-devel
537 %endif
538
539 %description devel
540 Includes and documentations for the C library providing an API to use
541 the virtualization capabilities of recent versions of Linux (and other OSes).
542
543 %if %{with_sanlock}
544 %package lock-sanlock
545 Summary: Sanlock lock manager plugin for QEMU driver
546 Group: Development/Libraries
547 Requires: sanlock >= 1.8
548 #for virt-sanlock-cleanup require augeas
549 Requires: augeas
550 Requires: %{name} = %{version}-%{release}
551
552 %description lock-sanlock
553 Includes the Sanlock lock manager plugin for the QEMU
554 driver
555 %endif
556
557 %if %{with_python}
558 %package python
559 Summary: Python bindings for the libvirt library
560 Group: Development/Libraries
561 Requires: %{name}-client = %{version}-%{release}
562
563 %description python
564 The libvirt-python package contains a module that permits applications
565 written in the Python programming language to use the interface
566 supplied by the libvirt library to use the virtualization capabilities
567 of recent versions of Linux (and other OSes).
568 %endif
569
570 %prep
571 %setup -q
572
573 %build
574 %if ! %{with_xen}
575 %define _without_xen --without-xen
576 %endif
577
578 %if ! %{with_qemu}
579 %define _without_qemu --without-qemu
580 %endif
581
582 %if ! %{with_openvz}
583 %define _without_openvz --without-openvz
584 %endif
585
586 %if ! %{with_lxc}
587 %define _without_lxc --without-lxc
588 %endif
589
590 %if ! %{with_vbox}
591 %define _without_vbox --without-vbox
592 %endif
593
594 %if ! %{with_xenapi}
595 %define _without_xenapi --without-xenapi
596 %endif
597
598 %if ! %{with_libxl}
599 %define _without_libxl --without-libxl
600 %endif
601
602 %if ! %{with_sasl}
603 %define _without_sasl --without-sasl
604 %endif
605
606 %if ! %{with_avahi}
607 %define _without_avahi --without-avahi
608 %endif
609
610 %if ! %{with_phyp}
611 %define _without_phyp --without-phyp
612 %endif
613
614 %if ! %{with_esx}
615 %define _without_esx --without-esx
616 %endif
617
618 %if ! %{with_hyperv}
619 %define _without_hyperv --without-hyperv
620 %endif
621
622 %if ! %{with_vmware}
623 %define _without_vmware --without-vmware
624 %endif
625
626 %if ! %{with_polkit}
627 %define _without_polkit --without-polkit
628 %endif
629
630 %if ! %{with_python}
631 %define _without_python --without-python
632 %endif
633
634 %if ! %{with_libvirtd}
635 %define _without_libvirtd --without-libvirtd
636 %endif
637
638 %if ! %{with_uml}
639 %define _without_uml --without-uml
640 %endif
641
642 %if %{with_rhel5}
643 %define _with_rhel5_api --with-rhel5-api
644 %endif
645
646 %if ! %{with_network}
647 %define _without_network --without-network
648 %endif
649
650 %if ! %{with_storage_fs}
651 %define _without_storage_fs --without-storage-fs
652 %endif
653
654 %if ! %{with_storage_lvm}
655 %define _without_storage_lvm --without-storage-lvm
656 %endif
657
658 %if ! %{with_storage_iscsi}
659 %define _without_storage_iscsi --without-storage-iscsi
660 %endif
661
662 %if ! %{with_storage_disk}
663 %define _without_storage_disk --without-storage-disk
664 %endif
665
666 %if ! %{with_storage_mpath}
667 %define _without_storage_mpath --without-storage-mpath
668 %endif
669
670 %if ! %{with_numactl}
671 %define _without_numactl --without-numactl
672 %endif
673
674 %if ! %{with_capng}
675 %define _without_capng --without-capng
676 %endif
677
678 %if ! %{with_netcf}
679 %define _without_netcf --without-netcf
680 %endif
681
682 %if ! %{with_selinux}
683 %define _without_selinux --without-selinux
684 %endif
685
686 %if ! %{with_hal}
687 %define _without_hal --without-hal
688 %endif
689
690 %if ! %{with_udev}
691 %define _without_udev --without-udev
692 %endif
693
694 %if ! %{with_yajl}
695 %define _without_yajl --without-yajl
696 %endif
697
698 %if ! %{with_sanlock}
699 %define _without_sanlock --without-sanlock
700 %endif
701
702 %if ! %{with_libpcap}
703 %define _without_libpcap --without-libpcap
704 %endif
705
706 %if ! %{with_macvtap}
707 %define _without_macvtap --without-macvtap
708 %endif
709
710 %if ! %{with_audit}
711 %define _without_audit --without-audit
712 %endif
713
714 %if ! %{with_dtrace}
715 %define _without_dtrace --without-dtrace
716 %endif
717
718 %define when  %(date +"%%F-%%T")
719 %define where %(hostname)
720 %define who   %{?packager}%{!?packager:Unknown}
721 %define with_packager --with-packager="%{who}, %{when}, %{where}"
722 %define with_packager_version --with-packager-version="%{release}"
723
724 %if %{with_systemd}
725 # We use 'systemd+redhat', so if someone installs upstart or
726 # legacy init scripts, they can still start libvirtd, etc
727 %define init_scripts --with-init_script=systemd+redhat
728 %else
729 %define init_scripts --with-init_script=redhat
730 %endif
731
732 %configure %{?_without_xen} \
733            %{?_without_qemu} \
734            %{?_without_openvz} \
735            %{?_without_lxc} \
736            %{?_without_vbox} \
737            %{?_without_xenapi} \
738            %{?_without_sasl} \
739            %{?_without_avahi} \
740            %{?_without_polkit} \
741            %{?_without_python} \
742            %{?_without_libvirtd} \
743            %{?_without_uml} \
744            %{?_without_phyp} \
745            %{?_without_esx} \
746            %{?_without_hyperv} \
747            %{?_without_vmware} \
748            %{?_without_network} \
749            %{?_with_rhel5_api} \
750            %{?_without_storage_fs} \
751            %{?_without_storage_lvm} \
752            %{?_without_storage_iscsi} \
753            %{?_without_storage_disk} \
754            %{?_without_storage_mpath} \
755            %{?_without_numactl} \
756            %{?_without_capng} \
757            %{?_without_netcf} \
758            %{?_without_selinux} \
759            %{?_without_hal} \
760            %{?_without_udev} \
761            %{?_without_yajl} \
762            %{?_without_sanlock} \
763            %{?_without_libpcap} \
764            %{?_without_macvtap} \
765            %{?_without_audit} \
766            %{?_without_dtrace} \
767            %{with_packager} \
768            %{with_packager_version} \
769            --with-capng \
770            --with-udev \
771            --with-qemu-user=%{qemu_user} \
772            --with-qemu-group=%{qemu_group} \
773            %{init_scripts} \
774            --with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid
775 make %{?_smp_mflags}
776 gzip -9 ChangeLog
777
778 %install
779 rm -fr %{buildroot}
780
781 %makeinstall SYSTEMD_UNIT_DIR=%{_unitdir}
782 for i in domain-events/events-c dominfo domsuspend hellolibvirt openauth python xml/nwfilter systemtap
783 do
784   (cd examples/$i ; make clean ; rm -rf .deps .libs Makefile Makefile.in)
785 done
786 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
787 rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
788 rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
789 rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
790 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la
791 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a
792
793 %if %{with_network}
794 install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/
795 # We don't want to install /etc/libvirt/qemu/networks in the main %files list
796 # because if the admin wants to delete the default network completely, we don't
797 # want to end up re-incarnating it on every RPM upgrade.
798 install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/
799 cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \
800    $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
801 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
802 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
803 # Strip auto-generated UUID - we need it generated per-install
804 sed -i -e "/<uuid>/d" $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
805 %else
806 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
807 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
808 %endif
809 %if ! %{with_qemu}
810 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug
811 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
812 %endif
813 %find_lang %{name}
814
815 %if ! %{with_lxc}
816 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug
817 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
818 %endif
819
820 %if ! %{with_python}
821 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-python-%{version}
822 %endif
823
824 %if %{client_only}
825 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version}
826 %endif
827
828 %if ! %{with_libvirtd}
829 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter
830 mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version}/html \
831    $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-devel-%{version}/
832 %endif
833
834 %if ! %{with_qemu}
835 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf
836 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
837 %endif
838 %if ! %{with_lxc}
839 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
840 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc
841 %endif
842 %if ! %{with_uml}
843 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
844 %endif
845
846 %clean
847 rm -fr %{buildroot}
848
849 %check
850 cd tests
851 # These 3 tests don't current work in a mock build root
852 for i in nodeinfotest daemon-conf seclabeltest
853 do
854   rm -f $i
855   printf "#!/bin/sh\nexit 0\n" > $i
856   chmod +x $i
857 done
858 make check
859
860 %pre
861 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
862 # Normally 'setup' adds this in /etc/passwd, but this is
863 # here for case of upgrades from earlier Fedora/RHEL. This
864 # UID/GID pair is reserved for qemu:qemu
865 getent group kvm >/dev/null || groupadd -g 36 -r kvm
866 getent group qemu >/dev/null || groupadd -g 107 -r qemu
867 getent passwd qemu >/dev/null || \
868   useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
869     -c "qemu user" qemu
870 %endif
871
872 %post
873
874 %if %{with_libvirtd}
875 %if %{with_network}
876 # We want to install the default network for initial RPM installs
877 # or on the first upgrade from a non-network aware libvirt only.
878 # We check this by looking to see if the daemon is already installed
879 if ! /sbin/chkconfig libvirtd && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml
880 then
881     UUID=`/usr/bin/uuidgen`
882     sed -e "s,</name>,</name>\n  <uuid>$UUID</uuid>," \
883          < %{_datadir}/libvirt/networks/default.xml \
884          > %{_sysconfdir}/libvirt/qemu/networks/default.xml
885     ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
886 fi
887
888 # All newly defined networks will have a mac address for the bridge
889 # auto-generated, but networks already existing at the time of upgrade
890 # will not. We need to go through all the network configs, look for
891 # those that don't have a mac address, and add one.
892
893 network_files=$( (cd %{_localstatedir}/lib/libvirt/network && \
894                   grep -L "mac address" *.xml; \
895                   cd %{_sysconfdir}/libvirt/qemu/networks && \
896                   grep -L "mac address" *.xml) 2>/dev/null \
897                 | sort -u)
898
899 for file in $network_files
900 do
901    # each file exists in either the config or state directory (or both) and
902    # does not have a mac address specified in either. We add the same mac
903    # address to both files (or just one, if the other isn't there)
904
905    mac4=`printf '%X' $(($RANDOM % 256))`
906    mac5=`printf '%X' $(($RANDOM % 256))`
907    mac6=`printf '%X' $(($RANDOM % 256))`
908    for dir in %{_localstatedir}/lib/libvirt/network \
909               %{_sysconfdir}/libvirt/qemu/networks
910    do
911       if test -f $dir/$file
912       then
913          sed -i.orig -e \
914            "s|\(<bridge.*$\)|\0\n  <mac address='52:54:00:$mac4:$mac5:$mac6'/>|" \
915            $dir/$file
916          if test $? != 0
917          then
918              echo "failed to add <mac address='52:54:00:$mac4:$mac5:$mac6'/>" \
919                   "to $dir/$file"
920              mv -f $dir/$file.orig $dir/$file
921          else
922              rm -f $dir/$file.orig
923          fi
924       fi
925    done
926 done
927 %endif
928
929 %if %{with_systemd}
930 if [ $1 -eq 1 ] ; then
931     # Initial installation
932     /bin/systemctl enable libvirtd.service >/dev/null 2>&1 || :
933     /bin/systemctl enable cgconfig.service >/dev/null 2>&1 || :
934 fi
935 %else
936 %if %{with_cgconfig}
937 # Starting with Fedora 16, systemd automounts all cgroups, and cgconfig is
938 # no longer a necessary service.
939 %if 0%{?fedora} <= 15 || 0%{?rhel} <= 6
940 if [ "$1" -eq "1" ]; then
941 /sbin/chkconfig cgconfig on
942 fi
943 %endif
944 %endif
945
946 /sbin/chkconfig --add libvirtd
947 if [ "$1" -ge "1" ]; then
948         /sbin/service libvirtd condrestart > /dev/null 2>&1
949 fi
950 %endif
951 %endif
952
953 %preun
954 %if %{with_libvirtd}
955 %if %{with_systemd}
956 if [ $1 -eq 0 ] ; then
957     # Package removal, not upgrade
958     /bin/systemctl --no-reload disable libvirtd.service > /dev/null 2>&1 || :
959     /bin/systemctl stop libvirtd.service > /dev/null 2>&1 || :
960 fi
961 %else
962 if [ $1 = 0 ]; then
963     /sbin/service libvirtd stop 1>/dev/null 2>&1
964     /sbin/chkconfig --del libvirtd
965 fi
966 %endif
967 %endif
968
969 %postun
970 %if %{with_libvirtd}
971 %if %{with_systemd}
972 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
973 if [ $1 -ge 1 ] ; then
974     # Package upgrade, not uninstall
975     /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
976 fi
977 %endif
978 %endif
979
980 %if %{with_libvirtd}
981 %if %{with_systemd}
982 %triggerun -- libvirt < 0.9.4
983 %{_bindir}/systemd-sysv-convert --save libvirtd >/dev/null 2>&1 ||:
984
985 # If the package is allowed to autostart:
986 /bin/systemctl --no-reload enable libvirtd.service >/dev/null 2>&1 ||:
987
988 # Run these because the SysV package being removed won't do them
989 /sbin/chkconfig --del libvirtd >/dev/null 2>&1 || :
990 /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
991 %endif
992 %endif
993
994 %preun client
995
996 %if %{with_systemd}
997 %else
998 if [ $1 = 0 ]; then
999     /sbin/chkconfig --del libvirt-guests
1000     rm -f /var/lib/libvirt/libvirt-guests
1001 fi
1002 %endif
1003
1004 %post client
1005
1006 /sbin/ldconfig
1007 %if %{with_systemd}
1008 %else
1009 /sbin/chkconfig --add libvirt-guests
1010 if [ $1 -ge 1 ]; then
1011     level=$(/sbin/runlevel | /bin/cut -d ' ' -f 2)
1012     if /sbin/chkconfig --levels $level libvirt-guests; then
1013         # this doesn't do anything but allowing for libvirt-guests to be
1014         # stopped on the first shutdown
1015         /sbin/service libvirt-guests start > /dev/null 2>&1 || true
1016     fi
1017 fi
1018 %endif
1019
1020 %postun client -p /sbin/ldconfig
1021
1022 %if %{with_systemd}
1023 %triggerun client -- libvirt < 0.9.4
1024 %{_bindir}/systemd-sysv-convert --save libvirt-guests >/dev/null 2>&1 ||:
1025
1026 # If the package is allowed to autostart:
1027 /bin/systemctl --no-reload enable libvirt-guests.service >/dev/null 2>&1 ||:
1028
1029 # Run these because the SysV package being removed won't do them
1030 /sbin/chkconfig --del libvirt-guests >/dev/null 2>&1 || :
1031 /bin/systemctl try-restart libvirt-guests.service >/dev/null 2>&1 || :
1032 %endif
1033
1034 %if %{with_libvirtd}
1035 %files
1036 %defattr(-, root, root)
1037
1038 %doc AUTHORS ChangeLog.gz NEWS README COPYING.LIB TODO
1039 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
1040
1041 %if %{with_network}
1042 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
1043 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
1044 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
1045 %endif
1046
1047 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
1048 %{_sysconfdir}/libvirt/nwfilter/*.xml
1049
1050 %{_sysconfdir}/rc.d/init.d/libvirtd
1051 %if %{with_systemd}
1052 %{_unitdir}/libvirtd.service
1053 %endif
1054 %doc daemon/libvirtd.upstart
1055 %config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
1056 %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
1057 %if 0%{?fedora} >= 14 || 0%{?rhel} >= 6
1058 %config(noreplace) %{_sysconfdir}/sysctl.d/libvirtd
1059 %else
1060 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
1061 %endif
1062 %if %{with_dtrace}
1063 %{_datadir}/systemtap/tapset/libvirt_probes.stp
1064 %{_datadir}/systemtap/tapset/libvirt_functions.stp
1065 %endif
1066 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
1067 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
1068 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
1069 %if %{with_libxl}
1070 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/
1071 %endif
1072
1073 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
1074 %if %{with_qemu}
1075 %config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
1076 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
1077 %endif
1078 %if %{with_lxc}
1079 %config(noreplace) %{_sysconfdir}/libvirt/lxc.conf
1080 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc
1081 %endif
1082 %if %{with_uml}
1083 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.uml
1084 %endif
1085
1086 %dir %{_datadir}/libvirt/
1087
1088 %if %{with_network}
1089 %dir %{_datadir}/libvirt/networks/
1090 %{_datadir}/libvirt/networks/default.xml
1091 %endif
1092
1093 %ghost %dir %{_localstatedir}/run/libvirt/
1094
1095 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
1096 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/
1097 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
1098 %dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/
1099
1100 %if %{with_qemu}
1101 %ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
1102 %dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
1103 %dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
1104 %endif
1105 %if %{with_lxc}
1106 %ghost %dir %{_localstatedir}/run/libvirt/lxc/
1107 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/
1108 %endif
1109 %if %{with_uml}
1110 %ghost %dir %{_localstatedir}/run/libvirt/uml/
1111 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/
1112 %endif
1113 %if %{with_libxl}
1114 %ghost %dir %{_localstatedir}/run/libvirt/libxl/
1115 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
1116 %endif
1117 %if %{with_network}
1118 %ghost %dir %{_localstatedir}/run/libvirt/network/
1119 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
1120 %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
1121 %endif
1122
1123 %if %{with_qemu}
1124 %{_datadir}/augeas/lenses/libvirtd_qemu.aug
1125 %{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
1126 %endif
1127
1128 %if %{with_lxc}
1129 %{_datadir}/augeas/lenses/libvirtd_lxc.aug
1130 %{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
1131 %endif
1132
1133 %{_datadir}/augeas/lenses/libvirtd.aug
1134 %{_datadir}/augeas/lenses/tests/test_libvirtd.aug
1135
1136 %if %{with_polkit}
1137 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
1138 %{_datadir}/polkit-1/actions/org.libvirt.unix.policy
1139 %else
1140 %{_datadir}/PolicyKit/policy/org.libvirt.unix.policy
1141 %endif
1142 %endif
1143
1144 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
1145
1146 %if %{with_lxc}
1147 %attr(0755, root, root) %{_libexecdir}/libvirt_lxc
1148 %endif
1149
1150 %if %{with_storage_disk}
1151 %attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
1152 %endif
1153
1154 %attr(0755, root, root) %{_libexecdir}/libvirt_iohelper
1155 %attr(0755, root, root) %{_sbindir}/libvirtd
1156
1157 %{_mandir}/man8/libvirtd.8*
1158
1159 %doc docs/*.xml
1160 %endif
1161
1162 %if %{with_sanlock}
1163 %files lock-sanlock
1164 %defattr(-, root, root)
1165 %if %{with_qemu}
1166 %config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf
1167 %endif
1168 %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so
1169 %{_datadir}/augeas/lenses/libvirt_sanlock.aug
1170 %{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
1171 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/sanlock
1172 %{_sbindir}/virt-sanlock-cleanup
1173 %{_mandir}/man8/virt-sanlock-cleanup.8*
1174 %endif
1175
1176 %files client -f %{name}.lang
1177 %defattr(-, root, root)
1178 %doc AUTHORS ChangeLog.gz NEWS README COPYING.LIB TODO
1179
1180 %config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
1181 %{_mandir}/man1/virsh.1*
1182 %{_mandir}/man1/virt-xml-validate.1*
1183 %{_mandir}/man1/virt-pki-validate.1*
1184 %{_bindir}/virsh
1185 %{_bindir}/virt-xml-validate
1186 %{_bindir}/virt-pki-validate
1187 %{_libdir}/lib*.so.*
1188
1189 %dir %{_datadir}/libvirt/
1190 %dir %{_datadir}/libvirt/schemas/
1191
1192 %{_datadir}/libvirt/schemas/basictypes.rng
1193 %{_datadir}/libvirt/schemas/capability.rng
1194 %{_datadir}/libvirt/schemas/domain.rng
1195 %{_datadir}/libvirt/schemas/domaincommon.rng
1196 %{_datadir}/libvirt/schemas/domainsnapshot.rng
1197 %{_datadir}/libvirt/schemas/interface.rng
1198 %{_datadir}/libvirt/schemas/network.rng
1199 %{_datadir}/libvirt/schemas/networkcommon.rng
1200 %{_datadir}/libvirt/schemas/nodedev.rng
1201 %{_datadir}/libvirt/schemas/nwfilter.rng
1202 %{_datadir}/libvirt/schemas/secret.rng
1203 %{_datadir}/libvirt/schemas/storageencryption.rng
1204 %{_datadir}/libvirt/schemas/storagepool.rng
1205 %{_datadir}/libvirt/schemas/storagevol.rng
1206
1207 %{_datadir}/libvirt/cpu_map.xml
1208
1209 %{_sysconfdir}/rc.d/init.d/libvirt-guests
1210 %if %{with_systemd}
1211 %{_unitdir}/libvirt-guests.service
1212 %endif
1213 %config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
1214 %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/
1215
1216 %if %{with_sasl}
1217 %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
1218 %endif
1219
1220 %files devel
1221 %defattr(-, root, root)
1222
1223 %{_libdir}/lib*.so
1224 %dir %{_includedir}/libvirt
1225 %{_includedir}/libvirt/*.h
1226 %{_libdir}/pkgconfig/libvirt.pc
1227 %dir %{_datadir}/gtk-doc/html/libvirt/
1228 %doc %{_datadir}/gtk-doc/html/libvirt/*.devhelp
1229 %doc %{_datadir}/gtk-doc/html/libvirt/*.html
1230 %doc %{_datadir}/gtk-doc/html/libvirt/*.png
1231 %doc %{_datadir}/gtk-doc/html/libvirt/*.css
1232
1233 %doc docs/*.html docs/html docs/*.gif
1234 %doc docs/libvirt-api.xml
1235 %doc examples/hellolibvirt
1236 %doc examples/domain-events/events-c
1237 %doc examples/dominfo
1238 %doc examples/domsuspend
1239 %doc examples/openauth
1240 %doc examples/xml
1241 %doc examples/systemtap
1242
1243 %if %{with_python}
1244 %files python
1245 %defattr(-, root, root)
1246
1247 %doc AUTHORS NEWS README COPYING.LIB
1248 %{_libdir}/python*/site-packages/libvirt.py*
1249 %{_libdir}/python*/site-packages/libvirt_qemu.py*
1250 %{_libdir}/python*/site-packages/libvirtmod*
1251 %doc python/tests/*.py
1252 %doc python/TODO
1253 %doc examples/python
1254 %doc examples/domain-events/events-python
1255 %endif
1256
1257 %changelog
1258 * Thu Dec  8 2011 Daniel Veillard <veillard@redhat.com> - 0.9.8-1
1259 - Add support for QEMU 1.0
1260 - Add preliminary PPC cpu driver
1261 - Add new API virDomain{Set, Get}BlockIoTune
1262 - block_resize: Define the new API
1263 - Add a public API to invoke suspend/resume on the host
1264 - various improvements for LXC containers
1265 - Define keepalive protocol and add virConnectIsAlive API
1266 - Add support for STP and VLAN filtering
1267 - many improvements and bug fixes
1268
1269 * Tue Nov  8 2011 Daniel Veillard <veillard@redhat.com> - 0.9.7-1
1270 - esx: support vSphere 5.x
1271 - vbox: support for VirtualBox 4.1
1272 - Introduce the virDomainOpenGraphics API
1273 - Add AHCI support to qemu driver
1274 - snapshot: many improvements and 2 new APIs
1275 - api: Add public api for 'reset'
1276 - many improvements and bug fixes
1277
1278 * Thu Sep 22 2011 Daniel Veillard <veillard@redhat.com> - 0.9.6-1
1279 - Fix the qemu reboot bug and a few others bug fixes
1280
1281 * Tue Sep 20 2011 Daniel Veillard <veillard@redhat.com> - 0.9.5-1
1282 - many snapshot improvements (Eric Blake)
1283 - latency: Define new public API and structure (Osier Yang)
1284 - USB2 and various USB improvements (Marc-André Lureau)
1285 - storage: Add fs pool formatting (Osier Yang)
1286 - Add public API for getting migration speed (Jim Fehlig)
1287 - Add basic driver for Microsoft Hyper-V (Matthias Bolte)
1288 - many improvements and bug fixes
1289
1290 * Wed Aug  3 2011 Daniel Veillard <veillard@redhat.com> - 0.9.4-1
1291 - network bandwidth QoS control
1292 - Add new API virDomainBlockPull*
1293 - save: new API to manipulate save file images
1294 - CPU bandwidth limits support
1295 - allow to send NMI and key event to guests
1296 - new API virDomainUndefineFlags
1297 - Implement code to attach to external QEMU instances
1298 - bios: Add support for SGA
1299 - various missing python binding
1300 - many improvements and bug fixes
1301
1302 * Mon Jul  4 2011 Daniel Veillard <veillard@redhat.com> - 0.9.3-1
1303 - new API virDomainGetVcpupinInfo
1304 - Add TXT record support for virtual DNS service
1305 - Support reboots with the QEMU driver
1306 - New API virDomainGetControlInfo API
1307 - New API virNodeGetMemoryStats
1308 - New API virNodeGetCPUTime
1309 - New API for send-key
1310 - New API virDomainPinVcpuFlags
1311 - support multifunction PCI device
1312 - lxc: various improvements
1313 - many improvements and bug fixes
1314
1315 * Mon Jun  6 2011 Daniel Veillard <veillard@redhat.com> - 0.9.2-1
1316 - Framework for lock manager plugins
1317 - API for network config change transactions
1318 - flags for setting memory parameters
1319 - virDomainGetState public API
1320 - qemu: allow blkstat/blkinfo calls during migration
1321 - Introduce migration v3 API
1322 - Defining the Screenshot public API
1323 - public API for NMI injection
1324 - Various improvements and bug fixes
1325
1326 * Thu May  5 2011 Daniel Veillard <veillard@redhat.com> - 0.9.1-1
1327 - support various persistent domain updates
1328 - improvements on memory APIs
1329 - Add virDomainEventRebootNew
1330 - various improvements to libxl driver
1331 - Spice: support audio, images and stream compression
1332 - Various improvements and bug fixes
1333
1334 * Mon Apr  4 2011 Daniel Veillard <veillard@redhat.com> - 0.9.0-1
1335 - Support cputune cpu usage tuning
1336 - Add public APIs for storage volume upload/download
1337 - Add public API for setting migration speed on the fly
1338 - Add libxenlight driver
1339 - qemu: support migration to fd
1340 - libvirt: add virDomain{Get,Set}BlkioParameters
1341 - setmem: introduce a new libvirt API (virDomainSetMemoryFlags)
1342 - Expose event loop implementation as a public API
1343 - Dump the debug buffer to libvirtd.log on fatal signal
1344 - Audit support
1345 - Various improvements and bug fixes
1346
1347 * Thu Feb 17 2011 Daniel Veillard <veillard@redhat.com> - 0.8.8-1
1348 - expose new API for sysinfo extraction
1349 - cgroup blkio weight support
1350 - smartcard device support
1351 - qemu: Support per-device boot ordering
1352 - Various improvements and bug fixes
1353
1354 * Tue Jan  4 2011 Daniel Veillard <veillard@redhat.com> - 0.8.7-1
1355 - Preliminary support for VirtualBox 4.0
1356 - IPv6 support
1357 - Add VMware Workstation and Player driver driver
1358 - Add network disk support
1359 - Various improvements and bug fixes
1360
1361 * Tue Nov 30 2010 Daniel Veillard <veillard@redhat.com> - 0.8.6-1
1362 - Add support for iSCSI target auto-discovery
1363 - QED: Basic support for QED images
1364 - remote console support
1365 - support for SPICE graphics
1366 - sysinfo and VMBIOS support
1367 - virsh qemu-monitor-command
1368 - various improvements and bug fixes
1369
1370 * Fri Oct 29 2010 Daniel Veillard <veillard@redhat.com> - 0.8.5-1
1371 - Enable JSON and netdev features in QEMU >= 0.13
1372 - framework for auditing integration
1373 - framework DTrace/SystemTap integration
1374 - Setting the number of vcpu at boot
1375 - Enable support for nested SVM
1376 - Virtio plan9fs filesystem QEMU
1377 - Memory parameter controls
1378 - various improvements and bug fixes
1379
1380 * Fri Sep 10 2010 Daniel Veillard <veillard@redhat.com> - 0.8.4-1
1381 - big improvements to UML driver
1382 - various improvements and bug fixes
1383
1384 * Wed Aug  4 2010 Daniel Veillard <veillard@redhat.com> - 0.8.3-1
1385 - esx: Support vSphere 4.1
1386 - Qemu arbitrary monitor commands
1387 - Qemu Monitor API entry point
1388 - various improvements and bug fixes
1389
1390 * Mon Jul  5 2010 Daniel Veillard <veillard@redhat.com> - 0.8.2-1
1391 - phyp: adding support for IVM
1392 - libvirt: introduce domainCreateWithFlags API
1393 - add 802.1Qbh and 802.1Qbg switches handling
1394 - Support for VirtualBox version 3.2
1395 - Init script for handling guests on shutdown/boot
1396 - qemu: live migration with non-shared storage for kvm
1397
1398 * Fri Apr 30 2010 Daniel Veillard <veillard@redhat.com> - 0.8.1-1
1399 - Starts dnsmasq from libvirtd with --dhcp-hostsfile
1400 - Add virDomainGetBlockInfo API to query disk sizing
1401 - a lot of bug fixes and cleanups
1402
1403 * Mon Apr 12 2010 Daniel Veillard <veillard@redhat.com> - 0.8.0-1
1404 - Snapshotting support (QEmu/VBox/ESX)
1405 - Network filtering API
1406 - XenAPI driver
1407 - new APIs for domain events
1408 - Libvirt managed save API
1409 - timer subselection for domain clock
1410 - synchronous hooks
1411 - API to update guest CPU to host CPU
1412 - virDomainUpdateDeviceFlags new API
1413 - migrate max downtime API
1414 - volume wiping API
1415 - and many bug fixes
1416
1417 * Fri Mar  5 2010 Daniel Veillard <veillard@redhat.com> - 0.7.7-1
1418 - macvtap support
1419 - async job handling
1420 - virtio channel
1421 - computing baseline CPU
1422 - virDomain{Attach,Detach}DeviceFlags
1423 - assorted bug fixes and lots of cleanups
1424
1425 * Wed Feb  3 2010 Daniel Veillard <veillard@redhat.com> - 0.7.6-1
1426
1427 * Wed Dec 23 2009 Daniel Veillard <veillard@redhat.com> - 0.7.5-1
1428 - Add new API virDomainMemoryStats
1429 - Public API and domain extension for CPU flags
1430 - vbox: Add support for version 3.1
1431 - Support QEMU's virtual FAT block device driver
1432 - a lot of fixes
1433
1434 * Fri Nov 20 2009 Daniel Veillard <veillard@redhat.com> - 0.7.3-1
1435 - udev node device backend
1436 - API to check object properties
1437 - better QEmu monitor processing
1438 - MAC address based port filtering for qemu
1439 - support IPv6 and multiple addresses per interfaces
1440 - a lot of fixes
1441
1442 * Tue Sep 15 2009 Daniel Veillard <veillard@redhat.com> - 0.7.1-1
1443 - ESX, VBox driver updates
1444 - mutipath support
1445 - support for encrypted (qcow) volume
1446 - compressed save image format for Qemu/KVM
1447 - QEmu host PCI device hotplug support
1448 - configuration of huge pages in guests
1449 - a lot of fixes
1450
1451 * Wed Aug  5 2009 Daniel Veillard <veillard@redhat.com> - 0.7.0-1
1452 - ESX, VBox3, Power Hypervisor drivers
1453 - new net filesystem glusterfs
1454 - Storage cloning for LVM and Disk backends
1455 - interface implementation based on netcf
1456 - Support cgroups in QEMU driver
1457 - QEmu hotplug NIC support
1458 - a lot of fixes
1459
1460 * Fri Jul  3 2009 Daniel Veillard <veillard@redhat.com> - 0.6.5-1
1461 - release of 0.6.5
1462
1463 * Fri May 29 2009 Daniel Veillard <veillard@redhat.com> - 0.6.4-1
1464 - release of 0.6.4
1465 - various new APIs
1466
1467 * Fri Apr 24 2009 Daniel Veillard <veillard@redhat.com> - 0.6.3-1
1468 - release of 0.6.3
1469 - VirtualBox driver
1470
1471 * Fri Apr  3 2009 Daniel Veillard <veillard@redhat.com> - 0.6.2-1
1472 - release of 0.6.2
1473
1474 * Fri Mar  4 2009 Daniel Veillard <veillard@redhat.com> - 0.6.1-1
1475 - release of 0.6.1
1476
1477 * Sat Jan 31 2009 Daniel Veillard <veillard@redhat.com> - 0.6.0-1
1478 - release of 0.6.0
1479
1480 * Tue Nov 25 2008 Daniel Veillard <veillard@redhat.com> - 0.5.0-1
1481 - release of 0.5.0
1482
1483 * Tue Sep 23 2008 Daniel Veillard <veillard@redhat.com> - 0.4.6-1
1484 - release of 0.4.6
1485
1486 * Mon Sep  8 2008 Daniel Veillard <veillard@redhat.com> - 0.4.5-1
1487 - release of 0.4.5
1488
1489 * Wed Jun 25 2008 Daniel Veillard <veillard@redhat.com> - 0.4.4-1
1490 - release of 0.4.4
1491 - mostly a few bug fixes from 0.4.3
1492
1493 * Thu Jun 12 2008 Daniel Veillard <veillard@redhat.com> - 0.4.3-1
1494 - release of 0.4.3
1495 - lots of bug fixes and small improvements
1496
1497 * Tue Apr  8 2008 Daniel Veillard <veillard@redhat.com> - 0.4.2-1
1498 - release of 0.4.2
1499 - lots of bug fixes and small improvements
1500
1501 * Mon Mar  3 2008 Daniel Veillard <veillard@redhat.com> - 0.4.1-1
1502 - Release of 0.4.1
1503 - Storage APIs
1504 - xenner support
1505 - lots of assorted improvements, bugfixes and cleanups
1506 - documentation and localization improvements
1507
1508 * Tue Dec 18 2007 Daniel Veillard <veillard@redhat.com> - 0.4.0-1
1509 - Release of 0.4.0
1510 - SASL based authentication
1511 - PolicyKit authentication
1512 - improved NUMA and statistics support
1513 - lots of assorted improvements, bugfixes and cleanups
1514 - documentation and localization improvements
1515
1516 * Sun Sep 30 2007 Daniel Veillard <veillard@redhat.com> - 0.3.3-1
1517 - Release of 0.3.3
1518 - Avahi support
1519 - NUMA support
1520 - lots of assorted improvements, bugfixes and cleanups
1521 - documentation and localization improvements
1522
1523 * Tue Aug 21 2007 Daniel Veillard <veillard@redhat.com> - 0.3.2-1
1524 - Release of 0.3.2
1525 - API for domains migration
1526 - APIs for collecting statistics on disks and interfaces
1527 - lots of assorted bugfixes and cleanups
1528 - documentation and localization improvements
1529
1530 * Tue Jul 24 2007 Daniel Veillard <veillard@redhat.com> - 0.3.1-1
1531 - Release of 0.3.1
1532 - localtime clock support
1533 - PS/2 and USB input devices
1534 - lots of assorted bugfixes and cleanups
1535 - documentation and localization improvements
1536
1537 * Mon Jul  9 2007 Daniel Veillard <veillard@redhat.com> - 0.3.0-1
1538 - Release of 0.3.0
1539 - Secure remote access support
1540 - unification of daemons
1541 - lots of assorted bugfixes and cleanups
1542 - documentation and localization improvements
1543
1544 * Fri Jun  8 2007 Daniel Veillard <veillard@redhat.com> - 0.2.3-1
1545 - Release of 0.2.3
1546 - lot of assorted bugfixes and cleanups
1547 - support for Xen-3.1
1548 - new scheduler API
1549
1550 * Tue Apr 17 2007 Daniel Veillard <veillard@redhat.com> - 0.2.2-1
1551 - Release of 0.2.2
1552 - lot of assorted bugfixes and cleanups
1553 - preparing for Xen-3.0.5
1554
1555 * Thu Mar 22 2007 Jeremy Katz <katzj@redhat.com> - 0.2.1-2.fc7
1556 - don't require xen; we don't need the daemon and can control non-xen now
1557 - fix scriptlet error (need to own more directories)
1558 - update description text
1559
1560 * Fri Mar 16 2007 Daniel Veillard <veillard@redhat.com> - 0.2.1-1
1561 - Release of 0.2.1
1562 - lot of bug and portability fixes
1563 - Add support for network autostart and init scripts
1564 - New API to detect the virtualization capabilities of a host
1565 - Documentation updates
1566
1567 * Fri Feb 23 2007 Daniel P. Berrange <berrange@redhat.com> - 0.2.0-4.fc7
1568 - Fix loading of guest & network configs
1569
1570 * Fri Feb 16 2007 Daniel P. Berrange <berrange@redhat.com> - 0.2.0-3.fc7
1571 - Disable kqemu support since its not in Fedora qemu binary
1572 - Fix for -vnc arg syntax change in 0.9.0  QEMU
1573
1574 * Thu Feb 15 2007 Daniel P. Berrange <berrange@redhat.com> - 0.2.0-2.fc7
1575 - Fixed path to qemu daemon for autostart
1576 - Fixed generation of <features> block in XML
1577 - Pre-create config directory at startup
1578
1579 * Wed Feb 14 2007 Daniel Veillard <veillard@redhat.com> 0.2.0-1.fc7
1580 - support for KVM and QEmu
1581 - support for network configuration
1582 - assorted fixes
1583
1584 * Mon Jan 22 2007 Daniel Veillard <veillard@redhat.com> 0.1.11-1.fc7
1585 - finish inactive Xen domains support
1586 - memory leak fix
1587 - RelaxNG schemas for XML configs
1588
1589 * Wed Dec 20 2006 Daniel Veillard <veillard@redhat.com> 0.1.10-1.fc7
1590 - support for inactive Xen domains
1591 - improved support for Xen display and vnc
1592 - a few bug fixes
1593 - localization updates
1594
1595 * Thu Dec  7 2006 Jeremy Katz <katzj@redhat.com> - 0.1.9-2
1596 - rebuild against python 2.5
1597
1598 * Wed Nov 29 2006 Daniel Veillard <veillard@redhat.com> 0.1.9-1
1599 - better error reporting
1600 - python bindings fixes and extensions
1601 - add support for shareable drives
1602 - add support for non-bridge style networking
1603 - hot plug device support
1604 - added support for inactive domains
1605 - API to dump core of domains
1606 - various bug fixes, cleanups and improvements
1607 - updated the localization
1608
1609 * Tue Nov  7 2006 Daniel Veillard <veillard@redhat.com> 0.1.8-3
1610 - it's pkgconfig not pgkconfig !
1611
1612 * Mon Nov  6 2006 Daniel Veillard <veillard@redhat.com> 0.1.8-2
1613 - fixing spec file, added %dist, -devel requires pkgconfig and xen-devel
1614 - Resolves: rhbz#202320
1615
1616 * Mon Oct 16 2006 Daniel Veillard <veillard@redhat.com> 0.1.8-1
1617 - fix missing page size detection code for ia64
1618 - fix mlock size when getting domain info list from hypervisor
1619 - vcpu number initialization
1620 - don't label crashed domains as shut off
1621 - fix virsh man page
1622 - blktapdd support for alternate drivers like blktap
1623 - memory leak fixes (xend interface and XML parsing)
1624 - compile fix
1625 - mlock/munlock size fixes
1626
1627 * Fri Sep 22 2006 Daniel Veillard <veillard@redhat.com> 0.1.7-1
1628 - Fix bug when running against xen-3.0.3 hypercalls
1629 - Fix memory bug when getting vcpus info from xend
1630
1631 * Fri Sep 22 2006 Daniel Veillard <veillard@redhat.com> 0.1.6-1
1632 - Support for localization
1633 - Support for new Xen-3.0.3 cdrom and disk configuration
1634 - Support for setting VNC port
1635 - Fix bug when running against xen-3.0.2 hypercalls
1636 - Fix reconnection problem when talking directly to http xend
1637
1638 * Tue Sep  5 2006 Jeremy Katz <katzj@redhat.com> - 0.1.5-3
1639 - patch from danpb to support new-format cd devices for HVM guests
1640
1641 * Tue Sep  5 2006 Daniel Veillard <veillard@redhat.com> 0.1.5-2
1642 - reactivating ia64 support
1643
1644 * Tue Sep  5 2006 Daniel Veillard <veillard@redhat.com> 0.1.5-1
1645 - new release
1646 - bug fixes
1647 - support for new hypervisor calls
1648 - early code for config files and defined domains
1649
1650 * Mon Sep  4 2006 Daniel Berrange <berrange@redhat.com> - 0.1.4-5
1651 - add patch to address dom0_ops API breakage in Xen 3.0.3 tree
1652
1653 * Mon Aug 28 2006 Jeremy Katz <katzj@redhat.com> - 0.1.4-4
1654 - add patch to support paravirt framebuffer in Xen
1655
1656 * Mon Aug 21 2006 Daniel Veillard <veillard@redhat.com> 0.1.4-3
1657 - another patch to fix network handling in non-HVM guests
1658
1659 * Thu Aug 17 2006 Daniel Veillard <veillard@redhat.com> 0.1.4-2
1660 - patch to fix virParseUUID()
1661
1662 * Wed Aug 16 2006 Daniel Veillard <veillard@redhat.com> 0.1.4-1
1663 - vCPUs and affinity support
1664 - more complete XML, console and boot options
1665 - specific features support
1666 - enforced read-only connections
1667 - various improvements, bug fixes
1668
1669 * Wed Aug  2 2006 Jeremy Katz <katzj@redhat.com> - 0.1.3-6
1670 - add patch from pvetere to allow getting uuid from libvirt
1671
1672 * Wed Aug  2 2006 Jeremy Katz <katzj@redhat.com> - 0.1.3-5
1673 - build on ia64 now
1674
1675 * Thu Jul 27 2006 Jeremy Katz <katzj@redhat.com> - 0.1.3-4
1676 - don't BR xen, we just need xen-devel
1677
1678 * Thu Jul 27 2006 Daniel Veillard <veillard@redhat.com> 0.1.3-3
1679 - need rebuild since libxenstore is now versionned
1680
1681 * Mon Jul 24 2006 Mark McLoughlin <markmc@redhat.com> - 0.1.3-2
1682 - Add BuildRequires: xen-devel
1683
1684 * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.1.3-1.1
1685 - rebuild
1686
1687 * Tue Jul 11 2006 Daniel Veillard <veillard@redhat.com> 0.1.3-1
1688 - support for HVM Xen guests
1689 - various bugfixes
1690
1691 * Mon Jul  3 2006 Daniel Veillard <veillard@redhat.com> 0.1.2-1
1692 - added a proxy mechanism for read only access using httpu
1693 - fixed header includes paths
1694
1695 * Wed Jun 21 2006 Daniel Veillard <veillard@redhat.com> 0.1.1-1
1696 - extend and cleanup the driver infrastructure and code
1697 - python examples
1698 - extend uuid support
1699 - bug fixes, buffer handling cleanups
1700 - support for new Xen hypervisor API
1701 - test driver for unit testing
1702 - virsh --conect argument
1703
1704 * Mon Apr 10 2006 Daniel Veillard <veillard@redhat.com> 0.1.0-1
1705 - various fixes
1706 - new APIs: for Node information and Reboot
1707 - virsh improvements and extensions
1708 - documentation updates and man page
1709 - enhancement and fixes of the XML description format
1710
1711 * Tue Feb 28 2006 Daniel Veillard <veillard@redhat.com> 0.0.6-1
1712 - added error handling APIs
1713 - small bug fixes
1714 - improve python bindings
1715 - augment documentation and regression tests
1716
1717 * Thu Feb 23 2006 Daniel Veillard <veillard@redhat.com> 0.0.5-1
1718 - new domain creation API
1719 - new UUID based APIs
1720 - more tests, documentation, devhelp
1721 - bug fixes
1722
1723 * Fri Feb 10 2006 Daniel Veillard <veillard@redhat.com> 0.0.4-1
1724 - fixes some problems in 0.0.3 due to the change of names
1725
1726 * Wed Feb  8 2006 Daniel Veillard <veillard@redhat.com> 0.0.3-1
1727 - changed library name to libvirt from libvir, complete and test the python
1728   bindings
1729
1730 * Sun Jan 29 2006 Daniel Veillard <veillard@redhat.com> 0.0.2-1
1731 - upstream release of 0.0.2, use xend, save and restore added, python bindings
1732   fixed
1733
1734 * Wed Nov  2 2005 Daniel Veillard <veillard@redhat.com> 0.0.1-1
1735 - created