[Python-apps-commits] r7281 - in packages/slapos.core/tags (5 files)
arnau at users.alioth.debian.org
arnau at users.alioth.debian.org
Fri Jul 8 16:10:38 UTC 2011
Date: Friday, July 8, 2011 @ 16:10:37
Author: arnau
Revision: 7281
[svn-buildpackage] Tagging slapos.core 0.8+20110708+1.git5c55e0e-1
Added:
packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/
packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/changelog
(from rev 7280, packages/slapos.core/trunk/debian/changelog)
packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/patches/system_configuration_file_by_default.patch
(from rev 7280, packages/slapos.core/trunk/debian/patches/system_configuration_file_by_default.patch)
Deleted:
packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/changelog
packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/patches/system_configuration_file_by_default.patch
Deleted: packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/changelog
===================================================================
--- packages/slapos.core/trunk/debian/changelog 2011-07-01 13:23:08 UTC (rev 7258)
+++ packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/changelog 2011-07-08 16:10:37 UTC (rev 7281)
@@ -1,46 +0,0 @@
-slapos.core (0.8+20110701+1.gitc5b5897-1) unstable; urgency=low
-
- * New upstream snapshot.
- * Allow to specify the software release root through debconf, necessary
- when using a SlapOS master (it must be the same independently of the
- GNU/Linux distribution).
- * debian/config:
- + Fix typo on ipv4_local_network name, which was not set properly in
- generated /etc/slapos/slapos.cfg file.
- * debian/watch:
- + Mangle debian version to remove the snapshot-specific versioning.
-
- -- Arnaud Fontaine <arnau at debian.org> Fri, 01 Jul 2011 15:11:55 +0200
-
-slapos.core (0.8-1) unstable; urgency=low
-
- * New upstream release.
- * Add debian/watch.
- * debian/patches/fix_zc.buildout_conflict.patch:
- + Drop because it was applied upstream.
-
- -- Arnaud Fontaine <arnau at debian.org> Wed, 29 Jun 2011 14:05:39 +0200
-
-slapos.core (0.3~20110608+1.git9496d81-1) unstable; urgency=low
-
- * slapos.slap, slapos.tool.grid and slapos.tool.format have been merged
- upstream into slapos.core.
- * debian/po:
- + Add Swedish translation. Thanks to Martin Bagge. Closes: #628865.
- + Add Danish translation. Thanks to Joe Dalton. Closes: #628202.
- + Add French translation. Thanks to Julien Patriarca. Closes: #629454.
- + Add Portuguese translation. Thanks to Rui Branco and Miguel Figueiredo.
- Closes: #628837.
- + Add Czech translation. Thanks to Michal Simunek. Closes: #628151.
- + Add Dutch translation. Thanks to Jeroen Schot. Closes: #629388.
- + Add Spanish translation. Thanks to Francisco Javier Cuadrado.
- Closes: #630165.
- + Add Russian translation. Thanks to Yuri Kozlov. Closes: #628187.
- + Add Japanese translation. Thanks to Hideki Yamane. Closes: #628705.
- * debian/control, debian/templates:
- + Improve phrasing. Thanks to Christian Perrier. Closes: #627640.
- * debian/templates:
- + Remove meaningless bridge_note debconf note (debconf abuse).
- Closes: #626091.
-
- -- Arnaud Fontaine <arnau at debian.org> Tue, 14 Jun 2011 15:47:56 +0900
Copied: packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/changelog (from rev 7280, packages/slapos.core/trunk/debian/changelog)
===================================================================
--- packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/changelog (rev 0)
+++ packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/changelog 2011-07-08 16:10:37 UTC (rev 7281)
@@ -0,0 +1,55 @@
+slapos.core (0.8+20110708+1.git5c55e0e-1) unstable; urgency=low
+
+ * New upstream snapshot.
+ * debian/patches/system_configuration_file_by_default.patch:
+ + Patch slapconsole and slapos-request as well as it now parsed
+ /etc/slapos/slapos.cfg.
+
+ -- Arnaud Fontaine <arnau at debian.org> Fri, 08 Jul 2011 13:44:25 +0200
+
+slapos.core (0.8+20110701+1.gitc5b5897-1) unstable; urgency=low
+
+ * New upstream snapshot.
+ * Allow to specify the software release root through debconf, necessary
+ when using a SlapOS master (it must be the same independently of the
+ GNU/Linux distribution).
+ * debian/config:
+ + Fix typo on ipv4_local_network name, which was not set properly in
+ generated /etc/slapos/slapos.cfg file.
+ * debian/watch:
+ + Mangle debian version to remove the snapshot-specific versioning.
+
+ -- Arnaud Fontaine <arnau at debian.org> Fri, 01 Jul 2011 15:11:55 +0200
+
+slapos.core (0.8-1) unstable; urgency=low
+
+ * New upstream release.
+ * Add debian/watch.
+ * debian/patches/fix_zc.buildout_conflict.patch:
+ + Drop because it was applied upstream.
+
+ -- Arnaud Fontaine <arnau at debian.org> Wed, 29 Jun 2011 14:05:39 +0200
+
+slapos.core (0.3~20110608+1.git9496d81-1) unstable; urgency=low
+
+ * slapos.slap, slapos.tool.grid and slapos.tool.format have been merged
+ upstream into slapos.core.
+ * debian/po:
+ + Add Swedish translation. Thanks to Martin Bagge. Closes: #628865.
+ + Add Danish translation. Thanks to Joe Dalton. Closes: #628202.
+ + Add French translation. Thanks to Julien Patriarca. Closes: #629454.
+ + Add Portuguese translation. Thanks to Rui Branco and Miguel Figueiredo.
+ Closes: #628837.
+ + Add Czech translation. Thanks to Michal Simunek. Closes: #628151.
+ + Add Dutch translation. Thanks to Jeroen Schot. Closes: #629388.
+ + Add Spanish translation. Thanks to Francisco Javier Cuadrado.
+ Closes: #630165.
+ + Add Russian translation. Thanks to Yuri Kozlov. Closes: #628187.
+ + Add Japanese translation. Thanks to Hideki Yamane. Closes: #628705.
+ * debian/control, debian/templates:
+ + Improve phrasing. Thanks to Christian Perrier. Closes: #627640.
+ * debian/templates:
+ + Remove meaningless bridge_note debconf note (debconf abuse).
+ Closes: #626091.
+
+ -- Arnaud Fontaine <arnau at debian.org> Tue, 14 Jun 2011 15:47:56 +0900
Deleted: packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/patches/system_configuration_file_by_default.patch
===================================================================
--- packages/slapos.core/trunk/debian/patches/system_configuration_file_by_default.patch 2011-07-01 13:23:08 UTC (rev 7258)
+++ packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/patches/system_configuration_file_by_default.patch 2011-07-08 16:10:37 UTC (rev 7281)
@@ -1,122 +0,0 @@
-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/slapos.cfg generated upon package installation.
-
-Index: slapos.core-0.8/slapos/format/__init__.py
-===================================================================
---- slapos.core-0.8.orig/slapos/format/__init__.py 2011-06-22 10:27:18.000000000 +0200
-+++ slapos.core-0.8/slapos/format/__init__.py 2011-06-29 14:29:38.777910440 +0200
-@@ -746,8 +746,10 @@
- """
- (options, args) = self.parse_args()
- if len(args) != 1:
-- self.error("Incorrect number of arguments")
-- return options, args[0]
-+ configuration_file = '/etc/slapos/slapos.cfg'
-+ else:
-+ configuration_file = args[0]
-+ return options, configuration_file
-
- def run(config):
- try:
-@@ -988,7 +990,11 @@
- global callAndRead
- global getpwnam
- real_callAndRead = callAndRead
-- usage = "usage: %s [options] CONFIGURATION_FILE" % sys.argv[0]
-+ usage = """usage: %s [options] CONFIGURATION_FILE
-+
-+If CONFIGURATION_FILE is not given explicitly, it fallbacks on
-+`/etc/slapos/slapos.cfg'.
-+""" % sys.argv[0]
-
- try:
- # Parse arguments
-Index: slapos.core-0.8/slapos/grid/slapgrid.py
-===================================================================
---- slapos.core-0.8.orig/slapos/grid/slapgrid.py 2011-06-21 10:47:40.000000000 +0200
-+++ slapos.core-0.8/slapos/grid/slapgrid.py 2011-06-29 14:24:38.861902078 +0200
-@@ -105,8 +105,8 @@
- help="Enables console output and live output from subcommands.")
- parser.add_argument("-v", "--verbose", action="store_true", default=False,
- help="Be verbose.")
-- parser.add_argument("configuration_file", nargs=1, type=argparse.FileType(),
-- help="SlapOS configuration file.")
-+ parser.add_argument("configuration_file", nargs='?', type=argparse.FileType(),
-+ default='/etc/slapos/slapos.cfg', help="SlapOS configuration file.")
-
- # Parses arguments
- if argument_tuple == ():
-@@ -117,7 +117,7 @@
- parser.parse_args(list(argument_tuple))
- # Parses arguments from config file, if needed, then merge previous arguments
- option_dict = {}
-- configuration_file = argument_option_instance.configuration_file[0]
-+ configuration_file = argument_option_instance.configuration_file
- # Loads config (if config specified)
- slapgrid_configuration = ConfigParser.SafeConfigParser()
- slapgrid_configuration.readfp(configuration_file)
-Index: slapos.core-0.8/slapos/proxy/__init__.py
-===================================================================
---- slapos.core-0.8.orig/slapos/proxy/__init__.py 2011-05-30 11:06:34.000000000 +0200
-+++ slapos.core-0.8/slapos/proxy/__init__.py 2011-06-29 14:24:38.861902078 +0200
-@@ -38,9 +38,11 @@
- """
- (options, args) = self.parse_args()
- if len(args) != 1:
-- self.error("Incorrect number of arguments")
-+ configuration_filename = '/etc/slapos/slapos.cfg'
-+ else:
-+ configuration_filename = args[0]
-
-- return options, args[0]
-+ return options, configuration_filename
-
- class Config:
- def setConfig(self, option_dict, configuration_file_path):
-Index: slapos.core-0.8/slapos/grid/svcbackend.py
-===================================================================
---- slapos.core-0.8.orig/slapos/grid/svcbackend.py 2011-06-08 15:45:27.000000000 +0200
-+++ slapos.core-0.8/slapos/grid/svcbackend.py 2011-06-29 14:24:38.865902079 +0200
-@@ -124,6 +124,8 @@
- Typical usage:
- * %prog CONFIGURATION_FILE [arguments passed to supervisor]
-
-+If CONFIGURATION_FILE is not given explicitly, it fallbacks on
-+`/etc/slapos/slapos.cfg'.
- """.strip()
-
- parser = OptionParser(usage=usage)
-@@ -134,13 +136,13 @@
- else:
- (argument_option_instance, argument_list) = \
- parser.parse_args(list(argument_tuple))
-- if len(argument_list) == 0:
-- parser.error("Configuration file is obligatory. Consult documentation by "
-- "calling with -h.")
-- configuration_file = argument_list[0]
-- if not os.path.exists(configuration_file):
-- parser.error("Could not read configuration file : %s" \
-- % configuration_file)
-+ if (len(argument_list) == 0 or not os.path.exists(argument_list[0])) and \
-+ os.path.exists('/etc/slapos/slapos.cfg'):
-+ configuration_file = '/etc/slapos/slapos.cfg'
-+ elif os.path.exists(argument_list[0]):
-+ configuration_file = argument_list.pop(0)
-+ else:
-+ parser.error("Configuration file not found")
- slapgrid_configuration = ConfigParser.SafeConfigParser()
- slapgrid_configuration.read(configuration_file)
- # Merges the two dictionnaries
-@@ -153,7 +155,7 @@
- if not option_dict.get('supervisord_socket'):
- option_dict['supervisord_socket'] = \
- os.path.join(option_dict['instance_root'], 'supervisord.socket')
-- return option_dict, argument_list[1:]
-+ return option_dict, argument_list
-
-
- def supervisorctl(*argument_tuple):
Copied: packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/patches/system_configuration_file_by_default.patch (from rev 7280, packages/slapos.core/trunk/debian/patches/system_configuration_file_by_default.patch)
===================================================================
--- packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/patches/system_configuration_file_by_default.patch (rev 0)
+++ packages/slapos.core/tags/0.8+20110708+1.git5c55e0e-1/debian/patches/system_configuration_file_by_default.patch 2011-07-08 16:10:37 UTC (rev 7281)
@@ -0,0 +1,162 @@
+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/slapos.cfg generated upon package installation.
+
+Index: slapos.core-0.8+20110708+1.git5c55e0e/slapos/format.py
+===================================================================
+--- slapos.core-0.8+20110708+1.git5c55e0e.orig/slapos/format.py 2011-07-08 16:00:40.000000000 +0200
++++ slapos.core-0.8+20110708+1.git5c55e0e/slapos/format.py 2011-07-08 16:04:06.293661230 +0200
+@@ -830,8 +830,10 @@
+ """
+ (options, args) = self.parse_args()
+ if len(args) != 1:
+- self.error("Incorrect number of arguments")
+- return options, args[0]
++ configuration_file = '/etc/slapos/slapos.cfg'
++ else:
++ configuration_file = args[0]
++ return options, configuration_file
+
+ def run(config):
+ try:
+@@ -1072,7 +1074,11 @@
+ global callAndRead
+ global getpwnam
+ real_callAndRead = callAndRead
+- usage = "usage: %s [options] CONFIGURATION_FILE" % sys.argv[0]
++ usage = """usage: %s [options] CONFIGURATION_FILE
++
++If CONFIGURATION_FILE is not given explicitly, it fallbacks on
++`/etc/slapos/slapos.cfg'.
++""" % sys.argv[0]
+
+ try:
+ # Parse arguments
+Index: slapos.core-0.8+20110708+1.git5c55e0e/slapos/grid/slapgrid.py
+===================================================================
+--- slapos.core-0.8+20110708+1.git5c55e0e.orig/slapos/grid/slapgrid.py 2011-07-08 16:00:40.000000000 +0200
++++ slapos.core-0.8+20110708+1.git5c55e0e/slapos/grid/slapgrid.py 2011-07-08 16:04:06.293661230 +0200
+@@ -105,8 +105,8 @@
+ help="Enables console output and live output from subcommands.")
+ parser.add_argument("-v", "--verbose", action="store_true", default=False,
+ help="Be verbose.")
+- parser.add_argument("configuration_file", nargs=1, type=argparse.FileType(),
+- help="SlapOS configuration file.")
++ parser.add_argument("configuration_file", nargs='?', type=argparse.FileType(),
++ default='/etc/slapos/slapos.cfg', help="SlapOS configuration file.")
+
+ # Parses arguments
+ if argument_tuple == ():
+@@ -117,7 +117,7 @@
+ parser.parse_args(list(argument_tuple))
+ # Parses arguments from config file, if needed, then merge previous arguments
+ option_dict = {}
+- configuration_file = argument_option_instance.configuration_file[0]
++ configuration_file = argument_option_instance.configuration_file
+ # Loads config (if config specified)
+ slapgrid_configuration = ConfigParser.SafeConfigParser()
+ slapgrid_configuration.readfp(configuration_file)
+Index: slapos.core-0.8+20110708+1.git5c55e0e/slapos/proxy/__init__.py
+===================================================================
+--- slapos.core-0.8+20110708+1.git5c55e0e.orig/slapos/proxy/__init__.py 2011-07-08 16:00:40.000000000 +0200
++++ slapos.core-0.8+20110708+1.git5c55e0e/slapos/proxy/__init__.py 2011-07-08 16:04:06.293661230 +0200
+@@ -38,9 +38,11 @@
+ """
+ (options, args) = self.parse_args()
+ if len(args) != 1:
+- self.error("Incorrect number of arguments")
++ configuration_filename = '/etc/slapos/slapos.cfg'
++ else:
++ configuration_filename = args[0]
+
+- return options, args[0]
++ return options, configuration_filename
+
+ class Config:
+ def setConfig(self, option_dict, configuration_file_path):
+Index: slapos.core-0.8+20110708+1.git5c55e0e/slapos/grid/svcbackend.py
+===================================================================
+--- slapos.core-0.8+20110708+1.git5c55e0e.orig/slapos/grid/svcbackend.py 2011-07-08 16:00:40.000000000 +0200
++++ slapos.core-0.8+20110708+1.git5c55e0e/slapos/grid/svcbackend.py 2011-07-08 16:04:06.293661230 +0200
+@@ -124,6 +124,8 @@
+ Typical usage:
+ * %prog CONFIGURATION_FILE [arguments passed to supervisor]
+
++If CONFIGURATION_FILE is not given explicitly, it fallbacks on
++`/etc/slapos/slapos.cfg'.
+ """.strip()
+
+ parser = OptionParser(usage=usage)
+@@ -134,13 +136,13 @@
+ else:
+ (argument_option_instance, argument_list) = \
+ parser.parse_args(list(argument_tuple))
+- if len(argument_list) == 0:
+- parser.error("Configuration file is obligatory. Consult documentation by "
+- "calling with -h.")
+- configuration_file = argument_list[0]
+- if not os.path.exists(configuration_file):
+- parser.error("Could not read configuration file : %s" \
+- % configuration_file)
++ if (len(argument_list) == 0 or not os.path.exists(argument_list[0])) and \
++ os.path.exists('/etc/slapos/slapos.cfg'):
++ configuration_file = '/etc/slapos/slapos.cfg'
++ elif os.path.exists(argument_list[0]):
++ configuration_file = argument_list.pop(0)
++ else:
++ parser.error("Configuration file not found")
+ slapgrid_configuration = ConfigParser.SafeConfigParser()
+ slapgrid_configuration.read(configuration_file)
+ # Merges the two dictionnaries
+@@ -153,7 +155,7 @@
+ if not option_dict.get('supervisord_socket'):
+ option_dict['supervisord_socket'] = \
+ os.path.join(option_dict['instance_root'], 'supervisord.socket')
+- return option_dict, argument_list[1:]
++ return option_dict, argument_list
+
+
+ def supervisorctl(*argument_tuple):
+Index: slapos.core-0.8+20110708+1.git5c55e0e/slapos/console.py
+===================================================================
+--- slapos.core-0.8+20110708+1.git5c55e0e.orig/slapos/console.py 2011-07-08 16:04:08.077661232 +0200
++++ slapos.core-0.8+20110708+1.git5c55e0e/slapos/console.py 2011-07-08 17:57:10.433662228 +0200
+@@ -60,10 +60,8 @@
+ Check arguments
+ """
+ (options, args) = self.parse_args()
+- if len(args) == 0:
+- self.error("Incorrect number of arguments")
+- elif not os.path.isfile(args[0]):
+- self.error("%s: Not found or not a regular file." % args[0])
++ if len(args) == 0 or not os.path.isfile(args[0]):
++ args.insert(0, '/etc/slapos/slapos.cfg')
+
+ return options, args
+
+@@ -141,7 +139,11 @@
+ """Ran when invoking slapos-request"""
+ # Parse arguments
+ usage = """usage: %s [options] CONFIGURATION_FILE SOFTWARE_INSTANCE INSTANCE_REFERENCE
+-slapos-request allows you to request slapos instances.""" % sys.argv[0]
++slapos-request allows you to request slapos instances.
++
++If CONFIGURATION_FILE is not given explicitly, then `/etc/slapos/slapos.cfg'
++will be used.
++""" % sys.argv[0]
+ config = Config()
+ options, arguments = RequestParser(usage=usage).check_args()
+ config.setConfig(options, arguments[0])
+@@ -176,6 +178,9 @@
+ slapconsole allows you interact with slap API. You can play with the global
+ "slap" object and with the global "request" method.
+
++If CONFIGURATION_FILE is not given explicitly, then `/etc/slapos/slapos.cfg'
++will be used.
++
+ examples :
+ >>> # Request instance
+ >>> request(kvm, "myuniquekvm")
More information about the Python-apps-commits
mailing list