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

Add Linux binary to gopass formula in Homebrew Core #2325

Open
trallnag opened this issue Sep 3, 2022 · 12 comments · Fixed by #2327
Open

Add Linux binary to gopass formula in Homebrew Core #2325

trallnag opened this issue Sep 3, 2022 · 12 comments · Fixed by #2327

Comments

@trallnag
Copy link

trallnag commented Sep 3, 2022

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
Copy link
Author

trallnag commented Sep 3, 2022

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: Homebrew/homebrew-core#86422

@dominikschulz
Copy link
Member

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 added a commit to dominikschulz/gopass that referenced this issue Sep 4, 2022
gopass version might be run on an uninitialized instance (e.g. during
tests). We want to avoid the setup message there.

RELEASE_NOTES=[BUGFIX] Do not show setup message on version

Fixes gopasspw#2325

Signed-off-by: Dominik Schulz <[email protected]>
dominikschulz added a commit that referenced this issue Sep 4, 2022
gopass version might be run on an uninitialized instance (e.g. during
tests). We want to avoid the setup message there.

RELEASE_NOTES=[BUGFIX] Do not show setup message on version

Fixes #2325

Signed-off-by: Dominik Schulz <[email protected]>

Signed-off-by: Dominik Schulz <[email protected]>
@dominikschulz dominikschulz reopened this Sep 4, 2022
@dominikschulz
Copy link
Member

@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?

@trallnag
Copy link
Author

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

@dominikschulz
Copy link
Member

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.

@danielnachun
Copy link

There is an update for this: we have identified that the problem is caused by an issue specific to our build system: Homebrew/brew#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.

@dominikschulz
Copy link
Member

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

@dominikschulz
Copy link
Member

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.

@trallnag
Copy link
Author

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

@dominikschulz
Copy link
Member

#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
Copy link
Member

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

@trallnag
Copy link
Author

@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 Homebrew/homebrew-core#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 Homebrew/homebrew-core#163826?

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

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

Successfully merging a pull request may close this issue.

3 participants