Commit 3fd68e80 authored by Łukasz Nowak's avatar Łukasz Nowak

- drop subversion dependency

zc.buildout has feature of extending its configuration over the network.
Thanks to using extends-cache it is possible to have online software
with offline instance -- they just need to be properly directed to
existing extends-cache, and whenever run in offline mode they will try
to reuse configuration files provided there and *fail* (which is good)
in case of missing profiles.

buildout-2.12.cfg extends profiles/official-2.12.cfg only to fill this
extends cache.

Readme is updated to follow the way, thanks to which less dependecies
are required.

As buildout shall work with checkout extends-cache is moved up and
reused from here and generated instance template is generated in place.
This template is renamed to instance.inc, as it is file which shall be
included by instance configuration.

Note: There is no need anymore to use svn to play with ERP5 Appliance
buildout, but it is still possible.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41035 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 765c5215
...@@ -19,25 +19,34 @@ Software part is system independent. ...@@ -19,25 +19,34 @@ Software part is system independent.
Requirements to build ERP5 Appliance 2.12 are: Requirements to build ERP5 Appliance 2.12 are:
* C and C++ compiler * C and C++ compiler (gcc and g++)
* standard C and C++ library with development headers * standard C and C++ library with development headers (glibc and libstdc++)
* make * make
* patch * patch
* python (>=2.4) with development headers (to run buildout) * python (>=2.4) with development headers (to run buildout)
* subversion client (XXX: It will be removed some day)
** WARNING ** DO __NOT__ use helpers, they are only for ERP5 Appliance 2.8 flavour. ** WARNING ** ** WARNING ** DO __NOT__ use helpers, they are only for ERP5 Appliance 2.8 flavour. ** WARNING **
Setup Setup
----- -----
Checkout: https://svn.erp5.org/repos/public/erp5/trunk/buildout/ Create directory for buildout and its extends cache:
For example:
svn co https://svn.erp5.org/repos/public/erp5/trunk/buildout/ ~/erp5.buildout $ mkdir ~/erp5.buildout ~/erp5.buildout/extends-cache
Go to this directory:
$ cd ~/erp5.buildout $ cd ~/erp5.buildout
Create buildout.cfg there:
$ cat > buildout.cfg
[buildout]
extends = https://svn.erp5.org/repos/public/erp5/trunk/buildout/buildout-2.12.cfg
extends-cache = extends-cache
^D
Bootstrap buildout Bootstrap buildout
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
...@@ -46,17 +55,17 @@ Download the newest bootstrap.py file from: ...@@ -46,17 +55,17 @@ Download the newest bootstrap.py file from:
And run it: And run it:
$ python -S bootstrap.py -c buildout-2.12.cfg $ python -S bootstrap.py
WARNING: please read "Troubleshooting" section bellow, you may need to WARNING: please read "Troubleshooting" section bellow, you may need to
unset environment variables in your GNU/Linux distribution unset environment variables in your GNU/Linux distribution
$ python -S -c 'import urllib2;print urllib2.urlopen("http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py").read()' | python -S - -c buildout-2.12.cfg $ python -S -c 'import urllib2;print urllib2.urlopen("http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py").read()' | python -S -
Run the Zope 2.12 buildout Run the buildout
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
$ bin/buildout -v -c buildout-2.12.cfg $ bin/buildout -v
This will download and install the software components needed to run ERP5 on This will download and install the software components needed to run ERP5 on
Zope 2.12 including Zope 2.12 plus dependencies (including Zope 2.12 including Zope 2.12 plus dependencies (including
...@@ -65,18 +74,6 @@ Acquisition with _aq_dynamic patch) and CMF 2.2 plus dependencies. ...@@ -65,18 +74,6 @@ Acquisition with _aq_dynamic patch) and CMF 2.2 plus dependencies.
Note on -S: this switch is overridden by PYTHON_PATH environment variable. In Note on -S: this switch is overridden by PYTHON_PATH environment variable. In
doubt, unset it before invoking that command. doubt, unset it before invoking that command.
Minimal requirements
--------------------
At the very least, running buildout requires:
* Python 2.4 or later including development files (e.g. python2.4-devel or
python2.4-dev package from your system package manager. A file like
/usr/lib*/python*/config/Makefile should be installed in the system.
XXX Since we compile our own python, are development files still necessary?)
* C development toolchain (Make, gcc, gpp, etc.)
* subversion (svn) client, to check-out this buildout.
Post-build check Post-build check
---------------- ----------------
...@@ -97,24 +94,23 @@ following sequence of steps should result in a working "instance" buildout: ...@@ -97,24 +94,23 @@ following sequence of steps should result in a working "instance" buildout:
$ mkdir ~/instances # 0 $ mkdir ~/instances # 0
$ cd ~/instances # 1 $ cd ~/instances # 1
$ ln -s ~/erp5.buildout/instance-profiles # 2a
$ ln -s ~/erp5.buildout/profiles # 2b
$ ln -s ~/erp5.buildout/software-profiles # 2c
$ cat > buildout.cfg # 3 $ cat > buildout.cfg # 3
[buildout] [buildout]
extends-cache = instance-profiles/extends-cache # Reuse extends from software
extends-cache = ~/erp5.buildout/extends-cache
# Default run buildout in offline mode. # Default run buildout in offline mode.
offline = true offline = true
extends = extends =
profiles/development-2.12.cfg https://svn.erp5.org/repos/public/erp5/trunk/buildout/profiles/development-2.12.cfg
instance-profiles/software-home.inc ~/erp5.buildout/instance.inc
parts = parts =
mysql-instance mysql-instance
oood-instance oood-instance
supervisor-instance supervisor-instance
^D ^D
$ ~/erp5.buildout/bin/bootstrap2.6 # 4 $ ~/erp5.buildout/bin/bootstrap2.6 # 4
$ bin/buildout -v # 5 $ bin/buildout -v # 5
...@@ -198,9 +194,6 @@ $ # other buildout related commands ...@@ -198,9 +194,6 @@ $ # other buildout related commands
TODO TODO
==== ====
* Adjust the 'runUnitTest' recipe to push the mysql server coordinates into
the 'bin/runUnitTest' script.
* Refactor the .cfg files to reduce duplication and so that only the * Refactor the .cfg files to reduce duplication and so that only the
'instance-profiles' directory needs to be symlinked. Alternatively, push all 'instance-profiles' directory needs to be symlinked. Alternatively, push all
.cfg files into a single 'profiles' .cfg files into a single 'profiles'
......
[buildout] [buildout]
extends-cache = instance-profiles/extends-cache # Note: profiles/development-2.12.cfg is added only to fill extends cache
extends = profiles/official-2.12.cfg # for instances
extends =
profiles/development-2.12.cfg
profiles/official-2.12.cfg
...@@ -34,4 +34,4 @@ input = inline: ...@@ -34,4 +34,4 @@ input = inline:
[software_definition] [software_definition]
software_home = ${software_definition:software_home} software_home = ${software_definition:software_home}
mysql_software = ${software_definition:mysql_software} mysql_software = ${software_definition:mysql_software}
output = ${buildout:directory}/instance-profiles/software-home.inc output = ${buildout:directory}/instance.inc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment