3
%define with_xen 0%{!?_without_xen:1}
4
%define with_xen_proxy 0%{!?_without_xen_proxy:1}
5
%define with_qemu 0%{!?_without_qemu:1}
6
%define with_openvz 0%{!?_without_openvz:1}
7
%define with_lxc 0%{!?_without_lxc:1}
8
%define with_vbox 0%{!?_without_vbox:1}
9
%define with_sasl 0%{!?_without_sasl:1}
10
%define with_avahi 0%{!?_without_avahi:1}
11
%define with_python 0%{!?_without_python:1}
12
%define with_libvirtd 0%{!?_without_libvirtd:1}
13
%define with_uml 0%{!?_without_uml:1}
14
%define with_one 0%{!?_without_one:1}
15
%define with_network 0%{!?_without_network:1}
16
%define with_storage_fs 0%{!?_without_storage_fs:1}
17
%define with_storage_lvm 0%{!?_without_storage_lvm:1}
18
%define with_storage_iscsi 0%{!?_without_storage_iscsi:1}
19
%define with_storage_disk 0%{!?_without_storage_disk:1}
20
%define with_numactl 0%{!?_without_numactl:1}
22
# default to off - selectively enabled below
3
# A client only build will create a libvirt.so only containing
4
# the generic RPC driver, and test driver and no libvirtd
5
# Default to a full server + client build
8
# Now turn off server build in certain cases
10
# RHEL-5 builds are client-only for s390, ppc
12
%ifnarch i386 i586 i686 x86_64 ia64
17
# Disable all server side drivers if client only build requested
19
%define server_drivers 0
21
%define server_drivers 1
25
# Now set the defaults for all the important features, independent
26
# of any particular OS
28
# First the daemon itself
29
%define with_libvirtd 0%{!?_without_libvirtd:%{server_drivers}}
30
%define with_avahi 0%{!?_without_avahi:%{server_drivers}}
32
# Then the hypervisor drivers that run on local host
33
%define with_xen 0%{!?_without_xen:%{server_drivers}}
34
%define with_xen_proxy 0%{!?_without_xen_proxy:%{server_drivers}}
35
%define with_qemu 0%{!?_without_qemu:%{server_drivers}}
36
%define with_openvz 0%{!?_without_openvz:%{server_drivers}}
37
%define with_lxc 0%{!?_without_lxc:%{server_drivers}}
38
%define with_vbox 0%{!?_without_vbox:%{server_drivers}}
39
%define with_uml 0%{!?_without_uml:%{server_drivers}}
40
# XXX this shouldn't be here, but it mistakenly links into libvirtd
41
%define with_one 0%{!?_without_one:%{server_drivers}}
43
# Then the hypervisor drivers that talk a native remote protocol
44
%define with_phyp 0%{!?_without_phyp:1}
45
%define with_esx 0%{!?_without_esx:1}
47
# Then the secondary host drivers
48
%define with_network 0%{!?_without_network:%{server_drivers}}
49
%define with_storage_fs 0%{!?_without_storage_fs:%{server_drivers}}
50
%define with_storage_lvm 0%{!?_without_storage_lvm:%{server_drivers}}
51
%define with_storage_iscsi 0%{!?_without_storage_iscsi:%{server_drivers}}
52
%define with_storage_disk 0%{!?_without_storage_disk:%{server_drivers}}
53
%define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}}
54
%define with_numactl 0%{!?_without_numactl:%{server_drivers}}
55
%define with_selinux 0%{!?_without_selinux:%{server_drivers}}
56
%define with_hal 0%{!?_without_hal:%{server_drivers}}
58
# A few optional bits off by default, we enable later
23
59
%define with_polkit 0%{!?_without_polkit:0}
24
60
%define with_capng 0%{!?_without_capng:0}
25
61
%define with_netcf 0%{!?_without_netcf:0}
28
%define with_phyp 0%{!?_without_phyp:0}
63
# Non-server/HV driver defaults which are always enabled
64
%define with_python 0%{!?_without_python:1}
65
%define with_sasl 0%{!?_without_sasl:1}
68
# Finally set the OS / architecture specific special cases
30
70
# Xen is available only on i386 x86_64 ia64
31
71
%ifnarch i386 i586 i686 x86_64 ia64
76
# RHEL doesn't ship OpenVZ, VBox, UML, OpenNebula, PowerHypervisor or ESX
86
# RHEL-5 has restricted QEMU to x86_64 only and is too old for LXC
94
# RHEL-6 has restricted QEMU to x86_64 only, stopped including Xen
95
# on all archs. Other archs all have LXC available though
103
# If Xen isn't turned on, we shouldn't build the xen proxy either
36
105
%define with_xen_proxy 0
108
# Fedora doesn't have any QEMU on ppc64 - only ppc
41
111
%define with_qemu 0
115
# PolicyKit was introduced in Fedora 8 / RHEL-6 or newer, allowing
116
# the setuid Xen proxy to be killed off
117
%if 0%{?fedora} >= 8 || 0%{?rhel} >= 6
46
118
%define with_polkit 0%{!?_without_polkit:1}
47
119
%define with_xen_proxy 0
122
# libcapng is used to manage capabilities in Fedora 12 / RHEL-6 or newer
123
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
51
124
%define with_capng 0%{!?_without_capng:1}
55
%define with_netcf 0%{!?_without_netcf:1}
127
# netcf is used to manage network interfaces in Fedora 12 / RHEL-6 or newer
128
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
129
%define with_netcf 0%{!?_without_netcf:%{server_drivers}}
132
# Force QEMU to run as non-root
133
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
59
134
%define qemu_user qemu
60
135
%define qemu_group qemu
458
615
%postun client -p /sbin/ldconfig
461
619
%defattr(-, root, root)
463
621
%doc AUTHORS ChangeLog.gz NEWS README COPYING.LIB TODO
464
622
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
467
625
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
468
626
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
469
627
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
473
630
%{_sysconfdir}/rc.d/init.d/libvirtd
474
631
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
475
632
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
476
633
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
634
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
635
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
636
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
480
639
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
642
%config(noreplace) %{_sysconfdir}/libvirt/lxc.conf
484
645
%dir %{_datadir}/libvirt/
485
648
%dir %{_datadir}/libvirt/networks/
486
649
%{_datadir}/libvirt/networks/default.xml
491
654
%dir %{_localstatedir}/lib/libvirt/
492
655
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
493
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/boot/
656
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
494
657
%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/
497
%dir %attr(0700, %{qemu_user}, %{qemu_group}) %{_localstatedir}/run/libvirt/qemu/
660
%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
498
661
%dir %attr(0700, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
499
662
%dir %attr(0700, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/