[icedtea-web] RFC: Fix for PR779: IcedTea-Web plug-in hardcodes jpi-version to 1.6.0

Deepak Bhole dbhole at redhat.com
Tue Aug 30 10:39:27 PDT 2011


* Deepak Bhole <dbhole at redhat.com> [2011-08-30 13:37]:
> Hi,
> 
> Attached patch fixes PR779:
> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=779
> 
> It makes the jpi-version dynamic rather than static.
> 
> Okay for HEAD and 1.1?
> 

ChangeLog:
2011-08-30  Deepak Bhole <dbhole at redhat.com>

    PR779: IcedTea-Web plug-in hardcodes jpi-version to 1.6.0
    * acinclude.m4: Added new IT_SET_JDK_VERSION macro that sets the JDK
    version being used.
    * Makefile.am: Provide JDK_VERSION to plug-in when compiling it.
    * configure.ac: Call the new IT_SET_JDK_VERSION macro.
    * plugin/icedteanp/IcedTeaNPPlugin.cc: Use the new JDK_VERSION macro to
    set jpi-version.


> Cheers,
> Deepak

> diff -r 7afd916031fa Makefile.am
> --- a/Makefile.am	Mon Aug 29 17:02:36 2011 -0400
> +++ b/Makefile.am	Tue Aug 30 13:34:42 2011 -0400
> @@ -210,6 +210,7 @@
>  	mkdir -p $(PLUGIN_DIR) && \
>  	cd $(PLUGIN_DIR) && \
>  	$(CXX) $(CXXFLAGS) \
> +	  -DJDK_VERSION="\"$(JDK_VERSION)\"" \
>  	  -DJDK_UPDATE_VERSION="\"$(JDK_UPDATE_VERSION)\"" \
>  	  -DPLUGIN_NAME="\"IcedTea-Web Plugin\"" \
>  	  -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \
> diff -r 7afd916031fa NEWS
> --- a/NEWS	Mon Aug 29 17:02:36 2011 -0400
> +++ b/NEWS	Tue Aug 30 13:34:42 2011 -0400
> @@ -17,6 +17,7 @@
>  * Plugin
>    - PR749: sun.applet.PluginStreamHandler#handleMessage(String) really slow
>    - RH718693: MindTerm SSH Applet doesn't work
> +  - PR779: IcedTea-Web plug-in hardcodes jpi-version to 1.6.0
>  Common
>    - PR768: Signed applets/Web Start apps don't work with OpenJDK7 and up
>    - PR771: IcedTea-Web certificate verification code does not use the right API
> diff -r 7afd916031fa acinclude.m4
> --- a/acinclude.m4	Mon Aug 29 17:02:36 2011 -0400
> +++ b/acinclude.m4	Tue Aug 30 13:34:42 2011 -0400
> @@ -90,6 +90,17 @@
>    AC_SUBST(SYSTEM_JRE_DIR)
>  ])
>  
> +AC_DEFUN_ONCE([IT_SET_JDK_VERSION],
> +[
> +  AC_REQUIRE([FIND_JAVAC])
> +  AC_MSG_CHECKING([version of java compiler])
> +
> +  JDK_VERSION=`$JAVAC -version 2>&1 | cut -d" " -f2 | cut -c1-5`
> +
> +  AC_MSG_RESULT(${JDK_VERSION})
> +  AC_SUBST(JDK_VERSION)
> +])
> +
>  AC_DEFUN_ONCE([FIND_JAVAC],
>  [
>    AC_REQUIRE([IT_CHECK_FOR_JDK])
> diff -r 7afd916031fa configure.ac
> --- a/configure.ac	Mon Aug 29 17:02:36 2011 -0400
> +++ b/configure.ac	Tue Aug 30 13:34:42 2011 -0400
> @@ -36,6 +36,7 @@
>  AC_CONFIG_FILES([javac], [chmod +x javac])
>  
>  IT_SET_VERSION
> +IT_SET_JDK_VERSION
>  IT_CHECK_XULRUNNER_VERSION
>  
>  AC_CHECK_LIB(z, main,, [AC_MSG_ERROR("zlib not found - try installing zlib-devel")])
> diff -r 7afd916031fa plugin/icedteanp/IcedTeaNPPlugin.cc
> --- a/plugin/icedteanp/IcedTeaNPPlugin.cc	Mon Aug 29 17:02:36 2011 -0400
> +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc	Tue Aug 30 13:34:42 2011 -0400
> @@ -107,7 +107,7 @@
>    "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;"           \
> -  "application/x-java-applet;jpi-version=1.6.0_" JDK_UPDATE_VERSION ":class,jar:IcedTea;"  \
> +  "application/x-java-applet;jpi-version=" JDK_VERSION "_" JDK_UPDATE_VERSION ":class,jar:IcedTea;"  \
>    "application/x-java-bean:class,jar:IcedTea;"                         \
>    "application/x-java-bean;version=1.1:class,jar:IcedTea;"             \
>    "application/x-java-bean;version=1.1.1:class,jar:IcedTea;"           \
> @@ -123,7 +123,7 @@
>    "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;"             \
> -  "application/x-java-bean;jpi-version=1.6.0_" JDK_UPDATE_VERSION ":class,jar:IcedTea;"    \
> +  "application/x-java-bean;jpi-version=" JDK_VERSION "_" JDK_UPDATE_VERSION ":class,jar:IcedTea;"    \
>    "application/x-java-vm-npruntime::IcedTea;"
>  
>  #define PLUGIN_URL NS_INLINE_PLUGIN_CONTRACTID_PREFIX NS_JVM_MIME_TYPE




More information about the distro-pkg-dev mailing list