]> granicus.if.org Git - neomutt/commitdiff
Restore muttbug
authorBrendan Cully <brendan@kublai.com>
Sun, 1 Apr 2007 21:58:53 +0000 (14:58 -0700)
committerBrendan Cully <brendan@kublai.com>
Sun, 1 Apr 2007 21:58:53 +0000 (14:58 -0700)
doc/muttbug.man
muttbug.sh.in

index 695bdf006edeb07f6d7adc776dd63c7700c6f6e9..bad7b87702efb94ea6f62d81cbe91f1931e76283 100644 (file)
 .\"     along with this program; if not, write to the Free Software
 .\"     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 .\"
-.TH flea 1 "January 2005" Unix "User Manuals"
+.TH flea 1 "July 2000" Unix "User Manuals"
 .SH NAME
-flea \- Report a bug (or rather a flea) in mutt. (OBSOLETE)
+flea \- Report a bug (or rather a flea) in mutt.
+.SH SYNOPSIS
+.PP
+.B flea
 .SH DESCRIPTION
 .PP
 .B flea
-used to be a shell script which helped you to submit a bug report against the 
+is a shell script which helps you to submit a bug report against the 
 .BR mutt (1)
 mail user agent.
 .PP
-The mutt bug tracking system broke down under the spam thrown at it and
-was shut down in January 2005.  To report a bug in mutt, please use
-your system's bug reporting system if mutt came as part of your
-system, or refer to the mutt web site at
-.I http://www.mutt.org
-for more information.
+If you invoke 
+.BR flea , 
+you'll first be prompted for a short
+description of the problem you experience.  This will be used as the
+bug report's subject line, so it should be concise, but informative.
+.PP
+You are then asked to assign an initial severity level to the
+problem you observe; 
+.B flea
+will give you a description which severity level is appropriate or
+not.
+.PP
+Then, you are asked for the location of a core dump (normally named
+.BR core )
+which may have been left over by a crash of your 
+.BR mutt (1).
+You can just type \(lqno\(rq here, or you can enter the path leading 
+to a core dump.
+.B flea
+will try to use either
+.BR sdb (1),
+.BR dbx (1),
+or
+.BR gdb (1)
+to extract some information from this core dump which may be helpful
+to developers in order to determine the reason for the crash.
+.PP
+Finally, you are asked whether or not you want to include personal
+and system 
+.BR mutt (1)
+configuration files with the bug report.  If at all possible, we
+urge you to answer these questions with \(lqyes\(rq, since a
+reference configuration makes it incredibly easier to track down a
+problem.
 .PP
+If you are using Debian GNU/Linux,
 .B flea
-is now a shell script that prints a short error message and exits.
+will now check whether or not 
+.B mutt
+has been installed as a Debian
+package on your system, and suggest to file the bug against the
+.BR mutt (1)
+and Debian bug tracking systems.  This option was added since the 
+.BR mutt (1)
+project uses another instantiation of the Debian bug tracking
+system, so submitting bugs against both systems in one pass is
+simple.
+.PP
+You are then dropped into your favorite editor as determined by the 
+.B EDITOR
+and
+.B VISUAL
+environment variables.  
+.PP
+Please give us details about the problem in the empty space below
+the line reading \(lqPlease type your report below this line\(rq.
+We are most interested in precise information on what symptoms you
+observe and what steps may be used to reproduce the bug.  Chances
+are that problems which can easily be reproduced will be fixed
+quickly.  So please take some time when filling out this part of the
+template.
+.PP
+The remainder of the template contains various kinds of information
+gathered from your system, including output of the
+.BR uname (1)
+command, output from
+.BR mutt (1)
+itself, and your system's 
+.BR mutt (1)
+configuration files.  You may wish to browse through this part of
+the bug report form in order to avoid leaking confidential
+information to the public.
+.PP
+If you leave the editor, 
+.B flea
+will give you the option to review, re-edit, submit, or abandon your
+bug report.  If you decide to submit it, a mail message containing
+your report will be sent to <submit@bugs.guug.de>.  You'll receive a
+copy of this message.
+.PP
+While your bug report is being processed by the bug tracking system,
+you will receive various e-mail messages from the bug tracking
+system informing you about what's going on: Once your bug report has
+been entered into the bug tracking system, it will be assigned a
+unique serial number about which you are informed via e-mail.  If
+you wish to submit additional information about the bug, you can
+just send it to the address
+.BR \fIserial\fP@bugs.guug.de .
+.PP
+Later, you will most likely receive questions from the developers
+about the problem you observed, and you will eventually be informed
+that your bug report has been closed.  This means that the bug has
+been fixed at least in the
+.BR cvs (1)
+repository.  If the answers you receive don't satisfy you, don't
+hesitate to contact the developers directly under
+.BR mutt-dev@mutt.org.
+.PP
+You can also browse your bug report and all additional information
+and replies connected to it using the bug tracking system's Web
+interface under the following URL:
+http://bugs.guug.de/
+.SH
+ENVIRONMENT
+.PP
+.B flea
+will use the following environment variables:
+.IP "EMAIL"
+Your electronic mail address.  Will be used to set the bug report's
+From header, and to send you a copy of the report.
+.IP "LOGNAME"
+Your login name.  If the
+.B EMAIL
+environment variable isn't set, this will be used instead to send
+you a copy of the report.  Setting the sender will be left to 
+.BR sendmail (1)
+on your system.
+.IP "REPLYTO"
+If set, the bug report will contain a Reply-To header with the
+e-mail address contained in this environment variable.
+.IP "ORGANIZATION"
+If set, the bug report will contain an Organization header with the
+contents of this environment variable.
+.IP "PAGER"
+If set, this environment variable will be expected to contain the
+path to your favorite pager for viewing the bug report.  If unset, 
+.BR more (1)
+will be used.
+.IP "VISUAL"
+If set, this environment variable will be expected to contain the
+path to your favorite visual editor.
+.IP "EDITOR"
+If set, this environment variable will be expected to contain the
+path to your favorite editor.  This variable is examined if and only
+if the 
+.B VISUAL
+environment variable is unset.  If
+.B EDITOR
+is unset, 
+.BR vi (1)
+will be used to edit the bug report.
+.SH
+FILES
+.PP
+.IP "core"
+If present, this file may contain a post-mortem memory dump of mutt.
+It will be inspected using the debugger installed on your system.
+.SH 
+SEE ALSO
+.PP
+.BR dbx (1),
+.BR gdb (1),
+.BR lynx (1),
+.BR mutt (1),
+.BR muttrc (5),
+.BR sdb (1),
+.BR sendmail (1),
+.BR uname (1),
+.BR vi (1)
+.PP
+The mutt bug tracking system: http://bugs.guug.de/
 .SH
 AUTHOR
 .PP
index 80b37053a89455c89a4fff8e1c30ee1f62f2b7d9..52886b2ac5745c6b33fdfd497e40016ad98251bf 100644 (file)
 #     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 #
 
-exec >&2
+SUBMIT="submit@bugs.guug.de"
+DEBIAN_SUBMIT="submit@bugs.debian.org"
 
-echo "$0: No bug tracking system."
+prefix=@prefix@
 
-cat << EOF
+DEBUGGER=@DEBUGGER@
+SENDMAIL=@SENDMAIL@
+sysconfdir=@sysconfdir@
+pkgdatadir=@pkgdatadir@
 
-The mutt bug tracking system has broken down under the spam sent to
-it, and has been shut down.  While we are working on a new bug
-database, please use your system's default bug submission mechanism
-if mutt came as part of your system, or submit your bug reports
-directly to one of the mailing lists linked from http://www.mutt.org/.
+include_file ()
+{
+       echo
+       echo "--- Begin $1"
+       sed -e 's/^-/- -/' $1 | egrep -v '^[    ]*(#|$)'
+       echo "--- End $1"
+       echo
+}
 
-Please pardon our dust.
+debug_gdb ()
+{
+       cat << EOF > $SCRATCH/gdb.rc
+bt
+list
+quit
 EOF
+       $DEBUGGER -n -x $SCRATCH/gdb.rc -c $CORE mutt
+}
+
+debug_dbx ()
+{
+       cat << EOF > $SCRATCH/dbx.rc
+where
+list
+quit
+EOF
+       $DEBUGGER -s $SCRATCH/dbx.rc mutt $CORE
+}
+
+debug_sdb ()
+{
+       cat << EOF > $SCRATCH/sdb.rc
+t
+w
+q
+EOF
+       $DEBUGGER mutt $CORE < $SCRATCH/sdb.rc
+}
+
+case `echo -n` in
+"") n=-n; c=   ;;
+ *) n=; c='\c' ;;
+esac
+
+exec > /dev/tty
+exec < /dev/tty
+
+SCRATCH=${TMPDIR-/tmp}/`basename $0`.`hostname`.$$
+
+mkdir ${SCRATCH} || \
+{ 
+       echo "`basename $0`: Can't create temporary directory." >& 2 ; 
+       exit 1 ; 
+}
+
+trap "rm -r -f ${SCRATCH} ; trap '' 0 ; exit" 0 1 2
+
+TEMPLATE=${SCRATCH}/template.txt
+
+if test -z "$EMAIL" ; then
+       EMAIL="`mutt -Q from 2> /dev/null | sed -e 's/^from=.\(.*\).$/\1/'`"
+fi
+
+echo "Please enter your e-mail address [$EMAIL]:"
+echo $n "> $c"
+read EMAILTMP
+
+if test -n "$EMAILTMP" ; then
+       EMAIL="$EMAILTMP"
+fi
+
+echo "Please enter a one-line description of the problem you experience:"
+echo $n "> $c"
+read SUBJECT
+
+cat <<EOF  
+What should the severity for this bug report be?
+
+       0) Feature request, or maybe a bug which is very difficult to
+       fix due to major design considerations.
+
+       1) The package fails to perform correctly in some conditions,
+       or on some systems, or fails to comply with current policy
+       documents. Most bugs are in this category.
+
+       2) This bug makes this version of the package unsuitable for
+       a stable release.
+
+       3) Dangerous bug. Makes the package in question unusable by
+       anyone or mostly so, or causes data loss, or introduces a
+       security hole allowing access to the accounts of users who
+       use the package.
+
+       4) Critical bug. Makes unrelated software on the system (or
+       the whole system) break, or causes serious data loss, or
+       introduces a security hole on systems where you install the
+       package.
+
+EOF
+echo $n "Severity? [01234] $c"
+read severity
+case "$severity" in
+0|[Ww]) severity=wishlist  ;;
+2|[Ii]) severity=important ;;
+3|[Gg]) severity=grave     ;;
+4|[Cc]) severity=critical  ;;
+     *) severity=normal    ;;
+esac
+
+if test -x $DEBUGGER ; then
+       test -f core && CORE=core
+       echo "If mutt has crashed, it may have saved some program state in"
+       echo "a file named core.  We can include this information with the bug"
+       echo "report if you wish so."
+       echo "Do you want to include information gathered from a core file?"
+       echo "If yes, please enter the path - otherwise just say no: [$CORE]"
+       echo $n "> $c"
+       read _CORE
+       test "$_CORE" && CORE="$_CORE"
+fi
+
+echo $n "Do you want to include your personal mutt configuration files? [Y|n] $c"
+read personal
+case "$personal" in
+[nN]*)  personal=no  ;;
+    *)  personal=yes ;;
+esac
+
+echo $n "Do you want to include your system's global mutt configuration file? [Y|n] $c"
+read global
+case "$global" in
+[nN]*)  global=no  ;;
+    *) global=yes ;;
+esac
+
+if test -f /etc/debian_version ; then
+       DEBIAN=yes
+       echo $n "Checking whether mutt has been installed as a package... $c"
+       DEBIANVERSION="`dpkg -l mutt | grep '^[ih]' | awk '{print $3}'`" 2> /dev/null
+       if test "$DEBIANVERSION" ; then
+               DPKG=yes
+       else
+               DPKG=no
+               unset DEBIANVERSION
+       fi
+       echo "$DPKG"
+       echo $n "File this bug with Debian? [Y|n] $c"
+       read DPKG
+       case "$DPKG" in
+       [nN])   DPKG=no ;;
+       *)      DPKG=yes ;;
+       esac
+else
+       DEBIAN=no
+       DPKG=no
+fi
+
+if rpm -q mutt > /dev/null 2> /dev/null ; then
+       echo "Mutt seems to come from an RPM package."
+       RPMVERSION="`rpm -q mutt`"
+       RPMPACKAGER="`rpm -q -i mutt | sed -n -e 's/^Packager *: *//p'`"
+fi
+
+MUTTVERSION="`mutt -v | awk '{print $2; exit; }'`"
+test "$DPKG" = "yes" && SUBMIT="$SUBMIT, $DEBIAN_SUBMIT"
+
+exec > ${TEMPLATE}
+
+test "$EMAIL"        && echo "From: $EMAIL"
+test "$REPLYTO"      && echo "Reply-To: $REPLYTO"
+test "$ORGANIZATION" && echo "Organization: $ORGANIZATION"
+
+echo "Subject: mutt-$MUTTVERSION: $SUBJECT"
+echo "To: $SUBMIT"
+test "$EMAIL"       && echo "Bcc: ${EMAIL}"
+echo
+echo "Package: mutt"
+echo "Version: ${DEBIANVERSION-${RPMVERSION-$MUTTVERSION}}"
+echo "Severity: $severity"
+echo 
+echo "-- Please type your report below this line"
+echo
+echo
+echo
+
+if test "$DEBIAN" = "yes" ; then
+       echo "Obtaining Debian-specific information..." > /dev/tty
+       bug -p -s dummy mutt < /dev/null 2> /dev/null |        \
+               sed -n -e "/^-- System Information/,/^---/p" | \
+               grep -v '^---'
+else
+       echo "-- System Information"
+       echo "System Version: `uname -a`"
+       test -z "$RPMPACKAGER" || echo "RPM Packager: $RPMPACKAGER";
+       test -f /etc/redhat-release && echo "RedHat Release: `cat /etc/redhat-release`"
+       test -f /etc/SuSE-release && echo "SuSE Release: `sed 1q /etc/SuSE-release`"
+       # Please provide more of these if you have any.
+fi
+
+echo 
+echo "-- Build environment information"
+echo
+echo "(Note: This is the build environment installed on the system"
+echo "muttbug is run on.  Information may or may not match the environment"
+echo "used to build mutt.)"
+echo
+echo "- gcc version information"
+echo "@CC@"
+@CC@ -v 2>&1
+echo
+echo "- CFLAGS"
+echo @CFLAGS@
+
+
+echo
+echo "-- Mutt Version Information"
+echo
+mutt -v
+
+if test "$CORE" && test -f "$CORE" ; then
+       echo 
+       echo "-- Core Dump Analysis Output"
+       echo
+
+       case "$DEBUGGER" in
+               *sdb) debug_sdb $CORE ;;
+               *dbx) debug_dbx $CORE ;;
+               *gdb) debug_gdb $CORE ;;
+       esac
+       
+       echo
+fi
+
+if test "$personal" = "yes" ; then
+       CANDIDATES=".muttrc-${MUTTVERSION} .muttrc .mutt/muttrc-${MUTTVERSION} .mutt/muttrc"
+       MATCHED="none"
+       for f in $CANDIDATES; do
+               if test -f "${HOME}/$f" ; then
+                       MATCHED="${HOME}/$f"
+                       break
+               fi
+       done
+       
+       if test "$MATCHED" = "none" ; then
+               echo "Warning: Can't find your personal .muttrc." >&2
+       else
+               include_file $MATCHED
+       fi
+fi
+
+
+if test "$global" = "yes" ; then
+       CANDIDATES="Muttrc-${MUTTVERSION} Muttrc"
+       DIRECTORIES="$sysconfdir $pkgdatadir"
+       MATCHED="none"
+       for d in $DIRECTORIES ; do
+               for f in $CANDIDATES; do
+                       if test -f $d/$f ; then
+                               MATCHED="$d/$f"
+                               break
+                       fi
+               done
+               test "$MATCHED" = "none" || break
+       done
+       
+       if test "$MATCHED" = "none" ; then
+               echo "Warning: Can't find global Muttrc." >&2
+       else
+               include_file $MATCHED
+       fi
+fi
+
+exec > /dev/tty
+
+cp $TEMPLATE $SCRATCH/mutt-bug.txt
+
+input="e"
+while : ; do
+       if test "$input" = "e" ; then
+               ${VISUAL-${EDITOR-vi}} $SCRATCH/mutt-bug.txt
+               if cmp $SCRATCH/mutt-bug.txt ${TEMPLATE} > /dev/null ; then
+                       echo "Warning: Bug report was not modified!"
+               fi
+       fi
+       
+       echo $n "Submit, Edit, View, Quit? [S|e|v|q] $c"
+       read _input
+       input="`echo $_input | tr EVSQ evsq`"
+       case $input in
+       e*)     ;;
+       v*)     ${PAGER-more} $SCRATCH/mutt-bug.txt ;;
+       s*|"")  $SENDMAIL -t < $SCRATCH/mutt-bug.txt ; exit ;;
+       q*)     exit
+       esac
+done
 
-exit 1