Changeset 338 for cleverbox/trunk
- Timestamp:
- 05/03/08 09:55:04 (4 years ago)
- Location:
- cleverbox/trunk
- Files:
-
- 5 modified
-
cleverbox/model/project.py (modified) (13 diffs)
-
debian/control (modified) (1 diff)
-
debian/postinst (modified) (1 diff)
-
docs/CHANGELOG (modified) (1 diff)
-
setup.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cleverbox/trunk/cleverbox/model/project.py
r267 r338 36 36 If "status" parameter has a value (either "enabled" or "disabled"), returned list is limited to project with this status. 37 37 """ 38 38 39 39 list_projects = [] 40 40 … … 72 72 if not exists(environment, client_name, project_name): 73 73 raise Exception, 'Client "%s" has no project "%s".' % (client_name, project_name) 74 74 75 75 try: 76 76 os.unlink(os.path.join(environment.get_path('projects-enabled'), '%s-%s' % (client_name, project_name))) … … 85 85 Enables project in environment. 86 86 """ 87 87 88 88 if not exists(environment, client_name, project_name): 89 89 raise Exception, 'Client "%s" has no project "%s"' % (client_name, project_name) 90 90 91 91 target = os.path.join(environment.get_path('projects-available'), 92 92 '%s-%s' % (client_name, project_name)) … … 104 104 Creates a new project for client in environment. 105 105 """ 106 106 107 107 # Merging for consistency 108 108 parameters['client'] = client_name … … 146 146 # -- Modifies Trac default conf 147 147 _trac_defaultconf(environment, parameters) 148 148 149 149 # -- Fix perms 150 150 _fix_perms(environment, parameters) … … 217 217 'trac_install_dir' : environment.config.get('trac', 'lib_dir')} 218 218 219 trac_cmd = ' /usr/bin/trac-admin %(env_path)s initenv %(title)s %(db_dsn)s svn %(svn_path)s %(templates_path)s' % cmd_data219 trac_cmd = 'trac-admin %(env_path)s initenv %(title)s %(db_dsn)s svn %(svn_path)s %(templates_path)s' % cmd_data 220 220 221 221 (stdin, stdout, stderr) = os.popen3( trac_cmd ) … … 239 239 perms_config = ConfigParser.SafeConfigParser() 240 240 perms_config.read(os.path.join(environment.path, 'profiles', infos['profile'], 'permissions.ini')) 241 241 242 242 # Grant permissions as defined in permissions.ini 243 243 for profile in perms_config.options('trac'): … … 253 253 'subject' : admin_login, 254 254 'perms' : 'TRAC_ADMIN'} ) 255 255 256 256 print " Trac initial permissions set (admin rights given to '%s')\n" % admin_login 257 257 258 258 def _trac_revoke_all_perms(environment, infos): 259 259 import trac.env 260 260 261 261 trac_env_path = os.path.join( environment.config.get('general', 'clients_root'), 262 262 infos['client'], 263 263 'var/trac', 264 264 infos['short_name'] ) 265 265 266 266 # Revoke all permissions 267 267 trac_env = trac.env.open_environment(trac_env_path) … … 270 270 db_cursor.execute('DELETE FROM permission') 271 271 trac_db.commit() 272 272 273 273 print " Revoked Trac default permissions\n" 274 274 … … 278 278 client_name = infos['client'] 279 279 project_name = infos['short_name'] 280 280 281 281 permissions = { 282 282 os.path.join(environment.get_path(), 'projects-available', client_name + '-' + project_name) : (0640, 'root', 'root'), … … 299 299 Overrides project's default trac.ini with values provided in configuration profile. 300 300 """ 301 301 302 302 # New defaults 303 303 tracdefaults_config = ConfigParser.SafeConfigParser() 304 304 tracdefaults_config.read(os.path.join(environment.path, 'profiles', infos['profile'], 'trac-defaults.ini')) 305 305 306 306 # Trac base config file 307 307 project_config_path = os.path.join(environment.config.get('general', 'clients_root'), infos['client'], 'var', 'trac', infos['short_name'], 'conf', 'trac.ini') … … 318 318 default_option = tracdefaults_config.get(section, option) 319 319 tracproject_config.set(section, option, default_option) 320 320 321 321 # Add cleverbox section 322 322 # The variables in this section can be used for string substitution across the file … … 326 326 'authbackend_pass' : environment.config.get('general', 'authbackend_pass'), 327 327 'trac_install_dir' : environment.config.get('trac', 'lib_dir'), 328 'domain_name' : environment.config.get('general', 'domain')} 328 'domain_name' : environment.config.get('general', 'domain')} 329 329 tracproject_config.add_section('cleverbox') 330 330 for (option, value) in cleverbox_options.items(): -
cleverbox/trunk/debian/control
r328 r338 2 2 Section: web 3 3 Priority: optional 4 Build-Depends: cdbs (>= 0.4.43), python-all-dev, python-support (>= 0.3), debhelper (>= 4.1.0) 4 Build-Depends: cdbs (>= 0.4.43), python-all-dev, python-support (>= 0.3), debhelper (>= 4.1.0), python-setuptools 5 5 Maintainer: Tristan Rivoallan <tristan@rivoallan.net> 6 Standards-Version: 3.7. 26 Standards-Version: 3.7.3 7 7 8 8 Package: cleverboxfuture 9 9 Architecture: all 10 10 Depends: ${python:Depends}, subversion (>=1.4.2), trac (>=0.10), libapache2-mod-python (>=3.2.10), libapache2-svn (>=1.4.2), python-setuptools (>=0.6c3-3) 11 Suggests: libapache2-mod-macro 11 Suggests: libapache2-mod-macro 12 12 Conflicts: cleverbox, trac-0.10.3 13 Description: Trac and Subversion instances deployment shell 14 The cleverbox provides an interactive command line shell dedicated to the 13 Description: Trac and Subversion instances deployment shell 14 The cleverbox provides an interactive command line shell dedicated to the 15 15 deployment and maintenance of trac and subversion instances. 16 It can handle multiple configuration profiles, enabling the deployment 17 of differently flavored type of projects : 16 It can handle multiple configuration profiles, enabling the deployment 17 of differently flavored type of projects : 18 18 trac configuration and permissions, apache configuration templates, etc. 19 Project's main objective is to make your life as simple as possible. 19 Project's main objective is to make your life as simple as possible. 20 20 Thus, it comes with easy installation, easy upgrades and a comprehensive 21 21 documentation. -
cleverbox/trunk/debian/postinst
r337 r338 26 26 27 27 # Reload apache 28 /etc/init.d/apache2 reload28 invoke-rc.d apache2 reload 29 29 ;; 30 30 -
cleverbox/trunk/docs/CHANGELOG
r330 r338 21 21 * Fixed trac.ini string substitution 22 22 * Enhanced documentation 23 24 === 2008-05-14 | 0.4.4-beta === 25 26 see http://www.clever-age.org/trac/milestone/cleverbox-0.4.4 for details. 27 28 ==== Fixes ==== 29 30 * fixed Cleverbox does not work if trac-admin script is in a non standard location (#48) 31 * fixed trac version dependency in setup.py 32 * debian packaging : binary-install actions should go in postinst file (#46) 33 * debian packaging : added `python-setuptools` to build dependencies 23 34 24 35 === 2008-02-29 | 0.4.3-beta === -
cleverbox/trunk/setup.py
r328 r338 18 18 """Cleverbox : Script for automating multiple trac instances deployment and maintenance. 19 19 20 The Cleverbox sits on top of Trac (http://trac.edgewall.org) and Subversion (http://subversion.tigris.org). 20 The Cleverbox sits on top of Trac (http://trac.edgewall.org) and Subversion (http://subversion.tigris.org). 21 21 It provides an interactive shell for deploying and maintaining instances of both projects. 22 22 """ … … 41 41 42 42 setup( 43 43 44 44 # Project identity 45 45 name='Cleverbox', … … 52 52 classifiers = filter(None, classifiers.split("\n")), 53 53 long_description = "\n".join(doclines[2:]), 54 54 55 55 # Files 56 56 packages=find_packages(), … … 58 58 data_files=[('/usr/share/cleverbox', glob('assets/*')), 59 59 ('/usr/share/doc/cleverbox', glob('docs/*')), 60 ('/usr/share/man/man1', glob('scripts/*.1'))],61 60 ('/usr/share/man/man1', glob('scripts/*.1'))], 61 62 62 # Dependencies 63 install_requires=['setuptools>=0.6b1', 'trac>=0.10.4' ]63 install_requires=['setuptools>=0.6b1', 'trac>=0.10.4', 'trac<=0.10.999'] 64 64 )
