Commit Graph

67 Commits

Author SHA1 Message Date
Deepthi Hemraj
8f644a65b6 rust: Upgrade 1.80.0->1.80.1
https://blog.rust-lang.org/2024/08/08/Rust-1.80.1.html

Testing Summary for rust_1.80.1

Target       pass       skipped
x86_64       18254         434
x86          18084         604
ARM64        18111         577
ARM          18067         621
ppc          18035         653

(From OE-Core rev: 41da52480931c5ff90884c9d658075b8885abe8c)

Signed-off-by: Sunil Dora <SunilKumar.Dora@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-21 12:16:28 +00:00
Harish Sadineni
30bf8dcc25 rust: Upgrade 1.79.0->1.80.0
Update the patch files with rust v1.80.0.

The patch repro-issue-fix-with-cc-crate-hashmap.patch addresses the rust
 reprouciblity issue by correcting the way hash values are generated for
 different build paths.

https://blog.rust-lang.org/2024/07/25/Rust-1.80.0.html

(From OE-Core rev: d68449da0df795abe3233383a82d0b6b7908d736)

Signed-off-by: Sunil Dora <SunilKumar.Dora@windriver.com>
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-18 22:09:02 +00:00
Peter Tatrai
b82bb08f15 rust: Add patch to increase timeout in process-sigpipe rust selftest
This commit adds a patch to increase the timeout in the process-sigpipe
rust selftest to prevent occasional failures under heavy server load.
The patch aims to reduce the likelihood of false negatives when the test
environment is overloaded.

Patch file:
* oeqa-selftest-Increase-timeout-in-process-sigpipe-ru.patch

