diff --git a/rust_hacks.md b/rust_hacks.md index 0d44cd88a..ee9baa88d 100644 --- a/rust_hacks.md +++ b/rust_hacks.md @@ -27,6 +27,23 @@ Since the source is pulled from crates.io and not from github/lab, patching requ 2) `wget http://crates.io/api/v1/crates/foocrate/version/download -O foocrate-version.tar.gz` Then follow 1.1) +Alternatively you can do it directly in the build directory with +[quilt](https://wiki.debian.org/UsingQuilt): + +1. In the root directory of `debcargo-conf`, `cd build/foo` +2. `quilt series` to check existing patches, `quilt push -a` to test apply all + of them, and `quilt pop -a` to unapply them +3. `quilt new patch-name.patch` to create a new patch, `quilt edit +path/to/file` to edit a file with changes saved in current patch, `quilt +header -e --dep3` to add a DEP-3 patch header +4. `quilt refresh` to update current patch and prevent fuzz (we don't allow +fuzzes when building) +5. `cp -r debian/patches ../../src/foo/debian/` to copy updated patches over +6. In root directory, run `./update.sh foo` to update the build directory + +Note that `update.sh` deletes and re-creates `build/foo`, so an open terminal +in it needs to go up and down into the new directory. + capitol did a nice writeup which can be read here: https://blog.hackeriet.no/packaging-rust-part-II/