[pkg-lua-devel] lua-resty-{core,lrucache} packages

Jan Mojzis jan.mojzis at gmail.com
Fri Jul 29 10:53:08 BST 2022



> On 28. 7. 2022, at 19:33, Jérémy Lal <kapouer at melix.org> wrote:
> 
> Please cc the list - someone might find part of this discussion interesting someday.
> 
> Le jeu. 28 juil. 2022 à 19:00, Jan Mojzis <jan.mojzis at gmail.com <mailto:jan.mojzis at gmail.com>> a écrit :
> 
> 
>> On 28. 7. 2022, at 17:58, Jérémy Lal <kapouer at melix.org <mailto:kapouer at melix.org>> wrote:
>> 
>> 
>> 
>> Le jeu. 28 juil. 2022 à 17:23, Jérémy Lal <kapouer at melix.org <mailto:kapouer at melix.org>> a écrit :
>> 
>> 
>> Le jeu. 28 juil. 2022 à 15:49, Jérémy Lal <kapouer at melix.org <mailto:kapouer at melix.org>> a écrit :
>> 
>> 
>> Le jeu. 28 juil. 2022 à 15:40, Jan Mojzis <jan.mojzis at gmail.com <mailto:jan.mojzis at gmail.com>> a écrit :
>>> 
>> Hello,
>> https://salsa.debian.org/lua-team/lua-resty-lrucache <https://salsa.debian.org/lua-team/lua-resty-lrucache>
>> has an autopkg test that run the original tests.
>> And works.
>> 
>> Cool.
>> Mind that these embedded perl files need to appear in debian/copyright:
>> debian/tests/perl/Test-Nginx-0.30/*
>> 
>> But lua-resty-core tests has still problems:
>> https://salsa.debian.org/lua-team/lua-resty-core/-/jobs/3045933 <https://salsa.debian.org/lua-team/lua-resty-core/-/jobs/3045933>
>> It doesn't even work against openresty nginx.
>> 
>> For one, lua-resty-core needs libluajit2-5.1 package, not libluajit-5.1.
>> 
>> There are several other small issues:
>> - poll -> epoll
>> - mockeagain.so is missing... it comes from https://github.com/openresty/mockeagain <https://github.com/openresty/mockeagain>
>> - tests should depend on libluajit2-5.1-2, libnginx-mod-http-echo
>> - hence TEST_NGINX_LOAD_MODULES must contain also "/usr/lib/nginx/modules/ngx_http_echo_module.so"
>> - put a debian/tests/openssl.cnf file with this in it:
>> 
>> .include /etc/ssl/openssl.cnf
>> [ssl_sect]
>> system_default = system_legacy_sect
>> [system_legacy_sect]
>> CipherString = DEFAULT:@SECLEVEL=1
>> 
>> and then in debian/tests/test
>> export OPENSSL_CONF=./debian/tests/openssl.cnf
>> 
>> - last but not least, now you get an error
>> init_by_lua error: ./lib/resty/core/base.lua:24: ngx_http_lua_module 0.10.21 required
>> Because current version of http-lua in nginx is 0.10.20 -> either downgrade lua-resty-core to a compatible version,
>> or ask debian nginx maintainers if it's ok to upgrade http-lua...
>> 
>> Also:
>> 
>> - in debian/tests/test,
>> export TEST_NGINX_BINARY=/usr/sbin/nginx
>> 
>> - lua-resty-lrucache installs
>> /usr/share/lua/5.1/lib/resty/lrucache.lua
>> but that should be /usr/share/lua/5.1/resty/lrucache.lua
>> 
> 
> Hi,
> lua-resty-lrucache:
> - d/t/perl/.. copyright fixed
> - d/t/test  TEST_NGINX_BINARY added
> - install path fixed to /usr/share/lua/5.1/ instead of /usr/share/lua/5.1/lib
> - d/t/nginxtest new test addded
> 
> lua-resty-core:
> - install path fixed to /usr/share/lua/5.1/ instead of /usr/share/lua/5.1/lib
> 
> ... and I also granted you 'maintainer' rights to both projects
> 
> footnote:
> I am an NGINX uploader and my primary goal is to upgrade http-lua module to latest version,
> but latest version 0.10.21 depends on lua-resty-core, and that's the reason why I need to upload lua-resty-{core,lrucache}
> 
> We probably won't fix the lua-resty-core tests now, but I suggest uploading this package without a autopkgtest and I'll finish them next,
> as soon as I succeed in upgrading the nginx lua module,
> 
> Agreed,
> I'll try to make tests pass locally (with a local update of http-lua), and then review packages again and eventually upload them.
> I pretend there is a need for http-lua and resty to depend on libluajit2, do you have any thoughts on this ?
> 
> Jérémy
> 


Hi,
The new http-lua module will depend on libluajit2.
For tests I have latest (0.10.21) standalone http-lua module here https://salsa.debian.org/janmojzis/ngx-lua <https://salsa.debian.org/janmojzis/ngx-lua>
and inside 2 autopkg tests one for lua-resty-core, second for lua-resty-lrucache:
https://salsa.debian.org/janmojzis/ngx-lua/-/blob/main/debian/tests/lua-resty-core <https://salsa.debian.org/janmojzis/ngx-lua/-/blob/main/debian/tests/lua-resty-core>
https://salsa.debian.org/janmojzis/ngx-lua/-/blob/main/debian/tests/lua-resty-lrucache <https://salsa.debian.org/janmojzis/ngx-lua/-/blob/main/debian/tests/lua-resty-lrucache>

Hope this help with testing.

Jan






More information about the pkg-lua-devel mailing list