You are currently looking at an older section of the wincent.dev website.
Please check the new version of the site at https://wincent.dev/ for updated content.

wincent knowledge base

« Information for beta testers | Main | Mac OS X Tiger: Initial response »

May 16, 2005

Keeping Subversion alive and other notes on the update to Mac OS X 10.4

It's now been a few weeks since I installed Tiger and I wanted to post some notes on the move from 10.3 to 10.4. These contain a lot of material which is specific to my own set-up (hard coded paths, pre-existing folders etc) but they may be of interest to people who have read my previous articles on installing Subversion and some other tools on this site.

I first tried an upgrade install and had to perform several hard resets due to a conflict between USB Overdrive and my APC UPS (I suggest you download the latest version of USB Overdrive; it fixes the problem). Of course, at that point I didn't know the cause of the conflict. I tried again, doing an archive install instead, which meant that I then had to reinstall a lot of software...

Install Xcode 2.0

A simple point-and-click job off the Tiger DVD.

Update wget

As wget 1.10 is just around the corner I decided to install from the latest CVS sources again (see previous article).

# change to my working directory
cd ~/trabajo/wget
mkdir cvs-2005-04-20
cd cvs-2005-04-20
 
# cvs password is "cvs" cvs -d :pserver:cvs@sunsite.dk:/pack/anoncvs login cvs -d :pserver:cvs@sunsite.dk:/pack/anoncvs co wget cd wget make -f Makefile.cvs ./configure --with-ssl make src/wget --version sudo make install

Install pstree

Nothing much has changed since my original article.

# make working directory
mkdir pstree
cd pstree
 
# fetch source, requires wget wget http://www.thp.uni-duisburg.de/pstree/pstree.tar.gz tar xzf pstree.tar.gz
# build, test and install gcc -O -o pstree pstree.c ./pstree sudo mv pstree /usr/local/bin/

Install pwgen

Again, nothing much has changed since last time, so I used the source tree that I originally downloaded:

# use previously downloaded
cd ~/trabajo/pwgen/pwgen-2.03
make clean
./configure
make
./pwgen
sudo make install

Install aee and ee

Nothing much new to report since last time. Once again I decided to use the same source trees:

cd ~/trabajo/aee/aee-2.2.3
make clean
make && ./aee
sudo make install
 
cd ~/trabajo/ee/easyedit/ make clean make && ./ee sudo make install

Install BerkeleyDB

This one turned out to be unnecessary. In the end I ended up converting my Subversion repositories to use the new FSFS (filesystem) back-end.

# use previously downloaded source
cd ~/trabajo/db/db-4.3.27
cd build_unix
make realclean
../dist/configure
make
sudo make install

Install Apache 2

# change to my working directory
cd ~/trabajo/httpd/
 
# there is now a newer version available wget http://apache.org.es/httpd/httpd-2.0.54.tar.gz tar xzvf httpd-2.0.54.tar.gz cd httpd-2.0.54 ./configure --prefix=/usr/local/apache2 \ --enable-dav --enable-so --enable-ssl make sudo make install

Install Subversion

# use last downloaded version
cd ~/trabajo/subversion/subversion-1.1.4
make clean
sh ./autogen.sh
./configure
make
sudo make install

Configure Apache for use with Subversion

I made the following changes to /usr/local/apache2/conf/httpd.conf. Your local setup will no doubt be different, especially the directory paths. This configuration also depends on the svn user and group that I created when I first installed Subversion on this machine (which survived even though I did an archive install because users and groups in the NetInfo database are preserved).

219c219
< Listen 80
---
> Listen 8080
267,268c267,268
< User nobody
< Group #-1
---
> User svn
> Group svn
358,359c358,359
<     Order allow,deny
<     Allow from all
---
>     Order deny,allow
>     Deny from all
1032a1033,1045
> 
> DavLockDB /usr/local/apache2/var/dav/DavLock
> 
> <Location /svnrep>
>     DAV svn
>     SVNParentPath /Users/wincent/Developer/svnrep
>     AuthType Basic
>     AuthName "Subversion repository"
>     AuthUserFile /Users/wincent/Developer/svnrep-auth
>     Require valid-user
>     Order deny,allow
>     Allow from all
> </Location>

I then create necessary directory:

sudo mkdir -p /usr/local/apache2/var/dav
sudo chown svn:svn /usr/local/apache2/var/dav

And set up startup item:

sudo cp -R /System/Library/StartupItems/Apache \
/Library/StartupItems/Apache2

Inside the newly created Apache2 folder I made these changes to the file Apache and renamed it to Apache2:

11,22c11,13
<     if [ "${WEBSERVER:=-NO-}" = "-YES-" ]; then
<         echo "Starting Apache web server"
<         if [ ! -e /etc/httpd/httpd.conf ] ; then
<                 cp -p /etc/httpd/httpd.conf.default /etc/httpd/httpd.conf
<         fi
<         apachectl start
<         if [ "${WEBPERFCACHESERVER:=-NO-}" = "-YES-" ]; then
<             if [ -x /usr/sbin/webperfcachectl ]; then
<                 echo "Starting web performance cache server"
<                 /usr/sbin/webperfcachectl start
<             fi
<         fi
---
>     if [ "${WEBSERVER2:=-NO-}" = "-YES-" ]; then
>         echo "Starting Apache 2 web server"
>         /usr/local/apache2/bin/apachectl start
28,31d18
<     if [ -x /usr/sbin/webperfcachectl ]; then
<         echo "Stopping web performance cache server"
<         /usr/sbin/webperfcachectl stop
<     fi
33c20
<     apachectl stop 
---
>     /usr/local/apache2/bin/apachectl stop 
38c25
<     if [ "${WEBSERVER:=-NO-}" = "-YES-" ]; then
---
>     if [ "${WEBSERVER2:=-NO-}" = "-YES-" ]; then
40,46c27
<         apachectl restart
<         if [ "${WEBPERFCACHESERVER:=-NO-}" = "-YES-" ]; then
<             if [ -x /usr/sbin/webperfcachectl ]; then
<                 echo "Restarting web performance cache server"
<                 /usr/sbin/webperfcachectl restart
<             fi
<         fi
---
>         /usr/local/apache2/bin/apachectl restart

/etc/hostconfig already contained the line WEBSERVER2=-YES- from the previous install. On rebooting the Apache2 webserver will automatically run thanks to the startup item.

Converting the Subversion repositories to the FSFS backend

I then ran into an unfortunate situation. I was getting commit errors due to database version mismatch. It appears the even though my last version of svn was linked against BerkeleyDB 4.3, my previous Apache installed had been linked against 4.2 and so I couldn't touch my repository.

My "solution" was to use 10-day old dump and recreate repositories, this time using FSFS. I suppose that I could have tried recompiling everything all over again with an older version of BerkeleyDB, but I just didn't feel up to it. This underlines the need to always, always keep good backups, and if you're running Subversion make regular repository dumps. I think future upgrades will be a lot more painless now that I've switched to FSFS:

cd ~/Developer/svnrep
sudo mv Synergy Synergy.old
 
sudo svnadmin create Synergy --fs-type fsfs sudo svnadmin load Synergy < ~/svndumps/last/Synergy.dump sudo chown -R svn:svn *
sudo /usr/local/apache2/bin/apachectl start

Tweak the Subversion configuration file

Seeing as have done some Perl work lately I decide to add the following to the autoprops section of my svn configuration file (~/.subversion/config):

*.pm = svn:keywords=Id

I also decided to put an end to the endless commit hassles I've been suffering thanks to Interface Builder creating backup nib files which end with "~.nib". I uncommented:

global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store

And added these to it:

*~.nib *_.nib *.bak

Posted by wincent at May 16, 2005 11:05 AM