[Python-modules-commits] r20303 - in packages/python-carbon/trunk (21 files)

hggh-guest at users.alioth.debian.org hggh-guest at users.alioth.debian.org
Sat Feb 4 16:57:03 UTC 2012


    Date: Saturday, February 4, 2012 @ 16:57:02
  Author: hggh-guest
Revision: 20303

[svn-inject] Applying Debian modifications (0.9.9-1) to trunk

Added:
  packages/python-carbon/trunk/debian/
  packages/python-carbon/trunk/debian/README.Debian
  packages/python-carbon/trunk/debian/carbon-cache.init
  packages/python-carbon/trunk/debian/changelog
  packages/python-carbon/trunk/debian/compat
  packages/python-carbon/trunk/debian/control
  packages/python-carbon/trunk/debian/copyright
  packages/python-carbon/trunk/debian/patches/
  packages/python-carbon/trunk/debian/patches/carbon.conf.debian.patch
  packages/python-carbon/trunk/debian/patches/disable_install_opt.patch
  packages/python-carbon/trunk/debian/patches/series
  packages/python-carbon/trunk/debian/python-carbon.default
  packages/python-carbon/trunk/debian/python-carbon.dirs
  packages/python-carbon/trunk/debian/python-carbon.examples
  packages/python-carbon/trunk/debian/python-carbon.logrotate
  packages/python-carbon/trunk/debian/python-carbon.postinst
  packages/python-carbon/trunk/debian/python-carbon.postrm
  packages/python-carbon/trunk/debian/rules
  packages/python-carbon/trunk/debian/source/
  packages/python-carbon/trunk/debian/source/format
  packages/python-carbon/trunk/debian/watch


Property changes on: packages/python-carbon/trunk/debian
___________________________________________________________________
Added: mergeWithUpstream
   + 1

Added: packages/python-carbon/trunk/debian/README.Debian
===================================================================
--- packages/python-carbon/trunk/debian/README.Debian	                        (rev 0)
+++ packages/python-carbon/trunk/debian/README.Debian	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,15 @@
+python-carbon for Debian
+------------------------
+
+If you would like to configure carbon copy the files from
+example/ into /etc/carbon:
+
+ # zcat /usr/share/doc/python-carbon/examples/carbon.conf.example.gz \
+   >/etc/carbon/carbon.conf
+
+ # cp /usr/share/doc/python-carbon/examples/storage-schemas.conf.example \
+   /etc/carbon/storage-schemas.conf
+
+Than start carbon-cache daemon:
+
+ # /etc/init.d/carbon-cache start

Added: packages/python-carbon/trunk/debian/carbon-cache.init
===================================================================
--- packages/python-carbon/trunk/debian/carbon-cache.init	                        (rev 0)
+++ packages/python-carbon/trunk/debian/carbon-cache.init	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,163 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          carbon-cache
+# Required-Start:    $remote_fs $syslog $network
+# Required-Stop:     $remote_fs $syslog $network
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Graphite Carbon backend daemon
+# Description:       backend data caching and persistence daemon for Graphite
+### END INIT INFO
+
+# Author: Jonas Genannt <jonas.genannt at capi2name.de>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Graphite backend daemon"
+NAME=carbon-cache
+DAEMON=/usr/bin/$NAME
+PIDFILE=/var/run/$NAME.pid
+DAEMON_ARGS="--config=/etc/carbon/carbon.conf --pidfile=$PIDFILE --logdir=/var/log/carbon/ start"
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/python-carbon ] && . /etc/default/python-carbon
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+if [ ! -r /etc/carbon/carbon.conf ]; then
+	echo "Missing /etc/carbon/carbon.conf - not starting."
+	exit
+fi
+
+if [ "$CARBON_CACHE_RUN" != "yes" ] ; then
+	echo "carbon-cache disabled in /etc/default/python-carbon"
+	exit 0
+fi
+
+#
+# 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
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+		|| return 1
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+		$DAEMON_ARGS \
+		|| return 2
+	# Add code here, if necessary, that waits for the process to be ready
+	# to handle requests from services started subsequently which depend
+	# on this one.  As a last resort, sleep for some time.
+}
+
+#
+# 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
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+	# Wait for children to finish too if this is a daemon that forks
+	# and if the daemon is only ever run from this initscript.
+	# If the above conditions are not satisfied then add some other code
+	# that waits for the process to drop all resources that could be
+	# needed by services started subsequently.  A last resort is to
+	# sleep for some time.
+	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+	# Many daemons don't delete their pidfiles when they exit.
+	rm -f $PIDFILE
+	return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+	#
+	# If the daemon can reload its configuration without
+	# restarting (for example, when it is sent a SIGHUP),
+	# then implement that here.
+	#
+	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+	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
+	;;
+  status)
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+       ;;
+  #reload|force-reload)
+	#
+	# If do_reload() is not implemented then leave this commented out
+	# and leave 'force-reload' as an alias for 'restart'.
+	#
+	#log_daemon_msg "Reloading $DESC" "$NAME"
+	#do_reload
+	#log_end_msg $?
+	#;;
+  restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	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|reload|force-reload}" >&2
+	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:

Added: packages/python-carbon/trunk/debian/changelog
===================================================================
--- packages/python-carbon/trunk/debian/changelog	                        (rev 0)
+++ packages/python-carbon/trunk/debian/changelog	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,5 @@
+python-carbon (0.9.9-1) UNRELEASED; urgency=low
+
+  * Initial release (Closes: #651233)
+
+ -- Jonas Genannt <jonas.genannt at capi2name.de>  Tue, 17 Jan 2012 20:35:27 +0100

Added: packages/python-carbon/trunk/debian/compat
===================================================================
--- packages/python-carbon/trunk/debian/compat	                        (rev 0)
+++ packages/python-carbon/trunk/debian/compat	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1 @@
+8

Added: packages/python-carbon/trunk/debian/control
===================================================================
--- packages/python-carbon/trunk/debian/control	                        (rev 0)
+++ packages/python-carbon/trunk/debian/control	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,17 @@
+Source: python-carbon
+Section: python
+Priority: optional
+Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
+Uploaders: Jonas Genannt <jonas.genannt at capi2name.de>
+Build-Depends: debhelper (>= 8), python-all (>= 2.6.6-3~)
+Standards-Version: 3.9.2
+Homepage: https://launchpad.net/graphite
+
+Package: python-carbon
+Architecture: all
+Depends: ${misc:Depends}, ${python:Depends}, adduser, python-whisper, python-twisted-core
+Description: backend data caching and persistence daemon for Graphite
+ Client applications connect to the running carbon-cache daemon on
+ port 2003 and send it lines of text. Once you've got some clients
+ sending data to carbon-cache, you can view graphs of that data in the
+ Graphite frontend webapp.

Added: packages/python-carbon/trunk/debian/copyright
===================================================================
--- packages/python-carbon/trunk/debian/copyright	                        (rev 0)
+++ packages/python-carbon/trunk/debian/copyright	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,73 @@
+Format-Specification: http://anonscm.debian.org/viewvc/dep/web/deps/dep5/copyright-format.xml?revision=248
+Upstream-Contact: Chris Davis <chrismd at gmail.com>
+Source: http://pypi.python.org/pypi/carbon/
+Upstream-Name: Carbon
+
+Files: *
+Copyright: 2009 - 2011, Chris Davis <chrismd at gmail.com>
+License: Apache
+
+Files: lib/carbon/amqp_publisher.py
+Copyright: 2009, Lucio Torre <lucio.torre at canonical.com>
+License: Apache
+Comment: no license information in the file. copyright holder
+ has changed license to Apache on 2012-01-23.
+ .
+ https://bugs.launchpad.net/graphite/+bug/919428
+ .
+ Will be merged into upstream on the next release.
+
+Files: lib/carbon/amqp_listener.py
+Copyright: 2009, Lucio Torre <lucio.torre at canonical.com>
+License: Apache
+Comment: no license information in the file. copyright holder
+ has changed license to Apache on 2012-01-23.
+ .
+ https://bugs.launchpad.net/graphite/+bug/919428
+ .
+ Will be merged into upstream on the next release.
+
+Files: lib/carbon/amqp0-8.xml
+Copyright: 2009, AMQP Working Group
+License:
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. 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.
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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.
+
+Files: debian/*
+Copyright: 2012, Jonas Genannt <jonas.genannt at capi2name.de>
+License: Apache
+
+License: Apache
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License
+ .
+ On Debian systems, the full text of the Apache License can be found at
+ "/usr/share/common-licenses/Apache-2.0"

Added: packages/python-carbon/trunk/debian/patches/carbon.conf.debian.patch
===================================================================
--- packages/python-carbon/trunk/debian/patches/carbon.conf.debian.patch	                        (rev 0)
+++ packages/python-carbon/trunk/debian/patches/carbon.conf.debian.patch	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,42 @@
+Description: change default values for debian
+Author: Jonas Genannt <jonas.genannt at capi2name.de>
+Upstream: no
+
+diff --git a/conf/carbon.conf.example b/conf/carbon.conf.example
+index 2124428..6a1695d 100644
+--- a/conf/carbon.conf.example
++++ b/conf/carbon.conf.example
+@@ -14,26 +14,17 @@
+ # To change other directory paths, add settings to this file. The following
+ # configuration variables are available with these default values:
+ #
+-#   STORAGE_DIR    = $GRAPHITE_STORAGE_DIR
+-#   LOCAL_DATA_DIR = STORAGE_DIR/whisper/
+-#   WHITELISTS_DIR = STORAGE_DIR/lists/
+-#   CONF_DIR       = STORAGE_DIR/conf/
+-#   LOG_DIR        = STORAGE_DIR/log/
+-#   PID_DIR        = STORAGE_DIR/
+-#
+-# For FHS style directory structures, use:
+-#
+-#   STORAGE_DIR    = /var/lib/carbon/
+-#   CONF_DIR       = /etc/carbon/
+-#   LOG_DIR        = /var/log/carbon/
+-#   PID_DIR        = /var/run/
+-#
+-#LOCAL_DATA_DIR = /opt/graphite/storage/whisper/
++STORAGE_DIR    = /var/lib/graphite/
++CONF_DIR       = /etc/carbon/
++LOG_DIR        = /var/log/carbon/
++PID_DIR        = /var/run/
++
++LOCAL_DATA_DIR = /var/lib/graphite/whisper/
+ 
+ # Specify the user to drop privileges to
+ # If this is blank carbon runs as the user that invokes it
+ # This user must have write access to the local data directory
+-USER =
++USER = graphite
+ 
+ # Limit the size of the cache to avoid swapping or becoming CPU bound.
+ # Sorts and serving cache queries gets more expensive as the cache grows.

Added: packages/python-carbon/trunk/debian/patches/disable_install_opt.patch
===================================================================
--- packages/python-carbon/trunk/debian/patches/disable_install_opt.patch	                        (rev 0)
+++ packages/python-carbon/trunk/debian/patches/disable_install_opt.patch	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,12 @@
+Description: Do not install stuff to /opt
+Author: Jonas Genannt <jonas.genannt at capi2name.de>
+Upstream: no
+
+diff --git a/setup.cfg b/setup.cfg
+index aeccfb2..e69de29 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -1,3 +0,0 @@
+-[install]
+-prefix = /opt/graphite
+-install-lib = %(prefix)s/lib

Added: packages/python-carbon/trunk/debian/patches/series
===================================================================
--- packages/python-carbon/trunk/debian/patches/series	                        (rev 0)
+++ packages/python-carbon/trunk/debian/patches/series	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,2 @@
+disable_install_opt.patch
+carbon.conf.debian.patch

Added: packages/python-carbon/trunk/debian/python-carbon.default
===================================================================
--- packages/python-carbon/trunk/debian/python-carbon.default	                        (rev 0)
+++ packages/python-carbon/trunk/debian/python-carbon.default	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,2 @@
+# Change to yes, to enable carbon-cache on boot
+CARBON_CACHE_RUN=no

Added: packages/python-carbon/trunk/debian/python-carbon.dirs
===================================================================
--- packages/python-carbon/trunk/debian/python-carbon.dirs	                        (rev 0)
+++ packages/python-carbon/trunk/debian/python-carbon.dirs	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,5 @@
+etc/carbon
+etc/default
+var/lib/graphite
+var/lib/graphite/whisper
+var/log/carbon

Added: packages/python-carbon/trunk/debian/python-carbon.examples
===================================================================
--- packages/python-carbon/trunk/debian/python-carbon.examples	                        (rev 0)
+++ packages/python-carbon/trunk/debian/python-carbon.examples	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1 @@
+conf/*

Added: packages/python-carbon/trunk/debian/python-carbon.logrotate
===================================================================
--- packages/python-carbon/trunk/debian/python-carbon.logrotate	                        (rev 0)
+++ packages/python-carbon/trunk/debian/python-carbon.logrotate	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,13 @@
+/var/log/carbon/*.log {
+	weekly
+	missingok
+	rotate 7
+	compress
+	delaycompress
+	notifempty
+	create 640 graphite root
+	sharedscripts
+	postrotate
+		/etc/init.d/carbon-cache restart > /dev/null
+	endscript
+}

Added: packages/python-carbon/trunk/debian/python-carbon.postinst
===================================================================
--- packages/python-carbon/trunk/debian/python-carbon.postinst	                        (rev 0)
+++ packages/python-carbon/trunk/debian/python-carbon.postinst	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+
+if [ "$1" = configure ]; then
+	if ! getent passwd graphite > /dev/null; then
+		adduser --system --quiet --home /var/lib/graphite --no-create-home \
+			--shell /bin/false --group --gecos "Graphite User" graphite
+	fi
+
+	if [ "`id -u graphite`" -eq 0 ]; then
+		echo "The graphite system user must not have uid 0 (root). Please fix this and reinstall this package." >&2
+		exit 1
+	fi
+
+	 if [ "`id -g graphite`" -eq 0 ]; then
+		echo "The graphite system user must not have root as primary group. Please fix this and reinstall this package." >&2
+		exit 1
+	fi
+fi
+
+
+DIRS_WWWDATA="/var/lib/graphite /var/lib/graphite/whisper /var/log/carbon"
+
+for i in $DIRS_WWWDATA; do
+	if ! dpkg-statoverride --list $i >/dev/null 2>&1
+	then
+		dpkg-statoverride --update --add graphite graphite 4755 $i
+	fi
+done
+
+#DEBHELPER#

Added: packages/python-carbon/trunk/debian/python-carbon.postrm
===================================================================
--- packages/python-carbon/trunk/debian/python-carbon.postrm	                        (rev 0)
+++ packages/python-carbon/trunk/debian/python-carbon.postrm	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+
+DIRS_WWWDATA="/var/lib/graphite /var/lib/graphite/whisper /var/log/carbon"
+
+for i in $DIRS_WWWDATA; do
+	if ! dpkg-statoverride --list $i >/dev/null 2>&1
+	then
+		dpkg-statoverride --remove $i
+	fi
+done
+
+#DEBHELPER#

Added: packages/python-carbon/trunk/debian/rules
===================================================================
--- packages/python-carbon/trunk/debian/rules	                        (rev 0)
+++ packages/python-carbon/trunk/debian/rules	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+
+%:
+	dh $@ --with python2
+
+override_dh_install:
+	[ -f debian/python-carbon/usr/bin/carbon-cache ] || mv debian/python-carbon/usr/bin/carbon-cache.py debian/python-carbon/usr/bin/carbon-cache
+	[ -f debian/python-carbon/usr/bin/carbon-relay ] || mv debian/python-carbon/usr/bin/carbon-relay.py debian/python-carbon/usr/bin/carbon-relay
+	[ -f debian/python-carbon/usr/bin/carbon-aggregator ] || mv debian/python-carbon/usr/bin/carbon-aggregator.py debian/python-carbon/usr/bin/carbon-aggregator
+	[ -f debian/python-carbon/usr/bin/carbon-client ] || mv debian/python-carbon/usr/bin/carbon-client.py debian/python-carbon/usr/bin/carbon-client
+	[ -f debian/python-carbon/usr/bin/validate-storage-schemas ] || mv debian/python-carbon/usr/bin/validate-storage-schemas.py debian/python-carbon/usr/bin/validate-storage-schemas
+	# clean unneeded stuff
+	[ -d debian/python-carbon/usr/conf ] && rm -r debian/python-carbon/usr/conf
+	[ -d debian/python-carbon/usr/storage ] && rm -r debian/python-carbon/usr/storage
+
+	# install global default file for the three carbon daemons
+	cp debian/python-carbon.default debian/python-carbon/etc/default/python-carbon
+	dh_install
+
+override_dh_installinit:
+	dh_installinit --name=carbon-cache


Property changes on: packages/python-carbon/trunk/debian/rules
___________________________________________________________________
Added: svn:executable
   + *

Added: packages/python-carbon/trunk/debian/source/format
===================================================================
--- packages/python-carbon/trunk/debian/source/format	                        (rev 0)
+++ packages/python-carbon/trunk/debian/source/format	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1 @@
+3.0 (quilt)

Added: packages/python-carbon/trunk/debian/watch
===================================================================
--- packages/python-carbon/trunk/debian/watch	                        (rev 0)
+++ packages/python-carbon/trunk/debian/watch	2012-02-04 16:57:02 UTC (rev 20303)
@@ -0,0 +1,2 @@
+version=3
+http://pypi.python.org/packages/source/c/carbon/carbon-(.+)\.tar\.gz




More information about the Python-modules-commits mailing list