Skip to content

Commit af49d7e

Browse files
committed
[zep noup] doc: extend README explaining how version bumping is handled
This commit extends README file explaining how version bumping to upstream Mbed TLS' releases should be handled in the Zephyr's fork of Mbed TLS. Signed-off-by: Valerio Setti <vsetti@baylibre.com>
1 parent a8b7caf commit af49d7e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,36 @@ This is for local patches that are not expected to make their way upstream.
5959
This should be used sparingly and for good reasons, as we do not want to deviate from upstream. This is not meant as a quick way to get changes into this repository by bypassing upstream and such commits will be rejected.
6060

6161
`noup` commits are like regular commits in the main Zephyr repository with the exception that their commit title is prepended with `[zep noup]`.
62+
63+
Version bumping
64+
---------------
65+
66+
This section talks about Mbed TLS, but the same guidelines apply to the other
67+
forks of the TF-M and Mbed TLS projects.
68+
69+
Let's say that a new Mbed TLS release is announced and that its release tag
70+
is for example `v3.6.5`.
71+
On the Zephyr fork:
72+
1. Create a new branch named `zephyr_<project_name>_v<upstream_release_version>`
73+
which is located exactly at the upstream release tag. For example,
74+
`zephyr_mbedtls_v3.6.5`.
75+
2. Make a PR by cherry-picking all the Zephyr extra patches that are still needed
76+
for the new branch.
77+
- Discard all the `[zep fromtree]` and `[zep fromlist]` commits that are already
78+
included in the release. As for `[zep noup]` they might no more be valid
79+
or might require an update so they should be checked individually.
80+
- The cherry-picking order should be: `[zep fromtree]` first, then
81+
`[zep fromlist]` and finally `[zep noup]`.
82+
- Cherry-pick commits without `-x` nor `-s` so as not to inflate the commit
83+
message over time, unless you had to modify the commit and it's not just a
84+
clean cherry-pick.
85+
3. For the created PR set the base branch to the newly-created one. In our example,
86+
it would be `zephyr_mbedtls_v3.6.5`.
87+
- With this approach the PR in GitHub will only show Zephyr's extra commits
88+
on top of the upstream release tag, so it will be easier to review.
89+
4. Get the PR approved and merged.
90+
5. Make a PR in Zephyr repo to update the West revision of the Mbed TLS project.
91+
6. Set the repo default branch to `zephyr_mbedtls_v3.6.5`.
92+
- When this is done, the HEAD of the previous default branch (which in our
93+
example would be `zephyr_mbedtls_v3.6.4`) is tagged (in order to keep its
94+
history) with the name same as the branch and the branch is removed.

0 commit comments

Comments
 (0)