diff options
Diffstat (limited to 'debian/patches')
77 files changed, 5126 insertions, 2741 deletions
diff --git a/debian/patches/d-rust-gdb-paths b/debian/patches/behaviour/d-rust-gdb-paths.patch index ad02db260..86d9c2d4d 100644 --- a/debian/patches/d-rust-gdb-paths +++ b/debian/patches/behaviour/d-rust-gdb-paths.patch @@ -2,19 +2,18 @@ From: Angus Lees <gus@debian.org> Date: Thu, 14 Jul 2022 13:17:39 +0200 Subject: Hardcode GDB python module directory -Forwarded: not-needed - Debian package installs python modules into a fixed directory, so just hardcode path in wrapper script. + +Forwarded: not-needed --- - src/etc/rust-gdb | 2 +- src/etc/rust-gdbgui | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) -Index: rust/src/etc/rust-gdbgui -=================================================================== ---- rust.orig/src/etc/rust-gdbgui -+++ rust/src/etc/rust-gdbgui +diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui +index 471810c..be62b44 100755 +--- a/src/etc/rust-gdbgui ++++ b/src/etc/rust-gdbgui @@ -40,7 +40,7 @@ else fi diff --git a/debian/patches/d-rust-lldb-paths b/debian/patches/behaviour/d-rust-lldb-paths.patch index dddbec175..6afe0cc19 100644 --- a/debian/patches/d-rust-lldb-paths +++ b/debian/patches/behaviour/d-rust-lldb-paths.patch @@ -2,18 +2,18 @@ From: Angus Lees <gus@debian.org> Date: Thu, 14 Jul 2022 13:17:39 +0200 Subject: Hardcode LLDB python module directory -Forwarded: not-needed - Debian package installs python modules into a fixed directory, so just hardcode path in wrapper script. + +Forwarded: not-needed --- src/etc/rust-lldb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: rust/src/etc/rust-lldb -=================================================================== ---- rust.orig/src/etc/rust-lldb -+++ rust/src/etc/rust-lldb +diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb +index bce72f1..38e76c2 100755 +--- a/src/etc/rust-lldb ++++ b/src/etc/rust-lldb @@ -7,10 +7,10 @@ set -e host=$(rustc -vV | sed -n -e 's/^host: //p') @@ -23,7 +23,7 @@ Index: rust/src/etc/rust-lldb RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb" -lldb=lldb -+lldb=lldb-16 ++lldb=lldb-17 if [ -f "$RUST_LLDB" ]; then lldb="$RUST_LLDB" else diff --git a/debian/patches/d-rustc-add-soname.patch b/debian/patches/behaviour/d-rustc-add-soname.patch index 03dc0ba6d..91959bdc0 100644 --- a/debian/patches/d-rustc-add-soname.patch +++ b/debian/patches/behaviour/d-rustc-add-soname.patch @@ -2,8 +2,6 @@ From: Angus Lees <gus@debian.org> Date: Thu, 14 Jul 2022 13:17:39 +0200 Subject: Set DT_SONAME when building dylibs -Forwarded: no - In Rust, library filenames include a version-specific hash to help the run-time linker find the correct version. Unlike in C/C++, the compiler looks for all libraries matching a glob that ignores the @@ -20,15 +18,17 @@ find DT_SONAME on shared libraries in public directories. This patch passes -Wl,-soname=$outfile when building dylibs (and using a GNU linker). + +Forwarded: no --- compiler/rustc_codegen_ssa/src/back/link.rs | 7 +++++++ 1 file changed, 7 insertions(+) -Index: rust/compiler/rustc_codegen_ssa/src/back/link.rs -=================================================================== ---- rust.orig/compiler/rustc_codegen_ssa/src/back/link.rs -+++ rust/compiler/rustc_codegen_ssa/src/back/link.rs -@@ -2359,6 +2359,13 @@ fn add_order_independent_options( +diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs +index b0d22ad..9f824f4 100644 +--- a/compiler/rustc_codegen_ssa/src/back/link.rs ++++ b/compiler/rustc_codegen_ssa/src/back/link.rs +@@ -2384,6 +2384,13 @@ fn add_order_independent_options( } add_rpath_args(cmd, sess, codegen_results, out_filename); diff --git a/debian/patches/behaviour/d-rustc-i686-baseline.patch b/debian/patches/behaviour/d-rustc-i686-baseline.patch new file mode 100644 index 000000000..0e40ad70b --- /dev/null +++ b/debian/patches/behaviour/d-rustc-i686-baseline.patch @@ -0,0 +1,56 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: Change i686 to match Debian i386 baseline + +see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973414 , might need to be +adapted to reduce the baseline again + +Forwarded: not-needed + +=================================================================== +--- + compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs | 2 +- + tests/ui/abi/homogenous-floats-target-feature-mixup.rs | 3 ++- + tests/ui/sse2.rs | 2 +- + 3 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs +index 3b7be48..4f01366 100644 +--- a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs ++++ b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs +@@ -2,7 +2,7 @@ use crate::spec::{base, Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Tar + + pub fn target() -> Target { + let mut base = base::linux_gnu::opts(); +- base.cpu = "pentium4".into(); ++ base.cpu = "pentiumpro".into(); + base.max_atomic_width = Some(64); + base.supported_sanitizers = SanitizerSet::ADDRESS; + base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); +diff --git a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs +index 4600bd0..e178964 100644 +--- a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs ++++ b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs +@@ -24,7 +24,8 @@ fn main() { + match std::env::var("TARGET") { + Ok(s) => { + // Skip this tests on i586-unknown-linux-gnu where sse2 is disabled +- if s.contains("i586") { ++ // Debian: our i686 doesn't have SSE 2.. ++ if s.contains("i586") || s.contains("i686") { + return + } + } +diff --git a/tests/ui/sse2.rs b/tests/ui/sse2.rs +index 172f407..bf39939 100644 +--- a/tests/ui/sse2.rs ++++ b/tests/ui/sse2.rs +@@ -15,7 +15,7 @@ fn main() { + } + Err(_) => return, + } +- if cfg!(any(target_arch = "x86", target_arch = "x86_64")) { ++ if cfg!(any(target_arch = "x86_64")) { + assert!(cfg!(target_feature = "sse2"), + "SSE2 was not detected as available on an x86 platform"); + } diff --git a/debian/patches/d-rustc-windows-ssp.patch b/debian/patches/behaviour/d-rustc-windows-ssp.patch index 46b20fb97..6cacf0ef1 100644 --- a/debian/patches/d-rustc-windows-ssp.patch +++ b/debian/patches/behaviour/d-rustc-windows-ssp.patch @@ -4,14 +4,14 @@ Subject: d-rustc-windows-ssp Bug: https://github.com/rust-lang/rust/issues/68973 --- - compiler/rustc_target/src/spec/windows_gnu_base.rs | 2 ++ + compiler/rustc_target/src/spec/base/windows_gnu.rs | 2 ++ 1 file changed, 2 insertions(+) -Index: rust/compiler/rustc_target/src/spec/windows_gnu_base.rs -=================================================================== ---- rust.orig/compiler/rustc_target/src/spec/windows_gnu_base.rs -+++ rust/compiler/rustc_target/src/spec/windows_gnu_base.rs -@@ -41,6 +41,8 @@ pub fn opts() -> TargetOptions { +diff --git a/compiler/rustc_target/src/spec/base/windows_gnu.rs b/compiler/rustc_target/src/spec/base/windows_gnu.rs +index 25f02dc..402bb29 100644 +--- a/compiler/rustc_target/src/spec/base/windows_gnu.rs ++++ b/compiler/rustc_target/src/spec/base/windows_gnu.rs +@@ -42,6 +42,8 @@ pub fn opts() -> TargetOptions { "-lmsvcrt", "-luser32", "-lkernel32", diff --git a/debian/patches/d-rustdoc-disable-embedded-fonts.patch b/debian/patches/behaviour/d-rustdoc-disable-embedded-fonts.patch index 99fa7d251..7f9a13289 100644 --- a/debian/patches/d-rustdoc-disable-embedded-fonts.patch +++ b/debian/patches/behaviour/d-rustdoc-disable-embedded-fonts.patch @@ -1,19 +1,19 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> Date: Thu, 14 Jul 2022 13:17:39 +0200 -Subject: d-rustdoc-disable-embedded-fonts +Subject: removed some embedded fonts +Forwarded: not-needed =================================================================== --- - src/librustdoc/html/render/write_shared.rs | 2 -- - src/librustdoc/html/static/css/rustdoc.css | 8 -------- - src/librustdoc/html/static_files.rs | 23 ----------------------- - 3 files changed, 33 deletions(-) + src/librustdoc/html/static/css/rustdoc.css | 8 -------- + src/librustdoc/html/static_files.rs | 2 -- + 2 files changed, 10 deletions(-) -Index: rust/src/librustdoc/html/static/css/rustdoc.css -=================================================================== ---- rust.orig/src/librustdoc/html/static/css/rustdoc.css -+++ rust/src/librustdoc/html/static/css/rustdoc.css -@@ -79,14 +79,6 @@ +diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css +index c4e97de..e9ea715 100644 +--- a/src/librustdoc/html/static/css/rustdoc.css ++++ b/src/librustdoc/html/static/css/rustdoc.css +@@ -86,14 +86,6 @@ font-display: swap; } @@ -28,11 +28,11 @@ Index: rust/src/librustdoc/html/static/css/rustdoc.css * { box-sizing: border-box; } -Index: rust/src/librustdoc/html/static_files.rs -=================================================================== ---- rust.orig/src/librustdoc/html/static_files.rs -+++ rust/src/librustdoc/html/static_files.rs -@@ -123,8 +123,6 @@ static_files! { +diff --git a/src/librustdoc/html/static_files.rs b/src/librustdoc/html/static_files.rs +index ca9a78f..2fd45fb 100644 +--- a/src/librustdoc/html/static_files.rs ++++ b/src/librustdoc/html/static_files.rs +@@ -119,8 +119,6 @@ static_files! { source_code_pro_semibold => "static/fonts/SourceCodePro-Semibold.ttf.woff2", source_code_pro_italic => "static/fonts/SourceCodePro-It.ttf.woff2", source_code_pro_license => "static/fonts/SourceCodePro-LICENSE.txt", 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 248dc118c..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. @@ -75,25 +183,25 @@ Index: rust/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md +[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 +-[virtual workspace]: ../../cargo/reference/workspaces.html#virtual-workspace -[`resolver` field]: ../../cargo/reference/resolver.html#resolver-versions +[workspace]: ../../../../cargo/book/reference/workspaces.html -+[virtual workspace]: ../../../../cargo/book/reference/workspaces.html#virtual-manifest ++[virtual workspace]: ../../../../cargo/book/reference/workspaces.html#virtual-workspace +[`resolver` field]: ../../../../cargo/book/reference/resolver.html#resolver-versions ## 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 -@@ -370,6 +370,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 -@@ -793,7 +793,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 -@@ -932,7 +932,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/build/d-bootstrap-custom-debuginfo-path.patch b/debian/patches/build/d-bootstrap-custom-debuginfo-path.patch new file mode 100644 index 000000000..04daef05d --- /dev/null +++ b/debian/patches/build/d-bootstrap-custom-debuginfo-path.patch @@ -0,0 +1,56 @@ +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/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(-) + +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 => { +- let sha = self.rust_sha().unwrap_or(&self.version); +- Some(format!("/rustc/{sha}")) ++ Some(format!("/usr/src/rustc-{}", &self.version)) + } +- GitRepo::Llvm => Some(String::from("/rustc/llvm")), ++ GitRepo::Llvm => panic!("GitRepo::Llvm unsupported on Debian"), + } + } + +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 + +-// CHECK: !DIFile(filename: "{{/rustc/.*/library/std/src/panic.rs}}" ++// CHECK: !DIFile(filename: "{{/usr/src/rustc-.*/library/std/src/panic.rs}}" + fn main() { + std::thread::spawn(|| { + println!("hello"); diff --git a/debian/patches/build/d-bootstrap-disable-git.patch b/debian/patches/build/d-bootstrap-disable-git.patch new file mode 100644 index 000000000..f63e3a6cd --- /dev/null +++ b/debian/patches/build/d-bootstrap-disable-git.patch @@ -0,0 +1,44 @@ +From: Matthijs van Otterdijk <matthijs@wirevirt.net> +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 +--- + src/bootstrap/src/core/build_steps/dist.rs | 6 ++++-- + src/bootstrap/src/utils/channel.rs | 6 ++++++ + 2 files changed, 10 insertions(+), 2 deletions(-) + +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 + // a complete distribution. +- if builder.rust_info().is_managed_git_subrepository() +- || builder.rust_info().is_from_tarball() ++ // ++ // Debian: short-circuited because the Debian package is also in a git ++ // repository, but cargo-vendor should not be installed or run. ++ if false + { + 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/build/d-bootstrap-install-symlinks.patch b/debian/patches/build/d-bootstrap-install-symlinks.patch new file mode 100644 index 000000000..bb0cc7c9a --- /dev/null +++ b/debian/patches/build/d-bootstrap-install-symlinks.patch @@ -0,0 +1,38 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 14 Jul 2022 13:17:38 +0200 +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(-) + +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" + +- if echo "$_file" | grep "^bin/" > /dev/null || test -x "$_src_dir/$_component/$_file" ++ if [ -h "$_src_dir/$_component/$_file" ] ++ then ++ run cp -d "$_src_dir/$_component/$_file" "$_file_install_path" ++ elif echo "$_file" | grep "^bin/" > /dev/null || test -x "$_src_dir/$_component/$_file" + then + run cp "$_src_dir/$_component/$_file" "$_file_install_path" + run chmod 755 "$_file_install_path" +@@ -639,7 +642,7 @@ install_components() { + + maybe_backup_path "$_file_install_path" + +- run cp -R "$_src_dir/$_component/$_file" "$_file_install_path" ++ run cp -dR "$_src_dir/$_component/$_file" "$_file_install_path" + critical_need_ok "failed to copy directory" + + # Set permissions. 0755 for dirs, 644 for files diff --git a/debian/patches/d-bootstrap-no-assume-tools.patch b/debian/patches/build/d-bootstrap-no-assume-tools.patch index c9d066619..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/builder/tests.rs -=================================================================== ---- rust.orig/src/bootstrap/builder/tests.rs -+++ rust/src/bootstrap/builder/tests.rs -@@ -380,9 +380,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 30e826d81..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/builder.rs | 12 ++++++++++++ + src/bootstrap/src/core/builder.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) -Index: rust/src/bootstrap/builder.rs -=================================================================== ---- rust.orig/src/bootstrap/builder.rs -+++ rust/src/bootstrap/builder.rs -@@ -1409,6 +1409,18 @@ impl<'a> Builder<'a> { - } - } +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 1ea9ac86a..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/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/doc.rs -=================================================================== ---- rust.orig/src/bootstrap/doc.rs -+++ rust/src/bootstrap/doc.rs -@@ -360,7 +360,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/doc.rs .arg("-o") .arg(&out) .arg(&path); -@@ -369,11 +389,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 diff --git a/debian/patches/c-2200-workaround-x32-test.patch b/debian/patches/c-2200-workaround-x32-test.patch deleted file mode 100644 index 9dc42ddbc..000000000 --- a/debian/patches/c-2200-workaround-x32-test.patch +++ /dev/null @@ -1,15 +0,0 @@ -Bug: https://github.com/rust-lang/cargo/issues/10005 - -Index: rust/src/tools/cargo/tests/testsuite/cfg.rs -=================================================================== ---- rust.orig/src/tools/cargo/tests/testsuite/cfg.rs -+++ rust/src/tools/cargo/tests/testsuite/cfg.rs -@@ -272,7 +272,7 @@ fn any_ok() { - - // https://github.com/rust-lang/cargo/issues/5313 - #[cargo_test] --#[cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu"))] -+#[cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu", target_pointer_width = "64"))] - fn cfg_looks_at_rustflags_for_target() { - let p = project() - .file( diff --git a/debian/patches/c-disable-fs-specific-test.patch b/debian/patches/c-disable-fs-specific-test.patch deleted file mode 100644 index ccdc0ba81..000000000 --- a/debian/patches/c-disable-fs-specific-test.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: rust/src/tools/cargo/tests/testsuite/metadata.rs -=================================================================== ---- rust.orig/src/tools/cargo/tests/testsuite/metadata.rs -+++ rust/src/tools/cargo/tests/testsuite/metadata.rs -@@ -3988,7 +3988,7 @@ fn dep_kinds_workspace() { - // Creating non-utf8 path is an OS-specific pain, so let's run this only on - // linux, where arbitrary bytes work. - #[cfg(target_os = "linux")] --#[cargo_test] -+#[allow(dead_code)] - fn cargo_metadata_non_utf8() { - use std::ffi::OsString; - use std::os::unix::ffi::OsStringExt; diff --git a/debian/patches/c-update-libgit2.patch b/debian/patches/c-update-libgit2.patch deleted file mode 100644 index 8fe7c1ca9..000000000 --- a/debian/patches/c-update-libgit2.patch +++ /dev/null @@ -1,37 +0,0 @@ -Index: rust/src/tools/cargo/Cargo.toml -=================================================================== ---- rust.orig/src/tools/cargo/Cargo.toml -+++ rust/src/tools/cargo/Cargo.toml -@@ -33,8 +33,8 @@ env_logger = "0.10.0" - filetime = "0.2.9" - flate2 = { version = "1.0.3", default-features = false, features = ["zlib"] } - fwdansi = "1.1.0" --git2 = "0.17.1" --git2-curl = "0.18.0" -+git2 = "0.18" -+git2-curl = "0.19.0" - gix = { version = "0.44.1", default-features = false, features = ["blocking-http-transport-curl", "progress-tree"] } - gix-features-for-configuration-only = { version = "0.29.0", package = "gix-features", features = [ "parallel" ] } - glob = "0.3.0" -@@ -53,7 +53,7 @@ jobserver = "0.1.26" - lazy_static = "1.3.0" - lazycell = "1.2.0" - libc = "0.2.144" --libgit2-sys = "0.15.1" -+libgit2-sys = "0.16.1" - log = "0.4.17" - memchr = "2.1.3" - miow = "0.5.0" -Index: rust/src/tools/cargo/crates/cargo-test-support/Cargo.toml -=================================================================== ---- rust.orig/src/tools/cargo/crates/cargo-test-support/Cargo.toml -+++ rust/src/tools/cargo/crates/cargo-test-support/Cargo.toml -@@ -15,7 +15,7 @@ cargo-util = { path = "../cargo-util" } - crates-io = { path = "../crates-io" } - filetime = "0.2" - flate2 = { version = "1.0", default-features = false, features = ["zlib"] } --git2 = "0.17.0" -+git2 = "0.18.0" - glob = "0.3" - itertools = "0.10.0" - lazy_static = "1.0" diff --git a/debian/patches/c-0003-tests-add-missing-cross-disabled-checks.patch b/debian/patches/cargo/c-0003-tests-add-missing-cross-disabled-checks.patch index e3a6397d5..fef435fc6 100644 --- a/debian/patches/c-0003-tests-add-missing-cross-disabled-checks.patch +++ b/debian/patches/cargo/c-0003-tests-add-missing-cross-disabled-checks.patch @@ -1,10 +1,8 @@ -From 981279ccd8f7855faaed010bff0891afff588210 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= - <debian@fabian.gruenbichler.email> +From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <debian@fabian.gruenbichler.email> Date: Sat, 19 Nov 2022 10:24:08 +0100 Subject: [PATCH] tests: add missing cross disabled checks MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 +Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit cross_conmpile::alternate states it should only be used in test cases @@ -12,16 +10,17 @@ after checking cross_compile::disabled(), which is missing here. these tests fail despite setting CFG_DISABLE_CROSS_TESTS on i386, since both the host and the alternate cross target would be i686 in that case. + Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email> --- - tests/testsuite/build_script.rs | 6 ++++++ + src/tools/cargo/tests/testsuite/build_script.rs | 6 ++++++ 1 file changed, 6 insertions(+) -diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs -index 902364dff..e458b3262 100644 +diff --git a/src/tools/cargo/tests/testsuite/build_script.rs b/src/tools/cargo/tests/testsuite/build_script.rs +index f7361fc..f587ddd 100644 --- a/src/tools/cargo/tests/testsuite/build_script.rs +++ b/src/tools/cargo/tests/testsuite/build_script.rs -@@ -697,6 +697,9 @@ fn custom_build_linker_bad_host_with_arc +@@ -734,6 +734,9 @@ fn custom_build_linker_bad_host_with_arch() { #[cargo_test] fn custom_build_env_var_rustc_linker_cross_arch_host() { let target = rustc_host(); @@ -31,7 +30,7 @@ index 902364dff..e458b3262 100644 let cross_target = cross_compile::alternate(); let p = project() .file( -@@ -735,6 +738,9 @@ fn custom_build_env_var_rustc_linker_cro +@@ -772,6 +775,9 @@ fn custom_build_env_var_rustc_linker_cross_arch_host() { #[cargo_test] fn custom_build_linker_bad_cross_arch_host() { let target = rustc_host(); @@ -41,6 +40,3 @@ index 902364dff..e458b3262 100644 let cross_target = cross_compile::alternate(); let p = project() .file( --- -2.38.1 - diff --git a/debian/patches/c-2002_disable-net-tests.patch b/debian/patches/cargo/c-2002_disable-net-tests.patch index 3f8926877..5ed606980 100644 --- a/debian/patches/c-2002_disable-net-tests.patch +++ b/debian/patches/cargo/c-2002_disable-net-tests.patch @@ -1,22 +1,96 @@ -Description: Disable network tests -Author: Ximin Luo <infinity0@debian.org> +From: Ximin Luo <infinity0@debian.org> +Date: Thu, 13 Jun 2024 11:16:38 +0200 +Subject: Disable network tests + Forwarded: TODO --- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ -Index: rust/src/tools/cargo/tests/testsuite/git_auth.rs -=================================================================== ---- rust.orig/src/tools/cargo/tests/testsuite/git_auth.rs -+++ rust/src/tools/cargo/tests/testsuite/git_auth.rs -@@ -103,7 +103,7 @@ fn setup_failed_auth_test() -> (SocketAd + .../cargo/tests/testsuite/credential_process.rs | 14 +-- + src/tools/cargo/tests/testsuite/git_auth.rs | 4 +- + src/tools/cargo/tests/testsuite/net_config.rs | 4 +- + src/tools/cargo/tests/testsuite/publish.rs | 104 ++++++++++----------- + 4 files changed, 63 insertions(+), 63 deletions(-) + +diff --git a/src/tools/cargo/tests/testsuite/credential_process.rs b/src/tools/cargo/tests/testsuite/credential_process.rs +index 815089f..477e5d2 100644 +--- a/src/tools/cargo/tests/testsuite/credential_process.rs ++++ b/src/tools/cargo/tests/testsuite/credential_process.rs +@@ -63,7 +63,7 @@ fn get_token_test() -> (Project, TestRegistry) { + (p, server) + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish() { + // Checks that credential-process is used for `cargo publish`. + let (p, _t) = get_token_test(); +@@ -85,7 +85,7 @@ You may press ctrl-c [..] + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn basic_unsupported() { + // Non-action commands don't support login/logout. + let registry = registry::RegistryBuilder::new() +@@ -121,7 +121,7 @@ Caused by: + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn login() { + let registry = registry::RegistryBuilder::new() + .no_configure_token() +@@ -142,7 +142,7 @@ fn login() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn logout() { + let server = registry::RegistryBuilder::new() + .no_configure_token() +@@ -161,7 +161,7 @@ fn logout() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn yank() { + let (p, _t) = get_token_test(); + +@@ -176,7 +176,7 @@ fn yank() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn owner() { + let (p, _t) = get_token_test(); + +@@ -191,7 +191,7 @@ fn owner() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn invalid_token_output() { + // Error when credential process does not output the expected format for a token. + let cred_proj = project() +diff --git a/src/tools/cargo/tests/testsuite/git_auth.rs b/src/tools/cargo/tests/testsuite/git_auth.rs +index c79ae7c..b15582e 100644 +--- a/src/tools/cargo/tests/testsuite/git_auth.rs ++++ b/src/tools/cargo/tests/testsuite/git_auth.rs +@@ -103,7 +103,7 @@ fn setup_failed_auth_test() -> (SocketAddr, JoinHandle<()>, Arc<AtomicUsize>) { } // Tests that HTTP auth is offered from `credential.helper`. -#[cargo_test] +#[allow(dead_code)] fn http_auth_offered() { - // TODO(Seb): remove this once possible. - if cargo_uses_gitoxide() { -@@ -172,7 +172,7 @@ Caused by: + let (addr, t, connections) = setup_failed_auth_test(); + let p = project() +@@ -167,7 +167,7 @@ Caused by: } // Boy, sure would be nice to have a TLS implementation in rust! @@ -25,10 +99,10 @@ Index: rust/src/tools/cargo/tests/testsuite/git_auth.rs fn https_something_happens() { let server = TcpListener::bind("127.0.0.1:0").unwrap(); let addr = server.local_addr().unwrap(); -Index: rust/src/tools/cargo/tests/testsuite/net_config.rs -=================================================================== ---- rust.orig/src/tools/cargo/tests/testsuite/net_config.rs -+++ rust/src/tools/cargo/tests/testsuite/net_config.rs +diff --git a/src/tools/cargo/tests/testsuite/net_config.rs b/src/tools/cargo/tests/testsuite/net_config.rs +index 569ec55..27c4132 100644 +--- a/src/tools/cargo/tests/testsuite/net_config.rs ++++ b/src/tools/cargo/tests/testsuite/net_config.rs @@ -2,7 +2,7 @@ use cargo_test_support::project; @@ -47,10 +121,10 @@ Index: rust/src/tools/cargo/tests/testsuite/net_config.rs fn net_retry_git_outputs_warning() { let p = project() .file( -Index: rust/src/tools/cargo/tests/testsuite/publish.rs -=================================================================== ---- rust.orig/src/tools/cargo/tests/testsuite/publish.rs -+++ rust/src/tools/cargo/tests/testsuite/publish.rs +diff --git a/src/tools/cargo/tests/testsuite/publish.rs b/src/tools/cargo/tests/testsuite/publish.rs +index 5d29ac8..05d0f02 100644 +--- a/src/tools/cargo/tests/testsuite/publish.rs ++++ b/src/tools/cargo/tests/testsuite/publish.rs @@ -88,7 +88,7 @@ fn validate_upload_li() { ); } @@ -60,7 +134,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn simple() { let registry = RegistryBuilder::new().http_api().http_index().build(); -@@ -130,7 +130,7 @@ You may press ctrl-c to skip waiting; th +@@ -130,7 +130,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. // Check that the `token` key works at the root instead of under a // `[registry]` table. @@ -69,7 +143,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn simple_publish_with_http() { let _reg = registry::RegistryBuilder::new() .http_api() -@@ -170,7 +170,7 @@ You may press ctrl-c to skip waiting; th +@@ -170,7 +170,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. .run(); } @@ -78,7 +152,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn simple_publish_with_asymmetric() { let _reg = registry::RegistryBuilder::new() .http_api() -@@ -213,7 +213,7 @@ You may press ctrl-c to skip waiting; th +@@ -213,7 +213,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. .run(); } @@ -105,7 +179,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn git_deps() { // Use local registry for faster test times since no publish will occur let registry = registry::init(); -@@ -353,7 +353,7 @@ the `git` specification will be removed +@@ -353,7 +353,7 @@ the `git` specification will be removed from the dependency declaration. .run(); } @@ -114,7 +188,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn path_dependency_no_version() { // Use local registry for faster test times since no publish will occur let registry = registry::init(); -@@ -393,7 +393,7 @@ the `path` specification will be removed +@@ -393,7 +393,7 @@ the `path` specification will be removed from the dependency declaration. .run(); } @@ -132,7 +206,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn dont_publish_dirty() { // Use local registry for faster test times since no publish will occur let registry = registry::init(); -@@ -468,7 +468,7 @@ to proceed despite this and include the +@@ -468,7 +468,7 @@ to proceed despite this and include the uncommitted changes, pass the `--allow-d .run(); } @@ -141,7 +215,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_clean() { // `publish` generally requires a remote registry let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -516,7 +516,7 @@ You may press ctrl-c to skip waiting; th +@@ -516,7 +516,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. // Other tests will verify the endpoint gets the right payload. } @@ -195,7 +269,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn registry_not_in_publish_list() { let p = project() .file( -@@ -771,7 +771,7 @@ The registry `alternative` is not listed +@@ -771,7 +771,7 @@ The registry `alternative` is not listed in the `package.publish` value in Cargo .run(); } @@ -222,8 +296,8 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_implicitly_to_only_allowed_registry() { let _registry = RegistryBuilder::new() .http_api() -@@ -921,7 +921,7 @@ You may press ctrl-c [..] - ); +@@ -963,7 +963,7 @@ fn publish_failed_with_index_and_only_allowed_registry() { + .run(); } -#[cargo_test] @@ -231,7 +305,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_fail_with_no_registry_specified() { let p = project().build(); -@@ -955,7 +955,7 @@ The registry `crates-io` is not listed i +@@ -997,7 +997,7 @@ The registry `crates-io` is not listed in the `package.publish` value in Cargo.t .run(); } @@ -240,7 +314,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn block_publish_no_registry() { let p = project() .file( -@@ -985,7 +985,7 @@ fn block_publish_no_registry() { +@@ -1027,7 +1027,7 @@ fn block_publish_no_registry() { } // Explicitly setting `crates-io` in the publish list. @@ -249,7 +323,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_with_crates_io_explicit() { // `publish` generally requires a remote registry let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -1038,7 +1038,7 @@ You may press ctrl-c [..] +@@ -1080,7 +1080,7 @@ You may press ctrl-c [..] .run(); } @@ -258,7 +332,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_with_select_features() { // `publish` generally requires a remote registry let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -1089,7 +1089,7 @@ You may press ctrl-c [..] +@@ -1131,7 +1131,7 @@ You may press ctrl-c [..] .run(); } @@ -267,7 +341,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_with_all_features() { // `publish` generally requires a remote registry let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -1140,7 +1140,7 @@ You may press ctrl-c [..] +@@ -1182,7 +1182,7 @@ You may press ctrl-c [..] .run(); } @@ -276,7 +350,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_with_no_default_features() { // Use local registry for faster test times since no publish will occur let registry = registry::init(); -@@ -1176,7 +1176,7 @@ fn publish_with_no_default_features() { +@@ -1218,7 +1218,7 @@ fn publish_with_no_default_features() { .run(); } @@ -285,7 +359,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_with_patch() { let registry = RegistryBuilder::new().http_api().http_index().build(); Package::new("bar", "1.0.0").publish(); -@@ -1282,7 +1282,7 @@ You may press ctrl-c [..] +@@ -1324,7 +1324,7 @@ You may press ctrl-c [..] ); } @@ -294,7 +368,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_checks_for_token_before_verify() { let registry = registry::RegistryBuilder::new() .no_configure_token() -@@ -1331,7 +1331,7 @@ fn publish_checks_for_token_before_verif +@@ -1373,7 +1373,7 @@ fn publish_checks_for_token_before_verify() { .run(); } @@ -303,7 +377,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_with_bad_source() { let p = project() .file( -@@ -1380,7 +1380,7 @@ include `--registry crates-io` to use cr +@@ -1422,7 +1422,7 @@ include `--registry crates-io` to use crates.io } // A dependency with both `git` and `version`. @@ -312,7 +386,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_git_with_version() { let registry = RegistryBuilder::new().http_api().http_index().build(); -@@ -1524,7 +1524,7 @@ You may press ctrl-c [..] +@@ -1566,7 +1566,7 @@ You may press ctrl-c [..] ); } @@ -321,7 +395,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_dev_dep_no_version() { let registry = RegistryBuilder::new().http_api().http_index().build(); -@@ -1614,7 +1614,7 @@ repository = "foo" +@@ -1656,7 +1656,7 @@ repository = "foo" ); } @@ -330,7 +404,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn credentials_ambiguous_filename() { // `publish` generally requires a remote registry let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -1670,7 +1670,7 @@ You may press ctrl-c [..] +@@ -1712,7 +1712,7 @@ You may press ctrl-c [..] // --index will not load registry.token to avoid possibly leaking // crates.io token to another server. @@ -339,7 +413,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn index_requires_token() { // Use local registry for faster test times since no publish will occur let registry = registry::init(); -@@ -1705,7 +1705,7 @@ fn index_requires_token() { +@@ -1747,7 +1747,7 @@ fn index_requires_token() { } // publish with source replacement without --registry @@ -348,7 +422,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn cratesio_source_replacement() { registry::init(); let p = project() -@@ -1734,7 +1734,7 @@ include `--registry dummy-registry` or ` +@@ -1776,7 +1776,7 @@ include `--registry dummy-registry` or `--registry crates-io` .run(); } @@ -357,7 +431,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn publish_with_missing_readme() { // Use local registry for faster test times since no publish will occur let registry = registry::init(); -@@ -1782,7 +1782,7 @@ Caused by: +@@ -1824,7 +1824,7 @@ Caused by: } // Registry returns an API error. @@ -366,7 +440,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn api_error_json() { let _registry = registry::RegistryBuilder::new() .alternative() -@@ -1830,7 +1830,7 @@ Caused by: +@@ -1872,7 +1872,7 @@ Caused by: } // Registry returns an API error with a 200 status code. @@ -375,7 +449,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn api_error_200() { let _registry = registry::RegistryBuilder::new() .alternative() -@@ -1878,7 +1878,7 @@ Caused by: +@@ -1920,7 +1920,7 @@ Caused by: } // Registry returns an error code without a JSON message. @@ -384,7 +458,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn api_error_code() { let _registry = registry::RegistryBuilder::new() .alternative() -@@ -1932,7 +1932,7 @@ Caused by: +@@ -1975,7 +1975,7 @@ Caused by: } // Registry has a network error. @@ -393,7 +467,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn api_curl_error() { let _registry = registry::RegistryBuilder::new() .alternative() -@@ -1982,7 +1982,7 @@ Caused by: +@@ -2025,7 +2025,7 @@ Caused by: } // Registry returns an invalid response. @@ -402,7 +476,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn api_other_error() { let _registry = registry::RegistryBuilder::new() .alternative() -@@ -2032,7 +2032,7 @@ Caused by: +@@ -2075,7 +2075,7 @@ Caused by: .run(); } @@ -411,7 +485,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn in_package_workspace() { let registry = RegistryBuilder::new().http_api().http_index().build(); -@@ -2084,7 +2084,7 @@ You may press ctrl-c [..] +@@ -2127,7 +2127,7 @@ You may press ctrl-c [..] validate_upload_li(); } @@ -420,7 +494,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn with_duplicate_spec_in_members() { // Use local registry for faster test times since no publish will occur let registry = registry::init(); -@@ -2136,7 +2136,7 @@ fn with_duplicate_spec_in_members() { +@@ -2179,7 +2179,7 @@ fn with_duplicate_spec_in_members() { .run(); } @@ -429,7 +503,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn in_package_workspace_with_members_with_features_old() { let registry = RegistryBuilder::new().http_api().http_index().build(); -@@ -2187,7 +2187,7 @@ You may press ctrl-c [..] +@@ -2230,7 +2230,7 @@ You may press ctrl-c [..] validate_upload_li(); } @@ -438,7 +512,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn in_virtual_workspace() { // Use local registry for faster test times since no publish will occur let registry = registry::init(); -@@ -2223,7 +2223,7 @@ fn in_virtual_workspace() { +@@ -2266,7 +2266,7 @@ fn in_virtual_workspace() { .run(); } @@ -447,7 +521,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn in_virtual_workspace_with_p() { // `publish` generally requires a remote registry let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -2281,7 +2281,7 @@ You may press ctrl-c [..] +@@ -2324,7 +2324,7 @@ You may press ctrl-c [..] .run(); } @@ -456,7 +530,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn in_package_workspace_not_found() { // Use local registry for faster test times since no publish will occur let registry = registry::init(); -@@ -2326,7 +2326,7 @@ error: package ID specification `li` did +@@ -2369,7 +2369,7 @@ error: package ID specification `li` did not match any packages .run(); } @@ -465,7 +539,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn in_package_workspace_found_multiple() { // Use local registry for faster test times since no publish will occur let registry = registry::init(); -@@ -2383,7 +2383,7 @@ error: the `-p` argument must be specifi +@@ -2426,7 +2426,7 @@ error: the `-p` argument must be specified to select a single package to publish .run(); } @@ -474,7 +548,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs // https://github.com/rust-lang/cargo/issues/10536 fn publish_path_dependency_without_workspace() { // Use local registry for faster test times since no publish will occur -@@ -2430,7 +2430,7 @@ error: package ID specification `bar` di +@@ -2473,7 +2473,7 @@ error: package ID specification `bar` did not match any packages .run(); } @@ -483,7 +557,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn http_api_not_noop() { let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -2491,7 +2491,7 @@ You may press ctrl-c [..] +@@ -2534,7 +2534,7 @@ You may press ctrl-c [..] p.cargo("build").run(); } @@ -492,7 +566,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn wait_for_first_publish() { // Counter for number of tries before the package is "published" let arc: Arc<Mutex<u32>> = Arc::new(Mutex::new(0)); -@@ -2573,7 +2573,7 @@ You may press ctrl-c to skip waiting; th +@@ -2616,7 +2616,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. /// A separate test is needed for package names with - or _ as they hit /// the responder twice per cargo invocation. If that ever gets changed /// this test will need to be changed accordingly. @@ -501,7 +575,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn wait_for_first_publish_underscore() { // Counter for number of tries before the package is "published" let arc: Arc<Mutex<u32>> = Arc::new(Mutex::new(0)); -@@ -2669,7 +2669,7 @@ You may press ctrl-c to skip waiting; th +@@ -2712,7 +2712,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. p.cargo("build").with_status(0).run(); } @@ -510,7 +584,7 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn wait_for_subsequent_publish() { // Counter for number of tries before the package is "published" let arc: Arc<Mutex<u32>> = Arc::new(Mutex::new(0)); -@@ -2761,7 +2761,7 @@ You may press ctrl-c to skip waiting; th +@@ -2804,7 +2804,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. p.cargo("check").with_status(0).run(); } @@ -519,97 +593,3 @@ Index: rust/src/tools/cargo/tests/testsuite/publish.rs fn skip_wait_for_publish() { // Intentionally using local registry so the crate never makes it to the index let registry = registry::init(); -Index: rust/src/tools/cargo/tests/testsuite/credential_process.rs -=================================================================== ---- rust.orig/src/tools/cargo/tests/testsuite/credential_process.rs -+++ rust/src/tools/cargo/tests/testsuite/credential_process.rs -@@ -8,7 +8,7 @@ fn toml_bin(proj: &Project, name: &str) - proj.bin(name).display().to_string().replace('\\', "\\\\") - } - --#[cargo_test] -+#[allow(dead_code)] - fn gated() { - let _alternative = registry::RegistryBuilder::new() - .alternative() -@@ -65,7 +65,7 @@ or use environment variable CARGO_REGIST - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn warn_both_token_and_process() { - // Specifying both credential-process and a token in config should issue a warning. - let _server = registry::RegistryBuilder::new() -@@ -212,7 +212,7 @@ fn get_token_test() -> (Project, TestReg - (p, server) - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish() { - // Checks that credential-process is used for `cargo publish`. - let (p, _t) = get_token_test(); -@@ -237,7 +237,7 @@ You may press ctrl-c [..] - assert_eq!(calls, 1); - } - --#[cargo_test] -+#[allow(dead_code)] - fn basic_unsupported() { - // Non-action commands don't support login/logout. - let registry = registry::RegistryBuilder::new() -@@ -280,7 +280,7 @@ the credential-process configuration val - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn login() { - let server = registry::RegistryBuilder::new() - .no_configure_token() -@@ -337,7 +337,7 @@ fn login() { - ); - } - --#[cargo_test] -+#[allow(dead_code)] - fn logout() { - let server = registry::RegistryBuilder::new() - .no_configure_token() -@@ -395,7 +395,7 @@ token for `crates-io` has been erased! - ); - } - --#[cargo_test] -+#[allow(dead_code)] - fn yank() { - let (p, _t) = get_token_test(); - -@@ -410,7 +410,7 @@ fn yank() { - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn owner() { - let (p, _t) = get_token_test(); - -@@ -425,7 +425,7 @@ fn owner() { - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn libexec_path() { - // cargo: prefixed names use the sysroot - let server = registry::RegistryBuilder::new() -@@ -459,7 +459,7 @@ Caused by: - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn invalid_token_output() { - // Error when credential process does not output the expected format for a token. - let _server = registry::RegistryBuilder::new() diff --git a/debian/patches/c-2003-workaround-qemu-vfork-command-not-found.patch b/debian/patches/cargo/c-2003-workaround-qemu-vfork-command-not-found.patch index 6453c3a30..3daad1651 100644 --- a/debian/patches/c-2003-workaround-qemu-vfork-command-not-found.patch +++ b/debian/patches/cargo/c-2003-workaround-qemu-vfork-command-not-found.patch @@ -1,8 +1,17 @@ -Index: rust/src/tools/cargo/crates/cargo-test-macro/src/lib.rs +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 13 Jun 2024 11:16:38 +0200 +Subject: c-2003-workaround-qemu-vfork-command-not-found + =================================================================== ---- rust.orig/src/tools/cargo/crates/cargo-test-macro/src/lib.rs -+++ rust/src/tools/cargo/crates/cargo-test-macro/src/lib.rs -@@ -223,6 +223,14 @@ fn has_command(command: &str) -> bool { +--- + src/tools/cargo/crates/cargo-test-macro/src/lib.rs | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/tools/cargo/crates/cargo-test-macro/src/lib.rs b/src/tools/cargo/crates/cargo-test-macro/src/lib.rs +index 14672ab..9208cb3 100644 +--- a/src/tools/cargo/crates/cargo-test-macro/src/lib.rs ++++ b/src/tools/cargo/crates/cargo-test-macro/src/lib.rs +@@ -222,6 +222,14 @@ fn has_command(command: &str) -> bool { } }; if !output.status.success() { diff --git a/debian/patches/cargo/c-2200-workaround-x32-test.patch b/debian/patches/cargo/c-2200-workaround-x32-test.patch new file mode 100644 index 000000000..eb78ec51c --- /dev/null +++ b/debian/patches/cargo/c-2200-workaround-x32-test.patch @@ -0,0 +1,22 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 13 Jun 2024 11:16:38 +0200 +Subject: c-2200-workaround-x32-test + +Bug: https://github.com/rust-lang/cargo/issues/10005 +--- + src/tools/cargo/tests/testsuite/cfg.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tools/cargo/tests/testsuite/cfg.rs b/src/tools/cargo/tests/testsuite/cfg.rs +index dcce654..c9e2e0c 100644 +--- a/src/tools/cargo/tests/testsuite/cfg.rs ++++ b/src/tools/cargo/tests/testsuite/cfg.rs +@@ -272,7 +272,7 @@ fn any_ok() { + + // https://github.com/rust-lang/cargo/issues/5313 + #[cargo_test] +-#[cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu"))] ++#[cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu", target_pointer_width = "64"))] + fn cfg_looks_at_rustflags_for_target() { + let p = project() + .file( diff --git a/debian/patches/cargo/c-disable-fs-specific-test.patch b/debian/patches/cargo/c-disable-fs-specific-test.patch new file mode 100644 index 000000000..84d887702 --- /dev/null +++ b/debian/patches/cargo/c-disable-fs-specific-test.patch @@ -0,0 +1,22 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 13 Jun 2024 11:16:38 +0200 +Subject: c-disable-fs-specific-test + +=================================================================== +--- + src/tools/cargo/tests/testsuite/metadata.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tools/cargo/tests/testsuite/metadata.rs b/src/tools/cargo/tests/testsuite/metadata.rs +index 888cdce..f06f73f 100644 +--- a/src/tools/cargo/tests/testsuite/metadata.rs ++++ b/src/tools/cargo/tests/testsuite/metadata.rs +@@ -3997,7 +3997,7 @@ fn dep_kinds_workspace() { + // Creating non-utf8 path is an OS-specific pain, so let's run this only on + // linux, where arbitrary bytes work. + #[cfg(target_os = "linux")] +-#[cargo_test] ++#[allow(dead_code)] + fn cargo_metadata_non_utf8() { + use std::ffi::OsString; + use std::os::unix::ffi::OsStringExt; diff --git a/debian/patches/d-0012-cargo-always-return-dev-channel.patch b/debian/patches/cargo/d-0012-cargo-always-return-dev-channel.patch index f643a446f..7cbe41213 100644 --- a/debian/patches/d-0012-cargo-always-return-dev-channel.patch +++ b/debian/patches/cargo/d-0012-cargo-always-return-dev-channel.patch @@ -3,15 +3,16 @@ Date: Mon, 6 May 2024 10:25:32 +0200 Subject: d-0012-cargo-always-return-dev-channel Last-Update: 2023-05-30 +Forwarded: not-needed --- src/tools/cargo/src/cargo/core/features.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tools/cargo/src/cargo/core/features.rs b/src/tools/cargo/src/cargo/core/features.rs -index d56054a..4c2aa4b 100644 +index 4f5b069..0a42077 100644 --- a/src/tools/cargo/src/cargo/core/features.rs +++ b/src/tools/cargo/src/cargo/core/features.rs -@@ -1183,9 +1183,8 @@ pub fn channel() -> String { +@@ -1205,9 +1205,8 @@ pub fn channel() -> String { return "dev".to_string(); } } diff --git a/debian/patches/d-0010-cargo-remove-vendored-c-crates.patch b/debian/patches/d-0010-cargo-remove-vendored-c-crates.patch deleted file mode 100644 index 7c31b69d9..000000000 --- a/debian/patches/d-0010-cargo-remove-vendored-c-crates.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> -Date: Mon, 6 May 2024 10:25:32 +0200 -Subject: d-0010-cargo-remove-vendored-c-crates - -Last-Update: 2023-05-17 ---- - src/tools/cargo/Cargo.toml | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/tools/cargo/Cargo.toml b/src/tools/cargo/Cargo.toml -index 05c95c7..a7475f6 100644 ---- a/src/tools/cargo/Cargo.toml -+++ b/src/tools/cargo/Cargo.toml -@@ -206,8 +206,6 @@ test = false - doc = false - - [features] --vendored-openssl = ["openssl/vendored"] --vendored-libgit2 = ["libgit2-sys/vendored"] -+# Debian: removed vendoring flags - pretty-env-logger = ["pretty_env_logger"] - # This is primarily used by rust-lang/rust distributing cargo the executable. --all-static = ['vendored-openssl', 'curl/static-curl', 'curl/force-system-lib-on-osx'] diff --git a/debian/patches/d-armel-fix-lldb.patch b/debian/patches/d-armel-fix-lldb.patch deleted file mode 100644 index 2d542a1e9..000000000 --- a/debian/patches/d-armel-fix-lldb.patch +++ /dev/null @@ -1,19 +0,0 @@ -run panics if lldb is not installed and no output is produced.. - -Index: rust/src/bootstrap/test.rs -=================================================================== ---- rust.orig/src/bootstrap/test.rs -+++ rust/src/bootstrap/test.rs -@@ -1516,7 +1516,11 @@ note: if you're sure you want to do this - .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-check-cfg.patch b/debian/patches/d-bootstrap-cargo-check-cfg.patch deleted file mode 100644 index b7e3c457b..000000000 --- a/debian/patches/d-bootstrap-cargo-check-cfg.patch +++ /dev/null @@ -1,19 +0,0 @@ -our cargo doesn't know about the 'output' part yet, this patch can be dropped -with cargo >= 0.64 - -Index: rust/src/bootstrap/builder.rs -=================================================================== ---- rust.orig/src/bootstrap/builder.rs -+++ rust/src/bootstrap/builder.rs -@@ -1382,9 +1382,9 @@ impl<'a> Builder<'a> { - // complete list of features, so for that reason we don't enable checking of - // features for std crates. - cargo.arg(if mode != Mode::Std { -- "-Zcheck-cfg=names,values,output,features" -+ "-Zcheck-cfg=names,values,features" - } else { -- "-Zcheck-cfg=names,values,output" -+ "-Zcheck-cfg=names,values" - }); - - // Add extra cfg not defined in/by rustc diff --git a/debian/patches/d-bootstrap-custom-debuginfo-path.patch b/debian/patches/d-bootstrap-custom-debuginfo-path.patch deleted file mode 100644 index e4a833155..000000000 --- a/debian/patches/d-bootstrap-custom-debuginfo-path.patch +++ /dev/null @@ -1,40 +0,0 @@ -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 - -=================================================================== ---- - src/bootstrap/lib.rs | 5 ++--- - src/test/codegen/remap_path_prefix/issue-73167-remap-std.rs | 2 +- - 2 files changed, 3 insertions(+), 4 deletions(-) - -Index: rust/src/bootstrap/lib.rs -=================================================================== ---- rust.orig/src/bootstrap/lib.rs -+++ rust/src/bootstrap/lib.rs -@@ -1091,10 +1091,9 @@ impl Build { - - match which { - GitRepo::Rustc => { -- let sha = self.rust_sha().unwrap_or(&self.version); -- Some(format!("/rustc/{}", sha)) -+ Some(format!("/usr/src/rustc-{}", &self.version)) - } -- GitRepo::Llvm => Some(String::from("/rustc/llvm")), -+ GitRepo::Llvm => panic!("GitRepo::Llvm unsupported on Debian"), - } - } - -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 -@@ -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 - --// CHECK: !DIFile(filename: "{{/rustc/.*/library/std/src/panic.rs}}" -+// CHECK: !DIFile(filename: "{{/usr/src/rustc-.*/library/std/src/panic.rs}}" - fn main() { - std::thread::spawn(|| { - println!("hello"); diff --git a/debian/patches/d-bootstrap-disable-git.patch b/debian/patches/d-bootstrap-disable-git.patch deleted file mode 100644 index 4cd8bc1cd..000000000 --- a/debian/patches/d-bootstrap-disable-git.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Matthijs van Otterdijk <matthijs@wirevirt.net> -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(-) - -Index: rust/src/bootstrap/channel.rs -=================================================================== ---- rust.orig/src/bootstrap/channel.rs -+++ rust/src/bootstrap/channel.rs -@@ -36,6 +36,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/dist.rs -=================================================================== ---- rust.orig/src/bootstrap/dist.rs -+++ rust/src/bootstrap/dist.rs -@@ -997,7 +997,10 @@ impl Step for PlainSourceTarball { - } - - // If we're building from git sources, we need to vendor a complete distribution. -- if builder.rust_info().is_managed_git_subrepository() { -+ // -+ // Debian: short-circuited because the Debian package is also in a git -+ // repository, but cargo-vendor should not be installed or run. -+ if false && builder.rust_info().is_managed_git_subrepository() { - // Ensure we have the submodules checked out. - builder.update_submodule(Path::new("src/tools/cargo")); - builder.update_submodule(Path::new("src/tools/rust-analyzer")); diff --git a/debian/patches/d-bootstrap-install-symlinks.patch b/debian/patches/d-bootstrap-install-symlinks.patch deleted file mode 100644 index 00f84e0c7..000000000 --- a/debian/patches/d-bootstrap-install-symlinks.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> -Date: Thu, 14 Jul 2022 13:17:38 +0200 -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. ---- - 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 -@@ -616,7 +616,10 @@ install_components() { - - maybe_backup_path "$_file_install_path" - -- if echo "$_file" | grep "^bin/" > /dev/null || test -x "$_src_dir/$_component/$_file" -+ if [ -h "$_src_dir/$_component/$_file" ] -+ then -+ run cp -d "$_src_dir/$_component/$_file" "$_file_install_path" -+ elif echo "$_file" | grep "^bin/" > /dev/null || test -x "$_src_dir/$_component/$_file" - then - run cp "$_src_dir/$_component/$_file" "$_file_install_path" - run chmod 755 "$_file_install_path" -@@ -638,7 +641,7 @@ install_components() { - - maybe_backup_path "$_file_install_path" - -- run cp -R "$_src_dir/$_component/$_file" "$_file_install_path" -+ run cp -dR "$_src_dir/$_component/$_file" "$_file_install_path" - critical_need_ok "failed to copy directory" - - # Set permissions. 0755 for dirs, 644 for files diff --git a/debian/patches/d-bootstrap-old-cargo-compat.patch b/debian/patches/d-bootstrap-old-cargo-compat.patch deleted file mode 100644 index 0dacb4521..000000000 --- a/debian/patches/d-bootstrap-old-cargo-compat.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> -Date: Thu, 14 Jul 2022 13:17:39 +0200 -Subject: Backwards-compat for cargo 0.47 - - The flag being removed here was added in - https://github.com/rust-lang/cargo/pull/9404 released in cargo 0.54 - - This works around a feature introduced in this PR - https://github.com/rust-lang/cargo/pull/8640 released in cargo 0.53 - - Therefore it is not needed for Debian's current cargo 0.47. - - We can drop this patch when updating to cargo 0.54 and later. ---- - src/bootstrap/doc.rs | 3 --- - 1 file changed, 3 deletions(-) - -Index: rust/src/bootstrap/doc.rs -=================================================================== ---- rust.orig/src/bootstrap/doc.rs -+++ rust/src/bootstrap/doc.rs -@@ -613,7 +613,6 @@ fn doc_std( - .arg(&*target_dir.to_string_lossy()) - .arg("-p") - .arg(package) -- .arg("-Zskip-rustdoc-fingerprint") - .arg("--") - .arg("-Z") - .arg("unstable-options") -@@ -713,7 +712,6 @@ impl Step for Rustc { - cargo.rustdocflag("--generate-link-to-definition"); - compile::rustc_cargo(builder, &mut cargo, target, compiler.stage); - cargo.arg("-Zunstable-options"); -- cargo.arg("-Zskip-rustdoc-fingerprint"); - - // Only include compiler crates, no dependencies of those, such as `libc`. - // Do link to dependencies on `docs.rs` however using `rustdoc-map`. -@@ -846,7 +844,6 @@ macro_rules! tool_doc { - &[], - ); - -- cargo.arg("-Zskip-rustdoc-fingerprint"); - // Only include compiler crates, no dependencies of those, such as `libc`. - cargo.arg("--no-deps"); - $( diff --git a/debian/patches/d-bootstrap-permit-symlink-in-docs.patch b/debian/patches/d-bootstrap-permit-symlink-in-docs.patch deleted file mode 100644 index 9f088a228..000000000 --- a/debian/patches/d-bootstrap-permit-symlink-in-docs.patch +++ /dev/null @@ -1,14 +0,0 @@ -partial revert of b9eedea4b0368fd1f00f204db75109ff444fab5b upstream - -Index: rust/src/bootstrap/dist.rs -=================================================================== ---- rust.orig/src/bootstrap/dist.rs -+++ rust/src/bootstrap/dist.rs -@@ -81,6 +81,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-use-system-compiler-rt.patch b/debian/patches/d-bootstrap-use-system-compiler-rt.patch deleted file mode 100644 index 22843aeb1..000000000 --- a/debian/patches/d-bootstrap-use-system-compiler-rt.patch +++ /dev/null @@ -1,40 +0,0 @@ -Description: Use system compiler-rt from clang -Forwarded: not-needed ---- a/src/bootstrap/compile.rs -+++ b/src/bootstrap/compile.rs -@@ -200,6 +200,12 @@ - let mut features = builder.std_features(); - features.push_str(&compiler_builtins_c_feature); - -+ // In Debian this is always available -+ let llvm_config = builder.ensure(native::Llvm { -+ target: builder.config.build, -+ emscripten: false, -+ }); -+ cargo.env("LLVM_CONFIG", llvm_config); - if compiler.stage != 0 && builder.config.sanitizers { - // This variable is used by the sanitizer runtime crates, e.g. - // rustc_lsan, to build the sanitizer runtime from C code -@@ -208,11 +214,6 @@ - // missing - // We also only build the runtimes when --enable-sanitizers (or its - // config.toml equivalent) is used -- let llvm_config = builder.ensure(native::Llvm { -- target: builder.config.build, -- emscripten: false, -- }); -- cargo.env("LLVM_CONFIG", llvm_config); - cargo.env("RUSTC_BUILD_SANITIZERS", "1"); - } - ---- a/vendor/compiler_builtins/Cargo.toml -+++ b/vendor/compiler_builtins/Cargo.toml -@@ -49,7 +49,7 @@ - # LLVM_CONFIG or CLANG (more reliable) must be set. - c-system = [] - --c = ["c-vendor"] -+c = ["c-system"] - compiler-builtins = [] - default = ["compiler-builtins"] - mangled-names = [] diff --git a/debian/patches/d-disable-download-tests.patch b/debian/patches/d-disable-download-tests.patch deleted file mode 100644 index 3f4b1dbe6..000000000 --- a/debian/patches/d-disable-download-tests.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: rust/src/bootstrap/config/tests.rs -=================================================================== ---- rust.orig/src/bootstrap/config/tests.rs -+++ rust/src/bootstrap/config/tests.rs -@@ -10,6 +10,9 @@ fn parse(config: &str) -> Config { - - #[test] - fn download_ci_llvm() { -+ // Debian: this will attempt to download LLVM -+ return; -+ - if crate::llvm::is_ci_llvm_modified(&parse("")) { - eprintln!("Detected LLVM as non-available: running in CI and modified LLVM in this change"); - return; -@@ -38,7 +41,11 @@ fn download_ci_llvm() { - // - https://github.com/rust-lang/rust/pull/109162#issuecomment-1496782487 - #[test] - fn detect_src_and_out() { -+ // Debian: this will attempt to download a toolchain -+ return; -+ - fn test(cfg: Config, build_dir: Option<&str>) { -+ - // This will bring absolute form of `src/bootstrap` path - let current_dir = std::env::current_dir().unwrap(); - diff --git a/debian/patches/d-fix-rustix-outline.patch b/debian/patches/d-fix-rustix-outline.patch deleted file mode 100644 index 99fd7e958..000000000 --- a/debian/patches/d-fix-rustix-outline.patch +++ /dev/null @@ -1,46 +0,0 @@ -Always enable cc even if the feature is not enabled. - -Some Debian architectures need outline asm, and Debian does not ship pre-built -outline asm. - -Index: rust/vendor/rustix/build.rs -=================================================================== ---- rust.orig/vendor/rustix/build.rs -+++ rust/vendor/rustix/build.rs -@@ -1,4 +1,3 @@ --#[cfg(feature = "cc")] - use cc::Build; - use std::env::var; - use std::io::Write; -@@ -162,16 +161,16 @@ fn link_in_librustix_outline(arch: &str, - println!("cargo:rerun-if-changed={}", to); - - // If "cc" is not enabled, use a pre-built library. -- #[cfg(not(feature = "cc"))] -+ /*#[cfg(not(feature = "cc"))] - { - let _ = asm_name; - println!("cargo:rustc-link-search={}/{}", OUTLINE_PATH, profile); - println!("cargo:rustc-link-lib=static={}", name); -- } -+ }*/ - - // If "cc" is enabled, build the library from source, update the pre-built - // version, and assert that the pre-built version is checked in. -- #[cfg(feature = "cc")] -+ //#[cfg(feature = "cc")] - { - let out_dir = var("OUT_DIR").unwrap(); - // Add `-gdwarf-3` so that we always get the same output, regardless of -Index: rust/vendor/rustix/Cargo.toml -=================================================================== ---- rust.orig/vendor/rustix/Cargo.toml -+++ rust/vendor/rustix/Cargo.toml -@@ -127,7 +127,6 @@ version = "3.4.0" - - [build-dependencies.cc] - version = "1.0.68" --optional = true - - [features] - all-apis = [ diff --git a/debian/patches/d-remove-arm-privacy-breaches.patch b/debian/patches/d-remove-arm-privacy-breaches.patch deleted file mode 100644 index 7bd488a0e..000000000 --- a/debian/patches/d-remove-arm-privacy-breaches.patch +++ /dev/null @@ -1,195 +0,0 @@ -From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> -Date: Thu, 14 Jul 2022 13:17:38 +0200 -Subject: d-remove-arm-privacy-breaches - -=================================================================== ---- - .../crates/stdarch-verify/arm-intrinsics.html | 134 --------------------- - 1 file changed, 134 deletions(-) - -Index: rust/library/stdarch/crates/stdarch-verify/arm-intrinsics.html -=================================================================== ---- rust.orig/library/stdarch/crates/stdarch-verify/arm-intrinsics.html -+++ rust/library/stdarch/crates/stdarch-verify/arm-intrinsics.html -@@ -20,17 +20,12 @@ - <meta name="keywords" content="">
- <meta content="Copyright © 1995-2018 Arm Limited (or its affiliates). All rights reserved." name="copyright">
- <meta name="apple-mobile-web-app-capable" content="yes">
--<meta name="msapplication-config" content="https://developer.arm.com:443/shared/common/img/favicon/browserconfig.xml">
--<meta name="msapplication-TileColor" content="#2b5797">
--<meta name="msapplication-TileImage" content="https://developer.arm.com:443/shared/common/img/favicon/mstile-144x144.png">
- <meta name="theme-color" content="#ffffff">
- <meta name="server" content="ARMGPCD2" />
-
- <meta property="og:title" content="Technologies | NEON Intrinsics Reference – Arm Developer">
- <meta property="og:description" content="All the NEON intrinsics reference in an interactive page.">
--<meta property="og:image" content="https://developer.arm.com:443">
- <meta property="og:site_name" content="ARM Developer">
--<meta property="og:url" content="https://developer.arm.com/technologies/neon/intrinsics">
- <meta property="og:type" content="website">
- <meta property="og:locale" content="en">
-
-@@ -41,64 +36,14 @@ - <meta name="twitter:site" content="ARM Developer">
- <meta name="twitter:title" content="Technologies | NEON Intrinsics Reference – Arm Developer">
- <meta name="twitter:description" content="All the NEON intrinsics reference in an interactive page.">
--<meta name="twitter:image" content="https://developer.arm.com:443">
--<meta name="twitter:url" content="https://developer.arm.com/technologies/neon/intrinsics">
-
- <meta itemprop="name" content="Technologies | NEON Intrinsics Reference – Arm Developer">
- <meta itemprop="description" content="All the NEON intrinsics reference in an interactive page.">
--<meta itemprop="image" content="https://developer.arm.com:443">
--
--
--
--
-- <link rel="stylesheet" type="text/css" href="/shared/developer.arm.com/css/app.css?v=D41D8CD98F00B204E9800998ECF8427E" />
--
--
--
--<link rel="apple-touch-icon" sizes="57x57" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
--<link rel="apple-touch-icon" sizes="60x60" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
--<link rel="apple-touch-icon" sizes="72x72" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
--<link rel="apple-touch-icon" sizes="76x76" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
--<link rel="apple-touch-icon" sizes="114x114" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
--<link rel="apple-touch-icon" sizes="120x120" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
--<link rel="apple-touch-icon" sizes="144x144" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
--<link rel="apple-touch-icon" sizes="152x152" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
--<link rel="apple-touch-icon" sizes="180x180" href="https://developer.arm.com/shared/common/img/favicon/apple-touch-icon.png?v=2.29.0.0" />
--<link rel="icon" type="image/png" href="https://developer.arm.com/shared/common/img/favicon/favicon-32x32.png?v=2.29.0.0" sizes="32x32" />
--<link rel="icon" type="image/png" href="https://developer.arm.com/shared/common/img/favicon/favicon-48x48.png?v=2.29.0.0" sizes="48x48" />
--<link rel="icon" type="image/png" href="https://developer.arm.com/shared/common/img/favicon/android-chrome-192x192.png?v=2.29.0.0" sizes="192x192" />
--<link rel="icon" type="image/png" href="https://developer.arm.com/shared/common/img/favicon/android-chrome-256x256.png?v=2.29.0.0" sizes="256x256" />
--<link rel="icon" type="image/png" href="https://developer.arm.com/shared/common/img/favicon/favicon-16x16.png?v=2.29.0.0" sizes="16x16" />
--<link rel="shortcut icon" type="image/ico" href="https://developer.arm.com/shared/common/img/favicon/favicon.ico?v=2.29.0.0" />
--<link rel="manifest" href="https://developer.arm.com/shared/common/img/favicon/manifest.json?v=2.29.0.0" />
--
-- <link rel="search" type="application/opensearchdescription+xml" title="ARM Developer" href="/opensearch.xml"/>
--
--
--
--
--
--<!-- Google Tag Manager -->
--<script>
--(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
--new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
--j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
--'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
-- })(window, document, 'script', 'dataLayer', 'GTM-K25LQR');
--</script>
--<!-- End Google Tag Manager -->
--
--
- </head>
- <body id="">
-
-
-
--<noscript>
-- <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K25LQR" height="0" width="0" style="display:none;visibility:hidden"></iframe>
--</noscript>
--
--
-
- <div class="c-feedback-message-container u-no-print"><style> - /* Docs top margin fix */ -@@ -245,7 +190,6 @@ j=d.createElement(s),dl=l!='dataLayer'?' - <span class="navigation-dropdown-label">
- <a href="/">
- <span>
-- <img src="/shared/developer.arm.com/img/arm-developer.svg" alt="ARM Developer" />
- </span>
- <i class="fa fa-caret-down"></i>
- </a>
-@@ -437,7 +381,6 @@ j=d.createElement(s),dl=l!='dataLayer'?' -
- </div>
-
--<link rel="stylesheet" href="https://developer.arm.com/shared/arm-account/css/modules/user-menu.css?v=2.29.0.0" />
-
- </li>
- </ul>
-@@ -93318,82 +93261,5 @@ names are the property of their respecti -
- </div>
-
--<script type="text/javascript" src="https://nebula-cdn.kampyle.com/we/8144/onsite/embed.js"></script>
--
--
--
--
--<script src="/bundles/modernizr?v=inCVuEFe6J4Q07A0AcRsbJic_UE5MwpRMNGcOtk94TE1"></script>
--
--
--
--<script type="text/javascript">
-- if (Modernizr && !Modernizr.svg) {
-- var imgs = document.getElementsByTagName('img');
-- var svgExtension = /.*\.svg$/;
-- var l = imgs.length;
-- for (var i = 0; i < l; i++) {
-- if (imgs[i].src.match(svgExtension)) {
-- imgs[i].src = imgs[i].src.slice(0, -3) + 'png';
-- }
-- }
-- }
--</script>
--
--
--<script src="/shared/vendor/jquery-1.12.4.min.js"></script>
--<script src="/shared/vendor/foundation.min.js"></script>
--<script src="/shared/vendor/moment.min.js"></script>
--<script src="/shared/vendor/js/jquery-rss/src/jquery.rss.js"></script>
--
--<script src="/bundles/clipboard?v=IPc2U7tMxf_2TKh6_qbfzIsYI3pmBbWZxHb5M8V-fhg1"></script>
--
--<script src="/bundles/placeholder?v=Aw-bm4sJPSuBeTzPpRw_GfXYXI4wKmH607vgMic22c01"></script>
--
--<script src="/bundles/waypoints?v=E5Sm2NPVxzLqGyd5lIz-NjBvArn4w7w7IvCs35wz6dA1"></script>
--
--
--
--<script src="/shared/developer.arm.com/js/common.js?v=09142182FF441DC932039AB1D8CD216F"></script>
--<script src="/shared/developer.arm.com/js/app.bundle.js?v=09142182FF441DC932039AB1D8CD216F"></script>
--
--
--<script src="/shared/arm.com-new/js/app.constants.js?v=09142182FF441DC932039AB1D8CD216F"></script>
--<script src="/shared/arm.com-new/js/app.navigation.js?v=09142182FF441DC932039AB1D8CD216F"></script>
--<script type="text/javascript">
-- (function() {
-- var $userMenu = $('.c-user-menu__root');
-- if ($userMenu) {
-- $userMenu.navigation();
-- }
-- })();
--</script>
--
--
--
--<script src="/bundles/jquery-ui?v=atr-jO-t-9RdxuVusckf7yNy0MEEBlVW5TaJCAetR6A1"></script>
--
--<script src="/bundles/jqueryval?v=shBfM8gvrYJt6eNs9xKMaOYfzyGdVGLhvPUMJ92MwmM1"></script>
--
--<script src="/sitecore%20modules/Web/Web%20Forms%20for%20Marketers/mvc/wffm.min.js"></script>
--<script>
-- $(document).ready(function() {
-- $("form[data-wffm]").each(function() { $(this).wffmForm(); });
-- });
--</script>
--
--<link rel="stylesheet" type="text/css" href="//fast.fonts.net/t/1.css?apiType=css&projectid=5616bfa5-8ba9-4061-8e15-3a2d29551ced" />
--
--
--<script src="//munchkin.marketo.net/munchkin.js" type="text/javascript"></script>
--<script type="text/javascript">
-- Munchkin.init('312-SAX-488', {'asyncOnly': true});
--</script>
--
--
--
--
--
--
- </body>
- </html>
diff --git a/debian/patches/d-rustc-fix-mips64el-bootstrap.patch b/debian/patches/d-rustc-fix-mips64el-bootstrap.patch deleted file mode 100644 index faee1685e..000000000 --- a/debian/patches/d-rustc-fix-mips64el-bootstrap.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> -Date: Thu, 14 Jul 2022 13:17:39 +0200 -Subject: d-rustc-fix-mips64el-bootstrap - -Bug: https://github.com/rust-lang/rust/issues/52108 - -=================================================================== ---- - compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs | 2 +- - compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs | 2 +- - src/bootstrap/bootstrap.py | 2 ++ - src/test/assembly/asm/mips-types.rs | 1 + - 4 files changed, 5 insertions(+), 2 deletions(-) - -Index: rust/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs -=================================================================== ---- rust.orig/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs -+++ rust/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs -@@ -12,7 +12,7 @@ pub fn target() -> Target { - endian: Endian::Big, - // NOTE(mips64r2) matches C toolchain - cpu: "mips64r2".into(), -- features: "+mips64r2".into(), -+ features: "+mips64r2,+xgot".into(), - max_atomic_width: Some(64), - mcount: "_mcount".into(), - -Index: rust/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs -=================================================================== ---- rust.orig/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs -+++ rust/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs -@@ -10,7 +10,7 @@ pub fn target() -> Target { - abi: "abi64".into(), - // NOTE(mips64r2) matches C toolchain - cpu: "mips64r2".into(), -- features: "+mips64r2".into(), -+ features: "+mips64r2,+xgot".into(), - max_atomic_width: Some(64), - mcount: "_mcount".into(), - -Index: rust/src/bootstrap/bootstrap.py -=================================================================== ---- rust.orig/src/bootstrap/bootstrap.py -+++ rust/src/bootstrap/bootstrap.py -@@ -877,6 +877,8 @@ class RustBuild(object): - - # preserve existing RUSTFLAGS - env.setdefault("RUSTFLAGS", "") -+ if self.build_triple().startswith('mips'): -+ env["RUSTFLAGS"] += " -Ctarget-feature=+xgot" - target_features = [] - if self.get_toml("crt-static", build_section) == "true": - target_features += ["+crt-static"] -Index: rust/tests/assembly/asm/mips-types.rs -=================================================================== ---- rust.orig/tests/assembly/asm/mips-types.rs -+++ rust/tests/assembly/asm/mips-types.rs -@@ -1,3 +1,4 @@ -+// ignore-test - // revisions: mips32 mips64 - // assembly-output: emit-asm - //[mips32] compile-flags: --target mips-unknown-linux-gnu diff --git a/debian/patches/d-rustc-i686-baseline.patch b/debian/patches/d-rustc-i686-baseline.patch deleted file mode 100644 index bc1e55d91..000000000 --- a/debian/patches/d-rustc-i686-baseline.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> -Date: Thu, 14 Jul 2022 13:17:39 +0200 -Subject: d-rustc-i686-baseline - -=================================================================== ---- - compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: rust/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs -=================================================================== ---- rust.orig/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs -+++ rust/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs -@@ -2,7 +2,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, - - pub fn target() -> Target { - let mut base = super::linux_gnu_base::opts(); -- base.cpu = "pentium4".into(); -+ base.cpu = "pentiumpro".into(); - base.max_atomic_width = Some(64); - base.supported_sanitizers = SanitizerSet::ADDRESS; - base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); -Index: rust/tests/ui/sse2.rs -=================================================================== ---- rust.orig/tests/ui/sse2.rs -+++ rust/tests/ui/sse2.rs -@@ -15,7 +15,7 @@ fn main() { - } - Err(_) => return, - } -- if cfg!(any(target_arch = "x86", target_arch = "x86_64")) { -+ if cfg!(any(target_arch = "x86_64")) { - assert!(cfg!(target_feature = "sse2"), - "SSE2 was not detected as available on an x86 platform"); - } -Index: rust/tests/ui/abi/homogenous-floats-target-feature-mixup.rs -=================================================================== ---- rust.orig/tests/ui/abi/homogenous-floats-target-feature-mixup.rs -+++ rust/tests/ui/abi/homogenous-floats-target-feature-mixup.rs -@@ -24,7 +24,8 @@ fn main() { - match std::env::var("TARGET") { - Ok(s) => { - // Skip this tests on i586-unknown-linux-gnu where sse2 is disabled -- if s.contains("i586") { -+ // Debian: our i686 doesn't have SSE 2.. -+ if s.contains("i586") || s.contains("i686") { - return - } - } diff --git a/debian/patches/d-rustc-prefer-dynamic.patch b/debian/patches/d-rustc-prefer-dynamic.patch deleted file mode 100644 index 13bb42922..000000000 --- a/debian/patches/d-rustc-prefer-dynamic.patch +++ /dev/null @@ -1,18 +0,0 @@ -Description: Prefer dynamic linking (currently disabled, not applied) - As per Debian policy, we basically revert - https://github.com/rust-lang/rfcs/blob/master/text/0404-change-prefer-dynamic.md - TODO: this does not yet work: https://github.com/rust-lang/rust/issues/43289 - Perhaps a better method would be to modify dh-cargo instead of rustc -Author: Ximin Luo <infinity0@debian.org> -Forwarded: not-needed ---- a/src/librustc/session/config.rs -+++ b/src/librustc/session/config.rs -@@ -846,7 +846,7 @@ - "don't run LLVM's SLP vectorization pass"), - soft_float: bool = (false, parse_bool, [TRACKED], - "use soft float ABI (*eabihf targets only)"), -- prefer_dynamic: bool = (false, parse_bool, [TRACKED], -+ prefer_dynamic: bool = (true, parse_bool, [TRACKED], - "prefer dynamic linking to static linking"), - no_integrated_as: bool = (false, parse_bool, [TRACKED], - "use an external assembler rather than LLVM's integrated one"), diff --git a/debian/patches/d-test-host-duplicates.patch b/debian/patches/d-test-host-duplicates.patch deleted file mode 100644 index 50c39adf9..000000000 --- a/debian/patches/d-test-host-duplicates.patch +++ /dev/null @@ -1,20 +0,0 @@ -Description: Work around #842634 on some machines, e.g. Debian porterboxes - This should remain commented-out in debian/patches/series, it's not needed everywhere -Author: Ximin Luo <infinity0@debian.org> -Forwarded: not-needed ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/library/std/src/sys_common/net/tests.rs -+++ b/library/std/src/sys_common/net/tests.rs -@@ -11,8 +11,10 @@ - for sa in lh { - *addrs.entry(sa).or_insert(0) += 1; - } -+ let mut v = addrs.iter().filter(|&(_, &v)| v > 1).collect::<Vec<_>>(); -+ v.clear(); - assert_eq!( -- addrs.iter().filter(|&(_, &v)| v > 1).collect::<Vec<_>>(), -+ v, - vec![], - "There should be no duplicate localhost entries" - ); diff --git a/debian/patches/d-0000-ignore-removed-submodules.patch b/debian/patches/prune/d-0000-ignore-removed-submodules.patch index e90237fa8..f3a7b7030 100644 --- a/debian/patches/d-0000-ignore-removed-submodules.patch +++ b/debian/patches/prune/d-0000-ignore-removed-submodules.patch @@ -2,19 +2,23 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> Date: Sat, 2 Oct 2021 01:07:59 +0100 Subject: d-0000-ignore-removed-submodules +Description: remove upstream parts that are not needed for the Debian build, in +order to both reduce the orig tarball and the vendored crates within. + +Forwarded: not-needed --- - Cargo.toml | 11 +++----- - src/bootstrap/bootstrap.py | 4 --- - src/bootstrap/builder.rs | 54 +++++++++----------------------------- - src/bootstrap/test.rs | 12 +-------- - src/tools/rust-analyzer/Cargo.toml | 11 +++++++- - 5 files changed, 28 insertions(+), 64 deletions(-) + Cargo.toml | 7 ---- + src/bootstrap/bootstrap.py | 4 --- + src/bootstrap/src/core/build_steps/test.rs | 12 +------ + src/bootstrap/src/core/builder.rs | 54 +++++++----------------------- + src/tools/rust-analyzer/Cargo.toml | 11 +++++- + 5 files changed, 24 insertions(+), 64 deletions(-) diff --git a/Cargo.toml b/Cargo.toml -index 8eb378a..70487ec 100644 +index 9b11ae8..19a98f9 100644 --- a/Cargo.toml +++ b/Cargo.toml -@@ -18,22 +18,15 @@ members = [ +@@ -19,22 +19,15 @@ members = [ "src/tools/tidy", "src/tools/tier-check", "src/tools/build-manifest", @@ -38,13 +42,13 @@ index 8eb378a..70487ec 100644 "src/tools/lld-wrapper", "src/tools/collect-license-metadata", diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py -index 58d1926..527282d 100644 +index fea194a..ed99a47 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py -@@ -899,10 +899,6 @@ class RustBuild(object): +@@ -955,10 +955,6 @@ class RustBuild(object): args = [self.cargo(), "build", "--manifest-path", os.path.join(self.rust_root, "src/bootstrap/Cargo.toml")] - args.extend("--verbose" for _ in range(verbose_count)) + args.extend("--verbose" for _ in range(self.verbose)) - if self.use_locked_deps: - args.append("--locked") - if self.use_vendored_sources: @@ -52,12 +56,35 @@ index 58d1926..527282d 100644 if self.get_toml("metrics", "build"): args.append("--features") args.append("build-metrics") -diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs -index 2fa4455..3f3e5ec 100644 ---- a/src/bootstrap/builder.rs -+++ b/src/bootstrap/builder.rs -@@ -492,20 +492,20 @@ impl<'a> ShouldRun<'a> { - static SUBMODULES_PATHS: OnceCell<Vec<String>> = OnceCell::new(); +diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs +index 4eb7766..5c115cf 100644 +--- a/src/bootstrap/src/core/build_steps/test.rs ++++ b/src/bootstrap/src/core/build_steps/test.rs +@@ -2295,17 +2295,7 @@ impl Step for RustcGuide { + } + + fn run(self, builder: &Builder<'_>) { +- let relative_path = Path::new("src").join("doc").join("rustc-dev-guide"); +- builder.update_submodule(&relative_path); +- +- let src = builder.src.join(relative_path); +- let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook); +- let toolstate = if builder.run_delaying_failure(rustbook_cmd.arg("linkcheck").arg(&src)) { +- ToolState::TestPass +- } else { +- ToolState::TestFail +- }; +- builder.save_toolstate("rustc-dev-guide", toolstate); ++ builder.save_toolstate("rustc-dev-guide", ToolState::TestPass); + } + } + +diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs +index e180964..7245d11 100644 +--- a/src/bootstrap/src/core/builder.rs ++++ b/src/bootstrap/src/core/builder.rs +@@ -498,20 +498,20 @@ impl<'a> ShouldRun<'a> { + static SUBMODULES_PATHS: OnceLock<Vec<String>> = OnceLock::new(); let init_submodules_paths = |src: &PathBuf| { - let file = File::open(src.join(".gitmodules")).unwrap(); @@ -89,7 +116,7 @@ index 2fa4455..3f3e5ec 100644 submodules_paths }; -@@ -672,25 +672,14 @@ impl<'a> Builder<'a> { +@@ -685,25 +685,14 @@ impl<'a> Builder<'a> { tool::Linkchecker, tool::CargoTest, tool::Compiletest, @@ -112,10 +139,10 @@ index 2fa4455..3f3e5ec 100644 - llvm::Lld, - llvm::CrtBeginEnd, - tool::RustdocGUITest, + tool::OptimizedDist, + tool::CoverageDump, ), - Kind::Check | Kind::Clippy | Kind::Fix => describe!( - check::Std, -@@ -698,11 +687,6 @@ impl<'a> Builder<'a> { +@@ -713,12 +702,7 @@ impl<'a> Builder<'a> { check::Rustdoc, check::CodegenBackend, check::Clippy, @@ -123,11 +150,12 @@ index 2fa4455..3f3e5ec 100644 - check::CargoMiri, - check::MiroptTestTools, - check::Rls, -- check::RustAnalyzer, check::Rustfmt, +- check::RustAnalyzer, check::Bootstrap ), -@@ -730,7 +714,6 @@ impl<'a> Builder<'a> { + Kind::Test => describe!( +@@ -751,7 +735,6 @@ impl<'a> Builder<'a> { test::TierCheck, test::Cargotest, test::Cargo, @@ -135,7 +163,7 @@ index 2fa4455..3f3e5ec 100644 test::ErrorIndex, test::Distcheck, test::RunMakeFullDeps, -@@ -746,7 +729,6 @@ impl<'a> Builder<'a> { +@@ -767,7 +750,6 @@ impl<'a> Builder<'a> { test::EmbeddedBook, test::EditionGuide, test::Rustfmt, @@ -143,7 +171,7 @@ index 2fa4455..3f3e5ec 100644 test::Clippy, test::RustDemangler, test::CompiletestTest, -@@ -783,7 +765,6 @@ impl<'a> Builder<'a> { +@@ -804,7 +786,6 @@ impl<'a> Builder<'a> { doc::CargoBook, doc::Clippy, doc::ClippyBook, @@ -151,7 +179,7 @@ index 2fa4455..3f3e5ec 100644 doc::EmbeddedBook, doc::EditionGuide, doc::StyleGuide, -@@ -801,12 +782,9 @@ impl<'a> Builder<'a> { +@@ -824,12 +805,9 @@ impl<'a> Builder<'a> { dist::Analysis, dist::Src, dist::Cargo, @@ -164,7 +192,7 @@ index 2fa4455..3f3e5ec 100644 dist::LlvmTools, dist::RustDev, dist::Bootstrap, -@@ -823,11 +801,9 @@ impl<'a> Builder<'a> { +@@ -846,11 +824,9 @@ impl<'a> Builder<'a> { install::Docs, install::Std, install::Cargo, @@ -176,7 +204,7 @@ index 2fa4455..3f3e5ec 100644 install::LlvmTools, install::Src, install::Rustc -@@ -837,7 +813,6 @@ impl<'a> Builder<'a> { +@@ -860,7 +836,6 @@ impl<'a> Builder<'a> { run::BuildManifest, run::BumpStage0, run::ReplaceVersionPlaceholder, @@ -184,7 +212,7 @@ index 2fa4455..3f3e5ec 100644 run::CollectLicenseMetadata, run::GenerateCopyright, run::GenerateWindowsSys, -@@ -1979,10 +1954,7 @@ impl<'a> Builder<'a> { +@@ -2080,10 +2055,7 @@ impl<'a> Builder<'a> { } } @@ -196,31 +224,8 @@ index 2fa4455..3f3e5ec 100644 cargo.arg("--frozen"); } -diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs -index 44cd84b..9b37d5d 100644 ---- a/src/bootstrap/test.rs -+++ b/src/bootstrap/test.rs -@@ -2004,17 +2004,7 @@ impl Step for RustcGuide { - } - - fn run(self, builder: &Builder<'_>) { -- let relative_path = Path::new("src").join("doc").join("rustc-dev-guide"); -- builder.update_submodule(&relative_path); -- -- let src = builder.src.join(relative_path); -- let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook); -- let toolstate = if try_run(builder, rustbook_cmd.arg("linkcheck").arg(&src)) { -- ToolState::TestPass -- } else { -- ToolState::TestFail -- }; -- builder.save_toolstate("rustc-dev-guide", toolstate); -+ builder.save_toolstate("rustc-dev-guide", ToolState::TestPass); - } - } - diff --git a/src/tools/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/Cargo.toml -index 333f03c..2a0faa2 100644 +index 1213979..71f9aa7 100644 --- a/src/tools/rust-analyzer/Cargo.toml +++ b/src/tools/rust-analyzer/Cargo.toml @@ -1,5 +1,14 @@ @@ -237,5 +242,5 @@ index 333f03c..2a0faa2 100644 + "crates/proc-macro-api", +] exclude = ["crates/proc-macro-test/imp"] + resolver = "2" - [workspace.package] diff --git a/debian/patches/d-0001-pkg-config-no-special-snowflake.patch b/debian/patches/prune/d-0001-pkg-config-no-special-snowflake.patch index 9e49580b1..13e1cceda 100644 --- a/debian/patches/d-0001-pkg-config-no-special-snowflake.patch +++ b/debian/patches/prune/d-0001-pkg-config-no-special-snowflake.patch @@ -2,13 +2,16 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> Date: Sat, 2 Oct 2021 01:08:00 +0100 Subject: d-0001-pkg-config-no-special-snowflake +Description: always enable cross compilation via pkgconf, and set the right binary name. + +Forwarded: not-needed --- vendor/pkg-config/src/lib.rs | 25 ++++++++++--------------- vendor/pkg-config/tests/test.rs | 2 -- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/vendor/pkg-config/src/lib.rs b/vendor/pkg-config/src/lib.rs -index e9395be..2f6819c 100644 +index 3653032..553ac75 100644 --- a/vendor/pkg-config/src/lib.rs +++ b/vendor/pkg-config/src/lib.rs @@ -117,11 +117,8 @@ pub enum Error { @@ -49,7 +52,7 @@ index e9395be..2f6819c 100644 } } } -@@ -418,6 +407,8 @@ impl Config { +@@ -420,6 +409,8 @@ impl Config { if host == target { return true; } @@ -59,23 +62,23 @@ index e9395be..2f6819c 100644 // pkg-config may not be aware of cross-compilation, and require // a wrapper script that sets up platform-specific prefixes. @@ -477,7 +468,11 @@ impl Config { - fn command(&self, name: &str, args: &[&str]) -> Command { - let exe = self - .targetted_env_var("PKG_CONFIG") -- .unwrap_or_else(|| OsString::from("pkg-config")); -+ .unwrap_or_else(|| { + } + + fn run(&self, name: &str, args: &[&str]) -> Result<Vec<u8>, Error> { +- let pkg_config_exe = self.targetted_env_var("PKG_CONFIG"); ++ let pkg_config_exe = self.targetted_env_var("PKG_CONFIG") ++ .or_else(|| { + self.env_var_os("DEB_HOST_GNU_TYPE") -+ .map(|mut t| { t.push(OsString::from("-pkg-config")); t }) -+ .unwrap_or_else(|| OsString::from("pkg-config")) ++ .map(|mut t| { t.push(OsString::from("-pkgconf")); t }) + }); - let mut cmd = Command::new(exe); - if self.is_static(name) { - cmd.arg("--static"); + let fallback_exe = if pkg_config_exe.is_none() { + Some(OsString::from("pkgconf")) + } else { diff --git a/vendor/pkg-config/tests/test.rs b/vendor/pkg-config/tests/test.rs -index 4e04ac0..f884e46 100644 +index 0f37c72..f70e8b7 100644 --- a/vendor/pkg-config/tests/test.rs +++ b/vendor/pkg-config/tests/test.rs -@@ -34,7 +34,6 @@ fn find(name: &str) -> Result<pkg_config::Library, Error> { +@@ -31,7 +31,6 @@ fn find(name: &str) -> Result<pkg_config::Library, Error> { pkg_config::probe_library(name) } @@ -83,7 +86,7 @@ index 4e04ac0..f884e46 100644 fn cross_disabled() { let _g = LOCK.lock(); reset(); -@@ -46,7 +45,6 @@ fn cross_disabled() { +@@ -43,7 +42,6 @@ fn cross_disabled() { } } diff --git a/debian/patches/d-0002-mdbook-strip-embedded-libs.patch b/debian/patches/prune/d-0002-mdbook-strip-embedded-libs.patch index 568bf230f..62d97a13f 100644 --- a/debian/patches/d-0002-mdbook-strip-embedded-libs.patch +++ b/debian/patches/prune/d-0002-mdbook-strip-embedded-libs.patch @@ -2,19 +2,142 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> Date: Sat, 2 Oct 2021 01:08:00 +0100 Subject: d-0002-mdbook-strip-embedded-libs -Comment: Use https://github.com/infinity0/mdBook/tree/debian to help you rebase the patch on top of a newer version. . Make sure the paths here match the ones in debian/rust-doc.links +Description: Use https://github.com/infinity0/mdBook/tree/debian to help you rebase +the patch on top of a newer version. . Make sure the paths here match the ones +in debian/rust-doc.links + +Forwarded: not-needed --- + src/doc/rust-by-example/theme/index.hbs | 86 +---------------- src/tools/linkchecker/main.rs | 28 +++++- vendor/mdbook/src/book/init.rs | 19 ---- - .../src/renderer/html_handlebars/hbs_renderer.rs | 110 ++++----------------- + .../src/renderer/html_handlebars/hbs_renderer.rs | 104 ++++----------------- .../mdbook/src/renderer/html_handlebars/search.rs | 2 - - vendor/mdbook/src/theme/index.hbs | 99 +------------------ - vendor/mdbook/src/theme/mod.rs | 27 ----- + vendor/mdbook/src/theme/index.hbs | 86 +---------------- + vendor/mdbook/src/theme/mod.rs | 27 ------ vendor/mdbook/src/theme/searcher/mod.rs | 2 - - 7 files changed, 47 insertions(+), 240 deletions(-) + 8 files changed, 51 insertions(+), 303 deletions(-) +diff --git a/src/doc/rust-by-example/theme/index.hbs b/src/doc/rust-by-example/theme/index.hbs +index 1ae579f..effac81 100644 +--- a/src/doc/rust-by-example/theme/index.hbs ++++ b/src/doc/rust-by-example/theme/index.hbs +@@ -33,10 +33,7 @@ + {{/if}} + + <!-- Fonts --> +- <link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css"> +- {{#if copy_fonts}} +- <link rel="stylesheet" href="{{ path_to_root }}fonts/fonts.css"> +- {{/if}} ++ <link rel="stylesheet" href="{{ path_to_root }}css/font-awesome.min.css"> + + <!-- Highlight.js Stylesheets --> + <link rel="stylesheet" href="{{ path_to_root }}highlight.css"> +@@ -50,7 +47,7 @@ + + {{#if mathjax_support}} + <!-- MathJax --> +- <script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> ++ <script async src="MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + {{/if}} + </head> + <body class="sidebar-visible no-js"> +@@ -61,35 +58,6 @@ + var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}"; + </script> + +- <!-- Work around some values being stored in localStorage wrapped in quotes --> +- <script> +- try { +- var theme = localStorage.getItem('mdbook-theme'); +- var sidebar = localStorage.getItem('mdbook-sidebar'); +- +- if (theme.startsWith('"') && theme.endsWith('"')) { +- localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1)); +- } +- +- if (sidebar.startsWith('"') && sidebar.endsWith('"')) { +- localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1)); +- } +- } catch (e) { } +- </script> +- +- <!-- Set the theme before any content is loaded, prevents flash --> +- <script> +- var theme; +- try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } +- if (theme === null || theme === undefined) { theme = default_theme; } +- var html = document.querySelector('html'); +- html.classList.remove('{{ default_theme }}') +- html.classList.add(theme); +- var body = document.querySelector('body'); +- body.classList.remove('no-js') +- body.classList.add('js'); +- </script> +- + <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> + + <!-- Hide / unhide sidebar before it is displayed --> +@@ -309,54 +277,8 @@ + </script> + {{/if}} + +- {{#if google_analytics}} +- <!-- Google Analytics Tag --> +- <script> +- var localAddrs = ["localhost", "127.0.0.1", ""]; +- +- // make sure we don't activate google analytics if the developer is +- // inspecting the book locally... +- if (localAddrs.indexOf(document.location.hostname) === -1) { +- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ +- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), +- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) +- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); +- +- ga('create', '{{google_analytics}}', 'auto'); +- ga('send', 'pageview'); +- } +- </script> +- {{/if}} +- +- {{#if playground_line_numbers}} +- <script> +- window.playground_line_numbers = true; +- </script> +- {{/if}} +- +- {{#if playground_copyable}} +- <script> +- window.playground_copyable = true; +- </script> +- {{/if}} +- +- {{#if playground_js}} +- <script src="{{ path_to_root }}ace.js"></script> +- <script src="{{ path_to_root }}editor.js"></script> +- <script src="{{ path_to_root }}mode-rust.js"></script> +- <script src="{{ path_to_root }}theme-dawn.js"></script> +- <script src="{{ path_to_root }}theme-tomorrow_night.js"></script> +- {{/if}} +- +- {{#if search_js}} +- <script src="{{ path_to_root }}elasticlunr.min.js"></script> +- <script src="{{ path_to_root }}mark.min.js"></script> +- <script src="{{ path_to_root }}searcher.js"></script> +- {{/if}} +- +- <script src="{{ path_to_root }}clipboard.min.js"></script> +- <script src="{{ path_to_root }}highlight.js"></script> +- <script src="{{ path_to_root }}book.js"></script> ++ <script src="{{ path_to_root }}highlight.js" type="text/javascript" charset="utf-8"></script> ++ <script src="{{ path_to_root }}book.js" type="text/javascript" charset="utf-8"></script> + + <!-- Custom JS scripts --> + {{#each additional_js}} diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs -index c8a3700..4095c03 100644 +index 7f73cac..e4805cc 100644 --- a/src/tools/linkchecker/main.rs +++ b/src/tools/linkchecker/main.rs @@ -159,7 +159,17 @@ impl Checker { @@ -67,7 +190,7 @@ index c8a3700..4095c03 100644 report.links_ignored_exception += 1; } else { diff --git a/vendor/mdbook/src/book/init.rs b/vendor/mdbook/src/book/init.rs -index ebcdd93..41dab42 100644 +index faca1d0..c1a82a3 100644 --- a/vendor/mdbook/src/book/init.rs +++ b/vendor/mdbook/src/book/init.rs @@ -153,25 +153,6 @@ impl BookBuilder { @@ -97,10 +220,10 @@ index ebcdd93..41dab42 100644 } diff --git a/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs b/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs -index e170e2f..caa2eff 100644 +index 8ea2f49..3cb1c9f 100644 --- a/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs +++ b/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs -@@ -3,13 +3,14 @@ use crate::config::{BookConfig, Config, HtmlConfig, Playground, RustEdition}; +@@ -3,13 +3,14 @@ use crate::config::{BookConfig, Code, Config, HtmlConfig, Playground, RustEditio use crate::errors::*; use crate::renderer::html_handlebars::helpers; use crate::renderer::{RenderContext, Renderer}; @@ -116,7 +239,7 @@ index e170e2f..caa2eff 100644 use std::path::{Path, PathBuf}; use crate::utils::fs::get_404_output_file; -@@ -235,105 +236,28 @@ impl HtmlHandlebars { +@@ -250,99 +251,28 @@ impl HtmlHandlebars { if let Some(contents) = &theme.favicon_svg { write_file(destination, "favicon.svg", contents)?; } @@ -175,7 +298,8 @@ index e170e2f..caa2eff 100644 + "/usr/share/javascript/mathjax/MathJax.js", + destination.join("MathJax.js"), )?; -- if html_config.copy_fonts { +- // Don't copy the stock fonts if the user has specified their own fonts to use. +- if html_config.copy_fonts && theme.fonts_css.is_none() { - write_file(destination, "fonts/fonts.css", theme::fonts::CSS)?; - for (file_name, contents) in theme::fonts::LICENSES.iter() { - write_file(destination, file_name, contents)?; @@ -191,20 +315,13 @@ index e170e2f..caa2eff 100644 - } - if let Some(fonts_css) = &theme.fonts_css { - if !fonts_css.is_empty() { -- if html_config.copy_fonts { -- warn!( -- "output.html.copy_fonts is deprecated.\n\ -- Set copy_fonts=false and ensure the fonts you want are in \ -- the `theme/fonts/` directory." -- ); -- } -- write_file(destination, "fonts/fonts.css", &fonts_css)?; +- write_file(destination, "fonts/fonts.css", fonts_css)?; - } - } - if !html_config.copy_fonts && theme.fonts_css.is_none() { - warn!( -- "output.html.copy_fonts is deprecated.\n\ -- This book appears to have copy_fonts=false without a fonts.css file.\n\ +- "output.html.copy-fonts is deprecated.\n\ +- This book appears to have copy-fonts=false in book.toml without a fonts.css file.\n\ - Add an empty `theme/fonts/fonts.css` file to squelch this warning." - ); - } @@ -238,7 +355,7 @@ index e170e2f..caa2eff 100644 Ok(()) } diff --git a/vendor/mdbook/src/renderer/html_handlebars/search.rs b/vendor/mdbook/src/renderer/html_handlebars/search.rs -index a9e2f5c..3e3f69c 100644 +index 24d62fd..849a48c 100644 --- a/vendor/mdbook/src/renderer/html_handlebars/search.rs +++ b/vendor/mdbook/src/renderer/html_handlebars/search.rs @@ -53,8 +53,6 @@ pub fn create_files(search_config: &Search, destination: &Path, book: &Book) -> @@ -251,7 +368,7 @@ index a9e2f5c..3e3f69c 100644 } diff --git a/vendor/mdbook/src/theme/index.hbs b/vendor/mdbook/src/theme/index.hbs -index 6f3948c..7e5c54c 100644 +index 080b785..f6064f6 100644 --- a/vendor/mdbook/src/theme/index.hbs +++ b/vendor/mdbook/src/theme/index.hbs @@ -33,10 +33,7 @@ @@ -274,8 +391,8 @@ index 6f3948c..7e5c54c 100644 + <script async src="MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> {{/if}} </head> - <body> -@@ -61,48 +58,6 @@ + <body class="sidebar-visible no-js"> +@@ -61,35 +58,6 @@ var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}"; </script> @@ -301,30 +418,17 @@ index 6f3948c..7e5c54c 100644 - try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } - if (theme === null || theme === undefined) { theme = default_theme; } - var html = document.querySelector('html'); -- html.classList.remove('no-js') - html.classList.remove('{{ default_theme }}') - html.classList.add(theme); -- html.classList.add('js'); +- var body = document.querySelector('body'); +- body.classList.remove('no-js') +- body.classList.add('js'); - </script> - -- <!-- Hide / unhide sidebar before it is displayed --> -- <script> -- var html = document.querySelector('html'); -- var sidebar = null; -- if (document.body.clientWidth >= 1080) { -- try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { } -- sidebar = sidebar || 'visible'; -- } else { -- sidebar = 'hidden'; -- } -- html.classList.remove('sidebar-visible'); -- html.classList.add("sidebar-" + sidebar); -- </script> -- - <nav id="sidebar" class="sidebar" aria-label="Table of contents"> - <div class="sidebar-scrollbox"> - {{#toc}}{{/toc}} -@@ -240,54 +195,8 @@ + <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> + + <!-- Hide / unhide sidebar before it is displayed --> +@@ -269,54 +237,8 @@ </script> {{/if}} diff --git a/debian/patches/d-0005-no-jemalloc.patch b/debian/patches/prune/d-0005-no-jemalloc.patch index 17254fb53..611b87028 100644 --- a/debian/patches/d-0005-no-jemalloc.patch +++ b/debian/patches/prune/d-0005-no-jemalloc.patch @@ -2,18 +2,21 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> Date: Sat, 2 Oct 2021 01:08:00 +0100 Subject: d-0005-no-jemalloc +Description: remove jemalloc-sys + +Forwarded: not-needed --- compiler/rustc/Cargo.toml | 6 ------ src/tools/rust-analyzer/crates/profile/Cargo.toml | 2 -- 2 files changed, 8 deletions(-) diff --git a/compiler/rustc/Cargo.toml b/compiler/rustc/Cargo.toml -index 41003ad..0578f7b 100644 +index 3cb56a7..af37dfc 100644 --- a/compiler/rustc/Cargo.toml +++ b/compiler/rustc/Cargo.toml -@@ -14,13 +14,7 @@ rustc_codegen_ssa = { path = "../rustc_codegen_ssa" } - # crate is intended to be used by stable MIR consumers, which are not in-tree - rustc_smir = { path = "../rustc_smir" } +@@ -20,14 +20,8 @@ rustc_smir = { path = "../rustc_smir" } + stable_mir = { path = "../stable_mir" } + # tidy-alphabetical-end -[dependencies.jemalloc-sys] -version = "0.5.0" @@ -21,22 +24,23 @@ index 41003ad..0578f7b 100644 -features = ['unprefixed_malloc_on_supported_platforms'] - [features] + # tidy-alphabetical-start -jemalloc = ['jemalloc-sys'] llvm = ['rustc_driver_impl/llvm'] max_level_info = ['rustc_driver_impl/max_level_info'] rustc_use_parallel_compiler = ['rustc_driver_impl/rustc_use_parallel_compiler'] diff --git a/src/tools/rust-analyzer/crates/profile/Cargo.toml b/src/tools/rust-analyzer/crates/profile/Cargo.toml -index 6273ea5..642fb05 100644 +index 56ce9d1..4fb2760 100644 --- a/src/tools/rust-analyzer/crates/profile/Cargo.toml +++ b/src/tools/rust-analyzer/crates/profile/Cargo.toml @@ -17,7 +17,6 @@ cfg-if = "1.0.0" - libc = "0.2.135" - la-arena = { version = "0.3.0", path = "../../lib/la-arena" } + la-arena.workspace = true + libc.workspace = true countme = { version = "3.0.1", features = ["enable"] } -jemalloc-ctl = { version = "0.5.0", package = "tikv-jemalloc-ctl", optional = true } [target.'cfg(target_os = "linux")'.dependencies] - perf-event = "0.4.7" + perf-event = "=0.4.7" @@ -27,7 +26,6 @@ winapi = { version = "0.3.9", features = ["processthreadsapi", "psapi"] } [features] diff --git a/debian/patches/prune/d-0010-cargo-remove-vendored-c-crates.patch b/debian/patches/prune/d-0010-cargo-remove-vendored-c-crates.patch new file mode 100644 index 000000000..30b3198b4 --- /dev/null +++ b/debian/patches/prune/d-0010-cargo-remove-vendored-c-crates.patch @@ -0,0 +1,39 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Mon, 6 May 2024 10:25:32 +0200 +Subject: d-0010-cargo-remove-vendored-c-crates + +Description: remove all vendoring features of crates normally shipping bundled +C libs. that C code is stripped when repacking, so the features can't work +anyway. +Last-Update: 2023-05-17 + +Forwarded: not-needed +--- + src/tools/cargo/Cargo.toml | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/src/tools/cargo/Cargo.toml b/src/tools/cargo/Cargo.toml +index c07b004..2a81642 100644 +--- a/src/tools/cargo/Cargo.toml ++++ b/src/tools/cargo/Cargo.toml +@@ -73,7 +73,7 @@ proptest = "1.4.0" + pulldown-cmark = { version = "0.9.3", default-features = false } + rand = "0.8.5" + regex = "1.10.2" +-rusqlite = { version = "0.30.0", features = ["bundled"] } ++rusqlite = { version = "0.30.0", features = [] } + rustfix = { version = "0.7.0", path = "crates/rustfix" } + same-file = "1.0.6" + security-framework = "2.9.2" +@@ -243,10 +243,8 @@ test = false + doc = false + + [features] +-vendored-openssl = ["openssl/vendored"] +-vendored-libgit2 = ["libgit2-sys/vendored"] ++# Debian: removed vendoring flags + # This is primarily used by rust-lang/rust distributing cargo the executable. +-all-static = ['vendored-openssl', 'curl/static-curl', 'curl/force-system-lib-on-osx', 'vendored-libgit2'] + + [lints] + workspace = true diff --git a/debian/patches/d-0011-cargo-remove-nghttp2.patch b/debian/patches/prune/d-0011-cargo-remove-nghttp2.patch index 00e59567c..3255e98fc 100644 --- a/debian/patches/d-0011-cargo-remove-nghttp2.patch +++ b/debian/patches/prune/d-0011-cargo-remove-nghttp2.patch @@ -2,13 +2,17 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> Date: Mon, 6 May 2024 10:25:32 +0200 Subject: d-0011-cargo-remove-nghttp2 -Last-Update: 2023-05-17 <YYYY-MM-DD, last update of the meta-information, optional> +Description: remove dependency on libnghttp2-sys so it can be pruned. + +Last-Update: 2023-05-17 + +Forwarded: not-needed --- vendor/curl-sys/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/curl-sys/Cargo.toml b/vendor/curl-sys/Cargo.toml -index 945ee8e..04b9800 100644 +index daf925e..624fabf 100644 --- a/vendor/curl-sys/Cargo.toml +++ b/vendor/curl-sys/Cargo.toml @@ -52,7 +52,7 @@ version = "0.3.3" diff --git a/debian/patches/d-0020-remove-windows-dependencies.patch b/debian/patches/prune/d-0020-remove-windows-dependencies.patch index 624f3bcfd..29604db35 100644 --- a/debian/patches/d-0020-remove-windows-dependencies.patch +++ b/debian/patches/prune/d-0020-remove-windows-dependencies.patch @@ -2,43 +2,57 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> Date: Mon, 6 May 2024 10:25:32 +0200 Subject: d-0020-remove-windows-dependencies +use something like + + find src compiler library -iname Cargo.toml -exec grep -H -n -e 'windows-sys' -e 'winapi' -e 'ntapi' -e 'wincon' -e 'winreg' -e 'windows' {} \; > + +to find and eliminate dependencies on windows-only crates when rebasing. + +windows-bindgen and windows-metadata should not be removed, they are needed for +the build and don't pull in windows-sys and friends. + +Forwarded: not-needed + =================================================================== --- - compiler/rustc_codegen_ssa/Cargo.toml | 4 --- - compiler/rustc_data_structures/Cargo.toml | 10 ------ - compiler/rustc_driver_impl/Cargo.toml | 6 ---- - compiler/rustc_errors/Cargo.toml | 8 ----- - compiler/rustc_session/Cargo.toml | 7 ---- - library/backtrace/Cargo.toml | 3 -- - src/bootstrap/Cargo.toml | 15 -------- - src/tools/cargo/Cargo.toml | 17 --------- - .../cargo/crates/cargo-test-support/Cargo.toml | 41 ++++++++++------------ - src/tools/cargo/crates/cargo-util/Cargo.toml | 7 ---- - src/tools/cargo/crates/home/Cargo.toml | 3 -- - src/tools/compiletest/Cargo.toml | 10 ------ - .../rust-analyzer/crates/rust-analyzer/Cargo.toml | 6 ---- - src/tools/rust-analyzer/crates/stdx/Cargo.toml | 4 --- - 14 files changed, 19 insertions(+), 122 deletions(-) + compiler/rustc_codegen_ssa/Cargo.toml | 4 ---- + compiler/rustc_data_structures/Cargo.toml | 10 --------- + compiler/rustc_driver_impl/Cargo.toml | 6 ----- + compiler/rustc_errors/Cargo.toml | 8 ------- + compiler/rustc_session/Cargo.toml | 7 ------ + library/backtrace/Cargo.toml | 13 ----------- + src/bootstrap/Cargo.toml | 15 ------------- + src/tools/cargo/Cargo.toml | 26 ++++------------------ + .../cargo/crates/cargo-test-support/Cargo.toml | 3 --- + src/tools/cargo/crates/cargo-util/Cargo.toml | 7 ------ + src/tools/cargo/crates/home/Cargo.toml | 3 --- + .../cargo/credential/cargo-credential/Cargo.toml | 3 --- + src/tools/cargo/src/cargo/util/auth/mod.rs | 5 ----- + src/tools/compiletest/Cargo.toml | 10 --------- + src/tools/rust-analyzer/crates/profile/Cargo.toml | 3 --- + .../rust-analyzer/crates/rust-analyzer/Cargo.toml | 6 ----- + src/tools/rust-analyzer/crates/stdx/Cargo.toml | 4 ---- + 17 files changed, 4 insertions(+), 129 deletions(-) diff --git a/compiler/rustc_codegen_ssa/Cargo.toml b/compiler/rustc_codegen_ssa/Cargo.toml -index 0ac12d3..3f483ab 100644 +index 3f2ed25..bf0ad91 100644 --- a/compiler/rustc_codegen_ssa/Cargo.toml +++ b/compiler/rustc_codegen_ssa/Cargo.toml @@ -49,7 +49,3 @@ libc = "0.2.50" - version = "0.31.1" + version = "0.32.1" default-features = false - features = ["read_core", "elf", "macho", "pe", "unaligned", "archive", "write"] + features = ["read_core", "elf", "macho", "pe", "xcoff", "unaligned", "archive", "write"] - -[target.'cfg(windows)'.dependencies.windows] -version = "0.48.0" -features = ["Win32_Globalization"] diff --git a/compiler/rustc_data_structures/Cargo.toml b/compiler/rustc_data_structures/Cargo.toml -index 78f73d1..fce2ee0 100644 +index 4732783..bbfcb55 100644 --- a/compiler/rustc_data_structures/Cargo.toml +++ b/compiler/rustc_data_structures/Cargo.toml -@@ -37,16 +37,6 @@ itertools = "0.10.1" +@@ -32,16 +32,6 @@ tracing = "0.1" [dependencies.parking_lot] - version = "0.11" + version = "0.12" -[target.'cfg(windows)'.dependencies.windows] -version = "0.48.0" @@ -51,15 +65,15 @@ index 78f73d1..fce2ee0 100644 -] - [target.'cfg(not(target_arch = "wasm32"))'.dependencies] + # tidy-alphabetical-start memmap2 = "0.2.1" - diff --git a/compiler/rustc_driver_impl/Cargo.toml b/compiler/rustc_driver_impl/Cargo.toml -index 67352c5..f27cb40 100644 +index 4904298..2918095 100644 --- a/compiler/rustc_driver_impl/Cargo.toml +++ b/compiler/rustc_driver_impl/Cargo.toml -@@ -56,12 +56,6 @@ rustc_mir_transform = { path = "../rustc_mir_transform" } - [target.'cfg(unix)'.dependencies] +@@ -59,12 +59,6 @@ tracing = { version = "0.1.35" } libc = "0.2" + # tidy-alphabetical-end -[target.'cfg(windows)'.dependencies.windows] -version = "0.48.0" @@ -68,15 +82,15 @@ index 67352c5..f27cb40 100644 -] - [features] + # tidy-alphabetical-start llvm = ['rustc_interface/llvm'] - max_level_info = ['rustc_log/max_level_info'] diff --git a/compiler/rustc_errors/Cargo.toml b/compiler/rustc_errors/Cargo.toml -index bd3033f..83c8036 100644 +index fc3ff83..4f74aec 100644 --- a/compiler/rustc_errors/Cargo.toml +++ b/compiler/rustc_errors/Cargo.toml -@@ -26,13 +26,5 @@ termize = "0.1.1" - serde = { version = "1.0.125", features = [ "derive" ] } - serde_json = "1.0.59" +@@ -27,14 +27,6 @@ tracing = "0.1" + unicode-width = "0.1.4" + # tidy-alphabetical-end -[target.'cfg(windows)'.dependencies.windows] -version = "0.48.0" @@ -87,15 +101,16 @@ index bd3033f..83c8036 100644 -] - [features] + # tidy-alphabetical-start rustc_use_parallel_compiler = ['rustc_error_messages/rustc_use_parallel_compiler'] diff --git a/compiler/rustc_session/Cargo.toml b/compiler/rustc_session/Cargo.toml -index 3af83aa..c3d2a00 100644 +index 1f51dd6..2974bd0 100644 --- a/compiler/rustc_session/Cargo.toml +++ b/compiler/rustc_session/Cargo.toml -@@ -23,10 +23,3 @@ termize = "0.1.1" - - [target.'cfg(unix)'.dependencies] +@@ -28,10 +28,3 @@ tracing = "0.1" + # tidy-alphabetical-start libc = "0.2" + # tidy-alphabetical-end - -[target.'cfg(windows)'.dependencies.windows] -version = "0.48.0" @@ -104,12 +119,12 @@ index 3af83aa..c3d2a00 100644 - "Win32_System_LibraryLoader", -] diff --git a/library/backtrace/Cargo.toml b/library/backtrace/Cargo.toml -index 4779091..aa78771 100644 +index 932310b..dce3c3f 100644 --- a/library/backtrace/Cargo.toml +++ b/library/backtrace/Cargo.toml -@@ -45,9 +45,6 @@ version = "0.30.0" +@@ -48,9 +48,6 @@ version = "0.32.0" default-features = false - features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive'] + features = ['read_core', 'elf', 'macho', 'pe', 'xcoff', 'unaligned', 'archive'] -[target.'cfg(windows)'.dependencies] -winapi = { version = "0.3.9", optional = true } @@ -117,7 +132,7 @@ index 4779091..aa78771 100644 [build-dependencies] # Only needed for Android, but cannot be target dependent # https://github.com/rust-lang/cargo/issues/4932 -@@ -85,16 +82,6 @@ libbacktrace = [] +@@ -88,16 +85,6 @@ libbacktrace = [] libunwind = [] unix-backtrace = [] verify-winapi = [ @@ -135,18 +150,18 @@ index 4779091..aa78771 100644 [[example]] diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml -index 367c619..72c9992 100644 +index 077d195..b9ad241 100644 --- a/src/bootstrap/Cargo.toml +++ b/src/bootstrap/Cargo.toml -@@ -63,21 +63,6 @@ semver = "1.0.17" +@@ -65,21 +65,6 @@ sysinfo = { version = "0.26.0", optional = true } [target.'cfg(not(target_os = "solaris"))'.dependencies] - fd-lock = "3.0.8" + fd-lock = "3.0.13" -[target.'cfg(windows)'.dependencies.junction] -version = "1.0.0" - -[target.'cfg(windows)'.dependencies.windows] --version = "0.46.0" +-version = "0.51.1" -features = [ - "Win32_Foundation", - "Win32_Security", @@ -158,10 +173,10 @@ index 367c619..72c9992 100644 -] - [dev-dependencies] - pretty_assertions = "1.2" + pretty_assertions = "1.4" diff --git a/src/tools/cargo/Cargo.toml b/src/tools/cargo/Cargo.toml -index a7475f6..4ad22f5 100644 +index 2a81642..76a8cf2 100644 --- a/src/tools/cargo/Cargo.toml +++ b/src/tools/cargo/Cargo.toml @@ -2,7 +2,9 @@ @@ -171,127 +186,147 @@ index a7475f6..4ad22f5 100644 - "credential/*", + "credential/cargo-credential", + "credential/cargo-credential-1password", -+ "credential/cargo-credential-gnome-secret", ++ "credential/cargo-credential-libsecret", "benches/benchsuite", "benches/capture", ] -@@ -91,7 +93,6 @@ unicode-xid = "0.2.0" - url = "2.2.2" - varisat = "0.2.1" - walkdir = "2.3.1" --windows-sys = "0.48" +@@ -24,8 +26,6 @@ bytesize = "1.3" + cargo = { path = "" } + cargo-credential = { version = "0.4.2", path = "credential/cargo-credential" } + cargo-credential-libsecret = { version = "0.4.2", path = "credential/cargo-credential-libsecret" } +-cargo-credential-macos-keychain = { version = "0.4.2", path = "credential/cargo-credential-macos-keychain" } +-cargo-credential-wincred = { version = "0.4.2", path = "credential/cargo-credential-wincred" } + cargo-platform = { path = "crates/cargo-platform", version = "0.1.4" } + cargo-test-macro = { path = "crates/cargo-test-macro" } + cargo-test-support = { path = "crates/cargo-test-support" } +@@ -103,7 +103,6 @@ unicode-xid = "0.2.4" + url = "2.5.0" + varisat = "0.2.2" + walkdir = "2.4.0" +-windows-sys = "0.52" + + [workspace.lints.rust] + rust_2018_idioms = "warn" # TODO: could this be removed? +@@ -144,6 +143,7 @@ base64.workspace = true + bytesize.workspace = true + cargo-credential.workspace = true + cargo-platform.workspace = true ++cargo-credential-libsecret.workspace = true + cargo-util.workspace = true + clap = { workspace = true, features = ["wrap_help"] } + color-print.workspace = true +@@ -206,27 +206,9 @@ walkdir.workspace = true + [target.'cfg(target_os = "linux")'.dependencies] + cargo-credential-libsecret.workspace = true - [package] - name = "cargo" -@@ -174,22 +175,6 @@ walkdir.workspace = true +-[target.'cfg(target_os = "macos")'.dependencies] +-cargo-credential-macos-keychain.workspace = true +- [target.'cfg(not(windows))'.dependencies] openssl = { workspace = true, optional = true } -[target.'cfg(windows)'.dependencies] --fwdansi.workspace = true +-cargo-credential-wincred.workspace = true - -[target.'cfg(windows)'.dependencies.windows-sys] -workspace = true -features = [ - "Win32_Foundation", +- "Win32_Security", - "Win32_Storage_FileSystem", -- "Win32_System_Console", - "Win32_System_IO", -- "Win32_System_Threading", +- "Win32_System_Console", - "Win32_System_JobObjects", -- "Win32_Security", -- "Win32_System_SystemServices" +- "Win32_System_Threading", -] - [dev-dependencies] cargo-test-macro.workspace = true cargo-test-support.workspace = true diff --git a/src/tools/cargo/crates/cargo-test-support/Cargo.toml b/src/tools/cargo/crates/cargo-test-support/Cargo.toml -index 305c809a..c656678 100644 +index 1098d59..88d4ae7 100644 --- a/src/tools/cargo/crates/cargo-test-support/Cargo.toml +++ b/src/tools/cargo/crates/cargo-test-support/Cargo.toml -@@ -9,25 +9,22 @@ publish = false - doctest = false +@@ -31,8 +31,5 @@ toml.workspace = true + url.workspace = true + walkdir.workspace = true - [dependencies] --anyhow.workspace = true --cargo-test-macro.workspace = true --cargo-util.workspace = true --crates-io.workspace = true --filetime.workspace = true --flate2.workspace = true --git2.workspace = true --glob.workspace = true --itertools.workspace = true --lazy_static.workspace = true --pasetors.workspace = true --serde = { workspace = true, features = ["derive"] } --serde_json.workspace = true --snapbox.workspace = true --tar.workspace = true --termcolor.workspace = true --time.workspace = true --toml.workspace = true --url.workspace = true -- -[target.'cfg(windows)'.dependencies] -windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem"] } -+anyhow = "1.0.34" -+cargo-test-macro = { path = "../cargo-test-macro" } -+cargo-util = { path = "../cargo-util" } -+crates-io = { path = "../crates-io" } -+filetime = "0.2" -+flate2 = { version = "1.0", default-features = false, features = ["zlib"] } -+git2 = "0.17.0" -+glob = "0.3" -+itertools = "0.10.0" -+lazy_static = "1.0" -+pasetors = { version = "0.6.4", features = ["v3", "paserk", "std", "serde"] } -+serde = { version = "1.0.123", features = ["derive"] } -+serde_json = "1.0" -+snapbox = { version = "0.4.0", features = ["diff", "path"] } -+tar = { version = "0.4.38", default-features = false } -+termcolor = "1.1.2" -+time = { version = "0.3", features = ["parsing", "formatting"]} -+toml = "0.7.0" -+url = "2.2.2" +- + [lints] + workspace = true diff --git a/src/tools/cargo/crates/cargo-util/Cargo.toml b/src/tools/cargo/crates/cargo-util/Cargo.toml -index f01705f..138690f 100644 +index 3fd6bde..fb681a3 100644 --- a/src/tools/cargo/crates/cargo-util/Cargo.toml +++ b/src/tools/cargo/crates/cargo-util/Cargo.toml -@@ -19,10 +19,3 @@ same-file.workspace = true - shell-escape.workspace = true - tempfile.workspace = true +@@ -22,12 +22,5 @@ tempfile.workspace = true + tracing.workspace = true walkdir.workspace = true -- + -[target.'cfg(target_os = "macos")'.dependencies] -core-foundation.workspace = true - -[target.'cfg(windows)'.dependencies] -miow.workspace = true -windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_Console"] } +- + [lints] + workspace = true diff --git a/src/tools/cargo/crates/home/Cargo.toml b/src/tools/cargo/crates/home/Cargo.toml -index 6c65ecc1..11fd255 100644 +index 33cd6ba..2d5dfdc 100644 --- a/src/tools/cargo/crates/home/Cargo.toml +++ b/src/tools/cargo/crates/home/Cargo.toml -@@ -15,6 +15,3 @@ license = "MIT OR Apache-2.0" - readme = "README.md" +@@ -16,8 +16,5 @@ license.workspace = true repository = "https://github.com/rust-lang/cargo" description = "Shared definitions of home directories." + +-[target.'cfg(windows)'.dependencies] +-windows-sys = { workspace = true, features = ["Win32_Foundation", "Win32_UI_Shell", "Win32_System_Com"] } - + [lints] + workspace = true +diff --git a/src/tools/cargo/credential/cargo-credential/Cargo.toml b/src/tools/cargo/credential/cargo-credential/Cargo.toml +index 7dc37ff..fac049b 100644 +--- a/src/tools/cargo/credential/cargo-credential/Cargo.toml ++++ b/src/tools/cargo/credential/cargo-credential/Cargo.toml +@@ -15,9 +15,6 @@ serde_json.workspace = true + thiserror.workspace = true + time.workspace = true + -[target.'cfg(windows)'.dependencies] --windows-sys = { workspace = true, features = ["Win32_Foundation", "Win32_UI_Shell"] } +-windows-sys = { workspace = true, features = ["Win32_System_Console", "Win32_Foundation"] } +- + [dev-dependencies] + snapbox = { workspace = true, features = ["examples"] } + +diff --git a/src/tools/cargo/src/cargo/util/auth/mod.rs b/src/tools/cargo/src/cargo/util/auth/mod.rs +index c2f8186..c420971 100644 +--- a/src/tools/cargo/src/cargo/util/auth/mod.rs ++++ b/src/tools/cargo/src/cargo/util/auth/mod.rs +@@ -529,11 +529,6 @@ fn credential_action( + } + "cargo:paseto" => bail!("cargo:paseto requires -Zasymmetric-token"), + "cargo:token-from-stdout" => Box::new(BasicProcessCredential {}), +- #[cfg(windows)] +- "cargo:wincred" => Box::new(cargo_credential_wincred::WindowsCredential {}), +- #[cfg(target_os = "macos")] +- "cargo:macos-keychain" => Box::new(cargo_credential_macos_keychain::MacKeychain {}), +- #[cfg(target_os = "linux")] + "cargo:libsecret" => Box::new(cargo_credential_libsecret::LibSecretCredential {}), + name if BUILT_IN_PROVIDERS.contains(&name) => { + Box::new(cargo_credential::UnsupportedCredential {}) diff --git a/src/tools/compiletest/Cargo.toml b/src/tools/compiletest/Cargo.toml -index d2f2583..61f7be4 100644 +index 31c6353..bdc4805 100644 --- a/src/tools/compiletest/Cargo.toml +++ b/src/tools/compiletest/Cargo.toml -@@ -27,13 +27,3 @@ anyhow = "1" +@@ -29,13 +29,3 @@ home = "0.5.5" [target.'cfg(unix)'.dependencies] libc = "0.2" - -[target.'cfg(windows)'.dependencies] --miow = "0.5" +-miow = "0.6" - -[target.'cfg(windows)'.dependencies.windows] -version = "0.48.0" @@ -299,11 +334,25 @@ index d2f2583..61f7be4 100644 - "Win32_Foundation", - "Win32_System_Diagnostics_Debug", -] +diff --git a/src/tools/rust-analyzer/crates/profile/Cargo.toml b/src/tools/rust-analyzer/crates/profile/Cargo.toml +index 4fb2760..8573fbe 100644 +--- a/src/tools/rust-analyzer/crates/profile/Cargo.toml ++++ b/src/tools/rust-analyzer/crates/profile/Cargo.toml +@@ -21,9 +21,6 @@ countme = { version = "3.0.1", features = ["enable"] } + [target.'cfg(target_os = "linux")'.dependencies] + perf-event = "=0.4.7" + +-[target.'cfg(windows)'.dependencies] +-winapi = { version = "0.3.9", features = ["processthreadsapi", "psapi"] } +- + [features] + 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 f0f1900..3137edb 100644 +index 39ac338a..d25722a 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml +++ b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml -@@ -67,12 +67,6 @@ tt.workspace = true +@@ -65,12 +65,6 @@ toolchain.workspace = true vfs-notify.workspace = true vfs.workspace = true @@ -315,31 +364,17 @@ index f0f1900..3137edb 100644 - [dev-dependencies] expect-test = "1.4.0" - jod-thread = "0.1.2" -diff --git a/src/tools/rust-analyzer/crates/profile/Cargo.toml b/src/tools/rust-analyzer/crates/profile/Cargo.toml -index 642fb05..0883bb7 100644 ---- a/src/tools/rust-analyzer/crates/profile/Cargo.toml -+++ b/src/tools/rust-analyzer/crates/profile/Cargo.toml -@@ -21,9 +21,6 @@ countme = { version = "3.0.1", features = ["enable"] } - [target.'cfg(target_os = "linux")'.dependencies] - perf-event = "0.4.7" - --[target.'cfg(windows)'.dependencies] --winapi = { version = "0.3.9", features = ["processthreadsapi", "psapi"] } -- - [features] - cpu_profiler = [] - + xshell.workspace = true diff --git a/src/tools/rust-analyzer/crates/stdx/Cargo.toml b/src/tools/rust-analyzer/crates/stdx/Cargo.toml -index c881f2f..5cb4cb0 100644 +index c914ae2..db8b274 100644 --- a/src/tools/rust-analyzer/crates/stdx/Cargo.toml +++ b/src/tools/rust-analyzer/crates/stdx/Cargo.toml -@@ -17,10 +17,6 @@ backtrace = { version = "0.3.65", optional = true } - always-assert = { version = "0.1.2", features = ["log"] } +@@ -20,10 +20,6 @@ crossbeam-channel = "0.5.5" + itertools.workspace = true # Think twice before adding anything here -[target.'cfg(windows)'.dependencies] --miow = "0.5.0" +-miow = "0.6.0" -winapi = { version = "0.3.9", features = ["winerror"] } - [features] diff --git a/debian/patches/d-0021-vendor-remove-windows-dependencies.patch b/debian/patches/prune/d-0021-vendor-remove-windows-dependencies.patch index 8796a5c92..025cfd8bd 100644 --- a/debian/patches/d-0021-vendor-remove-windows-dependencies.patch +++ b/debian/patches/prune/d-0021-vendor-remove-windows-dependencies.patch @@ -1,103 +1,147 @@ -From 1a6f5062adaad5d7f1a4f1cf792f4ee8c3c17e9f Mon Sep 17 00:00:00 2001 -From: Fabian Grünbichler <f.gruenbichler@proxmox.com> +From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com> Date: Wed, 6 Sep 2023 13:23:24 -0600 -Subject: [PATCH] Remove Windows dependencies +Subject: d-0021-vendor-remove-windows-dependencies +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +use something like + + find vendor -iname Cargo.toml -exec grep -H -n -e 'windows-sys' -e 'winapi' -e 'ntapi' -e 'wincon' -e 'winreg' -e 'windows' {} \; > /tmp/files + +to find dependencies on windows targets in vendored crates. you will likely +need to remove some hunks from this patch after pruning dependencies, since +hopefully a few of the crates patched during early rebasing are eliminated. + +windows-bindgen and windows-metadata should not be removed, they are needed for +the build and don't pull in windows-sys and friends. + +Forwarded: not-needed Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> --- - vendor/anstream/Cargo.toml | 6 +---- - vendor/atty/Cargo.toml | 3 --- - vendor/backtrace/Cargo.toml | 13 ----------- - vendor/chrono/Cargo.toml | 11 --------- - vendor/colored/Cargo.toml | 4 ---- - vendor/compiletest_rs/Cargo.toml | 6 ----- - vendor/concolor-query/Cargo.toml | 7 ------ - vendor/ctrlc/Cargo.toml | 18 --------------- - vendor/curl-sys/Cargo.toml | 10 --------- - vendor/curl/Cargo.toml | 10 --------- - vendor/dirs-sys-next/Cargo.toml | 3 --- - vendor/dirs-sys/Cargo.toml | 3 --- - vendor/errno-0.3.0/Cargo.toml | 7 ------ - vendor/errno/Cargo.toml | 6 ----- - vendor/fd-lock/Cargo.toml | 8 ------- - vendor/filetime-0.2.20/Cargo.toml | 7 ------ - vendor/filetime/Cargo.toml | 7 ------ - vendor/gix-discover/Cargo.toml | 3 --- - vendor/gix-sec/Cargo.toml | 13 ----------- - vendor/home-0.5.4/Cargo.toml | 8 ------- - vendor/home/Cargo.toml | 7 ------ - vendor/iana-time-zone/Cargo.toml | 4 ---- - vendor/ignore-0.4.18/Cargo.toml | 2 -- - vendor/ignore/Cargo.toml | 3 --- - vendor/io-close/Cargo.toml | 3 --- - vendor/io-lifetimes-1.0.9/Cargo.toml | 13 ----------- - vendor/io-lifetimes/Cargo.toml | 13 ----------- - vendor/is-terminal-0.4.6/Cargo.toml | 11 --------- - vendor/is-terminal/Cargo.toml | 11 --------- - vendor/libloading/Cargo.toml | 7 ------ - vendor/libssh2-sys/Cargo.toml | 4 ---- - vendor/nu-ansi-term/Cargo.toml | 10 --------- - vendor/opener-0.5.0/Cargo.toml | 3 --- - vendor/opener/Cargo.toml | 4 ---- - vendor/os_info/Cargo.toml | 15 ------------- - vendor/parking_lot_core-0.8.6/Cargo.toml | 12 ---------- - vendor/parking_lot_core-0.9.6/Cargo.toml | 9 -------- - vendor/parking_lot_core/Cargo.toml | 9 -------- - vendor/pretty_assertions/Cargo.toml | 6 ----- - vendor/remove_dir_all/Cargo.toml | 3 --- - vendor/rustix-0.37.6/Cargo.toml | 12 ---------- - vendor/rustix-0.37.7/Cargo.toml | 12 ---------- - vendor/rustix/Cargo.toml | 17 -------------- - vendor/same-file/Cargo.toml | 2 -- - vendor/snapbox/Cargo.toml | 11 --------- - vendor/socket2-0.4.1/Cargo.toml | 3 --- - vendor/socket2/Cargo.toml | 8 ------- - vendor/stacker/Cargo.toml | 10 --------- - vendor/sysinfo/Cargo.toml | 38 -------------------------------- - vendor/tempfile-3.3.0/Cargo.toml | 3 --- - vendor/tempfile/Cargo.toml | 7 ------ - vendor/term/Cargo.toml | 6 ----- - vendor/termcolor/Cargo.toml | 3 --- - vendor/terminal_size/Cargo.toml | 7 ------ - vendor/termize/Cargo.toml | 3 --- - vendor/tokio/Cargo.toml | 6 ----- - vendor/uuid/Cargo.toml | 4 ---- - vendor/walkdir-2.3.2/Cargo.toml | 6 ----- - vendor/walkdir/Cargo.toml | 3 --- - 59 files changed, 1 insertion(+), 462 deletions(-) + vendor/android-tzdata/Cargo.toml | 1 + + vendor/ansi_term/Cargo.toml | 3 --- + vendor/anstream-0.5.0/Cargo.toml | 5 ----- + vendor/anstream/Cargo.toml | 7 ------ + vendor/anstyle-query/Cargo.toml | 6 ----- + vendor/backtrace/Cargo.toml | 14 ------------ + vendor/chrono/Cargo.toml | 12 ---------- + vendor/colored/Cargo.toml | 7 ------ + vendor/console/Cargo.toml | 11 ---------- + vendor/ctrlc/Cargo.toml | 17 --------------- + vendor/curl-sys/Cargo.toml | 7 ------ + vendor/curl/Cargo.toml | 10 --------- + vendor/dirs-sys-0.3.7/Cargo.toml | 3 --- + vendor/dirs-sys-next/Cargo.toml | 3 --- + vendor/errno/Cargo.toml | 6 ----- + vendor/fd-lock/Cargo.toml | 8 ------- + vendor/filetime/Cargo.toml | 7 ------ + vendor/gix-sec/Cargo.toml | 12 ---------- + vendor/home/Cargo.toml | 7 ------ + vendor/iana-time-zone/Cargo.toml | 4 ---- + vendor/ignore/Cargo.toml | 2 -- + vendor/is-terminal/Cargo.toml | 11 ---------- + vendor/libloading-0.7.4/Cargo.toml | 6 ----- + vendor/libloading/Cargo.toml | 8 ------- + vendor/libssh2-sys/Cargo.toml | 8 ------- + vendor/mio/Cargo.toml | 11 ---------- + vendor/native-tls/Cargo.toml | 3 --- + vendor/nu-ansi-term-0.46.0/Cargo.toml | 10 --------- + vendor/opener-0.5.2/Cargo.toml | 4 ---- + vendor/opener/Cargo.toml | 9 -------- + vendor/os_info/Cargo.toml | 15 ------------- + vendor/parking_lot_core/Cargo.toml | 3 --- + vendor/reqwest/Cargo.toml | 3 --- + vendor/rustix/Cargo.toml | 17 --------------- + vendor/same-file/Cargo.toml | 2 -- + vendor/snapbox/Cargo.toml | 6 ----- + vendor/socket2/Cargo.toml | 7 ------ + vendor/stacker/Cargo.toml | 10 --------- + vendor/sysinfo-0.26.7/Cargo.toml | 38 -------------------------------- + vendor/sysinfo/Cargo.toml | 41 ----------------------------------- + vendor/tempfile/Cargo.toml | 7 ------ + vendor/term/Cargo.toml | 6 ----- + vendor/termcolor/Cargo.toml | 3 --- + vendor/terminal_size/Cargo.toml | 7 ------ + vendor/termize/Cargo.toml | 3 --- + vendor/tokio-native-tls/Cargo.toml | 17 --------------- + vendor/tokio/Cargo.toml | 21 ------------------ + vendor/uuid/Cargo.toml | 4 ---- + vendor/walkdir/Cargo.toml | 3 --- + vendor/yansi-term/Cargo.toml | 3 --- + 50 files changed, 1 insertion(+), 437 deletions(-) +diff --git a/vendor/android-tzdata/Cargo.toml b/vendor/android-tzdata/Cargo.toml +index 805128a..0682717 100644 +--- a/vendor/android-tzdata/Cargo.toml ++++ b/vendor/android-tzdata/Cargo.toml +@@ -32,3 +32,4 @@ repository = "https://github.com/RumovZ/android-tzdata" + + [dev-dependencies.zip] + version = "0.6.4" ++repository = "https://github.com/rust-cli/concolor" +diff --git a/vendor/ansi_term/Cargo.toml b/vendor/ansi_term/Cargo.toml +index 0e5feba..3256c75 100644 +--- a/vendor/ansi_term/Cargo.toml ++++ b/vendor/ansi_term/Cargo.toml +@@ -38,6 +38,3 @@ version = "1.0.39" + + [features] + derive_serde_style = ["serde"] +-[target."cfg(target_os=\"windows\")".dependencies.winapi] +-version = "0.3.4" +-features = ["consoleapi", "errhandlingapi", "fileapi", "handleapi", "processenv"] +diff --git a/vendor/anstream-0.5.0/Cargo.toml b/vendor/anstream-0.5.0/Cargo.toml +index 1b5193c..9574485 100644 +--- a/vendor/anstream-0.5.0/Cargo.toml ++++ b/vendor/anstream-0.5.0/Cargo.toml +@@ -131,10 +131,5 @@ auto = [ + ] + default = [ + "auto", +- "wincon", + ] +-wincon = ["dep:anstyle-wincon"] + +-[target."cfg(windows)".dependencies.anstyle-wincon] +-version = "2.0.0" +-optional = true diff --git a/vendor/anstream/Cargo.toml b/vendor/anstream/Cargo.toml -index eb04906..7e2ed64 100644 +index a64ec8d..34dd08f 100644 --- a/vendor/anstream/Cargo.toml +++ b/vendor/anstream/Cargo.toml -@@ -137,8 +137,4 @@ default = [ +@@ -134,11 +134,4 @@ auto = [ + ] + default = [ "auto", - "wincon", +- "wincon", ] +-test = [] -wincon = ["dep:anstyle-wincon"] - -[target."cfg(windows)".dependencies.anstyle-wincon] --version = "0.2.0" +-version = "3.0.1" -optional = true -+wincon = [] -diff --git a/vendor/atty/Cargo.toml b/vendor/atty/Cargo.toml -index d6bf2d0..7cebc31 100644 ---- a/vendor/atty/Cargo.toml -+++ b/vendor/atty/Cargo.toml -@@ -27,8 +27,5 @@ version = "0.1.6" - [target."cfg(unix)".dependencies.libc] - version = "0.2" - default-features = false --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = ["consoleapi", "processenv", "minwinbase", "minwindef", "winbase"] - [badges.travis-ci] - repository = "softprops/atty" +diff --git a/vendor/anstyle-query/Cargo.toml b/vendor/anstyle-query/Cargo.toml +index 599e364..e32bc63 100644 +--- a/vendor/anstyle-query/Cargo.toml ++++ b/vendor/anstyle-query/Cargo.toml +@@ -72,9 +72,3 @@ replace = """ + [Unreleased]: https://github.com/rust-cli/anstyle/compare/{{tag_name}}...HEAD""" + search = "<!-- next-url -->" + +-[target."cfg(windows)".dependencies.windows-sys] +-version = "0.52.0" +-features = [ +- "Win32_System_Console", +- "Win32_Foundation", +-] diff --git a/vendor/backtrace/Cargo.toml b/vendor/backtrace/Cargo.toml -index 96f4146..4a48f6e 100644 +index c13e7ee..7b01a6f 100644 --- a/vendor/backtrace/Cargo.toml +++ b/vendor/backtrace/Cargo.toml -@@ -127,18 +127,5 @@ serialize-serde = ["serde"] +@@ -104,16 +104,6 @@ serialize-serde = ["serde"] std = [] unix-backtrace = [] verify-winapi = [ @@ -113,14 +157,20 @@ index 96f4146..4a48f6e 100644 - "winapi/winnt", ] + [target."cfg(not(all(windows, target_env = \"msvc\", not(target_vendor = \"uwp\"))))".dependencies.addr2line] +@@ -139,7 +129,3 @@ features = [ + "archive", + ] + default-features = false +- -[target."cfg(windows)".dependencies.winapi] -version = "0.3.9" -optional = true diff --git a/vendor/chrono/Cargo.toml b/vendor/chrono/Cargo.toml -index eaf0e69..79ab5f9 100644 +index 7f49bad..6229f0a 100644 --- a/vendor/chrono/Cargo.toml +++ b/vendor/chrono/Cargo.toml -@@ -114,7 +114,6 @@ __internal_bench = ["criterion"] +@@ -107,7 +107,6 @@ __internal_bench = ["criterion"] alloc = [] clock = [ "std", @@ -128,7 +178,7 @@ index eaf0e69..79ab5f9 100644 "iana-time-zone", ] default = [ -@@ -150,13 +149,3 @@ version = "0.3" +@@ -146,14 +145,3 @@ version = "0.1.1" version = "0.1.45" features = ["fallback"] optional = true @@ -140,66 +190,85 @@ index eaf0e69..79ab5f9 100644 - "minwinbase", - "minwindef", - "timezoneapi", +- "sysinfoapi", -] -optional = true diff --git a/vendor/colored/Cargo.toml b/vendor/colored/Cargo.toml -index 3a6b59b..065eecb 100644 +index dda2951..05b76bd 100644 --- a/vendor/colored/Cargo.toml +++ b/vendor/colored/Cargo.toml -@@ -33,7 +33,3 @@ version = "=1.0.0-beta.3" +@@ -42,10 +42,3 @@ version = "=1.0.0-beta.3" [features] no-color = [] --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = ["consoleapi", "processenv", "winbase"] --default-features = false -diff --git a/vendor/compiletest_rs/Cargo.toml b/vendor/compiletest_rs/Cargo.toml -index c1b3ecd..cae8c30 100644 ---- a/vendor/compiletest_rs/Cargo.toml -+++ b/vendor/compiletest_rs/Cargo.toml -@@ -75,9 +75,3 @@ tmp = ["tempfile"] - [target."cfg(unix)".dependencies.libc] - version = "0.2" - --[target."cfg(windows)".dependencies.miow] --version = "0.3" - --[target."cfg(windows)".dependencies.winapi] +-[target."cfg(windows)".dependencies.windows-sys] +-version = "0.48" +-features = [ +- "Win32_Foundation", +- "Win32_System_Console", +-] +diff --git a/vendor/console/Cargo.toml b/vendor/console/Cargo.toml +index 85849e16..7c7be5a 100644 +--- a/vendor/console/Cargo.toml ++++ b/vendor/console/Cargo.toml +@@ -59,14 +59,3 @@ default = [ + ] + windows-console-colors = ["ansi-parsing"] + +-[target."cfg(windows)".dependencies.encode_unicode] -version = "0.3" --features = ["winerror"] -diff --git a/vendor/concolor-query/Cargo.toml b/vendor/concolor-query/Cargo.toml -index a25ce89..c578c4c 100644 ---- a/vendor/concolor-query/Cargo.toml -+++ b/vendor/concolor-query/Cargo.toml -@@ -33,10 +33,3 @@ keywords = [ - categories = ["command-line-interface"] - license = "MIT OR Apache-2.0" - repository = "https://github.com/rust-cli/concolor" - -[target."cfg(windows)".dependencies.windows-sys] -version = "0.45.0" -features = [ +- "Win32_Foundation", - "Win32_System_Console", +- "Win32_Storage_FileSystem", +- "Win32_UI_Input_KeyboardAndMouse", +-] +diff --git a/vendor/ctrlc/Cargo.toml b/vendor/ctrlc/Cargo.toml +index bb27f1b..93d7d7e 100644 +--- a/vendor/ctrlc/Cargo.toml ++++ b/vendor/ctrlc/Cargo.toml +@@ -56,23 +56,6 @@ features = [ + ] + default-features = false + +-[target."cfg(windows)".dependencies.windows-sys] +-version = "0.48" +-features = [ - "Win32_Foundation", +- "Win32_System_Threading", +- "Win32_Security", +- "Win32_System_Console", -] +- +-[target."cfg(windows)".dev-dependencies.windows-sys] +-version = "0.48" +-features = [ +- "Win32_Storage_FileSystem", +- "Win32_Foundation", +- "Win32_System_IO", +- "Win32_System_Console", +-] + + [badges.maintenance] + status = "passively-maintained" diff --git a/vendor/curl-sys/Cargo.toml b/vendor/curl-sys/Cargo.toml -index 04b9800..4a4968d 100644 +index 624fabf..c66bbba 100644 --- a/vendor/curl-sys/Cargo.toml +++ b/vendor/curl-sys/Cargo.toml -@@ -73,16 +73,6 @@ zlib-ng-compat = [ - version = "0.9" +@@ -73,13 +73,6 @@ zlib-ng-compat = [ + version = "0.9.64" optional = true -[target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg] -version = "0.2" - --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = [ -- "winsock2", -- "ws2def", --] +-[target."cfg(windows)".dependencies.windows-sys] +-version = "0.48" +-features = ["Win32_Networking_WinSock"] - [badges.appveyor] repository = "alexcrichton/curl-rust" @@ -225,6 +294,17 @@ index bfb59f4..d9f6854 100644 [badges.appveyor] repository = "alexcrichton/curl-rust" +diff --git a/vendor/dirs-sys-0.3.7/Cargo.toml b/vendor/dirs-sys-0.3.7/Cargo.toml +index 9951d24..0a86f4d 100644 +--- a/vendor/dirs-sys-0.3.7/Cargo.toml ++++ b/vendor/dirs-sys-0.3.7/Cargo.toml +@@ -22,6 +22,3 @@ version = "0.4" + default-features = false + [target."cfg(unix)".dependencies.libc] + version = "0.2" +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = ["knownfolders", "objbase", "shlobj", "winbase", "winerror"] diff --git a/vendor/dirs-sys-next/Cargo.toml b/vendor/dirs-sys-next/Cargo.toml index e9d8d0c..acb2eb7 100644 --- a/vendor/dirs-sys-next/Cargo.toml @@ -238,73 +318,61 @@ index e9d8d0c..acb2eb7 100644 -features = ["knownfolders", "objbase", "shlobj", "winbase", "winerror"] [badges.maintenance] status = "as-is" -diff --git a/vendor/dirs-sys/Cargo.toml b/vendor/dirs-sys/Cargo.toml -index 6c41007..4d79134 100644 ---- a/vendor/dirs-sys/Cargo.toml -+++ b/vendor/dirs-sys/Cargo.toml -@@ -23,6 +23,3 @@ version = "0.4" - default-features = false - [target."cfg(unix)".dependencies.libc] - version = "0.2" --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = ["knownfolders", "objbase", "shlobj", "winbase", "winerror"] diff --git a/vendor/errno/Cargo.toml b/vendor/errno/Cargo.toml -index bf54b1f..7507a31 100644 +index e1d0bf5..60eeb86 100644 --- a/vendor/errno/Cargo.toml +++ b/vendor/errno/Cargo.toml -@@ -41,9 +41,3 @@ version = "0.2" - [target."cfg(unix)".dependencies.libc] +@@ -41,9 +41,3 @@ default-features = false version = "0.2" + default-features = false -[target."cfg(windows)".dependencies.windows-sys] --version = "0.48" +-version = "0.52" -features = [ - "Win32_Foundation", - "Win32_System_Diagnostics_Debug", -] diff --git a/vendor/fd-lock/Cargo.toml b/vendor/fd-lock/Cargo.toml -index d995177..b759d87 100644 +index 8d0b8f0..eb1ef13 100644 --- a/vendor/fd-lock/Cargo.toml +++ b/vendor/fd-lock/Cargo.toml @@ -43,11 +43,3 @@ version = "3.0.8" [target."cfg(unix)".dependencies.rustix] - version = "0.37.0" + version = "0.38.0" features = ["fs"] - -[target."cfg(windows)".dependencies.windows-sys] --version = "0.45.0" +-version = "0.48.0" -features = [ - "Win32_Foundation", - "Win32_Storage_FileSystem", - "Win32_System_IO", -] diff --git a/vendor/filetime/Cargo.toml b/vendor/filetime/Cargo.toml -index 8547ec3..4ecd973 100644 +index 0540ffb..2c65fa5 100644 --- a/vendor/filetime/Cargo.toml +++ b/vendor/filetime/Cargo.toml -@@ -38,10 +38,3 @@ version = "0.2.9" +@@ -38,10 +38,3 @@ version = "0.4.1" [target."cfg(unix)".dependencies.libc] version = "0.2.27" - -[target."cfg(windows)".dependencies.windows-sys] --version = "0.48.0" +-version = "0.52.0" -features = [ - "Win32_Foundation", - "Win32_Storage_FileSystem", -] diff --git a/vendor/gix-sec/Cargo.toml b/vendor/gix-sec/Cargo.toml -index 44a3e884..041a6bb 100644 +index cf452ec..c405340 100644 --- a/vendor/gix-sec/Cargo.toml +++ b/vendor/gix-sec/Cargo.toml -@@ -61,16 +61,3 @@ serde = [ - +@@ -58,15 +58,3 @@ serde = [ [target."cfg(not(windows))".dependencies.libc] version = "0.2.123" -- + -[target."cfg(windows)".dependencies.gix-path] --version = "^0.8.0" +-version = "^0.10.1" - -[target."cfg(windows)".dependencies.windows] -version = "0.48" @@ -331,7 +399,7 @@ index cd608b1..eecfb89 100644 - "Win32_UI_Shell", -] diff --git a/vendor/iana-time-zone/Cargo.toml b/vendor/iana-time-zone/Cargo.toml -index 5cdc175..271a062 100644 +index e06c705..572a8fd 100644 --- a/vendor/iana-time-zone/Cargo.toml +++ b/vendor/iana-time-zone/Cargo.toml @@ -52,7 +52,3 @@ version = "0.1.5" @@ -343,60 +411,20 @@ index 5cdc175..271a062 100644 -version = "0.48.0" -features = ["Globalization"] diff --git a/vendor/ignore/Cargo.toml b/vendor/ignore/Cargo.toml -index b397dcf..2022a87 100644 +index 60ab32a..bf4109f 100644 --- a/vendor/ignore/Cargo.toml +++ b/vendor/ignore/Cargo.toml -@@ -64,6 +64,3 @@ version = "0.5.0" - +@@ -77,5 +77,3 @@ version = "0.5.8" [features] - simd-accel = ["globset/simd-accel"] -- + simd-accel = [] + -[target."cfg(windows)".dependencies.winapi-util] -version = "0.1.2" -diff --git a/vendor/io-close/Cargo.toml b/vendor/io-close/Cargo.toml -index 5e36444..82f9ce5 100644 ---- a/vendor/io-close/Cargo.toml -+++ b/vendor/io-close/Cargo.toml -@@ -28,6 +28,3 @@ optional = true - version = "3.1.0" - [target."cfg(unix)".dependencies.libc] - version = "0.2.80" --[target."cfg(windows)".dependencies.winapi] --version = "0.3.9" --features = ["handleapi", "std", "winsock2"] -diff --git a/vendor/io-lifetimes/Cargo.toml b/vendor/io-lifetimes/Cargo.toml -index b9ed913..0fd300a 100644 ---- a/vendor/io-lifetimes/Cargo.toml -+++ b/vendor/io-lifetimes/Cargo.toml -@@ -43,7 +43,6 @@ optional = true - close = [ - "libc", - "hermit-abi", -- "windows-sys", - ] - default = ["close"] - -@@ -85,15 +84,3 @@ optional = true - [target."cfg(target_os = \"hermit\")".dependencies.hermit-abi] - version = "0.3" - optional = true -- --[target."cfg(windows)".dependencies.windows-sys] --version = "0.48.0" --features = [ -- "Win32_Foundation", -- "Win32_Storage_FileSystem", -- "Win32_Networking_WinSock", -- "Win32_Security", -- "Win32_System_IO", -- "Win32_System_Threading", --] --optional = true diff --git a/vendor/is-terminal/Cargo.toml b/vendor/is-terminal/Cargo.toml -index 7957a9c..0ab2ae1 100644 +index 08933a7..b4b0482 100644 --- a/vendor/is-terminal/Cargo.toml +++ b/vendor/is-terminal/Cargo.toml -@@ -53,14 +53,3 @@ features = ["termios"] +@@ -54,14 +54,3 @@ features = ["stdio"] [target."cfg(target_os = \"hermit\")".dependencies.hermit-abi] version = "0.3.0" @@ -411,26 +439,41 @@ index 7957a9c..0ab2ae1 100644 - -[target."cfg(windows)".dev-dependencies.tempfile] -version = "3" +diff --git a/vendor/libloading-0.7.4/Cargo.toml b/vendor/libloading-0.7.4/Cargo.toml +index 65168d5..03df764 100644 +--- a/vendor/libloading-0.7.4/Cargo.toml ++++ b/vendor/libloading-0.7.4/Cargo.toml +@@ -43,9 +43,3 @@ version = "1.1" + [target."cfg(unix)".dependencies.cfg-if] + version = "1" + +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = [ +- "errhandlingapi", +- "libloaderapi", +-] diff --git a/vendor/libloading/Cargo.toml b/vendor/libloading/Cargo.toml -index 65168d5..7785a7e 100644 +index 0165453..0dfc3c0 100644 --- a/vendor/libloading/Cargo.toml +++ b/vendor/libloading/Cargo.toml -@@ -42,10 +42,3 @@ version = "1.1" +@@ -42,11 +42,3 @@ version = "1.1" [target."cfg(unix)".dependencies.cfg-if] version = "1" - --[target."cfg(windows)".dependencies.winapi] --version = "0.3" +-[target."cfg(windows)".dependencies.windows-sys] +-version = "0.48" -features = [ -- "errhandlingapi", -- "libloaderapi", +- "Win32_Foundation", +- "Win32_System_Diagnostics_Debug", +- "Win32_System_LibraryLoader", -] diff --git a/vendor/libssh2-sys/Cargo.toml b/vendor/libssh2-sys/Cargo.toml -index 45f4a71..b0d3e26 100644 +index 45f4a71..516644c 100644 --- a/vendor/libssh2-sys/Cargo.toml +++ b/vendor/libssh2-sys/Cargo.toml -@@ -43,7 +43,6 @@ version = "1.0.25" +@@ -43,16 +43,8 @@ version = "1.0.25" version = "0.3.11" [features] @@ -438,18 +481,56 @@ index 45f4a71..b0d3e26 100644 vendored-openssl = ["openssl-sys/vendored"] zlib-ng-compat = ["libz-sys/zlib-ng"] -@@ -52,7 +51,3 @@ version = "0.2" - +-[target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg] +-version = "0.2" +- [target."cfg(unix)".dependencies.openssl-sys] version = "0.9.35" - -[target."cfg(windows)".dependencies.openssl-sys] -version = "0.9.35" -optional = true -diff --git a/vendor/nu-ansi-term/Cargo.toml b/vendor/nu-ansi-term/Cargo.toml +diff --git a/vendor/mio/Cargo.toml b/vendor/mio/Cargo.toml +index 42e28d0..b689d7b 100644 +--- a/vendor/mio/Cargo.toml ++++ b/vendor/mio/Cargo.toml +@@ -102,8 +102,6 @@ default = ["log"] + net = [] + os-ext = [ + "os-poll", +- "windows-sys/Win32_System_Pipes", +- "windows-sys/Win32_Security", + ] + os-poll = [] + +@@ -116,12 +114,3 @@ version = "0.11.0" + [target."cfg(unix)".dependencies.libc] + version = "0.2.121" + +-[target."cfg(windows)".dependencies.windows-sys] +-version = "0.48" +-features = [ +- "Win32_Foundation", +- "Win32_Networking_WinSock", +- "Win32_Storage_FileSystem", +- "Win32_System_IO", +- "Win32_System_WindowsProgramming", +-] +diff --git a/vendor/native-tls/Cargo.toml b/vendor/native-tls/Cargo.toml +index a059236..d36b44b 100644 +--- a/vendor/native-tls/Cargo.toml ++++ b/vendor/native-tls/Cargo.toml +@@ -61,6 +61,3 @@ version = "0.1" + + [target."cfg(not(any(target_os = \"windows\", target_os = \"macos\", target_os = \"ios\")))".dependencies.openssl-sys] + version = "0.9.55" +- +-[target."cfg(target_os = \"windows\")".dependencies.schannel] +-version = "0.1.17" +diff --git a/vendor/nu-ansi-term-0.46.0/Cargo.toml b/vendor/nu-ansi-term-0.46.0/Cargo.toml index 209e055..aa40f02 100644 ---- a/vendor/nu-ansi-term/Cargo.toml -+++ b/vendor/nu-ansi-term/Cargo.toml +--- a/vendor/nu-ansi-term-0.46.0/Cargo.toml ++++ b/vendor/nu-ansi-term-0.46.0/Cargo.toml @@ -45,13 +45,3 @@ version = "1.0.39" [features] @@ -464,10 +545,10 @@ index 209e055..aa40f02 100644 - "handleapi", - "processenv", -] -diff --git a/vendor/opener/Cargo.toml b/vendor/opener/Cargo.toml +diff --git a/vendor/opener-0.5.2/Cargo.toml b/vendor/opener-0.5.2/Cargo.toml index 8d91b5e..2d7313b 100644 ---- a/vendor/opener/Cargo.toml -+++ b/vendor/opener/Cargo.toml +--- a/vendor/opener-0.5.2/Cargo.toml ++++ b/vendor/opener-0.5.2/Cargo.toml @@ -32,10 +32,6 @@ version = "0.9" [target."cfg(target_os = \"linux\")".dependencies.bstr] version = "1" @@ -479,6 +560,33 @@ index 8d91b5e..2d7313b 100644 [badges.appveyor] branch = "master" repository = "Seeker14491/opener" +diff --git a/vendor/opener/Cargo.toml b/vendor/opener/Cargo.toml +index 79b4be9..69cc269 100644 +--- a/vendor/opener/Cargo.toml ++++ b/vendor/opener/Cargo.toml +@@ -40,8 +40,6 @@ version = "0.9" + reveal = [ + "dep:url", + "dep:dbus", +- "winapi/shtypes", +- "winapi/objbase", + ] + + [target."cfg(target_os = \"linux\")".dependencies.bstr] +@@ -56,13 +54,6 @@ optional = true + version = "2" + optional = true + +-[target."cfg(windows)".dependencies.normpath] +-version = "1" +- +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = ["shellapi"] +- + [badges.appveyor] + branch = "master" + repository = "Seeker14491/opener" diff --git a/vendor/os_info/Cargo.toml b/vendor/os_info/Cargo.toml index 52a062f..e1f347b 100644 --- a/vendor/os_info/Cargo.toml @@ -502,84 +610,44 @@ index 52a062f..e1f347b 100644 - "winerror", - "winreg", -] -diff --git a/vendor/parking_lot_core-0.8.6/Cargo.toml b/vendor/parking_lot_core-0.8.6/Cargo.toml -index 6981516..9fb8bd2 100644 ---- a/vendor/parking_lot_core-0.8.6/Cargo.toml -+++ b/vendor/parking_lot_core-0.8.6/Cargo.toml -@@ -60,15 +60,3 @@ version = "0.2.8" - - [target."cfg(unix)".dependencies.libc] - version = "0.2.95" -- --[target."cfg(windows)".dependencies.winapi] --version = "0.3.9" --features = [ -- "winnt", -- "ntstatus", -- "minwindef", -- "winerror", -- "winbase", -- "errhandlingapi", -- "handleapi", --] diff --git a/vendor/parking_lot_core/Cargo.toml b/vendor/parking_lot_core/Cargo.toml -index 361186b..e00c191 100644 +index 83d9f23..dbe1534 100644 --- a/vendor/parking_lot_core/Cargo.toml +++ b/vendor/parking_lot_core/Cargo.toml -@@ -57,12 +57,3 @@ version = "0.2.8" +@@ -61,6 +61,3 @@ version = "0.4" [target."cfg(unix)".dependencies.libc] version = "0.2.95" - --[target."cfg(windows)".dependencies.windows-sys] --version = "0.45.0" --features = [ -- "Win32_Foundation", -- "Win32_System_LibraryLoader", -- "Win32_System_SystemServices", -- "Win32_System_WindowsProgramming", --] -diff --git a/vendor/pretty_assertions/Cargo.toml b/vendor/pretty_assertions/Cargo.toml -index f8370f7..4531652 100644 ---- a/vendor/pretty_assertions/Cargo.toml -+++ b/vendor/pretty_assertions/Cargo.toml -@@ -42,9 +42,3 @@ alloc = [] - default = ["std"] - std = [] - unstable = [] -- --[target."cfg(windows)".dependencies.ctor] --version = "0.1.9" -- --[target."cfg(windows)".dependencies.output_vt100] --version = "0.1.2" -diff --git a/vendor/remove_dir_all/Cargo.toml b/vendor/remove_dir_all/Cargo.toml -index a847288..aaf637f 100644 ---- a/vendor/remove_dir_all/Cargo.toml -+++ b/vendor/remove_dir_all/Cargo.toml -@@ -23,6 +23,3 @@ license = "MIT/Apache-2.0" - repository = "https://github.com/XAMPPRocky/remove_dir_all.git" - [dev-dependencies.doc-comment] +-[target."cfg(windows)".dependencies.windows-targets] +-version = "0.48.0" +diff --git a/vendor/reqwest/Cargo.toml b/vendor/reqwest/Cargo.toml +index bca6039..c735e2f 100644 +--- a/vendor/reqwest/Cargo.toml ++++ b/vendor/reqwest/Cargo.toml +@@ -443,6 +443,3 @@ features = ["serde-serialize"] + + [target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-test] version = "0.3" --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = ["std", "errhandlingapi", "winerror", "fileapi", "winbase"] +- +-[target."cfg(windows)".dependencies.winreg] +-version = "0.10" diff --git a/vendor/rustix/Cargo.toml b/vendor/rustix/Cargo.toml -index c928526..6b7cff3 100644 +index f05faec..970c4a9 100644 --- a/vendor/rustix/Cargo.toml +++ b/vendor/rustix/Cargo.toml -@@ -233,20 +233,3 @@ package = "errno" +@@ -252,20 +252,3 @@ package = "errno" [target."cfg(any(target_os = \"android\", target_os = \"linux\"))".dependencies.once_cell] version = "1.5.2" optional = true - -[target."cfg(windows)".dependencies.libc_errno] --version = "0.3.1" +-version = "0.3.8" -default-features = false -package = "errno" - -[target."cfg(windows)".dependencies.windows-sys] --version = "0.48.0" +-version = "0.52.0" -features = [ - "Win32_Foundation", - "Win32_Networking_WinSock", @@ -600,10 +668,10 @@ index 4f66820..11ef472 100644 -[target."cfg(windows)".dependencies.winapi-util] -version = "0.1.1" diff --git a/vendor/snapbox/Cargo.toml b/vendor/snapbox/Cargo.toml -index a9a74e1..8b0bf63 100644 +index 2cb92d6..52e12d2 100644 --- a/vendor/snapbox/Cargo.toml +++ b/vendor/snapbox/Cargo.toml -@@ -161,7 +157,6 @@ cmd = [ +@@ -161,7 +161,6 @@ cmd = [ "dep:os_pipe", "dep:wait-timeout", "dep:libc", @@ -611,24 +679,23 @@ index a9a74e1..8b0bf63 100644 ] color = [ "dep:anstream", -@@ -196,8 +190,3 @@ structured-data = ["dep:serde_json"] +@@ -199,8 +198,3 @@ structured-data = ["dep:serde_json"] [target."cfg(unix)".dependencies.libc] version = "0.2.137" optional = true - -[target."cfg(windows)".dependencies.windows-sys] --version = "0.45.0" +-version = "0.48.0" -features = ["Win32_Foundation"] -optional = true diff --git a/vendor/socket2/Cargo.toml b/vendor/socket2/Cargo.toml -index 3f1578c..bdac898 100644 +index ec3bc6a..59068eb 100644 --- a/vendor/socket2/Cargo.toml +++ b/vendor/socket2/Cargo.toml -@@ -58,11 +58,3 @@ all = [] - +@@ -59,10 +59,3 @@ all = [] [target."cfg(unix)".dependencies.libc] - version = "0.2.139" -- + version = "0.2.149" + -[target."cfg(windows)".dependencies.winapi] -version = "0.3.9" -features = [ @@ -654,10 +721,10 @@ index 160cbc0..ba02aac 100644 - "processthreadsapi", - "minwindef", -] -diff --git a/vendor/sysinfo/Cargo.toml b/vendor/sysinfo/Cargo.toml +diff --git a/vendor/sysinfo-0.26.7/Cargo.toml b/vendor/sysinfo-0.26.7/Cargo.toml index f8719a4..deb2e40 100644 ---- a/vendor/sysinfo/Cargo.toml -+++ b/vendor/sysinfo/Cargo.toml +--- a/vendor/sysinfo-0.26.7/Cargo.toml ++++ b/vendor/sysinfo-0.26.7/Cargo.toml @@ -60,41 +60,3 @@ version = "1.0" [target."cfg(not(any(target_os = \"unknown\", target_arch = \"wasm32\")))".dependencies.libc] @@ -700,17 +767,66 @@ index f8719a4..deb2e40 100644 - "shellapi", - "std", -] +diff --git a/vendor/sysinfo/Cargo.toml b/vendor/sysinfo/Cargo.toml +index 2a21a72..d526f46 100644 +--- a/vendor/sysinfo/Cargo.toml ++++ b/vendor/sysinfo/Cargo.toml +@@ -75,44 +75,3 @@ version = "1.0" + + [target."cfg(not(any(target_os = \"unknown\", target_arch = \"wasm32\")))".dependencies.libc] + version = "^0.2.144" +- +-[target."cfg(windows)".dependencies.ntapi] +-version = "0.4" +- +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3.9" +-features = [ +- "errhandlingapi", +- "fileapi", +- "handleapi", +- "heapapi", +- "ifdef", +- "ioapiset", +- "minwindef", +- "pdh", +- "psapi", +- "synchapi", +- "sysinfoapi", +- "winbase", +- "winerror", +- "winioctl", +- "winnt", +- "oleauto", +- "wbemcli", +- "rpcdce", +- "combaseapi", +- "objidl", +- "powerbase", +- "netioapi", +- "lmcons", +- "lmaccess", +- "lmapibuf", +- "memoryapi", +- "ntlsa", +- "securitybaseapi", +- "shellapi", +- "std", +- "iphlpapi", +- "winsock2", +- "sddl", +-] diff --git a/vendor/tempfile/Cargo.toml b/vendor/tempfile/Cargo.toml -index 85006d8..013e986 100644 +index 84ea801..bd37853 100644 --- a/vendor/tempfile/Cargo.toml +++ b/vendor/tempfile/Cargo.toml @@ -50,10 +50,3 @@ features = ["fs"] [target."cfg(target_os = \"redox\")".dependencies.redox_syscall] - version = "0.3" + version = "0.4" - -[target."cfg(windows)".dependencies.windows-sys] --version = "0.45" +-version = "0.48" -features = [ - "Win32_Storage_FileSystem", - "Win32_Foundation", @@ -744,12 +860,12 @@ index dbdb6e8..8edc73e 100644 -[target."cfg(windows)".dependencies.winapi-util] -version = "0.1.3" diff --git a/vendor/terminal_size/Cargo.toml b/vendor/terminal_size/Cargo.toml -index 9f31164..6d2d6a5 100644 +index f810025..0fbe3a1 100644 --- a/vendor/terminal_size/Cargo.toml +++ b/vendor/terminal_size/Cargo.toml @@ -30,10 +30,3 @@ repository = "https://github.com/eminence/terminal-size" [target."cfg(not(windows))".dependencies.rustix] - version = "0.37.0" + version = "0.38.0" features = ["termios"] - -[target."cfg(windows)".dependencies.windows-sys] @@ -771,42 +887,88 @@ index d248f4d..9bd9f37 100644 -features = ["handleapi", "processenv", "wincon", "winbase"] [badges.cirrus-ci] repository = "JohnTitor/termize" +diff --git a/vendor/tokio-native-tls/Cargo.toml b/vendor/tokio-native-tls/Cargo.toml +index 76be3d3..3ada811 100644 +--- a/vendor/tokio-native-tls/Cargo.toml ++++ b/vendor/tokio-native-tls/Cargo.toml +@@ -76,20 +76,3 @@ version = "0.10" + + [target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dev-dependencies.security-framework] + version = "0.2" +- +-[target."cfg(windows)".dev-dependencies.schannel] +-version = "0.1" +- +-[target."cfg(windows)".dev-dependencies.winapi] +-version = "0.3" +-features = [ +- "lmcons", +- "basetsd", +- "minwinbase", +- "minwindef", +- "ntdef", +- "sysinfoapi", +- "timezoneapi", +- "wincrypt", +- "winerror", +-] diff --git a/vendor/tokio/Cargo.toml b/vendor/tokio/Cargo.toml -index 11ec0c0..bf2ad39 100644 +index da1e4d1..55afa86 100644 --- a/vendor/tokio/Cargo.toml +++ b/vendor/tokio/Cargo.toml -@@ -95,11 +95,11 @@ full = ["fs", "io-util", "io-std", "macros", "net", "parking_lot", "process", "r - io-std = [] - io-util = ["memchr", "bytes"] - macros = ["tokio-macros"] --net = ["libc", "mio/os-poll", "mio/os-util", "mio/tcp", "mio/udp", "mio/uds", "winapi/namedpipeapi"] --process = ["bytes", "once_cell", "libc", "mio/os-poll", "mio/os-util", "mio/uds", "signal-hook-registry", "winapi/threadpoollegacyapiset"] -+net = ["libc", "mio/os-poll", "mio/os-util", "mio/tcp", "mio/udp", "mio/uds"] -+process = ["bytes", "once_cell", "libc", "mio/os-poll", "mio/os-util", "mio/uds", "signal-hook-registry"] +@@ -122,11 +122,6 @@ net = [ + "mio/os-ext", + "mio/net", + "socket2", +- "windows-sys/Win32_Foundation", +- "windows-sys/Win32_Security", +- "windows-sys/Win32_Storage_FileSystem", +- "windows-sys/Win32_System_Pipes", +- "windows-sys/Win32_System_SystemServices", + ] + process = [ + "bytes", +@@ -135,9 +130,6 @@ process = [ + "mio/os-ext", + "mio/net", + "signal-hook-registry", +- "windows-sys/Win32_Foundation", +- "windows-sys/Win32_System_Threading", +- "windows-sys/Win32_System_WindowsProgramming", + ] rt = [] - rt-multi-thread = ["num_cpus", "rt"] --signal = ["once_cell", "libc", "mio/os-poll", "mio/uds", "mio/os-util", "signal-hook-registry", "winapi/consoleapi"] -+signal = ["once_cell", "libc", "mio/os-poll", "mio/uds", "mio/os-util", "signal-hook-registry"] + rt-multi-thread = [ +@@ -150,8 +142,6 @@ signal = [ + "mio/net", + "mio/os-ext", + "signal-hook-registry", +- "windows-sys/Win32_Foundation", +- "windows-sys/Win32_System_Console", + ] + stats = [] sync = [] - test-util = [] - time = [] -@@ -123,9 +123,3 @@ version = "0.2.42" - - [target."cfg(unix)".dev-dependencies.nix] - version = "0.22.0" --[target."cfg(windows)".dependencies.winapi] --version = "0.3.8" +@@ -217,14 +207,3 @@ features = [ + "socket", + ] + default-features = false +- +-[target."cfg(windows)".dependencies.windows-sys] +-version = "0.48" -optional = true --default-features = false --[target."cfg(windows)".dev-dependencies.ntapi] --version = "0.3.6" +- +-[target."cfg(windows)".dev-dependencies.windows-sys] +-version = "0.48" +-features = [ +- "Win32_Foundation", +- "Win32_Security_Authorization", +-] diff --git a/vendor/uuid/Cargo.toml b/vendor/uuid/Cargo.toml -index b783688..4e98553 100644 +index b806036..4094678 100644 --- a/vendor/uuid/Cargo.toml +++ b/vendor/uuid/Cargo.toml -@@ -180,10 +180,6 @@ package = "wasm-bindgen" - [target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-test] - version = "0.3" +@@ -185,10 +185,6 @@ version = "0.3" + version = "0.2" + package = "wasm-bindgen" -[target."cfg(windows)".dev-dependencies.windows-sys] -version = "0.48.0" @@ -816,7 +978,7 @@ index b783688..4e98553 100644 repository = "uuid-rs/uuid" diff --git a/vendor/walkdir/Cargo.toml b/vendor/walkdir/Cargo.toml -index 7db9263..2a9b56f 100644 +index 4c29a20..725e320 100644 --- a/vendor/walkdir/Cargo.toml +++ b/vendor/walkdir/Cargo.toml @@ -39,9 +39,6 @@ version = "1.0.1" diff --git a/debian/patches/series b/debian/patches/series index 95572141b..444231604 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,78 +1,48 @@ -# Cargo patches -c-2002_disable-net-tests.patch -c-2003-workaround-qemu-vfork-command-not-found.patch - -c-2200-workaround-x32-test.patch -c-disable-fs-specific-test.patch -c-0003-tests-add-missing-cross-disabled-checks.patch - -# Patches for upstream - -# pending, or forwarded -u-reproducible-build.patch -u-ignore-endian-big-diff.patch -u-fix-get-toml-when-test.patch -u-disable-fp-precision-test-on-i386.patch -u-riscv-disable-unpacked-split-debuginfo.patch -u-profiler.patch -u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch - -# not forwarded, or forwarded but unlikely to be merged -u-ignore-ppc-hangs.patch -u-rustc-llvm-cross-flags.patch -#u-allow-system-compiler-rt.patch - -# Debian-specific patches, not suitable for upstream -d-fix-rustix-outline.patch -d-disable-download-tests.patch - -## Patches needed by debian/prune-unused-deps, for building bootstrap -d-0000-ignore-removed-submodules.patch -d-0001-pkg-config-no-special-snowflake.patch -d-0002-mdbook-strip-embedded-libs.patch -d-0003-cc-psm-rebuild-wasm32.patch -#d-0004-clippy-feature-sync.patch -d-0005-no-jemalloc.patch -# cargo -d-0010-cargo-remove-vendored-c-crates.patch -d-0011-cargo-remove-nghttp2.patch -d-0012-cargo-always-return-dev-channel.patch - -## Patches to the build process, including doc path tweaks -## Should not change resulting rustc behaviour -d-bootstrap-rustflags.patch -d-remove-arm-privacy-breaches.patch -d-bootstrap-install-symlinks.patch -d-bootstrap-disable-git.patch -d-bootstrap-no-assume-tools.patch -d-bootstrap-cargo-doc-paths.patch -d-bootstrap-use-local-css.patch -d-bootstrap-old-cargo-compat.patch -d-bootstrap-custom-debuginfo-path.patch -d-bootstrap-permit-symlink-in-docs.patch -d-test-ignore-avx-44056.patch -d-bootstrap-cargo-check-cfg.patch -d-armel-fix-lldb.patch - -# Work around for some porterboxes, keep this commented -#d-test-host-duplicates.patch -# Experimental patch not yet working -#d-bootstrap-use-system-compiler-rt.patch - -## Patches to rustc behaviour, including path lookup tweaks -d-rust-gdb-paths -d-rust-lldb-paths -d-rustc-add-soname.patch -d-rustc-fix-mips64el-bootstrap.patch -d-rustc-windows-ssp.patch -d-rustc-i686-baseline.patch -# Experimental patch not yet working -#d-rustc-prefer-dynamic.patch -d-rustdoc-disable-embedded-fonts.patch - -# cherry-picked from ubuntu -ubuntu-disable-ppc64el-asm-tests.patch -ubuntu-ignore-arm-doctest.patch -d-0020-remove-windows-dependencies.patch -d-0021-vendor-remove-windows-dependencies.patch -c-update-libgit2.patch +cargo/c-2002_disable-net-tests.patch +cargo/c-2003-workaround-qemu-vfork-command-not-found.patch +cargo/c-2200-workaround-x32-test.patch +cargo/c-disable-fs-specific-test.patch +cargo/c-0003-tests-add-missing-cross-disabled-checks.patch +cargo/d-0012-cargo-always-return-dev-channel.patch +upstream/u-fix-get-toml-when-test.patch +upstream/u-riscv-disable-unpacked-split-debuginfo.patch +upstream/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch +upstream/u-ignore-ppc-hangs.patch +upstream/u-rustc-llvm-cross-flags.patch +upstream/u-hurd-tests.patch +upstream/d-ignore-test_arc_condvar_poison-ppc.patch +upstream/d-disable-download-tests.patch +prune/d-0000-ignore-removed-submodules.patch +prune/d-0001-pkg-config-no-special-snowflake.patch +prune/d-0002-mdbook-strip-embedded-libs.patch +prune/d-0005-no-jemalloc.patch +prune/d-0010-cargo-remove-vendored-c-crates.patch +prune/d-0011-cargo-remove-nghttp2.patch +prune/d-0020-remove-windows-dependencies.patch +prune/d-0021-vendor-remove-windows-dependencies.patch +vendor/u-hurd-backtrace.patch +vendor/u-hurd-gix-index.patch +vendor/u-hurd-gix-index-2.patch +vendor/u-hurd-libc.3.patch +vendor/u-hurd-libc.4.patch +vendor/u-hurd-libloading-0.7.4.patch +vendor/u-hurd-socket2.patch +vendor/d-0003-cc-psm-rebuild-wasm32.patch +build/d-bootstrap-rustflags.patch +build/d-bootstrap-install-symlinks.patch +build/d-bootstrap-disable-git.patch +build/d-bootstrap-no-assume-tools.patch +build/d-bootstrap-cargo-doc-paths.patch +build/d-bootstrap-use-local-css.patch +build/d-bootstrap-custom-debuginfo-path.patch +build/d-bootstrap-permit-symlink-in-docs.patch +build/d-test-ignore-avx-44056.patch +build/d-armel-fix-lldb.patch +behaviour/d-rust-gdb-paths.patch +behaviour/d-rust-lldb-paths.patch +behaviour/d-rustc-add-soname.patch +behaviour/d-rustc-windows-ssp.patch +behaviour/d-rustc-i686-baseline.patch +behaviour/d-rustdoc-disable-embedded-fonts.patch +ubuntu/ubuntu-disable-ppc64el-asm-tests.patch +ubuntu/ubuntu-ignore-arm-doctest.patch diff --git a/debian/patches/u-allow-system-compiler-rt.patch b/debian/patches/u-allow-system-compiler-rt.patch deleted file mode 100644 index 3bd874a5c..000000000 --- a/debian/patches/u-allow-system-compiler-rt.patch +++ /dev/null @@ -1,327 +0,0 @@ -Description: Support linking against system clang libs - Note: the above PR only covers the compiler_builtins crate, rustc itself also - needs patching as per below once that is accepted. -Forwarded: https://github.com/rust-lang-nursery/compiler-builtins/pull/296 ---- a/vendor/compiler_builtins/Cargo.toml -+++ b/vendor/compiler_builtins/Cargo.toml -@@ -43,7 +43,13 @@ - optional = true - - [features] --c = ["cc"] -+c-vendor = ["cc"] -+ -+# Link against system clang_rt.* libraries. -+# LLVM_CONFIG or CLANG (more reliable) must be set. -+c-system = [] -+ -+c = ["c-vendor"] - compiler-builtins = [] - default = ["compiler-builtins"] - mangled-names = [] ---- a/vendor/compiler_builtins/build.rs -+++ b/vendor/compiler_builtins/build.rs -@@ -37,7 +37,7 @@ - // mangling names though we assume that we're also in test mode so we don't - // build anything and we rely on the upstream implementation of compiler-rt - // functions -- if !cfg!(feature = "mangled-names") && cfg!(feature = "c") { -+ if !cfg!(feature = "mangled-names") && cfg!(any(feature = "c-vendor", feature = "c-system")) { - // Don't use a C compiler for these targets: - // - // * wasm32 - clang 8 for wasm is somewhat hard to come by and it's -@@ -47,8 +47,10 @@ - // compiler nor is cc-rs ready for compilation to riscv (at this - // time). This can probably be removed in the future - if !target.contains("wasm32") && !target.contains("nvptx") && !target.starts_with("riscv") { -- #[cfg(feature = "c")] -- c::compile(&llvm_target); -+ #[cfg(feature = "c-vendor")] -+ c_vendor::compile(&llvm_target); -+ #[cfg(feature = "c-system")] -+ c_system::compile(&llvm_target); - } - } - -@@ -70,17 +72,14 @@ - } - } - --#[cfg(feature = "c")] --mod c { -- extern crate cc; -- -+#[cfg(any(feature = "c-vendor", feature = "c-system"))] -+mod sources { - use std::collections::BTreeMap; - use std::env; -- use std::path::PathBuf; - -- struct Sources { -+ pub struct Sources { - // SYMBOL -> PATH TO SOURCE -- map: BTreeMap<&'static str, &'static str>, -+ pub map: BTreeMap<&'static str, &'static str>, - } - - impl Sources { -@@ -117,39 +116,11 @@ - } - } - -- /// Compile intrinsics from the compiler-rt C source code -- pub fn compile(llvm_target: &[&str]) { -+ pub fn get_sources(llvm_target: &[&str]) -> Sources { - let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap(); - let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap(); - let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap(); - let target_vendor = env::var("CARGO_CFG_TARGET_VENDOR").unwrap(); -- let cfg = &mut cc::Build::new(); -- -- cfg.warnings(false); -- -- if target_env == "msvc" { -- // Don't pull in extra libraries on MSVC -- cfg.flag("/Zl"); -- -- // Emulate C99 and C++11's __func__ for MSVC prior to 2013 CTP -- cfg.define("__func__", Some("__FUNCTION__")); -- } else { -- // Turn off various features of gcc and such, mostly copying -- // compiler-rt's build system already -- cfg.flag("-fno-builtin"); -- cfg.flag("-fvisibility=hidden"); -- cfg.flag("-ffreestanding"); -- // Avoid the following warning appearing once **per file**: -- // clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument] -- // -- // Note that compiler-rt's build system also checks -- // -- // `check_cxx_compiler_flag(-fomit-frame-pointer COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG)` -- // -- // in https://github.com/rust-lang/compiler-rt/blob/c8fbcb3/cmake/config-ix.cmake#L19. -- cfg.flag_if_supported("-fomit-frame-pointer"); -- cfg.define("VISIBILITY_HIDDEN", None); -- } - - let mut sources = Sources::new(); - sources.extend(&[ -@@ -411,6 +382,48 @@ - sources.remove(&["__aeabi_cdcmp", "__aeabi_cfcmp"]); - } - -+ sources -+ } -+} -+ -+#[cfg(feature = "c-vendor")] -+mod c_vendor { -+ extern crate cc; -+ -+ use std::env; -+ use std::path::PathBuf; -+ use sources; -+ -+ /// Compile intrinsics from the compiler-rt C source code -+ pub fn compile(llvm_target: &[&str]) { -+ let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap(); -+ let cfg = &mut cc::Build::new(); -+ cfg.warnings(false); -+ -+ if target_env == "msvc" { -+ // Don't pull in extra libraries on MSVC -+ cfg.flag("/Zl"); -+ -+ // Emulate C99 and C++11's __func__ for MSVC prior to 2013 CTP -+ cfg.define("__func__", Some("__FUNCTION__")); -+ } else { -+ // Turn off various features of gcc and such, mostly copying -+ // compiler-rt's build system already -+ cfg.flag("-fno-builtin"); -+ cfg.flag("-fvisibility=hidden"); -+ cfg.flag("-ffreestanding"); -+ // Avoid the following warning appearing once **per file**: -+ // clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument] -+ // -+ // Note that compiler-rt's build system also checks -+ // -+ // `check_cxx_compiler_flag(-fomit-frame-pointer COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG)` -+ // -+ // in https://github.com/rust-lang/compiler-rt/blob/c8fbcb3/cmake/config-ix.cmake#L19. -+ cfg.flag_if_supported("-fomit-frame-pointer"); -+ cfg.define("VISIBILITY_HIDDEN", None); -+ } -+ - // When compiling the C code we require the user to tell us where the - // source code is, and this is largely done so when we're compiling as - // part of rust-lang/rust we can use the same llvm-project repository as -@@ -423,6 +436,7 @@ - panic!("RUST_COMPILER_RT_ROOT={} does not exist", root.display()); - } - -+ let sources = sources::get_sources(llvm_target); - let src_dir = root.join("lib/builtins"); - for (sym, src) in sources.map.iter() { - let src = src_dir.join(src); -@@ -434,3 +448,103 @@ - cfg.compile("libcompiler-rt.a"); - } - } -+ -+#[cfg(feature = "c-system")] -+mod c_system { -+ use std::env; -+ use std::process::{Command, Output}; -+ use std::str; -+ use std::path::Path; -+ use sources; -+ -+ fn success_output(err: &str, cmd: &mut Command) -> Output { -+ let output = cmd.output().expect(err); -+ let status = output.status; -+ if !status.success() { -+ panic!("{}: {:?}", err, status.code()); -+ } -+ output -+ } -+ -+ // This can be obtained by adding the line: -+ // message(STATUS "All builtin supported architectures: ${ALL_BUILTIN_SUPPORTED_ARCH}") -+ // to the bottom of compiler-rt/cmake/builtin-config-ix.cmake, then running -+ // cmake and looking at the output. -+ const ALL_SUPPORTED_ARCHES : &'static str = "i386;x86_64;arm;armhf;armv6m;armv7m;armv7em;armv7;armv7s;armv7k;aarch64;hexagon;mips;mipsel;mips64;mips64el;powerpc64;powerpc64le;riscv32;riscv64;wasm32;wasm64"; -+ -+ // This function recreates the logic of getArchNameForCompilerRTLib, -+ // defined in clang/lib/Driver/ToolChain.cpp. -+ fn get_arch_name_for_compiler_rtlib() -> String { -+ let target = env::var("TARGET").unwrap(); -+ let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap(); -+ let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap(); -+ let r = match target_arch.as_str() { -+ "arm" => if target.ends_with("eabihf") && target_os != "windows" { -+ "armhf" -+ } else { -+ "arm" -+ }, -+ "x86" => if target_os == "android" { -+ "i686" -+ } else { -+ "i386" -+ }, -+ _ => target_arch.as_str(), -+ }; -+ r.to_string() -+ } -+ -+ /// Link against system clang runtime libraries -+ pub fn compile(llvm_target: &[&str]) { -+ let target = env::var("TARGET").unwrap(); -+ let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap(); -+ let compiler_rt_arch = get_arch_name_for_compiler_rtlib(); -+ -+ if ALL_SUPPORTED_ARCHES.split(";").find(|x| *x == compiler_rt_arch) == None { -+ return; -+ } -+ -+ if let Ok(clang) = env::var("CLANG") { -+ let output = success_output( -+ "failed to find clang's compiler-rt", -+ Command::new(clang) -+ .arg(format!("--target={}", target)) -+ .arg("--rtlib=compiler-rt") -+ .arg("--print-libgcc-file-name"), -+ ); -+ let fullpath = Path::new(str::from_utf8(&output.stdout).unwrap()); -+ let libpath = fullpath.parent().unwrap().display(); -+ let libname = fullpath -+ .file_stem() -+ .unwrap() -+ .to_str() -+ .unwrap() -+ .trim_start_matches("lib"); -+ println!("cargo:rustc-link-search=native={}", libpath); -+ println!("cargo:rustc-link-lib=static={}", libname); -+ } else if let Ok(llvm_config) = env::var("LLVM_CONFIG") { -+ // fallback if clang is not installed -+ let (subpath, libname) = match target_os.as_str() { -+ "linux" => ("linux", format!("clang_rt.builtins-{}", &compiler_rt_arch)), -+ "macos" => ("darwin", "clang_rt.builtins_osx_dynamic".to_string()), -+ _ => panic!("unsupported target os: {}", target_os), -+ }; -+ let cmd = format!("ls -1d $({} --libdir)/clang/*/lib/{}", llvm_config, subpath); -+ let output = success_output( -+ "failed to find clang's lib dir", -+ Command::new("sh").args(&["-ec", &cmd]), -+ ); -+ for search_dir in str::from_utf8(&output.stdout).unwrap().lines() { -+ println!("cargo:rustc-link-search=native={}", search_dir); -+ } -+ println!("cargo:rustc-link-lib=static={}", libname); -+ } else { -+ panic!("neither CLANG nor LLVM_CONFIG could be read"); -+ } -+ -+ let sources = sources::get_sources(llvm_target); -+ for (sym, _src) in sources.map.iter() { -+ println!("cargo:rustc-cfg={}=\"optimized-c\"", sym); -+ } -+ } -+} ---- a/src/bootstrap/compile.rs -+++ b/src/bootstrap/compile.rs -@@ -213,6 +213,7 @@ - emscripten: false, - }); - cargo.env("LLVM_CONFIG", llvm_config); -+ cargo.env("RUSTC_BUILD_SANITIZERS", "1"); - } - - cargo.arg("--features").arg(features) ---- a/src/librustc_asan/build.rs -+++ b/src/librustc_asan/build.rs -@@ -4,6 +4,9 @@ - use cmake::Config; - - fn main() { -+ if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) { -+ return; -+ } - if let Some(llvm_config) = env::var_os("LLVM_CONFIG") { - build_helper::restore_library_path(); - ---- a/src/librustc_lsan/build.rs -+++ b/src/librustc_lsan/build.rs -@@ -4,6 +4,9 @@ - use cmake::Config; - - fn main() { -+ if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) { -+ return; -+ } - if let Some(llvm_config) = env::var_os("LLVM_CONFIG") { - build_helper::restore_library_path(); - ---- a/src/librustc_msan/build.rs -+++ b/src/librustc_msan/build.rs -@@ -4,6 +4,9 @@ - use cmake::Config; - - fn main() { -+ if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) { -+ return; -+ } - if let Some(llvm_config) = env::var_os("LLVM_CONFIG") { - build_helper::restore_library_path(); - ---- a/src/librustc_tsan/build.rs -+++ b/src/librustc_tsan/build.rs -@@ -4,6 +4,9 @@ - use cmake::Config; - - fn main() { -+ if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) { -+ return; -+ } - if let Some(llvm_config) = env::var_os("LLVM_CONFIG") { - build_helper::restore_library_path(); - diff --git a/debian/patches/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch b/debian/patches/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch deleted file mode 100644 index b49347990..000000000 --- a/debian/patches/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch +++ /dev/null @@ -1,40 +0,0 @@ -From c230637b92a3101a5b18141b75f94ada2edee776 Mon Sep 17 00:00:00 2001 -From: Pietro Albini <pietro.albini@ferrous-systems.com> -Date: Fri, 15 Sep 2023 16:09:45 +0200 -Subject: [PATCH] avoid blessing cargo deps's source code in ui tests -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -FG: just the stderr part for now, the rest needs a newer cargo -Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> ---- - tests/ui/issues/issue-21763.stderr | 3 --- - 4 files changed, 20 insertions(+), 3 deletions(-) - -Index: rust/tests/ui/issues/issue-21763.stderr -=================================================================== ---- rust.orig/tests/ui/issues/issue-21763.stderr -+++ rust/tests/ui/issues/issue-21763.stderr -@@ -9,9 +9,6 @@ LL | foo::<HashMap<Rc<()>, Rc<()>>>( - = note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send` - note: required because it appears within the type `HashMap<Rc<()>, Rc<()>, RandomState>` - --> $HASHBROWN_SRC_LOCATION -- | --LL | pub struct HashMap<K, V, S = DefaultHashBuilder, A: Allocator + Clone = Global> { -- | ^^^^^^^ - note: required because it appears within the type `HashMap<Rc<()>, Rc<()>>` - --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL - note: required by a bound in `foo` -Index: rust/tests/ui/issues/issue-21763.rs -=================================================================== ---- rust.orig/tests/ui/issues/issue-21763.rs -+++ rust/tests/ui/issues/issue-21763.rs -@@ -1,6 +1,6 @@ - // Regression test for HashMap only impl'ing Send/Sync if its contents do - --// normalize-stderr-test: "\S+hashbrown-\S+" -> "$$HASHBROWN_SRC_LOCATION" -+// normalize-stderr-test: "\S+[\\/]hashbrown\S+" -> "$$HASHBROWN_SRC_LOCATION" - - use std::collections::HashMap; - use std::rc::Rc; diff --git a/debian/patches/u-disable-fp-precision-test-on-i386.patch b/debian/patches/u-disable-fp-precision-test-on-i386.patch deleted file mode 100644 index dad261349..000000000 --- a/debian/patches/u-disable-fp-precision-test-on-i386.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: liushuyu <liushuyu011@gmail.com> -Date: Tue, 25 Jul 2023 09:48:12 +0800 -Subject: [PATCH] core library: Disable fpmath tests for i386 ... - -This patch disables the floating-point epsilon test for i386 since -x87 registers are too imprecise and can't produce the expected -results. - -Forwarded: https://github.com/rust-lang/rust/pull/114042 ---- - library/core/src/num/f32.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: rust/library/core/src/num/f32.rs -=================================================================== ---- rust.orig/library/core/src/num/f32.rs -+++ rust/library/core/src/num/f32.rs -@@ -799,7 +799,7 @@ impl f32 { - /// let angle = std::f32::consts::PI; - /// - /// let abs_difference = (angle.to_degrees() - 180.0).abs(); -- /// -+ /// # #[cfg(not(target_arch = "x86"))] - /// assert!(abs_difference <= f32::EPSILON); - /// ``` - #[must_use = "this returns the result of the operation, \ diff --git a/debian/patches/u-ignore-endian-big-diff.patch b/debian/patches/u-ignore-endian-big-diff.patch deleted file mode 100644 index faa270173..000000000 --- a/debian/patches/u-ignore-endian-big-diff.patch +++ /dev/null @@ -1,70 +0,0 @@ -From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> -Date: Thu, 14 Jul 2022 13:17:37 +0200 -Subject: u-ignore-endian-big-diff - -Bug: https://github.com/rust-lang/rust/issues/89577 - -=================================================================== ---- - src/test/ui/consts/const-eval/ub-enum.rs | 1 + - src/test/ui/consts/const-eval/ub-int-array.rs | 1 + - src/test/ui/consts/const-eval/ub-nonnull.rs | 1 + - src/test/ui/consts/const-eval/ub-ref-ptr.rs | 1 + - src/test/ui/consts/const-eval/ub-uninhabit.rs | 1 + - src/test/ui/consts/const-eval/ub-wide-ptr.rs | 1 + - 6 files changed, 6 insertions(+) - -Index: rust/tests/ui/consts/const-eval/ub-enum.rs -=================================================================== ---- rust.orig/tests/ui/consts/const-eval/ub-enum.rs -+++ rust/tests/ui/consts/const-eval/ub-enum.rs -@@ -1,3 +1,4 @@ -+// ignore-test - // stderr-per-bitwidth - // Strip out raw byte dumps to make comparison platform-independent: - // normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -Index: rust/tests/ui/consts/const-eval/ub-int-array.rs -=================================================================== ---- rust.orig/tests/ui/consts/const-eval/ub-int-array.rs -+++ rust/tests/ui/consts/const-eval/ub-int-array.rs -@@ -1,3 +1,4 @@ -+// ignore-test - // stderr-per-bitwidth - //! Test the "array of int" fast path in validity checking, and in particular whether it - //! points at the right array element. -Index: rust/tests/ui/consts/const-eval/ub-nonnull.rs -=================================================================== ---- rust.orig/tests/ui/consts/const-eval/ub-nonnull.rs -+++ rust/tests/ui/consts/const-eval/ub-nonnull.rs -@@ -1,3 +1,4 @@ -+// ignore-test - // Strip out raw byte dumps to make comparison platform-independent: - // normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" - // normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP" -Index: rust/tests/ui/consts/const-eval/ub-ref-ptr.rs -=================================================================== ---- rust.orig/tests/ui/consts/const-eval/ub-ref-ptr.rs -+++ rust/tests/ui/consts/const-eval/ub-ref-ptr.rs -@@ -1,3 +1,4 @@ -+// ignore-test - // ignore-tidy-linelength - // Strip out raw byte dumps to make comparison platform-independent: - // normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" -Index: rust/tests/ui/consts/const-eval/ub-uninhabit.rs -=================================================================== ---- rust.orig/tests/ui/consts/const-eval/ub-uninhabit.rs -+++ rust/tests/ui/consts/const-eval/ub-uninhabit.rs -@@ -1,3 +1,4 @@ -+// ignore-test - // Strip out raw byte dumps to make comparison platform-independent: - // normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)" - // normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP" -Index: rust/tests/ui/consts/const-eval/ub-wide-ptr.rs -=================================================================== ---- rust.orig/tests/ui/consts/const-eval/ub-wide-ptr.rs -+++ rust/tests/ui/consts/const-eval/ub-wide-ptr.rs -@@ -1,3 +1,4 @@ -+// ignore-test - // ignore-tidy-linelength - #![allow(unused)] - diff --git a/debian/patches/u-profiler.patch b/debian/patches/u-profiler.patch deleted file mode 100644 index f83e4fcbc..000000000 --- a/debian/patches/u-profiler.patch +++ /dev/null @@ -1,131 +0,0 @@ -From d0b58f40a0e669897fafb614299d2a989997eda7 Mon Sep 17 00:00:00 2001 -From: Josh Stone <jistone@redhat.com> -Date: Tue, 25 Jul 2023 13:11:50 -0700 -Subject: [PATCH] Allow using external builds of the compiler-rt profile lib - -This changes the bootstrap config `target.*.profiler` from a plain bool -to also allow a string, which will be used as a path to the pre-built -profiling runtime for that target. Then `profiler_builtins/build.rs` -reads that in a `LLVM_PROFILER_RT_LIB` environment variable. ---- - config.example.toml | 6 ++++-- - library/profiler_builtins/build.rs | 6 ++++++ - src/bootstrap/compile.rs | 4 ++++ - src/bootstrap/config.rs | 30 ++++++++++++++++++++++++------ - 4 files changed, 38 insertions(+), 8 deletions(-) - ---- a/config.example.toml -+++ b/config.example.toml -@@ -745,8 +745,10 @@ changelog-seen = 2 - # This option will override the same option under [build] section. - #sanitizers = build.sanitizers (bool) - --# Build the profiler runtime for this target(required when compiling with options that depend --# on this runtime, such as `-C profile-generate` or `-C instrument-coverage`). -+# When true, build the profiler runtime for this target(required when compiling -+# with options that depend on this runtime, such as `-C profile-generate` or -+# `-C instrument-coverage`). This may also be given a path to an existing build -+# of the profiling runtime library from LLVM's compiler-rt. - # This option will override the same option under [build] section. - #profiler = build.profiler (bool) - ---- a/library/profiler_builtins/build.rs -+++ b/library/profiler_builtins/build.rs -@@ -6,6 +6,12 @@ use std::env; - use std::path::Path; - - fn main() { -+ println!("cargo:rerun-if-env-changed=LLVM_PROFILER_RT_LIB"); -+ if let Ok(rt) = env::var("LLVM_PROFILER_RT_LIB") { -+ println!("cargo:rustc-link-lib=static:+verbatim={rt}"); -+ return; -+ } -+ - let target = env::var("TARGET").expect("TARGET was not set"); - let cfg = &mut cc::Build::new(); - ---- a/src/bootstrap/compile.rs -+++ b/src/bootstrap/compile.rs -@@ -305,6 +305,10 @@ pub fn std_cargo(builder: &Builder<'_>, - cargo.env("MACOSX_DEPLOYMENT_TARGET", target); - } - -+ if let Some(path) = builder.config.profiler_path(target) { -+ cargo.env("LLVM_PROFILER_RT_LIB", path); -+ } -+ - // Determine if we're going to compile in optimized C intrinsics to - // the `compiler-builtins` crate. These intrinsics live in LLVM's - // `compiler-rt` repository, but our `src/llvm-project` submodule isn't ---- a/src/bootstrap/config.rs -+++ b/src/bootstrap/config.rs -@@ -467,7 +467,7 @@ pub struct Target { - pub linker: Option<PathBuf>, - pub ndk: Option<PathBuf>, - pub sanitizers: Option<bool>, -- pub profiler: Option<bool>, -+ pub profiler: Option<StringOrBool>, - pub rpath: Option<bool>, - pub crt_static: Option<bool>, - pub musl_root: Option<PathBuf>, -@@ -796,9 +796,9 @@ define_config! { - } - } - --#[derive(Debug, Deserialize)] -+#[derive(Clone, Debug, Deserialize)] - #[serde(untagged)] --enum StringOrBool { -+pub enum StringOrBool { - String(String), - Bool(bool), - } -@@ -809,6 +809,12 @@ impl Default for StringOrBool { - } - } - -+impl StringOrBool { -+ fn is_string_or_true(&self) -> bool { -+ matches!(self, Self::String(_) | Self::Bool(true)) -+ } -+} -+ - define_config! { - /// TOML representation of how the Rust build is configured. - struct Rust { -@@ -880,7 +886,7 @@ define_config! { - llvm_libunwind: Option<String> = "llvm-libunwind", - android_ndk: Option<String> = "android-ndk", - sanitizers: Option<bool> = "sanitizers", -- profiler: Option<bool> = "profiler", -+ profiler: Option<StringOrBool> = "profiler", - rpath: Option<bool> = "rpath", - crt_static: Option<bool> = "crt-static", - musl_root: Option<String> = "musl-root", -@@ -1744,12 +1750,24 @@ impl Config { - self.target_config.values().any(|t| t.sanitizers == Some(true)) || self.sanitizers - } - -+ pub fn profiler_path(&self, target: TargetSelection) -> Option<&str> { -+ match self.target_config.get(&target)?.profiler.as_ref()? { -+ StringOrBool::String(s) => Some(s), -+ StringOrBool::Bool(_) => None, -+ } -+ } -+ - pub fn profiler_enabled(&self, target: TargetSelection) -> bool { -- self.target_config.get(&target).map(|t| t.profiler).flatten().unwrap_or(self.profiler) -+ self.target_config -+ .get(&target) -+ .and_then(|t| t.profiler.as_ref()) -+ .map(StringOrBool::is_string_or_true) -+ .unwrap_or(self.profiler) - } - - pub fn any_profiler_enabled(&self) -> bool { -- self.target_config.values().any(|t| t.profiler == Some(true)) || self.profiler -+ self.target_config.values().any(|t| matches!(&t.profiler, Some(p) if p.is_string_or_true())) -+ || self.profiler - } - - pub fn rpath_enabled(&self, target: TargetSelection) -> bool { diff --git a/debian/patches/u-reproducible-build.patch b/debian/patches/u-reproducible-build.patch deleted file mode 100644 index f0823703e..000000000 --- a/debian/patches/u-reproducible-build.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Ximin Luo <infinity0@debian.org> -Date: Thu, 14 Jul 2022 13:17:37 +0200 -Subject: Don't split dwarf debug for a fully-reproducible build - -Bug: https://github.com/rust-lang/rust/issues/34902 ---- - compiler/rustc_llvm/build.rs | 5 +++++ - 1 file changed, 5 insertions(+) - -Index: rust/compiler/rustc_llvm/build.rs -=================================================================== ---- rust.orig/compiler/rustc_llvm/build.rs -+++ rust/compiler/rustc_llvm/build.rs -@@ -180,6 +180,11 @@ fn main() { - let mut cfg = cc::Build::new(); - cfg.warnings(false); - for flag in cxxflags.split_whitespace() { -+ // Split-dwarf gives unreproducible DW_AT_GNU_dwo_id so don't do it -+ if flag == "-gsplit-dwarf" { -+ continue; -+ } -+ - // Ignore flags like `-m64` when we're doing a cross build - if is_crossed && flag.starts_with("-m") { - continue; diff --git a/debian/patches/u-riscv-disable-unpacked-split-debuginfo.patch b/debian/patches/u-riscv-disable-unpacked-split-debuginfo.patch deleted file mode 100644 index c7dd9de9d..000000000 --- a/debian/patches/u-riscv-disable-unpacked-split-debuginfo.patch +++ /dev/null @@ -1,140 +0,0 @@ -Description: explicitly disable split unpacked debuginfo for now on riscv64, - it's broken and we don't want cargo to auto-enable it.. - https://github.com/llvm/llvm-project/issues/56642 - https://github.com/rust-lang/rust/issues/110224Z - -Index: rust/compiler/rustc_target/src/spec/riscv64gc_unknown_freebsd.rs -=================================================================== ---- rust.orig/compiler/rustc_target/src/spec/riscv64gc_unknown_freebsd.rs -+++ rust/compiler/rustc_target/src/spec/riscv64gc_unknown_freebsd.rs -@@ -1,4 +1,5 @@ --use crate::spec::{CodeModel, Target, TargetOptions}; -+use crate::spec::{CodeModel, SplitDebuginfo, Target, TargetOptions}; -+use std::borrow::Cow; - - pub fn target() -> Target { - Target { -@@ -12,6 +13,7 @@ pub fn target() -> Target { - features: "+m,+a,+f,+d,+c".into(), - llvm_abiname: "lp64d".into(), - max_atomic_width: Some(64), -+ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), - ..super::freebsd_base::opts() - }, - } -Index: rust/compiler/rustc_target/src/spec/riscv64gc_unknown_fuchsia.rs -=================================================================== ---- rust.orig/compiler/rustc_target/src/spec/riscv64gc_unknown_fuchsia.rs -+++ rust/compiler/rustc_target/src/spec/riscv64gc_unknown_fuchsia.rs -@@ -1,4 +1,5 @@ --use crate::spec::{CodeModel, SanitizerSet, Target, TargetOptions}; -+use crate::spec::{CodeModel, SanitizerSet, SplitDebuginfo, Target, TargetOptions}; -+use std::borrow::Cow; - - pub fn target() -> Target { - Target { -@@ -13,6 +14,7 @@ pub fn target() -> Target { - llvm_abiname: "lp64d".into(), - max_atomic_width: Some(64), - supported_sanitizers: SanitizerSet::SHADOWCALLSTACK, -+ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), - ..super::fuchsia_base::opts() - }, - } -Index: rust/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs -=================================================================== ---- rust.orig/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs -+++ rust/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs -@@ -1,4 +1,5 @@ --use crate::spec::{CodeModel, Target, TargetOptions}; -+use crate::spec::{CodeModel, SplitDebuginfo, Target, TargetOptions}; -+use std::borrow::Cow; - - pub fn target() -> Target { - Target { -@@ -12,6 +13,7 @@ pub fn target() -> Target { - features: "+m,+a,+f,+d,+c".into(), - llvm_abiname: "lp64d".into(), - max_atomic_width: Some(64), -+ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), - ..super::linux_gnu_base::opts() - }, - } -Index: rust/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_musl.rs -=================================================================== ---- rust.orig/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_musl.rs -+++ rust/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_musl.rs -@@ -1,4 +1,5 @@ --use crate::spec::{CodeModel, Target, TargetOptions}; -+use crate::spec::{CodeModel, SplitDebuginfo, Target, TargetOptions}; -+use std::borrow::Cow; - - pub fn target() -> Target { - Target { -@@ -12,6 +13,7 @@ pub fn target() -> Target { - features: "+m,+a,+f,+d,+c".into(), - llvm_abiname: "lp64d".into(), - max_atomic_width: Some(64), -+ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), - ..super::linux_musl_base::opts() - }, - } -Index: rust/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs -=================================================================== ---- rust.orig/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs -+++ rust/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs -@@ -1,5 +1,6 @@ - use crate::spec::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy}; --use crate::spec::{RelocModel, Target, TargetOptions}; -+use crate::spec::{RelocModel, SplitDebuginfo, Target, TargetOptions}; -+use std::borrow::Cow; - - use super::SanitizerSet; - -@@ -23,6 +24,7 @@ pub fn target() -> Target { - emit_debug_gdb_scripts: false, - eh_frame_header: false, - supported_sanitizers: SanitizerSet::KERNELADDRESS, -+ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), - ..Default::default() - }, - } -Index: rust/compiler/rustc_target/src/spec/riscv64gc_unknown_openbsd.rs -=================================================================== ---- rust.orig/compiler/rustc_target/src/spec/riscv64gc_unknown_openbsd.rs -+++ rust/compiler/rustc_target/src/spec/riscv64gc_unknown_openbsd.rs -@@ -1,4 +1,5 @@ --use crate::spec::{CodeModel, Target, TargetOptions}; -+use crate::spec::{CodeModel, SplitDebuginfo, Target, TargetOptions}; -+use std::borrow::Cow; - - pub fn target() -> Target { - Target { -@@ -12,6 +13,7 @@ pub fn target() -> Target { - features: "+m,+a,+f,+d,+c".into(), - llvm_abiname: "lp64d".into(), - max_atomic_width: Some(64), -+ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), - ..super::openbsd_base::opts() - }, - } -Index: rust/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs -=================================================================== ---- rust.orig/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs -+++ rust/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs -@@ -1,5 +1,6 @@ - use crate::spec::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy}; --use crate::spec::{RelocModel, SanitizerSet, Target, TargetOptions}; -+use crate::spec::{RelocModel, SanitizerSet, SplitDebuginfo, Target, TargetOptions}; -+use std::borrow::Cow; - - pub fn target() -> Target { - Target { -@@ -20,6 +21,7 @@ pub fn target() -> Target { - emit_debug_gdb_scripts: false, - eh_frame_header: false, - supported_sanitizers: SanitizerSet::KERNELADDRESS, -+ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), - ..Default::default() - }, - } diff --git a/debian/patches/ubuntu-disable-ppc64el-asm-tests.patch b/debian/patches/ubuntu-disable-ppc64el-asm-tests.patch deleted file mode 100644 index faa70d7fa..000000000 --- a/debian/patches/ubuntu-disable-ppc64el-asm-tests.patch +++ /dev/null @@ -1,34 +0,0 @@ -Index: rust/compiler/rustc_lint_defs/src/builtin.rs -=================================================================== ---- rust.orig/compiler/rustc_lint_defs/src/builtin.rs -+++ rust/compiler/rustc_lint_defs/src/builtin.rs -@@ -2883,11 +2883,13 @@ declare_lint! { - /// - /// use std::arch::asm; - /// -+ /// #[cfg(not(any(target_arch = "powerpc64", target_arch = "s390x")))] - /// #[naked] - /// pub fn default_abi() -> u32 { - /// unsafe { asm!("", options(noreturn)); } - /// } - /// -+ /// #[cfg(not(any(target_arch = "powerpc64", target_arch = "s390x")))] - /// #[naked] - /// pub extern "Rust" fn rust_abi() -> u32 { - /// unsafe { asm!("", options(noreturn)); } -Index: rust/compiler/rustc_lint/src/builtin.rs -=================================================================== ---- rust.orig/compiler/rustc_lint/src/builtin.rs -+++ rust/compiler/rustc_lint/src/builtin.rs -@@ -3102,7 +3102,10 @@ declare_lint! { - /// ### Example - /// - /// ```rust,compile_fail -- /// # #![feature(asm_experimental_arch)] -+ /// #![cfg_attr( -+ /// not(any(target_arch = "powerpc64", target_arch = "s390x")), -+ /// feature(asm_experimental_arch) -+ /// )] - /// use std::arch::asm; - /// - /// fn main() { diff --git a/debian/patches/ubuntu-ignore-arm-doctest.patch b/debian/patches/ubuntu-ignore-arm-doctest.patch deleted file mode 100644 index a70e4741f..000000000 --- a/debian/patches/ubuntu-ignore-arm-doctest.patch +++ /dev/null @@ -1,42 +0,0 @@ -Description: Disable the doctests for the instruction_set errors - The fix is as described in the upstream issue. -Author: Simon Chopin <simon.chopin@canonical.com> -Bug: https://github.com/rust-lang/rust/issues/83453 -Last-Update: 2022-02-23 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ -Index: rust/compiler/rustc_error_codes/src/error_codes/E0778.md -=================================================================== ---- rust.orig/compiler/rustc_error_codes/src/error_codes/E0778.md -+++ rust/compiler/rustc_error_codes/src/error_codes/E0778.md -@@ -16,7 +16,7 @@ specified: - ``` - #![feature(isa_attribute)] - --#[cfg_attr(target_arch="arm", instruction_set(arm::a32))] -+#[cfg_attr(all(target_arch="arm", target_os="none"), instruction_set(arm::a32))] - fn something() {} - ``` - -@@ -25,7 +25,7 @@ or: - ``` - #![feature(isa_attribute)] - --#[cfg_attr(target_arch="arm", instruction_set(arm::t32))] -+#[cfg_attr(all(target_arch="arm", target_os="none"), instruction_set(arm::t32))] - fn something() {} - ``` - -Index: rust/compiler/rustc_error_codes/src/error_codes/E0779.md -=================================================================== ---- rust.orig/compiler/rustc_error_codes/src/error_codes/E0779.md -+++ rust/compiler/rustc_error_codes/src/error_codes/E0779.md -@@ -21,7 +21,7 @@ error. Example: - ``` - #![feature(isa_attribute)] - --#[cfg_attr(target_arch="arm", instruction_set(arm::a32))] // ok! -+#[cfg_attr(all(target_arch="arm", target_os="none"), instruction_set(arm::a32))] // ok! - pub fn something() {} - fn main() {} - ``` diff --git a/debian/patches/ubuntu/ubuntu-disable-ppc64el-asm-tests.patch b/debian/patches/ubuntu/ubuntu-disable-ppc64el-asm-tests.patch new file mode 100644 index 000000000..8049a1806 --- /dev/null +++ b/debian/patches/ubuntu/ubuntu-disable-ppc64el-asm-tests.patch @@ -0,0 +1,44 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 13 Jun 2024 11:16:41 +0200 +Subject: ubuntu-disable-ppc64el-asm-tests + +Forwarded: not-needed +--- + compiler/rustc_lint/src/builtin.rs | 5 ++++- + compiler/rustc_lint_defs/src/builtin.rs | 2 ++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs +index 045ff38..3472290 100644 +--- a/compiler/rustc_lint/src/builtin.rs ++++ b/compiler/rustc_lint/src/builtin.rs +@@ -2700,7 +2700,10 @@ declare_lint! { + /// ### Example + /// + /// ```rust,compile_fail +- /// # #![feature(asm_experimental_arch)] ++ /// #![cfg_attr( ++ /// not(any(target_arch = "powerpc64", target_arch = "s390x")), ++ /// feature(asm_experimental_arch) ++ /// )] + /// use std::arch::asm; + /// + /// fn main() { +diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs +index f9b6623..b4f5c7b 100644 +--- a/compiler/rustc_lint_defs/src/builtin.rs ++++ b/compiler/rustc_lint_defs/src/builtin.rs +@@ -3046,11 +3046,13 @@ declare_lint! { + /// + /// use std::arch::asm; + /// ++ /// #[cfg(not(any(target_arch = "powerpc64", target_arch = "s390x")))] + /// #[naked] + /// pub fn default_abi() -> u32 { + /// unsafe { asm!("", options(noreturn)); } + /// } + /// ++ /// #[cfg(not(any(target_arch = "powerpc64", target_arch = "s390x")))] + /// #[naked] + /// pub extern "Rust" fn rust_abi() -> u32 { + /// unsafe { asm!("", options(noreturn)); } diff --git a/debian/patches/ubuntu/ubuntu-ignore-arm-doctest.patch b/debian/patches/ubuntu/ubuntu-ignore-arm-doctest.patch new file mode 100644 index 000000000..4249b18e6 --- /dev/null +++ b/debian/patches/ubuntu/ubuntu-ignore-arm-doctest.patch @@ -0,0 +1,48 @@ +From: Simon Chopin <simon.chopin@canonical.com> +Date: Thu, 13 Jun 2024 11:16:41 +0200 +Subject: Disable the doctests for the instruction_set errors + +Bug: https://github.com/rust-lang/rust/issues/83453 +Last-Update: 2022-02-23 + +The fix is as described in the upstream issue. +--- + compiler/rustc_error_codes/src/error_codes/E0778.md | 4 ++-- + compiler/rustc_error_codes/src/error_codes/E0779.md | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/compiler/rustc_error_codes/src/error_codes/E0778.md b/compiler/rustc_error_codes/src/error_codes/E0778.md +index 467362d..d5688c2 100644 +--- a/compiler/rustc_error_codes/src/error_codes/E0778.md ++++ b/compiler/rustc_error_codes/src/error_codes/E0778.md +@@ -16,7 +16,7 @@ specified: + ``` + #![feature(isa_attribute)] + +-#[cfg_attr(target_arch="arm", instruction_set(arm::a32))] ++#[cfg_attr(all(target_arch="arm", target_os="none"), instruction_set(arm::a32))] + fn something() {} + ``` + +@@ -25,7 +25,7 @@ or: + ``` + #![feature(isa_attribute)] + +-#[cfg_attr(target_arch="arm", instruction_set(arm::t32))] ++#[cfg_attr(all(target_arch="arm", target_os="none"), instruction_set(arm::t32))] + fn something() {} + ``` + +diff --git a/compiler/rustc_error_codes/src/error_codes/E0779.md b/compiler/rustc_error_codes/src/error_codes/E0779.md +index 146e20c..9d23322 100644 +--- a/compiler/rustc_error_codes/src/error_codes/E0779.md ++++ b/compiler/rustc_error_codes/src/error_codes/E0779.md +@@ -21,7 +21,7 @@ error. Example: + ``` + #![feature(isa_attribute)] + +-#[cfg_attr(target_arch="arm", instruction_set(arm::a32))] // ok! ++#[cfg_attr(all(target_arch="arm", target_os="none"), instruction_set(arm::a32))] // ok! + pub fn something() {} + fn main() {} + ``` diff --git a/debian/patches/upstream/d-disable-download-tests.patch b/debian/patches/upstream/d-disable-download-tests.patch new file mode 100644 index 000000000..85700f999 --- /dev/null +++ b/debian/patches/upstream/d-disable-download-tests.patch @@ -0,0 +1,33 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 13 Jun 2024 11:16:39 +0200 +Subject: d-disable-download-tests + +Forwarded: no +--- + src/bootstrap/src/tests/config.rs | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/bootstrap/src/tests/config.rs b/src/bootstrap/src/tests/config.rs +index 6f43234..0f1471d 100644 +--- a/src/bootstrap/src/tests/config.rs ++++ b/src/bootstrap/src/tests/config.rs +@@ -18,6 +18,9 @@ fn parse(config: &str) -> Config { + + #[test] + fn download_ci_llvm() { ++ // Debian: this will attempt to download LLVM ++ return; ++ + if crate::core::build_steps::llvm::is_ci_llvm_modified(&parse("")) { + eprintln!("Detected LLVM as non-available: running in CI and modified LLVM in this change"); + return; +@@ -46,6 +49,9 @@ fn download_ci_llvm() { + // - https://github.com/rust-lang/rust/pull/109162#issuecomment-1496782487 + #[test] + fn detect_src_and_out() { ++ // Debian: this will attempt to download a toolchain ++ return; ++ + fn test(cfg: Config, build_dir: Option<&str>) { + // This will bring absolute form of `src/bootstrap` path + let current_dir = std::env::current_dir().unwrap(); diff --git a/debian/patches/upstream/d-ignore-test_arc_condvar_poison-ppc.patch b/debian/patches/upstream/d-ignore-test_arc_condvar_poison-ppc.patch new file mode 100644 index 000000000..491e51bf3 --- /dev/null +++ b/debian/patches/upstream/d-ignore-test_arc_condvar_poison-ppc.patch @@ -0,0 +1,21 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 13 Jun 2024 11:16:39 +0200 +Subject: d-ignore-test_arc_condvar_poison-ppc + +Forwarded: no +--- + library/std/src/sync/mutex/tests.rs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/library/std/src/sync/mutex/tests.rs b/library/std/src/sync/mutex/tests.rs +index 1786a3c..812ec51 100644 +--- a/library/std/src/sync/mutex/tests.rs ++++ b/library/std/src/sync/mutex/tests.rs +@@ -145,6 +145,7 @@ fn test_mutex_arc_condvar() { + } + } + ++#[cfg(not(target_arch = "powerpc"))] + #[test] + fn test_arc_condvar_poison() { + let packet = Packet(Arc::new((Mutex::new(1), Condvar::new()))); diff --git a/debian/patches/upstream/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch b/debian/patches/upstream/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch new file mode 100644 index 000000000..905b2b075 --- /dev/null +++ b/debian/patches/upstream/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch @@ -0,0 +1,47 @@ +From: Josh Stone <jistone@redhat.com> +Date: Mon, 8 Apr 2024 15:04:44 -0700 +Subject: [PATCH] Fix UI tests with dist-vendored dependencies + +There is already a workaround in `compiletest` to deal with custom +`CARGO_HOME` using `-Zignore-directory-in-diagnostics-source-blocks={}`. +A similar need exists when dependencies come from the local `vendor` +directory, which distro builds often use, so now we ignore that too. + +Also, `issue-21763.rs` was normalizing `hashbrown-` paths, presumably +expecting a version suffix, but the vendored path doesn't include the +version. Now that matches `[\\/]hashbrown` instead. + +Forwarded: yes +--- + src/tools/compiletest/src/runtest.rs | 5 +++++ + tests/ui/issues/issue-21763.rs | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs +index 5d53a4d..9bb30ad 100644 +--- a/src/tools/compiletest/src/runtest.rs ++++ b/src/tools/compiletest/src/runtest.rs +@@ -2342,6 +2342,11 @@ impl<'test> TestCx<'test> { + "ignore-directory-in-diagnostics-source-blocks={}", + home::cargo_home().expect("failed to find cargo home").to_str().unwrap() + )); ++ // Similarly, vendored sources shouldn't be shown when running from a dist tarball. ++ rustc.arg("-Z").arg(format!( ++ "ignore-directory-in-diagnostics-source-blocks={}", ++ self.config.find_rust_src_root().unwrap().join("vendor").display(), ++ )); + + // Optionally prevent default --sysroot if specified in test compile-flags. + if !self.props.compile_flags.iter().any(|flag| flag.starts_with("--sysroot")) +diff --git a/tests/ui/issues/issue-21763.rs b/tests/ui/issues/issue-21763.rs +index 38103ff..cc1a006 100644 +--- a/tests/ui/issues/issue-21763.rs ++++ b/tests/ui/issues/issue-21763.rs +@@ -1,6 +1,6 @@ + // Regression test for HashMap only impl'ing Send/Sync if its contents do + +-// normalize-stderr-test: "\S+hashbrown-\S+" -> "$$HASHBROWN_SRC_LOCATION" ++// normalize-stderr-test: "\S+[\\/]hashbrown\S+" -> "$$HASHBROWN_SRC_LOCATION" + + use std::collections::HashMap; + use std::rc::Rc; diff --git a/debian/patches/u-fix-get-toml-when-test.patch b/debian/patches/upstream/u-fix-get-toml-when-test.patch index 4b5bcb6d5..cbe054b73 100644 --- a/debian/patches/u-fix-get-toml-when-test.patch +++ b/debian/patches/upstream/u-fix-get-toml-when-test.patch @@ -1,22 +1,28 @@ -Description: Fix get_toml() when cfg(test) - When cfg(test), Config::parse doesn't parse a config.toml but uses default - values, failing when the initial rustc is needed. This is a workaround before - upstream issue gets solved. +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 13 Jun 2024 11:16:38 +0200 +Subject: Fix get_toml() when cfg(test) + Bug: https://github.com/rust-lang/rust/issues/105766 Last-Update: 2023-03-29 + +When cfg(test), Config::parse doesn't parse a config.toml but uses default +values, failing when the initial rustc is needed. This is a workaround before +upstream issue gets solved. +Last-Update: 2023-03-29 --- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ -Index: rust/src/bootstrap/config.rs -=================================================================== ---- rust.orig/src/bootstrap/config.rs -+++ rust/src/bootstrap/config.rs -@@ -931,9 +931,32 @@ impl Config { + src/bootstrap/src/core/config/config.rs | 28 ++++++++++++++++++++++++++-- + 1 file changed, 26 insertions(+), 2 deletions(-) + +diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs +index f1e1b89..738d2e1 100644 +--- a/src/bootstrap/src/core/config/config.rs ++++ b/src/bootstrap/src/core/config/config.rs +@@ -1180,8 +1180,32 @@ impl Config { pub fn parse(args: &[String]) -> Config { #[cfg(test)] - fn get_toml(_: &Path) -> TomlConfig { - TomlConfig::default() -- } + fn get_toml(file: &Path) -> TomlConfig { + // Debian: We use previous version as a custom rustc, which + // unfortunately won't be picked up because config.toml isn't @@ -42,7 +48,7 @@ Index: rust/src/bootstrap/config.rs + .unwrap_or_else(|err| { + eprintln!("failed to parse TOML configuration '{}': {err}", file.display()); + crate::detail_exit(2); -+ }) } ++ }) + } #[cfg(not(test))] - fn get_toml(file: &Path) -> TomlConfig { diff --git a/debian/patches/upstream/u-hurd-tests.patch b/debian/patches/upstream/u-hurd-tests.patch new file mode 100644 index 000000000..3f2740f32 --- /dev/null +++ b/debian/patches/upstream/u-hurd-tests.patch @@ -0,0 +1,64 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Thu, 13 Jun 2024 11:16:39 +0200 +Subject: These tests hang or make the box OOM + +Forwarded: no +--- + tests/run-make/long-linker-command-lines/foo.rs | 7 +++++++ + tests/ui/associated-consts/issue-93775.rs | 1 + + tests/ui/issues/issue-74564-if-expr-stack-overflow.rs | 1 + + tests/ui/threads-sendsync/mpsc_stress.rs | 1 + + 4 files changed, 10 insertions(+) + +diff --git a/tests/run-make/long-linker-command-lines/foo.rs b/tests/run-make/long-linker-command-lines/foo.rs +index db238c0..c8ad6b8 100644 +--- a/tests/run-make/long-linker-command-lines/foo.rs ++++ b/tests/run-make/long-linker-command-lines/foo.rs +@@ -44,6 +44,13 @@ fn read_linker_args(path: &Path) -> String { + } + } + ++#[cfg(target_os = "hurd")] ++// Debian: test causes build to fail on hurd ++fn main() { ++ return; ++} ++ ++#[cfg(not(target_os = "hurd"))] + fn main() { + let tmpdir = PathBuf::from(env::var_os("TMPDIR").unwrap()); + let ok = tmpdir.join("ok"); +diff --git a/tests/ui/associated-consts/issue-93775.rs b/tests/ui/associated-consts/issue-93775.rs +index db788fe..ae4a64e 100644 +--- a/tests/ui/associated-consts/issue-93775.rs ++++ b/tests/ui/associated-consts/issue-93775.rs +@@ -1,5 +1,6 @@ + // build-pass + // ignore-tidy-linelength ++// ignore-hurd + + // Regression for #93775, needs build-pass to test it. + +diff --git a/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs b/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs +index 36e9932..19c04b6 100644 +--- a/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs ++++ b/tests/ui/issues/issue-74564-if-expr-stack-overflow.rs +@@ -1,5 +1,6 @@ + // build-pass + // ignore-tidy-filelength ++// ignore-hurd + #![crate_type = "rlib"] + + fn banana(v: &str) -> u32 { +diff --git a/tests/ui/threads-sendsync/mpsc_stress.rs b/tests/ui/threads-sendsync/mpsc_stress.rs +index c2e1912..a0e7b6d 100644 +--- a/tests/ui/threads-sendsync/mpsc_stress.rs ++++ b/tests/ui/threads-sendsync/mpsc_stress.rs +@@ -1,6 +1,7 @@ + // run-pass + // compile-flags:--test + // ignore-emscripten ++// ignore-hurd + + use std::sync::mpsc::channel; + use std::sync::mpsc::TryRecvError; diff --git a/debian/patches/u-ignore-ppc-hangs.patch b/debian/patches/upstream/u-ignore-ppc-hangs.patch index 705476199..f2311225a 100644 --- a/debian/patches/u-ignore-ppc-hangs.patch +++ b/debian/patches/upstream/u-ignore-ppc-hangs.patch @@ -8,11 +8,11 @@ Bug: https://github.com/rust-lang/rust/issues/89607 library/alloc/tests/rc.rs | 1 + 2 files changed, 2 insertions(+) -Index: rust/library/alloc/tests/arc.rs -=================================================================== ---- rust.orig/library/alloc/tests/arc.rs -+++ rust/library/alloc/tests/arc.rs -@@ -96,6 +96,7 @@ const SHARED_ITER_MAX: u16 = 100; +diff --git a/library/alloc/tests/arc.rs b/library/alloc/tests/arc.rs +index d564a30..b607abc 100644 +--- a/library/alloc/tests/arc.rs ++++ b/library/alloc/tests/arc.rs +@@ -95,6 +95,7 @@ const SHARED_ITER_MAX: u16 = 100; fn assert_trusted_len<I: TrustedLen>(_: &I) {} @@ -20,11 +20,11 @@ Index: rust/library/alloc/tests/arc.rs #[test] fn shared_from_iter_normal() { // Exercise the base implementation for non-`TrustedLen` iterators. -Index: rust/library/alloc/tests/rc.rs -=================================================================== ---- rust.orig/library/alloc/tests/rc.rs -+++ rust/library/alloc/tests/rc.rs -@@ -92,6 +92,7 @@ const SHARED_ITER_MAX: u16 = 100; +diff --git a/library/alloc/tests/rc.rs b/library/alloc/tests/rc.rs +index 499740e..e418a7d 100644 +--- a/library/alloc/tests/rc.rs ++++ b/library/alloc/tests/rc.rs +@@ -91,6 +91,7 @@ const SHARED_ITER_MAX: u16 = 100; fn assert_trusted_len<I: TrustedLen>(_: &I) {} diff --git a/debian/patches/upstream/u-riscv-disable-unpacked-split-debuginfo.patch b/debian/patches/upstream/u-riscv-disable-unpacked-split-debuginfo.patch new file mode 100644 index 000000000..ced256d18 --- /dev/null +++ b/debian/patches/upstream/u-riscv-disable-unpacked-split-debuginfo.patch @@ -0,0 +1,120 @@ +From: kxxt <rsworktech@outlook.com> +Date: Wed, 31 Jan 2024 09:02:18 +0800 +Subject: [PATCH] riscv only supports split_debuginfo=off for now + +Disable packed/unpacked options for riscv linux/android. +Other riscv targets already only have the off option. + +The packed/unpacked options might be supported in the future. +See upstream issue for more details: +https://github.com/llvm/llvm-project/issues/56642 + +Bug: https://github.com/rust-lang/rust/issues/110224 +--- + .../rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs | 5 ++++- + .../rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs | 5 ++++- + compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs | 5 ++++- + .../rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs | 5 ++++- + .../rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs | 5 ++++- + 5 files changed, 20 insertions(+), 5 deletions(-) + +diff --git a/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs +index 06e8f18..0be32cb 100644 +--- a/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs ++++ b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs +@@ -1,4 +1,6 @@ +-use crate::spec::{base, CodeModel, Target, TargetOptions}; ++use std::borrow::Cow; ++ ++use crate::spec::{base, CodeModel, SplitDebuginfo, Target, TargetOptions}; + + pub fn target() -> Target { + Target { +@@ -12,6 +14,7 @@ pub fn target() -> Target { + features: "+m,+a,+f,+d,+c".into(), + llvm_abiname: "ilp32d".into(), + max_atomic_width: Some(32), ++ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), + ..base::linux_gnu::opts() + }, + } +diff --git a/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs +index 722703d..cfa9990 100644 +--- a/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs ++++ b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs +@@ -1,4 +1,6 @@ +-use crate::spec::{base, CodeModel, Target, TargetOptions}; ++use std::borrow::Cow; ++ ++use crate::spec::{base, CodeModel, SplitDebuginfo, Target, TargetOptions}; + + pub fn target() -> Target { + Target { +@@ -12,6 +14,7 @@ pub fn target() -> Target { + features: "+m,+a,+f,+d,+c".into(), + llvm_abiname: "ilp32d".into(), + max_atomic_width: Some(32), ++ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), + ..base::linux_musl::opts() + }, + } +diff --git a/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs b/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs +index 40e447d..762197d 100644 +--- a/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs ++++ b/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs +@@ -1,4 +1,6 @@ +-use crate::spec::{base, CodeModel, SanitizerSet, Target, TargetOptions}; ++use std::borrow::Cow; ++ ++use crate::spec::{base, CodeModel, SanitizerSet, SplitDebuginfo, Target, TargetOptions}; + + pub fn target() -> Target { + Target { +@@ -13,6 +15,7 @@ pub fn target() -> Target { + llvm_abiname: "lp64d".into(), + supported_sanitizers: SanitizerSet::ADDRESS, + max_atomic_width: Some(64), ++ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), + ..base::android::opts() + }, + } +diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs +index c0969d4..e71929a 100644 +--- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs ++++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs +@@ -1,4 +1,6 @@ +-use crate::spec::{base, CodeModel, Target, TargetOptions}; ++use std::borrow::Cow; ++ ++use crate::spec::{base, CodeModel, SplitDebuginfo, Target, TargetOptions}; + + pub fn target() -> Target { + Target { +@@ -12,6 +14,7 @@ pub fn target() -> Target { + features: "+m,+a,+f,+d,+c".into(), + llvm_abiname: "lp64d".into(), + max_atomic_width: Some(64), ++ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), + ..base::linux_gnu::opts() + }, + } +diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs +index 656e260..8ea28d6 100644 +--- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs ++++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs +@@ -1,4 +1,6 @@ +-use crate::spec::{base, CodeModel, Target, TargetOptions}; ++use std::borrow::Cow; ++ ++use crate::spec::{base, CodeModel, SplitDebuginfo, Target, TargetOptions}; + + pub fn target() -> Target { + Target { +@@ -12,6 +14,7 @@ pub fn target() -> Target { + features: "+m,+a,+f,+d,+c".into(), + llvm_abiname: "lp64d".into(), + max_atomic_width: Some(64), ++ supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]), + ..base::linux_musl::opts() + }, + } diff --git a/debian/patches/u-rustc-llvm-cross-flags.patch b/debian/patches/upstream/u-rustc-llvm-cross-flags.patch index 19b6d82c8..22f59eab2 100644 --- a/debian/patches/u-rustc-llvm-cross-flags.patch +++ b/debian/patches/upstream/u-rustc-llvm-cross-flags.patch @@ -7,11 +7,11 @@ Subject: u-rustc-llvm-cross-flags compiler/rustc_llvm/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: rust/compiler/rustc_llvm/build.rs -=================================================================== ---- rust.orig/compiler/rustc_llvm/build.rs -+++ rust/compiler/rustc_llvm/build.rs -@@ -305,7 +305,7 @@ fn main() { +diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs +index 4b0c122..77baa7b 100644 +--- a/compiler/rustc_llvm/build.rs ++++ b/compiler/rustc_llvm/build.rs +@@ -319,7 +319,7 @@ fn main() { if let Some(stripped) = lib.strip_prefix("-LIBPATH:") { println!("cargo:rustc-link-search=native={}", stripped.replace(&host, &target)); } else if let Some(stripped) = lib.strip_prefix("-L") { diff --git a/debian/patches/d-0003-cc-psm-rebuild-wasm32.patch b/debian/patches/vendor/d-0003-cc-psm-rebuild-wasm32.patch index 53003c7ed..9c78f792b 100644 --- a/debian/patches/d-0003-cc-psm-rebuild-wasm32.patch +++ b/debian/patches/vendor/d-0003-cc-psm-rebuild-wasm32.patch @@ -2,15 +2,16 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> Date: Sat, 2 Oct 2021 01:08:00 +0100 Subject: d-0003-cc-psm-rebuild-wasm32 +Forwarded: not-needed --- - vendor/cc/src/lib.rs | 2 +- - vendor/psm/build.rs | 7 ++----- + vendor/cc-1.0.79/src/lib.rs | 2 +- + vendor/psm/build.rs | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) -diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs +diff --git a/vendor/cc-1.0.79/src/lib.rs b/vendor/cc-1.0.79/src/lib.rs index abc5d7a..cc1cecc 100644 ---- a/vendor/cc/src/lib.rs -+++ b/vendor/cc/src/lib.rs +--- a/vendor/cc-1.0.79/src/lib.rs ++++ b/vendor/cc-1.0.79/src/lib.rs @@ -2407,7 +2407,7 @@ impl Build { || target == "wasm32-unknown-wasi" || target == "wasm32-unknown-unknown" diff --git a/debian/patches/vendor/u-hurd-backtrace.patch b/debian/patches/vendor/u-hurd-backtrace.patch new file mode 100644 index 000000000..b4af54f87 --- /dev/null +++ b/debian/patches/vendor/u-hurd-backtrace.patch @@ -0,0 +1,77 @@ +From: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sat, 7 Oct 2023 01:45:09 +0200 +Subject: u-hurd-backtrace + +Forwarded: https://github.com/rust-lang/backtrace-rs/pull/567 + +Subject: Add GNU/Hurd support (rust-lang/backtrace-rs#567) +--- + vendor/backtrace/src/symbolize/gimli.rs | 2 ++ + vendor/backtrace/src/symbolize/gimli/elf.rs | 2 +- + .../src/symbolize/gimli/libs_dl_iterate_phdr.rs | 20 ++++++++++++-------- + 3 files changed, 15 insertions(+), 9 deletions(-) + +diff --git a/vendor/backtrace/src/symbolize/gimli.rs b/vendor/backtrace/src/symbolize/gimli.rs +index 7f1c6a5..6a9402c 100644 +--- a/vendor/backtrace/src/symbolize/gimli.rs ++++ b/vendor/backtrace/src/symbolize/gimli.rs +@@ -35,6 +35,7 @@ cfg_if::cfg_if! { + target_os = "freebsd", + target_os = "fuchsia", + target_os = "haiku", ++ target_os = "hurd", + target_os = "ios", + target_os = "linux", + target_os = "macos", +@@ -218,6 +219,7 @@ cfg_if::cfg_if! { + target_os = "linux", + target_os = "fuchsia", + target_os = "freebsd", ++ target_os = "hurd", + target_os = "openbsd", + target_os = "netbsd", + all(target_os = "android", feature = "dl_iterate_phdr"), +diff --git a/vendor/backtrace/src/symbolize/gimli/elf.rs b/vendor/backtrace/src/symbolize/gimli/elf.rs +index b0eec07..906a300 100644 +--- a/vendor/backtrace/src/symbolize/gimli/elf.rs ++++ b/vendor/backtrace/src/symbolize/gimli/elf.rs +@@ -308,7 +308,7 @@ const DEBUG_PATH: &[u8] = b"/usr/lib/debug"; + + fn debug_path_exists() -> bool { + cfg_if::cfg_if! { +- if #[cfg(any(target_os = "freebsd", target_os = "linux"))] { ++ if #[cfg(any(target_os = "freebsd", target_os = "hurd", target_os = "linux"))] { + use core::sync::atomic::{AtomicU8, Ordering}; + static DEBUG_PATH_EXISTS: AtomicU8 = AtomicU8::new(0); + +diff --git a/vendor/backtrace/src/symbolize/gimli/libs_dl_iterate_phdr.rs b/vendor/backtrace/src/symbolize/gimli/libs_dl_iterate_phdr.rs +index 9f0304c..518512f 100644 +--- a/vendor/backtrace/src/symbolize/gimli/libs_dl_iterate_phdr.rs ++++ b/vendor/backtrace/src/symbolize/gimli/libs_dl_iterate_phdr.rs +@@ -18,14 +18,18 @@ pub(super) fn native_libraries() -> Vec<Library> { + } + + fn infer_current_exe(base_addr: usize) -> OsString { +- if let Ok(entries) = super::parse_running_mmaps::parse_maps() { +- let opt_path = entries +- .iter() +- .find(|e| e.ip_matches(base_addr) && e.pathname().len() > 0) +- .map(|e| e.pathname()) +- .cloned(); +- if let Some(path) = opt_path { +- return path; ++ cfg_if::cfg_if! { ++ if #[cfg(not(target_os = "hurd"))] { ++ if let Ok(entries) = super::parse_running_mmaps::parse_maps() { ++ let opt_path = entries ++ .iter() ++ .find(|e| e.ip_matches(base_addr) && e.pathname().len() > 0) ++ .map(|e| e.pathname()) ++ .cloned(); ++ if let Some(path) = opt_path { ++ return path; ++ } ++ } + } + } + env::current_exe().map(|e| e.into()).unwrap_or_default() diff --git a/debian/patches/vendor/u-hurd-gix-index-2.patch b/debian/patches/vendor/u-hurd-gix-index-2.patch new file mode 100644 index 000000000..d902b4851 --- /dev/null +++ b/debian/patches/vendor/u-hurd-gix-index-2.patch @@ -0,0 +1,29 @@ +From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Date: Wed, 19 Jun 2024 07:48:44 +0200 +Subject: u-hurd-gix-index-2 + +=================================================================== +--- + vendor/gix-index/src/fs.rs | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/vendor/gix-index/src/fs.rs b/vendor/gix-index/src/fs.rs +index 493d4e1..cc89fd5 100644 +--- a/vendor/gix-index/src/fs.rs ++++ b/vendor/gix-index/src/fs.rs +@@ -115,10 +115,14 @@ impl Metadata { + + /// Return the device id on which the file is located, or 0 on windows. + pub fn dev(&self) -> u64 { +- #[cfg(not(windows))] ++ #[cfg(all(not(windows), not(host_os = "hurd")))] + { + self.0.st_dev as u64 + } ++ #[cfg(host_os = "hurd")] ++ { ++ self.0.st_fsid as u64 ++ } + #[cfg(windows)] + 0 + } diff --git a/debian/patches/vendor/u-hurd-gix-index.patch b/debian/patches/vendor/u-hurd-gix-index.patch new file mode 100644 index 000000000..8341c15c6 --- /dev/null +++ b/debian/patches/vendor/u-hurd-gix-index.patch @@ -0,0 +1,96 @@ +From: Various <see below> +Date: Wed, 19 Jun 2024 07:49:55 +0200 +Subject: u-hurd-gix-index + +commit 569caa0314599c93651d9116d00fde64b81d2ace +Author: Qiu Chaofan <qcf@ecnelises.com> +Date: Wed Dec 20 13:11:52 2023 +0800 + + fix: use correct fields for ctime and mtime on AIX + + On AIX, ctime and mtime are structs containing seconds and nanoseconds. + +commit 6fc27ee8f5ae7ce9fe7e6d07c5c31719cb6b7b1b +Author: Josh Triplett <josh@joshtriplett.org> +Date: Sat Jan 13 16:54:33 2024 -0800 + + Avoid using #[cfg] on multiple individual function arguments + + Attaching #[cfg] to individual arguments makes it look like the function + has five conditionally present arguments, and doesn't make it + immediately apparent that the first two are for the first argument and + the last three are for the second argument. + + Split them into separate `let` statements for clarity. + + In the process, factor out the common `.try_into().ok()?` from each. + +commit daf3844c8f5ce6d0812e35677b1a46d568e226db +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sun May 26 21:13:40 2024 +0200 + + hurd: fix accessing st_[mc]time + + GNU/Hurd uses a st_[mc]tim timespec, like aix +--- + vendor/gix-index/src/fs.rs | 38 ++++++++++++++++++++++++++++---------- + 1 file changed, 28 insertions(+), 10 deletions(-) + +diff --git a/vendor/gix-index/src/fs.rs b/vendor/gix-index/src/fs.rs +index fad21cc..493d4e1 100644 +--- a/vendor/gix-index/src/fs.rs ++++ b/vendor/gix-index/src/fs.rs +@@ -54,12 +54,21 @@ impl Metadata { + pub fn modified(&self) -> Option<SystemTime> { + #[cfg(not(windows))] + { ++ #[cfg(not(any(target_os = "aix", target_os = "hurd")))] ++ let seconds = self.0.st_mtime; ++ #[cfg(any(target_os = "aix", target_os = "hurd"))] ++ let seconds = self.0.st_mtim.tv_sec; ++ ++ #[cfg(not(any(target_os = "netbsd", target_os = "aix", target_os = "hurd")))] ++ let nanoseconds = self.0.st_mtime_nsec; ++ #[cfg(target_os = "netbsd")] ++ let nanoseconds = self.0.st_mtimensec; ++ #[cfg(any(target_os = "aix", target_os = "hurd"))] ++ let nanoseconds = self.0.st_mtim.tv_nsec; ++ + Some(system_time_from_secs_nanos( +- self.0.st_mtime.try_into().ok()?, +- #[cfg(not(target_os = "netbsd"))] +- self.0.st_mtime_nsec.try_into().ok()?, +- #[cfg(target_os = "netbsd")] +- self.0.st_mtimensec.try_into().ok()?, ++ seconds.try_into().ok()?, ++ nanoseconds.try_into().ok()?, + )) + } + #[cfg(windows)] +@@ -73,12 +82,21 @@ impl Metadata { + pub fn created(&self) -> Option<SystemTime> { + #[cfg(not(windows))] + { ++ #[cfg(not(any(target_os = "aix", target_os = "hurd")))] ++ let seconds = self.0.st_ctime; ++ #[cfg(any(target_os = "aix", target_os = "hurd"))] ++ let seconds = self.0.st_ctim.tv_sec; ++ ++ #[cfg(not(any(target_os = "netbsd", target_os = "aix", target_os = "hurd")))] ++ let nanoseconds = self.0.st_ctime_nsec; ++ #[cfg(target_os = "netbsd")] ++ let nanoseconds = self.0.st_ctimensec; ++ #[cfg(any(target_os = "aix", target_os = "hurd"))] ++ let nanoseconds = self.0.st_ctim.tv_nsec; ++ + Some(system_time_from_secs_nanos( +- self.0.st_ctime.try_into().ok()?, +- #[cfg(not(target_os = "netbsd"))] +- self.0.st_ctime_nsec.try_into().ok()?, +- #[cfg(target_os = "netbsd")] +- self.0.st_ctimensec.try_into().ok()?, ++ seconds.try_into().ok()?, ++ nanoseconds.try_into().ok()?, + )) + } + #[cfg(windows)] diff --git a/debian/patches/vendor/u-hurd-libc.3.patch b/debian/patches/vendor/u-hurd-libc.3.patch new file mode 100644 index 000000000..2d14daf98 --- /dev/null +++ b/debian/patches/vendor/u-hurd-libc.3.patch @@ -0,0 +1,2296 @@ +From: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Thu, 9 Nov 2023 03:34:21 +0100 +Subject: hurd: Complete C API interface This aligns it on what can be + found for linux. + +--- + vendor/libc/src/unix/hurd/b32.rs | 2 + + vendor/libc/src/unix/hurd/b64.rs | 2 + + vendor/libc/src/unix/hurd/mod.rs | 1902 ++++++++++++++++++++++++++++++++------ + 3 files changed, 1647 insertions(+), 259 deletions(-) + +diff --git a/vendor/libc/src/unix/hurd/b32.rs b/vendor/libc/src/unix/hurd/b32.rs +index 7e83ed93..7e82a91 100644 +--- a/vendor/libc/src/unix/hurd/b32.rs ++++ b/vendor/libc/src/unix/hurd/b32.rs +@@ -25,6 +25,8 @@ pub type __ulong32_type = ::c_ulong; + pub type __s64_type = ::__int64_t; + pub type __u64_type = ::__uint64_t; + ++pub type __ipc_pid_t = ::c_ushort; ++ + pub type Elf32_Half = u16; + pub type Elf32_Word = u32; + pub type Elf32_Off = u32; +diff --git a/vendor/libc/src/unix/hurd/b64.rs b/vendor/libc/src/unix/hurd/b64.rs +index 3b171f1..e2e502a 100644 +--- a/vendor/libc/src/unix/hurd/b64.rs ++++ b/vendor/libc/src/unix/hurd/b64.rs +@@ -25,6 +25,8 @@ pub type __ulong32_type = ::c_uint; + pub type __s64_type = ::c_long; + pub type __u64_type = ::c_ulong; + ++pub type __ipc_pid_t = ::c_int; ++ + pub type Elf64_Half = u16; + pub type Elf64_Word = u32; + pub type Elf64_Off = u64; +diff --git a/vendor/libc/src/unix/hurd/mod.rs b/vendor/libc/src/unix/hurd/mod.rs +index 05d7585..75a272e 100644 +--- a/vendor/libc/src/unix/hurd/mod.rs ++++ b/vendor/libc/src/unix/hurd/mod.rs +@@ -215,6 +215,10 @@ pub type tcp_ca_state = ::c_uint; + + pub type idtype_t = ::c_uint; + ++pub type regoff_t = ::c_int; ++ ++pub type iconv_t = *mut ::c_void; ++ + // structs + s! { + pub struct ip_mreq { +@@ -228,6 +232,12 @@ s! { + pub imr_ifindex: ::c_int, + } + ++ pub struct ip_mreq_source { ++ pub imr_multiaddr: in_addr, ++ pub imr_interface: in_addr, ++ pub imr_sourceaddr: in_addr, ++ } ++ + pub struct sockaddr { + pub sa_len: ::c_uchar, + pub sa_family: sa_family_t, +@@ -322,6 +332,12 @@ s! { + pub msg_flags: ::c_int, + } + ++ pub struct cmsghdr { ++ pub cmsg_len: ::socklen_t, ++ pub cmsg_level: ::c_int, ++ pub cmsg_type: ::c_int, ++ } ++ + pub struct dirent { + pub d_ino: __ino_t, + pub d_reclen: ::c_ushort, +@@ -343,13 +359,39 @@ s! { + } + + pub struct termios { +- pub c_iflag: tcflag_t, +- pub c_oflag: tcflag_t, +- pub c_cflag: tcflag_t, +- pub c_lflag: tcflag_t, +- pub c_cc: [cc_t; 20usize], +- pub __ispeed: speed_t, +- pub __ospeed: speed_t, ++ pub c_iflag: ::tcflag_t, ++ pub c_oflag: ::tcflag_t, ++ pub c_cflag: ::tcflag_t, ++ pub c_lflag: ::tcflag_t, ++ pub c_cc: [::cc_t; 20usize], ++ pub __ispeed: ::speed_t, ++ pub __ospeed: ::speed_t, ++ } ++ ++ pub struct mallinfo { ++ pub arena: ::c_int, ++ pub ordblks: ::c_int, ++ pub smblks: ::c_int, ++ pub hblks: ::c_int, ++ pub hblkhd: ::c_int, ++ pub usmblks: ::c_int, ++ pub fsmblks: ::c_int, ++ pub uordblks: ::c_int, ++ pub fordblks: ::c_int, ++ pub keepcost: ::c_int, ++ } ++ ++ pub struct mallinfo2 { ++ pub arena: ::size_t, ++ pub ordblks: ::size_t, ++ pub smblks: ::size_t, ++ pub hblks: ::size_t, ++ pub hblkhd: ::size_t, ++ pub usmblks: ::size_t, ++ pub fsmblks: ::size_t, ++ pub uordblks: ::size_t, ++ pub fordblks: ::size_t, ++ pub keepcost: ::size_t, + } + + pub struct sigaction { +@@ -429,6 +471,36 @@ s! { + pub st_spare: [::c_int; 8usize], + } + ++ pub struct statx { ++ pub stx_mask: u32, ++ pub stx_blksize: u32, ++ pub stx_attributes: u64, ++ pub stx_nlink: u32, ++ pub stx_uid: u32, ++ pub stx_gid: u32, ++ pub stx_mode: u16, ++ __statx_pad1: [u16; 1], ++ pub stx_ino: u64, ++ pub stx_size: u64, ++ pub stx_blocks: u64, ++ pub stx_attributes_mask: u64, ++ pub stx_atime: ::statx_timestamp, ++ pub stx_btime: ::statx_timestamp, ++ pub stx_ctime: ::statx_timestamp, ++ pub stx_mtime: ::statx_timestamp, ++ pub stx_rdev_major: u32, ++ pub stx_rdev_minor: u32, ++ pub stx_dev_major: u32, ++ pub stx_dev_minor: u32, ++ __statx_pad2: [u64; 14], ++ } ++ ++ pub struct statx_timestamp { ++ pub tv_sec: i64, ++ pub tv_nsec: u32, ++ pub __statx_timestamp_pad1: [i32; 1], ++ } ++ + pub struct statfs { + pub f_type: ::c_uint, + pub f_bsize: ::c_ulong, +@@ -493,6 +565,24 @@ s! { + pub f_spare: [::c_uint; 3usize], + } + ++ pub struct aiocb { ++ pub aio_fildes: ::c_int, ++ pub aio_lio_opcode: ::c_int, ++ pub aio_reqprio: ::c_int, ++ pub aio_buf: *mut ::c_void, ++ pub aio_nbytes: ::size_t, ++ pub aio_sigevent: ::sigevent, ++ __next_prio: *mut aiocb, ++ __abs_prio: ::c_int, ++ __policy: ::c_int, ++ __error_code: ::c_int, ++ __return_value: ::ssize_t, ++ pub aio_offset: off_t, ++ #[cfg(all(not(target_arch = "x86_64"), target_pointer_width = "32"))] ++ __unused1: [::c_char; 4], ++ __glibc_reserved: [::c_char; 32] ++ } ++ + #[cfg_attr(target_pointer_width = "32", + repr(align(4)))] + #[cfg_attr(target_pointer_width = "64", +@@ -549,7 +639,7 @@ s! { + } + + pub struct __pthread_attr { +- pub __schedparam: __sched_param, ++ pub __schedparam: sched_param, + pub __stackaddr: *mut ::c_void, + pub __stacksize: size_t, + pub __guardsize: size_t, +@@ -578,12 +668,25 @@ s! { + pub __data: *mut ::c_void, + } + ++ pub struct seminfo { ++ pub semmap: ::c_int, ++ pub semmni: ::c_int, ++ pub semmns: ::c_int, ++ pub semmnu: ::c_int, ++ pub semmsl: ::c_int, ++ pub semopm: ::c_int, ++ pub semume: ::c_int, ++ pub semusz: ::c_int, ++ pub semvmx: ::c_int, ++ pub semaem: ::c_int, ++ } ++ + pub struct _IO_FILE { + _unused: [u8; 0], + } + +- pub struct __sched_param { +- pub __sched_priority: ::c_int, ++ pub struct sched_param { ++ pub sched_priority: ::c_int, + } + + pub struct iovec { +@@ -601,6 +704,23 @@ s! { + pub pw_shell: *mut ::c_char, + } + ++ pub struct spwd { ++ pub sp_namp: *mut ::c_char, ++ pub sp_pwdp: *mut ::c_char, ++ pub sp_lstchg: ::c_long, ++ pub sp_min: ::c_long, ++ pub sp_max: ::c_long, ++ pub sp_warn: ::c_long, ++ pub sp_inact: ::c_long, ++ pub sp_expire: ::c_long, ++ pub sp_flag: ::c_ulong, ++ } ++ ++ pub struct itimerspec { ++ pub it_interval: ::timespec, ++ pub it_value: ::timespec, ++ } ++ + pub struct tm { + pub tm_sec: ::c_int, + pub tm_min: ::c_int, +@@ -649,6 +769,59 @@ s! { + pub dli_saddr: *mut ::c_void, + } + ++ pub struct ifaddrs { ++ pub ifa_next: *mut ifaddrs, ++ pub ifa_name: *mut c_char, ++ pub ifa_flags: ::c_uint, ++ pub ifa_addr: *mut ::sockaddr, ++ pub ifa_netmask: *mut ::sockaddr, ++ pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union ++ pub ifa_data: *mut ::c_void ++ } ++ ++ pub struct arpreq { ++ pub arp_pa: ::sockaddr, ++ pub arp_ha: ::sockaddr, ++ pub arp_flags: ::c_int, ++ pub arp_netmask: ::sockaddr, ++ pub arp_dev: [::c_char; 16], ++ } ++ ++ pub struct arpreq_old { ++ pub arp_pa: ::sockaddr, ++ pub arp_ha: ::sockaddr, ++ pub arp_flags: ::c_int, ++ pub arp_netmask: ::sockaddr, ++ } ++ ++ pub struct arphdr { ++ pub ar_hrd: u16, ++ pub ar_pro: u16, ++ pub ar_hln: u8, ++ pub ar_pln: u8, ++ pub ar_op: u16, ++ } ++ ++ pub struct arpd_request { ++ pub req: ::c_ushort, ++ pub ip: u32, ++ pub dev: ::c_ulong, ++ pub stamp: ::c_ulong, ++ pub updated: ::c_ulong, ++ pub ha: [::c_uchar; ::MAX_ADDR_LEN], ++ } ++ ++ pub struct mmsghdr { ++ pub msg_hdr: ::msghdr, ++ pub msg_len: ::c_uint, ++ } ++ ++ pub struct ifreq { ++ /// interface name, e.g. "en0" ++ pub ifr_name: [::c_char; ::IFNAMSIZ], ++ pub ifr_ifru: ::sockaddr, ++ } ++ + pub struct __locale_struct { + pub __locales: [*mut __locale_data; 13usize], + pub __ctype_b: *const ::c_ushort, +@@ -715,6 +888,114 @@ s! { + pub l_len : __off64_t, + pub l_pid : __pid_t, + } ++ ++ pub struct glob_t { ++ pub gl_pathc: ::size_t, ++ pub gl_pathv: *mut *mut c_char, ++ pub gl_offs: ::size_t, ++ pub gl_flags: ::c_int, ++ ++ __unused1: *mut ::c_void, ++ __unused2: *mut ::c_void, ++ __unused3: *mut ::c_void, ++ __unused4: *mut ::c_void, ++ __unused5: *mut ::c_void, ++ } ++ ++ pub struct glob64_t { ++ pub gl_pathc: ::size_t, ++ pub gl_pathv: *mut *mut ::c_char, ++ pub gl_offs: ::size_t, ++ pub gl_flags: ::c_int, ++ ++ __unused1: *mut ::c_void, ++ __unused2: *mut ::c_void, ++ __unused3: *mut ::c_void, ++ __unused4: *mut ::c_void, ++ __unused5: *mut ::c_void, ++ } ++ ++ pub struct regex_t { ++ __buffer: *mut ::c_void, ++ __allocated: ::size_t, ++ __used: ::size_t, ++ __syntax: ::c_ulong, ++ __fastmap: *mut ::c_char, ++ __translate: *mut ::c_char, ++ __re_nsub: ::size_t, ++ __bitfield: u8, ++ } ++ ++ pub struct cpu_set_t { ++ #[cfg(all(target_pointer_width = "32", ++ not(target_arch = "x86_64")))] ++ bits: [u32; 32], ++ #[cfg(not(all(target_pointer_width = "32", ++ not(target_arch = "x86_64"))))] ++ bits: [u64; 16], ++ } ++ ++ pub struct if_nameindex { ++ pub if_index: ::c_uint, ++ pub if_name: *mut ::c_char, ++ } ++ ++ // System V IPC ++ pub struct msginfo { ++ pub msgpool: ::c_int, ++ pub msgmap: ::c_int, ++ pub msgmax: ::c_int, ++ pub msgmnb: ::c_int, ++ pub msgmni: ::c_int, ++ pub msgssz: ::c_int, ++ pub msgtql: ::c_int, ++ pub msgseg: ::c_ushort, ++ } ++ ++ pub struct sembuf { ++ pub sem_num: ::c_ushort, ++ pub sem_op: ::c_short, ++ pub sem_flg: ::c_short, ++ } ++ ++ pub struct mntent { ++ pub mnt_fsname: *mut ::c_char, ++ pub mnt_dir: *mut ::c_char, ++ pub mnt_type: *mut ::c_char, ++ pub mnt_opts: *mut ::c_char, ++ pub mnt_freq: ::c_int, ++ pub mnt_passno: ::c_int, ++ } ++ ++ pub struct posix_spawn_file_actions_t { ++ __allocated: ::c_int, ++ __used: ::c_int, ++ __actions: *mut ::c_int, ++ __pad: [::c_int; 16], ++ } ++ ++ pub struct posix_spawnattr_t { ++ __flags: ::c_short, ++ __pgrp: ::pid_t, ++ __sd: ::sigset_t, ++ __ss: ::sigset_t, ++ __sp: ::sched_param, ++ __policy: ::c_int, ++ __pad: [::c_int; 16], ++ } ++ ++ pub struct regmatch_t { ++ pub rm_so: regoff_t, ++ pub rm_eo: regoff_t, ++ } ++ ++ pub struct option { ++ pub name: *const ::c_char, ++ pub has_arg: ::c_int, ++ pub flag: *mut ::c_int, ++ pub val: ::c_int, ++ } ++ + } + + impl siginfo_t { +@@ -740,16 +1021,69 @@ impl siginfo_t { + } + + // const +-pub const IPOPT_COPY: u8 = 0x80; +-pub const IPOPT_NUMBER_MASK: u8 = 0x1f; +-pub const IPOPT_CLASS_MASK: u8 = 0x60; +-pub const IPTOS_ECN_MASK: u8 = 0x03; +-pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000; + ++// aio.h ++pub const AIO_CANCELED: ::c_int = 0; ++pub const AIO_NOTCANCELED: ::c_int = 1; ++pub const AIO_ALLDONE: ::c_int = 2; ++pub const LIO_READ: ::c_int = 0; ++pub const LIO_WRITE: ::c_int = 1; ++pub const LIO_NOP: ::c_int = 2; ++pub const LIO_WAIT: ::c_int = 0; ++pub const LIO_NOWAIT: ::c_int = 1; ++ ++// glob.h ++pub const GLOB_ERR: ::c_int = 1 << 0; ++pub const GLOB_MARK: ::c_int = 1 << 1; ++pub const GLOB_NOSORT: ::c_int = 1 << 2; ++pub const GLOB_DOOFFS: ::c_int = 1 << 3; ++pub const GLOB_NOCHECK: ::c_int = 1 << 4; ++pub const GLOB_APPEND: ::c_int = 1 << 5; ++pub const GLOB_NOESCAPE: ::c_int = 1 << 6; ++ ++pub const GLOB_NOSPACE: ::c_int = 1; ++pub const GLOB_ABORTED: ::c_int = 2; ++pub const GLOB_NOMATCH: ::c_int = 3; ++ ++pub const GLOB_PERIOD: ::c_int = 1 << 7; ++pub const GLOB_ALTDIRFUNC: ::c_int = 1 << 9; ++pub const GLOB_BRACE: ::c_int = 1 << 10; ++pub const GLOB_NOMAGIC: ::c_int = 1 << 11; ++pub const GLOB_TILDE: ::c_int = 1 << 12; ++pub const GLOB_ONLYDIR: ::c_int = 1 << 13; ++pub const GLOB_TILDE_CHECK: ::c_int = 1 << 14; ++ ++// ipc.h ++pub const IPC_PRIVATE: ::key_t = 0; ++ ++pub const IPC_CREAT: ::c_int = 0o1000; ++pub const IPC_EXCL: ::c_int = 0o2000; ++pub const IPC_NOWAIT: ::c_int = 0o4000; ++ ++pub const IPC_RMID: ::c_int = 0; ++pub const IPC_SET: ::c_int = 1; ++pub const IPC_STAT: ::c_int = 2; ++pub const IPC_INFO: ::c_int = 3; ++pub const MSG_STAT: ::c_int = 11; ++pub const MSG_INFO: ::c_int = 12; ++ ++pub const MSG_NOERROR: ::c_int = 0o10000; ++pub const MSG_EXCEPT: ::c_int = 0o20000; ++ ++// shm.h ++pub const SHM_R: ::c_int = 0o400; ++pub const SHM_W: ::c_int = 0o200; ++ ++pub const SHM_RDONLY: ::c_int = 0o10000; ++pub const SHM_RND: ::c_int = 0o20000; ++pub const SHM_REMAP: ::c_int = 0o40000; ++ ++pub const SHM_LOCK: ::c_int = 11; ++pub const SHM_UNLOCK: ::c_int = 12; + // unistd.h +-pub const STDIN_FILENO: c_long = 0; +-pub const STDOUT_FILENO: c_long = 1; +-pub const STDERR_FILENO: c_long = 2; ++pub const STDIN_FILENO: ::c_int = 0; ++pub const STDOUT_FILENO: ::c_int = 1; ++pub const STDERR_FILENO: ::c_int = 2; + pub const __FD_SETSIZE: usize = 256; + pub const R_OK: ::c_int = 4; + pub const W_OK: ::c_int = 2; +@@ -769,6 +1103,9 @@ pub const F_TLOCK: ::c_int = 2; + pub const F_TEST: ::c_int = 3; + pub const CLOSE_RANGE_CLOEXEC: ::c_int = 4; + ++// stdio.h ++pub const EOF: ::c_int = -1; ++ + // stdlib.h + pub const WNOHANG: ::c_int = 1; + pub const WUNTRACED: ::c_int = 2; +@@ -884,8 +1221,17 @@ pub const _SS_SIZE: usize = 128; + pub const CMGROUP_MAX: usize = 16; + pub const SOL_SOCKET: ::c_int = 65535; + ++// sys/time.h ++pub const ITIMER_REAL: ::c_int = 0; ++pub const ITIMER_VIRTUAL: ::c_int = 1; ++pub const ITIMER_PROF: ::c_int = 2; ++ + // netinet/in.h + pub const SOL_IP: ::c_int = 0; ++pub const SOL_TCP: ::c_int = 6; ++pub const SOL_UDP: ::c_int = 17; ++pub const SOL_IPV6: ::c_int = 41; ++pub const SOL_ICMPV6: ::c_int = 58; + pub const IP_OPTIONS: ::c_int = 1; + pub const IP_HDRINCL: ::c_int = 2; + pub const IP_TOS: ::c_int = 3; +@@ -899,8 +1245,6 @@ pub const IP_MULTICAST_TTL: ::c_int = 10; + pub const IP_MULTICAST_LOOP: ::c_int = 11; + pub const IP_ADD_MEMBERSHIP: ::c_int = 12; + pub const IP_DROP_MEMBERSHIP: ::c_int = 13; +-pub const SOL_IPV6: ::c_int = 41; +-pub const SOL_ICMPV6: ::c_int = 58; + pub const IPV6_ADDRFORM: ::c_int = 1; + pub const IPV6_2292PKTINFO: ::c_int = 2; + pub const IPV6_2292HOPOPTS: ::c_int = 3; +@@ -965,6 +1309,134 @@ pub const IN_LOOPBACKNET: u32 = 127; + pub const INET_ADDRSTRLEN: usize = 16; + pub const INET6_ADDRSTRLEN: usize = 46; + ++// netinet/ip.h ++pub const IPTOS_ECN_MASK: u8 = 0x03; ++ ++pub const IPTOS_LOWDELAY: u8 = 0x10; ++pub const IPTOS_THROUGHPUT: u8 = 0x08; ++pub const IPTOS_RELIABILITY: u8 = 0x04; ++pub const IPTOS_MINCOST: u8 = 0x02; ++ ++pub const IPTOS_PREC_NETCONTROL: u8 = 0xe0; ++pub const IPTOS_PREC_INTERNETCONTROL: u8 = 0xc0; ++pub const IPTOS_PREC_CRITIC_ECP: u8 = 0xa0; ++pub const IPTOS_PREC_FLASHOVERRIDE: u8 = 0x80; ++pub const IPTOS_PREC_FLASH: u8 = 0x60; ++pub const IPTOS_PREC_IMMEDIATE: u8 = 0x40; ++pub const IPTOS_PREC_PRIORITY: u8 = 0x20; ++pub const IPTOS_PREC_ROUTINE: u8 = 0x00; ++ ++pub const IPTOS_ECN_MASK: u8 = 0x03; ++pub const IPTOS_ECN_ECT1: u8 = 0x01; ++pub const IPTOS_ECN_ECT0: u8 = 0x02; ++pub const IPTOS_ECN_CE: u8 = 0x03; ++ ++pub const IPOPT_COPY: u8 = 0x80; ++pub const IPOPT_CLASS_MASK: u8 = 0x60; ++pub const IPOPT_NUMBER_MASK: u8 = 0x1f; ++ ++pub const IPOPT_CONTROL: u8 = 0x00; ++pub const IPOPT_RESERVED1: u8 = 0x20; ++pub const IPOPT_MEASUREMENT: u8 = 0x40; ++pub const IPOPT_RESERVED2: u8 = 0x60; ++pub const IPOPT_END: u8 = 0 | IPOPT_CONTROL; ++pub const IPOPT_NOOP: u8 = 1 | IPOPT_CONTROL; ++pub const IPOPT_SEC: u8 = 2 | IPOPT_CONTROL | IPOPT_COPY; ++pub const IPOPT_LSRR: u8 = 3 | IPOPT_CONTROL | IPOPT_COPY; ++pub const IPOPT_TIMESTAMP: u8 = 4 | IPOPT_MEASUREMENT; ++pub const IPOPT_RR: u8 = 7 | IPOPT_CONTROL; ++pub const IPOPT_SID: u8 = 8 | IPOPT_CONTROL | IPOPT_COPY; ++pub const IPOPT_SSRR: u8 = 9 | IPOPT_CONTROL | IPOPT_COPY; ++pub const IPOPT_RA: u8 = 20 | IPOPT_CONTROL | IPOPT_COPY; ++pub const IPVERSION: u8 = 4; ++pub const MAXTTL: u8 = 255; ++pub const IPDEFTTL: u8 = 64; ++pub const IPOPT_OPTVAL: u8 = 0; ++pub const IPOPT_OLEN: u8 = 1; ++pub const IPOPT_OFFSET: u8 = 2; ++pub const IPOPT_MINOFF: u8 = 4; ++pub const MAX_IPOPTLEN: u8 = 40; ++pub const IPOPT_NOP: u8 = IPOPT_NOOP; ++pub const IPOPT_EOL: u8 = IPOPT_END; ++pub const IPOPT_TS: u8 = IPOPT_TIMESTAMP; ++pub const IPOPT_TS_TSONLY: u8 = 0; ++pub const IPOPT_TS_TSANDADDR: u8 = 1; ++pub const IPOPT_TS_PRESPEC: u8 = 3; ++ ++// net/if_arp.h ++pub const ARPOP_REQUEST: u16 = 1; ++pub const ARPOP_REPLY: u16 = 2; ++pub const ARPOP_RREQUEST: u16 = 3; ++pub const ARPOP_RREPLY: u16 = 4; ++pub const ARPOP_InREQUEST: u16 = 8; ++pub const ARPOP_InREPLY: u16 = 9; ++pub const ARPOP_NAK: u16 = 10; ++ ++pub const ATF_NETMASK: ::c_int = 0x20; ++pub const ATF_DONTPUB: ::c_int = 0x40; ++ ++pub const ARPHRD_NETROM: u16 = 0; ++pub const ARPHRD_ETHER: u16 = 1; ++pub const ARPHRD_EETHER: u16 = 2; ++pub const ARPHRD_AX25: u16 = 3; ++pub const ARPHRD_PRONET: u16 = 4; ++pub const ARPHRD_CHAOS: u16 = 5; ++pub const ARPHRD_IEEE802: u16 = 6; ++pub const ARPHRD_ARCNET: u16 = 7; ++pub const ARPHRD_APPLETLK: u16 = 8; ++pub const ARPHRD_DLCI: u16 = 15; ++pub const ARPHRD_ATM: u16 = 19; ++pub const ARPHRD_METRICOM: u16 = 23; ++pub const ARPHRD_IEEE1394: u16 = 24; ++pub const ARPHRD_EUI64: u16 = 27; ++pub const ARPHRD_INFINIBAND: u16 = 32; ++ ++pub const ARPHRD_SLIP: u16 = 256; ++pub const ARPHRD_CSLIP: u16 = 257; ++pub const ARPHRD_SLIP6: u16 = 258; ++pub const ARPHRD_CSLIP6: u16 = 259; ++pub const ARPHRD_RSRVD: u16 = 260; ++pub const ARPHRD_ADAPT: u16 = 264; ++pub const ARPHRD_ROSE: u16 = 270; ++pub const ARPHRD_X25: u16 = 271; ++pub const ARPHRD_HWX25: u16 = 272; ++pub const ARPHRD_CAN: u16 = 280; ++pub const ARPHRD_PPP: u16 = 512; ++pub const ARPHRD_CISCO: u16 = 513; ++pub const ARPHRD_HDLC: u16 = ARPHRD_CISCO; ++pub const ARPHRD_LAPB: u16 = 516; ++pub const ARPHRD_DDCMP: u16 = 517; ++pub const ARPHRD_RAWHDLC: u16 = 518; ++ ++pub const ARPHRD_TUNNEL: u16 = 768; ++pub const ARPHRD_TUNNEL6: u16 = 769; ++pub const ARPHRD_FRAD: u16 = 770; ++pub const ARPHRD_SKIP: u16 = 771; ++pub const ARPHRD_LOOPBACK: u16 = 772; ++pub const ARPHRD_LOCALTLK: u16 = 773; ++pub const ARPHRD_FDDI: u16 = 774; ++pub const ARPHRD_BIF: u16 = 775; ++pub const ARPHRD_SIT: u16 = 776; ++pub const ARPHRD_IPDDP: u16 = 777; ++pub const ARPHRD_IPGRE: u16 = 778; ++pub const ARPHRD_PIMREG: u16 = 779; ++pub const ARPHRD_HIPPI: u16 = 780; ++pub const ARPHRD_ASH: u16 = 781; ++pub const ARPHRD_ECONET: u16 = 782; ++pub const ARPHRD_IRDA: u16 = 783; ++pub const ARPHRD_FCPP: u16 = 784; ++pub const ARPHRD_FCAL: u16 = 785; ++pub const ARPHRD_FCPL: u16 = 786; ++pub const ARPHRD_FCFABRIC: u16 = 787; ++pub const ARPHRD_IEEE802_TR: u16 = 800; ++pub const ARPHRD_IEEE80211: u16 = 801; ++pub const ARPHRD_IEEE80211_PRISM: u16 = 802; ++pub const ARPHRD_IEEE80211_RADIOTAP: u16 = 803; ++pub const ARPHRD_IEEE802154: u16 = 804; ++ ++pub const ARPHRD_VOID: u16 = 0xFFFF; ++pub const ARPHRD_NONE: u16 = 0xFFFE; ++ + // bits/posix1_lim.h + pub const _POSIX_AIO_LISTIO_MAX: usize = 2; + pub const _POSIX_AIO_MAX: usize = 1; +@@ -1063,13 +1535,13 @@ pub const NI_DGRAM: ::c_int = 16; + pub const NI_IDN: ::c_int = 32; + + // time.h +-pub const CLOCK_REALTIME: clockid_t = 0; +-pub const CLOCK_MONOTONIC: clockid_t = 1; +-pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 2; +-pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 3; +-pub const CLOCK_MONOTONIC_RAW: clockid_t = 4; +-pub const CLOCK_REALTIME_COARSE: clockid_t = 5; +-pub const CLOCK_MONOTONIC_COARSE: clockid_t = 6; ++pub const CLOCK_REALTIME: ::clockid_t = 0; ++pub const CLOCK_MONOTONIC: ::clockid_t = 1; ++pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2; ++pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 3; ++pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4; ++pub const CLOCK_REALTIME_COARSE: ::clockid_t = 5; ++pub const CLOCK_MONOTONIC_COARSE: ::clockid_t = 6; + pub const TIMER_ABSTIME: ::c_int = 1; + pub const TIME_UTC: ::c_int = 1; + +@@ -1126,155 +1598,169 @@ pub const LC_MEASUREMENT_MASK: ::c_int = 2048; + pub const LC_IDENTIFICATION_MASK: ::c_int = 4096; + pub const LC_ALL_MASK: ::c_int = 8127; + ++// reboot.h ++pub const RB_AUTOBOOT: ::c_int = 0x0; ++pub const RB_ASKNAME: ::c_int = 0x1; ++pub const RB_SINGLE: ::c_int = 0x2; ++pub const RB_KBD: ::c_int = 0x4; ++pub const RB_HALT: ::c_int = 0x8; ++pub const RB_INITNAME: ::c_int = 0x10; ++pub const RB_DFLTROOT: ::c_int = 0x20; ++pub const RB_NOBOOTRC: ::c_int = 0x20; ++pub const RB_ALTBOOT: ::c_int = 0x40; ++pub const RB_UNIPROC: ::c_int = 0x80; ++pub const RB_DEBUGGER: ::c_int = 0x1000; ++ + // semaphore.h + pub const __SIZEOF_SEM_T: usize = 20; ++pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t; + + // termios.h +-pub const IGNBRK: tcflag_t = 1; +-pub const BRKINT: tcflag_t = 2; +-pub const IGNPAR: tcflag_t = 4; +-pub const PARMRK: tcflag_t = 8; +-pub const INPCK: tcflag_t = 16; +-pub const ISTRIP: tcflag_t = 32; +-pub const INLCR: tcflag_t = 64; +-pub const IGNCR: tcflag_t = 128; +-pub const ICRNL: tcflag_t = 256; +-pub const IXON: tcflag_t = 512; +-pub const IXOFF: tcflag_t = 1024; +-pub const IXANY: tcflag_t = 2048; +-pub const IMAXBEL: tcflag_t = 8192; +-pub const IUCLC: tcflag_t = 16384; +-pub const OPOST: tcflag_t = 1; +-pub const ONLCR: tcflag_t = 2; +-pub const ONOEOT: tcflag_t = 8; +-pub const OCRNL: tcflag_t = 16; +-pub const ONOCR: tcflag_t = 32; +-pub const ONLRET: tcflag_t = 64; +-pub const NLDLY: tcflag_t = 768; +-pub const NL0: tcflag_t = 0; +-pub const NL1: tcflag_t = 256; +-pub const TABDLY: tcflag_t = 3076; +-pub const TAB0: tcflag_t = 0; +-pub const TAB1: tcflag_t = 1024; +-pub const TAB2: tcflag_t = 2048; +-pub const TAB3: tcflag_t = 4; +-pub const CRDLY: tcflag_t = 12288; +-pub const CR0: tcflag_t = 0; +-pub const CR1: tcflag_t = 4096; +-pub const CR2: tcflag_t = 8192; +-pub const CR3: tcflag_t = 12288; +-pub const FFDLY: tcflag_t = 16384; +-pub const FF0: tcflag_t = 0; +-pub const FF1: tcflag_t = 16384; +-pub const BSDLY: tcflag_t = 32768; +-pub const BS0: tcflag_t = 0; +-pub const BS1: tcflag_t = 32768; +-pub const VTDLY: tcflag_t = 65536; +-pub const VT0: tcflag_t = 0; +-pub const VT1: tcflag_t = 65536; +-pub const OLCUC: tcflag_t = 131072; +-pub const OFILL: tcflag_t = 262144; +-pub const OFDEL: tcflag_t = 524288; +-pub const CIGNORE: tcflag_t = 1; +-pub const CSIZE: tcflag_t = 768; +-pub const CS5: tcflag_t = 0; +-pub const CS6: tcflag_t = 256; +-pub const CS7: tcflag_t = 512; +-pub const CS8: tcflag_t = 768; +-pub const CSTOPB: tcflag_t = 1024; +-pub const CREAD: tcflag_t = 2048; +-pub const PARENB: tcflag_t = 4096; +-pub const PARODD: tcflag_t = 8192; +-pub const HUPCL: tcflag_t = 16384; +-pub const CLOCAL: tcflag_t = 32768; +-pub const CRTSCTS: tcflag_t = 65536; +-pub const CRTS_IFLOW: tcflag_t = 65536; +-pub const CCTS_OFLOW: tcflag_t = 65536; +-pub const CDTRCTS: tcflag_t = 131072; +-pub const MDMBUF: tcflag_t = 1048576; +-pub const CHWFLOW: tcflag_t = 1245184; +-pub const ECHOKE: tcflag_t = 1; +-pub const _ECHOE: tcflag_t = 2; +-pub const ECHOE: tcflag_t = 2; +-pub const _ECHOK: tcflag_t = 4; +-pub const ECHOK: tcflag_t = 4; +-pub const _ECHO: tcflag_t = 8; +-pub const ECHO: tcflag_t = 8; +-pub const _ECHONL: tcflag_t = 16; +-pub const ECHONL: tcflag_t = 16; +-pub const ECHOPRT: tcflag_t = 32; +-pub const ECHOCTL: tcflag_t = 64; +-pub const _ISIG: tcflag_t = 128; +-pub const ISIG: tcflag_t = 128; +-pub const _ICANON: tcflag_t = 256; +-pub const ICANON: tcflag_t = 256; +-pub const ALTWERASE: tcflag_t = 512; +-pub const _IEXTEN: tcflag_t = 1024; +-pub const IEXTEN: tcflag_t = 1024; +-pub const EXTPROC: tcflag_t = 2048; +-pub const _TOSTOP: tcflag_t = 4194304; +-pub const TOSTOP: tcflag_t = 4194304; +-pub const FLUSHO: tcflag_t = 8388608; +-pub const NOKERNINFO: tcflag_t = 33554432; +-pub const PENDIN: tcflag_t = 536870912; +-pub const _NOFLSH: tcflag_t = 2147483648; +-pub const NOFLSH: tcflag_t = 2147483648; +-pub const VEOF: cc_t = 0; +-pub const VEOL: cc_t = 1; +-pub const VEOL2: cc_t = 2; +-pub const VERASE: cc_t = 3; +-pub const VWERASE: cc_t = 4; +-pub const VKILL: cc_t = 5; +-pub const VREPRINT: cc_t = 6; +-pub const VINTR: cc_t = 8; +-pub const VQUIT: cc_t = 9; +-pub const VSUSP: cc_t = 10; +-pub const VDSUSP: cc_t = 11; +-pub const VSTART: cc_t = 12; +-pub const VSTOP: cc_t = 13; +-pub const VLNEXT: cc_t = 14; +-pub const VDISCARD: cc_t = 15; +-pub const VMIN: cc_t = 16; +-pub const VTIME: cc_t = 17; +-pub const VSTATUS: cc_t = 18; ++pub const IGNBRK: ::tcflag_t = 1; ++pub const BRKINT: ::tcflag_t = 2; ++pub const IGNPAR: ::tcflag_t = 4; ++pub const PARMRK: ::tcflag_t = 8; ++pub const INPCK: ::tcflag_t = 16; ++pub const ISTRIP: ::tcflag_t = 32; ++pub const INLCR: ::tcflag_t = 64; ++pub const IGNCR: ::tcflag_t = 128; ++pub const ICRNL: ::tcflag_t = 256; ++pub const IXON: ::tcflag_t = 512; ++pub const IXOFF: ::tcflag_t = 1024; ++pub const IXANY: ::tcflag_t = 2048; ++pub const IMAXBEL: ::tcflag_t = 8192; ++pub const IUCLC: ::tcflag_t = 16384; ++pub const OPOST: ::tcflag_t = 1; ++pub const ONLCR: ::tcflag_t = 2; ++pub const ONOEOT: ::tcflag_t = 8; ++pub const OCRNL: ::tcflag_t = 16; ++pub const ONOCR: ::tcflag_t = 32; ++pub const ONLRET: ::tcflag_t = 64; ++pub const NLDLY: ::tcflag_t = 768; ++pub const NL0: ::tcflag_t = 0; ++pub const NL1: ::tcflag_t = 256; ++pub const TABDLY: ::tcflag_t = 3076; ++pub const TAB0: ::tcflag_t = 0; ++pub const TAB1: ::tcflag_t = 1024; ++pub const TAB2: ::tcflag_t = 2048; ++pub const TAB3: ::tcflag_t = 4; ++pub const CRDLY: ::tcflag_t = 12288; ++pub const CR0: ::tcflag_t = 0; ++pub const CR1: ::tcflag_t = 4096; ++pub const CR2: ::tcflag_t = 8192; ++pub const CR3: ::tcflag_t = 12288; ++pub const FFDLY: ::tcflag_t = 16384; ++pub const FF0: ::tcflag_t = 0; ++pub const FF1: ::tcflag_t = 16384; ++pub const BSDLY: ::tcflag_t = 32768; ++pub const BS0: ::tcflag_t = 0; ++pub const BS1: ::tcflag_t = 32768; ++pub const VTDLY: ::tcflag_t = 65536; ++pub const VT0: ::tcflag_t = 0; ++pub const VT1: ::tcflag_t = 65536; ++pub const OLCUC: ::tcflag_t = 131072; ++pub const OFILL: ::tcflag_t = 262144; ++pub const OFDEL: ::tcflag_t = 524288; ++pub const CIGNORE: ::tcflag_t = 1; ++pub const CSIZE: ::tcflag_t = 768; ++pub const CS5: ::tcflag_t = 0; ++pub const CS6: ::tcflag_t = 256; ++pub const CS7: ::tcflag_t = 512; ++pub const CS8: ::tcflag_t = 768; ++pub const CSTOPB: ::tcflag_t = 1024; ++pub const CREAD: ::tcflag_t = 2048; ++pub const PARENB: ::tcflag_t = 4096; ++pub const PARODD: ::tcflag_t = 8192; ++pub const HUPCL: ::tcflag_t = 16384; ++pub const CLOCAL: ::tcflag_t = 32768; ++pub const CRTSCTS: ::tcflag_t = 65536; ++pub const CRTS_IFLOW: ::tcflag_t = 65536; ++pub const CCTS_OFLOW: ::tcflag_t = 65536; ++pub const CDTRCTS: ::tcflag_t = 131072; ++pub const MDMBUF: ::tcflag_t = 1048576; ++pub const CHWFLOW: ::tcflag_t = 1245184; ++pub const ECHOKE: ::tcflag_t = 1; ++pub const _ECHOE: ::tcflag_t = 2; ++pub const ECHOE: ::tcflag_t = 2; ++pub const _ECHOK: ::tcflag_t = 4; ++pub const ECHOK: ::tcflag_t = 4; ++pub const _ECHO: ::tcflag_t = 8; ++pub const ECHO: ::tcflag_t = 8; ++pub const _ECHONL: ::tcflag_t = 16; ++pub const ECHONL: ::tcflag_t = 16; ++pub const ECHOPRT: ::tcflag_t = 32; ++pub const ECHOCTL: ::tcflag_t = 64; ++pub const _ISIG: ::tcflag_t = 128; ++pub const ISIG: ::tcflag_t = 128; ++pub const _ICANON: ::tcflag_t = 256; ++pub const ICANON: ::tcflag_t = 256; ++pub const ALTWERASE: ::tcflag_t = 512; ++pub const _IEXTEN: ::tcflag_t = 1024; ++pub const IEXTEN: ::tcflag_t = 1024; ++pub const EXTPROC: ::tcflag_t = 2048; ++pub const _TOSTOP: ::tcflag_t = 4194304; ++pub const TOSTOP: ::tcflag_t = 4194304; ++pub const FLUSHO: ::tcflag_t = 8388608; ++pub const NOKERNINFO: ::tcflag_t = 33554432; ++pub const PENDIN: ::tcflag_t = 536870912; ++pub const _NOFLSH: ::tcflag_t = 2147483648; ++pub const NOFLSH: ::tcflag_t = 2147483648; ++pub const VEOF: usize = 0; ++pub const VEOL: usize = 1; ++pub const VEOL2: usize = 2; ++pub const VERASE: usize = 3; ++pub const VWERASE: usize = 4; ++pub const VKILL: usize = 5; ++pub const VREPRINT: usize = 6; ++pub const VINTR: usize = 8; ++pub const VQUIT: usize = 9; ++pub const VSUSP: usize = 10; ++pub const VDSUSP: usize = 11; ++pub const VSTART: usize = 12; ++pub const VSTOP: usize = 13; ++pub const VLNEXT: usize = 14; ++pub const VDISCARD: usize = 15; ++pub const VMIN: usize = 16; ++pub const VTIME: usize = 17; ++pub const VSTATUS: usize = 18; + pub const NCCS: usize = 20; +-pub const B0: speed_t = 0; +-pub const B50: speed_t = 50; +-pub const B75: speed_t = 75; +-pub const B110: speed_t = 110; +-pub const B134: speed_t = 134; +-pub const B150: speed_t = 150; +-pub const B200: speed_t = 200; +-pub const B300: speed_t = 300; +-pub const B600: speed_t = 600; +-pub const B1200: speed_t = 1200; +-pub const B1800: speed_t = 1800; +-pub const B2400: speed_t = 2400; +-pub const B4800: speed_t = 4800; +-pub const B9600: speed_t = 9600; +-pub const B7200: speed_t = 7200; +-pub const B14400: speed_t = 14400; +-pub const B19200: speed_t = 19200; +-pub const B28800: speed_t = 28800; +-pub const B38400: speed_t = 38400; +-pub const EXTA: speed_t = 19200; +-pub const EXTB: speed_t = 38400; +-pub const B57600: speed_t = 57600; +-pub const B76800: speed_t = 76800; +-pub const B115200: speed_t = 115200; +-pub const B230400: speed_t = 230400; +-pub const B460800: speed_t = 460800; +-pub const B500000: speed_t = 500000; +-pub const B576000: speed_t = 576000; +-pub const B921600: speed_t = 921600; +-pub const B1000000: speed_t = 1000000; +-pub const B1152000: speed_t = 1152000; +-pub const B1500000: speed_t = 1500000; +-pub const B2000000: speed_t = 2000000; +-pub const B2500000: speed_t = 2500000; +-pub const B3000000: speed_t = 3000000; +-pub const B3500000: speed_t = 3500000; +-pub const B4000000: speed_t = 4000000; ++pub const B0: ::speed_t = 0; ++pub const B50: ::speed_t = 50; ++pub const B75: ::speed_t = 75; ++pub const B110: ::speed_t = 110; ++pub const B134: ::speed_t = 134; ++pub const B150: ::speed_t = 150; ++pub const B200: ::speed_t = 200; ++pub const B300: ::speed_t = 300; ++pub const B600: ::speed_t = 600; ++pub const B1200: ::speed_t = 1200; ++pub const B1800: ::speed_t = 1800; ++pub const B2400: ::speed_t = 2400; ++pub const B4800: ::speed_t = 4800; ++pub const B9600: ::speed_t = 9600; ++pub const B7200: ::speed_t = 7200; ++pub const B14400: ::speed_t = 14400; ++pub const B19200: ::speed_t = 19200; ++pub const B28800: ::speed_t = 28800; ++pub const B38400: ::speed_t = 38400; ++pub const EXTA: ::speed_t = B19200; ++pub const EXTB: ::speed_t = B38400; ++pub const B57600: ::speed_t = 57600; ++pub const B76800: ::speed_t = 76800; ++pub const B115200: ::speed_t = 115200; ++pub const B230400: ::speed_t = 230400; ++pub const B460800: ::speed_t = 460800; ++pub const B500000: ::speed_t = 500000; ++pub const B576000: ::speed_t = 576000; ++pub const B921600: ::speed_t = 921600; ++pub const B1000000: ::speed_t = 1000000; ++pub const B1152000: ::speed_t = 1152000; ++pub const B1500000: ::speed_t = 1500000; ++pub const B2000000: ::speed_t = 2000000; ++pub const B2500000: ::speed_t = 2500000; ++pub const B3000000: ::speed_t = 3000000; ++pub const B3500000: ::speed_t = 3500000; ++pub const B4000000: ::speed_t = 4000000; + pub const TCSANOW: ::c_int = 0; + pub const TCSADRAIN: ::c_int = 1; + pub const TCSAFLUSH: ::c_int = 2; +@@ -1286,10 +1772,10 @@ pub const TCOOFF: ::c_int = 1; + pub const TCOON: ::c_int = 2; + pub const TCIOFF: ::c_int = 3; + pub const TCION: ::c_int = 4; +-pub const TTYDEF_IFLAG: tcflag_t = 11042; +-pub const TTYDEF_LFLAG: tcflag_t = 1483; +-pub const TTYDEF_CFLAG: tcflag_t = 23040; +-pub const TTYDEF_SPEED: tcflag_t = 9600; ++pub const TTYDEF_IFLAG: ::tcflag_t = 11042; ++pub const TTYDEF_LFLAG: ::tcflag_t = 1483; ++pub const TTYDEF_CFLAG: ::tcflag_t = 23040; ++pub const TTYDEF_SPEED: ::tcflag_t = 9600; + pub const CEOL: u8 = 0u8; + pub const CERASE: u8 = 127; + pub const CMIN: u8 = 1; +@@ -1467,35 +1953,35 @@ pub const SF_NOUNLINK: ::c_uint = 1048576; + pub const SF_SNAPSHOT: ::c_uint = 2097152; + pub const UTIME_NOW: ::c_long = -1; + pub const UTIME_OMIT: ::c_long = -2; +-pub const S_IFMT: mode_t = 61440; +-pub const S_IFDIR: mode_t = 16384; +-pub const S_IFCHR: mode_t = 8192; +-pub const S_IFBLK: mode_t = 24576; +-pub const S_IFREG: mode_t = 32768; +-pub const S_IFIFO: mode_t = 4096; +-pub const S_IFLNK: mode_t = 40960; +-pub const S_IFSOCK: mode_t = 49152; +-pub const S_ISUID: mode_t = 2048; +-pub const S_ISGID: mode_t = 1024; +-pub const S_ISVTX: mode_t = 512; +-pub const S_IRUSR: mode_t = 256; +-pub const S_IWUSR: mode_t = 128; +-pub const S_IXUSR: mode_t = 64; +-pub const S_IRWXU: mode_t = 448; +-pub const S_IREAD: mode_t = 256; +-pub const S_IWRITE: mode_t = 128; +-pub const S_IEXEC: mode_t = 64; +-pub const S_IRGRP: mode_t = 32; +-pub const S_IWGRP: mode_t = 16; +-pub const S_IXGRP: mode_t = 8; +-pub const S_IRWXG: mode_t = 56; +-pub const S_IROTH: mode_t = 4; +-pub const S_IWOTH: mode_t = 2; +-pub const S_IXOTH: mode_t = 1; +-pub const S_IRWXO: mode_t = 7; +-pub const ACCESSPERMS: mode_t = 511; +-pub const ALLPERMS: mode_t = 4095; +-pub const DEFFILEMODE: mode_t = 438; ++pub const S_IFMT: ::mode_t = 61440; ++pub const S_IFDIR: ::mode_t = 16384; ++pub const S_IFCHR: ::mode_t = 8192; ++pub const S_IFBLK: ::mode_t = 24576; ++pub const S_IFREG: ::mode_t = 32768; ++pub const S_IFIFO: ::mode_t = 4096; ++pub const S_IFLNK: ::mode_t = 40960; ++pub const S_IFSOCK: ::mode_t = 49152; ++pub const S_ISUID: ::mode_t = 2048; ++pub const S_ISGID: ::mode_t = 1024; ++pub const S_ISVTX: ::mode_t = 512; ++pub const S_IRUSR: ::mode_t = 256; ++pub const S_IWUSR: ::mode_t = 128; ++pub const S_IXUSR: ::mode_t = 64; ++pub const S_IRWXU: ::mode_t = 448; ++pub const S_IREAD: ::mode_t = 256; ++pub const S_IWRITE: ::mode_t = 128; ++pub const S_IEXEC: ::mode_t = 64; ++pub const S_IRGRP: ::mode_t = 32; ++pub const S_IWGRP: ::mode_t = 16; ++pub const S_IXGRP: ::mode_t = 8; ++pub const S_IRWXG: ::mode_t = 56; ++pub const S_IROTH: ::mode_t = 4; ++pub const S_IWOTH: ::mode_t = 2; ++pub const S_IXOTH: ::mode_t = 1; ++pub const S_IRWXO: ::mode_t = 7; ++pub const ACCESSPERMS: ::mode_t = 511; ++pub const ALLPERMS: ::mode_t = 4095; ++pub const DEFFILEMODE: ::mode_t = 438; + pub const S_BLKSIZE: usize = 512; + pub const STATX_TYPE: ::c_uint = 1; + pub const STATX_MODE: ::c_uint = 2; +@@ -1547,34 +2033,34 @@ pub const TIOCPKT_IOCTL: ::c_int = 64; + pub const TTYDISC: ::c_int = 0; + pub const TABLDISC: ::c_int = 3; + pub const SLIPDISC: ::c_int = 4; +-pub const TANDEM: tcflag_t = 1; +-pub const CBREAK: tcflag_t = 2; +-pub const LCASE: tcflag_t = 4; +-pub const CRMOD: tcflag_t = 16; +-pub const RAW: tcflag_t = 32; +-pub const ODDP: tcflag_t = 64; +-pub const EVENP: tcflag_t = 128; +-pub const ANYP: tcflag_t = 192; +-pub const NLDELAY: tcflag_t = 768; +-pub const NL2: tcflag_t = 512; +-pub const NL3: tcflag_t = 768; +-pub const TBDELAY: tcflag_t = 3072; +-pub const XTABS: tcflag_t = 3072; +-pub const CRDELAY: tcflag_t = 12288; +-pub const VTDELAY: tcflag_t = 16384; +-pub const BSDELAY: tcflag_t = 32768; +-pub const ALLDELAY: tcflag_t = 65280; +-pub const CRTBS: tcflag_t = 65536; +-pub const PRTERA: tcflag_t = 131072; +-pub const CRTERA: tcflag_t = 262144; +-pub const TILDE: tcflag_t = 524288; +-pub const LITOUT: tcflag_t = 2097152; +-pub const NOHANG: tcflag_t = 16777216; +-pub const L001000: tcflag_t = 33554432; +-pub const CRTKIL: tcflag_t = 67108864; +-pub const PASS8: tcflag_t = 134217728; +-pub const CTLECH: tcflag_t = 268435456; +-pub const DECCTQ: tcflag_t = 1073741824; ++pub const TANDEM: ::tcflag_t = 1; ++pub const CBREAK: ::tcflag_t = 2; ++pub const LCASE: ::tcflag_t = 4; ++pub const CRMOD: ::tcflag_t = 16; ++pub const RAW: ::tcflag_t = 32; ++pub const ODDP: ::tcflag_t = 64; ++pub const EVENP: ::tcflag_t = 128; ++pub const ANYP: ::tcflag_t = 192; ++pub const NLDELAY: ::tcflag_t = 768; ++pub const NL2: ::tcflag_t = 512; ++pub const NL3: ::tcflag_t = 768; ++pub const TBDELAY: ::tcflag_t = 3072; ++pub const XTABS: ::tcflag_t = 3072; ++pub const CRDELAY: ::tcflag_t = 12288; ++pub const VTDELAY: ::tcflag_t = 16384; ++pub const BSDELAY: ::tcflag_t = 32768; ++pub const ALLDELAY: ::tcflag_t = 65280; ++pub const CRTBS: ::tcflag_t = 65536; ++pub const PRTERA: ::tcflag_t = 131072; ++pub const CRTERA: ::tcflag_t = 262144; ++pub const TILDE: ::tcflag_t = 524288; ++pub const LITOUT: ::tcflag_t = 2097152; ++pub const NOHANG: ::tcflag_t = 16777216; ++pub const L001000: ::tcflag_t = 33554432; ++pub const CRTKIL: ::tcflag_t = 67108864; ++pub const PASS8: ::tcflag_t = 134217728; ++pub const CTLECH: ::tcflag_t = 268435456; ++pub const DECCTQ: ::tcflag_t = 1073741824; + + pub const FIONBIO: ::c_ulong = 0xa008007e; + pub const FIONREAD: ::c_ulong = 0x6008007f; +@@ -2007,7 +2493,6 @@ pub const TCPOPT_TSTAMP_HDR: u32 = 16844810; + pub const TCP_MSS: usize = 512; + pub const TCP_MAXWIN: usize = 65535; + pub const TCP_MAX_WINSHIFT: usize = 14; +-pub const SOL_TCP: ::c_int = 6; + pub const TCPI_OPT_TIMESTAMPS: u8 = 1; + pub const TCPI_OPT_SACK: u8 = 2; + pub const TCPI_OPT_WSCALE: u8 = 4; +@@ -2042,21 +2527,64 @@ pub const PROT_NONE: ::c_int = 0; + pub const PROT_READ: ::c_int = 4; + pub const PROT_WRITE: ::c_int = 2; + pub const PROT_EXEC: ::c_int = 1; +-pub const MAP_PRIVATE: ::c_int = 0; + pub const MAP_FILE: ::c_int = 1; + pub const MAP_ANON: ::c_int = 2; +-pub const MAP_SHARED: ::c_int = 16; ++pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; ++pub const MAP_TYPE: ::c_int = 15; + pub const MAP_COPY: ::c_int = 32; ++pub const MAP_SHARED: ::c_int = 16; ++pub const MAP_PRIVATE: ::c_int = 0; + pub const MAP_FIXED: ::c_int = 256; ++pub const MAP_NOEXTEND: ::c_int = 512; ++pub const MAP_HASSEMPHORE: ::c_int = 1024; ++pub const MAP_INHERIT: ::c_int = 2048; + pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; +-pub const MS_SYNC: ::c_int = 0; +-pub const MS_ASYNC: ::c_int = 1; +-pub const MS_INVALIDATE: ::c_int = 2; + pub const MADV_NORMAL: ::c_int = 0; + pub const MADV_RANDOM: ::c_int = 1; + pub const MADV_SEQUENTIAL: ::c_int = 2; + pub const MADV_WILLNEED: ::c_int = 3; + pub const MADV_DONTNEED: ::c_int = 4; ++pub const POSIX_MADV_NORMAL: ::c_int = 0; ++pub const POSIX_MADV_RANDOM: ::c_int = 1; ++pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; ++pub const POSIX_MADV_WILLNEED: ::c_int = 3; ++pub const POSIX_MADV_WONTNEED: ::c_int = 4; ++ ++pub const MS_ASYNC: ::c_int = 1; ++pub const MS_SYNC: ::c_int = 0; ++pub const MS_INVALIDATE: ::c_int = 2; ++pub const MREMAP_MAYMOVE: ::c_int = 1; ++pub const MREMAP_FIXED: ::c_int = 2; ++pub const MCL_CURRENT: ::c_int = 0x0001; ++pub const MCL_FUTURE: ::c_int = 0x0002; ++ ++// spawn.h ++pub const POSIX_SPAWN_USEVFORK: ::c_int = 64; ++pub const POSIX_SPAWN_SETSID: ::c_int = 128; ++ ++// sys/syslog.h ++pub const LOG_CRON: ::c_int = 9 << 3; ++pub const LOG_AUTHPRIV: ::c_int = 10 << 3; ++pub const LOG_FTP: ::c_int = 11 << 3; ++pub const LOG_PERROR: ::c_int = 0x20; ++ ++// net/if.h ++pub const IFF_UP: ::c_int = 0x1; ++pub const IFF_BROADCAST: ::c_int = 0x2; ++pub const IFF_DEBUG: ::c_int = 0x4; ++pub const IFF_LOOPBACK: ::c_int = 0x8; ++pub const IFF_POINTOPOINT: ::c_int = 0x10; ++pub const IFF_NOTRAILERS: ::c_int = 0x20; ++pub const IFF_RUNNING: ::c_int = 0x40; ++pub const IFF_NOARP: ::c_int = 0x80; ++pub const IFF_PROMISC: ::c_int = 0x100; ++pub const IFF_ALLMULTI: ::c_int = 0x200; ++pub const IFF_MASTER: ::c_int = 0x400; ++pub const IFF_SLAVE: ::c_int = 0x800; ++pub const IFF_MULTICAST: ::c_int = 0x1000; ++pub const IFF_PORTSEL: ::c_int = 0x2000; ++pub const IFF_AUTOMEDIA: ::c_int = 0x4000; ++pub const IFF_DYNAMIC: ::c_int = 0x8000; + + // random.h + pub const GRND_NONBLOCK: ::c_uint = 1; +@@ -2391,21 +2919,21 @@ pub const PTHREAD_MUTEX_RECURSIVE: __pthread_mutex_type = 2; + pub const PTHREAD_MUTEX_STALLED: __pthread_mutex_robustness = 0; + pub const PTHREAD_MUTEX_ROBUST: __pthread_mutex_robustness = 256; + +-pub const RLIMIT_CPU: __rlimit_resource = 0; +-pub const RLIMIT_FSIZE: __rlimit_resource = 1; +-pub const RLIMIT_DATA: __rlimit_resource = 2; +-pub const RLIMIT_STACK: __rlimit_resource = 3; +-pub const RLIMIT_CORE: __rlimit_resource = 4; +-pub const RLIMIT_RSS: __rlimit_resource = 5; +-pub const RLIMIT_MEMLOCK: __rlimit_resource = 6; +-pub const RLIMIT_NPROC: __rlimit_resource = 7; +-pub const RLIMIT_OFILE: __rlimit_resource = 8; +-pub const RLIMIT_NOFILE: __rlimit_resource = 8; +-pub const RLIMIT_SBSIZE: __rlimit_resource = 9; +-pub const RLIMIT_AS: __rlimit_resource = 10; +-pub const RLIMIT_VMEM: __rlimit_resource = 10; +-pub const RLIMIT_NLIMITS: __rlimit_resource = 11; +-pub const RLIM_NLIMITS: __rlimit_resource = 11; ++pub const RLIMIT_CPU: ::__rlimit_resource_t = 0; ++pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1; ++pub const RLIMIT_DATA: ::__rlimit_resource_t = 2; ++pub const RLIMIT_STACK: ::__rlimit_resource_t = 3; ++pub const RLIMIT_CORE: ::__rlimit_resource_t = 4; ++pub const RLIMIT_RSS: ::__rlimit_resource_t = 5; ++pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 6; ++pub const RLIMIT_NPROC: ::__rlimit_resource_t = 7; ++pub const RLIMIT_OFILE: ::__rlimit_resource_t = 8; ++pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 8; ++pub const RLIMIT_SBSIZE: ::__rlimit_resource_t = 9; ++pub const RLIMIT_AS: ::__rlimit_resource_t = 10; ++pub const RLIMIT_VMEM: ::__rlimit_resource_t = 10; ++pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = 11; ++pub const RLIM_NLIMITS: ::__rlimit_resource_t = 11; + + pub const RUSAGE_SELF: __rusage_who = 0; + pub const RUSAGE_CHILDREN: __rusage_who = -1; +@@ -2431,6 +2959,7 @@ pub const MSG_CTRUNC: ::c_int = 32; + pub const MSG_WAITALL: ::c_int = 64; + pub const MSG_DONTWAIT: ::c_int = 128; + pub const MSG_NOSIGNAL: ::c_int = 1024; ++pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000; + + pub const SCM_RIGHTS: ::c_int = 1; + pub const SCM_TIMESTAMP: ::c_int = 2; +@@ -2550,6 +3079,11 @@ pub const RTLD_DI_TLS_DATA: ::c_int = 10; + pub const RTLD_DI_PHDR: ::c_int = 11; + pub const RTLD_DI_MAX: ::c_int = 11; + ++pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void; ++pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; ++pub const RTLD_NODELETE: ::c_int = 0x1000; ++pub const RTLD_NOW: ::c_int = 0x2; ++ + pub const SI_ASYNCIO: ::c_int = -4; + pub const SI_MESGQ: ::c_int = -3; + pub const SI_TIMER: ::c_int = -2; +@@ -2693,8 +3227,105 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { + }; + pub const PTHREAD_STACK_MIN: ::size_t = 0; + ++const_fn! { ++ {const} fn CMSG_ALIGN(len: usize) -> usize { ++ len + ::mem::size_of::<usize>() - 1 & !(::mem::size_of::<usize>() - 1) ++ } ++} ++ + // functions + f! { ++ pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { ++ if (*mhdr).msg_controllen as usize >= ::mem::size_of::<cmsghdr>() { ++ (*mhdr).msg_control as *mut cmsghdr ++ } else { ++ 0 as *mut cmsghdr ++ } ++ } ++ ++ pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut ::c_uchar { ++ cmsg.offset(1) as *mut ::c_uchar ++ } ++ ++ pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { ++ (CMSG_ALIGN(length as usize) + CMSG_ALIGN(::mem::size_of::<cmsghdr>())) ++ as ::c_uint ++ } ++ ++ pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { ++ CMSG_ALIGN(::mem::size_of::<cmsghdr>()) as ::c_uint + length ++ } ++ ++ pub fn CMSG_NXTHDR(mhdr: *const msghdr, ++ cmsg: *const cmsghdr) -> *mut cmsghdr { ++ if ((*cmsg).cmsg_len as usize) < ::mem::size_of::<cmsghdr>() { ++ return 0 as *mut cmsghdr; ++ }; ++ let next = (cmsg as usize + ++ super::CMSG_ALIGN((*cmsg).cmsg_len as usize)) ++ as *mut cmsghdr; ++ let max = (*mhdr).msg_control as usize ++ + (*mhdr).msg_controllen as usize; ++ if (next.offset(1)) as usize > max || ++ next as usize + super::CMSG_ALIGN((*next).cmsg_len as usize) > max ++ { ++ 0 as *mut cmsghdr ++ } else { ++ next as *mut cmsghdr ++ } ++ } ++ ++ pub fn CPU_ALLOC_SIZE(count: ::c_int) -> ::size_t { ++ let _dummy: cpu_set_t = ::mem::zeroed(); ++ let size_in_bits = 8 * ::mem::size_of_val(&_dummy.bits[0]); ++ ((count as ::size_t + size_in_bits - 1) / 8) as ::size_t ++ } ++ ++ pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { ++ for slot in cpuset.bits.iter_mut() { ++ *slot = 0; ++ } ++ } ++ ++ pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { ++ let size_in_bits ++ = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc ++ let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); ++ cpuset.bits[idx] |= 1 << offset; ++ () ++ } ++ ++ pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { ++ let size_in_bits ++ = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc ++ let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); ++ cpuset.bits[idx] &= !(1 << offset); ++ () ++ } ++ ++ pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { ++ let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); ++ let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); ++ 0 != (cpuset.bits[idx] & (1 << offset)) ++ } ++ ++ pub fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> ::c_int { ++ let mut s: u32 = 0; ++ let size_of_mask = ::mem::size_of_val(&cpuset.bits[0]); ++ for i in cpuset.bits[..(size / size_of_mask)].iter() { ++ s += i.count_ones(); ++ }; ++ s as ::c_int ++ } ++ ++ pub fn CPU_COUNT(cpuset: &cpu_set_t) -> ::c_int { ++ CPU_COUNT_S(::mem::size_of::<cpu_set_t>(), cpuset) ++ } ++ ++ pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { ++ set1.bits == set2.bits ++ } ++ + pub fn major(dev: ::dev_t) -> ::c_uint { + ((dev >> 8) & 0xff) as ::c_uint + } +@@ -2703,6 +3334,14 @@ f! { + (dev & 0xffff00ff) as ::c_uint + } + ++ pub fn IPTOS_TOS(tos: u8) -> u8 { ++ tos & IPTOS_TOS_MASK ++ } ++ ++ pub fn IPTOS_PREC(tos: u8) -> u8 { ++ tos & IPTOS_PREC_MASK ++ } ++ + pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { + let fd = fd as usize; + let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; +@@ -2756,11 +3395,26 @@ extern "C" { + + pub fn __libc_current_sigrtmax() -> ::c_int; + ++ pub fn wait4( ++ pid: ::pid_t, ++ status: *mut ::c_int, ++ options: ::c_int, ++ rusage: *mut ::rusage, ++ ) -> ::pid_t; ++ + pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) + -> ::c_int; + + pub fn sigwait(__set: *const sigset_t, __sig: *mut ::c_int) -> ::c_int; + ++ pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; ++ pub fn sigtimedwait( ++ set: *const sigset_t, ++ info: *mut siginfo_t, ++ timeout: *const ::timespec, ++ ) -> ::c_int; ++ pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; ++ + pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int; + + pub fn ioctl(__fd: ::c_int, __request: ::c_ulong, ...) -> ::c_int; +@@ -2806,10 +3460,72 @@ extern "C" { + offset: ::off64_t, + ) -> ::ssize_t; + ++ pub fn fread_unlocked( ++ buf: *mut ::c_void, ++ size: ::size_t, ++ nobj: ::size_t, ++ stream: *mut ::FILE, ++ ) -> ::size_t; ++ ++ pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; ++ pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; ++ pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; ++ pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; ++ pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; ++ pub fn aio_suspend( ++ aiocb_list: *const *const aiocb, ++ nitems: ::c_int, ++ timeout: *const ::timespec, ++ ) -> ::c_int; ++ pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; ++ pub fn lio_listio( ++ mode: ::c_int, ++ aiocb_list: *const *mut aiocb, ++ nitems: ::c_int, ++ sevp: *mut ::sigevent, ++ ) -> ::c_int; ++ ++ pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; ++ pub fn mq_close(mqd: ::mqd_t) -> ::c_int; ++ pub fn mq_unlink(name: *const ::c_char) -> ::c_int; ++ pub fn mq_receive( ++ mqd: ::mqd_t, ++ msg_ptr: *mut ::c_char, ++ msg_len: ::size_t, ++ msg_prio: *mut ::c_uint, ++ ) -> ::ssize_t; ++ pub fn mq_timedreceive( ++ mqd: ::mqd_t, ++ msg_ptr: *mut ::c_char, ++ msg_len: ::size_t, ++ msg_prio: *mut ::c_uint, ++ abs_timeout: *const ::timespec, ++ ) -> ::ssize_t; ++ pub fn mq_send( ++ mqd: ::mqd_t, ++ msg_ptr: *const ::c_char, ++ msg_len: ::size_t, ++ msg_prio: ::c_uint, ++ ) -> ::c_int; ++ pub fn mq_timedsend( ++ mqd: ::mqd_t, ++ msg_ptr: *const ::c_char, ++ msg_len: ::size_t, ++ msg_prio: ::c_uint, ++ abs_timeout: *const ::timespec, ++ ) -> ::c_int; ++ pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; ++ pub fn mq_setattr(mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr) -> ::c_int; ++ + pub fn lseek64(__fd: ::c_int, __offset: __off64_t, __whence: ::c_int) -> __off64_t; + + pub fn lseek(__fd: ::c_int, __offset: __off_t, __whence: ::c_int) -> __off_t; + ++ pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int; ++ pub fn fseeko64(stream: *mut ::FILE, offset: ::off64_t, whence: ::c_int) -> ::c_int; ++ pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int; ++ pub fn ftello64(stream: *mut ::FILE) -> ::off64_t; ++ + pub fn bind(__fd: ::c_int, __addr: *const sockaddr, __len: socklen_t) -> ::c_int; + + pub fn accept4( +@@ -2819,6 +3535,13 @@ extern "C" { + flg: ::c_int, + ) -> ::c_int; + ++ pub fn ppoll( ++ fds: *mut ::pollfd, ++ nfds: nfds_t, ++ timeout: *const ::timespec, ++ sigmask: *const sigset_t, ++ ) -> ::c_int; ++ + pub fn recvmsg(__fd: ::c_int, __message: *mut msghdr, __flags: ::c_int) -> ::ssize_t; + + pub fn sendmsg(__fd: ::c_int, __message: *const msghdr, __flags: ::c_int) -> ssize_t; +@@ -2832,12 +3555,95 @@ extern "C" { + addrlen: *mut ::socklen_t, + ) -> ::ssize_t; + ++ pub fn sendfile( ++ out_fd: ::c_int, ++ in_fd: ::c_int, ++ offset: *mut off_t, ++ count: ::size_t, ++ ) -> ::ssize_t; ++ pub fn sendfile64( ++ out_fd: ::c_int, ++ in_fd: ::c_int, ++ offset: *mut off64_t, ++ count: ::size_t, ++ ) -> ::ssize_t; ++ + pub fn shutdown(__fd: ::c_int, __how: ::c_int) -> ::c_int; + + pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; ++ pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int; ++ pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int; ++ pub fn if_nameindex() -> *mut if_nameindex; ++ pub fn if_freenameindex(ptr: *mut if_nameindex); ++ ++ pub fn getnameinfo( ++ sa: *const ::sockaddr, ++ salen: ::socklen_t, ++ host: *mut ::c_char, ++ hostlen: ::socklen_t, ++ serv: *mut ::c_char, ++ sevlen: ::socklen_t, ++ flags: ::c_int, ++ ) -> ::c_int; ++ ++ pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int; ++ pub fn freeifaddrs(ifa: *mut ::ifaddrs); + + pub fn uname(buf: *mut ::utsname) -> ::c_int; + ++ pub fn gethostid() -> ::c_long; ++ pub fn sethostid(hostid: ::c_long) -> ::c_int; ++ ++ pub fn setpwent(); ++ pub fn endpwent(); ++ pub fn getpwent() -> *mut passwd; ++ pub fn setgrent(); ++ pub fn endgrent(); ++ pub fn getgrent() -> *mut ::group; ++ pub fn setspent(); ++ pub fn endspent(); ++ pub fn getspent() -> *mut spwd; ++ ++ pub fn getspnam(name: *const ::c_char) -> *mut spwd; ++ ++ pub fn getpwent_r( ++ pwd: *mut ::passwd, ++ buf: *mut ::c_char, ++ buflen: ::size_t, ++ result: *mut *mut ::passwd, ++ ) -> ::c_int; ++ pub fn getgrent_r( ++ grp: *mut ::group, ++ buf: *mut ::c_char, ++ buflen: ::size_t, ++ result: *mut *mut ::group, ++ ) -> ::c_int; ++ pub fn fgetpwent_r( ++ stream: *mut ::FILE, ++ pwd: *mut ::passwd, ++ buf: *mut ::c_char, ++ buflen: ::size_t, ++ result: *mut *mut ::passwd, ++ ) -> ::c_int; ++ pub fn fgetgrent_r( ++ stream: *mut ::FILE, ++ grp: *mut ::group, ++ buf: *mut ::c_char, ++ buflen: ::size_t, ++ result: *mut *mut ::group, ++ ) -> ::c_int; ++ ++ pub fn putpwent(p: *const ::passwd, stream: *mut ::FILE) -> ::c_int; ++ pub fn putgrent(grp: *const ::group, stream: *mut ::FILE) -> ::c_int; ++ ++ pub fn getpwnam_r( ++ name: *const ::c_char, ++ pwd: *mut passwd, ++ buf: *mut ::c_char, ++ buflen: ::size_t, ++ result: *mut *mut passwd, ++ ) -> ::c_int; ++ + pub fn getpwuid_r( + uid: ::uid_t, + pwd: *mut passwd, +@@ -2846,18 +3652,105 @@ extern "C" { + result: *mut *mut passwd, + ) -> ::c_int; + ++ pub fn fgetspent_r( ++ fp: *mut ::FILE, ++ spbuf: *mut ::spwd, ++ buf: *mut ::c_char, ++ buflen: ::size_t, ++ spbufp: *mut *mut ::spwd, ++ ) -> ::c_int; ++ pub fn sgetspent_r( ++ s: *const ::c_char, ++ spbuf: *mut ::spwd, ++ buf: *mut ::c_char, ++ buflen: ::size_t, ++ spbufp: *mut *mut ::spwd, ++ ) -> ::c_int; ++ pub fn getspent_r( ++ spbuf: *mut ::spwd, ++ buf: *mut ::c_char, ++ buflen: ::size_t, ++ spbufp: *mut *mut ::spwd, ++ ) -> ::c_int; ++ ++ pub fn getspnam_r( ++ name: *const ::c_char, ++ spbuf: *mut spwd, ++ buf: *mut ::c_char, ++ buflen: ::size_t, ++ spbufp: *mut *mut spwd, ++ ) -> ::c_int; ++ ++ // mntent.h ++ pub fn getmntent_r( ++ stream: *mut ::FILE, ++ mntbuf: *mut ::mntent, ++ buf: *mut ::c_char, ++ buflen: ::c_int, ++ ) -> *mut ::mntent; ++ ++ pub fn utmpname(file: *const ::c_char) -> ::c_int; ++ pub fn utmpxname(file: *const ::c_char) -> ::c_int; ++ pub fn getutxent() -> *mut utmpx; ++ pub fn getutxid(ut: *const utmpx) -> *mut utmpx; ++ pub fn getutxline(ut: *const utmpx) -> *mut utmpx; ++ pub fn pututxline(ut: *const utmpx) -> *mut utmpx; ++ pub fn setutxent(); ++ pub fn endutxent(); ++ ++ pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t, suid: *mut ::uid_t) -> ::c_int; ++ pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t, sgid: *mut ::gid_t) -> ::c_int; ++ pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int; ++ pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int; ++ ++ pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int; ++ ++ pub fn getgrgid(gid: ::gid_t) -> *mut ::group; ++ pub fn getgrgid_r( ++ gid: ::gid_t, ++ grp: *mut ::group, ++ buf: *mut ::c_char, ++ buflen: ::size_t, ++ result: *mut *mut ::group, ++ ) -> ::c_int; ++ ++ pub fn getgrnam(name: *const ::c_char) -> *mut ::group; ++ pub fn getgrnam_r( ++ name: *const ::c_char, ++ grp: *mut ::group, ++ buf: *mut ::c_char, ++ buflen: ::size_t, ++ result: *mut *mut ::group, ++ ) -> ::c_int; ++ ++ pub fn getgrouplist( ++ user: *const ::c_char, ++ group: ::gid_t, ++ groups: *mut ::gid_t, ++ ngroups: *mut ::c_int, ++ ) -> ::c_int; ++ + pub fn setgroups(ngroups: ::size_t, ptr: *const ::gid_t) -> ::c_int; + ++ pub fn acct(filename: *const ::c_char) -> ::c_int; ++ ++ pub fn setmntent(filename: *const ::c_char, ty: *const ::c_char) -> *mut ::FILE; ++ pub fn getmntent(stream: *mut ::FILE) -> *mut ::mntent; ++ pub fn addmntent(stream: *mut ::FILE, mnt: *const ::mntent) -> ::c_int; ++ pub fn endmntent(streamp: *mut ::FILE) -> ::c_int; ++ pub fn hasmntopt(mnt: *const ::mntent, opt: *const ::c_char) -> *mut ::c_char; ++ + pub fn pthread_create( + native: *mut ::pthread_t, + attr: *const ::pthread_attr_t, + f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, + value: *mut ::c_void, + ) -> ::c_int; +- pub fn pthread_kill(__threadid: pthread_t, __signo: ::c_int) -> ::c_int; ++ pub fn pthread_kill(__threadid: ::pthread_t, __signo: ::c_int) -> ::c_int; ++ pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int; + pub fn __pthread_equal(__t1: __pthread_t, __t2: __pthread_t) -> ::c_int; + +- pub fn pthread_getattr_np(__thr: pthread_t, __attr: *mut pthread_attr_t) -> ::c_int; ++ pub fn pthread_getattr_np(__thr: ::pthread_t, __attr: *mut pthread_attr_t) -> ::c_int; + + pub fn pthread_attr_getguardsize( + __attr: *const pthread_attr_t, +@@ -2870,11 +3763,70 @@ extern "C" { + __stacksize: *mut ::size_t, + ) -> ::c_int; + ++ pub fn pthread_attr_getguardsize( ++ attr: *const ::pthread_attr_t, ++ guardsize: *mut ::size_t, ++ ) -> ::c_int; ++ pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; ++ ++ pub fn pthread_mutexattr_getpshared( ++ attr: *const pthread_mutexattr_t, ++ pshared: *mut ::c_int, ++ ) -> ::c_int; ++ pub fn pthread_mutexattr_setpshared( ++ attr: *mut pthread_mutexattr_t, ++ pshared: ::c_int, ++ ) -> ::c_int; ++ ++ pub fn pthread_mutex_timedlock( ++ lock: *mut pthread_mutex_t, ++ abstime: *const ::timespec, ++ ) -> ::c_int; ++ ++ pub fn pthread_rwlockattr_getpshared( ++ attr: *const pthread_rwlockattr_t, ++ val: *mut ::c_int, ++ ) -> ::c_int; ++ pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int; ++ ++ pub fn pthread_condattr_getclock( ++ attr: *const pthread_condattr_t, ++ clock_id: *mut clockid_t, ++ ) -> ::c_int; + pub fn pthread_condattr_setclock( + __attr: *mut pthread_condattr_t, + __clock_id: __clockid_t, + ) -> ::c_int; ++ pub fn pthread_condattr_getpshared( ++ attr: *const pthread_condattr_t, ++ pshared: *mut ::c_int, ++ ) -> ::c_int; ++ pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int; ++ ++ pub fn pthread_once(control: *mut pthread_once_t, routine: extern "C" fn()) -> ::c_int; + ++ pub fn pthread_barrierattr_init(attr: *mut ::pthread_barrierattr_t) -> ::c_int; ++ pub fn pthread_barrierattr_destroy(attr: *mut ::pthread_barrierattr_t) -> ::c_int; ++ pub fn pthread_barrierattr_getpshared( ++ attr: *const ::pthread_barrierattr_t, ++ shared: *mut ::c_int, ++ ) -> ::c_int; ++ pub fn pthread_barrierattr_setpshared( ++ attr: *mut ::pthread_barrierattr_t, ++ shared: ::c_int, ++ ) -> ::c_int; ++ pub fn pthread_barrier_init( ++ barrier: *mut pthread_barrier_t, ++ attr: *const ::pthread_barrierattr_t, ++ count: ::c_uint, ++ ) -> ::c_int; ++ pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> ::c_int; ++ pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> ::c_int; ++ pub fn pthread_spin_init(lock: *mut ::pthread_spinlock_t, pshared: ::c_int) -> ::c_int; ++ pub fn pthread_spin_destroy(lock: *mut ::pthread_spinlock_t) -> ::c_int; ++ pub fn pthread_spin_lock(lock: *mut ::pthread_spinlock_t) -> ::c_int; ++ pub fn pthread_spin_trylock(lock: *mut ::pthread_spinlock_t) -> ::c_int; ++ pub fn pthread_spin_unlock(lock: *mut ::pthread_spinlock_t) -> ::c_int; + pub fn pthread_atfork( + prepare: ::Option<unsafe extern "C" fn()>, + parent: ::Option<unsafe extern "C" fn()>, +@@ -2887,9 +3839,72 @@ extern "C" { + __oldmask: *mut __sigset_t, + ) -> ::c_int; + ++ pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int; ++ pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int; ++ pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; ++ pub fn sched_setscheduler( ++ pid: ::pid_t, ++ policy: ::c_int, ++ param: *const ::sched_param, ++ ) -> ::c_int; ++ pub fn pthread_getschedparam( ++ native: ::pthread_t, ++ policy: *mut ::c_int, ++ param: *mut ::sched_param, ++ ) -> ::c_int; ++ pub fn pthread_setschedparam( ++ native: ::pthread_t, ++ policy: ::c_int, ++ param: *const ::sched_param, ++ ) -> ::c_int; ++ ++ pub fn pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int; ++ ++ pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; ++ pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; ++ pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; ++ pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; ++ + pub fn clock_getres(__clock_id: clockid_t, __res: *mut ::timespec) -> ::c_int; + pub fn clock_gettime(__clock_id: clockid_t, __tp: *mut ::timespec) -> ::c_int; + pub fn clock_settime(__clock_id: clockid_t, __tp: *const ::timespec) -> ::c_int; ++ pub fn clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int; ++ ++ pub fn clock_nanosleep( ++ clk_id: ::clockid_t, ++ flags: ::c_int, ++ rqtp: *const ::timespec, ++ rmtp: *mut ::timespec, ++ ) -> ::c_int; ++ ++ pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int; ++ pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int; ++ ++ pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char; ++ pub fn ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *mut ::c_char; ++ ++ pub fn strftime( ++ s: *mut ::c_char, ++ max: ::size_t, ++ format: *const ::c_char, ++ tm: *const ::tm, ++ ) -> ::size_t; ++ pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char; ++ ++ pub fn timer_create( ++ clockid: ::clockid_t, ++ sevp: *mut ::sigevent, ++ timerid: *mut ::timer_t, ++ ) -> ::c_int; ++ pub fn timer_delete(timerid: ::timer_t) -> ::c_int; ++ pub fn timer_getoverrun(timerid: ::timer_t) -> ::c_int; ++ pub fn timer_gettime(timerid: ::timer_t, curr_value: *mut ::itimerspec) -> ::c_int; ++ pub fn timer_settime( ++ timerid: ::timer_t, ++ flags: ::c_int, ++ new_value: *const ::itimerspec, ++ old_value: *mut ::itimerspec, ++ ) -> ::c_int; + + pub fn fstat(__fd: ::c_int, __buf: *mut stat) -> ::c_int; + pub fn fstat64(__fd: ::c_int, __buf: *mut stat64) -> ::c_int; +@@ -2907,6 +3922,14 @@ extern "C" { + __flag: ::c_int, + ) -> ::c_int; + ++ pub fn statx( ++ dirfd: ::c_int, ++ pathname: *const c_char, ++ flags: ::c_int, ++ mask: ::c_uint, ++ statxbuf: *mut statx, ++ ) -> ::c_int; ++ + pub fn ftruncate(__fd: ::c_int, __length: __off_t) -> ::c_int; + pub fn ftruncate64(__fd: ::c_int, __length: __off64_t) -> ::c_int; + pub fn truncate64(__file: *const ::c_char, __length: __off64_t) -> ::c_int; +@@ -2930,6 +3953,175 @@ extern "C" { + pub fn openat(__fd: ::c_int, __file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int; + pub fn openat64(__fd: ::c_int, __file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int; + ++ pub fn fopen64(filename: *const c_char, mode: *const c_char) -> *mut ::FILE; ++ pub fn freopen64( ++ filename: *const c_char, ++ mode: *const c_char, ++ file: *mut ::FILE, ++ ) -> *mut ::FILE; ++ ++ pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int; ++ ++ pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; ++ pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int; ++ pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int; ++ pub fn tmpfile64() -> *mut ::FILE; ++ ++ pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; ++ ++ pub fn getdtablesize() -> ::c_int; ++ ++ // Added in `glibc` 2.34 ++ pub fn close_range(first: ::c_uint, last: ::c_uint, flags: ::c_int) -> ::c_int; ++ ++ pub fn openpty( ++ __amaster: *mut ::c_int, ++ __aslave: *mut ::c_int, ++ __name: *mut ::c_char, ++ __termp: *const termios, ++ __winp: *const ::winsize, ++ ) -> ::c_int; ++ ++ pub fn forkpty( ++ __amaster: *mut ::c_int, ++ __name: *mut ::c_char, ++ __termp: *const termios, ++ __winp: *const ::winsize, ++ ) -> ::pid_t; ++ ++ pub fn getpt() -> ::c_int; ++ pub fn ptsname_r(fd: ::c_int, buf: *mut ::c_char, buflen: ::size_t) -> ::c_int; ++ pub fn login_tty(fd: ::c_int) -> ::c_int; ++ ++ pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char; ++ ++ pub fn clearenv() -> ::c_int; ++ ++ pub fn execveat( ++ dirfd: ::c_int, ++ pathname: *const ::c_char, ++ argv: *const *mut c_char, ++ envp: *const *mut c_char, ++ flags: ::c_int, ++ ) -> ::c_int; ++ pub fn execvpe( ++ file: *const ::c_char, ++ argv: *const *const ::c_char, ++ envp: *const *const ::c_char, ++ ) -> ::c_int; ++ pub fn fexecve( ++ fd: ::c_int, ++ argv: *const *const ::c_char, ++ envp: *const *const ::c_char, ++ ) -> ::c_int; ++ ++ pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; ++ ++ // posix/spawn.h ++ pub fn posix_spawn( ++ pid: *mut ::pid_t, ++ path: *const ::c_char, ++ file_actions: *const ::posix_spawn_file_actions_t, ++ attrp: *const ::posix_spawnattr_t, ++ argv: *const *mut ::c_char, ++ envp: *const *mut ::c_char, ++ ) -> ::c_int; ++ pub fn posix_spawnp( ++ pid: *mut ::pid_t, ++ file: *const ::c_char, ++ file_actions: *const ::posix_spawn_file_actions_t, ++ attrp: *const ::posix_spawnattr_t, ++ argv: *const *mut ::c_char, ++ envp: *const *mut ::c_char, ++ ) -> ::c_int; ++ pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; ++ pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int; ++ pub fn posix_spawnattr_getsigdefault( ++ attr: *const posix_spawnattr_t, ++ default: *mut ::sigset_t, ++ ) -> ::c_int; ++ pub fn posix_spawnattr_setsigdefault( ++ attr: *mut posix_spawnattr_t, ++ default: *const ::sigset_t, ++ ) -> ::c_int; ++ pub fn posix_spawnattr_getsigmask( ++ attr: *const posix_spawnattr_t, ++ default: *mut ::sigset_t, ++ ) -> ::c_int; ++ pub fn posix_spawnattr_setsigmask( ++ attr: *mut posix_spawnattr_t, ++ default: *const ::sigset_t, ++ ) -> ::c_int; ++ pub fn posix_spawnattr_getflags( ++ attr: *const posix_spawnattr_t, ++ flags: *mut ::c_short, ++ ) -> ::c_int; ++ pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int; ++ pub fn posix_spawnattr_getpgroup( ++ attr: *const posix_spawnattr_t, ++ flags: *mut ::pid_t, ++ ) -> ::c_int; ++ pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int; ++ pub fn posix_spawnattr_getschedpolicy( ++ attr: *const posix_spawnattr_t, ++ flags: *mut ::c_int, ++ ) -> ::c_int; ++ pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: ::c_int) -> ::c_int; ++ pub fn posix_spawnattr_getschedparam( ++ attr: *const posix_spawnattr_t, ++ param: *mut ::sched_param, ++ ) -> ::c_int; ++ pub fn posix_spawnattr_setschedparam( ++ attr: *mut posix_spawnattr_t, ++ param: *const ::sched_param, ++ ) -> ::c_int; ++ ++ pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; ++ pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int; ++ pub fn posix_spawn_file_actions_addopen( ++ actions: *mut posix_spawn_file_actions_t, ++ fd: ::c_int, ++ path: *const ::c_char, ++ oflag: ::c_int, ++ mode: ::mode_t, ++ ) -> ::c_int; ++ pub fn posix_spawn_file_actions_addclose( ++ actions: *mut posix_spawn_file_actions_t, ++ fd: ::c_int, ++ ) -> ::c_int; ++ pub fn posix_spawn_file_actions_adddup2( ++ actions: *mut posix_spawn_file_actions_t, ++ fd: ::c_int, ++ newfd: ::c_int, ++ ) -> ::c_int; ++ ++ // Added in `glibc` 2.29 ++ pub fn posix_spawn_file_actions_addchdir_np( ++ actions: *mut ::posix_spawn_file_actions_t, ++ path: *const ::c_char, ++ ) -> ::c_int; ++ // Added in `glibc` 2.29 ++ pub fn posix_spawn_file_actions_addfchdir_np( ++ actions: *mut ::posix_spawn_file_actions_t, ++ fd: ::c_int, ++ ) -> ::c_int; ++ // Added in `glibc` 2.34 ++ pub fn posix_spawn_file_actions_addclosefrom_np( ++ actions: *mut ::posix_spawn_file_actions_t, ++ from: ::c_int, ++ ) -> ::c_int; ++ // Added in `glibc` 2.35 ++ pub fn posix_spawn_file_actions_addtcsetpgrp_np( ++ actions: *mut ::posix_spawn_file_actions_t, ++ tcfd: ::c_int, ++ ) -> ::c_int; ++ ++ pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int; ++ pub fn shm_unlink(name: *const ::c_char) -> ::c_int; ++ ++ pub fn euidaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int; ++ pub fn eaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int; ++ + pub fn faccessat( + dirfd: ::c_int, + pathname: *const ::c_char, +@@ -2944,6 +4136,13 @@ extern "C" { + pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64; + pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent, result: *mut *mut ::dirent) + -> ::c_int; ++ pub fn readdir64_r( ++ dirp: *mut ::DIR, ++ entry: *mut ::dirent64, ++ result: *mut *mut ::dirent64, ++ ) -> ::c_int; ++ pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); ++ pub fn telldir(dirp: *mut ::DIR) -> ::c_long; + + pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; + +@@ -2961,6 +4160,14 @@ extern "C" { + __offset: __off64_t, + ) -> *mut ::c_void; + ++ pub fn mremap( ++ addr: *mut ::c_void, ++ len: ::size_t, ++ new_len: ::size_t, ++ flags: ::c_int, ++ ... ++ ) -> *mut ::c_void; ++ + pub fn mprotect(__addr: *mut ::c_void, __len: ::size_t, __prot: ::c_int) -> ::c_int; + + pub fn msync(__addr: *mut ::c_void, __len: ::size_t, __flags: ::c_int) -> ::c_int; +@@ -2983,10 +4190,12 @@ extern "C" { + + pub fn madvise(__addr: *mut ::c_void, __len: ::size_t, __advice: ::c_int) -> ::c_int; + +- pub fn getrlimit(resource: ::__rlimit_resource, rlim: *mut ::rlimit) -> ::c_int; +- pub fn getrlimit64(resource: ::__rlimit_resource, rlim: *mut ::rlimit64) -> ::c_int; +- pub fn setrlimit(resource: ::__rlimit_resource, rlim: *const ::rlimit) -> ::c_int; +- pub fn setrlimit64(resource: ::__rlimit_resource, rlim: *const ::rlimit64) -> ::c_int; ++ pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; ++ ++ pub fn getrlimit(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit) -> ::c_int; ++ pub fn getrlimit64(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit64) -> ::c_int; ++ pub fn setrlimit(resource: ::__rlimit_resource_t, rlim: *const ::rlimit) -> ::c_int; ++ pub fn setrlimit64(resource: ::__rlimit_resource_t, rlim: *const ::rlimit64) -> ::c_int; + + pub fn getpriority(which: ::__priority_which, who: ::id_t) -> ::c_int; + pub fn setpriority(which: ::__priority_which, who: ::id_t, prio: ::c_int) -> ::c_int; +@@ -2994,7 +4203,179 @@ extern "C" { + pub fn getrandom(__buffer: *mut ::c_void, __length: ::size_t, __flags: ::c_uint) -> ::ssize_t; + pub fn getentropy(__buffer: *mut ::c_void, __length: ::size_t) -> ::c_int; + ++ pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void; ++ pub fn memmem( ++ haystack: *const ::c_void, ++ haystacklen: ::size_t, ++ needle: *const ::c_void, ++ needlelen: ::size_t, ++ ) -> *mut ::c_void; ++ pub fn strchrnul(s: *const ::c_char, c: ::c_int) -> *mut ::c_char; ++ ++ pub fn abs(i: ::c_int) -> ::c_int; ++ pub fn labs(i: ::c_long) -> ::c_long; ++ pub fn rand() -> ::c_int; ++ pub fn srand(seed: ::c_uint); ++ ++ pub fn drand48() -> ::c_double; ++ pub fn erand48(xseed: *mut ::c_ushort) -> ::c_double; ++ pub fn lrand48() -> ::c_long; ++ pub fn nrand48(xseed: *mut ::c_ushort) -> ::c_long; ++ pub fn mrand48() -> ::c_long; ++ pub fn jrand48(xseed: *mut ::c_ushort) -> ::c_long; ++ pub fn srand48(seed: ::c_long); ++ pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort; ++ pub fn lcong48(p: *mut ::c_ushort); ++ ++ pub fn qsort_r( ++ base: *mut ::c_void, ++ num: ::size_t, ++ size: ::size_t, ++ compar: ::Option< ++ unsafe extern "C" fn(*const ::c_void, *const ::c_void, *mut ::c_void) -> ::c_int, ++ >, ++ arg: *mut ::c_void, ++ ); ++ ++ pub fn brk(addr: *mut ::c_void) -> ::c_int; ++ pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void; ++ ++ pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; ++ pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int; ++ ++ pub fn mallinfo() -> ::mallinfo; ++ pub fn mallinfo2() -> ::mallinfo2; ++ pub fn malloc_info(options: ::c_int, stream: *mut ::FILE) -> ::c_int; ++ pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t; ++ pub fn malloc_trim(__pad: ::size_t) -> ::c_int; ++ ++ pub fn iconv_open(tocode: *const ::c_char, fromcode: *const ::c_char) -> iconv_t; ++ pub fn iconv( ++ cd: iconv_t, ++ inbuf: *mut *mut ::c_char, ++ inbytesleft: *mut ::size_t, ++ outbuf: *mut *mut ::c_char, ++ outbytesleft: *mut ::size_t, ++ ) -> ::size_t; ++ pub fn iconv_close(cd: iconv_t) -> ::c_int; ++ ++ pub fn getopt_long( ++ argc: ::c_int, ++ argv: *const *mut c_char, ++ optstring: *const c_char, ++ longopts: *const option, ++ longindex: *mut ::c_int, ++ ) -> ::c_int; ++ + pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int; ++ ++ pub fn reboot(how_to: ::c_int) -> ::c_int; ++ ++ pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int; ++ ++ pub fn regexec( ++ preg: *const ::regex_t, ++ input: *const ::c_char, ++ nmatch: ::size_t, ++ pmatch: *mut regmatch_t, ++ eflags: ::c_int, ++ ) -> ::c_int; ++ ++ pub fn regerror( ++ errcode: ::c_int, ++ preg: *const ::regex_t, ++ errbuf: *mut ::c_char, ++ errbuf_size: ::size_t, ++ ) -> ::size_t; ++ ++ pub fn regfree(preg: *mut ::regex_t); ++ ++ pub fn glob( ++ pattern: *const c_char, ++ flags: ::c_int, ++ errfunc: ::Option<extern "C" fn(epath: *const c_char, errno: ::c_int) -> ::c_int>, ++ pglob: *mut ::glob_t, ++ ) -> ::c_int; ++ pub fn globfree(pglob: *mut ::glob_t); ++ ++ pub fn glob64( ++ pattern: *const ::c_char, ++ flags: ::c_int, ++ errfunc: ::Option<extern "C" fn(epath: *const ::c_char, errno: ::c_int) -> ::c_int>, ++ pglob: *mut glob64_t, ++ ) -> ::c_int; ++ pub fn globfree64(pglob: *mut glob64_t); ++ ++ pub fn getxattr( ++ path: *const c_char, ++ name: *const c_char, ++ value: *mut ::c_void, ++ size: ::size_t, ++ ) -> ::ssize_t; ++ pub fn lgetxattr( ++ path: *const c_char, ++ name: *const c_char, ++ value: *mut ::c_void, ++ size: ::size_t, ++ ) -> ::ssize_t; ++ pub fn fgetxattr( ++ filedes: ::c_int, ++ name: *const c_char, ++ value: *mut ::c_void, ++ size: ::size_t, ++ ) -> ::ssize_t; ++ pub fn setxattr( ++ path: *const c_char, ++ name: *const c_char, ++ value: *const ::c_void, ++ size: ::size_t, ++ flags: ::c_int, ++ ) -> ::c_int; ++ pub fn lsetxattr( ++ path: *const c_char, ++ name: *const c_char, ++ value: *const ::c_void, ++ size: ::size_t, ++ flags: ::c_int, ++ ) -> ::c_int; ++ pub fn fsetxattr( ++ filedes: ::c_int, ++ name: *const c_char, ++ value: *const ::c_void, ++ size: ::size_t, ++ flags: ::c_int, ++ ) -> ::c_int; ++ pub fn listxattr(path: *const c_char, list: *mut c_char, size: ::size_t) -> ::ssize_t; ++ pub fn llistxattr(path: *const c_char, list: *mut c_char, size: ::size_t) -> ::ssize_t; ++ pub fn flistxattr(filedes: ::c_int, list: *mut c_char, size: ::size_t) -> ::ssize_t; ++ pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int; ++ pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int; ++ pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int; ++ ++ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; ++ /// POSIX version of `basename(3)`, defined in `libgen.h`. ++ #[link_name = "__xpg_basename"] ++ pub fn posix_basename(path: *mut ::c_char) -> *mut ::c_char; ++ /// GNU version of `basename(3)`, defined in `string.h`. ++ #[link_name = "basename"] ++ pub fn gnu_basename(path: *const ::c_char) -> *mut ::c_char; ++ ++ pub fn dlmopen(lmid: Lmid_t, filename: *const ::c_char, flag: ::c_int) -> *mut ::c_void; ++ pub fn dlinfo(handle: *mut ::c_void, request: ::c_int, info: *mut ::c_void) -> ::c_int; ++ pub fn dladdr1( ++ addr: *const ::c_void, ++ info: *mut ::Dl_info, ++ extra_info: *mut *mut ::c_void, ++ flags: ::c_int, ++ ) -> ::c_int; ++ ++ pub fn duplocale(base: ::locale_t) -> ::locale_t; ++ pub fn freelocale(loc: ::locale_t); ++ pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; ++ pub fn uselocale(loc: ::locale_t) -> ::locale_t; ++ pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; ++ pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; ++ + pub fn dl_iterate_phdr( + callback: ::Option< + unsafe extern "C" fn( +@@ -3005,6 +4386,9 @@ extern "C" { + >, + data: *mut ::c_void, + ) -> ::c_int; ++ ++ pub fn gnu_get_libc_release() -> *const ::c_char; ++ pub fn gnu_get_libc_version() -> *const ::c_char; + } + + safe_f! { diff --git a/debian/patches/vendor/u-hurd-libc.4.patch b/debian/patches/vendor/u-hurd-libc.4.patch new file mode 100644 index 000000000..f40f8d15e --- /dev/null +++ b/debian/patches/vendor/u-hurd-libc.4.patch @@ -0,0 +1,346 @@ +From: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Fri, 10 Nov 2023 20:14:11 +0100 +Subject: Forwarded: https://github.com/rust-lang/libc/pull/3430 + + c72c68c5d12e ("hurd: Complete C API interface") was actually missing a few + fixes. +--- + vendor/libc/src/unix/hurd/mod.rs | 226 ++++++++++++++++++++++++++++++++++++--- + 1 file changed, 211 insertions(+), 15 deletions(-) + +diff --git a/vendor/libc/src/unix/hurd/mod.rs b/vendor/libc/src/unix/hurd/mod.rs +index 75a272e..2e9f69e 100644 +--- a/vendor/libc/src/unix/hurd/mod.rs ++++ b/vendor/libc/src/unix/hurd/mod.rs +@@ -164,6 +164,7 @@ pub type pthread_key_t = __pthread_key; + pub type pthread_once_t = __pthread_once; + + pub type __rlimit_resource = ::c_uint; ++pub type __rlimit_resource_t = __rlimit_resource; + pub type rlim_t = __rlim_t; + pub type rlim64_t = __rlim64_t; + +@@ -215,10 +216,34 @@ pub type tcp_ca_state = ::c_uint; + + pub type idtype_t = ::c_uint; + ++pub type mqd_t = ::c_int; ++ ++pub type Lmid_t = ::c_long; ++ + pub type regoff_t = ::c_int; + ++pub type nl_item = ::c_int; ++ + pub type iconv_t = *mut ::c_void; + ++#[cfg_attr(feature = "extra_traits", derive(Debug))] ++pub enum fpos64_t {} // FIXME: fill this out with a struct ++impl ::Copy for fpos64_t {} ++impl ::Clone for fpos64_t { ++ fn clone(&self) -> fpos64_t { ++ *self ++ } ++} ++ ++#[cfg_attr(feature = "extra_traits", derive(Debug))] ++pub enum timezone {} ++impl ::Copy for timezone {} ++impl ::Clone for timezone { ++ fn clone(&self) -> timezone { ++ *self ++ } ++} ++ + // structs + s! { + pub struct ip_mreq { +@@ -431,7 +456,7 @@ s! { + + pub struct stat { + pub st_fstype: ::c_int, +- pub st_fsid: __fsid_t, ++ pub st_dev: __fsid_t, /* Actually st_fsid */ + pub st_ino: __ino_t, + pub st_gen: ::c_uint, + pub st_rdev: __dev_t, +@@ -583,6 +608,18 @@ s! { + __glibc_reserved: [::c_char; 32] + } + ++ pub struct mq_attr { ++ pub mq_flags: ::c_long, ++ pub mq_maxmsg: ::c_long, ++ pub mq_msgsize: ::c_long, ++ pub mq_curmsgs: ::c_long, ++ } ++ ++ pub struct __exit_status { ++ pub e_termination: ::c_short, ++ pub e_exit: ::c_short, ++ } ++ + #[cfg_attr(target_pointer_width = "32", + repr(align(4)))] + #[cfg_attr(target_pointer_width = "64", +@@ -998,6 +1035,96 @@ s! { + + } + ++s_no_extra_traits! { ++ pub struct utmpx { ++ pub ut_type: ::c_short, ++ pub ut_pid: ::pid_t, ++ pub ut_line: [::c_char; __UT_LINESIZE], ++ pub ut_id: [::c_char; 4], ++ ++ pub ut_user: [::c_char; __UT_NAMESIZE], ++ pub ut_host: [::c_char; __UT_HOSTSIZE], ++ pub ut_exit: __exit_status, ++ ++ #[cfg(any( all(target_pointer_width = "32", ++ not(target_arch = "x86_64"))))] ++ pub ut_session: ::c_long, ++ #[cfg(any(all(target_pointer_width = "32", ++ not(target_arch = "x86_64"))))] ++ pub ut_tv: ::timeval, ++ ++ #[cfg(not(any(all(target_pointer_width = "32", ++ not(target_arch = "x86_64")))))] ++ pub ut_session: i32, ++ #[cfg(not(any(all(target_pointer_width = "32", ++ not(target_arch = "x86_64")))))] ++ pub ut_tv: __timeval, ++ ++ pub ut_addr_v6: [i32; 4], ++ __glibc_reserved: [::c_char; 20], ++ } ++} ++ ++cfg_if! { ++ if #[cfg(feature = "extra_traits")] { ++ impl PartialEq for utmpx { ++ fn eq(&self, other: &utmpx) -> bool { ++ self.ut_type == other.ut_type ++ && self.ut_pid == other.ut_pid ++ && self.ut_line == other.ut_line ++ && self.ut_id == other.ut_id ++ && self.ut_user == other.ut_user ++ && self ++ .ut_host ++ .iter() ++ .zip(other.ut_host.iter()) ++ .all(|(a,b)| a == b) ++ && self.ut_exit == other.ut_exit ++ && self.ut_session == other.ut_session ++ && self.ut_tv == other.ut_tv ++ && self.ut_addr_v6 == other.ut_addr_v6 ++ && self.__glibc_reserved == other.__glibc_reserved ++ } ++ } ++ ++ impl Eq for utmpx {} ++ ++ impl ::fmt::Debug for utmpx { ++ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { ++ f.debug_struct("utmpx") ++ .field("ut_type", &self.ut_type) ++ .field("ut_pid", &self.ut_pid) ++ .field("ut_line", &self.ut_line) ++ .field("ut_id", &self.ut_id) ++ .field("ut_user", &self.ut_user) ++ // FIXME: .field("ut_host", &self.ut_host) ++ .field("ut_exit", &self.ut_exit) ++ .field("ut_session", &self.ut_session) ++ .field("ut_tv", &self.ut_tv) ++ .field("ut_addr_v6", &self.ut_addr_v6) ++ .field("__glibc_reserved", &self.__glibc_reserved) ++ .finish() ++ } ++ } ++ ++ impl ::hash::Hash for utmpx { ++ fn hash<H: ::hash::Hasher>(&self, state: &mut H) { ++ self.ut_type.hash(state); ++ self.ut_pid.hash(state); ++ self.ut_line.hash(state); ++ self.ut_id.hash(state); ++ self.ut_user.hash(state); ++ self.ut_host.hash(state); ++ self.ut_exit.hash(state); ++ self.ut_session.hash(state); ++ self.ut_tv.hash(state); ++ self.ut_addr_v6.hash(state); ++ self.__glibc_reserved.hash(state); ++ } ++ } ++ } ++} ++ + impl siginfo_t { + pub unsafe fn si_addr(&self) -> *mut ::c_void { + self.si_addr +@@ -1310,7 +1437,10 @@ pub const INET_ADDRSTRLEN: usize = 16; + pub const INET6_ADDRSTRLEN: usize = 46; + + // netinet/ip.h +-pub const IPTOS_ECN_MASK: u8 = 0x03; ++pub const IPTOS_TOS_MASK: u8 = 0x1E; ++pub const IPTOS_PREC_MASK: u8 = 0xE0; ++ ++pub const IPTOS_ECN_NOT_ECT: u8 = 0x00; + + pub const IPTOS_LOWDELAY: u8 = 0x10; + pub const IPTOS_THROUGHPUT: u8 = 0x08; +@@ -1372,6 +1502,12 @@ pub const ARPOP_InREQUEST: u16 = 8; + pub const ARPOP_InREPLY: u16 = 9; + pub const ARPOP_NAK: u16 = 10; + ++pub const MAX_ADDR_LEN: usize = 7; ++pub const ARPD_UPDATE: ::c_ushort = 0x01; ++pub const ARPD_LOOKUP: ::c_ushort = 0x02; ++pub const ARPD_FLUSH: ::c_ushort = 0x03; ++pub const ATF_MAGIC: ::c_int = 0x80; ++ + pub const ATF_NETMASK: ::c_int = 0x20; + pub const ATF_DONTPUB: ::c_int = 0x40; + +@@ -1598,6 +1734,71 @@ pub const LC_MEASUREMENT_MASK: ::c_int = 2048; + pub const LC_IDENTIFICATION_MASK: ::c_int = 4096; + pub const LC_ALL_MASK: ::c_int = 8127; + ++pub const ABDAY_1: ::nl_item = 0x20000; ++pub const ABDAY_2: ::nl_item = 0x20001; ++pub const ABDAY_3: ::nl_item = 0x20002; ++pub const ABDAY_4: ::nl_item = 0x20003; ++pub const ABDAY_5: ::nl_item = 0x20004; ++pub const ABDAY_6: ::nl_item = 0x20005; ++pub const ABDAY_7: ::nl_item = 0x20006; ++ ++pub const DAY_1: ::nl_item = 0x20007; ++pub const DAY_2: ::nl_item = 0x20008; ++pub const DAY_3: ::nl_item = 0x20009; ++pub const DAY_4: ::nl_item = 0x2000A; ++pub const DAY_5: ::nl_item = 0x2000B; ++pub const DAY_6: ::nl_item = 0x2000C; ++pub const DAY_7: ::nl_item = 0x2000D; ++ ++pub const ABMON_1: ::nl_item = 0x2000E; ++pub const ABMON_2: ::nl_item = 0x2000F; ++pub const ABMON_3: ::nl_item = 0x20010; ++pub const ABMON_4: ::nl_item = 0x20011; ++pub const ABMON_5: ::nl_item = 0x20012; ++pub const ABMON_6: ::nl_item = 0x20013; ++pub const ABMON_7: ::nl_item = 0x20014; ++pub const ABMON_8: ::nl_item = 0x20015; ++pub const ABMON_9: ::nl_item = 0x20016; ++pub const ABMON_10: ::nl_item = 0x20017; ++pub const ABMON_11: ::nl_item = 0x20018; ++pub const ABMON_12: ::nl_item = 0x20019; ++ ++pub const MON_1: ::nl_item = 0x2001A; ++pub const MON_2: ::nl_item = 0x2001B; ++pub const MON_3: ::nl_item = 0x2001C; ++pub const MON_4: ::nl_item = 0x2001D; ++pub const MON_5: ::nl_item = 0x2001E; ++pub const MON_6: ::nl_item = 0x2001F; ++pub const MON_7: ::nl_item = 0x20020; ++pub const MON_8: ::nl_item = 0x20021; ++pub const MON_9: ::nl_item = 0x20022; ++pub const MON_10: ::nl_item = 0x20023; ++pub const MON_11: ::nl_item = 0x20024; ++pub const MON_12: ::nl_item = 0x20025; ++ ++pub const AM_STR: ::nl_item = 0x20026; ++pub const PM_STR: ::nl_item = 0x20027; ++ ++pub const D_T_FMT: ::nl_item = 0x20028; ++pub const D_FMT: ::nl_item = 0x20029; ++pub const T_FMT: ::nl_item = 0x2002A; ++pub const T_FMT_AMPM: ::nl_item = 0x2002B; ++ ++pub const ERA: ::nl_item = 0x2002C; ++pub const ERA_D_FMT: ::nl_item = 0x2002E; ++pub const ALT_DIGITS: ::nl_item = 0x2002F; ++pub const ERA_D_T_FMT: ::nl_item = 0x20030; ++pub const ERA_T_FMT: ::nl_item = 0x20031; ++ ++pub const CODESET: ::nl_item = 14; ++pub const CRNCYSTR: ::nl_item = 0x4000F; ++pub const RADIXCHAR: ::nl_item = 0x10000; ++pub const THOUSEP: ::nl_item = 0x10001; ++pub const YESEXPR: ::nl_item = 0x50000; ++pub const NOEXPR: ::nl_item = 0x50001; ++pub const YESSTR: ::nl_item = 0x50002; ++pub const NOSTR: ::nl_item = 0x50003; ++ + // reboot.h + pub const RB_AUTOBOOT: ::c_int = 0x0; + pub const RB_ASKNAME: ::c_int = 0x1; +@@ -1785,6 +1986,7 @@ pub const CBRK: u8 = 0u8; + + // dlfcn.h + pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; ++pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void; + pub const RTLD_LAZY: ::c_int = 1; + pub const RTLD_NOW: ::c_int = 2; + pub const RTLD_BINDING_MASK: ::c_int = 3; +@@ -2942,6 +3144,10 @@ pub const PRIO_PROCESS: __priority_which = 0; + pub const PRIO_PGRP: __priority_which = 1; + pub const PRIO_USER: __priority_which = 2; + ++pub const __UT_LINESIZE: usize = 32; ++pub const __UT_NAMESIZE: usize = 32; ++pub const __UT_HOSTSIZE: usize = 256; ++ + pub const SOCK_STREAM: ::c_int = 1; + pub const SOCK_DGRAM: ::c_int = 2; + pub const SOCK_RAW: ::c_int = 3; +@@ -3079,11 +3285,6 @@ pub const RTLD_DI_TLS_DATA: ::c_int = 10; + pub const RTLD_DI_PHDR: ::c_int = 11; + pub const RTLD_DI_MAX: ::c_int = 11; + +-pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void; +-pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; +-pub const RTLD_NODELETE: ::c_int = 0x1000; +-pub const RTLD_NOW: ::c_int = 0x2; +- + pub const SI_ASYNCIO: ::c_int = -4; + pub const SI_MESGQ: ::c_int = -3; + pub const SI_TIMER: ::c_int = -2; +@@ -3262,12 +3463,12 @@ f! { + return 0 as *mut cmsghdr; + }; + let next = (cmsg as usize + +- super::CMSG_ALIGN((*cmsg).cmsg_len as usize)) ++ CMSG_ALIGN((*cmsg).cmsg_len as usize)) + as *mut cmsghdr; + let max = (*mhdr).msg_control as usize + + (*mhdr).msg_controllen as usize; + if (next.offset(1)) as usize > max || +- next as usize + super::CMSG_ALIGN((*next).cmsg_len as usize) > max ++ next as usize + CMSG_ALIGN((*next).cmsg_len as usize) > max + { + 0 as *mut cmsghdr + } else { +@@ -3756,6 +3957,7 @@ extern "C" { + __attr: *const pthread_attr_t, + __guardsize: *mut ::size_t, + ) -> ::c_int; ++ pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; + + pub fn pthread_attr_getstack( + __attr: *const pthread_attr_t, +@@ -3763,12 +3965,6 @@ extern "C" { + __stacksize: *mut ::size_t, + ) -> ::c_int; + +- pub fn pthread_attr_getguardsize( +- attr: *const ::pthread_attr_t, +- guardsize: *mut ::size_t, +- ) -> ::c_int; +- pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; +- + pub fn pthread_mutexattr_getpshared( + attr: *const pthread_mutexattr_t, + pshared: *mut ::c_int, diff --git a/debian/patches/vendor/u-hurd-libloading-0.7.4.patch b/debian/patches/vendor/u-hurd-libloading-0.7.4.patch new file mode 100644 index 000000000..e4d0ab658 --- /dev/null +++ b/debian/patches/vendor/u-hurd-libloading-0.7.4.patch @@ -0,0 +1,45 @@ +From: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Tue, 29 Aug 2023 19:55:29 +0000 +Subject: add hurd support + +Forwarded: https://github.com/nagisa/rust_libloading/pull/129 +--- + vendor/libloading-0.7.4/src/os/unix/consts.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/vendor/libloading-0.7.4/src/os/unix/consts.rs b/vendor/libloading-0.7.4/src/os/unix/consts.rs +index ea7a6a1..5794ade 100644 +--- a/vendor/libloading-0.7.4/src/os/unix/consts.rs ++++ b/vendor/libloading-0.7.4/src/os/unix/consts.rs +@@ -82,6 +82,7 @@ mod posix { + + target_os = "fuchsia", + target_os = "redox", ++ target_os = "hurd", + ))] { + pub(super) const RTLD_LAZY: c_int = 1; + } else { +@@ -115,6 +116,7 @@ mod posix { + + target_os = "fuchsia", + target_os = "redox", ++ target_os = "hurd", + ))] { + pub(super) const RTLD_NOW: c_int = 2; + } else if #[cfg(all(target_os = "android",target_pointer_width = "32"))] { +@@ -162,6 +164,7 @@ mod posix { + + target_os = "fuchsia", + target_os = "redox", ++ target_os = "hurd", + ))] { + pub(super) const RTLD_GLOBAL: c_int = 0x100; + } else { +@@ -200,6 +203,7 @@ mod posix { + + target_os = "fuchsia", + target_os = "redox", ++ target_os = "hurd", + ))] { + pub(super) const RTLD_LOCAL: c_int = 0; + } else { diff --git a/debian/patches/vendor/u-hurd-socket2.patch b/debian/patches/vendor/u-hurd-socket2.patch new file mode 100644 index 000000000..0c1e027a6 --- /dev/null +++ b/debian/patches/vendor/u-hurd-socket2.patch @@ -0,0 +1,95 @@ +From: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Tue, 29 Aug 2023 20:03:20 +0000 +Subject: add hurd support + +Forwarded: https://github.com/rust-lang/socket2/pull/474 +--- + vendor/socket2/src/sockaddr.rs | 2 ++ + vendor/socket2/src/socket.rs | 4 ++++ + vendor/socket2/src/sys/unix.rs | 3 +++ + 3 files changed, 9 insertions(+) + +diff --git a/vendor/socket2/src/sockaddr.rs b/vendor/socket2/src/sockaddr.rs +index e721018..682ec89 100644 +--- a/vendor/socket2/src/sockaddr.rs ++++ b/vendor/socket2/src/sockaddr.rs +@@ -231,6 +231,7 @@ impl From<SocketAddrV4> for SockAddr { + target_os = "dragonfly", + target_os = "freebsd", + target_os = "haiku", ++ target_os = "hurd", + target_os = "ios", + target_os = "macos", + target_os = "netbsd", +@@ -275,6 +276,7 @@ impl From<SocketAddrV6> for SockAddr { + target_os = "dragonfly", + target_os = "freebsd", + target_os = "haiku", ++ target_os = "hurd", + target_os = "ios", + target_os = "macos", + target_os = "netbsd", +diff --git a/vendor/socket2/src/socket.rs b/vendor/socket2/src/socket.rs +index 90649d9..45fe1e3 100644 +--- a/vendor/socket2/src/socket.rs ++++ b/vendor/socket2/src/socket.rs +@@ -1235,6 +1235,7 @@ impl Socket { + #[cfg(not(any( + target_os = "dragonfly", + target_os = "haiku", ++ target_os = "hurd", + target_os = "netbsd", + target_os = "openbsd", + target_os = "redox", +@@ -1272,6 +1273,7 @@ impl Socket { + #[cfg(not(any( + target_os = "dragonfly", + target_os = "haiku", ++ target_os = "hurd", + target_os = "netbsd", + target_os = "openbsd", + target_os = "redox", +@@ -1448,6 +1450,7 @@ impl Socket { + #[cfg(not(any( + target_os = "dragonfly", + target_os = "fuchsia", ++ target_os = "hurd", + target_os = "illumos", + target_os = "netbsd", + target_os = "openbsd", +@@ -1479,6 +1482,7 @@ impl Socket { + #[cfg(not(any( + target_os = "dragonfly", + target_os = "fuchsia", ++ target_os = "hurd", + target_os = "illumos", + target_os = "netbsd", + target_os = "openbsd", +diff --git a/vendor/socket2/src/sys/unix.rs b/vendor/socket2/src/sys/unix.rs +index ec7c3e2..1b89e37 100644 +--- a/vendor/socket2/src/sys/unix.rs ++++ b/vendor/socket2/src/sys/unix.rs +@@ -84,6 +84,7 @@ pub(crate) use libc::IP_HDRINCL; + #[cfg(not(any( + target_os = "dragonfly", + target_os = "fuchsia", ++ target_os = "hurd", + target_os = "illumos", + target_os = "netbsd", + target_os = "openbsd", +@@ -116,6 +117,7 @@ pub(crate) use libc::{ + #[cfg(not(any( + target_os = "dragonfly", + target_os = "haiku", ++ target_os = "hurd", + target_os = "netbsd", + target_os = "openbsd", + target_os = "redox", +@@ -233,6 +235,7 @@ type IovLen = usize; + target_os = "freebsd", + target_os = "fuchsia", + target_os = "haiku", ++ target_os = "hurd", + target_os = "illumos", + target_os = "netbsd", + target_os = "openbsd", |