Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5403

Compiler improvement or GPL-2.0 exception for lex & yacc parser files



    • Wish
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.14.1
    • None
    • Compiler (General)
    • None
    • Wireshark dissector.


      A little bit of context first: I'm currently working on Thrift dissection in Wireshark (#16244 for the curious ones) and after this update on the generic binary protocol parsing part, I'd like to work on the dissection of Thrift packets according to provided .thrift files.

      In order to do this, several options are possible:

      1. Update the thrift compiler to be able to generate a lua or a C sub-dissector leveraging the sub-dissection capabilities of the Thrift dissector (not usable for the moment as sub-struct, list, set and map are not available).
      2. Update the thrift compiler to be able to generate a lua or a C sub-dissector doing all the dissection.
      3. Add a parser for .thrift files in Wireshark and patch things together to be able to see day_of_week = sunday instead of field type = i32, field id = 3, i32 value = 0 without having to generate a sub-dissector.

      Given the fact that it was the approach retained for Protobuf, I believe the third option to be the best track regarding the amount of work and the usability.

      Now, regarding the implementation of this parser, I see 2 options:

      1. Reuse thriftl.ll & thrifty.yy to ensure perfect compatibility.
      2. Rewrite them from scratch using Thrift interface description language documentation with some risks of incompatibility.

      However, Wireshark is GPL-2.0 or later and Thrift (including the lex & yacc files) is of course Apache-2.0 with the incompatibility explained at https://www.apache.org/licenses/GPL-compatibility.html.

      So, would it be possible to make the license for those 2 files compatible with the GPL-2.0-or-later or do I need to work from the specs now?

      NB: I did notice the -or-later in Wireshark's license and the fact that GPL-3.0 software can include Apache-2.0 code but I'm not a lawyer so I prefer to be on the safe side before I even take a look after the header of these files.




            Unassigned Unassigned
            Triton Triton Circonflexe
            0 Vote for this issue
            0 Start watching this issue