cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r903502 - in /incubator/cassandra/branches/cassandra-0.5/debian: ./ README.Debian TODO cassandra.default cassandra.in.sh cassandra.install changelog compat control copyright dirs init rules
Date Tue, 26 Jan 2010 23:54:16 GMT
Author: eevans
Date: Tue Jan 26 23:54:15 2010
New Revision: 903502

URL: http://svn.apache.org/viewvc?rev=903502&view=rev
Log:
check-in debian packaging

Added:
    incubator/cassandra/branches/cassandra-0.5/debian/
    incubator/cassandra/branches/cassandra-0.5/debian/README.Debian
    incubator/cassandra/branches/cassandra-0.5/debian/TODO
    incubator/cassandra/branches/cassandra-0.5/debian/cassandra.default
    incubator/cassandra/branches/cassandra-0.5/debian/cassandra.in.sh
    incubator/cassandra/branches/cassandra-0.5/debian/cassandra.install
    incubator/cassandra/branches/cassandra-0.5/debian/changelog
    incubator/cassandra/branches/cassandra-0.5/debian/compat
    incubator/cassandra/branches/cassandra-0.5/debian/control
    incubator/cassandra/branches/cassandra-0.5/debian/copyright
    incubator/cassandra/branches/cassandra-0.5/debian/dirs
    incubator/cassandra/branches/cassandra-0.5/debian/init
    incubator/cassandra/branches/cassandra-0.5/debian/rules   (with props)

Added: incubator/cassandra/branches/cassandra-0.5/debian/README.Debian
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/debian/README.Debian?rev=903502&view=auto
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/debian/README.Debian (added)
+++ incubator/cassandra/branches/cassandra-0.5/debian/README.Debian Tue Jan 26 23:54:15 2010
@@ -0,0 +1,8 @@
+Cassandra for Debian
+====================
+
+This package is not a part of Debian, (and there are no immediate plans
+to have it added). Bugs should be sent to eevans@apache.org, *not* filed
+in the Debian BTS.
+
+ -- Eric Evans <eevans@apache.org>  Sun, 26 Jul 2009 14:35:11 -0500

