diff -Nru icedtea-web-1.8.8/debian/changelog icedtea-web-1.8.8/debian/changelog --- icedtea-web-1.8.8/debian/changelog 2022-11-02 09:52:30.000000000 +0000 +++ icedtea-web-1.8.8/debian/changelog 2024-02-15 07:50:42.000000000 +0000 @@ -1,3 +1,9 @@ +icedtea-web (1.8.8-2ubuntu1) noble; urgency=medium + + * d/p/jdk-21-*: add Java 21 compatibility patches (LP: #2053208). + + -- Vladimir Petko Thu, 15 Feb 2024 20:50:42 +1300 + icedtea-web (1.8.8-2) unstable; urgency=medium * Team upload. diff -Nru icedtea-web-1.8.8/debian/control icedtea-web-1.8.8/debian/control --- icedtea-web-1.8.8/debian/control 2022-11-02 09:52:19.000000000 +0000 +++ icedtea-web-1.8.8/debian/control 2024-02-15 07:50:42.000000000 +0000 @@ -1,7 +1,8 @@ Source: icedtea-web Section: java Priority: optional -Maintainer: Debian Java Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Java Maintainers Uploaders: Matthias Klose Build-Depends: debhelper-compat (= 12), diff -Nru icedtea-web-1.8.8/debian/patches/jdk-21-autoconf.patch icedtea-web-1.8.8/debian/patches/jdk-21-autoconf.patch --- icedtea-web-1.8.8/debian/patches/jdk-21-autoconf.patch 1970-01-01 00:00:00.000000000 +0000 +++ icedtea-web-1.8.8/debian/patches/jdk-21-autoconf.patch 2024-02-15 07:50:42.000000000 +0000 @@ -0,0 +1,74 @@ +Description: Support compilation with JDK 21 + Modify autoconf scripts to support compilation with JDK 21. + Upstream has removed autoconf/make-based building, but hasn't + released it yet. So, this patch need not be forwarded upstream. +Author: Pushkar Kulkarni +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052691 +Forwarded: not-needed +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -846,10 +846,12 @@ + AC_MSG_RESULT($JAVA_VERSION) + if test "${JAVA_VERSION}" -eq "8"; then + HAVE_JAVA8="yes" ++ elif test "$JAVA_VERSION" -ge "21"; then ++ HAVE_JAVA21="yes" + elif test "$JAVA_VERSION" -ge "9"; then + HAVE_JAVA9="yes" + fi +- if test -z "$HAVE_JAVA8" -a -z "$HAVE_JAVA9"; then ++ if test -z "$HAVE_JAVA8" -a -z "$HAVE_JAVA9" -a -z "$HAVE_JAVA21"; then + AC_MSG_ERROR([JDK8 or newer is required, detected was: $JAVA_VERSION]) + fi + if ! test -z "$HAVE_JAVA8"; then +@@ -861,6 +863,7 @@ + AC_SUBST(VERSION_DEFS) + AM_CONDITIONAL([HAVE_JAVA8], test x"${HAVE_JAVA8}" = "xyes") + AM_CONDITIONAL([HAVE_JAVA9], test x"${HAVE_JAVA9}" = "xyes") ++ AM_CONDITIONAL([HAVE_JAVA21], test x"${HAVE_JAVA21}" = "xyes") + ]) + + AC_DEFUN_ONCE([IT_FIND_KEYTOOL], +--- a/configure.ac ++++ b/configure.ac +@@ -149,11 +149,14 @@ + dnl IT575 - Plugin depends on com.sun/jndi.toolkit.url.UrlUtil + dnl IT576 - Plugin depends on sun.applet.AppletImageRef + dnl IT578 - Remove need for patching AppletPanel for Plugin/Webstart +-if test x"$HAVE_JAVA9" = xyes ; then ++if test x"$HAVE_JAVA9" = xyes -o x"$HAVE_JAVA21" = xyes ; then + JAVA_BASE=java.base + JAVA_DESKTOP=java.desktop + JAVA_NAMING=java.naming + fi ++if test x"$HAVE_JAVA21" = xyes ; then ++ JDK_JARTOOL=jdk.jartool ++fi + IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEMANAGER, [java.net.CookieManager], [some.pkg], []) + IT_CHECK_FOR_CLASS(JAVA_NET_HTTPCOOKIE, [java.net.HttpCookie], [some.pkg], []) + IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEHANDLER, [java.net.CookieHandler], [some.pkg], []) +@@ -163,13 +166,17 @@ + IT_CHECK_FOR_CLASS(SUN_SECURITY_X509_X500NAME, [sun.security.x509.X500Name], [some.pkg], [$JAVA_BASE]) + IT_CHECK_FOR_CLASS(SUN_SECURITY_ACTION_GETPROPERTYACTION, [sun.security.action.GetPropertyAction], [some.pkg], [$JAVA_BASE]) + # the classname cant be substitued by variable, as it is substituted to inner class +-if test x"$HAVE_JAVA9" = xyes ; then ++if test x"$HAVE_JAVA21" = xyes ; then + IT_CHECK_FOR_CLASS(HEXDUMPENCODER, [sun.security.util.HexDumpEncoder], [some.pkg], [$JAVA_BASE]) +- IT_CHECK_FOR_CLASS(SUN_MISC_JARINDEX, [jdk.internal.util.jar.JarIndex], [some.pkg], [$JAVA_BASE]) + else +- IT_CHECK_FOR_CLASS(HEXDUMPENCODER, [sun.misc.HexDumpEncoder], [some.pkg], [$JAVA_BASE]) +- IT_CHECK_FOR_CLASS(SUN_MISC_JARINDEX, [sun.misc.JarIndex], [some.pkg], [$JAVA_BASE]) +- IT_CHECK_FOR_CLASS(SUN_MISC_LAUNCHER, [sun.misc.Launcher], [some.pkg], [$JAVA_BASE]) ++ if test x"$HAVE_JAVA9" = xyes ; then ++ IT_CHECK_FOR_CLASS(HEXDUMPENCODER, [sun.security.util.HexDumpEncoder], [some.pkg], [$JAVA_BASE]) ++ IT_CHECK_FOR_CLASS(SUN_MISC_JARINDEX, [jdk.internal.util.jar.JarIndex], [some.pkg], [$JAVA_BASE]) ++ else ++ IT_CHECK_FOR_CLASS(HEXDUMPENCODER, [sun.misc.HexDumpEncoder], [some.pkg], [$JAVA_BASE]) ++ IT_CHECK_FOR_CLASS(SUN_MISC_JARINDEX, [sun.misc.JarIndex], [some.pkg], [$JAVA_BASE]) ++ IT_CHECK_FOR_CLASS(SUN_MISC_LAUNCHER, [sun.misc.Launcher], [some.pkg], [$JAVA_BASE]) ++ fi + fi + IT_CHECK_FOR_CLASS(SUN_SECURITY_VALIDATOR_VALIDATOREXCEPTION, [sun.security.validator.ValidatorException], [some.pkg], [$JAVA_BASE]) + IT_CHECK_FOR_CLASS(SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE, [sun.net.www.protocol.jar.URLJarFile], [some.pkg], [$JAVA_BASE]) diff -Nru icedtea-web-1.8.8/debian/patches/jdk-21-jarindex.patch icedtea-web-1.8.8/debian/patches/jdk-21-jarindex.patch --- icedtea-web-1.8.8/debian/patches/jdk-21-jarindex.patch 1970-01-01 00:00:00.000000000 +0000 +++ icedtea-web-1.8.8/debian/patches/jdk-21-jarindex.patch 2024-02-15 07:50:42.000000000 +0000 @@ -0,0 +1,38 @@ +Description: Support for compilation with JDK 21 + Adds a dummy implementation of JarIndex to support compilation with JDK 21. + Most of the JDK's JarIndex functionality was moved to an internal class. +Origin: upstream, https://github.com/AdoptOpenJDK/IcedTea-Web/commits/b2fb1428e81620c15025bda373f949eb79edbbb4 +Author: Stephan Classen +Bug: https://github.com/AdoptOpenJDK/IcedTea-Web/pull/925 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052691 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/netx/net/sourceforge/jnlp/jdk89acesses/JarIndexAccess.java ++++ b/netx/net/sourceforge/jnlp/jdk89acesses/JarIndexAccess.java +@@ -28,7 +28,7 @@ + jarIndexClass = Class.forName("jdk.internal.util.jar.JarIndex"); + } catch (ClassNotFoundException exx) { + OutputController.getLogger().log(exx); +- throw new RuntimeException("JarIndex not found!"); ++ jarIndexClass = JarIndexDummy.class; + } + } + } +@@ -71,4 +71,17 @@ + return (LinkedList) o; + } + ++ /** ++ * Because starting of JAVA 21 the JarIndex is no longer supported we provide a dummy implementation which always returns {@code null}. ++ */ ++ @SuppressWarnings("unused") ++ private static class JarIndexDummy { ++ public static Object getJarIndex(JarFile jar) { ++ return null; ++ } ++ ++ public Object get(String fileName) { ++ return null; ++ } ++ } + } diff -Nru icedtea-web-1.8.8/debian/patches/series icedtea-web-1.8.8/debian/patches/series --- icedtea-web-1.8.8/debian/patches/series 2022-11-02 09:45:10.000000000 +0000 +++ icedtea-web-1.8.8/debian/patches/series 2024-02-15 07:50:42.000000000 +0000 @@ -6,3 +6,5 @@ reproducible-documentation.patch remove-pack200-support.patch build-with-java17.diff +jdk-21-autoconf.patch +jdk-21-jarindex.patch