c4d339c498
- Package and cross-build rom files for aarch64 from SLE15/Leap15.0 to fix boo#1125964 - Add patch to fix seabios cross-compilation: * seabios-fix_cross_compilation.patch - Add patch to fix sgabios cross-compilation: * sgabios-fix-cross-build.patch - Fix _constraints to include all architectures for disk size (fix aarch64) OBS-URL: https://build.opensuse.org/request/show/678204 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=456
1692 lines
44 KiB
RPMSpec
1692 lines
44 KiB
RPMSpec
#
|
|
# spec file for package qemu
|
|
#
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define build_x86_firmware_from_source 0
|
|
%define build_skiboot_from_source 0
|
|
%define build_slof_from_source 0
|
|
%define kvm_available 0
|
|
%define legacy_qemu_kvm 0
|
|
%define force_fit_virtio_pxe_rom 1
|
|
|
|
%if 0%{?suse_version} > 1315
|
|
# cross-x86_64-gcc7 is available from SLE15/Leap15.0
|
|
%define build_rom_arch %ix86 x86_64 aarch64
|
|
%else
|
|
%define build_rom_arch %ix86 x86_64
|
|
%endif
|
|
|
|
%if "%{?distribution}" == ""
|
|
%define distro private-build
|
|
%else
|
|
%define distro %{distribution}
|
|
%endif
|
|
|
|
%ifarch %{build_rom_arch}
|
|
# choice of building all from source or using provided binary x86 blobs
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
%define build_x86_firmware_from_source 1
|
|
%endif
|
|
%endif
|
|
|
|
%ifarch ppc64
|
|
%define build_skiboot_from_source 1
|
|
%define build_slof_from_source 1
|
|
%endif
|
|
|
|
%ifarch ppc64le
|
|
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
|
|
%define build_skiboot_from_source 1
|
|
%define build_slof_from_source 1
|
|
%endif
|
|
%endif
|
|
|
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64
|
|
%define kvm_available 1
|
|
%endif
|
|
|
|
%ifarch %ix86 x86_64 s390x
|
|
%define legacy_qemu_kvm 1
|
|
%endif
|
|
|
|
%if 0%{?suse_version} >= 1315 && 0%{?is_opensuse}
|
|
%define with_glusterfs 1
|
|
%endif
|
|
|
|
%ifarch x86_64
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} > 120100 ) )
|
|
%define with_rbd 1
|
|
%endif
|
|
%endif
|
|
|
|
%ifarch aarch64
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?is_opensuse} == 0 && 0%{?sle_version} > 120100 )
|
|
%define with_rbd 1
|
|
%endif
|
|
%endif
|
|
|
|
%ifarch ppc64le
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?is_opensuse} == 0 && 0%{?sle_version} > 120200 )
|
|
%define with_rbd 1
|
|
%endif
|
|
%endif
|
|
|
|
%ifarch s390x
|
|
%if 0%{?is_opensuse} == 0 && 0%{?sle_version} > 120200
|
|
%define with_rbd 1
|
|
%endif
|
|
%endif
|
|
|
|
%ifarch ppc64
|
|
%if 0%{?is_opensuse} && 0%{?sle_version} > 120200
|
|
%define with_rbd 1
|
|
%endif
|
|
%endif
|
|
|
|
%if 0%{?suse_version} > 1320
|
|
%define with_seccomp 1
|
|
%endif
|
|
|
|
%ifarch %ix86 x86_64 s390x aarch64 ppc64le
|
|
%define with_seccomp 1
|
|
%endif
|
|
|
|
%if 0%( pkg-config --exists 'udev > 190' && echo '1' ) == 01
|
|
%define _udevrulesdir /usr/lib/udev/rules.d
|
|
%else
|
|
%define _udevrulesdir /lib/udev/rules.d
|
|
%endif
|
|
|
|
%define srcname qemu
|
|
Name: qemu
|
|
Url: https://www.qemu.org/
|
|
Summary: Machine emulator and virtualizer
|
|
License: BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
|
|
Group: System/Emulators/PC
|
|
QEMU_VERSION
|
|
Release: 0
|
|
Source: https://wiki.qemu.org/download/%{srcname}-%{srcver}.tar.xz
|
|
Source100: %{srcname}.keyring
|
|
Source1: 80-kvm.rules
|
|
Source2: kvm.conf
|
|
Source3: qemu-ifup
|
|
Source4: bridge.conf
|
|
Source5: qemu-kvm.1.gz
|
|
Source6: ksm.service
|
|
Source7: qemu-ga@.service
|
|
Source8: 80-qemu-ga.rules
|
|
Source9: qemu-supportconfig
|
|
Source10: supported.arm.txt
|
|
Source11: supported.ppc.txt
|
|
Source12: supported.x86.txt
|
|
Source13: supported.s390.txt
|
|
# this is to make lint happy
|
|
Source300: qemu-rpmlintrc
|
|
Source301: ipxe-stub-out-the-SAN-req-s-in-int13.patch
|
|
Source400: update_git.sh
|
|
# Upstream First -- https://wiki.qemu.org/Contribute/SubmitAPatch
|
|
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
|
|
PATCH_FILES
|
|
# Please do not add QEMU patches manually here.
|
|
# Run update_git.sh to regenerate this queue.
|
|
|
|
# SeaBIOS / SeaVGABIOS - path: roms/seabios (patch range 1100-1199)
|
|
Patch1100: seabios-use-python2-explicitly-as-needed.patch
|
|
Patch1101: seabios-switch-to-python3-as-needed.patch
|
|
Patch1102: seabios-fix_cross_compilation.patch
|
|
|
|
# ipxe - path: roms/ipxe (patch range 1200-1299)
|
|
Patch1200: ipxe-stable-buildid.patch
|
|
Patch1201: ipxe-use-gcc6-for-more-compact-code.patch
|
|
Patch1202: ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
|
|
Patch1203: ipxe-fix-build.patch
|
|
Patch1204: ipxe-efi-Simplify-diagnostic-for-NULL-handle.patch
|
|
Patch1205: ipxe-build-Disable-gcc-address-of-packed-member-warning.patch
|
|
|
|
# sgabios - path: roms/sgabios (patch range 1300-1399)
|
|
Patch1300: sgabios-stable-buildid.patch
|
|
Patch1301: sgabios-fix-cross-build.patch
|
|
|
|
# SLOF - path: roms/SLOF (patch range 1400-1499) (Currently no patches)
|
|
|
|
# skiboot - path: roms/skiboot (patch range 1500-1599)
|
|
Patch1500: skiboot-hdata-i2c.c-fix-building-with-gcc8.patch
|
|
|
|
# keycodemapdb - path: ui/keycodemapdb (patch range 1600-1699) (Currently no patches)
|
|
|
|
# openBIOS - path: roms/openbios (patch range 1700-1799) (Currently no patches)
|
|
|
|
# If for any reason we have any QEMU patches which are conditionally applied,
|
|
# "manually" include them here:
|
|
|
|
ExcludeArch: s390
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
#!BuildIgnore: gcc-PIE
|
|
BuildRequires: Mesa-devel
|
|
%if 0%{?is_opensuse}
|
|
BuildRequires: SDL-devel
|
|
%if 0%{?suse_version} >= 1320
|
|
BuildRequires: SDL2-devel
|
|
%endif
|
|
%endif
|
|
BuildRequires: alsa-devel
|
|
%if %{build_x86_firmware_from_source}
|
|
BuildRequires: acpica
|
|
BuildRequires: binutils-devel
|
|
%ifnarch %{ix86} x86_64
|
|
# We must cross-compile on non-x86*
|
|
BuildRequires: cross-x86_64-binutils
|
|
BuildRequires: cross-x86_64-gcc7
|
|
%endif
|
|
%endif
|
|
BuildRequires: bluez-devel
|
|
BuildRequires: brlapi-devel
|
|
BuildRequires: curl-devel
|
|
BuildRequires: cyrus-sasl-devel
|
|
BuildRequires: e2fsprogs-devel
|
|
BuildRequires: fdupes
|
|
BuildRequires: gcc-c++
|
|
%if %{build_x86_firmware_from_source}
|
|
%if 0%{?suse_version} <= 1320
|
|
BuildRequires: gcc6
|
|
%endif
|
|
%endif
|
|
BuildRequires: glib2-devel
|
|
%if 0%{?with_glusterfs}
|
|
BuildRequires: glusterfs-devel
|
|
%endif
|
|
BuildRequires: gtk3-devel
|
|
BuildRequires: libaio-devel
|
|
BuildRequires: libattr-devel
|
|
BuildRequires: libbz2-devel
|
|
%if 0%{?is_opensuse}
|
|
BuildRequires: libcacard-devel
|
|
%endif
|
|
BuildRequires: libcap-devel
|
|
BuildRequires: libcap-ng-devel
|
|
BuildRequires: libdrm-devel
|
|
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
BuildRequires: libepoxy-devel
|
|
%endif
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120200 )
|
|
BuildRequires: libfdt-devel
|
|
%else
|
|
BuildRequires: libfdt1-devel
|
|
%endif
|
|
BuildRequires: libgbm-devel
|
|
BuildRequires: libgcrypt-devel
|
|
BuildRequires: libgnutls-devel
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
BuildRequires: libiscsi-devel
|
|
%endif
|
|
BuildRequires: libjpeg-devel
|
|
%if 0%{?is_opensuse}
|
|
BuildRequires: libnfs-devel
|
|
%endif
|
|
%ifarch %ix86 x86_64
|
|
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
|
|
BuildRequires: libnuma-devel
|
|
%endif
|
|
%else
|
|
%ifarch aarch64
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
BuildRequires: libnuma-devel
|
|
%endif
|
|
%endif
|
|
%else
|
|
%ifnarch %arm s390x
|
|
BuildRequires: libnuma-devel
|
|
%endif
|
|
%endif
|
|
BuildRequires: libpcap-devel
|
|
BuildRequires: libpixman-1-0-devel
|
|
%ifarch x86_64
|
|
BuildRequires: libpmem-devel
|
|
%endif
|
|
BuildRequires: libpng-devel
|
|
BuildRequires: libpulse-devel
|
|
%if 0%{?with_rbd}
|
|
%if 0%{?is_opensuse} || 0%{?sle_version} > 120100
|
|
BuildRequires: librbd-devel
|
|
%else
|
|
BuildRequires: ceph-devel
|
|
%endif
|
|
%endif
|
|
%if 0%{?with_seccomp}
|
|
BuildRequires: libseccomp-devel
|
|
%endif
|
|
BuildRequires: libspice-server-devel
|
|
BuildRequires: libssh2-devel
|
|
BuildRequires: libudev-devel
|
|
BuildRequires: libusb-1_0-devel
|
|
%if 0%{?suse_version} > 1320
|
|
BuildRequires: libvdeplug-devel
|
|
%else
|
|
BuildRequires: libvdeplug3-devel
|
|
%endif
|
|
BuildRequires: libxkbcommon-devel
|
|
BuildRequires: lzo-devel
|
|
BuildRequires: makeinfo
|
|
%if 0%{?suse_version} > 1320
|
|
BuildRequires: multipath-tools
|
|
BuildRequires: multipath-tools-devel
|
|
%endif
|
|
BuildRequires: ncurses-devel
|
|
%if %{build_x86_firmware_from_source}
|
|
BuildRequires: ovmf-tools
|
|
%endif
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: pwdutils
|
|
%if 0%{?suse_version} > 1320
|
|
BuildRequires: python3-base
|
|
%else
|
|
BuildRequires: python-base
|
|
%endif
|
|
%if 0%{?suse_version} >= 1315
|
|
BuildRequires: rdma-core-devel
|
|
%endif
|
|
BuildRequires: snappy-devel
|
|
BuildRequires: spice-protocol-devel
|
|
BuildRequires: systemd
|
|
%{?systemd_requires}
|
|
%if %{kvm_available}
|
|
BuildRequires: pkgconfig(udev)
|
|
%endif
|
|
BuildRequires: usbredir-devel
|
|
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
BuildRequires: virglrenderer-devel >= 0.4.1
|
|
%endif
|
|
BuildRequires: vte-devel
|
|
%ifarch x86_64
|
|
BuildRequires: xen-devel
|
|
%endif
|
|
BuildRequires: xfsprogs-devel
|
|
%if %{build_x86_firmware_from_source}
|
|
BuildRequires: xz-devel
|
|
%endif
|
|
BuildRequires: zlib-devel
|
|
%if "%{name}" == "qemu-testsuite"
|
|
%if 0%{?suse_version} > 1320
|
|
BuildRequires: python-base
|
|
%endif
|
|
BuildRequires: bc
|
|
BuildRequires: qemu-arm = %{qemuver}
|
|
BuildRequires: qemu-block-curl = %{qemuver}
|
|
BuildRequires: qemu-block-dmg = %{qemuver}
|
|
%if 0%{?with_glusterfs}
|
|
BuildRequires: qemu-block-gluster = %{qemuver}
|
|
%endif
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
BuildRequires: qemu-block-iscsi = %{qemuver}
|
|
%endif
|
|
%if 0%{?is_opensuse}
|
|
BuildRequires: qemu-block-nfs = %{qemuver}
|
|
%endif
|
|
%if 0%{?with_rbd}
|
|
BuildRequires: qemu-block-rbd = %{qemuver}
|
|
%endif
|
|
BuildRequires: qemu-block-ssh = %{qemuver}
|
|
BuildRequires: qemu-extra = %{qemuver}
|
|
BuildRequires: qemu-guest-agent = %{qemuver}
|
|
BuildRequires: qemu-ppc = %{qemuver}
|
|
BuildRequires: qemu-s390 = %{qemuver}
|
|
BuildRequires: qemu-tools = %{qemuver}
|
|
BuildRequires: qemu-ui-curses = %{qemuver}
|
|
BuildRequires: qemu-ui-gtk = %{qemuver}
|
|
%if 0%{?is_opensuse}
|
|
BuildRequires: qemu-ui-sdl = %{qemuver}
|
|
%endif
|
|
BuildRequires: qemu-x86 = %{qemuver}
|
|
%endif
|
|
Requires(pre): shadow
|
|
Requires(post): coreutils
|
|
%if %{kvm_available}
|
|
Requires(post): acl
|
|
Requires(post): udev
|
|
%ifarch s390x
|
|
Requires(post): procps
|
|
%endif
|
|
Recommends: kvm_stat
|
|
%endif
|
|
Recommends: qemu-block-curl
|
|
Recommends: qemu-tools
|
|
Recommends: qemu-ui-curses
|
|
Recommends: qemu-ui-gtk
|
|
%if 0%{?is_opensuse}
|
|
Recommends: qemu-ui-sdl
|
|
%endif
|
|
Recommends: qemu-x86
|
|
%ifarch ppc ppc64 ppc64le
|
|
Recommends: qemu-ppc
|
|
%else
|
|
Suggests: qemu-ppc
|
|
%endif
|
|
%ifarch s390x
|
|
Recommends: qemu-s390
|
|
%else
|
|
Suggests: qemu-s390
|
|
%endif
|
|
%ifarch %arm aarch64
|
|
Recommends: qemu-arm
|
|
%else
|
|
Suggests: qemu-arm
|
|
%endif
|
|
Suggests: qemu-block-dmg
|
|
%if 0%{?with_glusterfs}
|
|
Suggests: qemu-block-gluster
|
|
%endif
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
Suggests: qemu-block-iscsi
|
|
%endif
|
|
%if 0%{?is_opensuse}
|
|
Suggests: qemu-block-nfs
|
|
%endif
|
|
%if 0%{?with_rbd}
|
|
Suggests: qemu-block-rbd
|
|
%endif
|
|
Suggests: qemu-block-ssh
|
|
Suggests: qemu-extra
|
|
Suggests: qemu-lang
|
|
%if 0%{?is_opensuse}
|
|
Recommends: qemu-ksm = %{qemuver}
|
|
%endif
|
|
|
|
%define ppc_default_built_firmware {%nil}
|
|
%if %{build_skiboot_from_source} && %{build_slof_from_source}
|
|
%define ppc_extra_built_firmware {skiboot.lid slof.bin}
|
|
%else
|
|
%if %{build_skiboot_from_source}
|
|
%define ppc_extra_built_firmware {skiboot.lid}
|
|
%endif
|
|
%if %{build_slof_from_source}
|
|
%define ppc_extra_built_firmware {slof.bin}
|
|
%endif
|
|
%endif
|
|
|
|
%ifarch ppc64
|
|
%define ppc64_only_default_built_firmware {spapr-rtas.bin}
|
|
%define ppc64_only_extra_built_firmware {%nil}
|
|
%endif
|
|
|
|
%ifarch s390x
|
|
%define s390x_default_built_firmware {s390-ccw.img s390-netboot.img}
|
|
%define s390x_extra_built_firmware {%nil}
|
|
%endif
|
|
|
|
%ifarch %ix86 x86_64
|
|
%define x86_default_built_firmware {linuxboot.bin linuxboot_dma.bin \
|
|
multiboot.bin kvmvapic.bin}
|
|
%ifarch x86_64
|
|
%define x86_64_only_default_built_firmware {%nil}
|
|
%endif
|
|
%endif
|
|
|
|
%define x86_extra_built_firmware_list {bios.bin bios-256k.bin pxe-e1000.rom \
|
|
pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
|
|
sgabios.bin vgabios-bochs-display.bin vgabios.bin vgabios-cirrus.bin \
|
|
vgabios-qxl.bin vgabios-ramfb.bin vgabios-stdvga.bin vgabios-virtio.bin \
|
|
vgabios-vmware.bin}
|
|
%define x86_64_only_extra_built_firmware_list {efi-e1000.rom efi-e1000e.rom \
|
|
efi-eepro100.rom efi-ne2k_pci.rom efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \
|
|
efi-vmxnet3.rom}
|
|
|
|
%if %{build_x86_firmware_from_source}
|
|
%define x86_extra_built_firmware %{x86_extra_built_firmware_list}
|
|
%ifarch x86_64
|
|
%define x86_64_only_extra_built_firmware %{x86_64_only_extra_built_firmware_list}
|
|
%endif
|
|
%endif
|
|
|
|
%define built_firmware { \
|
|
%{?ppc_default_built_firmware} %{?ppc_extra_built_firmware} \
|
|
%{?ppc64_only_default_built_firmware} %{?ppc64_only_extra_built_firmware} \
|
|
%{?s390x_default_built_firmware} %{?s390x_extra_built_firmware} \
|
|
%{?x86_default_built_firmware} %{?x86_extra_built_firmware} \
|
|
%{?x86_64_only_default_built_firmware} %{?x86_64_only_extra_built_firmware} }
|
|
|
|
%description
|
|
QEMU provides full machine emulation and cross architecture usage. It closely
|
|
integrates with KVM and Xen virtualization, allowing for excellent performance.
|
|
Many options are available for defining the emulated environment, including
|
|
traditional devices, direct host device access, and interfaces specific to
|
|
virtualization.
|
|
|
|
This package acts as an umbrella package to the other QEMU sub-packages.
|
|
|
|
%if "%{name}" != "qemu-testsuite"
|
|
|
|
%package x86
|
|
Summary: Machine emulator and virtualizer for x86 architectures
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
Requires: %name = %{qemuver}
|
|
Requires: qemu-ipxe
|
|
Requires: qemu-seabios
|
|
Requires: qemu-sgabios
|
|
Requires: qemu-vgabios
|
|
Recommends: ovmf
|
|
Recommends: qemu-ovmf-x86_64
|
|
|
|
%description x86
|
|
QEMU provides full machine emulation and cross architecture usage. It closely
|
|
integrates with KVM and Xen virtualization, allowing for excellent performance.
|
|
Many options are available for defining the emulated environment, including
|
|
traditional devices, direct host device access, and interfaces specific to
|
|
virtualization.
|
|
|
|
This package provides i386 and x86_64 emulation.
|
|
|
|
%package ppc
|
|
Summary: Machine emulator and virtualizer for Power architectures
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
Requires: %name = %{qemuver}
|
|
Recommends: qemu-ipxe
|
|
Recommends: qemu-vgabios
|
|
|
|
%description ppc
|
|
QEMU provides full machine emulation and cross architecture usage. It closely
|
|
integrates with KVM and Xen virtualization, allowing for excellent performance.
|
|
Many options are available for defining the emulated environment, including
|
|
traditional devices, direct host device access, and interfaces specific to
|
|
virtualization.
|
|
|
|
This package provides ppc and ppc64 emulation.
|
|
|
|
%package s390
|
|
Summary: Machine emulator and virtualizer for S/390 architectures
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
Requires: %name = %{qemuver}
|
|
|
|
%description s390
|
|
QEMU provides full machine emulation and cross architecture usage. It closely
|
|
integrates with KVM and Xen virtualization, allowing for excellent performance.
|
|
Many options are available for defining the emulated environment, including
|
|
traditional devices, direct host device access, and interfaces specific to
|
|
virtualization.
|
|
|
|
This package provides s390x emulation.
|
|
|
|
%package arm
|
|
Summary: Machine emulator and virtualizer for ARM architectures
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
Requires: %name = %{qemuver}
|
|
Recommends: qemu-ipxe
|
|
Recommends: qemu-vgabios
|
|
Recommends: ovmf
|
|
Recommends: qemu-uefi-aarch64
|
|
|
|
%description arm
|
|
QEMU provides full machine emulation and cross architecture usage. It closely
|
|
integrates with KVM and Xen virtualization, allowing for excellent performance.
|
|
Many options are available for defining the emulated environment, including
|
|
traditional devices, direct host device access, and interfaces specific to
|
|
virtualization.
|
|
|
|
This package provides arm emulation.
|
|
|
|
%package extra
|
|
Summary: Machine emulator and virtualizer for "extra" architectures
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
Requires: %name = %{qemuver}
|
|
Recommends: qemu-ipxe
|
|
Recommends: qemu-vgabios
|
|
|
|
%description extra
|
|
QEMU provides full machine emulation and cross architecture usage. It closely
|
|
integrates with KVM and Xen virtualization, allowing for excellent performance.
|
|
Many options are available for defining the emulated environment, including
|
|
traditional devices, direct host device access, and interfaces specific to
|
|
virtualization.
|
|
|
|
This package provides some lesser used emulations, including alpha, m68k,
|
|
mips, moxie, sparc, and xtensa. (The term "extra" is juxtapositioned against
|
|
more popular QEMU packages which are dedicated to a single architecture.)
|
|
|
|
%if %{legacy_qemu_kvm}
|
|
%package kvm
|
|
Summary: Wrapper to enable KVM acceleration under QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%ifarch %ix86 x86_64
|
|
Requires: qemu-x86 = %{qemuver}
|
|
%endif
|
|
%ifarch s390x
|
|
Requires: qemu-s390 = %{qemuver}
|
|
%endif
|
|
Provides: kvm = %{qemuver}
|
|
Obsoletes: kvm < %{qemuver}
|
|
|
|
%description kvm
|
|
QEMU provides full machine emulation and cross architecture usage. It closely
|
|
integrates with KVM and Xen virtualization, allowing for excellent performance.
|
|
Many options are available for defining the emulated environment, including
|
|
traditional devices, direct host device access, and interfaces specific to
|
|
virtualization.
|
|
|
|
This package simply provides a shell script wrapper for the QEMU program which
|
|
does the actual machine emulation and virtualization for this architecture. The
|
|
wrapper simply adds command-line parameters to ensure that the KVM accelerator
|
|
is invoked. It provides no additional benefit, and is considered deprecated.
|
|
%endif
|
|
|
|
%package lang
|
|
Summary: Translations for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
|
|
%description lang
|
|
This package contains a few language translations, particularly for the
|
|
graphical user interface components that come with QEMU. The bulk of strings
|
|
in QEMU are not localized.
|
|
|
|
# Modules need to match {qemu-system-*,qemu-img} version.
|
|
# We cannot have qemu and qemu-tools require them in the right version,
|
|
# as that would drag in the dependencies the modules are supposed to avoid.
|
|
# Nor can we have modules require the right version of qemu and qemu-tools
|
|
# as Xen reuses our qemu-tools but does not want our qemu and qemu-x86.
|
|
%define qemu_module_conflicts \
|
|
Conflicts: %name < %{qemuver}-%{release} \
|
|
Conflicts: %name > %{qemuver}-%{release} \
|
|
Conflicts: qemu-tools < %{qemuver}-%{release} \
|
|
Conflicts: qemu-tools > %{qemuver}-%{release}
|
|
|
|
%package block-curl
|
|
Summary: cURL block support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
Provides: %name:%_libdir/%name/block-curl.so
|
|
%{qemu_module_conflicts}
|
|
|
|
%description block-curl
|
|
This package contains a module for accessing network-based image files over
|
|
a network connection from qemu-img tool and QEMU system emulation.
|
|
|
|
%package block-dmg
|
|
Summary: DMG block support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description block-dmg
|
|
This package contains a module for accessing Mac OS X image files from
|
|
qemu-img tool and QEMU system emulation.
|
|
|
|
%if 0%{?with_glusterfs}
|
|
%package block-gluster
|
|
Summary: GlusterFS block support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description block-gluster
|
|
This package contains a module for accessing network-based image files over a
|
|
GlusterFS network connection from qemu-img tool and QEMU system emulation.
|
|
%endif
|
|
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
%package block-iscsi
|
|
Summary: iSCSI block support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description block-iscsi
|
|
This package contains a module for accessing network-based image files over an
|
|
iSCSI network connection from qemu-img tool and QEMU system emulation.
|
|
%endif
|
|
|
|
%if 0%{?is_opensuse}
|
|
%package block-nfs
|
|
Summary: direct Network File System support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description block-nfs
|
|
This package contains a module for directly accessing nfs based image files.
|
|
%endif
|
|
|
|
%if 0%{?with_rbd}
|
|
%package block-rbd
|
|
Summary: Rados Block Device (Ceph) support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description block-rbd
|
|
This package contains a module for accessing ceph (rbd,rados) image files.
|
|
%endif
|
|
|
|
%package block-ssh
|
|
Summary: SSH (SFTP) block support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description block-ssh
|
|
This package contains a module for accessing network-based image files over an
|
|
SSH network connection from qemu-img tool and QEMU system emulation.
|
|
|
|
%package ui-curses
|
|
Summary: Curses based UI support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description ui-curses
|
|
This package contains a module for doing curses based UI for QEMU.
|
|
|
|
%package ui-gtk
|
|
Summary: GTK based UI support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description ui-gtk
|
|
This package contains a module for doing GTK based UI for QEMU.
|
|
|
|
%if 0%{?is_opensuse}
|
|
%package ui-sdl
|
|
Summary: SDL based UI support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description ui-sdl
|
|
This package contains a module for doing SDL based UI for QEMU.
|
|
%endif
|
|
|
|
%package audio-alsa
|
|
Summary: ALSA based audio support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description audio-alsa
|
|
This package contains a module for ALSA based audio support for QEMU.
|
|
|
|
%package audio-oss
|
|
Summary: OSS based audio support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description audio-oss
|
|
This package contains a module for OSS based audio support for QEMU.
|
|
|
|
%package audio-pa
|
|
Summary: Pulse Audio based audio support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description audio-pa
|
|
This package contains a module for Pulse Audio based audio support for QEMU.
|
|
|
|
%if 0%{?is_opensuse}
|
|
%package audio-sdl
|
|
Summary: SDL based audio support for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
%{qemu_module_conflicts}
|
|
|
|
%description audio-sdl
|
|
This package contains a module for SDL based audio support for QEMU.
|
|
%endif
|
|
|
|
%package tools
|
|
Summary: Tools for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
Provides: %name:%_libexecdir/qemu-bridge-helper
|
|
Requires(pre): permissions
|
|
Requires(pre): shadow
|
|
Recommends: qemu-block-curl
|
|
%if 0%{?with_rbd}
|
|
Recommends: qemu-block-rbd
|
|
%endif
|
|
|
|
%description tools
|
|
This package contains various QEMU related tools, including a bridge helper,
|
|
a virtfs helper, ivshmem, disk utilities and scripts for various purposes.
|
|
|
|
%package guest-agent
|
|
Summary: Guest agent for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
Provides: %name:%_bindir/qemu-ga
|
|
Requires(pre): shadow
|
|
Requires(post): udev
|
|
Supplements: modalias(acpi*:QEMU0002%3A*)
|
|
Supplements: modalias(pci:v0000FFFDd00000101sv*sd*bc*sc*i*)
|
|
Supplements: modalias(pci:v00005853d00000001sv*sd*bc*sc*i*)
|
|
%{?systemd_requires}
|
|
|
|
%description guest-agent
|
|
This package contains the QEMU guest agent. It is installed in the linux guest
|
|
to provide information and control at the guest OS level.
|
|
|
|
%ifarch %{build_rom_arch}
|
|
%package seabios
|
|
Summary: x86 Legacy BIOS for QEMU
|
|
Group: System/Emulators/PC
|
|
SEABIOS_VERSION
|
|
Release: 0
|
|
BuildArch: noarch
|
|
Conflicts: %name < 1.6.0
|
|
|
|
%description seabios
|
|
SeaBIOS is an open source implementation of a 16bit x86 BIOS. SeaBIOS
|
|
is the default and legacy BIOS for QEMU.
|
|
|
|
%package vgabios
|
|
Summary: VGA BIOSes for QEMU
|
|
Group: System/Emulators/PC
|
|
SEABIOS_VERSION
|
|
Release: 0
|
|
BuildArch: noarch
|
|
Conflicts: %name < 1.6.0
|
|
|
|
%description vgabios
|
|
VGABIOS provides the video ROM BIOSes for the following variants of VGA
|
|
emulated devices: Std VGA, QXL, Cirrus CLGD 5446 and VMware emulated
|
|
video card.
|
|
|
|
%package sgabios
|
|
Summary: Serial Graphics Adapter BIOS for QEMU
|
|
Group: System/Emulators/PC
|
|
Version: 8
|
|
Release: 0
|
|
BuildArch: noarch
|
|
Conflicts: %name < 1.6.0
|
|
|
|
%description sgabios
|
|
The Google Serial Graphics Adapter BIOS or SGABIOS provides a means for legacy
|
|
x86 software to communicate with an attached serial console as if a video card
|
|
were attached.
|
|
|
|
%package ipxe
|
|
Summary: PXE ROMs for QEMU NICs
|
|
Group: System/Emulators/PC
|
|
Version: 1.0.0+
|
|
Release: 0
|
|
BuildArch: noarch
|
|
Conflicts: %name < 1.6.0
|
|
|
|
%description ipxe
|
|
Provides Preboot Execution Environment (PXE) ROM support for various emulated
|
|
network adapters available with QEMU.
|
|
%endif
|
|
|
|
%if 0%{?is_opensuse}
|
|
%package ksm
|
|
Summary: Kernel Samepage Merging services
|
|
Group: System/Emulators/PC
|
|
Version: %{qemuver}
|
|
Release: 0
|
|
Requires(pre): coreutils
|
|
Requires(post): coreutils
|
|
|
|
%description ksm
|
|
Kernel Samepage Merging (KSM) is a memory-saving de-duplication feature, that
|
|
merges anonymous (private) pages (not pagecache ones).
|
|
|
|
This package provides a service file for starting and stopping KSM.
|
|
%endif
|
|
|
|
%endif # !qemu-testsuite
|
|
|
|
%prep
|
|
%setup -q -n %{srcname}-%{expand:%%(SV=%{srcver};echo ${SV%%%%+git*})}
|
|
PATCH_EXEC
|
|
|
|
pushd roms/seabios
|
|
%patch1100 -p1
|
|
%if 0%{?suse_version} > 1320
|
|
%patch1101 -p1
|
|
%endif
|
|
%patch1102 -p1
|
|
popd
|
|
|
|
pushd roms/ipxe
|
|
%patch1200 -p1
|
|
%if 0%{?suse_version} <= 1320
|
|
%patch1201 -p1
|
|
%endif
|
|
%patch1202 -p1
|
|
%patch1203 -p1
|
|
%patch1204 -p1
|
|
%patch1205 -p1
|
|
popd
|
|
|
|
pushd roms/sgabios
|
|
%patch1300 -p1
|
|
%patch1301 -p1
|
|
popd
|
|
|
|
pushd roms/SLOF
|
|
popd
|
|
|
|
pushd roms/skiboot
|
|
%patch1500 -p1
|
|
popd
|
|
|
|
pushd ui/keycodemapdb
|
|
popd
|
|
|
|
pushd roms/openbios
|
|
popd
|
|
|
|
# as a safeguard, delete the firmware files that we intend to build
|
|
for i in %built_firmware
|
|
do
|
|
unlink pc-bios/$i
|
|
done
|
|
|
|
%build
|
|
XC_COMPAT="
|
|
-DXC_WANT_COMPAT_DEVICEMODEL_API=1
|
|
-DXC_WANT_COMPAT_EVTCHN_API=1
|
|
-DXC_WANT_COMPAT_GNTTAB_API=1
|
|
-DXC_WANT_COMPAT_MAP_FOREIGN_API=1
|
|
"
|
|
XC_COMPAT="`echo ${XC_COMPAT} | xargs`"
|
|
sed -i~ /undef/d include/hw/xen/xen_common.h
|
|
diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
|
|
./configure \
|
|
--prefix=%_prefix \
|
|
--sysconfdir=%_sysconfdir \
|
|
--libdir=%_libdir \
|
|
--libexecdir=%_libexecdir \
|
|
--localstatedir=%_localstatedir \
|
|
--docdir=%_docdir/%name \
|
|
--firmwarepath=%_datadir/%name \
|
|
%if 0%{?suse_version} > 1320
|
|
--python=%_bindir/python3 \
|
|
%else
|
|
--python=%_bindir/python2 \
|
|
%endif
|
|
--extra-cflags="%{optflags} ${XC_COMPAT}" \
|
|
--disable-stack-protector \
|
|
--disable-strip \
|
|
--with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \
|
|
--enable-system --disable-linux-user \
|
|
--enable-tools --enable-guest-agent \
|
|
--enable-modules \
|
|
--enable-pie \
|
|
--enable-docs \
|
|
%if 0%{?is_opensuse}
|
|
--audio-drv-list="pa alsa sdl oss" \
|
|
%else
|
|
--audio-drv-list="pa alsa oss" \
|
|
%endif
|
|
--enable-attr \
|
|
--enable-bluez \
|
|
--enable-bochs \
|
|
--enable-brlapi \
|
|
--enable-bzip2 \
|
|
--enable-cap-ng \
|
|
--disable-capstone \
|
|
--enable-cloop \
|
|
--enable-coroutine-pool \
|
|
--disable-crypto-afalg \
|
|
--enable-curl \
|
|
--enable-curses \
|
|
--enable-dmg \
|
|
--enable-fdt \
|
|
--enable-gcrypt \
|
|
%if 0%{?with_glusterfs}
|
|
--enable-glusterfs \
|
|
%else
|
|
--disable-glusterfs \
|
|
%endif
|
|
--enable-gnutls \
|
|
--enable-gtk \
|
|
--disable-hax \
|
|
--disable-hvf \
|
|
--disable-jemalloc \
|
|
%if %{kvm_available}
|
|
--enable-kvm \
|
|
%else
|
|
--disable-kvm \
|
|
%endif
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
--enable-libiscsi \
|
|
%else
|
|
--disable-libiscsi \
|
|
%endif
|
|
%if 0%{?is_opensuse}
|
|
--enable-libnfs \
|
|
%else
|
|
--disable-libnfs \
|
|
%endif
|
|
%ifarch x86_64
|
|
--enable-libpmem \
|
|
%else
|
|
--disable-libpmem \
|
|
%endif
|
|
--enable-libssh2 \
|
|
--enable-libusb \
|
|
--disable-libxml2 \
|
|
--enable-linux-aio \
|
|
--enable-lzo \
|
|
--disable-malloc-trim \
|
|
--enable-membarrier \
|
|
%if 0%{?suse_version} > 1320
|
|
--enable-mpath \
|
|
%else
|
|
--disable-mpath \
|
|
%endif
|
|
--disable-netmap \
|
|
--disable-nettle \
|
|
%ifarch %ix86 x86_64
|
|
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
|
|
--enable-numa \
|
|
%else
|
|
--disable-numa \
|
|
%endif
|
|
%else
|
|
%ifarch aarch64
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
--enable-numa \
|
|
%endif
|
|
%else
|
|
--disable-numa \
|
|
%endif
|
|
%else
|
|
%ifarch %arm s390x
|
|
--disable-numa \
|
|
%else
|
|
--enable-numa \
|
|
%endif
|
|
%endif
|
|
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
--enable-opengl \
|
|
%endif
|
|
--enable-parallels \
|
|
%if 0%{?suse_version} >= 1315
|
|
--enable-pvrdma \
|
|
%else
|
|
--disable-pvrdma \
|
|
%endif
|
|
--enable-qcow1 \
|
|
--enable-qed \
|
|
%if 0%{?with_rbd}
|
|
--enable-rbd \
|
|
%else
|
|
--disable-rbd \
|
|
%endif
|
|
%if 0%{?suse_version} >= 1315
|
|
--enable-rdma \
|
|
%else
|
|
--disable-rdma \
|
|
%endif
|
|
--enable-replication \
|
|
--disable-sanitizers \
|
|
%if 0%{?is_opensuse}
|
|
--enable-sdl \
|
|
%if 0%{?suse_version} >= 1320
|
|
--with-sdlabi=2.0 \
|
|
%else
|
|
--with-sdlabi=1.2 \
|
|
%endif
|
|
%else
|
|
--disable-sdl \
|
|
%endif
|
|
%if 0%{?with_seccomp}
|
|
--enable-seccomp \
|
|
%else
|
|
--disable-seccomp \
|
|
%endif
|
|
--enable-sheepdog \
|
|
%if 0%{?is_opensuse}
|
|
--enable-smartcard \
|
|
%else
|
|
--disable-smartcard \
|
|
%endif
|
|
--enable-snappy \
|
|
--enable-spice \
|
|
--disable-tcmalloc \
|
|
--enable-tpm \
|
|
--enable-usb-redir \
|
|
--enable-vde \
|
|
--enable-vdi \
|
|
--enable-vhost-crypto \
|
|
--enable-vhost-net \
|
|
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
--enable-virglrenderer \
|
|
%endif
|
|
--enable-virtfs \
|
|
--enable-vnc \
|
|
--enable-vnc-jpeg \
|
|
--enable-vnc-png \
|
|
--enable-vnc-sasl \
|
|
%if 0%{?suse_version} == 1320
|
|
--disable-vte \
|
|
%else
|
|
--enable-vte \
|
|
%endif
|
|
--enable-vvfat \
|
|
--disable-whpx \
|
|
%ifarch x86_64
|
|
--enable-xen \
|
|
--enable-xen-pci-passthrough \
|
|
--enable-xen-pv-domain-build \
|
|
%else
|
|
--disable-xen \
|
|
%endif
|
|
--enable-xfsctl \
|
|
|
|
%if "%{name}" != "qemu-testsuite"
|
|
|
|
make %{?_smp_mflags} V=1
|
|
|
|
# Firmware
|
|
|
|
%ifarch s390x
|
|
for i in %s390x_default_built_firmware
|
|
do
|
|
cp pc-bios/s390-ccw/$i pc-bios/
|
|
done
|
|
%endif
|
|
|
|
%ifarch ppc64
|
|
for i in %ppc64_only_default_built_firmware
|
|
do
|
|
cp pc-bios/spapr-rtas/$i pc-bios/
|
|
done
|
|
%endif
|
|
|
|
%ifarch %ix86 x86_64
|
|
for i in %x86_default_built_firmware
|
|
do
|
|
cp pc-bios/optionrom/$i pc-bios/
|
|
done
|
|
%ifarch x86_64
|
|
for i in %x86_64_only_default_built_firmware
|
|
do
|
|
cp pc-bios/optionrom/$i pc-bios/
|
|
done
|
|
%endif
|
|
%endif
|
|
|
|
%if %{build_x86_firmware_from_source}
|
|
%ifnarch %{ix86} x86_64
|
|
export CC=x86_64-suse-linux-gcc
|
|
export LD=x86_64-suse-linux-ld
|
|
%endif
|
|
|
|
make %{?_smp_mflags} -C roms bios \
|
|
%ifnarch %ix86 x86_64
|
|
HOSTCC=cc \
|
|
%endif
|
|
|
|
make %{?_smp_mflags} -C roms seavgabios \
|
|
%ifnarch %ix86 x86_64
|
|
HOSTCC=cc \
|
|
%endif
|
|
|
|
make %{?_smp_mflags} -C roms pxerom
|
|
|
|
%ifnarch %ix86
|
|
make %{?_smp_mflags} -C roms efirom
|
|
%endif
|
|
|
|
make -C roms sgabios \
|
|
HOSTCC=cc
|
|
|
|
|
|
%if %{force_fit_virtio_pxe_rom}
|
|
pushd roms/ipxe
|
|
patch -p1 < %{SOURCE301}
|
|
popd
|
|
make %{?_smp_mflags} -C roms pxerom_variants=virtio pxerom_targets=1af41000 pxerom
|
|
%endif
|
|
|
|
# enforce pxe rom sizes for migration compatability from SLE 11 SP3 forward
|
|
# the following need to be > 64K
|
|
%define supported_nics_large {e1000 rtl8139}
|
|
# the following need to be <= 64K
|
|
%define supported_nics_small {virtio}
|
|
# Though not required, make unsupported pxe roms migration compatable as well
|
|
%define unsupported_nics {eepro100 ne2k_pci pcnet}
|
|
|
|
for i in %supported_nics_large %unsupported_nics
|
|
do
|
|
if test "`stat -c '%s' pc-bios/pxe-$i.rom`" -gt "131072" ; then
|
|
echo "pxe rom is too large"
|
|
exit 1
|
|
fi
|
|
if test "`stat -c '%s' pc-bios/pxe-$i.rom`" -le "65536" ; then
|
|
./roms/ipxe/src/util/padimg.pl pc-bios/pxe-$i.rom -s 65536 -b 255
|
|
echo -ne "SEGMENT OVERAGE\0" >> pc-bios/pxe-$i.rom
|
|
fi
|
|
done
|
|
for i in %supported_nics_small
|
|
do
|
|
if test "`stat -c '%s' pc-bios/pxe-$i.rom`" -gt "65536" ; then
|
|
echo "pxe rom is too large"
|
|
exit 1
|
|
fi
|
|
done
|
|
%endif
|
|
|
|
%if %{build_skiboot_from_source}
|
|
make %{?_smp_mflags} -C roms skiboot CROSS=
|
|
%endif
|
|
|
|
%if %{build_slof_from_source}
|
|
make %{?_smp_mflags} -C roms slof
|
|
%endif
|
|
|
|
%else # qemu-testsuite
|
|
|
|
ln -s %_bindir/qemu-img qemu-img
|
|
ln -s %_bindir/qemu-ga qemu-ga
|
|
ln -s %_bindir/qemu-io qemu-io
|
|
|
|
for i in %built_firmware
|
|
do
|
|
ln -s %_datadir/%name/$i pc-bios/$i
|
|
done
|
|
|
|
for conf in default-configs/*-softmmu.mak; do
|
|
arch=`echo "$conf" | sed -e 's|default-configs/\(.*\)-softmmu.mak|\1|g'`
|
|
ln -s %_bindir/qemu-system-$arch $arch-softmmu/qemu-system-$arch
|
|
done
|
|
|
|
# Compile the QOM test binary first, so that ...
|
|
|
|
touch -r config-host.mak pc-bios
|
|
make tests/qom-test %{?_smp_mflags} V=1
|
|
# Firmware
|
|
# ... make comes in fresh and has lots of address space (needed for 32bit, bsc#957379)
|
|
make check-report.html V=1
|
|
|
|
%endif
|
|
|
|
%check
|
|
%if "%{name}" == "qemu-testsuite"
|
|
|
|
export QEMU_PROG=%_bindir/qemu-system-x86_64
|
|
export QEMU_IMG_PROG=%_bindir/qemu-img
|
|
export QEMU_IO_PROG=%_bindir/qemu-io
|
|
export QEMU_NBD_PROG=%_bindir/qemu-nbd
|
|
make check-block V=1
|
|
|
|
%endif # qemu-testsuite
|
|
|
|
%install
|
|
%if "%{name}" != "qemu-testsuite"
|
|
|
|
touch -r config-host.mak pc-bios
|
|
make install DESTDIR=%{buildroot}
|
|
%ifnarch %{build_rom_arch}
|
|
for f in %{x86_extra_built_firmware_list} \
|
|
%{x86_64_only_extra_built_firmware_list}; do
|
|
unlink %{buildroot}%_datadir/%name/$f
|
|
done
|
|
%endif
|
|
%find_lang %name
|
|
install -D -m 0644 %{SOURCE4} %{buildroot}%_sysconfdir/%name/bridge.conf
|
|
install -D -m 0755 %{SOURCE3} %{buildroot}%_datadir/%name/qemu-ifup
|
|
install -D -p -m 0644 %{SOURCE8} %{buildroot}%{_udevrulesdir}/80-qemu-ga.rules
|
|
install -D -m 0755 scripts/analyze-migration.py %{buildroot}%_bindir/analyze-migration.py
|
|
install -D -m 0755 scripts/vmstate-static-checker.py %{buildroot}%_bindir/vmstate-static-checker.py
|
|
mkdir -p %{buildroot}%_libexecdir/supportconfig/plugins
|
|
install -D -m 0755 %{SOURCE9} %{buildroot}%_libexecdir/supportconfig/plugins/%name
|
|
%if 0%{?is_opensuse} == 0
|
|
install -D -m 0644 %{SOURCE10} %{buildroot}%_docdir/qemu-arm/supported.txt
|
|
install -D -m 0644 %{SOURCE11} %{buildroot}%_docdir/qemu-ppc/supported.txt
|
|
install -D -m 0644 %{SOURCE12} %{buildroot}%_docdir/qemu-x86/supported.txt
|
|
install -D -m 0644 %{SOURCE13} %{buildroot}%_docdir/qemu-s390/supported.txt
|
|
%endif
|
|
%if %{legacy_qemu_kvm}
|
|
cat > %{buildroot}%_bindir/qemu-kvm << 'EOF'
|
|
#!/bin/sh
|
|
|
|
%ifarch s390x
|
|
exec %_bindir/qemu-system-s390x -machine accel=kvm "$@"
|
|
%else
|
|
exec %_bindir/qemu-system-x86_64 -machine accel=kvm "$@"
|
|
%endif
|
|
EOF
|
|
chmod 755 %{buildroot}%_bindir/qemu-kvm
|
|
install -D -m 0644 %{SOURCE5} %{buildroot}%_mandir/man1/qemu-kvm.1.gz
|
|
%if 0%{?is_opensuse} == 0
|
|
install -d %{buildroot}%_docdir/qemu-kvm
|
|
%ifarch s390x
|
|
ln -s ../qemu-s390/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.txt
|
|
%else
|
|
ln -s ../qemu-x86/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.txt
|
|
%endif
|
|
%endif
|
|
%endif
|
|
%if %{kvm_available}
|
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/80-kvm.rules
|
|
%endif
|
|
install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/qemu-ga@.service
|
|
%if 0%{?is_opensuse}
|
|
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
|
|
%endif
|
|
%ifarch s390x
|
|
install -D -m 0644 %{SOURCE2} %{buildroot}%_libexecdir/modules-load.d/kvm.conf
|
|
%endif
|
|
%fdupes -s %{buildroot}
|
|
|
|
%else # qemu-testsuite
|
|
|
|
install -D -m 0644 check-report.html %{buildroot}%_datadir/qemu/check-report.html
|
|
install -D -m 0644 check-report.xml %{buildroot}%_datadir/qemu/check-report.xml
|
|
|
|
%endif
|
|
|
|
%if "%{name}" != "qemu-testsuite"
|
|
|
|
%pre
|
|
%_bindir/getent group kvm >/dev/null || %_sbindir/groupadd -r kvm
|
|
%_bindir/getent group qemu >/dev/null || %_sbindir/groupadd -r qemu
|
|
%_bindir/getent passwd qemu >/dev/null ||
|
|
%_sbindir/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \
|
|
-c "qemu user" qemu
|
|
|
|
%if %{kvm_available}
|
|
%post
|
|
# Do not execute operations affecting host devices while running in a chroot
|
|
if [ $(stat -L -c "%i" /proc/1/root/) = $(stat -L -c "%i" /) ]; then
|
|
setfacl --remove-all /dev/kvm &> /dev/null || :
|
|
%ifarch s390x
|
|
if [ -c /dev/kvm ]; then
|
|
%_bindir/chmod 0666 /dev/kvm
|
|
%_bindir/chgrp kvm /dev/kvm
|
|
fi
|
|
%endif
|
|
%udev_rules_update
|
|
%_bindir/udevadm trigger -y kvm || :
|
|
%ifarch s390x
|
|
sysctl vm.allocate_pgste=1 || :
|
|
%endif
|
|
fi
|
|
%endif
|
|
|
|
%pre tools
|
|
%_bindir/getent group kvm >/dev/null || %_sbindir/groupadd -r kvm
|
|
%post tools
|
|
%set_permissions %_libexecdir/qemu-bridge-helper
|
|
|
|
%verifyscript tools
|
|
%verify_permissions %_libexecdir/qemu-bridge-helper
|
|
|
|
%pre guest-agent
|
|
%_bindir/getent group kvm >/dev/null || %_sbindir/groupadd -r kvm
|
|
%service_add_pre qemu-ga@.service
|
|
|
|
%post guest-agent
|
|
%service_add_post qemu-ga@.service
|
|
if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then
|
|
/usr/bin/systemctl start qemu-ga@virtio\\x2dports-org.qemu.guest_agent.0.service || :
|
|
fi
|
|
|
|
%preun guest-agent
|
|
if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then
|
|
/usr/bin/systemctl stop qemu-ga@virtio\\x2dports-org.qemu.guest_agent.0.service || :
|
|
fi
|
|
|
|
%postun guest-agent
|
|
%service_del_postun qemu-ga@.service
|
|
|
|
%if 0%{?is_opensuse}
|
|
%pre ksm
|
|
%service_add_pre ksm.service
|
|
|
|
%post ksm
|
|
%service_add_post ksm.service
|
|
|
|
%preun ksm
|
|
%service_del_preun ksm.service
|
|
|
|
%postun ksm
|
|
%service_del_postun ksm.service
|
|
%endif
|
|
|
|
%endif # !qemu-testsuite
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
%if "%{name}" != "qemu-testsuite"
|
|
%doc Changelog README VERSION
|
|
%license COPYING COPYING.LIB LICENSE
|
|
%_docdir/%name/qemu-doc.txt
|
|
%_docdir/%name/qemu-doc.html
|
|
%_docdir/%name/qemu-qmp-ref.txt
|
|
%_docdir/%name/qemu-qmp-ref.html
|
|
%_docdir/%name/qemu-ga-ref.txt
|
|
%_docdir/%name/qemu-ga-ref.html
|
|
%_mandir/man1/%name.1.gz
|
|
%_mandir/man7/qemu-block-drivers.7.gz
|
|
%_mandir/man7/qemu-cpu-models.7.gz
|
|
%_mandir/man7/qemu-qmp-ref.7.gz
|
|
%_mandir/man7/qemu-ga-ref.7.gz
|
|
%dir %_datadir/%name
|
|
%_datadir/%name/keymaps
|
|
%_datadir/%name/trace-events-all
|
|
%_datadir/%name/qemu-icon.bmp
|
|
%_datadir/%name/qemu_logo_no_text.svg
|
|
%dir %_sysconfdir/%name
|
|
%_datadir/%name/qemu-ifup
|
|
%dir %_libexecdir/supportconfig
|
|
%dir %_libexecdir/supportconfig/plugins
|
|
%_libexecdir/supportconfig/plugins/%name
|
|
%if %{kvm_available}
|
|
%{_udevrulesdir}/80-kvm.rules
|
|
%ifarch s390x
|
|
%_libexecdir/modules-load.d/kvm.conf
|
|
%endif
|
|
%endif
|
|
|
|
%files x86
|
|
%defattr(-, root, root)
|
|
%_bindir/qemu-system-i386
|
|
%_bindir/qemu-system-x86_64
|
|
%_datadir/%name/kvmvapic.bin
|
|
%_datadir/%name/linuxboot.bin
|
|
%_datadir/%name/linuxboot_dma.bin
|
|
%_datadir/%name/multiboot.bin
|
|
%if 0%{?is_opensuse} == 0
|
|
%dir %_docdir/qemu-x86
|
|
%_docdir/qemu-x86/supported.txt
|
|
%endif
|
|
|
|
%files ppc
|
|
%defattr(-, root, root)
|
|
%_bindir/qemu-system-ppc
|
|
%_bindir/qemu-system-ppc64
|
|
%_datadir/%name/bamboo.dtb
|
|
%_datadir/%name/canyonlands.dtb
|
|
%_datadir/%name/openbios-ppc
|
|
%_datadir/%name/ppc_rom.bin
|
|
%_datadir/%name/qemu_vga.ndrv
|
|
%_datadir/%name/skiboot.lid
|
|
%_datadir/%name/slof.bin
|
|
%_datadir/%name/spapr-rtas.bin
|
|
%_datadir/%name/u-boot.e500
|
|
%_datadir/%name/u-boot-sam460-20100605.bin
|
|
%if 0%{?is_opensuse} == 0
|
|
%dir %_docdir/qemu-ppc
|
|
%_docdir/qemu-ppc/supported.txt
|
|
%endif
|
|
|
|
%files s390
|
|
%defattr(-, root, root)
|
|
%_bindir/qemu-system-s390x
|
|
%_datadir/%name/s390-ccw.img
|
|
%_datadir/%name/s390-netboot.img
|
|
%if 0%{?is_opensuse} == 0
|
|
%dir %_docdir/qemu-s390
|
|
%_docdir/qemu-s390/supported.txt
|
|
%endif
|
|
|
|
%files arm
|
|
%defattr(-, root, root)
|
|
%_bindir/qemu-system-arm
|
|
%_bindir/qemu-system-aarch64
|
|
%if 0%{?is_opensuse} == 0
|
|
%dir %_docdir/qemu-arm
|
|
%_docdir/qemu-arm/supported.txt
|
|
%endif
|
|
|
|
%files extra
|
|
%defattr(-, root, root)
|
|
%_bindir/qemu-system-alpha
|
|
%_bindir/qemu-system-cris
|
|
%_bindir/qemu-system-hppa
|
|
%_bindir/qemu-system-lm32
|
|
%_bindir/qemu-system-m68k
|
|
%_bindir/qemu-system-microblaze
|
|
%_bindir/qemu-system-microblazeel
|
|
%_bindir/qemu-system-mips
|
|
%_bindir/qemu-system-mipsel
|
|
%_bindir/qemu-system-mips64
|
|
%_bindir/qemu-system-mips64el
|
|
%_bindir/qemu-system-moxie
|
|
%_bindir/qemu-system-nios2
|
|
%_bindir/qemu-system-or1k
|
|
%_bindir/qemu-system-riscv32
|
|
%_bindir/qemu-system-riscv64
|
|
%_bindir/qemu-system-sh4
|
|
%_bindir/qemu-system-sh4eb
|
|
%_bindir/qemu-system-sparc
|
|
%_bindir/qemu-system-sparc64
|
|
%_bindir/qemu-system-tricore
|
|
%_bindir/qemu-system-unicore32
|
|
%_bindir/qemu-system-xtensa
|
|
%_bindir/qemu-system-xtensaeb
|
|
%_datadir/%name/hppa-firmware.img
|
|
%_datadir/%name/openbios-sparc32
|
|
%_datadir/%name/openbios-sparc64
|
|
%_datadir/%name/palcode-clipper
|
|
%_datadir/%name/petalogix-ml605.dtb
|
|
%_datadir/%name/petalogix-s3adsp1800.dtb
|
|
%_datadir/%name/QEMU,cgthree.bin
|
|
%_datadir/%name/QEMU,tcx.bin
|
|
|
|
%if %{legacy_qemu_kvm}
|
|
%files kvm
|
|
%defattr(-,root,root)
|
|
%_bindir/qemu-kvm
|
|
%_mandir/man1/qemu-kvm.1.gz
|
|
%if 0%{?is_opensuse} == 0
|
|
%dir %_docdir/qemu-kvm
|
|
%_docdir/qemu-kvm/kvm-supported.txt
|
|
%endif
|
|
%endif
|
|
|
|
%files block-curl
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/block-curl.so
|
|
|
|
%files block-dmg
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/block-dmg-bz2.so
|
|
|
|
%if 0%{?with_glusterfs}
|
|
%files block-gluster
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/block-gluster.so
|
|
%endif
|
|
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
|
|
%files block-iscsi
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/block-iscsi.so
|
|
%endif
|
|
|
|
%if 0%{?is_opensuse}
|
|
%files block-nfs
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/block-nfs.so
|
|
%endif
|
|
|
|
%if 0%{?with_rbd}
|
|
%files block-rbd
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/block-rbd.so
|
|
%endif
|
|
|
|
%files block-ssh
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/block-ssh.so
|
|
|
|
%files ui-curses
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/ui-curses.so
|
|
|
|
%files ui-gtk
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/ui-gtk.so
|
|
|
|
%if 0%{?is_opensuse}
|
|
%files ui-sdl
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/ui-sdl.so
|
|
%endif
|
|
|
|
%files audio-alsa
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/audio-alsa.so
|
|
|
|
%files audio-oss
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/audio-oss.so
|
|
|
|
%files audio-pa
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/audio-pa.so
|
|
|
|
%if 0%{?is_opensuse}
|
|
%files audio-sdl
|
|
%defattr(-, root, root)
|
|
%dir %_libdir/%name
|
|
%_libdir/%name/audio-sdl.so
|
|
%endif
|
|
|
|
%files lang -f %name.lang
|
|
%defattr(-, root, root)
|
|
|
|
%ifarch %{build_rom_arch}
|
|
%files seabios
|
|
%defattr(-, root, root)
|
|
%dir %_datadir/%name
|
|
%_datadir/%name/bios.bin
|
|
%_datadir/%name/bios-256k.bin
|
|
|
|
%files vgabios
|
|
%defattr(-, root, root)
|
|
%dir %_datadir/%name
|
|
%_datadir/%name/vgabios.bin
|
|
%_datadir/%name/vgabios-cirrus.bin
|
|
%_datadir/%name/vgabios-qxl.bin
|
|
%_datadir/%name/vgabios-stdvga.bin
|
|
%_datadir/%name/vgabios-virtio.bin
|
|
%_datadir/%name/vgabios-vmware.bin
|
|
%_datadir/%name/vgabios-bochs-display.bin
|
|
%_datadir/%name/vgabios-ramfb.bin
|
|
|
|
%files sgabios
|
|
%defattr(-, root, root)
|
|
%dir %_datadir/%name
|
|
%_datadir/%name/sgabios.bin
|
|
|
|
%files ipxe
|
|
%defattr(-, root, root)
|
|
%dir %_datadir/%name
|
|
%_datadir/%name/pxe-e1000.rom
|
|
%_datadir/%name/pxe-eepro100.rom
|
|
%_datadir/%name/pxe-ne2k_pci.rom
|
|
%_datadir/%name/pxe-pcnet.rom
|
|
%_datadir/%name/pxe-rtl8139.rom
|
|
%_datadir/%name/pxe-virtio.rom
|
|
%_datadir/%name/efi-e1000.rom
|
|
%_datadir/%name/efi-e1000e.rom
|
|
%_datadir/%name/efi-eepro100.rom
|
|
%_datadir/%name/efi-ne2k_pci.rom
|
|
%_datadir/%name/efi-pcnet.rom
|
|
%_datadir/%name/efi-rtl8139.rom
|
|
%_datadir/%name/efi-virtio.rom
|
|
%_datadir/%name/efi-vmxnet3.rom
|
|
%endif
|
|
|
|
%files tools
|
|
%defattr(-, root, root)
|
|
%_mandir/man1/qemu-img.1.gz
|
|
%_mandir/man1/virtfs-proxy-helper.1.gz
|
|
%_mandir/man8/qemu-nbd.8.gz
|
|
%_bindir/qemu-edid
|
|
%_bindir/ivshmem-client
|
|
%_bindir/ivshmem-server
|
|
%_bindir/qemu-io
|
|
%_bindir/qemu-img
|
|
%_bindir/qemu-keymap
|
|
%_bindir/qemu-nbd
|
|
%_bindir/qemu-pr-helper
|
|
%_bindir/virtfs-proxy-helper
|
|
%verify(not mode) %attr(4750,root,kvm) %_libexecdir/qemu-bridge-helper
|
|
%dir %_sysconfdir/%name
|
|
%config %_sysconfdir/%name/bridge.conf
|
|
%_bindir/analyze-migration.py
|
|
%_bindir/vmstate-static-checker.py
|
|
|
|
%files guest-agent
|
|
%defattr(-, root, root)
|
|
%_mandir/man8/qemu-ga.8.gz
|
|
%attr(0755,root,kvm) %_bindir/qemu-ga
|
|
%{_unitdir}/qemu-ga@.service
|
|
%{_udevrulesdir}/80-qemu-ga.rules
|
|
|
|
%if 0%{?is_opensuse}
|
|
%files ksm
|
|
%defattr(-, root, root)
|
|
%{_unitdir}/ksm.service
|
|
%endif
|
|
|
|
%else # qemu-testsuite
|
|
%_datadir/qemu/check-report.xml
|
|
%_datadir/qemu/check-report.html
|
|
%endif
|
|
|
|
%changelog
|