\"" $1; then
reason="malloc.h"; tag="malloc.h"
elif grep -q "core dumped" $1; then
reason="coredump"; tag="coredump"
elif grep -q "Segmentation fault" $1; then
reason="segfault"; tag="segfault"
elif egrep -q "storage size of.*isn't known" $1; then
reason="union_wait"; tag="wait"
elif grep -q "initializer element is not constant" $1; then
reason="stdio"; tag="stdio"
elif grep -q "structure has no member named" $1; then
reason="struct_changes"; tag="struct"
elif grep -q "Error: alignment not a power of 2" $1; then
reason="alignment"; tag="alignment"
elif grep -qE "bin.apxs:(.)(not found|No such file or directory)" $1; then
reason="apxs"; tag="apxs"
elif grep -qE "failed to exec .*bin/apxs" $1; then
reason="apxs"; tag="apxs"
elif grep -q ".s: Assembler messages:" $1; then
reason="arch"; tag="arch"
elif grep -qE "Cannot (determine .* target|find the byte order) for this architecture" $1; then
reason="arch"; tag="arch"
elif grep -q "cast from pointer to integer of different size" $1; then
reason="arch"; tag="arch"
elif grep -qE "^cc1: bad value.*for -mcpu.*switch" $1; then
reason="arch"; tag="arch"
elif grep -qE "^cc1: invalid option " $1; then
reason="arch"; tag="arch"
elif grep -qE "Configuration .* not supported" $1; then
reason="arch"; tag="arch"
elif grep -q "could not read symbols: File in wrong format" $1; then
reason="arch"; tag="arch"
elif grep -qE "[Ee]rror: [Uu]nknown opcode" $1; then
reason="arch"; tag="arch"
elif grep -qE "error.*Unsupported architecture" $1; then
reason="arch"; tag="arch"
elif grep -q "ENDIAN must be defined 0 or 1" $1; then
reason="arch"; tag="arch"
elif grep -q "failed to merge target-specific data" $1; then
reason="arch"; tag="arch"
elif grep -qE "(file not recognized|failed to set dynamic section sizes): File format not recognized" $1; then
reason="arch"; tag="arch"
elif grep -q "impossible register constraint" $1; then
reason="arch"; tag="arch"
elif grep -qE "inconsistent operand constraints in an .asm" $1; then
reason="arch"; tag="arch"
elif grep -q "invalid lvalue in asm statement" $1; then
reason="arch"; tag="arch"
elif grep -qE "is only for.*, and you are running" $1; then
reason="arch"; tag="arch"
elif grep -q "relocation truncated to fit: " $1; then
reason="arch"; tag="arch"
elif grep -q "This architecture seems to be neither big endian nor little endian" $1; then
reason="arch"; tag="arch"
elif grep -q "unknown register name" $1; then
reason="arch"; tag="arch"
elif grep -q "Unable to correct byte order" $1; then
reason="arch"; tag="arch"
elif grep -q "Unsupported platform, sorry" $1; then
reason="arch"; tag="arch"
elif grep -q "won't run on this architecture" $1; then
reason="arch"; tag="arch"
elif grep -qE "#error .Cannot compile:" $1; then
reason="assert"; tag="assert"
elif grep -qE "autoconf(.*): not found" $1; then
reason="autoconf"; tag="autoconf"
elif grep -qE "autoconf(.*): No such file or directory" $1; then
reason="autoconf"; tag="autoconf"
elif grep -q "autoheader: not found" $1; then
reason="autoheader"; tag="autoheader"
elif grep -qE "automake(.*): not found" $1; then
reason="automake"; tag="automake"
elif grep -q "awk: empty regular expression" $1; then
reason="awk"; tag="awk"
elif grep -qE "(mv:|mv: rename|cannot open) y.tab.c(.*): No such file or directory" $1; then
reason="bison"; tag="bison"
elif grep -q "sorry, cannot determine the header file bison generates" $1; then
reason="bison"; tag="bison"
elif grep -q "usage: yacc" $1; then
reason="bison"; tag="bison"
elif grep -q "/usr/local/www/cgi-bin does not exist" $1; then
reason="cgi-bin"; tag="cgi-bin"
elif grep -qE "chown: .*\..*: Invalid argument" $1; then
reason="chown"; tag="chown"
elif grep -q "Cannot stat: " $1; then
reason="configure_error"; tag="configure"
elif grep -qE "Script.*configure.*failed unexpectedly" $1; then
reason="configure_error"; tag="configure"
elif grep -q "Cannot open /dev/tty for read" $1; then
reason="DISPLAY"; tag="display"
elif grep -q "RuntimeError: cannot open display" $1; then
reason="DISPLAY"; tag="display"
elif grep -q "You must run this program under the X-Window System" $1; then
reason="DISPLAY"; tag="display"
elif grep -q "ld: unrecognised emulation mode: elf_i386" $1; then
reason="ELF"; tag="elf"
elif grep -qE "Member name contains .\.\." $1; then
reason="fetch"; tag="fetch"
elif grep -q "fetch: transfer timed out" $1; then
reason="fetch_timeout"; tag="fetch-timeout"
elif grep -q "fetch: transfer timed out" $1; then
reason="fetch_timeout"; tag="fetch-timeout"
elif grep -q "strings.h:.* previous declaration of .int ffs" $1; then
reason="ffs_conflict"; tag="ffs_conflict"
elif grep -q "is forbidden: FreeBSD-SA-" $1; then
reason="forbidden"; tag="forbidden"
elif grep -qE "previous declaration.*int getopt" $1; then
reason="getopt.h"; tag="getopt.h"
elif grep -q 'Run-time system build failed for some reason' $1; then
reason="install_error"; tag="install"
elif grep -q "/usr/bin/ld: cannot find -lc_r" $1; then
reason="lc_r"; tag="lc_r"
elif grep -q "cc: .*libintl.*: No such file or directory" $1; then
reason="linker_error"; tag="ld"
elif grep -qE "cc: ndbm\.so: No such file or directory" $1; then
reason="linker_error"; tag="ld"
elif grep -q "error: The X11 shared library could not be loaded" $1; then
reason="linker_error"; tag="ld"
elif grep -q "relocation against dynamic symbol" $1; then
reason="linker_error"; tag="ld"
elif grep -qE "make.*(don.t know how to make|fatal errors encountered|No rule to make target|built-in)" $1; then
reason="makefile"; tag="makefile"
elif grep -q "Error: mtree file ./etc/mtree/BSD.local.dist. is missing" $1; then
reason="mtree"; tag="mtree"
elif grep -qE "cp:.*site_perl: No such file or directory" $1; then
reason="perl"; tag="perl"
elif grep -q "Perl .* required--this is only version" $1; then
reason="perl"; tag="perl"
elif grep -q "pod2man: not found" $1; then
reason="pod2man"; tag="pod2man"
elif grep -q "Syntax error: .(. unexpected (expecting .fi.)" $1; then
reason="portcomment"; tag="portcomment"
elif grep -q "Abort trap" $1; then
reason="process_failed"; tag="process"
elif grep -q "Bus error" $1; then
reason="process_failed"; tag="process"
elif grep -q "Signal 11" $1; then
reason="process_failed"; tag="process"
elif grep -q "USER PID PPID PGID JOBC STAT TT TIME COMMAND" $1; then
reason="process_failed"; tag="process"
elif grep -q "python: not found" $1; then
reason="python"; tag="python"
elif grep -qE "sed: illegal option" $1; then
reason="sed"; tag="sed"
elif grep -qE "sed: [0-9]*:.*(RE error:|not defined in the RE|bad flag in substitute command|unescaped newline inside substitute pattern|invalid command code)" $1; then
reason="sed"; tag="sed"
elif grep -q "Your STL string implementation is unusable" $1; then
reason="stl"; tag="stl"
elif grep -q "Error: pthreads are required to build this package" $1; then
reason="threads"; tag="threads"
elif grep -q "Please install/update your POSIX threads (pthreads) library" $1; then
reason="threads"; tag="threads"
elif grep -qE "requires.*thread support" $1; then
reason="threads"; tag="threads"
elif grep -q "/usr/bin/ld: cannot find -lpthread" $1; then
reason="threads"; tag="threads"
elif grep -q "/usr/bin/ld: cannot find -lXThrStub" $1; then
reason="threads"; tag="threads"
else
reason="???"; tag="unknown"
fi
broken="no"
if grep -q "Trying build of .* even though it is marked BROKEN" $1; then
broken="broken"
fi
shift
echo "$filename|$portname|$affected|$logsize|$dir|$maintainer|$reason|$tag|$broken|$datetime" >> .logs
done
fi
# XXX Sometimes log entries get doubled up for some reason
uniq .logs > .logs2
mv .logs2 .logs
num=$(wc -l < .logs)
header() {
echo "Package building errors" >$of
echo "Package building errors
" >>$of
echo "View by " >>$of
echo "[ port " >>$of
echo "| maintainer " >>$of
echo "| category " >>$of
echo "| error " >>$of
echo "| builddate " >>$of
echo "]
" >>$of
if [ $num = "0" ]; then
echo "No errors (yet)" >>$of
else
if [ -s cvsdone ]; then
echo "CVS update finished at: $(cat cvsdone)
" >> $of
fi
echo "Timestamp of newest log: $(ls -rtTl *.log | tail -1 | awk '{printf("%s %s %s %s\n",$6,$7,$8,$9)}')
" >> $of
echo "\"Aff.\" is number of ports that depend on this one
" >> $of
echo "\"[B]\" indicates port is marked BROKEN
" >> $of
echo "$num errors
" >> $of
echo "" >>$of
echo "$1
" >>$of
fi
}
footer() {
echo "
" >>$of
echo "" >>$of
echo "" >>$of
}
#
# Create "default" output, sorted on portname
#
header "Port | Aff. | Size | CVS | Maintainer | Reason | Build date | "
for i in `cat .logs | sort`; do
set $(echo $i | tr \| " ")
echo "" >> $of
echo "$2 | " >> $of
affby=$3
test $affby = "0" -o $affby = "-1" && affby=" "
echo "$affby | $4 Kb | " >> $of
echo "$5 | " >> $of
echo "$6 | " >> $of
echo "" >> $of
test "$9" = "broken" && echo "[B]" >> $of
reason=$(echo $7 | tr '_' ' ')
echo "$reason" >> $of
echo " | " >> $of
date=$(echo ${10} | tr '_' ' ')
echo "$date | " >> $of
echo "
" >> $of
done
footer ""
mv -f $of index.html
#
# Create output by category
#
header "CVS | Aff. | Size | Port | Maintainer | Reason | Build date | "
for i in `cat .logs | sort -t \\| +4`; do
set $(echo $i | tr \| " ")
echo "" >> $of
echo "$5 | " >> $of
affby=$3
test $affby = "0" -o $affby = "-1" && affby=" "
echo "$affby | $4 Kb | " >> $of
echo "$2 | " >> $of
echo "$6 | " >> $of
echo "" >> $of
test "$9" = "broken" && echo "[B]" >> $of
reason=$(echo $7 | tr '_' ' ')
echo "$reason" >> $of
echo " | " >> $of
date=$(echo ${10} | tr '_' ' ')
echo "$date | " >> $of
echo "
" >> $of
done
footer ""
mv -f $of index-category.html
#
# Create output by maintainer
#
header "Maintainer | Port | Aff. | Size | CVS | Reason | Build date | "
for i in `cat .logs | sort -t \\| +5`; do
set $(echo $i | tr \| " ")
echo "" >> $of
echo "$6 | " >> $of
echo "$2 | " >> $of
affby=$3
test $affby = "0" -o $affby = "-1" && affby=" "
echo "$affby | $4 Kb | " >> $of
echo "$5 | " >> $of
echo "" >> $of
test "$9" = "broken" && echo "[B]" >> $of
reason=$(echo $7 | tr '_' ' ')
echo "$reason" >> $of
echo " | " >> $of
date=$(echo ${10} | tr '_' ' ')
echo "$date | " >> $of
echo "
" >> $of
done
footer ""
mv -f $of index-maintainer.html
#
# Create output by error
#
header "Reason | Port | Aff. | Size | CVS | Maintainer | Build date | "
for i in `cat .logs | sort -t \\| +7`; do
set $(echo $i | tr \| " ")
echo "" >> $of
echo "" >> $of
test "$9" = "broken" && echo "[B]" >> $of
reason=$(echo $7 | tr '_' ' ')
echo "$reason" >> $of
echo " | " >> $of
echo "$2 | " >> $of
affby=$3
test $affby = "0" -o $affby = "-1" && affby=" "
echo "$affby | $4 Kb | " >> $of
echo "$5 | " >> $of
echo "$6 | " >> $of
date=$(echo ${10} | tr '_' ' ')
echo "$date | " >> $of
echo "
" >> $of
done
footer ""
mv -f $of index-reason.html
#
# Create output by builddate
#
header "Build date | Port | Aff. | Size | CVS | Maintainer | Reason | "
for i in `cat .logs | sort -t \\| +9`; do
set $(echo $i | tr \| " ")
echo "" >> $of
date=$(echo ${10} | tr '_' ' ')
echo "$date | " >> $of
echo "$2 | " >> $of
affby=$3
test $affby = "0" -o $affby = "-1" && affby=" "
echo "$affby | $4 Kb | " >> $of
echo "$5 | " >> $of
echo "$6 | " >> $of
echo "" >> $of
test "$9" = "broken" && echo "[B]" >> $of
reason=$(echo $7 | tr '_' ' ')
echo "$reason" >> $of
echo " | " >> $of
echo "
" >> $of
done
footer ""
mv -f $of index-builddate.html
#
# Get list of maintainers.
#
for i in `cat .logs | sort -t \\| +9`; do
set $(echo $i | tr \| " ")
maints="$maints $6"
done
echo $maints | sed -e 's/ /\
/g' | sort -fu > maintainers
rm .lock