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

Homebrew error sha1 #570

Open
notorioushanz opened this issue Nov 18, 2016 · 8 comments · May be fixed by CenturyLinkLabs/panamax-coreos#95
Open

Homebrew error sha1 #570

notorioushanz opened this issue Nov 18, 2016 · 8 comments · May be fixed by CenturyLinkLabs/panamax-coreos#95

Comments

@notorioushanz
Copy link

Hi,

I have homebrew error each time i try to use it.

don't kow if it's related to panamax.

Error: Calling Formula.sha1 is disabled! Use Formula.sha256 instead. /Users/beatminer/Library/Caches/Homebrew/Formula/panamax.rb:7:in class:Panamax'
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' /Users/beatminer/Library/Caches/Homebrew/Formula/panamax.rb:7:in class:Panamax'
/Users/beatminer/Library/Caches/Homebrew/Formula/panamax.rb:4: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:241:in factory'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:269:in from_keg' /usr/local/Homebrew/Library/Homebrew/formulary.rb:255:in from_rack'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1364:in block in installed' /usr/local/Homebrew/Library/Homebrew/formula.rb:1362:in map'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1362:in installed' /usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:37:in upgrade'
/usr/local/Homebrew/Library/Homebrew/brew.rb:94:in <main>'

@ValeryNo
Copy link

Same here, couldn't install via brew:

$ brew --version
Homebrew 1.1.1
Homebrew/homebrew-core (git revision 3c62e; last commit 2016-11-20)

$ brew install http://download.panamax.io/installer/brew/panamax.rb
######################################################################## 100.0%
Error: Calling Formula.sha1 is disabled!
Use Formula.sha256 instead.
/Users/valery/Library/Caches/Homebrew/Formula/panamax.rb:7:in `<class:Panamax>'
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'
/Users/valery/Library/Caches/Homebrew/Formula/panamax.rb:7:in `<class:Panamax>'
/Users/valery/Library/Caches/Homebrew/Formula/panamax.rb:4: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:153: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:241:in `factory'
/usr/local/Homebrew/Library/Homebrew/extend/ARGV.rb:43:in `block in formulae'
/usr/local/Homebrew/Library/Homebrew/extend/ARGV.rb:41:in `map'
/usr/local/Homebrew/Library/Homebrew/extend/ARGV.rb:41:in `formulae'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:107:in `install'
/usr/local/Homebrew/Library/Homebrew/brew.rb:94:in `<main>'

@casualuser
Copy link

same here:

➜  ~ brew --version
Homebrew 1.1.1
Homebrew/homebrew-core (git revision 6058; last commit 2016-11-22)
➜  ~ brew install http://download.panamax.io/installer/brew/panamax.rb
Updating Homebrew...
######################################################################## 100.0%
Error: Calling Formula.sha1 is disabled!
Use Formula.sha256 instead.
/Users/proto/Library/Caches/Homebrew/Formula/panamax.rb:7:in `<class:Panamax>'
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'
/Users/proto/Library/Caches/Homebrew/Formula/panamax.rb:7:in `<class:Panamax>'
/Users/proto/Library/Caches/Homebrew/Formula/panamax.rb:4: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:153: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:241:in `factory'
/usr/local/Homebrew/Library/Homebrew/extend/ARGV.rb:43:in `block in formulae'
/usr/local/Homebrew/Library/Homebrew/extend/ARGV.rb:41:in `map'
/usr/local/Homebrew/Library/Homebrew/extend/ARGV.rb:41:in `formulae'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:107:in `install'
/usr/local/Homebrew/Library/Homebrew/brew.rb:94:in `<main>'

more of that it preventing me to use brew services list with same error

@roffe
Copy link

roffe commented Nov 24, 2016

MikeMcQuaid commented 16 days ago
As this issue is getting some traffic: quoting @bfontaine from #6693 (comment):

The use of sha1 was deprecated almost two years ago.

  1. In February 2015 brew audit --strict started to show a warning and we updated all docs to advise not to use sha1.
  2. In June 2015 brew audit started to show the warning even without --strict.
  3. In March 2016 brew started complaining about sha1 in formulae.
  4. We completely disabled it yesterday.

@bfontaine
Copy link

It is related to Panamax; the formula uses sha1; something Homebrew deprecated almost two years ago.

@chisNaN
Copy link

chisNaN commented Dec 7, 2016

+1
(if that was disable "only" 2 weeks ago one should expect a solution in the upcoming days¿)

@cleaner321
Copy link

cleaner321 commented Dec 12, 2016

I only changed the sha1 to the new sha256 version ...

  1. create a file called panamax.rb
  2. paste the code below
  3. serve it
  4. brew install http://LOCALHOST/panamax.rb && panamax init

require "formula"

class Panamax < Formula
homepage "http://www.panamax.io"
url "http://download.panamax.io/installer/panamax-0.6.5.tar.gz"
sha256 "b59f21e5a821a3886eab0e62f85fc89d8fedea6099b79d3447906dfc36d163d7"
def install
system "./configure", "--prefix=#{prefix}", "--var=#{var}/panamax"
system "make", "install"
resource("additional_files").stage { bin.install "panamaxcli-darwin" }
mv bin/"panamaxcli-darwin",bin/"pmxcli"
end

def caveats
"If upgrading the Panamax Installer, be sure to run 'panamax reinstall' to ensure compatibility with other Panamax components."
end

resource "additional_files" do
url "http://download.panamax.io/panamaxcli/panamaxcli-darwin"
sha256 "58bd24d40260e269105f21f58369a002b6ebb2d6877f7ac3ffa29e280ecc6007"
end

test do
assert File.exist?("#{prefix}/.panamax")
assert File.exist?("#{var}/panamax")
assert_match "#{version}", shell_output("#{prefix}/.panamax/panamax -v").strip
end
end

@bfontaine
Copy link

@cleaner321 You don’t need to do such complicated things; just paste this code in a file and run brew install ./panamax.rb.

@gcompson
Copy link

@cleaner321 @bfontaine Thanks, that works perfectly.

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

Successfully merging a pull request may close this issue.

8 participants