[buildout]

extends =
  ../../component/bcrypt/buildout.cfg
  ../../component/curl/buildout.cfg
  ../../component/openssl/buildout.cfg
  ../../component/git/buildout.cfg
  ../../component/pycurl/buildout.cfg
  ../../component/faketime/buildout.cfg
  ../../component/pillow/buildout.cfg
  ../../component/psycopg2/buildout.cfg
  ../../component/python-cryptography/buildout.cfg
  ../../component/python-mysqlclient/buildout.cfg
  ../../component/python-pynacl/buildout.cfg
  ../../component/python-backports-lzma/buildout.cfg
  ../../component/selenium/buildout.cfg

  ../../stack/slapos.cfg
  ../../stack/nxdtest.cfg
  ../../stack/caucase/buildout.cfg

  ./buildout.hash.cfg

parts =
  eggs/scripts
  system-python-disabled
  slapos-cookbook
  template

shared-part-list =

[setup-develop-egg]
recipe = zc.recipe.egg:develop

[slapos.cookbook-setup]
<= setup-develop-egg
egg = slapos.cookbook[test]
setup = ${slapos-repository:location}/

[slapos.test.backupserver-setup]
<= setup-develop-egg
egg = slapos.test.backupserver
setup = ${slapos-repository:location}/software/backupserver/test/

[slapos.test.dufs-setup]
<= setup-develop-egg
egg = slapos.test.dufs
setup = ${slapos-repository:location}/software/dufs/test/

[slapos.test.erp5-setup]
<= setup-develop-egg
egg = slapos.test.erp5
setup = ${slapos-repository:location}/software/erp5/test/

[slapos.test.upgrade_erp5-setup]
<= setup-develop-egg
egg = slapos.test.upgrade_erp5
setup = ${slapos-repository:location}/software/erp5/upgrade_test/

[slapos.test.htmlvalidatorserver-setup]
<= setup-develop-egg
egg = slapos.test.htmlvalidatorserver
setup = ${slapos-repository:location}/software/htmlvalidatorserver/test/

[slapos.test.slapos-master-setup]
<= setup-develop-egg
egg = slapos.test.slapos-master
setup = ${slapos-repository:location}/software/slapos-master/test/

[slapos.test.jstestnode-setup]
<= setup-develop-egg
egg = slapos.test.jstestnode
setup = ${slapos-repository:location}/software/jstestnode/test/

[slapos.test.kvm-setup]
<= setup-develop-egg
egg = slapos.test.kvm
setup = ${slapos-repository:location}/software/kvm/test/

[slapos.test.monitor-setup]
<= setup-develop-egg
egg = slapos.test.monitor
setup = ${slapos-repository:location}/software/monitor/test/

[slapos.test.plantuml-setup]
<= setup-develop-egg
egg = slapos.test.plantuml
setup = ${slapos-repository:location}/software/plantuml/test/

[slapos.test.powerdns-setup]
<= setup-develop-egg
egg = slapos.test.powerdns
setup = ${slapos-repository:location}/software/powerdns/test/

[slapos.test.proftpd-setup]
<= setup-develop-egg
egg = slapos.test.proftpd
setup = ${slapos-repository:location}/software/proftpd/test/

[slapos.test.rapid-cdn-setup]
<= setup-develop-egg
egg = slapos.test.rapid-cdn
setup = ${slapos-repository:location}/software/rapid-cdn/test/

[slapos.test.re6stnet-setup]
<= setup-develop-egg
egg = slapos.test.re6stnet
setup = ${slapos-repository:location}/software/re6stnet/test/

[slapos.test.restic_rest_server-setup]
<= setup-develop-egg
egg = slapos.test.restic_rest_server
setup = ${slapos-repository:location}/software/restic-rest-server/test/

[slapos.test.seleniumserver-setup]
<= setup-develop-egg
egg = slapos.test.seleniumserver
setup = ${slapos-repository:location}/software/seleniumserver/test/

[slapos.test.ssh-setup]
<= setup-develop-egg
egg = slapos.test.ssh
setup = ${slapos-repository:location}/software/ssh/test/

[slapos.test.metabase-setup]
<= setup-develop-egg
egg = slapos.test.metabase
setup = ${slapos-repository:location}/software/metabase/test/

[slapos.test.ors-amarisoft-setup]
<= setup-develop-egg
egg = slapos.test.ors-amarisoft
setup = ${slapos-repository:location}/software/ors-amarisoft/test/

[slapos.test.fluentd-setup]
<= setup-develop-egg
egg = slapos.test.fluentd
setup = ${slapos-repository:location}/software/fluentd/test/

[slapos.test.helloworld-setup]
<= setup-develop-egg
egg = slapos.test.helloworld
setup = ${slapos-repository:location}/software/helloworld/test/

[slapos.test.html5as-setup]
<= setup-develop-egg
egg = slapos.test.html5as
setup = ${slapos-repository:location}/software/html5as/test/

[slapos.test.html5as-base-setup]
<= setup-develop-egg
egg = slapos.test.html5asbase
setup = ${slapos-repository:location}/software/html5as-base/test/

[slapos.test.hugo-setup]
<= setup-develop-egg
egg = slapos.test.hugo
setup = ${slapos-repository:location}/software/hugo/test/

[slapos.test.matomo-setup]
<= setup-develop-egg
egg = slapos.test.matomo
setup = ${slapos-repository:location}/software/matomo/test/

[slapos.test.jupyter-setup]
<= setup-develop-egg
egg = slapos.test.jupyter
setup = ${slapos-repository:location}/software/jupyter/test/

[slapos.test.nextcloud-setup]
<= setup-develop-egg
egg = slapos.test.nextcloud
setup = ${slapos-repository:location}/software/nextcloud/test/

[slapos.test.nginx-push-stream-setup]
<= setup-develop-egg
egg = slapos.test.nginx_push_stream
setup = ${slapos-repository:location}/software/nginx-push-stream/test/

[slapos.test.turnserver-setup]
<= setup-develop-egg
egg = slapos.test.turnserver
setup = ${slapos-repository:location}/software/turnserver/test/

[slapos.test.theia-setup]
<= setup-develop-egg
egg = slapos.test.theia
setup = ${slapos-repository:location}/software/theia/test/

[slapos.test.grafana-setup]
<= setup-develop-egg
egg = slapos.test.grafana
setup = ${slapos-repository:location}/software/grafana/test/

[slapos.test.gitlab-setup]
<= setup-develop-egg
egg = slapos.test.gitlab
setup = ${slapos-repository:location}/software/gitlab/test/

[slapos.test.cloudooo-setup]
<= setup-develop-egg
egg = slapos.test.cloudooo
setup = ${slapos-repository:location}/software/cloudooo/test/

[slapos.test.dream-setup]
<= setup-develop-egg
egg = slapos.test.dream
setup = ${slapos-repository:location}/software/dream/test/

[slapos.test.repman-setup]
<= setup-develop-egg
egg = slapos.test.repman
setup = ${slapos-repository:location}/software/repman/test/

[slapos.test.jscrawler-setup]
<= setup-develop-egg
egg = slapos.test.jscrawler
setup = ${slapos-repository:location}/software/jscrawler/test/

[slapos.test.galene-setup]
<= setup-develop-egg
egg = slapos.test.galene
setup = ${slapos-repository:location}/software/galene/test/

[slapos.test.headless-chromium-setup]
<= setup-develop-egg
egg = slapos.test.headless-chromium
setup = ${slapos-repository:location}/software/headless-chromium/test/

[slapos.test.caucase-setup]
<= setup-develop-egg
egg = slapos.test.caucase
setup = ${slapos-repository:location}/software/caucase/test/

[slapos.test.erp5testnode-setup]
<= setup-develop-egg
egg = slapos.test.erp5testnode
setup = ${slapos-repository:location}/software/erp5testnode/test/

[slapos.test.beremiz-ide-setup]
<= setup-develop-egg
egg = slapos.test.beremiz_ide
setup = ${slapos-repository:location}/software/beremiz-ide/test/

[slapos.test.mosquitto-setup]
<= setup-develop-egg
egg = slapos.test.mosquitto
setup = ${slapos-repository:location}/software/mosquitto/test/

[slapos.test.peertube-setup]
<= setup-develop-egg
egg = slapos.test.peertube
setup = ${slapos-repository:location}/software/peertube/test/

[slapos.test.js-drone-setup]
<= setup-develop-egg
egg = slapos.test.js_drone
setup = ${slapos-repository:location}/software/js-drone/test/

[slapos.test.osie-coupler-setup]
<= setup-develop-egg
egg = slapos.test.osie_coupler
setup = ${slapos-repository:location}/software/osie-coupler/test/

[slapos.core-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.core.git
branch = master

[slapos.core-setup]
<= setup-develop-egg
egg = slapos.core
setup = ${slapos.core-repository:location}

[system-python-disabled]
# An "intentionally broken" python command that should catch
# accidental usage of things like #!/usr/bin/env python
recipe = zc.recipe.egg
# we need an egg to generate a script, use the one from this part's recipe
eggs = ${:recipe}
interpreter = python2.7
entry-points =
  python=${:eggs}:ignored
  python2=${:eggs}:ignored
  python2.7=${:eggs}:ignored
  python3=${:eggs}:ignored
  python3.5=${:eggs}:ignored
  python3.6=${:eggs}:ignored
  python3.7=${:eggs}:ignored
  python3.8=${:eggs}:ignored
  python3.9=${:eggs}:ignored
  python3.10=${:eggs}:ignored
  python3.11=${:eggs}:ignored
  python3.12=${:eggs}:ignored
  python3.13=${:eggs}:ignored
  python3.14=${:eggs}:ignored
scripts =
  python
  python2
  python2.7
  python3
  python3.5
  python3.6
  python3.7
  python3.8
  python3.9
  python3.10
  python3.11
  python3.12
  python3.13
  python3.14
initialization =
  import sys
  print("Error: attempt to use system python. Executed with: %s" % sys.argv, file=sys.stderr)
  sys.exit(2)

[recurls-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/luke/recurls.git
revision = 1797eb42c2c1a8efad0f80bd331a01f5d53f83b5

[recurls-setup]
<= setup-develop-egg
egg = recurls
setup = ${recurls-repository:location}

[python-interpreter]
eggs +=
  ${lxml-python:egg}
  ${python-PyYAML:egg}
  ${slapos.core-setup:egg}
  ${recurls-setup:egg}
  ${pillow-python:egg}
  ${pycurl:egg}
  caucase
  erp5.util
  ${python-pynacl:egg}
  ${python-cryptography:egg}
  ${python-mysqlclient:egg}
  ${bcrypt:egg}
  ${psycopg2:egg}
  ${selenium:egg}
  slapos.libnetworkcache
  supervisor
  ${slapos.cookbook-setup:egg}
  ${slapos.test.backupserver-setup:egg}
  ${slapos.test.beremiz-ide-setup:egg}
  ${slapos.test.caucase-setup:egg}
  ${slapos.test.cloudooo-setup:egg}
  ${slapos.test.dream-setup:egg}
  ${slapos.test.dufs-setup:egg}
  ${slapos.test.erp5-setup:egg}
  ${slapos.test.erp5testnode-setup:egg}
  ${slapos.test.fluentd-setup:egg}
  ${slapos.test.galene-setup:egg}
  ${slapos.test.headless-chromium-setup:egg}
  ${slapos.test.html5as-base-setup:egg}
  ${slapos.test.html5as-setup:egg}
  ${slapos.test.htmlvalidatorserver-setup:egg}
  ${slapos.test.hugo-setup:egg}
  ${slapos.test.js-drone-setup:egg}
  ${slapos.test.jscrawler-setup:egg}
  ${slapos.test.jstestnode-setup:egg}
  ${slapos.test.jupyter-setup:egg}
  ${slapos.test.kvm-setup:egg}
  ${slapos.test.matomo-setup:egg}
  ${slapos.test.metabase-setup:egg}
  ${slapos.test.monitor-setup:egg}
  ${slapos.test.mosquitto-setup:egg}
  ${slapos.test.nextcloud-setup:egg}
  ${slapos.test.nginx-push-stream-setup:egg}
  ${slapos.test.ors-amarisoft-setup:egg}
  ${slapos.test.osie-coupler-setup:egg}
  ${slapos.test.peertube-setup:egg}
  ${slapos.test.plantuml-setup:egg}
  ${slapos.test.powerdns-setup:egg}
  ${slapos.test.proftpd-setup:egg}
  ${slapos.test.rapid-cdn-setup:egg}
  ${slapos.test.re6stnet-setup:egg}
  ${slapos.test.repman-setup:egg}
  ${slapos.test.restic_rest_server-setup:egg}
  ${slapos.test.seleniumserver-setup:egg}
  ${slapos.test.slapos-master-setup:egg}
  ${slapos.test.ssh-setup:egg}
  ${slapos.test.theia-setup:egg}
  ${slapos.test.turnserver-setup:egg}
  ${slapos.test.upgrade_erp5-setup:egg}

# We don't name this interpreter `python`, so that when we run slapos node
# software, installation scripts running `python` use a python without any
# custom eggs pre-installed, not our special python interpreter.
interpreter = python_for_test

# patches for eggs
patch-binary = ${patch:location}/bin/patch
PyPDF2-patches = ${:_profile_base_location_}/../../component/egg-patch/PyPDF2/0001-Custom-implementation-of-warnings.formatwarning-remo.patch#d25bb0f5dde7f3337a0a50c2f986f5c8
PyPDF2-patch-options = -p1

[eggs/scripts]
recipe = zc.recipe.egg
eggs = ${python-interpreter:eggs}
scripts =
  slapos
  supervisord
  caucase

[git-clone-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
forbid-download-cache = true

[slapos-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.git
branch = master

[template]
recipe = slapos.recipe.template:jinja2
url = ${:_profile_base_location_}/${:filename}
extensions = jinja2.ext.do
output = ${buildout:directory}/template.cfg
context =
  section buildout buildout
  import os os
  key nxdtest_instance nxdtest-instance.cfg:output
  key git_location git:location
  key slapos_location slapos-repository:location
  key interpreter python-interpreter:interpreter
  key curl_location curl-http3:location
  key openssl_location openssl-output:bin
  key faketime_location faketime:location
  key tests :tests

tests =
  json-schemas ${slapos.cookbook-setup:setup}
  backupserver ${slapos.test.backupserver-setup:setup}
  beremiz-ide ${slapos.test.beremiz-ide-setup:setup}
  caucase ${slapos.test.caucase-setup:setup}
  cloudooo ${slapos.test.cloudooo-setup:setup}
  dream ${slapos.test.dream-setup:setup}
  dufs ${slapos.test.dufs-setup:setup}
  erp5 ${slapos.test.erp5-setup:setup}
  erp5testnode ${slapos.test.erp5testnode-setup:setup}
  fluentd ${slapos.test.fluentd-setup:setup}
  galene ${slapos.test.galene-setup:setup}
  gitlab ${slapos.test.gitlab-setup:setup}
  grafana ${slapos.test.grafana-setup:setup}
  headless-chromium ${slapos.test.headless-chromium-setup:setup}
  helloworld ${slapos.test.helloworld-setup:setup}
  html5as ${slapos.test.html5as-setup:setup}
  html5as-base ${slapos.test.html5as-base-setup:setup}
  htmlvalidatorserver ${slapos.test.htmlvalidatorserver-setup:setup}
  hugo ${slapos.test.hugo-setup:setup}
  js-drone ${slapos.test.js-drone-setup:setup}
  jscrawler ${slapos.test.jscrawler-setup:setup}
  jstestnode ${slapos.test.jstestnode-setup:setup}
  jupyter ${slapos.test.jupyter-setup:setup}
  kvm ${slapos.test.kvm-setup:setup}
  matomo ${slapos.test.matomo-setup:setup}
  metabase ${slapos.test.metabase-setup:setup}
  monitor ${slapos.test.monitor-setup:setup}
  mosquitto ${slapos.test.mosquitto-setup:setup}
  nextcloud ${slapos.test.nextcloud-setup:setup}
  nginx-push-stream ${slapos.test.nginx-push-stream-setup:setup}
  ors-amarisoft ${slapos.test.ors-amarisoft-setup:setup}
  osie-coupler ${slapos.test.osie-coupler-setup:setup}
  peertube ${slapos.test.peertube-setup:setup}
  plantuml ${slapos.test.plantuml-setup:setup}
  powerdns ${slapos.test.powerdns-setup:setup}
  proftpd ${slapos.test.proftpd-setup:setup}
  rapid-cdn ${slapos.test.rapid-cdn-setup:setup}
  re6stnet ${slapos.test.re6stnet-setup:setup}
  repman ${slapos.test.repman-setup:setup}
  restic-rest-server ${slapos.test.restic_rest_server-setup:setup}
  seleniumserver ${slapos.test.seleniumserver-setup:setup}
  slapos-master ${slapos.test.slapos-master-setup:setup}
  ssh ${slapos.test.ssh-setup:setup}
  theia ${slapos.test.theia-setup:setup}
  turnserver ${slapos.test.turnserver-setup:setup}
  upgrade_erp5 ${slapos.test.upgrade_erp5-setup:setup}

[versions]
# recurls are under development
recurls =

# slapos.core is used from the clone always
slapos.core =

# Various needed versions
Pillow = 9.2.0
forcediphttpsadapter = 1.0.1
image = 1.5.25
plantuml = 0.3.0:whl
pysftp = 0.2.9
requests-toolbelt = 0.8.0
testfixtures = 6.11.0
mysqlclient = 2.1.1
pexpect = 4.8.0
ptyprocess = 0.6.0
paho-mqtt = 1.5.0
pcpp = 1.30
xmltodict = 0.13.0

# Patched eggs
PyPDF2 = 1.26.0+SlapOSPatched001
