[buildout]
extends =
  buildout.hash.cfg
  ../../component/dcron/buildout.cfg
  ../../component/xz-utils/buildout.cfg
  ../../component/logrotate/buildout.cfg
parts =
  template-logrotate-base

[logrotate-download-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
# XXX: following mode should be the default
mode = 644

[logrotate-conf-template]
< = logrotate-download-base

[logrotate-entry-template]
< = logrotate-download-base

[template-logrotate-base]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance-logrotate-base.cfg
context =
    key dcron_location dcron:location
    key xz_location xz-utils:location
    key logrotate_location logrotate:location
    key logrotate_conf_template logrotate-conf-template:target
    key logrotate_entry_template logrotate-entry-template:target