Subject: Re: keeping pkgsrc up-to-date
To: Jared D. McNeill <jmcneill@invisible.ca>
From: Sean Davis <dive@endersgame.net>
List: tech-pkg
Date: 07/01/2002 22:14:58
--9jxsPFA5p3P2qPhR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

I found the shell script component (i was wrong, it wasn't a perl script),
but i think i have deleted the procmailrc. the procmailrc part is easy,
however, all you need do is make sure mails from the changes lists get
thrown through this shell script.
It will need to be edited, since it's setup for my local machine.

On Mon, Jul 01, 2002 at 10:11:58PM -0400, Sean Davis wrote:
> I did write such a beast, but I'm not sure where I've kept it. It is
> essentially a procmailrc and another perl script that determines what to
> update. But, it does not work anymore - It used to be possible to retreive
> changes from anoncvs right after they were committed, but there is a delay
> now, and it's usually hours before they can be found on anoncvs. Thus, the
> setup I devised for automatically grabbing changes no longer works :(
> 
> If I can find the scripts, I'll be happy to send them along anyway.
> 
> -Sean
> 
> On Mon, Jul 01, 2002 at 10:09:11PM -0300, Jared D. McNeill wrote:
> > On Mon, 1 Jul 2002, Jan Schaumann wrote:
> > > I'm quite certain that it would be possible to write a mail-filter that
> > > takes pkgsrc-changes mails as input and goes to the aproppriate
> > > directory and does a cvs update.
> > 
> > I believe Sean Davis wrote a script that did exactly that. Sean, if you're
> > listening -- mind sharing that script with the rest of the world?
> > 
> > Cheers,
> > Jared
> > 
> 
> -- 
> /~\ The ASCII                         Sean Davis
> \ / Ribbon Campaign                    aka dive
>  X  Against HTML
> / \ Email!                   http://endersgame.net/~dive/

-- 
/~\ The ASCII                         Sean Davis
\ / Ribbon Campaign                    aka dive
 X  Against HTML
/ \ Email!                   http://endersgame.net/~dive/

--9jxsPFA5p3P2qPhR
Content-Type: application/x-sh
Content-Disposition: attachment; filename="commit-update.sh"
Content-Transfer-Encoding: quoted-printable

#!/bin/sh=0A# $egnet: commit-update.sh,v 1.4 2002/04/02 07:44:39 dive Exp $=
=0A=0Aexport CVS_RSH=3Dssh=0Aexport CVSROOT=3Danoncvs@anoncvs.netbsd.org:/c=
vsroot=0ACOMMITDIR=3D`echo $1|sed s/'CVS commit: '//`=0ACOMMITDIR=3D`echo $=
COMMITDIR | \=0Ased s/^sharesrc/src/ | \=0Ased s/^gnusrc/src/ | \=0Ased s/^=
syssrc/src/ | \=0Ased s/^basesrc/src/`=0A=0Acd /usr=0Aif [ "$1" =3D "" ]; t=
hen=0A	exit=0Afi=0A# exit if the subject line looks hairy=0ABAR=3D`echo ${C=
OMMITDIR}|egrep '[^a-zA-Z0-9-_/\.]'`=0Aif [ "$BAR" !=3D "" ]; then=0A	mail =
-s "[WARNING] re: CVS update (${COMMITDIR})" dive@endersgame.net << __EOF__=
=0AWarning: "${COMMITDIR}" matched [^a-zA-Z0-9-_]=0Adirectory "${COMMITDIR}=
" is suspicious (or a branch :), exiting without running cvs.=0A__EOF__=0A	=
exit=0Afi=0Aif [ ! -d "${COMMITDIR}/CVS" ]; then=0A	mail -s "CVS update (${=
COMMITDIR})" dive@endersgame.net << __EOF__=0A$0 called with args "$1",=0Ab=
ut I couldn't find /usr/${COMMITDIR}/CVS=0A(Aborted)=0A=0A__EOF__=0A	exit=
=0Aelse=0A	cd "${COMMITDIR}"=0A	((echo "(in ${COMMITDIR}): cvs -fq update -=
Pd";cvs -fq update -Pd 2>&1) | mail -s "CVS update (${COMMITDIR})" dive@end=
ersgame.net) &=0A	exit=0Afi=0A
--9jxsPFA5p3P2qPhR--