Skip to contentSkip to conversation

Patch review

PATCH New Steve Sakoman 1 participant 10 messages Jun 20, 2023

lore
Share & tools
lore
#0 lore raw

cover Patch review

Please review this set of changes for kirkstone and have comments back by end of day Thursday.

Passed a-full on autobuilder:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/5492

The following changes since commit 0e17a5a4f0e3301bf78f77bb5ca4aaf3e4dbc7af:

Revert "ipk: Decode byte data to string in manifest handling" (2023-06-17 05:18:44 -1000)

are available in the Git repository at:

https://git.openembedded.org/openembedded-core-contrib stable/kirkstone-nut
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=stable/kirkstone-nut

Archana Polampalli (1):
nasm: fix CVE-2022-46457

Bruce Ashfield (1):
kernel: don't force PAHOLE=false

Chen Qi (1):
staging.bbclass: do not add extend_recipe_sysroot to prefuncs of
prepare_recipe_sysroot

Lorenzo Arena (1):
conf: add nice level to the hash config ignred variables

Martin Jansa (1):
go.bbclass: don't use test to check output from ls

Pavel Zhukov (1):
lib/terminal.py: Add urxvt terminal

Ranjitsinh Rathod (1):
kmscube: Correct DEPENDS to avoid overwrite

Thomas Roos (1):
oeqa/selftest/cases/devtool.py: skip all tests require folder a git
repo

Wang Mingyu (1):
iso-codes: upgrade 4.13.0 -> 4.15.0

 meta/classes/go.bbclass                       |  2 +-
 meta/classes/kernel.bbclass                   |  2 +-
 meta/classes/staging.bbclass                  |  2 +-
 meta/conf/bitbake.conf                        |  2 +-
 meta/lib/oe/terminal.py                       |  4 ++
 meta/lib/oeqa/selftest/cases/devtool.py       |  8 +++
 .../nasm/nasm/CVE-2022-46457.patch            | 50 +++++++++++++++++++
 meta/recipes-devtools/nasm/nasm_2.15.05.bb    |  1 +
 meta/recipes-graphics/kmscube/kmscube_git.bb  |  3 +-
 ...so-codes_4.13.0.bb => iso-codes_4.15.0.bb} |  2 +-
 10 files changed, 69 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-devtools/nasm/nasm/CVE-2022-46457.patch
 rename meta/recipes-support/iso-codes/{iso-codes_4.13.0.bb => iso-codes_4.15.0.bb} (94%)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/9 nasm: fix CVE-2022-46457

From: Archana Polampalli <[email protected]>

NASM v2.16 was discovered to contain a segmentation violation in the component ieee_write_file at /output/outieee.c.

References:
https://nvd.nist.gov/vuln/detail/CVE-2022-46457

Upstream patches:
https://github.com/netwide-assembler/nasm/commit/c8af73112027fad0ecbb277e9cba257678c405af

---
 .../nasm/nasm/CVE-2022-46457.patch            | 50 +++++++++++++++++++
 meta/recipes-devtools/nasm/nasm_2.15.05.bb    |  1 +
 2 files changed, 51 insertions(+)
 create mode 100644 meta/recipes-devtools/nasm/nasm/CVE-2022-46457.patch
