Gentoo Archives: gentoo-commits

From: John Helmert III <ajak@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/qemu/, profiles/
Date: Wed, 08 Dec 2021 01:23:09
Message-Id: 1638926564.e2a2a59f82b293bea33052748a834f1ddcb09b2c.ajak@gentoo
1 commit: e2a2a59f82b293bea33052748a834f1ddcb09b2c
2 Author: John Helmert III <ajak <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 8 01:22:44 2021 +0000
4 Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 8 01:22:44 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2a2a59f
7
8 app-emulation/qemu: drop 6.1.0-r1
9
10 Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
11
12 app-emulation/qemu/qemu-6.1.0-r1.ebuild | 912 --------------------------------
13 profiles/package.mask | 4 -
14 2 files changed, 916 deletions(-)
15
16 diff --git a/app-emulation/qemu/qemu-6.1.0-r1.ebuild b/app-emulation/qemu/qemu-6.1.0-r1.ebuild
17 deleted file mode 100644
18 index aa69ee720920..000000000000
19 --- a/app-emulation/qemu/qemu-6.1.0-r1.ebuild
20 +++ /dev/null
21 @@ -1,912 +0,0 @@
22 -# Copyright 1999-2021 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI="7"
26 -
27 -PYTHON_COMPAT=( python3_{7,8,9,10} )
28 -PYTHON_REQ_USE="ncurses,readline"
29 -
30 -FIRMWARE_ABI_VERSION="6.1.0"
31 -
32 -inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \
33 - pax-utils xdg-utils
34 -
35 -if [[ ${PV} = *9999* ]]; then
36 - EGIT_REPO_URI="https://git.qemu.org/git/qemu.git"
37 - EGIT_SUBMODULES=(
38 - meson
39 - tests/fp/berkeley-softfloat-3
40 - tests/fp/berkeley-testfloat-3
41 - ui/keycodemapdb
42 - )
43 - inherit git-r3
44 - SRC_URI=""
45 -else
46 - SRC_URI="https://download.qemu.org/${P}.tar.xz"
47 - KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
48 -fi
49 -
50 -DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
51 -HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org"
52 -
53 -LICENSE="GPL-2 LGPL-2 BSD-2"
54 -SLOT="0"
55 -
56 -IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug +doc
57 - +fdt fuse glusterfs gnutls gtk infiniband iscsi io-uring
58 - jack jemalloc +jpeg kernel_linux
59 - kernel_FreeBSD lzo multipath
60 - ncurses nfs nls numa opengl +oss +pin-upstream-blobs
61 - plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
62 - +slirp
63 - smartcard snappy spice ssh static static-user systemtap test udev usb
64 - usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen
65 - xfs zstd"
66 -
67 -COMMON_TARGETS="
68 - aarch64
69 - alpha
70 - arm
71 - cris
72 - hppa
73 - i386
74 - m68k
75 - microblaze
76 - microblazeel
77 - mips
78 - mips64
79 - mips64el
80 - mipsel
81 - nios2
82 - or1k
83 - ppc
84 - ppc64
85 - riscv32
86 - riscv64
87 - s390x
88 - sh4
89 - sh4eb
90 - sparc
91 - sparc64
92 - x86_64
93 - xtensa
94 - xtensaeb
95 -"
96 -IUSE_SOFTMMU_TARGETS="
97 - ${COMMON_TARGETS}
98 - avr
99 - rx
100 - tricore
101 -"
102 -IUSE_USER_TARGETS="
103 - ${COMMON_TARGETS}
104 - aarch64_be
105 - armeb
106 - hexagon
107 - mipsn32
108 - mipsn32el
109 - ppc64abi32
110 - ppc64le
111 - sparc32plus
112 -"
113 -
114 -use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
115 -use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
116 -IUSE+=" ${use_softmmu_targets} ${use_user_targets}"
117 -
118 -RESTRICT="!test? ( test )"
119 -# Allow no targets to be built so that people can get a tools-only build.
120 -# Block USE flag configurations known to not work.
121 -REQUIRED_USE="${PYTHON_REQUIRED_USE}
122 - qemu_softmmu_targets_arm? ( fdt )
123 - qemu_softmmu_targets_microblaze? ( fdt )
124 - qemu_softmmu_targets_mips64el? ( fdt )
125 - qemu_softmmu_targets_ppc64? ( fdt )
126 - qemu_softmmu_targets_ppc? ( fdt )
127 - qemu_softmmu_targets_riscv32? ( fdt )
128 - qemu_softmmu_targets_riscv64? ( fdt )
129 - sdl-image? ( sdl )
130 - static? ( static-user !alsa !gtk !jack !opengl !pulseaudio !plugins !rbd !snappy !udev )
131 - static-user? ( !plugins )
132 - vhost-user-fs? ( caps seccomp )
133 - virgl? ( opengl )
134 - virtfs? ( caps xattr )
135 - vte? ( gtk )
136 - multipath? ( udev )
137 - plugins? ( !static !static-user )
138 -"
139 -
140 -# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
141 -# and user/softmmu targets (qemu-*, qemu-system-*).
142 -#
143 -# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
144 -#
145 -# The attr lib isn't always linked in (although the USE flag is always
146 -# respected). This is because qemu supports using the C library's API
147 -# when available rather than always using the external library.
148 -ALL_DEPEND="
149 - >=dev-libs/glib-2.0[static-libs(+)]
150 - sys-libs/zlib[static-libs(+)]
151 - python? ( ${PYTHON_DEPS} )
152 - systemtap? ( dev-util/systemtap )
153 - xattr? ( sys-apps/attr[static-libs(+)] )"
154 -
155 -# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
156 -# softmmu targets (qemu-system-*).
157 -SOFTMMU_TOOLS_DEPEND="
158 - dev-libs/libxml2[static-libs(+)]
159 - >=x11-libs/pixman-0.28.0[static-libs(+)]
160 - accessibility? (
161 - app-accessibility/brltty[api]
162 - app-accessibility/brltty[static-libs(+)]
163 - )
164 - aio? ( dev-libs/libaio[static-libs(+)] )
165 - alsa? ( >=media-libs/alsa-lib-1.0.13 )
166 - bpf? ( dev-libs/libbpf:= )
167 - bzip2? ( app-arch/bzip2[static-libs(+)] )
168 - capstone? ( dev-libs/capstone:= )
169 - caps? ( sys-libs/libcap-ng[static-libs(+)] )
170 - curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
171 - fdt? ( >=sys-apps/dtc-1.5.0[static-libs(+)] )
172 - fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] )
173 - glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
174 - gnutls? (
175 - dev-libs/nettle:=[static-libs(+)]
176 - >=net-libs/gnutls-3.0:=[static-libs(+)]
177 - )
178 - gtk? (
179 - x11-libs/gtk+:3
180 - vte? ( x11-libs/vte:2.91 )
181 - )
182 - infiniband? (
183 - sys-fabric/libibumad:=[static-libs(+)]
184 - sys-fabric/libibverbs:=[static-libs(+)]
185 - sys-fabric/librdmacm:=[static-libs(+)]
186 - )
187 - iscsi? ( net-libs/libiscsi )
188 - io-uring? ( sys-libs/liburing:=[static-libs(+)] )
189 - jack? ( virtual/jack )
190 - jemalloc? ( dev-libs/jemalloc )
191 - jpeg? ( virtual/jpeg:0=[static-libs(+)] )
192 - lzo? ( dev-libs/lzo:2[static-libs(+)] )
193 - multipath? ( sys-fs/multipath-tools )
194 - ncurses? (
195 - sys-libs/ncurses:=[unicode(+)]
196 - sys-libs/ncurses:=[static-libs(+)]
197 - )
198 - nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] )
199 - numa? ( sys-process/numactl[static-libs(+)] )
200 - opengl? (
201 - virtual/opengl
202 - media-libs/libepoxy[static-libs(+)]
203 - media-libs/mesa[static-libs(+)]
204 - media-libs/mesa[egl(+),gbm(+)]
205 - )
206 - png? ( media-libs/libpng:0=[static-libs(+)] )
207 - pulseaudio? ( media-sound/pulseaudio )
208 - rbd? ( sys-cluster/ceph )
209 - sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
210 - sdl? (
211 - media-libs/libsdl2[video]
212 - media-libs/libsdl2[static-libs(+)]
213 - )
214 - sdl-image? ( media-libs/sdl2-image[static-libs(+)] )
215 - seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
216 - slirp? ( net-libs/libslirp[static-libs(+)] )
217 - smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
218 - snappy? ( app-arch/snappy:= )
219 - spice? (
220 - >=app-emulation/spice-protocol-0.12.3
221 - >=app-emulation/spice-0.12.0[static-libs(+)]
222 - )
223 - ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] )
224 - udev? ( virtual/libudev:= )
225 - usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
226 - usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
227 - vde? ( net-misc/vde[static-libs(+)] )
228 - virgl? ( media-libs/virglrenderer[static-libs(+)] )
229 - virtfs? ( sys-libs/libcap )
230 - xen? ( app-emulation/xen-tools:= )
231 - xfs? ( sys-fs/xfsprogs[static-libs(+)] )
232 - zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] )
233 -"
234 -
235 -EDK2_OVMF_VERSION="202105"
236 -SEABIOS_VERSION="1.14.0"
237 -
238 -X86_FIRMWARE_DEPEND="
239 - pin-upstream-blobs? (
240 - ~sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}[binary]
241 - ~sys-firmware/ipxe-1.21.1[binary,qemu]
242 - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios]
243 - ~sys-firmware/sgabios-0.1_pre10[binary]
244 - )
245 - !pin-upstream-blobs? (
246 - >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}
247 - sys-firmware/ipxe[qemu]
248 - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios]
249 - sys-firmware/sgabios
250 - )"
251 -PPC_FIRMWARE_DEPEND="
252 - pin-upstream-blobs? (
253 - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios]
254 - )
255 - !pin-upstream-blobs? (
256 - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios]
257 - )
258 -"
259 -
260 -BDEPEND="
261 - $(python_gen_impl_dep)
262 - dev-lang/perl
263 - sys-apps/texinfo
264 - virtual/pkgconfig
265 - doc? (
266 - dev-python/sphinx[${PYTHON_USEDEP}]
267 - dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
268 - )
269 - gtk? ( nls? ( sys-devel/gettext ) )
270 - test? (
271 - dev-libs/glib[utils]
272 - sys-devel/bc
273 - )
274 -"
275 -CDEPEND="
276 - !static? (
277 - ${ALL_DEPEND//\[static-libs(+)]}
278 - ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]}
279 - )
280 - qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
281 - qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
282 - qemu_softmmu_targets_ppc? ( ${PPC_FIRMWARE_DEPEND} )
283 - qemu_softmmu_targets_ppc64? ( ${PPC_FIRMWARE_DEPEND} )
284 -"
285 -DEPEND="${CDEPEND}
286 - kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
287 - static? (
288 - ${ALL_DEPEND}
289 - ${SOFTMMU_TOOLS_DEPEND}
290 - )
291 - static-user? ( ${ALL_DEPEND} )"
292 -RDEPEND="${CDEPEND}
293 - acct-group/kvm
294 - selinux? ( sec-policy/selinux-qemu )"
295 -
296 -PATCHES=(
297 - "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch
298 - "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch
299 - "${FILESDIR}"/${PN}-6.0.0-make.patch
300 - "${FILESDIR}"/${PN}-6.1.0-strings.patch
301 - "${FILESDIR}"/${P}-automagic-libbpf.patch
302 -)
303 -
304 -QA_PREBUILT="
305 - usr/share/qemu/hppa-firmware.img
306 - usr/share/qemu/openbios-ppc
307 - usr/share/qemu/openbios-sparc64
308 - usr/share/qemu/openbios-sparc32
309 - usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf
310 - usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf
311 - usr/share/qemu/palcode-clipper
312 - usr/share/qemu/s390-ccw.img
313 - usr/share/qemu/s390-netboot.img
314 - usr/share/qemu/u-boot.e500
315 -"
316 -
317 -QA_WX_LOAD="usr/bin/qemu-i386
318 - usr/bin/qemu-x86_64
319 - usr/bin/qemu-alpha
320 - usr/bin/qemu-arm
321 - usr/bin/qemu-cris
322 - usr/bin/qemu-m68k
323 - usr/bin/qemu-microblaze
324 - usr/bin/qemu-microblazeel
325 - usr/bin/qemu-mips
326 - usr/bin/qemu-mipsel
327 - usr/bin/qemu-or1k
328 - usr/bin/qemu-ppc
329 - usr/bin/qemu-ppc64
330 - usr/bin/qemu-ppc64abi32
331 - usr/bin/qemu-sh4
332 - usr/bin/qemu-sh4eb
333 - usr/bin/qemu-sparc
334 - usr/bin/qemu-sparc64
335 - usr/bin/qemu-armeb
336 - usr/bin/qemu-sparc32plus
337 - usr/bin/qemu-s390x
338 - usr/bin/qemu-unicore32
339 -"
340 -
341 -DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the
342 -kernel module loaded before running kvm. The easiest way to ensure that the
343 -kernel module is loaded is to load it on boot.
344 - For AMD CPUs the module is called 'kvm-amd'.
345 - For Intel CPUs the module is called 'kvm-intel'.
346 -Please review /etc/conf.d/modules for how to load these.
347 -
348 -Make sure your user is in the 'kvm' group. Just run
349 - $ gpasswd -a <USER> kvm
350 -then have <USER> re-login.
351 -
352 -For brand new installs, the default permissions on /dev/kvm might not let
353 -you access it. You can tell udev to reset ownership/perms:
354 - $ udevadm trigger -c add /dev/kvm
355 -
356 -If you want to register binfmt handlers for qemu user targets:
357 -For openrc:
358 - # rc-update add qemu-binfmt
359 -For systemd:
360 - # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf"
361 -
362 -pkg_pretend() {
363 - if use kernel_linux && kernel_is lt 2 6 25; then
364 - eerror "This version of KVM requires a host kernel of 2.6.25 or higher."
365 - elif use kernel_linux; then
366 - if ! linux_config_exists; then
367 - eerror "Unable to check your kernel for KVM support"
368 - else
369 - CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
370 - ERROR_KVM="You must enable KVM in your kernel to continue"
371 - ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
372 - ERROR_KVM_AMD+=" your kernel configuration."
373 - ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
374 - ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
375 - ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
376 - ERROR_TUN+=" into your kernel or loaded as a module to use the"
377 - ERROR_TUN+=" virtual network device if using -net tap."
378 - ERROR_BRIDGE="You will also need support for 802.1d"
379 - ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
380 - use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
381 - ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
382 - ERROR_VHOST_NET+=" support"
383 -
384 - if use amd64 || use x86 || use amd64-linux || use x86-linux; then
385 - if grep -q AuthenticAMD /proc/cpuinfo; then
386 - CONFIG_CHECK+=" ~KVM_AMD"
387 - elif grep -q GenuineIntel /proc/cpuinfo; then
388 - CONFIG_CHECK+=" ~KVM_INTEL"
389 - fi
390 - fi
391 -
392 - use python && CONFIG_CHECK+=" ~DEBUG_FS"
393 - ERROR_DEBUG_FS="debugFS support required for kvm_stat"
394 -
395 - # Now do the actual checks setup above
396 - check_extra_config
397 - fi
398 - fi
399 -
400 - if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
401 - eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
402 - eerror "instances are still pointing to it. Please update your"
403 - eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
404 - eerror "and the right system binary (e.g. qemu-system-x86_64)."
405 - die "update your virt configs to not use qemu-kvm"
406 - fi
407 -}
408 -
409 -# Sanity check to make sure target lists are kept up-to-date.
410 -check_targets() {
411 - local var=$1 mak=$2
412 - local detected sorted
413 -
414 - pushd "${S}"/configs/targets/ >/dev/null || die
415 -
416 - # Force C locale until glibc is updated. #564936
417 - detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
418 - sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u))
419 - if [[ ${sorted} != "${detected}" ]] ; then
420 - eerror "The ebuild needs to be kept in sync."
421 - eerror "${var}: ${sorted}"
422 - eerror "$(printf '%-*s' ${#var} configure): ${detected}"
423 - die "sync ${var} to the list of targets"
424 - fi
425 -
426 - popd >/dev/null
427 -}
428 -
429 -src_prepare() {
430 - check_targets IUSE_SOFTMMU_TARGETS softmmu
431 - check_targets IUSE_USER_TARGETS linux-user
432 -
433 - default
434 -
435 - # Use correct toolchain to fix cross-compiling
436 - tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
437 - export WINDRES=${CHOST}-windres
438 -
439 - # Verbose builds
440 - MAKEOPTS+=" V=1"
441 -
442 - # Remove bundled copy of libfdt
443 - rm -r dtc || die
444 -}
445 -
446 -##
447 -# configures qemu based on the build directory and the build type
448 -# we are using.
449 -#
450 -qemu_src_configure() {
451 - debug-print-function ${FUNCNAME} "$@"
452 -
453 - local buildtype=$1
454 - local builddir="${S}/${buildtype}-build"
455 -
456 - mkdir "${builddir}"
457 -
458 - local conf_opts=(
459 - --prefix=/usr
460 - --sysconfdir=/etc
461 - --bindir=/usr/bin
462 - --libdir=/usr/$(get_libdir)
463 - --datadir=/usr/share
464 - --docdir=/usr/share/doc/${PF}/html
465 - --mandir=/usr/share/man
466 - --localstatedir=/var
467 - --disable-bsd-user
468 - --disable-containers # bug #732972
469 - --disable-guest-agent
470 - --disable-strip
471 -
472 - # bug #746752: TCG interpreter has a few limitations:
473 - # - it does not support FPU
474 - # - it's generally slower on non-self-modifying code
475 - # It's advantage is support for host architectures
476 - # where native codegeneration is not implemented.
477 - # Gentoo has qemu keyworded only on targets with
478 - # native code generation available. Avoid the interpreter.
479 - --disable-tcg-interpreter
480 -
481 - --disable-werror
482 - # We support gnutls/nettle for crypto operations. It is possible
483 - # to use gcrypt when gnutls/nettle are disabled (but not when they
484 - # are enabled), but it's not really worth the hassle. Disable it
485 - # all the time to avoid automatically detecting it. #568856
486 - --disable-gcrypt
487 - --python="${PYTHON}"
488 - --cc="$(tc-getCC)"
489 - --cxx="$(tc-getCXX)"
490 - --host-cc="$(tc-getBUILD_CC)"
491 - $(use_enable debug debug-info)
492 - $(use_enable debug debug-tcg)
493 - $(use_enable doc docs)
494 - $(use_enable nls gettext)
495 - $(use_enable plugins)
496 - $(use_enable xattr attr)
497 - )
498 -
499 - # Disable options not used by user targets. This simplifies building
500 - # static user targets (USE=static-user) considerably.
501 - conf_notuser() {
502 - if [[ ${buildtype} == "user" ]] ; then
503 - echo "--disable-${2:-$1}"
504 - else
505 - use_enable "$@"
506 - fi
507 - }
508 - # Enable option only for softmmu build, but not 'user' or 'tools'
509 - conf_softmmu() {
510 - if [[ ${buildtype} == "softmmu" ]] ; then
511 - use_enable "$@"
512 - else
513 - echo "--disable-${2:-$1}"
514 - fi
515 - }
516 - # Enable option only for tools build, but not 'user' or 'softmmu'
517 - conf_tools() {
518 - if [[ ${buildtype} == "tools" ]] ; then
519 - use_enable "$@"
520 - else
521 - echo "--disable-${2:-$1}"
522 - fi
523 - }
524 - conf_opts+=(
525 - $(conf_notuser accessibility brlapi)
526 - $(conf_notuser aio linux-aio)
527 - $(conf_softmmu bpf)
528 - $(conf_notuser bzip2)
529 - $(conf_notuser capstone)
530 - $(conf_notuser caps cap-ng)
531 - $(conf_notuser curl)
532 - $(conf_notuser fdt)
533 - $(conf_notuser fuse)
534 - $(conf_notuser glusterfs)
535 - $(conf_notuser gnutls)
536 - $(conf_notuser gnutls nettle)
537 - $(conf_notuser gtk)
538 - $(conf_notuser infiniband rdma)
539 - $(conf_notuser iscsi libiscsi)
540 - $(conf_notuser io-uring linux-io-uring)
541 - $(conf_notuser jemalloc jemalloc)
542 - $(conf_notuser jpeg vnc-jpeg)
543 - $(conf_notuser kernel_linux kvm)
544 - $(conf_notuser lzo)
545 - $(conf_notuser multipath mpath)
546 - $(conf_notuser ncurses curses)
547 - $(conf_notuser nfs libnfs)
548 - $(conf_notuser numa)
549 - $(conf_notuser opengl)
550 - $(conf_notuser png vnc-png)
551 - $(conf_notuser rbd)
552 - $(conf_notuser sasl vnc-sasl)
553 - $(conf_notuser sdl)
554 - $(conf_softmmu sdl-image)
555 - $(conf_notuser seccomp)
556 - $(conf_notuser slirp slirp system)
557 - $(conf_notuser smartcard)
558 - $(conf_notuser snappy)
559 - $(conf_notuser spice)
560 - $(conf_notuser ssh libssh)
561 - $(conf_notuser udev libudev)
562 - $(conf_notuser usb libusb)
563 - $(conf_notuser usbredir usb-redir)
564 - $(conf_notuser vde)
565 - $(conf_notuser vhost-net)
566 - $(conf_notuser vhost-user-fs)
567 - $(conf_tools vhost-user-fs virtiofsd)
568 - $(conf_notuser virgl virglrenderer)
569 - $(conf_softmmu virtfs)
570 - $(conf_notuser vnc)
571 - $(conf_notuser vte)
572 - $(conf_notuser xen)
573 - $(conf_notuser xen xen-pci-passthrough)
574 - $(conf_notuser xfs xfsctl)
575 - # use prebuilt keymaps, bug #759604
576 - --disable-xkbcommon
577 - $(conf_notuser zstd)
578 - )
579 -
580 - if [[ ${buildtype} == "user" ]] ; then
581 - conf_opts+=( --disable-libxml2 )
582 - else
583 - conf_opts+=( --enable-libxml2 )
584 - fi
585 -
586 - if [[ ! ${buildtype} == "user" ]] ; then
587 - # audio options
588 - local audio_opts=(
589 - # Note: backend order matters here: #716202
590 - # We iterate from higher-level to lower level.
591 - $(usex pulseaudio pa "")
592 - $(usev jack)
593 - $(usev sdl)
594 - $(usev alsa)
595 - $(usev oss)
596 - )
597 - conf_opts+=(
598 - --audio-drv-list=$(printf "%s," "${audio_opts[@]}")
599 - )
600 - fi
601 -
602 - case ${buildtype} in
603 - user)
604 - conf_opts+=(
605 - --enable-linux-user
606 - --disable-system
607 - --disable-blobs
608 - --disable-tools
609 - )
610 - local static_flag="static-user"
611 - ;;
612 - softmmu)
613 - conf_opts+=(
614 - --disable-linux-user
615 - --enable-system
616 - --disable-tools
617 - )
618 - local static_flag="static"
619 - ;;
620 - tools)
621 - conf_opts+=(
622 - --disable-linux-user
623 - --disable-system
624 - --disable-blobs
625 - --enable-tools
626 - )
627 - local static_flag="static"
628 - ;;
629 - esac
630 -
631 - local targets="${buildtype}_targets"
632 - [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" )
633 -
634 - # Add support for SystemTAP
635 - use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
636 -
637 - # We always want to attempt to build with PIE support as it results
638 - # in a more secure binary. But it doesn't work with static or if
639 - # the current GCC doesn't have PIE support.
640 - if use ${static_flag}; then
641 - conf_opts+=( --static --disable-pie )
642 - else
643 - tc-enables-pie && conf_opts+=( --enable-pie )
644 - fi
645 -
646 - # Meson will not use a cross-file unless cross_prefix is set.
647 - tc-is-cross-compiler && conf_opts+=( --cross-prefix="${CHOST}-" )
648 -
649 - # Plumb through equivalent of EXTRA_ECONF to allow experiments
650 - # like bug #747928.
651 - conf_opts+=( ${EXTRA_CONF_QEMU} )
652 -
653 - echo "../configure ${conf_opts[*]}"
654 - cd "${builddir}"
655 - ../configure "${conf_opts[@]}" || die "configure failed"
656 -
657 - # FreeBSD's kernel does not support QEMU assigning/grabbing
658 - # host USB devices yet
659 - use kernel_FreeBSD && \
660 - sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
661 -}
662 -
663 -src_configure() {
664 - local target
665 -
666 - python_setup
667 -
668 - softmmu_targets= softmmu_bins=()
669 - user_targets= user_bins=()
670 -
671 - for target in ${IUSE_SOFTMMU_TARGETS} ; do
672 - if use "qemu_softmmu_targets_${target}"; then
673 - softmmu_targets+=",${target}-softmmu"
674 - softmmu_bins+=( "qemu-system-${target}" )
675 - fi
676 - done
677 -
678 - for target in ${IUSE_USER_TARGETS} ; do
679 - if use "qemu_user_targets_${target}"; then
680 - user_targets+=",${target}-linux-user"
681 - user_bins+=( "qemu-${target}" )
682 - fi
683 - done
684 -
685 - softmmu_targets=${softmmu_targets#,}
686 - user_targets=${user_targets#,}
687 -
688 - [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
689 - [[ -n ${user_targets} ]] && qemu_src_configure "user"
690 - qemu_src_configure "tools"
691 -}
692 -
693 -src_compile() {
694 - if [[ -n ${user_targets} ]]; then
695 - cd "${S}/user-build"
696 - default
697 - fi
698 -
699 - if [[ -n ${softmmu_targets} ]]; then
700 - cd "${S}/softmmu-build"
701 - default
702 - fi
703 -
704 - cd "${S}/tools-build"
705 - default
706 -}
707 -
708 -src_test() {
709 - if [[ -n ${softmmu_targets} ]]; then
710 - cd "${S}/softmmu-build"
711 - pax-mark m */qemu-system-* #515550
712 - emake check
713 - fi
714 -}
715 -
716 -qemu_python_install() {
717 - python_domodule "${S}/python/qemu"
718 -
719 - python_doscript "${S}/scripts/kvm/vmxcap"
720 - python_doscript "${S}/scripts/qmp/qmp-shell"
721 - python_doscript "${S}/scripts/qmp/qemu-ga-client"
722 -}
723 -
724 -# Generate binfmt support files.
725 -# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc)
726 -# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt)
727 -generate_initd() {
728 - local out="${T}/qemu-binfmt"
729 - local out_systemd="${T}/qemu.conf"
730 - local d="${T}/binfmt.d"
731 -
732 - einfo "Generating qemu binfmt scripts and configuration files"
733 -
734 - # Generate the debian fragments first.
735 - mkdir -p "${d}"
736 - "${S}"/scripts/qemu-binfmt-conf.sh \
737 - --debian \
738 - --exportdir "${d}" \
739 - --qemu-path "${EPREFIX}/usr/bin" \
740 - || die
741 - # Then turn the fragments into a shell script we can source.
742 - sed -E -i \
743 - -e 's:^([^ ]+) (.*)$:\1="\2":' \
744 - "${d}"/* || die
745 -
746 - # Generate the init.d script by assembling the fragments from above.
747 - local f qcpu package interpreter magic mask
748 - cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die
749 - for f in "${d}"/qemu-* ; do
750 - source "${f}"
751 -
752 - # Normalize the cpu logic like we do in the init.d for the native cpu.
753 - qcpu=${package#qemu-}
754 - case ${qcpu} in
755 - arm*) qcpu="arm";;
756 - mips*) qcpu="mips";;
757 - ppc*) qcpu="ppc";;
758 - s390*) qcpu="s390";;
759 - sh*) qcpu="sh";;
760 - sparc*) qcpu="sparc";;
761 - esac
762 -
763 - # we use 'printf' here to be portable across 'sh'
764 - # implementations: #679168
765 - cat <<EOF >>"${out}"
766 - if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then
767 - printf '%s\n' ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register
768 - fi
769 -EOF
770 -
771 - echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}"
772 -
773 - done
774 - cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die
775 -}
776 -
777 -src_install() {
778 - if [[ -n ${user_targets} ]]; then
779 - cd "${S}/user-build"
780 - emake DESTDIR="${ED}" install
781 -
782 - # Install binfmt handler init script for user targets.
783 - generate_initd
784 - doinitd "${T}/qemu-binfmt"
785 -
786 - # Install binfmt/qemu.conf.
787 - insinto "/usr/share/qemu/binfmt.d"
788 - doins "${T}/qemu.conf"
789 - fi
790 -
791 - if [[ -n ${softmmu_targets} ]]; then
792 - cd "${S}/softmmu-build"
793 - emake DESTDIR="${ED}" install
794 -
795 - # This might not exist if the test failed. #512010
796 - [[ -e check-report.html ]] && dodoc check-report.html
797 -
798 - if use kernel_linux; then
799 - udev_newrules "${FILESDIR}"/65-kvm.rules-r2 65-kvm.rules
800 - fi
801 -
802 - if use python; then
803 - python_foreach_impl qemu_python_install
804 - fi
805 - fi
806 -
807 - cd "${S}/tools-build"
808 - emake DESTDIR="${ED}" install
809 -
810 - # Disable mprotect on the qemu binaries as they use JITs to be fast #459348
811 - pushd "${ED}"/usr/bin >/dev/null
812 - pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594
813 - popd >/dev/null
814 -
815 - # Install config file example for qemu-bridge-helper
816 - insinto "/etc/qemu"
817 - doins "${FILESDIR}/bridge.conf"
818 -
819 - cd "${S}"
820 - dodoc MAINTAINERS docs/specs/pci-ids.txt
821 - newdoc pc-bios/README README.pc-bios
822 -
823 - # Disallow stripping of prebuilt firmware files.
824 - dostrip -x ${QA_PREBUILT}
825 -
826 - if [[ -n ${softmmu_targets} ]]; then
827 - # Remove SeaBIOS since we're using the SeaBIOS packaged one
828 - rm "${ED}/usr/share/qemu/bios.bin"
829 - rm "${ED}/usr/share/qemu/bios-256k.bin"
830 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
831 - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
832 - dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin
833 - fi
834 -
835 - # Remove vgabios since we're using the seavgabios packaged one
836 - rm "${ED}/usr/share/qemu/vgabios.bin"
837 - rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
838 - rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
839 - rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
840 - rm "${ED}/usr/share/qemu/vgabios-virtio.bin"
841 - rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
842 - # PPC/PPC64 loads vgabios-stdvga
843 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then
844 - dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin
845 - dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
846 - dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
847 - dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
848 - dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin
849 - dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
850 - fi
851 -
852 - # Remove sgabios since we're using the sgabios packaged one
853 - rm "${ED}/usr/share/qemu/sgabios.bin"
854 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
855 - dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
856 - fi
857 -
858 - # Remove iPXE since we're using the iPXE packaged one
859 - rm "${ED}"/usr/share/qemu/pxe-*.rom
860 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
861 - dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
862 - dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
863 - dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
864 - dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
865 - dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
866 - dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
867 - fi
868 - fi
869 -
870 - DISABLE_AUTOFORMATTING=true
871 - readme.gentoo_create_doc
872 -}
873 -
874 -firmware_abi_change() {
875 - local pv
876 - for pv in ${REPLACING_VERSIONS}; do
877 - if ver_test ${pv} -lt ${FIRMWARE_ABI_VERSION}; then
878 - return 0
879 - fi
880 - done
881 - return 1
882 -}
883 -
884 -pkg_postinst() {
885 - if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
886 - udev_reload
887 - fi
888 -
889 - xdg_icon_cache_update
890 -
891 - [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \
892 - fcaps cap_net_admin ${EROOT}/usr/libexec/qemu-bridge-helper
893 -
894 - DISABLE_AUTOFORMATTING=true
895 - readme.gentoo_print_elog
896 -
897 - if use pin-upstream-blobs && firmware_abi_change; then
898 - ewarn "This version of qemu pins new versions of firmware blobs:"
899 - ewarn " $(best_version sys-firmware/edk2-ovmf)"
900 - ewarn " $(best_version sys-firmware/ipxe)"
901 - ewarn " $(best_version sys-firmware/seabios)"
902 - ewarn " $(best_version sys-firmware/sgabios)"
903 - ewarn "This might break resume of hibernated guests (started with a different"
904 - ewarn "firmware version) and live migration to/from qemu versions with different"
905 - ewarn "firmware. Please (cold) restart all running guests. For functional"
906 - ewarn "guest migration ensure that all"
907 - ewarn "hosts run at least"
908 - ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}."
909 - fi
910 -}
911 -
912 -pkg_info() {
913 - echo "Using:"
914 - echo " $(best_version app-emulation/spice-protocol)"
915 - echo " $(best_version sys-firmware/edk2-ovmf)"
916 - if has_version 'sys-firmware/edk2-ovmf[binary]'; then
917 - echo " USE=binary"
918 - else
919 - echo " USE=''"
920 - fi
921 - echo " $(best_version sys-firmware/ipxe)"
922 - echo " $(best_version sys-firmware/seabios)"
923 - if has_version 'sys-firmware/seabios[binary]'; then
924 - echo " USE=binary"
925 - else
926 - echo " USE=''"
927 - fi
928 - echo " $(best_version sys-firmware/sgabios)"
929 -}
930 -
931 -pkg_postrm() {
932 - xdg_icon_cache_update
933 -}
934
935 diff --git a/profiles/package.mask b/profiles/package.mask
936 index 4b185cbfd41a..b15964a21a32 100644
937 --- a/profiles/package.mask
938 +++ b/profiles/package.mask
939 @@ -652,10 +652,6 @@ x11-drivers/nvidia-drivers:0/vulkan
940 # https://bugs.exim.org/show_bug.cgi?id=2813
941 =mail-mta/exim-4.95
942
943 -# John Helmert III <ajak@g.o> (2021-09-29)
944 -# VM image data corruption bug, causing I/O errors in VMs. Bug #815379
945 -=app-emulation/qemu-6.1.0-r1
946 -
947 # Mart Raudsepp <leio@g.o> (2021-09-24)
948 # Experimental split media-sound/pulseaudio packages, bug #536780.
949 media-libs/libpulse