Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Homebrew/brew
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.5.0
Choose a base ref
...
head repository: Homebrew/brew
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.5.1
Choose a head ref

Commits on Sep 6, 2020

  1. Add flowchart for managing pull requests

    - Add flowchart for handling ready-to-merge pull requests
    
    - Add diagram guidelines
    
    Many thanks to Sean Molenaar for the idea and initial version of the
    chart.
    
    CC: Sean Molenaar <smillernl@me.com>
    claui committed Sep 6, 2020
    Copy the full SHA
    f4d81fe View commit details
  2. Copy the full SHA
    8ab5ea5 View commit details

Commits on Sep 7, 2020

  1. Copy the full SHA
    a8bcd92 View commit details
  2. Copy the full SHA
    ccde620 View commit details
  3. Copy the full SHA
    4d8dcb1 View commit details
  4. Copy the full SHA
    4bb396b View commit details

Commits on Sep 8, 2020

  1. Copy the full SHA
    249e8e2 View commit details
  2. Merge pull request #8630 from dtrodrigues/bottle-lutime

    bottle: use File.lutime instead of system call
    dtrodrigues authored Sep 8, 2020
    Copy the full SHA
    17d92a2 View commit details
  3. Merge pull request #8638 from SeekingMeaning/bump-formula-pr/update-m…

    …irrors
    
    bump-formula-pr: update mirrors automatically
    SeekingMeaning authored Sep 8, 2020
    Copy the full SHA
    17a9b58 View commit details
  4. std_meson_args: add --wrap-mode=nofallback

    Otherwise projects may download missing dependencies and build and
    install them. GNOME projects do this a lot in particular.
    tschoonj committed Sep 8, 2020
    Copy the full SHA
    6af2b6d View commit details
  5. utils: add tar

    Includes `validate_file` method to be used by `bump-formula-pr`
    SeekingMeaning committed Sep 8, 2020
    Copy the full SHA
    15af718 View commit details
  6. Copy the full SHA
    d7097b5 View commit details
  7. Merge pull request #8627 from claui/pr-diagram

    Add flowchart for managing ready-to-merge PRs
    claui authored Sep 8, 2020
    Copy the full SHA
    08ab2d7 View commit details
  8. [ImgBot] Optimize images

    *Total -- 61.65kb -> 43.73kb (29.07%)
    
    /docs/assets/img/docs/managing-pull-requests.drawio.svg -- 61.61kb -> 43.69kb (29.08%)
    /Library/Homebrew/test/support/fixtures/test.gif -- 0.04kb -> 0.03kb (18.6%)
    
    Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
    ImgBotApp committed Sep 8, 2020
    Copy the full SHA
    1a7b3e8 View commit details
  9. Merge pull request #8611 from SeekingMeaning/bump-formula-pr/validate…

    …_tar_download
    
    utils: add `tar`
    SeekingMeaning authored Sep 8, 2020
    Copy the full SHA
    b94f04b View commit details
  10. Merge pull request #8635 from Rylan12/deprecate_disable_info

    deprecate_disable: refactor and add to `info`
    Rylan12 authored Sep 8, 2020
    Copy the full SHA
    7d92454 View commit details
  11. Copy the full SHA
    be92ef2 View commit details
  12. Copy the full SHA
    0a4fbf7 View commit details
  13. Merge pull request #8639 from reitermarkus/rspec-github-actions

    Add RSpec formatter for Github Actions.
    reitermarkus authored Sep 8, 2020
    Copy the full SHA
    66555af View commit details
  14. Merge pull request #8651 from Homebrew/imgbot

    [ImgBot] Optimize images
    MikeMcQuaid authored Sep 8, 2020
    Copy the full SHA
    8118aee View commit details
  15. Merge pull request #7986 from SeekingMeaning/bump-cask-pr

    dev-cmd: add bump-cask-pr command
    SeekingMeaning authored Sep 8, 2020
    Copy the full SHA
    6d1de3a View commit details
  16. use sort to fix latest_tag

    shcai97 committed Sep 8, 2020
    Copy the full SHA
    77f2a24 View commit details
  17. Copy the full SHA
    e2b3bdb View commit details
  18. help: show help text for tapped external command

    Previously, running e.g. `brew help bundle` when homebrew-bundle was not
    tapped would tap homebrew-bundle and then run `brew bundle` showing
    `Error: No Brewfile found` instead of the expected help text.
    Rylan12 committed Sep 8, 2020
    Copy the full SHA
    5b393cb View commit details
  19. Merge pull request #8655 from claui/fix-✅

    Use monochrome ✔, which works better with filter
    claui authored Sep 8, 2020
    Copy the full SHA
    455965d View commit details
  20. Copy the full SHA
    c22c6c4 View commit details
  21. Merge pull request #8657 from miccal/cbmc_audit

    Remove cbmc from GITHUB_PRERELEASE_ALLOWLIST
    issyl0 authored Sep 8, 2020
    Copy the full SHA
    b94f9dc View commit details

Commits on Sep 9, 2020

  1. use --key and --numeric-sort

    Co-authored-by: Maxim Belkin <maxim.belkin@gmail.com>
    shcai97 and maxim-belkin authored Sep 9, 2020
    Copy the full SHA
    1789c27 View commit details
  2. build(deps): bump sorbet-runtime in /Library/Homebrew

    Bumps [sorbet-runtime](https://github.com/sorbet/sorbet) from 0.5.5891 to 0.5.5895.
    - [Release notes](https://github.com/sorbet/sorbet/releases)
    - [Commits](https://github.com/sorbet/sorbet/commits)
    
    Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
    dependabot-preview[bot] authored Sep 9, 2020
    Copy the full SHA
    79047fc View commit details
  3. Merge pull request #8653 from Rylan12/help-external-command-fix

    help: show help text for tapped external command
    MikeMcQuaid authored Sep 9, 2020
    Copy the full SHA
    91ee29d View commit details
  4. Merge pull request #8659 from Homebrew/dependabot/bundler/Library/Hom…

    …ebrew/sorbet-runtime-0.5.5895
    
    build(deps): bump sorbet-runtime from 0.5.5891 to 0.5.5895 in /Library/Homebrew
    MikeMcQuaid authored Sep 9, 2020
    Copy the full SHA
    a69bb1c View commit details
  5. build(deps): bump sorbet from 0.5.5891 to 0.5.5895 in /Library/Homebrew

    Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.5891 to 0.5.5895.
    - [Release notes](https://github.com/sorbet/sorbet/releases)
    - [Commits](https://github.com/sorbet/sorbet/commits)
    
    Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
    dependabot-preview[bot] authored Sep 9, 2020
    Copy the full SHA
    0c145d0 View commit details
  6. Merge pull request #8649 from tschoonj/fix-std-meson-args

    std_meson_args: add --wrap-mode=nofallback
    MikeMcQuaid authored Sep 9, 2020
    Copy the full SHA
    b59f91a View commit details
  7. Merge pull request #8644 from shcai97/update_latest_tag_fix

    update: fix latest_tag in homebrew/brew update
    MikeMcQuaid authored Sep 9, 2020
    Copy the full SHA
    959d2b7 View commit details
  8. Copy the full SHA
    196d7ba View commit details
  9. Copy the full SHA
    6f924b0 View commit details
  10. Copy the full SHA
    3794317 View commit details
  11. Copy the full SHA
    d0b0daf View commit details
  12. Copy the full SHA
    c68bf84 View commit details
  13. Copy the full SHA
    15a5665 View commit details
  14. Copy the full SHA
    83f62d1 View commit details
  15. Copy the full SHA
    412be8e View commit details
  16. Copy the full SHA
    6dd04be View commit details
  17. Copy the full SHA
    e7a61bb View commit details
  18. Merge pull request #8660 from Homebrew/dependabot/bundler/Library/Hom…

    …ebrew/sorbet-0.5.5895
    
    build(deps): bump sorbet from 0.5.5891 to 0.5.5895 in /Library/Homebrew
    MikeMcQuaid authored Sep 9, 2020
    Copy the full SHA
    3403836 View commit details
  19. Merge pull request #8652 from jonchang/doc-cleanup

    docs: various updates
    jonchang authored Sep 9, 2020
    Copy the full SHA
    21e05e2 View commit details
  20. Copy the full SHA
    e0645f3 View commit details
  21. Copy the full SHA
    36c35ef View commit details
  22. Copy the full SHA
    4b6318b View commit details
  23. Copy the full SHA
    5690177 View commit details
Showing 335 changed files with 3,041 additions and 1,216 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -16,6 +16,11 @@ trim_trailing_whitespace = true
# trailing whitespace is crucial for patches
trim_trailing_whitespace = false

[**.drawio.svg]
indent_size = unset
indent_style = unset
insert_final_newline = false

[**.md]
trim_trailing_whitespace = true
x-soft-wrap-text = true
11 changes: 9 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -45,11 +45,10 @@ jobs:
- name: Set up Homebrew official command taps
run: |
# Setup taps needed for 'brew tests' and 'brew man'
brew tap homebrew/bundle
cd "$(brew --repo)"
if [ "$RUNNER_OS" = "macOS" ]; then
brew update-reset Library/Taps/homebrew/homebrew-cask Library/Taps/homebrew/homebrew-services
brew update-reset Library/Taps/homebrew/homebrew-bundle Library/Taps/homebrew/homebrew-cask Library/Taps/homebrew/homebrew-services
else
brew update-reset Library/Taps/homebrew/homebrew-services
fi
@@ -60,6 +59,14 @@ jobs:
- name: Run brew man
run: brew man --fail-if-changed

- name: Install brew tests dependencies
if: matrix.os == 'macOS-latest'
run: |
brew install subversion
Library/Homebrew/shims/scm/svn --homebrew=print-path
which svn
which svnadmin
- name: Run brew tests
run: |
# brew tests doesn't like world writable directories
3 changes: 2 additions & 1 deletion Library/Homebrew/.simplecov
Original file line number Diff line number Diff line change
@@ -45,8 +45,9 @@ SimpleCov.start do
else
command_name "#{command_name} (#{$PROCESS_ID})"

excludes = ["test", "vendor"]
subdirs = Dir.chdir(SimpleCov.root) { Dir.glob("*") }
.reject { |d| d.end_with?(".rb") || ["test", "vendor"].include?(d) }
.reject { |d| d.end_with?(".rb") || excludes.include?(d) }
.map { |d| "#{d}/**/*.rb" }.join(",")

# Not using this during integration tests makes the tests 4x times faster
16 changes: 8 additions & 8 deletions Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (6.0.3.2)
activesupport (6.0.3.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
@@ -109,8 +109,8 @@ GEM
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.3.0)
parser (>= 2.7.1.4)
rubocop-performance (1.7.1)
rubocop (>= 0.82.0)
rubocop-performance (1.8.0)
rubocop (>= 0.87.0)
rubocop-rspec (1.43.2)
rubocop (~> 0.87)
ruby-macho (2.2.0)
@@ -119,16 +119,16 @@ GEM
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov-html (0.12.2)
sorbet (0.5.5891)
sorbet-static (= 0.5.5891)
sorbet-runtime (0.5.5891)
sorbet-static (0.5.5891-universal-darwin-14)
sorbet (0.5.5909)
sorbet-static (= 0.5.5909)
sorbet-runtime (0.5.5909)
sorbet-static (0.5.5909-universal-darwin-14)
spoom (1.0.4)
colorize
sorbet (~> 0.5.5)
sorbet-runtime
thor (>= 0.19.2)
tapioca (0.4.4)
tapioca (0.4.5)
parlour (>= 2.1.0)
pry (>= 0.12.2)
sorbet-runtime
4 changes: 2 additions & 2 deletions Library/Homebrew/bintray.rb
Original file line number Diff line number Diff line change
@@ -37,8 +37,8 @@ def open_api(url, *extra_curl_args, auth: true)
end

curl(*args, url,
show_output: verbose?,
secrets: key)
print_stdout: false,
secrets: key)
end

def upload(local_file, repo:, package:, version:, remote_file:, sha256: nil)
4 changes: 3 additions & 1 deletion Library/Homebrew/brew.rb
Original file line number Diff line number Diff line change
@@ -139,10 +139,12 @@ class MissingEnvironmentVariables < RuntimeError; end
brew_uid = HOMEBREW_BREW_FILE.stat.uid
tap_commands += %W[/usr/bin/sudo -u ##{brew_uid}] if Process.uid.zero? && !brew_uid.zero?
end
tap_commands += %W[#{HOMEBREW_BREW_FILE} tap #{possible_tap.name}]
quiet_arg = args.quiet? ? "--quiet" : nil
tap_commands += [HOMEBREW_BREW_FILE, "tap", *quiet_arg, possible_tap.name]
safe_system(*tap_commands)
end

ARGV << "--help" if help_flag
exec HOMEBREW_BREW_FILE, cmd, *ARGV
end
rescue UsageError => e
16 changes: 8 additions & 8 deletions Library/Homebrew/brew.sh
Original file line number Diff line number Diff line change
@@ -106,14 +106,6 @@ numeric() {
printf "%01d%02d%02d%03d" ${1//[.rc]/ } 2>/dev/null
}

HOMEBREW_VERSION="$(git -C "$HOMEBREW_REPOSITORY" describe --tags --dirty --abbrev=7 2>/dev/null)"
HOMEBREW_USER_AGENT_VERSION="$HOMEBREW_VERSION"
if [[ -z "$HOMEBREW_VERSION" ]]
then
HOMEBREW_VERSION=">=2.2.0 (shallow or no git repository)"
HOMEBREW_USER_AGENT_VERSION="2.X.Y"
fi

if [[ "$HOMEBREW_PREFIX" = "/" || "$HOMEBREW_PREFIX" = "/usr" ]]
then
# it may work, but I only see pain this route and don't want to support it
@@ -144,6 +136,14 @@ else
HOMEBREW_GIT="git"
fi

HOMEBREW_VERSION="$("$HOMEBREW_GIT" -C "$HOMEBREW_REPOSITORY" describe --tags --dirty --abbrev=7 2>/dev/null)"
HOMEBREW_USER_AGENT_VERSION="$HOMEBREW_VERSION"
if [[ -z "$HOMEBREW_VERSION" ]]
then
HOMEBREW_VERSION=">=2.5.0 (shallow or no git repository)"
HOMEBREW_USER_AGENT_VERSION="2.X.Y"
fi

if [[ -n "$HOMEBREW_MACOS" ]]
then
HOMEBREW_PRODUCT="Homebrew"
50 changes: 45 additions & 5 deletions Library/Homebrew/cache_store.rb
Original file line number Diff line number Diff line change
@@ -13,14 +13,33 @@ class CacheStoreDatabase
# @param [Symbol] type
# @yield [CacheStoreDatabase] self
def self.use(type)
database = CacheStoreDatabase.new(type)
return_value = yield(database)
database.close_if_open!
@db_type_reference_hash ||= {}
@db_type_reference_hash[type] ||= {}
type_ref = @db_type_reference_hash[type]

type_ref[:count] ||= 0
type_ref[:count] += 1

type_ref[:db] ||= CacheStoreDatabase.new(type)

return_value = yield(type_ref[:db])
if type_ref[:count].positive?
type_ref[:count] -= 1
else
type_ref[:count] = 0
end

if type_ref[:count].zero?
type_ref[:db].write_if_dirty!
type_ref.delete(:db)
end

return_value
end

# Sets a value in the underlying database (and creates it if necessary).
def set(key, value)
dirty!
db[key] = value
end

@@ -35,12 +54,13 @@ def get(key)
def delete(key)
return unless created?

dirty!
db.delete(key)
end

# Closes the underlying database (if it is created and open).
def close_if_open!
return unless @db
def write_if_dirty!
return unless dirty?

cache_path.dirname.mkpath
cache_path.atomic_write(JSON.dump(@db))
@@ -76,6 +96,13 @@ def empty?
db.empty?
end

# Performs a `each_key` on the underlying database.
#
# @return [Array]
def each_key(&block)
db.each_key(&block)
end

private

# Lazily loaded database in read/write mode. If this method is called, a
@@ -98,6 +125,7 @@ def db
# @return [nil]
def initialize(type)
@type = type
@dirty = false
end

# The path where the database resides in the `HOMEBREW_CACHE` for the given
@@ -107,6 +135,18 @@ def initialize(type)
def cache_path
HOMEBREW_CACHE/"#{@type}.json"
end

# Sets that the cache needs written to disk.
def dirty!
@dirty = true
end

# Returns `true` if the cache needs written to disk.
#
# @return [Boolean]
def dirty?
@dirty
end
end

#
3 changes: 2 additions & 1 deletion Library/Homebrew/cask/artifact/abstract_uninstall.rb
Original file line number Diff line number Diff line change
@@ -85,9 +85,10 @@ def uninstall_early_script(directives, **options)

# :launchctl must come before :quit/:signal for cases where app would instantly re-launch
def uninstall_launchctl(*services, command: nil, **_)
booleans = [false, true]
services.each do |service|
ohai "Removing launchctl service #{service}"
[false, true].each do |with_sudo|
booleans.each do |with_sudo|
plist_status = command.run(
"/bin/launchctl",
args: ["list", service],
12 changes: 8 additions & 4 deletions Library/Homebrew/cask/audit.rb
Original file line number Diff line number Diff line change
@@ -204,7 +204,8 @@ def check_required_stanzas
end
add_error "at least one name stanza is required" if cask.name.empty?
# TODO: specific DSL knowledge should not be spread around in various files like this
installable_artifacts = cask.artifacts.reject { |k| [:uninstall, :zap].include?(k) }
rejected_artifacts = [:uninstall, :zap]
installable_artifacts = cask.artifacts.reject { |k| rejected_artifacts.include?(k) }
add_error "at least one activatable artifact stanza is required" if installable_artifacts.empty?
end

@@ -468,8 +469,9 @@ def check_github_prerelease_version
user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*}) if @online
return if user.nil?

# TODO: Detect tag from URL instead of using `cask.version`.
error = SharedAudits.github_release(user, repo, cask.version, cask: cask)
tag = SharedAudits.github_tag_from_url(cask.url)
tag ||= cask.version
error = SharedAudits.github_release(user, repo, tag, cask: cask)
add_error error if error
end

@@ -481,7 +483,9 @@ def check_gitlab_prerelease_version

odebug "Auditing GitLab prerelease"

error = SharedAudits.gitlab_release(user, repo, cask.version)
tag = SharedAudits.gitlab_tag_from_url(cask.url)
tag ||= cask.version
error = SharedAudits.gitlab_release(user, repo, tag)
add_error error if error
end

16 changes: 15 additions & 1 deletion Library/Homebrew/cask/cmd/audit.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require "utils/github/actions"

module Cask
class Cmd
# Implementation of the `brew cask audit` command.
@@ -57,7 +59,19 @@ def run
odebug "Auditing Cask #{cask}"
result = Auditor.audit(cask, **options)

result[:warnings].empty? && result[:errors].empty?
next true if result[:warnings].empty? && result[:errors].empty?

if ENV["GITHUB_ACTIONS"]
cask_path = cask.sourcefile_path
annotations = (result[:warnings].map { |w| [:warning, w] } + result[:errors].map { |e| [:error, e] })
.map { |type, message| GitHub::Actions::Annotation.new(type, message, file: cask_path) }

annotations.each do |annotation|
puts annotation if annotation.relevant?
end
end

false
end

return if failed_casks.empty?
20 changes: 16 additions & 4 deletions Library/Homebrew/cleanup.rb
Original file line number Diff line number Diff line change
@@ -180,15 +180,15 @@ def periodic_clean!
def clean!(quiet: false, periodic: false)
if args.empty?
Formula.installed.sort_by(&:name).each do |formula|
cleanup_formula(formula, quiet: quiet, ds_store: false)
cleanup_formula(formula, quiet: quiet, ds_store: false, cache_db: false)
end
cleanup_cache
cleanup_logs
cleanup_lockfiles
prune_prefix_symlinks_and_directories

unless dry_run?
cleanup_old_cache_db
cleanup_cache_db
rm_ds_store
HOMEBREW_CACHE.mkpath
FileUtils.touch PERIODIC_CLEAN_FILE
@@ -225,11 +225,12 @@ def unremovable_kegs
@unremovable_kegs ||= []
end

def cleanup_formula(formula, quiet: false, ds_store: true)
def cleanup_formula(formula, quiet: false, ds_store: true, cache_db: true)
formula.eligible_kegs_for_cleanup(quiet: quiet)
.each(&method(:cleanup_keg))
cleanup_cache(Pathname.glob(cache/"#{formula.name}--*"))
rm_ds_store([formula.rack]) if ds_store
cleanup_cache_db(formula.rack) if cache_db
cleanup_lockfiles(FormulaLock.new(formula.name).path)
end

@@ -387,12 +388,23 @@ def cleanup_portable_ruby
FileUtils.rm_rf portable_rubies_to_remove
end

def cleanup_old_cache_db
def cleanup_cache_db(rack = nil)
FileUtils.rm_rf [
cache/"desc_cache.json",
cache/"linkage.db",
cache/"linkage.db.db",
]

CacheStoreDatabase.use(:linkage) do |db|
break unless db.created?

db.each_key do |keg|
next if rack.present? && !keg.start_with?("#{rack}/")
next if File.directory?(keg)

LinkageCacheStore.new(keg, db).delete!
end
end
end

def rm_ds_store(dirs = nil)
Loading