Mercurial > logstash
annotate logstash.spec @ 13:c0150404962d
start working on building from source
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 06 Apr 2013 08:48:09 -0700 |
parents | 4899fb1b3eb3 |
children | 0e45fe64b10d |
rev | line source |
---|---|
0 | 1 # prevent brp repack jar files |
2 %define __os_install_post %{nil} | |
3 | |
4 %define _bindir /usr/local/bin | |
13
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
5 %define ES_VERSION 0.20.6 |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
6 %define gtcommit 06a620d011d08bd2c1099c0d0810c053bf105400 |
0 | 7 |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
8 Summary: logstash is a tool for managing events and logs. |
0 | 9 Name: logstash |
10 Version: 1.1.9 | |
11 Release: 0 | |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
12 License: Apache 2.0 |
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
13 Group: System Environment/Daemons |
0 | 14 URL: http://logstash.net/ |
15 BuildArch: noarch | |
2
9e0cdf091b8a
switch back to monolithic - the flatjar version fails
Carl Byington <carl@five-ten-sg.com>
parents:
1
diff
changeset
|
16 Source0: https://logstash.objects.dreamhost.com/release/%{name}-%{version}-monolithic.jar |
5 | 17 Source1: https://logstash.jira.com/secure/attachment/12610/logstash_index_cleaner.py |
13
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
18 #Source2: curl https://nodeload.github.com/logstash/logstash/tar.gz/v1.1.9 >logstash-1.1.9.tar.gz |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
19 Source2: %{name}-%{version}.tar.gz |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
20 Source3: %{name}.Makefile |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
21 #Source4: curl https://nodeload.github.com/elasticsearch/elasticsearch/tar.gz/V%{ES_VERSION}.tar.gz >elasticsearch-%{ES_VERSION}.tar.gz |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
22 Source4: elasticsearch-%{ES_VERSION}.tar.gz |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
23 #Source5: https://github.com/NickPadilla/GraphTastic/tar.gz/%{gtcommit} >GraphTastic.tar.gz |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
24 Source5: GraphTastic.tar.gz |
5 | 25 Source10: %{name}.rc |
26 Source11: %{name}.cron | |
27 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
|
28 Source13: %{name}.sysconfig |
5 | 29 Source20: apache.pattern |
30 Source21: sendmail.pattern | |
31 Source22: dnsbl.pattern | |
32 Requires: logrotate httpd java-1.7.0-openjdk python-pip python-argparse python-ordereddict | |
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 | |
13
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
38 #BuildRequires: maven |
0 | 39 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) |
40 | |
41 | |
42 %description | |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
43 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
|
44 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
|
45 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
|
46 for searching and drilling into all of your logs. |
0 | 47 |
48 | |
49 %prep | |
13
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
50 %setup -q -T -b 2 |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
51 mkdir ES |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
52 cd ES |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
53 gzip -dc %SOURCE4 | tar -xvvf - |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
54 cd .. |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
55 mkdir GT |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
56 cd GT |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
57 gzip -dc %SOURCE5 | tar -xvvf - |
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
58 mv GraphTastic-%{gtcommit} GraphTastic |
0 | 59 |
60 | |
61 %build | |
13
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
62 make -f %SOURCE3 |
0 | 63 |
64 | |
65 %install | |
13
c0150404962d
start working on building from source
Carl Byington <carl@five-ten-sg.com>
parents:
11
diff
changeset
|
66 # for now, ignore the results of the build, and just package the source jar files. |
0 | 67 rm -rf $RPM_BUILD_ROOT |
68 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
|
69 install -D -m 750 %SOURCE0 $RPM_BUILD_ROOT/%{_bindir}/%{name}.jar |
5 | 70 install -D -m 750 %SOURCE1 $RPM_BUILD_ROOT/%{_bindir}/logstash_index_cleaner.py |
71 install -D -m 755 %SOURCE10 $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
72 install -D -m 755 %SOURCE11 $RPM_BUILD_ROOT/etc/cron.daily/%{name} | |
73 install -D -m 640 %SOURCE12 $RPM_BUILD_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
|
74 install -D -m 640 %SOURCE13 $RPM_BUILD_ROOT/etc/sysconfig/%{name} |
5 | 75 install -D -m 640 %SOURCE20 $RPM_BUILD_ROOT/var/lib/%{name}/data/patterns/apache |
76 install -D -m 640 %SOURCE21 $RPM_BUILD_ROOT/var/lib/%{name}/data/patterns/sendmail | |
77 install -D -m 640 %SOURCE22 $RPM_BUILD_ROOT/var/lib/%{name}/data/patterns/dnsbl | |
0 | 78 |
79 | |
80 %pre | |
81 /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
|
82 pip-python install pyes || : |
0 | 83 |
84 | |
85 %post | |
86 /sbin/chkconfig --add %{name} | |
87 setfacl -m u:logstash:rx /var/log/httpd | |
88 setfacl -m u:logstash:r /var/log/messages | |
89 setfacl -m u:logstash:r /var/log/maillog | |
90 | |
91 | |
92 %preun | |
93 [ $1 = 0 ] && /sbin/service %{name} stop || : | |
94 [ $1 = 0 ] && /sbin/chkconfig --del %{name} || : | |
95 | |
96 | |
97 %postun | |
98 [ $1 = 0 ] && setfacl -x u:logstash /var/log/httpd || : | |
99 [ $1 = 0 ] && setfacl -x u:logstash /var/log/messages || : | |
100 [ $1 = 0 ] && setfacl -x u:logstash /var/log/maillog || : | |
101 [ $1 = 0 ] && userdel %{name} || : | |
102 | |
103 | |
104 %clean | |
105 rm -rf $RPM_BUILD_ROOT | |
106 | |
107 | |
108 %files | |
109 %defattr(-,root,root,-) | |
110 %attr(0750,%{name},root) %{_bindir}/* | |
6
ccedd213595c
cleanup rpmbuild warning
Carl Byington <carl@five-ten-sg.com>
parents:
5
diff
changeset
|
111 %dir %attr(0750,%{name},root) /etc/%{name} |
0 | 112 %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
|
113 %config(noreplace) %attr(0640,%{name},root) /etc/sysconfig/%{name} |
0 | 114 /etc/rc.d/init.d/%{name} |
3
796ac0b50dbf
add cron.daily index cleaning
Carl Byington <carl@five-ten-sg.com>
parents:
2
diff
changeset
|
115 /etc/cron.daily/%{name} |
0 | 116 %dir %attr(0750,%{name},root) /var/log/%{name} |
117 %dir %attr(0750,%{name},root) /var/lib/%{name} | |
118 %dir %attr(0750,%{name},root) /var/lib/%{name}/data | |
119 %dir %attr(0750,%{name},root) /var/lib/%{name}/data/patterns | |
120 %config(noreplace) %attr(0640,%{name},root) /var/lib/%{name}/data/patterns/sendmail | |
121 %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
|
122 %config(noreplace) %attr(0640,%{name},root) /var/lib/%{name}/data/patterns/dnsbl |
0 | 123 |
124 | |
125 %changelog | |
5 | 126 * Fri Mar 22 2013 <carl@five-ten-sg.com> - 1.1.9-0 |
0 | 127 - Initial build. |
128 |