.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "GBP-IMPORT-ORIG" "1" "07 February 2017" "" "git-buildpackage Manual"
.SH NAME
gbp-import-orig \- Import an upstream source into a git repository
.SH SYNOPSIS
\fBgbp\~import-orig\fR [ \fB--version\fR ] [ \fB--help\fR ] [ \fB--verbose\fR ] [ \fB--color=\fI[auto|on|off]\fB\fR ] [ \fB--color-scheme=\fICOLOR_SCHEME\fB\fR ] [ \fB--upstream-version=\fIversion\fB\fR ] [ \fB--[no-]merge\fR ] [ \fB--merge-mode=\fI[merge|replace]\fB\fR ] [ \fB--upstream-branch=\fIbranch_name\fB\fR ] [ \fB--debian-branch=\fIbranch_name\fB\fR ] [ \fB--upstream-vcs-tag=\fItag-format\fB\fR ] [ \fB--[no-]sign-tags\fR ] [ \fB--keyid=\fIgpg-keyid\fB\fR ] [ \fB--upstream-tag=\fItag-format\fB\fR ] [ \fB--filter=\fIpattern\fB\fR\fI ...\fR ] [ \fB--component=\fIcomponent\fB\fR\fI ...\fR ] [ \fB--[no-]pristine-tar\fR ] [ \fB--[no-]filter-pristine-tar\fR ] [ \fB--[no-]symlink-orig\fR ] [ \fB--postimport=cmd\fR ] [ \fB--[no-]interactive\fR ] [ \fB--[no-]rollback\fR ] \fB\fIfilename\fB\fR | \fB\fIurl\fB\fR | \fB--uscan\fR
.SH "DESCRIPTION"
.PP
\fBgbp\~import-orig\fR imports upstream sources into a Git
repository. It can import from three sources:
.TP 3
1.
\fIfilename\fR: A file in the local
file system. Gzip, bzip2, lzma and xz compressed tar
archives, zip archives and already unpacked source trees are
supported.
.TP 3
2.
\fIurl\fR: The tarball is downloaded
from a \fIhttp\fR
or \fIhttps\fR \fIurl\fR\&.
This needs the python-request package installed.
.TP 3
3.
\fB--uscan\fR: The latest upstream version is fetched
via \fBuscan\fR relying on \fIdebian/watch\fR\&.
.PP
If the tarballs name is already of the form
\fIpackage-name_version.orig.tar.gz\fR, the
version information is determined from the tarball's filename,
otherwise it can be given on the command line
via \fB--upstream-version\fR\&. If the source package
name or version can't be determined, \fBgbp\~import-orig\fR will
prompt for it unless \fB--no-interactive\fR is given.
.PP
The sources are placed on the upstream branch (default:
\fIupstream\fR), tagged and merged onto the
debian branch (default: \fImaster\fR). This
is either done using \fBgit merge\fR in case
of \fB--merge-mode=\fR\fImerge\fR
(the default) or by creating a new tree that consists of the new
upstream version plus the \fIdebian/\fR
directory. This behaviour can be enabled via
the \fB--merge-mode=\fR\fIreplace\fR
option and is preferable for source format 3.0 (quilt) packages
since direct modifications of the upstream sources are not
allowed in that format and so a 1:1 replacement of the upstream
sources is almost always desired.
.PP
In case of an error \fBgbp\~import-orig\fR will rollback (undo)
all changes it has done to the repository (see
the \fB--rollback\fR option).
.SH "OPTIONS"
.TP
\fB--version\fR
Print version of the program, i.e. version of the git-buildpackage
suite
.TP
\fB-v\fR
.TP
\fB--verbose\fR
Verbose execution
.TP
\fB-h\fR
.TP
\fB--help\fR
Print help and exit
.TP
\fB--color=\fI[auto|on|off]\fB \fR
Whether to use colored output.
.TP
\fB--color-scheme=\fICOLOR_SCHEME\fB \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,
\fB--git-color-scheme=\fR\&'cyan:34::' would
show debug messages in cyan, info messages in blue and other messages
in default (i.e. warning and error messages in red).
.TP
\fB--upstream-version=\fIversion\fB\fR
.TP
\fB-u\fIversion\fB\fR
The upstream version number
.TP
\fB--[no-]merge\fR
Merge the upstream branch to the Debian branch after import
.TP
\fB--merge-mode=\fI[merge|replace]\fB\fR
How to fold the newly imported upstream source to the
Debian packaging branch after import.
The default mode
\fImerge\fR does a
Git \fBmerge\fR leaving you on your own in
case of merge conflict resolution.
\fIreplace\fR mode on the
other hand makes the head of the Debian packaging branch
identical to the newly imported tree but preserves the
content of the \fIdebian/\fR directory
while keeping the current head as well as the newly
important trees as parents of the generated commit. This is
similar to a \fBtheirs\fR merge strategy while
preserving \fIdebian/\fR\&.
.TP
\fB--upstream-branch=\fIbranch_name\fB \fR
The branch in the Git repository the upstream sources are put
onto. Default is \fIupstream\fR\&.
.TP
\fB--debian-branch=\fIbranch_name\fB \fR
The branch in the Git repository the Debian package is being
developed on, default is \fImaster\fR\&. After
importing the new sources on the upstream branch, \fBgbp\~import-orig\fR
will try to merge the new version onto this branch.
.TP
\fB--upstream-vcs-tag=\fItag-format\fB \fR
Add \fItag-format\fR as additional parent to the
commit of the upstream tarball. Useful when upstream uses git and you
want to link to its revision history. The
\fItag-format\fR can be a pattern similar to
what \fB--upstream-tag\fR supports.
.TP
\fB--[no-]sign-tags \fR
GPG sign all created tags
.TP
\fB--keyid=\fIgpg-keyid\fB \fR
use this keyid for gpg signing tags
.TP
\fB--upstream-tag=\fItag-format\fB \fR
use this tag format when tagging upstream versions,
default is \fIupstream/%(version)s\fR
.TP
\fB--import-msg=\fImsg-format\fB \fR
use this format string for the commit message when importing upstream
versions, default is
\fINew upstream version %(version)s\fR
.TP
\fB--filter=\fIpattern\fB \fR
filter out files glob-matching pattern. Can be given multiple times.
.TP
\fB--component=\fICOMPONENT\fB \fR
When importing the upstream tarball also look for an additional tarball
with component name \fICOMPONENT\fR\&. E.g. in
\fIhello-debhelper_1.0.orig-foo.tar.gz\fR
the component would be \fIfoo\fR\&. The additional
tarball is expected to be in the same directory than the upstream tarball
and to use the same compression type.
Using additional original tarballs is a feature of the 3.0
(quilt) source format. See
the \fBdpkg-source\fR manpage for
details. This is currently considered an experimental
feature and might change incompatibly.
.TP
\fB--[no-]pristine-tar \fR
generate \fBpristine-tar\fR delta file
.TP
\fB--[no-]filter-pristine-tar \fR
if using a filter, also filter the files out of the tarball
passed to \fBpristine-tar\fR
.TP
\fB--[no-]symlink-orig\fR
Whether to create and keep a symlink from the upstream tarball
to a Debian policy conformant upstream tarball name located in
\fI\&../\fR\&.
This is a good idea if not using \fBpristine-tar\fR
since it avoids creating a new tarball with a different md5sum.
.TP
\fB--postimport=\fIcmd\fB\fR
Run \fIcmd\fR after the import. The
hook gets the following environment variables passed:
.RS
.TP
\fBGBP_BRANCH\fR
The name of the Debian packaging branch
.TP
\fBGBP_TAG\fR
The name of the just created upstream tag
.TP
\fBGBP_UPSTREAM_VERSION\fR
The just imported upstream version
.TP
\fBGBP_DEBIAN_VERSION\fR
The Debian version of the package with a Debian
revision of '-1'
.RE
.TP
\fB--uscan\fR
Use \fBuscan\fR to fetch new upstream version.
.TP
\fB--[no-]interactive\fR
Run command interactively, i.e. ask package name and version if
needed.
.TP
\fB--[no-]rollback\fR
Rollback changes in case of an error.
.SH "EXAMPLES"
.PP
Download and import a new upstream version using the information from \fIdebian/watch\fR
.nf
\fBgbp\~import-orig\fR --uscan
.fi
.PP
Fetch tarball from an URL
.nf
\fBgbp\~import-orig\fR https://debian.example.com/sid/upstream-tarball-0.1.tar.gz
.fi
.PP
Import a local tarball
.nf
\fBgbp\~import-orig\fR \&../upstream-tarball-0.1.tar.gz
.fi
.SH "CONFIGURATION FILES"
.PP
Several \fIgbp.conf\fR files are parsed
to set defaults for the above command-line arguments. See the
\fBgbp.conf\fR(5)> manpage for details.
.SH "SEE ALSO"
.PP
\fBgbp-buildpackage\fR(1)>,
\fBgbp-import-dsc\fR(1)>,
\fBgbp-import-dscs\fR(1)>,
\fBgbp-dch\fR(1)>,
\fBgbp.conf\fR(5)>,
\fBuscan\fR(1),
\fBdebuild\fR(1),
\fBgit\fR(1),
\fBpristine-tar\fR(1),
\fIThe Git-Buildpackage Manual\fR
.SH "AUTHOR"
.PP
Guido Guenther