Due to a problem with the Subversion 1.13 Brew formula I was installing an older revision of the formula:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/0c3d786402ad7d9dd5eb6907e3ed3f2525a0472d/Formula/subversion.rb
That gives a warning:
Warning: Calling Installation of subversion from a GitHub commit URL is deprecated! Use 'brew extract subversion' to stable tap on GitHub instead.
The suggestion is the same as this tip.
Now, I'd like to do this properly using brew extract subversion
rather than using the deprecated commit URL. I'd like to install Subversion 1.13_5 on some computers, but Subversion 1.14 is the latest formula.
I need to do something like this: brew extract --version 1.13.0_5 subversion <tap>
.
The way I understand this I should:
- Create an empty repository for my versioned formulas
- Add the repository as a tap and initialize it
- Extract the versioned formula
- Commit and push the formula?
I created an empty repository, then:
$ brew tap rjollos/homebrew-versioned
Cloning into '/usr/local/Homebrew/Library/Taps/rjollos/homebrew-versioned'...
warning: You appear to have cloned an empty repository.
Tapped (16 files, 22.2KB).
$ brew tap-new rjollos/homebrew-versioned
==> Created rjollos/versioned
/usr/local/Homebrew/Library/Taps/rjollos/homebrew-versioned
$ brew extract --version '1.13.0_5' subversion rjollos/homebrew-versioned
==> Searching repository history
Warning: Calling 'devel' blocks in formulae is deprecated! Use 'head' blocks or @-versioned formulae instead.
Please report this issue to the homebrew/core tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/subversion.rb:16
Warning: Calling 'devel' blocks ... (repeats about a dozen times)
Error: subversion: undefined method `sha1' for #<SoftwareSpec:0x00007fceaf144490>
I think I'm doing several things wrong, but mainly I'm unsure why brew extract
doesn't work. Also, is there a better way to create a new repository and populate it with the template files for a new tap?
$ brew --version
Homebrew 2.4.4-19-ge09802b
Homebrew/homebrew-core (git revision 5ee797; last commit 2020-07-07)
Homebrew/homebrew-cask (git revision 837ac; last commit 2020-07-08)