commit: 72e721a16eac9a1f410330a34744e247bb43b939
Author: Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 24 09:25:05 2025 +0000
Commit: Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Mon Nov 24 09:32:43 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72e721a1
mail-filter/rspamd: update unbundle lua patch for live ebuild
Upstream removed bundled tableshape lua library, see upstream commit
d09e61920618 ("[Cleanup] Drop tableshape contrib library"), which broke
our unbundle-lua patch.
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>
.../rspamd/files/rspamd-9999-unbundle-lua.patch | 70 ++++++++++++++++++++++
mail-filter/rspamd/rspamd-9999.ebuild | 2 +-
2 files changed, 71 insertions(+), 1 deletion(-)
diff --git a/mail-filter/rspamd/files/rspamd-9999-unbundle-lua.patch
b/mail-filter/rspamd/files/rspamd-9999-unbundle-lua.patch
new file mode 100644
index 000000000000..74e14f1fd6aa
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-9999-unbundle-lua.patch
@@ -0,0 +1,70 @@
+diff --git a/cmake/AddDependencySubdirectories.cmake
b/cmake/AddDependencySubdirectories.cmake
+index 866204ff5..61781b511 100644
+--- a/cmake/AddDependencySubdirectories.cmake
++++ b/cmake/AddDependencySubdirectories.cmake
+@@ -69,11 +69,6 @@ function(AddDependencySubdirectories)
+ find_package(doctest)
+ endif ()
+
+- # Lua-specific dependencies
+- if (NOT WITH_LUAJIT)
+- add_subdirectory(contrib/lua-bit)
+- endif ()
+-
+ # Lua REPL support
+ add_subdirectory(contrib/replxx)
+ list(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-replxx)
+diff --git a/cmake/InstallRspamdFiles.cmake b/cmake/InstallRspamdFiles.cmake
+index 75a6fe447..91b29f031 100644
+--- a/cmake/InstallRspamdFiles.cmake
++++ b/cmake/InstallRspamdFiles.cmake
+@@ -67,7 +67,6 @@ function(InstallRspamdFiles)
+
+ # Install third-party Lua libraries
+ install(FILES "contrib/lua-fun/fun.lua" DESTINATION ${LUALIBDIR})
+- install(FILES "contrib/lua-argparse/argparse.lua" DESTINATION
${LUALIBDIR})
+ install(FILES "contrib/lua-lupa/lupa.lua" DESTINATION ${LUALIBDIR})
+ install(FILES "contrib/lua-lpeg/lpegre.lua" DESTINATION ${LUALIBDIR})
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 6cc49e4e4..5cd6d23e9 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -228,11 +228,6 @@ if (ENABLE_CLANG_PLUGIN)
+ add_dependencies(rspamd-server rspamd-clang)
+ endif ()
+
+-# Handle Lua JIT/Lua dependency
+-if (NOT WITH_LUAJIT)
+- target_link_libraries(rspamd-server PRIVATE rspamd-bit)
+-endif ()
+-
+ # Link additional optional dependencies
+ if (ENABLE_SNOWBALL)
+ target_link_libraries(rspamd-server PRIVATE stemmer)
+diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
+index 2ec4d6c72..8137415ca 100644
+--- a/src/lua/lua_common.c
++++ b/src/lua/lua_common.c
+@@ -916,10 +916,6 @@ rspamd_lua_wipe_realloc(void *ud,
+ return NULL;
+ }
+
+-#ifndef WITH_LUAJIT
+-extern int luaopen_bit(lua_State *L);
+-#endif
+-
+ static unsigned int lua_initialized = 0;
+
+ lua_State *
+@@ -989,7 +985,6 @@ rspamd_lua_init(bool wipe_mem)
+ luaopen_libarchive(L);
+ luaopen_shingle(L);
+ #ifndef WITH_LUAJIT
+- rspamd_lua_add_preload(L, "bit", luaopen_bit);
+ lua_settop(L, 0);
+ #endif
+
+--
+2.51.0
+
diff --git a/mail-filter/rspamd/rspamd-9999.ebuild
b/mail-filter/rspamd/rspamd-9999.ebuild
index 474b64a4219b..daab6e5f59a2 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.ebuild
@@ -69,7 +69,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${PN}-3.12-cmake-lua-version.patch"
- "${FILESDIR}/${PN}-3.12-unbundle-lua.patch"
+ "${FILESDIR}/${PN}-9999-unbundle-lua.patch"
"${FILESDIR}/${PN}-3.12-unbundle-snowball.patch"
)