Mercurial > logstash
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 |
rev | line source |
---|---|
0 | 1 # prevent brp repack jar files |
2 %define __os_install_post %{nil} | |
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 | 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 | 11 URL: http://logstash.net/ |
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 | 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 | 20 Source10: %{name}.rc |
21 Source11: %{name}.cron | |
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 | 24 Source20: apache.pattern |
25 Source21: sendmail.pattern | |
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 | 33 Requires(pre): /usr/sbin/useradd |
34 Requires(pre): /usr/bin/getent | |
35 Requires(postun): /usr/sbin/userdel | |
36 Requires(post,preun): /sbin/chkconfig | |
37 Requires(post,preun): /sbin/service | |
38 | |
39 | |
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 | 45 |
46 | |
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 | 51 |
52 | |
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 | 57 |
58 | |
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 | 71 |
72 | |
73 %pre | |
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 | 76 |
77 | |
78 %post | |
79 /sbin/chkconfig --add %{name} | |
80 setfacl -m u:logstash:rx /var/log/httpd | |
81 setfacl -m u:logstash:r /var/log/messages | |
82 setfacl -m u:logstash:r /var/log/maillog | |
83 | |
84 | |
85 %preun | |
86 [ $1 = 0 ] && /sbin/service %{name} stop || : | |
87 [ $1 = 0 ] && /sbin/chkconfig --del %{name} || : | |
88 | |
89 | |
90 %postun | |
91 [ $1 = 0 ] && setfacl -x u:logstash /var/log/httpd || : | |
92 [ $1 = 0 ] && setfacl -x u:logstash /var/log/messages || : | |
93 [ $1 = 0 ] && setfacl -x u:logstash /var/log/maillog || : | |
94 [ $1 = 0 ] && userdel %{name} || : | |
95 | |
96 | |
97 %clean | |
98 rm -rf $RPM_BUILD_ROOT | |
99 | |
100 | |
101 %files | |
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 | 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 | 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 | 109 %dir %attr(0750,%{name},root) /var/log/%{name} |
110 %dir %attr(0750,%{name},root) /var/lib/%{name} | |
111 %dir %attr(0750,%{name},root) /var/lib/%{name}/data | |
112 %dir %attr(0750,%{name},root) /var/lib/%{name}/data/patterns | |
113 %config(noreplace) %attr(0640,%{name},root) /var/lib/%{name}/data/patterns/sendmail | |
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 | 116 |
117 | |
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 | 122 * Fri Mar 22 2013 <carl@five-ten-sg.com> - 1.1.9-0 |
0 | 123 - Initial build. |
124 |