summaryrefslogtreecommitdiffstats
path: root/debian/patches/build
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches/build/d-armel-fix-lldb.patch26
-rw-r--r--debian/patches/build/d-bootstrap-cargo-doc-paths.patch (renamed from debian/patches/d-bootstrap-cargo-doc-paths.patch)445
-rw-r--r--debian/patches/build/d-bootstrap-custom-debuginfo-path.patch (renamed from debian/patches/d-bootstrap-custom-debuginfo-path.patch)54
-rw-r--r--debian/patches/build/d-bootstrap-disable-git.patch (renamed from debian/patches/d-bootstrap-disable-git.patch)50
-rw-r--r--debian/patches/build/d-bootstrap-install-symlinks.patch (renamed from debian/patches/d-bootstrap-install-symlinks.patch)10
-rw-r--r--debian/patches/build/d-bootstrap-no-assume-tools.patch (renamed from debian/patches/d-bootstrap-no-assume-tools.patch)15
-rw-r--r--debian/patches/build/d-bootstrap-permit-symlink-in-docs.patch21
-rw-r--r--debian/patches/build/d-bootstrap-rustflags.patch (renamed from debian/patches/d-bootstrap-rustflags.patch)16
-rw-r--r--debian/patches/build/d-bootstrap-use-local-css.patch (renamed from debian/patches/d-bootstrap-use-local-css.patch)17
-rw-r--r--debian/patches/build/d-test-ignore-avx-44056.patch (renamed from debian/patches/d-test-ignore-avx-44056.patch)11
10 files changed, 366 insertions, 299 deletions
diff --git a/debian/patches/build/d-armel-fix-lldb.patch b/debian/patches/build/d-armel-fix-lldb.patch
new file mode 100644
index 000000000..53fd45d49
--- /dev/null
+++ b/debian/patches/build/d-armel-fix-lldb.patch
@@ -0,0 +1,26 @@
+From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+Date: Thu, 13 Jun 2024 11:16:40 +0200
+Subject: run panics if lldb is not installed and no output is produced..
+
+Forwarded: no
+---
+ src/bootstrap/src/core/build_steps/test.rs | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
+index 5c115cf..5c28e3d 100644
+--- a/src/bootstrap/src/core/build_steps/test.rs
++++ b/src/bootstrap/src/core/build_steps/test.rs
+@@ -1787,7 +1787,11 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
+ .ok();
+ if let Some(ref vers) = lldb_version {
+ cmd.arg("--lldb-version").arg(vers);
+- let lldb_python_dir = run(Command::new(lldb_exe).arg("-P")).ok();
++ let lldb_python_dir = Command::new(lldb_exe)
++ .arg("-P")
++ .output()
++ .map(|output| String::from_utf8_lossy(&output.stdout).to_string())
++ .ok();
+ if let Some(ref dir) = lldb_python_dir {
+ cmd.arg("--lldb-python-dir").arg(dir);
+ }
diff --git a/debian/patches/d-bootstrap-cargo-doc-paths.patch b/debian/patches/build/d-bootstrap-cargo-doc-paths.patch
index 906f341ad..d0db153e5 100644
--- a/debian/patches/d-bootstrap-cargo-doc-paths.patch
+++ b/debian/patches/build/d-bootstrap-cargo-doc-paths.patch
@@ -4,7 +4,15 @@ Subject: Fix links to cargo-doc
We package cargo docs in a slightly different location; also tweak linkchecker
to not fail these links.
+
+Forwarded: not-needed
---
+ compiler/rustc_error_codes/src/error_codes/E0460.md | 2 +-
+ compiler/rustc_error_codes/src/error_codes/E0461.md | 2 +-
+ compiler/rustc_error_codes/src/error_codes/E0462.md | 2 +-
+ compiler/rustc_error_codes/src/error_codes/E0514.md | 2 +-
+ compiler/rustc_error_codes/src/error_codes/E0519.md | 2 +-
+ src/doc/edition-guide/book.toml | 18 +++++++++---------
.../edition-guide/src/editions/advanced-migrations.md | 14 +++++++-------
...ansitioning-an-existing-project-to-a-new-edition.md | 4 ++--
.../src/rust-2021/default-cargo-resolver.md | 10 +++++-----
@@ -13,17 +21,117 @@ to not fail these links.
src/doc/reference/src/introduction.md | 4 ++--
src/doc/reference/src/linkage.md | 2 +-
src/doc/reference/src/procedural-macros.md | 2 +-
+ src/doc/rustc/src/linker-plugin-lto.md | 2 +-
+ src/doc/rustc/src/platform-support/fuchsia.md | 2 +-
+ src/doc/rustc/src/targets/custom.md | 2 +-
src/doc/rustc/src/tests/index.md | 4 ++--
src/doc/rustc/src/what-is-rustc.md | 2 +-
- src/doc/edition-guide/book.toml | 18 +++++++++---------
- src/tools/linkchecker/main.rs | 6 ++++++
- 12 files changed, 38 insertions(+), 32 deletions(-)
+ .../src/compiler-flags/branch-protection.md | 2 +-
+ .../src/compiler-flags/control-flow-guard.md | 2 +-
+ src/doc/unstable-book/src/compiler-flags/sanitizer.md | 2 +-
+ src/tools/linkchecker/main.rs | 4 ++++
+ 23 files changed, 47 insertions(+), 43 deletions(-)
-Index: rust/src/doc/edition-guide/src/editions/advanced-migrations.md
-===================================================================
---- rust.orig/src/doc/edition-guide/src/editions/advanced-migrations.md
-+++ rust/src/doc/edition-guide/src/editions/advanced-migrations.md
-@@ -186,18 +186,18 @@ Afterwards, the line with `extern crate
+diff --git a/compiler/rustc_error_codes/src/error_codes/E0460.md b/compiler/rustc_error_codes/src/error_codes/E0460.md
+index 001678a..e8b77bf 100644
+--- a/compiler/rustc_error_codes/src/error_codes/E0460.md
++++ b/compiler/rustc_error_codes/src/error_codes/E0460.md
+@@ -68,4 +68,4 @@ This error can be fixed by:
+ * Recompiling crate `a` so that both crate `b` and `main` have a uniform
+ version to depend on.
+
+-[Cargo]: ../cargo/index.html
++[Cargo]: ../../../cargo/book/index.html
+diff --git a/compiler/rustc_error_codes/src/error_codes/E0461.md b/compiler/rustc_error_codes/src/error_codes/E0461.md
+index 33105c4..088833d 100644
+--- a/compiler/rustc_error_codes/src/error_codes/E0461.md
++++ b/compiler/rustc_error_codes/src/error_codes/E0461.md
+@@ -25,6 +25,6 @@ architectures. This issue also extends to any difference in target triples, as
+ `std` is operating-system specific.
+
+ This error can be fixed by:
+- * Using [Cargo](../cargo/index.html), the Rust package manager, automatically
++ * Using [Cargo](../../../cargo/book/index.html), the Rust package manager, automatically
+ fixing this issue.
+ * Recompiling either crate so that they target a consistent target triple.
+diff --git a/compiler/rustc_error_codes/src/error_codes/E0462.md b/compiler/rustc_error_codes/src/error_codes/E0462.md
+index 4509cc6..b0538b9 100644
+--- a/compiler/rustc_error_codes/src/error_codes/E0462.md
++++ b/compiler/rustc_error_codes/src/error_codes/E0462.md
+@@ -26,7 +26,7 @@ prefer `staticlib` for linking with C programs. Learn more about different
+ `crate_type`s in [this section of the Reference](../reference/linkage.html).
+
+ This error can be fixed by:
+- * Using [Cargo](../cargo/index.html), the Rust package manager, automatically
++ * Using [Cargo](../../../cargo/book/index.html), the Rust package manager, automatically
+ fixing this issue.
+ * Recompiling the crate as a `rlib` or `dylib`; formats suitable for Rust
+ linking.
+diff --git a/compiler/rustc_error_codes/src/error_codes/E0514.md b/compiler/rustc_error_codes/src/error_codes/E0514.md
+index ce2bbc5..0b2dab8 100644
+--- a/compiler/rustc_error_codes/src/error_codes/E0514.md
++++ b/compiler/rustc_error_codes/src/error_codes/E0514.md
+@@ -27,7 +27,7 @@ the compiler cannot be sure about *how* to call a function between compiler
+ versions, and therefore this error occurs.
+
+ This error can be fixed by:
+- * Using [Cargo](../cargo/index.html), the Rust package manager and
++ * Using [Cargo](../../../cargo/book/index.html), the Rust package manager and
+ [Rustup](https://rust-lang.github.io/rustup/), the Rust toolchain installer,
+ automatically fixing this issue.
+ * Recompiling the crates with a uniform `rustc` version.
+diff --git a/compiler/rustc_error_codes/src/error_codes/E0519.md b/compiler/rustc_error_codes/src/error_codes/E0519.md
+index 12876e2..09bd221 100644
+--- a/compiler/rustc_error_codes/src/error_codes/E0519.md
++++ b/compiler/rustc_error_codes/src/error_codes/E0519.md
+@@ -34,7 +34,7 @@ The above example compiles two crates with exactly the same name and
+ impossible for the compiler to distinguish between symbols (`pub` item names).
+
+ This error can be fixed by:
+- * Using [Cargo](../cargo/index.html), the Rust package manager, automatically
++ * Using [Cargo](../../../cargo/book/index.html), the Rust package manager, automatically
+ fixing this issue.
+ * Recompiling the crate with different metadata (different name/
+ `crate_type`).
+diff --git a/src/doc/edition-guide/book.toml b/src/doc/edition-guide/book.toml
+index 7841b64..7094175 100644
+--- a/src/doc/edition-guide/book.toml
++++ b/src/doc/edition-guide/book.toml
+@@ -53,15 +53,15 @@ git-repository-url = "https://github.com/rust-lang/edition-guide"
+ "/rust-2018/the-compiler/incremental-compilation-for-faster-compiles.html" = "https://blog.rust-lang.org/2018/02/15/Rust-1.24.html#incremental-compilation"
+ "/rust-2018/the-compiler/an-attribute-for-deprecation.html" = "../../../reference/attributes/diagnostics.html#the-deprecated-attribute"
+ "/rust-2018/rustup-for-managing-rust-versions.html" = "https://rust-lang.github.io/rustup/"
+-"/rust-2018/cargo-and-crates-io/index.html" = "../../../cargo/index.html"
+-"/rust-2018/cargo-and-crates-io/cargo-check-for-faster-checking.html" = "../../../cargo/commands/cargo-check.html"
+-"/rust-2018/cargo-and-crates-io/cargo-install-for-easy-installation-of-tools.html" = "../../../cargo/commands/cargo-install.html"
++"/rust-2018/cargo-and-crates-io/index.html" = "../../../../../cargo/book/index.html"
++"/rust-2018/cargo-and-crates-io/cargo-check-for-faster-checking.html" = "../../../../../cargo/book/commands/cargo-check.html"
++"/rust-2018/cargo-and-crates-io/cargo-install-for-easy-installation-of-tools.html" = "../../../../../cargo/book/commands/cargo-install.html"
+ "/rust-2018/cargo-and-crates-io/cargo-new-defaults-to-a-binary-project.html" = "https://blog.rust-lang.org/2018/03/29/Rust-1.25.html#cargo-features"
+-"/rust-2018/cargo-and-crates-io/cargo-rustc-for-passing-arbitrary-flags-to-rustc.html" = "../../../cargo/commands/cargo-rustc.html"
+-"/rust-2018/cargo-and-crates-io/cargo-workspaces-for-multi-package-projects.html" = "../../../cargo/reference/workspaces.html"
+-"/rust-2018/cargo-and-crates-io/multi-file-examples.html" = "../../../cargo/guide/project-layout.html"
+-"/rust-2018/cargo-and-crates-io/replacing-dependencies-with-patch.html" = "../../../cargo/reference/overriding-dependencies.html#the-patch-section"
+-"/rust-2018/cargo-and-crates-io/cargo-can-use-a-local-registry-replacement.html" = "../../../cargo/reference/source-replacement.html"
++"/rust-2018/cargo-and-crates-io/cargo-rustc-for-passing-arbitrary-flags-to-rustc.html" = "../../../../../cargo/book/commands/cargo-rustc.html"
++"/rust-2018/cargo-and-crates-io/cargo-workspaces-for-multi-package-projects.html" = "../../../../../cargo/book/reference/workspaces.html"
++"/rust-2018/cargo-and-crates-io/multi-file-examples.html" = "../../../../../cargo/book/guide/project-layout.html"
++"/rust-2018/cargo-and-crates-io/replacing-dependencies-with-patch.html" = "../../../../../cargo/book/reference/overriding-dependencies.html#the-patch-section"
++"/rust-2018/cargo-and-crates-io/cargo-can-use-a-local-registry-replacement.html" = "../../../../../cargo/book/reference/source-replacement.html"
+ "/rust-2018/cargo-and-crates-io/crates-io-disallows-wildcard-dependencies.html" = "https://blog.rust-lang.org/2016/01/21/Rust-1.6.html#cratesio-disallows-wildcards"
+ "/rust-2018/documentation/index.html" = "../../../index.html"
+ "/rust-2018/documentation/new-editions-of-the-book.html" = "../../../book/index.html"
+@@ -93,4 +93,4 @@ git-repository-url = "https://github.com/rust-lang/edition-guide"
+ "/rust-next/future.html" = "../../std/future/trait.Future.html"
+ "/rust-next/alloc.html" = "https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#the-alloc-crate-is-stable"
+ "/rust-next/maybe-uninit.html" = "https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#maybeuninitt-instead-of-memuninitialized"
+-"/rust-next/cargo-vendor.html" = "../../cargo/commands/cargo-vendor.html"
++"/rust-next/cargo-vendor.html" = "../../../../cargo/book/commands/cargo-vendor.html"
+diff --git a/src/doc/edition-guide/src/editions/advanced-migrations.md b/src/doc/edition-guide/src/editions/advanced-migrations.md
+index a1a5d80..0c3b0c8 100644
+--- a/src/doc/edition-guide/src/editions/advanced-migrations.md
++++ b/src/doc/edition-guide/src/editions/advanced-migrations.md
+@@ -186,18 +186,18 @@ Afterwards, the line with `extern crate rand;` in `src/lib.rs` will be removed.
We're now more idiomatic, and we didn't have to fix our code manually!
@@ -33,7 +141,7 @@ Index: rust/src/doc/edition-guide/src/editions/advanced-migrations.md
+[`cargo fix`]: ../../../../cargo/book/commands/cargo-fix.html
[`explicit-outlives-requirements`]: ../../rustc/lints/listing/allowed-by-default.html#explicit-outlives-requirements
[`keyword-idents`]: ../../rustc/lints/listing/allowed-by-default.html#keyword-idents
- [`rustfix`]: https://github.com/rust-lang/rustfix
+ [`rustfix`]: https://crates.io/crates/rustfix
[`unused-extern-crates`]: ../../rustc/lints/listing/allowed-by-default.html#unused-extern-crates
-[Cargo features]: ../../cargo/reference/features.html
-[Cargo package]: ../../cargo/reference/manifest.html#the-package-section
@@ -49,11 +157,11 @@ Index: rust/src/doc/edition-guide/src/editions/advanced-migrations.md
[conditional compilation]: ../../reference/conditional-compilation.html
[documentation tests]: ../../rustdoc/documentation-tests.html
[JSON messages]: ../../rustc/json.html
-Index: rust/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md
-===================================================================
---- rust.orig/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md
-+++ rust/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md
-@@ -83,7 +83,7 @@ If new warnings are issued, you may want
+diff --git a/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md b/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md
+index d4ebd23..afbb17d 100644
+--- a/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md
++++ b/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md
+@@ -83,7 +83,7 @@ If new warnings are issued, you may want to consider running `cargo fix` again (
Congrats! Your code is now valid in both Rust 2015 and Rust 2018!
@@ -63,11 +171,11 @@ Index: rust/src/doc/edition-guide/src/editions/transitioning-an-existing-project
+[`cargo test`]: ../../../../cargo/book/commands/cargo-test.html
[Advanced migration strategies]: advanced-migrations.md
[nightly channel]: ../../book/appendix-07-nightly-rust.html
-Index: rust/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md
-===================================================================
---- rust.orig/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md
-+++ rust/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md
-@@ -21,11 +21,11 @@ The new feature resolver no longer merge
+diff --git a/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md b/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md
+index 5f6653d..99332c3 100644
+--- a/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md
++++ b/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md
+@@ -21,11 +21,11 @@ The new feature resolver no longer merges all requested features for
crates that are depended on in multiple ways.
See [the announcement of Rust 1.51][5] for details.
@@ -83,17 +191,17 @@ Index: rust/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md
## Migration
-@@ -176,4 +176,4 @@ This snippet of output shows that the pr
+@@ -176,4 +176,4 @@ This snippet of output shows that the project `foo` depends on `bar` with the "d
Then, `bar` depends on `bstr` as a build-dependency with the "default" feature.
We can further see that `bstr`'s "default" feature enables "unicode" (among other features).
-[`cargo tree`]: ../../cargo/commands/cargo-tree.html
+[`cargo tree`]: ../../../../cargo/book/commands/cargo-tree.html
-Index: rust/src/doc/index.md
-===================================================================
---- rust.orig/src/doc/index.md
-+++ rust/src/doc/index.md
-@@ -130,7 +130,7 @@ their differences.
+diff --git a/src/doc/index.md b/src/doc/index.md
+index 8ad5b42..f93d3da 100644
+--- a/src/doc/index.md
++++ b/src/doc/index.md
+@@ -128,7 +128,7 @@ historical editions.
### The Cargo Book
@@ -102,11 +210,11 @@ Index: rust/src/doc/index.md
dependency manager.
### The Rustdoc Book
-Index: rust/src/doc/reference/src/conditional-compilation.md
-===================================================================
---- rust.orig/src/doc/reference/src/conditional-compilation.md
-+++ rust/src/doc/reference/src/conditional-compilation.md
-@@ -376,6 +376,6 @@ println!("I'm running on a {} machine!",
+diff --git a/src/doc/reference/src/conditional-compilation.md b/src/doc/reference/src/conditional-compilation.md
+index e724b21..803d31c 100644
+--- a/src/doc/reference/src/conditional-compilation.md
++++ b/src/doc/reference/src/conditional-compilation.md
+@@ -377,6 +377,6 @@ println!("I'm running on a {} machine!", machine_kind);
[`target_feature` attribute]: attributes/codegen.md#the-target_feature-attribute
[attribute]: attributes.md
[attributes]: attributes.md
@@ -114,11 +222,11 @@ Index: rust/src/doc/reference/src/conditional-compilation.md
+[cargo-feature]: ../../../cargo/book/reference/features.html
[crate type]: linkage.md
[static C runtime]: linkage.md#static-and-dynamic-c-runtimes
-Index: rust/src/doc/reference/src/introduction.md
-===================================================================
---- rust.orig/src/doc/reference/src/introduction.md
-+++ rust/src/doc/reference/src/introduction.md
-@@ -135,8 +135,8 @@ We also want the reference to be as norm
+diff --git a/src/doc/reference/src/introduction.md b/src/doc/reference/src/introduction.md
+index 9038efd..770680d 100644
+--- a/src/doc/reference/src/introduction.md
++++ b/src/doc/reference/src/introduction.md
+@@ -135,8 +135,8 @@ We also want the reference to be as normative as possible, so if you see anythin
[the Rust Reference repository]: https://github.com/rust-lang/reference/
[Unstable Book]: https://doc.rust-lang.org/nightly/unstable-book/
[_Expression_]: expressions.md
@@ -129,10 +237,10 @@ Index: rust/src/doc/reference/src/introduction.md
[expressions chapter]: expressions.html
[file an issue]: https://github.com/rust-lang/reference/issues
[lifetime of temporaries]: expressions.html#temporaries
-Index: rust/src/doc/reference/src/linkage.md
-===================================================================
---- rust.orig/src/doc/reference/src/linkage.md
-+++ rust/src/doc/reference/src/linkage.md
+diff --git a/src/doc/reference/src/linkage.md b/src/doc/reference/src/linkage.md
+index 82864b0..db1508c 100644
+--- a/src/doc/reference/src/linkage.md
++++ b/src/doc/reference/src/linkage.md
@@ -201,7 +201,7 @@ fn main() {
}
```
@@ -142,11 +250,11 @@ Index: rust/src/doc/reference/src/linkage.md
To use this feature locally, you typically will use the `RUSTFLAGS` environment
variable to specify flags to the compiler through Cargo. For example to compile
-Index: rust/src/doc/reference/src/procedural-macros.md
-===================================================================
---- rust.orig/src/doc/reference/src/procedural-macros.md
-+++ rust/src/doc/reference/src/procedural-macros.md
-@@ -331,7 +331,7 @@ Note that neither declarative nor proced
+diff --git a/src/doc/reference/src/procedural-macros.md b/src/doc/reference/src/procedural-macros.md
+index 7d69ab7..5d744c9 100644
+--- a/src/doc/reference/src/procedural-macros.md
++++ b/src/doc/reference/src/procedural-macros.md
+@@ -331,7 +331,7 @@ Note that neither declarative nor procedural macros support doc comment tokens
their equivalent `#[doc = r"str"]` attributes when passed to macros.
[Attribute macros]: #attribute-macros
@@ -155,11 +263,47 @@ Index: rust/src/doc/reference/src/procedural-macros.md
[Derive macros]: #derive-macros
[Function-like macros]: #function-like-procedural-macros
[`Delimiter::None`]: ../proc_macro/enum.Delimiter.html#variant.None
-Index: rust/src/doc/rustc/src/tests/index.md
-===================================================================
---- rust.orig/src/doc/rustc/src/tests/index.md
-+++ rust/src/doc/rustc/src/tests/index.md
-@@ -301,7 +301,7 @@ Experimental support for using custom te
+diff --git a/src/doc/rustc/src/linker-plugin-lto.md b/src/doc/rustc/src/linker-plugin-lto.md
+index ff80f14..99745bc 100644
+--- a/src/doc/rustc/src/linker-plugin-lto.md
++++ b/src/doc/rustc/src/linker-plugin-lto.md
+@@ -112,7 +112,7 @@ targeting Windows-like targets
+ This is fixed if you explicitly set the target, for example
+ `cargo build --target x86_64-pc-windows-msvc`
+ Without an explicit --target the flags will be passed to all compiler invocations (including build
+-scripts and proc macros), see [cargo docs on rustflags](../cargo/reference/config.html#buildrustflags)
++scripts and proc macros), see [cargo docs on rustflags](../../../cargo/book/reference/config.html#buildrustflags)
+
+ If you have dependencies using the `cc` crate, you will need to set these
+ environment variables:
+diff --git a/src/doc/rustc/src/platform-support/fuchsia.md b/src/doc/rustc/src/platform-support/fuchsia.md
+index 34ab3cd..d3dac67 100644
+--- a/src/doc/rustc/src/platform-support/fuchsia.md
++++ b/src/doc/rustc/src/platform-support/fuchsia.md
+@@ -931,7 +931,7 @@ attach and load any relevant debug symbols.
+ [Fuchsia]: https://fuchsia.dev/
+ [source tree]: https://fuchsia.dev/fuchsia-src/get-started/learn/build
+ [rustup]: https://rustup.rs/
+-[cargo]: ../../cargo/index.html
++[cargo]: ../../../../cargo/book/index.html
+ [Fuchsia SDK]: https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core
+ [overview of CML]: https://fuchsia.dev/fuchsia-src/concepts/components/v2/component_manifests
+ [reference for the file format]: https://fuchsia.dev/reference/cml
+diff --git a/src/doc/rustc/src/targets/custom.md b/src/doc/rustc/src/targets/custom.md
+index a67cb10..764ed34 100644
+--- a/src/doc/rustc/src/targets/custom.md
++++ b/src/doc/rustc/src/targets/custom.md
+@@ -14,4 +14,4 @@ To see it for a different target, add the `--target` flag:
+ rustc +nightly -Z unstable-options --target=wasm32-unknown-unknown --print target-spec-json
+ ```
+
+-To use a custom target, see the (unstable) [`build-std` feature](../../cargo/reference/unstable.html#build-std) of `cargo`.
++To use a custom target, see the (unstable) [`build-std` feature](../../../../cargo/book/reference/unstable.html#build-std) of `cargo`.
+diff --git a/src/doc/rustc/src/tests/index.md b/src/doc/rustc/src/tests/index.md
+index 32baed9..2c36c1d 100644
+--- a/src/doc/rustc/src/tests/index.md
++++ b/src/doc/rustc/src/tests/index.md
+@@ -301,7 +301,7 @@ Experimental support for using custom test harnesses is available on the
[`--test` option]: ../command-line-arguments.md#option-test
[`-Z panic-abort-tests`]: https://github.com/rust-lang/rust/issues/67650
[`available_parallelism`]: ../../std/thread/fn.available_parallelism.html
@@ -168,7 +312,7 @@ Index: rust/src/doc/rustc/src/tests/index.md
[`libtest`]: ../../test/index.html
[`main` function]: ../../reference/crates-and-source-files.html#main-functions
[`Result`]: ../../std/result/index.html
-@@ -311,7 +311,7 @@ Experimental support for using custom te
+@@ -311,7 +311,7 @@ Experimental support for using custom test harnesses is available on the
[attribute-should_panic]: ../../reference/attributes/testing.html#the-should_panic-attribute
[attribute-test]: ../../reference/attributes/testing.html#the-test-attribute
[bench-docs]: ../../unstable-book/library-features/test.html
@@ -177,11 +321,11 @@ Index: rust/src/doc/rustc/src/tests/index.md
[crate type]: ../../reference/linkage.html
[custom_test_frameworks documentation]: ../../unstable-book/language-features/custom-test-frameworks.html
[nightly channel]: ../../book/appendix-07-nightly-rust.html
-Index: rust/src/doc/rustc/src/what-is-rustc.md
-===================================================================
---- rust.orig/src/doc/rustc/src/what-is-rustc.md
-+++ rust/src/doc/rustc/src/what-is-rustc.md
-@@ -5,7 +5,7 @@ language, provided by the project itself
+diff --git a/src/doc/rustc/src/what-is-rustc.md b/src/doc/rustc/src/what-is-rustc.md
+index 39a05cf..7e450ae 100644
+--- a/src/doc/rustc/src/what-is-rustc.md
++++ b/src/doc/rustc/src/what-is-rustc.md
+@@ -5,7 +5,7 @@ language, provided by the project itself. Compilers take your source code and
produce binary code, either as a library or executable.
Most Rust programmers don't invoke `rustc` directly, but instead do it through
@@ -190,106 +334,21 @@ Index: rust/src/doc/rustc/src/what-is-rustc.md
want to see how Cargo calls `rustc`, you can
```bash
-Index: rust/src/doc/edition-guide/book.toml
-===================================================================
---- rust.orig/src/doc/edition-guide/book.toml
-+++ rust/src/doc/edition-guide/book.toml
-@@ -53,15 +53,15 @@ git-repository-url = "https://github.com
- "/rust-2018/the-compiler/incremental-compilation-for-faster-compiles.html" = "https://blog.rust-lang.org/2018/02/15/Rust-1.24.html#incremental-compilation"
- "/rust-2018/the-compiler/an-attribute-for-deprecation.html" = "../../../reference/attributes/diagnostics.html#the-deprecated-attribute"
- "/rust-2018/rustup-for-managing-rust-versions.html" = "https://rust-lang.github.io/rustup/"
--"/rust-2018/cargo-and-crates-io/index.html" = "../../../cargo/index.html"
--"/rust-2018/cargo-and-crates-io/cargo-check-for-faster-checking.html" = "../../../cargo/commands/cargo-check.html"
--"/rust-2018/cargo-and-crates-io/cargo-install-for-easy-installation-of-tools.html" = "../../../cargo/commands/cargo-install.html"
-+"/rust-2018/cargo-and-crates-io/index.html" = "../../../../../cargo/book/index.html"
-+"/rust-2018/cargo-and-crates-io/cargo-check-for-faster-checking.html" = "../../../../../cargo/book/commands/cargo-check.html"
-+"/rust-2018/cargo-and-crates-io/cargo-install-for-easy-installation-of-tools.html" = "../../../../../cargo/book/commands/cargo-install.html"
- "/rust-2018/cargo-and-crates-io/cargo-new-defaults-to-a-binary-project.html" = "https://blog.rust-lang.org/2018/03/29/Rust-1.25.html#cargo-features"
--"/rust-2018/cargo-and-crates-io/cargo-rustc-for-passing-arbitrary-flags-to-rustc.html" = "../../../cargo/commands/cargo-rustc.html"
--"/rust-2018/cargo-and-crates-io/cargo-workspaces-for-multi-package-projects.html" = "../../../cargo/reference/workspaces.html"
--"/rust-2018/cargo-and-crates-io/multi-file-examples.html" = "../../../cargo/guide/project-layout.html"
--"/rust-2018/cargo-and-crates-io/replacing-dependencies-with-patch.html" = "../../../cargo/reference/overriding-dependencies.html#the-patch-section"
--"/rust-2018/cargo-and-crates-io/cargo-can-use-a-local-registry-replacement.html" = "../../../cargo/reference/source-replacement.html"
-+"/rust-2018/cargo-and-crates-io/cargo-rustc-for-passing-arbitrary-flags-to-rustc.html" = "../../../../../cargo/book/commands/cargo-rustc.html"
-+"/rust-2018/cargo-and-crates-io/cargo-workspaces-for-multi-package-projects.html" = "../../../../../cargo/book/reference/workspaces.html"
-+"/rust-2018/cargo-and-crates-io/multi-file-examples.html" = "../../../../../cargo/book/guide/project-layout.html"
-+"/rust-2018/cargo-and-crates-io/replacing-dependencies-with-patch.html" = "../../../../../cargo/book/reference/overriding-dependencies.html#the-patch-section"
-+"/rust-2018/cargo-and-crates-io/cargo-can-use-a-local-registry-replacement.html" = "../../../../../cargo/book/reference/source-replacement.html"
- "/rust-2018/cargo-and-crates-io/crates-io-disallows-wildcard-dependencies.html" = "https://blog.rust-lang.org/2016/01/21/Rust-1.6.html#cratesio-disallows-wildcards"
- "/rust-2018/documentation/index.html" = "../../../index.html"
- "/rust-2018/documentation/new-editions-of-the-book.html" = "../../../book/index.html"
-@@ -93,4 +93,4 @@ git-repository-url = "https://github.com
- "/rust-next/future.html" = "../../std/future/trait.Future.html"
- "/rust-next/alloc.html" = "https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#the-alloc-crate-is-stable"
- "/rust-next/maybe-uninit.html" = "https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#maybeuninitt-instead-of-memuninitialized"
--"/rust-next/cargo-vendor.html" = "../../cargo/commands/cargo-vendor.html"
-+"/rust-next/cargo-vendor.html" = "../../../../cargo/book/commands/cargo-vendor.html"
-Index: rust/src/tools/linkchecker/main.rs
-===================================================================
---- rust.orig/src/tools/linkchecker/main.rs
-+++ rust/src/tools/linkchecker/main.rs
-@@ -262,6 +262,10 @@ impl Checker {
- return;
- }
- }
-+ if url.contains("../../cargo/book/") {
-+ // link to related cargo-doc, ok for our Debian build
-+ return;
-+ }
- if is_exception(file, &target_pretty_path) {
- report.links_ignored_exception += 1;
- } else {
-Index: rust/compiler/rustc_error_codes/src/error_codes/E0462.md
-===================================================================
---- rust.orig/compiler/rustc_error_codes/src/error_codes/E0462.md
-+++ rust/compiler/rustc_error_codes/src/error_codes/E0462.md
-@@ -26,7 +26,7 @@ prefer `staticlib` for linking with C pr
- `crate_type`s in [this section of the Reference](../reference/linkage.html).
-
- This error can be fixed by:
-- * Using [Cargo](../cargo/index.html), the Rust package manager, automatically
-+ * Using [Cargo](../../../cargo/book/index.html), the Rust package manager, automatically
- fixing this issue.
- * Recompiling the crate as a `rlib` or `dylib`; formats suitable for Rust
- linking.
-Index: rust/compiler/rustc_error_codes/src/error_codes/E0460.md
-===================================================================
---- rust.orig/compiler/rustc_error_codes/src/error_codes/E0460.md
-+++ rust/compiler/rustc_error_codes/src/error_codes/E0460.md
-@@ -68,4 +68,4 @@ This error can be fixed by:
- * Recompiling crate `a` so that both crate `b` and `main` have a uniform
- version to depend on.
-
--[Cargo]: ../cargo/index.html
-+[Cargo]: ../../../cargo/book/index.html
-Index: rust/compiler/rustc_error_codes/src/error_codes/E0514.md
-===================================================================
---- rust.orig/compiler/rustc_error_codes/src/error_codes/E0514.md
-+++ rust/compiler/rustc_error_codes/src/error_codes/E0514.md
-@@ -27,7 +27,7 @@ the compiler cannot be sure about *how*
- versions, and therefore this error occurs.
-
- This error can be fixed by:
-- * Using [Cargo](../cargo/index.html), the Rust package manager and
-+ * Using [Cargo](../../../cargo/book/index.html), the Rust package manager and
- [Rustup](https://rust-lang.github.io/rustup/), the Rust toolchain installer,
- automatically fixing this issue.
- * Recompiling the crates with a uniform `rustc` version.
-Index: rust/src/doc/unstable-book/src/compiler-flags/branch-protection.md
-===================================================================
---- rust.orig/src/doc/unstable-book/src/compiler-flags/branch-protection.md
-+++ rust/src/doc/unstable-book/src/compiler-flags/branch-protection.md
-@@ -15,4 +15,4 @@ For example, `-Z branch-protection=bti,p
+diff --git a/src/doc/unstable-book/src/compiler-flags/branch-protection.md b/src/doc/unstable-book/src/compiler-flags/branch-protection.md
+index ca56648..85285e3 100644
+--- a/src/doc/unstable-book/src/compiler-flags/branch-protection.md
++++ b/src/doc/unstable-book/src/compiler-flags/branch-protection.md
+@@ -15,4 +15,4 @@ For example, `-Z branch-protection=bti,pac-ret,leaf` is valid, but
Rust's standard library does not ship with BTI or pointer authentication enabled by default.
In Cargo projects the standard library can be recompiled with pointer authentication using the nightly
-[build-std](../../cargo/reference/unstable.html#build-std) feature.
+[build-std](../../../../cargo/book/reference/unstable.html#build-std) feature.
-Index: rust/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md
-===================================================================
---- rust.orig/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md
-+++ rust/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md
-@@ -39,7 +39,7 @@ It is strongly recommended to also enabl
+diff --git a/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md b/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md
+index dbb7414..73876b0 100644
+--- a/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md
++++ b/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md
+@@ -39,7 +39,7 @@ It is strongly recommended to also enable CFG checks for all linked libraries, i
To enable CFG in the standard library, use the [cargo `-Z build-std` functionality][build-std] to recompile the standard library with the same configuration options as the main program.
@@ -298,11 +357,11 @@ Index: rust/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md
For example:
```cmd
-Index: rust/src/doc/unstable-book/src/compiler-flags/sanitizer.md
-===================================================================
---- rust.orig/src/doc/unstable-book/src/compiler-flags/sanitizer.md
-+++ rust/src/doc/unstable-book/src/compiler-flags/sanitizer.md
-@@ -804,7 +804,7 @@ It is strongly recommended to combine sa
+diff --git a/src/doc/unstable-book/src/compiler-flags/sanitizer.md b/src/doc/unstable-book/src/compiler-flags/sanitizer.md
+index 502853f..00a3b1f 100644
+--- a/src/doc/unstable-book/src/compiler-flags/sanitizer.md
++++ b/src/doc/unstable-book/src/compiler-flags/sanitizer.md
+@@ -813,7 +813,7 @@ It is strongly recommended to combine sanitizers with recompiled and
instrumented standard library, for example using [cargo `-Zbuild-std`
functionality][build-std].
@@ -311,64 +370,18 @@ Index: rust/src/doc/unstable-book/src/compiler-flags/sanitizer.md
# Build scripts and procedural macros
-Index: rust/compiler/rustc_error_codes/src/error_codes/E0461.md
-===================================================================
---- rust.orig/compiler/rustc_error_codes/src/error_codes/E0461.md
-+++ rust/compiler/rustc_error_codes/src/error_codes/E0461.md
-@@ -25,6 +25,6 @@ architectures. This issue also extends t
- `std` is operating-system specific.
-
- This error can be fixed by:
-- * Using [Cargo](../cargo/index.html), the Rust package manager, automatically
-+ * Using [Cargo](../../../cargo/book/index.html), the Rust package manager, automatically
- fixing this issue.
- * Recompiling either crate so that they target a consistent target triple.
-Index: rust/compiler/rustc_error_codes/src/error_codes/E0519.md
-===================================================================
---- rust.orig/compiler/rustc_error_codes/src/error_codes/E0519.md
-+++ rust/compiler/rustc_error_codes/src/error_codes/E0519.md
-@@ -34,7 +34,7 @@ The above example compiles two crates wi
- impossible for the compiler to distinguish between symbols (`pub` item names).
-
- This error can be fixed by:
-- * Using [Cargo](../cargo/index.html), the Rust package manager, automatically
-+ * Using [Cargo](../../../cargo/book/index.html), the Rust package manager, automatically
- fixing this issue.
- * Recompiling the crate with different metadata (different name/
- `crate_type`).
-Index: rust/src/doc/rustc/src/linker-plugin-lto.md
-===================================================================
---- rust.orig/src/doc/rustc/src/linker-plugin-lto.md
-+++ rust/src/doc/rustc/src/linker-plugin-lto.md
-@@ -112,7 +112,7 @@ targeting Windows-like targets
- This is fixed if you explicitly set the target, for example
- `cargo build --target x86_64-pc-windows-msvc`
- Without an explicit --target the flags will be passed to all compiler invocations (including build
--scripts and proc macros), see [cargo docs on rustflags](../cargo/reference/config.html#buildrustflags)
-+scripts and proc macros), see [cargo docs on rustflags](../../../cargo/book/reference/config.html#buildrustflags)
-
- If you have dependencies using the `cc` crate, you will need to set these
- environment variables:
-Index: rust/src/doc/rustc/src/platform-support/fuchsia.md
-===================================================================
---- rust.orig/src/doc/rustc/src/platform-support/fuchsia.md
-+++ rust/src/doc/rustc/src/platform-support/fuchsia.md
-@@ -929,7 +929,7 @@ attach and load any relevant debug symbo
- [Fuchsia]: https://fuchsia.dev/
- [source tree]: https://fuchsia.dev/fuchsia-src/get-started/learn/build
- [rustup]: https://rustup.rs/
--[cargo]: ../../cargo/index.html
-+[cargo]: ../../../../cargo/book/index.html
- [Fuchsia SDK]: https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core
- [overview of CML]: https://fuchsia.dev/fuchsia-src/concepts/components/v2/component_manifests
- [reference for the file format]: https://fuchsia.dev/reference/cml
-Index: rust/src/doc/rustc/src/targets/custom.md
-===================================================================
---- rust.orig/src/doc/rustc/src/targets/custom.md
-+++ rust/src/doc/rustc/src/targets/custom.md
-@@ -14,4 +14,4 @@ To see it for a different target, add th
- rustc +nightly -Z unstable-options --target=wasm32-unknown-unknown --print target-spec-json
- ```
-
--To use a custom target, see the (unstable) [`build-std` feature](../../cargo/reference/unstable.html#build-std) of `cargo`.
-+To use a custom target, see the (unstable) [`build-std` feature](../../../../cargo/book/reference/unstable.html#build-std) of `cargo`.
+diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs
+index e4805cc..02f43456 100644
+--- a/src/tools/linkchecker/main.rs
++++ b/src/tools/linkchecker/main.rs
+@@ -262,6 +262,10 @@ impl Checker {
+ return;
+ }
+ }
++ if url.contains("../../cargo/book/") {
++ // link to related cargo-doc, ok for our Debian build
++ return;
++ }
+ if is_exception(file, &target_pretty_path) {
+ report.links_ignored_exception += 1;
+ } else {
diff --git a/debian/patches/d-bootstrap-custom-debuginfo-path.patch b/debian/patches/build/d-bootstrap-custom-debuginfo-path.patch
index 581c83e83..04daef05d 100644
--- a/debian/patches/d-bootstrap-custom-debuginfo-path.patch
+++ b/debian/patches/build/d-bootstrap-custom-debuginfo-path.patch
@@ -2,17 +2,33 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Date: Thu, 14 Jul 2022 13:17:39 +0200
Subject: d-bootstrap-custom-debuginfo-path
+Forwarded: not-needed
===================================================================
---
- src/bootstrap/src/lib.rs | 5 ++---
- src/test/codegen/remap_path_prefix/issue-73167-remap-std.rs | 2 +-
- 2 files changed, 3 insertions(+), 4 deletions(-)
+ src/bootstrap/src/core/builder.rs | 3 ++-
+ src/bootstrap/src/lib.rs | 5 ++---
+ tests/codegen/remap_path_prefix/issue-73167-remap-std.rs | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
-Index: rust/src/bootstrap/src/lib.rs
-===================================================================
---- rust.orig/src/bootstrap/src/lib.rs
-+++ rust/src/bootstrap/src/lib.rs
-@@ -1163,10 +1163,9 @@ impl Build {
+diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
+index 82f8e91..5f4a7af 100644
+--- a/src/bootstrap/src/core/builder.rs
++++ b/src/bootstrap/src/core/builder.rs
+@@ -1787,7 +1787,8 @@ impl<'a> Builder<'a> {
+ cargo.env("CFG_VIRTUAL_RUST_SOURCE_BASE_DIR", map_to);
+ }
+
+- if self.config.rust_remap_debuginfo {
++ // Debian: this breaks with our vendored sources!
++ if false && self.config.rust_remap_debuginfo {
+ // FIXME: handle vendored sources
+ let registry_src = t!(home::cargo_home()).join("registry").join("src");
+ let mut env_var = OsString::new();
+diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
+index 871318d..861a2aa 100644
+--- a/src/bootstrap/src/lib.rs
++++ b/src/bootstrap/src/lib.rs
+@@ -1155,10 +1155,9 @@ impl Build {
match which {
GitRepo::Rustc => {
@@ -25,10 +41,10 @@ Index: rust/src/bootstrap/src/lib.rs
}
}
-Index: rust/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs
-===================================================================
---- rust.orig/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs
-+++ rust/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs
+diff --git a/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs b/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs
+index b66abc6..f6efe1e 100644
+--- a/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs
++++ b/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs
@@ -7,7 +7,7 @@
// true automatically. If paths to std library hasn't been remapped, we use the
// above simulate-remapped-rust-src-base option to do it temporarily
@@ -38,17 +54,3 @@ Index: rust/tests/codegen/remap_path_prefix/issue-73167-remap-std.rs
fn main() {
std::thread::spawn(|| {
println!("hello");
-Index: rust/src/bootstrap/src/core/builder.rs
-===================================================================
---- rust.orig/src/bootstrap/src/core/builder.rs
-+++ rust/src/bootstrap/src/core/builder.rs
-@@ -1775,7 +1775,8 @@ impl<'a> Builder<'a> {
- cargo.env("CFG_VIRTUAL_RUST_SOURCE_BASE_DIR", map_to);
- }
-
-- if self.config.rust_remap_debuginfo {
-+ // Debian: this breaks with our vendored sources!
-+ if false && self.config.rust_remap_debuginfo {
- // FIXME: handle vendored sources
- let registry_src = t!(home::cargo_home()).join("registry").join("src");
- let mut env_var = OsString::new();
diff --git a/debian/patches/d-bootstrap-disable-git.patch b/debian/patches/build/d-bootstrap-disable-git.patch
index bd2c75946..f63e3a6cd 100644
--- a/debian/patches/d-bootstrap-disable-git.patch
+++ b/debian/patches/build/d-bootstrap-disable-git.patch
@@ -3,34 +3,15 @@ Date: Thu, 14 Jul 2022 13:17:38 +0200
Subject: Don't check for cargo-vendor when building from (Debian's) git
Forwarded: not-needed
-
-Forwarded: not-needed
---
- src/bootstrap/channel.rs | 6 +++++-
- src/bootstrap/dist.rs | 5 ++++-
- 2 files changed, 9 insertions(+), 2 deletions(-)
+ src/bootstrap/src/core/build_steps/dist.rs | 6 ++++--
+ src/bootstrap/src/utils/channel.rs | 6 ++++++
+ 2 files changed, 10 insertions(+), 2 deletions(-)
-Index: rust/src/bootstrap/src/utils/channel.rs
-===================================================================
---- rust.orig/src/bootstrap/src/utils/channel.rs
-+++ rust/src/bootstrap/src/utils/channel.rs
-@@ -35,6 +35,12 @@ pub struct Info {
-
- impl GitInfo {
- pub fn new(omit_git_hash: bool, dir: &Path) -> GitInfo {
-+ //
-+ // Debian: returning early because the Debian package is also in a git
-+ // repository, but we don't want to parse gitinfo. This is
-+ // needed for the bootstrap tests to work which running for
-+ // Debian git.
-+ return GitInfo::Absent;
- // See if this even begins to look like a git dir
- if !dir.join(".git").exists() {
- match read_commit_info_file(dir) {
-Index: rust/src/bootstrap/src/core/build_steps/dist.rs
-===================================================================
---- rust.orig/src/bootstrap/src/core/build_steps/dist.rs
-+++ rust/src/bootstrap/src/core/build_steps/dist.rs
+diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
+index 98e2677..cad4935 100644
+--- a/src/bootstrap/src/core/build_steps/dist.rs
++++ b/src/bootstrap/src/core/build_steps/dist.rs
@@ -991,8 +991,10 @@ impl Step for PlainSourceTarball {
// If we're building from git or tarball sources, we need to vendor
@@ -44,3 +25,20 @@ Index: rust/src/bootstrap/src/core/build_steps/dist.rs
{
if builder.rust_info().is_managed_git_subrepository() {
// Ensure we have the submodules checked out.
+diff --git a/src/bootstrap/src/utils/channel.rs b/src/bootstrap/src/utils/channel.rs
+index e59d7f2..bd93209 100644
+--- a/src/bootstrap/src/utils/channel.rs
++++ b/src/bootstrap/src/utils/channel.rs
+@@ -35,6 +35,12 @@ pub struct Info {
+
+ impl GitInfo {
+ pub fn new(omit_git_hash: bool, dir: &Path) -> GitInfo {
++ //
++ // Debian: returning early because the Debian package is also in a git
++ // repository, but we don't want to parse gitinfo. This is
++ // needed for the bootstrap tests to work which running for
++ // Debian git.
++ return GitInfo::Absent;
+ // See if this even begins to look like a git dir
+ if !dir.join(".git").exists() {
+ match read_commit_info_file(dir) {
diff --git a/debian/patches/d-bootstrap-install-symlinks.patch b/debian/patches/build/d-bootstrap-install-symlinks.patch
index 5e4e125d9..bb0cc7c9a 100644
--- a/debian/patches/d-bootstrap-install-symlinks.patch
+++ b/debian/patches/build/d-bootstrap-install-symlinks.patch
@@ -5,14 +5,16 @@ Subject: Install symlinks as-is, don't dereference them
Our patch to mdbook installs symlinks to systems versions of font-awesome,
highlight, etc. Upstream mdbook otherwise doesn't use symlinks, so this
doesn't affect anything else that's already generated.
+
+Forwarded: not-needed
---
src/tools/rust-installer/install-template.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
-Index: rust/src/tools/rust-installer/install-template.sh
-===================================================================
---- rust.orig/src/tools/rust-installer/install-template.sh
-+++ rust/src/tools/rust-installer/install-template.sh
+diff --git a/src/tools/rust-installer/install-template.sh b/src/tools/rust-installer/install-template.sh
+index b477c3e..fd93316 100644
+--- a/src/tools/rust-installer/install-template.sh
++++ b/src/tools/rust-installer/install-template.sh
@@ -617,7 +617,10 @@ install_components() {
maybe_backup_path "$_file_install_path"
diff --git a/debian/patches/d-bootstrap-no-assume-tools.patch b/debian/patches/build/d-bootstrap-no-assume-tools.patch
index 0bc6921dd..512e6a9cd 100644
--- a/debian/patches/d-bootstrap-no-assume-tools.patch
+++ b/debian/patches/build/d-bootstrap-no-assume-tools.patch
@@ -1,17 +1,18 @@
From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Date: Thu, 14 Jul 2022 13:17:39 +0200
-Subject: d-bootstrap-no-assume-tools
+Subject: set tools to those built in Debian
+Forwarded: not-needed
===================================================================
---
- src/bootstrap/builder/tests.rs | 4 ++++
+ src/bootstrap/src/tests/builder.rs | 4 ++++
1 file changed, 4 insertions(+)
-Index: rust/src/bootstrap/src/tests/builder.rs
-===================================================================
---- rust.orig/src/bootstrap/src/tests/builder.rs
-+++ rust/src/bootstrap/src/tests/builder.rs
-@@ -390,9 +390,13 @@ mod dist {
+diff --git a/src/bootstrap/src/tests/builder.rs b/src/bootstrap/src/tests/builder.rs
+index 700ebcf..bf31009 100644
+--- a/src/bootstrap/src/tests/builder.rs
++++ b/src/bootstrap/src/tests/builder.rs
+@@ -374,9 +374,13 @@ mod dist {
#[test]
fn dist_only_cross_host() {
let b = TargetSelection::from_user("B");
diff --git a/debian/patches/build/d-bootstrap-permit-symlink-in-docs.patch b/debian/patches/build/d-bootstrap-permit-symlink-in-docs.patch
new file mode 100644
index 000000000..bee12f270
--- /dev/null
+++ b/debian/patches/build/d-bootstrap-permit-symlink-in-docs.patch
@@ -0,0 +1,21 @@
+From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+Date: Thu, 13 Jun 2024 11:16:40 +0200
+Subject: partial revert of b9eedea4b0368fd1f00f204db75109ff444fab5b upstream
+
+Forwarded: not-needed
+---
+ src/bootstrap/src/core/build_steps/dist.rs | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
+index cad4935..6cabff7 100644
+--- a/src/bootstrap/src/core/build_steps/dist.rs
++++ b/src/bootstrap/src/core/build_steps/dist.rs
+@@ -79,6 +79,7 @@ impl Step for Docs {
+ tarball.set_product_name("Rust Documentation");
+ tarball.add_bulk_dir(&builder.doc_out(host), dest);
+ tarball.add_file(&builder.src.join("src/doc/robots.txt"), dest, 0o644);
++ tarball.permit_symlinks(true);
+ Some(tarball.generate())
+ }
+ }
diff --git a/debian/patches/d-bootstrap-rustflags.patch b/debian/patches/build/d-bootstrap-rustflags.patch
index 98edfc568..ad9be6165 100644
--- a/debian/patches/d-bootstrap-rustflags.patch
+++ b/debian/patches/build/d-bootstrap-rustflags.patch
@@ -2,18 +2,20 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Date: Thu, 14 Jul 2022 13:17:38 +0200
Subject: d-bootstrap-rustflags
+Forwarded: not-needed
+
===================================================================
---
src/bootstrap/src/core/builder.rs | 12 ++++++++++++
1 file changed, 12 insertions(+)
-Index: rust/src/bootstrap/src/core/builder.rs
-===================================================================
---- rust.orig/src/bootstrap/src/core/builder.rs
-+++ rust/src/bootstrap/src/core/builder.rs
-@@ -1447,6 +1447,18 @@ impl<'a> Builder<'a> {
- hostflags.arg("--check-cfg=values(bootstrap)");
- }
+diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
+index 7245d11..82f8e91 100644
+--- a/src/bootstrap/src/core/builder.rs
++++ b/src/bootstrap/src/core/builder.rs
+@@ -1462,6 +1462,18 @@ impl<'a> Builder<'a> {
+ hostflags.arg("-Zunstable-options");
+ hostflags.arg("--check-cfg=cfg(bootstrap)");
+ // Debian-specific stuff here
+ // set linker flags from LDFLAGS
diff --git a/debian/patches/d-bootstrap-use-local-css.patch b/debian/patches/build/d-bootstrap-use-local-css.patch
index 33d05603b..d6cb82cf3 100644
--- a/debian/patches/d-bootstrap-use-local-css.patch
+++ b/debian/patches/build/d-bootstrap-use-local-css.patch
@@ -2,16 +2,17 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Date: Thu, 14 Jul 2022 13:17:39 +0200
Subject: d-bootstrap-use-local-css
+Forwarded: not-needed
===================================================================
---
- src/bootstrap/src/core/build_steps/doc.rs | 15 ++++-----------
- 1 file changed, 4 insertions(+), 11 deletions(-)
+ src/bootstrap/src/core/build_steps/doc.rs | 27 +++++++++++++++++++++------
+ 1 file changed, 21 insertions(+), 6 deletions(-)
-Index: rust/src/bootstrap/src/core/build_steps/doc.rs
-===================================================================
---- rust.orig/src/bootstrap/src/core/build_steps/doc.rs
-+++ rust/src/bootstrap/src/core/build_steps/doc.rs
-@@ -362,7 +362,27 @@ impl Step for Standalone {
+diff --git a/src/bootstrap/src/core/build_steps/doc.rs b/src/bootstrap/src/core/build_steps/doc.rs
+index cf3f5bc..11ae464 100644
+--- a/src/bootstrap/src/core/build_steps/doc.rs
++++ b/src/bootstrap/src/core/build_steps/doc.rs
+@@ -363,7 +363,27 @@ impl Step for Standalone {
.arg("--index-page")
.arg(&builder.src.join("src/doc/index.md"))
.arg("--markdown-playground-url")
@@ -40,7 +41,7 @@ Index: rust/src/bootstrap/src/core/build_steps/doc.rs
.arg("-o")
.arg(&out)
.arg(&path);
-@@ -371,11 +391,6 @@ impl Step for Standalone {
+@@ -372,11 +392,6 @@ impl Step for Standalone {
cmd.arg("--disable-minification");
}
diff --git a/debian/patches/d-test-ignore-avx-44056.patch b/debian/patches/build/d-test-ignore-avx-44056.patch
index 5d6c971af..dfee30eef 100644
--- a/debian/patches/d-test-ignore-avx-44056.patch
+++ b/debian/patches/build/d-test-ignore-avx-44056.patch
@@ -3,16 +3,17 @@ Date: Thu, 14 Jul 2022 13:17:39 +0200
Subject: d-test-ignore-avx-44056
Bug: https://github.com/rust-lang/rust/pull/55667
+Forwarded: not-needed
===================================================================
---
- src/test/ui/issues/issue-44056.rs | 2 +-
+ tests/ui/issues/issue-44056.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: rust/tests/ui/issues/issue-44056.rs
-===================================================================
---- rust.orig/tests/ui/issues/issue-44056.rs
-+++ rust/tests/ui/issues/issue-44056.rs
+diff --git a/tests/ui/issues/issue-44056.rs b/tests/ui/issues/issue-44056.rs
+index a4903ed..ebe8402 100644
+--- a/tests/ui/issues/issue-44056.rs
++++ b/tests/ui/issues/issue-44056.rs
@@ -1,5 +1,5 @@
// build-pass (FIXME(55996): should be run on targets supporting avx)
-// only-x86_64