|
1
|
+**NOTE:** All examples in this template reference the rebase from 115.17.0esr to 115.18.0esr
|
|
2
|
+
|
|
3
|
+<details>
|
|
4
|
+ <summary>Explanation of Variables</summary>
|
|
5
|
+
|
|
6
|
+- `$(ESR_VERSION)`: the Mozilla defined ESR version, used in various places for building tor-browser tags, labels, etc
|
|
7
|
+ - **Example**: `115.18.0`
|
|
8
|
+- `$(ESR_TAG)`: the Mozilla defined hg (Mercurial) tag associated with `$(ESR_VERSION)`
|
|
9
|
+ - **Example**: `FIREFOX_115_18_0esr_BUILD1`
|
|
10
|
+- `$(ESR_TAG_PREV)`: the Mozilla defined hg (Mercurial) tag associated with the previous ESR version when rebasing (ie, the ESR version we are rebasing from)
|
|
11
|
+ - **Example**: `FIREFOX_115_17_0esr_BUILD1`
|
|
12
|
+- `$(BASE_BROWSER_BRANCH)`: the full name of the current `base-browser` branch
|
|
13
|
+ - **Example**: `base-browser-115.18.0esr-13.5-1`
|
|
14
|
+- `$(BASE_BROWSER_BRANCH_PREV)`: the full name of the previous `base-browser` branch
|
|
15
|
+ - **Example**: `base-browser-115.17.0esr-13.5-1`
|
|
16
|
+- `$(TOR_BROWSER_BRANCH)`: the full name of the current `tor-browser` branch
|
|
17
|
+ - **Example**: `tor-browser-115.18.0esr-13.5-1`
|
|
18
|
+- `$(TOR_BROWSER_BRANCH_PREV)`: the full name of the previous `tor-browser` branch
|
|
19
|
+ - **Example**: `tor-browser-115.17.0esr-13.5-1`
|
|
20
|
+</details>
|
|
21
|
+
|
|
22
|
+### **Bookkeeping**
|
|
23
|
+
|
|
24
|
+- [ ] Link this issue to the appropriate [Release Prep](https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/issues/?sort=updated_desc&state=opened&label_name%5B%5D=Release%20Prep) issue.
|
|
25
|
+
|
|
26
|
+### Update Branch Protection Rules
|
|
27
|
+
|
|
28
|
+- [ ] In [Repository Settings](https://gitlab.torproject.org/tpo/applications/tor-browser/-/settings/repository):
|
|
29
|
+ - [ ] Remove previous legacy `base-browser` and `tor-browser` branch protection rules (this will prevent pushing new changes to the branches being rebased)
|
|
30
|
+ - [ ] Create new `base-browser` and `tor-browser` branch protection rule:
|
|
31
|
+ - **Branch**: `*-$(ESR_VERSION)esr-13.5-1*`
|
|
32
|
+ - **Example**: `*-115.18.0esr-13.5-1*`
|
|
33
|
+ - **Allowed to merge**: `Maintainers`
|
|
34
|
+ - **Allowed to push and merge**: `Maintainers`
|
|
35
|
+ - **Allowed to force push**: `false`
|
|
36
|
+
|
|
37
|
+### **Identify the Firefox Tagged Commit and Create New Branches**
|
|
38
|
+
|
|
39
|
+- [ ] Find the Firefox mercurial tag here: https://hg.mozilla.org/releases/mozilla-esr102/tags
|
|
40
|
+ - **Example**: `FIREFOX_115_18_0esr_BUILD1`
|
|
41
|
+- [ ] Find the analogous `gecko-dev` commit: https://github.com/mozilla/gecko-dev
|
|
42
|
+ - **Tip**: Search for unique string (like the Differential Revision ID) found in the mercurial commit in the `gecko-dev/esr115` branch to find the equivalent commit
|
|
43
|
+ - **Example**: `293d490d2e8d9fbb91c76336288f1287cbe285fb`
|
|
44
|
+- [ ] Sign and Tag `gecko-dev` commit
|
|
45
|
+ - Sign/Tag `gecko-dev` commit :
|
|
46
|
+ - **Tag**: `$(ESR_TAG)`
|
|
47
|
+ - **Message**: `Hg tag $(ESR_TAG)`
|
|
48
|
+- [ ] Create new legacy `base-browser` branch from tag
|
|
49
|
+ - Branch name in the form: `base-browser-$(ESR_VERSION)esr-13.5-1`
|
|
50
|
+ - **Example**: `base-browser-115.18.0esr-13.5-1`
|
|
51
|
+- [ ] Create new legacy `tor-browser` branch from
|
|
52
|
+ - Branch name in the form: `tor-browser-$(ESR_VERSION)esr-13.5-1`
|
|
53
|
+ - **Example**: `tor-browser-115.18.0esr-13.5-1`
|
|
54
|
+- [ ] Push new `base-browser` branch to `upstream`
|
|
55
|
+- [ ] Push new `tor-browser` branch to `upstream`
|
|
56
|
+- [ ] Push new `$(ESR_TAG)` to `upstream`
|
|
57
|
+
|
|
58
|
+### **Rebase tor-browser**
|
|
59
|
+
|
|
60
|
+- [ ] Checkout a new local branch for the `tor-browser` rebase
|
|
61
|
+ - **Example**: `git branch tor-browser-rebase FIREFOX_115_18_0esr_BUILD1`
|
|
62
|
+- [ ] **(Optional)** `base-browser` rebase
|
|
63
|
+ - **NOTE** This step may be skipped if the `HEAD` of the previous `base-browser` branch is a `-buildN` tag
|
|
64
|
+ - [ ] Cherry-pick the previous `base-browser` commits up to `base-browser`'s `buildN` tag onto new `base-browser` rebase branch
|
|
65
|
+ - **Example**: `git cherry-pick FIREFOX_115_17_0esr_BUILD1..base-browser-115.17.0esr-13.5-1-build2`
|
|
66
|
+ - [ ] Rebase and autosquash these cherry-picked commits
|
|
67
|
+ - **Example**: `git rebase --autosquash --interactive FIREFOX_115_18_0esr_BUILD1 HEAD`
|
|
68
|
+ - [ ] Cherry-pick remainder of patches after the `buildN` tag
|
|
69
|
+ - **Example**: `git cherry-pick base-browser-115.17.0esr-13.5-1-build21..upstream/base-browser-115.17.0esr-13.5-1`
|
|
70
|
+- [ ] `tor-browser` rebase
|
|
71
|
+ - [ ] Note the current git hash of `HEAD` for `tor-browser` rebase+autosquash step: `git rev-parse HEAD`
|
|
72
|
+ - [ ] Cherry-pick the appropriate previous `tor-browser` branch's commit range up to the last `tor-browser` `buildN` tag
|
|
73
|
+ - **Example**: `git cherry-pick base-browser-115.17.0esr-13.5-1-build1..tor-browser-115.17.0esr-13.5-1-build2
|
|
74
|
+ - **Example (if separate base-browser rebase was skipped)**: `git cherry-pick FIREFOX_115_17_0esr_BUILD1..tor-browser-115.17.0esr-13.5-1-build2`
|
|
75
|
+ - [ ] Rebase and autosquash these newly cherry-picked commits: `git rebase --autosquash --interactive $(PREV_HEAD)`
|
|
76
|
+ - **Example**: `git rebase --autosquash --interactive FIREFOX_115_18_0esr_BUILD1`
|
|
77
|
+ - [ ] Cherry-pick remainder of patches after the last `tor-browser` `buildN` tag
|
|
78
|
+ - **Example**: `git cherry-pick tor-browser-115.17.0esr-13.5-1-build1..upstream/tor-browser-115.17.0esr-13.5-1`
|
|
79
|
+ - [ ] Rebase and autosquash again, this time replacing all `fixup` and `squash` commands with `pick`. The goal here is to have all of the `fixup` and `squash` commits beside the commit which they modify, but kept un-squashed for easy debugging/bisecting.
|
|
80
|
+ - **Example**: `git rebase --autosquash --interactive FIREFOX_115_18_0esr_BUILD1`
|
|
81
|
+- [ ] Compare patch sets to ensure nothing *weird* happened during conflict resolution:
|
|
82
|
+ - [ ] diff of diffs:
|
|
83
|
+ - Do the diff between `current_patchset.diff` and `rebased_patchset.diff` with your preferred difftool and look at differences on lines that starts with + or -
|
|
84
|
+ - `git diff $(ESR_TAG_PREV)..$(BROWSER_BRANCH_PREV) > current_patchset.diff`
|
|
85
|
+ - `git diff $(ESR_TAG)..$(BROWSER_BRANCH) > rebased_patchset.diff`
|
|
86
|
+ - diff `current_patchset.diff` and `rebased_patchset.diff`
|
|
87
|
+ - If everything went correctly, the only lines which should differ should be the lines starting with `index abc123...def456` (unless the previous `base-browser` branch includes changes not included in the previous `tor-browser` branch)
|
|
88
|
+ - [ ] rangediff: `git range-diff $(ESR_TAG_PREV)..$(TOR_BROWSER_BRANCH_PREV) $(ESR_TAG)..HEAD`
|
|
89
|
+ - **Example**: `git range-dif FIREFOX_115_17_0esr_BUILD1..upstream/tor-browser-115.17.0esr-13.5-1 FIREFOX_115_18_0esr_BUILD1..HEAD`
|
|
90
|
+- [ ] Open MR for the `tor-browser` rebase
|
|
91
|
+- [ ] Merge
|
|
92
|
+- Update and push `base-browser` branch
|
|
93
|
+ - [ ] Reset the new `base-browser` branch to the appropriate commit in this new `tor-browser` branch
|
|
94
|
+ - [ ] Push these commits to `upstream`
|
|
95
|
+
|
|
96
|
+### **Sign and Tag**
|
|
97
|
+
|
|
98
|
+- [ ] Sign/Tag `HEAD` of the merged `tor-browser` branch:
|
|
99
|
+ - In **tor-browser.git**, checkout the new legacy `tor-browser` branch
|
|
100
|
+ - In **tor-browser-build.git**, run signing script:
|
|
101
|
+ ```bash
|
|
102
|
+ ./tools/browser/sign-tag.torbrowser legacy build1
|
|
103
|
+ ```
|
|
104
|
+ - [ ] Push tag to `upstream`
|
|
105
|
+- [ ] Sign/Tag HEAD of the merged `base-browser` branch:
|
|
106
|
+ - In **tor-browser.git**, checkout the new legacy `base-browser` branch
|
|
107
|
+ - In **tor-browser-build.git**, run signing script:
|
|
108
|
+ ```bash
|
|
109
|
+ ./tools/browser/sign-tag.basebrowser legacy build1
|
|
110
|
+ ```
|
|
111
|
+ - [ ] Push tag to `upstream` |