diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-08-24 16:41:20 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-07 07:53:50 +0100 |
commit | f694084dbc48b49c9d9ebdc0f5b6d13b29176708 (patch) | |
tree | 01538313c45d9ba92a0c7c524e410e3601ba8e0c /meta/recipes-devtools/qemu | |
parent | dd2e4f417cce355185b33c7fe61a02c7f488c428 (diff) | |
download | poky-f694084dbc48b49c9d9ebdc0f5b6d13b29176708.tar.gz |
qemu: Upgrade 8.0.4 -> 8.1.0
This upgrade isn't straighforward as upstream made changes. A pyenv
is now needed containing meson. This doesn't work for us for reasons
as yet unclear however it does mean we need python3native inherited
for that to stand a chance of working as otherwise host system
dependencies may be missing. For now, allow meson to work from our
sysroot via a patch. Our meson is always deterministic anyway so
we don't need their help for that.
The submodules approach used previously has changed, switch the options
for new ones to disable downloads and docs.
Some of the images binaries shipped for s390 show QA warnings for
relocations in code sections. Drop those binaries to avoid the QA
warnings since we don't need them anyway.
Drop a backported patch and refresh another.
(From OE-Core rev: a7176c3b2a7e2041b9be5dabb6b0f1e62f235f76)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu-native_8.1.0.bb (renamed from meta/recipes-devtools/qemu/qemu-native_8.0.4.bb) | 0 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu-system-native_8.1.0.bb (renamed from meta/recipes-devtools/qemu/qemu-system-native_8.0.4.bb) | 0 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 18 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/0001-tracetool-use-relative-paths-for-line-preprocessor-d.patch | 84 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch | 12 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/fixedmeson.patch | 20 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu_8.1.0.bb (renamed from meta/recipes-devtools/qemu/qemu_8.0.4.bb) | 0 |
7 files changed, 37 insertions, 97 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-native_8.0.4.bb b/meta/recipes-devtools/qemu/qemu-native_8.1.0.bb index 73a0f63f2b..73a0f63f2b 100644 --- a/meta/recipes-devtools/qemu/qemu-native_8.0.4.bb +++ b/meta/recipes-devtools/qemu/qemu-native_8.1.0.bb | |||
diff --git a/meta/recipes-devtools/qemu/qemu-system-native_8.0.4.bb b/meta/recipes-devtools/qemu/qemu-system-native_8.1.0.bb index 04c7c2a6ac..04c7c2a6ac 100644 --- a/meta/recipes-devtools/qemu/qemu-system-native_8.0.4.bb +++ b/meta/recipes-devtools/qemu/qemu-system-native_8.1.0.bb | |||
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index b98169c243..131162dd62 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc | |||
@@ -9,7 +9,9 @@ LICENSE = "GPL-2.0-only & LGPL-2.1-only" | |||
9 | RDEPENDS:${PN}-ptest = "bash" | 9 | RDEPENDS:${PN}-ptest = "bash" |
10 | 10 | ||
11 | require qemu-targets.inc | 11 | require qemu-targets.inc |
12 | inherit pkgconfig ptest update-rc.d systemd | 12 | # https://gitlab.com/qemu-project/qemu/-/commit/81e2b198a8cb4ee5fdf108bd438f44b193ee3a36 means |
13 | # we need a full python3-native setup | ||
14 | inherit pkgconfig ptest update-rc.d systemd python3native | ||
13 | 15 | ||
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | 16 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ |
15 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" | 17 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" |
@@ -27,14 +29,13 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ | |||
27 | file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \ | 29 | file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \ |
28 | file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \ | 30 | file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \ |
29 | file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \ | 31 | file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \ |
30 | file://0001-tracetool-use-relative-paths-for-line-preprocessor-d.patch \ | 32 | file://fixedmeson.patch \ |
31 | file://0001-CVE-2023-40360-hw-nvme-fix-null-pointer-access-in-di.patch \ | ||
32 | file://qemu-guest-agent.init \ | 33 | file://qemu-guest-agent.init \ |
33 | file://qemu-guest-agent.udev \ | 34 | file://qemu-guest-agent.udev \ |
34 | " | 35 | " |
35 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | 36 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" |
36 | 37 | ||
37 | SRC_URI[sha256sum] = "81c817dda38af958be5bef1a6cf55b658bb2d3fb87c1e6a571de6b7b2c44516c" | 38 | SRC_URI[sha256sum] = "710c101198e334d4762eef65f649bc43fa8a5dd75303554b8acfec3eb25f0e55" |
38 | 39 | ||
39 | SRC_URI:append:class-target = " file://cross.patch" | 40 | SRC_URI:append:class-target = " file://cross.patch" |
40 | SRC_URI:append:class-nativesdk = " file://cross.patch" | 41 | SRC_URI:append:class-nativesdk = " file://cross.patch" |
@@ -105,9 +106,8 @@ EXTRA_OECONF = " \ | |||
105 | --disable-werror \ | 106 | --disable-werror \ |
106 | --extra-cflags='${CFLAGS}' \ | 107 | --extra-cflags='${CFLAGS}' \ |
107 | --extra-ldflags='${LDFLAGS}' \ | 108 | --extra-ldflags='${LDFLAGS}' \ |
108 | --with-git=/bin/false \ | 109 | --disable-download \ |
109 | --with-git-submodules=ignore \ | 110 | --disable-docs \ |
110 | --meson=meson \ | ||
111 | ${PACKAGECONFIG_CONFARGS} \ | 111 | ${PACKAGECONFIG_CONFARGS} \ |
112 | " | 112 | " |
113 | 113 | ||
@@ -145,6 +145,10 @@ do_install () { | |||
145 | install -m 0644 ${S}/contrib/systemd/qemu-guest-agent.service ${D}${systemd_unitdir}/system | 145 | install -m 0644 ${S}/contrib/systemd/qemu-guest-agent.service ${D}${systemd_unitdir}/system |
146 | sed -i -e 's,-/usr/bin/,-${bindir}/,g' ${D}${systemd_unitdir}/system/qemu-guest-agent.service | 146 | sed -i -e 's,-/usr/bin/,-${bindir}/,g' ${D}${systemd_unitdir}/system/qemu-guest-agent.service |
147 | fi | 147 | fi |
148 | # ELF binary /usr/share/qemu/s390-netboot.img has relocations in .text | ||
149 | rm ${D}${datadir}/qemu/s390-netboot.img -f | ||
150 | # ELF binary /usr/share/qemu/s390-ccw.img has relocations in .text [textrel] | ||
151 | rm ${D}${datadir}/qemu/s390-ccw.img -f | ||
148 | } | 152 | } |
149 | 153 | ||
150 | # The following fragment will create a wrapper for qemu-mips user emulation | 154 | # The following fragment will create a wrapper for qemu-mips user emulation |
diff --git a/meta/recipes-devtools/qemu/qemu/0001-tracetool-use-relative-paths-for-line-preprocessor-d.patch b/meta/recipes-devtools/qemu/qemu/0001-tracetool-use-relative-paths-for-line-preprocessor-d.patch deleted file mode 100644 index 049b9a5105..0000000000 --- a/meta/recipes-devtools/qemu/qemu/0001-tracetool-use-relative-paths-for-line-preprocessor-d.patch +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | From 348ea441db84a211d4fca7ef5544b5cd06a8a872 Mon Sep 17 00:00:00 2001 | ||
2 | From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> | ||
3 | Date: Tue, 4 Apr 2023 15:26:07 +0200 | ||
4 | Subject: [PATCH] tracetool: use relative paths for '#line' preprocessor | ||
5 | directives | ||
6 | |||
7 | The event filename is an absolute path. Convert it to a relative path when | ||
8 | writing '#line' directives, to preserve reproducibility of the generated | ||
9 | output when different base paths are used. | ||
10 | |||
11 | Upstream-Status: Accepted [https://gitlab.com/qemu-project/qemu/-/commit/9d672e290475001fcecdcc9dc79ad088ff89d17f] | ||
12 | |||
13 | --- | ||
14 | scripts/tracetool/backend/ftrace.py | 4 +++- | ||
15 | scripts/tracetool/backend/log.py | 4 +++- | ||
16 | scripts/tracetool/backend/syslog.py | 4 +++- | ||
17 | 3 files changed, 9 insertions(+), 3 deletions(-) | ||
18 | |||
19 | Index: qemu-8.0.0/scripts/tracetool/backend/ftrace.py | ||
20 | =================================================================== | ||
21 | --- qemu-8.0.0.orig/scripts/tracetool/backend/ftrace.py | ||
22 | +++ qemu-8.0.0/scripts/tracetool/backend/ftrace.py | ||
23 | @@ -12,6 +12,8 @@ __maintainer__ = "Stefan Hajnoczi" | ||
24 | __email__ = "stefanha@redhat.com" | ||
25 | |||
26 | |||
27 | +import os.path | ||
28 | + | ||
29 | from tracetool import out | ||
30 | |||
31 | |||
32 | @@ -45,7 +47,7 @@ def generate_h(event, group): | ||
33 | args=event.args, | ||
34 | event_id="TRACE_" + event.name.upper(), | ||
35 | event_lineno=event.lineno, | ||
36 | - event_filename=event.filename, | ||
37 | + event_filename=os.path.relpath(event.filename), | ||
38 | fmt=event.fmt.rstrip("\n"), | ||
39 | argnames=argnames) | ||
40 | |||
41 | Index: qemu-8.0.0/scripts/tracetool/backend/log.py | ||
42 | =================================================================== | ||
43 | --- qemu-8.0.0.orig/scripts/tracetool/backend/log.py | ||
44 | +++ qemu-8.0.0/scripts/tracetool/backend/log.py | ||
45 | @@ -12,6 +12,8 @@ __maintainer__ = "Stefan Hajnoczi" | ||
46 | __email__ = "stefanha@redhat.com" | ||
47 | |||
48 | |||
49 | +import os.path | ||
50 | + | ||
51 | from tracetool import out | ||
52 | |||
53 | |||
54 | @@ -53,7 +55,7 @@ def generate_h(event, group): | ||
55 | ' }', | ||
56 | cond=cond, | ||
57 | event_lineno=event.lineno, | ||
58 | - event_filename=event.filename, | ||
59 | + event_filename=os.path.relpath(event.filename), | ||
60 | name=event.name, | ||
61 | fmt=event.fmt.rstrip("\n"), | ||
62 | argnames=argnames) | ||
63 | Index: qemu-8.0.0/scripts/tracetool/backend/syslog.py | ||
64 | =================================================================== | ||
65 | --- qemu-8.0.0.orig/scripts/tracetool/backend/syslog.py | ||
66 | +++ qemu-8.0.0/scripts/tracetool/backend/syslog.py | ||
67 | @@ -12,6 +12,8 @@ __maintainer__ = "Stefan Hajnoczi" | ||
68 | __email__ = "stefanha@redhat.com" | ||
69 | |||
70 | |||
71 | +import os.path | ||
72 | + | ||
73 | from tracetool import out | ||
74 | |||
75 | |||
76 | @@ -41,7 +43,7 @@ def generate_h(event, group): | ||
77 | ' }', | ||
78 | cond=cond, | ||
79 | event_lineno=event.lineno, | ||
80 | - event_filename=event.filename, | ||
81 | + event_filename=os.path.relpath(event.filename), | ||
82 | name=event.name, | ||
83 | fmt=event.fmt.rstrip("\n"), | ||
84 | argnames=argnames) | ||
diff --git a/meta/recipes-devtools/qemu/qemu/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta/recipes-devtools/qemu/qemu/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch index 02f22143c1..f981a64a54 100644 --- a/meta/recipes-devtools/qemu/qemu/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch +++ b/meta/recipes-devtools/qemu/qemu/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch | |||
@@ -14,16 +14,16 @@ Signed-off-by: He Zhe <zhe.he@windriver.com> | |||
14 | meson.build | 2 +- | 14 | meson.build | 2 +- |
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | 15 | 1 file changed, 1 insertion(+), 1 deletion(-) |
16 | 16 | ||
17 | Index: qemu-8.0.0/meson.build | 17 | Index: qemu-8.1.0/meson.build |
18 | =================================================================== | 18 | =================================================================== |
19 | --- qemu-8.0.0.orig/meson.build | 19 | --- qemu-8.1.0.orig/meson.build |
20 | +++ qemu-8.0.0/meson.build | 20 | +++ qemu-8.1.0/meson.build |
21 | @@ -1213,7 +1213,7 @@ endif | 21 | @@ -1481,7 +1481,7 @@ endif |
22 | if not gnutls_crypto.found() | 22 | if not gnutls_crypto.found() |
23 | if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() | 23 | if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() |
24 | gcrypt = dependency('libgcrypt', version: '>=1.8', | 24 | gcrypt = dependency('libgcrypt', version: '>=1.8', |
25 | - method: 'config-tool', | 25 | - method: 'config-tool', |
26 | + method: 'pkg-config', | 26 | + method: 'pkg-config', |
27 | required: get_option('gcrypt'), | 27 | required: get_option('gcrypt')) |
28 | kwargs: static_kwargs) | ||
29 | # Debian has removed -lgpg-error from libgcrypt-config | 28 | # Debian has removed -lgpg-error from libgcrypt-config |
29 | # as it "spreads unnecessary dependencies" which in | ||
diff --git a/meta/recipes-devtools/qemu/qemu/fixedmeson.patch b/meta/recipes-devtools/qemu/qemu/fixedmeson.patch new file mode 100644 index 0000000000..0cbaea07ca --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/fixedmeson.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Upstream-Status: Inappropriate [workaround, would need a real fix for upstream] | ||
2 | |||
3 | Index: qemu-8.1.0/configure | ||
4 | =================================================================== | ||
5 | --- qemu-8.1.0.orig/configure | ||
6 | +++ qemu-8.1.0/configure | ||
7 | @@ -1032,12 +1032,7 @@ then | ||
8 | exit 1 | ||
9 | fi | ||
10 | |||
11 | -# At this point, we expect Meson to be installed and available. | ||
12 | -# We expect mkvenv or pip to have created pyvenv/bin/meson for us. | ||
13 | -# We ignore PATH completely here: we want to use the venv's Meson | ||
14 | -# *exclusively*. | ||
15 | - | ||
16 | -meson="$(cd pyvenv/bin; pwd)/meson" | ||
17 | +meson=`which meson` | ||
18 | |||
19 | # Conditionally ensure Sphinx is installed. | ||
20 | |||
diff --git a/meta/recipes-devtools/qemu/qemu_8.0.4.bb b/meta/recipes-devtools/qemu/qemu_8.1.0.bb index 84ee0bcc49..84ee0bcc49 100644 --- a/meta/recipes-devtools/qemu/qemu_8.0.4.bb +++ b/meta/recipes-devtools/qemu/qemu_8.1.0.bb | |||