CenturyLinkLabs / panamax-ui

The Web GUI for Panamax
http://panamax.io
Apache License 2.0
1.44k stars 151 forks source link

Homebrew error sha1 #570

Open notorioushanz opened 8 years ago

notorioushanz commented 8 years ago

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' 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:inodisabled' /usr/local/Homebrew/Library/Homebrew/compat/sha1.rb:3:in sha1' /Users/beatminer/Library/Caches/Homebrew/Formula/panamax.rb:7:in' /Users/beatminer/Library/Caches/Homebrew/Formula/panamax.rb:4:in load_formula' /usr/local/Homebrew/Library/Homebrew/formulary.rb:25:inmodule_eval' /usr/local/Homebrew/Library/Homebrew/formulary.rb:25:in load_formula' /usr/local/Homebrew/Library/Homebrew/formulary.rb:42:inload_formula_from_path' /usr/local/Homebrew/Library/Homebrew/formulary.rb:97:in load_file' /usr/local/Homebrew/Library/Homebrew/formulary.rb:88:inklass' /usr/local/Homebrew/Library/Homebrew/formulary.rb:84:in get_formula' /usr/local/Homebrew/Library/Homebrew/formulary.rb:241:infactory' /usr/local/Homebrew/Library/Homebrew/formulary.rb:269:in from_keg' /usr/local/Homebrew/Library/Homebrew/formulary.rb:255:infrom_rack' /usr/local/Homebrew/Library/Homebrew/formula.rb:1364:in block in installed' /usr/local/Homebrew/Library/Homebrew/formula.rb:1362:inmap' /usr/local/Homebrew/Library/Homebrew/formula.rb:1362:in installed' /usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:37:inupgrade' /usr/local/Homebrew/Library/Homebrew/brew.rb:94:in <main>'

ValeryNo commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

chisNaN commented 8 years ago

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

cleaner321 commented 7 years ago

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 commented 7 years ago

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

gcompson commented 7 years ago

@cleaner321 @bfontaine Thanks, that works perfectly.