LinuxCommandLibrary

sbuild

Build Debian packages in clean chroot environments

TLDR

Build package

$ sbuild [package.dsc]
copy
Build for distribution
$ sbuild -d [unstable] [package.dsc]
copy
Build with arch
$ sbuild --arch=[arm64] [package.dsc]
copy
Clean chroot
$ sbuild-update --clean [chroot-name]
copy
Create chroot
$ sbuild-createchroot [unstable] [/srv/chroot/unstable]
copy

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

Target distribution.
--arch ARCH
Build architecture.
-c CHROOT
Use specific chroot.
-n
No install build-deps.
--purge WHEN
Purge build directory.
-v
Verbose output.

CAVEATS

Requires chroot setup. Root privileges needed. Debian/Ubuntu focused.

HISTORY

sbuild was originally developed for the Debian buildd network. It provides clean and reproducible package builds.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community