lmstudio-ai / venvstacks

Virtual environment stacks for Python
http://venvstacks.lmstudio.ai/
MIT License
172 stars 5 forks source link

Support publication of gzip tar archives #90

Open ncoghlan opened 4 days ago

ncoghlan commented 4 days ago

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 https://github.com/python/cpython/issues/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.