From owner-freebsd-ports-bugs Tue Mar 4 15:20:29 2003 Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E6B937B40D for ; Tue, 4 Mar 2003 15:20:22 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35A1A43F3F for ; Tue, 4 Mar 2003 15:20:21 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h24NKLNS014187 for ; Tue, 4 Mar 2003 15:20:21 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h24NKLsD014186; Tue, 4 Mar 2003 15:20:21 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FCA637B401 for ; Tue, 4 Mar 2003 15:17:12 -0800 (PST) Received: from mail.soaustin.net (mail.soaustin.net [207.200.4.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54F1D43F75 for ; Tue, 4 Mar 2003 15:17:11 -0800 (PST) (envelope-from linimon@lonesome.com) Received: from lonesome.lonesome.com (cs242746-11.austin.rr.com [24.27.46.11]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by mail.soaustin.net (Postfix) with ESMTP id F3FF914351 for ; Tue, 4 Mar 2003 17:17:09 -0600 (CST) Received: from lonesome.lonesome.com (localhost.lonesome.com [127.0.0.1]) by lonesome.lonesome.com (8.12.7/8.12.3) with ESMTP id h24NKBdB053267 for ; Tue, 4 Mar 2003 17:20:12 -0600 (CST) (envelope-from linimon@lonesome.lonesome.com) Received: (from linimon@localhost) by lonesome.lonesome.com (8.12.7/8.12.6/Submit) id h24NKBTH053263; Tue, 4 Mar 2003 17:20:11 -0600 (CST) (envelope-from linimon) Message-Id: <200303042320.h24NKBTH053263@lonesome.lonesome.com> Date: Tue, 4 Mar 2003 17:20:11 -0600 (CST) From: Mark Linimon To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113.1 Subject: ports/48935: [patch] eliminate false indications in bento errorlog reports Sender: owner-freebsd-ports-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 48935 >Category: ports >Synopsis: [patch] eliminate false indications in bento errorlog reports >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Mar 04 15:20:20 PST 2003 >Closed-Date: >Last-Modified: >Originator: Mark Linimon >Release: FreeBSD-4.7 >Organization: FreeBSD >Environment: System: FreeBSD lonesome.lonesome.com 4.7-STABLE FreeBSD 4.7-STABLE #0: Fri Nov 8 23:46:29 CST 2002 root@lonesome.lonesome.com:/usr/src/sys/compile/MULTIMEDIA i386 >Description: The /usr/ports/Tools/portbuild/scripts/processlogs script becomes confused when handling very short port build error logs. These generally are created when there is some kind of error on the bento cluster itself. The symptom you'll see is something bogus like "Exec" or "fetch" in the Maintainer field. More detail: the script uses an intermediate file to cache results, one line per port. The current handling of this file assumes that all fields are non-empty. However, for sufficiently truncated errorlogs, at least some fields are indeed empty. >How-To-Repeat: View the current http://bento.freebsd.org/errorlogs/ia64-5-full/ report. >Fix: The following catches these cases and classifies them as error type "cluster" with an empty Maintainer and Date field. (I am not married to the "cluster" name but some kind of metatoken needs to be used). Also, while I had the patient on the table, I added a couple of more cases of "config error" and "perl" that seem to have shown up in recent errorlog runs. --- processlogs.dist Fri Feb 14 03:28:42 2003 +++ processlogs Tue Mar 4 15:53:44 2003 @@ -29,19 +29,19 @@ portname=$(basename $filename .log) affected=$(($(grep -cF $portname < INDEX) -1)) logsize=$(/bin/ls -sk $filename | awk '{print $1}') - dir=$(sed -n -e '3p' $filename | awk '{print $4}' | \ + dir=$(sed -n -e '3p' $filename | grep '^with arguments' | awk '{print $4}' | \ sed -e 's,^/[^/]*/[^/]*/,,') - maintainer=$(sed -n -e '4p' $filename | awk '{print $3}') - datetime=$(grep 'build started at' $filename | \ + maintainer=$(sed -n -e '4p' $filename | grep '^maintained by' | awk '{print $3}') + datetime=$(sed -n -e '5p' $filename | grep '^build started at' | \ sed -e 's/build started at ...//' | tr ' ' '_' ) - # throw out totally bogus files (e.g., blank file, error 404, etc.) - if [ -z "$dir" -a -z "$maintainer" -a -z "$datetime" ]; then - shift - continue - fi - - if grep -q 'list of extra files and directories' $1; then + # now try to classify the type of error found in the file. + # the first case handles failures to even try to build any + # port (i.e. HTML file no longer there, bento being unable + # to fetch any file, bento being able to build any port, etc.) + if [ -z "$dir" -o -z "$datetime" ]; then + reason="cluster"; tag="cluster" + elif grep -q 'list of extra files and directories' $1; then reason="mtree"; tag="mtree" elif grep -q "See for instructions." $1; then reason="gcc_bug"; tag="gcc-bug" @@ -227,6 +227,8 @@ reason="chown"; tag="chown" elif grep -q "Cannot stat: " $1; then reason="configure_error"; tag="configure" + elif grep -q "make: cannot open Makefile" $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 @@ -267,7 +269,9 @@ 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 + elif grep -qE "perl. is needed, and you do not seem to have it" $1; then + reason="perl"; tag="perl" + elif grep -qE "Perl .* required--this is only version" $1; then reason="perl"; tag="perl" elif grep -q "pod2man: not found" $1; then reason="pod2man"; tag="pod2man" @@ -299,11 +303,26 @@ reason="threads"; tag="threads" elif grep -q "/usr/bin/ld: cannot find -lXThrStub" $1; then reason="threads"; tag="threads" + elif grep -q "port wants the OpenSSL library from the FreeBSD base system" $1; then + reason="use_openssl_base"; tag="use_openssl_base" else reason="???"; tag="unknown" fi + # clean up some error cases -- the way .logs works, it expects that + # every field in it MUST be nonblank, so we insert a metatoken here. + # See below. + if [ -z "$dir" ]; then + dir="NONE" + fi + if [ -z "$maintainer" ]; then + maintainer="NONE" + fi + if [ -z "$datetime" ]; then + datetime="NONE" + fi + broken="no" if grep -q "Trying build of .* even though it is marked BROKEN" $1; then broken="broken" @@ -352,6 +371,11 @@ echo "" >>$of } +# Now reread the .logs file and create the reports. If the .logs file +# has blanks in any field, this code won't work. Therefore, the +# code above has to guarantee that that won't happen, and the code +# below has to catch the metatoken. + # # Create "default" output, sorted on portname # @@ -359,14 +383,22 @@ for i in `cat .logs | sort`; do set $(echo $i | tr \| " ") + if [ "$6" = "NONE" ] ; then + mailto=" " + else + mailto="$6" + fi + set $(echo $i | tr \| " " | sed -e "s@NONE@\\ @g") + 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 "$mailto" >> $of echo "" >> $of test "$9" = "broken" && echo "[B]" >> $of @@ -389,14 +421,22 @@ for i in `cat .logs | sort -t \\| +4`; do set $(echo $i | tr \| " ") + if [ "$6" = "NONE" ] ; then + mailto=" " + else + mailto="$6" + fi + set $(echo $i | tr \| " " | sed -e "s@NONE@\\ @g") + 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 "$mailto" >> $of echo "" >> $of test "$9" = "broken" && echo "[B]" >> $of @@ -419,8 +459,16 @@ for i in `cat .logs | sort -t \\| +5`; do set $(echo $i | tr \| " ") + if [ "$6" = "NONE" ] ; then + mailto=" " + else + mailto="$6" + fi + set $(echo $i | tr \| " " | sed -e "s@NONE@\\ @g") + echo "" >> $of - echo "$6" >> $of + + echo "$mailto" >> $of echo "$2" >> $of affby=$3 @@ -449,6 +497,13 @@ for i in `cat .logs | sort -t \\| +7`; do set $(echo $i | tr \| " ") + if [ "$6" = "NONE" ] ; then + mailto=" " + else + mailto="$6" + fi + set $(echo $i | tr \| " " | sed -e "s@NONE@\\ @g") + echo "" >> $of echo "" >> $of @@ -463,7 +518,7 @@ test $affby = "0" -o $affby = "-1" && affby=" " echo "$affby$4 Kb" >> $of echo "$5" >> $of - echo "$6" >> $of + echo "$mailto" >> $of date=$(echo ${10} | tr '_' ' ') echo "$date" >> $of @@ -480,6 +535,13 @@ for i in `cat .logs | sort -t \\| +9`; do set $(echo $i | tr \| " ") + if [ "$6" = "NONE" ] ; then + mailto=" " + else + mailto="$6" + fi + set $(echo $i | tr \| " " | sed -e "s@NONE@\\ @g") + echo "" >> $of date=$(echo ${10} | tr '_' ' ') @@ -491,7 +553,7 @@ test $affby = "0" -o $affby = "-1" && affby=" " echo "$affby$4 Kb" >> $of echo "$5" >> $of - echo "$6" >> $of + echo "$mailto" >> $of echo "" >> $of test "$9" = "broken" && echo "[B]" >> $of @@ -509,6 +571,13 @@ # for i in `cat .logs | sort -t \\| +9`; do set $(echo $i | tr \| " ") + if [ "$6" = "NONE" ] ; then + mailto=" " + else + mailto="$6" + fi + set $(echo $i | tr \| " " | sed -e "s@NONE@\\ @g") + maints="$maints $6" done >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message