Make a new release » History » Version 27
msuraev, 07/12/2017 02:13 PM
1 | 22 | msuraev | {{>toc}} |
---|---|---|---|
2 | |||
3 | 2 | neels | h1. Make a new release |
4 | 1 | neels | |
5 | 13 | msuraev | The efforts to automate the release process are tracked in https://projects.osmocom.org/issues/1861 |
6 | |||
7 | 17 | msuraev | h2. When to make a new release |
8 | 1 | neels | |
9 | 16 | msuraev | Various Osmocom projects depend on others. |
10 | 1 | neels | |
11 | 16 | msuraev | FIXME: following part is disputable and should be fixed |
12 | As soon as a feature is added to one Osmocom project that is needed for another dependent project to compile, we should tag at least a minor-revision bump in the depended-upon project and require it in the depending project's configure.ac. To illustrate, let's look at this example: |
||
13 | |||
14 | 1 | neels | Among others, @openbsc@ depends on the libraries built from @libosmocore@, for example @libosmogsm@. |
15 | As soon as the @libosmogsm@ library gets a new feature used by @openbsc@, like something was added to |
||
16 | @gsm_utils.h@, we shall |
||
17 | 6 | neels | * tag a release in @libosmocore@; say if the previous version was 0.1.2, make it at least 0.1.3. |
18 | 1 | neels | * and in @openbsc@, require @libosmogsm@ >= 0.1.3 in @configure.ac@ |
19 | 16 | msuraev | |
20 | Proposed policy: |
||
21 | * master branch is expected to depend on latest master branches of depended-upon projects |
||
22 | 24 | msuraev | * make release of depended-upon projects if necessary before making non-library project release |
23 | * make sure that we have correct version dependencies before making non-library project release |
||
24 | 1 | neels | |
25 | 25 | msuraev | Alternatively/additionally we can make timely releases (once per XX months? before every OsmoDevCon?) of non-library projects (and corresponding depended-upon libraries) to avoid batching too many changes together and to adhere to RERO better - see http://scalare.org/wp-content/uploads/2015/06/2015-Why-and-HowShould-OpenSource-ProjectsAdopt-Time-Based-Releases.pdf |
26 | 20 | msuraev | |
27 | 17 | msuraev | h2. How to make a new release |
28 | |||
29 | 21 | msuraev | h3. Library release |
30 | |||
31 | 17 | msuraev | Commit changes: |
32 | * cleanup TODO-RELEASE file if not empty, bumping API versions accordingly (see comments in TODO-RELEASE) |
||
33 | * update debian/changelog using @gbp dch --debian-tag='%(version)s' --auto@ command |
||
34 | 21 | msuraev | |
35 | h3. Non-library release |
||
36 | 17 | msuraev | |
37 | TODO: more detailed description of necessary release steps: |
||
38 | 19 | msuraev | create, sign, publish tarball, pushing via gerrit etc. |
39 | 17 | msuraev | |
40 | 18 | msuraev | h3. How to tag a new release |
41 | 1 | neels | |
42 | The revision to tag must be merged to the public, upstream @master@ branch. |
||
43 | |||
44 | Find out the git hash for the revision you want to tag. |
||
45 | |||
46 | 3 | neels | Find out the next open version number. Take care: look at *all* of these: |
47 | 1 | neels | * @git tag -l@ |
48 | * debian/changelog |
||
49 | For example, the changelog may contain versions that were forgotten to be tagged. |
||
50 | |||
51 | 3 | neels | Now, make a GPG-signed tag of that git hash with the next open version number. |
52 | 1 | neels | |
53 | 3 | neels | Say, for example, the git hash is @012342abcdefg@ and the next open version is 0.1.3: |
54 | 1 | neels | <pre> |
55 | 9 | neels | git tag -s 0.1.3 012342abcdefg -m "release 0.1.3" |
56 | 1 | neels | </pre> |
57 | |||
58 | 8 | neels | (If @gpg@ complains, see [[Make a new release#GPG-Have-a-matching-user-id|GPG: Have a matching user id]].) |
59 | 1 | neels | |
60 | 4 | neels | Verify that git picks up the new version tag: |
61 | 1 | neels | <pre> |
62 | $ git describe |
||
63 | 0.1.3-3-g1f95179 |
||
64 | </pre> |
||
65 | |||
66 | 11 | neels | *For your local build, _nothing will change_ until you delete the @.version@ file |
67 | and completely rebuild:* |
||
68 | |||
69 | 1 | neels | <pre> |
70 | rm .version |
||
71 | 10 | neels | autoreconf -fi |
72 | ./configure |
||
73 | 1 | neels | make |
74 | cat .version |
||
75 | </pre> |
||
76 | |||
77 | This should show the same as @git describe@. |
||
78 | |||
79 | When you're convinced that all is in order, push the new tag: |
||
80 | |||
81 | <pre> |
||
82 | git push origin 0.1.3 |
||
83 | </pre> |
||
84 | |||
85 | 14 | neels | If anything went wrong, you can delete the tag (locally) by |
86 | 1 | neels | <pre> |
87 | 15 | msuraev | git tag -d 0.1.3 |
88 | 14 | neels | </pre> |
89 | and, if you've already pushed it, by |
||
90 | <pre> |
||
91 | git push --delete origin 0.1.3 |
||
92 | </pre> |
||
93 | 1 | neels | |
94 | 26 | msuraev | h2. Deprecation policy |
95 | |||
96 | 27 | msuraev | Functions/interfaces marked as deprecated for X releases of type Y can be removed in next Z release. |
97 | 26 | msuraev | |
98 | 27 | msuraev | TBD: what's appropriate value for X? which Y and Z (from major/minor/patch) should we use? |
99 | 26 | msuraev | |
100 | 1 | neels | h2. GPG: Have a matching user id |
101 | |||
102 | By default, @git tag -s@ takes your author information to lookup the secret GPG key to sign a tag with. |
||
103 | If the author+email do not exactly match one of the key's @uid@s, you will get this error: |
||
104 | |||
105 | <pre> |
||
106 | gpg: signing failed: secret key not available |
||
107 | </pre> |
||
108 | |||
109 | Verify: say, your author+email info in your git config says "John Doe <john@doe.net>", try |
||
110 | <pre> |
||
111 | gpg --list-secret-keys "John Doe <john@doe.net>" |
||
112 | </pre> |
||
113 | If this fails, GPG won't find the right key automatically. |
||
114 | |||
115 | Ways to resolve: |
||
116 | |||
117 | * Use @git tag -u <key-id>@ |
||
118 | * Edit your secret key to add a uid that matches your author information |
||
119 | <pre> |
||
120 | gpg --edit-key john@doe.net |
||
121 | gpg> adduid |
||
122 | # enter details to match the git author |
||
123 | gpg> save |
||
124 | </pre> |