gopass icon indicating copy to clipboard operation
gopass copied to clipboard

Add Linux binary to gopass formula in Homebrew Core

Open trallnag opened this issue 2 years ago • 12 comments

The Gopass documentation points out installation via Homebrew if you are on Mac. In general, Homebrew also supports Linux (see this for more). But at the moment it is not possible to install gopass with Homebrew on Linux, because the formula is missing a bottle for Linux.

bottle do
  sha256 cellar: :any_skip_relocation, arm64_monterey: "1052163e1e32938898a794abb1fe90ff4454f7dddcb8930b3d0c3f78bc2533c6"
  sha256 cellar: :any_skip_relocation, arm64_big_sur:  "b16b4fcabf382b8b424f9f15ff24f9d2fbea5b4a9edb85c9f637ea69a89e93d7"
  sha256 cellar: :any_skip_relocation, monterey:       "6abbdaa26aa3fefd2b111f7211978136d87f39f39879282049cbc5fa7f839dec"
  sha256 cellar: :any_skip_relocation, big_sur:        "934ec918fa0c62dd83ed7c22bad69556d9a554b7fad645b9bafe6100c9cd215f"
  sha256 cellar: :any_skip_relocation, catalina:       "33164cc6369b06bc50ea6dc5bac4005e9669c5d0a78d33107b359f2a87a8fd18"
end

An entry for x86_64_linux is missing.

Here is a link to the gopass formula: https://github.com/Homebrew/homebrew-core/blob/master/Formula/gopass.rb

Here is a link to the age formula where Linux bottle is included: https://github.com/Homebrew/homebrew-core/blob/master/Formula/age.rb

References

trallnag avatar Sep 03 '22 17:09 trallnag

Currently the Linux build / test is failing: https://github.com/Homebrew/homebrew-core/actions/runs/2984525896

Gopass is listed on the issue where problematic formulaes are collected: https://github.com/Homebrew/homebrew-core/issues/86422

trallnag avatar Sep 03 '22 21:09 trallnag

Thanks. I find the test output somewhat hard to read, but I think it's failing here.

Maybe it's being tripped by the setup message that's prepended when gopass isn't set up?

Trying to suppress that for the gopass version invocation (only).

dominikschulz avatar Sep 04 '22 19:09 dominikschulz

@trallnag This might have been fixed with 1.14.6 but I don't know how to find gopass in the homebrew build logs. Can you check if it's still failing?

dominikschulz avatar Sep 18 '22 12:09 dominikschulz

It is still failing.

  • I managed to find the logs by first looking at the Git history of the gopass formula. Link.
  • The second last commit contains a reference to PR. Link.
  • In the pull request I can now see the related runs / actions by clicking on "Checks" and "Files changed".

Run: https://github.com/Homebrew/homebrew-core/actions/runs/3032107407

Job that contains the failed test: https://github.com/Homebrew/homebrew-core/actions/runs/3032107407/jobs/4879457874

image

trallnag avatar Sep 18 '22 14:09 trallnag

Thanks for checking. But I'm afraid I don't understand these ruby tests. I don't know how to get more information out of them.

There is no obvious failure.

dominikschulz avatar Sep 18 '22 14:09 dominikschulz

There is an update for this: we have identified that the problem is caused by an issue specific to our build system: https://github.com/Homebrew/brew/issues/13922. Although it was originally identified in Qt, it's not specific to it. The root cause of the problem is probably some bugs in our binary relocation patcher. We have a fix in the works that will hopefully resolve this soon - feel free to follow the discussion in that issue for updates.

danielnachun avatar Oct 04 '22 02:10 danielnachun

Thanks a lot for the update. We'll follow that issue and close this one if your fix resolves the failure.

dominikschulz avatar Oct 04 '22 10:10 dominikschulz

The mentioned issue was closed but we still don't seem to have gopass bottles. Not sure what's going on over there, but the homebrew build system is quite complex.

Error: docker://ghcr.io/homebrew/core/gopass:1.14.11 inspection returned an error!
time="2022-11-25T15:04:56Z" level=fatal msg="Error parsing image name \"docker://ghcr.io/homebrew/core/gopass:1.14.11\": pinging container registry ghcr.io: invalid status code from registry 503 (Service Unavailable)"

This doesn't sound like an obvious gopass issue to me, but maybe it's just hiding the real failure.

dominikschulz avatar Nov 26 '22 09:11 dominikschulz

Yeah, to me it looks like the problem has not changed: https://github.com/Homebrew/homebrew-core/actions/runs/3548346572/jobs/5959534648

image

Let's hope Homebrew experts will find a solution once time permits

trallnag avatar Nov 26 '22 14:11 trallnag

https://github.com/gopasspw/gopass/pull/2468 has simplified gopass version a lot. So in case this is indeed somehow related to our implementation we should try again after 1.15.2 is out.

dominikschulz avatar Dec 13 '22 08:12 dominikschulz

@trallnag Do you happen to know if this is still an issue today?

dominikschulz avatar Mar 31 '24 14:03 dominikschulz

@dominikschulz, it is. The test is still failing: https://github.com/Homebrew/homebrew-core/actions/runs/8315574963/job/22754103046

==> brew test --verbose gopass
==> FAILED
Full test gopass output
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/bin/bundle clean
  ==> Testing gopass
  ==> /home/linuxbrew/.linuxbrew/Cellar/gopass/1.15.12/bin/gopass version
  
  Error: gopass: failed
  An exception occurred within a child process:
    Minitest::Assertion: Expected: 0
    Actual: nil
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.3/lib/minitest/assertions.rb:183:in `assert'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.1.0/gems/minitest-5.22.3/lib/minitest/assertions.rb:223:in `assert_equal'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_assertions.rb:26:in `shell_output'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/g/gopass.rb:30:in `block in <class:Gopass>'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2599:in `block (3 levels) in run_test'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/kernel.rb:495:in `with_env'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2598:in `block (2 levels) in run_test'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1064:in `with_logging'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2597:in `block in run_test'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:75:in `block in run'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:75:in `chdir'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:75:in `run'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2884:in `mktemp'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2591:in `run_test'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/test.rb:[46](https://github.com/Homebrew/homebrew-core/actions/runs/8315574963/job/22754103046#step:4:47):in `block in <main>'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:107:in `block in timeout'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `block in catch'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `catch'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:36:in `catch'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/timeout.rb:123:in `timeout'
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/test.rb:[50](https://github.com/Homebrew/homebrew-core/actions/runs/8315574963/job/22754103046#step:4:51):in `<main>'

The issue https://github.com/Homebrew/homebrew-core/issues/86422 contains the following:

only fails in CI, probably because of a patchelf.rb bug

By now the linked issue has been closed due to staleness.

Maybe related to https://github.com/Homebrew/homebrew-core/issues/163826?

Nevertheless, this does not seem to be a problem in this projects source code (if I take the quoted comment at face value).

trallnag avatar Mar 31 '24 22:03 trallnag