---
name: "gbp-rpm-ch"
section: "1"
platform: "linux"
package: "git-buildpackage-rpm"
version: "0.9.38"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gbp-rpm-ch"
---

# gbp-rpm-ch(1)

Generate the RPM changelog from git commit messages

## NAME

gbp-rpm-ch; - Generate the RPM changelog from git commit messages

## SYNOPSIS

FC**gbp rpm-ch**F\[0\]  \[FC**--version**F\[0\]\] \[FC**--help**F\[0\]\] \[FC**--verbose**F\[0\]\] \[FC**--color=**F\[0\]\[auto\|on\|off\]\] \[FC**--color-scheme=**F\[0\] *COLOR\_SCHEME*\] \[FC**--tmp-dir**F\[0\]= *DIRECTORY*\] \[FC**--vendor**F\[0\]= *VENDOR*\] \[FC**--packaging-branch=**F\[0\] *BRANCH-NAME*\] \[FC**--packaging-tag=**F\[0\] *TAG-FORMAT*\] \[FC**--ignore-branch**F\[0\]\] \[FC**--packaging-dir=**F\[0\] *DIRECTORY*\] \[FC**--changelog-file=**F\[0\] *FILEPATH*\] \[FC**--spec-file=**F\[0\] *FILEPATH*\] \[FC**--since=**F\[0\] *COMMIT-ISH*\] \[FC**--no-release**F\[0\]\] \[FC**--\[no-\]git-author**F\[0\]\] \[FC**--\[no-\]full**F\[0\]\] \[FC**--id-length=**F\[0\] *NUMBER*\] \[FC**--ignore-regex=**F\[0\] *REGEX*\] \[FC**--changelog-revision=**F\[0\] *REV-FORMAT*\] \[FC**--git-log=**F\[0\] *GIT-LOG-OPTIONS*\] \[FC**--spawn-editor=***\[always\|release\|no\]*F\[0\]\] \[FC**--editor-cmd=**F\[0\] *EDITOR*\] \[FC**--customizations=**F\[0\] *CUSTOMIZATION-FILE*\] *\[PATH1 PATH2\]*

## DESCRIPTION

**gbp rpm-ch** reads git commit messages up to the current tip of the current branch and updates the RPM changelog from them.

By default, **gbp rpm-ch** tries to guess the last Git commit documented in the changelog. Alternatively, FC**--since**F\[0\] can be used to tell **gbp rpm-ch** at which point it should start in the Git history, or, FC**--all**F\[0\] to use all commits from the Git history.

The additional path arguments can be used to restrict the repository paths **gbp rpm-ch** looks at. For even more detailed control, you can use FC**--git-log**F\[0\] to restrict the generated changelog entries further. E.g. by using FC**--git-log=**F\[0\]*"--author=Foo Bar"*.

## OPTIONS

- FC**--version**F\[0\]

  Print version of the program, i.e. version of the git-buildpackage suite

- FC**-v**F\[0\], FC**--verbose**F\[0\]

  Verbose execution

- FC**-h**F\[0\], FC**--help**F\[0\]

  Print help and exit

- FC**--color=**F\[0\]\[auto\|on\|off\]

  Whether to use colored output.

- FC**--color-scheme=**F\[0\]*COLOR\_SCHEME*

  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, FC**--git-color-scheme=**F\[0\]FC'cyan:34::'F\[0\] would show debug messages in cyan, info messages in blue and other messages in default (i.e. warning and error messages in red).

- FC**--git-tmp-dir**F\[0\]=*DIRECTORY*

  Base directory under which temporary directories are created.

- FC**--vendor**F\[0\]=*VENDOR*

  Distribution vendor name.

- FC**--packaging-branch**F\[0\]=*BRANCH-NAME*

  The branch in the Git repository the package is being developed on, default is *master*.

- FC**--ignore-branch**F\[0\]

  Don't check if the current branch matches *PACKAGING-BRANCH*.

- FC**--packaging-tag=**F\[0\]*TAG-FORMAT*

  Tag format used, when tagging releases, default is *%(vendor)s/%(version)s*

- FC**--packaging-dir=**F\[0\]*DIRECTORY*

  Subdirectory that contains the RPM packaging files.

- FC**--changelog-file=**F\[0\]*FILEPATH*

  Relative path to the changelog file to use. Special value *auto* causes **gbp** to guess, *SPEC* uses the spec file, *CHANGES* uses a separate changelog file (name derived spec file name with .spec suffix replaced by .changes). Guessing logic is simple: use separate changelog file if it is found, otherwise use the spec file.

