public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-misc/elasticsearch/, app-misc/elasticsearch/files/
@ 2022-07-15  8:38 Joonas Niilola
  0 siblings, 0 replies; 8+ messages in thread
From: Joonas Niilola @ 2022-07-15  8:38 UTC (permalink / raw
  To: gentoo-commits

commit:     22e925a672f4e15e825df313bb2300274b80e7d1
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Jul  7 14:13:21 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 08:38:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22e925a6

app-misc/elasticsearch: bump to 7.17.5

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-misc/elasticsearch/Manifest                    |  1 +
 app-misc/elasticsearch/elasticsearch-7.17.5.ebuild | 83 ++++++++++++++++++++++
 .../elasticsearch/files/elasticsearch.service.3    | 51 +++++++++++++
 3 files changed, 135 insertions(+)

diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest
index a1aced619273..a055ca0c19d4 100644
--- a/app-misc/elasticsearch/Manifest
+++ b/app-misc/elasticsearch/Manifest
@@ -1 +1,2 @@
+DIST elasticsearch-7.17.5-no-jdk-linux-x86_64.tar.gz 167410729 BLAKE2B c6e68176705a1ae2c72a945b2a2b7542f2cb6ebc2420fb52cf26cafdc3045c6f82a5f707062d48142875bf1fbc4be65e473ed9515d65ec25d5a460cc2af991e9 SHA512 d8bc819c9ac5a9035d08e45abf8464275cc2cad7c2f091a3e112100ffbd2605759543e111d9e44c3352f92a08230287c2cba6a91f07ab3d92513682e56b97184
 DIST elasticsearch-8.2.2-linux-x86_64.tar.gz 526116807 BLAKE2B bc30d3532bb62bee88fdfc8e3406d32884add3601363d5bf91f66c110e05241beb6b73cf7a2f8104a843628f4841a313ed5bdf3098030eb5e4567c98b69ac703 SHA512 78d1315a47ae9f082297e049320c5a9787aa9fe44cd2967f3ea37ae954ad34aaa29ca7b3210ac96955be2838d0233b7f86a3e0c66d82dda3724753a0c24c78e8

diff --git a/app-misc/elasticsearch/elasticsearch-7.17.5.ebuild b/app-misc/elasticsearch/elasticsearch-7.17.5.ebuild
new file mode 100644
index 000000000000..be38b6a483a2
--- /dev/null
+++ b/app-misc/elasticsearch/elasticsearch-7.17.5.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd tmpfiles
+
+DESCRIPTION="Free and Open, Distributed, RESTful Search Engine"
+HOMEPAGE="https://www.elastic.co/elasticsearch/"
+SRC_URI="https://artifacts.elastic.co/downloads/${PN}/${P}-no-jdk-linux-x86_64.tar.gz"
+LICENSE="Apache-2.0 BSD-2 Elastic-2.0 LGPL-3 MIT public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="acct-group/elasticsearch
+	acct-user/elasticsearch
+	sys-libs/zlib
+	virtual/jre"
+
+QA_PREBUILT="usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/\(bin\|lib\)/.*"
+QA_PRESTRIPPED="usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/\(bin\|lib\)/.*"
+
+src_prepare() {
+	default
+
+	rm LICENSE.txt NOTICE.txt || die
+	rmdir logs || die
+}
+
+src_install() {
+	keepdir /etc/${PN}
+	keepdir /etc/${PN}/scripts
+
+	insinto /etc/${PN}
+	doins -r config/.
+	rm -r config || die
+
+	fowners root:${PN} /etc/${PN}
+	fperms 2750 /etc/${PN}
+
+	insinto /usr/share/${PN}
+	doins -r .
+
+	exeinto /usr/share/${PN}/bin
+	doexe "${FILESDIR}/elasticsearch-systemd-pre-exec"
+
+	fperms -R +x /usr/share/${PN}/bin
+	fperms -R +x /usr/share/${PN}/modules/x-pack-ml/platform/linux-x86_64/bin
+
+	keepdir /var/{lib,log}/${PN}
+	fowners ${PN}:${PN} /var/{lib,log}/${PN}
+	fperms 0750 /var/{lib,log}/${PN}
+	dodir /usr/share/${PN}/plugins
+
+	insinto /etc/sysctl.d
+	newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf
+
+	newconfd "${FILESDIR}/${PN}.conf.4" ${PN}
+	newinitd "${FILESDIR}/${PN}.init.8" ${PN}
+
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf"
+	systemd_newunit "${FILESDIR}"/${PN}.service.3 ${PN}.service
+
+	newtmpfiles "${FILESDIR}"/${PN}.tmpfiles.d ${PN}.conf
+}
+
+pkg_postinst() {
+	tmpfiles_process /usr/lib/tmpfiles.d/${PN}.conf
+
+	elog
+	elog "You may create multiple instances of ${PN} by"
+	elog "symlinking the init script:"
+	elog "ln -sf /etc/init.d/${PN} /etc/init.d/${PN}.instance"
+	elog
+	elog "Please make sure you put elasticsearch.yml, log4j2.properties and scripts"
+	elog "from /etc/${PN} into the configuration directory of the instance:"
+	elog "/etc/${PN}/instance"
+	elog
+	ewarn "Please make sure you have proper permissions on /etc/${PN}"
+	ewarn "prior to keystore generation or you may experience startup fails."
+	ewarn "chown root:${PN} /etc/${PN} && chmod 2750 /etc/${PN}"
+	ewarn "chown root:${PN} /etc/${PN}/${PN}.keystore && chmod 0660 /etc/${PN}/${PN}.keystore"
+}

diff --git a/app-misc/elasticsearch/files/elasticsearch.service.3 b/app-misc/elasticsearch/files/elasticsearch.service.3
new file mode 100644
index 000000000000..69d3550e7d98
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.service.3
@@ -0,0 +1,51 @@
+[Unit]
+Description=Elasticsearch
+Documentation=https://www.elastic.co
+Wants=network.target
+After=network.target
+
+[Service]
+Environment=ES_HOME=/usr/share/elasticsearch
+Environment=ES_PATH_CONF=/etc/elasticsearch
+Environment=DATA_DIR=/var/lib/elasticsearch
+Environment=LOG_DIR=/var/log/elasticsearch
+Environment=PID_DIR=/run/elasticsearch
+
+WorkingDirectory=/usr/share/elasticsearch
+
+User=elasticsearch
+Group=elasticsearch
+
+PermissionsStartOnly=true
+ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec
+
+ExecStart=/usr/share/elasticsearch/bin/elasticsearch \
+                                                -p ${PID_DIR}/elasticsearch.pid \
+                                                -Epath.logs=${LOG_DIR} \
+                                                -Epath.data=${DATA_DIR}
+
+StandardOutput=journal
+StandardError=inherit
+
+# Specifies the maximum file descriptor number that can be opened by this process
+LimitNOFILE=65536
+
+# Specifies the maximum number of bytes of memory that may be locked into RAM
+# Set to "infinity" if you use the 'bootstrap.memory_lock: true' option
+# in elasticsearch.yml and 'MAX_LOCKED_MEMORY=unlimited' in /etc/conf.d/elasticsearch
+#LimitMEMLOCK=infinity
+
+# Disable timeout logic and wait until process is stopped
+TimeoutStopSec=0
+
+# SIGTERM signal is used to stop the Java process
+KillSignal=SIGTERM
+
+# Java process is never killed
+SendSIGKILL=no
+
+# When a JVM receives a SIGTERM signal it exits with code 143
+SuccessExitStatus=143
+
+[Install]
+WantedBy=multi-user.target


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-misc/elasticsearch/, app-misc/elasticsearch/files/
@ 2021-03-30  7:25 Joonas Niilola
  0 siblings, 0 replies; 8+ messages in thread
From: Joonas Niilola @ 2021-03-30  7:25 UTC (permalink / raw
  To: gentoo-commits

commit:     85494c7240b9621bbda8a7baa97fb1fd9b7d8522
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Mar 25 14:53:18 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Mar 30 07:25:19 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85494c72

app-misc/elasticsearch: bump to 7.12.0

Bug: https://bugs.gentoo.org/775059
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-misc/elasticsearch/Manifest                    |  1 +
 app-misc/elasticsearch/elasticsearch-7.12.0.ebuild | 81 ++++++++++++++++++++++
 app-misc/elasticsearch/files/elasticsearch.conf.4  | 62 +++++++++++++++++
 app-misc/elasticsearch/files/elasticsearch.init.8  | 70 +++++++++++++++++++
 4 files changed, 214 insertions(+)

diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest
index 81f9d442334..427f9d66345 100644
--- a/app-misc/elasticsearch/Manifest
+++ b/app-misc/elasticsearch/Manifest
@@ -1,5 +1,6 @@
 DIST elasticsearch-6.8.14.tar.gz 149098495 BLAKE2B f1ccfcd9647a3584594a9db78f92488bc6bd5fe403c9b2cdff9001b87168136817084ce28eb8f14c6e54dd75b88118cf0eb6993e5502e74ecf826938f4c2ff57 SHA512 d7ca05707b9e3d8de19aaebc7811891a82897b2407f3de27ac95b2aad0d6669217c741e14bf768c3ea963977e3fa2ecc2f6d297aeafe985db52f6eb6780912b7
 DIST elasticsearch-7.10.2-no-jdk-linux-x86_64.tar.gz 164380146 BLAKE2B 16797ed48c4cb6f91ed891014f275ad86a4852579232df1827413389fc9e505327412729f70783750252190a34b0e0d552ec0b5f25f3d0a811724191eccc6568 SHA512 bd3def00af04670ad04556c911ef8c68b639e1c3b621f36a8973d9700f95873d10bc706a4e3a98f892ac59c1b761d56035a236068d6958af772874e428940dc4
+DIST elasticsearch-7.12.0-no-jdk-linux-x86_64.tar.gz 173069694 BLAKE2B 5de74b1e6de743246cf48e32254f9646fa25c2820d0be9df886fdefe131a302ddb8906546147f0d284e2fc0faf8cc0238bf854fe1611d28bf1e7cb1518bd4e31 SHA512 205aa2a2fa2ab7eb7b54087420e0123aa97e5456e2e1f31cad9ea7b84be3f9823a2a7c47d4cf1697833e5f795359477d3a3b0ea4955a8f92583cf2228071827e
 DIST elasticsearch-7.9.3-no-jdk-linux-x86_64.tar.gz 162808745 BLAKE2B e6a12ec3cc3bec0bdf8dd10680dd86214bf619b1abfdfeb8524b0b0f50a0f1faaf03b13f06ab62055f80c7987dd04b0dd9f2beba16dd59a5d346fc6cceb51acd SHA512 fea21591edc790b9d5c48151619921085d1b0e5dad1f8c43efbd44a58babeb8bfad52f4329f1f34c71d47618e24d7320c0e591f8eb65d15c2b9c3e1492d91680
 DIST elasticsearch-oss-6.8.14.tar.gz 68236681 BLAKE2B 09c6c23517b880ee1afb1c3472d4518172927c226386c7d0f2f5b9312e7de236bd6fa7d527b949e3cace759af6a1fdfe7d72f1ccf8e2c6e15919c4c8c989ee9e SHA512 c0372969ec9e5f7aff551bc0aa13684fdaccd5a553e8ee896979488ab2f13181642222ab4eca4dc799181bce1405200b5aea4866c830483ce1e484fa6a714998
 DIST elasticsearch-oss-7.10.2-no-jdk-linux-x86_64.tar.gz 76383466 BLAKE2B e99c04b0d10ef5755986515c7127ebde00b58e0eba69b6a05e12bd0bffee70266bbb023680584bfe0f321d5a3cf79af89cce3a5191923ad721a9f6039ab82743 SHA512 7b63237996569ccdc7c9d9e7cc097fcb23865396eddac30e5f02543484220d2fc70a7285b430877e5e76a5d8716d9682de9fc40d5e57a08f331e82011fc59756

diff --git a/app-misc/elasticsearch/elasticsearch-7.12.0.ebuild b/app-misc/elasticsearch/elasticsearch-7.12.0.ebuild
new file mode 100644
index 00000000000..1eba30da241
--- /dev/null
+++ b/app-misc/elasticsearch/elasticsearch-7.12.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd tmpfiles
+
+DESCRIPTION="Free and Open, Distributed, RESTful Search Engine"
+HOMEPAGE="https://www.elastic.co/elasticsearch/"
+SRC_URI="https://artifacts.elastic.co/downloads/${PN}/${P}-no-jdk-linux-x86_64.tar.gz"
+LICENSE="Apache-2.0 BSD-2 Elastic-2.0 LGPL-3 MIT public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="acct-group/elasticsearch
+	acct-user/elasticsearch
+	virtual/jre"
+
+QA_PRESTRIPPED="usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/\(bin\|lib\)/.*"
+
+src_prepare() {
+	default
+
+	rm LICENSE.txt NOTICE.txt || die
+	rmdir logs || die
+}
+
+src_install() {
+	keepdir /etc/${PN}
+	keepdir /etc/${PN}/scripts
+
+	insinto /etc/${PN}
+	doins -r config/.
+	rm -r config || die
+
+	fowners root:${PN} /etc/${PN}
+	fperms 2750 /etc/${PN}
+
+	insinto /usr/share/${PN}
+	doins -r .
+
+	exeinto /usr/share/${PN}/bin
+	doexe "${FILESDIR}/elasticsearch-systemd-pre-exec"
+
+	fperms -R +x /usr/share/${PN}/bin
+	fperms -R +x /usr/share/${PN}/modules/x-pack-ml/platform/linux-x86_64/bin
+
+	keepdir /var/{lib,log}/${PN}
+	fowners ${PN}:${PN} /var/{lib,log}/${PN}
+	fperms 0750 /var/{lib,log}/${PN}
+	dodir /usr/share/${PN}/plugins
+
+	insinto /etc/sysctl.d
+	newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf
+
+	newconfd "${FILESDIR}/${PN}.conf.4" ${PN}
+	newinitd "${FILESDIR}/${PN}.init.8" ${PN}
+
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf"
+	systemd_newunit "${FILESDIR}"/${PN}.service.3 ${PN}.service
+
+	newtmpfiles "${FILESDIR}"/${PN}.tmpfiles.d ${PN}.conf
+}
+
+pkg_postinst() {
+	tmpfiles_process /usr/lib/tmpfiles.d/${PN}.conf
+
+	elog
+	elog "You may create multiple instances of ${PN} by"
+	elog "symlinking the init script:"
+	elog "ln -sf /etc/init.d/${PN} /etc/init.d/${PN}.instance"
+	elog
+	elog "Please make sure you put elasticsearch.yml, log4j2.properties and scripts"
+	elog "from /etc/${PN} into the configuration directory of the instance:"
+	elog "/etc/${PN}/instance"
+	elog
+	ewarn "Please make sure you have proper permissions on /etc/${PN}"
+	ewarn "prior to keystore generation or you may experience startup fails."
+	ewarn "chown root:${PN} /etc/${PN} && chmod 2750 /etc/${PN}"
+	ewarn "chown root:${PN} /etc/${PN}/${PN}.keystore && chmod 0660 /etc/${PN}/${PN}.keystore"
+}

diff --git a/app-misc/elasticsearch/files/elasticsearch.conf.4 b/app-misc/elasticsearch/files/elasticsearch.conf.4
new file mode 100644
index 00000000000..a76bc5b7be3
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.conf.4
@@ -0,0 +1,62 @@
+################################
+# Elasticsearch
+################################
+
+# Elasticsearch home directory
+#ES_HOME=/usr/share/elasticsearch
+
+# Elasticsearch Java path
+#ES_JAVA_HOME=
+
+# Elasticsearch configuration directory
+#CONF_DIR=/etc/elasticsearch
+
+# Elasticsearch data directory
+#DATA_DIR=/var/lib/elasticsearch
+
+# Elasticsearch logs directory
+#LOG_DIR=/var/log/elasticsearch
+
+# Additional Java OPTS
+#ES_JAVA_OPTS=
+
+################################
+# Elasticsearch service
+################################
+
+# When executing the init script, this user will be used to run the elasticsearch service.
+# The default value is 'elasticsearch' and is declared in the init.d file.
+# Note that this setting is only used by the init script. If changed, make sure that
+# the configured user can read and write into the data, work, plugins and log directories.
+# For systemd service, the user is usually configured in file /usr/lib/systemd/system/elasticsearch.service
+#ES_USER=elasticsearch
+#ES_GROUP=elasticsearch
+
+# The number of seconds to wait before checking if Elasticsearch started successfully as a daemon process
+#ES_STARTUP_SLEEP_TIME=5
+
+################################
+# System properties
+################################
+
+# Specifies the maximum file descriptor number that can be opened by this process
+# When using Systemd, this setting is ignored and the LimitNOFILE defined in
+# /usr/lib/systemd/system/elasticsearch.service takes precedence
+MAX_OPEN_FILES=65536
+
+# The maximum number of bytes of memory that may be locked into RAM
+# Set to "unlimited" if you use the 'bootstrap.memory_lock: true' option
+# in elasticsearch.yml.
+# When using Systemd, the LimitMEMLOCK property must be set
+# in /usr/lib/systemd/system/elasticsearch.service
+MAX_LOCKED_MEMORY=unlimited
+
+# Maximum number of VMA (Virtual Memory Areas) a process can own
+# When using Systemd, this setting is ignored and the 'vm.max_map_count'
+# property is set at boot time in /usr/lib/sysctl.d/elasticsearch.conf
+#MAX_MAP_COUNT=262144
+
+# https://www.elastic.co/guide/en/elasticsearch/reference/master/max-number-of-threads.html
+MAX_THREADS=4096
+
+rc_ulimit="-l $MAX_LOCKED_MEMORY -n $MAX_OPEN_FILES -u $MAX_THREADS"

diff --git a/app-misc/elasticsearch/files/elasticsearch.init.8 b/app-misc/elasticsearch/files/elasticsearch.init.8
new file mode 100644
index 00000000000..e45ece0829b
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.init.8
@@ -0,0 +1,70 @@
+#!/sbin/openrc-run
+
+name="Elasticsearch"
+description="Elasticsearch Server"
+
+ES_INSTANCE=${RC_SVCNAME#*.}
+
+if [ -n "${ES_INSTANCE}" ] && [ ${RC_SVCNAME} != "elasticsearch" ]; then
+	ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}"
+	CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}"
+	DEFAULT_LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}"
+else
+	ES_BASE_PATH="/var/lib/elasticsearch/_default"
+	CONF_DIR="/etc/elasticsearch"
+	DEFAULT_LOG_DIR="/var/log/elasticsearch/_default"
+fi
+
+ES_HOME=${ES_HOME:="/usr/share/elasticsearch"}
+ES_USER=${ES_USER:="elasticsearch"}
+ES_GROUP=${ES_GROUP:="elasticsearch"}
+ES_STARTUP_SLEEP_TIME=${ES_STARTUP_TIME:=5}
+ES_JAVA_HOME=${ES_JAVA_HOME:=$(java-config -g JAVA_HOME)}
+MAX_OPEN_FILES=${MAX_OPEN_FILES:=65536}
+MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144}
+
+DATA_DIR=${DATA_DIR:="${ES_BASE_PATH}/data"}
+LOG_DIR=${LOG_DIR:="${DEFAULT_LOG_DIR}"}
+
+if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then
+    ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh"
+fi
+
+export ES_INCLUDE
+export ES_JAVA_HOME
+export ES_JAVA_OPTS
+export ES_JVM_OPTIONS
+export ES_STARTUP_SLEEP_TIME
+export ES_PATH_CONF="${CONF_DIR}"
+
+pidfile="/run/elasticsearch/${RC_SVCNAME}.pid"
+
+command="/usr/share/elasticsearch/bin/elasticsearch"
+command_args="-Epath.logs=${LOG_DIR} -Epath.data=${DATA_DIR}"
+command_args_background="--daemonize --pidfile=${pidfile}"
+command_user="${ES_USER}:${ES_GROUP}"
+required_files="${CONF_DIR}/elasticsearch.yml"
+retry="TERM/30/KILL/30"
+
+depend() {
+	use net
+}
+
+start_pre() {
+	if [ -n "${MAX_MAP_COUNT}" -a -f /proc/sys/vm/max_map_count ]; then
+		sysctl -q -w vm.max_map_count=${MAX_MAP_COUNT}
+	fi
+
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/lib/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/log/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/run/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${ES_BASE_PATH}"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${LOG_DIR}"
+
+	# fails to start without keystore
+	if [ ! -f "${CONF_DIR}/elasticsearch.keystore" ]; then
+		"${ES_HOME}/bin/elasticsearch-keystore" create
+	else
+		"${ES_HOME}/bin/elasticsearch-keystore" upgrade
+	fi
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-misc/elasticsearch/, app-misc/elasticsearch/files/
@ 2019-07-31  0:50 Georgy Yakovlev
  0 siblings, 0 replies; 8+ messages in thread
From: Georgy Yakovlev @ 2019-07-31  0:50 UTC (permalink / raw
  To: gentoo-commits

commit:     1e4a23a801b0236689bc4663b8d5712a29422791
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue Jul 30 22:13:50 2019 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Jul 31 00:49:21 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e4a23a8

app-misc/elasticsearch: bump to 7.2.1

Closes: https://bugs.gentoo.org/689394
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/12584
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 app-misc/elasticsearch/Manifest                   |  2 +
 app-misc/elasticsearch/elasticsearch-7.2.1.ebuild | 86 +++++++++++++++++++++++
 app-misc/elasticsearch/files/elasticsearch.init.7 | 71 +++++++++++++++++++
 3 files changed, 159 insertions(+)

diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest
index 974b7bc0b06..7b76142d351 100644
--- a/app-misc/elasticsearch/Manifest
+++ b/app-misc/elasticsearch/Manifest
@@ -4,8 +4,10 @@ DIST elasticsearch-6.7.1.tar.gz 148542786 BLAKE2B 4a9acd16788e6d84acfac09ee24341
 DIST elasticsearch-6.8.1.tar.gz 148584086 BLAKE2B dacc3fdf142fc46ede2a5891f95f69a1200632c46b57eb03f948437a39ef92538da7d3e64afd52c4acae478e6758b355729f8cbf8ceb91aa3d34353ff434fed4 SHA512 1d484287e9b67b16c28f1a4d2267e7ceb5a4438a18b26b3a46d4a176bb3f2f6fcadcbda617a7a91418293880d38c027266cb81a4e8893a28adee9fa693b2318b
 DIST elasticsearch-7.0.0-no-jdk-linux-x86_64.tar.gz 149074223 BLAKE2B 3c210b81de8882f99be45adc811c3867acb276978d3c788db5cb00ec0eacd0f096933849dfa066160ca2ec05e3fa2962329b200614db9927e4424602da53508f SHA512 b499aeab6a3f883547974b36221fd808a9da70ae0622856582287dcf729c3a2acfb1faef2727b17be97f64d8bb56ac5cdbae6d63f2a146027153f170ae6d91fc
 DIST elasticsearch-7.2.0-no-jdk-linux-x86_64.tar.gz 138948007 BLAKE2B 0e03779669f6113eac1561a3a907d8a3286ac7c7229e0ff7ad46ede4f22a2829f8d2ffafb319427f789fb95cca6669c59f8d840ec83625889bcdd6ada91be1d5 SHA512 b49a6d6b7361c499b1d9a9118746229113eaf4b88c1ad755c1ae8fd713428db4bc296cd75f3df58a239b09d6a8281f670f69c320839ef000596c776141cb1ce6
+DIST elasticsearch-7.2.1-no-jdk-linux-x86_64.tar.gz 138949755 BLAKE2B 3c77cec89a93c6b5d213afc326ef84df7d77c052914b387dc4ba35276d8f9814689d5305a131e1c647ece31277533e882b1170ad03eb3869f8443471223db066 SHA512 d2827be0b06361ab08f558dc88f76c614fb6a243a6d845749b3d23dff4078ffa58cc1b3407b84197d0f027ea9af5475fad8e3a503fc573ba31756bdd16a589d9
 DIST elasticsearch-oss-6.6.1.tar.gz 34492424 BLAKE2B 9a63aeb86ec3bebbe685804b262316726cb93b42693f9ba8937cac65c7ec186f0bb470893568234a0b7cc8b58f0c91d2af94eb16c3d016e7533231eba32fdbb0 SHA512 0e536ff760673dd740f790f1b0c01d984bf989a4a9ad3c4fe998de4f824330ce0d5ea18f04421a8648af719aabd25a4393f90182079186e48cef539b5621914c
 DIST elasticsearch-oss-6.7.1.tar.gz 68421385 BLAKE2B cf14f3babfc5dbe9de4c9e47c15b797ab7c73236936257043c435751a0d86348e34ee73d2a6785a9e1391edc1e00f9a56f922c368ef72a5d349175ee4735d43b SHA512 4865ebd3403593048b3f922769d6d09eb1d53a42cf206cdcba7c30e330b39d9bd57f9f0979a23fcf0ca7636d84ce85de210fdf655447fab7ecebb35bffdd3323
 DIST elasticsearch-oss-6.8.1.tar.gz 68419519 BLAKE2B cf34c4cf095b4271d067802df8130d66167e5f01fd0231361ce3e7f5e1023b39e6fbc325cc575f2c353a30b011127934b7b7a04f9a48998f88d27ce8a5560bf4 SHA512 cbcc81b8dd3a7a63c6e6574405417821c5dcd1a0b5df813818d39353fa29ea28e443db64b1a1938a1ffb23aa17d706e3edb6a46fdb24992b92f918d8d4f0c08a
 DIST elasticsearch-oss-7.0.0-no-jdk-linux-x86_64.tar.gz 68788144 BLAKE2B 29206b277dc9997b155b54217f485c314a7efa35777bcb81908ce900e134e62d7ef14629cfeebcd3ebb724b76fe5380085ae6b50df46bdfddf5f657a0d2da3eb SHA512 ec9381d9310145b80fb2b8cdd7b7953ea7b2b45a66bf8435d8a982aed0eeb59f734f3936b4b40ec4530e106878d25c2f63d4ea7a734b12f1c8d86b39f7894963
 DIST elasticsearch-oss-7.2.0-no-jdk-linux-x86_64.tar.gz 68964879 BLAKE2B 6bebff074d9a22abaf1a7b669d9a47254a658f4954b2e27d4251860a0b8cd29f4bbc3baf217d7fb90c492d5dabce802b1e4d359531202e677ffcfd573b51b343 SHA512 a538c82dc177a66004912ce20b1b50ee1270e45b56879b4f0b7e2d4bfa00d9fe5c113b5e4927cb6f5669f8a1f2f4953c4bb12dc4a10510af4658bbcbcaba3cbc
+DIST elasticsearch-oss-7.2.1-no-jdk-linux-x86_64.tar.gz 68973563 BLAKE2B 5248a5e8443794134c55ef14d1b175ff931d599a45b4cbd0f187e864dd3d4b322f10df31672c0900417e84da0e83fd934234bba31dc116c5c3b6b9f14e9c62a6 SHA512 694aca59cc3e23bfcf41142d7bf3d3c75f6fcdb6d0a1b35157157cb2f4ac8152db1e424951e62ba1a2bd4a2d32a77bb9499085558b7e1580680c0de90fbc0902

diff --git a/app-misc/elasticsearch/elasticsearch-7.2.1.ebuild b/app-misc/elasticsearch/elasticsearch-7.2.1.ebuild
new file mode 100644
index 00000000000..37f142d8774
--- /dev/null
+++ b/app-misc/elasticsearch/elasticsearch-7.2.1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd user
+
+DESCRIPTION="Open Source, Distributed, RESTful, Search Engine"
+HOMEPAGE="https://www.elastic.co/products/elasticsearch"
+SRC_URI="x-pack? ( https://artifacts.elastic.co/downloads/${PN}/${P}-no-jdk-linux-x86_64.tar.gz )
+	!x-pack? ( https://artifacts.elastic.co/downloads/${PN}/${PN}-oss-${PV}-no-jdk-linux-x86_64.tar.gz )"
+LICENSE="Apache-2.0 BSD-2 LGPL-3 MIT public-domain x-pack? ( Elastic )"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="x-pack"
+
+RDEPEND="virtual/jre"
+
+QA_PRESTRIPPED="usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/\(bin\|lib\)/.*"
+
+pkg_setup() {
+	enewgroup ${PN}
+	enewuser ${PN} -1 /bin/bash /usr/share/${PN} ${PN}
+}
+
+src_prepare() {
+	default
+
+	rm LICENSE.txt NOTICE.txt || die
+	rmdir logs || die
+}
+
+src_install() {
+	keepdir /etc/${PN}
+	keepdir /etc/${PN}/scripts
+
+	insinto /etc/${PN}
+	doins -r config/.
+	rm -r config || die
+
+	fowners root:${PN} /etc/${PN}
+	fperms 2750 /etc/${PN}
+
+	insinto /usr/share/${PN}
+	doins -r .
+
+	exeinto /usr/share/${PN}/bin
+	doexe "${FILESDIR}/elasticsearch-systemd-pre-exec"
+
+	chmod +x "${ED}"/usr/share/${PN}/bin/* || die
+
+	if use x-pack; then
+		chmod +x "${ED}"/usr/share/${PN}/modules/x-pack-ml/platform/linux-x86_64/bin/* || die
+	fi
+
+	keepdir /var/{lib,log}/${PN}
+	fowners ${PN}:${PN} /var/{lib,log}/${PN}
+	fperms 0750 /var/{lib,log}/${PN}
+	dodir /usr/share/${PN}/plugins
+
+	insinto /etc/sysctl.d
+	newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf
+
+	newconfd "${FILESDIR}/${PN}.conf.3" ${PN}
+	newinitd "${FILESDIR}/${PN}.init.7" ${PN}
+
+	systemd_install_serviced "${FILESDIR}/${PN}.service.conf"
+	systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d" ${PN}.conf
+	systemd_newunit "${FILESDIR}"/${PN}.service.3 ${PN}.service
+}
+
+pkg_postinst() {
+	elog
+	elog "You may create multiple instances of ${PN} by"
+	elog "symlinking the init script:"
+	elog "ln -sf /etc/init.d/${PN} /etc/init.d/${PN}.instance"
+	elog
+	elog "Please make sure you put elasticsearch.yml, log4j2.properties and scripts"
+	elog "from /etc/${PN} into the configuration directory of the instance:"
+	elog "/etc/${PN}/instance"
+	elog
+	ewarn "Please make sure you have proper permissions on /etc/${PN}"
+	ewarn "prior to keystore generation or you may experience startup fails."
+	ewarn "chown root:${PN} /etc/${PN} && chmod 2750 /etc/${PN}"
+	ewarn "chown root:${PN} /etc/${PN}/${PN}.keystore && chmod 0660 /etc/${PN}/${PN}.keystore"
+}

diff --git a/app-misc/elasticsearch/files/elasticsearch.init.7 b/app-misc/elasticsearch/files/elasticsearch.init.7
new file mode 100644
index 00000000000..cac781c968d
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.init.7
@@ -0,0 +1,71 @@
+#!/sbin/openrc-run
+
+name="Elasticsearch"
+description="Elasticsearch Server"
+
+ES_INSTANCE=${RC_SVCNAME#*.}
+
+if [ -n "${ES_INSTANCE}" ] && [ ${RC_SVCNAME} != "elasticsearch" ]; then
+	ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}"
+	CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}"
+	DEFAULT_LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}"
+else
+	ES_BASE_PATH="/var/lib/elasticsearch/_default"
+	CONF_DIR="/etc/elasticsearch"
+	DEFAULT_LOG_DIR="/var/log/elasticsearch/_default"
+fi
+
+ES_HOME=${ES_HOME:="/usr/share/elasticsearch"}
+ES_USER=${ES_USER:="elasticsearch"}
+ES_GROUP=${ES_GROUP:="elasticsearch"}
+ES_STARTUP_SLEEP_TIME=${ES_STARTUP_TIME:=5}
+JAVA_HOME=${JAVA_HOME:=$(java-config -g JAVA_HOME)}
+MAX_OPEN_FILES=${MAX_OPEN_FILES:=65536}
+MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144}
+
+DATA_DIR=${DATA_DIR:="${ES_BASE_PATH}/data"}
+LOG_DIR=${LOG_DIR:="${DEFAULT_LOG_DIR}"}
+
+if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then
+    ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh"
+fi
+
+export ES_INCLUDE
+export JAVA_HOME
+export JAVA_OPTS
+export ES_JVM_OPTIONS
+export ES_JAVA_OPTS
+export ES_STARTUP_SLEEP_TIME
+export ES_PATH_CONF="${CONF_DIR}"
+
+pidfile="/run/elasticsearch/${RC_SVCNAME}.pid"
+
+command="/usr/share/elasticsearch/bin/elasticsearch"
+command_args="-Epath.logs=${LOG_DIR} -Epath.data=${DATA_DIR}"
+command_args_background="--daemonize --pidfile=${pidfile}"
+command_user="${ES_USER}:${ES_GROUP}"
+required_files="${CONF_DIR}/elasticsearch.yml"
+retry="TERM/30/KILL/30"
+
+depend() {
+	use net
+}
+
+start_pre() {
+	if [ -n "${MAX_MAP_COUNT}" -a -f /proc/sys/vm/max_map_count ]; then
+		sysctl -q -w vm.max_map_count=${MAX_MAP_COUNT}
+	fi
+
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/lib/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/log/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/run/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${ES_BASE_PATH}"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${LOG_DIR}"
+
+	# fails to start without keystore
+	if [ ! -f "${CONF_DIR}/elasticsearch.keystore" ]; then
+		"${ES_HOME}/bin/elasticsearch-keystore" create
+	else
+		"${ES_HOME}/bin/elasticsearch-keystore" upgrade
+	fi
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-misc/elasticsearch/, app-misc/elasticsearch/files/
@ 2018-01-08 12:52 Tony Vroon
  0 siblings, 0 replies; 8+ messages in thread
From: Tony Vroon @ 2018-01-08 12:52 UTC (permalink / raw
  To: gentoo-commits

commit:     f709630fc7ee38948f67288fad113feae2ff75ba
Author:     Tony Vroon <chainsaw <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  8 12:52:18 2018 +0000
Commit:     Tony Vroon <chainsaw <AT> gentoo <DOT> org>
CommitDate: Mon Jan  8 12:52:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f709630f

app-misc/elasticsearch: Most recent SugarCRM Enterprise supported release. Remove faulty release.

Package-Manager: Portage-2.3.13, Repoman-2.3.3

 app-misc/elasticsearch/Manifest                    |  2 +-
 ...rch-1.7.5.ebuild => elasticsearch-1.7.6.ebuild} |  2 +-
 app-misc/elasticsearch/files/elasticsearch.init.1  | 64 ++++++++++++++++++++++
 3 files changed, 66 insertions(+), 2 deletions(-)

diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest
index 9ddccc402db..15417d6ba11 100644
--- a/app-misc/elasticsearch/Manifest
+++ b/app-misc/elasticsearch/Manifest
@@ -1,4 +1,4 @@
-DIST elasticsearch-1.7.5.tar.gz 28487351 BLAKE2B 96c18bf85378eecb330ed493794a448c0d3285d1c36d1add31d7840974d1a20516b0c008ce749249de105f6f6bd93b95bfd7f97ab02d4bb5d61ebf58060646ae SHA512 372e9edf5bd9f68c476e15276fc90cf2ecddbafde17fe803e6a50261c2d3a80616a9440d86494d8cfa411703f87cf053d31c62f4cdee260d64cdc0c07b5741ba
+DIST elasticsearch-1.7.6.tar.gz 28488767 BLAKE2B 0dc4fb10355e2139ee3a7e7e65366e8aa533b9714bf0f00d2bd8f4ef0669ba9f8f10dc5255c8c7a62abc0362e08ab5fda3c8b6b6f2bacfe5cce7255973293162 SHA512 2746f09b66919912e785c8d25c50ae74dbb38a41d99d9c926550786f9c2d7953d1ae1a54a32dae59a7269e5fbfa74dfbc91c3d412e415efd01c391ef7d329ba7
 DIST elasticsearch-5.5.3.tar.gz 33486646 BLAKE2B 4f28d843b2daa73af1160436f9eedd20b9d91ee8d4454a210ad59c736c0ac0bd91384d972583d4de7e7dbc228b3e37546343da68545312333379298042ad8214 SHA512 013e238a3ccdb795b9472a6111ae804b770435776dfb703b379c34498591d3804e45fb27a7c473348917b4d9e6fde367184474680f1f72bbca129bf9644fb527
 DIST elasticsearch-5.6.5.tar.gz 33780822 BLAKE2B 0541e27d7d9d18ec308495ab1cfb65c8f8e79960ef5d110ef5194a4033301b858a676c8c4d61f246e01ebc5679280c3eafe628e22ccfd84de9129f7a4606a041 SHA512 c3f31f561631c3f8df53cb49ac9a86dff3bcaa9e3ea2ac67dd959900ec1ddf676d307c9d8319ac51062072e506994934c61395049f6a6eac67e377d53517103f
 DIST elasticsearch-6.0.1.tar.gz 28026460 BLAKE2B a70cd36affaccccf1ea552167e585a35cc748de1137cf4b23387798ae31b851104ccc19f8be83ecc645bcebfba344b5e55a397a9cbb0b380c4a118f1f0ffecf2 SHA512 b86a04acd194e7e96e3a32de6ab4983d6569ffb1714f2af9e2b49623004987e13e57c5db055153a188f5d2d7eea63d649fa87769f7625f3fc4923e0cd5b8f3ee

diff --git a/app-misc/elasticsearch/elasticsearch-1.7.5.ebuild b/app-misc/elasticsearch/elasticsearch-1.7.6.ebuild
similarity index 96%
rename from app-misc/elasticsearch/elasticsearch-1.7.5.ebuild
rename to app-misc/elasticsearch/elasticsearch-1.7.6.ebuild
index 8813d90d9d7..eca489c9bd2 100644
--- a/app-misc/elasticsearch/elasticsearch-1.7.5.ebuild
+++ b/app-misc/elasticsearch/elasticsearch-1.7.6.ebuild
@@ -52,7 +52,7 @@ src_install() {
 
 	keepdir /var/{lib,log}/${MY_PN}
 
-	newinitd "${FILESDIR}/elasticsearch.init.3" "${MY_PN}"
+	newinitd "${FILESDIR}/elasticsearch.init.1" "${MY_PN}"
 	newconfd "${FILESDIR}/${MY_PN}.conf.3" "${MY_PN}"
 	systemd_newunit "${FILESDIR}"/${PN}.service.2 "${PN}.service"
 }

diff --git a/app-misc/elasticsearch/files/elasticsearch.init.1 b/app-misc/elasticsearch/files/elasticsearch.init.1
new file mode 100644
index 00000000000..c44671c95d1
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.init.1
@@ -0,0 +1,64 @@
+#!/sbin/openrc-run
+
+name="Elasticsearch"
+description="Elasticsearch Server"
+
+ES_INSTANCE=${SVCNAME#*.}
+
+if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then
+	ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}"
+	CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}"
+	LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}"
+else
+	ES_BASE_PATH="/var/lib/elasticsearch/_default"
+	CONF_DIR="/etc/elasticsearch"
+	LOG_DIR="/var/log/elasticsearch/_default"
+fi
+
+ES_DATA_PATH="${ES_BASE_PATH}/data"
+ES_WORK_PATH="${ES_BASE_PATH}/work"
+
+ES_HOME=${ES_HOME:="/usr/share/elasticsearch"}
+ES_USER=${ES_USER:="elasticsearch"}
+ES_GROUP=${ES_GROUP:="elasticsearch"}
+ES_STARTUP_SLEEP_TIME=${ES_STARTUP_TIME:=5}
+MAX_OPEN_FILES=${MAX_OPEN_FILES:=65536}
+MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144}
+
+DATA_DIR=${DATA_DIR:="${ES_BASE_PATH}/data"}
+
+if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then
+    ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh"
+fi
+
+export ES_INCLUDE
+export JAVA_HOME
+export JAVA_OPTS
+export ES_JVM_OPTIONS
+export ES_JAVA_OPTS
+export ES_STARTUP_SLEEP_TIME
+export ES_PATH_CONF="${CONF_DIR}"
+
+pidfile="/run/elasticsearch/${RC_SVCNAME}.pid"
+
+command="/usr/share/elasticsearch/bin/elasticsearch"
+command_args="-d --pidfile=${pidfile} -Des.default.path.conf=\"${CONF_DIR}\" -Des.default.path.data=\"${ES_DATA_PATH}\" -Des.default.path.work=\"${ES_WORK_PATH}\" -Des.default.path.logs=\"${LOG_DIR}\""
+command_user="${ES_USER}:${ES_GROUP}"
+required_files="${CONF_DIR}/elasticsearch.yml"
+retry="TERM/30/KILL/30"
+
+depend() {
+	use net
+}
+
+start_pre() {
+	if [ -n "${MAX_MAP_COUNT}" -a -f /proc/sys/vm/max_map_count ]; then
+		sysctl -q -w vm.max_map_count=${MAX_MAP_COUNT}
+	fi
+
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/lib/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/log/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/run/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${ES_BASE_PATH}"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${LOG_DIR}"
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-misc/elasticsearch/, app-misc/elasticsearch/files/
@ 2017-11-25 13:22 Amy Liffey
  0 siblings, 0 replies; 8+ messages in thread
From: Amy Liffey @ 2017-11-25 13:22 UTC (permalink / raw
  To: gentoo-commits

commit:     b6022616f6caeb4d701bc0e2162e91e0127f1e84
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Sat Nov 25 03:09:11 2017 +0000
Commit:     Amy Liffey <amynka <AT> gentoo <DOT> org>
CommitDate: Sat Nov 25 13:22:32 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6022616

app-misc/elasticsearch: bump to 6.0.0

Closes:#6287

 app-misc/elasticsearch/Manifest                    |  5 +-
 app-misc/elasticsearch/elasticsearch-6.0.0.ebuild  | 69 ++++++++++++++++++++++
 app-misc/elasticsearch/files/elasticsearch.conf.3  | 62 +++++++++++++++++++
 app-misc/elasticsearch/files/elasticsearch.init.3  | 61 +++++++++++++++++++
 .../elasticsearch/files/elasticsearch.service.2    | 52 ++++++++++++++++
 5 files changed, 247 insertions(+), 2 deletions(-)

diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest
index ff083bca088..30de5e9c79e 100644
--- a/app-misc/elasticsearch/Manifest
+++ b/app-misc/elasticsearch/Manifest
@@ -1,2 +1,3 @@
-DIST elasticsearch-5.5.2.tar.gz 33485703 SHA256 0870e2c0c72e6eda976effa07aa1cdd06a9500302320b5c22ed292ce21665bf1 SHA512 62048f15b43e38a61e3a19a1599c25cd0d9009cc1172db5b450b04dec349ecd313b1f20e3d1c7ed1c101ae3e6f6c6d2cdf004a9713ad803576277f93e3adbdb9 WHIRLPOOL 3a71cef2858b76b11e1693907e745912a83f23e26c35a3456c6324fc19c317c53d4404e20134b034e41e162c1ea8d58c38bbd4afe0394d886ab32f6b698172ec
-DIST elasticsearch-5.6.4.tar.gz 33776770 SHA256 1098fc776fae8c74e65f8e17cf2ea244c1d07c4e6711340c9bb9f6df56aa45b0 SHA512 37730f39cf1711b6a20861370ef7aff4b48e7f90ad82cb1c8c92643179194c4dcdf0180691d8065304bf61e7f5a2fb1ed5c84c384e0b2ff7ad0dc58ac7352f47 WHIRLPOOL 37f1a615a7916738bb8f4809213edced96aaecf3d93df8cad0bc175c71191a6f1d3d616fc40b71e647b65e4c2e03f4f6ab9a4ff333b55d3728ca100b2181edbc
+DIST elasticsearch-5.5.2.tar.gz 33485703 BLAKE2B 96a9055041506c9e92d64f8922daeca5fcb45b0e1f34ff8a8aaf14024505bf7d2b8d786de40d267252c3354473ea6ca186cf75e8d994940b43459122a3931a0e SHA512 62048f15b43e38a61e3a19a1599c25cd0d9009cc1172db5b450b04dec349ecd313b1f20e3d1c7ed1c101ae3e6f6c6d2cdf004a9713ad803576277f93e3adbdb9
+DIST elasticsearch-5.6.4.tar.gz 33776770 BLAKE2B c74df8a496c30be315abfd7d1a71f7f8eb75de1a64a7ddd22ff742bd547ec38d417c1ce4002ed6c90b2716837ee0425cf87c910d9f810999e837d118268dcd66 SHA512 37730f39cf1711b6a20861370ef7aff4b48e7f90ad82cb1c8c92643179194c4dcdf0180691d8065304bf61e7f5a2fb1ed5c84c384e0b2ff7ad0dc58ac7352f47
+DIST elasticsearch-6.0.0.tar.gz 28017602 BLAKE2B cea47a17109eb5d46b1d94c3763f19923d97392c4a39a8dffb157b8ce60cf959e4680c2a54c5a9d204db64393f3f22dc52c0de94888753e817d808575ff352fd SHA512 25bb622d2fc557d8b8eded634a9b333766f7b58e701359e1bcfafee390776eb323cb7ea7a5e02e8803e25d8b1d3aabec0ec1b0cf492d0bab5689686fe440181c

diff --git a/app-misc/elasticsearch/elasticsearch-6.0.0.ebuild b/app-misc/elasticsearch/elasticsearch-6.0.0.ebuild
new file mode 100644
index 00000000000..aeab2b8db11
--- /dev/null
+++ b/app-misc/elasticsearch/elasticsearch-6.0.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd user
+
+DESCRIPTION="Open Source, Distributed, RESTful, Search Engine"
+HOMEPAGE="https://www.elastic.co/products/elasticsearch"
+SRC_URI="https://artifacts.elastic.co/downloads/${PN}/${P}.tar.gz"
+LICENSE="Apache-2.0 BSD-2 LGPL-3 MIT public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="virtual/jre:1.8"
+
+pkg_setup() {
+	enewgroup ${PN}
+	enewuser ${PN} -1 /bin/bash /usr/share/${PN} ${PN}
+}
+
+src_prepare() {
+	rm -v bin/*.{bat,exe} LICENSE.txt || die
+
+	default
+}
+
+src_install() {
+	keepdir /etc/${PN}
+	keepdir /etc/${PN}/scripts
+
+	insinto /etc/${PN}
+	doins config/*
+	rm -rv config || die
+
+	insinto /usr/share/${PN}
+	doins -r ./*
+
+	exeinto /usr/share/${PN}/bin
+	doexe "${FILESDIR}/elasticsearch-systemd-pre-exec"
+
+	chmod +x "${ED}"/usr/share/${PN}/bin/* || die
+
+	keepdir /var/{lib,log}/${PN}
+	fowners ${PN}:${PN} /var/{lib,log}/${PN}
+	fperms 0750 /var/{lib,log}/${PN}
+	dodir /usr/share/${PN}/plugins
+
+	insinto /etc/sysctl.d
+	newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf
+
+	newconfd "${FILESDIR}/${PN}.conf.3" ${PN}
+	newinitd "${FILESDIR}/${PN}.init.3" ${PN}
+
+	systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d" ${PN}.conf
+	systemd_newunit "${FILESDIR}"/${PN}.service.2 ${PN}.service
+}
+
+pkg_postinst() {
+	elog
+	elog "You may create multiple instances of ${PN} by"
+	elog "symlinking the init script:"
+	elog "ln -sf /etc/init.d/${PN} /etc/init.d/${PN}.instance"
+	elog
+	elog "Please make sure you put elasticsearch.yml, log4j2.properties and scripts"
+	elog "from /etc/elasticsearch into the configuration directory of the instance:"
+	elog "/etc/${PN}/instance"
+	elog
+}

diff --git a/app-misc/elasticsearch/files/elasticsearch.conf.3 b/app-misc/elasticsearch/files/elasticsearch.conf.3
new file mode 100644
index 00000000000..70c052a64cc
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.conf.3
@@ -0,0 +1,62 @@
+################################
+# Elasticsearch
+################################
+
+# Elasticsearch home directory
+#ES_HOME=/usr/share/elasticsearch
+
+# Elasticsearch Java path
+#JAVA_HOME=
+
+# Elasticsearch configuration directory
+#CONF_DIR=/etc/elasticsearch
+
+# Elasticsearch data directory
+#DATA_DIR=/var/lib/elasticsearch
+
+# Elasticsearch logs directory
+#LOG_DIR=/var/log/elasticsearch
+
+# Additional Java OPTS
+#ES_JAVA_OPTS=
+
+################################
+# Elasticsearch service
+################################
+
+# When executing the init script, this user will be used to run the elasticsearch service.
+# The default value is 'elasticsearch' and is declared in the init.d file.
+# Note that this setting is only used by the init script. If changed, make sure that
+# the configured user can read and write into the data, work, plugins and log directories.
+# For systemd service, the user is usually configured in file /usr/lib/systemd/system/elasticsearch.service
+#ES_USER=elasticsearch
+#ES_GROUP=elasticsearch
+
+# The number of seconds to wait before checking if Elasticsearch started successfully as a daemon process
+#ES_STARTUP_SLEEP_TIME=5
+
+################################
+# System properties
+################################
+
+# Specifies the maximum file descriptor number that can be opened by this process
+# When using Systemd, this setting is ignored and the LimitNOFILE defined in
+# /usr/lib/systemd/system/elasticsearch.service takes precedence
+MAX_OPEN_FILES=65536
+
+# The maximum number of bytes of memory that may be locked into RAM
+# Set to "unlimited" if you use the 'bootstrap.memory_lock: true' option
+# in elasticsearch.yml.
+# When using Systemd, the LimitMEMLOCK property must be set
+# in /usr/lib/systemd/system/elasticsearch.service
+MAX_LOCKED_MEMORY=unlimited
+
+# Maximum number of VMA (Virtual Memory Areas) a process can own
+# When using Systemd, this setting is ignored and the 'vm.max_map_count'
+# property is set at boot time in /usr/lib/sysctl.d/elasticsearch.conf
+#MAX_MAP_COUNT=262144
+
+# https://www.elastic.co/guide/en/elasticsearch/reference/master/max-number-of-threads.html
+MAX_THREADS=4096
+
+rc_ulimit="-l $MAX_LOCKED_MEMORY -n $MAX_OPEN_FILES -u $MAX_THREADS"

diff --git a/app-misc/elasticsearch/files/elasticsearch.init.3 b/app-misc/elasticsearch/files/elasticsearch.init.3
new file mode 100644
index 00000000000..ab086197ec9
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.init.3
@@ -0,0 +1,61 @@
+#!/sbin/openrc-run
+
+name="Elasticsearch"
+description="Elasticsearch Server"
+
+ES_INSTANCE=${SVCNAME#*.}
+
+if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then
+	ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}"
+	CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}"
+	LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}"
+else
+	ES_BASE_PATH="/var/lib/elasticsearch/_default"
+	CONF_DIR="/etc/elasticsearch"
+	LOG_DIR="/var/log/elasticsearch/_default"
+fi
+
+ES_HOME=${ES_HOME:="/usr/share/elasticsearch"}
+ES_USER=${ES_USER:="elasticsearch"}
+ES_GROUP=${ES_GROUP:="elasticsearch"}
+ES_STARTUP_SLEEP_TIME=${ES_STARTUP_TIME:=5}
+MAX_OPEN_FILES=${MAX_OPEN_FILES:=65536}
+MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144}
+
+DATA_DIR=${DATA_DIR:="${ES_BASE_PATH}/data"}
+
+if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then
+    ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh"
+fi
+
+export ES_INCLUDE
+export JAVA_HOME
+export JAVA_OPTS
+export ES_JVM_OPTIONS
+export ES_JAVA_OPTS
+export ES_STARTUP_SLEEP_TIME
+export ES_PATH_CONF="${CONF_DIR}"
+
+pidfile="/run/elasticsearch/${RC_SVCNAME}.pid"
+
+command="/usr/share/elasticsearch/bin/elasticsearch"
+command_args="--daemonize --pidfile=${pidfile} -Epath.logs=${LOG_DIR} -Epath.data=${DATA_DIR}"
+command_user="${ES_USER}:${ES_GROUP}"
+required_files="${CONF_DIR}/elasticsearch.yml"
+retry="TERM/30/KILL/30"
+
+depend() {
+	use net
+}
+
+start_pre() {
+	if [ -n "${MAX_MAP_COUNT}" -a -f /proc/sys/vm/max_map_count ]; then
+		sysctl -q -w vm.max_map_count=${MAX_MAP_COUNT}
+	fi
+
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/lib/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/log/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/run/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${ES_BASE_PATH}"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${LOG_DIR}"
+}

diff --git a/app-misc/elasticsearch/files/elasticsearch.service.2 b/app-misc/elasticsearch/files/elasticsearch.service.2
new file mode 100644
index 00000000000..8db69326f26
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.service.2
@@ -0,0 +1,52 @@
+[Unit]
+Description=Elasticsearch
+Documentation=https://www.elastic.co
+Wants=network.target
+After=network.target
+
+[Service]
+Environment=ES_HOME=/usr/share/elasticsearch
+Environment=ES_PATH_CONF=/etc/elasticsearch
+Environment=DATA_DIR=/var/lib/elasticsearch
+Environment=LOG_DIR=/var/log/elasticsearch
+Environment=PID_DIR=/run/elasticsearch
+EnvironmentFile=-/etc/conf.d/elasticsearch
+
+WorkingDirectory=/usr/share/elasticsearch
+
+User=elasticsearch
+Group=elasticsearch
+
+ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec
+
+ExecStart=/usr/share/elasticsearch/bin/elasticsearch \
+                                                -p ${PID_DIR}/elasticsearch.pid \
+                                                -Epath.home=${ES_HOME} \
+                                                -Epath.logs=${LOG_DIR} \
+                                                -Epath.data=${DATA_DIR}
+
+StandardOutput=journal
+StandardError=inherit
+
+# Specifies the maximum file descriptor number that can be opened by this process
+LimitNOFILE=65536
+
+# Specifies the maximum number of bytes of memory that may be locked into RAM
+# Set to "infinity" if you use the 'bootstrap.memory_lock: true' option
+# in elasticsearch.yml and 'MAX_LOCKED_MEMORY=unlimited' in /etc/conf.d/elasticsearch
+#LimitMEMLOCK=infinity
+
+# Disable timeout logic and wait until process is stopped
+TimeoutStopSec=0
+
+# SIGTERM signal is used to stop the Java process
+KillSignal=SIGTERM
+
+# Java process is never killed
+SendSIGKILL=no
+
+# When a JVM receives a SIGTERM signal it exits with code 143
+SuccessExitStatus=143
+
+[Install]
+WantedBy=multi-user.target


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-misc/elasticsearch/, app-misc/elasticsearch/files/
@ 2017-11-05 15:37 Patrice Clement
  0 siblings, 0 replies; 8+ messages in thread
From: Patrice Clement @ 2017-11-05 15:37 UTC (permalink / raw
  To: gentoo-commits

commit:     cc73e45ad788b46de3c376f9280484f670861898
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Oct 25 14:39:02 2017 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Sun Nov  5 15:37:46 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc73e45a

app-misc/elasticsearch: use openrc-run variables.

Package-Manager: Portage-2.3.12, Repoman-2.3.3
Closes: https://github.com/gentoo/gentoo/pull/6048

 .../elasticsearch/elasticsearch-5.6.3-r1.ebuild    | 69 ++++++++++++++++++++++
 app-misc/elasticsearch/files/elasticsearch.conf.2  | 59 ++++++++++++++++++
 app-misc/elasticsearch/files/elasticsearch.init.2  | 60 +++++++++++++++++++
 3 files changed, 188 insertions(+)

diff --git a/app-misc/elasticsearch/elasticsearch-5.6.3-r1.ebuild b/app-misc/elasticsearch/elasticsearch-5.6.3-r1.ebuild
new file mode 100644
index 00000000000..cd91e97f307
--- /dev/null
+++ b/app-misc/elasticsearch/elasticsearch-5.6.3-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd user
+
+DESCRIPTION="Open Source, Distributed, RESTful, Search Engine"
+HOMEPAGE="https://www.elastic.co/products/elasticsearch"
+SRC_URI="https://artifacts.elastic.co/downloads/${PN}/${P}.tar.gz"
+LICENSE="Apache-2.0 BSD-2 LGPL-3 MIT public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="virtual/jre:1.8"
+
+pkg_setup() {
+	enewgroup ${PN}
+	enewuser ${PN} -1 /bin/bash /usr/share/${PN} ${PN}
+}
+
+src_prepare() {
+	rm -v bin/*.{bat,exe} LICENSE.txt || die
+
+	default
+}
+
+src_install() {
+	keepdir /etc/${PN}
+	keepdir /etc/${PN}/scripts
+
+	insinto /etc/${PN}
+	doins config/*
+	rm -rv config || die
+
+	insinto /usr/share/${PN}
+	doins -r ./*
+
+	exeinto /usr/share/${PN}/bin
+	doexe "${FILESDIR}/elasticsearch-systemd-pre-exec"
+
+	chmod +x "${ED}"/usr/share/${PN}/bin/* || die
+
+	keepdir /var/{lib,log}/${PN}
+	fowners ${PN}:${PN} /var/{lib,log}/${PN}
+	fperms 0750 /var/{lib,log}/${PN}
+	dodir /usr/share/${PN}/plugins
+
+	insinto /etc/sysctl.d
+	newins "${FILESDIR}/${PN}.sysctl.d" ${PN}.conf
+
+	newconfd "${FILESDIR}/${PN}.conf.2" ${PN}
+	newinitd "${FILESDIR}/${PN}.init.2" ${PN}
+
+	systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d" ${PN}.conf
+	systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service
+}
+
+pkg_postinst() {
+	elog
+	elog "You may create multiple instances of ${PN} by"
+	elog "symlinking the init script:"
+	elog "ln -sf /etc/init.d/${PN} /etc/init.d/${PN}.instance"
+	elog
+	elog "Please make sure you put elasticsearch.yml, log4j2.properties and scripts"
+	elog "from /etc/elasticsearch into the configuration directory of the instance:"
+	elog "/etc/${PN}/instance"
+	elog
+}

diff --git a/app-misc/elasticsearch/files/elasticsearch.conf.2 b/app-misc/elasticsearch/files/elasticsearch.conf.2
new file mode 100644
index 00000000000..e802448a86a
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.conf.2
@@ -0,0 +1,59 @@
+################################
+# Elasticsearch
+################################
+
+# Elasticsearch home directory
+#ES_HOME=/usr/share/elasticsearch
+
+# Elasticsearch Java path
+#JAVA_HOME=
+
+# Elasticsearch configuration directory
+#CONF_DIR=/etc/elasticsearch
+
+# Elasticsearch data directory
+#DATA_DIR=/var/lib/elasticsearch
+
+# Elasticsearch logs directory
+#LOG_DIR=/var/log/elasticsearch
+
+# Additional Java OPTS
+#ES_JAVA_OPTS=
+
+################################
+# Elasticsearch service
+################################
+
+# When executing the init script, this user will be used to run the elasticsearch service.
+# The default value is 'elasticsearch' and is declared in the init.d file.
+# Note that this setting is only used by the init script. If changed, make sure that
+# the configured user can read and write into the data, work, plugins and log directories.
+# For systemd service, the user is usually configured in file /usr/lib/systemd/system/elasticsearch.service
+#ES_USER=elasticsearch
+#ES_GROUP=elasticsearch
+
+# The number of seconds to wait before checking if Elasticsearch started successfully as a daemon process
+#ES_STARTUP_SLEEP_TIME=5
+
+################################
+# System properties
+################################
+
+# Specifies the maximum file descriptor number that can be opened by this process
+# When using Systemd, this setting is ignored and the LimitNOFILE defined in
+# /usr/lib/systemd/system/elasticsearch.service takes precedence
+MAX_OPEN_FILES=65536
+
+# The maximum number of bytes of memory that may be locked into RAM
+# Set to "unlimited" if you use the 'bootstrap.memory_lock: true' option
+# in elasticsearch.yml.
+# When using Systemd, the LimitMEMLOCK property must be set
+# in /usr/lib/systemd/system/elasticsearch.service
+MAX_LOCKED_MEMORY=unlimited
+
+# Maximum number of VMA (Virtual Memory Areas) a process can own
+# When using Systemd, this setting is ignored and the 'vm.max_map_count'
+# property is set at boot time in /usr/lib/sysctl.d/elasticsearch.conf
+#MAX_MAP_COUNT=262144
+
+rc_ulimit="-l $MAX_LOCKED_MEMORY -n $MAX_OPEN_FILES"

diff --git a/app-misc/elasticsearch/files/elasticsearch.init.2 b/app-misc/elasticsearch/files/elasticsearch.init.2
new file mode 100644
index 00000000000..6e572c58da2
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.init.2
@@ -0,0 +1,60 @@
+#!/sbin/openrc-run
+
+name="Elasticsearch"
+description="Elasticsearch Server"
+
+ES_INSTANCE=${SVCNAME#*.}
+
+if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then
+	ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}"
+	CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}"
+	LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}"
+else
+	ES_BASE_PATH="/var/lib/elasticsearch/_default"
+	CONF_DIR="/etc/elasticsearch"
+	LOG_DIR="/var/log/elasticsearch/_default"
+fi
+
+ES_HOME=${ES_HOME:="/usr/share/elasticsearch"}
+ES_USER=${ES_USER:="elasticsearch"}
+ES_GROUP=${ES_GROUP:="elasticsearch"}
+ES_STARTUP_SLEEP_TIME=${ES_STARTUP_TIME:=5}
+MAX_OPEN_FILES=${MAX_OPEN_FILES:=65536}
+MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144}
+
+DATA_DIR=${DATA_DIR:="${ES_BASE_PATH}/data"}
+
+if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then
+    ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh"
+fi
+
+export ES_INCLUDE
+export JAVA_HOME
+export JAVA_OPTS
+export ES_JVM_OPTIONS
+export ES_JAVA_OPTS
+export ES_STARTUP_SLEEP_TIME
+
+pidfile="/run/elasticsearch/${RC_SVCNAME}.pid"
+
+command="/usr/share/elasticsearch/bin/elasticsearch"
+command_args="--daemonize --pidfile=${pidfile} -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR}"
+command_user="${ES_USER}:${ES_GROUP}"
+required_files="${CONF_DIR}/elasticsearch.yml"
+retry="TERM/30/KILL/30"
+
+depend() {
+	use net
+}
+
+start_pre() {
+	if [ -n "${MAX_MAP_COUNT}" -a -f /proc/sys/vm/max_map_count ]; then
+		sysctl -q -w vm.max_map_count=${MAX_MAP_COUNT}
+	fi
+
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/lib/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/log/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/run/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${ES_BASE_PATH}"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${LOG_DIR}"
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-misc/elasticsearch/, app-misc/elasticsearch/files/
@ 2016-08-09  9:20 Patrick Lauer
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick Lauer @ 2016-08-09  9:20 UTC (permalink / raw
  To: gentoo-commits

commit:     466d922c9a8abcbe09464ca8550c2200924c8f50
Author:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  9 09:19:44 2016 +0000
Commit:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
CommitDate: Tue Aug  9 09:20:03 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=466d922c

app-misc/elasticsearch: Bump, fix #585824

Package-Manager: portage-2.3.0

 app-misc/elasticsearch/Manifest                    |  1 +
 app-misc/elasticsearch/elasticsearch-2.3.5.ebuild  | 82 ++++++++++++++++++++++
 .../elasticsearch/files/elasticsearch.sysctl.d     |  1 +
 .../elasticsearch/files/elasticsearch.tmpfiles.d   |  1 +
 4 files changed, 85 insertions(+)

diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest
index fd794e5..2d44084 100644
--- a/app-misc/elasticsearch/Manifest
+++ b/app-misc/elasticsearch/Manifest
@@ -9,3 +9,4 @@ DIST elasticsearch-2.3.1.tar.gz 27540442 SHA256 f0092e73038e0472fcdd923e5f2792e1
 DIST elasticsearch-2.3.2.tar.gz 27543334 SHA256 04c4d3913d496d217e038da88df939108369ae2e78eea29cb1adf1c4ab3a000a SHA512 73c4ca82eb0f4dc22907a94b9025e79183f6fcd38dbb82795800d10fc810dbee412784e62f9247390f0fb9aa19545976584bd2b62f1afe79d2cd64bb55f76dc8 WHIRLPOOL 5cc44a827de5281a9fb823a8a2e43755e0853dc5aa27f5ef7f8d1c5605d80a2dbf4c8756f01811a54307938cb3030634be6c8af2ffa465e2f35cd2a4aabeeb20
 DIST elasticsearch-2.3.3.tar.gz 27542289 SHA256 5fe0a6887432bb8a8d3de2e79c9b81c83cfa241e6440f0f0379a686657789165 SHA512 d3899d2f45128d218693ed2a0f9210ec6ce5fe4101d543b46edaaadceeb6768fe3cf04bf161ad09b38629bada74368133727dd735ef11132fffe81aabe0ef88b WHIRLPOOL 5f51b0c1a913a60073c212c9ee06b024b0ca50bbf7857f2ce1883ab51bbb8295c51c1c2d4e7fd98b5dc9db65cd753fd282a0eccf7568fad6608b3529f5e9ea36
 DIST elasticsearch-2.3.4.tar.gz 27547169 SHA256 371e0c5f4ded0a8548f1cce55faff3efebcfd5f895c2c816f220146521f6f06e SHA512 d6b61069b499d2fab1f4102240a5dfd9c0a0806d0cd7047935ef49da669e61066ca37284bd367df96aec79c47417b499988094737bf2e5a6e4c69f682e311bc0 WHIRLPOOL 46311e0a24d64d3b464ba1640b80294ab5ce2ab34a215a48f72a98492c2f07fd878ec99edd36a206b3445c4eebffac7be30e5af140e475ced312a6de2a8d3c06
+DIST elasticsearch-2.3.5.tar.gz 27547995 SHA256 1119a8c18620b98c4b85261318663a1f26dea92a26f34dfeb7f813fb7cbb468a SHA512 9c0cc8a9ae0fa2b52db583a5c006b05a84c1f84e1b8dbbafa88bec111190d056a23bd384d4241ce00dc8b56a6840857b296e4c0d2bf911f352ef67f128a87ca7 WHIRLPOOL de2aee3773d14c9b4abc0f20c3c8df1fe374a91ea54493f2c1df59fb8c02c97d684fd94b6bfaf140eebcfea4913197b10469b5aef34f62db89d825ae508a5095

diff --git a/app-misc/elasticsearch/elasticsearch-2.3.5.ebuild b/app-misc/elasticsearch/elasticsearch-2.3.5.ebuild
new file mode 100644
index 0000000..198f14a
--- /dev/null
+++ b/app-misc/elasticsearch/elasticsearch-2.3.5.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd user
+
+MY_PN="${PN%-bin}"
+DESCRIPTION="Open Source, Distributed, RESTful, Search Engine"
+HOMEPAGE="https://www.elastic.co/products/elasticsearch"
+SRC_URI="https://download.elasticsearch.org/${MY_PN}/release/org/${MY_PN}/distribution/tar/${MY_PN}/${PV}/${P}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT="strip"
+
+RDEPEND="|| ( virtual/jre:1.8 virtual/jre:1.7 )"
+
+pkg_preinst() {
+	if has_version '<app-misc/elasticsearch-2.3.2'; then
+		export UPDATE_NOTES=1
+	fi
+}
+
+pkg_setup() {
+	enewgroup ${MY_PN}
+	enewuser ${MY_PN} -1 /bin/bash /usr/share/${MY_PN} ${MY_PN}
+	esethome ${MY_PN} /usr/share/${MY_PN}
+}
+
+src_prepare() {
+	rm -rf bin/*.{bat,exe}
+	rm LICENSE.txt
+}
+
+src_install() {
+	dodir /etc/${MY_PN}
+	dodir /etc/${MY_PN}/scripts
+
+	insinto /etc/${MY_PN}
+	doins config/*
+	rm -rf config
+
+	insinto /usr/share/${MY_PN}
+	doins -r ./*
+
+	insinto /usr/share/${MY_PN}/bin
+	doins "${FILESDIR}/elasticsearch-systemd-pre-exec"
+
+	chmod +x "${D}"/usr/share/${MY_PN}/bin/*
+
+	keepdir /var/{lib,log}/${MY_PN}
+	keepdir /usr/share/${MY_PN}/plugins
+
+	insinto /usr/lib/tmpfiles.d
+	newins "${FILESDIR}/${MY_PN}.tmpfiles.d" "${MY_PN}.conf"
+
+	insinto /etc/sysctl.d
+	newins "${FILESDIR}/${MY_PN}.sysctl.d" "${MY_PN}.conf"
+
+	newinitd "${FILESDIR}/elasticsearch.init6" "${MY_PN}"
+	newconfd "${FILESDIR}/${MY_PN}.conf2" "${MY_PN}"
+	systemd_newunit "${FILESDIR}"/${PN}.service5 "${PN}.service"
+}
+
+pkg_postinst() {
+	elog
+	elog "You may create multiple instances of ${MY_PN} by"
+	elog "symlinking the init script:"
+	elog "ln -sf /etc/init.d/${MY_PN} /etc/init.d/${MY_PN}.instance"
+	elog
+	elog "Please make sure you put elasticsearch.yml and logging.yml"
+	elog "into the configuration directory of the instance:"
+	elog "/etc/${MY_PN}/instance"
+	elog
+	if ! [ -z ${UPDATE_NOTES} ]; then
+		elog "This update changes some configuration variables. Please review"
+		elog "/etc/conf.d/elasticsearch before restarting your services."
+	fi
+}

diff --git a/app-misc/elasticsearch/files/elasticsearch.sysctl.d b/app-misc/elasticsearch/files/elasticsearch.sysctl.d
new file mode 100644
index 0000000..62ea54d
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.sysctl.d
@@ -0,0 +1 @@
+vm.max_map_count=262144

diff --git a/app-misc/elasticsearch/files/elasticsearch.tmpfiles.d b/app-misc/elasticsearch/files/elasticsearch.tmpfiles.d
new file mode 100644
index 0000000..d079f28
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.tmpfiles.d
@@ -0,0 +1 @@
+d    /var/run/elasticsearch   0755 elasticsearch elasticsearch - -


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-misc/elasticsearch/, app-misc/elasticsearch/files/
@ 2016-05-06 10:51 Patrick Lauer
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick Lauer @ 2016-05-06 10:51 UTC (permalink / raw
  To: gentoo-commits

commit:     21dc3e1a5708d888c4d5fefdf124b03a309d5db0
Author:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Fri May  6 10:50:02 2016 +0000
Commit:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
CommitDate: Fri May  6 10:50:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21dc3e1a

app-misc/elasticsearch: Bump

Fix #569116
New init script and systemd unit, closer to upstream
Small bugfixes etc.
Thanks to Ferenc Erki for preparing and testing

Package-Manager: portage-2.2.28

 app-misc/elasticsearch/Manifest                    |   1 +
 app-misc/elasticsearch/elasticsearch-2.3.2.ebuild  |  76 +++++++++++++++
 .../files/elasticsearch-systemd-pre-exec           |   7 ++
 app-misc/elasticsearch/files/elasticsearch.conf2   |  67 ++++++++++++++
 app-misc/elasticsearch/files/elasticsearch.init6   | 102 +++++++++++++++++++++
 .../elasticsearch/files/elasticsearch.service5     |  53 +++++++++++
 6 files changed, 306 insertions(+)

diff --git a/app-misc/elasticsearch/Manifest b/app-misc/elasticsearch/Manifest
index cab832a..cf1672e 100644
--- a/app-misc/elasticsearch/Manifest
+++ b/app-misc/elasticsearch/Manifest
@@ -6,3 +6,4 @@ DIST elasticsearch-2.2.0.tar.gz 29419005 SHA256 ed70cc81e1f55cd5f0032beea2907227
 DIST elasticsearch-2.2.2.tar.gz 29425370 SHA256 c706db594f1feb5051d90697c6c412eadd60e00a9ec3b4f345a122801183af69 SHA512 144ca47dd3b9730e5ff81dd93e5db09d57a6f0d61d4445e8609c0ece833f57ca05d81fdf702d56008bc5e370604deb83d2d527132783467d5ae1eddc6cefeb84 WHIRLPOOL 4d6ced926237490a6ee8531ccf09128cc6bff5d73cff6f36159552a4a7a0dfbe01df0dfafb583d1c7ddc47ad5fa054ab6dd8c188cc7e3fe196f6917519e1afac
 DIST elasticsearch-2.3.0.tar.gz 27556947 SHA256 d68482c7633f2986263bc5f11f93b8a58c54c6cf5e337b615446d0a7c6fdcd8b SHA512 26671d64e6cd3406ad1de4543d84c66f58be4906d00ad22584350c5b28359c2b878850fb7cd0e49c9913d968380e8e386d77376c4f32fc37d3a43913c21558db WHIRLPOOL d26a3128d12630fca4defb669b7e23749f9742e1bf7c9497860effdbe6f51c8e86b467d3a16c78c77b7dd93efaa25e21c9694308292567eaa8e07794c57d60db
 DIST elasticsearch-2.3.1.tar.gz 27540442 SHA256 f0092e73038e0472fcdd923e5f2792e13692ea0f09ca034a54dd49b217110ebb SHA512 447d8824c4bfbec9b8431d213e3a8ae6720d1486e1389c271cc67cce5546861a817ef8c7db1c3c3669a50a61b5305739ac26f46b04d5674bbca203c3b5dbcf2f WHIRLPOOL e55501ca7fa702c33cd826d51c2d90dcfcc2843fb5b24b2d20df917cc291fe53f203360bfac6249b57c4c2914d92da92ca56b6505b6be885ece196983c176b9c
+DIST elasticsearch-2.3.2.tar.gz 27543334 SHA256 04c4d3913d496d217e038da88df939108369ae2e78eea29cb1adf1c4ab3a000a SHA512 73c4ca82eb0f4dc22907a94b9025e79183f6fcd38dbb82795800d10fc810dbee412784e62f9247390f0fb9aa19545976584bd2b62f1afe79d2cd64bb55f76dc8 WHIRLPOOL 5cc44a827de5281a9fb823a8a2e43755e0853dc5aa27f5ef7f8d1c5605d80a2dbf4c8756f01811a54307938cb3030634be6c8af2ffa465e2f35cd2a4aabeeb20

diff --git a/app-misc/elasticsearch/elasticsearch-2.3.2.ebuild b/app-misc/elasticsearch/elasticsearch-2.3.2.ebuild
new file mode 100644
index 0000000..a0baa8b
--- /dev/null
+++ b/app-misc/elasticsearch/elasticsearch-2.3.2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd user
+
+MY_PN="${PN%-bin}"
+DESCRIPTION="Open Source, Distributed, RESTful, Search Engine"
+HOMEPAGE="https://www.elastic.co/products/elasticsearch"
+SRC_URI="https://download.elasticsearch.org/${MY_PN}/release/org/${MY_PN}/distribution/tar/${MY_PN}/${PV}/${P}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT="strip"
+
+RDEPEND="|| ( virtual/jre:1.8 virtual/jre:1.7 )"
+
+pkg_preinst() {
+	if has_version '<app-misc/elasticsearch-2.3.2'; then
+		export UPDATE_NOTES=1
+	fi
+}
+
+pkg_setup() {
+	enewgroup ${MY_PN}
+	enewuser ${MY_PN} -1 /bin/bash /usr/share/${MY_PN} ${MY_PN}
+	esethome ${MY_PN} /usr/share/${MY_PN}
+}
+
+src_prepare() {
+	rm -rf bin/*.{bat,exe}
+	rm LICENSE.txt
+}
+
+src_install() {
+	dodir /etc/${MY_PN}
+	dodir /etc/${MY_PN}/scripts
+
+	insinto /etc/${MY_PN}
+	doins config/*
+	rm -rf config
+
+	insinto /usr/share/${MY_PN}
+	doins -r ./*
+
+	insinto /usr/share/${MY_PN}/bin
+	doins "${FILESDIR}/elasticsearch-systemd-pre-exec"
+
+	chmod +x "${D}"/usr/share/${MY_PN}/bin/*
+
+	keepdir /var/{lib,log}/${MY_PN}
+	keepdir /usr/share/${MY_PN}/plugins
+
+	newinitd "${FILESDIR}/elasticsearch.init6" "${MY_PN}"
+	newconfd "${FILESDIR}/${MY_PN}.conf2" "${MY_PN}"
+	systemd_newunit "${FILESDIR}"/${PN}.service5 "${PN}.service"
+}
+
+pkg_postinst() {
+	elog
+	elog "You may create multiple instances of ${MY_PN} by"
+	elog "symlinking the init script:"
+	elog "ln -sf /etc/init.d/${MY_PN} /etc/init.d/${MY_PN}.instance"
+	elog
+	elog "Please make sure you put elasticsearch.yml and logging.yml"
+	elog "into the configuration directory of the instance:"
+	elog "/etc/${MY_PN}/instance"
+	elog
+	if ! [ -z ${UPDATE_NOTES} ]; then
+		elog "This update changes some configuration variables. Please review"
+		elog "/etc/conf.d/elasticsearch before restarting your services."
+	fi
+}

diff --git a/app-misc/elasticsearch/files/elasticsearch-systemd-pre-exec b/app-misc/elasticsearch/files/elasticsearch-systemd-pre-exec
new file mode 100755
index 0000000..a51d639
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch-systemd-pre-exec
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# CONF_FILE setting was removed
+if [ ! -z "$CONF_FILE" ]; then
+    echo "CONF_FILE setting is no longer supported. elasticsearch.yml must be placed in the config directory and cannot be renamed."
+    exit 1
+fi

diff --git a/app-misc/elasticsearch/files/elasticsearch.conf2 b/app-misc/elasticsearch/files/elasticsearch.conf2
new file mode 100644
index 0000000..053cd18
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.conf2
@@ -0,0 +1,67 @@
+################################
+# Elasticsearch
+################################
+
+# Elasticsearch configuration directory
+#CONF_DIR=/etc/elasticsearch
+
+# Elasticsearch data directory
+#DATA_DIR=/var/lib/elasticsearch
+
+# Elasticsearch logs directory
+#LOG_DIR=/var/log/elasticsearch
+
+# Elasticsearch PID directory
+#PID_DIR=/run/elasticsearch
+
+# Heap size defaults to 256m min, 1g max
+# Set ES_HEAP_SIZE to 50% of available RAM, but no more than 31g
+#ES_HEAP_SIZE=2g
+
+# Heap new generation
+#ES_HEAP_NEWSIZE=
+
+# Maximum direct memory
+#ES_DIRECT_SIZE=
+
+# Additional Java OPTS
+#ES_JAVA_OPTS=
+
+# Path to the GC log file
+#ES_GC_LOG_FILE=/var/log/elasticsearch/gc.log
+
+################################
+# Elasticsearch service
+################################
+
+# When executing the init script, this user will be used to run the elasticsearch service.
+# The default value is 'elasticsearch' and is declared in the init.d file.
+# Note that this setting is only used by the init script. If changed, make sure that
+# the configured user can read and write into the data, work, plugins and log directories.
+# For systemd service, the user is usually configured in file /usr/lib/systemd/system/elasticsearch.service
+#ES_USER=elasticsearch
+#ES_GROUP=elasticsearch
+
+# The number of seconds to wait before checking if Elasticsearch started successfully as a daemon process
+#ES_STARTUP_SLEEP_TIME=5
+
+################################
+# System properties
+################################
+
+# Specifies the maximum file descriptor number that can be opened by this process
+# When using Systemd, this setting is ignored and the LimitNOFILE defined in
+# /usr/lib/systemd/system/elasticsearch.service takes precedence
+#MAX_OPEN_FILES=65535
+
+# The maximum number of bytes of memory that may be locked into RAM
+# Set to "unlimited" if you use the 'bootstrap.mlockall: true' option
+# in elasticsearch.yml (ES_HEAP_SIZE  must also be set).
+# When using Systemd, the LimitMEMLOCK property must be set
+# in /usr/lib/systemd/system/elasticsearch.service
+#MAX_LOCKED_MEMORY=unlimited
+
+# Maximum number of VMA (Virtual Memory Areas) a process can own
+# When using Systemd, this setting is ignored and the 'vm.max_map_count'
+# property is set at boot time in /usr/lib/sysctl.d/elasticsearch.conf
+#MAX_MAP_COUNT=262144

diff --git a/app-misc/elasticsearch/files/elasticsearch.init6 b/app-misc/elasticsearch/files/elasticsearch.init6
new file mode 100644
index 0000000..9225f48
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.init6
@@ -0,0 +1,102 @@
+#!/sbin/runscript
+
+name="Elasticsearch"
+description="Elasticsearch Server"
+
+ES_INSTANCE=${SVCNAME#*.}
+PID_DIR=${PID_DIR:="/run/elasticsearch"}
+
+if [ -n "${ES_INSTANCE}" ] && [ ${SVCNAME} != "elasticsearch" ]; then
+	PIDFILE="${PID_DIR}/elasticsearch.${ES_INSTANCE}.pid"
+	ES_BASE_PATH="/var/lib/elasticsearch/${ES_INSTANCE}"
+	CONF_DIR="/etc/elasticsearch/${ES_INSTANCE}"
+	LOG_DIR="/var/log/elasticsearch/${ES_INSTANCE}"
+else
+	PIDFILE="${PID_DIR}/elasticsearch.pid"
+	ES_BASE_PATH="/var/lib/elasticsearch/_default"
+	CONF_DIR="/etc/elasticsearch"
+	LOG_DIR="/var/log/elasticsearch/_default"
+fi
+
+ES_HOME=${ES_HOME:="/usr/share/elasticsearch"}
+ES_USER=${ES_USER:="elasticsearch"}
+ES_GROUP=${ES_GROUP:="elasticsearch"}
+ES_GC_LOG_FILE=${ES_GC_LOG_FILE:="${LOG_DIR}/gc.log"}
+MAX_OPEN_FILES=${MAX_OPEN_FILES:=65535}
+MAX_MAP_COUNT=${MAX_MAP_COUNT:=262144}
+
+DATA_DIR="${ES_BASE_PATH}/data"
+
+if [ -f "${CONF_DIR}/elasticsearch.in.sh" ]; then
+    ES_INCLUDE="${CONF_DIR}/elasticsearch.in.sh"
+fi
+
+export ES_INCLUDE
+export JAVA_OPTS
+export ES_JAVA_OPTS
+export ES_HEAP_SIZE
+export ES_HEAP_NEWSIZE
+export ES_DIRECT_SIZE
+export ES_GC_LOG_FILE
+export ES_STARTUP_SLEEP_TIME
+
+server_command="/usr/share/elasticsearch/bin/elasticsearch"
+server_args="-d -p ${PIDFILE} --default.path.home=${ES_HOME} --default.path.logs=${LOG_DIR} --default.path.data=${DATA_DIR} --default.path.conf=${CONF_DIR}"
+
+depend() {
+	use net
+}
+
+start() {
+	local conf
+	local conf_file
+	for conf in elasticsearch.yml logging.yml; do
+		conf_file="${CONF_DIR}/${conf}"
+		if [ ! -f "${conf_file}" ]; then
+			eerror "${conf_file} must be copied into place"
+			return 1
+		fi
+	done
+
+	if [ -n "${MAX_LOCKED_MEMORY}" -a -z "${ES_HEAP_SIZE}" ]; then
+		eerror "MAX_LOCKED_MEMORY is set - ES_HEAP_SIZE must also be set"
+		return 1
+	fi
+
+	if [ -n "${MAX_MAP_COUNT}" -a -f /proc/sys/vm/max_map_count ]; then
+		sysctl -q -w vm.max_map_count=${MAX_MAP_COUNT}
+	fi
+
+	ebegin "Starting ${SVCNAME}"
+
+	if [ -n "${MAX_LOCKED_MEMORY}" ]; then
+		rc_ulimit="${rc_ulimit} -l ${MAX_LOCKED_MEMORY}"
+	fi
+
+	if [ -n "${MAX_OPEN_FILES}" ]; then
+		rc_ulimit="${rc_ulimit} -n ${MAX_OPEN_FILES}"
+	fi
+
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/lib/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "/var/log/elasticsearch"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${PID_DIR}"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${ES_BASE_PATH}"
+	checkpath -d -o "${ES_USER}:${ES_GROUP}" -m750 "${LOG_DIR}"
+
+	start-stop-daemon --start \
+		--background \
+		--chdir "${ES_HOME}" \
+		--user="${ES_USER}" \
+		--pidfile="${PIDFILE}" \
+		--exec ${server_command} -- ${server_args}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping ${SVCNAME}"
+	start-stop-daemon --stop \
+		--pidfile=${PIDFILE} \
+		--user="${ES_USER}" \
+		--retry=TERM/20
+	eend $?
+}

diff --git a/app-misc/elasticsearch/files/elasticsearch.service5 b/app-misc/elasticsearch/files/elasticsearch.service5
new file mode 100644
index 0000000..80ece64
--- /dev/null
+++ b/app-misc/elasticsearch/files/elasticsearch.service5
@@ -0,0 +1,53 @@
+[Unit]
+Description=Elasticsearch
+Documentation=http://www.elastic.co
+Wants=network.target
+After=network.target
+
+[Service]
+Environment=ES_HOME=/usr/share/elasticsearch
+Environment=CONF_DIR=/etc/elasticsearch
+Environment=DATA_DIR=/var/lib/elasticsearch
+Environment=LOG_DIR=/var/log/elasticsearch
+Environment=PID_DIR=/run/elasticsearch
+EnvironmentFile=-/etc/conf.d/elasticsearch
+
+WorkingDirectory=/usr/share/elasticsearch
+
+User=elasticsearch
+Group=elasticsearch
+
+ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec
+
+ExecStart=/usr/share/elasticsearch/bin/elasticsearch \
+                                                -Des.pidfile=${PID_DIR}/elasticsearch.pid \
+                                                -Des.default.path.home=${ES_HOME} \
+                                                -Des.default.path.logs=${LOG_DIR} \
+                                                -Des.default.path.data=${DATA_DIR} \
+                                                -Des.default.path.conf=${CONF_DIR}
+
+StandardOutput=journal
+StandardError=inherit
+
+# Specifies the maximum file descriptor number that can be opened by this process
+LimitNOFILE=65535
+
+# Specifies the maximum number of bytes of memory that may be locked into RAM
+# Set to "infinity" if you use the 'bootstrap.mlockall: true' option
+# in elasticsearch.yml and 'MAX_LOCKED_MEMORY=unlimited' in /etc/conf.d/elasticsearch
+#LimitMEMLOCK=infinity
+
+# Disable timeout logic and wait until process is stopped
+TimeoutStopSec=0
+
+# SIGTERM signal is used to stop the Java process
+KillSignal=SIGTERM
+
+# Java process is never killed
+SendSIGKILL=no
+
+# When a JVM receives a SIGTERM signal it exits with code 143
+SuccessExitStatus=143
+
+[Install]
+WantedBy=multi-user.target


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-07-15  8:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-15  8:38 [gentoo-commits] repo/gentoo:master commit in: app-misc/elasticsearch/, app-misc/elasticsearch/files/ Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2021-03-30  7:25 Joonas Niilola
2019-07-31  0:50 Georgy Yakovlev
2018-01-08 12:52 Tony Vroon
2017-11-25 13:22 Amy Liffey
2017-11-05 15:37 Patrice Clement
2016-08-09  9:20 Patrick Lauer
2016-05-06 10:51 Patrick Lauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox