Distfiles mirror behind proxy

Joshua Root jmr at macports.org
Tue Dec 9 18:27:42 PST 2008


Max Asato wrote:
> On Wed, Dec 10, 2008 at 12:14:35PM +1100, Joshua Root wrote:
>> Max Asato wrote:
>>> We would ideally like to mirror the primary distfile server internally
>>> as well, but it sounds like that the new distserver.macports.org site
>>> is tied to the 1.7 release.  I've futzed around with the mirror_sites.tcl
>>> file a bit so it looks like it would be possible to direct our users
>>> to an internal mirror first before trying to navigate through the
>>> proxies.  Are there any reasons not to do this?  It looks like the
>>> MASTER_SITE_LOCAL environment variable mechanism doesn't support
>>> subdirectories under 1.6, does 1.7 work differently?
>> You could edit the macports mirror group in
>> /opt/local/share/macports/resources/port1.0/fetch/mirror_sites.tcl to
>> contain "http://your.mirror.host/:mirror".
> 
> Is there a simple way to get MacPorts to try our internal mirror first?  
> This seems to set a default that is tried after everything else fails.
> We could also add our mirror to the top of each group but won't these
> changes get undone at the next "port sync" or "port selfupdate"?

Only the macports mirror group is always tried. The rest are only used
if the port specifies them in master_sites. MASTER_SITE_LOCAL will be
tried first, but it doesn't seem to support the :mirror tag (which looks
for the files on the server in dist_subdir).

This would be far easier with 1.7, where you could add your mirror to
the macports_distfiles mirror group, and it would be tried first because
it would presumably always have the lowest ping time.

- Josh


More information about the macports-users mailing list