Bundled libarchive (which is used by pkg) doesn't have zstd built-in?
Autumn Jolitz
autumn.jolitz at gmail.com
Thu Apr 9 19:48:34 PDT 2026
I figured out that I could call `pkg repo -m meta.conf /usr/packages` where meta.conf contains:
version = 2;
packing_format = "txz";
will be enough to force pkg-repo to use the working txz (as opposed to the broken tzst) format.
Crawling through https://github.com/freebsd/pkg/blob/main/libpkg/pkg_repo_create.c has been instructive.
Autumn
> On Apr 9, 2026, at 7:24 PM, Autumn Jolitz <autumn.jolitz at gmail.com> wrote:
>
> I tried to create a `tzst` format pkg but it failed with: "pkg: zstd is supported, but not builtin."
>
> This is on a 6.5 system running latest master and pkg 2.2.0.
>
> This could be a problem as `tzst` is the default pkg format (https://lists.freebsd.org/archives/freebsd-ports/2025-January/007185.html) — a bare `pkg create …` will complain about zstd despite /usr/local/etc/pkg.conf having all defaults.
>
> Since pkg farms out archive unpacking to libarchive:
>
> $ ldd /usr/local/sbin/pkg | grep libarchive
> libarchive.so.5 => /usr/lib/libarchive.so.5 (0x800bda000)
>
> Taking a look at ``/usr/src/contrib/libarchive/README.DRAGONFLY``, I notice it has
>
> Configured with
> ===============
> ./configure --without-nettle --with-openssl --without-xml2 --without-zstd \
> --without-lz4 --without-lzo2 \
> ac_cv_lib_md_MD5Init=no ac_cv_lzma_has_mt=no
>
> Hm, yeah that would do it. If we’re using pkg 2.0.2+, the bundled libarchive will likely need to have zstd support added if pkg will be able to make use of tzst.
>
> I notice this cause I build binary packages locally using pkg create and pkg repo.
>
> `pkg repo` certainly isn’t working with missing zstd support and doesn’t seem to respect pkg.conf ``COMPRESSION_FORMAT = txz`` at all. 😕
>
> Autumn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20260409/5a42e730/attachment.htm>
More information about the Users
mailing list