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

can't brew install 0.3.0 on mac #203

Closed
wagdez opened this issue Nov 9, 2020 · 6 comments
Closed

can't brew install 0.3.0 on mac #203

wagdez opened this issue Nov 9, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@wagdez
Copy link

wagdez commented Nov 9, 2020

What happened:
I ran
brew tap anchore/grype
and then
brew install grype
I got

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 3 formulae.
==> Updated Casks
julia mater

==> Installing grype from anchore/grype
==> Downloading https://github.com/anchore/grype/releases/download/v0.3.0/grype_0.3.0_darwin_amd64.tar.gz
##O#- #
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "grype"
Download failed: https://github.com/anchore/grype/releases/download/v0.3.0/grype_0.3.0_darwin_amd64.tar.gz
What you expected to happen:
grype installed
How to reproduce it (as minimally and precisely as possible):
brew tap anchore/grype
and then
brew install grype
Anything else we need to know?:

Environment:

  • Output of grype version:
  • OS (e.g: cat /etc/os-release or similar):
@wagdez wagdez added the bug Something isn't working label Nov 9, 2020
@luhring
Copy link
Contributor

luhring commented Nov 9, 2020

Hey @wagdez — good find! That's no good. We'll look into this.

It seems like it's just the brew install method that's not working. For now, using the "recommended" installation should work.

For example:

curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin

And you can also find any release's downloadable assets at the Releases page.

We recently revised our release process to account for macOS Catalina's strengthened security requirements for software (see more at: https://support.apple.com/en-us/HT202491). It looks like we missed the homebrew method.

@luhring luhring changed the title can't install 0.3.0 on mac can't brew install 0.3.0 on mac Nov 9, 2020
@luhring luhring self-assigned this Nov 10, 2020
@poikilotherm
Copy link

Hi!
I created https://github.com/poikilotherm/asdf-grype a few days ago, which is breaking without the tarball, too.
Thank you for already looking into this!

@luhring
Copy link
Contributor

luhring commented Nov 12, 2020

Hi @wagdez, we now expect the brew install ... path to be fully working again. Give it a try and let us know if you're still having any issues. (This install path now uses a .zip file instead of a .tar.gz file.)

@luhring
Copy link
Contributor

luhring commented Nov 12, 2020

@poikilotherm Hey there! That's so cool you've created an asdf plugin!!!

We now have .zip and .dmg files for all grype (and syft) releases. The reason behind these particular format choices is that these formats support the Apple notarization process that's now required by macOS (at least, without introducing any kludgy workarounds). Unfortunately, .tar.gz isn't an option for this process, so we won't be publishing any more .tar.gz files for macOS going forward.

This means we have two options for the installation script:

  1. Retrieve the .zip file and run unzip to get the grype binary.
  2. Retrieve the .dmg file and run hdiutil to get the grype binary.

An example of the second option can be found in the install.sh script we provide at the root of our repositories, which is our recommended installation path for users. For macOS users, this script retrieves the .dmg file and then temporarily mounts the disk image in order to copy the binary to the intended destination path (check out these lines for the details).

At the same time, some folks might find the .zip method more approachable since it avoids a filesystem mount.

Let me know if you want to talk further or collaborate on a PR for your repository. I'll go ahead and close this issue now that homebrew installation is fixed.

@luhring luhring closed this as completed Nov 12, 2020
@wagde-orca
Copy link

Hi @wagdez, we now expect the brew install ... path to be fully working again. Give it a try and let us know if you're still having any issues. (This install path now uses a .zip file instead of a .tar.gz file.)

@luhring thanx so much. Works perfect

@poikilotherm
Copy link

Thanks @luhring I just added the support for the ZIP file to the ASDF plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants