Offline MacPorts

Posted by Ken Brooks Thu, 21 Jun 2007 20:07:00 GMT

I just got an old Mac G4 at work. Its old and slow but I’m so stinking happy I have a Mac at work.

The challenge: Make it productive for development.

My dirty little secret is that ever since installing my first linux distro years ago I have always hated compiling from source and installing it and not really knowing where all the artifacts end up. MacPorts to the rescue. Well… that is until you try to use it from behind a gauntlet of corporate proxies and firewalls.

Installed XCode. Check.
Installed MacPorts. Check
Update MacPorts definitions. (Insert screeching tire sound here).

The synchronizing is done via rsync. I believe that goes out over TCP 873. Yeah, like that is going to work.

The solution to this was to ssh into my webhost and checkout the info via subversion from MacPorts Subversion I then tar’d up that whole directory and threw it into the public area of my site. Over on the work mac create rsync.rsync.darwinports.orgdpupdatedports in /opt/local/var/db/dports/sources. I was able to download the tar, and untar it into the /opt/local/var/db/dports/sources/rsync.rsync.darwinports.orgdpupdatedports directory. That allowed macports to have a list of available ports and their dependencies. What I can’t do or haven’t bothered to figure out is how to update the macports version itself.

One last little thing before we can actually use it. We need to set an environment variable to allow macports to download the sources for our ports via our proxy. Edit your .profile or .bash_profile and add something like this: http_proxy=http://myproxy.foo.bar:8080

Ok. So lets take inventory again.

Installed XCode. Check.
Installed MacPorts. Check
Update MacPorts definitions. Check.

Now feel free to install as normal. Ex: sudo port install ruby

Score one for the good guys.

Tags  | no comments

Comments

(leave url/email »)

   Comment Markup Help Preview comment