86 Commits

Author SHA1 Message Date
Carlo Cabrera
16e56907b5
formula_cellar_checks: fix cpuid instruction check on Mojave
The output format of `objdump` on Mojave is different from newer
versions of macOS, so I've adjusted the relevant audit to account for
this difference.
2021-07-08 04:26:34 +01:00
Carlo Cabrera
5ed4430daf
Apply suggestions from code review
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2021-07-05 10:12:34 -07:00
Carlo Cabrera
63aa192088
Incorporate suggestions from feedback
1. Never install `binutils`. Instead, report an audit failure.
2. Tighten instruction check with a stricter matching strategy.
2021-07-05 17:47:20 +01:00
Carlo Cabrera
c59a42b24e
formula_cellar_checks: check for cpuid instruction when needed
This implements the second audit discussed in #11608.
2021-07-04 00:31:31 +01:00
Sean Molenaar
2ec4125178
Audit: make sure service commands exist 2021-04-27 09:36:36 +02:00
Mike McQuaid
6109f00d64
Revert "audit: check for installed empty files" 2021-03-30 14:14:24 +01:00
Kenneth Chew
5adf8cbe7b
audit: add additional (in)valid empty files, refactor empty file check 2021-03-25 16:56:26 -04:00
Kenneth Chew
844e865363
audit: check for installed empty files
Empty files sometimes indicate that problems occurred during building or installation.
2021-03-14 17:59:09 -04:00
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05:00
EricFromCanada
2ed324ebc0 use backticks around suggested input, flags, and binaries 2021-01-26 16:19:47 -05:00
Mike McQuaid
0bbf965807
More bottling HOMEBREW_LIBRARY changes
- Refuse to create bottles which have non-relocatable references to
  `HOMEBREW_LIBRARY`. This allows us to make all bottles ignore where
  `HOMEBREW_REPOSITORY` is (even those that aren't `cellar :any`).
  I cannot see any circumstances in which any bottle should link to
  anything within `HOMEBREW_REPOSITORY`.
- Remove audit that becomes unnecessary given the above change.
- Relocate references to `@HOMEBREW_LIBRARY@` but don't actually write
  any references yet. This will allow us to move to using
  `@HOMEBREW_LIBRARY` and remove all relocation of `HOMEBREW_REPOSITORY`
  in a future release (2.7.1, most likely).
2020-12-18 13:50:10 +00:00
Shaun Jackman
c56681a227 Comment needed changes if HOMEBREW_LIBRARY changes 2020-12-16 14:03:10 -08:00
Shaun Jackman
7fb1620c58 Enable check_repository_references conditionally
Enable check_repository_references when HOMEBREW_PREFIX == HOMEBREW_REPOSITORY.

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-12-15 12:47:08 -08:00
Shaun Jackman
7b408dffc9 audit: Add check_repository_references
Ensure that any references to HOMEBREW_REPOSITORY
are within HOMEBREW_LIBRARY.
2020-12-15 12:47:08 -08:00
Rylan Polster
6e82f77108 audit: allow python symlinks based on keg-only status 2020-10-20 12:46:23 -04:00
Rylan Polster
dccece702c audit: avoid python symlink conflict 2020-10-20 12:09:11 -04:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
fb4d08a49a Fix brew style 2020-09-11 10:29:22 +01:00
Markus Reiter
603bbd9a95 Document FormulaCellarChecks. 2020-08-26 03:13:58 +02:00
Mike McQuaid
c5267f1c75
formula_cellar_checks: check plist.
Check plists so https://github.com/Homebrew/homebrew-services/issues/219 does not occur.
2020-05-03 13:59:08 +01:00
Bo Anderson
c85ff0923e formula_cellar_checks: check for shim dir references 2020-04-15 18:04:43 +01:00
Jonathan Chang
2c85f26b0b formula_cellar_checks: skip unless Python libs
This avoids an unusual error message when Python is needed for building
(e.g., code generation) but is not used at runtime.

```
==> brew audit recode --online
Error: 1 problem in 1 formula detected
recode:
  * Packages have been installed for:

    but this formula depends on:
      Python 3.7
```
2020-04-04 15:54:42 +11:00
Bo Anderson
a298d7d8fe formula_cellar_checks: check Python site packages 2020-04-03 09:32:01 +01:00
Dawid Dziurla
690b7a38d5
Remove 'run' from generic binaries list 2019-12-22 08:52:47 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
EricFromCanada
89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04:00
EricFromCanada
fa6404e0f5 grammar fixes 2019-04-13 21:29:32 -04:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Maxim Belkin
4f166ce021
formula_cellar_checks: .dylib and .framework are macOS-specific 2018-08-22 21:25:00 -05:00
Shaun Jackman
27fb8befd0 check_non_libraries: *.so.* is valid on Linux 2018-08-14 14:50:10 -07:00
Reto Kromer
301aa9cf59
better alignement 2018-05-16 19:07:11 +02:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
ilovezfs
ee6b0e7c9b formula_cellar_checks: check_non_libraries only for new formulae
This check is overly opinionated and leads to audit failures no one
cares to fix, so let's only run it for new formulae.
2017-08-03 05:21:36 -07:00
Markus Reiter
2d6ae61314 Re-revert "Fix operator spacing." 2017-06-02 19:22:05 +02:00
ilovezfs
197392b56d Revert "Fix operator spacing." 2017-06-01 04:06:40 -07:00
Markus Reiter
d34ba7395b Fix operator spacing. 2017-05-31 19:53:41 +02:00
Misty De Meo
2bca6fb338 check_non_libraries: fix false positive subdirectory reports 2017-05-29 16:49:21 -07:00
Mike McQuaid
7a38bab333 Fixup all RuboCop warnings. 2017-05-29 18:43:18 +01:00
Mike McQuaid
ba3c46d24f More deprecations.
Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
2017-04-22 16:28:07 +01:00
Mike McQuaid
3f8722c971 audit: allow skipping audit methods.
Add `--only` and `--except` methods which can be used to selectively
enable or disable audit groups.
2017-04-18 08:17:26 +01:00
Mike McQuaid
aec3d1fe3d Revert "formula_cellar_checks: check for prefix/etc." 2017-01-27 14:09:19 +00:00
Mike McQuaid
1aa179ad9a formula_cellar_checks: check for prefix/etc.
This directory indicates that configuration files have been installed
into the wrong location.
2017-01-26 15:26:42 +00:00
Markus Reiter
e851c9bf6c Style/Alias: Prefer alias. 2016-09-23 18:19:53 +02:00
Markus Reiter
4064084c58 Fix Style/MethodName. 2016-09-23 15:30:06 +02:00
Mike McQuaid
6693915399 rubocop --auto-correct all remaining files.
But remove some manual `.freeze`s on constants that shouldn't be
constants.
2016-09-17 16:14:13 +01:00
Greg Nisbet
f1ce358551 Utils::Shell.shell_profile in formula_cellar_checks 2016-08-10 23:21:30 -07:00
Mike McQuaid
df7e36b86c formula_cellar_checks: port to generic OS. (#452) 2016-07-09 13:51:53 +01:00
Alex Dunn
168a2687f8 stricter audit for Emacs Lisp installs
Require that the subdirectory in site-lisp match the formula name
exactly.  This lets us provide better information in the caveats and
will make it easier for helper methods to write to the correct
location (as in in Homebrew/homebrew-emacs#13).
2015-11-01 17:34:28 -08:00
Xu Cheng
b121e5fd7b more core file style updated by rubocop 2015-08-06 17:23:56 +08:00