changeset 16:aa606d801e02

work on building from source, revert jruby and elastic search to versions bundled into logstash-monolith
author Carl Byington <carl@five-ten-sg.com>
date Thu, 11 Apr 2013 13:48:24 -0700
parents c158cae7cd26
children 292b6583148a
files Makefile elasticsearch.spec jruby.spec logstash.Makefile logstash.rc logstash.spec
diffstat 6 files changed, 26 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Apr 11 10:18:06 2013 -0700
+++ b/Makefile	Thu Apr 11 13:48:24 2013 -0700
@@ -1,27 +1,33 @@
 d=el6
 f=logstash-1.1.9-monolithic.jar
-g=logstash-1.1.9.tar.gz
-h=elasticsearch-0.20.6.tar.gz
+gv=1.1.9
+g=logstash-$(gv).tar.gz
+hv=0.20.6
+hv=0.20.2
+h=elasticsearch-$(hv).tar.gz
 i=GraphTastic.tar.gz
 icc=06a620d011d08bd2c1099c0d0810c053bf105400
-j=jruby-complete-1.7.3.jar
+jv=1.7.3
+jv=1.7.1
+j=jruby-complete-$(jv).jar
 k=GeoLite-City-2013-01-18.dat.gz
+
 all:
 	[ -f $f ] || curl https://logstash.objects.dreamhost.com/release/$f >$f
-	[ -f $g ] || curl https://nodeload.github.com/logstash/logstash/tar.gz/v1.1.9 >$g
-	[ -f $h ] || curl https://nodeload.github.com/elasticsearch/elasticsearch/tar.gz/v0.20.6 >$h
+	[ -f $g ] || curl https://nodeload.github.com/logstash/logstash/tar.gz/v$(gv) >$g
+	[ -f $h ] || curl https://nodeload.github.com/elasticsearch/elasticsearch/tar.gz/v$(hv) >$h
 	[ -f $i ] || curl https://nodeload.github.com/NickPadilla/GraphTastic/tar.gz/$(icc) >$i
-	[ -f $j ] || curl http://repository.codehaus.org/org/jruby/jruby-complete/1.7.3/$j >$j
+	[ -f $j ] || curl http://repository.codehaus.org/org/jruby/jruby-complete/$(jv)/$j >$j
 	[ -f $k ] || curl http://logstash.objects.dreamhost.com/maxmind/$k >$k
 
-	#rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs jruby.spec
-	#rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild jruby-1.7.3-0.$d.src.rpm
+	rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs jruby.spec
+	rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild jruby-$(jv)-0.$d.src.rpm
 
-	#rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs GraphTastic-client.spec
-	#rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild GraphTastic-client-0.0.0-0.$d.src.rpm
+	rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs GraphTastic-client.spec
+	rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild GraphTastic-client-0.0.0-0.$d.src.rpm
 
-	#rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs elasticsearch.spec
-	#rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild elasticsearch-0.20.6-0.$d.src.rpm
+	rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs elasticsearch.spec
+	rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild elasticsearch-$(hv)-0.$d.src.rpm
 
 	rpmbuild --define "dist .$d" --define "_sourcedir $(shell pwd)" --define "_srcrpmdir $(shell pwd)" --define "_rpmdir $(shell pwd)" -bs logstash.spec
-	rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild logstash-1.1.9-0.$d.src.rpm
+	rpmbuild --define "dist .$d" --define "_rpmdir $(shell pwd)" --rebuild logstash-$(gv)-0.$d.src.rpm
--- a/elasticsearch.spec	Thu Apr 11 10:18:06 2013 -0700
+++ b/elasticsearch.spec	Thu Apr 11 13:48:24 2013 -0700
@@ -5,7 +5,7 @@
 
 Summary:        elasticsearch is a scalable full text search engine
 Name:           elasticsearch
-Version:        0.20.6
+Version:        0.20.2
 Release:        0%{?dist}
 Group:          System Environment/Daemons
 License:        Apache 2.0
--- a/jruby.spec	Thu Apr 11 10:18:06 2013 -0700
+++ b/jruby.spec	Thu Apr 11 13:48:24 2013 -0700
@@ -5,7 +5,7 @@
 
 Summary:        just enough jruby for el6 to get logstash running
 Name:           jruby
-Version:        1.7.3
+Version:        1.7.1
 Release:        0%{?dist}
 Group:          System Environment/Daemons
 License:        Apache 2.0
--- a/logstash.Makefile	Thu Apr 11 10:18:06 2013 -0700
+++ b/logstash.Makefile	Thu Apr 11 13:48:24 2013 -0700
@@ -51,7 +51,7 @@
 	rm -f build/monolith/META-INF/LICENSE.txt
 	cp $(GEOIP) build/monolith/
 	# build-logstash-jar
-	jar cfe build/logstash.jar logstash.runner       \
+	jar cfme build/logstash.jar logstash.manifest logstash.runner       \
 		-C build/ruby .								 \
 		-C build/monolith .							 \
 		-C vendor/bundle/jruby/1.9 gems				 \
--- a/logstash.rc	Thu Apr 11 10:18:06 2013 -0700
+++ b/logstash.rc	Thu Apr 11 13:48:24 2013 -0700
@@ -50,7 +50,6 @@
     cd $HOME
     pid=$(
     exec sudo -u logstash /bin/bash - <<EOF
-        export CLASSPATH=/usr/share/jruby.jar:/usr/local/bin/graphtastic-client.jar:/usr/local/bin/elasticsearch.jar
         $JAVA $ARGS &
         echo \$!
 EOF
--- a/logstash.spec	Thu Apr 11 10:18:06 2013 -0700
+++ b/logstash.spec	Thu Apr 11 13:48:24 2013 -0700
@@ -17,6 +17,7 @@
 Source1:        https://logstash.jira.com/secure/attachment/12610/logstash_index_cleaner.py
 Source2:        http://logstash.objects.dreamhost.com/maxmind/GeoLite-City-2013-01-18.dat.gz
 Source4:        %{name}.Makefile
+Source5:        %{name}.manifest
 Source10:       %{name}.rc
 Source11:       %{name}.cron
 Source12:       %{name}.conf
@@ -25,7 +26,8 @@
 Source21:       sendmail.pattern
 Source22:       dnsbl.pattern
 BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-Requires:       logrotate httpd java-1.7.0-openjdk python-pip python-argparse python-ordereddict jruby
+Requires:       logrotate httpd java-1.7.0-openjdk python-pip python-argparse python-ordereddict
+Requires:       jruby elasticsearch GraphTastic-client
 Requires(pre):          /usr/sbin/useradd
 Requires(pre):          /usr/bin/getent
 Requires(postun):       /usr/sbin/userdel
@@ -46,6 +48,7 @@
 
 
 %build
+cp %SOURCE5 .
 gunzip -c %SOURCE2 >GeoLiteCity.dat
 make -f %SOURCE4