diff options
author | Johannes Dewender | 2016-05-30 15:15:01 +0200 |
---|---|---|
committer | Johannes Dewender | 2016-05-30 15:15:01 +0200 |
commit | c7c7f85bbf31c6216503577bb0f83b9edc578636 (patch) | |
tree | 9041d9135265fa52f3478e5c9e302f676e279200 | |
download | aur-c7c7f85bbf31c6216503577bb0f83b9edc578636.tar.gz |
create from offial repo (1.7.3)
-rw-r--r-- | .SRCINFO | 35 | ||||
-rw-r--r-- | PKGBUILD | 87 | ||||
-rw-r--r-- | elasticsearch-sysctl.conf | 1 | ||||
-rw-r--r-- | elasticsearch-tmpfile.conf | 2 | ||||
-rw-r--r-- | elasticsearch-user.conf | 1 | ||||
-rw-r--r-- | elasticsearch.default | 13 | ||||
-rw-r--r-- | elasticsearch.install | 8 | ||||
-rw-r--r-- | elasticsearch.service | 21 | ||||
-rw-r--r-- | elasticsearch@.service | 21 |
9 files changed, 189 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..dc94cb8b9e68 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,35 @@ +# Generated by mksrcinfo v8 +# Mon May 30 12:54:40 UTC 2016 +pkgbase = elasticsearch17 + pkgdesc = Distributed RESTful search engine built on top of Lucene + pkgver = 1.7.3 + pkgrel = 1 + url = https://www.elastic.co/products/elasticsearch + install = elasticsearch.install + arch = i686 + arch = x86_64 + license = APACHE + depends = java-runtime-headless + depends = systemd + provides = elasticsearch=1.7.3 + conflicts = elasticsearch + backup = etc/elasticsearch/elasticsearch.yml + backup = etc/elasticsearch/logging.yml + backup = etc/default/elasticsearch + source = http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.7.3.tar.gz + source = elasticsearch.service + source = elasticsearch@.service + source = elasticsearch-sysctl.conf + source = elasticsearch-user.conf + source = elasticsearch-tmpfile.conf + source = elasticsearch.default + sha256sums = af517611493374cfb2daa8897ae17e63e2efea4d0377d316baa351c1776a2bca + sha256sums = 8f1b4f6e22b472a4f4e711f010d6733a06935b46bb7314360f27c2ab506d6e46 + sha256sums = 7c1e06cdf838b5ad090e0463de5dab3e8d62f0d7e6ac04e0b0049a4007dee612 + sha256sums = b3feb1e9c7e7ce6b33cea6c727728ed700332aae942ca475c3bcc1d56b9f113c + sha256sums = a76c03afe30dc3434bf55b5b50f0867c3670dcaebcc8b522f42277ff523b7277 + sha256sums = 39ab5801b45c0f49af43c4d1826a655a981bfa07e4b3791d7a0719f8c191d8d9 + sha256sums = bb74e5fb8bc28f2125e015395ab05bea117b72bfc6dadbca827694b362ee0bf8 + +pkgname = elasticsearch17 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7caf91c3cd5f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,87 @@ +# Contributor: Johannes Dewender arch at JonnyJD dot net +# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> +# Contributor: Marcello "mererghost" Rocha <https://github.com/mereghost> +# Refactored by Blaž "Speed" Hrastnik <https://github.com/archSeer> + +_pkgname=elasticsearch +pkgname=elasticsearch17 +pkgver=1.7.3 +pkgrel=1 +pkgdesc="Distributed RESTful search engine built on top of Lucene" +arch=('i686' 'x86_64') +url="https://www.elastic.co/products/elasticsearch" +license=('APACHE') +depends=('java-runtime-headless' 'systemd') +conflicts=('elasticsearch') +provides=("elasticsearch=$pkgver") +install='elasticsearch.install' +source=( + "http://download.elasticsearch.org/$_pkgname/$_pkgname/$_pkgname-$pkgver.tar.gz" + elasticsearch.service + elasticsearch@.service + elasticsearch-sysctl.conf + elasticsearch-user.conf + elasticsearch-tmpfile.conf + elasticsearch.default +) +sha256sums=('af517611493374cfb2daa8897ae17e63e2efea4d0377d316baa351c1776a2bca' + '8f1b4f6e22b472a4f4e711f010d6733a06935b46bb7314360f27c2ab506d6e46' + '7c1e06cdf838b5ad090e0463de5dab3e8d62f0d7e6ac04e0b0049a4007dee612' + 'b3feb1e9c7e7ce6b33cea6c727728ed700332aae942ca475c3bcc1d56b9f113c' + 'a76c03afe30dc3434bf55b5b50f0867c3670dcaebcc8b522f42277ff523b7277' + '39ab5801b45c0f49af43c4d1826a655a981bfa07e4b3791d7a0719f8c191d8d9' + 'bb74e5fb8bc28f2125e015395ab05bea117b72bfc6dadbca827694b362ee0bf8') + +backup=('etc/elasticsearch/elasticsearch.yml' + 'etc/elasticsearch/logging.yml' + 'etc/default/elasticsearch') + +prepare() { + cd "$srcdir"/$_pkgname-$pkgver + + for script in plugin elasticsearch; do + sed 's|^ES_HOME=.*dirname.*|ES_HOME=/usr/share/elasticsearch|' \ + -i bin/$script + done + + sed 's|$ES_HOME/lib|/usr/lib/elasticsearch|g' -i bin/elasticsearch.in.sh bin/plugin + + echo -e '\nJAVA_OPTS="$JAVA_OPTS -Des.path.conf=/etc/elasticsearch"' >> bin/elasticsearch.in.sh + + sed -re 's;#\s*(path\.conf:).*$;\1 /etc/elasticsearch;' \ + -e '0,/#\s*(path\.data:).*$/s;;\1 /var/lib/elasticsearch;' \ + -e 's;#\s*(path\.work:).*$;\1 /tmp/elasticsearch;' \ + -e 's;#\s*(path\.logs:).*$;\1 /var/log/elasticsearch;' \ + -i config/elasticsearch.yml +} + +package() { + cd "$srcdir"/$_pkgname-$pkgver + install -dm755 "$pkgdir"/etc/elasticsearch + + if [ $CARCH = 'x86_64' ]; then + install -Dm644 lib/sigar/libsigar-amd64-linux.so "$pkgdir"/usr/lib/elasticsearch/sigar/libsigar-amd64-linux.so + else + install -Dm644 lib/sigar/libsigar-x86-linux.so "$pkgdir"/usr/lib/elasticsearch/sigar/libsigar-x86-linux.so + fi + cp lib/sigar/sigar*.jar "$pkgdir"/usr/lib/elasticsearch/sigar/ + cp lib/*.jar "$pkgdir"/usr/lib/elasticsearch/ + + cp config/* "$pkgdir"/etc/elasticsearch/ + + install -Dm755 bin/elasticsearch "$pkgdir"/usr/bin/elasticsearch + install -Dm755 bin/plugin "$pkgdir"/usr/bin/elasticsearch-plugin + install -Dm644 bin/elasticsearch.in.sh "$pkgdir"/usr/share/elasticsearch/elasticsearch.in.sh + + install -Dm644 "$srcdir"/elasticsearch.service "$pkgdir"/usr/lib/systemd/system/elasticsearch.service + install -Dm644 "$srcdir"/elasticsearch@.service "$pkgdir"/usr/lib/systemd/system/elasticsearch@.service + install -Dm644 "$srcdir"/elasticsearch-user.conf "$pkgdir"/usr/lib/sysusers.d/elasticsearch.conf + install -Dm644 "$srcdir"/elasticsearch-tmpfile.conf "$pkgdir"/usr/lib/tmpfiles.d/elasticsearch.conf + install -Dm644 "$srcdir"/elasticsearch-sysctl.conf "$pkgdir"/usr/lib/sysctl.d/elasticsearch.conf + + install -Dm644 "$srcdir"/elasticsearch.default "$pkgdir"/etc/default/elasticsearch + + ln -s ../../../var/lib/elasticsearch "$pkgdir"/usr/share/elasticsearch/data + + chown -R 114:114 "$pkgdir"/usr/share/elasticsearch +} diff --git a/elasticsearch-sysctl.conf b/elasticsearch-sysctl.conf new file mode 100644 index 000000000000..32da2c91cf27 --- /dev/null +++ b/elasticsearch-sysctl.conf @@ -0,0 +1 @@ +vm.max_map_count=262144
\ No newline at end of file diff --git a/elasticsearch-tmpfile.conf b/elasticsearch-tmpfile.conf new file mode 100644 index 000000000000..d6e38e567b45 --- /dev/null +++ b/elasticsearch-tmpfile.conf @@ -0,0 +1,2 @@ +d /var/log/elasticsearch 0755 elasticsearch elasticsearch - +d /var/lib/elasticsearch 0755 elasticsearch elasticsearch - diff --git a/elasticsearch-user.conf b/elasticsearch-user.conf new file mode 100644 index 000000000000..e9f3990f607d --- /dev/null +++ b/elasticsearch-user.conf @@ -0,0 +1 @@ +u elasticsearch 114 "Elasticsearch user" diff --git a/elasticsearch.default b/elasticsearch.default new file mode 100644 index 000000000000..ade7ae924ddd --- /dev/null +++ b/elasticsearch.default @@ -0,0 +1,13 @@ +JAVA_HOME=/usr/lib/jvm/default-runtime + +# Heap Size (defaults to 256m min, 1g max) +#ES_HEAP_SIZE=1g + +# Heap new generation +#ES_HEAP_NEWSIZE= + +# max direct memory +#ES_DIRECT_SIZE= + +# Additional Java OPTS +#ES_JAVA_OPTS= diff --git a/elasticsearch.install b/elasticsearch.install new file mode 100644 index 000000000000..09dc15070265 --- /dev/null +++ b/elasticsearch.install @@ -0,0 +1,8 @@ +post_install() { + systemd-sysusers elasticsearch.conf + systemd-tmpfiles --create elasticsearch.conf +} + +post_upgrade(){ + systemd-tmpfiles --create elasticsearch.conf +} diff --git a/elasticsearch.service b/elasticsearch.service new file mode 100644 index 000000000000..69d4dc8fe4c4 --- /dev/null +++ b/elasticsearch.service @@ -0,0 +1,21 @@ +[Unit] +Description=ElasticSearch +Documentation=http://www.elasticsearch.org +After=network.target + +[Service] +Type=forking +User=elasticsearch +Group=elasticsearch +ExecStart=/usr/bin/elasticsearch -d -p /run/elasticsearch/elasticsearch.pid +Environment=JAVA_HOME=/usr/lib/jvm/default-runtime +EnvironmentFile=-/etc/default/elasticsearch +RuntimeDirectory=elasticsearch +PIDFile=/run/elasticsearch/elasticsearch.pid +LimitNOFILE=65535 +LimitMEMLOCK=infinity +TimeoutStopSec=20 +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/elasticsearch@.service b/elasticsearch@.service new file mode 100644 index 000000000000..b29a650bb05a --- /dev/null +++ b/elasticsearch@.service @@ -0,0 +1,21 @@ +[Unit] +Description=ElasticSearch +Documentation=http://www.elasticsearch.org +After=network.target + +[Service] +Type=forking +User=elasticsearch +Group=elasticsearch +ExecStart=/usr/bin/elasticsearch -d -p /run/elasticsearch/%I.pid -Des.config=/etc/elasticsearch/%I.yml +Environment=JAVA_HOME=/usr/lib/jvm/default-runtime +EnvironmentFile=-/etc/default/elasticsearch +RuntimeDirectory=elasticsearch +PIDFile=/run/elasticsearch/%I.pid +LimitNOFILE=65535 +LimitMEMLOCK=infinity +TimeoutStopSec=20 +Restart=on-failure + +[Install] +WantedBy=multi-user.target |