b93447
Name:           jss
b93447
Version:        4.2.6
5c8bc9
Release:        33%{?dist}
b93447
Summary:        Java Security Services (JSS)
b93447
b93447
Group:          System Environment/Libraries
b93447
License:        MPLv1.1 or GPLv2+ or LGPLv2+
b93447
URL:            http://www.mozilla.org/projects/security/pki/jss/
b93447
# The source for this package was pulled from upstream's cvs. Use the
b93447
# following commands to generate the tarball:
b93447
# cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot export -r JSS_4_2_6_RTM -d jss-4.2.6 -N mozilla/security/coreconf mozilla/security/jss
b93447
# tar -czvf jss-4.2.6.tar.gz jss-4.2.6
b93447
Source0:        http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}-%{release}/%{name}-%{version}.tar.gz
b93447
Source1:        http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}-%{release}/MPL-1.1.txt
b93447
Source2:        http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}-%{release}/gpl.txt
b93447
Source3:        http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}-%{release}/lgpl.txt
b93447
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
b93447
b93447
BuildRequires:  nss-devel >= 3.12.3.99
b93447
BuildRequires:  nspr-devel >= 4.6.99
b93447
BuildRequires:  java-devel
b93447
Requires:       java
b93447
Requires:       nss >= 3.12.3.99
b93447
b93447
Patch1:         jss-key_pair_usage_with_op_flags.patch
b93447
Patch2:         jss-javadocs-param.patch
b93447
Patch3:         jss-ipv6.patch
b93447
Patch4:         jss-ECC-pop.patch
b93447
Patch5:         jss-loadlibrary.patch
b93447
Patch6:         jss-ocspSettings.patch
b93447
Patch7:         jss-ECC_keygen_byCurveName.patch
b93447
Patch8:         jss-VerifyCertificate.patch
b93447
Patch9:         jss-bad-error-string-pointer.patch
b93447
Patch10:        jss-VerifyCertificateReturnCU.patch
b93447
#Patch11:        jss-slots-not-freed.patch
b93447
Patch12:        jss-ECC-HSM-FIPS.patch
b93447
Patch13:        jss-eliminate-native-compiler-warnings.patch
b93447
Patch14:        jss-eliminate-java-compiler-warnings.patch
b93447
Patch15:        jss-PKCS12-FIPS.patch
b93447
Patch16:        jss-eliminate-native-coverity-defects.patch
b93447
Patch17:        jss-PBE-PKCS5-V2-secure-P12.patch
b93447
Patch18:        jss-wrapInToken.patch
b93447
Patch19:        jss-HSM-manufacturerID.patch
b93447
Patch20:        jss-ECC-Phase2KeyArchivalRecovery.patch
b93447
Patch21:        jss-undo-JCA-deprecations.patch
b93447
Patch22:        jss-undo-BadPaddingException-deprecation.patch
b93447
Patch23:        jss-fixed-build-issue-on-F17-or-newer.patch
b93447
b93447
b93447
%description
b93447
Java Security Services (JSS) is a java native interface which provides a bridge
b93447
for java-based applications to use native Network Security Services (NSS).
b93447
This only works with gcj. Other JREs require that JCE providers be signed.
b93447
b93447
%package javadoc
b93447
Summary:        Java Security Services (JSS) Javadocs
b93447
Group:          Documentation
b93447
Requires:       jss = %{version}-%{release}
b93447
b93447
%description javadoc
b93447
This package contains the API documentation for JSS.
b93447
b93447
%prep
b93447
%setup -q
b93447
%patch1 -p1
b93447
%patch2 -p1
b93447
%patch3 -p1
b93447
%patch4 -p1
b93447
%patch5 -p1
b93447
%patch6 -p1
b93447
%patch7 -p1
b93447
%patch8 -p1
b93447
%patch9 -p1
b93447
%patch10 -p1
b93447
#%patch11 -p1
b93447
%patch12 -p1
b93447
%patch13 -p1
b93447
%patch14 -p1
b93447
%patch15 -p1
b93447
%patch16 -p1
b93447
%patch17 -p1
b93447
%patch18 -p1
b93447
%patch19 -p1
b93447
%patch20 -p1
b93447
%patch21 -p1
b93447
%patch22 -p1
b93447
%patch23 -p1
b93447
b93447
%build
b93447
[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java
b93447
b93447
# Enable compiler optimizations and disable debugging code
b93447
BUILD_OPT=1
b93447
export BUILD_OPT
b93447
b93447
# Generate symbolic info for debuggers
b93447
XCFLAGS="-g $RPM_OPT_FLAGS"
b93447
export XCFLAGS
b93447
b93447
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
b93447
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
b93447
b93447
export PKG_CONFIG_ALLOW_SYSTEM_LIBS
b93447
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
b93447
b93447
NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nspr | sed 's/-I//'`
b93447
NSPR_LIB_DIR=`/usr/bin/pkg-config --libs-only-L nspr | sed 's/-L//'`
b93447
b93447
NSS_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nss | sed 's/-I//'`
b93447
NSS_LIB_DIR=`/usr/bin/pkg-config --libs-only-L nss | sed 's/-L//'`
b93447
b93447
export NSPR_INCLUDE_DIR
b93447
export NSPR_LIB_DIR
b93447
export NSS_INCLUDE_DIR
b93447
export NSS_LIB_DIR
b93447
5c8bc9
%ifarch x86_64 ppc64 ia64 s390x sparc64 aarch64
b93447
USE_64=1
b93447
export USE_64
b93447
%endif
b93447
b93447
%if 0%{?fedora} >= 16
b93447
cp -p mozilla/security/coreconf/Linux2.6.mk mozilla/security/coreconf/Linux3.1.mk 
b93447
sed -i -e 's;LINUX2_1;LINUX3_1;' mozilla/security/coreconf/Linux3.1.mk
b93447
b93447
cp -p mozilla/security/coreconf/Linux3.1.mk mozilla/security/coreconf/Linux3.2.mk 
b93447
sed -i -e 's;LINUX3_1;LINUX3_2;' mozilla/security/coreconf/Linux3.2.mk
b93447
b93447
cp -p mozilla/security/coreconf/Linux3.2.mk mozilla/security/coreconf/Linux3.6.mk
b93447
sed -i -e 's;LINUX3_1;LINUX3_6;' mozilla/security/coreconf/Linux3.6.mk
b93447
%endif
b93447
b93447
# The Makefile is not thread-safe
b93447
make -C mozilla/security/coreconf
b93447
make -C mozilla/security/jss
b93447
make -C mozilla/security/jss javadoc
b93447
b93447
%install
b93447
rm -rf $RPM_BUILD_ROOT docdir
b93447
b93447
# Copy the license files here so we can include them in %doc
b93447
cp -p %{SOURCE1} .
b93447
cp -p %{SOURCE2} .
b93447
cp -p %{SOURCE3} .
b93447
b93447
# There is no install target so we'll do it by hand
b93447
b93447
# jars
b93447
%if 0%{?fedora} >= 16
b93447
install -d -m 0755 $RPM_BUILD_ROOT%{_jnidir}
b93447
install -m 644 mozilla/dist/xpclass.jar ${RPM_BUILD_ROOT}%{_jnidir}/jss4.jar
b93447
%else
b93447
install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}/jss
b93447
install -m 644 mozilla/dist/xpclass.jar ${RPM_BUILD_ROOT}%{_libdir}/jss/jss4-%{version}.jar
b93447
ln -fs jss4-%{version}.jar $RPM_BUILD_ROOT%{_libdir}/jss/jss4.jar
b93447
b93447
install -d -m 0755 $RPM_BUILD_ROOT%{_jnidir}
b93447
ln -fs %{_libdir}/jss/jss4.jar $RPM_BUILD_ROOT%{_jnidir}/jss4.jar
b93447
%endif
b93447
b93447
# We have to use the name libjss4.so because this is dynamically
b93447
# loaded by the jar file.
b93447
install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}/jss
b93447
install -m 0755 mozilla/dist/Linux*.OBJ/lib/libjss4.so ${RPM_BUILD_ROOT}%{_libdir}/jss/
b93447
%if 0%{?fedora} >= 16
b93447
pushd  ${RPM_BUILD_ROOT}%{_libdir}/jss
b93447
    ln -fs %{_jnidir}/jss4.jar jss4.jar
b93447
popd
b93447
%endif
b93447
b93447
# javadoc
b93447
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
b93447
cp -rp mozilla/dist/jssdoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
b93447
b93447
%clean
b93447
rm -rf $RPM_BUILD_ROOT
b93447
b93447
# No ldconfig is required since this library is loaded by Java itself.
b93447
%files
b93447
%defattr(-,root,root,-)
b93447
%doc mozilla/security/jss/jss.html MPL-1.1.txt gpl.txt lgpl.txt
b93447
%{_libdir}/jss/*
b93447
%{_jnidir}/*
b93447
b93447
%files javadoc
b93447
%defattr(-,root,root,-)
b93447
%dir %{_javadocdir}/%{name}-%{version}
b93447
%{_javadocdir}/%{name}-%{version}/*
b93447
b93447
b93447
%changelog
5c8bc9
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 4.2.6-33
5c8bc9
- Mass rebuild 2014-01-24
5c8bc9
5c8bc9
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 4.2.6-32
5c8bc9
- Mass rebuild 2013-12-27
5c8bc9
5c8bc9
* Wed Nov 13 2013 Christina Fu <cfu@redhat.com> - 4.2.6-31
5c8bc9
- Bugzilla Bug #1028581 - jss fails to build on RHEL7 for non-x86 arch
5c8bc9
b93447
* Wed Jul 17 2013 Nathan Kinder <nkinder@redhat.com> - 4.2.6-30
b93447
- Bugzilla Bug #847120 - Unable to build JSS on F17 or newer
b93447
b93447
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.6-29
b93447
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
b93447
b93447
* Wed Dec 19 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.2.6-28
b93447
- revbump after jnidir change
b93447
b93447
* Wed Dec 12 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.2.6-27
b93447
- Simple rebuild
b93447
b93447
* Mon Nov 19 2012 Christina Fu <cfu@redhat.com> - 4.2.6-26
b93447
- added source URLs in spec file to pass Package Wrangler
b93447
b93447
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.6-25
b93447
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b93447
b93447
* Fri Mar 30 2012 Matthew Harmsen <mharmsen@redhat.com> - 4.2.6-24
b93447
- Bugzilla Bug #783007 - Un-deprecate previously deprecated methods in
b93447
  JSS 4.2.6 . . . BadPaddingException (mharmsen)
b93447
b93447
* Tue Mar 20 2012 Christina Fu <cfu@redhat.com> - 4.2.6-23
b93447
- Bugzilla Bug #797351 - JSS - HSM token name was mistaken for manufacturer
b93447
  identifier (cfu)
b93447
- Bugzilla Bug #804840 - [RFE] ECC encryption keys cannot be archived
b93447
  ECC phase2 work - support for ECC encryption key archival and recovery (cfu)
b93447
- Bugzilla Bug #783007 - Un-deprecate previously deprecated methods in
b93447
  JSS 4.2.6 . . . (mharmsen)
b93447
- Dogtag TRAC Task #109 (https://fedorahosted.org/pki/ticket/109) - add
b93447
  benign JNI jar file symbolic link from JNI libdir to JNI jar file (mharmsen)
b93447
b93447
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.6-22
b93447
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
b93447
b93447
* Wed Oct 19 2011 Christina Fu <cfu@redhat.com> - 4.2.6-21
b93447
- Bugzilla Bug #737122 - DRM: during archiving and recovering, wrapping
b93447
  unwrapping keys should be done in the token
b93447
- support for PKCS5v2; support for secure PKCS12
b93447
- Bugzilla Bug #744797 - KRA key recovery (retrieve pkcs#12) fails after the
b93447
  in-place upgrade( CS 8.0->8.1)
b93447
b93447
* Mon Sep 19 2011 Matthew Harmsen <mharmsen@redhat.com> - 4.2.6-20
b93447
- Bugzilla Bug #715621 - Defects revealed by Coverity scan
b93447
b93447
* Wed Aug 31 2011 Matthew Harmsen <mharmsen@redhat.com> - 4.2.6-19.1
b93447
- Bugzilla Bug #734590 - Refactor JNI libraries for Fedora 16+ . . .
b93447
b93447
* Mon Aug 15 2011 Christina Fu <cfu@redhat.com> - 4.2.6-19
b93447
- Bugzilla Bug 733550 - DRM failed to recovery keys when in FIPS mode
b93447
  (HSM + NSS)
b93447
b93447
* Fri Aug 12 2011 Matthew Harmsen <mharmsen@redhat.com> - 4.2.6-18
b93447
- Bugzilla Bug #660436 - Warnings should be cleaned up in JSS build
b93447
  (jdennis, mharmsen)
b93447
b93447
* Wed May 18 2011 Christina Fu <cfu@redhat.com> - 4.2.6-17
b93447
- Bug 670980 - Cannot create system certs when using LunaSA HSM in FIPS Mode
b93447
  and ECC algorithms (support tokens that don't do ECDH)
b93447
b93447
* Fri Apr 08 2011 Jack Magne <jmagne@redhat.com> - 4.2.6-15.99
b93447
- bug 694661 - TKS instance crash during token enrollment.
b93447
  Back out of previous patch for #676083.
b93447
b93447
* Thu Feb 24 2011 Andrew Wnuk <awnuk@redhat.com> - 4.2.6-15
b93447
- bug 676083 - JSS: slots not freed 
b93447
b93447
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.6-14
b93447
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b93447
b93447
* Mon Jan 31 2011 John Dennis <jdennis@redhat.com> - 4.2.6-13
b93447
- remove misleading comment in spec file concerning jar signing
b93447
b93447
* Tue Jan 11 2011 Kevin Wright <kwright@redhat.com> - 4.2.6-12
b93447
- added missing patch line
b93447
b93447
* Tue Dec 21 2010 Christina Fu <cfu@redhat.com> - 4.2.6-11
b93447
- bug 654657 - <jdennis@redhat.com>
b93447
  Incorrect socket accept error message due to bad pointer arithmetic
b93447
- bug 661142 - <cfu@redhat.com>
b93447
  Verification should fail when a revoked certificate is added
b93447
b93447
* Thu Dec 16 2010 John Dennis <jdennis@redhat.com> - 4.2.6-10
b93447
- Resolves: bug 656094 - <jdennis@redhat.com>
b93447
  Rebase jss to at least jss-4.2.6-9
b93447
- <jdennis@redhat.com>
b93447
  merge in updates from Fedora
b93447
  move jar location to %%{_libdir}/jss and provide symlinks, on 32bit looks like this:
b93447
    /usr/lib/java/jss4.jar -> /usr/lib/jss/jss4.jar
b93447
    /usr/lib/jss/jss4-<version>.jar
b93447
    /usr/lib/jss/jss4.jar -> jss4-<version>.jar
b93447
    /usr/lib/jss/libjss4.so
b93447
- bug 654657 - <jdennis@redhat.com>
b93447
  Incorrect socket accept error message due to bad pointer arithmetic
b93447
- bug 647364 - <cfu@redhat.com>
b93447
  Expose updated certificate verification function in JSS
b93447
- bug 529945 - <cfu@redhat.com>
b93447
  expose NSS calls for OCSP settings
b93447
- bug 638833 - <cfu@redhat.com>
b93447
  rfe ecc - add ec curve name support in JSS and CS
b93447
- <rcritten@redhat.com>
b93447
  Need to explicitly catch UnsatisfiedLinkError exception for System.load()
b93447
- bug 533304 - <rcritten@redhat.com>
b93447
  Move location of libjss4.so to subdirectory and use System.load() to
b93447
  load it instead of System.loadLibrary() for Fedora packaging compliance
b93447
b93447
* Mon Nov 30 2009 Dennis Gregorovic <dgregor@redhat.com> - 4.2.6-4.1
b93447
- Rebuilt for RHEL 6
b93447
b93447
* Fri Jul 31 2009 Rob Crittenden <rcritten@redhat.com> 4.2.6-4
b93447
- Resolves: bug 224688 - <cfu@redhat.com>
b93447
  Support ECC POP on the server
b93447
- Resolves: bug 469456 - <jmagne@redhat.com>
b93447
  Server Sockets are hard coded to IPV4
b93447
- Resolves: bug 509183 - <mharmsen@redhat.com>
b93447
  Set NSS dependency >= 3.12.3.99
b93447
b93447
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.6-3
b93447
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
b93447
b93447
* Fri Jun  5 2009 Rob Crittenden <rcritten@redhat.com> 4.2.6-2
b93447
- Include patch to fix missing @param so javadocs will build
b93447
b93447
* Fri Jun  5 2009 Rob Crittenden <rcritten@redhat.com> 4.2.6-1
b93447
- Resolves: bug 455305 - <cfu@redhat.com>
b93447
  CA ECC Signing Key Failure
b93447
- Resolves: bug 502111 - <cfu@redhat.com>
b93447
  Need JSS interface for NSS's PK11_GenerateKeyPairWithOpFlags() function
b93447
- Resolves: bug 503809 - <mharmsen@redhat.com>
b93447
  Update JSS version to 4.2.6
b93447
- Resolves: bug 503817 - <mharmsen@redhat.com>
b93447
  Create JSS Javadocs as their own RPM
b93447
b93447
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.5-4
b93447
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
b93447
 
b93447
* Tue Aug  5 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 4.2.5-3
b93447
- fix license tag
b93447
b93447
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 4.2.5-2
b93447
- Autorebuild for GCC 4.3
b93447
b93447
* Fri Aug  3 2007 Rob Crittenden <rcritten@redhat.com> 4.2.5-1
b93447
- update to 4.2.5
b93447
b93447
* Thu May 24 2007 Rob Crittenden <rcritten@redhat.com> 4.2.4-6
b93447
- Use _jnidir macro instead of _javadir for the jar files. This will break
b93447
  multilib installs but adheres to the jpackage spec.
b93447
b93447
* Wed May 16 2007 Rob Crittenden <rcritten@redhat.com> 4.2.4-5
b93447
- Include the 3 license files
b93447
- Remove Requires for nss and nspr. These libraries have versioned symbols
b93447
  so BuildRequires is enough to set the minimum.
b93447
- Add sparc64 for the 64-bit list
b93447
b93447
* Mon May 14 2007 Rob Crittenden <rcritten@redhat.com> 4.2.4-4
b93447
- Included additional comments on jar signing and why ldconfig is not
b93447
  required.
b93447
b93447
* Thu May 10 2007 Rob Crittenden <rcritten@redhat.com> 4.2.4-3
b93447
- Added information on how to pull the source into a tar.gz
b93447
b93447
* Thu Mar 15 2007  Rob Crittenden <rcritten@redhat.com> 4.2.4-2
b93447
- Added RPM_OPT_FLAGS to XCFLAGS
b93447
- Added link to Sun JCE information
b93447
b93447
* Tue Feb 27 2007 Rob Crittenden <rcritten@redhat.com> 4.2.4-1
b93447
- Initial build