mRFC 0028: SVN+PEAR for MidCOM
This mRFC is a part of the MidCOM 2.6 release process. It outlines the changes neccessary to make 2.6 source management and PEAR packaging easy to use.
2006-05-19: Accepted according to the lazy consensus rules.
Reasons to switch to SVN
The main reason for me why I want SVN is the ability for atomic commits on several files. The ability to track several changes belonging together has become increasingly difficult with CVS in the past, especially since the MidCOM codebase has increased so much in size.
Since this means greater changes in any way, it is the best point to restructure the repository according to the requirements of easy PEAR packaging:
New repository structure
The basic idea behind the new structure is separating the source tree into their corresponding PEAR packages.
The source files of each package will be in their own dir named after the package (to make packaging easy) in a central src directory:
/src/midcom.core
/src/midcom.admin.content
...
Note that the main package will be renamed to midcom.core. I recommend this to free the package name "midcom" as a meta-package which collects the core and all packages we deem as "required" to get a basic midcom running (f.x. to include required admin components).
Static files will move to the components static directory, for example /src/midcom.helper.datamanager2/static/.
PEAR packaging
Since SVN now uses one directory per package, the packaging scripts themselves should be easy to simplify.
To ger MidCOM PEAR releases as frequent as possible, especially in the case of Bug Fixes, a few enhancements have to be made to the packaging script:
- Automatic uploads should be possible.
- The Version-Number should be settable (and svn committed) from the command line. Ideally we should have an auto-increment method which increases the current patch-level by one (2.6.0 to 2.6.1 etc.)
- The full pear packaging process should be hidden.
- All temporary files should go to a temporary dir outside SVN (
/tmpperhaps). - The new version number should be tagged in SVN implicitly.
Example session:
cd src/midcom.core
midcom-package 2.6.0
# Package is built to src/midcom.core-2.6.0.tgz
midcom-upload ../midcom.core-2.6.0.tgz
Session with implicit upload:
cd src/midcom.core
midcom-package -u 2.6.0
Session with auto-increment:
cd src/midcom.core
midcom-package -u
Releasenotes
Ideally, the new PEAR Package Tool can generate Package release notes automatically from the CHANGES file in the documentation directory.
It should be not to hard to identify the entries since the last release since an entry is always started by a ISO Timestamp.
Running MidCOM from SVN
Obviously, MidCOM can no longer be run from SVN using this structure. Thus, a simple script which creates a symlinked tree of MidCOM must be written (otherwise development will be hell).
All standard components should be linkable with a single symlink to their root / static directories. Special care must only be taken for midcom.core which has to be linked on a file-level hierarchy to allow adding components like midcom.helper.search etc.
