From c29d7c1ba10d6debd11f9d8aad5d069a6491e60e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:01 +0200 Subject: Adding debian version 1.76.0+dfsg1-1. Signed-off-by: Daniel Baumann --- debian/README.source | 20 +- debian/changelog | 19 + debian/control | 13 +- debian/copyright | 264 ++- debian/gbp.conf | 4 + debian/libstd-rust-1.75.install | 1 - debian/libstd-rust-1.75.lintian-overrides | 16 - debian/libstd-rust-1.75.triggers | 2 - debian/libstd-rust-1.76.install | 1 + debian/libstd-rust-1.76.lintian-overrides | 16 + debian/libstd-rust-1.76.triggers | 2 + .../d-bootstrap-use-system-compiler-rt.patch | 40 + debian/patches-unused/d-rustc-prefer-dynamic.patch | 18 + debian/patches-unused/d-test-host-duplicates.patch | 20 + .../u-allow-system-compiler-rt.patch | 327 +++ debian/patches/behaviour/d-rust-gdb-paths.patch | 25 + debian/patches/behaviour/d-rust-lldb-paths.patch | 29 + debian/patches/behaviour/d-rustc-add-soname.patch | 44 + .../patches/behaviour/d-rustc-i686-baseline.patch | 56 + debian/patches/behaviour/d-rustc-windows-ssp.patch | 22 + .../d-rustdoc-disable-embedded-fonts.patch | 43 + debian/patches/build/d-armel-fix-lldb.patch | 26 + .../build/d-bootstrap-cargo-doc-paths.patch | 387 ++++ .../build/d-bootstrap-custom-debuginfo-path.patch | 56 + debian/patches/build/d-bootstrap-disable-git.patch | 44 + .../build/d-bootstrap-install-symlinks.patch | 38 + .../build/d-bootstrap-no-assume-tools.patch | 28 + .../build/d-bootstrap-permit-symlink-in-docs.patch | 21 + debian/patches/build/d-bootstrap-rustflags.patch | 34 + .../patches/build/d-bootstrap-use-local-css.patch | 55 + debian/patches/build/d-test-ignore-avx-44056.patch | 23 + ...3-tests-add-missing-cross-disabled-checks.patch | 46 - debian/patches/c-2002_disable-net-tests.patch | 588 ----- ...3-workaround-qemu-vfork-command-not-found.patch | 19 - debian/patches/c-2200-workaround-x32-test.patch | 15 - debian/patches/c-disable-fs-specific-test.patch | 13 - ...3-tests-add-missing-cross-disabled-checks.patch | 42 + .../patches/cargo/c-2002_disable-net-tests.patch | 595 +++++ ...3-workaround-qemu-vfork-command-not-found.patch | 28 + .../patches/cargo/c-2200-workaround-x32-test.patch | 22 + .../patches/cargo/c-disable-fs-specific-test.patch | 22 + .../d-0012-cargo-always-return-dev-channel.patch | 26 + .../patches/d-0000-ignore-removed-submodules.patch | 242 --- .../d-0001-pkg-config-no-special-snowflake.patch | 93 - .../d-0002-mdbook-strip-embedded-libs.patch | 467 ---- debian/patches/d-0003-cc-psm-rebuild-wasm32.patch | 48 - debian/patches/d-0005-no-jemalloc.patch | 48 - .../d-0010-cargo-remove-vendored-c-crates.patch | 22 - debian/patches/d-0011-cargo-remove-nghttp2.patch | 22 - .../d-0012-cargo-always-return-dev-channel.patch | 25 - .../d-0020-remove-windows-dependencies.patch | 368 ---- ...d-0021-vendor-remove-windows-dependencies.patch | 1020 --------- debian/patches/d-armel-fix-lldb.patch | 19 - debian/patches/d-bootstrap-cargo-doc-paths.patch | 374 ---- .../d-bootstrap-custom-debuginfo-path.patch | 54 - debian/patches/d-bootstrap-disable-git.patch | 46 - debian/patches/d-bootstrap-install-symlinks.patch | 36 - debian/patches/d-bootstrap-no-assume-tools.patch | 27 - .../d-bootstrap-permit-symlink-in-docs.patch | 14 - debian/patches/d-bootstrap-rustflags.patch | 32 - debian/patches/d-bootstrap-use-local-css.patch | 54 - .../d-bootstrap-use-system-compiler-rt.patch | 40 - debian/patches/d-disable-download-tests.patch | 24 - .../d-ignore-test_arc_condvar_poison-ppc.patch | 12 - debian/patches/d-rust-gdb-paths | 26 - debian/patches/d-rust-lldb-paths | 29 - debian/patches/d-rustc-add-soname.patch | 44 - debian/patches/d-rustc-i686-baseline.patch | 49 - debian/patches/d-rustc-prefer-dynamic.patch | 18 - debian/patches/d-rustc-windows-ssp.patch | 22 - .../patches/d-rustdoc-disable-embedded-fonts.patch | 43 - debian/patches/d-test-host-duplicates.patch | 20 - debian/patches/d-test-ignore-avx-44056.patch | 22 - .../prune/d-0000-ignore-removed-submodules.patch | 246 +++ .../d-0001-pkg-config-no-special-snowflake.patch | 96 + .../prune/d-0002-mdbook-strip-embedded-libs.patch | 577 +++++ debian/patches/prune/d-0005-no-jemalloc.patch | 51 + .../d-0010-cargo-remove-vendored-c-crates.patch | 39 + .../prune/d-0011-cargo-remove-nghttp2.patch | 26 + .../prune/d-0020-remove-windows-dependencies.patch | 382 ++++ ...d-0021-vendor-remove-windows-dependencies.patch | 1007 +++++++++ debian/patches/series | 125 +- debian/patches/u-allow-system-compiler-rt.patch | 327 --- ...sing-cargo-deps-s-source-code-in-ui-tests.patch | 26 - debian/patches/u-fix-get-toml-when-test.patch | 47 - debian/patches/u-hurd-backtrace.patch | 72 - debian/patches/u-hurd-getrandom.patch | 77 - debian/patches/u-hurd-libc.3.patch | 2295 ------------------- debian/patches/u-hurd-libc.4.patch | 347 --- debian/patches/u-hurd-libloading-0.7.4.patch | 44 - debian/patches/u-hurd-socket2.patch | 92 - debian/patches/u-hurd-tests.patch | 54 - debian/patches/u-ignore-ppc-hangs.patch | 34 - debian/patches/u-reproducible-build.patch | 25 - .../u-riscv-disable-unpacked-split-debuginfo.patch | 121 -- debian/patches/u-rustc-llvm-cross-flags.patch | 22 - .../patches/ubuntu-disable-ppc64el-asm-tests.patch | 34 - debian/patches/ubuntu-ignore-arm-doctest.patch | 42 - .../ubuntu/ubuntu-disable-ppc64el-asm-tests.patch | 44 + .../patches/ubuntu/ubuntu-ignore-arm-doctest.patch | 48 + .../upstream/d-disable-download-tests.patch | 33 + .../d-ignore-test_arc_condvar_poison-ppc.patch | 21 + ...sing-cargo-deps-s-source-code-in-ui-tests.patch | 47 + .../upstream/u-fix-get-toml-when-test.patch | 54 + debian/patches/upstream/u-hurd-tests.patch | 64 + debian/patches/upstream/u-ignore-ppc-hangs.patch | 34 + .../u-riscv-disable-unpacked-split-debuginfo.patch | 120 + .../upstream/u-rustc-llvm-cross-flags.patch | 22 + .../vendor/d-0003-cc-psm-rebuild-wasm32.patch | 49 + debian/patches/vendor/u-hurd-backtrace.patch | 77 + debian/patches/vendor/u-hurd-gix-index-2.patch | 29 + debian/patches/vendor/u-hurd-gix-index.patch | 96 + debian/patches/vendor/u-hurd-libc.3.patch | 2296 ++++++++++++++++++++ debian/patches/vendor/u-hurd-libc.4.patch | 346 +++ .../patches/vendor/u-hurd-libloading-0.7.4.patch | 45 + debian/patches/vendor/u-hurd-socket2.patch | 95 + debian/prune-unused-deps | 5 + debian/rebase-patches.sh | 54 + debian/refresh-early-patches.sh | 54 - debian/upstream-tarball-unsuspicious.txt | 59 +- 120 files changed, 8400 insertions(+), 7970 deletions(-) delete mode 100644 debian/libstd-rust-1.75.install delete mode 100644 debian/libstd-rust-1.75.lintian-overrides delete mode 100644 debian/libstd-rust-1.75.triggers create mode 100644 debian/libstd-rust-1.76.install create mode 100644 debian/libstd-rust-1.76.lintian-overrides create mode 100644 debian/libstd-rust-1.76.triggers create mode 100644 debian/patches-unused/d-bootstrap-use-system-compiler-rt.patch create mode 100644 debian/patches-unused/d-rustc-prefer-dynamic.patch create mode 100644 debian/patches-unused/d-test-host-duplicates.patch create mode 100644 debian/patches-unused/u-allow-system-compiler-rt.patch create mode 100644 debian/patches/behaviour/d-rust-gdb-paths.patch create mode 100644 debian/patches/behaviour/d-rust-lldb-paths.patch create mode 100644 debian/patches/behaviour/d-rustc-add-soname.patch create mode 100644 debian/patches/behaviour/d-rustc-i686-baseline.patch create mode 100644 debian/patches/behaviour/d-rustc-windows-ssp.patch create mode 100644 debian/patches/behaviour/d-rustdoc-disable-embedded-fonts.patch create mode 100644 debian/patches/build/d-armel-fix-lldb.patch create mode 100644 debian/patches/build/d-bootstrap-cargo-doc-paths.patch create mode 100644 debian/patches/build/d-bootstrap-custom-debuginfo-path.patch create mode 100644 debian/patches/build/d-bootstrap-disable-git.patch create mode 100644 debian/patches/build/d-bootstrap-install-symlinks.patch create mode 100644 debian/patches/build/d-bootstrap-no-assume-tools.patch create mode 100644 debian/patches/build/d-bootstrap-permit-symlink-in-docs.patch create mode 100644 debian/patches/build/d-bootstrap-rustflags.patch create mode 100644 debian/patches/build/d-bootstrap-use-local-css.patch create mode 100644 debian/patches/build/d-test-ignore-avx-44056.patch delete mode 100644 debian/patches/c-0003-tests-add-missing-cross-disabled-checks.patch delete mode 100644 debian/patches/c-2002_disable-net-tests.patch delete mode 100644 debian/patches/c-2003-workaround-qemu-vfork-command-not-found.patch delete mode 100644 debian/patches/c-2200-workaround-x32-test.patch delete mode 100644 debian/patches/c-disable-fs-specific-test.patch create mode 100644 debian/patches/cargo/c-0003-tests-add-missing-cross-disabled-checks.patch create mode 100644 debian/patches/cargo/c-2002_disable-net-tests.patch create mode 100644 debian/patches/cargo/c-2003-workaround-qemu-vfork-command-not-found.patch create mode 100644 debian/patches/cargo/c-2200-workaround-x32-test.patch create mode 100644 debian/patches/cargo/c-disable-fs-specific-test.patch create mode 100644 debian/patches/cargo/d-0012-cargo-always-return-dev-channel.patch delete mode 100644 debian/patches/d-0000-ignore-removed-submodules.patch delete mode 100644 debian/patches/d-0001-pkg-config-no-special-snowflake.patch delete mode 100644 debian/patches/d-0002-mdbook-strip-embedded-libs.patch delete mode 100644 debian/patches/d-0003-cc-psm-rebuild-wasm32.patch delete mode 100644 debian/patches/d-0005-no-jemalloc.patch delete mode 100644 debian/patches/d-0010-cargo-remove-vendored-c-crates.patch delete mode 100644 debian/patches/d-0011-cargo-remove-nghttp2.patch delete mode 100644 debian/patches/d-0012-cargo-always-return-dev-channel.patch delete mode 100644 debian/patches/d-0020-remove-windows-dependencies.patch delete mode 100644 debian/patches/d-0021-vendor-remove-windows-dependencies.patch delete mode 100644 debian/patches/d-armel-fix-lldb.patch delete mode 100644 debian/patches/d-bootstrap-cargo-doc-paths.patch delete mode 100644 debian/patches/d-bootstrap-custom-debuginfo-path.patch delete mode 100644 debian/patches/d-bootstrap-disable-git.patch delete mode 100644 debian/patches/d-bootstrap-install-symlinks.patch delete mode 100644 debian/patches/d-bootstrap-no-assume-tools.patch delete mode 100644 debian/patches/d-bootstrap-permit-symlink-in-docs.patch delete mode 100644 debian/patches/d-bootstrap-rustflags.patch delete mode 100644 debian/patches/d-bootstrap-use-local-css.patch delete mode 100644 debian/patches/d-bootstrap-use-system-compiler-rt.patch delete mode 100644 debian/patches/d-disable-download-tests.patch delete mode 100644 debian/patches/d-ignore-test_arc_condvar_poison-ppc.patch delete mode 100644 debian/patches/d-rust-gdb-paths delete mode 100644 debian/patches/d-rust-lldb-paths delete mode 100644 debian/patches/d-rustc-add-soname.patch delete mode 100644 debian/patches/d-rustc-i686-baseline.patch delete mode 100644 debian/patches/d-rustc-prefer-dynamic.patch delete mode 100644 debian/patches/d-rustc-windows-ssp.patch delete mode 100644 debian/patches/d-rustdoc-disable-embedded-fonts.patch delete mode 100644 debian/patches/d-test-host-duplicates.patch delete mode 100644 debian/patches/d-test-ignore-avx-44056.patch create mode 100644 debian/patches/prune/d-0000-ignore-removed-submodules.patch create mode 100644 debian/patches/prune/d-0001-pkg-config-no-special-snowflake.patch create mode 100644 debian/patches/prune/d-0002-mdbook-strip-embedded-libs.patch create mode 100644 debian/patches/prune/d-0005-no-jemalloc.patch create mode 100644 debian/patches/prune/d-0010-cargo-remove-vendored-c-crates.patch create mode 100644 debian/patches/prune/d-0011-cargo-remove-nghttp2.patch create mode 100644 debian/patches/prune/d-0020-remove-windows-dependencies.patch create mode 100644 debian/patches/prune/d-0021-vendor-remove-windows-dependencies.patch delete mode 100644 debian/patches/u-allow-system-compiler-rt.patch delete mode 100644 debian/patches/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch delete mode 100644 debian/patches/u-fix-get-toml-when-test.patch delete mode 100644 debian/patches/u-hurd-backtrace.patch delete mode 100644 debian/patches/u-hurd-getrandom.patch delete mode 100644 debian/patches/u-hurd-libc.3.patch delete mode 100644 debian/patches/u-hurd-libc.4.patch delete mode 100644 debian/patches/u-hurd-libloading-0.7.4.patch delete mode 100644 debian/patches/u-hurd-socket2.patch delete mode 100644 debian/patches/u-hurd-tests.patch delete mode 100644 debian/patches/u-ignore-ppc-hangs.patch delete mode 100644 debian/patches/u-reproducible-build.patch delete mode 100644 debian/patches/u-riscv-disable-unpacked-split-debuginfo.patch delete mode 100644 debian/patches/u-rustc-llvm-cross-flags.patch delete mode 100644 debian/patches/ubuntu-disable-ppc64el-asm-tests.patch delete mode 100644 debian/patches/ubuntu-ignore-arm-doctest.patch create mode 100644 debian/patches/ubuntu/ubuntu-disable-ppc64el-asm-tests.patch create mode 100644 debian/patches/ubuntu/ubuntu-ignore-arm-doctest.patch create mode 100644 debian/patches/upstream/d-disable-download-tests.patch create mode 100644 debian/patches/upstream/d-ignore-test_arc_condvar_poison-ppc.patch create mode 100644 debian/patches/upstream/u-avoid-blessing-cargo-deps-s-source-code-in-ui-tests.patch create mode 100644 debian/patches/upstream/u-fix-get-toml-when-test.patch create mode 100644 debian/patches/upstream/u-hurd-tests.patch create mode 100644 debian/patches/upstream/u-ignore-ppc-hangs.patch create mode 100644 debian/patches/upstream/u-riscv-disable-unpacked-split-debuginfo.patch create mode 100644 debian/patches/upstream/u-rustc-llvm-cross-flags.patch create mode 100644 debian/patches/vendor/d-0003-cc-psm-rebuild-wasm32.patch create mode 100644 debian/patches/vendor/u-hurd-backtrace.patch create mode 100644 debian/patches/vendor/u-hurd-gix-index-2.patch create mode 100644 debian/patches/vendor/u-hurd-gix-index.patch create mode 100644 debian/patches/vendor/u-hurd-libc.3.patch create mode 100644 debian/patches/vendor/u-hurd-libc.4.patch create mode 100644 debian/patches/vendor/u-hurd-libloading-0.7.4.patch create mode 100644 debian/patches/vendor/u-hurd-socket2.patch create mode 100755 debian/rebase-patches.sh delete mode 100755 debian/refresh-early-patches.sh diff --git a/debian/README.source b/debian/README.source index 36a28b7cc..9783addc1 100644 --- a/debian/README.source +++ b/debian/README.source @@ -1,4 +1,4 @@ -Document by Ximin Luo, Luca Bruno & Sylvestre Ledru +Document by Ximin Luo, Luca Bruno, Sylvestre Ledru & Fabian Grünbichler This source package is unfortunately quite tricky and with several cutting edges, due to the complexity of rust-lang bootstrapping system and the high @@ -17,7 +17,7 @@ The upstream source package embeds many external libraries. We make a great effort to remove them and use system versions where possible, but there are a few more remaining: - * vendor/dlmalloc, vendor/windows_*_gnu, vendor/windows_*_msvc + * vendor/dlmalloc These are small C libraries designed to be statically linked; their upstream does not support building them as a shared library and they are too small to @@ -79,6 +79,13 @@ This way, other architectures will be omitted from the orig-stage0 tarball. You might want to do this e.g. if these other architectures are already present in your distro, but the $upstream_bootstrap_arch ones are not yet present. +If the toolchain for the architecture you are attempting to bootstrap is not +provided upstream (i.e., it's not at Tier 2 with Host Tools or higher[2]), you +can manually prepare such a stage0 tarball via cross compilation using +upstream's build process. + +[2] https://doc.rust-lang.org/nightly/rustc/platform-support.html + Notes ----- @@ -135,17 +142,19 @@ $ sudo mk-build-deps -irt 'aptitude -R' $ uscan --verbose # or debian/rules source_orig-beta, for beta $ ver=UPDATE-ME # whatever it is, probably X.YY.Z or X.YY.Z~beta.N -$ debian/refresh-early-patches.sh $ver +$ debian/rebase-patches.sh $ver # This will require an understanding of how git-rebase and git-mergetool works # We recommend either kdiff3 or p4merge (proprietary) as the git-mergetool. +# See individual patches for instructions on rebasing. -$ tar xf ../rustc-${ver/\~/-}-src.tar.xz && ( cd rustc-${ver/*~*/beta}-src/ && pwd && ../debian/prune-unused-deps ) && rm -rf rustc-${ver/*~*/beta}-src/ +$ tar -C /tmp -xf ../rustc-${ver/\~/-}-src.tar.xz && ( dir=$PWD; cd /tmp/rustc-${ver/*~*/beta}-src/ && pwd && $dir/debian/prune-unused-deps ) && rm -rf /tmp/rustc-${ver/*~*/beta}-src/ $ git diff # Review the diff. If it removes too much stuff, it could mean that rustc # pulled in new unnecessary dependencies in this newer version. See if you can # drop them by amending the patch "d-0000-ignore-removed-submodules.patch". # Rerun the above "tar ..." commands again and check that your patch works. -# For example, there is absolutely no reason to pull in windows-sys/windows. +# For example, there is absolutely no reason to pull in windows-sys/windows or +# openssl-src. $ git commit -m "Update Files-Excluded for new upstream version ${ver/\~/-}" debian/copyright $ uscan --verbose # yes, again, to pick up the new Files-Excluded stuff @@ -159,7 +168,6 @@ $ git checkout debian/experimental $ gbp import-orig ../rustc_$ver+dfsg1.orig.tar.xz $ dch -v $ver+dfsg1-1~exp1 "New upstream release." $ debian/rules update-version -# might also need to bump the version of the cargo Build-Depends # then refresh patches, etc etc # Use /usr/share/cargo/scripts/guess-crate-copyright to help update d/copyright quickly diff --git a/debian/changelog b/debian/changelog index 61876e9fe..d59dbe310 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,22 @@ +rustc (1.76.0+dfsg1-1) unstable; urgency=medium + + [ Samuel Thibault ] + * Fix hurd build: + - debian/patches/vendor/u-hurd-gix-index-2.patch + - debian/patches/vendor/u-hurd-gix-index.patch + + -- Fabian Grünbichler Wed, 19 Jun 2024 07:51:49 +0200 + +rustc (1.76.0+dfsg1-1~exp1) experimental; urgency=medium + + * New upstream release (Closes: #1073068) + * switch to gbp pq and topics for patches + * adapt rebasing script to patch changes + * d/control: add libsqlite3-dev to B-D + * doc: fix rust-by-example theme + + -- Fabian Grünbichler Fri, 14 Jun 2024 14:50:17 +0200 + rustc (1.75.0+dfsg1-5) unstable; urgency=medium [ Samuel Thibault ] diff --git a/debian/control b/debian/control index 0a64e19fd..b95d6ebfb 100644 --- a/debian/control +++ b/debian/control @@ -13,9 +13,9 @@ Build-Depends: debhelper-compat (= 13), dpkg-dev (>= 1.17.14), python3:native, - cargo:native (>= 1.74.0+dfsg) , - rustc:native (>= 1.74.0+dfsg) , - rustc:native (<= 1.75.0++) , + cargo:native (>= 1.75.0+dfsg) , + rustc:native (>= 1.75.0+dfsg) , + rustc:native (<= 1.76.0++) , llvm-17-dev:native, llvm-17-tools:native, gcc-mingw-w64-x86-64-posix:native [amd64] , @@ -37,6 +37,7 @@ Build-Depends: libcurl4-openssl-dev | libcurl4-gnutls-dev, libssh2-1-dev, libssl-dev, + libsqlite3-dev, libgit2-dev (>= 1.7.1), libgit2-dev (<< 1.8~~), libhttp-parser-dev, @@ -86,7 +87,7 @@ Description: Rust systems programming language generic programming and meta-programming, in both static and dynamic styles. -Package: libstd-rust-1.75 +Package: libstd-rust-1.76 Section: libs Architecture: any Multi-Arch: same @@ -113,7 +114,7 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends}, - libstd-rust-1.75 (= ${binary:Version}), + libstd-rust-1.76 (= ${binary:Version}), Description: Rust standard libraries - development files Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly @@ -308,7 +309,7 @@ Package: rust-clippy Architecture: any Multi-Arch: allowed Depends: ${misc:Depends}, ${shlibs:Depends}, - libstd-rust-1.75 (= ${binary:Version}) + libstd-rust-1.76 (= ${binary:Version}) Recommends: cargo Description: Rust linter Rust is a curly-brace, block-structured expression language. It diff --git a/debian/copyright b/debian/copyright index 5d33f9cb5..6470d94de 100644 --- a/debian/copyright +++ b/debian/copyright @@ -30,14 +30,17 @@ Files-Excluded: # rust-analyzer parts we don't need (yet) src/tools/rust-analyzer/editors src/tools/rust-analyzer/.github + vendor/rust-analyzer-salsa/book # Embedded GH pages src/tools/clippy/util/gh-pages # Embedded C libraries - vendor/lzma-sys*/xz-* + vendor/curl-sys/curl vendor/libgit2-sys/libgit2 vendor/libssh2-sys/libssh2 - vendor/curl-sys/curl + vendor/libsqlite3-sys/sqlite3 + vendor/libsqlite3-sys/sqlcipher vendor/libz-sys/src/zlib* + vendor/lzma-sys*/xz-* # Embedded binary blobs vendor/jsonpath_lib/docs vendor/mdbook/src/theme/playground_editor @@ -51,27 +54,32 @@ Files-Excluded: vendor/wasm-bindgen/guide vendor/wasm-bindgen/examples/import_js/index.js vendor/wasm-bindgen/examples/import_js/webpack.config.js +# TMEP hack, see debian/prune-unused-deps + vendor/cc # unused dependencies, generated by debian/prune-unused-deps # DO NOT EDIT below, AUTOGENERATED vendor/addr2line-0.19.0 vendor/aes + vendor/ahash-0.8.3 vendor/aho-corasick-0.7.18 + vendor/aho-corasick-1.0.2 + vendor/allocator-api2-0.2.15 vendor/anstyle-1.0.0 - vendor/anstyle-parse-0.2.0 + vendor/anstyle-parse-0.2.1 + vendor/anstyle-query-1.0.0 vendor/anstyle-wincon-2.1.0 vendor/anstyle-wincon - vendor/anyhow-1.0.71 - vendor/anymap - vendor/arbitrary vendor/backtrace-0.3.67 vendor/base64-0.21.2 - vendor/bitflags-2.3.2 vendor/bitflags-2.4.0 vendor/block-buffer-0.10.2 vendor/bstr-0.2.17 vendor/bstr-1.5.0 vendor/bumpalo-3.13.0 + vendor/bytes-1.4.0 + vendor/camino-1.1.4 vendor/cargo_metadata-0.18.0 + vendor/cargo-platform-0.1.2 vendor/cc-1.0.73 vendor/chalk-derive vendor/chalk-ir @@ -79,14 +87,18 @@ Files-Excluded: vendor/chalk-solve vendor/cipher vendor/clap-4.4.4 + vendor/clap-4.4.7 vendor/clap_builder-4.4.4 - vendor/clap_complete-4.3.1 + vendor/clap_builder-4.4.7 + vendor/clap_complete-4.4.3 vendor/clap_derive-4.4.2 vendor/clap_lex-0.5.0 vendor/command-group + vendor/core-foundation-0.9.3 vendor/core-foundation-sys-0.8.3 + vendor/core-foundation-sys-0.8.4 vendor/cpufeatures-0.2.5 - vendor/cpufeatures-0.2.7 + vendor/cpufeatures-0.2.8 vendor/cranelift-bforest vendor/cranelift-codegen vendor/cranelift-codegen-meta @@ -103,59 +115,67 @@ Files-Excluded: vendor/crossbeam-epoch-0.9.13 vendor/crossbeam-utils-0.8.14 vendor/crypto-common-0.1.3 - vendor/ctrlc + vendor/ctrlc-3.4.0 vendor/curl-sys-0.4.63+curl-8.1.2 - vendor/derive_arbitrary vendor/diff-0.1.12 vendor/digest-0.10.3 vendor/directories vendor/dirs-sys + vendor/dissimilar-1.0.6 vendor/dot vendor/either-1.6.1 + vendor/either-1.8.1 vendor/encode_unicode vendor/encoding_rs-0.8.32 vendor/equivalent-1.0.0 - vendor/errno-0.3.1 - vendor/errno-dragonfly + vendor/errno-0.3.5 + vendor/fastrand-2.0.0 vendor/filetime-0.2.16 vendor/filetime-0.2.21 + vendor/filetime-0.2.22 vendor/fixedbitset vendor/flate2-1.0.26 + vendor/form_urlencoded-1.2.0 vendor/fsevent-sys - vendor/fst vendor/generic-array-0.14.5 + vendor/getrandom-0.2.10 vendor/gimli-0.27.3 vendor/globset-0.4.10 vendor/globset-0.4.8 vendor/hashbrown-0.13.2 vendor/hashbrown-0.14.0 - vendor/heck-0.3.3 vendor/hermit-abi-0.2.6 - vendor/hkalbasi-rustc-ap-rustc_abi - vendor/hkalbasi-rustc-ap-rustc_index + vendor/hermit-abi-0.3.2 vendor/home-0.5.4 + vendor/idna-0.4.0 vendor/ignore-0.4.18 + vendor/ignore-0.4.20 + vendor/indexmap-2.0.0 vendor/inotify vendor/inotify-sys vendor/inout vendor/is-terminal-0.4.8 vendor/itoa-1.0.2 + vendor/itoa-1.0.6 vendor/jemalloc-sys - vendor/jobserver-0.1.26 + vendor/js-sys-0.3.64 vendor/junction vendor/kqueue vendor/kqueue-sys - vendor/libc-0.2.146 vendor/libc-0.2.148 - vendor/libc-0.2.149 vendor/libffi vendor/libffi-sys vendor/libloading-0.8.0 + vendor/libm-0.2.7 vendor/libmimalloc-sys vendor/libnghttp2-sys + vendor/libz-sys-1.1.9 vendor/linked-hash-map + vendor/linux-raw-sys-0.4.10 + vendor/lock_api-0.4.10 vendor/log-0.4.17 vendor/log-0.4.19 + vendor/lsp-server vendor/lzma-sys-0.1.17 vendor/mach vendor/memchr-2.5.0 @@ -164,73 +184,77 @@ Files-Excluded: vendor/mimalloc vendor/miniz_oxide-0.6.2 vendor/mio-0.8.5 - vendor/miow-0.5.0 vendor/miow - vendor/nix + vendor/nix-0.26.2 vendor/normpath vendor/notify vendor/ntapi-0.4.0 vendor/ntapi + vendor/nu-ansi-term vendor/num_cpus-1.15.0 + vendor/num-traits-0.2.15 vendor/object-0.30.4 + vendor/object-0.32.0 vendor/once_cell-1.12.0 vendor/opener-0.5.0 vendor/openssl-0.10.55 vendor/openssl-src vendor/openssl-sys-0.9.90 vendor/option-ext - vendor/parking_lot_core-0.9.6 + vendor/parking_lot_core-0.9.8 vendor/paste - vendor/pest-2.6.0 - vendor/pest_derive-2.6.0 - vendor/pest_generator-2.6.0 - vendor/pest_meta-2.6.0 + vendor/percent-encoding-2.3.0 + vendor/pest-2.7.0 + vendor/pest_derive-2.7.0 + vendor/pest_generator-2.7.0 + vendor/pest_meta-2.7.0 vendor/petgraph + vendor/pin-project-lite-0.2.10 vendor/pin-project-lite-0.2.9 vendor/pkg-config-0.3.25 vendor/proc-macro2-1.0.60 vendor/proc-macro2-1.0.63 + vendor/proc-macro2-1.0.69 vendor/protobuf vendor/protobuf-support vendor/pulldown-cmark-to-cmark vendor/quote-1.0.26 vendor/quote-1.0.28 vendor/quote-1.0.29 - vendor/ra-ap-rustc_index - vendor/ra-ap-rustc_parse_format - vendor/rayon-1.7.0 - vendor/rayon-core-1.11.0 vendor/redox_syscall-0.2.13 + vendor/redox_syscall-0.3.5 vendor/regalloc2 vendor/regex-1.5.6 + vendor/regex-1.8.4 vendor/regex-syntax-0.6.26 + vendor/regex-syntax-0.7.2 vendor/region vendor/rustc-build-sysroot vendor/rustix-0.38.19 vendor/ryu-1.0.10 - vendor/salsa - vendor/salsa-macros + vendor/ryu-1.0.13 vendor/schannel vendor/scip + vendor/scopeguard-1.1.0 vendor/security-framework-2.9.1 + vendor/security-framework-sys-2.9.0 vendor/semver-1.0.17 - vendor/serde-1.0.156 vendor/serde-1.0.160 vendor/serde-1.0.185 - vendor/serde_derive-1.0.156 vendor/serde_derive-1.0.160 vendor/serde_derive-1.0.185 vendor/serde_json-1.0.81 - vendor/serde_json-1.0.97 vendor/serde_json-1.0.99 vendor/serde_spanned-0.6.3 vendor/sha1-0.10.5 vendor/sha2-0.10.2 vendor/sha2-0.10.7 + vendor/sharded-slab-0.1.4 vendor/slice-group-by vendor/smallvec-1.10.0 - vendor/syn-2.0.18 - vendor/syn-2.0.29 + vendor/smallvec-1.11.0 + vendor/socket2-0.4.9 + vendor/syn-2.0.32 vendor/syn-2.0.8 vendor/target-lexicon vendor/tempfile-3.8.0 @@ -248,57 +272,76 @@ Files-Excluded: vendor/toml-0.5.9 vendor/toml_datetime-0.6.3 vendor/tracing-attributes-0.1.26 - vendor/tracing-core-0.1.31 - vendor/tracing-tree-0.2.3 - vendor/typed-arena + vendor/tracing-subscriber-0.3.17 + vendor/tracing-tree vendor/typenum-1.15.0 + vendor/typenum-1.16.0 + vendor/ucd-trie-0.1.5 vendor/unicase-2.6.0 vendor/unicode-ident-1.0.0 + vendor/unicode-ident-1.0.9 vendor/unicode-width-0.1.10 vendor/url-2.4.0 vendor/walkdir-2.3.2 vendor/walkdir-2.3.3 + vendor/wasm-bindgen-0.2.87 + vendor/wasm-bindgen-backend-0.2.87 + vendor/wasm-bindgen-macro-0.2.87 + vendor/wasm-bindgen-macro-support-0.2.87 + vendor/wasm-bindgen-shared-0.2.87 vendor/wasmtime-jit-icache-coherence vendor/web-sys-0.3.61 vendor/winapi vendor/winapi-i686-pc-windows-gnu + vendor/winapi-util-0.1.5 vendor/winapi-util vendor/winapi-x86_64-pc-windows-gnu vendor/windows-0.48.0 vendor/windows_aarch64_gnullvm-0.42.2 vendor/windows_aarch64_gnullvm-0.48.0 + vendor/windows_aarch64_gnullvm-0.48.5 vendor/windows_aarch64_gnullvm vendor/windows_aarch64_msvc-0.42.2 vendor/windows_aarch64_msvc-0.48.0 + vendor/windows_aarch64_msvc-0.48.5 vendor/windows_aarch64_msvc vendor/windows vendor/windows-core vendor/windows_i686_gnu-0.42.2 vendor/windows_i686_gnu-0.48.0 + vendor/windows_i686_gnu-0.48.5 vendor/windows_i686_gnu vendor/windows_i686_msvc-0.42.2 vendor/windows_i686_msvc-0.48.0 + vendor/windows_i686_msvc-0.48.5 vendor/windows_i686_msvc vendor/windows-sys-0.42.0 vendor/windows-sys-0.45.0 + vendor/windows-sys-0.48.0 vendor/windows-sys vendor/windows-targets-0.42.2 vendor/windows-targets-0.48.0 vendor/windows-targets-0.48.1 + vendor/windows-targets-0.48.5 vendor/windows-targets vendor/windows_x86_64_gnu-0.42.2 vendor/windows_x86_64_gnu-0.48.0 + vendor/windows_x86_64_gnu-0.48.5 vendor/windows_x86_64_gnu vendor/windows_x86_64_gnullvm-0.42.2 vendor/windows_x86_64_gnullvm-0.48.0 + vendor/windows_x86_64_gnullvm-0.48.5 vendor/windows_x86_64_gnullvm vendor/windows_x86_64_msvc-0.42.2 vendor/windows_x86_64_msvc-0.48.0 + vendor/windows_x86_64_msvc-0.48.5 vendor/windows_x86_64_msvc vendor/winreg vendor/xz2-0.1.6 vendor/yaml-merge-keys vendor/yaml-rust + vendor/zerocopy-0.7.28 + vendor/zerocopy-derive-0.7.28 # DO NOT EDIT above, AUTOGENERATED Files: C*.md @@ -393,6 +436,18 @@ Comment: see https://github.com/rust-lang/ar_archive_writer derived from LLVM code +Files: + vendor/arbitrary/* + vendor/derive_arbitrary/* +Copyright: 2017-2024 The Rust-Fuzz Project Developers + 2017-2024 Nick Fitzgerald + 2017-2024 Manish Goregaokar + 2017-2024 Simonas Kazlauskas + 2017-2024 Brian L. Troutwine + 2017-2024 Corey Farwell +License: MIT OR Apache-2.0 +Comment: see https://github.com/rust-fuzz/arbitrary/ + Files: vendor/askama*/* Copyright: 2016-2022 Dirkjan Ochtman License: MIT OR Apache-2.0 @@ -401,10 +456,9 @@ Comment: see https://github.com/djc/askama Files: vendor/bitflags/* vendor/bitflags-1.*/* - vendor/cc/* + vendor/cc-1.*/* vendor/cmake/* vendor/env_logger/* - vendor/env_logger-0.*/* vendor/getopts/* vendor/glob/* vendor/libc/* @@ -558,20 +612,10 @@ Copyright: 2018-2024 Michal 'vorner' Vaner License: MIT OR Apache-2.0 Comment: see https://github.com/vorner/arc-swap -Files: vendor/array_tool/* -Copyright: 2015-2018 Daniel P. Clark <6ftdan@gmail.com> -License: MIT OR Apache-2.0 -Comment: see https://github.com/danielpclark/array_tool - Files: vendor/autocfg/* Copyright: 2018-2020 Josh Stone License: Apache-2.0 or MIT -Files: vendor/atty/* -Copyright: 2015-2017 softprops -License: MIT -Comment: see https://github.com/softprops/atty - Files: vendor/backtrace/* Copyright: 2015-2022 The Rust Project Developers License: MIT or Apache-2.0 @@ -841,16 +885,16 @@ Copyright: 2015-2022 The Crossbeam Project Developers License: MIT or Apache-2.0 Comment: see https://github.com/crossbeam-rs -Files: vendor/cstr/* -Copyright: 2018-2020 Xidorn Quan -License: MIT -Comment: see https://github.com/upsuper/cstr - Files: vendor/ct-codecs/* Copyright: 2020-2022 Frank Denis License: MIT Comment: see https://github.com/jedisct1/rust-ct-codecs +Files: vendor/ctrlc/* +Copyright: 2015-2024 Antti Keränen +License: MIT or Apache-2.0 +Comment: see https://github.com/Detegr/rust-ctrlc.git + Files: vendor/curl/* vendor/curl-sys/* @@ -1047,7 +1091,14 @@ Copyright: 2016-2019 Steven Fackler License: MIT or Apache-2.0 Comment: see https://github.com/sfackler/rust-fallible-iterator -Files: vendor/faster-hex/* +Files: vendor/fallible-streaming-iterator/* +Copyright: 2016-2018 Steven Fackler +License: MIT or Apache-2.0 +Comment: see https://github.com/sfackler/fallible-streaming-iterator + +Files: + vendor/faster-hex/* + vendor/faster-hex-0.*/* Copyright: 2018-2023 zhangsoledad <787953403@qq.com> License: MIT Comment: see https://github.com/NervosFoundation/faster-hex @@ -1115,6 +1166,11 @@ Copyright: 2017-2023 Denis Kurilenko License: MIT Comment: see https://github.com/webdesus/fs_extra +Files: vendor/fst/* +Copyright: 2015-2023 Andrew Gallant +License: Unlicense or MIT +Comment: see https://github.com/BurntSushi/fst + Files: vendor/futf/* Copyright: 2015-2018 Keegan McAllister License: MIT or Apache-2.0 @@ -1231,14 +1287,17 @@ Copyright: 2014-2017 Ning Sun License: MIT Comment: see https://github.com/sunng87/handlebars-rust +Files: vendor/hashlink/* +Copyright: 2019-2024 kyren +License: MIT OR Apache-2.0 +Comment: see https://github.com/kyren/hashlink + Files: vendor/heck/* Copyright: 2017-2018 Without Boats License: MIT OR Apache-2.0 Comment: see https://github.com/withoutboats/heck -Files: - vendor/hermit-abi/* - vendor/hermit-abi-0.*/* +Files: vendor/hermit-abi/* Copyright: 2019-2019 Stefan Lankes License: MIT or Apache-2.0 Comment: see https://github.com/hermitcore/hermit-abi @@ -1296,7 +1355,6 @@ Comment: see https://github.com/LeopoldArkham/humansize Files: vendor/humantime/* - vendor/humantime-*/* Copyright: 2016-2018 Paul Colomiets 2016 The humantime Developers @@ -1352,9 +1410,7 @@ Copyright: 2020-2023 Jane Lusby License: MIT OR Apache-2.0 Comment: see https://github.com/yaahc/indenter -Files: - vendor/indexmap/* - vendor/indexmap-1.*/* +Files: vendor/indexmap/* Copyright: 2016-2019 bluss 2016-2019 Josh Stone License: Apache-2.0 or MIT @@ -1494,6 +1550,13 @@ Copyright: 2014-2024 Alex Crichton License: MIT or Apache-2.0 Comment: see https://github.com/alexcrichton/ssh2-rs +Files: + vendor/libsqlite3-sys/* + vendor/rusqlite/* +Copyright: 2014-2024 The rusqlite developers +License: MIT +Comment: see https://github.com/rusqlite/rusqlite + Files: vendor/libz-sys/* Copyright: 2014-2024 Alex Crichton 2014-2024 Josh Triplett @@ -1512,11 +1575,6 @@ Copyright: 2021-2022 Dan Gohman License: Apache-2.0 with LLVM exception OR Apache-2.0 OR MIT Comment: see https://github.com/sunfishcode/linux-raw-sys -Files: vendor/lsp-server/* -Copyright: 2024 rust-analyzer team -License: MIT OR Apache-2.0 -Comment: see https://github.com/rust-lang/rust-analyzer/tree/master/lib/lsp-server - Files: vendor/lsp-types/* Copyright: 2016-2022 Markus Westerlind 2016-2022 Bruno Medeiros @@ -1558,9 +1616,7 @@ Copyright: 2015-2021 Dan Burkert License: MIT or Apache-2.0 Comment: see https://github.com/RazrFalcon/memmap2-rs -Files: - vendor/memoffset/* - vendor/memoffset-0.*/* +Files: vendor/memoffset/* Copyright: 2017-2019 Gilad Naaman License: MIT Comment: see https://github.com/Gilnaa/memoffset @@ -1604,6 +1660,11 @@ Copyright: 2014-2018 Matt Brubeck License: MIT Comment: see https://github.com/mbrubeck/rust-debug-unreachable +Files: vendor/nix/* +Copyright: 2014-2024 The nix-rust Project Developers +License: MIT +Comment: see https://github.com/nix-rust/nix + Files: vendor/nohash-hasher/* Copyright: 2018-2020 Parity Technologies License: Apache-2.0 OR MIT @@ -1619,7 +1680,7 @@ Copyright: 2021-2024 Jacob Pratt License: MIT OR Apache-2.0 Comment: see https://github.com/jhpratt/num_threads -Files: vendor/nu-ansi-term/* +Files: vendor/nu-ansi-term-0.46.0/* Copyright: 2014-2023 ogham@bsago.me 2014-2023 Ryan Scheel (Havvy) 2014-2023 Josh Triplett @@ -1716,13 +1777,10 @@ Comment: see https://github.com/jam1garner/owo-colors Files: vendor/hashbrown/* - vendor/hashbrown-0.*/* vendor/lock_api/* vendor/thread_local/* vendor/parking_lot/* - vendor/parking_lot-0.11.2/* vendor/parking_lot_core/* - vendor/parking_lot_core-0.*/* Copyright: 2016-2019 Amanieu d'Antras License: MIT or Apache-2.0 Comment: @@ -1816,6 +1874,11 @@ Copyright: 2022 Taiki Endo License: Apache-2.0 OR MIT Comment: see https://github.com/taiki-e/portable-atomic +Files: vendor/powerfmt/* +Copyright: 2023-2024 Jacob Pratt +License: MIT OR Apache-2.0 +Comment: see https://github.com/jhpratt/powerfmt + Files: vendor/precomputed-hash/* Copyright: 2017-2017 Emilio Cobos Álvarez License: MIT @@ -1933,11 +1996,23 @@ Copyright: 2018-2022 Aleksey Kladov License: MIT OR Apache-2.0 Comment: see https://github.com/rust-analyzer/rowan -Files: vendor/ra-ap-rustc_lexer/* -Copyright: 2010-2022 The Rust Project Developers +Files: + vendor/ra-ap-rustc_lexer/* + vendor/ra-ap-rustc_abi/* + vendor/ra-ap-rustc_index/* + vendor/ra-ap-rustc_index_macros/* + vendor/ra-ap-rustc_parse_format/* +Copyright: 2010-2024 The Rust Project Developers License: MIT or Apache-2.0 Comment: see https://github.com/rust-lang/rust +Files: + vendor/rust-analyzer-salsa/* + vendor/rust-analyzer-salsa-macros/* +Copyright: 2018-2024 Salsa developers +License: Apache-2.0 OR MIT +Comment: see https://github.com/salsa-rs/salsa + Files: vendor/rustc_apfloat/* Copyright: 2003-2017 University of Illinois at Urbana-Champaign. License: Apache-2.0 with LLVM exception @@ -2000,7 +2075,9 @@ Copyright: 2015-2024 Steven Fackler License: MIT OR Apache-2.0 Comment: see https://github.com/kornelski/rust-security-framework -Files: vendor/self_cell/* +Files: + vendor/self_cell/* + vendor/self_cell-0.*/* Copyright: 2020-2021 Lukas Bergdoll License: Apache-2.0 Comment: see https://github.com/Voultapher/self_cell @@ -2076,6 +2153,11 @@ Copyright: 2016-2020 Steven Fackler License: MIT or Apache-2.0 Comment: see https://github.com/sfackler/shell-escape +Files: vendor/shell-words/* +Copyright: 2018-2022 Tomasz Miąsko +License: MIT or Apache-2.0 +Comment: see https://github.com/tmiasko/shell-words + Files: vendor/shlex/* Copyright: 2015-2015 comex License: MIT or Apache-2.0 @@ -2328,6 +2410,7 @@ Files: vendor/tracing-core-0.*/* vendor/tracing-error/* vendor/tracing-log/* + vendor/tracing-log-0.*/* vendor/tracing-subscriber/* Copyright: 2018-2024 David Barsky @@ -2337,7 +2420,7 @@ Copyright: License: MIT Comment: see https://github.com/tokio-rs/tracing -Files: vendor/tracing-tree/* +Files: vendor/tracing-tree-0.*/* Copyright: 2020-2020 David Barsky 2020-2020 Nathan Whitaker License: MIT OR Apache-2.0 @@ -2363,6 +2446,11 @@ Copyright: 2019-2022 Jacob Brown License: MIT or Apache-2.0 Comment: see https://github.com/kardeiz/type-map +Files: vendor/typed-arena/* +Copyright: 2015-2023 The typed-arena developers +License: MIT +Comment: see https://github.com/SimonSapin/rust-typed-arena + Files: vendor/typenum/* Copyright: 2015-2019 Paho Lurie-Gregg 2015-2019 Andre Bogus @@ -2395,6 +2483,11 @@ Copyright: 2022-2024 Charles Lew License: MIT or Apache-2.0 Comment: see https://github.com/unicode-rs/unicode-properties +Files: vendor/unwinding/* +Copyright: 2021-2024 Gary Guo +License: MIT OR Apache-2.0 +Comment: see https://github.com/nbdd0121/unwinding/ + Files: vendor/varisat/* vendor/varisat-checker/* @@ -2560,6 +2653,13 @@ Copyright: 2014-2020 ogham@bsago.me License: MIT Comment: see https://github.com/botika/yansi-term +Files: + vendor/zerocopy/* + vendor/zerocopy-derive/* +Copyright: 2019-2024 Joshua Liebow-Feeser +License: BSD-2-Clause OR Apache-2.0 OR MIT +Comment: see https://github.com/google/zerocopy + Files: vendor/bytes/* Copyright: 2015-2022 Carl Lerche 2015-2022 Sean McArthur diff --git a/debian/gbp.conf b/debian/gbp.conf index d26455b68..e5a357931 100644 --- a/debian/gbp.conf +++ b/debian/gbp.conf @@ -6,3 +6,7 @@ ignore-branch = True [import-orig] upstream-branch = upstream/experimental debian-branch = debian/experimental + +[pq] +patch-numbers = False +drop = True diff --git a/debian/libstd-rust-1.75.install b/debian/libstd-rust-1.75.install deleted file mode 100644 index cd4545cca..000000000 --- a/debian/libstd-rust-1.75.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/${DEB_HOST_MULTIARCH}/ diff --git a/debian/libstd-rust-1.75.lintian-overrides b/debian/libstd-rust-1.75.lintian-overrides deleted file mode 100644 index 472af69f7..000000000 --- a/debian/libstd-rust-1.75.lintian-overrides +++ /dev/null @@ -1,16 +0,0 @@ -# "libstd" just seemed too generic -libstd-rust-1.75 binary: package-name-doesnt-match-sonames -libstd-rust-1.75 binary: sharedobject-in-library-directory-missing-soname - -# Rust doesn't use dev shlib symlinks nor any of the other shlib support stuff -libstd-rust-1.75 binary: dev-pkg-without-shlib-symlink -libstd-rust-1.75 binary: shlib-without-versioned-soname -libstd-rust-1.75 binary: unused-shlib-entry-in-control-file - -# can trigger if all its so files' hashes start with a latter and not a digit -libstd-rust-1.75 binary: empty-shlibs - -# Libraries that use libc symbols (libterm, libstd, etc) *are* linked -# to libc. Lintian gets upset that some Rust libraries don't need -# libc, boo hoo. -libstd-rust-1.75 binary: library-not-linked-against-libc diff --git a/debian/libstd-rust-1.75.triggers b/debian/libstd-rust-1.75.triggers deleted file mode 100644 index a88c20f92..000000000 --- a/debian/libstd-rust-1.75.triggers +++ /dev/null @@ -1,2 +0,0 @@ -# normally added by dh_makeshlibs, but fails for our versioning scheme -activate-noawait ldconfig diff --git a/debian/libstd-rust-1.76.install b/debian/libstd-rust-1.76.install new file mode 100644 index 000000000..cd4545cca --- /dev/null +++ b/debian/libstd-rust-1.76.install @@ -0,0 +1 @@ +usr/lib/${DEB_HOST_MULTIARCH}/ diff --git a/debian/libstd-rust-1.76.lintian-overrides b/debian/libstd-rust-1.76.lintian-overrides new file mode 100644 index 000000000..42311e89c --- /dev/null +++ b/debian/libstd-rust-1.76.lintian-overrides @@ -0,0 +1,16 @@ +# "libstd" just seemed too generic +libstd-rust-1.76 binary: package-name-doesnt-match-sonames +libstd-rust-1.76 binary: sharedobject-in-library-directory-missing-soname + +# Rust doesn't use dev shlib symlinks nor any of the other shlib support stuff +libstd-rust-1.76 binary: dev-pkg-without-shlib-symlink +libstd-rust-1.76 binary: shlib-without-versioned-soname +libstd-rust-1.76 binary: unused-shlib-entry-in-control-file + +# can trigger if all its so files' hashes start with a latter and not a digit +libstd-rust-1.76 binary: empty-shlibs + +# Libraries that use libc symbols (libterm, libstd, etc) *are* linked +# to libc. Lintian gets upset that some Rust libraries don't need +# libc, boo hoo. +libstd-rust-1.76 binary: library-not-linked-against-libc diff --git a/debian/libstd-rust-1.76.triggers b/debian/libstd-rust-1.76.triggers new file mode 100644 index 000000000..a88c20f92 --- /dev/null +++ b/debian/libstd-rust-1.76.triggers @@ -0,0 +1,2 @@ +# normally added by dh_makeshlibs, but fails for our versioning scheme +activate-noawait ldconfig diff --git a/debian/patches-unused/d-bootstrap-use-system-compiler-rt.patch b/debian/patches-unused/d-bootstrap-use-system-compiler-rt.patch new file mode 100644 index 000000000..9c34e7257 --- /dev/null +++ b/debian/patches-unused/d-bootstrap-use-system-compiler-rt.patch @@ -0,0 +1,40 @@ +Description: Use system compiler-rt from clang, EXPERIMENTAL AND NOT WORKING YET +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-unused/d-rustc-prefer-dynamic.patch b/debian/patches-unused/d-rustc-prefer-dynamic.patch new file mode 100644 index 000000000..13bb42922 --- /dev/null +++ b/debian/patches-unused/d-rustc-prefer-dynamic.patch @@ -0,0 +1,18 @@ +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 +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-unused/d-test-host-duplicates.patch b/debian/patches-unused/d-test-host-duplicates.patch new file mode 100644 index 000000000..50c39adf9 --- /dev/null +++ b/debian/patches-unused/d-test-host-duplicates.patch @@ -0,0 +1,20 @@ +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 +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::>(); ++ v.clear(); + assert_eq!( +- addrs.iter().filter(|&(_, &v)| v > 1).collect::>(), ++ v, + vec![], + "There should be no duplicate localhost entries" + ); diff --git a/debian/patches-unused/u-allow-system-compiler-rt.patch b/debian/patches-unused/u-allow-system-compiler-rt.patch new file mode 100644 index 000000000..3bd874a5c --- /dev/null +++ b/debian/patches-unused/u-allow-system-compiler-rt.patch @@ -0,0 +1,327 @@ +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/behaviour/d-rust-gdb-paths.patch b/debian/patches/behaviour/d-rust-gdb-paths.patch new file mode 100644 index 000000000..86d9c2d4d --- /dev/null +++ b/debian/patches/behaviour/d-rust-gdb-paths.patch @@ -0,0 +1,25 @@ +From: Angus Lees +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: Hardcode GDB python module directory + +Debian package installs python modules into a fixed directory, so +just hardcode path in wrapper script. + +Forwarded: not-needed +--- + src/etc/rust-gdbgui | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +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 + + # Find out where the pretty printer Python module is +-RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)" ++RUSTC_SYSROOT="$(if type "$RUSTC" >/dev/null 2>&1; then "$RUSTC" --print=sysroot; else echo /usr; fi)" + GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc" + # Get the commit hash for path remapping + RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')" diff --git a/debian/patches/behaviour/d-rust-lldb-paths.patch b/debian/patches/behaviour/d-rust-lldb-paths.patch new file mode 100644 index 000000000..6afe0cc19 --- /dev/null +++ b/debian/patches/behaviour/d-rust-lldb-paths.patch @@ -0,0 +1,29 @@ +From: Angus Lees +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: Hardcode LLDB python module directory + +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(-) + +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') + + # Find out where to look for the pretty printer Python module +-RUSTC_SYSROOT=$(rustc --print sysroot) ++RUSTC_SYSROOT="$(if type "$RUSTC" >/dev/null 2>&1; then "$RUSTC" --print=sysroot; else echo /usr; fi)" + RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb" + +-lldb=lldb ++lldb=lldb-17 + if [ -f "$RUST_LLDB" ]; then + lldb="$RUST_LLDB" + else diff --git a/debian/patches/behaviour/d-rustc-add-soname.patch b/debian/patches/behaviour/d-rustc-add-soname.patch new file mode 100644 index 000000000..91959bdc0 --- /dev/null +++ b/debian/patches/behaviour/d-rustc-add-soname.patch @@ -0,0 +1,44 @@ +From: Angus Lees +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: Set DT_SONAME when building dylibs + +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 +hash and reads embedded metadata to work out versions, etc. + +The upshot is that there is no need for the usual "libfoo.so -> +libfoo-1.2.3.so" symlink common with C/C++ when building with Rust, +and no need to communicate an alternate filename to use at run-time +vs compile time. If linking to a Rust dylib from C/C++ however, a +"libfoo.so -> libfoo-$hash.so" symlink may well be useful and in +this case DT_SONAME=libfoo-$hash.so would be required. More +mundanely, various tools (eg: dpkg-shlibdeps) complain if they don't +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(+) + +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); ++ ++ if (crate_type == config::CrateType::Dylib || crate_type == config::CrateType::Cdylib) ++ && sess.target.linker_flavor.is_gnu() { ++ let filename = String::from(out_filename.file_name().unwrap().to_str().unwrap()); ++ let soname = [String::from("-Wl,-soname=") + &filename]; ++ cmd.args(&soname); ++ } + } + + // Write the NatVis debugger visualizer files for each crate to the temp directory and gather the file paths. 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 +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/behaviour/d-rustc-windows-ssp.patch b/debian/patches/behaviour/d-rustc-windows-ssp.patch new file mode 100644 index 000000000..6cacf0ef1 --- /dev/null +++ b/debian/patches/behaviour/d-rustc-windows-ssp.patch @@ -0,0 +1,22 @@ +From: Debian Rust Maintainers +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: d-rustc-windows-ssp + +Bug: https://github.com/rust-lang/rust/issues/68973 +--- + compiler/rustc_target/src/spec/base/windows_gnu.rs | 2 ++ + 1 file changed, 2 insertions(+) + +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", ++ "-lssp_nonshared", ++ "-lssp", + ]; + let mut late_link_args = + TargetOptions::link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), mingw_libs); diff --git a/debian/patches/behaviour/d-rustdoc-disable-embedded-fonts.patch b/debian/patches/behaviour/d-rustdoc-disable-embedded-fonts.patch new file mode 100644 index 000000000..7f9a13289 --- /dev/null +++ b/debian/patches/behaviour/d-rustdoc-disable-embedded-fonts.patch @@ -0,0 +1,43 @@ +From: Debian Rust Maintainers +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: removed some embedded fonts + +Forwarded: not-needed +=================================================================== +--- + src/librustdoc/html/static/css/rustdoc.css | 8 -------- + src/librustdoc/html/static_files.rs | 2 -- + 2 files changed, 10 deletions(-) + +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; + } + +-/* Avoid using legacy CJK serif fonts in Windows like Batang. */ +-@font-face { +- font-family: 'NanumBarunGothic'; +- src: url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2"); +- font-display: swap; +- unicode-range: U+AC00-D7AF, U+1100-11FF, U+3130-318F, U+A960-A97F, U+D7B0-D7FF; +-} +- + * { + box-sizing: border-box; + } +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", +- nanum_barun_gothic_regular => "static/fonts/NanumBarunGothic.ttf.woff2", +- nanum_barun_gothic_license => "static/fonts/NanumBarunGothic-LICENSE.txt", + } + + pub(crate) static SCRAPE_EXAMPLES_HELP_MD: &str = include_str!("static/scrape-examples-help.md"); 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 +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/build/d-bootstrap-cargo-doc-paths.patch b/debian/patches/build/d-bootstrap-cargo-doc-paths.patch new file mode 100644 index 000000000..d0db153e5 --- /dev/null +++ b/debian/patches/build/d-bootstrap-cargo-doc-paths.patch @@ -0,0 +1,387 @@ +From: Debian Rust Maintainers +Date: Thu, 14 Jul 2022 13:17:39 +0200 +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 +++++----- + src/doc/index.md | 2 +- + src/doc/reference/src/conditional-compilation.md | 2 +- + 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/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(-) + +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! + +-[`cargo check`]: ../../cargo/commands/cargo-check.html +-[`cargo fix`]: ../../cargo/commands/cargo-fix.html ++[`cargo check`]: ../../../../cargo/book/commands/cargo-check.html ++[`cargo fix`]: ../../../../cargo/book/commands/cargo-fix.html + [`explicit-outlives-requirements`]: ../../rustc/lints/listing/allowed-by-default.html#explicit-outlives-requirements + [`keyword-idents`]: ../../rustc/lints/listing/allowed-by-default.html#keyword-idents + [`rustfix`]: https://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 +-[Cargo targets]: ../../cargo/reference/cargo-targets.html +-[Cargo workspace]: ../../cargo/reference/workspaces.html ++[Cargo features]: ../../../../cargo/book/reference/features.html ++[Cargo package]: ../../../../cargo/book/reference/manifest.html#the-package-section ++[Cargo targets]: ../../../../cargo/book/reference/cargo-targets.html ++[Cargo workspace]: ../../../../cargo/book/reference/workspaces.html + [CLI flag]: ../../rustc/lints/levels.html#via-compiler-flag +-[Code generation]: ../../cargo/reference/build-script-examples.html#code-generation ++[Code generation]: ../../../../cargo/book/reference/build-script-examples.html#code-generation + [conditional compilation]: ../../reference/conditional-compilation.html + [documentation tests]: ../../rustdoc/documentation-tests.html + [JSON messages]: ../../rustc/json.html +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! + +-[`cargo fix`]: ../../cargo/commands/cargo-fix.html +-[`cargo test`]: ../../cargo/commands/cargo-test.html ++[`cargo fix`]: ../../../../cargo/book/commands/cargo-fix.html ++[`cargo test`]: ../../../../cargo/book/commands/cargo-test.html + [Advanced migration strategies]: advanced-migrations.md + [nightly channel]: ../../book/appendix-07-nightly-rust.html +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. + +-[4]: ../../cargo/reference/resolver.html#feature-resolver-version-2 ++[4]: ../../../../cargo/book/reference/resolver.html#feature-resolver-version-2 + [5]: https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver +-[workspace]: ../../cargo/reference/workspaces.html +-[virtual workspace]: ../../cargo/reference/workspaces.html#virtual-workspace +-[`resolver` field]: ../../cargo/reference/resolver.html#resolver-versions ++[workspace]: ../../../../cargo/book/reference/workspaces.html ++[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 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 +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 + +-[The Cargo Book](cargo/index.html) is a guide to Cargo, Rust's build tool and ++[The Cargo Book](../../cargo/book/index.html) is a guide to Cargo, Rust's build tool and + dependency manager. + + ### The Rustdoc Book +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 +-[cargo-feature]: ../cargo/reference/features.html ++[cargo-feature]: ../../../cargo/book/reference/features.html + [crate type]: linkage.md + [static C runtime]: linkage.md#static-and-dynamic-c-runtimes +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 +-[cargo book]: ../cargo/index.html +-[cargo reference]: ../cargo/reference/index.html ++[cargo book]: ../../../cargo/book/index.html ++[cargo reference]: ../../../cargo/book/reference/index.html + [expressions chapter]: expressions.html + [file an issue]: https://github.com/rust-lang/reference/issues + [lifetime of temporaries]: expressions.html#temporaries +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() { + } + ``` + +-[cargo]: ../cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts ++[cargo]: ../../../cargo/book/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts + + To use this feature locally, you typically will use the `RUSTFLAGS` environment + variable to specify flags to the compiler through Cargo. For example to compile +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 +-[Cargo's build scripts]: ../cargo/reference/build-scripts.html ++[Cargo's build scripts]: ../../../cargo/book/reference/build-scripts.html + [Derive macros]: #derive-macros + [Function-like macros]: #function-like-procedural-macros + [`Delimiter::None`]: ../proc_macro/enum.Delimiter.html#variant.None +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 +-[`cargo test`]: ../../cargo/commands/cargo-test.html ++[`cargo test`]: ../../../../cargo/book/commands/cargo-test.html + [`libtest`]: ../../test/index.html + [`main` function]: ../../reference/crates-and-source-files.html#main-functions + [`Result`]: ../../std/result/index.html +@@ -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 +-[Cargo]: ../../cargo/index.html ++[Cargo]: ../../../../cargo/book/index.html + [crate type]: ../../reference/linkage.html + [custom_test_frameworks documentation]: ../../unstable-book/language-features/custom-test-frameworks.html + [nightly channel]: ../../book/appendix-07-nightly-rust.html +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 +-[Cargo](../cargo/index.html). It's all in service of `rustc` though! If you ++[Cargo](../../../cargo/book/index.html). It's all in service of `rustc` though! If you + want to see how Cargo calls `rustc`, you can + + ```bash +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. +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. + +-[build-std]: ../../cargo/reference/unstable.html#build-std ++[build-std]: ../../../../cargo/book/reference/unstable.html#build-std + + For example: + ```cmd +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]. + +-[build-std]: ../../cargo/reference/unstable.html#build-std ++[build-std]: ../../../../cargo/book/reference/unstable.html#build-std + + # Build scripts and procedural macros + +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 +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 +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 +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/build/d-bootstrap-no-assume-tools.patch b/debian/patches/build/d-bootstrap-no-assume-tools.patch new file mode 100644 index 000000000..512e6a9cd --- /dev/null +++ b/debian/patches/build/d-bootstrap-no-assume-tools.patch @@ -0,0 +1,28 @@ +From: Debian Rust Maintainers +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: set tools to those built in Debian + +Forwarded: not-needed +=================================================================== +--- + src/bootstrap/src/tests/builder.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +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"); ++ let mut tools = std::collections::HashSet::new(); ++ tools.insert("clippy".to_string()); ++ tools.insert("rustfmt".to_string()); + let mut config = configure(&["A", "B"], &["A", "B"]); + config.docs = false; + config.extended = true; ++ config.tools = Some(tools); + config.hosts = vec![b]; + let mut cache = run_build(&[], config); + 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 +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/build/d-bootstrap-rustflags.patch b/debian/patches/build/d-bootstrap-rustflags.patch new file mode 100644 index 000000000..ad9be6165 --- /dev/null +++ b/debian/patches/build/d-bootstrap-rustflags.patch @@ -0,0 +1,34 @@ +From: Debian Rust Maintainers +Date: Thu, 14 Jul 2022 13:17:38 +0200 +Subject: d-bootstrap-rustflags + +Forwarded: not-needed + +=================================================================== +--- + src/bootstrap/src/core/builder.rs | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +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 ++ if let Ok(ldflags) = env::var("LDFLAGS") { ++ for flag in ldflags.split_whitespace() { ++ if target.contains("windows") && flag.contains("relro") { ++ // relro is ELF-specific ++ continue; ++ } ++ rustflags.arg(&format!("-Clink-args={}", flag)); ++ } ++ } ++ + // FIXME: It might be better to use the same value for both `RUSTFLAGS` and `RUSTDOCFLAGS`, + // but this breaks CI. At the very least, stage0 `rustdoc` needs `--cfg bootstrap`. See + // #71458. diff --git a/debian/patches/build/d-bootstrap-use-local-css.patch b/debian/patches/build/d-bootstrap-use-local-css.patch new file mode 100644 index 000000000..d6cb82cf3 --- /dev/null +++ b/debian/patches/build/d-bootstrap-use-local-css.patch @@ -0,0 +1,55 @@ +From: Debian Rust Maintainers +Date: Thu, 14 Jul 2022 13:17:39 +0200 +Subject: d-bootstrap-use-local-css + +Forwarded: not-needed +=================================================================== +--- + src/bootstrap/src/core/build_steps/doc.rs | 27 +++++++++++++++++++++------ + 1 file changed, 21 insertions(+), 6 deletions(-) + +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") +- .arg("https://play.rust-lang.org/") ++ .arg("https://play.rust-lang.org/"); ++ ++ // Debian: librustdoc now generates a resource-suffix for static ++ // files with rustc_hash::FxHasher, so we need to find it. ++ let _dir = out.join("static.files"); ++ if _dir.is_dir() { ++ let _css = _dir.read_dir().expect("Debian: failed to read static.files/ when is_dir() == true") ++ .find_map(|entry| entry.ok().map(|entry| { ++ let name = entry.file_name().into_string() ++ .expect("Debian: rustc files should have UTF-8 name"); ++ if name.starts_with("rustdoc-") && name.ends_with(".css") { ++ Some(name) ++ } else { None } ++ })).flatten(); ++ if let Some(name) = _css { ++ cmd.arg("--markdown-css").arg(name); ++ } ++ } ++ ++ cmd.arg("--markdown-css") ++ .arg("rust.css") + .arg("-o") + .arg(&out) + .arg(&path); +@@ -372,11 +392,6 @@ impl Step for Standalone { + cmd.arg("--disable-minification"); + } + +- if filename == "not_found.md" { +- cmd.arg("--markdown-css").arg("https://doc.rust-lang.org/rust.css"); +- } else { +- cmd.arg("--markdown-css").arg("rust.css"); +- } + builder.run(&mut cmd); + } + diff --git a/debian/patches/build/d-test-ignore-avx-44056.patch b/debian/patches/build/d-test-ignore-avx-44056.patch new file mode 100644 index 000000000..dfee30eef --- /dev/null +++ b/debian/patches/build/d-test-ignore-avx-44056.patch @@ -0,0 +1,23 @@ +From: Debian Rust Maintainers +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 + +=================================================================== +--- + tests/ui/issues/issue-44056.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +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 ++// ignore-test + // no-prefer-dynamic + // compile-flags: -Ctarget-feature=+avx -Clto + diff --git a/debian/patches/c-0003-tests-add-missing-cross-disabled-checks.patch b/debian/patches/c-0003-tests-add-missing-cross-disabled-checks.patch deleted file mode 100644 index e3a6397d5..000000000 --- a/debian/patches/c-0003-tests-add-missing-cross-disabled-checks.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 981279ccd8f7855faaed010bff0891afff588210 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= - -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-Transfer-Encoding: 8bit - -cross_conmpile::alternate states it should only be used in test cases -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 ---- - 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 ---- 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 - #[cargo_test] - fn custom_build_env_var_rustc_linker_cross_arch_host() { - let target = rustc_host(); -+ if cross_compile::disabled() { -+ return; -+ } - let cross_target = cross_compile::alternate(); - let p = project() - .file( -@@ -735,6 +738,9 @@ fn custom_build_env_var_rustc_linker_cro - #[cargo_test] - fn custom_build_linker_bad_cross_arch_host() { - let target = rustc_host(); -+ if cross_compile::disabled() { -+ return; -+ } - 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/c-2002_disable-net-tests.patch deleted file mode 100644 index 76f158538..000000000 --- a/debian/patches/c-2002_disable-net-tests.patch +++ /dev/null @@ -1,588 +0,0 @@ -Description: Disable network tests -Author: Ximin Luo -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 - } - - // 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: - } - - // Boy, sure would be nice to have a TLS implementation in rust! --#[cargo_test] -+#[allow(dead_code)] - 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 -@@ -2,7 +2,7 @@ - - use cargo_test_support::project; - --#[cargo_test] -+#[allow(dead_code)] - fn net_retry_loads_from_config() { - let p = project() - .file( -@@ -38,7 +38,7 @@ fn net_retry_loads_from_config() { - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - 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 -@@ -88,7 +88,7 @@ fn validate_upload_li() { - ); - } - --#[cargo_test] -+#[allow(dead_code)] - fn simple() { - let registry = RegistryBuilder::new().http_api().http_index().build(); - -@@ -130,7 +130,7 @@ You may press ctrl-c to skip waiting; th - - // Check that the `token` key works at the root instead of under a - // `[registry]` table. --#[cargo_test] -+#[allow(dead_code)] - 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 - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - 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 - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn old_token_location() { - // `publish` generally requires a remote registry - let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -270,7 +270,7 @@ You may press ctrl-c [..] - // Other tests will verify the endpoint gets the right payload. - } - --#[cargo_test] -+#[allow(dead_code)] - fn simple_with_index() { - // `publish` generally requires a remote registry - let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -315,7 +315,7 @@ You may press ctrl-c [..] - // Other tests will verify the endpoint gets the right payload. - } - --#[cargo_test] -+#[allow(dead_code)] - 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 - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - 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 - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn unpublishable_crate() { - // Use local registry for faster test times since no publish will occur - let registry = registry::init(); -@@ -426,7 +426,7 @@ fn unpublishable_crate() { - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - 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 - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - 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 - // Other tests will verify the endpoint gets the right payload. - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_in_sub_repo() { - // `publish` generally requires a remote registry - let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -565,7 +565,7 @@ You may press ctrl-c [..] - // Other tests will verify the endpoint gets the right payload. - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_when_ignored() { - // `publish` generally requires a remote registry - let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -614,7 +614,7 @@ You may press ctrl-c [..] - // Other tests will verify the endpoint gets the right payload. - } - --#[cargo_test] -+#[allow(dead_code)] - fn ignore_when_crate_ignored() { - // `publish` generally requires a remote registry - let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -662,7 +662,7 @@ You may press ctrl-c [..] - // Other tests will verify the endpoint gets the right payload. - } - --#[cargo_test] -+#[allow(dead_code)] - fn new_crate_rejected() { - // Use local registry for faster test times since no publish will occur - let registry = registry::init(); -@@ -695,7 +695,7 @@ fn new_crate_rejected() { - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn dry_run() { - // Use local registry for faster test times since no publish will occur - let registry = registry::init(); -@@ -738,7 +738,7 @@ See [..] - assert!(!registry::api_path().join("api/v1/crates/new").exists()); - } - --#[cargo_test] -+#[allow(dead_code)] - fn registry_not_in_publish_list() { - let p = project() - .file( -@@ -771,7 +771,7 @@ The registry `alternative` is not listed - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_empty_list() { - let p = project() - .file( -@@ -800,7 +800,7 @@ fn publish_empty_list() { - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_allowed_registry() { - let _registry = RegistryBuilder::new() - .http_api() -@@ -860,7 +860,7 @@ You may press ctrl-c [..] - ); - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_implicitly_to_only_allowed_registry() { - let _registry = RegistryBuilder::new() - .http_api() -@@ -963,7 +963,7 @@ fn publish_failed_with_index_and_only_al - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_fail_with_no_registry_specified() { - let p = project().build(); - -@@ -997,7 +997,7 @@ The registry `crates-io` is not listed i - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn block_publish_no_registry() { - let p = project() - .file( -@@ -1027,7 +1027,7 @@ fn block_publish_no_registry() { - } - - // Explicitly setting `crates-io` in the publish list. --#[cargo_test] -+#[allow(dead_code)] - fn publish_with_crates_io_explicit() { - // `publish` generally requires a remote registry - let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -1080,7 +1080,7 @@ You may press ctrl-c [..] - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_with_select_features() { - // `publish` generally requires a remote registry - let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -1131,7 +1131,7 @@ You may press ctrl-c [..] - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_with_all_features() { - // `publish` generally requires a remote registry - let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -1182,7 +1182,7 @@ You may press ctrl-c [..] - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_with_no_default_features() { - // Use local registry for faster test times since no publish will occur - let registry = registry::init(); -@@ -1218,7 +1218,7 @@ fn publish_with_no_default_features() { - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_with_patch() { - let registry = RegistryBuilder::new().http_api().http_index().build(); - Package::new("bar", "1.0.0").publish(); -@@ -1324,7 +1324,7 @@ You may press ctrl-c [..] - ); - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_checks_for_token_before_verify() { - let registry = registry::RegistryBuilder::new() - .no_configure_token() -@@ -1373,7 +1373,7 @@ fn publish_checks_for_token_before_verif - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_with_bad_source() { - let p = project() - .file( -@@ -1422,7 +1422,7 @@ include `--registry crates-io` to use cr - } - - // A dependency with both `git` and `version`. --#[cargo_test] -+#[allow(dead_code)] - fn publish_git_with_version() { - let registry = RegistryBuilder::new().http_api().http_index().build(); - -@@ -1566,7 +1566,7 @@ You may press ctrl-c [..] - ); - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_dev_dep_no_version() { - let registry = RegistryBuilder::new().http_api().http_index().build(); - -@@ -1656,7 +1656,7 @@ repository = "foo" - ); - } - --#[cargo_test] -+#[allow(dead_code)] - fn credentials_ambiguous_filename() { - // `publish` generally requires a remote registry - let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -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. --#[cargo_test] -+#[allow(dead_code)] - fn index_requires_token() { - // Use local registry for faster test times since no publish will occur - let registry = registry::init(); -@@ -1747,7 +1747,7 @@ fn index_requires_token() { - } - - // publish with source replacement without --registry --#[cargo_test] -+#[allow(dead_code)] - fn cratesio_source_replacement() { - registry::init(); - let p = project() -@@ -1776,7 +1776,7 @@ include `--registry dummy-registry` or ` - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn publish_with_missing_readme() { - // Use local registry for faster test times since no publish will occur - let registry = registry::init(); -@@ -1824,7 +1824,7 @@ Caused by: - } - - // Registry returns an API error. --#[cargo_test] -+#[allow(dead_code)] - fn api_error_json() { - let _registry = registry::RegistryBuilder::new() - .alternative() -@@ -1872,7 +1872,7 @@ Caused by: - } - - // Registry returns an API error with a 200 status code. --#[cargo_test] -+#[allow(dead_code)] - fn api_error_200() { - let _registry = registry::RegistryBuilder::new() - .alternative() -@@ -1920,7 +1920,7 @@ Caused by: - } - - // Registry returns an error code without a JSON message. --#[cargo_test] -+#[allow(dead_code)] - fn api_error_code() { - let _registry = registry::RegistryBuilder::new() - .alternative() -@@ -1975,7 +1975,7 @@ Caused by: - } - - // Registry has a network error. --#[cargo_test] -+#[allow(dead_code)] - fn api_curl_error() { - let _registry = registry::RegistryBuilder::new() - .alternative() -@@ -2025,7 +2025,7 @@ Caused by: - } - - // Registry returns an invalid response. --#[cargo_test] -+#[allow(dead_code)] - fn api_other_error() { - let _registry = registry::RegistryBuilder::new() - .alternative() -@@ -2075,7 +2075,7 @@ Caused by: - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn in_package_workspace() { - let registry = RegistryBuilder::new().http_api().http_index().build(); - -@@ -2127,7 +2127,7 @@ You may press ctrl-c [..] - validate_upload_li(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn with_duplicate_spec_in_members() { - // Use local registry for faster test times since no publish will occur - let registry = registry::init(); -@@ -2179,7 +2179,7 @@ fn with_duplicate_spec_in_members() { - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn in_package_workspace_with_members_with_features_old() { - let registry = RegistryBuilder::new().http_api().http_index().build(); - -@@ -2230,7 +2230,7 @@ You may press ctrl-c [..] - validate_upload_li(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn in_virtual_workspace() { - // Use local registry for faster test times since no publish will occur - let registry = registry::init(); -@@ -2266,7 +2266,7 @@ fn in_virtual_workspace() { - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn in_virtual_workspace_with_p() { - // `publish` generally requires a remote registry - let registry = registry::RegistryBuilder::new().http_api().build(); -@@ -2324,7 +2324,7 @@ You may press ctrl-c [..] - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn in_package_workspace_not_found() { - // Use local registry for faster test times since no publish will occur - let registry = registry::init(); -@@ -2369,7 +2369,7 @@ error: package ID specification `li` did - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn in_package_workspace_found_multiple() { - // Use local registry for faster test times since no publish will occur - let registry = registry::init(); -@@ -2426,7 +2426,7 @@ error: the `-p` argument must be specifi - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - // 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 -@@ -2473,7 +2473,7 @@ error: package ID specification `bar` di - .run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn http_api_not_noop() { - let registry = registry::RegistryBuilder::new().http_api().build(); - -@@ -2534,7 +2534,7 @@ You may press ctrl-c [..] - p.cargo("build").run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn wait_for_first_publish() { - // Counter for number of tries before the package is "published" - let arc: Arc> = Arc::new(Mutex::new(0)); -@@ -2616,7 +2616,7 @@ You may press ctrl-c to skip waiting; th - /// 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. --#[cargo_test] -+#[allow(dead_code)] - fn wait_for_first_publish_underscore() { - // Counter for number of tries before the package is "published" - let arc: Arc> = Arc::new(Mutex::new(0)); -@@ -2712,7 +2712,7 @@ You may press ctrl-c to skip waiting; th - p.cargo("build").with_status(0).run(); - } - --#[cargo_test] -+#[allow(dead_code)] - fn wait_for_subsequent_publish() { - // Counter for number of tries before the package is "published" - let arc: Arc> = Arc::new(Mutex::new(0)); -@@ -2804,7 +2804,7 @@ You may press ctrl-c to skip waiting; th - p.cargo("check").with_status(0).run(); - } - --#[cargo_test] -+#[allow(dead_code)] - 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 -@@ -63,7 +63,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(); -@@ -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/debian/patches/c-2003-workaround-qemu-vfork-command-not-found.patch b/debian/patches/c-2003-workaround-qemu-vfork-command-not-found.patch deleted file mode 100644 index 6453c3a30..000000000 --- a/debian/patches/c-2003-workaround-qemu-vfork-command-not-found.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: rust/src/tools/cargo/crates/cargo-test-macro/src/lib.rs -=================================================================== ---- 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 { - } - }; - if !output.status.success() { -+ // Debian specific patch, upstream wontfix: -+ // qemu has a faulty vfork where it fails to fail if a command is not -+ // found, with a unix_wait_status of 32512, or 0x7f00, 7f meaning -+ // exit code 127. See https://github.com/rust-lang/rust/issues/90825 -+ use std::os::unix::process::ExitStatusExt; -+ if output.status.into_raw() == 0x7f00 { -+ return false; -+ } - panic!( - "expected command `{}` to be runnable, got error {}:\n\ - stderr:{}\n\ 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/cargo/c-0003-tests-add-missing-cross-disabled-checks.patch b/debian/patches/cargo/c-0003-tests-add-missing-cross-disabled-checks.patch new file mode 100644 index 000000000..fef435fc6 --- /dev/null +++ b/debian/patches/cargo/c-0003-tests-add-missing-cross-disabled-checks.patch @@ -0,0 +1,42 @@ +From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= +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-Transfer-Encoding: 8bit + +cross_conmpile::alternate states it should only be used in test cases +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 +--- + src/tools/cargo/tests/testsuite/build_script.rs | 6 ++++++ + 1 file changed, 6 insertions(+) + +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 +@@ -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(); ++ if cross_compile::disabled() { ++ return; ++ } + let cross_target = cross_compile::alternate(); + let p = project() + .file( +@@ -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(); ++ if cross_compile::disabled() { ++ return; ++ } + let cross_target = cross_compile::alternate(); + let p = project() + .file( diff --git a/debian/patches/cargo/c-2002_disable-net-tests.patch b/debian/patches/cargo/c-2002_disable-net-tests.patch new file mode 100644 index 000000000..5ed606980 --- /dev/null +++ b/debian/patches/cargo/c-2002_disable-net-tests.patch @@ -0,0 +1,595 @@ +From: Ximin Luo +Date: Thu, 13 Jun 2024 11:16:38 +0200 +Subject: Disable network tests + +Forwarded: TODO +--- + .../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) { + } + + // Tests that HTTP auth is offered from `credential.helper`. +-#[cargo_test] ++#[allow(dead_code)] + fn http_auth_offered() { + 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! +-#[cargo_test] ++#[allow(dead_code)] + fn https_something_happens() { + let server = TcpListener::bind("127.0.0.1:0").unwrap(); + let addr = server.local_addr().unwrap(); +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; + +-#[cargo_test] ++#[allow(dead_code)] + fn net_retry_loads_from_config() { + let p = project() + .file( +@@ -38,7 +38,7 @@ fn net_retry_loads_from_config() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn net_retry_git_outputs_warning() { + let p = project() + .file( +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() { + ); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn simple() { + let registry = RegistryBuilder::new().http_api().http_index().build(); + +@@ -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. +-#[cargo_test] ++#[allow(dead_code)] + fn simple_publish_with_http() { + let _reg = registry::RegistryBuilder::new() + .http_api() +@@ -170,7 +170,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn simple_publish_with_asymmetric() { + let _reg = registry::RegistryBuilder::new() + .http_api() +@@ -213,7 +213,7 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn old_token_location() { + // `publish` generally requires a remote registry + let registry = registry::RegistryBuilder::new().http_api().build(); +@@ -270,7 +270,7 @@ You may press ctrl-c [..] + // Other tests will verify the endpoint gets the right payload. + } + +-#[cargo_test] ++#[allow(dead_code)] + fn simple_with_index() { + // `publish` generally requires a remote registry + let registry = registry::RegistryBuilder::new().http_api().build(); +@@ -315,7 +315,7 @@ You may press ctrl-c [..] + // Other tests will verify the endpoint gets the right payload. + } + +-#[cargo_test] ++#[allow(dead_code)] + 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 from the dependency declaration. + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + 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 from the dependency declaration. + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn unpublishable_crate() { + // Use local registry for faster test times since no publish will occur + let registry = registry::init(); +@@ -426,7 +426,7 @@ fn unpublishable_crate() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + 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 uncommitted changes, pass the `--allow-d + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + 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; the crate should be available shortly. + // Other tests will verify the endpoint gets the right payload. + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_in_sub_repo() { + // `publish` generally requires a remote registry + let registry = registry::RegistryBuilder::new().http_api().build(); +@@ -565,7 +565,7 @@ You may press ctrl-c [..] + // Other tests will verify the endpoint gets the right payload. + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_when_ignored() { + // `publish` generally requires a remote registry + let registry = registry::RegistryBuilder::new().http_api().build(); +@@ -614,7 +614,7 @@ You may press ctrl-c [..] + // Other tests will verify the endpoint gets the right payload. + } + +-#[cargo_test] ++#[allow(dead_code)] + fn ignore_when_crate_ignored() { + // `publish` generally requires a remote registry + let registry = registry::RegistryBuilder::new().http_api().build(); +@@ -662,7 +662,7 @@ You may press ctrl-c [..] + // Other tests will verify the endpoint gets the right payload. + } + +-#[cargo_test] ++#[allow(dead_code)] + fn new_crate_rejected() { + // Use local registry for faster test times since no publish will occur + let registry = registry::init(); +@@ -695,7 +695,7 @@ fn new_crate_rejected() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn dry_run() { + // Use local registry for faster test times since no publish will occur + let registry = registry::init(); +@@ -738,7 +738,7 @@ See [..] + assert!(!registry::api_path().join("api/v1/crates/new").exists()); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn registry_not_in_publish_list() { + let p = project() + .file( +@@ -771,7 +771,7 @@ The registry `alternative` is not listed in the `package.publish` value in Cargo + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_empty_list() { + let p = project() + .file( +@@ -800,7 +800,7 @@ fn publish_empty_list() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_allowed_registry() { + let _registry = RegistryBuilder::new() + .http_api() +@@ -860,7 +860,7 @@ You may press ctrl-c [..] + ); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_implicitly_to_only_allowed_registry() { + let _registry = RegistryBuilder::new() + .http_api() +@@ -963,7 +963,7 @@ fn publish_failed_with_index_and_only_allowed_registry() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_fail_with_no_registry_specified() { + let p = project().build(); + +@@ -997,7 +997,7 @@ The registry `crates-io` is not listed in the `package.publish` value in Cargo.t + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn block_publish_no_registry() { + let p = project() + .file( +@@ -1027,7 +1027,7 @@ fn block_publish_no_registry() { + } + + // Explicitly setting `crates-io` in the publish list. +-#[cargo_test] ++#[allow(dead_code)] + fn publish_with_crates_io_explicit() { + // `publish` generally requires a remote registry + let registry = registry::RegistryBuilder::new().http_api().build(); +@@ -1080,7 +1080,7 @@ You may press ctrl-c [..] + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_with_select_features() { + // `publish` generally requires a remote registry + let registry = registry::RegistryBuilder::new().http_api().build(); +@@ -1131,7 +1131,7 @@ You may press ctrl-c [..] + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_with_all_features() { + // `publish` generally requires a remote registry + let registry = registry::RegistryBuilder::new().http_api().build(); +@@ -1182,7 +1182,7 @@ You may press ctrl-c [..] + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_with_no_default_features() { + // Use local registry for faster test times since no publish will occur + let registry = registry::init(); +@@ -1218,7 +1218,7 @@ fn publish_with_no_default_features() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_with_patch() { + let registry = RegistryBuilder::new().http_api().http_index().build(); + Package::new("bar", "1.0.0").publish(); +@@ -1324,7 +1324,7 @@ You may press ctrl-c [..] + ); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_checks_for_token_before_verify() { + let registry = registry::RegistryBuilder::new() + .no_configure_token() +@@ -1373,7 +1373,7 @@ fn publish_checks_for_token_before_verify() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_with_bad_source() { + let p = project() + .file( +@@ -1422,7 +1422,7 @@ include `--registry crates-io` to use crates.io + } + + // A dependency with both `git` and `version`. +-#[cargo_test] ++#[allow(dead_code)] + fn publish_git_with_version() { + let registry = RegistryBuilder::new().http_api().http_index().build(); + +@@ -1566,7 +1566,7 @@ You may press ctrl-c [..] + ); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_dev_dep_no_version() { + let registry = RegistryBuilder::new().http_api().http_index().build(); + +@@ -1656,7 +1656,7 @@ repository = "foo" + ); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn credentials_ambiguous_filename() { + // `publish` generally requires a remote registry + let registry = registry::RegistryBuilder::new().http_api().build(); +@@ -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. +-#[cargo_test] ++#[allow(dead_code)] + fn index_requires_token() { + // Use local registry for faster test times since no publish will occur + let registry = registry::init(); +@@ -1747,7 +1747,7 @@ fn index_requires_token() { + } + + // publish with source replacement without --registry +-#[cargo_test] ++#[allow(dead_code)] + fn cratesio_source_replacement() { + registry::init(); + let p = project() +@@ -1776,7 +1776,7 @@ include `--registry dummy-registry` or `--registry crates-io` + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn publish_with_missing_readme() { + // Use local registry for faster test times since no publish will occur + let registry = registry::init(); +@@ -1824,7 +1824,7 @@ Caused by: + } + + // Registry returns an API error. +-#[cargo_test] ++#[allow(dead_code)] + fn api_error_json() { + let _registry = registry::RegistryBuilder::new() + .alternative() +@@ -1872,7 +1872,7 @@ Caused by: + } + + // Registry returns an API error with a 200 status code. +-#[cargo_test] ++#[allow(dead_code)] + fn api_error_200() { + let _registry = registry::RegistryBuilder::new() + .alternative() +@@ -1920,7 +1920,7 @@ Caused by: + } + + // Registry returns an error code without a JSON message. +-#[cargo_test] ++#[allow(dead_code)] + fn api_error_code() { + let _registry = registry::RegistryBuilder::new() + .alternative() +@@ -1975,7 +1975,7 @@ Caused by: + } + + // Registry has a network error. +-#[cargo_test] ++#[allow(dead_code)] + fn api_curl_error() { + let _registry = registry::RegistryBuilder::new() + .alternative() +@@ -2025,7 +2025,7 @@ Caused by: + } + + // Registry returns an invalid response. +-#[cargo_test] ++#[allow(dead_code)] + fn api_other_error() { + let _registry = registry::RegistryBuilder::new() + .alternative() +@@ -2075,7 +2075,7 @@ Caused by: + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn in_package_workspace() { + let registry = RegistryBuilder::new().http_api().http_index().build(); + +@@ -2127,7 +2127,7 @@ You may press ctrl-c [..] + validate_upload_li(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn with_duplicate_spec_in_members() { + // Use local registry for faster test times since no publish will occur + let registry = registry::init(); +@@ -2179,7 +2179,7 @@ fn with_duplicate_spec_in_members() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn in_package_workspace_with_members_with_features_old() { + let registry = RegistryBuilder::new().http_api().http_index().build(); + +@@ -2230,7 +2230,7 @@ You may press ctrl-c [..] + validate_upload_li(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn in_virtual_workspace() { + // Use local registry for faster test times since no publish will occur + let registry = registry::init(); +@@ -2266,7 +2266,7 @@ fn in_virtual_workspace() { + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn in_virtual_workspace_with_p() { + // `publish` generally requires a remote registry + let registry = registry::RegistryBuilder::new().http_api().build(); +@@ -2324,7 +2324,7 @@ You may press ctrl-c [..] + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn in_package_workspace_not_found() { + // Use local registry for faster test times since no publish will occur + let registry = registry::init(); +@@ -2369,7 +2369,7 @@ error: package ID specification `li` did not match any packages + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn in_package_workspace_found_multiple() { + // Use local registry for faster test times since no publish will occur + let registry = registry::init(); +@@ -2426,7 +2426,7 @@ error: the `-p` argument must be specified to select a single package to publish + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + // 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 +@@ -2473,7 +2473,7 @@ error: package ID specification `bar` did not match any packages + .run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn http_api_not_noop() { + let registry = registry::RegistryBuilder::new().http_api().build(); + +@@ -2534,7 +2534,7 @@ You may press ctrl-c [..] + p.cargo("build").run(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn wait_for_first_publish() { + // Counter for number of tries before the package is "published" + let arc: Arc> = Arc::new(Mutex::new(0)); +@@ -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. +-#[cargo_test] ++#[allow(dead_code)] + fn wait_for_first_publish_underscore() { + // Counter for number of tries before the package is "published" + let arc: Arc> = Arc::new(Mutex::new(0)); +@@ -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(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn wait_for_subsequent_publish() { + // Counter for number of tries before the package is "published" + let arc: Arc> = Arc::new(Mutex::new(0)); +@@ -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(); + } + +-#[cargo_test] ++#[allow(dead_code)] + fn skip_wait_for_publish() { + // Intentionally using local registry so the crate never makes it to the index + let registry = registry::init(); diff --git a/debian/patches/cargo/c-2003-workaround-qemu-vfork-command-not-found.patch b/debian/patches/cargo/c-2003-workaround-qemu-vfork-command-not-found.patch new file mode 100644 index 000000000..3daad1651 --- /dev/null +++ b/debian/patches/cargo/c-2003-workaround-qemu-vfork-command-not-found.patch @@ -0,0 +1,28 @@ +From: Debian Rust Maintainers +Date: Thu, 13 Jun 2024 11:16:38 +0200 +Subject: c-2003-workaround-qemu-vfork-command-not-found + +=================================================================== +--- + 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() { ++ // Debian specific patch, upstream wontfix: ++ // qemu has a faulty vfork where it fails to fail if a command is not ++ // found, with a unix_wait_status of 32512, or 0x7f00, 7f meaning ++ // exit code 127. See https://github.com/rust-lang/rust/issues/90825 ++ use std::os::unix::process::ExitStatusExt; ++ if output.status.into_raw() == 0x7f00 { ++ return false; ++ } + panic!( + "expected command `{}` to be runnable, got error {}:\n\ + stderr:{}\n\ 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 +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 +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/cargo/d-0012-cargo-always-return-dev-channel.patch b/debian/patches/cargo/d-0012-cargo-always-return-dev-channel.patch new file mode 100644 index 000000000..7cbe41213 --- /dev/null +++ b/debian/patches/cargo/d-0012-cargo-always-return-dev-channel.patch @@ -0,0 +1,26 @@ +From: Debian Rust Maintainers +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 4f5b069..0a42077 100644 +--- a/src/tools/cargo/src/cargo/core/features.rs ++++ b/src/tools/cargo/src/cargo/core/features.rs +@@ -1205,9 +1205,8 @@ pub fn channel() -> String { + return "dev".to_string(); + } + } +- crate::version() +- .release_channel +- .unwrap_or_else(|| String::from("dev")) ++ // Debian: always return dev channel ++ String::from("dev") + } + + /// Only for testing and developing. See ["Running with gitoxide as default git backend in tests"][1]. diff --git a/debian/patches/d-0000-ignore-removed-submodules.patch b/debian/patches/d-0000-ignore-removed-submodules.patch deleted file mode 100644 index 2ca3804d4..000000000 --- a/debian/patches/d-0000-ignore-removed-submodules.patch +++ /dev/null @@ -1,242 +0,0 @@ -From: Debian Rust Maintainers -Date: Sat, 2 Oct 2021 01:07:59 +0100 -Subject: d-0000-ignore-removed-submodules - ---- - 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 9b11ae8..19a98f9 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -19,22 +19,15 @@ members = [ - "src/tools/tidy", - "src/tools/tier-check", - "src/tools/build-manifest", -- "src/tools/remote-test-client", -- "src/tools/remote-test-server", - "src/tools/rust-installer", - "src/tools/rust-demangler", - "src/tools/rustdoc", -- "src/tools/rls", - "src/tools/rustfmt", -- "src/tools/miri", -- "src/tools/miri/cargo-miri", - "src/tools/rustdoc-themes", - "src/tools/unicode-table-generator", -- "src/tools/expand-yaml-anchors", - "src/tools/jsondocck", - "src/tools/jsondoclint", - "src/tools/html-checker", -- "src/tools/bump-stage0", - "src/tools/replace-version-placeholder", - "src/tools/lld-wrapper", - "src/tools/collect-license-metadata", -diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py -index 5a84e37..9bb09a6 100644 ---- a/src/bootstrap/bootstrap.py -+++ b/src/bootstrap/bootstrap.py -@@ -969,10 +969,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(self.verbose)) -- if self.use_locked_deps: -- args.append("--locked") -- if self.use_vendored_sources: -- args.append("--frozen") - if self.get_toml("metrics", "build"): - args.append("--features") - args.append("build-metrics") -diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs -index d2aa89d..1ea2d93 100644 ---- a/src/bootstrap/src/core/build_steps/test.rs -+++ b/src/bootstrap/src/core/build_steps/test.rs -@@ -2278,17 +2278,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 cd27667..2c870e9 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: OnceCell> = OnceCell::new(); - - let init_submodules_paths = |src: &PathBuf| { -- let file = File::open(src.join(".gitmodules")).unwrap(); -+ //let file = File::open(src.join(".gitmodules")).unwrap(); - - let mut submodules_paths = vec![]; -- for line in BufReader::new(file).lines() { -- if let Ok(line) = line { -- let line = line.trim(); -- -- if line.starts_with("path") { -- let actual_path = -- line.split(' ').last().expect("Couldn't get value of path"); -- submodules_paths.push(actual_path.to_owned()); -- } -- } -- } -+ //for line in BufReader::new(file).lines() { -+ // if let Ok(line) = line { -+ // let line = line.trim(); -+ -+ // if line.starts_with("path") { -+ // let actual_path = -+ // line.split(' ').last().expect("Couldn't get value of path"); -+ // submodules_paths.push(actual_path.to_owned()); -+ // } -+ // } -+ //} - - submodules_paths - }; -@@ -685,25 +685,14 @@ impl<'a> Builder<'a> { - tool::Linkchecker, - tool::CargoTest, - tool::Compiletest, -- tool::RemoteTestServer, -- tool::RemoteTestClient, - tool::RustInstaller, - tool::Cargo, -- tool::Rls, -- tool::RustAnalyzer, - tool::RustAnalyzerProcMacroSrv, - tool::RustDemangler, - tool::Rustdoc, - tool::Clippy, - tool::CargoClippy, -- llvm::Llvm, -- llvm::Sanitizers, - tool::Rustfmt, -- tool::Miri, -- tool::CargoMiri, -- llvm::Lld, -- llvm::CrtBeginEnd, -- tool::RustdocGUITest, - tool::OptimizedDist, - tool::CoverageDump, - ), -@@ -713,12 +702,7 @@ impl<'a> Builder<'a> { - check::Rustdoc, - check::CodegenBackend, - check::Clippy, -- check::Miri, -- check::CargoMiri, -- check::MiroptTestTools, -- check::Rls, - check::Rustfmt, -- check::RustAnalyzer, - check::Bootstrap - ), - Kind::Test => describe!( -@@ -751,7 +735,6 @@ impl<'a> Builder<'a> { - test::TierCheck, - test::Cargotest, - test::Cargo, -- test::RustAnalyzer, - test::ErrorIndex, - test::Distcheck, - test::RunMakeFullDeps, -@@ -767,7 +750,6 @@ impl<'a> Builder<'a> { - test::EmbeddedBook, - test::EditionGuide, - test::Rustfmt, -- test::Miri, - test::Clippy, - test::RustDemangler, - test::CompiletestTest, -@@ -804,7 +786,6 @@ impl<'a> Builder<'a> { - doc::CargoBook, - doc::Clippy, - doc::ClippyBook, -- doc::Miri, - doc::EmbeddedBook, - doc::EditionGuide, - doc::StyleGuide, -@@ -823,12 +804,9 @@ impl<'a> Builder<'a> { - dist::Analysis, - dist::Src, - dist::Cargo, -- dist::Rls, -- dist::RustAnalyzer, - dist::Rustfmt, - dist::RustDemangler, - dist::Clippy, -- dist::Miri, - dist::LlvmTools, - dist::RustDev, - dist::Bootstrap, -@@ -845,11 +823,9 @@ impl<'a> Builder<'a> { - install::Docs, - install::Std, - install::Cargo, -- install::RustAnalyzer, - install::Rustfmt, - install::RustDemangler, - install::Clippy, -- install::Miri, - install::LlvmTools, - install::Src, - install::Rustc -@@ -859,7 +835,6 @@ impl<'a> Builder<'a> { - run::BuildManifest, - run::BumpStage0, - run::ReplaceVersionPlaceholder, -- run::Miri, - run::CollectLicenseMetadata, - run::GenerateCopyright, - run::GenerateWindowsSys, -@@ -2045,10 +2020,7 @@ impl<'a> Builder<'a> { - } - } - -- if self.config.locked_deps { -- cargo.arg("--locked"); -- } -- if self.config.vendor || self.is_sudo { -+ if self.is_sudo { - cargo.arg("--frozen"); - } - -diff --git a/src/tools/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/Cargo.toml -index cab88fc..5bac437 100644 ---- a/src/tools/rust-analyzer/Cargo.toml -+++ b/src/tools/rust-analyzer/Cargo.toml -@@ -1,5 +1,14 @@ - [workspace] --members = ["xtask/", "lib/*", "crates/*"] -+members = [ -+ "xtask/", -+ "lib/*", -+ "crates/proc-macro-srv", -+ "crates/proc-macro-srv-cli", -+ "crates/tt", -+ "crates/mbe", -+ "crates/paths", -+ "crates/proc-macro-api", -+] - exclude = ["crates/proc-macro-test/imp"] - resolver = "2" - diff --git a/debian/patches/d-0001-pkg-config-no-special-snowflake.patch b/debian/patches/d-0001-pkg-config-no-special-snowflake.patch deleted file mode 100644 index bae687742..000000000 --- a/debian/patches/d-0001-pkg-config-no-special-snowflake.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: Debian Rust Maintainers -Date: Sat, 2 Oct 2021 01:08:00 +0100 -Subject: d-0001-pkg-config-no-special-snowflake - ---- - 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 3653032..553ac75 100644 ---- a/vendor/pkg-config/src/lib.rs -+++ b/vendor/pkg-config/src/lib.rs -@@ -117,11 +117,8 @@ pub enum Error { - /// Contains the name of the responsible environment variable. - EnvNoPkgConfig(String), - -- /// Detected cross compilation without a custom sysroot. -- /// -- /// Ignore the error with `PKG_CONFIG_ALLOW_CROSS=1`, -- /// which may let `pkg-config` select libraries -- /// for the host's architecture instead of the target's. -+ /// Cross compilation detected. Kept for compatibility; -+ /// the Debian package never emits this. - CrossCompilation, - - /// Failed to run `pkg-config`. -@@ -161,14 +158,6 @@ impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - match *self { - Error::EnvNoPkgConfig(ref name) => write!(f, "Aborted because {} is set", name), -- Error::CrossCompilation => f.write_str( -- "pkg-config has not been configured to support cross-compilation.\n\ -- \n\ -- Install a sysroot for the target platform and configure it via\n\ -- PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a\n\ -- cross-compiling wrapper for pkg-config and set it via\n\ -- PKG_CONFIG environment variable.", -- ), - Error::Command { - ref command, - ref cause, -@@ -226,7 +215,7 @@ impl fmt::Display for Error { - )?; - format_output(output, f) - } -- Error::__Nonexhaustive => panic!(), -+ Error::CrossCompilation | Error::__Nonexhaustive => panic!(), - } - } - } -@@ -420,6 +409,8 @@ impl Config { - if host == target { - return true; - } -+ // always enable PKG_CONFIG_ALLOW_CROSS override in Debian -+ return true; - - // 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 run(&self, name: &str, args: &[&str]) -> Result, 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("-pkgconf")); t }) -+ }); - 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 0f37c72..f70e8b7 100644 ---- a/vendor/pkg-config/tests/test.rs -+++ b/vendor/pkg-config/tests/test.rs -@@ -31,7 +31,6 @@ fn find(name: &str) -> Result { - pkg_config::probe_library(name) - } - --#[test] - fn cross_disabled() { - let _g = LOCK.lock(); - reset(); -@@ -43,7 +42,6 @@ fn cross_disabled() { - } - } - --#[test] - fn cross_enabled() { - let _g = LOCK.lock(); - reset(); diff --git a/debian/patches/d-0002-mdbook-strip-embedded-libs.patch b/debian/patches/d-0002-mdbook-strip-embedded-libs.patch deleted file mode 100644 index 6e7914c45..000000000 --- a/debian/patches/d-0002-mdbook-strip-embedded-libs.patch +++ /dev/null @@ -1,467 +0,0 @@ -From: Debian Rust Maintainers -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 ---- - src/tools/linkchecker/main.rs | 28 +++++- - vendor/mdbook/src/book/init.rs | 19 ---- - .../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/searcher/mod.rs | 2 - - 7 files changed, 47 insertions(+), 234 deletions(-) - -diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs -index 7f73cac..e4805cc 100644 ---- a/src/tools/linkchecker/main.rs -+++ b/src/tools/linkchecker/main.rs -@@ -159,7 +159,17 @@ impl Checker { - for entry in t!(dir.read_dir()).map(|e| t!(e)) { - let path = entry.path(); - // Goes through symlinks -- let metadata = t!(fs::metadata(&path)); -+ let metadata = fs::metadata(&path); -+ if let Err(err) = metadata { -+ if let Ok(target) = fs::read_link(&path) { -+ if target.starts_with("/usr/share") { -+ // broken symlink to /usr/share, ok for our Debian build -+ return; -+ } -+ } -+ panic!("error at file {:?} while walking - {:?}", path, err) -+ } -+ let metadata = t!(metadata); - if metadata.is_dir() { - self.walk(&path, report); - } else { -@@ -172,7 +182,15 @@ impl Checker { - fn check(&mut self, file: &Path, report: &mut Report) { - let (pretty_path, entry) = self.load_file(file, report); - let source = match entry { -- FileEntry::Missing => panic!("missing file {:?} while walking", file), -+ FileEntry::Missing => { -+ if let Ok(target) = fs::read_link(&file) { -+ if target.starts_with("/usr/share") { -+ // broken symlink to /usr/share, ok for our Debian build -+ return; -+ } -+ } -+ panic!("missing file {:?} while walking", file) -+ } - FileEntry::Dir => unreachable!("never with `check` path"), - FileEntry::OtherFile => return, - FileEntry::Redirect { .. } => return, -@@ -238,6 +256,12 @@ impl Checker { - let (target_pretty_path, target_entry) = self.load_file(&path, report); - let (target_source, target_ids) = match target_entry { - FileEntry::Missing => { -+ if let Ok(target) = fs::read_link(&path) { -+ if target.starts_with("/usr/share") { -+ // broken symlink to /usr/share, ok for our Debian build -+ return; -+ } -+ } - if is_exception(file, &target_pretty_path) { - report.links_ignored_exception += 1; - } else { -diff --git a/vendor/mdbook/src/book/init.rs b/vendor/mdbook/src/book/init.rs -index faca1d0..c1a82a3 100644 ---- a/vendor/mdbook/src/book/init.rs -+++ b/vendor/mdbook/src/book/init.rs -@@ -153,25 +153,6 @@ impl BookBuilder { - let mut js = File::create(themedir.join("book.js"))?; - js.write_all(theme::JS)?; - -- let mut highlight_css = File::create(themedir.join("highlight.css"))?; -- highlight_css.write_all(theme::HIGHLIGHT_CSS)?; -- -- let mut highlight_js = File::create(themedir.join("highlight.js"))?; -- highlight_js.write_all(theme::HIGHLIGHT_JS)?; -- -- write_file(&themedir.join("fonts"), "fonts.css", theme::fonts::CSS)?; -- for (file_name, contents) in theme::fonts::LICENSES { -- write_file(&themedir, file_name, contents)?; -- } -- for (file_name, contents) in theme::fonts::OPEN_SANS.iter() { -- write_file(&themedir, file_name, contents)?; -- } -- write_file( -- &themedir, -- theme::fonts::SOURCE_CODE_PRO.0, -- theme::fonts::SOURCE_CODE_PRO.1, -- )?; -- - Ok(()) - } - -diff --git a/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs b/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs -index 709aa06..17ff63c 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, Code, Config, HtmlConfig, Playground, RustEditio - use crate::errors::*; - use crate::renderer::html_handlebars::helpers; - use crate::renderer::{RenderContext, Renderer}; --use crate::theme::{self, playground_editor, Theme}; -+use crate::theme::{self, Theme}; - use crate::utils; - - use std::borrow::Cow; - use std::collections::BTreeMap; - use std::collections::HashMap; - use std::fs::{self, File}; -+use std::os::unix::fs::symlink; - use std::path::{Path, PathBuf}; - - use crate::utils::fs::get_404_output_file; -@@ -250,99 +251,28 @@ impl HtmlHandlebars { - if let Some(contents) = &theme.favicon_svg { - write_file(destination, "favicon.svg", contents)?; - } -- write_file(destination, "highlight.css", &theme.highlight_css)?; - write_file(destination, "tomorrow-night.css", &theme.tomorrow_night_css)?; - write_file(destination, "ayu-highlight.css", &theme.ayu_highlight_css)?; -- write_file(destination, "highlight.js", &theme.highlight_js)?; -- write_file(destination, "clipboard.min.js", &theme.clipboard_js)?; -- write_file( -- destination, -- "FontAwesome/css/font-awesome.css", -- theme::FONT_AWESOME, -- )?; -- write_file( -- destination, -- "FontAwesome/fonts/fontawesome-webfont.eot", -- theme::FONT_AWESOME_EOT, -- )?; -- write_file( -- destination, -- "FontAwesome/fonts/fontawesome-webfont.svg", -- theme::FONT_AWESOME_SVG, -+ symlink( -+ "/usr/share/fonts-font-awesome/css/font-awesome.min.css", -+ destination.join("css/font-awesome.min.css"), - )?; -- write_file( -- destination, -- "FontAwesome/fonts/fontawesome-webfont.ttf", -- theme::FONT_AWESOME_TTF, -+ symlink( -+ "/usr/share/fonts-font-awesome/fonts", -+ destination.join("fonts"), - )?; -- write_file( -- destination, -- "FontAwesome/fonts/fontawesome-webfont.woff", -- theme::FONT_AWESOME_WOFF, -+ symlink( -+ "/usr/share/javascript/highlight.js/styles/atelier-dune-light.css", -+ destination.join("highlight.css"), - )?; -- write_file( -- destination, -- "FontAwesome/fonts/fontawesome-webfont.woff2", -- theme::FONT_AWESOME_WOFF2, -+ symlink( -+ "/usr/share/javascript/highlight.js/highlight.js", -+ destination.join("highlight.js"), - )?; -- write_file( -- destination, -- "FontAwesome/fonts/FontAwesome.ttf", -- theme::FONT_AWESOME_TTF, -+ symlink( -+ "/usr/share/javascript/mathjax/MathJax.js", -+ destination.join("MathJax.js"), - )?; -- // 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)?; -- } -- for (file_name, contents) in theme::fonts::OPEN_SANS.iter() { -- write_file(destination, file_name, contents)?; -- } -- write_file( -- destination, -- theme::fonts::SOURCE_CODE_PRO.0, -- theme::fonts::SOURCE_CODE_PRO.1, -- )?; -- } -- if let Some(fonts_css) = &theme.fonts_css { -- if !fonts_css.is_empty() { -- 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 in book.toml without a fonts.css file.\n\ -- Add an empty `theme/fonts/fonts.css` file to squelch this warning." -- ); -- } -- for font_file in &theme.font_files { -- let contents = fs::read(font_file)?; -- let filename = font_file.file_name().unwrap(); -- let filename = Path::new("fonts").join(filename); -- write_file(destination, filename, &contents)?; -- } -- -- let playground_config = &html_config.playground; -- -- // Ace is a very large dependency, so only load it when requested -- if playground_config.editable && playground_config.copy_js { -- // Load the editor -- write_file(destination, "editor.js", playground_editor::JS)?; -- write_file(destination, "ace.js", playground_editor::ACE_JS)?; -- write_file(destination, "mode-rust.js", playground_editor::MODE_RUST_JS)?; -- write_file( -- destination, -- "theme-dawn.js", -- playground_editor::THEME_DAWN_JS, -- )?; -- write_file( -- destination, -- "theme-tomorrow_night.js", -- playground_editor::THEME_TOMORROW_NIGHT_JS, -- )?; -- } - - Ok(()) - } -diff --git a/vendor/mdbook/src/renderer/html_handlebars/search.rs b/vendor/mdbook/src/renderer/html_handlebars/search.rs -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) -> - format!("Object.assign(window.search, {});", index).as_bytes(), - )?; - utils::fs::write_file(destination, "searcher.js", searcher::JS)?; -- utils::fs::write_file(destination, "mark.min.js", searcher::MARK_JS)?; -- utils::fs::write_file(destination, "elasticlunr.min.js", searcher::ELASTICLUNR_JS)?; - debug!("Copying search files ✓"); - } - -diff --git a/vendor/mdbook/src/theme/index.hbs b/vendor/mdbook/src/theme/index.hbs -index 80315c4..48413b0 100644 ---- a/vendor/mdbook/src/theme/index.hbs -+++ b/vendor/mdbook/src/theme/index.hbs -@@ -33,10 +33,7 @@ - {{/if}} - - -- -- {{#if copy_fonts}} -- -- {{/if}} -+ - - - -@@ -50,7 +47,7 @@ - - {{#if mathjax_support}} - -- -+ - {{/if}} - - -@@ -61,48 +58,6 @@ - var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}"; - - -- -- -- -- -- -- -- -- -- -