Repository navigation
Closed as not planned
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)area-EngProdBazel CI, infrastructure, bootstrapping, release, and distribution toolingstaleIssues or PRs that are stale (no activity for 30 days)team-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: feature request
Description
Proposal: Create a rule(s) that can create a zip/tar archives from a set of sources. This would not be available at Bazel runtime as part of @tools (even though the source might go in //tools for lack of a better place). The capabilities would be to bundle up a list of sources and rename some files along the way. It would be stripped down version of the rules from pkg_tar.
Need:
- Some workspace tests often require building a tar archive as part of the test. These currently depend on pkg_tar from @tools/build_defs/pkg, which is going away (move rules_pkg out of Bazel #8857 ). https://github.com/bazelbuild/bazel/search?q=bazel_tools/tools/build_defs/pkg&unscoped_q=pkg_tar
Rewriting them to depend on the rules_pkg distribution is possible, but introduces an external dependency buried in code. The package checksum ends up appearing in Java test code that is writing a WORKSPACE file. This is extremely ugly. - Building the Bazel distribution makes frequent use of pkg_tar to bundle up some things. We currently depend on bazelbuild/rules_pkg for this. It looks like we could use the mini tool to eliminate an upstream dependency.
As an alternative, we could minimize chance of drift between rules_pkg in the build and tests by reusing the imported repo.
- re-export the rules_pkg.tar.gz that we import into the Bazel WORKSPACE. (maybe an http_file duplicating the http_archive)
- tests which need to import @rules_pkg into the WORKSPACE files they write will add a dep on this tarball.
Metadata
Metadata
Assignees
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)area-EngProdBazel CI, infrastructure, bootstrapping, release, and distribution toolingstaleIssues or PRs that are stale (no activity for 30 days)team-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: feature request
Activity
[-]Provide a tiny zip/tar utility for use in tests and packaging.[/-][+]Provide a tiny zip/tar utility for use in tests[/+]Remove xz compression from Bazel's build in pkg_tar.
aiuto commentedon Jun 3, 2021
My thinking as of late is to remove all the extra features from the internal pkg_tar and let it become the mini-tar.
Users of the esoteric ones will have to do the easy migration to rules_pkg
Remove more unneeded features from @bazel_tools/build_defs/pkg/pkg.bzl
Create mini_tar and use it for our blackbox tests.
aiuto commentedon Mar 2, 2022
I picked this up again for now. Rough plan:
It is very back burner, so it may take a few months.
[-]Provide a tiny zip/tar utility for use in tests[/-][+]Provide a tiny tar utility for use in tests[/+]Remove owners attribute from bazel legacy pkg_tar.
Create mini_tar() for use in our blackbox tests.
github-actions commentedon Nov 25, 2023
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (
@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.github-actions commentedon Mar 23, 2025
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.
github-actions commentedon Jun 21, 2025
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post
@bazelbuild/triagein a comment here and we'll take a look. Thanks!