Default Homebrew on Linux to use GitHub Packages.

This commit is contained in:
Mike McQuaid 2021-04-09 09:17:24 +01:00
parent fa3af8d24d
commit bf199cf271
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
5 changed files with 12 additions and 8 deletions

View File

@ -446,7 +446,7 @@ if [[ -n "$HOMEBREW_MACOS" || -n "$HOMEBREW_FORCE_HOMEBREW_ON_LINUX" ]]
then then
HOMEBREW_BOTTLE_DEFAULT_DOMAIN="https://ghcr.io/v2/homebrew/core" HOMEBREW_BOTTLE_DEFAULT_DOMAIN="https://ghcr.io/v2/homebrew/core"
else else
HOMEBREW_BOTTLE_DEFAULT_DOMAIN="https://linuxbrew.bintray.com" HOMEBREW_BOTTLE_DEFAULT_DOMAIN="https://ghcr.io/v2/linuxbrew/core"
fi fi
HOMEBREW_USER_AGENT="$HOMEBREW_PRODUCT/$HOMEBREW_USER_AGENT_VERSION ($HOMEBREW_SYSTEM; $HOMEBREW_PROCESSOR $HOMEBREW_OS_USER_AGENT_VERSION)" HOMEBREW_USER_AGENT="$HOMEBREW_PRODUCT/$HOMEBREW_USER_AGENT_VERSION ($HOMEBREW_SYSTEM; $HOMEBREW_PROCESSOR $HOMEBREW_OS_USER_AGENT_VERSION)"

View File

@ -19,8 +19,6 @@ then
then then
ruby_FILENAME="portable-ruby-2.6.3_2.yosemite.bottle.tar.gz" ruby_FILENAME="portable-ruby-2.6.3_2.yosemite.bottle.tar.gz"
ruby_SHA="b065e5e3783954f3e65d8d3a6377ca51649bfcfa21b356b0dd70490f74c6bd86" ruby_SHA="b065e5e3783954f3e65d8d3a6377ca51649bfcfa21b356b0dd70490f74c6bd86"
ruby_URL="https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:$ruby_SHA"
ruby_URL2="https://homebrew.bintray.com/bottles-portable-ruby/$ruby_FILENAME"
fi fi
elif [[ -n "$HOMEBREW_LINUX" ]] elif [[ -n "$HOMEBREW_LINUX" ]]
then then
@ -28,12 +26,18 @@ then
x86_64) x86_64)
ruby_FILENAME="portable-ruby-2.6.3_2.x86_64_linux.bottle.tar.gz" ruby_FILENAME="portable-ruby-2.6.3_2.x86_64_linux.bottle.tar.gz"
ruby_SHA="97e639a64dcec285392b53ad804b5334c324f1d2a8bdc2b5087b8bf8051e332f" ruby_SHA="97e639a64dcec285392b53ad804b5334c324f1d2a8bdc2b5087b8bf8051e332f"
ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/$ruby_FILENAME"
ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3_2/$ruby_FILENAME"
;; ;;
esac esac
fi fi
# Dynamic variables can't be detected by shellcheck
# shellcheck disable=SC2034
if [[ -n "$ruby_SHA" && -n "$ruby_FILENAME" ]]
then
ruby_URL="https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:$ruby_SHA"
ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3_2/$ruby_FILENAME"
fi
check_linux_glibc_version() { check_linux_glibc_version() {
if [[ -z $HOMEBREW_LINUX || -z $HOMEBREW_LINUX_MINIMUM_GLIBC_VERSION ]] if [[ -z $HOMEBREW_LINUX || -z $HOMEBREW_LINUX_MINIMUM_GLIBC_VERSION ]]
then then

View File

@ -53,7 +53,7 @@ module Homebrew
"If bottles are not available at `HOMEBREW_BOTTLE_DOMAIN` " \ "If bottles are not available at `HOMEBREW_BOTTLE_DOMAIN` " \
"they will be downloaded from the default bottle domain.", "they will be downloaded from the default bottle domain.",
default_text: "macOS: `https://ghcr.io/v2/homebrew/core`, " \ default_text: "macOS: `https://ghcr.io/v2/homebrew/core`, " \
"Linux: `https://linuxbrew.bintray.com`.", "Linux: `https://ghcr.io/v2/linuxbrew/core`.",
default: HOMEBREW_BOTTLE_DEFAULT_DOMAIN, default: HOMEBREW_BOTTLE_DEFAULT_DOMAIN,
}, },
HOMEBREW_BREW_GIT_REMOTE: { HOMEBREW_BREW_GIT_REMOTE: {

View File

@ -1750,7 +1750,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
- `HOMEBREW_BOTTLE_DOMAIN` - `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. <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://linuxbrew.bintray.com`. *Default:* macOS: `https://ghcr.io/v2/homebrew/core`, Linux: `https://ghcr.io/v2/linuxbrew/core`.
- `HOMEBREW_BREW_GIT_REMOTE` - `HOMEBREW_BREW_GIT_REMOTE`
<br>Use this URL as the Homebrew/brew `git`(1) remote. <br>Use this URL as the Homebrew/brew `git`(1) remote.

View File

@ -2458,7 +2458,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\. 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 .IP
\fIDefault:\fR macOS: \fBhttps://ghcr\.io/v2/homebrew/core\fR, Linux: \fBhttps://linuxbrew\.bintray\.com\fR\. \fIDefault:\fR macOS: \fBhttps://ghcr\.io/v2/homebrew/core\fR, Linux: \fBhttps://ghcr\.io/v2/linuxbrew/core\fR\.
. .
.TP .TP
\fBHOMEBREW_BREW_GIT_REMOTE\fR \fBHOMEBREW_BREW_GIT_REMOTE\fR