geofffranks / spruce

A BOSH template merge tool
MIT License
426 stars 77 forks source link

bug: Asset names in checksum files (*.sha1) of v1.30.0 are wrong #367

Closed suzuki-shunsuke closed 1 year ago

suzuki-shunsuke commented 1 year ago

https://github.com/geofffranks/spruce/releases/tag/v1.30.0

spruce-darwin-amd64.sha1

$ curl -L https://github.com/geofffranks/spruce/releases/download/v1.30.0/spruce-darwin-amd64.sha1
52707be539cba6e96087db2842c96cd5ca6440ae  spruce_darwin_amd64

$ curl -L https://github.com/geofffranks/spruce/releases/download/v1.30.0/spruce-linux-amd64.sha1
24cdb34f34623e62d46356148ea24693e738c164  spruce_linux_amd64

$ curl -L https://github.com/geofffranks/spruce/releases/download/v1.30.0/spruce-windows-amd64.sha1
ee572cce40abe4d57fc57d9695b27d048904df81  spruce_windows_amd64

Asset name is not spruce_darwin_amd64 but spruce-darwin-amd64.

So we can't verify checksum with checksum files and commands such as sha1sum simply.

$ shasum -a 1 -c spruce-darwin-amd64.sha1 
shasum: spruce_darwin_amd64: No such file or directory
spruce_darwin_amd64: FAILED open or read
shasum: WARNING: 1 listed file could not be read

We have to fix asset names in checksum files.

$ sed -i "s/spruce_darwin_amd64/spruce-darwin-amd64/" spruce-darwin-amd64.sha1
$ shasum -a 1 -c spruce-darwin-amd64.sha1
spruce-darwin-amd64: OK
geofffranks commented 1 year ago

Thanks for pointing this out, fixed!