Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support publication of gzip tar archives #90

Open
ncoghlan opened this issue Nov 19, 2024 · 1 comment
Open

Support publication of gzip tar archives #90

ncoghlan opened this issue Nov 19, 2024 · 1 comment
Assignees
Labels
Affects: Command Line Affects the command line interface Affects: Metadata Affects the stack output metadata Affects: Python API Affects the public Python API of the project Category: Enhancement New feature or request

Comments

@ncoghlan
Copy link
Collaborator

Tar archives are currently always compiled as xz for the improved compression ratio and to avoid the reproducibility problems that arise from the creation time timestamp that's automatically included in the gzip headers.

This can be a hassle if the consuming application can't readily handle unpacking xz-compressed tar archives, so the tar compression format should be configurable when publishing layer archives.

To avoid reproducibility problems arising from python/cpython#75707, the fileobj parameter to tarfile.open will need to be used to pass in a gzip file with the clamped mtime set in the header.

@ncoghlan ncoghlan added Category: Enhancement New feature or request Affects: Metadata Affects the stack output metadata Affects: Python API Affects the public Python API of the project Affects: Command Line Affects the command line interface labels Nov 19, 2024
@ncoghlan ncoghlan self-assigned this Nov 19, 2024
@ncoghlan
Copy link
Collaborator Author

CLI --format options from https://conda.github.io/conda-pack/cli.html#cmdoption-conda-pack-format: zip, tar.gz, tar.bz2, tar.xz, tar

  • No infer: output archive names aren't specified directly, so the format can't be inferred from the archive name
  • No no-archive: local-export is a dedicated command (distinct from publish)
  • No tar.zst: no zstd support (could be added, but not yet requested)
  • No abbreviated formats (txz etc): might give the impression that the setting will alter the archive file extensions

Also accept default to specify the platform default (zip on Windows, tar.xz elsewhere)

ncoghlan added a commit that referenced this issue Nov 25, 2024
Change archive creation code to allow for runtime format selection.

Preparation for #90
ncoghlan added a commit that referenced this issue Nov 25, 2024
Change archive creation code to allow for runtime format selection.

Preparation for #90
ncoghlan added a commit that referenced this issue Nov 26, 2024
ncoghlan added a commit that referenced this issue Nov 27, 2024
ncoghlan added a commit that referenced this issue Nov 27, 2024
First pass at #90 (still needs docs updates and additional tests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Command Line Affects the command line interface Affects: Metadata Affects the stack output metadata Affects: Python API Affects the public Python API of the project Category: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant