File CASA_auth_token_server.spec of Package CASA_auth_token_server

#
# spec file for package CASA_auth_token_server (Version 1.7.1587 )
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           CASA_auth_token_server
%define cfg Release
%define debug_opt ""
Url:            http://www.novell.com/products
BuildRequires:  CASA-devel apache2-devel expat gcc-c++ glib2-devel java-sdk >= 1.5 libstdc++ libstdc++-devel mono-devel pam-devel pkgconfig pwdutils sysvinit update-alternatives
%define prefix /usr
License:        LGPL v2.1 or later
Group:          System/Libraries
AutoReqProv:    on
%define	        bldno	1.7.1587
Version:        1.7.1587 
Release:        1
Summary:        Novell CASA Authentication Token Libraries for C/C++ Server Applications
Source:         %{name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       jre >= 1.5.0
%if %suse_version < 1030
Requires:       expat binutils CASA_auth_token_jaas_support sysvinit insserv
%else
Requires:       expat binutils CASA_auth_token_jaas_support insserv
%endif
PreReq:         %fillup_prereq %insserv_prereq
PreReq:         /usr/bin/awk, /usr/bin/test, /bin/grep, /bin/cat, /usr/bin/install, /bin/pwd
PreReq:         /usr/sbin/groupadd, /usr/sbin/useradd, /usr/sbin/userdel, /usr/bin/getent

%description
CASA_auth_token is an authentication token infrastructure with support
for multiple authentication mechanisms with an emphasis on providing a
scalable single sign-on solution.

A key feature of CASA_auth_token is that its authentication tokens
contain identity information about the entity being authenticated. This
information is made available to the consuming services. The amount of
information contained in the tokens is configured on a per-service
basis. Because of this feature, we say that CASA_auth_token projects an
"Authenticated Identity".

The CASA_auth_token_server package contains the CASA (Common
Authentication Services Adapter) authentication token infrastructure
lower level libraries for token verification from native code ("C"). It
is recomended that this library not be invoked directly by
applications, instead it is recomended that appplication invoke its
services through the support modules provided to integrate with PAM or
the Apache Web Server.



Authors:
--------
    Juan Carlos Luciani - jluciani@novell.com

%package -n CASA_auth_token_pam_support
License:        LGPL v2.1 or later
Summary:        Novell CASA Authentication Token PAM Support Components
Group:          System/Libraries
Requires:       CASA_auth_token_server pam

%description -n CASA_auth_token_pam_support
CASA_auth_token is an authentication token infrastructure with support
for multiple authentication mechanisms with an emphasis on providing a
scalable single sign-on solution.

A key feature of CASA_auth_token is that its authentication tokens
contain identity information about the entity being authenticated. This
information is made available to the consuming services. The amount of
information contained in the tokens is configured on a per-service
basis. Because of this feature, we say that CASA_auth_token projects an
"Authenticated Identity".

The CASA_auth_token_pam_support package contains the CASA (Common
Authentication Services Adapter) authentication token infrastructure
PAM module for token verification.



Authors:
--------
    Juan Carlos Luciani - jluciani@novell.com

%package -n CASA_auth_token_apache2_2_support
License:        LGPL v2.1 or later
Summary:        Novell CASA Authentication Token Apache2_2 Support Components
Group:          System/Libraries
Requires:       apache2 CASA_auth_token_server

%description -n CASA_auth_token_apache2_2_support
CASA_auth_token is an authentication token infrastructure with support
for multiple authentication mechanisms with an emphasis on providing a
scalable single sign-on solution.

A key feature of CASA_auth_token is that its authentication tokens
contain identity information about the entity being authenticated. This
information is made available to the consuming services. The amount of
information contained in the tokens is configured on a per-service
basis. Because of this feature, we say that CASA_auth_token projects an
"Authenticated Identity".

The CASA_auth_token_apache2_2_support package contains the CASA (Common
Authentication Services Adapter) authentication token infrastructure
Apache v2.2 authentication provider module for token verification. The
module expects that users authenticate utilizing the HTTP Basic
authentication scheme and that the password utilized consist of a CASA
authentication token. Information about the authenticated identity is
made available to other Apache modules via the Apache request
environment variable.



Authors:
--------
    Juan Carlos Luciani - jluciani@novell.com

%package -n CASA_auth_token_server-devel
License:        LGPL v2.1 or later
Summary:        Novell CASA Authentication Token Server Development Files
Group:          Development/Libraries/C and C++
Requires:       CASA-devel CASA_auth_token_server CASA_auth_token_jaas_support CASA_auth_token_pam_support CASA_auth_token_apache2_2_support

%description -n CASA_auth_token_server-devel
CASA_auth_token is an authentication token infrastructure with support
for multiple authentication mechanisms with an emphasis on providing a
scalable single sign-on solution.

A key feature of CASA_auth_token is that its authentication tokens
contain identity information about the entity being authenticated. This
information is made available to the consuming services. The amount of
information contained in the tokens is configured on a per-service
basis. Because of this feature, we say that CASA_auth_token projects an
"Authenticated Identity".

The CASA_auth_token_server-devel package contains the files necessary
for the development of server applications that utilize the CASA
(Common Authentication Service Adapter) authentication token
infrastructure for authentication.



Authors:
--------
    Juan Carlos Luciani - jluciani@novell.com

%prep
%setup -q
#%patch
%if %{_lib} == "lib64"
%define binsource bin64
%else
%define binsource bin
%endif

%build
export PATH=.:$PATH:/usr/%_lib/qt3/bin
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -fstack-protector"
./autogen.sh 
make

%install
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}%{prefix}/%{_lib}/CASA
install -d %{buildroot}%{prefix}/%{_lib}/CASA/authtoken
install -d %{buildroot}/%{_lib}/security
install -d %{buildroot}%{prefix}/include
install -d %{buildroot}/etc/init.d
install -d %{buildroot}/etc/ld.so.conf.d
install -d %{buildroot}/var
install -d %{buildroot}/var/lib
install -d -m 755 %{buildroot}/var/lib/CASA
install -d -m 755 %{buildroot}/var/lib/CASA/authtoken
install -d -m 755 %{buildroot}/var/lib/CASA/authtoken/validate
install -d -m 755 %{buildroot}/etc/CASA
install -d -m 755 %{buildroot}/etc/CASA/authtoken
install -d -m 755 %{buildroot}/etc/CASA/authtoken/validate
install -d -m 755 %{buildroot}/etc/CASA/authtoken/modules
## CASA_auth_token_server ##
# Libs
install -m 755 %{_lib}/%{cfg}/libcasa_s_authtoken.so %{buildroot}%{prefix}/%{_lib}/libcasa_s_authtoken.so.%{bldno}
install -m 755 %{_lib}/%{cfg}/casa_iden_token.so %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so.%{bldno}
install -m 755 %{_lib}/%{cfg}/libcasa_c_ipc.so %{buildroot}%{prefix}/%{_lib}/libcasa_c_ipc.so.%{bldno}
install -m 755 %{_lib}/%{cfg}/libcasa_s_ipc.so %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so.%{bldno}
# Symbolic Links
ln -sf casa_iden_token.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so
ln -sf casa_iden_token.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so.1
ln -sf libcasa_s_authtoken.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_authtoken.so.1
ln -sf libcasa_c_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_c_ipc.so.1
ln -sf libcasa_s_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so.1
# Bins
install -m 755 %{binsource}/%{cfg}/CasaAuthtokenValidateD %{buildroot}%{prefix}/bin/casa_atvd
# Others
install -m 644 %{_lib}/%{cfg}/CasaIdentityToken.conf %{buildroot}/etc/CASA/authtoken/modules/CasaIdentityToken.conf
install -m 755 AuthTokenValidate/Svc/linux/CasaAuthtokenValidateD %{buildroot}/etc/init.d/casa_atvd
install -m 640 AuthTokenValidate/Svc/linux/envvars %{buildroot}/etc/CASA/authtoken/validate/
ln -sf casa_atvd %{buildroot}%{prefix}/sbin/rccasa_atvd
## CASA_auth_token_pam_support ##
# Libs
install -m 755 %{_lib}/%{cfg}/pam_casaauthtok.so %{buildroot}/%{_lib}/security/pam_casaauthtok.so
## CASA_auth_token_apache2_2_support ##
# Libs
install -m 755 %{_lib}/%{cfg}/mod_authn_casa.so %{buildroot}%{prefix}/%{_lib}/mod_authn_casa.so.%{bldno}
# Symbolic Links
ln -sf mod_authn_casa.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/mod_authn_casa.so
ln -sf mod_authn_casa.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/mod_authn_casa.so.1
## CASA_auth_token_server-devel ##
# Header Files
install -m 644 include/casa_s_authtoken.h %{buildroot}%{prefix}/include
install -m 644 include/casa_c_ipc.h %{buildroot}%{prefix}/include
install -m 644 include/casa_s_ipc.h %{buildroot}%{prefix}/include
# Symbolic Links
ln -sf libcasa_s_authtoken.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_authtoken.so
ln -sf libcasa_c_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_c_ipc.so
ln -sf libcasa_s_ipc.so.%{bldno} %{buildroot}%{prefix}/%{_lib}/libcasa_s_ipc.so

%clean
rm -rf $RPM_BUILD_ROOT
## CASA_auth_token_server ##

%pre
# Do necessary user and group administration
group_present=`getent group | grep ^casaauth`
if [ -z "$group_present" ] ; then
        /usr/sbin/groupadd -r casaauth
fi
user_present=`getent passwd | grep ^casaatvd`
if [ -z "$user_present" ] ; then
        /usr/sbin/useradd -c "casa_atvd System User" -s /bin/false -r -d /var/lib/CASA/authtoken/validate -g casaauth casaatvd 2> /dev/null || :
fi

%post
/sbin/ldconfig
# Install casa_atvd init script, set it to start by default.
%{fillup_and_insserv -y casa_atvd}

%preun
%stop_on_removal casa_atvd

%postun
%restart_on_update casa_atvd 
%insserv_cleanup
/sbin/ldconfig
# Do not do anything else if this is an upgrade
if test "$1" == 1; then
        exit 0
fi
# Delete the var files
rm -rf /var/lib/CASA/authtoken/validate

%files
%defattr(-,root,root)
%dir %{prefix}/%{_lib}/CASA
%dir %{prefix}/%{_lib}/CASA/authtoken
%dir /var/lib/CASA
%dir /var/lib/CASA/authtoken
%dir %attr(-, casaatvd, casaauth) /var/lib/CASA/authtoken/validate
%dir /etc/CASA
%dir /etc/CASA/authtoken
%dir /etc/CASA/authtoken/validate
%dir /etc/CASA/authtoken/modules
%{prefix}/%{_lib}/libcasa_s_authtoken.so.%{bldno}
%{prefix}/%{_lib}/libcasa_s_authtoken.so.1
%{prefix}/%{_lib}/libcasa_c_ipc.so.%{bldno}
%{prefix}/%{_lib}/libcasa_c_ipc.so.1
%{prefix}/%{_lib}/libcasa_s_ipc.so.%{bldno}
%{prefix}/%{_lib}/libcasa_s_ipc.so.1
%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so.%{bldno}
%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so
%{prefix}/%{_lib}/CASA/authtoken/casa_iden_token.so.1
%{prefix}/bin/casa_atvd
%config /etc/CASA/authtoken/validate/envvars
%config /etc/CASA/authtoken/modules/CasaIdentityToken.conf
/etc/init.d/casa_atvd
/usr/sbin/rccasa_atvd
## CASA_auth_token_pam_support ##

%pre -n CASA_auth_token_pam_support
# Nothing to do in this pre script

%post -n CASA_auth_token_pam_support
/sbin/ldconfig

%preun -n CASA_auth_token_pam_support
# Nothing to do in this preun script

%postun -n CASA_auth_token_pam_support
/sbin/ldconfig

%files -n CASA_auth_token_pam_support
%defattr(-,root,root)
%dir /%{_lib}/security
/%{_lib}/security/pam_casaauthtok.so
## CASA_auth_token_apache2_2_support ##

%pre -n CASA_auth_token_apache2_2_support
# Nothing to do in this pre script

%post -n CASA_auth_token_apache2_2_support
/sbin/ldconfig

%preun -n CASA_auth_token_apache2_2_support
# Nothing to do in this preun script

%postun -n CASA_auth_token_apache2_2_support
/sbin/ldconfig

%files -n CASA_auth_token_apache2_2_support
%defattr(-,root,root)
%{prefix}/%{_lib}/mod_authn_casa.so.%{bldno}
%{prefix}/%{_lib}/mod_authn_casa.so
%{prefix}/%{_lib}/mod_authn_casa.so.1
## CASA_auth_token_server-devel ##

%pre -n CASA_auth_token_server-devel
# Nothing to do in this pre script

%post -n CASA_auth_token_server-devel
# Nothing to do in this post script

%preun -n CASA_auth_token_server-devel
# Nothing to do in this preun script

%postun -n CASA_auth_token_server-devel
# Nothing to do in this postun script

%files -n CASA_auth_token_server-devel
%defattr(-,root,root)
%{prefix}/include/casa_s_authtoken.h
%{prefix}/include/casa_c_ipc.h
%{prefix}/include/casa_s_ipc.h
%{prefix}/%{_lib}/libcasa_s_authtoken.so
%{prefix}/%{_lib}/libcasa_c_ipc.so
%{prefix}/%{_lib}/libcasa_s_ipc.so

%changelog
* Mon Sep 08 2008 nds_cm@novell.com
- Remove sysvinit dependency from BuildRequire line.
* Mon Aug 18 2008 jluciani@novell.com
- Removed BuildRequires dependency on insserv.
* Thu Aug 14 2008 ro@suse.de
- use generic tag for java in buildrequires
- try a little harder to find libjvm
* Thu Jun 05 2008 jluciani@novell.com
- Fixed problem that was causing us to incorrectly set JAVA_HOME
  on non-64bit systems were the /usr/lib64 folder exists.
* Tue Jun 03 2008 jluciani@novell.com
- Updated to remove dependency on specific versions of the JVM to
  address BUG 394342.
- Merged changes into our spec file from what was being utilized to
  build the package on openSUSE.
- Fixed build issue to remove the need to utilize patch for building
  component.
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Mon Jan 14 2008 jluciani@novell.com
- Fixed segmentation fault during libclient_ipc un-initialization
  caused when the RemoteEndPoint map destructor was executed before
  the library destructor. This addresses BUG 353752.
* Mon Dec 03 2007 ro@suse.de
- fix build with gcc-4.3
* Mon Apr 02 2007 jluciani@novell.com
- Added pwdutils to BuildRequires to fix a build problem.
* Fri Feb 16 2007 schoi@novell.com
- fix the build failure on x86_64
* Mon Feb 12 2007 jluciani@novell.com
- Removed BuildRequires dependency on glade-sharp.
- Stopped deleting the user casaatvd during RPM un-install to
  avoid issues created when files created by that user are
  orphaned.
* Thu Feb 08 2007 jluciani@novell.com
- Resolved Bug 243162.
* Wed Feb 07 2007 jluciani@novell.com
- Resolved Bug 243159.
* Wed Feb 07 2007 jluciani@novell.com
- Resolved Bugs 243122, 243124, 243125, 243135, 243138, 243142,
  243143, 243144, 243147, 243148, 243155, 243156, 243158.
* Wed Jan 24 2007 jluciani@novell.com
- Made a spec file change to support applications that want to
  dynamically load our libraries.
* Wed Jan 03 2007 jluciani@novell.com
- Fixed casa_atvd not starting by default problem documented
  in BUG228036.
- Fixed problem that was causing token validation to fail because
  the signing certificate had not been imported to the key store
  used for token validations. The issue would be seen whenever
  the CASA_auth_token_jaas_support rpm was installed before running
  the basic ATS setup script. Now, the casa_atvd init.d scrip executes
  the script used to import the certificate as part of its daemon start
  sequence.
* Tue Dec 19 2006 cgardner@novell.com
- Fix build on ix86, require java alsa package.
* Fri Dec 08 2006 jluciani@novell.com
- Made changes resulting from self-code review of the project.
* Mon Dec 04 2006 jluciani@novell.com
- Fixed "Shutting..." rc script output problem documented in
  BUG225027.
* Tue Nov 28 2006 jluciani@novell.com
- Fixed 64-bit platform problems introduced while addressing
  bugs: BUG222541, BUG216949, BUG215221.
* Wed Nov 22 2006 jluciani@novell.com
- Resolved the following bugs: BUG222541, BUG216949, BUG215221.
* Tue Nov 21 2006 jluciani@novell.com
- Fixed makefile issue.
* Fri Nov 17 2006 jluciani@novell.com
- Removed hard dependency on IBM JVM.
* Mon Nov 13 2006 jluciani@novell.com
- Separated the non-java folder into client and server projects in
  order to better support distributions that target desktops.
  From now on, this changes files will only contain information
  that applies to the server project.
* Thu Nov 09 2006 jluciani@novell.com
- Finished the changes to enable client/ATS communications
  over SSL.
* Tue Nov 07 2006 jluciani@novell.com
- Made changes to enable client/ats communication over SSL. (Not quite
  done with this yet).
- Updated the make system to allow Windows builds to be made from
  the command line using Cygwin.
* Thu Oct 19 2006 jluciani@novell.com
- Created client-devel RPM.
- Made changes to conform to updates made to the Java components
  with regard to the layout of files.
* Tue Oct 10 2006 jluciani@novell.com
- Brought up to date the README and TODO files.
* Mon Oct 09 2006 jluciani@novell.com
- Cleaned up compiler warnings that were present in some of the
  components.
* Fri Oct 06 2006 schoi@novell.com
- Add the CASA build check as dependency in spec file
* Thu Oct 05 2006 jluciani@novell.com
- Ported the client to Linux and created the CASA_auth_token_client package.
* Mon Oct 02 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 2006 jluciani@novell.com
- Added rc script for Validate AuthToken Service.
* Thu Sep 14 2006 jluciani@novell.com
- Created the Validate AuthToken Service and made all of the necessary changes
  to allow it to be consumed by the AuthTokenValidate library.
- Also made necessary spec file changes to support our configuration.
* Tue Sep 05 2006 jluciani@novell.com
- Created client/server IPC libraries that will be utilized by libcasa_s_authtoken
  to communicate with the Java Validate AuthToken Service (yet to be created) over
  DOMAIN sockets. The service will utilize the libraries via JNI to be able to
  process requests sent using DOMAIN sockets.
* Tue Aug 15 2006 schoi@novell.com
- Fixed CASA_auth_token_devel build requirement for CASA_auth_token_svc
* Mon Aug 07 2006 schoi@novell.com
- This file has been created for CASA_auth_token_native project for the first
  time.
openSUSE Build Service is sponsored by