render / rpms / libvirt

Forked from rpms/libvirt a year ago
Clone
9b4927
# -*- rpm-spec -*-
9b4927
9b4927
# On RHEL 7 and older macro _vpath_builddir is not defined.
9b4927
%if 0%{?rhel} && 0%{?rhel} <= 7
9b4927
    %define _vpath_builddir %{_target_platform}
9b4927
%endif
9b4927
9b4927
%define arches_qemu_kvm         %{ix86} x86_64 amd64 %{power64} %{arm} aarch64 arm64 s390x
9b4927
%if 0%{?rhel}
9b4927
    %define arches_qemu_kvm     x86_64 %{power64} aarch64 s390x
9b4927
%endif
9b4927
9b4927
%define arches_64bit            x86_64 amd64 %{power64} aarch64 arm64 s390x riscv64
9b4927
%define arches_x86              %{ix86} x86_64 amd64
9b4927
9b4927
%define arches_systemtap_64bit  %{arches_64bit}
9b4927
%define arches_dmidecode        %{arches_x86}
9b4927
%define arches_xen              %{arches_x86} aarch64 arm64
9b4927
%define arches_vbox             %{arches_x86}
9b4927
%define arches_ceph             %{arches_64bit}
9b4927
%define arches_zfs              %{arches_x86} %{power64} %{arm}
9b4927
%define arches_numactl          %{arches_x86} %{power64} aarch64 arm64
9b4927
%define arches_numad            %{arches_x86} %{power64} aarch64 arm64
9b4927
9b4927
# The hypervisor drivers that run in libvirtd
9b4927
%define with_qemu          0%{!?_without_qemu:1}
9b4927
%define with_lxc           0%{!?_without_lxc:1}
9b4927
%define with_libxl         0%{!?_without_libxl:1}
9b4927
%define with_vbox          0%{!?_without_vbox:1}
9b4927
9b4927
%ifarch %{arches_qemu_kvm}
9b4927
    %define with_qemu_kvm      %{with_qemu}
9b4927
%else
9b4927
    %define with_qemu_kvm      0
9b4927
%endif
9b4927
9b4927
%define with_qemu_tcg      %{with_qemu}
9b4927
9b4927
# RHEL disables TCG on all architectures
9b4927
%if 0%{?rhel}
9b4927
    %define with_qemu_tcg 0
9b4927
%endif
9b4927
9b4927
%if ! %{with_qemu_tcg} && ! %{with_qemu_kvm}
9b4927
    %define with_qemu 0
9b4927
%endif
9b4927
9b4927
# Then the hypervisor drivers that run outside libvirtd, in libvirt.so
9b4927
%define with_openvz        0%{!?_without_openvz:1}
9b4927
%define with_vmware        0%{!?_without_vmware:1}
9b4927
%define with_esx           0%{!?_without_esx:1}
9b4927
%define with_hyperv        0%{!?_without_hyperv:1}
9b4927
9b4927
# Then the secondary host drivers, which run inside libvirtd
9b4927
%define with_storage_rbd      0%{!?_without_storage_rbd:1}
9b4927
%if 0%{?fedora}
9b4927
    %define with_storage_sheepdog 0%{!?_without_storage_sheepdog:1}
9b4927
%else
9b4927
    %define with_storage_sheepdog 0
9b4927
%endif
9b4927
9b4927
%define with_storage_gluster 0%{!?_without_storage_gluster:1}
9b4927
%ifnarch %{arches_qemu_kvm}
9b4927
    # gluster is only built where qemu driver is enabled on RHEL 8
9b4927
    %if 0%{?rhel} >= 8
9b4927
        %define with_storage_gluster 0
9b4927
    %endif
9b4927
%endif
9b4927
9b4927
# F25+ has zfs-fuse
9b4927
%if 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
9b4927
    %define with_storage_zfs      0%{!?_without_storage_zfs:1}
9b4927
%else
9b4927
    %define with_storage_zfs      0
9b4927
%endif
9b4927
9b4927
# We need a recent enough libiscsi (>= 1.18.0)
9b4927
%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?debian} || 0%{?ubuntu}
9b4927
    %define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
9b4927
%else
9b4927
    %define with_storage_iscsi_direct 0
9b4927
%endif
9b4927
9b4927
# Other optional features
9b4927
%define with_numactl          0%{!?_without_numactl:1}
9b4927
9b4927
# A few optional bits off by default, we enable later
9b4927
%define with_fuse             0
9b4927
%define with_sanlock          0
9b4927
%define with_numad            0
9b4927
%define with_firewalld_zone   0
9b4927
%define with_netcf            0
9b4927
%define with_libssh2          0
9b4927
%define with_wireshark        0
9b4927
%define with_libssh           0
9b4927
%define with_dmidecode        0
9b4927
9b4927
# More extra optional bits off by default, we enable later
9b4927
%define with_apparmor         0
9b4927
9b4927
# Finally set the OS / architecture specific special cases
9b4927
9b4927
# Architecture-dependent features
9b4927
%ifnarch %{arches_xen}
9b4927
    %define with_libxl 0
9b4927
%endif
9b4927
%ifnarch %{arches_vbox}
9b4927
    %define with_vbox 0
9b4927
%endif
9b4927
%ifnarch %{arches_numactl}
9b4927
    %define with_numactl 0
9b4927
%endif
9b4927
%ifnarch %{arches_zfs}
9b4927
    %define with_storage_zfs 0
9b4927
%endif
9b4927
%ifnarch %{arches_ceph}
9b4927
    %define with_storage_rbd 0
9b4927
%endif
9b4927
9b4927
# RHEL doesn't ship OpenVZ, VBox, PowerHypervisor,
9b4927
# VMware, libxenlight (Xen 4.1 and newer),
9b4927
# or HyperV.
9b4927
%if 0%{?rhel}
9b4927
    %define with_openvz 0
9b4927
    %define with_vbox 0
9b4927
    %define with_vmware 0
9b4927
    %define with_libxl 0
9b4927
    %define with_hyperv 0
9b4927
    %define with_vz 0
9b4927
9b4927
    %if 0%{?rhel} > 7
9b4927
        %define with_lxc 0
9b4927
    %endif
9b4927
%endif
9b4927
9b4927
# CentOS Hyperscale SIG enables VMware and HyperV support
9b4927
%if 0%{?rhel} && 0%{?centos_hs}
9b4927
    %define with_vmware 1
9b4927
    %define with_hyperv 1
9b4927
%endif
9b4927
9b4927
%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?debian} || 0%{?ubuntu}
9b4927
    %define with_firewalld_zone 0%{!?_without_firewalld_zone:1}
9b4927
%endif
9b4927
9b4927
%if (0%{?fedora} && 0%{?fedora} < 34) || (0%{?rhel} && 0%{?rhel} < 9)
9b4927
    %define with_netcf 0%{!?_without_netcf:1}
9b4927
%endif
9b4927
9b4927
%if 0%{?debian} || 0%{?ubuntu}
9b4927
    %define with_apparmor 0%{!?_without_apparmor:1}
9b4927
%endif
9b4927
9b4927
# fuse is used to provide virtualized /proc for LXC
9b4927
%if %{with_lxc}
9b4927
    %define with_fuse      0%{!?_without_fuse:1}
9b4927
%endif
9b4927
9b4927
# Enable sanlock library for lock management with QEMU
9b4927
# Sanlock is available only on arches where kvm is available for RHEL
9b4927
%if 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
9b4927
    %define with_sanlock 0%{!?_without_sanlock:1}
9b4927
%endif
9b4927
%if 0%{?rhel}
9b4927
    %ifarch %{arches_qemu_kvm}
9b4927
        %define with_sanlock 0%{!?_without_sanlock:1}
9b4927
    %endif
9b4927
%endif
9b4927
9b4927
# Enable libssh2 transport for new enough distros
9b4927
%if 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
9b4927
    %define with_libssh2 0%{!?_without_libssh2:1}
9b4927
%endif
9b4927
9b4927
# Enable wireshark plugins for all distros shipping libvirt 1.2.2 or newer
9b4927
%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?debian} || 0%{?ubuntu}
9b4927
    %define with_wireshark 0%{!?_without_wireshark:1}
9b4927
    %define wireshark_plugindir %(pkg-config --variable plugindir wireshark)/epan
9b4927
%endif
9b4927
9b4927
# Enable libssh transport for new enough distros
9b4927
%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?debian} || 0%{?ubuntu}
9b4927
    %define with_libssh 0%{!?_without_libssh:1}
9b4927
%endif
9b4927
9b4927
%if %{with_qemu} || %{with_lxc}
9b4927
# numad is used to manage the CPU and memory placement dynamically,
9b4927
# it's not available on many non-x86 architectures.
9b4927
    %ifarch %{arches_numad}
9b4927
        %define with_numad    0%{!?_without_numad:1}
9b4927
    %endif
9b4927
%endif
9b4927
9b4927
%ifarch %{arches_dmidecode}
9b4927
    %define with_dmidecode 0%{!?_without_dmidecode:1}
9b4927
%endif
9b4927
9b4927
# Force QEMU to run as non-root
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
%define qemu_user  libvirt-qemu
9b4927
%define qemu_group  libvirt-qemu
9b4927
%else
9b4927
%define qemu_user  qemu
9b4927
%define qemu_group  qemu
9b4927
%endif
9b4927
9b4927
9b4927
# RHEL releases provide stable tool chains and so it is safe to turn
9b4927
# compiler warning into errors without being worried about frequent
9b4927
# changes in reported warnings
9b4927
%if 0%{?rhel}
9b4927
    %define enable_werror -Dwerror=true
9b4927
%else
9b4927
    %define enable_werror -Dwerror=false
9b4927
%endif
9b4927
9b4927
%if 0%{?rhel} == 7
9b4927
    %define tls_priority "NORMAL"
9b4927
%else
9b4927
    %define tls_priority "@LIBVIRT,SYSTEM"
9b4927
%endif
9b4927
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
# Use bash as the shell to ensure scripts work correctly
9b4927
%global _buildshell /bin/bash
9b4927
%endif
9b4927
9b4927
# Package name variations for RPM/DEB
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
%define libname %{name}0
9b4927
%define nsslibname libnss-%{name}
9b4927
%define develsuffix dev
9b4927
%define docsuffix doc
9b4927
%define clientsuffix clients
9b4927
%else
9b4927
%define libname %{name}-libs
9b4927
%define nsslibname %{name}-nss
9b4927
%define develsuffix devel
9b4927
%define docsuffix docs
9b4927
%define clientsuffix client
9b4927
%endif
9b4927
9b4927
9b4927
Summary: Library providing a simple virtualization API
9b4927
Name: libvirt
9b4927
Version: 7.1.0
9b4927
Release: 4%{?dist}
9b4927
URL: https://libvirt.org/
9b4927
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Packager: Neal Gompa <ngompa@datto.com>
9b4927
Group: admin
9b4927
License: LGPL-2.1-or-later
9b4927
%else
9b4927
License: LGPLv2+
9b4927
%endif
9b4927
9b4927
%if %(echo %{version} | grep -q "\.0$"; echo $?) == 1
9b4927
    %define mainturl stable_updates/
9b4927
%endif
9b4927
Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
9b4927
Patch1: 32bit-fix.patch
9b4927
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: libvirt-daemon-config-network = %{version}-%{release}
9b4927
Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
9b4927
%if %{with_libxl}
9b4927
Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
9b4927
%endif
9b4927
%if %{with_lxc}
9b4927
Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
9b4927
%endif
9b4927
%if %{with_qemu}
9b4927
Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
9b4927
%endif
9b4927
# We had UML driver, but we've removed it.
9b4927
Obsoletes: libvirt-daemon-driver-uml <= 5.0.0
9b4927
Obsoletes: libvirt-daemon-uml <= 5.0.0
9b4927
%if %{with_vbox}
9b4927
Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
9b4927
%endif
9b4927
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
9b4927
9b4927
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-network = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
9b4927
Requires: libvirt-%{clientsuffix} = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
9b4927
# All build-time requirements. Run-time requirements are
9b4927
# listed against each sub-RPM
9b4927
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
# All build dependencies for Debian/Ubuntu
9b4927
BuildRequires: gettext
9b4927
BuildRequires: python3-docutils
9b4927
BuildRequires: gcc
9b4927
BuildRequires: meson >= 0.54.0
9b4927
BuildRequires: meson-deb-macros
9b4927
BuildRequires: ninja-build
9b4927
BuildRequires: ninja-deb-macros
9b4927
BuildRequires: make
9b4927
BuildRequires: git
9b4927
BuildRequires: perl-base
9b4927
BuildRequires: python3
9b4927
BuildRequires: systemd
9b4927
%if %{with_libxl}
9b4927
BuildRequires: libxen-dev
9b4927
%endif
9b4927
BuildRequires: libglib2.0-dev >= 2.48
9b4927
BuildRequires: libxml2-dev
9b4927
BuildRequires: libxml2-utils
9b4927
BuildRequires: xsltproc
9b4927
BuildRequires: libreadline-dev
9b4927
BuildRequires: bash-completion >= 2.0
9b4927
BuildRequires: gettext
9b4927
BuildRequires: libtasn1-dev
9b4927
BuildRequires: gnutls-dev
9b4927
BuildRequires: libattr1-dev
9b4927
# For pool-build probing for existing pools
9b4927
BuildRequires: libblkid-dev >= 2.17
9b4927
# for augparse, optionally used in testing
9b4927
BuildRequires: augeas-tools
9b4927
BuildRequires: libsystemd-dev >= 185
9b4927
BuildRequires: libpciaccess-dev >= 0.10.9
9b4927
BuildRequires: libyajl-dev
9b4927
%if %{with_sanlock}
9b4927
BuildRequires: libsanlock-dev >= 2.4
9b4927
%endif
9b4927
BuildRequires: libpcap-dev >= 1.5.0
9b4927
BuildRequires: libnl-3-dev
9b4927
BuildRequires: libnl-route-3-dev
9b4927
BuildRequires: libselinux1-dev
9b4927
BuildRequires: dnsmasq >= 2.41
9b4927
BuildRequires: iptables
9b4927
BuildRequires: radvd
9b4927
BuildRequires: ebtables
9b4927
BuildRequires: kmod
9b4927
BuildRequires: libsasl2-dev
9b4927
BuildRequires: policykit-1 >= 0.105
9b4927
# For mount/umount in FS driver
9b4927
BuildRequires: util-linux
9b4927
%if %{with_qemu}
9b4927
# For managing ACLs
9b4927
BuildRequires: libacl1-dev
9b4927
BuildRequires: qemu-utils
9b4927
%endif
9b4927
# For LVM drivers
9b4927
BuildRequires: lvm2
9b4927
# For pool type=iscsi
9b4927
BuildRequires: open-iscsi
9b4927
%if %{with_storage_iscsi_direct}
9b4927
# For pool type=iscsi-direct
9b4927
BuildRequires: libiscsi-dev
9b4927
%endif
9b4927
# For disk driver
9b4927
BuildRequires: libparted-dev
9b4927
BuildRequires: parted
9b4927
# For Multipath support
9b4927
BuildRequires: libdevmapper-dev
9b4927
# For XFS reflink clone support
9b4927
BuildRequires: xfslibs-dev
9b4927
%if %{with_storage_rbd}
9b4927
BuildRequires: librados-dev
9b4927
BuildRequires: librbd-dev
9b4927
%endif
9b4927
%if %{with_storage_gluster}
9b4927
BuildRequires: libglusterfs-dev >= 3.4.1
9b4927
%endif
9b4927
%if %{with_storage_sheepdog}
9b4927
BuildRequires: sheepdog
9b4927
%endif
9b4927
%if %{with_storage_zfs}
9b4927
# Support any conforming implementation of zfs.
9b4927
# To avoid pulling in kernel stuff, use zfs-fuse as the BR
9b4927
BuildRequires: zfs-fuse
9b4927
%endif
9b4927
%if %{with_numactl}
9b4927
# For QEMU/LXC numa info
9b4927
BuildRequires: libnuma-dev
9b4927
%endif
9b4927
BuildRequires: libcap-ng-dev >= 0.5.0
9b4927
%if %{with_fuse}
9b4927
BuildRequires: libfuse-dev >= 2.8.6
9b4927
%endif
9b4927
%if %{with_libssh2}
9b4927
BuildRequires: libssh2-1-dev >= 1.3.0
9b4927
%endif
9b4927
%if %{with_netcf}
9b4927
BuildRequires: libnetcf-dev >= 0.2.2
9b4927
%endif
9b4927
%if %{with_esx}
9b4927
BuildRequires: libcurl4-gnutls-dev
9b4927
%endif
9b4927
%if %{with_hyperv}
9b4927
BuildRequires: libopenwsman-dev >= 2.6.3
9b4927
%endif
9b4927
BuildRequires: libaudit-dev
9b4927
# we need /usr/sbin/dtrace
9b4927
BuildRequires: systemtap-sdt-dev
9b4927
9b4927
# For mount/umount in FS driver
9b4927
BuildRequires: util-linux
9b4927
# For showmount in FS driver (netfs discovery)
9b4927
BuildRequires: nfs-common
9b4927
9b4927
# Fedora build root suckage
9b4927
BuildRequires: gawk
9b4927
9b4927
# For storage wiping with different algorithms
9b4927
BuildRequires: scrub
9b4927
9b4927
%if %{with_numad}
9b4927
BuildRequires: numad
9b4927
%endif
9b4927
9b4927
%if %{with_wireshark}
9b4927
BuildRequires: libwireshark-dev
9b4927
%endif
9b4927
9b4927
%if %{with_libssh}
9b4927
BuildRequires: libssh-dev >= 0.7.0
9b4927
%endif
9b4927
9b4927
# For rpcgen
9b4927
BuildRequires: libc-dev-bin
9b4927
9b4927
BuildRequires: libtirpc-dev
9b4927
9b4927
%if %{with_firewalld_zone}
9b4927
BuildRequires: firewalld
9b4927
BuildRequires: firewalld-deb-macros
9b4927
%endif
9b4927
9b4927
%if %{with_apparmor}
9b4927
BuildRequires: apparmor-deb-macros
9b4927
BuildRequires: libapparmor-dev
9b4927
%endif
9b4927
9b4927
%else
9b4927
# All build dependencies for non-Debian targets
9b4927
9b4927
%if 0%{?rhel} == 7
9b4927
BuildRequires: python36-docutils
9b4927
%else
9b4927
BuildRequires: python3-docutils
9b4927
%endif
9b4927
BuildRequires: gcc
9b4927
BuildRequires: meson >= 0.54.0
9b4927
BuildRequires: ninja-build
9b4927
BuildRequires: make
9b4927
BuildRequires: git
9b4927
%if 0%{?fedora} || 0%{?rhel} > 7
9b4927
BuildRequires: perl-interpreter
9b4927
%else
9b4927
BuildRequires: perl
9b4927
%endif
9b4927
BuildRequires: python3
9b4927
BuildRequires: systemd-units
9b4927
%if %{with_libxl}
9b4927
BuildRequires: xen-devel
9b4927
%endif
9b4927
BuildRequires: glib2-devel >= 2.48
9b4927
BuildRequires: libxml2-devel
9b4927
BuildRequires: libxslt
9b4927
BuildRequires: readline-devel
9b4927
BuildRequires: bash-completion >= 2.0
9b4927
BuildRequires: gettext
9b4927
BuildRequires: libtasn1-devel
9b4927
BuildRequires: gnutls-devel
9b4927
BuildRequires: libattr-devel
9b4927
# For pool-build probing for existing pools
9b4927
BuildRequires: libblkid-devel >= 2.17
9b4927
# for augparse, optionally used in testing
9b4927
BuildRequires: augeas
9b4927
BuildRequires: systemd-devel >= 185
9b4927
BuildRequires: libpciaccess-devel >= 0.10.9
9b4927
BuildRequires: yajl-devel
9b4927
%if %{with_sanlock}
9b4927
BuildRequires: sanlock-devel >= 2.4
9b4927
%endif
9b4927
BuildRequires: libpcap-devel >= 1.5.0
9b4927
BuildRequires: libnl3-devel
9b4927
BuildRequires: libselinux-devel
9b4927
BuildRequires: dnsmasq >= 2.41
9b4927
BuildRequires: iptables
9b4927
BuildRequires: radvd
9b4927
BuildRequires: ebtables
9b4927
BuildRequires: module-init-tools
9b4927
BuildRequires: cyrus-sasl-devel
9b4927
BuildRequires: polkit >= 0.112
9b4927
# For mount/umount in FS driver
9b4927
BuildRequires: util-linux
9b4927
%if %{with_qemu}
9b4927
# For managing ACLs
9b4927
BuildRequires: libacl-devel
9b4927
# From QEMU RPMs
9b4927
BuildRequires: /usr/bin/qemu-img
9b4927
%endif
9b4927
# For LVM drivers
9b4927
BuildRequires: lvm2
9b4927
# For pool type=iscsi
9b4927
BuildRequires: iscsi-initiator-utils
9b4927
%if %{with_storage_iscsi_direct}
9b4927
# For pool type=iscsi-direct
9b4927
BuildRequires: libiscsi-devel
9b4927
%endif
9b4927
# For disk driver
9b4927
BuildRequires: parted-devel
9b4927
# For Multipath support
9b4927
BuildRequires: device-mapper-devel
9b4927
# For XFS reflink clone support
9b4927
BuildRequires: xfsprogs-devel
9b4927
%if %{with_storage_rbd}
9b4927
    %if 0%{?fedora} || 0%{?rhel} > 7
9b4927
BuildRequires: librados-devel
9b4927
BuildRequires: librbd-devel
9b4927
    %else
9b4927
BuildRequires: librados2-devel
9b4927
BuildRequires: librbd1-devel
9b4927
    %endif
9b4927
%endif
9b4927
%if %{with_storage_gluster}
9b4927
BuildRequires: glusterfs-api-devel >= 3.4.1
9b4927
BuildRequires: glusterfs-devel >= 3.4.1
9b4927
%endif
9b4927
%if %{with_storage_sheepdog}
9b4927
BuildRequires: sheepdog
9b4927
%endif
9b4927
%if %{with_storage_zfs}
9b4927
# Support any conforming implementation of zfs. On stock Fedora
9b4927
# this is zfs-fuse, but could be zfsonlinux upstream RPMs
9b4927
BuildRequires: /sbin/zfs
9b4927
BuildRequires: /sbin/zpool
9b4927
%endif
9b4927
%if %{with_numactl}
9b4927
# For QEMU/LXC numa info
9b4927
BuildRequires: numactl-devel
9b4927
%endif
9b4927
BuildRequires: libcap-ng-devel >= 0.5.0
9b4927
%if %{with_fuse}
9b4927
BuildRequires: fuse-devel >= 2.8.6
9b4927
%endif
9b4927
%if %{with_libssh2}
9b4927
BuildRequires: libssh2-devel >= 1.3.0
9b4927
%endif
9b4927
%if %{with_netcf}
9b4927
BuildRequires: netcf-devel >= 0.2.2
9b4927
%endif
9b4927
%if %{with_esx}
9b4927
BuildRequires: libcurl-devel
9b4927
%endif
9b4927
%if %{with_hyperv}
9b4927
BuildRequires: libwsman-devel >= 2.6.3
9b4927
%endif
9b4927
BuildRequires: audit-libs-devel
9b4927
# we need /usr/sbin/dtrace
9b4927
BuildRequires: systemtap-sdt-devel
9b4927
9b4927
# For mount/umount in FS driver
9b4927
BuildRequires: util-linux
9b4927
# For showmount in FS driver (netfs discovery)
9b4927
BuildRequires: nfs-utils
9b4927
9b4927
# Fedora build root suckage
9b4927
BuildRequires: gawk
9b4927
9b4927
# For storage wiping with different algorithms
9b4927
BuildRequires: scrub
9b4927
9b4927
%if %{with_numad}
9b4927
BuildRequires: numad
9b4927
%endif
9b4927
9b4927
%if %{with_wireshark}
9b4927
BuildRequires: wireshark-devel
9b4927
%endif
9b4927
9b4927
%if %{with_libssh}
9b4927
BuildRequires: libssh-devel >= 0.7.0
9b4927
%endif
9b4927
9b4927
# On RHEL-7 rpcgen is still part of glibc-common package
9b4927
%if 0%{?fedora} || 0%{?rhel} > 7
9b4927
BuildRequires: rpcgen
9b4927
%endif
9b4927
9b4927
BuildRequires: libtirpc-devel
9b4927
9b4927
# Needed for the firewalld_reload macro
9b4927
%if %{with_firewalld_zone}
9b4927
BuildRequires: firewalld-filesystem
9b4927
%endif
9b4927
9b4927
%if %{with_apparmor}
9b4927
BuildRequires: apparmor-rpm-macros
9b4927
BuildRequires: libapparmor-devel
9b4927
%endif
9b4927
9b4927
%endif
9b4927
9b4927
%description
9b4927
Libvirt is a C toolkit to interact with the virtualization capabilities
9b4927
of recent versions of Linux (and other OSes). The main package includes
9b4927
the libvirtd server exporting the virtualization support.
9b4927
9b4927
%package %{docsuffix}
9b4927
Summary: API reference and website documentation
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Group: doc
9b4927
%endif
9b4927
9b4927
%description %{docsuffix}
9b4927
Includes the API reference for the libvirt C library, and a complete
9b4927
copy of the libvirt.org website documentation.
9b4927
9b4927
%package daemon
9b4927
Summary: Server side daemon and supporting files for libvirt library
9b4927
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
# Obsolete the extraneous package splitting done in Debian downstream
9b4927
Breaks: %{name}-daemon-system < %{version}-%{release}
9b4927
Conflicts: %{name}-daemon-system < %{version}-%{release}
9b4927
Obsoletes: %{name}-daemon-system < %{version}-%{release}
9b4927
Provides: %{name}-daemon-system = %{version}-%{release}
9b4927
Breaks: %{name}-daemon-system-systemd < %{version}-%{release}
9b4927
Conflicts: %{name}-daemon-system-systemd < %{version}-%{release}
9b4927
Obsoletes: %{name}-daemon-system-systemd < %{version}-%{release}
9b4927
Provides: %{name}-daemon-system-systemd = %{version}-%{release}
9b4927
# We don't actually provide this, so we're just going to break it hard
9b4927
Breaks: %{name}-daemon-system-sysv < %{version}-%{release}
9b4927
Conflicts: %{name}-daemon-system-sysv < %{version}-%{release}
9b4927
Obsoletes: %{name}-daemon-system-sysv < %{version}-%{release}
9b4927
# Some files were provided in clients that belong in daemon
9b4927
Breaks: %{name}-clients < %{version}-%{release}
9b4927
%endif
9b4927
9b4927
# All runtime requirements for the libvirt package (runtime requrements
9b4927
# for subpackages are listed later in those subpackages)
9b4927
9b4927
# The client side, i.e. shared libs are in a subpackage
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
# (client invokes 'nc' against the UNIX socket on the server)
9b4927
Requires: netcat-openbsd
9b4927
9b4927
# for modprobe of pci devices
9b4927
Requires: kmod
9b4927
9b4927
# for /sbin/ip & /sbin/tc
9b4927
Requires: iproute2
9b4927
9b4927
Requires: policykit-1 >= 0.105
9b4927
%if %{with_dmidecode}
9b4927
# For virConnectGetSysinfo
9b4927
Requires: dmidecode
9b4927
%endif
9b4927
# For service management
9b4927
Requires(post): systemd-sysv
9b4927
Requires(post): systemd-sysv
9b4927
Requires(preun): systemd-sysv
9b4927
Requires(postun): systemd-sysv
9b4927
%if %{with_numad}
9b4927
Requires: numad
9b4927
%endif
9b4927
# libvirtd depends on 'messagebus' service
9b4927
Requires: dbus
9b4927
# For uid creation during pre
9b4927
Requires(pre): passwd
9b4927
%if %{with_apparmor}
9b4927
Requires: apparmor
9b4927
%endif
9b4927
9b4927
%else
9b4927
# (client invokes 'nc' against the UNIX socket on the server)
9b4927
Requires: /usr/bin/nc
9b4927
9b4927
# for modprobe of pci devices
9b4927
Requires: module-init-tools
9b4927
9b4927
# for /sbin/ip & /sbin/tc
9b4927
Requires: iproute
9b4927
# tc is provided by iproute-tc since at least Fedora 26
9b4927
%if 0%{?fedora} || 0%{?rhel} > 7
9b4927
Requires: iproute-tc
9b4927
%endif
9b4927
9b4927
Requires: polkit >= 0.112
9b4927
%if %{with_dmidecode}
9b4927
# For virConnectGetSysinfo
9b4927
Requires: dmidecode
9b4927
%endif
9b4927
# For service management
9b4927
Requires(post): systemd-units
9b4927
Requires(post): systemd-sysv
9b4927
Requires(preun): systemd-units
9b4927
Requires(postun): systemd-units
9b4927
%if %{with_numad}
9b4927
Requires: numad
9b4927
%endif
9b4927
# libvirtd depends on 'messagebus' service
9b4927
Requires: dbus
9b4927
# For uid creation during pre
9b4927
Requires(pre): shadow-utils
9b4927
%if %{with_apparmor}
9b4927
Requires: apparmor-abstractions
9b4927
%endif
9b4927
9b4927
%endif
9b4927
9b4927
%description daemon
9b4927
Server side daemon required to manage the virtualization capabilities
9b4927
of recent versions of Linux. Requires a hypervisor specific sub-RPM
9b4927
for specific drivers.
9b4927
9b4927
%package daemon-config-network
9b4927
Summary: Default configuration files for the libvirtd daemon
9b4927
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-network = %{version}-%{release}
9b4927
9b4927
%description daemon-config-network
9b4927
Default configuration files for setting up NAT based networking
9b4927
9b4927
%package daemon-config-nwfilter
9b4927
Summary: Network filter configuration files for the libvirtd daemon
9b4927
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
9b4927
9b4927
%description daemon-config-nwfilter
9b4927
Network filter configuration files for cleaning guest traffic
9b4927
9b4927
%package daemon-driver-network
9b4927
Summary: Network driver plugin for the libvirtd daemon
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
Requires: dnsmasq >= 2.41
9b4927
Requires: radvd
9b4927
Requires: iptables
9b4927
9b4927
%description daemon-driver-network
9b4927
The network driver plugin for the libvirtd daemon, providing
9b4927
an implementation of the virtual network APIs using the Linux
9b4927
bridge capabilities.
9b4927
9b4927
9b4927
%package daemon-driver-nwfilter
9b4927
Summary: Nwfilter driver plugin for the libvirtd daemon
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
Requires: iptables
9b4927
Requires: ebtables
9b4927
9b4927
%description daemon-driver-nwfilter
9b4927
The nwfilter driver plugin for the libvirtd daemon, providing
9b4927
an implementation of the firewall APIs using the ebtables,
9b4927
iptables and ip6tables capabilities
9b4927
9b4927
9b4927
%package daemon-driver-nodedev
9b4927
Summary: Nodedev driver plugin for the libvirtd daemon
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
# needed for device enumeration
9b4927
Requires: systemd >= 185
9b4927
# For managing persistent mediated devices
9b4927
%if 0%{?fedora} || 0%{?rhel} > 7
9b4927
Requires: mdevctl
9b4927
%endif
9b4927
9b4927
%description daemon-driver-nodedev
9b4927
The nodedev driver plugin for the libvirtd daemon, providing
9b4927
an implementation of the node device APIs using the udev
9b4927
capabilities.
9b4927
9b4927
9b4927
%package daemon-driver-interface
9b4927
Summary: Interface driver plugin for the libvirtd daemon
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
%if %{with_netcf}
9b4927
%if "%{_vendor}" != "debbuild"
9b4927
Requires: netcf-libs >= 0.2.2
9b4927
%endif
9b4927
%endif
9b4927
9b4927
%description daemon-driver-interface
9b4927
The interface driver plugin for the libvirtd daemon, providing
9b4927
an implementation of the host network interface APIs.
9b4927
9b4927
%package daemon-driver-secret
9b4927
Summary: Secret driver plugin for the libvirtd daemon
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
9b4927
%description daemon-driver-secret
9b4927
The secret driver plugin for the libvirtd daemon, providing
9b4927
an implementation of the secret key APIs.
9b4927
9b4927
%package daemon-driver-storage-core
9b4927
Summary: Storage driver plugin including base backends for the libvirtd daemon
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Requires: nfs-common
9b4927
%else
9b4927
Requires: nfs-utils
9b4927
%endif
9b4927
# For mkfs
9b4927
Requires: util-linux
9b4927
%if %{with_qemu}
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Requires: qemu-utils
9b4927
%else
9b4927
# From QEMU RPMs
9b4927
Requires: /usr/bin/qemu-img
9b4927
%endif
9b4927
%endif
9b4927
%if !%{with_storage_rbd}
9b4927
Obsoletes: libvirt-daemon-driver-storage-rbd < %{version}-%{release}
9b4927
%endif
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Breaks: %{name}-daemon < %{version}-%{release}
9b4927
%endif
9b4927
9b4927
%description daemon-driver-storage-core
9b4927
The storage driver plugin for the libvirtd daemon, providing
9b4927
an implementation of the storage APIs using files, local disks, LVM, SCSI,
9b4927
iSCSI, and multipath storage.
9b4927
9b4927
%package daemon-driver-storage-logical
9b4927
Summary: Storage driver plugin for lvm volumes
9b4927
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
Requires: lvm2
9b4927
9b4927
%description daemon-driver-storage-logical
9b4927
The storage driver backend adding implementation of the storage APIs for block
9b4927
volumes using lvm.
9b4927
9b4927
9b4927
%package daemon-driver-storage-disk
9b4927
Summary: Storage driver plugin for disk
9b4927
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
Requires: parted
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Requires: dmsetup
9b4927
%else
9b4927
Requires: device-mapper
9b4927
%endif
9b4927
9b4927
%description daemon-driver-storage-disk
9b4927
The storage driver backend adding implementation of the storage APIs for block
9b4927
volumes using the host disks.
9b4927
9b4927
9b4927
%package daemon-driver-storage-scsi
9b4927
Summary: Storage driver plugin for local scsi devices
9b4927
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
9b4927
%description daemon-driver-storage-scsi
9b4927
The storage driver backend adding implementation of the storage APIs for scsi
9b4927
host devices.
9b4927
9b4927
9b4927
%package daemon-driver-storage-iscsi
9b4927
Summary: Storage driver plugin for iscsi
9b4927
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Requires: open-iscsi
9b4927
%else
9b4927
Requires: iscsi-initiator-utils
9b4927
%endif
9b4927
9b4927
%description daemon-driver-storage-iscsi
9b4927
The storage driver backend adding implementation of the storage APIs for iscsi
9b4927
volumes using the host iscsi stack.
9b4927
9b4927
9b4927
%if %{with_storage_iscsi_direct}
9b4927
%package daemon-driver-storage-iscsi-direct
9b4927
Summary: Storage driver plugin for iscsi-direct
9b4927
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
9b4927
%description daemon-driver-storage-iscsi-direct
9b4927
The storage driver backend adding implementation of the storage APIs for iscsi
9b4927
volumes using libiscsi direct connection.
9b4927
%endif
9b4927
9b4927
9b4927
%package daemon-driver-storage-mpath
9b4927
Summary: Storage driver plugin for multipath volumes
9b4927
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Requires: dmsetup
9b4927
%else
9b4927
Requires: device-mapper
9b4927
%endif
9b4927
9b4927
%description daemon-driver-storage-mpath
9b4927
The storage driver backend adding implementation of the storage APIs for
9b4927
multipath storage using device mapper.
9b4927
9b4927
9b4927
%if %{with_storage_gluster}
9b4927
%package daemon-driver-storage-gluster
9b4927
Summary: Storage driver plugin for gluster
9b4927
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Requires: glusterfs-client >= 2.0.1
9b4927
%else
9b4927
    %if 0%{?fedora}
9b4927
Requires: glusterfs-client >= 2.0.1
9b4927
    %endif
9b4927
    %if (0%{?fedora} || 0%{?with_storage_gluster})
9b4927
Requires: /usr/sbin/gluster
9b4927
    %endif
9b4927
%endif
9b4927
9b4927
%description daemon-driver-storage-gluster
9b4927
The storage driver backend adding implementation of the storage APIs for gluster
9b4927
volumes using libgfapi.
9b4927
%endif
9b4927
9b4927
9b4927
%if %{with_storage_rbd}
9b4927
%package daemon-driver-storage-rbd
9b4927
Summary: Storage driver plugin for rbd
9b4927
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
9b4927
%description daemon-driver-storage-rbd
9b4927
The storage driver backend adding implementation of the storage APIs for rbd
9b4927
volumes using the ceph protocol.
9b4927
%endif
9b4927
9b4927
9b4927
%if %{with_storage_sheepdog}
9b4927
%package daemon-driver-storage-sheepdog
9b4927
Summary: Storage driver plugin for sheepdog
9b4927
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
Requires: sheepdog
9b4927
9b4927
%description daemon-driver-storage-sheepdog
9b4927
The storage driver backend adding implementation of the storage APIs for
9b4927
sheepdog volumes using.
9b4927
%endif
9b4927
9b4927
9b4927
%if %{with_storage_zfs}
9b4927
%package daemon-driver-storage-zfs
9b4927
Summary: Storage driver plugin for ZFS
9b4927
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
# Support any provider of zfs utilities
9b4927
Requires:  zfsutils-linux
9b4927
%else
9b4927
# Support any conforming implementation of zfs
9b4927
Requires: /sbin/zfs
9b4927
Requires: /sbin/zpool
9b4927
%endif
9b4927
9b4927
%description daemon-driver-storage-zfs
9b4927
The storage driver backend adding implementation of the storage APIs for
9b4927
ZFS volumes.
9b4927
%endif
9b4927
9b4927
9b4927
%package daemon-driver-storage
9b4927
Summary: Storage driver plugin including all backends for the libvirtd daemon
9b4927
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-storage-disk = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-storage-logical = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-storage-scsi = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-storage-iscsi = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-storage-mpath = %{version}-%{release}
9b4927
%if %{with_storage_iscsi_direct}
9b4927
Requires: libvirt-daemon-driver-storage-iscsi-direct = %{version}-%{release}
9b4927
%endif
9b4927
%if %{with_storage_gluster}
9b4927
Requires: libvirt-daemon-driver-storage-gluster = %{version}-%{release}
9b4927
%endif
9b4927
%if %{with_storage_rbd}
9b4927
Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release}
9b4927
%endif
9b4927
%if %{with_storage_sheepdog}
9b4927
Requires: libvirt-daemon-driver-storage-sheepdog = %{version}-%{release}
9b4927
%endif
9b4927
%if %{with_storage_zfs}
9b4927
Requires: libvirt-daemon-driver-storage-zfs = %{version}-%{release}
9b4927
%endif
9b4927
9b4927
%description daemon-driver-storage
9b4927
The storage driver plugin for the libvirtd daemon, providing
9b4927
an implementation of the storage APIs using LVM, iSCSI,
9b4927
parted and more.
9b4927
9b4927
9b4927
%if %{with_qemu}
9b4927
%package daemon-driver-qemu
9b4927
Summary: QEMU driver plugin for the libvirtd daemon
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Requires: qemu-utils
9b4927
Requires: xz-utils
9b4927
%else
9b4927
Requires: /usr/bin/qemu-img
9b4927
Requires: xz
9b4927
%endif
9b4927
# For image compression
9b4927
Requires: gzip
9b4927
Requires: bzip2
9b4927
Requires: lzop
9b4927
    %if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?debian} || 0%{?ubuntu}
9b4927
Requires: systemd-container
9b4927
    %endif
9b4927
    %if 0%{?fedora} || 0%{?rhel} > 7
9b4927
Requires: swtpm-tools
9b4927
    %endif
9b4927
9b4927
%description daemon-driver-qemu
9b4927
The qemu driver plugin for the libvirtd daemon, providing
9b4927
an implementation of the hypervisor driver APIs using
9b4927
QEMU
9b4927
%endif
9b4927
9b4927
9b4927
%if %{with_lxc}
9b4927
%package daemon-driver-lxc
9b4927
Summary: LXC driver plugin for the libvirtd daemon
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
# There really is a hard cross-driver dependency here
9b4927
Requires: libvirt-daemon-driver-network = %{version}-%{release}
9b4927
    %if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?debian} || 0%{?ubuntu}
9b4927
Requires: systemd-container
9b4927
    %endif
