!92 Update to 1.71.0

From: @jchzhou 
Reviewed-by: @wk333 
Signed-off-by: @wk333
This commit is contained in:
openeuler-ci-bot 2023-07-30 08:13:03 +00:00 committed by Gitee
commit e0fa1bcf6e
9 changed files with 190 additions and 86 deletions

1
.gitattributes vendored
View File

@ -1 +1,2 @@
rustc-1.70.0-src.tar.xz filter=lfs diff=lfs merge=lfs -text
rustc-1.71.0-src.tar.xz filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,60 @@
From 9204a8359201271fd7b1c625d6f29ddd095a419d Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Mon, 10 Jul 2023 13:48:49 -0700
Subject: [PATCH] Revert "Fix `x test lint-docs` when download-rustc is
enabled"
This reverts commit abf9cbcb69e485b56776112bc587f6166e7ac5c9.
---
src/tools/lint-docs/src/groups.rs | 3 +--
src/tools/lint-docs/src/lib.rs | 9 ---------
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/src/tools/lint-docs/src/groups.rs b/src/tools/lint-docs/src/groups.rs
index b11fb287cf4d..2a923a61b0a7 100644
--- a/src/tools/lint-docs/src/groups.rs
+++ b/src/tools/lint-docs/src/groups.rs
@@ -39,12 +39,11 @@ pub(crate) fn generate_group_docs(&self, lints: &[Lint]) -> Result<(), Box<dyn E
fn collect_groups(&self) -> Result<LintGroups, Box<dyn Error>> {
let mut result = BTreeMap::new();
let mut cmd = Command::new(self.rustc_path);
- cmd.env_remove("LD_LIBRARY_PATH");
cmd.arg("-Whelp");
let output = cmd.output().map_err(|e| format!("failed to run command {:?}\n{}", cmd, e))?;
if !output.status.success() {
return Err(format!(
- "failed to collect lint info: failed to run {cmd:?}: {:?}\n--- stderr\n{}--- stdout\n{}\n",
+ "failed to collect lint info: {:?}\n--- stderr\n{}--- stdout\n{}\n",
output.status,
std::str::from_utf8(&output.stderr).unwrap(),
std::str::from_utf8(&output.stdout).unwrap(),
diff --git a/src/tools/lint-docs/src/lib.rs b/src/tools/lint-docs/src/lib.rs
index fe29b9abda39..034c6aa0708e 100644
--- a/src/tools/lint-docs/src/lib.rs
+++ b/src/tools/lint-docs/src/lib.rs
@@ -403,12 +403,6 @@ fn generate_lint_output(
fs::write(&tempfile, source)
.map_err(|e| format!("failed to write {}: {}", tempfile.display(), e))?;
let mut cmd = Command::new(self.rustc_path);
- // NOTE: bootstrap sets `LD_LIBRARY_PATH` for building lint-docs itself.
- // Unfortunately, lint-docs is a bootstrap tool while rustc is built from source,
- // and sometimes the paths conflict. In particular, when using `download-rustc`,
- // the LLVM versions can differ between `ci-llvm` and `ci-rustc-sysroot`.
- // Unset LD_LIBRARY_PATH here so it doesn't interfere with running the compiler.
- cmd.env_remove("LD_LIBRARY_PATH");
if options.contains(&"edition2015") {
cmd.arg("--edition=2015");
} else {
@@ -421,9 +415,6 @@ fn generate_lint_output(
}
cmd.arg("lint_example.rs");
cmd.current_dir(tempdir.path());
- if self.verbose {
- eprintln!("running: {cmd:?}");
- }
let output = cmd.output().map_err(|e| format!("failed to run command {:?}\n{}", cmd, e))?;
let stderr = std::str::from_utf8(&output.stderr).unwrap();
let msgs = stderr
--
2.41.0

View File

@ -0,0 +1,31 @@
From cea2e61a03773ce28fd57b7338c4ae4d947650ca Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Mon, 10 Jul 2023 15:52:55 -0700
Subject: [PATCH] Revert "fix: :bug: etc/bash_complettion -> src/etc/... to
avoid copy error"
This reverts commit 08ce68b6a6bad360e9c3611ad60cf6598401f878.
---
src/bootstrap/dist.rs | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index b49845386da1..9cead7adc8c3 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -1071,11 +1071,7 @@ fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
tarball.add_file(&cargo, "bin", 0o755);
tarball.add_file(etc.join("_cargo"), "share/zsh/site-functions", 0o644);
- tarball.add_renamed_file(
- etc.join("cargo.bashcomp.sh"),
- "src/etc/bash_completion.d",
- "cargo",
- );
+ tarball.add_renamed_file(etc.join("cargo.bashcomp.sh"), "etc/bash_completion.d", "cargo");
tarball.add_dir(etc.join("man"), "share/man/man1");
tarball.add_legal_and_readme_to("share/doc/cargo");
--
2.41.0

View File

@ -1,7 +1,7 @@
%global bootstrap_rust 1.69.0
%global bootstrap_cargo 1.69.0
%global bootstrap_channel 1.69.0
%global bootstrap_date 2023-04-20
%global bootstrap_rust 1.70.0
%global bootstrap_cargo 1.70.0
%global bootstrap_channel 1.70.0
%global bootstrap_date 2023-06-01
%bcond_with llvm_static
%bcond_with bundled_llvm
%bcond_without bundled_libgit2
@ -11,23 +11,28 @@
%bcond_without analyzer
Name: rust
Version: 1.70.0
Release: 2
Version: 1.71.0
Release: 1
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT)
URL: https://www.rust-lang.org
Source0: https://static.rust-lang.org/dist/rustc-%{version}-src.tar.xz
Patch0000: rustc-1.70.0-disable-libssh2.patch
Patch0001: rustc-1.70.0-disable-http2.patch
Patch0000: rustc-1.71.0-disable-libssh2.patch
Patch0001: rustc-1.71.0-disable-http2.patch
Patch0002: clippy-driver-usage-should-user-friendly.patch
Patch0003: cargo-help-clippy-should-have-description-to-user.patch
Patch0004: fix-a-println-wrong-format.patch
# Restore LD_LIBRARY_PATH when running lint-docs
# https://github.com/rust-lang/rust/pull/110521#issuecomment-1629705099
Patch0005: 0001-Revert-Fix-x-test-lint-docs-when-download-rustc-is-e.patch
# Restore the bash completion path
# https://github.com/rust-lang/rust/pull/110906#issuecomment-1629832675
Patch0006: 0001-Revert-fix-bug-etc-bash_complettion-src-etc-.-to-avo.patch
# By default, rust tries to use "rust-lld" as a linker for WebAssembly.
Patch0006: 0001-Use-lld-provided-by-system-for-wasm.patch
Patch0007: 0001-Use-lld-provided-by-system-for-wasm.patch
# Set a substitute-path in rust-gdb for standard library sources.
Patch0007: rustc-1.70.0-rust-gdb-substitute-path.patch
Patch0008: 0001-add-musl-root-riscv64gc-detection-in-configure.py.patch
Patch0008: rustc-1.70.0-rust-gdb-substitute-path.patch
%{lua: function rust_triple(arch)
local abi = "gnu"
@ -92,7 +97,7 @@ BuildRequires: pkgconfig(openssl) pkgconfig(zlib) pkgconfig(libssh2) >= 1.
BuildRequires: %{python}
%if %with bundled_llvm
BuildRequires: cmake3 >= 3.13.4
Provides: bundled(llvm) = 16.0.2
Provides: bundled(llvm) = 16.0.5
%else
BuildRequires: cmake >= 2.8.11
%if %defined llvm
@ -252,6 +257,7 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
@ -327,6 +333,10 @@ fi
%install
export %{rust_env}
DESTDIR=%{buildroot} %{python} ./x.py install
# Some of the components duplicate-install binaries, leaving backups we don't want
rm -f %{buildroot}%{_bindir}/*.old
%if "%{_libdir}" != "%{common_libdir}"
mkdir -p %{buildroot}%{_libdir}
find %{buildroot}%{common_libdir} -maxdepth 1 -type f -name '*.so' \
@ -472,6 +482,9 @@ export %{rust_env}
%{_mandir}/man1/cargo*.1*
%changelog
* Fri Jul 28 2023 jchzhou <zhoujiacheng@iscas.ac.cn> - 1.71.0-1
- Update to 1.71.0
* Tue Jul 18 2023 xu_ping <707078654@qq.com> - 1.70.0-2
- Use llvm package instead of llvm15

View File

@ -1,43 +0,0 @@
--- rustc-beta-src/Cargo.lock.orig 2023-05-19 19:02:31.000000000 -0700
+++ rustc-beta-src/Cargo.lock 2023-05-24 16:36:33.312232441 -0700
@@ -2967,7 +2967,6 @@
dependencies = [
"cc",
"libc",
- "libssh2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -3000,20 +2999,6 @@
]
[[package]]
-name = "libssh2-sys"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee"
-dependencies = [
- "cc",
- "libc",
- "libz-sys",
- "openssl-sys",
- "pkg-config",
- "vcpkg",
-]
-
-[[package]]
name = "libz-sys"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-beta-src/vendor/git2/Cargo.toml.orig 2023-05-19 21:16:57.000000000 -0700
+++ rustc-beta-src/vendor/git2/Cargo.toml 2023-05-24 16:33:42.043813439 -0700
@@ -55,9 +55,7 @@
[features]
default = [
- "ssh",
"https",
- "ssh_key_from_memory",
]
https = [
"libgit2-sys/https",

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bb8e9c564566b2d3228d95de9063a9254182446a161353f1d843bfbaf5c34639
size 140736896

View File

@ -1,6 +1,6 @@
--- rustc-beta-src/Cargo.lock.orig 2023-05-24 16:49:05.242510531 -0700
+++ rustc-beta-src/Cargo.lock 2023-05-24 16:51:11.741865603 -0700
@@ -1197,7 +1197,6 @@ checksum = "14d05c10f541ae6f3bc5b3d923c2
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2023-07-07 17:30:04.817452621 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2023-07-07 17:30:27.777988139 -0700
@@ -734,7 +734,6 @@
dependencies = [
"cc",
"libc",
@ -8,14 +8,14 @@
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -2989,16 +2988,6 @@ source = "registry+https://github.com/ru
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
@@ -1954,16 +1953,6 @@
checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb"
[[package]]
-name = "libnghttp2-sys"
-version = "0.1.4+1.41.0"
-version = "0.1.7+1.45.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03624ec6df166e79e139a2310ca213283d6b3c30810c54844f307086d4488df1"
-checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f"
-dependencies = [
- "cc",
- "libc",
@ -23,22 +23,22 @@
-
-[[package]]
name = "libz-sys"
version = "1.1.3"
version = "1.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-05-24 16:49:05.244510489 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-05-24 16:51:04.683013189 -0700
@@ -23,7 +23,7 @@ cargo-platform = { path = "crates/cargo-
cargo-util = { path = "crates/cargo-util", version = "0.2.4" }
clap = "4.2.0"
crates-io = { path = "crates/crates-io", version = "0.36.0" }
-curl = { version = "0.4.44", features = ["http2"] }
+curl = { version = "0.4.44", features = [] }
curl-sys = "0.4.61"
env_logger = "0.10.0"
filetime = "0.2.9"
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-05-19 19:05:42.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-05-24 16:49:05.244510489 -0700
@@ -407,16 +407,9 @@ impl<'cfg> PackageSet<'cfg> {
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-07-07 17:30:04.819452581 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-07-07 17:30:24.133061874 -0700
@@ -118,7 +118,7 @@
cargo-util.workspace = true
clap = { workspace = true, features = ["wrap_help"] }
crates-io.workspace = true
-curl = { workspace = true, features = ["http2"] }
+curl = { workspace = true, features = [] }
curl-sys.workspace = true
env_logger.workspace = true
filetime.workspace = true
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-06-24 10:27:37.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-07-07 17:30:04.819452581 -0700
@@ -407,16 +407,9 @@
sources: SourceMap<'cfg>,
config: &'cfg Config,
) -> CargoResult<PackageSet<'cfg>> {
@ -58,9 +58,9 @@
Ok(PackageSet {
packages: package_ids
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-05-24 16:49:05.245510468 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-05-24 16:51:57.916900146 -0700
@@ -229,16 +229,8 @@ impl<'cfg> HttpRegistry<'cfg> {
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-06-24 10:27:37.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-07-07 17:30:04.819452581 -0700
@@ -229,16 +229,8 @@
}
self.fetch_started = true;
@ -79,9 +79,9 @@
if !self.quiet {
self.config
--- rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs.orig 2023-05-19 19:05:42.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs 2023-05-24 16:49:05.245510468 -0700
@@ -25,7 +25,7 @@ impl<T> PollExt<T> for Poll<T> {
--- rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs.orig 2023-06-24 10:27:37.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs 2023-07-07 17:30:04.819452581 -0700
@@ -26,7 +26,7 @@
macro_rules! try_old_curl {
($e:expr, $msg:expr) => {
let result = $e;

View File

@ -0,0 +1,42 @@
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2023-06-24 10:27:37.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2023-07-07 17:12:23.406932870 -0700
@@ -1942,7 +1942,6 @@
dependencies = [
"cc",
"libc",
- "libssh2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -1965,20 +1964,6 @@
]
[[package]]
-name = "libssh2-sys"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee"
-dependencies = [
- "cc",
- "libc",
- "libz-sys",
- "openssl-sys",
- "pkg-config",
- "vcpkg",
-]
-
-[[package]]
name = "libz-sys"
version = "1.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-06-24 10:27:37.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-07-07 17:12:00.688392750 -0700
@@ -31,7 +31,7 @@
filetime = "0.2.9"
flate2 = { version = "1.0.3", default-features = false, features = ["zlib"] }
fwdansi = "1.1.0"
-git2 = "0.17.1"
+git2 = { version = "0.17.1", default-features = false, features = ["https"] }
git2-curl = "0.18.0"
gix = { version = "0.44.1", default-features = false, features = ["blocking-http-transport-curl", "progress-tree"] }
gix-features-for-configuration-only = { version = "0.29.0", package = "gix-features", features = [ "parallel" ] }

3
rustc-1.71.0-src.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5814699031aafdcc2e2f71fc9b389678cd7042350d1583da061463d8e88681c7
size 151962928