How to sync your ports tree using Subversion (over HTTP)
- Audience: end users who cannot use RSync (873/tcp) due to firewalls, proxies, policy, etc.
- Requires: MacPorts
- Requires: Subversion
Leopard comes with subversion already installed. If you are using Tiger, or some other system which does not provide a subversion client, you will need to install subversion yourself. If you have a copy of the ports tree already, just run:
sudo port install subversion
If you do not have a copy of the ports tree, you can download the daily tarball by following the tarball howto.
Introduction
Some people live and work behind a firewall or proxy that block or otherwise break rsync, which is the primary means of getting updated portfiles in MacPorts. The following steps will switch your tree over to using subversion (over http) for syncing.
Note: replace "$prefix" with the location of your macports install, which defaults to /opt/local.
Installation
Step 1: Checkout Initial Copy
cd $prefix/var/macports/sources mkdir -p svn.macports.org/trunk/dports cd svn.macports.org/trunk/dports svn co http://svn.macports.org/repository/macports/trunk/dports/ .
Configuration
Step 2: Configure MacPorts
Edit $prefix/etc/macports/sources.conf to comment out the rsync entry and add the "file" entry:
Note: dont forget to replace $prefix
#rsync://rsync.macports.org/release/ports/ file:///$prefix/var/macports/sources/svn.macports.org/trunk/dports/
Optional Parts
Step 3: Test Sync
Run sync in debug mode and watch for "svn update" instead of "rsync" being used:
port -d sync