Package: rustc / 1.85.0+dfsg3-1

Metadata

Package Version Patches format
rustc 1.85.0+dfsg3-1 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
cargo/c 2002_disable net tests.patch | (download)

src/tools/cargo/tests/testsuite/credential_process.rs | 14 7 + 7 - 0 !
src/tools/cargo/tests/testsuite/git_auth.rs | 4 2 + 2 - 0 !
src/tools/cargo/tests/testsuite/net_config.rs | 4 2 + 2 - 0 !
src/tools/cargo/tests/testsuite/publish.rs | 113 57 + 56 - 0 !
4 files changed, 68 insertions(+), 67 deletions(-)

 disable network tests

cargo/c 2003 workaround qemu vfork command not found.patch | (download)

src/tools/cargo/crates/cargo-test-macro/src/lib.rs | 8 8 + 0 - 0 !
1 file changed, 8 insertions(+)

 c-2003-workaround-qemu-vfork-command-not-found

===================================================================

cargo/c 2200 workaround x32 test.patch | (download)

src/tools/cargo/tests/testsuite/cfg.rs | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 c-2200-workaround-x32-test

Bug: https://github.com/rust-lang/cargo/issues/10005

cargo/c disable fs specific test.patch | (download)

src/tools/cargo/tests/testsuite/metadata.rs | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 c-disable-fs-specific-test

===================================================================

cargo/c 0003 tests add missing cross disabled checks.patch | (download)

