\page homebrew-tap-instructions Homebrew tap instructions
CBMC archives versions into a tap which you can use to quickly download and build various historical versions.
The tap is available at https://github.com/diffblue/homebrew-cbmc.
Any version installed from the tap will need to be built from source locally.
-
Add the CBMC tap using the following command:
$ brew tap diffblue/cbmc
-
Install any of the available CBMC versions in the following manner:
$ brew install diffblue/cbmc/[email protected]
-
To remove the version of CBMC installed you need to issue
$ brew remove diffblue/cbmc/[email protected]
-
To remove the tap altogether, you need to issue
$ brew untap diffblue/cbmc
-
You can clone the CBMC tap locally by issuing:
$ brew tap diffblue/cbmc
That instruction is going to clone the above tap repository locally. Afterwards, you can proceed with installing the formulas present, edit them, etc.
If you wish to set up a new tap for any reason, you can use
brew tap-new
like the following example:$ brew tap-new <developer>/homebrew_cbmc
-
For any edit, the second step is to
cd
into the repository. To do that easily, it's best to ask Homebrew to give you the location of the repository:$ cd $(brew --repo diffblue/cbmc)
-
You can extract versions of CBMC previously available in
homebrew/core
to the tap with the following instruction:$ brew extract cbmc diffblue/cbmc --version=<ver>
For example
$ brew extract cbmc diffblue/cbmc --version=5.54.0
will have as an end result a new file underFormula/[email protected]
that will contain the formula that we had submitted for that version of CBMC in thehomebrew/core
repository. -
If you want to edit a specific version formula, you can do that by issueing
$ brew edit [email protected]
with the appropriate version tag. This will open the formula on the default editor in your system to allow you to make changes.
These changes are only going to be reflected locally - but you can
cd
to the repository, commit and then push to the tap (this is allowed only for people who have permission to push to the tap - mainly, the Diffblue open source team).
- Bootstrapping the repository with
brew tap --new
created two github actions.github/workflows/publish.yml
and.github/workflows/tests.yml
which we are not using at the moment but could serve to make future automation easier.
-
Different CBMC versions can co-exist in the same machine, but homebrew needs a symbolic link to be established because of how it manages the
$PATH
and installation directories for binaries. -
If already have a version of CBMC from the tap installed, and you want to install another version, then you need to take an extra step after installation to setup the appropriate symlinks by using the
brew link
instruction:$ cbmc --version # version installed by brew 5.54.0 $ brew install diffblue/cbmc/[email protected] $ brew link --overwrite [email protected] $ cbmc --version 5.55.0