Project

General

Profile

Make a new release » History » Version 19

msuraev, 07/05/2017 04:25 PM

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 17 msuraev
h2. How to make a new release
24
25
Commit changes:
26
* cleanup TODO-RELEASE file if not empty, bumping API versions accordingly (see comments in TODO-RELEASE)
27
* update debian/changelog using @gbp dch --debian-tag='%(version)s' --auto@ command
28
29
TODO: more detailed description of necessary release steps:
30 19 msuraev
create, sign, publish tarball, pushing via gerrit etc.
31 17 msuraev
32 18 msuraev
h3. How to tag a new release
33 1 neels
34
The revision to tag must be merged to the public, upstream @master@ branch.
35
36
Find out the git hash for the revision you want to tag.
37
38 3 neels
Find out the next open version number. Take care: look at *all* of these:
39 1 neels
* @git tag -l@
40
* debian/changelog
41
For example, the changelog may contain versions that were forgotten to be tagged.
42
43 3 neels
Now, make a GPG-signed tag of that git hash with the next open version number.
44 1 neels
45 3 neels
Say, for example, the git hash is @012342abcdefg@ and the next open version is 0.1.3:
46 1 neels
<pre>
47 9 neels
git tag -s 0.1.3 012342abcdefg -m "release 0.1.3"
48 1 neels
</pre>
49
50 8 neels
(If @gpg@ complains, see [[Make a new release#GPG-Have-a-matching-user-id|GPG: Have a matching user id]].)
51 1 neels
52 4 neels
Verify that git picks up the new version tag:
53 1 neels
<pre>
54
$ git describe
55
0.1.3-3-g1f95179
56
</pre>
57
58 11 neels
*For your local build, _nothing will change_ until you delete the @.version@ file
59
and completely rebuild:*
60
61 1 neels
<pre>
62
rm .version
63 10 neels
autoreconf -fi
64
./configure
65 1 neels
make
66
cat .version
67
</pre>
68
69
This should show the same as @git describe@.
70
71
When you're convinced that all is in order, push the new tag:
72
73
<pre>
74
git push origin 0.1.3
75
</pre>
76
77 14 neels
If anything went wrong, you can delete the tag (locally) by
78 1 neels
<pre>
79 15 msuraev
git tag -d 0.1.3
80 14 neels
</pre>
81
and, if you've already pushed it, by
82
<pre>
83
git push --delete origin 0.1.3
84
</pre>
85 1 neels
86
h2. GPG: Have a matching user id
87
88
By default, @git tag -s@ takes your author information to lookup the secret GPG key to sign a tag with.
89
If the author+email do not exactly match one of the key's @uid@s, you will get this error:
90
91
<pre>
92
gpg: signing failed: secret key not available
93
</pre>
94
95
Verify: say, your author+email info in your git config says "John Doe <john@doe.net>", try
96
<pre>
97
gpg --list-secret-keys "John Doe <john@doe.net>"
98
</pre>
99
If this fails, GPG won't find the right key automatically.
100
101
Ways to resolve:
102
103
* Use @git tag -u <key-id>@
104
* Edit your secret key to add a uid that matches your author information
105
<pre>
106
gpg --edit-key john@doe.net
107
gpg> adduid
108
# enter details to match the git author
109
gpg> save
110
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)