Patch review
cover Patch review
Please review this set of changes for walnascar and have comments back by end of day Tuesday, May 13
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/1556
The following changes since commit 6ec2c52b938302b894f119f701ffcf0a847eee85:
systemd: always depend on the explicit serial console units (2025-04-23 19:47:34 +0100)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/walnascar-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/walnascar-nut
Changqing Li (6):
libsoup-2.4: fix CVE-2025-32911
patch.py: set commituser and commitemail for addNote
initscripts: add function
log_success_msg/log_failure_msg/log_warning_msg
buildtools-tarball: move setting of envvars to respective envfile
buildtools-tarball: add envvars into BB_ENV_PASSTHROUGH_ADDITIONS
buildtools-tarball: Make buildtools respects host CA certificates
Guðni Már Gilbert (1):
bluez5: add missing tools to noinst-tools package
Haixiao Yan (1):
glibc: Add single-threaded fast path to rand()
Hongxu Jia (2):
cdrtools-native: fix booting EFI ISO live failed
syslinux: improve isohybrid to process extra sector count for ISO 9660
image
Jiaying Song (1):
gobject-introspection: Fix wrong PN used in MULTILIB_SCRIPTS
Khem Raj (1):
webkitgtk: Use WTF_CPU_UNKNOWN when building for riscv64
Madhu Marri (1):
qemu 8.2.7: ignore CVE-2023-1386
Peter Kjellerstedt (2):
insane.bbclass: Move test for invalid PACKAGECONFIGs to do_recipe_qa insane.bbclass: Report all invalid PACKAGECONFIGs for a recipe at once
Praveen Kumar (1):
connman :fix CVE-2025-32743
Priyal Doshi (1):
tzdata/tzcode-native: upgrade 2025a -> 2025b
meta/classes-global/insane.bbclass | 20 ++-- meta/lib/oe/patch.py | 14 ++- .../bluez5/bluez5_5.79.bb | 8 +- .../connman/connman/CVE-2025-32743.patch | 48 ++++++++ .../connman/connman_1.43.bb | 1 + .../openssl/files/environment.d-openssl.sh | 24 +++- ...dd-single-threaded-fast-path-to-rand.patch | 47 ++++++++ meta/recipes-core/glibc/glibc_2.41.bb | 1 + .../initscripts/initscripts-1.0/functions | 21 ++++ .../initscripts/initscripts_1.0.bb | 1 - meta/recipes-core/meta/buildtools-tarball.bb | 29 +++-- .../cdrtools/cdrtools-native_3.01.bb | 1 + ...ix-nsectors-exceeds-0xffff-situation.patch | 69 ++++++++++++ .../git/git/environment.d-git.sh | 19 ++++ meta/recipes-devtools/git/git_2.49.0.bb | 9 ++ .../environment.d-python3-requests.sh | 11 ++ .../python/python3-requests_2.32.3.bb | 11 ++ meta/recipes-devtools/qemu/qemu.inc | 2 + ...-count-from-section-entry-for-EFI-ca.patch | 104 ++++++++++++++++++ .../syslinux/syslinux_6.04-pre2.bb | 1 + meta/recipes-extended/timezone/timezone.inc | 6 +- .../gobject-introspection_1.84.0.bb | 2 +- .../webkit/webkitgtk/fix-ftbfs-riscv64.patch | 38 +++++++ meta/recipes-sato/webkit/webkitgtk_2.48.0.bb | 1 + .../curl/curl/environment.d-curl.sh | 19 ++++ meta/recipes-support/curl/curl_8.12.1.bb | 9 ++ .../libsoup-2.4/0001-CVE-2025-32911.patch | 74 +++++++++++++ .../libsoup/libsoup-2.4_2.74.3.bb | 3 +- 28 files changed, 560 insertions(+), 33 deletions(-) create mode 100644 meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch create mode 100644 meta/recipes-core/glibc/glibc/0001-stdlib-Add-single-threaded-fast-path-to-rand.patch create mode 100644 meta/recipes-devtools/cdrtools/cdrtools/0001-fix-nsectors-exceeds-0xffff-situation.patch create mode 100644 meta/recipes-devtools/git/git/environment.d-git.sh create mode 100644 meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh create mode 100644 meta/recipes-devtools/syslinux/syslinux/0001-Add-extra-sector-count-from-section-entry-for-EFI-ca.patch create mode 100644 meta/recipes-sato/webkit/webkitgtk/fix-ftbfs-riscv64.patch create mode 100644 meta/recipes-support/curl/curl/environment.d-curl.sh create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/0001-CVE-2025-32911.patch
Signature · 1 line
2.43.0
PATCH 1/17 qemu 8.2.7: ignore CVE-2023-1386
From: Madhu Marri <[email protected]>
Upstream Repository: https://gitlab.com/qemu-project/qemu.git
Bug Details: https://nvd.nist.gov/vuln/detail/CVE-2023-1386
Type: Security Advisory
CVE: CVE-2023-1386
Score: 3.3
Analysis:
- According to redhat[1] this CVE has closed as not a bug.
Reference:
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2223985
--- meta/recipes-devtools/qemu/qemu.inc | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-devtools/qemu/qemu.inc +2 -0
@@ -52,6 +52,8 @@ CVE_STATUS[CVE-2023-2680] = "not-applicable-platform: RHEL specific issue." # NVD DB has this CVE as version-less (with "-") CVE_STATUS[CVE-2024-6505] = "fixed-version: this CVE is fixed since 9.1.0" +CVE_STATUS[CVE-2023-1386] = "disputed: not an issue as per https://bugzilla.redhat.com/show_bug.cgi?id=2223985" + COMPATIBLE_HOST:mipsarchn32 = "null" COMPATIBLE_HOST:mipsarchn64 = "null" COMPATIBLE_HOST:riscv32 = "null"
Signature · 1 line
2.43.0
PATCH 2/17 libsoup-2.4: fix CVE-2025-32911
In reply to Steve SakomanFrom: Changqing Li <[email protected]>
CVE-2025-32911:
A use-after-free type vulnerability was found in libsoup, in the soup_message_headers_get_content_disposition() function. This flaw allows a malicious HTTP client to cause memory corruption in the libsoup server.
Backport patches to fix it
[1] https://nvd.nist.gov/vuln/detail/CVE-2025-32911
[2] https://gitlab.gnome.org/GNOME/libsoup/-/issues/433
--- .../libsoup-2.4/0001-CVE-2025-32911.patch | 74 +++++++++++++++++++ .../libsoup/libsoup-2.4_2.74.3.bb | 3 +- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/0001-CVE-2025-32911.patch
meta/recipes-support/libsoup/libsoup-2.4/0001-CVE-2025-32911.patch new file +74 -0
@@ -0,0 +1,74 @@ +From 52c5859b82fe79f2c32d883e048d218e0d7f2182 Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +Date: Wed, 30 Apr 2025 14:59:55 +0800 +Subject: [PATCH] CVE-2025-32911 + +CVE: CVE-2025-32911 +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/422/commits] + +Signed-off-by: Changqing Li <[email protected]> +--- + libsoup/soup-message-headers.c | 13 +++++++++---- + tests/header-parsing-test.c | 15 +++++++++++++++ + 2 files changed, 24 insertions(+), 4 deletions(-) + +diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c +index 39ad14a..78b2455 100644 +--- a/libsoup/soup-message-headers.c ++++ b/libsoup/soup-message-headers.c +@@ -1454,10 +1454,15 @@ soup_message_headers_get_content_disposition (SoupMessageHeaders *hdrs, + */ + if (params && g_hash_table_lookup_extended (*params, "filename", + &orig_key, &orig_value)) { +- char *filename = strrchr (orig_value, '/'); +- +- if (filename) +- g_hash_table_insert (*params, g_strdup (orig_key), filename + 1); ++ if (orig_value) { ++ char *filename = strrchr (orig_value, '/'); ++ ++ if (filename) ++ g_hash_table_insert (*params, g_strdup (orig_key), g_strdup(filename + 1)); ++ } else { ++ /* filename with no value isn't valid. */ ++ g_hash_table_remove (*params, "filename"); ++ } + } + return TRUE; + } +diff --git a/tests/header-parsing-test.c b/tests/header-parsing-test.c +index 946f118..752196e 100644 +--- a/tests/header-parsing-test.c ++++ b/tests/header-parsing-test.c +@@ -1034,6 +1034,7 @@ do_param_list_tests (void) + #define RFC5987_TEST_HEADER_FALLBACK "attachment; filename*=Unknown''t%FF%FF%FFst.txt; filename=\"test.txt\"" + #define RFC5987_TEST_HEADER_NO_TYPE "filename=\"test.txt\"" + #define RFC5987_TEST_HEADER_NO_TYPE_2 "filename=\"test.txt\"; foo=bar" ++#define RFC5987_TEST_HEADER_EMPTY_FILENAME ";filename" + + static void + do_content_disposition_tests (void) +@@ -1133,6 +1134,20 @@ do_content_disposition_tests (void) + g_assert_cmpstr (filename, ==, RFC5987_TEST_FALLBACK_FILENAME); + parameter2 = g_hash_table_lookup (params, "foo"); + g_assert_cmpstr (parameter2, ==, "bar"); ++ g_hash_table_destroy (params); ++ ++ /* Empty filename */ ++ soup_message_headers_clear (hdrs); ++ soup_message_headers_append (hdrs, "Content-Disposition", ++ RFC5987_TEST_HEADER_EMPTY_FILENAME); ++ if (!soup_message_headers_get_content_disposition (hdrs, ++ &disposition, ++ ¶ms)) { ++ soup_test_assert (FALSE, "empty filename decoding FAILED"); ++ return; ++ } ++ g_free (disposition); ++ g_assert_false (g_hash_table_contains (params, "filename")); + g_hash_table_destroy (params); + + soup_message_headers_free (hdrs); +-- +2.34.1 +
meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb +2 -1
@@ -12,7 +12,8 @@ DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 libpsl" SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ - file://0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch" + file://0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch \ + file://0001-CVE-2025-32911.patch" SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13" CVE_PRODUCT = "libsoup"
Signature · 1 line
2.43.0
PATCH 3/17 connman :fix CVE-2025-32743
In reply to Steve SakomanFrom: Praveen Kumar <[email protected]>
In ConnMan through 1.44, the lookup string in ns_resolv in dnsproxy.c can be NULL or an empty string when the TC (Truncated) bit is set in a DNS response. This allows attackers to cause a denial of service (application crash) or possibly execute arbitrary code, because those lookup values lead to incorrect length calculations and incorrect memcpy operations.
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-32743
Upstream-patch:
https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d90b911f6760959bdf1393c39fe8d1118315490f
--- .../connman/connman/CVE-2025-32743.patch | 48 +++++++++++++++++++ .../connman/connman_1.43.bb | 1 + 2 files changed, 49 insertions(+) create mode 100644 meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch
meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch new file +48 -0
@@ -0,0 +1,48 @@ +From d90b911f6760959bdf1393c39fe8d1118315490f Mon Sep 17 00:00:00 2001 +From: Praveen Kumar <[email protected]> +Date: Thu, 24 Apr 2025 11:39:29 +0000 +Subject: [PATCH] dnsproxy: Fix NULL/empty lookup causing potential crash + +In ConnMan through 1.44, the lookup string in ns_resolv in dnsproxy.c +can be NULL or an empty string when the TC (Truncated) bit is set in +a DNS response. This allows attackers to cause a denial of service +(application crash) or possibly execute arbitrary code, because those +lookup values lead to incorrect length calculations and incorrect +memcpy operations. + +This patch includes a check to make sure loookup value is valid before +using it. This helps avoid unexpected value when the input is empty or +incorrect. + +Fixes: CVE-2025-32743 + +CVE: CVE-2025-32743 + +Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d90b911f6760959bdf1393c39fe8d1118315490f] + +Signed-off-by: Praveen Kumar <[email protected]> +--- + src/dnsproxy.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/dnsproxy.c b/src/dnsproxy.c +index f28a5d7..7ee26d9 100644 +--- a/src/dnsproxy.c ++++ b/src/dnsproxy.c +@@ -1685,8 +1685,13 @@ static int ns_resolv(struct server_data *server, struct request_data *req, + gpointer request, gpointer name) + { + int sk = -1; ++ int err; + const char *lookup = (const char *)name; +- int err = ns_try_resolv_from_cache(req, request, lookup); ++ ++ if (!lookup || strlen(lookup) == 0) ++ return -EINVAL; ++ ++ err = ns_try_resolv_from_cache(req, request, lookup); + + if (err > 0) + /* cache hit */ +-- +2.40.0
meta/recipes-connectivity/connman/connman_1.43.bb +1 -0
@@ -6,6 +6,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ file://connman \ file://no-version-scripts.patch \ file://0002-resolve-musl-does-not-implement-res_ninit.patch \ + file://CVE-2025-32743.patch \ "
Signature · 1 line
2.43.0
PATCH 4/17 tzdata/tzcode-native: upgrade 2025a -> 2025b
In reply to Steve SakomanFrom: Priyal Doshi <[email protected]>
--- meta/recipes-extended/timezone/timezone.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-extended/timezone/timezone.inc +3 -3
@@ -6,7 +6,7 @@ SECTION = "base" LICENSE = "PD & BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba" -PV = "2025a" +PV = "2025b" SRC_URI = "http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode;subdir=tz \ http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata;subdir=tz \
@@ -16,5 +16,5 @@ S = "${WORKDIR}/tz" UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones" -SRC_URI[tzcode.sha256sum] = "119679d59f76481eb5e03d3d2a47d7870d592f3999549af189dbd31f2ebf5061" -SRC_URI[tzdata.sha256sum] = "4d5fcbc72c7c450ebfe0b659bd0f1c02fbf52fd7f517a9ea13fe71c21eb5f0d0" +SRC_URI[tzcode.sha256sum] = "05f8fedb3525ee70d49c87d3fae78a8a0dbae4fe87aa565c65cda9948ae135ec" +SRC_URI[tzdata.sha256sum] = "11810413345fc7805017e27ea9fa4885fd74cd61b2911711ad038f5d28d71474"
Signature · 1 line
2.43.0
PATCH 5/17 glibc: Add single-threaded fast path to rand()
In reply to Steve SakomanFrom: Haixiao Yan <[email protected]>
Backport a patch [1] to improve performance of rand() and __random()[2] by adding a single-threaded fast path.
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=be0cfd848d9ad7378800d6302bc11467cf2b514f
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=32777
--- ...dd-single-threaded-fast-path-to-rand.patch | 47 +++++++++++++++++++ meta/recipes-core/glibc/glibc_2.41.bb | 1 + 2 files changed, 48 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0001-stdlib-Add-single-threaded-fast-path-to-rand.patch
meta/recipes-core/glibc/glibc/0001-stdlib-Add-single-threaded-fast-path-to-rand.patch new file +47 -0
@@ -0,0 +1,47 @@ +From 4f54b0dfc16dbe0df86afccb90e447df5f7f571e Mon Sep 17 00:00:00 2001 +From: Wilco Dijkstra <[email protected]> +Date: Mon, 18 Mar 2024 15:18:20 +0000 +Subject: [PATCH] stdlib: Add single-threaded fast path to rand() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Improve performance of rand() and __random() by adding a single-threaded +fast path. Bench-random-lock shows about 5x speedup on Neoverse V1. + +Upstream-Status: Backport [be0cfd848d9ad7378800d6302bc11467cf2b514f] + +Reviewed-by: Adhemerval Zanella <[email protected]> +Signed-off-by: Haixiao Yan <[email protected]> +--- + stdlib/random.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/stdlib/random.c b/stdlib/random.c +index 17cc61ba8f55..5d482a857065 100644 +--- a/stdlib/random.c ++++ b/stdlib/random.c +@@ -51,6 +51,7 @@ + SUCH DAMAGE.*/ + + #include <libc-lock.h> ++#include <sys/single_threaded.h> + #include <limits.h> + #include <stddef.h> + #include <stdlib.h> +@@ -288,6 +289,12 @@ __random (void) + { + int32_t retval; + ++ if (SINGLE_THREAD_P) ++ { ++ (void) __random_r (&unsafe_state, &retval); ++ return retval; ++ } ++ + __libc_lock_lock (lock); + + (void) __random_r (&unsafe_state, &retval); +-- +2.34.1 +
meta/recipes-core/glibc/glibc_2.41.bb +1 -0
@@ -53,6 +53,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ file://0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \ file://0023-tests-Skip-2-qemu-tests-that-can-hang-in-oe-selftest.patch \ + file://0001-stdlib-Add-single-threaded-fast-path-to-rand.patch \ " S = "${WORKDIR}/git" B = "${WORKDIR}/build-${TARGET_SYS}"
Signature · 1 line
2.43.0
PATCH 6/17 bluez5: add missing tools to noinst-tools package
In reply to Steve SakomanFrom: Guðni Már Gilbert <[email protected]>
This change will prevent these tools from being installed if the image doesn't install bluez5-noinst-tools package.
BlueZ 5.66: tools/mesh-tester
BlueZ 5.66: tools/ioctl-tester
BlueZ 5.65: tools/iso-tester
BlueZ 5.56: tools/btpclientctl
BlueZ 5.51: tools/bcmfw
BlueZ 5.49: tools/rtlfw
BlueZ 5.47: tools/btconfig (not a new tool, but it was moved from bin_PROGRAMS to noinst_PROGRAMS)
--- meta/recipes-connectivity/bluez5/bluez5_5.79.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
meta/recipes-connectivity/bluez5/bluez5_5.79.bb +7 -1
@@ -32,6 +32,9 @@ NOINST_TOOLS_TESTING ?= " \ tools/rfcomm-tester \ tools/bnep-tester \ tools/userchan-tester \ + tools/iso-tester \ + tools/mesh-tester \ + tools/ioctl-tester \ " # noinst programs in Makefile.tools that are conditional on TOOLS
@@ -46,6 +49,7 @@ NOINST_TOOLS_BT ?= " \ tools/hcieventmask \ tools/hcisecfilter \ tools/btinfo \ + tools/btconfig \ tools/btsnoop \ tools/btproxy \ tools/btiotest \
@@ -56,6 +60,8 @@ NOINST_TOOLS_BT ?= " \ tools/advtest \ tools/seq2bseq \ tools/nokfw \ + tools/rtlfw \ + tools/bcmfw \ tools/create-image \ tools/eddystone \ tools/ibeacon \
@@ -65,5 +71,5 @@ NOINST_TOOLS_BT ?= " \ tools/check-selftest \ tools/gatt-service \ profiles/iap/iapd \ - ${@bb.utils.contains('PACKAGECONFIG', 'btpclient', 'tools/btpclient', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'btpclient', 'tools/btpclient tools/btpclientctl', '', d)} \ "
Signature · 1 line
2.43.0
PATCH 7/17 insane.bbclass: Move test for invalid PACKAGECONFIGs to do_recipe_qa
In reply to Steve SakomanFrom: Peter Kjellerstedt <[email protected]>
This makes sure invalid PACKAGECONFIGs are reported also for recipes that have no do_configure task, e.g., packagegroups.
--- meta/classes-global/insane.bbclass | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
meta/classes-global/insane.bbclass +10 -10
@@ -1418,16 +1418,6 @@ Rerun configure task after fixing this.""" except subprocess.CalledProcessError: pass - # Check invalid PACKAGECONFIG - pkgconfig = (d.getVar("PACKAGECONFIG") or "").split() - if pkgconfig: - pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {} - for pconfig in pkgconfig: - if pconfig not in pkgconfigflags: - pn = d.getVar('PN') - error_msg = "%s: invalid PACKAGECONFIG: %s" % (pn, pconfig) - oe.qa.handle_error("invalid-packageconfig", error_msg, d) - oe.qa.exit_if_errors(d) }
@@ -1475,10 +1465,20 @@ python do_recipe_qa() { if re.search(r"git(hu|la)b\.com/.+/.+/archive/.+", url) or "//codeload.github.com/" in url: oe.qa.handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub/GitLab archives, convert recipe to use git protocol" % pn, d) + def test_packageconfig(pn, d): + pkgconfigs = (d.getVar("PACKAGECONFIG") or "").split() + if pkgconfigs: + pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {} + for pkgconfig in pkgconfigs: + if pkgconfig not in pkgconfigflags: + error_msg = "%s: invalid PACKAGECONFIG: %s" % (pn, pkgconfig) + oe.qa.handle_error("invalid-packageconfig", error_msg, d) + pn = d.getVar('PN') test_missing_metadata(pn, d) test_missing_maintainer(pn, d) test_srcuri(pn, d) + test_packageconfig(pn, d) oe.qa.exit_if_errors(d) }
Signature · 1 line
2.43.0
PATCH 8/17 insane.bbclass: Report all invalid PACKAGECONFIGs for a recipe at once
In reply to Steve SakomanFrom: Peter Kjellerstedt <[email protected]>
Rather than reporting each invalid PACKAGECONFIG with a separate error message, report them all with one error message.
--- meta/classes-global/insane.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
meta/classes-global/insane.bbclass +4 -4
@@ -1469,10 +1469,10 @@ python do_recipe_qa() { pkgconfigs = (d.getVar("PACKAGECONFIG") or "").split() if pkgconfigs: pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {} - for pkgconfig in pkgconfigs: - if pkgconfig not in pkgconfigflags: - error_msg = "%s: invalid PACKAGECONFIG: %s" % (pn, pkgconfig) - oe.qa.handle_error("invalid-packageconfig", error_msg, d) + invalid_pkgconfigs = set(pkgconfigs) - set(pkgconfigflags) + if invalid_pkgconfigs: + error_msg = "%s: invalid PACKAGECONFIG(s): %s" % (pn, " ".join(sorted(invalid_pkgconfigs))) + oe.qa.handle_error("invalid-packageconfig", error_msg, d) pn = d.getVar('PN') test_missing_metadata(pn, d)
Signature · 1 line
2.43.0
PATCH 9/17 patch.py: set commituser and commitemail for addNote
In reply to Steve SakomanFrom: Changqing Li <[email protected]>
When PATCHTOOL is set to 'git', and user don't setup
user.name and user.email for git, do_patch fail with
the following error, fix by passing -c options.
CmdError("git notes --ref refs/notes/devtool append -m 'original patch: 0001-PATCH-increase-to-cpp17-version.patch' HEAD", 0, 'stdout:
stderr: Author identity unknown
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
--- meta/lib/oe/patch.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
meta/lib/oe/patch.py +8 -6
@@ -462,21 +462,23 @@ class GitApplyTree(PatchTree): return (tmpfile, cmd) @staticmethod - def addNote(repo, ref, key, value=None): + def addNote(repo, ref, key, value=None, commituser=None, commitemail=None): note = key + (": %s" % value if value else "") notes_ref = GitApplyTree.notes_ref runcmd(["git", "config", "notes.rewriteMode", "ignore"], repo) runcmd(["git", "config", "notes.displayRef", notes_ref, notes_ref], repo) runcmd(["git", "config", "notes.rewriteRef", notes_ref, notes_ref], repo) - runcmd(["git", "notes", "--ref", notes_ref, "append", "-m", note, ref], repo) + cmd = ["git"] + GitApplyTree.gitCommandUserOptions(cmd, commituser, commitemail) + runcmd(cmd + ["notes", "--ref", notes_ref, "append", "-m", note, ref], repo) @staticmethod - def removeNote(repo, ref, key): + def removeNote(repo, ref, key, commituser=None, commitemail=None): notes = GitApplyTree.getNotes(repo, ref) notes = {k: v for k, v in notes.items() if k != key and not k.startswith(key + ":")} runcmd(["git", "notes", "--ref", GitApplyTree.notes_ref, "remove", "--ignore-missing", ref], repo) for note, value in notes.items(): - GitApplyTree.addNote(repo, ref, note, value) + GitApplyTree.addNote(repo, ref, note, value, commituser, commitemail) @staticmethod def getNotes(repo, ref):
@@ -507,7 +509,7 @@ class GitApplyTree(PatchTree): GitApplyTree.gitCommandUserOptions(cmd, d=d) cmd += ["commit", "-m", subject, "--no-verify"] runcmd(cmd, dir) - GitApplyTree.addNote(dir, "HEAD", GitApplyTree.ignore_commit) + GitApplyTree.addNote(dir, "HEAD", GitApplyTree.ignore_commit, d.getVar('PATCH_GIT_USER_NAME'), d.getVar('PATCH_GIT_USER_EMAIL')) @staticmethod def extractPatches(tree, startcommits, outdir, paths=None):
@@ -654,7 +656,7 @@ class GitApplyTree(PatchTree): raise finally: if patch_applied: - GitApplyTree.addNote(self.dir, "HEAD", GitApplyTree.original_patch, os.path.basename(patch['file'])) + GitApplyTree.addNote(self.dir, "HEAD", GitApplyTree.original_patch, os.path.basename(patch['file']), self.commituser, self.commitemail) class QuiltTree(PatchSet):
Signature · 1 line
2.43.0
PATCH 10/17 initscripts: add function log_success_msg/log_failure_msg/log_warning_msg
In reply to Steve SakomanFrom: Changqing Li <[email protected]>
* add function log_success_msg/log_failure_msg/log_warning_msg, some packages still use these functions, like mariadb, refer [1], without these function, with sysV init manager, mariadb will report error:
root@qemux86-64:~# /etc/init.d/mysqld status /etc/init.d/mysqld: line 383: log_success_msg: command not found
* remove RCONFLICTS with lsbinitscripts, LSB support already remove in
[2]
[1] https://github.com/MariaDB/server/blob/main/support-files/mysql.server.sh#L104
[2] https://git.openembedded.org/openembedded-core/commit/?id=fb064356af615d67d85b65942103bf943d84d290
[3] https://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html
--- .../initscripts/initscripts-1.0/functions | 21 +++++++++++++++++++ .../initscripts/initscripts_1.0.bb | 1 - 2 files changed, 21 insertions(+), 1 deletion(-)
meta/recipes-core/initscripts/initscripts-1.0/functions +21 -0
@@ -92,3 +92,24 @@ passed() { echo -n -e "${BRACKET}[${SUCCESS} PASS ${BRACKET}]${NORMAL}" return $rc } + +log_success_msg() +{ + echo -n $@ + success + echo +} + +log_failure_msg() +{ + echo -n $@ + failure + echo +} + +log_warning_msg() +{ + echo -n $@ + warning + echo +}
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -1
@@ -54,7 +54,6 @@ RDEPENDS:${PN} = "initd-functions \ # Recommend pn-functions so that it will be a preferred default provider for initd-functions RRECOMMENDS:${PN} = "${PN}-functions" RPROVIDES:${PN}-functions = "initd-functions" -RCONFLICTS:${PN}-functions = "lsbinitscripts" FILES:${PN}-functions = "${sysconfdir}/init.d/functions*" FILES:${PN}-sushell = "${base_sbindir}/sushell"
Signature · 1 line
2.43.0
PATCH 11/17 buildtools-tarball: move setting of envvars to respective envfile
In reply to Steve SakomanFrom: Changqing Li <[email protected]>
* make git,curl,python3-requests align with openssl, move the setting of envvars into respective envfile
* for environment.d-openssl.sh, also check if ca-certificates.crt exist before export envvars
--- .../openssl/files/environment.d-openssl.sh | 9 ++++++--- meta/recipes-core/meta/buildtools-tarball.bb | 6 ------ meta/recipes-devtools/git/git/environment.d-git.sh | 3 +++ meta/recipes-devtools/git/git_2.49.0.bb | 9 +++++++++ .../environment.d-python3-requests.sh | 3 +++ .../python/python3-requests_2.32.3.bb | 11 +++++++++++ meta/recipes-support/curl/curl/environment.d-curl.sh | 3 +++ meta/recipes-support/curl/curl_8.12.1.bb | 9 +++++++++ 8 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 meta/recipes-devtools/git/git/environment.d-git.sh create mode 100644 meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh create mode 100644 meta/recipes-support/curl/curl/environment.d-curl.sh
meta/recipes-connectivity/openssl/files/environment.d-openssl.sh +6 -3
@@ -1,6 +1,9 @@ export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/openssl.cnf" -export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/certs" -export SSL_CERT_FILE="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/certs/ca-certificates.crt" +if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then + export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/certs" + export SSL_CERT_FILE="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/certs/ca-certificates.crt" + export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} SSL_CERT_DIR SSL_CERT_FILE" +fi export OPENSSL_MODULES="$OECORE_NATIVE_SYSROOT/usr/lib/ossl-modules/" export OPENSSL_ENGINES="$OECORE_NATIVE_SYSROOT/usr/lib/engines-3" -export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} SSL_CERT_DIR SSL_CERT_FILE OPENSSL_CONF OPENSSL_MODULES OPENSSL_ENGINES" +export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} OPENSSL_CONF OPENSSL_MODULES OPENSSL_ENGINES"
meta/recipes-core/meta/buildtools-tarball.bb +0 -6
@@ -73,12 +73,6 @@ create_sdk_files:append () { touch $script echo 'export PATH="${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${sbindir_nativesdk}:${SDKPATHNATIVE}${base_bindir_nativesdk}:${SDKPATHNATIVE}${base_sbindir_nativesdk}:$PATH"' >> $script echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script - if [ -e "${SDK_OUTPUT}${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt" ]; then - echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script - echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script - echo 'export REQUESTS_CA_BUNDLE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script - echo 'export CURL_CA_BUNDLE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script - fi echo 'HOST_PKG_PATH=$(command -p pkg-config --variable=pc_path pkg-config 2>/dev/null)' >>$script echo 'export PKG_CONFIG_LIBDIR=${SDKPATHNATIVE}/${libdir}/pkgconfig:${SDKPATHNATIVE}/${datadir}/pkgconfig:${HOST_PKG_PATH:-/usr/lib/pkgconfig:/usr/share/pkgconfig}' >>$script echo 'unset HOST_PKG_PATH'
meta/recipes-devtools/git/git/environment.d-git.sh new file +3 -0
@@ -0,0 +1,3 @@ +if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then + export GIT_SSL_CAINFO="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" +fi
meta/recipes-devtools/git/git_2.49.0.bb +9 -0
@@ -12,6 +12,10 @@ SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ file://0001-config.mak.uname-do-not-force-RHEL-7-specific-build-.patch \ " +SRC_URI:append:class-nativesdk = " \ + file://environment.d-git.sh \ + " + S = "${WORKDIR}/git-${PV}" LIC_FILES_CHKSUM = "\
@@ -112,6 +116,9 @@ do_install:append:class-nativesdk() { GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \ GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR} perl_native_fixup + + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${UNPACKDIR}/environment.d-git.sh ${D}${SDKPATHNATIVE}/environment-setup.d/git.sh } FILES:${PN} += "${datadir}/git-core ${libexecdir}/git-core/"
@@ -152,6 +159,8 @@ FILES:${PN}-tk = " \ PACKAGES =+ "gitweb" FILES:gitweb = "${datadir}/gitweb/" + +FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/git.sh" RDEPENDS:gitweb = "perl" BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh new file +3 -0
@@ -0,0 +1,3 @@ +if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then + export REQUESTS_CA_BUNDLE="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" +fi
meta/recipes-devtools/python/python3-requests_2.32.3.bb +11 -0
@@ -3,10 +3,19 @@ HOMEPAGE = "https://requests.readthedocs.io" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" +SRC_URI:append:class-nativesdk = " \ + file://environment.d-python3-requests.sh \ +" + SRC_URI[sha256sum] = "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" inherit pypi python_setuptools_build_meta +do_install:append:class-nativesdk() { + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${UNPACKDIR}/environment.d-python3-requests.sh ${D}${SDKPATHNATIVE}/environment-setup.d/python3-requests.sh +} + RDEPENDS:${PN} += " \ python3-certifi \ python3-email \
@@ -19,6 +28,8 @@ RDEPENDS:${PN} += " \ python3-compression \ " +FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/python3-requests.sh" + CVE_PRODUCT = "requests" BBCLASSEXTEND = "native nativesdk"
meta/recipes-support/curl/curl/environment.d-curl.sh new file +3 -0
@@ -0,0 +1,3 @@ +if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then + export CURL_CA_BUNDLE="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" +fi
meta/recipes-support/curl/curl_8.12.1.bb +9 -0
@@ -15,6 +15,11 @@ SRC_URI = " \ file://disable-tests \ file://no-test-timeout.patch \ " + +SRC_URI:append:class-nativesdk = " \ + file://environment.d-curl.sh \ +" + SRC_URI[sha256sum] = "0341f1ed97a26c811abaebd37d62b833956792b7607ea3f15d001613c76de202" # Curl has used many names over the years...
@@ -97,6 +102,9 @@ do_install:append:class-target() { do_install:append:class-nativesdk() { fix_absolute_paths + + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${UNPACKDIR}/environment.d-curl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/curl.sh } do_compile_ptest() {
@@ -150,6 +158,7 @@ FILES:lib${BPN} = "${libdir}/lib*.so.*" RRECOMMENDS:lib${BPN} += "ca-certificates" FILES:${PN} += "${datadir}/zsh" +FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/curl.sh" inherit multilib_script MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config"
Signature · 1 line
2.43.0
PATCH 12/17 buildtools-tarball: add envvars into BB_ENV_PASSTHROUGH_ADDITIONS
In reply to Steve SakomanFrom: Changqing Li <[email protected]>
Here is one testcase:
For recipe tensorflow-lite-host-tools_2.18.0.bb, refer [1], do_configure[network] = "1"
and it will git clone some repos in CMakeLists.txt
When buildtools is used and nativesdk-git is installed into sdk,do_configure failed with error:
[1/9] Performing download step (git clone) for 'protobuf-populate'
Cloning into 'protobuf'...
fatal: unable to access 'https://github.com/protocolbuffers/protobuf/': error setting certificate file: /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-wrlinuxsdk-linux/etc/ssl/certs/ca-certificates.crt
Fix by adding GIT_SSL_CAINFO in BB_ENV_PASSTHROUGH_ADDITIONS, so that user can export GIT_SSL_CAINFO=${GIT_SSL_CAINFO} in their do_configure:prepend() to fix above do_configure failure
CURL_CA_BUNDLE and REQUESTS_CA_BUNDLE is similar envvars, so all add into BB_ENV_PASSTHROUGH_ADDITIONS
--- meta/recipes-devtools/git/git/environment.d-git.sh | 1 + .../python/python3-requests/environment.d-python3-requests.sh | 1 + meta/recipes-support/curl/curl/environment.d-curl.sh | 1 + 3 files changed, 3 insertions(+)
meta/recipes-devtools/git/git/environment.d-git.sh +1 -0
@@ -1,3 +1,4 @@ if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then export GIT_SSL_CAINFO="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" + export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} GIT_SSL_CAINFO" fi
meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh +1 -0
@@ -1,3 +1,4 @@ if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then export REQUESTS_CA_BUNDLE="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" + export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} REQUESTS_CA_BUNDLE" fi
meta/recipes-support/curl/curl/environment.d-curl.sh +1 -0
@@ -1,3 +1,4 @@ if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then export CURL_CA_BUNDLE="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" + export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} CURL_CA_BUNDLE" fi
Signature · 1 line
2.43.0
PATCH 13/17 buildtools-tarball: Make buildtools respects host CA certificates
In reply to Steve SakomanFrom: Changqing Li <[email protected]>
To adapt user network enviroment, buildtools should first try to use the user configured envs like SSL_CERT_FILE/CURL_CA_BUNDLE/..., if these envs is not set, then use the auto-detected ca file and ca path, and finally use the CA certificates in buildtools.
nativesdk-openssl set OPENSSLDIR as "/not/builtin", need set SSL_CERT_FILE/SSL_CERT_DIR to work
nativesdk-curl don't set default ca file, need SSL_CERT_FILE/SSL_CERT_DIR or CURL_CA_BUNDLE/CURL_CA_PATH to work
nativesdk-git actually use libcurl, and GIT_SSL_CAPATH/GIT_SSL_CAINFO also works
nativesdk-python3-requests will use cacert.pem under python module certifi by default, need to set REQUESTS_CA_BUNDLE
--- .../openssl/files/environment.d-openssl.sh | 25 +++++++++++++++---- meta/recipes-core/meta/buildtools-tarball.bb | 23 ++++++++++++++++- .../git/git/environment.d-git.sh | 21 +++++++++++++--- .../environment.d-python3-requests.sh | 13 +++++++--- .../curl/curl/environment.d-curl.sh | 21 +++++++++++++--- 5 files changed, 88 insertions(+), 15 deletions(-)
meta/recipes-connectivity/openssl/files/environment.d-openssl.sh +20 -5
@@ -1,9 +1,24 @@ export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/openssl.cnf" -if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then - export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/certs" - export SSL_CERT_FILE="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/certs/ca-certificates.crt" - export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} SSL_CERT_DIR SSL_CERT_FILE" -fi export OPENSSL_MODULES="$OECORE_NATIVE_SYSROOT/usr/lib/ossl-modules/" export OPENSSL_ENGINES="$OECORE_NATIVE_SYSROOT/usr/lib/engines-3" export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} OPENSSL_CONF OPENSSL_MODULES OPENSSL_ENGINES" + +# Respect host env SSL_CERT_FILE/SSL_CERT_DIR first, then auto-detected host cert, then cert in buildtools +# CAFILE/CAPATH is auto-deteced when source buildtools +if [ -z "$SSL_CERT_FILE" ]; then + if [ -n "$CAFILE" ];then + export SSL_CERT_FILE="$CAFILE" + elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then + export SSL_CERT_FILE="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/certs/ca-certificates.crt" + fi +fi + +if [ -z "$SSL_CERT_DIR" ]; then + if [ -n "$CAPATH" ];then + export SSL_CERT_DIR="$CAPATH" + elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then + export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/certs" + fi +fi + +export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} SSL_CERT_DIR SSL_CERT_FILE"
meta/recipes-core/meta/buildtools-tarball.bb +22 -1
@@ -80,14 +80,35 @@ create_sdk_files:append () { toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS} cat >> $script <<EOF +# Detect host ca file/path, export for envfile to use +# /etc/ssl/certs/ca-certificates.crt Debian systems +# /etc/pki/tls/certs/ca-bundle.crt Fedora systems +# /etc/ssl/ca-bundle.pem Suse systems +export CAFILE +export CAPATH +for a in /etc/ssl/certs/ca-certificates.crt \ + /etc/pki/tls/certs/ca-bundle.crt \ + /etc/ssl/ca-bundle.pem ; do + if test -f "\$a"; then + CAFILE="\$a" + break + fi +done + +a="/etc/ssl/certs" +if test -d "\$a" && ls "\$a"/[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].0 >/dev/null 2>/dev/null; then + CAPATH="\$a" +fi + if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do . \$envfile done fi + # We have to unset this else it can confuse oe-selftest and other tools # which may also use the overlapping namespace. -unset OECORE_NATIVE_SYSROOT +unset OECORE_NATIVE_SYSROOT CAFILE CAPATH EOF if [ "${SDKMACHINE}" = "i686" ]; then
meta/recipes-devtools/git/git/environment.d-git.sh +18 -3
@@ -1,4 +1,19 @@ -if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then - export GIT_SSL_CAINFO="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" - export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} GIT_SSL_CAINFO" +# Respect host env GIT_SSL_CAINFO/GIT_SSL_CAPATH first, then auto-detected host cert, then cert in buildtools +# CAFILE/CAPATH is auto-deteced when source buildtools +if [ -z "$GIT_SSL_CAINFO" ]; then + if [ -n "$CAFILE" ];then + export GIT_SSL_CAINFO="$CAFILE" + elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then + export GIT_SSL_CAINFO="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" + fi fi + +if [ -z "$GIT_SSL_CAPATH" ]; then + if [ -n "$CAPATH" ];then + export GIT_SSL_CAPATH="$CAPATH" + elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then + export GIT_SSL_CAPATH="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs" + fi +fi + +export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} GIT_SSL_CAINFO GIT_SSL_CAPATH"
meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh +10 -3
@@ -1,4 +1,11 @@ -if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then - export REQUESTS_CA_BUNDLE="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" - export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} REQUESTS_CA_BUNDLE" +# Respect host env REQUESTS_CA_BUNDLE first, then auto-detected host cert, then cert in buildtools +# CAFILE/CAPATH is auto-deteced when source buildtools +if [ -z "$REQUESTS_CA_BUNDLE" ]; then + if [ -n "$CAFILE" ];then + export REQUESTS_CA_BUNDLE="$CAFILE" + elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then + export REQUESTS_CA_BUNDLE="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" + fi fi + +export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} REQUESTS_CA_BUNDLE"
meta/recipes-support/curl/curl/environment.d-curl.sh +18 -3
@@ -1,4 +1,19 @@ -if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then - export CURL_CA_BUNDLE="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" - export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} CURL_CA_BUNDLE" +# Respect host env CURL_CA_BUNDLE/CURL_CA_PATH first, then auto-detected host cert, then cert in buildtools +# CAFILE/CAPATH is auto-deteced when source buildtools +if [ -z "$CURL_CA_PATH" ]; then + if [ -n "$CAFILE" ];then + export CURL_CA_BUNDLE="$CAFILE" + elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then + export CURL_CA_BUNDLE="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" + fi fi + +if [ -z "$CURL_CA_PATH" ]; then + if [ -n "$CAPATH" ];then + export CURL_CA_PATH="$CAPATH" + elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then + export CURL_CA_PATH="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs" + fi +fi + +export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} CURL_CA_BUNDLE CURL_CA_PATH"
Signature · 1 line
2.43.0
PATCH 14/17 cdrtools-native: fix booting EFI ISO live failed
In reply to Steve SakomanFrom: Hongxu Jia <[email protected]>
In ISO live, if the size of efi.img > 32MB, and copy EFI application (bootx64.efi) to efi.img behind of kernel and initrd, UEFI system could not find EFI application bootx64.efi
Using QEMU+OVMF to boot ISO live image, press ESC to enter UEFI shell:
...
Shell> ls FS0:\
Directory of: FS0:\
04/05/2011 23:00 12,985,344 bzImage
04/05/2011 23:00 <DIR> 2,048 EFI
04/05/2011 23:00 20,494,696 initrd
04/05/2011 23:00 26 startup.nsh
3 File(s) 33,480,066 bytes
1 Dir(s)Shell> ls FS0:\EFI
Directory of: FS0:\EFI
0 File(s) 0 bytes
0 Dir(s)
...
In following case, add 64MB extra space to bootable image efi.img, and the partition table of EFI is truncated to 26.3M
$ echo 'IMAGE_FSTYPES:pn-core-image-minimal = " live"' >> conf/local.conf $ echo 'MACHINE_FEATURES:append = " efi pcbios"' >> conf/local.conf $ echo '# 64MB extra space to bootable image efi.img' >> conf/local.conf $ echo 'BOOTIMG_EXTRA_SPACE = "65535"' >> conf/local.conf $ bitbake core-image-minimal $ fdisk -l tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.iso ... Device Boot Start End Sectors Size Id Type tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.iso1 * 0 376831 376832 184M 0 Empty tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.iso2 120 54079 53960 26.3M ef EFI (FAT-12/16/32)
According to page 11: `Figure 5 - Section Entry' in El Torito Bootable CD-ROM Format Specification [1]. The sector count takes 2 byte which means max sector count is 0xffff (65535), for 512-byte sector, the size of bootable image is no more than 32MB (65536 * 512 / 1024 / 1024)
This commit truncate to 32MB if image size larger than 32MB, and report a warning, then save the extra image sector count to vendor unique selection criteria
After apply this commit, the partition table of EFI is truncated to 32M
$ fdisk -l tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.iso ... Device Boot Start End Sectors Size Id Type tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.iso1 * 0 376831 376832 184M 0 Empty tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.iso2 120 65654 65535 32M ef EFI (FAT-12/16/32)
[1]https://pdos.csail.mit.edu/6.828/2017/readings/boot-cdrom.pdf
(From OE-Core rev: 259bb8907d8bfe1217e88a3b6935c160e5a92f8d)
--- .../cdrtools/cdrtools-native_3.01.bb | 1 + ...ix-nsectors-exceeds-0xffff-situation.patch | 69 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 meta/recipes-devtools/cdrtools/cdrtools/0001-fix-nsectors-exceeds-0xffff-situation.patch
meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb +1 -0
@@ -15,6 +15,7 @@ SRC_URI = " \ file://0001-Don-t-set-uid-gid-during-install.patch \ file://riscv64-linux-gcc.rul \ file://gcc14-fix.patch \ + file://0001-fix-nsectors-exceeds-0xffff-situation.patch \ " SRC_URI[md5sum] = "7d45c5b7e1f78d85d1583b361aee6e8b"
meta/recipes-devtools/cdrtools/cdrtools/0001-fix-nsectors-exceeds-0xffff-situation.patch new file +69 -0
69 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 15/17 syslinux: improve isohybrid to process extra sector count for ISO 9660 image
In reply to Steve SakomanFrom: Hongxu Jia <[email protected]>
Due to commit [cdrtools-native: fix booting EFI ISO live failed] applied to improve mkisofs to fix nsectors exceeds 0xffff situation which set selection criteria type = 2 and save extra nsectors to vendor unique selection criteria
In following case, add 64MB extra space to bootable image efi.img, and the partition table of EFI is truncated to 32M
$ echo 'IMAGE_FSTYPES:pn-core-image-minimal = " live"' >> conf/local.conf $ echo 'MACHINE_FEATURES:append = " efi pcbios"' >> conf/local.conf $ echo '# 64MB extra space to bootable image efi.img' >> conf/local.conf $ echo 'BOOTIMG_EXTRA_SPACE = "65535"' >> conf/local.conf $ bitbake core-image-minimal $ fdisk -l tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.iso ... Device Boot Start End Sectors Size Id Type tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.iso1 * 0 376831 376832 184M 0 Empty tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.iso2 120 65654 65535 32M ef EFI (FAT-12/16/32)
After applying this patch to process extra sector count, the partition table of EFI is 90.3M
$ fdisk -l tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.iso ... Device Boot Start End Sectors Size Id Type tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.iso1 * 0 376831 376832 184M 0 Empty tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.iso2 120 185151 185032 90.3M ef EFI (FAT-12/16/32)
[1]https://pdos.csail.mit.edu/6.828/2017/readings/boot-cdrom.pdf
(From OE-Core rev: b4e112ed7e6ba5a6c6df530d696485a588831851)
--- ...-count-from-section-entry-for-EFI-ca.patch | 104 ++++++++++++++++++ .../syslinux/syslinux_6.04-pre2.bb | 1 + 2 files changed, 105 insertions(+) create mode 100644 meta/recipes-devtools/syslinux/syslinux/0001-Add-extra-sector-count-from-section-entry-for-EFI-ca.patch
meta/recipes-devtools/syslinux/syslinux/0001-Add-extra-sector-count-from-section-entry-for-EFI-ca.patch new file +104 -0
@@ -0,0 +1,104 @@ +From 79a26046d178ae132cb88ba75de7141bd169ff16 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <[email protected]> +Date: Sat, 26 Apr 2025 10:45:08 +0800 +Subject: [PATCH] Add extra sector count from section entry for EFI catalogue + +According to page 11: `Figure 5 - Section Entry' in El Torito Bootable +CD-ROM Format Specification [1]. The sector count tooks 2 byte which +means max sector count is 0xffff (65535), for 512-byte sector, the +size of bootable image is no more than 32MB (65536 * 512 / 1024 / 1024) + +If the size of efi.img > 32MB, the partition table will be truncated +in ISO, which caused UEFI system or grub-efi read efi.img broken +occasionally. + +This patch extend efi_count, mac_count and count to 4 byte int, if +Yocto defines `Selection criteria type = 2', add extra sector count +to original sector count as total count; for other situation, still use +original sector count as usual + +[1]https://pdos.csail.mit.edu/6.828/2017/readings/boot-cdrom.pdf + +Upstream-Status: Inappropriate [Yocto specific] + +Signed-off-by: Hongxu Jia <[email protected]> +--- + utils/isohybrid.c | 48 ++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 43 insertions(+), 5 deletions(-) + +diff --git a/utils/isohybrid.c b/utils/isohybrid.c +index a9e38d4..1bbfd45 100644 +--- a/utils/isohybrid.c ++++ b/utils/isohybrid.c +@@ -76,7 +76,7 @@ uint32_t de_lba = 0; + uint16_t de_seg = 0, de_count = 0, de_mbz2 = 0; + uint8_t de_boot = 0, de_media = 0, de_sys = 0, de_mbz1 = 0; + uint32_t efi_lba = 0, mac_lba = 0; +-uint16_t efi_count = 0, mac_count = 0; ++uint32_t efi_count = 0, mac_count = 0; + uint8_t efi_boot = 0, efi_media = 0, efi_sys = 0; + + int apm_parts = 3; +@@ -552,17 +552,55 @@ read_efi_section(const uint8_t *buf) + } + + int +-read_efi_catalogue(const uint8_t *buf, uint16_t *count, uint32_t *lba) ++read_efi_catalogue(const uint8_t *buf, uint32_t *count, uint32_t *lba) + { ++ uint16_t _count = 0; ++ ++ // Jump to offset 6 byte + buf += 6; + +- memcpy(count, buf, 2); +- *count = lendian_short(*count); ++ *count = 0; ++ ++ // Offset : 6-7 byte ++ // Type : Word ++ // Description: Sector Count, the number of virtual/emulated sectors ++ // the system will store at Load Segment during the initial boot procedure ++ memcpy(&_count, buf, 2); ++ _count = lendian_short(_count); + buf += 2; + ++ // Offset : 8-0B byte ++ // Type : D Word ++ // Description: Load RBA. This is the start address of the virtual disk. CD’s use ++ // Relative/Logical block addressing. + memcpy(lba, buf, 4); + *lba = lendian_int(*lba); +- buf += 6; ++ buf += 4; ++ ++ // Offset : 0C byte ++ // Type : Byte ++ // Description: Selection criteria type. This defines a vendor unique format ++ // for bytes 0D-1F. ++ // The following formats have currently been assigned: ++ // 0 - No selection criteria ++ // 1 - Language and Version Information (IBM) ++ // 2 - Save extra sector count to vendor unique selection criteria (Yocto) ++ // 3-FF - Reserved ++ unsigned char slection_criteria_type = *buf; ++ buf += 1; ++ ++ // Offset : 0D-0E-0F-10 byte ++ // Type : D Word ++ // Description: Selection criteria type = 2, reserved by Yocto, ++ // save extra sector count to vendor unique selection criteria ++ if (slection_criteria_type == 2) { ++ memcpy(count, buf, 4); ++ *count = lendian_int(*count); ++ buf += 4; ++ } ++ ++ // total count = sector count + extra sector count ++ *count += _count; + + return 0; + } +-- +2.34.1 +
meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb +1 -0
@@ -23,6 +23,7 @@ SRC_URI = "https://www.zytor.com/pub/syslinux/Testing/6.04/syslinux-${PV}.tar.xz file://0013-remove-clean-script.patch \ file://0014-Fix-reproducibility-issues.patch \ file://0001-ext2_fs.h-do-not-carry-an-outdated-copy.patch \ + file://0001-Add-extra-sector-count-from-section-entry-for-EFI-ca.patch \ " SRC_URI[md5sum] = "2b31c78f087f99179feb357da312d7ec"
Signature · 1 line
2.43.0
PATCH 16/17 webkitgtk: Use WTF_CPU_UNKNOWN when building for riscv64
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
This helps fix the build regression seen with 2.48+
(master rev: e06114af90b78abb3ba2e75c59fc4c60db8b6a9a)
--- .../webkit/webkitgtk/fix-ftbfs-riscv64.patch | 38 +++++++++++++++++++ meta/recipes-sato/webkit/webkitgtk_2.48.0.bb | 1 + 2 files changed, 39 insertions(+) create mode 100644 meta/recipes-sato/webkit/webkitgtk/fix-ftbfs-riscv64.patch
meta/recipes-sato/webkit/webkitgtk/fix-ftbfs-riscv64.patch new file +38 -0
@@ -0,0 +1,38 @@ +From: Alberto Garcia <[email protected]> +Description: Use WTF_CPU_UNKNOWN when building for riscv64 + WebKitGTK doesn't build on riscv64 even with the JIT disabled. + Treating the CPU as unknown is perhaps a bit severe, but it allows us + to get the build done until someone steps up to maintain this + properly. +Bug: https://bugs.webkit.org/show_bug.cgi?id=271371 + +Upstream-Status: Submitted [https://bugs.webkit.org/show_bug.cgi?id=271371#c1] +Signed-off-by: Khem Raj <[email protected]> +--- a/Source/WTF/wtf/PlatformCPU.h ++++ b/Source/WTF/wtf/PlatformCPU.h +@@ -286,14 +286,6 @@ + + #endif /* ARM */ + +-/* CPU(RISCV64) - RISC-V 64-bit */ +-#if defined(__riscv) \ +- && defined(__riscv_xlen) \ +- && (__riscv_xlen == 64) +-#define WTF_CPU_RISCV64 1 +-#define WTF_CPU_KNOWN 1 +-#endif +- + #if !CPU(KNOWN) + #define WTF_CPU_UNKNOWN 1 + #endif +--- a/Source/cmake/WebKitCommon.cmake ++++ b/Source/cmake/WebKitCommon.cmake +@@ -125,8 +125,6 @@ if (NOT HAS_RUN_WEBKIT_COMMON) + set(WTF_CPU_PPC64 1) + elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le") + set(WTF_CPU_PPC64LE 1) +- elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^riscv64") +- set(WTF_CPU_RISCV64 1) + elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^loongarch64") + set(WTF_CPU_LOONGARCH64 1) + else ()
meta/recipes-sato/webkit/webkitgtk_2.48.0.bb +1 -0
@@ -19,6 +19,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \ file://0001-EnumTraits.h-error-no-matching-function-for-call-to-.patch \ file://0001-Cherry-pick-292304-main-7ffc29624258-.-https-bugs.we.patch \ file://0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch \ + file://fix-ftbfs-riscv64.patch \ " SRC_URI[sha256sum] = "94904a55cf12d44a4e36ceadafff02d46da73d76be9b4769f34cbfdf0eebf88e"
Signature · 1 line
2.43.0
PATCH 17/17 gobject-introspection: Fix wrong PN used in MULTILIB_SCRIPTS
In reply to Steve SakomanFrom: Jiaying Song <[email protected]>
The current MULTILIB_SCRIPTS entry incorrectly assigns g-ir-annotation-tool and g-ir-scanner to the ${PN} package. However, these scripts are actually installed in the gobject-introspection-tools package. This leads to incorrect symlinks being created when multilib is enabled. Therefore, this patch correctly moves them to the ${PN}-tools package.
Error log:
root@intel-x86-64:~# ls -l /usr/bin/g-ir-scanner lrwxrwxrwx 1 root root 27 Mar 9 2018 /usr/bin/g-ir-scanner -> /usr/bin/g-ir-scanner-lib64 root@intel-x86-64:~# ls -l /usr/bin/g-ir-scanner-lib64 ls: cannot access '/usr/bin/g-ir-scanner-lib64': No such file or directory
--- .../gobject-introspection/gobject-introspection_1.84.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/gobject-introspection/gobject-introspection_1.84.0.bb +1 -1
@@ -24,7 +24,7 @@ inherit meson pkgconfig gtk-doc python3targetconfig qemu gobject-introspection-d GTKDOC_MESON_OPTION = "gtk_doc" -MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner" +MULTILIB_SCRIPTS = "${PN}-tools:${bindir}/g-ir-annotation-tool ${PN}-tools:${bindir}/g-ir-scanner" # setuptools are required to provide distutils to build the tools DEPENDS += " libffi zlib python3 python3-setuptools flex-native bison-native"
Signature · 1 line
2.43.0