Is using Perls built-in mailer a solution?

Stuart

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Todd Denniston
Sent: Monday, October 04, 2004 8:37 AM
To: Carl Brewer
Cc: [EMAIL PROTECTED]
Subject: Re: generating logs to mail out from a repository,not checked out
code?

Carl Brewer wrote:
> 
> Hello,
> 
> I'm trying to get an email summary of changes to an entire
> repository.  I have a repository : /home/scvs/repository,
> which is accessed both from a chrooted pserver, and ssh
> logins.  We were using the usual entry in CVSROOT/loginfo
> to generate emails when commits are made, but hacking
> a mailer into our chroot directory is not something I'd
> like to do unless there's no alternative.  I've just recently
> set up the chroot'ed pserver, and this is the bit I need
> to set so it'll send emails when something happens.
> 
> I had a look at cvs2cl.pl, which can generate summary
> logs by time for a checked out copy, but I want to be able
> to run something on the repository server itself to send out mails
> when commits are made, or send a summary every N minutes.
> 
> Does anyone have any suggestions?  It seems a little heavy
> to run a cronjob to check out everything in the repository on the server
> every 10 mins and then run cvs -l over it, but is that
> my only way to do this short of hacking at my chroot dir to
> make my MTA behave?
> 
How about having a directory that the cron job user can access, also having
loginfo just touch a file loginfo.out, and do 

if [ $CHROOT_LOCATION/loginfo.out -nt Changelog ]
then
        cvs update -Pd
        cvs2cl.pl -l "-d \"2004-08-09 < 2004-10-09\""
fi

results in 
1) not disturbing your chroot jail.
2) only using a little disk space.
3) only checking when there has been a checkin.

or a simpler thing might be to have loginfo gen some output as before but
append the output in a file, and a cron check as follows
if [ $CHROOT_LOCATION/loginfo.out -nt localcopy ]
then
        mv $CHROOT_LOCATION/loginfo.out $worklocation/localcopy
        touch $CHROOT_LOCATION/loginfo.out
        #make sure we are later
        touch $worklocation/localcopy
        mail [EMAIL PROTECTED] < localcopy
fi


> This is for a redhat gnu/linux box.
> 
> thanks for any suggestions,
> 
> Carl

-- 
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane) 
Harnessing the Power of Technology for the Warfighter


_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/info-cvs



_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/info-cvs

Reply via email to