blob: 93a0f3e0c486d6d92ed244885ecd853ab652db29 [file] [log] [blame] [view]
Mike Frysingera26c49e2018-12-12 03:34:28 -05001# repo release process
2
3This is the process for creating a new release of repo, as well as all the
4related topics and flows.
5
6[TOC]
7
8## Launcher script
9
10The main repo script serves as a standalone program and is often referred to as
11the "launcher script".
12This makes it easy to copy around and install as you don't have to install any
13other files from the git repo.
14
15Whenever major changes are made to the launcher script, you should increment the
16`VERSION` variable in the launcher itself.
17At runtime, repo will check this to see if it needs to be updated (and notify
18the user automatically).
19
20## Key management
21
22Every release has a git tag that is signed with a key that repo recognizes.
23Those keys are hardcoded inside of the repo launcher itself -- look for the
24`KEYRING_VERSION` and `MAINTAINER_KEYS` settings.
25
26Adding new keys to the repo launcher will allow tags to be recognized by new
27keys, but only people using that updated version will be able to.
28Since the majority of users will be using an official launcher version, their
29version will simply ignore any new signed tags.
30
31If you want to add new keys, it's best to register them long ahead of time,
32and then wait for that updated launcher to make its way out to everyone.
33Even then, there will be a long tail of users with outdated launchers, so be
34prepared for people asking questions.
35
36### Registering a new key
37
38The process of actually adding a new key is quite simple.
39
401. Add the public half of the key to `MAINTAINER_KEYS`.
412. Increment `KEYRING_VERSION` so repo knows it needs to update.
423. Wait a long time after that version is in a release (~months) before trying
43 to create a new release using those new keys.
44
45## Self update algorithm
46
47When creating a new repo checkout with `repo init`, there are a few options that
48control how repo finds updates:
49
50* `--repo-url`: This tells repo where to clone the full repo project itself.
51 It defaults to the official project (`REPO_URL` in the launcher script).
Mike Frysinger58ac1672020-03-14 14:35:26 -040052* `--repo-rev`: This tells repo which branch to use for the full project.
Mike Frysingera26c49e2018-12-12 03:34:28 -050053 It defaults to the `stable` branch (`REPO_REV` in the launcher script).
54
55Whenever `repo sync` is run, repo will check to see if an update is available.
Mike Frysinger58ac1672020-03-14 14:35:26 -040056It fetches the latest repo-rev from the repo-url.
Mike Frysingera26c49e2018-12-12 03:34:28 -050057Then it verifies that the latest commit in the branch has a valid signed tag
58using `git tag -v` (which uses gpg).
59If the tag is valid, then repo will update its internal checkout to it.
60
61If the latest commit doesn't have a signed tag, repo will fall back to the
62most recent tag it can find (via `git describe`).
63If that tag is valid, then repo will warn and use that commit instead.
64
65If that tag cannot be verified, it gives up and forces the user to resolve.
66
67## Branch management
68
69All development happens on the `master` branch and should generally be stable.
70
71Since the repo launcher defaults to tracking the `stable` branch, it is not
72normally updated until a new release is available.
73If something goes wrong with a new release, an older release can be force pushed
74and clients will automatically downgrade.
75
76The `maint` branch is used to track the previous major release of repo.
77It is not normally meant to be used by people as `stable` should be good enough.
78Once a new major release is pushed to the `stable` branch, then the previous
79major release can be pushed to `maint`.
80For example, when `stable` moves from `v1.10.x` to `v1.11.x`, then the `maint`
81branch will be updated from `v1.9.x` to `v1.10.x`.
82
83We don't have parallel release branches/series.
84Typically all tags are made against the `master` branch and then pushed to the
85`stable` branch to make it available to the rest of the world.
86Since repo doesn't typically see a lot of changes, this tends to be OK.
87
88## Creating a new release
89
90When you want to create a new release, you'll need to select a good version and
91create a signed tag using a key registered in repo itself.
92Typically we just tag the latest version of the `master` branch.
93The tag could be pushed now, but it won't be used by clients normally (since the
Mike Frysinger58ac1672020-03-14 14:35:26 -040094default `repo-rev` setting is `stable`).
Mike Frysingera26c49e2018-12-12 03:34:28 -050095This would allow some early testing on systems who explicitly select `master`.
96
97### Creating a signed tag
98
99Lets assume your keys live in a dedicated directory, e.g. `~/.gnupg/repo/`.
100
101*** note
102If you need access to the official keys, check out the internal documentation
103at [go/repo-release].
104Note that only official maintainers of repo will have access as it describes
105internal processes for accessing the restricted keys.
106***
107
108```sh
109# Set the gpg key directory.
110$ export GNUPGHOME=~/.gnupg/repo/
111
112# Verify the listed key is “Repo Maintainer”.
113$ gpg -K
114
115# Pick whatever branch or commit you want to tag.
116$ r=master
117
118# Pick the new version.
119$ t=1.12.10
120
121# Create the signed tag.
122$ git tag -s v$t -u "Repo Maintainer <[email protected]>" -m "repo $t" $r
123
124# Verify the signed tag.
125$ git show v$t
126```
127
128### Push the new release
129
130Once you're ready to make the release available to everyone, push it to the
131`stable` branch.
132
133Make sure you never push the tag itself to the stable branch!
134Only push the commit -- notice the use of `$t` and `$r` below.
135
136```sh
137$ git push https://gerrit-review.googlesource.com/git-repo v$t
138$ git push https://gerrit-review.googlesource.com/git-repo $r:stable
139```
140
141If something goes horribly wrong, you can force push the previous version to the
142`stable` branch and people should automatically recover.
143Again, make sure you never push the tag itself!
144
145```sh
146$ oldrev="whatever-old-commit"
147$ git push https://gerrit-review.googlesource.com/git-repo $oldrev:stable --force
148```
149
150### Announce the release
151
152Once you do push a new release to `stable`, make sure to announce it on the
153[repo-discuss@googlegroups.com] group.
154Here is an [example announcement].
155
156You can create a short changelog using the command:
157
158```sh
159# If you haven't pushed to the stable branch yet, you can use origin/stable.
160# If you have pushed, change origin/stable to the previous release tag.
161$ git log --format="%h (%aN) %s" --no-merges origin/stable..$r
162```
163
Mike Frysinger3645bd22020-02-11 18:43:34 -0500164## Project References
Mike Frysingera26c49e2018-12-12 03:34:28 -0500165
Mike Frysinger3645bd22020-02-11 18:43:34 -0500166Here's a table showing the relationship of major tools, their EOL dates, and
167their status in Ubuntu & Debian.
168Those distros tend to be good indicators of how long we need to support things.
169
170Things in bold indicate stuff to take note of, but does not guarantee that we
171still support them.
172Things in italics are things we used to care about but probably don't anymore.
173
174| Date | EOL | [Git][rel-g] | [Python][rel-p] | [Ubuntu][rel-u] / [Debian][rel-d] | Git | Python |
175|:--------:|:------------:|--------------|-----------------|-----------------------------------|-----|--------|
176| Oct 2008 | *Oct 2013* | | 2.6.0 | *10.04 Lucid* - 10.10 Maverick / *Squeeze* |
177| Dec 2008 | *Feb 2009* | | 3.0.0 |
178| Feb 2009 | *Mar 2012* | | | Debian 5 Lenny | 1.5.6.5 | 2.5.2 |
179| Jun 2009 | *Jun 2016* | | 3.1.0 | *10.04 Lucid* - 10.10 Maverick / *Squeeze* |
180| Feb 2010 | *Oct 2012* | 1.7.0 | | *10.04 Lucid* - *12.04 Precise* - 12.10 Quantal |
181| Apr 2010 | *Apr 2015* | | | *10.04 Lucid* | 1.7.0.4 | 2.6.5 3.1.2 |
182| Jul 2010 | *Dec 2019* | | **2.7.0** | 11.04 Natty - **<current>** |
183| Oct 2010 | | | | 10.10 Maverick | 1.7.1 | 2.6.6 3.1.3 |
184| Feb 2011 | *Feb 2016* | | | Debian 6 Squeeze | 1.7.2.5 | 2.6.6 3.1.3 |
185| Apr 2011 | | | | 11.04 Natty | 1.7.4 | 2.7.1 3.2.0 |
186| Oct 2011 | *Feb 2016* | | 3.2.0 | 11.04 Natty - 12.10 Quantal |
187| Oct 2011 | | | | 11.10 Ocelot | 1.7.5.4 | 2.7.2 3.2.2 |
188| Apr 2012 | *Apr 2019* | | | *12.04 Precise* | 1.7.9.5 | 2.7.3 3.2.3 |
189| Sep 2012 | *Sep 2017* | | 3.3.0 | 13.04 Raring - 13.10 Saucy |
190| Oct 2012 | *Dec 2014* | 1.8.0 | | 13.04 Raring - 13.10 Saucy |
191| Oct 2012 | | | | 12.10 Quantal | 1.7.10.4 | 2.7.3 3.2.3 |
192| Apr 2013 | | | | 13.04 Raring | 1.8.1.2 | 2.7.4 3.3.1 |
193| May 2013 | *May 2018* | | | Debian 7 Wheezy | 1.7.10.4 | 2.7.3 3.2.3 |
194| Oct 2013 | | | | 13.10 Saucy | 1.8.3.2 | 2.7.5 3.3.2 |
195| Feb 2014 | *Dec 2014* | **1.9.0** | | **14.04 Trusty** |
196| Mar 2014 | *Mar 2019* | | **3.4.0** | **14.04 Trusty** - 15.10 Wily / **Jessie** |
197| Apr 2014 | **Apr 2022** | | | **14.04 Trusty** | 1.9.1 | 2.7.5 3.4.0 |
198| May 2014 | *Dec 2014* | 2.0.0 |
199| Aug 2014 | *Dec 2014* | **2.1.0** | | 14.10 Utopic - 15.04 Vivid / **Jessie** |
200| Oct 2014 | | | | 14.10 Utopic | 2.1.0 | 2.7.8 3.4.2 |
201| Nov 2014 | *Sep 2015* | 2.2.0 |
202| Feb 2015 | *Sep 2015* | 2.3.0 |
203| Apr 2015 | *May 2017* | 2.4.0 |
204| Apr 2015 | **Jun 2020** | | | **Debian 8 Jessie** | 2.1.4 | 2.7.9 3.4.2 |
205| Apr 2015 | | | | 15.04 Vivid | 2.1.4 | 2.7.9 3.4.3 |
206| Jul 2015 | *May 2017* | 2.5.0 | | 15.10 Wily |
207| Sep 2015 | *May 2017* | 2.6.0 |
208| Sep 2015 | **Sep 2020** | | **3.5.0** | **16.04 Xenial** - 17.04 Zesty / **Stretch** |
209| Oct 2015 | | | | 15.10 Wily | 2.5.0 | 2.7.9 3.4.3 |
210| Jan 2016 | *Jul 2017* | **2.7.0** | | **16.04 Xenial** |
211| Mar 2016 | *Jul 2017* | 2.8.0 |
212| Apr 2016 | **Apr 2024** | | | **16.04 Xenial** | 2.7.4 | 2.7.11 3.5.1 |
213| Jun 2016 | *Jul 2017* | 2.9.0 | | 16.10 Yakkety |
214| Sep 2016 | *Sep 2017* | 2.10.0 |
215| Oct 2016 | | | | 16.10 Yakkety | 2.9.3 | 2.7.11 3.5.1 |
216| Nov 2016 | *Sep 2017* | **2.11.0** | | 17.04 Zesty / **Stretch** |
217| Dec 2016 | **Dec 2021** | | **3.6.0** | 17.10 Artful - **18.04 Bionic** - 18.10 Cosmic |
218| Feb 2017 | *Sep 2017* | 2.12.0 |
219| Apr 2017 | | | | 17.04 Zesty | 2.11.0 | 2.7.13 3.5.3 |
220| May 2017 | *May 2018* | 2.13.0 |
221| Jun 2017 | **Jun 2022** | | | **Debian 9 Stretch** | 2.11.0 | 2.7.13 3.5.3 |
222| Aug 2017 | *Dec 2019* | 2.14.0 | | 17.10 Artful |
223| Oct 2017 | *Dec 2019* | 2.15.0 |
224| Oct 2017 | | | | 17.10 Artful | 2.14.1 | 2.7.14 3.6.3 |
225| Jan 2018 | *Dec 2019* | 2.16.0 |
226| Apr 2018 | *Dec 2019* | 2.17.0 | | **18.04 Bionic** |
227| Apr 2018 | **Apr 2028** | | | **18.04 Bionic** | 2.17.0 | 2.7.15 3.6.5 |
228| Jun 2018 | *Dec 2019* | 2.18.0 |
229| Jun 2018 | **Jun 2023** | | 3.7.0 | 19.04 Disco - **20.04 Focal** / **Buster** |
230| Sep 2018 | *Dec 2019* | 2.19.0 | | 18.10 Cosmic |
231| Oct 2018 | | | | 18.10 Cosmic | 2.19.1 | 2.7.15 3.6.6 |
232| Dec 2018 | *Dec 2019* | **2.20.0** | | 19.04 Disco / **Buster** |
233| Feb 2019 | *Dec 2019* | 2.21.0 |
234| Apr 2019 | | | | 19.04 Disco | 2.20.1 | 2.7.16 3.7.3 |
235| Jun 2019 | | 2.22.0 |
236| Jul 2019 | **Jul 2024** | | | **Debian 10 Buster** | 2.20.1 | 2.7.16 3.7.3 |
237| Aug 2019 | | 2.23.0 |
238| Oct 2019 | **Oct 2024** | | 3.8.0 |
239| Oct 2019 | | | | 19.10 Eoan | 2.20.1 | 2.7.17 3.7.5 |
240| Nov 2019 | | 2.24.0 |
241| Jan 2020 | | 2.25.0 | | **20.04 Focal** |
242| Apr 2020 | **Apr 2030** | | | **20.04 Focal** | 2.25.0 | 2.7.17 3.7.5 |
243
244
245[rel-d]: https://en.wikipedia.org/wiki/Debian_version_history
246[rel-g]: https://en.wikipedia.org/wiki/Git#Releases
247[rel-p]: https://en.wikipedia.org/wiki/History_of_Python#Table_of_versions
248[rel-u]: https://en.wikipedia.org/wiki/Ubuntu_version_history#Table_of_versions
Mike Frysingera26c49e2018-12-12 03:34:28 -0500249[example announcement]: https://groups.google.com/d/topic/repo-discuss/UGBNismWo1M/discussion
250[repo-discuss@googlegroups.com]: https://groups.google.com/forum/#!forum/repo-discuss
251[go/repo-release]: https://goto.google.com/repo-release