Changeset 664 for trunk/technical/common
- Timestamp:
- Sep 1, 2003, 3:34:07 PM (21 years ago)
- Location:
- trunk/technical/common/build
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/technical/common/build/buildall.pl
r660 r664 2 2 # automatisches buildskript fuer smartclient 3 3 # liest die konfiguration aus der mit -b übergebenen Datei 4 # $Id: buildall.pl,v 1.1 8 2003/08/18 13:34:39joergs Exp $4 # $Id: buildall.pl,v 1.19 2003/09/01 13:34:07 joergs Exp $ 5 5 # Philipp Storz, SuSE Linux AG 6 6 # pstorz@suse.de … … 16 16 17 17 format TABELLE = 18 @<<<<<<<<<<<<<<<<<< <<<<<<<< @<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<18 @<<<<<<<<<<<<<<<<<< @<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 19 19 $wert1, $wert2, $wert3 20 20 . … … 22 22 23 23 # Programmoptionen: 24 # -b (buildlist) 25 # -x (buildlog im seperaten xtern 24 # -b (buildlist) 25 # -x (buildlog im seperaten xtern 26 # -d Zielpfad um Install Source zu erzeugen 26 27 27 28 my $workdir=`pwd`; … … 34 35 #$workdir=""; 35 36 36 my $ DEST_DIR="/tmp/smartclient_build/";37 37 my $BUILD_DEST_DIR="/tmp/smartclient_build/"; 38 my $INSTALL_SRC_SKEL_DIR="/net/dist/data/dist/sles/8/skeleton-i386/smartclient/"; 38 39 39 40 my $build = "build.sh"; 40 our ( $opt_b, $opt_x);41 our ( $opt_x, $opt_b, $opt_d ); 41 42 my @ArrayofBuilds; 42 getopts('b:x'); 43 44 45 if (!$opt_b) { 46 $opt_b = "buildlist"; 47 print "using default buildlist: buildlist\n\n"; 48 print "other buildlist can be specified with -b buildlist\n\n"; 43 getopts('xb:d:'); 44 45 46 47 if (!$opt_b && !$opt_d) { 48 print <<EOF 49 Usage: 50 -b BUILDLIST 51 compiles packages specified in BUILDLIST 52 -d INSTALL_SRC_DEST_DIR 53 creates a new install source in INSTALL_SRC_DEST_DIR 54 EOF 49 55 }; 50 56 57 58 59 # 60 # build packages from buildlist 61 # 62 63 if( $opt_b ) { 51 64 (open(BUILDLIST,$opt_b)) || die "Die Buildlist $opt_b konnte nicht gefunden werden"; 52 65 … … 71 84 72 85 print "What will be done:\n\n"; 73 ($wert1,$wert2,$wert3)= (" Path","Distribuition","Buildoptions");86 ($wert1,$wert2,$wert3)= ("BUILD_DIST","BUILD_MODE","Package"); 74 87 $~="TABELLE"; 75 88 write; 76 print "\n";77 89 for my $i (0 .. $#ArrayofBuilds) 78 90 { 79 ($wert1,$wert2,$wert3)= ($ArrayofBuilds[$i][ 0],$ArrayofBuilds[$i][1],$ArrayofBuilds[$i][2]);91 ($wert1,$wert2,$wert3)= ($ArrayofBuilds[$i][1],$ArrayofBuilds[$i][2],$ArrayofBuilds[$i][0]); 80 92 $~="TABELLE"; 81 93 write; … … 88 100 if ($answer ne "y") {die("canceled")}; 89 101 90 $ENV{'DEST_DIR'}=$ DEST_DIR;102 $ENV{'DEST_DIR'}=$BUILD_DEST_DIR; 91 103 92 104 my $mypath; … … 110 122 print "$_ \n"; 111 123 tr/\//\_/; 112 `mkdir -p $ DEST_DIR`;113 my $logfilename = "$ DEST_DIR/$_$ArrayofBuilds[$i][1].log";124 `mkdir -p $BUILD_DEST_DIR`; 125 my $logfilename = "$BUILD_DEST_DIR/$_$ArrayofBuilds[$i][1].log"; 114 126 115 127 my $build_cmd="cd $mypath && $build"; … … 122 134 } 123 135 124 # if mypath is not a directory, so it is a src.rpm (hopefully)136 # if mypath is not a directory, so it is a .src.rpm (hopefully) 125 137 if( ! -d $mypath ) { 126 138 my $base = basename($mypath); … … 154 166 if ( $retval == 0 ) 155 167 { 156 $ArrayofBuilds[$i][3] = "SUCCESS $ArrayofBuilds[$i][0]:OK";168 $ArrayofBuilds[$i][3] = "OK"; 157 169 print"****** ******\n"; 158 170 print"****** building of $ArrayofBuilds[$i][0]: OK \n" ; … … 161 173 else 162 174 { 163 $ArrayofBuilds[$i][3] ="ERROR $ArrayofBuilds[$i][0]: *FAILED*\n";175 $ArrayofBuilds[$i][3] = "*FAILED*"; 164 176 print"****** ******\n"; 165 177 print"\n\n\nERROR: building of $ArrayofBuilds[$i][0]: *FAILED*\n"; … … 172 184 173 185 174 ($wert1,$wert2,$wert3)= (" Path","Distribuition","Result");186 ($wert1,$wert2,$wert3)= ("BUILD_DIST","Result","Package"); 175 187 $~="TABELLE"; 176 188 write; 177 print "\n";178 189 179 190 for my $i (0 .. $#ArrayofBuilds) 180 191 { 181 ($wert1,$wert2,$wert3)= ($ArrayofBuilds[$i][0],$ArrayofBuilds[$i][1],$ArrayofBuilds[$i][3]); 192 #($wert1,$wert2,$wert3)= ($ArrayofBuilds[$i][0],$ArrayofBuilds[$i][1],$ArrayofBuilds[$i][3]); 193 ($wert1,$wert2,$wert3) = ($ArrayofBuilds[$i][1],$ArrayofBuilds[$i][3],$ArrayofBuilds[$i][0]); 182 194 $~="TABELLE"; 183 195 write; … … 186 198 187 199 print "buildall.pl terminated\n"; 200 } 201 202 203 204 # 205 # generating install source 206 # 207 208 if( $opt_d ) { 209 210 my $INSTALL_SRC_DEST_DIR=$opt_d; 211 chomp $INSTALL_SRC_DEST_DIR; 212 213 # create target directory 214 run_command( "mkdir -p $INSTALL_SRC_DEST_DIR" ); 215 # copy skeletion to dest 216 run_command( "rsync -av $INSTALL_SRC_SKEL_DIR $INSTALL_SRC_DEST_DIR" ); 217 218 # copy build packages to dest 219 foreach my $i ( "i386", "i486", "i586", "i686", "noarch", "src" ) { 220 run_command( "mkdir -p $INSTALL_SRC_DEST_DIR/suse/$i" ); 221 run_command( "rsync -av $BUILD_DEST_DIR/*/*.$i.rpm $INSTALL_SRC_DEST_DIR/suse/$i/" ); 222 } 223 224 # create_package_descr (do that has to run on target distribution?) 225 run_command( "cd $INSTALL_SRC_DEST_DIR/suse/; /usr/lib/YaST2/bin/create_package_descr -o $INSTALL_SRC_DEST_DIR/setup/descr" ); 226 } 227 228 229 # 230 # functions 231 # 232 233 # executes a command (single string). 234 # returns 235 # the returncode 236 # and (combined) stdout and stderr 237 238 sub run_command 239 { 240 my $command = shift; 241 242 print "executing command: " . $command . "\n"; 243 244 open(RESULT, $command . ' 2>&1 |' ); 245 my @result = <RESULT>; 246 close(RESULT); 247 my $retcode = $?>>8; 248 249 print @result; 250 if( $retcode ) { print "return code: " . $retcode . "\n"; } 251 252 return($retcode, @result); 253 } 254 255 256 -
trunk/technical/common/build/buildlist_sles8
r663 r664 1 1 # Steuerdatei für autobuildskript 2 # $Id: buildlist_sles8,v 1. 5 2003/08/29 09:10:14 aboernigExp $2 # $Id: buildlist_sles8,v 1.6 2003/09/01 13:34:07 joergs Exp $ 3 3 # Format: 4 4 # … … 33 33 external/SuSE/perl-Digest-MD5 :sles8-i686 :--no-init 34 34 # not needed? 35 #external/SuSE/perl-MIME-Base64 :sles8-i686 35 #external/SuSE/perl-MIME-Base64 :sles8-i686 :--no-init 36 36 # requires perl-Digest-HMAC 37 37 external/SuSE/perl-Net-DNS :sles8-i686 :--clean 38 38 external/SuSE/perl-Net-Netmask :sles8-i686 :--no-init 39 external/SuSE/perl-Unix-Syslog :sles8-i686 :--no-init39 external/SuSE/perl-Unix-Syslog :sles8-i686 :--no-init 40 40 41 41 # needs perl-XML-Parser 42 external/SuSE/perl-ldap :sles8-i686 :-- no-init42 external/SuSE/perl-ldap :sles8-i686 :--clean 43 43 44 44 external/cpan/perl-Net-IP :sles8-i686 :--no-init
Note:
See TracChangeset
for help on using the changeset viewer.