From fc009792e30cc67221f63ca09e643bac3f444e7f Mon Sep 17 00:00:00 2001 From: Steve Harris Date: Wed, 3 Apr 2013 14:58:29 -0500 Subject: [PATCH] 13.3.1-18 baseline Former-commit-id: f3e79bcc9d3c3fe8a19f8a3c3d25ece6deaed523 [formerly a2b098d86d32c0d4f2e22828e4e015bfd836c0ba] [formerly f3e79bcc9d3c3fe8a19f8a3c3d25ece6deaed523 [formerly a2b098d86d32c0d4f2e22828e4e015bfd836c0ba] [formerly ce6a06a7e3ff4da41c5371e3e98ffa34a36e62db [formerly 245ab5d951a10e74aba53b036001316e1c7653fe]]] Former-commit-id: ce6a06a7e3ff4da41c5371e3e98ffa34a36e62db Former-commit-id: 0edd049e3b681f030379cae6b4f5bf85feab852f [formerly bf6c3b67621c68815a2a65f3d553fd7fe9c5b848] Former-commit-id: 044912d48ba69ba1eb46600cb22237a1c3ac4138 --- .../cave/etc/textws/gui/QualityControlCfg.xml | 6 +- .../viz/texteditor/qc/WmoHeaderCheck.java | 18 +- .../RPGEnvironmentalDataManager.java | 49 +- .../EnvironParamsLevelTable.RUC40.xml | 73 +++ .../uf/edex/plugin/ffmp/FFMPGenerator.java | 46 +- .../edex_static/base/python/qcScanner.py | 183 -------- ncep/gov.noaa.nws.ncep.ui.nsharp/plugin.xml | 40 -- rpms/build/i386/build.sh_preRCM | 418 ------------------ 8 files changed, 186 insertions(+), 647 deletions(-) create mode 100644 edexOsgi/com.raytheon.edex.rpgenvdata/utility/edex_static/base/rpgenvdata/EnvironParamsLevelTable.RUC40.xml delete mode 100644 edexOsgi/com.raytheon.uf.edex.plugin.qc/utility/edex_static/base/python/qcScanner.py delete mode 100644 rpms/build/i386/build.sh_preRCM diff --git a/cave/build/static/common/cave/etc/textws/gui/QualityControlCfg.xml b/cave/build/static/common/cave/etc/textws/gui/QualityControlCfg.xml index 00db1f55f9..26023ea61c 100644 --- a/cave/build/static/common/cave/etc/textws/gui/QualityControlCfg.xml +++ b/cave/build/static/common/cave/etc/textws/gui/QualityControlCfg.xml @@ -43,7 +43,7 @@ EWW - Extreme Weather Warning + Extreme Wind Warning NOW @@ -137,6 +137,10 @@ FA.W FLW + + EW.W + EWW + WCN SLS diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/qc/WmoHeaderCheck.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/qc/WmoHeaderCheck.java index ce74a93086..b28cc441bf 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/qc/WmoHeaderCheck.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/qc/WmoHeaderCheck.java @@ -5,6 +5,14 @@ import java.util.regex.Matcher; import com.raytheon.viz.texteditor.util.VtecObject; import com.raytheon.viz.texteditor.util.VtecUtil; +/** + * SOFTWARE HISTORY + * Date Ticket# Engineer Description + * ------------ ---------- ----------- -------------------------- + * 04/02/2013 DR 15609 Qinglu Lin Added code to prevent error message from creating + * while nnn is SVS for Extreme Wind Warning Followup. + */ + public class WmoHeaderCheck implements IQCCheck { @Override @@ -53,8 +61,14 @@ public class WmoHeaderCheck implements IQCCheck { } else if (vtec != null && !QualityControl.match(nnn, vtec.getPhenomena() + "." + vtec.getSignificance())) { - errorMsg += "VTEC event type (" + vtec.getPhenomena() + "." - + vtec.getSignificance() + ") doesn't match NNN.\n"; + if (nnn.equals("SVS") && + vtec.getPhenomena().equals("EW") && vtec.getSignificance().equals("W")) { + // DR 15609. Extreme Wind Warning Followup uses SVS for nnn, as AWIPS I does. + // Do not create error message. + } else { + errorMsg += "VTEC event type (" + vtec.getPhenomena() + "." + + vtec.getSignificance() + ") doesn't match NNN.\n"; + } } return errorMsg; } diff --git a/edexOsgi/com.raytheon.edex.rpgenvdata/src/com/raytheon/edex/rpgenvdata/RPGEnvironmentalDataManager.java b/edexOsgi/com.raytheon.edex.rpgenvdata/src/com/raytheon/edex/rpgenvdata/RPGEnvironmentalDataManager.java index 400aa732dc..0f12fecf22 100644 --- a/edexOsgi/com.raytheon.edex.rpgenvdata/src/com/raytheon/edex/rpgenvdata/RPGEnvironmentalDataManager.java +++ b/edexOsgi/com.raytheon.edex.rpgenvdata/src/com/raytheon/edex/rpgenvdata/RPGEnvironmentalDataManager.java @@ -95,7 +95,7 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery; * 1-3-2013 DR 15667 M.Porricelli Made EnvironParamsLevelTable.xml * accessible from SITE level * 03/04/2013 DR 14770 D. Friedman Correct clipped grid coordinates. -* 03/21/2013 DR 15872 D. Friedman Correct grid orientation. +* 04/02/2013 DR 15872 D. Friedman Correct grid orientation. Ensure square grid. **/ public class RPGEnvironmentalDataManager { private static final transient IUFStatusHandler statusHandler = UFStatus @@ -119,6 +119,8 @@ public class RPGEnvironmentalDataManager { private boolean compressionEnabled = true; + private boolean squareGrid = true; + public RPGEnvironmentalDataManager() { try { initialize(); @@ -599,6 +601,43 @@ public class RPGEnvironmentalDataManager { i2 = (int) Math.round(c.x); j2 = maxY - (int) Math.round(c.y); + if (squareGrid) { + /* + * ORPG may have a problem with non-square grids. This will be + * fixed in a later release of the ORPG software. For now, + * ensure the output is square. + */ + + /* + * Try to expand one edge if needed so as to not go out of + * bounds. If that fails, try shrinking one edge. + */ + int outputSpan = Math.max(i2 - i1, j2 - j1); + boolean solved = false; + for (int nTries = 0; !solved && nTries < 2; ++nTries) { + solved = false; + if (i2 - i1 != outputSpan) { + if (i1 + outputSpan <= ge.getHigh(0)) { + i2 = i1 + outputSpan; + solved = true; + } else if (i2 - outputSpan >= ge.getLow(0)) { + i1 = i2 - outputSpan; + solved = true; + } + } else if (j2 - j1 != outputSpan) { + if (j1 + outputSpan <= ge.getHigh(1)) { + j2 = j1 + outputSpan; + solved = true; + } else if (j2 - outputSpan >= ge.getLow(1)) { + j1 = j2 - outputSpan; + solved = true; + } + } else + solved = true; + outputSpan = Math.min(i2 - i1, j2 - j1); + } + } + if (i1 < ge.getLow(0) || i2 > ge.getHigh(0) || j1 < ge.getLow(1) || j2 > ge.getHigh(1)) { throw new GeoInfoException( @@ -1132,6 +1171,14 @@ public class RPGEnvironmentalDataManager { this.compressionEnabled = compressionEnabled; } + public boolean isSquareGrid() { + return squareGrid; + } + + public void setSquareGrid(boolean squareGrid) { + this.squareGrid = squareGrid; + } + public String getMessages() { return logMessages.toString(); } diff --git a/edexOsgi/com.raytheon.edex.rpgenvdata/utility/edex_static/base/rpgenvdata/EnvironParamsLevelTable.RUC40.xml b/edexOsgi/com.raytheon.edex.rpgenvdata/utility/edex_static/base/rpgenvdata/EnvironParamsLevelTable.RUC40.xml new file mode 100644 index 0000000000..f7f6b05220 --- /dev/null +++ b/edexOsgi/com.raytheon.edex.rpgenvdata/utility/edex_static/base/rpgenvdata/EnvironParamsLevelTable.RUC40.xml @@ -0,0 +1,73 @@ + + + + + + + + + 3600 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPGenerator.java b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPGenerator.java index 64fcb003fa..9ef2289f94 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPGenerator.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPGenerator.java @@ -58,6 +58,7 @@ import com.raytheon.uf.common.datastorage.StorageProperties; import com.raytheon.uf.common.datastorage.StorageProperties.Compression; import com.raytheon.uf.common.datastorage.records.ByteDataRecord; import com.raytheon.uf.common.datastorage.records.IDataRecord; +import com.raytheon.uf.common.event.EventBus; import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; @@ -82,6 +83,7 @@ import com.raytheon.uf.common.monitor.xml.SourceIngestConfigXML; import com.raytheon.uf.common.monitor.xml.SourceXML; import com.raytheon.uf.common.serialization.SerializationException; import com.raytheon.uf.common.serialization.SerializationUtil; +import com.raytheon.uf.common.stats.ProcessEvent; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; @@ -119,6 +121,8 @@ import com.raytheon.uf.edex.plugin.ffmp.common.FFTIRatioDiff; * 02/01/13 1569 D. Hladky Added constants, switched to using aggregate records written through pypies * 02/20/13 1635 D. Hladky Added some finally methods to increase dead lock safety. Reduced wait times for threads. * 02/25/13 1660 D. Hladky Redesigned data flow for FFTI in order to have only one mosaic piece in memory at a time. + * 03/13/13 1478 D. Hladky non-FFTI mosaic containers weren't getting ejected. Made it so that they are ejected after processing as well. + * 03/22/13 1803 D. Hladky Fixed broken performance logging for ffmp. * * * @author dhladky @@ -1978,6 +1982,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements // replace or insert it ffmpData.remove(qpeSiteSourceDataKey); + statusHandler.info("Removing from memory: "+qpeSiteSourceDataKey); values.setReset(false); writeFFTIData(siteDataKey, values); } @@ -2013,8 +2018,9 @@ public class FFMPGenerator extends CompositeProductGenerator implements } } - - /** + + + /** * Find siteSourceDataKey * * @param source @@ -2041,4 +2047,40 @@ public class FFMPGenerator extends CompositeProductGenerator implements return sourceSiteDataKey; } + /** + * Log process statistics + * + * @param message + */ + @Override + public void log(URIGenerateMessage message) { + + long curTime = System.currentTimeMillis(); + ProcessEvent processEvent = new ProcessEvent(); + + if (productType != null) { + processEvent.setDataType(productType); + } + + Long dequeueTime = message.getDeQueuedTime(); + if (dequeueTime != null) { + long elapsedMilliseconds = curTime - dequeueTime; + processEvent.setProcessingTime(elapsedMilliseconds); + } + + Long enqueueTime = message.getEnQueuedTime(); + if (enqueueTime != null) { + long latencyMilliseconds = curTime - enqueueTime; + processEvent.setProcessingLatency(latencyMilliseconds); + } + + // processing in less than 0 millis isn't trackable, usually due to + // an + // error occurred and statement logged incorrectly + if ((processEvent.getProcessingLatency() > 0) + && (processEvent.getProcessingTime() > 0)) { + EventBus.publish(processEvent); + } + } + } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.qc/utility/edex_static/base/python/qcScanner.py b/edexOsgi/com.raytheon.uf.edex.plugin.qc/utility/edex_static/base/python/qcScanner.py deleted file mode 100644 index ac12287c7e..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.qc/utility/edex_static/base/python/qcScanner.py +++ /dev/null @@ -1,183 +0,0 @@ -## -# 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. -## - -import glob -import os -import os.path -import sys -import time - -import pupynere as netcdf - -from java.lang import Integer -from java.util import ArrayList -from java.util import Date -from com.raytheon.uf.edex.database.query import DatabaseQuery -from com.raytheon.uf.common.dataplugin.qc import QCRecord -from com.raytheon.uf.common.pointdata.spatial import SurfaceObsLocation -from com.raytheon.uf.common.time import DataTime -from com.raytheon.uf.edex.database.plugin import PluginFactory - -import logging, UFStatusHandler - -_logger = logging.getLogger("QCScanner") -_logger.addHandler(UFStatusHandler.UFStatusHandler("com.raytheon.uf.edex.plugin.qc", "QCScanner", level=logging.INFO)) -_logger.setLevel(logging.INFO) - - -# TODO: use jep.jarray - -class NcSet(object): - def __init__(self, path, qcType): - self.path = path - self.lastModTime = None - self.qcType = qcType - max_index = qcDao.getMaxRecordIndex(os.path.basename(path)) - if max_index >= 0: - self.lastRecordCount = max_index + 1 - else: - self.lastRecordCount = None - - def incrementalScan(self, max_records = None): - try: - last_mod_time = os.stat(self.path).st_mtime - except Exception, e: - _logger.error("%s: %s", self.path, e) - return - if last_mod_time == self.lastModTime: - return - self.lastModTime = last_mod_time - try: - f = netcdf.NetCDFFile(self.path, 'r') - except Exception, e: - _logger.error("%s: %s", self.path, e, exc_info=True) - return - - # TODO: find last record ~ - # select ncSet, max(ncIndex) from qc group by ncNet; - - try : - n_records = f.variables['prevRecord'].shape[0] - if self.lastRecordCount is None or n_records > self.lastRecordCount: - i = self.lastRecordCount is not None and self.lastRecordCount or 0 - if max_records is not None: - record_limit = min(i + max_records, n_records) - else: - record_limit = n_records - fn = os.path.basename(self.path) - idVariables = [] - for idVar in f.__getattribute__('idVariables').split(','): - idVariables.append(f.variables[str(idVar)]) - timeVariables = f.__getattribute__('timeVariables').split(',') - vObsTime = f.variables[str(timeVariables[0])] - vObsTimeFillValue = vObsTime.__getattribute__("_FillValue") - try : - vObsTimeMissingValue = vObsTime.__getattribute__("missing_value") - except AttributeError: - vObsTimeMissingValue = vObsTimeFillValue - vLat = f.variables['latitude'] - vLon = f.variables['longitude'] - vElev = f.variables['elevation'] - results = [] - _logger.debug("adding %d records from %s", record_limit - i, self.path) - while i < record_limit: - rec = QCRecord() - rec.setPluginName("qc") - if not vObsTime[i] == vObsTimeFillValue and not vObsTime[i] == vObsTimeMissingValue: - rec.setDataTime(DataTime(Date(int(vObsTime[i] * 1000)))) - loc = SurfaceObsLocation() - loc.assignLocation(float(vLat[i]), float(vLon[i])) - loc.setElevation(Integer(int(vElev[i]))) - stationId = [] - for idVar in idVariables: - stationId.append(''.join(idVar[i]).strip().strip('\0')) - loc.setStationId(''.join(stationId)) - rec.setLocation(loc) - - rec.setNcSet(fn) - rec.setNcIndex(i) - rec.setQcType(self.qcType) - - rec.constructDataURI() - results.append(rec) - - i += 1 - - self.lastRecordCount = record_limit - return results - finally: - f.close() - -class QCScanner(object): - def __init__(self, dir, qcType): - self.directory = dir - self.qcType = qcType - self.ncSets = { } - - def incrementalScan(self, max_records = None): - currentNcSets = self.findNcSetsNow() - newSets = [ ] - delSets = [ ] - for ncSet in currentNcSets: - if not self.ncSets.get(ncSet): - newSets.append(ncSet) - for ncSet in self.ncSets.keys(): - if ncSet not in currentNcSets: - delSets.append(ncSet) - if len(delSets): - for ncSet in delSets: - del self.ncSets[ncSet] - if len(newSets): - for ncSet in newSets: - self.ncSets[ncSet] = NcSet(os.path.join(self.directory, ncSet), self.qcType) - ncSets = self.ncSets.keys() - ncSets.sort() - - results = None - for ncSet in ncSets: - partial = self.ncSets[ncSet].incrementalScan(max_records) - if partial is not None: - if max_records is not None: - max_records -= len(partial) - if results is None: - results = ArrayList(len(partial)) - for rec in partial: - results.add(rec) - - if results is None: - results = ArrayList() - return results - - def findNcSetsNow(self): - paths = glob.glob(self.directory + '/[0-9]*_[0-9]*') - return [ os.path.basename(x) for x in paths ] - -scanner = None -qcDao = None - -def init(directory, qcType): - global scanner, qcDao - scanner = QCScanner(directory, qcType) - qcDao = PluginFactory.getInstance().getPluginDao("qc"); - -def scan(max_records = None): - sys.stdout.flush() - if scanner is not None: - return scanner.incrementalScan(max_records) diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/plugin.xml b/ncep/gov.noaa.nws.ncep.ui.nsharp/plugin.xml index 183c298172..31bdca0fd8 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/plugin.xml +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/plugin.xml @@ -36,35 +36,9 @@ name="Nsharp" restorable="false"> - - - - - - - - - - - - - - diff --git a/rpms/build/i386/build.sh_preRCM b/rpms/build/i386/build.sh_preRCM deleted file mode 100644 index e25d5dbc9f..0000000000 --- a/rpms/build/i386/build.sh_preRCM +++ /dev/null @@ -1,418 +0,0 @@ -#!/bin/bash - -function buildRPM() -{ - # Arguments: - # ${1} == the name of the rpm. - lookupRPM "${1}" - if [ $? -ne 0 ]; then - echo "ERROR: '${1}' is not a recognized AWIPS II RPM." - exit 1 - fi - - /usr/bin/rpmbuild -ba \ - --define '_topdir %(echo ${AWIPSII_TOP_DIR})' \ - --define '_baseline_workspace %(echo ${WORKSPACE})' \ - --define '_uframe_eclipse %(echo ${UFRAME_ECLIPSE})' \ - --define '_awipscm_share %(echo ${AWIPSCM_SHARE})' \ - --define '_build_root %(echo ${AWIPSII_BUILD_ROOT})' \ - --define '_component_version %(echo ${AWIPSII_VERSION})' \ - --define '_component_release %(echo ${AWIPSII_RELEASE})' \ - --define '_component_build_date %(echo ${COMPONENT_BUILD_DATE})' \ - --define '_component_build_time %(echo ${COMPONENT_BUILD_TIME})' \ - --define '_component_build_system %(echo ${COMPONENT_BUILD_SYSTEM})' \ - --buildroot ${AWIPSII_BUILD_ROOT} \ - ${RPM_SPECIFICATION}/component.spec - if [ $? -ne 0 ]; then - echo "ERROR: Failed to build RPM ${1}." - exit 1 - fi - - return 0 -} - -# This script will build all of the 32-bit rpms. -# Ensure that we are on a machine with the correct architecture. - -architecture=`uname -i` -if [ ! "${architecture}" = "i386" ]; then - echo "ERROR: This build can only be performed on a 32-bit Operating System." - exit 1 -fi - -# Determine which directory we are running from. -path_to_script=`readlink -f $0` -dir=$(dirname $path_to_script) - -common_dir=`cd ${dir}/../common; pwd;` -if [ $? -ne 0 ]; then - echo "ERROR: Unable to find the common functions directory." - exit 1 -fi -# source the common functions. -source ${common_dir}/lookupRPM.sh -if [ $? -ne 0 ]; then - echo "ERROR: Unable to source the common functions." - exit 1 -fi -source ${common_dir}/usage.sh -if [ $? -ne 0 ]; then - echo "ERROR: Unable to source the common functions." - exit 1 -fi -source ${common_dir}/rpms.sh -if [ $? -ne 0 ]; then - echo "ERROR: Unable to source the common functions." - exit 1 -fi -source ${common_dir}/systemInfo.sh -if [ $? -ne 0 ]; then - echo "ERROR: Unable to retrieve the system information." - exit 1 -fi - -# prepare the build environment. -source ${dir}/buildEnvironment.sh -if [ $? -ne 0 ]; then - echo "ERROR: Unable to prepare the build environment." - exit 1 -fi - -export LIGHTNING=true -# Determine if the optional '-nobinlightning' argument has been specified. -if [ "${2}" = "-nobinlightning" ]; then - LIGHTNING=false -fi - -if [ "${1}" = "-python-qpid" ]; then - buildRPM "awips2" - buildRPM "awips2-python-qpid" - buildRPM "awips2-python" - buildRPM "awips2-python-cherrypy" - buildRPM "awips2-python-dynamicserialize" - buildRPM "awips2-python-nose" - buildRPM "awips2-python-numpy" - buildRPM "awips2-python-h5py" - buildRPM "awips2-python-jimporter" - buildRPM "awips2-python-matplotlib" - buildRPM "awips2-python-pil" - buildRPM "awips2-python-pmw" - buildRPM "awips2-python-pupynere" - buildRPM "awips2-python-scientific" - buildRPM "awips2-python-scipy" - buildRPM "awips2-python-tables" - buildRPM "awips2-python-thrift" - buildRPM "awips2-python-tpg" - buildRPM "awips2-python-ufpy" - buildRPM "awips2-python-werkzeug" - buildRPM "awips2-python-pygtk" - buildRPM "awips2-python-pycairo" - if [ $? -ne 0 ]; then - exit 1 - fi - - buildQPID - if [ $? -ne 0 ]; then - exit 1 - fi - - #buildRPM "awips2-ant" - #unpackHttpdPypies - if [ $? -ne 0 ]; then - exit 1 - fi - #buildRPM "awips2-httpd-pypies" - #buildRPM "awips2-java" - #buildRPM "awips2-ldm" - #buildRPM "awips2-postgresql" - #buildRPM "awips2-psql" - #buildRPM "awips2-tools" - buildRPM "awips2-python-shapely" - - exit 0 -fi - - -if [ "${1}" = "-delta" ]; then - buildCAVE - if [ $? -ne 0 ]; then - exit 1 - fi - buildRPM "awips2-alertviz" - buildEDEX - if [ $? -ne 0 ]; then - exit 1 - fi - - buildRPM "awips2" - buildRPM "Installer.ncep-database" - buildRPM "awips2-gfesuite-client" - buildRPM "awips2-gfesuite-server" - buildRPM "awips2-python-dynamicserialize" - buildRPM "awips2-python-ufpy" - buildRPM "awips2-python-qpid" - - buildRPM "awips2-adapt-native" - buildRPM "awips2-aviation-shared" - buildRPM "awips2-cli" - buildRPM "awips2-database" - buildRPM "awips2-database-server-configuration" - buildRPM "awips2-database-standalone-configuration" - buildRPM "awips2-data.hdf5-gfe.climo" - buildRPM "awips2-hydroapps-shared" - buildRPM "awips2-localapps-environment" - buildRPM "awips2-maps-database" - buildRPM "awips2-notification" - buildRPM "awips2-pypies" - buildRPM "awips2-data.hdf5-topo" - buildRPM "awips2-data.gfe" - buildRPM "awips2-rcm" - buildRPM "awips2-edex-environment" - buildLocalizationRPMs - if [ $? -ne 0 ]; then - exit 1 - fi - - exit 0 -fi - -if [ "${1}" = "-full" ]; then - buildCAVE - if [ $? -ne 0 ]; then - exit 1 - fi - buildRPM "Installer.ncep-database" - buildRPM "awips2-alertviz" - buildEDEX - if [ $? -ne 0 ]; then - exit 1 - fi - buildRPM "awips2-python" - buildRPM "awips2-python-cherrypy" - buildRPM "awips2-python-dynamicserialize" - buildRPM "awips2-python-h5py" - buildRPM "awips2-python-jimporter" - buildRPM "awips2-python-matplotlib" - buildRPM "awips2-python-nose" - buildRPM "awips2-python-numpy" - buildRPM "awips2-python-pil" - buildRPM "awips2-python-pmw" - buildRPM "awips2-python-pupynere" - buildRPM "awips2-python-qpid" - buildRPM "awips2-python-scientific" - buildRPM "awips2-python-scipy" - buildRPM "awips2-python-tables" - buildRPM "awips2-python-thrift" - buildRPM "awips2-python-tpg" - buildRPM "awips2-python-ufpy" - buildRPM "awips2-python-werkzeug" - buildRPM "awips2-python-pygtk" - buildRPM "awips2-python-pycairo" - - buildRPM "awips2" - buildRPM "awips2-adapt-native" - buildRPM "awips2-aviation-shared" - buildRPM "awips2-cli" - buildRPM "awips2-database" - buildRPM "awips2-database-server-configuration" - buildRPM "awips2-database-standalone-configuration" - buildRPM "awips2-data.hdf5-gfe.climo" - buildRPM "awips2-data.gfe" - buildRPM "awips2-gfesuite-client" - buildRPM "awips2-gfesuite-server" - buildRPM "awips2-hydroapps-shared" - buildRPM "awips2-localapps-environment" - buildRPM "awips2-maps-database" - buildRPM "awips2-notification" - buildRPM "awips2-pypies" - buildRPM "awips2-data.hdf5-topo" - buildRPM "awips2-rcm" - buildLocalizationRPMs - if [ $? -ne 0 ]; then - exit 1 - fi - - buildQPID - if [ $? -ne 0 ]; then - exit 1 - fi - - buildRPM "awips2-ant" - unpackHttpdPypies - if [ $? -ne 0 ]; then - exit 1 - fi - buildRPM "awips2-httpd-pypies" - buildRPM "awips2-java" - #buildRPM "awips2-ldm" - buildRPM "awips2-postgresql" - buildRPM "awips2-psql" - buildRPM "awips2-tools" - buildRPM "awips2-edex-environment" - buildRPM "awips2-openfire" - buildRPM "awips2-httpd-collaboration" - buildRPM "awips2-python-shapely" - - exit 0 -fi - -if [ "${1}" = "-ade" ]; then - buildRPM "awips2-eclipse" - buildRPM "awips2-java" - buildRPM "awips2-ant" - buildRPM "awips2-python" - buildRPM "awips2-python-cherrypy" - buildRPM "awips2-python-dynamicserialize" - buildRPM "awips2-python-h5py" - buildRPM "awips2-python-jimporter" - buildRPM "awips2-python-matplotlib" - buildRPM "awips2-python-nose" - buildRPM "awips2-python-numpy" - buildRPM "awips2-python-pil" - buildRPM "awips2-python-pmw" - buildRPM "awips2-python-pupynere" - buildRPM "awips2-python-qpid" - buildRPM "awips2-python-scientific" - buildRPM "awips2-python-scipy" - buildRPM "awips2-python-tables" - buildRPM "awips2-python-thrift" - buildRPM "awips2-python-tpg" - buildRPM "awips2-python-ufpy" - buildRPM "awips2-python-werkzeug" - buildRPM "awips2-python-pygtk" - buildRPM "awips2-python-pycairo" - buildRPM "awips2-python-shapely" - buildQPID -ade - if [ $? -ne 0 ]; then - exit 1 - fi - - # Package the ade. - # Create the containing directory. - ade_directory="awips2-ade-${AWIPSII_VERSION}-${AWIPSII_RELEASE}" - if [ -d ${WORKSPACE}/${ade_directory} ]; then - rm -rf ${WORKSPACE}/${ade_directory} - if [ $? -ne 0 ]; then - exit 1 - fi - fi - mkdir -p ${WORKSPACE}/${ade_directory} - if [ $? -ne 0 ]; then - exit 1 - fi - - # Copy the rpms to the directory. - cp -v ${AWIPSII_TOP_DIR}/RPMS/i386/* \ - ${AWIPSII_TOP_DIR}/RPMS/noarch/* \ - ${WORKSPACE}/${ade_directory} - if [ $? -ne 0 ]; then - exit 1 - fi - - awips2_ade_directory="${WORKSPACE}/rpms/awips2.ade" - # Copy the install and uninstall script to the directory. - cp -v ${awips2_ade_directory}/tar.ade/scripts/*.sh \ - ${WORKSPACE}/${ade_directory} - if [ $? -ne 0 ]; then - exit 1 - fi - - # Tar the directory. - pushd . > /dev/null 2>&1 - cd ${WORKSPACE} - tar -cvf ${ade_directory}.tar ${ade_directory} - popd > /dev/null 2>&1 - RC=$? - if [ ${RC} -ne 0 ]; then - exit 1 - fi - - exit 0 -fi - -if [ "${1}" = "-viz" ]; then - buildRPM "awips2" - buildCAVE - if [ $? -ne 0 ]; then - exit 1 - fi - buildRPM "awips2-alertviz" - - exit 0 -fi - -if [ "${1}" = "-edex" ]; then - buildRPM "awips2" - buildRPM "awips2-cli" - buildRPM "awips2-gfesuite-client" - buildRPM "awips2-gfesuite-server" - buildRPM "Installer.ncep-database" - buildEDEX - if [ $? -ne 0 ]; then - exit 1 - fi - - exit 0 -fi - -if [ "${1}" = "-qpid" ]; then - buildQPID - if [ $? -ne 0 ]; then - exit 1 - fi - - exit 0 -fi - -if [ "${1}" = "-ldm" ]; then - # Ensure that the user has root privileges. - if [ ! ${UID} = 0 ]; then - echo "ERROR: You must have root privileges to build ldm." - exit 1 - fi - buildRPM "awips2-ldm" - - exit 0 -fi - -if [ "${1}" = "-package" ]; then - repository_directory="awips2-repository-${AWIPSII_VERSION}-${AWIPSII_RELEASE}" - if [ -d ${WORKSPACE}/${repository_directory} ]; then - rm -rf ${WORKSPACE}/${repository_directory} - if [ $? -ne 0 ]; then - exit 1 - fi - fi - mkdir -p ${WORKSPACE}/${repository_directory}/${AWIPSII_VERSION}-${AWIPSII_RELEASE} - if [ $? -ne 0 ]; then - exit 1 - fi - - cp -r ${AWIPSII_TOP_DIR}/RPMS/* \ - ${WORKSPACE}/${repository_directory}/${AWIPSII_VERSION}-${AWIPSII_RELEASE} - if [ $? -ne 0 ]; then - exit 1 - fi - - rpms_directory="${WORKSPACE}/rpms" - comps_xml="${rpms_directory}/common/yum/arch.x86/comps.xml" - cp -v ${comps_xml} ${WORKSPACE}/${repository_directory} - if [ $? -ne 0 ]; then - exit 1 - fi - - pushd . > /dev/null - cd ${WORKSPACE} - tar -cvf ${repository_directory}.tar ${repository_directory} - RC=$? - popd > /dev/null - if [ ${RC} -ne 0 ]; then - exit 1 - fi - - exit 0 -fi - - -usage -exit 0