'\" -*- 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-pq-rpm 1 "15 December 2023" "" "git-buildpackage Manual" .SH NAME gbp-pq-rpm \- Manage patches and development branches in Git .SH SYNOPSIS 'nh .fi .ad l \*(T<\fBgbp\ pq\-rpm\fR\*(T> \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu [\*(T<\fB\-\-version\fR\*(T>] [\*(T<\fB\-\-help\fR\*(T>] [\*(T<\fB\-\-verbose\fR\*(T>] [\*(T<\fB\-\-color=\fR\*(T>[auto|on|off]] [\*(T<\fB\-\-color\-scheme=\fR\*(T> \fICOLOR_SCHEME\fR] [\*(T<\fB\-\-packaging\-dir=\fR\*(T> \fIDIRECTORY\fR] [\*(T<\fB\-\-spec\-file=\fR\*(T> \fIFILEPATH\fR] [\*(T<\fB\-\-upstream\-tag=\fR\*(T> \fITAG-FORMAT\fR] [\*(T<\fB\-\-abbrev=\fR\*(T> \fInum\fR] [\*(T<\fB\-\-force\fR\*(T>] [\*(T<\fB\-\-[no\-]drop\fR\*(T>] [\*(T<\fB\-\-[no\-]patch\-numbers\fR\*(T>] \*(T<\fBdrop\fR\*(T> | \*(T<\fBexport\fR\*(T> | \*(T<\fBimport\fR\*(T> | \*(T<\fBrebase\fR\*(T> | \*(T<\fBswitch\fR\*(T> | \*(T<\fBapply\fR\*(T> 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBgbp\ pq-rpm\fR helps in managing patches and development branch(es) for packages that are maintained with \fBgbp\fR. It designed to be used for packages that are maintained using the "orphan-packaging" model. \fBgbp\ pq-rpm\fR has multiple subcommands, or actions, for working with the branches and patches. .PP \fBgbp\ pq-rpm\fR 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 \fImaster\fR the associated development branch would be \fIdevelopment/master\fR. .SH ACTIONS .TP \*(T<\fBimport\fR\*(T> 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. .TP \*(T<\fBexport\fR\*(T> 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. .TP \*(T<\fBrebase\fR\*(T> Switch to the development branch and rebase it against the current upstream version (indicated in the spec file of the associated packaging branch). .TP \*(T<\fBdrop\fR\*(T> Drop (delete) the development branch associated to the current branch. For example, you're on branch \fIfoo\fR this would drop branch \fIdevelopment/foo\fR. .TP \*(T<\fBapply\fR\*(T> Add a single patch to the development branch - similar to using \fBgit-am\fR. .TP \*(T<\fBswitch\fR\*(T> Switch between the development branch and the associated packaging branch. .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\-\-packaging\-dir=\fR\*(T>\fIDIRECTORY\fR Subdirectory that contains the RPM packaging files. .TP \*(T<\fB\-\-spec\-file=\fR\*(T>\fIFILEPATH\fR Relative path to the spec file to use. Special value \fIauto\fR causes \fBgbp\fR to search and guess. Other values cause the \*(T<\fB\-\-packaging\-dir\fR\*(T> option to be ignored: the directory of the spec file is used, instead. .TP \*(T<\fB\-\-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\-\-abbrev=\fR\*(T>\fINUM\fR 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 \fINUM\fR. This is useful when existing patches were not generated by \fBgbp\ pq\fR. .TP \*(T<\fB\-\-force\fR\*(T> Import even if the development (patch-queue) branch already exists. Only valid for the import action. .TP \*(T<\fB\-\-[no\-]drop\fR\*(T> Whether to drop (delete) the patch queue branch after a successful export. .TP \*(T<\fB\-\-[no\-]patch\-numbers\fR\*(T> Whether the patch files should start with a number or not. .SH "META TAGS" When exporting patches from a patch-queue branch \fBgbp\ pq-rpm\fR 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. .TP \*(T<\fBGbp\-Rpm: Ignore\fR\*(T> Ignores the commit, no patch is generated out of it. .TP \*(T<\fBGbp\-Rpm: If \fR\*(T> Conditional patch. Put patch inside "%if " in the spec file. .TP \*(T<\fBGbp\-Rpm: IfArch\fR\*(T> Conditional patch. Put patch inside "%ifarch " in the spec file. .PP For example, the following commit message: .PP .nf \*(T< Fix around a problem in Fedora which is not applicable elsewhere. Gbp\-Rpm: If 0%{?fedora} \*(T> .fi .PP Will result something like this in the spec file: .PP .nf \*(T< # 0001\-Fix\-around\-a\-problem\-in\-Fedora.patch %if 0%{?fedora} %patch0 \-p1 %endif \*(T> .fi .SH "SEE ALSO" \fBgbp-buildpackage-rpm\fR(1), \fBgbp-import-srpm\fR(1), \fBgbp.conf\fR(5) .SH AUTHOR Markus Lehtonen <\*(T>