With a little side of applesauce...

Monday, January 29, 2007

Zope 2.9 and Debian

I thought I had posted this, but I had a hard time finding information about managing the new zope package for zope2.9. I am pasting it here, because I always forget that there is a zope-common package, and that the only Debian specific documentation seems to be in that package…. :( (I have submitted a bug report to the zope-common package). In the meantime, I would like to place a copy of portions of the file here:

zope-common for Ubuntu/Debian

The document describes how to handle zope installations, managing zope instances and packaging of zope versions and products on Debian systems.

zope versions in Debian

The packaging of zope versions and products allows parallel installations and running of different zope versions.

Hints for a Zope user

Installing a Zope package doesn’t start you a Zope process, it just sits on your disk. To actually do something you have to create a Zope instance and start this instance. You can do this by hand, but the packaging provides you with some support to setup preconfiugred Zope instances like a sandbox instances (play around, test), or preconfigured instances like plone-site or cps-site.

Each Zope version is installed in


Instances are created in


If you want to add them somewhere else, add a symlink in the above directory to the instance home, so the packaging tools can find them.

Zope products and extensions are installed in


These won’t show up in Zope instances by default. Make them visible to the instances by the packaging tools (the dzhandle binary) or use your own tools and scripts.

You don’t have to use the packaging tools. Just create the instances manually and the packaging won’t touch them (If it’s touched anyway, please report a bug).

Handling of Zope Instances

You (or a package) can create a zope instance using
dzhandle -z 2.7 make-instance –addon-mode all?

The script uses the `mkzopeinstance.py’ script to create the instance and creates a file /etc/zope2.7//debian_policy, which has information about how the instance should be handled.

Addon-Mode describes, if all addons should be installed in the Products directory of the instance, or if you want to handle these yourself either copying products to the location by hand or using the dzhandle tool.

Addon-Technique describes how products and extensions, which are installed as .deb packages, are shown to the instance.

  • ‘linked’ makes everything visible to the instance, by using a symlink to the packaged addon. Doesn’t handle different python versions well.
  • ‘tree-linked’ copies the directory tree of the addon and symlinks every file. Works better when you do have different zope versions requiring different python versions (that’s what the zope2.7-sandbox package uses).
  • ‘copied’ copies the product to the instance, but doesn’t update the copy on package upgrades.

Restart-Policy describes how instances are restarted during configuration.

An instance, which should be restarted on system start, has to be mentioned in /etc/default/zope.

Handling of Zope Products

Products are typically packaged as zope-

(where is all lowercase). Installing a product makes the product available on your system, but not in an Zope instance, except the instance is configured to have all products installed by default.

To add the MyProduct? product to the Zope 2.8 instance `myinstance’,

you have to run the following command
  1. dzhandle -z 2.8 add-product myinstance MyProduct?

Product Installation in Instances

A product is automatically installed in an instance, if the Addon-Mode of the instance is set to ‘all’, and the instance doesn’t have the addon exclude in it’s instance policy file (Excluded-Addons).

The installation will fail, if there’s already a product in an instance in Addon-Mode ‘all’ and the product isn’t in the list of excluded addons.

Product Upgrades in Instances

The installation of a packaged product in an instance is upgraded, if the Addon-Technique for the instance is ‘linked’ or ‘tree-linked’. Manually installed products and ‘copied’ products are not updated.

Product Removals in Instances

When a packaged product is removed, it is tried to remove all product installations in instances, if the Addon-Technique of the instance is ‘linked’ or ‘tree-linked’. The removal will fail, if the instance is in Addon-Mode ‘manual’.

Manually installed products and ‘copied’ products are not removed from the instances.

This is taken from:

/usr/share/doc/zope-common/README.Debian.gz written by Matthias Klose.

No comments: