Repository navigation
rust: Upgrade rust to 1.98.1 #18785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
rust: Upgrade rust to 1.98.1 #18785
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e9f497e
rust: Upgrade rust to 1.98.1
74940f6
Remove unwanted CVE patches
5d8f870
Update cgmanifest
dc0ddb6
update patches
5e724d2
Update license exceptions
0ce4c9a
Rebase
a0151af
Fix patch number for rustix-remove-rustc-attrs.patch in kata-containe…
253c2e2
update changelog entry for rust-bootstrap
ed53bde
Rebase
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
128 changes: 128 additions & 0 deletions
128
SPECS-EXTENDED/tardev-snapshotter/rustix-remove-rustc-attrs.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| From 091d765c17cedc6d0f1828c74f001718e256ab35 Mon Sep 17 00:00:00 2001 | ||
| From: Kavya Sree Kaitepalli <[email protected]> | ||
| Date: Thu, 10 Sep 2026 15:49:19 +0000 | ||
| Subject: [PATCH] Backport upstream rustix#1663 to remove rustc_attrs | ||
|
|
||
| Rust removed support for the internal rustc_layout_scalar_valid_range_start | ||
| /_end and rustc_nonnull_optimization_guaranteed attributes for external | ||
| crates starting around rustc 1.97 (rust-lang/rust#155433, | ||
| rust-lang/rust#156510), as part of an in-progress migration to pattern | ||
| types. tardev-snapshotter's Makefile builds with RUSTC_BOOTSTRAP=1, which | ||
| lets this crate's build.rs probe (use_feature_or_nothing("rustc_attrs")) | ||
| successfully detect #![feature(rustc_attrs)] support and enable the | ||
| rustc_attrs cfg, activating the now-forbidden attributes on Errno, | ||
| BorrowedFd, and OwnedFd: | ||
|
|
||
| error: attributes starting with `rustc` are reserved for use by the | ||
| `rustc` compiler | ||
| error: cannot find attribute `rustc_layout_scalar_valid_range_start` in | ||
| this scope | ||
|
|
||
| - build.rs: remove the rustc_attrs feature probe | ||
| - src/lib.rs: remove the now-unreachable feature(rustc_attrs) gate | ||
| - src/backend/linux_raw/io/errno.rs: unconditionally allow | ||
| unused_unsafe, and comment out the two scalar-valid-range attributes | ||
| on Errno | ||
| - src/io/fd/owned.rs: comment out the scalar-valid-range / | ||
| nonnull-optimization attributes on BorrowedFd and OwnedFd | ||
|
|
||
| This only forgoes niche-layout optimizations on these three internal | ||
| types and has no other functional effect. | ||
|
|
||
| Upstream Patch Reference: https://github.com/bytecodealliance/rustix/commit/aab946409792a9363cbac644c2fd0f7b2762f071.patch | ||
| --- | ||
| .../rustix-0.37.27/build.rs | 1 - | ||
| .../rustix-0.37.27/src/backend/linux_raw/io/errno.rs | 6 +++--- | ||
| .../rustix-0.37.27/src/io/fd/owned.rs | 12 ++++++------ | ||
| .../rustix-0.37.27/src/lib.rs | 1 - | ||
| 4 files changed, 9 insertions(+), 11 deletions(-) | ||
|
|
||
| diff --git a/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/build.rs b/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/build.rs | ||
| index 320b305..41df155 100644 | ||
| --- a/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/build.rs | ||
| +++ b/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/build.rs | ||
| @@ -11,7 +11,6 @@ fn main() { | ||
| // the rustc version. | ||
| println!("cargo:rerun-if-changed=build.rs"); | ||
|
|
||
| - use_feature_or_nothing("rustc_attrs"); | ||
|
|
||
| // Features only used in no-std configurations. | ||
| #[cfg(not(feature = "std"))] | ||
| diff --git a/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/src/backend/linux_raw/io/errno.rs b/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/src/backend/linux_raw/io/errno.rs | ||
| index a6d30ca..f0da63f 100644 | ||
| --- a/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/src/backend/linux_raw/io/errno.rs | ||
| +++ b/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/src/backend/linux_raw/io/errno.rs | ||
| @@ -8,7 +8,7 @@ | ||
| //! Linux uses error codes in `-4095..0`; we use rustc attributes to describe | ||
| //! this restricted range of values. | ||
| #![allow(unsafe_code)] | ||
| -#![cfg_attr(not(rustc_attrs), allow(unused_unsafe))] | ||
| +#![allow(unused_unsafe)] | ||
|
|
||
| use super::super::c; | ||
| use crate::backend::fd::RawFd; | ||
| @@ -25,8 +25,8 @@ use linux_raw_sys::errno; | ||
| #[derive(Eq, PartialEq, Hash, Copy, Clone)] | ||
| // Linux returns negated error codes, and we leave them in negated form, so | ||
| // error codes are in `-4095..0`. | ||
| -#[cfg_attr(rustc_attrs, rustc_layout_scalar_valid_range_start(0xf001))] | ||
| -#[cfg_attr(rustc_attrs, rustc_layout_scalar_valid_range_end(0xffff))] | ||
| +//#[rustc_layout_scalar_valid_range_start(0xf001)] | ||
| +//#[rustc_layout_scalar_valid_range_end(0xffff)] | ||
| pub struct Errno(u16); | ||
|
|
||
| impl Errno { | ||
| diff --git a/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/src/io/fd/owned.rs b/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/src/io/fd/owned.rs | ||
| index 2b9238c..f0d7414 100644 | ||
| --- a/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/src/io/fd/owned.rs | ||
| +++ b/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/src/io/fd/owned.rs | ||
| @@ -29,13 +29,13 @@ use core::mem::forget; | ||
| /// descriptor, which is then borrowed under the same lifetime. | ||
| #[derive(Copy, Clone)] | ||
| #[repr(transparent)] | ||
| -#[cfg_attr(rustc_attrs, rustc_layout_scalar_valid_range_start(0))] | ||
| +//#[rustc_layout_scalar_valid_range_start(0)] | ||
| // libstd/os/raw/mod.rs assures me that every libstd-supported platform has a | ||
| // 32-bit c_int. Below is -2, in two's complement, but that only works out | ||
| // because c_int is 32 bits. | ||
| -#[cfg_attr(rustc_attrs, rustc_layout_scalar_valid_range_end(0xFF_FF_FF_FE))] | ||
| +//#[rustc_layout_scalar_valid_range_end(0xFF_FF_FF_FE)] | ||
| #[cfg_attr(staged_api, unstable(feature = "io_safety", issue = "87074"))] | ||
| -#[cfg_attr(rustc_attrs, rustc_nonnull_optimization_guaranteed)] | ||
| +//#[rustc_nonnull_optimization_guaranteed] | ||
| pub struct BorrowedFd<'fd> { | ||
| fd: RawFd, | ||
| _phantom: PhantomData<&'fd OwnedFd>, | ||
| @@ -50,13 +50,13 @@ pub struct BorrowedFd<'fd> { | ||
| /// passed as a consumed argument or returned as an owned value, and it never | ||
| /// has the value `-1`. | ||
| #[repr(transparent)] | ||
| -#[cfg_attr(rustc_attrs, rustc_layout_scalar_valid_range_start(0))] | ||
| +//#[rustc_layout_scalar_valid_range_start(0)] | ||
| // libstd/os/raw/mod.rs assures me that every libstd-supported platform has a | ||
| // 32-bit c_int. Below is -2, in two's complement, but that only works out | ||
| // because c_int is 32 bits. | ||
| -#[cfg_attr(rustc_attrs, rustc_layout_scalar_valid_range_end(0xFF_FF_FF_FE))] | ||
| +//#[rustc_layout_scalar_valid_range_end(0xFF_FF_FF_FE)] | ||
| #[cfg_attr(staged_api, unstable(feature = "io_safety", issue = "87074"))] | ||
| -#[cfg_attr(rustc_attrs, rustc_nonnull_optimization_guaranteed)] | ||
| +//#[rustc_nonnull_optimization_guaranteed] | ||
| pub struct OwnedFd { | ||
| fd: RawFd, | ||
| } | ||
| diff --git a/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/src/lib.rs b/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/src/lib.rs | ||
| index 3316c50..356ffb7 100644 | ||
| --- a/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/src/lib.rs | ||
| +++ b/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-0.37.27/src/lib.rs | ||
| @@ -98,7 +98,6 @@ | ||
| #![deny(missing_docs)] | ||
| #![allow(stable_features)] | ||
| #![cfg_attr(linux_raw, deny(unsafe_code))] | ||
| -#![cfg_attr(rustc_attrs, feature(rustc_attrs))] | ||
| #![cfg_attr(doc_cfg, feature(doc_cfg))] | ||
| #![cfg_attr(all(wasi_ext, target_os = "wasi", feature = "std"), feature(wasi_ext))] | ||
| #![cfg_attr( | ||
| -- | ||
| 2.45.4 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| Summary: Tardev Snapshotter for containerd | ||
| Name: tardev-snapshotter | ||
| Version: 3.2.0.tardev1 | ||
| Release: 10%{?dist} | ||
| Release: 11%{?dist} | ||
| License: ASL 2.0 | ||
| Group: Tools/Container | ||
| Vendor: Microsoft Corporation | ||
|
|
@@ -13,6 +13,8 @@ Source0:https://github.com/microsoft/kata-containers/archive/refs/tags/%{version | |
| # Note: the %%{name}-%%{name}-%%{version}-cargo.tar.gz file contains a cache created by capturing the contents downloaded into $CARGO_HOME. | ||
| # To update the cache run regenerate-archives.sh | ||
| Source1: %{_distro_sources_url}/%{name}-%{version}-cargo.tar.gz | ||
| # Backports upstream bytecodealliance/rustix#1663 to the cached rustix 0.37.27 sources (Source1); applied manually below since it's outside the main source tree. | ||
| Patch0: rustix-remove-rustc-attrs.patch | ||
|
|
||
| %{?systemd_requires} | ||
|
|
||
|
|
@@ -36,7 +38,10 @@ pushd $HOME | |
| tar xf %{SOURCE1} --no-same-owner | ||
| popd | ||
|
|
||
| %autosetup -p1 | ||
| %autosetup -p1 -N | ||
|
|
||
| # Apply Patch0 to the cached rustix sources (not part of the main source tree, so %%autosetup can't apply it). | ||
| patch -p1 -d "$HOME/.cargo" < %{PATCH0} | ||
|
|
||
| %build | ||
| export CARGO_NET_OFFLINE=true | ||
|
|
@@ -67,6 +72,9 @@ fi | |
| %config(noreplace) %{_unitdir}/%{name}.service | ||
|
|
||
| %changelog | ||
| * Thu Sep 10 2026 Kavya Sree Kaitepalli <[email protected]> - 3.2.0.tardev1-11 | ||
| - Backport upstream bytecodealliance/rustix#1663 to rebuild with rust | ||
|
|
||
| * Wed Aug 19 2026 Kavya Sree Kaitepalli <[email protected]> - 3.2.0.tardev1-10 | ||
| - Bump release to rebuild with rust | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
|
|
||
| Name: kata-containers-cc | ||
| Version: 3.15.0.aks0 | ||
| Release: 21%{?dist} | ||
| Release: 22%{?dist} | ||
| Summary: Kata Confidential Containers package developed for Confidential Containers on AKS | ||
| License: ASL 2.0 | ||
| URL: https://github.com/microsoft/kata-containers | ||
|
|
@@ -27,6 +27,7 @@ Patch8: CVE-2026-50540.patch | |
| Patch9: CVE-2026-44210.patch | ||
| Patch10: rust-fix-unstable-name-collisions.patch | ||
| Patch11: CVE-2026-84445.patch | ||
| Patch12: rustix-remove-rustc-attrs.patch | ||
| ExclusiveArch: x86_64 | ||
|
|
||
| BuildRequires: azurelinux-release | ||
|
|
@@ -166,6 +167,9 @@ fi | |
| %{tools_pkg}/tools/osbuilder/node-builder/azure-linux/agent-install/usr/lib/systemd/system/kata-agent.service | ||
|
|
||
| %changelog | ||
| * Thu Sep 21 2026 Kavya Sree Kaitepalli <[email protected]> - 3.15.0.aks0-22 | ||
| - Backport upstream rustix#1663 to build with latest rust | ||
|
|
||
| * Thu Sep 17 2026 Akhila <[email protected]> - 3.15.0.aks0-21 | ||
| - Generate Source2 go vendor tarball by upgrading grpc to v1.83.2 to fix CVE-2026-84445 and CVE-2026-84304 | ||
| - Drop CVE-2026-39821, CVE-2026-33814 and CVE-2026-56852 patches, fixed by the new vendor tree | ||
|
|
||
151 changes: 151 additions & 0 deletions
151
SPECS/kata-containers-cc/rustix-remove-rustc-attrs.patch
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| { | ||
| "Signatures": { | ||
| "cargo-1.95.0-x86_64-unknown-linux-gnu.tar.xz": "e74edd2cf7d0f1f1383b4f00eb90c843750bc489e2ccf7214e6476678a907425", | ||
| "rustc-1.95.0-x86_64-unknown-linux-gnu.tar.xz": "8426a3d170a5879f5682f5fbdd024a1779b3951e7baba685af2d6dc32a6dfc15", | ||
| "rust-std-1.95.0-x86_64-unknown-linux-gnu.tar.xz": "047ea7098803d3500fa1072e9cee5392697e21525559e4458128a2bf874aa382", | ||
| "cargo-1.95.0-aarch64-unknown-linux-gnu.tar.xz": "7c070aeba9bbf12073646995a03f36c346bb5f541d0078ba6d9dc2a7adaaf6af", | ||
| "rustc-1.95.0-aarch64-unknown-linux-gnu.tar.xz": "0fe3689eeaed603e5ef24572d11597d3edadaefd2cb181674ad621260f2501d2", | ||
| "rust-std-1.95.0-aarch64-unknown-linux-gnu.tar.xz": "3a21b271b1ff973b94d69b25e7a39992f9fbcae1ab6d9475844a23e6ad3908ac" | ||
| "cargo-1.97.1-aarch64-unknown-linux-gnu.tar.xz": "8f70bcaccea5ba4db187c3fd4d64e24592b4e16af513497201f5909d61691dbe", | ||
| "cargo-1.97.1-x86_64-unknown-linux-gnu.tar.xz": "e1be5f5ff7f7f80ca506fb65770b759edbdc6d303781ed71c5de8ec8a8394779", | ||
| "rust-std-1.97.1-aarch64-unknown-linux-gnu.tar.xz": "46aed8e63186350004d8ec6afca798811e6530b514352e5a8a26f3dc4939b3be", | ||
| "rust-std-1.97.1-x86_64-unknown-linux-gnu.tar.xz": "1c1e704ae80126b7de34f72ea2825f7fd01736dec20732faed47374b95282fba", | ||
| "rustc-1.97.1-aarch64-unknown-linux-gnu.tar.xz": "b344b81f0cd4c2246c7da8b197fe7a339d7dd02bb15cb69b2524115d9c75224c", | ||
| "rustc-1.97.1-x86_64-unknown-linux-gnu.tar.xz": "9819d0a32d56bd339585319c80260e332779f5541fd66838ab7e016d6c814819" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| Summary: Prebuilt stage0 bootstrap toolchain used to build rust | ||
| Name: rust-bootstrap | ||
| Version: 1.95.0 | ||
| Version: 1.97.1 | ||
| Release: 1%{?dist} | ||
| License: (ASL 2.0 OR MIT) AND BSD AND CC-BY-3.0 | ||
| Vendor: Microsoft Corporation | ||
|
|
@@ -14,7 +14,7 @@ BuildArch: noarch | |
| # consumed by rust.spec to bootstrap-compile a new toolchain from source. | ||
| # - When bumping "stage0_version"/"release_date" in rust.spec, bump the same | ||
| # values here (Version and %{release_date}) and rebuild this package first. | ||
| %define release_date 2026-04-16 | ||
| %define release_date 2026-07-16 | ||
|
|
||
| Source0: https://static.rust-lang.org/dist/%{release_date}/cargo-%{version}-x86_64-unknown-linux-gnu.tar.xz | ||
| Source1: https://static.rust-lang.org/dist/%{release_date}/rustc-%{version}-x86_64-unknown-linux-gnu.tar.xz | ||
|
|
@@ -43,6 +43,9 @@ cp %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} \ | |
| %{_datadir}/rust-bootstrap/%{version}/ | ||
|
|
||
| %changelog | ||
| * Tue Sep 15 2026 Kavya Sree Kaitepalli <[email protected]> - 1.97.1-1 | ||
| - Upgrade to 1.97.1 | ||
|
|
||
| * Wed Aug 19 2026 Kavya Sree Kaitepalli <[email protected]> - 1.95.0-1 | ||
| - Original version for Azure Linux. Split out of rust.spec to keep its SRPM small. | ||
| - License verified. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like we missed a changelog entry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated!