single awips2-cave rpm build for 16.2.2

This commit is contained in:
Michael James 2016-10-17 13:43:25 -05:00
parent 39693f369d
commit 6896c3dff5
15 changed files with 449 additions and 421 deletions

View file

@ -181,6 +181,11 @@
</zip>
<!-- Temp zip file including all the license files -->
<zip destfile="/tmp/alertviz/FOSS_licenses.zip">
<fileset dir="${buildDirectory}/../../../rpms/legal/FOSS_licenses"/>
</zip>
<!-- Update the 64-bit (amd64) win32 CAVE zip with static files -->
<zip destfile="${buildDirectory}/${buildLabel}/${buildId}-win32.win32.x86_64.zip"
update="true">
@ -189,6 +194,7 @@
excludes="cave/**" />
<zipfileset dir="${buildDirectory}/../../../rpms/legal"
includes="Master_Rights_File.pdf" prefix="alertviz"/>
<zipfileset dir="/tmp/alertviz" includes="FOSS_licenses.zip" prefix="alertviz"/>
</zip>
</target>

View file

@ -1,6 +1,5 @@
# This build.properties file is used exclusively by the cave pde p2 builds.
topLevelElementType=feature
buildType=I
buildId=CAVE
buildLabel=${buildType}.${buildId}
@ -14,7 +13,7 @@ skipFetch=true
skipMaps=true
baseos=linux
basews=gtk
basearch=x86
basearch=x86_64
logExtension=.log
javacDebugInfo=false
@ -22,10 +21,10 @@ javacFailOnError=true
javacVerbose=true
javacSource=1.7
javacTarget=1.7
compilerArg=-g:lines,source
compilerArg=-g:lines,source -nowarn
generate.p2.metadata=true
p2.metadata.repo=file:/${buildDirectory}/repository
p2.artifact.repo=file:/${buildDirectory}/repository
p2.publish.artifacts=true
generateVersionsList=true
generateVersionsList=true

View file

@ -6,7 +6,7 @@
<property name="build.ws"
value="gtk" />
<property name="build.arch"
value="x86" />
value="x86_64" />
<property name="build.product"
value="awips.product" />
<!-- Copy the zip file that is produced to this location. -->
@ -73,7 +73,7 @@
<arg value="-DbuildDirectory=${basedir}/cave/tmp" />
<arg value="-Dbase=${basedir}/cave" />
<arg value="-Dconfigs=${build.os},${build.ws},${build.arch}" />
<arg value="-DproductFile=${build.product}" />
<arg value="-Dproduct=${build.product}" />
<classpath>
<pathelement

View file

@ -20,18 +20,13 @@
############# PRODUCT/PACKAGING CONTROL #############
# The product file is specified in the build.xml as a default and is
# overridable setting 'build.product' from ant.
product=${base}/../../com.raytheon.viz.product.awips/${productFile}
#product=${base}/../../com.raytheon.viz.product.awips/developer.product
runPackager=true
#Needed for p2, comment out these lines if using developer.product
p2.gathering=true
generate.p2.metadata = true
p2.metadata.repo=file:${buildDirectory}/repo
p2.artifact.repo=file:${buildDirectory}/repo
p2.metadata.repo=file:${buildDirectory}/repository
p2.artifact.repo=file:${buildDirectory}/repository
p2.flavor=tooling
p2.publish.artifacts=true
@ -49,9 +44,8 @@ collectingFolder=${archivePrefix}
# configs=win32,win32,x86 & linux,motif,x86
# By default the value is *,*,*
#configs = *, *, *
configs=linux, gtk, x86 & \
linux, gtk, x86_64 & \
win32, win32, x86
configs=linux,gtk,x86_64 & \
win32,win32,x86_64
# win32, win32, x86 & \
# linux, gtk, x86_64 & \
# linux, motif, x86 & \

View file

