Skip to content

Publish Homebrew bottles for this tap #12

@mislav

Description

@mislav

I've taken a stab at publishing Homebrew bottles for formula in this repo: rbenv/tap/openssl@1.0 and rbenv/tap/openssl@1.1

On macOS Sequoia 15 arm64, running brew install for any of these formulae should install "bottles" from this organization, which are basically pre-built packages for a certain OS & architecture.

What follows are some of my notes on how this is done.

Important

If you were getting errors such as these in the last 24 hours:

Error: openssl@1.1: Failed to download resource "openssl@1.1"
Download failed: https://ghcr.io/v2/rbenv/tap/openssl/1.1/blobs/sha256:***

that was because I've messed things up in the process, but it should be fixed now. If you're still getting those errors consistently, please comment here or open a new issue. 🙏

How I did it

First off, my local environment:

export HOMEBREW_DEVELOPER=1
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_FROM_API=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
export HOMEBREW_GITHUB_PACKAGES_USER="mislav"
export HOMEBREW_GITHUB_PACKAGES_TOKEN="***"

The steps:

  1. brew uninstall openssl@1.0 openssl@1.1
  2. brew install --build-bottle rbenv/tap/openssl@1.0
  3. brew install --build-bottle rbenv/tap/openssl@1.1
  4. brew bottle --json rbenv/tap/openssl@1.0 --root-url="https://ghcr.io/v2/rbenv/tap"
  5. brew bottle --json rbenv/tap/openssl@1.1 --root-url="https://ghcr.io/v2/rbenv/tap"
  6. brew pr-upload --root-url="https://ghcr.io/v2/rbenv/tap"
  7. Manually edit the bottle ... section in formula files to declare root_url "https://ghcr.io/v2/rbenv/tap"
  8. git push

Notes:

  • brew bottle produces a *.tar.gz package and a *.bottle.json
  • brew pr-upload takes all *.bottle.json files, edits the local formulae to add the bottle ... section to them, and uploads the tarballs to GitHub Packages using HOMEBREW_GITHUB_PACKAGES_TOKEN

See:

TODO

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions