Hi I build haproxy from scratch at work and I noticed that LUA wasn't enabled in the Gentoo ebuilds The following was enough to get it working for me with LUA 5.4: diff --git a/net-proxy/haproxy/haproxy-2.4.17.ebuild b/net-proxy/haproxy/haproxy-2.4.17.ebuild index 2b772750ef6..d793d01f5ad 100644 --- a/net-proxy/haproxy/haproxy-2.4.17.ebuild +++ b/net-proxy/haproxy/haproxy-2.4.17.ebuild @@ -3,7 +3,7 @@ EAPI="7" -LUA_COMPAT=( lua5-3 ) +LUA_COMPAT=( lua5-3 lua5-4 ) [[ ${PV} == *9999 ]] && SCM="git-r3" inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM} @@ -86,6 +86,7 @@ src_compile() { args+=( $(haproxy_use slz SLZ) ) args+=( $(haproxy_use zlib ZLIB) ) args+=( $(haproxy_use lua LUA) ) + use lua && args+=( LUA_LIB_NAME=${ELUA} LUA_INC=/usr/include/${ELUA} ) args+=( $(haproxy_use 51degrees 51DEGREES) ) args+=( $(haproxy_use wurfl WURFL) ) args+=( $(haproxy_use systemd SYSTEMD) ) The LUA_CFLAGS and LUA_INCLUDE_DIR variables didn't seem to be set, so I stuck with ELUA for both, the INC directory might neeed ${PREFIX} or the likes Reproducible: Always
It didn't work / detect it for you because it's kind of hardcoded for Lua 5.3 only. It will need more work, to make it more dynamically but it's also not entirely clear if it works fine with anything other than 5.3.
I'm telling you how I got it working Support for Lua 5.4 was added a while ago
What I wanted to say is, I'd like it to be fixed upstream if possible, so that anybody can benefit from it and not just Gentoo. There was a request about a year ago already, which I just tried to revive: https://www.mail-archive.com/haproxy@formilux.org/msg42474.html So we'll likely get both soonish, 5.4 for Gentoo as well as HAProxy upstream.
Sure, but it's a pretty simple fix, and we have to do stuff like this in lots of ebuilds. I don't know if it's really a big deal.
Ah I understand, you want it to auto-detect lua 5.4 Is there a reason we don't just use the patch?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e135fe1d9b508e778de85d44f40382f2221f7ea commit 1e135fe1d9b508e778de85d44f40382f2221f7ea Author: Christian Ruppert <idl0r@gentoo.org> AuthorDate: 2022-06-28 09:25:58 +0000 Commit: Christian Ruppert <idl0r@gentoo.org> CommitDate: 2022-06-28 09:27:12 +0000 net-proxy/haproxy: Add LUA 5.4 support, thanks to Mike Lothian Bug: https://bugs.gentoo.org/852809 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Christian Ruppert <idl0r@gentoo.org> net-proxy/haproxy/files/haproxy-lua54.patch | 63 +++++++++++++++++++++++++++++ net-proxy/haproxy/haproxy-2.4.17.ebuild | 6 ++- net-proxy/haproxy/haproxy-2.4.9999.ebuild | 6 ++- net-proxy/haproxy/haproxy-2.6.1.ebuild | 6 ++- net-proxy/haproxy/haproxy-2.6.9999.ebuild | 6 ++- net-proxy/haproxy/haproxy-9999.ebuild | 6 ++- 6 files changed, 88 insertions(+), 5 deletions(-)
Should be fixed now. Thanks! :)