mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
update: migrate everyone from linuxbrew-core to homebrew-core
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
9b5f191db1
commit
1cc7ca33c0
5
.github/ISSUE_TEMPLATE/config.yml
vendored
5
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -6,13 +6,10 @@ contact_links:
|
||||
about: Have a question? Not sure if your issue affects everyone reproducibly? The quickest way to get help is on Homebrew's GitHub Discussions!
|
||||
- name: New issue on Homebrew/homebrew-core
|
||||
url: https://github.com/Homebrew/homebrew-core/issues/new/choose
|
||||
about: On macOS/Mac OS X? Having a `brew` problem with a `brew install` or `brew upgrade` of a single formula/package? Report it to Homebrew/homebrew-core (the macOS core tap/repository).
|
||||
about: Having a `brew` problem with a `brew install` or `brew upgrade` of a single formula/package? Report it to Homebrew/homebrew-core (the core tap/repository).
|
||||
- name: New issue on Homebrew/homebrew-cask
|
||||
url: https://github.com/Homebrew/homebrew-cask/issues/new/choose
|
||||
about: Having a `brew --cask` problem? Report it to Homebrew/homebrew-cask (the cask tap/repository).
|
||||
- name: New issue on Homebrew/linuxbrew-core
|
||||
url: https://github.com/Homebrew/linuxbrew-core/issues/new/choose
|
||||
about: On Linux? Having a `brew` problem with a `brew install` or `brew upgrade` of a single formula/package? Report it to Homebrew/linuxbrew-core (the Linux core tap/repository).
|
||||
- name: Get help from Homebrew mirror maintainers
|
||||
url: https://github.com/Homebrew/discussions/discussions/1917
|
||||
about: Slow download speed? Homebrew mirror not working as expected? Please take a look at the mirror list and contact respective mirror maintainers.
|
||||
|
6
.github/workflows/tests.yml
vendored
6
.github/workflows/tests.yml
vendored
@ -84,7 +84,7 @@ jobs:
|
||||
- name: Run brew readall on all taps
|
||||
run: brew readall --aliases
|
||||
|
||||
- name: Run brew style on linuxbrew-core
|
||||
- name: Run brew style on homebrew-core for Linux
|
||||
run: brew style --display-cop-names homebrew/core
|
||||
|
||||
- name: Run brew audit --skip-style on all taps
|
||||
@ -116,12 +116,12 @@ jobs:
|
||||
# brew style doesn't like world writable directories
|
||||
sudo chmod -R g-w,o-w "${HOMEBREW_REPOSITORY}/Library/Taps"
|
||||
|
||||
- name: Run brew style on homebrew-core
|
||||
- name: Run brew style on homebrew-core for macOS
|
||||
run: brew style --display-cop-names homebrew/core
|
||||
env:
|
||||
HOMEBREW_SIMULATE_MACOS_ON_LINUX: 1
|
||||
|
||||
- name: Run brew audit --skip-style on homebrew-core
|
||||
- name: Run brew audit --skip-style on homebrew-core for macOS
|
||||
run: brew audit --skip-style --except=version --tap=homebrew/core
|
||||
env:
|
||||
HOMEBREW_SIMULATE_MACOS_ON_LINUX: 1
|
||||
|
@ -24,5 +24,3 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require "extend/os/api/analytics"
|
||||
|
@ -91,5 +91,3 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require "extend/os/api/bottle"
|
||||
|
@ -24,5 +24,3 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require "extend/os/api/formula"
|
||||
|
@ -15,11 +15,6 @@ module Homebrew
|
||||
Homebrew::API.fetch "versions-formulae.json"
|
||||
end
|
||||
|
||||
def linux
|
||||
# The result is cached by Homebrew::API.fetch
|
||||
Homebrew::API.fetch "versions-linux.json"
|
||||
end
|
||||
|
||||
def casks
|
||||
# The result is cached by Homebrew::API.fetch
|
||||
Homebrew::API.fetch "versions-casks.json"
|
||||
@ -27,14 +22,7 @@ module Homebrew
|
||||
|
||||
sig { params(name: String).returns(T.nilable(PkgVersion)) }
|
||||
def latest_formula_version(name)
|
||||
versions = if OS.mac? ||
|
||||
Homebrew::EnvConfig.force_homebrew_on_linux? ||
|
||||
Homebrew::EnvConfig.force_homebrew_core_repo_on_linux?
|
||||
formulae
|
||||
else
|
||||
linux
|
||||
end
|
||||
|
||||
versions = formulae
|
||||
return unless versions.key? name
|
||||
|
||||
version = Version.new(versions[name]["version"])
|
||||
|
@ -402,12 +402,6 @@ case "$*" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
if [[ -n "${HOMEBREW_SIMULATE_MACOS_ON_LINUX}" ]]
|
||||
then
|
||||
export HOMEBREW_FORCE_HOMEBREW_ON_LINUX="1"
|
||||
fi
|
||||
|
||||
if [[ -n "${HOMEBREW_MACOS}" ]]
|
||||
then
|
||||
HOMEBREW_PRODUCT="Homebrew"
|
||||
@ -544,27 +538,11 @@ Your Git executable: $(unset git && type -p ${HOMEBREW_GIT})"
|
||||
unset HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH
|
||||
|
||||
HOMEBREW_CORE_REPOSITORY_ORIGIN="$("${HOMEBREW_GIT}" -C "${HOMEBREW_CORE_REPOSITORY}" remote get-url origin 2>/dev/null)"
|
||||
if [[ "${HOMEBREW_CORE_REPOSITORY_ORIGIN}" == "https://github.com/Homebrew/homebrew-core" ]]
|
||||
if [[ "${HOMEBREW_CORE_REPOSITORY_ORIGIN}" =~ /linuxbrew-core(\.git)?$ ]]
|
||||
then
|
||||
# TODO: this variable can go away when we're migrating everyone to homebrew-core.
|
||||
HOMEBREW_CORE_ON_LINUX=1
|
||||
# Migrate from linuxbrew-core to homebrew-core:
|
||||
# - if either HOMEBREW_FORCE_HOMEBREW_ON_LINUX or HOMEBREW_FORCE_HOMEBREW_CORE_REPO_ON_LINUX are set
|
||||
# - unless HOMEBREW_LINUXCORE_MERGE is set (by maintainers who still merge homebrew-core into linuxbrew-core)
|
||||
# - only HOMEBREW_DEVELOPER users (for now)
|
||||
# - not on GitHub Actions (for now)
|
||||
elif [[ -n "${HOMEBREW_FORCE_HOMEBREW_ON_LINUX}" ||
|
||||
-n "${HOMEBREW_FORCE_HOMEBREW_CORE_REPO_ON_LINUX}" ]] ||
|
||||
[[ -n "${HOMEBREW_DEVELOPER}" ]] &&
|
||||
[[ -z "${HOMEBREW_LINUXCORE_MERGE}" ]] &&
|
||||
[[ -z "${GITHUB_ACTIONS}" ]]
|
||||
then
|
||||
# TODO: this variable can go away when we're migrating everyone to homebrew-core.
|
||||
HOMEBREW_CORE_ON_LINUX=1
|
||||
|
||||
# triggers migration code in update.sh
|
||||
# shellcheck disable=SC2034
|
||||
HOMEBREW_LINUXBREW_MIGRATION=1
|
||||
HOMEBREW_LINUXBREW_CORE_MIGRATION=1
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -595,13 +573,7 @@ then
|
||||
unset HOMEBREW_BOTTLE_DOMAIN
|
||||
fi
|
||||
|
||||
if [[ -n "${HOMEBREW_MACOS}" ]] ||
|
||||
[[ -n "${HOMEBREW_CORE_ON_LINUX}" ]]
|
||||
then
|
||||
HOMEBREW_BOTTLE_DEFAULT_DOMAIN="https://ghcr.io/v2/homebrew/core"
|
||||
else
|
||||
HOMEBREW_BOTTLE_DEFAULT_DOMAIN="https://ghcr.io/v2/linuxbrew/core"
|
||||
fi
|
||||
HOMEBREW_BOTTLE_DEFAULT_DOMAIN="https://ghcr.io/v2/homebrew/core"
|
||||
|
||||
HOMEBREW_USER_AGENT="${HOMEBREW_PRODUCT}/${HOMEBREW_USER_AGENT_VERSION} (${HOMEBREW_SYSTEM}; ${HOMEBREW_PROCESSOR} ${HOMEBREW_OS_USER_AGENT_VERSION})"
|
||||
curl_version_output="$(curl --version 2>/dev/null)"
|
||||
@ -736,15 +708,7 @@ then
|
||||
fi
|
||||
export HOMEBREW_BREW_GIT_REMOTE
|
||||
|
||||
if [[ -n "${HOMEBREW_MACOS}" ]] ||
|
||||
[[ -n "${HOMEBREW_CORE_ON_LINUX}" ]]
|
||||
then
|
||||
HOMEBREW_CORE_DEFAULT_GIT_REMOTE="https://github.com/Homebrew/homebrew-core"
|
||||
else
|
||||
HOMEBREW_CORE_DEFAULT_GIT_REMOTE="https://github.com/Homebrew/linuxbrew-core"
|
||||
fi
|
||||
export HOMEBREW_CORE_DEFAULT_GIT_REMOTE
|
||||
|
||||
HOMEBREW_CORE_DEFAULT_GIT_REMOTE="https://github.com/Homebrew/homebrew-core"
|
||||
if [[ -z "${HOMEBREW_CORE_GIT_REMOTE}" ]]
|
||||
then
|
||||
HOMEBREW_CORE_GIT_REMOTE="${HOMEBREW_CORE_DEFAULT_GIT_REMOTE}"
|
||||
|
@ -42,6 +42,17 @@ module Homebrew
|
||||
def update_report
|
||||
args = update_report_args.parse
|
||||
|
||||
# Run `brew update` (again) if we've got a linuxbrew-core CoreTap
|
||||
if CoreTap.instance.linuxbrew_core? && ENV["HOMEBREW_LINUXBREW_CORE_MIGRATION"].blank?
|
||||
ENV["HOMEBREW_LINUXBREW_CORE_MIGRATION"] = "1"
|
||||
update_args = []
|
||||
update_args << "--preinstall" if args.preinstall?
|
||||
update_args << "--force" if args.force?
|
||||
ohai_stdout_or_stderr "Re-running `brew update` for linuxbrew-core migration"
|
||||
FileUtils.rm_f HOMEBREW_LOCKS/"update"
|
||||
exec HOMEBREW_BREW_FILE, "update", *update_args
|
||||
end
|
||||
|
||||
if !Utils::Analytics.messages_displayed? &&
|
||||
!Utils::Analytics.disabled? &&
|
||||
!Utils::Analytics.no_message_output?
|
||||
@ -107,7 +118,7 @@ module Homebrew
|
||||
|
||||
if ENV["HOMEBREW_MIGRATE_LINUXBREW_FORMULAE"].present? && tap.core_tap? &&
|
||||
Settings.read("linuxbrewmigrated") != "true"
|
||||
puts_stdout_or_stderr "Migrating formulae from linuxbrew-core to homebrew-core" unless args.quiet?
|
||||
ohai_stdout_or_stderr "Migrating formulae from linuxbrew-core to homebrew-core"
|
||||
|
||||
LINUXBREW_CORE_MIGRATION_LIST.each do |name|
|
||||
begin
|
||||
@ -185,7 +196,7 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
puts_stdout_or_stderr if args.preinstall?
|
||||
elsif !args.preinstall? && !ENV["HOMEBREW_UPDATE_FAILED"]
|
||||
elsif !args.preinstall? && !ENV["HOMEBREW_UPDATE_FAILED"] && !ENV["HOMEBREW_MIGRATE_LINUXBREW_FORMULAE"]
|
||||
puts_stdout_or_stderr "Already up-to-date." unless args.quiet?
|
||||
end
|
||||
|
||||
|
@ -270,12 +270,12 @@ EOS
|
||||
# ensure we don't munge line endings on checkout
|
||||
git config core.autocrlf false
|
||||
|
||||
if [[ "${DIR}" == "${HOMEBREW_CORE_REPOSITORY}" && -n "${HOMEBREW_LINUXBREW_MIGRATION}" ]]
|
||||
if [[ "${DIR}" == "${HOMEBREW_CORE_REPOSITORY}" && -n "${HOMEBREW_LINUXBREW_CORE_MIGRATION}" ]]
|
||||
then
|
||||
# Don't even try to rebase/merge on linuxbrew-core migration but rely on
|
||||
# stashing etc. above.
|
||||
git reset --hard "${QUIET_ARGS[@]}" "${REMOTE_REF}"
|
||||
unset HOMEBREW_LINUXBREW_MIGRATION
|
||||
unset HOMEBREW_LINUXBREW_CORE_MIGRATION
|
||||
elif [[ -z "${HOMEBREW_MERGE}" ]]
|
||||
then
|
||||
# Work around bug where git rebase --quiet is not quiet
|
||||
@ -502,9 +502,9 @@ EOS
|
||||
|
||||
if [[ -d "${HOMEBREW_CORE_REPOSITORY}" ]] &&
|
||||
[[ "${HOMEBREW_CORE_DEFAULT_GIT_REMOTE}" != "${HOMEBREW_CORE_GIT_REMOTE}" ||
|
||||
-n "${HOMEBREW_LINUXBREW_MIGRATION}" ]]
|
||||
-n "${HOMEBREW_LINUXBREW_CORE_MIGRATION}" ]]
|
||||
then
|
||||
if [[ -n "${HOMEBREW_LINUXBREW_MIGRATION}" ]]
|
||||
if [[ -n "${HOMEBREW_LINUXBREW_CORE_MIGRATION}" ]]
|
||||
then
|
||||
# This means a migration is needed (in case it isn't run this time)
|
||||
safe_cd "${HOMEBREW_REPOSITORY}"
|
||||
|
@ -86,43 +86,6 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
def use_correct_linux_tap(formula, args:)
|
||||
default_origin_branch = formula.tap.path.git_origin_branch
|
||||
|
||||
if !OS.linux? || !formula.tap.core_tap? || Homebrew::EnvConfig.force_homebrew_on_linux?
|
||||
return formula.tap.remote_repo, "origin", default_origin_branch, "-"
|
||||
end
|
||||
|
||||
tap_remote_repo = formula.tap.full_name.gsub("linuxbrew", "homebrew")
|
||||
homebrew_core_url = "https://github.com/#{tap_remote_repo}"
|
||||
homebrew_core_remote = "homebrew"
|
||||
previous_branch = formula.tap.path.git_branch || "master"
|
||||
formula_path = formula.path.relative_path_from(formula.tap.path)
|
||||
full_origin_branch = "#{homebrew_core_remote}/#{default_origin_branch}"
|
||||
|
||||
if args.dry_run? || args.write? || args.write_only?
|
||||
ohai "git remote add #{homebrew_core_remote} #{homebrew_core_url}"
|
||||
ohai "git fetch #{homebrew_core_remote} HEAD #{default_origin_branch}"
|
||||
ohai "git cat-file -e #{full_origin_branch}:#{formula_path}"
|
||||
ohai "git checkout #{full_origin_branch}"
|
||||
return tap_remote_repo, homebrew_core_remote, default_origin_branch, previous_branch
|
||||
end
|
||||
|
||||
formula.tap.path.cd do
|
||||
unless Utils.popen_read("git", "remote", "-v").match?(%r{^homebrew.*Homebrew/homebrew-core.*$})
|
||||
ohai "Adding #{homebrew_core_remote} remote"
|
||||
safe_system "git", "remote", "add", homebrew_core_remote, homebrew_core_url
|
||||
end
|
||||
ohai "Fetching remote #{homebrew_core_remote}"
|
||||
safe_system "git", "fetch", homebrew_core_remote, "HEAD", default_origin_branch
|
||||
if quiet_system "git", "cat-file", "-e", "#{full_origin_branch}:#{formula_path}"
|
||||
ohai "#{formula.full_name} exists in #{full_origin_branch}."
|
||||
safe_system "git", "checkout", full_origin_branch
|
||||
return tap_remote_repo, homebrew_core_remote, default_origin_branch, previous_branch
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def bump_formula_pr
|
||||
args = bump_formula_pr_args.parse
|
||||
|
||||
@ -157,7 +120,11 @@ module Homebrew
|
||||
# spamming during normal output.
|
||||
Homebrew.install_bundler_gems!
|
||||
|
||||
tap_remote_repo, remote, remote_branch, previous_branch = use_correct_linux_tap(formula, args: args)
|
||||
tap_remote_repo = formula.tap.remote_repo
|
||||
remote = "origin"
|
||||
remote_branch = formula.tap.path.git_origin_branch
|
||||
previous_branch = "-"
|
||||
|
||||
check_open_pull_requests(formula, tap_remote_repo, args: args)
|
||||
|
||||
new_version = args.version
|
||||
@ -302,16 +269,6 @@ module Homebrew
|
||||
]
|
||||
end
|
||||
|
||||
# When bumping a linux-only formula, one needs to also delete the
|
||||
# sha256 linux bottle line if it exists. That's because of running
|
||||
# test-bot with --keep-old option in linuxbrew-core.
|
||||
if old_contents.include?("depends_on :linux") && old_contents.include?("=> :x86_64_linux")
|
||||
replacement_pairs << [
|
||||
/^ sha256 ".+" => :x86_64_linux\n/m,
|
||||
"\\2",
|
||||
]
|
||||
end
|
||||
|
||||
if forced_version && new_version != "0"
|
||||
replacement_pairs << if old_contents.include?("version \"#{old_formula_version}\"")
|
||||
[
|
||||
|
@ -11,38 +11,38 @@ module Homebrew
|
||||
module_function
|
||||
|
||||
ENVS = {
|
||||
HOMEBREW_ADDITIONAL_GOOGLE_ANALYTICS_ID: {
|
||||
HOMEBREW_ADDITIONAL_GOOGLE_ANALYTICS_ID: {
|
||||
description: "Additional Google Analytics tracking ID to emit user behaviour analytics to. " \
|
||||
"For more information, see: <https://docs.brew.sh/Analytics>",
|
||||
},
|
||||
HOMEBREW_ARCH: {
|
||||
HOMEBREW_ARCH: {
|
||||
description: "Linux only: Pass this value to a type name representing the compiler's `-march` option.",
|
||||
default: "native",
|
||||
},
|
||||
HOMEBREW_ARTIFACT_DOMAIN: {
|
||||
HOMEBREW_ARTIFACT_DOMAIN: {
|
||||
description: "Prefix all download URLs, including those for bottles, with this value. " \
|
||||
"For example, `HOMEBREW_ARTIFACT_DOMAIN=http://localhost:8080` will cause a " \
|
||||
"formula with the URL `https://example.com/foo.tar.gz` to instead download from " \
|
||||
"`http://localhost:8080/example.com/foo.tar.gz`.",
|
||||
},
|
||||
HOMEBREW_AUTO_UPDATE_SECS: {
|
||||
HOMEBREW_AUTO_UPDATE_SECS: {
|
||||
description: "Automatically check for updates once per this seconds interval.",
|
||||
default: 300,
|
||||
},
|
||||
HOMEBREW_BAT: {
|
||||
HOMEBREW_BAT: {
|
||||
description: "If set, use `bat` for the `brew cat` command.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_BAT_CONFIG_PATH: {
|
||||
HOMEBREW_BAT_CONFIG_PATH: {
|
||||
description: "Use this as the `bat` configuration file.",
|
||||
default_text: "`$HOME/.config/bat/config`.",
|
||||
},
|
||||
HOMEBREW_BOOTSNAP: {
|
||||
HOMEBREW_BOOTSNAP: {
|
||||
description: "If set, use Bootsnap to speed up repeated `brew` calls. "\
|
||||
"A no-op when using Homebrew's vendored, relocatable Ruby on macOS (as it doesn't work).",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_BOTTLE_DOMAIN: {
|
||||
HOMEBREW_BOTTLE_DOMAIN: {
|
||||
description: "Use this URL as the download mirror for bottles. " \
|
||||
"If bottles at that URL are temporarily unavailable, " \
|
||||
"the default bottle domain will be used as a fallback mirror. " \
|
||||
@ -50,83 +50,81 @@ module Homebrew
|
||||
"download from the prefix `http://localhost:8080/`. " \
|
||||
"If bottles are not available at `HOMEBREW_BOTTLE_DOMAIN` " \
|
||||
"they will be downloaded from the default bottle domain.",
|
||||
default_text: "macOS: `https://ghcr.io/v2/homebrew/core`, " \
|
||||
"Linux: `https://ghcr.io/v2/linuxbrew/core`.",
|
||||
default_text: "`https://ghcr.io/v2/homebrew/core`.",
|
||||
default: HOMEBREW_BOTTLE_DEFAULT_DOMAIN,
|
||||
},
|
||||
HOMEBREW_BREW_GIT_REMOTE: {
|
||||
HOMEBREW_BREW_GIT_REMOTE: {
|
||||
description: "Use this URL as the Homebrew/brew `git`(1) remote.",
|
||||
default: HOMEBREW_BREW_DEFAULT_GIT_REMOTE,
|
||||
},
|
||||
HOMEBREW_BROWSER: {
|
||||
HOMEBREW_BROWSER: {
|
||||
description: "Use this as the browser when opening project homepages.",
|
||||
default_text: "`$BROWSER` or the OS's default browser.",
|
||||
},
|
||||
HOMEBREW_CACHE: {
|
||||
HOMEBREW_CACHE: {
|
||||
description: "Use this directory as the download cache.",
|
||||
default_text: "macOS: `$HOME/Library/Caches/Homebrew`, " \
|
||||
"Linux: `$XDG_CACHE_HOME/Homebrew` or `$HOME/.cache/Homebrew`.",
|
||||
default: HOMEBREW_DEFAULT_CACHE,
|
||||
},
|
||||
HOMEBREW_CASK_OPTS: {
|
||||
HOMEBREW_CASK_OPTS: {
|
||||
description: "Append these options to all `cask` commands. All `--*dir` options, " \
|
||||
"`--language`, `--require-sha`, `--no-quarantine` and `--no-binaries` are supported. " \
|
||||
"For example, you might add something like the following to your " \
|
||||
"`~/.profile`, `~/.bash_profile`, or `~/.zshenv`:\n\n" \
|
||||
' `export HOMEBREW_CASK_OPTS="--appdir=~/Applications --fontdir=/Library/Fonts"`',
|
||||
},
|
||||
HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: {
|
||||
HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: {
|
||||
description: "If set, `brew install`, `brew upgrade` and `brew reinstall` will cleanup all formulae " \
|
||||
"when this number of days has passed.",
|
||||
default: 30,
|
||||
},
|
||||
HOMEBREW_CLEANUP_MAX_AGE_DAYS: {
|
||||
HOMEBREW_CLEANUP_MAX_AGE_DAYS: {
|
||||
description: "Cleanup all cached files older than this many days.",
|
||||
default: 120,
|
||||
},
|
||||
HOMEBREW_COLOR: {
|
||||
HOMEBREW_COLOR: {
|
||||
description: "If set, force colour output on non-TTY outputs.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_CORE_GIT_REMOTE: {
|
||||
HOMEBREW_CORE_GIT_REMOTE: {
|
||||
description: "Use this URL as the Homebrew/homebrew-core `git`(1) remote.",
|
||||
default_text: "macOS: `https://github.com/Homebrew/homebrew-core`, " \
|
||||
"Linux: `https://github.com/Homebrew/linuxbrew-core`.",
|
||||
default_text: "`https://github.com/Homebrew/homebrew-core`.",
|
||||
default: HOMEBREW_CORE_DEFAULT_GIT_REMOTE,
|
||||
},
|
||||
HOMEBREW_CURLRC: {
|
||||
HOMEBREW_CURLRC: {
|
||||
description: "If set, do not pass `--disable` when invoking `curl`(1), which disables the " \
|
||||
"use of `curlrc`.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_CURL_RETRIES: {
|
||||
HOMEBREW_CURL_RETRIES: {
|
||||
description: "Pass the given retry count to `--retry` when invoking `curl`(1).",
|
||||
default: 3,
|
||||
},
|
||||
HOMEBREW_CURL_VERBOSE: {
|
||||
HOMEBREW_CURL_VERBOSE: {
|
||||
description: "If set, pass `--verbose` when invoking `curl`(1).",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_DEVELOPER: {
|
||||
HOMEBREW_DEVELOPER: {
|
||||
description: "If set, tweak behaviour to be more relevant for Homebrew developers (active or " \
|
||||
"budding) by e.g. turning warnings into errors.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_DISABLE_LOAD_FORMULA: {
|
||||
HOMEBREW_DISABLE_LOAD_FORMULA: {
|
||||
description: "If set, refuse to load formulae. This is useful when formulae are not trusted (such " \
|
||||
"as in pull requests).",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_DISPLAY: {
|
||||
HOMEBREW_DISPLAY: {
|
||||
description: "Use this X11 display when opening a page in a browser, for example with " \
|
||||
"`brew home`. Primarily useful on Linux.",
|
||||
default_text: "`$DISPLAY`.",
|
||||
},
|
||||
HOMEBREW_DISPLAY_INSTALL_TIMES: {
|
||||
HOMEBREW_DISPLAY_INSTALL_TIMES: {
|
||||
description: "If set, print install times for each formula at the end of the run.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_EDITOR: {
|
||||
HOMEBREW_EDITOR: {
|
||||
description: "Use this editor when editing a single formula, or several formulae in the " \
|
||||
"same directory." \
|
||||
"\n\n *Note:* `brew edit` will open all of Homebrew as discontinuous files " \
|
||||
@ -134,40 +132,35 @@ module Homebrew
|
||||
"editors will do strange things in this case.",
|
||||
default_text: "`$EDITOR` or `$VISUAL`.",
|
||||
},
|
||||
HOMEBREW_FAIL_LOG_LINES: {
|
||||
HOMEBREW_FAIL_LOG_LINES: {
|
||||
description: "Output this many lines of output on formula `system` failures.",
|
||||
default: 15,
|
||||
},
|
||||
HOMEBREW_FORBIDDEN_LICENSES: {
|
||||
HOMEBREW_FORBIDDEN_LICENSES: {
|
||||
description: "A space-separated list of licenses. Homebrew will refuse to install a " \
|
||||
"formula if it or any of its dependencies has a license on this list.",
|
||||
},
|
||||
HOMEBREW_FORCE_BREWED_CA_CERTIFICATES: {
|
||||
HOMEBREW_FORCE_BREWED_CA_CERTIFICATES: {
|
||||
description: "If set, always use a Homebrew-installed `ca-certificates` rather than the system version. " \
|
||||
"Automatically set if the system version is too old.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_FORCE_BREWED_CURL: {
|
||||
HOMEBREW_FORCE_BREWED_CURL: {
|
||||
description: "If set, always use a Homebrew-installed `curl`(1) rather than the system version. " \
|
||||
"Automatically set if the system version of `curl` is too old.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_FORCE_BREWED_GIT: {
|
||||
HOMEBREW_FORCE_BREWED_GIT: {
|
||||
description: "If set, always use a Homebrew-installed `git`(1) rather than the system version. " \
|
||||
"Automatically set if the system version of `git` is too old.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_FORCE_HOMEBREW_ON_LINUX: {
|
||||
description: "If set, running Homebrew on Linux will use URLs for macOS and will use homebrew-core instead " \
|
||||
"of linuxbrew-core. This is useful when merging pull requests for macOS while on Linux.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_FORCE_VENDOR_RUBY: {
|
||||
HOMEBREW_FORCE_VENDOR_RUBY: {
|
||||
description: "If set, always use Homebrew's vendored, relocatable Ruby version even if the system version " \
|
||||
"of Ruby is new enough.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_GITHUB_API_TOKEN: {
|
||||
HOMEBREW_GITHUB_API_TOKEN: {
|
||||
description: "Use this personal access token for the GitHub API, for features such as " \
|
||||
"`brew search`. You can create one at <https://github.com/settings/tokens>. If set, " \
|
||||
"GitHub will allow you a greater number of API requests. For more information, see: " \
|
||||
@ -175,39 +168,39 @@ module Homebrew
|
||||
"\n\n *Note:* Homebrew doesn't require permissions for any of the scopes, but some " \
|
||||
"developer commands may require additional permissions.",
|
||||
},
|
||||
HOMEBREW_GITHUB_PACKAGES_TOKEN: {
|
||||
HOMEBREW_GITHUB_PACKAGES_TOKEN: {
|
||||
description: "Use this GitHub personal access token when accessing the GitHub Packages Registry "\
|
||||
"(where bottles may be stored).",
|
||||
},
|
||||
HOMEBREW_DOCKER_REGISTRY_TOKEN: {
|
||||
HOMEBREW_DOCKER_REGISTRY_TOKEN: {
|
||||
description: "Use this bearer token for authenticating with a Docker registry proxying GitHub Packages.",
|
||||
},
|
||||
HOMEBREW_GITHUB_PACKAGES_USER: {
|
||||
HOMEBREW_GITHUB_PACKAGES_USER: {
|
||||
description: "Use this username when accessing the GitHub Packages Registry (where bottles may be stored).",
|
||||
},
|
||||
HOMEBREW_GIT_EMAIL: {
|
||||
HOMEBREW_GIT_EMAIL: {
|
||||
description: "Set the Git author and committer email to this value.",
|
||||
},
|
||||
HOMEBREW_GIT_NAME: {
|
||||
HOMEBREW_GIT_NAME: {
|
||||
description: "Set the Git author and committer name to this value.",
|
||||
},
|
||||
HOMEBREW_INSTALL_BADGE: {
|
||||
HOMEBREW_INSTALL_BADGE: {
|
||||
description: "Print this text before the installation summary of each successful build.",
|
||||
default_text: 'The "Beer Mug" emoji.',
|
||||
default: "🍺",
|
||||
},
|
||||
HOMEBREW_LIVECHECK_WATCHLIST: {
|
||||
HOMEBREW_LIVECHECK_WATCHLIST: {
|
||||
description: "Consult this file for the list of formulae to check by default when no formula argument " \
|
||||
"is passed to `brew livecheck`.",
|
||||
default: "$HOME/.brew_livecheck_watchlist",
|
||||
},
|
||||
HOMEBREW_LOGS: {
|
||||
HOMEBREW_LOGS: {
|
||||
description: "Use this directory to store log files.",
|
||||
default_text: "macOS: `$HOME/Library/Logs/Homebrew`, " \
|
||||
"Linux: `$XDG_CACHE_HOME/Homebrew/Logs` or `$HOME/.cache/Homebrew/Logs`.",
|
||||
default: HOMEBREW_DEFAULT_LOGS,
|
||||
},
|
||||
HOMEBREW_MAKE_JOBS: {
|
||||
HOMEBREW_MAKE_JOBS: {
|
||||
description: "Use this value as the number of parallel jobs to run when building with `make`(1).",
|
||||
default_text: "The number of available CPU cores.",
|
||||
default: lambda {
|
||||
@ -216,95 +209,91 @@ module Homebrew
|
||||
Hardware::CPU.cores
|
||||
},
|
||||
},
|
||||
HOMEBREW_NO_ANALYTICS: {
|
||||
HOMEBREW_NO_ANALYTICS: {
|
||||
description: "If set, do not send analytics. For more information, see: <https://docs.brew.sh/Analytics>",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_NO_AUTO_UPDATE: {
|
||||
HOMEBREW_NO_AUTO_UPDATE: {
|
||||
description: "If set, do not automatically update before running some commands e.g. " \
|
||||
"`brew install`, `brew upgrade` and `brew tap`.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_NO_BOOTSNAP: {
|
||||
HOMEBREW_NO_BOOTSNAP: {
|
||||
description: "If set, do not use Bootsnap to speed up repeated `brew` calls.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: {
|
||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: {
|
||||
description: "If set, do not check for broken dependents after installing, upgrading or reinstalling " \
|
||||
"formulae.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_NO_CLEANUP_FORMULAE: {
|
||||
HOMEBREW_NO_CLEANUP_FORMULAE: {
|
||||
description: "A comma-separated list of formulae. Homebrew will refuse to clean up a " \
|
||||
"formula if it appears on this list.",
|
||||
},
|
||||
HOMEBREW_NO_COLOR: {
|
||||
HOMEBREW_NO_COLOR: {
|
||||
description: "If set, do not print text with colour added.",
|
||||
default_text: "`$NO_COLOR`.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_NO_COMPAT: {
|
||||
HOMEBREW_NO_COMPAT: {
|
||||
description: "If set, disable all use of legacy compatibility code.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_NO_EMOJI: {
|
||||
HOMEBREW_NO_EMOJI: {
|
||||
description: "If set, do not print `HOMEBREW_INSTALL_BADGE` on a successful build." \
|
||||
"\n\n *Note:* Will only try to print emoji on OS X Lion or newer.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_NO_GITHUB_API: {
|
||||
HOMEBREW_NO_GITHUB_API: {
|
||||
description: "If set, do not use the GitHub API, e.g. for searches or fetching relevant issues " \
|
||||
"after a failed install.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_NO_INSECURE_REDIRECT: {
|
||||
HOMEBREW_NO_INSECURE_REDIRECT: {
|
||||
description: "If set, forbid redirects from secure HTTPS to insecure HTTP." \
|
||||
"\n\n *Note:* While ensuring your downloads are fully secure, this is likely to cause " \
|
||||
"from-source SourceForge, some GNU & GNOME-hosted formulae to fail to download.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: {
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: {
|
||||
description: "If set, `brew install`, `brew upgrade` and `brew reinstall` will never automatically " \
|
||||
"cleanup installed/upgraded/reinstalled formulae or all formulae every " \
|
||||
"`HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS` days.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_NO_INSTALL_UPGRADE: {
|
||||
HOMEBREW_NO_INSTALL_UPGRADE: {
|
||||
description: "If set, `brew install` will not automatically upgrade installed but outdated formulae",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_PRY: {
|
||||
HOMEBREW_PRY: {
|
||||
description: "If set, use Pry for the `brew irb` command.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_SIMULATE_MACOS_ON_LINUX: {
|
||||
HOMEBREW_SIMULATE_MACOS_ON_LINUX: {
|
||||
description: "If set, running Homebrew on Linux will simulate certain macOS code paths. This is useful " \
|
||||
"when auditing macOS formulae while on Linux. Implies `HOMEBREW_FORCE_HOMEBREW_ON_LINUX`.",
|
||||
"when auditing macOS formulae while on Linux.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_FORCE_HOMEBREW_CORE_REPO_ON_LINUX: {
|
||||
description: "If set, running Homebrew on Linux will use homebrew-core instead of linuxbrew-core.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_SSH_CONFIG_PATH: {
|
||||
HOMEBREW_SSH_CONFIG_PATH: {
|
||||
description: "If set, Homebrew will use the given config file instead of `~/.ssh/config` when fetching " \
|
||||
"`git` repos over `ssh`.",
|
||||
default_text: "`$HOME/.ssh/config`",
|
||||
},
|
||||
HOMEBREW_SKIP_OR_LATER_BOTTLES: {
|
||||
HOMEBREW_SKIP_OR_LATER_BOTTLES: {
|
||||
description: "If set along with `HOMEBREW_DEVELOPER`, do not use bottles from older versions " \
|
||||
"of macOS. This is useful in development on new macOS versions.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_SORBET_RUNTIME: {
|
||||
HOMEBREW_SORBET_RUNTIME: {
|
||||
description: "If set, enable runtime typechecking using Sorbet.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_SVN: {
|
||||
HOMEBREW_SVN: {
|
||||
description: "Use this as the `svn`(1) binary.",
|
||||
default_text: "A Homebrew-built Subversion (if installed), or the system-provided binary.",
|
||||
},
|
||||
HOMEBREW_TEMP: {
|
||||
HOMEBREW_TEMP: {
|
||||
description: "Use this path as the temporary directory for building packages. Changing " \
|
||||
"this may be needed if your system temporary directory and Homebrew prefix are on " \
|
||||
"different volumes, as macOS has trouble moving symlinks across volumes when the target " \
|
||||
@ -313,45 +302,45 @@ module Homebrew
|
||||
default_text: "macOS: `/private/tmp`, Linux: `/tmp`.",
|
||||
default: HOMEBREW_DEFAULT_TEMP,
|
||||
},
|
||||
HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED: {
|
||||
HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED: {
|
||||
description: "If set, `brew update` only lists updates to installed software.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_UPDATE_TO_TAG: {
|
||||
HOMEBREW_UPDATE_TO_TAG: {
|
||||
description: "If set, always use the latest stable tag (even if developer commands " \
|
||||
"have been run).",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_VERBOSE: {
|
||||
HOMEBREW_VERBOSE: {
|
||||
description: "If set, always assume `--verbose` when running commands.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_DEBUG: {
|
||||
HOMEBREW_DEBUG: {
|
||||
description: "If set, always assume `--debug` when running commands.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_VERBOSE_USING_DOTS: {
|
||||
HOMEBREW_VERBOSE_USING_DOTS: {
|
||||
description: "If set, verbose output will print a `.` no more than once a minute. This can be " \
|
||||
"useful to avoid long-running Homebrew commands being killed due to no output.",
|
||||
boolean: true,
|
||||
},
|
||||
all_proxy: {
|
||||
all_proxy: {
|
||||
description: "Use this SOCKS5 proxy for `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.",
|
||||
},
|
||||
ftp_proxy: {
|
||||
ftp_proxy: {
|
||||
description: "Use this FTP proxy for `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.",
|
||||
},
|
||||
http_proxy: {
|
||||
http_proxy: {
|
||||
description: "Use this HTTP proxy for `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.",
|
||||
},
|
||||
https_proxy: {
|
||||
https_proxy: {
|
||||
description: "Use this HTTPS proxy for `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.",
|
||||
},
|
||||
no_proxy: {
|
||||
no_proxy: {
|
||||
description: "A comma-separated list of hostnames and domain names excluded " \
|
||||
"from proxying by `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.",
|
||||
},
|
||||
SUDO_ASKPASS: {
|
||||
SUDO_ASKPASS: {
|
||||
description: "If set, pass the `-A` option when calling `sudo`(8).",
|
||||
},
|
||||
}.freeze
|
||||
|
@ -1,4 +0,0 @@
|
||||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "extend/os/linux/api/analytics" if OS.linux?
|
@ -1,4 +0,0 @@
|
||||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "extend/os/linux/api/bottle" if OS.linux?
|
@ -1,4 +0,0 @@
|
||||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "extend/os/linux/api/formula" if OS.linux?
|
@ -1,18 +0,0 @@
|
||||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Homebrew
|
||||
module API
|
||||
module Analytics
|
||||
class << self
|
||||
def analytics_api_path
|
||||
return generic_analytics_api_path if
|
||||
Homebrew::EnvConfig.force_homebrew_on_linux? ||
|
||||
Homebrew::EnvConfig.force_homebrew_core_repo_on_linux?
|
||||
|
||||
"analytics-linux"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -1,18 +0,0 @@
|
||||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Homebrew
|
||||
module API
|
||||
module Bottle
|
||||
class << self
|
||||
def bottle_api_path
|
||||
return generic_bottle_api_path if
|
||||
Homebrew::EnvConfig.force_homebrew_on_linux? ||
|
||||
Homebrew::EnvConfig.force_homebrew_core_repo_on_linux?
|
||||
|
||||
"bottle-linux"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -1,18 +0,0 @@
|
||||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Homebrew
|
||||
module API
|
||||
module Formula
|
||||
class << self
|
||||
def formula_api_path
|
||||
return generic_formula_api_path if
|
||||
Homebrew::EnvConfig.force_homebrew_on_linux? ||
|
||||
Homebrew::EnvConfig.force_homebrew_core_repo_on_linux?
|
||||
|
||||
"formula-linux"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -10,6 +10,15 @@ require "os/linux/kernel"
|
||||
module Homebrew
|
||||
module Diagnostic
|
||||
class Checks
|
||||
undef fatal_preinstall_checks, supported_configuration_checks
|
||||
|
||||
def fatal_preinstall_checks
|
||||
%w[
|
||||
check_access_directories
|
||||
check_linuxbrew_core
|
||||
].freeze
|
||||
end
|
||||
|
||||
def supported_configuration_checks
|
||||
%w[
|
||||
check_glibc_minimum_version
|
||||
@ -109,6 +118,15 @@ module Homebrew
|
||||
or changing distributions.
|
||||
EOS
|
||||
end
|
||||
|
||||
def check_linuxbrew_core
|
||||
return unless CoreTap.instance.linuxbrew_core?
|
||||
|
||||
<<~EOS
|
||||
Your Linux Homebrew/core repository is still linuxbrew-core.
|
||||
You must `brew update` to update to homebrew-core.
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,10 +0,0 @@
|
||||
# typed: true
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CoreTap < Tap
|
||||
# @private
|
||||
def initialize
|
||||
super "Homebrew", "core"
|
||||
@full_name = "Homebrew/linuxbrew-core" if HOMEBREW_CORE_DEFAULT_GIT_REMOTE.include?("Homebrew/linuxbrew-core")
|
||||
end
|
||||
end
|
@ -1,5 +1,4 @@
|
||||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "extend/os/linux/tap" if OS.linux?
|
||||
require "extend/os/mac/tap" if OS.mac?
|
||||
|
@ -68,8 +68,6 @@ class GitHubPackages
|
||||
HOMEBREW_PREFIX/"bin/skopeo",
|
||||
].compact.first
|
||||
unless skopeo.exist?
|
||||
odie "no `skopeo` and HOMEBREW_FORCE_HOMEBREW_ON_LINUX is set!" if Homebrew::EnvConfig.force_homebrew_on_linux?
|
||||
|
||||
ohai "Installing `skopeo` for upload..."
|
||||
safe_system HOMEBREW_BREW_FILE, "install", "--formula", "skopeo"
|
||||
skopeo = Formula["skopeo"].opt_bin/"skopeo"
|
||||
@ -273,13 +271,7 @@ class GitHubPackages
|
||||
git_path = bottle_hash["formula"]["tap_git_path"]
|
||||
git_revision = bottle_hash["formula"]["tap_git_revision"]
|
||||
|
||||
# we're uploading Homebrew/linuxbrew-core bottles to Linuxbrew with a core/
|
||||
# prefix.
|
||||
source_org_repo = if org.casecmp("linuxbrew").zero? && repo == "homebrew-core"
|
||||
"Homebrew/linuxbrew-core"
|
||||
else
|
||||
"#{org}/#{repo}"
|
||||
end
|
||||
source_org_repo = "#{org}/#{repo}"
|
||||
source = "https://github.com/#{source_org_repo}/blob/#{git_revision.presence || "HEAD"}/#{git_path}"
|
||||
|
||||
formula_core_tap = formula_full_name.exclude?("/")
|
||||
|
@ -418,10 +418,6 @@ module RuboCop
|
||||
end
|
||||
next if valid
|
||||
|
||||
# TODO: temporarily allow this for linuxbrew-core merge.
|
||||
next if method&.parent&.parent&.source&.start_with?("revision OS.mac?")
|
||||
next if method&.parent&.source&.match?(/revision \d unless OS\.mac\?/)
|
||||
|
||||
offending_node(method)
|
||||
problem "Don't use '#{if_method_and_class}', use '#{on_method_name} do' instead." do |corrector|
|
||||
if_node = method.parent
|
||||
|
@ -4570,10 +4570,6 @@ module Homebrew::EnvConfig
|
||||
|
||||
def self.force_brewed_git?(); end
|
||||
|
||||
def self.force_homebrew_core_repo_on_linux?(); end
|
||||
|
||||
def self.force_homebrew_on_linux?(); end
|
||||
|
||||
def self.force_vendor_ruby?(); end
|
||||
|
||||
def self.ftp_proxy(); end
|
||||
|
@ -807,6 +807,12 @@ class CoreTap < Tap
|
||||
true
|
||||
end
|
||||
|
||||
# @private
|
||||
sig { returns(T::Boolean) }
|
||||
def linuxbrew_core?
|
||||
remote_repo.to_s.end_with?("/linuxbrew-core")
|
||||
end
|
||||
|
||||
# @private
|
||||
def formula_dir
|
||||
@formula_dir ||= begin
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Are you missing your favorite software in Homebrew? Then you're the perfect person to resolve this problem.
|
||||
|
||||
Before you start, please check the open pull requests for [homebrew-core](https://github.com/Homebrew/homebrew-core/pulls) or [linuxbrew-core](https://github.com/Homebrew/linuxbrew-core/pulls), to make sure no one else beat you to the punch.
|
||||
Before you start, please check the open pull requests for [homebrew-core](https://github.com/Homebrew/homebrew-core/pulls), to make sure no one else beat you to the punch.
|
||||
|
||||
Next, you will want to go through the [Acceptable Formulae](Acceptable-Formulae.md) documentation to determine if the software is an appropriate addition to Homebrew. If you are creating a formula for an alternative version of software already in Homebrew (for example, a major/minor version that significantly differs from the existing version), be sure to read the [Versions](Versions.md) documentation to understand versioned formulae requirements.
|
||||
|
||||
@ -29,6 +29,6 @@ If you're stuck, ask for help on GitHub or [Homebrew/discussions](https://github
|
||||
|
||||
## Submitting the formula
|
||||
|
||||
You're finally ready to submit your formula to the [homebrew-core](https://github.com/Homebrew/homebrew-core/) or [linuxbrew-core](https://github.com/Homebrew/linuxbrew-core/) repository. If you haven't done this before, you can refer to the [How to Open a Pull Request](How-To-Open-a-Homebrew-Pull-Request.md) documentation for help. Maintainers will review the pull request and provide feedback about any areas that need to be addressed before the formula can be added to Homebrew.
|
||||
You're finally ready to submit your formula to the [homebrew-core](https://github.com/Homebrew/homebrew-core/) repository. If you haven't done this before, you can refer to the [How to Open a Pull Request](How-To-Open-a-Homebrew-Pull-Request.md) documentation for help. Maintainers will review the pull request and provide feedback about any areas that need to be addressed before the formula can be added to Homebrew.
|
||||
|
||||
If you've made it this far, congratulations on submitting a Homebrew formula! We appreciate the hard work you put into this and you can take satisfaction in knowing that your work may benefit other Homebrew users as well.
|
||||
|
@ -69,8 +69,7 @@ There are many checks that run on every PR. The following is a quick list of the
|
||||
- `CI / syntax`: This is run first to check whether the PR passes `brew style` and `brew typecheck`. If this job fails the
|
||||
following jobs will not run.
|
||||
- `CI / tap syntax (Linux)`: This runs `brew style` and `brew audit` on all official taps
|
||||
(note that although this has Linux in its name, it does check `Homebrew/homebrew-core`,
|
||||
`Homebrew/linuxbrew-core` and all cask repos).
|
||||
(note that although this has Linux in its name, it does check `Homebrew/homebrew-core` and all cask repos).
|
||||
- `CI / docker`: This builds and deploys a new Homebrew Docker image.
|
||||
- `CI / test everything (macOS)`: This runs several checks on macOS including `brew tests`, `brew update-tests`,
|
||||
`brew test-bot --only-formulae --test-default-formula`, `brew readall` and `brew doctor`.
|
||||
|
@ -81,5 +81,4 @@ Homebrew does not currently support 32-bit x86 platforms. It would be possible f
|
||||
## Homebrew on Linux Community
|
||||
|
||||
- [@HomebrewOnLinux on Twitter](https://twitter.com/HomebrewOnLinux)
|
||||
- [Homebrew/linuxbrew-core on GitHub](https://github.com/Homebrew/linuxbrew-core)
|
||||
- [Homebrew/discussions (forum)](https://github.com/homebrew/discussions/discussions)
|
||||
|
@ -17,9 +17,8 @@ but there are four main teams that maintainers tend to be a part of:
|
||||
- Core maintainers: this team maintains the [`Homebrew/homebrew-core`](https://github.com/Homebrew/homebrew-core)
|
||||
repository. See the [Homebrew/homebrew-core Maintainer Guide](Homebrew-homebrew-core-Maintainer-Guide.md)
|
||||
for more details about being a core maintainer.
|
||||
- Linux maintainers: this team maintains the [`Homebrew/linuxbrew-core`](https://github.com/Homebrew/linuxbrew-core)
|
||||
repository. See the [Homebrew/linuxbrew-core Maintainer Guide](Homebrew-linuxbrew-core-Maintainer-Guide.md)
|
||||
for more details about being a Linux maintainer.
|
||||
- Linux maintainers: this team maintains the [`Homebrew/homebrew-core`](https://github.com/Homebrew/homebrew-core)
|
||||
repository on Linux.
|
||||
- Cask maintainers: this team maintains the [`Homebrew/homebrew-cask`](https://github.com/Homebrew/homebrew-cask),
|
||||
[`Homebrew/homebrew-cask-drivers`](https://github.com/Homebrew/homebrew-cask-drivers),
|
||||
[`Homebrew/homebrew-cask-fonts`](https://github.com/Homebrew/homebrew-cask-fonts) and
|
||||
|
@ -1905,7 +1905,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
|
||||
- `HOMEBREW_BOTTLE_DOMAIN`
|
||||
<br>Use this URL as the download mirror for bottles. If bottles at that URL are temporarily unavailable, the default bottle domain will be used as a fallback mirror. For example, `HOMEBREW_BOTTLE_DOMAIN=http://localhost:8080` will cause all bottles to download from the prefix `http://localhost:8080/`. If bottles are not available at `HOMEBREW_BOTTLE_DOMAIN` they will be downloaded from the default bottle domain.
|
||||
|
||||
*Default:* macOS: `https://ghcr.io/v2/homebrew/core`, Linux: `https://ghcr.io/v2/linuxbrew/core`.
|
||||
*Default:* `https://ghcr.io/v2/homebrew/core`.
|
||||
|
||||
- `HOMEBREW_BREW_GIT_REMOTE`
|
||||
<br>Use this URL as the Homebrew/brew `git`(1) remote.
|
||||
@ -1943,7 +1943,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
|
||||
- `HOMEBREW_CORE_GIT_REMOTE`
|
||||
<br>Use this URL as the Homebrew/homebrew-core `git`(1) remote.
|
||||
|
||||
*Default:* macOS: `https://github.com/Homebrew/homebrew-core`, Linux: `https://github.com/Homebrew/linuxbrew-core`.
|
||||
*Default:* `https://github.com/Homebrew/homebrew-core`.
|
||||
|
||||
- `HOMEBREW_CURLRC`
|
||||
<br>If set, do not pass `--disable` when invoking `curl`(1), which disables the use of `curlrc`.
|
||||
@ -1994,9 +1994,6 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
|
||||
- `HOMEBREW_FORCE_BREWED_GIT`
|
||||
<br>If set, always use a Homebrew-installed `git`(1) rather than the system version. Automatically set if the system version of `git` is too old.
|
||||
|
||||
- `HOMEBREW_FORCE_HOMEBREW_ON_LINUX`
|
||||
<br>If set, running Homebrew on Linux will use URLs for macOS and will use homebrew-core instead of linuxbrew-core. This is useful when merging pull requests for macOS while on Linux.
|
||||
|
||||
- `HOMEBREW_FORCE_VENDOR_RUBY`
|
||||
<br>If set, always use Homebrew's vendored, relocatable Ruby version even if the system version of Ruby is new enough.
|
||||
|
||||
@ -2086,10 +2083,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
|
||||
<br>If set, use Pry for the `brew irb` command.
|
||||
|
||||
- `HOMEBREW_SIMULATE_MACOS_ON_LINUX`
|
||||
<br>If set, running Homebrew on Linux will simulate certain macOS code paths. This is useful when auditing macOS formulae while on Linux. Implies `HOMEBREW_FORCE_HOMEBREW_ON_LINUX`.
|
||||
|
||||
- `HOMEBREW_FORCE_HOMEBREW_CORE_REPO_ON_LINUX`
|
||||
<br>If set, running Homebrew on Linux will use homebrew-core instead of linuxbrew-core.
|
||||
<br>If set, running Homebrew on Linux will simulate certain macOS code paths. This is useful when auditing macOS formulae while on Linux.
|
||||
|
||||
- `HOMEBREW_SSH_CONFIG_PATH`
|
||||
<br>If set, Homebrew will use the given config file instead of `~/.ssh/config` when fetching `git` repos over `ssh`.
|
||||
|
@ -34,7 +34,6 @@ A few requests:
|
||||
Here are links to these guides:
|
||||
- Homebrew/brew: https://docs.brew.sh/Homebrew-brew-Maintainer-Guide
|
||||
- Homebrew/homebrew-core: https://docs.brew.sh/Homebrew-homebrew-core-Maintainer-Guide
|
||||
- Homebrew/linuxbrew-core: https://docs.brew.sh/Homebrew-linuxbrew-core-Maintainer-Guide
|
||||
- Homebrew/homebrew-cask: https://docs.brew.sh/Homebrew-homebrew-cask-Maintainer-Guide
|
||||
- Still create your branches on your fork rather than in the main repository.
|
||||
Note GitHub's UI will create edits and reverts on the main repository if you
|
||||
|
@ -10,7 +10,7 @@ This document will help you check for common issues and make sure your issue has
|
||||
|
||||
## Check to see if the issue has been reported
|
||||
|
||||
* Search the [Homebrew/homebrew-core issue tracker](https://github.com/Homebrew/homebrew-core/issues) or [Homebrew/linuxbrew-core issue tracker](https://github.com/Homebrew/linuxbrew-core/issues) to see if someone else has already reported the same issue.
|
||||
* Search the [Homebrew/homebrew-core issue tracker](https://github.com/Homebrew/homebrew-core/issues) to see if someone else has already reported the same issue.
|
||||
* If a formula that has failed to build is part of a non-core tap or a cask is part of [homebrew/cask](https://github.com/Homebrew/homebrew-cask/issues) check those issue trackers instead.
|
||||
* Search the [Homebrew discussion forum](https://github.com/homebrew/discussions/discussions) or [Discourse](https://discourse.brew.sh/) to see if any discussions have started about the issue.
|
||||
|
||||
@ -23,7 +23,7 @@ If your problem hasn't been solved or reported, then create an issue:
|
||||
* If you had a formula-related problem: run `brew gist-logs <formula>` (where `<formula>` is the name of the formula).
|
||||
* If you encountered a non-formula problem: upload the output of `brew config` and `brew doctor` to a new [Gist](https://gist.github.com).
|
||||
|
||||
2. Create a new issue on the [Homebrew/homebrew-core issue tracker](https://github.com/Homebrew/homebrew-core/issues/new/choose) or [Homebrew/linuxbrew-core issue tracker](https://github.com/Homebrew/linuxbrew-core/issues/new/choose)
|
||||
2. Create a new issue on the [Homebrew/homebrew-core issue tracker](https://github.com/Homebrew/homebrew-core/issues/new/choose)
|
||||
|
||||
* Give your issue a descriptive title which includes the formula name (if applicable) and the version of macOS or Linux you are using. For example, if a formula fails to build, title your issue "\<formula> failed to build on \<10.x>", where "\<formula>" is the name of the formula that failed to build, and "\<10.x>" is the version of macOS or Linux you are using.
|
||||
* Include the URL output by `brew gist-logs <formula>` (if applicable).
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Did you find something in Homebrew that wasn't the latest version? You can help yourself and others by submitting a pull request to update the formula.
|
||||
|
||||
First, check the pull requests in the [homebrew-core](https://github.com/Homebrew/homebrew-core/pulls) or [linuxbrew-core](https://github.com/Homebrew/linuxbrew-core/pulls) repositories (whichever apply) to make sure there isn't already an open PR. You may also want to look through closed pull requests for the formula, as sometimes formulae run into problems preventing them from being updated and it's better to be aware of any issues before putting significant effort into an update.
|
||||
First, check the pull requests in the [homebrew-core](https://github.com/Homebrew/homebrew-core/pulls) repository to make sure there isn't already an open PR. You may also want to look through closed pull requests for the formula, as sometimes formulae run into problems preventing them from being updated and it's better to be aware of any issues before putting significant effort into an update.
|
||||
|
||||
The [How To Open a Homebrew Pull Request](How-To-Open-a-Homebrew-Pull-Request.md) documentation should explain most everything you need to know about the process of creating a PR for a version update. For simple formulae updates, this typically involves changing the URL and sha256.
|
||||
|
||||
|
@ -2695,7 +2695,7 @@ If set, use Bootsnap to speed up repeated \fBbrew\fR calls\. A no\-op when using
|
||||
Use this URL as the download mirror for bottles\. If bottles at that URL are temporarily unavailable, the default bottle domain will be used as a fallback mirror\. For example, \fBHOMEBREW_BOTTLE_DOMAIN=http://localhost:8080\fR will cause all bottles to download from the prefix \fBhttp://localhost:8080/\fR\. If bottles are not available at \fBHOMEBREW_BOTTLE_DOMAIN\fR they will be downloaded from the default bottle domain\.
|
||||
.
|
||||
.IP
|
||||
\fIDefault:\fR macOS: \fBhttps://ghcr\.io/v2/homebrew/core\fR, Linux: \fBhttps://ghcr\.io/v2/linuxbrew/core\fR\.
|
||||
\fIDefault:\fR \fBhttps://ghcr\.io/v2/homebrew/core\fR\.
|
||||
.
|
||||
.TP
|
||||
\fBHOMEBREW_BREW_GIT_REMOTE\fR
|
||||
@ -2764,7 +2764,7 @@ If set, force colour output on non\-TTY outputs\.
|
||||
Use this URL as the Homebrew/homebrew\-core \fBgit\fR(1) remote\.
|
||||
.
|
||||
.IP
|
||||
\fIDefault:\fR macOS: \fBhttps://github\.com/Homebrew/homebrew\-core\fR, Linux: \fBhttps://github\.com/Homebrew/linuxbrew\-core\fR\.
|
||||
\fIDefault:\fR \fBhttps://github\.com/Homebrew/homebrew\-core\fR\.
|
||||
.
|
||||
.TP
|
||||
\fBHOMEBREW_CURLRC\fR
|
||||
@ -2860,12 +2860,6 @@ If set, always use a Homebrew\-installed \fBcurl\fR(1) rather than the system ve
|
||||
If set, always use a Homebrew\-installed \fBgit\fR(1) rather than the system version\. Automatically set if the system version of \fBgit\fR is too old\.
|
||||
.
|
||||
.TP
|
||||
\fBHOMEBREW_FORCE_HOMEBREW_ON_LINUX\fR
|
||||
.
|
||||
.br
|
||||
If set, running Homebrew on Linux will use URLs for macOS and will use homebrew\-core instead of linuxbrew\-core\. This is useful when merging pull requests for macOS while on Linux\.
|
||||
.
|
||||
.TP
|
||||
\fBHOMEBREW_FORCE_VENDOR_RUBY\fR
|
||||
.
|
||||
.br
|
||||
@ -3037,13 +3031,7 @@ If set, use Pry for the \fBbrew irb\fR command\.
|
||||
\fBHOMEBREW_SIMULATE_MACOS_ON_LINUX\fR
|
||||
.
|
||||
.br
|
||||
If set, running Homebrew on Linux will simulate certain macOS code paths\. This is useful when auditing macOS formulae while on Linux\. Implies \fBHOMEBREW_FORCE_HOMEBREW_ON_LINUX\fR\.
|
||||
.
|
||||
.TP
|
||||
\fBHOMEBREW_FORCE_HOMEBREW_CORE_REPO_ON_LINUX\fR
|
||||
.
|
||||
.br
|
||||
If set, running Homebrew on Linux will use homebrew\-core instead of linuxbrew\-core\.
|
||||
If set, running Homebrew on Linux will simulate certain macOS code paths\. This is useful when auditing macOS formulae while on Linux\.
|
||||
.
|
||||
.TP
|
||||
\fBHOMEBREW_SSH_CONFIG_PATH\fR
|
||||
|
Loading…
x
Reference in New Issue
Block a user