crontab automatic updating ports ?? how to?

crontab automatic updating ports ?? how to?

Post by free.. » Fri, 14 Jan 2000 04:00:00



Hi,
I remember read somewhere here indicating a crontab script which updates
selected or installed ports packages AUTOMATICALLY.  The scenario is
whenever there is a new file uploaded to
ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-3-stable/All, my
FreeBSD will grab it back and install in the background.  The idea is to
compare to the dates of each port.  Can anyone help me out.  I kinda
need it badly 'cause I will be away for a while.  Thanks.

 
 
 

crontab automatic updating ports ?? how to?

Post by Christopher Kings-Lynn » Fri, 14 Jan 2000 04:00:00


What you want to use is cvsup.

Just download cvsupit.tgz from your local fbsd mirror and pkg_add it.  It
should be in a CVSup dir of the ftp server.  It has onscreen instructions on
what to do next...

Chris


> Hi,
> I remember read somewhere here indicating a crontab script which updates
> selected or installed ports packages AUTOMATICALLY.  The scenario is
> whenever there is a new file uploaded to
> ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-3-stable/All, my
> FreeBSD will grab it back and install in the background.  The idea is to
> compare to the dates of each port.  Can anyone help me out.  I kinda
> need it badly 'cause I will be away for a while.  Thanks.


 
 
 

crontab automatic updating ports ?? how to?

Post by Stephen Wait » Fri, 14 Jan 2000 04:00:00



> Hi,
> I remember read somewhere here indicating a crontab script which updates
> selected or installed ports packages AUTOMATICALLY.  The scenario is
> whenever there is a new file uploaded to
> ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-3-stable/All, my
> FreeBSD will grab it back and install in the background.  The idea is to
> compare to the dates of each port.  Can anyone help me out.  I kinda
> need it badly 'cause I will be away for a while.  Thanks.

See section 18 of the FreeBSD handbook.  Particularly, section 18.3.3.5
describes the names of CVSup file collections (one of them being
ports-all) you may grab once you have cvsup running.

--Steve

 
 
 

crontab automatic updating ports ?? how to?

Post by annel.. » Fri, 14 Jan 2000 04:00:00



> Hi,
> I remember read somewhere here indicating a crontab script which updates
> selected or installed ports packages AUTOMATICALLY.  The scenario is
> whenever there is a new file uploaded to
> ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-3-stable/All, my
> FreeBSD will grab it back and install in the background.  The idea is to
> compare to the dates of each port.  Can anyone help me out.  I kinda
> need it badly 'cause I will be away for a while.  Thanks.

If you have cvsup files configured, you can easily run them from crontab.
But you want more than this; you want to run "make install" from the
appropriate directory if some particular ports are updated.  Or you
want to pkg_add them.  I think there's a pkg_add -r command, or something
that fetches and installs the package.

There's also pkg-version or pkg_version.  This compares the installed
version from the one available in ports.  It would be the base for a
script that then goes and adds the new pkg or builds the port.  I know
people have worked on such a script; they're usually a bit dangerous to
run.  They may update software to a version requiring a new configuration
file, for example.  Are you sure you want to do this?

        Annelise

 
 
 

crontab automatic updating ports ?? how to?

Post by freebi » Fri, 14 Jan 2000 04:00:00


Thanks.  Funny is this tgz does not register in /var/db/pkg
and I dont see comments/instruction on how to use.  Guess I just need to
pkg_add cvsupit.tgz everytime I wanna use it.  Peter

> What you want to use is cvsup.

> Just download cvsupit.tgz from your local fbsd mirror and pkg_add it.  It
> should be in a CVSup dir of the ftp server.  It has onscreen instructions on
> what to do next...

> Chris

 
 
 

crontab automatic updating ports ?? how to?

Post by freebi » Fri, 14 Jan 2000 04:00:00


Thanks.  I have just read it.  But I thinks cvsup is not exactly what I
was thinking of because it just runs like endless even for a test run on
/usr/bin selection.  Actually I dont like to mess around with sources
and just like to use FreeBSD because so far it is the most stable free
system I have experienced.  I am gonna keep searching for the solution
of automatically updating security, kernel, ports, packages I installed
on my computer, rather than going over all the trees in ports because it
consumes quite much computing time on my P3 450 128MB system.  I think I
will try specifying in crontab which package to grab and pkg_add.  I can
do this because I only install 14 extra packages in addition to the
stand 3.4 distribion.  Regards, Peter.

> See section 18 of the FreeBSD handbook.  Particularly, section 18.3.3.5
> describes the names of CVSup file collections (one of them being
> ports-all) you may grab once you have cvsup running.

> --Steve

 
 
 

crontab automatic updating ports ?? how to?

Post by freebi » Fri, 14 Jan 2000 04:00:00


Thanks.  I think using pkg_add -r in crontab will do the jobs.  So far I
avoid making install 'cause I am only a user.  Guess what?  Even
enabling my sound 1371 PCI 128 spent me about 30 minutes to figure out
and actually do it!  Yes I dont wanna mess up with the kernel or source
stuff.  Last time I used sysinstall/upgrade in my 3.2 and it refused to
boot after running my cpu to death and asked me to use kernel.prev !
Gees, why would I have to upgrade in the first place anyway?   hehehe.
When you have ironed out such a wonderful script for a programming
illiterate person like me, please DO post here so we can all have the
party together.  Peter

> If you have cvsup files configured, you can easily run them from crontab.
> But you want more than this; you want to run "make install" from the
> appropriate directory if some particular ports are updated.  Or you
> want to pkg_add them.  I think there's a pkg_add -r command, or something
> that fetches and installs the package.

> There's also pkg-version or pkg_version.  This compares the installed
> version from the one available in ports.  It would be the base for a
> script that then goes and adds the new pkg or builds the port.  I know
> people have worked on such a script; they're usually a bit dangerous to
> run.  They may update software to a version requiring a new configuration
> file, for example.  Are you sure you want to do this?

>         Annelise

 
 
 

crontab automatic updating ports ?? how to?

Post by Stephen Wait » Fri, 14 Jan 2000 04:00:00



> system I have experienced.  I am gonna keep searching for the solution
> of automatically updating security, kernel, ports, packages I installed
> on my computer, rather than going over all the trees in ports because it
> consumes quite much computing time on my P3 450 128MB system.  I think I

Mine runs nightly sometime after 2am.  It's not a problem.  This is on a
production-environment P133/80M machine.

--Steve

 
 
 

crontab automatic updating ports ?? how to?

Post by Christopher Kings-Lynn » Sat, 15 Jan 2000 04:00:00



Quote:> Thanks.  I have just read it.  But I thinks cvsup is not exactly what I
> was thinking of because it just runs like endless even for a test run on
> /usr/bin selection.  Actually I dont like to mess around with sources
> and just like to use FreeBSD because so far it is the most stable free
> system I have experienced.  I am gonna keep searching for the solution
> of automatically updating security, kernel, ports, packages I installed
> on my computer, rather than going over all the trees in ports because it
> consumes quite much computing time on my P3 450 128MB system.  I think I
> will try specifying in crontab which package to grab and pkg_add.  I can
> do this because I only install 14 extra packages in addition to the
> stand 3.4 distribion.  Regards, Peter.

It sounds to me that you haven't configured cvsup properly.  To update your
ports, create a file like this:

*default  host=cvsup.au.FreeBSD.org
*default  base=/usr
*default  prefix=/usr
*default  release=cvs
*default  tag=RELENG_3
*default  delete use-rel-suffix compress

*default tag=.
ports-all

But replace cvsup.au with whatever mirror is closest to you.

Then go (as root)

cvsup -g -L 2 cvsupfile

And all will be well.  It takes a while to run the first time, but after
that it should only take around a few minutes a day.  If you put src-all
aboce the '*default tag=.' line, it will update your source as well which
can take ages...

Chris

 
 
 

crontab automatic updating ports ?? how to?

Post by freebie_pot.. » Sat, 15 Jan 2000 04:00:00


On Fri, 14 Jan 2000 10:25:21 +0800, "Christopher Kings-Lynne"


>It sounds to me that you haven't configured cvsup properly.  To update your
>ports, create a file like this:

snip

>And all will be well.  It takes a while to run the first time, but after
>that it should only take around a few minutes a day.  If you put src-all
>aboce the '*default tag=.' line, it will update your source as well which
>can take ages...

>Chris

Thank you.  I will leave the machine on all night to do the job.  I kinda
like to shut off and boot my FreeBSD machine though I know no need.  But hey
only two months ago I was still working on WinXX and still used to rebooting
the machines every couple hours, either manually or AUTOMATICALLY.....<grin>
 
 
 

crontab automatic updating ports ?? how to?

Post by Tore Lun » Sat, 15 Jan 2000 04:00:00



> It takes a while to run the first time, but after
> that it should only take around a few minutes a day.

I am new to FreeBSD and have not yet CVSed, so I wonder:  What is
transferred during those few minutes a day?  Do the ports change every
day?  Do the core programs?
--

 
 
 

crontab automatic updating ports ?? how to?

Post by Stephen Wait » Sat, 15 Jan 2000 04:00:00




> > It takes a while to run the first time, but after
> > that it should only take around a few minutes a day.

> I am new to FreeBSD and have not yet CVSed, so I wonder:  What is
> transferred during those few minutes a day?  Do the ports change every
> day?  Do the core programs?

If you grab the whole stable tree, ports and all, you will get quite a
bit of files updated every day.  Never a day goes by that SOMETHING
isn't updated.  Usually there are quite a few updates to the system and
ports code.

--Steve

 
 
 

crontab automatic updating ports ?? how to?

Post by Conrad Sabati » Wed, 19 Jan 2000 04:00:00






>> > It takes a while to run the first time, but after
>> > that it should only take around a few minutes a day.

>> I am new to FreeBSD and have not yet CVSed, so I wonder:  What is
>> transferred during those few minutes a day?  Do the ports change every
>> day?  Do the core programs?

>If you grab the whole stable tree, ports and all, you will get quite a
>bit of files updated every day.  Never a day goes by that SOMETHING
>isn't updated.  Usually there are quite a few updates to the system and
>ports code.

Stop it, you're gonna scare 'em!  :-)

Even when I was still using only a 28.8/33.6 K modem, cvsup never
took more than a few minutes.  It's really not that big of a deal.
--
Conrad Sabatier
http://members.home.net/conrads/
ICQ# 1147270