Thanks Andreas I think I can use this for the SRU.

Bernd already merged my branch and uploaded debian/3.20-12 which is
currently building in Debian and Groovy. So soon all that will be left
is the SRU to Focal which need a teammate to check my branch for errors.

** Changed in: gpsd (Ubuntu Focal)
     Assignee: (unassigned) => Christian Ehrhardt  (paelzer)

** Changed in: gpsd (Ubuntu)
       Status: Triaged => In Progress

** Description changed:

+ [Impact]
+ 
+  * Broken in 3.20 (>=Focal) by upstream the socket which is meant to
+    produce json output has one of its messages violating the json format.
+ 
+  * This leads to applications relying on the integrity of these messages to 
+    fail.
+ 
+  * Fix by backporting a small upstream commit
+ 
+ [Test Case]
+ 
+ Start without a device like /etc/defaul/gpsd
+   DEVICES=""
+ 
+ Attach a json watcher like to gpsd like
+ $ telnet localhost 2947
+ then enter
+ ?WATCH={"enable":true,"json":true};
+ 
+ This looks like:
+ 
+ $ telnet localhost 2947
+ Trying 127.0.0.1...
+ Connected to localhost.
+ Escape character is '^]'.
+ 
{"class":"VERSION","release":"3.20","rev":"3.20","proto_major":3,"proto_minor":14}
+ ?WATCH={"enable":true,"json":true};
+ {"class":"DEVICES","devices":[]}
+ 
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}
+ 
+ Then on another console attach the device:
+ $ sudo gpsdctl add /dev/ttyUSB0
+ 
+ In the telnet socket watch you will see:
+   
{"class":"DEVICE","path":"/dev/ttyUSB0","activated":2020-05-20T05:42:54.598Z}
+ 
+ And the last element in this is violating JSON.
+ With the fix this no more happens.
+ 
+ [Other Info]
+  
+  * n/a
+ 
+ ---
+ 
  Could you please add the patch to this issue to the ubuntu package:
  
  https://gitlab.com/gpsd/gpsd/-/issues/77
  
  TIA,
  Andreas
  
  andreast@atobuntu:~$ lsb_release -rd
  Description:  Ubuntu 20.04 LTS
  Release:      20.04
  
  The installed packet version is 3.20-8

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1879272

Title:
  corrupted json payload when adding a device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gpsd/+bug/1879272/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to