Archives

This may save someone's time.

If you get an error like this when running ./bin/buildout:

bash: bin/buildout: /home/mustapha/workspace/collective.buildbot/test/parts/buildslave/customer.pr: bad interpreter: Permission denied

Pay attention: the full path to the used python is truncated here.

that means that the shebang line (the first line in the bin/buildout script starting with #!) is too long. The maximum length of a shebang line is system dependent. On my Ubuntu the maximum length is 80. This table lists the maximum length of the shebang line per OS
Now one can add arguments to the command controlled by supervisor. You have to give all arguments between [] like this: [arg1 arg2 arg3]. This way one can use ctl scripts generated by other recipes and give them the appropriate argument to make them run in foreground. An example:

[buildout]
parts =
instance1
supervisor

[instance1]

...

[supervisor]
recipe = collective.recipe.supervisor
port = 9001
user = mustapha
password = secret
serverurl = http://supervisor.mustap.com

programs =
10 instance1 ${buildout:bin-directory}/instance1 [fg] ${instance1:location}
10 instance1 ${instance1:location}/bin/runzope ${instance1:location}
20 myprog /mypath/bin/myprog [-n 100] /mypath



For more info: http://pypi.python.org/pypi/collective.recipe.supervisor

UPDATE: After a discussion with Chris Mc Donough, I updated this post. For zope instances and zeo instances, please use the runzope and runzeo scripts instead of instance and zeo
The collective.recipe.supervisor is buildout recipe that helps with the install and configuration of supervisor.

How to use it: http://pypi.python.org/pypi/collective.recipe.supervisor

Let's create a project called plone.app.myproject:
$ mkdir plone.app.myproject 
$ cd !$
$ git svn init -s http://server.com/!$
The last command assumes that plone.app.myproject/trunk, plone.app.myproject/branches and plone.app.myproject/tags already exist in the svn repository.
$ git svn fetch
$ git add .
$ git commit -m 'initial import'
$ git svn dcommit
That's it. At this stage the master branch is reflecting the remote trunk.