maint: Post-release version bump to 5.5.0
[libvirt/ericb.git] / libvirt.spec.in
blob78b7f43934f309c5e0271ea85fdd63723538484f
1 # -*- rpm-spec -*-
3 # This spec file assumes you are building on a Fedora or RHEL version
4 # that's still supported by the vendor. It may work on other distros
5 # or versions, but no effort will be made to ensure that going forward.
6 %define min_rhel 7
7 %define min_fedora 29
9 %if (0%{?fedora} && 0%{?fedora} >= %{min_fedora}) || (0%{?rhel} && 0%{?rhel} >= %{min_rhel})
10 %define supported_platform 1
11 %else
12 %define supported_platform 0
13 %endif
15 # Default to skipping autoreconf. Distros can change just this one line
16 # (or provide a command-line override) if they backport any patches that
17 # touch configure.ac or Makefile.am.
18 %{!?enable_autotools:%global enable_autotools 0}
20 # The hypervisor drivers that run in libvirtd
21 %define with_qemu 0%{!?_without_qemu:1}
22 %define with_lxc 0%{!?_without_lxc:1}
23 %define with_libxl 0%{!?_without_libxl:1}
24 %define with_vbox 0%{!?_without_vbox:1}
26 %define with_qemu_tcg %{with_qemu}
28 %define qemu_kvm_arches %{ix86} x86_64
30 %if 0%{?fedora}
31 %define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x %{arm} aarch64
32 %endif
34 %if 0%{?rhel}
35 %define with_qemu_tcg 0
36 %define qemu_kvm_arches x86_64 %{power64} aarch64 s390x
37 %endif
39 %ifarch %{qemu_kvm_arches}
40 %define with_qemu_kvm %{with_qemu}
41 %else
42 %define with_qemu_kvm 0
43 %endif
45 %if ! %{with_qemu_tcg} && ! %{with_qemu_kvm}
46 %define with_qemu 0
47 %endif
49 # Then the hypervisor drivers that run outside libvirtd, in libvirt.so
50 %define with_openvz 0%{!?_without_openvz:1}
51 %define with_vmware 0%{!?_without_vmware:1}
52 %define with_phyp 0%{!?_without_phyp:1}
53 %define with_esx 0%{!?_without_esx:1}
54 %define with_hyperv 0%{!?_without_hyperv:1}
56 # Then the secondary host drivers, which run inside libvirtd
57 %define with_storage_rbd 0%{!?_without_storage_rbd:1}
58 %if 0%{?fedora}
59 %define with_storage_sheepdog 0%{!?_without_storage_sheepdog:1}
60 %else
61 %define with_storage_sheepdog 0
62 %endif
63 %define with_storage_gluster 0%{!?_without_storage_gluster:1}
64 %define with_numactl 0%{!?_without_numactl:1}
66 # F25+ has zfs-fuse
67 %if 0%{?fedora}
68 %define with_storage_zfs 0%{!?_without_storage_zfs:1}
69 %else
70 %define with_storage_zfs 0
71 %endif
73 # We need a recent enough libiscsi (>= 1.18.0)
74 %if 0%{?fedora} || 0%{?rhel} > 7
75 %define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
76 %else
77 %define with_storage_iscsi_direct 0
78 %endif
80 # A few optional bits off by default, we enable later
81 %define with_fuse 0%{!?_without_fuse:0}
82 %define with_sanlock 0%{!?_without_sanlock:0}
83 %define with_numad 0%{!?_without_numad:0}
84 %define with_firewalld 0%{!?_without_firewalld:0}
85 %define with_firewalld_zone 0%{!?_without_firewalld_zone:0}
86 %define with_libssh2 0%{!?_without_libssh2:0}
87 %define with_wireshark 0%{!?_without_wireshark:0}
88 %define with_libssh 0%{!?_without_libssh:0}
89 %define with_bash_completion 0%{!?_without_bash_completion:0}
91 # Finally set the OS / architecture specific special cases
93 # Xen is available only on i386 x86_64 ia64
94 %ifnarch %{ix86} x86_64 ia64
95 %define with_libxl 0
96 %endif
98 # vbox is available only on i386 x86_64
99 %ifnarch %{ix86} x86_64
100 %define with_vbox 0
101 %endif
103 # Numactl is not available on many non-x86 archs
104 %ifarch s390 s390x %{arm} riscv64
105 %define with_numactl 0
106 %endif
108 # zfs-fuse is not available on some architectures
109 %ifarch s390 s390x aarch64 riscv64
110 %define with_storage_zfs 0
111 %endif
113 # Ceph dropping support for 32-bit hosts
114 %if 0%{?fedora} >= 30
115 %ifarch %{arm} %{ix86}
116 %define with_storage_rbd 0
117 %endif
118 %endif
120 # RHEL doesn't ship OpenVZ, VBox, PowerHypervisor,
121 # VMware, libxenserver (xenapi), libxenlight (Xen 4.1 and newer),
122 # or HyperV.
123 %if 0%{?rhel}
124 %define with_openvz 0
125 %define with_vbox 0
126 %define with_phyp 0
127 %define with_vmware 0
128 %define with_xenapi 0
129 %define with_libxl 0
130 %define with_hyperv 0
131 %define with_vz 0
133 %if 0%{?rhel} > 7
134 %define with_lxc 0
135 %endif
136 %endif
138 %define with_firewalld 1
140 %if 0%{?fedora} >= 31 || 0%{?rhel} > 7
141 %define with_firewalld_zone 0%{!?_without_firewalld_zone:1}
142 %endif
145 # fuse is used to provide virtualized /proc for LXC
146 %if %{with_lxc}
147 %define with_fuse 0%{!?_without_fuse:1}
148 %endif
150 # Enable sanlock library for lock management with QEMU
151 # Sanlock is available only on arches where kvm is available for RHEL
152 %if 0%{?fedora}
153 %define with_sanlock 0%{!?_without_sanlock:1}
154 %endif
155 %if 0%{?rhel}
156 %ifarch %{qemu_kvm_arches}
157 %define with_sanlock 0%{!?_without_sanlock:1}
158 %endif
159 %endif
161 # Enable libssh2 transport for new enough distros
162 %if 0%{?fedora}
163 %define with_libssh2 0%{!?_without_libssh2:1}
164 %endif
166 # Enable wireshark plugins for all distros shipping libvirt 1.2.2 or newer
167 %if 0%{?fedora}
168 %define with_wireshark 0%{!?_without_wireshark:1}
169 %define wireshark_plugindir %(pkg-config --variable plugindir wireshark)/epan
170 %endif
172 # Enable libssh transport for new enough distros
173 %if 0%{?fedora} || 0%{?rhel} > 7
174 %define with_libssh 0%{!?_without_libssh:1}
175 %endif
177 %define with_bash_completion 0%{!?_without_bash_completion:1}
179 # Use Python 3 when possible, Python 2 otherwise
180 %if 0%{?fedora} || 0%{?rhel} > 7
181 %define python python3
182 %else
183 %define python python2
184 %endif
187 %if %{with_qemu} || %{with_lxc}
188 # numad is used to manage the CPU and memory placement dynamically,
189 # it's not available on many non-x86 architectures.
190 %ifnarch s390 s390x %{arm} riscv64
191 %define with_numad 0%{!?_without_numad:1}
192 %endif
193 %endif
195 # Force QEMU to run as non-root
196 %define qemu_user qemu
197 %define qemu_group qemu
200 # RHEL releases provide stable tool chains and so it is safe to turn
201 # compiler warning into errors without being worried about frequent
202 # changes in reported warnings
203 %if 0%{?rhel}
204 %define enable_werror --enable-werror
205 %else
206 %define enable_werror --disable-werror
207 %endif
209 %if 0%{?rhel} == 7
210 %define tls_priority "NORMAL"
211 %else
212 %define tls_priority "@LIBVIRT,SYSTEM"
213 %endif
216 Summary: Library providing a simple virtualization API
217 Name: libvirt
218 Version: @VERSION@
219 Release: 1%{?dist}
220 License: LGPLv2+
221 URL: https://libvirt.org/
223 %if %(echo %{version} | grep -q "\.0$"; echo $?) == 1
224 %define mainturl stable_updates/
225 %endif
226 Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
228 Requires: libvirt-daemon = %{version}-%{release}
229 Requires: libvirt-daemon-config-network = %{version}-%{release}
230 Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
231 %if %{with_libxl}
232 Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
233 %endif
234 %if %{with_lxc}
235 Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
236 %endif
237 %if %{with_qemu}
238 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
239 %endif
240 # We had UML driver, but we've removed it.
241 Obsoletes: libvirt-daemon-driver-uml <= 5.0.0
242 Obsoletes: libvirt-daemon-uml <= 5.0.0
243 %if %{with_vbox}
244 Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
245 %endif
246 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
248 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
249 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
250 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
251 Requires: libvirt-daemon-driver-network = %{version}-%{release}
252 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
253 Requires: libvirt-client = %{version}-%{release}
254 Requires: libvirt-libs = %{version}-%{release}
256 # All build-time requirements. Run-time requirements are
257 # listed against each sub-RPM
258 %if 0%{?enable_autotools}
259 BuildRequires: autoconf
260 BuildRequires: automake
261 BuildRequires: gettext-devel
262 BuildRequires: libtool
263 BuildRequires: /usr/bin/pod2man
264 %endif
265 BuildRequires: gcc
266 BuildRequires: git
267 %if 0%{?fedora} || 0%{?rhel} > 7
268 BuildRequires: perl-interpreter
269 %else
270 BuildRequires: perl
271 %endif
272 BuildRequires: %{python}
273 BuildRequires: systemd-units
274 %if %{with_libxl}
275 BuildRequires: xen-devel
276 %endif
277 BuildRequires: libxml2-devel
278 BuildRequires: libxslt
279 BuildRequires: readline-devel
280 %if %{with_bash_completion}
281 BuildRequires: bash-completion >= 2.0
282 %endif
283 BuildRequires: ncurses-devel
284 BuildRequires: gettext
285 BuildRequires: libtasn1-devel
286 BuildRequires: gnutls-devel
287 BuildRequires: libattr-devel
288 # For pool-build probing for existing pools
289 BuildRequires: libblkid-devel >= 2.17
290 # for augparse, optionally used in testing
291 BuildRequires: augeas
292 BuildRequires: systemd-devel >= 185
293 BuildRequires: libpciaccess-devel >= 0.10.9
294 BuildRequires: yajl-devel
295 %if %{with_sanlock}
296 BuildRequires: sanlock-devel >= 2.4
297 %endif
298 BuildRequires: libpcap-devel
299 BuildRequires: libnl3-devel
300 BuildRequires: avahi-devel
301 BuildRequires: libselinux-devel
302 BuildRequires: dnsmasq >= 2.41
303 BuildRequires: iptables
304 BuildRequires: radvd
305 BuildRequires: ebtables
306 BuildRequires: module-init-tools
307 BuildRequires: cyrus-sasl-devel
308 BuildRequires: polkit >= 0.112
309 # For mount/umount in FS driver
310 BuildRequires: util-linux
311 %if %{with_qemu}
312 # For managing ACLs
313 BuildRequires: libacl-devel
314 # From QEMU RPMs
315 BuildRequires: /usr/bin/qemu-img
316 %endif
317 # For LVM drivers
318 BuildRequires: lvm2
319 # For pool type=iscsi
320 BuildRequires: iscsi-initiator-utils
321 %if %{with_storage_iscsi_direct}
322 # For pool type=iscsi-direct
323 BuildRequires: libiscsi-devel
324 %endif
325 # For disk driver
326 BuildRequires: parted-devel
327 # For Multipath support
328 BuildRequires: device-mapper-devel
329 # For XFS reflink clone support
330 BuildRequires: xfsprogs-devel
331 %if %{with_storage_rbd}
332 BuildRequires: librados2-devel
333 BuildRequires: librbd1-devel
334 %endif
335 %if %{with_storage_gluster}
336 BuildRequires: glusterfs-api-devel >= 3.4.1
337 BuildRequires: glusterfs-devel >= 3.4.1
338 %endif
339 %if %{with_storage_sheepdog}
340 BuildRequires: sheepdog
341 %endif
342 %if %{with_storage_zfs}
343 # Support any conforming implementation of zfs. On stock Fedora
344 # this is zfs-fuse, but could be zfsonlinux upstream RPMs
345 BuildRequires: /sbin/zfs
346 BuildRequires: /sbin/zpool
347 %endif
348 %if %{with_numactl}
349 # For QEMU/LXC numa info
350 BuildRequires: numactl-devel
351 %endif
352 BuildRequires: libcap-ng-devel >= 0.5.0
353 %if %{with_fuse}
354 BuildRequires: fuse-devel >= 2.8.6
355 %endif
356 %if %{with_phyp} || %{with_libssh2}
357 BuildRequires: libssh2-devel >= 1.3.0
358 %endif
360 BuildRequires: netcf-devel >= 0.2.2
361 %if %{with_esx}
362 BuildRequires: libcurl-devel
363 %endif
364 %if %{with_hyperv}
365 BuildRequires: libwsman-devel >= 2.2.3
366 %endif
367 BuildRequires: audit-libs-devel
368 # we need /usr/sbin/dtrace
369 BuildRequires: systemtap-sdt-devel
371 # For mount/umount in FS driver
372 BuildRequires: util-linux
373 # For showmount in FS driver (netfs discovery)
374 BuildRequires: nfs-utils
376 # Communication with the firewall and polkit daemons use DBus
377 BuildRequires: dbus-devel
379 # Fedora build root suckage
380 BuildRequires: gawk
382 # For storage wiping with different algorithms
383 BuildRequires: scrub
385 %if %{with_numad}
386 BuildRequires: numad
387 %endif
389 %if %{with_wireshark}
390 BuildRequires: wireshark-devel >= 2.4.0
391 %endif
393 %if %{with_libssh}
394 BuildRequires: libssh-devel >= 0.7.0
395 %endif
397 %if 0%{?fedora} || 0%{?rhel} > 7
398 BuildRequires: rpcgen
399 BuildRequires: libtirpc-devel
400 %endif
402 %if %{with_firewalld_zone}
403 BuildRequires: firewalld-filesystem
404 %endif
406 Provides: bundled(gnulib)
408 %description
409 Libvirt is a C toolkit to interact with the virtualization capabilities
410 of recent versions of Linux (and other OSes). The main package includes
411 the libvirtd server exporting the virtualization support.
413 %package docs
414 Summary: API reference and website documentation
416 %description docs
417 Includes the API reference for the libvirt C library, and a complete
418 copy of the libvirt.org website documentation.
420 %package daemon
421 Summary: Server side daemon and supporting files for libvirt library
423 # All runtime requirements for the libvirt package (runtime requrements
424 # for subpackages are listed later in those subpackages)
426 # The client side, i.e. shared libs are in a subpackage
427 Requires: %{name}-libs = %{version}-%{release}
429 # for modprobe of pci devices
430 Requires: module-init-tools
432 # for /sbin/ip & /sbin/tc
433 Requires: iproute
434 # tc is provided by iproute-tc since at least Fedora 26
435 %if 0%{?fedora} || 0%{?rhel} > 7
436 Requires: iproute-tc
437 %endif
439 Requires: avahi-libs
440 Requires: polkit >= 0.112
441 %ifarch %{ix86} x86_64 ia64
442 # For virConnectGetSysinfo
443 Requires: dmidecode
444 %endif
445 # For service management
446 Requires(post): systemd-units
447 Requires(post): systemd-sysv
448 Requires(preun): systemd-units
449 Requires(postun): systemd-units
450 %if %{with_numad}
451 Requires: numad
452 %endif
453 # libvirtd depends on 'messagebus' service
454 Requires: dbus
455 # For uid creation during pre
456 Requires(pre): shadow-utils
458 %description daemon
459 Server side daemon required to manage the virtualization capabilities
460 of recent versions of Linux. Requires a hypervisor specific sub-RPM
461 for specific drivers.
463 %package daemon-config-network
464 Summary: Default configuration files for the libvirtd daemon
466 Requires: libvirt-daemon = %{version}-%{release}
467 Requires: libvirt-daemon-driver-network = %{version}-%{release}
469 %description daemon-config-network
470 Default configuration files for setting up NAT based networking
472 %package daemon-config-nwfilter
473 Summary: Network filter configuration files for the libvirtd daemon
475 Requires: libvirt-daemon = %{version}-%{release}
476 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
478 %description daemon-config-nwfilter
479 Network filter configuration files for cleaning guest traffic
481 %package daemon-driver-network
482 Summary: Network driver plugin for the libvirtd daemon
483 Requires: libvirt-daemon = %{version}-%{release}
484 Requires: libvirt-libs = %{version}-%{release}
485 Requires: dnsmasq >= 2.41
486 Requires: radvd
487 Requires: iptables
489 %description daemon-driver-network
490 The network driver plugin for the libvirtd daemon, providing
491 an implementation of the virtual network APIs using the Linux
492 bridge capabilities.
495 %package daemon-driver-nwfilter
496 Summary: Nwfilter driver plugin for the libvirtd daemon
497 Requires: libvirt-daemon = %{version}-%{release}
498 Requires: libvirt-libs = %{version}-%{release}
499 Requires: iptables
500 Requires: ebtables
502 %description daemon-driver-nwfilter
503 The nwfilter driver plugin for the libvirtd daemon, providing
504 an implementation of the firewall APIs using the ebtables,
505 iptables and ip6tables capabilities
508 %package daemon-driver-nodedev
509 Summary: Nodedev driver plugin for the libvirtd daemon
510 Requires: libvirt-daemon = %{version}-%{release}
511 Requires: libvirt-libs = %{version}-%{release}
512 # needed for device enumeration
513 Requires: systemd >= 185
515 %description daemon-driver-nodedev
516 The nodedev driver plugin for the libvirtd daemon, providing
517 an implementation of the node device APIs using the udev
518 capabilities.
521 %package daemon-driver-interface
522 Summary: Interface driver plugin for the libvirtd daemon
523 Requires: libvirt-daemon = %{version}-%{release}
524 Requires: libvirt-libs = %{version}-%{release}
525 Requires: netcf-libs >= 0.2.2
527 %description daemon-driver-interface
528 The interface driver plugin for the libvirtd daemon, providing
529 an implementation of the network interface APIs using the
530 netcf library
533 %package daemon-driver-secret
534 Summary: Secret driver plugin for the libvirtd daemon
535 Requires: libvirt-daemon = %{version}-%{release}
536 Requires: libvirt-libs = %{version}-%{release}
538 %description daemon-driver-secret
539 The secret driver plugin for the libvirtd daemon, providing
540 an implementation of the secret key APIs.
542 %package daemon-driver-storage-core
543 Summary: Storage driver plugin including base backends for the libvirtd daemon
544 Requires: libvirt-daemon = %{version}-%{release}
545 Requires: libvirt-libs = %{version}-%{release}
546 Requires: nfs-utils
547 # For mkfs
548 Requires: util-linux
549 %if %{with_qemu}
550 # From QEMU RPMs
551 Requires: /usr/bin/qemu-img
552 %endif
553 %if !%{with_storage_rbd}
554 Obsoletes: libvirt-daemon-driver-storage-rbd < %{version}-%{release}
555 %endif
557 %description daemon-driver-storage-core
558 The storage driver plugin for the libvirtd daemon, providing
559 an implementation of the storage APIs using files, local disks, LVM, SCSI,
560 iSCSI, and multipath storage.
562 %package daemon-driver-storage-logical
563 Summary: Storage driver plugin for lvm volumes
564 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
565 Requires: libvirt-libs = %{version}-%{release}
566 Requires: lvm2
568 %description daemon-driver-storage-logical
569 The storage driver backend adding implementation of the storage APIs for block
570 volumes using lvm.
573 %package daemon-driver-storage-disk
574 Summary: Storage driver plugin for disk
575 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
576 Requires: libvirt-libs = %{version}-%{release}
577 Requires: parted
578 Requires: device-mapper
580 %description daemon-driver-storage-disk
581 The storage driver backend adding implementation of the storage APIs for block
582 volumes using the host disks.
585 %package daemon-driver-storage-scsi
586 Summary: Storage driver plugin for local scsi devices
587 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
588 Requires: libvirt-libs = %{version}-%{release}
590 %description daemon-driver-storage-scsi
591 The storage driver backend adding implementation of the storage APIs for scsi
592 host devices.
595 %package daemon-driver-storage-iscsi
596 Summary: Storage driver plugin for iscsi
597 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
598 Requires: libvirt-libs = %{version}-%{release}
599 Requires: iscsi-initiator-utils
601 %description daemon-driver-storage-iscsi
602 The storage driver backend adding implementation of the storage APIs for iscsi
603 volumes using the host iscsi stack.
606 %if %{with_storage_iscsi_direct}
607 %package daemon-driver-storage-iscsi-direct
608 Summary: Storage driver plugin for iscsi-direct
609 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
610 Requires: libvirt-libs = %{version}-%{release}
611 Requires: libiscsi
613 %description daemon-driver-storage-iscsi-direct
614 The storage driver backend adding implementation of the storage APIs for iscsi
615 volumes using libiscsi direct connection.
616 %endif
619 %package daemon-driver-storage-mpath
620 Summary: Storage driver plugin for multipath volumes
621 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
622 Requires: libvirt-libs = %{version}-%{release}
623 Requires: device-mapper
625 %description daemon-driver-storage-mpath
626 The storage driver backend adding implementation of the storage APIs for
627 multipath storage using device mapper.
630 %if %{with_storage_gluster}
631 %package daemon-driver-storage-gluster
632 Summary: Storage driver plugin for gluster
633 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
634 Requires: libvirt-libs = %{version}-%{release}
635 %if 0%{?fedora}
636 Requires: glusterfs-client >= 2.0.1
637 %endif
638 %if (0%{?fedora} || 0%{?with_storage_gluster})
639 Requires: /usr/sbin/gluster
640 %endif
642 %description daemon-driver-storage-gluster
643 The storage driver backend adding implementation of the storage APIs for gluster
644 volumes using libgfapi.
645 %endif
648 %if %{with_storage_rbd}
649 %package daemon-driver-storage-rbd
650 Summary: Storage driver plugin for rbd
651 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
652 Requires: libvirt-libs = %{version}-%{release}
654 %description daemon-driver-storage-rbd
655 The storage driver backend adding implementation of the storage APIs for rbd
656 volumes using the ceph protocol.
657 %endif
660 %if %{with_storage_sheepdog}
661 %package daemon-driver-storage-sheepdog
662 Summary: Storage driver plugin for sheepdog
663 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
664 Requires: libvirt-libs = %{version}-%{release}
665 Requires: sheepdog
667 %description daemon-driver-storage-sheepdog
668 The storage driver backend adding implementation of the storage APIs for
669 sheepdog volumes using.
670 %endif
673 %if %{with_storage_zfs}
674 %package daemon-driver-storage-zfs
675 Summary: Storage driver plugin for ZFS
676 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
677 Requires: libvirt-libs = %{version}-%{release}
678 # Support any conforming implementation of zfs
679 Requires: /sbin/zfs
680 Requires: /sbin/zpool
682 %description daemon-driver-storage-zfs
683 The storage driver backend adding implementation of the storage APIs for
684 ZFS volumes.
685 %endif
688 %package daemon-driver-storage
689 Summary: Storage driver plugin including all backends for the libvirtd daemon
690 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
691 Requires: libvirt-daemon-driver-storage-disk = %{version}-%{release}
692 Requires: libvirt-daemon-driver-storage-logical = %{version}-%{release}
693 Requires: libvirt-daemon-driver-storage-scsi = %{version}-%{release}
694 Requires: libvirt-daemon-driver-storage-iscsi = %{version}-%{release}
695 Requires: libvirt-daemon-driver-storage-mpath = %{version}-%{release}
696 %if %{with_storage_iscsi_direct}
697 Requires: libvirt-daemon-driver-storage-iscsi-direct = %{version}-%{release}
698 %endif
699 %if %{with_storage_gluster}
700 Requires: libvirt-daemon-driver-storage-gluster = %{version}-%{release}
701 %endif
702 %if %{with_storage_rbd}
703 Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release}
704 %endif
705 %if %{with_storage_sheepdog}
706 Requires: libvirt-daemon-driver-storage-sheepdog = %{version}-%{release}
707 %endif
708 %if %{with_storage_zfs}
709 Requires: libvirt-daemon-driver-storage-zfs = %{version}-%{release}
710 %endif
712 %description daemon-driver-storage
713 The storage driver plugin for the libvirtd daemon, providing
714 an implementation of the storage APIs using LVM, iSCSI,
715 parted and more.
718 %if %{with_qemu}
719 %package daemon-driver-qemu
720 Summary: QEMU driver plugin for the libvirtd daemon
721 Requires: libvirt-daemon = %{version}-%{release}
722 Requires: libvirt-libs = %{version}-%{release}
723 Requires: /usr/bin/qemu-img
724 # For image compression
725 Requires: gzip
726 Requires: bzip2
727 Requires: lzop
728 Requires: xz
729 %if 0%{?fedora} || 0%{?rhel} > 7
730 Requires: systemd-container
731 %endif
733 %description daemon-driver-qemu
734 The qemu driver plugin for the libvirtd daemon, providing
735 an implementation of the hypervisor driver APIs using
736 QEMU
737 %endif
740 %if %{with_lxc}
741 %package daemon-driver-lxc
742 Summary: LXC driver plugin for the libvirtd daemon
743 Requires: libvirt-daemon = %{version}-%{release}
744 Requires: libvirt-libs = %{version}-%{release}
745 # There really is a hard cross-driver dependency here
746 Requires: libvirt-daemon-driver-network = %{version}-%{release}
747 %if 0%{?fedora} || 0%{?rhel} > 7
748 Requires: systemd-container
749 %endif
751 %description daemon-driver-lxc
752 The LXC driver plugin for the libvirtd daemon, providing
753 an implementation of the hypervisor driver APIs using
754 the Linux kernel
755 %endif
758 %if %{with_vbox}
759 %package daemon-driver-vbox
760 Summary: VirtualBox driver plugin for the libvirtd daemon
761 Requires: libvirt-daemon = %{version}-%{release}
762 Requires: libvirt-libs = %{version}-%{release}
764 %description daemon-driver-vbox
765 The vbox driver plugin for the libvirtd daemon, providing
766 an implementation of the hypervisor driver APIs using
767 VirtualBox
768 %endif
771 %if %{with_libxl}
772 %package daemon-driver-libxl
773 Summary: Libxl driver plugin for the libvirtd daemon
774 Requires: libvirt-daemon = %{version}-%{release}
775 Requires: libvirt-libs = %{version}-%{release}
776 Obsoletes: libvirt-daemon-driver-xen < 4.3.0
778 %description daemon-driver-libxl
779 The Libxl driver plugin for the libvirtd daemon, providing
780 an implementation of the hypervisor driver APIs using
781 Libxl
782 %endif
786 %if %{with_qemu_tcg}
787 %package daemon-qemu
788 Summary: Server side daemon & driver required to run QEMU guests
790 Requires: libvirt-daemon = %{version}-%{release}
791 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
792 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
793 Requires: libvirt-daemon-driver-network = %{version}-%{release}
794 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
795 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
796 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
797 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
798 Requires: qemu
800 %description daemon-qemu
801 Server side daemon and driver required to manage the virtualization
802 capabilities of the QEMU TCG emulators
803 %endif
806 %if %{with_qemu_kvm}
807 %package daemon-kvm
808 Summary: Server side daemon & driver required to run KVM guests
810 Requires: libvirt-daemon = %{version}-%{release}
811 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
812 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
813 Requires: libvirt-daemon-driver-network = %{version}-%{release}
814 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
815 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
816 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
817 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
818 Requires: qemu-kvm
820 %description daemon-kvm
821 Server side daemon and driver required to manage the virtualization
822 capabilities of the KVM hypervisor
823 %endif
826 %if %{with_lxc}
827 %package daemon-lxc
828 Summary: Server side daemon & driver required to run LXC guests
830 Requires: libvirt-daemon = %{version}-%{release}
831 Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
832 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
833 Requires: libvirt-daemon-driver-network = %{version}-%{release}
834 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
835 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
836 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
837 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
839 %description daemon-lxc
840 Server side daemon and driver required to manage the virtualization
841 capabilities of LXC
842 %endif
845 %if %{with_libxl}
846 %package daemon-xen
847 Summary: Server side daemon & driver required to run XEN guests
849 Requires: libvirt-daemon = %{version}-%{release}
850 %if %{with_libxl}
851 Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
852 %endif
853 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
854 Requires: libvirt-daemon-driver-network = %{version}-%{release}
855 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
856 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
857 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
858 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
859 Requires: xen
861 %description daemon-xen
862 Server side daemon and driver required to manage the virtualization
863 capabilities of XEN
864 %endif
866 %if %{with_vbox}
867 %package daemon-vbox
868 Summary: Server side daemon & driver required to run VirtualBox guests
870 Requires: libvirt-daemon = %{version}-%{release}
871 Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
872 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
873 Requires: libvirt-daemon-driver-network = %{version}-%{release}
874 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
875 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
876 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
877 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
879 %description daemon-vbox
880 Server side daemon and driver required to manage the virtualization
881 capabilities of VirtualBox
882 %endif
884 %package client
885 Summary: Client side utilities of the libvirt library
886 Requires: %{name}-libs = %{version}-%{release}
887 Requires: readline
888 Requires: ncurses
889 # Needed by /usr/libexec/libvirt-guests.sh script.
890 Requires: gettext
891 # Needed by virt-pki-validate script.
892 Requires: gnutls-utils
893 %if %{with_bash_completion}
894 Requires: %{name}-bash-completion = %{version}-%{release}
895 %endif
897 %description client
898 The client binaries needed to access the virtualization
899 capabilities of recent versions of Linux (and other OSes).
901 %package libs
902 Summary: Client side libraries
903 # So remote clients can access libvirt over SSH tunnel
904 # (client invokes 'nc' against the UNIX socket on the server)
905 Requires: nc
906 Requires: cyrus-sasl
907 # Needed by default sasl.conf - no onerous extra deps, since
908 # 100's of other things on a system already pull in krb5-libs
909 Requires: cyrus-sasl-gssapi
911 %description libs
912 Shared libraries for accessing the libvirt daemon.
914 %package admin
915 Summary: Set of tools to control libvirt daemon
916 Requires: %{name}-libs = %{version}-%{release}
917 Requires: readline
918 %if %{with_bash_completion}
919 Requires: %{name}-bash-completion = %{version}-%{release}
920 %endif
922 %description admin
923 The client side utilities to control the libvirt daemon.
925 %if %{with_bash_completion}
926 %package bash-completion
927 Summary: Bash completion script
929 %description bash-completion
930 Bash completion script stub.
931 %endif
933 %if %{with_wireshark}
934 %package wireshark
935 Summary: Wireshark dissector plugin for libvirt RPC transactions
936 Requires: wireshark >= 2.4.0
937 Requires: %{name}-libs = %{version}-%{release}
939 %description wireshark
940 Wireshark dissector plugin for better analysis of libvirt RPC traffic.
941 %endif
943 %if %{with_lxc}
944 %package login-shell
945 Summary: Login shell for connecting users to an LXC container
946 Requires: %{name}-libs = %{version}-%{release}
948 %description login-shell
949 Provides the set-uid virt-login-shell binary that is used to
950 connect a user to an LXC container when they login, by switching
951 namespaces.
952 %endif
954 %package devel
955 Summary: Libraries, includes, etc. to compile with the libvirt library
956 Requires: %{name}-libs = %{version}-%{release}
957 Requires: pkgconfig
959 %description devel
960 Include header files & development libraries for the libvirt C library.
962 %if %{with_sanlock}
963 %package lock-sanlock
964 Summary: Sanlock lock manager plugin for QEMU driver
965 Requires: sanlock >= 2.4
966 #for virt-sanlock-cleanup require augeas
967 Requires: augeas
968 Requires: %{name}-daemon = %{version}-%{release}
969 Requires: %{name}-libs = %{version}-%{release}
971 %description lock-sanlock
972 Includes the Sanlock lock manager plugin for the QEMU
973 driver
974 %endif
976 %package nss
977 Summary: Libvirt plugin for Name Service Switch
978 Requires: libvirt-daemon-driver-network = %{version}-%{release}
980 %description nss
981 Libvirt plugin for NSS for translating domain names into IP addresses.
984 %prep
986 %autosetup -S git_am
988 %build
989 %if ! %{supported_platform}
990 echo "This RPM requires either Fedora >= %{min_fedora} or RHEL >= %{min_rhel}"
991 exit 1
992 %endif
994 %if %{with_qemu}
995 %define arg_qemu --with-qemu
996 %else
997 %define arg_qemu --without-qemu
998 %endif
1000 %if %{with_openvz}
1001 %define arg_openvz --with-openvz
1002 %else
1003 %define arg_openvz --without-openvz
1004 %endif
1006 %if %{with_lxc}
1007 %define arg_lxc --with-lxc
1008 %define arg_login_shell --with-login-shell
1009 %else
1010 %define arg_lxc --without-lxc
1011 %define arg_login_shell --without-login-shell
1012 %endif
1014 %if %{with_vbox}
1015 %define arg_vbox --with-vbox
1016 %else
1017 %define arg_vbox --without-vbox
1018 %endif
1020 %if %{with_libxl}
1021 %define arg_libxl --with-libxl
1022 %else
1023 %define arg_libxl --without-libxl
1024 %endif
1026 %if %{with_phyp}
1027 %define arg_phyp --with-phyp
1028 %else
1029 %define arg_phyp --without-phyp
1030 %endif
1032 %if %{with_esx}
1033 %define arg_esx --with-esx
1034 %else
1035 %define arg_esx --without-esx
1036 %endif
1038 %if %{with_hyperv}
1039 %define arg_hyperv --with-hyperv
1040 %else
1041 %define arg_hyperv --without-hyperv
1042 %endif
1044 %if %{with_vmware}
1045 %define arg_vmware --with-vmware
1046 %else
1047 %define arg_vmware --without-vmware
1048 %endif
1050 %if %{with_storage_rbd}
1051 %define arg_storage_rbd --with-storage-rbd
1052 %else
1053 %define arg_storage_rbd --without-storage-rbd
1054 %endif
1056 %if %{with_storage_sheepdog}
1057 %define arg_storage_sheepdog --with-storage-sheepdog
1058 %else
1059 %define arg_storage_sheepdog --without-storage-sheepdog
1060 %endif
1062 %if %{with_storage_gluster}
1063 %define arg_storage_gluster --with-storage-gluster
1064 %else
1065 %define arg_storage_gluster --without-storage-gluster
1066 %endif
1068 %if %{with_storage_zfs}
1069 %define arg_storage_zfs --with-storage-zfs
1070 %else
1071 %define arg_storage_zfs --without-storage-zfs
1072 %endif
1074 %if %{with_numactl}
1075 %define arg_numactl --with-numactl
1076 %else
1077 %define arg_numactl --without-numactl
1078 %endif
1080 %if %{with_numad}
1081 %define arg_numad --with-numad
1082 %else
1083 %define arg_numad --without-numad
1084 %endif
1086 %if %{with_fuse}
1087 %define arg_fuse --with-fuse
1088 %else
1089 %define arg_fuse --without-fuse
1090 %endif
1092 %if %{with_sanlock}
1093 %define arg_sanlock --with-sanlock
1094 %else
1095 %define arg_sanlock --without-sanlock
1096 %endif
1098 %if %{with_firewalld}
1099 %define arg_firewalld --with-firewalld
1100 %else
1101 %define arg_firewalld --without-firewalld
1102 %endif
1104 %if %{with_firewalld_zone}
1105 %define arg_firewalld_zone --with-firewalld-zone
1106 %else
1107 %define arg_firewalld_zone --without-firewalld-zone
1108 %endif
1110 %if %{with_wireshark}
1111 %define arg_wireshark --with-wireshark-dissector
1112 %else
1113 %define arg_wireshark --without-wireshark-dissector
1114 %endif
1116 %if %{with_storage_iscsi_direct}
1117 %define arg_storage_iscsi_direct --with-storage-iscsi-direct
1118 %else
1119 %define arg_storage_iscsi_direct --without-storage-iscsi-direct
1120 %endif
1122 %define when %(date +"%%F-%%T")
1123 %define where %(hostname)
1124 %define who %{?packager}%{!?packager:Unknown}
1125 %define arg_packager --with-packager="%{who}, %{when}, %{where}"
1126 %define arg_packager_version --with-packager-version="%{release}"
1128 %define arg_selinux_mount --with-selinux-mount="/sys/fs/selinux"
1130 %if 0%{?fedora}
1131 # Nightly edk2.git-ovmf-x64
1132 LOADERS="/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd"
1133 # Nightly edk2.git-ovmf-ia32
1134 LOADERS="$LOADERS:/usr/share/edk2.git/ovmf-ia32/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-ia32/OVMF_VARS-pure-efi.fd"
1135 # Nightly edk2.git-aarch64
1136 LOADERS="$LOADERS:/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw"
1137 # Nightly edk2.git-arm
1138 LOADERS="$LOADERS:/usr/share/edk2.git/arm/QEMU_EFI-pflash.raw:/usr/share/edk2.git/arm/vars-template-pflash.raw"
1140 # Fedora edk2-ovmf
1141 LOADERS="$LOADERS:/usr/share/edk2/ovmf/OVMF_CODE.fd:/usr/share/edk2/ovmf/OVMF_VARS.fd"
1142 # Fedora edk2-ovmf-ia32
1143 LOADERS="$LOADERS:/usr/share/edk2/ovmf-ia32/OVMF_CODE.fd:/usr/share/edk2/ovmf-ia32/OVMF_VARS.fd"
1144 # Fedora edk2-aarch64
1145 LOADERS="$LOADERS:/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2/aarch64/vars-template-pflash.raw"
1146 # Fedora edk2-arm
1147 LOADERS="$LOADERS:/usr/share/edk2/arm/QEMU_EFI-pflash.raw:/usr/share/edk2/arm/vars-template-pflash.raw"
1148 %define arg_loader_nvram --with-loader-nvram="$LOADERS"
1149 %endif
1151 # place macros above and build commands below this comment
1153 export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
1155 %if 0%{?enable_autotools}
1156 autoreconf -if
1157 %endif
1159 rm -f po/stamp-po
1160 %configure %{?arg_qemu} \
1161 %{?arg_openvz} \
1162 %{?arg_lxc} \
1163 %{?arg_vbox} \
1164 %{?arg_libxl} \
1165 --with-sasl \
1166 --with-avahi \
1167 --with-polkit \
1168 --with-libvirtd \
1169 %{?arg_phyp} \
1170 %{?arg_esx} \
1171 %{?arg_hyperv} \
1172 %{?arg_vmware} \
1173 --without-xenapi \
1174 --without-vz \
1175 --without-bhyve \
1176 --with-interface \
1177 --with-network \
1178 --with-storage-fs \
1179 --with-storage-lvm \
1180 --with-storage-iscsi \
1181 %{?arg_storage_iscsi_direct} \
1182 --with-storage-scsi \
1183 --with-storage-disk \
1184 --with-storage-mpath \
1185 %{?arg_storage_rbd} \
1186 %{?arg_storage_sheepdog} \
1187 %{?arg_storage_gluster} \
1188 %{?arg_storage_zfs} \
1189 --without-storage-vstorage \
1190 %{?arg_numactl} \
1191 %{?arg_numad} \
1192 --with-capng \
1193 %{?arg_fuse} \
1194 --with-netcf \
1195 --with-selinux \
1196 %{?arg_selinux_mount} \
1197 --without-apparmor \
1198 --without-hal \
1199 --with-udev \
1200 --with-yajl \
1201 %{?arg_sanlock} \
1202 --with-libpcap \
1203 --with-macvtap \
1204 --with-audit \
1205 --with-dtrace \
1206 --with-driver-modules \
1207 %{?arg_firewalld} \
1208 %{?arg_firewalld_zone} \
1209 %{?arg_wireshark} \
1210 --without-pm-utils \
1211 --with-nss-plugin \
1212 %{arg_packager} \
1213 %{arg_packager_version} \
1214 --with-qemu-user=%{qemu_user} \
1215 --with-qemu-group=%{qemu_group} \
1216 --with-tls-priority=%{tls_priority} \
1217 %{?arg_loader_nvram} \
1218 %{?enable_werror} \
1219 --enable-expensive-tests \
1220 --with-init-script=systemd \
1221 %{?arg_login_shell}
1222 make %{?_smp_mflags} V=1
1223 gzip -9 ChangeLog
1225 %install
1226 rm -fr %{buildroot}
1228 export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
1230 %make_install %{?_smp_mflags} SYSTEMD_UNIT_DIR=%{_unitdir} V=1
1232 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
1233 rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
1234 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la
1235 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a
1236 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la
1237 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a
1238 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-backend/*.la
1239 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-backend/*.a
1240 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-file/*.la
1241 rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-file/*.a
1242 %if %{with_wireshark}
1243 rm -f $RPM_BUILD_ROOT%{wireshark_plugindir}/libvirt.la
1244 %endif
1246 install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/
1247 # We don't want to install /etc/libvirt/qemu/networks in the main %files list
1248 # because if the admin wants to delete the default network completely, we don't
1249 # want to end up re-incarnating it on every RPM upgrade.
1250 install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/
1251 cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \
1252 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
1253 # libvirt saves this file with mode 0600
1254 chmod 0600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
1256 # nwfilter files are installed in /usr/share/libvirt and copied to /etc in %post
1257 # to avoid verification errors on changed files in /etc
1258 install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/nwfilter/
1259 cp -a $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml \
1260 $RPM_BUILD_ROOT%{_datadir}/libvirt/nwfilter/
1261 # libvirt saves these files with mode 600
1262 chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml
1264 # Strip auto-generated UUID - we need it generated per-install
1265 sed -i -e "/<uuid>/d" $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
1266 %if ! %{with_qemu}
1267 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug
1268 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
1269 %endif
1270 %find_lang %{name}
1272 %if ! %{with_sanlock}
1273 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirt_sanlock.aug
1274 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
1275 %endif
1277 %if ! %{with_lxc}
1278 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug
1279 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
1280 %endif
1282 %if ! %{with_qemu}
1283 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf
1284 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
1285 %endif
1286 %if ! %{with_lxc}
1287 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
1288 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc
1289 %endif
1290 %if ! %{with_libxl}
1291 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/libxl.conf
1292 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.libxl
1293 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_libxl.aug
1294 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
1295 %endif
1297 # Copied into libvirt-docs subpackage eventually
1298 mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt libvirt-docs
1300 %ifarch %{power64} s390x x86_64 ia64 alpha sparc64
1301 mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \
1302 $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp
1304 %if %{with_qemu}
1305 mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
1306 $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes-64.stp
1307 %endif
1308 %endif
1310 %check
1311 cd tests
1312 # These tests don't current work in a mock build root
1313 for i in nodeinfotest seclabeltest
1315 rm -f $i
1316 printf 'int main(void) { return 0; }' > $i.c
1317 printf '#!/bin/sh\nexit 0\n' > $i
1318 chmod +x $i
1319 done
1320 if ! make %{?_smp_mflags} check VIR_TEST_DEBUG=1
1321 then
1322 cat test-suite.log || true
1323 exit 1
1326 %post libs
1327 %if 0%{?rhel} == 7
1328 /sbin/ldconfig
1329 %endif
1331 %postun libs
1332 %if 0%{?rhel} == 7
1333 /sbin/ldconfig
1334 %endif
1336 %pre daemon
1337 # 'libvirt' group is just to allow password-less polkit access to
1338 # libvirtd. The uid number is irrelevant, so we use dynamic allocation
1339 # described at the above link.
1340 getent group libvirt >/dev/null || groupadd -r libvirt
1342 exit 0
1344 %post daemon
1346 %systemd_post virtlockd.socket virtlockd-admin.socket
1347 %systemd_post virtlogd.socket virtlogd-admin.socket
1348 %systemd_post libvirtd.service
1350 # request daemon restart in posttrans
1351 mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || :
1352 touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :
1354 %preun daemon
1355 %systemd_preun libvirtd.service
1356 %systemd_preun virtlogd.socket virtlogd-admin.socket virtlogd.service
1357 %systemd_preun virtlockd.socket virtlockd-admin.socket virtlockd.service
1359 %postun daemon
1360 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
1361 if [ $1 -ge 1 ] ; then
1362 /bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || :
1363 /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || :
1366 # In upgrade scenario we must explicitly enable virtlockd/virtlogd
1367 # sockets, if libvirtd is already enabled and start them if
1368 # libvirtd is running, otherwise you'll get failures to start
1369 # guests
1370 %triggerpostun daemon -- libvirt-daemon < 1.3.0
1371 if [ $1 -ge 1 ] ; then
1372 /bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 &&
1373 /bin/systemctl enable virtlogd.socket virtlogd-admin.socket || :
1374 /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 &&
1375 /bin/systemctl start virtlogd.socket virtlogd-admin.socket || :
1378 %posttrans daemon
1379 if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then
1380 /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
1382 rm -rf %{_localstatedir}/lib/rpm-state/libvirt || :
1384 %post daemon-driver-network
1385 %if %{with_firewalld_zone}
1386 %firewalld_reload
1387 %endif
1389 %postun daemon-driver-network
1390 %if %{with_firewalld_zone}
1391 %firewalld_reload
1392 %endif
1394 %post daemon-config-network
1395 if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then
1396 # see if the network used by default network creates a conflict,
1397 # and try to resolve it
1398 # NB: 192.168.122.0/24 is used in the default.xml template file;
1399 # do not modify any of those values here without also modifying
1400 # them in the template.
1401 orig_sub=122
1402 sub=${orig_sub}
1403 nl='
1405 routes="${nl}$(ip route show | cut -d' ' -f1)${nl}"
1406 case ${routes} in
1407 *"${nl}192.168.${orig_sub}.0/24${nl}"*)
1408 # there was a match, so we need to look for an unused subnet
1409 for new_sub in $(seq 124 254); do
1410 case ${routes} in
1411 *"${nl}192.168.${new_sub}.0/24${nl}"*)
1414 sub=$new_sub
1415 break;
1417 esac
1418 done
1422 esac
1424 UUID=`/usr/bin/uuidgen`
1425 sed -e "s/${orig_sub}/${sub}/g" \
1426 -e "s,</name>,</name>\n <uuid>$UUID</uuid>," \
1427 < %{_datadir}/libvirt/networks/default.xml \
1428 > %{_sysconfdir}/libvirt/qemu/networks/default.xml
1429 ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
1430 # libvirt saves this file with mode 0600
1431 chmod 0600 %{_sysconfdir}/libvirt/qemu/networks/default.xml
1433 # Make sure libvirt picks up the new network defininiton
1434 mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || :
1435 touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :
1438 %posttrans daemon-config-network
1439 if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then
1440 /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
1442 rm -rf %{_localstatedir}/lib/rpm-state/libvirt || :
1444 %post daemon-config-nwfilter
1445 cp %{_datadir}/libvirt/nwfilter/*.xml %{_sysconfdir}/libvirt/nwfilter/
1446 # libvirt saves these files with mode 600
1447 chmod 600 %{_sysconfdir}/libvirt/nwfilter/*.xml
1448 # Make sure libvirt picks up the new nwfilter defininitons
1449 mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || :
1450 touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :
1452 %posttrans daemon-config-nwfilter
1453 if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then
1454 /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
1456 rm -rf %{_localstatedir}/lib/rpm-state/libvirt || :
1459 %if %{with_qemu}
1460 %pre daemon-driver-qemu
1461 # We want soft static allocation of well-known ids, as disk images
1462 # are commonly shared across NFS mounts by id rather than name; see
1463 # https://fedoraproject.org/wiki/Packaging:UsersAndGroups
1464 getent group kvm >/dev/null || groupadd -f -g 36 -r kvm
1465 getent group qemu >/dev/null || groupadd -f -g 107 -r qemu
1466 if ! getent passwd qemu >/dev/null; then
1467 if ! getent passwd 107 >/dev/null; then
1468 useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu
1469 else
1470 useradd -r -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu
1473 exit 0
1474 %endif
1476 %preun client
1478 %systemd_preun libvirt-guests.service
1480 %post client
1481 %systemd_post libvirt-guests.service
1483 %postun client
1484 %systemd_postun libvirt-guests.service
1486 %if %{with_lxc}
1487 %pre login-shell
1488 getent group virtlogin >/dev/null || groupadd -r virtlogin
1489 exit 0
1490 %endif
1492 %files
1494 %files docs
1495 %doc AUTHORS ChangeLog.gz NEWS README README.md
1496 %doc libvirt-docs/*
1498 # API docs
1499 %dir %{_datadir}/gtk-doc/html/libvirt/
1500 %doc %{_datadir}/gtk-doc/html/libvirt/*.devhelp
1501 %doc %{_datadir}/gtk-doc/html/libvirt/*.html
1502 %doc %{_datadir}/gtk-doc/html/libvirt/*.png
1503 %doc %{_datadir}/gtk-doc/html/libvirt/*.css
1506 %files daemon
1508 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
1510 %{_unitdir}/libvirtd.service
1511 %{_unitdir}/virt-guest-shutdown.target
1512 %{_unitdir}/virtlogd.service
1513 %{_unitdir}/virtlogd.socket
1514 %{_unitdir}/virtlogd-admin.socket
1515 %{_unitdir}/virtlockd.service
1516 %{_unitdir}/virtlockd.socket
1517 %{_unitdir}/virtlockd-admin.socket
1518 %config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
1519 %config(noreplace) %{_sysconfdir}/sysconfig/virtlogd
1520 %config(noreplace) %{_sysconfdir}/sysconfig/virtlockd
1521 %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
1522 %config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
1523 %config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
1524 %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
1525 %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
1527 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
1528 %dir %{_datadir}/libvirt/
1530 %ghost %dir %{_localstatedir}/run/libvirt/
1532 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
1533 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/
1534 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
1535 %dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/
1538 %dir %attr(0755, root, root) %{_libdir}/libvirt/
1539 %dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/
1540 %dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver
1541 %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so
1543 %{_datadir}/augeas/lenses/libvirtd.aug
1544 %{_datadir}/augeas/lenses/tests/test_libvirtd.aug
1545 %{_datadir}/augeas/lenses/virtlogd.aug
1546 %{_datadir}/augeas/lenses/tests/test_virtlogd.aug
1547 %{_datadir}/augeas/lenses/virtlockd.aug
1548 %{_datadir}/augeas/lenses/tests/test_virtlockd.aug
1549 %{_datadir}/augeas/lenses/libvirt_lockd.aug
1550 %if %{with_qemu}
1551 %{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug
1552 %endif
1554 %{_datadir}/polkit-1/actions/org.libvirt.unix.policy
1555 %{_datadir}/polkit-1/actions/org.libvirt.api.policy
1556 %{_datadir}/polkit-1/rules.d/50-libvirt.rules
1558 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
1560 %attr(0755, root, root) %{_libexecdir}/libvirt_iohelper
1562 %attr(0755, root, root) %{_sbindir}/libvirtd
1563 %attr(0755, root, root) %{_sbindir}/virtlogd
1564 %attr(0755, root, root) %{_sbindir}/virtlockd
1566 %{_mandir}/man8/libvirtd.8*
1567 %{_mandir}/man8/virtlogd.8*
1568 %{_mandir}/man8/virtlockd.8*
1569 %{_mandir}/man7/virkey*.7*
1571 %doc examples/polkit/*.rules
1573 %files daemon-config-network
1574 %dir %{_datadir}/libvirt/networks/
1575 %{_datadir}/libvirt/networks/default.xml
1576 %ghost %{_sysconfdir}/libvirt/qemu/networks/default.xml
1577 %ghost %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
1579 %files daemon-config-nwfilter
1580 %dir %{_datadir}/libvirt/nwfilter/
1581 %{_datadir}/libvirt/nwfilter/*.xml
1582 %ghost %{_sysconfdir}/libvirt/nwfilter/*.xml
1584 %files daemon-driver-interface
1585 %{_libdir}/%{name}/connection-driver/libvirt_driver_interface.so
1587 %files daemon-driver-network
1588 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
1589 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
1590 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
1591 %ghost %dir %{_localstatedir}/run/libvirt/network/
1592 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
1593 %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
1594 %attr(0755, root, root) %{_libexecdir}/libvirt_leaseshelper
1595 %{_libdir}/%{name}/connection-driver/libvirt_driver_network.so
1597 %if %{with_firewalld_zone}
1598 %{_prefix}/lib/firewalld/zones/libvirt.xml
1599 %endif
1601 %files daemon-driver-nodedev
1602 %{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so
1604 %files daemon-driver-nwfilter
1605 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
1606 %ghost %dir %{_localstatedir}/run/libvirt/network/
1607 %{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so
1609 %files daemon-driver-secret
1610 %{_libdir}/%{name}/connection-driver/libvirt_driver_secret.so
1612 %files daemon-driver-storage
1614 %files daemon-driver-storage-core
1615 %attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
1616 %{_libdir}/%{name}/connection-driver/libvirt_driver_storage.so
1617 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_fs.so
1618 %{_libdir}/%{name}/storage-file/libvirt_storage_file_fs.so
1620 %files daemon-driver-storage-disk
1621 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_disk.so
1623 %files daemon-driver-storage-logical
1624 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_logical.so
1626 %files daemon-driver-storage-scsi
1627 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_scsi.so
1629 %files daemon-driver-storage-iscsi
1630 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi.so
1632 %if %{with_storage_iscsi_direct}
1633 %files daemon-driver-storage-iscsi-direct
1634 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi-direct.so
1635 %endif
1637 %files daemon-driver-storage-mpath
1638 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_mpath.so
1640 %if %{with_storage_gluster}
1641 %files daemon-driver-storage-gluster
1642 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_gluster.so
1643 %{_libdir}/%{name}/storage-file/libvirt_storage_file_gluster.so
1644 %endif
1646 %if %{with_storage_rbd}
1647 %files daemon-driver-storage-rbd
1648 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_rbd.so
1649 %endif
1651 %if %{with_storage_sheepdog}
1652 %files daemon-driver-storage-sheepdog
1653 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so
1654 %endif
1656 %if %{with_storage_zfs}
1657 %files daemon-driver-storage-zfs
1658 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_zfs.so
1659 %endif
1661 %if %{with_qemu}
1662 %files daemon-driver-qemu
1663 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
1664 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
1665 %config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
1666 %config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf
1667 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
1668 %ghost %dir %{_localstatedir}/run/libvirt/qemu/
1669 %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
1670 %dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
1671 %{_datadir}/augeas/lenses/libvirtd_qemu.aug
1672 %{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
1673 %{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so
1674 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/swtpm/
1675 %dir %attr(0711, root, root) %{_localstatedir}/log/swtpm/libvirt/qemu/
1676 %endif
1678 %if %{with_lxc}
1679 %files daemon-driver-lxc
1680 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
1681 %config(noreplace) %{_sysconfdir}/libvirt/lxc.conf
1682 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc
1683 %ghost %dir %{_localstatedir}/run/libvirt/lxc/
1684 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/
1685 %{_datadir}/augeas/lenses/libvirtd_lxc.aug
1686 %{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
1687 %attr(0755, root, root) %{_libexecdir}/libvirt_lxc
1688 %{_libdir}/%{name}/connection-driver/libvirt_driver_lxc.so
1689 %endif
1691 %if %{with_libxl}
1692 %files daemon-driver-libxl
1693 %config(noreplace) %{_sysconfdir}/libvirt/libxl.conf
1694 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.libxl
1695 %config(noreplace) %{_sysconfdir}/libvirt/libxl-lockd.conf
1696 %{_datadir}/augeas/lenses/libvirtd_libxl.aug
1697 %{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
1698 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/
1699 %ghost %dir %{_localstatedir}/run/libvirt/libxl/
1700 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
1701 %{_libdir}/%{name}/connection-driver/libvirt_driver_libxl.so
1702 %endif
1704 %if %{with_vbox}
1705 %files daemon-driver-vbox
1706 %{_libdir}/%{name}/connection-driver/libvirt_driver_vbox.so
1707 %endif
1709 %if %{with_qemu_tcg}
1710 %files daemon-qemu
1711 %endif
1713 %if %{with_qemu_kvm}
1714 %files daemon-kvm
1715 %endif
1717 %if %{with_lxc}
1718 %files daemon-lxc
1719 %endif
1721 %if %{with_libxl}
1722 %files daemon-xen
1723 %endif
1725 %if %{with_vbox}
1726 %files daemon-vbox
1727 %endif
1729 %if %{with_sanlock}
1730 %files lock-sanlock
1731 %if %{with_qemu}
1732 %config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf
1733 %endif
1734 %if %{with_libxl}
1735 %config(noreplace) %{_sysconfdir}/libvirt/libxl-sanlock.conf
1736 %endif
1737 %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so
1738 %{_datadir}/augeas/lenses/libvirt_sanlock.aug
1739 %{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
1740 %dir %attr(0770, root, sanlock) %{_localstatedir}/lib/libvirt/sanlock
1741 %{_sbindir}/virt-sanlock-cleanup
1742 %{_mandir}/man8/virt-sanlock-cleanup.8*
1743 %attr(0755, root, root) %{_libexecdir}/libvirt_sanlock_helper
1744 %endif
1746 %files client
1747 %{_mandir}/man1/virsh.1*
1748 %{_mandir}/man1/virt-xml-validate.1*
1749 %{_mandir}/man1/virt-pki-validate.1*
1750 %{_mandir}/man1/virt-host-validate.1*
1751 %{_bindir}/virsh
1752 %{_bindir}/virt-xml-validate
1753 %{_bindir}/virt-pki-validate
1754 %{_bindir}/virt-host-validate
1756 %{_datadir}/systemtap/tapset/libvirt_probes*.stp
1757 %{_datadir}/systemtap/tapset/libvirt_functions.stp
1758 %if %{with_qemu}
1759 %{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp
1760 %endif
1762 %if %{with_bash_completion}
1763 %{_datadir}/bash-completion/completions/virsh
1764 %endif
1767 %{_unitdir}/libvirt-guests.service
1768 %config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
1769 %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh
1771 %files libs -f %{name}.lang
1772 %license COPYING COPYING.LESSER
1773 %config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
1774 %config(noreplace) %{_sysconfdir}/libvirt/libvirt-admin.conf
1775 %{_libdir}/libvirt.so.*
1776 %{_libdir}/libvirt-qemu.so.*
1777 %{_libdir}/libvirt-lxc.so.*
1778 %{_libdir}/libvirt-admin.so.*
1779 %dir %{_datadir}/libvirt/
1780 %dir %{_datadir}/libvirt/schemas/
1781 %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/
1783 %{_datadir}/libvirt/schemas/basictypes.rng
1784 %{_datadir}/libvirt/schemas/capability.rng
1785 %{_datadir}/libvirt/schemas/cputypes.rng
1786 %{_datadir}/libvirt/schemas/domain.rng
1787 %{_datadir}/libvirt/schemas/domaincaps.rng
1788 %{_datadir}/libvirt/schemas/domaincommon.rng
1789 %{_datadir}/libvirt/schemas/domainsnapshot.rng
1790 %{_datadir}/libvirt/schemas/interface.rng
1791 %{_datadir}/libvirt/schemas/network.rng
1792 %{_datadir}/libvirt/schemas/networkcommon.rng
1793 %{_datadir}/libvirt/schemas/nodedev.rng
1794 %{_datadir}/libvirt/schemas/nwfilter.rng
1795 %{_datadir}/libvirt/schemas/nwfilter_params.rng
1796 %{_datadir}/libvirt/schemas/nwfilterbinding.rng
1797 %{_datadir}/libvirt/schemas/secret.rng
1798 %{_datadir}/libvirt/schemas/storagecommon.rng
1799 %{_datadir}/libvirt/schemas/storagepool.rng
1800 %{_datadir}/libvirt/schemas/storagepoolcaps.rng
1801 %{_datadir}/libvirt/schemas/storagevol.rng
1803 %{_datadir}/libvirt/cpu_map/*.xml
1805 %{_datadir}/libvirt/test-screenshot.png
1807 %files admin
1808 %{_mandir}/man1/virt-admin.1*
1809 %{_bindir}/virt-admin
1810 %if %{with_bash_completion}
1811 %{_datadir}/bash-completion/completions/virt-admin
1812 %endif
1814 %if %{with_bash_completion}
1815 %files bash-completion
1816 %{_datadir}/bash-completion/completions/vsh
1817 %endif
1819 %if %{with_wireshark}
1820 %files wireshark
1821 %{wireshark_plugindir}/libvirt.so
1822 %endif
1824 %files nss
1825 %{_libdir}/libnss_libvirt.so.2
1826 %{_libdir}/libnss_libvirt_guest.so.2
1828 %if %{with_lxc}
1829 %files login-shell
1830 %attr(4750, root, virtlogin) %{_bindir}/virt-login-shell
1831 %config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf
1832 %{_mandir}/man1/virt-login-shell.1*
1833 %endif
1835 %files devel
1836 %{_libdir}/libvirt.so
1837 %{_libdir}/libvirt-admin.so
1838 %{_libdir}/libvirt-qemu.so
1839 %{_libdir}/libvirt-lxc.so
1840 %dir %{_includedir}/libvirt
1841 %{_includedir}/libvirt/virterror.h
1842 %{_includedir}/libvirt/libvirt.h
1843 %{_includedir}/libvirt/libvirt-admin.h
1844 %{_includedir}/libvirt/libvirt-common.h
1845 %{_includedir}/libvirt/libvirt-domain.h
1846 %{_includedir}/libvirt/libvirt-domain-snapshot.h
1847 %{_includedir}/libvirt/libvirt-event.h
1848 %{_includedir}/libvirt/libvirt-host.h
1849 %{_includedir}/libvirt/libvirt-interface.h
1850 %{_includedir}/libvirt/libvirt-network.h
1851 %{_includedir}/libvirt/libvirt-nodedev.h
1852 %{_includedir}/libvirt/libvirt-nwfilter.h
1853 %{_includedir}/libvirt/libvirt-secret.h
1854 %{_includedir}/libvirt/libvirt-storage.h
1855 %{_includedir}/libvirt/libvirt-stream.h
1856 %{_includedir}/libvirt/libvirt-qemu.h
1857 %{_includedir}/libvirt/libvirt-lxc.h
1858 %{_libdir}/pkgconfig/libvirt.pc
1859 %{_libdir}/pkgconfig/libvirt-admin.pc
1860 %{_libdir}/pkgconfig/libvirt-qemu.pc
1861 %{_libdir}/pkgconfig/libvirt-lxc.pc
1863 %dir %{_datadir}/libvirt/api/
1864 %{_datadir}/libvirt/api/libvirt-api.xml
1865 %{_datadir}/libvirt/api/libvirt-admin-api.xml
1866 %{_datadir}/libvirt/api/libvirt-qemu-api.xml
1867 %{_datadir}/libvirt/api/libvirt-lxc-api.xml
1868 # Needed building python bindings
1869 %doc docs/libvirt-api.xml
1872 %changelog