diff --git a/Library/Homebrew/livecheck/strategy/gnu.rb b/Library/Homebrew/livecheck/strategy/gnu.rb index fd335915ae..d78a90971c 100644 --- a/Library/Homebrew/livecheck/strategy/gnu.rb +++ b/Library/Homebrew/livecheck/strategy/gnu.rb @@ -66,7 +66,7 @@ module Homebrew return values if match.blank? # The directory listing page for the project's files - values[:url] = "https://ftp.gnu.org/gnu/#{match[:project_name]}/" + values[:url] = "https://ftpmirror.gnu.org/gnu/#{match[:project_name]}/" regex_name = Regexp.escape(T.must(match[:project_name])).gsub("\\-", "-") diff --git a/Library/Homebrew/test/livecheck/strategy/gnu_spec.rb b/Library/Homebrew/test/livecheck/strategy/gnu_spec.rb index 32c8037041..81c51f3d52 100644 --- a/Library/Homebrew/test/livecheck/strategy/gnu_spec.rb +++ b/Library/Homebrew/test/livecheck/strategy/gnu_spec.rb @@ -7,7 +7,7 @@ RSpec.describe Homebrew::Livecheck::Strategy::Gnu do let(:gnu_urls) do { - no_version_dir: "https://ftp.gnu.org/gnu/abc/abc-1.2.3.tar.gz", + no_version_dir: "https://ftpmirror.gnu.org/gnu/abc/abc-1.2.3.tar.gz", software_page: "https://www.gnu.org/software/abc/", subdomain: "https://abc.gnu.org", savannah: "https://download.savannah.gnu.org/releases/abc/abc-1.2.3.tar.gz", @@ -18,15 +18,15 @@ RSpec.describe Homebrew::Livecheck::Strategy::Gnu do let(:generated) do { no_version_dir: { - url: "https://ftp.gnu.org/gnu/abc/", + url: "https://ftpmirror.gnu.org/gnu/abc/", regex: %r{href=.*?abc[._-]v?(\d+(?:\.\d+)*)(?:\.[a-z]+|/)}i, }, software_page: { - url: "https://ftp.gnu.org/gnu/abc/", + url: "https://ftpmirror.gnu.org/gnu/abc/", regex: %r{href=.*?abc[._-]v?(\d+(?:\.\d+)*)(?:\.[a-z]+|/)}i, }, subdomain: { - url: "https://ftp.gnu.org/gnu/abc/", + url: "https://ftpmirror.gnu.org/gnu/abc/", regex: %r{href=.*?abc[._-]v?(\d+(?:\.\d+)*)(?:\.[a-z]+|/)}i, }, savannah: {},