[RFC] suport for fetching from local mirrors
Ion-Mihai Tetcu
itetcu at apropo.ro
Wed Mar 10 09:02:15 PST 2004
Hi,
I wonder if there is any way to convince globally ``make fetch'' to try
use first other site that those in bsd.sites.mk (not with
MASTER_SITE_OVERRIDE, but overriding the master sites individually).
The reason for this (at least for .ro) is:
1. the vast majority of the sites (apache, oo, *linux) have MAN mirrors
2. many of them only partially mirror the master site
3. or have a slightly different directory structure
This sites could be added to bsd.sites.mk, but:
4. because of 2. and 3. above it would be a great idea
5 and the majority of mirrors admins wouldn't like abroad downloaders as
the international bandwidth costs are very big . (10 to 50 compared to
us for example)
The benefits would be:
6. unloading master sites and internet
7. faster download speed for users (and on large distfiles, like OO,
kde, etc. this would make a big difference esp. for "home" users with
low speed internet access).
This can be easily achieved by including a ``bsd.local_sites.mk'' in
bsd.ports.mk above line 2158 where bsd.sites.mk is included.
Something like:
# Local (MAN) master sites
.if exists(${PORTSDIR}/Mk/bsd.local_sites.mk)
.include "${PORTSDIR}/Mk/bsd.local_sites.mk"
.endif
The user will be responsible for creating and populating the file.
Eventually an option for make.conf could be added, like:
LOCAL_FETCH_SITES= cc
where cc would be the country code.
# Local (MAN) master sites
.if defined(LOCAL_FETCH_SITES)
.if exists(${PORTSDIR}/Mk/bsd.sites_${LOCAL_FETCH_SITES}.mk)
.include "${PORTSDIR}/Mk/bsd.sites_${LOCAL_FETCH_SITES}.mk"
.endif
.endif
The _cc files could be maintained by local user groups or something (I
would volunteer for _ro).
What do you think ?
--
IOnut
Unregistered ;) FreeBSD user
More information about the freebsd-ports
mailing list