Patch review
cover Patch review
Please review this set of hcanges for kirkstone and have comments back by end of day Tuesday, December 30
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/29/builds/2920
The following changes since commit 2ed3f8b938579dbbb804e04c45a968cc57761db7:
build-appliance-image: Update to kirkstone head revision (2025-12-12 08:52:06 -0800)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/kirkstone-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/kirkstone-nut
Aleksandar Nikolic (1):
scripts/install-buildtools: Update to 4.0.31
Changqing Li (1):
libsoup: fix CVE-2025-12105
Deepesh Varatharajan (1):
binutils: Fix CVE-2025-11494
Kai Kang (1):
qemu: fix CVE-2025-12464
Libo Chen (1):
go: Fix CVE-2023-39323
Liyin Zhang (1):
rsync: fix CVE-2025-10158
Martin Jansa (1):
cross.bbclass: Propagate dependencies to outhash
Mingli Yu (1):
libxslt: Fix CVE-2025-11731
Yash Shinde (2):
binutils: fix CVE-2025-11839
binutils: fix CVE-2025-11840
meta/classes/cross.bbclass | 36 ++++++++++ .../binutils/binutils-2.38.inc | 3 + .../binutils/0048-CVE-2025-11494.patch | 43 ++++++++++++ .../binutils/0049-CVE-2025-11839.patch | 32 +++++++++ .../binutils/0050-CVE-2025-11840.patch | 37 ++++++++++ meta/recipes-devtools/go/go-1.17.13.inc | 1 + .../go/go-1.21/CVE-2023-39323.patch | 55 +++++++++++++++ meta/recipes-devtools/qemu/qemu.inc | 1 + .../qemu/qemu/CVE-2025-12464.patch | 70 +++++++++++++++++++ .../rsync/files/CVE-2025-10158.patch | 36 ++++++++++ meta/recipes-devtools/rsync/rsync_3.2.7.bb | 1 + .../libsoup/libsoup/CVE-2025-12105.patch | 34 +++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 1 + .../libxslt/libxslt/CVE-2025-11731.patch | 42 +++++++++++ .../recipes-support/libxslt/libxslt_1.1.35.bb | 1 + scripts/install-buildtools | 4 +- 16 files changed, 395 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-devtools/binutils/binutils/0048-CVE-2025-11494.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0049-CVE-2025-11839.patch create mode 100644 meta/recipes-devtools/binutils/binutils/0050-CVE-2025-11840.patch create mode 100644 meta/recipes-devtools/go/go-1.21/CVE-2023-39323.patch create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2025-12464.patch create mode 100644 meta/recipes-devtools/rsync/files/CVE-2025-10158.patch create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-12105.patch create mode 100644 meta/recipes-support/libxslt/libxslt/CVE-2025-11731.patch
Signature · 1 line
2.43.0
PATCH 1/10 binutils: Fix CVE-2025-11494
From: Deepesh Varatharajan <[email protected]>
Since x86 .eh_frame section may reference _GLOBAL_OFFSET_TABLE_, keep _GLOBAL_OFFSET_TABLE_ if there is dynamic section and the output .eh_frame section is non-empty.
Backport a patch from upstream to fix CVE-2025-11494
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=b6ac5a8a5b82f0ae6a4642c8d7149b325f4cc60a]
--- .../binutils/binutils-2.38.inc | 1 + .../binutils/0048-CVE-2025-11494.patch | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0048-CVE-2025-11494.patch
meta/recipes-devtools/binutils/binutils-2.38.inc +1 -0
@@ -86,5 +86,6 @@ SRC_URI = "\ file://0047-CVE-2025-8225.patch \ file://CVE-2025-11412.patch \ file://CVE-2025-11413.patch \ + file://0048-CVE-2025-11494.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0048-CVE-2025-11494.patch new file +43 -0
43 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 2/10 qemu: fix CVE-2025-12464
In reply to Steve SakomanFrom: Kai Kang <[email protected]>
Backport patch to fix CVE-2025-12464.
Reference: https://gitlab.com/qemu-project/qemu/-/commit/a01344d9d7
--- meta/recipes-devtools/qemu/qemu.inc | 1 + .../qemu/qemu/CVE-2025-12464.patch | 70 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2025-12464.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
@@ -129,6 +129,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2024-3446-0006.patch \ file://CVE-2024-3447.patch \ file://CVE-2024-8354.patch \ + file://CVE-2025-12464.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/CVE-2025-12464.patch new file +70 -0
70 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 3/10 rsync: fix CVE-2025-10158
In reply to Steve SakomanFrom: Liyin Zhang <[email protected]>
CVE-2025-10158:
A malicious client acting as the receiver of an rsync file transfer can trigger an out of bounds read of a heap based buffer, via a negative array index. The malicious rsync client requires at least read access to the remote rsync module in order to trigger the issue.
Reference:
[https://nvd.nist.gov/vuln/detail/CVE-2025-10158]
Upstream patch:
[https://github.com/RsyncProject/rsync/commit/797e17fc4a6f15e3b1756538a9f812b63942686f]
--- .../rsync/files/CVE-2025-10158.patch | 36 +++++++++++++++++++ meta/recipes-devtools/rsync/rsync_3.2.7.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-devtools/rsync/files/CVE-2025-10158.patch
meta/recipes-devtools/rsync/files/CVE-2025-10158.patch new file +36 -0
@@ -0,0 +1,36 @@ +From a8fabf850c3c5164520c307199e9abc5ded45e4c Mon Sep 17 00:00:00 2001 +From: Andrew Tridgell <[email protected]> +Date: Sat, 23 Aug 2025 17:26:53 +1000 +Subject: [PATCH] fixed an invalid access to files array + +this was found by Calum Hutton from Rapid7. It is a real bug, but +analysis shows it can't be leverged into an exploit. Worth fixing +though. + +Many thanks to Calum and Rapid7 for finding and reporting this + +CVE: CVE-2025-10158 + +Upstream-Status: Backport [https://github.com/RsyncProject/rsync/commit/797e17fc4a6f15e3b1756538a9f812b63942686f] + +Signed-off-by: Liyin Zhang <[email protected]> +--- + sender.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sender.c b/sender.c +index a4d46c39..b1588b70 100644 +--- a/sender.c ++++ b/sender.c +@@ -262,6 +262,8 @@ void send_files(int f_in, int f_out) + + if (ndx - cur_flist->ndx_start >= 0) + file = cur_flist->files[ndx - cur_flist->ndx_start]; ++ else if (cur_flist->parent_ndx < 0) ++ exit_cleanup(RERR_PROTOCOL); + else + file = dir_flist->files[cur_flist->parent_ndx]; + if (F_PATHNAME(file)) { +-- +2.35.5 +
meta/recipes-devtools/rsync/rsync_3.2.7.bb +1 -0
@@ -27,6 +27,7 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \ file://CVE-2024-12087-0003.patch \ file://CVE-2024-12088.patch \ file://CVE-2024-12747.patch \ + file://CVE-2025-10158.patch \ " SRC_URI[sha256sum] = "4e7d9d3f6ed10878c58c5fb724a67dacf4b6aac7340b13e488fb2dc41346f2bb"
Signature · 1 line
2.43.0
PATCH 4/10 go: Fix CVE-2023-39323
In reply to Steve SakomanFrom: Libo Chen <[email protected]>
Line directives ("//line") can be used to bypass the restrictions on "//go:cgo_" directives, allowing blocked linker and compiler flags to be passed during compilation. This can result in unexpected execution of arbitrary code when running "go build". The line directive requires the absolute path of the file in which the directive lives, which makes exploiting this issue significantly more complex.
Made below changes for Go 1.17 backport:
- drop the modifications of test codes
References:
https://nvd.nist.gov/vuln/detail/CVE-2023-39323
Upstream-patch:
https://github.com/golang/go/commit/e7c142a19d8b3944c2f1b9ab7fd94c63d8d0c555
--- meta/recipes-devtools/go/go-1.17.13.inc | 1 + .../go/go-1.21/CVE-2023-39323.patch | 55 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 meta/recipes-devtools/go/go-1.21/CVE-2023-39323.patch
meta/recipes-devtools/go/go-1.17.13.inc +1 -0
@@ -73,6 +73,7 @@ SRC_URI = "https://golang.org/dl/go${PV}.src.tar.gz;name=main \ file://CVE-2025-58189.patch \ file://CVE-2025-61723.patch \ file://CVE-2025-61724.patch \ + file://CVE-2023-39323.patch \ " SRC_URI[main.sha256sum] = "a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd300fd"
meta/recipes-devtools/go/go-1.21/CVE-2023-39323.patch new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 5/10 binutils: fix CVE-2025-11839
In reply to Steve SakomanFrom: Yash Shinde <[email protected]>
CVE-2025-11839
PR 33448
[BUG] Aborted in tg_tag_type at prdbg.c:2452
Remove call to abort in the DGB debug format printing code, thus allowing the display of a fuzzed input file to complete without triggering an abort.
https://sourceware.org/bugzilla/show_bug.cgi?id=33448
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=12ef7d5b7b02d0023db645d86eb9d0797bc747fe]
--- .../binutils/binutils-2.38.inc | 1 + .../binutils/0049-CVE-2025-11839.patch | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0049-CVE-2025-11839.patch
meta/recipes-devtools/binutils/binutils-2.38.inc +1 -0
@@ -87,5 +87,6 @@ SRC_URI = "\ file://CVE-2025-11412.patch \ file://CVE-2025-11413.patch \ file://0048-CVE-2025-11494.patch \ + file://0049-CVE-2025-11839.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0049-CVE-2025-11839.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 12ef7d5b7b02d0023db645d86eb9d0797bc747fe Mon Sep 17 00:00:00 2001 +From: Nick Clifton <[email protected]> +Date: Mon, 3 Nov 2025 11:49:02 +0000 +Subject: [PATCH] Remove call to abort in the DGB debug format printing code, + thus allowing the display of a fuzzed input file to complete without + triggering an abort. + +PR 33448 +--- + binutils/prdbg.c | 1 - + 1 file changed, 1 deletion(-) + +Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=12ef7d5b7b02d0023db645d86eb9d0797bc747fe] +CVE: CVE-2025-11839 + +Signed-off-by: Yash Shinde <[email protected]> + +diff --git a/binutils/prdbg.c b/binutils/prdbg.c +index c239aeb1a79..5d405c48e3d 100644 +--- a/binutils/prdbg.c ++++ b/binutils/prdbg.c +@@ -2449,7 +2449,6 @@ tg_tag_type (void *p, const char *name, unsigned int id, + t = "union class "; + break; + default: +- abort (); + return false; + } + +-- +2.43.7 +
Signature · 1 line
2.43.0
PATCH 6/10 binutils: fix CVE-2025-11840
In reply to Steve SakomanFrom: Yash Shinde <[email protected]>
CVE-2025-11840
PR 33455
[BUG] A SEGV in vfinfo at ldmisc.c:527
A reloc howto set up with EMPTY_HOWTO has a NULL name. More than one place emitting diagnostics assumes a reloc howto won't have a NULL name.
https://sourceware.org/bugzilla/show_bug.cgi?id=33455
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=f6b0f53a36820da91eadfa9f466c22f92e4256e0]
--- .../binutils/binutils-2.38.inc | 1 + .../binutils/0050-CVE-2025-11840.patch | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0050-CVE-2025-11840.patch
meta/recipes-devtools/binutils/binutils-2.38.inc +1 -0
@@ -88,5 +88,6 @@ SRC_URI = "\ file://CVE-2025-11413.patch \ file://0048-CVE-2025-11494.patch \ file://0049-CVE-2025-11839.patch \ + file://0050-CVE-2025-11840.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0050-CVE-2025-11840.patch new file +37 -0
@@ -0,0 +1,37 @@ +From f6b0f53a36820da91eadfa9f466c22f92e4256e0 Mon Sep 17 00:00:00 2001 +From: Alan Modra <[email protected]> +Date: Mon, 3 Nov 2025 09:03:37 +1030 +Subject: [PATCH] PR 33455 SEGV in vfinfo at ldmisc.c:527 + +A reloc howto set up with EMPTY_HOWTO has a NULL name. More than one +place emitting diagnostics assumes a reloc howto won't have a NULL +name. + + PR 33455 + * coffcode.h (coff_slurp_reloc_table): Don't allow a howto with + a NULL name. +--- + bfd/coffcode.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=f6b0f53a36820da91eadfa9f466c22f92e4256e0] +CVE: CVE-2025-11840 + +Signed-off-by: Yash Shinde <[email protected]> + +diff --git a/bfd/coffcode.h b/bfd/coffcode.h +index 1e5acc0032c..ce1e39131b4 100644 +--- a/bfd/coffcode.h ++++ b/bfd/coffcode.h +@@ -5345,7 +5345,7 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols) + RTYPE2HOWTO (cache_ptr, &dst); + #endif /* RELOC_PROCESSING */ + +- if (cache_ptr->howto == NULL) ++ if (cache_ptr->howto == NULL || cache_ptr->howto->name == NULL) + { + _bfd_error_handler + /* xgettext:c-format */ +-- +2.43.7 +
Signature · 1 line
2.43.0
PATCH 7/10 libxslt: Fix CVE-2025-11731
In reply to Steve SakomanFrom: Mingli Yu <[email protected]>
Backport patch [1] to fix CVE-2025-11731.
[1] https://gitlab.gnome.org/GNOME/libxslt/-/commit/fe508f201efb9ea37bfbe95413b8b28251497de3
--- .../libxslt/libxslt/CVE-2025-11731.patch | 42 +++++++++++++++++++ .../recipes-support/libxslt/libxslt_1.1.35.bb | 1 + 2 files changed, 43 insertions(+) create mode 100644 meta/recipes-support/libxslt/libxslt/CVE-2025-11731.patch
meta/recipes-support/libxslt/libxslt/CVE-2025-11731.patch new file +42 -0
@@ -0,0 +1,42 @@ +From fe508f201efb9ea37bfbe95413b8b28251497de3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= <[email protected]> +Date: Wed, 27 Aug 2025 14:28:40 +0300 +Subject: [PATCH] End function node ancestor search at document + +Avoids dereferencing a non-existent ->ns property on an +XML_DOCUMENT_NODE pointer. + +Fixes #151. + +CVE: CVE-2025-11731 + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxslt/-/commit/fe508f201efb9ea37bfbe95413b8b28251497de3] + +Signed-off-by: Mingli Yu <[email protected]> +--- + libexslt/functions.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/libexslt/functions.c b/libexslt/functions.c +index 8d35a7ae..a54ee70c 100644 +--- a/libexslt/functions.c ++++ b/libexslt/functions.c +@@ -617,8 +617,13 @@ exsltFuncResultComp (xsltStylesheetPtr style, xmlNodePtr inst, + * instanciation of a func:result element. + */ + for (test = inst->parent; test != NULL; test = test->parent) { +- if (IS_XSLT_ELEM(test) && +- IS_XSLT_NAME(test, "stylesheet")) { ++ if (/* Traversal has reached the top-level document without ++ * finding a func:function ancestor. */ ++ (test != NULL && test->type == XML_DOCUMENT_NODE) || ++ /* Traversal reached a stylesheet-namespace node, ++ * and has left the function namespace. */ ++ (IS_XSLT_ELEM(test) && ++ IS_XSLT_NAME(test, "stylesheet"))) { + xsltGenericError(xsltGenericErrorContext, + "func:result element not a descendant " + "of a func:function\n"); +-- +2.34.1 +
meta/recipes-support/libxslt/libxslt_1.1.35.bb +1 -0
@@ -22,6 +22,7 @@ SRC_URI = "${GNOME_MIRROR}/libxslt/1.1/libxslt-${PV}.tar.xz \ file://CVE-2023-40403-004.patch \ file://CVE-2023-40403-005.patch \ file://CVE-2025-7424.patch \ + file://CVE-2025-11731.patch \ " SRC_URI[sha256sum] = "8247f33e9a872c6ac859aa45018bc4c4d00b97e2feac9eebc10c93ce1f34dd79"
Signature · 1 line
2.43.0
PATCH 8/10 libsoup: fix CVE-2025-12105
In reply to Steve SakomanFrom: Changqing Li <[email protected]>
Refer:
https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/481
--- .../libsoup/libsoup/CVE-2025-12105.patch | 34 +++++++++++++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-12105.patch
meta/recipes-support/libsoup/libsoup/CVE-2025-12105.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 465410f833e4288ad053b4e18d5fa6c3be3148e1 Mon Sep 17 00:00:00 2001 +From: Eugene Mutavchi <[email protected]> +Date: Fri, 10 Oct 2025 16:24:27 +0000 +Subject: [PATCH] fix 'heap-use-after-free' caused by 'finishing' queue item + twice + +CVE: CVE-2025-12105 +Upsteam-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/9ba1243a24e442fa5ec44684617a4480027da960] + +Signed-off-by: Changqing Li <[email protected]> +--- + libsoup/soup-session.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c +index 5f2929f..b9f3e42 100644 +--- a/libsoup/soup-session.c ++++ b/libsoup/soup-session.c +@@ -3093,8 +3093,10 @@ run_until_read_done (SoupMessage *msg, + if (soup_message_io_in_progress (msg)) + soup_message_io_finished (msg); + item->paused = FALSE; +- item->state = SOUP_MESSAGE_FINISHING; +- soup_session_process_queue_item (item->session, item, NULL, FALSE); ++ if (item->state != SOUP_MESSAGE_FINISHED) { ++ item->state = SOUP_MESSAGE_FINISHING; ++ soup_session_process_queue_item (item->session, item, NULL, FALSE); ++ } + } + async_send_request_return_result (item, NULL, error); + } +-- +2.34.1 +
meta/recipes-support/libsoup/libsoup_3.0.7.bb +1 -0
@@ -45,6 +45,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-46421.patch \ file://CVE-2025-4948.patch \ file://CVE-2025-4945.patch \ + file://CVE-2025-12105.patch \ " SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8"
Signature · 1 line
2.43.0
PATCH 9/10 scripts/install-buildtools: Update to 4.0.31
In reply to Steve SakomanFrom: Aleksandar Nikolic <[email protected]>
Update to the 4.0.31 release of the 4.0 series for buildtools
--- scripts/install-buildtools | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/install-buildtools +2 -2
@@ -57,8 +57,8 @@ logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout) DEFAULT_INSTALL_DIR = os.path.join(os.path.split(scripts_path)[0],'buildtools') DEFAULT_BASE_URL = 'https://downloads.yoctoproject.org/releases/yocto' -DEFAULT_RELEASE = 'yocto-4.0.30' -DEFAULT_INSTALLER_VERSION = '4.0.30' +DEFAULT_RELEASE = 'yocto-4.0.31' +DEFAULT_INSTALLER_VERSION = '4.0.31' DEFAULT_BUILDDATE = '202110XX' # Python version sanity check
Signature · 1 line
2.43.0
PATCH 10/10 cross.bbclass: Propagate dependencies to outhash
In reply to Steve SakomanFrom: Martin Jansa <[email protected]>
Similar to what native and staging is doing since:
https://git.openembedded.org/openembedded-core/commit/meta/classes/native.bbclass?id=d6c7b9f4f0e61fa6546d3644e27abe3e96f597e2
https://git.openembedded.org/openembedded-core/commit/meta/classes/staging.bbclass?id=1cf62882bbac543960e4815d117ffce0e53bda07
Cross task outputs can call native dependencies and even when cross recipe output doesn't change it might produce different results when the called native dependency is changed, e.g. clang-cross-${TARGET_ARCH} contains symlink to clang binary from clang-native, but when clang-native outhash is changed, clang-cross-${TARGET_ARCH} will still be considered equivalent and target recipes aren't rebuilt with new clang binary, see work around in https://github.com/kraj/meta-clang/pull/1140 to make target recipes to depend directly not only on clang-cross-${TARGET_ARCH} but clang-native as well.
I have added a small testcase in meta-selftest which demostrates this issue. Not included in this change, but will send it if useful.
openembedded-core $ ls -1 meta-selftest/recipes-devtools/hashequiv-test/ print-datetime-link-cross.bb
print-datetime-link-native.bb
print-datetime-native.bb
print-datetime-usecross.bb
print-datetime-usenative.bb
print-datetime-native provides script which prints defined PRINT_DATETIME variable.
print-datetime-link-native and print-datetime-link-cross both provide a symlink to the script from print-datetime-native.
print-datetime-usenative and print-datetime-usecross are target recipes using the native and cross versions of print-datetime-link-* recipe.
# clean build all is rebuilt: $ bitbake -k print-datetime-usenative print-datetime-usecross WARNING: print-datetime-native-1.0-r0 do_install: print-datetime-native current DATETIME in script is 2025-11-13_20_05 WARNING: print-datetime-link-native-1.0-r0 do_install: print-datetime-link-native current DATETIME in symlink is 2025-11-13_20_05 WARNING: print-datetime-link-cross-x86_64-1.0-r0 do_install: print-datetime-link-cross-x86_64 current DATETIME in symlink is 2025-11-13_20_05 WARNING: print-datetime-usenative-1.0-r0 do_install: print-datetime-usenative current DATETIME from print-datetime-link is 2025-11-13_20_05 WARNING: print-datetime-usecross-1.0-r0 do_install: print-datetime-usecross current DATETIME from print-datetime-link is 2025-11-13_20_05
# keep sstate-cache and hashserv.db: # print-datetime-usenative is correctly rebuilt, because print-datetime-link-native has different hash (because print-datetime-native hash changed) # print-datetime-usecross wasn't rebuilt, because print-datetime-link-cross-x86_64 doesn't include the changed hash of print-datetime-native $ bitbake -k print-datetime-usenative print-datetime-usecross WARNING: print-datetime-native-1.0-r0 do_install: print-datetime-native current DATETIME in script is 2025-11-13_20_07 WARNING: print-datetime-link-native-1.0-r0 do_install: print-datetime-link-native current DATETIME in symlink is 2025-11-13_20_07 WARNING: print-datetime-link-cross-x86_64-1.0-r0 do_install: print-datetime-link-cross-x86_64 current DATETIME in symlink is 2025-11-13_20_07 WARNING: print-datetime-usenative-1.0-r0 do_install: print-datetime-usenative current DATETIME from print-datetime-link is 2025-11-13_20_07
It's because print-datetime-link-cross-x86_64 depsig doesn't include print-datetime-native signature:
$ cat tmp/work/x86_64-linux/print-datetime-link-cross-x86_64/1.0/temp/depsig.do_populate_sysroot OEOuthashBasic 18 SSTATE_PKGSPEC=sstate:print-datetime-link-cross-x86_64:x86_64-oe-linux:1.0:r0:x86_64:14: task=populate_sysroot drwx . drwx ./recipe-sysroot-native drwx ./recipe-sysroot-native/sysroot-providers -rw- 32 19fbeb373f781c2504453c1ca04dab018a7bc8388c87f4bbc59589df31523d07 ./recipe-sysroot-native/sysroot-providers/print-datetime-link-cross-x86_64 drwx ./recipe-sysroot-native/usr drwx ./recipe-sysroot-native/usr/bin drwx ./recipe-sysroot-native/usr/bin/x86_64-oe-linux lrwx ./recipe-sysroot-native/usr/bin/x86_64-oe-linux/print-datetime-link -> ../print-datetime
While print-datetime-link-native doesn't have this issue, because print-datetime-native signature is there:
$ cat tmp/work/x86_64-linux/print-datetime-link-native/1.0/temp/depsig.do_populate_sysroot OEOuthashBasic 18 print-datetime-native: 60f2734a63d708489570ca719413b4662f8368abc9f4760a279a0a5481e4a17b quilt-native: 65d78a7a5b5cbbf0969798efe558ca28e7ef058f4232fcff266912d16f67a8b8 SSTATE_PKGSPEC=sstate:print-datetime-link-native:x86_64-linux:1.0:r0:x86_64:14: task=populate_sysroot drwx . drwx ./recipe-sysroot-native drwx ./recipe-sysroot-native/sysroot-providers -rw- 26 3d5458be834b2d0e4c65466b9b877d6028ae2210a56399284a23144818666f10 ./recipe-sysroot-native/sysroot-providers/print-datetime-link-native drwx ./recipe-sysroot-native/usr drwx ./recipe-sysroot-native/usr/bin lrwx ./recipe-sysroot-native/usr/bin/print-datetime-link -> print-datetime
With the cross.bbclass fix the link-cross recipe has a checksum from native recipe as well:
$ cat tmp/work/x86_64-linux/print-datetime-link-cross-x86_64/1.0/temp/depsig.do_populate_sysroot OEOuthashBasic 18 print-datetime-native: 9ceb6c27342eae6b8da86c84685af38fb8927ccc19979aae75b8b1e444b11c5c quilt-native: 65d78a7a5b5cbbf0969798efe558ca28e7ef058f4232fcff266912d16f67a8b8 SSTATE_PKGSPEC=sstate:print-datetime-link-cross-x86_64:x86_64-oe-linux:1.0:r0:x86_64:14: task=populate_sysroot drwx . drwx ./recipe-sysroot-native drwx ./recipe-sysroot-native/sysroot-providers -rw- 32 19fbeb373f781c2504453c1ca04dab018a7bc8388c87f4bbc59589df31523d07 ./recipe-sysroot-native/sysroot-providers/print-datetime-link-cross-x86_64 drwx ./recipe-sysroot-native/usr drwx ./recipe-sysroot-native/usr/bin drwx ./recipe-sysroot-native/usr/bin/x86_64-oe-linux lrwx ./recipe-sysroot-native/usr/bin/x86_64-oe-linux/print-datetime-link -> ../print-datetime
And print-datetime-usecross is correctly rebuilt whenever print-datetime-native output is different.
--- meta/classes/cross.bbclass | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
meta/classes/cross.bbclass +36 -0
@@ -95,3 +95,39 @@ addtask addto_recipe_sysroot after do_populate_sysroot do_addto_recipe_sysroot[deptask] = "do_populate_sysroot" PATH:prepend = "${COREBASE}/scripts/cross-intercept:" + +# +# Cross task outputs can call native dependencies and even when cross +# recipe output doesn't change it might produce different results when +# the called native dependency is changed, e.g. clang-cross-${TARGET_ARCH} +# contains symlink to clang binary from clang-native, but when clang-native +# outhash is changed, clang-cross-${TARGET_ARCH} will still be considered +# equivalent and target recipes aren't rebuilt with new clang binary, see +# work around in https://github.com/kraj/meta-clang/pull/1140 to make target +# recipes to depend directly not only on clang-cross-${TARGET_ARCH} but +# clang-native as well. +# +# This can cause poor interactions with hash equivalence, since this recipes +# output-changing dependency is "hidden" and downstream task only see that this +# recipe has the same outhash and therefore is equivalent. This can result in +# different output in different cases. +# +# To resolve this, unhide the output-changing dependency by adding its unihash +# to this tasks outhash calculation. Unfortunately, don't know specifically +# know which dependencies are output-changing, so we have to add all of them. +# +python cross_add_do_populate_sysroot_deps () { + current_task = "do_" + d.getVar("BB_CURRENTTASK") + if current_task != "do_populate_sysroot": + return + + taskdepdata = d.getVar("BB_TASKDEPDATA", False) + pn = d.getVar("PN") + deps = { + dep[0]:dep[6] for dep in taskdepdata.values() if + dep[1] == current_task and dep[0] != pn + } + + d.setVar("HASHEQUIV_EXTRA_SIGDATA", "\n".join("%s: %s" % (k, deps[k]) for k in sorted(deps.keys()))) +} +SSTATECREATEFUNCS += "cross_add_do_populate_sysroot_deps"
Signature · 1 line
2.43.0