Issue #1373 - the edexServiceList script will now be packaged in the edex-base and the datadelivery rpms
Former-commit-id:2d9e54ddf8
[formerly9062ed93d7
] [formerly2d9e54ddf8
[formerly9062ed93d7
] [formerlye131b5bc72
[formerly 96fe189b5af5fbf0424504cc0b27d44c1defc0c2]]] Former-commit-id:e131b5bc72
Former-commit-id:ce21e23e52
[formerly8a4bc85bad
] Former-commit-id:d2cd60bb5c
This commit is contained in:
parent
e8d1469a70
commit
a14d25ded0
5 changed files with 163 additions and 75 deletions
|
@ -75,7 +75,7 @@ popd > /dev/null
|
|||
INSTALLER_RPM="%{_baseline_workspace}/rpms"
|
||||
# copy the service script.
|
||||
EDEX_BASE="${INSTALLER_RPM}/awips2.edex/Installer.edex-base"
|
||||
cp -v ${EDEX_BASE}/scripts/init.d/edex_camel \
|
||||
cp -v ${EDEX_BASE}/scripts/init.d/* \
|
||||
%{_build_root}/etc/init.d
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
|
@ -156,4 +156,4 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||
/awips2/edex/bin/*.sh
|
||||
/awips2/edex/bin/linux-x86-%{_build_bits}/wrapper
|
||||
|
||||
%attr(744,root,root) /etc/init.d/edex_camel
|
||||
%attr(744,root,root) /etc/init.d/*
|
|
@ -1,70 +0,0 @@
|
|||
# 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')
|
||||
# Turn off the java jar repack
|
||||
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
|
||||
|
||||
%define _component_name awips2-edex-datadelivery
|
||||
%define _component_project_dir awips2.edex/Installer.edex-datadelivery
|
||||
#
|
||||
# AWIPS II Edex Datadelivery Spec File
|
||||
#
|
||||
Name: %{_component_name}
|
||||
Summary: AWIPS II Edex Dat
|
||||
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: %{_component_name}
|
||||
requires: awips2
|
||||
requires: awips2-edex-base
|
||||
requires: awips2-python
|
||||
requires: awips2-java
|
||||
requires: awips2-psql
|
||||
|
||||
%description
|
||||
AWIPS II Edex Installation - Installs The AWIPS II Edex Datadelivery Plugins.
|
||||
|
||||
%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
|
||||
|
||||
%install
|
||||
DEPLOY_SCRIPT="build.edex/deploy-install.xml"
|
||||
|
||||
# Deploy Edex To Our Temporary Build Directory.
|
||||
/awips2/ant/bin/ant -file ${WORKSPACE_DIR}/${DEPLOY_SCRIPT} \
|
||||
-Dinstall.dir=${RPM_BUILD_ROOT}/awips2/edex \
|
||||
-Dinstaller=true -Dlocal.build=false \
|
||||
-Dcomponent.to.deploy=edex-datadelivery
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
%pre
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%files
|
||||
%defattr(644,awips,fxalpha,755)
|
||||
%dir /awips2
|
||||
%dir /awips2/edex
|
||||
/awips2/edex/*
|
126
rpms/awips2.edex/Installer.edex-datadelivery/datadelivery.patch0
Normal file
126
rpms/awips2.edex/Installer.edex-datadelivery/datadelivery.patch0
Normal file
|
@ -0,0 +1,126 @@
|
|||
diff -crB a/component.spec b/component.spec
|
||||
*** a/component.spec 2013-01-04 11:35:41.000000000 -0600
|
||||
--- b/component.spec 2013-01-04 11:35:57.000000000 -0600
|
||||
***************
|
||||
*** 1,13 ****
|
||||
#
|
||||
! # AWIPS II Edex "component" 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: awips2-%{_component_name}
|
||||
! Summary: awips2-%{_component_name} Installation
|
||||
Version: %{_component_version}
|
||||
Release: %{_component_release}
|
||||
Group: AWIPSII
|
||||
--- 1,13 ----
|
||||
#
|
||||
! # AWIPS II Edex Data Delivery spec file
|
||||
#
|
||||
%define __prelink_undo_cmd %{nil}
|
||||
# Turn off the brp-python-bytecompile script
|
||||
%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: awips2-edex-datadelivery
|
||||
! Summary: awips2-edex-datadelivery Installation
|
||||
Version: %{_component_version}
|
||||
Release: %{_component_release}
|
||||
Group: AWIPSII
|
||||
***************
|
||||
*** 18,24 ****
|
||||
Vendor: Raytheon
|
||||
Packager: Bryan Kowal
|
||||
|
||||
! provides: awips2-%{_component_name}
|
||||
requires: awips2
|
||||
requires: awips2-edex-base
|
||||
requires: awips2-python
|
||||
--- 18,24 ----
|
||||
Vendor: Raytheon
|
||||
Packager: Bryan Kowal
|
||||
|
||||
! provides: awips2-edex-datadelivery
|
||||
requires: awips2
|
||||
requires: awips2-edex-base
|
||||
requires: awips2-python
|
||||
***************
|
||||
*** 40,57 ****
|
||||
rm -rf %{_build_root}
|
||||
fi
|
||||
mkdir -p %{_build_root}
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
!
|
||||
! unzip %{_baseline_workspace}/build.edex/edex/dist/%{_component_name}.zip \
|
||||
-d %{_build_root}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
%pre
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
--- 40,80 ----
|
||||
rm -rf %{_build_root}
|
||||
fi
|
||||
mkdir -p %{_build_root}
|
||||
+ # prepare the init.d directory path
|
||||
+ mkdir -p %{_build_root}/etc/init.d
|
||||
+ if [ $? -ne 0 ]; then
|
||||
+ exit 1
|
||||
+ fi
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
! unzip %{_baseline_workspace}/build.edex/edex/dist/edex-datadelivery.zip \
|
||||
-d %{_build_root}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
+ # include the init.d script
|
||||
+ INSTALLER_RPM="%{_baseline_workspace}/rpms"
|
||||
+ EDEX_DATADELIVERY="${INSTALLER_RPM}/awips2.edex/Installer.edex-datadelivery"
|
||||
+ cp -v ${EDEX_DATADELIVERY}/scripts/init.d/* \
|
||||
+ %{_build_root}/etc/init.d
|
||||
+ if [ $? -ne 0 ]; then
|
||||
+ exit 1
|
||||
+ fi
|
||||
+
|
||||
%pre
|
||||
+ # since, we will be overriding the services that are started
|
||||
+ # we will begin by removing any existing edexServiceList scripts
|
||||
+ if [ -f /etc/init.d/edexServiceList ]; then
|
||||
+ rm -f /etc/init.d/edexServiceList
|
||||
+ if [ $? -ne 0 ]; then
|
||||
+ # fail the install
|
||||
+ exit 1
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
%post
|
||||
%preun
|
||||
%postun
|
||||
***************
|
||||
*** 63,66 ****
|
||||
%defattr(644,awips,fxalpha,755)
|
||||
%dir /awips2
|
||||
%dir /awips2/edex
|
||||
! /awips2/edex/*
|
||||
\ No newline at end of file
|
||||
--- 86,91 ----
|
||||
%defattr(644,awips,fxalpha,755)
|
||||
%dir /awips2
|
||||
%dir /awips2/edex
|
||||
! /awips2/edex/*
|
||||
!
|
||||
! %attr(744,root,root) /etc/init.d/*
|
||||
\ No newline at end of file
|
|
@ -80,6 +80,26 @@ else
|
|||
echo "Building for architecture ... ${EDEX_BUILD_ARCH}."
|
||||
fi
|
||||
|
||||
function patchDDSpecification()
|
||||
{
|
||||
# copy the standard rpm feature specification into the
|
||||
# data delivery rpm project directory
|
||||
cp -v Installer.edex-component/component.spec \
|
||||
Installer.edex-datadelivery/component.spec
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# apply the specification patch
|
||||
pushd . > /dev/null 2>&1
|
||||
cd Installer.edex-datadelivery
|
||||
patch -p1 -i datadelivery.patch0
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
popd > /dev/null 2>&1
|
||||
}
|
||||
|
||||
function buildRPM()
|
||||
{
|
||||
# Arguments:
|
||||
|
@ -134,9 +154,17 @@ cd ../
|
|||
buildRPM "Installer.edex-base"
|
||||
buildRPM "Installer.edex-configuration"
|
||||
buildRPM "Installer.edex-shapefiles"
|
||||
# only build edex-datadelivery if it is present
|
||||
# (this logic will be removed once edex-datadelivery has been integrated)
|
||||
if [ -f ${WORKSPACE}/build.edex/edex/dist/edex-datadelivery.zip ]; then
|
||||
# build the edex-datadelivery rpm
|
||||
export COMPONENT_NAME="edex-datadelivery"
|
||||
patchDDSpecification
|
||||
buildRPM "Installer.edex-datadelivery"
|
||||
unset COMPONENT_NAME
|
||||
fi
|
||||
# For, now edex-native is always a 32-bit rpm.
|
||||
export TARGET_BUILD_ARCH="i386"
|
||||
##buildRPM "Installer.edex-ost"
|
||||
buildRPM "Installer.edex-native"
|
||||
# Reset the target architecture for the remaining rpms.
|
||||
setTargetArchitecture
|
||||
|
@ -145,7 +173,11 @@ DIST="${WORKSPACE}/build.edex/edex/dist"
|
|||
for edex_zip in `cd ${DIST}; ls -1;`;
|
||||
do
|
||||
edex_component=`python -c "zipFile='${edex_zip}'; componentName=zipFile.replace('.zip',''); print componentName;"`
|
||||
# do not build edex-datadelivery since it is now built differently from the other edex feature rpms
|
||||
# since this is currently the only case, the exclusion will be hard-coded
|
||||
|
||||
export COMPONENT_NAME="${edex_component}"
|
||||
buildRPM "Installer.edex-component"
|
||||
if [ ! "${edex_component}" = "edex-datadelivery" ]; then
|
||||
export COMPONENT_NAME="${edex_component}"
|
||||
buildRPM "Installer.edex-component"
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue