From 5cd0a886fe62ac63b35ad61b75d4b49a9799e441 Mon Sep 17 00:00:00 2001 From: Oliver Charles Date: Fri, 14 Feb 2014 16:24:26 +0000 Subject: [PATCH] elasticsearch: Update to 1.0.0 close #1746 --- pkgs/servers/search/elasticsearch/default.nix | 4 +- .../search/elasticsearch/es-home.patch | 97 ++++++++----------- 2 files changed, 40 insertions(+), 61 deletions(-) diff --git a/pkgs/servers/search/elasticsearch/default.nix b/pkgs/servers/search/elasticsearch/default.nix index f99ecded098..165a01517b4 100644 --- a/pkgs/servers/search/elasticsearch/default.nix +++ b/pkgs/servers/search/elasticsearch/default.nix @@ -1,10 +1,10 @@ { stdenv, fetchurl, makeWrapper, jre, utillinux }: stdenv.mkDerivation rec { - name = "elasticsearch-0.90.3"; + name = "elasticsearch-1.0.0"; src = fetchurl { url = "https://download.elasticsearch.org/elasticsearch/elasticsearch/${name}.tar.gz"; - sha256 = "1l6rnp4yvlz4z6z4v3af08yd4sl91c4zz20a8yyif2p234lh3n2s"; + sha256 = "06ym7hl47339a5dav2hawnxv820y0lbvh9xxd0lfp1f815vbql01"; }; patches = [ ./es-home.patch ]; diff --git a/pkgs/servers/search/elasticsearch/es-home.patch b/pkgs/servers/search/elasticsearch/es-home.patch index d75a5a8c052..9b96149e5ad 100644 --- a/pkgs/servers/search/elasticsearch/es-home.patch +++ b/pkgs/servers/search/elasticsearch/es-home.patch @@ -1,59 +1,38 @@ -diff -rc elasticsearch-0.90.3/bin/elasticsearch elasticsearch-0.90.3-new/bin/elasticsearch -*** elasticsearch-0.90.3/bin/elasticsearch 2013-08-06 15:19:22.000000000 +0200 ---- elasticsearch-0.90.3-new/bin/elasticsearch 2013-08-27 16:42:00.935880011 +0200 -*************** -*** 62,68 **** - done - - # determine elasticsearch home -! ES_HOME=`dirname "$SCRIPT"`/.. - - # make ELASTICSEARCH_HOME absolute - ES_HOME=`cd "$ES_HOME"; pwd` ---- 62,71 ---- - done - - # determine elasticsearch home -! if [ -z "$ES_HOME" ]; then -! echo "You must set the ES_HOME var" >&2 -! exit 1 -! fi - - # make ELASTICSEARCH_HOME absolute - ES_HOME=`cd "$ES_HOME"; pwd` -diff -rc elasticsearch-0.90.3/bin/plugin elasticsearch-0.90.3-new/bin/plugin -*** elasticsearch-0.90.3/bin/plugin 2013-08-06 15:19:22.000000000 +0200 ---- elasticsearch-0.90.3-new/bin/plugin 2013-08-27 16:49:01.024160295 +0200 -*************** -*** 16,22 **** - done - - # determine elasticsearch home -! ES_HOME=`dirname "$SCRIPT"`/.. - - # make ELASTICSEARCH_HOME absolute - ES_HOME=`cd "$ES_HOME"; pwd` ---- 16,25 ---- - done - - # determine elasticsearch home -! if [ -z "$ES_HOME" ]; then -! echo "You must set the ES_HOME var" >&2 -! exit 1 -! fi - - # make ELASTICSEARCH_HOME absolute - ES_HOME=`cd "$ES_HOME"; pwd` -*************** -*** 46,50 **** - shift - done - -! exec $JAVA $JAVA_OPTS -Xmx64m -Xms16m -Delasticsearch -Des.path.home="$ES_HOME" $properties -cp "$ES_HOME/lib/*" org.elasticsearch.plugins.PluginManager $args - ---- 49,53 ---- - shift - done - -! exec $JAVA $JAVA_OPTS -Xmx64m -Xms16m -Delasticsearch -Des.path.home="$ES_HOME" $properties -cp "$ES_CLASSPATH/lib/*" org.elasticsearch.plugins.PluginManager $args - +diff --git a/bin/elasticsearch b/bin/elasticsearch +index c7c9263..0fcecf6 100755 +--- a/bin/elasticsearch ++++ b/bin/elasticsearch +@@ -76,7 +76,10 @@ while [ -h "$SCRIPT" ] ; do + done + + # determine elasticsearch home +-ES_HOME=`dirname "$SCRIPT"`/.. ++if [ -z "$ES_HOME" ]; then ++ echo "You must set the ES_HOME var" >&2 ++ exit 1 ++fi + + # make ELASTICSEARCH_HOME absolute + ES_HOME=`cd "$ES_HOME"; pwd` +diff --git a/bin/plugin b/bin/plugin +index a8c796a..daf7b99 100755 +--- a/bin/plugin ++++ b/bin/plugin +@@ -16,7 +16,10 @@ while [ -h "$SCRIPT" ] ; do + done + + # determine elasticsearch home +-ES_HOME=`dirname "$SCRIPT"`/.. ++if [ -z "$ES_HOME" ]; then ++ echo "You must set the ES_HOME var" >&2 ++ exit 1 ++fi + + # make ELASTICSEARCH_HOME absolute + ES_HOME=`cd "$ES_HOME"; pwd` +@@ -45,4 +48,4 @@ while [ $# -gt 0 ]; do + shift + done + +-exec $JAVA $JAVA_OPTS -Xmx64m -Xms16m -Delasticsearch -Des.path.home="$ES_HOME" $properties -cp "$ES_HOME/lib/*" org.elasticsearch.plugins.PluginManager $args ++exec $JAVA $JAVA_OPTS -Xmx64m -Xms16m -Delasticsearch -Des.path.home="$ES_HOME" $properties -cp "$ES_CLASSPATH/lib/*" org.elasticsearch.plugins.PluginManager $args