Managing Multiple Trac Versions
If you use Trac for long enough you will probably need multiple sites. If you use those long enough you will want to upgrade. If you must upgrade, you may have need of multiple versions before, during and after the upgrade process.
Preparation
After using Trac 0.8, we had a hard time upgrading to Trac 0.9. When we installed our new server and moved to Trac 0.10, we were better prepared.
Dependencies
We manage the external dependencies with Portage, Gentoo's Package Manager. We install Trac manually, however. See TracInstall#Requirements for a complete listing.
Local install
We installed Trac in /var/trac-[version]
.
Installing
Download the tarball, uncompress it and install. Repeat for each version. See also handy script.
ungoliant jms # wget http://ftp.edgewall.com/pub/trac/trac-0.10.2.tar.gz ungoliant jms # tar zxf trac-0.10.2.tar.gz ungoliant jms # cd trac-0.10.2 ungoliant trac-0.10.2 # python setup.py install --prefix=/var/trac-0.10.2 running install .... copying wiki-macros/TracGuideToc.py -> /var/trac-0.10.2/share/trac/wiki-macros Thank you for choosing Trac 0.10.2. Enjoy your stay! ungoliant trac-0.10.2 #
In order to use your new Trac installs, you need to override your PYTHONPATH
:
PYTHONPATH="/var/trac-${VERSION}/lib/python2.4/site-packages"
Grab the multitrac script. You can link to it to automatically, parse the version out of the command name and set the PYTHONPATH
:
cd /usr/bin ln -s multitrac tracd-0.10.2 ln -s multitrac trac-admin-0.10.2
Example:
ungoliant bin # trac-admin-0.10.2 --version Trac Admin Console 0.10.2 ================================================================= .....
Installing Plugins
When you are installing additional plugins, you simply need to supply the --prefix
argument to setup.py. To install tags:
trac src # svn co http://trac-hacks.org/svn/tagsplugin/tags/0.4.1 trac 0.4.1 # python ./setup.py --prefix=/var/trac-0.10.4
Supporting Scripts
- multitrac.3 - This allows easy use of the various versions of trac.
- trac-install - This allows easy installation of a new version.
Attachments (4)
-
multitrac
(500 bytes
) - added by 18 years ago.
multiversion link script - for setting PYTHONPATH
-
trac-install
(1.3 KB
) - added by 18 years ago.
trac-install script to grab a version, install it and create the links to multitrac
-
multitrac.2
(501 bytes
) - added by 18 years ago.
multiversion link script - for setting PYTHONPATH (updated with correct example)
-
multitrac.3
(531 bytes
) - added by 18 years ago.
newer version
Download all attachments as: .zip