[arch-commits] Commit in elasticsearch/trunk (PKGBUILD elasticsearch.install)
Massimiliano Torromeo
mtorromeo at archlinux.org
Wed Jul 16 12:16:38 UTC 2014
Date: Wednesday, July 16, 2014 @ 14:16:37
Author: mtorromeo
Revision: 115772
upgpkg: elasticsearch 1.2.2-2
Migrated user creation to systemd-sysusers
Modified:
elasticsearch/trunk/PKGBUILD
elasticsearch/trunk/elasticsearch.install
-----------------------+
PKGBUILD | 39 +++++++++++++++++++++------------------
elasticsearch.install | 7 ++-----
2 files changed, 23 insertions(+), 23 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-07-16 12:16:36 UTC (rev 115771)
+++ PKGBUILD 2014-07-16 12:16:37 UTC (rev 115772)
@@ -5,17 +5,18 @@
pkgname=elasticsearch
pkgver=1.2.2
-pkgrel=1
+pkgrel=2
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')
+depends=('java-runtime' 'bash' 'systemd')
install='elasticsearch.install'
source=(
"http://download.elasticsearch.org/$pkgname/$pkgname/$pkgname-$pkgver.tar.gz"
elasticsearch.service
elasticsearch at .service
+ elasticsearch-user.conf
elasticsearch-sysctl.conf
elasticsearch.default
)
@@ -25,7 +26,7 @@
'etc/default/elasticsearch')
prepare() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$srcdir"/$pkgname-$pkgver
for script in plugin elasticsearch; do
sed 's|^ES_HOME=.*dirname.*|ES_HOME=/usr/share/elasticsearch|' \
@@ -49,34 +50,36 @@
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
- install -dm755 "$pkgdir/etc/elasticsearch"
+ 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"
+ 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"
+ 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 lib/sigar/sigar*.jar "$pkgdir"/usr/lib/elasticsearch/sigar/
+ cp lib/*.jar "$pkgdir"/usr/lib/elasticsearch/
- cp config/* "$pkgdir/etc/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 -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 at .service" "$pkgdir/usr/lib/systemd/system/elasticsearch at .service"
+ install -Dm644 "$srcdir"/elasticsearch.service "$pkgdir"/usr/lib/systemd/system/elasticsearch.service
+ install -Dm644 "$srcdir"/elasticsearch at .service "$pkgdir"/usr/lib/systemd/system/elasticsearch at .service
+ install -Dm644 "$srcdir"/elasticsearch-user.conf "$pkgdir"/usr/lib/sysusers.d/elasticsearch.conf
+ install -Dm644 "$srcdir"/elasticsearch-sysctl.conf "$pkgdir"/usr/lib/sysctl.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"
+ install -Dm644 "$srcdir"/elasticsearch.default "$pkgdir"/etc/default/elasticsearch
- ln -s ../../../var/lib/elasticsearch "$pkgdir/usr/share/elasticsearch/data"
+ ln -s ../../../var/lib/elasticsearch "$pkgdir"/usr/share/elasticsearch/data
}
sha256sums=('c833d000c7e29e17b4cc5df2e26020c159ee086cdf4ac19f661911cc9aedfbee'
'4b7c741c2fa2f856cff6b9e83693c2de9d8c00a73812b34133b4446bdcb2e4c8'
'0c6969af1ab91fc543d4c37fea8f3596872a143281c22a17801703490758ba0a'
+ '51a5ebf06f8853b4b4cbf1b13320dd738a82e9f2caab47ca772f157a6bd78063'
'b3feb1e9c7e7ce6b33cea6c727728ed700332aae942ca475c3bcc1d56b9f113c'
'a0ee0761156a02d3f79db5ef295613c1a6d4267482c8db889d92a94b59feb497')
Modified: elasticsearch.install
===================================================================
--- elasticsearch.install 2014-07-16 12:16:36 UTC (rev 115771)
+++ elasticsearch.install 2014-07-16 12:16:37 UTC (rev 115772)
@@ -1,13 +1,10 @@
post_install() {
- 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-sysusers elasticsearch.conf
chown -R elasticsearch:elasticsearch /usr/share/elasticsearch
}
post_upgrade(){
- 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-sysusers elasticsearch.conf
}
post_remove() {
More information about the arch-commits
mailing list