rpm cleaup for localization, edex, database

This commit is contained in:
mjames-upc 2018-07-24 15:42:53 -06:00
parent 355812c028
commit db958436d6
3 changed files with 3 additions and 22 deletions

View file

@ -65,9 +65,6 @@ cp -p %{_baseline_workspace}/${CONFIGURATION_DIR}/*.{key,crt} \
cp %{_baseline_workspace}/${CONFIGURATION_DIR}/${CONF_FILE} \
${RPM_BUILD_ROOT}/awips2/database/data
#cp %{_baseline_workspace}/installers/Linux/.global \
# ${RPM_BUILD_ROOT}/awips2/database
PATH_TO_DDL="build.edex/opt/db/ddl"
PATH_TO_REPLICATION="build.edex/opt/db/replication"
@ -298,18 +295,12 @@ su - ${AWIPS_DEFAULT_USER} -c \
"${SQL_SHARE_DIR}/createClimateDB.sh ${PSQL_INSTALL} ${POSTGRESQL_INSTALL} ${AWIPS_DEFAULT_PORT} ${AWIPS_DEFAULT_DB_ADMIN} ${SQL_SHARE_DIR} ${SQL_LOG}" > /dev/null 2>&1
# install replication role if this is a central registry server
#source /awips2/database/.global 2>/dev/null
#if [ -e /awips2/fxa/INSTALL/awips2/scripts/.global ]; then
# source /awips2/fxa/INSTALL/awips2/scripts/.global
#fi
#case $SITE_IDENTIFIER in
# ${centralCaseArray} )
# execute_psql_sql_script ${SQL_SHARE_DIR}/createReplicationRole.sql metadata
# ;;
# *) ;;
#esac
#
#rm -f /awips2/database/.global
${SQL_SHARE_DIR}/alter_database_roles_and_permissions.sh > /dev/null 2>&1

View file

@ -262,18 +262,6 @@ function importShapefiles() {
return 0
}
function removeHydroDbDirectory(){
# remove the hydro db directory since it is not officially part of the localization.
if [ -d ${hydro_db_directory} ]; then
rm -rf ${hydro_db_directory}
if [ $? -ne 0 ]; then
echo "WARNING: Failed to remove hydro db directory from localization."
echo " Please remove directory manually: ${hydro_db_directory}."
fi
fi
return 0
}
function restoreHydroDb(){
if [ ! -d ${hydro_db_directory} ]; then
return 0
@ -300,7 +288,6 @@ function restoreHydroDb(){
prepare_pg
importShapefiles
restoreHydroDb
removeHydroDbDirectory
stop_pg
exit 0

View file

@ -124,6 +124,9 @@ fi
%pre
%post
if [ ! -d /awips2/edex/data/archive ]; then
mkdir -p /awips2/edex/data/archive
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