Skip to content

[FR]: Provide a tar toolchain #470

Closed
@alexeagle

Description

@alexeagle

What is the current behavior?

rules_pkg has a bunch of issues with creating tar files that include binaries:

It would be great to have rules_pkg solve these, but many are old.
rules_oci users keep running into this because rules_docker did its own runfiles handling, which rules_oci "fixed the layering violation" by expecting the pkg_tar to create a correct output.

Describe the feature

Instead of waiting for rules_pkg, we could build an alternative. It should be simple:

  • We already have https://docs.aspect.build/rules/aspect_bazel_lib/docs/copy_to_directory/ - we can fix this to have correct handling of symlinks and runfiles. As a result, there should be a folder in bazel-out that looks exactly like what we want in the tar file.
  • Add a toolchain that provides a tar program with predictable behavior and arguments - in practice any GNU tar that's "recent enough" works. main...tar is a start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfunding neededContribute to https://opencollective.com/aspect-builduntriagedRequires traige

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions