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