qemu_validate: Reject virtiofs with bootindex on s390x with CCW
[libvirt.git] / libvirt.spec.in
blob64018192b615b7fd006716ebaf8daff4a3c78e1c
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 8
7 %define min_fedora 37
9 %define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s390x
10 %if 0%{?rhel}
11 %if 0%{?rhel} > 8
12 %define arches_qemu_kvm x86_64 aarch64 s390x
13 %else
14 %define arches_qemu_kvm x86_64 %{power64} aarch64 s390x
15 %endif
16 %endif
18 %define arches_64bit x86_64 %{power64} aarch64 s390x riscv64
19 %define arches_x86 %{ix86} x86_64
21 %define arches_systemtap_64bit %{arches_64bit}
22 %define arches_dmidecode %{arches_x86}
23 %define arches_xen %{arches_x86} aarch64
24 %if 0%{?fedora}
25 %define arches_xen x86_64 aarch64
26 %endif
27 %define arches_vbox %{arches_x86}
28 %define arches_ceph %{arches_64bit}
29 %define arches_zfs %{arches_x86} %{power64} %{arm}
30 %define arches_numactl %{arches_x86} %{power64} aarch64 s390x
31 %define arches_numad %{arches_x86} %{power64} aarch64
33 # The hypervisor drivers that run in libvirtd
34 %define with_qemu 0%{!?_without_qemu:1}
35 %define with_lxc 0%{!?_without_lxc:1}
36 %define with_libxl 0%{!?_without_libxl:1}
37 %define with_vbox 0%{!?_without_vbox:1}
39 %ifarch %{arches_qemu_kvm}
40 %define with_qemu_kvm %{with_qemu}
41 %else
42 %define with_qemu_kvm 0
43 %endif
45 %define with_qemu_tcg %{with_qemu}
47 # RHEL disables TCG on all architectures
48 %if 0%{?rhel}
49 %define with_qemu_tcg 0
50 %endif
52 %if ! %{with_qemu_tcg} && ! %{with_qemu_kvm}
53 %define with_qemu 0
54 %endif
56 # Then the hypervisor drivers that run outside libvirtd, in libvirt.so
57 %define with_openvz 0%{!?_without_openvz:1}
58 %define with_vmware 0%{!?_without_vmware:1}
59 %define with_esx 0%{!?_without_esx:1}
60 %define with_hyperv 0%{!?_without_hyperv:1}
62 # Then the secondary host drivers, which run inside libvirtd
63 %define with_storage_rbd 0%{!?_without_storage_rbd:1}
65 %define with_storage_gluster 0%{!?_without_storage_gluster:1}
66 %if 0%{?rhel}
67 # Glusterfs has been dropped in RHEL-9, and before that
68 # was only enabled on arches where KVM exists
69 %if 0%{?rhel} > 8
70 %define with_storage_gluster 0
71 %else
72 %ifnarch %{arches_qemu_kvm}
73 %define with_storage_gluster 0
74 %endif
75 %endif
76 %endif
78 # Fedora has zfs-fuse
79 %if 0%{?fedora}
80 %define with_storage_zfs 0%{!?_without_storage_zfs:1}
81 %else
82 %define with_storage_zfs 0
83 %endif
85 %define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
86 # libiscsi has been dropped in RHEL-9
87 %if 0%{?rhel} > 8
88 %define with_storage_iscsi_direct 0
89 %endif
91 # Other optional features
92 %define with_numactl 0%{!?_without_numactl:1}
93 %define with_userfaultfd_sysctl 0%{!?_without_userfaultfd_sysctl:1}
95 # A few optional bits off by default, we enable later
96 %define with_fuse 0
97 %define with_sanlock 0
98 %define with_numad 0
99 %define with_nbdkit 0
100 %define with_nbdkit_config_default 0
101 %define with_firewalld_zone 0
102 %define with_netcf 0
103 %define with_libssh2 0
104 %define with_wireshark 0
105 %define with_libssh 0
106 %define with_dmidecode 0
108 # Finally set the OS / architecture specific special cases
110 # Architecture-dependent features
111 %ifnarch %{arches_xen}
112 %define with_libxl 0
113 %endif
114 %ifnarch %{arches_vbox}
115 %define with_vbox 0
116 %endif
117 %ifnarch %{arches_numactl}
118 %define with_numactl 0
119 %endif
120 %ifnarch %{arches_zfs}
121 %define with_storage_zfs 0
122 %endif
123 %ifnarch %{arches_ceph}
124 %define with_storage_rbd 0
125 %endif
127 # RHEL doesn't ship many hypervisor drivers
128 %if 0%{?rhel}
129 %define with_openvz 0
130 %define with_vbox 0
131 %define with_vmware 0
132 %define with_libxl 0
133 %define with_hyperv 0
134 %define with_lxc 0
135 %endif
137 %define with_firewalld_zone 0%{!?_without_firewalld_zone:1}
139 %if 0%{?rhel} && 0%{?rhel} < 9
140 %define with_netcf 0%{!?_without_netcf:1}
141 %endif
143 # fuse is used to provide virtualized /proc for LXC
144 %if %{with_lxc}
145 %define with_fuse 0%{!?_without_fuse:1}
146 %endif
148 # Enable sanlock library for lock management with QEMU
149 # Sanlock is available only on arches where kvm is available for RHEL
150 %if 0%{?fedora}
151 %define with_sanlock 0%{!?_without_sanlock:1}
152 %endif
153 %if 0%{?rhel}
154 %ifarch %{arches_qemu_kvm}
155 %define with_sanlock 0%{!?_without_sanlock:1}
156 %endif
157 %endif
159 # Enable libssh2 transport for new enough distros
160 %if 0%{?fedora}
161 %define with_libssh2 0%{!?_without_libssh2:1}
162 %endif
164 # Enable wireshark plugins for all distros
165 %define with_wireshark 0%{!?_without_wireshark:1}
166 %define wireshark_plugindir %(pkg-config --variable plugindir wireshark)/epan
168 # Enable libssh transport for all distros
169 %define with_libssh 0%{!?_without_libssh:1}
171 %if %{with_qemu} || %{with_lxc}
172 # numad is used to manage the CPU and memory placement dynamically,
173 # it's not available on many non-x86 architectures.
174 %ifarch %{arches_numad}
175 %define with_numad 0%{!?_without_numad:1}
176 %endif
177 %endif
179 # We want to build with nbdkit support, but should only enable nbdkit by
180 # default if the OS ships a SELinux policy that allows libvirt to launch it.
181 # Right now that's not the case anywhere, but things should be fine by the time
182 # Fedora 40 is released.
183 %if %{with_qemu}
184 # rhel-8 lacks pidfd_open
185 %if 0%{?fedora} || 0%{?rhel} >= 9
186 %define with_nbdkit 0%{!?_without_nbdkit:1}
188 # setting 'with_nbdkit_config_default' must be done only when compiling
189 # in nbdkit support
191 # TODO: add RHEL 9 once a minor release that contains the necessary SELinux
192 # bits exists (we only support the most recent minor release)
193 %if 0%{?fedora} >= 40
194 %define with_nbdkit_config_default 0%{!?_without_nbdkit_config_default:1}
195 %endif
196 %endif
197 %endif
199 %ifarch %{arches_dmidecode}
200 %define with_dmidecode 0%{!?_without_dmidecode:1}
201 %endif
203 %define with_modular_daemons 0
204 %if 0%{?fedora} || 0%{?rhel} >= 9
205 %define with_modular_daemons 1
206 %endif
208 # Force QEMU to run as non-root
209 %define qemu_user qemu
210 %define qemu_group qemu
212 # Locations for QEMU data
213 %define qemu_moddir %{_libdir}/qemu
214 %define qemu_datadir %{_datadir}/qemu
216 # Native / MinGW builds
217 %define with_native 0%{!?_without_native:1}
219 %define with_mingw32 0
220 %define with_mingw64 0
222 %if 0%{?fedora}
223 %if 0%{!?_without_mingw:1}
224 %define with_mingw32 0%{!?_without_mingw32:1}
225 %define with_mingw64 0%{!?_without_mingw64:1}
226 %endif
228 # These tell the other mingw macros whether to perform or
229 # skip the 32-bit and 64-bit specific steps respectively
230 %define mingw_build_win32 %{with_mingw32}
231 %define mingw_build_win64 %{with_mingw64}
232 %endif
234 %if !%{with_native}
235 # Building the debugsource package apparently only works if the
236 # native build is enabled. debuginfo packages don't have this
237 # problem and setting this doesn't disable them
238 %global debug_package %{nil}
239 %endif
241 # RHEL releases provide stable tool chains and so it is safe to turn
242 # compiler warning into errors without being worried about frequent
243 # changes in reported warnings
244 %if 0%{?rhel}
245 %define enable_werror -Dwerror=true
246 %else
247 %define enable_werror -Dwerror=false -Dgit_werror=disabled
248 %endif
250 # Fedora and RHEL-9 are new enough to support /dev/userfaultfd, which
251 # does not require enabling vm.unprivileged_userfaultfd sysctl.
252 %if 0%{?fedora} || 0%{?rhel} >= 9
253 %define with_userfaultfd_sysctl 0
254 %endif
256 %define tls_priority "@LIBVIRT,SYSTEM"
258 # libvirt 8.1.0 stops distributing any sysconfig files.
259 # If the user has customized their sysconfig file,
260 # the RPM upgrade path will rename it to .rpmsave
261 # because the file is no longer managed by RPM.
262 # To prevent a regression we rename it back after the
263 # transaction to preserve the user's modifications
264 %define libvirt_sysconfig_pre() \
265 for sc in %{?*} ; do \
266 test -f "%{_sysconfdir}/sysconfig/${sc}.rpmsave" || continue ; \
267 mv -v "%{_sysconfdir}/sysconfig/${sc}.rpmsave" "%{_sysconfdir}/sysconfig/${sc}.rpmsave.old" ; \
268 done \
269 %{nil}
270 %define libvirt_sysconfig_posttrans() \
271 for sc in %{?*} ; do \
272 test -f "%{_sysconfdir}/sysconfig/${sc}.rpmsave" || continue ; \
273 mv -v "%{_sysconfdir}/sysconfig/${sc}.rpmsave" "%{_sysconfdir}/sysconfig/${sc}" ; \
274 done \
275 %{nil}
277 Summary: Library providing a simple virtualization API
278 Name: libvirt
279 Version: @VERSION@
280 Release: 1%{?dist}
281 License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
282 URL: https://libvirt.org/
284 %if %(echo %{version} | grep "\.0$" >/dev/null; echo $?) == 1
285 %define mainturl stable_updates/
286 %endif
287 Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz
289 Requires: libvirt-daemon = %{version}-%{release}
290 Requires: libvirt-daemon-config-network = %{version}-%{release}
291 Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
292 %if %{with_libxl}
293 Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
294 %endif
295 %if %{with_lxc}
296 Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
297 %endif
298 %if %{with_qemu}
299 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
300 Requires: libvirt-client-qemu = %{version}-%{release}
301 %endif
302 # We had UML driver, but we've removed it.
303 Obsoletes: libvirt-daemon-driver-uml <= 5.0.0
304 Obsoletes: libvirt-daemon-uml <= 5.0.0
305 %if %{with_vbox}
306 Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
307 %endif
308 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
309 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
310 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
311 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
312 Requires: libvirt-daemon-driver-network = %{version}-%{release}
313 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
314 Requires: libvirt-client = %{version}-%{release}
315 Requires: libvirt-libs = %{version}-%{release}
317 # All build-time requirements. Run-time requirements are
318 # listed against each sub-RPM
319 BuildRequires: python3-docutils
320 BuildRequires: meson >= 0.56.0
321 BuildRequires: ninja-build
322 BuildRequires: git
323 BuildRequires: perl-interpreter
324 BuildRequires: python3
325 BuildRequires: python3-pytest
326 # For xmllint
327 BuildRequires: libxml2
328 # For xsltproc
329 BuildRequires: libxslt
330 BuildRequires: gettext
331 BuildRequires: systemd-rpm-macros
332 # Fedora build root suckage
333 BuildRequires: gawk
334 %if %{with_native}
335 BuildRequires: gcc
336 %if %{with_libxl}
337 BuildRequires: xen-devel
338 %endif
339 BuildRequires: glib2-devel >= 2.56
340 BuildRequires: libxml2-devel
341 BuildRequires: readline-devel
342 BuildRequires: pkgconfig(bash-completion) >= 2.0
343 BuildRequires: libtasn1-devel
344 BuildRequires: gnutls-devel
345 BuildRequires: libattr-devel
346 # For pool-build probing for existing pools
347 BuildRequires: libblkid-devel >= 2.17
348 # for augparse, optionally used in testing
349 BuildRequires: augeas
350 BuildRequires: systemd-devel >= 185
351 BuildRequires: libpciaccess-devel >= 0.10.9
352 BuildRequires: yajl-devel
353 %if %{with_sanlock}
354 BuildRequires: sanlock-devel >= 2.4
355 %endif
356 BuildRequires: libpcap-devel >= 1.5.0
357 BuildRequires: libnl3-devel
358 BuildRequires: libselinux-devel
359 BuildRequires: iptables
360 BuildRequires: ebtables
361 # For modprobe
362 BuildRequires: kmod
363 BuildRequires: cyrus-sasl-devel
364 BuildRequires: polkit >= 0.112
365 # For mount/umount in FS driver
366 BuildRequires: util-linux
367 %if %{with_qemu}
368 # For managing ACLs
369 BuildRequires: libacl-devel
370 # From QEMU RPMs, used by virstoragetest
371 BuildRequires: /usr/bin/qemu-img
372 %endif
373 # nbdkit support requires libnbd
374 %if %{with_nbdkit}
375 BuildRequires: libnbd-devel
376 %endif
377 # For LVM drivers
378 BuildRequires: lvm2
379 # For pool type=iscsi
380 BuildRequires: iscsi-initiator-utils
381 %if %{with_storage_iscsi_direct}
382 # For pool type=iscsi-direct
383 BuildRequires: libiscsi-devel
384 %endif
385 # For disk driver
386 BuildRequires: parted-devel
387 # For Multipath support
388 BuildRequires: device-mapper-devel
389 %if %{with_storage_rbd}
390 BuildRequires: librados-devel
391 BuildRequires: librbd-devel
392 %endif
393 %if %{with_storage_gluster}
394 BuildRequires: glusterfs-api-devel >= 3.4.1
395 BuildRequires: glusterfs-devel >= 3.4.1
396 %endif
397 %if %{with_numactl}
398 # For QEMU/LXC numa info
399 BuildRequires: numactl-devel
400 %endif
401 BuildRequires: libcap-ng-devel >= 0.5.0
402 %if %{with_fuse}
403 BuildRequires: fuse-devel >= 2.8.6
404 %endif
405 %if %{with_libssh2}
406 BuildRequires: libssh2-devel >= 1.3.0
407 %endif
408 %if %{with_netcf}
409 BuildRequires: netcf-devel >= 0.2.2
410 %endif
411 %if %{with_esx}
412 BuildRequires: libcurl-devel
413 %endif
414 %if %{with_hyperv}
415 BuildRequires: libwsman-devel >= 2.6.3
416 %endif
417 BuildRequires: audit-libs-devel
418 # we need /usr/sbin/dtrace
419 BuildRequires: systemtap-sdt-devel
420 # For mount/umount in FS driver
421 BuildRequires: util-linux
422 # For showmount in FS driver (netfs discovery)
423 BuildRequires: nfs-utils
424 %if %{with_numad}
425 BuildRequires: numad
426 %endif
427 %if %{with_wireshark}
428 BuildRequires: wireshark-devel
429 %endif
430 %if %{with_libssh}
431 BuildRequires: libssh-devel >= 0.8.1
432 %endif
433 BuildRequires: libtirpc-devel
434 %if %{with_firewalld_zone}
435 # Needed for the firewalld_reload macro
436 BuildRequires: firewalld-filesystem
437 %endif
438 %endif
440 %if %{with_mingw32}
441 BuildRequires: mingw32-filesystem
442 BuildRequires: mingw32-gcc
443 BuildRequires: mingw32-binutils
444 BuildRequires: mingw32-glib2 >= 2.48
445 BuildRequires: mingw32-gnutls
446 BuildRequires: mingw32-gettext
447 BuildRequires: mingw32-libxml2
448 BuildRequires: mingw32-portablexdr
449 BuildRequires: mingw32-dlfcn
450 BuildRequires: mingw32-libssh2
451 BuildRequires: mingw32-curl
452 %endif
453 %if %{with_mingw64}
454 BuildRequires: mingw64-filesystem
455 BuildRequires: mingw64-gcc
456 BuildRequires: mingw64-binutils
457 BuildRequires: mingw64-glib2 >= 2.48
458 BuildRequires: mingw64-gnutls
459 BuildRequires: mingw64-gettext
460 BuildRequires: mingw64-libxml2
461 BuildRequires: mingw64-portablexdr
462 BuildRequires: mingw64-dlfcn
463 BuildRequires: mingw64-libssh2
464 BuildRequires: mingw64-curl
465 %endif
467 %description
468 Libvirt is a C toolkit to interact with the virtualization capabilities
469 of recent versions of Linux (and other OSes). The main package includes
470 the libvirtd server exporting the virtualization support.
472 %if %{with_native}
473 %package docs
474 Summary: API reference and website documentation
476 %description docs
477 Includes the API reference for the libvirt C library, and a complete
478 copy of the libvirt.org website documentation.
480 %package daemon
481 Summary: Server side daemon and supporting files for libvirt library
483 # All runtime requirements for the libvirt package (runtime requrements
484 # for subpackages are listed later in those subpackages)
486 # The client side, i.e. shared libs are in a subpackage
487 Requires: libvirt-libs = %{version}-%{release}
488 Requires: libvirt-daemon-common = %{version}-%{release}
489 Requires: libvirt-daemon-lock = %{version}-%{release}
490 Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
491 Requires: libvirt-daemon-log = %{version}-%{release}
492 Requires: libvirt-daemon-proxy = %{version}-%{release}
494 %description daemon
495 Server side daemon required to manage the virtualization capabilities
496 of recent versions of Linux. Requires a hypervisor specific sub-RPM
497 for specific drivers.
499 %package daemon-common
500 Summary: Files and utilities used by daemons
501 Requires: libvirt-libs = %{version}-%{release}
502 # The libvirt-guests.sh script requires virsh from libvirt-client subpackage,
503 # but not every deployment wants to use libvirt-guests service. Using
504 # Recommends here will install libvirt-client by default (if available), but
505 # RPM won't complain if the package is unavailable, masked, or removed later.
506 Recommends: libvirt-client = %{version}-%{release}
507 # for /sbin/ip
508 Requires: iproute
509 # for /sbin/tc
510 Requires: iproute-tc
511 Requires: polkit >= 0.112
512 %if %{with_dmidecode}
513 # For virConnectGetSysinfo
514 Requires: dmidecode
515 %endif
516 # For service management
517 Requires(posttrans): /usr/bin/systemctl
518 Requires(preun): /usr/bin/systemctl
519 # libvirtd depends on 'messagebus' service
520 Requires: dbus
521 # For uid creation during pre
522 Requires(pre): shadow-utils
523 # Needed by /usr/libexec/libvirt-guests.sh script.
524 %if 0%{?fedora}
525 Requires: gettext-runtime
526 %else
527 Requires: gettext
528 %endif
530 # Ensure smooth upgrades
531 Obsoletes: libvirt-admin < 7.3.0
532 Provides: libvirt-admin = %{version}-%{release}
533 Obsoletes: libvirt-bash-completion < 7.3.0
535 %description daemon-common
536 Miscellaneous files and utilities used by other libvirt daemons
538 %package daemon-lock
539 Summary: Server side daemon for managing locks
540 Requires: libvirt-libs = %{version}-%{release}
542 %description daemon-lock
543 Server side daemon used to manage locks held against virtual machine
544 resources
546 %package daemon-plugin-lockd
547 Summary: lockd client plugin for virtlockd
548 Requires: libvirt-libs = %{version}-%{release}
549 Requires: libvirt-daemon-lock = %{version}-%{release}
551 %description daemon-plugin-lockd
552 A client-side plugin that implements disk locking using POSIX fcntl advisory
553 locks via communication with the virtlockd daemon
555 %package daemon-log
556 Summary: Server side daemon for managing logs
557 Requires: libvirt-libs = %{version}-%{release}
559 %description daemon-log
560 Server side daemon used to manage logs from virtual machine consoles
562 %package daemon-proxy
563 Summary: Server side daemon providing libvirtd proxy
564 Requires: libvirt-libs = %{version}-%{release}
565 # netcat is needed on the server side so that clients that have
566 # libvirt < 6.9.0 can connect, but newer versions will prefer
567 # virt-ssh-helper. Making this a Recommends means that it gets
568 # installed by default, but can still be removed if compatibility
569 # with old clients is not required
570 Recommends: /usr/bin/nc
572 %description daemon-proxy
573 Server side daemon providing functionality previously provided by
574 the monolithic libvirtd
576 %package daemon-config-network
577 Summary: Default configuration files for the libvirtd daemon
579 Requires: libvirt-daemon-driver-network = %{version}-%{release}
581 %description daemon-config-network
582 Default configuration files for setting up NAT based networking
584 %package daemon-config-nwfilter
585 Summary: Network filter configuration files for the libvirtd daemon
587 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
589 %description daemon-config-nwfilter
590 Network filter configuration files for cleaning guest traffic
592 %package daemon-driver-network
593 Summary: Network driver plugin for the libvirtd daemon
594 Requires: libvirt-daemon-common = %{version}-%{release}
595 Requires: libvirt-libs = %{version}-%{release}
596 Requires: dnsmasq >= 2.41
597 Requires: iptables
599 %description daemon-driver-network
600 The network driver plugin for the libvirtd daemon, providing
601 an implementation of the virtual network APIs using the Linux
602 bridge capabilities.
604 %package daemon-driver-nwfilter
605 Summary: Nwfilter driver plugin for the libvirtd daemon
606 Requires: libvirt-daemon-common = %{version}-%{release}
607 Requires: libvirt-libs = %{version}-%{release}
608 Requires: iptables
609 Requires: ebtables
611 %description daemon-driver-nwfilter
612 The nwfilter driver plugin for the libvirtd daemon, providing
613 an implementation of the firewall APIs using the ebtables,
614 iptables and ip6tables capabilities
616 %package daemon-driver-nodedev
617 Summary: Nodedev driver plugin for the libvirtd daemon
618 Requires: libvirt-daemon-common = %{version}-%{release}
619 Requires: libvirt-libs = %{version}-%{release}
620 # needed for device enumeration
621 Requires: systemd >= 185
622 # For managing persistent mediated devices
623 # Note: for nodedev-update support at least mdevctl v1.3.0 is required
624 Requires: mdevctl
625 # for modprobe of pci devices
626 Requires: module-init-tools
628 %description daemon-driver-nodedev
629 The nodedev driver plugin for the libvirtd daemon, providing
630 an implementation of the node device APIs using the udev
631 capabilities.
633 %package daemon-driver-interface
634 Summary: Interface driver plugin for the libvirtd daemon
635 Requires: libvirt-daemon-common = %{version}-%{release}
636 Requires: libvirt-libs = %{version}-%{release}
637 %if %{with_netcf}
638 Requires: netcf-libs >= 0.2.2
639 %endif
641 %description daemon-driver-interface
642 The interface driver plugin for the libvirtd daemon, providing
643 an implementation of the host network interface APIs.
645 %package daemon-driver-secret
646 Summary: Secret driver plugin for the libvirtd daemon
647 Requires: libvirt-daemon-common = %{version}-%{release}
648 Requires: libvirt-libs = %{version}-%{release}
650 %description daemon-driver-secret
651 The secret driver plugin for the libvirtd daemon, providing
652 an implementation of the secret key APIs.
654 %package daemon-driver-storage-core
655 Summary: Storage driver plugin including base backends for the libvirtd daemon
656 Requires: libvirt-daemon-common = %{version}-%{release}
657 Requires: libvirt-libs = %{version}-%{release}
658 Requires: nfs-utils
659 # For mkfs
660 Requires: util-linux
661 # For storage wiping with different algorithms
662 Requires: scrub
663 %if %{with_qemu}
664 # From QEMU RPMs
665 Requires: /usr/bin/qemu-img
666 %endif
667 %if !%{with_storage_rbd}
668 Obsoletes: libvirt-daemon-driver-storage-rbd < 5.2.0
669 %endif
670 Obsoletes: libvirt-daemon-driver-storage-sheepdog < 8.8.0
672 %description daemon-driver-storage-core
673 The storage driver plugin for the libvirtd daemon, providing
674 an implementation of the storage APIs using files, local disks, LVM, SCSI,
675 iSCSI, and multipath storage.
677 %package daemon-driver-storage-logical
678 Summary: Storage driver plugin for lvm volumes
679 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
680 Requires: libvirt-libs = %{version}-%{release}
681 Requires: lvm2
683 %description daemon-driver-storage-logical
684 The storage driver backend adding implementation of the storage APIs for block
685 volumes using lvm.
687 %package daemon-driver-storage-disk
688 Summary: Storage driver plugin for disk
689 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
690 Requires: libvirt-libs = %{version}-%{release}
691 Requires: parted
692 Requires: device-mapper
694 %description daemon-driver-storage-disk
695 The storage driver backend adding implementation of the storage APIs for block
696 volumes using the host disks.
698 %package daemon-driver-storage-scsi
699 Summary: Storage driver plugin for local scsi devices
700 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
701 Requires: libvirt-libs = %{version}-%{release}
703 %description daemon-driver-storage-scsi
704 The storage driver backend adding implementation of the storage APIs for scsi
705 host devices.
707 %package daemon-driver-storage-iscsi
708 Summary: Storage driver plugin for iscsi
709 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
710 Requires: libvirt-libs = %{version}-%{release}
711 Requires: iscsi-initiator-utils
713 %description daemon-driver-storage-iscsi
714 The storage driver backend adding implementation of the storage APIs for iscsi
715 volumes using the host iscsi stack.
717 %if %{with_storage_iscsi_direct}
718 %package daemon-driver-storage-iscsi-direct
719 Summary: Storage driver plugin for iscsi-direct
720 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
721 Requires: libvirt-libs = %{version}-%{release}
723 %description daemon-driver-storage-iscsi-direct
724 The storage driver backend adding implementation of the storage APIs for iscsi
725 volumes using libiscsi direct connection.
726 %endif
728 %package daemon-driver-storage-mpath
729 Summary: Storage driver plugin for multipath volumes
730 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
731 Requires: libvirt-libs = %{version}-%{release}
732 Requires: device-mapper
734 %description daemon-driver-storage-mpath
735 The storage driver backend adding implementation of the storage APIs for
736 multipath storage using device mapper.
738 %if %{with_storage_gluster}
739 %package daemon-driver-storage-gluster
740 Summary: Storage driver plugin for gluster
741 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
742 Requires: libvirt-libs = %{version}-%{release}
743 %if 0%{?fedora}
744 Requires: glusterfs-client >= 2.0.1
745 %endif
746 %if 0%{?fedora} || 0%{?with_storage_gluster}
747 Requires: /usr/sbin/gluster
748 %endif
750 %description daemon-driver-storage-gluster
751 The storage driver backend adding implementation of the storage APIs for gluster
752 volumes using libgfapi.
753 %endif
755 %if %{with_storage_rbd}
756 %package daemon-driver-storage-rbd
757 Summary: Storage driver plugin for rbd
758 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
759 Requires: libvirt-libs = %{version}-%{release}
761 %description daemon-driver-storage-rbd
762 The storage driver backend adding implementation of the storage APIs for rbd
763 volumes using the ceph protocol.
764 %endif
766 %if %{with_storage_zfs}
767 %package daemon-driver-storage-zfs
768 Summary: Storage driver plugin for ZFS
769 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
770 Requires: libvirt-libs = %{version}-%{release}
771 # Support any conforming implementation of zfs
772 Requires: /sbin/zfs
773 Requires: /sbin/zpool
775 %description daemon-driver-storage-zfs
776 The storage driver backend adding implementation of the storage APIs for
777 ZFS volumes.
778 %endif
780 %package daemon-driver-storage
781 Summary: Storage driver plugin including all backends for the libvirtd daemon
782 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
783 Requires: libvirt-daemon-driver-storage-disk = %{version}-%{release}
784 Requires: libvirt-daemon-driver-storage-logical = %{version}-%{release}
785 Requires: libvirt-daemon-driver-storage-scsi = %{version}-%{release}
786 Requires: libvirt-daemon-driver-storage-iscsi = %{version}-%{release}
787 Requires: libvirt-daemon-driver-storage-mpath = %{version}-%{release}
788 %if %{with_storage_iscsi_direct}
789 Requires: libvirt-daemon-driver-storage-iscsi-direct = %{version}-%{release}
790 %endif
791 %if %{with_storage_gluster}
792 Requires: libvirt-daemon-driver-storage-gluster = %{version}-%{release}
793 %endif
794 %if %{with_storage_rbd}
795 Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release}
796 %endif
797 %if %{with_storage_zfs}
798 Requires: libvirt-daemon-driver-storage-zfs = %{version}-%{release}
799 %endif
801 %description daemon-driver-storage
802 The storage driver plugin for the libvirtd daemon, providing
803 an implementation of the storage APIs using LVM, iSCSI,
804 parted and more.
806 %if %{with_qemu}
807 %package daemon-driver-qemu
808 Summary: QEMU driver plugin for the libvirtd daemon
809 Requires: libvirt-daemon-common = %{version}-%{release}
810 Requires: libvirt-daemon-log = %{version}-%{release}
811 Requires: libvirt-libs = %{version}-%{release}
812 Requires: /usr/bin/qemu-img
813 # For image compression
814 Requires: gzip
815 Requires: bzip2
816 Requires: lzop
817 Requires: xz
818 Requires: systemd-container
819 Requires: swtpm-tools
820 %if %{with_numad}
821 Requires: numad
822 %endif
823 %if 0%{?fedora} || 0%{?rhel} >= 9
824 Recommends: passt
825 Recommends: passt-selinux
826 %endif
827 %if %{with_nbdkit}
828 Recommends: nbdkit
829 Recommends: nbdkit-curl-plugin
830 Recommends: nbdkit-ssh-plugin
831 %endif
833 %description daemon-driver-qemu
834 The qemu driver plugin for the libvirtd daemon, providing
835 an implementation of the hypervisor driver APIs using
836 QEMU
837 %endif
839 %if %{with_lxc}
840 %package daemon-driver-lxc
841 Summary: LXC driver plugin for the libvirtd daemon
842 Requires: libvirt-daemon-common = %{version}-%{release}
843 Requires: libvirt-libs = %{version}-%{release}
844 # There really is a hard cross-driver dependency here
845 Requires: libvirt-daemon-driver-network = %{version}-%{release}
846 Requires: systemd-container
847 # for modprobe of nbd driver
848 Requires: module-init-tools
849 %if %{with_numad}
850 Requires: numad
851 %endif
853 %description daemon-driver-lxc
854 The LXC driver plugin for the libvirtd daemon, providing
855 an implementation of the hypervisor driver APIs using
856 the Linux kernel
857 %endif
859 %if %{with_vbox}
860 %package daemon-driver-vbox
861 Summary: VirtualBox driver plugin for the libvirtd daemon
862 Requires: libvirt-daemon-common = %{version}-%{release}
863 Requires: libvirt-libs = %{version}-%{release}
865 %description daemon-driver-vbox
866 The vbox driver plugin for the libvirtd daemon, providing
867 an implementation of the hypervisor driver APIs using
868 VirtualBox
869 %endif
871 %if %{with_libxl}
872 %package daemon-driver-libxl
873 Summary: Libxl driver plugin for the libvirtd daemon
874 Requires: libvirt-daemon-common = %{version}-%{release}
875 Requires: libvirt-libs = %{version}-%{release}
876 Obsoletes: libvirt-daemon-driver-xen < 4.3.0
878 %description daemon-driver-libxl
879 The Libxl driver plugin for the libvirtd daemon, providing
880 an implementation of the hypervisor driver APIs using
881 Libxl
882 %endif
884 %if %{with_qemu_tcg}
885 %package daemon-qemu
886 Summary: Server side daemon & driver required to run QEMU guests
888 %if %{with_modular_daemons}
889 Requires: libvirt-daemon-common = %{version}-%{release}
890 Requires: libvirt-daemon-log = %{version}-%{release}
891 Requires: libvirt-daemon-lock = %{version}-%{release}
892 Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
893 Requires: libvirt-daemon-proxy = %{version}-%{release}
894 Recommends: libvirt-daemon = %{version}-%{release}
895 %else
896 Requires: libvirt-daemon = %{version}-%{release}
897 %endif
898 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
899 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
900 Requires: libvirt-daemon-driver-network = %{version}-%{release}
901 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
902 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
903 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
904 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
905 Requires: qemu
907 %description daemon-qemu
908 Server side daemon and driver required to manage the virtualization
909 capabilities of the QEMU TCG emulators
910 %endif
912 %if %{with_qemu_kvm}
913 %package daemon-kvm
914 Summary: Server side daemon & driver required to run KVM guests
916 %if %{with_modular_daemons}
917 Requires: libvirt-daemon-common = %{version}-%{release}
918 Requires: libvirt-daemon-log = %{version}-%{release}
919 Requires: libvirt-daemon-lock = %{version}-%{release}
920 Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
921 Requires: libvirt-daemon-proxy = %{version}-%{release}
922 Recommends: libvirt-daemon = %{version}-%{release}
923 %else
924 Requires: libvirt-daemon = %{version}-%{release}
925 %endif
926 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
927 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
928 Requires: libvirt-daemon-driver-network = %{version}-%{release}
929 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
930 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
931 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
932 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
933 Requires: qemu-kvm
935 %description daemon-kvm
936 Server side daemon and driver required to manage the virtualization
937 capabilities of the KVM hypervisor
938 %endif
940 %if %{with_lxc}
941 %package daemon-lxc
942 Summary: Server side daemon & driver required to run LXC guests
944 %if %{with_modular_daemons}
945 Requires: libvirt-daemon-common = %{version}-%{release}
946 Requires: libvirt-daemon-proxy = %{version}-%{release}
947 Recommends: libvirt-daemon = %{version}-%{release}
948 %else
949 Requires: libvirt-daemon = %{version}-%{release}
950 %endif
951 Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
952 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
953 Requires: libvirt-daemon-driver-network = %{version}-%{release}
954 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
955 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
956 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
957 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
959 %description daemon-lxc
960 Server side daemon and driver required to manage the virtualization
961 capabilities of LXC
962 %endif
964 %if %{with_libxl}
965 %package daemon-xen
966 Summary: Server side daemon & driver required to run XEN guests
968 %if %{with_modular_daemons}
969 Requires: libvirt-daemon-common = %{version}-%{release}
970 Requires: libvirt-daemon-lock = %{version}-%{release}
971 Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
972 Requires: libvirt-daemon-proxy = %{version}-%{release}
973 Recommends: libvirt-daemon = %{version}-%{release}
974 %else
975 Requires: libvirt-daemon = %{version}-%{release}
976 %endif
977 Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
978 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
979 Requires: libvirt-daemon-driver-network = %{version}-%{release}
980 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
981 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
982 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
983 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
984 Requires: xen
986 %description daemon-xen
987 Server side daemon and driver required to manage the virtualization
988 capabilities of XEN
989 %endif
991 %if %{with_vbox}
992 %package daemon-vbox
993 Summary: Server side daemon & driver required to run VirtualBox guests
995 %if %{with_modular_daemons}
996 Requires: libvirt-daemon-common = %{version}-%{release}
997 Requires: libvirt-daemon-proxy = %{version}-%{release}
998 Recommends: libvirt-daemon = %{version}-%{release}
999 %else
1000 Requires: libvirt-daemon = %{version}-%{release}
1001 %endif
1002 Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
1003 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
1004 Requires: libvirt-daemon-driver-network = %{version}-%{release}
1005 Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
1006 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
1007 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
1008 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
1010 %description daemon-vbox
1011 Server side daemon and driver required to manage the virtualization
1012 capabilities of VirtualBox
1013 %endif
1015 %package client
1016 Summary: Client side utilities of the libvirt library
1017 Requires: libvirt-libs = %{version}-%{release}
1018 # Needed by virt-pki-validate script.
1019 Requires: gnutls-utils
1021 # Ensure smooth upgrades
1022 Obsoletes: libvirt-bash-completion < 7.3.0
1024 %description client
1025 The client binaries needed to access the virtualization
1026 capabilities of recent versions of Linux (and other OSes).
1028 %package client-qemu
1029 Summary: Additional client side utilities for QEMU
1030 Requires: libvirt-libs = %{version}-%{release}
1031 Requires: python3-libvirt >= 3.7.0
1032 Requires: python3-cryptography
1033 Requires: python3-lxml
1035 %description client-qemu
1036 The additional client binaries are used to interact
1037 with some QEMU specific features of libvirt.
1039 %package libs
1040 Summary: Client side libraries
1041 # So remote clients can access libvirt over SSH tunnel
1042 Requires: cyrus-sasl
1043 # Needed by default sasl.conf - no onerous extra deps, since
1044 # 100's of other things on a system already pull in krb5-libs
1045 Requires: cyrus-sasl-gssapi
1047 %description libs
1048 Shared libraries for accessing the libvirt daemon.
1050 %if %{with_wireshark}
1051 %package wireshark
1052 Summary: Wireshark dissector plugin for libvirt RPC transactions
1053 Requires: wireshark
1054 Requires: libvirt-libs = %{version}-%{release}
1056 %description wireshark
1057 Wireshark dissector plugin for better analysis of libvirt RPC traffic.
1058 %endif
1060 %if %{with_lxc}
1061 %package login-shell
1062 Summary: Login shell for connecting users to an LXC container
1063 Requires: libvirt-libs = %{version}-%{release}
1065 %description login-shell
1066 Provides the set-uid virt-login-shell binary that is used to
1067 connect a user to an LXC container when they login, by switching
1068 namespaces.
1069 %endif
1071 %package devel
1072 Summary: Libraries, includes, etc. to compile with the libvirt library
1073 Requires: libvirt-libs = %{version}-%{release}
1074 Requires: pkgconfig
1076 %description devel
1077 Include header files & development libraries for the libvirt C library.
1079 %if %{with_sanlock}
1080 %package daemon-plugin-sanlock
1081 Summary: Sanlock lock manager plugin for QEMU driver
1082 Requires: sanlock >= 2.4
1083 #for virt-sanlock-cleanup require augeas
1084 Requires: augeas
1085 Requires: libvirt-libs = %{version}-%{release}
1086 Obsoletes: libvirt-lock-sanlock < 9.1.0
1087 Provides: libvirt-lock-sanlock = %{version}-%{release}
1089 %description daemon-plugin-sanlock
1090 Includes the Sanlock lock manager plugin for the QEMU
1091 driver
1092 %endif
1094 %package nss
1095 Summary: Libvirt plugin for Name Service Switch
1096 Requires: libvirt-daemon-driver-network = %{version}-%{release}
1098 %description nss
1099 Libvirt plugin for NSS for translating domain names into IP addresses.
1100 %endif
1102 %if %{with_mingw32}
1103 %package -n mingw32-libvirt
1104 Summary: %{summary}
1105 Obsoletes: mingw32-libvirt-static < 7.0.0
1106 BuildArch: noarch
1108 %description -n mingw32-libvirt
1109 MinGW Windows libvirt virtualization library.
1111 %{?mingw32_debug_package}
1112 %endif
1114 %if %{with_mingw64}
1115 %package -n mingw64-libvirt
1116 Summary: %{summary}
1117 Obsoletes: mingw64-libvirt-static < 7.0.0
1118 BuildArch: noarch
1120 %description -n mingw64-libvirt
1121 MinGW Windows libvirt virtualization library.
1123 %{?mingw64_debug_package}
1124 %endif
1126 %prep
1127 %autosetup -S git_am
1129 %build
1130 %if 0%{?fedora} >= %{min_fedora} || 0%{?rhel} >= %{min_rhel}
1131 %define supported_platform 1
1132 %else
1133 %define supported_platform 0
1134 %endif
1136 %if ! %{supported_platform}
1137 echo "This RPM requires either Fedora >= %{min_fedora} or RHEL >= %{min_rhel}"
1138 exit 1
1139 %endif
1141 %if %{with_qemu}
1142 %define arg_qemu -Ddriver_qemu=enabled
1143 %else
1144 %define arg_qemu -Ddriver_qemu=disabled
1145 %endif
1147 %if %{with_openvz}
1148 %define arg_openvz -Ddriver_openvz=enabled
1149 %else
1150 %define arg_openvz -Ddriver_openvz=disabled
1151 %endif
1153 %if %{with_lxc}
1154 %define arg_lxc -Ddriver_lxc=enabled
1155 %define arg_login_shell -Dlogin_shell=enabled
1156 %else
1157 %define arg_lxc -Ddriver_lxc=disabled
1158 %define arg_login_shell -Dlogin_shell=disabled
1159 %endif
1161 %if %{with_vbox}
1162 %define arg_vbox -Ddriver_vbox=enabled
1163 %else
1164 %define arg_vbox -Ddriver_vbox=disabled
1165 %endif
1167 %if %{with_libxl}
1168 %define arg_libxl -Ddriver_libxl=enabled
1169 %else
1170 %define arg_libxl -Ddriver_libxl=disabled
1171 %endif
1173 %if %{with_esx}
1174 %define arg_esx -Ddriver_esx=enabled -Dcurl=enabled
1175 %else
1176 %define arg_esx -Ddriver_esx=disabled -Dcurl=disabled
1177 %endif
1179 %if %{with_hyperv}
1180 %define arg_hyperv -Ddriver_hyperv=enabled -Dopenwsman=enabled
1181 %else
1182 %define arg_hyperv -Ddriver_hyperv=disabled -Dopenwsman=disabled
1183 %endif
1185 %if %{with_vmware}
1186 %define arg_vmware -Ddriver_vmware=enabled
1187 %else
1188 %define arg_vmware -Ddriver_vmware=disabled
1189 %endif
1191 %if %{with_storage_rbd}
1192 %define arg_storage_rbd -Dstorage_rbd=enabled
1193 %else
1194 %define arg_storage_rbd -Dstorage_rbd=disabled
1195 %endif
1197 %if %{with_storage_gluster}
1198 %define arg_storage_gluster -Dstorage_gluster=enabled -Dglusterfs=enabled
1199 %else
1200 %define arg_storage_gluster -Dstorage_gluster=disabled -Dglusterfs=disabled
1201 %endif
1203 %if %{with_storage_zfs}
1204 %define arg_storage_zfs -Dstorage_zfs=enabled
1205 %else
1206 %define arg_storage_zfs -Dstorage_zfs=disabled
1207 %endif
1209 %if %{with_numactl}
1210 %define arg_numactl -Dnumactl=enabled
1211 %else
1212 %define arg_numactl -Dnumactl=disabled
1213 %endif
1215 %if %{with_numad}
1216 %define arg_numad -Dnumad=enabled
1217 %else
1218 %define arg_numad -Dnumad=disabled
1219 %endif
1221 %if %{with_nbdkit}
1222 %define arg_nbdkit -Dnbdkit=enabled
1223 %else
1224 %define arg_nbdkit -Dnbdkit=disabled
1225 %endif
1227 %if %{with_nbdkit_config_default}
1228 %define arg_nbdkit_config_default -Dnbdkit_config_default=enabled
1229 %else
1230 %define arg_nbdkit_config_default -Dnbdkit_config_default=disabled
1231 %endif
1233 %if %{with_fuse}
1234 %define arg_fuse -Dfuse=enabled
1235 %else
1236 %define arg_fuse -Dfuse=disabled
1237 %endif
1239 %if %{with_sanlock}
1240 %define arg_sanlock -Dsanlock=enabled
1241 %else
1242 %define arg_sanlock -Dsanlock=disabled
1243 %endif
1245 %if %{with_firewalld_zone}
1246 %define arg_firewalld_zone -Dfirewalld_zone=enabled
1247 %else
1248 %define arg_firewalld_zone -Dfirewalld_zone=disabled
1249 %endif
1251 %if %{with_netcf}
1252 %define arg_netcf -Dnetcf=enabled
1253 %else
1254 %define arg_netcf -Dnetcf=disabled
1255 %endif
1257 %if %{with_wireshark}
1258 %define arg_wireshark -Dwireshark_dissector=enabled
1259 %else
1260 %define arg_wireshark -Dwireshark_dissector=disabled
1261 %endif
1263 %if %{with_storage_iscsi_direct}
1264 %define arg_storage_iscsi_direct -Dstorage_iscsi_direct=enabled -Dlibiscsi=enabled
1265 %else
1266 %define arg_storage_iscsi_direct -Dstorage_iscsi_direct=disabled -Dlibiscsi=disabled
1267 %endif
1269 %if %{with_libssh}
1270 %define arg_libssh -Dlibssh=enabled
1271 %else
1272 %define arg_libssh -Dlibssh=disabled
1273 %endif
1275 %if %{with_libssh2}
1276 %define arg_libssh2 -Dlibssh2=enabled
1277 %else
1278 %define arg_libssh2 -Dlibssh2=disabled
1279 %endif
1281 %if %{with_modular_daemons}
1282 %define arg_remote_mode -Dremote_default_mode=direct
1283 %else
1284 %define arg_remote_mode -Dremote_default_mode=legacy
1285 %endif
1287 %if %{with_userfaultfd_sysctl}
1288 %define arg_userfaultfd_sysctl -Duserfaultfd_sysctl=enabled
1289 %else
1290 %define arg_userfaultfd_sysctl -Duserfaultfd_sysctl=disabled
1291 %endif
1293 %define when %(date +"%%F-%%T")
1294 %define where %(hostname)
1295 %define who %{?packager}%{!?packager:Unknown}
1296 %define arg_packager -Dpackager="%{who}, %{when}, %{where}"
1297 %define arg_packager_version -Dpackager_version="%{release}"
1298 %define arg_selinux_mount -Dselinux_mount="/sys/fs/selinux"
1300 # place macros above and build commands below this comment
1302 export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec)
1304 %if %{with_native}
1305 %meson \
1306 -Drunstatedir=%{_rundir} \
1307 -Dinitconfdir=%{_sysconfdir}/sysconfig \
1308 %{?arg_qemu} \
1309 %{?arg_openvz} \
1310 %{?arg_lxc} \
1311 %{?arg_vbox} \
1312 %{?arg_libxl} \
1313 -Dsasl=enabled \
1314 -Dpolkit=enabled \
1315 -Ddriver_libvirtd=enabled \
1316 -Ddriver_remote=enabled \
1317 -Ddriver_test=enabled \
1318 %{?arg_esx} \
1319 %{?arg_hyperv} \
1320 %{?arg_vmware} \
1321 -Ddriver_vz=disabled \
1322 -Ddriver_bhyve=disabled \
1323 -Ddriver_ch=disabled \
1324 %{?arg_remote_mode} \
1325 -Ddriver_interface=enabled \
1326 -Ddriver_network=enabled \
1327 -Dstorage_fs=enabled \
1328 -Dstorage_lvm=enabled \
1329 -Dstorage_iscsi=enabled \
1330 %{?arg_storage_iscsi_direct} \
1331 -Dstorage_scsi=enabled \
1332 -Dstorage_disk=enabled \
1333 -Dstorage_mpath=enabled \
1334 %{?arg_storage_rbd} \
1335 %{?arg_storage_gluster} \
1336 %{?arg_storage_zfs} \
1337 -Dstorage_vstorage=disabled \
1338 %{?arg_numactl} \
1339 %{?arg_numad} \
1340 -Dcapng=enabled \
1341 %{?arg_fuse} \
1342 %{?arg_netcf} \
1343 -Dnls=enabled \
1344 -Dselinux=enabled \
1345 %{?arg_selinux_mount} \
1346 -Dapparmor=disabled \
1347 -Dapparmor_profiles=disabled \
1348 -Dsecdriver_apparmor=disabled \
1349 -Dudev=enabled \
1350 -Dyajl=enabled \
1351 %{?arg_sanlock} \
1352 -Dlibpcap=enabled \
1353 %{?arg_nbdkit} \
1354 %{?arg_nbdkit_config_default} \
1355 -Dlibnl=enabled \
1356 -Daudit=enabled \
1357 -Ddtrace=enabled \
1358 -Dfirewalld=enabled \
1359 %{?arg_firewalld_zone} \
1360 %{?arg_wireshark} \
1361 %{?arg_libssh} \
1362 %{?arg_libssh2} \
1363 -Dpm_utils=disabled \
1364 -Dnss=enabled \
1365 %{arg_packager} \
1366 %{arg_packager_version} \
1367 -Dqemu_user=%{qemu_user} \
1368 -Dqemu_group=%{qemu_group} \
1369 -Dqemu_moddir=%{qemu_moddir} \
1370 -Dqemu_datadir=%{qemu_datadir} \
1371 -Dtls_priority=%{tls_priority} \
1372 -Dsysctl_config=enabled \
1373 %{?arg_userfaultfd_sysctl} \
1374 %{?enable_werror} \
1375 -Dexpensive_tests=enabled \
1376 -Dinit_script=systemd \
1377 -Ddocs=enabled \
1378 -Dtests=enabled \
1379 -Drpath=disabled \
1380 %{?arg_login_shell}
1382 %meson_build
1383 %endif
1385 %if %{with_mingw32} || %{with_mingw64}
1386 %mingw_meson \
1387 --auto-features=enabled \
1388 -Ddriver_remote=enabled \
1389 -Ddriver_test=enabled \
1390 -Ddriver_esx=enabled \
1391 -Dcurl=enabled \
1392 -Ddocs=enabled \
1393 -Dapparmor=disabled \
1394 -Dapparmor_profiles=disabled \
1395 -Dattr=disabled \
1396 -Daudit=disabled \
1397 -Dbash_completion=disabled \
1398 -Dblkid=disabled \
1399 -Dcapng=disabled \
1400 -Ddriver_bhyve=disabled \
1401 -Ddriver_hyperv=disabled \
1402 -Ddriver_interface=disabled \
1403 -Ddriver_libvirtd=disabled \
1404 -Ddriver_libxl=disabled \
1405 -Ddriver_lxc=disabled \
1406 -Ddriver_network=disabled \
1407 -Ddriver_openvz=disabled \
1408 -Ddriver_qemu=disabled \
1409 -Ddriver_secrets=disabled \
1410 -Ddriver_vbox=disabled \
1411 -Ddriver_vmware=disabled \
1412 -Ddriver_vz=disabled \
1413 -Ddtrace=disabled \
1414 -Dexpensive_tests=disabled \
1415 -Dfirewalld=disabled \
1416 -Dfirewalld_zone=disabled \
1417 -Dfuse=disabled \
1418 -Dglusterfs=disabled \
1419 -Dhost_validate=disabled \
1420 -Dlibiscsi=disabled \
1421 -Dnbdkit=disabled \
1422 -Dnbdkit_config_default=disabled \
1423 -Dlibnl=disabled \
1424 -Dlibpcap=disabled \
1425 -Dlibssh2=disabled \
1426 -Dlibssh=disabled \
1427 -Dlogin_shell=disabled \
1428 -Dnetcf=disabled \
1429 -Dnls=enabled \
1430 -Dnss=disabled \
1431 -Dnumactl=disabled \
1432 -Dnumad=disabled \
1433 -Dopenwsman=disabled \
1434 -Dpciaccess=disabled \
1435 -Dpm_utils=disabled \
1436 -Dpolkit=disabled \
1437 -Dreadline=disabled \
1438 -Drpath=disabled \
1439 -Dsanlock=disabled \
1440 -Dsasl=disabled \
1441 -Dsecdriver_apparmor=disabled \
1442 -Dsecdriver_selinux=disabled \
1443 -Dselinux=disabled \
1444 -Dstorage_dir=disabled \
1445 -Dstorage_disk=disabled \
1446 -Dstorage_fs=disabled \
1447 -Dstorage_gluster=disabled \
1448 -Dstorage_iscsi_direct=disabled \
1449 -Dstorage_iscsi=disabled \
1450 -Dstorage_lvm=disabled \
1451 -Dstorage_mpath=disabled \
1452 -Dstorage_rbd=disabled \
1453 -Dstorage_scsi=disabled \
1454 -Dstorage_vstorage=disabled \
1455 -Dstorage_zfs=disabled \
1456 -Dsysctl_config=disabled \
1457 -Duserfaultfd_sysctl=disabled \
1458 -Dtests=disabled \
1459 -Dudev=disabled \
1460 -Dwireshark_dissector=disabled \
1461 -Dyajl=disabled
1462 %mingw_ninja
1463 %endif
1465 %install
1466 rm -fr %{buildroot}
1468 export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec)
1470 %if %{with_native}
1471 %meson_install
1473 # We don't want to install /etc/libvirt/qemu/networks in the main %%files list
1474 # because if the admin wants to delete the default network completely, we don't
1475 # want to end up re-incarnating it on every RPM upgrade.
1476 install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/
1477 cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \
1478 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
1479 # libvirt saves this file with mode 0600
1480 chmod 0600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
1482 # nwfilter files are installed in /usr/share/libvirt and copied to /etc in %%post
1483 # to avoid verification errors on changed files in /etc
1484 install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/nwfilter/
1485 cp -a $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml \
1486 $RPM_BUILD_ROOT%{_datadir}/libvirt/nwfilter/
1487 # libvirt saves these files with mode 600
1488 chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml
1490 %if ! %{with_qemu}
1491 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug
1492 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
1493 rm -f $RPM_BUILD_ROOT%{_sysusersdir}/libvirt-qemu.conf
1494 %endif
1495 %find_lang %{name}
1497 %if ! %{with_sanlock}
1498 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirt_sanlock.aug
1499 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
1500 %endif
1502 %if ! %{with_lxc}
1503 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug
1504 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
1505 %endif
1507 %if ! %{with_qemu}
1508 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf
1509 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
1510 %endif
1511 %if ! %{with_lxc}
1512 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
1513 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc
1514 %endif
1515 %if ! %{with_libxl}
1516 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/libxl.conf
1517 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.libxl
1518 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_libxl.aug
1519 rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
1520 %endif
1522 # Copied into libvirt-docs subpackage eventually
1523 mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt libvirt-docs
1525 %ifarch %{arches_systemtap_64bit}
1526 mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \
1527 $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp
1529 %if %{with_qemu}
1530 mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
1531 $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes-64.stp
1532 %endif
1533 %endif
1534 %endif
1536 %if %{with_mingw32} || %{with_mingw64}
1537 %mingw_ninja_install
1538 %endif
1540 %if %{with_mingw32}
1541 rm -rf $RPM_BUILD_ROOT%{mingw32_sysconfdir}/libvirt/nwfilter
1542 rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/doc/*
1543 rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/*
1544 rm -rf $RPM_BUILD_ROOT%{mingw32_libexecdir}/libvirt_iohelper.exe
1545 rm -rf $RPM_BUILD_ROOT%{mingw32_libexecdir}/libvirt-guests.sh
1546 %endif
1548 %if %{with_mingw64}
1549 rm -rf $RPM_BUILD_ROOT%{mingw64_sysconfdir}/libvirt/nwfilter
1550 rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/doc/*
1551 rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc/*
1552 rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt_iohelper.exe
1553 rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
1554 %endif
1556 %if %{with_mingw32} || %{with_mingw64}
1557 %mingw_debug_install_post
1559 %mingw_find_lang %{name}
1561 %endif
1563 %check
1565 %if %{with_native}
1566 # Building on slow archs, like emulated s390x in Fedora copr, requires
1567 # raising the test timeout
1568 VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check --timeout-multiplier 10
1569 %endif
1571 %define libvirt_rpmstatedir %{_localstatedir}/lib/rpm-state/libvirt
1573 # Mark units such that presets will later be applied to them. Meant
1574 # to be called during %pre. Units that already exist on the system
1575 # will not be marked, with the assumption that presets have already
1576 # been applied at some point in the past. This makes it safe to call
1577 # this macro for all units each time %pre runs.
1578 %define libvirt_systemd_schedule_preset() \
1579 mkdir -p %{libvirt_rpmstatedir} || : \
1580 for unit in %{?*}; do \
1581 if ! test -e %{_unitdir}/$unit; then \
1582 touch %{libvirt_rpmstatedir}/preset-$unit || : \
1583 fi \
1584 done \
1585 %{nil}
1587 # Apply presets for units that have previously been marked. Meant to
1588 # be called during %posttrans. Note that foo.service must be passed
1589 # as the first argument, before all the various foo*.socket
1590 # associated with it, for things to work correctly. This is necessary
1591 # because Also=foo.socket is usually present in foo.service's
1592 # [Install] section, and we want that configuration to take
1593 # precedence over foo.socket's own presets.
1594 %define libvirt_systemd_perform_preset() \
1595 %{?7:%{error:Too many arguments}} \
1596 for unit in %{?2} %{?3} %{?4} %{?5} %{?6} %1; do \
1597 if test -e %{libvirt_rpmstatedir}/preset-$unit; then \
1598 /usr/bin/systemctl --no-reload preset $unit || : \
1599 fi \
1600 rm -f %{libvirt_rpmstatedir}/preset-$unit \
1601 done \
1602 rmdir %{libvirt_rpmstatedir} 2>/dev/null || : \
1603 %{nil}
1605 # Mark a single unit for restart. Meant to be called during %pre.
1606 %define libvirt_systemd_schedule_restart() \
1607 mkdir -p %{libvirt_rpmstatedir} || : \
1608 touch %{libvirt_rpmstatedir}/restart-%1 || : \
1609 %{nil}
1611 # Restart a unit that was previously marked. Meant to be called
1612 # during %posttrans. If systemd is not running, no action will be
1613 # performed.
1614 %define libvirt_systemd_perform_restart() \
1615 if test -d /run/systemd/system && \
1616 test -e %{libvirt_rpmstatedir}/restart-%1; then \
1617 /usr/bin/systemctl try-restart %1 >/dev/null 2>&1 || : \
1618 fi \
1619 rm -f %{libvirt_rpmstatedir}/restart-%1 \
1620 rmdir %{libvirt_rpmstatedir} 2>/dev/null || : \
1621 %{nil}
1623 # Mark a single unit for reload. Meant to be called during %pre.
1624 %define libvirt_systemd_schedule_reload() \
1625 mkdir -p %{libvirt_rpmstatedir} || : \
1626 touch %{libvirt_rpmstatedir}/reload-%1 || : \
1627 %{nil}
1629 # Reload a unit that was previously marked. Meant to be called during
1630 # %posttrans. If systemd is not running, no action will be performed.
1631 %define libvirt_systemd_perform_reload() \
1632 if test -d /run/systemd/system && \
1633 test -e %{libvirt_rpmstatedir}/reload-%1; then \
1634 /usr/bin/systemctl try-reload-or-restart %1 >/dev/null 2>&1 || : \
1635 fi \
1636 rm -f %{libvirt_rpmstatedir}/reload-%1 \
1637 rmdir %{libvirt_rpmstatedir} 2>/dev/null || : \
1638 %{nil}
1640 # Disable a single unit, optionally stopping it if systemd is
1641 # running. Meant to be called during %preun.
1642 %define libvirt_systemd_disable() \
1643 if test -d /run/systemd/system; then \
1644 /usr/bin/systemctl --no-reload disable --now %{?*} || : \
1645 else \
1646 /usr/bin/systemctl --no-reload disable %{?*} || : \
1647 fi \
1648 %{nil}
1650 # %pre implementation for services that should be restarted on
1651 # upgrade. Note that foo.service must be passed as the first
1652 # argument, before all the various foo*.socket associated with it.
1653 %define libvirt_systemd_restart_pre() \
1654 %libvirt_systemd_schedule_preset %{?*} \
1655 %libvirt_systemd_schedule_restart %1 \
1656 %{nil}
1658 # %pre implementation for services that should be reloaded on
1659 # upgrade. Note that foo.service must be passed as the first
1660 # argument, before all the various foo*.socket associated with it.
1661 %define libvirt_systemd_reload_pre() \
1662 %libvirt_systemd_schedule_preset %{?*} \
1663 %libvirt_systemd_schedule_reload %1 \
1664 %{nil}
1666 # %pre implementation for services that should be neither restarted
1667 # nor reloaded on upgrade.
1668 %define libvirt_systemd_noaction_pre() \
1669 %libvirt_systemd_schedule_preset %{?*} \
1670 %{nil}
1672 # %posttrans implementation for all services. We can use a single
1673 # macro to cover all scenarios, because each operation will only be
1674 # performed if it had previously been scheduled. Note that
1675 # foo.service must be passed as the first argument, before all the
1676 # various foo*.socket associated with it.
1677 %define libvirt_systemd_posttrans() \
1678 %libvirt_systemd_perform_preset %{?*} \
1679 %libvirt_systemd_perform_reload %1 \
1680 %libvirt_systemd_perform_restart %1 \
1681 %{nil}
1683 # %preun implementation for all services.
1684 %define libvirt_systemd_preun() \
1685 if [ $1 -lt 1 ]; then \
1686 %libvirt_systemd_disable %{?*} \
1687 fi \
1688 %{nil}
1690 # For daemons with only UNIX sockets
1692 %define libvirt_systemd_unix_pre() %libvirt_systemd_restart_pre %1.service %1.socket %1-ro.socket %1-admin.socket
1693 %define libvirt_systemd_unix_posttrans() %libvirt_systemd_posttrans %1.service %1.socket %1-ro.socket %1-admin.socket
1694 %define libvirt_systemd_unix_preun() %libvirt_systemd_preun %1.service %1.socket %1-ro.socket %1-admin.socket
1696 # For daemons with UNIX and INET sockets
1697 %define libvirt_systemd_inet_pre() %libvirt_systemd_restart_pre %1.service %1.socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket
1698 %define libvirt_systemd_inet_posttrans() %libvirt_systemd_posttrans %1.service %1.socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket
1699 %define libvirt_systemd_inet_preun() %libvirt_systemd_preun %1.service %1.socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket
1701 # For daemons with only UNIX sockets and no unprivileged read-only access
1702 %define libvirt_systemd_privileged_pre() %libvirt_systemd_reload_pre %1.service %1.socket %1-admin.socket
1703 %define libvirt_systemd_privileged_posttrans() %libvirt_systemd_posttrans %1.service %1.socket %1-admin.socket
1704 %define libvirt_systemd_privileged_preun() %libvirt_systemd_preun %1.service %1.socket %1-admin.socket
1706 # For one-shot daemons that have no associated sockets and should never be restarted
1707 %define libvirt_systemd_oneshot_pre() %libvirt_systemd_noaction_pre %1.service
1708 %define libvirt_systemd_oneshot_posttrans() %libvirt_systemd_posttrans %1.service
1709 %define libvirt_systemd_oneshot_preun() %libvirt_systemd_preun %1.service
1711 # For packages that install configuration for other daemons
1712 %define libvirt_systemd_config_pre() %libvirt_systemd_schedule_restart %1.service
1713 %define libvirt_systemd_config_posttrans() %libvirt_systemd_perform_restart %1.service
1715 %if %{with_native}
1716 %pre daemon
1717 %libvirt_sysconfig_pre libvirtd
1718 %libvirt_systemd_inet_pre libvirtd
1720 %posttrans daemon
1721 %libvirt_sysconfig_posttrans libvirtd
1722 %libvirt_systemd_inet_posttrans libvirtd
1724 %preun daemon
1725 %libvirt_systemd_inet_preun libvirtd
1727 %pre daemon-common
1728 %libvirt_sysconfig_pre libvirt-guests
1729 %libvirt_systemd_oneshot_pre libvirt-guests
1730 # 'libvirt' group is just to allow password-less polkit access to libvirt
1731 # daemons. The uid number is irrelevant, so we use dynamic allocation.
1732 getent group libvirt >/dev/null || groupadd -r libvirt
1733 exit 0
1735 %posttrans daemon-common
1736 %libvirt_sysconfig_posttrans libvirt-guests
1737 %libvirt_systemd_oneshot_posttrans libvirt-guests
1739 %preun daemon-common
1740 %libvirt_systemd_oneshot_preun libvirt-guests
1742 %pre daemon-lock
1743 %libvirt_sysconfig_pre virtlockd
1744 %libvirt_systemd_privileged_pre virtlockd
1746 %posttrans daemon-lock
1747 %libvirt_sysconfig_posttrans virtlockd
1748 %libvirt_systemd_privileged_posttrans virtlockd
1750 %preun daemon-lock
1751 %libvirt_systemd_privileged_preun virtlockd
1753 %pre daemon-log
1754 %libvirt_sysconfig_pre virtlogd
1755 %libvirt_systemd_privileged_pre virtlogd
1757 %posttrans daemon-log
1758 %libvirt_sysconfig_posttrans virtlogd
1759 %libvirt_systemd_privileged_posttrans virtlogd
1761 %preun daemon-log
1762 %libvirt_systemd_privileged_preun virtlogd
1764 %pre daemon-proxy
1765 %libvirt_sysconfig_pre virtproxyd
1766 %libvirt_systemd_inet_pre virtproxyd
1768 %posttrans daemon-proxy
1769 %libvirt_sysconfig_posttrans virtproxyd
1770 %libvirt_systemd_inet_posttrans virtproxyd
1772 %preun daemon-proxy
1773 %libvirt_systemd_inet_preun virtproxyd
1775 %pre daemon-driver-network
1776 %libvirt_sysconfig_pre virtnetworkd
1777 %libvirt_systemd_unix_pre virtnetworkd
1779 %post daemon-driver-network
1780 %if %{with_firewalld_zone}
1781 %firewalld_reload
1782 %endif
1784 %posttrans daemon-driver-network
1785 %libvirt_sysconfig_posttrans virtnetworkd
1786 %libvirt_systemd_unix_posttrans virtnetworkd
1788 %preun daemon-driver-network
1789 %libvirt_systemd_unix_preun virtnetworkd
1791 %postun daemon-driver-network
1792 %if %{with_firewalld_zone}
1793 %firewalld_reload
1794 %endif
1796 %pre daemon-driver-nwfilter
1797 %libvirt_sysconfig_pre virtnwfilterd
1798 %libvirt_systemd_unix_pre virtnwfilterd
1800 %posttrans daemon-driver-nwfilter
1801 %libvirt_sysconfig_posttrans virtnwfilterd
1802 %libvirt_systemd_unix_posttrans virtnwfilterd
1804 %preun daemon-driver-nwfilter
1805 %libvirt_systemd_unix_preun virtnwfilterd
1807 %pre daemon-driver-nodedev
1808 %libvirt_sysconfig_pre virtnodedevd
1809 %libvirt_systemd_unix_pre virtnodedevd
1811 %posttrans daemon-driver-nodedev
1812 %libvirt_sysconfig_posttrans virtnodedevd
1813 %libvirt_systemd_unix_posttrans virtnodedevd
1815 %preun daemon-driver-nodedev
1816 %libvirt_systemd_unix_preun virtnodedevd
1818 %pre daemon-driver-interface
1819 %libvirt_sysconfig_pre virtinterfaced
1820 %libvirt_systemd_unix_pre virtinterfaced
1822 %posttrans daemon-driver-interface
1823 %libvirt_sysconfig_posttrans virtinterfaced
1824 %libvirt_systemd_unix_posttrans virtinterfaced
1826 %preun daemon-driver-interface
1827 %libvirt_systemd_unix_preun virtinterfaced
1829 %pre daemon-driver-secret
1830 %libvirt_sysconfig_pre virtsecretd
1831 %libvirt_systemd_unix_pre virtsecretd
1833 %posttrans daemon-driver-secret
1834 %libvirt_sysconfig_posttrans virtsecretd
1835 %libvirt_systemd_unix_posttrans virtsecretd
1837 %preun daemon-driver-secret
1838 %libvirt_systemd_unix_preun virtsecretd
1840 %pre daemon-driver-storage-core
1841 %libvirt_sysconfig_pre virtstoraged
1842 %libvirt_systemd_unix_pre virtstoraged
1844 %posttrans daemon-driver-storage-core
1845 %libvirt_sysconfig_posttrans virtstoraged
1846 %libvirt_systemd_unix_posttrans virtstoraged
1848 %preun daemon-driver-storage-core
1849 %libvirt_systemd_unix_preun virtstoraged
1851 %if %{with_qemu}
1852 %pre daemon-driver-qemu
1853 %libvirt_sysconfig_pre virtqemud
1854 %libvirt_systemd_unix_pre virtqemud
1856 # We want soft static allocation of well-known ids, as disk images
1857 # are commonly shared across NFS mounts by id rather than name.
1858 # See https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/
1859 # We can not use the sysusers_create_compat macro here as we want to keep the
1860 # specfile standalone and not relying on additionnal files.
1861 getent group 'kvm' >/dev/null || groupadd -f -g '36' -r 'kvm' || :
1862 getent group 'qemu' >/dev/null || groupadd -f -g '107' -r 'qemu' || :
1863 if ! getent passwd 'qemu' >/dev/null; then
1864 if ! getent passwd '107' >/dev/null; then
1865 useradd -r -u '107' -g 'qemu' -G 'kvm' -d '/' -s '/sbin/nologin' -c 'qemu user' 'qemu' || :
1866 else
1867 useradd -r -g 'qemu' -G 'kvm' -d '/' -s '/sbin/nologin' -c 'qemu user' 'qemu' || :
1870 exit 0
1872 %posttrans daemon-driver-qemu
1873 %libvirt_sysconfig_posttrans virtqemud
1874 %libvirt_systemd_unix_posttrans virtqemud
1876 %preun daemon-driver-qemu
1877 %libvirt_systemd_unix_preun virtqemud
1878 %endif
1880 %if %{with_lxc}
1881 %pre daemon-driver-lxc
1882 %libvirt_sysconfig_pre virtlxcd
1883 %libvirt_systemd_unix_pre virtlxcd
1885 %posttrans daemon-driver-lxc
1886 %libvirt_sysconfig_posttrans virtlxcd
1887 %libvirt_systemd_unix_posttrans virtlxcd
1889 %preun daemon-driver-lxc
1890 %libvirt_systemd_unix_preun virtlxcd
1891 %endif
1893 %if %{with_vbox}
1894 %pre daemon-driver-vbox
1895 %libvirt_sysconfig_pre virtvboxd
1896 %libvirt_systemd_unix_pre virtvboxd
1898 %posttrans daemon-driver-vbox
1899 %libvirt_sysconfig_posttrans virtvboxd
1900 %libvirt_systemd_unix_posttrans virtvboxd
1902 %preun daemon-driver-vbox
1903 %libvirt_systemd_unix_preun virtvboxd
1904 %endif
1906 %if %{with_libxl}
1907 %pre daemon-driver-libxl
1908 %libvirt_sysconfig_pre virtxend
1909 %libvirt_systemd_unix_pre virtxend
1911 %posttrans daemon-driver-libxl
1912 %libvirt_sysconfig_posttrans virtxend
1913 %libvirt_systemd_unix_posttrans virtxend
1915 %preun daemon-driver-libxl
1916 %libvirt_systemd_unix_preun virtxend
1917 %endif
1919 %pre daemon-config-network
1920 %libvirt_systemd_config_pre libvirtd
1921 %libvirt_systemd_config_pre virtnetworkd
1923 %post daemon-config-network
1924 if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then
1925 # see if the network used by default network creates a conflict,
1926 # and try to resolve it
1927 # NB: 192.168.122.0/24 is used in the default.xml template file;
1928 # do not modify any of those values here without also modifying
1929 # them in the template.
1930 orig_sub=122
1931 sub=${orig_sub}
1932 nl='
1934 routes="${nl}$(ip route show | cut -d' ' -f1)${nl}"
1935 case ${routes} in
1936 *"${nl}192.168.${orig_sub}.0/24${nl}"*)
1937 # there was a match, so we need to look for an unused subnet
1938 for new_sub in $(seq 124 254); do
1939 case ${routes} in
1940 *"${nl}192.168.${new_sub}.0/24${nl}"*)
1943 sub=$new_sub
1944 break;
1946 esac
1947 done
1951 esac
1953 sed -e "s/${orig_sub}/${sub}/g" \
1954 < %{_datadir}/libvirt/networks/default.xml \
1955 > %{_sysconfdir}/libvirt/qemu/networks/default.xml
1956 ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
1957 # libvirt saves this file with mode 0600
1958 chmod 0600 %{_sysconfdir}/libvirt/qemu/networks/default.xml
1961 %posttrans daemon-config-network
1962 %libvirt_systemd_config_posttrans libvirtd
1963 %libvirt_systemd_config_posttrans virtnetworkd
1965 %pre daemon-config-nwfilter
1966 %libvirt_systemd_config_pre libvirtd
1967 %libvirt_systemd_config_pre virtnwfilterd
1969 %post daemon-config-nwfilter
1970 for datadir_file in %{_datadir}/libvirt/nwfilter/*.xml; do
1971 sysconfdir_file=%{_sysconfdir}/libvirt/nwfilter/$(basename "$datadir_file")
1972 if [ ! -f "$sysconfdir_file" ]; then
1973 # libvirt saves these files with mode 600
1974 install -m 0600 "$datadir_file" "$sysconfdir_file"
1976 done
1978 %posttrans daemon-config-nwfilter
1979 %libvirt_systemd_config_posttrans libvirtd
1980 %libvirt_systemd_config_posttrans virtnwfilterd
1982 %if %{with_lxc}
1983 %pre login-shell
1984 getent group virtlogin >/dev/null || groupadd -r virtlogin
1985 exit 0
1986 %endif
1987 %endif
1989 %if %{with_native}
1990 %files
1992 %files docs
1993 %doc AUTHORS.rst NEWS.rst README.rst
1994 %doc libvirt-docs/*
1996 %files daemon
1997 %{_unitdir}/libvirtd.service
1998 %{_unitdir}/libvirtd.socket
1999 %{_unitdir}/libvirtd-ro.socket
2000 %{_unitdir}/libvirtd-admin.socket
2001 %{_unitdir}/libvirtd-tcp.socket
2002 %{_unitdir}/libvirtd-tls.socket
2003 %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
2004 %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
2005 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
2006 %{_datadir}/augeas/lenses/libvirtd.aug
2007 %{_datadir}/augeas/lenses/tests/test_libvirtd.aug
2008 %attr(0755, root, root) %{_sbindir}/libvirtd
2009 %{_mandir}/man8/libvirtd.8*
2011 %files daemon-common
2012 %{_unitdir}/virt-guest-shutdown.target
2013 %{_unitdir}/libvirt-guests.service
2014 %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
2015 %dir %{_datadir}/libvirt/
2016 %ghost %dir %{_rundir}/libvirt/
2017 %ghost %dir %{_rundir}/libvirt/common/
2018 %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/
2019 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
2020 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/
2021 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
2022 %dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/
2023 %dir %attr(0755, root, root) %{_libdir}/libvirt/
2024 %dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/
2025 %dir %attr(0755, root, root) %{_libdir}/libvirt/storage-backend/
2026 %dir %attr(0755, root, root) %{_libdir}/libvirt/storage-file/
2027 %{_datadir}/polkit-1/actions/org.libvirt.unix.policy
2028 %{_datadir}/polkit-1/actions/org.libvirt.api.policy
2029 %{_datadir}/polkit-1/rules.d/50-libvirt.rules
2030 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
2031 %attr(0755, root, root) %{_libexecdir}/libvirt_iohelper
2032 %attr(0755, root, root) %{_bindir}/virt-ssh-helper
2033 %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh
2034 %{_mandir}/man1/virt-admin.1*
2035 %{_mandir}/man1/virt-host-validate.1*
2036 %{_mandir}/man8/virt-ssh-helper.8*
2037 %{_mandir}/man8/libvirt-guests.8*
2038 %{_bindir}/virt-host-validate
2039 %{_bindir}/virt-admin
2040 %{_datadir}/bash-completion/completions/virt-admin
2042 %files daemon-lock
2043 %{_unitdir}/virtlockd.service
2044 %{_unitdir}/virtlockd.socket
2045 %{_unitdir}/virtlockd-admin.socket
2046 %config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
2047 %{_datadir}/augeas/lenses/virtlockd.aug
2048 %{_datadir}/augeas/lenses/tests/test_virtlockd.aug
2049 %{_datadir}/augeas/lenses/libvirt_lockd.aug
2050 %if %{with_qemu}
2051 %{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug
2052 %endif
2053 %attr(0755, root, root) %{_sbindir}/virtlockd
2054 %{_mandir}/man8/virtlockd.8*
2056 %files daemon-plugin-lockd
2057 %dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/
2058 %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so
2060 %files daemon-log
2061 %{_unitdir}/virtlogd.service
2062 %{_unitdir}/virtlogd.socket
2063 %{_unitdir}/virtlogd-admin.socket
2064 %config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
2065 %{_datadir}/augeas/lenses/virtlogd.aug
2066 %{_datadir}/augeas/lenses/tests/test_virtlogd.aug
2067 %attr(0755, root, root) %{_sbindir}/virtlogd
2068 %{_mandir}/man8/virtlogd.8*
2070 %files daemon-proxy
2071 %{_unitdir}/virtproxyd.service
2072 %{_unitdir}/virtproxyd.socket
2073 %{_unitdir}/virtproxyd-ro.socket
2074 %{_unitdir}/virtproxyd-admin.socket
2075 %{_unitdir}/virtproxyd-tcp.socket
2076 %{_unitdir}/virtproxyd-tls.socket
2077 %config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf
2078 %{_datadir}/augeas/lenses/virtproxyd.aug
2079 %{_datadir}/augeas/lenses/tests/test_virtproxyd.aug
2080 %attr(0755, root, root) %{_sbindir}/virtproxyd
2081 %{_mandir}/man8/virtproxyd.8*
2083 %files daemon-config-network
2084 %dir %{_datadir}/libvirt/networks/
2085 %{_datadir}/libvirt/networks/default.xml
2086 %ghost %{_sysconfdir}/libvirt/qemu/networks/default.xml
2087 %ghost %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
2089 %files daemon-config-nwfilter
2090 %dir %{_datadir}/libvirt/nwfilter/
2091 %{_datadir}/libvirt/nwfilter/*.xml
2092 %ghost %{_sysconfdir}/libvirt/nwfilter/*.xml
2094 %files daemon-driver-interface
2095 %config(noreplace) %{_sysconfdir}/libvirt/virtinterfaced.conf
2096 %{_datadir}/augeas/lenses/virtinterfaced.aug
2097 %{_datadir}/augeas/lenses/tests/test_virtinterfaced.aug
2098 %{_unitdir}/virtinterfaced.service
2099 %{_unitdir}/virtinterfaced.socket
2100 %{_unitdir}/virtinterfaced-ro.socket
2101 %{_unitdir}/virtinterfaced-admin.socket
2102 %attr(0755, root, root) %{_sbindir}/virtinterfaced
2103 %ghost %dir %{_rundir}/libvirt/interface/
2104 %{_libdir}/libvirt/connection-driver/libvirt_driver_interface.so
2105 %{_mandir}/man8/virtinterfaced.8*
2107 %files daemon-driver-network
2108 %config(noreplace) %{_sysconfdir}/libvirt/virtnetworkd.conf
2109 %{_datadir}/augeas/lenses/virtnetworkd.aug
2110 %{_datadir}/augeas/lenses/tests/test_virtnetworkd.aug
2111 %{_unitdir}/virtnetworkd.service
2112 %{_unitdir}/virtnetworkd.socket
2113 %{_unitdir}/virtnetworkd-ro.socket
2114 %{_unitdir}/virtnetworkd-admin.socket
2115 %attr(0755, root, root) %{_sbindir}/virtnetworkd
2116 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
2117 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
2118 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
2119 %ghost %dir %{_rundir}/libvirt/network/
2120 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
2121 %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
2122 %attr(0755, root, root) %{_libexecdir}/libvirt_leaseshelper
2123 %{_libdir}/libvirt/connection-driver/libvirt_driver_network.so
2124 %{_mandir}/man8/virtnetworkd.8*
2125 %if %{with_firewalld_zone}
2126 %{_prefix}/lib/firewalld/zones/libvirt.xml
2127 %{_prefix}/lib/firewalld/zones/libvirt-routed.xml
2128 %{_prefix}/lib/firewalld/policies/libvirt-routed-in.xml
2129 %{_prefix}/lib/firewalld/policies/libvirt-routed-out.xml
2130 %{_prefix}/lib/firewalld/policies/libvirt-to-host.xml
2131 %endif
2133 %files daemon-driver-nodedev
2134 %config(noreplace) %{_sysconfdir}/libvirt/virtnodedevd.conf
2135 %{_datadir}/augeas/lenses/virtnodedevd.aug
2136 %{_datadir}/augeas/lenses/tests/test_virtnodedevd.aug
2137 %{_unitdir}/virtnodedevd.service
2138 %{_unitdir}/virtnodedevd.socket
2139 %{_unitdir}/virtnodedevd-ro.socket
2140 %{_unitdir}/virtnodedevd-admin.socket
2141 %attr(0755, root, root) %{_sbindir}/virtnodedevd
2142 %ghost %dir %{_rundir}/libvirt/nodedev/
2143 %{_libdir}/libvirt/connection-driver/libvirt_driver_nodedev.so
2144 %{_mandir}/man8/virtnodedevd.8*
2146 %files daemon-driver-nwfilter
2147 %config(noreplace) %{_sysconfdir}/libvirt/virtnwfilterd.conf
2148 %{_datadir}/augeas/lenses/virtnwfilterd.aug
2149 %{_datadir}/augeas/lenses/tests/test_virtnwfilterd.aug
2150 %{_unitdir}/virtnwfilterd.service
2151 %{_unitdir}/virtnwfilterd.socket
2152 %{_unitdir}/virtnwfilterd-ro.socket
2153 %{_unitdir}/virtnwfilterd-admin.socket
2154 %attr(0755, root, root) %{_sbindir}/virtnwfilterd
2155 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
2156 %ghost %dir %{_rundir}/libvirt/network/
2157 %ghost %dir %{_rundir}/libvirt/nwfilter-binding/
2158 %ghost %dir %{_rundir}/libvirt/nwfilter/
2159 %{_libdir}/libvirt/connection-driver/libvirt_driver_nwfilter.so
2160 %{_mandir}/man8/virtnwfilterd.8*
2162 %files daemon-driver-secret
2163 %config(noreplace) %{_sysconfdir}/libvirt/virtsecretd.conf
2164 %{_datadir}/augeas/lenses/virtsecretd.aug
2165 %{_datadir}/augeas/lenses/tests/test_virtsecretd.aug
2166 %{_unitdir}/virtsecretd.service
2167 %{_unitdir}/virtsecretd.socket
2168 %{_unitdir}/virtsecretd-ro.socket
2169 %{_unitdir}/virtsecretd-admin.socket
2170 %attr(0755, root, root) %{_sbindir}/virtsecretd
2171 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/secrets/
2172 %ghost %dir %{_rundir}/libvirt/secrets/
2173 %{_libdir}/libvirt/connection-driver/libvirt_driver_secret.so
2174 %{_mandir}/man8/virtsecretd.8*
2176 %files daemon-driver-storage
2178 %files daemon-driver-storage-core
2179 %config(noreplace) %{_sysconfdir}/libvirt/virtstoraged.conf
2180 %{_datadir}/augeas/lenses/virtstoraged.aug
2181 %{_datadir}/augeas/lenses/tests/test_virtstoraged.aug
2182 %{_unitdir}/virtstoraged.service
2183 %{_unitdir}/virtstoraged.socket
2184 %{_unitdir}/virtstoraged-ro.socket
2185 %{_unitdir}/virtstoraged-admin.socket
2186 %attr(0755, root, root) %{_sbindir}/virtstoraged
2187 %attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
2188 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/storage/
2189 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/storage/autostart/
2190 %ghost %dir %{_rundir}/libvirt/storage/
2191 %{_libdir}/libvirt/connection-driver/libvirt_driver_storage.so
2192 %{_libdir}/libvirt/storage-backend/libvirt_storage_backend_fs.so
2193 %{_libdir}/libvirt/storage-file/libvirt_storage_file_fs.so
2194 %{_mandir}/man8/virtstoraged.8*
2196 %files daemon-driver-storage-disk
2197 %{_libdir}/libvirt/storage-backend/libvirt_storage_backend_disk.so
2199 %files daemon-driver-storage-logical
2200 %{_libdir}/libvirt/storage-backend/libvirt_storage_backend_logical.so
2202 %files daemon-driver-storage-scsi
2203 %{_libdir}/libvirt/storage-backend/libvirt_storage_backend_scsi.so
2205 %files daemon-driver-storage-iscsi
2206 %{_libdir}/libvirt/storage-backend/libvirt_storage_backend_iscsi.so
2208 %if %{with_storage_iscsi_direct}
2209 %files daemon-driver-storage-iscsi-direct
2210 %{_libdir}/libvirt/storage-backend/libvirt_storage_backend_iscsi-direct.so
2211 %endif
2213 %files daemon-driver-storage-mpath
2214 %{_libdir}/libvirt/storage-backend/libvirt_storage_backend_mpath.so
2216 %if %{with_storage_gluster}
2217 %files daemon-driver-storage-gluster
2218 %{_libdir}/libvirt/storage-backend/libvirt_storage_backend_gluster.so
2219 %{_libdir}/libvirt/storage-file/libvirt_storage_file_gluster.so
2220 %endif
2222 %if %{with_storage_rbd}
2223 %files daemon-driver-storage-rbd
2224 %{_libdir}/libvirt/storage-backend/libvirt_storage_backend_rbd.so
2225 %endif
2227 %if %{with_storage_zfs}
2228 %files daemon-driver-storage-zfs
2229 %{_libdir}/libvirt/storage-backend/libvirt_storage_backend_zfs.so
2230 %endif
2232 %if %{with_qemu}
2233 %files daemon-driver-qemu
2234 %config(noreplace) %{_sysconfdir}/libvirt/virtqemud.conf
2235 %if %{with_userfaultfd_sysctl}
2236 %config(noreplace) %{_prefix}/lib/sysctl.d/60-qemu-postcopy-migration.conf
2237 %endif
2238 %{_datadir}/augeas/lenses/virtqemud.aug
2239 %{_datadir}/augeas/lenses/tests/test_virtqemud.aug
2240 %{_unitdir}/virtqemud.service
2241 %{_unitdir}/virtqemud.socket
2242 %{_unitdir}/virtqemud-ro.socket
2243 %{_unitdir}/virtqemud-admin.socket
2244 %attr(0755, root, root) %{_sbindir}/virtqemud
2245 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
2246 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/autostart/
2247 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
2248 %config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
2249 %config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf
2250 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
2251 %ghost %dir %{_rundir}/libvirt/qemu/
2252 %ghost %dir %{_rundir}/libvirt/qemu/dbus/
2253 %ghost %dir %{_rundir}/libvirt/qemu/passt/
2254 %ghost %dir %{_rundir}/libvirt/qemu/slirp/
2255 %ghost %dir %{_rundir}/libvirt/qemu/swtpm/
2256 %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
2257 %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/checkpoint/
2258 %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/dump/
2259 %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/nvram/
2260 %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/ram/
2261 %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/save/
2262 %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/snapshot/
2263 %dir %attr(0750, root, root) %{_localstatedir}/cache/libvirt/qemu/
2264 %{_datadir}/augeas/lenses/libvirtd_qemu.aug
2265 %{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
2266 %{_libdir}/libvirt/connection-driver/libvirt_driver_qemu.so
2267 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/swtpm/
2268 %dir %attr(0730, tss, tss) %{_localstatedir}/log/swtpm/libvirt/qemu/
2269 %{_bindir}/virt-qemu-run
2270 %{_mandir}/man1/virt-qemu-run.1*
2271 %{_mandir}/man8/virtqemud.8*
2272 %{_sysusersdir}/libvirt-qemu.conf
2273 %endif
2275 %if %{with_lxc}
2276 %files daemon-driver-lxc
2277 %config(noreplace) %{_sysconfdir}/libvirt/virtlxcd.conf
2278 %{_datadir}/augeas/lenses/virtlxcd.aug
2279 %{_datadir}/augeas/lenses/tests/test_virtlxcd.aug
2280 %{_unitdir}/virtlxcd.service
2281 %{_unitdir}/virtlxcd.socket
2282 %{_unitdir}/virtlxcd-ro.socket
2283 %{_unitdir}/virtlxcd-admin.socket
2284 %attr(0755, root, root) %{_sbindir}/virtlxcd
2285 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
2286 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/lxc/
2287 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/lxc/autostart/
2288 %config(noreplace) %{_sysconfdir}/libvirt/lxc.conf
2289 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc
2290 %ghost %dir %{_rundir}/libvirt/lxc/
2291 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/
2292 %{_datadir}/augeas/lenses/libvirtd_lxc.aug
2293 %{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
2294 %attr(0755, root, root) %{_libexecdir}/libvirt_lxc
2295 %{_libdir}/libvirt/connection-driver/libvirt_driver_lxc.so
2296 %{_mandir}/man8/virtlxcd.8*
2297 %endif
2299 %if %{with_libxl}
2300 %files daemon-driver-libxl
2301 %config(noreplace) %{_sysconfdir}/libvirt/virtxend.conf
2302 %{_datadir}/augeas/lenses/virtxend.aug
2303 %{_datadir}/augeas/lenses/tests/test_virtxend.aug
2304 %{_unitdir}/virtxend.service
2305 %{_unitdir}/virtxend.socket
2306 %{_unitdir}/virtxend-ro.socket
2307 %{_unitdir}/virtxend-admin.socket
2308 %attr(0755, root, root) %{_sbindir}/virtxend
2309 %config(noreplace) %{_sysconfdir}/libvirt/libxl.conf
2310 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.libxl
2311 %config(noreplace) %{_sysconfdir}/libvirt/libxl-lockd.conf
2312 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/libxl/
2313 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/libxl/autostart/
2314 %{_datadir}/augeas/lenses/libvirtd_libxl.aug
2315 %{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
2316 %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/
2317 %ghost %dir %{_rundir}/libvirt/libxl/
2318 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
2319 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/channel/
2320 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/channel/target/
2321 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/dump/
2322 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/save/
2323 %{_libdir}/libvirt/connection-driver/libvirt_driver_libxl.so
2324 %{_mandir}/man8/virtxend.8*
2325 %endif
2327 %if %{with_vbox}
2328 %files daemon-driver-vbox
2329 %config(noreplace) %{_sysconfdir}/libvirt/virtvboxd.conf
2330 %{_datadir}/augeas/lenses/virtvboxd.aug
2331 %{_datadir}/augeas/lenses/tests/test_virtvboxd.aug
2332 %{_unitdir}/virtvboxd.service
2333 %{_unitdir}/virtvboxd.socket
2334 %{_unitdir}/virtvboxd-ro.socket
2335 %{_unitdir}/virtvboxd-admin.socket
2336 %attr(0755, root, root) %{_sbindir}/virtvboxd
2337 %{_libdir}/libvirt/connection-driver/libvirt_driver_vbox.so
2338 %{_mandir}/man8/virtvboxd.8*
2339 %endif
2341 %if %{with_qemu_tcg}
2342 %files daemon-qemu
2343 %endif
2345 %if %{with_qemu_kvm}
2346 %files daemon-kvm
2347 %endif
2349 %if %{with_lxc}
2350 %files daemon-lxc
2351 %endif
2353 %if %{with_libxl}
2354 %files daemon-xen
2355 %endif
2357 %if %{with_vbox}
2358 %files daemon-vbox
2359 %endif
2361 %if %{with_sanlock}
2362 %files daemon-plugin-sanlock
2363 %if %{with_qemu}
2364 %config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf
2365 %endif
2366 %if %{with_libxl}
2367 %config(noreplace) %{_sysconfdir}/libvirt/libxl-sanlock.conf
2368 %endif
2369 %dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/
2370 %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so
2371 %{_datadir}/augeas/lenses/libvirt_sanlock.aug
2372 %{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
2373 %dir %attr(0770, root, sanlock) %{_localstatedir}/lib/libvirt/sanlock
2374 %{_sbindir}/virt-sanlock-cleanup
2375 %{_mandir}/man8/virt-sanlock-cleanup.8*
2376 %attr(0755, root, root) %{_libexecdir}/libvirt_sanlock_helper
2377 %endif
2379 %files client
2380 %{_mandir}/man1/virsh.1*
2381 %{_mandir}/man1/virt-xml-validate.1*
2382 %{_mandir}/man1/virt-pki-query-dn.1*
2383 %{_mandir}/man1/virt-pki-validate.1*
2384 %{_mandir}/man7/virkey*.7*
2385 %{_bindir}/virsh
2386 %{_bindir}/virt-xml-validate
2387 %{_bindir}/virt-pki-query-dn
2388 %{_bindir}/virt-pki-validate
2389 %{_datadir}/bash-completion/completions/virsh
2391 %if %{with_qemu}
2392 %files client-qemu
2393 %{_mandir}/man1/virt-qemu-qmp-proxy.1*
2394 %{_mandir}/man1/virt-qemu-sev-validate.1*
2395 %{_bindir}/virt-qemu-qmp-proxy
2396 %{_bindir}/virt-qemu-sev-validate
2397 %endif
2399 %files libs -f %{name}.lang
2400 %license COPYING COPYING.LESSER
2401 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
2402 %config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
2403 %config(noreplace) %{_sysconfdir}/libvirt/libvirt-admin.conf
2404 %{_libdir}/libvirt.so.*
2405 %{_libdir}/libvirt-qemu.so.*
2406 %{_libdir}/libvirt-lxc.so.*
2407 %{_libdir}/libvirt-admin.so.*
2408 %dir %{_datadir}/libvirt/
2409 %dir %{_datadir}/libvirt/schemas/
2410 %{_datadir}/systemtap/tapset/libvirt_probes*.stp
2411 %{_datadir}/systemtap/tapset/libvirt_functions.stp
2412 %if %{with_qemu}
2413 %{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp
2414 %endif
2415 %{_datadir}/libvirt/schemas/*.rng
2416 %{_datadir}/libvirt/cpu_map/*.xml
2417 %{_datadir}/libvirt/test-screenshot.png
2419 %if %{with_wireshark}
2420 %files wireshark
2421 %{wireshark_plugindir}/libvirt.so
2422 %endif
2424 %files nss
2425 %{_libdir}/libnss_libvirt.so.2
2426 %{_libdir}/libnss_libvirt_guest.so.2
2428 %if %{with_lxc}
2429 %files login-shell
2430 %attr(4750, root, virtlogin) %{_bindir}/virt-login-shell
2431 %{_libexecdir}/virt-login-shell-helper
2432 %config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf
2433 %{_mandir}/man1/virt-login-shell.1*
2434 %endif
2436 %files devel
2437 %{_libdir}/libvirt.so
2438 %{_libdir}/libvirt-admin.so
2439 %{_libdir}/libvirt-qemu.so
2440 %{_libdir}/libvirt-lxc.so
2441 %dir %{_includedir}/libvirt
2442 %{_includedir}/libvirt/virterror.h
2443 %{_includedir}/libvirt/libvirt.h
2444 %{_includedir}/libvirt/libvirt-admin.h
2445 %{_includedir}/libvirt/libvirt-common.h
2446 %{_includedir}/libvirt/libvirt-domain.h
2447 %{_includedir}/libvirt/libvirt-domain-checkpoint.h
2448 %{_includedir}/libvirt/libvirt-domain-snapshot.h
2449 %{_includedir}/libvirt/libvirt-event.h
2450 %{_includedir}/libvirt/libvirt-host.h
2451 %{_includedir}/libvirt/libvirt-interface.h
2452 %{_includedir}/libvirt/libvirt-network.h
2453 %{_includedir}/libvirt/libvirt-nodedev.h
2454 %{_includedir}/libvirt/libvirt-nwfilter.h
2455 %{_includedir}/libvirt/libvirt-secret.h
2456 %{_includedir}/libvirt/libvirt-storage.h
2457 %{_includedir}/libvirt/libvirt-stream.h
2458 %{_includedir}/libvirt/libvirt-qemu.h
2459 %{_includedir}/libvirt/libvirt-lxc.h
2460 %{_libdir}/pkgconfig/libvirt.pc
2461 %{_libdir}/pkgconfig/libvirt-admin.pc
2462 %{_libdir}/pkgconfig/libvirt-qemu.pc
2463 %{_libdir}/pkgconfig/libvirt-lxc.pc
2464 %dir %{_datadir}/libvirt/api/
2465 %{_datadir}/libvirt/api/libvirt-api.xml
2466 %{_datadir}/libvirt/api/libvirt-admin-api.xml
2467 %{_datadir}/libvirt/api/libvirt-qemu-api.xml
2468 %{_datadir}/libvirt/api/libvirt-lxc-api.xml
2469 %endif
2471 %if %{with_mingw32}
2472 %files -n mingw32-libvirt -f mingw32-libvirt.lang
2473 %dir %{mingw32_sysconfdir}/libvirt/
2474 %config(noreplace) %{mingw32_sysconfdir}/libvirt/libvirt.conf
2475 %config(noreplace) %{mingw32_sysconfdir}/libvirt/libvirt-admin.conf
2476 %{mingw32_bindir}/libvirt-0.dll
2477 %{mingw32_bindir}/virsh.exe
2478 %{mingw32_bindir}/virt-admin.exe
2479 %{mingw32_bindir}/virt-xml-validate
2480 %{mingw32_bindir}/virt-pki-query-dn.exe
2481 %{mingw32_bindir}/virt-pki-validate
2482 %{mingw32_bindir}/libvirt-lxc-0.dll
2483 %{mingw32_bindir}/libvirt-qemu-0.dll
2484 %{mingw32_bindir}/libvirt-admin-0.dll
2485 %{mingw32_libdir}/libvirt.dll.a
2486 %{mingw32_libdir}/pkgconfig/libvirt.pc
2487 %{mingw32_libdir}/pkgconfig/libvirt-qemu.pc
2488 %{mingw32_libdir}/pkgconfig/libvirt-lxc.pc
2489 %{mingw32_libdir}/pkgconfig/libvirt-admin.pc
2490 %{mingw32_libdir}/libvirt-lxc.dll.a
2491 %{mingw32_libdir}/libvirt-qemu.dll.a
2492 %{mingw32_libdir}/libvirt-admin.dll.a
2493 %dir %{mingw32_datadir}/libvirt/
2494 %dir %{mingw32_datadir}/libvirt/schemas/
2495 %{mingw32_datadir}/libvirt/schemas/*.rng
2496 %dir %{mingw32_datadir}/libvirt/api/
2497 %{mingw32_datadir}/libvirt/api/libvirt-api.xml
2498 %{mingw32_datadir}/libvirt/api/libvirt-lxc-api.xml
2499 %{mingw32_datadir}/libvirt/api/libvirt-qemu-api.xml
2500 %{mingw32_datadir}/libvirt/api/libvirt-admin-api.xml
2501 %{mingw32_datadir}/libvirt/cpu_map/*.xml
2502 %{mingw32_datadir}/libvirt/test-screenshot.png
2503 %dir %{mingw32_includedir}/libvirt
2504 %{mingw32_includedir}/libvirt/libvirt.h
2505 %{mingw32_includedir}/libvirt/libvirt-common.h
2506 %{mingw32_includedir}/libvirt/libvirt-domain.h
2507 %{mingw32_includedir}/libvirt/libvirt-domain-checkpoint.h
2508 %{mingw32_includedir}/libvirt/libvirt-domain-snapshot.h
2509 %{mingw32_includedir}/libvirt/libvirt-event.h
2510 %{mingw32_includedir}/libvirt/libvirt-host.h
2511 %{mingw32_includedir}/libvirt/libvirt-interface.h
2512 %{mingw32_includedir}/libvirt/libvirt-network.h
2513 %{mingw32_includedir}/libvirt/libvirt-nodedev.h
2514 %{mingw32_includedir}/libvirt/libvirt-nwfilter.h
2515 %{mingw32_includedir}/libvirt/libvirt-secret.h
2516 %{mingw32_includedir}/libvirt/libvirt-storage.h
2517 %{mingw32_includedir}/libvirt/libvirt-stream.h
2518 %{mingw32_includedir}/libvirt/virterror.h
2519 %{mingw32_includedir}/libvirt/libvirt-lxc.h
2520 %{mingw32_includedir}/libvirt/libvirt-qemu.h
2521 %{mingw32_includedir}/libvirt/libvirt-admin.h
2522 %{mingw32_mandir}/man1/virsh.1*
2523 %{mingw32_mandir}/man1/virt-admin.1*
2524 %{mingw32_mandir}/man1/virt-xml-validate.1*
2525 %{mingw32_mandir}/man1/virt-pki-query-dn.1*
2526 %{mingw32_mandir}/man1/virt-pki-validate.1*
2527 %{mingw32_mandir}/man7/virkey*.7*
2528 %endif
2530 %if %{with_mingw64}
2531 %files -n mingw64-libvirt -f mingw64-libvirt.lang
2532 %dir %{mingw64_sysconfdir}/libvirt/
2533 %config(noreplace) %{mingw64_sysconfdir}/libvirt/libvirt.conf
2534 %config(noreplace) %{mingw64_sysconfdir}/libvirt/libvirt-admin.conf
2535 %{mingw64_bindir}/libvirt-0.dll
2536 %{mingw64_bindir}/virsh.exe
2537 %{mingw64_bindir}/virt-admin.exe
2538 %{mingw64_bindir}/virt-xml-validate
2539 %{mingw64_bindir}/virt-pki-query-dn.exe
2540 %{mingw64_bindir}/virt-pki-validate
2541 %{mingw64_bindir}/libvirt-lxc-0.dll
2542 %{mingw64_bindir}/libvirt-qemu-0.dll
2543 %{mingw64_bindir}/libvirt-admin-0.dll
2544 %{mingw64_libdir}/libvirt.dll.a
2545 %{mingw64_libdir}/pkgconfig/libvirt.pc
2546 %{mingw64_libdir}/pkgconfig/libvirt-qemu.pc
2547 %{mingw64_libdir}/pkgconfig/libvirt-lxc.pc
2548 %{mingw64_libdir}/pkgconfig/libvirt-admin.pc
2549 %{mingw64_libdir}/libvirt-lxc.dll.a
2550 %{mingw64_libdir}/libvirt-qemu.dll.a
2551 %{mingw64_libdir}/libvirt-admin.dll.a
2552 %dir %{mingw64_datadir}/libvirt/
2553 %dir %{mingw64_datadir}/libvirt/schemas/
2554 %{mingw64_datadir}/libvirt/schemas/*.rng
2555 %dir %{mingw64_datadir}/libvirt/api/
2556 %{mingw64_datadir}/libvirt/api/libvirt-api.xml
2557 %{mingw64_datadir}/libvirt/api/libvirt-lxc-api.xml
2558 %{mingw64_datadir}/libvirt/api/libvirt-qemu-api.xml
2559 %{mingw64_datadir}/libvirt/api/libvirt-admin-api.xml
2560 %{mingw64_datadir}/libvirt/cpu_map/*.xml
2561 %{mingw64_datadir}/libvirt/test-screenshot.png
2562 %dir %{mingw64_includedir}/libvirt
2563 %{mingw64_includedir}/libvirt/libvirt.h
2564 %{mingw64_includedir}/libvirt/libvirt-common.h
2565 %{mingw64_includedir}/libvirt/libvirt-domain.h
2566 %{mingw64_includedir}/libvirt/libvirt-domain-checkpoint.h
2567 %{mingw64_includedir}/libvirt/libvirt-domain-snapshot.h
2568 %{mingw64_includedir}/libvirt/libvirt-event.h
2569 %{mingw64_includedir}/libvirt/libvirt-host.h
2570 %{mingw64_includedir}/libvirt/libvirt-interface.h
2571 %{mingw64_includedir}/libvirt/libvirt-network.h
2572 %{mingw64_includedir}/libvirt/libvirt-nodedev.h
2573 %{mingw64_includedir}/libvirt/libvirt-nwfilter.h
2574 %{mingw64_includedir}/libvirt/libvirt-secret.h
2575 %{mingw64_includedir}/libvirt/libvirt-storage.h
2576 %{mingw64_includedir}/libvirt/libvirt-stream.h
2577 %{mingw64_includedir}/libvirt/virterror.h
2578 %{mingw64_includedir}/libvirt/libvirt-lxc.h
2579 %{mingw64_includedir}/libvirt/libvirt-qemu.h
2580 %{mingw64_includedir}/libvirt/libvirt-admin.h
2581 %{mingw64_mandir}/man1/virsh.1*
2582 %{mingw64_mandir}/man1/virt-admin.1*
2583 %{mingw64_mandir}/man1/virt-xml-validate.1*
2584 %{mingw64_mandir}/man1/virt-pki-query-dn.1*
2585 %{mingw64_mandir}/man1/virt-pki-validate.1*
2586 %{mingw64_mandir}/man7/virkey*.7*
2587 %endif
2589 %changelog