From owner-freebsd-hubs@FreeBSD.ORG Sun Feb 24 05:43:22 2008 Return-Path: Delivered-To: freebsd-hubs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0627516A502 for ; Sun, 24 Feb 2008 05:43:22 +0000 (UTC) (envelope-from simon@zaphod.nitro.dk) Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.freebsd.org (Postfix) with ESMTP id D0A9F13C458 for ; Sun, 24 Feb 2008 05:43:21 +0000 (UTC) (envelope-from simon@zaphod.nitro.dk) Received: from zaphod.nitro.dk (unknown [192.168.3.39]) by mx.nitro.dk (Postfix) with ESMTP id 572711E8C00; Sun, 24 Feb 2008 05:27:52 +0000 (UTC) Received: by zaphod.nitro.dk (Postfix, from userid 3000) id AD73611493; Sat, 23 Feb 2008 21:28:02 -0800 (PST) Date: Sat, 23 Feb 2008 21:28:02 -0800 From: "Simon L. Nielsen" To: Dan Wright Message-ID: <20080224052800.GA1569@zaphod.nitro.dk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-hubs@freebsd.org Subject: Re: Looking for help setting up mirrors. X-BeenThere: freebsd-hubs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "FreeBSD Distributions Hubs: mail sup ftp" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2008 05:43:22 -0000 On 2008.02.21 13:19:31 -0500, Dan Wright wrote: > My first issue is setting up the web site mirror. I've written a little > Perl script that I thought would do the right thing for me. Here's the > relevant bit: > > my $web_vars = "DESTDIR=/u0/mirrors/FreeBSD/web-mirror WEBOWN=freebsd CGIOWN=freebsd"; > > system("/usr/local/bin/cvsup -g -z -L 1 /u0/mirrors/FreeBSD/www-supfile"); > chdir('/u0/mirrors/FreeBSD/www'); > system("/usr/bin/make $web_vars"); > > Here's the contents of my supfile: > > *default host=cvsup16.us.freebsd.org > *default base=/u0/mirrors/FreeBSD > *default prefix=/u0/mirrors/FreeBSD > *default release=cvs tag=. > *default delete use-rel-suffix > www > doc-all > > So, what I was expecting to happen is that when all of this done, I'd > have a mirror of the site set up, and I could point the document root > in apache to /u0/mirrors/FreeBSD/web-mirror, and I'd be good to go. Hey, $web_vars seems to be missing actual targets IE, "all install" or something like that. You can see the script used for the build on www.freebsd.org at: http://www.freebsd.org/cgi/cvsweb.cgi/www/tools/webupdate But now that I see that one I actually think that is an old version and only works with 4.x make... DESTDIR must be set via env and not command line like done above... (There is an outer wrapper which sets env variables which is not in CVS though as it's rather site specific.) That said, I think it would generally be simpler and more reliable to just mirror the "www" distribution via cvsup which is the built web site (note if you modify the supfile above that you need to set 'release=current' to actually get the built files). I have been thinking of changing the hubs article to just suggest that but I haven't ever gotten around to it. The real simple way to get this is to use the cvsup-mirror port. For most cases you don't really get anything extra by building yourself. > Unfortunately, if you take a look at http://freebsd.mirrors.pair.com/ > right now, you can see that it isn't working. In fact, as everything > is building, that index page keeps changing. It makes me think that > DESTDIR doesn't do what I think it does. Can anybody provide any > guidance on what my next step is? DESTDIR is a tad magic on the www/doc build... but it should work. > By the way, when all of this is done and working, I'd be glad to write > up a mini-howto so the next person doesn't need to go through all this > pain. That is assuming one doesn't already exist that I missed somewhere. Personally I have a couple of incarnations of the build magic on different FreeBSD.org systems, and it's a bit of a mess - but currently it's running... at some point I hope to merge it all together to get one more clean and flexible script... any year now ;-). Hopes this helps a bit with some pointers. If you are interested in seeing the actual build scripts let me know and I can dig them up. -- Simon L. Nielsen