Skip to contentSkip to conversation

Patch review

PATCH In review Steve Sakoman 2 participants 16 messages Feb 8, 2025

lore
Share & tools
lore
#0 lore raw

cover Patch review

Please review this set of changes for scarthgap and have comments back by end of day Tuesday, February 11

Passed a-full on autobuilder:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/977

The following changes since commit 37835788d0772568f3551532eacbf810a4a6e47b:

uboot-config: fix devtool modify with kernel-fitimage (2025-01-29 08:19:33 -0800)

are available in the Git repository at:

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

Alexander Kanavin (2):
pkg-config-native: pick additional search paths from
$EXTRA_NATIVE_PKGCONFIG_PATH
selftest/rust: correctly form the PATH environment variable

Deepesh Varatharajan (1):
binutils: stable 2.42 branch update

Esben Haabendal (2):
files: Amend overlayfs unit descriptions with path information
files: overlayfs-create-dirs: Improve mount unit dependency

Harish Sadineni (3):
rust: fix for rust multilib sdk configuration
rust: remove redundant cargo config file oeqa/sdk/context: fix for gtk3 test failure during do_testsdk

Jiaying Song (1):
binutils: File name too long causing failure to open temporary head
file in dlltool

Pedro Ferreira (1):
rust-common.bbclass: soft assignment for RUSTLIB path

Peter Marko (1):
glibc: stable 2.39 branch updates

Ross Burton (1):
oeqa/selftest/rust: skip on all MIPS platforms

Wang Mingyu (1):
gnupg: upgrade 2.4.4 -> 2.4.5

 meta/classes-recipe/rust-common.bbclass       |   2 +-
 meta/files/overlayfs-create-dirs.service.in   |   5 +-
 meta/files/overlayfs-unit.mount.in            |   2 +-
 meta/lib/oeqa/sdk/context.py                  |  12 +-
 meta/lib/oeqa/selftest/cases/rust.py          |  13 +-
 meta/recipes-core/glibc/glibc-version.inc     |   2 +-
 meta/recipes-core/glibc/glibc_2.39.bb         |   2 +-
 .../binutils/binutils-2.42.inc                |   3 +-
 .../0017-dlltool-file-name-too-long.patch     | 208 ++++++++++++++++++
 .../pkgconf/pkgconf/pkg-config-native.in      |   2 +-
 .../pkgconfig/pkgconfig/pkg-config-native.in  |   2 +-
 meta/recipes-devtools/rust/cargo_1.75.0.bb    |  13 ++
 .../rust/rust-cross-canadian.inc              |  24 +-
 meta/recipes-devtools/rust/rust_1.75.0.bb     |  12 +
 .../gnupg/{gnupg_2.4.4.bb => gnupg_2.4.5.bb}  |   2 +-
 15 files changed, 257 insertions(+), 47 deletions(-)
 create mode 100644 meta/recipes-devtools/binutils/binutils/0017-dlltool-file-name-too-long.patch
 rename meta/recipes-support/gnupg/{gnupg_2.4.4.bb => gnupg_2.4.5.bb} (97%)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/13 binutils: stable 2.42 branch update

From: Deepesh Varatharajan <[email protected]>

Below commits on binutils-2.42 stable branch are updated. 758a2290dbd PR32387 ppc64 TLS optimization bug with -fno-plt code ed489bf1574 s390: Add arch15 Concurrent-Functions Facility insns 64e8e16a906 s390: Add arch15 instruction names

Tested on qemux86_64.
There were no additional PASS or FAIL after the update

---
 meta/recipes-devtools/binutils/binutils-2.42.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils-2.42.inc +1 -1
index 41ed39632d..3784d26f48 100644
@@ -20,7 +20,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
 
 CVE_STATUS[CVE-2023-25584] = "cpe-incorrect: Applies only for version 2.40 and earlier"
 
-SRCREV ?= "09ba78f051319e8f8861b26fb9340e21ca973c70"
+SRCREV ?= "758a2290dbdf0d6d6c148c6cf25b2bcfd7a5b84f"
 BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=https"
 SRC_URI = "\
      ${BINUTILS_GIT_URI} \
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/13 glibc: stable 2.39 branch updates

