Updating Syft and Grype formulas #4759
Replies: 1 comment
-
General guidance for writing formulae can be found at https://docs.brew.sh/Formula-Cookbook. Not every piece of information is available there, though.
Yes, it would be accessible through ldflags = %W[
-s -w
-X github.com/docker/buildx/version.Version=v#{version}
-X github.com/docker/buildx/version.Revision=#{Utils.git_head}
]
system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/buildx"
Usually, tarball downloads are preferred over git clones, because the former is more efficient. However, we're fine with git clones if the necessity is justified.
By "something automated" you may be referring to
Modifications like that would not affect |
Beta Was this translation helpful? Give feedback.
-
Output of
brew config
Output of
brew doctor
Description of issue
First of all -- thank you for including Syft and Grype in the main Homebrew, it is very much appreciated!
I noticed that not all the build flags are being set (as opposed to what's in our build process) and a couple have different values than we use when creating our own binaries. For example, the
syft version
output from the latest brew release is:whereas the Syft binary we release has different build flags, which include more/different information:
The main differences of consequence:
Homebrew
(in grype this isbrew
)Is there a way to add/update this information?
I am unfamiliar with writing formulae, and couldn't find any documentation if some of these variables might happen to be available. I suspect there isn't a git checkout because it looks like the code is downloaded as a
.tar.gz
from the github release, so as it's written perhaps this information isn't available. If that's the case, would this be available if the code is checked out from git like this?I'm also a bit unclear how this formula gets updated, I suspect there's something automated that does it, but I couldn't find this with a cursory search. I suspect if there were changes, this automation would also need to get updated?
I would be happy to make pull requests for this if someone would be able to help me understand what changes to make!
Beta Was this translation helpful? Give feedback.
All reactions