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