1## Steps for updating this crate 2 31. In order to run cargo2android, for this crate, the BoringSSL rust bindings first needs to be 4 built. Copy `googletest` to `boringssl`, which is needed to build the rust bindings 5 6 ``` 7 $ cp -r external/googletest/googletest external/boringssl/src/third_party/ 8 ``` 92. Build the rust bindings (More information at 10 https://boringssl.googlesource.com/boringssl/+/HEAD/BUILDING.md) 11 12 ``` 13 $ cd external/boringssl 14 $ mkdir build && cd build 15 $ cmake .. -DRUST_BINDINGS=x86_64-unknown-linux-gnu 16 $ make 17 ``` 183. Run `tools/external_updater/updater.sh update rust/crates/openssl`. Cargo errors causing the 19 command to fail are expected (since the boringSSL crate is outside of the `openssl` directory, 20 redshell is not able to access it). 214. The repository should now be in a `tmp_auto_upgrade` branch, and the Android.bp will contain 22 some error message. 235. Run cargo2android 24 25 ``` 26 $ cargo2android.py --config ./cargo2android.json 27 ``` 286. Clean up the changes in external/boringssl repository, and double check that the resulting 29 Android.bp builds correctly by running `m libopenssl`. 307. Commit the changes and upload the CL. 318. `external/rust/crates/openssl-macros` should also be updated at the same time. 32 33## Generating patch files 34 35If you make changes to this repo that is not in upstream `rust-openssl` yet, please generate a 36patch file to keep track of those changes. 37 381. Commit your changes 392. Create the patch file: `git diff -u HEAD~ > <XXXX-topic>.diff` where XXXX is the number to track 40 the order of the patches to apply. 413. Amend the patch file into your CL `git add -A && git commit --amend` 42