awips2/rpms/awips2.edex/Installer.edex-datadelivery/datadelivery.patch0
Greg Armendariz 8c38289cf7 Omaha #4065 - Update EDEX RPM install to modify date stamp
Change-Id: I425408d1d038194207469f187be74f8c88f5d3c0

Former-commit-id: 83243af002e8ddfd15f899ff1ab3e511cf5a0af4
2015-02-03 10:12:54 -06:00

140 lines
3.7 KiB
Text

*** Installer.edex-component/component.spec 2015-02-02 15:31:30.696998251 -0600
--- Installer.edex-datadelivery/component.spec 2015-02-02 15:35:06.923609297 -0600
***************
*** 6,13 ****
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
! Name: awips2-%{_component_name}
! Summary: awips2-%{_component_name} Installation
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
--- 6,13 ----
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
! 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
***************
*** 47,59 ****
if [ $? -ne 0 ]; then
exit 1
fi
! unzip %{_baseline_workspace}/build.edex/edex/dist/%{_component_name}.zip \
-d %{_build_root}
if [ $? -ne 0 ]; then
exit 1
fi
#create a list of all files packaged for /awips2/edex/data/utility
UTILITY=/awips2/edex/data/utility
--- 47,77 ----
if [ $? -ne 0 ]; then
exit 1
fi
+ # prepare the init.d directory path
+ mkdir -p %{_build_root}/etc/init.d
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
! 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
+ # rename the script to prevent naming conflicts during installation
+ pushd . > /dev/null 2>&1
+ cd %{_build_root}/etc/init.d
+ mv edexServiceList edexServiceList-datadelivery
+ popd > /dev/null 2>&1
#create a list of all files packaged for /awips2/edex/data/utility
UTILITY=/awips2/edex/data/utility
***************
*** 64,70 ****
%pre
%post
!
#change date stamp of utility files
UTILITY=/awips2/edex/data/utility
--- 82,98 ----
%pre
%post
! # replace the service list script with the datadelivery service list script
! if [ -f /etc/init.d/edexServiceList ]; then
! mv /etc/init.d/edexServiceList /etc/init.d/edexServiceList.orig
! if [ $? -ne 0 ]; then
! exit 1
! fi
! fi
! mv /etc/init.d/edexServiceList-datadelivery /etc/init.d/edexServiceList
! if [ $? -ne 0 ]; then
! exit 1
! fi
#change date stamp of utility files
UTILITY=/awips2/edex/data/utility
***************
*** 78,83 ****
--- 106,122 ----
fi
%preun
+ if [ "${1}" = "1" ]; then
+ exit 0
+ fi
+ # restore the original service list script with the datadelivery service list script
+ if [ -f /etc/init.d/edexServiceList.orig ]; then
+ mv /etc/init.d/edexServiceList.orig /etc/init.d/edexServiceList
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ fi
+
%postun
%clean
***************
*** 88,90 ****
--- 127,131 ----
%dir /awips2
%dir /awips2/edex
/awips2/edex/*
+
+ %attr(744,root,root) /etc/init.d/*