You are not logged in.
Pages: 1
Is there anyway to force makepkg to use ZSTD instead of XZ? When I added the .zst format to PKGEXT it said it was unrecognized format and refused to compress using ZSTD.
The reason I want to use ZSTD is because it uses much lower cpu to compress the files.
Offline
Unrecognized formats won't work on account of being unrecognized. Sure, you could modify makepkg to recognize it, but you'd also have to modify pacman, or rather libarchive, to recognize it too.
https://github.com/libarchive/libarchive/pull/905 does add upstream support for ZSTD in libarchive, merged 14 days ago and not yet in a release. So assuming you are willing to wait on this, you should get it.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
https://github.com/libarchive/libarchive/pull/905 does add upstream support for ZSTD in libarchive, merged 14 days ago and not yet in a release. So assuming you are willing to wait on this, you should get it.
Build libarchive-git?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
There are multiple steps...
1) have libarchive support
2) have makepkg support.
Using libarchive-git will fix #1 (but be careful, anything linked to libarchive may need rebuilt, including pacman... be VERY careful).
For #2, you will need to edit makepkg. Look for this bit of the code:
case "$PKGEXT" in
*tar.gz) ${COMPRESSGZ[@]:-gzip -c -f -n} ;;
Add a case statement for you compression of choice. You can then set it as the default in makepkg.conf
Offline
Allan, I looked at this to write a simple patch adding support to makepkg, and I noticed something confusing. Why does create_package() use a pipeline in combination with the COMPRESS* array but later on create_srcpackage() uses `bsdtar -cL ${TAR_OPT} -f "$pkg_file"` ?
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
There are multiple steps...
1) have libarchive support
2) have makepkg support.Using libarchive-git will fix #1 (but be careful, anything linked to libarchive may need rebuilt, including pacman... be VERY careful).
For #2, you will need to edit makepkg. Look for this bit of the code:
case "$PKGEXT" in *tar.gz) ${COMPRESSGZ[@]:-gzip -c -f -n} ;;
Add a case statement for you compression of choice. You can then set it as the default in makepkg.conf
It sould be something like
*tar.zst) ${COMPRESSZST[@]:-zstd -d -qq -f} ;;
I don't know if there are more referencess to be checked.
Well, I suppose that this is somekind of signature, no?
Offline
Actually, no since those aren't the actual zstd flags.
https://github.com/eli-schwartz/pacman/tree/zst-support adds makepkg and repo-add support.
(repo-add uses bsdtar's --zstd option which relies on libarchive-git, makepkg support uses a compression filter for bsdtar's *.pkg.tar output.)
I was a bit late writing it, as I wanted to refactor source archive and package archive handling into one unified compression filter.
Last edited by eschwartz (2017-08-28 14:43:42)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Actually, no since those aren't the actual zstd flags.
I used what was used on libarchive... so maybe is not totally good idea to use zstd until libarchive 3,4,1 just to be safe.
Well, I suppose that this is somekind of signature, no?
Offline
Can I ask, why zstd? I assume the built packages are not to be shared/distributed as tar.zst packages would not be useable by other archers for a bit yet.
If this is just for your own use (building and installing AUR packages) and the goal is simply to reduce the cpu-use in the compression step, there are far easier ways. Just disable compression all together.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Well, I posted patches on pacman-dev, so this should hopefully be available in the next libarchive/pacman releases.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
There are multiple steps...
1) have libarchive support
2) have makepkg support.Using libarchive-git will fix #1 (but be careful, anything linked to libarchive may need rebuilt, including pacman... be VERY careful).
For #2, you will need to edit makepkg. Look for this bit of the code:
case "$PKGEXT" in *tar.gz) ${COMPRESSGZ[@]:-gzip -c -f -n} ;;
Add a case statement for you compression of choice. You can then set it as the default in makepkg.conf
I guess I will play it safe here and wait for the support
Offline
Can I ask, why zstd? I assume the built packages are not to be shared/distributed as tar.zst packages would not be useable by other archers for a bit yet.
If this is just for your own use (building and installing AUR packages) and the goal is simply to reduce the cpu-use in the compression step, there are far easier ways. Just disable compression all together.
Because I run Arch on some low end machines which are not capable of compiling large programs from AUR, thus I compile them on a higher machine and distribute them to the lower machines, but even then do they struggle extracting heavily compressed XZ archives. I tested ZSTD on the low end machines and it takes practically no resources compared to XZ and it is as well much faster than XZ
Offline
Any updates on this?
[CPU] AMD Ryzen 5 2400G
[iGPU] AMD RX Vega 11
[Kernel] linux-zen
[sway] • [zsh] • Arch user since [2014-09-01 02:09]
Offline
https://lists.archlinux.org/pipermail/p … 22114.html and followup patches for my patches to add zst support
https://lists.archlinux.org/pipermail/p … 22126.html someone else's patch to add lz4 support, where allan said to "hold off on resubmitting the patch until after I deal with the patches unifying the compression".
...
pacman/makepkg development happens when allan gets time to review patches, there are no guarantees but I see no reason to think this won't make it in.
The major block is libarchive support, which is merged but requires a libarchive 3.3.3 release with no ETA: https://github.com/libarchive/libarchive/issues/940
It's easier to test pacman-git than libarchive-git.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Pages: 1