Syncing ports to another machine

Joshua Root jmr at macports.org
Sat Jul 23 12:14:32 PDT 2011


On 28164-7-23 05:59 , Arno Hautala wrote:
> Prior to 2.0 (congrats!) I'd been compiling pretty much every port I
> wanted to install on my desktop with Archive Mode enabled. I'd then
> rsync those archives to my laptop and install from there. MacPorts 2.0
> however has changed the way that archives are used. Instead of storing
> the archives under architecture directories in
> /opt/local/var/macports/packages/, they're stored directly under
> /opt/local/var/macports/software/ and nothing new is written to the
> packages directory.
> 
> At first, I considered just changing the directories that I'm syncing,
> but I'm not sure that's a good idea. Or would this indeed be the
> equivalent process?
> 
> I also noted that MacPorts now supports installing pre-compiled
> binaries. Is there a more supported way that I could configure my
> installations to fetch archives from my desktop?

You can set up macports.conf with something like:

archive_site_local	http://mymac.local/path/to/archives

and it will download the archives from there, if present. (It will fall
back to building from source if they're not.) The URL can be any type
supported by curl.

You will need to sign the archives for this to work, and put the public
key in pubkeys.conf. There are some comments in that file that explain
how to make the key pair. You'll probably also want a script similar to
this one, to automate the signing:

<https://trac.macports.org/browser/contrib/buildbot/deploy_archives.sh>

> Also, now that archives are being stored under software is there
> reason to keep around what's under packages? Aside from sentimentals?

You could make them available to your local install with a file:// URL,
if you have archives there for ports you don't have installed.

- Josh


More information about the macports-users mailing list