NAME¶gbp-dch - Generate the Debian changelog from git commit messages
[ --version] [--help] [--verbose] [--color=[auto|on|off]] [ --color-scheme= COLOR_SCHEME] [--debian-branch= branch_name] [--debian-tag= tag-format] [ --upstream-branch= branch_name] [--upstream-tag= tag-format] [--ignore-branch] [-s commitish | --since= commitish] [[-S | --snapshot] | [ -R | --release]] [-N version | --new-version= version] [--bpo | --nmu | --qa | --security | --team] [--distribution= name] [--force-distribution] [-U level | --urgency= level] [--[no-]full] [--[no-]meta] [ --meta-closes=bug-close-tags] [--meta-closes-bugnum=bug-number-format] [ --snapshot-number= expression] [--id-length= number] [--git-log= git-log-options] [ --[no-]git-author] [--[no-]multimaint] [ --[no-]multimaint-merge] [--spawn-editor=[always|never|snapshot|release]] [ --commit-msg= msg-format] [-c | --commit] [--customizations= customization-file] [ --postedit= COMMAND] [--dch-opt= dch-options]... [--verbose] path1 path2
DESCRIPTION¶gbp dch reads git commit messages and generates the Debian changelog from it. It starts at a given commit specified by the --since option up to the current HEAD. For each commit found it adds the commit message to the changelog. If --since is not given the commit to start from is determined by the following rules (first one matches):
- The start commit is read from the snapshot banner (see below for details)
- If the topmost version of the debian/changelog is alread tagged. Use the commit the tag points to as start commit.
- The last commit that modified debian/changelog is used as start commit.
- Print version of the program, i.e. version of the git-buildpackage suite
- -v, --verbose
- Verbose execution
- -h, --help
- Print help and exit
- Whether to use colored output.
- Colors to use in output (when color is enabled). The format for COLOR_SCHEME is '<debug>:<info>:<warning>:<error>'. Numerical values and color names are accepted, empty fields imply the default color. For example, --git-color-scheme='cyan:34::' would show debug messages in cyan, info messages in blue and other messages in default (i.e. warning and error messages in red).
- The branch in the Git repository the Debian package is being developed on, default is master.
- Branch to determine the upstream version from. Default is upstream.
- Use this tag format when looking for tags of upstream versions, default is upstream/%(version)s.
- Don't check if the current branch matches debian-branch.
- Tag format used, when tagging debian versions, default is debian/%(version)s
- Start reading commit messages at committish. This option can't be set via gbp.conf.
- --auto, -a
- This option is ignored for compatibility with older versions. It used to trigger automatic mode.
- Parse meta tags like Closes:, Thanks: and Gbp-Dch:. See META TAGS below.
- What meta tags to look for to generate bug-closing changelog entries. The default is 'Closes|LP' to support Debian and Launchpad.
- What regular expression should be used to parse out the bug
number. The default is '(?:bug|issue)?\#?\s?\d+'. Note: the regex should
suppress all portions of the bug number that are not wanted using
"(?:)", see Python regex manual for details.
Possible Txt Match? Result ------------ ------ ------ bug EX-12345 Y EX-12345 ex-01273 Y ex-01273 bug ex-1ab Y ex-1 EX--12345 N
- Include the full commit message in the changelog output.
- --snapshot, -S
- Create a snapshot release entry. It uses a snapshot release
number which is smaller than the final release number and adds a warning
banner to the changelog entry. The version number is being auto
incremented with every new snapshot release.
- Python expression that gets eval()ed to the new snapshot number.
- --release, -R
- Remove any snapshot release banners and version suffixes (if any), set the current distribution to unstable, and open the changelog for final tweaking. This option can't be set via gbp.conf. It's usually used to finalize the changelog before making a release.
- --new-version=version, -N version
- Add a new changelog section with version newversion. Together with --snapshot, the snapshot number will be appended to newversion. This option can't be set via gbp.conf.
- Create a Team upload changelog entry. This option can't be set via gbp.conf.
- Increment the Debian release number for an upload to backports, and add a backport upload changelog comment. This option can't be set via gbp.conf.
- Increment the Debian release number for a non-maintainer upload. This option can't be set via gbp.conf.
- Increment the Debian release number for a Debian QA Team upload, and add a QA upload changelog comment. This option can't be set via gbp.conf.
- Increment the Debian release number for a Debian Security Team non-maintainer upload, and add a "Security Team upload" changelog comment. This option can't be set via gbp.conf.
- Set the distribution field to name. This option can't be set via gbp.conf.
- Force the distribution specified with --distribution to be used, even if it doesn't match the list of known distributions. This option can't be set via gbp.conf.
- Set the urgency field to level.
- Options passed on verbatim to git-log(1).
- Include N digits of the commit id in the changelog entry. Default is to not include any commit ids at all.
- Ignore commit lines matching regex when generating the changelog.
- Use user.name and user.email from git-config(1) for changelog trailer.
- Merge commits by maintainer.
- Whether to spawn an editor: always, never, when doing snapshots or when doing a release.
- Use this format string for the commit message when committing the generated changelog file (when --commit is given). Default is Update changelog for %(version)s release
- Commit the generated changelog.
- Load Python code from customization-file. At the moment, the only useful thing the code can do is define a custom format_changelog_entry() function.
- RunCOMMAND after changes to the changelog file have been finalized, That is, after dch has been run and possible text editor has been exited, but, before changes are (possibly) committed to git.
- Pass option to dch verbatim. Note that gbp dch invokes dch multiple times and the option is passed to all invocations so not all dch options make sense here. Options may also conflict with options picked by gbp dch.
SNAPSHOT MODE¶Snapshot mode can be used for quick test and install cycles without having to worry about version numbers or changelog entries. When using --snapshot or -S, gbp dch uses a pseudo header in the Debian changelog to remember the last git commit it added a changelog entry for. It also sets a version number ending in ~<snaspshotnumber>.gbp<commitid>. It automatically increments the snapshot number on subsequent invocations of gbp dch -S so that later snapshots automatically have a higher version number. To leave snapshot mode, invoke gbp dch with the --release option. This removes the pseudo header and unmangles the version number so the released version has a higher version number than the snapshots.
META TAGS¶Additional to the above options, the formatting of the commit message in debian/changelog can be modified by special tags (called Meta Tags) given in the git commit message. Meta Tag processing can be activated via the --meta option. The tags must start at the first column of a commit message but can appear on any line. They are of the form Tagname: value. Valid Meta Tags are:
- Gbp-Dch: action
- Supported actions are: Ignore which will ignore this
commit when generating debian/changelog, Short which will
only use the description (the first line) of the commit message when
generating the changelog entry (useful when --full is given), and
Full which will use the full commit message when generating the
changelog entry (useful when --full is not given).
- Thanks: msg
- Add a thanks message after the commit message.
- Closes: bugnumber
- Indicate in the debian/changelog that the bug was closed by this commit. See the --meta-closes on how to extend this for other bugtrackers.
Document meta tags so one doesn't have to consult the manual Gbp-Dch: Short Closes: #636088 Thanks: Raphaël Hertzog for the suggestionResults in this debian/changelog entry:
* Document meta tags. Thanks to Raphaël Hertzog for the suggestion (Closes: #636088)
CONFIGURATION FILES¶Several gbp.conf files are parsed to set defaults for the above command-line arguments. See the gbp.conf(5) manpage for details.
SEE ALSO¶gbp-buildpackage(1), gbp-import-dsc(1), gbp-import-dscs(1), gbp-import-orig(1), gbp.conf(5), debuild(1), git(1), pristine-tar(1),
The Git-Buildpackage Manual ⟨file:///usr/share/doc/git-buildpackage/manual-html/index.html⟩
Cl2vcs ⟨https://honk.sigxcpu.org/cl2vcs⟩ ,
AUTHOR¶Guido Günther <email@example.com>
|3 April 2018|