|
| 1 | +Scope of this document |
| 2 | +====================== |
| 3 | + |
| 4 | +This document talks about Mbed TLS, but the same guidelines apply to |
| 5 | +the other forks of the TF-M and Mbed TLS projects. |
| 6 | + |
| 7 | +Upstream Mbed TLS branches and tags |
| 8 | +=================================== |
| 9 | + |
| 10 | +- 1 working branch name named `development`, where the ongoing work happens. |
| 11 | +- 1 or more LTS branches named as `mbedtls-<major>.<minor>` (ex: `mbedtls-3.6`). |
| 12 | +- Tag at every release with format `v<major>.<minor>.<patch>` (ex: `v3.6.4`). |
| 13 | + |
| 14 | +Proposed approach |
| 15 | +================= |
| 16 | + |
| 17 | +Let's say that a new Mbed TLS release is announced and that its release tag |
| 18 | +is for example `v3.6.5`. |
| 19 | +On the Zephyr fork: |
| 20 | +1. Create a new branch named `zephyr_<project_name>_v<upstream_release_version>` |
| 21 | + which is located exactly at the upstream release tag. For example |
| 22 | + `zephyr_mbedtls_v3.6.5`. |
| 23 | +2. Make a PR by cherry-picking all the Zephyr extra patches that are still needed |
| 24 | + for the new branch [1][2]. |
| 25 | + - Discard all the `[zep fromtree]`and `[zep fromlist]` that are already |
| 26 | + included in the release. As for `[zep noup]` they might no more be valid |
| 27 | + or might require an update so they should be checked individually. |
| 28 | + - The cherry-picking order should be: `[zep fromtree]` first, then |
| 29 | + `[zep fromlist]` and finally `[zep noup]`. |
| 30 | + - Cherry-pick commits without `-x` nor `-s` so as not to inflate the commit |
| 31 | + message over time. |
| 32 | +3. For the created PR set the target merge branch to the newly created |
| 33 | + `zephyr_mbedtls_v3.6.5`. |
| 34 | + - With this approach the PR in GitHub will show only Zephyr extra commits |
| 35 | + on top of the upstream release tag, so it will be easier to review. |
| 36 | +4. Get the PR approved and merged. |
| 37 | +5. Set the repo default branch to `zephyr_mbedtls_v3.6.5`. |
| 38 | + - When this is done, previous default branch (which in our example would be |
| 39 | + `zephyr_mbedtls_v3.6.4`) is cancelled and replaced with a tag in order to |
| 40 | + keep its history. |
0 commit comments