summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>2000-10-29 22:05:52 +0000
committersteve <steve@FreeBSD.org>2000-10-29 22:05:52 +0000
commitb85687e8b2adc30a80b50f0050616abc4c0fe9b4 (patch)
treee57e5aa3be9eb1c982dff9d380f9146959e7c665 /gnu
parent452893ff8d0bdddd07b3763a308d2437c88adaca (diff)
downloadFreeBSD-src-b85687e8b2adc30a80b50f0050616abc4c0fe9b4.zip
FreeBSD-src-b85687e8b2adc30a80b50f0050616abc4c0fe9b4.tar.gz
Update to version 3.113. Major changes were to incorporate FreeBSD-
specific changes into the original distribution (although sometimes with a slightly different approach) and to add two commandline options to send-pr(1): -c which allows you to specify an address to CC this PR to -s allow the severity to be specified on the commandline PR: 17922
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/send-pr/doc/categ.texi10
-rw-r--r--gnu/usr.bin/send-pr/doc/fields.texi60
-rw-r--r--gnu/usr.bin/send-pr/doc/s-usage.texi66
-rw-r--r--gnu/usr.bin/send-pr/doc/send-pr.texi39
-rw-r--r--gnu/usr.bin/send-pr/doc/states.texi13
-rw-r--r--gnu/usr.bin/send-pr/doc/version.texi4
-rw-r--r--gnu/usr.bin/send-pr/send-pr-el.in171
-rw-r--r--gnu/usr.bin/send-pr/send-pr.135
-rw-r--r--gnu/usr.bin/send-pr/send-pr.sh124
9 files changed, 326 insertions, 196 deletions
diff --git a/gnu/usr.bin/send-pr/doc/categ.texi b/gnu/usr.bin/send-pr/doc/categ.texi
index b02243e..fe84918 100644
--- a/gnu/usr.bin/send-pr/doc/categ.texi
+++ b/gnu/usr.bin/send-pr/doc/categ.texi
@@ -1,3 +1,5 @@
+@c $FreeBSD$
+
@node Valid Categories
@unnumberedsec Valid Categories
@cindex valid categories
@@ -20,7 +22,7 @@ This one doesn't actually exist.
Free parser generator.
@item config
-Cygnus Support Software configuration and installation.
+Cygnus Solutions Software configuration and installation.
@item cvs
Concurrent Version System.
@@ -71,7 +73,7 @@ Kerberos authentication system.
@sc{gnu} linker.
@item libc
-Cygnus Support C Support Library.
+Cygnus Solutions C Support Library.
@item libg++
@sc{gnu} C++ class library.
@@ -80,7 +82,7 @@ Cygnus Support C Support Library.
@sc{gnu} @samp{libiberty} library.
@item libm
-Cygnus Support C Math Library.
+Cygnus Solutions C Math Library.
@item make
@sc{gnu} @code{make} program.
@@ -92,7 +94,7 @@ Cygnus Support C Math Library.
@sc{gnu} Motorola syntax assembler.
@item newlib
-Cygnus Support C Support and Math Libraries.
+Cygnus Solutions C Support and Math Libraries.
@item patch
@sc{gnu} bug patch program.
diff --git a/gnu/usr.bin/send-pr/doc/fields.texi b/gnu/usr.bin/send-pr/doc/fields.texi
index e8921d6..a9bb65e 100644
--- a/gnu/usr.bin/send-pr/doc/fields.texi
+++ b/gnu/usr.bin/send-pr/doc/fields.texi
@@ -1,3 +1,5 @@
+@c $FreeBSD$
+
@node Fields
@section Problem Report format
@cindex Problem Report format
@@ -9,6 +11,12 @@ The format of a PR is designed to reflect the nature of @sc{gnats} as a
database. Information is arranged into @dfn{fields}, and kept in
individual records (Problem Reports).
+A Problem Report contains two different types of fields: @dfn{Mail
+Header} fields, which are used by the mail handler for delivery, and
+@dfn{Problem Report} fields, which contain information relevant to the
+Problem Report and its submitter. A Problem Report is essentially a
+specially formatted electronic mail message.
+
Problem Report fields are denoted by a keyword which begins with
@samp{>} and ends with @samp{:}, as in @samp{>Confidential:}. Fields
belong to one of three data types:
@@ -69,12 +77,6 @@ The following fields are @sc{MultiText} format:
@end table
-A Problem Report contains two different types of fields: @dfn{Mail
-Header} fields, which are used by the mail handler for delivery, and
-@dfn{Problem Report} fields, which contain information relevant to the
-Problem Report and its submitter. A Problem Report is essentially a
-specially formatted electronic mail message.
-
@ifclear SENDPR
@subheading Example Problem Report
@end ifclear
@@ -198,14 +200,14 @@ local configuration}.
The following fields are present whenever a PR is submitted via the
program @code{send-pr}. @sc{gnats} adds additional fields when the PR
-arrives at the Support Site; explanations of these follow this list.
+arrives at the Support Site; explanations of them follow this list.
@cindex fields - list
@cindex GNATS fields - list
@table @code
-@item >Submitter-Id:
@cindex @code{Submitter-Id} field
@cindex @code{>Submitter-Id:}
+@item >Submitter-Id:
(@sc{Text}) A unique identification code assigned by the Support Site.
It is used to identify all Problem Reports coming from a particular
site. (Submitters without a value for this field can invoke
@@ -214,29 +216,29 @@ the support organization. Problem Reports from those not affiliated
with the support organization should use the default value of @samp{net}
for this field.)
-@item >Originator:
@cindex @code{Originator} field
@cindex @code{>Originator:}
+@item >Originator:
(@sc{Text}) Originator's real name. The default is the value of the
originator's environment variable @code{NAME}.
-@item >Organization:
@cindex @code{>Organization:}
@cindex @code{Organization} field
+@item >Organization:
(@sc{MultiText}) The originator's organization. The default value is
set with the variable @w{@code{DEFAULT_ORGANIZATION}} in the
@ifclear SENDPR
-@file{config} file (@pxref{config,,The @code{config} file}).
+@file{config} file (@pxref{config file,,The @code{config} file}).
@end ifclear
@ifset SENDPR
@code{send-pr} shell script.
@end ifset
-@item >Confidential:
@cindex @code{Confidential} field
@cindex @code{>Confidential:}
@cindex confidentiality in PRs
@cindex PR confidentiality
+@item >Confidential:
(@sc{Enumerated}) Use of this field depends on the originator's
relationship with the support organization; contractual agreements often
have provisions for preserving confidentiality. Conversely, a lack of a
@@ -250,16 +252,16 @@ support organization treats the PR as confidential; any code samples
provided are not made publicly available (e.g., in regression test
suites). The default value is @samp{yes}.
-@item >Synopsis:
@cindex @code{Synopsis} field
@cindex @code{>Synopsis:}
+@item >Synopsis:
(@sc{Text}) One-line summary of the problem. @w{@code{send-pr}} copies
this information to the @samp{Subject:} line when you submit a Problem
Report.
-@item >Severity:
@cindex @code{Severity} field
@cindex @code{>Severity:}
+@item >Severity:
(@sc{Enumerated}) The severity of the problem. Accepted values include:
@table @code
@@ -280,12 +282,13 @@ The product, component or concept is working in general, but lacks
features, has irritating behavior, does something wrong, or doesn't
match its documentation.
@end table
+@noindent
The default value is @samp{serious}.
@sp 1
-@item >Priority:
@cindex @code{Priority} field
@cindex @code{>Priority:}
+@item >Priority:
(@sc{Enumerated}) How soon the originator requires a solution. Accepted
values include:
@@ -306,19 +309,19 @@ The problem should be solved in a future release.
The default value is @samp{medium}.
@sp 1
-@item >Category:
@cindex @code{Category} field
@cindex @code{>Category:}
+@item >Category:
(@sc{Text}) The name of the product, component or concept where
the problem lies. The values for this field are defined by the Support
Site.
@ifclear SENDPR
-@xref{categories,,The @code{categories} file}, for details.
+@xref{categories file,,The @code{categories} file}, for details.
@end ifclear
-@item >Class:
@cindex @code{Class} field
@cindex @code{>Class:}
+@item >Class:
(@sc{Enumerated}) The class of a problem can be one of the following:
@table @code
@@ -354,27 +357,27 @@ the Support Site.
The default is @samp{sw-bug}.
@sp 1
-@item >Release:
@cindex @code{Release} field
@cindex @code{>Release:}
+@item >Release:
(@sc{Text}) Release or version number of the product, component or
concept.
-@item >Environment:
@cindex @code{Environment} field
@cindex @code{>Environment:}
+@item >Environment:
(@sc{MultiText}) Description of the environment where the problem occured:
machine architecture, operating system, host and target types,
libraries, pathnames, etc.
-@item >Description:
@cindex @code{Description} field
@cindex @code{>Description:}
+@item >Description:
(@sc{MultiText}) Precise description of the problem.
-@item >How-To-Repeat:
@cindex @code{How-To-Repeat} field
@cindex @code{>How-To-Repeat:}
+@item >How-To-Repeat:
(@sc{MultiText}) Example code, input, or activities to reproduce the
problem. The support organization uses example code both to reproduce
the problem and to test whether the problem is fixed. Include all
@@ -385,9 +388,9 @@ recreate the problem reported, however obvious. Sometimes seemingly
arbitrary or obvious information can point the way toward a solution.
See also @ref{Helpful hints,,Helpful hints}.
-@item >Fix:
@cindex @code{Fix} field
@cindex @code{>Fix:}
+@item >Fix:
(@sc{MultiText}) A description of a solution to the problem, or a patch
which solves the problem. (This field is most often filled in at the
Support Site; we provide it to the submitter in case she has solved the
@@ -457,18 +460,18 @@ Problem Reports}.
(@sc{Text}) The person responsible for this category.
@ifclear SENDPR
@sc{gnats} retrieves this information from the @file{categories} file
-(@pxref{categories,,The @code{categories} file}).
+(@pxref{categories file,,The @code{categories} file}).
@end ifclear
-@item >Arrival-Date:
@cindex @code{>Arrival-Date:}
@cindex @code{Arrival-Date} field
+@item >Arrival-Date:
(@sc{Text}) The time that this PR was received by @sc{gnats}. The date
is provided automatically by @sc{gnats}.
-@item >Audit-Trail:
@cindex @code{>Audit-Trail:}
@cindex @code{Audit-Trail} field
+@item >Audit-Trail:
(@sc{MultiText}) Tracks related electronic mail as well as changes in
the @samp{>State:} and @samp{>Responsible:} fields with the sub-fields:
@@ -500,18 +503,19 @@ The time the change was made.
The reason for the change.
@end table
-@noindent
@cindex subsequent mail
@cindex other mail
@cindex appending PRs
@cindex saving related mail
@cindex related mail
+@noindent
The @samp{>Audit-Trail:} field also contains any mail messages received
by @sc{gnats} related to this PR, in the order received.
-@item >Unformatted:
@cindex @code{>Unformatted:}
@cindex @code{Unformatted} field
+@item
+ >Unformatted:
(@sc{MultiText}) Any random text found outside the fields in the
original Problem Report.
@end table
diff --git a/gnu/usr.bin/send-pr/doc/s-usage.texi b/gnu/usr.bin/send-pr/doc/s-usage.texi
index ee51368..5c9006b 100644
--- a/gnu/usr.bin/send-pr/doc/s-usage.texi
+++ b/gnu/usr.bin/send-pr/doc/s-usage.texi
@@ -1,3 +1,5 @@
+@c $FreeBSD$
+
@c This is the usage section for send-pr. It is called as
@c chapter (Invoking send-pr) by send-pr.texi, and also as
@c section (Submitting Problem Reports) by gnats.texi (chapter/section
@@ -5,13 +7,14 @@
@c FIXME! This still seems jumbled...
-You can invoke @code{send-pr} from a shell prompt or from within
+You can invoke @code{send-pr} from a shell prompt, or from within
@sc{gnu} Emacs using @w{@samp{M-x send-pr}}.
@menu
* using send-pr:: Creating new Problem Reports
* send-pr in Emacs:: Using send-pr from within Emacs
* send-pr from the shell:: Invoking send-pr from the shell
+* Submitting via e-mail:: Submitting a Problem Report via direct e-mail
* Helpful hints::
@end menu
@@ -59,13 +62,17 @@ see @ref{An Example}.
The default template contains your preconfigured @samp{>Submitter-Id:}.
@code{send-pr} attempts to determine values for the @samp{>Originator:}
and @samp{>Organization:} fields (@pxref{Fields,,Problem Report
-format}). @code{send-pr} also attempts to find out some information
+format}). @code{send-pr} will set the @samp{>Originator:} field to
+the value of the @code{NAME} environment variable if it has been set;
+similarly, @samp{>Organization:} will be set to the value of @code{ORGANIZATION}.
+@code{send-pr} also attempts to find out some information
about your system and architecture, and places this information in the
@samp{>Environment:} field if it finds any.
You may submit problem reports to different Support Sites from the
default site by specifying the alternate site when you invoke
-@code{send-pr}. Each @code{site} has its own list of categories for
+@code{send-pr}. @xref{send-pr from the shell}.
+Each @code{site} has its own list of categories for
which it accepts Problem Reports.
@c FIXME! This should go in..
@c For a list of sites to whom @code{send-pr} is configured to send
@@ -126,8 +133,8 @@ X-send-pr-version: send-pr @value{VERSION}
@end smallexample
@noindent
-where @var{support-site} is an alias for the Support Site you wish to
-submit this PR to.
+where @var{support-site} is an alias on your local machine for the
+Support Site you wish to submit this PR to.
The rest of the template contains @sc{gnats} fields. Each field is
either automatically completed with valid information (such as your
@@ -156,7 +163,7 @@ pre-configured information:
>Priority: <[ low | medium | high ] (one line)>
>Category: <name of the product (one line)>
>Class: <[sw-bug | doc-bug | change-request | support]>
->Release: <release number or tag (one line)>
+>Release: <release number (one line)>
>Environment:
<machine, os, target, libraries (multiple lines)>
@@ -419,15 +426,25 @@ Sends the PR to @var{mail-address}. The default is preset when
@code{send-pr} is configured. @emph{This option is not recommended};
instead, use the argument @var{site} on the command line.
+@item -c @var{mail-address}
+@itemx --cc @var{mail-address}
+Places @var{mail-address} in the @code{Cc:} header field of the message
+to be sent.
+
@item --request-id
Sends a request for a @code{>Submitter-Id:} to the Support Site.
-@item -L
-@item --list
@cindex listing valid categories
+@item -L
+@itemx --list
Prints the list of valid @code{>Category:} values on standard output.
No mail is sent.
+@item -s @var{severity}
+@itemx --severity @var{severity}
+@cindex @code{send-pr} fields
+Sets the initial value of the @code{>Severity:} field to @var{severity}.
+
@ignore
@item -S
@itemx --sites
@@ -453,10 +470,41 @@ is sent.
Displays a usage summary for @code{send-pr}. No mail is sent.
@end table
+@c -------------------------------------------------------------------------
+@node Submitting via e-mail
+@section Submitting a Problem Report via direct e-mail
+@cindex Direct e-mail
+@cindex Submitting a PR via e-mail
+In addition to using @code{send-pr}, there is another way to submit a problem
+report. You can simply send an e-mail message to the support site.
+
+To do this, look at the address in the @samp{To:} field of the @code{send-pr}
+template. When you send unformatted e-mail to this address, @sc{gnats}
+processes the message as a new problem report, filling in as many fields from
+defaults as it can:
+
+@table @code
+@item Synopsis
+The @samp{>Synopsis} field is filled in by the @samp{Subject:} header.
+
+@item Submitter ID
+@sc{gnats} will try to derive the @samp{>Submitter} field from the address
+in the @samp{From:} header.
+
+@item Description
+All of the text in the body of the e-mail message is put into the
+@samp{>Description} field. Each line of the text is indented by one space,
+indicating that it is "quoted text" from the sender.
+@end table
+
+Other fields, such as category, version, severity, etc. are set to default
+values (if the @sc{gnats} administrator has set them).
+
+@c --------------------------------------------------------------------------
@node Helpful hints
@section Helpful hints
@cindex helpful hints
-@cindex Using and Porting GNU CC
+@cindex Using and Porting @sc{gnu} CC
@cindex effective problem reporting
@cindex kinds of helpful information
@cindex information to submit
diff --git a/gnu/usr.bin/send-pr/doc/send-pr.texi b/gnu/usr.bin/send-pr/doc/send-pr.texi
index 4afba51..1abb296 100644
--- a/gnu/usr.bin/send-pr/doc/send-pr.texi
+++ b/gnu/usr.bin/send-pr/doc/send-pr.texi
@@ -1,3 +1,5 @@
+@c $FreeBSD$
+
\input texinfo @c -*-texinfo-*-
@setfilename send-pr.info
@settitle Reporting Problems Using send-pr
@@ -10,13 +12,13 @@
@ifinfo
@format
START-INFO-DIR-ENTRY
-* send-pr: (send-pr). Reporting problems--using send-pr.
+* send-pr: (send-pr). Reporting problems--using send-pr
END-INFO-DIR-ENTRY
@end format
@end ifinfo
@ifinfo
-Copyright @copyright{} 1993 Free Software Foundation, Inc.
+Copyright @copyright{} 1993, 1994, 1995 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -50,7 +52,7 @@ into another language, under the above conditions for modified versions.
@vskip 0pt plus 1filll
-Copyright @copyright{} 1993 Free Software Foundation, Inc.
+Copyright @copyright{} 1993, 1994, 1995 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -154,16 +156,15 @@ of Problem Reports}).
@chapter An Example
@cindex an example
@cindex example PR
-@cindex Cygnus Support
-@cindex GNU software support
-
-Cygnus Support in Mountain View, CA, uses @sc{gnats} and @code{send-pr}
+@cindex Cygnus Solutions
+@cindex @sc{gnu} software support
+Cygnus Solutions in Sunnyvale, CA, uses @sc{gnats} and @code{send-pr}
extensively for their support activities. As a support company, Cygnus
finds problem tracking to be a crucial part of everyday business.
Cygnus supports the @sc{gnu} compiling tools (including @sc{gnats} and
@code{send-pr}) over several many platforms
-With each shipment of the Cygnus Support Developer's Kit, customers
+With each shipment of the Cygnus Solutions Developer's Kit, customers
receive the latest version of @code{send-pr}, which contains an
up-to-date listing of valid categories (values for the @code{>Category:}
field). Using these tools, Cygnus' customers can communicate their
@@ -172,7 +173,7 @@ receipt as well as notification of changes in the status of their
reported problems. Much of Cygnus' support mechanism relies on
electronic mail.
-As an example, let's pretend we're a customer of Cygnus Support, and
+As an example, let's pretend we're a customer of Cygnus Solutions, and
that we're having a problem compiling some of our software using the
@sc{gnu} C compiler, which Cygnus supports.
@@ -364,7 +365,7 @@ I'm working on robustisizing the bifrabulator now.
How about lunch next week?
--
F.B. Hacker
-Cygnus Support, Mountain View, CA 415 903 1400
+Cygnus Solutions, Sunnyvale, CA 408 542 9600
#include <std-disclaimer.h>
@end group
@end smallexample
@@ -391,7 +392,7 @@ State-Changed-Why:
figured out the problem, working on a patch this afternoon
--
F.B. Hacker
-Cygnus Support, Mountain View, CA 415 903 1400
+Cygnus Solutions, Sunnyvale, CA 408 542 9600
#include <std-disclaimer.h>
@end group
@end smallexample
@@ -415,7 +416,7 @@ Hey, that joke you sent me was great! The one about the
strings walking into a bar... my boss laughed for an hour!
--
F.B. Hacker
-Cygnus Support, Mountain View, CA 415 903 1400
+Cygnus Solutions, Sunnyvale, CA 408 542 9600
#include <std-disclaimer.h>
@end group
@end smallexample
@@ -437,7 +438,7 @@ State-Changed-Why:
got the patch finished, notified Jeff at Imaginary Software
--
F.B. Hacker
-Cygnus Support, Mountain View, CA 415 903 1400
+Cygnus Solutions, Sunnyvale, CA 408 542 9600
#include <std-disclaimer.h>
@end group
@end smallexample
@@ -518,12 +519,12 @@ into @file{@var{prefix}/man/man1}
@item @var{site}
the list of valid @var{categories} for the Support Site from which you
received @code{send-pr}, installed as
-@w{@file{@var{prefix}/lib/gnats/@var{site}}}
+@w{@file{@var{prefix}/share/gnats/@var{site}}}
@item send-pr.el
-into @w{@file{@var{prefix}/lib/emacs/lisp}}@footnote{If your main Emacs
+into @w{@file{@var{prefix}/share/emacs/lisp}}@footnote{If your main Emacs
lisp repository is in a different directory from this, substitute that
-directory for @w{@file{@var{prefix}/lib/emacs/lisp}}.}
+directory for @w{@file{@var{prefix}/share/emacs/lisp}}.}
@end table
@item info (@emph{optional})
@@ -554,7 +555,7 @@ into the template field @samp{>Submitter-Id:}. If you've downloaded
@item
Place the following line in
-@w{@file{@var{prefix}/lib/emacs/lisp/default.el}}, or instruct your
+@w{@file{@var{prefix}/share/emacs/lisp/default.el}}, or instruct your
users to place the following line in their @file{.emacs} files:
@smallexample
@@ -571,7 +572,7 @@ file to contain something like:
@smallexample
# support sites; for use with send-pr
-cygnus-gnats: bugs@@cygnus.com # Cygnus Support
+cygnus-gnats: bugs@@cygnus.com # Cygnus Solutions
bumblebee-gnats: bumblebugs@@bumblebee.com # Bumblebee Inc.
mycompany-gnats: bugs@@my.company.com (@emph{if you use @sc{gnats} locally})
@end smallexample
@@ -589,7 +590,7 @@ send-pr @var{site}@dots{}
problems accepted by the site in question by looking in
@smallexample
-@var{prefix}/lib/gnats/@var{site}
+@var{prefix}/share/gnats/@var{site}
@end smallexample
@end itemize
diff --git a/gnu/usr.bin/send-pr/doc/states.texi b/gnu/usr.bin/send-pr/doc/states.texi
index 16ea890..f38405c 100644
--- a/gnu/usr.bin/send-pr/doc/states.texi
+++ b/gnu/usr.bin/send-pr/doc/states.texi
@@ -1,3 +1,5 @@
+@c $FreeBSD$
+
@node States
@section States of Problem Reports
@@ -10,6 +12,9 @@ Each PR goes through a defined series of states between origination and
closure. The originator of a PR receives notification automatically of
any state changes.
+Unless your site has customized states (see @pxref{states
+file,,,gnats}), @sc{gnats} uses these states:
+
@table @dfn
@cindex @emph{open} state
@cindex initial state (@dfn{open})
@@ -18,32 +23,32 @@ any state changes.
The initial state of a Problem Report. This means the PR has been filed
and the responsible person(s) notified.
-@item analyzed
@cindex @emph{analyzed} state
@cindex state---@dfn{analyzed}
+@item analyzed
The responsible person has analyzed the problem. The analysis should
contain a preliminary evaluation of the problem and an estimate of the
amount of time and resources necessary to solve the problem. It should
also suggest possible workarounds.
-@item feedback
@cindex @emph{feedback} state
@cindex state---@dfn{feedback}
+@item feedback
The problem has been solved, and the originator has been given a patch
or other fix. The PR remains in this state until the originator
acknowledges that the solution works.
-@item closed
@cindex @emph{closed} state
@cindex state---@dfn{closed}
@cindex final state (@dfn{closed})
+@item closed
A Problem Report is closed (``the bug stops here'') only when any
changes have been integrated, documented, and tested, and the submitter
has confirmed the solution.
-@item suspended
@cindex @emph{suspended} state
@cindex state---@dfn{suspended}
+@item suspended
Work on the problem has been postponed. This happens if a timely
solution is not possible or is not cost-effective at the present time.
The PR continues to exist, though a solution is not being actively
diff --git a/gnu/usr.bin/send-pr/doc/version.texi b/gnu/usr.bin/send-pr/doc/version.texi
index 7aff863..bffedc2 100644
--- a/gnu/usr.bin/send-pr/doc/version.texi
+++ b/gnu/usr.bin/send-pr/doc/version.texi
@@ -1 +1,3 @@
-@set VERSION 3.2
+@c $FreeBSD$
+
+@set VERSION 3.113
diff --git a/gnu/usr.bin/send-pr/send-pr-el.in b/gnu/usr.bin/send-pr/send-pr-el.in
index 15b18dc..b32e06f 100644
--- a/gnu/usr.bin/send-pr/send-pr-el.in
+++ b/gnu/usr.bin/send-pr/send-pr-el.in
@@ -1,10 +1,10 @@
;;;; -*-emacs-lisp-*-
;;;;---------------------------------------------------------------------------
-;;;; EMACS interface for send-pr (by Heinz G. Seidl, hgs@cygnus.com)
+;;;; EMACS interface for send-pr (by Heinz G. Seidl)
;;;; Slightly hacked by Brendan Kehoe (brendan@cygnus.com).
;;;;
;;;; This file is part of the Problem Report Management System (GNATS)
-;;;; Copyright 1992, 1993 Cygnus Support
+;;;; Copyright 1992, 1993, 1997 Cygnus Support
;;;;
;;;; This program is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU General Public
@@ -64,7 +64,7 @@
(defvar mail-self-blind nil)
(defvar mail-default-reply-to nil)
-(defconst send-pr::version "3.2")
+(defconst send-pr::version "3.113")
(defvar gnats:root "/home/gnats"
"*The top of the tree containing the GNATS database.")
@@ -86,6 +86,27 @@
(string-lessp emacs-version "19")))
"Is this emacs v19?")
+;;; This has to be here rather than at the bottom of this file with
+;;; the other utility functions because it is used by
+;;; gnats::get-config, which is called when send-pr.el is being
+;;; loaded (see the "defconst" below), before the whole file has been
+;;; loaded.
+
+(defun gnats::find-safe-default-directory (&optional buffer)
+"If the directory referred to by `default-directory' for the current
+buffer (or for optional argument BUFFER) does not exist, set it to the home
+directory of the current user if that exists, or to `/'.
+
+Returns the final value of default-directory in the buffer."
+ (let ((homedir (expand-file-name "~/")))
+ (save-excursion
+ (if buffer (set-buffer buffer))
+ (if (not (file-exists-p default-directory))
+ (if (file-exists-p homedir)
+ (setq default-directory homedir)
+ (setq default-directory "/")))
+ default-directory)))
+
;;; These may be changed during configuration/installation or by the individual
;;; user in his/her .emacs file.
;;;
@@ -95,11 +116,17 @@
ret)
(save-excursion
(set-buffer buf)
- (shell-command (concat ". " gnats:root "/gnats-adm/config; echo $" var )
- t)
- (if (looking-at "^\\.:\\|/bin/sh:\\|\n")
+ (shell-command-on-region
+ (point-min) (point-max)
+ (concat ". " gnats:root "/gnats-adm/config; echo $" var ) t)
+ (goto-char (point-min))
+ ; We have to use get-buffer, since shell-command-on-region will wipe
+ ; out the buffer if there's no output from the command.
+ (if (or (not (get-buffer "*Shell Command Output*"))
+ (looking-at "^\\.:\\|/bin/sh:\\|\n"))
(setq ret nil)
(setq ret (buffer-substring (point-min) (- (point-max) 1)))))
+ (if (and ret (string-equal ret "")) (setq ret nil))
(kill-buffer buf)
ret))
@@ -130,7 +157,7 @@ at runtime.")
(` (("Category" send-pr::set-categories
(, (or (gnats::get-config "DEFAULT_CATEGORY") nil)) enum)
("Class" (("sw-bug") ("doc-bug") ("change-request"))
- (, (or (gnats::get-config "DEFAULT_CONFIDENTIAL") 0)) enum)
+ (, (or (gnats::get-config "DEFAULT_CLASS") 0)) enum)
("Confidential" (("yes") ("no"))
(, (or (gnats::get-config "DEFAULT_CONFIDENTIAL") 1)) enum)
("Severity" (("non-critical") ("serious") ("critical"))
@@ -141,8 +168,7 @@ at runtime.")
(, (or (gnats::get-config "DEFAULT_RELEASE") "@DEFAULT_RELEASE@"))
text)
("Submitter-Id" nil
- (, (or (gnats::get-config "DEFAULT_SUBMITTER") "unknown"))
- text)
+ (, (or (gnats::get-config "DEFAULT_SUBMITTER") "unknown")) text)
("Synopsis" nil nil text
(lambda (a b c) (gnats::set-mail-field "Subject" c)))))
"AList, keyed on the name of the field, of:
@@ -201,6 +227,9 @@ it to send-pr::sites. With arg, force update."
(defvar send-pr:::err-buffer nil
"The error buffer used by the current PR buffer.")
+(defvar send-pr:::spawn-to-send nil
+ "Whether or not send-pr-mode should spawn a send-pr process to send the PR.")
+
(defconst gnats::indent 17 "Indent for formatting the value.")
;;;;---------------------------------------------------------------------------
@@ -234,8 +263,9 @@ to send the PR with `send-pr -b -f -'."
(let ((oldpr (getenv "GNATS_ROOT"))
(case-fold-search nil))
(setenv "GNATS_ROOT" gnats:root)
- (shell-command (concat "send-pr -P " site) t)
+ (send-pr::insert-template site)
(setenv "GNATS_ROOT" oldpr)
+ (goto-char (point-min))
(if (looking-at "send-pr:")
(cond ((looking-at "send-pr: .* does not have a categories list")
(setq send-pr::sites nil)
@@ -243,17 +273,21 @@ to send the PR with `send-pr -b -f -'."
(t (error (buffer-substring (point-min) (point-max)))))
(save-excursion
;; Clear cruft inserted by bdamaged .cshrcs
+ (goto-char 1)
(re-search-forward "^SEND-PR:")
(delete-region 1 (match-beginning 0)))))
(set-buffer-modified-p nil)
(send-pr:send-pr-mode)
(setq send-pr:::site site)
+ (setq send-pr:::spawn-to-send t)
(send-pr::set-categories)
(if (null send-pr:::categories)
(progn
(and send-pr:::err-buffer (kill-buffer send-pr:::err-buffer))
(kill-buffer nil)
(message "send-pr: no categories found"))
+ (or (stringp mail-default-reply-to)
+ (setq mail-default-reply-to (getenv "REPLYTO")))
(and mail-default-reply-to
(gnats::set-mail-field "Reply-To" mail-default-reply-to))
(and mail-self-blind
@@ -263,6 +297,19 @@ to send the PR with `send-pr -b -f -'."
(message (substitute-command-keys
"To send the problem report use: \\[send-pr:submit-pr]"))))
+(defvar send-pr::template-alist nil
+ "An alist containing the output of send-pr -P <sitename> for various sites.")
+
+(defun send-pr::insert-template (site)
+ (let ((elt (assoc site send-pr::template-alist)))
+ (if elt
+ (save-excursion (insert (cdr elt)))
+ (call-process "send-pr" nil t nil "-P" site)
+ (save-excursion
+ (setq send-pr::template-alist
+ (cons (cons site (buffer-substring (point-min) (point-max)))
+ send-pr::template-alist))))))
+
(fset 'do-send-pr 'send-pr:submit-pr) ;backward compat
(defun send-pr:submit-pr ()
"Pipe the contents of the buffer *send-pr* to `send-pr -f -.' unless this
@@ -277,35 +324,47 @@ buffer was loaded with emacsclient, in which case save the buffer and exit."
(save-buffer buffer)
(kill-buffer buffer)
(server-buffer-done buffer)))
+ (send-pr:::spawn-to-send
+ (if (or (buffer-modified-p)
+ (not send-pr:::sent)
+ (y-or-n-p "PR already sent; resend? "))
+ (progn
+ (or (and send-pr:::err-buffer
+ (buffer-name send-pr:::err-buffer))
+ (setq send-pr:::err-buffer
+ (get-buffer-create send-pr::err-buffer-name)))
+ (let ((err-buffer send-pr:::err-buffer) mesg ok)
+ (save-excursion (set-buffer err-buffer) (erase-buffer))
+ (message "running send-pr...")
+ (let ((oldpr (getenv "GNATS_ROOT")))
+ (setenv "GNATS_ROOT" gnats:root)
+ ;; ensure that a final newline is present:
+ (if (not (equal (char-after (1- (point-max))) ?\n))
+ (save-excursion (goto-char (point-max))
+ (insert ?\n)))
+ (call-process-region (point-min) (point-max) "send-pr"
+ nil err-buffer nil send-pr:::site
+ "-b" "-f" "-")
+ (setenv "GNATS_ROOT" oldpr))
+ (message "running send-pr...done")
+ ;; stupidly we cannot check the return value in EMACS 18.57,
+ ;; thus we need this kluge to find out whether send-pr succeeded.
+ (if (save-excursion
+ (set-buffer err-buffer)
+ (goto-char (point-min))
+ (setq mesg (buffer-substring (point-min) (- (point-max) 1)))
+ (search-forward "problem report sent" nil t))
+ (progn (message mesg)
+ (kill-buffer err-buffer)
+ (delete-auto-save-file-if-necessary)
+ (set-buffer-modified-p nil)
+ (setq send-pr:::sent t)
+ (bury-buffer))
+ (pop-to-buffer err-buffer))
+ ))))
(t
- (or (and send-pr:::err-buffer
- (buffer-name send-pr:::err-buffer))
- (setq send-pr:::err-buffer
- (get-buffer-create send-pr::err-buffer-name)))
- (let ((err-buffer send-pr:::err-buffer) mesg ok)
- (save-excursion (set-buffer err-buffer) (erase-buffer))
- (message "running send-pr...")
- (let ((oldpr (getenv "GNATS_ROOT")))
- (setenv "GNATS_ROOT" gnats:root)
- (call-process-region (point-min) (point-max) "send-pr"
- nil err-buffer nil send-pr:::site
- "-b" "-f" "-")
- (setenv "GNATS_ROOT" oldpr))
- (message "running send-pr...done")
- ;; stupidly we cannot check the return value in EMACS 18.57, thus we need
- ;; this kluge to find out whether send-pr succeeded.
- (if (save-excursion
- (set-buffer err-buffer)
- (goto-char (point-min))
- (setq mesg (buffer-substring (point-min) (- (point-max) 1)))
- (search-forward "problem report sent" nil t))
- (progn (message mesg)
- (kill-buffer err-buffer)
- (delete-auto-save-file-if-necessary)
- (set-buffer-modified-p nil)
- (bury-buffer))
- (pop-to-buffer err-buffer))
- ))))
+ (save-buffer)
+ (message "Exit emacs to send the PR."))))
;;;;---------------------------------------------------------------------------
;;;; send-pr:send-pr-mode mode
@@ -346,6 +405,9 @@ if it is not nil."
(make-local-variable 'send-pr:::site)
(make-local-variable 'send-pr:::categories)
(make-local-variable 'send-pr:::err-buffer)
+ (make-local-variable 'send-pr:::spawn-to-send)
+ (make-local-variable 'send-pr:::sent)
+ (setq send-pr:::sent nil)
(make-local-variable 'paragraph-separate)
(setq paragraph-separate (concat (default-value 'paragraph-separate)
"\\|" gnats::keyword "[ \t\n\f]*$"))
@@ -359,10 +421,12 @@ if it is not nil."
;;;; Functions to read and replace field values.
;;;;---------------------------------------------------------------------------
-(defun gnats::position-on-field (field)
+(defun gnats::position-on-field (field &optional quiet)
(goto-char (point-min))
(if (not (re-search-forward (concat "^>" field ":") nil t))
- (error "Field `>%s:' not found." field)
+ (if quiet
+ nil
+ (error "Field `>%s:' not found." field))
(re-search-forward "[ \t\n\f]*")
(if (looking-at gnats::keyword)
(backward-char 1))
@@ -385,7 +449,7 @@ if it is not nil."
(let (pos)
(unwind-protect
(save-excursion
- (if (not (gnats::position-on-field field))
+ (if (not (gnats::position-on-field field t))
nil
(setq pos (point-marker))
(if (or (looking-at "<.*>$") (eolp))
@@ -470,20 +534,22 @@ arguments of the field to change and the default value to use."
new)
(if (null old)
(error "ACK")
- (let ((prompt (concat ">" field ": "))
- (domain (gnats::field-values field))
- (type (gnats::field-type field))
- (action (gnats::field-action field)))
- (or default (setq default (gnats::field-default field)))
- (setq new (if (eq type 'enum)
+ (if (or (interactive-p) t)
+ (let ((prompt (concat ">" field ": "))
+ (domain (gnats::field-values field))
+ (type (gnats::field-type field)))
+ (or default (setq default (gnats::field-default field)))
+ (setq new
+ (if (eq type 'enum)
(completing-read prompt domain nil t
(if gnats::emacs-19p (cons default 0)
default))
(read-string prompt (if gnats::emacs-19p (cons default 1)
- default))))
- (gnats::set-field field new)
- (funcall action field old new)
- new))))
+ default)))))
+ (setq new default))
+ (gnats::set-field field new)
+ (funcall (gnats::field-action field) field old new)
+ new)))
(defun gnats::set-field (field value)
(save-excursion
@@ -693,7 +759,8 @@ the whole string is returned."
(setq exec-path (save-excursion (set-buffer err-buffer)
(prin1 exec-path err-buffer)
(goto-char (point-min))
- (replace-string "//" "/")
+ (while (search-forward "//" nil t)
+ (replace-match "/" nil t))
(goto-char (point-min))
(setq ret (read err-buffer))
(kill-buffer err-buffer)
diff --git a/gnu/usr.bin/send-pr/send-pr.1 b/gnu/usr.bin/send-pr/send-pr.1
index 22b250d..1e39eaa 100644
--- a/gnu/usr.bin/send-pr/send-pr.1
+++ b/gnu/usr.bin/send-pr/send-pr.1
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.nh
-.TH SEND-PR 1 3.2 "February 1993"
+.TH SEND-PR 1 3.113 "February 1993"
.SH NAME
send-pr \- send problem report (PR) to a central support site
.SH SYNOPSIS
@@ -49,14 +49,19 @@ send-pr \- send problem report (PR) to a central support site
.B \-L
]
[
-.B \-\-request-id
+.B \-s
+.I severity
]
[
.B \-V
]
.br
[
-.B --version
+.B \-\-version
+]
+[
+.B \-c
+.I address
]
.SH DESCRIPTION
.B send-pr
@@ -108,6 +113,10 @@ then
.B send-pr
reads from standard input.
.TP
+.BI \-s " severity"
+Give the problem report the severity
+.IR severity .
+.TP
.BI \-t " mail-address"
Change mail address at the support site for problem reports. The
default
@@ -118,6 +127,13 @@ Use the
.I site
argument rather than this option in nearly all cases.
.TP
+.BI \-c " address"
+Put
+.I address
+in the
+.B Cc:
+header of the message.
+.TP
.B \-P
print the form specified by the environment variable
.B PR_FORM
@@ -128,19 +144,6 @@ is not set, print the standard blank PR template. No mail is sent.
.B \-L
print the list of available categories. No mail is sent.
.TP
-.B \-\-request\-id
-sends mail to the default support site, or
-.I site
-if specified, with a request for your
-.IR submitter-id .
-If you are
-not affiliated with
-.IR site ,
-use a
-.I submitter-id
-of
-.BR net \|'.
-.TP
.B \-V
Display the
.B send-pr
diff --git a/gnu/usr.bin/send-pr/send-pr.sh b/gnu/usr.bin/send-pr/send-pr.sh
index 471f9d5..333f86a 100644
--- a/gnu/usr.bin/send-pr/send-pr.sh
+++ b/gnu/usr.bin/send-pr/send-pr.sh
@@ -2,7 +2,7 @@
# Submit a problem report to a GNATS site.
# Copyright (C) 1993 Free Software Foundation, Inc.
# Contributed by Brendan Kehoe (brendan@cygnus.com), based on a
-# version written by Heinz G. Seidl (hgs@ide.com).
+# version written by Heinz G. Seidl (hgs@cygnus.com).
#
# This file is part of GNU GNATS.
#
@@ -23,7 +23,7 @@
# $FreeBSD$
# The version of this send-pr.
-VERSION=3.2
+VERSION=3.113
# The submitter-id for your site.
# "current-users" is the only allowable value for FreeBSD.
@@ -58,6 +58,9 @@ GNATS_SITE=freefall
# host-dependent.
MAIL_AGENT="${MAIL_AGENT:-/usr/sbin/sendmail -oi -t}"
+# How to read the passwd database.
+PASSWD="cat /etc/passwd"
+
ECHON=bsd
if [ $ECHON = bsd ] ; then
@@ -73,8 +76,13 @@ fi
#
-if [ -z "$LOGNAME" -a -n "$USER" ]; then
- LOGNAME=$USER
+# find a user name
+if [ "$LOGNAME" = "" ]; then
+ if [ "$USER" != "" ]; then
+ LOGNAME="$USER"
+ else
+ LOGNAME="UNKNOWN"
+ fi
fi
FROM="$LOGNAME"
@@ -85,21 +93,11 @@ if [ -n "$NAME" ]; then
ORIGINATOR="$NAME"
elif [ -f $HOME/.fullname ]; then
ORIGINATOR="`sed -e '1q' $HOME/.fullname`"
-elif [ -f /bin/domainname ]; then
- if [ "`/bin/domainname`" != "" -a -f /usr/bin/ypcat ]; then
- PTEMP=`mktemp -t p` || exit 1
- # Must use temp file due to incompatibilities in quoting behavior
- # and to protect shell metacharacters in the expansion of $LOGNAME
- /usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" |
- cut -f5 -d':' | sed -e 's/,.*//' > $PTEMP
- ORIGINATOR="`cat $PTEMP`"
- rm -f $PTEMP
- fi
-fi
-
-if [ "$ORIGINATOR" = "" ]; then
+else
PTEMP=`mktemp -t p` || exit 1
- grep "^$LOGNAME:" /etc/passwd | cut -f5 -d':' | sed -e 's/,.*//' > $PTEMP
+ # Must use temp file due to incompatibilities in quoting behavior
+ # and to protect shell metacharacters in the expansion of $LOGNAME
+ $PASSWD | grep "^$LOGNAME:" | awk -F: '{print $5}' | sed -e 's/,.*//' > $PTEMP
ORIGINATOR="`cat $PTEMP`"
rm -f $PTEMP
fi
@@ -134,9 +132,12 @@ ARCH=`[ -f /bin/arch ] && /bin/arch`
MACHINE=`[ -f /bin/machine ] && /bin/machine`
COMMAND=`echo $0 | sed -e 's,.*/,,'`
-USAGE="Usage: $COMMAND [-PVL] [-t address] [-f filename] [--version]"
+USAGE="Usage: $COMMAND [-PVL] [-t address] [-f filename] [-s severity]
+ [-c address] [--version]"
REMOVE=
BATCH=
+CC=
+SEVERITY_C=
while [ $# -gt 0 ]; do
case "$1" in
@@ -153,6 +154,12 @@ while [ $# -gt 0 ]; do
fi
;;
-b | --batch) BATCH=true ;;
+ -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"
+ ;;
-p | -P | --print) PRINT=true ;;
-L | --list) FORMAT=norm ;;
-l | -CL | --lisp) FORMAT=lisp ;;
@@ -175,7 +182,7 @@ while [ $# -gt 0 ]; do
shift
done
-if [ -n "$USER_GNATS_SITE" ]; then
+if [ -n "$USER_GNATS_SITE" ] && [ "$USER_GNATS_SITE" != "$GNATS_SITE" ]; then
GNATS_SITE=$USER_GNATS_SITE
GNATS_ADDR=$USER_GNATS_SITE-gnats
fi
@@ -214,24 +221,21 @@ case "$FORMAT" in
;;
esac
-CATEGORY_C=`echo "$CATEGORIES" | \
- awk 'BEGIN { ORS=""; print "<[ " }
- FNR > 1 { print " | " }
- { print }
- END { print " ]>" }`
-
-ORIGINATOR_C='<Name of the PR author (one line)>'
-ORGANIZATION_C='<Organization of PR author (multiple lines)>'
+ORIGINATOR_C='<name of the PR author (one line)>'
+ORGANIZATION_C='<organization of PR author (multiple lines)>'
CONFIDENTIAL_C='no <FreeBSD PRs are public data>'
-SYNOPSIS_C='<Synopsis of the problem (one line)>'
-SEVERITY_C='<[ non-critical | serious | critical ] (one line)>'
+SYNOPSIS_C='<synopsis of the problem (one line)>'
+if [ -z "$SEVERITY_C" ]; then
+ SEVERITY_C='<[ non-critical | serious | critical ] (one line)>'
+fi
PRIORITY_C='<[ low | medium | high ] (one line)>'
+CATEGORY_C='<choose from the list of categories above (one line)>'
CLASS_C='<[ sw-bug | doc-bug | change-request ] (one line)>'
-RELEASE_C='<Release number or tag (one line)>'
-ENVIRONMENT_C='<Relevant environment information (multiple lines)>'
-DESCRIPTION_C='<Precise description of the problem (multiple lines)>'
-HOW_TO_REPEAT_C='<Code/input/activities to reproduce the problem (multiple lines)>'
-FIX_C='<How to correct or work around the problem, if known (multiple lines)>'
+RELEASE_C='<release number or tag (one line)>'
+ENVIRONMENT_C='<machine, os, target, libraries (multiple lines)>'
+DESCRIPTION_C='<precise description of the problem (multiple lines)>'
+HOW_TO_REPEAT_C='<code/input/activities to reproduce the problem (multiple lines)>'
+FIX_C='<how to correct or work around the problem, if known (multiple lines)>'
# Create temporary files, safely
REF=`mktemp -t pf` || exit 1
@@ -281,7 +285,6 @@ SEND-PR: will all comments (text enclosed in `<' and `>').
SEND-PR:
SEND-PR: Please consult the send-pr man page `send-pr(1)' or the Texinfo
SEND-PR: manual if you are not sure how to fill out a problem report.
-SEND-PR:
SEND-PR: Note that the Synopsis field is mandatory. The Subject (for
SEND-PR: the mail) will be made the same as Synopsis unless explicitly
SEND-PR: changed.
@@ -302,42 +305,38 @@ __EOF__
if ((++i % '$c') == 0) { printf "\nSEND-PR: " } }
END { printf "\nSEND-PR:\n"; }' >> $file
-
-
cat >> $file << __EOF__
To: $GNATS_ADDR
Subject:
From: $FROM
Reply-To: $REPLY_TO
+Cc: $CC
X-send-pr-version: $VERSION
-
-
->Submitter-Id: $SUBMITTER
->Originator: $ORIGINATOR
->Organization: ${ORGANIZATION-$ORGANIZATION_C}
->Confidential: $CONFIDENTIAL_C
->Synopsis: $SYNOPSIS_C
->Severity: $SEVERITY_C
->Priority: $PRIORITY_C
->Category: $CATEGORY_C
->Release: ${DEFAULT_RELEASE-$RELEASE_C}
->Class: $CLASS_C
->Environment:
-
+X-GNATS-Notify:
+
+
+>Submitter-Id: $SUBMITTER
+>Originator: $ORIGINATOR
+>Organization: ${ORGANIZATION-$ORGANIZATION_C}
+>Confidential: $CONFIDENTIAL_C
+>Synopsis: $SYNOPSIS_C
+>Severity: $SEVERITY_C
+>Priority: $PRIORITY_C
+>Category: $CATEGORY_C
+>Class: $CLASS_C
+>Release: ${DEFAULT_RELEASE-$RELEASE_C}
+>Environment:
+`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
+`[ -n "$ARCH" ] && echo Architecture: $ARCH`
+`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
$ENVIRONMENT_C
-
->Description:
-
+>Description:
$DESCRIPTION_C
-
->How-To-Repeat:
-
+>How-To-Repeat:
$HOW_TO_REPEAT_C
-
->Fix:
+>Fix:
$FIX_C
-
__EOF__
done
@@ -430,9 +429,8 @@ while true; do
""|sw-bug|doc-bug|change-request) CNT=`expr $CNT + 1` ;;
*) echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
esac
-
#
- # 6) Check that Synopsis is not empty
+ # 6) Check that synopsis is not empty
#
if grep "^>Synopsis:[ ]*${SYNOPSIS_C}\$" $TEMP > /dev/null
then
OpenPOWER on IntegriCloud