$ uscan --verbose
$ ver=UPDATE-ME # whatever it is, X.YY.0 probably
$ tar xf ../rustc-$ver-src.tar.gz && ( cd rustc-$ver-src/ && ../debian/prune-unused-deps ) && rm -rf rustc-$ver-src/
+# ^ If this fails, you probably need to refresh patches or edit debian/prune-unused-deps
$ 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
grep -v '\b\(text\|empty\)\b' || true
$ find src/vendor/ -name '*.c' -o -name '*.js'
$ suspicious-source
+# When you are satisfied with the above, proceed:
$ gbp import-orig ../rustc_$ver+dfsg1.orig.tar.xz
$ dch -v $ver+dfsg1-1 -m "New upstream release."
)dnl
[llvm]
-link-shared = true
[rust]
-dist-src = false
-
channel = "RELEASE_CHANNEL"
# parallel codegen interferes with reproducibility, see
Forwarded: not-needed
--- a/src/Cargo.toml
+++ b/src/Cargo.toml
-@@ -15,7 +15,6 @@
+@@ -15,9 +15,7 @@
"tools/remote-test-client",
"tools/remote-test-server",
"tools/rust-installer",
- "tools/cargo",
+ "tools/rustdoc",
+- "tools/rls",
]
# Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit
run(args, env=env, verbose=self.verbose)
def build_triple(self):
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
@@ -513,10 +513,7 @@
if self.config.rust_optimize && cmd != "bench" {
cargo.arg("--release");
had_configure_upstream=$(if test -e "$scriptdir/debian/configure-upstream"; then echo true; else echo false; fi)
( cd "$scriptdir" && debian/rules debian/configure-upstream )
+temporary_patches() {
+ # pre-patch Cargo.toml to remove hacky workarounds in 1.21 that won't be there in 1.22
+ # saves us time having to refresh then unrefresh the patch
+ sed -i -e '\,tools/rls/test_data,d' -e /FIXME/d src/Cargo.toml
+}
+
"$scriptdir/debian/configure-upstream"
+temporary_patches
"$scriptdir/debian/ensure-patch" -N "$scriptdir/debian/patches/d-ignore-removed-submodules.patch"
test -f src/Cargo.lock.orig || cp src/Cargo.lock src/Cargo.lock.orig
./x.py build nonexistent/path/to/trigger/cargo/metadata src/bootstrap