Your message dated Fri, 15 May 2020 14:39:17 +0000
with message-id <[email protected]>
and subject line Bug#960652: fixed in jts 1.16.1+ds-2
has caused the Debian Bug report #960652,
regarding src:jts: Please add support to build against libjson-simple-java >= 3
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
960652: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960652
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:jts
Version: 1.16.1+ds-1
Severity: normal
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi,
I'd like to transition json-simple 3.1.1 to unstable, but jts is a blocker
since it builds against libjson-simple-java << 3 only.
The json-simple classes used by jts 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 suite passes in both cases.
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+Oq8ACgkQ7+hsbH/+
z4Nrcwf/bhoqxZMI7zi3dVGx+q31sXJT6/+59WqWRbO3wPWUb7DzOyVok6+ksJs3
G9s+GfGxKJ70I0756653ra7WcFD0DyAdzq4PsATYL/D6AJsgeci8F31yUV/Fginj
pZNQuMZppwmdxLN9+VKyjHn7YW5UyGTKzF0zzCQqc5yN+mtae3d99lytUKoGmCtv
b5buhzSaBsBswa4mK6mL5cpY3oWFDzj61DBHrQQqYkWoEtQ4gGQ18O8/EdKQeMer
nnzmyeY694Tu6tZ1tLk/5Wr7YSHLnt/vPUB6F14QsClKVoToAf0qtnKhUs0QI5Bh
sM9OU1mDqIfIHEelR+09iiSEefOz8Q==
=yClf
-----END PGP SIGNATURE-----
diff -Nru jts-1.16.1+ds/debian/changelog jts-1.16.1+ds/debian/changelog
--- jts-1.16.1+ds/debian/changelog 2019-07-24 20:21:16.000000000 +0200
+++ jts-1.16.1+ds/debian/changelog 2020-05-15 00:26:47.000000000 +0200
@@ -1,3 +1,10 @@
+jts (1.16.1+ds-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Tentative patch to build against json-simple 3
+
+ -- Gilles Filippini <[email protected]> Fri, 15 May 2020 00:26:47 +0200
+
jts (1.16.1+ds-1) unstable; urgency=medium
* Team upload.
diff -Nru jts-1.16.1+ds/debian/maven.rules jts-1.16.1+ds/debian/maven.rules
--- jts-1.16.1+ds/debian/maven.rules 2018-07-07 20:06:29.000000000 +0200
+++ jts-1.16.1+ds/debian/maven.rules 1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-
-junit junit jar s/.*/3.x/ * *
-org.locationtech.jts jts-modules pom s/.*/debian/ * *
-org.apache.felix maven-bundle-plugin jar s/.*/2.5.4/ * *
diff -Nru jts-1.16.1+ds/debian/maven.rules.in
jts-1.16.1+ds/debian/maven.rules.in
--- jts-1.16.1+ds/debian/maven.rules.in 1970-01-01 01:00:00.000000000 +0100
+++ jts-1.16.1+ds/debian/maven.rules.in 2020-05-15 00:26:47.000000000 +0200
@@ -0,0 +1,5 @@
+
+junit junit jar s/.*/3.x/ * *
+org.locationtech.jts jts-modules pom s/.*/debian/ * *
+org.apache.felix maven-bundle-plugin jar s/.*/2.5.4/ * *
+s/com.googlecode.json-simple/@JSON_SIMPLE_MAVEN@/ json-simple * s/.*/debian/ *
*
diff -Nru jts-1.16.1+ds/debian/patches/json-simple-3.patch
jts-1.16.1+ds/debian/patches/json-simple-3.patch
--- jts-1.16.1+ds/debian/patches/json-simple-3.patch 1970-01-01
01:00:00.000000000 +0100
+++ jts-1.16.1+ds/debian/patches/json-simple-3.patch 2020-05-15
00:26:47.000000000 +0200
@@ -0,0 +1,189 @@
+Description: 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 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
+ - The exception DeserializationExcetpion renamed as JsonException
+ These two changes are handled using place-holders @JSON_SIMPLE_PACKAGE@
+ and @JSON_EXCEPTION@ which are substituted at build time by debian/rules.
+ .
+ With these tricks the package is compatible with json-simple 2.x and 3.x.
+Author: Gilles Filippini <[email protected]>
+Index:
jts-1.16.1+ds/modules/io/common/src/main/java/org/locationtech/jts/io/geojson/GeoJsonReader.java
+===================================================================
+---
jts-1.16.1+ds.orig/modules/io/common/src/main/java/org/locationtech/jts/io/geojson/GeoJsonReader.java
++++
jts-1.16.1+ds/modules/io/common/src/main/java/org/locationtech/jts/io/geojson/GeoJsonReader.java
+@@ -18,7 +18,7 @@ import java.util.ArrayList;
+ import java.util.List;
+ import java.util.Map;
+
+-import org.json.simple.parser.JSONParser;
++import @[email protected];
+ import org.locationtech.jts.geom.CoordinateSequence;
+ import org.locationtech.jts.geom.Geometry;
+ import org.locationtech.jts.geom.GeometryFactory;
+@@ -104,11 +104,10 @@ public class GeoJsonReader {
+
+ Geometry result = null;
+
+- JSONParser parser = new JSONParser();
+ try {
+ @SuppressWarnings("unchecked")
+- Map<String, Object> geometryMap = (Map<String, Object>) parser
+- .parse(reader);
++ Map<String, Object> geometryMap = (Map<String, Object>) Jsoner
++ .deserialize(reader);
+
+ GeometryFactory geometryFactory = null;
+ if (this.gf == null) {
+@@ -119,9 +118,7 @@ public class GeoJsonReader {
+
+ result = create(geometryMap, geometryFactory);
+
+- } catch (org.json.simple.parser.ParseException e) {
+- throw new ParseException(e);
+- } catch (IOException e) {
++ } catch (@JSON_SIMPLE_PACKAGE@.@JSON_EXCEPTION@ e) {
+ throw new ParseException(e);
+ }
+
+Index:
jts-1.16.1+ds/modules/io/common/src/main/java/org/locationtech/jts/io/geojson/GeoJsonWriter.java
+===================================================================
+---
jts-1.16.1+ds.orig/modules/io/common/src/main/java/org/locationtech/jts/io/geojson/GeoJsonWriter.java
++++
jts-1.16.1+ds/modules/io/common/src/main/java/org/locationtech/jts/io/geojson/GeoJsonWriter.java
+@@ -19,8 +19,8 @@ import java.util.LinkedHashMap;
+ import java.util.List;
+ import java.util.Map;
+
+-import org.json.simple.JSONAware;
+-import org.json.simple.JSONObject;
++import @[email protected];
++import @[email protected];
+ import org.locationtech.jts.geom.CoordinateSequence;
+ import org.locationtech.jts.geom.Geometry;
+ import org.locationtech.jts.geom.GeometryCollection;
+@@ -94,14 +94,14 @@ public class GeoJsonWriter {
+ * throws an IOException when unable to write the JSON string
+ */
+ public void write(Geometry geometry, Writer writer) throws IOException {
+- Map<String, Object> map = create(geometry, isEncodeCRS);
+- JSONObject.writeJSONString(map, writer);
++ JsonObject map = create(geometry, isEncodeCRS);
++ map.toJson(writer);
+ writer.flush();
+ }
+
+- private Map<String, Object> create(Geometry geometry, boolean encodeCRS) {
++ private JsonObject create(Geometry geometry, boolean encodeCRS) {
+
+- Map<String, Object> result = new LinkedHashMap<String, Object>();
++ JsonObject result = new JsonObject();
+ result.put(GeoJsonConstants.NAME_TYPE, geometry.getGeometryType());
+
+ if (geometry instanceof Point) {
+@@ -109,11 +109,13 @@ public class GeoJsonWriter {
+
+ final String jsonString = getJsonString(point.getCoordinateSequence());
+
+- result.put(GeoJsonConstants.NAME_COORDINATES, new JSONAware() {
++ result.put(GeoJsonConstants.NAME_COORDINATES, new Jsonable() {
+
+- public String toJSONString() {
++ public String toJson() {
+ return jsonString;
+ }
++ public void toJson(Writer out) {
++ }
+ });
+
+ } else if (geometry instanceof LineString) {
+@@ -122,11 +124,13 @@ public class GeoJsonWriter {
+ final String jsonString = getJsonString(lineString
+ .getCoordinateSequence());
+
+- result.put(GeoJsonConstants.NAME_COORDINATES, new JSONAware() {
++ result.put(GeoJsonConstants.NAME_COORDINATES, new Jsonable() {
+
+- public String toJSONString() {
++ public String toJson() {
+ return jsonString;
+ }
++ public void toJson(Writer out) {
++ }
+ });
+
+ } else if (geometry instanceof Polygon) {
+@@ -185,27 +189,31 @@ public class GeoJsonWriter {
+ return result;
+ }
+
+- private List<JSONAware> makeJsonAware(Polygon poly) {
+- ArrayList<JSONAware> result = new ArrayList<JSONAware>();
++ private List<Jsonable> makeJsonAware(Polygon poly) {
++ ArrayList<Jsonable> result = new ArrayList<Jsonable>();
+
+ {
+ final String jsonString = getJsonString(poly.getExteriorRing()
+ .getCoordinateSequence());
+- result.add(new JSONAware() {
++ result.add(new Jsonable() {
+
+- public String toJSONString() {
++ public String toJson() {
+ return jsonString;
+ }
++ public void toJson(Writer out) {
++ }
+ });
+ }
+ for (int i = 0; i < poly.getNumInteriorRing(); i++) {
+ final String jsonString = getJsonString(poly.getInteriorRingN(i)
+ .getCoordinateSequence());
+- result.add(new JSONAware() {
++ result.add(new Jsonable() {
+
+- public String toJSONString() {
++ public String toJson() {
+ return jsonString;
+ }
++ public void toJson(Writer out) {
++ }
+ });
+ }
+
+@@ -227,21 +235,25 @@ public class GeoJsonWriter {
+ LineString lineString = (LineString) geometry;
+ final String jsonString = getJsonString(lineString
+ .getCoordinateSequence());
+- list.add(new JSONAware() {
++ list.add(new Jsonable() {
+
+- public String toJSONString() {
++ public String toJson() {
+ return jsonString;
+ }
++ public void toJson(Writer out) {
++ }
+ });
+ }
+ else if (geometry instanceof Point) {
+ Point point = (Point) geometry;
+ final String jsonString =
getJsonString(point.getCoordinateSequence());
+- list.add(new JSONAware() {
++ list.add(new Jsonable() {
+
+- public String toJSONString() {
++ public String toJson() {
+ return jsonString;
+ }
++ public void toJson(Writer out) {
++ }
+ });
+ }
+ }
diff -Nru jts-1.16.1+ds/debian/patches/series
jts-1.16.1+ds/debian/patches/series
--- jts-1.16.1+ds/debian/patches/series 2018-07-07 20:06:29.000000000 +0200
+++ jts-1.16.1+ds/debian/patches/series 2020-05-15 00:26:47.000000000 +0200
@@ -1 +1,2 @@
jts-core-jar,patch
+json-simple-3.patch
diff -Nru jts-1.16.1+ds/debian/rules jts-1.16.1+ds/debian/rules
--- jts-1.16.1+ds/debian/rules 2018-07-07 20:06:29.000000000 +0200
+++ jts-1.16.1+ds/debian/rules 2020-05-15 00:26:47.000000000 +0200
@@ -1,6 +1,37 @@
#!/usr/bin/make -f
+JSON_SIMPLE_VERSION = $(shell dpkg -l libjson-simple-java | grep '^ii' | awk
'{print $$3}')
+JSON_SIMPLE_3 = $(shell dpkg --compare-versions '$(JSON_SIMPLE_VERSION)' '>'
'3.1.1-1~' && echo yes || echo no)
+ifeq (yes,$(JSON_SIMPLE_3))
+JSON_SIMPLE_PACKAGE = com.github.cliftonlabs.json_simple
+JSON_EXCEPTION = JsonException
+JSON_SIMPLE_MAVEN = com.github.cliftonlabs
+else
+JSON_SIMPLE_PACKAGE = org.json.simple
+JSON_EXCEPTION = DeserializationException
+JSON_SIMPLE_MAVEN = com.googlecode.json-simple
+endif
+
export JAVA_HOME := /usr/lib/jvm/default-java
%:
dh $@ --buildsystem=maven --parallel
+
+debian/maven.rules: debian/maven.rules.in
+ sed 's/@JSON_SIMPLE_MAVEN@/$(JSON_SIMPLE_MAVEN)/' $< >$@
+
+override_dh_auto_configure: debian/maven.rules
+ dh_auto_configure
+
+override_dh_auto_clean:
+ dh_auto_clean
+ find . -type f -name \*.java.json-simple \
+ -exec sh -c 'file={} && mv $$file $${file%.json-simple}' \; -print
+
+override_dh_auto_build:
+ find . -type f -name \*.java -exec grep -q 'import
@JSON_SIMPLE_PACKAGE@' {} \; \
+ -exec sed -i.json-simple \
+ -e 's,@JSON_SIMPLE_PACKAGE@,$(JSON_SIMPLE_PACKAGE),' \
+ -e 's/@JSON_EXCEPTION@/$(JSON_EXCEPTION)/' \
+ {} \; -print
+ dh_auto_build
--- End Message ---
--- Begin Message ---
Source: jts
Source-Version: 1.16.1+ds-2
Done: Bas Couwenberg <[email protected]>
We believe that the bug you reported is fixed in the latest version of
jts, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Bas Couwenberg <[email protected]> (supplier of updated jts package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Fri, 15 May 2020 09:55:23 +0200
Source: jts
Architecture: source
Version: 1.16.1+ds-2
Distribution: unstable
Urgency: medium
Maintainer: Debian GIS Project <[email protected]>
Changed-By: Bas Couwenberg <[email protected]>
Closes: 960652
Changes:
jts (1.16.1+ds-2) unstable; urgency=medium
.
* Team upload.
.
[ Bas Couwenberg ]
* Bump Standards-Version to 4.5.0, no changes.
* Drop Name field from upstream metadata.
* Bump debhelper compat to 10, changes:
- Drop --parallel option, enabled by default
.
[ Gilles Filippini ]
* Tentative patch to build against json-simple 3.
(closes: #960652)
Checksums-Sha1:
e5ffbe486f9f3f05aeea698529e7c394707f0005 2278 jts_1.16.1+ds-2.dsc
9413b05bada6adb568042c914243886c9647567f 12120 jts_1.16.1+ds-2.debian.tar.xz
667e3f8afafefbbe61bd7628e3eff6e46c5bc00a 13230 jts_1.16.1+ds-2_amd64.buildinfo
Checksums-Sha256:
c3fdf91126f14b10e22fa08ef409096138453e07a2bc9fac660b7753c239b35a 2278
jts_1.16.1+ds-2.dsc
c4fedf1458cdb74a60abe6b02ecd3b01397e984bb956e0d68359a05e67777b4c 12120
jts_1.16.1+ds-2.debian.tar.xz
31d7f1b66e14cf26d489b18ab0f3af0aa99dfca9ac073432c45c41e8cd62189b 13230
jts_1.16.1+ds-2_amd64.buildinfo
Files:
ee4a03aab800ff8b906ac9a564dfbc6b 2278 java optional jts_1.16.1+ds-2.dsc
51770614bb6ee568abaef2aa4c5739a3 12120 java optional
jts_1.16.1+ds-2.debian.tar.xz
d7886af9429142979494750ba7a5c84b 13230 java optional
jts_1.16.1+ds-2_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEgYLeQXBWQI1hRlDRZ1DxCuiNSvEFAl6+m98ACgkQZ1DxCuiN
SvHLFg/+M/gKGWUmqbDu+mUHMzI2FBeLjI3SPW7TMhPYrEbgj7rJgYVKmONmwSjr
PdYaPn+7zBhp8FuPsT9hOKaCQ0xx9pmhM2v3DziT8EfTyuGyp4sfYbMtmlqwoaxo
yHEur3AwxANHc0IQyQJsoEXTSmG3j598D+863rQU1MYj1E2idwLN3yy1O3MTxl3E
u2A1e5lYHZBiIFCEW/txXngfnrlPPD6HJl+Nx4dELJHCtswxUh9jxXQz7zXwyuzZ
N0YET/j/XNZ515lKSUQtPLqET3A+KpMa5dwLOZZgZcnn/9Y6fKkCmk96HXu2I4lf
41pvcCZz6PhLqaRAKW+LKWqjrz+jFY4qMJ3epodBYC30lD7kNErs+yBoBjWEtYlV
BKQD3rpZOLucDBni9EupL5FU4ydUs4SgIHBVzafDiS/HUtECIHfeQP4ZQkjiWqnT
7uONBxJjSGmYaeYtCepRuoG908uP4X3+zPtevcCJeae/VFxbF45f/2kZmVWfisTl
V1+nwrLdtz6Ofpft37tthFQeFjJntI+lSQL9DU8X+aUepbGWmYIcnSdMCGbuaKVe
jDSjFfjGiIs+Tu7sli/Tm1yFAld7ug7qoakA4AQYFAVtGl8Ogq0zsmFZnM8IiquV
9p9US1fD9CEAhn1MRWwprqzZOP6v1nV+GGONG/nn8rNJVQj4dMY=
=mw3d
-----END PGP SIGNATURE-----
--- End Message ---