From owner-freebsd-questions@FreeBSD.ORG Mon Aug 28 07:55:43 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 708AB16A4DD for ; Mon, 28 Aug 2006 07:55:43 +0000 (UTC) (envelope-from jonathan@hst.org.za) Received: from sirian.hst.org.za (sirian.hst.org.za [209.203.2.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B1D343D5D for ; Mon, 28 Aug 2006 07:55:23 +0000 (GMT) (envelope-from jonathan@hst.org.za) Received: from localhost (localhost.hst.org.za [127.0.0.1]) by sirian.hst.org.za (Postfix) with ESMTP id 40DB231C254 for ; Mon, 28 Aug 2006 09:53:11 +0200 (SAST) Received: from sirian.hst.org.za ([127.0.0.1]) by localhost (sirian.hst.org.za [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 60615-01 for ; Mon, 28 Aug 2006 09:53:11 +0200 (SAST) Received: by sirian.hst.org.za (Postfix, from userid 1004) id 0D1D331C218; Mon, 28 Aug 2006 09:53:11 +0200 (SAST) Received: from sysadmin.int.dbn.hst.org.za (sysadmin.int.dbn.hst.org.za [10.1.1.20]) by sirian.hst.org.za (Postfix) with ESMTP id 3E73F31C1CA for ; Mon, 28 Aug 2006 09:53:10 +0200 (SAST) From: Jonathan McKeown Organization: Health Systems Trust To: Free BSD Questions list Date: Mon, 28 Aug 2006 09:55:01 +0200 User-Agent: KMail/1.7.2 References: <20060826201512.GA17777@teddy.fas.com> In-Reply-To: <20060826201512.GA17777@teddy.fas.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608280955.01902.jonathan@hst.org.za> X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on sirian.hst.org.za X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=7.0 tests=BAYES_00 autolearn=ham version=2.61 X-Virus-Scanned: by amavisd-new at hst.org.za Subject: Re: Building ports with sorces on a local mirror? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Aug 2006 07:55:43 -0000 On Saturday 26 August 2006 22:15, stan wrote: > I'm in the process of seting up to build a fair number of machines behind a > very restrictive firewall (and besides that the outbound link is very > slow). > > What I have in mind is setting up a machine using mirror software to create > a local mirror of the FreeBSD site, including the distfiles for the ports > tree. > > Is thee a way to get the ports build system to look for distfiles on this > local mirror? I'm doing something similar, but I'm keeping the ports tree on one machine and NFS-mounting /usr/ports from there on all my other hosts. Each host other than the master has WRKDIRPREFIX=/usr/local/ports in /etc/make.conf. Each time I build a port on any of the machines, it downloads the distfile if it doesn't already exist - but because /usr/ports is on the master server, that's where all the distfiles end up (in /usr/ports/distfiles), so I download each source tarball once, the first time it needs to be installed. This saves bandwidth as I'm not trying to mirror all the distfiles whether I need them or not. You can also make packages which will be stored on the master server so you don't even have to compile more than once unless you need to. Word of warning: take steps to avoid downloading prebuilt packages if you don't have a locally-built package. For example, with portupgrade, edit /usr/local/etc/pkgtools.conf and add ENV['PKG_FETCH']='false' which prevents ever fetching a package from the Internet: if there isn't a local package it will build from source in the ports tree. Jonathan