Implemented spec file changes suggested by SuSE to make the
RPMs more solid.
This commit is contained in:
parent
af226ee216
commit
fa466d3af5
@ -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 ##
|
||||
|
@ -23,10 +23,14 @@
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
CFLAGS += -v -w
|
||||
DEFINES = -DDBG
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
DEFINES = -DNDEBUG
|
||||
endif
|
||||
|
||||
CFLAGS += -Wno-format-extra-args -fno-strict-aliasing
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
DIST_SUBDIRS =
|
||||
@ -53,7 +57,6 @@ CFILES = ../mod_authn_casa.c
|
||||
CSFILES_CSC :=
|
||||
INCLUDES = -I. -I$(ROOT)/include -I$(APACHEINCLUDE) -I$(APRINCLUDE)
|
||||
RESOURCES =
|
||||
DEFINES = -Wno-format-extra-args -fno-strict-aliasing
|
||||
|
||||
CFLAGS += $(INCLUDES) $(DEFINES) -D_LARGEFILE64_SOURCE
|
||||
LIBS = -lpthread -lcasa_s_authtoken -lapr-1 -laprutil-1
|
||||
|
@ -29,6 +29,8 @@ TARGET_CFG = Release
|
||||
DEFINES = -DNDEBUG
|
||||
endif
|
||||
|
||||
CFLAGS += -Wno-format-extra-args -fno-strict-aliasing -fshort-wchar
|
||||
|
||||
# Override the link setting for C++
|
||||
LINK = g++
|
||||
|
||||
@ -55,7 +57,6 @@ CPPFILES = server.cpp
|
||||
CSFILES_CSC :=
|
||||
INCLUDES = -I. -I$(ROOT)/include -I$(JAVA_INCDIR)
|
||||
RESOURCES =
|
||||
DEFINES += -fno-strict-aliasing -fshort-wchar
|
||||
CFLAGS += $(INCLUDES) $(DEFINES)
|
||||
CPPFLAGS += -fPIC $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
|
||||
LIBS = -lpthread -lcasa_s_ipc -ljvm -ljsig -lj9thr23
|
||||
@ -64,7 +65,7 @@ LDFLAGS = -L$(LIBDIR)/$(TARGET_CFG) -L$(JAVA_LIBDIR) -L$(JAVA_LIBDIR)/classic
|
||||
OBJDIR = ./$(TARGET_CFG)/$(LIB)
|
||||
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o)) $(addprefix $(OBJDIR)/, $(CPPFILES:%.cpp=%.o))
|
||||
|
||||
EXTRA_DIST = $(CFILES) $(CPPFILES) *.h CasaAuthtokenValidateD
|
||||
EXTRA_DIST = $(CFILES) $(CPPFILES) *.h CasaAuthtokenValidateD envvars
|
||||
|
||||
CUR_DIR := $(shell pwd)
|
||||
|
||||
|
@ -0,0 +1,35 @@
|
||||
############################################################
|
||||
# #
|
||||
# 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
|
||||
|
@ -23,10 +23,14 @@
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
CFLAGS += -v -w
|
||||
DEFINES = -DDBG
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
DEFINES = -DNDEBUG
|
||||
endif
|
||||
|
||||
CFLAGS += -Wno-format-extra-args -fno-strict-aliasing
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
DIST_SUBDIRS =
|
||||
@ -55,7 +59,6 @@ CFILES = ../config.c \
|
||||
CSFILES_CSC :=
|
||||
INCLUDES = -I. -I.. -I$(CASAINCLUDE) -I../../../include
|
||||
RESOURCES =
|
||||
DEFINES = -fno-strict-aliasing
|
||||
if LIB64
|
||||
DEFINES += -D_LIB64
|
||||
endif
|
||||
|
@ -23,10 +23,14 @@
|
||||
if DEBUG
|
||||
TARGET_CFG = Debug
|
||||
CFLAGS += -v -w
|
||||
DEFINES = -DDBG
|
||||
else
|
||||
TARGET_CFG = Release
|
||||
DEFINES = -DNDEBUG
|
||||
endif
|
||||
|
||||
CFLAGS += -Wno-format-extra-args -fno-strict-aliasing
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
DIST_SUBDIRS =
|
||||
@ -51,7 +55,6 @@ CFILES = ../pam_authtoken.c
|
||||
CSFILES_CSC :=
|
||||
INCLUDES = -I. -I$(CASAINCLUDE) -I../../../include
|
||||
RESOURCES =
|
||||
DEFINES = -Wno-format-extra-args -fno-strict-aliasing
|
||||
|
||||
CFLAGS += $(INCLUDES) $(DEFINES)
|
||||
LIBS = -lpthread -lpam -lcasa_s_authtoken
|
||||
|
Loading…
Reference in New Issue
Block a user