[arch-commits] Commit in elasticsearch/trunk (4 files)
Massimiliano Torromeo
mtorromeo at archlinux.org
Fri Nov 17 15:00:45 UTC 2017
Date: Friday, November 17, 2017 @ 15:00:44
Author: mtorromeo
Revision: 267090
upgpkg: elasticsearch 6.0.0-1
Added:
elasticsearch/trunk/elasticsearch-env
Modified:
elasticsearch/trunk/PKGBUILD
elasticsearch/trunk/elasticsearch.service
elasticsearch/trunk/elasticsearch at .service
------------------------+
PKGBUILD | 34 ++++++++++++++--------------------
elasticsearch-env | 45 +++++++++++++++++++++++++++++++++++++++++++++
elasticsearch.service | 5 ++---
elasticsearch at .service | 5 ++---
4 files changed, 63 insertions(+), 26 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-11-17 15:00:26 UTC (rev 267089)
+++ PKGBUILD 2017-11-17 15:00:44 UTC (rev 267090)
@@ -4,7 +4,7 @@
# Refactored by Blaž "Speed" Hrastnik <https://github.com/archSeer>
pkgname=elasticsearch
-pkgver=5.6.4
+pkgver=6.0.0
pkgrel=1
pkgdesc="Distributed RESTful search engine built on top of Lucene"
arch=('any')
@@ -13,6 +13,7 @@
depends=('java-runtime-headless=8' 'systemd')
source=(
"https://artifacts.elastic.co/downloads/$pkgname/$pkgname-$pkgver.tar.gz"
+ elasticsearch-env
elasticsearch.service
elasticsearch at .service
elasticsearch-sysctl.conf
@@ -20,9 +21,10 @@
elasticsearch-tmpfile.conf
elasticsearch.default
)
-sha256sums=('1098fc776fae8c74e65f8e17cf2ea244c1d07c4e6711340c9bb9f6df56aa45b0'
- 'f228b588345780cfc84c229dd92722e024c0da155976afc96fc5e5970428a9e4'
- '4dc14262b67399f741c303cce7d18f9d3d220285778a2deb50fb0640161179c7'
+sha256sums=('0420e877a8b986485244f603770737e9e4e47186fdfa1093768a11e391e3d9f4'
+ 'ffb354d8ec3752daa52c1bea49445491c3b811a5327dd8510b7c8e9499adefd1'
+ 'd3e92ff8cf6058965b1407537c3e618bff67f8012a8e3125721d22a72be1523b'
+ 'a38cf624ed91e2dcf36ed65806bbcf5ae91809a2a84a700ec52d1eb04ef0d5bf'
'b3feb1e9c7e7ce6b33cea6c727728ed700332aae942ca475c3bcc1d56b9f113c'
'815f6a39db6f54bb40750c382ffbdc298d2c4c187ee8ea7e2f855923e2ff354b'
'3173e3efa429507e6329f518699a072dfd442d9b5da7c62452a55f82334dd2b5'
@@ -36,27 +38,18 @@
prepare() {
cd "$srcdir"/$pkgname-$pkgver
- for script in elasticsearch{,-plugin,-translog}; do
- sed -e 's|^ES_HOME=.*dirname.*|ES_HOME=/usr/share/elasticsearch|' \
- -e '/^ES_HOME=.*pwd/d' \
- -e 's|$ES_HOME/config|/etc/elasticsearch|' \
- -i bin/$script
- done
-
- 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
+ sed -r 's;source .*/elasticsearch-env;source /usr/share/elasticsearch/elasticsearch-env;' \
+ -i bin/elasticsearch{,-keystore,-plugin,-translog}
}
package() {
cd "$pkgdir"
install -dm750 etc/elasticsearch/scripts
- install -dm755 usr/share/elasticsearch/plugins
+ install -dm755 usr/share/elasticsearch
install -dm755 var/lib/elasticsearch
install -dm755 var/log/elasticsearch
+ install -Dm644 "$srcdir"/elasticsearch-env usr/share/elasticsearch/elasticsearch-env
install -Dm644 "$srcdir"/elasticsearch.service usr/lib/systemd/system/elasticsearch.service
install -Dm644 "$srcdir"/elasticsearch at .service usr/lib/systemd/system/elasticsearch at .service
install -Dm644 "$srcdir"/elasticsearch-user.conf usr/lib/sysusers.d/elasticsearch.conf
@@ -65,7 +58,7 @@
install -Dm644 "$srcdir"/elasticsearch.default etc/default/elasticsearch
cd "$srcdir"/$pkgname-$pkgver
- cp -R lib modules "$pkgdir"/usr/share/elasticsearch/
+ cp -R lib modules plugins "$pkgdir"/usr/share/elasticsearch/
cd config
for conf in *; do
@@ -73,8 +66,9 @@
done
cd ..
- for script in elasticsearch{,-plugin,-translog}; do
+ for script in elasticsearch{,-keystore,-plugin,-translog}; do
install -Dm755 bin/$script "$pkgdir"/usr/bin/$script
done
- install -Dm644 bin/elasticsearch.in.sh "$pkgdir"/usr/share/elasticsearch/bin/elasticsearch.in.sh
+
+ ln -s ../../bin "$pkgdir"/usr/share/elasticsearch/bin
}
Added: elasticsearch-env
===================================================================
--- elasticsearch-env (rev 0)
+++ elasticsearch-env 2017-11-17 15:00:44 UTC (rev 267090)
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+set -e -o pipefail
+
+ES_HOME=/usr/share/elasticsearch
+
+# now set the classpath
+ES_CLASSPATH="$ES_HOME/lib/*"
+
+# now set the path to java
+if [ -x "$JAVA_HOME/bin/java" ]; then
+ JAVA="$JAVA_HOME/bin/java"
+else
+ set +e
+ JAVA=`which java`
+ set -e
+fi
+
+if [ ! -x "$JAVA" ]; then
+ echo "could not find java; set JAVA_HOME or ensure java is in PATH"
+ exit 1
+fi
+
+# do not let JAVA_TOOL_OPTIONS slip in (as the JVM does by default)
+if [ ! -z "$JAVA_TOOL_OPTIONS" ]; then
+ echo "warning: ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS"
+ unset JAVA_TOOL_OPTIONS
+fi
+
+# JAVA_OPTS is not a built-in JVM mechanism but some people think it is so we
+# warn them that we are not observing the value of $JAVA_OPTS
+if [ ! -z "$JAVA_OPTS" ]; then
+ echo -n "warning: ignoring JAVA_OPTS=$JAVA_OPTS; "
+ echo "pass JVM parameters via ES_JAVA_OPTS"
+fi
+
+# check the Java version
+"$JAVA" -cp "$ES_CLASSPATH" org.elasticsearch.tools.JavaVersionChecker
+
+if [ -z "$ES_PATH_CONF" ]; then ES_PATH_CONF=/etc/elasticsearch; fi
+
+if [ -z "$ES_PATH_CONF" ]; then
+ echo "ES_PATH_CONF must be set to the configuration path"
+ exit 1
+fi
Modified: elasticsearch.service
===================================================================
--- elasticsearch.service 2017-11-17 15:00:26 UTC (rev 267089)
+++ elasticsearch.service 2017-11-17 15:00:44 UTC (rev 267090)
@@ -10,8 +10,8 @@
PIDFile=/run/elasticsearch/elasticsearch.pid
Environment=JAVA_HOME=/usr/lib/jvm/default-runtime
-Environment=CONF_DIR=/etc/elasticsearch
EnvironmentFile=-/etc/default/elasticsearch
+Environment=ES_PATH_CONF=/etc/elasticsearch
WorkingDirectory=/usr/share/elasticsearch
@@ -19,8 +19,7 @@
Group=elasticsearch
ExecStart=/usr/bin/elasticsearch -d \
- -p /run/elasticsearch/elasticsearch.pid \
- -E path.conf=${CONF_DIR}
+ -p /run/elasticsearch/elasticsearch.pid
LimitNOFILE=65536
LimitMEMLOCK=infinity
Modified: elasticsearch at .service
===================================================================
--- elasticsearch at .service 2017-11-17 15:00:26 UTC (rev 267089)
+++ elasticsearch at .service 2017-11-17 15:00:44 UTC (rev 267090)
@@ -10,8 +10,8 @@
PIDFile=/run/elasticsearch/%I.pid
Environment=JAVA_HOME=/usr/lib/jvm/default-runtime
-Environment=CONF_DIR=/etc/elasticsearch/%I
EnvironmentFile=-/etc/default/elasticsearch
+Environment=ES_PATH_CONF=/etc/elasticsearch/%I
WorkingDirectory=/usr/share/elasticsearch
@@ -19,8 +19,7 @@
Group=elasticsearch
ExecStart=/usr/bin/elasticsearch -d \
- -p /run/elasticsearch/%I.pid \
- -E path.conf=${CONF_DIR}
+ -p /run/elasticsearch/%I.pid
LimitNOFILE=65536
LimitMEMLOCK=infinity
More information about the arch-commits
mailing list