SBUILD-QEMU(1)
π SBUILD-QEMU(1) π
okay bestie, so this is sbuild-qemu, from the Debian sbuild manual pages β it's the whole "build packages with sbuild but the chroot is a QEMU image" situation. it's giving main character energy and honestly? obsessed.
β¨ NAME β¨
sbuild-qemu β sbuild, but make it QEMU images π¦
πΈ SYNOPSIS πΈ
sbuild-qemu [-h] [--image=IMAGE] [--ram-size=MiB] [--cpus=CPUs]
[--overlay-dir=OVERLAY_DIR] [--noexec] [--autopkgtest-debug] [<sbuild-options>]
Build Debian packages with sbuild using QEMU images, by using sbuild's --chroot-mode=autopkgtest. that's the whole vibe. π
So like, every option that is not one of the ones described down below just gets passed through to sbuild(1), no drama. BUT β the options --dist, --arch and --build get peeked at π when it's hunting for images. The image gets started in -snapshot mode, so the image is never modified β which means multiple processes can use the same image concurrently. no fighting, no jealousy, sharing is caring. π«Ά
π OPTIONS π
-h,--helpβ shows this help message and dips out. bye. βοΈ--image=IMAGEβ the QEMU image file you wanna use for building. If you don't specify it,sbuild-qemugoes looking for an image namedDIST-autopkgtest-ARCH.img, whereDISTcomes from--distif it's there, andARCHcomes from--archor--buildif they're there. If none of that exists,DISTdefaults to'unstable'andARCHdefaults to the host architecture. It checks the current directory for that image first, and then the directory$IMAGEDIR. oh and if you need to make a suitable image, that's whatsbuild-qemu-create(1)is for. β¨--ram-size=MiBβ VM memory size in MB. Default:2048--cpus=CPUsβ VM CPU count. Default:2--overlay-dir=OVERLAY_DIRβ directory for the temporary image overlay, instead of autopkgtest's default of/tmp(or$TMPDIR).--noexecβ don't actually do anything. like, at all. just print thesbuild(1)command string that would have been executed, then exit. window shopping, basically. ποΈ--autopkgtest-debugβ turns on debug output for theautopkgtest-virt-qemu(1)driver.--boot=auto,bios,efi,ieee1275,noneβ how to boot the image. Default is BIOS onamd64andi386, EFI onarm64andarmhf, and IEEE1275 onppc64el.
π§ CONSIDERATIONS π§
Using a fast temporary image overlay is key to faster build times. An overlay created on a tmpfs would be ideal, and it can speed up I/O by an order of magnitude compared to a slow HDD. If /tmp or $TMPDIR are mountpoints for a tmpfs, then everything should be fine by default. slay. π
HOWEVER β tmpfs filesystems are backed by memory and swap on the host, so a build that needs substantial disk space in the VM may fail. π If that happens, you should use the --overlay-dir option to point at a host directory with more available disk space. Also note that the base image itself must have been created with a suitable size β see the --size option to sbuild-qemu-create(1).
π LIMITATIONS π
Because of the nature of sbuild's --chroot-mode=autopkgtest, not all sbuild options are supported yet. In particular, getting an interactive shell β for example using --build-failed-command β is NOT possible. nope. not happening. π
But bestie, don't spiral β there are other ways to access the build environment (see below π).
π VM ACCESS π
sbuild's --chroot-mode=autopkgtest uses autopkgtest-virt-qemu under the hood, so you'll find an SSH shell on port 10022 (or the first free port after that) if, and only if, the openssh-server package is installed in the VM.
And as a further consequence of this chroot mode, what is stated in autopkgtest-virt-qemu(1) generally also holds here. iykyk. π€
β EXAMPLES β
$ sbuild-qemu -d unstable -s --arch-all FOO.dsc
This will build the package FOO.dsc using unstable as the Distribution in the generated .changes file.
Because the --image option was not specified, an image with the name unstable-autopkgtest-amd64.img will be looked for first in the current directory, and then in $IMAGEDIR.
The -s and --arch-all aren't known to sbuild-qemu, so they'll be passed on through to sbuild for it to use. teamwork makes the dream work. π«Ά
π ENVIRONMENT π
$IMAGEDIR defaults to ~/.cache/sbuild.
π COPYRIGHT π
Copyright Β© 2020-2022 Christian Kastner <ckk@debian.org>
π₯ SEE ALSO π₯
sbuild(1), sbuild-qemu-create(1), sbuild-qemu-update(1).
and that's the tea, bestie β Version 0.91.10ubuntu1, dated 29 June 2026, straight from the Debian sbuild crew. now go build something iconic. periodt. π β¨π
π¦ where this page comes from
- ubuntu stonking: sbuild-qemu 0.91.10ubuntu1 Β· GPL-2.0-or-later
- Copyright Β© 2020-2022 Christian Kastner <ckk@debian.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms