Control: tags 1012063 + patch
Control: tags 1012063 + pending

Dear maintainer,

I've prepared an NMU for cofoja (versioned as 1.3-4.1) and uploaded
it to DELAYED/14. Please feel free to tell me if I should cancel it.

cu
Adrian
diff -Nru cofoja-1.3/debian/changelog cofoja-1.3/debian/changelog
--- cofoja-1.3/debian/changelog	2018-11-29 23:20:57.000000000 +0200
+++ cofoja-1.3/debian/changelog	2022-11-29 23:29:31.000000000 +0200
@@ -1,3 +1,10 @@
+cofoja (1.3-4.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Backport upstream fix for FTBFS with OpenJDK 17. (Closes: #1012063)
+
+ -- Adrian Bunk <b...@debian.org>  Tue, 29 Nov 2022 23:29:31 +0200
+
 cofoja (1.3-4) unstable; urgency=medium
 
   * Team upload.
diff -Nru cofoja-1.3/debian/patches/0001-java9-doesn-t-need-tools.jar.patch cofoja-1.3/debian/patches/0001-java9-doesn-t-need-tools.jar.patch
--- cofoja-1.3/debian/patches/0001-java9-doesn-t-need-tools.jar.patch	1970-01-01 02:00:00.000000000 +0200
+++ cofoja-1.3/debian/patches/0001-java9-doesn-t-need-tools.jar.patch	2022-11-29 23:29:31.000000000 +0200
@@ -0,0 +1,33 @@
+From a832cc817a3e5a3c3b5ac99b5cf5183f2c987ebb Mon Sep 17 00:00:00 2001
+From: "Chris West (Faux)" <g...@goeswhere.com>
+Date: Wed, 23 Aug 2017 14:46:11 +0100
+Subject: java9 doesn't need tools.jar
+
+---
+ build.xml | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/build.xml b/build.xml
+index 3410f53..e891a96 100644
+--- a/build.xml
++++ b/build.xml
+@@ -209,9 +209,15 @@
+     <echo message="Debug:         ${debug}" />
+   </target>
+ 
+-  <target name="init" depends="configure">
++  <condition property="needs-tools-jar">
++    <matches pattern="1\.[5678].*" string="${ant.java.version}"/>
++  </condition>
++
++  <target name="check-tools-jar" if="needs-tools-jar">
+     <requirejar property="tools.jar" />
++  </target>
+ 
++  <target name="init" depends="configure,check-tools-jar">
+     <tstamp />
+     <condition property="cofoja.version"
+                value="${version}-${DSTAMP}"
+-- 
+2.30.2
+
diff -Nru cofoja-1.3/debian/patches/0002-Add-configure-message-if-tools.jar-is-not-needed.patch cofoja-1.3/debian/patches/0002-Add-configure-message-if-tools.jar-is-not-needed.patch
--- cofoja-1.3/debian/patches/0002-Add-configure-message-if-tools.jar-is-not-needed.patch	1970-01-01 02:00:00.000000000 +0200
+++ cofoja-1.3/debian/patches/0002-Add-configure-message-if-tools.jar-is-not-needed.patch	2022-11-29 23:29:31.000000000 +0200
@@ -0,0 +1,52 @@
+From 5d4f1430f24a5762fb7234a51ab8a2619394b390 Mon Sep 17 00:00:00 2001
+From: Nhat Minh Le <nhat.minh...@huoc.org>
+Date: Thu, 24 Aug 2017 20:58:09 +0100
+Subject: Add configure message if tools.jar is not needed
+
+---
+ build.xml | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/build.xml b/build.xml
+index e891a96..308fcec 100644
+--- a/build.xml
++++ b/build.xml
+@@ -30,6 +30,10 @@
+     </or>
+   </condition>
+ 
++  <condition property="needs-tools-jar">
++    <matches pattern="1\.[5678].*" string="${ant.java.version}"/>
++  </condition>
++
+   <property name="lib.dir" location="lib" />
+   <property name="src.dir" location="src" />
+   <property name="test.dir" location="test" />
+@@ -201,7 +205,12 @@
+     <sequential if:set="rt.jar">
+       <checkjar label="JRE RT JAR:    " property="rt.jar" />
+     </sequential>
+-    <checkjar label="JDK Tools JAR: " property="tools.jar" />
++    <sequential if:true="${needs-tools-jar}">
++      <checkjar label="JDK Tools JAR: " property="tools.jar" />
++    </sequential>
++    <sequential unless:true="${needs-tools-jar}">
++      <echo message="JDK Tools JAR: not needed" />
++    </sequential>
+     <sequential if:set="bootstrap.jar">
+       <checkjar label="Bootstrap JAR: " property="bootstrap.jar" />
+     </sequential>
+@@ -209,10 +218,6 @@
+     <echo message="Debug:         ${debug}" />
+   </target>
+ 
+-  <condition property="needs-tools-jar">
+-    <matches pattern="1\.[5678].*" string="${ant.java.version}"/>
+-  </condition>
+-
+   <target name="check-tools-jar" if="needs-tools-jar">
+     <requirejar property="tools.jar" />
+   </target>
+-- 
+2.30.2
+
diff -Nru cofoja-1.3/debian/patches/0003-Switch-to-if-unless-set-instead-of-true-for-conditio.patch cofoja-1.3/debian/patches/0003-Switch-to-if-unless-set-instead-of-true-for-conditio.patch
--- cofoja-1.3/debian/patches/0003-Switch-to-if-unless-set-instead-of-true-for-conditio.patch	1970-01-01 02:00:00.000000000 +0200
+++ cofoja-1.3/debian/patches/0003-Switch-to-if-unless-set-instead-of-true-for-conditio.patch	2022-11-29 23:29:31.000000000 +0200
@@ -0,0 +1,47 @@
+From fe6d2ac03741ed6722c1aaaa3b8011b4ae323d05 Mon Sep 17 00:00:00 2001
+From: Nhat Minh Le <nhat.minh...@huoc.org>
+Date: Thu, 24 Aug 2017 21:49:41 +0100
+Subject: Switch to if/unless:set instead of :true for <condition> variables
+
+---
+ build.xml | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build.xml b/build.xml
+index 308fcec..f8f5593 100644
+--- a/build.xml
++++ b/build.xml
+@@ -205,10 +205,10 @@
+     <sequential if:set="rt.jar">
+       <checkjar label="JRE RT JAR:    " property="rt.jar" />
+     </sequential>
+-    <sequential if:true="${needs-tools-jar}">
++    <sequential if:set="needs-tools-jar">
+       <checkjar label="JDK Tools JAR: " property="tools.jar" />
+     </sequential>
+-    <sequential unless:true="${needs-tools-jar}">
++    <sequential unless:set="needs-tools-jar">
+       <echo message="JDK Tools JAR: not needed" />
+     </sequential>
+     <sequential if:set="bootstrap.jar">
+@@ -316,7 +316,7 @@
+       <compilerarg value="-Acom.google.java.contract.dump=${obj.dir}/test/dump" />
+       <exclude name="**/SeparateGenericSuperclass.java" />
+       <exclude name="**/SeparateInterface.java" />
+-      <exclude name="**/Java8*.java" unless:true="${java8}" />
++      <exclude name="**/Java8*.java" unless:set="java8" />
+     </cofojavac>
+   </target>
+ 
+@@ -334,7 +334,7 @@
+       <batchtest fork="yes" todir="${obj.dir}/test">
+         <fileset dir="${obj.dir}/test">
+           <include name="**/*Test.class" />
+-          <exclude name="**/Java8*.class" unless:true="${java8}" />
++          <exclude name="**/Java8*.class" unless:set="java8" />
+         </fileset>
+       </batchtest>
+     </junit>
+-- 
+2.30.2
+
diff -Nru cofoja-1.3/debian/patches/0004-Add-add-opens-for-masked-internal-com.sun.tools-APIs.patch cofoja-1.3/debian/patches/0004-Add-add-opens-for-masked-internal-com.sun.tools-APIs.patch
--- cofoja-1.3/debian/patches/0004-Add-add-opens-for-masked-internal-com.sun.tools-APIs.patch	1970-01-01 02:00:00.000000000 +0200
+++ cofoja-1.3/debian/patches/0004-Add-add-opens-for-masked-internal-com.sun.tools-APIs.patch	2022-11-29 23:29:31.000000000 +0200
@@ -0,0 +1,85 @@
+From b62618fa472e3f885622f51181256c540e8e8b86 Mon Sep 17 00:00:00 2001
+From: Nhat Minh Le <nhat.minh...@huoc.org>
+Date: Thu, 24 Aug 2017 21:51:07 +0100
+Subject: Add --add-opens for masked internal com.sun.tools APIs in Java 9
+
+---
+ build.xml          | 30 +++++++++++++++++++++++-------
+ default.properties |  1 +
+ 2 files changed, 24 insertions(+), 7 deletions(-)
+
+diff --git a/build.xml b/build.xml
+index f8f5593..540c689 100644
+--- a/build.xml
++++ b/build.xml
+@@ -34,6 +34,15 @@
+     <matches pattern="1\.[5678].*" string="${ant.java.version}"/>
+   </condition>
+ 
++  <condition property="add-opens-tools">
++    <and>
++      <istrue value="${add-opens}" />
++      <not>
++        <isset property="needs-tools-jar" />
++      </not>
++    </and>
++  </condition>
++
+   <property name="lib.dir" location="lib" />
+   <property name="src.dir" location="src" />
+   <property name="test.dir" location="test" />
+@@ -80,8 +89,14 @@
+   <!-- Build macros. -->
+ 
+   <presetdef name="ujavac">
+-    <javac encoding="utf-8" debug="${debug}" includeantruntime="false">
++    <javac encoding="utf-8" debug="${debug}" includeantruntime="false" fork="true">
+       <bootclasspath location="${rt.jar}" if:set="rt.jar" />
++      <compilerarg value="-J--add-opens" if:set="add-opens-tools" />
++      <compilerarg value="-Jjdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"
++                   if:set="add-opens-tools" />
++      <compilerarg value="-J--add-opens" if:set="add-opens-tools" />
++      <compilerarg value="-Jjdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"
++                   if:set="add-opens-tools" />
+     </javac>
+   </presetdef>
+ 
+@@ -203,19 +218,20 @@
+     <echo message="Configuration" />
+     <echo message="-------------" />
+     <sequential if:set="rt.jar">
+-      <checkjar label="JRE RT JAR:    " property="rt.jar" />
++      <checkjar label="JRE RT JAR:        " property="rt.jar" />
+     </sequential>
+     <sequential if:set="needs-tools-jar">
+-      <checkjar label="JDK Tools JAR: " property="tools.jar" />
++      <checkjar label="JDK Tools JAR:     " property="tools.jar" />
+     </sequential>
+     <sequential unless:set="needs-tools-jar">
+-      <echo message="JDK Tools JAR: not needed" />
++      <echo message="JDK Tools JAR:     not needed" />
++      <echo message="Java9 --add-opens: ${add-opens}" />
+     </sequential>
+     <sequential if:set="bootstrap.jar">
+-      <checkjar label="Bootstrap JAR: " property="bootstrap.jar" />
++      <checkjar label="Bootstrap JAR:     " property="bootstrap.jar" />
+     </sequential>
+-    <echo message="Snapshot:      ${snapshot}" />
+-    <echo message="Debug:         ${debug}" />
++    <echo message="Snapshot:          ${snapshot}" />
++    <echo message="Debug:             ${debug}" />
+   </target>
+ 
+   <target name="check-tools-jar" if="needs-tools-jar">
+diff --git a/default.properties b/default.properties
+index ba01f4a..7d413d0 100644
+--- a/default.properties
++++ b/default.properties
+@@ -13,3 +13,4 @@ debug=true
+ 
+ ## Location of the JDK 'tools.jar' or 'classes.jar' (on Mac OS X).
+ tools.jar=${java.home}/../lib/tools.jar
++add-opens=true
+-- 
+2.30.2
+
diff -Nru cofoja-1.3/debian/patches/01-java9-compatibility.patch cofoja-1.3/debian/patches/01-java9-compatibility.patch
--- cofoja-1.3/debian/patches/01-java9-compatibility.patch	2017-11-29 01:30:25.000000000 +0200
+++ cofoja-1.3/debian/patches/01-java9-compatibility.patch	1970-01-01 02:00:00.000000000 +0200
@@ -1,22 +0,0 @@
-Description: Fixes the build failure with Java 9
-Author: Emmanuel Bourg <ebo...@apache.org>
-Forwarded: no
---- a/build.xml
-+++ b/build.xml
-@@ -201,7 +200,6 @@
-     <sequential if:set="rt.jar">
-       <checkjar label="JRE RT JAR:    " property="rt.jar" />
-     </sequential>
--    <checkjar label="JDK Tools JAR: " property="tools.jar" />
-     <sequential if:set="bootstrap.jar">
-       <checkjar label="Bootstrap JAR: " property="bootstrap.jar" />
-     </sequential>
-@@ -210,8 +208,6 @@
-   </target>
- 
-   <target name="init" depends="configure">
--    <requirejar property="tools.jar" />
--
-     <tstamp />
-     <condition property="cofoja.version"
-                value="${version}-${DSTAMP}"
diff -Nru cofoja-1.3/debian/patches/series cofoja-1.3/debian/patches/series
--- cofoja-1.3/debian/patches/series	2018-11-29 23:14:53.000000000 +0200
+++ cofoja-1.3/debian/patches/series	2022-11-29 23:29:31.000000000 +0200
@@ -1,2 +1,5 @@
-01-java9-compatibility.patch
 02-java11-compatibility.patch
+0001-java9-doesn-t-need-tools.jar.patch
+0002-Add-configure-message-if-tools.jar-is-not-needed.patch
+0003-Switch-to-if-unless-set-instead-of-true-for-conditio.patch
+0004-Add-add-opens-for-masked-internal-com.sun.tools-APIs.patch

Reply via email to