Linuxbrew is a fork of Homebrew. Homebrew is merged into Linuxbrew roughly once per day. To contribute a new formula or a new version of an existing formula, please submit your pull request to Homebrew rather than to Linuxbrew. Patches to fix issues that you have reproduced on both Linuxbrew and Homebrew should be sent to Homebrew. Please send your pull request to Linuxbrew if you are in doubt.
Patches to fix issues particular to Linux should not affect the behaviour of the formula on Mac. Use if OS.mac?
and if OS.linux?
as necessary to preserve the existing behaviour on Mac.
First time contributing to Homebrew? Read our Code of Conduct.
- run
brew update
(twice) - run and read
brew doctor
- read the Troubleshooting Checklist
- open an issue on the formula's repository
- check if the same upgrade has been already submitted by searching the open pull requests for
foo
. brew bump-formula-pr --strict foo
with--url=...
and--sha256=...
or--tag=...
and--revision=...
arguments.
- read the Formula Cookbook or:
brew create $URL
and make edits brew install --build-from-source foo
brew audit --new-formula foo
git commit
with message formattedfoo 2.3.4 (new formula)
- open a pull request and fix any failing tests
Once you've addressed any potential feedback and a member of the Homebrew org has approved your pull request, the BrewTestBot will automatically merge it a couple of minutes later.
If you are already well versed in the use of git
, then you can find the local
copy of the homebrew-core
repository in this directory
($(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/
), modify the formula there
leaving the section bottle do ... end
unchanged, and prepare a pull request
as you usually do. Before submitting your pull request, be sure to test it
with these commands:
brew uninstall --force foo
brew install --build-from-source foo
brew test foo
brew audit --strict foo
brew style foo
After testing, if you think it is needed to force the corresponding bottles to be
rebuilt and redistributed, add a line of the form revision 1
to the formula,
or add 1 to the revision number already present.
If you are not already well versed in the use of git
, then you may learn
about it from the introduction at
https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request and then proceed as
follows:
- run
brew edit foo
and make edits - remove the linux bottle in the
bottle do ... end
section - test your changes using the commands listed above
- run
git commit
with message formattedfoo <insert new version number>
orfoo: <insert details>
- open a pull request as described in the introduction linked to above, wait for the automated test results, and fix any failing tests
Once you've addressed any potential feedback and a member of the Homebrew org has approved your pull request, the BrewTestBot will automatically merge it a couple of minutes later.
Thanks!