Bug#874004: FTBFS with Java 9 due to -source/-target only

2018-01-24 Thread Markus Koschany
Control: tags -1 patch

Dear maintainer,

I've prepared a patch to fix the FTBFS with Java 9. Please find attached
the debdiff.

Regards,

Markus
diff -Nru ssvnc-1.0.29/debian/changelog ssvnc-1.0.29/debian/changelog
--- ssvnc-1.0.29/debian/changelog   2016-07-30 23:10:11.0 +0200
+++ ssvnc-1.0.29/debian/changelog   2018-01-24 19:34:43.0 +0100
@@ -1,3 +1,10 @@
+ssvnc (1.0.29-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS with Java 9. (Closes: #874004)
+
+ -- Markus Koschany   Wed, 24 Jan 2018 19:34:43 +0100
+
 ssvnc (1.0.29-3) unstable; urgency=low
 
   * debian/rules: Add call to dh_strip_nondeterminism.
diff -Nru ssvnc-1.0.29/debian/patches/java9.patch 
ssvnc-1.0.29/debian/patches/java9.patch
--- ssvnc-1.0.29/debian/patches/java9.patch 1970-01-01 01:00:00.0 
+0100
+++ ssvnc-1.0.29/debian/patches/java9.patch 2018-01-24 19:34:43.0 
+0100
@@ -0,0 +1,21 @@
+From: Markus Koschany 
+Date: Wed, 24 Jan 2018 19:27:10 +0100
+Subject: java9
+
+---
+ ultraftp/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ultraftp/Makefile b/ultraftp/Makefile
+index 4da53bb..e55e1bb 100644
+--- a/ultraftp/Makefile
 b/ultraftp/Makefile
+@@ -3,7 +3,7 @@ JDEST = ../../../../bin/util/ultraftp.jar
+ SOURCES = $(shell echo *.java)
+ CLASSES = $(SOURCES:%.java=%.class)
+ ARCHIVE = ultraftp.jar
+-JC_ARGS = -target 1.4 -source 1.4
++JC_ARGS = -target 1.7 -source 1.7
+ 
+ all: $(CLASSES) $(ARCHIVE)
+ 
diff -Nru ssvnc-1.0.29/debian/patches/series ssvnc-1.0.29/debian/patches/series
--- ssvnc-1.0.29/debian/patches/series  2016-07-30 23:09:13.0 +0200
+++ ssvnc-1.0.29/debian/patches/series  2018-01-24 19:34:43.0 +0100
@@ -6,3 +6,4 @@
 openssl1.1.patch
 auto-scale.patch
 samemachine_ip6_overflow.patch
+java9.patch


signature.asc
Description: OpenPGP digital signature


Bug#874004: FTBFS with Java 9 due to -source/-target only

2017-09-01 Thread Chris West
Source: ssvnc
Version: 1.0.29
Severity: normal
User: debian-j...@lists.debian.org
Usertags: default-java9

This package fails to build with default-jdk pointing to openjdk-9-jdk.
The wiki has some common problems and their solutions:
https://wiki.debian.org/Java/Java9Pitfalls

An automated tool has decided that this package will build fine if the
-source and -target options are changed to 1.6; no additional changes
are required. This was done by building with a compiler that changed
the settings automatically, then the real compiler, and diffing the
results. This modified compiler will never be part of Debian.

ant and Maven are supposed to do this for you, and I've tried to check
that this package is not using ant or Maven correctly, but I might have
messed up.

Build log sample:

make[2]: Entering directory '/build/ssvnc-1.0.29/ultraftp'
javac -target 1.4 -source 1.4 AuthPanel.java ButtonPanel.java 
ClipboardFrame.java DH.java DesCipher.java FTPFrame.java OptionsFrame.java 
RecordingFrame.java RfbProto.java SSLSocketToMe.java SessionRecorder.java 
VncCanvas.java VncViewer.java
warning: [options] bootstrap class path not set in conjunction with -source 1.4
error: Source option 1.4 is no longer supported. Use 1.6 or later.
error: Target option 1.4 is no longer supported. Use 1.6 or later.
Makefile:11: recipe for target 'AuthPanel.class' failed
make[2]: *** [AuthPanel.class] Error 2
make[2]: Leaving directory '/build/ssvnc-1.0.29/ultraftp'

Cheers,
Chris.