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 wsk (OpenWhisk CLI binary) #30034

Closed
wants to merge 1 commit into from
Closed

Add wsk (OpenWhisk CLI binary) #30034

wants to merge 1 commit into from

Conversation

shaftoe
Copy link

@shaftoe shaftoe commented Feb 12, 2017

After making all changes to the cask:

  • brew cask audit --download {{cask_file}} is error-free.
  • brew cask style --fix {{cask_file}} reports no offenses.
  • The commit message includes the cask’s name and version: no version available, using :latest

Additionally, if adding a new cask:

  • Named the cask according to the token reference.
  • brew cask install {{cask_file}} worked successfully.
  • brew cask uninstall {{cask_file}} worked successfully. Caveat: asks for (sudo) password even though it should not be needed
  • Checked there are no open pull requests for the same cask.
  • Checked the cask was not already refused in closed issues.
  • Checked the cask is submitted to the correct repo.

@miccal
Copy link
Member

miccal commented Feb 12, 2017

This seems to be a CLI-only open-source tool. Please submit it first to Homebrew/core and only if they don’t accept it, submit here (linking back to the pull request where it was refused).

This policy is documented in faq/rejected_casks:

The app is both open-source and CLI-only (i.e. it only uses the binary artifact). In that case, and in the spirit of deduplication, submit it first to Homebrew/core. If it is rejected there, you may then try again in Homebrew-Cask (link us to the issue on Homebrew so we can see their reasoning for rejection).

@miccal miccal closed this Feb 12, 2017
@shaftoe
Copy link
Author

shaftoe commented Feb 12, 2017

@miccal all right, thanks for the explanation, will do

@shaftoe shaftoe deleted the wsk branch February 12, 2017 04:13
@shaftoe
Copy link
Author

shaftoe commented Feb 13, 2017

@miccal I've tried but it proved way too complex for what I was willing to invest in this. Plus, I don't see that much of a value to force the (Mac) user to install that big stack (Java, Docker, Gradle) in order to run a Go binary (downloading which is by the way the official and suggested way to install the software), so I ask you again to please consider this as a valid Cask formula.

Homebrew-core pull request here: Homebrew/homebrew-core#9879

Thank you!

@miccal
Copy link
Member

miccal commented Feb 13, 2017

Ping @vitorgalvao.

@MikeMcQuaid
Copy link
Member

@shaftoe It's not really open source software if it's too hard for anyone to build it. You won't find any Linux package manager that's just willing to redistribute an upstream binary as-is, either.

@shaftoe
Copy link
Author

shaftoe commented Feb 13, 2017

@MikeMcQuaid personally I don't think "easy to build" is a strict requirement to make a software "Open Source", but honestly I'm not really interested in neither building the tool from sources nor convincing package managers to ship that, I just want to have an easy way to drop the binary in my workstation's $PATH and given that I already use Homebrew Cask (between other tools) for this kind of task, I thought a new Cask formula could be a good fit instead of building my own solution, which also could benefits other OpenWhisk users too. I'm also already installing closed source software via Cask so I wasn't expecting this to be a problem. What is your suggestion?

@MikeMcQuaid
Copy link
Member

What is your suggestion?

You'll probably be unsurprised but disappointed to hear: get it building from source into Homebrew or creating your own tap instead. Thanks!

@shaftoe
Copy link
Author

shaftoe commented Feb 13, 2017

@MikeMcQuaid creating my own tap seems actually quite an easy and good-enough solution to me! Thank you for your help!

@shaftoe
Copy link
Author

shaftoe commented Feb 13, 2017

For the records: https://github.com/shaftoe/homebrew-wsk

@vitorgalvao
Copy link
Member

Considering the difficulties of building this from source and the dependencies it has (java), I’d be fine with adding this here.

It does need some depends_on and the removal of the uninstall (redundant).

@markusthoemmes
Copy link
Contributor

It's not dependend on Java, Gradle or Docker I think. It should be compilable using plain Go just fine.

@shaftoe
Copy link
Author

shaftoe commented Feb 13, 2017

@vitorgalvao thanks! I'll removeuninstall, but I think I'm not understanding the semantics of depends_on, because I don't know which dependencies are you referring to: the zip file contains a single Go binary compiled for MacOS which by design has no dependencies.

@markusthoemmes
Copy link
Contributor

markusthoemmes commented Feb 13, 2017

@shaftoe the source for it is plain Go though. OpenWhisk itself uses Scala and ships in Docker containers (thus the Java and Docker dependency). It should be manageable to build the CLI source using just Go though.

In theory: Replicating the steps done here should work: https://github.com/openwhisk/openwhisk/blob/master/tools/cli/Dockerfile

@shaftoe
Copy link
Author

shaftoe commented Feb 13, 2017

@markusthoemmes yes you're right, but I was just following the official docs on how to compile the source code for the CLI

@MikeMcQuaid
Copy link
Member

@vitorgalvao Up to you but I think you may well be opening a can of worms. It's always going to be harder to make a formula than a cask and I think it's a reasonable requirement that open source projects be buildable without too much effort


As a project management aside: this is somewhat an ideological thing that I think results in a better open source software ecosystem. Homebrew has done similarly with things that don't build without patching, don't build with clang, don't build without X11 etc. and this does seem to have had the effect of nudging upstreams in the right direction if they wish to support macOS. In this case, providing better and easier build instructions feels like a good, doable outcome of this gentle pressure.

@vitorgalvao
Copy link
Member

@MikeMcQuaid Agreed. We do tend to prefer that attitude as well (avoid workarounds, try to fix upstream first), so I see your point.

@Homebrew Homebrew locked and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants