mdbook-linkcheck that pull in a ton of dependencies that are unneeded.
Author: Ximin Luo <infinity0@debian.org>
Forwarded: not-needed
---- a/Cargo.toml
-+++ b/Cargo.toml
+Index: rustc.git/Cargo.toml
+===================================================================
+--- rustc.git.orig/Cargo.toml
++++ rustc.git/Cargo.toml
@@ -6,7 +6,6 @@ members = [
"library/std",
"library/test",
"src/tools/compiletest",
"src/tools/error_index_generator",
"src/tools/linkchecker",
-@@ -14,19 +14,11 @@ members = [
+@@ -15,19 +14,11 @@ members = [
"src/tools/tidy",
"src/tools/tier-check",
"src/tools/build-manifest",
]
exclude = [
"build",
-@@ -47,36 +40,18 @@ debug-assertions = false
+@@ -69,24 +60,8 @@ gimli.debug = 0
miniz_oxide.debug = 0
object.debug = 0
# See comments in `library/rustc-std-workspace-core/README.md` for what's going on
# here
- rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' }
- rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' }
- rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
-
- # This crate's integration with libstd is a bit wonky, so we use a submodule
- # instead of a crates.io dependency. Make sure everything else in the repo is
- # also using the submodule, however, so we can avoid duplicate copies of the
+@@ -100,5 +75,3 @@ rustc-std-workspace-std = { path = 'libr
# source code for this crate.
backtrace = { path = "library/backtrace" }
-[patch."https://github.com/rust-lang/rust-clippy"]
-clippy_lints = { path = "src/tools/clippy/clippy_lints" }
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
-@@ -705,10 +705,6 @@ class RustBuild(object):
+Index: rustc.git/src/bootstrap/bootstrap.py
+===================================================================
+--- rustc.git.orig/src/bootstrap/bootstrap.py
++++ rustc.git/src/bootstrap/bootstrap.py
+@@ -754,10 +754,6 @@ class RustBuild(object):
os.path.join(self.rust_root, "src/bootstrap/Cargo.toml")]
for _ in range(1, self.verbose):
args.append("--verbose")
run(args, env=env, verbose=self.verbose)
def build_triple(self):
---- a/src/bootstrap/builder.rs
-+++ b/src/bootstrap/builder.rs
-@@ -417,7 +417,6 @@ impl<'a> Builder<'a> {
+Index: rustc.git/src/bootstrap/builder.rs
+===================================================================
+--- rustc.git.orig/src/bootstrap/builder.rs
++++ rustc.git/src/bootstrap/builder.rs
+@@ -449,7 +449,6 @@ impl<'a> Builder<'a> {
doc::RustdocBook,
doc::RustByExample,
doc::RustcBook,
doc::EmbeddedBook,
doc::EditionGuide,
),
-@@ -439,7 +439,5 @@ impl<'a> Builder<'a> {
+@@ -471,8 +470,6 @@ impl<'a> Builder<'a> {
+ dist::Clippy,
dist::Miri,
dist::LlvmTools,
- dist::Extended,
),
Kind::Install => describe!(
install::Docs,
-@@ -1177,10 +1175,7 @@ impl<'a> Builder<'a> {
+@@ -1343,10 +1340,7 @@ impl<'a> Builder<'a> {
}
}
cargo.arg("--frozen");
}
---- a/src/bootstrap/doc.rs
-+++ b/src/bootstrap/doc.rs
+Index: rustc.git/src/bootstrap/doc.rs
+===================================================================
+--- rustc.git.orig/src/bootstrap/doc.rs
++++ rustc.git/src/bootstrap/doc.rs
@@ -60,7 +60,6 @@ macro_rules! book {
// NOTE: When adding a book here, make sure to ALSO build the book by
// adding a build step in `src/bootstrap/builder.rs`!
EditionGuide, "src/doc/edition-guide", "edition-guide";
EmbeddedBook, "src/doc/embedded-book", "embedded-book";
Nomicon, "src/doc/nomicon", "nomicon";
---- a/src/doc/index.md
-+++ b/src/doc/index.md
+Index: rustc.git/src/doc/index.md
+===================================================================
+--- rustc.git.orig/src/doc/index.md
++++ rustc.git/src/doc/index.md
@@ -87,7 +87,7 @@ accomplishing various tasks.
## The Cargo Book
## The Rustdoc Book
---- a/src/bootstrap/test.rs
-+++ b/src/bootstrap/test.rs
-@@ -1472,14 +1472,7 @@ impl Step for RustcGuide {
+Index: rustc.git/src/bootstrap/test.rs
+===================================================================
+--- rustc.git.orig/src/bootstrap/test.rs
++++ rustc.git/src/bootstrap/test.rs
+@@ -1535,14 +1535,7 @@ impl Step for RustcGuide {
}
fn run(self, builder: &Builder<'_>) {
}
}
---- a/src/tools/tidy/src/deps.rs
-+++ b/src/tools/tidy/src/deps.rs
-@@ -406,8 +406,8 @@ fn check_crate_duplicate(resolve: &Resol
+Index: rustc.git/src/tools/tidy/src/deps.rs
+===================================================================
+--- rustc.git.orig/src/tools/tidy/src/deps.rs
++++ rustc.git/src/tools/tidy/src/deps.rs
+@@ -370,8 +370,8 @@ fn check_crate_duplicate(metadata: &Meta
// These two crates take quite a long time to build, so don't allow two versions of them
// to accidentally sneak into our dependency graph, in order to ensure we keep our CI times
// under control.
---- a/vendor/flate2/Cargo.toml
-+++ b/vendor/flate2/Cargo.toml
-@@ -40,10 +40,6 @@ version = "0.2"
+Index: rustc.git/vendor/flate2/Cargo.toml
+===================================================================
+--- rustc.git.orig/vendor/flate2/Cargo.toml
++++ rustc.git/vendor/flate2/Cargo.toml
+@@ -45,10 +45,6 @@ version = "1.1.0"
optional = true
default-features = false
---- a/vendor/pkg-config/src/lib.rs
-+++ b/vendor/pkg-config/src/lib.rs
+Index: rustc.git/vendor/pkg-config/src/lib.rs
+===================================================================
+--- rustc.git.orig/vendor/pkg-config/src/lib.rs
++++ rustc.git/vendor/pkg-config/src/lib.rs
@@ -9,8 +9,6 @@
//! A number of environment variables are available to globally configure how
//! this crate will invoke `pkg-config`:
CrossCompilation,
/// Failed to run `pkg-config`.
-@@ -152,11 +145,6 @@ impl fmt::Display for Error {
+@@ -132,11 +129,6 @@ impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
match *self {
Error::EnvNoPkgConfig(ref name) => write!(f, "Aborted because {} is set", name),
Error::Command {
ref command,
ref cause,
-@@ -180,7 +168,7 @@ impl fmt::Display for Error {
+@@ -160,7 +152,7 @@ impl fmt::Display for Error {
}
Ok(())
}
}
}
}
-@@ -341,6 +329,8 @@ impl Config {
+@@ -321,6 +313,8 @@ impl Config {
if host == target {
return true;
}
// pkg-config may not be aware of cross-compilation, and require
// a wrapper script that sets up platform-specific prefixes.
-@@ -399,7 +389,11 @@ impl Config {
+@@ -380,7 +374,11 @@ impl Config {
fn command(&self, name: &str, args: &[&str]) -> Command {
let exe = self
.env_var_os("PKG_CONFIG")
let mut cmd = Command::new(exe);
if self.is_static(name) {
cmd.arg("--static");
---- a/vendor/pkg-config/tests/test.rs
-+++ b/vendor/pkg-config/tests/test.rs
+Index: rustc.git/vendor/pkg-config/tests/test.rs
+===================================================================
+--- rustc.git.orig/vendor/pkg-config/tests/test.rs
++++ rustc.git/vendor/pkg-config/tests/test.rs
@@ -34,7 +34,6 @@ fn find(name: &str) -> Result<pkg_config
pkg_config::probe_library(name)
}
Make sure the paths here match the ones in debian/rust-doc.links
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/src/tools/linkchecker/main.rs 2020-03-09 23:11:18.000000000 +0100
-+++ b/src/tools/linkchecker/main.rs 2020-03-23 11:46:30.657963205 +0100
-@@ -163,6 +163,11 @@ fn check(cache: &mut Cache, root: &Path,
+Index: rustc.git/src/tools/linkchecker/main.rs
+===================================================================
+--- rustc.git.orig/src/tools/linkchecker/main.rs
++++ rustc.git/src/tools/linkchecker/main.rs
+@@ -172,6 +172,11 @@ fn check(cache: &mut Cache, root: &Path,
{
return;
}
let mut parts = url.splitn(2, '#');
let url = parts.next().unwrap();
let fragment = parts.next();
---- a/vendor/mdbook/src/theme/index.hbs
-+++ b/vendor/mdbook/src/theme/index.hbs
-@@ -28,13 +28,10 @@
+Index: rustc.git/vendor/mdbook/src/theme/index.hbs
+===================================================================
+--- rustc.git.orig/vendor/mdbook/src/theme/index.hbs
++++ rustc.git/vendor/mdbook/src/theme/index.hbs
+@@ -32,13 +32,10 @@
<link rel="stylesheet" href="{{ path_to_root }}css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="{{ path_to_root }}tomorrow-night.css">
<link rel="stylesheet" href="{{ path_to_root }}ayu-highlight.css">
-@@ -45,7 +42,7 @@
+@@ -49,7 +46,7 @@
{{#if mathjax_support}}
<!-- MathJax -->
{{/if}}
</head>
<body>
-@@ -55,46 +52,6 @@
+@@ -59,46 +56,6 @@
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
{{#toc}}{{/toc}}
-@@ -222,53 +179,7 @@
+@@ -226,53 +183,7 @@
</script>
{{/if}}
<script src="{{ path_to_root }}book.js" type="text/javascript" charset="utf-8"></script>
<!-- Custom JS scripts -->
-commit 5438f218c14fd73b81ab982334373efb7de6fdf2
-Author: Ximin Luo <infinity0@pwned.gg>
-Date: Thu Aug 6 22:06:10 2020 +0100
-
- Work around removal of binary blobs
-
---- a/vendor/mdbook/src/book/init.rs
-+++ b/vendor/mdbook/src/book/init.rs
+Index: rustc.git/vendor/mdbook/src/book/init.rs
+===================================================================
+--- rustc.git.orig/vendor/mdbook/src/book/init.rs
++++ rustc.git/vendor/mdbook/src/book/init.rs
@@ -151,12 +151,6 @@ impl BookBuilder {
let mut js = File::create(themedir.join("book.js"))?;
js.write_all(theme::JS)?;
Ok(())
}
---- a/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs
-+++ b/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs
-@@ -3,7 +3,7 @@ use crate::config::{Config, HtmlConfig, Playground, RustEdition};
+Index: rustc.git/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs
+===================================================================
+--- rustc.git.orig/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs
++++ rustc.git/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs
+@@ -3,7 +3,7 @@ use crate::config::{Config, HtmlConfig,
use crate::errors::*;
use crate::renderer::html_handlebars::helpers;
use crate::renderer::{RenderContext, Renderer};
) -> Result<()> {
use crate::utils::fs::write_file;
-@@ -194,80 +194,8 @@ impl HtmlHandlebars {
+@@ -198,80 +198,8 @@ impl HtmlHandlebars {
if let Some(contents) = &theme.favicon_svg {
write_file(destination, "favicon.svg", &contents)?;
}
Ok(())
}
---- a/vendor/mdbook/src/renderer/html_handlebars/search.rs
-+++ b/vendor/mdbook/src/renderer/html_handlebars/search.rs
-@@ -34,8 +34,6 @@ pub fn create_files(search_config: &Search, destination: &Path, book: &Book) ->
+Index: rustc.git/vendor/mdbook/src/renderer/html_handlebars/search.rs
+===================================================================
+--- rustc.git.orig/vendor/mdbook/src/renderer/html_handlebars/search.rs
++++ rustc.git/vendor/mdbook/src/renderer/html_handlebars/search.rs
+@@ -34,8 +34,6 @@ pub fn create_files(search_config: &Sear
format!("Object.assign(window.search, {});", index).as_bytes(),
)?;
utils::fs::write_file(destination, "searcher.js", searcher::JS)?;
debug!("Copying search files ✓");
}
---- a/vendor/mdbook/src/theme/mod.rs
-+++ b/vendor/mdbook/src/theme/mod.rs
+Index: rustc.git/vendor/mdbook/src/theme/mod.rs
+===================================================================
+--- rustc.git.orig/vendor/mdbook/src/theme/mod.rs
++++ rustc.git/vendor/mdbook/src/theme/mod.rs
@@ -1,9 +1,5 @@
#![allow(missing_docs)]
#[cfg(feature = "search")]
pub mod searcher;
-@@ -24,19 +22,8 @@ pub static VARIABLES_CSS: &[u8] = include_bytes!("css/variables.css");
+@@ -24,19 +20,8 @@ pub static VARIABLES_CSS: &[u8] = includ
pub static FAVICON_PNG: &[u8] = include_bytes!("favicon.png");
pub static FAVICON_SVG: &[u8] = include_bytes!("favicon.svg");
pub static JS: &[u8] = include_bytes!("book.js");
/// The `Theme` struct should be used instead of the static variables because
/// the `new()` method will look if the user has a theme directory in their
-@@ -57,11 +44,8 @@ pub struct Theme {
+@@ -57,11 +42,8 @@ pub struct Theme {
pub favicon_png: Option<Vec<u8>>,
pub favicon_svg: Option<Vec<u8>>,
pub js: Vec<u8>,
}
impl Theme {
-@@ -93,9 +77,6 @@ impl Theme {
+@@ -91,9 +73,6 @@ impl Theme {
theme_dir.join("css/variables.css"),
&mut theme.variables_css,
),
(
theme_dir.join("tomorrow-night.css"),
&mut theme.tomorrow_night_css,
-@@ -135,11 +116,8 @@ impl Default for Theme {
+@@ -156,11 +135,8 @@ impl Default for Theme {
favicon_png: Some(FAVICON_PNG.to_owned()),
favicon_svg: Some(FAVICON_SVG.to_owned()),
js: JS.to_owned(),
}
}
}
-@@ -222,11 +200,8 @@ mod tests {
+@@ -243,11 +219,8 @@ mod tests {
favicon_png: Some(Vec::new()),
favicon_svg: Some(Vec::new()),
js: Vec::new(),
};
assert_eq!(got, empty);
---- a/vendor/mdbook/src/theme/searcher/mod.rs
-+++ b/vendor/mdbook/src/theme/searcher/mod.rs
+Index: rustc.git/vendor/mdbook/src/theme/searcher/mod.rs
+===================================================================
+--- rustc.git.orig/vendor/mdbook/src/theme/searcher/mod.rs
++++ rustc.git/vendor/mdbook/src/theme/searcher/mod.rs
@@ -2,5 +2,3 @@
//! the "search" cargo feature is disabled.
Author: Angus Lees <gus@debian.org>
Forwarded: no
---- a/src/librustc_codegen_ssa/back/link.rs
-+++ b/src/librustc_codegen_ssa/back/link.rs
-@@ -1558,6 +1558,13 @@
+Index: rustc.git/src/librustc_codegen_ssa/back/link.rs
+===================================================================
+--- rustc.git.orig/src/librustc_codegen_ssa/back/link.rs
++++ rustc.git/src/librustc_codegen_ssa/back/link.rs
+@@ -1716,6 +1716,13 @@ fn linker_with_args<'a, B: ArchiveBuilde
// OBJECT-FILES-NO, AUDIT-ORDER
add_rpath_args(cmd, sess, codegen_results, out_filename);
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -747,10 +747,9 @@
+Index: rustc.git/src/bootstrap/lib.rs
+===================================================================
+--- rustc.git.orig/src/bootstrap/lib.rs
++++ rustc.git/src/bootstrap/lib.rs
+@@ -777,10 +777,9 @@ impl Build {
match which {
GitRepo::Rustc => {
Author: Matthijs van Otterdijk <matthijs@wirevirt.net>
Forwarded: not-needed
---
---- a/src/bootstrap/dist.rs
-+++ b/src/bootstrap/dist.rs
-@@ -1106,7 +1106,10 @@
+Index: rustc.git/src/bootstrap/dist.rs
+===================================================================
+--- rustc.git.orig/src/bootstrap/dist.rs
++++ rustc.git/src/bootstrap/dist.rs
+@@ -1112,7 +1112,10 @@ impl Step for PlainSourceTarball {
}
// If we're building from git sources, we need to vendor a complete distribution.
Forwarded: not-needed
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: rust/src/bootstrap/bootstrap.py
+Index: rustc.git/src/bootstrap/bootstrap.py
===================================================================
---- rust.orig/src/bootstrap/bootstrap.py
-+++ rust/src/bootstrap/bootstrap.py
-@@ -14,16 +14,18 @@ import tempfile
+--- rustc.git.orig/src/bootstrap/bootstrap.py
++++ rustc.git/src/bootstrap/bootstrap.py
+@@ -15,16 +15,18 @@ import tempfile
from time import time
if os.path.exists(path):
if verify(path, sha_path, False):
if verbose:
-@@ -41,7 +43,6 @@ def get(url, path, verbose=False):
+@@ -42,7 +44,6 @@ def get(url, path, verbose=False):
print("moving {} to {}".format(temp_path, path))
shutil.move(temp_path, path)
finally:
delete_if_present(temp_path, verbose)
-@@ -419,7 +420,7 @@ class RustBuild(object):
+@@ -441,7 +442,7 @@ class RustBuild(object):
url = "{}/dist/{}".format(self._download_url, date)
tarball = os.path.join(rustc_cache, filename)
Bug: https://github.com/rust-lang/rust/issues/52108
-Index: rust/src/bootstrap/bootstrap.py
+Index: rustc.git/src/bootstrap/bootstrap.py
===================================================================
---- rust.orig/src/bootstrap/bootstrap.py
-+++ rust/src/bootstrap/bootstrap.py
-@@ -681,6 +681,8 @@ class RustBuild(object):
+--- rustc.git.orig/src/bootstrap/bootstrap.py
++++ rustc.git/src/bootstrap/bootstrap.py
+@@ -730,6 +730,8 @@ class RustBuild(object):
# preserve existing RUSTFLAGS
env.setdefault("RUSTFLAGS", "")
env["RUSTFLAGS"] += " -Cdebuginfo=2"
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -985,15 +985,13 @@
+Index: rustc.git/src/bootstrap/lib.rs
+===================================================================
+--- rustc.git.orig/src/bootstrap/lib.rs
++++ rustc.git/src/bootstrap/lib.rs
+@@ -979,15 +979,13 @@ impl Build {
return s;
}
Bug: https://github.com/rust-lang/rust/issues/68973s
---- a/src/librustc_target/spec/windows_gnu_base.rs
-+++ b/src/librustc_target/spec/windows_gnu_base.rs
-@@ -35,6 +35,8 @@
+Index: rustc.git/src/librustc_target/spec/windows_gnu_base.rs
+===================================================================
+--- rustc.git.orig/src/librustc_target/spec/windows_gnu_base.rs
++++ rustc.git/src/librustc_target/spec/windows_gnu_base.rs
+@@ -33,6 +33,8 @@ pub fn opts() -> TargetOptions {
"-lmsvcrt".to_string(),
"-luser32".to_string(),
"-lkernel32".to_string(),
Bug-Debian: https://bugs.debian.org/881845
Last-Update: 2020-03-23
-Index: rust/src/librustc_codegen_llvm/llvm_util.rs
+Index: rustc.git/src/librustc_codegen_llvm/llvm_util.rs
===================================================================
---- rust.orig/src/librustc_codegen_llvm/llvm_util.rs
-+++ rust/src/librustc_codegen_llvm/llvm_util.rs
-@@ -108,6 +108,12 @@ unsafe fn configure_llvm(sess: &Session)
+--- rustc.git.orig/src/librustc_codegen_llvm/llvm_util.rs
++++ rustc.git/src/librustc_codegen_llvm/llvm_util.rs
+@@ -106,6 +106,12 @@ unsafe fn configure_llvm(sess: &Session)
// during inlining. Unfortunately these may block other optimizations.
add("-preserve-alignment-assumptions-during-inlining=false", false);
Author: Ximin Luo <infinity0@debian.org>
Bug: https://github.com/rust-lang/rust/issues/34902
-Index: rust/src/librustc_llvm/build.rs
+Index: rustc.git/src/librustc_llvm/build.rs
===================================================================
---- rust.orig/src/librustc_llvm/build.rs
-+++ rust/src/librustc_llvm/build.rs
-@@ -121,6 +121,11 @@ fn main() {
+--- rustc.git.orig/src/librustc_llvm/build.rs
++++ rustc.git/src/librustc_llvm/build.rs
+@@ -137,6 +137,11 @@ fn main() {
let mut cfg = cc::Build::new();
cfg.warnings(false);
for flag in cxxflags.split_whitespace() {
-Index: rust/src/bootstrap/bootstrap.py
+Index: rustc.git/src/bootstrap/bootstrap.py
===================================================================
---- rust.orig/src/bootstrap/bootstrap.py
-+++ rust/src/bootstrap/bootstrap.py
-@@ -81,7 +81,7 @@ def _download(path, url, probably_big, v
+--- rustc.git.orig/src/bootstrap/bootstrap.py
++++ rustc.git/src/bootstrap/bootstrap.py
+@@ -83,7 +83,7 @@ def _download(path, url, probably_big, v
run(["curl", option,
"-y", "30", "-Y", "10", # timeout if speed is < 10 bytes/sec for > 30 seconds
"--connect-timeout", "30", # timeout if cannot connect within 30 seconds
-Index: rust/src/librustc_llvm/build.rs
+Index: rustc.git/src/librustc_llvm/build.rs
===================================================================
---- rust.orig/src/librustc_llvm/build.rs
-+++ rust/src/librustc_llvm/build.rs
-@@ -223,7 +223,7 @@ fn main() {
+--- rustc.git.orig/src/librustc_llvm/build.rs
++++ rustc.git/src/librustc_llvm/build.rs
+@@ -249,7 +249,7 @@ fn main() {
if is_crossed {
if lib.starts_with("-LIBPATH:") {
println!("cargo:rustc-link-search=native={}", lib[9..].replace(&host, &target));