From: Brendan Cully Date: Sun, 1 Apr 2007 21:59:25 +0000 (-0700) Subject: Merge flea restore X-Git-Tag: mutt-1-5-15-rel~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=738791877b82d96f7e6f4be75930c99703fc2169;p=mutt Merge flea restore --- 738791877b82d96f7e6f4be75930c99703fc2169 diff --cc doc/muttbug.man index bad7b877,05303e88..67a23871 --- a/doc/muttbug.man +++ b/doc/muttbug.man @@@ -15,14 -15,11 +15,14 @@@ .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software - .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 diff --cc muttbug.sh.in index 52886b2a,541de1fd..1d95a644 --- a/muttbug.sh.in +++ b/muttbug.sh.in @@@ -24,313 -24,22 +24,313 @@@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software - # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 < $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