Skip to content

Commit c7f1640

Browse files
committed
[zep noup] doc: add document to explain how version bumping should be handled
This commit introduces a document which describes 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 2994b29 commit c7f1640

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

version-bumping.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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

Comments
 (0)