[Python-apps-commits] r12787 - in packages/diamond/trunk (13 files)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Tue Feb 16 11:09:20 UTC 2016


    Date: Tuesday, February 16, 2016 @ 11:09:19
  Author: morph
Revision: 12787

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

Added:
  packages/diamond/trunk/debian/
  packages/diamond/trunk/debian/changelog
  packages/diamond/trunk/debian/compat
  packages/diamond/trunk/debian/control
  packages/diamond/trunk/debian/copyright
  packages/diamond/trunk/debian/diamond.default
  packages/diamond/trunk/debian/diamond.init
  packages/diamond/trunk/debian/diamond.postinst
  packages/diamond/trunk/debian/diamond.postrm
  packages/diamond/trunk/debian/rules
  packages/diamond/trunk/debian/source/
  packages/diamond/trunk/debian/source/format
  packages/diamond/trunk/debian/watch


Property changes on: packages/diamond/trunk/debian
___________________________________________________________________
Added: mergeWithUpstream
   + 1

Added: packages/diamond/trunk/debian/changelog
===================================================================
--- packages/diamond/trunk/debian/changelog	                        (rev 0)
+++ packages/diamond/trunk/debian/changelog	2016-02-16 11:09:19 UTC (rev 12787)
@@ -0,0 +1,5 @@
+diamond (4.0.195-1) unstable; urgency=low
+
+  * Initial release (Closes: #814784)
+
+ -- Sandro Tosi <morph at debian.org>  Mon, 15 Feb 2016 07:52:21 -0500

Added: packages/diamond/trunk/debian/compat
===================================================================
--- packages/diamond/trunk/debian/compat	                        (rev 0)
+++ packages/diamond/trunk/debian/compat	2016-02-16 11:09:19 UTC (rev 12787)
@@ -0,0 +1 @@
+9

Added: packages/diamond/trunk/debian/control
===================================================================
--- packages/diamond/trunk/debian/control	                        (rev 0)
+++ packages/diamond/trunk/debian/control	2016-02-16 11:09:19 UTC (rev 12787)
@@ -0,0 +1,33 @@
+Source: diamond
+Section: utils
+Priority: optional
+Maintainer: Sandro Tosi <morph at debian.org>
+Uploaders: Python Applications Packaging Team <python-apps-team at lists.alioth.debian.org>
+Build-Depends: debhelper (>= 9), python, dh-python, python-setuptools, python-configobj, python-psutil
+Standards-Version: 3.9.6
+Homepage: https://github.com/python-diamond/Diamond
+#Vcs-Git: git://anonscm.debian.org/collab-maint/diamond.git
+#Vcs-Browser: https://anonscm.debian.org/gitweb/?p=collab-maint/diamond.git;a=summary
+
+Package: diamond
+Architecture: all
+Depends: ${python:Depends}, ${misc:Depends}, adduser, python-diamond (= ${binary:Version})
+Description: smart data producer for Graphite graphing package
+ Diamond is a python daemon that collects system metrics and publishes them to
+ Graphite (and others). It is capable of collecting cpu, memory, network, i/o,
+ load and disk metrics. Additionally, it features an API for implementing custom
+ collectors for gathering metrics from almost any source.
+ .
+ This package contains the daemon and its configuration and accessories.
+
+Package: python-diamond
+Architecture: all
+Section: python
+Depends: ${python:Depends}, ${misc:Depends}
+Description: smart data producer for Graphite graphing package (Python module)
+ Diamond is a python daemon that collects system metrics and publishes them to
+ Graphite (and others). It is capable of collecting cpu, memory, network, i/o,
+ load and disk metrics. Additionally, it features an API for implementing custom
+ collectors for gathering metrics from almost any source.
+ .
+ This package contains the 'diamond' python module.

Added: packages/diamond/trunk/debian/copyright
===================================================================
--- packages/diamond/trunk/debian/copyright	                        (rev 0)
+++ packages/diamond/trunk/debian/copyright	2016-02-16 11:09:19 UTC (rev 12787)
@@ -0,0 +1,76 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: diamond
+Source: https://github.com/python-diamond/Diamond
+
+Files: *
+Copyright:
+ Copyright (C) 2010-2012 by Brightcove Inc.      http://www.brightcove.com/
+ Copyright (C) 2011-2012 by Ivan Pouzyrevsky
+ Copyright (C) 2011-2012 by Rob Smith            http://www.kormoc.com
+ Copyright (C) 2012 Wijnand Modderman-Lenstra    https://maze.io/
+ Copyright (C) 2012 Dennis Kaarsemaker           <dennis at kaarsemaker.net>
+License: MIT
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+Files: debian/*
+Copyright: 2016 Sandro Tosi <morph at debian.org>
+License: MIT
+
+Files: debian/diamond.init
+Author: Ivan Pouzyrevsky <sandello at yandex-team.ru>
+License: MIT
+
+Files: src/diamond/gmetric.py
+Copyright: Copyright (c) 2007,2008 Nick Galbreath
+License: MIT
+
+Files: src/collectors/onewire/onewire.py
+Author: Tomasz Prus
+
+Files: src/collectors/jbossapi/jbossapi.py
+Comment:
+ Much of the code was borrowed from:
+ .
+ http://bit.ly/XRrCWx
+ https://github.com/lukaf/munin-plugins/blob/master/jboss7_
+
+Files: src/collectors/jcollectd/collectd_network.py
+Copyright: Copyright © 2009 Adrian Perez <aperez at igalia.com>
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+Files: src/collectors/endecadgraph/endecadgraph.py
+Authors: Jan van Bemmelen <jvanbemmelen at bol.com>
+ Renzo Toma <rtoma at bol.com>

Added: packages/diamond/trunk/debian/diamond.default
===================================================================
--- packages/diamond/trunk/debian/diamond.default	                        (rev 0)
+++ packages/diamond/trunk/debian/diamond.default	2016-02-16 11:09:19 UTC (rev 12787)
@@ -0,0 +1,12 @@
+# Defaults for diamond initscript
+# sourced by /etc/init.d/diamond
+# installed at /etc/default/diamond by the maintainer scripts
+
+#
+# This is a POSIX shell fragment
+#
+
+# Additional options that are passed to the Daemon.
+ENABLE_DIAMOND="no"
+DIAMOND_PID="/var/run/diamond.pid"
+DIAMOND_USER="diamond"

Added: packages/diamond/trunk/debian/diamond.init
===================================================================
--- packages/diamond/trunk/debian/diamond.init	                        (rev 0)
+++ packages/diamond/trunk/debian/diamond.init	2016-02-16 11:09:19 UTC (rev 12787)
@@ -0,0 +1,152 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          diamond
+# Required-Start:    $network $local_fs $remote_fs
+# Required-Stop:     $network $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: System statistics collector for Graphite.
+# Description:       Diamond is a daemon and toolset for gathering system statistics
+#                    and publishing them to Graphite.
+### END INIT INFO
+
+# Author: Ivan Pouzyrevsky <sandello at yandex-team.ru>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC=diamond
+NAME=diamond
+DAEMON=/usr/bin/diamond
+DAEMON_ARGS="-p /var/run/diamond.pid"
+PIDFILE=/var/run/diamond.pid
+SCRIPTNAME=/etc/init.d/diamond
+CONF=/etc/diamond/diamond.conf
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Checking for a config file in place
+if [  ! -e $CONF ]; then
+   echo "/etc/diamond/diamond.conf not found. Please see /etc/diamond/diamond.conf.example" 
+   exit 2
+fi
+
+# 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 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 -p "$PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $?
+    ;;
+  reload|force-reload)
+    log_daemon_msg "Reloading $DESC" "$NAME"
+    do_reload
+    log_end_msg $?
+    ;;
+  restart)
+    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|status|restart|reload|force-reload}" >&2
+    exit 3
+    ;;
+esac
+
+:

Added: packages/diamond/trunk/debian/diamond.postinst
===================================================================
--- packages/diamond/trunk/debian/diamond.postinst	                        (rev 0)
+++ packages/diamond/trunk/debian/diamond.postinst	2016-02-16 11:09:19 UTC (rev 12787)
@@ -0,0 +1,50 @@
+#!/bin/sh
+# postinst script for diamond
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+        if ! getent group diamond >/dev/null ; then
+            addgroup --quiet --system diamond >/dev/null
+        fi
+        if ! getent passwd diamond >/dev/null; then
+            adduser --quiet --system --no-create-home --home /var/log/diamond \
+            --ingroup diamond \
+            --shell /usr/sbin/nologin diamond
+        fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+# Log / Run directory permissions
+chown -R diamond:diamond /var/log/diamond
+
+exit 0

Added: packages/diamond/trunk/debian/diamond.postrm
===================================================================
--- packages/diamond/trunk/debian/diamond.postrm	                        (rev 0)
+++ packages/diamond/trunk/debian/diamond.postrm	2016-02-16 11:09:19 UTC (rev 12787)
@@ -0,0 +1,42 @@
+#!/bin/sh
+# postrm script for diamond
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    purge)
+        [ -d /var/log/diamond ] && rm -rf /var/log/diamond
+        [ -d /etc/diamond ] && rm -rf /etc/diamond
+    ;;
+
+    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

Added: packages/diamond/trunk/debian/rules
===================================================================
--- packages/diamond/trunk/debian/rules	                        (rev 0)
+++ packages/diamond/trunk/debian/rules	2016-02-16 11:09:19 UTC (rev 12787)
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+
+# main packaging script based on dh7 syntax
+%:
+	dh $@ --with python2
+
+override_dh_auto_install:
+	python setup.py install --install-layout=deb --root=$(CURDIR)/debian/diamond
+
+	cp $(CURDIR)/debian/diamond.init $(CURDIR)/debian/diamond/etc/init.d/diamond
+
+	mkdir -p $(CURDIR)/debian/diamond/etc/default
+	cp $(CURDIR)/debian/diamond.default $(CURDIR)/debian/diamond/etc/default
+
+	# split program and python module in 2 packages
+	mkdir -p $(CURDIR)/debian/python-diamond/usr
+	mv $(CURDIR)/debian/diamond/usr/lib $(CURDIR)/debian/python-diamond/usr
+
+	rm $(CURDIR)/debian/diamond/usr/share/diamond/LICENSE
+	rm $(CURDIR)/debian/diamond/usr/share/diamond/README.md
+	rm $(CURDIR)/debian/diamond/etc/diamond/diamond.conf.example.windows
+
+override_dh_installdocs:
+	dh_installdocs README.md


Property changes on: packages/diamond/trunk/debian/rules
___________________________________________________________________
Added: svn:executable
   + *

Added: packages/diamond/trunk/debian/source/format
===================================================================
--- packages/diamond/trunk/debian/source/format	                        (rev 0)
+++ packages/diamond/trunk/debian/source/format	2016-02-16 11:09:19 UTC (rev 12787)
@@ -0,0 +1 @@
+3.0 (quilt)

Added: packages/diamond/trunk/debian/watch
===================================================================
--- packages/diamond/trunk/debian/watch	                        (rev 0)
+++ packages/diamond/trunk/debian/watch	2016-02-16 11:09:19 UTC (rev 12787)
@@ -0,0 +1,3 @@
+version=3
+opts=uversionmangle=s/(rc|a|b|c)/~$1/ \
+https://pypi.debian.net/diamond/diamond-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))




More information about the Python-apps-commits mailing list