src/tools/cargo/tests/testsuite/build_script.rs | 6 6 + 0 - 0 !
1 file changed, 6 insertions(+)

 [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 Grnbichler <debian@fabian.gruenbichler.email>

cargo/d 0012 cargo always return dev channel.patch | (download)

src/tools/cargo/src/cargo/core/features.rs | 5 2 + 3 - 0 !
1 file changed, 2 insertions(+), 3 deletions(-)

 d-0012-cargo-always-return-dev-channel

upstream/u ignore ppc hangs.patch | (download)

library/alloc/tests/arc.rs | 1 1 + 0 - 0 !
library/alloc/tests/rc.rs | 1 1 + 0 - 0 !
2 files changed, 2 insertions(+)

 u-ignore-ppc-hangs

Bug: https://github.com/rust-lang/rust/issues/89607

upstream/u rustc llvm cross flags.patch | (download)

compiler/rustc_llvm/build.rs | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 u-rustc-llvm-cross-flags

===================================================================

upstream/u hurd tests.patch | (download)

src/tools/compiletest/src/directive-list.rs | 1 1 + 0 - 0 !
src/tools/compiletest/src/header/tests.rs | 1 1 + 0 - 0 !
tests/crashes/115994.rs | 1 1 + 0 - 0 !
tests/run-make/long-linker-command-lines/foo.rs | 7 7 + 0 - 0 !
tests/ui/associated-consts/issue-93775.rs | 1 1 + 0 - 0 !
tests/ui/issues/issue-74564-if-expr-stack-overflow.rs | 1 1 + 0 - 0 !
tests/ui/threads-sendsync/mpsc_stress.rs | 1 1 + 0 - 0 !
7 files changed, 13 insertions(+)

 compiletest: add ignore-hurd support and annotate some tests
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

These tests hang or make the box OOM

upstream/d ignore test_arc_condvar_poison ppc.patch | (download)

library/std/src/sync/poison/mutex/tests.rs | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 d-ignore-test_arc_condvar_poison-ppc

upstream/d disable download tests.patch | (download)

src/bootstrap/src/core/config/tests.rs | 3 3 + 0 - 0 !
1 file changed, 3 insertions(+)

 d-disable-download-tests

prune/d 0000 ignore removed submodules.patch | (download)

Cargo.toml | 6 0 + 6 - 0 !
src/bootstrap/bootstrap.py | 4 0 + 4 - 0 !
src/bootstrap/src/core/builder/cargo.rs | 5 1 + 4 - 0 !
src/bootstrap/src/core/builder/mod.rs | 23 0 + 23 - 0 !
src/build_helper/src/util.rs | 21 1 + 20 - 0 !
5 files changed, 2 insertions(+), 57 deletions(-)

 remove upstream parts that are not needed for the debian build, in
order to both reduce the orig tarball and the vendored crates within.

prune/d 0001 pkg config no special snowflake.patch | (download)

vendor/pkg-config-0.3.31/src/lib.rs | 26 11 + 15 - 0 !
vendor/pkg-config-0.3.31/tests/test.rs | 2 0 + 2 - 0 !
2 files changed, 11 insertions(+), 17 deletions(-)

 always enable cross compilation via pkgconf, and set the right binary name.

prune/d 0002 mdbook strip embedded libs.patch | (download)

src/doc/rust-by-example/theme/index.hbs | 83 4 + 79 - 0 !
src/tools/linkchecker/main.rs | 28 26 + 2 - 0 !
vendor/mdbook-0.4.43/src/book/init.rs | 19 0 + 19 - 0 !
vendor/mdbook-0.4.43/src/renderer/html_handlebars/hbs_renderer.rs | 104 17 + 87 - 0 !
vendor/mdbook-0.4.43/src/renderer/html_handlebars/search.rs | 2 0 + 2 - 0 !
vendor/mdbook-0.4.43/src/theme/index.hbs | 57 4 + 53 - 0 !
vendor/mdbook-0.4.43/src/theme/mod.rs | 27 0 + 27 - 0 !
vendor/mdbook-0.4.43/src/theme/searcher/mod.rs | 2 0 + 2 - 0 !
vendor/mdbook-0.4.43/src/theme/toc.html.hbs | 3 1 + 2 - 0 !
9 files changed, 52 insertions(+), 273 deletions(-)

 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

prune/d 0005 no jemalloc.patch | (download)

compiler/rustc/Cargo.toml | 6 0 + 6 - 0 !
src/tools/rust-analyzer/crates/profile/Cargo.toml | 2 0 + 2 - 0 !
src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml | 4 0 + 4 - 0 !
3 files changed, 12 deletions(-)

 remove jemalloc-sys

prune/d 0006 no mimalloc.patch | (download)

src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml | 1 0 + 1 - 0 !
1 file changed, 1 deletion(-)

 remove mimalloc(-sys)

prune/d 0007 no tzdb.patch | (download)

vendor/jiff-0.1.13/Cargo.toml | 1 0 + 1 - 0 !
1 file changed, 1 deletion(-)

 remove jiff-tzdb(-platform)

on Debian, we can just use the tzdata information..

prune/d 0010 cargo remove vendored c crates.patch | (download)

src/tools/cargo/Cargo.toml | 6 2 + 4 - 0 !
1 file changed, 2 insertions(+), 4 deletions(-)

 remove all vendoring features of crates normally shipping bundled
C libs. that C code is stripped when repacking, so the features can't work
anyway.

prune/d 0011 cargo remove nghttp2.patch | (download)

vendor/curl-sys-0.4.78+curl-8.11.0/Cargo.toml | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 remove dependency on libnghttp2-sys so it can be pruned.

prune/d 0020 remove windows dependencies.patch | (download)

compiler/rustc_codegen_ssa/Cargo.toml | 4 0 + 4 - 0 !
compiler/rustc_data_structures/Cargo.toml | 10 0 + 10 - 0 !
compiler/rustc_driver_impl/Cargo.toml | 6 0 + 6 - 0 !
compiler/rustc_errors/Cargo.toml | 8 0 + 8 - 0 !
compiler/rustc_session/Cargo.toml | 7 0 + 7 - 0 !
library/backtrace/Cargo.toml | 3 0 + 3 - 0 !
library/backtrace/crates/as-if-std/Cargo.toml | 3 0 + 3 - 0 !
src/bootstrap/Cargo.toml | 15 0 + 15 - 0 !
src/tools/cargo/Cargo.toml | 26 4 + 22 - 0 !
src/tools/cargo/crates/cargo-test-support/Cargo.toml | 3 0 + 3 - 0 !
src/tools/cargo/crates/cargo-util/Cargo.toml | 7 0 + 7 - 0 !
src/tools/cargo/crates/home/Cargo.toml | 3 0 + 3 - 0 !
src/tools/cargo/credential/cargo-credential/Cargo.toml | 3 0 + 3 - 0 !
src/tools/cargo/src/cargo/util/auth/mod.rs | 5 0 + 5 - 0 !
src/tools/compiletest/Cargo.toml | 10 0 + 10 - 0 !
src/tools/rust-analyzer/crates/profile/Cargo.toml | 3 0 + 3 - 0 !
src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml | 3 0 + 3 - 0 !
src/tools/rust-analyzer/crates/stdx/Cargo.toml | 4 0 + 4 - 0 !
src/tools/rustc-perf/collector/Cargo.toml | 4 0 + 4 - 0 !
src/tools/rustc-perf/collector/compile-benchmarks/cargo-0.60.0/Cargo.toml | 24 0 + 24 - 0 !
src/tools/rustc-perf/collector/compile-benchmarks/style-servo/components/gfx/Cargo.toml | 4 0 + 4 - 0 !
src/tools/rustc-perf/collector/compile-benchmarks/style-servo/components/style/Cargo.toml | 3 0 + 3 - 0 !
src/tools/rustc-perf/collector/compile-benchmarks/tokio-webpush-simple/native-tls-0.1.5/Cargo.toml | 4 1 + 3 - 0 !
src/tools/rustc-perf/collector/compile-benchmarks/webrender-2022/example-compositor/compositor/Cargo.toml | 3 0 + 3 - 0 !
src/tools/rustc-perf/collector/compile-benchmarks/webrender-2022/webrender/Cargo.toml | 3 0 + 3 - 0 !
src/tools/rustc-perf/collector/compile-benchmarks/webrender-2022/wrench/Cargo.toml | 4 0 + 4 - 0 !
26 files changed, 5 insertions(+), 167 deletions(-)

 d-0020-remove-windows-dependencies

use something like

 find src compiler library -iname Cargo.toml -exec grep -H -n -e 'windows-sys' -e 'winapi' -e 'ntapi' -e 'wincon' -e 'winreg' -e 'windows' {} \;

to find and eliminate dependencies on windows-only crates when rebasing.

windows-bindgen and windows-metadata should not be removed, they are needed for
the build and don't pull in windows-sys and friends.

prune/d 0021 vendor remove windows dependencies.patch | (download)

vendor/android-tzdata-0.1.1/Cargo.toml | 1 1 + 0 - 0 !
vendor/anstream-0.6.18/Cargo.toml | 6 0 + 6 - 0 !
vendor/anstyle-query-1.1.2/Cargo.toml | 7 0 + 7 - 0 !
vendor/backtrace-0.3.71/Cargo.toml | 14 0 + 14 - 0 !
vendor/backtrace-0.3.73/Cargo.toml | 16 0 + 16 - 0 !
vendor/chrono-0.4.39/Cargo.toml | 9 0 + 9 - 0 !
vendor/colored-2.2.0/Cargo.toml | 7 0 + 7 - 0 !
vendor/console-0.15.10/Cargo.toml | 12 0 + 12 - 0 !
vendor/ctrlc-3.4.5/Cargo.toml | 18 0 + 18 - 0 !
vendor/curl-0.4.47/Cargo.toml | 11 0 + 11 - 0 !
vendor/curl-sys-0.4.78+curl-8.11.0/Cargo.toml | 4 0 + 4 - 0 !
vendor/dbus-0.9.7/Cargo.toml | 4 0 + 4 - 0 !
vendor/dirs-sys-0.4.1/Cargo.toml | 9 0 + 9 - 0 !
vendor/dirs-sys-next-0.1.2/Cargo.toml | 3 0 + 3 - 0 !
vendor/dlmalloc-0.2.7/Cargo.toml | 9 0 + 9 - 0 !
vendor/env_logger-0.11.6/Cargo.toml | 2 1 + 1 - 0 !
vendor/errno-0.3.10/Cargo.toml | 7 0 + 7 - 0 !
vendor/fd-lock-4.0.2/Cargo.toml | 8 0 + 8 - 0 !
vendor/filetime-0.2.25/Cargo.toml | 7 0 + 7 - 0 !
vendor/gix-discover-0.37.0/Cargo.toml | 6 0 + 6 - 0 !
vendor/gix-path-0.10.13/Cargo.toml | 10 0 + 10 - 0 !
vendor/gix-sec-0.10.10/Cargo.toml | 10 0 + 10 - 0 !
vendor/home-0.5.11/Cargo.toml | 8 0 + 8 - 0 !
vendor/iana-time-zone-0.1.61/Cargo.toml | 3 0 + 3 - 0 !
vendor/ignore-0.4.23/Cargo.toml | 3 0 + 3 - 0 !
vendor/is-terminal-0.4.12/Cargo.toml | 11 0 + 11 - 0 !
vendor/is_executable-1.0.3/Cargo.toml | 4 0 + 4 - 0 !
vendor/jiff-0.1.13/Cargo.toml | 10 0 + 10 - 0 !
vendor/libloading-0.8.6/Cargo.toml | 7 0 + 7 - 0 !
vendor/libssh2-sys-0.3.0/Cargo.toml | 8 0 + 8 - 0 !
vendor/mio-0.8.11/Cargo.toml | 12 0 + 12 - 0 !
vendor/notify-6.1.1/Cargo.toml | 11 0 + 11 - 0 !
vendor/nu-ansi-term-0.46.0/Cargo.toml | 10 0 + 10 - 0 !
vendor/nu-ansi-term-0.50.1/Cargo.toml | 10 0 + 10 - 0 !
vendor/onig-6.4.0/Cargo.toml | 3 0 + 3 - 0 !
vendor/opener-0.5.2/Cargo.toml | 4 0 + 4 - 0 !
vendor/opener-0.7.2/Cargo.toml | 12 0 + 12 - 0 !
vendor/os_info-3.8.2/Cargo.toml | 12 0 + 12 - 0 !
vendor/parking_lot_core-0.9.10/Cargo.toml | 3 0 + 3 - 0 !
vendor/portable-atomic-1.10.0/Cargo.toml | 7 0 + 7 - 0 !
vendor/process-wrap-8.0.2/Cargo.toml | 11 0 + 11 - 0 !
vendor/rustix-0.38.42/Cargo.toml | 9 0 + 9 - 0 !
vendor/same-file-1.0.6/Cargo.toml | 2 0 + 2 - 0 !
vendor/snapbox-0.6.20/Cargo.toml | 6 0 + 6 - 0 !
vendor/socket2-0.5.8/Cargo.toml | 10 0 + 10 - 0 !
vendor/stacker-0.1.17/Cargo.toml | 8 0 + 8 - 0 !
vendor/sysinfo-0.31.4/Cargo.toml | 47 0 + 47 - 0 !
vendor/sysinfo-0.33.0/Cargo.toml | 48 0 + 48 - 0 !
vendor/tempfile-3.14.0/Cargo.toml | 7 0 + 7 - 0 !
vendor/term-0.7.0/Cargo.toml | 6 0 + 6 - 0 !
vendor/termcolor-1.4.1/Cargo.toml | 3 0 + 3 - 0 !
vendor/terminal_size-0.4.1/Cargo.toml | 6 0 + 6 - 0 !
vendor/termize-0.1.1/Cargo.toml | 3 0 + 3 - 0 !
vendor/tokio-1.42.0/Cargo.toml | 21 0 + 21 - 0 !
vendor/uuid-1.11.0/Cargo.toml | 1 0 + 1 - 0 !
vendor/walkdir-2.5.0/Cargo.toml | 3 0 + 3 - 0 !
vendor/wasm-component-ld-0.5.11/Cargo.toml | 7 0 + 7 - 0 !
vendor/yansi-term-0.1.2/Cargo.toml | 3 0 + 3 - 0 !
58 files changed, 2 insertions(+), 517 deletions(-)

 d-0021-vendor-remove-windows-dependencies
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

use something like

 find vendor -iname Cargo.toml -exec grep -H -n -e 'schannel' -e 'windows-sys' -e 'winapi' -e 'ntapi' -e 'wincon' -e 'winreg' -e 'windows' -e 'winsplit' {} \;

to find dependencies on windows targets in vendored crates. you will likely
need to remove some hunks from this patch after pruning dependencies, since
hopefully a few of the crates patched during early rebasing are eliminated.

windows-bindgen and windows-metadata should not be removed, they are needed for
the build and don't pull in windows-sys and friends.

vendor/d 0003 cc psm rebuild wasm32.patch | (download)

vendor/cc-1.2.0/src/lib.rs | 2 1 + 1 - 0 !
vendor/psm-0.1.24/build.rs | 7 2 + 5 - 0 !
2 files changed, 3 insertions(+), 6 deletions(-)

 d-0003-cc-psm-rebuild-wasm32

build/d bootstrap rustflags.patch | (download)

src/bootstrap/src/core/builder/cargo.rs | 12 12 + 0 - 0 !
1 file changed, 12 insertions(+)

 d-bootstrap-rustflags

build/d bootstrap install symlinks.patch | (download)

src/tools/rust-installer/install-template.sh | 7 5 + 2 - 0 !
1 file changed, 5 insertions(+), 2 deletions(-)

 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.

build/d bootstrap disable git.patch | (download)

src/bootstrap/src/utils/channel.rs | 5 3 + 2 - 0 !
1 file changed, 3 insertions(+), 2 deletions(-)

 bootstrap: always use commit info file instead of checking .git

build/d bootstrap no assume tools.patch | (download)

src/bootstrap/src/core/builder/tests.rs | 4 4 + 0 - 0 !
1 file changed, 4 insertions(+)

 set tools to those built in debian

build/d bootstrap cargo doc paths.patch | (download)

compiler/rustc_error_codes/src/error_codes/E0460.md | 2 1 + 1 - 0 !
compiler/rustc_error_codes/src/error_codes/E0461.md | 2 1 + 1 - 0 !
compiler/rustc_error_codes/src/error_codes/E0462.md | 2 1 + 1 - 0 !
compiler/rustc_error_codes/src/error_codes/E0514.md | 2 1 + 1 - 0 !
compiler/rustc_error_codes/src/error_codes/E0519.md | 2 1 + 1 - 0 !
src/doc/edition-guide/book.toml | 18 9 + 9 - 0 !
src/doc/edition-guide/src/editions/advanced-migrations.md | 14 7 + 7 - 0 !
src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md | 4 2 + 2 - 0 !
src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md | 10 5 + 5 - 0 !
src/doc/index.md | 2 1 + 1 - 0 !
src/doc/reference/src/conditional-compilation.md | 2 1 + 1 - 0 !
src/doc/reference/src/introduction.md | 4 2 + 2 - 0 !
src/doc/reference/src/linkage.md | 2 1 + 1 - 0 !
src/doc/reference/src/procedural-macros.md | 2 1 + 1 - 0 !
src/doc/rustc/src/linker-plugin-lto.md | 2 1 + 1 - 0 !
src/doc/rustc/src/platform-support/fuchsia.md | 2 1 + 1 - 0 !
src/doc/rustc/src/targets/custom.md | 2 1 + 1 - 0 !
src/doc/rustc/src/tests/index.md | 4 2 + 2 - 0 !
src/doc/rustc/src/what-is-rustc.md | 2 1 + 1 - 0 !
src/doc/unstable-book/src/compiler-flags/branch-protection.md | 2 1 + 1 - 0 !
src/doc/unstable-book/src/compiler-flags/control-flow-guard.md | 2 1 + 1 - 0 !
src/doc/unstable-book/src/compiler-flags/sanitizer.md | 2 1 + 1 - 0 !
src/tools/linkchecker/main.rs | 4 4 + 0 - 0 !
23 files changed, 47 insertions(+), 43 deletions(-)

 fix links to cargo-doc

build/d bootstrap use local css.patch | (download)

src/bootstrap/src/core/build_steps/doc.rs | 27 21 + 6 - 0 !
1 file changed, 21 insertions(+), 6 deletions(-)

 d-bootstrap-use-local-css

build/d bootstrap custom debuginfo path.patch | (download)

src/bootstrap/src/lib.rs | 5 2 + 3 - 0 !
tests/codegen/remap_path_prefix/issue-73167-remap-std.rs | 2 1 + 1 - 0 !
2 files changed, 3 insertions(+), 4 deletions(-)

 d-bootstrap-custom-debuginfo-path

build/d bootstrap permit symlink in docs.patch | (download)

src/bootstrap/src/core/build_steps/dist.rs | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 partial revert of b9eedea4b0368fd1f00f204db75109ff444fab5b upstream

build/d test ignore avx 44056.patch | (download)

tests/ui/issues/issue-44056.rs | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 d-test-ignore-avx-44056

Bug: https://github.com/rust-lang/rust/pull/55667
behaviour/d rust gdb paths.patch | (download)

src/etc/rust-gdbgui | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 hardcode gdb python module directory

Debian package installs python modules into a fixed directory, so
just hardcode path in wrapper script.

behaviour/d rust lldb paths.patch | (download)

src/etc/rust-lldb | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 hardcode lldb python module directory

Debian package installs python modules into a fixed directory, so
just hardcode path in wrapper script.

behaviour/d rustc add soname.patch | (download)

compiler/rustc_codegen_ssa/src/back/link.rs | 7 7 + 0 - 0 !
tests/run-make/dylib-soname/rmake.rs | 4 3 + 1 - 0 !
2 files changed, 10 insertions(+), 1 deletion(-)

 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).