@ -65,63 +65,7 @@
<!-- ===================================================================== -->
<!-- Steps to do after setup but before starting the build proper -->
<!-- ===================================================================== -->
<target name="postSetup">
<echo message="${buildDirectory}"/>
<mkdir dir="${buildDirectory}/plugins"/>
<echo message="com.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="com.*/**"/>
</copy>
<echo message="ucar.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="ucar.*/**"/>
</copy>
<echo message="features.*/**"/>
<copy todir="${buildDirectory}/features">
<fileset dir="${buildDirectory}/../../../" includes="*.feature*/**"/>
</copy>
<echo message="ncsa.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="ncsa.*/**"/>
</copy>
<echo message="org.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="org.*/**"/>
</copy>
<echo message="net.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="net.*/**"/>
</copy>
<echo message="ohd.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="ohd*/**"/>
</copy>
<echo message="javax.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="javax.*/**"/>
</copy>
<echo message="gov.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="gov.*/**"/>
</copy>
<echo message="edu.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="edu.*/**"/>
</copy>
<echo message="ogc.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="ogc.*/**"/>
</copy>
<echo message="de.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="de.*/**"/>
</copy>
<echo message="ch.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="ch.*/**"/>
</copy>
<target name="postSetup">
<antcall target="getBaseComponents" />
</target>
@ -172,34 +116,30 @@
<!-- Steps to do after running assemble. -->
<!-- ===================================================================== -->
<target name="postAssemble">
<!-- Update the 32-bit linux CAVE zip with static files -->
<zip destfile="${buildDirectory}/${buildLabel}/${buildId}-linux.gtk.x86.zip"
update="true">
<fileset dir="${buildDirectory}/../../static/linux"
excludes="alertviz/**" />
<fileset dir="${buildDirectory}/../../static/linux.x86" />
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${builder}/../lib/ant/ant-contrib-1.0b3.jar" />
</zip>
<!-- Update the 64-bit linux CAVE zip with static files -->
<zip destfile="${buildDirectory}/${buildLabel}/${buildId}-linux.gtk.x86_64.zip"
update="true">
<!-- TODO: Is this still necessary? -->
<if>
<available file="${buildDirectory}/${buildLabel}/${buildId}-win32.win32.x86_64.zip" />
<then>
<!-- Temp zip file including all the license files -->
<zip destfile="/tmp/cave/FOSS_licenses.zip">
<fileset dir="${buildDirectory}/../../../rpms/legal/FOSS_licenses"/>
</zip>
<fileset dir="${buildDirectory}/../../static/linux"
excludes="alertviz/**" />
<fileset dir="${buildDirectory}/../../static/linux.x86_64" />
</zip>
<!-- Update the 64-bit (amd64) win32 CAVE zip with static and license files -->
<zip destfile="${buildDirectory}/${buildLabel}/${buildId}-win32.win32.x86_64.zip"
update="true">
<!-- Update the 64-bit (amd64) win32 CAVE zip with static and license files -->
<zip destfile="${buildDirectory}/${buildLabel}/${buildId}-win32.win32.x86_64.zip"
update="true">
<fileset dir="${buildDirectory}/../../static/win32.amd64"
excludes="alertviz/**" />
<zipfileset dir="${buildDirectory}/../../../rpms/legal"
includes="Master_Rights_File.pdf" prefix="cave"/>
</zip>
<fileset dir="${buildDirectory}/../../static/win32.amd64"
excludes="alertviz/**" />
<zipfileset dir="${buildDirectory}/../../../rpms/legal"
includes="Master_Rights_File.pdf" prefix="cave"/>
<zipfileset dir="/tmp/cave" includes="FOSS_licenses.zip" prefix="cave"/>
</zip>
</then>
</if>
</target>
@ -219,281 +159,7 @@
<!-- Steps to do after the build is done. -->
<!-- ===================================================================== -->
<target name="postBuild">
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${builder}/../lib/ant/ant-contrib-1.0b3.jar" />
<taskdef name="xmltask"
classname="com.oopsconsultancy.xmltask.ant.XmlTask">
<classpath>
<pathelement path="${builder}/../lib/ant/xmltask-v1.15.1.jar"/>
<pathelement path="${builder}/../lib/ant/xalan-2.7.2.jar"/>
</classpath>
</taskdef>
<!-- Generate the 32-bit CAVE ini files -->
<var name="cave.arch" value="arch.x86" />
<extractCAVEini
zip.file="${buildDirectory}/${buildLabel}/${buildId}-linux.gtk.x86.zip" />
<!-- add the Xss jvm parameter to the 32-bit CAVE -->
<echo file="/tmp/cave/cave.ini" append="true" message="-Xss512k" />
<antcall target="generateDynamicCAVE" />
<!-- Update the 32-bit CAVE zip file -->
<zip destfile="${buildDirectory}/${buildLabel}/${buildId}-linux.gtk.x86.zip"
basedir="/tmp"
includes="cave/*.ini, cave/*.sh"
update="true" />
<!-- Generate the 64-bit CAVE ini files -->
<var name="cave.arch" value="arch.x86_64" />
<extractCAVEini
zip.file="${buildDirectory}/${buildLabel}/${buildId}-linux.gtk.x86_64.zip" />
<antcall target="generateDynamicCAVE" />
<!-- Update the 64-bit cave.ini file -->
<antcall target="update64BitINI" />
<!-- Update the 64-bit CAVE zip file -->
<zip destfile="${buildDirectory}/${buildLabel}/${buildId}-linux.gtk.x86_64.zip"
basedir="/tmp"
includes="cave/*.ini, cave/*.sh"
update="true" />
</target>
<macrodef name="extractCAVEini">
<attribute name="zip.file" />
<sequential>
<unzip src="@{zip.file}"
dest="/tmp">
<patternset>
<include name="**/cave/cave.ini" />
</patternset>
</unzip>
</sequential>
</macrodef>
<macrodef name="verifyVersion">
<attribute name="file.version" />
<sequential>
<property name="___memorySettingsVersion___"
value="4.0"/>
<if>
<not>
<equals
arg1="${___memorySettingsVersion___}"
arg2="@{file.version}" />
</not>
<then>
<fail
message="ERROR: memorySettings.xml Version Mismatch." />
</then>
</if>
</sequential>
</macrodef>
<target name="generateDynamicCAVE">
<xmlproperty file="${builder}/memorySettings.xml"
collapseAttributes="true"/>
<verifyVersion
file.version="${cave-memory-settings.file-version}" />
<property name="iniLookupScript"
value="/tmp/cave/iniLookup.sh" />
<!-- Start the iniLookup.sh script -->
<echo message="#!/bin/bash${line.separator}"
file="${iniLookupScript}" />
<echo message="${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message="# This auto-generated script will be sourced by caveUtil.sh.${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message="export ASSOCIATED_INI=${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message="${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message="function retrieveAssociatedINI()${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message="{${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message=" # Arguments${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message=" # ${1} == one in the set: {-component, -perspective}${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message=" # ${2} == the argument that corresponds to the first argument${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message="${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message=" # AUTOGENERATED IF STATEMENTS."
file="${iniLookupScript}"
append="true" />
<xmltask source="${builder}/memorySettings.xml">
<call path="//${cave.arch}/memory-setting">
<param name="first-arg"
path="command-line-args/first-arg/text()" />
<param name="second-arg"
path="command-line-args/second-arg/text()" />
<!-- TODO: Explore using copy and buffers to do
the following actions in a better way. -->
<param name="max-memory"
path="ini-substitutions/max-memory/value/text()" />
<param name="max-perm"
path="ini-substitutions/max-perm/value/text()" />
<actions>
<!-- Create a component-specific ini file -->
<copy verbose="true"
file="/tmp/cave/cave.ini"
tofile="/tmp/cave/@{second-arg}.ini"
overwrite="true" />
<!-- Update the ini file -->
<update.ini
ini.file="@{second-arg}.ini"
jvm.arg="${cave-memory-settings.default-memory-setting.default-max-memory.jvm-arg}"
current.value="${cave-memory-settings.default-memory-setting.default-max-memory.value}"
new.value="@{max-memory}" />
<update.ini
ini.file="@{second-arg}.ini"
jvm.arg="${cave-memory-settings.default-memory-setting.default-max-perm.jvm-arg}"
current.value="${cave-memory-settings.default-memory-setting.default-max-perm.value}"
new.value="@{max-perm}" />
<!-- Add to the ini lookup utility script -->
<echo message="${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message=" if [ &quot;$${1}&quot; == &quot;@{first-arg}&quot; ] &amp;&amp;${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message=" [ &quot;$${2}&quot; == &quot;@{second-arg}&quot; ]; then${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message="${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message=" export ASSOCIATED_INI=&quot;@{second-arg}.ini&quot;${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message=" return 0${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message="${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message=" fi${line.separator}"
file="${iniLookupScript}"
append="true" />
</actions>
</call>
<!-- site type specific overrides (wfo, ncep, etc) -->
<call path="//${cave.arch}/site-type-override">
<param name="site-type"
path="site-type/text()" />
<param name="max-memory"
path="ini-substitutions/max-memory/value/text()" />
<param name="max-perm"
path="ini-substitutions/max-perm/value/text()" />
<actions>
<!-- Create a site-type-specific ini file -->
<copy verbose="true"
file="/tmp/cave/cave.ini"
tofile="/tmp/cave/@{site-type}.ini"
overwrite="true" />
<!-- Update the ini file -->
<update.ini
ini.file="@{site-type}.ini"
jvm.arg="${cave-memory-settings.default-memory-setting.default-max-memory.jvm-arg}"
current.value="${cave-memory-settings.default-memory-setting.default-max-memory.value}"
new.value="@{max-memory}" />
<update.ini
ini.file="@{site-type}.ini"
jvm.arg="${cave-memory-settings.default-memory-setting.default-max-perm.jvm-arg}"
current.value="${cave-memory-settings.default-memory-setting.default-max-perm.value}"
new.value="@{max-perm}" />
</actions>
</call>
</xmltask>
<!-- Finish the iniLookup.sh script -->
<echo message="${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message=" return 1${line.separator}"
file="${iniLookupScript}"
append="true" />
<echo message="}"
file="${iniLookupScript}"
append="true" />
</target>
<!-- Used to update cave.ini for the x86_64 cave. -->
<target name="update64BitINI">
<xmlproperty file="${builder}/memorySettings.xml"
collapseAttributes="true"/>
<property name="caveXmx" value="2560M" />
<property name="caveMaxPermSize" value="256m" />
<update.ini
ini.file="cave.ini"
jvm.arg="${cave-memory-settings.default-memory-setting.default-max-memory.jvm-arg}"
current.value="${cave-memory-settings.default-memory-setting.default-max-memory.value}"
new.value="${caveXmx}" />
<update.ini
ini.file="cave.ini"
jvm.arg="${cave-memory-settings.default-memory-setting.default-max-perm.jvm-arg}"
current.value="${cave-memory-settings.default-memory-setting.default-max-perm.value}"
new.value="${caveMaxPermSize}" />
</target>
<macrodef name="update.ini">
<attribute name="ini.file" />
<attribute name="jvm.arg" />
<attribute name="current.value" />
<attribute name="new.value" />
<sequential>
<if>
<not>
<equals arg1="@{new.value}"
arg2="DEFAULT" />
</not>
<then>
<exec executable="/bin/sed"
output="/tmp/cave/ini.tmp">
<arg value="-e" />
<arg value="s/@{jvm.arg}@{current.value}/@{jvm.arg}@{new.value}/" />
<arg value="/tmp/cave/@{ini.file}" />
</exec>
<move verbose="true"
file="/tmp/cave/ini.tmp"
tofile="/tmp/cave/@{ini.file}"
overwrite="true" />
</then>
</if>
</sequential>
</macrodef>
<!-- ===================================================================== -->

View file

@ -1,2 +1,281 @@
#!/bin/bash
/awips2/cave/run.sh -alertviz -component thinclient
# CAVE startup script
# Note: CAVE will not run as 'root'
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to non-U.S. persons whether in the United States or abroad requires
# an export license or other authorization.
#
# Contractor Name: Raytheon Company
# Contractor Address: 6825 Pine Street, Suite 340
# Mail Stop B8
# Omaha, NE 68106
# 402.291.0100
#
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
# further licensing information.
#
#
# SOFTWARE HISTORY
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# Dec 05, 2013 #2593 rjpeter Added check for number of running
# cave sessions.
# Dec 05, 2013 #2590 dgilling Modified so gfeclient.sh can be wrapped
# around this script.
# Jan 24, 2014 #2739 bsteffen Log exit status
# Jan 30, 2014 #2593 bclement warns based on memory usage, fixed for INI files with spaces
# Jul 10, 2014 #3363 bclement logs command used to launch application to console logs
# Oct 10, 2014 #3675 njensen Logback now does console logging to ensure correct pid
# Oct 13, 2014 #3675 bclement startup shutdown log includes both launching pid and placeholder
# Jan 28, 2015 #4018 randerso Added a productEditor log file to changes in the GFE product editor
# Jun 17, 2015 #4148 rferrel Logback needs fewer environment variables.
# Jul 23, 2015 ASM#13849 D. Friedman Use a unique Eclipse configuration directory
# Aug 03, 2015 #4694 dlovely Logback will now add user.home to LOGDIR
# Sep 16, 2015 #4869 bkowal Read dynamic CAVE version information at startup.
# Apr 28, 2016 #5609 bkowal Specify the location of the java.io.tmpdir as a jvm arg.
#
user=`/usr/bin/whoami`
if [ ${user} == 'root' ];then
echo "WARNING: CAVE cannot be run as user '${user}'!"
echo " change to another user and run again."
exit 1
fi
# Since, we no longer need to worry about re-location ...
CAVE_INSTALL="/awips2/cave"
JAVA_INSTALL="/awips2/java"
PYTHON_INSTALL="/awips2/python"
export AWIPS_INSTALL_DIR="${CAVE_INSTALL}"
MAX_MEM_PROPORTION="0.85"
source ${CAVE_INSTALL}/caveUtil.sh
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: unable to find and/or access ${CAVE_INSTALL}/caveUtil.sh."
exit 1
fi
# Run monitorThreads?
runMonitorThreads=false
# copy the viz shutdown utility if necessary.
copyVizShutdownUtilIfNecessary
# delete any old disk caches in the background
deleteOldCaveDiskCaches &
# Enable core dumps
ulimit -c unlimited >> /dev/null 2>&1
export LD_LIBRARY_PATH=${JAVA_INSTALL}/lib:${PYTHON_INSTALL}/lib:${PYTHON_INSTALL}/lib/python2.7/site-packages/jep:$LD_LIBRARY_PATH
if [[ -z "$CALLED_EXTEND_LIB_PATH" ]]; then
extendLibraryPath
fi
export PATH=${JAVA_INSTALL}/bin:${PYTHON_INSTALL}/bin:$PATH
export JAVA_HOME="${JAVA_INSTALL}/jre"
# The user can update this field if they choose to do so.
export HYDRO_APPS_DIR="/awips2/edex/data/share/hydroapps"
export EDEX_HOME=/awips2/edex
export LOCALIZATION_ROOT=~/caveData/common
export PGSQL_DRIVER_DIR=`ls -1d /awips2/cave/plugins/org.postgres_*`
if [ $? -ne 0 ]; then
echo "FATAL: Unable to locate the PostgreSQL JDBC Driver."
exit 1
fi
export apps_dir=${HYDRO_APPS_DIR}
SWITCHES=($SWITCHES)
TESTCHECK="$TMCP_HOME/bin/getTestMode"
if [ -x ${TESTCHECK} ]; then
echo "Calling getTestMode()"
${TESTCHECK}
status=${?}
if [ $status -eq 11 ]; then
MODE="TEST"
SWITCHES+=(-mode TEST)
elif [ $status -eq 12 ];then
MODE="PRACTICE"
SWITCHES+=(-mode PRACTICE)
elif [ $status -eq 15 ];then
MODE="OPERATIONAL"
SWITCHES+=(-mode OPERATIONAL)
else
MODE="OPERATIONAL (no response)"
fi
echo "getTestMode() returned ${MODE}"
else
MODE="UNKNOWN"
echo "getTestMode() not found - going to use defaults"
fi
VERSION_ARGS=()
if [ -f ${CAVE_INSTALL}/awipsVersion.txt ]; then
prevIFS=${IFS}
IFS=$'\n'
for line in `cat ${CAVE_INSTALL}/awipsVersion.txt`; do
VERSION_ARGS+=(${line})
done
IFS=${prevIFS}
fi
export TEXTWS=`hostname | sed -e 's/lx/xt/g'`
hostName=`hostname -s`
# check number of running caves
if [[ -z $IGNORE_NUM_CAVES ]]; then
# get total memory on system in bytes
mem=( `free -b | grep "Mem:"` )
mem=${mem[1]}
# get max amount of system memory used before we warn
memThreshold=$(echo "$mem * $MAX_MEM_PROPORTION" | bc)
# remove decimal
printf -v memThreshold "%.0f" "$memThreshold"
# get launcher.ini argument determined by user arguments
lookupINI "$@"
launcherRegex='--launcher.ini\s(.+\.ini)'
# default to cave.ini
targetIni="/awips2/cave/cave.ini"
if [[ $CAVE_INI_ARG =~ $launcherRegex ]]
then
targetIni="${BASH_REMATCH[1]}"
fi
# read max memory that could be used by this instance
memOfLaunchingCave=$(readMemFromIni "$targetIni")
# read total max memory of caves already running
getTotalMemOfRunningCaves
# add them together
_totalAfterStart=$(($memOfLaunchingCave + $_totalRunningMem))
if [[ "$_totalAfterStart" -ge "$memThreshold" ]]; then
# convert to megs for display
memOfLaunchingCave=$(($memOfLaunchingCave / $BYTES_IN_MB))
_totalRunningMem=$(($_totalRunningMem / $BYTES_IN_MB))
getPidsOfMyRunningCaves
memMsg="$_numPids CAVE applications already running with a combined max memory of ${_totalRunningMem}MB. "
memMsg+="The requested application has a max memory requirement of ${memOfLaunchingCave}MB. "
memMsg+="Starting may impact system performance and stability.\n\nProceed?"
zenity --question --title "Low Available Memory for Application" --text "$memMsg"
cancel="$?"
if [[ "$cancel" == "1" ]]; then
exit
fi
fi
fi
#check for gtk-2.0 value
gtkResource=.gtkrc-2.0
includeLine="include \"$HOME/.gtkrc.mine\""
mineFile=.gtkrc.mine
altButtonLine="gtk-alternative-button-order=1"
if [ -f $HOME/$gtkResource ]; then
if [ -w $HOME/$gtkResource ]; then
var=`grep "gtkrc.mine" $HOME/$gtkResource`
if [ '' == "$var" ]; then
echo $includeLine >> $HOME/$gtkResource
fi
fi
else
touch $HOME/$gtkResource
echo $includeLine >> $HOME/$gtkResource
fi
if [ -f $HOME/$mineFile ]; then
if [ -w $HOME/$mineFile ]; then
var=`grep "alternative-button-order" $HOME/$mineFile`
if [ '' == "$var" ]; then
echo $altButtonLine >> $HOME/$mineFile
fi
fi
else
touch $HOME/$mineFile
echo $altButtonLine >> $HOME/$mineFile
fi
if [[ -z "$PROGRAM_NAME" ]]
then
PROGRAM_NAME="cave"
fi
BASE_LOGDIR=caveData/logs/consoleLogs
# Logback configuration files will append user.home to LOGDIR.
export LOGDIR=$BASE_LOGDIR/$hostName/
FULL_LOGDIR=$HOME/$LOGDIR
# make sure directory exists
if [ ! -d $FULL_LOGDIR ]; then
mkdir -p $FULL_LOGDIR
fi
# delete any old disk caches in the background
deleteOldCaveLogs &
curTime=`date +%Y%m%d_%H%M%S`
pid=$!
export LOGFILE_STARTUP_SHUTDOWN="$FULL_LOGDIR/${PROGRAM_NAME}_${pid}_${curTime}_pid_%PID%_startup-shutdown.log"
createEclipseConfigurationDir
TMP_VMARGS="--launcher.appendVmargs -vmargs -Djava.io.tmpdir=${eclipseConfigurationDir}"
# At this point fork so that log files can be set up with the process pid and
# this process can log the exit status of cave.
(
# can we write to log directory
if [ -w $FULL_LOGDIR ]; then
touch ${LOGFILE_STARTUP_SHUTDOWN}
fi
# remove "-noredirect" flag from command-line if set so it doesn't confuse any
# commands we call later.
redirect="true"
USER_ARGS=()
while [[ $1 ]]
do
if [[ "$1" == "-noredirect" ]]
then
redirect="false"
else
USER_ARGS+=("$1")
fi
shift
done
lookupINI "${USER_ARGS[@]}"
# Make it easy to determine which process is using the directory
if [[ -n $eclipseConfigurationDir ]]; then
echo "$$" > "$eclipseConfigurationDir"/pid
fi
if [[ "${runMonitorThreads}" == "true" ]] ; then
# nohup to allow tar process to continue after user has logged out
nohup ${CAVE_INSTALL}/monitorThreads.sh $pid >> /dev/null 2>&1 &
fi
echo "Launching cave application using the following command: " >> ${LOGFILE_STARTUP_SHUTDOWN}
echo "${CAVE_INSTALL}/cave ${CAVE_INI_ARG} ${SWITCHES[@]} ${USER_ARGS[@]} ${TMP_VMARGS} ${VERSION_ARGS[@]}" >> ${LOGFILE_STARTUP_SHUTDOWN}
if [[ "${redirect}" == "true" ]] ; then
# send output to /dev/null because the logback CaveConsoleAppender will capture that output
exec ${CAVE_INSTALL}/cave ${CAVE_INI_ARG} "${SWITCHES[@]}" "${USER_ARGS[@]}" ${TMP_VMARGS} "${VERSION_ARGS[@]}" >> /dev/null 2>&1
else
# allow output to print to the console/terminal that launched CAVE
exec ${CAVE_INSTALL}/cave ${CAVE_INI_ARG} "${SWITCHES[@]}" "${USER_ARGS[@]}" ${TMP_VMARGS} "${VERSION_ARGS[@]}" 2>&1
fi
) &
pid=$!
logExitStatus $pid $LOGFILE_STARTUP_SHUTDOWN

View file

@ -81,6 +81,12 @@ if [ $? -ne 0 ]; then
exit 1
fi
# install the alertviz autostart script.
viz_rpm_dir="%{_baseline_workspace}/rpms/awips2.cave"
alertviz_project="${viz_rpm_dir}/Installer.alertviz"
script_="${alertviz_project}/scripts/autostart/awips2-alertviz.desktop"
/bin/cp ${script_} %{_build_root}/etc/xdg/autostart
# install the gnome session kill script for cave and alertviz
script_="%{_baseline_workspace}/build/static/linux/cave/awips2VisualizeUtility.sh"
/bin/cp ${script_} %{_build_root}/etc/gdm/PostSession
@ -98,7 +104,22 @@ fi
%post
echo -e "\nInstalling A2 gdm PostSession Default script"
cp /etc/gdm/PostSession/awips2VisualizeUtility.sh /etc/gdm/PostSession/Default
scp /etc/gdm/PostSession/awips2VisualizeUtility.sh /etc/gdm/PostSession/Default
pushd . > /dev/null 2>&1
cd /awips2/alertviz/plugins
# Forcefully unzip: org.eclipse.swt.gtk.linux.x86_64_*.jar
# : if x86_64
if [ -f org.eclipse.swt.gtk.linux.x86_64_%{_swt_version}.jar ]; then
mkdir org.eclipse.swt.gtk.linux.x86_64_%{_swt_version}
unzip -qq org.eclipse.swt.gtk.linux.x86_64_%{_swt_version}.jar \
-d org.eclipse.swt.gtk.linux.x86_64_%{_swt_version}
rm -f org.eclipse.swt.gtk.linux.x86_64_%{_swt_version}.jar
mv org.eclipse.swt.gtk.linux.x86_64_%{_swt_version} \
org.eclipse.swt.gtk.linux.x86_64_%{_swt_version}.jar
fi
popd > /dev/null 2>&1
%preun
%postun
@ -126,4 +147,5 @@ rm -rf ${RPM_BUILD_ROOT}
/awips2/alertviz/alertviz
/awips2/alertviz/*.sh
%attr(644,root,root) /etc/xdg/autostart/awips2-alertviz.desktop
%attr(644,root,root) /etc/gdm/PostSession/awips2VisualizeUtility.sh

View file

@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Version=1.0
Name=No Name
Name[en_US]=CAVE
Exec=/bin/bash -i -c "sleep 1; /awips2/cave/cave.sh"

View file

@ -4,4 +4,4 @@ Encoding=UTF-8
Version=1.0
Name=No Name
Name[en_US]=TextWS
Exec=/bin/bash -i -c "sleep 5; /awips2/cave/textWS.sh"
Exec=/bin/bash -i -c "sleep 2; /awips2/cave/textWS.sh"

View file

@ -37,7 +37,6 @@ provides: awips2-base
requires: awips2-java
requires: awips2-python
requires: openmotif
requires: libMrm.so.4
requires: libXp.so.6
requires: libg2c.so.0
requires: libstdc++
@ -65,6 +64,13 @@ if [ ! -f ${CAVE_DIST_DIR}/%{_component_zip_file_name} ]; then
fi
%build
pushd . > /dev/null 2>&1
cd %{_baseline_workspace}/rpms/awips2.cave/Installer.cave/scripts/memory/iniFileGenerator/src
/awips2/java/bin/javac main/*
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null 2>&1
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2
@ -76,6 +82,14 @@ if [ $? -ne 0 ]; then
exit 1
fi
# autostart scripts.
CAVE_SCRIPTS_DIR="%{_baseline_workspace}/rpms/%{_component_project_dir}/scripts"
CAVE_AUTO_SCRIPT="${CAVE_SCRIPTS_DIR}/autostart/"
cp ${CAVE_AUTO_SCRIPT}/*.desktop ${RPM_BUILD_ROOT}/etc/xdg/autostart
if [ $? -ne 0 ]; then
exit 1
fi
CAVE_DIST_DIR="%{_baseline_workspace}/rpms/awips2.cave/setup/dist"
cp ${CAVE_DIST_DIR}/%{_component_zip_file_name} \
@ -85,6 +99,26 @@ cd ${RPM_BUILD_ROOT}/awips2
unzip %{_component_zip_file_name}
rm -f %{_component_zip_file_name}
_build_cave_static="%{_baseline_workspace}/build/static"
# we want the common directory, the common linux directory, and the architecture-specific Linux directory.
_common_dir="${_build_cave_static}/common/cave"
_linux_dir="${_build_cave_static}/linux/cave"
_linux_arch_dir="${_build_cave_static}/linux.x86_64/cave"
cp -rv ${_common_dir}/* ${RPM_BUILD_ROOT}/awips2/cave
if [ $? -ne 0 ]; then
exit 1
fi
cp -rv ${_linux_dir}/* ${RPM_BUILD_ROOT}/awips2/cave
if [ $? -ne 0 ]; then
exit 1
fi
cp -rv ${_linux_arch_dir}/* ${RPM_BUILD_ROOT}/awips2/cave
if [ $? -ne 0 ]; then
exit 1
fi
# The AWIPS II version script.
VERSIONS_SCRIPT="rpms/utility/scripts/versions.sh"
cp %{_baseline_workspace}/${VERSIONS_SCRIPT} ${RPM_BUILD_ROOT}/awips2/cave
@ -99,6 +133,23 @@ if [ $? -ne 0 ]; then
exit 1
fi
CAVE_DIST_DIR="%{_baseline_workspace}/rpms/awips2.cave/setup/dist"
_cave_zip=${CAVE_DIST_DIR}/%{_component_zip_file_name}
_mem_settings_xml=%{_baseline_workspace}/rpms/awips2.cave/Installer.cave/scripts/memory/memorySettings.xml
_ini_destination=${RPM_BUILD_ROOT}/awips2/cave
pushd . > /dev/null 2>&1
cd %{_baseline_workspace}/rpms/awips2.cave/Installer.cave/scripts/memory/iniFileGenerator/src
/awips2/java/bin/java main/IniFileGenerator "${_cave_zip}" "${_mem_settings_xml}" "${_ini_destination}"
if [ $? -ne 0 ]; then
exit 1
fi
rm -fv main/*.class
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null 2>&1
%pre
if [ "${1}" = "2" ]; then
# During an upgrade, we need to copy CAVE components that should not
@ -164,6 +215,7 @@ if [ -d /awips2/cave ]; then
fi
%post
rm -f /etc/xdg/autostart/awips2-cave.desktop
MACHINE_BIT=`uname -i`
if [ "${MACHINE_BIT}" = "i386" ]
then
@ -328,7 +380,7 @@ rm -rf ${RPM_BUILD_ROOT}
%dir /awips2/cave/plugins
/awips2/cave/plugins/*
/awips2/cave/.eclipseproduct
/awips2/cave/etc/aviation/thresholds/KUES.hdf5
%defattr(755,awips,fxalpha,755)
%dir /awips2/cave/caveEnvironment
/awips2/cave/caveEnvironment/*
@ -340,4 +392,4 @@ rm -rf ${RPM_BUILD_ROOT}
/awips2/cave/*.so
%dir /awips2/cave/lib64
/awips2/cave/lib64/*
%attr(644,root,root) /etc/xdg/autostart/awips2-cave.desktop

View file

@ -1,7 +0,0 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Version=1.0
Name=No Name
Name[en_US]=TextWS
Exec=/bin/bash -i -c "sleep 5; /awips2/cave/textWS.sh"

View file

@ -210,7 +210,7 @@ for feature in `cat ${prepare_dir}/awipsInstall.txt`; do
CAVE_EXE="${pde_build_dir}/I.CAVE/cave/cave"
NOSPLASH_ARG="-nosplash"
DIRECTOR_APP="-application org.eclipse.equinox.p2.director"
DESTINATION_ARG="-destination ${pde_build_dir}/I.CAVE/cave"
#DESTINATION_ARG="-destination ${pde_build_dir}/I.CAVE/cave"
INSTALL_ARG="-i ${feature}.feature.group"
UNINSTALL_ARG="-u ${feature}.feature.group"
# Used to ensure that the awips2-java is used.
@ -234,7 +234,7 @@ cp ${pde_build_dir}/I.CAVE/CAVE-linux.gtk.x86_64.zip ${WORKSPACE}/rpms/awips2.ca
cd ${WORKSPACE}/rpms/awips2.cave
buildRPMExec "Installer.cave" "awips2-cave"
buildRPMExec "Installer.cave-wrapper" ""
#buildRPMExec "Installer.cave-wrapper" ""
rm -rf ${pde_build_dir}
mkdir -p ${pde_build_dir}
@ -273,7 +273,7 @@ for feature in `cat ${prepare_dir}/ncepInstall.txt`; do
CAVE_EXE="${pde_build_dir}/I.CAVE/cave/cave"
NOSPLASH_ARG="-nosplash"
DIRECTOR_APP="-application org.eclipse.equinox.p2.director"
DESTINATION_ARG="-destination ${pde_build_dir}/I.CAVE/cave"
#DESTINATION_ARG="-destination ${pde_build_dir}/I.CAVE/cave"
INSTALL_ARG="-i ${feature}.feature.group"
UNINSTALL_ARG="-u ${feature}.feature.group"
# Used to ensure that the awips2-java is used.

View file

@ -98,47 +98,56 @@ if [ "${1}" = "-WA" ]; then
exit 0
fi
if [ "${1}" = "-rh6" ]; then
#buildCAVE
if [ "${1}" = "-viz" ]; then
buildCAVE
#buildRPM "awips2-alertviz"
#buildEDEX
buildRPM "awips2-common-base"
buildRPM "awips2-notification"
buildRPM "awips2-hydroapps-shared"
buildRPM "awips2-java"
buildRPM "awips2-python"
buildRPM "awips2-python-cherrypy"
buildRPM "awips2-python-nose"
buildRPM "awips2-python-qpid"
buildRPM "awips2-python-werkzeug"
buildRPM "awips2-python-numpy"
buildRPM "awips2-python-pupynere"
buildRPM "awips2-python-h5py"
buildRPM "awips2-python-matplotlib"
buildRPM "awips2-python-scientific"
buildRPM "awips2-python-scipy"
buildRPM "awips2-python-tables"
exit 0
fi
if [ "${1}" = "-rh6" ]; then
buildRPM "awips2-postgresql"
#buildCAVE
exit 0
buildRPM "awips2-alertviz"
buildEDEX
buildRPM "awips2-ldm"
#buildRPM "awips2-common-base"
#buildRPM "awips2-notification"
#buildRPM "awips2-hydroapps-shared"
#buildRPM "awips2-java"
#buildRPM "awips2-python"
#buildRPM "awips2-python-cherrypy"
#buildRPM "awips2-python-nose"
#buildRPM "awips2-python-qpid"
#buildRPM "awips2-python-werkzeug"
#buildRPM "awips2-python-numpy"
#buildRPM "awips2-python-pupynere"
#buildRPM "awips2-python-h5py"
#buildRPM "awips2-python-matplotlib"
#buildRPM "awips2-python-scientific"
#buildRPM "awips2-python-scipy"
##buildRPM "awips2-python-tables"
buildRPM "awips2-python-pmw"
buildRPM "awips2-python-tpg"
buildRPM "awips2-python-awips"
buildRPM "awips2-python-shapely"
#buildRPM "awips2-python-shapely"
buildRPM "awips2-python-jep"
buildRPM "awips2-python-dateutil"
buildRPM "awips2-python-pytz"
buildRPM "awips2-python-six"
buildRPM "awips2-python-pyparsing"
buildRPM "awips2-python-setuptools"
buildRPM "awips2-ant"
buildRPM "awips2-maven"
buildRPM "awips2-tools"
buildRPM "awips2-eclipse"
buildRPM "awips2-postgresql"
buildRPM "awips2-pgadmin3"
buildRPM "awips2-httpd-pypies"
buildRPM "awips2-qpid-lib"
buildRPM "awips2-qpid-java"
buildRPM "awips2-qpid-java-broker"
buildRPM "awips2-ldm"
#buildRPM "awips2-ant"
#buildRPM "awips2-maven"
#buildRPM "awips2-tools"
#buildRPM "awips2-eclipse"
#buildRPM "awips2-postgresql"
#buildRPM "awips2-pgadmin3"
#buildRPM "awips2-httpd-pypies"
#buildRPM "awips2-qpid-lib"
#buildRPM "awips2-qpid-java"
#buildRPM "awips2-qpid-java-broker"
buildRPM "awips2-database-standalone-configuration"
buildRPM "awips2-database"
buildRPM "awips2-maps-database"

View file

@ -73,7 +73,7 @@ cp -v ${dir}/buildEnvironment.sh .
# check rpms/build/x86_64/build.sh for these groups
#
pwd
/bin/bash ${_build_sh_directory}/build.sh ${1} > ${dir}/build${1}-${timestamp}.log
/bin/bash ${_build_sh_directory}/build.sh ${1} ${2} > ${dir}/build${1}-${timestamp}.log
popd > /dev/null 2>&1

View file

@ -1,4 +1,5 @@
#!/bin/bash
. /etc/profile.d/awips2.sh
# User-configurable environment parameters that are used during the build.
@ -15,7 +16,7 @@ export BUILD_WORKSPACE=${BUILD_DIR}/workspace
# baseline is...
export BASELINE="${JENKINS_WORKSPACE}"
export AWIPSII_VERSION="16.2.2"
export AWIPSII_RELEASE="4"
export AWIPSII_RELEASE="8"
export AWIPSII_TOP_DIR="${BUILD_WORKSPACE}/tmp/rpms_built_dir"