-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Conversation
Upgrades logstash formula to 1.4.0. Due to radical distribution changes upstream, we need to inreplace a few lines to get it to run from the Cellar.
|
All the installed files are as per upstream. Esp. logstash.lib.sh is I also disagree with the warning on the head URL, explicit is better than How would you suggest these be addressed? |
|
Upgrade logstash to 1.4.0 * added test suite, will test a simple log flow * added caveats with link to documentation for beginners * passes brew audit
|
||
def install | ||
libexec.install "logstash-#{version}-flatjar.jar" | ||
bin.write_jar_script libexec/"logstash-#{version}-flatjar.jar", "logstash" | ||
inreplace "bin/logstash", /^basedir=.*$/, "basedir=#{libexec}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first argument to inreplace can be a list:
inreplace %w{bin/logstash bin/logstash.lib.sh} ...
Let's use that since the replacements are the same in both of these files.
* KNF * remove EOF marker from second test to help build-bot parse it Build from --HEAD breaks homebrew downloading conventions a lot, so it was added then removed before commit. Upstream logstash needs work on their build system before we should consider it.
Due to violating the rule about not downloading anything (about 50 times over), I opted against adding build from --head to this commit. Its risky anyway as it worked twice and failed three times during testing due to bad timing with upstream FTBFS errors. If anyone cares, add a head url to the github repo and "system make test" in the install block before the inreplace call (wrap in testing for build.head etc.) - that'll get you most of the way. |
what about just downloading their precompiled tarball? https://download.elasticsearch.org/logstash/logstash/logstash-1.4.0.tar.gz they explained how to use it there: http://logstash.net/docs/1.4.0/release-notes |
The precompiled package is acceptable, it's basically what the old flatjar was doing. |
sounds good. I just pondered why 1.3.3 was still in brew and tried updating it by simply replacing the url to 1.4.0 - but frankly that didn't exist. Im utterly new to writing formulae. could you update that or give me some pointers on how Id get there? |
https://gist.github.com/FunTimeCoding/620bdc43e14cb4f22ad7 Ive written a launchd plist which currently works with 1.3.3, I noticed other packages have some placeholders there, but it can be reused. |
@FunTimeCoding But just because I don't think its useful, doesn't mean we shouldn't do it. If @adamv finds the last pull request acceptable than you may like to pull req your own plist on top of this... I just strongly recommend RunAtLoad be set false by default & extend the caveat section regarding letting the user change this after they write a config. |
I see. well you got a point that there may be various scenarios and topologies that can be built with Logstash, but isn't it also more straight forward to be presented with a generic configuration that can be adapted if so desired? a lower initial knowledge barrier is more likely to get people interested and digging deeper. |
That sounds like a good idea for a future improvement; we could e.g. index /var/log/*.log and setup the plist to run it on load; not conflicting on ports for the web interface would be much harder. |
I think this is good now; any objections (from people in this thread who use it?) Certainly future improvements are welcome. |
👍 for this please. |
no objections. whats next? |
Upgrades logstash formula to 1.4.0.
Due to radical distribution changes upstream, we need to inreplace a few lines
to get it to run from the Cellar.