behaviour/d rustc windows ssp.patch | (download)

compiler/rustc_target/src/spec/base/windows_gnu.rs | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 d-rustc-windows-ssp

Bug: https://github.com/rust-lang/rust/issues/68973

behaviour/d rustdoc disable embedded fonts.patch | (download)

src/librustdoc/html/static/css/rustdoc.css | 8 0 + 8 - 0 !
src/librustdoc/html/static_files.rs | 2 0 + 2 - 0 !
2 files changed, 10 deletions(-)

 removed some embedded fonts

ubuntu/ubuntu disable ppc64el asm tests.patch | (download)

compiler/rustc_lint/src/builtin.rs | 5 4 + 1 - 0 !
compiler/rustc_lint_defs/src/builtin.rs | 2 2 + 0 - 0 !
2 files changed, 6 insertions(+), 1 deletion(-)

 ubuntu-disable-ppc64el-asm-tests

ubuntu/ubuntu ignore arm doctest.patch | (download)

compiler/rustc_error_codes/src/error_codes/E0778.md | 4 2 + 2 - 0 !
compiler/rustc_error_codes/src/error_codes/E0779.md | 2 1 + 1 - 0 !
2 files changed, 3 insertions(+), 3 deletions(-)

 disable the doctests for the instruction_set errors

Bug: https://github.com/rust-lang/rust/issues/83453
vendor/onig_sys use system lib.patch | (download)

vendor/onig_sys-69.8.1/build.rs | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 onig_sys: use system lib
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Fabian Grnbichler <f.gruenbichler@proxmox.com>

vendor/libz sys allow cross building.patch | (download)

vendor/libz-sys-1.1.20/build.rs | 8 3 + 5 - 0 !
1 file changed, 3 insertions(+), 5 deletions(-)

 libz-sys: allow cross-building
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Fabian Grnbichler <debian@fabian.gruenbichler.email>

build/bootstrap tests disable compiler rt optimizing.patch | (download)

src/bootstrap/src/core/config/config.rs | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 bootstrap tests: disable compiler-rt optimizing
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

it cannot work since there are no bundled LLVM (and thus no bundled
compiler-rt) sources available. during the regular build this is handled by our
config, but bootstrap tests don't use that..


Signed-off-by: Fabian Grnbichler <f.gruenbichler@proxmox.com>

build/ignore broken debuginfo tests.patch | (download)

tests/debuginfo/by-value-non-immediate-argument.rs | 2 2 + 0 - 0 !
tests/debuginfo/macro-stepping.rs | 3 2 + 1 - 0 !
tests/debuginfo/method-on-enum.rs | 2 2 + 0 - 0 !
3 files changed, 6 insertions(+), 1 deletion(-)

 ignore broken debuginfo tests
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

