summaryrefslogtreecommitdiffstats
path: root/debian/patches/d-0000-ignore-removed-submodules.patch
blob: 588e53b3b9acce6e40566a037eda05b7fe187adb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Date: Sat, 2 Oct 2021 01:07:59 +0100
Subject: d-0000-ignore-removed-submodules

---
 Cargo.toml                         | 17 -----------------
 src/bootstrap/bootstrap.py         |  4 ----
 src/bootstrap/builder.rs           | 18 +-----------------
 src/bootstrap/doc.rs               |  1 -
 src/bootstrap/test.rs              | 12 +-----------
 src/tools/clippy/Cargo.toml        |  5 -----
 src/tools/rust-analyzer/Cargo.toml | 11 ++++++++++-
 src/tools/rustfmt/Cargo.toml       |  5 -----
 src/tools/tidy/src/deps.rs         |  4 +++-
 9 files changed, 15 insertions(+), 62 deletions(-)

Index: rust/Cargo.toml
===================================================================
--- rust.orig/Cargo.toml
+++ rust/Cargo.toml
@@ -18,28 +18,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/cargo",
-  "src/tools/cargo/crates/credential/cargo-credential-1password",
-  "src/tools/cargo/crates/credential/cargo-credential-macos-keychain",
-  "src/tools/cargo/crates/credential/cargo-credential-wincred",
-  "src/tools/cargo/crates/mdman",
-  # "src/tools/cargo/crates/resolver-tests",
   "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",
@@ -106,9 +93,6 @@ miniz_oxide.debug = 0
 object.debug = 0
 
 [patch.crates-io]
-# See comments in `src/tools/rustc-workspace-hack/README.md` for what's going on
-# here
-rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' }
 
 # See comments in `library/rustc-std-workspace-core/README.md` for what's going on
 # here
Index: rust/src/bootstrap/bootstrap.py
===================================================================
--- rust.orig/src/bootstrap/bootstrap.py
+++ rust/src/bootstrap/bootstrap.py
@@ -781,10 +781,6 @@ class RustBuild(object):
         args = [self.cargo(), "build", "--manifest-path",
                 os.path.join(self.rust_root, "src/bootstrap/Cargo.toml")]
         args.extend("--verbose" for _ in range(verbose_count))
-        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")
Index: rust/src/bootstrap/builder.rs
===================================================================
--- rust.orig/src/bootstrap/builder.rs
+++ rust/src/bootstrap/builder.rs
@@ -491,20 +491,20 @@ impl<'a> ShouldRun<'a> {
         static SUBMODULES_PATHS: OnceCell<Vec<String>> = 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
         };
@@ -658,24 +658,13 @@ 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
             ),
             Kind::Check | Kind::Clippy | Kind::Fix => describe!(
                 check::Std,
@@ -683,11 +672,6 @@ impl<'a> Builder<'a> {
                 check::Rustdoc,
                 check::CodegenBackend,
                 check::Clippy,
-                check::Miri,
-                check::CargoMiri,
-                check::MiroptTestTools,
-                check::Rls,
-                check::RustAnalyzer,
                 check::Rustfmt,
                 check::Bootstrap
             ),
@@ -717,8 +701,6 @@ impl<'a> Builder<'a> {
                 test::TierCheck,
                 test::ReplacePlaceholderTest,
                 test::Cargotest,
-                test::Cargo,
-                test::RustAnalyzer,
                 test::ErrorIndex,
                 test::Distcheck,
                 test::RunMakeFullDeps,
@@ -734,7 +716,6 @@ impl<'a> Builder<'a> {
                 test::EmbeddedBook,
                 test::EditionGuide,
                 test::Rustfmt,
-                test::Miri,
                 test::Clippy,
                 test::RustDemangler,
                 test::CompiletestTest,
@@ -767,11 +748,8 @@ impl<'a> Builder<'a> {
                 doc::RustdocBook,
                 doc::RustByExample,
                 doc::RustcBook,
-                doc::Cargo,
-                doc::CargoBook,
                 doc::Clippy,
                 doc::ClippyBook,
-                doc::Miri,
                 doc::EmbeddedBook,
                 doc::EditionGuide,
                 doc::StyleGuide,
@@ -787,13 +765,9 @@ impl<'a> Builder<'a> {
                 dist::RustcDev,
                 dist::Analysis,
                 dist::Src,
-                dist::Cargo,
-                dist::Rls,
-                dist::RustAnalyzer,
                 dist::Rustfmt,
                 dist::RustDemangler,
                 dist::Clippy,
-                dist::Miri,
                 dist::LlvmTools,
                 dist::RustDev,
                 dist::Bootstrap,
@@ -809,12 +783,9 @@ impl<'a> Builder<'a> {
             Kind::Install => describe!(
                 install::Docs,
                 install::Std,
-                install::Cargo,
-                install::RustAnalyzer,
                 install::Rustfmt,
                 install::RustDemangler,
                 install::Clippy,
-                install::Miri,
                 install::LlvmTools,
                 install::Src,
                 install::Rustc
@@ -824,7 +795,6 @@ impl<'a> Builder<'a> {
                 run::BuildManifest,
                 run::BumpStage0,
                 run::ReplaceVersionPlaceholder,
-                run::Miri,
                 run::CollectLicenseMetadata,
                 run::GenerateCopyright,
             ),
@@ -1949,10 +1919,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");
         }
 
Index: rust/src/bootstrap/doc.rs
===================================================================
--- rust.orig/src/bootstrap/doc.rs
+++ rust/src/bootstrap/doc.rs
@@ -76,7 +76,6 @@ macro_rules! book {
 // FIXME: Make checking for a submodule automatic somehow (maybe by having a list of all submodules
 // and checking against it?).
 book!(
-    CargoBook, "src/tools/cargo/src/doc", "cargo", submodule = "src/tools/cargo";
     ClippyBook, "src/tools/clippy/book", "clippy";
     EditionGuide, "src/doc/edition-guide", "edition-guide", submodule;
     EmbeddedBook, "src/doc/embedded-book", "embedded-book", submodule;
Index: rust/src/bootstrap/test.rs
===================================================================
--- rust.orig/src/bootstrap/test.rs
+++ rust/src/bootstrap/test.rs
@@ -2070,17 +2070,7 @@ impl Step for RustcGuide {
     }
 
     fn run(self, builder: &Builder<'_>) {
-        let relative_path = Path::new("src").join("doc").join("rustc-dev-guide");
-        builder.update_submodule(&relative_path);
-
-        let src = builder.src.join(relative_path);
-        let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook);
-        let toolstate = if try_run(builder, rustbook_cmd.arg("linkcheck").arg(&src)) {
-            ToolState::TestPass
-        } else {
-            ToolState::TestFail
-        };
-        builder.save_toolstate("rustc-dev-guide", toolstate);
+        builder.save_toolstate("rustc-dev-guide", ToolState::TestPass);
     }
 }
 
Index: rust/src/tools/clippy/Cargo.toml
===================================================================
--- rust.orig/src/tools/clippy/Cargo.toml
+++ rust/src/tools/clippy/Cargo.toml
@@ -36,11 +36,6 @@ walkdir = "2.3"
 # This is used by the `collect-metadata` alias.
 filetime = "0.2"
 
-# A noop dependency that changes in the Rust repository, it's a bit of a hack.
-# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
-# for more information.
-rustc-workspace-hack = "1.0"
-
 # UI test dependencies
 clap = { version = "4.1.4", features = ["derive"] }
 clippy_utils = { path = "clippy_utils" }
Index: rust/src/tools/rust-analyzer/Cargo.toml
===================================================================
--- rust.orig/src/tools/rust-analyzer/Cargo.toml
+++ rust/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"]
 
 [workspace.package]
Index: rust/src/tools/rustfmt/Cargo.toml
===================================================================
--- rust.orig/src/tools/rustfmt/Cargo.toml
+++ rust/src/tools/rustfmt/Cargo.toml
@@ -59,11 +59,6 @@ unicode_categories = "0.1"
 
 rustfmt-config_proc_macro = { version = "0.3", path = "config_proc_macro" }
 
-# A noop dependency that changes in the Rust repository, it's a bit of a hack.
-# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
-# for more information.
-rustc-workspace-hack = "1.0.0"
-
 # Rustc dependencies are loaded from the sysroot, Cargo doesn't know about them.
 
 [package.metadata.rust-analyzer]
Index: rust/src/tools/tidy/src/deps.rs
===================================================================
--- rust.orig/src/tools/tidy/src/deps.rs
+++ rust/src/tools/tidy/src/deps.rs
@@ -337,7 +337,7 @@ const FORBIDDEN_TO_HAVE_DUPLICATES: &[&s
     // This crate takes quite a long time to build, so don't allow two versions of them
     // to accidentally sneak into our dependency graph, in order to ensure we keep our CI times
     // under control.
-    "cargo",
+    //"cargo",
 ];
 
 /// Dependency checks.
@@ -613,6 +613,8 @@ fn direct_deps_of<'a>(metadata: &'a Meta
 }
 
 fn check_rustfix(metadata: &Metadata, bad: &mut bool) {
+    // Debian: we don't build cargo here, so this function doens't function.
+    return;
     let cargo = pkg_from_name(metadata, "cargo");
     let compiletest = pkg_from_name(metadata, "compiletest");
     let cargo_deps = direct_deps_of(metadata, &cargo.id);