Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian....@packages.debian.org
Usertags: pu

jython/buster introduces a strictly versioned java dependency, which
causes problems on some upgrade paths from stretch. (#924283, #934111)
This problem originates from the dependency cycle (#929685) between
ca-certificates-java,default-jre-headless,openjdk-11-jre-headless
which has not been solved in sid, yet (and has been in several stable
releases already).

The cycle gets broken in a way that jython gets configured
successfully but jython-stilts gets configured subsequently and
fails because the system is in a state where openjdk-8-jre-headless
is still active (because openjdk-11-jre-headless is not yet
configured), but default-jre-headless/buster is already configured.
jython-stilts calls jython which fails because bytecode compiled for
java-9+ is getting executed with java-8.

This problem does not show up in other packages, since none adds
incompatibility with the java in stretch.

This was fixed in sid by building jython with backwards compatibility
with the java in stretch, s.t. it does not matter which java version is
run during the upgrade.
I've tested the failing upgrade path in piuparts and can confirm that
the proposed package successfully works around the issues.


Andreas
diff -Nru jython-2.7.1+repack1/debian/changelog 
jython-2.7.1+repack1/debian/changelog
--- jython-2.7.1+repack1/debian/changelog       2019-05-04 18:16:46.000000000 
+0200
+++ jython-2.7.1+repack1/debian/changelog       2019-08-13 13:21:55.000000000 
+0200
@@ -1,3 +1,17 @@
+jython (2.7.1+repack1-4~deb10u1) buster; urgency=medium
+
+  * Rebuild for buster.
+
+ -- Andreas Beckmann <a...@debian.org>  Tue, 13 Aug 2019 13:21:55 +0200
+
+jython (2.7.1+repack1-4) unstable; urgency=medium
+
+  * Team upload.
+  * Preserve the backward compatibility with Java 7 (Closes: #934111)
+  * Adjusted the Vcs-* fields
+
+ -- Emmanuel Bourg <ebo...@apache.org>  Thu, 08 Aug 2019 10:11:23 +0200
+
 jython (2.7.1+repack1-3) unstable; urgency=medium
 
   * Improve previous fix with default-jre-headless (>= 2:1.9), thanks to
diff -Nru jython-2.7.1+repack1/debian/control 
jython-2.7.1+repack1/debian/control
--- jython-2.7.1+repack1/debian/control 2019-05-04 18:14:46.000000000 +0200
+++ jython-2.7.1+repack1/debian/control 2019-08-08 10:04:43.000000000 +0200
@@ -25,14 +25,14 @@
  libicu4j-java,
  libnetty-java
 Standards-Version: 4.2.1
-Vcs-Git: https://salsa.debian.org/java-team/jython
-Vcs-Browser: https://salsa.debian.org/java-team/jython.git
+Vcs-Git: https://salsa.debian.org/java-team/jython.git
+Vcs-Browser: https://salsa.debian.org/java-team/jython
 Homepage: http://www.jython.org
 
 Package: jython
 Architecture: all
 Depends: ${misc:Depends}, ${perl:Depends}, ${python:Depends}, ${java:Depends},
- default-jre-headless (>= 2:1.9) | java9-runtime-headless,
+ default-jre-headless (>= 2:1.7) | java7-runtime-headless,
 Recommends: default-jdk | java-compiler
 Suggests: jython-doc, libmariadb-java, libpostgresql-jdbc-java
 Description: Python seamlessly integrated with Java
diff -Nru 
jython-2.7.1+repack1/debian/patches/08-java-backward-compatibility.patch 
jython-2.7.1+repack1/debian/patches/08-java-backward-compatibility.patch
--- jython-2.7.1+repack1/debian/patches/08-java-backward-compatibility.patch    
1970-01-01 01:00:00.000000000 +0100
+++ jython-2.7.1+repack1/debian/patches/08-java-backward-compatibility.patch    
2019-08-08 10:08:43.000000000 +0200
@@ -0,0 +1,45 @@
+Description: Preserves the backward compatibility with previous Java versions 
when built with Java 11+
+Author: Emmanuel Bourg <ebo...@apache.org>
+Forwarded: not
+--- a/build.xml
++++ b/build.xml
+@@ -436,6 +436,7 @@
+                 destdir="${compile.dir}"
+                 target="${jdk.target.version}"
+                 source="${jdk.source.version}"
++                release="${jdk.target.version}"
+                 debug="${debug}"
+                 deprecation="${deprecation}"
+                 nowarn="${nowarn}">
+@@ -483,6 +484,7 @@
+         <javac destdir="${compile.dir}"
+                target="${jdk.target.version}"
+                source="${jdk.source.version}"
++               release="${jdk.target.version}"
+                debug="${debug}"
+                deprecation="${deprecation}"
+                nowarn="${nowarn}"
+@@ -502,6 +504,7 @@
+                destdir="${compile.dir}"
+                target="${jdk.target.version}"
+                source="${jdk.source.version}"
++               release="${jdk.target.version}"
+                debug="${debug}"
+                deprecation="${deprecation}"
+                nowarn="${nowarn}">
+@@ -513,6 +516,7 @@
+                destdir="${compile.dir}"
+                target="${jdk.target.version}"
+                source="${jdk.source.version}"
++               release="${jdk.target.version}"
+                debug="${debug}"
+                deprecation="${deprecation}"
+                nowarn="${nowarn}"
+@@ -882,6 +886,7 @@
+                destdir="${compile.dir}"
+                target="${jdk.target.version}"
+                source="${jdk.source.version}"
++               release="${jdk.target.version}"
+                debug="${debug}"
+                deprecation="${deprecation}"
+                nowarn="${nowarn}"
diff -Nru jython-2.7.1+repack1/debian/patches/series 
jython-2.7.1+repack1/debian/patches/series
--- jython-2.7.1+repack1/debian/patches/series  2019-01-12 19:49:41.000000000 
+0100
+++ jython-2.7.1+repack1/debian/patches/series  2019-08-08 09:49:44.000000000 
+0200
@@ -4,3 +4,4 @@
 05-no-com.carrotsearch.sizeof.patch
 javadoc-classpath.patch
 reproducible-builds.patch
+08-java-backward-compatibility.patch
diff -Nru jython-2.7.1+repack1/debian/rules jython-2.7.1+repack1/debian/rules
--- jython-2.7.1+repack1/debian/rules   2019-01-13 12:14:47.000000000 +0100
+++ jython-2.7.1+repack1/debian/rules   2019-08-08 09:54:17.000000000 +0200
@@ -74,6 +74,7 @@
        # Build the class files.
        # -nouserlib is required to prevent conflicts with the ant jython plugin
        ant -nouserlib developer-build jar javadoc \
+         -Djython.java.version=7 \
          -Dmain.classpath=$(OUR_MAIN_CLASSPATH) \
          -Dtest.classpath=$(OUR_TEST_CLASSPATH) \
          -Druntime.classpath="$(OUR_RUNTIME_CLASSPATH)"

Reply via email to