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/
Date: Tue, 06 Sep 2022 22:39:05
Message-Id: 1662503935.8e601119d1090f1db6f42ddae27eada7e89f1fb6.ajak@gentoo
1 commit: 8e601119d1090f1db6f42ddae27eada7e89f1fb6
2 Author: John Helmert III <ajak <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 7 16:24:39 2022 +0000
4 Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 6 22:38:55 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e601119
7
8 app-emulation/qemu: sync live
9
10 Pulled in Hello71's meson fixes here, so thanks to them too.
11
12 Thanks-To: Alex Xu (Hello71) <alex_y_xu <AT> yahoo.ca>
13 Closes: https://github.com/gentoo/gentoo/pull/26121
14 Closes: https://github.com/gentoo/gentoo/pull/26764
15 Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
16
17 app-emulation/qemu/qemu-9999.ebuild | 103 ++++++++++++++++++++++++------------
18 1 file changed, 70 insertions(+), 33 deletions(-)
19
20 diff --git a/app-emulation/qemu/qemu-9999.ebuild b/app-emulation/qemu/qemu-9999.ebuild
21 index e4f37bb04fdd..9ec29aa9430e 100644
22 --- a/app-emulation/qemu/qemu-9999.ebuild
23 +++ b/app-emulation/qemu/qemu-9999.ebuild
24 @@ -17,7 +17,7 @@ QEMU_DOC_USEFLAG="+doc"
25 PYTHON_COMPAT=( python3_{8,9,10} )
26 PYTHON_REQ_USE="ncurses,readline"
27
28 -FIRMWARE_ABI_VERSION="7.0.0"
29 +FIRMWARE_ABI_VERSION="7.1.0"
30
31 inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \
32 pax-utils xdg-utils
33 @@ -27,7 +27,6 @@ if [[ ${PV} == *9999* ]]; then
34
35 EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/"
36 EGIT_SUBMODULES=(
37 - meson
38 tests/fp/berkeley-softfloat-3
39 tests/fp/berkeley-testfloat-3
40 ui/keycodemapdb
41 @@ -42,8 +41,8 @@ else
42 SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )"
43 fi
44
45 - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
46 S="${WORKDIR}/${MY_P}"
47 + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
48 fi
49
50 DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
51 @@ -230,34 +229,44 @@ SOFTMMU_TOOLS_DEPEND="
52 zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] )
53 "
54
55 -EDK2_OVMF_VERSION="202105"
56 -SEABIOS_VERSION="1.14.0"
57 +EDK2_OVMF_VERSION="202202"
58 +SEABIOS_VERSION="1.16.0"
59
60 X86_FIRMWARE_DEPEND="
61 pin-upstream-blobs? (
62 - ~sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}[binary]
63 + ~sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION}
64 ~sys-firmware/ipxe-1.21.1[binary,qemu]
65 - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios]
66 + ~sys-firmware/seabios-bin-${SEABIOS_VERSION}
67 ~sys-firmware/sgabios-0.1_pre10[binary]
68 )
69 !pin-upstream-blobs? (
70 - >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}
71 + || (
72 + >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}
73 + >=sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION}
74 + )
75 sys-firmware/ipxe[qemu]
76 - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios]
77 + || (
78 + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios]
79 + >=sys-firmware/seabios-bin-${SEABIOS_VERSION}
80 + )
81 sys-firmware/sgabios
82 )"
83 PPC_FIRMWARE_DEPEND="
84 pin-upstream-blobs? (
85 - ~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios]
86 + ~sys-firmware/seabios-bin-${SEABIOS_VERSION}
87 )
88 !pin-upstream-blobs? (
89 - >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios]
90 + || (
91 + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios]
92 + >=sys-firmware/seabios-bin-${SEABIOS_VERSION}
93 + )
94 )
95 "
96
97 BDEPEND="
98 $(python_gen_impl_dep)
99 dev-lang/perl
100 + dev-util/meson
101 sys-apps/texinfo
102 virtual/pkgconfig
103 doc? (
104 @@ -444,8 +453,8 @@ src_prepare() {
105 # drop it. No change to level of protection b/c we patch our toolchain.
106 sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die
107
108 - # Remove bundled copy of libfdt
109 - rm -r dtc || die
110 + # Remove bundled modules
111 + rm -r dtc meson roms/*/ slirp || die
112 }
113
114 ##
115 @@ -490,7 +499,6 @@ qemu_src_configure() {
116 # are enabled), but it's not really worth the hassle. Disable it
117 # all the time to avoid automatically detecting it. #568856
118 --disable-gcrypt
119 - --python="${PYTHON}"
120 --cc="$(tc-getCC)"
121 --cxx="$(tc-getCXX)"
122 --host-cc="$(tc-getBUILD_CC)"
123 @@ -583,8 +591,8 @@ qemu_src_configure() {
124 $(conf_notuser usbredir usb-redir)
125 $(conf_notuser vde)
126 $(conf_notuser vhost-net)
127 - $(conf_notuser vhost-user-fs)
128 - $(conf_tools vhost-user-fs virtiofsd)
129 + # $(conf_notuser vhost-user-fs)
130 + # $(conf_tools vhost-user-fs virtiofsd)
131 $(conf_notuser virgl virglrenderer)
132 $(conf_softmmu virtfs)
133 $(conf_notuser vnc)
134 @@ -617,7 +625,6 @@ qemu_src_configure() {
135 conf_opts+=(
136 --enable-linux-user
137 --disable-system
138 - --disable-blobs
139 --disable-tools
140 )
141 local static_flag="static-user"
142 @@ -626,9 +633,20 @@ qemu_src_configure() {
143 conf_opts+=(
144 --disable-linux-user
145 --enable-system
146 + --disable-blobs
147 --disable-tools
148 )
149 local static_flag="static"
150 +
151 + for target in ${IUSE_SOFTMMU_TARGETS}; do
152 + if use "qemu_softmmu_targets_${target}"; then
153 + conf_opts+=(
154 + # For some reason, adding this with the setting set
155 + # to on *or* off makes the build always fail.
156 + # --with-devices-${target}=gentoo
157 + )
158 + fi
159 + done
160 ;;
161 tools)
162 conf_opts+=(
163 @@ -680,6 +698,16 @@ src_configure() {
164 if use "qemu_softmmu_targets_${target}"; then
165 softmmu_targets+=",${target}-softmmu"
166 softmmu_bins+=( "qemu-system-${target}" )
167 +
168 + if use vhost-user-fs; then
169 + echo "CONFIG_VHOST_USER_FS=y for ${target}-softmmu" || die
170 + echo "CONFIG_VIRTIO=y" >> "configs/devices/${target}-softmmu/gentoo.mak" || die
171 + echo "CONFIG_VHOST_USER_FS=y" >> "configs/devices/${target}-softmmu/gentoo.mak" || die
172 + else
173 + echo "CONFIG_VHOST_USER_FS=n for ${target}-softmmu" || die
174 + echo "CONFIG_VIRTIO=n" >> "configs/devices/${target}-softmmu/gentoo.mak" || die
175 + echo "CONFIG_VHOST_USER_FS=n" >> "configs/devices/${target}-softmmu/gentoo.mak" || die
176 + fi
177 fi
178 done
179
180 @@ -838,10 +866,7 @@ src_install() {
181
182 if [[ -n ${softmmu_targets} ]]; then
183 # Remove SeaBIOS since we're using the SeaBIOS packaged one
184 - rm "${ED}/usr/share/qemu/bios.bin"
185 - rm "${ED}/usr/share/qemu/bios-256k.bin"
186 if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
187 - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
188 dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin
189 fi
190
191 @@ -852,6 +877,7 @@ src_install() {
192 rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
193 rm "${ED}/usr/share/qemu/vgabios-virtio.bin"
194 rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
195 +
196 # PPC/PPC64 loads vgabios-stdvga
197 if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then
198 dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin
199 @@ -863,13 +889,11 @@ src_install() {
200 fi
201
202 # Remove sgabios since we're using the sgabios packaged one
203 - rm "${ED}/usr/share/qemu/sgabios.bin"
204 if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
205 dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
206 fi
207
208 # Remove iPXE since we're using the iPXE packaged one
209 - rm "${ED}"/usr/share/qemu/pxe-*.rom
210 if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
211 dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
212 dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
213 @@ -909,9 +933,20 @@ pkg_postinst() {
214
215 if use pin-upstream-blobs && firmware_abi_change; then
216 ewarn "This version of qemu pins new versions of firmware blobs:"
217 - ewarn " $(best_version sys-firmware/edk2-ovmf)"
218 +
219 + if has_version 'sys-firmware/edk2-ovmf-bin'; then
220 + ewarn " $(best_version sys-firmware/edk2-ovmf-bin)"
221 + else
222 + ewarn " $(best_version sys-firmware/edk2-ovmf)"
223 + fi
224 +
225 + if has_version 'sys-firmware/seabios-bin'; then
226 + ewarn " $(best_version sys-firmware/seabios-bin)"
227 + else
228 + ewarn " $(best_version sys-firmware/seabios)"
229 + fi
230 +
231 ewarn " $(best_version sys-firmware/ipxe)"
232 - ewarn " $(best_version sys-firmware/seabios)"
233 ewarn " $(best_version sys-firmware/sgabios)"
234 ewarn "This might break resume of hibernated guests (started with a different"
235 ewarn "firmware version) and live migration to/from qemu versions with different"
236 @@ -925,22 +960,24 @@ pkg_postinst() {
237 pkg_info() {
238 echo "Using:"
239 echo " $(best_version app-emulation/spice-protocol)"
240 - echo " $(best_version sys-firmware/edk2-ovmf)"
241 - if has_version 'sys-firmware/edk2-ovmf[binary]'; then
242 - echo " USE=binary"
243 +
244 + if has_version 'sys-firmware/edk2-ovmf-bin'; then
245 + echo " $(best_version sys-firmware/edk2-ovmf-bin)"
246 else
247 - echo " USE=''"
248 + echo " $(best_version sys-firmware/edk2-ovmf)"
249 fi
250 - echo " $(best_version sys-firmware/ipxe)"
251 - echo " $(best_version sys-firmware/seabios)"
252 - if has_version 'sys-firmware/seabios[binary]'; then
253 - echo " USE=binary"
254 +
255 + if has_version 'sys-firmware/seabios-bin'; then
256 + echo " $(best_version sys-firmware/seabios-bin)"
257 else
258 - echo " USE=''"
259 + echo " $(best_version sys-firmware/seabios)"
260 fi
261 +
262 + echo " $(best_version sys-firmware/ipxe)"
263 echo " $(best_version sys-firmware/sgabios)"
264 }
265
266 pkg_postrm() {
267 xdg_icon_cache_update
268 + udev_reload
269 }