From 25868ee2cc3fdcbf4bff1ff4f66465e8aeef744d Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 4 Feb 2024 21:23:44 +0000 Subject: qemu: Upgrade 8.2.0 -> 8.2.1 This was a bugfix release containing several important fixes according to upstream. Drop a backported patch. (From OE-Core rev: 1715d0907d372e787c054a5509690a2719acfed0) Signed-off-by: Richard Purdie --- meta/recipes-devtools/qemu/qemu-native_8.2.0.bb | 9 ---- meta/recipes-devtools/qemu/qemu-native_8.2.1.bb | 9 ++++ .../qemu/qemu-system-native_8.2.0.bb | 31 -------------- .../qemu/qemu-system-native_8.2.1.bb | 31 ++++++++++++++ meta/recipes-devtools/qemu/qemu.inc | 3 +- ...ner-Replace-basename-with-g_path_get_base.patch | 50 ---------------------- meta/recipes-devtools/qemu/qemu_8.2.0.bb | 27 ------------ meta/recipes-devtools/qemu/qemu_8.2.1.bb | 27 ++++++++++++ 8 files changed, 68 insertions(+), 119 deletions(-) delete mode 100644 meta/recipes-devtools/qemu/qemu-native_8.2.0.bb create mode 100644 meta/recipes-devtools/qemu/qemu-native_8.2.1.bb delete mode 100644 meta/recipes-devtools/qemu/qemu-system-native_8.2.0.bb create mode 100644 meta/recipes-devtools/qemu/qemu-system-native_8.2.1.bb delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-vfio-container-Replace-basename-with-g_path_get_base.patch delete mode 100644 meta/recipes-devtools/qemu/qemu_8.2.0.bb create mode 100644 meta/recipes-devtools/qemu/qemu_8.2.1.bb diff --git a/meta/recipes-devtools/qemu/qemu-native_8.2.0.bb b/meta/recipes-devtools/qemu/qemu-native_8.2.0.bb deleted file mode 100644 index a77953529b..0000000000 --- a/meta/recipes-devtools/qemu/qemu-native_8.2.0.bb +++ /dev/null @@ -1,9 +0,0 @@ -BPN = "qemu" - -DEPENDS += "glib-2.0-native zlib-native" - -require qemu-native.inc - -EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-install-blobs --disable-guest-agent" - -PACKAGECONFIG ??= "pie" diff --git a/meta/recipes-devtools/qemu/qemu-native_8.2.1.bb b/meta/recipes-devtools/qemu/qemu-native_8.2.1.bb new file mode 100644 index 0000000000..a77953529b --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-native_8.2.1.bb @@ -0,0 +1,9 @@ +BPN = "qemu" + +DEPENDS += "glib-2.0-native zlib-native" + +require qemu-native.inc + +EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-install-blobs --disable-guest-agent" + +PACKAGECONFIG ??= "pie" diff --git a/meta/recipes-devtools/qemu/qemu-system-native_8.2.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_8.2.0.bb deleted file mode 100644 index 0634b34242..0000000000 --- a/meta/recipes-devtools/qemu/qemu-system-native_8.2.0.bb +++ /dev/null @@ -1,31 +0,0 @@ -BPN = "qemu" - -require qemu-native.inc - -# As some of the files installed by qemu-native and qemu-system-native -# are the same, we depend on qemu-native to get the full installation set -# and avoid file clashes -DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native" - -EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" - -PACKAGECONFIG ??= "fdt alsa kvm pie slirp png \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ -" - -# Handle distros such as CentOS 5 32-bit that do not have kvm support -PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" - -do_install:append() { - install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu - - # The following is also installed by qemu-native - rm -f ${D}${datadir}/qemu/trace-events-all - rm -rf ${D}${datadir}/qemu/keymaps - rm -rf ${D}${datadir}/icons/ - rm -rf ${D}${includedir}/qemu-plugin.h - - # Install qmp.py to be used with testimage - install -d ${D}${libdir}/qemu-python/qmp/ - install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ -} diff --git a/meta/recipes-devtools/qemu/qemu-system-native_8.2.1.bb b/meta/recipes-devtools/qemu/qemu-system-native_8.2.1.bb new file mode 100644 index 0000000000..0634b34242 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-system-native_8.2.1.bb @@ -0,0 +1,31 @@ +BPN = "qemu" + +require qemu-native.inc + +# As some of the files installed by qemu-native and qemu-system-native +# are the same, we depend on qemu-native to get the full installation set +# and avoid file clashes +DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native" + +EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" + +PACKAGECONFIG ??= "fdt alsa kvm pie slirp png \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ +" + +# Handle distros such as CentOS 5 32-bit that do not have kvm support +PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" + +do_install:append() { + install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu + + # The following is also installed by qemu-native + rm -f ${D}${datadir}/qemu/trace-events-all + rm -rf ${D}${datadir}/qemu/keymaps + rm -rf ${D}${datadir}/icons/ + rm -rf ${D}${includedir}/qemu-plugin.h + + # Install qmp.py to be used with testimage + install -d ${D}${libdir}/qemu-python/qmp/ + install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ +} diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 14b975db30..2a81870151 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -32,7 +32,6 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \ file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \ file://fixedmeson.patch \ - file://0001-vfio-container-Replace-basename-with-g_path_get_base.patch \ file://no-pip.patch \ file://fix_segv.patch \ file://qemu-guest-agent.init \ @@ -53,7 +52,7 @@ SRC_URI:append:class-native = " \ file://0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch \ " -SRC_URI[sha256sum] = "bf00d2fa12010df8b0ade93371def58e632cb32a6bfdc5f5a0ff8e6a1fb1bf32" +SRC_URI[sha256sum] = "8562751158175f9d187c5f22b57555abe3c870f0325c8ced12c34c6d987729be" CVE_STATUS[CVE-2017-5957] = "cpe-incorrect: Applies against virglrender < 0.6.0 and not qemu itself" diff --git a/meta/recipes-devtools/qemu/qemu/0001-vfio-container-Replace-basename-with-g_path_get_base.patch b/meta/recipes-devtools/qemu/qemu/0001-vfio-container-Replace-basename-with-g_path_get_base.patch deleted file mode 100644 index ad4f410178..0000000000 --- a/meta/recipes-devtools/qemu/qemu/0001-vfio-container-Replace-basename-with-g_path_get_base.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 213ae3ffda463c0503e39e0cf827511b5298c314 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= -Date: Wed, 20 Dec 2023 14:53:02 +0100 -Subject: [PATCH] vfio/container: Replace basename with g_path_get_basename -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -g_path_get_basename() is a portable utility function that has the -advantage of not modifing the string argument. It also fixes a compile -breakage with the Musl C library reported in [1]. - -[1] https://lore.kernel.org/all/20231212010228.2701544-1-raj.khem@gmail.com/ - -Upstream-Status: Backport [https://github.com/qemu/qemu/commit/213ae3ffda463c0503e39e0cf827511b5298c314] -Reported-by: Khem Raj -Reviewed-by: Eric Auger -Reviewed-by: Zhao Liu -Reviewed-by: Zhenzhong Duan -Signed-off-by: Cédric Le Goater ---- - hw/vfio/container.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/hw/vfio/container.c b/hw/vfio/container.c -index 688cf23bab..8d334f52f2 100644 ---- a/hw/vfio/container.c -+++ b/hw/vfio/container.c -@@ -869,7 +869,8 @@ static void vfio_put_base_device(VFIODevice *vbasedev) - - static int vfio_device_groupid(VFIODevice *vbasedev, Error **errp) - { -- char *tmp, group_path[PATH_MAX], *group_name; -+ char *tmp, group_path[PATH_MAX]; -+ g_autofree char *group_name = NULL; - int ret, groupid; - ssize_t len; - -@@ -885,7 +886,7 @@ static int vfio_device_groupid(VFIODevice *vbasedev, Error **errp) - - group_path[len] = 0; - -- group_name = basename(group_path); -+ group_name = g_path_get_basename(group_path); - if (sscanf(group_name, "%d", &groupid) != 1) { - error_setg_errno(errp, errno, "failed to read %s", group_path); - return -errno; --- -2.43.0 - diff --git a/meta/recipes-devtools/qemu/qemu_8.2.0.bb b/meta/recipes-devtools/qemu/qemu_8.2.0.bb deleted file mode 100644 index dc1352232e..0000000000 --- a/meta/recipes-devtools/qemu/qemu_8.2.0.bb +++ /dev/null @@ -1,27 +0,0 @@ -BBCLASSEXTEND = "nativesdk" - -require qemu.inc - -DEPENDS += "glib-2.0 zlib pixman" - -DEPENDS:append:libc-musl = " libucontext" - -CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" - -RDEPENDS:${PN}-common:class-target += "bash" - -EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" -EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" -EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" - -PACKAGECONFIG ??= " \ - fdt sdl kvm pie slirp \ - ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio xen', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ -" -PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie slirp \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ -" -# ppc32 hosts are no longer supported in qemu -COMPATIBLE_HOST:powerpc = "null" diff --git a/meta/recipes-devtools/qemu/qemu_8.2.1.bb b/meta/recipes-devtools/qemu/qemu_8.2.1.bb new file mode 100644 index 0000000000..dc1352232e --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu_8.2.1.bb @@ -0,0 +1,27 @@ +BBCLASSEXTEND = "nativesdk" + +require qemu.inc + +DEPENDS += "glib-2.0 zlib pixman" + +DEPENDS:append:libc-musl = " libucontext" + +CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" + +RDEPENDS:${PN}-common:class-target += "bash" + +EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" +EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" +EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" + +PACKAGECONFIG ??= " \ + fdt sdl kvm pie slirp \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio xen', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ +" +PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie slirp \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ +" +# ppc32 hosts are no longer supported in qemu +COMPATIBLE_HOST:powerpc = "null" -- cgit v1.2.3-54-g00ecf