From owner-cvs-all@FreeBSD.ORG Wed May 3 21:29:01 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B55B216A400; Wed, 3 May 2006 21:29:01 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8694343D45; Wed, 3 May 2006 21:29:01 +0000 (GMT) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k43LT1L9062339; Wed, 3 May 2006 21:29:01 GMT (envelope-from cperciva@repoman.freebsd.org) Received: (from cperciva@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k43LT11c062338; Wed, 3 May 2006 21:29:01 GMT (envelope-from cperciva) Message-Id: <200605032129.k43LT11c062338@repoman.freebsd.org> From: Colin Percival Date: Wed, 3 May 2006 21:29:01 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/usr.sbin/portsnap/portsnap portsnap.sh X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 May 2006 21:29:01 -0000 cperciva 2006-05-03 21:29:01 UTC FreeBSD src repository Modified files: usr.sbin/portsnap/portsnap portsnap.sh Log: The approach portsnap uses of "pick a random HTTP mirror" doesn't interact very nicely with HTTP proxies: Since proxies do not know that all the files on portsnap1.freebsd.org are identical to the files with the same names on portsnap2.freebsd.org, said proxies end up downloading and storing files in duplicate. This commit uses the HTTP_PROXY environment variable, if set, to generate a random number seed for use in selecting a mirror. This means that if several systems all have the same HTTP_PROXY value set, they will ask the proxy to fetch files from the same mirror (unless that mirror fails, in which case all the systems will use the same second choice, et cetera). Portsnap still doesn't interact very well with "transparent" HTTP proxies, but there's nothing I can do about those. Requested by: simon Sponsored by: FreeBSD security development fundraiser Revision Changes Path 1.19 +16 -3 src/usr.sbin/portsnap/portsnap/portsnap.sh