summaryrefslogtreecommitdiffstats
path: root/debian/patches/prune/d-0020-remove-windows-dependencies.patch
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches/prune/d-0020-remove-windows-dependencies.patch (renamed from debian/patches/d-0020-remove-windows-dependencies.patch)130
1 files changed, 72 insertions, 58 deletions
diff --git a/debian/patches/d-0020-remove-windows-dependencies.patch b/debian/patches/prune/d-0020-remove-windows-dependencies.patch
index dd4f4d88d..29604db35 100644
--- a/debian/patches/d-0020-remove-windows-dependencies.patch
+++ b/debian/patches/prune/d-0020-remove-windows-dependencies.patch
@@ -2,33 +2,44 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Date: Mon, 6 May 2024 10:25:32 +0200
Subject: d-0020-remove-windows-dependencies
+use something like
+
+ find src compiler library -iname Cargo.toml -exec grep -H -n -e 'windows-sys' -e 'winapi' -e 'ntapi' -e 'wincon' -e 'winreg' -e 'windows' {} \; >
+
+to find and eliminate dependencies on windows-only crates when rebasing.
+
+windows-bindgen and windows-metadata should not be removed, they are needed for
+the build and don't pull in windows-sys and friends.
+
+Forwarded: not-needed
+
===================================================================
---
compiler/rustc_codegen_ssa/Cargo.toml | 4 ----
- compiler/rustc_data_structures/Cargo.toml | 10 ----------
- compiler/rustc_driver_impl/Cargo.toml | 6 ------
- compiler/rustc_errors/Cargo.toml | 8 --------
- compiler/rustc_session/Cargo.toml | 7 -------
- library/backtrace/Cargo.toml | 13 ------------
- src/bootstrap/Cargo.toml | 15 --------------
- src/tools/cargo/Cargo.toml | 23 ++++------------------
+ compiler/rustc_data_structures/Cargo.toml | 10 ---------
+ compiler/rustc_driver_impl/Cargo.toml | 6 -----
+ compiler/rustc_errors/Cargo.toml | 8 -------
+ compiler/rustc_session/Cargo.toml | 7 ------
+ library/backtrace/Cargo.toml | 13 -----------
+ src/bootstrap/Cargo.toml | 15 -------------
+ src/tools/cargo/Cargo.toml | 26 ++++------------------
.../cargo/crates/cargo-test-support/Cargo.toml | 3 ---
- src/tools/cargo/crates/cargo-util/Cargo.toml | 7 -------
+ src/tools/cargo/crates/cargo-util/Cargo.toml | 7 ------
src/tools/cargo/crates/home/Cargo.toml | 3 ---
.../cargo/credential/cargo-credential/Cargo.toml | 3 ---
src/tools/cargo/src/cargo/util/auth/mod.rs | 5 -----
- src/tools/compiletest/Cargo.toml | 10 ----------
+ src/tools/compiletest/Cargo.toml | 10 ---------
src/tools/rust-analyzer/crates/profile/Cargo.toml | 3 ---
- .../rust-analyzer/crates/rust-analyzer/Cargo.toml | 6 ------
+ .../rust-analyzer/crates/rust-analyzer/Cargo.toml | 6 -----
src/tools/rust-analyzer/crates/stdx/Cargo.toml | 4 ----
- 17 files changed, 4 insertions(+), 126 deletions(-)
+ 17 files changed, 4 insertions(+), 129 deletions(-)
diff --git a/compiler/rustc_codegen_ssa/Cargo.toml b/compiler/rustc_codegen_ssa/Cargo.toml
-index 4dae49f..20453c2 100644
+index 3f2ed25..bf0ad91 100644
--- a/compiler/rustc_codegen_ssa/Cargo.toml
+++ b/compiler/rustc_codegen_ssa/Cargo.toml
@@ -49,7 +49,3 @@ libc = "0.2.50"
- version = "0.32.0"
+ version = "0.32.1"
default-features = false
features = ["read_core", "elf", "macho", "pe", "xcoff", "unaligned", "archive", "write"]
-
@@ -36,7 +47,7 @@ index 4dae49f..20453c2 100644
-version = "0.48.0"
-features = ["Win32_Globalization"]
diff --git a/compiler/rustc_data_structures/Cargo.toml b/compiler/rustc_data_structures/Cargo.toml
-index 8d91c4c..0de63d9 100644
+index 4732783..bbfcb55 100644
--- a/compiler/rustc_data_structures/Cargo.toml
+++ b/compiler/rustc_data_structures/Cargo.toml
@@ -32,16 +32,6 @@ tracing = "0.1"
@@ -57,10 +68,10 @@ index 8d91c4c..0de63d9 100644
# tidy-alphabetical-start
memmap2 = "0.2.1"
diff --git a/compiler/rustc_driver_impl/Cargo.toml b/compiler/rustc_driver_impl/Cargo.toml
-index da7c244..80547ce 100644
+index 4904298..2918095 100644
--- a/compiler/rustc_driver_impl/Cargo.toml
+++ b/compiler/rustc_driver_impl/Cargo.toml
-@@ -58,12 +58,6 @@ tracing = { version = "0.1.35" }
+@@ -59,12 +59,6 @@ tracing = { version = "0.1.35" }
libc = "0.2"
# tidy-alphabetical-end
@@ -139,10 +150,10 @@ index 932310b..dce3c3f 100644
[[example]]
diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml
-index e4d3591..b548faf 100644
+index 077d195..b9ad241 100644
--- a/src/bootstrap/Cargo.toml
+++ b/src/bootstrap/Cargo.toml
-@@ -66,21 +66,6 @@ sysinfo = { version = "0.26.0", optional = true }
+@@ -65,21 +65,6 @@ sysinfo = { version = "0.26.0", optional = true }
[target.'cfg(not(target_os = "solaris"))'.dependencies]
fd-lock = "3.0.13"
@@ -165,7 +176,7 @@ index e4d3591..b548faf 100644
pretty_assertions = "1.4"
diff --git a/src/tools/cargo/Cargo.toml b/src/tools/cargo/Cargo.toml
-index c011909..989d8d4 100644
+index 2a81642..76a8cf2 100644
--- a/src/tools/cargo/Cargo.toml
+++ b/src/tools/cargo/Cargo.toml
@@ -2,7 +2,9 @@
@@ -181,22 +192,22 @@ index c011909..989d8d4 100644
]
@@ -24,8 +26,6 @@ bytesize = "1.3"
cargo = { path = "" }
- cargo-credential = { version = "0.4.1", path = "credential/cargo-credential" }
- cargo-credential-libsecret = { version = "0.4.1", path = "credential/cargo-credential-libsecret" }
--cargo-credential-macos-keychain = { version = "0.4.1", path = "credential/cargo-credential-macos-keychain" }
--cargo-credential-wincred = { version = "0.4.1", path = "credential/cargo-credential-wincred" }
+ cargo-credential = { version = "0.4.2", path = "credential/cargo-credential" }
+ cargo-credential-libsecret = { version = "0.4.2", path = "credential/cargo-credential-libsecret" }
+-cargo-credential-macos-keychain = { version = "0.4.2", path = "credential/cargo-credential-macos-keychain" }
+-cargo-credential-wincred = { version = "0.4.2", path = "credential/cargo-credential-wincred" }
cargo-platform = { path = "crates/cargo-platform", version = "0.1.4" }
cargo-test-macro = { path = "crates/cargo-test-macro" }
cargo-test-support = { path = "crates/cargo-test-support" }
-@@ -102,7 +102,6 @@ unicode-xid = "0.2.4"
- url = "2.4.1"
+@@ -103,7 +103,6 @@ unicode-xid = "0.2.4"
+ url = "2.5.0"
varisat = "0.2.2"
walkdir = "2.4.0"
--windows-sys = "0.48"
+-windows-sys = "0.52"
- [package]
- name = "cargo"
-@@ -129,6 +128,7 @@ base64.workspace = true
+ [workspace.lints.rust]
+ rust_2018_idioms = "warn" # TODO: could this be removed?
+@@ -144,6 +143,7 @@ base64.workspace = true
bytesize.workspace = true
cargo-credential.workspace = true
cargo-platform.workspace = true
@@ -204,7 +215,7 @@ index c011909..989d8d4 100644
cargo-util.workspace = true
clap = { workspace = true, features = ["wrap_help"] }
color-print.workspace = true
-@@ -189,9 +189,6 @@ walkdir.workspace = true
+@@ -206,27 +206,9 @@ walkdir.workspace = true
[target.'cfg(target_os = "linux")'.dependencies]
cargo-credential-libsecret.workspace = true
@@ -214,10 +225,6 @@ index c011909..989d8d4 100644
[target.'cfg(not(windows))'.dependencies]
openssl = { workspace = true, optional = true }
-@@ -195,21 +195,6 @@ cargo-credential-macos-keychain.workspace = true
- [target.'cfg(not(windows))'.dependencies]
- openssl = { workspace = true, optional = true }
-
-[target.'cfg(windows)'.dependencies]
-cargo-credential-wincred.workspace = true
-
@@ -237,47 +244,53 @@ index c011909..989d8d4 100644
cargo-test-macro.workspace = true
cargo-test-support.workspace = true
diff --git a/src/tools/cargo/crates/cargo-test-support/Cargo.toml b/src/tools/cargo/crates/cargo-test-support/Cargo.toml
-index fc32e1c..ce5d708 100644
+index 1098d59..88d4ae7 100644
--- a/src/tools/cargo/crates/cargo-test-support/Cargo.toml
+++ b/src/tools/cargo/crates/cargo-test-support/Cargo.toml
-@@ -29,6 +29,3 @@ tar.workspace = true
- time.workspace = true
- toml.workspace = true
+@@ -31,8 +31,5 @@ toml.workspace = true
url.workspace = true
--
+ walkdir.workspace = true
+
-[target.'cfg(windows)'.dependencies]
-windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem"] }
+-
+ [lints]
+ workspace = true
diff --git a/src/tools/cargo/crates/cargo-util/Cargo.toml b/src/tools/cargo/crates/cargo-util/Cargo.toml
-index 616a79c..9fc3971 100644
+index 3fd6bde..fb681a3 100644
--- a/src/tools/cargo/crates/cargo-util/Cargo.toml
+++ b/src/tools/cargo/crates/cargo-util/Cargo.toml
-@@ -20,10 +20,3 @@ shell-escape.workspace = true
- tempfile.workspace = true
+@@ -22,12 +22,5 @@ tempfile.workspace = true
tracing.workspace = true
walkdir.workspace = true
--
+
-[target.'cfg(target_os = "macos")'.dependencies]
-core-foundation.workspace = true
-
-[target.'cfg(windows)'.dependencies]
-miow.workspace = true
-windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_Console"] }
+-
+ [lints]
+ workspace = true
diff --git a/src/tools/cargo/crates/home/Cargo.toml b/src/tools/cargo/crates/home/Cargo.toml
-index 702a14e..dafeec8 100644
+index 33cd6ba..2d5dfdc 100644
--- a/src/tools/cargo/crates/home/Cargo.toml
+++ b/src/tools/cargo/crates/home/Cargo.toml
-@@ -15,6 +15,3 @@ include = [
- license.workspace = true
+@@ -16,8 +16,5 @@ license.workspace = true
repository = "https://github.com/rust-lang/cargo"
description = "Shared definitions of home directories."
--
+
-[target.'cfg(windows)'.dependencies]
--windows-sys = { workspace = true, features = ["Win32_Foundation", "Win32_UI_Shell"] }
+-windows-sys = { workspace = true, features = ["Win32_Foundation", "Win32_UI_Shell", "Win32_System_Com"] }
+-
+ [lints]
+ workspace = true
diff --git a/src/tools/cargo/credential/cargo-credential/Cargo.toml b/src/tools/cargo/credential/cargo-credential/Cargo.toml
-index 8ba65b8..6678c23 100644
+index 7dc37ff..fac049b 100644
--- a/src/tools/cargo/credential/cargo-credential/Cargo.toml
+++ b/src/tools/cargo/credential/cargo-credential/Cargo.toml
-@@ -15,8 +15,5 @@ serde_json.workspace = true
+@@ -15,9 +15,6 @@ serde_json.workspace = true
thiserror.workspace = true
time.workspace = true
@@ -286,6 +299,7 @@ index 8ba65b8..6678c23 100644
-
[dev-dependencies]
snapbox = { workspace = true, features = ["examples"] }
+
diff --git a/src/tools/cargo/src/cargo/util/auth/mod.rs b/src/tools/cargo/src/cargo/util/auth/mod.rs
index c2f8186..c420971 100644
--- a/src/tools/cargo/src/cargo/util/auth/mod.rs
@@ -321,7 +335,7 @@ index 31c6353..bdc4805 100644
- "Win32_System_Diagnostics_Debug",
-]
diff --git a/src/tools/rust-analyzer/crates/profile/Cargo.toml b/src/tools/rust-analyzer/crates/profile/Cargo.toml
-index fd98d85..8c1d137 100644
+index 4fb2760..8573fbe 100644
--- a/src/tools/rust-analyzer/crates/profile/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/profile/Cargo.toml
@@ -21,9 +21,6 @@ countme = { version = "3.0.1", features = ["enable"] }
@@ -335,10 +349,10 @@ index fd98d85..8c1d137 100644
cpu_profiler = []
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
-index 7410f0a..d25b922 100644
+index 39ac338a..d25722a 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
-@@ -71,12 +71,6 @@ toolchain.workspace = true
+@@ -65,12 +65,6 @@ toolchain.workspace = true
vfs-notify.workspace = true
vfs.workspace = true
@@ -350,17 +364,17 @@ index 7410f0a..d25b922 100644
-
[dev-dependencies]
expect-test = "1.4.0"
- xshell = "0.2.2"
+ xshell.workspace = true
diff --git a/src/tools/rust-analyzer/crates/stdx/Cargo.toml b/src/tools/rust-analyzer/crates/stdx/Cargo.toml
-index 536f000..6ed37f5 100644
+index c914ae2..db8b274 100644
--- a/src/tools/rust-analyzer/crates/stdx/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/stdx/Cargo.toml
-@@ -19,10 +19,6 @@ jod-thread = "0.1.2"
- crossbeam-channel = "0.5.5"
+@@ -20,10 +20,6 @@ crossbeam-channel = "0.5.5"
+ itertools.workspace = true
# Think twice before adding anything here
-[target.'cfg(windows)'.dependencies]
--miow = "0.5.0"
+-miow = "0.6.0"
-winapi = { version = "0.3.9", features = ["winerror"] }
-
[features]