From 9a1b5b5113f0fe12f83b7cedc2353ad41cc837b1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 04:49:47 +0200 Subject: Adding debian version 1.71.1+dfsg1-1. Signed-off-by: Daniel Baumann --- debian/patches/d-bootstrap-cargo-doc-paths.patch | 98 ++++++++++++------------ 1 file changed, 48 insertions(+), 50 deletions(-) (limited to 'debian/patches/d-bootstrap-cargo-doc-paths.patch') diff --git a/debian/patches/d-bootstrap-cargo-doc-paths.patch b/debian/patches/d-bootstrap-cargo-doc-paths.patch index 577bb704e..248dc118c 100644 --- a/debian/patches/d-bootstrap-cargo-doc-paths.patch +++ b/debian/patches/d-bootstrap-cargo-doc-paths.patch @@ -29,8 +29,8 @@ Index: rust/src/doc/edition-guide/src/editions/advanced-migrations.md -[`cargo check`]: ../../cargo/commands/cargo-check.html -[`cargo fix`]: ../../cargo/commands/cargo-fix.html -+[`cargo check`]: ../../../cargo-doc/doc/commands/cargo-check.html -+[`cargo fix`]: ../../../cargo-doc/doc/commands/cargo-fix.html ++[`cargo check`]: ../../../../cargo/book/commands/cargo-check.html ++[`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 @@ -39,13 +39,13 @@ Index: rust/src/doc/edition-guide/src/editions/advanced-migrations.md -[Cargo package]: ../../cargo/reference/manifest.html#the-package-section -[Cargo targets]: ../../cargo/reference/cargo-targets.html -[Cargo workspace]: ../../cargo/reference/workspaces.html -+[Cargo features]: ../../../cargo-doc/doc/reference/features.html -+[Cargo package]: ../../../cargo-doc/doc/reference/manifest.html#the-package-section -+[Cargo targets]: ../../../cargo-doc/doc/reference/cargo-targets.html -+[Cargo workspace]: ../../../cargo-doc/doc/reference/workspaces.html ++[Cargo features]: ../../../../cargo/book/reference/features.html ++[Cargo package]: ../../../../cargo/book/reference/manifest.html#the-package-section ++[Cargo targets]: ../../../../cargo/book/reference/cargo-targets.html ++[Cargo workspace]: ../../../../cargo/book/reference/workspaces.html [CLI flag]: ../../rustc/lints/levels.html#via-compiler-flag -[Code generation]: ../../cargo/reference/build-script-examples.html#code-generation -+[Code generation]: ../../../cargo-doc/doc/reference/build-script-examples.html#code-generation ++[Code generation]: ../../../../cargo/book/reference/build-script-examples.html#code-generation [conditional compilation]: ../../reference/conditional-compilation.html [documentation tests]: ../../rustdoc/documentation-tests.html [JSON messages]: ../../rustc/json.html @@ -59,8 +59,8 @@ Index: rust/src/doc/edition-guide/src/editions/transitioning-an-existing-project -[`cargo fix`]: ../../cargo/commands/cargo-fix.html -[`cargo test`]: ../../cargo/commands/cargo-test.html -+[`cargo fix`]: ../../../cargo-doc/doc/commands/cargo-fix.html -+[`cargo test`]: ../../../cargo-doc/doc/commands/cargo-test.html ++[`cargo fix`]: ../../../../cargo/book/commands/cargo-fix.html ++[`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 @@ -72,14 +72,14 @@ Index: rust/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md See [the announcement of Rust 1.51][5] for details. -[4]: ../../cargo/reference/resolver.html#feature-resolver-version-2 -+[4]: ../../../cargo-doc/doc/reference/resolver.html#feature-resolver-version-2 ++[4]: ../../../../cargo/book/reference/resolver.html#feature-resolver-version-2 [5]: https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver -[workspace]: ../../cargo/reference/workspaces.html -[virtual workspace]: ../../cargo/reference/workspaces.html#virtual-manifest -[`resolver` field]: ../../cargo/reference/resolver.html#resolver-versions -+[workspace]: ../../../cargo-doc/doc/reference/workspaces.html -+[virtual workspace]: ../../../cargo-doc/doc/reference/workspaces.html#virtual-manifest -+[`resolver` field]: ../../../cargo-doc/doc/reference/resolver.html#resolver-versions ++[workspace]: ../../../../cargo/book/reference/workspaces.html ++[virtual workspace]: ../../../../cargo/book/reference/workspaces.html#virtual-manifest ++[`resolver` field]: ../../../../cargo/book/reference/resolver.html#resolver-versions ## Migration @@ -88,7 +88,7 @@ Index: rust/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md We can further see that `bstr`'s "default" feature enables "unicode" (among other features). -[`cargo tree`]: ../../cargo/commands/cargo-tree.html -+[`cargo tree`]: ../../../cargo-doc/doc/commands/cargo-tree.html ++[`cargo tree`]: ../../../../cargo/book/commands/cargo-tree.html Index: rust/src/doc/index.md =================================================================== --- rust.orig/src/doc/index.md @@ -98,7 +98,7 @@ Index: rust/src/doc/index.md ### The Cargo Book -[The Cargo Book](cargo/index.html) is a guide to Cargo, Rust's build tool and -+[The Cargo Book](../../cargo-doc/doc/index.html) is a guide to Cargo, Rust's build tool and ++[The Cargo Book](../../cargo/book/index.html) is a guide to Cargo, Rust's build tool and dependency manager. ### The Rustdoc Book @@ -111,7 +111,7 @@ Index: rust/src/doc/reference/src/conditional-compilation.md [attribute]: attributes.md [attributes]: attributes.md -[cargo-feature]: ../cargo/reference/features.html -+[cargo-feature]: ../../cargo-doc/doc/reference/features.html ++[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 @@ -124,8 +124,8 @@ Index: rust/src/doc/reference/src/introduction.md [_Expression_]: expressions.md -[cargo book]: ../cargo/index.html -[cargo reference]: ../cargo/reference/index.html -+[cargo book]: ../../cargo-doc/doc/index.html -+[cargo reference]: ../../cargo-doc/doc/reference/index.html ++[cargo book]: ../../../cargo/book/index.html ++[cargo reference]: ../../../cargo/book/reference/index.html [expressions chapter]: expressions.html [file an issue]: https://github.com/rust-lang/reference/issues [lifetime of temporaries]: expressions.html#temporaries @@ -138,7 +138,7 @@ Index: rust/src/doc/reference/src/linkage.md ``` -[cargo]: ../cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts -+[cargo]: ../../cargo-doc/doc/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts ++[cargo]: ../../../cargo/book/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts 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 @@ -151,7 +151,7 @@ Index: rust/src/doc/reference/src/procedural-macros.md [Attribute macros]: #attribute-macros -[Cargo's build scripts]: ../cargo/reference/build-scripts.html -+[Cargo's build scripts]: ../../cargo-doc/doc/reference/build-scripts.html ++[Cargo's build scripts]: ../../../cargo/book/reference/build-scripts.html [Derive macros]: #derive-macros [Function-like macros]: #function-like-procedural-macros [`Delimiter::None`]: ../proc_macro/enum.Delimiter.html#variant.None @@ -164,7 +164,7 @@ Index: rust/src/doc/rustc/src/tests/index.md [`-Z panic-abort-tests`]: https://github.com/rust-lang/rust/issues/67650 [`available_parallelism`]: ../../std/thread/fn.available_parallelism.html -[`cargo test`]: ../../cargo/commands/cargo-test.html -+[`cargo test`]: ../../../cargo-doc/doc/commands/cargo-test.html ++[`cargo test`]: ../../../../cargo/book/commands/cargo-test.html [`libtest`]: ../../test/index.html [`main` function]: ../../reference/crates-and-source-files.html#main-functions [`Result`]: ../../std/result/index.html @@ -173,7 +173,7 @@ Index: rust/src/doc/rustc/src/tests/index.md [attribute-test]: ../../reference/attributes/testing.html#the-test-attribute [bench-docs]: ../../unstable-book/library-features/test.html -[Cargo]: ../../cargo/index.html -+[Cargo]: ../../../cargo-doc/doc/index.html ++[Cargo]: ../../../../cargo/book/index.html [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 @@ -186,7 +186,7 @@ Index: rust/src/doc/rustc/src/what-is-rustc.md Most Rust programmers don't invoke `rustc` directly, but instead do it through -[Cargo](../cargo/index.html). It's all in service of `rustc` though! If you -+[Cargo](../../cargo-doc/doc/index.html). It's all in service of `rustc` though! If you ++[Cargo](../../../cargo/book/index.html). It's all in service of `rustc` though! If you want to see how Cargo calls `rustc`, you can ```bash @@ -201,20 +201,20 @@ Index: rust/src/doc/edition-guide/book.toml -"/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-doc/doc/index.html" -+"/rust-2018/cargo-and-crates-io/cargo-check-for-faster-checking.html" = "../../../../cargo-doc/doc/commands/cargo-check.html" -+"/rust-2018/cargo-and-crates-io/cargo-install-for-easy-installation-of-tools.html" = "../../../../cargo-doc/doc/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-doc/doc/commands/cargo-rustc.html" -+"/rust-2018/cargo-and-crates-io/cargo-workspaces-for-multi-package-projects.html" = "../../../../cargo-doc/doc/reference/workspaces.html" -+"/rust-2018/cargo-and-crates-io/multi-file-examples.html" = "../../../../cargo-doc/doc/guide/project-layout.html" -+"/rust-2018/cargo-and-crates-io/replacing-dependencies-with-patch.html" = "../../../../cargo-doc/doc/reference/overriding-dependencies.html#the-patch-section" -+"/rust-2018/cargo-and-crates-io/cargo-can-use-a-local-registry-replacement.html" = "../../../../cargo-doc/doc/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" @@ -223,20 +223,18 @@ Index: rust/src/doc/edition-guide/book.toml "/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-doc/doc/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,12 @@ impl Checker { +@@ -262,6 +262,10 @@ impl Checker { return; } } -+ if let Some(path_str) = path.to_str() { -+ if path_str.contains("/cargo-doc/doc/") { -+ // link to related cargo-doc, ok for our Debian build -+ 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; @@ -250,7 +248,7 @@ Index: rust/compiler/rustc_error_codes/src/error_codes/E0462.md This error can be fixed by: - * Using [Cargo](../cargo/index.html), the Rust package manager, automatically -+ * Using [Cargo](../../cargo-doc/doc/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. @@ -263,7 +261,7 @@ Index: rust/compiler/rustc_error_codes/src/error_codes/E0460.md version to depend on. -[Cargo]: ../cargo/index.html -+[Cargo]: ../../cargo-doc/doc/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 @@ -273,7 +271,7 @@ Index: rust/compiler/rustc_error_codes/src/error_codes/E0514.md This error can be fixed by: - * Using [Cargo](../cargo/index.html), the Rust package manager and -+ * Using [Cargo](../../cargo-doc/doc/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. @@ -286,7 +284,7 @@ Index: rust/src/doc/unstable-book/src/compiler-flags/branch-protection.md 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-doc/doc/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 @@ -296,7 +294,7 @@ Index: rust/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md 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. -[build-std]: ../../cargo/reference/unstable.html#build-std -+[build-std]: ../../../cargo-doc/doc/reference/unstable.html#build-std ++[build-std]: ../../../../cargo/book/reference/unstable.html#build-std For example: ```cmd @@ -304,12 +302,12 @@ 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 -@@ -709,7 +709,7 @@ It is strongly recommended to combine sa +@@ -793,7 +793,7 @@ It is strongly recommended to combine sa instrumented standard library, for example using [cargo `-Zbuild-std` functionality][build-std]. -[build-std]: ../../cargo/reference/unstable.html#build-std -+[build-std]: ../../../cargo-doc/doc/reference/unstable.html#build-std ++[build-std]: ../../../../cargo/book/reference/unstable.html#build-std # Build scripts and procedural macros @@ -322,7 +320,7 @@ Index: rust/compiler/rustc_error_codes/src/error_codes/E0461.md This error can be fixed by: - * Using [Cargo](../cargo/index.html), the Rust package manager, automatically -+ * Using [Cargo](../../cargo-doc/doc/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 @@ -334,7 +332,7 @@ Index: rust/compiler/rustc_error_codes/src/error_codes/E0519.md This error can be fixed by: - * Using [Cargo](../cargo/index.html), the Rust package manager, automatically -+ * Using [Cargo](../../cargo-doc/doc/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`). @@ -347,7 +345,7 @@ Index: rust/src/doc/rustc/src/linker-plugin-lto.md `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-doc/doc/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: @@ -360,7 +358,7 @@ Index: rust/src/doc/rustc/src/platform-support/fuchsia.md [source tree]: https://fuchsia.dev/fuchsia-src/get-started/learn/build [rustup]: https://rustup.rs/ -[cargo]: ../../cargo/index.html -+[cargo]: ../../../cargo-doc/doc/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 @@ -373,4 +371,4 @@ Index: rust/src/doc/rustc/src/targets/custom.md ``` -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-doc/doc/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`. -- cgit v1.2.3