diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu.inc')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 92 |
1 files changed, 53 insertions, 39 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 11be545cb5..fe838276be 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -6,10 +6,10 @@ a variety of guest operating systems" HOMEPAGE = "http://qemu.org" LICENSE = "GPLv2 & LGPLv2.1" -RDEPENDS_${PN}-ptest = "bash make" +RDEPENDS:${PN}-ptest = "bash" require qemu-targets.inc -inherit pkgconfig ptest +inherit pkgconfig ptest python3-dir LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" @@ -18,53 +18,59 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://powerpc_rom.bin \ file://run-ptest \ file://0001-qemu-Add-missing-wacom-HID-descriptor.patch \ - file://0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \ file://0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ - file://0004-qemu-disable-Valgrind.patch \ - file://0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch \ file://0006-chardev-connect-socket-to-a-spawned-command.patch \ file://0007-apic-fixup-fallthrough-to-PIC.patch \ - file://0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \ - file://0009-Fix-webkitgtk-builds.patch \ file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \ - file://0001-Add-enable-disable-udev.patch \ file://0001-qemu-Do-not-include-file-if-not-exists.patch \ - file://find_datadir.patch \ - file://usb-fix-setup_len-init.patch \ - file://0001-target-mips-Increase-number-of-TLB-entries-on-the-34.patch \ - file://CVE-2020-24352.patch \ + file://mmap2.patch \ + file://determinism.patch \ + file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \ + file://0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" -SRC_URI[sha256sum] = "c9174eb5933d9eb5e61f541cd6d1184cd3118dfe4c5c4955bc1bdc4d390fa4e5" +SRC_URI[sha256sum] = "68e15d8e45ac56326e0b9a4afa8b49a3dfe8aba3488221d098c84698bca65b45" -COMPATIBLE_HOST_mipsarchn32 = "null" -COMPATIBLE_HOST_mipsarchn64 = "null" +SRC_URI:append:class-target = " file://cross.patch" +SRC_URI:append:class-nativesdk = " file://cross.patch" + +# Applies against virglrender < 0.6.0 and not qemu itself +CVE_CHECK_WHITELIST += "CVE-2017-5957" + +# The VNC server can expose host files uder some circumstances. We don't +# enable it by default. +CVE_CHECK_WHITELIST += "CVE-2007-0998" + +# 'The issues identified by this CVE were determined to not constitute a vulnerability.' +# https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11 +CVE_CHECK_WHITELIST += "CVE-2018-18438" + +COMPATIBLE_HOST:mipsarchn32 = "null" +COMPATIBLE_HOST:mipsarchn64 = "null" +COMPATIBLE_HOST:riscv32 = "null" # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html # upstream states qemu doesn't work without optimization DEBUG_BUILD = "0" -do_install_append() { +do_install:append() { # Prevent QA warnings about installed ${localstatedir}/run if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi } -do_compile_ptest() { - make buildtest-TESTS -} - do_install_ptest() { cp -rL ${B}/tests ${D}${PTEST_PATH} - find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {} + find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {} - cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests # Don't check the file genreated by configure - sed -i -e '/wildcard config-host.mak/d' \ - -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include - sed -i -e 's,${HOSTTOOLS_DIR}/python3,${bindir}/python3,' \ - ${D}/${PTEST_PATH}/tests/qemu-iotests/common.env sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh + + # Strip the paths from the QEMU variable, we can use PATH + sed -i -e "s#^QEMU=.*/qemu-#QEMU=qemu-#g" ${D}${PTEST_PATH}/tests/tcg/*.mak + + # Strip compiler flags as they break reproducibility + sed -i -e "s,CROSS_CC_GUEST=.*,CROSS_CC_GUEST=," ${D}${PTEST_PATH}/tests/tcg/*.mak } # QEMU_TARGETS is overridable variable @@ -81,23 +87,22 @@ EXTRA_OECONF = " \ --sysconfdir=${sysconfdir} \ --libexecdir=${libexecdir} \ --localstatedir=${localstatedir} \ - --with-confsuffix=/${BPN} \ + --with-suffix=${BPN} \ --disable-strip \ --disable-werror \ --extra-cflags='${CFLAGS}' \ --extra-ldflags='${LDFLAGS}' \ --with-git=/bin/false \ - --disable-git-update \ + --with-git-submodules=ignore \ + --meson=meson \ ${PACKAGECONFIG_CONFARGS} \ " -export LIBTOOL="${HOST_SYS}-libtool" - B = "${WORKDIR}/build" -EXTRA_OECONF_append = " --python=${HOSTTOOLS_DIR}/python3" +#EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3" -do_configure_prepend_class-native() { +do_configure:prepend:class-native() { # Append build host pkg-config paths for native target since the host may provide sdl BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "") if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then @@ -106,7 +111,11 @@ do_configure_prepend_class-native() { } do_configure() { - ${S}/configure ${EXTRA_OECONF} + # This is taken from meson.bbclass to avoid errors when updating to a + # new version of meson. + rmdir ${STAGING_LIBDIR_NATIVE}/${PYTHON_DIR}/site-packages/*.egg-info 2>/dev/null || : + + ${S}/configure ${EXTRA_OECONF} } do_configure[cleandirs] += "${B}" @@ -121,7 +130,7 @@ do_install () { # This will trigger a MMU access fault in the virtual CPU. With this change, # the qemu-mips works fine. # IMPORTANT: This piece needs to be removed once the root cause is fixed! -do_install_append() { +do_install:append() { if [ -e "${D}/${bindir}/qemu-mips" ]; then create_wrapper ${D}/${bindir}/qemu-mips \ QEMU_RESERVED_VA=0x0 @@ -141,8 +150,8 @@ make_qemu_wrapper() { } # Disable kvm/virgl/mesa on targets that do not support it -PACKAGECONFIG_remove_darwin = "kvm virglrenderer glx gtk+" -PACKAGECONFIG_remove_mingw32 = "kvm virglrenderer glx gtk+" +PACKAGECONFIG:remove:darwin = "kvm virglrenderer glx gtk+" +PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer glx gtk+" PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2" PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr --enable-cap-ng,--disable-virtfs,libcap-ng attr," @@ -163,7 +172,7 @@ PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt," PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle" PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1" PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc" -PACKAGECONFIG[alsa] = "--audio-drv-list='oss alsa',,alsa-lib" +PACKAGECONFIG[alsa] = "--audio-drv-list=default,,alsa-lib" PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,virtual/libgl" PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo" PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl" @@ -186,7 +195,12 @@ PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd,ceph,ceph" PACKAGECONFIG[vhost] = "--enable-vhost-net,--disable-vhost-net,," PACKAGECONFIG[ust] = "--enable-trace-backend=ust,--enable-trace-backend=nop,lttng-ust," PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,," +PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" +# libnfs is currently provided by meta-kodi +PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs" +PACKAGECONFIG[pmem] = "--enable-libpmem,--disable-libpmem,pmdk" +PACKAGECONFIG[pulsedio] = "--enable-pa,--disable-pa,pulseaudio" -INSANE_SKIP_${PN} = "arch" +INSANE_SKIP:${PN} = "arch" -FILES_${PN} += "${datadir}/icons" +FILES:${PN} += "${datadir}/icons" |