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

Cassandra-reaper 1.3.0 (new formula) #31532

Merged
merged 14 commits into from
Feb 9, 2019
Merged

Cassandra-reaper 1.3.0 (new formula) #31532

merged 14 commits into from
Feb 9, 2019

Conversation

kotaroyamazaki
Copy link
Contributor

@kotaroyamazaki kotaroyamazaki commented Aug 28, 2018

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • [] Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

Since this formula produce cross-platform binaries (Java), it does not use brew install --build-from-source <formula>.

The inline patch is temporary to update the 'cassandra-reaper' script for brew.
Since PR thelastpickle/cassandra-reaper#533 is merged, it will be obsolete once next version is released.

@BrewTestBot
Copy link
Member

  • Formulae should not require patches to build. Patches should be submitted and accepted upstream first.

@DomT4 DomT4 added new formula PR adds a new formula to Homebrew/homebrew-core audit failure CI fails while auditing the software labels Aug 28, 2018
@muru
Copy link

muru commented Aug 29, 2018

@DomT4 (cc: @BrewTestBot - not sure who that goes to) Is the presence of a patch a hard blocker against the inclusion of a new formula? The patch has already been accepted upstream prior to this PR (in fact the link to the patch is from the upstream commit). But it's not clear when the next release will be and the fix seems to be too minor to warrant a new point release by itself.

@SMillerDev
Copy link
Member

BrewTestBot is a... Bot. It'll just ignore you 😄. As for the patch, I'd say it's less problematic because it's already accepted upstream.

There is a lot of mention of "for homebrew" in the formula though, which I think is kind of implied in a homebrew formula. (For example in the description) could you remove those descriptions?

@kotaroyamazaki
Copy link
Contributor Author

Thanks for the feedback, I have re-pushed with those changes.


def install
prefix.install "bin"
mv "server/target", "cassandra-reaper"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems these are jar files, those are usually packed in libexec for homebrew.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these are jar files.
I think it is no problem because those in the other package of casssandra-reaper are also packed in share.

@DomT4
Copy link
Contributor

DomT4 commented Aug 29, 2018

BrewTestBot is a... Bot. It'll just ignore you 😄

To be fair I do a fair bit of talking to the bot 😆.

I think we can live without the patch though because, well, it doesn't actually fix the whole Homebrew problem because it assumes HOMEBREW_PREFIX == /usr/local, and that's not something we mandate. It looks like we could write an env wrapper around cassandra-reaper to set CLASS_PATH and CONFIG_PATH ourselves? In which case that would be the avenue to go down.

@muru
Copy link

muru commented Aug 29, 2018

Would a wrapper like the one in Formula/hornetq.rb be acceptable?

@DomT4
Copy link
Contributor

DomT4 commented Aug 29, 2018

This style of syntax is slightly cleaner & should work fine:

env = {
  :PATH => "#{libexec}/vendor/bin:$PATH",
  :PYTHONPATH => ENV["PYTHONPATH"],
}
bin.env_script_all_files(libexec/"bin", env)

If there are multiple files in that directory and you only need to script one you can use write_env_script instead of env_script_all_files. There's a good example of that in corsixth.

@kotaroyamazaki
Copy link
Contributor Author

kotaroyamazaki commented Aug 30, 2018

@DomT4
Thanks for the feedback.
But I think it is difficult, because the script 'cassandra-reaper' inserts CONFIG_PATH and CLASS_PATH directly.
So even if we set environment path, it seems to be rewritten when cassandra-reaper is executed.
Or may I misunderstand something about how to use write_env_script?

@kotaroyamazaki
Copy link
Contributor Author

kotaroyamazaki commented Sep 1, 2018

@DomT4
I'm sorry, I misunderstand your mention a little and I've tried it.
About CLASS_PATH, we can set env using write_env_script.

About CONFIG_PATH, there is a problem.
cassandra-reaper script about CLASS_PATH is written followed .

if [ $# -eq 0 ]; then
    CONFIG_PATH="/etc/cassandra-reaper/cassandra-reaper.yaml"
  else
    CONFIG_PATH="$@"

Because of such condition, if not have argument it set automatically.
We can modify the condition and PR, but it means to need patch...
Do you have any idea?

@DomT4
Copy link
Contributor

DomT4 commented Sep 1, 2018

Do you have any idea?

Does it work if we inreplace <path/to/cassandra-reaper>, "etc", etc?

That would replace the /etc with HOMEBREW_PREFIX/etc, usually /usr/local/etc.

@kotaroyamazaki
Copy link
Contributor Author

@DomT4
Thanks for great advice.
I've fixed and made it work without a patch.

@kotaroyamazaki
Copy link
Contributor Author

@DomT4
PTAL at the last commit.

def install
prefix.install "bin/cassandra-reaper"
mv "server/target", "cassandra-reaper"
share.install "cassandra-reaper"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combine this line & the line above into:

pkgshare.install "server/target" => "cassandra-reaper"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With such a description, the path of the jar file will change and it will not work.

@DomT4 DomT4 removed the audit failure CI fails while auditing the software label Sep 7, 2018
@kotaroyamazaki
Copy link
Contributor Author

kotaroyamazaki commented Sep 7, 2018

@DomT4
Thank you for the great review. I've re-pushed with those changes.
Please check this.

@kotaroyamazaki
Copy link
Contributor Author

@DomT4
PTAL at the last commit.

@stale stale bot removed the stale No recent activity label Oct 31, 2018
@kotaroyamazaki
Copy link
Contributor Author

Thanks @muru.
I've update for a new release.
And confirmed that it passes brew test and brew audit --strict.
If there is no problem, please merge.

@kotaroyamazaki kotaroyamazaki changed the title Cassandra-reaper 1.2.2 (new formula) Cassandra-reaper 1.3.0 (new formula) Oct 31, 2018
@kotaroyamazaki
Copy link
Contributor Author

@SMillerDev
PTAL at the last commit.
It is seemed to be solved all problems.

@stale
Copy link

stale bot commented Dec 11, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale No recent activity label Dec 11, 2018
@kotaroyamazaki
Copy link
Contributor Author

Is there no reviewer for this ... ?

@stale stale bot removed the stale No recent activity label Dec 13, 2018
@SMillerDev
Copy link
Member

@BrewTestBot test this please!

@SMillerDev
Copy link
Member

If it produces java files you need to define a Java version it depends on.

@javian javian added the almost there PR is nearly ready to merge label Dec 24, 2018
@javian
Copy link
Contributor

javian commented Dec 25, 2018

They seem to be using 1.8 on Travis

jdk:
- oraclejdk8

so either add depends_on :java => "1.8" or depends_on :java => "1.8+"

@kotaroyamazaki
Copy link
Contributor Author

@SMillerDev @javian
Thank you for the great review. I've re-pushed with those changes.
Please check this.

@claui claui added the needs response Needs a response from the issue/PR author label Jan 18, 2019
@stale
Copy link

stale bot commented Feb 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale No recent activity label Feb 8, 2019
@stale stale bot removed the stale No recent activity label Feb 8, 2019
@fxcoudert fxcoudert added ready to merge PR can be merged once CI is green and removed almost there PR is nearly ready to merge needs response Needs a response from the issue/PR author labels Feb 8, 2019
@fxcoudert
Copy link
Member

Thanks @kotaroyamazaki for your contribution to Homebrew!

@fxcoudert fxcoudert merged commit da249b3 into Homebrew:master Feb 9, 2019
@lock lock bot added the outdated PR was locked due to age label Mar 12, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new formula PR adds a new formula to Homebrew/homebrew-core outdated PR was locked due to age ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants