33117 Commits

Author SHA1 Message Date
Bo Anderson
ed2e35853d
Gemfile: stricter Ruby version requirement 2022-08-22 11:11:57 +01:00
Carlo Cabrera
718cf8b0df
Fix Linux-only GCC dependency check.
This is based on feedback from code review.
2022-08-22 14:54:52 +08:00
Rylan Polster
d81bd6ab3b
Merge pull request #13724 from Homebrew/dependabot/bundler/Library/Homebrew/addressable-2.8.1
build(deps): bump addressable from 2.8.0 to 2.8.1 in /Library/Homebrew
2022-08-20 23:00:08 -04:00
Carlo Cabrera
6ca02b22bb
formula_auditor: skip rename audit for glib-utils
I am removing `glib-utils` in (1) Homebrew/homebrew-core#108307, and all
`glib-utils` dependencies in (2) Homebrew/homebrew-core#108497.

This audit prevents me from proceeding with (1) without rebuilding all
the formulae modified in (2). I don't think that is needed, so I'd like
to exempt `glib-utils` from the rename audit instead.

To give you a clearer idea of how I plan to do this, this is the order
of events:
1. Merge this change.
2. Merge Homebrew/homebrew-core#108307.
3. Merge Homebrew/homebrew-core#108497.
4. Revert this change.

This should allow us to get rid of `glib-utils` and its accompanying
hacks without having to rebuild dozens of formulae needlessly.
2022-08-20 17:30:24 +08:00
BrewTestBot
54c1bb872a
brew vendor-gems: commit updates. 2022-08-19 18:07:53 +00:00
dependabot[bot]
5606780663
build(deps): bump addressable from 2.8.0 to 2.8.1 in /Library/Homebrew
Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/sporkmonger/addressable/releases)
- [Changelog](https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.8.0...addressable-2.8.1)

---
updated-dependencies:
- dependency-name: addressable
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-19 18:03:29 +00:00
Carlo Cabrera
6096bc6d71
Merge pull request #13716 from carlocab/cleanup-cleanup_path
cleanup: use `cleanup_path` more consistently
2022-08-19 23:02:38 +08:00
hyuraku
b61ae59421 repair syntax 2022-08-19 21:43:57 +09:00
hyuraku
0f544be8ff remove dry-run option from FormulaInstaller 2022-08-19 21:43:41 +09:00
hyuraku
4bbcab235b change local variable 2022-08-19 20:08:38 +09:00
Carlo Cabrera
c7030eaba0
formula: add optional source and target args to #rpath
There are about 10 formulae which need a bit more flexibility from
`#rpath`. Most of them use `Pathname#relative_path_from`, so we can
replace those instances with a call to `#rpath` instead once `#rpath`
knows how to handle this.
2022-08-19 17:32:43 +08:00
Carlo Cabrera
d4e6925cbb
Merge pull request #13714 from carlocab/dependent-conflict-allowlist
formula_auditor: create a versioned formula dependent conflict allowlist
2022-08-19 17:02:43 +08:00
Mike McQuaid
6eca55a60d
Merge pull request #13720 from FnControlOption/patch-1
Fix caching in Formula#runtime_installed_formula_dependents
2022-08-19 08:25:32 +01:00
fn ⌃ ⌥
2459aee5ae
Fix caching in Formula#runtime_installed_formula_dependents 2022-08-18 15:14:44 -07:00
Rylan Polster
8f54e57422
Merge pull request #13719 from Homebrew/dependabot/bundler/Library/Homebrew/minitest-5.16.3
build(deps): bump minitest from 5.16.2 to 5.16.3 in /Library/Homebrew
2022-08-18 15:47:43 -04:00
Rylan Polster
c84453b152
Merge pull request #13718 from Rylan12/fix-bump-cask-pr
Fix multi-arch cask `sha256` updates
2022-08-18 15:44:01 -04:00
BrewTestBot
4834b718b6
brew vendor-gems: commit updates. 2022-08-18 18:10:03 +00:00
dependabot[bot]
b7eebfaded
build(deps): bump minitest from 5.16.2 to 5.16.3 in /Library/Homebrew
Bumps [minitest](https://github.com/seattlerb/minitest) from 5.16.2 to 5.16.3.
- [Release notes](https://github.com/seattlerb/minitest/releases)
- [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc)
- [Commits](https://github.com/seattlerb/minitest/compare/v5.16.2...v5.16.3)

---
updated-dependencies:
- dependency-name: minitest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-18 18:07:20 +00:00
Rylan Polster
1075bbd895
Fix multi-arch cask sha256 updates 2022-08-18 12:50:20 -04:00
Carlo Cabrera
7384bd2b3f
cleanup: use cleanup_path more consistently
`cleanup_path` already handles the dry-run logic, and also includes
those paths in the summary of space freed by `brew cleanup`.

Before this change:

    ❯ brew cleanup --dry-run
    Would remove: /Users/carlocab/Library/Caches/Homebrew/bootsnap (2,401 files, 41.9MB)

After this change:

    ❯ brew cleanup --dry-run
    Would remove: /Users/carlocab/Library/Caches/Homebrew/bootsnap (2,401 files, 41.9MB)
    ==> This operation would free approximately 41.9MB of disk space.
2022-08-18 21:28:51 +08:00
Carlo Cabrera
0b48261f79
cleanup: handle Python site-packages directories
Inside a given `site-packages` directory, *.pyc files live in
`__pycache__` directories. These are created by the Python interpreter
when a module is imported in order to speed up future access to the
imported module.

These can be left behind when formulae are uninstalled, which results in
erroneous success in importing the modules they were originally compiled
for.

Let's fix that by cleaning these up. In the top-level `__pycache__`
directory, we use the `Pathname#prune?` extension in order to determine
whether a `*.pyc` file is old enough to clean up. In other directories,
we clean them up when they are all that remains in a given module's
tree.

Removing these `*.pyc` files will make `python3` regenerate them when
required, so deleting them is relatively safe. The worst consequence is
slightly slower module import times.

Closes #13701.
2022-08-18 21:09:12 +08:00
Carlo Cabrera
18722901ee
formula_auditor: create a versioned formula dependent conflict allowlist
We have an audit that checks each formula's dependency tree for multiple
versions of the same software. We have an allowlist that allows us to
ignore this audit, but this allowlist requires each formula with a
conflict in its dependency tree to be listed there.

Here, I propose the reverse: if formula `foo` appears in the
`versioned_formula_dependent_conflicts_allowlist`, then all its
dependents will not fail the versioned dependencies conflict because of
a conflict with formula `foo`.

I'd like to do this in the case of `python`, where I think the versioned
dependencies conflict check hurts us more than helps us. Versioned
dependency conflicts are most problematic in the case of libraries with
the same install name but incompatible ABIs. This is almost never a
problem with Python: almost no formulae link with the Python framework
on macOS (in part due to one of our audits that disallows Python
framework linkage in Python modules). Moreover, the various Python
frameworks that we ship have the version in the install name.

The above _might_ be a problem on Linux, since we allow unrestricted
linkage with `libpython`. However, we don't even check versioned
conflicts on Linux, so we aren't as concerned about this in the first
place.

This is also a lot more convenient than adding the dependents of some
Python formula one by one as they acquire conflicts due to changes in
other formulae.

I've also amended `tap_auditor` to allow the use of formula aliases in
an allowlist, to allow us to add `python` to this allowlist instead of
each individual versioned Python formula.

See also discussion at Homebrew/homebrew-core#108307.
2022-08-18 15:40:54 +08:00
Mohammad Zain Abbas
9377346bdf Minor fixes 2022-08-17 17:41:34 +02:00
hyuraku
1bfcf314ac repair style 2022-08-18 00:16:11 +09:00
Rylan Polster
fcb30c1ead
Merge pull request #13702 from Rylan12/sha256-arch
Add `arm:` and `intel:` arguments to cask `sha256` stanza
2022-08-17 10:34:04 -04:00
Carlo Cabrera
696241e3de
Merge pull request #13711 from SMillerDev/fix/audit/cask_signing2
Cask: fix signing audit using unexpected pkg method
2022-08-17 22:28:11 +08:00
Sean Molenaar
b13f6c7c40
Cask: fix signing audit using unexpected pkg method 2022-08-17 15:49:04 +02:00
Bo Anderson
3f3c2f5390
Merge pull request #13708 from SMillerDev/fix/audit/cask_signing
Cask: fix signing audit checking all artifacts
2022-08-17 14:23:45 +01:00
hyuraku
66817c0c32 repair how to show formula to be installed 2022-08-17 22:14:20 +09:00
hyuraku
8a7f445d1f repair how to show casks to be installed 2022-08-17 22:14:05 +09:00
Sean Molenaar
f7b32abfa3
Cask: fix signing audit checking all artifacts 2022-08-17 09:56:45 +02:00
Kevin
6f196ad9ba
Merge pull request #13695 from apainintheneck/ls--without-cellar
Update `brew ls` to work when the cellar doesn't exist
2022-08-16 17:55:13 -07:00
Rylan Polster
27e31c7f18
Check for nil? instead of blank? in cask DSLs 2022-08-16 11:04:59 -04:00
Carlo Cabrera
7872a6e2ba
Merge pull request #13699 from carlocab/rust-backtrace
dev-cmd/test: set `RUST_BACKTRACE` when retrying
2022-08-16 20:02:55 +08:00
hyuraku
634fcad1b2 add dry-run option to formula#install 2022-08-16 21:01:07 +09:00
hyuraku
93ebe42a72 add dry-run option to cask#install 2022-08-16 21:00:45 +09:00
Sean Molenaar
cc61a759ed
Merge pull request #13627 from SMillerDev/feature/cask/signing_check
cask: add audit for incorrect signing
2022-08-16 10:51:59 +02:00
Mike McQuaid
d21670370b
Merge pull request #13705 from MikeMcQuaid/service_formula
service: provide formula accessor.
2022-08-16 09:16:08 +01:00
Sean Molenaar
ca65777e70
cask/audit: improve wording
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-08-16 10:01:35 +02:00
Mike McQuaid
59692b5bf4
service: provide formula accessor.
Use `f` because it's generally recognised as a formula and this
shouldn't be widely needed/used.
2022-08-16 08:35:33 +01:00
Rylan Polster
686e02b7ce
Add arm: and intel: arguments to cask sha256 stanza 2022-08-16 00:48:24 -04:00
Carlo Cabrera
5047d4249e
Merge pull request #13690 from carlocab/python-path-shebang
language/python: support `python3` from PATH in `#detected_python_shebang`
2022-08-16 02:02:56 +08:00
Sean Molenaar
17d0572984
Merge pull request #13683 from SMillerDev/fix/build_env/dump_typing
build_environment: add proper types to dump() and fix inreplace error
2022-08-15 19:34:41 +02:00
Sean Molenaar
2de6958a36
build_environment: add proper types to dump() and fix inreplace error 2022-08-15 19:03:55 +02:00
Mike McQuaid
c7df26fed2
Merge pull request #13693 from FnControlHomebrew/info
info: highlight package name
2022-08-15 16:23:08 +01:00
fn ⌃ ⌥
783fcfb97c Fix tests 2022-08-15 07:52:32 -07:00
fn ⌃ ⌥
a208ea9c92 info: highlight package name 2022-08-15 07:47:52 -07:00
Rylan Polster
63ced67928
Merge pull request #13698 from Rylan12/refactor-on-system-cops
Refactor `on_system` rubocops for use in casks
2022-08-15 09:28:20 -04:00
Carlo Cabrera
fb4c6d92bc
Merge pull request #13677 from carlocab/python-libexec
ENV/super: add Python's `libexec/"bin"` directory when applicable
2022-08-15 18:47:02 +08:00
Carlo Cabrera
a1c1bf73ec
dev-cmd/test: set RUST_BACKTRACE when retrying
Occasionally, a new version of Rust will cause failures in dependents.
See, for example, Homebrew/homebrew-core#107818.

This change will allow us to get a fuller backtrace in CI, which will
also make it easier to submit bug reports upstream.

Without this change, recovering a full backtrace requires installing the
new version of Rust and rebuilding the failing formula from source. Both
these steps can be skipped if we set `RUST_BACKTRACE` when retrying a
failing test.
2022-08-15 18:27:32 +08:00