'\" -*- coding: UTF-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH gbp-dch 1 "31 May 2023" "" "git-buildpackage Manual" .SH NAME gbp-dch \- Generate the Debian changelog from git commit messages .SH SYNOPSIS 'nh .fi .ad l \fBgbp\ dch\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu [\fB--version\fR] [\fB--help\fR] [\fB--verbose\fR] [\fB--color=\fR[auto|on|off]] [\fB--color-scheme=\fR \fICOLOR_SCHEME\fR] [\fB--debian-branch=\fR \fIbranch_name\fR] [\fB--debian-tag=\fR \fItag-format\fR] [\fB--upstream-branch=\fR \fIbranch_name\fR] [\fB--upstream-tag=\fR \fItag-format\fR] [\fB--ignore-branch\fR] [\fB-s\fR \fIcommitish\fR | \fB--since=\fR \fIcommitish\fR] [[\fB-S\fR | \fB--snapshot\fR] | [\fB-R\fR | \fB--release\fR]] [\fB-N\fR \fIversion\fR | \fB--new-version=\fR \fIversion\fR] [\fB--bpo\fR | \fB--nmu\fR | \fB--qa\fR | \fB--security\fR | \fB--team\fR | \fB--local=\fR \fIsuffix\fR] [\fB--distribution=\fR \fIname\fR] [\fB--force-distribution\fR] [\fB-U\fR \fIlevel\fR | \fB--urgency=\fR \fIlevel\fR] [\fB--[no-]full\fR] [\fB--[no-]meta\fR] [\fB--meta-closes=bug-close-tags\fR] [\fB--meta-closes-bugnum=bug-number-format\fR] [\fB--snapshot-number=\fR \fIexpression\fR] [\fB--id-length=\fR \fInumber\fR] [\fB--git-log=\fR \fIgit-log-options\fR] [\fB--[no-]git-author\fR] [\fB--[no-]multimaint\fR] [\fB--[no-]multimaint-merge\fR] [\fB--spawn-editor=[always|never|snapshot|release]\fR] [\fB--commit-msg=\fR \fImsg-format\fR] [\fB-c\fR | \fB--commit\fR] [\fB--customizations=\fR \fIcustomization-file\fR] [\fB--postedit=\fR \fICOMMAND\fR] [\fB--dch-opt=\fR \fIdch-options\fR]\&... [\fB--verbose\fR] \fIpath1 path2\fR 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBgbp\ dch\fR reads git commit messages and generates the Debian changelog from it. It starts at a given commit specified by the \*(T<\fB\-\-since\fR\*(T> option up to the current \fIHEAD\fR. For each commit found it adds the commit message to the changelog. If \*(T<\fB\-\-since\fR\*(T> is not given the commit to start from is determined by the following rules (first one matches): .TP 0.4i 1. The start commit is read from the snapshot banner (see below for details) .TP 0.4i 2. If the topmost version of the \*(T<\fIdebian/changelog\fR\*(T> is alread tagged. Use the commit the tag points to as start commit. .TP 0.4i 3. The last commit that modified \*(T<\fIdebian/changelog\fR\*(T> is used as start commit. .PP This is called automatic mode. .PP If the distribution of the topmost section in \*(T<\fIdebian/changelog\fR\*(T> is \fIUNRELEASED\fR, the changelog entries will be inserted into this section. Otherwise a new section will be created. .PP If one ore more paths are given as arguments \fBgbp\ dch\fR will only include changes in \*(T<\fIdebian/changelog\fR\*(T> that affect these paths. E.g. using \fIdebian/\fR is a good choice if upstream uses Git and you don't want the upstream history to end up in \*(T<\fIdebian/changelog\fR\*(T>. .PP To restrict the selected changes even further you can use use the \*(T<\fB\-\-git\-log\fR\*(T> option which is passed on verbatim to \fBgit log\fR. E.g. by using \*(T<\fB\-\-git\-log=\fR\*(T>\fI"--author=Foo Bar"\fR. .PP The above relies on the \*(T<\fB\-\-debian\-branch\fR\*(T> option pointing to the current branch and \*(T<\fB\-\-upstream\-branch\fR\*(T> pointing to the corresponding upstream branch in order to find the right merge points of these branches. Furthermore \fBgbp\ dch\fR must be able to identify git tags from upstream and Debian version numbers. If you're not using the defaults check the \*(T<\fB\-\-upstream\-tag\fR\*(T> and \*(T<\fB\-\-debian\-tag\fR\*(T> options and make sure they match the tags created by e.g. \fBgbp\ import-orig\fR (when using tarballs) or upstream's tagging pattern (when using upstream's git directly). .PP If not changelog exists yet it is created and the version number is derived from the last upstream tag if found. .SH OPTIONS .TP \*(T<\fB\-\-version\fR\*(T> Print version of the program, i.e. version of the git-buildpackage suite .TP \*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-verbose\fR\*(T> Verbose execution .TP \*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> Print help and exit .TP \*(T<\fB\-\-color=\fR\*(T>[auto|on|off] Whether to use colored output. .TP \*(T<\fB\-\-color\-scheme=\fR\*(T>\fICOLOR_SCHEME\fR Colors to use in output (when color is enabled). The format for COLOR_SCHEME is \&':::'. Numerical values and color names are accepted, empty fields imply the default color. For example, \*(T<\fB\-\-git\-color\-scheme=\fR\*(T>\*(T<'cyan:34::'\*(T> would show debug messages in cyan, info messages in blue and other messages in default (i.e. warning and error messages in red). .TP \*(T<\fB\-\-debian\-branch\fR\*(T>=\fIbranch_name\fR The branch in the Git repository the Debian package is being developed on, default is \fImaster\fR. .TP \*(T<\fB\-\-upstream\-branch\fR\*(T>=\fIbranch_name\fR Branch to determine the upstream version from. Default is \fIupstream\fR. .TP \*(T<\fB\-\-git\-upstream\-tag=\fR\*(T>\fITAG-FORMAT\fR Use this tag format when looking for tags of upstream versions, default is \fIupstream/%(version)s\fR. .TP \*(T<\fB\-\-ignore\-branch\fR\*(T> Don't check if the current branch matches \fIdebian-branch\fR. .TP \*(T<\fB\-\-debian\-tag=\fR\*(T>\fItag-format\fR Tag format used, when tagging debian versions, default is \fIdebian/%(version)s\fR .TP \*(T<\fB\-\-since=\fR\*(T>\fIcommittish\fR Start reading commit messages at \fIcommittish\fR. This option can't be set via \*(T<\fIgbp.conf\fR\*(T>. .TP \*(T<\fB\-\-auto\fR\*(T>, \*(T<\fB\-a\fR\*(T> This option is ignored for compatibility with older versions. It used to trigger automatic mode. .TP \*(T<\fB\-\-[no\-]meta\fR\*(T> Parse meta tags like \*(T<\fBCloses:\fR\*(T>, \*(T<\fBThanks:\fR\*(T> and \*(T<\fBGbp\-Dch:\fR\*(T>. See META TAGS below. .TP \*(T<\fB\-\-meta\-closes=\fR\*(T>\fIbug-close-tags\fR What meta tags to look for to generate bug-closing changelog entries. The default is \*(T<'Closes|LP'\*(T> to support Debian and Launchpad. .TP \*(T<\fB\-\-meta\-closes\-bugnum=\fR\*(T>\fIbug-number-format\fR What regular expression should be used to parse out the bug number. The default is \*(T<'(?:bug|issue)?\e#?\es?\ed+'\*(T>. Note: the regex should suppress all portions of the bug number that are not wanted using \*(T<"(?:)"\*(T>, see Python regex manual for details. Example: \*(T<\fB\-\-meta\-closes\-bugnum=\fR\*(T>\*(T<"(?:bug)?\es*ex\-\ed+"\*(T> would match all of the following: .nf \*(T< Possible Txt Match? Result \-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\- \-\-\-\-\-\- bug EX\-12345 Y EX\-12345 ex\-01273 Y ex\-01273 bug ex\-1ab Y ex\-1 EX\-\-12345 N\*(T> .fi .TP \*(T<\fB\-\-[no\-]full\fR\*(T> Include the full commit message in the changelog output. .TP \*(T<\fB\-\-snapshot\fR\*(T>, \*(T<\fB\-S\fR\*(T> 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. The snapshot banner is also used by \fBgbp\ dch\fR to determine which entries are already in the changelog. This prevents duplicated entries in \*(T<\fIdebian/changelog\fR\*(T> when you did not commit the changelog yet. .TP \*(T<\fB\-\-snapshot\-number=\fR\*(T>\fIexpression\fR Python expression that gets eval()ed to the new snapshot number. .TP \*(T<\fB\-\-release\fR\*(T>, \*(T<\fB\-R\fR\*(T> Remove any snapshot release banners and version suffixes (if any), set the current distribution to \fIunstable\fR, and open the changelog for final tweaking. This option can't be set via \*(T<\fIgbp.conf\fR\*(T>. It's usually used to finalize the changelog before making a release. .TP \*(T<\fB\-\-new\-version=\fR\*(T>\fIversion\fR, \*(T<\fB\-N\fR\*(T> \fIversion\fR Add a new changelog section with version \fInewversion\fR. Together with \*(T<\fB\-\-snapshot\fR\*(T>, the snapshot number will be appended to \fInewversion\fR. This option can't be set via \*(T<\fIgbp.conf\fR\*(T>. .TP \*(T<\fB\-\-team\fR\*(T> Create a Team upload changelog entry. This option can't be set via \*(T<\fIgbp.conf\fR\*(T>. .TP \*(T<\fB\-\-bpo\fR\*(T> Increment the Debian release number for an upload to backports, and add a backport upload changelog comment. This option can't be set via \*(T<\fIgbp.conf\fR\*(T>. .TP \*(T<\fB\-\-nmu\fR\*(T> Increment the Debian release number for a non-maintainer upload. This option can't be set via \*(T<\fIgbp.conf\fR\*(T>. .TP \*(T<\fB\-\-qa\fR\*(T> 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 \*(T<\fIgbp.conf\fR\*(T>. .TP \*(T<\fB\-\-security\fR\*(T> 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 \*(T<\fIgbp.conf\fR\*(T>. .TP \*(T<\fB\-\-local=\fR\*(T>\fIsuffix\fR, \*(T<\fB\-l\fR\*(T> \fIsuffix\fR Increment the Debian release number for a local build using the specified suffix. This option can't be set via \*(T<\fIgbp.conf\fR\*(T>. .TP \*(T<\fB\-\-distribution=\fR\*(T>\fIname\fR Set the distribution field to \fIname\fR. This option can't be set via \*(T<\fIgbp.conf\fR\*(T>. .TP \*(T<\fB\-\-force\-distribution\fR\*(T> Force the distribution specified with \*(T<\fB\-\-distribution\fR\*(T> to be used, even if it doesn't match the list of known distributions. This option can't be set via \*(T<\fIgbp.conf\fR\*(T>. .TP \*(T<\fB\-\-urgency=\fR\*(T>\fIlevel\fR Set the urgency field to \fIlevel\fR. .TP \*(T<\fB\-\-git\-log=\fR\*(T>\fIgit-log-options\fR Options passed on verbatim to git-log(1). .TP \*(T<\fB\-\-id\-length=\fR\*(T>\fIN\fR Include \fIN\fR digits of the commit id in the changelog entry. Default is to not include any commit ids at all. .TP \*(T<\fB\-\-ignore\-regex=\fR\*(T>\fIregex\fR Ignore commit lines matching \fIregex\fR when generating the changelog. .TP \*(T<\fB\-\-git\-author\fR\*(T> Use user.name and user.email from git-config(1) for changelog trailer. .TP \*(T<\fB\-\-[no\-]multimaint\-merge\fR\*(T> Merge commits by maintainer. .TP \*(T<\fB\-\-spawn\-editor=\fR\*(T>\fI[always|never|snapshot|release]\fR Whether to spawn an editor: always, never, when doing snapshots or when doing a release. .TP \*(T<\fB\-\-commit\-msg=\fR\*(T>\fImsg-format\fR Use this format string for the commit message when committing the generated changelog file (when \*(T<\fB\-\-commit\fR\*(T> is given). Default is \fIUpdate changelog for %(version)s release\fR .TP \*(T<\fB\-\-commit\fR\*(T> Commit the generated changelog. .TP \*(T<\fB\-\-customizations=\fR\*(T>\fIcustomization-file\fR Load Python code from \fIcustomization-file\fR. At the moment, the only useful thing the code can do is define a custom format_changelog_entry() function. .TP \*(T<\fB\-\-postedit=\fR\*(T>\fICOMMAND\fR Run\fICOMMAND\fR 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. .TP \*(T<\fB\-\-dch\-opt=\fR\*(T>\fIdch-option\fR Pass option to dch verbatim. Note that \fBgbp\ dch\fR 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 \fBgbp\ dch\fR. .SH "SNAPSHOT MODE" Snapshot mode can be used for quick test and install cycles without having to worry about version numbers or changelog entries. .PP When using \*(T<\fB\-\-snapshot\fR\*(T> or \*(T<\fB\-S\fR\*(T>, \fBgbp\ dch\fR 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 \fI~.gbp\fR. It automatically increments the snapshot number on subsequent invocations of \fBgbp\ dch\fR \*(T<\fB\-S\fR\*(T> so that later snapshots automatically have a higher version number. To leave snapshot mode, invoke \fBgbp\ dch\fR with the \*(T<\fB\-\-release\fR\*(T> option. This removes the pseudo header and unmangles the version number so the released version has a higher version number than the snapshots. .SH "META TAGS" Additional to the above options, the formatting of the commit message in \*(T<\fIdebian/changelog\fR\*(T> can be modified by special tags (called Meta Tags) given in the git commit message. Meta Tag processing can be activated via the \*(T<\fB\-\-meta\fR\*(T> option. The tags must start at the first column of a commit message but can appear on any line. They are of the form \*(T<\fBTagname\fR\*(T>: \fIvalue\fR. Valid Meta Tags are: .TP \*(T<\fBGbp\-Dch\fR\*(T>: \fIaction\fR Supported actions are: \fIIgnore\fR which will ignore this commit when generating \*(T<\fIdebian/changelog\fR\*(T>, \fIShort\fR which will only use the description (the first line) of the commit message when generating the changelog entry (useful when \*(T<\fB\-\-full\fR\*(T> is given), and \fIFull\fR which will use the full commit message when generating the changelog entry (useful when \*(T<\fB\-\-full\fR\*(T> is not given). In addition to \*(T<\fBGbp\-Dch\fR\*(T>, the deprecated \*(T<\fBGit\-Dch\fR\*(T> is still supported. .TP \*(T<\fBThanks\fR\*(T>: \fImsg\fR Add a thanks message after the commit message. .TP \*(T<\fBCloses\fR\*(T>: \fIbugnumber\fR Indicate in the \*(T<\fIdebian/changelog\fR\*(T> that the bug was closed by this commit. See the \*(T<\fB\-\-meta\-closes\fR\*(T> on how to extend this for other bugtrackers. .PP The following git commit message: .PP .nf \*(T< Document meta tags so one doesn't have to consult the manual Gbp\-Dch: Short Closes: #636088 Thanks: Rapha\(:el Hertzog for the suggestion\*(T> .fi .PP Results in this \*(T<\fIdebian/changelog\fR\*(T> entry: .PP .nf \*(T< * Document meta tags. Thanks to Rapha\(:el Hertzog for the suggestion (Closes: #636088)\*(T> .fi .SH "CONFIGURATION FILES" Several \*(T<\fIgbp.conf\fR\*(T> files are parsed to set defaults for the above command-line arguments. See the \fBgbp.conf\fR(5) manpage for details. .SH "SEE ALSO" \fBgbp-buildpackage\fR(1), \fBgbp-import-dsc\fR(1), \fBgbp-import-dscs\fR(1), \fBgbp-import-orig\fR(1), \fBgbp.conf\fR(5), \fBdebuild\fR(1), \fBgit\fR(1), \fBpristine-tar\fR(1), .URL file:///usr/share/doc/git-buildpackage/manual-html/index.html " The Git-Buildpackage Manual" .URL https://honk.sigxcpu.org/cl2vcs " Cl2vcs" , .SH AUTHOR Guido G\(:unther <\*(T>