Move location of libjss4.so to subdirectory and use System.load() to load
it instead of System.loadLibrary() for Fedora packaging compliance
(#533304)
This commit is contained in:
parent
d43b2de20f
commit
cec65550af
29
jss-loadlibrary.patch
Normal file
29
jss-loadlibrary.patch
Normal file
@ -0,0 +1,29 @@
|
||||
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;
|
||||
15
jss.spec
15
jss.spec
@ -1,6 +1,6 @@
|
||||
Name: jss
|
||||
Version: 4.2.6
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: Java Security Services (JSS)
|
||||
|
||||
Group: System Environment/Libraries
|
||||
@ -26,6 +26,7 @@ Patch1: jss-key_pair_usage_with_op_flags.patch
|
||||
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 documentation for JSS.
|
||||
%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@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@redhat.com> 4.2.6-4
|
||||
- Support ECC POP on the server (#224688)
|
||||
- Server Sockets are hard coded to IPV4 (#469456)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user