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