vendor/blake3 skip embedded C code use pure implementation.patch | (download)

vendor/blake3-1.5.5/Cargo.toml | 2 1 + 1 - 0 !
vendor/blake3-1.5.5/build.rs | 18 12 + 6 - 0 !
2 files changed, 13 insertions(+), 7 deletions(-)

 blake3: skip embedded c code, use pure implementation
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

build/ci_rustc disable test that requires upstream git repo.patch | (download)

src/bootstrap/src/core/builder/tests.rs | 3 2 + 1 - 0 !
1 file changed, 2 insertions(+), 1 deletion(-)

 ci_rustc: disable test that requires upstream git repo
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

build/bootstrap don t attempt to download rustc in tests.patch | (download)

src/bootstrap/src/core/config/config.rs | 4 4 + 0 - 0 !
1 file changed, 4 insertions(+)

 bootstrap: don't attempt to download rustc in tests
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

the tests use a default config, so we need to manually override this
option..

Signed-off-by: Fabian Grnbichler <debian@fabian.gruenbichler.email>

behaviour/proc macro srv make usage of RTLD_DEEPBIND portable.patch | (download)

src/tools/rust-analyzer/Cargo.lock | 1 1 + 0 - 0 !
src/tools/rust-analyzer/crates/proc-macro-srv/Cargo.toml | 1 1 + 0 - 0 !
src/tools/rust-analyzer/crates/proc-macro-srv/src/dylib.rs | 11 8 + 3 - 0 !
3 files changed, 10 insertions(+), 3 deletions(-)

 proc-macro-srv: make usage of rtld_deepbind portable
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

