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
Apache: Extend URL_MATCH_REGEX
#12261
Apache: Extend URL_MATCH_REGEX
#12261
Conversation
Review period will end on 2021-10-20 at 15:56:31 UTC. |
I'd prefer this personally but don't feel super strongly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving as the actual change is very minimal.
We can add the audit in addition to extending the |
I think it's fine to leave as-is after seeing this change, actually 👍🏻 |
Some Apache URLs use a `filename` query string parameter instead of `path` and the `Apache` strategy isn't applied. The parameter value is the same as `path` (i.e., a path to a file), so this updates the strategy's `URL_MATCH_REGEX` to handle this URL format as well.
ad07353
to
e709917
Compare
The latest push only includes a small tweak, to place |
Review period ended. |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?apache-pulsar
is the only formula in homebrew/core using an Apache URL that doesn't follow the prevailing/dyn/closer.lua?path=...
format. TheApache
strategy doesn't match the formula's currentstable
URL (https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=pulsar/pulsar-2.8.0/apache-pulsar-2.8.0-src.tar.gz
) and livecheck ends up checking the Git tags fromhead
instead. We prefer to align the check with thestable
URL whenever possible, so it's appropriate to extend theApache
strategy to address this.It's been suggested in Homebrew/homebrew-core#87587 that we should simply update the URL to use the prevailing format (i.e.,
https://www.apache.org/dyn/closer.lua?path=pulsar/pulsar-2.8.0/apache-pulsar-2.8.0-src.tar.gz
does work). However, the first-party download page uses themirrors.cgi
URL, so it's possible for the URL to switch back to the format that theApache
strategy doesn't support (e.g., if someone copies the URL from the page and uses it in a version bump).We could potentially add an audit to enforce the
closer.lua
URL format for Apache URLs but I think there's value in extending theApache
strategy to support themirrors.cgi
URL format regardless.