From 477a2f56032c967e67dbc3e9f043d0399ffa99b0 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 5 Apr 2024 11:35:52 +0200 Subject: [PATCH] Provide a .tar.zst in addition to the .tar.xz So people can stop using xz if they want. --- .github/workflows/build.yml | 1 + .gitignore | 1 + make-msys2-installer | 22 ++++++++++++++++------ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 292eb0b..1d2ca9c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.gitignore b/.gitignore index 66d4f3d..bd695b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ _cache *.exe *.xz +*.zst _build \ No newline at end of file diff --git a/make-msys2-installer b/make-msys2-installer index 9b39043..83f32e4 100644 --- a/make-msys2-installer +++ b/make-msys2-installer @@ -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 }