the constant is wrong on some platforms (e.g., on mips64el it's 0x10, and 0x8
is RTLD_NOLOAD which makes all this functionality broken), the libc crate takes
bootstrap/bootstrap revert cross build breaking change.patch | (download)

src/bootstrap/src/core/builder/cargo.rs | 20 3 + 17 - 0 !
1 file changed, 3 insertions(+), 17 deletions(-)

 bootstrap: revert cross-build breaking change
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

this reverts 68034f837a39387e49fc7d7c5b088f5372a1127e modulo file split that
happened afterwards.

vendor/cargo update git2 bindings.patch | (download)

src/tools/cargo/Cargo.toml | 6 3 + 3 - 0 !
1 file changed, 3 insertions(+), 3 deletions(-)

 cargo: update git2 bindings
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

to support libgit2 1.9


Signed-off-by: Fabian Grnbichler <git@fabian.gruenbichler.email>

vendor/gitoxide backport fix for CVE 2025 31130.patch | (download)

vendor/gix-features-0.39.1/Cargo.toml | 18 3 + 15 - 0 !
vendor/gix-features-0.39.1/src/hash.rs | 183 6 + 177 - 0 !
vendor/gix-hash-0.15.1/Cargo.toml | 8 8 + 0 - 0 !
vendor/gix-hash-0.15.1/src/hasher/io.rs | 138 138 + 0 - 0 !
vendor/gix-hash-0.15.1/src/hasher/mod.rs | 90 90 + 0 - 0 !
vendor/gix-hash-0.15.1/src/lib.rs | 5 5 + 0 - 0 !
6 files changed, 250 insertions(+), 192 deletions(-)

 gitoxide: backport fix for cve-2025-31130
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

