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

# gbp-pq-rpm(1)

Manage patches and development branches in Git

## NAME

gbp-pq-rpm - Manage patches and development branches in Git

## SYNOPSIS

FC**gbp pq-rpm**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**--packaging-dir=**F\[0\] *DIRECTORY*\] \[FC**--spec-file=**F\[0\] *FILEPATH*\] \[FC**--upstream-tag=**F\[0\] *TAG-FORMAT*\] \[FC**--abbrev=**F\[0\] *num*\] \[FC**--force**F\[0\]\] \[FC**--\[no-\]drop**F\[0\]\] \[FC**--\[no-\]patch-numbers**F\[0\]\] FC**drop**F\[0\] \| FC**export**F\[0\] \| FC**import**F\[0\] \| FC**rebase**F\[0\] \| FC**switch**F\[0\] \| FC**apply**F\[0\]

## DESCRIPTION

**gbp pq-rpm** helps in managing patches and development branch(es) for packages that are maintained with **gbp**. It designed to be used for packages that are maintained using the "orphan-packaging" model. **gbp pq-rpm** has multiple subcommands, or actions, for working with the branches and patches.

**gbp pq-rpm** makes it easy to do source code development on a separate development branch (patch-queue branch in Debian git-buildpackage terms). For example, if the packaging files would be stored in *master* the associated development branch would be *development/master*.

## ACTIONS

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

  Create a development (patch-queue) branch by applying all patches from the packaging branch on top of the upstream version. The patches must apply without fuzz.

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

  Export patches from the development branch into the packaging branch. It generates patches (one-per-commit) from the development branch and updates the spec file accordingly. It doesn't automatically commit the changes though - they need to verified and committed manually.

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

  Switch to the development branch and rebase it against the current upstream version (indicated in the spec file of the associated packaging branch).

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

  Drop (delete) the development branch associated to the current branch. For example, you're on branch *foo* this would drop branch *development/foo*.

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

  Add a single patch to the development branch - similar to using **git-am**.

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

  Switch between the development branch and the associated packaging branch.

## 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**--packaging-dir=**F\[0\]*DIRECTORY*

  Subdirectory that contains the RPM packaging files.

- 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**--upstream-tag=**F\[0\]*TAG-FORMAT*

  Use this tag format when looking for tags of upstream versions, default is *upstream/%(version)s*.

- FC**--abbrev=**F\[0\]*NUM*

  When exporting a patch queue abbreviate commit, instead of showing the full 40-byte hexadecimal object name in header lines, show only a partial prefix of length *NUM*. This is useful when existing patches were not generated by **gbp pq**.

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

  Import even if the development (patch-queue) branch already exists. Only valid for the import action.

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

  Whether to drop (delete) the patch queue branch after a successful export.

- FC**--\[no-\]patch-numbers**F\[0\]

  Whether the patch files should start with a number or not.

## META TAGS

When exporting patches from a patch-queue branch **gbp pq-rpm** will look at the commit message for special tags it recognizes. All tags need to start at the first column and require at least one whitespace after the colon.

- FC**Gbp-Rpm: Ignore**F\[0\]

  Ignores the commit, no patch is generated out of it.

- FC**Gbp-Rpm: If \<expression\>**F\[0\]

  Conditional patch. Put patch inside "%if \<expression\>" in the spec file.

- FC**Gbp-Rpm: IfArch\<expression\>**F\[0\]

  Conditional patch. Put patch inside "%ifarch \<expression\>" in the spec file.

For example, the following commit message:

```
FC
      Fix around a problem in Fedora
      which is not applicable elsewhere.
      Gbp-Rpm: If 0%{?fedora}
    F[0]
```

Will result something like this in the spec file:

```
FC
      # 0001-Fix-around-a-problem-in-Fedora.patch
      %if 0%{?fedora}
      %patch0 -p1
      %endif
    F[0]
```

## 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)

## AUTHOR

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