Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 810335 - mail-filter/rspamd-3.0 fails to start with LUA_SINGLE_TARGET=lua5-3 due to missing LuaBitOp
Summary: mail-filter/rspamd-3.0 fails to start with LUA_SINGLE_TARGET=lua5-3 due to mi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Christian Roessner
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-08-25 14:14 UTC by Thomas Arnett
Modified: 2021-08-28 18:20 UTC (History)
5 users (show)

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


Attachments
ebuild patch (rspamd-use-bundled-luabitop.patch,1.22 KB, application/mbox)
2021-08-25 14:14 UTC, Thomas Arnett
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Arnett 2021-08-25 14:14:38 UTC
Created attachment 735953 [details]
ebuild patch

By default, rspamd loads /usr/share/rspamd/rules/bitcoin.lua, which unconditionally requires the `bit` module. Upstream provides this via contrib/lua-bit, which is patched to support Lua 5.3. The ebuild unconditionally removes this bundled module and conditionally adds a dependency on dev-lua/LuaBitOp for older targets. This means neither the bundled module nor the system module is present for the lua5-3 target, so rspamd fails to start.

dev-lua/LuaBitOp isn't patched for Lua 5.3 and fails to build if lua5-3 is added to LUA_COMPAT.

The attached ebuild patch allows rspamd to build and run with lua5-3. Alternatively, the LuaBitOp package could provide rspamd's patched version.
Comment 1 Conrad Kostecki gentoo-dev 2021-08-25 14:36:23 UTC
Could be dev-lua/lua-bit32 used instead?
Comment 2 Thomas Arnett 2021-08-25 15:12:58 UTC
Sam James: Installing dev-lua/LuaBitOp doesn't help, so the new title seems misleading to me.
Comment 3 Petr Vaněk gentoo-dev 2021-08-25 15:14:38 UTC
dev-lua/lua-bit32 seems to be compatibility layer for lua-5.{1,2}. I personally like the idea to patch LuaBitOp with changes from rspamd, the patch is simple enough.
Comment 4 Thomas Arnett 2021-08-25 15:50:41 UTC
(In reply to Conrad Kostecki from comment #1)
> Could be dev-lua/lua-bit32 used instead?

Maybe, if it was patched to provide `bit` as well as `bit32`, or if rspamd was further patched to require `bit32`. But rspamd bundles many other libraries, so is it really worth patching so many files to unbundle one tiny library?
Comment 5 Larry the Git Cow gentoo-dev 2021-08-26 19:44:49 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=885251cbb75698753fce75131bba913f54dffb2a

commit 885251cbb75698753fce75131bba913f54dffb2a
Author:     Petr Vaněk <arkamar@atlas.cz>
AuthorDate: 2021-08-26 12:19:21 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2021-08-26 19:44:34 +0000

    dev-lua/LuaBitOp: support lua5-3+
    
    This revision bump applies patch generated from rspamd bundled library
    in order to support lua-5.3 and lua-5.4.
    
    Closes: https://github.com/gentoo/gentoo/pull/22109
    Bug: https://bugs.gentoo.org/810335
    Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 dev-lua/LuaBitOp/LuaBitOp-1.0.2-r103.ebuild        | 97 ++++++++++++++++++++++
 .../files/LuaBitOp-1.0.2-support-lua5-3+.patch     | 78 +++++++++++++++++
 2 files changed, 175 insertions(+)
Comment 6 Larry the Git Cow gentoo-dev 2021-08-28 18:20:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81b9814009e0fa412a018d8687a9784dc6f39671

commit 81b9814009e0fa412a018d8687a9784dc6f39671
Author:     Petr Vaněk <arkamar@atlas.cz>
AuthorDate: 2021-08-28 10:48:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-28 18:20:40 +0000

    mail-filter/rspamd: correct LuaBitOp dependency rule
    
    Rspamd requires LuaBitOp dependency for all lua targets.
    
    Closes: https://bugs.gentoo.org/810335
    Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
    Signed-off-by: Sam James <sam@gentoo.org>

 mail-filter/rspamd/{rspamd-3.0-r1.ebuild => rspamd-3.0-r2.ebuild} | 2 +-
 mail-filter/rspamd/rspamd-9999.ebuild                             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)