Skip to content

feat(decompress): Support Zstandard archive#4372

Merged
niheaven merged 4 commits intoScoopInstaller:developfrom
worldyun:master
Nov 10, 2021
Merged

feat(decompress): Support Zstandard archive#4372
niheaven merged 4 commits intoScoopInstaller:developfrom
worldyun:master

Conversation

@worldyun
Copy link
Copy Markdown
Contributor

@worldyun worldyun commented Jun 1, 2021

scoop\bin> .\scoop.ps1 install openssh

Installing 'zstd' (1.5.0) [64bit]
Loading zstd-v1.5.0-win64.zip from cache
Checking hash of zstd-v1.5.0-win64.zip ... ok.
Extracting zstd-v1.5.0-win64.zip ... done.
Linking D:\scoop\apps\zstd\current => D:\scoop\apps\zstd\1.5.0
Creating shim for 'zstd'.
'zstd' (1.5.0) was installed successfully!
Installing 'openssh' (8.2p1-1) [64bit]
Loading bash-4.4.023-2-x86_64.pkg.tar.xz from cache
Checking hash of bash-4.4.023-2-x86_64.pkg.tar.xz ... ok.
Loading gcc-libs-9.3.0-1-x86_64.pkg.tar.xz from cache
Checking hash of gcc-libs-9.3.0-1-x86_64.pkg.tar.xz ... ok.
Loading heimdal-7.7.0-2-x86_64.pkg.tar.zst from cache
Checking hash of heimdal-7.7.0-2-x86_64.pkg.tar.zst ... ok.
Loading heimdal-libs-7.7.0-2-x86_64.pkg.tar.zst from cache
Checking hash of heimdal-libs-7.7.0-2-x86_64.pkg.tar.zst ... ok.
Loading libcrypt-2.1-2-x86_64.pkg.tar.xz from cache
Checking hash of libcrypt-2.1-2-x86_64.pkg.tar.xz ... ok.
Loading libdb-5.3.28-3-x86_64.pkg.tar.zst from cache
Checking hash of libdb-5.3.28-3-x86_64.pkg.tar.zst ... ok.
Loading libedit-20191231_3.1-1-x86_64.pkg.tar.xz from cache
Checking hash of libedit-20191231_3.1-1-x86_64.pkg.tar.xz ... ok.
Loading libopenssl-1.1.1.e-1-x86_64.pkg.tar.xz from cache
Checking hash of libopenssl-1.1.1.e-1-x86_64.pkg.tar.xz ... ok.
Loading libsqlite-3.30.0-1-x86_64.pkg.tar.xz from cache
Checking hash of libsqlite-3.30.0-1-x86_64.pkg.tar.xz ... ok.
Loading msys2-runtime-3.1.4-1-x86_64.pkg.tar.zst from cache
Checking hash of msys2-runtime-3.1.4-1-x86_64.pkg.tar.zst ... ok.
Loading ncurses-6.2-1-x86_64.pkg.tar.xz from cache
Checking hash of ncurses-6.2-1-x86_64.pkg.tar.xz ... ok.
Loading openssh-8.2p1-1-x86_64.pkg.tar.xz from cache
Checking hash of openssh-8.2p1-1-x86_64.pkg.tar.xz ... ok.
Loading openssl-1.1.1.e-1-x86_64.pkg.tar.xz from cache
Checking hash of openssl-1.1.1.e-1-x86_64.pkg.tar.xz ... ok.
Loading zlib-1.2.11-1-x86_64.pkg.tar.xz from cache
Checking hash of zlib-1.2.11-1-x86_64.pkg.tar.xz ... ok.
Extracting bash-4.4.023-2-x86_64.pkg.tar.xz ... done.
Extracting gcc-libs-9.3.0-1-x86_64.pkg.tar.xz ... done.
Extracting heimdal-7.7.0-2-x86_64.pkg.tar.zst ... done.
Extracting heimdal-libs-7.7.0-2-x86_64.pkg.tar.zst ... done.
Extracting libcrypt-2.1-2-x86_64.pkg.tar.xz ... done.
Extracting libdb-5.3.28-3-x86_64.pkg.tar.zst ... done.
Extracting libedit-20191231_3.1-1-x86_64.pkg.tar.xz ... done.
Extracting libopenssl-1.1.1.e-1-x86_64.pkg.tar.xz ... done.
Extracting libsqlite-3.30.0-1-x86_64.pkg.tar.xz ... done.
Extracting msys2-runtime-3.1.4-1-x86_64.pkg.tar.zst ... done.
Extracting ncurses-6.2-1-x86_64.pkg.tar.xz ... done.
Extracting openssh-8.2p1-1-x86_64.pkg.tar.xz ... done.
Extracting openssl-1.1.1.e-1-x86_64.pkg.tar.xz ... done.
Extracting zlib-1.2.11-1-x86_64.pkg.tar.xz ... done.
Running pre-install script...
Junction created for D:\scoop\apps\openssh\8.2p1-1\home\wordy.ssh <<===>> C:\Users\wordy.ssh
Linking D:\scoop\apps\openssh\current => D:\scoop\apps\openssh\8.2p1-1
Creating shim for 'findssl.sh'.
Creating shim for 'scp'.
Creating shim for 'sftp'.
Creating shim for 'ssh'.
Creating shim for 'ssh-add'.
Creating shim for 'ssh-agent'.
Creating shim for 'ssh-copy-id'.
Creating shim for 'ssh-keygen'.
Creating shim for 'ssh-keyscan'.
Creating shim for 'sshd'.
'openssh' (8.2p1-1) was installed successfully!

@Valinor
Copy link
Copy Markdown
Contributor

Valinor commented Nov 9, 2021

Question :

When I reviewed (only to be informed), I see that :

    if(!(Test-Path "$env:SCOOP_HELPERS\lessmsi\lessmsi.exe")) {
        Start-FileDownload 'https://github.com/activescott/lessmsi/releases/download/v1.6.3/lessmsi-v1.6.3.zip' -FileName "$env:SCOOP_HELPERS\lessmsi.zip"
        & 7z.exe x "$env:SCOOP_HELPERS\lessmsi.zip" -o"$env:SCOOP_HELPERS\lessmsi" -y
    }
    if(!(Test-Path "$env:SCOOP_HELPERS\innounp\innounp.exe")) {
        Start-FileDownload 'https://raw.githubusercontent.com/ScoopInstaller/Binary/master/innounp/innounp048.rar' -FileName "$env:SCOOP_HELPERS\innounp.rar"
        & 7z.exe x "$env:SCOOP_HELPERS\innounp.rar" -o"$env:SCOOP_HELPERS\innounp" -y
    }

v1.6.3 for lessmsi and innounp048.rar. This is old (lessmsi is from 23 Nov 2018, innounp048 is from 2019-01-27).
We can currently found inounp50 and lessmsi 1.10. It is for test only, and I doesn't read all the code, maybe some upgrade are done after that.

Also, why only error for log?
image

Copy link
Copy Markdown
Member

@rasa rasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested, but LGTM. I see no harm with merging it into the develop branch.

@rasa rasa changed the base branch from master to develop November 9, 2021 07:53
Comment thread PSScriptAnalyzerSettings.psd1 Outdated
Comment thread lib/depends.ps1 Outdated
Comment thread lib/depends.ps1
Comment thread lib/depends.ps1
Comment thread lib/install.ps1 Outdated
Comment thread test/bin/init.ps1
Comment thread test/Scoop-Decompress.Tests.ps1 Outdated
@niheaven
Copy link
Copy Markdown
Member

niheaven commented Nov 9, 2021

I've just rewrite Expand-ZstdArchive and make some minor fix in other files.

Works with diffutils and will merge into develop, please test the code with other manifest.

Pin @ScoopInstaller/maintainers

@niheaven niheaven requested review from goostleek and rasa November 9, 2021 15:58
@niheaven
Copy link
Copy Markdown
Member

niheaven commented Nov 9, 2021

@goostleek The whitespaces could be fixed maybe in another PR that formats all the code base.

Comment thread lib/decompress.ps1
@niheaven niheaven changed the title Support zstd for extraction feat(decompress): Support Zstandard archive Nov 10, 2021
@niheaven niheaven merged commit af7a6f6 into ScoopInstaller:develop Nov 10, 2021
Comment thread test/bin/init.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants