| <aid="mtree_spec-srcs"></a>srcs | Files that are placed into the tar | <ahref="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
| <aid="tar_rule-srcs"></a>srcs | Files, directories, or other targets whose default outputs are placed into the tar.<br><br>If any of the srcs are binaries with runfiles, those are copied into the resulting tar as well. | <ahref="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
| <aid="tar_rule-out"></a>out | Resulting tar file to write. If absent, `[name].tar` is written. | <ahref="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <aid="tar_rule-args"></a>args | Additional flags permitted by BSD tar; see the man page. | List of strings | optional | `[]` |
| <aid="tar_rule-compress"></a>compress | Compress the archive file with a supported algorithm. | String | optional | `""` |
| <aid="tar_rule-mode"></a>mode | A mode indicator from the following list, copied from the tar manpage:<br><br>- create: Create a new archive containing the specified items. - append: Like `create`, but new entries are appended to the archive. Note that this only works on uncompressed archives stored in regular files. The -f option is required. - list: List archive contents to stdout. - update: Like `append`, but new entries are added only if they have a modification date newer than the corresponding entry in the archive. Note that this only works on uncompressed archives stored in regular files. The -f option is required. - extract: Extract to disk from the archive. If a file with the same name appears more than once in the archive, each copy will be extracted, with later copies overwriting (replacing) earlier copies. | String | optional | `"create"` |
| <aid="mtree_mutate-name"></a>name | name of the target, output will be `[name].mtree`. | none |
| <aid="mtree_mutate-mtree"></a>mtree | input mtree file, typically created by `mtree_spec`. | none |
| <aid="mtree_mutate-strip_prefix"></a>strip_prefix | prefix to remove from all paths in the tar. Files and directories not under this prefix are dropped. | `None` |
| <aid="mtree_mutate-package_dir"></a>package_dir | directory prefix to add to all paths in the tar. | `None` |
| <aid="mtree_mutate-mtime"></a>mtime | new modification time for all entries. | `None` |
| <aid="mtree_mutate-owner"></a>owner | new uid for all entries. | `None` |
| <aid="mtree_mutate-ownername"></a>ownername | new uname for all entries. | `None` |
| <aid="mtree_mutate-awk_script"></a>awk_script | may be overridden to change the script containing the modification logic. | `"@aspect_bazel_lib//lib/private:modify_mtree.awk"` |
| <aid="tar-name"></a>name | name of resulting `tar_rule` | none |
| <aid="tar-mtree"></a>mtree | "auto", or an array of specification lines, or a label of a file that contains the lines. Subject to [$(location)](https://bazel.build/reference/be/make-variables#predefined_label_variables) and ["Make variable"](https://bazel.build/reference/be/make-variables) substitution. | `"auto"` |
| <aid="tar-stamp"></a>stamp | should mtree attribute be stamped | `0` |
| <aid="tar-kwargs"></a>kwargs | additional named parameters to pass to `tar_rule` | none |