Changeset 668 for trunk


Ignore:
Timestamp:
May 14, 2004, 10:50:27 AM (21 years ago)
Author:
(none)
Message:

making it work for TU München. Automatic building doesn't work fully on
SLES8. SUSE build.rpm is needed to be patched.

Location:
trunk/technical/common/build
Files:
2 added
1 deleted
3 edited

Legend:

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

    r625 r668  
     1
    12#!/bin/bash
    23# Remote build script (iboernig@suse.de)
     
    2324#   kopiert. Vorgabe ist /tmp/smartclient_build
    2425
    25 SSH_VERSION="1"
    26 BUILDHOST="oldwotan"
    27 FQBUILDHOST="$BUILDHOST.suse.de"
    28 BUILDTEMP=abuildtmp
     26CONFIG_FILE=/usr/local/etc/build
     27#SSH_VERSION="1"
     28#BUILDHOST="oldwotan"
     29#FQBUILDHOST="$BUILDHOST.suse.de"
     30#BUILDTEMP=abuildtmp
    2931BUILDUSER=$USER
     32BUILDTEMP=/tmp/abuildtmp/$BUILDUSER
     33
     34BUILDSCRIPT=$BUILDTEMP/buildscript.$$
    3035
    3136[ -z "$BUILD_MODE" ] && BUILD_MODE="--verify"
    32 [ -z "$BUILD_DIST" ] && BUILD_DIST="sles7-i386+update"
    33 [ -z "$BUILD_ROOT" ] && BUILD_ROOT="/abuild/buildsystem.$BUILDHOST.$USER.$BUILD_DIST.smartclient"
     37[ -z "$BUILD_DIST" ] && BUILD_DIST="sles8-i386+update"
     38[ -z "$BUILD_ROOT" ] && BUILD_ROOT="/var/tmp/buildsystem.$USER.$BUILD_DIST"
    3439[ -z "$BUILD_PREPARE_SPEC" ] && BUILD_PREPARE_SPEC="no"
    3540
    36 [ -z $DEST_DIR ] && DEST_DIR="/tmp/smartclient_build/"
     41[ -z $DEST_DIR ] && DEST_DIR="/tmp/build.$BUILDUSER"
     42
     43if [ -r $CONFIG_FILE ]; then
     44        source $CONFIG_FILE
     45        MOD_BUILD_DIST=`echo $BUILD_DIST | sed "s/[-+.]/_/g"`
     46        #echo MOD_BUILD_DIST: $MOD_BUILD_DIST
     47        #RPMS_PATHS=$[BUILD_RPMS_$MOD_BUILD_DIST]
     48        #echo RPMS_PATHS: $RPM_PATHS
     49        #if [ -n "$[BUILD_RPMS_$MOD_BUILD_DIST]" ]; then
     50        #       BUILD_RPMS=$[BUILD_RPMS_$MOD_BUILD_DIST]
     51        #fi
     52        #echo OUTPUT: $[BUILD_RPMS_$MOD_BUILD_DIST]
     53        #:$BUILD_RPMS
     54        case "$BUILD_DIST" in
     55                "9.0-i386")     
     56                        BUILD_RPMS_TEST=$BUILD_RPMS_9_0_i386 ;;
     57                "sles8-i386")   
     58                        BUILD_RPMS_TEST=$BUILD_RPMS_sles8_i386 ;;
     59                "sles8-i386+update")   
     60                        BUILD_RPMS_TEST=$BUILD_RPMS_sles8_i386_update ;;
     61        esac
     62        if [ "$BUILD_RPMS_TEST" ]; then
     63                if [ "$BUILD_RPMS" ]; then
     64                        BUILD_RPMS=$BUILD_RPMS:$BUILD_RPMS_TEST
     65                else
     66                        BUILD_RPMS=$BUILD_RPMS_TEST
     67                fi
     68        fi
     69fi
     70
     71echo BUILD_RPMS: $BUILD_RPMS
    3772
    3873ERROR=0
     
    5893
    5994# Cleaning up and install tempdir
    60 ssh -${SSH_VERSION} ${FQBUILDHOST} "\
    61         rm -r ${BUILDTEMP}/src/${PACKAGE}; \
    62         mkdir -p ${BUILDTEMP}/src/${PACKAGE} ${BUILDTEMP}/${BUILD_DIST}";
     95#ssh -${SSH_VERSION} ${FQBUILDHOST} "\
     96        rm -rf ${BUILDTEMP}/src/${PACKAGE}; \
     97        mkdir -p ${BUILDTEMP}/src/${PACKAGE} ${BUILDTEMP}/${BUILD_DIST};
    6398
    64 scp -oProtocol=$SSH_VERSION $SRC_FILES ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}
     99#scp -oProtocol=$SSH_VERSION $SRC_FILES ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}
     100cp -a $SRC_FILES ${BUILDTEMP}/src/${PACKAGE}
    65101
    66102if [ "$1" ]; then
    67         ssh -${SSH_VERSION} ${FQBUILDHOST} "\
    68                 cd ${BUILDTEMP}/src/${PACKAGE}; rpm2cpio $1 | cpio -i";
     103        # extract RPM in a tempoary directory
     104        #ssh -${SSH_VERSION} ${FQBUILDHOST} "\
     105                cd ${BUILDTEMP}/src/${PACKAGE}; rpm2cpio $1 | cpio -i           
    69106fi
    70107
    71108# create buildscript
    72109
    73 cat > /tmp/tmpscript.$$ <<EOF
     110cat > $BUILDSCRIPT <<EOF
    74111#!/bin/bash
    75112# local buildscript
    76 . /work/src/bin/.profile
     113#. /work/src/bin/.profile
    77114export BUILD_ROOT=$BUILD_ROOT
    78115export BUILD_DIST=$BUILD_DIST
     116export BUILD_RPMS=${BUILDTEMP}/${BUILD_DIST}:$BUILD_RPMS
    79117export BUILD_PREPARE_SPEC=$BUILD_PREPARE_SPEC
    80118
    81 cd ~${BUILDUSER}/${BUILDTEMP}/src/${PACKAGE}
    82 build $BUILD_MODE --prefer-rpms ~${BUILDUSER}/${BUILDTEMP}/${BUILD_DIST}
     119cd ${BUILDTEMP}/src/${PACKAGE}
     120#build $BUILD_MODE --prefer-rpms ${BUILDTEMP}/${BUILD_DIST}
     121build $BUILD_MODE
    83122EOF
     123chmod a+x $BUILDSCRIPT
    84124
    85125#cat /tmp/tmpscript.$$
    86126
    87 scp -oProtocol=$SSH_VERSION /tmp/tmpscript.$$ ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}/buildscript
    88 rm /tmp/tmpscript.$$
     127#scp -oProtocol=$SSH_VERSION /tmp/tmpscript.$$ ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}/buildscript
     128#rm /tmp/tmpscript.$$
    89129
    90130# build and file rpms
    91 ssh -oProtocol=$SSH_VERSION root@${FQBUILDHOST} \
    92         . ~$BUILDUSER/${BUILDTEMP}/src/${PACKAGE}/buildscript
    93 ssh -oProtocol=$SSH_VERSION ${FQBUILDHOST} \
    94         "rm -f ${BUILDTEMP}/${BUILD_DIST}/${PACKAGE}-*.*.rpm;\
    95         cp ${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${BUILDTEMP}/${BUILD_DIST}/"
     131#ssh -oProtocol=$SSH_VERSION root@${FQBUILDHOST} \
     132#       . ~$BUILDUSER/${BUILDTEMP}/src/${PACKAGE}/buildscript
     133
     134sudo su -c $BUILDSCRIPT
     135rm -f $BUILDSCRIPT
     136
     137#ssh -oProtocol=$SSH_VERSION ${FQBUILDHOST} \
     138        rm -f ${BUILDTEMP}/${BUILD_DIST}/${PACKAGE}-*.*.rpm
     139        cp -a ${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${BUILDTEMP}/${BUILD_DIST}
    96140
    97141mkdir -p ${DEST_DIR}/src
    98142# delete all old versions of this package
    99143rm -f ${DEST_DIR}/src/${PACKAGE}-*.src.rpm
    100 if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/SRPMS/${PACKAGE}-${VERSION}-*.src.rpm ${DEST_DIR}/src ); then
     144#if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/SRPMS/${PACKAGE}-${VERSION}-*.src.rpm ${DEST_DIR}/src ); then
     145        #ERROR=1
     146#fi
     147if !(cp -a ${BUILD_ROOT}/usr/src/packages/SRPMS/${PACKAGE}-${VERSION}-*.src.rpm ${DEST_DIR}/src 2> /dev/null); then
    101148        ERROR=1
    102149fi
     
    105152# delete all old versions of this package
    106153rm -f ${DEST_DIR}/${BUILD_DIST}/${PACKAGE}-*.rpm
    107 if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${DEST_DIR}/${BUILD_DIST} ); then
     154#if !(scp -oProtocol=$SSH_VERSION #root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${DEST_DIR}/${BUILD_DIST} ); then
     155#       ERROR=2
     156#fi
     157if !(cp -a ${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${DEST_DIR}/${BUILD_DIST} ); then
    108158        ERROR=2
    109159fi
  • trunk/technical/common/build/buildall.pl

    r664 r668  
    9494  }
    9595
    96 print 'Are all the srpms extracted and all options OK? (y/n)';
     96print 'Are all options OK? (y/n)';
    9797
    9898my $answer=<STDIN>;
  • trunk/technical/common/build/buildlist_sles8

    r667 r668  
    1010common/base/                    :sles8-i386     :--clean
    1111#
    12 lib/perl/                       :sles8-i386     :--no-init
     12lib/perl/                       :sles8-i386     :--verify
    1313lib/perl/leases2ldap/           :sles8-i386     :--no-init
    1414
     
    1717#
    1818server/ldapcheck/               :sles8-i386     :--no-init
    19 server/ldap2dns/                :sles8-i386     :--no-init
     19server/ldap2dns/                :sles8-i386     :--verify
    2020server/sc_ldap/                 :sles8-i386     :--no-init
    2121server/password_generator/      :sles8-i386     :--no-init
     
    3636# if you have the source-rpms already extracted with extract_srpm.sh,
    3737# the following packages will be build as well (up to END).
    38 external/SuSE/perl-Convert-ASN1 :sles8-i386      :--no-init
     38external/SuSE/perl-Convert-ASN1 :sles8-i386      :--verify
    3939# part of perl-5.8.0
    4040#external/SuSE/perl-Digest-MD5   :sles8-i386      :--no-init
    41 # perl of perl-5.8.0
     41# part of perl-5.8.0
    4242#external/SuSE/perl-MIME-Base64  :sles8-i386     :--no-init
    4343# requires perl-Digest-HMAC
     
    5050external/SuSE/perl-ldap         :sles8-i386      :--clean
    5151
    52 external/cpan/perl-Net-IP               :sles8-i386      :--no-init
    53 external/cpan/perl-Net-IPv4Addr :sles8-i386      :--no-init
    54 external/cpan/perl-Net-ext              :sles8-i386      :--no-init
    55 external/cpan/perl-NetAddr-IP   :sles8-i386      :--no-init
     52external/cpan/perl-Net-IP               :sles8-i386      :--verify
     53external/cpan/perl-Net-IPv4Addr :sles8-i386      :--verify
     54external/cpan/perl-Net-ext              :sles8-i386      :--verify
     55external/cpan/perl-NetAddr-IP   :sles8-i386      :--verify
    5656
    5757# neededforbuild  libnetpbm libpng-devel-packages nasm netpbm
     58# part of UL1.0, SPx
    5859#external/SuSE/syslinux         :sles8-i386      :--clean
    5960
Note: See TracChangeset for help on using the changeset viewer.