diff --git a/snapcraft.yaml b/snapcraft.yaml index 9fe0ab76..334500ac 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -9,6 +9,10 @@ description: | where, what to do before and after it runs, and how to duplicate jobs with minor variations without copy & paste. + To use the LXD backend, connect the lxd interface: + + sudo snap connect spread:lxd lxd:lxd + confinement: strict grade: stable base: core24 @@ -22,6 +26,7 @@ apps: - home - network - network-bind + - lxd parts: spread: @@ -34,3 +39,13 @@ parts: override-pull: | craftctl default craftctl set version="$(date +"%Y.%m.%d")-g$(git rev-parse --short HEAD)" + + lxd: + source: https://github.com/canonical/lxd + source-type: git + source-depth: 1 + source-branch: stable-5.21 + plugin: nil + override-build: | + mkdir "${CRAFT_PART_INSTALL}/bin" + go build -o "${CRAFT_PART_INSTALL}/bin/lxc" ./lxc