Edgewall Software

Changes between Initial Version and Version 1 of TracOnOsxNoFink


Ignore:
Timestamp:
Feb 17, 2005, 5:18:56 PM (19 years ago)
Author:
mario@…
Comment:

How to install Trac and all dependencies on Mac OS X, without using Fink.

Legend:

Unmodified
Added
Removed
Modified
  • TracOnOsxNoFink

    v1 v1  
     1= Installing Trac on Mac OS X, without Fink =
     2
     3I have found that trying to install Trac and all its dependencies, notably subversion and the swig bindings, on OS X 10.3 without using [http://fink.sf.net/ Fink], to be surprisingly difficult and full of gotchas. With some perseverance, and considerable help from kind folks on the trac and subversion users lists, I have succeeded. In the hope that this may help others, I am documenting here what has worked for me.
     4
     5This procedure intentionally specifies that subversion be installed without Berkeley DB, thus svn repositories will be only [http://svn.collab.net/repos/svn/trunk/notes/fsfs FSFS], as per current recommendation.
     6
     7The details here are quite tightly bound to the specific version of each package installed, and therefore are likely to change quickly. Please take this into account, and do not follow them blindly! Also, if you discover any incorrectness, or obsoleteness, please be so kind as to either update this document yourself, or just contact me on ''mario@ruggier.org'' about it.
     8
     9You should allow yourself a good hour of time for this installation procedure... and that is real quick and easy when compared to the few days of frustration I spent figuring out why things were not working, due to incomplete, inconistent, or just contradictory documentation that is currently available!
     10
     11== Requirements ==
     12
     13 * Apache 1.3, the one that bundled with OS X 10.3
     14 * [http://www.python.org/ Python], use the stock python 2.3 that comes with your OS X 10.3 system (in {{{/usr/bin/python}}})
     15 * [http://www.webdav.org/neon/ neon], version >= 0.24.7
     16 * [http://www.swig.org/ swig], version 1.3.21, and '''not''' 1.3.24 !! 
     17 * [http://subversion.tigris.org/ Subversion], >= 1.1.3
     18 * [http://www.sqlite.org/ SQLite], version >= 3.0.8
     19 * [http://pysqlite.org/ PySQLite], version >= 1.1.6
     20 * [http://clearsilver.net/ Clearsilver], version >= 0.9.13
     21 * [http://docutils.sourceforge.net/ docutils], version >= 0.3.7
     22 * [http://projects.edgewall.com/trac/ trac], version >= 0.8
     23 
     24== Preliminaries ==
     25
     26=== no fink ===
     27
     28Preferably you do not have fink in your environment, to avoid that the various configure scripts pick up libraries to link to from under fink. So, make sure that your env path does not include any {{{/sw}}} dirs, and that the file {{{/sw/bin/init.sh}}} is not being executed from anywhere in your {{{.profile}}}.
     29
     30=== clean-up ===
     31
     32'''Note:''' you may prefer to do this clean-up step only if a first installation process fails.
     33
     34Clean out any previosly installed libs and executables prior to doing the installation process. The files to remove (or renamed) are:
     35{{{
     36sudo rm -rf /usr/local/apr
     37sudo rm -f /usr/local/lib/libneon*
     38sudo rm -f /usr/local/lib/libsvn*
     39sudo rm -f /usr/local/lib/pkgconfig/neon.pc
     40sudo rm -f /usr/local/bin/swig
     41sudo rm -f /usr/local/bin/neon-config
     42sudo rm -f /usr/local/bin/svn*
     43sudo rm -rf /usr/local/bin/subversion-1
     44}}}
     45
     46Plus, if you happen to have any previous installations of the swig svn python bindings in your site packages, then remove (or rename) them:
     47{{{
     48sudo rm -rf /Library/Python/2.3/libsvn
     49sudo rm -r /Library/Python/2.3/svn
     50}}}
     51
     52
     53== Installing the Packages ==
     54
     55I will only describe the essentials that are particular to OS X, and to installing without Fink. Please substitute any steps not detailed here with their generic equivalents in TracInstall.
     56
     57=== neon ===
     58
     59In theory you should not need to install this separately, but doing so may avoid some confusing warnings when installing subversion, due to missing entry for darwin in the neon configure script. See this [http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=26484 note on the svn users list] as to why we may want to install neon separately.
     60
     61 * Get source tarball from (http://www.webdav.org/neon/)
     62{{{
     63cd <neon-distribution-top-dir>
     64./configure
     65make
     66sudo make install
     67}}}
     68
     69=== swig ===
     70
     71The latest version of swig (1.3.24) will '''not''' work! You need version 1.3.21, as stated in this [http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=26451 message on the svn users list]:  "subversion 1.1.x currently REQUIRES swig >= 1.3.19 and <= 1.3.21. Swig1.3.24 is _not_ supported."
     72
     73 * Get source tarball from (http://www.swig.org/)
     74 * See the generalized [http://svn.collab.net/repos/svn/trunk/subversion/bindings/swig/INSTALL INSTALL] procedure, from which highlights are extracted below:
     75{{{
     76cd <swig-distribution-top-dir>
     77./configure --with-python=/usr/bin/python
     78make
     79make runtime
     80sudo make install
     81sudo make install-runtime
     82}}}
     83 
     84
     85=== subversion ===
     86
     87 * Get source tarball from (http://subversion.tigris.org/)
     88{{{
     89cd <subversion-distribution-top-dir>
     90./configure --without-berkeley-db --enable-swig-bindings=python PYTHON=/usr/bin/python
     91make
     92sudo make install
     93}}}
     94
     95=== swig svn python bindings ===
     96
     97{{{
     98cd <subversion-distribution-top-dir>
     99make swig-py
     100sudo make install-swig-py
     101echo /usr/local/lib/svn-python > /Library/Python/2.3/svn-python.pth
     102}}}
     103
     104=== sqlite, pysqlite ===
     105
     106 * Get sqlite source tarball from (http://www.sqlite.org/) and pysqlite source tarball from (http://pysqlite.org/)
     107 * Follow their respectives installation instructions.
     108 
     109=== clearsilver ===
     110
     111 * Get source tarball from (http://www.clearsilver.net/)
     112 * Installation procedure slightly different from those given by TracOnOsx
     113{{{
     114cd <clearsilver-distribution-top-dir>
     115./configure --prefix=/usr/local --with-python=/usr/bin/python --disable-ruby
     116make
     117# >>> here modify first line of scripts/document.py to use same python
     118sudo make install
     119}}}
     120
     121=== docutils ===
     122
     123 * Get source tarball from (http://docutils.sourceforge.net/).
     124 * Standard distutils installation.
     125 
     126=== trac ===
     127 
     128 * Standard distutils installation
     129 * Will put executables and shared files in:
     130{{{
     131/System/Library/Frameworks/Python.framework/Versions/2.3/bin/trac*
     132/System/Library/Frameworks/Python.framework/Versions/2.3/share/trac/*
     133}}}
     134
     135For setting up access from Apache, see TracInstall, TracOnOsx, TracMultipleProjects.
     136
     137== Creating a trac environment ==
     138
     139First decide the locations for your subversion repository, e.g. {{{/var/svn/test}}}, and for you trac environment, e.g. {{{/var/trac/test}}}.
     140
     141=== svn repository ===
     142
     143Specifying fs-type is actually not necessary, as we have built without bdb, thus making fsfs the default backend file system.
     144
     145{{{
     146svnadmin create --fs-type=fsfs /var/svn/test
     147}}}
     148
     149To make sure the repository is ok, play with it a little:
     150{{{
     151cd /tmp
     152mkdir proj
     153cd proj
     154mkdir trunk branches tags
     155svn import proj file:///var/svn/test -m "Import First"
     156rm -r proj
     157svn co file:///var/svn/test proj
     158cd proj
     159svn update
     160}}}
     161
     162=== trac environment ===
     163
     164{{{
     165trac-admin /var/trac/test initenv
     166}}}
     167
     168You may need to manage access rights on the trac env directory tree. This may be done by first creating a unix group dedicated to this trac project, e.g. {{{trac}}}, and assigning the various users to this group. The apache {{{web}}} user should be one of these. If you need a nice description of how to do this, look at the [http://developer.apple.com/internet/opensource/cvsoverview.html Apple CVSOverview] (then search for the text ""to create a group").
     169
     170To apply {{{chgrp}}} and {{{chmod}}} recursively, you may do:
     171{{{
     172cd /var/trac/test
     173find . -name "*" -exec chgrp trac {} \; -ls
     174find . -name "*" -exec chmod g+sw {} \; -ls
     175}}}
     176
     177For further trac configuration, see TracGuide.
     178
     179''mario@ruggier.org''
     180
     181----
     182See also:  TracGuide, TracInstall, TracOnOsx, TracInstallPlatforms,