Skip to content

fixes binary checksum validation and binary naming in releases#206

Merged
oglok merged 1 commit intoopenshift:mainfrom
copejon:install-script-sha
Aug 17, 2021
Merged

fixes binary checksum validation and binary naming in releases#206
oglok merged 1 commit intoopenshift:mainfrom
copejon:install-script-sha

Conversation

@copejon
Copy link
Copy Markdown
Contributor

@copejon copejon commented Aug 11, 2021

Which issue(s) this PR addresses:
The install.sh should not change the name of the binary before calculating its checksum.

Closes #203

@openshift-ci openshift-ci bot requested review from oglok and rootfs August 11, 2021 23:27
@rootfs
Copy link
Copy Markdown
Member

rootfs commented Aug 11, 2021

/lgtm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Aug 11, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rootfs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 11, 2021
@oglok
Copy link
Copy Markdown
Contributor

oglok commented Aug 12, 2021

@copejon @rootfs IIUC, checksums are performed on the content of the file to be checked, and not its name.

~# sha256sum microshift
6ce3a6e4871f4ba46f68062af696974cba8b37cb1306b9c84b7049053afe2f2f  microshift
~# mv microshift whatever
~# sha256sum whatever 
6ce3a6e4871f4ba46f68062af696974cba8b37cb1306b9c84b7049053afe2f2f  whatever

The install script was written before the addition of the ARM checksum to the release.sha256 file. It'd cool to have the ARM case considered in the install script as well (even thought it's not working at this moment).

@copejon
Copy link
Copy Markdown
Contributor Author

copejon commented Aug 12, 2021

It'd cool to have the ARM case considered in the install script as well (even thought it's not working at this moment).

I agree, but I think we can leave that to another PR as it'll either change or append to the script UX.

checksums are performed on the content of the file to be checked, and not its name.

Yeah, this is true - the reason to rename after comparing checksums is that we need to match the download artifact to its checksum by name. So the script now first looks it up by it's name, then renames it to microshift.

@oglok oglok merged commit c796de4 into openshift:main Aug 17, 2021
@copejon copejon deleted the install-script-sha branch September 14, 2021 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Install.sh script fails because dowloaded microshift checksum doesn't match

3 participants