On Sun, Mar 7, 2010 at 10:26 PM, LuKreme <krem...@kreme.com> wrote:
> On 7-Mar-2010, at 10:08, LuKreme wrote:
> On 7-Mar-2010, at 08:31, Royce Williams wrote:
>>
>>> Semi-OT, but portsnap(8) makes fetching the ports indexes no longer
>>> necessary.
>
>> I'd never heard of it, but am reading the man page now. Sounds great!
>
> Quick question, if I do portsnap cron in the crontab, when do I do portsnap 
> update?

Short answer:

To apply updates automatically, string the commands together
("portsnap cron update").

ro...@heffalump$ sudo portsnap cron update
Removing old files and directories... done.
Extracting new files:
/usr/ports/devel/bugzilla/
/usr/ports/mail/postfix26/
Building new INDEX files... done.
ro...@heffalump$

or hush it with:

ro...@heffalump$ sudo portsnap cron update >/dev/null
ro...@heffalump$


Long details:

This is getting pretty OT, but here is some more info; non-FreeBSD
folk need not apply. :-)

With this family of utilities by Colin Percival (which includes the
OS-patching freebsd-update(8)), if you use only the 'cron' option,
there will only be output when there is a change. This lets you
schedule the check, only get notified when changes are actually
downloaded, and then choose when to act on them.

For portsnap(8), you may or may want to tack on a '> /dev/null' at the
end, since updates to the ports tree are happening all the time.  I do
this, and I just let the weekly reports tell me when I have non-urgent
updates available in my installed ports
(weekly_status_pkg_enable="YES" in [/usr/local]/etc/periodic.conf).  I
let portaudit(1) tell me daily if there are any vulnerabilities.

Some folks want to know about updates to their ports right away, so
they do something like this:

ro...@heffalump$ portsnap cron update > /dev/null && portversion -v -L =
lsof-4.83,5                 <  needs updating (port has 4.84A,5)
mysql-server-5.0.89         <  needs updating (port has 5.0.90)
nmap-5.21                   <  needs updating (port has 5.21_1)
ro...@heffalump$


Other folks, especially those on low-bandwidth or metered connections,
don't want to download actual updates until there are changes to ports
that they care about.  They use the '-I' option to just fetch the
index (which also just fetches deltas, very low-bandwidth), and then
compare the index with their installed ports to check for available
updates:

ro...@heffalump$ portsnap cron -I > /dev/null && portversion -vL =
[same output as above]


Since portsnap deltas are relatively low-bandwidth, I prefer a full
daily sync so that I can casually install a new port and know that I'm
getting a version less than 24 hours old.

Share and Enjoy(TM). :-)

Royce

Reply via email to