Skip to content

Commit f2d97fb

Browse files
Update Debian package release steps (#1685)
Co-authored-by: Kevin Albertson <[email protected]>
1 parent 46ceeba commit f2d97fb

File tree

1 file changed

+25
-19
lines changed

1 file changed

+25
-19
lines changed

docs/dev/debian.rst

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,42 @@ Release Publishing
2323

2424
To publish a new release Debian package, perform the following:
2525

26-
1. For the first Debian package release on a **new release branch**, edit
27-
``debian/gbp.conf`` and update the ``upstream-branch`` and ``debian-branch``
28-
variables to match the name of the new release branch (e.g., ``r1.xx``); both
29-
variables should have the same value.
30-
31-
2. Create a new changelog entry (use the command `dch -i` to ensure proper
26+
1. Change to the packaging branch, `git checkout debian/unstable`, and make sure
27+
the working directorty is clean, `git status`, and up-to-date, `git pull`.
28+
2. Merge the release tag, `git merge 1.xx.y`; if there is a conflict (which
29+
should be rare), then it may be better to pass some additional options,
30+
`git merge -sort -Xtheirs 1.xx.y`.
31+
3. Verify that there are no extraneous differences from the release tag,
32+
`git diff 1.xx.y..HEAD --stat -- . ':!debian'`; the command should produce
33+
no output, and if any output is shown then that indicates differences in
34+
files outside the `debian/` directory.
35+
4. If there were any files outside the `debian/` directory listed in the last
36+
step then replace them, `git checkout 1.xx.y -- path/to/file1 path/to/file2`.
37+
Commit these changes,
38+
`git commit -m "Fix-up, post Merge tag '1.xx.y' into debian/unstable"` and
39+
repeat step 3.
40+
5. Create a new changelog entry (use the command `dch -i` to ensure proper
3241
formatting), then adjust the version number on the top line of the changelog
3342
as appropriate.
34-
3. Make any other necessary changes to the Debian packaging components (e.g.,
43+
6. Make any other necessary changes to the Debian packaging components (e.g.,
3544
update to standards version, dependencies, descriptions, etc.) and make
3645
relevant entries in ``debian/changelog`` as needed.
37-
4. Use `git add` to stage the changed files for commit (only files in the
46+
7. Use `git add` to stage the changed files for commit (only files in the
3847
`debian/` directory should be committed), then commit them (the `debcommit`
3948
utility is helpful here).
40-
5. Build the package with `gbp buildpackage` and inspect the resulting package
49+
8. Build the package with `gbp buildpackage` and inspect the resulting package
4150
files (at a minimum use `debc` on the `.changes` file in order to confirm
4251
files are installed to the proper locations by the proper packages and also
4352
use `lintian` on the `.changes` file in order to confirm that there are no
4453
unexpected errors or warnings; the `lintian` used for this check should
4554
always be the latest version as it is found in the unstable distribution)
46-
6. If any changes are needed, make them, commit them, and rebuild the package.
55+
9. If any changes are needed, make them, commit them, and rebuild the package.
4756

4857
.. note:: It may be desirable to squash multiple commits down to a single commit before building the final packages.
4958

50-
7. Once the final packages are built, they can be signed and uploaded and the
51-
version can be tagged using the `--git-tag` option of `gbp buildpackage`.
52-
8. After the commit has been tagged, switch from the release branch to the
53-
master branch and cherry-pick the commit(s) made on the release branch that
54-
touch only the Debian packaging (this will ensure that the packaging and
55-
especially the changelog on the master remain up to date).
56-
9. The final steps are to sign and upload the package, push the commits on the
57-
release branch and the master branch to the remote, and push the Debian
58-
package tag.
59+
10. Once the final packages are built, they can be signed and uploaded and the
60+
version can be tagged using the `--git-tag` option of `gbp buildpackage`.
61+
The best approach is to build the packages, prepare everything and then
62+
upload. Once the archive has accepted the upload, then execute
63+
`gbp buildpackage --git-tag --git-tag-only --git-sign-tags` and push the
64+
commits on the `debian/unstable` branch as well as the new signed tag.

0 commit comments

Comments
 (0)