wiki:WikiStart

Version 51 (modified by gracinet, 9 years ago) (diff)

Mentionned Debian package, more details about ?branch, uniformity and cut mkcpsdevinstance section in two

CPS issue tracker

Welcome to the Collaborative Portal Server issue tracker. To create a ticket, you have to be logged in (anyone can register)

Starting Points

Mailing Lists

  •  CPS-Devel -- Discussion list for developers of CPS and CPS-related software
  •  CPS-Users -- Discussion and community support list for CPS users
  •  CPS-Users-FR -- Discussion and community support list for CPS users (French)

Instructions to prepare a development version of CPS

CPS is a set of Zope 2 products. each one being its own mercurial repository. To assemble these to form the Products directory expected by Zope, we use a dedicated tool: HgBundler.

This tool can actually be used to manage simultaneously any "bundle" of mercurial repositories. It's designed to replace and extend the what can be done with the svn:externals Subversion property.

CPS comes as three standard bundles which are themselves subdirectories of  a single repository:

  • CPS-3-base - the common set of products that almost all real world applications extend. CPSDefault is on top of the dependence hierarchy.
  • CPS-3 - CPS-3-base, together with the most common products outside of CPS-3-base
  • CPS-3-full - the full set of officially maintained components

All instructions and scripts mentioned on this page are meant for Unix-like systems and wouldn't work on Windows systems.

Automated process: mkcpsdevinstance

As of #2206, CPS comes with the mkcpsdevinstance script, that creates a Zope instance, sets up its Products directory as a HgBundler bundle and creates a CPS portal in it.

installation

Prerequisites:

  • all regular CPS dependencies
  • a working hgbundler on your path

Now, grab CPSUtil, extract mkcpsdevinstance and read the options list.

   $ hg clone http://hg.cps-cms.org/CPS/products/CPSUtil
   $ cp CPSUtil/bin/mkcpsdevinstance .
   $ ./mkcpsdevinstance --help

If you are running Debian 5.0 (lenny), a useful alternative is to use our Debian packages  setup instructions. To get a working mkcpsdevinstance in /opt/cps-3.5/bin, with all required dependencies, just do:

   $ sudo aptitude install opt-zope-cps-3.5-devsetup
Usage

From now on, we assume that mkcpsdevinstance is on the system PATH.

To create a CPS-3-full instance in /var/opt:

   $ mkcpsdevinstance --zope-bin=/opt/Zope-2.9/bin /var/opt/cps-3-full-dev 

Note that the script isn't that robust. You must check obvious things, such as write permission to create the target directory beforehand. Actually, /opt/Zope-2.9/bin is the default value, so you can just drop the --zope-bin option if it is correct in your setup, and in particular if you installed through the Debian package.

The bundle URL for CPS-3-full is just the default value, one can get CPS-3-base by changing it:

   $ mkcpsdevinstance -b 'http://hg.cps-cms.org/CPS/bundles?subpath=CPS-3-base' --zope-bin=/opt/Zope-2.9/bin /var/opt/cps-3-base-dev 

One can use bundle branches as well, or custom bundles:

$ mkcpsdevinstance -b 'http://hg.cps-cms.org/CPS/bundles?subpath=CPS-3-full&branch=future-3.5.2' --zope-bin=/opt/Zope-2.9/bin /var/opt/cps-3-future-dev 
$ mkcpsdevinstance -b ssh://me@myproject.example.com/my_bundle --zope-bin=/opt/Zope-2.9/bin /var/opt/myproject-dev

Note that the subpath and branch parameters are specific of this script, they act as modifiers on what is otherwise a regular Mercurial URL.

Also, the branch parameter is simply passed as -r to hg update. Therefore it works also for tags or to pin a revision. For instance, to get a working CPS-3.5.1 (full) rig, just do (assuming the Zope install is in the default place, namely /opt/Zope-2.9):

$ mkcpsdevinstance -b 'http://hg.cps-cms.org/CPS/bundles?branch=3.5.1' /var/opt/cps-3-future-dev 

Manual process, from scratch

Here are the steps to get the CPS-3-full distribution with hgbundler on a Unix-like system.

$ hg clone http://hg.cps-cms.org/CPS/hgutils
$ cd hgutils
$ less hgutils/INSTALL.txt # you should do it, though the steps are below
$ python bootstrap.py
$ bin/buildout
$ bin/test # running the tests can help discovering mercurial version problems, etc.
$ cd ..
$ hg clone http://hg.cps-cms.org/CPS/bundles CPS-bundles
$ cd CPS-bundles/CPS-3-full
$ ../../hgutils/bin/hgbundler make-clones # of course it's better to put this on the path

Now all you have to do is to move CPS-3-full as the Products of a Zope instance, or better, to make a symbolic link.

Wiki Starting Points