Provide a .tar.zst in addition to the .tar.xz

So people can stop using xz if they want.
This commit is contained in:
Christoph Reiter 2024-04-05 11:35:52 +02:00
parent 97d7bf58b4
commit 477a2f5603
3 changed files with 18 additions and 6 deletions

View File

@ -50,6 +50,7 @@ jobs:
mv msys2-base-x86_64-[0-9]*.sfx.exe msys2-base-x86_64-latest.sfx.exe
mv msys2-x86_64-[0-9]*.exe msys2-x86_64-latest.exe
mv msys2-*.tar.xz msys2-base-x86_64-latest.tar.xz
mv msys2-*.tar.zst msys2-base-x86_64-latest.tar.zst
mv msys2-*.packages.txt msys2-base-x86_64-latest.packages.txt
sha256sum.exe msys2-*
sha256sum.exe msys2-* > msys2-checksums.txt

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
_cache
*.exe
*.xz
*.zst
_build

View File

@ -21,13 +21,21 @@ create_installer_archive() {
popd > /dev/null
}
create_archive() {
echo "[Creating archive...]"
create_archives() {
echo "[Creating tarball...]"
pushd "${_newmsysbase}" > /dev/null
export XZ_OPT="-9T0"
/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cJf "${_thisdir}/msys2-base-x86_64-${_date}.tar.xz" msys64
/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cf "${_thisdir}/msys2-base-x86_64-${_date}.tar" msys64
popd > /dev/null
echo "[Creating xz archive...]"
xz -9 --keep --verbose --force --compress --threads=0 "${_thisdir}/msys2-base-x86_64-${_date}.tar"
xz --test "${_thisdir}/msys2-base-x86_64-${_date}.tar.xz"
echo "[Creating zstd archive...]"
zstd -T0 -22 --ultra --force "${_thisdir}/msys2-base-x86_64-${_date}.tar" -o "${_thisdir}/msys2-base-x86_64-${_date}.tar.zst"
zstd --test "${_thisdir}/msys2-base-x86_64-${_date}.tar.zst"
rm "${_thisdir}/msys2-base-x86_64-${_date}.tar"
}
create_sfx() {
@ -80,6 +88,8 @@ main() {
pacman -S --noconfirm --needed \
"${MINGW_PACKAGE_PREFIX}-qt-installer-framework" \
"${MINGW_PACKAGE_PREFIX}-7zip" \
"${MINGW_PACKAGE_PREFIX}-xz" \
"${MINGW_PACKAGE_PREFIX}-zstd" \
"tar"
create_chroot_system
@ -88,7 +98,7 @@ main() {
create_installer_archive
create_installer
create_archive
create_archives
create_sfx
}