Recently I wanted to use
Fink on my
Leopard machine at work. This sounds simple but there are a few complicating factors. First, there are no Fink binaries for Leopard as of this writing. Ok, so that's not a big deal, I can compile it easy enough, Fink made an easy to use bootstrap script for that purpose. Secondly, as far as I know, as of this writing, we can't use rsync mode during Fink's self update on Leopard. So, the solution is to use
fink selfupdate-cvs. This leads to the third problem which comes from the fact that my company is strict about blocking ports. Unfortunately the cvs port 2401 is blocked. Fortunately however, SSH (port 22) is not. So my solution is to temporarily port-forward cvs through ssh to my home server so I can run
fink selfupdate-cvs to pull down all the great package descriptions I need for my
fink install.
Here's are my notes on what I did:
# I needed to find where the cvs urls were set so I grepped in /sw
cd /sw
grep -R fink.cvs.sourceforge.net *
# That eventually turned up the following potential places to make changes:
lib/fink/URL/anonymous-cvs:fink.cvs.sourceforge.net:/cvsroot/fink
lib/fink/URL/cvs-repository:fink.cvs.sourceforge.net
lib/fink/URL/developer-cvs:fink.cvs.sourceforge.net:/cvsroot/fink
lib/perl5/Fink/SelfUpdate/CVS.pm: my $cvsrepository = "fink.cvs.sourceforge.net:/cvsroot/fink";
# Since I only needed to get package descriptions I figured /sw/lib/fink/URL/anonymous-cvs
# was the file I wanted change to handle my port-forward solution.
cd /sw/lib/fink/URL/
sudo cp anonymous-cvs anonymous-cvs.orig
nano -wz anonymous-cvs
# Here I changed: fink.cvs.sourceforge.net:/cvsroot/fink to: localhost:/cvsroot/fink
# Then it was a simple matter to create an ssh tunnel to an external server where I have
# the ability to login and its port 2401 is not blocked.
ssh login@domian.example -L 2401:fink.cvs.sourceforge.net:2401
# Finally, I ran the fink update command:
fink selfupdate-cvs
# Hooray. Now everything works as expected and I probaly don't need to use it again unless I need
# to update package descriptions sometime in the future. So, I changed things back:
cd /sw/lib/fink/URL/
sudo mv anonymous-cvs anonymous-cvs.custom
sudo mv anonymous-cvs.orig anonymous-cvs
# Probably I should create a shell alias like: finkselfupdatecvs to handle it all when I
# I find I want to update package descriptions again. But I'm too lazy and besides, that's
# why I've put it in my blog.