'\" t
.\" Title: debspawn-build
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 18 August, 2018
.\" Manual: debspawn build
.\" Source: DebSpawn
.\" Language: English
.\"
.TH "DEBSPAWN\-BUILD" "1" "" "DebSpawn" "debspawn build"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
debspawn-build \- Build Debian package in a container
.SH "SYNOPSIS"
.HP \w'\fBdebspawn\ build\fR\ 'u
\fBdebspawn build\fR [\-h|\-\-help] [\-\-variant] [\-a|\-\-arch] [\-s|\-\-sign] [\-\-only] [\-\-include\-orig] [\-\-buildflags] [\-\-results\-dir] [\-\-maintainer] {SUITE} [DIR|DSC_FILE]
.SH "DESCRIPTION"
.PP
Build a Debian package from a directory or source package
*\&.dsc
file\&.
\fBdebspawn\fR
will create a new container for the respective build using the base image specified, build the package and return build artifacts in the default output directory
/var/lib/debspawn/results/
unless a different location was specified via
\fB\-\-results\-dir\fR\&.
.PP
Packages downloaded prior to the actual build are cached and will be reused on subsequent builds\&.
.SH "EXAMPLES"
.PP
You can build a package from its source directory, or just by passing a plain
\&.dsc
file to
\fBdebspawn build\fR\&. If the result should be automatically signed, the
\fB\-\-sign\fR
flag needs to be passed too:
.sp
.if n \{\
.RS 4
.\}
.nf
$ \fBcd\fR ~/packages/hello
$ \fBdebspawn build\fR sid \-\-sign
$ \fBdebspawn build\fR \-\-arch=i386 cosmic \&./hello_2\&.10\-1\&.dsc
.fi
.if n \{\
.RE
.\}
.PP
You can also build packages using
\fBgit\-buildpackage\fR
and
\fBdebspawn\fR:
.sp
.if n \{\
.RS 4
.\}
.nf
$ \fBgbp buildpackage\fR \-\-git\-builder=\*(Aqdebspawn build sid \-\-sign\*(Aq
.fi
.if n \{\
.RE
.\}
.SH "OPTIONS"
.PP
\-h|\-\-help
.RS 4
Print brief help information about available commands\&.
.RE
.PP
\-\-variant
.RS 4
Set the variant of the selected image, that was used for bootstrapping\&.
.RE
.PP
\-a|\-\-arch
.RS 4
The architecture of the base image that should be selected\&.
.RE
.PP
\-s|\-\-sign
.RS 4
Sign the resulting package\&.
.RE
.PP
\-\-only
.RS 4
Select only a specific set of packages to be built\&. Choices are:
\fBbinary\fR: Build only binary packages, no source files are to be built and/or distributed\&.
\fBarch\fR: Build only architecture\-specific binary packages\&.
\fBindep\fR: Build only architecture\-independent (arch:all) binary packages\&.
\fBsource\fR: Do a source\-only build, no binary packages are made\&.
.RE
.PP
\-\-include\-orig
.RS 4
Forces the inclusion of the original source\&.
.RE
.PP
\-\-buildflags
.RS 4
Set flags passed through to dpkg\-buildpackage\&.
.RE
.PP
\-\-results\-dir
.RS 4
Override the configured results directory and return artifacts at a custom location\&.
.RE
.PP
\-\-maintainer
.RS 4
Set the name and email address of the maintainer for this package and upload, rather than using rather than using the information from the source tree\*(Aqs control file or changelog\&.
.RE
.SH "DIFFERENCES TO SBUILD"
.PP
On Debian,
\fBsbuild\fR
is used primarily for package building, which uses different technology\&. So naturally, the question is whether the sbuild build environments and the
\fBdebspawn\fR
build environments are be identical or at least compatible\&.
.PP
Due to the different technology used, there may be subtle differences between
\fBsbuild\fR
chroots and
\fBdebspawn\fR
containers\&. The differences should not have any impact on package builds, and any such occurrence is highly likely a bug in the package\*(Aqs build process\&. If you think it is not, please file a bug against Debspawn\&. We try to be as close to sbuild\*(Aqs default environment as possible, but unfortunately can not make any guarantees\&.
.PP
One way the build environment of
\fBdebspawn\fR
differs from Debian\*(Aqs default sbuild setup intentionally is in its consistent use of unicode\&. By default, debspawn will ensure that unicode is always available and default\&. If you do not want this behavior, you can pass the
\fB\-\-no\-unicode\fR
flag to
\fBdebspawn build\fR
to disable unicode in the tool itself and in the build environment\&.
.SH "SEE ALSO"
.PP
debspawn\-update(1), debspawn\-create(1), dpkg\-buildpackage(1)\&.
.SH "AUTHOR"
.PP
This manual page was written by Matthias Klumpp
\&.
.SH "COPYRIGHT"
.br
Copyright \(co 2018 Matthias Klumpp
.br