meta/recipes-devtools/nasm/nasm/CVE-2022-46457.patch new file +50 -0
new file mode 100644
index 0000000000..3502d572cd
@@ -0,0 +1,50 @@
+From c8af73112027fad0ecbb277e9cba257678c405af Mon Sep 17 00:00:00 2001
+From: "H. Peter Anvin" <[email protected]>
+Date: Wed, 7 Dec 2022 10:23:46 -0800
+Subject: [PATCH] outieee: fix segfault on empty input
+
+Fix the IEEE backend crashing if the input file is empty.
+
+Signed-off-by: H. Peter Anvin <[email protected]>
+
+Upstream-Status: Backport [https://github.com/netwide-assembler/nasm/commit/c8af73112027fad0ecbb277e9cba257678c405af]
+CVE: CVE-2022-46457
+
+Signed-off-by: Archana Polampalli <[email protected]>
+---
+ output/outieee.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/output/outieee.c b/output/outieee.c
+index cdb8333..8bc5eaa 100644
+--- a/output/outieee.c
++++ b/output/outieee.c
+@@ -919,7 +919,7 @@ static void ieee_write_file(void)
+      * Write the section headers
+      */
+     seg = seghead;
+-    if (!debuginfo && !strcmp(seg->name, "??LINE"))
++    if (!debuginfo && seg && !strcmp(seg->name, "??LINE"))
+         seg = seg->next;
+     while (seg) {
+         char buf[256];
+@@ -954,7 +954,7 @@ static void ieee_write_file(void)
+     /*
+      * write the start address if there is one
+      */
+-    if (ieee_entry_seg) {
++    if (ieee_entry_seg && seghead) {
+         for (seg = seghead; seg; seg = seg->next)
+             if (seg->index == ieee_entry_seg)
+                 break;
+@@ -1067,7 +1067,7 @@ static void ieee_write_file(void)
+      *  put out section data;
+      */
+     seg = seghead;
+-    if (!debuginfo && !strcmp(seg->name, "??LINE"))
++    if (!debuginfo && seg && !strcmp(seg->name, "??LINE"))
+         seg = seg->next;
+     while (seg) {
+         if (seg->currentpos) {
+--
+2.40.0
meta/recipes-devtools/nasm/nasm_2.15.05.bb +1 -0
index 59b1121bd4..bcb7e071d6 100644
@@ -9,6 +9,7 @@ SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \
            file://0001-stdlib-Add-strlcat.patch \
            file://0002-Add-debug-prefix-map-option.patch \
            file://CVE-2022-44370.patch \
+           file://CVE-2022-46457.patch \
            "
 
 SRC_URI[sha256sum] = "3c4b8339e5ab54b1bcb2316101f8985a5da50a3f9e504d43fa6f35668bee2fd0"
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/9 iso-codes: upgrade 4.13.0 -> 4.15.0

In reply to Steve Sakoman

From: Wang Mingyu <[email protected]>

Changelog:
==========
- Translation updates for ISO 3166-1
- Translation updates for ISO 3166-3
- Translation updates for ISO 639-2
- Translation updates for ISO 3166-1
- Translation updates for ISO 3166-2
- Translation updates for ISO 3166-3
- Translation updates for ISO 639-2
- Translation updates for ISO 639-3
- Translation updates for ISO 639-5
- Translation updates for ISO 4217
- Translation updates for ISO 15924
* ISO 3166-2: Fix wrong Spanish translation

(cherry picked from commit 355f2f9fe8a1e6c5e78f136cb3ed77c9004fb75c)
(cherry picked from commit b189240b211e5d8f40747a0128834ed83c38a8f4)
---
 .../iso-codes/{iso-codes_4.13.0.bb => iso-codes_4.15.0.bb}      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-support/iso-codes/{iso-codes_4.13.0.bb => iso-codes_4.15.0.bb} (94%)
meta/recipes-support/iso-codes/iso-codes_4.15.0.bb renamed from meta/recipes-support/iso-codes/iso-codes_4.13.0.bb +1 -1
similarity index 94%
rename from meta/recipes-support/iso-codes/iso-codes_4.13.0.bb
rename to meta/recipes-support/iso-codes/iso-codes_4.15.0.bb
index f3ead5e8c1..b789a99035 100644
@@ -9,7 +9,7 @@ LICENSE = "LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
 SRC_URI = "git://salsa.debian.org/iso-codes-team/iso-codes.git;protocol=https;branch=main;"
-SRCREV = "ab6b01d5b56af7da9f0d2d1619a3cf84e43ed76a"
+SRCREV = "69ba16daef3c5c5e3c18f2d919e25296a4b946be"
 
 # inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
 # are inhibited by allarch
Signature · 1 line
2.34.1
#3 lore raw

PATCH 3/9 go.bbclass: don't use test to check output from ls

In reply to Steve Sakoman

From: Martin Jansa <[email protected]>

* avoids possibly confusing error message in log.do_install like:
ls: cannot access 'etcd/3.5.7-r0/build/bin/linux_arm64/': No such file or directory

(cherry picked from commit 2f1777e6ac5269a71203b6a2c562a43503be95ae)
---
 meta/classes/go.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/go.bbclass +1 -1
index f3d83febbf..d944722309 100644
@@ -122,7 +122,7 @@ go_do_install() {
 	tar -C ${B} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' pkg | \
 		tar -C ${D}${libdir}/go --no-same-owner -xf -
 
-	if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then
+	if ls ${B}/${GO_BUILD_BINDIR}/* >/dev/null 2>/dev/null ; then
 		install -d ${D}${bindir}
 		install -m 0755 ${B}/${GO_BUILD_BINDIR}/* ${D}${bindir}/
 	fi
Signature · 1 line
2.34.1
#4 lore raw

PATCH 4/9 conf: add nice level to the hash config ignred variables

In reply to Steve Sakoman

From: Lorenzo Arena <[email protected]>

This is needed as each user could be setting different nice levels while building, however this should not make the shared cache unusable.

(cherry picked from commit 42784f9360345da1c01d988070253e7ffd5ac4ac)
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/bitbake.conf +1 -1
index 82b115e3a2..8ef4b00d08 100644
@@ -948,7 +948,7 @@ BB_HASHCONFIG_IGNORE_VARS ?= "${BB_HASHEXCLUDE_COMMON} DATE TIME SSH_AGENT_PID \
     PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \
     GIT_PROXY_COMMAND ALL_PROXY all_proxy NO_PROXY no_proxy FTP_PROXY ftp_proxy \
     HTTP_PROXY http_proxy HTTPS_PROXY https_proxy SOCKS5_USER SOCKS5_PASSWD \
-    BB_SETSCENE_ENFORCE BB_CMDLINE BB_SERVER_TIMEOUT"
+    BB_SETSCENE_ENFORCE BB_CMDLINE BB_SERVER_TIMEOUT BB_NICE_LEVEL"
 BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \
     lockfiles vardepsexclude vardeps vardepvalue vardepvalueexclude \
     file-checksums python task nostamp \
Signature · 1 line
2.34.1
#5 lore raw

PATCH 5/9 kernel: don't force PAHOLE=false

In reply to Steve Sakoman

From: Bruce Ashfield <[email protected]>

If a specific kernel provider or configuration wants to enable BTF and pahole analysis, it isn't currently possible due to the explicit definition to false in the base kernel build arguments.

pahole is now detected by the kernel built itself, so unless pahole-native is enabled, the result is the same.

If a kernel does require an explicit disable of pahole, it is better to carry PAHOLE=false in those specific recipes.

(cherry picked from commit b1e4851a36ed47ce6ba880a49264b9a57c78cf4f)
---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
index 3d5422b09e..fc48737869 100644
@@ -232,7 +232,7 @@ KERNEL_EXTRA_ARGS ?= ""
 
 EXTRA_OEMAKE += ' CC="${KERNEL_CC}" LD="${KERNEL_LD}"'
 EXTRA_OEMAKE += ' HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"'
-EXTRA_OEMAKE += ' HOSTCXX="${BUILD_CXX}" HOSTCXXFLAGS="${BUILD_CXXFLAGS}" PAHOLE=false'
+EXTRA_OEMAKE += ' HOSTCXX="${BUILD_CXX}" HOSTCXXFLAGS="${BUILD_CXXFLAGS}"'
 
 KERNEL_ALT_IMAGETYPE ??= ""
 
Signature · 1 line
2.34.1
#6 lore raw

PATCH 6/9 kmscube: Correct DEPENDS to avoid overwrite

In reply to Steve Sakoman

From: Ranjitsinh Rathod <[email protected]>

As part of the below commit, DEPENDS gets overwrite which is wrong

So correct the DEPENDS varibales

(cherry picked from commit 63f338255000874c62bf01ccc11f2c100014c3d9)
---
 meta/recipes-graphics/kmscube/kmscube_git.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-graphics/kmscube/kmscube_git.bb +1 -2
index 58ce26a3d5..98f110527e 100644
@@ -6,7 +6,7 @@ OpenGL or OpenGL ES."
 HOMEPAGE = "https://cgit.freedesktop.org/mesa/kmscube/"
 LICENSE = "MIT"
 SECTION = "graphics"
-DEPENDS = "virtual/libgles3 virtual/libgles2 virtual/egl libdrm"
+DEPENDS = "virtual/libgles3 virtual/libgles2 virtual/egl libdrm virtual/libgbm"
 
 LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb"
 
@@ -20,7 +20,6 @@ S = "${WORKDIR}/git"
 inherit meson pkgconfig features_check
 
 REQUIRED_DISTRO_FEATURES = "opengl"
-DEPENDS = "virtual/libgbm"
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
Signature · 1 line
2.34.1
#7 lore raw

PATCH 7/9 oeqa/selftest/cases/devtool.py: skip all tests require folder a git repo

In reply to Steve Sakoman

From: Thomas Roos <[email protected]>

Devtool selftests require poky dir a git repo, when downloading poky as a tar, this is not the case. Those tests will now skipped.

[YOCTO #12389]

(cherry picked from commit 95a5bc130dc51ea9de95c64dbf0e9c7892415d50)
---
 meta/lib/oeqa/selftest/cases/devtool.py | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/lib/oeqa/selftest/cases/devtool.py +8 -0
index f512ebc0a0..64179d4004 100644
@@ -8,6 +8,7 @@ import shutil
 import tempfile
 import glob
 import fnmatch
+import unittest
 
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
@@ -38,6 +39,13 @@ def setUpModule():
             canonical_layerpath = os.path.realpath(canonical_layerpath) + '/'
             edited_layers.append(layerpath)
             oldmetapath = os.path.realpath(layerpath)
+
+            # when downloading poky from tar.gz some tests will be skipped (BUG 12389)
+            try:
+                runCmd('git rev-parse --is-inside-work-tree', cwd=canonical_layerpath)
+            except:
+                raise unittest.SkipTest("devtool tests require folder to be a git repo")
+
             result = runCmd('git rev-parse --show-toplevel', cwd=canonical_layerpath)
             oldreporoot = result.output.rstrip()
             newmetapath = os.path.join(corecopydir, os.path.relpath(oldmetapath, oldreporoot))
Signature · 1 line
2.34.1
#8 lore raw

PATCH 8/9 staging.bbclass: do not add extend_recipe_sysroot to prefuncs of prepare_recipe_sysroot

In reply to Steve Sakoman

From: Chen Qi <[email protected]>

When running prepare_recipe_sysroot task, the extend_recipe_sysroot is run twice.

What prepare_recipe_sysroot does is executing extend_recipe_sysroot, there's no need to add extend_recipe_sysroot to its prefuncs.

(cherry picked from commit bf7584a2ac16ee46ff5b41536b06bb46d0cbada7)
---
 meta/classes/staging.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/staging.bbclass +1 -1
index 044873c9ae..a78839bdc2 100644
@@ -648,7 +648,7 @@ python staging_taskhandler() {
     bbtasks = e.tasklist
     for task in bbtasks:
         deps = d.getVarFlag(task, "depends")
-        if task == "do_configure" or (deps and "populate_sysroot" in deps):
+        if task != 'do_prepare_recipe_sysroot' and (task == "do_configure" or (deps and "populate_sysroot" in deps)):
             d.prependVarFlag(task, "prefuncs", "extend_recipe_sysroot ")
 }
 staging_taskhandler[eventmask] = "bb.event.RecipeTaskPreProcess"
Signature · 1 line
2.34.1
#9 lore raw

PATCH 9/9 lib/terminal.py: Add urxvt terminal

In reply to Steve Sakoman

From: Pavel Zhukov <[email protected]>

This fixes failure [1] of menuconfig task in rxvt-unicode terminal in case if xterm/Konsole/Gnome is not installed. Tested with rxvt-unicode-256color

[1]
WARNING: Terminal screen is supported but did not start
ERROR: No valid terminal found, unable to open devshell.
Tried the following commands:
tmux split-window -c "{cwd}" "do_terminal"
tmux new-window -c "{cwd}" -n "zephyr-helloworld Configuration" "do_terminal" xfce4-terminal -T "zephyr-helloworld Configuration" -e "do_terminal" terminology -T="zephyr-helloworld Configuration" -e do_terminal mate-terminal --disable-factory -t "zephyr-helloworld Configuration" -x do_terminal konsole --separate --workdir . -p tabtitle="zephyr-helloworld Configuration" -e do_terminal gnome-terminal -t "zephyr-helloworld Configuration" -- do_terminal
xterm -T "zephyr-helloworld Configuration" -e do_terminal
rxvt -T "zephyr-helloworld Configuration" -e do_terminal
tmux new -c "{cwd}" -d -s devshell -n devshell "do_terminal"
screen -D -m -t "zephyr-helloworld Configuration" -S devshell do_terminal
DEBUG: Python function do_menuconfig finished

(cherry picked from commit 8d2fe4df8ae33e033caf4119a76715f085be1d15)
---
 meta/lib/oe/terminal.py | 4 ++++
 1 file changed, 4 insertions(+)
meta/lib/oe/terminal.py +4 -0
index de8dcebf94..b674335654 100644
@@ -102,6 +102,10 @@ class Rxvt(XTerminal):
     command = 'rxvt -T "{title}" -e {command}'
     priority = 1
 
+class URxvt(XTerminal):
+    command = 'urxvt -T "{title}" -e {command}'
+    priority = 1
+
 class Screen(Terminal):
     command = 'screen -D -m -t "{title}" -S devshell {command}'
 
Signature · 1 line
2.34.1