Skip to content

Conversation

@rotated8
Copy link

@rotated8 rotated8 commented Sep 6, 2018

Use one explicitly set by the user, fall back to the checksum on the mirror the user configured, or use archive.apache.org.

@rotated8
Copy link
Author

rotated8 commented Sep 6, 2018

@jcoyne I've shamelessly stolen the PR you made, and added on to it.

@rotated8
Copy link
Author

rotated8 commented Sep 6, 2018

Related to #118

"#{config.default_download_url}.#{suffix}"
if remote_checksum?(suffix)
config.checksum
elsif config.mirror_url != config.archive_download_url
Copy link
Owner

Choose a reason for hiding this comment

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

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.

Copy link
Author

Choose a reason for hiding this comment

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

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.

@rotated8
Copy link
Author

rotated8 commented Sep 6, 2018

@cbeer Updated.

@rotated8
Copy link
Author

rotated8 commented Sep 6, 2018

Travis failure is unrelated, and happens when I run rspec on master.

jcoyne and others added 2 commits January 14, 2020 16:47
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.
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.

3 participants