@@ -489,6 +489,60 @@ can be configured.
489489Recipe and class keywords
490490-------------------------
491491
492+ .. _configuration-recipes-auditfiles :
493+
494+ {checkout,build,package}AuditFiles
495+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
496+
497+ Type: Dictionary (String -> String | AuditFileDefinition)
498+
499+ The :ref: `audit-trail ` records where and when a package was built, the state of
500+ the recipes and the checked out sources. Additionally, selected files of a step
501+ can be included into the audit trail too. Example::
502+
503+ # Create a checksum of all files except the ".bob" folder.
504+ checkoutDeterministic: True
505+ checkoutScript: |
506+ ...
507+ mkdir .bob
508+ find . -path ./bob -prune -o \( -type f -print \) | xargs sha1sum > .bob/file-hashes
509+
510+ checkoutAuditFiles:
511+ FILE_HASHES: .bob/file-hashes
512+
513+ This will include the content of ``.bob/file-hashes `` into the audit trail::
514+
515+ {
516+ "files" : {
517+ "FILE_HASHES" : "0dd432edfab90223f22e49c02e2124f87d6f0a56 ./COPYING"
518+ },
519+ }
520+
521+ By default, the named file(s) must be present and are read with UTF-8 encoding.
522+ Both properties can be changed with the long format::
523+
524+ packageAuditFiles:
525+ COPYING:
526+ filename: COPYING
527+ encoding: latin1
528+ if: "$INCLUDE_COPYING"
529+
530+ The file is only added to the audit trail when the ``if `` :ref: `condition
531+ <configuration-principle-booleans>` is true. The file name must always be a
532+ relative path. File names and encodings can use
533+ :ref: `configuration-principle-subst `. There is a special encoding ``"base64" ``
534+ which can read binary file and includes them base64 encoded into the audit
535+ trail. See the `Python standard encodings
536+ <https://docs.python.org/3/library/codecs.html#standard-encodings> `_ for a list
537+ of possible encodings.
538+
539+ Note that changing any of the audit files properties does not lead to a rebuild
540+ of affected packages. These settings do not influence the build result and
541+ therefore also do not contribute to variant management. If two identical
542+ packages use different audit file settings it is unspecified which setting is
543+ applied. Therefore, keep the audit file settings static or ensure that they
544+ are configured consistent between package variants.
545+
492546.. _configuration-recipes-scripts :
493547
494548{checkout,build,package}Script[{Bash,Pwsh}]
0 commit comments