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

Using Perl SHA256 if if shasum/sha256sum unavailable #647

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chapmajs
Copy link

First, thanks for a great project! It's incredible that folks are still supporting OS X 10.4!

I did a clean install of OS X 10.4 on an ALS iMac G5 today, updated to 10.4.11, installed XCode 2.5, and tried to bootstrap tigerbrew. I ran into issues with brew doctor after initial download: I couldn't install the vendored Ruby or cURL due to a SHA checksum mismatch. I tracked this down to the install-vendor.sh script, which had a conditional to first look for OS-provided SHA binaries, then try a Ruby implementation if that failed, or use a Perl implementation if we're on a specific subset of PPC chips.

Apparently the G5 in the ALS iMacs (970/970fx) are also one of the CPUs that Ruby 1.8.2 has a bad SHA256 on. My sysctl -n hw.cpusubtype is 100, which is not in the excluded list. Rather than trying to figure out every subtype that has a broken SHA256, why don't we just always use the Perl implementation?

Copy link
Owner

@mistydemeo mistydemeo left a comment

Choose a reason for hiding this comment

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

Thanks for this PR! Really appreciate the additional info.

Unfortunately the pure-Perl implementation is much slower than the Ruby one. Thankfully most users only need to run this occasionally, but falling back to Perl would significantly slow down the vendor process for users on older CPUs. For that reason, I think trying to enumerate which versions are compatible is still useful.

@chapmajs
Copy link
Author

OK, makes sense to me! I updated the CPU exclusion list to exclude the 970/970fx and force-pushed the change to my sha256_fix branch.

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