<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
  <channel>
    <title>Must@p Zone</title>
    <link>http://www.mustap.com/</link>
    <description>echo >> /dev/null</description>
    <language>en-us</language>           
    <generator>Nucleus CMS v3.22</generator>
    <copyright>©</copyright>             
    <category>Weblog</category>
    <docs>http://backend.userland.com/rss</docs>
    <image>
      <url>http://www.mustap.com/nucleus/mustapfeed.png</url>
      <title>Must@p Zone</title>
      <link>http://www.mustap.com/</link>
    </image>
    <item>
 <title>memmon and collective.recipe.supervisor</title>
 <link>http://www.mustap.com/pythonzone_post_248_memmon-and-collectiverecipes</link>
<description><![CDATA[I just saw a tweet advising to pin supervisor egg to 3.0a4 for those who use <a href="http://pypi.python.org/pypi/collective.recipe.supervisor">collective.recipe.supervisor</a> with memmon (Memmon is moved from supervisor 3.0a7 and added to the superlance plugin).  Don't do that. The 3.0a7 introduced new commands (reread, update and avail) and many improvements and fixes that will make your life easier.<br />
<br />
You don't need to pin supervisor to 3.0a4. The <a href="http://pypi.python.org/pypi/collective.recipe.supervisor">collective.recipe.supervisor</a> has already a plugins option. The ONLY change you have to make to your current buildout configuration file is to add superlance to the plugins option: <pre><br />
[buildout]<br />
<br />
...<br />
<br />
[spvisor]<br />
recipe = collective.recipe.supervisor<br />
<br />
...<br />
<br />
<font color="red">plugins = superlance</font><br />
<br />
...<br />
</pre>and then run:<pre><br />
$ ./bin/buildout -v install spvisor<br />
</pre>That's all.<br />
]]></description>
 <category>buildout</category>
<comments>http://www.mustap.com/pythonzone_post_248_memmon-and-collectiverecipes</comments>
 <pubDate>Sat, 6 Jun 2009 17:00:49 +0000</pubDate>
</item><item>
 <title>Pinning buildout&apos;s picked eggs</title>
 <link>http://www.mustap.com/pythonzone_post_247_pinning-buildouts-picked-egg</link>
<description><![CDATA[When using a zc.buildout based deployment system you want to be able to reproduce the same setup with the same set of egg versions one month later. Without pinning all eggs picked by zc.buildout the task is impossible.<br />
<br />
<a href="http://pypi.python.org/pypi/buildout.dumppickedversions">buildout.dumppickedversions</a> is a buildout extension that does just that. It can print or generate a versions.cfg file with all eggs picked by zc.buildout.<br />
<br />
The 0.2 release is the result of some feedback I got especially from <a href="http://www.martinaspeli.net">Martin</a>.<br />
<br />
On how to use it see: <a href="http://pypi.python.org/pypi/buildout.dumppickedversions">http://pypi.python.org/pypi/buildout.dumppickedversions</a><br />
<br />
Try it and give some feedback.]]></description>
 <category>Plone</category>
<comments>http://www.mustap.com/pythonzone_post_247_pinning-buildouts-picked-egg</comments>
 <pubDate>Sun, 15 Mar 2009 11:32:46 +0000</pubDate>
</item><item>
 <title>Login as another user without a password</title>
 <link>http://www.mustap.com/pythonzone_post_246_login-as-another-user-withou</link>
<description><![CDATA[Recently we developed an Intranet site with many custom workflows and roles that control what an user can see/do globally on the site and locally on some sections.<br />
<br />
Users are stored in an AD server.<br />
<br />
A problem we ran into was sometime we get a question like: I cannot do this or that thing. what's wrong? <br />
<br />
The easiest way to answer this question is to login with the user's login name and password and see what is happening. Well, not really. We don't need the password. The login name is sufficient.<br />
<br />
In the ZMI create a python script with this line:<br />
<pre><br />
context.acl_users.session.setupSession(<br />
                  the_user_login_name_i_want_to_login_as,<br />
                  context.REQUEST.RESPONSE)<br />
</pre><br />
Click the test tab and you are in as that user.<br />
<br />
IMPORTANT SECURITY NOTE: Remove the script as soon as you are logged in.]]></description>
 <category>Plone</category>
<comments>http://www.mustap.com/pythonzone_post_246_login-as-another-user-withou</comments>
 <pubDate>Tue, 13 Jan 2009 08:56:55 +0000</pubDate>
