Issue #202 - restoring rpm directory to ss_sync.

Former-commit-id: 56068aa96fa6daf113861476bf4b7aebe2021ca4
This commit is contained in:
Bryan Kowal 2012-01-20 13:38:00 -06:00
parent 2142afe3f1
commit 65e1e4ee0b
410 changed files with 183729 additions and 0 deletions

BIN
rpms/awips2-rpm.db Normal file

Binary file not shown.

View file

@ -0,0 +1,134 @@
%define _component_name awips2-alertviz
#
# AWIPS II AlertViz Spec File
#
%define __prelink_undo_cmd %{nil}
Name: %{_component_name}
Summary: AWIPS II AlertViz
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-alertviz
requires: awips2-python
requires: awips2-java
%description
AWIPS II AlertViz Distribution - the AWIPS II AlertViz application.
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2
%build
# perform the AlertViz pde build.
cd %{_baseline_workspace}/build
# TODO: Eliminate the hard-coded uframe-eclipse location.
time ./build.sh -eclipse=/opt/uframe-eclipse
if [ $? -ne 0 ]; then
exit 1
fi
%install
# Copies the standard Raytheon licenses into a license directory for the
# current component.
function copyLegal()
{
# $1 == Component Build Root
COMPONENT_BUILD_DIR=${1}
mkdir -p ${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
# Create a Tar file with our FOSS licenses.
tar -cjf %{_baseline_workspace}/Installer.rpm/legal/FOSS_licenses.tar \
%{_baseline_workspace}/Installer.rpm/legal/FOSS_licenses/
cp %{_baseline_workspace}/Installer.rpm/legal/license.txt \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp "%{_baseline_workspace}/Installer.rpm/legal/Master Rights File.pdf" \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp %{_baseline_workspace}/Installer.rpm/legal/FOSS_licenses.tar \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
rm -f %{_baseline_workspace}/Installer.rpm/legal/FOSS_licenses.tar
}
ALERTVIZ_ZIP_FILE="build/alertviz/tmp/I.AlertViz/AlertViz-linux.gtk.x86_64.zip"
cd ${RPM_BUILD_ROOT}/awips2
unzip %{_baseline_workspace}/${ALERTVIZ_ZIP_FILE}
# Also Need To Create The alertvizEnvironment Directory
mkdir -p ${RPM_BUILD_ROOT}/awips2/alertviz/alertvizEnvironment
# Create our autostart template
mkdir -p ${RPM_BUILD_ROOT}/etc/xdg/autostart
cp %{_baseline_workspace}/Installer.rpm/awips2.core/Installer.alertviz/scripts/autostart/awips2-alertviz.desktop \
${RPM_BUILD_ROOT}/etc/xdg/autostart
copyLegal "awips2/alertviz"
%pre
%post
# Remove the alertviz autostart script if we have been installed on
# an xt machine.
if [ "`hostname | cut -b 1-2`" = "xt" ]; then
# Remove the awips2-alertviz autostart script.
rm -f /etc/xdg/autostart/awips2-alertviz.desktop
fi
%postun
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2
%dir /awips2/alertviz
/awips2/alertviz/.eclipseproduct
%docdir /awips2/alertviz/about_files
%dir /awips2/alertviz/about_files
/awips2/alertviz/about_files/*
%doc /awips2/alertviz/about.html
%dir /awips2/alertviz/alertvizEnvironment
/awips2/alertviz/alertviz.ini
%dir /awips2/alertviz/configuration
/awips2/alertviz/configuration/*
%dir /awips2/alertviz/etc
/awips2/alertviz/etc/*
%dir /awips2/alertviz/features
/awips2/alertviz/features/*
%docdir /awips2/alertviz/licenses
%dir /awips2/alertviz/licenses
/awips2/alertviz/licenses/*
%dir /awips2/alertviz/plugins
/awips2/alertviz/plugins/*
%defattr(755,awips,fxalpha,755)
/awips2/alertviz/alertviz
/awips2/alertviz/*.so
/awips2/alertviz/*.sh
%attr(644,root,root) /etc/xdg/autostart/awips2-alertviz.desktop

View file

@ -0,0 +1,62 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python dynamicserialize Spec File
#
Name: awips2-python-dynamicserialize
Summary: AWIPS II Python dynamicserialize Distribution - 64 Bit
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
requires: awips2-python-thrift
provides: awips2-python-dynamicserialize
%description
AWIPS II Python dynamicserialize Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}/awips2/python/lib/python2.7/site-packages/dynamicserialize
%build
%install
DYNAMICSERIALIZE_SRC_DIR="%{_python_pkgs_dir}/dynamicserialize"
cp -rv ${DYNAMICSERIALIZE_SRC_DIR}/* \
%{_build_root}/awips2/python/lib/python2.7/site-packages/dynamicserialize
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*

View file

@ -0,0 +1,105 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python h5py Spec File
#
Name: awips2-python-h5py
Summary: AWIPS II Python h5py Distribution - 64 Bit
Version: 1.3.0
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
requires: awips2-python-numpy
provides: awips2-python-h5py
%description
AWIPS II Python h5py Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
PRE_REQS_HDF5_TAR="hdf5-1.8.4-patch1-linux-x86_64-shared.tar.gz"
PRE_REQS_DIR="%{_baseline_workspace}/Installer.rpm/awips2.64/deploy.builder/pre-reqs"
cp -v ${PRE_REQS_DIR}/${PRE_REQS_HDF5_TAR} \
%{_build_root}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}
/bin/tar -xvf ${PRE_REQS_HDF5_TAR}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
rm -f ${PRE_REQS_HDF5_TAR}
popd > /dev/null
%build
H5PY_SRC_DIR="%{_python_pkgs_dir}/h5py"
HDF5_PATH="%{_build_root}/hdf5-1.8.4-patch1-linux-x86_64-shared"
cp -rv ${H5PY_SRC_DIR}/* \
%{_build_root}/build-python
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py build \
--hdf5=${HDF5_PATH}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
HDF5_PATH="%{_build_root}/hdf5-1.8.4-patch1-linux-x86_64-shared"
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
popd > /dev/null
rm -rf ${HDF5_PATH}
rm -rf %{_build_root}/build-python
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*

View file

@ -0,0 +1,208 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
#
# AWIPS II Java Spec File
#
Name: awips2-java
Summary: AWIPS II Java Distribution - 64 Bit
Version: 1.6.0_27
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
BuildArch: x86_64
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-java
%description
AWIPS II Java (64 Bit) Distribution - Contains Java SE Development Kit (JDK) 1.6.0_27
plus additional libraries used by AWIPS II.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}/build-java
mkdir -p %{_build_root}/awips2/java
mkdir -p %{_build_root}/etc/profile.d
%build
%install
# Copies the standard Raytheon licenses into a license directory for the
# current component.
JDK_BIN="jdk-6u27-linux-x64.bin"
JDK_BIN_var_javahome="jdk1.6.0_27"
JAI_BIN="jai-1_1_3-lib-linux-amd64-jdk.bin"
JAI_BIN_PATCH="jai.patch1"
JAI_IMAGEIO_BIN="jai_imageio-1_1-lib-linux-amd64-jdk.bin"
JAI_IMAGEIO_BIN_PATCH="jai_imageio.patch1"
PYDEV_CERT="pydev_certificate.cer"
JAVA_SRC_DIR="%{_baseline_workspace}/Installer.rpm/awips2.64/Installer.java/src"
pushd .
cd ${JAVA_SRC_DIR}
cp -v ${JDK_BIN} %{_build_root}/build-java
if [ $? -ne 0 ]; then
exit 1
fi
patch -i ${JAI_BIN_PATCH} -o %{_build_root}/build-java/${JAI_BIN}
if [ $? -ne 0 ]; then
exit 1
fi
patch -i ${JAI_IMAGEIO_BIN_PATCH} \
--ignore-whitespace \
-o %{_build_root}/build-java/${JAI_IMAGEIO_BIN}
if [ $? -ne 0 ]; then
exit 1
fi
chmod a+x %{_build_root}/build-java/*.bin
cd %{_build_root}/awips2/java
# Used to automatically agree to software licenses.
touch yes.txt
echo "yes" > yes.txt
%{_build_root}/build-java/${JDK_BIN} -noregister
if [ $? -ne 0 ]; then
exit 1
fi
mv ${JDK_BIN_var_javahome}/* .
if [ $? -ne 0 ]; then
exit 1
fi
rm -rfv ${JDK_BIN_var_javahome}
if [ $? -ne 0 ]; then
exit 1
fi
%{_build_root}/build-java/${JAI_BIN} < yes.txt
if [ $? -ne 0 ]; then
exit 1
fi
%{_build_root}/build-java/${JAI_IMAGEIO_BIN} < yes.txt
if [ $? -ne 0 ]; then
exit 1
fi
rm -fv yes.txt
if [ $? -ne 0 ]; then
exit 1
fi
rm -rf %{_build_root}/build-java
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null
# Our profile.d scripts.
JAVA_SCRIPTS_DIR="%{_baseline_workspace}/Installer.rpm/awips2.64/Installer.java/scripts"
JAVA_PROFILED_DIR="${JAVA_SCRIPTS_DIR}/profile.d"
cp -v ${JAVA_PROFILED_DIR}/* %{_build_root}/etc/profile.d
if [ $? -ne 0 ]; then
exit 1
fi
# The pydev certificate.
cp -v ${JAVA_SRC_DIR}/${PYDEV_CERT} \
%{_build_root}/awips2/java/jre/lib/security
touch changeit.txt
echo "changeit" > changeit.txt
chmod 666 %{_build_root}/awips2/java/jre/lib/security/cacerts
if [ $? -ne 0 ]; then
exit 1
fi
%{_build_root}/awips2/java/bin/keytool -import \
-file %{_build_root}/awips2/java/jre/lib/security/pydev_certificate.cer \
-keystore %{_build_root}/awips2/java/jre/lib/security/cacerts \
-noprompt < changeit.txt
rm -fv changeit.txt
if [ $? -ne 0 ]; then
exit 1
fi
# The licenses
mkdir -p %{_build_root}/awips2/java/licenses
LEGAL_DIR="%{_baseline_workspace}/Installer.rpm/legal"
cp -v ${LEGAL_DIR}/*.txt ${LEGAL_DIR}/*.pdf \
%{_build_root}/awips2/java/licenses
if [ $? -ne 0 ]; then
exit 1
fi
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%attr(755,root,root) /etc/profile.d/awips2Java64.csh
%attr(755,root,root) /etc/profile.d/awips2Java64.sh
%dir /awips2/java
%dir /awips2/java/bin
%doc /awips2/java/COPYRIGHT
%doc /awips2/java/COPYRIGHT-jai_imageio.txt
%doc /awips2/java/COPYRIGHT-jai.txt
%doc /awips2/java/DISTRIBUTIONREADME-jai_imageio.txt
%doc /awips2/java/DISTRIBUTIONREADME-jai.txt
%doc /awips2/java/ENTITLEMENT-jai_imageio.txt
%doc /awips2/java/jre/README
%doc /awips2/java/jre/THIRDPARTYLICENSEREADME.txt
%doc /awips2/java/jre/Welcome.html
%doc /awips2/java/jre/LICENSE
%doc /awips2/java/LICENSE
%doc /awips2/java/LICENSE-jai_imageio.txt
%doc /awips2/java/LICENSE-jai.txt
%docdir /awips2/java/licenses
%dir /awips2/java/licenses
/awips2/java/licenses/*
%docdir /awips2/java/man
%dir /awips2/java/man
/awips2/java/man/*
%doc /awips2/java/README.html
%doc /awips2/java/register.html
%doc /awips2/java/register_ja.html
%doc /awips2/java/register_zh_CN.html
%doc /awips2/java/THIRDPARTYLICENSEREADME-jai_imageio.txt
%doc /awips2/java/THIRDPARTYLICENSEREADME-jai.txt
%doc /awips2/java/THIRDPARTYLICENSEREADME.txt
%doc /awips2/java/UNINSTALL-jai
%doc /awips2/java/UNINSTALL-jai_imageio
%doc /awips2/java/jre/COPYRIGHT
%dir /awips2/java/db
/awips2/java/db/*
%dir /awips2/java/demo
/awips2/java/demo/*
%dir /awips2/java/include
/awips2/java/include/*
%dir /awips2/java/jre
%dir /awips2/java/jre/.systemPrefs
/awips2/java/jre/.systemPrefs/.*
#/awips2/java/jre/.systemPrefs/.systemRootModFile
%dir /awips2/java/jre/bin
/awips2/java/jre/javaws
%dir /awips2/java/jre/lib
%dir /awips2/java/jre/plugin
/awips2/java/jre/plugin/*
%dir /awips2/java/lib
/awips2/java/sample
/awips2/java/src.zip
%defattr(755,awips,fxalpha,755)
/awips2/java/bin/*
/awips2/java/lib/*
/awips2/java/jre/bin/*
/awips2/java/jre/lib/*

View file

@ -0,0 +1,10 @@
#!/bin/csh
set JAVA_INSTALL="/awips2/java"
setenv JAVA_HOME "${JAVA_INSTALL}"
if $?PATH then
setenv PATH ${JAVA_INSTALL}/bin:$PATH
else
setenv PATH ${JAVA_INSTALL}/bin
endif

View file

@ -0,0 +1,17 @@
#!/bin/bash
JAVA_INSTALL="/awips2/java"
if [ ! -d ${JAVA_INSTALL} ]; then
return
fi
# Update the environment.
export JAVA_HOME=${JAVA_INSTALL}
# Determine if Java is already part of the path.
CHECK_PATH=`echo "${PATH}" | grep "${JAVA_INSTALL}"`
if [ ! "${CHECK_PATH}" = "" ]; then
return
fi
# Java is not in the path; add it to the path.
export PATH=${JAVA_INSTALL}/bin:${PATH}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,17 @@
*** jai-1_1_3-lib-linux-amd64-jdk.bin 2011-07-01 10:33:52.000000000 -0500
--- jai-1_1_3-lib-linux-amd64-jdk.bin.update 2011-07-05 14:23:31.000000000 -0500
***************
*** 1,6 ****
#!/bin/sh
PATH=/bin:/usr/bin
! more <<EOF
--- 1,6 ----
#!/bin/sh
PATH=/bin:/usr/bin
! cat <<EOF

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,33 @@
*** jai_imageio-1_1-lib-linux-amd64-jdk.bin 2011-07-05 09:24:04.000000000 -0500
--- jai_imageio-1_1-lib-linux-amd64-jdk.bin.update 2011-07-05 14:34:16.000000000 -0500
***************
*** 1,6 ****
#!/bin/sh
PATH=/bin:/usr/bin
! more <<EOF
--- 1,6 ----
#!/bin/sh
PATH=/bin:/usr/bin
! cat <<EOF
***************
*** 160,166 ****
fi
outname=install.sfx.$$
echo "Unpacking..."
! tail +215 $0 > $outname
if [ -x /usr/bin/cksum ] ; then
echo "Checksumming..."
--- 160,166 ----
fi
outname=install.sfx.$$
echo "Unpacking..."
! tail -n +215 $0 > $outname
if [ -x /usr/bin/cksum ] ; then
echo "Checksumming..."

View file

@ -0,0 +1 @@
6cb2ac170197c848089dae548835fae6c31d879a

View file

@ -0,0 +1,19 @@
*** jdk-6u17-linux-x64.bin 2011-07-05 12:02:18.000000000 -0500
--- jdk-6u17-linux-x64.bin.new 2011-07-05 12:16:55.000000000 -0500
***************
*** 67,73 ****
ARCH=64
BINARY_NAME=jdk-6u17-fcs-bin-b04-linux-amd64-11_oct_2009.bin
diskSpaceRequired=255193
! more <<"EOF"
Sun Microsystems, Inc. Binary Code License Agreement
for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6
--- 67,73 ----
ARCH=64
BINARY_NAME=jdk-6u17-fcs-bin-b04-linux-amd64-11_oct_2009.bin
diskSpaceRequired=255193
! cat <<"EOF"
Sun Microsystems, Inc. Binary Code License Agreement
for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6

View file

@ -0,0 +1,61 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python JavaImporter Spec File
#
Name: awips2-python-jimporter
Summary: AWIPS II Python JavaImporter Distribution - 64 Bit
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-jimporter
%description
AWIPS II Python JavaImporter Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}/awips2/python/lib/python2.7/site-packages
%build
%install
JIMPORTER_SRC_DIR="%{_python_pkgs_dir}/java-importer"
cp -rv ${JIMPORTER_SRC_DIR}/* \
%{_build_root}/awips2/python/lib/python2.7/site-packages
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*

View file

@ -0,0 +1,85 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python matplotlib Spec File
#
Name: awips2-python-matplotlib
Summary: AWIPS II Python matplotlib Distribution - 64 Bit
Version: 0.99.1.1
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
requires: awips2-python-numpy
provides: awips2-python-matplotlib
%description
AWIPS II Python matplotlib Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
%build
MATPLOTLIB_SRC_DIR="%{_python_pkgs_dir}/matplotlib"
cp -rv ${MATPLOTLIB_SRC_DIR}/* \
%{_build_root}/build-python
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
rm -rf %{_build_root}/build-python
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*

View file

@ -0,0 +1,88 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python nose Spec File
#
Name: awips2-python-nose
Summary: AWIPS II Python nose Distribution - 64 Bit
Version: 0.11.1
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-nose
%description
AWIPS II Python nose Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
%build
NOSE_SRC_DIR="%{_python_pkgs_dir}/nose"
cp -rv ${NOSE_SRC_DIR}/* %{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
popd > /dev/null
rm -rf %{_build_root}/build-python
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*
%dir /awips2/python/man
/awips2/python/man/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/python/bin
/awips2/python/bin/*

View file

@ -0,0 +1,128 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python numpy Spec File
#
Name: awips2-python-numpy
Summary: AWIPS II Python numpy Distribution - 64 Bit
Version: 1.5.0
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
requires: awips2-python-nose
provides: awips2-python-numpy
%description
AWIPS II Python numpy Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
%build
NUMPY_SRC_DIR="%{_python_pkgs_dir}/numpy"
NUMPY_TAR="numpy-1.5.0.tar.gz"
NUMPY_PATCH="numpy.patch1"
cp -v ${NUMPY_SRC_DIR}/${NUMPY_TAR} \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
cp -v %{_baseline_workspace}/Installer.rpm/awips2.64/Installer.numpy/src/${NUMPY_PATCH} \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
tar -xvf ${NUMPY_TAR}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
rm -fv ${NUMPY_TAR}
if [ ! -d numpy-1.5.0 ]; then
file numpy-1.5.0
exit 1
fi
source /etc/profile.d/awips2Python64.sh
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
cd numpy-1.5.0
# Apply the patch
patch -p1 -i ../${NUMPY_PATCH}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
/awips2/python/bin/python setup.py clean
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
NUMPY_SRC_DIR="%{_python_pkgs_dir}/numpy"
pushd . > /dev/null
cd %{_build_root}/build-python/numpy-1.5.0
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
rm -rf %{_build_root}/build-python
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/python/bin
/awips2/python/bin/*

View file

@ -0,0 +1,20 @@
diff -cr numpy-1.5.0.original/numpy/distutils/fcompiler/gnu.py numpy-1.5.0/numpy/distutils/fcompiler/gnu.py
*** numpy-1.5.0.original/numpy/distutils/fcompiler/gnu.py 2010-08-22 00:08:35.000000000 -0500
--- numpy-1.5.0/numpy/distutils/fcompiler/gnu.py 2011-07-27 14:51:34.000000000 -0500
***************
*** 24,30 ****
#_EXTRAFLAGS = ["-fno-leading-underscore"]
_EXTRAFLAGS = []
else:
! _EXTRAFLAGS = []
class GnuFCompiler(FCompiler):
compiler_type = 'gnu'
--- 24,30 ----
#_EXTRAFLAGS = ["-fno-leading-underscore"]
_EXTRAFLAGS = []
else:
! _EXTRAFLAGS = ["-fPIC"]
class GnuFCompiler(FCompiler):
compiler_type = 'gnu'

View file

@ -0,0 +1,88 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python pil Spec File
#
Name: awips2-python-pil
Summary: AWIPS II Python pil Distribution - 64 Bit
Version: 1.1.6
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-pil
%description
AWIPS II Python pil Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
%build
PIL_SRC_DIR="%{_python_pkgs_dir}/pil"
cp -rv ${PIL_SRC_DIR}/* \
%{_build_root}/build-python
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
rm -rf %{_build_root}/build-python
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/python/bin
/awips2/python/bin/*

View file

@ -0,0 +1,89 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python pmw Spec File
#
Name: awips2-python-pmw
Summary: AWIPS II Python pmw Distribution - 64 Bit
Version: 1.3.2
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-pmw
%description
AWIPS II Python pmw Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
%build
PMW_SRC_DIR="%{_python_pkgs_dir}/pmw"
PMW_TAR="Pmw.1.3.2.tar.gz"
PMW_SRC="Pmw.1.3.2/src"
cp -rv ${PMW_SRC_DIR}/${PMW_TAR} \
%{_build_root}/build-python
pushd . > /dev/null
cd %{_build_root}/build-python
tar -xvf ${PMW_TAR}
rm -f ${PMW_TAR}
cd ${PMW_SRC}
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
PMW_SRC="Pmw.1.3.2/src"
pushd . > /dev/null
cd %{_build_root}/build-python/${PMW_SRC}
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
rm -rf %{_build_root}/build-python
%pre
%post
%preun
%postun
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*

View file

@ -0,0 +1,118 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python pupynere Spec File
#
Name: awips2-python-pupynere
Summary: AWIPS II Python pupynere Distribution - 64 Bit
Version: 1.0.13
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
requires: awips2-python-numpy
provides: awips2-python-pupynere
%description
AWIPS II Python pupynere Site-Package - 64-bit.
%prep
PREREQS_SETUPTOOLS_DIR="%{_python_pkgs_dir}/setuptools"
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
cp -rv ${PREREQS_SETUPTOOLS_DIR}/* \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
# Ensure that we have the required access.
touch /awips2/python/lib/python2.7/site-packages
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
touch /awips2/python/bin
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
/awips2/python/bin/python setup.py install
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
rm -rf %{_build_root}/build-python
mkdir -p %{_build_root}/build-python
%build
PUPYNERE_SRC_DIR="%{_python_pkgs_dir}/pupynere"
cp -rv ${PUPYNERE_SRC_DIR}/* \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
popd > /dev/null
rm -rf %{_build_root}/build-python
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*

View file

@ -0,0 +1,267 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
#
# AWIPS II Python Spec File
#
Name: awips2-python
Summary: AWIPS II Python Distribution - 64 Bit
Version: 2.7.1
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-python
%description
AWIPS II Python (64 Bit) Distribution - Contains Python V2.7.1 plus modules
required for AWIPS II.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}/build-python
mkdir -p %{_build_root}/awips2/python
mkdir -p %{_build_root}/etc/profile.d
%build
# We can use the same source that is in the 32-bit python directory.
PYTHON_TAR="Python-2.7.1.tgz"
PYTHON_SRC_DIR="%{_baseline_workspace}/Installer.rpm/awips2.core/Installer.python/src"
cp -v ${PYTHON_SRC_DIR}/${PYTHON_TAR} \
%{_build_root}/build-python
pushd . > /dev/null
# Untar the source.
cd %{_build_root}/build-python
tar -xf ${PYTHON_TAR}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
cd Python-2.7.1
./configure --prefix=%{_build_root}/awips2/python \
--enable-shared
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
make clean
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
make
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
# Copies the standard Raytheon licenses into a license directory for the
# current component.
function copyLegal()
{
# $1 == Component Build Root
COMPONENT_BUILD_DIR=${1}
mkdir -p %{_build_root}/${COMPONENT_BUILD_DIR}/licenses
# Create a Tar file with our FOSS licenses.
tar -cjf %{_baseline_workspace}/Installer.rpm/legal/FOSS_licenses.tar \
%{_baseline_workspace}/Installer.rpm/legal/FOSS_licenses/
cp %{_baseline_workspace}/Installer.rpm/legal/license.txt \
%{_build_root}/${COMPONENT_BUILD_DIR}/licenses
cp "%{_baseline_workspace}/Installer.rpm/legal/Master Rights File.pdf" \
%{_build_root}/${COMPONENT_BUILD_DIR}/licenses
cp %{_baseline_workspace}/Installer.rpm/legal/FOSS_licenses.tar \
%{_build_root}/${COMPONENT_BUILD_DIR}/licenses
rm -f %{_baseline_workspace}/Installer.rpm/legal/FOSS_licenses.tar
}
pushd . > /dev/null
cd %{_build_root}/build-python/Python-2.7.1
make install
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
# Our profile.d scripts.
PYTHON_PROJECT_DIR="%{_baseline_workspace}/Installer.rpm/awips2.64/Installer.python"
PYTHON_SCRIPTS_DIR="${PYTHON_PROJECT_DIR}/scripts"
PYTHON_PROFILED_DIR="${PYTHON_SCRIPTS_DIR}/profile.d"
cp -v ${PYTHON_PROFILED_DIR}/* %{_build_root}/etc/profile.d
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
# The external libraries (hdf5, netcdf, ...) and headers
# we include with python.
# Retrieve hdf5 from: hdf5-1.8.4-patch1-linux-x86_64-shared.tar.gz
HDF5_PREREQS_DIR="%{_baseline_workspace}/Installer.rpm/awips2.64/deploy.builder/pre-reqs"
HDF5_TAR="hdf5-1.8.4-patch1-linux-x86_64-shared.tar.gz"
# Copy the hdf5 tar file to our build directory.
cp -v ${HDF5_PREREQS_DIR}/${HDF5_TAR} \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
tar -xvf ${HDF5_TAR}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
rm -fv ${HDF5_TAR}
if [ ! -d hdf5-1.8.4-patch1-linux-x86_64-shared ]; then
file hdf5-1.8.4-patch1-linux-x86_64-shared
exit 1
fi
cp -v hdf5-1.8.4-patch1-linux-x86_64-shared/lib/* \
%{_build_root}/awips2/python/lib
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
# The Raytheon native libraries.
PYTHON_NATIVE_DIR="%{_baseline_workspace}/Installer.rpm/awips2.64/Installer.python/native"
GRIDSLICE_SO="${PYTHON_NATIVE_DIR}/gridslice.so"
if [ ! -f ${GRIDSLICE_SO} ]; then
echo "ERROR: ${GRIDSLICE_SO} does not exist."
exit 1
fi
cp -v ${GRIDSLICE_SO} \
%{_build_root}/awips2/python/lib/python2.7
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
PYTHON_SRC_DIR="${PYTHON_PROJECT_DIR}/src"
LAPACK_TAR="lapack-3.0.tgz"
LAPACK_PATCH="lapack.patch1"
# Copy the LAPACK tar file and patch to our build directory.
cp -v ${PYTHON_SRC_DIR}/${LAPACK_TAR} \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
cp -v ${PYTHON_SRC_DIR}/${LAPACK_PATCH} \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
tar -xvf ${LAPACK_TAR}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
rm -fv ${LAPACK_TAR}
if [ ! -d LAPACK ]; then
file LAPACK
exit 1
fi
cd LAPACK
patch -p1 -i ../${LAPACK_PATCH}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
make blaslib
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
make lapacklib
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
# Copy the libraries that we just built to
# the python lib directory.
if [ ! -f BLAS/SRC/libblas.so ]; then
file BLAS/SRC/libblas.so
exit 1
fi
cp -v BLAS/SRC/libblas.so \
%{_build_root}/awips2/python/lib
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
if [ ! -f SRC/liblapack.so ]; then
file SRC/liblapack.so
exit 1
fi
cp -v SRC/liblapack.so \
%{_build_root}/awips2/python/lib
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
rm -rf %{_build_root}/build-python
copyLegal "awips2/python"
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%attr(755,root,root) /etc/profile.d/awips2Python64.csh
%attr(755,root,root) /etc/profile.d/awips2Python64.sh
%dir /awips2/python
%dir /awips2/python/lib
/awips2/python/lib/*
%docdir /awips2/python/licenses
%dir /awips2/python/licenses
/awips2/python/licenses/*
%dir /awips2/python/share
/awips2/python/share/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/python/include
/awips2/python/include/*
%dir /awips2/python/bin
/awips2/python/bin/*

Binary file not shown.

View file

@ -0,0 +1,15 @@
#!/bin/csh
set PYTHON_INSTALL="/awips2/python"
if $?PATH then
setenv PATH ${PYTHON_INSTALL}/bin:$PATH
else
setenv PATH ${PYTHON_INSTALL}/bin
endif
if $?LD_LIBRARY_PATH then
setenv LD_LIBRARY_PATH ${PYTHON_INSTALL}/lib:$LD_LIBRARY_PATH
else
setenv LD_LIBRARY_PATH ${PYTHON_INSTALL}/lib
endif

View file

@ -0,0 +1,18 @@
#!/bin/bash
PYTHON_INSTALL="/awips2/python"
if [ ! -d ${PYTHON_INSTALL} ]; then
return
fi
# Update the environment.
CHECK_PATH=`echo "${PATH}" | grep "${PYTHON_INSTALL}"`
if [ "${CHECK_PATH}" = "" ]; then
export PATH=${PYTHON_INSTALL}/bin:${PATH}
fi
CHECK_PATH=`echo "${LD_LIBRARY_PATH}" | grep "${PYTHON_INSTALL}"`
if [ "${CHECK_PATH}" = "" ]; then
export LD_LIBRARY_PATH=${PYTHON_INSTALL}/lib:${LD_LIBRARY_PATH}
fi

Binary file not shown.

View file

@ -0,0 +1,125 @@
diff -cr LAPACK/BLAS/SRC/Makefile LAPACK.patched/BLAS/SRC/Makefile
*** LAPACK/BLAS/SRC/Makefile 1999-11-04 13:23:14.000000000 -0600
--- LAPACK.patched/BLAS/SRC/Makefile 2011-07-26 17:51:27.000000000 -0500
***************
*** 50,56 ****
#
#######################################################################
! all: single double complex complex16
#---------------------------------------------------------
# Comment out the next 6 definitions if you already have
--- 50,56 ----
#
#######################################################################
! all: single double complex complex16 libblas.so
#---------------------------------------------------------
# Comment out the next 6 definitions if you already have
***************
*** 149,154 ****
--- 149,160 ----
$(ALLBLAS) $(ZBLAS2) $(ZBLAS3)
$(RANLIB) $(BLASLIB)
+ libblas.so: $(SBLAS1) $(CBLAS1) $(DBLAS1) $(ZBLAS1) \
+ $(CB1AUX) $(ZB1AUX) $(ALLBLAS) $(SBLAS2) \
+ $(CBLAS2) $(DBLAS2) $(ZBLAS2) $(SBLAS3) \
+ $(CBLAS3) $(DBLAS3) $(ZBLAS3)
+ cc -shared -Wl,-soname,$@ -lgfortran -lg2c -o $@ *.o
+
FRC:
@FRC=$(FRC)
diff -cr LAPACK/make.inc LAPACK.patched/make.inc
*** LAPACK/make.inc 1999-11-04 13:23:14.000000000 -0600
--- LAPACK.patched/make.inc 2011-07-26 17:05:59.000000000 -0500
***************
*** 8,14 ****
#
# The machine (platform) identifier to append to the library names
#
! PLAT = _SUN4SOL2
#
# Modify the FORTRAN and OPTS definitions to refer to the
# compiler and desired compiler options for your machine. NOOPT
--- 8,14 ----
#
# The machine (platform) identifier to append to the library names
#
! PLAT =
#
# Modify the FORTRAN and OPTS definitions to refer to the
# compiler and desired compiler options for your machine. NOOPT
***************
*** 16,31 ****
# selected. Define LOADER and LOADOPTS to refer to the loader and
# desired load options for your machine.
#
! FORTRAN = f77
#OPTS = -O4 -u -f -mt
#OPTS = -u -f -dalign -native -xO5 -xarch=v8plusa
! OPTS = -u -f -dalign -native -xO5 -xarch=v8plusa
DRVOPTS = $(OPTS)
! NOOPT = -u -f
#NOOPT = -u -f -mt
! LOADER = f77
#LOADOPTS = -mt
! LOADOPTS = -f -dalign -native -xO5 -xarch=v8plusa
#
# The archiver and the flag(s) to use when building archive (library)
# If you system has no ranlib, set RANLIB = echo.
--- 16,33 ----
# selected. Define LOADER and LOADOPTS to refer to the loader and
# desired load options for your machine.
#
! FORTRAN = gfortran
#OPTS = -O4 -u -f -mt
#OPTS = -u -f -dalign -native -xO5 -xarch=v8plusa
! #OPTS = -u -f -dalign -native -xO5 -xarch=v8plusa
! OPTS = -funroll-all-loops -O3 -fPIC
DRVOPTS = $(OPTS)
! #NOOPT = -u -f
#NOOPT = -u -f -mt
! NOOPT = -fPIC
! LOADER = gfortran
#LOADOPTS = -mt
! #LOADOPTS = -f -dalign -native -xO5 -xarch=v8plusa
#
# The archiver and the flag(s) to use when building archive (library)
# If you system has no ranlib, set RANLIB = echo.
diff -cr LAPACK/SRC/Makefile LAPACK.patched/SRC/Makefile
*** LAPACK/SRC/Makefile 1999-11-04 13:26:09.000000000 -0600
--- LAPACK.patched/SRC/Makefile 2011-07-26 17:53:28.000000000 -0500
***************
*** 277,283 ****
zunmtr.o zupgtr.o \
zupmtr.o izmax1.o dzsum1.o
! all: single complex double complex16
single: $(SLASRC) $(ALLAUX) $(SCLAUX)
$(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(ALLAUX) \
--- 277,283 ----
zunmtr.o zupgtr.o \
zupmtr.o izmax1.o dzsum1.o
! all: single complex double complex16 liblapack.so
single: $(SLASRC) $(ALLAUX) $(SCLAUX)
$(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(ALLAUX) \
***************
*** 299,304 ****
--- 299,308 ----
$(DZLAUX)
$(RANLIB) ../$(LAPACKLIB)
+ liblapack.so: $(ALLAUX) $(SCLAUX) $(DZLAUX) $(SLASRC) \
+ $(CLASRC) $(DLASRC) $(ZLASRC)
+ cc -shared -Wl,-soname,$@ -L../BLAS/SRC -lgfortran -lblas -o $@ *.o
+
$(ALLAUX): $(FRC)
$(SCLAUX): $(FRC)
$(DZLAUX): $(FRC)

View file

@ -0,0 +1,105 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python qpid Spec File
#
Name: awips2-python-qpid
Summary: AWIPS II Python qpid Distribution - 64 Bit
Version: 0.6
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-qpid
%description
AWIPS II Python qpid Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
%build
QPID_SRC_DIR="%{_python_pkgs_dir}/qpid"
QPID_TAR="qpid-0.6.tar.gz"
cp -rv ${QPID_SRC_DIR}/${QPID_TAR} \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
tar -xvf ${QPID_TAR}
rm -f ${QPID_TAR}
popd > /dev/null
%install
QPID_SRC_DIR="%{_python_pkgs_dir}/qpid"
QPID_SRC="qpid-0.6/python"
QPID_SPECS="qpid-0.6/specs"
QPID_QUEUE_COUNT_SCRIPT="qpid-queue-count"
pushd . > /dev/null
cd %{_build_root}/build-python/${QPID_SRC}
mkdir -p %{_build_root}/awips2/python
export LD_LIBRARY_PATH=/awips2/python/lib
export PATH=/awips2/python/bin:${PATH}
make install PREFIX=%{_build_root}/awips2/python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
# Copy the queue-counting script to bin
cp -v ${QPID_SRC_DIR}/bin/${QPID_QUEUE_COUNT_SCRIPT} \
%{_build_root}/awips2/python/bin
# Copy the amqp dtd/xml data to share
mkdir -p %{_build_root}/awips2/python/share/amqp
cp -prv %{_build_root}/build-python/${QPID_SPECS} \
%{_build_root}/awips2/python/share/amqp
rm -rf %{_build_root}/build-python
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*
%dir /awips2/python/share
/awips2/python/share/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/python/bin
/awips2/python/bin/*

View file

@ -0,0 +1,87 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python scientific Spec File
#
Name: awips2-python-scientific
Summary: AWIPS II Python scientific Distribution - 64 Bit
Version: 2.8
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-scientific
%description
AWIPS II Python scientific Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
%build
SCIENTIFIC_SRC_DIR="%{_python_pkgs_dir}/scientific"
cp -rv ${SCIENTIFIC_SRC_DIR}/* \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
rm -rf %{_build_root}/build-python
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*
%dir /awips2/python/include
/awips2/python/include/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/python/bin
/awips2/python/bin/*

View file

@ -0,0 +1,100 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python scipy Spec File
#
Name: awips2-python-scipy
Summary: AWIPS II Python scipy Distribution - 64 Bit
Version: 0.8.0
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
requires: awips2-python-numpy
provides: awips2-python-scipy
%description
AWIPS II Python scipy Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
%build
SCIPY_SRC_DIR="%{_python_pkgs_dir}/scipy"
cp -rv ${SCIPY_SRC_DIR}/* \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
export BLAS=/awips2/python/lib
export LAPACK=/awips2/python/lib
source /etc/profile.d/awips2Python64.sh
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
# Try to build a second time. It seems to work
# for some reason.
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
fi
popd > /dev/null
%install
export BLAS=/awips2/python/lib
export LAPACK=/awips2/python/lib
pushd . > /dev/null
cd %{_build_root}/build-python
export LD_LIBRARY_PATH=/awips2/python/lib
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
rm -rf %{_build_root}/build-python
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*

View file

@ -0,0 +1,124 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python tables Spec File
#
Name: awips2-python-tables
Summary: AWIPS II Python tables Distribution - 64 Bit
Version: 2.1.2
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-numpy
provides: awips2-python-tables
%description
AWIPS II Python tables Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
PRE_REQS_HDF5_TAR="hdf5-1.8.4-patch1-linux-x86_64-shared.tar.gz"
PRE_REQS_DIR="%{_baseline_workspace}/Installer.rpm/awips2.64/deploy.builder/pre-reqs"
cp -v ${PRE_REQS_DIR}/${PRE_REQS_HDF5_TAR} \
%{_build_root}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}
/bin/tar -xvf ${PRE_REQS_HDF5_TAR}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
rm -f ${PRE_REQS_HDF5_TAR}
popd > /dev/null
%build
TABLES_SRC_DIR="%{_python_pkgs_dir}/tables"
TABLES_TAR="tables-2.1.2.tar.gz"
cp -v ${TABLES_SRC_DIR}/${TABLES_TAR} \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
tar -xvf ${TABLES_TAR}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
rm -fv ${TABLES_TAR}
if [ ! -d tables-2.1.2 ]; then
file tables-2.1.2
exit 1
fi
cd tables-2.1.2
export HDF5_DIR="%{_build_root}/hdf5-1.8.4-patch1-linux-x86_64-shared"
/awips2/python/bin/python setup.py build_ext --inplace
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
export HDF5_DIR="%{_build_root}/hdf5-1.8.4-patch1-linux-x86_64-shared"
pushd . > /dev/null
cd %{_build_root}/build-python/tables-2.1.2
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
rm -rf ${HDF5_DIR}
rm -rf %{_build_root}/build-python
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/python/bin
/awips2/python/bin/*

View file

@ -0,0 +1,61 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python thrift Spec File
#
Name: awips2-python-thrift
Summary: AWIPS II Python thrift Distribution - 64 Bit
Version: 20080411p1
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-thrift
%description
AWIPS II Python thrift Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}/awips2/python/lib/python2.7/site-packages/thrift
%build
%install
THRIFT_SRC_DIR="%{_python_pkgs_dir}/thrift"
cp -rv ${THRIFT_SRC_DIR}/* \
%{_build_root}/awips2/python/lib/python2.7/site-packages/thrift
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*

View file

@ -0,0 +1,101 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python tpg Spec File
#
Name: awips2-python-tpg
Summary: AWIPS II Python tpg Distribution - 64 Bit
Version: 3.1.2
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-tpg
%description
AWIPS II Python tpg Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
%build
TPG_SRC_DIR="%{_python_pkgs_dir}/tpg"
TPG_TAR="TPG-3.1.2.tar.gz"
cp -v ${TPG_SRC_DIR}/${TPG_TAR} \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
tar -xvf ${TPG_TAR}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
rm -fv ${TPG_TAR}
if [ ! -d TPG-3.1.2 ]; then
file TPG-3.1.2
exit 0
fi
cd TPG-3.1.2
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
pushd . > /dev/null
cd %{_build_root}/build-python/TPG-3.1.2
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
rm -rf %{_build_root}/build-python
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/python/bin
/awips2/python/bin/*

View file

@ -0,0 +1,60 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python ufpy Spec File
#
Name: awips2-python-ufpy
Summary: AWIPS II Python ufpy Distribution - 64 Bit
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-ufpy
%description
AWIPS II Python ufpy Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}/awips2/python/lib/python2.7/site-packages/ufpy
%build
%install
UFPY_SRC_DIR="%{_python_pkgs_dir}/ufpy"
cp -rv ${UFPY_SRC_DIR}/* \
%{_build_root}/awips2/python/lib/python2.7/site-packages/ufpy
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*

View file

@ -0,0 +1,85 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python werkzeug Spec File
#
Name: awips2-python-werkzeug
Summary: AWIPS II Python tpg Distribution - 64 Bit
Version: 3.1.2
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-werkzeug
%description
AWIPS II Python werkzeug Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
%build
WERKZEUG_SRC_DIR="%{_python_pkgs_dir}/werkzeug"
cp -rv ${WERKZEUG_SRC_DIR}/* \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
pushd . > /dev/null
cd %{_build_root}/build-python
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
rm -rf %{_build_root}/build-python
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*

6
rpms/awips2.64/README Normal file
View file

@ -0,0 +1,6 @@
The awips2.64 directory contains the build script(s) and rpm projects for the AWIPS II 64-bit rpms.
If you are running this build manually, you should update the Build Variables located near the top of build.sh.
To build all 64-bit rpms, just run build.sh. If you want to build a certain 64-bit rpm or a subset of the 64-bit rpms,
pass the name of the rpm as an argument to this script. You can pass one or multiple space-delimited rpms to this
script.

View file

@ -0,0 +1,283 @@
#!/bin/bash
# Build Variables:
# -----------------------------------------------------------------------------
VAR_AWIPSII_TOP_DIR="/home/bkowal/rpmbuild"
VAR_WORKSPACE="/common/bkowal/workspace"
VAR_AWIPSII_BUILD_ROOT="/tmp/awips-component"
VAR_AWIPSII_VERSION=""
VAR_AWIPSII_RELEASE=""
# -----------------------------------------------------------------------------
# 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
}
RPM_SPECS_DIR=""
function lookupRPM()
{
# 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"
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_64BIT_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}/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}" = "awips2-cave" ]; then
RPM_SPECS_DIR="_BUILD_CAVE_"
return 0
fi
if [ "${1}" = "awips2-alertviz" ]; then
RPM_SPECS_DIR="${RPM_64BIT_PROJECT_DIR}/Installer.alertviz"
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=x86_64 \
--define '_topdir %(echo ${AWIPSII_TOP_DIR})' \
--define '_baseline_workspace %(echo ${WORKSPACE})' \
--define '_build_root %(echo ${AWIPSII_BUILD_ROOT})' \
--define '_component_version %(echo ${AWIPSII_VERSION})' \
--define '_component_release %(echo ${AWIPSII_RELEASE})' \
--buildroot ${AWIPSII_BUILD_ROOT} \
${1}
RC=$?
if [ ${RC} -ne 0 ]; then
return 1
fi
}
# Special Cases:
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
}
# 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
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_" ]; then
buildRPM ${RPM_SPECS_DIR}/component.spec
RC=$?
else
buildCAVE
RC=$?
fi
if [ ${RC} -ne 0 ]; then
echo "ERROR: Failed to build - ${arg}."
exit 1
fi
done
fi

View file

@ -0,0 +1,177 @@
#
# AWIPS II Eclipse Spec File
#
# --define arguments:
# %{_uframe_eclipse}
# %{_build_root}
# %{_baseline_workspace}
Name: awips2-eclipse
Summary: AWIPS II Eclipse Distribution
Version: 3.6.1
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-eclipse
%description
AWIPS II Eclipse Distribution - Contains the AWIPS II Eclipse Distribution.
# Turn off the brp-python-bytecompile script
%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')
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
if [ -d %{_build_root} ]; then
rm -rf %{_build_root}
fi
mkdir -p %{_build_root}/awips2/eclipse
%build
%install
# The location of the awips2 eclipse source directory will be
# specified as a command line argument. Fail if the specified
# directory cannot be found.
if [ ! -d %{_uframe_eclipse} ]; then
echo "ERROR: Unable To Find The AWIPS II Eclipse Distribution."
echo "Unable To Continue ... Terminating"
exit 1
fi
# Copy the uframe eclipse distribution.
cp -r %{_uframe_eclipse}/* %{_build_root}/awips2/eclipse
# Copy eclipse.sh to our build-directory.
cp %{_baseline_workspace}/Installer.rpm/awips2.ade/Installer.eclipse/scripts/* \
%{_build_root}/awips2/eclipse
# delete the basemaps and etc links
rm -f %{_build_root}/awips2/eclipse/basemaps
rm -f %{_build_root}/awips2/eclipse/etc
%pre
JAVA_INSTALL="<Not Installed>"
PYTHON_INSTALL="<Not Installed>"
ANT_INSTALL="<Not Installed>"
INSTALL_PATH="/awips2/java"
if [ -d ${INSTALL_PATH} ]; then
JAVA_INSTALL=${INSTALL_PATH}
fi
INSTALL_PATH="/awips2/python"
if [ -d ${INSTALL_PATH} ]; then
PYTHON_INSTALL=${INSTALL_PATH}
fi
INSTALL_PATH="/awips2/ant"
if [ -d ${INSTALL_PATH} ]; then
ANT_INSTALL=${INSTALL_PATH}
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing the AWIPS II Eclipse Distribution...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Java Detected At: ${JAVA_INSTALL}\e[m"
echo -e "\e[1;34m Python Detected At: ${PYTHON_INSTALL}\e[m"
echo -e "\e[1;34m Ant Detected At: ${ANT_INSTALL}\e[m"
%post
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Creating ADE Eclipse Desktop Shortcut...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
ADE_ECLIPSE_SHORTCUT="ade-eclipse"
SHORTCUT_OWNER="${USER}"
CREATE_SHORTCUT="true"
if [ ! "${SUDO_USER}" = "" ]; then
SHORTCUT_OWNER="${SUDO_USER}"
fi
echo -e "\e[1;34m Creating Shortcut For User: ${SHORTCUT_OWNER}\e[m"
USER_HOME_DIR="~${SHORTCUT_OWNER}"
if [ ! -d ${USER_HOME_DIR} ]; then
USER_HOME_DIR="/home/${SHORTCUT_OWNER}"
echo " (Assuming User Home Directory Is Under '/home')"
fi
if [ ! -d ${USER_HOME_DIR}/Desktop ]; then
echo -e "\e[1;31m ERROR: Unable To Find The User's Desktop!!!"
CREATE_SHORTCUT="false"
fi
if [ "${CREATE_SHORTCUT}" = "true" ]; then
SHORTCUT_TMP="${USER_HOME_DIR}/Desktop/${ADE_ECLIPSE_SHORTCUT}.tmp"
SHORTCUT="${USER_HOME_DIR}/Desktop/${ADE_ECLIPSE_SHORTCUT}.desktop"
if [ -f ${SHORTCUT} ]; then
echo -n " Attempting To Remove The Existing Shortcut ... "
sudo -u ${SHORTCUT_OWNER} rm -f ${SHORTCUT}
if [ ! -f ${SHORTCUT} ]; then
echo -n "SUCCESS"
else
echo -n "FAILURE"
fi
echo ""
fi
sudo -u ${SHORTCUT_OWNER} touch ${SHORTCUT_TMP}
sudo -u ${SHORTCUT_OWNER} chmod 666 ${SHORTCUT_TMP}
echo "[Desktop Entry]" >> ${SHORTCUT_TMP}
echo "Version=1.0" >> ${SHORTCUT_TMP}
echo "Encoding=UTF-8" >> ${SHORTCUT_TMP}
echo "Name=ADE Eclipse" >> ${SHORTCUT_TMP}
echo "GenericName=Eclipse" >> ${SHORTCUT_TMP}
echo "Comment=IDE" >> ${SHORTCUT_TMP}
echo "Exec=/bin/bash -i -c \"xterm -title 'AWIPS II ADE Eclipse' -e '/awips2/eclipse/eclipseShortcutWrap.sh'\"" >> ${SHORTCUT_TMP}
echo "Icon=/awips2/eclipse/icon.xpm" >> ${SHORTCUT_TMP}
echo "Terminal=false" >> ${SHORTCUT_TMP}
echo "Type=Application" >> ${SHORTCUT_TMP}
echo "Categories=Development;IDE;" >> ${SHORTCUT_TMP}
sudo -u ${SHORTCUT_OWNER} mv ${SHORTCUT_TMP} ${SHORTCUT}
sudo -u ${SHORTCUT_OWNER} chmod 644 ${SHORTCUT}
fi
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II Eclipse Distribution Installation - COMPLETE\e[m"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
%preun
%postun
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/eclipse
/awips2/eclipse/*
%defattr(755,awips,fxalpha,755)
/awips2/eclipse/about.html
/awips2/eclipse/artifacts.xml
/awips2/eclipse/eclipse
/awips2/eclipse/eclipse.ini
/awips2/eclipse/eclipse.sh
/awips2/eclipse/eclipseShortcutWrap.sh
/awips2/eclipse/epl-v10.html
/awips2/eclipse/icon.xpm
/awips2/eclipse/libcairo-swt.so
/awips2/eclipse/notice.html

View file

@ -0,0 +1,80 @@
# usage:
# eclipse.sh [args] -- launches eclipse using specified command line args
# eclipse.sh -- launches Eclipse with default command line args
dir=${0%/*}
if [ "${dir}" = "$0" ]; then
dir="."
fi
PYTHON_INSTALL=
JAVA_INSTALL=
ANT_INSTALL=
ECLIPSE_INSTALL=
CAVE_INSTALL=
rpm -q awips2-python > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "ERROR: awips2-python Is Not Installed."
echo "Unable To Continue ... Terminating"
exit 1
fi
PYTHON_INSTALL="/awips2/python"
rpm -q awips2-java > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "ERROR: awips2-java Is Not Installed."
echo "Unable To Continue ... Terminating"
exit 1
fi
JAVA_INSTALL="/awips2/java"
rpm -q awips2-ant > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "ERROR: awips2-ant Is Not Installed."
echo "Unable To Continue ... Terminating"
exit 1
fi
ANT_INSTALL="/awips2/ant"
ECLIPSE_INSTALL="/awips2/eclipse"
cd ${dir}
# grab the CL argument; if none set a reasonable default
if [ $# -ne 0 ]; then
# there are arguments, convert them into a string
args=${1}
shift 1
for a in $@; do
args="${args} ${a}"
done
else
# set a reasonable default for performance
args='-clean -vmargs -Xms512m -Xmx1024m -XX:MaxPermSize=256m'
fi
# setup environment variables
export JAVA_HOME=${JAVA_INSTALL}
export ANT_HOME=${ANT_INSTALL}
# set LD_PRELOAD
export LD_PRELOAD=${PYTHON_INSTALL}/lib/libpython2.7.so
# update path type variables
export LD_LIBRARY_PATH=${PYTHON_INSTALL}/lib:$LD_LIBRARY_PATH
export PATH=${ECLIPSE_INSTALL}:${PYTHON_INSTALL}/bin:${JAVA_INSTALL}/bin:$PATH
# determine if cave has been installed for TMCP_HOME
rpm -q awips2-cave > /dev/null 2>&1
if [ $? -ne 0 ]; then
CAVE_INSTALL="/awips2/cave"
export TMCP_HOME=${CAVE_INSTALL}/caveEnvironment
else
echo "WARNING: awips2-cave is not installed; so, TMCP_HOME will not be set."
fi
#%INSTALL_PATH/eclipse/eclipse -clean -vmargs -Xms512m -Xmx1024m -XX:MaxPermSize=256m &
echo "./eclipse ${args} &"
nohup ./eclipse ${args} > /dev/null 2>&1 &
echo ""
echo "Successful Eclipse Startup ..."
exit 0

View file

@ -0,0 +1,31 @@
#!/bin/bash
# This Script Should Only Be Run By The ADE Eclipse Shortcuts.
# Any User That Attempts To Run This Script Manually May
# Encounter Unexpected Behavior.
dir=${0%/*}
if [ "${dir}" = "$0" ]; then
dir="."
fi
cd ${dir}
# Attempt To Run The Eclipse Script.
./eclipse.sh
RC="$?"
if [ ! "${RC}" = "0" ]; then
sleep 50
exit 1
fi
COUNT=5
echo -n "This Terminal Will Close In ..."
while [ ! "${COUNT}" = "0" ]
do
echo -n " ${COUNT}"
let COUNT=COUNT-1
sleep 2
done

View file

@ -0,0 +1,31 @@
#!/bin/bash
# This script executes all of the scripts that are responsible
# for building and packaging the ade components.
export BUILDROOT_DIR="/tmp/awips-component"
export RPM_BUILD_ROOT="${BUILDROOT_DIR}"
export UFRAME_ECLIPSE_DIR="/opt/uframe-eclipse"
export WORKSPACE_DIR=`cd ../../../; pwd;`
export AWIPSCM_SHARE="/awipscm"
if [ -d /tmp/awips-component ]; then
rm -rf /tmp/awips-component
fi
if [ -d /tmp/ade-component ]; then
rm -rf /tmp/ade-component
fi
if [ -f /usr/src/redhat/BUILD/component-files.txt ]; then
rm -f /usr/src/redhat/BUILD/component-files.txt
fi
# Build the eclipse rpm
cd ${WORKSPACE_DIR}/Installer.rpm/awips2.ade/Installer.eclipse
rpmbuild -ba --target=i386 --buildroot ${BUILDROOT_DIR} component.spec
# Build the baseline jar file
cd ${WORKSPACE_DIR}/Installer.rpm/awips2.ade/tar.baseline
./build.sh
# Create the ade tar file
cd ${WORKSPACE_DIR}/Installer.rpm/awips2.ade/tar.ade
./build.sh "${AWIPSII_VERSION}" "${AWIPSII_RELEASE}"

116
rpms/awips2.ade/tar.ade/build.sh Executable file
View file

@ -0,0 +1,116 @@
#!/bin/bash
# This script gathers all of the ade components and places them
# into a single directory so that a tar file can be created.
CURRENT_VERSION="${AWIPSII_VERSION}"
CURRENT_RELEASE="${AWIPSII_RELEASE}"
CURRENT_DATE=`date +"%m-%d-%Y"`
CORE_RPM_DIR="${AWIPSCM_SHARE}/awips2-rpms/rpms"
ECLIPSE_RPM_DIR="/usr/src/redhat/RPMS/i386"
ECLIPSE_RPM="awips2-eclipse-3.6.1-1.i386.rpm"
JAVA_RPM="awips2-java-1.6.0_17-2.i386.rpm"
PYTHON_RPM="awips2-python-2.7.1-1.i386.rpm"
ANT_RPM="awips2-ant-1.7.1-2.i386.rpm"
AWIPS2_SITE_PKG_RPMS=\
(
'awips2-python-cherrypy-3.1.2-2.i386.rpm' \
'awips2-python-h5py-1.3.0-2.i386.rpm' \
'awips2-python-matplotlib-0.99.1.1-2.i386.rpm' \
'awips2-python-nose-0.11.1-2.i386.rpm' \
'awips2-python-numpy-1.5.0b1-2.i386.rpm' \
'awips2-python-pil-1.1.6-2.i386.rpm' \
'awips2-python-pmw-1.3.2-2.i386.rpm' \
'awips2-python-pupynere-1.0.13-2.i386.rpm' \
'awips2-python-qpid-0.6-2.i386.rpm' \
'awips2-python-scientific-2.8-2.i386.rpm' \
'awips2-python-scipy-0.8.0-2.i386.rpm' \
'awips2-python-tables-2.1.2-2.i386.rpm' \
'awips2-python-thrift-20080411p1-2.i386.rpm' \
'awips2-python-tpg-3.1.2-2.i386.rpm' \
'awips2-python-werkzeug-0.6.2-2.i386.rpm' \
)
BASELINE_JAR_DIR="${RPM_BUILD_ROOT}/tmp"
BASELINE_JAR="awips2-ade-baseline-SOURCES.jar"
mkdir -p /tmp/awips2-ade-${CURRENT_DATE}
cp -v ${CORE_RPM_DIR}/${JAVA_RPM} /tmp/awips2-ade-${CURRENT_DATE}
cp -v ${CORE_RPM_DIR}/${PYTHON_RPM} /tmp/awips2-ade-${CURRENT_DATE}
cp -v ${CORE_RPM_DIR}/${ANT_RPM} /tmp/awips2-ade-${CURRENT_DATE}
cp -v ${ECLIPSE_RPM_DIR}/${ECLIPSE_RPM} /tmp/awips2-ade-${CURRENT_DATE}
cp -v ${BASELINE_JAR_DIR}/${BASELINE_JAR} /tmp/awips2-ade-${CURRENT_DATE}
for rpm in ${AWIPS2_SITE_PKG_RPMS[*]};
do
cp -v ${CORE_RPM_DIR}/${rpm} /tmp/awips2-ade-${CURRENT_DATE}
done
# Copy ufpy and dynamicserialize
# Determine where ufpy and dynamicserialize are located first. They should either
# be in the integration repository or the workspace of RPMBuildNoDeploy-Delivery.
INT_REPO="/var/www/html/repo/awips2-int/i386/python.site-packages"
DEL_WORKSPACE="/usr/share/tomcat5/.hudson/jobs/RPMBuildNoDeploy-Delivery/workspace/var/www/html/repo/awips2-int/i386/python.site-packages"
UFPY_FOUND="N"
DYNAMICSERIALIZE_FOUND="N"
UFPY_RPM="awips2-python-ufpy-${CURRENT_VERSION}-${CURRENT_RELEASE}.i386.rpm"
DYNAMICSERIALIZE_RPM="awips2-python-dynamicserialize-${CURRENT_VERSION}-${CURRENT_RELEASE}.i386.rpm"
# Check the integration repository first.
if [ -f ${INT_REPO}/${UFPY_RPM} ]; then
cp -v ${INT_REPO}/${UFPY_RPM} /tmp/awips2-ade-${CURRENT_DATE}
UFPY_FOUND="Y"
fi
if [ -f ${INT_REPO}/${DYNAMICSERIALIZE_RPM} ]; then
cp -v ${INT_REPO}/${DYNAMICSERIALIZE_RPM} /tmp/awips2-ade-${CURRENT_DATE}
DYNAMICSERIALIZE_FOUND="Y"
fi
# Check the workspace next - if the rpm was not found in the repo.
if [ "${UFPY_FOUND}" = "N" ]; then
if [ ! -f ${DEL_WORKSPACE}/${UFPY_RPM} ]; then
echo "ERROR: Unable to find - ${UFPY_RPM}."
echo "Unable To Continue ... Terminating."
exit 1
fi
cp -v ${DEL_WORKSPACE}/${UFPY_RPM} /tmp/awips2-ade-${CURRENT_DATE}
fi
if [ "${DYNAMICSERIALIZE_FOUND}" = "N" ]; then
if [ ! -f ${DEL_WORKSPACE}/${DYNAMICSERIALIZE_RPM} ]; then
echo "ERROR: Unable to find - ${DYNAMICSERIALIZE_RPM}."
echo "Unable To Continue ... Terminating."
exit 1
fi
cp -v ${DEL_WORKSPACE}/${DYNAMICSERIALIZE_RPM} /tmp/awips2-ade-${CURRENT_DATE}
fi
# Copy the installation / removal scripts.
cp -v ${WORKSPACE_DIR}/Installer.rpm/awips2.ade/tar.ade/scripts/* \
/tmp/awips2-ade-${CURRENT_DATE}
chmod a+x /tmp/awips2-ade-${CURRENT_DATE}/*.sh
# Update the installation script.
perl -p -i -e "s/PY_DYNAMICSERIALIZE=/PY_DYNAMICSERIALIZE=${DYNAMICSERIALIZE_RPM}/g" \
/tmp/awips2-ade-${CURRENT_DATE}/ade_quick_install.sh
perl -p -i -e "s/PY_UFPY=/PY_UFPY=${UFPY_RPM}/g" \
/tmp/awips2-ade-${CURRENT_DATE}/ade_quick_install.sh
cd /tmp
# Remove any existing tar files
if [ -f awips2-ade-${CURRENT_DATE}.tar ]; then
rm -f awips2-ade-${CURRENT_DATE}.tar
fi
tar -cjf awips2-ade-${CURRENT_VERSION}-${CURRENT_DATE}.tar awips2-ade-${CURRENT_DATE}
# Ensure that the tar was successful
RC="$?"
if [ ! "${RC}" = "0" ]; then
echo "ERROR: Failed to create tar file - awips2-ade-${CURRENT_DATE}.tar."
echo "Unable To Continue ... Terminating."
exit 1
fi
exit 0

View file

@ -0,0 +1,60 @@
#!/bin/bash
# This script must be ran as root or with root privileges.
# Arguments:
# $1 == the Installation Prefix (Optional)
if [ ! "${USER}" = "root" ]; then
echo "ERROR: You Must Be 'root' To Run This Script."
echo "Unable To Continue ... Terminating."
exit 1
fi
#
# Check for existence of user awips
#
id awips >/dev/null
ID_AWIPS=$?
if [ $ID_AWIPS != 0 ]; then
echo "An awips user does not exist on this system"
echo "As root:"
echo " useradd awips"
exit
fi
#
# Check for existence of group fxalpha
#
getent group fxalpha >/dev/null
GROUP_FXALPHA=$?
if [ $GROUP_FXALPHA != 0 ]; then
echo "The fxalpha group does not exist on this system"
echo "As root:"
echo " groupadd fxalpha"
exit
fi
#
# Check for user awips in group fxalpha
#
AWIPS_IN_FXALPHA=`groups awips | grep fxalpha`
if [ "${AWIPS_IN_FXALPHA}" = "0" ]; then
echo "The awips user must be in the fxalpha group on this system"
echo "As root:"
echo " usermod -a -G fxalpha awips"
exit
fi
dir=${0%/*}
if [ "$dir" = "$0" ]; then
dir="."
fi
cd ${dir}
yum --disablerepo=* install *.rpm --nogpgcheck -y
if [ $? -ne 0 ]; then
echo "FATAL: ADE Installation Failed."
fi

View file

@ -0,0 +1,29 @@
#!/bin/bash
# This script must be run as root or with root privileges.
if [ ! "${USER}" = "root" ]; then
echo "ERROR: You Must Be 'root' To Run This Script."
echo "Unable To Continue ... Terminating."
exit 1
fi
function removeRPMNoMatterWhat()
{
# Arguments:
# $1 == the component name
AWIPSII_COMPONENT="${1}"
rpm -e --nodeps ${AWIPSII_COMPONENT}
RC="$?"
if [ ! "${RC}" = "0" ]; then
echo "ERROR: Unable To Remove '${AWIPSII_COMPONENT}'."
fi
}
ADE_COMPONENTS=`rpm -qa --queryformat='%{NAME}\n' |grep awips2 | sort -n`
for component in ${ADE_COMPONENTS[*]};
do
removeRPMNoMatterWhat "${component}"
done

View file

@ -0,0 +1,70 @@
#!/bin/bash
# Check out the AWIPS II baseline and generate the Javadocs.
function checkoutProjects()
{
CONNECTION="${SVN_CONNECTION}"
if [ "${CONNECTION}" = "" ]; then
echo "ERROR: No SVN URL Was Provided."
echo "Unable To Continue ... Terminating."
exit 1
fi
SVN_EXE=`which svn`
cd ${RPM_BUILD_ROOT}/tmp
PRODUCTS_TO_CHECKOUT=( 'edexOsgi' 'cave' 'cots' 'RadarServer' \
'rpms' 'nativeLib' 'ncep' )
for product in ${PRODUCTS_TO_CHECKOUT[*]};
do
${SVN_EXE} export -q --force ${CONNECTION}/${product}
done
}
# checkout the
# make our projects directory
mkdir -p ${RPM_BUILD_ROOT}/tmp/projects
mkdir -p ${RPM_BUILD_ROOT}/tmp/projects/awips
checkoutProjects
mv ${RPM_BUILD_ROOT}/tmp/rpms \
${RPM_BUILD_ROOT}/tmp/projects/awips/Installer.rpm
cp -r ${RPM_BUILD_ROOT}/tmp/edexOsgi/* \
${RPM_BUILD_ROOT}/tmp/projects/awips
rm -rf ${RPM_BUILD_ROOT}/tmp/edexOsgi
cp -r ${RPM_BUILD_ROOT}/tmp/cave/* \
${RPM_BUILD_ROOT}/tmp/projects/awips
rm -rf ${RPM_BUILD_ROOT}/tmp/cave
cp -r ${RPM_BUILD_ROOT}/tmp/cots/* \
${RPM_BUILD_ROOT}/tmp/projects/awips
rm -rf ${RPM_BUILD_ROOT}/tmp/cots
cp -r ${RPM_BUILD_ROOT}/tmp/RadarServer/* \
${RPM_BUILD_ROOT}/tmp/projects/awips
rm -rf ${RPM_BUILD_ROOT}/tmp/RadarServer
cp -r ${RPM_BUILD_ROOT}/tmp/ncep/* \
${RPM_BUILD_ROOT}/tmp/projects/awips
rm -rf ${RPM_BUILD_ROOT}/tmp/ncep
mv ${RPM_BUILD_ROOT}/tmp/nativeLib \
${RPM_BUILD_ROOT}/tmp/projects/awips/nativeLib
# Generate the Javadocs
# create our javadocs directory
mkdir -p ${RPM_BUILD_ROOT}/tmp/projects/javadocs
cd ${WORKSPACE_DIR}/Installer.rpm/awips2.ade/tar.baseline/javadoc
ant -Dawips.src.dir=${RPM_BUILD_ROOT}/tmp/projects/awips
# copy the javadocs to the baseline javadocs directory
cp -r ${WORKSPACE_DIR}/Installer.rpm/awips2.ade/tar.baseline/javadoc/build/api/* \
${RPM_BUILD_ROOT}/tmp/projects/javadocs
# remove uframe-eclipse from the projects directory
rm -rf ${RPM_BUILD_ROOT}/tmp/projects/awips/uframe-eclipse
# jar the baseline
cp ${WORKSPACE_DIR}/Installer.rpm/awips2.ade/tar.baseline/jar/build.xml \
${RPM_BUILD_ROOT}/tmp
cd ${RPM_BUILD_ROOT}/tmp
ant -d

View file

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<project name="package-baseline" default="jar-sources">
<property name="awips2.version"
value="11.8.0" />
<property name="awips2.release"
value="1" />
<target name="jar-sources">
<jar jarfile="awips2-ade-baseline-${awips2.version}-${awips2.release}-SOURCES.jar">
<fileset dir="projects">
<include name="**/*" />
</fileset>
</jar>
</target>
</project>

View file

@ -0,0 +1,132 @@
<?xml version="1.0"?>
<!DOCTYPE project [
]>
<!-- ============================================================ -->
<!-- Ant build file to create the AWIPS II {project} installer. -->
<!-- note: -Dawips.src.dir=../../AWIPS -->
<!-- ============================================================ -->
<project name="ade-javadoc-installer" default="generateJavadoc" basedir=".">
<!-- ============================================================ -->
<!-- define properties specific to this project -->
<!-- note: these will "over-ride" properties in common.xml -->
<!-- ============================================================ -->
<property name="build.base.dir" value="build"/>
<property name="build.img.dir" value="${basedir}/img" />
<property name="awips.build" value="build.edex" />
<property name="awips.src.dir" value=""/>
<property name="awips.build.dir" location="${awips.src.dir}/${awips.build}"/>
<property name="install.default" value="javadoc"/>
<property name="packs.src.dir" value="${install.default}/api" />
<!-- ============================================================ -->
<!-- define properties specific to this project -->
<!-- note: these may use properties in common.xml -->
<!-- ============================================================ -->
<property name="awips.dst.dir" location="${build.base.dir}"/>
<property name="docs.dst.dir" location="${build.base.dir}/docs"/>
<property name="awips.api.dir" value="${awips.dst.dir}/api"/>
<property name="awips.api.resources" value="${awips.api.dir}/resources"/>
<property name="javadoc.document.title" value="AWIPS II API Specification"/>
<property name="javadoc.document.header" value="AWIPS II API Specification" />
<property name="javadoc.window.title" value="AWIPS II API" />
<property name="javadoc.overview.document" value="Installer.rpm/awips2.ade/tar.baseline/javadoc/conf/overview.html" />
<property name="javadoc.java.url" value="http://java.sun.com/javase/6/docs/api" />
<!-- ============================================================ -->
<!-- define paths needed for building javadoc -->
<!-- ============================================================ -->
<property name="conf.dir" location="${basedir}/conf"/>
<path id="base.class.path">
<!-- include all jars -->
<fileset dir="${awips.src.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="javadoc.packages.path">
<dirset dir="${awips.src.dir}">
<include name="com.raytheon.*/src" />
<include name="gov.noaa.nws.*/src" />
<include name="com.raytheon.*/*test*" />
<exclude name="*.demo.*" />
<exclude name="*.feature*"/>
<exclude name="*.product.*"/>
</dirset>
</path>
<target name="generateJavadoc" depends="init">
<antcall target="stage.javadoc" />
</target>
<!-- ============================================================ -->
<!-- creates directory structure needed for build -->
<!-- ============================================================ -->
<target name="init"
description="performs initial setup of necessary build structure">
<mkdir dir="${awips.dst.dir}"/>
<mkdir dir="${awips.api.dir}"/>
</target>
<!-- ============================================================ -->
<!-- builds and stages the JavaDoc for the components -->
<!-- ============================================================ -->
<target name="stage.javadoc" description="builds and stages the JavaDoc">
<property file="${conf.dir}/javadoc.properties"/>
<echo message="Generating JavaDoc"/>
<echo message="awips.src.dir=${awips.src.dir}"/>
<javadoc overview="${awips.src.dir}/${javadoc.overview.document}"
sourcepathref="javadoc.packages.path"
classpathref="base.class.path"
packagenames="com.raytheon.*,gov.*"
failonerror="false"
destdir="${awips.dst.dir}/api"
author="true" use="true"
maxmemory="1024m"
verbose="false"
package="true"
windowtitle="${javadoc.window.title}"
useexternalfile="yes">
<doctitle>${javadoc.document.title}</doctitle>
<header>${javadoc.document.header}</header>
<group title="AWIPS II Packages" packages="com.raytheon.*"/>
<group title="Contributed Packages" packages="gov.*"/>
<link offline="true" href="${javadoc.java.url}"
packagelistloc="${awips.build.dir}/opt/javadoc/jdk/1.5"/>
</javadoc>
<copy todir="${awips.api.resources}">
<fileset dir="${build.img.dir}" includes="ray*.jpg"/>
</copy>
</target>
<!-- ============================================================ -->
<!-- stages the documentation from the component projects -->
<!-- ============================================================ -->
<target name="stage.docs" description="stages the documents from the various docs projects">
<echo message="Searching ${awips.src.dir} for documents"/>
<for param="file">
<path>
<dirset dir="${awips.src.dir}" followsymlinks="true">
<include name="**/docs.*"/>
<include name="**/docs/"/>
<exclude name="**/Installer.*/**"/>
<exclude name="**/build*/**"/>
</dirset>
</path>
<sequential>
<echo message="Copying files in @{file}"/>
<copy todir="${docs.dst.dir}" flatten="true">
<fileset dir="@{file}">
<include name="*"/>
<exclude name="**/*.html"/>
<exclude name="**/.*"/>
</fileset>
</copy>
</sequential>
</for>
</target>
</project>

View file

@ -0,0 +1,5 @@
<body>
<img src="resources/rayAWIPS.jpg" align=middle">
This document contains the API Specification for the AWIPS II System. Documentation
includes both CAVE and EDEX as well as contributed code.
</body>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -0,0 +1,84 @@
# RPM Metadata
%define _component_name awips2-cave-etc
%define _component_desc "awips2-cave-etc"
#
# awips2-cave-etc Spec File
#
%define __prelink_undo_cmd %{nil}
# Turn off the brp-python-bytecompile script
%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')
Name: %{_component_name}
Summary: awips2-cave Installation
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: %{_component_name}
requires: awips2-cave
requires: awips2
%description
%{_component_desc}
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
if [ -d ${RPM_BUILD_ROOT} ]; then
rm -rf ${RPM_BUILD_ROOT}
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/cave/etc
%build
%install
BASELINE_ETC_DIR="build/static/common/cave/etc"
ETC_DIR_LOC="${WORKSPACE_DIR}/${BASELINE_ETC_DIR}"
if [ ! -d ${ETC_DIR_LOC} ]; then
echo "ERROR: Unable to find CAVE etc directory."
exit 1
fi
cp -r ${ETC_DIR_LOC}/* ${RPM_BUILD_ROOT}/awips2/cave/etc
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Copy of CAVE etc directory has failed."
exit 1
fi
%pre
# Ensure that CAVE is available. There is not any point in installing
# the files if CAVE is not available.
if [ ! -f /awips2/cave/cave ]; then
echo "ERROR: The cave executable was not found or is corrupt - /awips2/cave/cave;"
echo " awips2-cave must be re-installed. This installation will be terminated."
exit 1
fi
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2
%dir /awips2/cave
%dir /awips2/cave/etc
/awips2/cave/etc/*
%defattr(664,awips,fxalpha,755)
/awips2/cave/etc/aviation/config/*

View file

@ -0,0 +1,245 @@
%define _component_zip_file_name %{_component_feature}-repo-linux.%{_build_arch}.zip
#
# awips2-cave Spec File
#
%define __prelink_undo_cmd %{nil}
# Turn off the brp-python-bytecompile script
%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')
Name: %{_component_name}
Summary: %{_component_name} Installation
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: %{_component_name} = %{_component_version}
requires: %{_downstream_requires}
requires: awips2
%description
%{_component_desc}
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
if [ -d ${RPM_BUILD_ROOT} ]; then
rm -rf ${RPM_BUILD_ROOT}
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/cave/.repository
CAVE_DIST_DIR="${WORKSPACE_DIR}/Installer.rpm/awips2.cave/setup/dist"
if [ ! -f ${CAVE_DIST_DIR}/%{_component_zip_file_name} ]; then
echo "ERROR: Unable to find - ${CAVE_DIST_DIR}/%{_component_zip_file_name}."
exit 1
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.
if [ ! -f /awips2/cave/cave ]; then
echo "ERROR: The cave executable was not found or is corrupt - /awips2/cave/cave;"
echo " awips2-cave must be re-installed. This installation will be terminated."
exit 1
fi
CAVE_BACKUP="/awips2/cave.bak"
# Remove any existing backups.
if [ -d ${CAVE_BACKUP} ]; then
rm -rf ${CAVE_BACKUP}
fi
# Create a backup of CAVE as it is.
LOG_TIMESTAMP=`date`
echo "backup STARTED: ${LOG_TIMESTAMP}"
cp -r /awips2/cave ${CAVE_BACKUP}
LOG_TIMESTAMP=`date`
echo "backup COMPLETE: ${LOG_TIMESTAMP}"
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
%post
CAVE_BACKUP="/awips2/cave.bak"
function cleanupUnzip()
{
if [ -f /awips2/cave/.repository/artifacts.xml ]; then
rm -f /awips2/cave/.repository/artifacts.xml
fi
if [ -f /awips2/cave/.repository/content.xml ]; then
rm -f /awips2/cave/.repository/content.xml
fi
if [ -d /awips2/cave/.repository/features ]; then
rm -rf /awips2/cave/.repository/features
fi
if [ -d /awips2/cave/.repository/plugins ]; then
rm -rf /awips2/cave/.repository/plugins
fi
}
function restoreCAVEAndFail()
{
rm -rf /awips2/cave
LOG_TIMESTAMP=`date`
echo "restoring backup STARTED: ${LOG_TIMESTAMP}"
mv -f ${CAVE_BACKUP} /awips2/cave
LOG_TIMESTAMP=`date`
echo "restoring backup COMPLETE: ${LOG_TIMESTAMP}"
cleanupUnzip
exit 1
}
# Set all paths required by CAVE before installing.
export LD_LIBRARY_PATH=%{_awips2_java_home}/lib:/awips2/python/lib:$LD_LIBRARY_PATH
export LD_PRELOAD=libpython.so
if [ -d /awips2/cave/lib ]; then
export LD_LIBRARY_PATH=/awips2/cave/lib/lib_illusion:$LD_LIBRARY_PATH
fi
if [ -d /awips2/cave/lib64 ]; then
export LD_LIBRARY_PATH=/awips2/cave/lib64/lib_illusion:$LD_LIBRARY_PATH
fi
# Need to use awips2-java to do this.
export PATH=%{_awips2_java_home}/bin:/awips2/python/bin:${PATH}
export JAVA_HOME="%{_awips2_java_home}/jre"
# Use the eclipse p2 manager.
CAVE_EXE="/awips2/cave/cave"
NOSPLASH_ARG="-nosplash"
DIRECTOR_APP="-application org.eclipse.equinox.p2.director"
DESTINATION_ARG="-destination /awips2/cave"
INSTALL_ARG="-i %{_component_feature}.feature.group"
UNINSTALL_ARG="-u %{_component_feature}.feature.group"
REPO="-repository file:/awips2/cave/.repository/"
COMMON_CMD="${CAVE_EXE} ${NOSPLASH_ARG} ${DIRECTOR_APP} ${DESTINATION_ARG}"
INSTALL_CMD="${COMMON_CMD} ${INSTALL_ARG} ${REPO}"
UNINSTALL_CMD="${COMMON_CMD} ${UNINSTALL_ARG}"
# Uninstall any existing components since the p2 director does not
# support updating.
# If the feature is not installed, this does not fail quietly.
# Determine if the feature needs to be uninstalled.
${UNINSTALL_CMD} -verifyOnly > /dev/null 2>&1
RC=$?
if [ ${RC} -eq 0 ]; then
LOG_TIMESTAMP=`date`
echo "uninstall previous STARTED: ${LOG_TIMESTAMP}"
${UNINSTALL_CMD}
LOG_TIMESTAMP=`date`
echo "uninstall previous COMPLETE: ${LOG_TIMESTAMP}"
fi
# unzip the repository
cd /awips2/cave/.repository
cleanupUnzip
unzip %{_component_zip_file_name} > /dev/null 2>&1
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Unzip of repository FAILED."
restoreCAVEAndFail
fi
# Install the component.
LOG_TIMESTAMP=`date`
echo "installation STARTED: ${LOG_TIMESTAMP}"
${INSTALL_CMD}
RC=$?
if [ ${RC} -ne 0 ]; then
restoreCAVEAndFail
fi
LOG_TIMESTAMP=`date`
echo "installation COMPLETE: ${LOG_TIMESTAMP}"
# Cleanup the unzip
cleanupUnzip
# Remove the backup.
rm -rf /awips2/cave.bak
%preun
# Do not use p2 to remove the feature if this is an upgrade.
if [ "${1}" = "1" ]; then
exit 0
fi
# Ensure that CAVE is available.
if [ ! -f /awips2/cave/cave ]; then
# Even though we are not correctly uninstalled, there is nothing
# we can do about that because of an rpm bug. If the user is
# uninstalling then they will need to remove what is left of
# /awips2 anyway.
exit 0
fi
# Ensure that awips2-java is available.
if [ ! -f /awips2/java/bin/java ]; then
exit 0
fi
# Ensure that awips2-python is available.
if [ ! -f /awips2/python/bin/python ]; then
exit 0
fi
# Set all paths required by CAVE before installing.
export LD_LIBRARY_PATH=%{_awips2_java_home}/lib:/awips2/python/lib:$LD_LIBRARY_PATH
export LD_PRELOAD=libpython.so
if [ -d /awips2/cave/lib ]; then
export LD_LIBRARY_PATH=/awips2/cave/lib/lib_illusion:$LD_LIBRARY_PATH
fi
if [ -d /awips2/cave/lib64 ]; then
export LD_LIBRARY_PATH=/awips2/cave/lib64/lib_illusion:$LD_LIBRARY_PATH
fi
# Need to use awips2-java to do this.
export PATH=%{_awips2_java_home}/bin:/awips2/python/bin:${PATH}
export JAVA_HOME="%{_awips2_java_home}/jre"
# Use the eclipse p2 manager.
CAVE_EXE="/awips2/cave/cave"
NOSPLASH_ARG="-nosplash"
DIRECTOR_APP="-application org.eclipse.equinox.p2.director"
DESTINATION_ARG="-destination /awips2/cave"
UNINSTALL_ARG="-u %{_component_feature}.feature.group"
COMMON_CMD="${CAVE_EXE} ${NOSPLASH_ARG} ${DIRECTOR_APP} ${DESTINATION_ARG}"
UNINSTALL_CMD="${COMMON_CMD} ${UNINSTALL_ARG}"
LOG_TIMESTAMP=`date`
echo "uninstall STARTED: ${LOG_TIMESTAMP}"
${UNINSTALL_CMD}
LOG_TIMESTAMP=`date`
echo "uninstall COMPLETE: ${LOG_TIMESTAMP}"
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/cave/.repository
/awips2/cave/.repository/*

View file

@ -0,0 +1,321 @@
# RPM Metadata
%define _component_name awips2-cave
%define _component_project_dir awips2.cave/Installer.cave
%define _component_zip_file_name CAVE-linux.gtk.%{_build_arch}.zip
%define _component_desc "awips2-cave"
#
# awips2-cave Spec File
#
%define __prelink_undo_cmd %{nil}
# Turn off the brp-python-bytecompile script
%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')
Name: %{_component_name}
Summary: awips2-cave Installation
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: %{_component_name}
provides: awips2-base-component
requires: awips2-java
requires: awips2-python
requires: openmotif
requires: libMrm.so.4
requires: libXp.so.6
requires: libg2c.so.0
%description
%{_component_desc}
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
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="${WORKSPACE_DIR}/Installer.rpm/awips2.cave/setup/dist"
if [ ! -f ${CAVE_DIST_DIR}/%{_component_zip_file_name} ]; then
echo "ERROR: Unable to find - ${CAVE_DIST_DIR}/%{_component_zip_file_name}."
exit 1
fi
cp ${CAVE_DIST_DIR}/%{_component_zip_file_name} \
${RPM_BUILD_ROOT}/awips2
%build
%install
cd ${RPM_BUILD_ROOT}/awips2
unzip %{_component_zip_file_name}
rm -f %{_component_zip_file_name}
# Our profile.d scripts
PROFILE_D_DIR="${WORKSPACE_DIR}/Installer.rpm/common/environment/awips2-cave/profile.d"
cp ${PROFILE_D_DIR}/* ${RPM_BUILD_ROOT}/etc/profile.d
# The AWIPS II version script.
VERSIONS_SCRIPT="Installer.rpm/utility/scripts/versions.sh"
cp ${WORKSPACE_DIR}/${VERSIONS_SCRIPT} ${RPM_BUILD_ROOT}/awips2/cave
# testWS script
TEXTWS_SCRIPT="Installer.rpm/utility/scripts/textWS.sh"
cp ${WORKSPACE_DIR}/${TEXTWS_SCRIPT} ${RPM_BUILD_ROOT}/awips2/cave
# text-workstation autostart script.
CAVE_SCRIPTS_DIR="${WORKSPACE_DIR}/Installer.rpm/awips2.cave/Installer.cave/scripts"
TEXTWS_AUTO_SCRIPT="${CAVE_SCRIPTS_DIR}/autostart/awips2-textws.desktop"
cp -v ${TEXTWS_AUTO_SCRIPT} ${RPM_BUILD_ROOT}/etc/xdg/autostart
if [ $? -ne 0 ]; then
exit 1
fi
%pre
if [ "${1}" = "2" ]; then
# During an upgrade, we need to copy CAVE components that should not
# change without a complete re-install to a temporary location so that
# they are not overwritten. If we do not do this, CAVE will not recognize
# any of the features / plugins that have been installed after the upgrade.
# Create the CAVE backup directory
mkdir -p /awips2/cave.bak
# Ensure that the file directories that need to be backed up exist
if [ ! -f /awips2/cave/artifacts.xml ]; then
echo "ERROR: The cave artifacts.xml file does not exist."
echo " Your CAVE install is corrupted. Please re-install."
exit 1
fi
if [ ! -f /awips2/cave/cave ]; then
echo "ERROR: The cave executable does not exist."
echo " Your CAVE install is corrupted. Please re-install."
exit 1
fi
if [ ! -d /awips2/cave/configuration ]; then
echo "ERROR: The cave configuration directory does not exist."
echo " Your CAVE install is corrupted. Please re-install."
exit 1
fi
if [ ! -d /awips2/cave/features ]; then
echo "ERROR: The cave features directory does not exist."
echo " Your CAVE install is corrupted. Please re-install."
exit 1
fi
if [ ! -d /awips2/cave/p2 ]; then
echo "ERROR: The cave p2 directory does not exist."
echo " Your CAVE install is corrupted. Please re-install."
exit 1
fi
if [ ! -d /awips2/cave/plugins ]; then
echo "ERROR: The cave plugins directory does not exist."
echo " Your CAVE install is corrupted. Please re-install."
exit 1
fi
# Create the backups
mv /awips2/cave/artifacts.xml /awips2/cave.bak/
mv /awips2/cave/cave /awips2/cave.bak/
mv /awips2/cave/configuration /awips2/cave.bak/
mv /awips2/cave/features /awips2/cave.bak/
mv /awips2/cave/p2 /awips2/cave.bak/
mv /awips2/cave/plugins /awips2/cave.bak/
exit 0
fi
# /awips2/cave must not exist.
if [ -d /awips2/cave ]; then
echo -e "\e[1;31mERROR: the /awips2/cave directory already exists. /awips2/cave\e[m"
echo -e "\e[1;31m must be REMOVED before the installation will proceed.\e[m"
exit 1
fi
%post
# Remove the text-workstation autostart script if we have not been installed
# on an xt workstation
if [ ! "`hostname | cut -b 1-2`" = "xt" ]; then
rm -f /etc/xdg/autostart/awips2-textws.desktop
fi
MACHINE_BIT=`uname -i`
if [ "${MACHINE_BIT}" = "i386" ]
then
if [ -d /awips2/cave/lib/lib64 ]; then
rm -rf /awips2/cave/lib/lib64
fi
fi
# We need to create a link to the python shared library if it does not exist.
pushd . > /dev/null 2>&1
if [ -d /awips2/python/lib ]; then
cd /awips2/python/lib
if [ -L libpython.so ]; then
# Ensure that we are pointing to the correct shared library.
rm -f libpython.so
fi
if [ -f libpython2.7.so.1.0 ]; then
ln -s libpython2.7.so.1.0 libpython.so
fi
fi
popd > /dev/null 2>&1
pushd . > /dev/null 2>&1
cd /awips2/cave/plugins
# Forcefully unzip: org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar
# : if i386
if [ -f org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar ]; then
mkdir org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c
unzip -qq org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar \
-d org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c
rm -f org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar
mv org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c \
org.eclipse.swt.gtk.linux.x86_3.6.1.v3655c.jar
fi
# Forcefully unzip: org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c.jar
# : if x86_64
if [ -f org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c.jar ]; then
mkdir org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c
unzip -qq org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c.jar \
-d org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c
rm -f org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c.jar
mv org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c \
org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c.jar
fi
# Forcefully unzip: org.eclipse.ui_3.6.1.M20100826-1330.jar
# : for i386 & x86_64
if [ -f org.eclipse.ui_3.6.1.M20100826-1330.jar ]; then
mkdir org.eclipse.ui_3.6.1.M20100826-1330
unzip -qq org.eclipse.ui_3.6.1.M20100826-1330.jar \
-d org.eclipse.ui_3.6.1.M20100826-1330
rm -f org.eclipse.ui_3.6.1.M20100826-1330.jar
mv org.eclipse.ui_3.6.1.M20100826-1330 \
org.eclipse.ui_3.6.1.M20100826-1330.jar
fi
popd > /dev/null 2>&1
if [ "${1}" = "2" ]; then
# Restore the backup.
# Remove the files that were just placed on the filesystem by the install.
rm -f /awips2/cave/artifacts.xml
rm -f /awips2/cave/cave
rm -rf /awips2/cave/configuration
rm -rf /awips2/cave/features
rm -rf /awips2/cave/p2
rm -rf /awips2/cave/plugins
mv /awips2/cave.bak/* /awips2/cave
rm -rf /awips2/cave.bak
fi
%preun
# Backup the core CAVE jar files so that they are
# not removed during the uninstallation of a previous
# version of CAVE during an upgrade.
if [ "${1}" = "1" ]; then
# This is an upgrade.
if [ -d /awips2/cave.bak ]; then
rm -rf /awips2/cave.bak
fi
mkdir -p /awips2/cave.bak/plugins
CAVE_APPLICATION_PLUGIN="com.raytheon.uf.viz.application_*.jar"
CAVE_PRODUCT_PLUGIN="com.raytheon.viz.product.awips_*.jar"
cp /awips2/cave/plugins/${CAVE_APPLICATION_PLUGIN} \
/awips2/cave.bak/plugins
cp /awips2/cave/plugins/${CAVE_PRODUCT_PLUGIN} \
/awips2/cave.bak/plugins
fi
%postun
# Restore the CAVE jar files that were backed-up if this
# is an upgrade.
if [ "${1}" = "1" ]; then
# This is an upgrade.
CAVE_APPLICATION_PLUGIN="com.raytheon.uf.viz.application_*.jar"
CAVE_PRODUCT_PLUGIN="com.raytheon.viz.product.awips_*.jar"
if [ ! -d /awips2/cave.bak/plugins ]; then
exit 0
fi
if [ -d /awips2/cave/plugins ]; then
mv /awips2/cave.bak/plugins/${CAVE_APPLICATION_PLUGIN} \
/awips2/cave/plugins
mv /awips2/cave.bak/plugins/${CAVE_PRODUCT_PLUGIN} \
/awips2/cave/plugins
fi
rm -rf /awips2/cave.bak
fi
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,root,root,-)
/etc/profile.d/awips2Cave.csh
/etc/profile.d/awips2Cave.sh
%defattr(644,awips,fxalpha,755)
%dir /awips2
%dir /awips2/cave
%docdir /awips2/cave/about_files
%dir /awips2/cave/about_files
/awips2/cave/about_files/*
%doc /awips2/cave/about.html
/awips2/cave/artifacts.xml
/awips2/cave/*.ini
%dir /awips2/cave/configuration
/awips2/cave/configuration/*
%doc /awips2/cave/epl-v10.html
%dir /awips2/cave/features
/awips2/cave/features/*
%doc /awips2/cave/notice.html
%dir /awips2/cave/p2
/awips2/cave/p2/*
%dir /awips2/cave/plugins
/awips2/cave/plugins/*
%docdir /awips2/cave/readme
%dir /awips2/cave/readme
/awips2/cave/readme/*
/awips2/cave/.eclipseproduct
%defattr(755,awips,fxalpha,755)
%dir /awips2/cave/caveEnvironment
/awips2/cave/caveEnvironment/*
/awips2/cave/cave
/awips2/cave/*.sh
/awips2/cave/*.so
%dir /awips2/cave/lib%{_build_bits}
/awips2/cave/lib%{_build_bits}/*
%attr(644,root,root) /etc/xdg/autostart/awips2-textws.desktop

View file

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

View file

@ -0,0 +1,213 @@
#!/bin/bash
# We Have Been Created To Automate The Building Of The AWIPS II RPMs.
# Arguments:
# ${1} == Build Version
# ${2} == Build Release
if [ "${RPM_TOP_DIR}" = "" ]; then
echo "ERROR: You Must Set The RPM_TOP_DIR Environment Variable."
echo "Unable To Continue ... Terminating."
exit 1
fi
export TARGET_BUILD_ARCH=
# If the architecture has not been specified, default to 32-bit.
if [ "${CAVE_BUILD_ARCH}" = "" ]; then
export CAVE_BUILD_ARCH="x86"
echo "The Build Architecture was not specified ... defaulting to x86."
else
echo "Building for architecture ... ${CAVE_BUILD_ARCH}."
fi
# Set the target build architecture for the rpms based on the CAVE build architecture.
export TARGET_BUILD_ARCH="${CAVE_BUILD_ARCH}"
if [ "${CAVE_BUILD_ARCH}" = "x86" ]; then
export TARGET_BUILD_ARCH="i386"
export CAVE_BUILD_BITS=""
else
export CAVE_BUILD_BITS="64"
fi
export WORKSPACE_DIR=`cd ../../../; pwd;`
# If there is an actual version, it will be given to us as an argument.
if [ "${1}" = "" ]; then
# Check version.txt
VERSION_TXT="${WORKSPACE_DIR}/Installer.rpm/version.txt"
if [ ! -f ${VERSION_TXT} ]; then
echo "ERROR: Unable to find the version file - ${VERSION_TXT}."
exit 1
fi
export BUILD_VERSION=`cat ${VERSION_TXT}`
# Ensure that a version has been specified.
if [ "${BUILD_VERSION}" = "" ]; then
echo "ERROR: A build version has not been specified."
exit 1
fi
else
export BUILD_VERSION="${1}"
fi
# If there is an actual release, it will be given to us as an argument.
if [ "${2}" = "" ]; then
# Use the date.
export BUILD_RELEASE=`date +"%Y%m%d"`
else
export BUILD_RELEASE="${2}"
fi
# Prepare
if [ ! -f ${WORKSPACE_DIR}/Installer.rpm/awips2.cave/setup/scripts/prepare_dist.sh ]; then
echo "ERROR: Unable to find the setup script."
exit 1
fi
/bin/bash ${WORKSPACE_DIR}/Installer.rpm/awips2.cave/setup/scripts/prepare_dist.sh
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: setup failed."
exit 1
fi
# The RPM Build Directory Structure Consists Of:
# ROOT = ${RPM_BUILD_ROOT}
# * BUILD
# * RPMS - Our Output RPMs
# * SOURCES
# * SPECS
# * SRPMS
# Arguments
# ${1} == The Directory With The Specs File And Possibly Other Custom
# Scripts That May Need To Be Merged Into A Component.
function buildRPM()
{
local BUILDROOT_DIR=/tmp/awips-component
local COMPONENT_DIR=${1}
# if we are building a 64-bit version of CAVE, create a temporary
# component.spec.64 file for the build.
if [ ! "${TARGET_BUILD_ARCH}" = "x86_64" ]; then
local COMPONENT_SPECS=${COMPONENT_DIR}/component.spec
else
# Create an alternate component.spec file.
cp -v ${COMPONENT_DIR}/component.spec ${COMPONENT_DIR}/component.spec.64
if [ $? -ne 0 ]; then
exit 1
fi
# libraries to substitute: { libMrm.so.4, libXp.so.6, libg2c.so.0 }
perl -p -i -e "s/requires: libMrm.so.4/requires: libMrm.so.4()(64bit)/g" \
${COMPONENT_DIR}/component.spec.64
if [ $? -ne 0 ]; then
exit 1
fi
perl -p -i -e "s/requires: libXp.so.6/requires: libXp.so.6()(64bit)/g" \
${COMPONENT_DIR}/component.spec.64
if [ $? -ne 0 ]; then
exit 1
fi
perl -p -i -e "s/requires: libg2c.so.0/requires: libg2c.so.0()(64bit)/g" \
${COMPONENT_DIR}/component.spec.64
if [ $? -ne 0 ]; then
exit 1
fi
local COMPONENT_SPECS=${COMPONENT_DIR}/component.spec.64
fi
if [ -d ${BUILDROOT_DIR} ]; then
rm -rf ${BUILDROOT_DIR}
fi
# Build The RPM.
rpmbuild -ba --target=${TARGET_BUILD_ARCH} \
--define '_topdir %(echo ${RPM_TOP_DIR})' \
--define '_component_version %(echo ${BUILD_VERSION})' \
--define '_component_release %(echo ${BUILD_RELEASE})' \
--define '_build_arch %(echo ${CAVE_BUILD_ARCH})' \
--define '_build_bits %(echo ${CAVE_BUILD_BITS})' \
--buildroot ${BUILDROOT_DIR} ${COMPONENT_SPECS}
# If We Are Unable To Build An RPM, Fail The Build:
RC="$?"
if [ -f ${COMPONENT_DIR}/component.spec.64 ]; then
rm -fv ${COMPONENT_DIR}/component.spec.64
fi
if [ ! "${RC}" = "0" ]; then
exit 1
fi
}
function buildFeatureRPMs()
{
local CONST_BUILDROOT_DIR=/tmp/awips-component
local CONST_COMPONENT_SPECS="Installer.cave-feature/component.spec"
local CONST_SETUP_DIR="Installer.cave-feature/feature.setup"
local CONST_SETUP_DIR_FULL="${WORKSPACE_DIR}/Installer.rpm/awips2.cave/${CONST_SETUP_DIR}"
local CONST_FEATURE_DIR="${WORKSPACE_DIR}/build/cave/p2/features"
local PROCESS_FEATURE_JAR="${WORKSPACE_DIR}/build/tools/ProcessFeature.jar"
if [ "${AWIPSII_JAVA_HOME}" = "" ]; then
echo "INFO: AWIPSII_JAVA_HOME has not been set. Defaulting to: /awips2/java."
export AWIPSII_JAVA_HOME="/awips2/java"
fi
if [ -d ${CONST_FEATURE_DIR}/com.raytheon.viz.feature.awips ]; then
rm -rf ${CONST_FEATURE_DIR}/com.raytheon.viz.feature.awips
fi
if [ -d ${CONST_FEATURE_DIR}/com.raytheon.uf.viz.eclipse.feature ]; then
rm -rf ${CONST_FEATURE_DIR}/com.raytheon.uf.viz.eclipse.feature
fi
if [ -d ${CONST_FEATURE_DIR}/com.raytheon.uf.viz.feature.alertviz ]; then
rm -rf ${CONST_FEATURE_DIR}/com.raytheon.uf.viz.feature.alertviz
fi
if [ -d ${CONST_FEATURE_DIR}/com.raytheon.viz.feature.awips.developer ]; then
rm -rf ${CONST_FEATURE_DIR}/com.raytheon.viz.feature.awips.developer
fi
# These are variables that will be placed into the environment by sourcing
# a shell script.
for feature_dir in `ls -1 ${CONST_FEATURE_DIR}`;
do
java -jar ${PROCESS_FEATURE_JAR} \
-p \
${CONST_FEATURE_DIR}/${feature_dir} \
${CONST_SETUP_DIR_FULL}
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: ${PROCESS_FEATURE_JAR} Failed."
exit 1
fi
if [ ! -f ${CONST_SETUP_DIR}/feature.setup ]; then
echo "ERROR: ${CONST_SETUP_DIR}/feature.setup Does Not Exist."
exit 1
fi
source ${CONST_SETUP_DIR}/feature.setup
rpmbuild -ba --target=${TARGET_BUILD_ARCH} \
--define '_topdir %(echo ${RPM_TOP_DIR})' \
--define '_component_name %(echo ${COMPONENT_NAME})' \
--define '_component_feature %(echo ${COMPONENT_FEATURE})' \
--define '_component_desc %(echo ${COMPONENT_DESC})' \
--define '_downstream_requires %(echo ${DOWNSTREAM_REQUIRES})' \
--define '_component_version %(echo ${BUILD_VERSION})' \
--define '_component_release %(echo ${BUILD_RELEASE})' \
--define '_build_arch %(echo ${CAVE_BUILD_ARCH})' \
--define '_awips2_java_home %(echo ${AWIPSII_JAVA_HOME})' \
--buildroot ${CONST_BUILDROOT_DIR} ${CONST_COMPONENT_SPECS}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
done
}
# Adjust Our Execution Position.
cd ../
# Only Build The RPMs That May Have Changed - AWIPS II-Specific Components.
buildRPM "Installer.cave"
buildRPM "Installer.cave-etc"
buildFeatureRPMs
unset USE_JROCKIT
unset AWIPSII_JAVA_HOME

View file

@ -0,0 +1,87 @@
#!/bin/bash
# This script will build the CAVE zip, the p2 repository zips, and copy them to the CAVE rpm dist
# directory.
# This script is started by the awips2.cave rpm build.sh script; so, it is able to get the workspace
# directory from the environment as well as the build architecture.
CAVE_RPM_DIST_DIR="${WORKSPACE_DIR}/Installer.rpm/awips2.cave/setup/dist"
if [ ! -d ${CAVE_RPM_DIST_DIR} ]; then
echo "ERROR: ${CAVE_RPM_DIST_DIR} does not exist."
exit 1
fi
rm -f ${CAVE_RPM_DIST_DIR}/*
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Unable to remove the contents of ${CAVE_RPM_DIST_DIR}."
exit 1
fi
if [ ! -d ${WORKSPACE_DIR}/build ]; then
echo "ERROR: The CAVE build directory was not found in the workspace - ${WORKSPACE_DIR}/build."
echo " When it was checked out of SVN was it accidentally named build.cave instead?"
exit 1
fi
cd ${WORKSPACE_DIR}/build
# Build the CAVE zip file.
if [ ! -f build.sh ]; then
echo "ERROR: Unable to find the CAVE build script."
exit 1
fi
# Execute the CAVE PDE Build.
# The Sun JDK Build.
time ./build.sh -eclipse=/opt/uframe-eclipse
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Unable to build the CAVE zip file."
exit 1
fi
# Copy the CAVE zip file to the awips2.cave dist directory.
CAVE_ZIP_NAME_32="CAVE-linux.gtk.x86.zip"
CAVE_ZIP_NAME_64="CAVE-linux.gtk.x86_64.zip"
CAVE_ZIP_LOC="cave/tmp/I.CAVE"
CAVE_ZIP="${CAVE_ZIP_LOC}/${CAVE_ZIP_NAME_32}"
if [ ! -f ${CAVE_ZIP} ]; then
echo "ERROR: ${CAVE_ZIP} does not exist."
exit 1
fi
cp -v ${CAVE_ZIP} ${CAVE_RPM_DIST_DIR}
CAVE_ZIP="${CAVE_ZIP_LOC}/${CAVE_ZIP_NAME_64}"
if [ ! -f ${CAVE_ZIP} ]; then
echo "ERROR: ${CAVE_ZIP} does not exist."
exit 1
fi
cp -v ${CAVE_ZIP} ${CAVE_RPM_DIST_DIR}
# Build the p2 repo zip files.
if [ ! -f p2-build.xml ]; then
echo "ERROR: Unable to find the p2 repo ant script."
exit 1
fi
# Execute the P2 Repo PDE Build.
# The Sun JDK Build.
time ant -f p2-build.xml -Dbuild.version=${BUILD_VERSION} \
-Dbuild.arch=${CAVE_BUILD_ARCH}
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Unable to build the CAVE p2 repo zip files."
exit 1
fi
# Copy the p2 repo zip files to the awips2.cave dist directory.
P2_REPO_ZIP_LOC="cave/p2/dist"
if [ ! -d ${P2_REPO_ZIP_LOC} ]; then
echo "ERROR: Unable to find the CAVE p2 repo zip files."
exit 1
fi
cp -v ${P2_REPO_ZIP_LOC}/* ${CAVE_RPM_DIST_DIR}
# Finished
exit 0

View file

@ -0,0 +1,105 @@
#
# AWIPS II Adapt Native Spec File
#
Name: awips2-adapt-native
Summary: AWIPS II Adapt Native Distribution
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
Prefix: /awips2
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-adapt-native
requires: awips2-edex-base
# The two python native libraries are now included directly in the python
# distribution that is built.
%description
AWIPS II Native Distribution - Contains the AWIP II Native Files for Adapt.
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2
%build
%install
NATIVE_TAR_FILE="dist.native/i386-pc-linux-gnu.tar"
/bin/gtar -xpf ${WORKSPACE_DIR}/${NATIVE_TAR_FILE} \
-C ${RPM_BUILD_ROOT}/awips2
# Remove Unnecessary Directories.
rm -rf ${RPM_BUILD_ROOT}/awips2/setup
rm -rf ${RPM_BUILD_ROOT}/awips2/edex
rm -rf ${RPM_BUILD_ROOT}/awips2/lib
rm -rf ${RPM_BUILD_ROOT}/awips2/awipsShare
%pre
if [ "${1}" = "2" ]; then
exit 0
fi
# Need To Ensure That We Are Lined Up With The Current Edex (Base) Installation.
EDEX_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}\n' awips2-edex-base`
if [ ! "${RPM_INSTALL_PREFIX}" = "${EDEX_INSTALL}" ]; then
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;31m\| ERROR: This Extension MUST Be Installed At The Same Location As EDEX!!!"
echo -e "\e[1;34m\| INFO: Use '--prefix=${EDEX_INSTALL}'.\e[m"
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
exit 1
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing the AWIPS II Adapt Native Libraries...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Installation Root = ${RPM_INSTALL_PREFIX}/adapt\e[m"
%post
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II Adapt Native Library 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 Adapt Native Libraries Have Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/adapt
%dir /awips2/adapt/climate
%dir /awips2/adapt/climate/data
/awips2/adapt/climate/data/*
%dir /awips2/adapt/climate/bin
%defattr(755,awips,fxalpha,755)
%dir /awips2/adapt/climate/bin/Linux
/awips2/adapt/climate/bin/Linux/*

View file

@ -0,0 +1,194 @@
%define CORE_DELTA_SETUP ${WORKSPACE_DIR}/Installer.rpm/delta/setup/updateSetup.sh
%define _component_name awips2-alertviz
%define _component_project_dir awips2.core/Installer.alertviz
%define _component_default_prefix /awips2/alertviz
#
# AWIPS II AlertViz Spec File
#
%define __prelink_undo_cmd %{nil}
Name: %{_component_name}
Summary: AWIPS II AlertViz
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
Prefix: %{_component_default_prefix}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-alertviz
requires: awips2-python
requires: awips2-java
%description
AWIPS II AlertViz Distribution - the AWIPS II AlertViz application.
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2
%build
#---------------------------------------------------------------------------#
# Delta-Enabled RPM
#---------------------------------------------------------------------------#
source %{CORE_DELTA_SETUP}
copySetupCore ${RPM_BUILD_ROOT} %{_component_default_prefix}
copyApplicableDeltas ${RPM_BUILD_ROOT} %{_component_name} \
%{_component_project_dir} %{_component_default_prefix}
#---------------------------------------------------------------------------#
%install
# Copies the standard Raytheon licenses into a license directory for the
# current component.
function copyLegal()
{
# $1 == Component Build Root
COMPONENT_BUILD_DIR=${1}
mkdir -p ${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
# Create a Tar file with our FOSS licenses.
tar -cjf ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar \
${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses/
cp ${WORKSPACE_DIR}/Installer.rpm/legal/license.txt \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp "${WORKSPACE_DIR}/Installer.rpm/legal/Master Rights File.pdf" \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
rm -f ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar
}
ALERTVIZ_ZIP_FILE="build/alertviz/tmp/I.AlertViz/AlertViz-linux.gtk.x86.zip"
cd ${RPM_BUILD_ROOT}/awips2
unzip ${WORKSPACE_DIR}/${ALERTVIZ_ZIP_FILE}
# Also Need To Create The alertvizEnvironment Directory
mkdir -p ${RPM_BUILD_ROOT}/awips2/alertviz/alertvizEnvironment
# Create our autostart template
mkdir -p ${RPM_BUILD_ROOT}/etc/xdg/autostart
cp ${WORKSPACE_DIR}/Installer.rpm/awips2.core/Installer.alertviz/scripts/autostart/awips2-alertviz.desktop \
${RPM_BUILD_ROOT}/etc/xdg/autostart
copyLegal "awips2/alertviz"
%pre
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing AWIPS II AlertViz...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Installation Root = ${RPM_INSTALL_PREFIX}\e[m"
%post
# Remove the alertviz autostart script if we have been installed on
# an xt machine.
if [ "`hostname | cut -b 1-2`" = "xt" ]; then
# Remove the awips2-alertviz autostart script.
rm -f /etc/xdg/autostart/awips2-alertviz.desktop
fi
#---------------------------------------------------------------------------#
# Delta-Enabled RPM
#---------------------------------------------------------------------------#
if [ "${1}" = "2" ]; then
echo "INFO: Performing %{_component_name} Upgrade."
echo "Preparing ..."
# Check the delta directory to see if there are updates that
# may need to be applied.
cd ${RPM_INSTALL_PREFIX}/delta/%{_component_name}
COUNT=`ls -1 | wc -l`
if [ "${COUNT}" = "0" ]; then
echo "INFO: No Updates To Perform."
exit 0
fi
echo "INFO: Potentially Applying ${COUNT} Updates."
# The Update Manager Is In: ${RPM_INSTALL_PREFIX}/delta
UPDATE_MANAGER="${RPM_INSTALL_PREFIX}/delta/updateManager.sh"
cd ${RPM_INSTALL_PREFIX}/delta
export COMPONENT_INSTALL="${RPM_INSTALL_PREFIX}"
${UPDATE_MANAGER} %{_component_name}
exit 0
fi
#---------------------------------------------------------------------------#
echo "--------------------------------------------------------------------------------"
echo "\| Setting up the AWIPS II AlertViz Runtime and Environment..."
echo "--------------------------------------------------------------------------------"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II AlertViz 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\| AWIPS II AlertViz Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,awips,fxalpha,-)
#---------------------------------------------------------------------------#
# Delta-Enabled RPM
#---------------------------------------------------------------------------#
%dir %{_component_default_prefix}/delta
%attr(700,root,root) %{_component_default_prefix}/delta/updateManager.sh
%attr(700,root,root) %{_component_default_prefix}/delta/createUpdateRegistry.sh
%{_component_default_prefix}/delta/%{_component_name}
#---------------------------------------------------------------------------#
%dir /awips2
%dir /awips2/alertviz
/awips2/alertviz/.eclipseproduct
%docdir /awips2/alertviz/about_files
%dir /awips2/alertviz/about_files
/awips2/alertviz/about_files/*
%doc /awips2/alertviz/about.html
%dir /awips2/alertviz/alertvizEnvironment
/awips2/alertviz/alertviz.ini
%dir /awips2/alertviz/configuration
/awips2/alertviz/configuration/*
%dir /awips2/alertviz/etc
/awips2/alertviz/etc/*
%dir /awips2/alertviz/features
/awips2/alertviz/features/*
%docdir /awips2/alertviz/licenses
%dir /awips2/alertviz/licenses
/awips2/alertviz/licenses/*
%dir /awips2/alertviz/plugins
/awips2/alertviz/plugins/*
%defattr(755,awips,fxalpha,755)
/awips2/alertviz/alertviz
/awips2/alertviz/*.so
/awips2/alertviz/*.sh
%attr(644,root,root) /etc/xdg/autostart/awips2-alertviz.desktop

View file

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

View file

@ -0,0 +1,155 @@
#
# AWIPS II Ant Spec File
#
Name: awips2-ant
Summary: AWIPS II Ant Distribution
Version: 1.7.1
Release: 2
Group: AWIPSII
BuildRoot: /tmp
Prefix: /awips2/ant
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-ant
%description
AWIPS II Ant Distribution - Contains Ant V1.7.1
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/ant
mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d
PROFILE_D_DIR="Installer.rpm/awips2.core/Installer.ant/scripts/profile.d"
cp ${WORKSPACE_DIR}/${PROFILE_D_DIR}/* ${RPM_BUILD_ROOT}/etc/profile.d
%build
%install
# Copies the standard Raytheon licenses into a license directory for the
# current component.
function copyLegal()
{
# $1 == Component Build Root
COMPONENT_BUILD_DIR=${1}
mkdir -p ${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
# Create a Tar file with our FOSS licenses.
tar -cjf ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar \
${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses/
cp ${WORKSPACE_DIR}/Installer.rpm/legal/license.txt \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp "${WORKSPACE_DIR}/Installer.rpm/legal/Master Rights File.pdf" \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
rm -f ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar
}
ANT_TAR_FILE="apache-ant-1.7.1-bin.tar.gz"
ANT_TAR_FILE_SRC_DIR="CMLibrary/Software/OpenSource/Ant/v1.7.1"
# Will Be Extracted Into apache-ant-1.7.1
tar -xf ${AWIPSCM_SHARE}/${ANT_TAR_FILE_SRC_DIR}/${ANT_TAR_FILE} \
-C ${RPM_BUILD_ROOT}/awips2
# Move Files From 1.7.1 To The Generic Directory
cp -r ${RPM_BUILD_ROOT}/awips2/apache-ant-1.7.1/* \
${RPM_BUILD_ROOT}/awips2/ant
rm -rf ${RPM_BUILD_ROOT}/awips2/apache-ant-1.7.1
copyLegal "awips2/ant"
%pre
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing the AWIPS II Ant Distribution...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Installation Root = ${RPM_INSTALL_PREFIX}\e[m"
%post
function printFailureMessage()
{
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;31m\| AWIPS II Ant Distribution Installation - FAILED\e[m"
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
}
echo "--------------------------------------------------------------------------------"
echo "\| Setting up AWIPS II Ant Runtime and Environment..."
echo "--------------------------------------------------------------------------------"
echo "--------------------------------------------------------------------------------"
echo "\| Adding Environment Variables for AWIPS II Ant"
echo "--------------------------------------------------------------------------------"
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II Ant 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 Ant Distribution Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,awips,fxalpha,-)
%attr(755,root,root) /etc/profile.d/awips2Ant.csh
%attr(755,root,root) /etc/profile.d/awips2Ant.sh
%dir /awips2/ant
%dir /awips2/ant/bin
%attr(755,awips,fxalpha) /awips2/ant/bin/ant
%attr(644,awips,fxalpha) /awips2/ant/bin/ant.bat
%attr(644,awips,fxalpha) /awips2/ant/bin/ant.cmd
%attr(644,awips,fxalpha) /awips2/ant/bin/antenv.cmd
%attr(755,awips,fxalpha) /awips2/ant/bin/antRun
%attr(644,awips,fxalpha) /awips2/ant/bin/antRun.bat
%attr(755,awips,fxalpha) /awips2/ant/bin/antRun.pl
%attr(755,awips,fxalpha) /awips2/ant/bin/complete-ant-cmd.pl
%attr(644,awips,fxalpha) /awips2/ant/bin/envset.cmd
%attr(644,awips,fxalpha) /awips2/ant/bin/lcp.bat
%attr(755,awips,fxalpha) /awips2/ant/bin/runant.pl
%attr(755,awips,fxalpha) /awips2/ant/bin/runant.py
%attr(644,awips,fxalpha) /awips2/ant/bin/runrc.cmd
%docdir /awips2/ant/docs
/awips2/ant/docs
/awips2/ant/etc
/awips2/ant/fetch.xml
/awips2/ant/get-m2.xml
%doc /awips2/ant/INSTALL
%doc /awips2/ant/KEYS
/awips2/ant/lib
%doc /awips2/ant/LICENSE
%docdir /awips2/ant/licenses
/awips2/ant/licenses
%doc /awips2/ant/NOTICE
%doc /awips2/ant/README
%doc /awips2/ant/WHATSNEW

View file

@ -0,0 +1,11 @@
#!/bin/csh
# Determine where ant has been installed.
set ANT_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}' awips2-ant`
setenv ANT_HOME "${ANT_INSTALL}"
if $?PATH then
setenv PATH ${ANT_INSTALL}/bin:$PATH
else
setenv PATH ${ANT_INSTALL}
endif

View file

@ -0,0 +1,24 @@
#!/bin/bash
# Is Ant Installed?
rpm -q awips2-ant > /dev/null 2>&1
RC=$?
if [ ${RC} -ne 0 ]; then
return
fi
# Determine Where Ant Has Been Installed.
ANT_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}' awips2-ant`
if [ "${ANT_INSTALL}" = "" ]; then
return
fi
# Update The Environment.
export ANT_HOME="${ANT_INSTALL}"
# Determine If Ant Is Already Part Of The Path.
CHECK_PATH=`echo ${PATH} | grep ${ANT_INSTALL}`
if [ ! "${CHECK_PATH}" = "" ]; then
return
fi
# Ant Is Not In The Path; Add It To The Path.
export PATH="${ANT_INSTALL}/bin:${PATH}"

View file

@ -0,0 +1,83 @@
#
# AWIPS II Hydroapps Spec File
#
Name: awips2-aviation-shared
Summary: AWIPS II Aviation Distribution
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-aviation-shared
requires: awips2-edex-base
%description
AWIPS II Aviation Distribution - includes *-ish files required by AvnFPS.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
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
AVIATION_SRC_DIR="build/static/common/cave/etc/aviation/thresholds"
# Copy the aviation *ish files to their destination.
cp ${WORKSPACE_DIR}/${AVIATION_SRC_DIR}/*.txt \
${RPM_BUILD_ROOT}/awips2/edex/data/share/aviation
%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}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2
%dir /awips2/edex
%dir /awips2/edex/data
%dir /awips2/edex/data/share
%dir /awips2/edex/data/share/aviation
%dir /awips2/edex/data/share/aviation/tmp
%defattr(664,awips,fxalpha,755)
/awips2/edex/data/share/aviation/*.txt

View file

@ -0,0 +1,176 @@
%define CORE_DELTA_SETUP ${WORKSPACE_DIR}/Installer.rpm/delta/setup/updateSetup.sh
%define _component_name awips2-cli
%define _component_project_dir awips2.core/Installer.cli
%define _component_default_prefix /awips2/fxa
#
# AWIPS II CLI Spec File
#
Name: %{_component_name}
Summary: AWIPS II CLI Installation
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
BuildArch: noarch
Prefix: %{_component_default_prefix}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-cli
requires: awips2-python
%description
AWIPS II CLI Installation - Contains The AWIPS II CLI Component.
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/fxa
%build
#---------------------------------------------------------------------------#
# Delta-Enabled RPM
#---------------------------------------------------------------------------#
source %{CORE_DELTA_SETUP}
copySetupCore ${RPM_BUILD_ROOT} %{_component_default_prefix}
copyApplicableDeltas ${RPM_BUILD_ROOT} %{_component_name} \
%{_component_project_dir} %{_component_default_prefix}
#---------------------------------------------------------------------------#
%install
# Copies the standard Raytheon licenses into a license directory for the
# current component.
function copyLegal()
{
# $1 == Component Build Root
COMPONENT_BUILD_DIR=${1}
mkdir -p ${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
# Create a Tar file with our FOSS licenses.
tar -cjf ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar \
${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses/
cp ${WORKSPACE_DIR}/Installer.rpm/legal/license.txt \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp "${WORKSPACE_DIR}/Installer.rpm/legal/Master Rights File.pdf" \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
rm -f ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar
}
# This Is The Workspace Project That Contains The Files That We
# Need For The CLI Component Installer.
CLI_PROJECT_DIR="com.raytheon.uf.tools.cli"
# Create the bin Directory for the CLI Component
mkdir -p ${RPM_BUILD_ROOT}/awips2/fxa/bin
cp -r ${WORKSPACE_DIR}/${CLI_PROJECT_DIR}/impl/* ${RPM_BUILD_ROOT}/awips2/fxa/bin
copyLegal "awips2/fxa"
# Copy our profile.d scripts.
PROFILE_D_DIRECTORY="Installer.rpm/awips2.core/Installer.cli/scripts/profile.d"
mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d
cp ${WORKSPACE_DIR}/${PROFILE_D_DIRECTORY}/* \
${RPM_BUILD_ROOT}/etc/profile.d
%pre
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing AWIPS II CLI...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Installation Root = ${RPM_INSTALL_PREFIX}\e[m"
%post
#---------------------------------------------------------------------------#
# Delta-Enabled RPM
#---------------------------------------------------------------------------#
if [ "${1}" = "2" ]; then
echo "INFO: Performing %{_component_name} Upgrade."
echo "Preparing ..."
# Check the delta directory to see if there are updates that
# may need to be applied.
cd ${RPM_INSTALL_PREFIX}/delta/%{_component_name}
COUNT=`ls -1 | wc -l`
if [ "${COUNT}" = "0" ]; then
echo "INFO: No Updates To Perform."
exit 0
fi
echo "INFO: Potentially Applying ${COUNT} Updates."
# The Update Manager Is In: ${RPM_INSTALL_PREFIX}/delta
UPDATE_MANAGER="${RPM_INSTALL_PREFIX}/delta/updateManager.sh"
cd ${RPM_INSTALL_PREFIX}/delta
export COMPONENT_INSTALL="${RPM_INSTALL_PREFIX}"
${UPDATE_MANAGER} %{_component_name}
exit 0
fi
#---------------------------------------------------------------------------#
PYTHON_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}\n' awips2-python`
PYTHON_INSTALL=${PYTHON_INSTALL}
function printFailureMessage()
{
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;31m\| AWIPS II CLI Installation - FAILED\e[m"
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
}
echo "--------------------------------------------------------------------------------"
echo "\| Setting up AWIPS II CLI Runtime and Environment..."
echo "--------------------------------------------------------------------------------"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II CLI 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 CLI Installation Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo ""
%files
%defattr(644,awips,fxalpha,755)
#---------------------------------------------------------------------------#
# Delta-Enabled RPM
#---------------------------------------------------------------------------#
%dir %{_component_default_prefix}/delta
%attr(700,root,root) %{_component_default_prefix}/delta/updateManager.sh
%attr(700,root,root) %{_component_default_prefix}/delta/createUpdateRegistry.sh
%{_component_default_prefix}/delta/%{_component_name}
#---------------------------------------------------------------------------#
%dir /awips2/fxa
%docdir /awips2/fxa/licenses
%dir /awips2/fxa/licenses
/awips2/fxa/licenses/*
/etc/profile.d/awips2CLI.csh
/etc/profile.d/awips2CLI.sh
%defattr(755,awips,fxalpha,755)
%dir /awips2/fxa/bin
%attr(755,awips,fxalpha) /awips2/fxa/bin/*
%config(noreplace) /awips2/fxa/bin/setup.env

View file

@ -0,0 +1,15 @@
#!/bin/csh
# Ensure that awips2-cli is installed.
rpm -q awips2-cli >& /dev/null
set RC="$?"
#if installed, set the variable
if ( "${RC}" == "0" ) then
set CLI_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}' awips2-cli`
#if check CLI_INSTALL is set, set it in the path
if ( "${CLI_INSTALL}" != "" ) then
setenv PATH ${CLI_INSTALL}/bin:${PATH}
endif
endif

View file

@ -0,0 +1,17 @@
#!/bin/bash
# Ensure that awips2-cli is installed.
rpm -q awips2-cli > /dev/null 2>&1
RC="$?"
if [ ! "${RC}" = "0" ]; then
# awips2-cli is not installed.
return
fi
# Determine where awips2-cli has been installed.
CLI_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}\n' awips2-cli`
if [ "${CLI_INSTALL}" = "" ]; then
return
fi
export PATH=${CLI_INSTALL}/bin:${PATH}

View file

@ -0,0 +1,53 @@
#
# AWIPS II Database Server Configuration Spec File
#
Name: awips2-database-server-configuration
Summary: AWIPS II Database Server Configuration
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-postgresql
provides: awips2-database-server-configuration
provides: awips2-database-configuration
%description
AWIPS II Database Server Configuration - contains the AWIPS II server
configuration files optimized for a clustered, server environment.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/data
%build
%install
PROJECT_DIR="Installer.database-server-configuration"
CONFIGURATION_DIR="Installer.rpm/awips2.core/${PROJECT_DIR}/configuration"
CONF_FILE="postgresql.conf"
cp ${WORKSPACE_DIR}/${CONFIGURATION_DIR}/${CONF_FILE} \
${RPM_BUILD_ROOT}/awips2/data
%pre
# Remove any existing postgresql.conf files
if [ -f /awips2/data/postgresql.conf ]; then
rm -f /awips2/data/postgresql.conf
fi
%files
%attr(644,awips,fxalpha) /awips2/data/postgresql.conf

View file

@ -0,0 +1,471 @@
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The '=' is optional.) White space may be used. Comments are introduced
# with '#' anywhere on a line. The complete list of option names and
# allowed values can be found in the PostgreSQL documentation. The
# commented-out settings shown in this file represent the default values.
#
# Please note that re-commenting a setting is NOT sufficient to revert it
# to the default value, unless you restart the server.
#
# Any option can also be given as a command line switch to the server,
# e.g., 'postgres -c log_connections=on'. Some options can be changed at
# run-time with the 'SET' SQL command.
#
# This file is read on server startup and when the server receives a
# SIGHUP. If you edit the file on a running system, you have to SIGHUP the
# server for the changes to take effect, or use "pg_ctl reload". Some
# settings, which are marked below, require a server shutdown and restart
# to take effect.
#
# Memory units: kB = kilobytes MB = megabytes GB = gigabytes
# Time units: ms = milliseconds s = seconds min = minutes h = hours d = days
#---------------------------------------------------------------------------
# FILE LOCATIONS
#---------------------------------------------------------------------------
# The default values of these variables are driven from the -D command line
# switch or PGDATA environment variable, represented here as ConfigDir.
#data_directory = 'ConfigDir' # use data in another directory
# (change requires restart)
#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file
# (change requires restart)
#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
#external_pid_file = '(none)' # write an extra PID file
# (change requires restart)
#---------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#---------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
#port = 5432 # (change requires restart)
max_connections = 300 # (change requires restart)
# Note: increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction). You
# might also need to raise shared_buffers to support more connections.
#superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directory = '' # (change requires restart)
#unix_socket_group = '' # (change requires restart)
#unix_socket_permissions = 0777 # octal
# (change requires restart)
#bonjour_name = '' # defaults to the computer name
# (change requires restart)
# - Security & Authentication -
#authentication_timeout = 1min # 1s-600s
#ssl = off # (change requires restart)
#password_encryption = on
#db_user_namespace = off
# Kerberos
#krb_server_keyfile = '' # (change requires restart)
#krb_srvname = 'postgres' # (change requires restart)
#krb_server_hostname = '' # empty string matches any keytab entry
# (change requires restart)
#krb_caseins_users = off # (change requires restart)
# - TCP Keepalives -
# see 'man 7 tcp' for details
#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
# 0 selects the system default
#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
# 0 selects the system default
#tcp_keepalives_count = 0 # TCP_KEEPCNT;
# 0 selects the system default
#---------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#---------------------------------------------------------------------------
# - Memory -
shared_buffers = 2048MB # min 128kB or max_connections*16kB
# (change requires restart)
temp_buffers = 16MB # min 800kB
#max_prepared_transactions = 5 # can be 0 or more
# (change requires restart)
# Note: increasing max_prepared_transactions costs ~600 bytes of shared memory
# per transaction slot, plus lock space (see max_locks_per_transaction).
work_mem = 64MB # min 64kB
maintenance_work_mem = 32MB # min 1MB
#max_stack_depth = 2MB # min 100kB
# - Free Space Map -
max_fsm_pages = 153600 # min max_fsm_relations*16, 6 bytes each
# (change requires restart)
#max_fsm_relations = 1000 # min 100, ~70 bytes each
# (change requires restart)
# - Kernel Resource Usage -
#max_files_per_process = 1000 # min 25
# (change requires restart)
#shared_preload_libraries = '' # (change requires restart)
# - Cost-Based Vacuum Delay -
#vacuum_cost_delay = 0 # 0-1000 milliseconds
#vacuum_cost_page_hit = 1 # 0-10000 credits
#vacuum_cost_page_miss = 10 # 0-10000 credits
#vacuum_cost_page_dirty = 20 # 0-10000 credits
#vacuum_cost_limit = 200 # 0-10000 credits
# - Background writer -
#bgwriter_delay = 200ms # 10-10000ms between rounds
#bgwriter_lru_percent = 1.0 # 0-100% of LRU buffers scanned/round
#bgwriter_lru_maxpages = 5 # 0-1000 buffers max written/round
#bgwriter_all_percent = 0.333 # 0-100% of all buffers scanned/round
#bgwriter_all_maxpages = 5 # 0-1000 buffers max written/round
#---------------------------------------------------------------------------
# WRITE AHEAD LOG
#---------------------------------------------------------------------------
# - Settings -
fsync = off # turns forced synchronization on or off
#wal_sync_method = fsync # the default is the first option
# supported by the operating system:
# open_datasync
# fdatasync
# fsync
# fsync_writethrough
# open_sync
#full_page_writes = on # recover from partial page writes
#wal_buffers = 64kB # min 32kB
# (change requires restart)
commit_delay = 50000 # range 0-100000, in microseconds
commit_siblings = 5 # range 1-1000
# - Checkpoints -
checkpoint_segments = 10 # in logfile segments, min 1, 16MB each
#checkpoint_timeout = 5min # range 30s-1h
#checkpoint_warning = 30s # 0 is off
# - Archiving -
#archive_command = '' # command to use to archive a logfile segment
#archive_timeout = 0 # force a logfile segment switch after this
# many seconds; 0 is off
#---------------------------------------------------------------------------
# QUERY TUNING
#---------------------------------------------------------------------------
# - Planner Method Configuration -
#enable_bitmapscan = on
#enable_hashagg = on
#enable_hashjoin = on
#enable_indexscan = on
#enable_mergejoin = on
#enable_nestloop = on
#enable_seqscan = on
#enable_sort = on
#enable_tidscan = on
# - Planner Cost Constants -
#seq_page_cost = 1.0 # measured on an arbitrary scale
#random_page_cost = 4.0 # same scale as above
#cpu_tuple_cost = 0.01 # same scale as above
#cpu_index_tuple_cost = 0.005 # same scale as above
#cpu_operator_cost = 0.0025 # same scale as above
effective_cache_size = 2048MB
# - Genetic Query Optimizer -
#geqo = on
#geqo_threshold = 12
#geqo_effort = 5 # range 1-10
#geqo_pool_size = 0 # selects default based on effort
#geqo_generations = 0 # selects default based on effort
#geqo_selection_bias = 2.0 # range 1.5-2.0
# - Other Planner Options -
#default_statistics_target = 10 # range 1-1000
#constraint_exclusion = off
#from_collapse_limit = 8
#join_collapse_limit = 8 # 1 disables collapsing of explicit
# JOINs
#---------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#---------------------------------------------------------------------------
# - Where to Log -
#log_destination = 'stderr' # Valid values are combinations of
# stderr, syslog and eventlog,
# depending on platform.
# This is used when logging to stderr:
logging_collector = on # Enable capturing of stderr into log
# files
# (change requires restart)
# These are only used if redirect_stderr is on:
log_directory = 'pg_log' # Directory where log files are written
# Can be absolute or relative to PGDATA
#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # Log file name pattern.
# Can include strftime() escapes
log_truncate_on_rotation = on # If on, any existing log file of the same
# name as the new log file will be
# truncated rather than appended to. But
# such truncation only occurs on
# time-driven rotation, not on restarts
# or size-driven rotation. Default is
# off, meaning append to existing files
# in all cases.
log_rotation_age = 1d # Automatic rotation of logfiles will
# happen after that time. 0 to
# disable.
log_rotation_size = 0 # Automatic rotation of logfiles will
# happen after that much log
# output. 0 to disable.
# These are relevant when logging to syslog:
#syslog_facility = 'LOCAL0'
#syslog_ident = 'postgres'
# - When to Log -
#client_min_messages = notice # Values, in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# log
# notice
# warning
# error
#log_min_messages = notice # Values, in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# info
# notice
# warning
# error
# log
# fatal
# panic
#log_error_verbosity = default # terse, default, or verbose messages
log_min_error_statement = log # Values in order of increasing severity:
# debug5
# debug4
# debug3
# debug2
# debug1
# info
# notice
# warning
# error
# log
# fatal
# panic (effectively off)
#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
# and their durations.
#silent_mode = off # DO NOT USE without syslog or
# redirect_stderr
# (change requires restart)
# - What to Log -
#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = off
#log_connections = off
#log_disconnections = off
#log_duration = off
log_line_prefix='%t %x %d : %h : '
# Special values:
# %u = user name
# %d = database name
# %r = remote host and port
# %h = remote host
# %p = PID
# %t = timestamp (no milliseconds)
# %m = timestamp with milliseconds
# %i = command tag
# %c = session id
# %l = session line number
# %s = session start timestamp
# %x = transaction id
# %q = stop here in non-session
# processes
# %% = '%'
# e.g. '<%u%%%d> '
#log_statement = 'none' # none, ddl, mod, all
#log_hostname = off
#---------------------------------------------------------------------------
# RUNTIME STATISTICS
#---------------------------------------------------------------------------
# - Query/Index Statistics Collector -
#stats_command_string = on
#update_process_title = on
#stats_block_level = off
track_counts = on
#stats_reset_on_server_start = off # (change requires restart)
# - Statistics Monitoring -
#log_parser_stats = off
#log_planner_stats = off
#log_executor_stats = off
#log_statement_stats = off
#---------------------------------------------------------------------------
# AUTOVACUUM PARAMETERS
#---------------------------------------------------------------------------
autovacuum = on # enable autovacuum subprocess?
# 'on' requires stats_start_collector
# and stats_row_level to also be on
#autovacuum_naptime = 1min # time between autovacuum runs
#autovacuum_vacuum_threshold = 500 # min # of tuple updates before
# vacuum
#autovacuum_analyze_threshold = 250 # min # of tuple updates before
# analyze
#autovacuum_vacuum_scale_factor = 0.2 # fraction of rel size before
# vacuum
#autovacuum_analyze_scale_factor = 0.1 # fraction of rel size before
# analyze
#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
# (change requires restart)
#autovacuum_vacuum_cost_delay = -1 # default vacuum cost delay for
# autovacuum, -1 means use
# vacuum_cost_delay
#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
# autovacuum, -1 means use
# vacuum_cost_limit
#---------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
#---------------------------------------------------------------------------
# - Statement Behavior -
#search_path = '"$user",public' # schema names
#default_tablespace = '' # a tablespace name, '' uses
# the default
#check_function_bodies = on
#default_transaction_isolation = 'read committed'
#default_transaction_read_only = off
#statement_timeout = 0 # 0 is disabled
#vacuum_freeze_min_age = 100000000
# - Locale and Formatting -
datestyle = 'iso, mdy'
timezone = GMT # actually, defaults to TZ
# environment setting
#timezone_abbreviations = 'Default' # select the set of available timezone
# abbreviations. Currently, there are
# Default
# Australia
# India
# However you can also create your own
# file in share/timezonesets/.
#extra_float_digits = 0 # min -15, max 2
#client_encoding = 'en_US.UTF-8' # actually, defaults to database
# encoding
# These settings are initialized by initdb -- they might be changed
lc_messages = 'en_US.UTF-8' # locale for system error message
# strings
lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
lc_numeric = 'en_US.UTF-8' # locale for number formatting
lc_time = 'en_US.UTF-8' # locale for time formatting
# - Other Defaults -
#explain_pretty_print = on
#dynamic_library_path = '$libdir'
#local_preload_libraries = ''
#---------------------------------------------------------------------------
# LOCK MANAGEMENT
#---------------------------------------------------------------------------
#deadlock_timeout = 1s
#max_locks_per_transaction = 64 # min 10
# (change requires restart)
# Note: each lock table slot uses ~270 bytes of shared memory, and there are
# max_locks_per_transaction * (max_connections + max_prepared_transactions)
# lock table slots.
#---------------------------------------------------------------------------
# VERSION/PLATFORM COMPATIBILITY
#---------------------------------------------------------------------------
# - Previous Postgres Versions -
#add_missing_from = off
#array_nulls = on
#backslash_quote = safe_encoding # on, off, or safe_encoding
#default_with_oids = off
#escape_string_warning = on
#standard_conforming_strings = off
#regex_flavor = advanced # advanced, extended, or basic
#sql_inheritance = on
# - Other Platforms & Clients -
#transform_null_equals = off
#---------------------------------------------------------------------------
# CUSTOMIZED OPTIONS
#---------------------------------------------------------------------------
#custom_variable_classes = '' # list of custom variable class names

View file

@ -0,0 +1,53 @@
#
# AWIPS II Database Standalone Configuration Spec File
#
Name: awips2-database-standalone-configuration
Summary: AWIPS II Database Standalone Configuration
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-postgresql
provides: awips2-database-standalone-configuration
provides: awips2-database-configuration
%description
AWIPS II Database Server Configuration - contains the AWIPS II server
configuration files optimized for a standalone environment.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/data
%build
%install
PROJECT_DIR="Installer.database-standalone-configuration"
CONFIGURATION_DIR="Installer.rpm/awips2.core/${PROJECT_DIR}/configuration"
CONF_FILE="postgresql.conf"
cp ${WORKSPACE_DIR}/${CONFIGURATION_DIR}/${CONF_FILE} \
${RPM_BUILD_ROOT}/awips2/data
%pre
# Remove any existing postgresql.conf files
if [ -f /awips2/data/postgresql.conf ]; then
rm -f /awips2/data/postgresql.conf
fi
%files
%attr(644,awips,fxalpha) /awips2/data/postgresql.conf

View file

@ -0,0 +1,471 @@
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The '=' is optional.) White space may be used. Comments are introduced
# with '#' anywhere on a line. The complete list of option names and
# allowed values can be found in the PostgreSQL documentation. The
# commented-out settings shown in this file represent the default values.
#
# Please note that re-commenting a setting is NOT sufficient to revert it
# to the default value, unless you restart the server.
#
# Any option can also be given as a command line switch to the server,
# e.g., 'postgres -c log_connections=on'. Some options can be changed at
# run-time with the 'SET' SQL command.
#
# This file is read on server startup and when the server receives a
# SIGHUP. If you edit the file on a running system, you have to SIGHUP the
# server for the changes to take effect, or use "pg_ctl reload". Some
# settings, which are marked below, require a server shutdown and restart
# to take effect.
#
# Memory units: kB = kilobytes MB = megabytes GB = gigabytes
# Time units: ms = milliseconds s = seconds min = minutes h = hours d = days
#---------------------------------------------------------------------------
# FILE LOCATIONS
#---------------------------------------------------------------------------
# The default values of these variables are driven from the -D command line
# switch or PGDATA environment variable, represented here as ConfigDir.
#data_directory = 'ConfigDir' # use data in another directory
# (change requires restart)
#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file
# (change requires restart)
#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
#external_pid_file = '(none)' # write an extra PID file
# (change requires restart)
#---------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#---------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
#port = 5432 # (change requires restart)
max_connections = 300 # (change requires restart)
# Note: increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction). You
# might also need to raise shared_buffers to support more connections.
#superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directory = '' # (change requires restart)
#unix_socket_group = '' # (change requires restart)
#unix_socket_permissions = 0777 # octal
# (change requires restart)
#bonjour_name = '' # defaults to the computer name
# (change requires restart)
# - Security & Authentication -
#authentication_timeout = 1min # 1s-600s
#ssl = off # (change requires restart)
#password_encryption = on
#db_user_namespace = off
# Kerberos
#krb_server_keyfile = '' # (change requires restart)
#krb_srvname = 'postgres' # (change requires restart)
#krb_server_hostname = '' # empty string matches any keytab entry
# (change requires restart)
#krb_caseins_users = off # (change requires restart)
# - TCP Keepalives -
# see 'man 7 tcp' for details
#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
# 0 selects the system default
#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
# 0 selects the system default
#tcp_keepalives_count = 0 # TCP_KEEPCNT;
# 0 selects the system default
#---------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#---------------------------------------------------------------------------
# - Memory -
shared_buffers = 128MB # min 128kB or max_connections*16kB
# (change requires restart)
temp_buffers = 16MB # min 800kB
#max_prepared_transactions = 5 # can be 0 or more
# (change requires restart)
# Note: increasing max_prepared_transactions costs ~600 bytes of shared memory
# per transaction slot, plus lock space (see max_locks_per_transaction).
work_mem = 8MB # min 64kB
maintenance_work_mem = 32MB # min 1MB
#max_stack_depth = 2MB # min 100kB
# - Free Space Map -
max_fsm_pages = 153600 # min max_fsm_relations*16, 6 bytes each
# (change requires restart)
#max_fsm_relations = 1000 # min 100, ~70 bytes each
# (change requires restart)
# - Kernel Resource Usage -
#max_files_per_process = 1000 # min 25
# (change requires restart)
#shared_preload_libraries = '' # (change requires restart)
# - Cost-Based Vacuum Delay -
#vacuum_cost_delay = 0 # 0-1000 milliseconds
#vacuum_cost_page_hit = 1 # 0-10000 credits
#vacuum_cost_page_miss = 10 # 0-10000 credits
#vacuum_cost_page_dirty = 20 # 0-10000 credits
#vacuum_cost_limit = 200 # 0-10000 credits
# - Background writer -
#bgwriter_delay = 200ms # 10-10000ms between rounds
#bgwriter_lru_percent = 1.0 # 0-100% of LRU buffers scanned/round
#bgwriter_lru_maxpages = 5 # 0-1000 buffers max written/round
#bgwriter_all_percent = 0.333 # 0-100% of all buffers scanned/round
#bgwriter_all_maxpages = 5 # 0-1000 buffers max written/round
#---------------------------------------------------------------------------
# WRITE AHEAD LOG
#---------------------------------------------------------------------------
# - Settings -
fsync = off # turns forced synchronization on or off
#wal_sync_method = fsync # the default is the first option
# supported by the operating system:
# open_datasync
# fdatasync
# fsync
# fsync_writethrough
# open_sync
#full_page_writes = on # recover from partial page writes
#wal_buffers = 64kB # min 32kB
# (change requires restart)
commit_delay = 50000 # range 0-100000, in microseconds
commit_siblings = 5 # range 1-1000
# - Checkpoints -
checkpoint_segments = 10 # in logfile segments, min 1, 16MB each
#checkpoint_timeout = 5min # range 30s-1h
#checkpoint_warning = 30s # 0 is off
# - Archiving -
#archive_command = '' # command to use to archive a logfile segment
#archive_timeout = 0 # force a logfile segment switch after this
# many seconds; 0 is off
#---------------------------------------------------------------------------
# QUERY TUNING
#---------------------------------------------------------------------------
# - Planner Method Configuration -
#enable_bitmapscan = on
#enable_hashagg = on
#enable_hashjoin = on
#enable_indexscan = on
#enable_mergejoin = on
#enable_nestloop = on
#enable_seqscan = on
#enable_sort = on
#enable_tidscan = on
# - Planner Cost Constants -
#seq_page_cost = 1.0 # measured on an arbitrary scale
#random_page_cost = 4.0 # same scale as above
#cpu_tuple_cost = 0.01 # same scale as above
#cpu_index_tuple_cost = 0.005 # same scale as above
#cpu_operator_cost = 0.0025 # same scale as above
effective_cache_size = 512MB
# - Genetic Query Optimizer -
#geqo = on
#geqo_threshold = 12
#geqo_effort = 5 # range 1-10
#geqo_pool_size = 0 # selects default based on effort
#geqo_generations = 0 # selects default based on effort
#geqo_selection_bias = 2.0 # range 1.5-2.0
# - Other Planner Options -
#default_statistics_target = 10 # range 1-1000
#constraint_exclusion = off
#from_collapse_limit = 8
#join_collapse_limit = 8 # 1 disables collapsing of explicit
# JOINs
#---------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#---------------------------------------------------------------------------
# - Where to Log -
#log_destination = 'stderr' # Valid values are combinations of
# stderr, syslog and eventlog,
# depending on platform.
# This is used when logging to stderr:
logging_collector = on # Enable capturing of stderr into log
# files
# (change requires restart)
# These are only used if redirect_stderr is on:
log_directory = 'pg_log' # Directory where log files are written
# Can be absolute or relative to PGDATA
#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # Log file name pattern.
# Can include strftime() escapes
log_truncate_on_rotation = on # If on, any existing log file of the same
# name as the new log file will be
# truncated rather than appended to. But
# such truncation only occurs on
# time-driven rotation, not on restarts
# or size-driven rotation. Default is
# off, meaning append to existing files
# in all cases.
log_rotation_age = 1d # Automatic rotation of logfiles will
# happen after that time. 0 to
# disable.
log_rotation_size = 0 # Automatic rotation of logfiles will
# happen after that much log
# output. 0 to disable.
# These are relevant when logging to syslog:
#syslog_facility = 'LOCAL0'
#syslog_ident = 'postgres'
# - When to Log -
#client_min_messages = notice # Values, in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# log
# notice
# warning
# error
#log_min_messages = notice # Values, in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# info
# notice
# warning
# error
# log
# fatal
# panic
#log_error_verbosity = default # terse, default, or verbose messages
log_min_error_statement = log # Values in order of increasing severity:
# debug5
# debug4
# debug3
# debug2
# debug1
# info
# notice
# warning
# error
# log
# fatal
# panic (effectively off)
#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
# and their durations.
#silent_mode = off # DO NOT USE without syslog or
# redirect_stderr
# (change requires restart)
# - What to Log -
#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = off
#log_connections = off
#log_disconnections = off
#log_duration = off
log_line_prefix='%t %x %d : %h : '
# Special values:
# %u = user name
# %d = database name
# %r = remote host and port
# %h = remote host
# %p = PID
# %t = timestamp (no milliseconds)
# %m = timestamp with milliseconds
# %i = command tag
# %c = session id
# %l = session line number
# %s = session start timestamp
# %x = transaction id
# %q = stop here in non-session
# processes
# %% = '%'
# e.g. '<%u%%%d> '
#log_statement = 'none' # none, ddl, mod, all
#log_hostname = off
#---------------------------------------------------------------------------
# RUNTIME STATISTICS
#---------------------------------------------------------------------------
# - Query/Index Statistics Collector -
#stats_command_string = on
#update_process_title = on
#stats_block_level = off
track_counts = on
#stats_reset_on_server_start = off # (change requires restart)
# - Statistics Monitoring -
#log_parser_stats = off
#log_planner_stats = off
#log_executor_stats = off
#log_statement_stats = off
#---------------------------------------------------------------------------
# AUTOVACUUM PARAMETERS
#---------------------------------------------------------------------------
autovacuum = on # enable autovacuum subprocess?
# 'on' requires stats_start_collector
# and stats_row_level to also be on
#autovacuum_naptime = 1min # time between autovacuum runs
#autovacuum_vacuum_threshold = 500 # min # of tuple updates before
# vacuum
#autovacuum_analyze_threshold = 250 # min # of tuple updates before
# analyze
#autovacuum_vacuum_scale_factor = 0.2 # fraction of rel size before
# vacuum
#autovacuum_analyze_scale_factor = 0.1 # fraction of rel size before
# analyze
#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
# (change requires restart)
#autovacuum_vacuum_cost_delay = -1 # default vacuum cost delay for
# autovacuum, -1 means use
# vacuum_cost_delay
#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
# autovacuum, -1 means use
# vacuum_cost_limit
#---------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
#---------------------------------------------------------------------------
# - Statement Behavior -
#search_path = '"$user",public' # schema names
#default_tablespace = '' # a tablespace name, '' uses
# the default
#check_function_bodies = on
#default_transaction_isolation = 'read committed'
#default_transaction_read_only = off
#statement_timeout = 0 # 0 is disabled
#vacuum_freeze_min_age = 100000000
# - Locale and Formatting -
datestyle = 'iso, mdy'
timezone = GMT # actually, defaults to TZ
# environment setting
#timezone_abbreviations = 'Default' # select the set of available timezone
# abbreviations. Currently, there are
# Default
# Australia
# India
# However you can also create your own
# file in share/timezonesets/.
#extra_float_digits = 0 # min -15, max 2
#client_encoding = 'en_US.UTF-8' # actually, defaults to database
# encoding
# These settings are initialized by initdb -- they might be changed
lc_messages = 'en_US.UTF-8' # locale for system error message
# strings
lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
lc_numeric = 'en_US.UTF-8' # locale for number formatting
lc_time = 'en_US.UTF-8' # locale for time formatting
# - Other Defaults -
#explain_pretty_print = on
#dynamic_library_path = '$libdir'
#local_preload_libraries = ''
#---------------------------------------------------------------------------
# LOCK MANAGEMENT
#---------------------------------------------------------------------------
#deadlock_timeout = 1s
#max_locks_per_transaction = 64 # min 10
# (change requires restart)
# Note: each lock table slot uses ~270 bytes of shared memory, and there are
# max_locks_per_transaction * (max_connections + max_prepared_transactions)
# lock table slots.
#---------------------------------------------------------------------------
# VERSION/PLATFORM COMPATIBILITY
#---------------------------------------------------------------------------
# - Previous Postgres Versions -
#add_missing_from = off
#array_nulls = on
#backslash_quote = safe_encoding # on, off, or safe_encoding
#default_with_oids = off
#escape_string_warning = on
#standard_conforming_strings = off
#regex_flavor = advanced # advanced, extended, or basic
#sql_inheritance = on
# - Other Platforms & Clients -
#transform_null_equals = off
#---------------------------------------------------------------------------
# CUSTOMIZED OPTIONS
#---------------------------------------------------------------------------
#custom_variable_classes = '' # list of custom variable class names

View file

@ -0,0 +1,555 @@
%define CORE_DELTA_SETUP ${WORKSPACE_DIR}/Installer.rpm/delta/setup/updateSetup.sh
%define _component_name awips2-database
%define _component_project_dir awips2.core/Installer.database
%define _component_default_prefix /awips2/database
#
# AWIPS II Database Spec File
#
Name: %{_component_name}
Summary: AWIPS II Database Installation
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
Prefix: %{_component_default_prefix}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-database
provides: awips2-static-user
requires: awips2-postgresql
requires: awips2-psql
requires: awips2-database-configuration
%description
AWIPS II Database Installation - Sets Up The Basic AWIPS II Database, Creating The
Required Tables And Schemas And Populating Static Tables As Needed.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/database
%build
#---------------------------------------------------------------------------#
# Delta-Enabled RPM
#---------------------------------------------------------------------------#
source %{CORE_DELTA_SETUP}
copySetupCore ${RPM_BUILD_ROOT} %{_component_default_prefix}
copyApplicableDeltas ${RPM_BUILD_ROOT} %{_component_name} \
%{_component_project_dir} %{_component_default_prefix}
#---------------------------------------------------------------------------#
PATH_TO_DDL="build.edex/opt/db/ddl"
# Create A Temporary Directory For The SQL Scripts That The Database
# RPM Will Need.
mkdir -p ${RPM_BUILD_ROOT}/awips2/database/sqlScripts
mkdir -p ${RPM_BUILD_ROOT}/awips2/database/sqlScripts/share
mkdir -p ${RPM_BUILD_ROOT}/awips2/database/sqlScripts/share/sql
CONFIG_FILE_TO_INCLUDE="pg_hba.conf"
EXPECTED_PATH_TO_CONFIG="${PATH_TO_DDL}/setup"
KNOWN_CONFIG_DESTINATION="awips2/database/sqlScripts/share/sql"
# Ensure That We Have Access To The Configuration Files Before Continuing.
if [ ! -f ${WORKSPACE_DIR}/${EXPECTED_PATH_TO_CONFIG}/${CONFIG_FILE_TO_INCLUDE} ]; then
echo "The ${CONFIG_FILE_TO_INCLUDE} PostgreSQL Configuration File Can Not Be Found."
echo "Unable To Continue ... Terminating"
exit 1
fi
# Copy The Configuration File
cp -r ${WORKSPACE_DIR}/${EXPECTED_PATH_TO_CONFIG}/${CONFIG_FILE_TO_INCLUDE} \
${RPM_BUILD_ROOT}/${KNOWN_CONFIG_DESTINATION}
# Copy The SQL Scripts That The Database RPM Will Need To The
# Temporary Directory.
DIRS_TO_COPY=('damcat' 'hmdb' 'migrated' 'setup' 'SHEF' 'vtec')
for dir in ${DIRS_TO_COPY[*]};
do
cp -r ${WORKSPACE_DIR}/${PATH_TO_DDL}/${dir}/* \
${RPM_BUILD_ROOT}/awips2/database/sqlScripts/share/sql
done
# All Files To Exclude Are In share/sql/setup
FILES_TO_EXCLUDE=( 'lwpostgis.sql' 'spatial_ref_sys.sql' 'uninstalldb.sh' \
'setup.sh' 'setup_developer.sh' 'setup_server.sh' 'postgresql.conf' )
PATH_TO_EXCLUDE_FILES=${RPM_BUILD_ROOT}/awips2/database/sqlScripts/share/sql
for file in ${FILES_TO_EXCLUDE[*]};
do
if [ -f ${PATH_TO_EXCLUDE_FILES}/${file} ]; then
rm -f ${PATH_TO_EXCLUDE_FILES}/${file}
fi
done
# Copy Two Other Files To The Temporary Share Directory.
cp -r ${WORKSPACE_DIR}/${PATH_TO_DDL}/setup/lwpostgis.sql \
${RPM_BUILD_ROOT}/awips2/database/sqlScripts/share
cp -r ${WORKSPACE_DIR}/${PATH_TO_DDL}/setup/spatial_ref_sys.sql \
${RPM_BUILD_ROOT}/awips2/database/sqlScripts/share
# 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
echo "ERROR: /awips2/data/postgresql.conf does not exist. However, "
echo " the AWIPS II PostgreSQL Configuration RPM is installed. "
echo " If you recently uninstalled awips2-database and purged "
echo " the /awips2/data directory, you will need to re-install "
echo " the AWIPS II PostgreSQL configuration rpm so that the "
echo " postgresql.conf file will be restored."
exit 1
fi
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing the AWIPS II Database Installation...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
POSTGRESQL_INSTALL="/awips2/postgresql"
PSQL_INSTALL="/awips2/psql"
AWIPS2_DATA_DIRECTORY="/awips2/data"
echo -e "\e[1;34m Installation Root = ${RPM_INSTALL_PREFIX}\e[m"
echo -e "\e[1;34m PostgreSQL Install Root = ${POSTGRESQL_INSTALL}\e[m"
echo -e "\e[1;34m PSQL Install Root = ${PSQL_INSTALL}\e[m"
echo -e "\e[1;34m AWIPS II Data Directory = ${AWIPS2_DATA_DIRECTORY}\e[m"
%post
# Get Important Directories Again. Even Exporting Them The First Time Still
# Will Not Make Them Available.
POSTGRESQL_INSTALL="/awips2/postgresql"
PSQL_INSTALL="/awips2/psql"
AWIPS2_DATA_DIRECTORY="/awips2/data"
SHARE_DIR=${RPM_INSTALL_PREFIX}/sqlScripts/share
SQL_SHARE_DIR=${SHARE_DIR}/sql
if [ "${1}" = "2" ]; then
exit 0
fi
function printFailureMessage()
{
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;31m\| AWIPS II Database Installation - FAILED\e[m"
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;31m Check the installation log: /awips2/database/sqlScripts/share/sql/sql_install.log\e[m"
echo ""
if [ -f /awips2/database/sqlScripts/share/sql/sql_install.log ]; then
tail -n 6 /awips2/database/sqlScripts/share/sql/sql_install.log
fi
exit 1
}
echo "--------------------------------------------------------------------------------"
echo "\| Preparing the SQL Scripts..."
echo "--------------------------------------------------------------------------------"
AWIPS_DEFAULT_OWNER="awips"
AWIPS_DEFAULT_USER="awips"
AWIPS_DEFAULT_GROUP="fxalpha"
AWIPS_DEFAULT_PORT="5432"
# This Is The Log File That We Will Use To Log All SQL Interactions.
SQL_LOG=${SQL_SHARE_DIR}/sql_install.log
# SQL Data Directories
METADATA=${AWIPS2_DATA_DIRECTORY}/metadata
IFHS=${AWIPS2_DATA_DIRECTORY}/pgdata_ihfs
MAPS=${AWIPS2_DATA_DIRECTORY}/maps
DAMCAT=${AWIPS2_DATA_DIRECTORY}/damcat
HMDB=${AWIPS2_DATA_DIRECTORY}/hmdb
# Add The PostgreSQL Libraries And The PSQL Libraries To LD_LIBRARY_PATH.
export LD_LIBRARY_PATH=${POSTGRESQL_INSTALL}/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${PSQL_INSTALL}/lib:$LD_LIBRARY_PATH
function is_postgresql_running()
{
NUM_PGSQL_COUNT=`/bin/netstat -l | /bin/grep -c "PGSQL.${AWIPS_DEFAULT_PORT}"`
if [ ${NUM_PGSQL_COUNT} -gt 0 ]; then
echo "--------------------------------------------------------------------------------"
echo "\| Warning - PostgreSQL Is Already Running On Port ${AWIPS_DEFAULT_PORT}."
echo "--------------------------------------------------------------------------------"
printFailureMessage
fi
echo "--------------------------------------------------------------------------------"
echo "\| No Instances of PostgreSQL Were Found On Port ${AWIPS_DEFAULT_PORT}..."
echo "--------------------------------------------------------------------------------"
}
function create_sql_element()
{
# $1 == element
mkdir -p ${1}
update_owner ${1}
}
function update_owner()
{
# $1 == element
chown ${AWIPS_DEFAULT_OWNER} ${1}
chgrp ${AWIPS_DEFAULT_GROUP} ${1}
}
function init_db()
{
# move postgresql.conf in /awips2/data to a temporary location.
if [ -f /awips2/data/postgresql.conf ]; then
mv /awips2/data/postgresql.conf /awips2/
fi
su ${AWIPS_DEFAULT_USER} -c \
"${POSTGRESQL_INSTALL}/bin/initdb --auth=trust --locale=en_US.UTF-8 --pgdata=${AWIPS2_DATA_DIRECTORY} --lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8"
RC=$?
if [ -f /awips2/postgresql.conf ]; then
mv /awips2/postgresql.conf /awips2/data
fi
return ${RC}
}
function control_pg_ctl()
{
# $1 == pg_ctl command
su ${AWIPS_DEFAULT_USER} -c \
"${POSTGRESQL_INSTALL}/bin/pg_ctl ${1} -D ${AWIPS2_DATA_DIRECTORY} -o \"-p ${AWIPS_DEFAULT_PORT}\" -w"
}
function execute_initial_sql_script()
{
# Make The Necessary Replacements In The Script.
perl -p -i -e "s/%{databaseUsername}/${AWIPS_DEFAULT_OWNER}/g" \
${1}
echo ${AWIPS2_DATA_DIRECTORY} | sed 's/\//\\\//g' > .awips2_escape.tmp
AWIPS2_DATA_DIRECTORY_ESCAPED=`cat .awips2_escape.tmp`
rm -f .awips2_escape.tmp
perl -p -i -e "s/%{database_files_home}/${AWIPS2_DATA_DIRECTORY_ESCAPED}/g" \
${1}
# $1 == script to execute
su ${AWIPS_DEFAULT_USER} -c \
"${PSQL_INSTALL}/bin/psql postgres -U ${AWIPS_DEFAULT_USER} -q -p ${AWIPS_DEFAULT_PORT} -f ${1}" \
> ${SQL_LOG} 2>&1
}
function update_lwpostgis()
{
echo ${POSTGRESQL_INSTALL} | sed 's/\//\\\//g' > .awips2_escape.tmp
POSTGRESQL_INSTALL_ESCAPED=`cat .awips2_escape.tmp`
rm -f .awips2_escape.tmp
perl -p -i -e "s/%{INSTALL_PATH}%/${POSTGRESQL_INSTALL_ESCAPED}/g" \
${SHARE_DIR}/lwpostgis.sql
}
function update_createMapsDb()
{
echo ${AWIPS2_DATA_DIRECTORY} | sed 's/\//\\\//g' > .awips2_escape.tmp
AWIPS2_DATA_DIRECTORY_ESCAPED=`cat .awips2_escape.tmp`
rm -f .awips2_escape.tmp
perl -p -i -e "s/%{database_files_home}%/${AWIPS2_DATA_DIRECTORY_ESCAPED}/g" \
${SQL_SHARE_DIR}/createMapsDb.sql
}
function update_createDamcat()
{
echo ${AWIPS2_DATA_DIRECTORY} | sed 's/\//\\\//g' > .awips2_escape.tmp
AWIPS2_DATA_DIRECTORY_ESCAPED=`cat .awips2_escape.tmp`
rm -f .awips2_escape.tmp
perl -p -i -e "s/%{database_files_home}%/${AWIPS2_DATA_DIRECTORY_ESCAPED}/g" \
${SQL_SHARE_DIR}/createDamcat.sql
}
function update_createHMDB()
{
echo ${AWIPS2_DATA_DIRECTORY} | sed 's/\//\\\//g' > .awips2_escape.tmp
AWIPS2_DATA_DIRECTORY_ESCAPED=`cat .awips2_escape.tmp`
rm -f .awips2_escape.tmp
perl -p -i -e "s/%{database_files_home}%/${AWIPS2_DATA_DIRECTORY_ESCAPED}/g" \
${SQL_SHARE_DIR}/createHMDB.sql
}
function execute_psql_sql_script()
{
# $1 == script to execute
# $2 == database
su ${AWIPS_DEFAULT_USER} -c \
"${PSQL_INSTALL}/bin/psql -d ${2} -U ${AWIPS_DEFAULT_USER} -q -p ${AWIPS_DEFAULT_PORT} -f ${1}" \
>> ${SQL_LOG} 2>&1
}
function copy_addl_config()
{
rm -f ${AWIPS2_DATA_DIRECTORY}/pg_hba.conf
cp ${SQL_SHARE_DIR}/pg_hba.conf ${AWIPS2_DATA_DIRECTORY}/pg_hba.conf
update_owner ${AWIPS2_DATA_DIRECTORY}/pg_hba.conf
}
echo "--------------------------------------------------------------------------------"
echo "\| Determining If PostgreSQL Is Running..."
echo "--------------------------------------------------------------------------------"
is_postgresql_running
echo ""
echo "--------------------------------------------------------------------------------"
echo "\| Initializing the Database and Starting the Service..."
echo "--------------------------------------------------------------------------------"
init_db
RC="$?"
if [ ! "${RC}" = "0" ]; then
echo "--------------------------------------------------------------------------------"
echo "\| ERROR - INITDB HAS FAILED."
echo "--------------------------------------------------------------------------------"
printFailureMessage
fi
echo "--------------------------------------------------------------------------------"
echo "\| Copying Configuration Files and Setting Up SQL..."
echo "--------------------------------------------------------------------------------"
echo "--------------------------------------------------------------------------------"
echo "\| Creating a Directory for the metadata Tablespace..."
echo "--------------------------------------------------------------------------------"
create_sql_element ${METADATA}
echo "--------------------------------------------------------------------------------"
echo "\| Creating a Directory for the ihfs Tablespace..."
echo "--------------------------------------------------------------------------------"
create_sql_element ${IFHS}
echo "--------------------------------------------------------------------------------"
echo "\| Creating a Directory for the damcat Tablespace..."
echo "--------------------------------------------------------------------------------"
create_sql_element ${DAMCAT}
echo "--------------------------------------------------------------------------------"
echo "\| Creating a Directory for the hmdb Tablespace..."
echo "--------------------------------------------------------------------------------"
create_sql_element ${HMDB}
echo ""
echo "--------------------------------------------------------------------------------"
echo "\| Starting PostgreSQL..."
echo "--------------------------------------------------------------------------------"
control_pg_ctl "start"
RC="$?"
# Ensure that the database started.
if [ ! "${RC}" = "0" ]; then
echo "--------------------------------------------------------------------------------"
echo "\| ERROR - UNABLE TO START THE POSTGRESQL SERVER."
echo "--------------------------------------------------------------------------------"
printFailureMessage
fi
echo ""
echo "--------------------------------------------------------------------------------"
echo "\| Run the Initial SQL Script..."
echo "--------------------------------------------------------------------------------"
execute_initial_sql_script ${SQL_SHARE_DIR}/initial_setup_server.sql
update_lwpostgis
echo "--------------------------------------------------------------------------------"
echo "\| Spatially Enabling the metadata Database..."
echo "--------------------------------------------------------------------------------"
execute_psql_sql_script ${SHARE_DIR}/lwpostgis.sql metadata
execute_psql_sql_script ${SHARE_DIR}/spatial_ref_sys.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/permissions.sql metadata
echo "--------------------------------------------------------------------------------"
echo "\| Creating station Table..."
echo "--------------------------------------------------------------------------------"
execute_psql_sql_script ${SQL_SHARE_DIR}/create_subscription_tables.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/fxatext.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/afoslookup.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/bit_table.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/collective.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/national_category.sql metadata
echo "--------------------------------------------------------------------------------"
echo "\| Creating shef Tables..."
echo "--------------------------------------------------------------------------------"
execute_psql_sql_script ${SQL_SHARE_DIR}/hd_ob83oax.sql metadata
update_createDamcat
echo "--------------------------------------------------------------------------------"
echo "\| Creating damcat Tables..."
echo "--------------------------------------------------------------------------------"
execute_psql_sql_script ${SQL_SHARE_DIR}/createDamcat.sql postgres
execute_psql_sql_script ${SQL_SHARE_DIR}/dcob7oax.sql dc_ob7oax
execute_psql_sql_script ${SQL_SHARE_DIR}/populateDamcatDatabase.sql dc_ob7oax
update_createHMDB
su ${AWIPS_DEFAULT_USER} -c \
"${SQL_SHARE_DIR}/createHMDB.sh ${PSQL_INSTALL} ${AWIPS_DEFAULT_PORT} ${AWIPS_DEFAULT_USER} ${SQL_SHARE_DIR} ${SQL_LOG}"
echo "--------------------------------------------------------------------------------"
echo "\| Creating VTEC Tables..."
echo "--------------------------------------------------------------------------------"
execute_psql_sql_script ${SQL_SHARE_DIR}/vtec_initial_setup.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/create_p_vtec_tables.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/populate_p_vtec_tables.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/populate_vtec_events_table.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/populate_vtec_afos_product_table.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/populate_event_product_index.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/populate_vtec_event_tracking_table.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/create_h_vtec_tables.sql metadata
execute_psql_sql_script ${SQL_SHARE_DIR}/populate_h_vtec_tables.sql metadata
echo ""
echo "--------------------------------------------------------------------------------"
echo "\| Stopping PostgreSQL..."
echo "--------------------------------------------------------------------------------"
control_pg_ctl "stop"
echo ""
echo "--------------------------------------------------------------------------------"
echo "\| Copy Additional Configuration Files..."
echo "--------------------------------------------------------------------------------"
copy_addl_config
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II Database Installation - COMPLETE\e[m"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
%preun
if [ "${1}" = "1" ]; then
exit 0
fi
# Ensure that our data directory exists.
if [ ! -d /awips2/data ]; then
exit 0
fi
# We Need PostgreSQL
POSTGRESQL_INSTALL="/awips2/postgresql"
PSQL_INSTALL="/awips2/psql"
POSTMASTER="${POSTGRESQL_INSTALL}/bin/postmaster"
if [ ! -f ${POSTMASTER} ]; then
exit 0
fi
PG_CTL="${POSTGRESQL_INSTALL}/bin/pg_ctl"
if [ ! -f ${PG_CTL} ]; then
exit 0
fi
DROPDB="${POSTGRESQL_INSTALL}/bin/dropdb"
if [ ! -f ${DROPDB} ]; then
exit 0
fi
PG_RESTORE="${POSTGRESQL_INSTALL}/bin/pg_restore"
if [ ! -f ${PG_RESTORE} ]; then
exit 0
fi
PSQL="${PSQL_INSTALL}/bin/psql"
if [ ! -f ${PSQL} ]; then
exit 0
fi
# Determine who owns the PostgreSQL Installation
DB_OWNER=`ls -l /awips2/ | grep -w 'data' | awk '{print $3}'`
# Our log file
SQL_LOG="${RPM_INSTALL_PREFIX}/static/database.maps/maps.log"
# Determine if PostgreSQL is running.
I_STARTED_POSTGRESQL="N"
su ${DB_OWNER} -c \
"${PG_CTL} status -D /awips2/data > /dev/null 2>&1"
RC="$?"
if [ ! "${RC}" = "0" ]; then
echo "--------------------------------------------------------------------------------"
echo "\| Starting PostgreSQL As User - ${DB_OWNER}..."
echo "--------------------------------------------------------------------------------"
su ${DB_OWNER} -c \
"${POSTMASTER} -D /awips2/data > /dev/null 2>&1 &"
RC="$?"
if [ ! "${RC}" = "0" ]; then
echo "Failed To Start The PostgreSQL Server."
exit 1
fi
# Give PostgreSQL Time To Start.
sleep 10
I_STARTED_POSTGRESQL="Y"
echo ""
fi
# Drop Databases The Official PostgreSQL Way. The User Is Responsible
# For Cleaning Up The Data Directory That Was Given To: 'initdb'.
DBS_TO_DROP=( 'dc_ob7oax' 'fxatext' 'hd_ob83oax' 'hmdb' 'metadata' )
TBS_TO_DROP=( 'damcat' 'hmdb' 'metadata' 'pgdata_ihfs' )
# Attempt To Drop The Databases In Our List ...
for db in ${DBS_TO_DROP[*]};
do
echo "Dropping Database ... ${db}"
su ${DB_OWNER} -c \
"${DROPDB} -U awips ${db}"
done
echo ""
# Attempt To Drop The Tablespaces In Our List ...
for tb in ${TBS_TO_DROP[*]};
do
echo "Dropping Tablespace ... ${tb}"
TB_DIR=`${PSQL} -U awips -d postgres -c "\db" | grep ${tb} | awk '{print $5}'`
su ${DB_OWNER} -c \
"${PSQL} -U awips -d postgres -c \"DROP TABLESPACE ${tb}\""
# remove the tablespace directory.
echo "Attempting To Remove Directory: ${TB_DIR}"
if [ -d "${TB_DIR}" ]; then
su ${DB_OWNER} -c "rmdir ${TB_DIR}"
fi
done
# Attempt To Stop PostgreSQL (If We Started It)
if [ "${I_STARTED_POSTGRESQL}" = "Y" ]; then
echo ""
su ${DB_OWNER} -c \
"${PG_CTL} stop -D /awips2/data"
fi
%postun
if [ "${1}" = "1" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| The AWIPS II Database Installation Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
%files
%defattr(644,awips,fxalpha,755)
#---------------------------------------------------------------------------#
# Delta-Enabled RPM
#---------------------------------------------------------------------------#
%dir %{_component_default_prefix}/delta
%attr(700,root,root) %{_component_default_prefix}/delta/updateManager.sh
%attr(700,root,root) %{_component_default_prefix}/delta/createUpdateRegistry.sh
%{_component_default_prefix}/delta/%{_component_name}
#---------------------------------------------------------------------------#
%dir /awips2
%dir /awips2/database
%dir /awips2/database/sqlScripts
%dir /awips2/database/sqlScripts/share
/awips2/database/sqlScripts/share/sql/sql_install.log
/awips2/database/sqlScripts/share/sql/pg_hba.conf
%defattr(755,awips,fxalpha,755)
/awips2/database/sqlScripts/share/*.sql
%dir /awips2/database/sqlScripts/share/sql
/awips2/database/sqlScripts/share/sql/*.sql
/awips2/database/sqlScripts/share/sql/*.sh

View file

@ -0,0 +1,27 @@
#!/bin/bash
export DELTA_BUILD="11.4"
export DELTA_ID="updateA2_32211_acars1"
export DELTA_DESC="drop acarssoundinglayer and acarssounding tables due to schema change"
export DELTA_RUN_USER="awips"
function runUpdate()
{
local PSQL_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}\n' awips2-psql`
local PSQL="${PSQL_INSTALL}/bin/psql -U awips -d metadata -c"
# Drop acarssoundinglayer
${PSQL} "drop table acarssoundinglayer;" > /dev/null 2>&1
# Drop acarssounding
${PSQL} "drop table acarssounding;" > /dev/null 2>&1
# Update plugin_info
${PSQL} "update plugin_info set initialized=false where name='acarssounding';" > /dev/null 2>&1
return 0
}

View file

@ -0,0 +1,37 @@
#!/bin/bash
export DELTA_BUILD="11.4"
export DELTA_ID="update_32811_gfe"
export DELTA_DESC="purge existing gfe hdf5 files; uninitialize gfe in plugin_info."
export DELTA_RUN_USER="awips"
function runUpdate()
{
local PSQL_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}\n' awips2-psql`
local PSQL="${PSQL_INSTALL}/bin/psql -U awips -d metadata -c"
local HDF5_DIR="/awips2/edex/data/hdf5/gfe"
# remove existing gfe hdf5 files
cd ${HDF5_DIR}
local COUNT=`ls -1 | wc -l`
if [ "${COUNT}" -gt 0 ]; then
for dir in `ls -1 ${HDF5_DIR}`;
do
if [ ! "${dir}" = "climo" ] &&
[ ! "${dir}" = "hlsTopo" ]; then
if [ -d ${HDF5_DIR}/${dir} ]; then
rm -rf ${HDF5_DIR}/${dir}/*
fi
fi
done
fi
# re-initialize plugin_info
${PSQL} "UPDATE plugin_info SET initialized='False' WHERE name='gfe';" > /dev/null 2>&1
return 0
}

View file

@ -0,0 +1,79 @@
#!/bin/bash
export DELTA_BUILD="11.4"
export DELTA_ID="updateA2_DR2469_purge"
export DELTA_DESC="remove unused columns in plugin_info and purge satellite, sfcobs, bufrsigwx, and bufrmos tables"
export DELTA_RUN_USER="awips"
function runUpdate()
{
local HDF5_DIR="/awips2/edex/data/hdf5"
# find psql.
local PSQL_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}\n' awips2-psql`
local PSQL="${PSQL_INSTALL}/bin/psql -U awips -d metadata -c"
################################################################
# Remove the unused columns from the plugin_info table
################################################################
${PSQL} "ALTER TABLE awips.plugin_info DROP COLUMN version;"
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 1
fi
${PSQL} "ALTER TABLE awips.plugin_info DROP COLUMN retentiontime;"
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 1
fi
################################################################
# Delete all satellite data due to HDF5 path changes
################################################################
${PSQL} "DELETE FROM awips.satellite;"
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 1
fi
rm -rf ${HDF5_DIR}/satellite
################################################################
# Delete all sfcobs data due to HDF5 path changes
################################################################
${PSQL} "DELETE FROM awips.sfcobs;"
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 1
fi
rm -rf ${HDF5_DIR}/sfcobs
################################################################
# Delete all bufrsigwx data due to HDF5 path changes
################################################################
${PSQL} "DELETE FROM awips.bufrsigwx;"
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 1
fi
rm -rf ${HDF5_DIR}/bufrsigwx
################################################################
# Delete all bufrmos data due to HDF5 path changes
################################################################
${PSQL} "DELETE FROM awips.bufrmos;"
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 1
fi
rm -rf ${HDF5_DIR}/bufrmos
################################################################
# Rename grib files
################################################################
cd ${HDF5_DIR}/grib
find . -name "*.h5" -exec bash -c "mv \$1 \`echo \$1 | sed s/00-FH-/-FH-/\`" -- {} \;
return 0
}

View file

@ -0,0 +1,18 @@
#!/bin/bash
export DELTA_BUILD="11.4"
export DELTA_ID="updateA2_DR7018_ActiveTable1"
export DELTA_DESC="Expand ActiveTableRecord.overviewtext hibernate field."
export DELTA_RUN_USER="awips"
function runUpdate()
{
local PSQL_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}\n' awips2-psql`
local PSQL="${PSQL_INSTALL}/bin/psql -U awips -d metadata -c" > /dev/null 2>&1
${PSQL} "ALTER TABLE activetable ALTER COLUMN overviewtext TYPE text;"
return 0
}

View file

@ -0,0 +1,18 @@
#!/bin/bash
export DELTA_BUILD="11.4"
export DELTA_ID="updateA2_DR7018_Warning1"
export DELTA_DESC="Expand WarningRecord.overviewtext hibernate field."
export DELTA_RUN_USER="awips"
function runUpdate()
{
local PSQL_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}\n' awips2-psql`
local PSQL="${PSQL_INSTALL}/bin/psql -U awips -d metadata -c" > /dev/null 2>&1
${PSQL} "ALTER TABLE warning ALTER COLUMN overviewtext TYPE text;"
return 0
}

View file

@ -0,0 +1,42 @@
#!/bin/bash
export DELTA_BUILD="11.4"
export DELTA_ID="updateA2_pilDelta_purge"
export DELTA_DESC="remove old-style subscription tables"
export DELTA_RUN_USER="awips"
function runUpdate()
{
#find pgsql
local PSQL_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}\n' awips2-psql`
local PSQL="${PSQL_INSTALL}/bin/psql -U awips -d metadata -c"
################################################################
# Remove the static table.
################################################################
${PSQL} "DROP TABLE IF EXISTS subscription.static;"
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 1
fi
################################################################
# Remove the replacements table.
################################################################
${PSQL} "DROP TABLE IF EXISTS subscription.replacements;"
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 1
fi
################################################################
# Remove the subscriptions table.
################################################################
${PSQL} "DROP TABLE IF EXISTS subscription.subscriptions;"
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 1
fi
return 0
}

View file

@ -0,0 +1,128 @@
#
# AWIPS II gfe.climo Spec File
#
Name: awips2-data.hdf5-gfe.climo
Summary: AWIPS II gfe.climo Distribution
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
Prefix: /awips2/edex
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-data.hdf5-gfe.climo
%description
AWIPS II gfe.climo Distribution - Contains the AWIP II gfe climo HDF Files. The
gfe climo Files Will Be Copied To The Specified Destination.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/hdf5/gfe/climo
%build
%install
# Copies the standard Raytheon licenses into a license directory for the
# current component.
function copyLegal()
{
# $1 == Component Build Root
COMPONENT_BUILD_DIR=${1}
mkdir -p ${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
# Create a Tar file with our FOSS licenses.
tar -cjf ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar \
${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses/
cp ${WORKSPACE_DIR}/Installer.rpm/legal/license.txt \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp "${WORKSPACE_DIR}/Installer.rpm/legal/Master Rights File.pdf" \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
rm -f ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar
}
# Determine which version of the climo we should use.
RPM_COMMON_DIR="${WORKSPACE_DIR}/Installer.rpm/common/static.versions"
if [ ! -f ${RPM_COMMON_DIR}/LATEST.climo ]; then
file ${RPM_COMMON_DIR}/LATEST.climo
exit 1
fi
VERSION_DIR=`cat ${RPM_COMMON_DIR}/LATEST.climo`
GFE_CLIMO_SRC_DIR="${AWIPSCM_SHARE}/awips2-static/climo/${VERSION_DIR}"
if [ ! -d ${GFE_CLIMO_SRC_DIR} ]; then
file ${GFE_CLIMO_SRC_DIR}
exit 1
fi
cp -rv ${GFE_CLIMO_SRC_DIR}/${climoFile}/* \
${RPM_BUILD_ROOT}/awips2/edex/data/hdf5/gfe/climo
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
copyLegal "awips2/edex/data/hdf5/gfe/climo"
%pre
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing the AWIPS II gfe.climo 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/gfe/climo\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 gfe.climo 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 gfe.climo Distribution Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/edex
%dir /awips2/edex/data
%dir /awips2/edex/data/hdf5
%dir /awips2/edex/data/hdf5/gfe
%dir /awips2/edex/data/hdf5/gfe/climo
/awips2/edex/data/hdf5/gfe/climo/*
%docdir /awips2/edex/data/hdf5/gfe/climo/licenses
%dir /awips2/edex/data/hdf5/gfe/climo/licenses
/awips2/edex/data/hdf5/gfe/climo/licenses/*

View file

@ -0,0 +1,77 @@
#
# AWIPS II gfesuite client Spec File
#
Name: awips2-gfesuite-client
Summary: AWIPS II gfesuite client Installation
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
BuildArch: noarch
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-gfesuite-client
requires: awips2-python
requires: awips2-cave
%description
AWIPS II gfesuite-client Installation - Contains The AWIPS II gfesuite-client Component.
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
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
echo "ERROR: Unable to find the awips2-ant executable."
exit 1
fi
%install
GFESUITE_PROJECT="com.raytheon.uf.tools.gfesuite"
GFESUITE_DEPLOY_SCRIPT="${WORKSPACE_DIR}/${GFESUITE_PROJECT}/deploy.xml"
ANT_EXE="/awips2/ant/bin/ant"
${ANT_EXE} -f ${GFESUITE_DEPLOY_SCRIPT} -Dinstall.dir=${RPM_BUILD_ROOT}/awips2/GFESuite \
-Dinstaller=true -Dclient.build=true
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: ant failed."
exit 1
fi
# Copy the profile.d scripts.
PROFILE_D_DIR="Installer.rpm/common/environment/awips2-gfesuite/profile.d"
cp ${WORKSPACE_DIR}/${PROFILE_D_DIR}/* ${RPM_BUILD_ROOT}/etc/profile.d
%files
%defattr(644,root,root,-)
/etc/profile.d/*
%defattr(644,awips,fxalpha,755)
%dir /awips2
%dir /awips2/GFESuite
/awips2/GFESuite/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/GFESuite/bin
/awips2/GFESuite/bin/*
%defattr(644,awips,fxalpha,755)
%dir /awips2/GFESuite/bin/src
/awips2/GFESuite/bin/src/*

View file

@ -0,0 +1,81 @@
#
# AWIPS II gfesuite server Spec File
#
Name: awips2-gfesuite-server
Summary: AWIPS II gfesuite server Installation
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
BuildArch: noarch
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-gfesuite-server
requires: awips2-python
requires: awips2-edex-gfe
%description
AWIPS II gfesuite-client Installation - Contains The AWIPS II gfesuite-server Component.
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
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
echo "ERROR: Unable to find the awips2-ant executable."
exit 1
fi
%install
GFESUITE_PROJECT="com.raytheon.uf.tools.gfesuite"
GFESUITE_DEPLOY_SCRIPT="${WORKSPACE_DIR}/${GFESUITE_PROJECT}/deploy.xml"
ANT_EXE="/awips2/ant/bin/ant"
${ANT_EXE} -f ${GFESUITE_DEPLOY_SCRIPT} -Dinstall.dir=${RPM_BUILD_ROOT}/awips2/GFESuite \
-Dinstaller=true
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: ant failed."
exit 1
fi
# Copy the profile.d scripts.
PROFILE_D_DIR="Installer.rpm/common/environment/awips2-gfesuite/profile.d"
cp ${WORKSPACE_DIR}/${PROFILE_D_DIR}/* ${RPM_BUILD_ROOT}/etc/profile.d
%files
%defattr(644,root,root,-)
/etc/profile.d/*
%defattr(644,awips,fxalpha,755)
%dir /awips2
%dir /awips2/GFESuite
/awips2/GFESuite/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/GFESuite/bin
/awips2/GFESuite/bin/*
%defattr(644,awips,fxalpha,755)
%dir /awips2/GFESuite/bin/src
/awips2/GFESuite/bin/src/*
%defattr(755,awips,fxalpha,777)
%dir /awips2/GFESuite/ServiceBackup/scripts
/awips2/GFESuite/ServiceBackup/scripts/*
%config(noreplace) /awips2/GFESuite/ServiceBackup/configuration/svcbu.properties

View file

@ -0,0 +1,126 @@
#!/bin/bash
#
# httpd Startup script for the Apache HTTP Server used by Pypies
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI. Pypies uses it to serve connections.
# processname: httpd
# config: /etc/httpd/conf/httpd.conf
# config: /etc/sysconfig/httpd
# pidfile: /var/run/httpd.pid
# Source function library.
. /etc/rc.d/init.d/functions
if [ -f /etc/sysconfig/httpd ]; then
. /etc/sysconfig/httpd
fi
# Start httpd in the C locale by default.
HTTPD_LANG=${HTTPD_LANG-"C"}
# This will prevent initlog from swallowing up a pass-phrase prompt if
# mod_ssl needs a pass-phrase from the user.
INITLOG_ARGS=""
# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
# with the thread-based "worker" MPM; BE WARNED that some modules may not
# work correctly with a thread-based MPM; notably PHP will refuse to start.
# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/awips2/httpd_pypies/usr/sbin/apachectl
httpd=${HTTPD-/awips2/httpd_pypies/usr/sbin/httpd}
prog=httpd
pidfile=${PIDFILE-/awips2/httpd_pypies/var/run/httpd.pid}
lockfile=${LOCKFILE-/awips2/httpd_pypies/var/lock/subsys/httpd}
RETVAL=0
# check for 1.3 configuration
check13 () {
CONFFILE=/awips2/httpd_pypies/etc/httpd/conf/httpd.conf
GONE="(ServerType|BindAddress|Port|AddModule|ClearModuleList|"
GONE="${GONE}AgentLog|RefererLog|RefererIgnore|FancyIndexing|"
GONE="${GONE}AccessConfig|ResourceConfig)"
if LANG=C grep -Eiq "^[[:space:]]*($GONE)" $CONFFILE; then
echo
echo 1>&2 " Apache 1.3 configuration directives found"
echo 1>&2 " please read @docdir@/migration.html"
failure "Apache 1.3 config directives test"
echo
exit 1
fi
}
# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure. So we just do it the way init scripts
# are expected to behave here.
start() {
echo -n $"Starting $prog: "
check13 || exit 1
LANG=$HTTPD_LANG daemon $httpd $OPTIONS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch ${lockfile}
return $RETVAL
}
# When stopping httpd a delay of >10 second is required before SIGKILLing the
# httpd parent; this gives enough time for the httpd parent to SIGKILL any
# errant children.
stop() {
echo -n $"Stopping $prog: "
killproc -d 10 $httpd
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}
reload() {
echo -n $"Reloading $prog: "
if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; then
RETVAL=$?
echo $"not reloading due to configuration syntax error"
failure $"not reloading $httpd due to configuration syntax error"
else
killproc $httpd -HUP
RETVAL=$?
fi
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $httpd
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f ${pidfile} ] ; then
stop
start
fi
;;
reload)
reload
;;
graceful|help|configtest|fullstatus)
$apachectl $@
RETVAL=$?
;;
*)
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
exit 1
esac
exit $RETVAL

View file

@ -0,0 +1,8 @@
/awips2/httpd_pypies/var/log/httpd/*log {
missingok
notifempty
sharedscripts
postrotate
/sbin/service httpd-pypies reload > /dev/null 2>/dev/null || true
endscript
}

View file

@ -0,0 +1,864 @@
%define contentdir /var/www
%define suexec_caller apache
%define mmn 20051115
%define vstring CentOS
%define distro CentOS
Summary: Pypies Apache HTTP Server
Name: awips2-httpd-pypies
Version: 2.2.3
# This Is Officially Release: 22%{?dist}
Release: 27%{?dist}
URL: http://httpd.apache.org/
Prefix: /awips2/httpd_pypies
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
Source1: centos_index.html
Source3: httpd-pypies.logrotate
Source4: httpd-pypies.init
Source5: httpd.sysconf
Source8: centos_powered_by_rh.png
Source10: httpd.conf
Source11: ssl.conf
Source12: welcome.conf
Source13: manual.conf
Source14: proxy_ajp.conf
# Documentation
Source30: migration.xml
Source31: migration.css
Source32: html.xsl
Source33: README.confd
# build/scripts patches
Patch1: httpd-2.1.10-apctl.patch
Patch2: httpd-2.1.10-apxs.patch
Patch3: httpd-2.0.45-deplibs.patch
Patch4: httpd-2.1.10-disablemods.patch
Patch5: httpd-2.1.10-layout.patch
Patch6: httpd-2.2.2-ac260.patch
# Features/functional changes
Patch20: httpd-2.0.48-release.patch
Patch21: httpd-2.0.40-xfsz.patch
Patch22: httpd-2.1.10-pod.patch
Patch23: httpd-2.0.45-export.patch
Patch24: httpd-2.0.48-corelimit.patch
Patch25: httpd-2.0.54-selinux.patch
Patch26: httpd-2.2.3-proxysessid.patch
Patch27: httpd-2.2.3-proxypmatch.patch
Patch28: httpd-2.2.3-nbchunk.patch
# Bug fixes
Patch50: httpd-2.0.45-encode.patch
Patch54: httpd-2.2.0-authnoprov.patch
Patch55: httpd-2.2.3-proxyopt.patch
Patch56: httpd-2.2.3-proxyoride.patch
Patch57: httpd-2.0.52-logresline.patch
Patch58: httpd-2.2.3-ldappool.patch
Patch59: httpd-2.2.3-ssldynlock.patch
Patch60: httpd-2.0.52-escaperrs.patch
Patch61: httpd-2.2.3-eventdlock.patch
Patch62: httpd-2.2.3-hdrsedit.patch
Patch63: httpd-2.2.3-dummyreq.patch
# Security Fixes
Patch100: httpd-2.2.3-CVE-2006-5752.patch
Patch101: httpd-2.2.3-CVE-2007-1863.patch
Patch102: httpd-2.2.3-CVE-2007-3304.patch
Patch103: httpd-2.2.3-CVE-2007-3847.patch
Patch104: httpd-2.2.3-CVE-2007-5000.patch
Patch105: httpd-2.2.3-CVE-2007-4465.patch
Patch106: httpd-2.2.3-CVE-2007-6421.patch
Patch107: httpd-2.2.3-CVE-2007-6422.patch
Patch108: httpd-2.2.3-CVE-2007-6388.patch
Patch109: httpd-2.2.3-prftpcset.patch
Patch110: httpd-2.2.3-CVE-2007-3304-update.patch
Patch111: httpd-2.2.3-CVE-2008-2939.patch
# Rebases
Patch200: httpd-2.2.3-proxy229.patch
Patch201: httpd-2.2.3-cache229.patch
License: Apache Software License
Group: AWIPSII
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: autoconf, perl, pkgconfig, xmlto >= 0.0.11, findutils
BuildRequires: db4-devel, expat-devel, zlib-devel, libselinux-devel
BuildRequires: apr-devel >= 1.2.0, apr-util-devel >= 1.2.0, pcre-devel >= 5.0,
Requires: /etc/mime.types, gawk, /usr/share/magic.mime, /usr/bin/find
Requires: initscripts >= 8.36
Obsoletes: httpd-suexec
Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv
Prereq: sh-utils, textutils, /usr/sbin/useradd
Provides: webserver
Provides: httpd-mmn = %{mmn}
Obsoletes: apache, secureweb, mod_dav, mod_gzip, stronghold-apache, stronghold-htdocs
Obsoletes: mod_put, mod_roaming, mod_jk
Conflicts: pcre < 4.0
%description
The Apache HTTP Server is a powerful, efficient, and extensible
web server.
%package devel
Group: AWIPSII
Summary: Development tools for the Apache HTTP server.
Obsoletes: secureweb-devel, apache-devel, stronghold-apache-devel
Requires: apr-devel, apr-util-devel, pkgconfig
Requires: httpd = %{version}-%{release}
%description devel
The httpd-devel package contains the APXS binary and other files
that you need to build Dynamic Shared Objects (DSOs) for the
Apache HTTP Server.
If you are installing the Apache HTTP server and you want to be
able to compile or develop additional modules for Apache, you need
to install this package.
%package manual
Group: AWIPSII
Summary: Documentation for the Apache HTTP server.
Requires: httpd = %{version}-%{release}
Obsoletes: secureweb-manual, apache-manual
%description manual
The httpd-manual package contains the complete manual and
reference guide for the Apache HTTP server. The information can
also be found at http://httpd.apache.org/docs/2.2/.
%package -n mod_ssl
Group: AWIPSII
Summary: SSL/TLS module for the Apache HTTP server
Epoch: 1
BuildRequires: openssl-devel, distcache-devel
Requires(post): openssl >= 0.9.7f-4, /bin/cat
Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmn}
Obsoletes: stronghold-mod_ssl
%description -n mod_ssl
The mod_ssl module provides strong cryptography for the Apache Web
server via the Secure Sockets Layer (SSL) and Transport Layer
Security (TLS) protocols.
%prep
%setup -q -n httpd-2.2.3
%patch1 -p1 -b .apctl
%patch2 -p1 -b .apxs
%patch3 -p1 -b .deplibs
%patch4 -p1 -b .disablemods
%patch5 -p1 -b .layout
%patch6 -p1 -b .ac260
%patch21 -p0 -b .xfsz
%patch22 -p1 -b .pod
%patch23 -p1 -b .export
%patch24 -p1 -b .corelimit
%patch25 -p1 -b .selinux
%patch26 -p1 -b .proxysessid
%patch27 -p1 -b .proxypmatch
%patch28 -p1 -b .nbchunk
# no -b to prevent droplets in install root
%patch50 -p1
%patch54 -p1 -b .authnoprov
%patch55 -p1 -b .proxyopt
%patch56 -p1 -b .proxyoride
%patch57 -p1 -b .logresline
%patch58 -p1 -b .ldappool
%patch59 -p1 -b .ssldynlock
%patch60 -p1 -b .escaperrs
%patch61 -p1 -b .eventdlock
%patch62 -p1 -b .hdrsedit
%patch63 -p1 -b .dummyreq
%patch100 -p1 -b .cve5752
%patch101 -p1 -b .cve1853
%patch102 -p1 -b .cve3304
%patch103 -p1 -b .cve3847
%patch104 -p1 -b .cve5000
%patch105 -p1 -b .cve4465
%patch106 -p1 -b .cve6421
%patch107 -p1 -b .cve6422
%patch108 -p1 -b .cve6388
%patch109 -p1 -b .prftpcset
%patch110 -p1 -b .cve3304-update
%patch111 -p1 -b .cve2939
# Rebases -- any changes to proxy/cache modules must come later:
%patch200 -p1 -b .proxy229
%patch201 -p1 -b .cache229
# Patch in vendor/release string
sed "s/@VENDOR@/%{vstring}/;s/@RELEASE@/%{release}/" < %{PATCH20} | patch -p1 -b -z .release
# Safety check: prevent build if defined MMN does not equal upstream MMN.
vmmn=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include include/ap_mmn.h | sed -n '/^2/p'`
if test "x${vmmn}" != "x%{mmn}"; then
: Error: Upstream MMN is now ${vmmn}, packaged MMN is %{mmn}.
: Update the mmn macro and rebuild.
exit 1
fi
: Building for '%{distro}' with MMN %{mmn} and vendor string '%{vstring}'
%build
# forcibly prevent use of bundled apr, apr-util, pcre
rm -rf srclib/{apr,apr-util,pcre}
# regenerate configure scripts
autoheader && autoconf || exit 1
# Limit size of CHANGES to recent history
echo '1,/Changes with Apache MPM/wq' | ed CHANGES
# Before configure; fix location of build dir in generated apxs
%{__perl} -pi -e "s:\@exp_installbuilddir\@:/awips2/httpd_pypies%{_libdir}/httpd/build:g" \
support/apxs.in
# update location of migration guide in apachectl
%{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \
support/apachectl.in
# Build the migration guide
sed 's/@DISTRO@/%{distro}/' < $RPM_SOURCE_DIR/migration.xml > migration.xml
xmlto -x $RPM_SOURCE_DIR/html.xsl html-nochunks migration.xml
cp $RPM_SOURCE_DIR/migration.css . # make %%doc happy
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
SH_LDFLAGS="-Wl,-z,relro"
export CFLAGS SH_LDFLAGS
# Hard-code path to links to avoid unnecessary builddep
export LYNX_PATH=/usr/bin/links
function mpmbuild()
{
mpm=$1; shift
mkdir $mpm; pushd $mpm
../configure \
--prefix=/awips2/httpd_pypies%{_sysconfdir}/httpd \
--exec-prefix=/awips2/httpd_pypies%{_prefix} \
--bindir=/awips2/httpd_pypies%{_bindir} \
--sbindir=/awips2/httpd_pypies%{_sbindir} \
--mandir=/awips2/httpd_pypies/%{_mandir} \
--libdir=/awips2/httpd_pypies%{_libdir} \
--sysconfdir=/awips2/httpd_pypies%{_sysconfdir}/httpd/conf \
--includedir=/awips2/httpd_pypies%{_includedir}/httpd \
--libexecdir=/awips2/httpd_pypies%{_libdir}/httpd/modules \
--datadir=/awips2/httpd_pypies%{contentdir} \
--with-installbuilddir=/awips2/httpd_pypies%{_libdir}/httpd/build \
--with-mpm=$mpm \
--with-apr=%{_prefix} --with-apr-util=%{_prefix} \
--enable-suexec --with-suexec \
--with-suexec-caller=%{suexec_caller} \
--with-suexec-docroot=/awips2/httpd_pypies%{contentdir} \
--with-suexec-logfile=/awips2/httpd_pypies%{_localstatedir}/log/httpd/suexec.log \
--with-suexec-bin=/awips2/httpd_pypies%{_sbindir}/suexec \
--with-suexec-uidmin=500 --with-suexec-gidmin=100 \
--enable-pie \
--with-pcre \
$*
make %{?_smp_mflags}
popd
}
# Build everything and the kitchen sink with the prefork build
mpmbuild prefork \
--enable-mods-shared=all \
--enable-ssl --with-ssl --enable-distcache \
--enable-proxy \
--enable-cache --enable-mem-cache \
--enable-file-cache --enable-disk-cache \
--enable-ldap --enable-authnz-ldap \
--enable-cgid \
--enable-authn-anon --enable-authn-alias
# For the other MPMs, just build httpd and no optional modules
mpmbuild worker --enable-modules=none
mpmbuild event --enable-modules=none
%install
rm -rf $RPM_BUILD_ROOT
# Classify ab and logresolve as section 1 commands, as they are in /usr/bin
mv docs/man/ab.8 docs/man/ab.1
mv docs/man/logresolve.8 docs/man/logresolve.1
pushd prefork
make DESTDIR=$RPM_BUILD_ROOT install
popd
# install alternative MPMs
install -m 755 worker/httpd $RPM_BUILD_ROOT/awips2/httpd_pypies%{_sbindir}/httpd.worker
install -m 755 event/httpd $RPM_BUILD_ROOT/awips2/httpd_pypies%{_sbindir}/httpd.event
# install conf file/directory
mkdir $RPM_BUILD_ROOT/awips2/httpd_pypies%{_sysconfdir}/httpd/conf.d
install -m 644 $RPM_SOURCE_DIR/README.confd \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{_sysconfdir}/httpd/conf.d/README
for f in ssl.conf welcome.conf manual.conf proxy_ajp.conf; do
install -m 644 $RPM_SOURCE_DIR/$f $RPM_BUILD_ROOT/awips2/httpd_pypies%{_sysconfdir}/httpd/conf.d/$f
done
rm $RPM_BUILD_ROOT/awips2/httpd_pypies%{_sysconfdir}/httpd/conf/*.conf
install -m 644 $RPM_SOURCE_DIR/httpd.conf \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{_sysconfdir}/httpd/conf/httpd.conf
mkdir $RPM_BUILD_ROOT/awips2/httpd_pypies%{_sysconfdir}/sysconfig
install -m 644 $RPM_SOURCE_DIR/httpd.sysconf \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{_sysconfdir}/sysconfig/httpd
# for holding mod_dav lock database
mkdir -p $RPM_BUILD_ROOT/awips2/httpd_pypies%{_localstatedir}/lib/dav
# create a prototype session cache
mkdir -p $RPM_BUILD_ROOT/awips2/httpd_pypies%{_localstatedir}/cache/mod_ssl
touch $RPM_BUILD_ROOT/awips2/httpd_pypies%{_localstatedir}/cache/mod_ssl/scache.{dir,pag,sem}
# create cache root
mkdir $RPM_BUILD_ROOT/awips2/httpd_pypies%{_localstatedir}/cache/mod_proxy
# move utilities to /usr/bin
mv $RPM_BUILD_ROOT/awips2/httpd_pypies%{_sbindir}/{ab,htdbm,logresolve,htpasswd,htdigest} \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{_bindir}
# Make the MMN accessible to module packages
echo %{mmn} > $RPM_BUILD_ROOT/awips2/httpd_pypies%{_includedir}/httpd/.mmn
# docroot
mkdir $RPM_BUILD_ROOT/awips2/httpd_pypies%{contentdir}/html
install -m 644 $RPM_SOURCE_DIR/centos_index.html \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{contentdir}/error/noindex.html
# remove manual sources
find $RPM_BUILD_ROOT/awips2/httpd_pypies%{contentdir}/manual \( \
-name \*.xml -o -name \*.xml.* -o -name \*.ent -o -name \*.xsl -o -name \*.dtd \
\) -print0 | xargs -0 rm -f
# added for branding
install -m 644 %{SOURCE8} \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{contentdir}/icons/powered_by_rh.png
# Strip the manual down just to English and replace the typemaps with flat files:
set +x
for f in `find $RPM_BUILD_ROOT/awips2/httpd_pypies%{contentdir}/manual -name \*.html -type f`; do
if test -f ${f}.en; then
cp ${f}.en ${f}
rm ${f}.*
fi
done
set -x
# logs
rmdir $RPM_BUILD_ROOT/awips2/httpd_pypies%{_sysconfdir}/httpd/logs
mkdir -p $RPM_BUILD_ROOT/awips2/httpd_pypies%{_localstatedir}/log/httpd
# run
mkdir -p $RPM_BUILD_ROOT/awips2/httpd_pypies/var/run
mkdir -p $RPM_BUILD_ROOT/awips2/httpd_pypies/var/lock/subsys/
# symlinks for /etc/httpd
ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/awips2/httpd_pypies/etc/httpd/logs
ln -s ../..%{_localstatedir}/run $RPM_BUILD_ROOT/awips2/httpd_pypies/etc/httpd/run
ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/awips2/httpd_pypies/etc/httpd/modules
# install service script.
mkdir -p ${RPM_BUILD_ROOT}/etc/init.d
install -m755 ${PROJECT_DIR}/configuration/etc/init.d/httpd-pypies \
${RPM_BUILD_ROOT}/etc/init.d
# install log rotation stuff
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m644 $RPM_SOURCE_DIR/httpd-pypies.logrotate \
$RPM_BUILD_ROOT/etc/logrotate.d/httpd-pypies
# fix man page paths
sed -e "s|/usr/local/apache2/conf/httpd.conf|/etc/httpd/conf/httpd.conf|" \
-e "s|/usr/local/apache2/conf/mime.types|/etc/mime.types|" \
-e "s|/usr/local/apache2/conf/magic|/etc/httpd/conf/magic|" \
-e "s|/usr/local/apache2/logs/error_log|/var/log/httpd/error_log|" \
-e "s|/usr/local/apache2/logs/access_log|/var/log/httpd/access_log|" \
-e "s|/usr/local/apache2/logs/httpd.pid|/var/run/httpd.pid|" \
-e "s|/usr/local/apache2|/etc/httpd|" < docs/man/httpd.8 \
> $RPM_BUILD_ROOT/awips2/httpd_pypies/%{_mandir}/man8/httpd.8
# Make ap_config_layout.h libdir-agnostic
sed -i '/.*DEFAULT_..._LIBEXECDIR/d;/DEFAULT_..._INSTALLBUILDDIR/d' \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{_includedir}/httpd/ap_config_layout.h
# Fix path to instdso in special.mk
sed -i '/instdso/s,top_srcdir,top_builddir,' \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{_libdir}/httpd/build/special.mk
# Remove unpackaged files
rm -f $RPM_BUILD_ROOT/awips2/httpd_pypies%{_libdir}/*.exp \
$RPM_BUILD_ROOT/awips2/httpd_pypies/etc/httpd/conf/mime.types \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{_libdir}/httpd/modules/*.exp \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{_libdir}/httpd/build/config.nice \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{_bindir}/ap?-config \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{_sbindir}/{checkgid,dbmmanage,envvars*} \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{contentdir}/htdocs/* \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{_mandir}/man1/dbmmanage.* \
$RPM_BUILD_ROOT/awips2/httpd_pypies%{contentdir}/cgi-bin/*
rm -rf $RPM_BUILD_ROOT/awips2/httpd_pypies/etc/httpd/conf/{original,extra}
# Make suexec a+rw so it can be stripped. %%files lists real permissions
chmod 755 $RPM_BUILD_ROOT/awips2/httpd_pypies%{_sbindir}/suexec
# Install the module required by pypies.
install -m755 ${PROJECT_DIR}/configuration/apache/mod_wsgi.so \
${RPM_BUILD_ROOT}/awips2/httpd_pypies/etc/httpd/modules
# Install the pypies configuration.
install -m644 ${PROJECT_DIR}/configuration/apache/pypies.conf \
${RPM_BUILD_ROOT}/awips2/httpd_pypies/etc/httpd/conf.d
mkdir -p ${RPM_BUILD_ROOT}/awips2/httpd_pypies/var/www/wsgi
install -m644 ${PROJECT_DIR}/configuration/apache/pypies.wsgi \
${RPM_BUILD_ROOT}/awips2/httpd_pypies/var/www/wsgi
# Install & Override the httpd configuration.
install -m644 ${PROJECT_DIR}/configuration/conf/httpd.conf \
${RPM_BUILD_ROOT}/awips2/httpd_pypies/etc/httpd/conf
%pre
# Add the "apache" user
/usr/sbin/useradd -c "Apache" -u 48 \
-s /sbin/nologin -r -d /awips2/httpd_pypies%{contentdir} apache 2> /dev/null || :
%triggerpostun -- apache < 2.0, stronghold-apache < 2.0
/sbin/chkconfig --add httpd-pypies
# Prevent removal of index.html on upgrades from 1.3
%triggerun -- apache < 2.0, stronghold-apache < 2.0
if [ -r /awips2/httpd_pypies%{contentdir}/index.html -a ! -r /awips2/httpd_pypies%{contentdir}/index.html.rpmold ]; then
mv /awips2/httpd_pypies%{contentdir}/index.html /awips2/httpd_pypies%{contentdir}/index.html.rpmold
fi
%post
# Register the httpd service
/sbin/chkconfig --add httpd-pypies
%preun
# this is not compatible with our environment. attempting to shutdown
# httpd-pypies causes 'yum groupremove' to abort and leaves us with
# an incomplete version of httpd-pypies that cannot be un-installed.
#if [ $1 = 0 ]; then
# /sbin/service httpd-pypies stop > /dev/null 2>&1
# /sbin/chkconfig --del httpd-pypies
#fi
%define sslcert /awips2/httpd_pypies%{_sysconfdir}/pki/tls/certs/localhost.crt
%define sslkey /awips2/httpd_pypies%{_sysconfdir}/pki/tls/private/localhost.key
%post -n mod_ssl
umask 077
if [ ! -f %{sslkey} ] ; then
/awips2/httpd_pypies%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{sslkey} 2> /dev/null
fi
FQDN=`hostname`
if [ "x${FQDN}" = "x" ]; then
FQDN=localhost.localdomain
fi
if [ ! -f %{sslcert} ] ; then
cat << EOF | /awips2/httpd_pypies%{_bindir}/openssl req -new -key %{sslkey} \
-x509 -days 365 -set_serial $RANDOM \
-out %{sslcert} 2>/dev/null
--
SomeState
SomeCity
SomeOrganization
SomeOrganizationalUnit
${FQDN}
root@${FQDN}
EOF
fi
%check
# Check the built modules are all PIC
if readelf -d $RPM_BUILD_ROOT/awips2/httpd_pypies%{_libdir}/httpd/modules/*.so | grep TEXTREL; then
: modules contain non-relocatable code
exit 1
fi
# Verify that the same modules were built into the httpd binaries
./prefork/httpd -l | grep -v prefork > prefork.mods
for mpm in worker; do
./${mpm}/httpd -l | grep -v ${mpm} > ${mpm}.mods
if ! diff -u prefork.mods ${mpm}.mods; then
: Different modules built into httpd binaries, will not proceed
exit 1
fi
done
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,awips,fxalpha)
%doc ABOUT_APACHE README CHANGES LICENSE VERSIONING NOTICE
%doc migration.html migration.css
%dir /awips2/httpd_pypies
%dir /awips2/httpd_pypies/etc
%dir /awips2/httpd_pypies/etc/sysconfig
%dir /awips2/httpd_pypies/usr
%dir /awips2/httpd_pypies/usr/bin
%dir /awips2/httpd_pypies/usr/lib
%dir /awips2/httpd_pypies/usr/sbin
/awips2/httpd_pypies/usr/share
%dir /awips2/httpd_pypies/var
%dir /awips2/httpd_pypies/var/cache
%dir /awips2/httpd_pypies/var/lib
%dir /awips2/httpd_pypies/var/lock
%dir /awips2/httpd_pypies/var/log
%dir /awips2/httpd_pypies%{_sysconfdir}/httpd
%dir /awips2/httpd_pypies/var/run
%dir /awips2/httpd_pypies/var/lock/subsys/
%dir /awips2/httpd_pypies/var/www/wsgi
%config(noreplace) /awips2/httpd_pypies/var/www/wsgi/pypies.wsgi
/awips2/httpd_pypies%{_sysconfdir}/httpd/modules
/awips2/httpd_pypies%{_sysconfdir}/httpd/logs
/awips2/httpd_pypies%{_sysconfdir}/httpd/run
%dir /awips2/httpd_pypies%{_sysconfdir}/httpd/conf
%config(noreplace) /awips2/httpd_pypies%{_sysconfdir}/httpd/conf/httpd.conf
%config(noreplace) /awips2/httpd_pypies%{_sysconfdir}/httpd/conf.d/pypies.conf
%config(noreplace) /awips2/httpd_pypies%{_sysconfdir}/httpd/conf.d/welcome.conf
%config(noreplace) /awips2/httpd_pypies%{_sysconfdir}/httpd/conf.d/proxy_ajp.conf
%config(noreplace) /awips2/httpd_pypies%{_sysconfdir}/httpd/conf/magic
%config(noreplace) %{_sysconfdir}/logrotate.d/httpd-pypies
%config(noreplace) %{_sysconfdir}/init.d/httpd-pypies
%dir /awips2/httpd_pypies%{_sysconfdir}/httpd/conf.d
/awips2/httpd_pypies%{_sysconfdir}/httpd/conf.d/README
%config(noreplace) /awips2/httpd_pypies%{_sysconfdir}/sysconfig/httpd
/awips2/httpd_pypies%{_bindir}/*
/awips2/httpd_pypies%{_sbindir}/ht*
/awips2/httpd_pypies%{_sbindir}/apachectl
/awips2/httpd_pypies%{_sbindir}/rotatelogs
%attr(4510,awips,fxalpha) /awips2/httpd_pypies%{_sbindir}/suexec
%dir /awips2/httpd_pypies%{_libdir}/httpd
%dir /awips2/httpd_pypies%{_libdir}/httpd/modules
/awips2/httpd_pypies%{_libdir}/httpd/modules/mod*.so
%exclude /awips2/httpd_pypies%{_libdir}/httpd/modules/mod_ssl.so
%dir /awips2/httpd_pypies%{contentdir}
%dir /awips2/httpd_pypies%{contentdir}/cgi-bin
%dir /awips2/httpd_pypies%{contentdir}/html
%dir /awips2/httpd_pypies%{contentdir}/icons
%dir /awips2/httpd_pypies%{contentdir}/error
%dir /awips2/httpd_pypies%{contentdir}/error/include
/awips2/httpd_pypies%{contentdir}/icons/*
/awips2/httpd_pypies%{contentdir}/error/README
/awips2/httpd_pypies%{contentdir}/error/noindex.html
%config /awips2/httpd_pypies%{contentdir}/error/*.var
%config /awips2/httpd_pypies%{contentdir}/error/include/*.html
%attr(0700,awips,fxalpha) %dir /awips2/httpd_pypies%{_localstatedir}/log/httpd
%attr(0700,awips,fxalpha) %dir /awips2/httpd_pypies%{_localstatedir}/lib/dav
%attr(0700,awips,fxalpha) %dir /awips2/httpd_pypies%{_localstatedir}/cache/mod_proxy
/awips2/httpd_pypies/%{_mandir}/man?/*
%exclude /awips2/httpd_pypies/%{_mandir}/man8/apxs.8*
%files manual
%defattr(-,root,root)
/awips2/httpd_pypies%{contentdir}/manual
%config /awips2/httpd_pypies%{_sysconfdir}/httpd/conf.d/manual.conf
%files -n mod_ssl
%defattr(-,root,root)
/awips2/httpd_pypies%{_libdir}/httpd/modules/mod_ssl.so
%config(noreplace) /awips2/httpd_pypies%{_sysconfdir}/httpd/conf.d/ssl.conf
%attr(0700,apache,root) %dir /awips2/httpd_pypies%{_localstatedir}/cache/mod_ssl
%attr(0600,apache,root) %ghost /awips2/httpd_pypies%{_localstatedir}/cache/mod_ssl/scache.dir
%attr(0600,apache,root) %ghost /awips2/httpd_pypies%{_localstatedir}/cache/mod_ssl/scache.pag
%attr(0600,apache,root) %ghost /awips2/httpd_pypies%{_localstatedir}/cache/mod_ssl/scache.sem
%files devel
%defattr(-,root,root)
/awips2/httpd_pypies%{_includedir}/httpd
/awips2/httpd_pypies%{_sbindir}/apxs
/awips2/httpd_pypies/%{_mandir}/man8/apxs.8*
%dir /awips2/httpd_pypies%{_libdir}/httpd/build
/awips2/httpd_pypies%{_libdir}/httpd/build/*.mk
/awips2/httpd_pypies%{_libdir}/httpd/build/*.sh
%changelog
* Thu Jan 22 2009 Karanbir Singh <kbsingh@centos.org> 2.2.3-22.el5.centos
- Roll in CentOS branding changes
* Wed Nov 12 2008 Joe Orton <jorton@redhat.com> 2.2.3-22.el5
- add security fixes for CVE-2008-2939 (#468841)
- note that the mod_proxy 2.2.9 rebase fixed CVE-2008-2634
* Tue Oct 21 2008 Joe Orton <jorton@redhat.com> 2.2.3-21.el5
- avoid strict-aliasing warnings (#462877)
* Tue Oct 21 2008 Joe Orton <jorton@redhat.com> 2.2.3-20.el5
- mod_proxy: scoreboard access fix (#252024)
* Thu Sep 18 2008 Joe Orton <jorton@redhat.com> 2.2.3-19.el5
- mod_proxy: various backport fixes (#252024)
* Thu Sep 18 2008 Joe Orton <jorton@redhat.com> 2.2.3-17.el5
- fix mod_proxy symbol use
* Mon Sep 15 2008 Joe Orton <jorton@redhat.com> 2.2.3-16.el5
- mod_proxy*, mod_cache*: rebase to 2.2.9 (#252024, #249534,
#439842)
- backport changes to make chunk filter non-blocking (#454098)
* Fri Sep 12 2008 Joe Orton <jorton@redhat.com> 2.2.3-15.el5
- mod_ldap: fix memory lifetime issues (#440259)
- mod_ssl: configure OpenSSL dynamic lock callbacks (#462044)
- escape the Request-Method in canned error responses (#445888)
- build the event MPM and fix a deadlock therein (#444643)
- mod_headers: support "RequestHeader edit" (#428253)
- use "OPTIONS *" rather than "GET /" in dummy connection (#367981)
* Thu Aug 14 2008 Joe Orton <jorton@redhat.com> 2.2.3-14.el5
- mod_proxy: add ProxyPassMatch support (#449159)
* Mon Jul 21 2008 Joe Orton <jorton@redhat.com> 2.2.3-13.el5
- mod_proxy_balancer: allow alternative string to match for
stickysession parameter (#439218)
- fix dist tag in Release (#440615)
* Fri Jan 11 2008 Joe Orton <jorton@redhat.com> 2.2.3-12.el5_1.3
- further update to backport for CVE-2007-6421 (#427240)
* Fri Jan 11 2008 Joe Orton <jorton@redhat.com> 2.2.3-12.el5_1.2
- updated backport for CVE-2007-6421 (#427240)
* Mon Jan 7 2008 Joe Orton <jorton@redhat.com> 2.2.3-11.el5_1.1
- add security fixes for CVE-2007-6388, CVE-2007-6421
and CVE-2007-6422 (#427240)
- add security fix for CVE-2007-4465, CVE-2007-5000 (#421631)
- add security fix for mod_proxy_ftp UTF-7 XSS (#427745)
* Mon Aug 6 2007 Joe Orton <jorton@redhat.com> 2.2.3-11.el5
- mark httpd.conf config(noreplace) (#247881)
* Fri Aug 3 2007 Joe Orton <jorton@redhat.com> 2.2.3-10.el5
- add security fix for CVE-2007-3847 (#250761)
* Wed Aug 1 2007 Joe Orton <jorton@redhat.com> 2.2.3-9.el5
- load mod_version by default (#247881)
* Tue Jun 26 2007 Joe Orton <jorton@redhat.com> 2.2.3-8.el5
- add 'ServerTokens Full-Release' config option (#240857)
- use init script in logrotate postrotate (#241680)
- fix mod_proxy option inheritance (#245719)
- fix ProxyErrorOverride to only affect 4xx, 5xx responses (#240024)
- bump logresolve line buffer length to 10K (#245763)
- add security fixes for CVE-2007-1863, CVE-2007-3304,
and CVE-2006-5752 (#244666)
* Wed Nov 29 2006 Joe Orton <jorton@redhat.com> 2.2.3-6.el5
- fix path to instdso.sh in special.mk (#217677)
- fix detection of links in "apachectl fullstatus"
* Tue Sep 19 2006 Joe Orton <jorton@redhat.com> 2.2.3-5.el5
- rebuild
* Fri Aug 11 2006 Joe Orton <jorton@redhat.com> 2.2.3-3.el5
- use RHEL branding
* Thu Aug 3 2006 Joe Orton <jorton@redhat.com> 2.2.3-3
- init: use killproc() delay to avoid race killing parent
* Fri Jul 28 2006 Joe Orton <jorton@redhat.com> 2.2.3-2
- update to 2.2.3
- trim %%changelog to >=2.0.52
* Thu Jul 20 2006 Joe Orton <jorton@redhat.com> 2.2.2-8
- fix segfault on dummy connection failure at graceful restart (#199429)
* Wed Jul 19 2006 Joe Orton <jorton@redhat.com> 2.2.2-7
- fix "apxs -g"-generated Makefile
- fix buildconf with autoconf 2.60
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.2.2-5.1
- rebuild
* Wed Jun 7 2006 Joe Orton <jorton@redhat.com> 2.2.2-5
- require pkgconfig for -devel (#194152)
- fixes for installed support makefiles (special.mk et al)
- BR autoconf
* Fri Jun 2 2006 Joe Orton <jorton@redhat.com> 2.2.2-4
- make -devel package multilib-safe (#192686)
* Thu May 11 2006 Joe Orton <jorton@redhat.com> 2.2.2-3
- build DSOs using -z relro linker flag
* Wed May 3 2006 Joe Orton <jorton@redhat.com> 2.2.2-2
- update to 2.2.2
* Thu Apr 6 2006 Joe Orton <jorton@redhat.com> 2.2.0-6
- rebuild to pick up apr-util LDAP interface fix (#188073)
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - (none):2.2.0-5.1.2
- bump again for double-long bug on ppc(64)
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - (none):2.2.0-5.1.1
- rebuilt for new gcc4.1 snapshot and glibc changes
* Mon Feb 6 2006 Joe Orton <jorton@redhat.com> 2.2.0-5.1
- mod_auth_basic/mod_authn_file: if no provider is configured,
and AuthUserFile is not configured, decline to handle authn
silently rather than failing noisily.
* Fri Feb 3 2006 Joe Orton <jorton@redhat.com> 2.2.0-5
- mod_ssl: add security fix for CVE-2005-3357 (#177914)
- mod_imagemap: add security fix for CVE-2005-3352 (#177913)
- add fix for AP_INIT_* designated initializers with C++ compilers
- httpd.conf: enable HTMLTable in default IndexOptions
- httpd.conf: add more "redirect-carefully" matches for DAV clients
* Thu Jan 5 2006 Joe Orton <jorton@redhat.com> 2.2.0-4
- mod_proxy_ajp: fix Cookie handling (Mladen Turk, r358769)
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
* Wed Dec 7 2005 Joe Orton <jorton@redhat.com> 2.2.0-3
- strip manual to just English content
* Mon Dec 5 2005 Joe Orton <jorton@redhat.com> 2.2.0-2
- don't strip C-L from HEAD responses (Greg Ames, #110552)
- load mod_proxy_balancer by default
- add proxy_ajp.conf to load/configure mod_proxy_ajp
- Obsolete mod_jk
- update docs URLs in httpd.conf/ssl.conf
* Fri Dec 2 2005 Joe Orton <jorton@redhat.com> 2.2.0-1
- update to 2.2.0
* Wed Nov 30 2005 Joe Orton <jorton@redhat.com> 2.1.10-2
- enable mod_authn_alias, mod_authn_anon
- update default httpd.conf
* Fri Nov 25 2005 Joe Orton <jorton@redhat.com> 2.1.10-1
- update to 2.1.10
- require apr >= 1.2.0, apr-util >= 1.2.0
* Wed Nov 9 2005 Tomas Mraz <tmraz@redhat.com> 2.0.54-16
- rebuilt against new openssl
* Thu Nov 3 2005 Joe Orton <jorton@redhat.com> 2.0.54-15
- log notice giving SELinux context at startup if enabled
- drop SSLv2 and restrict default cipher suite in default
SSL configuration
* Thu Oct 20 2005 Joe Orton <jorton@redhat.com> 2.0.54-14
- mod_ssl: add security fix for SSLVerifyClient (CVE-2005-2700)
- add security fix for byterange filter DoS (CVE-2005-2728)
- add security fix for C-L vs T-E handling (CVE-2005-2088)
- mod_ssl: add security fix for CRL overflow (CVE-2005-1268)
- mod_ldap/mod_auth_ldap: add fixes from 2.0.x branch (upstream #34209 etc)
- add fix for dummy connection handling (#167425)
- mod_auth_digest: fix hostinfo comparison in CONNECT requests
- mod_include: fix variable corruption in nested includes (upstream #12655)
- mod_ssl: add fix for handling non-blocking reads
- mod_ssl: fix to enable output buffering (upstream #35279)
- mod_ssl: buffer request bodies for per-location renegotiation (upstream #12355)
* Sat Aug 13 2005 Joe Orton <jorton@redhat.com> 2.0.54-13
- don't load by default: mod_cern_meta, mod_asis
- do load by default: mod_ext_filter (#165893)
* Thu Jul 28 2005 Joe Orton <jorton@redhat.com> 2.0.54-12
- drop broken epoch deps
* Thu Jun 30 2005 Joe Orton <jorton@redhat.com> 2.0.54-11
- mod_dav_fs: fix uninitialized variable (#162144)
- add epoch to dependencies as appropriate
- mod_ssl: drop dependencies on dev, make
- mod_ssl: mark post script dependencies as such
* Mon May 23 2005 Joe Orton <jorton@redhat.com> 2.0.54-10
- remove broken symlink (Robert Scheck, #158404)
* Wed May 18 2005 Joe Orton <jorton@redhat.com> 2.0.54-9
- add piped logger fixes (w/Jeff Trawick)
* Mon May 9 2005 Joe Orton <jorton@redhat.com> 2.0.54-8
- drop old "powered by Red Hat" logos
* Wed May 4 2005 Joe Orton <jorton@redhat.com> 2.0.54-7
- mod_userdir: fix memory allocation issue (upstream #34588)
- mod_ldap: fix memory corruption issue (Brad Nicholes, upstream #34618)
* Tue Apr 26 2005 Joe Orton <jorton@redhat.com> 2.0.54-6
- fix key/cert locations in post script
* Mon Apr 25 2005 Joe Orton <jorton@redhat.com> 2.0.54-5
- create default dummy cert in /etc/pki/tls
- use a pseudo-random serial number on the dummy cert
- change default ssl.conf to point at /etc/pki/tls
- merge back -suexec subpackage; SELinux policy can now be
used to persistently disable suexec (#155716)
- drop /etc/httpd/conf/ssl.* directories and Makefiles
- unconditionally enable PIE support
- mod_ssl: fix for picking up -shutdown options (upstream #34452)
* Mon Apr 18 2005 Joe Orton <jorton@redhat.com> 2.0.54-4
- replace PreReq with Requires(pre)
* Mon Apr 18 2005 Joe Orton <jorton@redhat.com> 2.0.54-3
- update to 2.0.54
* Tue Mar 29 2005 Joe Orton <jorton@redhat.com> 2.0.53-6
- update default httpd.conf:
* clarify the comments on AddDefaultCharset usage (#135821)
* remove all the AddCharset default extensions
* don't load mod_imap by default
* synch with upstream 2.0.53 httpd-std.conf
- mod_ssl: set user from SSLUserName in access hook (upstream #31418)
- htdigest: fix permissions of created files (upstream #33765)
- remove htsslpass
* Wed Mar 2 2005 Joe Orton <jorton@redhat.com> 2.0.53-5
- apachectl: restore use of $OPTIONS again
* Wed Feb 9 2005 Joe Orton <jorton@redhat.com> 2.0.53-4
- update to 2.0.53
- move prefork/worker modules comparison to %%check
* Mon Feb 7 2005 Joe Orton <jorton@redhat.com> 2.0.52-7
- fix cosmetic issues in "service httpd reload"
- move User/Group higher in httpd.conf (#146793)
- load mod_logio by default in httpd.conf
- apachectl: update for correct libselinux tools locations
* Tue Nov 16 2004 Joe Orton <jorton@redhat.com> 2.0.52-6
- add security fix for CVE CAN-2004-0942 (memory consumption DoS)
- SELinux: run httpd -t under runcon in configtest (Steven Smalley)
- fix SSLSessionCache comment for distcache in ssl.conf
- restart using SIGHUP not SIGUSR1 after logrotate
- add ap_save_brigade fix (upstream #31247)
- mod_ssl: fix possible segfault in auth hook (upstream #31848)
- add htsslpass(1) and configure as default SSLPassPhraseDialog (#128677)
- apachectl: restore use of $OPTIONS
- apachectl, httpd.init: refuse to restart if $HTTPD -t fails
- apachectl: run $HTTPD -t in user SELinux context for configtest
- update for pcre-5.0 header locations
* Sat Nov 13 2004 Jeff Johnson <jbj@redhat.com> 2.0.52-5
- rebuild against db-4.3.21 aware apr-util.
* Thu Nov 11 2004 Jeff Johnson <jbj@jbj.org> 2.0.52-4
- rebuild against db-4.3-21.
* Thu Sep 28 2004 Joe Orton <jorton@redhat.com> 2.0.52-3
- add dummy connection address fixes from HEAD
- mod_ssl: add security fix for CAN-2004-0885
* Tue Sep 28 2004 Joe Orton <jorton@redhat.com> 2.0.52-2
- update to 2.0.52

View file

@ -0,0 +1,18 @@
LoadModule wsgi_module modules/mod_wsgi.so
WSGIPythonHome /awips2/python
<VirtualHost *>
ServerName localhost
#wsgi is setup in embedded mode, Daemon Process not doing anything
#WSGIDaemonProcess pypies user=awips group=fxalpha python-path=/awips2/python/lib/python2.7/site-packages processes=50 threads=1 umask=0000 display-name=pypies deadlock-timeout=30
WSGIScriptAlias / /awips2/httpd_pypies/var/www/wsgi/pypies.wsgi
<Directory /awips2/httpd_pypies/var/www/wsgi>
# uncomment for Daemon mode
#WSGIProcessGroup pypies
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
</VirtualHost>

View file

@ -0,0 +1,5 @@
import site
site.addsitedir('/awips2/python/lib/python2.7/site-packages')
import pypies.handlers
application = pypies.handlers.pypies_response

View file

@ -0,0 +1,991 @@
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/etc/httpd" will be interpreted by the
# server as "/etc/httpd/logs/foo.log".
#
### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#
#
# Don't give away too much information about all the subcomponents
# we are running. Comment out this line if you don't mind remote sites
# finding out what major optional modules you are running
ServerTokens OS
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation
# (available at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/awips2/httpd_pypies/etc/httpd"
#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
PidFile run/httpd.pid
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 120
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 50
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 50
</IfModule>
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 9582
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
#
# The following modules are not loaded by default:
#
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule asis_module modules/mod_asis.so
#
# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf
#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
# . On HPUX you may not be able to use shared memory as nobody, and the
# suggested workaround is to create a user www and use that user.
# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
# when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems!
#
User awips
Group awips
### Section 2: 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin root@localhost
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName www.example.com:80
#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client. When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/awips2/httpd_pypies/var/www/html"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/awips2/httpd_pypies/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
UserDir disable
#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
#UserDir public_html
</IfModule>
#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/public_html>
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# <Limit GET POST OPTIONS>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS>
# Order deny,allow
# Deny from all
# </LimitExcept>
#</Directory>
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var
#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
#
# TypesConfig describes where the mime.types file (or equivalent) is
# to be found.
#
TypesConfig /etc/mime.types
#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain
#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
<IfModule mod_mime_magic.c>
# MIMEMagicFile /usr/share/magic.mime
MIMEMagicFile conf/magic
</IfModule>
#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off
#
# EnableMMAP: Control whether memory-mapping is used to deliver
# files (assuming that the underlying OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. On some systems, turning it off (regardless of
# filesystem) can improve performance; for details, please see
# http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
#
#EnableMMAP off
#
# EnableSendfile: Control whether the sendfile kernel support is
# used to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
#
#EnableSendfile off
#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error_log
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
# "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
# requires the mod_logio module to be loaded.
#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
#CustomLog logs/access_log common
#
# If you would like to have separate agent and referer logfiles, uncomment
# the following directives.
#
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent
#
# For a single logfile with access, agent, and referer information
# (Combined Logfile Format), use the following directive:
#
CustomLog logs/access_log combined
#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of: On | Off | EMail
#
ServerSignature On
#
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings. If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "/awips2/httpd_pypies/var/www/icons/"
<Directory "/awips2/httpd_pypies/var/www/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
#
# WebDAV module configuration section.
#
<IfModule mod_dav_fs.c>
# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb
</IfModule>
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/awips2/httpd_pypies/var/www/cgi-bin/"
#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/awips2/httpd_pypies/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
#
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Example:
# Redirect permanent /foo http://www.example.com/bar
#
# Directives controlling the display of server-generated directory listings.
#
#
# IndexOptions: Controls the appearance of server-generated directory
# listings.
#
IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable
#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions. These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif
#
# AddDescription allows you to place a short description after a file in
# server-generated indexes. These are only displayed for FancyIndexed
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz
#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
ReadmeName README.html
HeaderName HEADER.html
#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing. Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
#
# DefaultLanguage and AddLanguage allows you to specify the language of
# a document. You can then use content negotiation to give a browser a
# file in a language the user can understand.
#
# Specify a default language. This means that all data
# going out without a specific language tag (see below) will
# be marked with this one. You probably do NOT want to set
# this unless you are sure it is correct for all cases.
#
# * It is generally better to not mark a page as
# * being a certain language than marking it with the wrong
# * language!
#
# DefaultLanguage nl
#
# Note 1: The suffix does not have to be the same as the language
# keyword --- those with documents in Polish (whose net-standard
# language code is pl) may wish to use "AddLanguage pl .po" to
# avoid the ambiguity with the common suffix for perl scripts.
#
# Note 2: The example entries below illustrate that in some cases
# the two character 'Language' abbreviation is not identical to
# the two character 'Country' code for its country,
# E.g. 'Danmark/dk' versus 'Danish/da'.
#
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
# specifier. There is 'work in progress' to fix this and get
# the reference data for rfc1766 cleaned up.
#
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
# Norwegian (no) - Polish (pl) - Portugese (pt)
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
#
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
#
# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference. We have
# more or less alphabetized them here. You probably want to change this.
#
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
#
# ForceLanguagePriority allows you to serve a result page rather than
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
# [in case no accepted languages matched the available variants]
#
ForceLanguagePriority Prefer Fallback
#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default. To use the
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8
#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
#AddType application/x-tar .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi
#
# For files that include their own HTTP headers:
#
#AddHandler send-as-is asis
#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
# to be distributed in multiple languages.)
#
AddHandler type-map var
#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#
#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#
#
# Putting this all together, we can internationalize error responses.
#
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
# our collection of by-error message multi-language collections. We use
# includes to substitute the appropriate text.
#
# You can modify the messages' appearance without changing any of the
# default HTTP_<error>.html.var files by adding the line:
#
# Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /var/www/error/include/ files and
# copying them to /your/include/path/, even on a per-VirtualHost basis.
#
Alias /error/ "/awips2/httpd_pypies/var/www/error/"
<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<Directory "/awips2/httpd_pypies/var/www/error">
AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback
</Directory>
# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
# ErrorDocument 410 /error/HTTP_GONE.html.var
# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
</IfModule>
</IfModule>
#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
#
#<Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from .example.com
#</Location>
#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.com" to match your domain to enable.
#
#<Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .example.com
#</Location>
#
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#
#<IfModule mod_proxy.c>
#ProxyRequests On
#
#<Proxy *>
# Order deny,allow
# Deny from all
# Allow from .example.com
#</Proxy>
#
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
#
#ProxyVia On
#
# To enable a cache of proxied content, uncomment the following lines.
# See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
#
#<IfModule mod_disk_cache.c>
# CacheEnable disk /
# CacheRoot "/var/cache/mod_proxy"
#</IfModule>
#
#</IfModule>
# End of proxy directives.
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

View file

@ -0,0 +1,168 @@
#!/bin/bash
#
# httpd Startup script for the Apache HTTP Server used by Pypies
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI. Pypies uses it to serve connections.
# processname: httpd
# config: /etc/httpd/conf/httpd.conf
# config: /etc/sysconfig/httpd
# pidfile: /var/run/httpd.pid
# Source function library.
. /etc/rc.d/init.d/functions
if [ -f /etc/sysconfig/httpd ]; then
. /etc/sysconfig/httpd
fi
# Start httpd in the C locale by default.
HTTPD_LANG=${HTTPD_LANG-"C"}
# This will prevent initlog from swallowing up a pass-phrase prompt if
# mod_ssl needs a pass-phrase from the user.
INITLOG_ARGS=""
# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
# with the thread-based "worker" MPM; BE WARNED that some modules may not
# work correctly with a thread-based MPM; notably PHP will refuse to start.
# Find the httpd-pypies installation.
HTTPD_PYPIES_INSTALL=`rpm -q --queryformat '%{INSTALLPREFIX}' awips2-httpd-pypies`
# Path to the apachectl script, server binary, and short-form for messages.
apachectl=${HTTPD_PYPIES_INSTALL}/usr/sbin/apachectl
httpd=${HTTPD-${HTTPD_PYPIES_INSTALL}/usr/sbin/httpd}
prog=httpd
pidfile=${PIDFILE-${HTTPD_PYPIES_INSTALL}/var/run/httpd.pid}
lockfile=${LOCKFILE-${HTTPD_PYPIES_INSTALL}/var/lock/subsys/httpd}
RETVAL=0
PYTHON_INSTALL="/awips2/python"
loggingCmd="${PYTHON_INSTALL}/bin/python -u ${PYTHON_INSTALL}/lib/python2.7/site-packages/pypies/logging/logProcess.py"
# Add to LD_LIBRARY_PATH, if necessary.
PYTHON_LIB_DIR="${PYTHON_INSTALL}/lib"
# Determine if LD_LIBRARY_PATH needs to be updated.
echo $LD_LIBRARY_PATH | grep "${PYTHON_LIB_DIR}" > /dev/null 2>&1
RC="$?"
if [ ! "${RC}" = "0" ]; then
export LD_LIBRARY_PATH=${PYTHON_LIB_DIR}:$LD_LIBRARY_PATH
fi
# check for 1.3 configuration
check13 () {
CONFFILE=${HTTPD_PYPIES_INSTALL}/etc/httpd/conf/httpd.conf
GONE="(ServerType|BindAddress|Port|AddModule|ClearModuleList|"
GONE="${GONE}AgentLog|RefererLog|RefererIgnore|FancyIndexing|"
GONE="${GONE}AccessConfig|ResourceConfig)"
if LANG=C grep -Eiq "^[[:space:]]*($GONE)" $CONFFILE; then
echo
echo 1>&2 " Apache 1.3 configuration directives found"
echo 1>&2 " please read /usr/share/doc/awips2-httpd-pypies-2.2.3/migration.html"
failure "Apache 1.3 config directives test"
echo
exit 1
fi
}
# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure. So we just do it the way init scripts
# are expected to behave here.
start() {
source /etc/profile.d/awips2HDF5Tools.sh
echo -n $"Starting logging service:"
nohup su awips -c "$loggingCmd > /tmp/pypiesLoggingService.log 2>&1" > /dev/null &
RC=$?
# TODO: need better checks to ensure that the logging service actually keeps
# running after startup.
RC=$?
if [ ${RC} -ne 0 ]; then
failure
else
success
fi
echo
echo -n $"Starting $prog: "
check13 || exit 1
LANG=$HTTPD_LANG daemon $httpd $OPTIONS -f \
${HTTPD_PYPIES_INSTALL}/etc/httpd/conf/httpd.conf
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch ${lockfile}
return $RETVAL
}
# When stopping httpd a delay of >10 second is required before SIGKILLing the
# httpd parent; this gives enough time for the httpd parent to SIGKILL any
# errant children.
stop() {
echo -n $"Stopping $prog: "
killproc -d 10 $httpd
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
echo -n $"Stopping logging service:"
# Stop the logging process
for pid in `ps aux | grep [l]ogProcess.py | awk '{print $2}'`;
do
kill -9 ${pid}
RC=$?
if [ ${RC} -ne 0 ]; then
failure
return
fi
done
success
echo
}
reload() {
echo -n $"Reloading $prog: "
if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; then
RETVAL=$?
echo $"not reloading due to configuration syntax error"
failure $"not reloading $httpd due to configuration syntax error"
else
killproc $httpd -HUP
RETVAL=$?
fi
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $httpd
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f ${pidfile} ] ; then
stop
start
fi
;;
reload)
reload
;;
graceful|help|configtest|fullstatus)
$apachectl $@
RETVAL=$?
;;
*)
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
exit 1
esac
exit $RETVAL

View file

@ -0,0 +1,104 @@
%define CORE_DELTA_SETUP ${WORKSPACE_DIR}/Installer.rpm/delta/setup/updateSetup.sh
%define _component_name awips2-hydroapps-shared
%define _component_project_dir awips2.core/Installer.hydroapps
#
# AWIPS II Hydroapps Spec File
#
Name: %{_component_name}
Summary: AWIPS II Hydroapps Distribution
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-hydroapps-shared
obsoletes: awips2-hydroapps
requires: awips2-edex-base
requires: awips2-edex-native
%description
AWIPS II Hydroapps Distribution - Includes applications, configurations, and
filesystems for Hydro.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2
%build
%install
NATIVE_TAR_FILE="dist.native/i386-pc-linux-gnu.tar"
# Untar the Native Library
/bin/gtar -xpf ${WORKSPACE_DIR}/${NATIVE_TAR_FILE} \
-C ${RPM_BUILD_ROOT}/awips2
# Remove all unnecessary files and directories.
rm -rf ${RPM_BUILD_ROOT}/awips2/adapt
rm -rf ${RPM_BUILD_ROOT}/awips2/lib
rm -rf ${RPM_BUILD_ROOT}/awips2/setup
rm -rf ${RPM_BUILD_ROOT}/awips2/edex
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/share
mv ${RPM_BUILD_ROOT}/awips2/awipsShare/hydroapps \
${RPM_BUILD_ROOT}/awips2/edex/data/share
rm -rf ${RPM_BUILD_ROOT}/awips2/awipsShare
# Add the ffmp_templates directory - part of the tar file now.
#mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/hdf5/hydroapps/ffmp_templates
# Add file for VIM - part of the tar file now.
#WHFS_LOCAL="edex/data/hdf5/hydroapps/whfs/local/data"
#mkdir -p ${RPM_BUILD_ROOT}/awips2/${WHFS_LOCAL}/app/
#touch ${RPM_BUILD_ROOT}/awips2/${WHFS_LOCAL}/app/.vimrc
%pre
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing the AWIPS II Hydro 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/hydroapps\e[m"
%post
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II Hydro 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 Hydro Distribution Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,775)
%dir /awips2
%dir /awips2/edex
%dir /awips2/edex/data
%dir /awips2/edex/data/share
%defattr(777,awips,fxalpha,777)
%dir /awips2/edex/data/share/hydroapps
/awips2/edex/data/share/hydroapps/*

View file

@ -0,0 +1,36 @@
#!/bin/bash
export DELTA_BUILD="11.3"
export DELTA_ID="A21Proto1"
export DELTA_DESC="Removing Any Existing FFMP Templates So New Ones Can Be Generated."
function runUpdate()
{
# Ensure that the awips2-hydroapps have been installed.
rpm -q awips2-hydroapps > /dev/null
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 0
fi
# Ensure that we know where awips2-hydroapps has been installed too.
if [ "${COMPONENT_INSTALL}" = "" ]; then
return 1
fi
return 0;
FFMP_TEMPLATE_DIR="${COMPONENT_INSTALL}/edex/data/hdf5/hydroapps/ffmp_templates"
# Ensure that the ffmp_template directory exists.
if [ ! -d ${FFMP_TEMPLATE_DIR} ]; then
return 0
fi
# Purge the existing ffmp templates.
rm -rf ${FFMP_TEMPLATE_DIR}/*
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 1
fi
return 0
}

View file

@ -0,0 +1,132 @@
#
# AWIPS II IRT Spec File
#
Name: awips2-irt
Summary: AWIPS II IRT Installation
Version: 1.0.0
Release: 1
Group: AWIPSII
BuildRoot: /tmp
Prefix: /irt
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-irt
requires: awips2-python
%description
AWIPS II IRT Installation - Contains The AWIPS II IRT Component.
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/irt
%build
%install
# Copies the standard Raytheon licenses into a license directory for the
# current component.
function copyLegal()
{
# $1 == Component Build Root
COMPONENT_BUILD_DIR=${1}
mkdir -p ${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
# Create a Tar file with our FOSS licenses.
tar -cjf ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar \
${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses/
cp ${WORKSPACE_DIR}/Installer.rpm/legal/license.txt \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp "${WORKSPACE_DIR}/Installer.rpm/legal/Master Rights File.pdf" \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
cp ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar \
${RPM_BUILD_ROOT}/${COMPONENT_BUILD_DIR}/licenses
echo "\"/${COMPONENT_BUILD_DIR}/licenses/license.txt\"" \
>> %{_topdir}/BUILD/component-files.txt
echo "\"/${COMPONENT_BUILD_DIR}/licenses/Master Rights File.pdf\"" \
>> %{_topdir}/BUILD/component-files.txt
echo "\"/${COMPONENT_BUILD_DIR}/licenses/FOSS_licenses.tar\"" \
>> %{_topdir}/BUILD/component-files.txt
rm -f ${WORKSPACE_DIR}/Installer.rpm/legal/FOSS_licenses.tar
}
cp -r ${AWIPSCM_SHARE}/packages/irt-server/* ${RPM_BUILD_ROOT}/irt
# Copy The Configuration File To The Appropriate Directory.
IRT_CONFIG_FILE="IRT_Config.txt"
CONFIG_FILE_SRC_DIR="Installer.rpm/awips2.core/Installer.irt/scripts/conf"
CONFIG_FILE_DEST_DIR="IRT-operational/server"
cp ${WORKSPACE_DIR}/${CONFIG_FILE_SRC_DIR}/${IRT_CONFIG_FILE} \
${RPM_BUILD_ROOT}/irt/${CONFIG_FILE_DEST_DIR}
# Create an IRT bin Directory and Copy the Startup Script to It.
IRT_STARTUP_FILE="start_irt.sh"
STARTUP_FILE_SRC_DIR="Installer.rpm/awips2.core/Installer.irt/scripts"
mkdir -p ${RPM_BUILD_ROOT}/irt/bin
cp ${WORKSPACE_DIR}/${STARTUP_FILE_SRC_DIR}/${IRT_STARTUP_FILE} \
${RPM_BUILD_ROOT}/irt/bin
cd ${RPM_BUILD_ROOT}
for item in `find irt/ -name "*"`
do
if [ ! -d ${item} ]; then
echo "/"${item} >> %{_topdir}/BUILD/component-files.txt
fi
done
copyLegal "irt"
%pre
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing AWIPS II IRT...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Installation Root = ${RPM_INSTALL_PREFIX}\e[m"
%post
function printFailureMessage()
{
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;31m\| AWIPS II IRT Installation - FAILED\e[m"
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
}
echo ${RPM_INSTALL_PREFIX} | sed 's/\//\\\//g' > .awips2_escape.tmp
IRT_INSTALL_ESCAPED=`cat .awips2_escape.tmp`
rm -f .awips2_escape.tmp
echo "--------------------------------------------------------------------------------"
echo "\| Setting up AWIPS II IRT Runtime and Environment..."
echo "--------------------------------------------------------------------------------"
IRT_STARTUP_FILE="start_irt.sh"
perl -p -i -e "s/%{INSTALL_PATH}%/${IRT_INSTALL_ESCAPED}/g" \
${RPM_INSTALL_PREFIX}/bin/${IRT_STARTUP_FILE}
chmod a+x ${RPM_INSTALL_PREFIX}/bin/*
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II IRT Installation - COMPLETE\e[m"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
%postun
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| The AWIPS II IRT Installation Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo ""
%files -f component-files.txt

View file

@ -0,0 +1,16 @@
# ISC Routing Table config file
# Entries: name, value
# name: purgeTime value: how long to keep each entry in the table (seconds)
# minimum value = 3600 or pingTime, whichever is greater
# name: pingTime value: how often to reregister (seconds); minimum value = 3600
# name: useuntil value: minimum time between getaddr calls (seconds)
# name: doclip value: should ISC clipping take place: 0=no, 1=yes
# name: mount value: where to mount the service, if different from /
# name: port value: the service port (such as 8080)
purgeTime 7200
pingTime 3600
useuntil 180
doclip 1
mount $INSTALL_PATH
port 8081

View file

@ -0,0 +1,80 @@
#!/bin/sh
# chkconfig: - 99 10
# description: AWIPS II IRT Component.
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
EDEXUSER=awips
export LD_LIBRARY_PATH=%{PYTHON_INSTALL}%/lib
export LD_PRELOAD=%{PYTHON_INSTALL}%/lib/libpython2.7.so
IRT_DIR=%{IRT_INSTALL}%/IRT-operational/server/
PID_FILE=$IRT_DIR/tmp.pid
# Verify root user
checkUser() {
REQUIREDUSER="root"
CURUSER=`whoami`
if [ "$CURUSER" != "$REQUIREDUSER" ]; then
echo "Insufficient privileges: must run script as $REQUIREDUSER"
exit 1
fi
}
start(){
cd $IRT_DIR
su $EDEXUSER -c "%{PYTHON_INSTALL}%/bin/python RoutingTableSvc.py &" > /dev/null 2>&1
routingSvcName=RoutingTableSvc.py
ps ax | grep "$routingSvcName$" | awk '{print $1;}' > $PID_FILE
}
stop(){
cd $IRT_DIR
cat $PID_FILE | while read pid
do
su $EDEXUSER -c "kill -9 $pid"
done
rm $PID_FILE
}
restart(){
stop
sleep 3
start
}
# See how we were called
case $1 in
start)
checkUser
echo "Starting IRT Server..."
start
RETVAL=$?
;;
stop)
checkUser
echo "Stopping IRT Server..."
stop
RETVAL=$?
;;
restart)
checkUser
echo "Restarting IRT Server..."
restart
RETVAL=$?
;;
*)
#Print help
echo "Usage: $0 {start|stop|restart}" 1>&2
exit 1
;;
esac
exit $RETVAL

View file

@ -0,0 +1,53 @@
#!/bin/sh
IRT_DIR=%{INSTALL_PATH}%/IRT-operational/server/
PID_FILE=$IRT_DIR/tmp.pid
start(){
cd $IRT_DIR
python RoutingTableSvc.py &
routingSvcName=RoutingTableSvc.py
ps ax | grep "$routingSvcName$" | awk '{print $1;}' > $PID_FILE
}
stop(){
cd $IRT_DIR
cat $PID_FILE | while read pid
do
kill -9 $pid
done
rm $PID_FILE
}
restart(){
stop
sleep 3
start
}
# See how we were called
case $1 in
start)
echo "Starting IRT Server..."
start
RETVAL=$?
;;
stop)
echo "Stopping IRT Server..."
stop
RETVAL=$?
;;
restart)
echo "Restarting IRT Server..."
restart
RETVAL=$?
;;
*)
#Print help
echo "Usage: $0 {start|stop|restart}" 1>&2
exit 1
;;
esac
exit $RETVAL

View file

@ -0,0 +1,224 @@
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
#
# AWIPS II Java JRockit Spec File
#
Name: awips2-java-jrockit
Summary: AWIPS II Java JRockit Distribution - 32 Bit
Version: 1.6.0_26
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
provides: awips2-java-jrockit
requires: awips2-java
%description
AWIPS II Java JRockit Distribution - Contains JRockit JDK 1.6.0_26 and
the JRockit Mission Control Utility.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}/build-java
mkdir -p %{_build_root}/awips2/java
%build
%install
RPM_CORE_PROJECT_DIR="%{_baseline_workspace}/Installer.rpm/awips2.core"
JROCKIT_PROJECT_DIR="${RPM_CORE_PROJECT_DIR}/Installer.java-jrockit"
JROCKIT_INSTALLER="jrockit-jdk1.6.0_26-R28.1.4-4.0.1-linux-ia32.bin"
SILENT_XML="silent.xml"
pushd . > /dev/null
# JRockit Setup
cd ${JROCKIT_PROJECT_DIR}/src
chmod u+x ${JROCKIT_INSTALLER}
./${JROCKIT_INSTALLER} -mode=silent -silent_xml="${SILENT_XML}"
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
# Copy the Java "Extensions" to build-java.
JROCKIT_SRC_DIR="${JROCKIT_PROJECT_DIR}/src"
JAI_BIN="jai-1_1_3-lib-linux-i586-jdk.bin"
JAI_PATCH="jai.patch1"
JAI_IMAGEIO_BIN="jai_imageio-1_1-lib-linux-i586-jdk.bin"
JAI_IMAGEIO_PATCH="jai_imageio.patch1"
# Prepare
touch %{_build_root}/build-java/yes.txt
echo "yes" > %{_build_root}/build-java/yes.txt
cp -v ${JROCKIT_SRC_DIR}/${JAI_BIN} \
%{_build_root}/build-java
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
cp -v ${JROCKIT_SRC_DIR}/${JAI_PATCH} \
%{_build_root}/build-java
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
cp -v ${JROCKIT_SRC_DIR}/${JAI_IMAGEIO_BIN} \
%{_build_root}/build-java
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
cp -v ${JROCKIT_SRC_DIR}/${JAI_IMAGEIO_PATCH} \
%{_build_root}/build-java
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
# JAI Setup
# ... Complete Patching.
pushd . > /dev/null
cd %{_build_root}/build-java
patch -i ${JAI_PATCH}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
chmod u+x ${JAI_BIN}
popd > /dev/null
# ... Complete Installation.
pushd . > /dev/null
cd %{_build_root}/awips2/java/jrockit
%{_build_root}/build-java/${JAI_BIN} < %{_build_root}/build-java/yes.txt
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
# JAI ImageIO Setup
# ... Complete Patching.
pushd . > /dev/null
cd %{_build_root}/build-java
patch -i ${JAI_IMAGEIO_PATCH}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
chmod u+x ${JAI_IMAGEIO_BIN}
popd > /dev/null
# ... Complete Installation.
pushd . > /dev/null
cd %{_build_root}/awips2/java/jrockit
%{_build_root}/build-java/${JAI_IMAGEIO_BIN} < %{_build_root}/build-java/yes.txt
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
# pydev certificate
PYDEV_CERTIFICATE="pydev_certificate.cer"
cp -v ${JROCKIT_SRC_DIR}/${PYDEV_CERTIFICATE} \
%{_build_root}/awips2/java/jrockit/jre/lib/security
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
touch %{_build_root}/build-java/changeit.txt
echo "changeit" > %{_build_root}/build-java/changeit.txt
chmod 666 %{_build_root}/awips2/java/jrockit/jre/lib/security/cacerts
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
%{_build_root}/awips2/java/jrockit/bin/keytool -import \
-file %{_build_root}/awips2/java/jrockit/jre/lib/security/pydev_certificate.cer \
-keystore %{_build_root}/awips2/java/jrockit/jre/lib/security/cacerts \
-noprompt < %{_build_root}/build-java/changeit.txt
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
rm -rf %{_build_root}/build-java
%pre
%post
# Create a link JRockit Mission Control.
pushd . > /dev/null
cd /awips2/java/bin
ln -sf /awips2/java/jrockit/bin/jrmc .
popd > /dev/null
%preun
# Remove the link JRockit Mission Control.
pushd . > /dev/null
cd /awips2/java/bin
if [ -L jrockit ]; then
rm -f jrockit
fi
popd > /dev/null
%postun
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2
%dir /awips2/java
%dir /awips2/java/jrockit
%dir /awips2/java/jrockit/bin
%dir /awips2/java/jrockit/include
/awips2/java/jrockit/include/*
%dir /awips2/java/jrockit/inventory
/awips2/java/jrockit/inventory/*
%dir /awips2/java/jrockit/jre
/awips2/java/jrockit/jre/*
%dir /awips2/java/jrockit/lib
%dir /awips2/java/jrockit/missioncontrol
/awips2/java/jrockit/missioncontrol/*
%doc /awips2/java/jrockit/THIRDPARTYLICENSEREADME.txt
%doc /awips2/java/jrockit/jre/THIRDPARTYLICENSEREADME.txt
/awips2/java/jrockit/jre/.systemPrefs/.system.lock
/awips2/java/jrockit/jre/.systemPrefs/.systemRootModFile
/awips2/java/jrockit/missioncontrol/.eclipseproduct
%doc /awips2/java/jrockit/COPYRIGHT-jai.txt
%doc /awips2/java/jrockit/COPYRIGHT-jai_imageio.txt
%doc /awips2/java/jrockit/DISTRIBUTIONREADME-jai.txt
%doc /awips2/java/jrockit/DISTRIBUTIONREADME-jai_imageio.txt
%doc /awips2/java/jrockit/ENTITLEMENT-jai_imageio.txt
%doc /awips2/java/jrockit/LICENSE-jai.txt
%doc /awips2/java/jrockit/LICENSE-jai_imageio.txt
%doc /awips2/java/jrockit/THIRDPARTYLICENSEREADME-jai.txt
%doc /awips2/java/jrockit/THIRDPARTYLICENSEREADME-jai_imageio.txt
%doc /awips2/java/jrockit/UNINSTALL-jai
%doc /awips2/java/jrockit/UNINSTALL-jai_imageio
%defattr(755,awips,fxalpha,755)
/awips2/java/jrockit/bin/*
/awips2/java/jrockit/lib/*
/awips2/java/jrockit/jre/bin/*
/awips2/java/jrockit/jre/lib/*

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,49 @@
*** jai-1_1_3-lib-linux-i586-jdk.bin 2011-09-08 14:03:07.000000000 -0500
--- jai-1_1_3-lib-linux-i586-jdk.bin.update 2011-09-08 14:04:43.000000000 -0500
***************
*** 1,6 ****
#!/bin/sh
PATH=/bin:/usr/bin
! more <<EOF
--- 1,6 ----
#!/bin/sh
PATH=/bin:/usr/bin
! cat <<EOF
***************
*** 81,89 ****
outname=install.sfx.$$
echo "Unpacking..."
if [ "`uname`" = "SunOS" ]; then
! /bin/tail +139 $0 > $outname
else
! tail -n +139 $0 > $outname
fi
if [ -x /usr/bin/cksum ] ; then
echo "Checksumming..."
--- 81,89 ----
outname=install.sfx.$$
echo "Unpacking..."
if [ "`uname`" = "SunOS" ]; then
! /bin/tail +137 $0 > $outname
else
! tail -n +137 $0 > $outname
fi
if [ -x /usr/bin/cksum ] ; then
echo "Checksumming..."
***************
*** 119,126 ****
else
ARCH=i386 # solaris-i586 or solaris-amd64
fi
- elif [ `expr "\`uname -m\`" : .*64.*` != '0' ]; then
- ARCH=amd64 # linux-amd64
else
ARCH=i386 # linux-i586
fi
--- 119,124 ----

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more