Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2012 14:08:52 +0000
From:      Matthew Seaman <matthew@freebsd.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: When Is The Ports Tree Going To Be Updated?
Message-ID:  <50B377F4.1020507@freebsd.org>
In-Reply-To: <CAAdA2WMVmtdsC3zpjz3WsmdopsuavhcVTC8TFuG-n_auPB77rg@mail.gmail.com>
References:  <50B2A57A.3050500@tundraware.com> <50B2A8D8.90301@FreeBSD.org> <50B2AA07.8090103@tundraware.com> <201211251856.40381.lumiwa@gmail.com> <50B2BEE1.9030903@tundraware.com> <50B31AAB.6000903@FreeBSD.org> <50B36500.7040308@tundraware.com> <CAAdA2WMVmtdsC3zpjz3WsmdopsuavhcVTC8TFuG-n_auPB77rg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 26/11/2012 13:49, Odhiambo Washington wrote:
> I am starting to switch, and after all the discussions in this thread, I
> replaced my csup cron entry with the following:
> 
> portsnap fetch && portsnap extract && portsnap update

You definitely don't want to do this.

Most importantly, 'extract' and 'update' aren't compatible. 'extract'
says 'take all the data you downloaded, synthesize a *complete* ports
tree from it, and overwrite /usr/ports with that, never mind what might
have been there before'.  'update' says 'just add the changed bits since
the last time you ran portsnap'

ie. you only need to run 'extract' *once*, then you keep up to date by
running 'update' at intervals.

Secondly, for the sake of the servers, please don't run 'portsnap fetch'
from a cron job.  You're not the only person to think of doing that, and
most people who do have the job run at the top of the hour.  This is
bad.  The servers really don't like it when several thousand cronjobs
all fire off simultaneously and the system load goes through the roof.
Which is why 'portsnap cron' exists -- it does exactly the same as
fetch, except it waits for a random amount of time before pulling down
any data.

Thirdly, you can tell portsnap several commands at once.  So change your
cron invocation to just:

portsnap cron update

and you should be happy.

> Initially I just had `csup -z -L 2 /usr/share/examples/cvsup/9.x-ports`
> where 9.x-ports was an edited version of ports-supfile.
> 
> Now I have an /etc/portsnap.con with the equivalent edits from my 9.x-ports
> 
> Is this how best to do it?

No.  You almost never need to modify the default portsnap.conf at all.
portsnap works best if you use it to maintain a complete ports tree.  It
also automatically uses a geographically close server for best performance.

> 
> And now I need to find an alternative to handle the src updates using svn
> or something...

SVN works, but isn't amazingly quick.  If you're on a release branch you
can get the src (and just the src) using freebsd-update(8), which should
be pretty speedy and which I think is going to be the officially blessed
method for non-developers to keep up to date.  Although anyone will
still be able to use SVN if they want to.

You'll need to tweak /etc/freebsd-update.conf slightly to get just the
system sources.  It's pretty obvious what to do.

	Cheers,

	Matthew




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