From 2edb18cbd28a1df3470fccfe13d1904979c0d93b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Sat, 11 Jan 2025 16:38:21 +0100 Subject: [PATCH] bootstrap: disable `rust.download-rustc` in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and rebase patches Signed-off-by: Fabian Grünbichler --- ...t-attempt-to-download-rustc-in-tests.patch | 30 +++++++++++++++++++ debian/patches/prune/d-0006-no-mimalloc.patch | 6 +++- debian/patches/prune/d-0007-no-tzdb.patch | 6 +++- .../d-0020-remove-windows-dependencies.patch | 4 +-- ...1-vendor-remove-windows-dependencies.patch | 6 ++-- debian/patches/series | 1 + 6 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 debian/patches/build/bootstrap-don-t-attempt-to-download-rustc-in-tests.patch diff --git a/debian/patches/build/bootstrap-don-t-attempt-to-download-rustc-in-tests.patch b/debian/patches/build/bootstrap-don-t-attempt-to-download-rustc-in-tests.patch new file mode 100644 index 0000000000..6bb5ff9497 --- /dev/null +++ b/debian/patches/build/bootstrap-don-t-attempt-to-download-rustc-in-tests.patch @@ -0,0 +1,30 @@ +From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= +Date: Sat, 11 Jan 2025 16:37:16 +0100 +Subject: bootstrap: don't attempt to download rustc in tests +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +the tests use a default config, so we need to manually override this +option.. + +Signed-off-by: Fabian Grünbichler +--- + src/bootstrap/src/core/config/config.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs +index 7c19ff1..8baa291 100644 +--- a/src/bootstrap/src/core/config/config.rs ++++ b/src/bootstrap/src/core/config/config.rs +@@ -1435,6 +1435,10 @@ impl Config { + build.cargo = build.cargo.take().or(std::env::var_os("CARGO").map(|p| p.into())); + // Debian: don't optimize compiler-rt, the bundled sources are not available.. + build.optimized_compiler_builtins = Some(false); ++ ++ if let Some(ref mut rust) = toml.rust { ++ rust.download_rustc = Some(StringOrBool::Bool(false)); ++ } + } + + if let Some(include) = &toml.profile { diff --git a/debian/patches/prune/d-0006-no-mimalloc.patch b/debian/patches/prune/d-0006-no-mimalloc.patch index 292ba461bc..f5b1beefd7 100644 --- a/debian/patches/prune/d-0006-no-mimalloc.patch +++ b/debian/patches/prune/d-0006-no-mimalloc.patch @@ -5,8 +5,12 @@ Subject: d-0006-no-mimalloc Description: remove mimalloc(-sys) Forwarded: not-needed +--- + src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml | 1 - + 1 file changed, 1 deletion(-) + diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml -index 2dd2f2242a0..0e933b9f5c1 100644 +index 50a4bab..f63798d 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml +++ b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml @@ -35,7 +35,6 @@ rustc-hash.workspace = true diff --git a/debian/patches/prune/d-0007-no-tzdb.patch b/debian/patches/prune/d-0007-no-tzdb.patch index 9bbf7ed780..6a55de2471 100644 --- a/debian/patches/prune/d-0007-no-tzdb.patch +++ b/debian/patches/prune/d-0007-no-tzdb.patch @@ -7,8 +7,12 @@ Description: remove jiff-tzdb(-platform) on Debian, we can just use the tzdata information.. Forwarded: not-needed +--- + vendor/jiff-0.1.13/Cargo.toml | 1 - + 1 file changed, 1 deletion(-) + diff --git a/vendor/jiff-0.1.13/Cargo.toml b/vendor/jiff-0.1.13/Cargo.toml -index 323aa9c..5371d53 100644 +index 7ff813b..43b6e66 100644 --- a/vendor/jiff-0.1.13/Cargo.toml +++ b/vendor/jiff-0.1.13/Cargo.toml @@ -122,7 +122,6 @@ alloc = [] diff --git a/debian/patches/prune/d-0020-remove-windows-dependencies.patch b/debian/patches/prune/d-0020-remove-windows-dependencies.patch index 25b2c3d9d7..bf61222e1e 100644 --- a/debian/patches/prune/d-0020-remove-windows-dependencies.patch +++ b/debian/patches/prune/d-0020-remove-windows-dependencies.patch @@ -355,10 +355,10 @@ index f823aa1..c82566f 100644 cpu_profiler = [] diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml -index 50a4bab..6397b99 100644 +index f63798d..7a8a3f3 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml +++ b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml -@@ -71,9 +71,6 @@ vfs-notify.workspace = true +@@ -70,9 +70,6 @@ vfs-notify.workspace = true vfs.workspace = true paths.workspace = true diff --git a/debian/patches/prune/d-0021-vendor-remove-windows-dependencies.patch b/debian/patches/prune/d-0021-vendor-remove-windows-dependencies.patch index ceb36cf0e6..5cd5604227 100644 --- a/debian/patches/prune/d-0021-vendor-remove-windows-dependencies.patch +++ b/debian/patches/prune/d-0021-vendor-remove-windows-dependencies.patch @@ -546,10 +546,10 @@ index 41f2f56..32747ea 100644 [badges.travis-ci] repository = "fitzgen/is_executable" diff --git a/vendor/jiff-0.1.13/Cargo.toml b/vendor/jiff-0.1.13/Cargo.toml -index 7ff813b..323aa9c 100644 +index 43b6e66..5371d53 100644 --- a/vendor/jiff-0.1.13/Cargo.toml +++ b/vendor/jiff-0.1.13/Cargo.toml -@@ -134,7 +134,6 @@ serde = ["dep:serde"] +@@ -133,7 +133,6 @@ serde = ["dep:serde"] std = ["alloc"] tz-system = [ "std", @@ -557,7 +557,7 @@ index 7ff813b..323aa9c 100644 ] tzdb-bundle-always = [ "dep:jiff-tzdb", -@@ -160,12 +159,3 @@ optional = true +@@ -159,12 +158,3 @@ optional = true [target.'cfg(not(target_family = "wasm"))'.dev-dependencies.hifitime] version = "3.9.0" diff --git a/debian/patches/series b/debian/patches/series index ce5528cce7..e68c3dc3b7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -44,3 +44,4 @@ build/disable-broken-i386-tests.patch build/ignore-broken-debuginfo-tests.patch vendor/blake3-skip-embedded-C-code-use-pure-implementation.patch build/ci_rustc-disable-test-that-requires-upstream-git-repo.patch +build/bootstrap-don-t-attempt-to-download-rustc-in-tests.patch