[arch-commits] Commit in elasticsearch/trunk (5 files)
Sven-Hendrik Haase
svenstaro at archlinux.org
Mon Jul 20 21:17:24 UTC 2020
Date: Monday, July 20, 2020 @ 21:17:23
Author: svenstaro
Revision: 664656
upgpkg: elasticsearch 7.8.0-3: Fix permissions, properly integrate systemd, don't build snapshot
Added:
elasticsearch/trunk/remove-systemd-distribution-check.patch
Modified:
elasticsearch/trunk/PKGBUILD
elasticsearch/trunk/elasticsearch-tmpfile.conf
elasticsearch/trunk/elasticsearch.service
elasticsearch/trunk/elasticsearch at .service
-----------------------------------------+
PKGBUILD | 25 ++++++++++++++++++-------
elasticsearch-tmpfile.conf | 7 +++++++
elasticsearch.service | 2 +-
elasticsearch at .service | 2 +-
remove-systemd-distribution-check.patch | 17 +++++++++++++++++
5 files changed, 44 insertions(+), 9 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-07-20 20:10:23 UTC (rev 664655)
+++ PKGBUILD 2020-07-20 21:17:23 UTC (rev 664656)
@@ -4,7 +4,7 @@
pkgname=elasticsearch
pkgver=7.8.0
-pkgrel=2
+pkgrel=3
pkgdesc="Distributed RESTful search engine built on top of Lucene"
arch=('x86_64')
url="https://www.elastic.co/products/elasticsearch"
@@ -21,16 +21,18 @@
elasticsearch-user.conf
elasticsearch-tmpfile.conf
elasticsearch.default
+ remove-systemd-distribution-check.patch
)
sha256sums=('6a04dac8da32755f53962a34b85b7dac7593b2a544f5bccb50344b2b345b3944'
- '10efeee6d4697c1681aeea6bfeba8e04767fd47b4ce3dcd1be28bb7c8a6e12bb'
- 'bb106baaa3e0a33262a8c6d0b418dc78f8573f7f44e1f1eef9595e8fddaca383'
+ '9e1f68ff275ef2b5f2b93d2823efc5cc9643da696fcbe09a3ea7520ada35ffba'
+ '8a76ad9a44a34eca8d6cb7ec9d8f1b01d46c114765b0a76094de8d72f0477351'
'bac40d87acaa5bee209ceb6dfa253009a072e9243fe3b94be42fb5cd44727d6f'
'22a78a165a810608188faea6f2b0b381f27b1e9d60126c3b3e729124540589a8'
'b3feb1e9c7e7ce6b33cea6c727728ed700332aae942ca475c3bcc1d56b9f113c'
'815f6a39db6f54bb40750c382ffbdc298d2c4c187ee8ea7e2f855923e2ff354b'
- '05a73496766a869134cf8a73f2de552bcf9bd1b10a3257e2cbc15f476093c9a6'
- 'bb74e5fb8bc28f2125e015395ab05bea117b72bfc6dadbca827694b362ee0bf8')
+ '74a772e9f73e2cecda45dcd30ade2f6114db657ed36231292bdf9a7ca04eab78'
+ 'bb74e5fb8bc28f2125e015395ab05bea117b72bfc6dadbca827694b362ee0bf8'
+ '96934e6518245a4110714c3e1c1eb7bfaf4dd0026cc917efc322f3bfa4c3b5ec')
backup=('etc/elasticsearch/elasticsearch.yml'
'etc/elasticsearch/log4j2.properties'
@@ -37,9 +39,16 @@
'etc/elasticsearch/jvm.options'
'etc/default/elasticsearch')
+prepare() {
+ cd $pkgname-$pkgver
+ patch -Np1 -i "$srcdir"/remove-systemd-distribution-check.patch
+}
+
build() {
cd $pkgname-$pkgver
export PATH=/usr/lib/jvm/java-11-openjdk/bin:$PATH
+ export GRADLE_OPTS="-Dbuild.snapshot=false -Dlicense.key=x-pack/plugin/core/snapshot.key"
+ gradle :distribution:buildSystemdModule
gradle :distribution:archives:linux-tar:build
}
@@ -51,7 +60,7 @@
tar xf distribution/archives/linux-tar/build/distributions/elasticsearch-$pkgver-*linux-x86_64.tar.gz \
--strip 1 -C "$pkgdir"/usr/share/elasticsearch
- rm -rf "$pkgdir"/usr/share/elasticsearch/jdk
+ rm -r "$pkgdir"/usr/share/elasticsearch/{jdk,logs}
install -dm755 "$pkgdir"/etc
mv "$pkgdir"/usr/share/elasticsearch/config "$pkgdir"/etc/elasticsearch
@@ -58,7 +67,7 @@
chmod 2750 "$pkgdir"/etc/elasticsearch
for bin in "$pkgdir"/usr/share/elasticsearch/bin/*; do
- ln -s /usr/share/elasticsearch/bin/$(basename $bin) "$pkgdir"/usr/bin/$(basename $bin)
+ ln -sT /usr/share/elasticsearch/bin/$(basename $bin) "$pkgdir"/usr/bin/$(basename $bin)
done
ln -s /etc/elasticsearch "$pkgdir"/usr/share/elasticsearch/config
@@ -74,6 +83,8 @@
install -Dm644 "$srcdir"/elasticsearch-sysctl.conf "$pkgdir"/usr/lib/sysctl.d/elasticsearch.conf
install -Dm644 "$srcdir"/elasticsearch.default "$pkgdir"/etc/default/elasticsearch
+ cp -r distribution/build/outputs/systemd/modules/systemd "$pkgdir"/usr/share/elasticsearch/modules/
+
sed -i '2iJAVA_HOME=/usr/lib/jvm/default-runtime' "$pkgdir"/usr/share/elasticsearch/bin/elasticsearch-env
sed -i 's/ES_BUNDLED_JDK=true/ES_BUNDLED_JDK=false/g' "$pkgdir"/usr/share/elasticsearch/bin/elasticsearch-env
}
Modified: elasticsearch-tmpfile.conf
===================================================================
--- elasticsearch-tmpfile.conf 2020-07-20 20:10:23 UTC (rev 664655)
+++ elasticsearch-tmpfile.conf 2020-07-20 21:17:23 UTC (rev 664656)
@@ -5,3 +5,10 @@
d /etc/elasticsearch 2750 - elasticsearch -
d /etc/elasticsearch/scripts 0750 - elasticsearch -
d /etc/elasticsearch/jvm.options.d 0750 - elasticsearch -
+z /etc/elasticsearch/jvm.options 0640 root elasticsearch
+z /etc/elasticsearch/elasticsearch.yml 0640 root elasticsearch
+z /etc/elasticsearch/log4j2.properties 0640 root elasticsearch
+z /etc/elasticsearch/role_mapping.yml 0640 root elasticsearch
+z /etc/elasticsearch/roles.yml 0640 root elasticsearch
+z /etc/elasticsearch/users 0640 root elasticsearch
+z /etc/elasticsearch/users_roles 0640 root elasticsearch
Modified: elasticsearch.service
===================================================================
--- elasticsearch.service 2020-07-20 20:10:23 UTC (rev 664655)
+++ elasticsearch.service 2020-07-20 21:17:23 UTC (rev 664656)
@@ -7,7 +7,7 @@
After=network-online.target
[Service]
-Type=simple
+Type=notify
RuntimeDirectory=elasticsearch
PrivateTmp=true
Environment=ES_HOME=/usr/share/elasticsearch
Modified: elasticsearch at .service
===================================================================
--- elasticsearch at .service 2020-07-20 20:10:23 UTC (rev 664655)
+++ elasticsearch at .service 2020-07-20 21:17:23 UTC (rev 664656)
@@ -7,7 +7,7 @@
After=network-online.target
[Service]
-Type=simple
+Type=notify
RuntimeDirectory=elasticsearch
PrivateTmp=true
Environment=ES_HOME=/usr/share/elasticsearch
Added: remove-systemd-distribution-check.patch
===================================================================
--- remove-systemd-distribution-check.patch (rev 0)
+++ remove-systemd-distribution-check.patch 2020-07-20 21:17:23 UTC (rev 664656)
@@ -0,0 +1,17 @@
+diff --git a/modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java b/modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java
+index 40cc219cbb4..5b89f469da7 100644
+--- a/modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java
++++ b/modules/systemd/src/main/java/org/elasticsearch/systemd/SystemdPlugin.java
+@@ -59,11 +59,7 @@ public class SystemdPlugin extends Plugin implements ClusterPlugin {
+ }
+
+ SystemdPlugin(final boolean assertIsPackageDistribution, final Build.Type buildType, final String esSDNotify) {
+- final boolean isPackageDistribution = buildType == Build.Type.DEB || buildType == Build.Type.RPM;
+- if (assertIsPackageDistribution) {
+- // our build is configured to only include this module in the package distributions
+- assert isPackageDistribution : buildType;
+- }
++ final boolean isPackageDistribution = true;
+ if (isPackageDistribution == false) {
+ logger.debug("disabling sd_notify as the build type [{}] is not a package distribution", buildType);
+ enabled = false;
More information about the arch-commits
mailing list