Skip to content

Conversation

@danlishka
Copy link
Member

@danlishka danlishka commented Jun 3, 2024

The problem was that sha256sum on Alpine does not recognize the following options: --ignore-missing, --quiet . More info in the #587 issue.

     sha256sum: unrecognized option '--ignore-missing'
     BusyBox v1.36.1 (2024-05-23 13:45:30 UTC) multi-call binary.

     Usage: sha256sum [-c[sw]] [FILE]...

     Print or check SHA256 checksums

     	-c	Check sums against list in FILEs
     	-s	Don't output anything, status code shows success
     	-w	Warn about improperly formatted checksum lines

I have tested this change on OS X, Alpine (chainguard/bash), and Ubuntu (node:latest).



Signed-off-by: Daniel Liszka <daniel@chainloop.dev>
Copy link
Member

@migmartri migmartri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

# example: check_sha256 "${TMP_DIR}" checksums.txt
validate_checksums_file() {
cd "$1"
grep "$FILENAME" "$2" > checksum.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do exactly? What was the problem with alpine?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that sha256sum does not recognize the following options on Alpine: --ignore-missing, --quiet . More info in the #587 issue.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added more context in the PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do exactly?

It gets just one line referencing a Chainloop tarball and saves it in checksum.txt. We use that output file later so --ignore-missing is not required.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the context :)

@danlishka danlishka merged commit eb53f4e into chainloop-dev:main Jun 3, 2024
@danlishka danlishka deleted the fix_install_sh branch June 3, 2024 16:24
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.

2 participants