[Python-apps-commits] r6976 - in packages/slapos.tool.grid/trunk (25 files)
arnau at users.alioth.debian.org
arnau at users.alioth.debian.org
Tue Apr 26 12:59:07 UTC 2011
Date: Tuesday, April 26, 2011 @ 12:58:48
Author: arnau
Revision: 6976
[svn-inject] Applying Debian modifications (1.0~20110420+1.git67c5b39-1) to trunk
Added:
packages/slapos.tool.grid/trunk/debian/
packages/slapos.tool.grid/trunk/debian/changelog
packages/slapos.tool.grid/trunk/debian/clean
packages/slapos.tool.grid/trunk/debian/compat
packages/slapos.tool.grid/trunk/debian/conf/
packages/slapos.tool.grid/trunk/debian/conf/slapgrid.cfg
packages/slapos.tool.grid/trunk/debian/config
packages/slapos.tool.grid/trunk/debian/control
packages/slapos.tool.grid/trunk/debian/copyright
packages/slapos.tool.grid/trunk/debian/cron.d
packages/slapos.tool.grid/trunk/debian/dirs
packages/slapos.tool.grid/trunk/debian/docs
packages/slapos.tool.grid/trunk/debian/examples
packages/slapos.tool.grid/trunk/debian/patches/
packages/slapos.tool.grid/trunk/debian/patches/series
packages/slapos.tool.grid/trunk/debian/patches/system_configuration_file_by_default.patch
packages/slapos.tool.grid/trunk/debian/po/
packages/slapos.tool.grid/trunk/debian/po/POTFILES.in
packages/slapos.tool.grid/trunk/debian/po/templates.pot
packages/slapos.tool.grid/trunk/debian/postinst
packages/slapos.tool.grid/trunk/debian/postrm
packages/slapos.tool.grid/trunk/debian/rules
packages/slapos.tool.grid/trunk/debian/source/
packages/slapos.tool.grid/trunk/debian/source/format
packages/slapos.tool.grid/trunk/debian/templates
Property changes on: packages/slapos.tool.grid/trunk/debian
___________________________________________________________________
Added: mergeWithUpstream
+ 1
Added: packages/slapos.tool.grid/trunk/debian/changelog
===================================================================
--- packages/slapos.tool.grid/trunk/debian/changelog (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/changelog 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,5 @@
+slapos.tool.grid (1.0~20110420+1.git67c5b39-1) unstable; urgency=low
+
+ * Initial upload. Closes: #624163.
+
+ -- Arnaud Fontaine <arnau at debian.org> Tue, 26 Apr 2011 14:25:28 +0900
Added: packages/slapos.tool.grid/trunk/debian/clean
===================================================================
--- packages/slapos.tool.grid/trunk/debian/clean (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/clean 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1 @@
+src/slapos.tool.grid.egg-info/*
\ No newline at end of file
Added: packages/slapos.tool.grid/trunk/debian/compat
===================================================================
--- packages/slapos.tool.grid/trunk/debian/compat (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/compat 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1 @@
+7
Added: packages/slapos.tool.grid/trunk/debian/conf/slapgrid.cfg
===================================================================
--- packages/slapos.tool.grid/trunk/debian/conf/slapgrid.cfg (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/conf/slapgrid.cfg 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,9 @@
+[slapos]
+software_root = /var/lib/slapos/software
+instance_root = /var/lib/slapos/instance
+master_url = http://127.0.0.1:5000
+computer_id = abeautifulbutuniquename
+pidfile = /var/run/slapgrid.pid
+logfile = /var/log/slapos/slapgrid.log
+supervisord-socket = /var/run/slapgrid-supervisord.sock
+supervisord-configuration-path = /etc/slapos/
Added: packages/slapos.tool.grid/trunk/debian/config
===================================================================
--- packages/slapos.tool.grid/trunk/debian/config (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/config 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,33 @@
+#!/bin/sh
+set -e
+
+#DEBHELPER#
+
+. /usr/share/debconf/confmodule
+
+CONFIG_FILE=/etc/slapos/slapgrid.cfg
+MASTER_URL=
+COMPUTER_ID=
+
+if [ -f "$CONFIG_FILE" ]; then
+ MASTER_URL="`sed -ne 's#^master_url[^=]*=\s*\(.*\)$#\1#p' \"$CONFIG_FILE\"`"
+ COMPUTER_ID="`sed -ne 's#^computer_id[^=]*=\s*\(.*\)$#\1#p' \"$CONFIG_FILE\"`"
+fi
+
+if [ -n "$MASTER_URL" ]; then
+ db_set slapgrid/master_url "$MASTER_URL"
+ db_input medium slapgrid/master_url || true
+else
+ db_input high slapgrid/master_url || true
+fi
+
+if [ -n "$COMPUTER_ID" ]; then
+ db_set slapgrid/computer_id "$COMPUTER_ID"
+ db_input medium slapgrid/computer_id || true
+else
+ db_input high slapgrid/computer_id || true
+fi
+
+db_go || true
+
+exit 0
Property changes on: packages/slapos.tool.grid/trunk/debian/config
___________________________________________________________________
Added: svn:executable
+ *
Added: packages/slapos.tool.grid/trunk/debian/control
===================================================================
--- packages/slapos.tool.grid/trunk/debian/control (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/control 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,27 @@
+Source: slapos.tool.grid
+Maintainer: Arnaud Fontaine <arnau at debian.org>
+Section: net
+Priority: optional
+Build-Depends: python-setuptools (>= 0.6b3),
+ python (>= 2.6.6-3~),
+ debhelper (>= 7.4.3),
+ po-debconf
+Standards-Version: 3.9.2
+X-Python-Version: >= 2.6
+Homepage: http://www.slapos.org
+Vcs-Svn: svn://svn.debian.org/python-apps/packages/slapos.tool.grid/trunk/
+Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/slapos.tool.grid/trunk/
+
+Package: slapgrid
+Architecture: all
+Depends: ${misc:Depends},
+ ${python:Depends},
+ python-zc.buildout (>= 1.5.0),
+Breaks: ${python:Breaks}
+Recommends: python-dev,
+ gcc | c-compiler,
+ libc6-dev | libc-dev
+Description: Client to deploy a SaaS system with SLAPos
+ SLAPos provides support for deploying a SaaS system. Slapgrid is the
+ client side of SLAPos and allows you to easily deploy instances of
+ software based on buildout profiles.
Added: packages/slapos.tool.grid/trunk/debian/copyright
===================================================================
--- packages/slapos.tool.grid/trunk/debian/copyright (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/copyright 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,39 @@
+This package was debianized by Arnaud Fontaine <arnau at debian.org> on
+Tue, 26 Apr 2011 14:25:28 +0900.
+
+This package was debianized from the Git repository available there:
+http://gitorious.org/slapos/slapos-core
+
+Upstream author:
+
+ Vifib SARL <info at slapos.org>
+
+Copyright:
+
+ Copyright 2010-2011, Vifib SARL and Contributors.
+
+License:
+
+ WARNING: This program as such is intended to be used by professional
+ programmers who take the whole responsibility of assessing all
+ potential consequences resulting from its eventual inadequacies and
+ bugs End users who are looking for a ready-to-use solution with
+ commercial guarantees and support are strongly adviced to contract a
+ Free Software Service Company
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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.
+
+
+In a Debian system the complete text of the GNU General Public License
+v3 can be found in the file `/usr/share/common-licenses/GPL-3'.
+
+The Debian packaging is (C) 2011, Arnaud Fontaine <arnau at debian.org>
+and is licensed under the same license as upstream source code.
Added: packages/slapos.tool.grid/trunk/debian/cron.d
===================================================================
--- packages/slapos.tool.grid/trunk/debian/cron.d (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/cron.d 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,7 @@
+SHELL=/bin/sh
+PATH=/usr/bin:/usr/sbin:/sbin:/bin
+MAILTO=root
+
+*/5 * * * * root /usr/sbin/slapgrid-cp
+*/5 * * * * root /usr/sbin/slapgrid-sr
+0 0 * * * root /usr/sbin/slapgrid-ur
Added: packages/slapos.tool.grid/trunk/debian/dirs
===================================================================
--- packages/slapos.tool.grid/trunk/debian/dirs (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/dirs 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,2 @@
+etc/slapos/
+var/log/slapos/
Added: packages/slapos.tool.grid/trunk/debian/docs
===================================================================
--- packages/slapos.tool.grid/trunk/debian/docs (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/docs 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,2 @@
+README.txt
+CHANGES.txt
Added: packages/slapos.tool.grid/trunk/debian/examples
===================================================================
--- packages/slapos.tool.grid/trunk/debian/examples (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/examples 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1 @@
+debian/conf/slapgrid.cfg
Added: packages/slapos.tool.grid/trunk/debian/patches/series
===================================================================
--- packages/slapos.tool.grid/trunk/debian/patches/series (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/patches/series 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1 @@
+system_configuration_file_by_default.patch
Added: packages/slapos.tool.grid/trunk/debian/patches/system_configuration_file_by_default.patch
===================================================================
--- packages/slapos.tool.grid/trunk/debian/patches/system_configuration_file_by_default.patch (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/patches/system_configuration_file_by_default.patch 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,34 @@
+Author: Arnaud Fontaine <arnau at debian.org>
+Forwarded: not-needed
+Description: Fallback on system configuration file by default
+ Scripts expect the configuration file as their first argument, but as
+ the configuration file options are set up through debconf, fallback
+ on /etc/slapos/slapgrid.cfg generated upon package installation.
+
+--- a/src/slapos/tool/grid/slapgrid.py 2011-04-26 20:55:59.358391616 +0900
++++ b/src/slapos/tool/grid/slapgrid.py 2011-04-26 21:02:31.362391796 +0900
+@@ -73,6 +73,9 @@
+ Typical usage:
+ * %prog [options] CONFIGURATION_FILE
+
++If CONFIGURATION_FILE is not given explicitly, it will fallback on
++`/etc/slapos/slapgrid.cfg'.
++
+ Note : Command-line arguments supersede configuration file arguments.""".strip()
+
+ parser = OptionParser(usage=usage)
+@@ -117,10 +120,11 @@
+ else:
+ (argument_option_instance, argument_list) = \
+ parser.parse_args(list(argument_tuple))
++
+ if len(argument_list) != 1:
+- parser.error("Configuration file is obligatory. Consult documentation by "
+- "calling with -h.")
+- configuration_file = argument_list[0]
++ configuration_file = "/etc/slapos/slapgrid.cfg"
++ else:
++ configuration_file = argument_list[0]
+ #FIXME library that gives not iterable instances of crap.
+ argument_option_dict = \
+ dict(instance_root=argument_option_instance.instance_root,
Added: packages/slapos.tool.grid/trunk/debian/po/POTFILES.in
===================================================================
--- packages/slapos.tool.grid/trunk/debian/po/POTFILES.in (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/po/POTFILES.in 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates
Added: packages/slapos.tool.grid/trunk/debian/po/templates.pot
===================================================================
--- packages/slapos.tool.grid/trunk/debian/po/templates.pot (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/po/templates.pot 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,30 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: slapos.tool.grid at packages.debian.org\n"
+"POT-Creation-Date: 2011-04-26 20:44+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../templates:1001
+msgid "The HTTP URL where the master node can be reached:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:2001
+msgid "ID to uniquely identifies this computer on the master:"
+msgstr ""
Added: packages/slapos.tool.grid/trunk/debian/postinst
===================================================================
--- packages/slapos.tool.grid/trunk/debian/postinst (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/postinst 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,34 @@
+#!/bin/sh
+set -e
+
+#DEBHELPER#
+
+. /usr/share/debconf/confmodule
+
+CONFIG_FILE=/etc/slapos/slapgrid.cfg
+if [ ! -f "$CONFIG_FILE" ]; then
+ cp /usr/share/doc/slapgrid/examples/slapgrid.cfg /etc/slapos/slapgrid.cfg
+fi
+
+db_get slapgrid/master_url
+MASTER_URL="$RET"
+
+db_get slapgrid/computer_id
+COMPUTER_ID="$RET"
+
+cp -a -f $CONFIG_FILE $CONFIG_FILE.tmp
+
+# If the admin deleted or commented some variables but then set them
+# via debconf, (re-)add them to the conffile.
+test -z "$MASTER_URL" || grep -Eq '^\s*master_url\s*=' $CONFIG_FILE || \
+ echo "master_url = " >> $CONFIG_FILE
+test -z "$COMPUTER_ID" || grep -Eq '^\s*computer_id\s*=' $CONFIG_FILE || \
+ echo "computer_id =" >> $CONFIG_FILE
+
+sed -e "s#^\s*master_url\s*=.*#master_url = $MASTER_URL#" \
+ -e "s#^\s*computer_id\s*=.*#computer_id = $COMPUTER_ID#" \
+ < $CONFIG_FILE > $CONFIG_FILE.tmp
+
+mv -f $CONFIG_FILE.tmp $CONFIG_FILE
+
+exit 0
Property changes on: packages/slapos.tool.grid/trunk/debian/postinst
___________________________________________________________________
Added: svn:executable
+ *
Added: packages/slapos.tool.grid/trunk/debian/postrm
===================================================================
--- packages/slapos.tool.grid/trunk/debian/postrm (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/postrm 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -e
+
+CONFIG_DIR="/etc/slapos"
+
+case "$1" in
+ purge)
+ if [ -d "$CONFIG_DIR" ]; then
+ rm -f "$CONFIG_DIR"/slapgrid.cfg
+ [ $(ls "$CONFIG_DIR" | wc -l) -eq 0 ] && rmdir "$CONFIG_DIR"
+ fi
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
Property changes on: packages/slapos.tool.grid/trunk/debian/postrm
___________________________________________________________________
Added: svn:executable
+ *
Added: packages/slapos.tool.grid/trunk/debian/rules
===================================================================
--- packages/slapos.tool.grid/trunk/debian/rules (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/rules 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,39 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@ --with python2
+
+override_dh_python2:
+ dh_python2 --no-guessing-versions
+
+override_dh_auto_install:
+ python setup.py install --root=debian/slapgrid --install-layout=deb \
+ --install-scripts=/usr/sbin/
+
+# Generate the upstream tarball from upstream Git (adapted from
+# http://wiki.debian.org/SandroTosi/Svn_get-orig-source for Git)
+PACKAGE := slapos.tool.grid
+
+SRC_VERSION := $(shell dpkg-parsechangelog | \
+ sed -ne 's/^Version: \([^-]\+\)-.*/\1/p')
+
+GIT_VERSION := $(shell echo $(SRC_VERSION) | \
+ sed -ne 's/.*git\([a-z0-9]\+\)/\1/p')
+
+TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
+
+get-orig-source:
+ rm -rf get-orig-source $(TARBALL)
+
+ git clone http://git.gitorious.org/slapos/slapos-core.git \
+ get-orig-source/
+
+ cd get-orig-source/slapos.tool.grid/ && \
+ git archive --prefix=$(PACKAGE)-$(SRC_VERSION).orig/ \
+ --format=tar $(GIT_VERSION) | \
+ gzip --no-name --best > ../../../$(TARBALL)
+
+ rm -rf get-orig-source
+ @echo "'../$(TARBALL)' created."
+
+.PHONY: get-orig-source
Property changes on: packages/slapos.tool.grid/trunk/debian/rules
___________________________________________________________________
Added: svn:executable
+ *
Added: packages/slapos.tool.grid/trunk/debian/source/format
===================================================================
--- packages/slapos.tool.grid/trunk/debian/source/format (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/source/format 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1 @@
+3.0 (quilt)
Added: packages/slapos.tool.grid/trunk/debian/templates
===================================================================
--- packages/slapos.tool.grid/trunk/debian/templates (rev 0)
+++ packages/slapos.tool.grid/trunk/debian/templates 2011-04-26 12:58:48 UTC (rev 6976)
@@ -0,0 +1,7 @@
+Template: slapgrid/master_url
+Type: string
+_Description: The HTTP URL where the master node can be reached:
+
+Template: slapgrid/computer_id
+Type: string
+_Description: ID to uniquely identifies this computer on the master:
More information about the Python-apps-commits
mailing list