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:

  1. builds a temporary container from an existing given image,
  2. runs autopkgtest's standard setup-commands/setup-testbed script inside it,
  3. 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 with autopkgtest-virt-lxd --vm or autopkgtest-virt-incus --vm. yes, a whole virtual machine. she's big. she's powerful. πŸ’ͺ
  • --lxd β€” use LXD. this is the default when invoked as autopkgtest-build-lxd.
  • --incus β€” use Incus. this is the default when invoked as autopkgtest-build-incus.
  • -r REMOTE | --remote REMOTE β€” run the container or VM on the given remote host instead of locally. go peek at lxc remote list or incus remote list to 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_SOURCES is set to a non-empty value, autopkgtest-build-lxd will keep whatever /etc/apt/sources.list was 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_FILE is set to a non-empty value, for example AUTOPKGTEST_APT_SOURCES_FILE=/home/me/mydistro/sources.list, then autopkgtest-build-lxd reads that file (on the host system, not in the container, ok!) and uses it to populate /etc/apt/sources.list in the container.
  • or if $AUTOPKGTEST_APT_SOURCES is set to a non-empty value, for example AUTOPKGTEST_APT_SOURCES=$(cat /home/me/mydistro/sources.list), then autopkgtest-build-lxd writes it directly into /etc/apt/sources.list in 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_PROXY environment 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 $RELEASE environment 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-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