Issue #2163 - remaining rpms that are not dependent on nativeLib and cleanup

Conflicts:
	RadarServer/build.rcm/build.xml
	cave/com.raytheon.uf.viz.feature.alertviz/feature.xml

Former-commit-id: c1dab22fdb [formerly c1dab22fdb [formerly 58a80b4b6d31d11b0ca722545bfd788a2feee488]]
Former-commit-id: 94eacfc460
Former-commit-id: 75c6d4ebf6
This commit is contained in:
Bryan Kowal 2013-08-05 18:16:29 -05:00 committed by Steve Harris
parent 858a41c50d
commit eab659f961
54 changed files with 487 additions and 2488 deletions

View file

@ -123,7 +123,11 @@
<copy todir="${deploy.dir}/lib" flatten="true">
<fileset dir="${cots.dir}/org.apache.activemq" includes="**/*.jar" />
<fileset dir="${cots.dir}/org.apache.qpid" includes="**/*.jar" />
<fileset dir="${cots.dir}/org.slf4j" includes="**/*.jar" />
<fileset dir="${cots.dir}/org.slf4j" includes="**/*.jar">
<include name="**/jcl-over-slf4j*.jar" />
<include name="**/jul-to-slf4j*.jar" />
<include name="**/slf4j-api*.jar" />
</fileset>
<fileset dir="${cots.dir}/org.apache.commons.beanutils" includes="**/*.jar" />
<fileset dir="${cots.dir}/org.apache.commons.codec" includes="**/*.jar" />
<fileset dir="${cots.dir}/org.apache.commons.collections" includes="**/*.jar" />
@ -138,6 +142,7 @@
</fileset>
<fileset dir="${cots.dir}/org.itadaki.bzip2" includes="**/*.jar" />
<fileset dir="${cots.dir}/org.quartz" includes="**/*.jar" />
<fileset dir="lib" includes="**/*.jar" />
</copy>
<delete dir="bin" />

View file

@ -80,6 +80,9 @@
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../" includes="org.slf4j*/**"/>
</copy>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../" includes="ch.*/**"/>
</copy>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../" includes="javax.jms*/**"/>
</copy>

Binary file not shown.

View file

@ -112,6 +112,10 @@
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="ogc.*/**"/>
</copy>
<echo message="ch.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="ch.*/**"/>
</copy>
<antcall target="getBaseComponents" />
</target>

View file

@ -119,6 +119,12 @@
<fileset dir="${workspace.dir}"
includes="it.*/**" />
</copy>
<echo message="PLUGINS: ch.*/**" />
<copy todir="${basedir}/cave/p2/plugins">
<fileset dir="${workspace.dir}"
includes="ch.*/**" />
</copy>
<!-- END: Copy The Plugins -->
</target>

View file

@ -42,6 +42,24 @@
<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"
@ -81,12 +99,6 @@
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"
@ -168,12 +180,6 @@
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"
@ -476,13 +482,7 @@
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,6 +29,32 @@
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"
@ -130,13 +156,6 @@
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"
@ -172,13 +191,6 @@
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"
@ -341,12 +353,6 @@
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

@ -89,6 +89,13 @@
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.commons.logging"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.apache.ws.security"
download-size="0"

View file

@ -75,6 +75,10 @@
<echo message="org.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="org.*/**"/>
</copy>
<echo message="ch.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="ch.*/**"/>
</copy>
<echo message="javax.*/**"/>
<copy todir="${buildDirectory}/plugins">

View file

@ -1,458 +0,0 @@
#!/bin/bash
# Build Variables:
# -----------------------------------------------------------------------------
VAR_AWIPSII_TOP_DIR="/home/bkowal/rpmbuild"
VAR_WORKSPACE="/common/bkowal/git/thunder/baseline"
VAR_AWIPSII_BUILD_ROOT="/tmp/awips-component"
VAR_AWIPSII_VERSION=""
VAR_AWIPSII_RELEASE=""
VAR_UFRAME_ECLIPSE="/opt/uframe-eclipse"
VAR_AWIPSCM_SHARE="/awipscm"
# -----------------------------------------------------------------------------
# DO NOT EDIT ANYTHING BELOW THIS LINE!
function prepareBuildEnvironment()
{
if [ "${AWIPSII_TOP_DIR}" = "" ]; then
export AWIPSII_TOP_DIR="${VAR_AWIPSII_TOP_DIR}"
fi
if [ "${WORKSPACE}" = "" ]; then
export WORKSPACE="${VAR_WORKSPACE}"
fi
if [ "${AWIPSII_BUILD_ROOT}" = "" ]; then
export AWIPSII_BUILD_ROOT="${VAR_AWIPSII_BUILD_ROOT}"
fi
if [ "${AWIPSII_VERSION}" = "" ]; then
# Determine if we need to use the default version.
if [ "${VAR_AWIPSII_VERSION}" = "" ]; then
VAR_AWIPSII_VERSION=`cat ${WORKSPACE}/Installer.rpm/version.txt`
fi
export AWIPSII_VERSION="${VAR_AWIPSII_VERSION}"
fi
if [ "${AWIPSII_RELEASE}" = "" ]; then
# Determine if we need to use the default release.
if [ "${VAR_AWIPSII_RELEASE}" = "" ]; then
VAR_AWIPSII_RELEASE=`date +"%Y%m%d"`
fi
export AWIPSII_RELEASE="${VAR_AWIPSII_RELEASE}"
fi
if [ "${UFRAME_ECLIPSE}" = "" ]; then
export UFRAME_ECLIPSE="${VAR_UFRAME_ECLIPSE}"
fi
if [ "${AWIPSCM_SHARE}" = "" ]; then
export AWIPSCM_SHARE="${VAR_AWIPSCM_SHARE}"
fi
}
RPM_SPECS_DIR=""
function lookupRPM()
{
export TARGET_ARCH="x86_64"
# This function is used to lookup the location of a specs file
# based on the name of an rpm.
# $1 == the name of the rpm we would like to build.
if [ "${1}" = "" ]; then
return 1
fi
local RPM_64BIT_PROJECT_DIR="${WORKSPACE}/Installer.rpm/awips2.64"
local RPM_CAVE_PROJECT_DIR="${WORKSPACE}/Installer.rpm/awips2.cave"
local RPM_CORE_PROJECT_DIR="${WORKSPACE}/Installer.rpm/awips2.core"
local RPM_EDEX_PROJECT_DIR="${WORKSPACE}/Installer.rpm/awips2.edex"
if [ "${1}" = "awips2-python-dynamicserialize" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.dynamicserialize"
return 0
fi
if [ "${1}" = "awips2-python-h5py" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.h5py"
return 0
fi
if [ "${1}" = "awips2-java" ]; then
RPM_SPECS_DIR="${RPM_CORE_PROJECT_DIR}/Installer.java"
return 0
fi
if [ "${1}" = "awips2-python-jimporter" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.jimporter"
return 0
fi
if [ "${1}" = "awips2-python-matplotlib" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.matplotlib"
return 0
fi
if [ "${1}" = "awips2-python-nose" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.nose"
return 0
fi
if [ "${1}" = "awips2-python-numpy" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.numpy"
return 0
fi
if [ "${1}" = "awips2-python-pil" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.pil"
return 0
fi
if [ "${1}" = "awips2-python-pmw" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.pmw"
return 0
fi
if [ "${1}" = "awips2-python-pupynere" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.pupynere"
return 0
fi
if [ "${1}" = "awips2-python" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/../awips2.core/Installer.python"
return 0
fi
if [ "${1}" = "awips2-python-qpid" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.qpid"
return 0
fi
if [ "${1}" = "awips2-python-scientific" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.scientific"
return 0
fi
if [ "${1}" = "awips2-python-scipy" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.scipy"
return 0
fi
if [ "${1}" = "awips2-python-tables" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.tables"
return 0
fi
if [ "${1}" = "awips2-python-thrift" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.thrift"
return 0
fi
if [ "${1}" = "awips2-python-tpg" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.tpg"
return 0
fi
if [ "${1}" = "awips2-python-ufpy" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.ufpy"
return 0
fi
if [ "${1}" = "awips2-python-werkzeug" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.werkzeug"
return 0
fi
if [ "${1}" = "awips2-python-pygtk" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/../python.site-packages/Installer.pygtk"
return 0
fi
if [ "${1}" = "awips2-python-pycairo" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/../python.site-packages/Installer.pycairo"
return 0
fi
if [ "${1}" = "CAVE" ]; then
RPM_SPECS_DIR="_BUILD_CAVE_"
return 0
fi
if [ "${1}" = "EDEX" ]; then
RPM_SPECS_DIR="_BUILD_EDEX_"
return 0
fi
if [ "${1}" = "awips2-alertviz" ]; then
RPM_SPECS_DIR="${RPM_CAVE_PROJECT_DIR}/Installer.alertviz"
return 0
fi
if [ "${1}" = "awips2-edex-base" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-base"
return 0
fi
if [ "${1}" = "awips2-edex-configuration" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-configuration"
return 0
fi
if [ "${1}" = "awips2-edex-shapefiles" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-shapefiles"
return 0
fi
if [ "${1}" = "awips2-edex-native" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-native"
export TARGET_ARCH="i386"
return 0
fi
if [ "${1}" = "awips2-edex-bufr" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-bufr"
return 0
fi
if [ "${1}" = "awips2-edex-common-core" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-common-core"
return 0
fi
if [ "${1}" = "awips2-edex-core" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-core"
return 0
fi
if [ "${1}" = "awips2-edex-cots" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-cots"
return 0
fi
if [ "${1}" = "awips2-edex-dat" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-dat"
return 0
fi
if [ "${1}" = "awips2-edex-dataplugins" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-dataplugins"
return 0
fi
if [ "${1}" = "awips2-edex-gfe" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-gfe"
return 0
fi
if [ "${1}" = "awips2-edex-grib" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-grib"
return 0
fi
if [ "${1}" = "awips2-edex-hydro" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-hydro"
return 0
fi
if [ "${1}" = "awips2-edex-ncep" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-ncep"
return 0
fi
if [ "${1}" = "awips2-edex-ncep-nsharp" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-ncep-nsharp"
return 0
fi
if [ "${1}" = "awips2-edex-npp" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-npp"
return 0
fi
if [ "${1}" = "awips2-edex-radar" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-radar"
return 0
fi
if [ "${1}" = "awips2-edex-satellite" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-satellite"
return 0
fi
if [ "${1}" = "awips2-edex-shapefiles" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-shapefiles"
return 0
fi
if [ "${1}" = "awips2-edex-text" ]; then
RPM_SPECS_DIR="${RPM_EDEX_PROJECT_DIR}/Installer.edex-component"
export COMPONENT_NAME="edex-text"
return 0
fi
RPM_SPECS_DIR="<Unknown>"
return 1
}
function buildRPM()
{
# $1 == the component file for the rpm that we would like to build.
if [ -f ${AWIPSII_TOP_DIR}/BUILD/component-files.txt ]; then
rm -fv ${AWIPSII_TOP_DIR}/BUILD/component-files.txt
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
fi
if [ -d ${AWIPSII_BUILD_ROOT} ]; then
rm -rf ${AWIPSII_BUILD_ROOT}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
fi
rpmbuild -ba --target=${TARGET_ARCH} \
--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_name %(echo ${COMPONENT_NAME})' \
--buildroot ${AWIPSII_BUILD_ROOT} \
${1}
RC=$?
if [ ${RC} -ne 0 ]; then
return 1
fi
}
# Special Cases:
# Builds all of the CAVE RPMs.
function buildCAVE()
{
export CAVE_BUILD_ARCH="x86_64"
export RPM_TOP_DIR="${AWIPSII_TOP_DIR}"
cd ${WORKSPACE}/Installer.rpm/awips2.cave/deploy.builder
time ./build.sh "${AWIPSII_VERSION}" "${AWIPSII_RELEASE}"
RC=$?
if [ ${RC} -ne 0 ]; then
return 1
fi
return 0
}
# Builds all of the EDEX RPMs.
function buildEDEX()
{
export EDEX_BUILD_ARCH="x86_64"
export RPM_TOP_DIR="${AWIPSII_TOP_DIR}"
cd ${WORKSPACE}/Installer.rpm/awips2.edex/deploy.builder
time ./build.sh "${AWIPSII_VERSION}" "${AWIPSII_RELEASE}"
RC=$?
if [ ${RC} -ne 0 ]; then
return 1
fi
return 0
}
# Initialize our environment.
prepareBuildEnvironment
# Determine if any arguments have been passed to us.
if [ $# -eq 0 ]; then
# We will be building all 64-bit RPMs.
for dir in `ls -1d ${WORKSPACE}/Installer.rpm/awips2.64/Installer.*`;
do
buildRPM ${dir}/component.spec
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Failed to build the 64-Bit RPMs."
exit 1
fi
done
buildCAVE
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Failed to build the 64-Bit RPMs."
exit 1
fi
buildEDEX
if [ $? -ne 0 ]; then
echo "ERROR: Failed to build the 64-bit RPMs."
exit 1
fi
lookupRPM "awips2-python"
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM ${RPM_SPECS_DIR}/component.spec
if [ $? -ne 0 ]; then
exit 1
fi
lookupRPM "awips2-python-pygtk"
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM ${RPM_SPECS_DIR}/component.spec
if [ $? -ne 0 ]; then
exit 1
fi
lookupRPM "awips2-python-pycairo"
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM ${RPM_SPECS_DIR}/component.spec
if [ $? -ne 0 ]; then
exit 1
fi
fi
if [ $# -gt 0 ]; then
# We will attempt to build the rpms the user specified.
for arg in $@; do
lookupRPM ${arg}
RC=$?
if [ "${RC}" -ne 0 ]; then
echo "ERROR: Invalid RPM Specifier: ${arg}."
exit 1
fi
if [ ! "${RPM_SPECS_DIR}" = "_BUILD_CAVE_" ] &&
[ ! "${RPM_SPECS_DIR}" = "_BUILD_EDEX_" ]; then
buildRPM ${RPM_SPECS_DIR}/component.spec
RC=$?
else
if [ "${RPM_SPECS_DIR}" = "_BUILD_CAVE_" ]; then
buildCAVE
RC=$?
fi
if [ "${RPM_SPECS_DIR}" = "_BUILD_EDEX_" ]; then
buildEDEX
RC=$?
fi
fi
if [ ${RC} -ne 0 ]; then
echo "ERROR: Failed to build - ${arg}."
exit 1
fi
done
fi

View file

@ -38,22 +38,6 @@ fi
if [ -d %{_build_root} ]; then
rm -rf %{_build_root}
fi
/bin/mkdir %{_build_root}
if [ $? -ne 0 ]; then
exit 1
fi
/bin/mkdir %{_build_root}/awips2
if [ $? -ne 0 ]; then
exit 1
fi
/bin/mkdir -p %{_build_root}/awips2/alertviz/alertvizEnvironment
if [ $? -ne 0 ]; then
exit 1
fi
/bin/mkdir -p %{_build_root}/etc/xdg/autostart
if [ $? -ne 0 ]; then
exit 1
fi
%build
build_arch=%{_build_arch}
@ -78,6 +62,15 @@ fi
popd > /dev/null
%install
/bin/mkdir -p %{_build_root}/awips2/alertviz/alertvizEnvironment
if [ $? -ne 0 ]; then
exit 1
fi
/bin/mkdir -p %{_build_root}/etc/xdg/autostart
if [ $? -ne 0 ]; then
exit 1
fi
build_arch=%{_build_arch}
if [ "${build_arch}" = "i386" ]; then
build_arch="x86"

View file

@ -42,11 +42,14 @@ if [ -d ${RPM_BUILD_ROOT} ]; then
rm -rf ${RPM_BUILD_ROOT}
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/cave/etc
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/cave/etc
if [ $? -ne 0 ]; then
exit 1
fi
BASELINE_ETC_DIR="build/static/common/cave/etc"
ETC_DIR_LOC="%{_baseline_workspace}/${BASELINE_ETC_DIR}"

View file

@ -41,6 +41,9 @@ if [ -d ${RPM_BUILD_ROOT} ]; then
rm -rf ${RPM_BUILD_ROOT}
fi
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/cave/.repository
CAVE_DIST_DIR="%{_baseline_workspace}/rpms/awips2.cave/setup/dist"
@ -52,10 +55,6 @@ fi
cp ${CAVE_DIST_DIR}/%{_component_zip_file_name} \
${RPM_BUILD_ROOT}/awips2/cave/.repository
%build
%install
%pre
# Ensure that CAVE is available to backup and to use to
# apply p2 updates.

View file

@ -52,9 +52,6 @@ fi
if [ -d ${RPM_BUILD_ROOT} ]; then
rm -rf ${RPM_BUILD_ROOT}
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2
mkdir -p ${RPM_BUILD_ROOT}/etc/xdg/autostart
mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d
CAVE_DIST_DIR="%{_baseline_workspace}/rpms/awips2.cave/setup/dist"
if [ ! -f ${CAVE_DIST_DIR}/%{_component_zip_file_name} ]; then
@ -62,12 +59,27 @@ if [ ! -f ${CAVE_DIST_DIR}/%{_component_zip_file_name} ]; then
exit 1
fi
cp ${CAVE_DIST_DIR}/%{_component_zip_file_name} \
${RPM_BUILD_ROOT}/awips2
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2
if [ $? -ne 0 ]; then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/etc/xdg/autostart
if [ $? -ne 0 ]; then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d
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} \
${RPM_BUILD_ROOT}/awips2
cd ${RPM_BUILD_ROOT}/awips2
unzip %{_component_zip_file_name}
rm -f %{_component_zip_file_name}
@ -75,14 +87,23 @@ rm -f %{_component_zip_file_name}
# Our profile.d scripts
PROFILE_D_DIR="%{_baseline_workspace}/rpms/common/environment/awips2-cave/profile.d"
cp ${PROFILE_D_DIR}/* ${RPM_BUILD_ROOT}/etc/profile.d
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
if [ $? -ne 0 ]; then
exit 1
fi
# testWS script
TEXTWS_SCRIPT="rpms/utility/scripts/textWS.sh"
cp %{_baseline_workspace}/${TEXTWS_SCRIPT} ${RPM_BUILD_ROOT}/awips2/cave
if [ $? -ne 0 ]; then
exit 1
fi
# text-workstation autostart script.
CAVE_SCRIPTS_DIR="%{_baseline_workspace}/rpms/awips2.cave/Installer.cave/scripts"

View file

@ -7,6 +7,7 @@ Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
BuildArch: noarch
URL: N/A
License: N/A
Distribution: N/A
@ -34,11 +35,14 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2
if [ $? -ne 0 ]; then
exit 1
fi
FILES_NATIVE="%{_baseline_workspace}/files.native"
/bin/cp -rf ${FILES_NATIVE}/adapt \

View file

@ -7,6 +7,7 @@ Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
BuildArch: noarch
URL: N/A
License: N/A
Distribution: N/A
@ -29,44 +30,26 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/share/aviation
# Create an empty 'tmp' directory.
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/share/aviation/tmp
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/share/aviation/tmp
if [ $? -ne 0 ]; then
exit 1
fi
AVIATION_SRC_DIR="build/static/common/cave/etc/aviation/thresholds"
# Copy the aviation *ish files to their destination.
cp %{_baseline_workspace}/${AVIATION_SRC_DIR}/*.txt \
${RPM_BUILD_ROOT}/awips2/edex/data/share/aviation
if [ $? -ne 0 ]; then
exit 1
fi
%pre
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing the AWIPS II Aviation Distribution...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Installation Root = /awips2\e[m"
echo -e "\e[1;34m Destination = /awips2/edex/data/share/aviation\e[m"
%post
if [ "${1}" = "1" ]; then
exit 0
fi
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II Aviation Distribution Installation - COMPLETE\e[m"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
%postun
if [ "${1}" = "1" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| The AWIPS II Aviation Distribution Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
%clean
rm -rf ${RPM_BUILD_ROOT}

View file

@ -32,11 +32,14 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/data
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/data
if [ $? -ne 0 ]; then
exit 1
fi
PROJECT_DIR="Installer.database-server-configuration"
CONFIGURATION_DIR="rpms/awips2.core/${PROJECT_DIR}/configuration"
CONF_FILE="postgresql.conf"

View file

@ -32,11 +32,14 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/data
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/data
if [ $? -ne 0 ]; then
exit 1
fi
PROJECT_DIR="Installer.database-standalone-configuration"
CONFIGURATION_DIR="rpms/awips2.core/${PROJECT_DIR}/configuration"
CONF_FILE="postgresql.conf"

View file

@ -39,10 +39,14 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/database
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/database
if [ $? -ne 0 ]; then
exit 1
fi
PATH_TO_DDL="build.edex/opt/db/ddl"
# Create A Temporary Directory For The SQL Scripts That The Database
@ -77,8 +81,6 @@ done
# Create our installation log file.
touch ${RPM_BUILD_ROOT}/awips2/database/sqlScripts/share/sql/sql_install.log
%install
%pre
# Verify that one of the official AWIPS II PostgreSQL configuration files exist.
if [ ! -f /awips2/data/postgresql.conf ]; then

View file

@ -48,6 +48,20 @@ if [ $? -ne 0 ]; then
exit 1
fi
%build
# build the edex-environment utilities
pushd . > /dev/null 2>&1
# Run the pde build.
cd %{_baseline_workspace}/build.wes2bridge.utility
/awips2/ant/bin/ant -f build.xml \
-Declipse.dir=%{_uframe_eclipse}
if [ $? -ne 0 ]; then
echo "ERROR: The pde build of the wes2bridge utilities has failed."
exit 1
fi
popd > /dev/null 2>&1
%install
mkdir -p %{_build_root}%{_installation_directory}/edex-environment/scripts
if [ $? -ne 0 ]; then
exit 1
@ -68,21 +82,6 @@ fi
# create the edex environment directory.
mkdir -p %{_build_root}/usr/local/edex-environment
%build
# build the edex-environment utilities
pushd . > /dev/null 2>&1
# Run the pde build.
cd %{_baseline_workspace}/build.wes2bridge.utility
/awips2/ant/bin/ant -f build.xml \
-Declipse.dir=%{_uframe_eclipse}
if [ $? -ne 0 ]; then
echo "ERROR: The pde build of the wes2bridge utilities has failed."
exit 1
fi
popd > /dev/null 2>&1
%install
# Run the deployment to the specified directory:
# %{_build_root}%{_installation_directory}/edex

View file

@ -31,11 +31,14 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/hdf5/gfe/climo
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/hdf5/gfe/climo
if [ $? -ne 0 ]; then
exit 1
fi
# Copies the standard Raytheon licenses into a license directory for the
# current component.
function copyLegal()

View file

@ -31,11 +31,13 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data
if [ $? -ne 0 ]; then
exit 1
fi
# Determine which version of the gfe we should use.
RPM_COMMON_DIR="%{_baseline_workspace}/rpms/common/static.versions"
@ -59,11 +61,8 @@ if [ $? -ne 0 ]; then
fi
%pre
%post
%preun
%postun
%clean

View file

@ -34,9 +34,6 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite
mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d
%build
# Verify that awips2-ant is installed.
if [ ! -f /awips2/ant/bin/ant ]; then
@ -45,14 +42,22 @@ if [ ! -f /awips2/ant/bin/ant ]; then
fi
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite
if [ $? -ne 0 ]; then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d
if [ $? -ne 0 ]; then
exit 1
fi
GFESUITE_PROJECT="com.raytheon.uf.tools.gfesuite"
GFESUITE_DEPLOY_SCRIPT="%{_baseline_workspace}/${GFESUITE_PROJECT}/deploy.xml"
/awips2/ant/bin/ant -f ${GFESUITE_DEPLOY_SCRIPT} \
-Dinstall.dir=${RPM_BUILD_ROOT}/awips2/GFESuite \
-Dinstaller=true -Dclient.build=true
RC=$?
if [ ${RC} -ne 0 ]; then
if [ $? -ne 0 ]; then
echo "ERROR: ant failed."
exit 1
fi

View file

@ -34,9 +34,6 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite
mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d
%build
# Verify that awips2-ant is installed.
if [ ! -f /awips2/ant/bin/ant ]; then
@ -45,6 +42,15 @@ if [ ! -f /awips2/ant/bin/ant ]; then
fi
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite
if [ $? -ne 0 ]; then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d
if [ $? -ne 0 ]; then
exit 1
fi
GFESUITE_PROJECT="com.raytheon.uf.tools.gfesuite"
GFESUITE_DEPLOY_SCRIPT="%{_baseline_workspace}/${GFESUITE_PROJECT}/deploy.xml"

View file

@ -37,6 +37,9 @@ if [ -d %{_build_root} ]; then
fi
fi
%build
%install
mkdir -p %{_build_root}/awips2
if [ $? -ne 0 ]; then
exit 1
@ -46,9 +49,6 @@ if [ $? -ne 0 ]; then
exit 1
fi
%build
%install
RPMS_DIRECTORY="%{_baseline_workspace}/rpms"
INSTALLER_GROOVY="${RPMS_DIRECTORY}/awips2.core/Installer.groovy"

View file

@ -30,43 +30,27 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d
if [ $? -ne 0 ]; then
exit 1
fi
LOCALAPPS_RPM_DIR="rpms/awips2.core/Installer.localapps-environment"
PROFILED_DIR="${LOCALAPPS_RPM_DIR}/scripts/profile.d"
# Copy the profile.d scripts.
cp %{_baseline_workspace}/${PROFILED_DIR}/* ${RPM_BUILD_ROOT}/etc/profile.d
if [ $? -ne 0 ]; then
exit 1
fi
%pre
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing the AWIPS II localapps environment...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
%post
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II localapps environment installation - COMPLETE\e[m"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
%preun
%postun
if [ "${1}" = "1" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| The AWIPS II localapps environment Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo ""
%clean
rm -rf ${RPM_BUILD_ROOT}

View file

@ -39,8 +39,6 @@ if [ -d ${RPM_BUILD_ROOT} ]; then
fi
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/utility
%build
%install
@ -49,11 +47,15 @@ if [ ! -d %{_baseline_workspace}/%{_localization_directory} ]; then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/utility
if [ $? -ne 0 ]; then
exit 1
fi
# Copy the localization.
cp -rv %{_baseline_workspace}/%{_localization_directory}/utility/* \
${RPM_BUILD_ROOT}/awips2/edex/data/utility
RC=$?
if [ ${RC} -ne 0 ]; then
if [ $? -ne 0 ]; then
exit 1
fi

View file

@ -33,11 +33,14 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/database/sqlScripts/share/sql/maps
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/database/sqlScripts/share/sql/maps
if [ $? -ne 0 ]; then
exit 1
fi
# Determine which version of db we should use.
RPM_COMMON_DIR="%{_baseline_workspace}/rpms/common/static.versions"

View file

@ -34,12 +34,17 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/${PYPIES_PY_DEST_DIR}
mkdir -p ${RPM_BUILD_ROOT}/awips2/python/lib/python2.7/site-packages/pypies
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/${PYPIES_PY_DEST_DIR}
if [ $? -ne 0 ]; then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/python/lib/python2.7/site-packages/pypies
if [ $? -ne 0 ]; then
exit 1
fi
# Copy The PyPIES modules To The appropriate directory.
PYPIES_FILE_SRC_DIR="pythonPackages/pypies"
@ -55,34 +60,9 @@ cp %{_baseline_workspace}/${PYPIES_FILE_SRC_DIR}/pypies.cfg \
mkdir -p ${RPM_BUILD_ROOT}/awips2/pypies/logs
%pre
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing AWIPS II PyPIES...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Installation Root = /awips2/pypies\e[m"
%post
# Determine the location of awips2-python
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II PyPIES Installation - COMPLETE\e[m"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
%preun
%postun
if [ "${1}" = "1" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| The AWIPS II PyPIES Installation Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo ""
%clean
rm -rf ${RPM_BUILD_ROOT}

View file

@ -8,7 +8,6 @@ Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
BuildArch: noarch
Prefix: /awips2/edex
URL: N/A
License: N/A
Distribution: N/A
@ -31,11 +30,14 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/hdf5/topo
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/hdf5/topo
if [ $? -ne 0 ]; then
exit 1
fi
# Copies the standard Raytheon licenses into a license directory for the
# current component.
function copyLegal()
@ -91,8 +93,7 @@ for topoFile in ${TOPO_TO_COPY[*]};
do
cp -r %{_awipscm_share}/${TOPO_SRC_DIR}/${topoFile} \
${RPM_BUILD_ROOT}/awips2/edex/data/hdf5/topo
RC=$?
if [ ${RC} -ne 0 ]; then
if [ $? -ne 0 ]; then
exit 1
fi
done
@ -101,42 +102,16 @@ done
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/hdf5/topo/hlsTopo
cp -r %{_awipscm_share}/${TOPO_SRC_DIR}/hlsTopo/* \
${RPM_BUILD_ROOT}/awips2/edex/data/hdf5/topo/hlsTopo
RC=$?
if [ ${RC} -ne 0 ]; then
if [ $? -ne 0 ]; then
exit 1
fi
copyLegal "awips2/edex/data/hdf5/topo"
%pre
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing the AWIPS II Topo Distribution...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Installation Root = ${RPM_INSTALL_PREFIX}\e[m"
echo -e "\e[1;34m Destination = ${RPM_INSTALL_PREFIX}/data/hdf5/topo\e[m"
echo ""
%post
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II Topo Distribution Installation - COMPLETE\e[m"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
%preun
%postun
if [ "${1}" = "1" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| The AWIPS II Topo Distribution Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
%clean
rm -rf ${RPM_BUILD_ROOT}

View file

@ -1,313 +0,0 @@
#!/bin/bash
# This is the baselined Hudson script that is used to build the
# 64-bit RPMs for both release and nightly builds.
# Expected Environment Variables:
# 1) ${WORKSPACE} - the location of the hudson workspace.
# 2) ${AWIPSII_VERSION} - the build version; defaults to the contents of version.txt
# 3) ${AWIPSII_RELEASE} - the build release; defaults to the current date in YYYYMMDD
# Provided Variables:
# 1) ${REPOSITORY} - the root directory of the AWIPS II repository.
# 2) ${REPOSITORY_LOCK} - the name of the repository locking file.
REPOSITORY="/install/repository"
REPOSITORY_LOCK="repository.lck"
function logINFO()
{
# Arguments:
# ${1} - the message to log.
echo "INFO: ${1}"
}
function logERROR()
{
# Arguments:
# ${1} - the message to log.
echo "ERROR: ${1}"
}
function lockRepository()
{
if [ -f ${REPOSITORY}/arch.x86_64/${REPOSITORY_LOCK} ]; then
logINFO "The repository is currently locked."
sleep 5
while [ -f ${REPOSITORY}/arch.x86_64/${REPOSITORY_LOCK} ]
do
logINFO "The repository is still locked."
sleep 5
done
logINFO "The repository is no longer locked."
fi
logINFO "Locking the repository."
touch ${REPOSITORY}/arch.x86_64/${REPOSITORY_LOCK}
}
function unlockRepository()
{
sleep 5
logINFO "Unlocking the repository."
rm -fv ${REPOSITORY}/arch.x86_64/${REPOSITORY_LOCK}
}
function buildRelease()
{
REPOSITORY="${REPOSITORY}/release"
time /bin/bash build.sh
if [ $? -ne 0 ]; then
logERROR "Failed to build the x86_64 RPMs."
return 1
fi
return 0
}
function createRepositoryRelease()
{
#1) Create the needed directories, if they do not already exist.
if [ ! -d ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE} ]; then
mkdir -p ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
if [ $? -ne 0 ]; then
return 1
fi
chmod 777 ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
if [ $? -ne 0 ]; then
return 1
fi
fi
#2) Copy the RPMs that we are responsible for into the repository.
cd ${WORKSPACE}/rpmbuild/RPMS
if [ -d ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE}/x86_64 ]; then
rm -rf ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE}/x86_64
fi
cp -rv x86_64 ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
if [ $? -ne 0 ]; then
return 1
fi
#3) Copy the baselined comps.xml file into the repository.
cd ${WORKSPACE}/Installer.rpm/common/yum/arch.x86_64
if [ ! -f comps.xml ]; then
logERROR "The baselined comps.xml file does not exist."
return 1
fi
cp -v comps.xml ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
if [ $? -ne 0 ]; then
return 1
fi
return 0
}
function buildNightly()
{
local RPMS_TO_BUILD="awips2-alertviz awips2-cave awips2-python-dynamicserialize awips2-python-ufpy"
REPOSITORY="${REPOSITORY}/nightly"
# Build the RPMs.
time /bin/bash build.sh "${RPMS_TO_BUILD}"
if [ $? -ne 0 ]; then
logERROR "Failed to build the x86_64 RPMs."
return 1
fi
return 0
}
function createRepositoryNightly()
{
lockRepository
# 1) Determine what the dated directory should be.
DATE=`date +"%Y%m%d"`
# 2) Create the needed directories if they do not already exist.
if [ ! -d ${REPOSITORY}/arch.x86_64/${DATE} ]; then
mkdir -p ${REPOSITORY}/arch.x86_64/${DATE}
if [ $? -ne 0 ]; then
unlockRepository
return 1
fi
chmod 777 ${REPOSITORY}/arch.x86_64/${DATE}
fi
# 3) Copy the RPMs that we are responsible for into the repository.
cd ${WORKSPACE}/rpmbuild/RPMS
# 3i) Remove any existing RPMs from a previous build.
if [ -d ${REPOSITORY}/arch.x86_64/${DATE}/x86_64 ]; then
rm -rf ${REPOSITORY}/arch.x86_64/${DATE}/x86_64
if [ $? -ne 0 ]; then
unlockRepository
return 1
fi
fi
cp -rv x86_64 ${REPOSITORY}/arch.x86_64/${DATE}
if [ $? -ne 0 ]; then
unlockRepository
return 1
fi
# 4) Copy the baselined comps.xml file into the repository.
cd ${WORKSPACE}/Installer.rpm/common/yum/arch.x86_64
if [ ! -f comps.xml ]; then
logERROR "The baselined comps.xml file does not exist."
unlockRepository
return 1
fi
cp -v comps.xml ${REPOSITORY}/arch.x86_64
if [ $? -ne 0 ]; then
unlockRepository
return 1
fi
# 5) Re-build the repository.
cd ${REPOSITORY}/arch.x86_64
createrepo ${REPOSITORY}/arch.x86_64
if [ $? -ne 0 ]; then
unlockRepository
return 1
fi
createrepo -g comps.xml .
if [ $? -ne 0 ]; then
unlockRepository
return 1
fi
unlockRepository
return 0
}
function buildRPMs()
{
pushd . > /dev/null
cd ${WORKSPACE}/Installer.rpm/awips2.64/deploy.builder
# Determine what type of build we are doing.
if [ "${AWIPSII_VERSION}" = "" ] &&
[ "${AWIPSII_RELEASE}" = "" ]; then
buildNightly
if [ $? -ne 0 ]; then
return 1
fi
createRepositoryNightly
RC=$?
else
buildRelease
if [ $? -ne 0 ]; then
return 1
fi
createRepositoryRelease
RC=$?
fi
popd > /dev/null
return ${RC}
}
function validateEnvironment()
{
if [ "${WORKSPACE}" = "" ]; then
logERROR "The location of the Hudson workspace has not been set into the environment."
return 1
fi
return 0
}
function setup()
{
if [ ! -d ${WORKSPACE}/awips ]; then
mkdir -p ${WORKSPACE}/awips
if [ $? -ne 0 ]; then
return 1
fi
fi
pushd . > /dev/null
cd ${WORKSPACE}
# The rsync
rsync -ruq --delete --exclude-from=/var/lib/hudson/excludes \
cave/* cots/* edexOsgi/* ncep/* RadarServer/* awips
if [ $? -ne 0 ]; then
return 1
fi
# sync the remaining project directories.
if [ -d awips/pythonPackages ]; then
rm -rf awips/pythonPackages
if [ $? -ne 0 ]; then
return 1
fi
fi
if [ -d awips/Installer.rpm ]; then
rm -rf awips/Installer.rpm
if [ $? -ne 0 ]; then
return 1
fi
fi
cp -rv pythonPackages awips
if [ $? -ne 0 ]; then
return 1
fi
cp -rv rpms awips/Installer.rpm
if [ $? -ne 0 ]; then
return 1
fi
cd ${WORKSPACE}/awips
# Cleanup SVN metadata.
find . -name .svn -exec rm -rf {} \;
popd > /dev/null
# Create the standard RPM Build directory structure.
if [ -d ${WORKSPACE}/awips/rpmbuild ]; then
rm -rf ${WORKSPACE}/awips/rpmbuild
if [ $? -ne 0 ]; then
return 1
fi
fi
mkdir -p ${WORKSPACE}/awips/rpmbuild
if [ $? -ne 0 ]; then
return 1
fi
mkdir -p ${WORKSPACE}/awips/rpmbuild/BUILD
if [ $? -ne 0 ]; then
return 1
fi
mkdir -p ${WORKSPACE}/awips/rpmbuild/RPMS
if [ $? -ne 0 ]; then
return 1
fi
mkdir -p ${WORKSPACE}/awips/rpmbuild/SOURCES
if [ $? -ne 0 ]; then
return 1
fi
mkdir -p ${WORKSPACE}/awips/rpmbuild/SPECS
if [ $? -ne 0 ]; then
return 1
fi
mkdir -p ${WORKSPACE}/awips/rpmbuild/SRPMS
if [ $? -ne 0 ]; then
return 1
fi
export AWIPSII_TOP_DIR="${WORKSPACE}/awips/rpmbuild"
export WORKSPACE="${WORKSPACE}/awips"
return 0
}
# Begin
validateEnvironment
if [ $? -ne 0 ]; then
exit 1
fi
setup
if [ $? -ne 0 ]; then
exit 1
fi
buildRPMs
if [ $? -ne 0 ]; then
exit 1
fi
# Finished
exit 0

View file

@ -1,211 +0,0 @@
#!/bin/bash
# This is the baselined Hudson script that is used to build the
# 64-bit RPMs for both release and nightly builds.
# Expected Environment Variables:
# 1) ${WORKSPACE} - the location of the hudson workspace.
# 2) ${AWIPSII_VERSION} - the build version; defaults to the contents of version.txt
# 3) ${AWIPSII_RELEASE} - the build release; defaults to the current date in YYYYMMDD
# Provided Variables:
# 1) ${REPOSITORY} - the root directory of the AWIPS II repository.
# 2) ${REPOSITORY_LOCK} - the name of the repository locking file.
REPOSITORY="/install/repository"
REPOSITORY_LOCK="repository.lck"
function logINFO()
{
# Arguments:
# ${1} - the message to log.
echo "INFO: ${1}"
}
function logERROR()
{
# Arguments:
# ${1} - the message to log.
echo "ERROR: ${1}"
}
function lockRepository()
{
if [ -f ${REPOSITORY}/arch.x86_64/${REPOSITORY_LOCK} ]; then
logINFO "The repository is currently locked."
sleep 5
while [ -f ${REPOSITORY}/arch.x86_64/${REPOSITORY_LOCK} ]
do
logINFO "The repository is still locked."
sleep 5
done
logINFO "The repository is no longer locked."
fi
logINFO "Locking the repository."
touch ${REPOSITORY}/arch.x86_64/${REPOSITORY_LOCK}
}
function unlockRepository()
{
sleep 5
logINFO "Unlocking the repository."
rm -fv ${REPOSITORY}/arch.x86_64/${REPOSITORY_LOCK}
}
function buildRelease()
{
REPOSITORY="${REPOSITORY}/release"
time /bin/bash build.sh
if [ $? -ne 0 ]; then
logERROR "Failed to build the x86_64 RPMs."
return 1
fi
return 0
}
function createRepositoryRelease()
{
#1) Create the needed directories, if they do not already exist.
if [ ! -d ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE} ]; then
mkdir -p ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
if [ $? -ne 0 ]; then
return 1
fi
chmod 777 ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
if [ $? -ne 0 ]; then
return 1
fi
fi
#2) Copy the RPMs that we are responsible for into the repository.
cd ${AWIPSII_TOP_DIR}/RPMS
if [ -d ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE}/x86_64 ]; then
rm -rf ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE}/x86_64
fi
cp -rv x86_64 ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
if [ $? -ne 0 ]; then
return 1
fi
#3) Copy the baselined comps.xml file into the repository.
cd ${WORKSPACE}/Installer.rpm/common/yum/arch.x86_64
if [ ! -f comps.xml ]; then
logERROR "The baselined comps.xml file does not exist."
return 1
fi
cp -v comps.xml ${REPOSITORY}/arch.x86_64/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
if [ $? -ne 0 ]; then
return 1
fi
return 0
}
function buildNightly()
{
local RPMS_TO_BUILD="awips2-alertviz awips2-cave awips2-python-dynamicserialize awips2-python-ufpy"
REPOSITORY="${REPOSITORY}/nightly"
# Build the RPMs.
time /bin/bash build.sh "${RPMS_TO_BUILD}"
if [ $? -ne 0 ]; then
logERROR "Failed to build the x86_64 RPMs."
return 1
fi
return 0
}
function createRepositoryNightly()
{
lockRepository
# 1) Determine what the dated directory should be.
DATE=`date +"%Y%m%d"`
# 2) Create the needed directories if they do not already exist.
if [ ! -d ${REPOSITORY}/arch.x86_64/${DATE} ]; then
mkdir -p ${REPOSITORY}/arch.x86_64/${DATE}
if [ $? -ne 0 ]; then
unlockRepository
return 1
fi
chmod 777 ${REPOSITORY}/arch.x86_64/${DATE}
fi
# 3) Copy the RPMs that we are responsible for into the repository.
cd ${AWIPSII_TOP_DIR}/RPMS
# 3i) Remove any existing RPMs from a previous build.
if [ -d ${REPOSITORY}/arch.x86_64/${DATE}/x86_64 ]; then
rm -rf ${REPOSITORY}/arch.x86_64/${DATE}/x86_64
if [ $? -ne 0 ]; then
unlockRepository
return 1
fi
fi
cp -rv x86_64 ${REPOSITORY}/arch.x86_64/${DATE}
if [ $? -ne 0 ]; then
unlockRepository
return 1
fi
# 4) Copy the baselined comps.xml file into the repository.
cd ${WORKSPACE}/Installer.rpm/common/yum/arch.x86_64
if [ ! -f comps.xml ]; then
logERROR "The baselined comps.xml file does not exist."
unlockRepository
return 1
fi
cp -v comps.xml ${REPOSITORY}/arch.x86_64
if [ $? -ne 0 ]; then
unlockRepository
return 1
fi
# 5) Re-build the repository.
cd ${REPOSITORY}/arch.x86_64
createrepo ${REPOSITORY}/arch.x86_64
if [ $? -ne 0 ]; then
unlockRepository
return 1
fi
createrepo -g comps.xml .
if [ $? -ne 0 ]; then
unlockRepository
return 1
fi
unlockRepository
return 0
}
function buildRPMs()
{
pushd . > /dev/null
cd ${WORKSPACE}/Installer.rpm/awips2.64/deploy.builder
# Determine what type of build we are doing.
if [ "${AWIPSII_VERSION}" = "" ] &&
[ "${AWIPSII_RELEASE}" = "" ]; then
buildNightly
if [ $? -ne 0 ]; then
return 1
fi
createRepositoryNightly
RC=$?
else
buildRelease
if [ $? -ne 0 ]; then
return 1
fi
createRepositoryRelease
RC=$?
fi
popd > /dev/null
return ${RC}
}
# Begin
buildRPMs
if [ $? -ne 0 ]; then
exit 1
fi
# Finished
exit 0

View file

@ -1,5 +1,34 @@
#!/bin/bash
function buildOpenfire()
{
lookupRPM "awips2-openfire"
if [ $? -ne 0 ]; then
echo "ERROR: '${1}' is not a recognized AWIPS II RPM."
exit 1
fi
/usr/bin/rpmbuild -ba --target=i386 \
--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
}
function buildJava()
{
pushd . > /dev/null 2>&1

View file

@ -1,48 +0,0 @@
#!/bin/bash
if [ "${REPO_SHARE_ROOT}" = "" ]; then
echo "ERROR: the 'REPO_SHARE_ROOT' environment variable is UNDEFINED."
exit 1
fi
if [ "${BUILD_DATE}" = "" ]; then
echo "ERROR: the 'BUILD_DATE' environment variable is UNDEFINED."
exit 1
fi
# Create a dated directory in the repo directory - archive any existing directories.
if [ -d ${REPO_SHARE_ROOT}/${BUILD_DATE} ]; then
rm -rf ${REPO_SHARE_ROOT}/${BUILD_DATE}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
fi
# Create the nightly repo directory.
mkdir -p ${REPO_SHARE_ROOT}/${BUILD_DATE}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
# Create the categorized repo directories.
mkdir -p ${REPO_SHARE_ROOT}/${BUILD_DATE}/core
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
mkdir -p ${REPO_SHARE_ROOT}/${BUILD_DATE}/edex
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
mkdir -p ${REPO_SHARE_ROOT}/${BUILD_DATE}/python.site-packages
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
mkdir -p ${REPO_SHARE_ROOT}/${BUILD_DATE}/cave
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi

View file

@ -1,79 +0,0 @@
#!/bin/bash
echo "Starting ... $0."
RPM_BUILD_SCRIPT="build.sh"
RPM_PROJECT_DIR="${WORKSPACE}/all/Installer.rpm"
export RPM_TOP_DIR="${WORKSPACE}/all/rpmbuild"
RPM_DEST_DIR="${RPM_TOP_DIR}/RPMS/i386"
export AWIPSII_BUILD_TAG=`perl ${RPM_PROJECT_DIR}/awips2.core/deploy.builder/extractTag.pl ${1}`
# Build the Core RPMs.
cd ${RPM_PROJECT_DIR}/awips2.core/deploy.builder
time ./${RPM_BUILD_SCRIPT}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
# Copy the RPMs To The Repo Directory ~ core.
cp -v ${RPM_DEST_DIR}/* ${REPO_SHARE_ROOT}/${BUILD_DATE}/core
cp -v ${RPM_DEST_DIR}/../noarch/* ${REPO_SHARE_ROOT}/${BUILD_DATE}/core
rm -fv ${RPM_DEST_DIR}/*
# Build the Python Site-Package RPMs.
cd ${RPM_PROJECT_DIR}/python.site-packages/deploy.builder
time ./${RPM_BUILD_SCRIPT}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
# Copy the RPMs to the Repo Directory ~ python.site-packages.
cp -v ${RPM_DEST_DIR}/* ${REPO_SHARE_ROOT}/${BUILD_DATE}/python.site-packages
rm -fv ${RPM_DEST_DIR}/*
export AWIPSCM_SHARE="/share1"
export WORKSPACE_DIR="${WORKSPACE}"
# Build the Edex RPMs.
cd ${RPM_PROJECT_DIR}/awips2.edex/deploy.builder
time ./${RPM_BUILD_SCRIPT}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
# Copy the RPMs to the Repo Directory ~ edex.
cp -v ${RPM_DEST_DIR}/* ${REPO_SHARE_ROOT}/${BUILD_DATE}/edex
rm -fv ${RPM_DEST_DIR}/*
# Build the CAVE RPMs.
cd ${RPM_PROJECT_DIR}/awips2.cave/deploy.builder
time ./${RPM_BUILD_SCRIPT}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
# Copy the RPMs to the Repo Directory ~ cave.
cp -v ${RPM_DEST_DIR}/* ${REPO_SHARE_ROOT}/${BUILD_DATE}/cave
rm -fv ${RPM_DEST_DIR}/*
# Copy the baselined comps.xml to the repository.
if [ -f ${REPO_SHARE_ROOT}/comps.xml ]; then
rm -fv ${REPO_SHARE_ROOT}/comps.xml
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
fi
if [ ! -f ${RPM_PROJECT_DIR}/common/yum/arch.x86/comps.xml ]; then
file ${RPM_PROJECT_DIR}/common/comps.xml
exit 1
fi
cp -v ${RPM_PROJECT_DIR}/common/comps.xml ${REPO_SHARE_ROOT}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
echo "Finished ... $0."
exit 0

View file

@ -1,38 +0,0 @@
#!/bin/bash
echo "Starting ... $0."
ECLIPSE_HOME="/opt/uframe-eclipse"
function buildProject()
{
# $1 == BUILD DIRECTORY
BUILD_DIRECTORY=${1}
if [ ! -d ${WORKSPACE}/all/${BUILD_DIRECTORY} ]; then
echo "Unable To Find ... ${BUILD_DIRECTORY}"
return 1
fi
cd ${WORKSPACE}/all/${BUILD_DIRECTORY}
time ./build.sh -eclipse=${ECLIPSE_HOME}
RC=$?
if [ ${RC} -ne 0 ]; then
echo "Failed To Build Project(s) In ... ${BUILD_DIRECTORY}."
return 1
fi
}
PROJECTS_TO_BUILD=('build.edex' 'build.rcm' 'build')
for project in ${PROJECTS_TO_BUILD[*]}; do
buildProject ${project}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
done
echo "Finished ... $0."
exit 0

View file

@ -1,46 +0,0 @@
#!/bin/bash
echo "Starting ... $0."
if [ -d ${WORKSPACE}/all/rpmbuild ]; then
rm -rf ${WORKSPACE}/all/rpmbuild
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
fi
mkdir -p ${WORKSPACE}/all/rpmbuild
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
mkdir -p ${WORKSPACE}/all/rpmbuild/BUILD
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
mkdir -p ${WORKSPACE}/all/rpmbuild/RPMS/i386
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
mkdir -p ${WORKSPACE}/all/rpmbuild/SOURCES
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
mkdir -p ${WORKSPACE}/all/rpmbuild/SPECS
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
mkdir -p ${WORKSPACE}/all/rpmbuild/SRPMS
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
echo "Finished ... $0."
exit 0

View file

@ -1,43 +0,0 @@
#!/bin/bash
echo "Starting ... $0."
SVN_EXE=`which svn`
SVN_URL="file:///home/svnsync/mirror/products/awips/trunk2"
INDIVIDUAL_PROJECT_CHECKOUTS=('cave' 'cots' 'edexOsgi' 'nativeLib' 'RadarServer' 'ncep')
ENTIRE_PROJECT_CHECKOUTS=('rpms' 'pythonPackages')
# Create the workspace directory.
if [ -d all ]; then
rm -rf all/
fi
mkdir -p all
cd all/
for project in ${INDIVIDUAL_PROJECT_CHECKOUTS[*]}; do
for i in `${SVN_EXE} list ${SVN_URL}/${project}`; do
if [ "${i}" != ".project" ]; then
${SVN_EXE} export -q --force ${SVN_URL}/${project}/${i}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
fi
done
done
for project in ${ENTIRE_PROJECT_CHECKOUTS[*]}; do
${SVN_EXE} export -q --force ${SVN_URL}/${project}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
done
if [ -d rpms ]; then
mv rpms Installer.rpm
fi
echo "Finished ... $0."
exit 0

View file

@ -1,64 +0,0 @@
#!/bin/bash
echo "Starting ... $0."
SPECS_FILE="component.spec"
RPM_PROJECT_DIR="${WORKSPACE}/all/Installer.rpm"
RPM_INVENTORY="${RPM_PROJECT_DIR}/awips2-rpm.db"
VERSION_FILE="${RPM_PROJECT_DIR}/version.txt"
# Get the current version.
VERSION=`cat ${VERSION_FILE}`
# Determine the nightly release - based on the date.
RELEASE="${BUILD_DATE}"
function replaceVersionAndRelease()
{
# $1 == Directory with the specs file.
local SPECS_DIRECTORY=${1}
echo "INFO: Updating Specs File In - ${SPECS_DIRECTORY}."
# Update The Specs File.
perl -p -i -e "s/Version: 1.0.0/Version: ${VERSION}/g" \
${SPECS_DIRECTORY}/${SPECS_FILE}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
perl -p -i -e "s/Release: 1/Release: ${RELEASE}/g" \
${SPECS_DIRECTORY}/${SPECS_FILE}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
}
# Query the db file to find the core rpms that need to be updated.
SQL="SELECT buildDirectory FROM awips2_core_rpms WHERE dynamicVersion='Y';"
for directory in `echo ${SQL} | sqlite3 ${RPM_INVENTORY}`; do
replaceVersionAndRelease ${RPM_PROJECT_DIR}/${directory}
done
# Query the db file to find the python site-package rpms that need to be updated.
SQL="SELECT buildDirectory FROM awips2_python_site_package_rpms WHERE dynamicVersion='Y';"
for directory in `echo ${SQL} | sqlite3 ${RPM_INVENTORY}`; do
replaceVersionAndRelease ${RPM_PROJECT_DIR}/${directory}
done
# Query the db file to find the edex rpms that need to be updated.
SQL="SELECT buildDirectory FROM awips2_edex_rpms;"
for directory in `echo ${SQL} | sqlite3 ${RPM_INVENTORY}`; do
replaceVersionAndRelease ${RPM_PROJECT_DIR}/${directory}
done
# Query the db file to find the cave rpms that need to be updated.
SQL="SELECT buildDirectory FROM awips2_cave_rpms;"
for directory in `echo ${SQL} | sqlite3 ${RPM_INVENTORY}`; do
replaceVersionAndRelease ${RPM_PROJECT_DIR}/${directory}
done
echo "Finished ... $0."
exit 0

View file

@ -1,121 +0,0 @@
#!/bin/bash
# TODO - Check Number Of Arguments.
WORKSPACE=${1}
SHARE_DIR=${2}
# This is where we will copy the rpms to once they are
# successfully built.
REPO_DEST=${3}
# Determine if we are 32-bit?
CHECK_ARCH=`uname -i`
if [ ! "${CHECK_ARCH}" = "i386" ]; then
echo "INFO: The 32-Bit Build Will Not Be Executed."
exit 0
fi
# Verify that we are being ran as root.
if [ ! "${USER}" = "root" ]; then
echo "ERROR: This Script Must Be Ran As 'root'."
echo "Unable To Continue ... Terminating."
exit 1
fi
# Since we need to build as root.
RPM_DEST_DIR="/usr/src/redhat/RPMS/i386"
echo "INFO: Starting The 32-Bit Build."
# Set script variables
export BUILDROOT_DIR=/tmp/awips-component
# Build awips2-httpd-pypies
PYPIES_PROJECT_DIR="Installer.rpm/awips2.core/Installer.httpd-pypies"
HTTPD_PYPIES_RPM="awips2-httpd-pypies-2.2.3-*.i386.rpm"
# We Need The Source RPM.
PYPIES_SRC_RPM="${SHARE_DIR}/packages/httpd-pypies/src/awips2-httpd-pypies-2.2.3-22.src.rpm"
# Ensure That The Source RPM Exists.
if [ ! -f ${PYPIES_SRC_RPM} ]; then
echo "ERROR: Unable to locate the httpd-pypies source rpm."
echo "Unable To Continue ... Terminating."
exit 1
fi
# If the source rpm does exist install it.
rpm -ivh ${PYPIES_SRC_RPM}
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Installation of the httpd-pypies src rpm Failed."
echo "Unable To Continue ... Terminating."
exit 1
fi
# Prepare to build the rpm.
export PROJECT_DIR="${WORKSPACE}/Installer.rpm/awips2.core/Installer.httpd-pypies"
# Build awips2-httpd-pypies
rpmbuild -ba --target=i386 --buildroot ${BUILDROOT_DIR} ${PROJECT_DIR}/component.spec
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Build of awips2-httpd-pypies Failed."
echo "Unable To Continue ... Terminating."
exit 1
fi
# ----------------------------------------------------------------------------------------------- #
# Prepare to build the rpm.
LDM_PROJECT_DIR="Installer.rpm/awips2.core/Installer.ldm"
LDM_RPM="awips2-ldm-6.8.1-*.i386.rpm"
export WORKSPACE_DIR=${WORKSPACE}
LDM_PROJECT_DIR="${WORKSPACE_DIR}/Installer.rpm/awips2.core/Installer.ldm"
# Build awips2-ldm
rpmbuild -ba --target=i386 --buildroot ${BUILDROOT_DIR} ${LDM_PROJECT_DIR}/component.spec
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Build of awips2-ldm Failed."
echo "Unable To Continue ... Terminating."
exit 1
fi
# ----------------------------------------------------------------------------------------------- #
# Prepare to build the rpm. awips2-python-pygtk.i386
PYGTK_PROJECT_DIR="${WORKSPACE_DIR}/Installer.rpm/python.site-packages/Installer.pygtk"
PYGTK_RPM="awips2-python-pygtk-2.8.6-1.i386.rpm"
rpmbuild -ba --target=i386 \
--buildroot ${BUILDROOT_DIR} \
--define '_baseline_workspace %(echo ${WORKSPACE_DIR})' \
--define '_build_root %(echo ${BUILDROOT_DIR})' \
${PYGTK_PROJECT_DIR}/component.spec
if [ $? -ne 0 ]; then
echo "ERROR: Build of awips2-python-pygtk Failed."
echo "Unable to Continue ... Terminating."
exit 1
fi
# ----------------------------------------------------------------------------------------------- #
# Prepare to build the rpm. awips2-python-pycairo.i386
PYCAIRO_PROJECT_DIR="${WORKSPACE_DIR}/Installer.rpm/python.site-packages/Installer.pycairo"
PYCAIRO_RPM="awips2-python-pycairo-1.2.2-1.i386.rpm"
rpmbuild -ba --target=i386 \
--buildroot ${BUILDROOT_DIR} \
--define '_baseline_workspace %(echo ${WORKSPACE_DIR})' \
--define '_build_root %(echo ${BUILDROOT_DIR})' \
${PYCAIRO_PROJECT_DIR}/component.spec
if [ $? -ne 0 ]; then
echo "ERROR: Build of awips2-python-pycairo Failed."
echo "Unable to Continue ... Terminating."
exit 1
fi
# ----------------------------------------------------------------------------------------------- #
# Copy the rpms that we just built to the specified destination.
cp -v ${RPM_DEST_DIR}/${HTTPD_PYPIES_RPM} ${REPO_DEST}
cp -v ${RPM_DEST_DIR}/${LDM_RPM} ${REPO_DEST}
cp -v ${RPM_DEST_DIR}/${PYGTK_RPM} ${REPO_DEST}
cp -v ${RPM_DEST_DIR}/${PYCAIRO_RPM} ${REPO_DEST}

View file

@ -1,35 +0,0 @@
#!/bin/bash
# Next, we need to build edex, cave, and alertviz.
# TODO: Consider building only the projects that are required (ex: if the user specifies awips2-edex, there is no reason to build cave, rcm, ...)
echo "INFO: Begin - Building edex, cave, rcm, and alertviz."
function buildProject()
{
# Arguments:
# ${1} == BUILD DIRECTORY
BUILD_DIRECTORY=${1}
cd ${BUILD_DIRECTORY}
echo "INFO: Building ... ${BUILD_DIRECTORY}"
time ./build.sh -eclipse=${ECLIPSE_HOME}
RC="$?"
if [ ! "${RC}" = "0" ]; then
echo "ERROR: Failed To Build ... '${BUILD_DIRECTORY}."
echo "Unable To Continue ... Terminating."
exit 1
fi
# Exit the build directory
cd ${WORKSPACE}
}
PROJECTS_TO_BUILD=( 'build.edex' 'build.rcm' 'build' )
for project in ${PROJECTS_TO_BUILD[*]};
do
buildProject ${project}
done
echo "INFO: Finished - Building edex, cave, rcm, and alertviz."

View file

@ -1,26 +0,0 @@
# Now, it is time to build the AWIPS II Cave RPMs.
echo "INFO: Begin - Building AWIPS II Cave RPMs."
export RPM_TOP_DIR="${WORKSPACE}/rpmbuild"
export WORKSPACE_DIR="${WORKSPACE}"
BUILDROOT_DIR=/tmp/awips2-component
COMPONENT=""
COMPONENT_DIR=""
export AWIPSCM_SHARE=${SHARE_DIR}
function updateCaveRepository()
{
mv ${RPM_TOP_DIR}/RPMS/i386/* ${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/cave
}
cd ${WORKSPACE}/Installer.rpm/awips2.cave/deploy.builder
time ./build.sh ${AWIPSII_VERSION} ${AWIPSII_RELEASE}
RC=$?
if [ ${RC} -ne 0 ]; then
exit ${RC}
fi
updateCaveRepository
echo "INFO: Finish - Building AWIPS II Cave RPMs."

View file

@ -1,253 +0,0 @@
#!/bin/bash
set -x
DB_FILE="${WORKSPACE}/Installer.rpm/awips2-rpm.db"
# Now, it is time to build the AWIPS II Core rpms.
echo "INFO: Begin - Building AWIPS II Core RPMs."
export RPM_TOP_DIR="${WORKSPACE}/rpmbuild"
export WORKSPACE_DIR="${WORKSPACE}"
export BUILDROOT_DIR=/tmp/awips2-component
COMPONENT=""
COMPONENT_DIR=""
export AWIPSCM_SHARE=${SHARE_DIR}
export CFLAGS="-m32 -O2"
export LDFLAGS="-m32"
export BASECFLAGS="-m32 -O2"
export LD="ld -melf_i386"
# Build the qpid-cluster rpms.
function updateCoreRepository()
{
mv ${RPM_TOP_DIR}/RPMS/i386/* ${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/core
mv ${RPM_TOP_DIR}/RPMS/noarch/* ${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/core
}
function updateSpecsFileIfNecessary()
{
SQL="SELECT dynamicVersion FROM awips2_core_rpms WHERE component = '${COMPONENT}';"
UPDATE_FLAG=`echo ${SQL} | sqlite3 ${DB_FILE}`
if [ "${UPDATE_FLAG}" = "Y" ]; then
perl -p -i -e "s/Version: 1.0.0/Version: ${AWIPSII_VERSION}/g" ${COMPONENT_SPECS}
perl -p -i -e "s/Release: 1/Release: ${AWIPSII_RELEASE}/g" ${COMPONENT_SPECS}
fi
}
function buildRPM()
{
if [ -f ${RPM_TOP_DIR}/BUILD/component-files.txt ]; then
rm -f ${RPM_TOP_DIR}/BUILD/component-files.txt
fi
rm -rf ${BUILDROOT_DIR}
updateSpecsFileIfNecessary
time rpmbuild -ba --target=i386 \
--define '_topdir %(echo ${RPM_TOP_DIR})' \
--define '_build_root %(echo ${BUILDROOT_DIR})' \
--define '_component_version %(echo ${AWIPSII_VERSION})' \
--define '_component_release %(echo ${AWIPSII_RELEASE})' \
--define '_baseline_workspace %(echo ${WORKSPACE})' \
--buildroot ${BUILDROOT_DIR} ${COMPONENT_SPECS}
RC="$?"
if [ ! "${RC}" = "0" ]; then
echo "ERROR: The build of '${COMPONENT}' has FAILED."
exit 1
fi
}
function buildLocalizationRPMs()
{
# Find all of the localization.${site} directories, if there are any.
ls ${WORKSPACE}/localization.* > /dev/null 2>&1
RC=$?
if [ ${RC} -ne 0 ]; then
# There are not any localization projects.
echo "INFO: There are not any localization projects."
return 0
fi
for dir in `cd ${WORKSPACE}; ls -1d localization.*`; do
site=`perl ${WORKSPACE}/Installer.rpm/awips2.core/deploy.builder/extractSite.pl ${dir}`
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
export LOCALIZATION_DIRECTORY="${dir}"
export COMPONENT_NAME="awips2-localization-${site}"
echo "site: ${site}"
export site="${site}"
rm -rf ${BUILDROOT_DIR}
echo "AAAAAA the version in localization is ${AWIPSII_VERSION}"
echo "AAAAAA the release in localization is ${AWIPSII_RELEASE}"
rpmbuild -ba \
--define '_topdir %(echo ${RPM_TOP_DIR})' \
--define '_component_version %(echo ${AWIPSII_VERSION})' \
--define '_component_release %(echo ${AWIPSII_RELEASE})' \
--define '_component_name %(echo ${COMPONENT_NAME})' \
--define '_baseline_workspace %(echo ${WORKSPACE})' \
--define '_localization_site %(echo ${site})' \
--define '_localization_directory %(echo ${LOCALIZATION_DIRECTORY})' \
--buildroot ${BUILDROOT_DIR} \
${WORKSPACE}/Installer.rpm/awips2.core/Installer.localization/component.spec
RC=$?
unset LOCALIZATION_DIRECTORY
unset COMPONENT_NAME
echo "BBBBBB the version in localization is ${AWIPSII_VERSION}"
echo "BBBBBB the release in localization is ${AWIPSII_RELEASE}"
if [ ${RC} -ne 0 ]; then
echo "ERROR: Failed to build ${COMPONENT_NAME}."
exit 1
fi
done
}
function buildVersionRPM()
{
rm -rf ${BUILDROOT_DIR}
export AWIPSII_BUILD_DATE=`date +"%m-%d-%Y"`
export AWIPSII_BUILD_TIME=`date +"%T %Z"`
export AWIPSII_BUILD_SYSTEM=`uname -n`
export AWIPSII_BUILD_TAG=`perl ${WORKSPACE}/Installer.rpm/awips2.core/deploy.builder/extractTag.pl ${SVN}`
rpmbuild -ba --target=i386 \
--define '_topdir %(echo ${RPM_TOP_DIR})' \
--define '_component_version %(echo ${AWIPSII_VERSION})' \
--define '_component_release %(echo ${AWIPSII_RELEASE})' \
--define '_component_build_date %(echo ${AWIPSII_BUILD_DATE})' \
--define '_component_build_time %(echo ${AWIPSII_BUILD_TIME})' \
--define '_component_build_system %(echo ${AWIPSII_BUILD_SYSTEM})' \
--define '_svn_tag %(echo ${AWIPSII_BUILD_TAG})' \
--buildroot ${BUILDROOT_DIR} \
${COMPONENT_SPECS}
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: The build of '${COMPONENT}' has FAILED."
exit 1
fi
}
function buildQpidRPMs()
{
cd ${WORKSPACE_DIR}/Installer.rpm/awips2.qpid/deploy.builder
chmod a+x build.sh
time ./build.sh
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: The build of the QPID RPMs has FAILED."
exit 1
fi
# If we reach this point, we have successfully built the
# qpid rpms, so it is time to copy them to the workspace
# "repository".
# There are only three qpid rpms that we will want to copy.
local QPID_CLIENT_RPM="awips2-qpid-client-0.7.946106-*.i386.rpm"
local QPID_SERVER_RPM="awips2-qpid-server-0.7.946106-*.i386.rpm"
local QPID_STORE_RPM="awips2-qpid-server-store-0.7.946106-*.i386.rpm"
local QPID_RPM_DIR="${WORKSPACE_DIR}/Installer.rpm/awips2.qpid/RPMS/i386"
cp -v ${QPID_RPM_DIR}/${QPID_CLIENT_RPM} \
${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/core
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Failed To Copy ... ${QPID_CLIENT_RPM}."
exit 1
fi
cp -v ${QPID_RPM_DIR}/${QPID_SERVER_RPM} \
${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/core
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Failed To Copy ... ${QPID_SERVER_RPM}."
exit 1
fi
cp -v ${QPID_RPM_DIR}/${QPID_STORE_RPM} \
${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/core
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Failed To Copy ... ${QPID_STORE_RPM}."
exit 1
fi
}
function loopThroughAllCoreRPMs()
{
SELECT_ALL_SQL="SELECT component FROM awips2_core_rpms ORDER BY component;"
echo "CCCCCC the version in core is ${AWIPSII_VERSION}"
echo "CCCCCC the release in core is ${AWIPSII_RELEASE}"
# Select All RPMs From The Core DB
for component in `echo ${SELECT_ALL_SQL} | sqlite3 ${DB_FILE}`; do
COMPONENT="${component}"
#We build the qpid-cluster RPMs as their own group because their
#build has a different structure.
if [ ! "${COMPONENT}" = "awips2-httpd-pypies" ] &&
[ ! "${COMPONENT}" = "awips2-eclipse" ]; then
# Scan DB for Core RPMs
SQL="SELECT buildDirectory FROM awips2_core_rpms WHERE component = '${COMPONENT}';"
COMPONENT_DIR=`echo ${SQL} | sqlite3 ${DB_FILE}`
# We will be building the rpms directly, instead of using the "batch" build scripts that are included in the rpm
# build projects.
COMPONENT_SPECS="${WORKSPACE_DIR}/Installer.rpm/${COMPONENT_DIR}/component.spec"
if [ "${COMPONENT}" != "awips2" ]; then
buildRPM
else
buildVersionRPM
fi
fi
echo "DDDDDD the version in core is ${AWIPSII_VERSION}"
echo "DDDDDD the release in core is ${AWIPSII_RELEASE}"
done
# Build The Localization RPMs
buildLocalizationRPMs
# Build The QPID RPMs
buildQpidRPMs
}
function loopThroughSpecifiedRPMs()
{
# Scan DB for Core RPMs
for component in ${RPMS_TO_BUILD[*]}; do
COMPONENT="${component}"
SQL="SELECT buildDirectory FROM awips2_core_rpms WHERE component = '${COMPONENT}';"
COMPONENT_DIR=`echo ${SQL} | sqlite3 ${DB_FILE}`
# We will be building the rpms directly, instead of using the "batch" build scripts that are included in the rpm
# build projects.
if [ ! "${COMPONENT_DIR}" = "" ]; then
COMPONENT_SPECS="${WORKSPACE_DIR}/Installer.rpm/${COMPONENT_DIR}/component.spec"
buildRPM
fi
done
}
# For the PostgreSQL Build ~ by hudson user = tomcat
if [ -f /etc/profile.d/awipsPSQL.sh ]; then
source /etc/profile.d/awipsPSQL.sh
fi
if [ "${BUILD_ALL_RPMS}" = "false" ]; then
loopThroughSpecifiedRPMs
else
loopThroughAllCoreRPMs
fi
updateCoreRepository
echo "INFO: Finished - Building AWIPS II Core RPMs."

View file

@ -1,99 +0,0 @@
#!/bin/bash
DB_FILE="${WORKSPACE}/Installer.rpm/awips2-rpm.db"
# Now, it is time to build the AWIPS II Edex RPMs.
echo "INFO: Begin - Building AWIPS II Edex RPMs."
export RPM_TOP_DIR="${WORKSPACE}/rpmbuild"
export WORKSPACE_DIR="${WORKSPACE}"
BUILDROOT_DIR=/tmp/awips2-component
COMPONENT=""
COMPONENT_DIR=""
#echo "DB_FILE=${DB_FILE}"
#exit 1
export AWIPSCM_SHARE=${SHARE_DIR}
function updateEdexRepository()
{
mv ${RPM_TOP_DIR}/RPMS/i386/* ${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/edex
}
function updateSpecsFile()
{
perl -p -i -e "s/Version: 1.0.0/Version: ${AWIPSII_VERSION}/g" ${COMPONENT_SPECS}
perl -p -i -e "s/Release: 1/Release: ${AWIPSII_RELEASE}/g" ${COMPONENT_SPECS}
}
function buildRPM()
{
if [ -f ${RPM_TOP_DIR}/BUILD/component-files.txt ]; then
rm -f ${RPM_TOP_DIR}/BUILD/component-files.txt
fi
rm -rf ${BUILDROOT_DIR}
updateSpecsFile
time rpmbuild -ba --target=i386 \
--define '_topdir %(echo ${RPM_TOP_DIR})' \
--define '_component_version %(echo ${AWIPSII_VERSION})' \
--define '_component_release %(echo ${AWIPSII_RELEASE})' \
--buildroot ${BUILDROOT_DIR} ${COMPONENT_SPECS}
RC="$?"
if [ ! "${RC}" = "0" ]; then
echo "ERROR: The build of '${COMPONENT}' has FAILED."
exit 1
fi
}
function loopThroughAllEdexRPMs()
{
SELECT_ALL_SQL="SELECT component FROM awips2_edex_rpms ORDER BY component;"
# Select All RPMs From The Edex DB
for component in `echo ${SELECT_ALL_SQL} | sqlite3 ${DB_FILE}`; do
COMPONENT="${component}"
# Scan DB for Edex RPMs
SQL="SELECT buildDirectory FROM awips2_edex_rpms WHERE component = '${COMPONENT}';"
COMPONENT_DIR=`echo ${SQL} | sqlite3 ${DB_FILE}`
# We will be building the rpms directly, instead of using the "batch" build scripts that are included in the rpm
# build projects.
COMPONENT_SPECS="${WORKSPACE_DIR}/Installer.rpm/${COMPONENT_DIR}/component.spec"
buildRPM
done
# Build edex-npp
# COMPONENT_SPECS="${WORKSPACE_DIR}/Installer.rpm/awips2.edex/Installer.edex-npp/component.spec"
# buildRPM
}
function loopThroughSpecifiedRPMs()
{
# Scan DB for Python Site-Package RPMs
for component in ${RPMS_TO_BUILD[*]}; do
COMPONENT="${component}"
SQL="SELECT buildDirectory FROM awips2_edex_rpms WHERE component = '${COMPONENT}';"
COMPONENT_DIR=`echo ${SQL} | sqlite3 ${DB_FILE}`
# We will be building the rpms directly, instead of using the "batch" build scripts that are included in the rpm
# build projects.
if [ ! "${COMPONENT_DIR}" = "" ]; then
COMPONENT_SPECS="${WORKSPACE_DIR}/Installer.rpm/${COMPONENT_DIR}/component.spec"
buildRPM
fi
done
}
if [ "${BUILD_ALL_RPMS}" = "false" ]; then
loopThroughSpecifiedRPMs
else
loopThroughAllEdexRPMs
fi
updateEdexRepository
echo "INFO: Finish - Building AWIPS II Edex RPMs."

View file

@ -1,108 +0,0 @@
DB_FILE="${WORKSPACE}/Installer.rpm/awips2-rpm.db"
# Now, it is time to build the AWIPS II Python Site-Package rpms.
echo "INFO: Begin - Building AWIPS II Python Site-Package RPMs."
export RPM_TOP_DIR="${WORKSPACE}/rpmbuild"
export WORKSPACE_DIR="${WORKSPACE}"
export BUILDROOT_DIR=/tmp/awips2-component
COMPONENT=""
COMPONENT_DIR=""
export AWIPSCM_SHARE=${SHARE_DIR}
export CPPFLAGS="-m32"
export PYTHON_EXE="/awips2/python/bin/python"
export LD_LIBRARY_PATH="/awips2/python/lib"
# Just In Case python-devel 2.7 is not installed. scipy ignored
# C++ environment flags.
if [ ! -f /usr/local/lib/libpython2.7.so ]; then
# Without this, we will not be able to build every python site-package.
echo "ERROR: There Is No lpython2.7 In /usr/local/lib."
echo "Unable To Continue ... Terminating."
exit 1
fi
function updateSitePackageRepository()
{
mv ${RPM_TOP_DIR}/RPMS/i386/* ${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/python.site-packages
}
function updateSpecsFileIfNecessary()
{
SQL="SELECT dynamicVersion FROM awips2_python_site_package_rpms WHERE component = '${COMPONENT}';"
UPDATE_FLAG=`echo ${SQL} | sqlite3 ${DB_FILE}`
if [ "${UPDATE_FLAG}" = "Y" ]; then
perl -p -i -e "s/Version: 1.0.0/Version: ${AWIPSII_VERSION}/g" ${COMPONENT_SPECS}
perl -p -i -e "s/Release: 1/Release: ${AWIPSII_RELEASE}/g" ${COMPONENT_SPECS}
fi
}
function buildRPM()
{
if [ -f ${RPM_TOP_DIR}/BUILD/component-files.txt ]; then
rm -f ${RPM_TOP_DIR}/BUILD/component-files.txt
fi
rm -rf ${BUILDROOT_DIR}
updateSpecsFileIfNecessary
time rpmbuild -ba --target=i386 \
--define '_topdir %(echo ${RPM_TOP_DIR})' \
--define '_component_version %(echo ${AWIPSII_VERSION})' \
--define '_component_release %(echo ${AWIPSII_RELEASE})' \
--define '_build_root %(echo ${BUILDROOT_DIR})' \
--buildroot ${BUILDROOT_DIR} ${COMPONENT_SPECS}
RC="$?"
if [ ! "${RC}" = "0" ]; then
echo "ERROR: The build of '${COMPONENT}' has FAILED."
fi
}
# Need To Add Logic For Installing Dependencies Based On The Build Order.
function loopThroughAllSitePackageRPMs()
{
SELECT_ALL_SQL="SELECT component FROM awips2_python_site_package_rpms ORDER BY buildOrder, component;"
# Select All RPMs From The Python Site-Package DB
for component in `echo ${SELECT_ALL_SQL} | sqlite3 ${DB_FILE}`; do
COMPONENT="${component}"
# Scan DB for Python Site-Package RPMs
SQL="SELECT buildDirectory FROM awips2_python_site_package_rpms WHERE component = '${COMPONENT}';"
COMPONENT_DIR=`echo ${SQL} | sqlite3 ${DB_FILE}`
# We will be building the rpms directly, instead of using the "batch" build scripts that are included in the rpm
# build projects.
COMPONENT_SPECS="${WORKSPACE_DIR}/Installer.rpm/${COMPONENT_DIR}/component.spec"
buildRPM
done
}
function loopThroughSpecifiedRPMs()
{
# Scan DB for Python Site-Package RPMs
for component in ${RPMS_TO_BUILD[*]}; do
COMPONENT="${component}"
SQL="SELECT buildDirectory FROM awips2_python_site_package_rpms WHERE component = '${COMPONENT}';"
COMPONENT_DIR=`echo ${SQL} | sqlite3 ${DB_FILE}`
# We will be building the rpms directly, instead of using the "batch" build scripts that are included in the rpm
# build projects.
if [ ! "${COMPONENT_DIR}" = "" ]; then
COMPONENT_SPECS="${WORKSPACE_DIR}/Installer.rpm/${COMPONENT_DIR}/component.spec"
buildRPM
fi
done
}
if [ "${BUILD_ALL_RPMS}" = "false" ]; then
loopThroughSpecifiedRPMs
else
loopThroughAllSitePackageRPMs
fi
updateSitePackageRepository
echo "INFO: Finish - Building AWIPS II Python Site-Package RPMs."

View file

@ -1 +0,0 @@
#!/bin/bash

View file

@ -1,45 +0,0 @@
#!/bin/bash
# Next, we create the directory structure that will be required to build the rpms.
echo "INFO: Begin - Creating RPM Build Directory Structure."
# Refresh the rpmbuild directory structure.
if [ -d ${WORKSPACE}/rpmbuild ]; then
rm -rf ${WORKSPACE}/rpmbuild
fi
mkdir -p ${WORKSPACE}/rpmbuild/BUILD
mkdir -p ${WORKSPACE}/rpmbuild/RPMS/i386
mkdir -p ${WORKSPACE}/rmpbuild/SOURCES
mkdir -p ${WORKSPACE}/rpmbuild/SPECS
mkdir -p ${WORKSPACE}/rpmbuild/SRPMS
# Create a repository directory structure within our workspace
mkdir -p ${WORKSPACE}/${REPO_ROOT_DIR}
mkdir -p ${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}
mkdir -p ${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/boost
mkdir -p ${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/cave
mkdir -p ${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/core
mkdir -p ${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/edex
mkdir -p ${WORKSPACE}/${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR}/python.site-packages
# Copy the baselined comps.xml file to the repository.
if [ ! -f ${WORKSPACE}/${REPO_ROOT_DIR}/comps.xml ]; then
rm -fv ${WORKSPACE}/${REPO_ROOT_DIR}/comps.xml
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
fi
BASELINED_COMPS_XML="${WORKSPACE}/Installer.rpm/common/yum/arch.x86/comps.xml"
if [ ! -f ${BASELINED_COMPS_XML} ]; then
file ${BASELINED_COMPS_XML}
exit 1
fi
cp -v ${BASELINED_COMPS_XML} ${WORKSPACE}/${REPO_ROOT_DIR}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
echo "INFO: Finished - Creating RPM Build Directory Structure."

View file

@ -1,20 +0,0 @@
#!/bin/bash
# Next, we need to prepare our workspace because Hudson does not have 'export' capability.
echo "INFO: Begin - Preparing Workspace"
# Remove all SVN metadata.
find ./ -name .svn -exec rm -rf {} \;
# There are a few projects we need to move around. We want all of the individual cave,
# cots, edexOsgi, nativeLib, and RadarServer projects in our workspace.
PROJECT_LIST=( 'cave' 'cots' 'edexOsgi' 'nativeLib' 'RadarServer' 'ncep' 'localization' )
for project in ${PROJECT_LIST[*]};
do
# Move the individual projects out of the project directory into the workspace.
mv ${project}/* .
# Remove the empty project directory.
rm -rf ${project}
done
echo "INFO: Finished - Preparing Workspace"

View file

@ -1,89 +0,0 @@
#!/bin/bash
# First, we validate the user-supplied arguments.
# * verify that our awips2 db file exists in the workspace; if not, there is nothing that we can do.
# * verify that directories exist.
# * verify that a valid version and release has been specified.
# * verify that if certain rpms were specified, they are actually rpms that can be built by-request.
DB_FILE="${WORKSPACE}/Installer.rpm/awips2-rpm.db"
if [ ! -f ${DB_FILE} ]; then
echo "ERROR: Unable To Find The DB File - ${DB_FILE}."
echo "Unable To Continue ... Terminating."
exit 1
fi
# Are We Building All RPMs?
if [ "${BUILD_ALL_RPMS}" = "false" ]; then
# Verify that the user has specified valid rpms.
if [ "${RPMS_TO_BUILD}" = "" ]; then
echo "ERROR: We Were Told Not To Build All RPMs; However, No RPMs To Build Have Been Specified."
echo "Unable To Continue ... Terminating."
exit 1
fi
for component in ${RPMS_TO_BUILD[*]};
do
SQL="SELECT COUNT(*) FROM awips2_core_rpms WHERE component = '${component}' AND dynamicVersion = 'Y';"
COUNT=`echo ${SQL} | sqlite3 ${DB_FILE}`
echo "COUNT for ${component} is ${COUNT}."
if [ ${COUNT} -eq 0 ]; then
# Maybe, it is one of the few Python Site-Packages?
SQL="SELECT COUNT(*) FROM awips2_python_site_package_rpms WHERE component = '${component}' AND dynamicVersion = 'Y';"
COUNT=`echo ${SQL} | sqlite3 ${DB_FILE}`
fi
if [ ${COUNT} -eq 0 ]; then
# Maybe, it is one of the edex rpms?
SQL="SELECT COUNT(*) FROM awips2_edex_rpms WHERE component = '${component}';"
COUNT=`echo ${SQL} | sqlite3 ${DB_FILE}`
fi
if [ ${COUNT} -eq 0 ]; then
# Maybe, it is one of the cave rpms?
SQL="SELECT COUNT(*) FROM awips2_cave_rpms WHERE component = '${component}';"
COUNT=`echo ${SQL} | sqlite3 ${DB_FILE}`
fi
if [ ${COUNT} -eq 0 ]; then
# It is not a valid component!
echo "ERROR: '${component}' Is Not A Valid \"Build-On-Request\" AWIPS II Component."
echo "Unable To Continue ... Terminating."
exit 1
fi
done
fi
if [ ! -d ${ECLIPSE_HOME} ]; then
echo "ERROR: Unable To Find UFrame-Eclipse. Expected Location - ${ECLIPSE_HOME}."
echo "Unable To Continue ... Terminating."
exit 1
fi
if [ ! -d ${REPO_ROOT_DIR}/${_32BIT_REPO_RPM_DIR} ]; then
echo "ERROR: Unable To Find The 32-Bit Repository Directory."
echo "Unable To Continue ... Terminating."
exit 1
fi
if [ ! -d ${SHARE_DIR} ]; then
echo "ERROR: Unable To Find The AWIPSCM Share Directory."
echo "Unable To Continue ... Terminating."
exit 1
fi
if [ "${AWIPSII_VERSION}" = "" ]; then
echo "ERROR: An Invalid Version Has Been Specified."
echo "Unable To Continue ... Terminating."
exit 1
fi
if [ "${AWIPSII_RELEASE}" = "" ]; then
echo "ERROR: An Invalid Release Has Been Specified."
echo "Unable To Continue ... Terminating."
exit 1
fi

View file

@ -122,6 +122,71 @@ if [ "${1}" = "-64bit" ]; then
exit 0
fi
if [ "${1}" = "-rh6" ]; then
#buildRPM "awips2-python"
#buildRPM "awips2-python-cherrypy"
#buildRPM "awips2-python-nose"
#buildRPM "awips2-python-pil"
#buildRPM "awips2-python-qpid"
#buildRPM "awips2-python-thrift"
#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-ant"
#buildRPM "awips2-tools"
#buildRPM "awips2-postgres"
#buildRPM "awips2-pgadmin3"
#unpackHttpdPypies
if [ $? -ne 0 ]; then
exit 1
fi
#buildRPM "awips2-httpd-pypies"
#buildRPM "awips2-httpd-collaboration"
#buildQPID
if [ $? -ne 0 ]; then
exit 1
fi
#buildRPM "awips2-ldm"
#buildCAVE
if [ $? -ne 0 ]; then
exit 0
fi
#buildRPM "awips2-alertviz"
#buildRPM "awips2-database-server-configuration"
#buildRPM "awips2-database-standalone-configuration"
#buildRPM "awips2-database"
#buildRPM "awips2-maps-database"
#buildRPM "awips2-ncep-database"
#buildRPM "awips2-adapt-native"
#buildRPM "awips2-aviation-shared"
#buildRPM "awips2-cli"
#buildRPM "awips2-edex-environment"
#buildRPM "awips2-data.gfe"
#buildRPM "awips2-data.hdf5-gfe.climo"
#buildRPM "awips2-gfesuite-client"
#buildRPM "awips2-gfesuite-server"
#buildRPM "awips2-groovy"
#buildRPM "awips2-localapps-environment"
#buildLocalizationRPMs
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2-pypies"
buildRPM "awips2-rcm"
buildRPM "awips2-data.hdf5-topo"
buildRPM "awips2"
buildOpenfire
exit 0
fi
if [ "${1}" = "-postgres" ]; then
buildRPM "awips2-postgres"
buildRPM "awips2-database-server-configuration"