summaryrefslogtreecommitdiff
path: root/community/elasticsearch
diff options
context:
space:
mode:
Diffstat (limited to 'community/elasticsearch')
-rw-r--r--community/elasticsearch/PKGBUILD25
-rw-r--r--community/elasticsearch/elasticsearch-tmpfile.conf2
-rw-r--r--community/elasticsearch/elasticsearch-user.conf3
-rw-r--r--community/elasticsearch/elasticsearch.install10
-rw-r--r--community/elasticsearch/elasticsearch.service2
-rw-r--r--community/elasticsearch/elasticsearch@.service2
6 files changed, 22 insertions, 22 deletions
diff --git a/community/elasticsearch/PKGBUILD b/community/elasticsearch/PKGBUILD
index 491d2141e..4dd160cb4 100644
--- a/community/elasticsearch/PKGBUILD
+++ b/community/elasticsearch/PKGBUILD
@@ -1,25 +1,31 @@
-# $Id: PKGBUILD 115776 2014-07-16 12:44:51Z mtorromeo $
+# $Id: PKGBUILD 116201 2014-07-23 21:31:20Z mtorromeo $
# Maintainer: 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
-pkgver=1.2.2
-pkgrel=2
+pkgver=1.3.0
+pkgrel=1
pkgdesc="Distributed RESTful search engine built on top of Lucene"
arch=('i686' 'x86_64')
url="http://www.elasticsearch.org/"
license=('APACHE')
-depends=('java-runtime' 'bash' 'systemd')
+depends=('java-runtime' 'systemd')
install='elasticsearch.install'
source=(
"http://download.elasticsearch.org/$pkgname/$pkgname/$pkgname-$pkgver.tar.gz"
elasticsearch.service
elasticsearch@.service
- elasticsearch-user.conf
elasticsearch-sysctl.conf
+ elasticsearch-tmpfile.conf
elasticsearch.default
)
+sha256sums=('4e2cf72d4ceaaf250a292c00a320d13d2fdb067ad8aeed969862db3060af4534'
+ 'f3a6e5b968ffe38edc42c80193f75ab1682a5224c977c8957816d321733aabc4'
+ 'c3ea4d82da44da8ea9bcb4d7d9cdfb086d25fd8ec2ea457adec290f0d6ebe083'
+ 'b3feb1e9c7e7ce6b33cea6c727728ed700332aae942ca475c3bcc1d56b9f113c'
+ '39ab5801b45c0f49af43c4d1826a655a981bfa07e4b3791d7a0719f8c191d8d9'
+ 'a0ee0761156a02d3f79db5ef295613c1a6d4267482c8db889d92a94b59feb497')
backup=('etc/elasticsearch/elasticsearch.yml'
'etc/elasticsearch/logging.yml'
@@ -69,17 +75,10 @@ package() {
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
}
-
-sha256sums=('c833d000c7e29e17b4cc5df2e26020c159ee086cdf4ac19f661911cc9aedfbee'
- '4b7c741c2fa2f856cff6b9e83693c2de9d8c00a73812b34133b4446bdcb2e4c8'
- '0c6969af1ab91fc543d4c37fea8f3596872a143281c22a17801703490758ba0a'
- '51a5ebf06f8853b4b4cbf1b13320dd738a82e9f2caab47ca772f157a6bd78063'
- 'b3feb1e9c7e7ce6b33cea6c727728ed700332aae942ca475c3bcc1d56b9f113c'
- 'a0ee0761156a02d3f79db5ef295613c1a6d4267482c8db889d92a94b59feb497')
diff --git a/community/elasticsearch/elasticsearch-tmpfile.conf b/community/elasticsearch/elasticsearch-tmpfile.conf
new file mode 100644
index 000000000..d6e38e567
--- /dev/null
+++ b/community/elasticsearch/elasticsearch-tmpfile.conf
@@ -0,0 +1,2 @@
+d /var/log/elasticsearch 0755 elasticsearch elasticsearch -
+d /var/lib/elasticsearch 0755 elasticsearch elasticsearch -
diff --git a/community/elasticsearch/elasticsearch-user.conf b/community/elasticsearch/elasticsearch-user.conf
deleted file mode 100644
index 5a90b850a..000000000
--- a/community/elasticsearch/elasticsearch-user.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-u elasticsearch 114 "Elasticsearch user"
-g elasticsearch 114
-m elasticsearch elasticsearch
diff --git a/community/elasticsearch/elasticsearch.install b/community/elasticsearch/elasticsearch.install
index 1cf320a95..ab25dbdb6 100644
--- a/community/elasticsearch/elasticsearch.install
+++ b/community/elasticsearch/elasticsearch.install
@@ -1,10 +1,16 @@
post_install() {
- systemd-sysusers elasticsearch.conf
+ getent group elasticsearch >/dev/null 2>&1 || groupadd -g 114 elasticsearch &>/dev/null
+ getent passwd elasticsearch >/dev/null 2>&1 || useradd -u 114 -g elasticsearch -d /usr/share/elasticsearch -s /bin/false elasticsearch &>/dev/null
+
+ systemd-tmpfiles --create elasticsearch.conf
chown -R elasticsearch:elasticsearch /usr/share/elasticsearch
}
post_upgrade(){
- systemd-sysusers elasticsearch.conf
+ getent group elasticsearch >/dev/null 2>&1 || groupadd -g 114 elasticsearch &>/dev/null
+ getent passwd elasticsearch >/dev/null 2>&1 || useradd -u 114 -g elasticsearch -d /usr/share/elasticsearch -s /bin/false elasticsearch &>/dev/null
+
+ systemd-tmpfiles --create elasticsearch.conf
}
post_remove() {
diff --git a/community/elasticsearch/elasticsearch.service b/community/elasticsearch/elasticsearch.service
index f1f559625..ba80324b1 100644
--- a/community/elasticsearch/elasticsearch.service
+++ b/community/elasticsearch/elasticsearch.service
@@ -7,8 +7,6 @@ After=network.target
Type=forking
User=elasticsearch
Group=elasticsearch
-ExecStartPre=-/usr/bin/install -o elasticsearch -g elasticsearch -d /var/lib/elasticsearch
-ExecStartPre=-/usr/bin/install -o elasticsearch -g elasticsearch -d /var/log/elasticsearch
ExecStart=/usr/bin/elasticsearch -d -p /run/elasticsearch/elasticsearch.pid
EnvironmentFile=-/etc/default/elasticsearch
RuntimeDirectory=elasticsearch
diff --git a/community/elasticsearch/elasticsearch@.service b/community/elasticsearch/elasticsearch@.service
index 45b3c3724..e065abdc8 100644
--- a/community/elasticsearch/elasticsearch@.service
+++ b/community/elasticsearch/elasticsearch@.service
@@ -7,8 +7,6 @@ After=network.target
Type=forking
User=elasticsearch
Group=elasticsearch
-ExecStartPre=-/usr/bin/install -o elasticsearch -g elasticsearch -d /var/lib/elasticsearch
-ExecStartPre=-/usr/bin/install -o elasticsearch -g elasticsearch -d /var/log/elasticsearch
ExecStart=/usr/bin/elasticsearch -d -p /run/elasticsearch/%I.pid -Des.config=/etc/elasticsearch/%I.yml
EnvironmentFile=-/etc/default/elasticsearch
RuntimeDirectory=elasticsearch