Talosctl: Make the binary available in Brew (osx)
patatman opened this issue · comments
Feature Request
Make the talosctl available in homebrew on OSX.
Description
It would be very easy to install for Mac users, so I recommend also adding it over there.
Users can then use a one-liner to install the CTL.
brew install talosctl
Information on homebrew: homepage
For adding a Tap: Create a tap
So maybe we could do this trough the Drone pipeline?
Maybe introduce an extra step in the notify pipeline section, since this is triggered when there is a new release.
I don't see a git plugin to clone and push a repo, so I guess we would have to do a exec?
Or am I missing something?
Isn't there a way to add the to brew in some official way?
@patatman I think you're idea is more/less what I had in mind too. An extra drone step that creates a PR with updated version and SHA to the homebrew repo when a release happens.
@andrewrynhard I don't think we want to go down the official route because they won't accept just plopping down a binary. They want you to compile from source to be accepted in the main repo. https://docs.brew.sh/Acceptable-Formulae#we-dont-like-binary-formulae
@rsmitty I created a fork: https://github.com/patatman/homebrew-talos
Just tested on Osx Catalina, but it seems OSX has some additional hardening done. It can't be executed when installed trough Brew.
It says the binary is from a unidentified developer.
Similar topic: hashicorp/terraform#23033
But other than this, it has the new version (0.5.0) of talosctl running. Untill we have a working automatic way, we might be able to PR this into the repo and get it working for now.
@patatman Yep, I think I ran into that the last time I updated things. I'm not sure there's a great way around it, but we'll have to do some research. If you want to PR your fork changes to get 0.5 released, that'd be awesome!
We might want to use https://github.com/mitchellh/gon for signing and notarizing talosctl
I don't think we want to go down the official route because they won't accept just plopping down a binary. They want you to compile from source to be accepted in the main repo. https://docs.brew.sh/Acceptable-Formulae#we-dont-like-binary-formulae
They would accept it to https://github.com/Homebrew/homebrew-cask though
It's kind of frustrating that go install github.com/siderolabs/talos/cmd/talosctl@latest
doesn't work. With that it would be rather easy to handle brew and other packaging systems. Are the replace
statements in go.mod
are really needed?
yes, they are required. see golang/go#44840
In general, git clone (or download release sources), followed by go build
should work, even though we recommend to download artifacts from our releases page.