Get the best checksum URL possible#120
Open
rotated8 wants to merge 2 commits intocbeer:masterfrom
rotated8:checksum_mirror
Open
Get the best checksum URL possible#120rotated8 wants to merge 2 commits intocbeer:masterfrom rotated8:checksum_mirror
rotated8 wants to merge 2 commits intocbeer:masterfrom
rotated8:checksum_mirror
Conversation
Author
|
@jcoyne I've shamelessly stolen the PR you made, and added on to it. |
Author
|
Related to #118 |
cbeer
requested changes
Sep 6, 2018
| "#{config.default_download_url}.#{suffix}" | ||
| if remote_checksum?(suffix) | ||
| config.checksum | ||
| elsif config.mirror_url != config.archive_download_url |
Owner
There was a problem hiding this comment.
I don't think we ever want to trust the checksum from a mirror if the goal is to make sure the mirror hasn't maliciously tampered with the files.
Author
There was a problem hiding this comment.
Ok. My use case was "apache.org is down, so switch to a mirror", which without that would require me to additionally set an explicit checksum URL, or ignore_checksum.
Author
|
@cbeer Updated. |
Author
|
Travis failure is unrelated, and happens when I run rspec on master. |
Previously, when a mirror was set it was trying to get the checksum from www.us.apache.org which only had the checksums for the three supported versions.
If the checksum option is a URL, use it to get the checksum, rather than the archive.apache.org URL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use one explicitly set by the user, fall back to the checksum on the mirror the user configured, or use archive.apache.org.