- FC**--spec-file=**F\[0\]*FILEPATH*

  Relative path to the spec file to use. Special value *auto* causes **gbp** to search and guess. Other values cause the FC**--packaging-dir**F\[0\] option to be ignored: the directory of the spec file is used, instead.

- FC**--since=**F\[0\]*COMMIT-ISH*

  Start reading commit messages at *COMMIT-ISH*.

- FC**--no-release**F\[0\]

  Do not create a new changelog section, just update the last changelog section.

- FC**--\[no-\]full**F\[0\]

  Include the full commit message in the changelog output.

- FC**--git-log=**F\[0\]*GIT-LOG-OPTIONS*

  Options passed on verbatim to [git-log(1)](/git-log/1.md).

- FC**--id-length=**F\[0\]*N*

  Include *N* digits of the commit id in the changelog entry. Default is to not include any commit ids at all.

- FC**--ignore-regex=**F\[0\]*REGEX*

  Ignore lines in commit message matching *REGEX* when generating the changelog.

- FC**--changelog-revision=**F\[0\]*REV-FORMAT*

  Format string to use for revision field in the changelog header. The following string fields are accepted: *%(upstreamversion)s* the upstream version; *%(release)s* the rpm patchlevel, i.e. Release; *%(version)s* full rpm package version; *%(tagname)s* tag/commit, i.e. basically what **git-describe** would give. If empty or not defined the default from packaging policy is used.

- FC**--ignore-regex=**F\[0\]*REGEX*

  Ignore commit lines matching *REGEX* when generating the changelog.

- FC**--\[no-\]git-author**F\[0\]

  Use user.name and user.email from [git-config(1)](/git-config/1.md) for the changelog header.

- FC**--spawn-editor=**F\[0\]*\[always\|release\|no\]*

  Whether to spawn an editor: always, when doing a release or never.

- FC**--editor-cmd=**F\[0\]*EDITOR*

  The editor to use for editing the changelog.

- FC**--customizations=**F\[0\]*CUSTOMIZATION-FILE*

  Load Python code from *CUSTOMIZATION-FILE*. At the moment, the only useful thing the code can do is define a custom ChangelogEntryFormatter class.

## META TAGS

Additional to the above options the formatting of the new changelog entries (one-per-commit) in the changelog can be modified by special tags (called Meta Tags) given in the git commit message. The tags must start at the first column of a commit message but can appear on any line. They are of the form FC**Tagname**F\[0\]: *VALUE*. Valid Meta Tags are:

- FC**Git-Rpm-Ch**F\[0\]: *ACTION*

  Supported actions are: *Ignore* which will ignore this commit when generating new changelog entries. *Short* which will only use the description (the first line) of the commit message when generating the changelog entry (useful when FC**--full**F\[0\] is given) and *Full* which will use the full commit message when generating the changelog entry (useful when FC**--full**F\[0\] is not given).

- FC**\[Close\|Closes\|...\]**F\[0\]: *BUGNUMBER*

  Indicate in the changelog entry that bug *BUGNUMBER* was addressed in this commit.

The following git commit message:

```
FC
      Document meta tags
      so one doesn't have to consult the manual
      Git-Rpm-Ch: Short
      Closes: #636088
    F[0]
```

Results in this changelog entry:

```
FC
      - Document meta tags (Closes: #636088)
    F[0]
```

## CONFIGURATION FILES

Several FC*gbp.conf*F\[0\] files are parsed  to set defaults for the above command-line arguments. See the [**gbp.conf**(5)](/gbp.conf/5.md) manpage for details.

## SEE ALSO

[**gbp-buildpackage-rpm**(1)](/gbp-buildpackage-rpm/1.md), [**gbp-import-srpm**(1)](/gbp-import-srpm/1.md), [**gbp.conf**(5)](/gbp.conf/5.md), [**debuild**(1)](/debuild/1.md), [**git**(1)](/git/1.md), [**pristine-tar**(1)](/pristine-tar/1.md),\
        The Git-Buildpackage Manual ⟨file:///usr/share/doc/git-buildpackage/manual-html/index.html⟩\
        Cl2vcs ⟨https://honk.sigxcpu.org/cl2vcs⟩ ,

## AUTHOR

Markus Lehtonen \<FCmarkus.lehtonen@linux.intel.comF\[0\]\>
