Changeset 668
- Timestamp:
- May 14, 2004, 10:50:27 AM (21 years ago)
- 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 1 2 #!/bin/bash 2 3 # Remote build script (iboernig@suse.de) … … 23 24 # kopiert. Vorgabe ist /tmp/smartclient_build 24 25 25 SSH_VERSION="1" 26 BUILDHOST="oldwotan" 27 FQBUILDHOST="$BUILDHOST.suse.de" 28 BUILDTEMP=abuildtmp 26 CONFIG_FILE=/usr/local/etc/build 27 #SSH_VERSION="1" 28 #BUILDHOST="oldwotan" 29 #FQBUILDHOST="$BUILDHOST.suse.de" 30 #BUILDTEMP=abuildtmp 29 31 BUILDUSER=$USER 32 BUILDTEMP=/tmp/abuildtmp/$BUILDUSER 33 34 BUILDSCRIPT=$BUILDTEMP/buildscript.$$ 30 35 31 36 [ -z "$BUILD_MODE" ] && BUILD_MODE="--verify" 32 [ -z "$BUILD_DIST" ] && BUILD_DIST="sles 7-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" 34 39 [ -z "$BUILD_PREPARE_SPEC" ] && BUILD_PREPARE_SPEC="no" 35 40 36 [ -z $DEST_DIR ] && DEST_DIR="/tmp/smartclient_build/" 41 [ -z $DEST_DIR ] && DEST_DIR="/tmp/build.$BUILDUSER" 42 43 if [ -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 69 fi 70 71 echo BUILD_RPMS: $BUILD_RPMS 37 72 38 73 ERROR=0 … … 58 93 59 94 # 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}; 63 98 64 scp -oProtocol=$SSH_VERSION $SRC_FILES ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE} 99 #scp -oProtocol=$SSH_VERSION $SRC_FILES ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE} 100 cp -a $SRC_FILES ${BUILDTEMP}/src/${PACKAGE} 65 101 66 102 if [ "$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 69 106 fi 70 107 71 108 # create buildscript 72 109 73 cat > /tmp/tmpscript.$$<<EOF110 cat > $BUILDSCRIPT <<EOF 74 111 #!/bin/bash 75 112 # local buildscript 76 . /work/src/bin/.profile113 #. /work/src/bin/.profile 77 114 export BUILD_ROOT=$BUILD_ROOT 78 115 export BUILD_DIST=$BUILD_DIST 116 export BUILD_RPMS=${BUILDTEMP}/${BUILD_DIST}:$BUILD_RPMS 79 117 export BUILD_PREPARE_SPEC=$BUILD_PREPARE_SPEC 80 118 81 cd ~${BUILDUSER}/${BUILDTEMP}/src/${PACKAGE} 82 build $BUILD_MODE --prefer-rpms ~${BUILDUSER}/${BUILDTEMP}/${BUILD_DIST} 119 cd ${BUILDTEMP}/src/${PACKAGE} 120 #build $BUILD_MODE --prefer-rpms ${BUILDTEMP}/${BUILD_DIST} 121 build $BUILD_MODE 83 122 EOF 123 chmod a+x $BUILDSCRIPT 84 124 85 125 #cat /tmp/tmpscript.$$ 86 126 87 scp -oProtocol=$SSH_VERSION /tmp/tmpscript.$$ ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}/buildscript88 rm /tmp/tmpscript.$$127 #scp -oProtocol=$SSH_VERSION /tmp/tmpscript.$$ ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}/buildscript 128 #rm /tmp/tmpscript.$$ 89 129 90 130 # 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 134 sudo su -c $BUILDSCRIPT 135 rm -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} 96 140 97 141 mkdir -p ${DEST_DIR}/src 98 142 # delete all old versions of this package 99 143 rm -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 147 if !(cp -a ${BUILD_ROOT}/usr/src/packages/SRPMS/${PACKAGE}-${VERSION}-*.src.rpm ${DEST_DIR}/src 2> /dev/null); then 101 148 ERROR=1 102 149 fi … … 105 152 # delete all old versions of this package 106 153 rm -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 157 if !(cp -a ${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${DEST_DIR}/${BUILD_DIST} ); then 108 158 ERROR=2 109 159 fi -
trunk/technical/common/build/buildall.pl
r664 r668 94 94 } 95 95 96 print 'Are all the srpms extracted and alloptions OK? (y/n)';96 print 'Are all options OK? (y/n)'; 97 97 98 98 my $answer=<STDIN>; -
trunk/technical/common/build/buildlist_sles8
r667 r668 10 10 common/base/ :sles8-i386 :--clean 11 11 # 12 lib/perl/ :sles8-i386 :-- no-init12 lib/perl/ :sles8-i386 :--verify 13 13 lib/perl/leases2ldap/ :sles8-i386 :--no-init 14 14 … … 17 17 # 18 18 server/ldapcheck/ :sles8-i386 :--no-init 19 server/ldap2dns/ :sles8-i386 :-- no-init19 server/ldap2dns/ :sles8-i386 :--verify 20 20 server/sc_ldap/ :sles8-i386 :--no-init 21 21 server/password_generator/ :sles8-i386 :--no-init … … 36 36 # if you have the source-rpms already extracted with extract_srpm.sh, 37 37 # the following packages will be build as well (up to END). 38 external/SuSE/perl-Convert-ASN1 :sles8-i386 :-- no-init38 external/SuSE/perl-Convert-ASN1 :sles8-i386 :--verify 39 39 # part of perl-5.8.0 40 40 #external/SuSE/perl-Digest-MD5 :sles8-i386 :--no-init 41 # p erlof perl-5.8.041 # part of perl-5.8.0 42 42 #external/SuSE/perl-MIME-Base64 :sles8-i386 :--no-init 43 43 # requires perl-Digest-HMAC … … 50 50 external/SuSE/perl-ldap :sles8-i386 :--clean 51 51 52 external/cpan/perl-Net-IP :sles8-i386 :-- no-init53 external/cpan/perl-Net-IPv4Addr :sles8-i386 :-- no-init54 external/cpan/perl-Net-ext :sles8-i386 :-- no-init55 external/cpan/perl-NetAddr-IP :sles8-i386 :-- no-init52 external/cpan/perl-Net-IP :sles8-i386 :--verify 53 external/cpan/perl-Net-IPv4Addr :sles8-i386 :--verify 54 external/cpan/perl-Net-ext :sles8-i386 :--verify 55 external/cpan/perl-NetAddr-IP :sles8-i386 :--verify 56 56 57 57 # neededforbuild libnetpbm libpng-devel-packages nasm netpbm 58 # part of UL1.0, SPx 58 59 #external/SuSE/syslinux :sles8-i386 :--clean 59 60
Note:
See TracChangeset
for help on using the changeset viewer.