Documentation Index
Fetch the complete documentation index at: https://docs.aspect.build/llms.txt
Use this file to discover all available pages before exploring further.
Documentation for @tar.bzl@v0.8.1 — View source
Mutating the tar contents
Themtree_spec rule can be used to create an mtree manifest for the tar file.
Then you can mutate that spec using mtree_mutate and feed the result
as the mtree attribute of the tar rule.
For example, to set the owner uid of files in the tar, you could:
Rule: mtree_spec
Create an mtree specification to map a directory hierarchy. See https://man.freebsd.org/cgi/man.cgi?mtree(8)
Attributes
A unique name for this target.
Files that are placed into the tar
Resulting specification file to write
Include the runfiles tree in the resulting mtree for targets that are executable.The runfiles are in the paths that Bazel uses. For example, for the
target
//my_prog:foo, we would see files under paths like
foo.runfiles/<repo name>/my_prog/<file>Function: mtree_mutate
Modify metadata in an mtree file.
Parameters
name of the target, output will be
[name].mtree.input mtree file, typically created by
mtree_spec.list of files to resolve symlinks for.
EXPERIMENTAL! We may remove or change it at any point without further notice. Flag to determine whether to preserve symlinks in the tar.prefix to remove from all paths in the tar. Files and directories not under this prefix are dropped.
directory prefix to add to all paths in the tar.
new modification time for all entries.
new uid for all entries.
new uname for all entries.
may be overridden to change the script containing the modification logic.
additional named parameters to genrule
Function: mutate
Factory function to make a partially-applied mtree_mutate rule.

