Unusable in Trusty; upgrade to 1.3.2

Bug #1443288 reported by Tim Landscheidt
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lua-json (Debian)
Fix Released
Unknown
lua-json (Ubuntu)
Fix Released
High
Unassigned
Trusty
Fix Released
High
Unassigned
Utopic
Won't Fix
High
Unassigned

Bug Description

[Impact]
Currently lua-json is unusable in Trusty:

| scfc@toolsbeta-webproxy:~$ lua
| Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
| > require('json')
| /usr/share/lua/5.1/json/decode/strings.lua:102: loop body may accept empty string
| stack traceback:
| [C]: ?
| /usr/share/lua/5.1/json/decode/strings.lua:102: in function 'buildCaptureString'
| /usr/share/lua/5.1/json/decode/strings.lua:123: in function 'generateLexer'
| /usr/share/lua/5.1/json/decode.lua:128: in function 'buildDecoder'
| /usr/share/lua/5.1/json/decode.lua:135: in main chunk
| [C]: in function 'require'
| /usr/share/lua/5.1/json.lua:5: in main chunk
| [C]: in function 'require'
| stdin:1: in main chunk
| [C]: ?
| >
| scfc@toolsbeta-webproxy:~$ dpkg-query -l lua-json
| Desired=Unknown/Install/Remove/Purge/Hold
| | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
| |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
| ||/ Name Version Architecture Description
| +++-=================================-=====================-=====================-=======================================================================
| ii lua-json 1.3-1 all JSON decoder/encoder for Lua
| scfc@toolsbeta-webproxy:~$

This is apparently the same issue as in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719519 which was fixed by upgrading to 1.3.2.

[Test Case]
1. Install packages lua5.1 (or lua5.2) and lua-json.
2. Expected behaviour:

| scfc@toolsbeta-test-trusty:~$ lua
| Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
| > require('json')
| > print(json.encode({'a', 'b', 'c'}))
| ["a","b","c"]
| > ^D
| scfc@toolsbeta-test-trusty:~$

[Regression Potential]
1. lua-json has no reverse dependencies, so an update will not affect other packages.
2. Lua only loads extensions on request. Applications not using "require('json')" will not attempt to read the files to be packaged by lua-json 1.3.2, so even a build error should not affect other Lua applications.
3. Lua applications using "require('json')" never worked in Trusty and will start working. In theory, a currently deployed system may rely on it failing.

Revision history for this message
Tim Landscheidt (scfc) wrote :

A backport from Utopic (1.3.1; "backportpackage -u ppa:scfc/trusty-backports -s utopic -d trusty lua-json") doesn't work on Trusty either, suggesting that it may be broken on Utopic as well.

A backport from Vivid (1.3.2; "backportpackage -u ppa:scfc/trusty-backports -s vivid -d trusty lua-json") works fine:

| scfc@toolsbeta-test-trusty:~$ sudo dpkg -i lua-json_1.3.2-1~ubuntu14.04.1~ppa1_all.deb
| (Reading database ... 38762 files and directories currently installed.)
| Preparing to unpack lua-json_1.3.2-1~ubuntu14.04.1~ppa1_all.deb ...
| Unpacking lua-json (1.3.2-1~ubuntu14.04.1~ppa1) over (1.3-1) ...
| Setting up lua-json (1.3.2-1~ubuntu14.04.1~ppa1) ...
| scfc@toolsbeta-test-trusty:~$ lua
| Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
| > require('json')
| > print(json.encode({'a', 'b', 'c'}))
| ["a","b","c"]
| >
| scfc@toolsbeta-test-trusty:~$

Tim Landscheidt (scfc)
description: updated
Micah Gersten (micahg)
Changed in lua-json (Ubuntu):
status: New → Invalid
Revision history for this message
Micah Gersten (micahg) wrote :

I'm trying the upstream patch by itself quickly to see if it works.

Changed in lua-json (Ubuntu Trusty):
assignee: nobody → Micah Gersten (micahg)
status: New → In Progress
Revision history for this message
Micah Gersten (micahg) wrote :

The upstream patch seems to work fine, uploaded as SRU, waiting for approval.

Changed in lua-json (Ubuntu Trusty):
assignee: Micah Gersten (micahg) → nobody
status: In Progress → Fix Committed
Revision history for this message
Micah Gersten (micahg) wrote :

Utopic SRU uploaded as well

Changed in lua-json (Ubuntu Utopic):
status: New → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Tim, or anyone else affected,

Accepted lua-json into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lua-json/1.3-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Tim, or anyone else affected,

