Mercurial > hg > release > icedtea-web-1.6
changeset 981:449852a92985
Makefile and configure updated for Java 7
* Makefile.am: (HAVE_JAVA7) removed
* acinclude.m4: (IT_CHECK_JAVA_VERSION) new check for JDK version.
(IT_CHECK_FOR_JDK) changed directories to search for JDK, notably adding
alternatives-defined JDK location
* configure.ac: (IT_CHECK_JAVA_VERSION) new check for JDK version
* plugin/icedteanp/IcedTeaNPPlugin.cc: (HAVE_JAVA7) renamed and modified
to HAVE_JAVA8
* netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java:
removed
author | Andrew Azores <aazores@redhat.com> |
---|---|
date | Thu, 10 Apr 2014 15:56:45 -0400 |
parents | f664addf7da2 |
children | 3dde3780f8bd |
files | ChangeLog Makefile.am acinclude.m4 configure.ac netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java plugin/icedteanp/IcedTeaNPPlugin.cc |
diffstat | 6 files changed, 55 insertions(+), 102 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Apr 07 11:24:18 2014 -0400 +++ b/ChangeLog Thu Apr 10 15:56:45 2014 -0400 @@ -1,3 +1,15 @@ +2014-04-10 Andrew Azores <aazores@redhat.com> + + * Makefile.am: (HAVE_JAVA7) removed + * acinclude.m4: (IT_CHECK_JAVA_VERSION) new check for JDK version. + (IT_CHECK_FOR_JDK) changed directories to search for JDK, notably adding + alternatives-defined JDK location + * configure.ac: (IT_CHECK_JAVA_VERSION) new check for JDK version + * plugin/icedteanp/IcedTeaNPPlugin.cc: (HAVE_JAVA7) renamed and modified + to HAVE_JAVA8 + * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java: + removed + 2014-04-07 Andrew Azores <aazores@redhat.com> * Makefile.am: (IT_LANGUAGE_SOURCE_VERSION, IT_CLASS_TARGET_VERSION)
--- a/Makefile.am Mon Apr 07 11:24:18 2014 -0400 +++ b/Makefile.am Thu Apr 10 15:56:45 2014 -0400 @@ -465,9 +465,6 @@ if !WITH_RHINO sed -i '/RhinoBasedPacEvaluator/ d' $@ endif -if !HAVE_JAVA7 - sed -i '/VariableX509TrustManagerJDK7/ d' $@ -endif stamps/netx-html-gen.stamp: (cd $$NETX_SRCDIR/..; \
--- a/acinclude.m4 Mon Apr 07 11:24:18 2014 -0400 +++ b/acinclude.m4 Thu Apr 10 15:56:45 2014 -0400 @@ -47,10 +47,18 @@ SYSTEM_JDK_DIR= ]) if test -z "${SYSTEM_JDK_DIR}"; then - for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/icedtea6 \ - /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/openjdk \ - /usr/lib/jvm/java-icedtea /usr/lib/jvm/java-gcj /usr/lib/jvm/gcj-jdk \ - /usr/lib/jvm/cacao ; do + for dir in /etc/alternatives/java_sdk \ + /usr/lib/jvm/java-1.7.0-openjdk \ + /usr/lib/jvm/icedtea7 \ + /usr/lib/jvm/java-7-openjdk \ + /usr/lib/jvm/java-1.8.0-openjdk \ + /usr/lib/jvm/icedtea8 \ + /usr/lib/jvm/java-8-openjdk \ + /usr/lib/jvm/java-icedtea \ + /usr/lib/jvm/java-openjdk \ + /usr/lib/jvm/openjdk \ + /usr/lib/jvm/cacao \ + /usr/lib/jvm/jamvm ; do if test -d $dir; then SYSTEM_JDK_DIR=$dir break @@ -698,7 +706,7 @@ AC_REQUIRE([IT_CHECK_FOR_JRE]) 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)], + [AS_HELP_STRING(--with-java, specify location of the Java 1.7 VM)], [ JAVA="${withval}" ], @@ -712,21 +720,29 @@ 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.") + AC_MSG_ERROR("A 1.7+-compatible Java VM is required.") fi AC_MSG_RESULT(${JAVA}) AC_SUBST(JAVA) +]) + +AC_DEFUN_ONCE([IT_CHECK_JAVA_VERSION], +[ + AC_REQUIRE([IT_FIND_JAVA]) + AC_MSG_CHECKING([JDK version]) JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` + AC_MSG_RESULT($JAVA_VERSION) HAVE_JAVA7=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.7) print "yes"}'` - if ! test -z "$HAVE_JAVA7" ; then - VERSION_DEFS='-DHAVE_JAVA7' + HAVE_JAVA8=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.8) print "yes"}'` + if test -z "$HAVE_JAVA7"; then + AC_MSG_ERROR([JDK7 or newer is required, detected was: $JAVA_VERSION]) fi - - AM_CONDITIONAL([HAVE_JAVA7], test x"${HAVE_JAVA7}" = "xyes" ) + if ! test -z "$HAVE_JAVA8"; then + VERSION_DEFS="-DHAVE_JAVA8" + fi AC_SUBST(VERSION_DEFS) + AM_CONDITIONAL([HAVE_JAVA7], test x"${HAVE_JAVA7}" = "xyes") + AM_CONDITIONAL([HAVE_JAVA8], test x"${HAVE_JAVA8}" = "xyes") ]) AC_DEFUN_ONCE([IT_FIND_KEYTOOL],
--- a/configure.ac Mon Apr 07 11:24:18 2014 -0400 +++ b/configure.ac Thu Apr 10 15:56:45 2014 -0400 @@ -37,6 +37,7 @@ FIND_JAVAC FIND_JAR FIND_ECJ_JAR +IT_CHECK_JAVA_VERSION IT_FIND_JAVADOC IT_FIND_KEYTOOL IT_FIND_JARSIGNER
--- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java Mon Apr 07 11:24:18 2014 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* VariableX509TrustManagerJDK6.java - Copyright (C) 2012 Red Hat, Inc. - -This file is part of IcedTea. - -IcedTea is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 2. - -IcedTea is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with IcedTea; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. -*/ - -package net.sourceforge.jnlp.security; - -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; - -import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; - -public class VariableX509TrustManagerJDK6 extends X509ExtendedTrustManager { - - private VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); - - @Override - public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { - checkClientTrusted(chain, authType, null, null); - } - - @Override - public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { - vX509TM.checkTrustServer(chain, authType, null /* hostname*/, null /* socket */, null /* engine */); - } - - @Override - public X509Certificate[] getAcceptedIssuers() { - return vX509TM.getAcceptedIssuers(); - } - - @Override - public void checkClientTrusted(X509Certificate[] chain, String authType, String hostname, String algorithm) throws CertificateException { - vX509TM.checkTrustClient(chain, authType, hostname); // We don't need algorithm, we will always use this for TLS only - } - - @Override - public void checkServerTrusted(X509Certificate[] chain, String authType, String hostname, String algorithm) throws CertificateException { - // We don't need to pass algorithm, we will always use this for TLS only - vX509TM.checkTrustServer(chain, authType, hostname, null /* socket */, null /* engine */); - } - -}
--- a/plugin/icedteanp/IcedTeaNPPlugin.cc Mon Apr 07 11:24:18 2014 -0400 +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Thu Apr 10 15:56:45 2014 -0400 @@ -64,16 +64,16 @@ #define PLUGIN_FULL_NAME PLUGIN_NAME " (using " PLUGIN_VERSION ")" #define PLUGIN_DESC "The <a href=\"" PACKAGE_URL "\">" PLUGIN_NAME "</a> executes Java applets." -#ifdef HAVE_JAVA7 +#ifdef HAVE_JAVA8 + #define JPI_VERSION "1.8.0_" JDK_UPDATE_VERSION + #define PLUGIN_APPLET_MIME_DESC \ + "application/x-java-applet;version=1.8:class,jar:IcedTea;" + #define PLUGIN_BEAN_MIME_DESC \ + "application/x-java-bean;version=1.8:class,jar:IcedTea;" +#else #define JPI_VERSION "1.7.0_" JDK_UPDATE_VERSION - #define PLUGIN_APPLET_MIME_DESC7 \ - "application/x-java-applet;version=1.7:class,jar:IcedTea;" - #define PLUGIN_BEAN_MIME_DESC7 \ - "application/x-java-bean;version=1.7:class,jar:IcedTea;" -#else - #define JPI_VERSION "1.6.0_" JDK_UPDATE_VERSION - #define PLUGIN_APPLET_MIME_DESC7 - #define PLUGIN_BEAN_MIME_DESC7 + #define PLUGIN_APPLET_MIME_DESC + #define PLUGIN_BEAN_MIME_DESC #endif #define PLUGIN_MIME_DESC \ @@ -93,7 +93,8 @@ "application/x-java-applet;version=1.4.2:class,jar:IcedTea;" \ "application/x-java-applet;version=1.5:class,jar:IcedTea;" \ "application/x-java-applet;version=1.6:class,jar:IcedTea;" \ - PLUGIN_APPLET_MIME_DESC7 \ + "application/x-java-applet;version=1.7:class,jar:IcedTea;" \ + PLUGIN_APPLET_MIME_DESC \ "application/x-java-applet;jpi-version=" JPI_VERSION ":class,jar:IcedTea;" \ "application/x-java-bean:class,jar:IcedTea;" \ "application/x-java-bean;version=1.1:class,jar:IcedTea;" \ @@ -110,7 +111,8 @@ "application/x-java-bean;version=1.4.2:class,jar:IcedTea;" \ "application/x-java-bean;version=1.5:class,jar:IcedTea;" \ "application/x-java-bean;version=1.6:class,jar:IcedTea;" \ - PLUGIN_BEAN_MIME_DESC7 \ + "application/x-java-bean;version=1.7:class,jar:IcedTea;" \ + PLUGIN_BEAN_MIME_DESC \ "application/x-java-bean;jpi-version=" JPI_VERSION ":class,jar:IcedTea;" \ "application/x-java-vm-npruntime::IcedTea;"