17385 Commits

Author SHA1 Message Date
Eric Knibbe
fa1ce146e4 ruby.sh: allow running on older ruby versions 2020-04-22 17:36:00 -04:00
Bo Anderson
b619e31457 dev-cmd/audit: fix false openssl@1.1 versioned formula audit 2020-04-22 01:00:35 +01:00
Claudia
d026cb91e7
Fix cask loading after adding an artifact type
This commit fixes an issue where we added a new global artifact
and then updated a cask to make use of that new artifact.
This caused a number of `brew cask` commands to fail for users
who had the cask installed before the artifact was added.

When loading the definition of an installed cask, we configure it
using a snapshot from install time, e. g. `/usr/local/Caskroom/markdownmdimporter/.metadata/config.json`.

The snapshot looks like this:

```
{
  "default": {
    "appdir": "/Applications",
    "prefpanedir": "/Users/claudia/Library/PreferencePanes",
    "qlplugindir": "/Users/claudia/Library/QuickLook",
    "dictionarydir": "/Users/claudia/Library/Dictionaries",
    "fontdir": "/Users/claudia/Library/Fonts",
    "colorpickerdir": "/Users/claudia/Library/ColorPickers",
    "servicedir": "/Users/claudia/Library/Services",
    "input_methoddir": "/Users/claudia/Library/Input Methods",
    "internet_plugindir": "/Users/claudia/Library/Internet Plug-Ins",
    "audio_unit_plugindir": "/Users/claudia/Library/Audio/Plug-Ins/Components",
    "vst_plugindir": "/Users/claudia/Library/Audio/Plug-Ins/VST",
    "vst3_plugindir": "/Users/claudia/Library/Audio/Plug-Ins/VST3",
    "screen_saverdir": "/Users/claudia/Library/Screen Savers"
  },
  "env": {},
  "explicit": {}
}
```

Note that there is no `mdimporterdir` because the cask was installed
before the artifact was added.

The root cause is that the cask loading code still expects the snapshot
to contain directory configuration for all artifact types.
Since the snapshot never learned about the new artifact type, cask
loading would fail.

The fix applied in this commit is to fall back to the global default
whenever the `default` directory map of a configuration snapshot is
incomplete.

See also:
- https://github.com/Homebrew/brew/pull/7286#issuecomment-613376568
- https://discourse.brew.sh/t/cask-definition-is-invalid-invalid-mdimporter-stanza-key-not-found-mdimporterdir
2020-04-21 18:29:14 +02:00
Claudia
374f788a3c
cask/config_spec: add failing test
We recently added a new global artifact and then updated a cask to
make use of that new artifact. This caused a number of `brew cask`
commands to fail for users who had the cask installed before the
artifact was added.

This commit adds test cases for that failure mode.

See also:
- https://github.com/Homebrew/brew/pull/7286#issuecomment-613376568
- https://discourse.brew.sh/t/cask-definition-is-invalid-invalid-mdimporter-stanza-key-not-found-mdimporterdir
2020-04-21 18:26:51 +02:00
Alexander Bayandin
bd24f5a45e bintray: fix package creation 2020-04-21 14:36:01 +01:00
Mike McQuaid
b3a7ad7ca6
formula_installer: fix build_from_source? call.
This should check the local instance variable rather than the global
value as it varies for dependencies and requested formulae.
2020-04-21 13:26:37 +01:00
Shaun Jackman
6b547a5c5e pr-upload: Fix a bug introduced by PR #7406
Fix the error:
Error: No such file or directory @ rb_sysopen - bottle
2020-04-20 15:16:08 -07:00
Mike McQuaid
d6e7003ef2
Merge pull request #7407 from sjackman/uses_from_macos
uses_from_macos: Add gzip rsync to the white list
2020-04-20 20:13:24 +01:00
Mike McQuaid
6d999f95d2
Merge pull request #7406 from sjackman/pr-upload-root-url
pr-upload: Add argument root-url
2020-04-20 20:12:59 +01:00
Mike McQuaid
cc74c4a742
Merge pull request #7409 from MikeMcQuaid/brew-pull-args
pull: fix head_revision definition.
2020-04-20 20:12:09 +01:00
Mike McQuaid
9457d1af5e
pull: fix head_revision definition.
Fixes #7405.
2020-04-20 19:54:38 +01:00
Shaun Jackman
ffb405019d uses_from_macos: Add gzip rsync to the white list
/usr/bin/gzip and /usr/bin/rsync are provided by macOS.
2020-04-20 11:52:58 -07:00
Shaun Jackman
29ae567868 pr-upload: Add argument root-url
The argument root-url is needed for third-party taps.
2020-04-20 11:47:57 -07:00
Mike McQuaid
fb0fa419ab
cask/cmd/upgrade_spec: remove more flaky tests. 2020-04-20 16:45:44 +01:00
Gautham G
676ebf7419
ARGV: Deprecate ARGV.force_bottle? 2020-04-20 16:45:43 +01:00
Mike McQuaid
a5b6c5f262
Merge pull request #7382 from dawidd6/whitelist-bin-config
diagnostic: whitelist /bin and /sbin for *-config files
2020-04-20 16:38:56 +01:00
Mike McQuaid
c4fed07d34
Merge pull request #7401 from dawidd6/pr-upload
Add pr-upload command
2020-04-20 16:33:06 +01:00
Dawid Dziurla
80e118cba3
diagnostic: whitelist /bin and /sbin for *-config files 2020-04-20 16:18:56 +01:00
Dawid Dziurla
3dd5a7465d
add pr-upload command 2020-04-20 13:37:05 +02:00
Mike McQuaid
f074e3a355
Merge pull request #7399 from MikeMcQuaid/uses_from_macos_updates
rubocops/uses_from_macos: update list.
2020-04-20 10:56:15 +01:00
Mike McQuaid
9eed1e4e7e
Merge pull request #7400 from MikeMcQuaid/cleanup_max_age_days
cleanup: all configuring max age days.
2020-04-20 10:54:58 +01:00
Mike McQuaid
c6d5bdcb82
Merge pull request #7402 from MikeMcQuaid/cli-args-formula-options
Remove ARGV_WITHOUT_MONKEY_PATCHING
2020-04-20 10:54:46 +01:00
Mike McQuaid
cddc67b451
rubocops/uses_from_macos: update list.
Also, provide details on how to update this in future and split it into
two.

Fixes #7396
2020-04-20 10:36:42 +01:00
Mike McQuaid
701c1811d5
cleanup: all configuring max age days.
Fixes #7320
2020-04-20 10:33:15 +01:00
Mike McQuaid
af8091a279
Remove ARGV_WITHOUT_MONKEY_PATCHING
Our usage of `ARGV` will go away soon enough and maintaining state
between `ARGV` and `ARGV_WITHOUT_MONKEY_PATCHING` is futile.

Fixes #7397
2020-04-20 10:27:14 +01:00
Mike McQuaid
8b84ef5dc8
pull: cleanup more code.
Remove more unused code.
2020-04-20 10:09:22 +01:00
Mike McQuaid
75c74e4674
cask/cmd/upgrade_spec: remove flaky test. 2020-04-20 09:25:16 +01:00
EricFromCanada
9d6eb41fc5 cmd/dev-cmd: misc. usage and wording fixes 2020-04-19 13:31:54 -04:00
EricFromCanada
b6809f2dda analytics: rearrange help into subcommand format 2020-04-19 11:50:28 -04:00
EricFromCanada
0acfb4b819 Add line break and indent to subcommand descriptions 2020-04-19 11:50:28 -04:00
Mike McQuaid
ef3b148147
Merge pull request #7395 from MikeMcQuaid/kill-jenkins
Remove last Jenkins references
2020-04-19 15:09:05 +01:00
Mike McQuaid
239b4c9d19
Remove last Jenkins references
- remove Jenkins Testing support from `brew pull`
- update reference to MacStadium Orka
- remove reference to DigitalOcean
2020-04-19 14:53:18 +01:00
Mike McQuaid
2bbcab5615
Merge pull request #7333 from GauthamGoli/argv-cleanup-21
cli/args: Make build_from_source public instance method
2020-04-19 13:23:34 +01:00
Jonathan Chang
3b78b1aa95
Merge pull request #7369 from dawidd6/automerge-multiple-labels
pr-automerge: allow multiple comma separated without labels
2020-04-19 17:46:12 +10:00
Dawid Dziurla
8305919c93 pr-automerge: allow multiple comma separated -labels 2020-04-19 16:17:25 +10:00
Jonathan Chang
2dfaebc637 cpu: update for new processor family 2020-04-19 13:26:04 +10:00
Mike McQuaid
8d868b739c
cli/args: simplify initialisation.
Move some logic from `CLI::Parser` to `CLI::Args` to simplify and make
more consistent the initialisation process.
2020-04-18 21:14:35 +01:00
Mike McQuaid
8eed72cd8b
Move file mode audit to RuboCop. 2020-04-18 15:44:24 +01:00
Mike McQuaid
8cb90595b3
dev-cmd/audit: add TODOs for RuboCop migrations. 2020-04-18 15:30:53 +01:00
Mike McQuaid
3546c39581
audit: remove trailing newline check.
This is already done by the default RuboCop configuration.
2020-04-18 15:30:53 +01:00
Mike McQuaid
b0d3414fdb
Merge pull request #7372 from Bo98/xcode-11.4.1
os/mac/xcode: support Xcode 11.4.1
2020-04-18 15:16:05 +01:00
Mike McQuaid
b2f90b2877
Merge pull request #7378 from MikeMcQuaid/rubocop-remove-exceptions
rubocop.yml: remove formula exclusions.
2020-04-18 15:12:51 +01:00
Mike McQuaid
4132ccbf66
rubocop.yml: remove formula exclusions.
These have now been fixed so are no longer needed.
2020-04-18 14:53:32 +01:00
Mike McQuaid
8a0e6a1603
test/cask/cmd/upgrade_spec: remove flaky test.
This is the second flaky test removed in this file. Tempting to just
remove the whole file if there's more.
2020-04-18 14:37:10 +01:00
Jonathan Chang
d6cf14fd1e audit: add libiconv to uses_from_macos whitelist
This lives at /usr/lib/libiconv.dylib
2020-04-18 21:39:39 +10:00
Mike McQuaid
bc96428207
rubocop.yml: enable new rules. 2020-04-17 11:04:33 +01:00
dependabot-preview[bot]
e06e37291f
build(deps): bump rubocop from 0.81.0 to 0.82.0 in /Library/Homebrew
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.81.0 to 0.82.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.81.0...v0.82.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-17 11:04:33 +01:00
Mike McQuaid
04105abf92
Merge pull request #7359 from Bo98/shims-check
formula_cellar_checks: check for shim dir references
2020-04-17 09:01:48 +01:00
Jonathan Chang
5f9fee4776
Merge pull request #7373 from jonchang/sponsors-api
github: add sponsors GraphQL API
2020-04-17 17:35:37 +10:00
Jonathan Chang
286488f753 github: add sponsors GraphQL API 2020-04-17 17:16:54 +10:00