Fixes [YOCTO #15625]

(From OE-Core rev: 12c85933e2150ba78a8a914787e400c95c5cf585)

Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-12 23:54:35 +00:00
Ranjitsinh Rathod
436d1df93b rust: set CVE_STATUS for CVE-2024-43402
As per NVD, this CVE only affects to Windows platform
Link: https://nvd.nist.gov/vuln/detail/CVE-2024-43402

(From OE-Core rev: dcb3016f9c0e8e72642cccf335da65345a2f0c92)

Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-15 11:47:24 +01:00
Yash Shinde
caa36ffb08 rust: Upgrade 1.78.0->1.79.0
Update the patch files with rust v1.79.0.

Drop the following backported patch which is merged
with rust v1.79 upgrade.

- cross-targets-backport.patch

https://blog.rust-lang.org/2024/06/13/Rust-1.79.0.html

(From OE-Core rev: 0e20d8e0a292f720c9ed419547d8f6d738c5d4d8)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-29 21:58:19 +01:00
Yash Shinde
f0b62cf9a8 rust: Upgrade 1.77.2->1.78.0
* Drop the following backported patches which are merged
with rust v1.78 upgrade.

- 0001-Revert-Map-source-absolute-paths-to-OUT_DIR-as-relat.patch
- repro-issue-fix-with-v175.patch
- deadcode-backport.patch

https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html

(From OE-Core rev: a3fb378afcc1fb01e9813fe902dbd6090ded75d7)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-20 11:55:36 +01:00
Yash Shinde
ea471cf48c rust: Upgrade 1.77.1->1.77.2
https://blog.rust-lang.org/2024/04/09/Rust-1.77.2.html

(From OE-Core rev: c3a996c3b06b11a5e2b07dbf820f3e3eb1e28782)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-09 22:33:38 +01:00
Yash Shinde
961bafda94 rust: Upgrade 1.77.0->1.77.1
https://blog.rust-lang.org/2024/03/28/Rust-1.77.1.html

(From OE-Core rev: a7ca97ffbb23602ad79c3dc1819cfedd0b969075)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-09 22:33:38 +01:00
Yash Shinde
41094aece8 rust: Upgrade 1.76.0->1.77.0
* Drop backported patch 0001-Handle-vendored-sources-when-remapping-paths.patch
    as it's merged with rust v1.77.0.

     https://blog.rust-lang.org/2024/03/21/Rust-1.77.0.html

(From OE-Core rev: 8b6b224fc116150c0af658473eecd05b742de7b1)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-09 22:33:38 +01:00
Yash Shinde
4c9d7632f6 rust: Oe-selftest changes for rust v1.77
Update the file paths for v1.77 and fix the dead code error as follows:

    Compiling coverage-dump v0.1.0 (/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.77.0/rustc-1.77.0-src/src/tools/coverage-dump)
    error: field `0` is never read
       --> src/tools/coverage-dump/src/covfun.rs:222:15
        |
    222 |     Expansion(u32),
        |     --------- ^^^
        |     |
        |     field in this variant
        |
        = note: `-D dead-code` implied by `-D warnings`
        = help: to override `-D warnings` add `#[allow(dead_code)]`
    help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
        |
    222 |     Expansion(()),
        |               ~~

    error: could not compile `coverage-dump` (bin "coverage-dump") due to 1 previous error

    Only the required change is backported here to run the build without any errors.
    Other changes are merged with the commit in v1.78.

    Reference: 9a5034a20e (diff-d4ecc6273352a2a8ebd02c45233d9bff7c6694f20b67ddad0614af7a89c06748)

(From OE-Core rev: 072df9d3d8792a6f0250cc5e37545f04e6a046ec)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-09 22:33:38 +01:00
Yash Shinde
66d81c81b6 rust: reproducibility issue fix with v1.76
A few crates are using the updated version of the 'cc' crate and
this is causing the generated object file names containing a unique hashmap id.
The hashmap addition to generated files is reverted here.

(From OE-Core rev: 25fed23ea9dcd1e7f0c11a1e3a988a33d5676c0b)

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-09 22:33:38 +01:00
Yash Shinde
be70d81a3c rust: Upgrade 1.75.0->1.76.0
* Drop "--doc" option for rust oe-selftest since
it is not supported on bootstrap builds for
cross-targets.

* Drop the following backported patches which are merged
with rust v1.76 upgrade.

- custom-target-cfg.patch
- rustc-bootstrap.patch
- rv32-missing-syscalls.patch
- target-build-value.patch

https://blog.rust-lang.org/2024/02/08/Rust-1.76.0.html
* Drop 'rust-rustdoc' and 'rust-dbg' from 'exclude_packages' list
to check for rust reproducibility.

(From OE-Core rev: 71d17ed3c7be029fc68e9dd3f5d6c4aa72ef861a)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-09 22:33:38 +01:00
Yash Shinde
ab1bd4a04b rust: Oe-selftest fixes for rust v1.76
Add the failing tests in rust v1.76 to the exclude list
and add "ignore" tags to ignore failing unit test cases.

(From OE-Core rev: 75399802515ac423503e637281a4585dd00d7c75)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-09 22:33:38 +01:00
Sundeep KOKKONDA
e2e7017350 rust: rustdoc reproducibility issue fix
The 'codegen-units' option split the crate into multiple compilation units for parallel compilation. Currently, this split is causing the rustdoc to generate differnt binary between the builds.
To fix this the codegen-units & the lto options are disabled.

More info about options:
https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units
https://doc.rust-lang.org/rustc/codegen-options/index.html#lto

(From OE-Core rev: 0c00875de10b171f4ff2990af351a8124ec7e972)

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-30 12:32:53 +01:00
Alexander Kanavin
d419566eda rust: add reproducibility patch to eliminate host leakage
[YOCTO #15185]

(From OE-Core rev: 924df18b47e9a69fa295bafe37bdb39d8eaea2bb)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 15:09:01 +01:00
Alexander Kanavin
8240d506fc rust: correctly link rust-snapshot into build/stage0
This does not seem to be used in regular builds, but is beneficial
in rust selftest, where it allows dropping a custom patch
that is unsuitable for upstream (and was rejected by them).

Also remove an obsolete comment that seems related to the code
but describes something that was resolved long time ago.

I have confirmed that the rust selftest continues to pass with just
this one commit on top of master (as the following changes do break
the selftest).

(From OE-Core rev: bf5732e2b235ce06fa1f24fe8f0dbcbc068500e3)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-22 10:21:26 +01:00
Harish Sadineni
0304adce22 rust: set CVE_STATUS for CVE-2024-24576
CVE-2024-24576 only applies when invoking batch files (with the `bat` and `cmd` extensions) on Windows & No other platform or use is affected.
More details about CVE is here: https://nvd.nist.gov/vuln/detail/CVE-2024-24576

(From OE-Core rev: 28eddfa53494c7560861feff84be3f3a5a46aecb)

Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-10 18:35:09 +01:00
Yash Shinde
3970a48885 rust: reproducibility issue fix with v1.75
With 1.75 rust release, the '.rustc' section of shared object libs are embedded with absolute path names which is casuing reproducibiluty issues.
This change will fix the path name format back to '/rust/$hash' as in earlier versions.

Below are the links for detailed bug description & discusssion with upstream rust.
https://github.com/rust-lang/rust/issues/120825#issuecomment-1964307219
https://github.com/rust-lang/rust/issues/120825#issuecomment-1964652656

(From OE-Core rev: a80ce6e3c023809d1ec13d19e8acb25770b54737)

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-01 09:31:11 +00:00
Yash Shinde
a62cee4479 rust: Upgrade 1.74.1 -> 1.75.0
* Drop backported musl fixes.

* Set `change-id` rather than `changelog-seen`
to fix build warning.

* Add fixes for 4b7e0a0b56aa24 ("Handle vendored sources
when remapping paths") which otherwise cause build failures:

| thread 'main' panicked at src/core/builder.rs:1795:26:
| std::fs::read_dir(registry_src) failed with No such file or directory (os=
 error 2)

https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html

(From OE-Core rev: 9aec2c6c777388bb3129aa4c4f27a40f912522b4)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-01 09:31:10 +00:00
Khem Raj
f31fe0b5b5 rust/cargo: Build fixes to rust for rv32 target
(From OE-Core rev: 0b1666b921b99732798b62b900436ab79876a6a2)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08 10:59:06 +00:00
Yash Shinde
bb630c3e29 rust: Enable rust oe-selftest.
* Enable rust oe-selftest.

* Include the dependent patches for rust oe-selftest in
  meta/recipes-devtools/rust/rust-source.inc

* Disable rust oe-selftest for mips32 target (Rust upstream has classified it into tier 3 target,
  for which the Rust project does not build or test automatically) as it is unstable with rust tests.
  https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3

* The testing is done on arm32, arm64, mips64, x86 and  x86_64 targets on Ubuntu 22.04.

(From OE-Core rev: 8f3a2841540fc4779bbd7e11d910edcdc8b47683)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:06:55 +00:00
Alex Kiernan
f00d4c3029 rust: Upgrade 1.74.0 -> 1.74.1
https://blog.rust-lang.org/2023/12/07/Rust-1.74.1.html

(From OE-Core rev: b98373075c6cc416bd0375b98b6bbdddf599d9a1)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-30 11:03:08 +00:00
Alex Kiernan
8fd396bc3d rust: Upgrade 1.73.0 -> 1.74.0
Replace musl fixes with backports from upstream.

Add sysconfdir to config.toml to fix:

| thread 'main' panicked at install.rs:92:9:
| User doesn't have write access on `install.sysconfdir` path in `config.toml`.

https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html

(From OE-Core rev: 84f46dd2503bb0ef238fef0097c66fda88f6cbda)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-30 11:03:08 +00:00
Alex Kiernan
537ed2b654 rust: Upgrade 1.72.1 -> 1.73.0
https://blog.rust-lang.org/2023/10/05/Rust-1.73.0.html

(From OE-Core rev: 728c40b939c6af6358a483237298ca834cbb8993)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-30 11:03:08 +00:00
Alex Kiernan
aa0b0d0cc2 rust: Upgrade 1.72.0 -> 1.72.1
https://blog.rust-lang.org/2023/09/19/Rust-1.72.1.html

(From OE-Core rev: d1386bbf2211c7616527e62f2f7b069a935b0d68)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-30 11:03:08 +00:00
Alex Kiernan
6eabf7e4b4 rust: Upgrade 1.71.1 -> 1.72.0
Drop getrandom-open64.patch (merged upstream).

Revert c4f414f449
("Map source absolute paths to OUT_DIR as relative. (#684)") which
causes hashed versions of the build path to be used as part of the
filename of generated objects and hence reproducibility issues.

https://blog.rust-lang.org/2023/08/24/Rust-1.72.0.html

(From OE-Core rev: 30637cdeb31fae02544fdc643a455d0ebb126ee6)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-30 11:03:08 +00:00
Alex Kiernan
66ba893285 rust: Upgrade 1.71.0 -> 1.71.1
https://blog.rust-lang.org/2023/08/03/Rust-1.71.1.html

(From OE-Core rev: ad4369d7901c1239e5f07473b1f2517edc4a23ea)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-13 11:49:43 +00:00
Alex Kiernan
93292feac4 rust: Upgrade 1.70.0 -> 1.71.0
Switch libstd-rs to use the dummy `sysroot` crate which represents the
standard library crates. Target getrandom-open64.patch at 0.2.8 (merged
for 0.2.9). Drop bootstrap_fail.patch (backport merged).

https://blog.rust-lang.org/2023/07/13/Rust-1.71.0.html

(From OE-Core rev: c3eba94ee44adcd3a0aa61f6b087c15c02e4697f)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-13 11:49:42 +00:00
Alex Kiernan
8078310674 rust: Drop TARGET_VENDOR export
This was used by crossbeam_atomic.patch, but that patch was removed as
part of the 1.69.0 upgrade.

(From OE-Core rev: 3753997d6ec19e8cd082f9a602ebe4a7c1308c36)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-01 11:48:25 +00:00
Yash Shinde
c496b1eaf4 oeqa/selftest/rust: Add failed test cases to exclude list for Rust Oe-selftest
* Add the failing test cases in exclude_list to exclude them from testing during the Rust Oe-selftest.

* Drop  meta/recipes-devtools/rust/files/rust-oe-selftest.patch file as the failing tests are
  moved from being a patch to exclude_list in meta/lib/oeqa/selftest/cases/rust.py.

* When updating to a newer version of Rust, it is manually needed to update the exclude_list. The tests that fail are observed to
  work on some versions and fail on others. These tests have been excluded in order to successfully complete testing of Rust Oe-selftest.

* The tests that are passed and skipped are as follows-

Target                  PASS                    SKIPPED

ARM                     15507                    428
ARM64                   15535                    400
MIPS64                  15479                    456
X86                     15528                    407
X86-64                  15643                    292

Also, time the test execution and pass the time taken for inclusion in the test report.

[RP: Note duration addiion in the commit log]
(From OE-Core rev: e81197c4d3b36e9ad52e56708c21987cacd13147)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-30 07:54:44 +01:00
Yash Shinde
9b07dbc41f rust: Fix BOOTSTRAP_CARGO failure during Rust Oe-selftest
BOOTSTRAP_CARGO command fails due to codegen flags like `-Cpanic` were
prevented from being reflected in the current target configuration which
leads to Rust build(rust version 1.70) failure in Oe-selftest.

Upstream-Status: Backport [9dffb52738]

(From OE-Core rev: a48e3612b5dc0e58a89f88a914365e926101c90b)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-30 07:54:44 +01:00
Yash Shinde
a1096d4a57 oeqa/selftest: Add rust selftests
The patch implements Rust testing framework similar to other selftest,
specifically the gcc selftest in OE. It uses the client and server
based method to test the binaries for cross-target on the image.
The test framework is a wrapper around the Rust build system as ./x.py
test. It tests many functionalities of Rust distribution like tools,
documentation, libraries, packages, tools, Cargo, Crater etc.
Please refer the following link for detailed description of Rust
testing:-
https://rustc-dev-guide.rust-lang.org/tests/intro.html#tool-tests

To support the rust tests in oe-core, the following functions were
added:-
setup_cargo_environment(): Build bootstrap and some early stage tools.
do_rust_setup_snapshot(): Install the snapshot version of rust binaries.
do_configure(): To generate config.toml
do_compile(): To build "remote-test-server" for qemu target image.

Approximate Number of Tests Run in the Rust Testsuite :- 18000
Approximate Number of Tests that FAIL in bitbake environment :- 100-150
Normally majority of the testcases are present in major folder "test/"
It contributes to more than 80% of the testcases present in Rust test
framework. These tests pass as expected on any Rust versions without
much fuss. The tests that fail are of less important and contribute to
less than 2% of the total testcases. These minor tests are observed to
work on some versions and fail on others. They have to be added, ignored
or excluded for different versions as per the behavior.
These tests have been ignored or excluded in the Rust selftest
environment to generate success of completing the testsuite.

These tests work in parallel mode even in the skipped test mode as
expected. Although the patch to disable tests is large, it is very simple
in that it only disables tests. When updating to a newer version of Rust,
the patch can usually be ported in a day.

Tested for X86, X86-64, ARM, ARM64 and MIPS64 on Ubuntu 22.04.
(From OE-Core rev: 7c3346d8fbe85302b605bb3f772b029ea7bfaa6c)

Signed-off-by: pgowda <pgowda.cve@gmail.com>
Signed-off-by: Vinay Kumar <vinay.m.engg@gmail.com>
Signed-off-by: Yash Shinde <yashinde145@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-19 18:00:32 +01:00
Alexander Kanavin
f01cd7aeaf rust-common.bbclass: move musl-specific linking fix from rust-source.inc
This needs to be done for any item that is linked under rustc,
and not just rust itself. Latest python-cryptography exposes the issue.

(From OE-Core rev: d3811228747590ea06e8d68be4785d45ec9c478f)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-27 16:23:40 +01:00
Alex Kiernan
5035a8588b rust: Upgrade 1.69.0 -> 1.70.0
Drop 0035-cmake-Enable-64bit-off_t-on-32bit-glibc-systems.patch as this
is merged upstream in rust-llvm.

https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html

(From OE-Core rev: d1af583c290eb0cff5e36363f7531832a863a1a8)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-07 23:41:19 +01:00
Alex Kiernan
b17491f7f1 rust: Upgrade 1.68.2 -> 1.69.0
Rebase patches, drop crossbeam_atomic is this fully merged upstream.

https://blog.rust-lang.org/2023/04/20/Rust-1.69.0.html

(From OE-Core rev: 39e05f9b0fdc3f76f8b80a12989f78614bc9ea5c)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-05 11:07:25 +01:00
Alex Kiernan
b205ab58a6 rust: Upgrade 1.68.1 -> 1.68.2
Changes:

* Update the GitHub RSA host key bundled within Cargo. The key was
  rotated by GitHub on 2023-03-24 after the old one leaked.
* Mark the old GitHub RSA host key as revoked. This will prevent Cargo
  from accepting the leaked key even when trusted by the system.
* Add support for @revoked and a better error message for
  @cert-authority in Cargo’s SSH host key verification

(From OE-Core rev: 4563432b41026adc56c54452984b19ab64e7406e)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-13 11:56:07 +01:00
Khem Raj
9200d01057 cargo: Fix build on musl/riscv
libc needs fix for defining scope of SOCK_SEQPACKET

(From OE-Core rev: 378da16ebe2917f26f9fe8cf654bced09ec6ecfe)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-13 11:56:07 +01:00
Alexander Kanavin
6cfa4e540c rust: update 1.67.1 -> 1.68.1
Rebase patches; one of the vendored crossbeam versions
has been removed upstream, and so crossbeam_atomic.patch
is adjusted accordingly.

Replace getrandom-open64.patch with a backport.

(From OE-Core rev: f5accb4fae49342cbec21718ae7a427615bfcedd)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-04-04 13:11:50 +01:00
Alexander Kanavin
5b3b5a514f rust: update 1.67.0 -> 1.67.1
(From OE-Core rev: d80c1e0270cdb35a29863eefaa5a8be2a2841631)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-20 15:18:30 +00:00
Alex Kiernan
a10ec437b1 rust: Upgrade 1.66.1 -> 1.67.0
Disable ZStd to avoid needing libzstd in llvm (mirrors zlib disable).
Generate complete list of rust-snapshot artefacts from src/stage0.json.
Drop clippy-driver reproducibility change as the code is gone from
upstream.

Release notes:
  https://releases.rs/docs/1.67.0/

License-Update: Unicode-TOU text added (already in our license string)
(From OE-Core rev: 4900e0c5cb8a092a1d77d4f26249afa59b241da6)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-31 17:11:07 +00:00
Alex Kiernan
afd2d15923 rust: Upgrade 1.66.0 -> 1.66.1
Changes:
  Added validation of SSH host keys for git URLs in Cargo (CVE-2022-46176)

(From OE-Core rev: 3d31afc5666eda95032d0be47ff815859550a65f)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-15 12:23:41 +00:00
Alex Kiernan
cc9244ca70 rust: Merge all rustc-source patches into rust-source.inc
With the dim-sum approach to patching we had the same patch applied in
many places, but not all, so that there were no guarantees that we were
actually building agaginst the same thing in all recipes.

(From OE-Core rev: 550c273f38d8e6d2d431908023e213c6b018d7ed)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-12 23:08:58 +00:00
Khem Raj
a50bad0c58 rust: Fix build with 64bit time_t
The vendored copy of zlib undefines _FILE_OFFSET_BITS when
_LARGEFILE64_SOURCE is defined and enabling 64bit time_t requires 64bit
off_t ( _FILE_OFFSET_BITS=64 ), therefore remove this from the
zlib module

(From OE-Core rev: 73e56624e815c52308a81852430a8bb050a0fc58)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-06 12:03:47 +00:00
Khem Raj
755540ec8f rust,libstd-rs: Fix build with latest musl
newer musl do not provide lfs64 functions anymore since off_t is always
64bit on musl using normal functions would suffice

(From OE-Core rev: f01b2ab83068e4d7f263c31dca2a3fa9ef77a98e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-31 17:08:29 +00:00
Khem Raj
96df183b60 rust: Do not use open64 on musl in getrandom crate
LFS64 functions are deprecated in latest musl

(From OE-Core rev: 3b63303c62f9d50d835096602f9e09669779fa3e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-31 17:08:29 +00:00
Alex Kiernan
4323ddb8a1 rust: Move musl-x86 fix for __stack_chk_fail_local to rust-source
Any consumer of rust-source (potentially) needs this, so move to
rust-source.inc

(From OE-Core rev: 3c88cf98361a8f1c6f5183cc8887cccfad9d08ba)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-28 23:59:56 +00:00
Alejandro Hernandez Samaniego
cb33d63060 rust: Enable building rust from stable, beta and nightly channels
Rust follows the train release model via the stable, beta and nightly channels,
by default we build rust from the stable channel, however there are certain
features which are only available in the beta or nightly channels.

Make these channels available by setting a RUST_CHANNEL variable which defaults
to stable making this change transparent to the user.

The snapshot version used by rust during its compilation wont necessarily match
the version being built, specially if were building from an unstable channel,
to avoid confusion rename this to SNAPSHOT_VERSION and use RUST_VERSION for the
version to be built, which is automatically defined to PV.

Append -beta or -nightly to rusts PV for signature awareness.

It is important to note that this does not build rust from the beta/nightly
published tarball (which today build rust v1.67.0 and v1.68.0 respectively),
instead this builds rust from the current selected version (1.66.0) and enables
the beta/nightly features for that version.

Setting the variable RUST_CHANNEL=nightly results in the following:

$ rustc -Vv
rustc 1.66.0-nightly

(From OE-Core rev: 807a52686682d0d0a151ea3dadd99880feb67cc0)

Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-21 10:16:31 +00:00
Alex Kiernan
e55f3f911f rust: update 1.65.0 -> 1.66.0
Drop backported patch ENOTSUP constant for riscv32/musl.

Release notes:
  https://blog.rust-lang.org/2022/12/15/Rust-1.66.0.html

License-Update: Upstream has added Unicode Terms of Use license
  (Unicode-TOU).
(From OE-Core rev: e6a9e1ea7be842dcde109e952fbc7dc08d1577a2)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-17 23:49:56 +00:00
Alex Kiernan
4e16d1c1f6 rust: update 1.64.0 -> 1.65.0
Release notes:
  https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html

(From OE-Core rev: fa8890188e8971a5707bae1504cb010b54ed3cae)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-07 14:32:42 +00:00
Alex Kiernan
b72193a602 rust: update 1.63.0 -> 1.64.0
Release notes:
  https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html

(From OE-Core rev: 1d81fb264580b96c405075fcfd2a82a6f74b9630)

Signed-off-by: Alex Kiernan <alexk@zuma.ai>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-10-26 12:28:39 +01:00