Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails with sha256sum #78

Closed
Toghr opened this issue Nov 10, 2020 · 2 comments · Fixed by #79
Closed

Install fails with sha256sum #78

Toghr opened this issue Nov 10, 2020 · 2 comments · Fixed by #79

Comments

@Toghr
Copy link

Toghr commented Nov 10, 2020

When I try to instal plugin on centos 7 I get following error:

Validating Checksum.
sha256sum: invalid option -- 's'
Try 'sha256sum --help' for more information.
Failed to install helm-unittest

It's caused by this part:
curl -s -L "$PROJECT_CHECKSUM" | grep "$DOWNLOAD_FILE" | sha256sum -c -s

While -s is valid option for shasum

shasum --help
Usage: shasum [OPTION]... [FILE]...
Print or check SHA checksums.
...
  -s, --status          don't output anything, status code shows success

It's not ok for sha256sum:

sha256sum --help
Usage: sha256sum [OPTION]... [FILE]...
Print or check SHA256 (256-bit) checksums.
...
The following four options are useful only when verifying checksums:
      --status         don't output anything, status code shows success

Workarounds:
install shasum, it will be preferred over sha256sum
yum install -y perl-Digest-SHA

@quintush
Copy link
Owner

Hello @Toghr ,

I'm aware of the defect and also received a pullrequest to fix the problem (#73).
However the pullrequest does not fulfill the complete request so I started investigating other options.

In the mean time i noticed there are 3 versions of sha256sum.
1 version (used in apline) which allows the -s option
2 version which supports both -s and --status
3 the version which only supports --status

As i use the alpine version for the docker images i have created a branch in which i try to solve all combinations.
Still need to verify if all setups are working, but feel free to comment.

@Toghr
Copy link
Author

Toghr commented Nov 10, 2020

@quintush thanks for Your quick reply. I was not aware of 'alpine' version. Indeed it does not support full: '--status' option which, I was hoping, could be a good solution :(

@quintush quintush linked a pull request Nov 16, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants