Implemented spec file changes suggested by SuSE to make the
RPMs more solid.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 2 11:47:16 MDT 2006 - jluciani@novell.com
|
||||
|
||||
- Made spec file modifications suggested by SuSE. The changes entailed
|
||||
leveraging RPM macros instead of using my own scripts to make the
|
||||
RPM more solid.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 14 17:41:40 MDT 2006 - jluciani@novell.com
|
||||
|
||||
|
||||
@@ -154,6 +154,7 @@ export NO_BRP_CHECK_BYTECODE_VERSION="true"
|
||||
## Prime the file system ##
|
||||
install -d %{buildroot}%{prefix}
|
||||
install -d %{buildroot}%{prefix}/bin
|
||||
install -d %{buildroot}%{prefix}/sbin
|
||||
install -d %{buildroot}%{prefix}/%{_lib}
|
||||
install -d %{buildroot}/%{_lib}/security
|
||||
install -d %{buildroot}%{prefix}/include
|
||||
@@ -192,6 +193,8 @@ install -m 755 bin/%{cfg}/CasaAuthtokenValidateD %{buildroot}%{prefix}/bin/casa_
|
||||
# Others
|
||||
install -m 644 server/AuthTokenValidate/idenTokenProviders/casa/linux/CasaIdentityToken.conf %{buildroot}/etc/CASA/authtoken.d/modules.d/CasaIdentityToken.conf
|
||||
install -m 755 server/AuthTokenValidate/Svc/linux/CasaAuthtokenValidateD %{buildroot}/etc/init.d/casa_atvd
|
||||
install -m 750 server/AuthTokenValidate/Svc/linux/envvars %{buildroot}/etc/CASA/authtoken.d/validate.d/
|
||||
ln -sf casa_atvd %{buildroot}%{prefix}/sbin/rccasa_atvd
|
||||
|
||||
## CASA_auth_token_pam_support ##
|
||||
# Libs
|
||||
@@ -235,106 +238,28 @@ fi
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
CAVD_ETC_DIR=/etc/CASA/authtoken.d/validate.d
|
||||
|
||||
setup_casa_atvd_env()
|
||||
{
|
||||
# Save copy of enviroments file if it already exists
|
||||
if [ -f $CAVD_ETC_DIR/envvars ]; then
|
||||
mv $CAVD_ETC_DIR/envvars $CAVD_ETC_DIR/envvars.bak
|
||||
fi
|
||||
|
||||
# Create envvars file
|
||||
cat > $CAVD_ETC_DIR/envvars <<!
|
||||
############################################################
|
||||
# #
|
||||
# Environment variable file for casa_atvd. #
|
||||
# #
|
||||
# Note: This file is sourced by the casa_atvd rc script #
|
||||
# when starting the service. #
|
||||
# #
|
||||
# The following variables are utilized by the daemon #
|
||||
# and its rc script: #
|
||||
# #
|
||||
# DAEMON_NO_AUTORESTART_AFTER_CRASH - #
|
||||
# #
|
||||
# Set this variable to "1" if you want to disable the #
|
||||
# auto-restart daemon after abnormal termination #
|
||||
# feature. This variable is intended to facilitate #
|
||||
# the discovery of problems during quality assurance #
|
||||
# testing. Disabling of the auto-restart daemon after #
|
||||
# abnormal termination feature will result in a #
|
||||
# configuration that is less fault tolerant. #
|
||||
# #
|
||||
# DAEMON_COREDUMPS_WANTED - #
|
||||
# #
|
||||
# Set this variable to allow core dumps to be taken #
|
||||
# when a daemon terminates abnormally. This variable #
|
||||
# is only meaningful when the auto-restart daemon #
|
||||
# feature mentioned above is enabled. Core dumps are #
|
||||
# allowed to be taken when the auto-restart daemon #
|
||||
# feature is disabled. Core dumps of novell-xsrvd #
|
||||
# service processes are taken to the #
|
||||
# /var/novell/xtier folder. #
|
||||
# #
|
||||
############################################################
|
||||
LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}":/usr/lib/jvm/java-1.5.0-ibm/jre/bin:/usr/lib/jvm/java-1.5.0-ibm/jre/bin/classic
|
||||
export LD_LIBRARY_PATH
|
||||
!
|
||||
chmod +x $CAVD_ETC_DIR/envvars
|
||||
}
|
||||
|
||||
# Do not run the rest of the script if this is an upgrade
|
||||
if test "$1" != 1; then
|
||||
setup_casa_atvd_env
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Create link to init.d script in /usr/sbin
|
||||
if [ -f /usr/sbin/rccasa_atvd ] || [ -L /usr/sbin/rccasa_atvd ]; then
|
||||
rm -f /usr/sbin/rccasa_atvd
|
||||
fi
|
||||
ln -s /etc/init.d/casa_atvd /usr/sbin/rccasa_atvd
|
||||
|
||||
setup_casa_atvd_env
|
||||
|
||||
# Install casa_atvd init script
|
||||
/usr/lib/lsb/install_initd /etc/init.d/casa_atvd
|
||||
%{fillup_and_insserv casa_atvd}
|
||||
|
||||
|
||||
%preun
|
||||
|
||||
# Do not run script if this is an install
|
||||
if test "$1" == 1; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Stop casa_atvd
|
||||
/etc/init.d/casa_atvd stop
|
||||
|
||||
# Remove casa_atvd init script
|
||||
/usr/lib/lsb/remove_initd /etc/init.d/casa_atvd
|
||||
|
||||
%stop_on_removal casa_atvd
|
||||
|
||||
%postun
|
||||
%restart_on_update casa_atvd
|
||||
%insserv_cleanup
|
||||
/sbin/ldconfig
|
||||
|
||||
# We just want to start the casa_atvd service if this is an upgrade
|
||||
# Do not do anything else if this is an upgrade
|
||||
if test "$1" == 1; then
|
||||
/etc/init.d/casa_atvd start
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Remove symbolic link to init.d script
|
||||
if [ -f /usr/sbin/rccasa_atvd ] || [ -L /usr/sbin/rccasa_atvd ]; then
|
||||
rm -f /usr/sbin/rccasa_atvd
|
||||
fi
|
||||
|
||||
# Delete the casaatvd user
|
||||
userdel casaatvd
|
||||
|
||||
# Delete the var files
|
||||
rm -rf //var/lib/CASA/authtoken/validate
|
||||
rm -rf /var/lib/CASA/authtoken/validate
|
||||
|
||||
|
||||
%files
|
||||
@@ -359,8 +284,10 @@ rm -rf //var/lib/CASA/authtoken/validate
|
||||
%{prefix}/%{_lib}/libcasa_s_ipc.so
|
||||
%{prefix}/%{_lib}/libcasa_s_ipc.so.1
|
||||
%{prefix}/bin/casa_atvd
|
||||
%config /etc/CASA/authtoken.d/validate.d/envvars
|
||||
/etc/CASA/authtoken.d/modules.d/CasaIdentityToken.conf
|
||||
/etc/init.d/casa_atvd
|
||||
/usr/sbin/rccasa_atvd
|
||||
|
||||
|
||||
## CASA_auth_token_pam_support ##
|
||||
|
||||
Reference in New Issue
Block a user