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

pkg_deb: permit data.tar.zst #759

Closed
adam-azarchs opened this issue Oct 6, 2023 · 0 comments · Fixed by #761
Closed

pkg_deb: permit data.tar.zst #759

adam-azarchs opened this issue Oct 6, 2023 · 0 comments · Fixed by #761

Comments

@adam-azarchs
Copy link
Contributor

dpkg has supported zstd-compressed data since version 1.21.18 (and at least in ubuntu 22.04, dpkg 1.21.1 seems to also support it, though the feature is undocumented; I think the support is implicit through tar 1.31+). While pkg_tar does not yet directly support making zstd-compressed tarballs, aside from the possibility of constructing such tarballs by other means, one can still build them by supplying a custom compressor.

pkg_deb does not currently allow using a data.tar.zst, in two places:

_tar_filetype = [".tar", ".tar.gz", ".tgz", ".tar.bz2", "tar.xz"]

disallows supplying a tar.zst. If one fixes that, there's also
if ext not in ['tar.bz2', 'tar.gz', 'tar.xz', 'tar.lzma']:
ext = 'tar'

which will strip off the .zst suffix, rendering the resulting .deb unusable.

Worth noting, every .deb archive that I've spot-checked in the Ubuntu jammy (22.04) repository has used data.tar.zst, which I'd say makes this a pretty main-stream feature.

adam-azarchs added a commit to adam-azarchs/rules_pkg that referenced this issue Oct 6, 2023
dpkg has officially supported zstandard compression for the data tarball
since version 1.21.18, and despite shipping with dpkg version 1.21.1,
most .deb packages for Ubuntu 22.04 are also in zst format.

While this PR does not do anything to make it easier to create
zstd-compressed tarballs, it does make it possible to use them when
creating .deb packages.

Closes bazelbuild#759
aiuto pushed a commit that referenced this issue Oct 16, 2023
dpkg has officially supported zstandard compression for the data tarball
since version 1.21.18, and despite shipping with dpkg version 1.21.1,
most .deb packages for Ubuntu 22.04 are also in zst format.

While this PR does not do anything to make it easier to create
zstd-compressed tarballs, it does make it possible to use them when
creating .deb packages.

Closes #759
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant