rpms/jss/F-11 jss-loadlibrary.patch,NONE,1.1 jss.spec,1.8,1.9

rcritten rcritten at fedoraproject.org
Thu Jan 7 16:56:03 UTC 2010


Author: rcritten

Update of /cvs/extras/rpms/jss/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3346

Modified Files:
	jss.spec 
Added Files:
	jss-loadlibrary.patch 
Log Message:
Move location of libjss4.so to subdirectory and use System.load() to
load it instead of System.loadLibrary() for Fedora packaging compliance
(#533304)


jss-loadlibrary.patch:
 CryptoManager.java |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

--- NEW FILE jss-loadlibrary.patch ---
diff -uN --recursive jss-4.2.6.orig/mozilla/security/jss/org/mozilla/jss/CryptoManager.java jss-4.2.6/mozilla/security/jss/org/mozilla/jss/CryptoManager.java
--- jss-4.2.6.orig/mozilla/security/jss/org/mozilla/jss/CryptoManager.java	2008-01-31 17:29:16.000000000 -0500
+++ jss-4.2.6/mozilla/security/jss/org/mozilla/jss/CryptoManager.java	2010-01-07 10:47:04.000000000 -0500
@@ -1334,11 +1334,20 @@
      */
     synchronized static void loadNativeLibraries()
     {
-        if( ! mNativeLibrariesLoaded )
-        {
-            System.loadLibrary("jss4");
-            Debug.trace(Debug.VERBOSE, "jss library loaded");
-            mNativeLibrariesLoaded = true;
+        if( ! mNativeLibrariesLoaded ) {
+            try {
+                System.load( "/usr/lib64/jss/libjss4.so" );
+                Debug.trace(Debug.VERBOSE, "jss library loaded");
+                mNativeLibrariesLoaded = true;
+            } catch( Exception e ) {
+                try {
+                    System.load( "/usr/lib/jss/libjss4.so" );
+                    Debug.trace(Debug.VERBOSE, "jss library loaded");
+                    mNativeLibrariesLoaded = true;
+                } catch( Exception f ) {
+                    Debug.trace(Debug.VERBOSE, "jss library load failed");
+                }
+            }
         }
     }
     static private boolean mNativeLibrariesLoaded = false;


Index: jss.spec
===================================================================
RCS file: /cvs/extras/rpms/jss/F-11/jss.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- jss.spec	31 Jul 2009 13:52:35 -0000	1.8
+++ jss.spec	7 Jan 2010 16:56:03 -0000	1.9
@@ -1,6 +1,6 @@
 Name:           jss
 Version:        4.2.6
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Java Security Services (JSS)
 
 Group:          System Environment/Libraries
@@ -26,6 +26,7 @@ Patch1:         jss-key_pair_usage_with_
 Patch2:         jss-javadocs-param.patch
 Patch3:         jss-ipv6.patch
 Patch4:         jss-ECC-pop.patch
+Patch5:         jss-loadlibrary.patch
 
 %description
 Java Security Services (JSS) is a java native interface which provides a bridge
@@ -46,6 +47,7 @@ This package contains the API documentat
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %build
 [ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java
@@ -104,8 +106,8 @@ popd
 
 # We have to use the name libjss4.so because this is dynamically
 # loaded by the jar file.
-install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}
-install -m 0755 mozilla/dist/Linux*.OBJ/lib/libjss4.so ${RPM_BUILD_ROOT}%{_libdir}/
+install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}/jss
+install -m 0755 mozilla/dist/Linux*.OBJ/lib/libjss4.so ${RPM_BUILD_ROOT}%{_libdir}/jss/
 
 # FIXME - sign jss4.jar. In order to use JSS as a JCE provider it needs to be
 # signed with a Sun-issued certificate. Since we would need to make this
@@ -132,7 +134,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-,root,root,-)
 %doc mozilla/security/jss/jss.html MPL-1.1.txt gpl.txt lgpl.txt
 %{_jnidir}/*
-%{_libdir}/lib*.so
+%{_libdir}/jss/lib*.so
 
 %files javadoc
 %defattr(-,root,root,-)
@@ -141,6 +143,11 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Thu Jan  7 2010 Rob Crittenden <rcritten at redhat.com> 4.2.6-5
+- Move location of libjss4.so to subdirectory and use System.load() to
+  load it instead of System.loadLibrary() for Fedora packaging compliance
+  (#533304)
+
 * Fri Jul 31 2009 Rob Crittenden <rcritten at redhat.com> 4.2.6-2
 - Support ECC POP on the server (#224688)
 - Server Sockets are hard coded to IPV4 (#469456)




More information about the fedora-extras-commits mailing list