/hg/icedtea-web: Check for required proprietary Sun classes duri...
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Wed Nov 3 16:06:30 PDT 2010
changeset 2405cef22921 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=2405cef22921
author: Andrew John Hughes <ahughes at redhat.com>
date: Wed Nov 03 23:06:23 2010 +0000
Check for required proprietary Sun classes during configure.
2010-10-28 Andrew John Hughes <ahughes at redhat.com>
* Makefile.am: (NETX_BOOTSTRAP_CLASSES): Removed.
(PLUGIN_BOOTSTRAP_CLASSES): Likewise. (NETX_SUN_CLASSES):
Likewise. (PLUGIN_SUN_CLASSES): Likewise.
* acinclude.m4: (IT_CHECK_FOR_CLASS): Require detection
of javac and java. Put test class in sun.applet to get
access to some internal classes. Change test to use forName
for the same reason. I expect to be able to revert
this when usage of sun.applet is fixed. (IT_FIND_JAVA):
Ported from IcedTea6. Change to prioritise 'java' over
'gij'.
* configure.ac: Add IT_CHECK_FOR_CLASS checks for classes
which are required but not found in JDKs other than
Oracle-based ones. Also check for java.* classes missing
from current versions of gcj but which may appear there in
future.
diffstat:
4 files changed, 92 insertions(+), 45 deletions(-)
ChangeLog | 23 +++++++++++++++++++++++
Makefile.am | 40 ----------------------------------------
acinclude.m4 | 46 +++++++++++++++++++++++++++++++++++++++++-----
configure.ac | 28 ++++++++++++++++++++++++++++
diffs (192 lines):
diff -r 30efa2ff349b -r 2405cef22921 ChangeLog
--- a/ChangeLog Wed Nov 03 11:33:41 2010 -0400
+++ b/ChangeLog Wed Nov 03 23:06:23 2010 +0000
@@ -1,3 +1,26 @@ 2010-11-03 Omair Majid <omajid at redhat.
+2010-10-28 Andrew John Hughes <ahughes at redhat.com>
+
+ * Makefile.am:
+ (NETX_BOOTSTRAP_CLASSES): Removed.
+ (PLUGIN_BOOTSTRAP_CLASSES): Likewise.
+ (NETX_SUN_CLASSES): Likewise.
+ (PLUGIN_SUN_CLASSES): Likewise.
+ * acinclude.m4:
+ (IT_CHECK_FOR_CLASS): Require detection
+ of javac and java. Put test class in
+ sun.applet to get access to some internal
+ classes. Change test to use forName for
+ the same reason. I expect to be able to
+ revert this when usage of sun.applet is fixed.
+ (IT_FIND_JAVA): Ported from IcedTea6. Change
+ to prioritise 'java' over 'gij'.
+ * configure.ac:
+ Add IT_CHECK_FOR_CLASS checks for classes which
+ are required but not found in JDKs other than
+ Oracle-based ones. Also check for java.* classes
+ missing from current versions of gcj but which
+ may appear there in future.
+
2010-11-03 Omair Majid <omajid at redhat.com>
* netx/net/sourceforge/jnlp/Launcher.java
diff -r 30efa2ff349b -r 2405cef22921 Makefile.am
--- a/Makefile.am Wed Nov 03 11:33:41 2010 -0400
+++ b/Makefile.am Wed Nov 03 23:06:23 2010 +0000
@@ -8,46 +8,6 @@ NETX_EXTRA_DIR=$(abs_top_srcdir)/extra/n
# Build directories
BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0
-
-# PR43578 - java.security.CodeSource.getCodeSigners() missing
-# PR43582 - Missing javax.swing.JTable.setFillsViewportHeight
-# PR43585 - java.security.KeyStore.TrustedCertificateEntry class missing
-NETX_BOOTSTRAP_CLASSES = \
- $(SHARE)/java/security/CodeSource.java \
- $(SHARE)/javax/swing/JTable.java \
- $(SHARE)/java/security/KeyStore.java
-
-# PR46074 - Missing java.net cookie code required by IcedTea plugin
-PLUGIN_BOOTSTRAP_CLASSES = \
- $(SHARE)/java/net/CookieManager.java \
- $(SHARE)/java/net/HttpCookie.java \
- $(SHARE)/java/net/CookieHandler.java
-
-# IT563 - NetX uses sun.security code
-# IT564 - NetX depends on sun.misc.BASE64Encoder
-# IT570 - NetX depends on sun.applet.AppletViewPanel
-# IT571 - NetX depends on com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager.java
-NETX_SUN_CLASSES = \
- $(SHARE)/sun/security/provider/X509Factory.java \
- $(SHARE)/sun/security/util/SecurityConstants.java \
- $(SHARE)/sun/security/util/HostnameChecker.java \
- $(SHARE)/sun/security/util/DerValue.java \
- $(SHARE)/sun/security/x509/X500Name.java \
- $(SHARE)/sun/misc/BASE64Encoder.java \
- $(SHARE)/sun/applet/AppletViewerPanel.java \
- $(SHARE)/sun/security/validator/ValidatorException.java \
- $(SHARE)/com/sun/net/ssl/internal/ssl/X509ExtendedTrustManager.java
-
-# IT573 - Plugin depends on sun.awt,X11.XEmbeddedFrame.java
-# IT574 - Plugin depends on sun.misc.Ref
-# IT575 - Plugin depends on com.sun/jndi.toolkit.url.UrlUtil
-# IT576 - Plugin depends on sun.applet.AppletImageRef
-PLUGIN_SUN_CLASSES = \
- $(SOLARIS)/sun/awt/X11/XEmbeddedFrame.java \
- $(SHARE)/sun/misc/Ref.java \
- $(SHARE)/com/sun/jndi/toolkit/url/UrlUtil.java \
- $(SHARE)/sun/applet/AppletImageRef.java
-
RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar
# Flags
diff -r 30efa2ff349b -r 2405cef22921 acinclude.m4
--- a/acinclude.m4 Wed Nov 03 11:33:41 2010 -0400
+++ b/acinclude.m4 Wed Nov 03 23:06:23 2010 +0000
@@ -302,19 +302,27 @@ dnl is usually the name of the class wit
dnl is usually the name of the class with '.'
dnl replaced by '_' and all letters capitalised.
dnl e.g. IT_CHECK_FOR_CLASS([JAVA_UTIL_SCANNER],[java.util.Scanner])
+dnl Test class has to be in sun.applet for some internal classes
AC_DEFUN([IT_CHECK_FOR_CLASS],[
-AC_CACHE_CHECK([if $2 is missing], it_cv_$1, [
-CLASS=Test.java
+AC_REQUIRE([IT_FIND_JAVAC])
+AC_REQUIRE([IT_FIND_JAVA])
+AC_CACHE_CHECK([if $2 is available], it_cv_$1, [
+CLASS=sun/applet/Test.java
BYTECODE=$(echo $CLASS|sed 's#\.java##')
-mkdir tmp.$$
+mkdir -p tmp.$$/$(dirname $CLASS)
cd tmp.$$
cat << \EOF > $CLASS
[/* [#]line __oline__ "configure" */
+package sun.applet;
+
+import $2;
+
public class Test
{
public static void main(String[] args)
+ throws Exception
{
- $2.class.toString();
+ System.out.println(Class.forName("$2"));
}
}
]
@@ -331,7 +339,8 @@ fi
])
rm -f $CLASS *.class
cd ..
-rmdir tmp.$$
+# should be rmdir but has to be rm -rf due to sun.applet usage
+rm -rf tmp.$$
if test x"${it_cv_$1}" = "xno"; then
AC_MSG_ERROR([$2 not found.])
fi
@@ -507,3 +516,30 @@ AC_DEFUN([IT_SET_ARCH_SETTINGS],
AC_SUBST(ARCH_PREFIX)
AC_SUBST(ARCHFLAG)
])
+
+AC_DEFUN_ONCE([IT_FIND_JAVA],
+[
+ AC_MSG_CHECKING([for a Java virtual machine])
+ AC_ARG_WITH([java],
+ [AS_HELP_STRING(--with-java,specify location of the 1.5 java vm)],
+ [
+ JAVA="${withval}"
+ ],
+ [
+ JAVA=${SYSTEM_JDK_DIR}/bin/java
+ ])
+ if ! test -f "${JAVA}"; then
+ AC_PATH_PROG(JAVA, "${JAVA}")
+ fi
+ if test -z "${JAVA}"; then
+ AC_PATH_PROG(JAVA, "java")
+ fi
+ if test -z "${JAVA}"; then
+ AC_PATH_PROG(JAVA, "gij")
+ fi
+ if test -z "${JAVA}"; then
+ AC_MSG_ERROR("A 1.5-compatible Java VM is required.")
+ fi
+ AC_MSG_RESULT(${JAVA})
+ AC_SUBST(JAVA)
+])
diff -r 30efa2ff349b -r 2405cef22921 configure.ac
--- a/configure.ac Wed Nov 03 11:33:41 2010 -0400
+++ b/configure.ac Wed Nov 03 23:06:23 2010 +0000
@@ -49,4 +49,32 @@ AC_SUBST(X11_CFLAGS)
AC_SUBST(X11_CFLAGS)
AC_SUBST(X11_LIBS)
+dnl PR46074 (gcc) - Missing java.net cookie code required by IcedTea plugin
+dnl IT563 - NetX uses sun.security code
+dnl IT564 - NetX depends on sun.misc.BASE64Encoder
+dnl IT570 - NetX depends on sun.applet.AppletViewPanel
+dnl IT571 - NetX depends on com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager.java
+dnl IT573 - Plugin depends on sun.awt,X11.XEmbeddedFrame.java
+dnl IT574 - Plugin depends on sun.misc.Ref
+dnl IT575 - Plugin depends on com.sun/jndi.toolkit.url.UrlUtil
+dnl IT576 - Plugin depends on sun.applet.AppletImageRef
+
+IT_CHECK_FOR_CLASS(JAVA_UTIL_JAR_PACK200, [java.util.jar.Pack200])
+IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEMANAGER, [java.net.CookieManager])
+IT_CHECK_FOR_CLASS(JAVA_NET_HTTPCOOKIE, [java.net.HttpCookie])
+IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEHANDLER, [java.net.CookieHandler])
+IT_CHECK_FOR_CLASS(SUN_SECURITY_PROVIDER_X509FACTORY, [sun.security.provider.X509Factory])
+IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_SECURITYCONSTANTS, [sun.security.util.SecurityConstants])
+IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_HOSTNAMECHECKER, [sun.security.util.HostnameChecker])
+IT_CHECK_FOR_CLASS(SUN_SECURITY_X509_X500NAME, [sun.security.x509.X500Name])
+IT_CHECK_FOR_CLASS(SUN_MISC_BASE64ENCODER, [sun.misc.BASE64Encoder])
+IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETVIEWERPANEL, [sun.applet.AppletViewerPanel])
+IT_CHECK_FOR_CLASS(SUN_SECURITY_VALIDATOR_VALIDATOREXCEPTION, [sun.security.validator.ValidatorException])
+IT_CHECK_FOR_CLASS(COM_SUN_NET_SSL_INTERNAL_SSL_X509EXTENDEDTRUSTMANAGER,
+ [com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager])
+IT_CHECK_FOR_CLASS(SUN_AWT_X11_XEMBEDDEDFRAME, [sun.awt.X11.XEmbeddedFrame])
+IT_CHECK_FOR_CLASS(SUN_MISC_REF, [sun.misc.Ref])
+IT_CHECK_FOR_CLASS(COM_SUN_JNDI_TOOLKIT_URL_URLUTIL, [com.sun.jndi.toolkit.url.UrlUtil])
+IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, [sun.applet.AppletImageRef])
+
AC_OUTPUT
More information about the distro-pkg-dev
mailing list