0b8103
# -*- rpm-spec -*-
0b8103
0b8103
# This spec file assumes you are building on a Fedora or RHEL version
0b8103
# that's still supported by the vendor. It may work on other distros
0b8103
# or versions, but no effort will be made to ensure that going forward.
0b8103
%define min_rhel 8
0b8103
%define min_fedora 33
0b8103
0b8103
%define arches_qemu_kvm         %{ix86} x86_64 %{power64} %{arm} aarch64 s390x
0b8103
%if 0%{?rhel}
0b8103
    %if 0%{?rhel} > 8
0b8103
        %define arches_qemu_kvm     x86_64 aarch64 s390x
0b8103
    %else
0b8103
        %define arches_qemu_kvm     x86_64 %{power64} aarch64 s390x
0b8103
    %endif
0b8103
%endif
0b8103
0b8103
%define arches_64bit            x86_64 %{power64} aarch64 s390x riscv64
0b8103
%define arches_x86              %{ix86} x86_64
0b8103
0b8103
%define arches_systemtap_64bit  %{arches_64bit}
0b8103
%define arches_dmidecode        %{arches_x86}
0b8103
%define arches_xen              %{arches_x86} aarch64
0b8103
%define arches_vbox             %{arches_x86}
0b8103
%define arches_ceph             %{arches_64bit}
0b8103
%define arches_zfs              %{arches_x86} %{power64} %{arm}
d222d3
%define arches_numactl          %{arches_x86} %{power64} aarch64 s390x
0b8103
%define arches_numad            %{arches_x86} %{power64} aarch64
0b8103
0b8103
# The hypervisor drivers that run in libvirtd
0b8103
%define with_qemu          0%{!?_without_qemu:1}
0b8103
%define with_lxc           0%{!?_without_lxc:1}
0b8103
%define with_libxl         0%{!?_without_libxl:1}
0b8103
%define with_vbox          0%{!?_without_vbox:1}
0b8103
0b8103
%ifarch %{arches_qemu_kvm}
0b8103
    %define with_qemu_kvm      %{with_qemu}
0b8103
%else
0b8103
    %define with_qemu_kvm      0
0b8103
%endif
0b8103
0b8103
%define with_qemu_tcg      %{with_qemu}
0b8103
0b8103
# RHEL disables TCG on all architectures
0b8103
%if 0%{?rhel}
0b8103
    %define with_qemu_tcg 0
0b8103
%endif
0b8103
0b8103
%if ! %{with_qemu_tcg} && ! %{with_qemu_kvm}
0b8103
    %define with_qemu 0
0b8103
%endif
0b8103
0b8103
# Then the hypervisor drivers that run outside libvirtd, in libvirt.so
0b8103
%define with_openvz        0%{!?_without_openvz:1}
0b8103
%define with_vmware        0%{!?_without_vmware:1}
0b8103
%define with_esx           0%{!?_without_esx:1}
0b8103
%define with_hyperv        0%{!?_without_hyperv:1}
0b8103
0b8103
# Then the secondary host drivers, which run inside libvirtd
0b8103
%define with_storage_rbd      0%{!?_without_storage_rbd:1}
0b8103
%if 0%{?fedora}
0b8103
    %define with_storage_sheepdog 0%{!?_without_storage_sheepdog:1}
0b8103
%else
0b8103
    %define with_storage_sheepdog 0
0b8103
%endif
0b8103
0b8103
%define with_storage_gluster 0%{!?_without_storage_gluster:1}
0b8103
%if 0%{?rhel}
0b8103
    # Glusterfs has been dropped in RHEL-9, and before that
0b8103
    # was only enabled on arches where KVM exists
0b8103
    %if 0%{?rhel} > 8
0b8103
        %define with_storage_gluster 0
0b8103
    %else
0b8103
        %ifnarch %{arches_qemu_kvm}
0b8103
            %define with_storage_gluster 0
0b8103
        %endif
0b8103
    %endif
0b8103
%endif
0b8103
0b8103
# Fedora has zfs-fuse
0b8103
%if 0%{?fedora}
0b8103
    %define with_storage_zfs      0%{!?_without_storage_zfs:1}
0b8103
%else
0b8103
    %define with_storage_zfs      0
0b8103
%endif
0b8103
0b8103
%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
0b8103
# libiscsi has been dropped in RHEL-9
0b8103
%if 0%{?rhel} > 8
0b8103
    %define with_storage_iscsi_direct 0
0b8103
%endif
0b8103
0b8103
# Other optional features
0b8103
%define with_numactl          0%{!?_without_numactl:1}
0b8103
0b8103
# A few optional bits off by default, we enable later
0b8103
%define with_fuse             0
0b8103
%define with_sanlock          0
0b8103
%define with_numad            0
0b8103
%define with_firewalld_zone   0
0b8103
%define with_netcf            0
0b8103
%define with_libssh2          0
0b8103
%define with_wireshark        0
0b8103
%define with_libssh           0
0b8103
%define with_dmidecode        0
0b8103
0b8103
# Finally set the OS / architecture specific special cases
0b8103
0b8103
# Architecture-dependent features
0b8103
%ifnarch %{arches_xen}
0b8103
    %define with_libxl 0
0b8103
%endif
0b8103
%ifnarch %{arches_vbox}
0b8103
    %define with_vbox 0
0b8103
%endif
0b8103
%ifnarch %{arches_numactl}
0b8103
    %define with_numactl 0
0b8103
%endif
0b8103
%ifnarch %{arches_zfs}
0b8103
    %define with_storage_zfs 0
0b8103
%endif
0b8103
%ifnarch %{arches_ceph}
0b8103
    %define with_storage_rbd 0
0b8103
%endif
0b8103
0b8103
# RHEL doesn't ship many hypervisor drivers
0b8103
%if 0%{?rhel}
0b8103
    %define with_openvz 0
0b8103
    %define with_vbox 0
0b8103
    %define with_vmware 0
0b8103
    %define with_libxl 0
0b8103
    %define with_hyperv 0
0b8103
    %define with_vz 0
0b8103
    %define with_lxc 0
0b8103
%endif
0b8103
0b8103
%define with_firewalld_zone 0%{!?_without_firewalld_zone:1}
0b8103
0b8103
%if (0%{?fedora} && 0%{?fedora} < 34) || (0%{?rhel} && 0%{?rhel} < 9)
0b8103
    %define with_netcf 0%{!?_without_netcf:1}
0b8103
%endif
0b8103
0b8103
0b8103
# fuse is used to provide virtualized /proc for LXC
0b8103
%if %{with_lxc}
0b8103
    %define with_fuse      0%{!?_without_fuse:1}
0b8103
%endif
0b8103
0b8103
# Enable sanlock library for lock management with QEMU
0b8103
# Sanlock is available only on arches where kvm is available for RHEL
0b8103
%if 0%{?fedora}
0b8103
    %define with_sanlock 0%{!?_without_sanlock:1}
0b8103
%endif
0b8103
%if 0%{?rhel}
0b8103
    %ifarch %{arches_qemu_kvm}
0b8103
        %define with_sanlock 0%{!?_without_sanlock:1}
0b8103
    %endif
0b8103
%endif
0b8103
0b8103
# Enable libssh2 transport for new enough distros
0b8103
%if 0%{?fedora}
0b8103
    %define with_libssh2 0%{!?_without_libssh2:1}
0b8103
%endif
0b8103
0b8103
# Enable wireshark plugins for all distros
0b8103
%define with_wireshark 0%{!?_without_wireshark:1}
0b8103
%define wireshark_plugindir %(pkg-config --variable plugindir wireshark)/epan
0b8103
0b8103
# Enable libssh transport for all distros
0b8103
%define with_libssh 0%{!?_without_libssh:1}
0b8103
0b8103
%if %{with_qemu} || %{with_lxc}
0b8103
# numad is used to manage the CPU and memory placement dynamically,
0b8103
# it's not available on many non-x86 architectures.
0b8103
    %ifarch %{arches_numad}
0b8103
        %define with_numad    0%{!?_without_numad:1}
0b8103
    %endif
0b8103
%endif
0b8103
0b8103
%ifarch %{arches_dmidecode}
0b8103
    %define with_dmidecode 0%{!?_without_dmidecode:1}
0b8103
%endif
0b8103
d222d3
%define with_modular_daemons 0
d222d3
%if 0%{?fedora} >= 35 || 0%{?rhel} >= 9
d222d3
    %define with_modular_daemons 1
d222d3
%endif
d222d3
0b8103
# Force QEMU to run as non-root
0b8103
%define qemu_user  qemu
0b8103
%define qemu_group  qemu
0b8103
18dc33
# Locations for QEMU data
18dc33
%define qemu_moddir %{_libdir}/qemu
18dc33
%define qemu_datadir %{_datadir}/qemu
18dc33
0b8103
0b8103
# RHEL releases provide stable tool chains and so it is safe to turn
0b8103
# compiler warning into errors without being worried about frequent
0b8103
# changes in reported warnings
0b8103
%if 0%{?rhel}
0b8103
    %define enable_werror -Dwerror=true
0b8103
%else
0b8103
    %define enable_werror -Dwerror=false -Dgit_werror=disabled
0b8103
%endif
0b8103
0b8103
%define tls_priority "@LIBVIRT,SYSTEM"
0b8103
954c63
# libvirt 8.1.0 stops distributing any sysconfig files.
954c63
# If the user has customized their sysconfig file,
954c63
# the RPM upgrade path will rename it to .rpmsave
954c63
# because the file is no longer managed by RPM.
954c63
# To prevent a regression we rename it back after the
954c63
# transaction to preserve the user's modifications
954c63
%define libvirt_sysconfig_pre() \
954c63
    for sc in %{?*} ; do \
954c63
        test -f "%{_sysconfdir}/sysconfig/${sc}.rpmsave" || continue ; \
954c63
        mv -v "%{_sysconfdir}/sysconfig/${sc}.rpmsave" "%{_sysconfdir}/sysconfig/${sc}.rpmsave.old" ; \
954c63
    done \
954c63
    %{nil}
954c63
%define libvirt_sysconfig_posttrans() \
954c63
    for sc in %{?*} ; do \
954c63
        test -f "%{_sysconfdir}/sysconfig/${sc}.rpmsave" || continue ; \
954c63
        mv -v "%{_sysconfdir}/sysconfig/${sc}.rpmsave" "%{_sysconfdir}/sysconfig/${sc}" ; \
954c63
    done \
954c63
    %{nil}
0b8103
0b8103
Summary: Library providing a simple virtualization API
0b8103
Name: libvirt
954c63
Version: 8.0.0
954c63
Release: 4%{?dist}%{?extra_release}
0b8103
License: LGPLv2+
0b8103
URL: https://libvirt.org/
0b8103
0b8103
%if %(echo %{version} | grep -q "\.0$"; echo $?) == 1
0b8103
    %define mainturl stable_updates/
