From owner-freebsd-stable Fri Mar 9 18:59:24 2001 Delivered-To: freebsd-stable@freebsd.org Received: from sdmail0.sd.bmarts.com (sdmail0.sd.bmarts.com [209.247.77.155]) by hub.freebsd.org (Postfix) with ESMTP id 198E437B718 for ; Fri, 9 Mar 2001 18:59:20 -0800 (PST) (envelope-from gordont@bluemtn.net) Received: from localhost (gordont@localhost) by sdmail0.sd.bmarts.com (8.11.3/8.11.2/BMA1.1) with ESMTP id f2A2vjv45373; Fri, 9 Mar 2001 18:57:45 -0800 (PST) Date: Fri, 9 Mar 2001 18:57:45 -0800 (PST) From: Gordon Tetlow X-X-Sender: To: Gregory Sutter Cc: Josef Karthauser , j mckitrick , Subject: Re: cvs mailing list for RELENG_4 only? In-Reply-To: <20010309155019.J90153@klapaucius.zer0.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I just tweaked out Greg's recipies for my own purposes. Here it is and the accompanying helper script. It splits out all the RELENG_4 commits and all the replies to those commits (based on Message-ID). enjoy! ==== # add cvsweb urls to the bottom of each commit # courtesy hoek@freebsd.org PERLSCRIPT=' while (<>) { if (/^\s+(\d+\.)+\d+\s+\+\d+ \-\d+\s+/) { $r = $_; $r =~+s/.*?([A-Za-z]+\/.+)/http\:\/\/www.FreeBSD.ORG\/cgi\/cvsweb\.cgi\/\1/; $l = "$l$r"; } print "$_"; } print "$l"; ' FROM="((X-)?(((Envelope-)?Sender|(Apparently-|Resent-)?From)|Reply-To|Return-Path):(.*\<)?)" # freebsd lists BSDLISTS="(advocacy|announce|arch|chat|current|cvs-all|doc|emulation|hackers|hardware|ipfw|isp|jobs|mobile|mozilla|net|ports|ppc|qa|questions|security|small|smp|stable)" # tag FreeBSD commit messages appropriately :0 bf * ^Sender:[ ]*owner-(freebsd-)?cvs-(all|committers)@FreeBSD.ORG * ^Subject: cvs commit: | perl -Te "${PERLSCRIPT}" :0 * $ ^${FROM}freebsd.org { #:0 Wh : freebsd.lock #| /usr/local/bin/formail -D 32768 $PMDIR/bsd.cache :0 : * ^Subject:[ ]*([Rr][Ee]:)* cvs commit: \/(doc|ports|www|CVSROOT) bsd/cvs-$MATCH :0 * ^Subject:[ ]*cvs commit: * ^X-FreeBSD-CVS-Branch:[ ]*RELENG_4 { # For everything that is commited for the stable branch, add # it into a cache for later. This way, we can filter replies # into the same folder. # XXX I don't think I need the W here, but what the heck. :0 Wc: freebsd.lock | /usr/local/bin/formail -D 32768 $PMDIR/bsd.stable.cache :0 : bsd/cvs-stable } # This would be the filter that looks up the reference ids and filters # accordingly. Returns 0 (success) and cats the message to stdout if # it has a reference listed in the the cache file. Returns 1 (failure) # if there is no reference id listed, falling through for later recipies # to pick up. :0 W: freebsd.lock |/home/gordont/bin/reference.sh $PMDIR/bsd.stable.cache >> bsd/cvs-stable :0 : * $ ^Sender:[ ]*owner-(freebsd-)?\/$BSDLISTS bsd/$MATCH } ==== and reference.sh #!/bin/sh TMPFILE=/tmp/mail.$$.tmp CACHEFILE=$1 touch $TMPFILE chmod 600 $TMPFILE cat > $TMPFILE # XXX Better way to do this? REFID=`egrep '(References:|In-Reply-To:)' $TMPFILE | cut -f 2 -d " " | grep "<" | head -1` if [ "x$REFID" = "x" ]; then # If there are no refereneces then we just error out and let # procmail deliver elsewhere rm $TMPFILE exit 1; fi grep $REFID $CACHEFILE > /dev/null if [ $? -eq 0 ]; then # Add it to the cache. # This way, replies to replies also get filtered. /usr/local/bin/formail -D 32768 $CACHEFILE < $TMPFILE cat $TMPFILE rm $TMPFILE exit 0; fi rm $TMPFILE exit 1; ==== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message