Skip to content

Bottling M2

Mahrud Sayrafi edited this page Jun 20, 2026 · 7 revisions

Bottling M2 (for contributing to this tap)

GitHub no longer supports building bottles for Intel's x86 architecture, so Macaulay2 bottles for Intel must be built by volunteers and uploaded manually.

Bottling an individual formula

You can build and bottle a package with the following commands:

brew uninstall --ignore-dependencies PROGRAM
brew install --build-bottle PROGRAM
brew bottle --no-rebuild PROGRAM

Also see: 142

You can find the list of unbottled dependencies with:

brew unbottled --tag=sonoma M2
brew unbottled --tag=arm64_sonoma M2

Also see: 339

It is also possible to use brew dispatch-build-bottle to build a bottle on GitHub.

Bottling all libraries locally

To make the bottle available for use by others, it needs to be uploaded and linked in the corresponding formula.

  1. Build all the necessary bottles
PROGRAMS=`brew unbottled M2 | grep unbottled | cut -d':' -f3`
for i in $PROGRAMS; do
    brew uninstall --ignore-dependencies $i
    brew install --build-bottle $i
    brew bottle --no-rebuild $i
done

TODO: add instructions for uploading and linking the bottles.

Testing the bottle

brew update
brew remove M2
brew remove --ignore-dependencies `brew deps M2 | grep macaulay2`
brew install M2

Building the macaulay2-common bottle

Warning: this is likely outdated.

Get the location of a recent macaulay2 bottle:

$ curl --request GET -H'Authorization: Bearer QQ==' https://ghcr.io/v2/macaulay2/tap/macaulay2/blobs/sha256:291a38fff0ca8431a44b2f0a153d3c41b8b88d049b6e73e5206d28e4c435b458 --head

HTTP/2 307 
content-length: 0
content-type: application/vnd.oci.image.layer.v1.tar+gzip
docker-distribution-api-version: registry/2.0
location: https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:291a38fff0ca8431a44b2f0a153d3c41b8b88d049b6e73e5206d28e4c435b458?se=2024-07-17T23%3A35%3A00Z&sig=dJwipWJQsnSEG4rkFi9b87olzkkspJTlqVKUgKJ7InY%3D&sp=r&spr=https&sr=b&sv=2019-12-12
date: Wed, 17 Jul 2024 23:29:50 GMT
x-github-request-id: C2E4:375B22:156AECA:161286A:669853EE

Use this to update the content of macaulay2-common.rb.

Clone this wiki locally