Mercurial > logstash
annotate logstash.spec @ 15:c158cae7cd26
work on building from source
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 11 Apr 2013 10:18:06 -0700 |
parents | 0e45fe64b10d |
children | aa606d801e02 |
rev | line source |
---|---|
0 | 1 # prevent brp repack jar files |
2 %define __os_install_post %{nil} | |
3 | |
4 %define _bindir /usr/local/bin | |
5 | |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
6 Summary: logstash is a tool for managing events and logs. |
0 | 7 Name: logstash |
8 Version: 1.1.9 | |
14
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
9 Release: 0%{?dist} |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
10 License: Apache 2.0 |
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
11 Group: System Environment/Daemons |
0 | 12 URL: http://logstash.net/ |
13 BuildArch: noarch | |
15
c158cae7cd26
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
14
diff
changeset
|
14 #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
|
15 #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
|
16 Source0: %{name}-%{version}.tar.gz |
5 | 17 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
|
18 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
|
19 Source4: %{name}.Makefile |
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) |
15
c158cae7cd26
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
14
diff
changeset
|
28 Requires: logrotate httpd java-1.7.0-openjdk python-pip python-argparse python-ordereddict jruby |
0 | 29 Requires(pre): /usr/sbin/useradd |
30 Requires(pre): /usr/bin/getent | |
31 Requires(postun): /usr/sbin/userdel | |
32 Requires(post,preun): /sbin/chkconfig | |
33 Requires(post,preun): /sbin/service | |
14
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
34 BuildRequires: ragel jruby |
0 | 35 |
36 | |
37 %description | |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
38 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
|
39 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
|
40 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
|
41 for searching and drilling into all of your logs. |
0 | 42 |
43 | |
44 %prep | |
15
c158cae7cd26
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
14
diff
changeset
|
45 %setup -q |
0 | 46 |
47 | |
48 %build | |
15
c158cae7cd26
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
14
diff
changeset
|
49 gunzip -c %SOURCE2 >GeoLiteCity.dat |
14
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
50 make -f %SOURCE4 |
0 | 51 |
52 | |
53 %install | |
54 rm -rf $RPM_BUILD_ROOT | |
14
0e45fe64b10d
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
55 install -d $RPM_BUILD_ROOT/var/log/%{name} |
15
c158cae7cd26
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
14
diff
changeset
|
56 install -D -m 750 build/logstash.jar $RPM_BUILD_ROOT/%{_bindir}/%{name}.jar |
c158cae7cd26
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
14
diff
changeset
|
57 install -D -m 750 %SOURCE1 $RPM_BUILD_ROOT/%{_bindir}/logstash_index_cleaner.py |
c158cae7cd26
work on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
14
diff
changeset
|
58 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
|
59 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
|
60 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
|
61 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
|
62 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
|
63 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
|
64 install -D -m 640 %SOURCE22 $RPM_BUILD_ROOT/var/lib/%{name}/data/patterns/dnsbl |
0 | 65 |
66 | |
67 %pre | |
68 /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
|
69 pip-python install pyes || : |
0 | 70 |
71 | |
72 %post | |
73 /sbin/chkconfig --add %{name} | |
74 setfacl -m u:logstash:rx /var/log/httpd | |
75 setfacl -m u:logstash:r /var/log/messages | |
76 setfacl -m u:logstash:r /var/log/maillog | |
77 | |
78 | |
79 %preun | |
80 [ $1 = 0 ] && /sbin/service %{name} stop || : | |
81 [ $1 = 0 ] && /sbin/chkconfig --del %{name} || : | |
82 | |
83 | |
84 %postun | |
85 [ $1 = 0 ] && setfacl -x u:logstash /var/log/httpd || : | |
86 [ $1 = 0 ] && setfacl -x u:logstash /var/log/messages || : | |
87 [ $1 = 0 ] && setfacl -x u:logstash /var/log/maillog || : | |
88 [ $1 = 0 ] && userdel %{name} || : | |
89 | |
90 | |
91 %clean | |
92 rm -rf $RPM_BUILD_ROOT | |
93 | |
94 | |
95 %files | |
96 %defattr(-,root,root,-) | |
97 %attr(0750,%{name},root) %{_bindir}/* | |
6
ccedd213595c
cleanup rpmbuild warning
Carl Byington <carl@five-ten-sg.com>
parents:
5
diff
changeset
|
98 %dir %attr(0750,%{name},root) /etc/%{name} |
0 | 99 %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
|
100 %config(noreplace) %attr(0640,%{name},root) /etc/sysconfig/%{name} |
0 | 101 /etc/rc.d/init.d/%{name} |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
102 /etc/cron.daily/%{name} |
0 | 103 %dir %attr(0750,%{name},root) /var/log/%{name} |
104 %dir %attr(0750,%{name},root) /var/lib/%{name} | |
105 %dir %attr(0750,%{name},root) /var/lib/%{name}/data | |
106 %dir %attr(0750,%{name},root) /var/lib/%{name}/data/patterns | |
107 %config(noreplace) %attr(0640,%{name},root) /var/lib/%{name}/data/patterns/sendmail | |
108 %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
|
109 %config(noreplace) %attr(0640,%{name},root) /var/lib/%{name}/data/patterns/dnsbl |
0 | 110 |
111 | |
112 %changelog | |
5 | 113 * Fri Mar 22 2013 <carl@five-ten-sg.com> - 1.1.9-0 |
0 | 114 - Initial build. |
115 |