diff options
| author | Matt Jolly <Matt.Jolly@footclan.ninja> | 2022-04-25 22:19:47 +1000 |
|---|---|---|
| committer | Joonas Niilola <juippis@gentoo.org> | 2022-05-26 15:58:03 +0300 |
| commit | dba0110302a1012a7e34b08ca145c1818ec533e3 (patch) | |
| tree | 98c26ce0b5a3e12a99b624ab176234d3ece6ce69 /app-misc/elasticsearch/files/elasticsearch-env.patch | |
| parent | 10dc864a6af997db81b9195400750a612138a32d (diff) | |
| download | gentoo-dba0110302a1012a7e34b08ca145c1818ec533e3.tar.gz gentoo-dba0110302a1012a7e34b08ca145c1818ec533e3.tar.bz2 gentoo-dba0110302a1012a7e34b08ca145c1818ec533e3.zip | |
app-misc/elasticsearch: add 8.2.0
Signed-off-by: Matt Jolly <Matt.Jolly@footclan.ninja>
Closes: https://github.com/gentoo/gentoo/pull/25192
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-misc/elasticsearch/files/elasticsearch-env.patch')
| -rw-r--r-- | app-misc/elasticsearch/files/elasticsearch-env.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app-misc/elasticsearch/files/elasticsearch-env.patch b/app-misc/elasticsearch/files/elasticsearch-env.patch new file mode 100644 index 000000000000..fb150bb51db3 --- /dev/null +++ b/app-misc/elasticsearch/files/elasticsearch-env.patch @@ -0,0 +1,24 @@ +Since ES 8.0.0 upstream stopped distributing a 'no-JDK' package. +This requires us to set `ES_JAVA_HOME` else it fails to find the +JDK that we unbundled and will not start. +--- a/bin/elasticsearch-env ++++ b/bin/elasticsearch-env +@@ -36,6 +36,18 @@ ES_HOME=`dirname "$ES_HOME"` + ES_CLASSPATH="$ES_HOME/lib/*" + LAUNCHERS_CLASSPATH="$ES_CLASSPATH:$ES_HOME/lib/launchers/*" + ++# Set our JVM in a Gentoo-specific manner ++if [ -z "$ES_JAVA_HOME" ]; then ++ GENTOO_VM=$(depend-java-query --get-vm virtual/jre:17) ++ if [ ! -z "$GENTOO_VM" ]; then ++ ES_JAVA_HOME=$(java-config-2 --select-vm=${GENTOO_VM} --jre-home) ++ else ++ echo "Unable to automatically detect a supported Java 17 VM. Elasticsearch is unlikely to launch." ++ echo "Please ensure that you have installed an appropriate Java VM using portage" ++ echo "OR pass the ES_JAVA_HOME environment variable." ++ fi ++fi ++ + # now set the path to java + if [ ! -z "$ES_JAVA_HOME" ]; then + JAVA="$ES_JAVA_HOME/bin/java" |
