annotate logstash.spec @ 27:76544ad0561d

switch kibana to ruby gem rather than jruby
author Carl Byington <carl@five-ten-sg.com>
date Mon, 06 May 2013 23:31:24 -0700
parents d058481276aa
children 01ebc38d772e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
1 # prevent brp repack jar files
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
2 %define __os_install_post %{nil}
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
3
3
796ac0b50dbf add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents: 2
diff changeset
4 Summary: logstash is a tool for managing events and logs.
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
5 Name: logstash
21
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
6 Version: 1.1.10
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
7 Release: 0%{?dist}
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents: 24
diff changeset
8
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents: 24
diff changeset
9 Group: System Environment/Daemons
3
796ac0b50dbf add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents: 2
diff changeset
10 License: Apache 2.0
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
11 URL: http://logstash.net/
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
12 BuildArch: noarch
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
13 #Source0: https://logstash.objects.dreamhost.com/release/%{name}-%{version}-monolithic.jar
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
14 #Source0: curl https://nodeload.github.com/logstash/logstash/tar.gz/v%{version} >logstash-%{version}.tar.gz
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
15 Source0: %{name}-%{version}.tar.gz
5
6b7beb807d14 add dnsbl patterns
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
16 Source1: https://logstash.jira.com/secure/attachment/12610/logstash_index_cleaner.py
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
17 Source2: http://logstash.objects.dreamhost.com/maxmind/GeoLite-City-2013-01-18.dat.gz
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
18 Source4: %{name}.Makefile
16
aa606d801e02 work on building from source, revert jruby and elastic search to versions bundled into logstash-monolith
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
19 Source5: %{name}.manifest
5
6b7beb807d14 add dnsbl patterns
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
20 Source10: %{name}.rc
6b7beb807d14 add dnsbl patterns
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
21 Source11: %{name}.cron
6b7beb807d14 add dnsbl patterns
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
22 Source12: %{name}.conf
11
4899fb1b3eb3 add sysconfig snippet to avoid modifying non-config files
Carl Byington <carl@five-ten-sg.com>
parents: 9
diff changeset
23 Source13: %{name}.sysconfig
5
6b7beb807d14 add dnsbl patterns
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
24 Source20: apache.pattern
6b7beb807d14 add dnsbl patterns
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
25 Source21: sendmail.pattern
6b7beb807d14 add dnsbl patterns
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
26 Source22: dnsbl.pattern
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
27 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents: 24
diff changeset
28
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents: 24
diff changeset
29 BuildRequires: ragel jruby java-devel
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents: 24
diff changeset
30
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents: 24
diff changeset
31 Requires: logrotate httpd java-devel python-pip python-argparse python-ordereddict
16
aa606d801e02 work on building from source, revert jruby and elastic search to versions bundled into logstash-monolith
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
32 Requires: jruby elasticsearch GraphTastic-client
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
33 Requires(pre): /usr/sbin/useradd
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
34 Requires(pre): /usr/bin/getent
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
35 Requires(postun): /usr/sbin/userdel
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
36 Requires(post,preun): /sbin/chkconfig
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
37 Requires(post,preun): /sbin/service
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
38
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
39
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
40 %description
3
796ac0b50dbf add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents: 2
diff changeset
41 logstash is a tool for managing events and logs. You can use it to
796ac0b50dbf add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents: 2
diff changeset
42 collect logs, parse them, and store them for later use (like, for
796ac0b50dbf add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents: 2
diff changeset
43 searching). Speaking of searching, logstash comes with a web interface
796ac0b50dbf add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents: 2
diff changeset
44 for searching and drilling into all of your logs.
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
45
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
46
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
47 %prep
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
48 %setup -q
24
0f249d38da21 jruby.spec needs /usr/share to match fedora jrudy location
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
49 sed -i -e 's,jarpath =.*,jarpath = "%{_javadir}/elasticsearch/*.jar",g' lib/logstash/outputs/elasticsearch.rb
0f249d38da21 jruby.spec needs /usr/share to match fedora jrudy location
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
50 sed -i -e 's,jarpath =.*,jarpath = "%{_javadir}/elasticsearch/*.jar",g' lib/logstash/outputs/elasticsearch_river.rb
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
51
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
52
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
53 %build
16
aa606d801e02 work on building from source, revert jruby and elastic search to versions bundled into logstash-monolith
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
54 cp %SOURCE5 .
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
55 gunzip -c %SOURCE2 >GeoLiteCity.dat
14
0e45fe64b10d work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 13
diff changeset
56 make -f %SOURCE4
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
57
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
58
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
59 %install
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents: 24
diff changeset
60 rm -rf $RPM_BUILD_ROOT
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents: 24
diff changeset
61 install -d $RPM_BUILD_ROOT/var/log/%{name}
24
0f249d38da21 jruby.spec needs /usr/share to match fedora jrudy location
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
62 install -D -m 750 build/logstash.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}.jar
0f249d38da21 jruby.spec needs /usr/share to match fedora jrudy location
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
63 install -D -m 750 %SOURCE1 $RPM_BUILD_ROOT/%{_javadir}/logstash_index_cleaner.py
15
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
64 install -D -m 755 %SOURCE10 $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
65 install -D -m 755 %SOURCE11 $RPM_BUILD_ROOT/etc/cron.daily/%{name}
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
66 install -D -m 640 %SOURCE12 $RPM_BUILD_ROOT/etc/%{name}/%{name}.conf
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
67 install -D -m 640 %SOURCE13 $RPM_BUILD_ROOT/etc/sysconfig/%{name}
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
68 install -D -m 640 %SOURCE20 $RPM_BUILD_ROOT/var/lib/%{name}/data/patterns/apache
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
69 install -D -m 640 %SOURCE21 $RPM_BUILD_ROOT/var/lib/%{name}/data/patterns/sendmail
c158cae7cd26 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 14
diff changeset
70 install -D -m 640 %SOURCE22 $RPM_BUILD_ROOT/var/lib/%{name}/data/patterns/dnsbl
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
71
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
72
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
73 %pre
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
74 /usr/bin/getent passwd %{name} >/dev/null || /usr/sbin/useradd -r -d /var/lib/%{name} -M -c "%{name} pseudo-user" %{name} >/dev/null
3
796ac0b50dbf add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents: 2
diff changeset
75 pip-python install pyes || :
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
76
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
77
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
78 %post
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
79 /sbin/chkconfig --add %{name}
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
80 setfacl -m u:logstash:rx /var/log/httpd
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
81 setfacl -m u:logstash:r /var/log/messages
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
82 setfacl -m u:logstash:r /var/log/maillog
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
83
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
84
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
85 %preun
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
86 [ $1 = 0 ] && /sbin/service %{name} stop || :
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
87 [ $1 = 0 ] && /sbin/chkconfig --del %{name} || :
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
88
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
89
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
90 %postun
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
91 [ $1 = 0 ] && setfacl -x u:logstash /var/log/httpd || :
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
92 [ $1 = 0 ] && setfacl -x u:logstash /var/log/messages || :
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
93 [ $1 = 0 ] && setfacl -x u:logstash /var/log/maillog || :
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
94 [ $1 = 0 ] && userdel %{name} || :
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
95
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
96
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
97 %clean
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
98 rm -rf $RPM_BUILD_ROOT
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
99
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
100
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
101 %files
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
102 %defattr(-,root,root,-)
24
0f249d38da21 jruby.spec needs /usr/share to match fedora jrudy location
Carl Byington <carl@five-ten-sg.com>
parents: 21
diff changeset
103 %attr(0750,%{name},root) %{_javadir}/*
6
ccedd213595c cleanup rpmbuild warning
Carl Byington <carl@five-ten-sg.com>
parents: 5
diff changeset
104 %dir %attr(0750,%{name},root) /etc/%{name}
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
105 %config(noreplace) %attr(0640,%{name},root) /etc/%{name}/%{name}.conf
11
4899fb1b3eb3 add sysconfig snippet to avoid modifying non-config files
Carl Byington <carl@five-ten-sg.com>
parents: 9
diff changeset
106 %config(noreplace) %attr(0640,%{name},root) /etc/sysconfig/%{name}
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
107 /etc/rc.d/init.d/%{name}
3
796ac0b50dbf add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents: 2
diff changeset
108 /etc/cron.daily/%{name}
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
109 %dir %attr(0750,%{name},root) /var/log/%{name}
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
110 %dir %attr(0750,%{name},root) /var/lib/%{name}
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
111 %dir %attr(0750,%{name},root) /var/lib/%{name}/data
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
112 %dir %attr(0750,%{name},root) /var/lib/%{name}/data/patterns
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
113 %config(noreplace) %attr(0640,%{name},root) /var/lib/%{name}/data/patterns/sendmail
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
114 %config(noreplace) %attr(0640,%{name},root) /var/lib/%{name}/data/patterns/apache
6
ccedd213595c cleanup rpmbuild warning
Carl Byington <carl@five-ten-sg.com>
parents: 5
diff changeset
115 %config(noreplace) %attr(0640,%{name},root) /var/lib/%{name}/data/patterns/dnsbl
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
116
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
117
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
118 %changelog
21
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
119 * Wed Apr 17 2013 <carl@five-ten-sg.com> - 1.1.10-0
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
120 - update to newer logstash
1d50b19beda0 work on building from source
Carl Byington <carl@five-ten-sg.com>
parents: 19
diff changeset
121
5
6b7beb807d14 add dnsbl patterns
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
122 * Fri Mar 22 2013 <carl@five-ten-sg.com> - 1.1.9-0
0
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
123 - Initial build.
df4952a2fb06 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
124