RANDOMIZE_MASTER_SITES

Alejandro Pulver alepulver at FreeBSD.org
Mon May 29 13:34:04 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 29 May 2006 21:15:47 +0200
Benjamin Lutz <benlutz at datacomm.ch> wrote:

> Hello,
> 
> Still busy with updating Enemy Territory :) I decided to make use of the 
> MASTER_SITE_IDSOFTWARE variable exclusively now, since I'm getting fed up 
> with mirrors dying all the time. Now, due to the two files that are needed 
> being in two different directories, I figured I'd list the variable twice:
> 
> MASTER_SITES= ${MASTER_SITE_IDSOFTWARE:S|$|et/linux/|} \
>   ${MASTER_SITE_IDSOFTWARE:S|$|et/}
> 
> This works, but there's two issues with it:
>  - When downloading the file in the second dir, it checks all servers
>    with the first dir first. This means at least 12 attempts are needed
>    in total.

You can add a suffix like normal sites:

MASTER_SITES=	${MASTER_SITE_IDSOFTWARE:S|$|et/linux/:site1|} \
		${MASTER_SITE_IDSOFTWARE:S|$|et/:site2|}

DISTFILES=	distfile1:site1 \
		distfile2:site2

For more information see:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-distfiles.html#PORTING-MASTER-SITES-N

>  - I'm not happy with the order of the servers listed in
>    MASTER_SITE_IDSOFTWARE. The first link is to a russian site, which is
>    quite slow (plus the link is dead anyway, I assume the .3 is wrong).
>    Fast servers being named first would make more sense to me.
> 

The .3 is right, but it is not needed.

If show me a better order (like faster sites first) I will change it.

> Looking for a solution I found RANDOMIZE_MASTER_SITES. This will solve both 
> problems often: the chance that more than 4 attempts are needed to download 
> both files is only 25%, assuming all sites work. The chance that the russian 
> site is hit in the first 4 attempts is 40%. It seems to me that this var is 
> not intended to be used inside port makefiles, it's probably meant 
> for /etc/make.conf. I feel that using it for my port would be a win.
> 
> So what are the authoritative comments on this?
> 

I think this problem will be solved with the previous example.

> Btw, speaking of MASTER_SITE_IDSOFTWARE, http://www.idstuff.org/ lists some 
> more that could be added to the list. Should I file a PR for them, or is 
> there a special procedure for updating master sites?
> 

I have added them.

Best Regards,
Ale
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQFEe1q6iV05EpRcP2ERAlvRAJ98VtutdfmO6KpT7grKFR8ExFrKKwCghdxq
6Na1IGw+HRBz8yL7tjlB5Qc=
=B33d
-----END PGP SIGNATURE-----


More information about the freebsd-ports mailing list