You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu-kvm/SPECS/qemu-kvm.spec

1429 lines
51 KiB

%global libfdt_version 1.6.0
%global libseccomp_version 2.4.0
%global libusbx_version 1.0.23
%global meson_version 0.61.3
%global usbredir_version 0.7.1
%global ipxe_version 20200823-5.git4bd064de
# LTO does not work with the coroutines of QEMU on non-x86 architectures
# (see BZ 1952483 and 1950192 for more information)
%ifnarch x86_64
%global _lto_cflags %%{nil}
%endif
%global have_usbredir 1
%global have_opengl 1
%global have_fdt 1
%global have_modules_load 0
%global have_memlock_limits 0
# Some of these are not relevant for RHEL, but defining them
# makes it easier to sync the dependency list with Fedora
%global have_block_rbd 1
%global enable_werror 1
%global have_clang 1
%global have_safe_stack 0
%if %{have_clang}
%global toolchain clang
%ifarch x86_64
%global have_safe_stack 1
%endif
%else
%global toolchain gcc
%global cc_suffix .gcc
%endif
# Release candidate version tracking
# global rcver rc4
%if 0%{?rcver:1}
%global rcrel .%{rcver}
%global rcstr -%{rcver}
%endif
# Features disabled in RHEL 10
%global have_pmem 0
%global have_librdma 0
%global have_numactl 1
%ifarch s390x
%global have_numactl 0
%endif
%global tools_only 0
%ifarch %{power64}
%global tools_only 1
%endif
%ifnarch %{ix86} x86_64 aarch64
%global have_usbredir 0
%endif
%global modprobe_kvm_conf %{_sourcedir}/kvm.conf
%ifarch s390x
%global modprobe_kvm_conf %{_sourcedir}/kvm-s390x.conf
%endif
%ifarch %{ix86} x86_64
%global modprobe_kvm_conf %{_sourcedir}/kvm-x86.conf
%endif
%ifarch %{ix86}
%global kvm_target i386
%endif
%ifarch x86_64
%global kvm_target x86_64
%else
%global have_opengl 0
%endif
%ifarch %{power64}
%global kvm_target ppc64
%global have_memlock_limits 1
%endif
%ifarch s390x
%global kvm_target s390x
%global have_modules_load 1
%endif
%ifarch ppc
%global kvm_target ppc
%endif
%ifarch aarch64
%global kvm_target aarch64
%endif
%global target_list %{kvm_target}-softmmu
%global block_drivers_rw_list qcow2,raw,file,host_device,nbd,iscsi,rbd,blkdebug,luks,null-co,nvme,copy-on-read,throttle,compress,virtio-blk-vhost-vdpa,virtio-blk-vfio-pci,virtio-blk-vhost-user,io_uring,nvme-io_uring
%global block_drivers_ro_list vdi,vmdk,vhdx,vpc,https
%define qemudocdir %{_docdir}/%{name}
%global firmwaredirs "%{_datadir}/qemu-firmware:%{_datadir}/ipxe/qemu:%{_datadir}/seavgabios:%{_datadir}/seabios"
#Versions of various parts:
%global requires_all_modules \
%if %{have_opengl} \
Requires: %{name}-ui-opengl = %{epoch}:%{version}-%{release} \
Requires: %{name}-ui-egl-headless = %{epoch}:%{version}-%{release} \
%endif \
Requires: %{name}-device-display-virtio-gpu = %{epoch}:%{version}-%{release} \
%ifarch s390x \
Requires: %{name}-device-display-virtio-gpu-ccw = %{epoch}:%{version}-%{release} \
%else \
Requires: %{name}-device-display-virtio-gpu-pci = %{epoch}:%{version}-%{release} \
%endif \
%ifarch x86_64 %{power64} \
Requires: %{name}-device-display-virtio-vga = %{epoch}:%{version}-%{release} \
%endif \
Requires: %{name}-device-usb-host = %{epoch}:%{version}-%{release} \
%if %{have_usbredir} \
Requires: %{name}-device-usb-redirect = %{epoch}:%{version}-%{release} \
%endif \
Requires: %{name}-block-blkio = %{epoch}:%{version}-%{release} \
Requires: %{name}-block-rbd = %{epoch}:%{version}-%{release} \
Requires: %{name}-audio-pa = %{epoch}:%{version}-%{release}
# Since SPICE is removed from RHEL-9, the following Obsoletes:
# removes {name}-ui-spice for upgrades from RHEL-8
# The "<= {version}" assumes RHEL-9 version >= RHEL-8 version (in
# other words RHEL-9 rebases are done together/before RHEL-8 ones)
# In addition, we obsolete some block drivers as we are no longer support
# them in default qemu-kvm installation.
# Note: ssh driver wasn't removed yet just disabled due to late handling
%global obsoletes_some_modules \
Obsoletes: %{name}-ui-spice <= %{epoch}:%{version} \
Obsoletes: %{name}-block-gluster <= %{epoch}:%{version} \
Obsoletes: %{name}-block-iscsi <= %{epoch}:%{version} \
Obsoletes: %{name}-block-ssh <= %{epoch}:%{version} \
Summary: QEMU is a machine emulator and virtualizer
Name: qemu-kvm
Version: 9.0.0
Release: 9%{?rcrel}%{?dist}%{?cc_suffix}.inferit
# Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped
# Epoch 15 used for RHEL 8
# Epoch 17 used for RHEL 9 (due to release versioning offset in RHEL 8.5)
Epoch: 18
License: GPL-2.0-only AND GPL-2.0-or-later AND CC-BY-3.0
URL: http://www.qemu.org/
ExclusiveArch: x86_64 %{power64} aarch64 s390x
Source0: http://wiki.qemu.org/download/qemu-%{version}%{?rcstr}.tar.xz
Source10: qemu-guest-agent.service
Source11: 99-qemu-guest-agent.rules
Source12: bridge.conf
Source13: qemu-ga.sysconfig
Source21: modules-load.conf
Source26: vhost.conf
Source27: kvm.conf
Source28: 95-kvm-memlock.conf
Source30: kvm-s390x.conf
Source31: kvm-x86.conf
Source36: README.tests
Patch0004: 0004-Initial-redhat-build.patch
Patch0005: 0005-Enable-disable-devices-for-RHEL.patch
Patch0006: 0006-Machine-type-related-general-changes.patch
Patch0007: 0007-Add-aarch64-machine-types.patch
Patch0008: 0008-Add-s390x-machine-types.patch
Patch0009: 0009-Add-x86_64-machine-types.patch
Patch0010: 0010-Enable-make-check.patch
Patch0011: 0011-vfio-cap-number-of-devices-that-can-be-assigned.patch
Patch0012: 0012-Add-support-statement-to-help-output.patch
Patch0013: 0013-Use-qemu-kvm-in-documentation-instead-of-qemu-system.patch
Patch0014: 0014-qcow2-Deprecation-warning-when-opening-v2-images-rw.patch
Patch0015: 0015-Add-upstream-compatibility-bits.patch
Patch0016: 0016-Disable-FDC-devices.patch
Patch0017: 0017-Disable-vga-cirrus-device.patch
# For RHEL-37563 - Enable 'vhost-user-snd-pci' in qemu-kvm for RHIVOS
Patch18: kvm-Enable-vhost-user-snd-pci-device.patch
# For RHEL-28972 - x86: Remove the existing deprecated CPU models on RHEL10
Patch19: kvm-qtest-x86-numa-test-do-not-use-the-obsolete-pentium-.patch
# For RHEL-28972 - x86: Remove the existing deprecated CPU models on RHEL10
Patch20: kvm-tests-qtest-libqtest-add-qtest_has_cpu_model-api.patch
# For RHEL-28972 - x86: Remove the existing deprecated CPU models on RHEL10
Patch21: kvm-tests-qtest-x86-check-for-availability-of-older-cpu-.patch
# For RHEL-28972 - x86: Remove the existing deprecated CPU models on RHEL10
Patch22: kvm-target-cpu-models-x86-Remove-the-existing-deprecated.patch
# For RHEL-28971 - Consider deprecating CPU models like "Nehalem" / "IvyBridge" on RHEL 10
Patch23: kvm-x86-cpu-deprecate-cpu-models-that-do-not-support-x86.patch
# For RHEL-36329 - [RHEL10.0.beta][stable_guest_abi]Failed to migrate VM with (qemu) qemu-kvm: Missing section footer for 0000:00:01.0/virtio-gpu qemu-kvm: load of migration failed: Invalid argument
Patch24: kvm-virtio-gpu-fix-v2-migration.patch
# For RHEL-36329 - [RHEL10.0.beta][stable_guest_abi]Failed to migrate VM with (qemu) qemu-kvm: Missing section footer for 0000:00:01.0/virtio-gpu qemu-kvm: load of migration failed: Invalid argument
Patch25: kvm-rhel-9.4.0-machine-type-compat-for-virtio-gpu-migrat.patch
# For RHEL-39898 - s390: Remove the legacy CPU models on RHEL10
Patch26: kvm-s390x-remove-deprecated-rhel-machine-types.patch
# For RHEL-39898 - s390: Remove the legacy CPU models on RHEL10
Patch27: kvm-s390x-select-correct-components-for-no-board-build.patch
# For RHEL-39898 - s390: Remove the legacy CPU models on RHEL10
Patch28: kvm-target-s390x-Add-a-CONFIG-switch-to-disable-legacy-C.patch
# For RHEL-39898 - s390: Remove the legacy CPU models on RHEL10
Patch29: kvm-target-s390x-cpu_models-Disable-everything-up-to-the.patch
# For RHEL-39898 - s390: Remove the legacy CPU models on RHEL10
Patch30: kvm-target-s390x-Revert-the-old-s390x-CPU-model-disablem.patch
# For RHEL-43409 - aio=io_uring: Assertion failure `luringcb->co->ctx == s->aio_context' with block_resize
# For RHEL-43410 - aio=native: Assertion failure `laiocb->co->ctx == laiocb->ctx->aio_context' with block_resize
Patch31: kvm-Revert-monitor-use-aio_co_reschedule_self.patch
# For RHEL-43409 - aio=io_uring: Assertion failure `luringcb->co->ctx == s->aio_context' with block_resize
# For RHEL-43410 - aio=native: Assertion failure `laiocb->co->ctx == laiocb->ctx->aio_context' with block_resize
Patch32: kvm-aio-warn-about-iohandler_ctx-special-casing.patch
# For RHEL-46239 - CVE-2024-4467 qemu-kvm: QEMU: 'qemu-img info' leads to host file read/write [rhel-10.0]
Patch33: kvm-qcow2-Don-t-open-data_file-with-BDRV_O_NO_IO.patch
# For RHEL-46239 - CVE-2024-4467 qemu-kvm: QEMU: 'qemu-img info' leads to host file read/write [rhel-10.0]
Patch34: kvm-iotests-244-Don-t-store-data-file-with-protocol-in-i.patch
# For RHEL-46239 - CVE-2024-4467 qemu-kvm: QEMU: 'qemu-img info' leads to host file read/write [rhel-10.0]
Patch35: kvm-iotests-270-Don-t-store-data-file-with-json-prefix-i.patch
# For RHEL-46239 - CVE-2024-4467 qemu-kvm: QEMU: 'qemu-img info' leads to host file read/write [rhel-10.0]
Patch36: kvm-block-Parse-filenames-only-when-explicitly-requested.patch
# For RHEL-40959 - Qemu hang when quit dst vm after storage migration(nbd+tls)
Patch37: kvm-nbd-server-do-not-poll-within-a-coroutine-context.patch
# For RHEL-40959 - Qemu hang when quit dst vm after storage migration(nbd+tls)
Patch38: kvm-nbd-server-Mark-negotiation-functions-as-coroutine_f.patch
# For RHEL-40959 - Qemu hang when quit dst vm after storage migration(nbd+tls)
Patch39: kvm-qio-Inherit-follow_coroutine_ctx-across-TLS.patch
# For RHEL-40959 - Qemu hang when quit dst vm after storage migration(nbd+tls)
Patch40: kvm-iotests-test-NBD-TLS-iothread.patch
# For RHEL-50165 - Enable 'vhost-user-scmi-pci' and 'vhost-user-scmi' in qemu-kvm for RHIVOS
Patch41: kvm-Enable-vhost-user-scmi-devices.patch
# For RHEL-51901 - qemu-kvm: linux-aio: add support for IO_CMD_FDSYNC command[RHEL-10]
Patch42: kvm-linux-aio-add-IO_CMD_FDSYNC-command-support.patch
# For RHEL-52599 - CVE-2024-7409 qemu-kvm: Denial of Service via Improper Synchronization in QEMU NBD Server During Socket Closure [rhel-10.0]
Patch43: kvm-nbd-server-Plumb-in-new-args-to-nbd_client_add.patch
# For RHEL-52599 - CVE-2024-7409 qemu-kvm: Denial of Service via Improper Synchronization in QEMU NBD Server During Socket Closure [rhel-10.0]
Patch44: kvm-nbd-server-CVE-2024-7409-Cap-default-max-connections.patch
# For RHEL-52599 - CVE-2024-7409 qemu-kvm: Denial of Service via Improper Synchronization in QEMU NBD Server During Socket Closure [rhel-10.0]
Patch45: kvm-nbd-server-CVE-2024-7409-Drop-non-negotiating-client.patch
# For RHEL-52599 - CVE-2024-7409 qemu-kvm: Denial of Service via Improper Synchronization in QEMU NBD Server During Socket Closure [rhel-10.0]
Patch46: kvm-nbd-server-CVE-2024-7409-Close-stray-clients-at-serv.patch
# For RHEL-54260 - [RHEL10] Need to update the deprecated CPU model warning message
Patch47: kvm-x86-cpu-update-deprecation-string-to-match-lowest-un.patch
# For RHEL-52599 - CVE-2024-7409 qemu-kvm: Denial of Service via Improper Synchronization in QEMU NBD Server During Socket Closure [rhel-10.0]
Patch48: kvm-nbd-server-CVE-2024-7409-Avoid-use-after-free-when-c.patch
%if %{have_clang}
BuildRequires: clang
%if %{have_safe_stack}
BuildRequires: compiler-rt
%endif
%else
BuildRequires: gcc
%endif
BuildRequires: meson >= %{meson_version}
BuildRequires: ninja-build
BuildRequires: zlib-devel
BuildRequires: libzstd-devel
BuildRequires: glib2-devel
BuildRequires: gnutls-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: libaio-devel
BuildRequires: libblkio-devel
BuildRequires: liburing-devel
BuildRequires: python3-devel
BuildRequires: libattr-devel
BuildRequires: libusbx-devel >= %{libusbx_version}
%if %{have_usbredir}
BuildRequires: usbredir-devel >= %{usbredir_version}
%endif
BuildRequires: texinfo
BuildRequires: python3-sphinx
BuildRequires: python3-sphinx_rtd_theme
BuildRequires: libseccomp-devel >= %{libseccomp_version}
# For network block driver
BuildRequires: libcurl-devel
%if %{have_block_rbd}
BuildRequires: librbd-devel
%endif
# We need both because the 'stap' binary is probed for by configure
BuildRequires: systemtap
BuildRequires: systemtap-sdt-devel
# MSVSphere
BuildRequires: systemtap-sdt-dtrace
# For VNC PNG support
BuildRequires: libpng-devel
# For virtiofs
BuildRequires: libcap-ng-devel
# Hard requirement for version >= 1.3
BuildRequires: pixman-devel
# For rdma
%if %{have_librdma}
BuildRequires: rdma-core-devel
%endif
%if %{have_fdt}
BuildRequires: libfdt-devel >= %{libfdt_version}
%endif
# For compressed guest memory dumps
BuildRequires: lzo-devel snappy-devel
# For NUMA memory binding
%if %{have_numactl}
BuildRequires: numactl-devel
%endif
# qemu-pr-helper multipath support (requires libudev too)
BuildRequires: device-mapper-multipath-devel
BuildRequires: systemd-devel
%if %{have_pmem}
BuildRequires: libpmem-devel
%endif
# qemu-keymap
BuildRequires: pkgconfig(xkbcommon)
%if %{have_opengl}
BuildRequires: pkgconfig(epoxy)
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(gbm)
%endif
BuildRequires: perl-Test-Harness
BuildRequires: libslirp-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: spice-protocol
BuildRequires: capstone-devel
# Requires for qemu-kvm package
Requires: %{name}-core = %{epoch}:%{version}-%{release}
Requires: %{name}-docs = %{epoch}:%{version}-%{release}
Requires: %{name}-tools = %{epoch}:%{version}-%{release}
Requires: qemu-pr-helper = %{epoch}:%{version}-%{release}
Requires: virtiofsd >= 1.5.0
%{requires_all_modules}
%description
%{name} is an open source virtualizer that provides hardware
emulation for the KVM hypervisor. %{name} acts as a virtual
machine monitor together with the KVM kernel modules, and emulates the
hardware for a full system such as a PC and its associated peripherals.
%package core
Summary: %{name} core components
%{obsoletes_some_modules}
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: qemu-img = %{epoch}:%{version}-%{release}
%ifarch %{ix86} x86_64
Requires: edk2-ovmf
%endif
%ifarch aarch64
Requires: edk2-aarch64
%endif
Requires: libseccomp >= %{libseccomp_version}
Requires: libusbx >= %{libusbx_version}
Requires: capstone
%if %{have_fdt}
Requires: libfdt >= %{libfdt_version}
%endif
%description core
%{name} is an open source virtualizer that provides hardware
emulation for the KVM hypervisor. %{name} acts as a virtual
machine monitor together with the KVM kernel modules, and emulates the
hardware for a full system such as a PC and its associated peripherals.
This is a minimalistic installation of %{name}. Functionality provided by
this package is not ensured and it can change in a future version as some
functionality can be split out to separate package.
Before updating this package, it is recommended to check the package
changelog for information on functionality which might have been moved to
a separate package to prevent issues due to the moved functionality.
If apps opt-in to minimalist packaging by depending on %{name}-core, they
explicitly accept that features may disappear from %{name}-core in future
updates.
%package common
Summary: QEMU common files needed by all QEMU targets
Requires(post): /usr/bin/getent
Requires(post): /usr/sbin/groupadd
Requires(post): /usr/sbin/useradd
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%ifarch %{ix86} x86_64
Requires: seabios-bin >= 1.10.2-1
%endif
%ifnarch aarch64 s390x
Requires: seavgabios-bin >= 1.12.0-3
Requires: ipxe-roms-qemu >= %{ipxe_version}
%endif
# Removal -gl modules as they do not provide any functionality - see bz#2149022
Obsoletes: %{name}-device-display-virtio-gpu-gl <= %{epoch}:%{version}
Obsoletes: %{name}-device-display-virtio-gpu-pci-gl <= %{epoch}:%{version}
Obsoletes: %{name}-device-display-virtio-vga-gl <= %{epoch}:%{version}
%description common
%{name} is an open source virtualizer that provides hardware emulation for
the KVM hypervisor.
This package provides documentation and auxiliary programs used with %{name}.
%package tools
Summary: %{name} support tools
%description tools
%{name}-tools provides various tools related to %{name} usage.
%package docs
Summary: %{name} documentation
%description docs
%{name}-docs provides documentation files regarding %{name}.
%package -n qemu-pr-helper
Summary: qemu-pr-helper utility for %{name}
%description -n qemu-pr-helper
This package provides the qemu-pr-helper utility that is required for certain
SCSI features.
%package -n qemu-img
Summary: QEMU command line tool for manipulating disk images
%description -n qemu-img
This package provides a command line tool for manipulating disk images.
%package -n qemu-guest-agent
Summary: QEMU guest agent
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%description -n qemu-guest-agent
%{name} is an open source virtualizer that provides hardware emulation for
the KVM hypervisor.
This package provides an agent to run inside guests, which communicates
with the host over a virtio-serial channel named "org.qemu.guest_agent.0"
This package does not need to be installed on the host OS.
%package tests
Summary: tests for the %{name} package
Requires: %{name} = %{epoch}:%{version}-%{release}
%define testsdir %{_libdir}/%{name}/tests-src
%description tests
The %{name}-tests rpm contains tests that can be used to verify
the functionality of the installed %{name} package
Install this package if you want access to the avocado_qemu
tests, or qemu-iotests.
%package block-blkio
Summary: QEMU libblkio block drivers
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
%description block-blkio
This package provides the additional libblkio block drivers for QEMU.
Install this package if you want to use virtio-blk-vdpa-blk,
virtio-blk-vfio-pci, virtio-blk-vhost-user, io_uring, and nvme-io_uring block
drivers provided by libblkio.
%package block-curl
Summary: QEMU CURL block driver
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
%description block-curl
This package provides the additional CURL block driver for QEMU.
Install this package if you want to access remote disks over
http, https, ftp and other transports provided by the CURL library.
%if %{have_block_rbd}
%package block-rbd
Summary: QEMU Ceph/RBD block driver
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
%description block-rbd
This package provides the additional Ceph/RBD block driver for QEMU.
Install this package if you want to access remote Ceph volumes
using the rbd protocol.
%endif
%package audio-pa
Summary: QEMU PulseAudio audio driver
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
%description audio-pa
This package provides the additional PulseAudio audio driver for QEMU.
%if %{have_opengl}
%package ui-opengl
Summary: QEMU opengl support
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
Requires: mesa-libGL
Requires: mesa-libEGL
Requires: mesa-dri-drivers
%description ui-opengl
This package provides opengl support.
%package ui-egl-headless
Summary: QEMU EGL headless driver
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-ui-opengl%{?_isa} = %{epoch}:%{version}-%{release}
%description ui-egl-headless
This package provides the additional egl-headless UI for QEMU.
%endif
%package device-display-virtio-gpu
Summary: QEMU virtio-gpu display device
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
%description device-display-virtio-gpu
This package provides the virtio-gpu display device for QEMU.
%ifarch s390x
%package device-display-virtio-gpu-ccw
Summary: QEMU virtio-gpu-ccw display device
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-device-display-virtio-gpu = %{epoch}:%{version}-%{release}
%description device-display-virtio-gpu-ccw
This package provides the virtio-gpu-ccw display device for QEMU.
%else
%package device-display-virtio-gpu-pci
Summary: QEMU virtio-gpu-pci display device
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-device-display-virtio-gpu = %{epoch}:%{version}-%{release}
%description device-display-virtio-gpu-pci
This package provides the virtio-gpu-pci display device for QEMU.
%endif
%ifarch x86_64 %{power64}
%package device-display-virtio-vga
Summary: QEMU virtio-vga display device
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
%description device-display-virtio-vga
This package provides the virtio-vga display device for QEMU.
%endif
%package device-usb-host
Summary: QEMU usb host device
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
%description device-usb-host
This package provides the USB pass through driver for QEMU.
%if %{have_usbredir}
%package device-usb-redirect
Summary: QEMU usbredir support
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
Requires: usbredir >= 0.7.1
Provides: %{name}-hw-usbredir
Obsoletes: %{name}-hw-usbredir <= %{epoch}:%{version}
%description device-usb-redirect
This package provides usbredir support.
%endif
%package ui-dbus
Summary: QEMU D-Bus UI driver
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
%description ui-dbus
This package provides the additional D-Bus UI for QEMU.
%package audio-dbus
Summary: QEMU D-Bus audio driver
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-ui-dbus = %{epoch}:%{version}-%{release}
%description audio-dbus
This package provides the additional D-Bus audio driver for QEMU.
%prep
%setup -q -n qemu-%{version}%{?rcstr}
%autopatch -p1
%global qemu_kvm_build qemu_kvm_build
mkdir -p %{qemu_kvm_build}
%build
# Necessary hack for ZUUL CI
ulimit -n 10240
%define disable_everything \\\
--audio-drv-list= \\\
--disable-alsa \\\
--disable-attr \\\
--disable-auth-pam \\\
--disable-avx2 \\\
--disable-avx512f \\\
--disable-avx512bw \\\
--disable-blkio \\\
--disable-block-drv-whitelist-in-tools \\\
--disable-bochs \\\
--disable-bpf \\\
--disable-brlapi \\\
--disable-bsd-user \\\
--disable-bzip2 \\\
--disable-cap-ng \\\
--disable-capstone \\\
--disable-cfi \\\
--disable-cfi-debug \\\
--disable-cloop \\\
--disable-cocoa \\\
--disable-coreaudio \\\
--disable-coroutine-pool \\\
--disable-crypto-afalg \\\
--disable-curl \\\
--disable-curses \\\
--disable-dbus-display \\\
--disable-debug-info \\\
--disable-debug-mutex \\\
--disable-debug-tcg \\\
--disable-dmg \\\
--disable-docs \\\
--disable-download \\\
--disable-dsound \\\
--disable-fdt \\\
--disable-fuse \\\
--disable-fuse-lseek \\\
--disable-gcrypt \\\
--disable-gettext \\\
--disable-gio \\\
--disable-glusterfs \\\
--disable-gnutls \\\
--disable-gtk \\\
--disable-guest-agent \\\
--disable-guest-agent-msi \\\
--disable-hvf \\\
--disable-iconv \\\
--disable-jack \\\
--disable-kvm \\\
--disable-l2tpv3 \\\
--disable-libdaxctl \\\
--disable-libdw \\\
--disable-libiscsi \\\
--disable-libnfs \\\
--disable-libpmem \\\
--disable-libssh \\\
--disable-libudev \\\
--disable-libusb \\\
--disable-libvduse \\\
--disable-linux-aio \\\
--disable-linux-io-uring \\\
--disable-linux-user \\\
--disable-live-block-migration \\\
--disable-lto \\\
--disable-lzfse \\\
--disable-lzo \\\
--disable-malloc-trim \\\
--disable-membarrier \\\
--disable-modules \\\
--disable-module-upgrades \\\
--disable-mpath \\\
--disable-multiprocess \\\
--disable-netmap \\\
--disable-nettle \\\
--disable-numa \\\
--disable-nvmm \\\
--disable-opengl \\\
--disable-oss \\\
--disable-pa \\\
--disable-parallels \\\
--disable-pie \\\
--disable-plugins \\\
--disable-pvrdma \\\
--disable-qcow1 \\\
--disable-qed \\\
--disable-qga-vss \\\
--disable-qom-cast-debug \\\
--disable-rbd \\\
--disable-rdma \\\
--disable-replication \\\
--disable-rng-none \\\
--disable-safe-stack \\\
--disable-sanitizers \\\
--disable-sdl \\\
--disable-sdl-image \\\
--disable-seccomp \\\
--disable-selinux \\\
--disable-slirp \\\
--disable-slirp-smbd \\\
--disable-smartcard \\\
--disable-snappy \\\
--disable-sndio \\\
--disable-sparse \\\
--disable-spice \\\
--disable-spice-protocol \\\
--disable-strip \\\
--disable-system \\\
--disable-tcg \\\
--disable-tools \\\
--disable-tpm \\\
--disable-u2f \\\
--disable-usb-redir \\\
--disable-user \\\
--disable-vde \\\
--disable-vdi \\\
--disable-vduse-blk-export \\\
--disable-vhost-crypto \\\
--disable-vhost-kernel \\\
--disable-vhost-net \\\
--disable-vhost-user \\\
--disable-vhost-user-blk-server \\\
--disable-vhost-vdpa \\\
--disable-virglrenderer \\\
--disable-virtfs \\\
--disable-vnc \\\
--disable-vnc-jpeg \\\
--disable-png \\\
--disable-vnc-sasl \\\
--disable-vte \\\
--disable-vvfat \\\
--disable-werror \\\
--disable-whpx \\\
--disable-xen \\\
--disable-xen-pci-passthrough \\\
--disable-xkbcommon \\\
--disable-zstd \\\
--without-default-devices
run_configure() {
../configure \
--cc=%{__cc} \
--cxx=/bin/false \
--prefix="%{_prefix}" \
--libdir="%{_libdir}" \
--datadir="%{_datadir}" \
--sysconfdir="%{_sysconfdir}" \
--interp-prefix=%{_prefix}/qemu-%M \
--localstatedir="%{_localstatedir}" \
--docdir="%{_docdir}" \
--libexecdir="%{_libexecdir}" \
--extra-ldflags="%{build_ldflags}" \
--extra-cflags="%{optflags} -Wno-string-plus-int" \
--with-pkgversion="%{name}-%{version}-%{release}" \
--with-suffix="%{name}" \
--firmwarepath=%{firmwaredirs} \
--enable-trace-backends=dtrace \
--with-coroutine=ucontext \
--tls-priority=@QEMU,SYSTEM \
%{disable_everything} \
--with-devices-%{kvm_target}=%{kvm_target}-rh-devices \
"$@"
echo "config-host.mak contents:"
echo "==="
cat config-host.mak
echo "==="
}
pushd %{qemu_kvm_build}
run_configure \
%if %{defined target_list}
--target-list="%{target_list}" \
%endif
%if %{defined block_drivers_rw_list}
--block-drv-rw-whitelist=%{block_drivers_rw_list} \
%endif
%if %{defined block_drivers_ro_list}
--block-drv-ro-whitelist=%{block_drivers_ro_list} \
%endif
--enable-attr \
--enable-blkio \
--enable-cap-ng \
--enable-capstone \
--enable-coroutine-pool \
--enable-curl \
--enable-dbus-display \
--enable-debug-info \
--enable-docs \
%if %{have_fdt}
--enable-fdt=system \
%endif
--enable-gio \
--enable-gnutls \
--enable-guest-agent \
--enable-iconv \
--enable-kvm \
%if %{have_pmem}
--enable-libpmem \
%endif
--enable-libusb \
--enable-libudev \
--enable-linux-aio \
--enable-linux-io-uring \
--enable-lzo \
--enable-malloc-trim \
--enable-modules \
--enable-mpath \
%if %{have_numactl}
--enable-numa \
%endif
%if %{have_opengl}
--enable-opengl \
%endif
--enable-pa \
--enable-pie \
%if %{have_block_rbd}
--enable-rbd \
%endif
%if %{have_librdma}
--enable-rdma \
%endif
--enable-seccomp \
--enable-selinux \
--enable-slirp \
--enable-snappy \
--enable-spice-protocol \
--enable-system \
--enable-tcg \
--enable-tools \
--enable-tpm \
%if %{have_usbredir}
--enable-usb-redir \
%endif
--enable-vdi \
--enable-vhost-kernel \
--enable-vhost-net \
--enable-vhost-user \
--enable-vhost-user-blk-server \
--enable-vhost-vdpa \
--enable-vnc \
--enable-png \
--enable-vnc-sasl \
%if %{enable_werror}
--enable-werror \
%endif
--enable-xkbcommon \
--enable-zstd \
%if %{have_safe_stack}
--enable-safe-stack \
%endif
%if %{tools_only}
%make_build qemu-img
%make_build qemu-io
%make_build qemu-nbd
%make_build storage-daemon/qemu-storage-daemon
%make_build docs/qemu-img.1
%make_build docs/qemu-nbd.8
%make_build docs/qemu-storage-daemon.1
%make_build docs/qemu-storage-daemon-qmp-ref.7
%make_build qga/qemu-ga
%make_build docs/qemu-ga.8
# endif tools_only
%endif
%if !%{tools_only}
%make_build
# Setup back compat qemu-kvm binary
%{__python3} scripts/tracetool.py --backend dtrace --format stap \
--group=all --binary %{_libexecdir}/qemu-kvm --probe-prefix qemu.kvm \
trace/trace-events-all qemu-kvm.stp
%{__python3} scripts/tracetool.py --backends=dtrace --format=log-stap \
--group=all --binary %{_libexecdir}/qemu-kvm --probe-prefix qemu.kvm \
trace/trace-events-all qemu-kvm-log.stp
%{__python3} scripts/tracetool.py --backend dtrace --format simpletrace-stap \
--group=all --binary %{_libexecdir}/qemu-kvm --probe-prefix qemu.kvm \
trace/trace-events-all qemu-kvm-simpletrace.stp
cp -a qemu-system-%{kvm_target} qemu-kvm
%ifarch s390x
# Copy the built new images into place for "make check":
cp pc-bios/s390-ccw/s390-ccw.img pc-bios/s390-ccw/s390-netboot.img pc-bios/
%endif
popd
# endif !tools_only
%endif
%install
# Install qemu-guest-agent service and udev rules
install -D -m 0644 %{_sourcedir}/qemu-guest-agent.service %{buildroot}%{_unitdir}/qemu-guest-agent.service
install -D -m 0644 %{_sourcedir}/qemu-ga.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/qemu-ga
install -D -m 0644 %{_sourcedir}/99-qemu-guest-agent.rules %{buildroot}%{_udevrulesdir}/99-qemu-guest-agent.rules
# Install qemu-ga fsfreeze bits
mkdir -p %{buildroot}%{_sysconfdir}/qemu-ga/fsfreeze-hook.d
install -p scripts/qemu-guest-agent/fsfreeze-hook %{buildroot}%{_sysconfdir}/qemu-ga/fsfreeze-hook
mkdir -p %{buildroot}%{_datadir}/%{name}/qemu-ga/fsfreeze-hook.d/
install -p -m 0644 scripts/qemu-guest-agent/fsfreeze-hook.d/*.sample %{buildroot}%{_datadir}/%{name}/qemu-ga/fsfreeze-hook.d/
mkdir -p -v %{buildroot}%{_localstatedir}/log/qemu-ga/
%if %{tools_only}
pushd %{qemu_kvm_build}
install -D -p -m 0755 qga/qemu-ga %{buildroot}%{_bindir}/qemu-ga
install -D -p -m 0755 qemu-img %{buildroot}%{_bindir}/qemu-img
install -D -p -m 0755 qemu-io %{buildroot}%{_bindir}/qemu-io
install -D -p -m 0755 qemu-nbd %{buildroot}%{_bindir}/qemu-nbd
install -D -p -m 0755 storage-daemon/qemu-storage-daemon %{buildroot}%{_bindir}/qemu-storage-daemon
mkdir -p %{buildroot}%{_mandir}/man1/
mkdir -p %{buildroot}%{_mandir}/man7/
mkdir -p %{buildroot}%{_mandir}/man8/
install -D -p -m 644 docs/qemu-img.1* %{buildroot}%{_mandir}/man1
install -D -p -m 644 docs/qemu-nbd.8* %{buildroot}%{_mandir}/man8
install -D -p -m 644 docs/qemu-storage-daemon.1* %{buildroot}%{_mandir}/man1
install -D -p -m 644 docs/qemu-storage-daemon-qmp-ref.7* %{buildroot}%{_mandir}/man7
install -D -p -m 644 docs/qemu-ga.8* %{buildroot}%{_mandir}/man8
popd
# endif tools_only
%endif
%if !%{tools_only}
install -D -p -m 0644 %{_sourcedir}/vhost.conf %{buildroot}%{_sysconfdir}/modprobe.d/vhost.conf
install -D -p -m 0644 %{modprobe_kvm_conf} $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/kvm.conf
# Create new directories and put them all under tests-src
mkdir -p %{buildroot}%{testsdir}/python
mkdir -p %{buildroot}%{testsdir}/tests
mkdir -p %{buildroot}%{testsdir}/tests/avocado
mkdir -p %{buildroot}%{testsdir}/tests/qemu-iotests
mkdir -p %{buildroot}%{testsdir}/scripts/qmp
install -m 0644 scripts/dump-guest-memory.py \
%{buildroot}%{_datadir}/%{name}
# Install avocado_qemu tests
cp -R %{qemu_kvm_build}/tests/avocado/* %{buildroot}%{testsdir}/tests/avocado/
# Install qemu.py and qmp/ scripts required to run avocado_qemu tests
cp -R %{qemu_kvm_build}/python/qemu %{buildroot}%{testsdir}/python
cp -R %{qemu_kvm_build}/scripts/qmp/* %{buildroot}%{testsdir}/scripts/qmp
install -p -m 0644 tests/Makefile.include %{buildroot}%{testsdir}/tests/
# Install qemu-iotests
cp -R tests/qemu-iotests/* %{buildroot}%{testsdir}/tests/qemu-iotests/
cp -ur %{qemu_kvm_build}/tests/qemu-iotests/* %{buildroot}%{testsdir}/tests/qemu-iotests/
install -p -m 0644 %{_sourcedir}/README.tests %{buildroot}%{testsdir}/README
# Do the actual qemu tree install
pushd %{qemu_kvm_build}
%make_install
popd
mkdir -p %{buildroot}%{_datadir}/systemtap/tapset
install -m 0755 %{qemu_kvm_build}/qemu-system-%{kvm_target} %{buildroot}%{_libexecdir}/qemu-kvm
install -m 0644 %{qemu_kvm_build}/qemu-kvm.stp %{buildroot}%{_datadir}/systemtap/tapset/
install -m 0644 %{qemu_kvm_build}/qemu-kvm-log.stp %{buildroot}%{_datadir}/systemtap/tapset/
install -m 0644 %{qemu_kvm_build}/qemu-kvm-simpletrace.stp %{buildroot}%{_datadir}/systemtap/tapset/
install -d -m 0755 "%{buildroot}%{_datadir}/%{name}/systemtap/script.d"
install -c -m 0644 %{qemu_kvm_build}/scripts/systemtap/script.d/qemu_kvm.stp "%{buildroot}%{_datadir}/%{name}/systemtap/script.d/"
install -d -m 0755 "%{buildroot}%{_datadir}/%{name}/systemtap/conf.d"
install -c -m 0644 %{qemu_kvm_build}/scripts/systemtap/conf.d/qemu_kvm.conf "%{buildroot}%{_datadir}/%{name}/systemtap/conf.d/"
rm %{buildroot}/%{_datadir}/applications/qemu.desktop
rm %{buildroot}%{_bindir}/qemu-system-%{kvm_target}
rm %{buildroot}%{_datadir}/systemtap/tapset/qemu-system-%{kvm_target}.stp
rm %{buildroot}%{_datadir}/systemtap/tapset/qemu-system-%{kvm_target}-simpletrace.stp
rm %{buildroot}%{_datadir}/systemtap/tapset/qemu-system-%{kvm_target}-log.stp
# Install simpletrace
install -m 0755 scripts/simpletrace.py %{buildroot}%{_datadir}/%{name}/simpletrace.py
# Avoid ambiguous 'python' interpreter name
mkdir -p %{buildroot}%{_datadir}/%{name}/tracetool
install -m 0644 -t %{buildroot}%{_datadir}/%{name}/tracetool scripts/tracetool/*.py
mkdir -p %{buildroot}%{_datadir}/%{name}/tracetool/backend
install -m 0644 -t %{buildroot}%{_datadir}/%{name}/tracetool/backend scripts/tracetool/backend/*.py
mkdir -p %{buildroot}%{_datadir}/%{name}/tracetool/format
install -m 0644 -t %{buildroot}%{_datadir}/%{name}/tracetool/format scripts/tracetool/format/*.py
mkdir -p %{buildroot}%{qemudocdir}
install -p -m 0644 -t %{buildroot}%{qemudocdir} README.rst README.systemtap COPYING COPYING.LIB LICENSE
# Rename man page
pushd %{buildroot}%{_mandir}/man1/
for fn in qemu.1*; do
mv $fn "qemu-kvm${fn#qemu}"
done
popd
install -D -p -m 0644 qemu.sasl %{buildroot}%{_sysconfdir}/sasl2/%{name}.conf
# Provided by package openbios
rm -rf %{buildroot}%{_datadir}/%{name}/openbios-ppc
rm -rf %{buildroot}%{_datadir}/%{name}/openbios-sparc32
rm -rf %{buildroot}%{_datadir}/%{name}/openbios-sparc64
# Provided by package SLOF
rm -rf %{buildroot}%{_datadir}/%{name}/slof.bin
# Remove unpackaged files.
rm -rf %{buildroot}%{_datadir}/%{name}/palcode-clipper
rm -rf %{buildroot}%{_datadir}/%{name}/petalogix*.dtb
rm -f %{buildroot}%{_datadir}/%{name}/bamboo.dtb
rm -f %{buildroot}%{_datadir}/%{name}/ppc_rom.bin
rm -rf %{buildroot}%{_datadir}/%{name}/s390-zipl.rom
rm -rf %{buildroot}%{_datadir}/%{name}/u-boot.e500
rm -rf %{buildroot}%{_datadir}/%{name}/qemu_vga.ndrv
rm -rf %{buildroot}%{_datadir}/%{name}/skiboot.lid
rm -rf %{buildroot}%{_datadir}/%{name}/qboot.rom
rm -rf %{buildroot}%{_datadir}/%{name}/s390-ccw.img
rm -rf %{buildroot}%{_datadir}/%{name}/s390-netboot.img
rm -rf %{buildroot}%{_datadir}/%{name}/hppa-firmware.img
rm -rf %{buildroot}%{_datadir}/%{name}/hppa-firmware64.img
rm -rf %{buildroot}%{_datadir}/%{name}/canyonlands.dtb
rm -rf %{buildroot}%{_datadir}/%{name}/u-boot-sam460-20100605.bin
rm -rf %{buildroot}%{_datadir}/%{name}/firmware
rm -rf %{buildroot}%{_datadir}/%{name}/edk2-*.fd
rm -rf %{buildroot}%{_datadir}/%{name}/edk2-licenses.txt
rm -rf %{buildroot}%{_datadir}/%{name}/opensbi-riscv32-sifive_u-fw_jump.bin
rm -rf %{buildroot}%{_datadir}/%{name}/opensbi-riscv32-virt-fw_jump.bin
rm -rf %{buildroot}%{_datadir}/%{name}/opensbi-riscv32-generic-fw_dynamic.*
rm -rf %{buildroot}%{_datadir}/%{name}/opensbi-riscv64-sifive_u-fw_jump.bin
rm -rf %{buildroot}%{_datadir}/%{name}/opensbi-riscv64-virt-fw_jump.bin
rm -rf %{buildroot}%{_datadir}/%{name}/opensbi-riscv64-generic-fw_dynamic.*
rm -rf %{buildroot}%{_datadir}/%{name}/qemu-nsis.bmp
rm -rf %{buildroot}%{_datadir}/%{name}/npcm7xx_bootrom.bin
# Remove virtfs-proxy-helper files
rm -rf %{buildroot}%{_libexecdir}/virtfs-proxy-helper
rm -rf %{buildroot}%{_mandir}/man1/virtfs-proxy-helper*
%ifarch s390x
# Use the s390-*.img that we've just built, not the pre-built ones
install -m 0644 %{qemu_kvm_build}/pc-bios/s390-ccw/s390-ccw.img %{buildroot}%{_datadir}/%{name}/
install -m 0644 %{qemu_kvm_build}/pc-bios/s390-ccw/s390-netboot.img %{buildroot}%{_datadir}/%{name}/
%else
rm -rf %{buildroot}%{_libdir}/%{name}/hw-s390x-virtio-gpu-ccw.so
%endif
%ifnarch x86_64
rm -rf %{buildroot}%{_datadir}/%{name}/kvmvapic.bin
rm -rf %{buildroot}%{_datadir}/%{name}/linuxboot.bin
rm -rf %{buildroot}%{_datadir}/%{name}/multiboot.bin
rm -rf %{buildroot}%{_datadir}/%{name}/multiboot_dma.bin
rm -rf %{buildroot}%{_datadir}/%{name}/pvh.bin
%endif
# Remove sparc files
rm -rf %{buildroot}%{_datadir}/%{name}/QEMU,tcx.bin
rm -rf %{buildroot}%{_datadir}/%{name}/QEMU,cgthree.bin
# Remove ivshmem example programs
rm -rf %{buildroot}%{_bindir}/ivshmem-client
rm -rf %{buildroot}%{_bindir}/ivshmem-server
# Remove efi roms
rm -rf %{buildroot}%{_datadir}/%{name}/efi*.rom
# Provided by package ipxe
rm -rf %{buildroot}%{_datadir}/%{name}/pxe*rom
# Provided by package vgabios
rm -rf %{buildroot}%{_datadir}/%{name}/vgabios*bin
# Provided by package seabios
rm -rf %{buildroot}%{_datadir}/%{name}/bios*.bin
# Remove vof roms
rm -rf %{buildroot}%{_datadir}/%{name}/vof-nvram.bin
rm -rf %{buildroot}%{_datadir}/%{name}/vof.bin
%if %{have_modules_load}
install -D -p -m 644 %{_sourcedir}/modules-load.conf %{buildroot}%{_sysconfdir}/modules-load.d/kvm.conf
%endif
%if %{have_memlock_limits}
install -D -p -m 644 %{_sourcedir}/95-kvm-memlock.conf %{buildroot}%{_sysconfdir}/security/limits.d/95-kvm-memlock.conf
%endif
# Install rules to use the bridge helper with libvirt's virbr0
install -D -m 0644 %{_sourcedir}/bridge.conf %{buildroot}%{_sysconfdir}/%{name}/bridge.conf
# Install qemu-pr-helper service
install -m 0644 contrib/systemd/qemu-pr-helper.service %{buildroot}%{_unitdir}
install -m 0644 contrib/systemd/qemu-pr-helper.socket %{buildroot}%{_unitdir}
# We do not support gl display devices so we can remove their modules as they
# do not have expected functionality included.
#
# https://gitlab.com/qemu-project/qemu/-/issues/1352 was filed to stop building these
# modules in case all dependencies are not satisfied.
rm -rf %{buildroot}%{_libdir}/%{name}/hw-display-virtio-gpu-gl.so
rm -rf %{buildroot}%{_libdir}/%{name}/hw-display-virtio-gpu-pci-gl.so
rm -rf %{buildroot}%{_libdir}/%{name}/hw-display-virtio-vga-gl.so
# We need to make the block device modules and other qemu SO files executable
# otherwise RPM won't pick up their dependencies.
chmod +x %{buildroot}%{_libdir}/%{name}/*.so
# Remove docs we don't care about
find %{buildroot}%{qemudocdir} -name .buildinfo -delete
rm -rf %{buildroot}%{qemudocdir}/specs
# endif !tools_only
%endif
%check
%if !%{tools_only}
pushd %{qemu_kvm_build}
echo "Testing %{name}-build"
#%make_build check
make V=1 check
popd
# endif !tools_only
%endif
%post -n qemu-guest-agent
%systemd_post qemu-guest-agent.service
%preun -n qemu-guest-agent
%systemd_preun qemu-guest-agent.service
%postun -n qemu-guest-agent
%systemd_postun_with_restart qemu-guest-agent.service
%if !%{tools_only}
%post common
getent group kvm >/dev/null || groupadd -g 36 -r kvm
getent group qemu >/dev/null || groupadd -g 107 -r qemu
getent passwd qemu >/dev/null || \
useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
-c "qemu user" qemu
# If this is a new installation, then load kvm modules now, so we can make
# sure that the user gets a system where KVM is ready to use. In case of
# an upgrade, don't try to modprobe again in case the user unloaded the
# kvm module on purpose.
%if %{have_modules_load}
if [ "$1" = "1" ]; then
modprobe -b kvm &> /dev/null || :
fi
%endif
# endif !tools_only
%endif
%files -n qemu-img
%{_bindir}/qemu-img
%{_bindir}/qemu-io
%{_bindir}/qemu-nbd
%{_bindir}/qemu-storage-daemon
%{_mandir}/man1/qemu-img.1*
%{_mandir}/man8/qemu-nbd.8*
%{_mandir}/man1/qemu-storage-daemon.1*
%{_mandir}/man7/qemu-storage-daemon-qmp-ref.7*
%files -n qemu-guest-agent
%doc COPYING README.rst
%{_bindir}/qemu-ga
%{_mandir}/man8/qemu-ga.8*
%{_unitdir}/qemu-guest-agent.service
%{_udevrulesdir}/99-qemu-guest-agent.rules
%config(noreplace) %{_sysconfdir}/sysconfig/qemu-ga
%{_sysconfdir}/qemu-ga
%{_datadir}/%{name}/qemu-ga
%dir %{_localstatedir}/log/qemu-ga
%if !%{tools_only}
%files
# Deliberately empty
%files tools
%{_bindir}/qemu-keymap
%{_bindir}/qemu-edid
%{_bindir}/qemu-trace-stap
%{_bindir}/elf2dmp
%{_datadir}/%{name}/simpletrace.py*
%{_datadir}/%{name}/tracetool/*.py*
%{_datadir}/%{name}/tracetool/backend/*.py*
%{_datadir}/%{name}/tracetool/format/*.py*
%{_datadir}/%{name}/dump-guest-memory.py*
%{_datadir}/%{name}/trace-events-all
%{_mandir}/man1/qemu-trace-stap.1*
%files -n qemu-pr-helper
%{_bindir}/qemu-pr-helper
%{_unitdir}/qemu-pr-helper.service
%{_unitdir}/qemu-pr-helper.socket
%{_mandir}/man8/qemu-pr-helper.8*
%files docs
%doc %{qemudocdir}
%files common
%license COPYING COPYING.LIB LICENSE
%{_mandir}/man7/qemu-qmp-ref.7*
%{_mandir}/man7/qemu-cpu-models.7*
%{_mandir}/man7/qemu-ga-ref.7*
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/keymaps/
%{_mandir}/man1/%{name}.1*
%{_mandir}/man7/qemu-block-drivers.7*
%attr(4755, -, -) %{_libexecdir}/qemu-bridge-helper
%config(noreplace) %{_sysconfdir}/sasl2/%{name}.conf
%ghost %{_sysconfdir}/kvm
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/bridge.conf
%config(noreplace) %{_sysconfdir}/modprobe.d/vhost.conf
%config(noreplace) %{_sysconfdir}/modprobe.d/kvm.conf
%ifarch x86_64
%{_datadir}/%{name}/linuxboot.bin
%{_datadir}/%{name}/multiboot.bin
%{_datadir}/%{name}/multiboot_dma.bin
%{_datadir}/%{name}/kvmvapic.bin
%{_datadir}/%{name}/pvh.bin
%endif
%ifarch s390x
%{_datadir}/%{name}/s390-ccw.img
%{_datadir}/%{name}/s390-netboot.img
%endif
%{_datadir}/icons/*
%{_datadir}/%{name}/linuxboot_dma.bin
%if %{have_modules_load}
%{_sysconfdir}/modules-load.d/kvm.conf
%endif
%if %{have_memlock_limits}
%{_sysconfdir}/security/limits.d/95-kvm-memlock.conf
%endif
%files core
%{_libexecdir}/qemu-kvm
%{_datadir}/systemtap/tapset/qemu-kvm.stp
%{_datadir}/systemtap/tapset/qemu-kvm-log.stp
%{_datadir}/systemtap/tapset/qemu-kvm-simpletrace.stp
%{_datadir}/%{name}/systemtap/script.d/qemu_kvm.stp
%{_datadir}/%{name}/systemtap/conf.d/qemu_kvm.conf
%{_datadir}/systemtap/tapset/qemu-img*.stp
%{_datadir}/systemtap/tapset/qemu-io*.stp
%{_datadir}/systemtap/tapset/qemu-nbd*.stp
%{_datadir}/systemtap/tapset/qemu-storage-daemon*.stp
%ifarch x86_64
%{_libdir}/%{name}/accel-tcg-%{kvm_target}.so
%endif
%files device-display-virtio-gpu
%{_libdir}/%{name}/hw-display-virtio-gpu.so
%ifarch s390x
%files device-display-virtio-gpu-ccw
%{_libdir}/%{name}/hw-s390x-virtio-gpu-ccw.so
%else
%files device-display-virtio-gpu-pci
%{_libdir}/%{name}/hw-display-virtio-gpu-pci.so
%endif
%ifarch x86_64 %{power64}
%files device-display-virtio-vga
%{_libdir}/%{name}/hw-display-virtio-vga.so
%endif
%files tests
%{testsdir}
%{_libdir}/%{name}/accel-qtest-%{kvm_target}.so
%files block-blkio
%{_libdir}/%{name}/block-blkio.so
%files block-curl
%{_libdir}/%{name}/block-curl.so
%if %{have_block_rbd}
%files block-rbd
%{_libdir}/%{name}/block-rbd.so
%endif
%files audio-pa
%{_libdir}/%{name}/audio-pa.so
%if %{have_opengl}
%files ui-opengl
%{_libdir}/%{name}/ui-opengl.so
%files ui-egl-headless
%{_libdir}/%{name}/ui-egl-headless.so
%endif
%files device-usb-host
%{_libdir}/%{name}/hw-usb-host.so
%if %{have_usbredir}
%files device-usb-redirect
%{_libdir}/%{name}/hw-usb-redirect.so
%endif
%files audio-dbus
%{_libdir}/%{name}/audio-dbus.so
%files ui-dbus
%{_libdir}/%{name}/ui-dbus.so
# endif !tools_only
%endif
%changelog
* Fri Dec 13 2024 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 18:9.0.0-9.inferit
- Added BuildRequires for MSVSphere build
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 18:9.0.0-9
- Rebuilt for MSVSphere 10
* Wed Sep 18 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.0.0-9
- kvm-nbd-server-CVE-2024-7409-Avoid-use-after-free-when-c.patch [RHEL-52599]
- Resolves: RHEL-52599
(CVE-2024-7409 qemu-kvm: Denial of Service via Improper Synchronization in QEMU NBD Server During Socket Closure [rhel-10.0])
* Mon Aug 26 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.0.0-8
- kvm-x86-cpu-update-deprecation-string-to-match-lowest-un.patch [RHEL-54260]
- Resolves: RHEL-54260
([RHEL10] Need to update the deprecated CPU model warning message)
* Thu Aug 15 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.0.0-7
- kvm-linux-aio-add-IO_CMD_FDSYNC-command-support.patch [RHEL-51901]
- kvm-nbd-server-Plumb-in-new-args-to-nbd_client_add.patch [RHEL-52599]
- kvm-nbd-server-CVE-2024-7409-Cap-default-max-connections.patch [RHEL-52599]
- kvm-nbd-server-CVE-2024-7409-Drop-non-negotiating-client.patch [RHEL-52599]
- kvm-nbd-server-CVE-2024-7409-Close-stray-clients-at-serv.patch [RHEL-52599]
- Resolves: RHEL-51901
(qemu-kvm: linux-aio: add support for IO_CMD_FDSYNC command[RHEL-10])
- Resolves: RHEL-52599
(CVE-2024-7409 qemu-kvm: Denial of Service via Improper Synchronization in QEMU NBD Server During Socket Closure [rhel-10.0])
* Tue Jul 30 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.0.0-6
- kvm-Enable-vhost-user-scmi-devices.patch [RHEL-50165]
- Resolves: RHEL-50165
(Enable 'vhost-user-scmi-pci' and 'vhost-user-scmi' in qemu-kvm for RHIVOS)
* Wed Jul 24 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.0.0-5
- kvm-nbd-server-do-not-poll-within-a-coroutine-context.patch [RHEL-40959]
- kvm-nbd-server-Mark-negotiation-functions-as-coroutine_f.patch [RHEL-40959]
- kvm-qio-Inherit-follow_coroutine_ctx-across-TLS.patch [RHEL-40959]
- kvm-iotests-test-NBD-TLS-iothread.patch [RHEL-40959]
- Resolves: RHEL-40959
(Qemu hang when quit dst vm after storage migration(nbd+tls))
* Thu Jul 04 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.0.0-4
- kvm-qcow2-Don-t-open-data_file-with-BDRV_O_NO_IO.patch [RHEL-46239]
- kvm-iotests-244-Don-t-store-data-file-with-protocol-in-i.patch [RHEL-46239]
- kvm-iotests-270-Don-t-store-data-file-with-json-prefix-i.patch [RHEL-46239]
- kvm-block-Parse-filenames-only-when-explicitly-requested.patch [RHEL-46239]
- Resolves: RHEL-46239
(CVE-2024-4467 qemu-kvm: QEMU: 'qemu-img info' leads to host file read/write [rhel-10.0])
* Mon Jul 01 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.0.0-3
- kvm-qtest-x86-numa-test-do-not-use-the-obsolete-pentium-.patch [RHEL-28972]
- kvm-tests-qtest-libqtest-add-qtest_has_cpu_model-api.patch [RHEL-28972]
- kvm-tests-qtest-x86-check-for-availability-of-older-cpu-.patch [RHEL-28972]
- kvm-target-cpu-models-x86-Remove-the-existing-deprecated.patch [RHEL-28972]
- kvm-x86-cpu-deprecate-cpu-models-that-do-not-support-x86.patch [RHEL-28971]
- kvm-virtio-gpu-fix-v2-migration.patch [RHEL-36329]
- kvm-rhel-9.4.0-machine-type-compat-for-virtio-gpu-migrat.patch [RHEL-36329]
- kvm-s390x-remove-deprecated-rhel-machine-types.patch [RHEL-39898]
- kvm-s390x-select-correct-components-for-no-board-build.patch [RHEL-39898]
- kvm-target-s390x-Add-a-CONFIG-switch-to-disable-legacy-C.patch [RHEL-39898]
- kvm-target-s390x-cpu_models-Disable-everything-up-to-the.patch [RHEL-39898]
- kvm-target-s390x-Revert-the-old-s390x-CPU-model-disablem.patch [RHEL-39898]
- kvm-Revert-monitor-use-aio_co_reschedule_self.patch [RHEL-43409 RHEL-43410]
- kvm-aio-warn-about-iohandler_ctx-special-casing.patch [RHEL-43409 RHEL-43410]
- Resolves: RHEL-28972
(x86: Remove the existing deprecated CPU models on RHEL10)
- Resolves: RHEL-28971
(Consider deprecating CPU models like "Nehalem" / "IvyBridge" on RHEL 10)
- Resolves: RHEL-36329
([RHEL10.0.beta][stable_guest_abi]Failed to migrate VM with (qemu) qemu-kvm: Missing section footer for 0000:00:01.0/virtio-gpu qemu-kvm: load of migration failed: Invalid argument)
- Resolves: RHEL-39898
(s390: Remove the legacy CPU models on RHEL10)
- Resolves: RHEL-43409
(aio=io_uring: Assertion failure `luringcb->co->ctx == s->aio_context' with block_resize)
- Resolves: RHEL-43410
(aio=native: Assertion failure `laiocb->co->ctx == laiocb->ctx->aio_context' with block_resize)
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 18:9.0.0-2.1
- Bump release for June 2024 mass rebuild
* Mon Jun 10 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.0.0-2
- kvm-Enable-vhost-user-snd-pci-device.patch [RHEL-37563]
- Resolves: RHEL-37563
(Enable 'vhost-user-snd-pci' in qemu-kvm for RHIVOS)
* Tue May 14 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.0.0-1
- Rebase to QEMU 9.0.0 [RHEL-28852]
- Resolves: RHEL-28852
(Rebase qemu-kvm to QEMU 9.0.0 for RHEL 10.0 beta)
- Resolves: RHEL-23771
([qemu-kvm] Disable passthrough of pmem device)
- Resolves: RHEL-34024
(Remove RDMA migration support
- Resolves: RHEL-30366
(Check/fix machine type compatibility for QEMU 9.0.0 [x86_64][rhel-10.0 Beta])
- Resolves: RHEL-30367
(Check/fix machine type compatibility for QEMU 9.0.0 [aarch64][rhel-10.0 Beta])
* Tue Jan 02 2024 Miroslav Rezanina <mrezanin@redhat.com> - 8.2.0-1
- Rebase to QEMU 8.2.0 [RHEL-14111]
- Fix machine type compatibility [RHEL-17067 RHEL-17068]
- Add 9.4.0 machine type [RHEL-17168 RHEL-19117 RHEL-19119]
- Resolves: RHEL-14111
(Rebase qemu-kvm to QEMU 8.2.0)
- Resolves: RHEL-17067
(Check/fix machine type compatibility for qemu-kvm 8.2.0 [s390x])
- Resolves: RHEL-17068
(Check/fix machine type compatibility for qemu-kvm 8.2.0 [x86_64])
- Resolves: RHEL-17168
(Introduce virt-rhel9.4.0 arm-virt machine type [aarch64])
- Resolves: RHEL-19117
(Introduce virt-rhel9.4.0 arm-virt machine type [x86_64])
- Resolves: RHEL-19119
(Introduce virt-rhel9.4.0 arm-virt machine type [s390x])