In reply to Steve Sakoman

From: Peter Marko <[email protected]>

Solves CVE-2025-0395

git log:
662516aca8 stdlib: Test using setenv with updated environ [BZ #32588] 1432850ad8 malloc: obscure calloc use in tst-calloc
c1f7bfbe08 Hide all malloc functions from compiler [BZ #32366] 808a84a8b8 Fix underallocation of abort_msg_s struct (CVE-2025-0395) 994b129a35 x86/string: Fixup alignment of main loop in str{n}cmp-evex [BZ #32212] 61daaa7639 x86: Improve large memset perf with non-temporal stores [RHEL-29312] 2c8a7f14fa x86: Avoid integer truncation with large cache sizes (bug 32470) 2c882bf9c1 math: Exclude internal math symbols for tests [BZ #32414] 51da74a97e malloc: add indirection for malloc(-like) functions in tests [BZ #32366] aa8768999e Pass -nostdlib -nostartfiles together with -r [BZ #31753] 350db28393 nptl: initialize cpu_id_start prior to rseq registration 9a0e174a39 nptl: initialize rseq area prior to registration

test results:
Before After Diff
FAIL 208 210 +2
PASS 4906 4905 -1

UNSUPPORTED    230   230     0
XFAIL           16    16     0
XPASS            4     4     0

failed test changes:
- nptl/tst-mutexpi8-static
- stdlib/tst-qsort4
+ malloc/tst-dynarray-fail-mem
+ malloc/tst-malloc_info
+ malloc/tst-malloc_info-malloc-check
+ malloc/tst-malloc_info-malloc-hugetlb2

---
 meta/recipes-core/glibc/glibc-version.inc | 2 +-
 meta/recipes-core/glibc/glibc_2.39.bb     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/glibc/glibc-version.inc +1 -1
index b3b21bd07d..da9227ccca 100644
@@ -1,6 +1,6 @@
 SRCBRANCH ?= "release/2.39/master"
 PV = "2.39+git"
-SRCREV_glibc ?= "dcaf51b41e259387602774829c45222d0507f90a"
+SRCREV_glibc ?= "662516aca8b6bf6aa6555f471055d5eb512b1ddc"
 SRCREV_localedef ?= "fab74f31b3811df543e24b6de47efdf45b538abc"
 
 GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git;protocol=https"
meta/recipes-core/glibc/glibc_2.39.bb +1 -1
index 2484ae1cd9..8373db2c4f 100644
@@ -17,7 +17,7 @@ Allows for ASLR bypass so can bypass some hardening, not an exploit in itself, m
 easier access for another. 'ASLR bypass itself is not a vulnerability.'"
 
 CVE_STATUS_GROUPS += "CVE_STATUS_STABLE_BACKPORTS"
-CVE_STATUS_STABLE_BACKPORTS = "CVE-2024-2961 CVE-2024-33599 CVE-2024-33600 CVE-2024-33601 CVE-2024-33602"
+CVE_STATUS_STABLE_BACKPORTS = "CVE-2024-2961 CVE-2024-33599 CVE-2024-33600 CVE-2024-33601 CVE-2024-33602 CVE-2025-0395"
 CVE_STATUS_STABLE_BACKPORTS[status] = "cpe-stable-backport: fix available in used git hash"
 
 DEPENDS += "gperf-native bison-native"
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/13 gnupg: upgrade 2.4.4 -> 2.4.5

In reply to Steve Sakoman

From: Wang Mingyu <[email protected]>

Changelog:
==========
* gpg,gpgv: New option --assert-pubkey-algo.
* gpg: Emit status lines for errors in the compression layer.
* gpg: Fix invocation with --trusted-keys and --no-options.
* gpgsm: Allow for a longer salt in PKCS#12 files.
* gpgtar: Make --status-fd=2 work on Windows.
* scd: Support for the ACR-122U NFC reader.
* scd: Suport D-TRUST ECC cards.
* scd: Allow auto detaching of kernel drivers; can be disabled with the new compatibility-flag ccid-no-auto-detach.
* scd: Allow setting a PIN length of 6 also with a reset code for openpgp cards.
* agent: Allow GET_PASSPHRASE in restricted mode.
* dirmngr: Trust system's root CAs for checking CRL issuers.
* dirmngr: Fix regression in 2.4.4 in fetching keys via hkps.
* gpg-wks-client: Make option --mirror work properly w/o specifying domains.
* g13,gpg-wks-client: Allow command style options as in "g13 mount foo".
* Allow tilde expansion for the foo-program options.
* Make the getswdb.sh tool usable outside the GnuPG tree.

---
 meta/recipes-support/gnupg/{gnupg_2.4.4.bb => gnupg_2.4.5.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-support/gnupg/{gnupg_2.4.4.bb => gnupg_2.4.5.bb} (97%)
meta/recipes-support/gnupg/gnupg_2.4.5.bb renamed from meta/recipes-support/gnupg/gnupg_2.4.4.bb +1 -1
similarity index 97%
rename from meta/recipes-support/gnupg/gnupg_2.4.4.bb
rename to meta/recipes-support/gnupg/gnupg_2.4.5.bb
index ec75960235..97b5d8856c 100644
@@ -23,7 +23,7 @@ SRC_URI:append:class-native = " file://0001-configure.ac-use-a-custom-value-for-
                                 file://relocate.patch"
 SRC_URI:append:class-nativesdk = " file://relocate.patch"
 
-SRC_URI[sha256sum] = "67ebe016ca90fa7688ce67a387ebd82c6261e95897db7b23df24ff335be85bc6"
+SRC_URI[sha256sum] = "f68f7d75d06cb1635c336d34d844af97436c3f64ea14bcb7c869782f96f44277"
 
 EXTRA_OECONF = "--disable-ldap \
 		--disable-ccid-driver \
Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/13 files: Amend overlayfs unit descriptions with path information

In reply to Steve Sakoman

From: Esben Haabendal <[email protected]>

Having something like

Starting Overlayfs directories setup /home...
Starting Overlayfs directories setup /root...
Finished Overlayfs directories setup /home.
Finished Overlayfs directories setup /root.
Mounting Overlayfs mount unit /home...
Mounting Overlayfs mount unit /root...
Mounted Overlayfs mount unit /root.
Mounted Overlayfs mount unit /home.

is much more informative than

Starting Overlayfs directories setup...
Starting Overlayfs directories setup...
Finished Overlayfs directories setup.
Finished Overlayfs directories setup.
Mounting Overlayfs mount unit...
Mounting Overlayfs mount unit...
Mounted Overlayfs mount unit.
Mounted Overlayfs mount unit.

Especially as the number of overlayfs mount units increase.

(cherry picked from commit 7308b4fc6f51bdf2b8f3b7899ff3758c5968e418)
---
 meta/files/overlayfs-create-dirs.service.in | 2 +-
 meta/files/overlayfs-unit.mount.in          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/files/overlayfs-create-dirs.service.in +1 -1
index c949a6dc73..d8d916365a 100644
@@ -1,5 +1,5 @@
 [Unit]
-Description=Overlayfs directories setup
+Description=Overlayfs directories setup {LOWERDIR}
 Requires={DATA_MOUNT_UNIT}
 After={DATA_MOUNT_UNIT}
 DefaultDependencies=no
meta/files/overlayfs-unit.mount.in +1 -1
index 1d33b7e39c..9c117f2c52 100644
@@ -1,5 +1,5 @@
 [Unit]
-Description=Overlayfs mount unit
+Description=Overlayfs mount unit {LOWERDIR}
 Requires={CREATE_DIRS_SERVICE}
 After={CREATE_DIRS_SERVICE}
 
Signature · 1 line
2.43.0
#5 lore raw

PATCH 5/13 files: overlayfs-create-dirs: Improve mount unit dependency

In reply to Steve Sakoman

From: Esben Haabendal <[email protected]>

The RequiresMountsFor configuration option of systemd.unit (added in systemd version 201) not only adds the Requires and After options for the required mount unit, but it adds them for all mount units required to access the specified path.

So this change is both a simplification, and an improvement.

Not only will all needed mount units be added to Requires and After, but the overlay path does not have to be a mountpoint, but can be at any directory level beneath a mountpoint.

(cherry picked from commit fa2422232a143b21aeea3728abca82100946dbc4)
---
 meta/files/overlayfs-create-dirs.service.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta/files/overlayfs-create-dirs.service.in +1 -2
index d8d916365a..c8431548d7 100644
@@ -1,7 +1,6 @@
 [Unit]
 Description=Overlayfs directories setup {LOWERDIR}
-Requires={DATA_MOUNT_UNIT}
-After={DATA_MOUNT_UNIT}
+RequiresMountsFor={DATA_MOUNT_POINT}
 DefaultDependencies=no
 
 [Service]
Signature · 1 line
2.43.0
#6 lore raw

PATCH 6/13 binutils: File name too long causing failure to open temporary head file in dlltool

In reply to Steve Sakoman

From: Jiaying Song <[email protected]>

During the execution of the command: i686-w64-mingw32-dlltool
--input-def $def_filepath --output-delaylib $filepath --dllname qemu.exe
An error occurred:
i686-w64-mingw32-dlltool: failed to open temporary head file: ..._w64_mingw32_nativesdk_qemu_8_2_2_build_plugins_libqemu_plugin_api_a_h.s

Due to the path length exceeding the Linux system's file name length limit (NAME_MAX=255), the temporary file name generated by the i686-w64-mingw32-dlltool command becomes too long to open. To address this, a new temporary file name prefix is generated using tmp_prefix = prefix_encode ("d", getpid()), ensuring that the file name does not exceed the system's length limit.

Allow for "snnnnn.o" suffix when testing against NAME_MAX, and tidy TMP_STUB handling by overwriting a prior nnnnn.o string rather than copying the entire name.

---
 .../binutils/binutils-2.42.inc                |   1 +
 .../0017-dlltool-file-name-too-long.patch     | 208 ++++++++++++++++++
 2 files changed, 209 insertions(+)
 create mode 100644 meta/recipes-devtools/binutils/binutils/0017-dlltool-file-name-too-long.patch
meta/recipes-devtools/binutils/binutils-2.42.inc +1 -0
index 3784d26f48..8bccf8c56a 100644
@@ -37,5 +37,6 @@ SRC_URI = "\
      file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \
      file://0015-gprofng-change-use-of-bignum-to-bigint.patch \
      file://0016-CVE-2024-53589.patch \
+     file://0017-dlltool-file-name-too-long.patch \
 "
 S  = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0017-dlltool-file-name-too-long.patch new file +208 -0

208 lines not on this page · raw message

Signature · 1 line
2.43.0
#7 lore raw

PATCH 7/13 pkg-config-native: pick additional search paths from $EXTRA_NATIVE_PKGCONFIG_PATH

In reply to Steve Sakoman

From: Alexander Kanavin <[email protected]>

This was prompted by working on librsvg update: the new meson-driven version wants to query values from .pc files residing in its own build directory, and modifies PKG_CONFIG_PATH accordingly.

When using the pkg-config-native wrapper such modifications have no effect, and we have to pass them in manually from the recipe via EXTRA_NATIVE_PKGCONFIG_PATH variable.

This variable is already defined (with an empty value) and appended to PKG_CONFIG_PATH export in the native class, so this simply extends its use to the wrapper.

(Appending to PKG_CONFIG_PATH in the wrapper, instead of resetting it, is not an option as that can lead to contamination with the cross values).

(From OE-Core rev: 2bc050146d47b14d890a1b0db2b55f9057a08b65)

---
 meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in     | 2 +-
 meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in +1 -1
index 9ed30a0d80..fd5ab6b1fa 100644
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-PKG_CONFIG_PATH="@PATH_NATIVE@"
+PKG_CONFIG_PATH="$EXTRA_NATIVE_PKGCONFIG_PATH@PATH_NATIVE@"
 unset PKG_CONFIG_SYSROOT_DIR
 
 pkg-config "$@"
meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in +1 -1
index a9324de4cf..d4bb4f8c06 100644
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-export PKG_CONFIG_PATH="@PATH_NATIVE@"
+export PKG_CONFIG_PATH="$EXTRA_NATIVE_PKGCONFIG_PATH@PATH_NATIVE@"
 export PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
 unset PKG_CONFIG_SYSROOT_DIR
 
Signature · 1 line
2.43.0
#8 lore raw

PATCH 8/13 rust-common.bbclass: soft assignment for RUSTLIB path

In reply to Steve Sakoman

From: Pedro Ferreira <[email protected]>

As a user i want to override RUSTLIB path on a bbclass, lets call it XYZ.bbclass.

If a certain recipe inherits cargo.bbclass and XYZ.bbclass the value of RUSTLIB is dependent on the order of the inherit.

If cargo.bbclass is inherit before XYZ.bbclass this will reflect the desired value of RUSTLIB, on the oposite, if the XYZ.bbclass is inherit before cargo.bbclass then the RUSTLIB defined on rust-common.bbclass will prevail.

Changed definition of RUSTLIB to soft assignment to make it overridable.

(cherry picked from commit 6eeb832f73ffb48f5f05dc47191f60e4599e640f)
---
 meta/classes-recipe/rust-common.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/rust-common.bbclass +1 -1
index 6940093e59..b4b70574a2 100644
@@ -13,7 +13,7 @@ FILES:${PN} += "${rustlibdir}/*.so"
 FILES:${PN}-dev += "${rustlibdir}/*.rlib ${rustlibdir}/*.rmeta"
 FILES:${PN}-dbg += "${rustlibdir}/.debug"
 
-RUSTLIB = "-L ${STAGING_DIR_HOST}${rustlibdir}"
+RUSTLIB ?= "-L ${STAGING_DIR_HOST}${rustlibdir}"
 RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=${TARGET_DBGSRC_DIR}"
 RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}"
 RUSTLIB_DEP ??= "libstd-rs"
Signature · 1 line
2.43.0
#9 lore raw

PATCH 9/13 rust: fix for rust multilib sdk configuration

In reply to Steve Sakoman

From: Harish Sadineni <[email protected]>

YOCTO [#15061]
The rust sdk installs both 'rust.sh' and 'cargo.sh' for lib32 and lib64 in the same location. This causes below error while installing the lib32 & lib64 binaries:

Error: Transaction test error:
file /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/environment-setup.d/cargo.sh
conflicts between attempted installs of rust-cross-canadian-arm-1.67.1-r0.x86_64_nativesdk and
rust-cross-canadian-aarch64-1.67.1-r0.x86_64_nativesdk
file /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/environment-setup.d/rust.sh
conflicts between attempted installs of rust-cross-canadian-arm-1.67.1-r0.x86_64_nativesdk and rust-cross-canadian-aarch64-1.67.1-r0.x86_64_nativesdk
ERROR: Task (virtual:multilib:lib32:/media/build/poky/meta/recipes-sato/images/core-image-sato.bb:do_populate_sdk) failed with exit code '1'

The change includes:
- Prepending '${RUST_TARGET_SYS}' to 'rust.sh' to differentiate between target systems.
- Moving the non-target-specific environment variables to 'nativesdk-cargo' and 'nativesdk-rust', instead of being managed by the cross-canadian recipe.

Backport from oe-core master: https://git.openembedded.org/openembedded-core/commit/?id=40eb4bfe2f100ba5301046ca25110fcc55a640bb

---
 meta/recipes-devtools/rust/cargo_1.75.0.bb         | 13 +++++++++++++
 meta/recipes-devtools/rust/rust-cross-canadian.inc | 10 +---------
 meta/recipes-devtools/rust/rust_1.75.0.bb          | 12 ++++++++++++
 3 files changed, 26 insertions(+), 9 deletions(-)
meta/recipes-devtools/rust/cargo_1.75.0.bb +13 -0
index 50b7e7c7b4..a6d3f1754b 100644
@@ -50,8 +50,21 @@ do_install:append:class-nativesdk() {
 	# sets to libdir but not base_libdir leading to symbol mismatches depending on the
 	# host OS. Fully set LD_LIBRARY_PATH to contain both to avoid this.
 	create_wrapper ${D}/${bindir}/cargo LD_LIBRARY_PATH=${libdir}:${base_libdir}
+	
+	ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d
+	mkdir "${ENV_SETUP_DIR}"
+	CARGO_ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh"
+	
+	cat <<- EOF > "${CARGO_ENV_SETUP_SH}"
+	# Keep the below off as long as HTTP/2 is disabled.
+	export CARGO_HTTP_MULTIPLEXING=false
+	
+	export CARGO_HTTP_CAINFO="\$OECORE_NATIVE_SYSROOT/etc/ssl/certs/ca-certificates.crt"
+	EOF
 }
 
+FILES:${PN} += "${base_prefix}/environment-setup.d"
+
 # Disabled due to incompatibility with libgit2 0.28.x (https://github.com/rust-lang/git2-rs/issues/458, https://bugs.gentoo.org/707746#c1)
 # as shipped by Yocto Dunfell.
 # According to https://github.com/rust-lang/git2-rs/issues/458#issuecomment-522567539, there are no compatibility guarantees between
meta/recipes-devtools/rust/rust-cross-canadian.inc +1 -9
index 8a51a02293..4e2e051f1d 100644
@@ -53,15 +53,12 @@ do_install () {
 
     ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d
     mkdir "${ENV_SETUP_DIR}"
-    RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
+    RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/${RUST_TARGET_SYS}_rust.sh"
 
     RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | sed 's/-/_/g'`
-    RUST_HOST_TRIPLE=`echo ${RUST_HOST_SYS} | tr '[:lower:]' '[:upper:]' | sed 's/-/_/g'`
-    SDKLOADER=${@bb.utils.contains('SDK_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'i686', 'ld-linux.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'aarch64', 'ld-linux-aarch64.so.1', '', d)}${@bb.utils.contains('SDK_ARCH', 'ppc64le', 'ld64.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'riscv64', 'ld-linux-riscv64-lp64d.so.1', '', d)}
 
     cat <<- EOF > "${RUST_ENV_SETUP_SH}"
 	export CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
-	export CARGO_TARGET_${RUST_HOST_TRIPLE}_RUNNER="\$OECORE_NATIVE_SYSROOT/lib/${SDKLOADER}"
 	export RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
 	EOF
 
@@ -80,11 +77,6 @@ do_install () {
 		echo '[target.'${RUST_TARGET_SYS}']' >> "\$CARGO_HOME/config"
 		echo 'linker = "target-rust-ccld"' >> "\$CARGO_HOME/config"
     fi
-
-	# Keep the below off as long as HTTP/2 is disabled.
-	export CARGO_HTTP_MULTIPLEXING=false
-
-	export CARGO_HTTP_CAINFO="\$OECORE_NATIVE_SYSROOT/etc/ssl/certs/ca-certificates.crt"
 	EOF
 }
 
meta/recipes-devtools/rust/rust_1.75.0.bb +12 -0
index b041a5f8e4..b9348bf050 100644
@@ -270,8 +270,20 @@ rust_do_install:class-nativesdk() {
     rm ${D}${libdir}/rustlib/uninstall.sh
     rm ${D}${libdir}/rustlib/install.log
     rm ${D}${libdir}/rustlib/manifest*
+
+    ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d
+    mkdir "${ENV_SETUP_DIR}"
+    RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
+    RUST_HOST_TRIPLE=`echo ${RUST_HOST_SYS} | tr '[:lower:]' '[:upper:]' | sed 's/-/_/g'`
+    SDKLOADER=${@bb.utils.contains('SDK_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'i686', 'ld-linux.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'aarch64', 'ld-linux-aarch64.so.1', '', d)}${@bb.utils.contains('SDK_ARCH', 'ppc64le', 'ld64.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'riscv64', 'ld-linux-riscv64-lp64d.so.1', '', d)}
+
+    cat <<- EOF > "${RUST_ENV_SETUP_SH}"
+	export CARGO_TARGET_${RUST_HOST_TRIPLE}_RUNNER="\$OECORE_NATIVE_SYSROOT/lib/${SDKLOADER}"
+	EOF
 }
 
+FILES:${PN} += "${base_prefix}/environment-setup.d"
+
 EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt"
 rust_do_install:class-target() {
     export PSEUDO_UNLOAD=1
Signature · 1 line
2.43.0
#11 lore raw

PATCH 10/13 rust: remove redundant cargo config file

In reply to Steve Sakoman

From: Harish Sadineni <[email protected]>

YOCTO [#15061]
The rust target and linker are getting setting from the sdk environment and so the config file is not needed. The redundant config file geneartion is removed.

Backport from oe-core master: https://git.openembedded.org/openembedded-core/commit/?id=d5f78816d2ad0f3e43ce883eef199d1683cfcbb4

---
 meta/recipes-devtools/rust/rust-cross-canadian.inc | 14 --------------
 1 file changed, 14 deletions(-)
meta/recipes-devtools/rust/rust-cross-canadian.inc +0 -14
index 4e2e051f1d..dbf997560b 100644
@@ -64,20 +64,6 @@ do_install () {
 
     chown -R root.root ${D}
 
-    CARGO_ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh"
-    cat <<- EOF > "${CARGO_ENV_SETUP_SH}"
-	export CARGO_HOME="\$OECORE_TARGET_SYSROOT/home/cargo"
-	mkdir -p "\$CARGO_HOME"
-        # Init the default target once, it might be otherwise user modified.
-	if [ ! -f "\$CARGO_HOME/config" ]; then
-		touch "\$CARGO_HOME/config"
-		echo "[build]" >> "\$CARGO_HOME/config"
-		echo 'target = "'${RUST_TARGET_SYS}'"' >> "\$CARGO_HOME/config"
-		echo '# TARGET_SYS' >> "\$CARGO_HOME/config"
-		echo '[target.'${RUST_TARGET_SYS}']' >> "\$CARGO_HOME/config"
-		echo 'linker = "target-rust-ccld"' >> "\$CARGO_HOME/config"
-    fi
-	EOF
 }
 
 FILES:${PN} += "${base_prefix}/environment-setup.d"
Signature · 1 line
2.43.0
#12 lore raw

PATCH 11/13 oeqa/sdk/context: fix for gtk3 test failure during do_testsdk

In reply to Steve Sakoman

From: Harish Sadineni <[email protected]>

The do_testsdk for lib32-core-image-sato aborts with below error:
configure: error: Package requirements (gtk+-3.0) were not met:
No package 'gtk+-3.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

This causes due to an absolute path name in 'sdk_env', which is now stripped to have only the environment name.

Backport from oe-core master: https://git.openembedded.org/openembedded-core/commit/?id=386e4132a9ced75599d92610cf5c0e8fe907c3b6

---
 meta/lib/oeqa/sdk/context.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
meta/lib/oeqa/sdk/context.py +7 -5
index 01c38c24e6..77e6a98f39 100644
@@ -41,11 +41,13 @@ class OESDKTestContext(OETestContext):
 
     def hasTargetPackage(self, pkg, multilib=False, regex=False):
         if multilib:
-            # match multilib according to sdk_env
-            mls = self.td.get('MULTILIB_VARIANTS', '').split()
-            for ml in mls:
-                if ('ml'+ml) in self.sdk_env:
-                    pkg = ml + '-' + pkg
+            stripped_sdk_env = os.path.basename(self.sdk_env)
+            if stripped_sdk_env.startswith('environment-setup-'):
+                # match multilib according to sdk_env
+                mls = self.td.get('MULTILIB_VARIANTS', '').split()
+                for ml in mls:
+                    if ('ml'+ml) in stripped_sdk_env:
+                        pkg = ml + '-' + pkg
         return self._hasPackage(self.target_pkg_manifest, pkg, regex=regex)
 
 class OESDKTestContextExecutor(OETestContextExecutor):
Signature · 1 line
2.43.0
#13 lore raw

PATCH 12/13 oeqa/selftest/rust: skip on all MIPS platforms

In reply to Steve Sakoman

From: Ross Burton <[email protected]>

As per "The rustc book"[1], mips*-unknown-linux-* are "tier 3" targets:

Tier 3 targets are those which the Rust codebase has support for, but which the Rust project does not build or test automatically, so they may or may not work.

We already skip qemumips in this selftest, but we're now also seeing failures with qemumips64 so refactor the test to skip all machines where the architecture is mips or mips64.

[1] https://doc.rust-lang.org/nightly/rustc/platform-support.html

(cherry picked from commit 177e268811c04260923ac4b16fa047315304add0)
---
 meta/lib/oeqa/selftest/cases/rust.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
meta/lib/oeqa/selftest/cases/rust.py +3 -5
index ad14189c6d..ca98f8c0fd 100644
@@ -3,6 +3,7 @@ import os
 import subprocess
 import time
 from oeqa.core.decorator import OETestTag
+from oeqa.core.decorator.data import skipIfArch
 from oeqa.core.case import OEPTestResultTestCase
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu, Command
@@ -38,15 +39,12 @@ def parse_results(filename):
 @OETestTag("toolchain-user")
 @OETestTag("runqemu")
 class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
+
+    @skipIfArch(['mips', 'mips64'])
     def test_rust(self, *args, **kwargs):
         # Disable Rust Oe-selftest
         #self.skipTest("The Rust Oe-selftest is disabled.")
 
-        # Skip mips32 target since it is unstable with rust tests
-        machine = get_bb_var('MACHINE')
-        if machine == "qemumips":
-            self.skipTest("The mips32 target is skipped for Rust Oe-selftest.")
-
         # build remote-test-server before image build
         recipe = "rust"
         start_time = time.time()
Signature · 1 line
2.43.0
#14 lore raw

PATCH 13/13 selftest/rust: correctly form the PATH environment variable

In reply to Steve Sakoman

From: Alexander Kanavin <[email protected]>

There were two issues here:

- the path to native python was not included, so the test suite was running with host python, causing failures due to host python being given native libraries:
https://autobuilder.yoctoproject.org/typhoon/#/builders/148/builds/1711/steps/12/logs/stdio
(rust recipe uses native python throughout)

- tmp/hosttools was listead ahead of native-sysroot/usr/bin

(cherry picked from commit aec96b5aec8d6b4a5ae8a719ca05bb727a6197cb)
---
 meta/lib/oeqa/selftest/cases/rust.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
meta/lib/oeqa/selftest/cases/rust.py +2 -3
index ca98f8c0fd..26f132edc4 100644
@@ -208,9 +208,8 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
             tmpdir = get_bb_var("TMPDIR", "rust")
 
             # Set path for target-poky-linux-gcc, RUST_TARGET_PATH and hosttools.
-            cmd = " export PATH=%s/recipe-sysroot-native/usr/bin:$PATH;" % rustlibpath
-            cmd = cmd + " export TARGET_VENDOR=\"-poky\";"
-            cmd = cmd + " export PATH=%s/recipe-sysroot-native/usr/bin/%s:%s/hosttools:$PATH;" % (rustlibpath, tcpath, tmpdir)
+            cmd = "export TARGET_VENDOR=\"-poky\";"
+            cmd = cmd + " export PATH=%s/recipe-sysroot-native/usr/bin/python3-native:%s/recipe-sysroot-native/usr/bin:%s/recipe-sysroot-native/usr/bin/%s:%s/hosttools:$PATH;" % (rustlibpath, rustlibpath, rustlibpath, tcpath, tmpdir)
             cmd = cmd + " export RUST_TARGET_PATH=%s/rust-targets;" % rustlibpath
             # Trigger testing.
             cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip
Signature · 1 line
2.43.0
#10 lore raw

Patchtest results for [OE-core][scarthgap 09/13] rust: fix for rust multilib sdk configuration

In reply to Steve Sakoman

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/scarthgap-09-13-rust-fix-for-rust-multilib-sdk-configuration.patch

FAIL: test max line length: Patch line too long (current length 375, maximum is 200) (test_metadata.TestMetadata.test_max_line_length)

PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!

#15 lore raw

Patchtest results for [OE-core][scarthgap 13/13] selftest/rust: correctly form the PATH environment variable

In reply to Steve Sakoman

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/scarthgap-13-13-selftest-rust-correctly-form-the-PATH-environment-variable.patch

FAIL: test max line length: Patch line too long (current length 233, maximum is 200) (test_metadata.TestMetadata.test_max_line_length)

PASS: pretest pylint (test_python_pylint.PyLint.pretest_pylint)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test pylint (test_python_pylint.PyLint.test_pylint)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)

SKIP: pretest src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE check ignore: No modified recipes or older target branch, skipping test (test_metadata.TestMetadata.test_cve_check_ignore)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!