From 7a4b097c5b44b1588c7a6c769782cbf0dea45c18 Mon Sep 17 00:00:00 2001 From: wk333 <13474090681@163.com> Date: Tue, 20 Feb 2024 19:01:25 +0800 Subject: [PATCH] Update to 1.76.0 --- .gitattributes | 1 - ...-only-show-PGO-warnings-when-verbose.patch | 33 ---------------- ...ippy-should-have-description-to-user.patch | 30 -------------- ...py-driver-usage-should-user-friendly.patch | 25 ------------ fix-a-println-wrong-format.patch | 25 ------------ rust.spec | 39 ++++++++++--------- rustc-1.75.0-src.tar.xz.asc | 16 -------- ...atch => rustc-1.76.0-disable-libssh2.patch | 28 ++++++------- rustc-1.76.0-src.tar.xz | 0 rustc-1.76.0-src.tar.xz.asc | 16 ++++++++ 10 files changed, 50 insertions(+), 163 deletions(-) delete mode 100644 .gitattributes delete mode 100644 0001-bootstrap-only-show-PGO-warnings-when-verbose.patch delete mode 100644 cargo-help-clippy-should-have-description-to-user.patch delete mode 100644 clippy-driver-usage-should-user-friendly.patch delete mode 100644 fix-a-println-wrong-format.patch delete mode 100644 rustc-1.75.0-src.tar.xz.asc rename rustc-1.75.0-disable-libssh2.patch => rustc-1.76.0-disable-libssh2.patch (60%) create mode 100644 rustc-1.76.0-src.tar.xz create mode 100644 rustc-1.76.0-src.tar.xz.asc diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 05a0e94..0000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.xz filter=lfs diff=lfs merge=lfs -text diff --git a/0001-bootstrap-only-show-PGO-warnings-when-verbose.patch b/0001-bootstrap-only-show-PGO-warnings-when-verbose.patch deleted file mode 100644 index ca36844..0000000 --- a/0001-bootstrap-only-show-PGO-warnings-when-verbose.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 776146e9ebb6bbe17a37bfad955f3dac95317275 Mon Sep 17 00:00:00 2001 -From: Josh Stone -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 - diff --git a/cargo-help-clippy-should-have-description-to-user.patch b/cargo-help-clippy-should-have-description-to-user.patch deleted file mode 100644 index 5658c47..0000000 --- a/cargo-help-clippy-should-have-description-to-user.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 4a2c2e81316960ffbcc3dc1c91758420d6db0a6e Mon Sep 17 00:00:00 2001 -From: si-gui -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 - diff --git a/clippy-driver-usage-should-user-friendly.patch b/clippy-driver-usage-should-user-friendly.patch deleted file mode 100644 index 5787dfe..0000000 --- a/clippy-driver-usage-should-user-friendly.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1062e11170d93df3c53b01c1a630a7151af3a003 Mon Sep 17 00:00:00 2001 -From: si-gui -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] [--] [...] -+ clippy-driver [options] [--] [...] - - Common options: - -h, --help Print this message --- -2.30.0 - diff --git a/fix-a-println-wrong-format.patch b/fix-a-println-wrong-format.patch deleted file mode 100644 index d9456be..0000000 --- a/fix-a-println-wrong-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From edbb1b7011fe7bccf8a2efc71d806d61cd8e0c9b Mon Sep 17 00:00:00 2001 -From: si-gui -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 - diff --git a/rust.spec b/rust.spec index 38d8567..dae7781 100644 --- a/rust.spec +++ b/rust.spec @@ -1,7 +1,7 @@ -%global bootstrap_rust 1.74.0 -%global bootstrap_cargo 1.74.0 -%global bootstrap_channel 1.74.0 -%global bootstrap_date 2023-11-16 +%global bootstrap_rust 1.75.0 +%global bootstrap_cargo 1.75.0 +%global bootstrap_channel 1.75.0 +%global bootstrap_date 2023-12-28 %bcond_with llvm_static %bcond_with bundled_llvm %bcond_without bundled_libgit2 @@ -10,8 +10,8 @@ %bcond_without analyzer Name: rust -Version: 1.75.0 -Release: 2 +Version: 1.76.0 +Release: 1 Summary: The Rust Programming Language License: Apache-2.0 OR MIT URL: https://www.rust-lang.org @@ -23,17 +23,13 @@ Source3: cargo-config Source4: cargo-config.sh Source5: cargo-config.csh -Patch0000: rustc-1.75.0-disable-libssh2.patch -Patch0001: cargo-help-clippy-should-have-description-to-user.patch -Patch0002: fix-a-println-wrong-format.patch +Patch0000: rustc-1.76.0-disable-libssh2.patch # 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. -Patch0004: rustc-1.70.0-rust-gdb-substitute-path.patch -# https://github.com/rust-lang/rust/pull/117982 -Patch0005: 0001-bootstrap-only-show-PGO-warnings-when-verbose.patch -Patch0006: CVE-2024-24575.patch -Patch0007: CVE-2024-24577.patch +Patch0002: rustc-1.70.0-rust-gdb-substitute-path.patch +Patch0003: CVE-2024-24575.patch +Patch0004: CVE-2024-24577.patch %{lua: function rust_triple(arch) local abi = "gnu" @@ -93,7 +89,7 @@ BuildRequires: (%{name} >= %{bootstrap_rust} with %{name} <= %{version}) %global local_rust_root %{_prefix} %endif 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 BuildRequires: %{python} %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. %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 --verify %{SOURCE1} %{SOURCE0} +cd - %ifarch %{bootstrap_arches} %setup -q -n %{bootstrap_root} -T -b %{bootstrap_source} ./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 0003 -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/jemalloc-sys/jemalloc/ rm -rf vendor/libffi-sys*/libffi/ @@ -492,6 +490,9 @@ export %{rust_env} %{_mandir}/man1/cargo*.1* %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 - Fix CVE-2024-24575,CVE-2024-24577 diff --git a/rustc-1.75.0-src.tar.xz.asc b/rustc-1.75.0-src.tar.xz.asc deleted file mode 100644 index c88a829..0000000 --- a/rustc-1.75.0-src.tar.xz.asc +++ /dev/null @@ -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----- diff --git a/rustc-1.75.0-disable-libssh2.patch b/rustc-1.76.0-disable-libssh2.patch similarity index 60% rename from rustc-1.75.0-disable-libssh2.patch rename to rustc-1.76.0-disable-libssh2.patch index 2b06046..2c6fba2 100644 --- a/rustc-1.75.0-disable-libssh2.patch +++ b/rustc-1.76.0-disable-libssh2.patch @@ -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 2023-11-14 17:01:32.010125953 -0800 -@@ -2027,7 +2027,6 @@ +--- 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 2024-01-09 15:25:51.519781381 -0800 +@@ -2071,7 +2071,6 @@ dependencies = [ "cc", "libc", @@ -8,10 +8,12 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -2060,20 +2059,6 @@ +@@ -2113,20 +2112,6 @@ + "pkg-config", + "vcpkg", ] - - [[package]] +- +-[[package]] -name = "libssh2-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" @@ -24,19 +26,17 @@ - "pkg-config", - "vcpkg", -] -- --[[package]] + + [[package]] name = "libz-sys" - version = "1.1.9" - source = "registry+https://github.com/rust-lang/crates.io-index" ---- ./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 +--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-01-09 15:23:02.369032291 -0800 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-01-09 15:24:44.015679666 -0800 @@ -40,7 +40,7 @@ - curl-sys = "0.4.68" + curl-sys = "0.4.70" filetime = "0.2.22" flate2 = { version = "1.0.28", default-features = false, features = ["zlib"] } -git2 = "0.18.1" +git2 = { version = "0.18.1", default-features = false, features = ["https"] } 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" ] } diff --git a/rustc-1.76.0-src.tar.xz b/rustc-1.76.0-src.tar.xz new file mode 100644 index 0000000..e69de29 diff --git a/rustc-1.76.0-src.tar.xz.asc b/rustc-1.76.0-src.tar.xz.asc new file mode 100644 index 0000000..70cbdc7 --- /dev/null +++ b/rustc-1.76.0-src.tar.xz.asc @@ -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----- -- Gitee