0b8103
%endif
0b8103
Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
0b8103
Source1: symlinks
0b8103
0b8103
Patch1: libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch
954c63
Patch2: libvirt-build-Only-install-libvirt-guests-when-building-libvirtd.patch
954c63
Patch3: libvirt-docs-Add-man-page-for-libvirt-guests.patch
954c63
Patch4: libvirt-remove-sysconfig-files.patch
954c63
Patch5: libvirt-qemu-fix-inactive-snapshot-revert.patch
954c63
Patch6: libvirt-Revert-report-error-when-virProcessGetStatInfo-is-unable-to-parse-data.patch
954c63
Patch7: libvirt-qemuDomainSetupDisk-Initialize-targetPaths.patch
954c63
Patch8: libvirt-qemu_command-Generate-memory-only-after-controllers.patch
954c63
Patch9: libvirt-qemu-Validate-domain-definition-even-on-migration.patch
0b8103
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-daemon-config-network = %{version}-%{release}
0b8103
Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
0b8103
%if %{with_libxl}
0b8103
Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
0b8103
%endif
0b8103
%if %{with_lxc}
0b8103
Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
0b8103
%endif
0b8103
%if %{with_qemu}
0b8103
Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
0b8103
%endif
0b8103
# We had UML driver, but we've removed it.
0b8103
Obsoletes: libvirt-daemon-driver-uml <= 5.0.0
0b8103
Obsoletes: libvirt-daemon-uml <= 5.0.0
0b8103
%if %{with_vbox}
0b8103
Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
0b8103
%endif
0b8103
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
0b8103
0b8103
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-network = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
0b8103
Requires: libvirt-client = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
0b8103
# All build-time requirements. Run-time requirements are
0b8103
# listed against each sub-RPM
0b8103
BuildRequires: python3-docutils
0b8103
BuildRequires: gcc
0b8103
BuildRequires: meson >= 0.54.0
0b8103
BuildRequires: ninja-build
0b8103
BuildRequires: git
0b8103
BuildRequires: perl-interpreter
0b8103
BuildRequires: python3
0b8103
%if %{with_libxl}
0b8103
BuildRequires: xen-devel
0b8103
%endif
0b8103
BuildRequires: glib2-devel >= 2.56
0b8103
BuildRequires: libxml2-devel
0b8103
BuildRequires: libxslt
0b8103
BuildRequires: readline-devel
0b8103
BuildRequires: bash-completion >= 2.0
0b8103
BuildRequires: gettext
0b8103
BuildRequires: libtasn1-devel
0b8103
BuildRequires: gnutls-devel
0b8103
BuildRequires: libattr-devel
0b8103
# For pool-build probing for existing pools
0b8103
BuildRequires: libblkid-devel >= 2.17
0b8103
# for augparse, optionally used in testing
0b8103
BuildRequires: augeas
0b8103
BuildRequires: systemd-devel >= 185
0b8103
BuildRequires: libpciaccess-devel >= 0.10.9
0b8103
BuildRequires: yajl-devel
0b8103
%if %{with_sanlock}
0b8103
BuildRequires: sanlock-devel >= 2.4
0b8103
%endif
0b8103
BuildRequires: libpcap-devel >= 1.5.0
0b8103
BuildRequires: libnl3-devel
0b8103
BuildRequires: libselinux-devel
0b8103
BuildRequires: dnsmasq >= 2.41
0b8103
BuildRequires: iptables
0b8103
BuildRequires: ebtables
0b8103
BuildRequires: module-init-tools
0b8103
BuildRequires: cyrus-sasl-devel
0b8103
BuildRequires: polkit >= 0.112
0b8103
# For mount/umount in FS driver
0b8103
BuildRequires: util-linux
0b8103
%if %{with_qemu}
0b8103
# For managing ACLs
0b8103
BuildRequires: libacl-devel
0b8103
# From QEMU RPMs
0b8103
BuildRequires: /usr/bin/qemu-img
0b8103
%endif
0b8103
# For LVM drivers
0b8103
BuildRequires: lvm2
0b8103
# For pool type=iscsi
0b8103
BuildRequires: iscsi-initiator-utils
0b8103
%if %{with_storage_iscsi_direct}
0b8103
# For pool type=iscsi-direct
0b8103
BuildRequires: libiscsi-devel
0b8103
%endif
0b8103
# For disk driver
0b8103
BuildRequires: parted-devel
0b8103
# For Multipath support
0b8103
BuildRequires: device-mapper-devel
0b8103
%if %{with_storage_rbd}
0b8103
BuildRequires: librados-devel
0b8103
BuildRequires: librbd-devel
0b8103
%endif
0b8103
%if %{with_storage_gluster}
0b8103
BuildRequires: glusterfs-api-devel >= 3.4.1
0b8103
BuildRequires: glusterfs-devel >= 3.4.1
0b8103
%endif
0b8103
%if %{with_storage_sheepdog}
0b8103
BuildRequires: sheepdog
0b8103
%endif
0b8103
%if %{with_numactl}
0b8103
# For QEMU/LXC numa info
0b8103
BuildRequires: numactl-devel
0b8103
%endif
0b8103
BuildRequires: libcap-ng-devel >= 0.5.0
0b8103
%if %{with_fuse}
0b8103
BuildRequires: fuse-devel >= 2.8.6
0b8103
%endif
0b8103
%if %{with_libssh2}
0b8103
BuildRequires: libssh2-devel >= 1.3.0
0b8103
%endif
0b8103
%if %{with_netcf}
0b8103
BuildRequires: netcf-devel >= 0.2.2
0b8103
%endif
0b8103
%if %{with_esx}
0b8103
BuildRequires: libcurl-devel
0b8103
%endif
0b8103
%if %{with_hyperv}
0b8103
BuildRequires: libwsman-devel >= 2.6.3
0b8103
%endif
0b8103
BuildRequires: audit-libs-devel
0b8103
# we need /usr/sbin/dtrace
0b8103
BuildRequires: systemtap-sdt-devel
0b8103
0b8103
# For mount/umount in FS driver
0b8103
BuildRequires: util-linux
0b8103
# For showmount in FS driver (netfs discovery)
0b8103
BuildRequires: nfs-utils
0b8103
0b8103
# Fedora build root suckage
0b8103
BuildRequires: gawk
0b8103
0b8103
# For storage wiping with different algorithms
0b8103
BuildRequires: scrub
0b8103
0b8103
%if %{with_numad}
0b8103
BuildRequires: numad
0b8103
%endif
0b8103
0b8103
%if %{with_wireshark}
0b8103
BuildRequires: wireshark-devel
0b8103
%endif
0b8103
0b8103
%if %{with_libssh}
0b8103
BuildRequires: libssh-devel >= 0.7.0
0b8103
%endif
0b8103
0b8103
BuildRequires: rpcgen
0b8103
BuildRequires: libtirpc-devel
0b8103
0b8103
# Needed for the firewalld_reload macro
0b8103
%if %{with_firewalld_zone}
0b8103
BuildRequires: firewalld-filesystem
0b8103
%endif
0b8103
0b8103
%description
0b8103
Libvirt is a C toolkit to interact with the virtualization capabilities
0b8103
of recent versions of Linux (and other OSes). The main package includes
0b8103
the libvirtd server exporting the virtualization support.
0b8103
0b8103
%package docs
0b8103
Summary: API reference and website documentation
0b8103
0b8103
%description docs
0b8103
Includes the API reference for the libvirt C library, and a complete
0b8103
copy of the libvirt.org website documentation.
0b8103
0b8103
%package daemon
0b8103
Summary: Server side daemon and supporting files for libvirt library
0b8103
0b8103
# All runtime requirements for the libvirt package (runtime requrements
0b8103
# for subpackages are listed later in those subpackages)
0b8103
0b8103
# The client side, i.e. shared libs are in a subpackage
0b8103
Requires: %{name}-libs = %{version}-%{release}
0b8103
954c63
# netcat is needed on the server side so that clients that have
954c63
# libvirt < 6.9.0 can connect, but newer versions will prefer
954c63
# virt-ssh-helper. Making this a Recommends means that it gets
954c63
# installed by default, but can still be removed if compatibility
954c63
# with old clients is not required
954c63
Recommends: /usr/bin/nc
0b8103
0b8103
# for modprobe of pci devices
0b8103
Requires: module-init-tools
0b8103
0b8103
# for /sbin/ip
0b8103
Requires: iproute
0b8103
# for /sbin/tc
0b8103
Requires: iproute-tc
0b8103
0b8103
Requires: polkit >= 0.112
0b8103
%if %{with_dmidecode}
0b8103
# For virConnectGetSysinfo
0b8103
Requires: dmidecode
0b8103
%endif
0b8103
# For service management
0b8103
Requires(post): /usr/bin/systemctl
0b8103
%if %{with_numad}
0b8103
Requires: numad
0b8103
%endif
0b8103
# libvirtd depends on 'messagebus' service
0b8103
Requires: dbus
0b8103
# For uid creation during pre
0b8103
Requires(pre): shadow-utils
0b8103
# Needed by /usr/libexec/libvirt-guests.sh script.
0b8103
Requires: gettext
0b8103
0b8103
# Ensure smooth upgrades
0b8103
Obsoletes: libvirt-admin < 7.3.0
0b8103
Provides: libvirt-admin = %{version}-%{release}
0b8103
Obsoletes: libvirt-bash-completion < 7.3.0
0b8103
0b8103
%description daemon
0b8103
Server side daemon required to manage the virtualization capabilities
0b8103
of recent versions of Linux. Requires a hypervisor specific sub-RPM
0b8103
for specific drivers.
0b8103
0b8103
%package daemon-config-network
0b8103
Summary: Default configuration files for the libvirtd daemon
0b8103
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-network = %{version}-%{release}
0b8103
0b8103
%description daemon-config-network
0b8103
Default configuration files for setting up NAT based networking
0b8103
0b8103
%package daemon-config-nwfilter
0b8103
Summary: Network filter configuration files for the libvirtd daemon
0b8103
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
0b8103
0b8103
%description daemon-config-nwfilter
0b8103
Network filter configuration files for cleaning guest traffic
0b8103
0b8103
%package daemon-driver-network
0b8103
Summary: Network driver plugin for the libvirtd daemon
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
Requires: dnsmasq >= 2.41
0b8103
Requires: iptables
0b8103
0b8103
%description daemon-driver-network
0b8103
The network driver plugin for the libvirtd daemon, providing
0b8103
an implementation of the virtual network APIs using the Linux
0b8103
bridge capabilities.
0b8103
0b8103
0b8103
%package daemon-driver-nwfilter
0b8103
Summary: Nwfilter driver plugin for the libvirtd daemon
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
Requires: iptables
0b8103
Requires: ebtables
0b8103
0b8103
%description daemon-driver-nwfilter
0b8103
The nwfilter driver plugin for the libvirtd daemon, providing
0b8103
an implementation of the firewall APIs using the ebtables,
0b8103
iptables and ip6tables capabilities
0b8103
0b8103
0b8103
%package daemon-driver-nodedev
0b8103
Summary: Nodedev driver plugin for the libvirtd daemon
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
# needed for device enumeration
0b8103
Requires: systemd >= 185
0b8103
# For managing persistent mediated devices
0b8103
Requires: mdevctl
0b8103
0b8103
%description daemon-driver-nodedev
0b8103
The nodedev driver plugin for the libvirtd daemon, providing
0b8103
an implementation of the node device APIs using the udev
0b8103
capabilities.
0b8103
0b8103
0b8103
%package daemon-driver-interface
0b8103
Summary: Interface driver plugin for the libvirtd daemon
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
%if %{with_netcf}
0b8103
Requires: netcf-libs >= 0.2.2
0b8103
%endif
0b8103
0b8103
%description daemon-driver-interface
0b8103
The interface driver plugin for the libvirtd daemon, providing
0b8103
an implementation of the host network interface APIs.
0b8103
0b8103
%package daemon-driver-secret
0b8103
Summary: Secret driver plugin for the libvirtd daemon
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
0b8103
%description daemon-driver-secret
0b8103
The secret driver plugin for the libvirtd daemon, providing
0b8103
an implementation of the secret key APIs.
0b8103
0b8103
%package daemon-driver-storage-core
0b8103
Summary: Storage driver plugin including base backends for the libvirtd daemon
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
Requires: nfs-utils
0b8103
# For mkfs
0b8103
Requires: util-linux
0b8103
%if %{with_qemu}
0b8103
# From QEMU RPMs
0b8103
Requires: /usr/bin/qemu-img
0b8103
%endif
0b8103
%if !%{with_storage_rbd}
0b8103
Obsoletes: libvirt-daemon-driver-storage-rbd < %{version}-%{release}
0b8103
%endif
0b8103
0b8103
%description daemon-driver-storage-core
0b8103
The storage driver plugin for the libvirtd daemon, providing
0b8103
an implementation of the storage APIs using files, local disks, LVM, SCSI,
0b8103
iSCSI, and multipath storage.
0b8103
0b8103
%package daemon-driver-storage-logical
0b8103
Summary: Storage driver plugin for lvm volumes
0b8103
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
Requires: lvm2
0b8103
0b8103
%description daemon-driver-storage-logical
0b8103
The storage driver backend adding implementation of the storage APIs for block
0b8103
volumes using lvm.
0b8103
0b8103
0b8103
%package daemon-driver-storage-disk
0b8103
Summary: Storage driver plugin for disk
0b8103
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
Requires: parted
0b8103
Requires: device-mapper
0b8103
0b8103
%description daemon-driver-storage-disk
0b8103
The storage driver backend adding implementation of the storage APIs for block
0b8103
volumes using the host disks.
0b8103
0b8103
0b8103
%package daemon-driver-storage-scsi
0b8103
Summary: Storage driver plugin for local scsi devices
0b8103
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
0b8103
%description daemon-driver-storage-scsi
0b8103
The storage driver backend adding implementation of the storage APIs for scsi
0b8103
host devices.
0b8103
0b8103
0b8103
%package daemon-driver-storage-iscsi
0b8103
Summary: Storage driver plugin for iscsi
0b8103
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
Requires: iscsi-initiator-utils
0b8103
0b8103
%description daemon-driver-storage-iscsi
0b8103
The storage driver backend adding implementation of the storage APIs for iscsi
0b8103
volumes using the host iscsi stack.
0b8103
0b8103
0b8103
%if %{with_storage_iscsi_direct}
0b8103
%package daemon-driver-storage-iscsi-direct
0b8103
Summary: Storage driver plugin for iscsi-direct
0b8103
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
0b8103
%description daemon-driver-storage-iscsi-direct
0b8103
The storage driver backend adding implementation of the storage APIs for iscsi
0b8103
volumes using libiscsi direct connection.
0b8103
%endif
0b8103
0b8103
0b8103
%package daemon-driver-storage-mpath
0b8103
Summary: Storage driver plugin for multipath volumes
0b8103
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
Requires: device-mapper
0b8103
0b8103
%description daemon-driver-storage-mpath
0b8103
The storage driver backend adding implementation of the storage APIs for
0b8103
multipath storage using device mapper.
0b8103
0b8103
0b8103
%if %{with_storage_gluster}
0b8103
%package daemon-driver-storage-gluster
0b8103
Summary: Storage driver plugin for gluster
0b8103
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
    %if 0%{?fedora}
0b8103
Requires: glusterfs-client >= 2.0.1
0b8103
    %endif
0b8103
    %if (0%{?fedora} || 0%{?with_storage_gluster})
0b8103
Requires: /usr/sbin/gluster
0b8103
    %endif
0b8103
0b8103
%description daemon-driver-storage-gluster
0b8103
The storage driver backend adding implementation of the storage APIs for gluster
0b8103
volumes using libgfapi.
0b8103
%endif
0b8103
0b8103
0b8103
%if %{with_storage_rbd}
0b8103
%package daemon-driver-storage-rbd
0b8103
Summary: Storage driver plugin for rbd
0b8103
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
0b8103
%description daemon-driver-storage-rbd
0b8103
The storage driver backend adding implementation of the storage APIs for rbd
0b8103
volumes using the ceph protocol.
0b8103
%endif
0b8103
0b8103
0b8103
%if %{with_storage_sheepdog}
0b8103
%package daemon-driver-storage-sheepdog
0b8103
Summary: Storage driver plugin for sheepdog
0b8103
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
Requires: sheepdog
0b8103
0b8103
%description daemon-driver-storage-sheepdog
0b8103
The storage driver backend adding implementation of the storage APIs for
0b8103
sheepdog volumes using.
0b8103
%endif
0b8103
0b8103
0b8103
%if %{with_storage_zfs}
0b8103
%package daemon-driver-storage-zfs
0b8103
Summary: Storage driver plugin for ZFS
0b8103
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
# Support any conforming implementation of zfs
0b8103
Requires: /sbin/zfs
0b8103
Requires: /sbin/zpool
0b8103
0b8103
%description daemon-driver-storage-zfs
0b8103
The storage driver backend adding implementation of the storage APIs for
0b8103
ZFS volumes.
0b8103
%endif
0b8103
0b8103
0b8103
%package daemon-driver-storage
0b8103
Summary: Storage driver plugin including all backends for the libvirtd daemon
0b8103
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-storage-disk = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-storage-logical = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-storage-scsi = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-storage-iscsi = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-storage-mpath = %{version}-%{release}
0b8103
%if %{with_storage_iscsi_direct}
0b8103
Requires: libvirt-daemon-driver-storage-iscsi-direct = %{version}-%{release}
0b8103
%endif
0b8103
%if %{with_storage_gluster}
0b8103
Requires: libvirt-daemon-driver-storage-gluster = %{version}-%{release}
0b8103
%endif
0b8103
%if %{with_storage_rbd}
0b8103
Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release}
0b8103
%endif
0b8103
%if %{with_storage_sheepdog}
0b8103
Requires: libvirt-daemon-driver-storage-sheepdog = %{version}-%{release}
0b8103
%endif
0b8103
%if %{with_storage_zfs}
0b8103
Requires: libvirt-daemon-driver-storage-zfs = %{version}-%{release}
0b8103
%endif
0b8103
0b8103
%description daemon-driver-storage
0b8103
The storage driver plugin for the libvirtd daemon, providing
0b8103
an implementation of the storage APIs using LVM, iSCSI,
0b8103
parted and more.
0b8103
0b8103
0b8103
%if %{with_qemu}
0b8103
%package daemon-driver-qemu
0b8103
Summary: QEMU driver plugin for the libvirtd daemon
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
Requires: /usr/bin/qemu-img
0b8103
# For image compression
0b8103
Requires: gzip
0b8103
Requires: bzip2
0b8103
Requires: lzop
0b8103
Requires: xz
0b8103
Requires: systemd-container
0b8103
Requires: swtpm-tools
0b8103
0b8103
%description daemon-driver-qemu
0b8103
The qemu driver plugin for the libvirtd daemon, providing
0b8103
an implementation of the hypervisor driver APIs using
0b8103
QEMU
0b8103
%endif
0b8103
0b8103
0b8103
%if %{with_lxc}
0b8103
%package daemon-driver-lxc
0b8103
Summary: LXC driver plugin for the libvirtd daemon
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
# There really is a hard cross-driver dependency here
0b8103
Requires: libvirt-daemon-driver-network = %{version}-%{release}
0b8103
Requires: systemd-container
0b8103
0b8103
%description daemon-driver-lxc
0b8103
The LXC driver plugin for the libvirtd daemon, providing
0b8103
an implementation of the hypervisor driver APIs using
0b8103
the Linux kernel
0b8103
%endif
0b8103
0b8103
0b8103
%if %{with_vbox}
0b8103
%package daemon-driver-vbox
0b8103
Summary: VirtualBox driver plugin for the libvirtd daemon
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
0b8103
%description daemon-driver-vbox
0b8103
The vbox driver plugin for the libvirtd daemon, providing
0b8103
an implementation of the hypervisor driver APIs using
0b8103
VirtualBox
0b8103
%endif
0b8103
0b8103
0b8103
%if %{with_libxl}
0b8103
%package daemon-driver-libxl
0b8103
Summary: Libxl driver plugin for the libvirtd daemon
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-libs = %{version}-%{release}
0b8103
Obsoletes: libvirt-daemon-driver-xen < 4.3.0
0b8103
0b8103
%description daemon-driver-libxl
0b8103
The Libxl driver plugin for the libvirtd daemon, providing
0b8103
an implementation of the hypervisor driver APIs using
0b8103
Libxl
0b8103
%endif
0b8103
0b8103
0b8103
0b8103
%if %{with_qemu_tcg}
0b8103
%package daemon-qemu
0b8103
Summary: Server side daemon & driver required to run QEMU guests
0b8103
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-network = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
0b8103
Requires: qemu
0b8103
0b8103
%description daemon-qemu
0b8103
Server side daemon and driver required to manage the virtualization
0b8103
capabilities of the QEMU TCG emulators
0b8103
%endif
0b8103
0b8103
0b8103
%if %{with_qemu_kvm}
0b8103
%package daemon-kvm
0b8103
Summary: Server side daemon & driver required to run KVM guests
0b8103
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-network = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
0b8103
Requires: qemu-kvm
0b8103
0b8103
%description daemon-kvm
0b8103
Server side daemon and driver required to manage the virtualization
0b8103
capabilities of the KVM hypervisor
0b8103
%endif
0b8103
0b8103
0b8103
%if %{with_lxc}
0b8103
%package daemon-lxc
0b8103
Summary: Server side daemon & driver required to run LXC guests
0b8103
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-network = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
0b8103
0b8103
%description daemon-lxc
0b8103
Server side daemon and driver required to manage the virtualization
0b8103
capabilities of LXC
0b8103
%endif
0b8103
0b8103
0b8103
%if %{with_libxl}
0b8103
%package daemon-xen
0b8103
Summary: Server side daemon & driver required to run XEN guests
0b8103
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
    %if %{with_libxl}
0b8103
Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
0b8103
    %endif
0b8103
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-network = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
0b8103
Requires: xen
0b8103
0b8103
%description daemon-xen
0b8103
Server side daemon and driver required to manage the virtualization
0b8103
capabilities of XEN
0b8103
%endif
0b8103
0b8103
%if %{with_vbox}
0b8103
%package daemon-vbox
0b8103
Summary: Server side daemon & driver required to run VirtualBox guests
0b8103
0b8103
Requires: libvirt-daemon = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-network = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
0b8103
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
0b8103
0b8103
%description daemon-vbox
0b8103
Server side daemon and driver required to manage the virtualization
0b8103
capabilities of VirtualBox
0b8103
%endif
0b8103
0b8103
%package client
0b8103
Summary: Client side utilities of the libvirt library
0b8103
Requires: %{name}-libs = %{version}-%{release}
0b8103
# Needed by virt-pki-validate script.
0b8103
Requires: gnutls-utils
0b8103
0b8103
# Ensure smooth upgrades
0b8103
Obsoletes: libvirt-bash-completion < 7.3.0
0b8103
0b8103
%description client
0b8103
The client binaries needed to access the virtualization
0b8103
capabilities of recent versions of Linux (and other OSes).
0b8103
0b8103
%package libs
0b8103
Summary: Client side libraries
0b8103
# So remote clients can access libvirt over SSH tunnel
0b8103
Requires: cyrus-sasl
0b8103
# Needed by default sasl.conf - no onerous extra deps, since
0b8103
# 100's of other things on a system already pull in krb5-libs
0b8103
Requires: cyrus-sasl-gssapi
0b8103
0b8103
%description libs
0b8103
Shared libraries for accessing the libvirt daemon.
0b8103
0b8103
%if %{with_wireshark}
0b8103
%package wireshark
0b8103
Summary: Wireshark dissector plugin for libvirt RPC transactions
0b8103
Requires: wireshark
0b8103
Requires: %{name}-libs = %{version}-%{release}
0b8103
0b8103
%description wireshark
0b8103
Wireshark dissector plugin for better analysis of libvirt RPC traffic.
0b8103
%endif
0b8103
0b8103
%if %{with_lxc}
0b8103
%package login-shell
0b8103
Summary: Login shell for connecting users to an LXC container
0b8103
Requires: %{name}-libs = %{version}-%{release}
0b8103
0b8103
%description login-shell
0b8103
Provides the set-uid virt-login-shell binary that is used to
0b8103
connect a user to an LXC container when they login, by switching
0b8103
namespaces.
0b8103
%endif
0b8103
0b8103
%package devel
0b8103
Summary: Libraries, includes, etc. to compile with the libvirt library
0b8103
Requires: %{name}-libs = %{version}-%{release}
0b8103
Requires: pkgconfig
0b8103
0b8103
%description devel
0b8103
Include header files & development libraries for the libvirt C library.
0b8103
0b8103
%if %{with_sanlock}
0b8103
%package lock-sanlock
0b8103
Summary: Sanlock lock manager plugin for QEMU driver
0b8103
Requires: sanlock >= 2.4
0b8103
#for virt-sanlock-cleanup require augeas
0b8103
Requires: augeas
0b8103
Requires: %{name}-daemon = %{version}-%{release}
0b8103
Requires: %{name}-libs = %{version}-%{release}
0b8103
0b8103
%description lock-sanlock
0b8103
Includes the Sanlock lock manager plugin for the QEMU
0b8103
driver
0b8103
%endif
0b8103
0b8103
%package nss
0b8103
Summary: Libvirt plugin for Name Service Switch
0b8103
Requires: libvirt-daemon-driver-network = %{version}-%{release}
0b8103
0b8103
%description nss
0b8103
Libvirt plugin for NSS for translating domain names into IP addresses.
0b8103
0b8103
0b8103
%prep
0b8103
0b8103
%autosetup -S git_am -N
0b8103
0b8103
# "make dist" replaces all symlinks with a copy of the linked files;
0b8103
# we need to replace all of them with the original symlinks
0b8103
echo "Restoring symlinks"
0b8103
while read lnk target; do
0b8103
    if [ -e $lnk ]; then
0b8103
        rm -rf $lnk
0b8103
        ln -s $target $lnk
0b8103
    fi
0b8103
done <%{_sourcedir}/symlinks || exit 1
0b8103
git add .
0b8103
git commit -q -a --allow-empty --author 'rpm-build <rpm-build>' -m symlinks
0b8103
0b8103
0b8103
git config gc.auto 0
0b8103
0b8103
%autopatch
0b8103
0b8103
%build
0b8103
%if 0%{?fedora} >= %{min_fedora} || 0%{?rhel} >= %{min_rhel}
0b8103
    %define supported_platform 1
0b8103
%else
0b8103
    %define supported_platform 0
0b8103
%endif
0b8103
0b8103
%if ! %{supported_platform}
0b8103
echo "This RPM requires either Fedora >= %{min_fedora} or RHEL >= %{min_rhel}"
0b8103
exit 1
0b8103
%endif
0b8103
0b8103
%if %{with_qemu}
0b8103
    %define arg_qemu -Ddriver_qemu=enabled
0b8103
%else
0b8103
    %define arg_qemu -Ddriver_qemu=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_openvz}
0b8103
    %define arg_openvz -Ddriver_openvz=enabled
0b8103
%else
0b8103
    %define arg_openvz -Ddriver_openvz=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_lxc}
0b8103
    %define arg_lxc -Ddriver_lxc=enabled
0b8103
    %define arg_login_shell -Dlogin_shell=enabled
0b8103
%else
0b8103
    %define arg_lxc -Ddriver_lxc=disabled
0b8103
    %define arg_login_shell -Dlogin_shell=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_vbox}
0b8103
    %define arg_vbox -Ddriver_vbox=enabled
0b8103
%else
0b8103
    %define arg_vbox -Ddriver_vbox=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_libxl}
0b8103
    %define arg_libxl -Ddriver_libxl=enabled
0b8103
%else
0b8103
    %define arg_libxl -Ddriver_libxl=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_esx}
0b8103
    %define arg_esx -Ddriver_esx=enabled -Dcurl=enabled
0b8103
%else
0b8103
    %define arg_esx -Ddriver_esx=disabled -Dcurl=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_hyperv}
0b8103
    %define arg_hyperv -Ddriver_hyperv=enabled -Dopenwsman=enabled
0b8103
%else
0b8103
    %define arg_hyperv -Ddriver_hyperv=disabled -Dopenwsman=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_vmware}
0b8103
    %define arg_vmware -Ddriver_vmware=enabled
0b8103
%else
0b8103
    %define arg_vmware -Ddriver_vmware=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_storage_rbd}
0b8103
    %define arg_storage_rbd -Dstorage_rbd=enabled
0b8103
%else
0b8103
    %define arg_storage_rbd -Dstorage_rbd=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_storage_sheepdog}
0b8103
    %define arg_storage_sheepdog -Dstorage_sheepdog=enabled
0b8103
%else
0b8103
    %define arg_storage_sheepdog -Dstorage_sheepdog=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_storage_gluster}
0b8103
    %define arg_storage_gluster -Dstorage_gluster=enabled -Dglusterfs=enabled
0b8103
%else
0b8103
    %define arg_storage_gluster -Dstorage_gluster=disabled -Dglusterfs=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_storage_zfs}
0b8103
    %define arg_storage_zfs -Dstorage_zfs=enabled
0b8103
%else
0b8103
    %define arg_storage_zfs -Dstorage_zfs=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_numactl}
0b8103
    %define arg_numactl -Dnumactl=enabled
0b8103
%else
0b8103
    %define arg_numactl -Dnumactl=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_numad}
0b8103
    %define arg_numad -Dnumad=enabled
0b8103
%else
0b8103
    %define arg_numad -Dnumad=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_fuse}
0b8103
    %define arg_fuse -Dfuse=enabled
0b8103
%else
0b8103
    %define arg_fuse -Dfuse=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_sanlock}
0b8103
    %define arg_sanlock -Dsanlock=enabled
0b8103
%else
0b8103
    %define arg_sanlock -Dsanlock=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_firewalld_zone}
0b8103
    %define arg_firewalld_zone -Dfirewalld_zone=enabled
0b8103
%else
0b8103
    %define arg_firewalld_zone -Dfirewalld_zone=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_netcf}
0b8103
    %define arg_netcf -Dnetcf=enabled
0b8103
%else
0b8103
    %define arg_netcf -Dnetcf=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_wireshark}
0b8103
    %define arg_wireshark -Dwireshark_dissector=enabled
0b8103
%else
0b8103
    %define arg_wireshark -Dwireshark_dissector=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_storage_iscsi_direct}
0b8103
    %define arg_storage_iscsi_direct -Dstorage_iscsi_direct=enabled -Dlibiscsi=enabled
0b8103
%else
0b8103
    %define arg_storage_iscsi_direct -Dstorage_iscsi_direct=disabled -Dlibiscsi=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_libssh}
0b8103
    %define arg_libssh -Dlibssh=enabled
0b8103
%else
0b8103
    %define arg_libssh -Dlibssh=disabled
0b8103
%endif
0b8103
0b8103
%if %{with_libssh2}
0b8103
    %define arg_libssh2 -Dlibssh2=enabled
0b8103
%else
0b8103
    %define arg_libssh2 -Dlibssh2=disabled
0b8103
%endif
0b8103
d222d3
%if %{with_modular_daemons}
d222d3
    %define arg_remote_mode -Dremote_default_mode=direct
d222d3
%else
d222d3
    %define arg_remote_mode -Dremote_default_mode=legacy
d222d3
%endif
d222d3
0b8103
%define when  %(date +"%%F-%%T")
0b8103
%define where %(hostname)
0b8103
%define who   %{?packager}%{!?packager:Unknown}
0b8103
%define arg_packager -Dpackager="%{who}, %{when}, %{where}"
0b8103
%define arg_packager_version -Dpackager_version="%{release}"
0b8103
0b8103
%define arg_selinux_mount -Dselinux_mount="/sys/fs/selinux"
0b8103
0b8103
# place macros above and build commands below this comment
0b8103
0b8103
export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
0b8103
0b8103
%meson \
0b8103
           -Drunstatedir=%{_rundir} \
0b8103
           %{?arg_qemu} \
0b8103
           %{?arg_openvz} \
0b8103
           %{?arg_lxc} \
0b8103
           %{?arg_vbox} \
0b8103
           %{?arg_libxl} \
0b8103
           -Dsasl=enabled \
0b8103
           -Dpolkit=enabled \
0b8103
           -Ddriver_libvirtd=enabled \
0b8103
           -Ddriver_remote=enabled \
0b8103
           -Ddriver_test=enabled \
0b8103
           %{?arg_esx} \
0b8103
           %{?arg_hyperv} \
0b8103
           %{?arg_vmware} \
0b8103
           -Ddriver_vz=disabled \
0b8103
           -Ddriver_bhyve=disabled \
0b8103
           -Ddriver_ch=disabled \
d222d3
           %{?arg_remote_mode} \
0b8103
           -Ddriver_interface=enabled \
0b8103
           -Ddriver_network=enabled \
0b8103
           -Dstorage_fs=enabled \
0b8103
           -Dstorage_lvm=enabled \
0b8103
           -Dstorage_iscsi=enabled \
0b8103
           %{?arg_storage_iscsi_direct} \
0b8103
           -Dstorage_scsi=enabled \
0b8103
           -Dstorage_disk=enabled \
0b8103
           -Dstorage_mpath=enabled \
0b8103
           %{?arg_storage_rbd} \
0b8103
           %{?arg_storage_sheepdog} \
0b8103
           %{?arg_storage_gluster} \
0b8103
           %{?arg_storage_zfs} \
0b8103
           -Dstorage_vstorage=disabled \
0b8103
           %{?arg_numactl} \
0b8103
           %{?arg_numad} \
0b8103
           -Dcapng=enabled \
0b8103
           %{?arg_fuse} \
0b8103
           %{?arg_netcf} \
0b8103
           -Dselinux=enabled \
0b8103
           %{?arg_selinux_mount} \
0b8103
           -Dapparmor=disabled \
0b8103
           -Dapparmor_profiles=disabled \
0b8103
           -Dsecdriver_apparmor=disabled \
0b8103
           -Dudev=enabled \
0b8103
           -Dyajl=enabled \
0b8103
           %{?arg_sanlock} \
0b8103
           -Dlibpcap=enabled \
0b8103
           -Dlibnl=enabled \
0b8103
           -Daudit=enabled \
0b8103
           -Ddtrace=enabled \
0b8103
           -Dfirewalld=enabled \
0b8103
           %{?arg_firewalld_zone} \
0b8103
           %{?arg_wireshark} \
0b8103
           %{?arg_libssh} \
0b8103
           %{?arg_libssh2} \
0b8103
           -Dpm_utils=disabled \
0b8103
           -Dnss=enabled \
0b8103
           %{arg_packager} \
0b8103
           %{arg_packager_version} \
0b8103
           -Dqemu_user=%{qemu_user} \
0b8103
           -Dqemu_group=%{qemu_group} \
18dc33
           -Dqemu_moddir=%{qemu_moddir} \
18dc33
           -Dqemu_datadir=%{qemu_datadir} \
0b8103
           -Dtls_priority=%{tls_priority} \
0b8103
           %{?enable_werror} \
0b8103
           -Dexpensive_tests=enabled \
0b8103
           -Dinit_script=systemd \
0b8103
           -Ddocs=enabled \
0b8103
           -Dtests=enabled \
0b8103
           -Drpath=disabled \
0b8103
           %{?arg_login_shell}
0b8103
0b8103
%meson_build
0b8103
0b8103
%install
0b8103
rm -fr %{buildroot}
0b8103
0b8103
export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
0b8103
0b8103
%meson_install
0b8103
0b8103
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
0b8103
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
0b8103
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la
0b8103
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a
0b8103
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la
0b8103
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a
0b8103
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-backend/*.la
0b8103
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-backend/*.a
0b8103
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-file/*.la
0b8103
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-file/*.a
0b8103
%if %{with_wireshark}
0b8103
rm -f $RPM_BUILD_ROOT%{wireshark_plugindir}/libvirt.la
0b8103
%endif
0b8103
0b8103
# We don't want to install /etc/libvirt/qemu/networks in the main %%files list
0b8103
# because if the admin wants to delete the default network completely, we don't
0b8103
# want to end up re-incarnating it on every RPM upgrade.
0b8103
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/
0b8103
cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \
0b8103
   $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
0b8103
# libvirt saves this file with mode 0600
0b8103
chmod 0600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
0b8103
0b8103
# nwfilter files are installed in /usr/share/libvirt and copied to /etc in %%post
0b8103
# to avoid verification errors on changed files in /etc
0b8103
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/nwfilter/
0b8103
cp -a $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml \
0b8103
    $RPM_BUILD_ROOT%{_datadir}/libvirt/nwfilter/
0b8103
# libvirt saves these files with mode 600
0b8103
chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml
0b8103
0b8103
%if ! %{with_qemu}
0b8103
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug
0b8103
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
0b8103
%endif
0b8103
%find_lang %{name}
0b8103
0b8103
%if ! %{with_sanlock}
0b8103
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirt_sanlock.aug
0b8103
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
0b8103
%endif
0b8103
0b8103
%if ! %{with_lxc}
0b8103
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug
0b8103
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
0b8103
%endif
0b8103
0b8103
%if ! %{with_qemu}
0b8103
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf
0b8103
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
0b8103
%endif
0b8103
%if ! %{with_lxc}
0b8103
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
0b8103
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc
0b8103
%endif
0b8103
%if ! %{with_libxl}
0b8103
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/libxl.conf
0b8103
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.libxl
0b8103
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_libxl.aug
0b8103
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
0b8103
%endif
0b8103
0b8103
# Copied into libvirt-docs subpackage eventually
0b8103
mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt libvirt-docs
0b8103
0b8103
%ifarch %{arches_systemtap_64bit}
0b8103
mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \
0b8103
   $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp
0b8103
0b8103
    %if %{with_qemu}
0b8103
mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
0b8103
   $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes-64.stp
0b8103
    %endif
0b8103
%endif
0b8103
0b8103
%check
0b8103
# Building on slow archs, like emulated s390x in Fedora copr, requires
0b8103
# raising the test timeout
0b8103
VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check --timeout-multiplier 10
0b8103
d222d3
%define libvirt_daemon_schedule_restart() mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : \
d222d3
/bin/systemctl is-active %1.service 1>/dev/null 2>&1 && \
d222d3
  touch %{_localstatedir}/lib/rpm-state/libvirt/restart-%1 || :
d222d3
d222d3
%define libvirt_daemon_finish_restart() rm -f %{_localstatedir}/lib/rpm-state/libvirt/restart-%1 \
d222d3
rmdir %{_localstatedir}/lib/rpm-state/libvirt 2>/dev/null || :
d222d3
d222d3
%define libvirt_daemon_needs_restart() -f %{_localstatedir}/lib/rpm-state/libvirt/restart-%1
d222d3
d222d3
%define libvirt_daemon_perform_restart() if test %libvirt_daemon_needs_restart %1 \
d222d3
then \
d222d3
  /bin/systemctl try-restart %1.service >/dev/null 2>&1 || : \
d222d3
fi \
d222d3
%libvirt_daemon_finish_restart %1
d222d3
954c63
# For daemons with only UNIX sockets
d222d3
%define libvirt_daemon_systemd_post() %systemd_post %1.socket %1-ro.socket %1-admin.socket %1.service
d222d3
%define libvirt_daemon_systemd_preun() %systemd_preun %1.service %1-ro.socket %1-admin.socket %1.socket
d222d3
954c63
# For daemons with UNIX and INET sockets
954c63
%define libvirt_daemon_systemd_post_inet() %systemd_post %1.socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket %1.service
d222d3
%define libvirt_daemon_systemd_preun_inet() %systemd_preun %1.service %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket %1.socket
d222d3
954c63
# For daemons with only UNIX sockets and no unprivileged read-only access
954c63
%define libvirt_daemon_systemd_post_priv() %systemd_post %1.socket %1-admin.socket %1.service
954c63
%define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket %1.socket
954c63
0b8103
%pre daemon
954c63
%libvirt_sysconfig_pre libvirtd virtproxyd virtlogd virtlockd libvirt-guests
0b8103
# 'libvirt' group is just to allow password-less polkit access to
0b8103
# libvirtd. The uid number is irrelevant, so we use dynamic allocation
0b8103
# described at the above link.
0b8103
getent group libvirt >/dev/null || groupadd -r libvirt
0b8103
0b8103
exit 0
0b8103
0b8103
%post daemon
954c63
%libvirt_daemon_systemd_post_priv virtlogd
954c63
%libvirt_daemon_systemd_post_priv virtlockd
d222d3
%if %{with_modular_daemons}
d222d3
%libvirt_daemon_systemd_post_inet virtproxyd
d222d3
%else
d222d3
%libvirt_daemon_systemd_post_inet libvirtd
d222d3
%endif
0b8103
d222d3
%systemd_post libvirt-guests.service
0b8103
d222d3
%libvirt_daemon_schedule_restart libvirtd
0b8103
0b8103
%preun daemon
d222d3
%systemd_preun libvirt-guests.service
0b8103
d222d3
%libvirt_daemon_systemd_preun_inet libvirtd
d222d3
%libvirt_daemon_systemd_preun_inet virtproxyd
954c63
%libvirt_daemon_systemd_preun_priv virtlogd
954c63
%libvirt_daemon_systemd_preun_priv virtlockd
0b8103
0b8103
%postun daemon
0b8103
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
0b8103
if [ $1 -ge 1 ] ; then
0b8103
    /bin/systemctl reload-or-try-restart virtlockd.service virtlogd.service >/dev/null 2>&1 || :
0b8103
fi
0b8103
%systemd_postun libvirt-guests.service
0b8103
0b8103
# In upgrade scenario we must explicitly enable virtlockd/virtlogd
0b8103
# sockets, if libvirtd is already enabled and start them if
0b8103
# libvirtd is running, otherwise you'll get failures to start
0b8103
# guests
0b8103
%triggerpostun daemon -- libvirt-daemon < 1.3.0
0b8103
if [ $1 -ge 1 ] ; then
0b8103
    /bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 &&
0b8103
        /bin/systemctl enable virtlogd.socket virtlogd-admin.socket || :
0b8103
    /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 &&
0b8103
        /bin/systemctl start virtlogd.socket virtlogd-admin.socket || :
0b8103
fi
0b8103
0b8103
%posttrans daemon
954c63
%libvirt_sysconfig_posttrans libvirtd virtproxyd virtlogd virtlockd libvirt-guests
d222d3
if test %libvirt_daemon_needs_restart libvirtd
d222d3
then
0b8103
    # See if user has previously modified their install to
0b8103
    # tell libvirtd to use --listen
0b8103
    grep -E '^LIBVIRTD_ARGS=.*--listen' /etc/sysconfig/libvirtd 1>/dev/null 2>&1
0b8103
    if test $? = 0
0b8103
    then
0b8103
        # Then lets keep honouring --listen and *not* use
0b8103
        # systemd socket activation, because switching things
0b8103
        # might confuse mgmt tool like puppet/ansible that
0b8103
        # expect the old style libvirtd
0b8103
        /bin/systemctl mask \
0b8103
                libvirtd.socket \
0b8103
                libvirtd-ro.socket \
0b8103
                libvirtd-admin.socket \
0b8103
                libvirtd-tls.socket \
0b8103
                libvirtd-tcp.socket >/dev/null 2>&1 || :
0b8103
    else
0b8103
        # Old libvirtd owns the sockets and will delete them on
0b8103
        # shutdown. Can't use a try-restart as libvirtd will simply
0b8103
        # own the sockets again when it comes back up. Thus we must
0b8103
        # do this particular ordering, so that we get libvirtd
0b8103
        # running with socket activation in use
0b8103
        /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1
0b8103
        if test $? = 0
0b8103
        then
0b8103
            /bin/systemctl stop libvirtd.service >/dev/null 2>&1 || :
0b8103
0b8103
            /bin/systemctl try-restart \
0b8103
                    libvirtd.socket \
0b8103
                    libvirtd-ro.socket \
0b8103
                    libvirtd-admin.socket >/dev/null 2>&1 || :
0b8103
0b8103
            /bin/systemctl start libvirtd.service >/dev/null 2>&1 || :
0b8103
        fi
0b8103
    fi
0b8103
fi
d222d3
d222d3
%libvirt_daemon_finish_restart libvirtd
0b8103
954c63
%pre daemon-driver-network
954c63
%libvirt_sysconfig_pre virtnetworkd
954c63
0b8103
%post daemon-driver-network
0b8103
%if %{with_firewalld_zone}
0b8103
    %firewalld_reload
0b8103
%endif
0b8103
d222d3
%if %{with_modular_daemons}
d222d3
%libvirt_daemon_systemd_post virtnetworkd
d222d3
%endif
d222d3
%libvirt_daemon_schedule_restart virtnetworkd
d222d3
954c63
%preun daemon-driver-network
d222d3
%libvirt_daemon_systemd_preun virtnetworkd
d222d3
0b8103
%postun daemon-driver-network
0b8103
%if %{with_firewalld_zone}
0b8103
    %firewalld_reload
0b8103
%endif
0b8103
d222d3
%posttrans daemon-driver-network
954c63
%libvirt_sysconfig_posttrans virtnetworkd
d222d3
%libvirt_daemon_perform_restart virtnetworkd
d222d3
954c63
%pre daemon-driver-nwfilter
954c63
%libvirt_sysconfig_pre virtnwfilterd
d222d3
d222d3
%post daemon-driver-nwfilter
d222d3
%if %{with_modular_daemons}
d222d3
%libvirt_daemon_systemd_post virtnwfilterd
d222d3
%endif
d222d3
%libvirt_daemon_schedule_restart virtnwfilterd
d222d3
d222d3
%preun daemon-driver-nwfilter
d222d3
%libvirt_daemon_systemd_preun virtnwfilterd
d222d3
d222d3
%posttrans daemon-driver-nwfilter
954c63
%libvirt_sysconfig_posttrans virtnwfilterd
d222d3
%libvirt_daemon_perform_restart virtnwfilterd
d222d3
954c63
%pre daemon-driver-nodedev
954c63
%libvirt_sysconfig_pre virtnodedevd
d222d3
d222d3
%post daemon-driver-nodedev
d222d3
%if %{with_modular_daemons}
d222d3
%libvirt_daemon_systemd_post virtnodedevd
d222d3
%endif
d222d3
%libvirt_daemon_schedule_restart virtnodedevd
d222d3
d222d3
%preun daemon-driver-nodedev
d222d3
%libvirt_daemon_systemd_preun virtnodedevd
d222d3
d222d3
%posttrans daemon-driver-nodedev
954c63
%libvirt_sysconfig_posttrans virtnodedevd
d222d3
%libvirt_daemon_perform_restart virtnodedevd
d222d3
954c63
%pre daemon-driver-interface
954c63
%libvirt_sysconfig_pre virtinterfaced
d222d3
d222d3
%post daemon-driver-interface
d222d3
%if %{with_modular_daemons}
d222d3
%libvirt_daemon_systemd_post virtinterfaced
d222d3
%endif
d222d3
%libvirt_daemon_schedule_restart virtinterfaced
d222d3
d222d3
%preun daemon-driver-interface
d222d3
%libvirt_daemon_systemd_preun virtinterfaced
d222d3
d222d3
%posttrans daemon-driver-interface
954c63
%libvirt_sysconfig_posttrans virtinterfaced
d222d3
%libvirt_daemon_perform_restart virtinterfaced
d222d3
954c63
%pre daemon-driver-secret
954c63
%libvirt_sysconfig_pre virtsecretd
d222d3
d222d3
%post daemon-driver-secret
d222d3
%if %{with_modular_daemons}
d222d3
%libvirt_daemon_systemd_post virtsecretd
d222d3
%endif
d222d3
%libvirt_daemon_schedule_restart virtsecretd
d222d3
d222d3
%preun daemon-driver-secret
d222d3
%libvirt_daemon_systemd_preun virtsecretd
d222d3
d222d3
%posttrans daemon-driver-secret
954c63
%libvirt_sysconfig_posttrans virtsecretd
d222d3
%libvirt_daemon_perform_restart virtsecretd
d222d3
d222d3
954c63
%pre daemon-driver-storage-core
954c63
%libvirt_sysconfig_pre virtstoraged
954c63
954c63
%post daemon-driver-storage-core
d222d3
%if %{with_modular_daemons}
d222d3
%libvirt_daemon_systemd_post virtstoraged
d222d3
%endif
d222d3
%libvirt_daemon_schedule_restart virtstoraged
d222d3
954c63
%preun daemon-driver-storage-core
d222d3
%libvirt_daemon_systemd_preun virtstoraged
d222d3
954c63
%posttrans daemon-driver-storage-core
954c63
%libvirt_sysconfig_posttrans virtstoraged
d222d3
%libvirt_daemon_perform_restart virtstoraged
d222d3
d222d3
d222d3
%if %{with_qemu}
954c63
%pre daemon-driver-qemu
954c63
%libvirt_sysconfig_pre virtqemud
954c63
# We want soft static allocation of well-known ids, as disk images
954c63
# are commonly shared across NFS mounts by id rather than name; see
954c63
# https://fedoraproject.org/wiki/Packaging:UsersAndGroups
954c63
getent group kvm >/dev/null || groupadd -f -g 36 -r kvm
954c63
getent group qemu >/dev/null || groupadd -f -g 107 -r qemu
954c63
if ! getent passwd qemu >/dev/null; then
954c63
  if ! getent passwd 107 >/dev/null; then
954c63
    useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu
954c63
  else
954c63
    useradd -r -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu
954c63
  fi
954c63
fi
954c63
exit 0
954c63
d222d3
%post daemon-driver-qemu
d222d3
    %if %{with_modular_daemons}
d222d3
%libvirt_daemon_systemd_post virtqemud
d222d3
    %endif
d222d3
%libvirt_daemon_schedule_restart virtqemud
d222d3
d222d3
%preun daemon-driver-qemu
d222d3
%libvirt_daemon_systemd_preun virtqemud
d222d3
d222d3
%posttrans daemon-driver-qemu
954c63
%libvirt_sysconfig_posttrans virtqemud
d222d3
%libvirt_daemon_perform_restart virtqemud
d222d3
%endif
d222d3
d222d3
d222d3
%if %{with_lxc}
954c63
%pre daemon-driver-lxc
954c63
%libvirt_sysconfig_pre virtlxcd
954c63
d222d3
%post daemon-driver-lxc
d222d3
    %if %{with_modular_daemons}
d222d3
%libvirt_daemon_systemd_post virtlxcd
d222d3
    %endif
d222d3
%libvirt_daemon_schedule_restart virtlxcd
d222d3
d222d3
%preun daemon-driver-lxc
d222d3
%libvirt_daemon_systemd_preun virtlxcd
d222d3
d222d3
%posttrans daemon-driver-lxc
954c63
%libvirt_sysconfig_posttrans virtlxcd
d222d3
%libvirt_daemon_perform_restart virtlxcd
d222d3
%endif
d222d3
d222d3
d222d3
%if %{with_vbox}
d222d3
%post daemon-driver-vbox
d222d3
    %if %{with_modular_daemons}
d222d3
%libvirt_daemon_systemd_post virtvboxd
d222d3
    %endif
d222d3
%libvirt_daemon_schedule_restart virtvboxd
d222d3
954c63
%pre daemon-driver-vbox
954c63
%libvirt_sysconfig_pre virtvboxd
954c63
d222d3
%preun daemon-driver-vbox
d222d3
%libvirt_daemon_systemd_preun virtvboxd
d222d3
d222d3
%posttrans daemon-driver-vbox
954c63
%libvirt_sysconfig_posttrans virtvboxd
d222d3
%libvirt_daemon_perform_restart virtvboxd
d222d3
%endif
d222d3
d222d3
d222d3
%if %{with_libxl}
d222d3
%post daemon-driver-libxl
d222d3
    %if %{with_modular_daemons}
d222d3
%libvirt_daemon_systemd_post virtxend
d222d3
    %endif
d222d3
%libvirt_daemon_schedule_restart virtxend
d222d3
954c63
%pre daemon-driver-libxl
954c63
%libvirt_sysconfig_pre virtxend
954c63
d222d3
%preun daemon-driver-libxl
d222d3
%libvirt_daemon_systemd_preun virtxend
d222d3
d222d3
%posttrans daemon-driver-libxl
954c63
%libvirt_sysconfig_posttrans virtxend
d222d3
%libvirt_daemon_perform_restart virtxend
d222d3
%endif
d222d3
d222d3
0b8103
%post daemon-config-network
0b8103
if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then
0b8103
    # see if the network used by default network creates a conflict,
0b8103
    # and try to resolve it
0b8103
    # NB: 192.168.122.0/24 is used in the default.xml template file;
0b8103
    # do not modify any of those values here without also modifying
0b8103
    # them in the template.
0b8103
    orig_sub=122
0b8103
    sub=${orig_sub}
0b8103
    nl='
0b8103
'
0b8103
    routes="${nl}$(ip route show | cut -d' ' -f1)${nl}"
0b8103
    case ${routes} in
0b8103
      *"${nl}192.168.${orig_sub}.0/24${nl}"*)
0b8103
        # there was a match, so we need to look for an unused subnet
0b8103
        for new_sub in $(seq 124 254); do
0b8103
          case ${routes} in
0b8103
          *"${nl}192.168.${new_sub}.0/24${nl}"*)
0b8103
            ;;
0b8103
          *)
0b8103
            sub=$new_sub
0b8103
            break;
0b8103
            ;;
0b8103
          esac
0b8103
        done
0b8103
        ;;
0b8103
      *)
0b8103
        ;;
0b8103
    esac
0b8103
0b8103
    sed -e "s/${orig_sub}/${sub}/g" \
0b8103
         < %{_datadir}/libvirt/networks/default.xml \
0b8103
         > %{_sysconfdir}/libvirt/qemu/networks/default.xml
0b8103
    ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
0b8103
    # libvirt saves this file with mode 0600
0b8103
    chmod 0600 %{_sysconfdir}/libvirt/qemu/networks/default.xml
0b8103
0b8103
    # Make sure libvirt picks up the new network defininiton
d222d3
    %libvirt_daemon_schedule_restart libvirtd
d222d3
    %libvirt_daemon_schedule_restart virtnetworkd
0b8103
fi
0b8103
0b8103
%posttrans daemon-config-network
d222d3
%libvirt_daemon_perform_restart libvirtd
d222d3
%libvirt_daemon_perform_restart virtnetworkd
0b8103
0b8103
%post daemon-config-nwfilter
0b8103
for datadir_file in %{_datadir}/libvirt/nwfilter/*.xml; do
0b8103
  sysconfdir_file=%{_sysconfdir}/libvirt/nwfilter/$(basename "$datadir_file")
0b8103
  if [ ! -f "$sysconfdir_file" ]; then
0b8103
    # libvirt saves these files with mode 600
0b8103
    install -m 0600 "$datadir_file" "$sysconfdir_file"
0b8103
  fi
0b8103
done
0b8103
# Make sure libvirt picks up the new nwfilter defininitons
d222d3
%libvirt_daemon_schedule_restart libvirtd
d222d3
%libvirt_daemon_schedule_restart virtnwfilterd
0b8103
0b8103
%posttrans daemon-config-nwfilter
d222d3
%libvirt_daemon_perform_restart libvirtd
d222d3
%libvirt_daemon_perform_restart virtnwfilterd
0b8103
0b8103
%if %{with_lxc}
0b8103
%pre login-shell
0b8103
getent group virtlogin >/dev/null || groupadd -r virtlogin
0b8103
exit 0
0b8103
%endif
0b8103
0b8103
%files
0b8103
0b8103
%files docs
0b8103
%doc AUTHORS.rst NEWS.rst README.rst
0b8103
%doc libvirt-docs/*
0b8103
0b8103
%files daemon
0b8103
0b8103
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
0b8103
0b8103
%{_unitdir}/libvirtd.service
0b8103
%{_unitdir}/libvirtd.socket
0b8103
%{_unitdir}/libvirtd-ro.socket
0b8103
%{_unitdir}/libvirtd-admin.socket
0b8103
%{_unitdir}/libvirtd-tcp.socket
0b8103
%{_unitdir}/libvirtd-tls.socket
0b8103
%{_unitdir}/virtproxyd.service
0b8103
%{_unitdir}/virtproxyd.socket
0b8103
%{_unitdir}/virtproxyd-ro.socket
0b8103
%{_unitdir}/virtproxyd-admin.socket
0b8103
%{_unitdir}/virtproxyd-tcp.socket
0b8103
%{_unitdir}/virtproxyd-tls.socket
0b8103
%{_unitdir}/virt-guest-shutdown.target
0b8103
%{_unitdir}/virtlogd.service
0b8103
%{_unitdir}/virtlogd.socket
0b8103
%{_unitdir}/virtlogd-admin.socket
0b8103
%{_unitdir}/virtlockd.service
0b8103
%{_unitdir}/virtlockd.socket
0b8103
%{_unitdir}/virtlockd-admin.socket
0b8103
%{_unitdir}/libvirt-guests.service
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
0b8103
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
0b8103
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
0b8103
0b8103
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
0b8103
%dir %{_datadir}/libvirt/
0b8103
0b8103
%ghost %dir %{_rundir}/libvirt/
0b8103
0b8103
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
0b8103
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/
0b8103
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
0b8103
%dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/
0b8103
0b8103
0b8103
%dir %attr(0755, root, root) %{_libdir}/libvirt/
0b8103
%dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/
0b8103
%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver
0b8103
%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so
0b8103
0b8103
%{_datadir}/augeas/lenses/libvirtd.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
0b8103
%{_datadir}/augeas/lenses/virtlogd.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtlogd.aug
0b8103
%{_datadir}/augeas/lenses/virtlockd.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtlockd.aug
0b8103
%{_datadir}/augeas/lenses/virtproxyd.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtproxyd.aug
0b8103
%{_datadir}/augeas/lenses/libvirt_lockd.aug
0b8103
%if %{with_qemu}
0b8103
%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug
0b8103
%endif
0b8103
0b8103
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
0b8103
%{_datadir}/polkit-1/actions/org.libvirt.api.policy
0b8103
%{_datadir}/polkit-1/rules.d/50-libvirt.rules
0b8103
0b8103
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
0b8103
0b8103
%attr(0755, root, root) %{_libexecdir}/libvirt_iohelper
0b8103
0b8103
%attr(0755, root, root) %{_bindir}/virt-ssh-helper
0b8103
0b8103
%attr(0755, root, root) %{_sbindir}/libvirtd
0b8103
%attr(0755, root, root) %{_sbindir}/virtproxyd
0b8103
%attr(0755, root, root) %{_sbindir}/virtlogd
0b8103
%attr(0755, root, root) %{_sbindir}/virtlockd
0b8103
%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh
0b8103
0b8103
%{_mandir}/man1/virt-admin.1*
0b8103
%{_mandir}/man1/virt-host-validate.1*
954c63
%{_mandir}/man8/virt-ssh-helper.8*
954c63
%{_mandir}/man8/libvirt-guests.8*
0b8103
%{_mandir}/man8/libvirtd.8*
0b8103
%{_mandir}/man8/virtlogd.8*
0b8103
%{_mandir}/man8/virtlockd.8*
0b8103
%{_mandir}/man8/virtproxyd.8*
0b8103
%{_mandir}/man7/virkey*.7*
0b8103
0b8103
%{_bindir}/virt-host-validate
0b8103
%{_bindir}/virt-admin
0b8103
%{_datadir}/bash-completion/completions/virt-admin
0b8103
0b8103
%files daemon-config-network
0b8103
%dir %{_datadir}/libvirt/networks/
0b8103
%{_datadir}/libvirt/networks/default.xml
0b8103
%ghost %{_sysconfdir}/libvirt/qemu/networks/default.xml
0b8103
%ghost %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
0b8103
0b8103
%files daemon-config-nwfilter
0b8103
%dir %{_datadir}/libvirt/nwfilter/
0b8103
%{_datadir}/libvirt/nwfilter/*.xml
0b8103
%ghost %{_sysconfdir}/libvirt/nwfilter/*.xml
0b8103
0b8103
%files daemon-driver-interface
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtinterfaced.conf
0b8103
%{_datadir}/augeas/lenses/virtinterfaced.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtinterfaced.aug
0b8103
%{_unitdir}/virtinterfaced.service
0b8103
%{_unitdir}/virtinterfaced.socket
0b8103
%{_unitdir}/virtinterfaced-ro.socket
0b8103
%{_unitdir}/virtinterfaced-admin.socket
0b8103
%attr(0755, root, root) %{_sbindir}/virtinterfaced
0b8103
%{_libdir}/%{name}/connection-driver/libvirt_driver_interface.so
0b8103
%{_mandir}/man8/virtinterfaced.8*
0b8103
0b8103
%files daemon-driver-network
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtnetworkd.conf
0b8103
%{_datadir}/augeas/lenses/virtnetworkd.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtnetworkd.aug
0b8103
%{_unitdir}/virtnetworkd.service
0b8103
%{_unitdir}/virtnetworkd.socket
0b8103
%{_unitdir}/virtnetworkd-ro.socket
0b8103
%{_unitdir}/virtnetworkd-admin.socket
0b8103
%attr(0755, root, root) %{_sbindir}/virtnetworkd
0b8103
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
0b8103
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
0b8103
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
0b8103
%ghost %dir %{_rundir}/libvirt/network/
0b8103
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
0b8103
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
0b8103
%attr(0755, root, root) %{_libexecdir}/libvirt_leaseshelper
0b8103
%{_libdir}/%{name}/connection-driver/libvirt_driver_network.so
0b8103
%{_mandir}/man8/virtnetworkd.8*
0b8103
0b8103
%if %{with_firewalld_zone}
0b8103
%{_prefix}/lib/firewalld/zones/libvirt.xml
0b8103
%endif
0b8103
0b8103
%files daemon-driver-nodedev
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtnodedevd.conf
0b8103
%{_datadir}/augeas/lenses/virtnodedevd.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtnodedevd.aug
0b8103
%{_unitdir}/virtnodedevd.service
0b8103
%{_unitdir}/virtnodedevd.socket
0b8103
%{_unitdir}/virtnodedevd-ro.socket
0b8103
%{_unitdir}/virtnodedevd-admin.socket
0b8103
%attr(0755, root, root) %{_sbindir}/virtnodedevd
0b8103
%{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so
0b8103
%{_mandir}/man8/virtnodedevd.8*
0b8103
0b8103
%files daemon-driver-nwfilter
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtnwfilterd.conf
0b8103
%{_datadir}/augeas/lenses/virtnwfilterd.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtnwfilterd.aug
0b8103
%{_unitdir}/virtnwfilterd.service
0b8103
%{_unitdir}/virtnwfilterd.socket
0b8103
%{_unitdir}/virtnwfilterd-ro.socket
0b8103
%{_unitdir}/virtnwfilterd-admin.socket
0b8103
%attr(0755, root, root) %{_sbindir}/virtnwfilterd
0b8103
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
0b8103
%ghost %dir %{_rundir}/libvirt/network/
0b8103
%{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so
0b8103
%{_mandir}/man8/virtnwfilterd.8*
0b8103
0b8103
%files daemon-driver-secret
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtsecretd.conf
0b8103
%{_datadir}/augeas/lenses/virtsecretd.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtsecretd.aug
0b8103
%{_unitdir}/virtsecretd.service
0b8103
%{_unitdir}/virtsecretd.socket
0b8103
%{_unitdir}/virtsecretd-ro.socket
0b8103
%{_unitdir}/virtsecretd-admin.socket
0b8103
%attr(0755, root, root) %{_sbindir}/virtsecretd
0b8103
%{_libdir}/%{name}/connection-driver/libvirt_driver_secret.so
0b8103
%{_mandir}/man8/virtsecretd.8*
0b8103
0b8103
%files daemon-driver-storage
0b8103
0b8103
%files daemon-driver-storage-core
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtstoraged.conf
0b8103
%{_datadir}/augeas/lenses/virtstoraged.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtstoraged.aug
0b8103
%{_unitdir}/virtstoraged.service
0b8103
%{_unitdir}/virtstoraged.socket
0b8103
%{_unitdir}/virtstoraged-ro.socket
0b8103
%{_unitdir}/virtstoraged-admin.socket
0b8103
%attr(0755, root, root) %{_sbindir}/virtstoraged
0b8103
%attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
0b8103
%{_libdir}/%{name}/connection-driver/libvirt_driver_storage.so
0b8103
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_fs.so
0b8103
%{_libdir}/%{name}/storage-file/libvirt_storage_file_fs.so
0b8103
%{_mandir}/man8/virtstoraged.8*
0b8103
0b8103
%files daemon-driver-storage-disk
0b8103
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_disk.so
0b8103
0b8103
%files daemon-driver-storage-logical
0b8103
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_logical.so
0b8103
0b8103
%files daemon-driver-storage-scsi
0b8103
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_scsi.so
0b8103
0b8103
%files daemon-driver-storage-iscsi
0b8103
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi.so
0b8103
0b8103
%if %{with_storage_iscsi_direct}
0b8103
%files daemon-driver-storage-iscsi-direct
0b8103
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi-direct.so
0b8103
%endif
0b8103
0b8103
%files daemon-driver-storage-mpath
0b8103
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_mpath.so
0b8103
0b8103
%if %{with_storage_gluster}
0b8103
%files daemon-driver-storage-gluster
0b8103
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_gluster.so
0b8103
%{_libdir}/%{name}/storage-file/libvirt_storage_file_gluster.so
0b8103
%endif
0b8103
0b8103
%if %{with_storage_rbd}
0b8103
%files daemon-driver-storage-rbd
0b8103
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_rbd.so
0b8103
%endif
0b8103
0b8103
%if %{with_storage_sheepdog}
0b8103
%files daemon-driver-storage-sheepdog
0b8103
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so
0b8103
%endif
0b8103
0b8103
%if %{with_storage_zfs}
0b8103
%files daemon-driver-storage-zfs
0b8103
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_zfs.so
0b8103
%endif
0b8103
0b8103
%if %{with_qemu}
0b8103
%files daemon-driver-qemu
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtqemud.conf
954c63
%config(noreplace) %{_prefix}/lib/sysctl.d/60-qemu-postcopy-migration.conf
0b8103
%{_datadir}/augeas/lenses/virtqemud.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtqemud.aug
0b8103
%{_unitdir}/virtqemud.service
0b8103
%{_unitdir}/virtqemud.socket
0b8103
%{_unitdir}/virtqemud-ro.socket
0b8103
%{_unitdir}/virtqemud-admin.socket
0b8103
%attr(0755, root, root) %{_sbindir}/virtqemud
0b8103
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
0b8103
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf
0b8103
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
0b8103
%ghost %dir %{_rundir}/libvirt/qemu/
0b8103
%dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
d222d3
%dir %attr(0750, root, root) %{_localstatedir}/cache/libvirt/qemu/
0b8103
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
0b8103
%{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so
0b8103
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/swtpm/
0b8103
%dir %attr(0730, tss, tss) %{_localstatedir}/log/swtpm/libvirt/qemu/
0b8103
%{_bindir}/virt-qemu-run
0b8103
%{_mandir}/man1/virt-qemu-run.1*
0b8103
%{_mandir}/man8/virtqemud.8*
0b8103
%endif
0b8103
0b8103
%if %{with_lxc}
0b8103
%files daemon-driver-lxc
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtlxcd.conf
0b8103
%{_datadir}/augeas/lenses/virtlxcd.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtlxcd.aug
0b8103
%{_unitdir}/virtlxcd.service
0b8103
%{_unitdir}/virtlxcd.socket
0b8103
%{_unitdir}/virtlxcd-ro.socket
0b8103
%{_unitdir}/virtlxcd-admin.socket
0b8103
%attr(0755, root, root) %{_sbindir}/virtlxcd
0b8103
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/lxc.conf
0b8103
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc
0b8103
%ghost %dir %{_rundir}/libvirt/lxc/
0b8103
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/
0b8103
%{_datadir}/augeas/lenses/libvirtd_lxc.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
0b8103
%attr(0755, root, root) %{_libexecdir}/libvirt_lxc
0b8103
%{_libdir}/%{name}/connection-driver/libvirt_driver_lxc.so
0b8103
%{_mandir}/man8/virtlxcd.8*
0b8103
%endif
0b8103
0b8103
%if %{with_libxl}
0b8103
%files daemon-driver-libxl
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtxend.conf
0b8103
%{_datadir}/augeas/lenses/virtxend.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtxend.aug
0b8103
%{_unitdir}/virtxend.service
0b8103
%{_unitdir}/virtxend.socket
0b8103
%{_unitdir}/virtxend-ro.socket
0b8103
%{_unitdir}/virtxend-admin.socket
0b8103
%attr(0755, root, root) %{_sbindir}/virtxend
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/libxl.conf
0b8103
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.libxl
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/libxl-lockd.conf
0b8103
%{_datadir}/augeas/lenses/libvirtd_libxl.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
0b8103
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/
0b8103
%ghost %dir %{_rundir}/libvirt/libxl/
0b8103
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
0b8103
%{_libdir}/%{name}/connection-driver/libvirt_driver_libxl.so
0b8103
%{_mandir}/man8/virtxend.8*
0b8103
%endif
0b8103
0b8103
%if %{with_vbox}
0b8103
%files daemon-driver-vbox
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virtvboxd.conf
0b8103
%{_datadir}/augeas/lenses/virtvboxd.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_virtvboxd.aug
0b8103
%{_unitdir}/virtvboxd.service
0b8103
%{_unitdir}/virtvboxd.socket
0b8103
%{_unitdir}/virtvboxd-ro.socket
0b8103
%{_unitdir}/virtvboxd-admin.socket
0b8103
%attr(0755, root, root) %{_sbindir}/virtvboxd
0b8103
%{_libdir}/%{name}/connection-driver/libvirt_driver_vbox.so
0b8103
%{_mandir}/man8/virtvboxd.8*
0b8103
%endif
0b8103
0b8103
%if %{with_qemu_tcg}
0b8103
%files daemon-qemu
0b8103
%endif
0b8103
0b8103
%if %{with_qemu_kvm}
0b8103
%files daemon-kvm
0b8103
%endif
0b8103
0b8103
%if %{with_lxc}
0b8103
%files daemon-lxc
0b8103
%endif
0b8103
0b8103
%if %{with_libxl}
0b8103
%files daemon-xen
0b8103
%endif
0b8103
0b8103
%if %{with_vbox}
0b8103
%files daemon-vbox
0b8103
%endif
0b8103
0b8103
%if %{with_sanlock}
0b8103
%files lock-sanlock
0b8103
    %if %{with_qemu}
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf
0b8103
    %endif
0b8103
    %if %{with_libxl}
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/libxl-sanlock.conf
0b8103
    %endif
0b8103
%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so
0b8103
%{_datadir}/augeas/lenses/libvirt_sanlock.aug
0b8103
%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
0b8103
%dir %attr(0770, root, sanlock) %{_localstatedir}/lib/libvirt/sanlock
0b8103
%{_sbindir}/virt-sanlock-cleanup
0b8103
%{_mandir}/man8/virt-sanlock-cleanup.8*
0b8103
%attr(0755, root, root) %{_libexecdir}/libvirt_sanlock_helper
0b8103
%endif
0b8103
0b8103
%files client
0b8103
%{_mandir}/man1/virsh.1*
0b8103
%{_mandir}/man1/virt-xml-validate.1*
954c63
%{_mandir}/man1/virt-pki-query-dn.1*
0b8103
%{_mandir}/man1/virt-pki-validate.1*
0b8103
%{_bindir}/virsh
0b8103
%{_bindir}/virt-xml-validate
18dc33
%{_bindir}/virt-pki-query-dn
0b8103
%{_bindir}/virt-pki-validate
0b8103
0b8103
%{_datadir}/bash-completion/completions/virsh
0b8103
0b8103
%files libs -f %{name}.lang
0b8103
%license COPYING COPYING.LESSER
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/libvirt-admin.conf
0b8103
%{_libdir}/libvirt.so.*
0b8103
%{_libdir}/libvirt-qemu.so.*
0b8103
%{_libdir}/libvirt-lxc.so.*
0b8103
%{_libdir}/libvirt-admin.so.*
0b8103
%dir %{_datadir}/libvirt/
0b8103
%dir %{_datadir}/libvirt/schemas/
0b8103
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/
0b8103
0b8103
%{_datadir}/systemtap/tapset/libvirt_probes*.stp
0b8103
%{_datadir}/systemtap/tapset/libvirt_functions.stp
0b8103
%if %{with_qemu}
0b8103
%{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp
0b8103
%endif
0b8103
0b8103
%{_datadir}/libvirt/schemas/*.rng
0b8103
0b8103
%{_datadir}/libvirt/cpu_map/*.xml
0b8103
0b8103
%{_datadir}/libvirt/test-screenshot.png
0b8103
0b8103
%if %{with_wireshark}
0b8103
%files wireshark
0b8103
%{wireshark_plugindir}/libvirt.so
0b8103
%endif
0b8103
0b8103
%files nss
0b8103
%{_libdir}/libnss_libvirt.so.2
0b8103
%{_libdir}/libnss_libvirt_guest.so.2
0b8103
0b8103
%if %{with_lxc}
0b8103
%files login-shell
0b8103
%attr(4750, root, virtlogin) %{_bindir}/virt-login-shell
0b8103
%{_libexecdir}/virt-login-shell-helper
0b8103
%config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf
0b8103
%{_mandir}/man1/virt-login-shell.1*
0b8103
%endif
0b8103
0b8103
%files devel
0b8103
%{_libdir}/libvirt.so
0b8103
%{_libdir}/libvirt-admin.so
0b8103
%{_libdir}/libvirt-qemu.so
0b8103
%{_libdir}/libvirt-lxc.so
0b8103
%dir %{_includedir}/libvirt
0b8103
%{_includedir}/libvirt/virterror.h
0b8103
%{_includedir}/libvirt/libvirt.h
0b8103
%{_includedir}/libvirt/libvirt-admin.h
0b8103
%{_includedir}/libvirt/libvirt-common.h
0b8103
%{_includedir}/libvirt/libvirt-domain.h
0b8103
%{_includedir}/libvirt/libvirt-domain-checkpoint.h
0b8103
%{_includedir}/libvirt/libvirt-domain-snapshot.h
0b8103
%{_includedir}/libvirt/libvirt-event.h
0b8103
%{_includedir}/libvirt/libvirt-host.h
0b8103
%{_includedir}/libvirt/libvirt-interface.h
0b8103
%{_includedir}/libvirt/libvirt-network.h
0b8103
%{_includedir}/libvirt/libvirt-nodedev.h
0b8103
%{_includedir}/libvirt/libvirt-nwfilter.h
0b8103
%{_includedir}/libvirt/libvirt-secret.h
0b8103
%{_includedir}/libvirt/libvirt-storage.h
0b8103
%{_includedir}/libvirt/libvirt-stream.h
0b8103
%{_includedir}/libvirt/libvirt-qemu.h
0b8103
%{_includedir}/libvirt/libvirt-lxc.h
0b8103
%{_libdir}/pkgconfig/libvirt.pc
0b8103
%{_libdir}/pkgconfig/libvirt-admin.pc
0b8103
%{_libdir}/pkgconfig/libvirt-qemu.pc
0b8103
%{_libdir}/pkgconfig/libvirt-lxc.pc
0b8103
0b8103
%dir %{_datadir}/libvirt/api/
0b8103
%{_datadir}/libvirt/api/libvirt-api.xml
0b8103
%{_datadir}/libvirt/api/libvirt-admin-api.xml
0b8103
%{_datadir}/libvirt/api/libvirt-qemu-api.xml
0b8103
%{_datadir}/libvirt/api/libvirt-lxc-api.xml
0b8103
0b8103
0b8103
%changelog
954c63
* Thu Feb 10 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-4
954c63
- qemu_command: Generate memory only after controllers (rhbz#2047271)
954c63
- qemu: Validate domain definition even on migration (rhbz#2048435)
954c63
954c63
* Wed Feb  2 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-3
954c63
- qemuDomainSetupDisk: Initialize 'targetPaths' (rhbz#2046170)
954c63
954c63
* Tue Jan 25 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-2
954c63
- build: Only install libvirt-guests when building libvirtd (rhbz#2042529)
954c63
- docs: Add man page for libvirt-guests (rhbz#2042529)
954c63
- remove sysconfig files (rhbz#2042529)
954c63
- spec: Run pre/post-install stuff on 'daemon-driver-storage-core' (rhbz#2025644)
954c63
- qemu: fix inactive snapshot revert (rhbz#2039136)
954c63
- Revert "report error when virProcessGetStatInfo() is unable to parse data" (rhbz#2043579)
954c63
954c63
* Fri Jan 14 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-1
954c63
- Rebased to libvirt-8.0.0 (rhbz#2001507)
954c63
- The rebase also fixes the following bugs:
954c63
    rhbz#2039246, rhbz#2039652, rhbz#2039651, rhbz#2039131
954c63
954c63
* Mon Jan 10 2022 Jiri Denemark <jdenemar@redhat.com> - 8.0.0-0rc1.1
954c63
- Rebased to libvirt-8.0.0-rc1 (rhbz#2001507)
954c63
- The rebase also fixes the following bugs:
954c63
    rhbz#2034539, rhbz#2027400, rhbz#1945420, rhbz#1851249, rhbz#2032410
954c63
    rhbz#2026812, rhbz#2032365, rhbz#2035888, rhbz#2036895, rhbz#2026537
954c63
18dc33
* Wed Dec  1 2021 Jiri Denemark <jdenemar@redhat.com> - 7.10.0-1
18dc33
- Rebased to libvirt-7.10.0 (rhbz#2001507)
18dc33
- The rebase also fixes the following bugs:
18dc33
    rhbz#2024098, rhbz#1964223, rhbz#2018488, rhbz#2021437, rhbz#2022589
18dc33
    rhbz#2023605, rhbz#1431589, rhbz#2024435, rhbz#2016599, rhbz#1945501
18dc33
    rhbz#2023674
18dc33
d222d3
* Fri Nov  5 2021 Jiri Denemark <jdenemar@redhat.com> - 7.9.0-1
d222d3
- Rebased to libvirt-7.9.0 (rhbz#2001507)
d222d3
- The rebase also fixes the following bugs:
d222d3
    rhbz#2007659, rhbz#2014487, rhbz#1806856, rhbz#2014139, rhbz#1964223
d222d3
    rhbz#2007168, rhbz#2012386, rhbz#2013573, rhbz#1897708
d222d3
d222d3
* Tue Oct  5 2021 Jiri Denemark <jdenemar@redhat.com> - 7.8.0-1
d222d3
- Rebased to libvirt-7.8.0 (rhbz#2001507)
d222d3
- The rebase also fixes the following bugs:
d222d3
    rhbz#1999420, rhbz#2002761, rhbz#1998920, rhbz#1986066, rhbz#1822891
d222d3
    rhbz#2001627, rhbz#1819160, rhbz#2000861, rhbz#2003092
d222d3
d222d3
* Wed Sep 22 2021 Jiri Denemark <jdenemar@redhat.com> - 7.7.0-3
d222d3
- virshDomainGetVcpuBitmap: Return bitmap when taking the fallback path (rhbz#2004429)
d222d3
d222d3
* Tue Sep 21 2021 Jiri Denemark <jdenemar@redhat.com> - 7.7.0-2
d222d3
- Update gating.yaml by adding subject_type
d222d3
- Revert "RHEL: spec: Do not enable modular daemons yet" (rhbz#1920012)
d222d3
d222d3
* Fri Sep 10 2021 Jiri Denemark <jdenemar@redhat.com> - 7.7.0-1
d222d3
- Rebased to libvirt-7.7.0 (rhbz#2001507)
d222d3
- The rebase also fixes the following bugs:
d222d3
    rhbz#2001326, rhbz#2001391, rhbz#2001322, rhbz#2001389, rhbz#1967187
d222d3
    rhbz#2001327, rhbz#1977155, rhbz#2001997, rhbz#2001323
d222d3
- RHEL: spec: Do not enable modular daemons yet (rhbz#2001507)
d222d3
0b8103
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 7.6.0-2
0b8103
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
0b8103
  Related: rhbz#1991688
0b8103
0b8103
* Wed Aug  4 2021 Jiri Denemark <jdenemar@redhat.com> - 7.6.0-1
0b8103
- Rebased to libvirt-7.6.0 (rhbz#1950948)
0b8103
- The rebase also fixes the following bugs:
0b8103
    rhbz#1986509, rhbz#1984318, rhbz#1810661, rhbz#1977776, rhbz#1948433
0b8103
    rhbz#1978526, rhbz#1976690
0b8103
0b8103
* Wed Jul 14 2021 Jiri Denemark <jdenemar@redhat.com> - 7.5.0-1
0b8103
- Rebased to libvirt-7.5.0 (rhbz#1950948)
0b8103
- The rebase also fixes the following bugs:
0b8103
    rhbz#1949388, rhbz#1969354, rhbz#1970277, rhbz#1972145, rhbz#1973094
0b8103
    rhbz#1975071, rhbz#1972468, rhbz#1975677
0b8103
0b8103
* Mon Jun  7 2021 Jiri Denemark <jdenemar@redhat.com> - 7.4.0-1
0b8103
- Rebased to libvirt-7.4.0 (rhbz#1950948)
0b8103
- The rebase also fixes the following bugs:
0b8103
    rhbz#1960993
0b8103
0b8103
* Mon May 24 2021 Jiri Denemark <jdenemar@redhat.com> - 7.3.0-1
0b8103
- Rebased to libvirt-7.3.0 (rhbz#1950948)
0b8103
- The rebase also fixes the following bugs:
0b8103
    rhbz#1898526, rhbz#1910617, rhbz#1910618, rhbz#1943392, rhbz#1946918
0b8103
    rhbz#1947718, rhbz#1947720, rhbz#1947824, rhbz#1949342, rhbz#1950228
0b8103
    rhbz#1950301, rhbz#1950601, rhbz#1950948, rhbz#1953939, rhbz#1958302
0b8103
    rhbz#1962053
0b8103
- RHEL: Enable usage of x-blockdev-reopen (rhbz#1953939)
0b8103
- RHEL: Add gating.yaml for RHEL9 (rhbz#1950601)
0b8103
0b8103
* Thu Apr 22 2021 Jiri Denemark <jdenemar@redhat.com> - 7.0.0-6
0b8103
- spec: Do not build qemu driver for Power on RHEL-9 (rhbz#1946529)
0b8103
0b8103
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 7.0.0-5
0b8103
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
0b8103
0b8103
* Wed Feb 03 2021 Cole Robinson <aintdiscole@gmail.com> - 7.0.0-4
0b8103
- Increase meson test timeout to fix builds on s390x copr
0b8103
0b8103
* Tue Feb 02 2021 Laine Stump <laine@redhat.com> - 7.0.0-3
0b8103
- disable netcf in build
0b8103
0b8103
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-2
0b8103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
0b8103
0b8103
* Fri Jan 15 2021 Daniel P. Berrangé <berrange@redhat.com> - 7.0.0-1
0b8103
- Rebase to 7.0.0 release
0b8103
0b8103
* Fri Dec 04 2020 Cole Robinson <aintdiscole@gmail.com> - 6.10.0-2.1
0b8103
- Rebuild for wireshark soname bump
0b8103
0b8103
* Fri Dec 04 2020 Richard W.M. Jones <rjones@redhat.com> - 6.10.0-2
0b8103
- Build libvirt-daemon-kvm for riscv64.
0b8103
0b8103
* Tue Dec 01 2020 Cole Robinson <crobinso@redhat.com> - 6.10.0-1
0b8103
- Update to version 6.10.0
0b8103
0b8103
* Wed Nov  4 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.9.0-2
0b8103
- Re-apply reverted fix for disabling glusterfs, curl, openswman and libiscsi
0b8103
0b8103
* Tue Nov 03 2020 Cole Robinson <crobinso@redhat.com> - 6.9.0-1
0b8103
- Update to version 6.9.0
0b8103
0b8103
* Mon Nov  2 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.8.0-4
0b8103
- Really fix meson option for disabling glusterfs
0b8103
- Fix disabling curl, openswman and libiscsi
0b8103
0b8103
* Mon Nov  2 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.8.0-4
0b8103
- Fix name of meson option for disabling glusterfs
0b8103
0b8103
* Fri Oct 30 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.8.0-3
0b8103
- Fix stat() mocking for new glibc
0b8103
0b8103
* Wed Oct 28 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.8.0-2
0b8103
- Remove obsolete bash_completion conditional
0b8103
- Pass args to meson based on with_libssh/with_libssh2
0b8103
0b8103
* Thu Oct 01 2020 Cole Robinson <crobinso@redhat.com> - 6.8.0-1
0b8103
- Update to version 6.8.0
0b8103
0b8103
* Fri Sep  4 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.7.0-2
0b8103
- Fix QEMU start when KVM is not loaded (rhbz#1875327)
0b8103
0b8103
* Tue Sep 01 2020 Cole Robinson <crobinso@redhat.com> - 6.7.0-1
0b8103
- Update to version 6.7.0
0b8103
0b8103
* Fri Aug 21 2020 Merlin Mathesius <mmathesi@redhat.com> - 6.6.0-3
0b8103
- Fix so no platforms depend upon ceph for 32-bit architectures
0b8103
- Include upstream patches to fix GCC 10 warnings
0b8103
0b8103
* Fri Aug 21 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.6.0-2
0b8103
- Fix creation of pools on non-btrfs (rhbz#1870197)
0b8103
0b8103
* Tue Aug 04 2020 Cole Robinson <crobinso@redhat.com> - 6.6.0-1
0b8103
- Update to version 6.6.0
0b8103
0b8103
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.0-2
0b8103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
0b8103
0b8103
* Fri Jul 03 2020 Cole Robinson <crobinso@redhat.com> - 6.5.0-1
0b8103
- Update to version 6.5.0
0b8103
0b8103
* Tue Jun 02 2020 Cole Robinson <crobinso@redhat.com> - 6.4.0-1
0b8103
- Update to version 6.4.0
0b8103
0b8103
* Tue May 05 2020 Cole Robinson <crobinso@redhat.com> - 6.3.0-1
0b8103
- Update to version 6.3.0
0b8103
0b8103
* Thu Apr 02 2020 Cole Robinson <crobinso@redhat.com> - 6.2.0-1
0b8103
- Update to version 6.2.0
0b8103
0b8103
* Tue Mar 24 2020 Felipe Borges <feborges@redhat.com> - 6.1.0-2
0b8103
- Check for disk type correctly in virDomainDiskTranslateSourcePool
0b8103
0b8103
* Wed Mar 04 2020 Cole Robinson <crobinso@redhat.com> - 6.1.0-1
0b8103
- Update to version 6.1.0
0b8103
0b8103
* Tue Feb 25 2020 Cole Robinson <crobinso@redhat.com> - 6.0.0-3
0b8103
- Rebuild for libiscsi soname bump
0b8103
0b8103
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-2
0b8103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
0b8103
0b8103
* Wed Jan 15 2020 Cole Robinson <crobinso@redhat.com> - 6.0.0-1
0b8103
- Update to version 6.0.0