Publish checksums for every artifact #199
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to close #152 by exposing CID and additionally generating a plain SHA512 hash for every artifact of new releases.
Rationale
I had a short chat with someone (sorry, forgot the name :() about things that we could improve as an open source project to make it easier to package our software.
Number one issue was that we do not publish checksums and package managers can't verify downloads without additional orchestration. This makes package maintainer's work harder than it should be.
I mentioned all our artifacts are content-addressed and it is possible to get CID for every file but there is a good argument about learning curve of IPFS concepts and multihash/cids not being supported by default userland tools in unix-like systems (yet), while things like
shasum
being usually around.Details
This PR exposes two new values in two places:
releases/<dist>/<version>/<dist>_<version>_<platform>.tar.gz.cid
releases/<dist>/<version>/<dist>_<version>_<platform>.tar.gz.sha512
releases/<dist>/<version>/dist.js
as additional fields namedcid
andsha512
:Flat files enable bulk verification via simple shell scripts or just plain
shasum -c *.sha512
.Fields in
dist.js
enable more sophisticated setups to do the same.How to test locally
What about historical releases?
Due to the way we fetch historical data from IPNS those changes will be applied only to new releases. Adding this additional metadata to historical archives requires additional work and QA and if it is really needed it can be tackled in a separate PR, so this one can be merged before go-ipfs v0.4.18 is released.
Demo
(2018-11-02) go-ipfs 0.4.18 just got published on the website and has
.cid
and.sha512
files: