Wireshark-dev: Re: [Wireshark-dev] Current Lua test failures on the buildbot

From: Hadriel Kaplan <hadrielk@xxxxxxxxx>
Date: Sun, 7 Aug 2016 12:23:56 -0400
> ---------- Forwarded message ----------
> From: João Valverde <joao.valverde@xxxxxxxxxxxxxxxxxx>
> Date: Sun, Aug 7, 2016 at 2:39 PM
> Subject: Re: [Wireshark-dev] Current Lua test failures on the buildbot
> To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
> 
> Seriously, what's the point of this craziness when this works fine:
> 
> $ luarocks install lrexlib-pcre-2.8.0-1.src.rock
> $ cat wslua-pcre.lua
> rex = require("rex_pcre")
> print(rex.version())
> $ tshark -r test/captures/empty.pcap -X lua_script:wslua-pcre.lua
> 8.39 2016-06-14
> 
> Digging around a bit I see that Hadriel didn't want to complicate the build process with a libpcre dependency (!) so he ended up writing a whole new lrexlib binding (!!!).
> 
> I propose we write our own regular expression engine instead so we don't have to worry about pesky complications such as having a build dependency on GRegex. :-D


At the time, wireshark didn't directly include PCRE as a third party library, and for some reason I assumed doing so would be a big deal. It seemed like folks didn't want to add more libraries to the dependencies list. So... I figured using the one exposed in Glib, which was already being used for display filters, would be less hassle overall - more hassle for me, less for others.

The lrexlib portion was just direct source so didn't add build dependencies, and I did offer the Glib-regex binding code back upstream to the lrexlib folks. They didn't want it since they were only really handling bug fixes by then, not growing it. (and a Glib-regex binding would be odd anyway, since most people wouldn't care about just using PCRE directly)

But if folks prefer to add a dependency for PCRE and lrexlib to Wireshark, then sure I could get rid of the Glib one and expose the lrexlib one into Wireshark's lua engine instead.

-hadriel