[packages/elasticsearch] new, version 0.19.9
glen
glen at pld-linux.org
Tue Apr 2 23:01:58 CEST 2013
commit edb5869a80e62a738a41ed70c5e298cb4b657955
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Apr 2 23:59:58 2013 +0300
new, version 0.19.9
based on fedora package:
http://fedorapeople.org/groups/katello/releases/source/nightly/Fedora/18/elasticsearch-0.19.9-7.fc18.src.rpm
config-logging.yml | 25 +++++++++++
elasticsearch.logrotate | 8 ++++
elasticsearch.spec | 115 ++++++++++++++++++++++++++++++++++++++++++++++++
elasticsearch.sysconfig | 9 ++++
elasticsearch.tmpfiles | 1 +
5 files changed, 158 insertions(+)
---
diff --git a/elasticsearch.spec b/elasticsearch.spec
new file mode 100644
index 0000000..4fcbb8f
--- /dev/null
+++ b/elasticsearch.spec
@@ -0,0 +1,115 @@
+# TODO
+# - register user
+Summary: A distributed, highly available, RESTful search engine
+Name: elasticsearch
+Version: 0.19.9
+Release: 0.1
+License: Apache v2.0
+Group: Daemons
+Source0: https://github.com/downloads/elasticsearch/elasticsearch/%{name}-%{version}.tar.gz
+# Source0-md5: fbf1ca717239ee477f4742b47393b63f
+Source1: %{name}.init
+Source2: %{name}.logrotate
+Source3: config-logging.yml
+Source4: %{name}.sysconfig
+Source5: %{name}.tmpfiles
+URL: http://www.elasticsearch.com/
+Requires: /sbin/chkconfig
+Requires: java-jna >= 3.2.4
+Requires: java-log4j >= 1.2.14
+Requires: java-sigar >= 1.6.4
+Requires: java-snappy >= 1.0.4
+Requires: jpackage-utils
+Requires: jre
+Requires: rc-scripts
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A distributed, highly available, RESTful search engine.
+
+%prep
+%setup -q
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_javadir}/%{name}/bin
+install -p bin/elasticsearch $RPM_BUILD_ROOT%{_javadir}/%{name}/bin
+install -p bin/elasticsearch.in.sh $RPM_BUILD_ROOT%{_javadir}/%{name}/bin
+install -p bin/plugin $RPM_BUILD_ROOT%{_javadir}/%{name}/bin
+
+# libs
+install -d $RPM_BUILD_ROOT%{_javadir}/%{name}/lib
+install -p lib/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/lib
+
+# config
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+install config/elasticsearch.yml $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/logging.yml
+
+# data
+install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
+
+# logs
+install -d $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
+install -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
+
+# plugins
+install -d $RPM_BUILD_ROOT%{_javadir}/%{name}/plugins
+
+# sysconfig and init
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+
+install -d $RPM_BUILD_ROOT%{_localstatedir}/{run,lock/subsys}/%{name}
+
+install -D %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/elasticsearch.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%pre
+# create elasticsearch group
+if ! getent group elasticsearch >/dev/null; then
+ groupadd -r elasticsearch
+fi
+
+# create elasticsearch user
+if ! getent passwd elasticsearch >/dev/null; then
+ useradd -r -g elasticsearch -d %{_javadir}/%{name} \
+ -s /sbin/nologin -c "You know, for search" elasticsearch
+fi
+
+%post
+/sbin/chkconfig --add elasticsearch
+%service -n elasticsearch restart
+
+%preun
+if [ $1 -eq 0 ]; then
+ %service elasticsearch stop
+ /sbin/chkconfig --del elasticsearch
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.txt NOTICE.txt README.textile
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
+%{_sysconfdir}/tmpfiles.d/elasticsearch.conf
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+
+%dir %{_javadir}/%{name}
+%{_javadir}/elasticsearch/bin/*
+%{_javadir}/elasticsearch/lib/%{name}-%{version}.jar
+%dir %{_javadir}/elasticsearch/plugins
+%config(noreplace) %{_sysconfdir}/%{name}
+
+%dir %{_javadir}/elasticsearch/bin
+%dir %{_javadir}/elasticsearch/lib
+
+%defattr(-,elasticsearch,elasticsearch,-)
+%dir %{_localstatedir}/lib/%{name}
+%{_localstatedir}/run/%{name}
+%dir %{_localstatedir}/log/%{name}
diff --git a/config-logging.yml b/config-logging.yml
new file mode 100644
index 0000000..fbaa4aa
--- /dev/null
+++ b/config-logging.yml
@@ -0,0 +1,25 @@
+rootLogger: INFO, file
+logger:
+ # log action execution errors for easier debugging
+ action: DEBUG
+ # reduce the logging for aws, too much is logged under the default INFO
+ com.amazonaws: WARN
+
+
+ # gateway
+ #gateway: DEBUG
+ #index.gateway: DEBUG
+
+ # peer shard recovery
+ #index.shard.recovery: DEBUG
+
+ # discovery
+ #discovery: TRACE
+
+appender:
+ file:
+ type: file
+ file: ${path.logs}/${cluster.name}.log
+ layout:
+ type: pattern
+ conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
diff --git a/elasticsearch.logrotate b/elasticsearch.logrotate
new file mode 100644
index 0000000..0cb7989
--- /dev/null
+++ b/elasticsearch.logrotate
@@ -0,0 +1,8 @@
+/var/log/elasticsearch/*.log {
+ daily
+ rotate 14
+ copytruncate
+ compress
+ missingok
+ notifempty
+}
diff --git a/elasticsearch.sysconfig b/elasticsearch.sysconfig
new file mode 100644
index 0000000..bd27670
--- /dev/null
+++ b/elasticsearch.sysconfig
@@ -0,0 +1,9 @@
+#ES_PATH_LOG=/var/log/elasticsearch
+#ES_PATH_DATA=/var/lib/elasticsearch
+#ES_PATH_WORK=/tmp/elasticsearch
+#ES_PATH_CONF=/etc/elasticsearch
+#ES_CONFIG=/etc/elasticsearch/elasticsearch.yml
+
+#ES_INCLUDE=/usr/share/java/elasticsearch/bin/elasticsearch.in.sh
+#ES_MIN_MEM=256m
+#ES_MAX_MEM=1g
diff --git a/elasticsearch.tmpfiles b/elasticsearch.tmpfiles
new file mode 100644
index 0000000..448a3d9
--- /dev/null
+++ b/elasticsearch.tmpfiles
@@ -0,0 +1 @@
+D /var/run/elasticsearch 0755 elasticsearch elasticsearch
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/elasticsearch.git/commitdiff/edb5869a80e62a738a41ed70c5e298cb4b657955
More information about the pld-cvs-commit
mailing list