[buildout]
extends =
  ../attr/buildout.cfg
  ../bzip2/buildout.cfg
  ../gnutls/buildout.cfg
  ../libaio/buildout.cfg
  ../libcap/buildout.cfg
  ../libcap-ng/buildout.cfg
  ../libpng/buildout.cfg
  ../liburing/buildout.cfg
  ../util-linux/buildout.cfg
  ../meson/buildout.cfg
  ../ncurses/buildout.cfg
  ../ninja/buildout.cfg
  ../patch/buildout.cfg
  ../pkgconfig/buildout.cfg
  ../xorg/buildout.cfg
  ../zlib/buildout.cfg
  ../glib/buildout.cfg

[qemu]
recipe = slapos.recipe.cmmi
shared = true
url = https://download.qemu.org/qemu-5.2.0.tar.xz
md5sum = 179f86928835da857c237b42f4b2df73
patches =
# backport (2021-03-20)
  https://gitlab.com/qemu-project/qemu/-/commit/3eacf70bb5a83e4775ad8003cbca63a40f70c8c2.patch#c4330b02f331a827145009d85e4f6862
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
pre-configure =
  sed -i '/^libmigration\b/s/$/ dependencies: [zlib],/' meson.build
  sed -i 's/\bsnappy,/zlib, \0/' dump/meson.build
configure-options =
  --meson=${meson:location}/bin/meson
  --ninja=${ninja:location}/bin/ninja
  --target-list="$(uname -m 2>/dev/null|sed 's,^i[456]86$,i386,')-softmmu"
  --enable-system
  --disable-sdl
  --disable-xen
  --disable-vnc-sasl
  --disable-curl
  --enable-gnutls
  --enable-kvm
  --enable-linux-aio
  --enable-linux-io-uring
  --enable-virtfs
  --disable-docs
  --enable-curses
  --enable-vnc
  --enable-vnc-png
  --disable-vnc-jpeg
  --disable-werror
environment =
  CFLAGS=-I${gettext:location}/include -I${libaio:location}/include -I${liburing:location}/include -I${libcap-ng:location}/include
  LDFLAGS=-L${gettext:location}/lib -L${libaio:location}/lib -L${libcap-ng:location}/lib -Wl,-rpath=${libcap-ng:location}/lib -Wl,-rpath=${glib:location}/lib -Wl,-rpath=${gnutls:location}/lib -Wl,-rpath=${nettle:location}/lib -Wl,-rpath=${pixman:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${libpng:location}/lib -Wl,-rpath=${libaio:location}/lib -Wl,-rpath=${liburing:location}/lib -Wl,-rpath=${libcap-ng:location}/lib
  PATH=${pkgconfig:location}/bin:${bzip2:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${gnutls:location}/lib/pkgconfig:${gnutls:pkg-config-path}:${libpng:location}/lib/pkgconfig:${liburing:location}/lib/pkgconfig:${ncurses:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig

[qemu:sys.version_info < (3,6)]
environment +=
  PYTHON=${python3:executable}

[debian-netinst-base]
recipe = slapos.recipe.build:download
shared = true
filename = debian-${:version}-${:arch}-netinst.iso
url = https://cdimage.debian.org/cdimage/archive/${:archive}/${:arch}/iso-cd/${:filename}
archive = ${:version}

[debian-amd64-netinst-base]
<= debian-netinst-base
arch = amd64

[debian-amd64-jessie-netinst.iso]
<= debian-amd64-netinst-base
version = 8.11.1
md5sum = df0ce86d0b1d81e232ad08eef58754ed

[debian-amd64-stretch-netinst.iso]
<= debian-amd64-netinst-base
version = 9.13.0
md5sum = 6097fdb9cbab47c96471274b9044e983

[debian-amd64-buster-netinst.iso]
<= debian-amd64-netinst-base
version = 10.11.0
md5sum = 9d7b9cc850464d60ac174787c53e8f3f

[debian-amd64-bullseye-netinst.iso]
<= debian-amd64-netinst-base
version = 11.1.0
md5sum = b710c178eb434d79ce40ce703d30a5f0
alternate-url = https://cdimage.debian.org/cdimage/release/current/${:arch}/iso-cd/${:filename}

[debian-amd64-netinst.iso]
<= debian-amd64-bullseye-netinst.iso

[debian-amd64-testing-netinst.iso]
<= debian-amd64-netinst-base
alternate-url = https://cdimage.debian.org/cdimage/${archive}/${:arch}/iso-cd/${:filename}
archive = bullseye_di_rc3
version = bullseye-DI-rc3
md5sum = 405917de7062c58357a3673c9901f0c4
