Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Calling Formula.sha1 is disabled! #7058

Closed
noahwallach opened this issue Nov 18, 2016 · 6 comments
Closed

Error: Calling Formula.sha1 is disabled! #7058

noahwallach opened this issue Nov 18, 2016 · 6 comments

Comments

@noahwallach
Copy link

How do I fix the Error: Calling Formula.sha1 is disabled!
error when running brew doctor ?

mbp 11:47:35 /usr/local $ sudo chown -R $(whoami) $(brew --prefix)
Password:
mbp 11:51:15 /usr/local $ cd "$(brew --repo)" && git fetch && git reset --hard origin/master && brew update
HEAD is now at 7853406 Merge pull request #1515 from alyssais/formula_cache
Warning: Permanently added 'git-aws.internal.justin.tv,10.192.65.65' (RSA) to the list of known hosts.
Updated 1 tap (caskroom/cask).
No changes to formulae.
mbp 11:54:15 /usr/local/Homebrew $
mbp 11:54:43 /usr/local/Homebrew $ brew update
Warning: Permanently added 'git-aws.internal.justin.tv,10.192.65.65' (RSA) to the list of known hosts.
Already up-to-date.
mbp 11:55:04 /usr/local/Homebrew $ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
./configure scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/usr/local/opt/pkg-config

Warning: Python is installed at /Library/Frameworks/Python.framework

Homebrew only supports building against the System-provided Python or a
brewed Python. In particular, Pythons installed to /Library can interfere
with other software installs.

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libluajit-5.1.2.0.4.dylib
/usr/local/lib/libluajit-5.1.2.dylib
/usr/local/lib/libluajit-5.1.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
/usr/local/include/lauxlib.h
/usr/local/include/lua.h
/usr/local/include/luaconf.h
/usr/local/include/luajit-2.0/lauxlib.h
/usr/local/include/luajit-2.0/lua.h
/usr/local/include/luajit-2.0/luaconf.h
/usr/local/include/luajit-2.0/luajit.h
/usr/local/include/luajit-2.0/lualib.h
/usr/local/include/lualib.h

Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
/usr/local/lib/libpcre.la
/usr/local/lib/libpcrecpp.la
/usr/local/lib/libpcreposix.la

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
/usr/local/lib/pkgconfig/luajit.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
/usr/local/lib/liblua.a
/usr/local/lib/libluajit-5.1.a
Error: Calling Formula.sha1 is disabled!
Use Formula.sha256 instead.
/usr/local/Homebrew/Library/Taps/twitch/homebrew-internal/Formula/libphutil.rb:7:in <class:Libphutil>' Please report this to the twitch/internal tap! Please report this bug: https://git.io/brew-troubleshooting /usr/local/Homebrew/Library/Homebrew/utils.rb:86:in odeprecated'
/usr/local/Homebrew/Library/Homebrew/utils.rb:94:in odisabled' /usr/local/Homebrew/Library/Homebrew/compat/sha1.rb:3:in sha1'
/usr/local/Homebrew/Library/Taps/twitch/homebrew-internal/Formula/libphutil.rb:7:in <class:Libphutil>' /usr/local/Homebrew/Library/Taps/twitch/homebrew-internal/Formula/libphutil.rb:3:in load_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:25:in module_eval' /usr/local/Homebrew/Library/Homebrew/formulary.rb:25:in load_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:42:in load_formula_from_path' /usr/local/Homebrew/Library/Homebrew/formulary.rb:97:in load_file'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:88:in klass' /usr/local/Homebrew/Library/Homebrew/formulary.rb:84:in get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:201:in get_formula' /usr/local/Homebrew/Library/Homebrew/formulary.rb:241:in factory'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:272:in from_keg' /usr/local/Homebrew/Library/Homebrew/formulary.rb:255:in from_rack'
/usr/local/Homebrew/Library/Homebrew/diagnostic.rb:1004:in block in check_for_unlinked_but_not_keg_only' /usr/local/Homebrew/Library/Homebrew/diagnostic.rb:1001:in reject'
/usr/local/Homebrew/Library/Homebrew/diagnostic.rb:1001:in check_for_unlinked_but_not_keg_only' /usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:43:in block in doctor'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:35:in each' /usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:35:in doctor'
/usr/local/Homebrew/Library/Homebrew/brew.rb:94:in `

'
mbp 11:55:09 /usr/local/Homebrew $ brew config
HOMEBREW_VERSION: 1.1.1-31-g7853406
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 7853406
Last commit: 4 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: ee95c02
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.0.0-p481
Clang: 7.0 build 700
Git: 2.10.1 => /usr/local/bin/git
Perl: /Users/noah/perl5/perlbrew/perls/perl-5.16.0/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_112, 1.7.0_79
macOS: 10.10.5-x86_64
Xcode: 7.2
CLT: 7.2.0.0.1.1447826929
X11: 2.7.9 => /opt/X11

@woodruffw
Copy link
Member

AFAIK, Homebrew is no longer supporting sha1 in the formula DSL for either core or external taps. The best way to get rid of this error is to upgrade your internal tap's formulae to use sha256 instead.

@woodruffw
Copy link
Member

See Homebrew/brew#1451.

@noahwallach
Copy link
Author

I read the above link and was unable to find clear instructions on how to upgrade my internal tap's formulae to use sha256 instead. How is that done?

@woodruffw
Copy link
Member

woodruffw commented Nov 18, 2016

You should see a line like

sha1 "long-hexdecimal-string"

in the failing formula. That needs to be replaced with

sha256 "even-longer-hex-string"

You can generate the latter via a command-line tool like sha256sum:

$ curl <your package source archive>
$ sha256sum your-package.tar.gz

Edit: I think we have a script that automagically migrates sha1 -> sha256. I'll link it here if I can find it.

@juliusakula
Copy link

for updating the internal tap, on a Mac, I used got the sha256 checksum via shasum -a 256 <file.tar> and updated the .rb file as mentioned in the comments above, replacing the old sha1 line.

@algorithmconquer
Copy link

I solved it by changing sha1 of boost.rb into sha256;Thank you!!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants