Actions
Bug #7169
openlua/output: vendored lua search for modules in /usr/local/ rather than /usr/
Affected Versions:
Effort:
Difficulty:
Label:
Description
I am trying Suricata 8.0.0-dev on current master and I am noticing that the new builtin Lua engine does not use the same search path as Suricata 7.0.6 for Lua modules.
If I install `lua5.4-sqlite` in Alpine Linux, then try to require lsqlite3 in a Lua output script, I get the following error:
Error: output-lua: couldn't run script 'setup' function: suricata-output-testscript.lua:17: module 'lsqlite3' not found: no field package.preload['lsqlite3'] no file '/usr/local/share/lua/5.4/lsqlite3.lua' no file '/usr/local/share/lua/5.4/lsqlite3/init.lua' no file '/usr/local/lib/lua/5.4/lsqlite3.lua' no file '/usr/local/lib/lua/5.4/lsqlite3/init.lua' no file './lsqlite3.lua' no file './lsqlite3/init.lua' no file '/usr/local/lib/lua/5.4/lsqlite3.so' no file '/usr/local/lib/lua/5.4/loadall.so' no file './lsqlite3.so' [LuaScriptSetup:output-lua.c:582]
This was working fine on Suricata 7.0.6: system-wide Lua modules were available to Suricata (e.e. `apk add suricata lua5.1-sqlite`).
Alpine Linux packages Lua modules in `/usr/lib/lua/5.x/lsqlite3.so`.
- https://redmine.openinfosecfoundation.org/issues/6961
- https://github.com/OISF/suricata/commit/bc011f220558947c061976af061939cb344cb864
Is this behavior intended? Shouldn't https://github.com/jasonish/suricata-lua-sys search for modules in `/usr/lib/lua/5.4/` rather than `/usr/local/lib/lua/5.4/`?
Actions