ubuntu-dev-tools/doc/sponsor-patch.1

133 lines
3.8 KiB
Groff

.TH sponsor\-patch "1" "September 21 2010" "ubuntu-dev-tools"
.SH NAME
sponsor\-patch \- Pull a patch / merge request from Launchpad,
test-build it, and upload.
.SH SYNOPSIS
.B sponsor\-patch \fR[\fIoptions\fR] \fIbug
.br
.B sponsor\-patch \-h
.SH DESCRIPTION
\fBsponsor\-patch\fR downloads the patch or Bazaar branch linked to an
Ubuntu bug, applies it, generates a review diff, (optionally) test
builds it, runs
.BR lintian (1)
and, after review and confirmation, can upload it.
\fBsponsor\-patch\fR can be used for sponsoring patches, merges from
Debian, SRUs, and creating debdiffs from patches.
If \fIbug\fR has multiple patches or branches linked, it will prompt the
user to select one.
The same applies to bug tasks.
If the attached patch is not a debdiff,
.BR edit-patch (1)
is used to apply it.
.nr step 1 1
Some obvious checks are performed, in particular:
.IP \n[step]. 4
.BR update\-maintainer (1)
is run on the source package to ensure that the \fBMaintainer\fR field
meets the Ubuntu policy.
.IP \n+[step].
The version number must be greater than the current version in the
archive.
The \fBchanges\fR file is also correctly generated to list all changes
since the current version in the archive.
.IP \n+[step].
The changelog must automatically close the sponsorship bug.
.IP \n+[step].
The changelog target must be valid.
.IP \n+[step].
The changelog timestamp is touched.
.PP
Should any checks (or the build fail), the user has an option to edit
the patched source and try building it again.
The sources and patches will be downloaded into the working directory
(which defaults to the current directory).
The output of the build tool will be placed in
\fIworkdir\fR/\fIsourcepkg\fB\-buildresult/\fR.
.SH OPTIONS
.TP
.BR \-b ", " \-\-build
Build the package with the specified builder. Note for \fBpbuilder\fR(8) users:
This assumes the common configuration, where the \fBDIST\fR environment is read
by \fBpbuilderrc\fR(5) to select the correct base image.
.TP
.B \-B \fIBUILDER\fR, \fB\-\-builder\fR=\fIBUILDER
Use the specify builder to build the package.
Supported are \fBpbuilder\fR(8) and \fBsbuild\fR(1).
This overrides \fBSPONSOR_PATCH_BUILDER\fR.
The default is \fBpbuilder\fR(8).
.TP
.BR \-e ", " \-\-edit
Launch a sub-shell to allow editing of the patched source before
building.
.TP
.B \-k \fIKEY\fR, \fB\-\-key\fR=\fIKEY
Specify a key ID for signing the upload.
.TP
.BR \-s ", " \-\-sponsor
Shortcut for sponsored uploads. Equivalent to \fB\-b \-u ubuntu\fR.
.TP
.B \-u \fIDEST\fR, \fB\-\-upload\fR=\fIDEST
Upload to \fIDEST\fR with \fBdput\fR(1) (after confirmation).
.TP
.BR \-v ", " \-\-verbose
Print more information.
.TP
.B \-w \fIDIR\fR, \fB\-\-workdir\fR=\fIDIR
Use the specified working directory, creating it if necessary, instead
of the current directory. This overrides \fBSPONSOR_PATCH_WORKDIR\fR.
.TP
.BR \-h ", " \-\-help
Display a help message and exit.
.SH ENVIRONMENT
.TP
.B SPONSOR_PATCH_BUILDER
The default builder for \fBsponsor\-patch\fR.
Supported are \fBpbuilder\fR(8) and \fBsbuild\fR(1).
If unset and not provided on the command line, \fBpbuilder\fR(8) is used.
.TP
.B SPONSOR_PATCH_WORKDIR
The default working directory for \fBsponsor\-patch\fR. If unset and not
provided on the command line, the current directory is used.
.SH EXAMPLES
Test-building and sponsoring an upload of bug \fB1234\fR:
.IP
.nf
.B sponsor\-patch -s 1234
.fi
.PP
Performing a test build of bug \fB1234\fR in your PPA:
.IP
.nf
.B sponsor\-patch -u ppa:\fIuser\fR/\fIppa\fB 1234
.fi
.SH SEE ALSO
.BR bzr (1),
.BR debchange (1),
.BR debdiff (1),
.BR dput (1),
.BR edit-patch (1),
.BR lintian (1),
.BR pbuilder (8),
.BR sbuild (1),
.BR update\-maintainer (1)
.SH AUTHORS
\fBsponsor\-patch\fR was written by Benjamin Drung <bdrung@ubuntu.com>,
and this manual page was written by Stefano Rivera <stefanor@ubuntu.com>.
.PP
Both are released under the terms of the ISC License.