bazelbuild / bazelbuild/rules_pkg

Determine how pkg_zip could support per-input compression algorithms

Open
#441 1 comment 0 reactions 0 assignees View on GitHub
feature-request P3
Dominant language
Starlark
Stars
253
Forks
221
Avg merge
10h 33m
Merged PRs (30d)
1

Description

As an archive, zip supports a variety of compression algorithms which may be applied on a per-entry basis. The two most common, as exposed via Python's zipfile module, are "stored" and "deflated".

My use case is that of an archive which just bundles up a few gigabytes of already compressed RPMs and zips. For historical reasons, I must continue to produce a zip archive rather than a tar. By default, this single action takes 90s. However, if I patch rules_pkg's build_zip.py to just store files having matching expressions, I can cut this down to 22s. (It actually takes just 7s to create the store-only zip, but the other 15s come from Bazel's `actuallyCompleteAction`.)

@nacl suggested filing an issue to determine how a comparable, not-VMW-specific solution could be found. (A naive solution might be to pass a nocompress_filetypes attr to pkg_zip (ick). Something more sophisticated might be to add zip-specific parameters to pkg_attributes w/ plumbing through `manifest.{bzl,py}`.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.