E572
Skip to content

Sums for releases#70

Closed
tcely wants to merge 7 commits intoyt-dlp:masterfrom
tcely:sums-for-releases
Closed

Sums for releases#70
tcely wants to merge 7 commits intoyt-dlp:masterfrom
tcely:sums-for-releases

Conversation

@tcely
Copy link
Copy Markdown
@tcely tcely commented Jan 10, 2025

Upstream has added checksums.sha256 (which we hope works) but I like this better because it spreads the task of computing sums to the job runners, and provides all the sha algorithm sums in a format that's easy to grep the algorithm and/or file that you want to use from the SUMS file.

This is a follow up from: #69

tcely added 7 commits January 9, 2025 18:51
This makes it much nicer for anyone using Docker to download an archive using `ADD`.

See the documentation: https://docs.docker.com/reference/dockerfile/#add---checksum

Also, anyone else who needs to verify the built file doesn't need to download it, then generate their own checksum.
If sums are completed in under 15 seconds, then we wait on sleep.

Otherwise, we wait for sums to finish.
Prevent nullglob from causing sums to wait on input from stdin.
nullglob causes arguments to disappear entirely rather than failing to open non-existent files.

cat without arguments will wait for input from stdin, which won't be coming. This would leave the step hung.
@nihil-admirari
Copy link
Copy Markdown
Collaborator

I'll keep the upstream implementation. Having multiple hash algorithms is not particularly useful. Hashing doesn't slow the build enough to warrant spreading the computation to multiple runners either.

@tcely
Copy link
Copy Markdown
Author
tcely commented Jan 11, 2025

Having multiple hash algorithms is not particularly useful.

I have to disagree with that statement. Having the option to use a better hash (for collisions or a supporting a particular tool or whatever) already available is very useful.

@nihil-admirari
Copy link
Copy Markdown
Collaborator

Collisions aren't of particular concern for download verification. Everything works with SHA256.

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

0