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

Homebrew formula #169

Open
nitrocode opened this issue Jan 25, 2021 · 15 comments
Open

Homebrew formula #169

nitrocode opened this issue Jan 25, 2021 · 15 comments

Comments

@nitrocode
Copy link

Hi. I'd like to see a brew install parliament here. It would be nice to have in our brew arsenal along with policy_sentry and iam-policy-json-to-terraform.

Thanks for a nice script!

@0xdabbad00
Copy link
Collaborator

This had been raised in the past in #111

Basically, although it shouldn't be much work for me, the more work this project involves for me, especially outside of the core goals, the less likely it is to be well-maintained. So I'm going to close this, as won't fix/do.

@nitrocode
Copy link
Author

All the tickets shouldn't fall only upon your shoulders. That would defeat the purpose of an open source project.

Can't the ticket be left open for a future contributor ?

@kmcquade
Copy link
Contributor

@0xdabbad00 - I will say, for my other repos that use this approach... It's very much zero effort on the maintainer's part. When a new release is pushed, I don't have to do anything - it does it automagically. Personally, I've found that it significantly increases the user base of my tools.

I've done this for both Policy Sentry and Cloudsplaining. I would be happy to submit a PR that does the same for Parliament.

It basically just adds this on:

https://github.com/salesforce/policy_sentry/blob/master/.github/workflows/publish.yml#L65-L89

Let me know. Happy to submit a PR.

@0xdabbad00 0xdabbad00 reopened this Jan 25, 2021
@BastianZim
Copy link

Just to add, I would not go with the approach in #111 because it goes with a custom tap. The project should be popular enough to be added to homebrew core so there would be no extra work to the maintainers.
The only necessary upkeep is updating the formula which can be done by the community through brew bump-formula-pr or as outlined by @kmcquade.

@kmcquade
Copy link
Contributor

@BastianZim ... I mean, there is no work for the maintainers as-is in the approach outlined in #111. It just adds one command to the installation process for the user which is fine imho.

I'll just submit a PR to match the approach in #111. This will be simple.

@kmcquade
Copy link
Contributor

It would be nice to have in our brew arsenal along with policy_sentry and iam-policy-json-to-terraform.

@nitrocode - separately, I'd love to hear about this and how you are using these tools :). Feel free to ping me on Twitter or the Cloud security forum slack.

@BastianZim
Copy link

@kmcquade Yeah you‘re right, I just wanted to mention it in case @0xdabbad00 really doesn‘t want anything connected to the repo. That would‘ve been an approach for that case but using a tap is fine as well, when automating the updates.

Just out of interest though, any reason why you would not want to submit this directly to homebrew?

@kmcquade
Copy link
Contributor

kmcquade commented Jan 25, 2021

@BastianZim Uh, because I haven't submitted it directly to homebrew before and it was a copy/paste job from one of my OSS repos where I've done the automated custom homebrew tap before? 😁 lol

@BastianZim
Copy link

BastianZim commented Jan 25, 2021

@kmcquade Haha makes sense, I thought it was something with parliament itself.
Just as an FYI though, I started a discussion at homebrew to ask if this would be something they'd accept (Homebrew/discussions#613) since creating a formula is doable with poet but I'm not sure if they accept it since it's also a library.
So depending on the outcome, I'd volunteer to try to create a proper formula. But a custom tap might still be preferable because I have no idea how long that's gonna take me. 😅

@BastianZim
Copy link

BastianZim commented Jan 26, 2021

Was easier than expected, parliament is now available via the normal homebrew-core tab Homebrew/homebrew-core#69770
This is supported by the community and homebrew, so no involvement is required from the parliament maintainers.

@BastianZim
Copy link

BastianZim commented Jan 26, 2021

Since it's now available via the official tap, I'd suggest switching #170 to the official action: https://github.com/dawidd6/action-homebrew-bump-formula. @kmcquade Let me know if you'd like me to make a pr.
This should keep it automatically updated at all times, although a failure would mean that no one would be requested to fix it, except for the person whose token is used to initiate the pr.
So before implementing this, it would first need to be discussed, if that's acceptable/ if someone is willing to be the point-of-contact. If not, updating should be left to the community.

@nitrocode
Copy link
Author

I've used poet in the past for python formula and it worked out very well. The most difficult thing about adding official homebrew formula is coming up with a non --version test.

@BastianZim
Copy link

Haha true!
Have you tried yet if you can already download parliament using brew? I'm able to but it doesn't yet show up in their website search so just wanted to double check.

@nitrocode
Copy link
Author

Yes! It worked. I didn't realize it was already added. Thank you very much @BastianZim .

✗ brew install parliament
==> Downloading https://homebrew.bintray.com/bottles/parliament-1.3.1.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/8055e860ac18dc826c696a9a8f81360f9aef83f5118cadb4ab25139aae9f87f9?response-content-disposition=attachment%3Bfilename%3D%22parliament-1.3.1.catalina.bottle.tar.gz%22&Policy=ey
######################################################################## 100.0%
==> Pouring parliament-1.3.1.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/parliament/1.3.1: 1,792 files, 67.0MB

✗ which parliament
/usr/local/bin/parliament

@BastianZim
Copy link

Awesome, glad to hear!

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

Successfully merging a pull request may close this issue.

4 participants