[buildout]
extends =
  ../file/buildout.cfg
  ../openssh/buildout.cfg
  ../p7zip/buildout.cfg
  ../qemu-kvm/buildout.cfg

parts = vm-debian

[vm-run-environment]
PATH = ${openssh:location}/bin:${qemu:location}/bin:%(PATH)s

[vm-install-environment]
PATH = ${file:location}/bin:${p7zip:location}/bin:${vm-run-environment:PATH}

[vm-run-base]
recipe = slapos.recipe.build:vm.run
environment = vm-run-environment
vm = ${vm-debian:location}
dist = ${vm-debian:dists}

[vm-debian]
recipe = slapos.recipe.build:vm.install-debian
environment = vm-install-environment
dists = debian-jessie
size = 1Gi
late-command =
# rdnssd causes too much trouble with recent QEMU, because the latter acts as
# a DNS proxy on both IPv4 and IPv6 without translating queries to what the
# host supports.
  dpkg -P rdnssd
debconf.debconf =
  debconf/frontend noninteractive
  debconf/priority critical
# minimal size
preseed.recommends = false
preseed.tasks =
packages = localepurge

[debian-jessie]
x86_64.iso = debian-amd64-netinst.iso
x86_64.kernel = install.amd/vmlinuz
x86_64.initrd = install.amd/initrd.gz

[debian-stretch]
<= debian-jessie
x86_64.iso = debian-amd64-testing-netinst.iso
