autopkgtest-build-lxd(1)
π autopkgtest-build-lxd β hey bestie, let's talk about autopkgtest-build-lxd(1) π
okay so welcome to the General Commands Manual entry for autopkgtest-build-lxd, and yes it has a twin, autopkgtest-build-incus, and they're literally the same tool wearing different outfits. pull up a chair. π«Ά
β¨ NAME β¨
autopkgtest-build-lxd, autopkgtest-build-incus β create or update an autopkgtest container for autopkgtest-virt-lxd or autopkgtest-virt-incus
like. that's the whole job. build the container, hand it to the runner. iconic behavior honestly. π
πΈ SYNOPSIS πΈ
autopkgtest-build-lxd image
autopkgtest-build-incus image
two commands, one argument, zero drama. so clean. β¨
π¦ DESCRIPTION π¦
okok so autopkgtest-build-lxd creates or updates a LXD or Incus image that's been optimized for autopkgtest's LXD/Incus runner β that's autopkgtest-virt-lxd(1) or autopkgtest-virt-incus(1) if you wanna go read those next bestie, no pressure, but you should. π
now here's the little identity crisis moment: which one does it use?
- when you run it as
autopkgtest-build-lxd, or you pass--lxd, it uses LXD. - when you run it as
autopkgtest-build-incus, or you pass--incus, it uses Incus.
and here's the cute part β the images this tool spits out are intended to be suitable for use with either LXD or Incus. one image, two homes. flexible queen. π
so what's it actually DO though. it:
- builds a temporary container from an existing given image,
- runs autopkgtest's standard
setup-commands/setup-testbedscript inside it, - publishes it as a new image with the alias
autopkgtest/distro/release/architecture.
periodt. that's the pipeline. π
π OPTIONS π
-h|--helpβ displays the help message and exits. always here for you when you're lost. π₯Ί--vmβ prepare a VM image instead of a container image, to be used withautopkgtest-virt-lxd --vmorautopkgtest-virt-incus --vm. yes, a whole virtual machine. she's big. she's powerful. πͺ--lxdβ use LXD. this is the default when invoked asautopkgtest-build-lxd.--incusβ use Incus. this is the default when invoked asautopkgtest-build-incus.-r REMOTE|--remote REMOTEβ run the container or VM on the given remote host instead of locally. go peek atlxc remote listorincus remote listto see what remotes you've got. β¨
π ENVIRONMENT π
this part is giving "the tool obeys your vibes" and honestly I love that for us. here's the tea:
- if
$AUTOPKGTEST_KEEP_APT_SOURCESis set to a non-empty value,autopkgtest-build-lxdwill keep whatever/etc/apt/sources.listwas present in the existing image. untouched. preserved. no notes. π
otherwise (so like, if that one's not doing anything for you):
- if
$AUTOPKGTEST_APT_SOURCES_FILEis set to a non-empty value, for exampleAUTOPKGTEST_APT_SOURCES_FILE=/home/me/mydistro/sources.list, thenautopkgtest-build-lxdreads that file (on the host system, not in the container, ok!) and uses it to populate/etc/apt/sources.listin the container. - or if
$AUTOPKGTEST_APT_SOURCESis set to a non-empty value, for exampleAUTOPKGTEST_APT_SOURCES=$(cat /home/me/mydistro/sources.list), thenautopkgtest-build-lxdwrites it directly into/etc/apt/sources.listin the container. direct. no middleman. π
and when $AUTOPKGTEST_APT_SOURCES_FILE or $AUTOPKGTEST_APT_SOURCES contain sources in the deb822 format, the sources get written to /etc/apt/sources.list.d/<distro>.sources in the container rather than /etc/apt/sources.list. look at her, adapting. πΈ
- you can specify an apt proxy for the container to use with the
$AUTOPKGTEST_APT_PROXYenvironment variable. if you've got an apt proxy configured on the host, the container will automatically use this; otherwise there is no default. so if you need one, say it out loud bestie. π - for dist-upgrading an image to a newer release, you can specify the destination release in the
$RELEASEenvironment variable. super handy when a new distribution series has just been opened and there are no standard images for that available yet β you're the pioneer. main character energy fr fr. π₯
π EXAMPLE π
okay practical demo time, let's gooo:
build a local autopkgtest container image for Debian forky amd64, using Incus, based on the stock Debian image from the public images.linuxcontainers.org remote:
$ autopkgtest-build-incus images:debian/forky/amd64
or using LXD, based on the stock Debian image from the public images.lxd.canonical.com remote:
$ autopkgtest-build-lxd images:debian/forky/amd64
and now the glow-up version β build a local Incus autopkgtest virtual machine image for Debian sid amd64, by upgrading from a stock forky virtual machine image:
$ RELEASE=sid autopkgtest-build-incus --vm images:debian/forky/amd64
see how RELEASE=sid just slides in there before the command? that's the whole trick. chef's kiss. π§
π SEE ALSO π
go read these when you're done here, they're all bangers:
autopkgtest-virt-lxd(1)autopkgtest(1)lxc(1)/usr/share/doc/autopkgtest/
π AUTHORS AND COPYRIGHT π
autopkgtest-build-lxd was written by Martin Pitt <martin.pitt@ubuntu.com> β thank you king, we appreciate you. π«Ά
this manpage is part of autopkgtest, a tool for testing Debian binary packages. autopkgtest is Copyright (C) 2006-2015 Canonical Ltd and others.
see /usr/share/doc/autopkgtest/CREDITS for the list of contributors and the full copying conditions. π
and that's the whole page bestie!! π
sign-off time: this little legend lives in the Linux Programmer's Manual, datestamped 2015, and you can find it filed under autopkgtest-build-lxd(1). go build something gorgeous, ily, bye!! πβ¨π
π¦ where this page comes from
- ubuntu stonking: autopkgtest 6.0 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms