diff options
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | elasticsearch-env | 28 | ||||
-rw-r--r-- | elasticsearch-sysctl.conf | 1 | ||||
-rw-r--r-- | elasticsearch-tmpfile.conf | 1 | ||||
-rw-r--r-- | elasticsearch.default | 13 | ||||
-rw-r--r-- | elasticsearch.service | 10 | ||||
-rw-r--r-- | elasticsearch@.service | 10 |
8 files changed, 52 insertions, 78 deletions
@@ -1,13 +1,13 @@ pkgbase = elasticsearch-xpack pkgdesc = Distributed RESTful search engine built on top of Lucene - pkgver = 7.17.2 + pkgver = 8.0.1 pkgrel = 1 url = https://www.elastic.co/products/elasticsearch arch = x86_64 license = custom:Elastic2 - depends = java-runtime-headless + depends = java-runtime-headless>=17 depends = systemd - provides = elasticsearch=7.17.2 + provides = elasticsearch=8.0.1 conflicts = elasticsearch backup = etc/default/elasticsearch backup = etc/elasticsearch/elasticsearch.yml @@ -17,28 +17,24 @@ pkgbase = elasticsearch-xpack backup = etc/elasticsearch/role_mapping.yml backup = etc/elasticsearch/users backup = etc/elasticsearch/users_roles - source = https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.2-x86_64.rpm - source = https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.2-x86_64.rpm.asc + source = https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.0.1-x86_64.rpm + source = https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.0.1-x86_64.rpm.asc source = elasticsearch-env source = elasticsearch.service source = elasticsearch@.service source = elasticsearch-keystore.service source = elasticsearch-keystore@.service - source = elasticsearch-sysctl.conf source = elasticsearch-user.conf source = elasticsearch-tmpfile.conf - source = elasticsearch.default validpgpkeys = 46095ACC8548582C1A2699A9D27D666CD88E42B4 - sha512sums = 12ac47b227cbc7f5a483d8377f5fef7826e103cdef2980d32a5a21dc5bd3573e9f73109da5370b6aa4def22b1233a40c5b194f3bad30009609a34a2f3806c9a7 + sha512sums = a093cf3560c45e19f4b3818af02f4b5fe87dc823fab2eff0de6010ee2ce70c9628403760566b39058114e2519c53c7c1425a812dbe87388d1063615989a8aabf sha512sums = SKIP - sha512sums = 52556e0709590f0e15039d89b64c08c9bbeb0c61d29e3cd5a4471744968c882eb559081db1c89e846fa33d50b31e2fe9ba46d7e7e2cf5d4a23e78bc97a50c853 - sha512sums = 8280cfd911c1762a1cba67a72bf01c593dbcec00ab02b5f7ca2ef05dbcbae835f2d0e20f3143b0f601e233708e7a60148a1b2087aaff0e0b239361ca4792409f - sha512sums = 712974b708f54b631d635601e7dff037a2fff0cd927cd09b27974fdb9232c1e495d70232afad5eaa4d2876665e099f880c23f914ed602700ef1962b5f137879f + sha512sums = 4964bac1d7c17d91c798b00b4e1568aafb8b436668baa0c9098dd77b6c76701f31262659564fb2712965cec16cab13e1eb90243f12924876715eb8a8c4a704b5 + sha512sums = 50d8cff9af937f0dbfc4e85ad326039f82470ef1b4546f4cd6cea38da3f6a82a0f9f7f1abc7c2b446963b48f04f9810dcaf9201827dd1e959a0514a9445fd2b0 + sha512sums = b8646b71bd9c1794776d2d10edab2a748bcd40efdfd5840a3c74d6736816cb6908fddfed754a1562062c745ab419256bef74dda9aaeef45e20845c43f0ecf6c3 sha512sums = 87ff9026db8883dab2b1c5dcf7ead2700de6aa37000631d153fb61cccf7ab42edbd5eeac4e320e9d6aa2aadbe76f2c6386efb1aefde6f02aef95680f6ffafd0b sha512sums = 337c7c4c0f37430523b9a89e716051f1a05abbc71c3109dbf201bcf1b6839a88b5edb2c6498937552e8e92255e143ea344e55478543ff1c4623ed14ea04e7af1 - sha512sums = 4926e63ed247f9ced0674a55d01fdf7708b468a5f4b1bdb246f60c4e80d4980f21c811b952340d3e8d1c1dde77af87e062c1b66ec6818f90fb128a713c349050 sha512sums = 1c1b3dfe28cd2f9026fdfa373bc59be35cf281bf22fcab12150ddded40b1355268078b9197559c4bdb9665177924fe95786028386baec90dede53264506383fd - sha512sums = af1af8854ca5a129b6c1d5fd3d977d99af0acef4490f2a9d39ee0746467a3305e223031c4ca5cebbb1629b8611e04ea61a1bf57f7fcef4ff4da0d6bae0df8c72 - sha512sums = 4ef74026f82b6f0cb6cec9b992cd3f9b145083da39a37b7d8da01824c44054c72644ee0fe6d92f0329496f0fce97b7b913bca1402ef922b6cceccc360e35c5b1 + sha512sums = 753e0dd4ee115bd508f8a6b59309408b4ec45b95624751ac770d350acc1541defeb729d72b6f767beb2864b76e92a1baa882ea34a2f72ab6ffc92b5dc77c61fe pkgname = elasticsearch-xpack @@ -1,43 +1,39 @@ # Maintainer: Dave Wheeler <dwwheeler at gmail dot com> -# Maintainer: Eric Liu <eric at hnws dot me> -# Official repo maintainer: Massimiliano Torromeo <massimiliano dot torromeo at gmail dot com> +# Contributor: Eric Liu <eric at hnws dot me> +# Contributor: Massimiliano Torromeo <massimiliano dot torromeo at gmail dot com> # Contributor: Marcello "mererghost" Rocha <https://github.com/mereghost> -# Refactored by Blaž "Speed" Hrastnik <https://github.com/archSeer> +# Contributor: Blaž "Speed" Hrastnik <https://github.com/archSeer> pkgname=elasticsearch-xpack -pkgver=7.17.2 +pkgver=8.0.1 pkgrel=1 pkgdesc="Distributed RESTful search engine built on top of Lucene" arch=('x86_64') url="https://www.elastic.co/products/elasticsearch" license=('custom:Elastic2') -depends=('java-runtime-headless' 'systemd') +depends=('java-runtime-headless>=17' 'systemd') provides=("elasticsearch=$pkgver") conflicts=('elasticsearch') -relpkgname=elasticsearch +_relpkgname=elasticsearch source=( - https://artifacts.elastic.co/downloads/$relpkgname/$relpkgname-$pkgver-x86_64.rpm{,.asc} + https://artifacts.elastic.co/downloads/$_relpkgname/$_relpkgname-$pkgver-x86_64.rpm{,.asc} elasticsearch-env elasticsearch.service elasticsearch@.service elasticsearch-keystore.service elasticsearch-keystore@.service - elasticsearch-sysctl.conf elasticsearch-user.conf elasticsearch-tmpfile.conf - elasticsearch.default ) -sha512sums=('12ac47b227cbc7f5a483d8377f5fef7826e103cdef2980d32a5a21dc5bd3573e9f73109da5370b6aa4def22b1233a40c5b194f3bad30009609a34a2f3806c9a7' +sha512sums=('a093cf3560c45e19f4b3818af02f4b5fe87dc823fab2eff0de6010ee2ce70c9628403760566b39058114e2519c53c7c1425a812dbe87388d1063615989a8aabf' 'SKIP' - '52556e0709590f0e15039d89b64c08c9bbeb0c61d29e3cd5a4471744968c882eb559081db1c89e846fa33d50b31e2fe9ba46d7e7e2cf5d4a23e78bc97a50c853' - '8280cfd911c1762a1cba67a72bf01c593dbcec00ab02b5f7ca2ef05dbcbae835f2d0e20f3143b0f601e233708e7a60148a1b2087aaff0e0b239361ca4792409f' - '712974b708f54b631d635601e7dff037a2fff0cd927cd09b27974fdb9232c1e495d70232afad5eaa4d2876665e099f880c23f914ed602700ef1962b5f137879f' + '4964bac1d7c17d91c798b00b4e1568aafb8b436668baa0c9098dd77b6c76701f31262659564fb2712965cec16cab13e1eb90243f12924876715eb8a8c4a704b5' + '50d8cff9af937f0dbfc4e85ad326039f82470ef1b4546f4cd6cea38da3f6a82a0f9f7f1abc7c2b446963b48f04f9810dcaf9201827dd1e959a0514a9445fd2b0' + 'b8646b71bd9c1794776d2d10edab2a748bcd40efdfd5840a3c74d6736816cb6908fddfed754a1562062c745ab419256bef74dda9aaeef45e20845c43f0ecf6c3' '87ff9026db8883dab2b1c5dcf7ead2700de6aa37000631d153fb61cccf7ab42edbd5eeac4e320e9d6aa2aadbe76f2c6386efb1aefde6f02aef95680f6ffafd0b' '337c7c4c0f37430523b9a89e716051f1a05abbc71c3109dbf201bcf1b6839a88b5edb2c6498937552e8e92255e143ea344e55478543ff1c4623ed14ea04e7af1' - '4926e63ed247f9ced0674a55d01fdf7708b468a5f4b1bdb246f60c4e80d4980f21c811b952340d3e8d1c1dde77af87e062c1b66ec6818f90fb128a713c349050' '1c1b3dfe28cd2f9026fdfa373bc59be35cf281bf22fcab12150ddded40b1355268078b9197559c4bdb9665177924fe95786028386baec90dede53264506383fd' - 'af1af8854ca5a129b6c1d5fd3d977d99af0acef4490f2a9d39ee0746467a3305e223031c4ca5cebbb1629b8611e04ea61a1bf57f7fcef4ff4da0d6bae0df8c72' - '4ef74026f82b6f0cb6cec9b992cd3f9b145083da39a37b7d8da01824c44054c72644ee0fe6d92f0329496f0fce97b7b913bca1402ef922b6cceccc360e35c5b1') + '753e0dd4ee115bd508f8a6b59309408b4ec45b95624751ac770d350acc1541defeb729d72b6f767beb2864b76e92a1baa882ea34a2f72ab6ffc92b5dc77c61fe') validpgpkeys=('46095ACC8548582C1A2699A9D27D666CD88E42B4') # Elasticsearch (Elasticsearch Signing Key) <dev_ops@elasticsearch.org> backup=('etc/default/elasticsearch' @@ -61,12 +57,11 @@ package() { cd "$pkgdir" install -dm2750 etc/elasticsearch install -dm750 etc/elasticsearch/{scripts,jvm.options.d} - install -dm755 {usr/share,var/lib,var/log}/elasticsearch - install -dm755 usr/bin + install -dm755 {usr/share,var/lib,var/log}/elasticsearch usr/share/licenses/$pkgname usr/bin cd "$srcdir" - install -Dvm644 usr/share/elasticsearch/LICENSE.txt \ - "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" + install -vm644 usr/share/elasticsearch/{LICENSE,NOTICE}.txt \ + "$pkgdir/usr/share/licenses/$pkgname" find etc/elasticsearch/ -type f -exec \ install -Dm644 {} "$pkgdir/"{} \; @@ -78,8 +73,8 @@ package() { find bin/ -type f -name elasticsearch-\* ! -name elasticsearch-cli -exec \ ln -s ../share/elasticsearch/{} "$pkgdir"/usr/{} \; - ln -s ../../../var/log/elasticsearch logs - ln -s ../../../var/lib/elasticsearch data + ln -s /var/log/elasticsearch logs + ln -s /var/lib/elasticsearch data cd "$pkgdir" install -Dm644 "$srcdir"/elasticsearch-env usr/share/elasticsearch/elasticsearch-env @@ -89,6 +84,6 @@ package() { install -Dm644 "$srcdir"/elasticsearch-keystore@.service usr/lib/systemd/system/elasticsearch-keystore@.service install -Dm644 "$srcdir"/elasticsearch-user.conf usr/lib/sysusers.d/elasticsearch.conf install -Dm644 "$srcdir"/elasticsearch-tmpfile.conf usr/lib/tmpfiles.d/elasticsearch.conf - install -Dm644 "$srcdir"/elasticsearch-sysctl.conf usr/lib/sysctl.d/elasticsearch.conf - install -Dm644 "$srcdir"/elasticsearch.default etc/default/elasticsearch + install -Dm644 "$srcdir"/usr/lib/sysctl.d/elasticsearch.conf usr/lib/sysctl.d/elasticsearch.conf + install -Dm644 "$srcdir"/etc/sysconfig/elasticsearch etc/default/elasticsearch } diff --git a/elasticsearch-env b/elasticsearch-env index 7e6b1d4474ba..704167e19f86 100644 --- a/elasticsearch-env +++ b/elasticsearch-env @@ -2,26 +2,18 @@ set -e -o pipefail -JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/default-runtime} ES_HOME=/usr/share/elasticsearch # now set the classpath ES_CLASSPATH="$ES_HOME/lib/*" # now set the path to java -if [ ! -z "$JAVA_HOME" ]; then - JAVA="$JAVA_HOME/bin/java" -else - if [ "$(uname -s)" = "Darwin" ]; then - # OSX has a different structure - JAVA="$ES_HOME/jdk/Contents/Home/bin/java" - else - JAVA="$ES_HOME/jdk/bin/java" - fi -fi +ES_JAVA_HOME=${ES_JAVA_HOME:-/usr/lib/jvm/default-runtime} +JAVA="$ES_JAVA_HOME/bin/java" +JAVA_TYPE="ES_JAVA_HOME" if [ ! -x "$JAVA" ]; then - echo "could not find java in JAVA_HOME or bundled at $JAVA" >&2 + echo "could not find java in $JAVA_TYPE at $JAVA" >&2 exit 1 fi @@ -31,6 +23,11 @@ if [ ! -z "$JAVA_TOOL_OPTIONS" ]; then unset JAVA_TOOL_OPTIONS fi +# warn that we are not observing the value of JAVA_HOME +if [ ! -z "$JAVA_HOME" ]; then + echo "warning: ignoring JAVA_HOME=$JAVA_HOME; using $JAVA_TYPE" >&2 +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 @@ -49,12 +46,7 @@ fi export HOSTNAME=$HOSTNAME -if [ -z "$ES_PATH_CONF" ]; then - ES_PATH_CONF=/etc/elasticsearch -fi - -# now make ES_PATH_CONF absolute -ES_PATH_CONF=`cd "$ES_PATH_CONF"; pwd` +ES_PATH_CONF=${ES_PATH_CONF:-/etc/elasticsearch} ES_DISTRIBUTION_FLAVOR=default ES_DISTRIBUTION_TYPE=rpm diff --git a/elasticsearch-sysctl.conf b/elasticsearch-sysctl.conf deleted file mode 100644 index 32da2c91cf27..000000000000 --- a/elasticsearch-sysctl.conf +++ /dev/null @@ -1 +0,0 @@ -vm.max_map_count=262144
\ No newline at end of file diff --git a/elasticsearch-tmpfile.conf b/elasticsearch-tmpfile.conf index 06070b46df96..0c8429bcf297 100644 --- a/elasticsearch-tmpfile.conf +++ b/elasticsearch-tmpfile.conf @@ -1,3 +1,4 @@ +d /run/elasticsearch 0755 elasticsearch elasticsearch - d /var/log/elasticsearch 0755 elasticsearch elasticsearch - d /var/lib/elasticsearch 0755 elasticsearch elasticsearch - d /usr/share/elasticsearch/plugins 0755 elasticsearch elasticsearch - diff --git a/elasticsearch.default b/elasticsearch.default deleted file mode 100644 index ade7ae924ddd..000000000000 --- a/elasticsearch.default +++ /dev/null @@ -1,13 +0,0 @@ -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.service b/elasticsearch.service index d15fff03901d..41031e322fb2 100644 --- a/elasticsearch.service +++ b/elasticsearch.service @@ -1,6 +1,6 @@ [Unit] Description=Elasticsearch -Documentation=http://www.elastic.co +Documentation=https://www.elastic.co Wants=elasticsearch-keystore.service Wants=network-online.target After=elasticsearch-keystore.service @@ -21,10 +21,9 @@ WorkingDirectory=/usr/share/elasticsearch User=elasticsearch Group=elasticsearch -PermissionsStartOnly=true -ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-keystore upgrade +ExecStartPre=+/usr/share/elasticsearch/bin/elasticsearch-keystore upgrade -ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid +ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet # StandardOutput is configured to redirect to journalctl since # some error messages may be logged in standard output before @@ -62,5 +61,8 @@ SendSIGKILL=no # When a JVM receives a SIGTERM signal it exits with code 143 SuccessExitStatus=143 +# Allow a slow startup before the systemd notifier module kicks in to extend the timeout +TimeoutStartSec=75 + [Install] WantedBy=multi-user.target diff --git a/elasticsearch@.service b/elasticsearch@.service index 10849be63e2f..647382cf66e5 100644 --- a/elasticsearch@.service +++ b/elasticsearch@.service @@ -1,6 +1,6 @@ [Unit] Description=Elasticsearch %I -Documentation=http://www.elastic.co +Documentation=https://www.elastic.co Wants=elasticsearch-keystore@%i.service Wants=network-online.target After=elasticsearch-keystore@%i.service @@ -22,10 +22,9 @@ WorkingDirectory=/usr/share/elasticsearch User=elasticsearch Group=elasticsearch -PermissionsStartOnly=true -ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-keystore upgrade +ExecStartPre=+/usr/share/elasticsearch/bin/elasticsearch-keystore upgrade -ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/%I.pid +ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/%I.pid --quiet # StandardOutput is configured to redirect to journalctl since # some error messages may be logged in standard output before @@ -63,5 +62,8 @@ SendSIGKILL=no # When a JVM receives a SIGTERM signal it exits with code 143 SuccessExitStatus=143 +# Allow a slow startup before the systemd notifier module kicks in to extend the timeout +TimeoutStartSec=75 + [Install] WantedBy=multi-user.target |