Bug#960654: [Debian-med-packaging] Bug#960654: src:biojava4-live: Please add support to build against libjson-simple-java >= 3

2020-05-15 Thread Gilles Filippini
Hi Olivier,

olivier sallou a écrit le 15/05/2020 à 10:59 :
> Hi,
> thanks for the patch.
> However, if json-simple API/ABI is broken, I think that package should
> be kinda libjson-simple3-java to keep compatibility with existing
> packages using old versions and allow transition of packages to new
> release if needed and possible.

Thanks for your inputs.

I asked the Java packaging team for advice on this matter and they
recommended not to change the package name. I won't keep the deprecated
API around since it was deprecated several years ago and it is not
maintained anymore by upstream.

I intend to proceed with a proper transition via the Release Team. There
are only 6 reverse dependencies. This should be manageable.

> Anyway, gonna add your patch

Thanks,

_g.



signature.asc
Description: OpenPGP digital signature


Bug#960654: [Debian-med-packaging] Bug#960654: src:biojava4-live: Please add support to build against libjson-simple-java >= 3

2020-05-15 Thread olivier sallou
Hi,
thanks for the patch.
However, if json-simple API/ABI is broken, I think that package should
be kinda libjson-simple3-java to keep compatibility with existing
packages using old versions and allow transition of packages to new
release if needed and possible.

Anyway, gonna add your patch

Olivier

On Fri, 2020-05-15 at 09:41 +0200, Gilles Filippini wrote:
> Package: src:biojava4-live
> Version: 4.2.12+dfsg-2
> Severity: normal
> Tags: patch
> 
> Hi,
> 
> I'd like to transition json-simple 3.1.1 to unstable, but biojava4-
> live is a blocker since it builds against libjson-simple-java << 3
> only.
> 
> The json-simple classes used by biojava4-live were deprecated in
> version 2.0.0 [1]. There were removed in versions 3.x [2].
> 
> [1] 
> https://github.com/cliftonlabs/json-simple/blob/json-simple-2.0.0/README.txt
> [2] 
> https://github.com/cliftonlabs/json-simple/blob/json-simple-3.0.1/CHANGELOG
> 
> Please find attached a patch proposal to use the current json-simple
> classes. I've tested that the package builds correctly against
> libjson-simple-java version 2.3.0-1 from unstable and version 3.1.1-
> 1~exp2 currently in experimental, and the build time test cases
> report no errors.
> 
> Thanks in advance for considering.
> 
> _g.
> 
> -- System Information:
> Debian Release: buster/sid
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 5.6.0-1-amd64 (SMP w/4 CPU cores)
> Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8),
> LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
> LSM: AppArmor: enabled
> 
> ___
> Debian-med-packaging mailing list
> debian-med-packag...@alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-packaging
-- 
Olivier Sallou
Univ Rennes, Inria, CNRS, IRISA
Irisa, Campus de Beaulieu
F-35042 RENNES - FRANCE
Tel: 02.99.84.71.95

