mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 18:23:41 +08:00
0c5ecdc449
Mon Jan 20 03:02:50 1997 Ulrich Drepper <drepper@cygnus.com> * Make-dist: Update and reformat copyright. * Makeconfig: Likewise. * assert/Makefile: Likewise. * bare/Makefile: Likewise. * ctype/Makefile: Likewise. * dirent/Makefile: Likewise. * gmon/Makefile: Likewise. * gnulib/Makefile: Likewise. * grp/Makefile: Likewise. * hurd/Makefile: Likewise. * intl/Makefile: Likewise. * mach/Makefile: Likewise. * malloc/Makefile: Likewise. * manual/Makefile: Likewise. * math/Makefile: Likewise. * po/Makefile: Likewise. * pwd/Makefile: Likewise. * resource/Makefile: Likewise. * setjmp/Makefile: Likewise. * socket/Makefile: Likewise. * string/Makefile: Likewise. * sunrpc/Makefile: Likewise. * sysdeps/alpha/Makefile: Likewise. * sysdeps/gnu/Makefile: Likewise. * sysdeps/m68k/fpu/switch/Makefile: Likewise. * sysdeps/m68k/fpu/switch/68881-sw.h: Likewise. * sysdeps/m68k/fpu/switch/switch.c: Likewise. * sysdeps/mach/Makefile: Likewise. * sysdeps/hurd/Makefile: Likewise. * sysdeps/sparc/Makefile: Likewise. * sysdeps/standalone/i960/nindy960/Makefile: Likewise. * sysdeps/standalone/m68k/m68020/mvme136/Makefile: Likewise. * sysdeps/unix/common/Makefile: Likewise. * sysdeps/unix/sysv/Makefile: Likewise. * sysdeps/unix/sysv/irix4/Makefile: Likewise. * sysdeps/unix/sysv/sco3.2/Makefile: Likewise. * sysdeps/unix/sysv/sysv4/Makefile: Likewise. * sysdeps/vax/Makefile: Likewise. * sysvipc/Makefile: Likewise. * wcsmbs/Makefile: Likewise. * wctype/Makefile: Likewise. * elf/rtld.c (dl_main): Objects in LD_PRELOAD environment variable are separated according to Sun docs by white space not colon. * locale/C-time.c (_nl_C_LC_TIME): Use empty string to initialize fields which are not defined for the C locale. * sysdeps/m68k/fpu/switch/Makefile: Don't use ansidecl.h in constructed files. * sysdeps/m68k/fpu/switch/68881-sw.h: Likewise. * sysdeps/m68k/fpu/switch/switch.c: Likewise. Sun Jan 19 19:43:31 1997 Andreas Jaeger <aj@arthur.pfalz.de> * time/strptime.c: Provide prototype for strptime_internal. Sun Jan 19 23:46:27 1997 Ulrich Drepper <drepper@cygnus.com> * glibcbug.in: We don't guarantee confidential handling. Set field to always contain `no'. Sun Jan 19 21:28:01 1997 Philippe De Muyter <phdm@info.ucl.ac.be> * intl/explodename.c: Include sys/types.h. * intl/l10nflist.c: Likewise. Sat Jan 18 22:15:26 1997 Richard Henderson <rth@tamu.edu> * config.make.in (install_root): New variable to make it easy to install glibc somewhere other than /. * shlib-versions: alpha-*-linux-* libc=6.1. Since sigset_t no longer fits in a register, we can't pass in the thread's initial mask so easily. Take this opportunity to simplify the clone implementation by only accepting a single void* argument. * sysdeps/unix/sysv/linux/alpha/clone.S: Only take one argument. * sysdeps/unix/sysv/linux/i386/clone.S: Likewise. * sysdeps/unix/sysv/linux/m68k/clone.S: Likewise. * sysdeps/unix/sysv/linux/sparc/clone.S: Likewise. * sysdeps/unix/sysv/linux/schedbits.h: Update clone prototypes. * sysdeps/unix/sysv/linux/alpha/ioctl-types.h: Remove. Default Linux version should be sufficient. * sysdeps/unix/sysv/linux/alpha/sigprocmask.c: The osf_sigprocmask system call wants the sigset dereferenced. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Add entries for __syscall_ustat and __syscall_xmknod. * sysdeps/unix/sysv/linux/alpha/xmknod.c: Include sys/sysmacros.h. * sysdeps/unix/sysv/linux/sigset.h: Use longs instead of ints. * sysdeps/unix/sysv/linux/tcsetattr.c: Fix pointer dereferences. * sysdeps/unix/sysv/linux/alpha/sigsuspend.c: Add comment about dependency to kernel type. * sysdeps/unix/sysv/linux/alpha/termbits.h: Correct comment.
245 lines
5.9 KiB
Bash
245 lines
5.9 KiB
Bash
#! /bin/sh
|
||
#
|
||
# glibcbug - create a bug report and mail it to the bug address.
|
||
#
|
||
# configuration section:
|
||
# these variables are filled in by configure
|
||
#
|
||
VERSION="@VERSION@"
|
||
BUGGLIBC="bugs@gnu.ai.mit.edu"
|
||
ADDONS="@subdirs@"
|
||
|
||
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
|
||
export PATH
|
||
|
||
TEMP=/tmp/glibcbug.$$
|
||
|
||
BUGADDR=${1-$BUGGLIBC}
|
||
ENVIRONMENT=`uname -a`
|
||
|
||
: ${EDITOR=emacs}
|
||
|
||
: ${USER=${LOGNAME-`whoami`}}
|
||
|
||
trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15
|
||
trap 'rm -f $TEMP $TEMP.x' 0
|
||
|
||
|
||
# How to read the passwd database.
|
||
PASSWD="cat /etc/passwd"
|
||
|
||
if [ -f /usr/lib/sendmail ] ; then
|
||
MAIL_AGENT="/usr/lib/sendmail -oi -t"
|
||
elif [ -f /usr/sbin/sendmail ] ; then
|
||
MAIL_AGENT="/usr/sbin/sendmail -oi -t"
|
||
else
|
||
MAIL_AGENT=rmail
|
||
fi
|
||
|
||
# Figure out how to echo a string without a trailing newline
|
||
N=`echo 'hi there\c'`
|
||
case "$N" in
|
||
*c) ECHON1='echo -n' ECHON2= ;;
|
||
*) ECHON1=echo ECHON2='\c' ;;
|
||
esac
|
||
|
||
# Find out the name of the originator of this PR.
|
||
if [ -n "$NAME" ]; then
|
||
ORIGINATOR="$NAME"
|
||
elif [ -f $HOME/.fullname ]; then
|
||
ORIGINATOR="`sed -e '1q' $HOME/.fullname`"
|
||
else
|
||
# 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/,.*//' > $TEMP
|
||
ORIGINATOR="`cat $TEMP`"
|
||
rm -f $TEMP
|
||
fi
|
||
|
||
if [ -n "$ORGANIZATION" ]; then
|
||
if [ -f "$ORGANIZATION" ]; then
|
||
ORGANIZATION="`cat $ORGANIZATION`"
|
||
fi
|
||
else
|
||
if [ -f $HOME/.organization ]; then
|
||
ORGANIZATION="`cat $HOME/.organization`"
|
||
elif [ -f $HOME/.signature ]; then
|
||
ORGANIZATION=`sed -e "s/^/ /" $HOME/.signature; echo ">"`
|
||
fi
|
||
fi
|
||
|
||
# If they don't have a preferred editor set, then use
|
||
if [ -z "$VISUAL" ]; then
|
||
if [ -z "$EDITOR" ]; then
|
||
EDIT=vi
|
||
else
|
||
EDIT="$EDITOR"
|
||
fi
|
||
else
|
||
EDIT="$VISUAL"
|
||
fi
|
||
|
||
# Find out some information.
|
||
SYSTEM=`( [ -f /bin/uname ] && /bin/uname -a ) || \
|
||
( [ -f /usr/bin/uname ] && /usr/bin/uname -a ) || echo ""`
|
||
ARCH=`[ -f /bin/arch ] && /bin/arch`
|
||
MACHINE=`[ -f /bin/machine ] && /bin/machine`
|
||
|
||
ORGANIZATION_C='<organization of PR author (multiple lines)>'
|
||
SYNOPSIS_C='<synopsis of the problem (one line)>'
|
||
SEVERITY_C='<[ non-critical | serious | critical ] (one line)>'
|
||
PRIORITY_C='<[ low | medium | high ] (one line)>'
|
||
CLASS_C='<[ sw-bug | doc-bug | change-request | support ] (one line)>'
|
||
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)>'
|
||
|
||
|
||
cat > $TEMP <<EOF
|
||
SEND-PR: -*- send-pr -*-
|
||
SEND-PR: Lines starting with \`SEND-PR' will be removed automatically, as
|
||
SEND-PR: will all comments (text enclosed in \`<' and \`>').
|
||
SEND-PR:
|
||
From: ${USER}
|
||
To: ${BUGADDR}
|
||
Subject: [50 character or so descriptive subject here (for reference)]
|
||
|
||
>Submitter-Id: <submitter ID>
|
||
>Originator: ${ORIGINATOR}
|
||
>Organization:
|
||
${ORGANIZATION- $ORGANIZATION_C}
|
||
>Confidential: no (the GNU PR database is public)
|
||
>Synopsis: $SYNOPSIS_C
|
||
>Severity: $SEVERITY_C
|
||
>Priority: $PRIORITY_C
|
||
>Category: libc
|
||
>Class: $CLASS_C
|
||
>Release: libc-${VERSION}
|
||
>Environment:
|
||
$ENVIRONMENT_C
|
||
`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
|
||
`[ -n "$ARCH" ] && echo Architecture: $ARCH`
|
||
`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
|
||
`[ -n "$ADDONS" ] && echo Addons: $ADDONS`
|
||
|
||
>Description:
|
||
$DESCRIPTION_C
|
||
>How-To-Repeat:
|
||
$HOW_TO_REPEAT_C
|
||
>Fix:
|
||
$FIX_C
|
||
EOF
|
||
|
||
chmod u+w $TEMP
|
||
cp $TEMP $TEMP.x
|
||
|
||
eval $EDIT $TEMP
|
||
|
||
if cmp -s $TEMP $TEMP.x; then
|
||
echo "File not changed, no bug report submitted."
|
||
exit 1
|
||
fi
|
||
|
||
#
|
||
# Check the enumeration fields
|
||
|
||
# This is a "sed-subroutine" with one keyword parameter
|
||
# (with workaround for Sun sed bug)
|
||
#
|
||
SED_CMD='
|
||
/$PATTERN/{
|
||
s|||
|
||
s|<.*>||
|
||
s|^[ ]*||
|
||
s|[ ]*$||
|
||
p
|
||
q
|
||
}'
|
||
|
||
|
||
while :; do
|
||
CNT=0
|
||
|
||
#
|
||
# 1) Severity
|
||
#
|
||
PATTERN=">Severity:"
|
||
SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||
case "$SEVERITY" in
|
||
""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;;
|
||
*) echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'."
|
||
esac
|
||
#
|
||
# 2) Priority
|
||
#
|
||
PATTERN=">Priority:"
|
||
PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||
case "$PRIORITY" in
|
||
""|low|medium|high) CNT=`expr $CNT + 1` ;;
|
||
*) echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'."
|
||
esac
|
||
#
|
||
# 3) Class
|
||
#
|
||
PATTERN=">Class:"
|
||
CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
|
||
case "$CLASS" in
|
||
""|sw-bug|doc-bug|change-request|support) CNT=`expr $CNT + 1` ;;
|
||
*) echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
|
||
esac
|
||
|
||
[ $CNT -lt 3 ] &&
|
||
echo "Errors were found with the problem report."
|
||
|
||
while :; do
|
||
$ECHON1 "a)bort, e)dit or s)end? $ECHON2"
|
||
read input
|
||
case "$input" in
|
||
a*)
|
||
echo "$COMMAND: problem report saved in $HOME/dead.glibcbug."
|
||
cat $TEMP >> $HOME/dead.glibcbug
|
||
xs=1; exit
|
||
;;
|
||
e*)
|
||
eval $EDIT $TEMP
|
||
continue 2
|
||
;;
|
||
s*)
|
||
break 2
|
||
;;
|
||
esac
|
||
done
|
||
done
|
||
#
|
||
# Remove comments and send the problem report
|
||
# (we have to use patterns, where the comment contains regex chars)
|
||
#
|
||
# /^>Originator:/s;$ORIGINATOR;;
|
||
sed -e "
|
||
/^SEND-PR:/d
|
||
/^>Organization:/,/^>[A-Za-z-]*:/s;$ORGANIZATION_C;;
|
||
/^>Confidential:/s;<.*>;;
|
||
/^>Synopsis:/s;$SYNOPSIS_C;;
|
||
/^>Severity:/s;<.*>;;
|
||
/^>Priority:/s;<.*>;;
|
||
/^>Class:/s;<.*>;;
|
||
/^>Release:/,/^>[A-Za-z-]*:/s;$RELEASE_C;;
|
||
/^>Environment:/,/^>[A-Za-z-]*:/s;$ENVIRONMENT_C;;
|
||
/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;;
|
||
/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;;
|
||
/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
|
||
" $TEMP > $TEMP.x
|
||
|
||
if $MAIL_AGENT $BUGGLIBC < $TEMP.x; then
|
||
echo "$COMMAND: problem report sent"
|
||
xs=0; exit
|
||
else
|
||
echo "$COMMAND: mysterious mail failure, report not sent."
|
||
echo "$COMMAND: problem report saved in $HOME/dead.glibcbug."
|
||
cat $TEMP >> $HOME/dead.glibcbug
|
||
fi
|
||
|
||
exit 0
|