From owner-freebsd-bugbusters@FreeBSD.ORG Wed Apr 21 02:33:18 2004 Return-Path: Delivered-To: freebsd-bugbusters@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4711416A4CF for ; Wed, 21 Apr 2004 02:33:18 -0700 (PDT) Received: from smtp.dkm.cz (smtp.dkm.cz [62.24.64.34]) by mx1.FreeBSD.org (Postfix) with SMTP id 1195143D3F for ; Wed, 21 Apr 2004 02:33:17 -0700 (PDT) (envelope-from neuhauser@chello.cz) Received: (qmail 8733 invoked by uid 0); 21 Apr 2004 09:33:15 -0000 Received: from r3al16.mistral.cz (HELO isis.wad.cz) (213.220.229.16) by smtp.dkm.cz with SMTP; 21 Apr 2004 09:33:15 -0000 Received: by isis.wad.cz (Postfix, from userid 1001) id 67E7B2FDA01; Wed, 21 Apr 2004 11:33:15 +0200 (CEST) Date: Wed, 21 Apr 2004 11:33:15 +0200 From: Roman Neuhauser To: Ceri Davies Message-ID: <20040421093315.GC1051@isis.wad.cz> Mail-Followup-To: Ceri Davies , freebsd-bugbusters References: <20040414073119.GC1544@isis.wad.cz> <20040414103655.GN465@submonkey.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="qcHopEYAB45HaUaB" Content-Disposition: inline In-Reply-To: <20040414103655.GN465@submonkey.net> User-Agent: Mutt/1.5.6i cc: freebsd-bugbusters Subject: Re: per-user send-pr defaults: ~/.send-pr.rc? X-BeenThere: freebsd-bugbusters@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Coordination of the Problem Report handling effort. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2004 09:33:18 -0000 --qcHopEYAB45HaUaB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline # ceri@FreeBSD.org / 2004-04-14 11:36:55 +0100: > On Wed, Apr 14, 2004 at 09:31:19AM +0200, Roman Neuhauser wrote: > > Would a patch for send-pr adding support for defaults handling using > > an rc file be welcome? If so, should I target send-pr as is in our tree, > > the one from the 4.0 tarball, or upstream cvs? > > I'd certainly be interested in looking at it. At the moment my plan to > upgrade is entirely {hub,www,freefall}.FreeBSD.org based - there seems > to be no pressing need to upgrade the distributed send-pr, so I'd target > the in-tree send-pr. If it should turn out that a client-side upgrade > is worth the effort then we can bring the patches forward (I had to do > the same for our local edit-pr hacks). I've used the attached patch to submit some PRs (65668 - 65680), and it was a relief. It's not commitable as-is (e. g. note -s/-S are swapped), I'd just like to know whether I'm on the right track. -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html --qcHopEYAB45HaUaB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="src::gnu::usr.bin::send-pr::send-pr.sh-config.patch" Index: gnu/usr.bin/send-pr/send-pr.sh =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/send-pr/send-pr.sh,v retrieving revision 1.13.2.13 diff -u -r1.13.2.13 send-pr.sh --- gnu/usr.bin/send-pr/send-pr.sh 1 Dec 2003 19:12:58 -0000 1.13.2.13 +++ gnu/usr.bin/send-pr/send-pr.sh 21 Apr 2004 09:16:36 -0000 @@ -22,6 +22,10 @@ # # $FreeBSD: src/gnu/usr.bin/send-pr/send-pr.sh,v 1.13.2.13 2003/12/01 19:12:58 ceri Exp $ +if [ -n "$HOME" -a -f $HOME/send-pr.conf ]; then + . $HOME/send-pr.conf +fi + # The version of this send-pr. VERSION=3.113 @@ -85,6 +89,10 @@ fi fi +if [ -z "$SENDER" ]; then + SENDER=$LOGNAME +fi + # Find out the name of the originator of this PR. if [ -n "$NAME" ]; then ORIGINATOR="$NAME" @@ -99,8 +107,8 @@ rm -f $PTEMP fi -FROM="$ORIGINATOR <$LOGNAME>" -REPLY_TO="$ORIGINATOR <${REPLY_TO:-${REPLYTO:-$LOGNAME}}>" +FROM="$ORIGINATOR <$SENDER>" +REPLY_TO="$ORIGINATOR <${REPLY_TO:-${REPLYTO:-$SENDER}}>" if [ -n "$ORGANIZATION" ]; then if [ -f "$ORGANIZATION" ]; then @@ -137,7 +145,6 @@ REMOVE= BATCH= CC= -SEVERITY_C= while [ $# -gt 0 ]; do case "$1" in @@ -157,9 +164,18 @@ -c | --cc) if [ $# -eq 1 ]; then echo "$USAGE"; exit 1; fi shift ; CC="$1" ;; - -s | --severity) if [ $# -eq 1 ]; then echo "$USAGE"; exit 1; fi - shift ; SEVERITY_C="$1" + -C | --category) if [ $# -eq 1 ]; then echo "$USAGE"; exit 1; fi + shift ; CATEGORY="$1" + ;; + -S | --severity) if [ $# -eq 1 ]; then echo "$USAGE"; exit 1; fi + shift ; SEVERITY="$1" ;; + -R | --priority) if [ $# -eq 1 ]; then echo "$USAGE"; exit 1; fi + shift ; PRIORITY="$1" + ;; + -s | --synopsis) if [ $# -eq 1 ]; then echo "$USAGE"; exit 1; fi + shift ; SYNOPSIS="$1" + ;; -p | -P | --print) PRINT=true ;; -L | --list) FORMAT=norm ;; -l | -CL | --lisp) FORMAT=lisp ;; @@ -244,9 +260,7 @@ ORGANIZATION_C='' CONFIDENTIAL_C='no ' SYNOPSIS_C='' -if [ -z "$SEVERITY_C" ]; then - SEVERITY_C='<[ non-critical | serious | critical ] (one line)>' -fi +SEVERITY_C='<[ non-critical | serious | critical ] (one line)>' PRIORITY_C='<[ low | medium | high ] (one line)>' CATEGORY_C='' CLASS_C='<[ sw-bug | doc-bug | change-request | update | maintainer-update ] (one line)>' @@ -256,6 +270,22 @@ HOW_TO_REPEAT_C='' FIX_C='' +if [ -z "$SYNOPSIS" ]; then + SYNOPSIS=$SYNOPSIS_C +fi +if [ -z "$SEVERITY" ]; then + SEVERITY=$SEVERITY_C +fi +if [ -z "$PRIORITY" ]; then + PRIORITY=$PRIORITY_C +fi +if [ -z "$CATEGORY" ]; then + CATEGORY=$CATEGORY_C +fi +if [ -z "$CLASS" ]; then + CLASS=$CLASS_C +fi + # Create temporary files, safely REF=`mktemp -t pf` || exit 1 TEMP=`mktemp -t pf` || exit 1 @@ -353,11 +383,11 @@ >Originator: $ORIGINATOR >Organization: ${ORGANIZATION-$ORGANIZATION_C} >Confidential: $CONFIDENTIAL_C ->Synopsis: $SYNOPSIS_C ->Severity: $SEVERITY_C ->Priority: $PRIORITY_C ->Category: $CATEGORY_C ->Class: $CLASS_C +>Synopsis: $SYNOPSIS +>Severity: $SEVERITY +>Priority: $PRIORITY +>Category: $CATEGORY +>Class: $CLASS >Release: ${DEFAULT_RELEASE-$RELEASE_C} >Environment: `[ -n "$SYSTEM" ] && echo System: $SYSTEM` @@ -537,11 +567,11 @@ # Add the subject field with the value of $SYNOPSIS. We use the To: # field as an anchor, which had better be there. # -SYNOPSIS=`grep '^>Synopsis:' $TEMP | sed -e 's/^>Synopsis:[ ]*//' | +SYNOPSIS_R=`grep '^>Synopsis:' $TEMP | sed -e 's/^>Synopsis:[ ]*//' | sed -e "s;$SYNOPSIS_C;;"` ed -s $TEMP << __EOF__ /^To:/a -Subject: $SYNOPSIS +Subject: $SYNOPSIS_R . w q --qcHopEYAB45HaUaB--