Re-vendoring gnome-snapshot
===========================
Current Ubuntu Main Inclusion policy requires that Rust apps in Ubuntu main
be vendored.

Here is a general overview of changes made compared to the Debian package

- Drop patches that modify Cargo.toml's dependencies
- Run cargo vendor
- Add a patch to tell Cargo to use our vendored source instead of looking online
- Disable all librust* Build-Depends in debian/control
- Add XS-Vendored-Sources-Rust field to debian/control
- Simplify debian/rules and make minor changes

Updating vendored crates
========================
rm -rf debian/missing-sources/
$ cargo vendor-filterer --platform='*-*-linux-gnu' --platform '*-*-linux-gnueabi' --all-features debian/missing-sources/
git add -f debian/missing-sources
git commit -m "Update vendored rust crates"
git reset --hard

rm debian/source/include-binaries
dpkg-source --include-binaries -b .
git add debian/source/include-binaries
git commit -m "Update debian/source/include-binaries"
git reset --hard && git clean -fdx

rm Cargo.toml
# Use the output to update the XS-Vendored-Sources-Rust line in debian/control
CARGO_VENDOR_DIR=debian/missing-sources/ /usr/share/cargo/bin/dh-cargo-vendored-sources
git add debian/control
git commit -m "Update XS-Vendored-Sources-Rust field"
git reset --hard # restore Cargo.toml

Patches
=======
If you have patches that modify Cargo.toml's dependencies, then you'll need to apply
the patches before running cargo vendor. Patching Cargo.toml may not be needed
since we are vendoring all the Rust crates. Perhaps it is needed in the future
if we figure out how to exclude unnecessary Windows crates or if there is a subset
of Rust crates that are shipped by the system.

If you're using git-buildpackage, gbp pq import before the first rm command and
gbp pq export after the cargo vendor command takes care of this.

Repository
=========
The ubuntu/* branches are at https://salsa.debian.org/ubuntu-dev-team/snapshot
The pristine-tar and upstream/* branches are at https://salsa.debian.org/gnome-team/snapshot

The general workflow for Debian GNOME packages is at https://wiki.debian.org/Gnome/Git

Usually, the Ubuntu Desktop team stores the ubuntu/* branches in the same Debian GNOME Salsa repo
as the Debian package. However, given the huge size difference only for the Ubuntu vendoring, it
seems more polite to use a separate repo.

TODO
====
- Specify specific platforms for vendor-filterer
  Does this make a difference?
- Identify the specific features we need instead of all-features
- Script the revendoring commands
