aboutsummaryrefslogtreecommitdiff
path: root/databases/cassandra
diff options
context:
space:
mode:
authorRuslan Makhmatkhanov <rm@FreeBSD.org>2012-01-09 07:02:24 +0000
committerRuslan Makhmatkhanov <rm@FreeBSD.org>2012-01-09 07:02:24 +0000
commitc5b06623f8c866db5605cec9e3f3e4fb796baa34 (patch)
tree572a573f3d7f2046e0f8ad16aeb5e61cd9e5f449 /databases/cassandra
parentfee8f02623f01b0237883cec719df47d36c425dd (diff)
downloadports-c5b06623f8c866db5605cec9e3f3e4fb796baa34.tar.gz
ports-c5b06623f8c866db5605cec9e3f3e4fb796baa34.zip
Notes
Diffstat (limited to 'databases/cassandra')
-rw-r--r--databases/cassandra/Makefile37
-rw-r--r--databases/cassandra/distinfo4
-rw-r--r--databases/cassandra/files/cassandra.in48
-rw-r--r--databases/cassandra/files/repaircluster.in2
-rw-r--r--databases/cassandra/pkg-deinstall4
-rw-r--r--databases/cassandra/pkg-install6
-rw-r--r--databases/cassandra/pkg-plist27
7 files changed, 85 insertions, 43 deletions
diff --git a/databases/cassandra/Makefile b/databases/cassandra/Makefile
index b44d9b1bf0b4..5c379884385d 100644
--- a/databases/cassandra/Makefile
+++ b/databases/cassandra/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= cassandra
-PORTVERSION= 1.0.2
-PORTREVISION= 1
+PORTVERSION= 1.0.6
CATEGORIES= databases java
MASTER_SITES= ${MASTER_SITE_APACHE}
MASTER_SITE_SUBDIR= cassandra/${PORTVERSION}
@@ -21,7 +20,6 @@ LICENSE= ASL
JAVA_VERSION= 1.6
JAVA_VENDOR= openjdk
-NO_BUILD= yes
REINPLACE_ARGS= -i ''
USE_JAVA= yes
USE_RC_SUBR= cassandra
@@ -39,7 +37,9 @@ SCRIPTS= cassandra \
sstableloader
OPTIONS= MX4J "Enable HTTP interface for JMX" Off \
- JNA "Use JNA native access" Off
+ JNA "Use JNA native access" Off \
+ CQL "Install cqlsh" Off
+
SUB_FILES= repaircluster
.include <bsd.port.options.mk>
@@ -56,12 +56,25 @@ PLIST_SUB+= JNA=""
.else
PLIST_SUB+= JNA="@comment "
.endif
+.if defined(WITH_CQL)
+USE_PYTHON= yes
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cql>=0:${PORTSDIR}/databases/py-cql
+PLIST_SUB+= CQL=""
+SCRIPTS+= cqlsh
+.else
+PLIST_SUB+= CQL="@comment "
+.endif
post-extract:
@${RM} ${WRKSRC}/bin/*.bat ${WRKSRC}/bin/stop-server
.for i in ${CONFIGS}
@${MV} ${WRKSRC}/conf/${i} ${WRKSRC}/conf/${i}.sample
.endfor
+ @${MV} ${WRKSRC}/bin/cqlshrc.sample ${WRKSRC}/conf
+.if !defined(WITH_CQL)
+ @${RM} -r ${WRKSRC}/pylib
+ @${RM} ${WRKSRC}/bin/cqlsh
+.endif
post-patch:
@${REINPLACE_CMD} -e 's|/usr/share/cassandra|${DATADIR}/bin|' \
@@ -71,6 +84,15 @@ post-patch:
@${REINPLACE_CMD} -e 's|\`dirname \$$\0\`/..|${DATADIR}|' \
${WRKSRC}/bin/cassandra.in.sh
@${RM} -f ${WRKSRC}/conf/*.orig
+.if defined(WITH_CQL)
+ @${REINPLACE_CMD} -e 's|os.path.dirname(__file__)|"${DATADIR}/bin"|' \
+ ${WRKSRC}/bin/cqlsh
+.endif
+
+do-build:
+.if defined(WITH_CQL)
+ @${PYTHON_CMD} -m compileall ${WRKSRC}/pylib
+.endif
do-install:
@${MKDIR} ${DATADIR}
@@ -81,10 +103,13 @@ do-install:
@${LN} -s ${DATADIR}/bin/nodetool ${PREFIX}/bin/nodetool
@${LN} -s ${DATADIR}/bin/sstableloader ${PREFIX}/bin/sstableloader
@${LN} -s ${DATADIR}/bin/repaircluster ${PREFIX}/bin/repaircluster
-.ifdef (WITH_MX4J)
+.if defined(WITH_CQL)
+ @${LN} -s ${DATADIR}/bin/cqlsh ${PREFIX}/bin/cqlsh
+.endif
+.if defined(WITH_MX4J)
@${LN} -s ${LOCALBASE}/share/java/classes/mx4j-tools.jar ${DATADIR}/lib/mx4j-tools.jar
.endif
-.ifdef (WITH_JNA)
+.if defined(WITH_JNA)
@${LN} -s ${LOCALBASE}/share/java/classes/jna.jar ${DATADIR}/lib/jna.jar
@${LN} -s ${LOCALBASE}/share/java/classes/jna-platform.jar ${DATADIR}/lib/jna-platform.jar
.endif
diff --git a/databases/cassandra/distinfo b/databases/cassandra/distinfo
index bbea4b55249d..4c91bd86e62c 100644
--- a/databases/cassandra/distinfo
+++ b/databases/cassandra/distinfo
@@ -1,2 +1,2 @@
-SHA256 (apache-cassandra-1.0.2-bin.tar.gz) = 1b35c0daaa84f38c67f80c29f37222746f6f1c82900421301d88634f06f0ac79
-SIZE (apache-cassandra-1.0.2-bin.tar.gz) = 11192372
+SHA256 (apache-cassandra-1.0.6-bin.tar.gz) = a1610344b78164d238415112f523639e8c33b0a3a14b427e8b910017cf060d13
+SIZE (apache-cassandra-1.0.6-bin.tar.gz) = 11243727
diff --git a/databases/cassandra/files/cassandra.in b/databases/cassandra/files/cassandra.in
index b2631edf658b..4e023d1060ba 100644
--- a/databases/cassandra/files/cassandra.in
+++ b/databases/cassandra/files/cassandra.in
@@ -2,27 +2,27 @@
#
# Copyright (c) 2011, Radim Kolar
# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright notice,
-# this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-# DAMAGE.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
# PROVIDE: cassandra
# REQUIRE: LOGIN
@@ -44,6 +44,7 @@ cassandra_newgen=${cassandra_newgen:-"300m"}
command=%%DATADIR%%/bin/cassandra
command_args="-p /var/run/cassandra.pid >/dev/null"
stop_precmd="${name}_prestop"
+sig_stop="KILL"
procname="%%LOCALBASE%%/openjdk6/bin/java"
pidfile=/var/run/cassandra.pid
@@ -60,9 +61,12 @@ export JAVA_VERSION=1.6
cassandra_prestop() {
$CASSANDRA_HOME/bin/nodetool -h localhost disablegossip
- sleep 8
+ sleep 13
$CASSANDRA_HOME/bin/nodetool -h localhost disablethrift
+ sleep 2
$CASSANDRA_HOME/bin/nodetool -h localhost drain
+ sleep 5
+ return 0
}
run_rc_command "$1"
diff --git a/databases/cassandra/files/repaircluster.in b/databases/cassandra/files/repaircluster.in
index 12821690f435..20142a3b6c88 100644
--- a/databases/cassandra/files/repaircluster.in
+++ b/databases/cassandra/files/repaircluster.in
@@ -6,7 +6,7 @@ NODETOOL=%%DATADIR%%/bin/nodetool
if test $# -eq 0; then
echo "$0 <any node in cluster>"
exit 1;
-fi
+fi
for i in `$NODETOOL -h $1 ring | cut -d ' ' -f 1 | grep -e '^[0-9]'`; do
$NODETOOL -h $i repair
done
diff --git a/databases/cassandra/pkg-deinstall b/databases/cassandra/pkg-deinstall
index 074f716a5737..45860542be7d 100644
--- a/databases/cassandra/pkg-deinstall
+++ b/databases/cassandra/pkg-deinstall
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/sh
#
# Removes unchanged configuration files
#
@@ -6,7 +6,7 @@ if [ "$2" = "DEINSTALL" ]; then
if [ ! -d $PKG_PREFIX/share/cassandra/conf ]; then exit 1; fi
cd $PKG_PREFIX/share/cassandra/conf
for cfgfile in cassandra.yaml log4j-server.properties \
- log4j-tools.properties cassandra-topology.properties; do
+ log4j-tools.properties cassandra-topology.properties; do
if cmp -s $cfgfile.sample $cfgfile; then
rm $cfgfile
fi
diff --git a/databases/cassandra/pkg-install b/databases/cassandra/pkg-install
index 857bfec16ce2..a8d91f1c0ffc 100644
--- a/databases/cassandra/pkg-install
+++ b/databases/cassandra/pkg-install
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/sh
#
# Copy sample cassandra config files to real ones if real ones does not exists
#
@@ -6,8 +6,8 @@ if [ "$2" = "POST-INSTALL" ]; then
if [ ! -d $PKG_PREFIX/share/cassandra/conf ]; then exit 1; fi
umask 027
cd $PKG_PREFIX/share/cassandra/conf
- for cfgfile in cassandra.yaml log4j-server.properties log4j-tools.properties \
- cassandra-topology.properties; do
+ for cfgfile in cassandra.yaml log4j-server.properties log4j-tools.properties \
+ cassandra-topology.properties; do
if [ ! -f $cfgfile ]; then
cp -p $cfgfile.sample $cfgfile
fi
diff --git a/databases/cassandra/pkg-plist b/databases/cassandra/pkg-plist
index 33989fd83c88..394faa875e12 100644
--- a/databases/cassandra/pkg-plist
+++ b/databases/cassandra/pkg-plist
@@ -2,6 +2,7 @@ bin/cassandra-cli
bin/nodetool
bin/repaircluster
bin/sstableloader
+%%CQL%%bin/cqlsh
%%DATADIR%%/CHANGES.txt
%%DATADIR%%/LICENSE.txt
%%DATADIR%%/NEWS.txt
@@ -741,7 +742,6 @@ bin/sstableloader
%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/AbstractSSTableSimpleWriter.html
%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/BloomFilterTracker.html
%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/Component.html
-%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/Descriptor.TempState.html
%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/Descriptor.html
%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/IndexHelper.IndexInfo.html
%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/IndexHelper.html
@@ -771,7 +771,6 @@ bin/sstableloader
%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/class-use/AbstractSSTableSimpleWriter.html
%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/class-use/BloomFilterTracker.html
%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/class-use/Component.html
-%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/class-use/Descriptor.TempState.html
%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/class-use/Descriptor.html
%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/class-use/IndexHelper.IndexInfo.html
%%DATADIR%%/javadoc/org/apache/cassandra/io/sstable/class-use/IndexHelper.html
@@ -1608,14 +1607,12 @@ bin/sstableloader
%%DATADIR%%/javadoc/org/apache/cassandra/thrift/package-use.html
%%DATADIR%%/javadoc/org/apache/cassandra/tools/BulkLoader.html
%%DATADIR%%/javadoc/org/apache/cassandra/tools/GetVersion.html
-%%DATADIR%%/javadoc/org/apache/cassandra/tools/NodeCmd.NodeCommand.html
%%DATADIR%%/javadoc/org/apache/cassandra/tools/NodeCmd.html
%%DATADIR%%/javadoc/org/apache/cassandra/tools/NodeProbe.html
%%DATADIR%%/javadoc/org/apache/cassandra/tools/SSTableExport.html
%%DATADIR%%/javadoc/org/apache/cassandra/tools/SSTableImport.html
%%DATADIR%%/javadoc/org/apache/cassandra/tools/class-use/BulkLoader.html
%%DATADIR%%/javadoc/org/apache/cassandra/tools/class-use/GetVersion.html
-%%DATADIR%%/javadoc/org/apache/cassandra/tools/class-use/NodeCmd.NodeCommand.html
%%DATADIR%%/javadoc/org/apache/cassandra/tools/class-use/NodeCmd.html
%%DATADIR%%/javadoc/org/apache/cassandra/tools/class-use/NodeProbe.html
%%DATADIR%%/javadoc/org/apache/cassandra/tools/class-use/SSTableExport.html
@@ -1753,10 +1750,24 @@ bin/sstableloader
%%DATADIR%%/javadoc/org/apache/cassandra/utils/BigLongArray.html
%%DATADIR%%/javadoc/org/apache/cassandra/db/RetriedSliceFromReadCommand.html
%%DATADIR%%/javadoc/org/apache/cassandra/db/class-use/RetriedSliceFromReadCommand.html
+%%DATADIR%%/javadoc/org/apache/cassandra/service/StorageProxy.WritePerformer.html
+%%DATADIR%%/javadoc/org/apache/cassandra/service/class-use/StorageProxy.WritePerformer.html
+%%DATADIR%%/javadoc/org/apache/cassandra/io/IColumnSerializer.Flag.html
+%%DATADIR%%/javadoc/org/apache/cassandra/io/class-use/IColumnSerializer.Flag.html
+%%DATADIR%%/conf/cqlshrc.sample
+%%CQL%%%%DATADIR%%/bin/cqlsh
+%%CQL%%%%DATADIR%%/pylib/cqlshlib/__init__.py
+%%CQL%%%%DATADIR%%/pylib/cqlshlib/cqlhandling.py
+%%CQL%%%%DATADIR%%/pylib/cqlshlib/pylexotron.py
+%%CQL%%%%DATADIR%%/pylib/cqlshlib/saferscanner.py
+%%CQL%%%%DATADIR%%/pylib/cqlshlib/__init__.pyc
+%%CQL%%%%DATADIR%%/pylib/cqlshlib/cqlhandling.pyc
+%%CQL%%%%DATADIR%%/pylib/cqlshlib/pylexotron.pyc
+%%CQL%%%%DATADIR%%/pylib/cqlshlib/saferscanner.pyc
%%DATADIR%%/lib/antlr-3.2.jar
-%%DATADIR%%/lib/apache-cassandra-1.0.2.jar
-%%DATADIR%%/lib/apache-cassandra-clientutil-1.0.2.jar
-%%DATADIR%%/lib/apache-cassandra-thrift-1.0.2.jar
+%%DATADIR%%/lib/apache-cassandra-1.0.6.jar
+%%DATADIR%%/lib/apache-cassandra-clientutil-1.0.6.jar
+%%DATADIR%%/lib/apache-cassandra-thrift-1.0.6.jar
%%DATADIR%%/lib/avro-1.4.0-fixes.jar
%%DATADIR%%/lib/avro-1.4.0-sources-fixes.jar
%%DATADIR%%/lib/commons-cli-1.1.jar
@@ -1891,6 +1902,8 @@ bin/sstableloader
@dirrm %%DATADIR%%/javadoc/org
@dirrm %%DATADIR%%/javadoc
@dirrm %%DATADIR%%/interface
+%%CQL%%@dirrmtry %%DATADIR%%/pylib/cqlshlib
+%%CQL%%@dirrmtry %%DATADIR%%/pylib
@dirrmtry %%DATADIR%%/conf
@dirrm %%DATADIR%%/bin
@dirrmtry %%DATADIR%%