From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 469CF158094 for ; Tue, 6 Sep 2022 22:39:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 90AC4E0863; Tue, 6 Sep 2022 22:39:04 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7508CE0863 for ; Tue, 6 Sep 2022 22:39:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6310E3411B3 for ; Tue, 6 Sep 2022 22:39:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BD7C85CD for ; Tue, 6 Sep 2022 22:39:00 +0000 (UTC) From: "John Helmert III" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "John Helmert III" Message-ID: <1662503935.8e601119d1090f1db6f42ddae27eada7e89f1fb6.ajak@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/qemu/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/qemu/qemu-9999.ebuild X-VCS-Directories: app-emulation/qemu/ X-VCS-Committer: ajak X-VCS-Committer-Name: John Helmert III X-VCS-Revision: 8e601119d1090f1db6f42ddae27eada7e89f1fb6 X-VCS-Branch: master Date: Tue, 6 Sep 2022 22:39:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 67e9918f-bbee-4591-9d25-28d3ea112188 X-Archives-Hash: e754ddfdf865f11932b5449081a29757 commit: 8e601119d1090f1db6f42ddae27eada7e89f1fb6 Author: John Helmert III gentoo org> AuthorDate: Sun Aug 7 16:24:39 2022 +0000 Commit: John Helmert III gentoo org> CommitDate: Tue Sep 6 22:38:55 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e601119 app-emulation/qemu: sync live Pulled in Hello71's meson fixes here, so thanks to them too. Thanks-To: Alex Xu (Hello71) yahoo.ca> Closes: https://github.com/gentoo/gentoo/pull/26121 Closes: https://github.com/gentoo/gentoo/pull/26764 Signed-off-by: John Helmert III gentoo.org> app-emulation/qemu/qemu-9999.ebuild | 103 ++++++++++++++++++++++++------------ 1 file changed, 70 insertions(+), 33 deletions(-) diff --git a/app-emulation/qemu/qemu-9999.ebuild b/app-emulation/qemu/qemu-9999.ebuild index e4f37bb04fdd..9ec29aa9430e 100644 --- a/app-emulation/qemu/qemu-9999.ebuild +++ b/app-emulation/qemu/qemu-9999.ebuild @@ -17,7 +17,7 @@ QEMU_DOC_USEFLAG="+doc" PYTHON_COMPAT=( python3_{8,9,10} ) PYTHON_REQ_USE="ncurses,readline" -FIRMWARE_ABI_VERSION="7.0.0" +FIRMWARE_ABI_VERSION="7.1.0" inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ pax-utils xdg-utils @@ -27,7 +27,6 @@ if [[ ${PV} == *9999* ]]; then EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" EGIT_SUBMODULES=( - meson tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3 ui/keycodemapdb @@ -42,8 +41,8 @@ else SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" fi - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" S="${WORKDIR}/${MY_P}" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" fi DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" @@ -230,34 +229,44 @@ SOFTMMU_TOOLS_DEPEND=" zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) " -EDK2_OVMF_VERSION="202105" -SEABIOS_VERSION="1.14.0" +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.0" X86_FIRMWARE_DEPEND=" pin-upstream-blobs? ( - ~sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}[binary] + ~sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} ~sys-firmware/ipxe-1.21.1[binary,qemu] - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} ~sys-firmware/sgabios-0.1_pre10[binary] ) !pin-upstream-blobs? ( - >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + || ( + >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ) sys-firmware/ipxe[qemu] - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) sys-firmware/sgabios )" PPC_FIRMWARE_DEPEND=" pin-upstream-blobs? ( - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} ) !pin-upstream-blobs? ( - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) ) " BDEPEND=" $(python_gen_impl_dep) dev-lang/perl + dev-util/meson sys-apps/texinfo virtual/pkgconfig doc? ( @@ -444,8 +453,8 @@ src_prepare() { # drop it. No change to level of protection b/c we patch our toolchain. sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die - # Remove bundled copy of libfdt - rm -r dtc || die + # Remove bundled modules + rm -r dtc meson roms/*/ slirp || die } ## @@ -490,7 +499,6 @@ qemu_src_configure() { # are enabled), but it's not really worth the hassle. Disable it # all the time to avoid automatically detecting it. #568856 --disable-gcrypt - --python="${PYTHON}" --cc="$(tc-getCC)" --cxx="$(tc-getCXX)" --host-cc="$(tc-getBUILD_CC)" @@ -583,8 +591,8 @@ qemu_src_configure() { $(conf_notuser usbredir usb-redir) $(conf_notuser vde) $(conf_notuser vhost-net) - $(conf_notuser vhost-user-fs) - $(conf_tools vhost-user-fs virtiofsd) + # $(conf_notuser vhost-user-fs) + # $(conf_tools vhost-user-fs virtiofsd) $(conf_notuser virgl virglrenderer) $(conf_softmmu virtfs) $(conf_notuser vnc) @@ -617,7 +625,6 @@ qemu_src_configure() { conf_opts+=( --enable-linux-user --disable-system - --disable-blobs --disable-tools ) local static_flag="static-user" @@ -626,9 +633,20 @@ qemu_src_configure() { conf_opts+=( --disable-linux-user --enable-system + --disable-blobs --disable-tools ) local static_flag="static" + + for target in ${IUSE_SOFTMMU_TARGETS}; do + if use "qemu_softmmu_targets_${target}"; then + conf_opts+=( + # For some reason, adding this with the setting set + # to on *or* off makes the build always fail. + # --with-devices-${target}=gentoo + ) + fi + done ;; tools) conf_opts+=( @@ -680,6 +698,16 @@ src_configure() { if use "qemu_softmmu_targets_${target}"; then softmmu_targets+=",${target}-softmmu" softmmu_bins+=( "qemu-system-${target}" ) + + if use vhost-user-fs; then + echo "CONFIG_VHOST_USER_FS=y for ${target}-softmmu" || die + echo "CONFIG_VIRTIO=y" >> "configs/devices/${target}-softmmu/gentoo.mak" || die + echo "CONFIG_VHOST_USER_FS=y" >> "configs/devices/${target}-softmmu/gentoo.mak" || die + else + echo "CONFIG_VHOST_USER_FS=n for ${target}-softmmu" || die + echo "CONFIG_VIRTIO=n" >> "configs/devices/${target}-softmmu/gentoo.mak" || die + echo "CONFIG_VHOST_USER_FS=n" >> "configs/devices/${target}-softmmu/gentoo.mak" || die + fi fi done @@ -838,10 +866,7 @@ src_install() { if [[ -n ${softmmu_targets} ]]; then # Remove SeaBIOS since we're using the SeaBIOS packaged one - rm "${ED}/usr/share/qemu/bios.bin" - rm "${ED}/usr/share/qemu/bios-256k.bin" if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin fi @@ -852,6 +877,7 @@ src_install() { rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" rm "${ED}/usr/share/qemu/vgabios-virtio.bin" rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + # PPC/PPC64 loads vgabios-stdvga if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin @@ -863,13 +889,11 @@ src_install() { fi # Remove sgabios since we're using the sgabios packaged one - rm "${ED}/usr/share/qemu/sgabios.bin" if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin fi # Remove iPXE since we're using the iPXE packaged one - rm "${ED}"/usr/share/qemu/pxe-*.rom if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom @@ -909,9 +933,20 @@ pkg_postinst() { if use pin-upstream-blobs && firmware_abi_change; then ewarn "This version of qemu pins new versions of firmware blobs:" - ewarn " $(best_version sys-firmware/edk2-ovmf)" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + ewarn " $(best_version sys-firmware/edk2-ovmf-bin)" + else + ewarn " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + ewarn " $(best_version sys-firmware/ipxe)" - ewarn " $(best_version sys-firmware/seabios)" ewarn " $(best_version sys-firmware/sgabios)" ewarn "This might break resume of hibernated guests (started with a different" ewarn "firmware version) and live migration to/from qemu versions with different" @@ -925,22 +960,24 @@ pkg_postinst() { pkg_info() { echo "Using:" echo " $(best_version app-emulation/spice-protocol)" - echo " $(best_version sys-firmware/edk2-ovmf)" - if has_version 'sys-firmware/edk2-ovmf[binary]'; then - echo " USE=binary" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + echo " $(best_version sys-firmware/edk2-ovmf-bin)" else - echo " USE=''" + echo " $(best_version sys-firmware/edk2-ovmf)" fi - echo " $(best_version sys-firmware/ipxe)" - echo " $(best_version sys-firmware/seabios)" - if has_version 'sys-firmware/seabios[binary]'; then - echo " USE=binary" + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" else - echo " USE=''" + echo " $(best_version sys-firmware/seabios)" fi + + echo " $(best_version sys-firmware/ipxe)" echo " $(best_version sys-firmware/sgabios)" } pkg_postrm() { xdg_icon_cache_update + udev_reload }