Changeset 2277


Ignore:
Timestamp:
10/22/07 10:06:26 (6 years ago)
Author:
alanbach-guest
Message:

Updated to support build server logs

Location:
scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • scripts/watch.php

    r1849 r2277  
    33// Coyright 2007 Alan Baghumian / GNU/GPL 
    44// Based on Debian DEHS http://svn.debian.org/wsvn/dehs 
     5// 
     6// Updated: 2007-10-22 09:42 +330 GMT 
    57 
    68$vars=$_GET["vars"]; 
     
    1618        $arrarchs=explode("-", $arrvars[1]); 
    1719 
    18         $spkg = $arrvars[2]; 
     20        $spkg = $arrvars[2];        
    1921 
    2022        if(!empty($arrarchs[0])){ 
     
    7072        switch($status) 
    7173        { 
    72                 case "Up to date": 
     74                case "up to date": 
    7375                        $bk_color="#00ff00"; 
    7476                        break; 
     
    8082                        break; 
    8183                default: 
    82                         $status = "Watch file does not find" 
     84                        $status = "Watch file does not find"; 
    8385                        $bk_color="#ffea99"; 
    8486                        break;                   
     
    8789        if($pkg !='' || $pkg !=null){ 
    8890                if($upstream != null){ 
    89                         echo "<tr bgcolor=white><td><b>".$pkg."</b></td><td><a href=".$up_url.">".$upstream."</a></td><td><font color=".$color.">".$parsix."</font></td><td align=center>".$archs."</td><td bgcolor=".$bk_color.">".$status."</td></tr>"; 
     91                        echo "<tr bgcolor=white><td><b>".$pkg."</b></td><td><a href=".$up_url.">".$upstream."</a></td><td><font color=".$color.">".$parsix."</font></td><td align=center>".$archs."</td><td bgcolor=".$bk_color.">".$status."</td>"; 
    9092                }else{ 
    9193                        if($show_warnings){ 
    92                                 echo "<tr bgcolor=white><td><b>".$pkg."</b></td><td colspan=4 bgcolor=#ff9966>".$warnings."</td></tr>"; 
     94                                echo "<tr bgcolor=white><td><b>".$pkg."</b></td><td colspan=4 bgcolor=#ff9966>".$warnings."</td><td>"; 
    9395                        } 
    9496                } 
  • scripts/watch.sh

    r2172 r2277  
    33# Coyright 2007 Alan Baghumian / GNU/GPL 
    44# 
    5 # Requires: lynx 
     5# Updated: 2007-10-22 10:18 +330 GMT 
     6# 
     7# Requires: lynx, devscripts 
    68 
    79BASE_PATH="/home/parsix/public_html/watch" 
    810BASE_URL="http://watch.parsix.org" 
     11BUILDD="http://buildd.parsix.org" 
     12LOGS_PATH="/home/parsix/public_html/buildlogs" 
    913LOCAL_REPO="/home/parsix/public_html/packages/pool" 
    1014SVN_REPO="/svn/pkg-parsix/" 
     15UNDERLINE=$'\137' # 137 is octal ASCII code for '_' 
    1116 
    1217if [ -f $BASE_PATH/index.html ]; then 
     
    1419fi 
    1520 
    16 HEADER="<html lang='en-us'><head><title>Parsix GNU/Linux :: Package Watch System</title><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><link rel='icon' href='http://www.parsix.org/html/themes/parsix/images/icon.png' type='image/png'><link rel='shortcut icon' href='http://www.parsix.org/html/themes/parsix/images/favicon.ico'><link rel='stylesheet' href='http://www.parsix.org/html/modules/Admin/pnstyle/admin.css' type='text/css'><link rel='stylesheet' href='http://www.parsix.org/html/themes/parsix/style/styleNN.css' type='text/css'><style type='text/css'>@import url('http://www.parsix.org/html/themes/parsix/style/style.css');</style></head><body bgcolor='#deba73' text='#000000' link='#363636' vlink='#363636' alink='#d5ae83'><CENTER><H2>Parsix GNU/Linux Package Watch System</H2></CENTER><table border=1 align=center width=80% bgcolor=#f7f0e0><tr><td><b>Package Name</b></td><td><b>Upstream Version</b></td><td><b>Parsix Version</b></td><td><b>Supported Archs</b></td><td><b>Status</b></td><tr>" 
     21HEADER="<html lang='en-us'><head><title>Parsix GNU/Linux :: Package Watch System</title><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><link rel='icon' href='http://www.parsix.org/html/themes/parsix/images/icon.png' type='image/png'><link rel='shortcut icon' href='http://www.parsix.org/html/themes/parsix/images/favicon.ico'><link rel='stylesheet' href='http://www.parsix.org/html/modules/Admin/pnstyle/admin.css' type='text/css'><link rel='stylesheet' href='http://www.parsix.org/html/themes/parsix/style/styleNN.css' type='text/css'><style type='text/css'>@import url('http://www.parsix.org/html/themes/parsix/style/style.css');</style></head><body bgcolor='#deba73' text='#000000' link='#363636' vlink='#363636' alink='#d5ae83'><CENTER><H2>Parsix GNU/Linux Package Watch System</H2></CENTER><table border=1 align=center width=80% bgcolor=#f7f0e0><tr><td><b>Package Name</b></td><td><b>Upstream Version</b></td><td><b>Parsix Version</b></td><td><b>Supported Archs</b></td><td><b>Status</b></td><td><b>Build Server Status</b></td><tr>" 
    1722 
    1823FOOTER="</body></html>" 
     
    2025echo $HEADER > $BASE_PATH/index.html 
    2126 
    22 LIST=`/usr/bin/find $SVN_REPO -name watch | /bin/grep debian | /bin/grep trunk | sort -u` 
     27LIST=`find $SVN_REPO -name watch | grep debian | grep trunk | sort -u` 
    2328 
    2429for x in $LIST 
     
    2631 
    2732# ARCH Checks 
    28 PKG=`/usr/bin/basename ${x/%trunk\/debian\/watch/}` 
    29 PATH=`/usr/bin/find $LOCAL_REPO -type d | /bin/grep $PKG` 
    30 COUNT=`/usr/bin/find $PATH | /bin/grep -c amd64.deb` 
     33PKG=`basename ${x/%trunk\/debian\/watch/}` 
     34LORPATH=`find $LOCAL_REPO -type d | grep $PKG` 
     35cd $SVN_REPO/pkg/ 
     36COMPONENT=`find ./ -maxdepth 2 -type d | grep /$PKG$ | awk 'BEGIN{FS="/"}{print $2}'` 
     37if [ -d $COMPONENT/$PKG ]; then 
     38     cd $COMPONENT/$PKG 
     39     PKG_VERSION=`dpkg-parsechangelog -ltrunk/debian/changelog | grep Version | awk 'BEGIN{FS=": "}{print $2}' | awk 'BEGIN{FS="-"}{print $1}' | awk 'BEGIN{FS=" "}{print $1}'` 
     40     PKG_REVISION=`dpkg-parsechangelog -ltrunk/debian/changelog  | grep Version | awk 'BEGIN{FS=": "}{print $2}' | awk 'BEGIN{FS="-"}{print $2}'` 
     41     cd 
     42fi 
     43 
     44COUNT=`find $LORPATH | grep -c amd64.deb` 
    3145if [ $COUNT -ne 0 ]; then 
    3246        AMD64="amd64" 
     
    3549fi 
    3650 
    37 COUNT=`/usr/bin/find $PATH | /bin/grep -c i386.deb` 
     51COUNT=`find $LORPATH | grep -c i386.deb` 
    3852if [ $COUNT -ne 0 ]; then 
    3953        I386="i386" 
     
    4256fi 
    4357 
    44 COUNT=`/usr/bin/find $PATH | /bin/grep -c all.deb` 
     58COUNT=`find $LORPATH | grep -c all.deb` 
    4559if [ $COUNT -ne 0 ]; then 
    4660        ALLARCH="all" 
     
    5367 
    5468# work around the plus bug 
    55 x=`echo $x | /bin/sed s/+/KKK/g` 
     69x=`echo $x | sed s/+/KKK/g` 
    5670 
    5771if [ ! -z "$FAKEARCHS" ]; then 
    58 /usr/bin/lynx -source $BASE_URL/watch.php?vars=${x/%debian\/watch/}*$ARCHS*$PKG | /bin/sed s/Debian/Parsix/g >> $BASE_PATH/index.html 
     72lynx -source $BASE_URL/watch.php?vars=${x/%debian\/watch/}*$ARCHS*$PKG | sed s/Debian/Parsix/g >> $BASE_PATH/index.html 
     73fi 
     74 
     75if [ -f $LOGS_PATH/$PKG$UNDERLINE$PKG_VERSION-$PKG_REVISION.log ]; then 
     76     echo "log exists..." 
     77     BUILD_STATUS=`tail -1 $LOGS_PATH/$PKG$UNDERLINE$PKG_VERSION-$PKG_REVISION.log` 
     78     if [ "$BUILD_STATUS" = "Build OK" ]; then 
     79            echo "<td bgcolor='00d7e9'><a href=$BUILDD/$PKG$UNDERLINE$PKG_VERSION-$PKG_REVISION.log><b>OK</b></a></td></tr>" >> $BASE_PATH/index.html 
     80     elif [ "$BUILD_STATUS" = "Build failed" ]; then 
     81            echo "<td bgcolor='#ff9199'><a href=$BUILDD/$PKG$UNDERLINE$PKG_VERSION-$PKG_REVISION.log><b>Failed</b></a></td></tr>" >> $BASE_PATH/index.html 
     82     else 
     83            echo "<td bgcolor='#ffff00'><a href=$BUILDD/$PKG$UNDERLINE$PKG_VERSION-$PKG_REVISION.log>N/A</a></td></tr>" >> $BASE_PATH/index.html 
     84     fi 
     85else 
     86     echo "<td bgcolor='#ffff00'>N/A</td></tr>" >> $BASE_PATH/index.html 
    5987fi 
    6088 
    6189done 
    6290 
    63 echo "<p align=center>Last Update: `/bin/date`</p>" >> $BASE_PATH/index.html 
     91echo "<p align=center>Last Update: `date`</p>" >> $BASE_PATH/index.html 
    6492 
    6593echo $FOOTER >> $BASE_PATH/index.html 
Note: See TracChangeset for help on using the changeset viewer.