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

ca-certificates: build an all bottle #86415

Closed
wants to merge 1 commit into from

Conversation

carlocab
Copy link
Member

@carlocab carlocab commented Oct 4, 2021

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

This is needed for users on older versions of macOS who might not be
able to download the CA cert from curl.se.

@carlocab carlocab added CI-skip-recursive-dependents Pass --skip-recursive-dependents to brew test-bot. CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. CI-skip-dependents Pass --skip-dependents to brew test-bot. labels Oct 4, 2021
@carlocab carlocab force-pushed the ca-cert-all branch 2 times, most recently from dd4a8d0 to cc12d5f Compare October 4, 2021 05:50
Formula/ca-certificates.rb Outdated Show resolved Hide resolved
@carlocab
Copy link
Member Author

carlocab commented Oct 4, 2021

Hmm, no, this won't work. The problem seems to be in brew.

@carlocab carlocab added the brew Issue may be Homebrew/brew related label Oct 4, 2021
@carlocab
Copy link
Member Author

carlocab commented Oct 4, 2021

Ah. No, I know what the problem is. It's not in brew.

@carlocab carlocab removed the brew Issue may be Homebrew/brew related label Oct 4, 2021
@carlocab
Copy link
Member Author

carlocab commented Oct 4, 2021

So the problem is that we pass --remote-time to curl -- this works fine when downloading the source from https://curl.se/ca/cacert-2021-09-30.pem, but doesn't on Mojave, which falls back to formula-patches.

GitHub just sets --remote-time to the current time, which explains the timestamp diff between bottles.

Fixing this could get quite involved.

@carlocab
Copy link
Member Author

carlocab commented Oct 4, 2021

Dirty hack:

Make this depends_on macos: [:catalina, :build]. Older macOS versions won't be able to "build" this formula, but they won't need to because they can use the bottle.

@Bo98
Copy link
Member

Bo98 commented Oct 4, 2021

We can drop the mirror here and it should be good now after Homebrew/brew#12172.

This is no longer necessary as of Homebrew/brew#12172.
@carlocab
Copy link
Member Author

carlocab commented Oct 4, 2021

That's unexpected:

==> brew audit ca-certificates --online --git --skip-style
==> FAILED
Error: undefined method `to_str' for false:FalseClass
Did you mean?  to_s
/opt/homebrew/Library/Homebrew/system_command.rb:176:in `block in expanded_args'
/opt/homebrew/Library/Homebrew/system_command.rb:170:in `map'
/opt/homebrew/Library/Homebrew/system_command.rb:170:in `expanded_args'
/opt/homebrew/Library/Homebrew/system_command.rb:124:in `command'
/opt/homebrew/Library/Homebrew/system_command.rb:186:in `each_output_line'
/opt/homebrew/Library/Homebrew/system_command.rb:53:in `run!'
/opt/homebrew/Library/Homebrew/system_command.rb:40:in `run'
/opt/homebrew/Library/Homebrew/system_command.rb:28:in `system_command'
/opt/homebrew/Library/Homebrew/utils/curl.rb:103:in `curl_with_workarounds'
/opt/homebrew/Library/Homebrew/utils/curl.rb:181:in `curl_output'
/opt/homebrew/Library/Homebrew/utils/curl.rb:309:in `curl_http_content_headers_and_checksum'
/opt/homebrew/Library/Homebrew/utils/curl.rb:230:in `block in curl_check_http_content'
/opt/homebrew/Library/Homebrew/utils/curl.rb:228:in `each'
/opt/homebrew/Library/Homebrew/utils/curl.rb:228:in `curl_check_http_content'
/opt/homebrew/Library/Homebrew/resource_auditor.rb:118:in `block in audit_urls'
/opt/homebrew/Library/Homebrew/resource_auditor.rb:109:in `each'
/opt/homebrew/Library/Homebrew/resource_auditor.rb:109:in `audit_urls'
/opt/homebrew/Library/Homebrew/resource_auditor.rb:38:in `block in audit'
/opt/homebrew/Library/Homebrew/resource_auditor.rb:33:in `each'
/opt/homebrew/Library/Homebrew/resource_auditor.rb:33:in `audit'
/opt/homebrew/Library/Homebrew/formula_auditor.rb:547:in `block in audit_specs'
/opt/homebrew/Library/Homebrew/formula_auditor.rb:533:in `each'
/opt/homebrew/Library/Homebrew/formula_auditor.rb:533:in `audit_specs'
/opt/homebrew/Library/Homebrew/formula_auditor.rb:798:in `block in audit'
/opt/homebrew/Library/Homebrew/formula_auditor.rb:793:in `each'
/opt/homebrew/Library/Homebrew/formula_auditor.rb:793:in `audit'
/opt/homebrew/Library/Homebrew/dev-cmd/audit.rb:186:in `block in audit'
/opt/homebrew/Library/Homebrew/dev-cmd/audit.rb:169:in `map'
/opt/homebrew/Library/Homebrew/dev-cmd/audit.rb:169:in `audit'
/opt/homebrew/Library/Homebrew/brew.rb:129:in `<main>'

@Bo98
Copy link
Member

Bo98 commented Oct 4, 2021

huh, ok. I'll have a look.

@Bo98
Copy link
Member

Bo98 commented Oct 4, 2021

Homebrew/brew#12177

@carlocab
Copy link
Member Author

carlocab commented Oct 4, 2021

Not sure if you want to wait for Homebrew/brew#12177 to re-run this, but I think this is ready to go. (I checked the bottle checksums.) I'm logging off now though, so feel free to ship this when you think it's done.

@Bo98
Copy link
Member

Bo98 commented Oct 4, 2021

There'll be a free slot in the CI in a few minutes so might be worth trying to see if the fix worked.

@BrewTestBot
Copy link
Member

:shipit: @Bo98 has triggered a merge.

@carlocab carlocab deleted the ca-cert-all branch October 4, 2021 22:44
@github-actions github-actions bot added the outdated PR was locked due to age label Nov 4, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. CI-skip-dependents Pass --skip-dependents to brew test-bot. CI-skip-recursive-dependents Pass --skip-recursive-dependents to brew test-bot. outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants