Browse code

use explicit placeholders

Christoph Groth authored on 10/01/2018 13:59:39 • Joseph Weston committed on 26/02/2018 16:02:43
Showing 1 changed files
... ...
@@ -86,10 +86,10 @@ described here.
86 86
 
87 87
 Make an *annotated*, *signed* tag for the release. The tag must have the name::
88 88
 
89
-    git tag -s v1.2.3 -m "version 1.2.3"
89
+    git tag -s v<version> -m "version <version>"
90 90
 
91
-Be sure to respect the format of the tag name (leading "v").  The tag message
92
-format is the one that has been used so far.
91
+Be sure to respect the format of the tag name (leading "v", e.g. "v1.2.3").
92
+The tag message format is the one that has been used so far.
93 93
 
94 94
 Do *not* yet push the tag anywhere, it might have to be undone!
95 95
 
... ...
@@ -99,12 +99,12 @@ Build a source taball and inspect it
99 99
 
100 100
     ./setup.py sdist
101 101
 
102
-This creates the file dist/kwant-1.2.3.tar.gz.  It is a good idea to unpack it
102
+This creates the file dist/kwant-<version>.tar.gz.  It is a good idea to unpack it
103 103
 in /tmp and inspect that builds in isolation and that the tests run::
104 104
 
105 105
     cd /tmp
106
-    tar xzf ~/src/kwant/dist/kwant-1.2.3.tar.gz
107
-    cd kwant-1.2.3
106
+    tar xzf ~/src/kwant/dist/kwant-<version>.tar.gz
107
+    cd kwant-<version>
108 108
     ./setup.py test
109 109
 
110 110
 
... ...
@@ -169,7 +169,7 @@ Now it is time to import the new source code.  There are two options.  If, as
169 169
 recommended above, the tarball of the new version has not been made public yet,
170 170
 it must be imported as follows::
171 171
 
172
-    gbp import-orig ~/src/kwant/dist/kwant-1.2.3.tar.gz
172
+    gbp import-orig ~/src/kwant/dist/kwant-<version>.tar.gz
173 173
 
174 174
 Alternatively, the following commands will import the newest version from PyPI::
175 175
 
... ...
@@ -196,7 +196,7 @@ When all changes are commited, it is time to finalize by updating the Debian
196 196
 changelog file.  Add a point "New upstream release" if there was one, and
197 197
 describe any other changes to the Debian *packaging*::
198 198
 
199
-    DEBEMAIL=your.email@somewhere.org gbp dch -R --commit --distribution testing
199
+    DEBEMAIL=<your-email> gbp dch -R --commit --distribution testing
200 200
 
201 201
 Now verify that the package builds with::
202 202
 
... ...
@@ -232,11 +232,11 @@ and
232 232
 
233 233
     user     ALL = SETENV: BUILD
234 234
 
235
-Now create pbuilder images.  In the following, replace "buster" by the current
236
-Debian testing codename::
235
+Now create pbuilder images.  In the following, replace ``<dist>`` by the
236
+current Debian testing codename, e.g. "buster"::
237 237
 
238
-    ARCH=i386 DIST=buster git-pbuilder create
239
-    ARCH=amd64 DIST=buster git-pbuilder create
238
+    ARCH=i386 DIST=<dist> git-pbuilder create
239
+    ARCH=amd64 DIST=<dist> git-pbuilder create
240 240
 
241 241
 If the packages to be built have special dependencies, use the trick described in https://wiki.debian.org/git-pbuilder#Using_Local_Packages
242 242
 
... ...
@@ -244,19 +244,19 @@ If the packages to be built have special dependencies, use the trick described i
244 244
 Build Kwant packages using git-pbuilder
245 245
 ---------------------------------------
246 246
 
247
-Update the builder environment (again, replace "buster" with the name of the
247
+Update the builder environment (again, replace ``<dist>`` with the name of the
248 248
 current Debian testing)::
249 249
 
250
-    ARCH=i386 DIST=buster git-pbuilder update
251
-    ARCH=amd64 DIST=buster git-pbuilder update
250
+    ARCH=i386 DIST=<dist> git-pbuilder update
251
+    ARCH=amd64 DIST=<dist> git-pbuilder update
252 252
 
253 253
 Now build the packages.  First the i386 package.  The option "--git-tag" tags
254 254
 and signs the tag if the build is successful.  In a second step, the package is
255 255
 built for amd64, but only the architecture-dependent files (not the
256 256
 documentation package)::
257 257
 
258
-    gbp buildpackage --git-pbuilder --git-arch=i386 --git-dist=buster --git-tag
259
-    gbp buildpackage --git-pbuilder --git-arch=amd64 --git-dist=buster --git-pbuilder-options='--binary-arch'
258
+    gbp buildpackage --git-pbuilder --git-arch=i386 --git-dist=<dist> --git-tag
259
+    gbp buildpackage --git-pbuilder --git-arch=amd64 --git-dist=<dist> --git-pbuilder-options='--binary-arch'
260 260
 
261 261
 Another example: build source package only::
262 262
 
... ...
@@ -267,12 +267,15 @@ Build packports for the current Debian stable
267 267
 
268 268
 Create a changelog entry for the backport::
269 269
 
270
-    DEBEMAIL=your.email@somewhere.org dch --bpo
270
+    DEBEMAIL=<your-email> dch --bpo
271
+
272
+As shown above, run ``git-pbuilder update`` for the appropriate distribution
273
+codename.
271 274
 
272 275
 Build backported packages::
273 276
 
274
-    gbp buildpackage --git-pbuilder --git-ignore-new --git-arch=i386 --git-dist=stretch
275
-    gbp buildpackage --git-pbuilder --git-ignore-new --git-arch=amd64 --git-dist=stretch --git-pbuilder-options='--binary-arch'
277
+    gbp buildpackage --git-pbuilder --git-ignore-new --git-arch=i386 --git-dist=<dist>
278
+    gbp buildpackage --git-pbuilder --git-ignore-new --git-arch=amd64 --git-dist=<dist> --git-pbuilder-options='--binary-arch'
276 279
 
277 280
 Do not commit anything.
278 281
 
... ...
@@ -288,14 +291,14 @@ git
288 291
 
289 292
 Push the tag to the official Kwant repository::
290 293
 
291
-    git push origin v1.2.3
294
+    git push origin v<version>
292 295
 
293 296
 PyPI
294 297
 ----
295 298
 
296 299
 PyPI (this requires a file ~/.pypirc with a vaild username and password)::
297 300
 
298
-    twine upload -s dist/kwant-1.2.3.tar.gz
301
+    twine upload -s dist/kwant-<version>.tar.gz
299 302
 
300 303
 It is very important that the tarball uploaded here is the same (bit-by-bit,
301 304
 not only the contents) as the one used for the Debian packaging.  Otherwise it
... ...
@@ -308,7 +311,7 @@ Kwant website
308 311
 The tarball and its signature (generated by the twine command above) should be
309 312
 also made available on the website::
310 313
 
311
-    scp dist/kwant-1.2.3.tar.gz* kwant-website-downloads:downloads/kwant
314
+    scp dist/kwant-<version>.tar.gz* kwant-website-downloads:downloads/kwant
312 315
 
313 316
 Debian packages
314 317
 ---------------
... ...
@@ -323,7 +326,8 @@ version of this repository is kept on Christoph Groth's machine, so this
323 326
 instructions are for reference only.
324 327
 
325 328
 Go to the reprepro repository directory and verify that the configuration file
326
-"conf/distributions" looks up-to-date.  It should look something like this::
329
+"conf/distributions" looks up-to-date.  It should look something like this (be
330
+sure to update the codenames and the versions)::
327 331
 
328 332
     Origin: Kwant project
329 333
     Suite: stretch-backports
... ...
@@ -345,15 +349,17 @@ Go to the reprepro repository directory and verify that the configuration file
345 349
 
346 350
 If the config had to be updated execute::
347 351
 
352
+    reprepro --delete clearvanished
348 353
     reprepro export
349 354
     reprepro --delete createsymlinks
350 355
 
351 356
 Now the source and binary Debian packages can be added.  The last line has to
352 357
 be executed for all the .deb files and may be automated with a shell loop. (Be
353
-sure to use the appropriate <dist>: either testing or stretch-backports.)::
358
+sure to use the appropriate <dist>: for the above configuratoin file either
359
+"testing" or "stretch-backports".)::
354 360
 
355
-    reprepro includedsc <dist> ../../src/kwant_1.2.3-1.dsc
356
-    reprepro includedeb <dist> python3-kwant_1.2.3-1_amd64.deb
361
+    reprepro includedsc <dist> ../../src/kwant_<version>-1.dsc
362
+    reprepro includedeb <dist> python3-kwant_<version>-1_amd64.deb
357 363
 
358 364
 Once all the packages have been added, upload the repository::
359 365
 
... ...
@@ -362,6 +368,9 @@ Once all the packages have been added, upload the repository::
362 368
 Ubuntu packages
363 369
 ---------------
364 370
 
371
+Packages for Ubuntu are provided as a PPA (Personal Package Archive):
372
+https://launchpad.net/~kwant-project/+archive/ubuntu/ppa
373
+
365 374
 Make sure ~/.dput.cf has something like this::
366 375
     [ubuntu-ppa-kwant]
367 376
     fqdn = ppa.launchpad.net
... ...
@@ -392,10 +401,13 @@ We will also use the following script (prepare_ppa_upload)::
392 401
 
393 402
 Make sure that the Debian package builds correctly and go to its directory.
394 403
 
395
-Check https://wiki.ubuntu.com/Releases for the current releases and execute::
396
-    prepare_ppa_upload trusty vivid wily
404
+Check https://wiki.ubuntu.com/Releases for the relevant releases (we want to
405
+provide packages at least for the current LTS release and the newer non-LTS
406
+releases) and execute::
407
+
408
+    prepare_ppa_upload <dist0> <dist1> <dist2>
397 409
 
398
-(if a second upload of the same Debian version is needed, something like vivid2 can be used)
410
+(if a second upload of the same Debian version is needed, something like "vivid2" instead of "vivid" can be used.)
399 411
 
400 412
 Now the changes files are "put" to start the build process on the PPA servers::
401 413