NAME
sbuild - build debian packages from source
SYNOPSIS
sbuild [-h|--help | -V|--version] [-v|--verbose | -q|--quiet]
[-D|--debug] [-A|--arch-all] [--archive=archive]
[-d|--dist=distribution] [--arch=architecture] [-s|--source]
[--force-orig-source] [--make-binNMU=changelog-entry] [--binNMU=NMU-
version] [--append-to-version=string] [--add-depends=dependency]
[--add-conflicts=dependency] [--add-depends-indep=dependency] [--add-
conflicts-indep=dependency] [-m|--maintainer=maintainer]
[-e|--uploader=uploader] [-k|--keyid=key-id] [--debbuildopt=option]
[--debbuildopts=options] [-p|--purge=purge-mode] [--purge-deps=purge-
mode] [-b|--batch] [-n|--nolog] [--setup-hook=hook-script]
PACKAGE1_VERSION[.dsc] [PACKAGE2_VERSION[.dsc]
[PACKAGEn_VERSION[.dsc]]]
VERSION
This man page documents the packaged version of sbuild. This version
is maintained by the buildd-tools project developers on Alioth
(https://alioth.debian.org/projects/buildd-tools/).
There is also a version maintained by Ryan Murray which is adapted to
build daemon needs, with similar functionality. This version should be
equally capable of working in a buildd setup, but has a number of
enhancements aimed at making it suitable for use by end-users.
DESCRIPTION
sbuild rebuilds Debian binary packages from the corresponding Debian
source. It is similar to dbuild and debbuild, but, unlike them, it
knows about source dependencies.
sbuild can fetch the Debian source over a network, or it can use
locally available sources.
sbuild mails the build logs to a user. It is configured by the
configuration files /etc/sbuild/sbuild.conf and ~/.sbuildrc. An
example sbuildrc is available in
/usr/share/doc/sbuild/examples/example.sbuildrc. sbuild will not run
without a valid ~/.sbuildrc.
Optionally, source dependencies are read from
/var/lib/sbuild/source-dependencies-*; see that file for more
information on source-dependencies. Also see README.Debian.
You can build either using a local package with its .dsc file or a
remote one by specifying an explicit dpkg version.
Note: sbuild must be run in the directory (~/build by default) with the
chroot-{stable,testing,unstable} symlink to the chroot or it will do
the build in the base install which is not what you want. When using
schroot, these requirements do not apply. If the -c or --chroot option
is used, the specified chroot will be used. Otherwise, the chroot
having the name (or alias) of the specified distribution will be used;
schroot uses a chroot named $distribution-$arch-sbuild,
$distribution-sbuild, $distribution-$arch or $distribution, in that
order of preference.
OPTIONS
-h, --help
Display this manual.
-V, --version
Print version information.
--add-depends=dependency
--add-conflicts=dependency
--add-depends-indep=dependency
--add-conflicts-indep=dependency
These options add a build dependencies to the source package
being built, in addition to the build dependency information
specified in debian/control. These dependencies will be
concatenated directly to the Build-Depends, Build-Conflicts,
Build-Depends-Indep and Build-Conflicts-Indep dependencies,
respectively. The options may be used any number of times to
add multiple dependencies. The format is identical to the
format used in debian/control.
--arch=architecture
Build using the architecture specified. A chroot named
$distribution-$arch-sbuild or $distribution-arch is searched
for, in that order of preference. The chroot must be installed
and configured appropriately to build as that architecture, e.g.
using personality=linux32 to build i386 packages on an amd64
system.
-A, --arch-all
Also build Architecture: all packages, i.e. use
dpkg-buildpackage -b instead of -B.
-b, --batch
Operate in batchmode, i.e. write a build-progress file during
execution and files on shutdown to facilitate a clean restart.
-c, --chroot
Use the specified chroot. If not specified, the default is the
first of $distribution-$arch-sbuild, $distribution-sbuild,
$distribution-$arch or $distribution that exists.
-C, --check-depends-algorithm=algorithm
Selects the algorithm to check for build dependencies. The
default algorithm ('first-only') just checks the first package,
even if there are alternative dependencies available. The second
algorithm ('alternatives') also tries to satisfy the build
dependencies using these alternatives.
-d, --dist=distribution
Fetch source packages from specified distribution.
--archive=archive
Communicate with specified archive.
-D, --debug
Enable debug output.
--apt-clean
Run apt-get clean in the chroot before executing the build.
--apt-update
Run apt-get update in the chroot before executing the build.
--apt-upgrade
Run apt-get upgrade in the chroot before executing the build.
--apt-distupgrade
Run apt-get distupgrade in the chroot before executing the
build.
-m, --maintainer=maintainer
Passed to dpkg-genchanges and is used to set the Maintainer:
field in the .changes file(s). This defaults to the DEBEMAIL
environment variable if set.
-e, --uploader=uploader
Passed to dpkg-genchanges and is used to set the Changed-by:
field in the .changes file(s).
-k, --keyid=key-id
Passed to dpkg-genchanges and is used to set the key to sign the
.changes file(s). Default is not using any key.
--debbuildopt=option
Pass the specified option directly to dpkg-buildpackage.
--debbuildopts=options
Pass the specified options directly to dpkg-buildpackage. The
options should be separated by spaces. If any options contain
spaces, use --debbuildopt instead.
--mail-log-to=email-address
Send the build log to the specified email address. This
overrides the $mailto configuration option.
-n, --nolog
Do not create a package log file in the $log_dir directory and
no build log file, but print everything to stdout. Also do not
send any log mails.
-p, --purge=purge-mode
purge-mode determines if the build directory will be deleted
after a build. Possible values are always, never, and
successful.
--purge-deps=purge-mode
purge-mode determines if the build dependencies will be removed
after a build. Possible values are always, never, and
successful.
-s, --source
Also build source package, i.e. use dpkg-buildpackage without
-B.
--force-orig-source
When used with in conjunction with -s, this option forces the
inclusion of the orig.tar.gz file in the generated .changes
file, even in cases where it would not normally be included,
i.e. use dpkg-buildpackage -sa.
--use-snapshot
Installs the latest snapshot gcc compiler from the gcc-snapshot
package, and alters the build environment to use the snapshot
compiler for the build.
-v, --verbose
Be verbose, i.e. all information goes to stdout as well as to
the log files.
-q, --quiet
Be quiet. This is the opposite of --verbose.
--make-binNMU=changelog-entry
With this option, sbuild will create a new changelog entry in
debian/changelog of every package built. The version number will
be in the format for binary-only NMUs (see --binNMU); the
maintainer is set to the maintainer name configured for sbuild.
changelog-entry will be used as the changelog entry following
"Binary-only non-maintainer upload for ARCH -- no source
changes". Please note that the versions in the
PACKAGE_VERSION[.dsc] arguments still have to be the unmodified
(non-NMU ones) so that the sources can be found. The version
number in log files and mails will be modified by sbuild
automatically.
--binNMU=NMU-version
The version number of the binary NMU. This should be used in
conjunction with --make-binNMU. version is a single number for
the (+bn) format used for binary NMUs.
--append-to-version=string
This option is similar to --make-binNMU except that it allows
the user to specify an arbitrary string to be appended to the
version number (immediately before the '+' in the Debian
revision if --make-binNMU is also provided).
--setup-hook=hook-script
Run the specified script inside the chroot before building.
This script may perform any required actions to customise or
configure the chroot. Note that the script will be run inside
the chroot, and so the script must exist inside the chroot
rather than the host system.
ENVIRONMENT VARIABLES
The following environment variables are used by sbuild:
DEBEMAIL
The maintainer name of the user.
HOME The home directory of the user.
LOGNAME
Used in lockfiles.
sourcebase
A URL for a Debian source distribution; generated by sbuild for
scripts in source-dependencies.
binarybase
A URL for a Debian binary distribution; generated by sbuild for
scripts in source-dependencies.
FILES
/etc/sbuild/sbuild.conf
Configuration, maintained by the system administrator. This may
be used to override the defaults.
/etc/sbuild/chroot
Directory containing symbolic links to chroots. This is only
used for sudo chroot access; schroot access uses the schroot
chroot configuration.
~/.sbuildrc
User-specific configuration.
/var/lib/sbuild
Build statistics, source dependencies and lock files.
AUTHORS
Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>.
sbuild is based on debbuild, written by James Troup <james@nocrew.org>
and has been modified by
Ben Collins <bcollins@debian.org>,
Ryan Murray <rmurray@debian.org>,
Francesco Paolo Lovergine <frankie@debian.org>,
Michael Banck <mbanck@debian.org>, and
Roger Leigh <rleigh@debian.org>
COPYRIGHT
Copyright (C) 1998-2000 Roman Hodek <roman@hodek.net>
Copyright (C) 1998-1999 James Troup <troup@debian.org>
Copyright (C) 2003-2006 Ryan Murray <rmurray@debian.org>
Copyright (C) 2001-2003 Rick Younie <younie@debian.org>
Copyright (C) 2003-2004 Francesco Paolo Lovergine <frankie@debian.org>
Copyright (C) 2005 Michael Banck <mbanck@debian.org>
Copyright (C) 2005-2009 Roger Leigh <rleigh@debian.org>
SEE ALSO
sbuild-abort(1), sbuild-adduser(8), sbuild-apt(1),
sbuild-checkpackages(1), sbuild-createchroot(8), sbuild-distupgrade(1),
sbuild-hold(1), sbuild-setup(7). sbuild-shell(1), sbuild-stats(1),
sbuild-unhold(1), sbuild-update(1), sbuild-upgrade(1), schroot(1),