Update to 1.76.0

This commit is contained in:
wk333 2024-02-20 19:01:25 +08:00
parent 4785019371
commit 0e62600b2c
10 changed files with 50 additions and 163 deletions

1
.gitattributes vendored
View File

@ -1 +0,0 @@
*.xz filter=lfs diff=lfs merge=lfs -text

View File

@ -1,33 +0,0 @@
From 776146e9ebb6bbe17a37bfad955f3dac95317275 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Thu, 16 Nov 2023 10:42:23 -0800
Subject: [PATCH] bootstrap: only show PGO warnings when verbose
Building rustc with `--rust-profile-use` is currently dumping a lot of
warnings of "no profile data available for function" from `rustc_smir`
and `stable_mir`. These simply aren't exercised by the current profile-
gathering steps, but that's to be expected for new or experimental
functionality. I think for most people, these warnings will be just
noise, so it makes sense to only have them in verbose builds.
---
src/bootstrap/src/core/build_steps/compile.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index af69860df1c5..51e4195827fc 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -887,7 +887,9 @@ fn run(self, builder: &Builder<'_>) {
} else if let Some(path) = &builder.config.rust_profile_use {
if compiler.stage == 1 {
cargo.rustflag(&format!("-Cprofile-use={path}"));
- cargo.rustflag("-Cllvm-args=-pgo-warn-missing-function");
+ if builder.is_verbose() {
+ cargo.rustflag("-Cllvm-args=-pgo-warn-missing-function");
+ }
true
} else {
false
--
2.43.0

View File

@ -1,30 +0,0 @@
From 4a2c2e81316960ffbcc3dc1c91758420d6db0a6e Mon Sep 17 00:00:00 2001
From: si-gui <sunguoshuai@huawei.com>
Date: Thu, 24 Jun 2021 16:35:12 +0800
Subject: [PATCH] cargo help clippy should have description to user
---
src/tools/cargo/src/bin/cargo/cli.rs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/tools/cargo/src/bin/cargo/cli.rs b/src/tools/cargo/src/bin/cargo/cli.rs
index 243f6ac0..c2dd8785 100644
--- a/src/tools/cargo/src/bin/cargo/cli.rs
+++ b/src/tools/cargo/src/bin/cargo/cli.rs
@@ -135,7 +135,12 @@ Run with 'cargo -Z [FLAG] [SUBCOMMAND]'",
} else if is_verbose {
drop_println!(config, " {:<20} {}", name, path.display());
} else {
- drop_println!(config, " {}", name);
+ if name.as_str() == "clippy" {
+ let summary = "Checks a package to catch common mistakes and improve your Rust code.";
+ drop_println!(config, " {}", name, summary);
+ } else {
+ drop_println!(config, " {}", name);
+ }
}
}
CommandInfo::Alias { target } => {
--
2.30.0

View File

@ -1,25 +0,0 @@
From 1062e11170d93df3c53b01c1a630a7151af3a003 Mon Sep 17 00:00:00 2001
From: si-gui <sunguoshuai@huawei.com>
Date: Wed, 23 Jun 2021 14:36:09 +0800
Subject: [PATCH] clippy-driver usage should user friendly
---
src/tools/clippy/src/driver.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tools/clippy/src/driver.rs b/src/tools/clippy/src/driver.rs
index f5f6c09e..7af74f15 100644
--- a/src/tools/clippy/src/driver.rs
+++ b/src/tools/clippy/src/driver.rs
@@ -126,7 +126,7 @@ fn display_help() {
Checks a package to catch common mistakes and improve your Rust code.
Usage:
- cargo clippy [options] [--] [<opts>...]
+ clippy-driver [options] [--] [<opts>...]
Common options:
-h, --help Print this message
--
2.30.0

View File

@ -1,25 +0,0 @@
From edbb1b7011fe7bccf8a2efc71d806d61cd8e0c9b Mon Sep 17 00:00:00 2001
From: si-gui <sunguoshuai@huawei.com>
Date: Thu, 24 Jun 2021 20:15:14 +0800
Subject: [PATCH] fix a println wrong format
---
src/tools/cargo/src/bin/cargo/cli.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tools/cargo/src/bin/cargo/cli.rs b/src/tools/cargo/src/bin/cargo/cli.rs
index c2dd8785..9c240690 100644
--- a/src/tools/cargo/src/bin/cargo/cli.rs
+++ b/src/tools/cargo/src/bin/cargo/cli.rs
@@ -137,7 +137,7 @@ Run with 'cargo -Z [FLAG] [SUBCOMMAND]'",
} else {
if name.as_str() == "clippy" {
let summary = "Checks a package to catch common mistakes and improve your Rust code.";
- drop_println!(config, " {}", name, summary);
+ drop_println!(config, " {:<20} {}", name, summary);
} else {
drop_println!(config, " {}", name);
}
--
2.30.0

View File

@ -1,7 +1,7 @@
%global bootstrap_rust 1.74.0 %global bootstrap_rust 1.75.0
%global bootstrap_cargo 1.74.0 %global bootstrap_cargo 1.75.0
%global bootstrap_channel 1.74.0 %global bootstrap_channel 1.75.0
%global bootstrap_date 2023-11-16 %global bootstrap_date 2023-12-28
%bcond_with llvm_static %bcond_with llvm_static
%bcond_with bundled_llvm %bcond_with bundled_llvm
%bcond_without bundled_libgit2 %bcond_without bundled_libgit2
@ -10,8 +10,8 @@
%bcond_without analyzer %bcond_without analyzer
Name: rust Name: rust
Version: 1.75.0 Version: 1.76.0
Release: 2 Release: 1
Summary: The Rust Programming Language Summary: The Rust Programming Language
License: Apache-2.0 OR MIT License: Apache-2.0 OR MIT
URL: https://www.rust-lang.org URL: https://www.rust-lang.org
@ -23,17 +23,13 @@ Source3: cargo-config
Source4: cargo-config.sh Source4: cargo-config.sh
Source5: cargo-config.csh Source5: cargo-config.csh
Patch0000: rustc-1.75.0-disable-libssh2.patch Patch0000: rustc-1.76.0-disable-libssh2.patch
Patch0001: cargo-help-clippy-should-have-description-to-user.patch
Patch0002: fix-a-println-wrong-format.patch
# By default, rust tries to use "rust-lld" as a linker for some targets. # By default, rust tries to use "rust-lld" as a linker for some targets.
Patch0003: 0001-Use-lld-provided-by-system.patch Patch0001: 0001-Use-lld-provided-by-system.patch
# Set a substitute-path in rust-gdb for standard library sources. # Set a substitute-path in rust-gdb for standard library sources.
Patch0004: rustc-1.70.0-rust-gdb-substitute-path.patch Patch0002: rustc-1.70.0-rust-gdb-substitute-path.patch
# https://github.com/rust-lang/rust/pull/117982 Patch0003: CVE-2024-24575.patch
Patch0005: 0001-bootstrap-only-show-PGO-warnings-when-verbose.patch Patch0004: CVE-2024-24577.patch
Patch0006: CVE-2024-24575.patch
Patch0007: CVE-2024-24577.patch
%{lua: function rust_triple(arch) %{lua: function rust_triple(arch)
local abi = "gnu" local abi = "gnu"
@ -93,7 +89,7 @@ BuildRequires: (%{name} >= %{bootstrap_rust} with %{name} <= %{version})
%global local_rust_root %{_prefix} %global local_rust_root %{_prefix}
%endif %endif
BuildRequires: make gcc gcc-c++ ncurses-devel curl curl-devel musl-libc-static musl-gcc pkgconfig(libcurl) pkgconfig(liblzma) BuildRequires: make gcc gcc-c++ ncurses-devel curl curl-devel musl-libc-static musl-gcc pkgconfig(libcurl) pkgconfig(liblzma)
BuildRequires: pkgconfig(openssl) pkgconfig(zlib) pkgconfig(libssh2) >= 1.6.0 gnupg2 BuildRequires: pkgconfig(openssl) pkgconfig(zlib) pkgconfig(libssh2) >= 1.6.0 gnupg2 wget
%global python python3 %global python python3
BuildRequires: %{python} BuildRequires: %{python}
%if %with bundled_llvm %if %with bundled_llvm
@ -239,8 +235,13 @@ Obsoletes: %{name}-doc < %{version}-%{release} %{name}-cargo-doc < %{version}-
Man pages and other related help documents for rust. Man pages and other related help documents for rust.
%prep %prep
# download source0 and gpg check
cd %{_sourcedir}
rm -f %{SOURCE0}
wget https://user-repo.openeuler.openatom.cn/lfs-tar/rust/rustc-%{version}-src.tar.xz
gpg --import %{SOURCE2} gpg --import %{SOURCE2}
gpg --verify %{SOURCE1} %{SOURCE0} gpg --verify %{SOURCE1} %{SOURCE0}
cd -
%ifarch %{bootstrap_arches} %ifarch %{bootstrap_arches}
%setup -q -n %{bootstrap_root} -T -b %{bootstrap_source} %setup -q -n %{bootstrap_root} -T -b %{bootstrap_source}
./install.sh --components=cargo,rustc,rust-std-%{rust_triple} \ ./install.sh --components=cargo,rustc,rust-std-%{rust_triple} \
@ -259,9 +260,6 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure
%patch -P 0002 -p1 %patch -P 0002 -p1
%patch -P 0003 -p1 %patch -P 0003 -p1
%patch -P 0004 -p1 %patch -P 0004 -p1
%patch -P 0005 -p1
%patch -P 0006 -p1
%patch -P 0007 -p1
rm -rf vendor/curl-sys*/curl/ rm -rf vendor/curl-sys*/curl/
rm -rf vendor/jemalloc-sys/jemalloc/ rm -rf vendor/jemalloc-sys/jemalloc/
rm -rf vendor/libffi-sys*/libffi/ rm -rf vendor/libffi-sys*/libffi/
@ -492,6 +490,9 @@ export %{rust_env}
%{_mandir}/man1/cargo*.1* %{_mandir}/man1/cargo*.1*
%changelog %changelog
* Tue Feb 20 2024 wangkai <13474090681@163.com> - 1.76.0-1
- Update to 1.76.0
* Sat Feb 17 2024 wangkai <13474090681@163.com> - 1.75.0-2 * Sat Feb 17 2024 wangkai <13474090681@163.com> - 1.75.0-2
- Fix CVE-2024-24575,CVE-2024-24577 - Fix CVE-2024-24575,CVE-2024-24577

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
wsFcBAABCgAQBQJljZswCRCFq5bm+hvl/gAACK4QAMMLm93fJY4slss9sTfzMhT/
hFGI+ro1I+N9RxRaNm/DOFl6rYU01NRXAuitJE9j1zJRPhbaTZUGJibMOHC1/+oz
18CMxYG/vhF7I2AqXtcfFMtivjzX0W32hjTX9oeocDYQ/NtmnVbUFF9DCpw2utWk
AF3HEwFcBD/8CGe7wcaiq4GdbbdxYshaquuhDnC1q8+uaIHtIvEgxBv7HA0Rybko
o+VeKsl1a3rIq+Ngh7Vef8E19CckSqvE0a0pfSMzVZLrcUbaTlUhUWKobtKIjg2x
9q4gHUz5CD6YdYahz/XB//rkPChyrW1es9RvUN4xXUPPR1bznxLMrk4qYTTHu6cO
39lF6QmJd/Ix9gH8Nb3G98DDf48fiIPe8bsX2dLuWGJrXJ0tkpzwO/QoCTpmVv2D
9VeDUlgLoqXpI9BwTJHAJ5l5pY4DS1jydLmhNZnY7tLlbwKCGUM8lcqTRgJCUrU7
dmGrytBPaJP1yh1SSnvEplhvtbFbINurhuE8/Ld3Zi8rUM4ZOgNEPO6MD5xKoqNN
D54hi1ch+NVdDj9cyr94F9BQqs6d7jC9ytg8+ZfwmYudKnld8/eKWb04NRfB7bdQ
JJK0IqK5JFrjA5pH0Wj6HrEfkcVcxxetP5//vNk8u3dXTpCUEXOEk1gA8IYm54fO
1SYzuW+5joGowKKPFa6g
=cucm
-----END PGP SIGNATURE-----

View File

@ -1,6 +1,6 @@
--- ./rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2023-11-12 12:24:35.000000000 -0800 --- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-01-07 18:12:08.000000000 -0800
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2023-11-14 17:01:32.010125953 -0800 +++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-01-09 15:25:51.519781381 -0800
@@ -2027,7 +2027,6 @@ @@ -2071,7 +2071,6 @@
dependencies = [ dependencies = [
"cc", "cc",
"libc", "libc",
@ -8,10 +8,12 @@
"libz-sys", "libz-sys",
"openssl-sys", "openssl-sys",
"pkg-config", "pkg-config",
@@ -2060,20 +2059,6 @@ @@ -2113,20 +2112,6 @@
"pkg-config",
"vcpkg",
] ]
-
[[package]] -[[package]]
-name = "libssh2-sys" -name = "libssh2-sys"
-version = "0.3.0" -version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index" -source = "registry+https://github.com/rust-lang/crates.io-index"
@ -24,19 +26,17 @@
- "pkg-config", - "pkg-config",
- "vcpkg", - "vcpkg",
-] -]
-
-[[package]] [[package]]
name = "libz-sys" name = "libz-sys"
version = "1.1.9" --- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-01-09 15:23:02.369032291 -0800
source = "registry+https://github.com/rust-lang/crates.io-index" +++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-01-09 15:24:44.015679666 -0800
--- ./rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-11-14 17:01:32.010125953 -0800
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-11-14 17:02:44.645097701 -0800
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
curl-sys = "0.4.68" curl-sys = "0.4.70"
filetime = "0.2.22" filetime = "0.2.22"
flate2 = { version = "1.0.28", default-features = false, features = ["zlib"] } flate2 = { version = "1.0.28", default-features = false, features = ["zlib"] }
-git2 = "0.18.1" -git2 = "0.18.1"
+git2 = { version = "0.18.1", default-features = false, features = ["https"] } +git2 = { version = "0.18.1", default-features = false, features = ["https"] }
git2-curl = "0.19.0" git2-curl = "0.19.0"
gix = { version = "0.55.2", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "revision"] } gix = { version = "0.56.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "revision"] }
gix-features-for-configuration-only = { version = "0.35.0", package = "gix-features", features = [ "parallel" ] } gix-features-for-configuration-only = { version = "0.35.0", package = "gix-features", features = [ "parallel" ] }

0
rustc-1.76.0-src.tar.xz Normal file
View File

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
wsFcBAABCgAQBQJlxNqSCRCFq5bm+hvl/gAA8kIP/ib21y3Rg18POvESXFDPmXAT
blvZsJwR4GsPcUeT2cUYEsWqrtEjoEjMPDumhaSJY4nt6wuAdpCSDf9RQxFSn5vW
Um68Q4dMqmIA2BOIbgDYIBwMUm+Q/ft+1eaKvitJSldqJCTFVXCee1MxeHpE9HSb
2sBC1sGD0aPecMJ9gnSYo57O9rAtItfWroek8KJ+NOxWABHkbRxhx4wSTK4mPy1i
DAtL4VYXomN3OvU1JiunAKhyuIttnrkH92x+YeUlNwOeLTECfLp8sq9yD0hgAkdW
b12ARrQCnBV3HwrgQNIw78ypPOSDYj4B++NB5F2j3wMCyIs6j/891F14ugzLEHuO
b1sjw/xW12kgUbRoyoW/5o60qE18QxgKaxNfgRme/XEF7hBxwFhOcc3BrBTvcA70
enFXpiqswpdvAMpW/YNEwT+Zm0UnWmsU9NXSB4cc8otL9Hj4oYyfX1q6XgmuyupL
jNXSd5evfTEjqcnpHFe0pnNJEExET7EQsEWFgn9J4K7hymSu/bliHMBIx+DAA4Ry
IMBP51oj+o+I8E84z9LDlBshGvcJvYsAXMrbpHonng7u9smitSA+oAy54qevS8+9
kK+UYY95Pl++BxdAFemsldoC0KkKJXGxK0FR2o1ttAA1I+uXrJLJXg8/K7binCeW
A7AXRJdE/spq/O9snPcA
=lnbm
-----END PGP SIGNATURE-----