Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jun 2005 09:15:11 -0400
From:      Paul Horechuk <phorechuk@docucom.ca>
To:        =?ISO-8859-1?Q?K=F6vesd=E1n_G=E1bor?= <gabor.kovesdan@t-hosting.hu>
Cc:        Maher Mohamed <mahmoh@gmail.com>, freebsd-stable@freebsd.org
Subject:   Re: auto cvsup
Message-ID:  <42BFFBDF.1000400@docucom.ca>
In-Reply-To: <42BEF3C8.2000902@t-hosting.hu>
References:  <f34868a3050626111745984631@mail.gmail.com> <42BEF3C8.2000902@t-hosting.hu>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------060906010005030203000701
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

There is another alternative to just doing the cvsup...

Kövesdán Gábor wrote:
> Maher Mohamed wrote:
> 
>> how can i upgrade my cvsup weekly with an auto way?
>>
>>  
>>
> You should use crondaemon. Place the following line to the end of 
> /etc/crontab:
> 
> 15      4       *       *       6       root    cvsup /some/path/to/supfile
> 
> The number six represents the sixth day of the week, the 15 is the 
> minute number and the second is the hour, thus this will run on every 
> Friday (if I remember correctly, I'm not sure the numbering starts with 
> Sunday) at 4:15.

This is an essential part, but I decided to take the next step. Not only 
do I get the updated cvsup, but I check for changes...

cvsup -l  (as root)
0 21 * * * /usr/local/bin/getupdates > /var/log/updates.log 2> 
/tmp/updates.err

This runs daily at 9pm with a log of the activity in 
/var/log/updates.log and an error report in /tmp/updates.err

getupdates: (set this as executable chmod 755)

#!/bin/sh
# get the updated sources
cd /usr/src
/usr/local/bin/cvsup -g stable-supfile
# get the updated ports tree
cd /usr/ports
/usr/local/bin/cvsup -g ports-supfile
# get the updated ports index
make fetchindex
# rebuild the list of changes, i.e. ports that have updates available
/usr/sbin/pkg_version -v | grep "<" > updates
exit 0

In the morning I simply go to the ports directory and issue:

more updates

to find out which ports have been affected. I can then use portupgrade 
<portname> as required.
As a bonus, I can also run getupdates at any time to recheck the updates.

> 
> Cheers,
> 
> Gábor Kövesdán
>

--------------060906010005030203000701--



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