</item><item>
 <title>Agile Project Management: Lessons Learned at Google</title>
 <link>http://www.mustap.com/pythonzone_post_245_agile-project-management-les</link>
<description><![CDATA[Jeff Sutherland the Co-Creator of the Scrum Agile Development Process is talking about Google's first Scrum implementation. If you have some free time (1h 8min) this video is good to watch: <a href="http://www.infoq.com/presentations/Agile-Management-Google-Jeff-Sutherland">http://www.infoq.com/presentations/Agile-Management-Google-Jeff-Sutherland</a>]]></description>
 <category>Project management</category>
<comments>http://www.mustap.com/pythonzone_post_245_agile-project-management-les</comments>
 <pubDate>Sun, 20 Jul 2008 13:41:43 +0000</pubDate>
</item><item>
 <title>Adjusting options in buildout</title>
 <link>http://www.mustap.com/pythonzone_post_244_adjusting-options-in-buildou</link>
<description><![CDATA[The configuration syntax in the <a href="http://pypi.python.org/pypi/zc.buildout">new version of zc.buildout</a> is extended with two operators += and -= to allow adjusting options in an extended profile. This is very helpful. You don't need anymore to overwrite an option in the base configuration when all you want is to remove/add an entry.<br />
<br />
here is an example:<br />
<pre><br />
# base.cfg file<br />
[buildout]<br />
<br />
parts =<br />
    part1<br />
    part2<br />
<br />
eggs =<br />
    eggs1<br />
    eggs2<br />
    eggs3<br />
</pre><br />
To add new part and remove egg2 in an extended configuration, we do:<br />
<pre><br />
# newconfig.cfg file<br />
<br />
[buildout]<br />
extends = base.cfg<br />
<br />
parts <font color="red">+=</font><br />
    part3<br />
<br />
eggs <font color="red">-=</font><br />
    eggs2<br />
</pre><br />
Running buildout, the result will be as if you have run it with this configuration file:<br />
<pre><br />
[buildout]<br />
parts =<br />
    part1<br />
    part2<br />
    part3<br />
<br />
eggs =<br />
    egg1<br />
    eggs3<br />
</pre><br />
<br />
That's it. <br />
If you want to add new egg to all your profiles all you have to do is to add it to the base.cfg.]]></description>
 <category>buildout</category>
<comments>http://www.mustap.com/pythonzone_post_244_adjusting-options-in-buildou</comments>
 <pubDate>Tue, 10 Jun 2008 19:15:47 +0000</pubDate>
</item><item>
 <title>Shebang max. length</title>
 <link>http://www.mustap.com/pythonzone_post_243_shebang-max-length</link>
<description><![CDATA[This may save someone's time.<br />
<br />
If you get an error like this when running ./bin/buildout:<br />
<br />
<font color="red">bash: bin/buildout: /home/mustapha/workspace/collective.buildbot/test/parts/buildslave/customer.pr: bad interpreter: Permission denied</font><br />
<br />
Pay attention: the full path to the used python is truncated here.<br />
<br />
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 <a href="http://www.in-ulm.de/~mascheck/various/shebang/#results">lists the maximum length of the shebang line per OS</a><br />
]]></description>
 <category>buildout</category>
<comments>http://www.mustap.com/pythonzone_post_243_shebang-max-length</comments>
 <pubDate>Sun, 25 May 2008 15:11:26 +0000</pubDate>
</item><item>
 <title>collective.recipe.supervisor: now accepts arguments</title>
 <link>http://www.mustap.com/pythonzone_post_242_collectiverecipesupervisor-n</link>
<description><![CDATA[Now one can add arguments to the command controlled by supervisor. You have to give all arguments between [] like this: [arg1 arg2 arg3]. <s>This way one can use ctl scripts generated by other recipes and give them the appropriate argument to make them run in foreground</s>. An example:<br />
<pre><br />
[buildout]<br />
parts = <br />
   instance1 <br />
   supervisor<br />
<br />
[instance1]<br />
<br />
...<br />
<br />
[supervisor]<br />
recipe = collective.recipe.supervisor<br />
port = 9001<br />
user = mustapha<br />
password = secret<br />
serverurl = http://supervisor.mustap.com<br />
<br />
programs =<br />
 <s>10 instance1 ${buildout:bin-directory}/instance1 [fg] ${instance1:location}</s><br />
 10 instance1 ${instance1:location}/bin/runzope ${instance1:location}<br />
 20 myprog /mypath/bin/myprog [-n 100] /mypath<br />
<br />
</pre><br />
<br />
For more info: <a href="http://pypi.python.org/pypi/collective.recipe.supervisor">http://pypi.python.org/pypi/collective.recipe.supervisor</a><br />
<br />
<font color="red">UPDATE:</font> After a discussion with Chris Mc Donough, I updated this post. For zope instances and zeo instances, please use the <I>runzope</I> and <I>runzeo</I> scripts instead of <I>instance</I> and <I>zeo</I> ]]></description>
 <category>buildout</category>
<comments>http://www.mustap.com/pythonzone_post_242_collectiverecipesupervisor-n</comments>
 <pubDate>Fri, 23 May 2008 15:44:45 +0000</pubDate>
</item><item>
 <title>A buildout recipe to install supervisor</title>
 <link>http://www.mustap.com/pythonzone_post_241_a-buildout-recipe-to-install</link>
<description><![CDATA[The collective.recipe.supervisor is buildout recipe that helps with the install and configuration of <a href="http://supervisord.org">supervisor</a>.  <br />
<br />
How to use it: <a href="http://pypi.python.org/pypi/collective.recipe.supervisor">http://pypi.python.org/pypi/collective.recipe.supervisor</a><br />
<br />
]]></description>
 <category>buildout</category>
<comments>http://www.mustap.com/pythonzone_post_241_a-buildout-recipe-to-install</comments>
 <pubDate>Thu, 22 May 2008 08:43:33 +0000</pubDate>
</item><item>
 <title>self.note = svn import with git</title>
 <link>http://www.mustap.com/pythonzone_post_240_selfnote--svn-import-with-gi</link>
<description><![CDATA[Let's create a project called plone.app.myproject:<br />
<pre>$ mkdir plone.app.myproject <br />
$ cd !$<br />
$ git svn init -s http://server.com/!$ <br />
</pre>The last command assumes that plone.app.myproject/trunk, plone.app.myproject/branches and plone.app.myproject/tags already exist in the svn repository.<br />
<pre>$ git svn fetch<br />
$ git add .<br />
$ git commit -m 'initial import'<br />
$ git svn dcommit<br />
</pre>That's it. At this stage the master branch is reflecting the remote trunk.<br />
]]></description>
 <category>General</category>
<comments>http://www.mustap.com/pythonzone_post_240_selfnote--svn-import-with-gi</comments>
 <pubDate>Wed, 7 May 2008 21:00:09 +0000</pubDate>
</item><item>
 <title>Autoload eggs from buildout&apos;s development directories</title>
 <link>http://www.mustap.com/pythonzone_post_239_autoload-eggs-from-buildouts</link>
<description><![CDATA[When developing zope/plone eggs with buildout I have to edit the buildout configuration file ( in 3 places ) every time I create/delete/rename a development egg in the <i>src</i> directory or in other development directories (sometime I have more than one).<br />
<p><br />
I have to add/delete/rename the egg in the <i>eggs</i> option of the <i>[buildout]</i> and then add/delete/rename the egg path in the <i>develop</i> option of the <i>[buildout]</i> and in the end add/delete/rename the <i>zcml</i> option of the zope <i>[instance]</i> or in the <i>configure.zcml</i> file of my policy package. This is too much specially when the speed is set to development mode. I need a less boring way to develop.<br />
</p><br />
<h3>Solution</h3><br />
<i>buildout.eggtractor</i> is a buildout extension that scans the <i>src</i> directory or a list of directories I give for eggs and picks them up automatically. So no more editing of the buildout's configuration file.<br />
<p><br />
When <i>buildout.eggtractor</i> finds an egg in the scanned directory it:<br />
<ul><br />
  <li> adds the egg to the <i>eggs</i> option of all zope instance parts or to a set of given parts </li><br />
  <li>adds the egg's path in the <i>develop</i> option of the <i>[buildout]</i></li><br />
  <li>If <i>tractor-autoload-zcml</i> is not set to false, scans the egg folder for <i>configure.zcml</i>, <i>meta.zcml</i> and <i>overrides.zcml</i> and adds the appropriate zcml entries to the <i>zcml</i> option of the zope instance parts or to a set of given parts.</li><br />
</ul><br />
This steps are done on the fly when running buildout. So I can add/delete/rename an egg and it will be picked up.<br />
<p><br />
NOTE: The extension does not write to the buildout's configuration file.<br />
</p><br />
<h3>buildout.eggtractor options</h3><br />
<b>tractor-src-directory:</b> A set of directories to scan for development eggs. Defaults to the <i>src</i> directory of the buildout.<br><br />
<b>tractor-target-parts:</b> A set of parts to update their <i>eggs</i> option with eggs found in the <i>tractor-src-directory</i>. Defaults to zope instance parts if any.<br><br />
<b>tractor-autoload-zcml(boolean):</b> Update the <i>zcml</i> option of <i>tractor-target-parts</i> with the eggs found in <i>tractor-src-directory</i>. Defaults to true<br><br />
<b>tractor-zcml-top:</b> A set of eggs to load their zcml files first. Defaults to an empty set.<br />
<br />
<h3>How to use it</h3><br />
Using <i>buildout.eggtractor</i> is very simple. As said, it is a buildout extension. All I have to do is to declare it in the <i>extensions</i> option:<br />
<pre><br />
  [buildout]<br />
  parts =<br />
  <br />
  extensions = buildout.eggtractor<br />
</pre><br />
That's all. <i>buildout.eggtractor</i> will scan the <i>src</i> directory and do its job every time I run the buildout command.<br />
<br><br />
When I have other directories I want to scan I just add an <i>tractor-src-directory</i> option in the <i>[buildout]</i> and add my directories there:<br />
<pre><br />
  [buildout]<br />
  parts =<br />
  <br />
  extensions = buildout.eggtractor<br />
  <br />
  tractor-src-directory = <br />
                        dev-src1 <br />
                        dev-src2<br />
                        src<br />
</pre><br />
In a few cases when the priority of loading zcml files matters. I add the egg to be loaded first in the <i>tractor-zcml-top</i> option in the <i>[buildout]</i>:<br />
<pre><br />
  [buildout]<br />
  parts =<br />
  <br />
  extensions = buildout.eggtractor<br />
  <br />
  tractor-src-directory = <br />
            dev-src1 <br />
            dev-src2<br />
            src<br />
            <br />
  tractor-zcml-top = <br />
            plone.app.mypackage1<br />
<br />
</pre><br />
If I want to add the eggs found in the development directories to the eggs option of a given set of parts, I add a <i>tractor-target-parts</i> option and add the parts there:<br />
<pre><br />
  [buildout]<br />
  parts = instance1 instance2 instance3<br />
  <br />
  extensions = buildout.eggtractor<br />
  <br />
  tractor-target-parts = instance1 instance3<br />
</pre><br />
This way only instance1 and instance3 will be updated.<br />
<p><br />
If I have already other way to include the zcml files (ie: z3c.autoinclude) and don't want <i>eggtractor</i> to generate the zcml slugs, I add an <i>tractor-autoload-zcml</i> option and set it to <i>false</i><br />
</p><br />
In most cases you will only need to add <i>buildout.eggtractor</i> to the <i>extensions</i> option of the <i>[buildout]</i> without any extra configuration options.<br />
<br />
<h3>LIMITATION</h3><br />
The extension assumes that the egg name reflects its file system structure example: if the egg name is com.mustap.www the extension assumes that the file system structure is one of the following::<br />
<ul><br />
  <li>com.mustap.www/src/com/mustap/www</li><br />
  <li>com.mustap.www/com/mustap/www</li><br />
</ul><br />
This is where the extension looks for configure.zcml, meta.zcml and overrides.zcml files.<br />
<p><br />
If the egg name does not reflect the file system structure, the extension will ignore it.<br><br />
XXX: I guess walking through the directory is better than this assumption. <br>In my case this is not a limitation as I choose my egg names that way.<br />
</p><h3>URL</h3>You can get it from <a href="http://pypi.python.org/pypi/buildout.eggtractor">http://pypi.python.org/pypi/buildout.eggtractor</a><br />
<br />
<h3>THANKS</h3> Martin, Wichert and Hanno for the help and feedbacks]]></description>
 <category>buildout</category>
<comments>http://www.mustap.com/pythonzone_post_239_autoload-eggs-from-buildouts</comments>
 <pubDate>Wed, 30 Apr 2008 19:32:47 +0000</pubDate>
</item>
  </channel>
</rss>
