Simplify the instructions to generate the incrementals and the update reponses configuration. authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame
......@@ -217,26 +217,32 @@ In production, we use a few tools in `tor-browser-build` to create the update re
They are located in `tools/update-responses`.
### Create/update the `config.yml`
### Generate the incrementals
`config.yml` is a non-versioned file that is generated automatically at a certain point during the usual builds, so you might have already one, and you can adapt it to your test needs.
If you do not have one already, you can copy `tools/signing/nightly/update-responses-base-config.yml` to it and start from there.
Generating the incrementals has the "side" effect of creating a configuration to create the update responses.
You should update at least the `releases_dir` and `download/mars_url` properties and replace occurrences of `nightly_version` with the actual version you have built. You might need to update `platformVersion`, too.
```shell
make torbrowser-incrementals-nightly
```
The resulting incremental mars are not signed (maybe we could add a `config.yml` entry to specify the nssdb path and the nickname of the key to use), so you will need to sign them with the instructions you can find above.
For example (only the changes, not the full file):
Otherwise, if you really don't want to generate the incrementals, you can simply use this command to make the updated configuration:
```shell
rbm/rbm build release --step update_responses_config --target nightly --target torbrowser
```
#### Update the URLs in `config.yml`
`tools/update-responses/config.yml` is a non-versioned file that is generated automatically at the previous stage. \
However, by default it uses the data for the actual releases, so you will very likely need to update your file.
Updating the `download` section in this way should be enough:
```yaml
releases_dir: /home/pierov/buildstuff/tor-browser-build/torbrowser/nightly
download:
bundles_url: https://tb-build-05.torproject.org/~pierov/torbrowser/nightly
mars_url: https://tb-build-05.torproject.org/~pierov/torbrowser/nightly
channels:
nightly: tbb-nightly.2023.03.06
versions:
tbb-nightly.2023.03.06:
platformVersion: 102.8.0
incremental_from:
- tbb-nightly.2022.03.05
```
`~/public_html/torbrowser` in this case is a link to the `torbrowser` directory in the clone of `tor-browser-build` when I ran the build.
......@@ -244,25 +250,11 @@ versions:
If you have used a build server, but are creating the update responses locally, you can use the `releases_dir` property to tell the scripts where they can find your builds.
It must contain at least the `.mar` archives and the `mar-tools`.
Finally, if you want to generate incrementals, you need to create a `versions/$yourVersion/incremental_from` array, with the version(s) you want to generate incrementals from.
### Generate the incrementals (optional)
Normally, we would generate the incrementals with some `make` command.
However, we do not have a recipe for that in the `Makefile`, so you will need to run this command:
```sh
NO_CODESIGNATURE=1 ./gen_incrementals nightly
```
`NO_CODESIGNATURE=1` is needed only on macOS (unless you signed your nightly build for some reason).
The resulting incremental mars are not signed (maybe we could add a `config.yml` entry to specify the nssdb path and the nickname of the key to use), so you will need to sign them with the instructions you can find above.
### Generate the update responses
Finally, creating the update responses is very easy, just run this command:
Before creating the update responses, **be sure of having signed the `.mar`s**: Tor Browser update responses will contain hash ans size, and signing will change them.
If you have done that, creating the update responses is very easy, just run this command:
```sh
./update_responses
......
......