mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-30 10:38:37 +00:00
- update to 1.0.6
- stop using kill-9 - support for cqlsh While i'm here, fix plist and some whitespace issues. PR: 163295 Submitted by: Radim Kolar <hsn at sendmail dot cz> Approved by: maintainer (timeout, 3 weeks+)
This commit is contained in:
parent
fee8f02623
commit
c5b06623f8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=288809
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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%%
|
||||
|
Loading…
Reference in New Issue
Block a user