sbuild
Build Debian packages in clean chroot environments
TLDR
SYNOPSIS
sbuild [-d dist] [--arch arch] [options] dsc-file
DESCRIPTION
sbuild builds Debian packages inside clean chroot environments managed by schroot, ensuring reproducible results by starting from a pristine base system for each build. Build dependencies are installed fresh each time, eliminating contamination from previous builds or the host system.The tool supports cross-architecture builds, allowing packages to be compiled for different platforms like arm64 or armhf from an x86 host. It is compatible with the Debian buildd infrastructure, meaning packages built with sbuild match the same build process used by official Debian archive builders.
PARAMETERS
-d, --dist=DIST
Target distribution (e.g. unstable, bookworm).--arch=ARCH
Build architecture (e.g. amd64, arm64).-c, --chroot=CHROOT
Use a specific chroot environment.-j, --jobs=N
Number of parallel build jobs.-s, --source
Build source package in addition to binaries.-A, --arch-all
Also build architecture-independent packages.--build-dep-resolver=RESOLVER
Choose dependency resolver: apt (default), aptitude, aspcud.--extra-repository=SPEC
Add an additional apt repository for the build.--run-lintian
Run lintian after a successful build.--no-clean-source
Skip running debian/rules clean before building.--profiles=PROFILE[,...]
Specify build profiles.-p, --purge=MODE
Purge build directory: always, never, or successful.-v, --verbose
Verbose output.-n, --nolog
Print output to stdout only, skip log files.
CAVEATS
Requires chroot setup via sbuild-createchroot. Root privileges or appropriate group membership (sbuild group) needed. Primarily for Debian/Ubuntu packaging.
HISTORY
sbuild was originally developed for the Debian buildd network. It provides clean and reproducible package builds.
SEE ALSO
dpkg-buildpackage(1), pbuilder(1), schroot(1), debootstrap(1), lintian(1)
