Scoop: Support zstd for extraction

Created on 19 May 2020  路  11Comments  路  Source: lukesampson/scoop

Msys2 repo uses zstd for their new packages, can you add support for zstd decompression?

Most helpful comment

Need some manual tweaks:

  1. Add zst to L19 of lib/decompress.ps1 of scoop (%SCOOP%/apps/scoop/current/lib/decompress.ps1)
  2. scoop reset 7zip-zstd
  3. Install your gcc10

All 11 comments

Scoop depends on 7-zip to extract formats other than ZIP, but the official 7-zip distribution doesn't support Zstandard. Many third-party forks do, though.

Scoop can use 7zip-zstd.

scoop bucket add versions
scoop install 7zip-zstd
scoop uninstall 7zip

https://github.com/lukesampson/scoop/blob/96de9c14bb483f9278e4b0a9e22b1923ee752901/lib/core.ps1#L252-L258

Still no luck extracting zst packages upon installation, they just sit there.

Do you have some example files?

Since main buckets gcc still on 9.3 trying to set up my own bucket for gcc 10, but mingw moved some of their archives to zst starting gcc 10.

My bucket: https://github.com/Augiiz/scoop-gcc/blob/master/gcc-a.json

Need some manual tweaks:

  1. Add zst to L19 of lib/decompress.ps1 of scoop (%SCOOP%/apps/scoop/current/lib/decompress.ps1)
  2. scoop reset 7zip-zstd
  3. Install your gcc10

Did it for me, thanks a bunch.

Scoop depends on 7-zip to extract formats other than ZIP, but the official 7-zip distribution doesn't support Zstandard. Many third-party forks do, though.

Is there a PR on the 7Zip mainline to integrate it?

@trajano I think there have been several, but none of them was merged so far: https://sourceforge.net/p/sevenzip/discussion/45797/thread/a7e4f3f3/

@Calinou from the discussions you linked it seems that there's no further work on integrating it and it had started in 2016. Maybe scoop should consider an alternative to 7z or at least use the official distribution to do the decompression at least it would decouple scoop from 7zip in case there are new compression formats that it does not support.

msys2 has purged many older file version.
Now many packages of msys2 are only available as zstd compressed files.

If this issue will not be fixed, the msys2 based packages like gcc and openssh should be dropped.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

borekb picture borekb  路  3Comments

quantuumsnot picture quantuumsnot  路  3Comments

yetangye picture yetangye  路  3Comments

nitrocode picture nitrocode  路  3Comments

thorstenkampe picture thorstenkampe  路  3Comments