-
Notifications
You must be signed in to change notification settings - Fork 217
pkg_deb: permit data.tar.zst #759
Description
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:
rules_pkg/pkg/private/deb/deb.bzl
Line 19 in ff60b34
| _tar_filetype = [".tar", ".tar.gz", ".tgz", ".tar.bz2", "tar.xz"] |
disallows supplying a
tar.zst. If one fixes that, there's alsorules_pkg/pkg/private/deb/make_deb.py
Lines 240 to 241 in ff60b34
| 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.