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

checksums: fix packages after github change; fix download logic error #1975

Merged
merged 2 commits into from Sep 14, 2017

Conversation

@MilhouseVH
Copy link
Contributor

MilhouseVH commented Sep 14, 2017

102 out of 331 checksums changed in the last few days. I queried this with Github support, this is their reply:

Hi Neil,

Thanks for reaching out about this! We recently applied a Git bug-fix which changes
the tarball representation of filenames longer than 100 characters, and that's the
immediate cause of hashes changing. You can see the upstream commit that we applied
here:

https://github.com/git/git/commit/22f0dcd9634a818a0c83f23ea1a48f2d620c0546

As a general rule we encourage people not to rely on byte stability of tarballs.
That being said, it's definitely something we're discussing internally, because we
know it's something that would be convenient for people to be able to rely on.
There's some public discussion with comments from our engineers in these issues, in
case you'd like some background:

https://github.com/libgit2/libgit2/issues/4343#issuecomment-328631745
https://github.com/Homebrew/homebrew-core/issues/18044#issuecomment-329313468

I'll definitely pass your feedback along about the blog post. In the meantime, I
hope that helps explain things, but let us know if you have any other questions!

All the best,
Rachel
GitHub Support

The fix for now is to recalculate the affected checksums. If the lack of byte stability proves to be too much of an issue in future we'll need to review how the checksum is calculated (maybe a checksum of the extracted contents, rather than the archive file itself?)


It was brought to my attention that when the primary download is successful but the checksum is invalid, the download from the mirror (which may have a suitable package with correct checksum) does not occur, and so the download eventually fails without downloading from the mirror.

The fix to scripts/get will ensure we query the mirror when the checksum from the primary source is found to be invalid.

MilhouseVH added 2 commits Sep 14, 2017
…m is invalid

A download might succeed from, say, github, but have an invalid checksum. In this
case it would not attempt the alternative download from the mirror (which might
have the correct checksum), but instead it would repeatedly download from github
until the download limit is exceeded, and then fail completely.
@MilhouseVH MilhouseVH changed the title checksums: fix various packages after github change; fix logic error correction checksums: fix various packages after github change; fix logic error Sep 14, 2017
@MilhouseVH MilhouseVH changed the title checksums: fix various packages after github change; fix logic error checksums: fix packages after github change; fix download logic error Sep 14, 2017
@chewitt chewitt merged commit e81ed0f into LibreELEC:master Sep 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.