9b4927
9b4927
%description daemon-driver-lxc
9b4927
The LXC driver plugin for the libvirtd daemon, providing
9b4927
an implementation of the hypervisor driver APIs using
9b4927
the Linux kernel
9b4927
%endif
9b4927
9b4927
9b4927
%if %{with_vbox}
9b4927
%package daemon-driver-vbox
9b4927
Summary: VirtualBox driver plugin for the libvirtd daemon
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
9b4927
%description daemon-driver-vbox
9b4927
The vbox driver plugin for the libvirtd daemon, providing
9b4927
an implementation of the hypervisor driver APIs using
9b4927
VirtualBox
9b4927
%endif
9b4927
9b4927
9b4927
%if %{with_libxl}
9b4927
%package daemon-driver-libxl
9b4927
Summary: Libxl driver plugin for the libvirtd daemon
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
Obsoletes: libvirt-daemon-driver-xen < 4.3.0
9b4927
9b4927
%description daemon-driver-libxl
9b4927
The Libxl driver plugin for the libvirtd daemon, providing
9b4927
an implementation of the hypervisor driver APIs using
9b4927
Libxl
9b4927
%endif
9b4927
9b4927
9b4927
9b4927
%if %{with_qemu_tcg}
9b4927
%package daemon-qemu
9b4927
Summary: Server side daemon & driver required to run QEMU guests
9b4927
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-network = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
9b4927
Requires: qemu
9b4927
9b4927
%description daemon-qemu
9b4927
Server side daemon and driver required to manage the virtualization
9b4927
capabilities of the QEMU TCG emulators
9b4927
%endif
9b4927
9b4927
9b4927
%if %{with_qemu_kvm}
9b4927
%package daemon-kvm
9b4927
Summary: Server side daemon & driver required to run KVM guests
9b4927
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-network = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
9b4927
Requires: qemu-kvm
9b4927
9b4927
%description daemon-kvm
9b4927
Server side daemon and driver required to manage the virtualization
9b4927
capabilities of the KVM hypervisor
9b4927
%endif
9b4927
9b4927
9b4927
%if %{with_lxc}
9b4927
%package daemon-lxc
9b4927
Summary: Server side daemon & driver required to run LXC guests
9b4927
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-network = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
9b4927
9b4927
%description daemon-lxc
9b4927
Server side daemon and driver required to manage the virtualization
9b4927
capabilities of LXC
9b4927
%endif
9b4927
9b4927
9b4927
%if %{with_libxl}
9b4927
%package daemon-xen
9b4927
Summary: Server side daemon & driver required to run XEN guests
9b4927
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
    %if %{with_libxl}
9b4927
Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
9b4927
    %endif
9b4927
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-network = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Requires: xen-utils
9b4927
%else
9b4927
Requires: xen
9b4927
%endif
9b4927
9b4927
%description daemon-xen
9b4927
Server side daemon and driver required to manage the virtualization
9b4927
capabilities of XEN
9b4927
%endif
9b4927
9b4927
%if %{with_vbox}
9b4927
%package daemon-vbox
9b4927
Summary: Server side daemon & driver required to run VirtualBox guests
9b4927
9b4927
Requires: libvirt-daemon = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-network = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
9b4927
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
9b4927
9b4927
%description daemon-vbox
9b4927
Server side daemon and driver required to manage the virtualization
9b4927
capabilities of VirtualBox
9b4927
%endif
9b4927
9b4927
%package %{clientsuffix}
9b4927
Summary: Client side utilities of the libvirt library
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
# Compatibility with upstream spec
9b4927
Provides: %{name}-client = %{version}-%{release}
9b4927
%endif
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
# Needed by /usr/libexec/libvirt-guests.sh script.
9b4927
Requires: gettext
9b4927
# Needed by virt-pki-validate script.
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Requires: gnutls-bin
9b4927
%else
9b4927
Requires: gnutls-utils
9b4927
%endif
9b4927
Requires: %{name}-bash-completion = %{version}-%{release}
9b4927
9b4927
%description %{clientsuffix}
9b4927
The client binaries needed to access the virtualization
9b4927
capabilities of recent versions of Linux (and other OSes).
9b4927
9b4927
%package -n %{libname}
9b4927
Summary: Client side libraries
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Group: libs
9b4927
# So remote clients can access libvirt over SSH tunnel
9b4927
Requires: sasl2-bin
9b4927
# Needed by default sasl.conf - no onerous extra deps, since
9b4927
# 100's of other things on a system already pull in libkrb5-3
9b4927
Requires: libsasl2-modules-gssapi-mit
9b4927
Breaks: %{name}-clients < %{version}-%{release}
9b4927
%else
9b4927
# So remote clients can access libvirt over SSH tunnel
9b4927
Requires: cyrus-sasl
9b4927
# Needed by default sasl.conf - no onerous extra deps, since
9b4927
# 100's of other things on a system already pull in krb5-libs
9b4927
Requires: cyrus-sasl-gssapi
9b4927
%endif
9b4927
9b4927
%description -n %{libname}
9b4927
Shared libraries for accessing the libvirt daemon.
9b4927
9b4927
%package admin
9b4927
Summary: Set of tools to control libvirt daemon
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
Requires: %{name}-bash-completion = %{version}-%{release}
9b4927
9b4927
%description admin
9b4927
The client side utilities to control the libvirt daemon.
9b4927
9b4927
%package bash-completion
9b4927
Summary: Bash completion script
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Breaks: %{name}-daemon < %{version}-%{release}
9b4927
Breaks: %{name}-clients < %{version}-%{release}
9b4927
%endif
9b4927
9b4927
%description bash-completion
9b4927
Bash completion script stub.
9b4927
9b4927
%if %{with_wireshark}
9b4927
%package wireshark
9b4927
Summary: Wireshark dissector plugin for libvirt RPC transactions
9b4927
Requires: wireshark
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
9b4927
%description wireshark
9b4927
Wireshark dissector plugin for better analysis of libvirt RPC traffic.
9b4927
%endif
9b4927
9b4927
%if %{with_lxc}
9b4927
%package login-shell
9b4927
Summary: Login shell for connecting users to an LXC container
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
9b4927
%description login-shell
9b4927
Provides the set-uid virt-login-shell binary that is used to
9b4927
connect a user to an LXC container when they login, by switching
9b4927
namespaces.
9b4927
%endif
9b4927
9b4927
%package %{develsuffix}
9b4927
Summary: Libraries, includes, etc. to compile with the libvirt library
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Group: libdevel
9b4927
%endif
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Requires: pkg-config
9b4927
%else
9b4927
Requires: pkgconfig
9b4927
%endif
9b4927
9b4927
%description %{develsuffix}
9b4927
Include header files & development libraries for the libvirt C library.
9b4927
9b4927
%if %{with_sanlock}
9b4927
%package lock-sanlock
9b4927
Summary: Sanlock lock manager plugin for QEMU driver
9b4927
Requires: sanlock >= 2.4
9b4927
#for virt-sanlock-cleanup require augeas
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
Requires: augeas-tools
9b4927
%else
9b4927
Requires: augeas
9b4927
%endif
9b4927
Requires: %{name}-daemon = %{version}-%{release}
9b4927
Requires: %{libname} = %{version}-%{release}
9b4927
9b4927
%description lock-sanlock
9b4927
Includes the Sanlock lock manager plugin for the QEMU
9b4927
driver
9b4927
%endif
9b4927
9b4927
%package -n %{nsslibname}
9b4927
Summary: Libvirt plugin for Name Service Switch
9b4927
Requires: libvirt-daemon-driver-network = %{version}-%{release}
9b4927
9b4927
%description -n %{nsslibname}
9b4927
Libvirt plugin for NSS for translating domain names into IP addresses.
9b4927
9b4927
9b4927
%prep
9b4927
9b4927
%autosetup -S git_am
9b4927
9b4927
%build
9b4927
9b4927
%if 0%{?fedora} == 34
9b4927
    # binutils change in F34 broke linking of tests
9b4927
    # https://bugzilla.redhat.com/show_bug.cgi?id=1889763
9b4927
    %define _lto_cflags %{nil}
9b4927
%endif
9b4927
9b4927
%if %{with_qemu}
9b4927
    %define arg_qemu -Ddriver_qemu=enabled
9b4927
%else
9b4927
    %define arg_qemu -Ddriver_qemu=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_openvz}
9b4927
    %define arg_openvz -Ddriver_openvz=enabled
9b4927
%else
9b4927
    %define arg_openvz -Ddriver_openvz=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_lxc}
9b4927
    %define arg_lxc -Ddriver_lxc=enabled
9b4927
    %define arg_login_shell -Dlogin_shell=enabled
9b4927
%else
9b4927
    %define arg_lxc -Ddriver_lxc=disabled
9b4927
    %define arg_login_shell -Dlogin_shell=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_vbox}
9b4927
    %define arg_vbox -Ddriver_vbox=enabled
9b4927
%else
9b4927
    %define arg_vbox -Ddriver_vbox=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_libxl}
9b4927
    %define arg_libxl -Ddriver_libxl=enabled
9b4927
%else
9b4927
    %define arg_libxl -Ddriver_libxl=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_esx}
9b4927
    %define arg_esx -Ddriver_esx=enabled -Dcurl=enabled
9b4927
%else
9b4927
    %define arg_esx -Ddriver_esx=disabled -Dcurl=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_hyperv}
9b4927
    %define arg_hyperv -Ddriver_hyperv=enabled -Dopenwsman=enabled
9b4927
%else
9b4927
    %define arg_hyperv -Ddriver_hyperv=disabled -Dopenwsman=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_vmware}
9b4927
    %define arg_vmware -Ddriver_vmware=enabled
9b4927
%else
9b4927
    %define arg_vmware -Ddriver_vmware=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_storage_rbd}
9b4927
    %define arg_storage_rbd -Dstorage_rbd=enabled
9b4927
%else
9b4927
    %define arg_storage_rbd -Dstorage_rbd=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_storage_sheepdog}
9b4927
    %define arg_storage_sheepdog -Dstorage_sheepdog=enabled
9b4927
%else
9b4927
    %define arg_storage_sheepdog -Dstorage_sheepdog=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_storage_gluster}
9b4927
    %define arg_storage_gluster -Dstorage_gluster=enabled -Dglusterfs=enabled
9b4927
%else
9b4927
    %define arg_storage_gluster -Dstorage_gluster=disabled -Dglusterfs=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_storage_zfs}
9b4927
    %define arg_storage_zfs -Dstorage_zfs=enabled
9b4927
%else
9b4927
    %define arg_storage_zfs -Dstorage_zfs=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_numactl}
9b4927
    %define arg_numactl -Dnumactl=enabled
9b4927
%else
9b4927
    %define arg_numactl -Dnumactl=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_numad}
9b4927
    %define arg_numad -Dnumad=enabled
9b4927
%else
9b4927
    %define arg_numad -Dnumad=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_fuse}
9b4927
    %define arg_fuse -Dfuse=enabled
9b4927
%else
9b4927
    %define arg_fuse -Dfuse=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_sanlock}
9b4927
    %define arg_sanlock -Dsanlock=enabled
9b4927
%else
9b4927
    %define arg_sanlock -Dsanlock=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_firewalld_zone}
9b4927
    %define arg_firewalld_zone -Dfirewalld_zone=enabled
9b4927
%else
9b4927
    %define arg_firewalld_zone -Dfirewalld_zone=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_netcf}
9b4927
    %define arg_netcf -Dnetcf=enabled
9b4927
%else
9b4927
    %define arg_netcf -Dnetcf=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_apparmor}
9b4927
    %define arg_apparmor -Dapparmor=enabled
9b4927
    %define arg_apparmor_profiles -Dapparmor_profiles=true
9b4927
%else
9b4927
    %define arg_apparmor -Dapparmor=disabled -Dsecdriver_apparmor=disabled
9b4927
    %define arg_apparmor_profiles -Dapparmor_profiles=false
9b4927
%endif
9b4927
9b4927
%if %{with_wireshark}
9b4927
    %define arg_wireshark -Dwireshark_dissector=enabled
9b4927
%else
9b4927
    %define arg_wireshark -Dwireshark_dissector=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_storage_iscsi_direct}
9b4927
    %define arg_storage_iscsi_direct -Dstorage_iscsi_direct=enabled -Dlibiscsi=enabled
9b4927
%else
9b4927
    %define arg_storage_iscsi_direct -Dstorage_iscsi_direct=disabled -Dlibiscsi=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_libssh}
9b4927
    %define arg_libssh -Dlibssh=enabled
9b4927
%else
9b4927
    %define arg_libssh -Dlibssh=disabled
9b4927
%endif
9b4927
9b4927
%if %{with_libssh2}
9b4927
    %define arg_libssh2 -Dlibssh2=enabled
9b4927
%else
9b4927
    %define arg_libssh2 -Dlibssh2=disabled
9b4927
%endif
9b4927
9b4927
%define when  %(date +"%%F-%%T")
9b4927
%define where %(hostname)
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
# Force usage of packager macro as literal
9b4927
# Cf. https://github.com/debbuild/debbuild/issues/184
9b4927
%define who   %{packager}
9b4927
%else
9b4927
%define who   %{?packager}%{!?packager:Unknown}
9b4927
%endif
9b4927
%define arg_packager -Dpackager="%{who}, %{when}, %{where}"
9b4927
%define arg_packager_version -Dpackager_version="%{release}"
9b4927
9b4927
%define arg_selinux_mount -Dselinux_mount="/sys/fs/selinux"
9b4927
9b4927
# place macros above and build commands below this comment
9b4927
9b4927
if [ ! -f "%{_specdir}/%{name}.spec" ]; then
9b4927
    # OBS does not install the spec file into the specdir
9b4927
    SPECFILE_PATH="%{_sourcedir}/%{name}.spec"
9b4927
else
9b4927
    SPECFILE_PATH="%{_specdir}/%{name}.spec"
9b4927
fi
9b4927
export SOURCE_DATE_EPOCH=$(stat --printf='%Y' ${SPECFILE_PATH})
9b4927
9b4927
%meson \
9b4927
           -Drunstatedir=%{_rundir} \
9b4927
           %{?arg_qemu} \
9b4927
           %{?arg_openvz} \
9b4927
           %{?arg_lxc} \
9b4927
           %{?arg_vbox} \
9b4927
           %{?arg_libxl} \
9b4927
           -Dsasl=enabled \
9b4927
           -Dpolkit=enabled \
9b4927
           -Ddriver_libvirtd=enabled \
9b4927
           %{?arg_esx} \
9b4927
           %{?arg_hyperv} \
9b4927
           %{?arg_vmware} \
9b4927
           -Ddriver_vz=disabled \
9b4927
           -Ddriver_bhyve=disabled \
9b4927
           -Dremote_default_mode=legacy \
9b4927
           -Ddriver_interface=enabled \
9b4927
           -Ddriver_network=enabled \
9b4927
           -Dstorage_fs=enabled \
9b4927
           -Dstorage_lvm=enabled \
9b4927
           -Dstorage_iscsi=enabled \
9b4927
           %{?arg_storage_iscsi_direct} \
9b4927
           -Dstorage_scsi=enabled \
9b4927
           -Dstorage_disk=enabled \
9b4927
           -Dstorage_mpath=enabled \
9b4927
           %{?arg_storage_rbd} \
9b4927
           %{?arg_storage_sheepdog} \
9b4927
           %{?arg_storage_gluster} \
9b4927
           %{?arg_storage_zfs} \
9b4927
           -Dstorage_vstorage=disabled \
9b4927
           %{?arg_numactl} \
9b4927
           %{?arg_numad} \
9b4927
           -Dcapng=enabled \
9b4927
           %{?arg_fuse} \
9b4927
           %{?arg_netcf} \
9b4927
           -Dselinux=enabled \
9b4927
           %{?arg_selinux_mount} \
9b4927
           %{?arg_apparmor} \
9b4927
           %{?arg_apparmor_profiles} \
9b4927
           -Dudev=enabled \
9b4927
           -Dyajl=enabled \
9b4927
           %{?arg_sanlock} \
9b4927
           -Dlibpcap=enabled \
9b4927
           -Dlibnl=enabled \
9b4927
           -Daudit=enabled \
9b4927
           -Ddtrace=enabled \
9b4927
           -Dfirewalld=enabled \
9b4927
           %{?arg_firewalld_zone} \
9b4927
           %{?arg_wireshark} \
9b4927
           %{?arg_libssh} \
9b4927
           %{?arg_libssh2} \
9b4927
           -Dpm_utils=disabled \
9b4927
           -Dnss=enabled \
9b4927
           %{arg_packager} \
9b4927
           %{arg_packager_version} \
9b4927
           -Dqemu_user=%{qemu_user} \
9b4927
           -Dqemu_group=%{qemu_group} \
9b4927
           -Dtls_priority=%{tls_priority} \
9b4927
           %{?enable_werror} \
9b4927
           -Dexpensive_tests=enabled \
9b4927
           -Dinit_script=systemd \
9b4927
           -Ddocs=enabled \
9b4927
           -Dtests=enabled \
9b4927
           -Drpath=disabled \
9b4927
           %{?arg_login_shell}
9b4927
9b4927
%meson_build
9b4927
9b4927
%install
9b4927
rm -fr %{buildroot}
9b4927
9b4927
if [ ! -f "%{_specdir}/%{name}.spec" ]; then
9b4927
    # OBS does not install the spec file into the specdir
9b4927
    SPECFILE_PATH="%{_sourcedir}/%{name}.spec"
9b4927
else
9b4927
    SPECFILE_PATH="%{_specdir}/%{name}.spec"
9b4927
fi
9b4927
export SOURCE_DATE_EPOCH=$(stat --printf='%Y' ${SPECFILE_PATH})
9b4927
9b4927
%meson_install
9b4927
9b4927
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
9b4927
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
9b4927
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.la
9b4927
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a
9b4927
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la
9b4927
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a
9b4927
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-backend/*.la
9b4927
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-backend/*.a
9b4927
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-file/*.la
9b4927
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/storage-file/*.a
9b4927
%if %{with_wireshark}
9b4927
rm -f $RPM_BUILD_ROOT%{wireshark_plugindir}/libvirt.la
9b4927
%endif
9b4927
9b4927
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/
9b4927
# We don't want to install /etc/libvirt/qemu/networks in the main %files list
9b4927
# because if the admin wants to delete the default network completely, we don't
9b4927
# want to end up re-incarnating it on every RPM upgrade.
9b4927
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/
9b4927
cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \
9b4927
   $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
9b4927
# libvirt saves this file with mode 0600
9b4927
chmod 0600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
9b4927
9b4927
# nwfilter files are installed in /usr/share/libvirt and copied to /etc in %post
9b4927
# to avoid verification errors on changed files in /etc
9b4927
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/nwfilter/
9b4927
cp -a $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml \
9b4927
    $RPM_BUILD_ROOT%{_datadir}/libvirt/nwfilter/
9b4927
# libvirt saves these files with mode 600
9b4927
chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml
9b4927
9b4927
%if ! %{with_qemu}
9b4927
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug
9b4927
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
9b4927
%endif
9b4927
%find_lang %{name}
9b4927
9b4927
%if ! %{with_sanlock}
9b4927
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirt_sanlock.aug
9b4927
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
9b4927
%endif
9b4927
9b4927
%if ! %{with_lxc}
9b4927
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug
9b4927
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
9b4927
%endif
9b4927
9b4927
%if ! %{with_qemu}
9b4927
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf
9b4927
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
9b4927
%endif
9b4927
%if ! %{with_lxc}
9b4927
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
9b4927
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc
9b4927
%endif
9b4927
%if ! %{with_libxl}
9b4927
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/libxl.conf
9b4927
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.libxl
9b4927
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_libxl.aug
9b4927
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
9b4927
%endif
9b4927
9b4927
# Copied into libvirt-docs subpackage eventually
9b4927
mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt libvirt-docs
9b4927
9b4927
%ifarch %{arches_systemtap_64bit}
9b4927
mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \
9b4927
   $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp
9b4927
9b4927
    %if %{with_qemu}
9b4927
mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
9b4927
   $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes-64.stp
9b4927
    %endif
9b4927
%endif
9b4927
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
# move systemd units to the correct location
9b4927
mkdir -p %{buildroot}/lib
9b4927
mv %{buildroot}%{_prefix}/lib/systemd %{buildroot}/lib
9b4927
# create systemd preset mimicking Fedora and upstream preferences
9b4927
mkdir -p %{buildroot}%{_presetdir}
9b4927
cat > %{buildroot}%{_presetdir}/70-libvirt.preset <
9b4927
# Approved by FESCo - https://fedorahosted.org/fesco/ticket/544
9b4927
enable libvirtd.service
9b4927
# Disabled by default to mimic Fedora and upstream preferences
9b4927
disable libvirtd.socket
9b4927
disable libvirtd-ro.socket
9b4927
disable libvirtd-admin.socket
9b4927
disable libvirtd-tcp.socket
9b4927
disable libvirtd-tls.socket
9b4927
disable virtproxyd.service
9b4927
disable virtproxyd.socket
9b4927
disable virtproxyd-ro.socket
9b4927
disable virtproxyd-admin.socket
9b4927
disable virtproxyd-tcp.socket
9b4927
disable virtproxyd-tls.socket
9b4927
disable virt-guest-shutdown.target
9b4927
disable virtlogd.service
9b4927
disable virtlogd.socket
9b4927
disable virtlogd-admin.socket
9b4927
disable virtlockd.service
9b4927
disable virtlockd.socket
9b4927
disable virtlockd-admin.socket
9b4927
disable virtinterfaced.service
9b4927
disable virtinterfaced.socket
9b4927
disable virtinterfaced-ro.socket
9b4927
disable virtinterfaced-admin.socket
9b4927
disable virtnetworkd.service
9b4927
disable virtnetworkd.socket
9b4927
disable virtnetworkd-ro.socket
9b4927
disable virtnetworkd-admin.socket
9b4927
disable virtnodedevd.service
9b4927
disable virtnodedevd.socket
9b4927
disable virtnodedevd-ro.socket
9b4927
disable virtnodedevd-admin.socket
9b4927
disable virtnwfilterd.service
9b4927
disable virtnwfilterd.socket
9b4927
disable virtnwfilterd-ro.socket
9b4927
disable virtnwfilterd-admin.socket
9b4927
disable virtsecretd.service
9b4927
disable virtsecretd.socket
9b4927
disable virtsecretd-ro.socket
9b4927
disable virtsecretd-admin.socket
9b4927
disable virtstoraged.service
9b4927
disable virtstoraged.socket
9b4927
disable virtstoraged-ro.socket
9b4927
disable virtstoraged-admin.socket
9b4927
disable virtqemud.service
9b4927
disable virtqemud.socket
9b4927
disable virtqemud-ro.socket
9b4927
disable virtqemud-admin.socket
9b4927
disable virtlxcd.service
9b4927
disable virtlxcd.socket
9b4927
disable virtlxcd-ro.socket
9b4927
disable virtlxcd-admin.socket
9b4927
disable virtxend.service
9b4927
disable virtxend.socket
9b4927
disable virtxend-ro.socket
9b4927
disable virtxend-admin.socket
9b4927
disable virtvboxd.service
9b4927
disable virtvboxd.socket
9b4927
disable virtvboxd-ro.socket
9b4927
disable virtvboxd-admin.socket
9b4927
EOF
9b4927
%endif
9b4927
9b4927
%check
9b4927
# Building on slow archs, like emulated s390x in Fedora copr, requires
9b4927
# raising the test timeout
9b4927
VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check --timeout-multiplier 10
9b4927
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
%post -n %{libname}
9b4927
/sbin/ldconfig
9b4927
# Workaround not being able to create directories in files section with dir directive
9b4927
# Cf. https://github.com/debbuild/debbuild/issues/93
9b4927
mkdir -p %{_datadir}/libvirt/
9b4927
mkdir -p %{_datadir}/libvirt/schemas/
9b4927
mkdir -p %{_localstatedir}/lib/libvirt/
9b4927
9b4927
%postun -n %{libname}
9b4927
/sbin/ldconfig
9b4927
9b4927
%pre daemon
9b4927
# 'libvirt' group is just to allow password-less polkit access to
9b4927
# libvirtd. The uid number is irrelevant, so we use dynamic allocation
9b4927
# described at the above link.
9b4927
getent group libvirt >/dev/null || groupadd -r libvirt
9b4927
9b4927
exit 0
9b4927
9b4927
%post daemon
9b4927
# Workaround not being able to create directories in files section with dir directive
9b4927
# Cf. https://github.com/debbuild/debbuild/issues/93
9b4927
mkdir -p %{_sysconfdir}/libvirt/
9b4927
mkdir -p %{_sysconfdir}/libvirt/qemu/networks/autostart
9b4927
mkdir -p %{_sysconfdir}/libvirt/nwfilter/
9b4927
9b4927
mkdir -p %{_datadir}/libvirt/
9b4927
9b4927
mkdir -p %{_localstatedir}/lib/libvirt/network/
9b4927
mkdir -p %{_localstatedir}/lib/libvirt/dnsmasq/
9b4927
mkdir -p %{_localstatedir}/lib/libvirt/images/
9b4927
mkdir -p %{_localstatedir}/lib/libvirt/filesystems/
9b4927
mkdir -p %{_localstatedir}/lib/libvirt/boot/
9b4927
mkdir -p %{_localstatedir}/lib/libvirt/libxl/
9b4927
mkdir -p %{_localstatedir}/lib/libvirt/lxc/
9b4927
mkdir -p %{_localstatedir}/lib/libvirt/qemu/
9b4927
mkdir -p %{_localstatedir}/lib/libvirt/swtpm/
9b4927
mkdir -p %{_localstatedir}/cache/libvirt/
9b4927
mkdir -p %{_localstatedir}/cache/libvirt/qemu/
9b4927
9b4927
mkdir -p %{_libdir}/libvirt/
9b4927
mkdir -p %{_libdir}/libvirt/connection-driver/
9b4927
mkdir -p %{_libdir}/libvirt/lock-driver
9b4927
9b4927
mkdir -p %{_localstatedir}/log/libvirt/
9b4927
mkdir -p %{_localstatedir}/log/libvirt/libxl/
9b4927
mkdir -p %{_localstatedir}/log/libvirt/lxc/
9b4927
mkdir -p %{_localstatedir}/log/libvirt/qemu/
9b4927
mkdir -p %{_localstatedir}/log/swtpm/libvirt/qemu/
9b4927
9b4927
%if %{with_apparmor}
9b4927
%{apparmor_reload /etc/apparmor.d/usr.sbin.libvirtd}
9b4927
%endif
9b4927
9b4927
%{systemd_post virtlockd.socket virtlockd-admin.socket}
9b4927
%{systemd_post virtlogd.socket virtlogd-admin.socket}
9b4927
%{systemd_post libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket}
9b4927
%{systemd_post libvirtd-tcp.socket libvirtd-tls.socket}
9b4927
%{systemd_post libvirtd.service}
9b4927
9b4927
if [ "$1" = "upgrade" ]; then
9b4927
    # See if user has previously modified their install to
9b4927
    # tell libvirtd to use --listen
9b4927
    grep -E '^LIBVIRTD_ARGS=.*--listen' /etc/sysconfig/libvirtd /etc/default/libvirtd 1>/dev/null 2>&1
9b4927
    if test $? = 0
9b4927
    then
9b4927
        # Then lets keep honouring --listen and *not* use
9b4927
        # systemd socket activation, because switching things
9b4927
        # might confuse mgmt tool like puppet/ansible that
9b4927
        # expect the old style libvirtd
9b4927
        /bin/systemctl mask libvirtd.socket >/dev/null 2>&1 || :
9b4927
        /bin/systemctl mask libvirtd-ro.socket >/dev/null 2>&1 || :
9b4927
        /bin/systemctl mask libvirtd-admin.socket >/dev/null 2>&1 || :
9b4927
        /bin/systemctl mask libvirtd-tls.socket >/dev/null 2>&1 || :
9b4927
        /bin/systemctl mask libvirtd-tcp.socket >/dev/null 2>&1 || :
9b4927
    else
9b4927
        # Old libvirtd owns the sockets and will delete them on
9b4927
        # shutdown. Can't use a try-restart as libvirtd will simply
9b4927
        # own the sockets again when it comes back up. Thus we must
9b4927
        # do this particular ordering, so that we get libvirtd
9b4927
        # running with socket activation in use
9b4927
        /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1
9b4927
        if test $? = 0
9b4927
        then
9b4927
            /bin/systemctl stop libvirtd.service >/dev/null 2>&1 || :
9b4927
9b4927
            /bin/systemctl try-restart libvirtd.socket >/dev/null 2>&1 || :
9b4927
            /bin/systemctl try-restart libvirtd-ro.socket >/dev/null 2>&1 || :
9b4927
            /bin/systemctl try-restart libvirtd-admin.socket >/dev/null 2>&1 || :
9b4927
9b4927
            /bin/systemctl start libvirtd.service >/dev/null 2>&1 || :
9b4927
        fi
9b4927
    fi
9b4927
fi
9b4927
9b4927
if [ "$1" = "configure" ]; then
9b4927
    # If this is initial installation, let's force the service to be started if it's enabled...
9b4927
    /bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1
9b4927
    if test $? = 0
9b4927
    then
9b4927
        /bin/systemctl start libvirtd.service >/dev/null 2>&1 || :
9b4927
    fi
9b4927
fi
9b4927
9b4927
%preun daemon
9b4927
%{systemd_preun libvirtd.service}
9b4927
%{systemd_preun libvirtd-tcp.socket libvirtd-tls.socket}
9b4927
%{systemd_preun libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket}
9b4927
%{systemd_preun virtlogd.socket virtlogd-admin.socket virtlogd.service}
9b4927
%{systemd_preun virtlockd.socket virtlockd-admin.socket virtlockd.service}
9b4927
9b4927
%postun daemon
9b4927
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
9b4927
if [ "$1" = "configure" ] || [ "$1" = "upgrade" ] ; then
9b4927
    /bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || :
9b4927
    /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || :
9b4927
fi
9b4927
9b4927
%post daemon-driver-network
9b4927
%if %{with_firewalld_zone}
9b4927
    %firewalld_reload
9b4927
%endif
9b4927
9b4927
%postun daemon-driver-network
9b4927
%if %{with_firewalld_zone}
9b4927
    %firewalld_reload
9b4927
%endif
9b4927
9b4927
%post daemon-config-network
9b4927
if test "$1" = "configure" && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then
9b4927
    # see if the network used by default network creates a conflict,
9b4927
    # and try to resolve it
9b4927
    # NB: 192.168.122.0/24 is used in the default.xml template file;
9b4927
    # do not modify any of those values here without also modifying
9b4927
    # them in the template.
9b4927
    orig_sub=122
9b4927
    sub=${orig_sub}
9b4927
    nl='
9b4927
'
9b4927
    routes="${nl}$(ip route show | cut -d' ' -f1)${nl}"
9b4927
    case ${routes} in
9b4927
      *"${nl}192.168.${orig_sub}.0/24${nl}"*)
9b4927
        # there was a match, so we need to look for an unused subnet
9b4927
        for new_sub in $(seq 124 254); do
9b4927
          case ${routes} in
9b4927
          *"${nl}192.168.${new_sub}.0/24${nl}"*)
9b4927
            ;;
9b4927
          *)
9b4927
            sub=$new_sub
9b4927
            break;
9b4927
            ;;
9b4927
          esac
9b4927
        done
9b4927
        ;;
9b4927
      *)
9b4927
        ;;
9b4927
    esac
9b4927
9b4927
    sed -e "s/${orig_sub}/${sub}/g" \
9b4927
         < %{_datadir}/libvirt/networks/default.xml \
9b4927
         > %{_sysconfdir}/libvirt/qemu/networks/default.xml
9b4927
    ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
9b4927
    # libvirt saves this file with mode 0600
9b4927
    chmod 0600 %{_sysconfdir}/libvirt/qemu/networks/default.xml
9b4927
9b4927
    # Make sure libvirt picks up the new network defininiton
9b4927
    /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
9b4927
fi
9b4927
9b4927
%post daemon-config-nwfilter
9b4927
for datadir_file in %{_datadir}/libvirt/nwfilter/*.xml; do
9b4927
  sysconfdir_file=%{_sysconfdir}/libvirt/nwfilter/$(basename "$datadir_file")
9b4927
  if [ ! -f "$sysconfdir_file" ]; then
9b4927
    # libvirt saves these files with mode 600
9b4927
    install -m 0600 "$datadir_file" "$sysconfdir_file"
9b4927
  fi
9b4927
done
9b4927
# Make sure libvirt picks up the new nwfilter defininitons
9b4927
/bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
9b4927
9b4927
%if %{with_qemu}
9b4927
%pre daemon-driver-qemu
9b4927
# We want soft static allocation of well-known ids, as disk images
9b4927
# are commonly shared across NFS mounts by id rather than name; see
9b4927
# https://fedoraproject.org/wiki/Packaging:UsersAndGroups
9b4927
getent group kvm >/dev/null || groupadd -f -g 36 -r kvm
9b4927
getent group libvirt-qemu >/dev/null || groupadd -f -g 64055 -r libvirt-qemu
9b4927
if ! getent passwd libvirt-qemu >/dev/null; then
9b4927
  if ! getent passwd 64055 >/dev/null; then
9b4927
    useradd -r -u 64055 -g libvirt-qemu -G kvm -d / -s /usr/sbin/nologin -c "libvirt qemu user" libvirt-qemu
9b4927
  else
9b4927
    useradd -r -g libvirt-qemu -G kvm -d / -s /usr/sbin/nologin -c "libvirt qemu user" libvirt-qemu
9b4927
  fi
9b4927
fi
9b4927
exit 0
9b4927
%endif
9b4927
9b4927
%preun %{clientsuffix}
9b4927
%{systemd_preun libvirt-guests.service}
9b4927
9b4927
%post %{clientsuffix}
9b4927
%{systemd_post libvirt-guests.service}
9b4927
9b4927
%postun %{clientsuffix}
9b4927
%{systemd_postun libvirt-guests.service}
9b4927
9b4927
%if %{with_lxc}
9b4927
%pre login-shell
9b4927
getent group virtlogin >/dev/null || groupadd -r virtlogin
9b4927
exit 0
9b4927
%endif
9b4927
9b4927
9b4927
%else
9b4927
%post -n %{libname}
9b4927
%if 0%{?rhel} == 7
9b4927
/sbin/ldconfig
9b4927
%endif
9b4927
9b4927
%postun -n %{libname}
9b4927
%if 0%{?rhel} == 7
9b4927
/sbin/ldconfig
9b4927
%endif
9b4927
9b4927
%pre daemon
9b4927
# 'libvirt' group is just to allow password-less polkit access to
9b4927
# libvirtd. The uid number is irrelevant, so we use dynamic allocation
9b4927
# described at the above link.
9b4927
getent group libvirt >/dev/null || groupadd -r libvirt
9b4927
9b4927
exit 0
9b4927
9b4927
%post daemon
9b4927
%if %{with_apparmor}
9b4927
%apparmor_reload /etc/apparmor.d/usr.sbin.libvirtd
9b4927
%endif
9b4927
9b4927
%systemd_post virtlockd.socket virtlockd-admin.socket
9b4927
%systemd_post virtlogd.socket virtlogd-admin.socket
9b4927
%systemd_post libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket
9b4927
%systemd_post libvirtd-tcp.socket libvirtd-tls.socket
9b4927
%systemd_post libvirtd.service
9b4927
9b4927
# request daemon restart in posttrans
9b4927
mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || :
9b4927
touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :
9b4927
9b4927
%preun daemon
9b4927
%systemd_preun libvirtd.service
9b4927
%systemd_preun libvirtd-tcp.socket libvirtd-tls.socket
9b4927
%systemd_preun libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket
9b4927
%systemd_preun virtlogd.socket virtlogd-admin.socket virtlogd.service
9b4927
%systemd_preun virtlockd.socket virtlockd-admin.socket virtlockd.service
9b4927
9b4927
%postun daemon
9b4927
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
9b4927
if [ $1 -ge 1 ] ; then
9b4927
    /bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || :
9b4927
    /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || :
9b4927
fi
9b4927
9b4927
# In upgrade scenario we must explicitly enable virtlockd/virtlogd
9b4927
# sockets, if libvirtd is already enabled and start them if
9b4927
# libvirtd is running, otherwise you'll get failures to start
9b4927
# guests
9b4927
%triggerpostun daemon -- libvirt-daemon < 1.3.0
9b4927
if [ $1 -ge 1 ] ; then
9b4927
    /bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 &&
9b4927
        /bin/systemctl enable virtlogd.socket virtlogd-admin.socket || :
9b4927
    /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 &&
9b4927
        /bin/systemctl start virtlogd.socket virtlogd-admin.socket || :
9b4927
fi
9b4927
9b4927
%posttrans daemon
9b4927
if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then
9b4927
    # See if user has previously modified their install to
9b4927
    # tell libvirtd to use --listen
9b4927
    grep -E '^LIBVIRTD_ARGS=.*--listen' /etc/sysconfig/libvirtd 1>/dev/null 2>&1
9b4927
    if test $? = 0
9b4927
    then
9b4927
        # Then lets keep honouring --listen and *not* use
9b4927
        # systemd socket activation, because switching things
9b4927
        # might confuse mgmt tool like puppet/ansible that
9b4927
        # expect the old style libvirtd
9b4927
        /bin/systemctl mask libvirtd.socket >/dev/null 2>&1 || :
9b4927
        /bin/systemctl mask libvirtd-ro.socket >/dev/null 2>&1 || :
9b4927
        /bin/systemctl mask libvirtd-admin.socket >/dev/null 2>&1 || :
9b4927
        /bin/systemctl mask libvirtd-tls.socket >/dev/null 2>&1 || :
9b4927
        /bin/systemctl mask libvirtd-tcp.socket >/dev/null 2>&1 || :
9b4927
    else
9b4927
        # Old libvirtd owns the sockets and will delete them on
9b4927
        # shutdown. Can't use a try-restart as libvirtd will simply
9b4927
        # own the sockets again when it comes back up. Thus we must
9b4927
        # do this particular ordering, so that we get libvirtd
9b4927
        # running with socket activation in use
9b4927
        /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1
9b4927
        if test $? = 0
9b4927
        then
9b4927
            /bin/systemctl stop libvirtd.service >/dev/null 2>&1 || :
9b4927
9b4927
            /bin/systemctl try-restart libvirtd.socket >/dev/null 2>&1 || :
9b4927
            /bin/systemctl try-restart libvirtd-ro.socket >/dev/null 2>&1 || :
9b4927
            /bin/systemctl try-restart libvirtd-admin.socket >/dev/null 2>&1 || :
9b4927
9b4927
            /bin/systemctl start libvirtd.service >/dev/null 2>&1 || :
9b4927
        fi
9b4927
    fi
9b4927
fi
9b4927
rm -rf %{_localstatedir}/lib/rpm-state/libvirt || :
9b4927
9b4927
%post daemon-driver-network
9b4927
%if %{with_firewalld_zone}
9b4927
    %firewalld_reload
9b4927
%endif
9b4927
9b4927
%postun daemon-driver-network
9b4927
%if %{with_firewalld_zone}
9b4927
    %firewalld_reload
9b4927
%endif
9b4927
9b4927
%post daemon-config-network
9b4927
if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ; then
9b4927
    # see if the network used by default network creates a conflict,
9b4927
    # and try to resolve it
9b4927
    # NB: 192.168.122.0/24 is used in the default.xml template file;
9b4927
    # do not modify any of those values here without also modifying
9b4927
    # them in the template.
9b4927
    orig_sub=122
9b4927
    sub=${orig_sub}
9b4927
    nl='
9b4927
'
9b4927
    routes="${nl}$(ip route show | cut -d' ' -f1)${nl}"
9b4927
    case ${routes} in
9b4927
      *"${nl}192.168.${orig_sub}.0/24${nl}"*)
9b4927
        # there was a match, so we need to look for an unused subnet
9b4927
        for new_sub in $(seq 124 254); do
9b4927
          case ${routes} in
9b4927
          *"${nl}192.168.${new_sub}.0/24${nl}"*)
9b4927
            ;;
9b4927
          *)
9b4927
            sub=$new_sub
9b4927
            break;
9b4927
            ;;
9b4927
          esac
9b4927
        done
9b4927
        ;;
9b4927
      *)
9b4927
        ;;
9b4927
    esac
9b4927
9b4927
    sed -e "s/${orig_sub}/${sub}/g" \
9b4927
         < %{_datadir}/libvirt/networks/default.xml \
9b4927
         > %{_sysconfdir}/libvirt/qemu/networks/default.xml
9b4927
    ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
9b4927
    # libvirt saves this file with mode 0600
9b4927
    chmod 0600 %{_sysconfdir}/libvirt/qemu/networks/default.xml
9b4927
9b4927
    # Make sure libvirt picks up the new network defininiton
9b4927
    mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || :
9b4927
    touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :
9b4927
fi
9b4927
9b4927
%posttrans daemon-config-network
9b4927
if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then
9b4927
    /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
9b4927
fi
9b4927
rm -rf %{_localstatedir}/lib/rpm-state/libvirt || :
9b4927
9b4927
%post daemon-config-nwfilter
9b4927
for datadir_file in %{_datadir}/libvirt/nwfilter/*.xml; do
9b4927
  sysconfdir_file=%{_sysconfdir}/libvirt/nwfilter/$(basename "$datadir_file")
9b4927
  if [ ! -f "$sysconfdir_file" ]; then
9b4927
    # libvirt saves these files with mode 600
9b4927
    install -m 0600 "$datadir_file" "$sysconfdir_file"
9b4927
  fi
9b4927
done
9b4927
# Make sure libvirt picks up the new nwfilter defininitons
9b4927
mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || :
9b4927
touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :
9b4927
9b4927
%posttrans daemon-config-nwfilter
9b4927
if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then
9b4927
    /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
9b4927
fi
9b4927
rm -rf %{_localstatedir}/lib/rpm-state/libvirt || :
9b4927
9b4927
9b4927
%if %{with_qemu}
9b4927
%pre daemon-driver-qemu
9b4927
# We want soft static allocation of well-known ids, as disk images
9b4927
# are commonly shared across NFS mounts by id rather than name; see
9b4927
# https://fedoraproject.org/wiki/Packaging:UsersAndGroups
9b4927
getent group kvm >/dev/null || groupadd -f -g 36 -r kvm
9b4927
getent group qemu >/dev/null || groupadd -f -g 107 -r qemu
9b4927
if ! getent passwd qemu >/dev/null; then
9b4927
  if ! getent passwd 107 >/dev/null; then
9b4927
    useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu
9b4927
  else
9b4927
    useradd -r -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu
9b4927
  fi
9b4927
fi
9b4927
exit 0
9b4927
%endif
9b4927
9b4927
%preun %{clientsuffix}
9b4927
9b4927
%systemd_preun libvirt-guests.service
9b4927
9b4927
%post %{clientsuffix}
9b4927
%systemd_post libvirt-guests.service
9b4927
9b4927
%postun %{clientsuffix}
9b4927
%systemd_postun libvirt-guests.service
9b4927
9b4927
%if %{with_lxc}
9b4927
%pre login-shell
9b4927
getent group virtlogin >/dev/null || groupadd -r virtlogin
9b4927
exit 0
9b4927
%endif
9b4927
9b4927
%endif
9b4927
9b4927
%files
9b4927
9b4927
%files %{docsuffix}
9b4927
%doc AUTHORS.rst NEWS.rst README.rst
9b4927
%doc libvirt-docs/*
9b4927
9b4927
%files daemon
9b4927
9b4927
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/
9b4927
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
%{_presetdir}/70-libvirt.preset
9b4927
%endif
9b4927
9b4927
%{_unitdir}/libvirtd.service
9b4927
%{_unitdir}/libvirtd.socket
9b4927
%{_unitdir}/libvirtd-ro.socket
9b4927
%{_unitdir}/libvirtd-admin.socket
9b4927
%{_unitdir}/libvirtd-tcp.socket
9b4927
%{_unitdir}/libvirtd-tls.socket
9b4927
%{_unitdir}/virtproxyd.service
9b4927
%{_unitdir}/virtproxyd.socket
9b4927
%{_unitdir}/virtproxyd-ro.socket
9b4927
%{_unitdir}/virtproxyd-admin.socket
9b4927
%{_unitdir}/virtproxyd-tcp.socket
9b4927
%{_unitdir}/virtproxyd-tls.socket
9b4927
%{_unitdir}/virt-guest-shutdown.target
9b4927
%{_unitdir}/virtlogd.service
9b4927
%{_unitdir}/virtlogd.socket
9b4927
%{_unitdir}/virtlogd-admin.socket
9b4927
%{_unitdir}/virtlockd.service
9b4927
%{_unitdir}/virtlockd.socket
9b4927
%{_unitdir}/virtlockd-admin.socket
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtproxyd
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtlogd
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtlockd
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
9b4927
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
9b4927
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
9b4927
9b4927
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
9b4927
%dir %{_datadir}/libvirt/
9b4927
9b4927
%ghost %dir %{_rundir}/libvirt/
9b4927
9b4927
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
9b4927
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/
9b4927
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
9b4927
%dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/
9b4927
9b4927
9b4927
%dir %attr(0755, root, root) %{_libdir}/libvirt/
9b4927
%dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/
9b4927
%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver
9b4927
%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so
9b4927
9b4927
%{_datadir}/augeas/lenses/libvirtd.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
9b4927
%{_datadir}/augeas/lenses/virtlogd.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtlogd.aug
9b4927
%{_datadir}/augeas/lenses/virtlockd.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtlockd.aug
9b4927
%{_datadir}/augeas/lenses/virtproxyd.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtproxyd.aug
9b4927
%{_datadir}/augeas/lenses/libvirt_lockd.aug
9b4927
%if %{with_qemu}
9b4927
%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug
9b4927
%endif
9b4927
9b4927
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
9b4927
%{_datadir}/polkit-1/actions/org.libvirt.api.policy
9b4927
%{_datadir}/polkit-1/rules.d/50-libvirt.rules
9b4927
9b4927
%if %{with_apparmor}
9b4927
%dir %{_sysconfdir}/apparmor.d
9b4927
%dir %{_sysconfdir}/apparmor.d/abstractions
9b4927
%dir %{_sysconfdir}/apparmor.d/libvirt
9b4927
%dir %{_sysconfdir}/apparmor.d/local
9b4927
%config(noreplace) %{_sysconfdir}/apparmor.d/usr.sbin.libvirtd
9b4927
%config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.libvirt.virt-aa-helper
9b4927
%config(noreplace) %{_sysconfdir}/apparmor.d/abstractions/libvirt-qemu
9b4927
%config(noreplace) %{_sysconfdir}/apparmor.d/abstractions/libvirt-lxc
9b4927
%config(noreplace) %{_sysconfdir}/apparmor.d/libvirt/TEMPLATE.lxc
9b4927
%config(noreplace) %{_sysconfdir}/apparmor.d/libvirt/TEMPLATE.qemu
9b4927
%config(noreplace) %{_sysconfdir}/apparmor.d/local/usr.lib.libvirt.virt-aa-helper
9b4927
%{_libexecdir}/virt-aa-helper
9b4927
%endif
9b4927
9b4927
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
9b4927
9b4927
%attr(0755, root, root) %{_libexecdir}/libvirt_iohelper
9b4927
9b4927
%attr(0755, root, root) %{_bindir}/virt-ssh-helper
9b4927
9b4927
%attr(0755, root, root) %{_sbindir}/libvirtd
9b4927
%attr(0755, root, root) %{_sbindir}/virtproxyd
9b4927
%attr(0755, root, root) %{_sbindir}/virtlogd
9b4927
%attr(0755, root, root) %{_sbindir}/virtlockd
9b4927
9b4927
%{_mandir}/man8/libvirtd.8*
9b4927
%{_mandir}/man8/virtlogd.8*
9b4927
%{_mandir}/man8/virtlockd.8*
9b4927
%{_mandir}/man8/virtproxyd.8*
9b4927
%{_mandir}/man7/virkey*.7*
9b4927
9b4927
%files daemon-config-network
9b4927
%dir %{_datadir}/libvirt/networks/
9b4927
%{_datadir}/libvirt/networks/default.xml
9b4927
%ghost %{_sysconfdir}/libvirt/qemu/networks/default.xml
9b4927
%ghost %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
9b4927
9b4927
%files daemon-config-nwfilter
9b4927
%dir %{_datadir}/libvirt/nwfilter/
9b4927
%{_datadir}/libvirt/nwfilter/*.xml
9b4927
%ghost %{_sysconfdir}/libvirt/nwfilter/*.xml
9b4927
9b4927
%files daemon-driver-interface
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtinterfaced
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtinterfaced.conf
9b4927
%{_datadir}/augeas/lenses/virtinterfaced.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtinterfaced.aug
9b4927
%{_unitdir}/virtinterfaced.service
9b4927
%{_unitdir}/virtinterfaced.socket
9b4927
%{_unitdir}/virtinterfaced-ro.socket
9b4927
%{_unitdir}/virtinterfaced-admin.socket
9b4927
%attr(0755, root, root) %{_sbindir}/virtinterfaced
9b4927
%{_libdir}/%{name}/connection-driver/libvirt_driver_interface.so
9b4927
%{_mandir}/man8/virtinterfaced.8*
9b4927
9b4927
%files daemon-driver-network
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtnetworkd
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtnetworkd.conf
9b4927
%{_datadir}/augeas/lenses/virtnetworkd.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtnetworkd.aug
9b4927
%{_unitdir}/virtnetworkd.service
9b4927
%{_unitdir}/virtnetworkd.socket
9b4927
%{_unitdir}/virtnetworkd-ro.socket
9b4927
%{_unitdir}/virtnetworkd-admin.socket
9b4927
%attr(0755, root, root) %{_sbindir}/virtnetworkd
9b4927
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
9b4927
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/
9b4927
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
9b4927
%ghost %dir %{_rundir}/libvirt/network/
9b4927
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
9b4927
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
9b4927
%attr(0755, root, root) %{_libexecdir}/libvirt_leaseshelper
9b4927
%{_libdir}/%{name}/connection-driver/libvirt_driver_network.so
9b4927
%{_mandir}/man8/virtnetworkd.8*
9b4927
9b4927
%if %{with_firewalld_zone}
9b4927
%{_prefix}/lib/firewalld/zones/libvirt.xml
9b4927
%endif
9b4927
9b4927
%files daemon-driver-nodedev
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtnodedevd
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtnodedevd.conf
9b4927
%{_datadir}/augeas/lenses/virtnodedevd.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtnodedevd.aug
9b4927
%{_unitdir}/virtnodedevd.service
9b4927
%{_unitdir}/virtnodedevd.socket
9b4927
%{_unitdir}/virtnodedevd-ro.socket
9b4927
%{_unitdir}/virtnodedevd-admin.socket
9b4927
%attr(0755, root, root) %{_sbindir}/virtnodedevd
9b4927
%{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so
9b4927
%{_mandir}/man8/virtnodedevd.8*
9b4927
9b4927
%files daemon-driver-nwfilter
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtnwfilterd
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtnwfilterd.conf
9b4927
%{_datadir}/augeas/lenses/virtnwfilterd.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtnwfilterd.aug
9b4927
%{_unitdir}/virtnwfilterd.service
9b4927
%{_unitdir}/virtnwfilterd.socket
9b4927
%{_unitdir}/virtnwfilterd-ro.socket
9b4927
%{_unitdir}/virtnwfilterd-admin.socket
9b4927
%attr(0755, root, root) %{_sbindir}/virtnwfilterd
9b4927
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
9b4927
%ghost %dir %{_rundir}/libvirt/network/
9b4927
%{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so
9b4927
%{_mandir}/man8/virtnwfilterd.8*
9b4927
9b4927
%files daemon-driver-secret
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtsecretd
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtsecretd.conf
9b4927
%{_datadir}/augeas/lenses/virtsecretd.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtsecretd.aug
9b4927
%{_unitdir}/virtsecretd.service
9b4927
%{_unitdir}/virtsecretd.socket
9b4927
%{_unitdir}/virtsecretd-ro.socket
9b4927
%{_unitdir}/virtsecretd-admin.socket
9b4927
%attr(0755, root, root) %{_sbindir}/virtsecretd
9b4927
%{_libdir}/%{name}/connection-driver/libvirt_driver_secret.so
9b4927
%{_mandir}/man8/virtsecretd.8*
9b4927
9b4927
%files daemon-driver-storage
9b4927
9b4927
%files daemon-driver-storage-core
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtstoraged
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtstoraged.conf
9b4927
%{_datadir}/augeas/lenses/virtstoraged.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtstoraged.aug
9b4927
%{_unitdir}/virtstoraged.service
9b4927
%{_unitdir}/virtstoraged.socket
9b4927
%{_unitdir}/virtstoraged-ro.socket
9b4927
%{_unitdir}/virtstoraged-admin.socket
9b4927
%attr(0755, root, root) %{_sbindir}/virtstoraged
9b4927
%attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
9b4927
%{_libdir}/%{name}/connection-driver/libvirt_driver_storage.so
9b4927
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_fs.so
9b4927
%{_libdir}/%{name}/storage-file/libvirt_storage_file_fs.so
9b4927
%{_mandir}/man8/virtstoraged.8*
9b4927
9b4927
%files daemon-driver-storage-disk
9b4927
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_disk.so
9b4927
9b4927
%files daemon-driver-storage-logical
9b4927
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_logical.so
9b4927
9b4927
%files daemon-driver-storage-scsi
9b4927
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_scsi.so
9b4927
9b4927
%files daemon-driver-storage-iscsi
9b4927
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi.so
9b4927
9b4927
%if %{with_storage_iscsi_direct}
9b4927
%files daemon-driver-storage-iscsi-direct
9b4927
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi-direct.so
9b4927
%endif
9b4927
9b4927
%files daemon-driver-storage-mpath
9b4927
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_mpath.so
9b4927
9b4927
%if %{with_storage_gluster}
9b4927
%files daemon-driver-storage-gluster
9b4927
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_gluster.so
9b4927
%{_libdir}/%{name}/storage-file/libvirt_storage_file_gluster.so
9b4927
%endif
9b4927
9b4927
%if %{with_storage_rbd}
9b4927
%files daemon-driver-storage-rbd
9b4927
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_rbd.so
9b4927
%endif
9b4927
9b4927
%if %{with_storage_sheepdog}
9b4927
%files daemon-driver-storage-sheepdog
9b4927
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so
9b4927
%endif
9b4927
9b4927
%if %{with_storage_zfs}
9b4927
%files daemon-driver-storage-zfs
9b4927
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_zfs.so
9b4927
%endif
9b4927
9b4927
%if %{with_qemu}
9b4927
%files daemon-driver-qemu
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtqemud
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtqemud.conf
9b4927
%{_datadir}/augeas/lenses/virtqemud.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtqemud.aug
9b4927
%{_unitdir}/virtqemud.service
9b4927
%{_unitdir}/virtqemud.socket
9b4927
%{_unitdir}/virtqemud-ro.socket
9b4927
%{_unitdir}/virtqemud-admin.socket
9b4927
%attr(0755, root, root) %{_sbindir}/virtqemud
9b4927
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
9b4927
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf
9b4927
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
9b4927
%ghost %dir %{_rundir}/libvirt/qemu/
9b4927
%dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
9b4927
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
9b4927
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
9b4927
%{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so
9b4927
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/swtpm/
9b4927
%if "%{_vendor}" == "debbuild"
9b4927
%dir %attr(0730, root, root) %{_localstatedir}/log/swtpm/libvirt/qemu/
9b4927
%else
9b4927
%dir %attr(0730, tss, tss) %{_localstatedir}/log/swtpm/libvirt/qemu/
9b4927
%endif
9b4927
%{_bindir}/virt-qemu-run
9b4927
%{_mandir}/man1/virt-qemu-run.1*
9b4927
%{_mandir}/man8/virtqemud.8*
9b4927
%endif
9b4927
9b4927
%if %{with_lxc}
9b4927
%files daemon-driver-lxc
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtlxcd
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtlxcd.conf
9b4927
%{_datadir}/augeas/lenses/virtlxcd.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtlxcd.aug
9b4927
%{_unitdir}/virtlxcd.service
9b4927
%{_unitdir}/virtlxcd.socket
9b4927
%{_unitdir}/virtlxcd-ro.socket
9b4927
%{_unitdir}/virtlxcd-admin.socket
9b4927
%attr(0755, root, root) %{_sbindir}/virtlxcd
9b4927
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/lxc.conf
9b4927
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc
9b4927
%ghost %dir %{_rundir}/libvirt/lxc/
9b4927
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/lxc/
9b4927
%{_datadir}/augeas/lenses/libvirtd_lxc.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
9b4927
%attr(0755, root, root) %{_libexecdir}/libvirt_lxc
9b4927
%{_libdir}/%{name}/connection-driver/libvirt_driver_lxc.so
9b4927
%{_mandir}/man8/virtlxcd.8*
9b4927
%endif
9b4927
9b4927
%if %{with_libxl}
9b4927
%files daemon-driver-libxl
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtxend
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtxend.conf
9b4927
%{_datadir}/augeas/lenses/virtxend.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtxend.aug
9b4927
%{_unitdir}/virtxend.service
9b4927
%{_unitdir}/virtxend.socket
9b4927
%{_unitdir}/virtxend-ro.socket
9b4927
%{_unitdir}/virtxend-admin.socket
9b4927
%attr(0755, root, root) %{_sbindir}/virtxend
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/libxl.conf
9b4927
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.libxl
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/libxl-lockd.conf
9b4927
%{_datadir}/augeas/lenses/libvirtd_libxl.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
9b4927
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/libxl/
9b4927
%ghost %dir %{_rundir}/libvirt/libxl/
9b4927
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
9b4927
%{_libdir}/%{name}/connection-driver/libvirt_driver_libxl.so
9b4927
%{_mandir}/man8/virtxend.8*
9b4927
%endif
9b4927
9b4927
%if %{with_vbox}
9b4927
%files daemon-driver-vbox
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/virtvboxd
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virtvboxd.conf
9b4927
%{_datadir}/augeas/lenses/virtvboxd.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_virtvboxd.aug
9b4927
%{_unitdir}/virtvboxd.service
9b4927
%{_unitdir}/virtvboxd.socket
9b4927
%{_unitdir}/virtvboxd-ro.socket
9b4927
%{_unitdir}/virtvboxd-admin.socket
9b4927
%attr(0755, root, root) %{_sbindir}/virtvboxd
9b4927
%{_libdir}/%{name}/connection-driver/libvirt_driver_vbox.so
9b4927
%{_mandir}/man8/virtvboxd.8*
9b4927
%endif
9b4927
9b4927
%if %{with_qemu_tcg}
9b4927
%files daemon-qemu
9b4927
%endif
9b4927
9b4927
%if %{with_qemu_kvm}
9b4927
%files daemon-kvm
9b4927
%endif
9b4927
9b4927
%if %{with_lxc}
9b4927
%files daemon-lxc
9b4927
%endif
9b4927
9b4927
%if %{with_libxl}
9b4927
%files daemon-xen
9b4927
%endif
9b4927
9b4927
%if %{with_vbox}
9b4927
%files daemon-vbox
9b4927
%endif
9b4927
9b4927
%if %{with_sanlock}
9b4927
%files lock-sanlock
9b4927
    %if %{with_qemu}
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf
9b4927
    %endif
9b4927
    %if %{with_libxl}
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/libxl-sanlock.conf
9b4927
    %endif
9b4927
%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so
9b4927
%{_datadir}/augeas/lenses/libvirt_sanlock.aug
9b4927
%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
9b4927
%dir %attr(0770, root, sanlock) %{_localstatedir}/lib/libvirt/sanlock
9b4927
%{_sbindir}/virt-sanlock-cleanup
9b4927
%{_mandir}/man8/virt-sanlock-cleanup.8*
9b4927
%attr(0755, root, root) %{_libexecdir}/libvirt_sanlock_helper
9b4927
%endif
9b4927
9b4927
%files %{clientsuffix}
9b4927
%{_mandir}/man1/virsh.1*
9b4927
%{_mandir}/man1/virt-xml-validate.1*
9b4927
%{_mandir}/man1/virt-pki-validate.1*
9b4927
%{_mandir}/man1/virt-host-validate.1*
9b4927
%{_bindir}/virsh
9b4927
%{_bindir}/virt-xml-validate
9b4927
%{_bindir}/virt-pki-validate
9b4927
%{_bindir}/virt-host-validate
9b4927
9b4927
%{_datadir}/systemtap/tapset/libvirt_probes*.stp
9b4927
%{_datadir}/systemtap/tapset/libvirt_functions.stp
9b4927
%if %{with_qemu}
9b4927
%{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp
9b4927
%endif
9b4927
9b4927
%{_datadir}/bash-completion/completions/virsh
9b4927
9b4927
9b4927
%{_unitdir}/libvirt-guests.service
9b4927
%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
9b4927
%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh
9b4927
9b4927
%files -n %{libname} -f %{name}.lang
9b4927
%license COPYING COPYING.LESSER
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/libvirt-admin.conf
9b4927
%{_libdir}/libvirt.so.*
9b4927
%{_libdir}/libvirt-qemu.so.*
9b4927
%{_libdir}/libvirt-lxc.so.*
9b4927
%{_libdir}/libvirt-admin.so.*
9b4927
%dir %{_datadir}/libvirt/
9b4927
%dir %{_datadir}/libvirt/schemas/
9b4927
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/
9b4927
9b4927
%{_datadir}/libvirt/schemas/*.rng
9b4927
9b4927
%{_datadir}/libvirt/cpu_map/*.xml
9b4927
9b4927
%{_datadir}/libvirt/test-screenshot.png
9b4927
9b4927
%files admin
9b4927
%{_mandir}/man1/virt-admin.1*
9b4927
%{_bindir}/virt-admin
9b4927
%{_datadir}/bash-completion/completions/virt-admin
9b4927
9b4927
%files bash-completion
9b4927
%{_datadir}/bash-completion/completions/vsh
9b4927
9b4927
%if %{with_wireshark}
9b4927
%files wireshark
9b4927
%{wireshark_plugindir}/libvirt.so
9b4927
%endif
9b4927
9b4927
%files -n %{nsslibname}
9b4927
%{_libdir}/libnss_libvirt.so.2
9b4927
%{_libdir}/libnss_libvirt_guest.so.2
9b4927
9b4927
%if %{with_lxc}
9b4927
%files login-shell
9b4927
%attr(4750, root, virtlogin) %{_bindir}/virt-login-shell
9b4927
%{_libexecdir}/virt-login-shell-helper
9b4927
%config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf
9b4927
%{_mandir}/man1/virt-login-shell.1*
9b4927
%endif
9b4927
9b4927
%files %{develsuffix}
9b4927
%{_libdir}/libvirt.so
9b4927
%{_libdir}/libvirt-admin.so
9b4927
%{_libdir}/libvirt-qemu.so
9b4927
%{_libdir}/libvirt-lxc.so
9b4927
%dir %{_includedir}/libvirt
9b4927
%{_includedir}/libvirt/virterror.h
9b4927
%{_includedir}/libvirt/libvirt.h
9b4927
%{_includedir}/libvirt/libvirt-admin.h
9b4927
%{_includedir}/libvirt/libvirt-common.h
9b4927
%{_includedir}/libvirt/libvirt-domain.h
9b4927
%{_includedir}/libvirt/libvirt-domain-checkpoint.h
9b4927
%{_includedir}/libvirt/libvirt-domain-snapshot.h
9b4927
%{_includedir}/libvirt/libvirt-event.h
9b4927
%{_includedir}/libvirt/libvirt-host.h
9b4927
%{_includedir}/libvirt/libvirt-interface.h
9b4927
%{_includedir}/libvirt/libvirt-network.h
9b4927
%{_includedir}/libvirt/libvirt-nodedev.h
9b4927
%{_includedir}/libvirt/libvirt-nwfilter.h
9b4927
%{_includedir}/libvirt/libvirt-secret.h
9b4927
%{_includedir}/libvirt/libvirt-storage.h
9b4927
%{_includedir}/libvirt/libvirt-stream.h
9b4927
%{_includedir}/libvirt/libvirt-qemu.h
9b4927
%{_includedir}/libvirt/libvirt-lxc.h
9b4927
%{_libdir}/pkgconfig/libvirt.pc
9b4927
%{_libdir}/pkgconfig/libvirt-admin.pc
9b4927
%{_libdir}/pkgconfig/libvirt-qemu.pc
9b4927
%{_libdir}/pkgconfig/libvirt-lxc.pc
9b4927
9b4927
%dir %{_datadir}/libvirt/api/
9b4927
%{_datadir}/libvirt/api/libvirt-api.xml
9b4927
%{_datadir}/libvirt/api/libvirt-admin-api.xml
9b4927
%{_datadir}/libvirt/api/libvirt-qemu-api.xml
9b4927
%{_datadir}/libvirt/api/libvirt-lxc-api.xml
9b4927
9b4927
9b4927
%changelog
9b4927
* Wed May 12 2021 Neal Gompa <ngompa@centosproject.org> - 7.1.0-4
9b4927
- Enable VMware and HyperV for Hyperscale builds
9b4927
9b4927
* Thu Mar 11 2021 Neal Gompa <ngompa@datto.com> - 7.1.0-3
9b4927
- Add Debian/Ubuntu support
9b4927
9b4927
* Tue Mar  9 2021 Richard W.M. Jones <rjones@redhat.com> - 7.1.0-2
9b4927
- Bump and rebuild for libwsman_client.so.4 -> .5
9b4927
9b4927
* Mon Mar 01 2021 Cole Robinson <crobinso@redhat.com> - 7.1.0-1
9b4927
- Update to version 7.1.0
9b4927
9b4927
* Wed Feb 03 2021 Cole Robinson <aintdiscole@gmail.com> - 7.0.0-4
9b4927
- Increase meson test timeout to fix builds on s390x copr
9b4927
9b4927
* Tue Feb 02 2021 Laine Stump <laine@redhat.com> - 7.0.0-3
9b4927
- disable netcf in build
9b4927
9b4927
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.0-2
9b4927
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
9b4927
9b4927
* Fri Jan 15 2021 Daniel P. Berrangé <berrange@redhat.com> - 7.0.0-1
9b4927
- Rebase to 7.0.0 release
9b4927
9b4927
* Fri Dec 04 2020 Cole Robinson <aintdiscole@gmail.com> - 6.10.0-2.1
9b4927
- Rebuild for wireshark soname bump
9b4927
9b4927
* Fri Dec 04 2020 Richard W.M. Jones <rjones@redhat.com> - 6.10.0-2
9b4927
- Build libvirt-daemon-kvm for riscv64.
9b4927
9b4927
* Tue Dec 01 2020 Cole Robinson <crobinso@redhat.com> - 6.10.0-1
9b4927
- Update to version 6.10.0
9b4927
9b4927
* Wed Nov  4 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.9.0-2
9b4927
- Re-apply reverted fix for disabling glusterfs, curl, openswman and libiscsi
9b4927
9b4927
* Tue Nov 03 2020 Cole Robinson <crobinso@redhat.com> - 6.9.0-1
9b4927
- Update to version 6.9.0
9b4927
9b4927
* Mon Nov  2 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.8.0-4
9b4927
- Really fix meson option for disabling glusterfs
9b4927
- Fix disabling curl, openswman and libiscsi
9b4927
9b4927
* Mon Nov  2 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.8.0-4
9b4927
- Fix name of meson option for disabling glusterfs
9b4927
9b4927
* Fri Oct 30 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.8.0-3
9b4927
- Fix stat() mocking for new glibc
9b4927
9b4927
* Wed Oct 28 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.8.0-2
9b4927
- Remove obsolete bash_completion conditional
9b4927
- Pass args to meson based on with_libssh/with_libssh2
9b4927
9b4927
* Thu Oct 01 2020 Cole Robinson <crobinso@redhat.com> - 6.8.0-1
9b4927
- Update to version 6.8.0
9b4927
9b4927
* Fri Sep  4 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.7.0-2
9b4927
- Fix QEMU start when KVM is not loaded (rhbz#1875327)
9b4927
9b4927
* Tue Sep 01 2020 Cole Robinson <crobinso@redhat.com> - 6.7.0-1
9b4927
- Update to version 6.7.0
9b4927
9b4927
* Fri Aug 21 2020 Merlin Mathesius <mmathesi@redhat.com> - 6.6.0-3
9b4927
- Fix so no platforms depend upon ceph for 32-bit architectures
9b4927
- Include upstream patches to fix GCC 10 warnings
9b4927
9b4927
* Fri Aug 21 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.6.0-2
9b4927
- Fix creation of pools on non-btrfs (rhbz#1870197)
9b4927
9b4927
* Tue Aug 04 2020 Cole Robinson <crobinso@redhat.com> - 6.6.0-1
9b4927
- Update to version 6.6.0
9b4927
9b4927
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.0-2
9b4927
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
9b4927
9b4927
* Fri Jul 03 2020 Cole Robinson <crobinso@redhat.com> - 6.5.0-1
9b4927
- Update to version 6.5.0
9b4927
9b4927
* Tue Jun 02 2020 Cole Robinson <crobinso@redhat.com> - 6.4.0-1
9b4927
- Update to version 6.4.0
9b4927
9b4927
* Tue May 05 2020 Cole Robinson <crobinso@redhat.com> - 6.3.0-1
9b4927
- Update to version 6.3.0
9b4927
9b4927
* Thu Apr 02 2020 Cole Robinson <crobinso@redhat.com> - 6.2.0-1
9b4927
- Update to version 6.2.0
9b4927
9b4927
* Tue Mar 24 2020 Felipe Borges <feborges@redhat.com> - 6.1.0-2
9b4927
- Check for disk type correctly in virDomainDiskTranslateSourcePool
9b4927
9b4927
* Wed Mar 04 2020 Cole Robinson <crobinso@redhat.com> - 6.1.0-1
9b4927
- Update to version 6.1.0
9b4927
9b4927
* Tue Feb 25 2020 Cole Robinson <crobinso@redhat.com> - 6.0.0-3
9b4927
- Rebuild for libiscsi soname bump
9b4927
9b4927
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-2
9b4927
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
9b4927
9b4927
* Wed Jan 15 2020 Cole Robinson <crobinso@redhat.com> - 6.0.0-1
9b4927
- Update to version 6.0.0