Skip to content

Commit

Permalink
up to 1.71.0
Browse files Browse the repository at this point in the history
- fix build by applying upstream revert, see:
  rust-lang/rust#113678
- roll back to original location for bash completion, from:
  rust-lang/rust#113579
  • Loading branch information
jpalus committed Jul 14, 2023
1 parent f8cd045 commit 642cf71
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 9 deletions.
28 changes: 28 additions & 0 deletions bash_comp_location.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 05bc71cfaf9eb35caab425126d4fa8dcb8c62072 Mon Sep 17 00:00:00 2001
From: ekusiadadus <[email protected]>
Date: Wed, 12 Jul 2023 00:54:27 +0900
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 4522819f996e8..b34a4b2dc63ba 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -1074,11 +1074,7 @@ impl Step for Cargo {

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");

45 changes: 45 additions & 0 deletions lint_docs_libs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
From 67b5990472e3cac643d8cf90f45fe42201ddec3c Mon Sep 17 00:00:00 2001
From: jyn <[email protected]>
Date: Mon, 10 Jul 2023 15:59:30 -0500
Subject: [PATCH] Revert "Fix `x test lint-docs` when download-rustc is
enabled"

This was not the correct fix. The problem was two-fold:
- `download-rustc` didn't respect `llvm.assertions`
- `rust-dev` was missing a bump to `download-ci-llvm-stamp`

The first is fixed in this PR and the latter was fixed a while ago. Revert this change to avoid breaking `rpath = false`.
---
src/tools/lint-docs/src/groups.rs | 1 -
src/tools/lint-docs/src/lib.rs | 6 ------
2 files changed, 7 deletions(-)

diff --git a/src/tools/lint-docs/src/groups.rs b/src/tools/lint-docs/src/groups.rs
index b11fb287cf4dd..5be8ef7996bb2 100644
--- a/src/tools/lint-docs/src/groups.rs
+++ b/src/tools/lint-docs/src/groups.rs
@@ -39,7 +39,6 @@ impl<'a> LintExtractor<'a> {
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() {
diff --git a/src/tools/lint-docs/src/lib.rs b/src/tools/lint-docs/src/lib.rs
index fe29b9abda39a..b7c8b9ed2e318 100644
--- a/src/tools/lint-docs/src/lib.rs
+++ b/src/tools/lint-docs/src/lib.rs
@@ -403,12 +403,6 @@ impl<'a> LintExtractor<'a> {
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 {
22 changes: 13 additions & 9 deletions rust.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
# To bootstrap from scratch, set the channel and date from src/stage0.json
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
# or nightly wants some beta-YYYY-MM-DD
%define bootstrap_rust 1.69.0
%define bootstrap_rust 1.70.0
%define bootstrap_cargo %{bootstrap_rust}
%define bootstrap_date 2023-04-20
%define bootstrap_date 2023-06-01

%ifarch x32
%define with_cross 1
Expand All @@ -36,23 +36,25 @@
Summary: The Rust Programming Language
Summary(pl.UTF-8): Język programowania Rust
Name: rust
Version: 1.70.0
Version: 1.71.0
Release: 1
# Licenses: (rust itself) and (bundled libraries)
License: (Apache v2.0 or MIT) and (BSD and ISC and MIT)
Group: Development/Languages
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
# Source0-md5: 165792a4266021589b2d6061f208755f
# Source0-md5: 81ae525767680c1680bad985ecc35bff
Source1: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-x86_64-unknown-linux-gnu.tar.xz
# Source1-md5: f64b22de708c5a4e6ca2a0b549b9c438
# Source1-md5: afabe6d2054187af74998fd42c516717
Source2: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-i686-unknown-linux-gnu.tar.xz
# Source2-md5: 0abd3a7776a84e4a631df506ba6b7b8a
# Source2-md5: 2d4b19e6e0994fea57c837460612f8d7
Source3: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-aarch64-unknown-linux-gnu.tar.xz
# Source3-md5: 75bcdcf347a5195d1c20aa176734fb05
# Source3-md5: 329cfb044bff54ac749983285bf4819a
Source4: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-arm-unknown-linux-gnueabihf.tar.xz
# Source4-md5: 58660f3595f67f0da91abaf209298588
# Source4-md5: ba90a8fd5f8af3dd73599434e9f5083f
Source5: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-armv7-unknown-linux-gnueabihf.tar.xz
# Source5-md5: bf50136eba1bbaae5002f728efa637aa
# Source5-md5: e8a4cf787e2d82b2ba7b2e63800a1d1a
Patch0: lint_docs_libs.patch
Patch1: bash_comp_location.patch
URL: https://www.rust-lang.org/
# for src/compiler-rt
BuildRequires: cmake >= 3.4.3
Expand Down Expand Up @@ -331,6 +333,8 @@ Dopełnianie parametrów polecenia cargo w powłoce Zsh.

%prep
%setup -q -n %{rustc_package}
%patch0 -p1
%patch1 -p1

%if %{with bootstrap}
%ifarch %{x8664} x32
Expand Down

0 comments on commit 642cf71

Please sign in to comment.