Running latest MidCOM from subversion
This document explains how to install and run a development version of MidCOM from the Subversion repository.
Subversion checkout
To do a checkout, run
svn co https://svn.midgard-project.org/midgard/branches/ragnaroek/midcom/
If you have a committer account for Subversion repository, you can also run the checkout with credentials:
svn co https://[username]@svn.midgard-project.org/midgard/branches/ragnaroek/midcom/
You can get a username by registering and asking to be added to the svn committers.
Prerequisites
To do the installation you'll need the PHP5 commandline binary and Phing, a build tool.
PHP5
If you run Debian or Ubuntu the easiest way is to install just the php5-cli package. If installing PHP5 conflicts with your other packages, it is suggested that you either compile PHP5 into a separate directory or just install the XAMPP binaries.
On Mac OS X you can use MacPorts to install PHP by running port install php5 +apache2 +pear. You may specify other variants, if you need other capabilities.
Phing
Use PEAR to install Phing:
pear channel-discover pear.phing.info
pear install phing/phing
Installing
After you have done this, enter the root directory of your checkout (or src with e.g. ragnaroek/midcom).
To run MidCOM from Subversion checkout it is necessary to generate a symbolic link farm that will emulate the filesystem of PEAR installed version.
phing install -Dinstall_dir=/usr/local/lib/midcom
This command will then set up links to the /usr/local/lib/midcom directory so that your installation is ready.
Phing also makes symbolic links to the /usr/share/midgard/schema directory. Make sure that the user you run the phing has write permissions there. If the schema directory is not up to date, some your site's components can turn to nullcomponents. Then you need to make phing install in order to get the schema files up to date.
Note
- Make sure you got write permissions on the directory.
- The umask property is not in use at the moment.
- Phing install does not overwrite files when making symbolic links
- Remember to do apachectl stop + apachectl start after install. Restart is not sufficent
MidCOM setup
To get this working, you must define the MIDCOM_ROOT variable explicitly in the code-init page element of your site. And example looks like this:
<?php
/* this is a generated snippet. Do not edit! */
$GLOBALS['midcom_config_local']['cache_base_directory'] = '/var/cache/midgard/midcom/';
$GLOBALS['midcom_config_local']['log_filename'] = '/var/log/midgard/midcom/www.example.com.log';
$GLOBALS['midcom_config_local']['midcom_root_topic_guid'] = '4174ad9a173611dbbaa7876b0b51ffe0ffe0';
define('MIDCOM_ROOT', '/usr/local/lib/midcom/lib');
require MIDCOM_ROOT . '/midcom.php';
$_MIDCOM->codeinit();
?>
Component and style storage
MidCOM trunk uses topic properties instead of parameters for storing folder component and style information. If you need to convert older topics to the new format, run http://www.example.net/midcom-exec-midcom/convert_legacy_topics.php on your site as admin user.
Other MidCOM versions
It is also possible to run other MidCOM Subversion checkouts for earlier branches, e.g.
svn co https://[username]@svn.midgard-project.org/midgard/branches/loki
svn co https://[username]@svn.midgard-project.org/midgard/branches/thor
After Subversion checkout install the MidCOM symlink farm as specified above:
phing install -Dinstall_dir=/usr/local/lib/midcom
Note that it is not recommended to run several different branches on the same machine, since Midgard related files (e.g. MgdSchema files) might not be compatible with other versions.
