Changeset 619 for trunk


Ignore:
Timestamp:
Oct 10, 2002, 5:01:08 PM (22 years ago)
Author:
joergs
Message:

Bugfixing: Pfade, return code, Anpassungen an 8.1

Location:
trunk/technical/common/build
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/technical/common/build/build.sh

    r617 r619  
    11#!/bin/bash
    22# Remote build script (iboernig@suse.de)
    3 # $Id: build.sh,v 1.10 2002/10/08 16:30:28 joergs Exp $
     3# $Id: build.sh,v 1.11 2002/10/10 15:01:08 joergs Exp $
    44#
    55# Kurze Featuritis:
     
    2626BUILDTEMP=abuildtmp
    2727BUILDUSER=$USER
    28 # setzen der Zielarchtitektur. Wird bei Bedarf durch noarch überschrieben.
    29 ARCH=i386
    30 OS_TYPE=sles
    31 OS_VER=7
    3228
    33 [ -z "$BUILD_MODE" ] && BUILD_MODE="--clean"
    34 [ -z "$BUILD_DIST" ] && BUILD_DIST="${OS_TYPE}${OS_VER}-$ARCH"
     29[ -z "$BUILD_MODE" ] && BUILD_MODE="--verify"
     30[ -z "$BUILD_DIST" ] && BUILD_DIST="sles7-i386+update"
    3531[ -z "$BUILD_ROOT" ] && BUILD_ROOT="/abuild/buildsystem.$BUILDHOST.$USER.$BUILD_DIST.smartclient"
    3632[ -z "$BUILD_PREPARE_SPEC" ] && BUILD_PREPARE_SPEC="no"
    3733
    38 [ -z $DEST_DIR ] && DEST_DIR="/tmp/smartclient_build/$BUILD_DIST"
     34[ -z $DEST_DIR ] && DEST_DIR="/tmp/smartclient_build/"
    3935
    4036# Hier gehts los:
     
    5248VERSION=$(awk '/^Version:/ {print $2}' <$SPECFILE)
    5349
    54 BUILDARCH=$(awk '/^BuildArch:/ {print $2}' <$SPECFILE)
    55 [ -z "$BUILDARCH" ] && BUILDARCH=$ARCH
     50ERROR=0
    5651
    57 echo $PACKAGE $VERSION $ARCH $BUILDARCH
     52echo $PACKAGE $VERSION $BUILD_DIST
    5853
    5954# Cleaning up and install tempdir
    6055ssh -${SSH_VERSION} ${FQBUILDHOST} "rm -r ${BUILDTEMP}/src/${PACKAGE}-${VERSION}; \
    61                         mkdir -p ${BUILDTEMP}/src/${PACKAGE}-${VERSION}\
    62                         mkdir -p ${BUILDTEMP}/${ARCH}/${OS_TYPE}/${OS_VER}";
     56mkdir -p ${BUILDTEMP}/src/${PACKAGE}-${VERSION} ${BUILDTEMP}/${BUILD_DIST}";
    6357
    6458scp -oProtocol=$SSH_VERSION $TARFILE $SPECFILE $DIFFILES $PATCHFILES $RESTFILES ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}-${VERSION}
     
    7872
    7973cd ~${BUILDUSER}/${BUILDTEMP}/src/${PACKAGE}-${VERSION}
    80 build $BUILD_MODE       --prefer-rpms ~${BUILDUSER}/${BUILDTEMP}/$ARCH/$OS_TYPE/$OS_VER
     74build $BUILD_MODE --prefer-rpms ~${BUILDUSER}/${BUILDTEMP}/${BUILD_DIST}
    8175EOF
    8276
     
    9084        . ~$BUILDUSER/${BUILDTEMP}/src/${PACKAGE}-${VERSION}/buildscript
    9185ssh -oProtocol=$SSH_VERSION ${FQBUILDHOST} \
    92         cp ${BUILD_ROOT}/usr/src/packages/RPMS/${BUILDARCH}/${PACKAGE}-${VERSION}-*.${BUILDARCH}.rpm ${BUILDTEMP}/$ARCH/$OS_TYPE/$OS_VER/
     86        cp ${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${BUILDTEMP}/${BUILD_DIST}/
    9387
    9488mkdir -p ${DEST_DIR}/src
    95 
    96 if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/SRPMS/${PACKAGE}-${VERSION}-*.src.rpm ${DEST_DIR}/src;)
    97     then
    98     echo "ERROR while building packet $PACKAGE";
    99     echo "";sleep 1;echo "";sleep 1;echo "";sleep 1;echo "";sleep 1;echo "";sleep 1;
    100     sleep 10;
     89if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/SRPMS/${PACKAGE}-${VERSION}-*.src.rpm ${DEST_DIR}/src ); then
     90        ERROR=1
    10191fi
    10292
    103 mkdir -p ${DEST_DIR}/$ARCH/$OS_TYPE/$OS_VER
    104 if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/RPMS/${BUILDARCH}/${PACKAGE}-${VERSION}-*.${BUILDARCH}.rpm ${DEST_DIR}/$ARCH/$OS_TYPE/$OS_VER;)
    105     then
    106     echo "ERROR while building packet $PACKAGE";
    107     echo "";sleep 1;echo "";sleep 1;echo "";sleep 1;echo "";sleep 1;echo "";sleep 1;
    108     sleep 10;
    109     exit 1;
     93mkdir -p ${DEST_DIR}/${BUILD_DIST}
     94if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${DEST_DIR}/${BUILD_DIST} ); then
     95        ERROR=2
    11096fi
    11197
    112 echo "Build of ${PACKAGE} completed!"
    113 echo "Packages can be found in ${DEST_DIR}"
     98if [ $ERROR -ne 0 ]; then
     99    echo "ERROR while building packet $PACKAGE";
     100        for i in `seq 5`; do
     101                echo -n ""; sleep 1;
     102        done
     103else
     104        echo "Build of ${PACKAGE} completed!"
     105        echo "Packages can be found in ${DEST_DIR}"
     106fi
     107
     108exit $ERROR
  • trunk/technical/common/build/buildall.pl

    r616 r619  
    22# automatisches buildskript fuer smartclient
    33# liest die konfiguration aus der mit -b übergebenen Datei
    4 # $Id: buildall.pl,v 1.13 2002/10/08 10:20:39 ahuck Exp $
     4# $Id: buildall.pl,v 1.14 2002/10/10 15:01:08 joergs Exp $
    55# Philipp Storz, SuSE Linux AG
    66# pstorz@suse.de
     
    8383
    8484 
    85 #  system "./test.sh";
    8685  $_=$ArrayofBuilds[$i][0];
    8786  print "$_ \n";
     
    104103  system "xterm -T \"build log for PACKET: $mypath    ARCH:$ArrayofBuilds[$i][1] \" -e less +F $workdir/$mypath/$logfilename &";
    105104  print "++++++++++++++++++++++++++++++++++++++++++\n";
    106   $retval = system "cd $mypath; $build >$logfilename 2>&1;";
     105  $retval = system "cd $mypath && $build >$logfilename 2>&1";
    107106  }
    108107  else
    109108  {
    110     $retval = system "cd $mypath; $build |tee $logfilename";
     109    $retval = system "cd $mypath && $build | tee $logfilename";
    111110  }
    112 
    113 
    114 
    115 #  system "xterm -T \"build log for PACKET: $mypath    ARCH:$ArrayofBuilds[$i][1] \" -e less +F $workdir/$mypath/$logfilename &";
    116 #  print "++++++++++++++++++++++++++++++++++++++++++\n";
    117 #  $retval = system "cd $mypath; $build >$logfilename 2>&1;";
    118 # $retval = system "./exit.sh 2>&1 > $logfilename;";
    119111
    120112
    121113 if ($retval == 0)
    122114   {
    123      $ArrayofBuilds[$i][3]= "SUCESS $ArrayofBuilds[$i][0]: OK";
     115     $ArrayofBuilds[$i][3]= "SUCCESS $ArrayofBuilds[$i][0]: OK";
    124116     print"******                                                      ******\n";
    125117     print"******   building of $ArrayofBuilds[$i][0]: OK                    \n" ;
     
    150142    $~="TABELLE";
    151143    write;
    152 #    print("$ArrayofBuilds[$i][0]:Result: $ArrayofBuilds[$i][3]");
     144        # print("$ArrayofBuilds[$i][0]:Result: $ArrayofBuilds[$i][3]");
    153145  }
    154146
Note: See TracChangeset for help on using the changeset viewer.