fix feat!: detect SHA1 collision attacks

Fix [GHSA-2frx-2596-x5r6].

[GHSA-2frx-2596-x5r6]: https://github.com/GitoxideLabs/gitoxide/security/advisories/GHSA-2frx-2596-x5r6

This uses the `sha1-checked` crate from the RustCrypto project. Its
a pure Rust implementation, with no SIMD or assembly code.

The hashing implementation moves to `gix-hash`, as it no longer
depends on any feature configuration. I wasnt sure the ideal
crate to put this in, but after checking reverse dependencies on
crates.io, it seems like theres essentially no user of `gix-hash`
that wouldnt be pulling in a hashing implementation anyway, so I
think this is a fine and logical place for it to be.

A fallible API seems better than killing the process as Git does,
since were in a library context and it would be bad if you could
perform denialofservice attacks on a server by sending it hash
collisions. (Although there are probably cheaper ways to mount a
denialofservice attack.)

The new API also returns an `ObjectId` rather than `[u8; 20]`; the
vast majority of `Hasher::digest()` users immediately convert the
result to `ObjectId`, so this will help eliminate a lot of cruft
across the tree. `ObjectId` also has nicer `Debug` and `Display`
instances than `[u8; 20]`, and should theoretically make supporting
the hash function transition easier, although I suspect further API
changes will be required for that anyway. I wasnt sure whether
this would be a good change, as not every digest identifies an
entry in the Git object database, but even many of the existing
uses for nonobject digests across the tree used the `ObjectId`
API anyway. Perhaps it would be best to have a separate nonalias
`Digest` type that `ObjectId` wraps, but this seems like the pragmatic
choice for now that sticks with current practice.

The old API remains in this commit, as well as a temporary
nonfallible but `ObjectId`returning `Hasher::finalize()`,
pending the migration of all intree callers.

I named the module `gix_hash::hasher` since `gix_hash::hash` seemed
like it would be confusing. This does mean that there is a function
and module with the same name, which is permitted but perhaps a
little strange.

Everything is reexported directly other than
`gix_features::hash::Write`, which moves along with the I/O
convenience functions into a new public submodule and becomes
`gix_hash::hasher::io::Write`, as that seems like a clearer name
to me, being akin to the `gix_hash::hasher` function but as an
`std::io::Write` wrapper.

Raw hashing is somewhere around 0.25 to 0.65 the speed of the
previous implementation, depending on the feature configuration
and whether the CPU supports hardwareaccelerated hashing. (The
more portable assembly in `sha1-asm` that doesnt require the SHA
instruction set doesnt seem to speed things up that much; in fact,
`sha1_smol` somehow regularly beats the assembly code used by `sha1`
on my i99880H MacBook Pro! Presumably this is why that path was
removed in newer versions of the `sha1` crate.)

Performance on an endtoend `gix no-repo pack verify` benchmark
using pack files from the Linux kernel Git server measures around
0.41 to 0.44 compared to the base commit on an M2 Max and a
Ryzen 7 5800X, both of which have hardware instructions for SHA1
acceleration that the previous implementation uses but this one does
not. On the i99880H, its around 0.58 to 0.60 the speed;
the slowdown is reduced by the older hardwares lack of SHA1
instructions.

The `sha1collisiondetection` crate from the Sequoia PGP project,
based on a modified C2Rust translation of the library used by Git,
was also considered; although its raw hashing performance seems
to measure around 1.121.15 the speed of `sha1-checked` on
x86, its indistinguishable from noise on the endtoend
benchmark, and on an M2 Max `sha1-checked` is consistently
around 1.03 the speed of `sha1collisiondetection` on that
benchmark. The `sha1collisiondetection` crate has also had a
soundness issue in the past due to the automatic C translation,
whereas `sha1-checked` has only one trivial `unsafe` block. On the
other hand, `sha1collisiondetection` is used by both Sequoia itself
and the `gitoid` crate, whereas rPGP is the only major user of
`sha1-checked`. I dont think theres a clear winner here.

The performance regression is very unfortunate, but the [SHAttered]
attack demonstrated a collision back in 2017, and the 2020 [SHA1 is
a Shambles] attack demonstrated a practical chosenprefix collision
that broke the use of SHA1 in OpenPGP, costing $75k to perform,
with an estimate of $45k to replicate at the time of publication and
$11k for a classical collision.

[SHAttered]: https://shattered.io/
[SHA1 is a Shambles]: https://sha-mbles.github.io/

Given the increase in GPU performance and production since then,
that puts the Git object format squarely at risk. Git mitigated this
attack in 2017; the algorithm is fairly general and detects all the
existing public collisions. My understanding is that an entirely new
cryptanalytic approach would be required to develop a collision attack
for SHA1 that would not be detected with very high probability.

I believe that the speed penalty could be mitigated, although not
fully eliminated, by implementing a version of the hardened SHA1
function that makes use of SIMD. For instance, the assembly code used
by `openssl speed sha1` on my i99880H measures around 830 MiB/s,
compared to the winning 580 MiB/s of `sha1_smol`; adding collision
detection support to that would surely incur a performance penalty,
but it is likely that it could be much more competitive with
the performance before this commit than the 310 MiB/s I get with
`sha1-checked`. I havent been able to find any existing work on
this; it seems that more or less everyone just uses the original
C library that Git does, presumably because nothing except Git and
OpenPGP is still relying on SHA1 anyway

The performance will never compete with the >2 GiB/s that can
be achieved with the x86 SHA instruction set extension, as the
`SHA1RNDS4` instruction sadly runs four rounds at a time while the
collision detection algorithm requires checks after every round,
but I believe SIMD would still offer a significant improvement,
and the AArch64 extension seems like it may be more flexible.

I know that these days the Git codebase has an additional faster
unsafe API without these checks that it tries to carefully use only
for operations that do not depend on hashing results for correctness
or safety. I personally believe thats not a terribly good idea,
as it seems easy to misuse in a case where correctness actually does
matter, but maybe thats just my Rust safety bias talking. I think
it would be better to focus on improving the performance of the safer
algorithm, as I think that many of the operations where the performance
penalty is the most painful are dealing with untrusted input anyway.

The `Hasher` struct gets a lot bigger; I dont know if this is
an issue or not, but if it is, it could potentially be boxed.

Closes: #585

Backported from upstream, paths and context adapted and non-applicabable parts
removed.
Signed-off-by: Fabian Grnbichler <git@fabian.gruenbichler.email>

upstream/RUSTSEC 2025 0024 sync mpsc prevent double free on Drop.patch | (download)

library/std/src/sync/mpmc/list.rs | 8 7 + 1 - 0 !
1 file changed, 7 insertions(+), 1 deletion(-)

 rustsec-2025-0024: sync::mpsc: prevent double free on `drop`
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

This PR is fixing a regression introduced by #121646 that can lead to a
double free when dropping the channel.

The details of the bug can be found in the corresponding crossbeam PR
https://github.com/crossbeam-rs/crossbeam/pull/1187

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
FG: cherry-pick from upstream b9e2ac5c7b1d6bb3b6f5fdfe0819eaf7e95bf7ff
FG: drop test context
Signed-off-by: Fabian Grnbichler <git@fabian.gruenbichler.email>