6232 Commits

Author SHA1 Message Date
Mike McQuaid
4d4531c19d
Revamp installed_on_request handling
- `reinstall` and `upgrade` no longer mark as installed on request,
  with or without names specified, but preserve the version from the
  tab instead
- default `install_on_request` to `false` rather than `true`
- only set installed in request in a tab if it's missing rather than
  false

Co-authored-by: Michael Cho <michael@michaelcho.dev>
2024-11-19 08:39:55 +00:00
Mike McQuaid
50cac383c7
Merge pull request #18784 from Homebrew/uninstall-unignore-deps
uninstall: don't ignore deps even for developers
2024-11-18 08:50:04 +00:00
Bevan Kay
597f5fa018
generate-cask-ci-matrix: fix incorrect error raised 2024-11-18 12:59:56 +11:00
Ruoyu Zhong
f2cb33011a
uninstall: don't ignore deps even for developers
This was discussed a while back on Slack. The idea behind this is that
ignoring dependencies during `brew uninstall` makes it too easy to break
things, even for developers. Those who know what they are doing can, and
IMO should, always use the `--ignore-dependencies` flag.
2024-11-18 00:13:12 +08:00
Mike McQuaid
22fd47b268
Merge pull request #18779 from kiracus/m4
Add M4 processor
2024-11-17 08:46:22 +00:00
Kiracus
46389dee24 cpu_spec.rb: add Apple M4 2024-11-16 16:27:11 -08:00
Bevan Kay
dd3ad5bb56
add generate-cask-ci-matrix command 2024-11-16 22:19:09 +11:00
Mike McQuaid
284035d624
Merge pull request #18733 from alebcay/deprecate-disable-replacement
deprecate_disable: support optional replacement parameter
2024-11-11 09:49:45 +00:00
Caleb Xu
33a9d24111
linux/hardware/cpu: add some missing AMD CPUs 2024-11-09 21:54:05 -05:00
Caleb Xu
215fc85579
deprecate_disable: support optional replacement parameter 2024-11-08 15:49:00 -05:00
Douglas Eichelberger
ba3f426726 clean up fixture 2024-11-07 13:00:38 -08:00
Douglas Eichelberger
ebe1e504da Change command output instead 2024-11-07 11:26:19 -08:00
Douglas Eichelberger
acb4eddaca Allow multiple JSON outputs 2024-11-07 11:08:13 -08:00
Michael Cho
c2d3f126ed
language/python: link manpages by default 2024-11-05 11:24:13 -05:00
Michael Cho
f18e1ea86a
Merge pull request #18614 from Homebrew/inreplace-non-global
utils/inreplace: allow non-global substitution
2024-10-31 14:05:27 -04:00
Carlo Cabrera
a7548f009e
Merge pull request #18674 from Homebrew/kernel-major-versions 2024-10-31 15:34:35 +08:00
Carlo Cabrera
42dd0acdc9
macos_version: define a method instead 2024-10-31 15:15:02 +08:00
hyuraku
c60e80f0a9 remove Cask::Config.explicit_s spec 2024-10-30 22:20:56 +09:00
Michael Cho
f82c58383c
utils/inreplace: allow non-global substitution
Also increase test coverage
2024-10-29 20:15:47 -04:00
Bo Anderson
91f3671b16
Merge pull request #18639 from Homebrew/improve_parallel_tests
spec_helper: improve parallel test handling.
2024-10-27 16:34:49 +00:00
Bo Anderson
46cb9ec947
spec_helper: clarify comment and scope to all OS 2024-10-27 15:45:46 +00:00
Mike McQuaid
e4fb33928f
Merge pull request #18613 from pkryger/allow_homebrew_prefix_in_external_patches
Allow HOMEBREW_PREFIX replacement in external patches
2024-10-27 07:11:17 -07:00
Mike McQuaid
92fee908ba
spec_helper: improve parallel test handling.
- Clarify the comment of why we have SimpleCov special logic for
  parallel tests
- use a nicer ParallelTests API for checking which process to output
  the coverage format on
2024-10-26 11:20:37 +01:00
Przemysław Kryger
2225af5bef Revert "Disable audit_result in inreplace"
This reverts commit f31e93a73aab025e60a4a798031c73327cef45cb.
2024-10-25 15:26:03 +01:00
Sam Ford
bfdb84f676
Expand #checkable_urls test coverage
This expands tests for `#checkable_urls` to cover everything except
branches that shouldn't ever be reached.
2024-10-25 09:55:22 -04:00
Sam Ford
d7b515bf73
livecheck: error on invalid url symbol
Up to now, we haven't been accounting for `#url` symbol arguments in
`livecheck` blocks that don't reference a checkable URL. This can
either be an invalid symbol (e.g., using the `:stable` formula symbol
in a cask) or a valid symbol where the referenced URL doesn't exist
(e.g., using `:head` when there's no `head` URL). [Almost all of the
valid symbols are required URLs but `head` is optional.]

Over the years, we've had a handful of slips where we've used `:url`
in formulae (when it's only valid in casks) and `:stable` in casks
(when it's only valid in formulae). In this scenario,
`livecheck_url_string` is `nil`, so livecheck falls back to
`#checkable_urls`. In this scenario, `stable` and `url` are the first
checkable URLs for formulae and casks (respectively), so the checks
ended up working as expected merely by chance. This isn't obvious in
the output and even the debug output looks normal. It only becomes
apparent that livecheck isn't working as expected if it iterates
through more than one checkable URL before reaching one that works
(not the case in those instances).

With that in mind, this adds an error when a `#url` symbol is used
but it doesn't correspond to a checkable URL. This will account for
both of the mentioned scenarios (invalid symbols and valid ones
referencing a non-existent URL) and prevent livecheck from quietly
proceeding in an unexpected manner.
2024-10-25 09:54:28 -04:00
Przemysław Kryger
f31e93a73a Disable audit_result in inreplace
This is to allow migration of existing users of @@HOMEBREW_PREFIX@@ tag in external patches. Once the automatic
replacement of the tag is in stable branch and existing users are fixed (inreplace calls removed), this commit can be
reverted.
2024-10-25 13:37:15 +01:00
Przemysław Kryger
ff03947ba0 Use @@HOMEBREW_PREFIX@@ for replacements in external patches 2024-10-23 16:51:01 +01:00
Przemysław Kryger
a03d65b5c9 Allow HOMEBREW_PREFIX replacement in external patches
This fixes #15925
2024-10-23 15:15:17 +01:00
Michael Cho
13be3c3073
unpack_strategy/directory: use mv for nested unpack
`mv` should preserve hardlinks and allow faster unpack on the same
filesystem. A secondary pass is done with `cp` to copy over attributes
onto any existing directories.

We only run this for nested unpacks as most direct Directory strategy
usage is for repositories where moving files breaks existing code.

This uses `cp -pR` for non-move as some potential user reported issues
could be due to Apple's `cp -l` on specific macOS versions. Can
consider re-adding `cp -l` with better handling for older macOS.
2024-10-20 11:29:30 -04:00
apainintheneck
7aee21ca8b Fix RuboCop::Cop::FormulaAudit::ShellVariables autocorrect
It used to leave out the parenthesis which could result in invalid
Ruby syntax. Now it always parenthesis here.
2024-10-17 23:46:40 -07:00
Douglas Eichelberger
ced4a3a91f Migrate Parlour extensions to Tapioca compilers 2024-10-14 19:50:09 -07:00
Ruoyu Zhong
5a6203a285
test/utils/github_spec: fix artifact URL test
This does the same as dcba7f356d (#15619) and unblocks CI.
2024-10-15 03:01:45 +08:00
Mike McQuaid
a25a541d26
Merge pull request #18438 from bevanjkay/extract_plist_url_fix
cask/cask: pass args when initalising methods
2024-10-13 17:32:01 +01:00
Michael Cho
252678692f
os/mac/pkgconfig: add bzip2.pc for rust formulae 2024-10-11 14:55:37 -04:00
Bevan Kay
8b33aa048a
test/fixtures: add app binary with valid info.plist file 2024-10-10 10:41:09 +11:00
Bevan Kay
8852f024a6
test/fixtures: add livecheck-extract-plist cask 2024-10-10 10:41:09 +11:00
Bevan Kay
0211a23c1f
test/livecheck: add extract_plist livecheck url test 2024-10-10 10:36:45 +11:00
Michael Cho
a3d8f4e0e4
Merge pull request #18508 from Homebrew/curl-skip-get
utils/curl: workaround curl bug for `--head --request GET`
2024-10-08 08:44:05 -04:00
Douglas Eichelberger
2d16333bbc Replace removable constants with overridable methods 2024-10-07 18:33:03 -07:00
Michael Cho
43ee408793
utils/curl: workaround curl bug for --head --request GET
The `curl --head --request GET` causes a full download to happen on
`curl` from 8.7.0 to 8.9.1[^1] which causes poor UX due to slow
Cask downloads that can take almost twice as long as they should.

[^1]: https://github.com/Homebrew/brew/issues/18213
2024-10-05 14:05:59 -04:00
Carlo Cabrera
4671af4bb9
Merge pull request #18485 from Homebrew/non-fatal-invalid-attestations 2024-10-04 16:09:47 +08:00
Carlo Cabrera
7b74bf07fd
Fix attestation test failures 2024-10-04 16:00:29 +08:00
Michael Cho
cfb8ebb5d8
unpack_strategy/directory: try preserving hardlinks
Try running `cp -al` to preserve hardlinks on both macOS and Linux.

If that fails, fall back on `cp -a` which can preserve hardlinks on
Linux (but not macOS) assuming target filesystem supports them.
2024-10-03 20:30:41 -04:00
Patrick Linnane
c2e2b23c50
brew style --fix
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-10-02 10:03:12 -07:00
Bevan Kay
1c5bfa3d80
test/formula_auditor_spec: audit deprecate/disable reasons 2024-09-30 23:11:44 +10:00
Bevan Kay
5a39e1f238
test/cask/audit_spec: audit deprecate/disable reasons 2024-09-30 23:11:44 +10:00
Mike McQuaid
490a553fec
Merge pull request #18455 from samford/livecheck/move-preprocess-url-into-strategies
livecheck: move `#preprocess_url` into strategies
2024-09-30 08:53:13 +01:00
Sam Ford
9e47fc9f31
livecheck: move #preprocess_url into strategies
`Livecheck#preprocess_url` only contains logic for rewriting Git URLs,
so it makes more sense for this code to be part of the `Git` strategy
instead. Outside of better code organization, this saves us from
having to maintain the list of strategies to skip processing (which
is sometimes forgotten when a new strategy is added) and makes it
easier to do something similar in other strategies as needed.

One thing to note is that `Livecheck#preprocess_url` was previously
called on the URL before each strategy's `#match?` method was called.
To maintain the existing behavior, this calls `Git#preprocess_url` in
`Git#match?`. However, we need the processed URL when we use the `Git`
strategy, so we have to call `Git#preprocess_url` again. To avoid
duplicating effort, I've added a `@processed_urls` hash to the `Git`
strategy and have set up `Git#preprocess_url` to cache processed
URLs, so we only do the work once. There may be a better way of
handling it but this seems to work as expected.
2024-09-28 11:29:07 -04:00
Michael Cho
112c692a53
test/spec_helper: require standalone before warnings 2024-09-27 12:48:27 -04:00