This file is indexed.

/usr/bin/octave-bug-3.2.4 is in octave3.2 3.2.4-12.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
#! /bin/sh -
#
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2004,
#               2005, 2006, 2009 John W. Eaton
#
# This file is part of Octave.
# 
# Octave is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at
# your option) any later version.
# 
# Octave is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
# 
# You should have received a copy of the GNU General Public License
# along with Octave; see the file COPYING.  If not, see
# <http://www.gnu.org/licenses/>.

# octave-bug - create a bug report and mail it to the bug-octave
# mailing list.
#
# Patterned after the bashbug script from bash 1.14.

# Configuration:  these variables are filled in when running make to
# compile Octave.

config_opts="'--build=x86_64-linux-gnu' '--prefix=/usr' '--datadir=/usr/share' '--libdir=/usr/lib' '--libexecdir=/usr/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-blas=-lblas-3gf' '--with-lapack=-llapackgf-3' '--with-hdf5' '--with-fftw' '--enable-shared' '--enable-rpath' '--disable-static' 'build_alias=x86_64-linux-gnu' 'CC=gcc' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' 'CPPFLAGS=' 'CXX=g++' 'CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security' 'F77=gfortran' 'FFLAGS=-g -O2'"
VERSION="3.2.4"
SED="/bin/sed"
MACHINE="x86_64-pc-linux-gnu"
F77="gfortran"
FFLAGS="-O2 -g"
FPICFLAG="-fPIC"
FLIBS="-lgfortranbegin -lgfortran"
CPPFLAGS=""
INCFLAGS="-I. -I. -I./liboctave -I./src -I./libcruft/misc"
CC="gcc"
CC_VERSION="4.6.1 (Ubuntu/Linaro 4.6.1-15ubuntu1) "
CFLAGS="-O2 -g"
CPICFLAG="-fPIC"
CXX="g++"
CXX_VERSION="4.6.1"
CXXFLAGS="-O2 -g"
CXXPICFLAG="-fPIC"
LD_CXX="g++"
LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro"
LIBFLAGS="-L."
RLD_FLAG="-Wl,-rpath -Wl,/usr/lib/octave-3.2.4"
LIBS="-lreadline  -lncurses -ldl -lhdf5 -lz -lm "
BLAS_LIBS="-llapack -lblas"
FFTW_LIBS="-lfftw3 -lfftw3f"
LEXLIB=""
LIBGLOB=""
DEFS="-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DOCTAVE_SOURCE=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DSEPCHAR=':' -DSEPCHAR_STR=\":\" -D__NO_MATH_INLINES=1 -DCXX_NEW_FRIEND_TEMPLATE_DECL=1 -DCXX_ISO_COMPLIANT_LIBRARY=1 -DHAVE_PTHREAD=1 -DHAVE_X_WINDOWS=1 -DHAVE_LIBM=1 -DHAVE_QHULL=1 -DHAVE_PCRE_COMPILE=1 -DHAVE_PCRE=1 -DHAVE_REGEXEC=1 -DHAVE_REGEX=1 -DHAVE_ZLIB_H=1 -DHAVE_ZLIB=1 -DHAVE_HDF5_H=1 -DHAVE_HDF5=1 -DHAVE_H5GGET_NUM_OBJS=1 -DHAVE_FFTW3=1 -DHAVE_GLPK_H=1 -DHAVE_GLPK=1 -DHAVE_CURL_CURL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VE_ROUND=1 -DHAVE_TGAMMA=1 -DHAVE_STRFTIME=1 -DHAVE_C99_VSNPRINTF=1 -DHAVE_LIBDL=1 -DHAVE_DLOPEN=1 -DHAVE_DLSYM=1 -DHAVE_DLERROR=1 -DHAVE_DLCLOSE=1 -DHAVE_DLOPEN_API=1 -DENABLE_DYNAMIC_LINKING=1 -DHAVE_TIMEVAL=1 -DHAVE_CMATH_ISNAN=1 -DHAVE_CMATH_ISNANF=1 -DHAVE_CMATH_ISINF=1 -DHAVE_CMATH_ISINFF=1 -DHAVE_CMATH_ISFINITE=1 -DHAVE_CMATH_ISFINITEF=1 -DHAVE_FINITE=1 -DHAVE_ISNAN=1 -DHAVE_ISINF=1 -DHAVE_COPYSIGN=1 -DHAVE_DECL_SIGNBIT=1 -DHAVE_ACOSH=1 -DHAVE_ACOSHF=1 -DHAVE_ASINH=1 -DHAVE_ASINHF=1 -DHAVE_ATANH=1 -DHAVE_ATANHF=1 -DHAVE_ERF=1 -DHAVE_ERFF=1 -DHAVE_ERFC=1 -DHAVE_ERFCF=1 -DHAVE_EXP2F=1 -DHAVE_LOG2=1 -DHAVE_LOG2F=1 -DHAVE_HYPOTF=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_STRUCT_STAT_ST_BLOCKS=1 -DHAVE_STRUCT_STAT_ST_RDEV=1 -DHAVE_STRUCT_TM_TM_ZONE=1 -DHAVE_TM_ZONE=1 -DUSE_READLINE=1 -DEXCEPTION_IN_MATH=1 -DRETSIGTYPE=void -DHAVE_DECL_SYS_SIGLIST=1 -DHAVE_POSIX_SIGNALS=1 -DRETSIGTYPE_IS_VOID=1 -DHAVE_GETRUSAGE=1 -DHAVE_TIMES=1 -DYYTEXT_POINTER=1"

: ${USER=$LOGNAME}

CC_AND_VERSION=
if test -n "$CC_VERSION"; then
  CC_AND_VERSION="$CC, version $CC_VERSION"
fi

CXX_AND_VERSION=
if test -n "$CXX_VERSION"; then
  CXX_AND_VERSION="$CXX, version $CXX_VERSION"
fi

PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:$PATH
export PATH

TEMP=`tempfile`

if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
  if [ -x /usr/bin/editor ]; then
    DEFEDITOR=editor
  elif [ -x /usr/local/bin/ce ]; then
    DEFEDITOR=ce
  elif [ -x /usr/local/bin/emacs ]; then
    DEFEDITOR=emacs
  elif [ -x /usr/contrib/bin/emacs ]; then
    DEFEDITOR=emacs
  elif [ -x /usr/bin/emacs ]; then
    DEFEDITOR=emacs
  elif [ -x /usr/bin/xemacs ]; then
    DEFEDITOR=xemacs
  elif [ -x /usr/contrib/bin/jove ]; then
    DEFEDITOR=jove
  elif [ -x /usr/local/bin/jove ]; then
    DEFEDITOR=jove
  elif [ -x /usr/bin/vi ]; then
    DEFEDITOR=vi
  else
    echo "octave-bug: No default editor found: attempting to use vi" >&2
    DEFEDITOR=vi
  fi
fi

: ${EDITOR=$DEFEDITOR}

if [ -z "$DEFPAGER" ] && [ -z "$PAGER" ]; then
  if [ -x /usr/bin/pager ]; then
    DEFPAGER=pager
  elif [ -x /usr/bin/less ]; then
    DEFPAGER=less
  elif [ -x /bin/less ]; then
    DEFPAGER=less
  elif [ -x /usr/local/bin/less ]; then
    DEFPAGER=less
  elif [ -x /usr/bin/more ]; then
    DEFPAGER=more
  elif [ -x /bin/more ]; then
    DEFPAGER=more
  elif [ -x /usr/bin/pg ]; then
    DEFPAGER=pg
  elif [ -x /bin/pg ]; then
    DEFPAGER=pg
  else
    echo "octave-bug: No default pager found: attempting to use more" >&2
    DEFPAGER=more
  fi
fi

: ${PAGER=$DEFPAGER}

trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15
trap 'rm -f $TEMP $TEMP.x' 0

UN=
if (uname) > /dev/null 2>&1; then
  UN=`uname -a`
fi

HAVE_FMT=false
if (fmt < /dev/null) > /dev/null 2>&1; then
  HAVE_FMT=true
fi

# Check whether to use -n or \c to keep echo from printing a newline
# character.  Stolen from autoconf, which borrowed the idea from dist 3.0.

if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | $SED s/-n/xn/ | grep xn >/dev/null; then
    echo_n=
    echo_c='
'
  else
    echo_n=-n
    echo_c=
  fi
else
  echo_n=
  echo_c='\c'
fi

ss_p=`echo $VERSION | grep "^ss-"`
if test -n "$ss_p"; then
  BUGADDR="maintainers@octave.org"
else
  pretest_p=`echo $VERSION \
    | $SED 's,.*\.\([0-9]*\).*,\1,' \
    | grep -v '\.' \
    | grep '[0-9]'`

  if test -n "$pretest_p" && test "$pretest_p" -ge 90; then
    BUGADDR="maintainers@octave.org"
  else
    BUGADDR="bug@octave.org"
  fi
fi

SUBJECT="[50 character or so descriptive subject here (for reference)]"
if test $# -gt 0; then
  case "$1" in
    -s)
      shift
      if test $# -gt 0; then
        SUBJECT="$1"
        shift
      else
        echo "usage: octave-bug [-s subject]"
        exit 1
      fi
    ;;
  esac
fi

cat > $TEMP << EOF
To: $BUGADDR
EOF
if test -n "$USER"; then
cat >> $TEMP << EOF
Cc: $USER
EOF
fi
cat >> $TEMP << EOF
Subject: $SUBJECT
--------
Bug report for Octave $VERSION configured for $MACHINE

Description:
-----------

  * Please replace this item with a detailed description of the
    problem.  Suggestions or general comments are also welcome.

Repeat-By:
---------

  * Please replace this item with a description of the sequence of
    events that causes the problem to occur. 

Fix:
---

  * If possible, replace this item with a description of how to
    fix the problem (if you don't have a fix for the problem, don't
    include this section, but please do submit your report anyway).



Configuration (please do not edit this section):
-----------------------------------------------

uname output:     $UN
configure opts:   $config_opts
Fortran compiler: $F77
FFLAGS:           $FFLAGS
FLIBS:            $FLIBS
CPPFLAGS:         $CPPFLAGS
INCFLAGS:         $INCFLAGS
C compiler:       $CC_AND_VERSION
CFLAGS:           $CFLAGS
CPICFLAG:         $CPICFLAG
C++ compiler:     $CXX_AND_VERSION
CXXFLAGS:         $CXXFLAGS
CXXPICFLAG:       $CXXPICFLAG
LD_CXX:           $LD_CXX
LDFLAGS:          $LDFLAGS
LIBFLAGS:         $LIBFLAGS
RLD_FLAG:         $RLD_FLAG
BLAS_LIBS:        $BLAS_LIBS
FFTW_LIBS:        $FFTW_LIBS
LIBS:             $LIBS
LEXLIB:           $LEXLIB
LIBGLOB:          $LIBGLOB
SED:              $SED
DEFS:

EOF

if $HAVE_FMT; then
  echo $DEFS | fmt | $SED 's/^/  /' >> $TEMP
else
  echo $DEFS >> $TEMP
fi

if test $# -gt 0; then
  if test -f "$1"; then
    cat >> $TEMP << EOF

User-preferences (please do not edit this section):
--------------------------------------------------

EOF
    cat $1 >> $TEMP
  fi
fi

chmod u+w $TEMP
cp $TEMP $TEMP.x

status=0

editing=true

while $editing; do
  if $EDITOR $TEMP; then
    while $editing; do
      echo $echo_n "(a)bort, (e)dit, (l)ist, (s)end? $echo_c"
      read ans
      case "$ans" in
        a* | A*)
          status=1
          editing=false
        ;;
        e* | E*)
          break;
        ;;
        l* | L*)
          $PAGER $TEMP
        ;;
        s* | S*)
          editing=false
        ;;
      esac
    done
  else
    echo "problems with edit -- no bug report submitted"
    status=1
    editing=false
  fi
done

if test $status -eq 0; then
  if cmp -s $TEMP $TEMP.x; then
    echo "file not changed -- no bug report submitted"
    status=1
  elif test `wc $TEMP | awk '{print $1}'` -eq 0; then
    echo "empty bug report file -- not submitted"
    status=1
  else

# Try to extract the recipient address, in case the To: line in the
# message template has been changed.  Also get cc: lines.

    TO_ADDR=`$SED -e '/^--------[ \t]*$/q' $TEMP | $SED -n -e 's/^[Tt][Oo]://p'`
    CC_ADDR=`$SED -e '/^--------[ \t]*$/q' $TEMP | $SED -n -e 's/^[Cc][Cc]://p'`

    if test -z "$TO_ADDR"; then
      echo "no valid \`To:' field found in header -- using $BUGADDR instead"
    else
      BUGADDR="$TO_ADDR"      
    fi

    BUGADDR="$BUGADDR $CC_ADDR"

    TMP_SUB=`$SED -e '/^--------[ \t]*$/q' $TEMP | $SED -n -e 's/^Subject://p'`

    if test -n "$TMP_SUB"; then
      SUBJECT="$TMP_SUB"
    fi

# Delete the `--------' separator in the message.

# Don't pretty-print this.  Odd whitespace kills Ultrix AWK!

    awk 'BEGIN{in_header=1;} /^--------[ \t]*$/ {
      if (in_header) { in_header=0; print ""; next; }
    } { print $0; }' $TEMP > $TEMP.x

# Now try to mail it.

    # indicate that we have not yet sent email successfully
    status=11

    if test $status -ne 0; then
      ( mailx -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1
      status=$?
      if test $status -ne 0; then
        ( Mail -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1
        status=$?
        if test $status -ne 0; then
          ( /usr/ucb/mail -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1
          status=$?
          # make /bin/mail our last resort -- it ignores the subject line
          if test $status -ne 0; then
            ( /bin/mail $BUGADDR < $TEMP.x ) > /dev/null 2>&1
            status=$?
            if test $status -ne 0; then
              echo "unable to send mail..."
            fi
          fi
        fi
      fi
    fi
  fi
fi

if test $status -ne 0; then
  dead_bug_file=$HOME/dead-octave-bug
  looking_for_file=true;
  n=1
  while $looking_for_file; do
    if test -f "$dead_bug_file-$n"; then
      n=`expr $n + 1`
    else
      looking_for_file=false
      dead_bug_file=$dead_bug_file-$n
    fi
  done
  echo "saving message in $dead_bug_file";
  cat $TEMP >> $dead_bug_file;
  exit 1
else
  echo "bug report sent to: $TO_ADDR"
  echo "             cc to: $CC_ADDR"
fi

exit $status