Mercurial > logstash
annotate logstash.spec @ 7:e4ba03940224
fix startup script
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 22 Mar 2013 10:50:16 -0700 |
parents | ccedd213595c |
children | 786f4376ac99 |
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 | |
9 Release: 0 | |
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 | |
2
9e0cdf091b8a
switch back to monolithic - the flatjar version fails
Carl Byington <carl@five-ten-sg.com>
parents:
1
diff
changeset
|
14 Source0: https://logstash.objects.dreamhost.com/release/%{name}-%{version}-monolithic.jar |
5 | 15 Source1: https://logstash.jira.com/secure/attachment/12610/logstash_index_cleaner.py |
2
9e0cdf091b8a
switch back to monolithic - the flatjar version fails
Carl Byington <carl@five-ten-sg.com>
parents:
1
diff
changeset
|
16 #ource0: http://logstash.objects.dreamhost.com/release/%{name}-%{version}-flatjar.jar |
5 | 17 Source10: %{name}.rc |
18 Source11: %{name}.cron | |
19 Source12: %{name}.conf | |
20 Source20: apache.pattern | |
21 Source21: sendmail.pattern | |
22 Source22: dnsbl.pattern | |
23 Requires: logrotate httpd java-1.7.0-openjdk python-pip python-argparse python-ordereddict | |
0 | 24 Requires(pre): /usr/sbin/useradd |
25 Requires(pre): /usr/bin/getent | |
26 Requires(postun): /usr/sbin/userdel | |
27 Requires(post,preun): /sbin/chkconfig | |
28 Requires(post,preun): /sbin/service | |
29 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | |
30 | |
31 | |
32 %description | |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
33 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
|
34 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
|
35 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
|
36 for searching and drilling into all of your logs. |
0 | 37 |
38 | |
39 %prep | |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
40 true |
0 | 41 |
42 | |
43 %build | |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
44 true |
0 | 45 |
46 | |
47 %install | |
48 rm -rf $RPM_BUILD_ROOT | |
49 mkdir -p $RPM_BUILD_ROOT/var/log/%{name} | |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
50 install -D -m 750 %SOURCE0 $RPM_BUILD_ROOT/%{_bindir}/%{name}.jar |
5 | 51 install -D -m 750 %SOURCE1 $RPM_BUILD_ROOT/%{_bindir}/logstash_index_cleaner.py |
52 install -D -m 755 %SOURCE10 $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
53 install -D -m 755 %SOURCE11 $RPM_BUILD_ROOT/etc/cron.daily/%{name} | |
54 install -D -m 640 %SOURCE12 $RPM_BUILD_ROOT/etc/%{name}/%{name}.conf | |
55 install -D -m 640 %SOURCE20 $RPM_BUILD_ROOT/var/lib/%{name}/data/patterns/apache | |
56 install -D -m 640 %SOURCE21 $RPM_BUILD_ROOT/var/lib/%{name}/data/patterns/sendmail | |
57 install -D -m 640 %SOURCE22 $RPM_BUILD_ROOT/var/lib/%{name}/data/patterns/dnsbl | |
0 | 58 |
59 | |
60 %pre | |
61 /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
|
62 pip-python install pyes || : |
0 | 63 |
64 | |
65 %post | |
66 /sbin/chkconfig --add %{name} | |
67 setfacl -m u:logstash:rx /var/log/httpd | |
68 setfacl -m u:logstash:r /var/log/messages | |
69 setfacl -m u:logstash:r /var/log/maillog | |
70 | |
71 | |
72 %preun | |
73 [ $1 = 0 ] && /sbin/service %{name} stop || : | |
74 [ $1 = 0 ] && /sbin/chkconfig --del %{name} || : | |
75 | |
76 | |
77 %postun | |
78 [ $1 = 0 ] && setfacl -x u:logstash /var/log/httpd || : | |
79 [ $1 = 0 ] && setfacl -x u:logstash /var/log/messages || : | |
80 [ $1 = 0 ] && setfacl -x u:logstash /var/log/maillog || : | |
81 [ $1 = 0 ] && userdel %{name} || : | |
82 | |
83 | |
84 %clean | |
85 rm -rf $RPM_BUILD_ROOT | |
86 | |
87 | |
88 %files | |
89 %defattr(-,root,root,-) | |
90 %attr(0750,%{name},root) %{_bindir}/* | |
6
ccedd213595c
cleanup rpmbuild warning
Carl Byington <carl@five-ten-sg.com>
parents:
5
diff
changeset
|
91 %dir %attr(0750,%{name},root) /etc/%{name} |
0 | 92 %config(noreplace) %attr(0640,%{name},root) /etc/%{name}/%{name}.conf |
93 /etc/rc.d/init.d/%{name} | |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
94 /etc/cron.daily/%{name} |
0 | 95 %dir %attr(0750,%{name},root) /var/log/%{name} |
96 %dir %attr(0750,%{name},root) /var/lib/%{name} | |
97 %dir %attr(0750,%{name},root) /var/lib/%{name}/data | |
98 %dir %attr(0750,%{name},root) /var/lib/%{name}/data/patterns | |
99 %config(noreplace) %attr(0640,%{name},root) /var/lib/%{name}/data/patterns/sendmail | |
100 %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
|
101 %config(noreplace) %attr(0640,%{name},root) /var/lib/%{name}/data/patterns/dnsbl |
0 | 102 |
103 | |
104 %changelog | |
5 | 105 * Fri Mar 22 2013 <carl@five-ten-sg.com> - 1.1.9-0 |
0 | 106 - Initial build. |
107 |