From 519c46c5f4f725a0ba7b1e3ab771af62752e9564 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Sun, 12 Jan 2020 13:45:05 +0100 Subject: [PATCH 01/17] formula_creator: update go build args --- Library/Homebrew/formula_creator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_creator.rb b/Library/Homebrew/formula_creator.rb index 06ce159785..53777d1e09 100644 --- a/Library/Homebrew/formula_creator.rb +++ b/Library/Homebrew/formula_creator.rb @@ -137,7 +137,7 @@ module Homebrew "--disable-silent-rules", "--prefix=\#{prefix}" <% elsif mode == :go %> - system "go", "build", "-o", "\#{bin}/\#{name}" + system "go", "build", *std_go_args <% elsif mode == :meson %> mkdir "build" do system "meson", "--prefix=\#{prefix}", ".." From fe9ce429499075d69fd125123434c4c6540a9750 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2020 18:41:45 +0000 Subject: [PATCH 02/17] build: bump html-proofer from 3.15.0 to 3.15.1 in /docs Bumps [html-proofer](https://github.com/gjtorikian/html-proofer) from 3.15.0 to 3.15.1. - [Release notes](https://github.com/gjtorikian/html-proofer/releases) - [Commits](https://github.com/gjtorikian/html-proofer/compare/v3.15.0...v3.15.1) Signed-off-by: dependabot-preview[bot] --- docs/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 3e9681c85e..598c81746d 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -83,7 +83,7 @@ GEM html-pipeline (2.12.3) activesupport (>= 2) nokogiri (>= 1.4) - html-proofer (3.15.0) + html-proofer (3.15.1) addressable (~> 2.3) mercenary (~> 0.3) nokogumbo (~> 2.0) From 8f5bd9dfda110210e00bf38a5b54236faafc0bfa Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2020 18:10:53 +0000 Subject: [PATCH 03/17] build: bump github-pages from 203 to 204 in /docs Bumps [github-pages](https://github.com/github/pages-gem) from 203 to 204. - [Release notes](https://github.com/github/pages-gem/releases) - [Commits](https://github.com/github/pages-gem/compare/v203...v204) Signed-off-by: dependabot-preview[bot] --- docs/Gemfile.lock | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 598c81746d..14c5a63c0c 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -26,12 +26,12 @@ GEM ffi (>= 1.3.0) eventmachine (1.2.7) execjs (2.7.0) - faraday (0.17.1) + faraday (1.0.0) multipart-post (>= 1.2, < 3) ffi (1.12.1) forwardable-extended (2.6.0) gemoji (3.0.1) - github-pages (203) + github-pages (204) github-pages-health-check (= 1.16.1) jekyll (= 3.8.5) jekyll-avatar (= 0.7.0) @@ -40,7 +40,7 @@ GEM jekyll-default-layout (= 0.1.4) jekyll-feed (= 0.13.0) jekyll-gist (= 1.5.0) - jekyll-github-metadata (= 2.12.1) + jekyll-github-metadata (= 2.13.0) jekyll-mentions (= 1.5.1) jekyll-optional-front-matter (= 0.3.2) jekyll-paginate (= 1.1.0) @@ -125,8 +125,8 @@ GEM jekyll (>= 3.7, < 5.0) jekyll-gist (1.5.0) octokit (~> 4.2) - jekyll-github-metadata (2.12.1) - jekyll (~> 3.4) + jekyll-github-metadata (2.13.0) + jekyll (>= 3.4, < 5.0) octokit (~> 4.0, != 4.4.0) jekyll-mentions (1.5.1) html-pipeline (~> 2.3) @@ -216,7 +216,8 @@ GEM mini_portile2 (~> 2.4.0) nokogumbo (2.0.2) nokogiri (~> 1.8, >= 1.8.4) - octokit (4.14.0) + octokit (4.15.0) + faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) parallel (1.19.1) pathutil (0.16.2) From 3d6663a600032a71cc74e6765ea88ceb028f565c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 25 Jan 2020 19:49:00 +0000 Subject: [PATCH 04/17] build: bump rubyzip from 2.0.0 to 2.1.0 in /docs Bumps [rubyzip](https://github.com/rubyzip/rubyzip) from 2.0.0 to 2.1.0. - [Release notes](https://github.com/rubyzip/rubyzip/releases) - [Changelog](https://github.com/rubyzip/rubyzip/blob/master/Changelog.md) - [Commits](https://github.com/rubyzip/rubyzip/compare/v2.0.0...v2.1.0) Signed-off-by: dependabot-preview[bot] --- docs/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 14c5a63c0c..6975feaf55 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -231,7 +231,7 @@ GEM rouge (3.13.0) ruby-enum (0.7.2) i18n - rubyzip (2.0.0) + rubyzip (2.1.0) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) From a9b22165fd63272356490e934c8d3b317775e008 Mon Sep 17 00:00:00 2001 From: Xiao Di Guan Date: Sun, 26 Jan 2020 14:38:32 +1100 Subject: [PATCH 05/17] doctor: remove DYLD checks --- Library/Homebrew/diagnostic.rb | 22 ------------------- .../Homebrew/test/diagnostic_checks_spec.rb | 20 ----------------- .../Homebrew/test/os/mac/diagnostic_spec.rb | 5 ----- 3 files changed, 47 deletions(-) diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index 7931a86d9e..27176242f8 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -474,28 +474,6 @@ module Homebrew EOS end - def check_ld_vars - ld_vars = ENV.keys.grep(/^(|DY)LD_/) - return if ld_vars.empty? - - values = ld_vars.map { |var| "#{var}: #{ENV.fetch(var)}" } - message = inject_file_list values, <<~EOS - Setting DYLD_* or LD_* variables can break dynamic linking. - Set variables: - EOS - - if ld_vars.include? "DYLD_INSERT_LIBRARIES" - message += <<~EOS - - Setting DYLD_INSERT_LIBRARIES can cause Go builds to fail. - Having this set is common if you use this software: - #{Formatter.url("https://asepsis.binaryage.com/")} - EOS - end - - message - end - def check_for_symlinked_cellar return unless HOMEBREW_CELLAR.exist? return unless HOMEBREW_CELLAR.symlink? diff --git a/Library/Homebrew/test/diagnostic_checks_spec.rb b/Library/Homebrew/test/diagnostic_checks_spec.rb index 95f22b1d2a..5fd14791c4 100644 --- a/Library/Homebrew/test/diagnostic_checks_spec.rb +++ b/Library/Homebrew/test/diagnostic_checks_spec.rb @@ -113,26 +113,6 @@ describe Homebrew::Diagnostic::Checks do HOMEBREW_CELLAR.mkpath end - specify "#check_ld_vars catches LD vars" do - ENV["LD_LIBRARY_PATH"] = "foo" - expect(subject.check_ld_vars).to match("Setting DYLD_\\* or LD_\\* variables") - end - - specify "#check_ld_vars catches DYLD vars" do - ENV["DYLD_LIBRARY_PATH"] = "foo" - expect(subject.check_ld_vars).to match("Setting DYLD_\\* or LD_\\* variables") - end - - specify "#check_ld_vars catches LD and DYLD vars" do - ENV["LD_LIBRARY_PATH"] = "foo" - ENV["DYLD_LIBRARY_PATH"] = "foo" - expect(subject.check_ld_vars).to match("Setting DYLD_\\* or LD_\\* variables") - end - - specify "#check_ld_vars returns success when neither LD nor DYLD vars are set" do - expect(subject.check_ld_vars).to be nil - end - specify "#check_tmpdir" do ENV["TMPDIR"] = "/i/don/t/exis/t" expect(subject.check_tmpdir).to match("doesn't exist") diff --git a/Library/Homebrew/test/os/mac/diagnostic_spec.rb b/Library/Homebrew/test/os/mac/diagnostic_spec.rb index 353a4e7b68..aa44899d50 100644 --- a/Library/Homebrew/test/os/mac/diagnostic_spec.rb +++ b/Library/Homebrew/test/os/mac/diagnostic_spec.rb @@ -28,9 +28,4 @@ describe Homebrew::Diagnostic::Checks do expect(subject.check_ruby_version) .to match "Ruby version 1.8.6 is unsupported on 10.12" end - - specify "#check_dyld_insert" do - ENV["DYLD_INSERT_LIBRARIES"] = "foo" - expect(subject.check_ld_vars).to match("Setting DYLD_INSERT_LIBRARIES") - end end From 22e72e842b1568172c01967afd858628a9d93992 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Sun, 26 Jan 2020 13:55:12 +0100 Subject: [PATCH 06/17] Dockerfile: install 'netbase' apt package --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 442fe01b99..b45db95b1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,7 @@ RUN apt-get update \ libz-dev \ locales \ make \ + netbase \ openssh-client \ patch \ sudo \ From 7f4c7e0afcf1427ec87084573ac6945c449ce363 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Sun, 26 Jan 2020 22:01:02 -0800 Subject: [PATCH 07/17] bottle: Elide root_url only if it is the default Elide root_url only if it is precisely equal to the default root_url. Eliding root_url when a prefix matches the default also elides a custom root_url such as https://linuxbrew.bintray.com/bottles-bio. --- Library/Homebrew/dev-cmd/bottle.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 76d81bfeef..4c99c022a7 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -11,7 +11,7 @@ require "erb" BOTTLE_ERB = <<-EOS bottle do - <% if !root_url.start_with?(HOMEBREW_BOTTLE_DEFAULT_DOMAIN) %> + <% if root_url != "#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles" %> root_url "<%= root_url %>" <% end %> <% if ![HOMEBREW_DEFAULT_PREFIX, LINUXBREW_DEFAULT_PREFIX].include?(prefix) %> From d274cf044a1a8d20bb2243ec550b6791b64f2567 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Mon, 27 Jan 2020 22:20:49 +0000 Subject: [PATCH 08/17] [Linux] docs: `brew bump-formula-pr` now removes the Linux bottle line - This had been a continual source of pain, and was fixed by 359dc96. - Now, `brew bump-formula-pr` should be seamless on Linux, which means less work for maintainers, which means fewer words are needed here. --- docs/Homebrew-linuxbrew-core-Maintainer-Guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Homebrew-linuxbrew-core-Maintainer-Guide.md b/docs/Homebrew-linuxbrew-core-Maintainer-Guide.md index 84b2fd7d66..c9967bc44e 100644 --- a/docs/Homebrew-linuxbrew-core-Maintainer-Guide.md +++ b/docs/Homebrew-linuxbrew-core-Maintainer-Guide.md @@ -393,8 +393,8 @@ If the formula is a Linux-only formula, it either: - will contain the line `# tag "linux"` - won't have macOS bottles -These formulae are fine for users to bump with `brew bump-formula-pr`, -but you should request that they remove the existing `x86_64_linux` +If the user hasn't used `brew bump-formula-pr`, or is submitting +another change, you should request that they remove the `x86_64_linux` bottle SHA line so that CI will build a bottle for the new version correctly. If the bottle SHA isn't removed, CI will fail with the following error: From 733b03ecd0fba4b479d9e5e54af4d904f5b43c52 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Tue, 28 Jan 2020 10:12:24 -0600 Subject: [PATCH 09/17] whitelist asymptote --- Library/Homebrew/missing_formula.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Library/Homebrew/missing_formula.rb b/Library/Homebrew/missing_formula.rb index 32e5a2a560..ba1895ac79 100644 --- a/Library/Homebrew/missing_formula.rb +++ b/Library/Homebrew/missing_formula.rb @@ -28,10 +28,6 @@ module Homebrew Minimal installation: brew cask install basictex EOS - when "asymptote" then <<~EOS - Asymptote is part of MacTeX: - brew cask install mactex - EOS when "pip" then <<~EOS pip is part of the python formula: brew install python From 6bc72cf18a4731a01583cf4bb994b84aed9b9ef7 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 29 Jan 2020 12:17:21 +0000 Subject: [PATCH 10/17] rubocop/lines: add whitelist. Let's only allow cryto or libraries. --- Library/Homebrew/rubocops/lines.rb | 22 +++++++++++++++++++- Library/Homebrew/test/rubocops/lines_spec.rb | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/rubocops/lines.rb b/Library/Homebrew/rubocops/lines.rb index 1a2c32d200..26e36f1397 100644 --- a/Library/Homebrew/rubocops/lines.rb +++ b/Library/Homebrew/rubocops/lines.rb @@ -424,6 +424,25 @@ module RuboCop # Avoid build-time checks in homebrew/core find_every_method_call_by_name(body_node, :system).each do |method| + next if @formula_name.start_with?("lib") + next if %w[ + beecrypt + ccrypt + git + gmp + gnupg + gnupg@1.4 + google-sparsehash + jemalloc + jpeg-turbo + mpfr + open-mpi + openssl@1.1 + pcre + wolfssl + xz + ].include?(@formula_name) + params = parameters(method) next unless node_equals?(params[0], "make") @@ -431,7 +450,8 @@ module RuboCop next unless regex_match_group(arg, /^(checks?|tests?)$/) offending_node(method) - problem "Formulae in homebrew/core should not run build-time checks" + problem "Formulae in homebrew/core (except e.g. cryptography, libraries) " \ + "should not run build-time checks" end end end diff --git a/Library/Homebrew/test/rubocops/lines_spec.rb b/Library/Homebrew/test/rubocops/lines_spec.rb index 9885bbc8fb..d84b10d889 100644 --- a/Library/Homebrew/test/rubocops/lines_spec.rb +++ b/Library/Homebrew/test/rubocops/lines_spec.rb @@ -355,7 +355,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do desc "foo" url 'https://brew.sh/foo-1.0.tgz' system "make", "-j1", "test" - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Formulae in homebrew/core should not run build-time checks + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Formulae in homebrew/core (except e.g. cryptography, libraries) should not run build-time checks end RUBY end From 027cc685348b65b601b45898dbce8ad171579dde Mon Sep 17 00:00:00 2001 From: emreerhan Date: Thu, 30 Jan 2020 15:01:26 -0800 Subject: [PATCH 11/17] Add condition to check if ruby version is < 2.7 --- Library/Homebrew/utils/ruby.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/utils/ruby.sh b/Library/Homebrew/utils/ruby.sh index 822ddd2789..266ec2c877 100644 --- a/Library/Homebrew/utils/ruby.sh +++ b/Library/Homebrew/utils/ruby.sh @@ -6,6 +6,7 @@ setup-ruby-path() { # When bumping check if HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH (in brew.sh) # also needs to be changed. local minimum_ruby_version="2.6.3" + local maximum_ruby_version="2.7.0" vendor_dir="$HOMEBREW_LIBRARY/Homebrew/vendor" vendor_ruby_current_version="$vendor_dir/portable-ruby/current" @@ -45,7 +46,15 @@ setup-ruby-path() { ruby_version_new_enough="$("$HOMEBREW_RUBY_PATH" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -rrubygems -e "puts Gem::Version.new(RUBY_VERSION.to_s.dup) >= Gem::Version.new('$minimum_ruby_version')")" fi - if [[ -z "$HOMEBREW_RUBY_PATH" || -n "$HOMEBREW_FORCE_VENDOR_RUBY" || "$ruby_version_new_enough" != "true" ]] + if [[ -n"$HOMEBREW_MACOS_SYSTEM_RUBY_OLD_ENOUGH" ]] + then + ruby_version_old_enough="true" + elif [[ -n "$HOMEBREW_RUBY_PATH" && -z "$HOMEBREW_FORCE_VENDOR_RUBY" ]] + then + ruby_version_old_enough="$("$HOMEBREW_RUBY_PATH" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -rrubygems -e "puts Gem::Version.new(RUBY_VERSION.to_s.dup) < Gem::Version.new('$maximum_ruby_version')")" + fi + + if [[ -z "$HOMEBREW_RUBY_PATH" || -n "$HOMEBREW_FORCE_VENDOR_RUBY" || "$ruby_version_new_enough" != "true" || "$ruby_version_old_enough" != "true" ]] then brew vendor-install ruby if [[ ! -x "$vendor_ruby_path" ]] From a1102f253c71fb48c3af566b2fe02619c0ed31eb Mon Sep 17 00:00:00 2001 From: emreerhan Date: Thu, 30 Jan 2020 15:48:41 -0800 Subject: [PATCH 12/17] Remove checks to variable that is not set anywhere --- Library/Homebrew/utils/ruby.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Library/Homebrew/utils/ruby.sh b/Library/Homebrew/utils/ruby.sh index 266ec2c877..13d2b73f86 100644 --- a/Library/Homebrew/utils/ruby.sh +++ b/Library/Homebrew/utils/ruby.sh @@ -46,10 +46,7 @@ setup-ruby-path() { ruby_version_new_enough="$("$HOMEBREW_RUBY_PATH" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -rrubygems -e "puts Gem::Version.new(RUBY_VERSION.to_s.dup) >= Gem::Version.new('$minimum_ruby_version')")" fi - if [[ -n"$HOMEBREW_MACOS_SYSTEM_RUBY_OLD_ENOUGH" ]] - then - ruby_version_old_enough="true" - elif [[ -n "$HOMEBREW_RUBY_PATH" && -z "$HOMEBREW_FORCE_VENDOR_RUBY" ]] + if [[ -n "$HOMEBREW_RUBY_PATH" && -z "$HOMEBREW_FORCE_VENDOR_RUBY" ]] then ruby_version_old_enough="$("$HOMEBREW_RUBY_PATH" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -rrubygems -e "puts Gem::Version.new(RUBY_VERSION.to_s.dup) < Gem::Version.new('$maximum_ruby_version')")" fi From b9be9bb71c19500989a2b83f55ecd192f0509a92 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Wed, 15 Jan 2020 12:33:55 +0100 Subject: [PATCH 13/17] formula: add std_go_args --- Library/Homebrew/formula.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 29e613fdd3..80eb373512 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1338,6 +1338,11 @@ class Formula args end + # Standard parameters for Go builds. + def std_go_args + ["-trimpath", "-o", bin/name] + end + # an array of all core {Formula} names # @private def self.core_names From da3b0c5af5abac92d171408ecbdcedc7bcc4ad14 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2020 19:10:57 +0000 Subject: [PATCH 14/17] build: bump parallel_tests from 2.30.1 to 2.31.0 in /Library/Homebrew Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from 2.30.1 to 2.31.0. - [Release notes](https://github.com/grosser/parallel_tests/releases) - [Commits](https://github.com/grosser/parallel_tests/compare/v2.30.1...v2.31.0) Signed-off-by: dependabot-preview[bot] --- Library/Homebrew/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 206d27d8cd..e051a5b9cf 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -49,7 +49,7 @@ GEM mini_portile2 (~> 2.4.0) ntlm-http (0.1.1) parallel (1.19.1) - parallel_tests (2.30.1) + parallel_tests (2.31.0) parallel parser (2.7.0.2) ast (~> 2.4.0) From cad7f98527f13df041314ff35ee5cb9c18ae9ff3 Mon Sep 17 00:00:00 2001 From: Emre Erhan Date: Fri, 31 Jan 2020 15:17:32 -0800 Subject: [PATCH 15/17] Clean up variable names Co-Authored-By: Mike McQuaid --- Library/Homebrew/utils/ruby.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Library/Homebrew/utils/ruby.sh b/Library/Homebrew/utils/ruby.sh index 13d2b73f86..3b4edad632 100644 --- a/Library/Homebrew/utils/ruby.sh +++ b/Library/Homebrew/utils/ruby.sh @@ -5,8 +5,7 @@ setup-ruby-path() { local ruby_version_new_enough # When bumping check if HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH (in brew.sh) # also needs to be changed. - local minimum_ruby_version="2.6.3" - local maximum_ruby_version="2.7.0" + local required_ruby_version="2.6" vendor_dir="$HOMEBREW_LIBRARY/Homebrew/vendor" vendor_ruby_current_version="$vendor_dir/portable-ruby/current" @@ -43,15 +42,10 @@ setup-ruby-path() { ruby_version_new_enough="true" elif [[ -n "$HOMEBREW_RUBY_PATH" && -z "$HOMEBREW_FORCE_VENDOR_RUBY" ]] then - ruby_version_new_enough="$("$HOMEBREW_RUBY_PATH" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -rrubygems -e "puts Gem::Version.new(RUBY_VERSION.to_s.dup) >= Gem::Version.new('$minimum_ruby_version')")" + usable_ruby_version="$("$HOMEBREW_RUBY_PATH" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -rrubygems -e "puts Gem::Version.new(RUBY_VERSION.to_s.dup) >= Gem::Version.new('$required_ruby_version')")" fi - if [[ -n "$HOMEBREW_RUBY_PATH" && -z "$HOMEBREW_FORCE_VENDOR_RUBY" ]] - then - ruby_version_old_enough="$("$HOMEBREW_RUBY_PATH" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -rrubygems -e "puts Gem::Version.new(RUBY_VERSION.to_s.dup) < Gem::Version.new('$maximum_ruby_version')")" - fi - - if [[ -z "$HOMEBREW_RUBY_PATH" || -n "$HOMEBREW_FORCE_VENDOR_RUBY" || "$ruby_version_new_enough" != "true" || "$ruby_version_old_enough" != "true" ]] + if [[ -z "$HOMEBREW_RUBY_PATH" || -n "$HOMEBREW_FORCE_VENDOR_RUBY" || "$usable_ruby_version" != "true" ]] then brew vendor-install ruby if [[ ! -x "$vendor_ruby_path" ]] From 0b09c07862593764c2ab3ca1a05c1f2c593a7210 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 1 Feb 2020 12:49:12 +0100 Subject: [PATCH 16/17] ruby.sh: fix whitespace and tweak required ruby version check. --- Library/Homebrew/utils/ruby.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/utils/ruby.sh b/Library/Homebrew/utils/ruby.sh index 3b4edad632..7ddc5511aa 100644 --- a/Library/Homebrew/utils/ruby.sh +++ b/Library/Homebrew/utils/ruby.sh @@ -5,7 +5,7 @@ setup-ruby-path() { local ruby_version_new_enough # When bumping check if HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH (in brew.sh) # also needs to be changed. - local required_ruby_version="2.6" + local required_ruby_version="2.6" vendor_dir="$HOMEBREW_LIBRARY/Homebrew/vendor" vendor_ruby_current_version="$vendor_dir/portable-ruby/current" @@ -42,7 +42,7 @@ setup-ruby-path() { ruby_version_new_enough="true" elif [[ -n "$HOMEBREW_RUBY_PATH" && -z "$HOMEBREW_FORCE_VENDOR_RUBY" ]] then - usable_ruby_version="$("$HOMEBREW_RUBY_PATH" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -rrubygems -e "puts Gem::Version.new(RUBY_VERSION.to_s.dup) >= Gem::Version.new('$required_ruby_version')")" + usable_ruby_version="$("$HOMEBREW_RUBY_PATH" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -rrubygems -e "puts Gem::Version.new(RUBY_VERSION.to_s.dup).canonical_segments.first(2) == Gem::Version.new('$required_ruby_version').canonical_segments.first(2)")" fi if [[ -z "$HOMEBREW_RUBY_PATH" || -n "$HOMEBREW_FORCE_VENDOR_RUBY" || "$usable_ruby_version" != "true" ]] From f96342713b2cf270bfa6038b74a18978f6da4648 Mon Sep 17 00:00:00 2001 From: Michka Popoff Date: Sat, 1 Feb 2020 13:17:14 +0100 Subject: [PATCH 17/17] rubocop: remove BINARY_URLS_WHITELIST and rust nightly This url is not used anymore, we replaced it with a new stable version of rust. --- Library/Homebrew/rubocops/urls.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Library/Homebrew/rubocops/urls.rb b/Library/Homebrew/rubocops/urls.rb index 7d3392415f..584d014cdd 100644 --- a/Library/Homebrew/rubocops/urls.rb +++ b/Library/Homebrew/rubocops/urls.rb @@ -24,12 +24,6 @@ module RuboCop rust ].freeze - # specific rust-nightly temporarily acceptable until a newer version is released. - # DO NOT RE-ADD A NEWER RUST-NIGHTLY IN FUTURE. - BINARY_URLS_WHITELIST = %w[ - https://static.rust-lang.org/dist/2019-08-24/rust-nightly-x86_64-apple-darwin.tar.xz - ].freeze - def audit_formula(_node, _class_node, _parent_class_node, body_node) urls = find_every_func_call_by_name(body_node, :url) mirrors = find_every_func_call_by_name(body_node, :mirror) @@ -232,7 +226,6 @@ module RuboCop audit_urls(urls, /(darwin|macos|osx)/i) do |_, url| next if url !~ /x86_64/i && url !~ /amd64/i next if BINARY_FORMULA_URLS_WHITELIST.include?(@formula_name) - next if BINARY_URLS_WHITELIST.include?(url) problem "#{url} looks like a binary package, not a source archive; " \ "homebrew/core is source-only."