gpg key id: 4096R/326D8438  (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438



Bug#960654: src:biojava4-live: Please add support to build against libjson-simple-java >= 3

2020-05-15 Thread Gilles Filippini
Package: src:biojava4-live
Version: 4.2.12+dfsg-2
Severity: normal
Tags: patch

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi,

I'd like to transition json-simple 3.1.1 to unstable, but biojava4-live is a 
blocker since it builds against libjson-simple-java << 3 only.

The json-simple classes used by biojava4-live were deprecated in version 2.0.0 
[1]. There were removed in versions 3.x [2].

[1] https://github.com/cliftonlabs/json-simple/blob/json-simple-2.0.0/README.txt
[2] https://github.com/cliftonlabs/json-simple/blob/json-simple-3.0.1/CHANGELOG

Please find attached a patch proposal to use the current json-simple classes. 
I've tested that the package builds correctly against libjson-simple-java 
version 2.3.0-1 from unstable and version 3.1.1-1~exp2 currently in 
experimental, and the build time test cases report no errors.

Thanks in advance for considering.

_g.

- -- System Information:
Debian Release: buster/sid
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-BEGIN PGP SIGNATURE-

iQEzBAEBCgAdFiEEoJObzArDE05WtIyR7+hsbH/+z4MFAl6+R5UACgkQ7+hsbH/+
z4OOnQgApJ5lITTg7Gdl45fmVHMuVZ7EO8F30UQ8b11IjqC9Jvy5Smxe6QpBr1XO
eeSY1QI8GVFd5OHk31AijdMC/JZTkSwjHAV+R5YODf96D5nnNLb+Se5w3hrzf+hg
/sa/tgya1+1551eK+BJoJX6upyo8Eu1ZWcM4X/2gTqJMuV9yI0u6d2w5pUpfF3Dq
3oVPO+0ZdKuI26roUXLiZUyu7W5DVctqt+JHWYHAxxdiQ2DoxhStK40haZ6km6Ee
xJnSPX472CxArpHZWWeUFOl+9GPT7kN6WGfSgfgzVoAnq5kw0DwspegXykFlLSNT
7VQX8vBOKadHyKQ9QM8DJK+RWJNW5w==
=H6WS
-END PGP SIGNATURE-
diff -Nru biojava4-live-4.2.12+dfsg/debian/changelog 
biojava4-live-4.2.12+dfsg/debian/changelog
--- biojava4-live-4.2.12+dfsg/debian/changelog  2019-01-18 20:47:46.0 
+0100
+++ biojava4-live-4.2.12+dfsg/debian/changelog  2020-05-15 08:50:46.0 
+0200
@@ -1,3 +1,10 @@
+biojava4-live (4.2.12+dfsg-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Tentative fix to build against json-simple 3
+
+ -- Gilles Filippini   Fri, 15 May 2020 08:50:46 +0200
+
 biojava4-live (4.2.12+dfsg-2) unstable; urgency=medium
 
   * Team upload.
diff -Nru biojava4-live-4.2.12+dfsg/debian/patches/use_simple_json 
biojava4-live-4.2.12+dfsg/debian/patches/use_simple_json
--- biojava4-live-4.2.12+dfsg/debian/patches/use_simple_json2019-01-18 
15:58:37.0 +0100
+++ biojava4-live-4.2.12+dfsg/debian/patches/use_simple_json2020-05-15 
08:50:46.0 +0200
@@ -2,24 +2,42 @@
 Author: Olivier Sallou 
 Description: json.org library is not "free", use simple_json
  library and update according to API
-Last-Updated: 2012-12-02
-
 a/biojava-ws/src/main/java/org/biojava/nbio/ws/hmmer/RemoteHmmerScan.java
-+++ b/biojava-ws/src/main/java/org/biojava/nbio/ws/hmmer/RemoteHmmerScan.java
+ .
+ [ Gilles Filippini  ]
+ Patche updated to migrate away from deprecated json-simple 1.x classes
+ See json-simple 2.0.0 changelog:
+ > * Deprecated JSONParse and JSONValue in favor of Jsoner.
+ > * Deprecated JSONStreamAware and JSONAware in favor of Jsonable.
+ > * Deprecated JSONObject in favor of JsonObject.
+ > * Deprecated JSONArray in favor of JsonArray.
+ .
+ This patch now uses the new json-simple Json* classes. It is compatible
+ with both 2.x and 3.x json-simple releases, with a few ajustments
+ regarding backward incompatible changes in json-simple 3.x:
+ - The package name, changed to com.github.cliftonlabs.json_simple
+ This change is handled using place-holders @JSON_SIMPLE_PACKAGE@ which
+ are substituted at build time by debian/rules.
+ .
+ With this trick the package is compatible with json-simple 2.x and 3.x.
+Last-Updated: 2020-05-15
+Index: 
biojava4-live-4.2.12+dfsg/biojava-ws/src/main/java/org/biojava/nbio/ws/hmmer/RemoteHmmerScan.java
+===
+--- 
biojava4-live-4.2.12+dfsg.orig/biojava-ws/src/main/java/org/biojava/nbio/ws/hmmer/RemoteHmmerScan.java
 
biojava4-live-4.2.12+dfsg/biojava-ws/src/main/java/org/biojava/nbio/ws/hmmer/RemoteHmmerScan.java
 @@ -20,8 +20,10 @@
   */
  package org.biojava.nbio.ws.hmmer;
  
 -import net.sf.json.JSONArray;
 -import net.sf.json.JSONObject;
-+import org.json.simple.JSONArray;
-+import org.json.simple.JSONObject;
-+import org.json.simple.JSONValue;
++import @JSON_SIMPLE_PACKAGE@.JsonArray;
++import @JSON_SIMPLE_PACKAGE@.JsonObject;
++import @JSON_SIMPLE_PACKAGE@.Jsoner;
 +
  import org.biojava.nbio.core.sequence.ProteinSequence;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
-@@ -136,15 +138,13 @@
+@@ -136,15 +138,13 @@ public class RemoteHmmerScan implements
  
SortedSet results = new TreeSet();
try {
@@ -27,29 +45,29 @@
 -
 -  JSONObject hmresults = json.getJSONObject("results");
 -
-+  JSONObject