KEMBAR78
audit_min_os: only use sparkle_min_os as fallback by samford · Pull Request #20813 · Homebrew/brew · GitHub
Skip to content

Conversation

samford
Copy link
Member

@samford samford commented Oct 3, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Cask::Audit#audit_min_os uses the minimum macOS version requirement from the app bundle and newest item in the Sparkle feed but these values are treated equally in the code. We recently came across a cask where the app specified High Sierra (10.13) as the minimum macOS version but the Sparkle appcast used 26.0.0 (Tahoe) as the minimumSystemVersion value, so this audit incorrectly requires depends_on macos: ">= :tahoe" in the cask. The app and the upstream website both advertise the 10.13 macOS requirement, so the appcast value needs to be fixed.

However, this highlighted a shortcoming in the audit logic, as we probably shouldn't allow the Sparkle minimum macOS value to override what's specified in the app. This updates the logic to only fall back to the sparkle_min_os value when bundle_min_os is nil, so a higher Sparkle value won't override bundle_min_os.

`Cask::Audit#audit_min_os` uses the minimum macOS version requirement
from the app bundle and newest item in the Sparkle feed but these
values are treated equally in the code. We recently came across a
cask where the app specified High Sierra (10.13) as the minimum macOS
version but the Sparkle appcast used 26.0.0 (Tahoe) as the
`minimumSystemVersion` value, so this audit incorrectly requires
`depends_on macos: ">= :tahoe"` in the cask. The app and the upstream
website both advertise the 10.13 macOS requirement, so the appcast
value needs to be fixed.

However, this highlighted a shortcoming in the audit logic, as we
probably shouldn't allow the Sparkle minimum macOS value to override
what's specified in the app. This updates the logic to only fall back
to the `sparkle_min_os` value when `bundle_min_os` isn't `nil`, so it
won't override `bundle_min_os` when the Sparkle value is higher.
Copy link
Member

@p-linnane p-linnane 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 the quick fix here!

@p-linnane p-linnane added this pull request to the merge queue Oct 4, 2025
Merged via the queue into main with commit 9991345 Oct 4, 2025
38 checks passed
@p-linnane p-linnane deleted the cask/audit-only-use-sparkle_min_os-as-fallback branch October 4, 2025 00:45
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