Issue #2163 - RHEL6 14.1.1 build updates

Former-commit-id: b0e47f4548c235a7cbaefc12e97264ce4c782fce
This commit is contained in:
Bryan Kowal 2013-09-03 13:46:19 -05:00
parent 7f8226d319
commit ab3485a3ed
7 changed files with 120 additions and 78 deletions

View file

@ -42,24 +42,6 @@
<import plugin="javax.measure" version="1.0.0" match="greaterOrEqual"/>
</requires>
<plugin
id="ch.qos.logback"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.slf4j"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.springframework"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.activemq"
download-size="0"
@ -99,6 +81,12 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.slf4j"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.commons.collections"
download-size="0"
@ -180,6 +168,12 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.springframework"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="com.raytheon.uf.common.colormap"
download-size="0"
@ -482,7 +476,13 @@
id="com.raytheon.uf.common.velocity"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.quartz"
download-size="0"
install-size="0"
version="0.0.0"/>
</feature>

View file

@ -29,32 +29,6 @@
install-size="0"
version="0.0.0"/>
<plugin
id="ch.qos.logback"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.slf4j"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="com.raytheon.uf.common.status"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.common.message"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.common.alertmonitor"
download-size="0"
@ -156,6 +130,13 @@
install-size="0"
version="0.0.0"/>
<plugin
id="com.raytheon.uf.common.message"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.common.python"
download-size="0"
@ -191,6 +172,13 @@
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.common.status"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.common.time"
download-size="0"
@ -353,6 +341,12 @@
install-size="0"
version="0.0.0"/>
<plugin
id="org.slf4j"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.springframework"
download-size="0"

View file

@ -61,6 +61,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* Feb 27, 2013 1638 mschenke Cleaned up localization code to fix null pointer
* when no distribution files present
* Mar 19, 2013 1794 djohnson PatternWrapper is immutable, add toString() to it for debugging.
* Aug 30, 2013 2163 bkowal edexBridge to qpid 0.18 RHEL6 upgrade
*
* </pre>
*
@ -73,6 +74,10 @@ public class DistributionSrv {
private static final IUFStatusHandler statusHandler = UFStatus
.getHandler(DistributionSrv.class);
private static final String HEADER_QPID_SUBJECT = "qpid.subject";
private static final String MESSAGE_HEADER = "header";
private static class PatternWrapper {
private final String plugin;
@ -223,7 +228,15 @@ public class DistributionSrv {
StringBuilder pluginNames = new StringBuilder();
List<String> dest = new ArrayList<String>();
Message in = exchange.getIn();
String header = (String) in.getHeader("header");
// determine if the header is in the qpid subject field?
String header = (String) in.getHeader(HEADER_QPID_SUBJECT);
if (header != null) {
// make the qpid subject the header so that everything downstream
// will be able to read it as the header.
in.setHeader(MESSAGE_HEADER, header);
}
header = (String) in.getHeader(MESSAGE_HEADER);
Object payload = in.getBody();
String bodyString = null;
if (payload instanceof byte[]) {
@ -277,8 +290,8 @@ public class DistributionSrv {
throws DistributionException {
RequestPatterns patternSet = null;
try {
patternSet = SerializationUtil
.jaxbUnmarshalFromXmlFile(RequestPatterns.class, modelFile.getPath());
patternSet = SerializationUtil.jaxbUnmarshalFromXmlFile(
RequestPatterns.class, modelFile.getPath());
} catch (Exception e) {
throw new DistributionException("File "
+ modelFile.getAbsolutePath()

View file

@ -97,9 +97,9 @@ public:
uint64_t current = (((long long) tv.tv_sec) * 1000000
+ ((long long) tv.tv_usec)) / 1000;
message.setDurable(true);
message.setSubject(fileHeader);
message.setContent(fileLocation);
message.getProperties()["header"] = fileHeader;
message.getProperties()["enqueueTime"] = current;
message.setProperty("enqueueTime", current);
this->sender.send(message);
@ -122,12 +122,44 @@ private:
unotice ("Cleaning up");
// Destroy resources.
try {
session.close();
connection.close();
} catch (const std::exception& error) {
this->isConnected = false;
}
if (this->sender != 0)
{
try
{
this->sender.close();
this->sender = 0;
}
catch (const std::exception& error)
{
uwarn(error.what());
}
}
if (this->session != 0)
{
try
{
this->session.close();
this->session = 0;
}
catch (const std::exception& error)
{
uwarn(error.what());
}
}
if (this->connection != 0)
{
try
{
this->connection.close();
this->connection = 0;
}
catch (const std::exception& error)
{
uwarn(error.what());
}
}
this->isConnected = false;
}
@ -136,6 +168,10 @@ private:
return this->isConnected;
}
try {
this->connection = 0;
this->session = 0;
this->sender = 0;
std::stringstream qpidURLBuilder;
qpidURLBuilder << "amqp:tcp:";
qpidURLBuilder << this->brokerURI;

View file

@ -1,13 +1,8 @@
diff -crB a/component.spec b/component.spec
*** a/component.spec 2013-08-07 10:24:32.038932868 -0500
--- b/component.spec 2013-08-07 10:24:18.422990138 -0500
*** a/component.spec 2013-09-03 10:51:59.952913214 -0500
--- b/component.spec 2013-09-03 11:10:40.703226553 -0500
***************
*** 1,13 ****
#
! # AWIPS II Edex "component" spec file
#
%define __prelink_undo_cmd %{nil}
# Turn off the brp-python-bytecompile script
*** 6,13 ****
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
@ -16,12 +11,7 @@ diff -crB a/component.spec b/component.spec
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
--- 1,13 ----
#
! # AWIPS II Edex Data Delivery spec file
#
%define __prelink_undo_cmd %{nil}
# Turn off the brp-python-bytecompile script
--- 6,13 ----
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
@ -65,7 +55,7 @@ diff -crB a/component.spec b/component.spec
%postun
%clean
--- 47,100 ----
--- 47,104 ----
if [ $? -ne 0 ]; then
exit 1
fi
@ -120,14 +110,16 @@ diff -crB a/component.spec b/component.spec
+ exit 1
+ fi
+ fi
+
%postun
%clean
***************
*** 67,69 ****
--- 105,109 ----
--- 109,113 ----
%dir /awips2
%dir /awips2/edex
/awips2/edex/*
+
+ %attr(744,root,root) /etc/init.d/*
\ No newline at end of file

View file

@ -124,11 +124,18 @@ fi
if [ "${1}" = "-rh6" ]; then
buildRPM "awips2-common-base"
buildEDEX
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2-hydroapps-shared"
buildRPM "awips2-notification"
buildJava
buildRPM "awips2-python"
buildRPM "awips2-python-cherrypy"
buildRPM "awips2-python-nose"
buildRPM "awips2-python-pil"
buildRPM "awips2-python-jimporter"
buildRPM "awips2-python-qpid"
buildRPM "awips2-python-thrift"
buildRPM "awips2-python-werkzeug"
@ -185,12 +192,6 @@ if [ "${1}" = "-rh6" ]; then
buildRPM "awips2-data.hdf5-topo"
buildRPM "awips2"
buildOpenfire
buildEDEX
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2-hydroapps-shared"
buildRPM "awips2-notification"
exit 0
fi

View file

@ -35,15 +35,21 @@ then
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}/awips2/python/lib/python2.7/site-packages
%build
%install
mkdir -p %{_build_root}/awips2/python/lib/python2.7/site-packages
if [ $? -ne 0 ]; then
exit 1
fi
JIMPORTER_SRC_DIR="%{_python_pkgs_dir}/java-importer"
cp -rv ${JIMPORTER_SRC_DIR}/* \
%{_build_root}/awips2/python/lib/python2.7/site-packages
if [ $? -ne 0 ]; then
exit 1
fi
%pre