Browse code

minor corrections, explain quilt patches, mention AUTHORS.rst

Christoph Groth authored on 05/01/2018 13:14:14 • Joseph Weston committed on 26/02/2018 16:02:43
Showing 1 changed files
... ...
@@ -40,17 +40,29 @@ Check that there are no glaring deficiencies.
40 40
 Update the ``whatsnew`` file
41 41
 ----------------------------
42 42
 
43
-Check that there is an appropriate ``whatsnew`` file in ``doc/source/pre/whatsnew``.
44
-This should be named as::
43
+For each new mior release, check that there is an appropriate ``whatsnew`` file
44
+in ``doc/source/pre/whatsnew``.  This should be named as::
45 45
 
46
-    <major>.<minor>.<patch>.rst
46
+    <major>.<minor>.rst
47 47
 
48
-and should contain a list of the user-facing changes that were made in the
49
-release. With any luck this file will have been updated after any major
50
-features were released, if not then you can see what commits were introduced
51
-since the last release using ``git log``. You can also see what issues were
52
-assigned to the release's milestons and get an idea of what was introduced
53
-from there.
48
+and referenced from ``doc/source/pre/whatsnew/index.rst``.  It should contain a
49
+list of the user-facing changes that were made in the release. With any luck
50
+this file will have been updated after any major features were released, if not
51
+then you can see what commits were introduced since the last release using
52
+``git log``. You can also see what issues were assigned to the release's
53
+milestons and get an idea of what was introduced from there.
54
+
55
+Starting with Kwant 1.4, we also mention user-visible changes in bugfix
56
+releases in the whatsnew files.
57
+
58
+
59
+Verify that ``AUTHORS.rst`` is up-to-date
60
+-----------------------------------------
61
+
62
+The following command shows the number of commits per author since the last
63
+annotated tag::
64
+
65
+    t=$(git describe --abbrev=0); echo Commits since $t; git shortlog -s $t..
54 66
 
55 67
 
56 68
 Make a release, but do not publish it yet
... ...
@@ -133,12 +145,29 @@ show correct information.
133 145
 Release a new version of the Kwant Debian package
134 146
 -------------------------------------------------
135 147
 
136
-Fetch the git tag created above into the packaging repo::
148
+Fetch packaging work (from origin) and the git tag created above (from
149
+upstream_repo) into the packaging repo::
137 150
 
138 151
     git fetch --all
139 152
 
140
-Now there are two options.  If, as recommended above, the tarball of the new
141
-version has not been made public yet, it must be imported as follows::
153
+Make sure that the branches ``master`` and ``upstream`` are up-to-date::
154
+
155
+    git checkout upstream
156
+    git merge --ff-only origin/upstream
157
+    git checkout master
158
+    git merge --ff-only origin/master
159
+
160
+Debian packages may include "quilt" patches that are applied on top of the
161
+pristine tarball.  The tool `gbp pq` manages these patches as a git branch
162
+``patch-queue/master.  Execute the following commands to (re)create
163
+that branch based on the patches in ``debian/patches``::
164
+
165
+    gbp pq --force import
166
+    gbp checkout master
167
+
168
+Now it is time to import the new source code.  There are two options.  If, as
169
+recommended above, the tarball of the new version has not been made public yet,
170
+it must be imported as follows::
142 171
 
143 172
     gbp import-orig ~/src/kwant/dist/kwant-1.2.3.tar.gz
144 173
 
... ...
@@ -147,18 +176,39 @@ Alternatively, the following commands will import the newest version from PyPI::
147 176
     uscan --report      # This will report if a newer version exists on PyPI
148 177
     gbp import-orig --uscan
149 178
 
150
-Update the debian changelog.  Add a point "New upstream release" if there was
151
-one, and describe any other changes to the Debian *packaging*::
179
+Now it is time to review the patch queue.  Rebase and checkout the ``patch-queue/master`` branch using
180
+
181
+    gbp pq rebase
182
+
183
+As ususal, the rebase might require manual intervention.  Once done, review all
184
+the commits of the ``patch-queue/master`` branch.  Are all patches still
185
+needed, should any be removed?  When done (even if no changes were needed), recreate the files in ``debian/patches`` using::
186
+
187
+    gbp pq export
188
+
189
+If ``git diff`` reports any changes, be sure to commit them.
190
+
191
+Now is the right moment to verify and modify the packaging information inside
192
+the ``debian/`` directory.  For example, are the dependencies and versions
193
+stated in ``debian/control`` up-to-date?
194
+
195
+When all changes are commited, it is time to finalize by updating the Debian
196
+changelog file.  Add a point "New upstream release" if there was one, and
197
+describe any other changes to the Debian *packaging*::
152 198
 
153 199
     DEBEMAIL=your.email@somewhere.org gbp dch -R --commit --distribution testing
154 200
 
155
-Now the package can be built with::
201
+Now verify that the package builds with::
156 202
 
157 203
     git clean -i
158 204
     gbp buildpackage
159 205
 
160
-But this is *not* how the package should be built for distribution.  For that,
161
-see the following two sections.
206
+This is *not* how the package should be built for distribution.  For that, see
207
+the following two sections.
208
+
209
+If problems surface that require changing the packaging, undo the changelog
210
+commit, modify the packaging, and re-iterate.  If the problems require fixing
211
+Kwant, you will have to go back all the way to recreating the source tarball.  If the version to be packaged has been released publicly already, this will require a new bugfix version.
162 212
 
163 213
 
164 214
 Setup git-pbuilder to build Debian packages
... ...
@@ -263,9 +313,9 @@ also made available on the website::
263 313
 Debian packages
264 314
 ---------------
265 315
 
266
-Go to the Debian packaging repository and push out everything::
316
+Go to the Debian packaging repository and push out the changes::
267 317
 
268
-    git push --all --tags origin
318
+    git push --tags origin master upstream
269 319
 
270 320
 Now the Debian packages that we built previously need to be added to the
271 321
 repository of Debian packages on the Kwant website.  So far this the full