Added: incubator/cassandra/branches/cassandra-0.5/debian/TODO
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/debian/TODO?rev=903502&view=auto
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/debian/TODO (added)
+++ incubator/cassandra/branches/cassandra-0.5/debian/TODO Tue Jan 26 23:54:15 2010
@@ -0,0 +1,4 @@
+
+ * run as non-privileged user
+ * cassandra-cli requires root for access to log files (and shouldn't)
+ * don't embed jars for which debian packages exist

Added: incubator/cassandra/branches/cassandra-0.5/debian/cassandra.default
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/debian/cassandra.default?rev=903502&view=auto
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/debian/cassandra.default (added)
+++ incubator/cassandra/branches/cassandra-0.5/debian/cassandra.default Tue Jan 26 23:54:15
2010
@@ -0,0 +1,16 @@
+
+# Override JAVA_HOME if you are not using the openjdk-6-jre package.
+#JAVA_HOME="/usr/lib/jvm/java-6-openjdk/jre"
+
+# Specifies the max size (in bytes) of memory allocation. Must be a 
+# multiple of 1024. You can append the letter K, M, or G to indicate
+# kilobytes, megabytes, or gigabytes respectively.
+JVM_MAX_MEM="1G"
+
+# Specifies the initial size (in bytes) of memory allocation. Must be
+# a multiple of 1024 greater than 1MB. You can append the letters K or
+# M to indicate kilobytes or megabytes respectively. 
+JVM_START_MEM="128M"
+
+# Specifies any additional arguments to the JVM.
+JVM_EXTRA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8888,suspend=n -XX:SurvivorRatio=8
-XX:TargetSurvivorRatio=90 -XX:+AggressiveOpts -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=1
-XX:+CMSParallelRemarkEnabled -XX:+HeapDumpOnOutOfMemoryError"

Added: incubator/cassandra/branches/cassandra-0.5/debian/cassandra.in.sh
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/debian/cassandra.in.sh?rev=903502&view=auto
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/debian/cassandra.in.sh (added)
+++ incubator/cassandra/branches/cassandra-0.5/debian/cassandra.in.sh Tue Jan 26 23:54:15
2010
@@ -0,0 +1,27 @@
+
+# The directory where Cassandra's configs live (required)
+CASSANDRA_CONF=/etc/cassandra
+
+# The java classpath (required)
+CLASSPATH=$CASSANDRA_CONF
+
+for jar in /usr/share/cassandra/*.jar; do
+    CLASSPATH=$CLASSPATH:$jar
+done
+
+# Arguments to pass to the JVM
+JVM_OPTS=" \
+        -Xdebug \
+        -Xms128M \
+        -Xmx1G \
+        -XX:SurvivorRatio=8 \
+        -XX:TargetSurvivorRatio=90 \
+        -XX:+AggressiveOpts \
+        -XX:+UseParNewGC \
+        -XX:+UseConcMarkSweepGC \
+        -XX:CMSInitiatingOccupancyFraction=1 \
+        -XX:+CMSParallelRemarkEnabled \
+        -XX:+HeapDumpOnOutOfMemoryError \
+        -Dcom.sun.management.jmxremote.port=8080 \
+        -Dcom.sun.management.jmxremote.ssl=false \
+        -Dcom.sun.management.jmxremote.authenticate=false"

Added: incubator/cassandra/branches/cassandra-0.5/debian/cassandra.install
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/debian/cassandra.install?rev=903502&view=auto
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/debian/cassandra.install (added)
+++ incubator/cassandra/branches/cassandra-0.5/debian/cassandra.install Tue Jan 26 23:54:15
2010
@@ -0,0 +1,20 @@
+conf/log4j.properties etc/cassandra
+conf/storage-conf.xml etc/cassandra
+debian/cassandra.in.sh usr/share/cassandra
+bin/cassandra usr/sbin
+bin/cassandra-cli usr/bin
+bin/nodeprobe usr/bin
+lib/antlr-3.1.3.jar usr/share/cassandra
+lib/clhm-production.jar usr/share/cassandra
+lib/commons-cli-1.1.jar usr/share/cassandra
+lib/commons-collections-3.2.1.jar usr/share/cassandra
+lib/commons-lang-2.4.jar usr/share/cassandra
+lib/flexjson-1.7.jar usr/share/cassandra
+lib/google-collect-1.0-rc1.jar usr/share/cassandra
+lib/high-scale-lib.jar usr/share/cassandra
+lib/jline-0.9.94.jar usr/share/cassandra
+lib/json_simple-1.1.jar usr/share/cassandra
+lib/libthrift-r820831.jar usr/share/cassandra
+lib/log4j-1.2.15.jar usr/share/cassandra
+lib/slf4j-api-1.5.8.jar usr/share/cassandra
+lib/slf4j-log4j12-1.5.8.jar usr/share/cassandra

Added: incubator/cassandra/branches/cassandra-0.5/debian/changelog
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/debian/changelog?rev=903502&view=auto
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/debian/changelog (added)
+++ incubator/cassandra/branches/cassandra-0.5/debian/changelog Tue Jan 26 23:54:15 2010
@@ -0,0 +1,5 @@
+cassandra (0.5.0-1) unstable; urgency=low
+
+  * New stable release.
+
+ -- Eric Evans <eevans@apache.org>  Tue, 26 Jan 2010 11:21:11 -0600

Added: incubator/cassandra/branches/cassandra-0.5/debian/compat
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/debian/compat?rev=903502&view=auto
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/debian/compat (added)
+++ incubator/cassandra/branches/cassandra-0.5/debian/compat Tue Jan 26 23:54:15 2010
@@ -0,0 +1 @@
+5

Added: incubator/cassandra/branches/cassandra-0.5/debian/control
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/debian/control?rev=903502&view=auto
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/debian/control (added)
+++ incubator/cassandra/branches/cassandra-0.5/debian/control Tue Jan 26 23:54:15 2010
@@ -0,0 +1,16 @@
+Source: cassandra
+Section: misc
+Priority: extra
+Maintainer: Eric Evans <eevans@apache.org>
+Build-Depends: debhelper (>= 5), openjdk-6-jdk (>= 6b11) | java6-sdk, ant (>= 1.7)
+Homepage: http://incubator.apache.org/cassandra/
+Vcs-Git: git://github.com/eevans/cassandra-debian.git
+Vcs-Browser: http://github.com/eevans/cassandra-debian/tree
+Standards-Version: 3.8.3
+
+Package: cassandra
+Architecture: all
+Depends: openjdk-6-jre-headless (>= 6b11) | java6-runtime, jsvc (>= 1.0), libcommons-daemon-java
(>= 1.0)
+Description: distributed storage system for structured data
+ Cassandra is a distributed (peer-to-peer) system for the management
+ and storage of structured data.

Added: incubator/cassandra/branches/cassandra-0.5/debian/copyright
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/debian/copyright?rev=903502&view=auto
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/debian/copyright (added)
+++ incubator/cassandra/branches/cassandra-0.5/debian/copyright Tue Jan 26 23:54:15 2010
@@ -0,0 +1,10 @@
+This package was debianized by Eric Evans <eevans@apache.org> on
+Sun, 26 Jul 2009 15:12:10 +0000
+
+Upstream Author: Cassandra Developers <cassandra-dev@incubator.apache.org>
+
+Copyright (c) 2009, The Apache Software Foundation.
+
+This software is licensed under the Apache License 2.0. On Debian 
+GNU/Linux systems you can find the complete text of the Apache-2.0
+license in `/usr/share/common-licenses/Apache-2.0'.

Added: incubator/cassandra/branches/cassandra-0.5/debian/dirs
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/debian/dirs?rev=903502&view=auto
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/debian/dirs (added)
+++ incubator/cassandra/branches/cassandra-0.5/debian/dirs Tue Jan 26 23:54:15 2010
@@ -0,0 +1,6 @@
+usr/share/cassandra
+usr/sbin
+usr/bin
+etc/cassandra
+var/lib/cassandra
+var/log/cassandra

Added: incubator/cassandra/branches/cassandra-0.5/debian/init
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/debian/init?rev=903502&view=auto
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/debian/init (added)
+++ incubator/cassandra/branches/cassandra-0.5/debian/init Tue Jan 26 23:54:15 2010
@@ -0,0 +1,154 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          cassandra
+# Required-Start:    $remote_fs
+# Required-Stop:     $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: distributed storage system for structured data
+# Description:       Cassandra is a distributed (peer-to-peer) system for
+#                    the management and storage of structured data.
+### END INIT INFO
+
+# Author: Eric Evans <eevans@racklabs.com>
+
+DESC="Cassandra"
+NAME=cassandra
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+CONFDIR=/etc/cassandra
+JAVA_HOME="/usr/lib/jvm/java-6-openjdk/jre"
+JSVC=/usr/bin/jsvc
+JVM_MAX_MEM="1G"
+JVM_START_MEM="128M"
+
+[ -e /usr/share/cassandra/apache-cassandra-incubating.jar ] || exit 0
+[ -e /etc/cassandra/storage-conf.xml ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that returns the applications classpath
+#
+classpath()
+{
+    cp=
+    for j in /usr/share/$NAME/*.jar; do
+        [ "x$cp" = "x" ] && cp=$j || cp=$cp:$j
+    done
+
+    # Include the conf directory for purposes of log4j.properties, and
+    # commons-daemon in support of the daemonization class.
+    printf "$cp:$CONFDIR:/usr/share/java/commons-daemon.jar"
+}
+
+#
+# Function that returns 0 if process is running, 1 if not
+#
+is_running()
+{
+    if [ -f $PIDFILE ]; then
+        if ps -p `cat $PIDFILE` &> /dev/null; then
+            return 0
+        fi
+    fi
+    return 1
+}
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+    # Return
+    #   0 if daemon has been started
+    #   1 if daemon was already running
+    #   2 if daemon could not be started
+    is_running && return 1
+
+    $JSVC \
+        -home $JAVA_HOME \
+        -pidfile $PIDFILE \
+        -errfile "&1" \
+        -outfile /var/log/$NAME/output.log \
+        -cp `classpath` \
+        -Xmx$JVM_MAX_MEM \
+        -Xms$JVM_START_MEM \
+        -Dcassandra \
+        -Dstorage-config=$CONFDIR \
+        -Dcom.sun.management.jmxremote.port=8080 \
+        -Dcom.sun.management.jmxremote.ssl=false \
+        -Dcom.sun.management.jmxremote.authenticate=false \
+        org.apache.cassandra.service.CassandraDaemon
+
+    if ! is_running; then return 2; fi
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+    is_running || return 1
+    $JSVC -stop -home $JAVA_HOME -pidfile $PIDFILE \
+            org.apache.cassandra.service.CassandraJsvcDaemon
+    is_running && return 2 || return 0
+}
+
+case "$1" in
+  start)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+	do_start
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  stop)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  restart|force-reload)
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:
+
+# vi:ai sw=4 ts=4 tw=0 et

Added: incubator/cassandra/branches/cassandra-0.5/debian/rules
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/debian/rules?rev=903502&view=auto
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/debian/rules (added)
+++ incubator/cassandra/branches/cassandra-0.5/debian/rules Tue Jan 26 23:54:15 2010
@@ -0,0 +1,63 @@
+#!/usr/bin/make -f
+
+# Uncomment to enable verbose mode.
+#export DH_VERBOSE=1
+
+ANT = /usr/bin/ant
+VERSION = $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p')
+
+test:
+	dh_testdir
+	$(ANT) test
+
+clean:
+	dh_testdir
+	dh_testroot
+	$(ANT) clean
+	rm -f build-stamp build.properties
+	rm -rf bin/java
+	find -name "*.pyc" -exec rm '{}' ';'
+	find -name "*py.class" -exec rm '{}' ';'
+	dh_clean
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+	printf "version=%s" $(VERSION) > build.properties
+
+	$(ANT) jar
+
+	touch build-stamp
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_installdirs
+	dh_install
+
+	# Copy in the jar and symlink to something stable
+	dh_install build/apache-cassandra-incubating-$(VERSION).jar \
+		usr/share/cassandra
+	dh_link usr/share/cassandra/apache-cassandra-incubating-$(VERSION).jar \
+		usr/share/cassandra/apache-cassandra-incubating.jar
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installinit
+	dh_installdocs README.txt DISCLAIMER.txt CHANGES.txt NEWS.txt
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-dependent files here.
+binary-arch: build install
+# We have nothing to do by default.
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install

Propchange: incubator/cassandra/branches/cassandra-0.5/debian/rules
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message