annotate Kibana.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 610835fb4209
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
1 # prevent brp repack jar files
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
2 %define __os_install_post %{nil}
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
3
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
4 %global commit df8ae2344433e5072a8dfe77082acfd1c9b6ed62
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
5 %global shortcommit %(c=%{commit}; echo ${c:0:8})
27
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
6 %global name2 kibana
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
7 %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
8 %global gem_name kibana
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
9 %global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
10
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
11 Name: Kibana
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
12 Version: 0.2.0
27
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
13 Release: 1%{?dist}
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
14 Summary: Kibana is a user friendly way to view, search and visualize your log data
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
15
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
16 Group: System Environment/Daemons
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
17 License: MIT
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
18 URL: http://kibana.org/
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
19 BuildArch: noarch
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
20 Source0: https://nodeload.github.com/rashidkpc/Kibana/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
26
610835fb4209 external configuration for kibana
Carl Byington <carl@five-ten-sg.com>
parents: 25
diff changeset
21 Source1: Kibana-external-config-patch
27
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
22 Source2: Kibana-no-git-patch
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
23 Source10: %{name}.rc
26
610835fb4209 external configuration for kibana
Carl Byington <carl@five-ten-sg.com>
parents: 25
diff changeset
24 Source13: %{name}.sysconfig
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
25 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
26 Autoreq: 0
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
27
27
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
28 BuildRequires: ruby
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
29 BuildRequires: ruby-devel
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
30 BuildRequires: rubygems
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
31 Provides: rubygem(%{gem_name}) = %{version}
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
32
27
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
33 Requires: ruby
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
34 Requires: rubygems
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
35 Requires: rubygem(sinatra)
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
36 Requires: rubygem(json)
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
37 Requires: rubygem(fastercsv)
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
38 Requires: rubygem(daemons)
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
39 Requires: rubygem(tzinfo)
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
40 Requires: rubygem(thin)
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
41 Requires: elasticsearch logstash
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
42 Requires(pre): /usr/sbin/useradd
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
43 Requires(pre): /usr/bin/getent
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
44 Requires(postun): /usr/sbin/userdel
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
45 Requires(post,preun): /sbin/chkconfig
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
46 Requires(post,preun): /sbin/service
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
47
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
48 %description
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
49 Kibana is a highly scalable interface for Logstash and ElasticSearch
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
50 that allows you to efficiently search, graph, analyze and otherwise
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
51 make sense of a mountain of logs.
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
52
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
53
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
54 %prep
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
55 %setup -qn %{name}-%{commit}
26
610835fb4209 external configuration for kibana
Carl Byington <carl@five-ten-sg.com>
parents: 25
diff changeset
56 patch <%SOURCE1
27
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
57 patch <%SOURCE2
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
58
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
59
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
60 %build
27
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
61 mkdir -p ./%{gem_dir}
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
62 gem build %{gem_name}.gemspec
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
63 gem install --local --install-dir ./%{gem_dir} -V --force --no-rdoc --no-ri %{gem_name}-%{version}.gem
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
64
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
65
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
66 %install
27
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
67 rm -rf $RPM_BUILD_ROOT
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
68 mkdir -p $RPM_BUILD_ROOT/%{gem_dir}
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
69 mkdir -p $RPM_BUILD_ROOT/%{_prefix}
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
70 cp -pa ./%{gem_dir}/* $RPM_BUILD_ROOT/%{gem_dir}
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
71 mv -f $RPM_BUILD_ROOT/%{gem_dir}/bin $RPM_BUILD_ROOT/%{_prefix}
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
72 install -d $RPM_BUILD_ROOT/var/log/%{name}
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
73 install -D -m 755 %SOURCE10 $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
74 install -D -m 640 %SOURCE13 $RPM_BUILD_ROOT/etc/sysconfig/%{name}
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
75 mv -f %{name}Config.rb $RPM_BUILD_ROOT/etc/sysconfig/%{name}Config.rb
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
76
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
77
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
78 %pre
27
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
79 /usr/bin/getent passwd %{name2} >/dev/null || /usr/sbin/useradd -r -m -c "%{name} pseudo-user" %{name2} >/dev/null
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
80
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
81
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
82 %post
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
83 /sbin/chkconfig --add %{name}
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
84
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
85
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
86 %preun
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
87 [ $1 = 0 ] && /sbin/service %{name} stop || :
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
88 [ $1 = 0 ] && /sbin/chkconfig --del %{name} || :
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
89
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
90
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
91 %postun
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
92 [ $1 = 0 ] && userdel %{name2} || :
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
93
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
94
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
95 %clean
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
96 rm -rf $RPM_BUILD_ROOT
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
97
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
98
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
99 %files
27
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
100 %defattr(-, root, root, -)
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
101 %{_bindir}/%{gem_name}
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
102 %{gem_dir}/cache/%{gem_name}-%{version}.gem
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
103 %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
104 %{gem_instdir}
26
610835fb4209 external configuration for kibana
Carl Byington <carl@five-ten-sg.com>
parents: 25
diff changeset
105 %config(noreplace) %attr(0640,%{name2},root) /etc/sysconfig/%{name}
27
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
106 %config(noreplace) %attr(0640,%{name2},root) /etc/sysconfig/%{name}Config.rb
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
107 %dir %attr(0750,%{name2},root) /var/log/%{name}
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
108 /etc/rc.d/init.d/%{name}
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
109
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
110
27
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
111 %changelog
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
112 * Mon May 06 2013 <carl@five-ten-sg.com> - 0.2.0-1
76544ad0561d switch kibana to ruby gem rather than jruby
Carl Byington <carl@five-ten-sg.com>
parents: 26
diff changeset
113 - switch to building standard ruby gem, avoid jruby
25
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
114
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
115 * Fri Apr 25 2013 <carl@five-ten-sg.com> - 0.2.0-0
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
116 - Initial build.
d058481276aa replace logstash embedded web server with kibana
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
117