Merge "Issue #453 - defined a new generic xmpp rpm specification that will currently be used to create the awips2-openfire rpm. Updated the soon-to-be deprecated nightly and release builds to build the new rpm." into 11-Collaboration
Former-commit-id:0f5a451fa5
[formerly a02a78e1a44df9bfe90cf7a65c8b16176b48e535] Former-commit-id:28b643ad74
This commit is contained in:
commit
b57be7c646
8 changed files with 325 additions and 0 deletions
Binary file not shown.
136
rpms/awips2.core/Installer.xmpp/component.spec
Normal file
136
rpms/awips2.core/Installer.xmpp/component.spec
Normal file
|
@ -0,0 +1,136 @@
|
||||||
|
#
|
||||||
|
# Generic AWIPS II XMPP Specs File
|
||||||
|
#
|
||||||
|
|
||||||
|
# Variables
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
%define _xmpp_server openfire
|
||||||
|
%define _xmpp_software_version 3.7.1
|
||||||
|
%define _xmpp_software_url http://www.igniterealtime.org/projects/openfire
|
||||||
|
%define _xmpp_software_license Apache License Version 2.0
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Name: awips2-%{_xmpp_server}
|
||||||
|
Summary: AWIPS II XMPP Server
|
||||||
|
Version: %{_xmpp_software_version}
|
||||||
|
Release: 1
|
||||||
|
Group: AWIPSII
|
||||||
|
BuildRoot: /tmp
|
||||||
|
BuildArch: noarch
|
||||||
|
URL: %{_xmpp_software_url}
|
||||||
|
License: %{_xmpp_software_license}
|
||||||
|
Distribution: N/A
|
||||||
|
Vendor: Raytheon
|
||||||
|
Packager: Bryan Kowal
|
||||||
|
|
||||||
|
AutoReq: no
|
||||||
|
provides: awips2-%{_xmpp_server}
|
||||||
|
|
||||||
|
%description
|
||||||
|
The AWIPS II XMPP Server - %{_xmpp_server}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
# Ensure that a valid build root has been supplied.
|
||||||
|
if [ "${RPM_BUILD_ROOT}" = "/tmp" ] ||
|
||||||
|
[ "${RPM_BUILD_ROOT}" = "" ]; then
|
||||||
|
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
|
||||||
|
echo "Unable To Continue ... Terminating"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure that the required "generic" scripts are available.
|
||||||
|
xmpp_project="%{_baseline_workspace}/Installer.rpm/awips2.core/Installer.xmpp"
|
||||||
|
dist_scripts="${xmpp_project}/dist/scripts"
|
||||||
|
|
||||||
|
# the "packaging" script.
|
||||||
|
package_script="${dist_scripts}/package.sh"
|
||||||
|
if [ ! -f ${package_script} ]; then
|
||||||
|
echo "ERROR: The package script does not exist - ${package_script}."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# the configuration script.
|
||||||
|
configuration_script="${dist_scripts}/configure.sh"
|
||||||
|
if [ ! -f ${configuration_script} ]; then
|
||||||
|
echo "ERROR: The configuration script does not exist - ${configuration_script}."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
%install
|
||||||
|
xmpp_project="%{_baseline_workspace}/Installer.rpm/awips2.core/Installer.xmpp"
|
||||||
|
dist_directory="${xmpp_project}/dist"
|
||||||
|
dist_scripts="${dist_directory}/scripts"
|
||||||
|
package_script="${dist_scripts}/package.sh"
|
||||||
|
configuration_script="${dist_scripts}/configure.sh"
|
||||||
|
filelist_txt="${dist_directory}/%{_xmpp_server}-files.txt"
|
||||||
|
|
||||||
|
# run the packaging script.
|
||||||
|
/bin/bash ${package_script} "%{_baseline_workspace}" "${RPM_BUILD_ROOT}"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# copy the file list.
|
||||||
|
cp -v ${filelist_txt} %{_topdir}/BUILD
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# copy the configuration script.
|
||||||
|
mkdir -p ${RPM_BUILD_ROOT}/awips2/%{_xmpp_server}/tmp
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cp ${configuration_script} \
|
||||||
|
${RPM_BUILD_ROOT}/awips2/%{_xmpp_server}/tmp
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
%pre
|
||||||
|
|
||||||
|
%post
|
||||||
|
configuration_script=/awips2/%{_xmpp_server}/tmp/configure.sh
|
||||||
|
|
||||||
|
# run the configuration script.
|
||||||
|
/bin/bash ${configuration_script}
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# remove the configuration script.
|
||||||
|
rm -rf /awips2/%{_xmpp_server}/tmp
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ "${1}" = "2" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove the openfire.sh link.
|
||||||
|
pushd . > /dev/null 2>&1
|
||||||
|
cd /awips2/openfire/bin
|
||||||
|
if [ -L openfire.sh ]; then
|
||||||
|
rm -f openfire.sh
|
||||||
|
fi
|
||||||
|
popd > /dev/null 2>&1
|
||||||
|
|
||||||
|
# Remove and unregister the openfired service.
|
||||||
|
if [ -f /etc/init.d/openfired ]; then
|
||||||
|
/sbin/chkconfig openfired off
|
||||||
|
/sbin/chkconfig --del openfired
|
||||||
|
|
||||||
|
rm -f /etc/init.d/openfired
|
||||||
|
fi
|
||||||
|
|
||||||
|
%postun
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -f %{_topdir}/BUILD/%{_xmpp_server}-files.txt
|
||||||
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
|
|
||||||
|
%files -f %{_xmpp_server}-files.txt
|
||||||
|
%defattr(644,awips,fxalpha,755)
|
||||||
|
%dir /awips2
|
||||||
|
|
||||||
|
%defattr(755,root,root,755)
|
||||||
|
/awips2/%{_xmpp_server}/tmp/configure.sh
|
53
rpms/awips2.core/Installer.xmpp/dist/openfire-files.txt
vendored
Normal file
53
rpms/awips2.core/Installer.xmpp/dist/openfire-files.txt
vendored
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
%defattr(644,awips,fxalpha,755)
|
||||||
|
%dir /awips2/openfire
|
||||||
|
%dir /awips2/openfire/bin
|
||||||
|
%dir /awips2/openfire/conf
|
||||||
|
%docdir /awips2/openfire/documentation
|
||||||
|
%dir /awips2/openfire/documentation
|
||||||
|
%dir /awips2/openfire/lib
|
||||||
|
%dir /awips2/openfire/logs
|
||||||
|
%dir /awips2/openfire/plugins
|
||||||
|
%dir /awips2/openfire/resources
|
||||||
|
%dir /awips2/openfire/.install4j
|
||||||
|
|
||||||
|
# the bin directory
|
||||||
|
%dir /awips2/openfire/bin/extra
|
||||||
|
%dir /awips2/openfire/bin/extra/redhat
|
||||||
|
/awips2/openfire/bin/openfirectl
|
||||||
|
/awips2/openfire/bin/extra/embedded-db.rc
|
||||||
|
/awips2/openfire/bin/extra/redhat/*
|
||||||
|
|
||||||
|
# the conf directory
|
||||||
|
/awips2/openfire/conf/*
|
||||||
|
|
||||||
|
# the documentation directory
|
||||||
|
/awips2/openfire/documentation/*
|
||||||
|
|
||||||
|
# the lib directory
|
||||||
|
/awips2/openfire/lib/*
|
||||||
|
|
||||||
|
# the logs directory
|
||||||
|
/awips2/openfire/logs/*
|
||||||
|
|
||||||
|
# the plugins directory
|
||||||
|
/awips2/openfire/plugins/*
|
||||||
|
|
||||||
|
# the resources directory
|
||||||
|
/awips2/openfire/resources/*
|
||||||
|
|
||||||
|
# the .install4j directory
|
||||||
|
/awips2/openfire/.install4j/*
|
||||||
|
|
||||||
|
# loose files
|
||||||
|
%doc /awips2/openfire/changelog.html
|
||||||
|
%doc /awips2/openfire/LICENSE.html
|
||||||
|
%doc /awips2/openfire/README.html
|
||||||
|
|
||||||
|
|
||||||
|
# executable files
|
||||||
|
%defattr(755,awips,fxalpha,755)
|
||||||
|
/awips2/openfire/bin/openfire
|
||||||
|
/awips2/openfire/bin/extra/embedded-db-viewer.sh
|
||||||
|
/awips2/openfire/bin/extra/openfired
|
||||||
|
/awips2/openfire/bin/extra/openfire-launchd-wrapper.sh
|
||||||
|
/awips2/openfire/bin/extra/redhat-postinstall.sh
|
57
rpms/awips2.core/Installer.xmpp/dist/openfire.patch0
vendored
Normal file
57
rpms/awips2.core/Installer.xmpp/dist/openfire.patch0
vendored
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
diff -crB openfire-a/bin/extra/openfired openfire-b/bin/extra/openfired
|
||||||
|
*** openfire-a/bin/extra/openfired 2011-10-01 16:51:23.000000000 -0500
|
||||||
|
--- openfire-b/bin/extra/openfired 2012-04-16 12:15:57.000000000 -0500
|
||||||
|
***************
|
||||||
|
*** 25,35 ****
|
||||||
|
|
||||||
|
# Set this to tell this script where openfire lives
|
||||||
|
# If this is not set the script will look for /opt/openfire, then /usr/local/openfire
|
||||||
|
! #export OPENFIRE_HOME=
|
||||||
|
|
||||||
|
# If there is a different user you would like to run this script as,
|
||||||
|
# change the following line
|
||||||
|
! export OPENFIRE_USER=jive
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
|
--- 25,38 ----
|
||||||
|
|
||||||
|
# Set this to tell this script where openfire lives
|
||||||
|
# If this is not set the script will look for /opt/openfire, then /usr/local/openfire
|
||||||
|
! export OPENFIRE_HOME=/awips2/openfire
|
||||||
|
|
||||||
|
# If there is a different user you would like to run this script as,
|
||||||
|
# change the following line
|
||||||
|
! export OPENFIRE_USER=awips
|
||||||
|
!
|
||||||
|
! # The location of the awips2-java jdk / jre.
|
||||||
|
! export app_java_home=/awips2/java
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
|
diff -crB openfire-a/bin/extra/redhat-postinstall.sh openfire-b/bin/extra/redhat-postinstall.sh
|
||||||
|
*** openfire-a/bin/extra/redhat-postinstall.sh 2011-10-01 16:51:23.000000000 -0500
|
||||||
|
--- openfire-b/bin/extra/redhat-postinstall.sh 2012-04-16 12:11:52.000000000 -0500
|
||||||
|
***************
|
||||||
|
*** 10,19 ****
|
||||||
|
|
||||||
|
# If you used an non standard directory name of location
|
||||||
|
# Please specify it here
|
||||||
|
! # OPENFIRE_HOME=
|
||||||
|
|
||||||
|
! OPENFIRE_USER="jive"
|
||||||
|
! OPENFIRE_GROUP="jive"
|
||||||
|
|
||||||
|
if [ ! $OPENFIRE_HOME ]; then
|
||||||
|
if [ -d "/opt/openfire" ]; then
|
||||||
|
--- 10,19 ----
|
||||||
|
|
||||||
|
# If you used an non standard directory name of location
|
||||||
|
# Please specify it here
|
||||||
|
! OPENFIRE_HOME=/awips2/openfire
|
||||||
|
|
||||||
|
! OPENFIRE_USER="awips"
|
||||||
|
! OPENFIRE_GROUP="fxalpha"
|
||||||
|
|
||||||
|
if [ ! $OPENFIRE_HOME ]; then
|
||||||
|
if [ -d "/opt/openfire" ]; then
|
BIN
rpms/awips2.core/Installer.xmpp/dist/openfire_3_7_1.tar.gz
vendored
Normal file
BIN
rpms/awips2.core/Installer.xmpp/dist/openfire_3_7_1.tar.gz
vendored
Normal file
Binary file not shown.
32
rpms/awips2.core/Installer.xmpp/dist/scripts/configure.sh
vendored
Normal file
32
rpms/awips2.core/Installer.xmpp/dist/scripts/configure.sh
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# configure.sh - this script will configure the openfire instance that has
|
||||||
|
# been installed.
|
||||||
|
|
||||||
|
# Expected Arguments:
|
||||||
|
# NONE
|
||||||
|
|
||||||
|
pushd . > /dev/null 2>&1
|
||||||
|
|
||||||
|
# run the redhat-postinstall.sh script.
|
||||||
|
cd /awips2/openfire/bin/extra
|
||||||
|
/bin/bash redhat-postinstall.sh > /dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# create a link to the openfire script.
|
||||||
|
cd /awips2/openfire/bin
|
||||||
|
if [ -L openfire.sh ]; then
|
||||||
|
rm -f openfire.sh
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
ln -s openfire openfire.sh
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
popd > /dev/null 2>&1
|
46
rpms/awips2.core/Installer.xmpp/dist/scripts/package.sh
vendored
Normal file
46
rpms/awips2.core/Installer.xmpp/dist/scripts/package.sh
vendored
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# package.sh - this script will unpack (untar) the openfire binaries,
|
||||||
|
# apply any required patches to the configuration, and
|
||||||
|
# prepare openfire for packaging in the rpm.
|
||||||
|
|
||||||
|
# Expected Arguments:
|
||||||
|
# ${1} == the baseline workspace
|
||||||
|
# ${2} == the 'RPM_BUILD_ROOT'
|
||||||
|
|
||||||
|
baseline_workspace="${1}"
|
||||||
|
RPM_BUILD_ROOT="${2}"
|
||||||
|
|
||||||
|
srcdir="${baseline_workspace}/Installer.rpm/awips2.core/Installer.xmpp/dist"
|
||||||
|
source_tar="${srcdir}/openfire_3_7_1.tar.gz"
|
||||||
|
patch_file0="${srcdir}/openfire.patch0"
|
||||||
|
|
||||||
|
# Prepare the installation directory.
|
||||||
|
if [ -d ${RPM_BUILD_ROOT} ]; then
|
||||||
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
mkdir -p ${RPM_BUILD_ROOT}/awips2
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Unpack the source.
|
||||||
|
tar -xf ${source_tar} \
|
||||||
|
-C ${RPM_BUILD_ROOT}/awips2
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Apply the patch.
|
||||||
|
pushd .
|
||||||
|
cd ${RPM_BUILD_ROOT}/awips2/openfire
|
||||||
|
patch -p1 -i ${patch_file0}
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
popd
|
||||||
|
|
||||||
|
exit 0
|
|
@ -190,6 +190,7 @@ buildRPM "Installer.notification"
|
||||||
buildRPM "Installer.pypies"
|
buildRPM "Installer.pypies"
|
||||||
buildRPM "Installer.rcm"
|
buildRPM "Installer.rcm"
|
||||||
buildRPM "Installer.localapps-environment"
|
buildRPM "Installer.localapps-environment"
|
||||||
|
buildRPM "Installer.xmpp"
|
||||||
|
|
||||||
unset AWIPSII_VERSION
|
unset AWIPSII_VERSION
|
||||||
unset AWIPSII_RELEASE
|
unset AWIPSII_RELEASE
|
||||||
|
|
Loading…
Add table
Reference in a new issue