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

Release sha256 file is wrong for jib-cli #3584

Closed
vlagorce opened this issue Feb 25, 2022 · 3 comments · Fixed by #3585
Closed

Release sha256 file is wrong for jib-cli #3584

vlagorce opened this issue Feb 25, 2022 · 3 comments · Fixed by #3585

Comments

@vlagorce
Copy link

Environment:

  • Jib version: v0.9.0

Description of the issue:
The file name in the sha256 file is wrong
https://github.com/GoogleContainerTools/jib/releases/download/v0.9.0-cli/jib-jre-0.9.0.zip.sha256

Expected behavior:
File name must be jib-jre-0.9.0.zip instead of jib-0.9.0.zip

Steps to reproduce:

$ sha256sum -c jib-jre-0.9.0.zip.sha256
sha256sum: jib-0.9.0.zip: No such file or directory
@suztomo
Copy link
Contributor

suztomo commented Feb 25, 2022

Thank you for reporting the issue. I see the two files "jib-jre-0.9.0.zip" and "jib-jre-0.9.0.zip.sha256" in GitHub's release page.

Screen Shot 2022-02-25 at 2 21 31 PM

Is this where you see the files?

@suztomo
Copy link
Contributor

suztomo commented Feb 25, 2022

Now I understand the problem.

suztomo@suztomo:/tmp$ sha256sum -c jib-jre-0.9.0.zip.sha256 
sha256sum: jib-0.9.0.zip: No such file or directory
jib-0.9.0.zip: FAILED open or read
sha256sum: WARNING: 1 listed file could not be read
suztomo@suztomo:/tmp$ cat jib-jre-0.9.0.zip.sha256 
c0f47017f1218a223f51228cc69fe9d7793e600d8a05b11e4dbdba0dee6bfc11  jib-0.9.0.zip
suztomo@suztomo:/tmp$ sha256sum --help
...
  -c, --check          read SHA256 sums from the FILEs and check them

Let me check where the "jre" is coming from.

zhumin8 pushed a commit that referenced this issue Mar 25, 2022
Fixes #3584

With the current setup, the jib zip file is renamed after the checksum file is created. This is why the contents of the file currently look like this:

c0f47017f1218a223f51228cc69fe9d7793e600d8a05b11e4dbdba0dee6bfc11  jib-0.9.0.zip
And we end up with jib-0.9.0.zip: No such file or directory when we call sha256sum -c jib-jre-0.9.0.zip.sha256.

Renaming the zip file to jib-jre-{version} before generating the checksum file will result in the right contents:

c0f47017f1218a223f51228cc69fe9d7793e600d8a05b11e4dbdba0dee6bfc11  jib-jre-0.9.0.zip
@mpeddada1 mpeddada1 added this to the 0.10.0 milestone Apr 6, 2022
@mpeddada1
Copy link
Contributor

@vlagorce thanks for reporting this issue! Jib CLI 0.10.0 with this fix has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants