Edit buildout.hash.cfg

Open buildout.hash.cfg and copy this content into it:
# To learn more about how to generate this file read
# ../../README.update-hash.rst
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[template-cfg]
filename = instance.cfg.in
md5sum =
[instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in
md5sum =
[template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in
md5sum =
[template_launcher]
_update_hash_filename_ = templates/launcher.in
md5sum =
[template_mime_types]
_update_hash_filename_ = templates/mime_types.in
md5sum =
[template_index_html]
_update_hash_filename_ = templates/index.html.in
md5sum =
The sections names must match the ones in software.cfg. This way by extending this file, the sections key values in software.cfg will default to the value present here.
No need to put the md5sum, they will be calculated automatically by update-hash
Extend buildout.hash.cfg in software.cfg
By extending buildout.hash.cfg, the keys in software.cfg for the sections of the same name will default to the one present in buildout.hash.cfg.
You have to insert the following under extends :
buildout.hash.cfg
If buildout.hash.cfg has the following sections:
[template_mime_types]
_update_hash_filename_ = templates/mime_types.in
md5sum = 4ef94a7b458d885cd79ba0b930a5727e
[template_index_html]
_update_hash_filename_ = templates/index.html.in
md5sum = d57cb01df5941e139b02a2f7bdabcdc8
And software.cfg is like this:
[buildout]
extends =
buildout.hash.cfg
[download-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_}
[template_mime_types_different_name]
<= download-base
[template_index_html]
<= download-base
This is equivalent to having this software.cfg:
[buildout]
# nothing extended here but listing details as following:
[template_index_html]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_}
_update_hash_filename_ = templates/index.html.in
md5sum = d57cb01df5941e139b02a2f7bdabcdc8
[template_mime_types_different_name]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_}
[template_mime_types]
_update_hash_filename_ = templates/mime_types.in
md5sum = 4ef94a7b458d885cd79ba0b930a5727e
Note : your MD5sum may vary, it's fine.