Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 726728 - www-servers/nginx-1.19.0[+nginx_modules_http_lua] requires openresty, which is not currently available in portage
Summary: www-servers/nginx-1.19.0[+nginx_modules_http_lua] requires openresty, which i...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Deutschmann (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-02 06:57 UTC by Livid
Modified: 2021-11-24 15:24 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Livid 2020-06-02 06:57:18 UTC
When nginx-1.19.0 is built with +luajit, it fails to start with the following output:

nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
nginx: [alert] failed to load the 'resty.core' module (https://github.com/openresty/lua-resty-core); ensure you are using an OpenResty release from https://openresty.org/en/download.html (reason: module 'resty.core' not found:
	no field package.preload['resty.core']
	no file './resty/core.lua'
	no file '/usr/share/luajit-2.0.5/resty/core.lua'
	no file '/usr/local/share/lua/5.1/resty/core.lua'
	no file '/usr/local/share/lua/5.1/resty/core/init.lua'
	no file '/usr/share/lua/5.1/resty/core.lua'
	no file '/usr/share/lua/5.1/resty/core/init.lua'
	no file './resty/core.so'
	no file '/usr/local/lib/lua/5.1/resty/core.so'
	no file '/usr/lib64/lua/5.1/resty/core.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
	no file './resty.so'
	no file '/usr/local/lib/lua/5.1/resty.so'
	no file '/usr/lib64/lua/5.1/resty.so'
	no file '/usr/local/lib/lua/5.1/loadall.so') in /etc/nginx/nginx.conf:38

Notice my config currently does not reference lua directly.

Reproducible: Always

Steps to Reproduce:
1. Install nginx-1.19.0[+nginx_modules_http_lua,+luajit]
2. Run nginx
3. Observe failure
Actual Results:  
Fails to start

Expected Results:  
Works

Some parts of resty are apparently available in the lua overlay. But all of those are "live" ebuilds, which doesn't seem like a sane idea on a production system.
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2020-06-02 11:21:04 UTC
I am sorry, I don't know what to do here:

Basic functionality should work. Maybe we need to downgrade that module to previous version if this is not the case anymore. But at some point you will have to switch package. I know that there is currently no replacement but I am not interested in this and I'll not start to maintain a new package I don't use.
Comment 2 Livid 2020-06-02 12:07:55 UTC
> Basic functionality should work.

Nginx fails to even start when compiled with the lua module, so no, basic functionality (i.e. being able to even start) does not work. At exactly the point nginx tries to load the lua module, it crashes with the error message cited in the opening post.

Resty-core is required since ngx_lua v0.10.16. The ebuild uses 
HTTP_LUA_MODULE_PV="0.10.16rc5". Which means that the ebuild as it is basically broken. See https://github.com/openresty/lua-nginx-module/commit/60736e686ac5ca5af9a5bf118cb9bd4a9126cefc

Downgrading to v0.10.15 would help somewhat, but that's not a long-term solution obviously.

> at some point you will have to switch package.

To what exactly? As you say, there is no alternative. Save for jumping ship altogether to some Debian derivative perhaps, but that's a bit of a last resort, don't you think?


As I see it, you have two options:

1. Ditch nginx_modules_http_lua altogether, and let someone interested in this worry about it.
2. Provide openresty's juajit implementation and associated modules via portage.

As far as I can tell, you're not keen on the second option. In that case, I have to urge you to take the first one -- if nginx_modules_http_lua can no longer be supported, then don't support it.

My main issue here is that a perfectly good setup is broken silently by the update to www-servers/nginx-1.19.0. This is not great UX, to put it lightly.

By "silently" I mean that nginx_modules_http_lua doesn't work, basically. But the ebuild pretends that it does.

Perhaps I'm misunderstanding something, in that case please correct me.

Cheers.
Comment 3 Larry the Git Cow gentoo-dev 2020-06-02 20:53:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4946862591fca24d3bcde8817205809b2a0e9658

commit 4946862591fca24d3bcde8817205809b2a0e9658
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-06-02 20:52:46 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-06-02 20:52:46 +0000

    www-servers/nginx: downgrade HTTP LUA module
    
    Bug: https://bugs.gentoo.org/726728
    Package-Manager: Portage-2.3.100, Repoman-2.3.22
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-servers/nginx/Manifest                                        | 1 -
 www-servers/nginx/{nginx-1.19.0.ebuild => nginx-1.19.0-r1.ebuild} | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2020-06-02 20:57:38 UTC
All I can do is downgrading HTTP lua module for you.
I will not take care of LUA in Gentoo. So chances are big that I'll drop entire lua module once v0.10.15 will stop working at all because I don't expect that someone will take care of it :-/ But who knows...

And yes, I know there are no alternatives in official Gentoo repository. Feel free to become proxy maintainer and maintain openresty in Gentoo.

Sorry that I don't have a better answer for you.
Comment 5 Larry the Git Cow gentoo-dev 2020-08-13 23:46:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=289ede407ce708fb5bc55bb1ede1eee40923407d

commit 289ede407ce708fb5bc55bb1ede1eee40923407d
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-08-13 23:46:11 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-08-13 23:46:26 +0000

    www-servers/nginx: downgrade HTTP LUA module, again
    
    Bug: https://bugs.gentoo.org/726728
    Package-Manager: Portage-3.0.2, Repoman-2.3.23
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-servers/nginx/Manifest                                        | 1 -
 www-servers/nginx/{nginx-1.19.2.ebuild => nginx-1.19.2-r1.ebuild} | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
Comment 6 Thomas Capricelli 2021-05-07 14:58:14 UTC
I dont understand. i have www-servers/nginx-1.18.0-r2 installed, and i have the same error.
I checked, and the the nginx-1.18.0-r2.ebuild actually references 
HTTP_LUA_MODULE_PV="0.10.15"

So according to what's said here, it should work... but no !?