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

CI: no directories in checksum file #360

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

jaspervdm
Copy link
Contributor

The CI produces *-sha256sum.txt files that look like this:

SHA256(/home/vsts/work/1/a/grin-wallet-v3.1.0-linux-amd64.tar.gz)= bdc0ea8b8163bee7265ed63ee525720f3ad511b984987189a719427362b00313

While ideally we'd want it to look like this:

SHA256(grin-wallet-v3.1.0-linux-amd64.tar.gz)= bdc0ea8b8163bee7265ed63ee525720f3ad511b984987189a719427362b00313

This would users to compare the binary with the checksum file using sha256sum -c.

On Windows a similar issue exists:

Algorithm : SHA256
Hash      : 6C1A28FA709EBFF0F142DE41209991ED58A89170927CF698974D25ED72D920D7
Path      : D:\a\1\a\grin-wallet-v3.1.0-win-x64.zip

To fix this, we first cd to the build directory and run the checksum generation command from there.

I have to set up a test CI on my repo to make sure these commands work as expected, please do not merge yet.

Fixes #359.

@quentinlesceller
Copy link
Member

I can set it up on my own repo and test it

@quentinlesceller quentinlesceller self-assigned this Jul 20, 2020
@quentinlesceller
Copy link
Member

@quentinlesceller
Copy link
Member

quentinlesceller commented Oct 2, 2020

Works example here https://github.com/quentinlesceller/grin-wallet/releases/tag/v4.0.0-test.1. However the shasum -c function does not work because the shamsum is formatted with openssl which does not follow the format rules of:

<hash>  <filename>

Merging this though since it's a good improvement. I'll do the same on the grin repo.

@MCM-Mike
Copy link

MCM-Mike commented Oct 2, 2020

Based on your example the shasum -c is not working this is correct.

But the sha256sum -c is now working perfectly, as you removed the directory from the hash file.
I did mention this in #359

_$:/tmp/sha-test$ ls
grin-wallet-v4.0.0-test.1-linux-amd64-sha256sum.txt  grin-wallet-v4.0.0-test.1-linux-amd64.tar.gz

_$:/tmp/sha-test$ sha256sum grin-wallet-v4.0.0-test.1-linux-amd64.tar.gz
96fd1adcca6dee5adcdd45dad7395da372d3cd930e8c9a06646127b8b0cb4e75  grin-wallet-v4.0.0-test.1-linux-amd64.tar.gz

_$:/tmp/sha-test$ cat grin-wallet-v4.0.0-test.1-linux-amd64-sha256sum.txt
SHA256(grin-wallet-v4.0.0-test.1-linux-amd64.tar.gz)= 96fd1adcca6dee5adcdd45dad7395da372d3cd930e8c9a06646127b8b0cb4e75

_$:/tmp/sha-test$ sha256sum -c grin-wallet-v4.0.0-test.1-linux-amd64-sha256sum.txt
grin-wallet-v4.0.0-test.1-linux-amd64.tar.gz: OK



@quentinlesceller
Copy link
Member

Very nice @MCM-Mike thanks for letting me know, I misread the command.

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.

SHA256 sum failed Linux binary (no high priority or security implications)
3 participants