Accepted lua-json into utopic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lua-json/1.3.1-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lua-json (Debian):
status: Unknown → Fix Released
Revision history for this message
Tim Landscheidt (scfc) wrote :

I tested lua-json 1.3-1ubuntu0.1 on Trusty with the small test script above (and our application to be sure).

With lua5.1, both worked correctly.

With lua5.2, the small test script failed with the error:

| scfc@toolsbeta-test-trusty:~$ lua
| Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
| > require('json')
| > print(json.encode({'a', 'b', 'c'}))
| stdin:1: attempt to call field 'encode' (a nil value)
| stack traceback:
| stdin:1: in main chunk
| [C]: in ?
| >
| scfc@toolsbeta-test-trusty:~$

While our specific application uses lua5.1, I think it should be fixed for lua5.1 and lua5.2.

tags: added: verification-failed
removed: verification-needed
Revision history for this message
Micah Gersten (micahg) wrote :

lua 5.2 compatibility (https://github.com/harningt/luajson/blob/master/docs/ReleaseNotes-1.3.1.txt) was added in 1.3.1. If the SRU team approves, I can upload the utopic version which is 1.3.1 + the lpeg-0.12 patch to trusty as well

Revision history for this message
Micah Gersten (micahg) wrote :

Per discussion on IRC, uploaded 1.3.1 backport to trusty:
[10:39] <micahg> arges: would you have a moment to look at this please? (SRU question) https://bugs.launchpad.net/ubuntu/utopic/+source/lua-json/+bug/1443288/comments/8
[10:39] <ubot93> Launchpad bug 1443288 in lua-json (Ubuntu Utopic) "Unusable in Trusty; upgrade to 1.3.2" [Undecided,Fix committed]
[10:40] <arges> micahg: looking
[10:41] <arges> micahg: so the fix for lua 5.2 can't just be added to 1.3-1ubuntu0.1 as a patch easily?
[10:42] <micahg> I'm not sure if there's a smaller patch or not, but it seems the whole 1.3.1 release was for lua5.2 compatibility
[10:42] <arges> micahg: yea looks like it
[10:42] <micahg> so, it would seem that's important for the LTS
[10:43] <arges> micahg: so seems reasonable as the update is a bugfix-only update.
[10:44] <micahg> ok, so I'm ok to backport the utopic SRU then, it's 1.3.1 + the fix for the bug in question
[10:45] <arges> seems reasonable to me
[10:45] <micahg> ok, thanks

Revision history for this message
Chris J Arges (arges) wrote :

Hello Tim, or anyone else affected,

Accepted lua-json into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lua-json/1.3.1-1ubuntu0.1~ubuntu14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-failed
tags: added: verification-needed
Mathew Hodson (mhodson)
Changed in lua-json (Ubuntu Utopic):
status: Fix Committed → Won't Fix
Changed in lua-json (Ubuntu):
status: Invalid → Fix Released
importance: Undecided → High
Changed in lua-json (Ubuntu Trusty):
importance: Undecided → High
Changed in lua-json (Ubuntu Utopic):
importance: Undecided → High
Revision history for this message
Mathew Hodson (mhodson) wrote :

This is fixed with lua-json 1.3.1-1ubuntu0.1~ubuntu14.04.1 from trusty-proposed

$ lua
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
> require('json')
> print(json.encode({'a', 'b'}))
["a","b"]
> ^C
$ apt list lua-json
Listing... Done
lua-json/trusty-proposed,now 1.3.1-1ubuntu0.1~ubuntu14.04.1 all [installed]

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lua-json - 1.3.1-1ubuntu0.1~ubuntu14.04.1

---------------
lua-json (1.3.1-1ubuntu0.1~ubuntu14.04.1) trusty; urgency=medium

  * No-change backport to trusty

lua-json (1.3.1-1ubuntu0.1) utopic; urgency=medium

  * Add upstream patch to fix lpeg 0.12 compatibility (LP: #1443288)
    - add debian/patches/fix-lpeg.patch
    - add debian/patches/series

lua-json (1.3.1-1) unstable; urgency=medium

  * [3d18e710] Merge tag 'upstream/1.3.1'
    Upstream version 1.3.1

 -- Micah Gersten <email address hidden> Tue, 09 Jun 2015 10:46:02 -0500

Changed in lua-json (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for lua-json has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Tim Landscheidt (scfc) wrote :

Sorry for the late response and especially thanks to Micah and Mathew for creating and testing the fix!

I just wanted to confirm that 1.3.1-1ubuntu0.1~ubuntu14.04.1 as shipped by Trusty now works great in our setup.

Thanks again!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.