Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Feb 2008 21:28:02 -0800
From:      "Simon L. Nielsen" <simon@FreeBSD.org>
To:        Dan Wright <wright@pair.com>
Cc:        freebsd-hubs@freebsd.org
Subject:   Re: Looking for help setting up mirrors.
Message-ID:  <20080224052800.GA1569@zaphod.nitro.dk>
In-Reply-To: <Pine.BSF.4.58.0802211302240.29577@smx.pair.com>
References:  <Pine.BSF.4.58.0802211302240.29577@smx.pair.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080224052800.GA1569>