annotate logstash.Makefile @ 34:8ed811f9a0bd

update config files for 1.2.1 syntax changes
author Carl Byington <carl@five-ten-sg.com>
date Wed, 25 Sep 2013 15:09:22 -0700
parents 0faebb0b0fa4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
1 #
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
2 # fedora uses system jruby
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
3 # el6 uses minimal jruby.jar
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
4 #
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
5 VERSION=$(shell awk -F\" '/LOGSTASH_VERSION/ {print $$2}' lib/logstash/version.rb)
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
6
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
7 SYSJRUBY=$(shell which jruby 2>/dev/null)
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
8 ifeq ($(SYSJRUBY),)
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
9 JRUBY_CMD=java -jar /usr/share/jruby.jar
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
10 else
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
11 JRUBY_CMD=jruby
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
12 endif
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
13 WITH_JRUBY=$(JRUBY_CMD) -S
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
14 JRUBYC=$(WITH_JRUBY) jrubyc
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
15 GEOIP=GeoLiteCity.dat
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
16
13
c0150404962d start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
17 all:
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
18 # compile-grammer
33
0faebb0b0fa4 update to kibana 3, logstash 1.2.1, es 0.90.5
Carl Byington <carl@five-ten-sg.com>
parents: 30
diff changeset
19 # use the prebuild one, since we don't have tt command from treetop (yet?)
0faebb0b0fa4 update to kibana 3, logstash 1.2.1, es 0.90.5
Carl Byington <carl@five-ten-sg.com>
parents: 30
diff changeset
20 #touch lib/logstash/config/grammar.treetop # force rebuild
0faebb0b0fa4 update to kibana 3, logstash 1.2.1, es 0.90.5
Carl Byington <carl@five-ten-sg.com>
parents: 30
diff changeset
21 #make -C lib/logstash/config grammar.rb
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
22 # compile-runner
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
23 mkdir -p build/ruby
21
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
24 cd lib; $(JRUBYC) -t ../build/ruby logstash/runner.rb
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
25 # copy-ruby-files
21
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
26 rsync -a --include "*/" --include "*.rb" --exclude "*" ./lib/ ./test/ ./build/ruby
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
27 rsync -a ./spec ./build/ruby
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
28 rsync -a ./locales ./build/ruby
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
29 # Delete any empty directories copied by rsync.
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
30 find ./build/ruby -type d -empty -delete
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
31 # install-gems
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
32 mkdir -p vendor/bundle
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
33 GEM_HOME=./vendor/bundle/jruby/1.9/ GEM_PATH= $(JRUBY_CMD) --1.9 ./gembag.rb logstash.gemspec
21
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
34 # Purge old versions of gems installed because gembag doesn't do dependency resolution correctly
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
35 GEM_HOME=./vendor/bundle/jruby/1.9/ GEM_PATH= $(JRUBY_CMD) --1.9 -S gem uninstall addressable -v 2.2.8
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
36 # Purge any junk that fattens our jar without need!
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
37 rm -rf ./vendor/bundle/jruby/1.9/gems/riak-client-1.0.3/pkg
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
38 rm -rf ./vendor/bundle/jruby/1.9/gems/*/spec
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
39 rm -rf ./vendor/bundle/jruby/1.9/gems/*/test
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
40 # build-monolith
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
41 mkdir -p build/monolith/openssl
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
42 mkdir -p build/monolith/jopenssl
33
0faebb0b0fa4 update to kibana 3, logstash 1.2.1, es 0.90.5
Carl Byington <carl@five-ten-sg.com>
parents: 30
diff changeset
43 mkdir -p build/monolith/META-INF/services
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
44 # unpack all jars
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
45 find $$PWD/vendor/bundle -name '*.jar' | (cd build/monolith; xargs -n1 jar xf)
33
0faebb0b0fa4 update to kibana 3, logstash 1.2.1, es 0.90.5
Carl Byington <carl@five-ten-sg.com>
parents: 30
diff changeset
46 # Merge all service file in all 3rdparty jars
0faebb0b0fa4 update to kibana 3, logstash 1.2.1, es 0.90.5
Carl Byington <carl@five-ten-sg.com>
parents: 30
diff changeset
47 find $$PWD/vendor/bundle $$PWD/vendor/jar -name '*.jar' | xargs $(JRUBY_CMD) extract_services.rb -o build/monolith/META-INF/services
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
48 # copy openssl/lib/shared folders/files to root of jar - need this for openssl to work with JRuby
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
49 cp -r vendor/bundle/jruby/1.9/gems/jruby-openss*/lib/shared/openssl/* build/monolith/openssl
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
50 cp -r vendor/bundle/jruby/1.9/gems/jruby-openss*/lib/shared/jopenssl/* build/monolith/jopenssl
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
51 cp -r vendor/bundle/jruby/1.9/gems/jruby-openss*/lib/shared/openssl.rb build/monolith/openssl.rb
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
52 # purge any extra files we don't need in META-INF (like manifests and signature files)
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
53 rm -f build/monolith/META-INF/*.LIST
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
54 rm -f build/monolith/META-INF/*.MF
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
55 rm -f build/monolith/META-INF/*.RSA
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
56 rm -f build/monolith/META-INF/*.SF
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
57 rm -f build/monolith/META-INF/NOTICE
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
58 rm -f build/monolith/META-INF/NOTICE.txt
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
59 rm -f build/monolith/META-INF/LICENSE
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
60 rm -f build/monolith/META-INF/LICENSE.txt
30
f2691b83bafa update to ES 0.90.0 and logstash 1.1.12
Carl Byington <carl@five-ten-sg.com>
parents: 23
diff changeset
61 mkdir -p build/monolith/vendor/ua-parser
f2691b83bafa update to ES 0.90.0 and logstash 1.1.12
Carl Byington <carl@five-ten-sg.com>
parents: 23
diff changeset
62 cp regexes.yaml build/monolith/vendor/ua-parser
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
63 cp $(GEOIP) build/monolith/
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
64 # build-logstash-jar
21
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
65 jar cfme build/logstash.jar logstash.manifest logstash.runner \
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
66 -C build/ruby . \
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
67 -C build/monolith . \
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
68 -C vendor/bundle/jruby/1.9 gems \
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
69 -C vendor/bundle/jruby/1.9 specifications \
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
70 -C lib logstash/certs \
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
71 patterns
21
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
72