#!/usr/bin/env bash #------------------------------------------------------------------------------ # call: make_tarball [-v debug_mode] -j job [-r release] [-o opt_level] \ # [-p patch] [-f flavor] # # build tarballs for the jobs: # # Production cdfSim stnfit trigsim stnmaker stnmaker_prod runMC # # example: # make_tarball -j stnmaker -r 5.1.0pre10 # make_tarball -j MCProd -r v5_3_3_v2 # make_tarball -j AC++Dump -r v5_3_3_v2 # make_tarball -j MCProd -r v5_3_3 -p ewk # make_tarball -j Production -r 6.1.0pre2 -o maxopt # make_tarball -j CandsExe -r 6.1.4 -o maxopt # # if CDF_TARBALL_DIR variable is defined, tarball is moved to there # -f : non-default flavor: KCC_4_0 , for example # # add MySQL client, if available #----------------------------------------------------------------------- export WORK_DIR=$PWD export JOB= export RELEASE= export DEBUG_SCRIPT=none export RELEASE=`cat ./.base_release` export OPTMODE=default export FLAVOR= export PATCH= cmd="echo ... do nothing" files="" #----------------------------------------------------------------------- . $WORK_DIR/cdfopr/scripts/common_procedures #----------------------------------------------------------------------- export OPTIND=1 while getopts :f:j:o:p:r:v: OPT; do case $OPT in f) # version export FLAVOR=$OPTARG if [ $DEBUG_SCRIPT != "none" ] ; then echo FLAVOR=$FLAVOR ; fi ;; j) # version export JOB=$OPTARG if [ $DEBUG_SCRIPT != "none" ] ; then echo JOB=$OPTARG ; fi ;; o) # VERSION export OPTMODE=$OPTARG if [ $DEBUG_SCRIPT != "none" ] ; then echo OPTMODE=$OPTMODE ; fi ;; p) # patch export PATCH=$OPTARG if [ $DEBUG_SCRIPT != "none" ] ; then echo PATCH=$PATCH ; fi ;; r) # VERSION export RELEASE=$OPTARG if [ $DEBUG_SCRIPT != "none" ] ; then echo RELEASE=$OPTARG ; fi ;; v) # debug script, # should go first export DEBUG_SCRIPT=$OPTARG ;; *) echo OTHER: $OPT $OPTARG usage echo **** bailing out **** ; exit -1 ;; esac done #------------------------------------------------------------------------------ label=$RELEASE if [ .$PATCH != "." ] ; then label=${RELEASE}_$PATCH ; cmd=$cmd" -p $PATCH" ; fi if [ $OPTMODE != "default" ] ; then label=${label}_${OPTMODE} cmd=$cmd" -o $OPTMODE" ; fi source ~cdfsoft/cdf2.shrc setup cdfsoft2 $RELEASE srt_setup -a SRT_QUAL=$OPTMODE #------------------------------------------------------------------------------ # make sure $BUILD_DIR exists and is cleaned up #------------------------------------------------------------------------------ export BUILD_DIR=$WORK_DIR/build_$JOB if [ -d $BUILD_DIR ] ; then rm -rf $BUILD_DIR/* ; else mkdir $BUILD_DIR fi case $JOB in AC++Dump ) cmd="$WORK_DIR/cdfopr/scripts/make_ac++dump_tarball" cmd=$cmd" -r $RELEASE" if [ .$PATCH != "." ] ; then cmd=$cmd" -p $PATCH" ; fi cmd=$cmd" -o $OPTMODE" label=$RELEASE if [ .$PATCH != "." ] ; then label=${RELEASE}$PATCH ; fi tarball=AC++Dump_$label.tar.gz ;; Production ) cmd="$WORK_DIR/cdfopr/scripts/make_production_tarball" cmd=$cmd" -r $RELEASE" if [ .$PATCH != "." ] ; then cmd=$cmd" -p $PATCH" ; fi cmd=$cmd" -o $OPTMODE" label=$RELEASE if [ .$PATCH != "." ] ; then label=${RELEASE}$PATCH ; fi tarball=ProductionExe_$label.tar.gz ;; CalibExe ) cmd="$WORK_DIR/cdfopr/scripts/make_calibexe_dc_tarball" cmd=${cmd}" -r $RELEASE -o $OPTMODE " label=$RELEASE if [ .$PATCH != "." ] ; then label=${RELEASE}_$PATCH; fi if [ .$OPTMODE != "." ] ; then label=${RELEASE}_$PATCH_$OPTMODE; fi tarball=CalibExe_$label.tar.gz ;; BeamExe ) cmd="$WORK_DIR/cdfopr/scripts/make_beamexe_tarball" cmd=$cmd" -r $RELEASE" if [ .$PATCH != "." ] ; then cmd=$cmd" -p $PATCH" ; fi cmd=$cmd" -o $OPTMODE" label=$RELEASE if [ .$PATCH != "." ] ; then label=${RELEASE}$PATCH ; fi tarball=BeamExe_$label.tar.gz ;; MCProd ) #----------------------------------------------------------------------- # create Reda's $tarball (not zipped !), add few more things and gzip it # remember that that gzip changes the file name #----------------------------------------------------------------------- tarball=$WORK_DIR/${JOB}_$label.tar mcProduction/scripts/build_tarball -t $tarball -z yes rc=$? tarball=$tarball.gz cmd="echo MCProd: built by mcProduction/scripts/build_tarball -t $tarball -z yes" ;; root ) #------------------------------------------------------------------------------ # this is still to be modified #------------------------------------------------------------------------------ tarball=${JOB}_$label.tgz files="cdfopr \ shlib \ .base_release .cafrc .rootrc rootlogon.C GNUmakefile \ Stntuple Electroweak" get_mysql cmd="tar -zhcf $tarball $files" ;; mysql ) tarball=$WORK_DIR/${JOB}_$label.tgz mkdir -p $BUILD_DIR/bin/$BFARCH mkdir -p $BUILD_DIR/shlib/$BFARCH #----------------------------------------------------------------------- # get_mysql appends to the 'files' MySQL executables # and copies MySQL libraries into $BUILD_DIR/shlib/$BFARCH # everything in $BUILD_DIR is put into tarball #----------------------------------------------------------------------- cd $BUILD_DIR get_mysql cmd="create_tarball $BUILD_DIR $tarball zip" ;; #------------------------------------------------------------------------------ # 2008-06-15: add histogram files used for tuning MC to the tarball # 2009-11-19: list of the user analysis packages is included #------------------------------------------------------------------------------ stnfit ) tarball=$WORK_DIR/${JOB}_$label.tgz list_of_ana_pkgs=`cat $WORK_DIR/.rootrc | grep Stnana.Package | \ awk '{if (substr($0,1,1)!="#") print $2}'` cd $BUILD_DIR mkdir -p $BUILD_DIR/Stntuple mkdir -p $BUILD_DIR/bin/$BFARCH mkdir -p hist/dev_242 mkdir -p CalTrigger/memories for pkg in $list_of_ana_pkgs ; do mkdir -p $pkg/ana ; done files="cdfopr \ bin/$BFARCH/stnfit.exe shlib \ .base_release .cafrc .rootrc rootlogon.C GNUmakefile \ Stntuple/scripts Stntuple/ana Stntuple/db Electroweak" for pkg in $list_of_ana_pkgs ; do files=$files" "$pkg/ana/scripts ; done cdfsoft2_files='CalTrigger/memories/LUTblock.file' #------------------------------------------------------------------------------ # 2008-06-15: this file (W->taunu MC, no tuning) is used to tune the W->tau nu MC # so far no files to tune jet MC, may need to add #------------------------------------------------------------------------------ hist_files="hist/dev_242/we0s9t_t20r10_72.mjet_wtaunu_3.hist \ hist/dev_242/we0s9t_t20r10_300.mjet_wtaunu_3.hist " for f in $files ; do ln -s $WORK_DIR/$f $f ; done for f in $cdfsoft2_files ; do ln -s $CDFSOFT2_DIR/$f $f ; done for f in $hist_files ; do ln -s $WORK_DIR/$f $f ; done #----------------------------------------------------------------------- # binaries for which shared libs also need to be available #----------------------------------------------------------------------- exec_list="" for exe in stnfit.exe mysql ruby ; do exec_list=$exec_list" "$BUILD_DIR/bin/$BFARCH/$exe done echo ... \$exec_list=$exec_list #----------------------------------------------------------------------- # get_mysql appends to the 'files' MySQL executables # and copies MySQL libraries into $BUILD_DIR/shlib/$BFARCH #----------------------------------------------------------------------- get_mysql get_ruby cmd="create_tarball $BUILD_DIR $tarball zip" ;; stnfit-igor ) tarball=$WORK_DIR/${JOB}_$label.tar files="cdfopr \ bin/$BFARCH/stnfit.exe shlib \ .base_release .cafrc .rootrc rootlogon.C GNUmakefile \ murat/ana/scripts \ Stntuple/scripts Stntuple/ana Stntuple/db Electroweak \ stnmaker_prod-prod-zewk0d.0045.s" get_mysql cmd="tar -zhcf $tarball $files" ;; stnmaker ) tarball=$WORK_DIR/${JOB}_$label.tgz files="bin/$BFARCH/stnmaker.exe \ cdfopr TclUtils \ Stntuple/test/stnmaker \ Stntuple/scripts \ ./GNUmakefile ./.base_release .cafrc" get_mysql cmd="tar -zhcf $tarball $files" ;; ######################################################################### stnmaker_prod ) tarball=$WORK_DIR/${JOB}_$label.tar.gz #------------------------------------------------------------------------------ # make subdirectories #------------------------------------------------------------------------------ if [ -d $BUILD_DIR ] ; then rm -rf $BUILD_DIR/* ; else mkdir $BUILD_DIR fi mkdir -p $BUILD_DIR/Stntuple/test mkdir -p $BUILD_DIR/bin/$BFARCH mkdir -p $BUILD_DIR/shlib/$BFARCH mkdir -p $BUILD_DIR/lib/$BFARCH mkdir -p $BUILD_DIR/include mkdir -p $BUILD_DIR/dbt mkdir -p $BUILD_DIR/CLHEP/HepPDT/data mkdir -p $BUILD_DIR/DBManager/farmsonly mkdir -p $BUILD_DIR/RootObjs/Event #------------------------------------------------------------------------------ # create symbolic links for subdirectories #------------------------------------------------------------------------------ files="Stntuple/test/prod \ Stntuple/scripts \ cdfopr cdfprd TclUtils" for f in $files ; do ln -s $WORK_DIR/$f $BUILD_DIR/$f done for f in RootObjs/Event/ROOT_Interface.C ; do ln -s $CDFSOFT2_DIR/$f $BUILD_DIR/$f done #------------------------------------------------------------------------------ # create symbolic links for binaries #------------------------------------------------------------------------------ cd $BUILD_DIR/bin/$BFARCH ln -s $CDFSOFT2_DIR/bin/$BFARCH/Edm_DescribeFile ln -s $CDFSOFT2_DIR/bin/$BFARCH/getFileInfo ln -s $DCAP_DIR/bin/dccp ln -s $WORK_DIR/cdfopr/scripts/DFCQuery ln -s $WORK_DIR/bin/$BFARCH/stnmaker_prod.exe ln -s $WORK_DIR/bin/$BFARCH/getStnFileInfo ln -s $WORK_DIR/bin/$BFARCH/cdfopr ln -s $WORK_DIR/bin/$BFARCH/cdfprd ln -s `which sqlplus` #------------------------------------------------------------------------------ # create symbolic links for shared libs which may be loaded by request #------------------------------------------------------------------------------ ln -s $ROOTSYS/lib/libPostscript.so $BUILD_DIR/shlib/$BFARCH/libPostscript.so cp $WORK_DIR/GNUmakefile $BUILD_DIR/. cp $WORK_DIR/.base_release $BUILD_DIR/. cp $WORK_DIR/cdfopr/farm/SamPostRun $BUILD_DIR/. cp $WORK_DIR/cdfopr/farm/SamPreRun $BUILD_DIR/. echo tarring up $CDFGEOM echo "--------------------------------------------" cp $CDFGEOM $BUILD_DIR/dbt/geom99.dab cp $TNS_ADMIN/tnsnames.ora $BUILD_DIR/dbt/tnsnames.ora cp $BFIELDM $BUILD_DIR/dbt/bfieldmap.dbt cp $HEPTBL $BUILD_DIR/dbt/heptabl.dbt cp $PARTICLEDB_DIR/src/partprop.dbt $BUILD_DIR/dbt/partprop.dbt cp $PROJECT_DIR/CLHEP/HepPDT/data/pdg_mass.tbl $BUILD_DIR/CLHEP/HepPDT/data/. cp $DBMANAGER_DIR/iomap_cdfofprd_direct.txt $BUILD_DIR/DBManager/farmsonly/ #----------------------------------------------------------------------- # binaries for which shared libs also need to be available #----------------------------------------------------------------------- exec_list="" for exe in stnmaker_prod.exe sqlplus mysql getFileInfo getStnFileInfo dccp ; do exec_list=$exec_list" "$BUILD_DIR/bin/$BFARCH/$exe done echo ... \$exec_list=$exec_list #----------------------------------------------------------------------- # Oracle, diskcache_i, dcap, fcp, root includes # some of DCACHE and DCAP libs are loaded at run-time, # not at startup, so they do not appear in ldd listing # do not need L3 part of RCPDB #----------------------------------------------------------------------- cd $BUILD_DIR get_oracle get_mysql get_fcp get_diskcache_and_dcap_libs get_root_include_files get_rcpdb 0 #----------------------------------------------------------------------- # get all other shared libraries #----------------------------------------------------------------------- get_shared_libs $exec_list #----------------------------------------------------------------------- # copy Python, $PYTHON_DIR will be $PWD/python # on SL3 setup cdfsoft2 doesn't setup python, do it by hands to ensure # use of known version of Python # copy SAM stuff, error checking binary #----------------------------------------------------------------------- get_python get_sam # setup ecrc v3_1 echo tarring up ecrc: $SETUP_ECRC cp $ECRC_DIR/ecrc $BUILD_DIR/bin/$BFARCH #----------------------------------------------------------------------- # Creating source_me_bash # want all the paths and directory names to be short - start from "./" # assume execution on the Farm happens in ./ (what BUILD_DIR is) - this # is an important assumption ! # do not pack L3 rcpdb... #------------------------------------------------------------------------------ . $WORK_DIR/cdfopr/scripts/create_production_source_me_bash $BUILD_DIR/source_me 0 #------------------------------------------------------------------------------ # finally make list of directories to be deleted in the end of the job and # pack contents of build_dir # we are in $BUILD_DIR now... #---------------------------------------------------------------------- cmd="create_tarball $BUILD_DIR $tarball zip" cd $WORK_DIR ;; ######################################################################### tntmaker_prod ) tarball=$WORK_DIR/tntmaker_prod_$label.tar.gz #------------------------------------------------------------------------------ # make subdirectories #------------------------------------------------------------------------------ if [ -d $BUILD_DIR ] ; then rm -rf $BUILD_DIR/* ; else mkdir $BUILD_DIR fi mkdir -p $BUILD_DIR/bin/$BFARCH mkdir -p $BUILD_DIR/shlib/$BFARCH mkdir -p $BUILD_DIR/lib/$BFARCH mkdir -p $BUILD_DIR/include mkdir -p $BUILD_DIR/dbt mkdir -p $BUILD_DIR/CLHEP/HepPDT/data mkdir -p $BUILD_DIR/DBManager/farmsonly mkdir -p $BUILD_DIR/RootObjs/Event mkdir -p $BUILD_DIR/tcl ln -s $WORK_DIR/TopMods/test/cafsubmit_SAM.csh $BUILD_DIR ln -s $WORK_DIR/TopMods/test/run_topeventmodule_SAM.caf $BUILD_DIR ln -s $WORK_DIR/TopMods/test/topevent_SAM.tcl $BUILD_DIR/tcl ln -s $WORK_DIR/TopMods/test/runRefit_533.tcl $BUILD_DIR/tcl ln -s $WORK_DIR/TopMods/test/hitres.txt $BUILD_DIR/tcl ln -s $WORK_DIR/TopMods/test/topntuple_farm_setup.sh $BUILD_DIR ln -s $WORK_DIR/TopMods/test/farm_output_list_top.lst $BUILD_DIR # this assumes TopFind was built from the script so this dir exists ln -s ~/rcpdb $BUILD_DIR/personal_rcpdb #------------------------------------------------------------------------------ # create symbolic links for subdirectories #------------------------------------------------------------------------------ files="cdfopr cdfprd" for f in $files ; do ln -s $WORK_DIR/$f $BUILD_DIR/$f done for f in RootObjs/Event/ROOT_Interface.C ; do ln -s $CDFSOFT2_DIR/$f $BUILD_DIR/$f done #------------------------------------------------------------------------------ # create symbolic links for binaries #------------------------------------------------------------------------------ cd $BUILD_DIR/bin/$BFARCH ln -s $CDFSOFT2_DIR/bin/$BFARCH/Edm_DescribeFile ln -s $CDFSOFT2_DIR/bin/$BFARCH/getFileInfo ln -s $DCAP_DIR/bin/dccp ln -s $WORK_DIR/cdfopr/scripts/DFCQuery ln -s $WORK_DIR/bin/$BFARCH/TopFind ln -s $WORK_DIR/bin/$BFARCH/getTntFileInfo ln -s $WORK_DIR/bin/$BFARCH/cdfopr ln -s $WORK_DIR/bin/$BFARCH/cdfprd #------------------------------------------------------------------------------ # create symbolic links for shared libs which may be loaded by request #------------------------------------------------------------------------------ ln -s $ROOTSYS/lib/libPostscript.so $BUILD_DIR/shlib/$BFARCH/libPostscript.so cp $WORK_DIR/GNUmakefile $BUILD_DIR/. cp $WORK_DIR/.base_release $BUILD_DIR/. cp $WORK_DIR/cdfopr/farm/SamPostRun $BUILD_DIR/. cp $WORK_DIR/cdfopr/farm/SamPreRun $BUILD_DIR/. echo tarring up $CDFGEOM echo "--------------------------------------------" cp $CDFGEOM $BUILD_DIR/dbt/geom99.dab cp $TNS_ADMIN/tnsnames.ora $BUILD_DIR/dbt/tnsnames.ora cp $BFIELDM $BUILD_DIR/dbt/bfieldmap.dbt cp $HEPTBL $BUILD_DIR/dbt/heptabl.dbt cp $PARTICLEDB_DIR/src/partprop.dbt $BUILD_DIR/dbt/partprop.dbt cp $PROJECT_DIR/CLHEP/HepPDT/data/pdg_mass.tbl $BUILD_DIR/CLHEP/HepPDT/data/. cp $DBMANAGER_DIR/iomap_cdfofprd_direct.txt $BUILD_DIR/DBManager/farmsonly/ #----------------------------------------------------------------------- # binaries for which shared libs also need to be available #----------------------------------------------------------------------- exec_list="" for exe in TopFind sqlplus mysql getFileInfo getTntFileInfo dccp ; do exec_list=$exec_list" "$BUILD_DIR/bin/$BFARCH/$exe done echo ... \$exec_list=$exec_list #----------------------------------------------------------------------- # Oracle, diskcache_i, dcap, fcp, root includes # some of DCACHE and DCAP libs are loaded at run-time, # not at startup, so they do not appear in ldd listing # do not need L3 part of RCPDB #----------------------------------------------------------------------- cd $BUILD_DIR get_oracle get_mysql get_fcp get_diskcache_and_dcap_libs get_root_include_files get_rcpdb 0 #----------------------------------------------------------------------- # get all other shared libraries #----------------------------------------------------------------------- get_shared_libs $exec_list #----------------------------------------------------------------------- # copy Python, $PYTHON_DIR will be $PWD/python # on SL3 setup cdfsoft2 doesn't setup python, do it by hands to ensure # use of known version of Python # copy SAM stuff, error checking binary #----------------------------------------------------------------------- get_python get_sam # setup ecrc v3_1 echo tarring up ecrc: $SETUP_ECRC cp $ECRC_DIR/ecrc $BUILD_DIR/bin/$BFARCH #----------------------------------------------------------------------- # Creating source_me_bash # want all the paths and directory names to be short - start from "./" # assume execution on the Farm happens in ./ (what BUILD_DIR is) - this # is an important assumption ! # do not pack L3 rcpdb... #------------------------------------------------------------------------------ . $WORK_DIR/cdfopr/scripts/create_production_source_me_bash $BUILD_DIR/source_me 0 #------------------------------------------------------------------------------ # finally make list of directories to be deleted in the end of the job and # pack contents of build_dir # we are in $BUILD_DIR now... #---------------------------------------------------------------------- $WORK_DIR/cdfopr/farm/do_remove_list.csh DOT_FILES=".base_release" cmd="create_tarball $BUILD_DIR $tarball zip" cd $WORK_DIR ;; ######################################################################### CandsExe ) tarball=$WORK_DIR/CandsExe_$label.tar.gz #------------------------------------------------------------------------------ # these setups need to stay coordinated with the INSTALL script #------------------------------------------------------------------------------ echo "**************************************" echo "INSTALL setups repeated here, check if they are coordinated" echo "**************************************" source ~cdfsoft/cdf2.shrc setup neurobayes_expert v1_8b -q GCC_3_4_3 export NEUROBAYES_DIR=$NEUROBAYES_EXPERT_DIR setup lhapdf_cdf v4_1a -q GCC3_4_3 #------------------------------------------------------------------------------ # make subdirectories #------------------------------------------------------------------------------ if [ -d $BUILD_DIR ] ; then rm -rf $BUILD_DIR/* ; else mkdir $BUILD_DIR fi mkdir -p $BUILD_DIR/BottomMods mkdir -p $BUILD_DIR/bin/$BFARCH mkdir -p $BUILD_DIR/shlib/$BFARCH mkdir -p $BUILD_DIR/lib/$BFARCH mkdir -p $BUILD_DIR/include mkdir -p $BUILD_DIR/dbt mkdir -p $BUILD_DIR/CLHEP/HepPDT/data mkdir -p $BUILD_DIR/DBManager/farmsonly mkdir -p $BUILD_DIR/RootObjs/Event #------------------------------------------------------------------------------ # create symbolic links for subdirectories #------------------------------------------------------------------------------ chmod a+x ./cdfopr/farm/do_exe.sh files="BottomMods/prod cdfopr cdfprd TclUtils" for f in $files ; do ln -s $WORK_DIR/$f $BUILD_DIR/$f done for f in RootObjs/Event/ROOT_Interface.C ; do ln -s $CDFSOFT2_DIR/$f $BUILD_DIR/$f done #------------------------------------------------------------------------------ # create symbolic links for binaries #------------------------------------------------------------------------------ cd $BUILD_DIR/bin/$BFARCH ln -s $CDFSOFT2_DIR/bin/$BFARCH/Edm_DescribeFile ln -s $CDFSOFT2_DIR/bin/$BFARCH/getFileInfo ln -s $DCAP_DIR/bin/dccp ln -s $WORK_DIR/cdfopr/scripts/DFCQuery ln -s $WORK_DIR/bin/$BFARCH/CandsExe ln -s $WORK_DIR/bin/$BFARCH/getStnFileInfo ln -s $WORK_DIR/bin/$BFARCH/cdfopr ln -s $WORK_DIR/bin/$BFARCH/cdfprd #------------------------------------------------------------------------------ # create symbolic links for shared libs which may be loaded by request #------------------------------------------------------------------------------ ln -s $ROOTSYS/lib/libPostscript.so $BUILD_DIR/shlib/$BFARCH/libPostscript.so cp $WORK_DIR/GNUmakefile $BUILD_DIR/. cp $WORK_DIR/.base_release $BUILD_DIR/. cp $WORK_DIR/cdfopr/farm/SamPostRun $BUILD_DIR/. cp $WORK_DIR/cdfopr/farm/SamPreRun $BUILD_DIR/. echo tarring up $CDFGEOM echo "--------------------------------------------" cp $CDFGEOM $BUILD_DIR/dbt/geom99.dab cp $TNS_ADMIN/tnsnames.ora $BUILD_DIR/dbt/tnsnames.ora cp $BFIELDM $BUILD_DIR/dbt/bfieldmap.dbt cp $HEPTBL $BUILD_DIR/dbt/heptabl.dbt cp $PARTICLEDB_DIR/src/partprop.dbt $BUILD_DIR/dbt/partprop.dbt cp $PROJECT_DIR/CLHEP/HepPDT/data/pdg_mass.tbl $BUILD_DIR/CLHEP/HepPDT/data/. cp $DBMANAGER_DIR/iomap_cdfofprd_direct.txt $BUILD_DIR/DBManager/farmsonly/ #----------------------------------------------------------------------- # binaries for which shared libs also need to be available #----------------------------------------------------------------------- exec_list="" for exe in CandsExe sqlplus mysql getFileInfo getStnFileInfo dccp ; do exec_list=$exec_list" "$BUILD_DIR/bin/$BFARCH/$exe done echo ... \$exec_list=$exec_list #----------------------------------------------------------------------- # Oracle, diskcache_i, dcap, fcp, root includes # some of DCACHE and DCAP libs are loaded at run-time, # not at startup, so they do not appear in ldd listing # do not need L3 part of RCPDB #----------------------------------------------------------------------- cd $BUILD_DIR get_oracle get_mysql get_fcp get_diskcache_and_dcap_libs get_root_include_files get_rcpdb 0 #----------------------------------------------------------------------- # get all other shared libraries #----------------------------------------------------------------------- get_shared_libs $exec_list #----------------------------------------------------------------------- # copy Python, $PYTHON_DIR will be $PWD/python # on SL3 setup cdfsoft2 doesn't setup python, do it by hands to ensure # use of known version of Python # copy SAM stuff, error checking binary #----------------------------------------------------------------------- get_python get_sam # setup ecrc v3_1 echo tarring up ecrc: $SETUP_ECRC cp $ECRC_DIR/ecrc $BUILD_DIR/bin/$BFARCH #----------------------------------------------------------------------- # Creating source_me_bash # want all the paths and directory names to be short - start from "./" # assume execution on the Farm happens in ./ (what BUILD_DIR is) - this # is an important assumption ! # do not pack L3 rcpdb... #------------------------------------------------------------------------------ . $WORK_DIR/cdfopr/scripts/create_production_source_me_bash $BUILD_DIR/source_me 0 #------------------------------------------------------------------------------ # finally make list of directories to be deleted in the end of the job and # pack contents of build_dir # we are in $BUILD_DIR now... #---------------------------------------------------------------------- $WORK_DIR/cdfopr/farm/do_remove_list.csh DOT_FILES=".base_release" cmd="create_tarball $BUILD_DIR $tarball zip" cd $WORK_DIR ;; test_caf ) tarball=$WORK_DIR/${JOB}.tgz files=" cdfopr ./GNUmakefile ./.base_release .cafrc" get_mysql cmd="tar -zhcf $tarball $files" ;; * ) echo job=$OPTARG is not known ;; esac #------------------------------------------------------------------------------ # build the tarball #------------------------------------------------------------------------------ if [ $DEBUG_SCRIPT != "none" ] ; then echo $cmd ; fi if [ $DEBUG_SCRIPT != "debug_only" ] ; then if [ ."$cmd" != "." ] ; then $cmd ; if [ .$mysql != "." ] ; then rm bin/$BFARCH/mysql $mysql_client fi fi rc=$? ; echo tarball $tarball created with code=$rc ls -l $tarball if [[ $rc == 0 && .$CDF_TARBALL_DIR != "." ]] ; then echo moving $tarball to $CDF_TARBALL_DIR mv $tarball $CDF_TARBALL_DIR/. fi fi echo ...all done... #-----------------------------------------------------------------------