summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@atlas.cz>2020-11-12 14:12:58 +0100
committerJoonas Niilola <juippis@gentoo.org>2020-11-20 12:01:15 +0200
commit4c876bf9fc2573be36d6ebd504df3cc3535dc7d2 (patch)
tree8b798911fd0425f1de9e2d96bf2bf452f63217e8 /mail-filter/rspamd
parentdev-python/mongoengine: Bump to 0.21.0 (diff)
downloadgentoo-4c876bf9fc2573be36d6ebd504df3cc3535dc7d2.tar.gz
gentoo-4c876bf9fc2573be36d6ebd504df3cc3535dc7d2.tar.bz2
gentoo-4c876bf9fc2573be36d6ebd504df3cc3535dc7d2.zip
mail-filter/rspamd: use bundled lua-lpeg, bug #753830
Closes: https://bugs.gentoo.org/753830 Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'mail-filter/rspamd')
-rw-r--r--mail-filter/rspamd/files/rspamd-2.5-unbundle-lua.patch60
-rw-r--r--mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch62
-rw-r--r--mail-filter/rspamd/rspamd-2.5-r1.ebuild (renamed from mail-filter/rspamd/rspamd-2.5.ebuild)4
-rw-r--r--mail-filter/rspamd/rspamd-2.6-r2.ebuild (renamed from mail-filter/rspamd/rspamd-2.6-r1.ebuild)4
4 files changed, 16 insertions, 114 deletions
diff --git a/mail-filter/rspamd/files/rspamd-2.5-unbundle-lua.patch b/mail-filter/rspamd/files/rspamd-2.5-unbundle-lua.patch
index b8deb2d6903b..4a20c8f19d3f 100644
--- a/mail-filter/rspamd/files/rspamd-2.5-unbundle-lua.patch
+++ b/mail-filter/rspamd/files/rspamd-2.5-unbundle-lua.patch
@@ -1,22 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index bbc141170..8e3665c18 100644
+index bbc141170..7fbb1b485 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -112,7 +112,6 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/"
- "${CMAKE_SOURCE_DIR}/contrib/librdns"
- "${CMAKE_SOURCE_DIR}/contrib/aho-corasick"
- "${CMAKE_SOURCE_DIR}/contrib/lc-btrie"
-- "${CMAKE_SOURCE_DIR}/contrib/lua-lpeg"
- "${CMAKE_BINARY_DIR}/src" #Stored in the binary dir
- "${CMAKE_BINARY_DIR}/src/libcryptobox")
-
-@@ -592,16 +591,11 @@ ENDIF()
- ADD_SUBDIRECTORY(contrib/libucl)
- ADD_SUBDIRECTORY(contrib/librdns)
- ADD_SUBDIRECTORY(contrib/aho-corasick)
--ADD_SUBDIRECTORY(contrib/lua-lpeg)
- ADD_SUBDIRECTORY(contrib/t1ha)
- ADD_SUBDIRECTORY(contrib/libev)
+@@ -598,10 +598,6 @@ ADD_SUBDIRECTORY(contrib/libev)
ADD_SUBDIRECTORY(contrib/kann)
ADD_SUBDIRECTORY(contrib/fastutf8)
@@ -27,27 +13,11 @@ index bbc141170..8e3665c18 100644
IF (ENABLE_LUA_REPL MATCHES "ON")
ADD_SUBDIRECTORY(contrib/replxx)
SET(WITH_LUA_REPL 1)
-@@ -700,7 +694,6 @@ INSTALL(FILES "contrib/lua-fun/fun.lua" DESTINATION ${LUALIBDIR})
- INSTALL(FILES "contrib/lua-argparse/argparse.lua" DESTINATION ${LUALIBDIR})
- INSTALL(FILES "contrib/lua-tableshape/tableshape.lua" DESTINATION ${LUALIBDIR})
- INSTALL(FILES "contrib/lua-lupa/lupa.lua" DESTINATION ${LUALIBDIR})
--INSTALL(FILES "contrib/lua-lpeg/lpegre.lua" DESTINATION ${LUALIBDIR})
-
- # systemd unit
- IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND WANT_SYSTEMD_UNITS MATCHES "ON")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 9a34d2ac4..54b2e4083 100644
+index 9a34d2ac4..59bab5c15 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
-@@ -180,7 +180,6 @@ ENDIF()
- TARGET_LINK_LIBRARIES(rspamd-server rspamd-http-parser)
- TARGET_LINK_LIBRARIES(rspamd-server rspamd-fpconv)
- TARGET_LINK_LIBRARIES(rspamd-server rspamd-cdb)
--TARGET_LINK_LIBRARIES(rspamd-server rspamd-lpeg)
- TARGET_LINK_LIBRARIES(rspamd-server lcbtrie)
- TARGET_LINK_LIBRARIES(rspamd-server rspamd-zstd)
- TARGET_LINK_LIBRARIES(rspamd-server rspamd-fastutf8)
-@@ -189,10 +188,6 @@ IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
+@@ -189,10 +189,6 @@ IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
ADD_DEPENDENCIES(rspamd-server rspamd-clang)
ENDIF()
@@ -59,18 +29,10 @@ index 9a34d2ac4..54b2e4083 100644
TARGET_LINK_LIBRARIES(rspamd-server stemmer)
ENDIF()
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
-index ce5fff6c5..509ceeb44 100644
+index ce5fff6c5..bea6dc389 100644
--- a/src/lua/lua_common.c
+++ b/src/lua/lua_common.c
-@@ -14,7 +14,6 @@
- * limitations under the License.
- */
- #include "lua_common.h"
--#include "lptree.h"
- #include "utlist.h"
- #include "unix-std.h"
- #include "ottery.h"
-@@ -903,10 +902,6 @@ rspamd_lua_wipe_realloc (void *ud,
+@@ -903,10 +903,6 @@ rspamd_lua_wipe_realloc (void *ud,
return NULL;
}
@@ -81,7 +43,7 @@ index ce5fff6c5..509ceeb44 100644
lua_State *
rspamd_lua_init (bool wipe_mem)
{
-@@ -961,7 +956,6 @@ rspamd_lua_init (bool wipe_mem)
+@@ -961,7 +957,6 @@ rspamd_lua_init (bool wipe_mem)
luaopen_kann (L);
luaopen_spf (L);
#ifndef WITH_LUAJIT
@@ -89,11 +51,3 @@ index ce5fff6c5..509ceeb44 100644
lua_settop (L, 0);
#endif
-@@ -971,7 +965,6 @@ rspamd_lua_init (bool wipe_mem)
- rspamd_lua_new_class (L, "rspamd{session}", NULL);
- lua_pop (L, 1);
-
-- rspamd_lua_add_preload (L, "lpeg", luaopen_lpeg);
- luaopen_ucl (L);
- rspamd_lua_add_preload (L, "ucl", luaopen_ucl);
-
diff --git a/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch b/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch
index c6f6324befc7..9278fa8608d7 100644
--- a/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch
+++ b/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch
@@ -1,24 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b794b9dbd..90caf4048 100644
+index b794b9dbd..1ba5c085e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -111,7 +111,6 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/"
- "${CMAKE_SOURCE_DIR}/contrib/librdns"
- "${CMAKE_SOURCE_DIR}/contrib/aho-corasick"
- "${CMAKE_SOURCE_DIR}/contrib/lc-btrie"
-- "${CMAKE_SOURCE_DIR}/contrib/lua-lpeg"
- "${CMAKE_BINARY_DIR}/src" #Stored in the binary dir
- "${CMAKE_BINARY_DIR}/src/libcryptobox")
-
-@@ -624,7 +623,6 @@ ENDIF()
- ADD_SUBDIRECTORY(contrib/libucl)
- ADD_SUBDIRECTORY(contrib/librdns)
- ADD_SUBDIRECTORY(contrib/aho-corasick)
--ADD_SUBDIRECTORY(contrib/lua-lpeg)
- ADD_SUBDIRECTORY(contrib/t1ha)
- ADD_SUBDIRECTORY(contrib/libev)
- ADD_SUBDIRECTORY(contrib/kann)
-@@ -632,10 +630,6 @@ ADD_SUBDIRECTORY(contrib/fastutf8)
+@@ -632,10 +632,6 @@ ADD_SUBDIRECTORY(contrib/fastutf8)
ADD_SUBDIRECTORY(contrib/google-ced)
@@ -29,27 +13,11 @@ index b794b9dbd..90caf4048 100644
IF (ENABLE_LUA_REPL MATCHES "ON")
ADD_SUBDIRECTORY(contrib/replxx)
SET(WITH_LUA_REPL 1)
-@@ -735,7 +729,6 @@ INSTALL(FILES "contrib/lua-fun/fun.lua" DESTINATION ${LUALIBDIR})
- INSTALL(FILES "contrib/lua-argparse/argparse.lua" DESTINATION ${LUALIBDIR})
- INSTALL(FILES "contrib/lua-tableshape/tableshape.lua" DESTINATION ${LUALIBDIR})
- INSTALL(FILES "contrib/lua-lupa/lupa.lua" DESTINATION ${LUALIBDIR})
--INSTALL(FILES "contrib/lua-lpeg/lpegre.lua" DESTINATION ${LUALIBDIR})
-
- # systemd unit
- IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND WANT_SYSTEMD_UNITS MATCHES "ON")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 9a34d2ac4..54b2e4083 100644
+index 9a34d2ac4..59bab5c15 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
-@@ -180,7 +180,6 @@ ENDIF()
- TARGET_LINK_LIBRARIES(rspamd-server rspamd-http-parser)
- TARGET_LINK_LIBRARIES(rspamd-server rspamd-fpconv)
- TARGET_LINK_LIBRARIES(rspamd-server rspamd-cdb)
--TARGET_LINK_LIBRARIES(rspamd-server rspamd-lpeg)
- TARGET_LINK_LIBRARIES(rspamd-server lcbtrie)
- TARGET_LINK_LIBRARIES(rspamd-server rspamd-zstd)
- TARGET_LINK_LIBRARIES(rspamd-server rspamd-fastutf8)
-@@ -189,10 +188,6 @@ IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
+@@ -189,10 +189,6 @@ IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
ADD_DEPENDENCIES(rspamd-server rspamd-clang)
ENDIF()
@@ -61,18 +29,10 @@ index 9a34d2ac4..54b2e4083 100644
TARGET_LINK_LIBRARIES(rspamd-server stemmer)
ENDIF()
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
-index b7fcc2034..b8120af97 100644
+index b7fcc2034..1d86464da 100644
--- a/src/lua/lua_common.c
+++ b/src/lua/lua_common.c
-@@ -14,7 +14,6 @@
- * limitations under the License.
- */
- #include "lua_common.h"
--#include "lptree.h"
- #include "utlist.h"
- #include "unix-std.h"
- #include "ottery.h"
-@@ -922,10 +921,6 @@ rspamd_lua_wipe_realloc (void *ud,
+@@ -922,10 +922,6 @@ rspamd_lua_wipe_realloc (void *ud,
return NULL;
}
@@ -83,7 +43,7 @@ index b7fcc2034..b8120af97 100644
lua_State *
rspamd_lua_init (bool wipe_mem)
{
-@@ -981,7 +976,6 @@ rspamd_lua_init (bool wipe_mem)
+@@ -981,7 +977,6 @@ rspamd_lua_init (bool wipe_mem)
luaopen_spf (L);
luaopen_tensor (L);
#ifndef WITH_LUAJIT
@@ -91,11 +51,3 @@ index b7fcc2034..b8120af97 100644
lua_settop (L, 0);
#endif
-@@ -991,7 +985,6 @@ rspamd_lua_init (bool wipe_mem)
- rspamd_lua_new_class (L, "rspamd{session}", NULL);
- lua_pop (L, 1);
-
-- rspamd_lua_add_preload (L, "lpeg", luaopen_lpeg);
- luaopen_ucl (L);
- rspamd_lua_add_preload (L, "ucl", luaopen_ucl);
-
diff --git a/mail-filter/rspamd/rspamd-2.5.ebuild b/mail-filter/rspamd/rspamd-2.5-r1.ebuild
index a533869c5122..eb97eb1d040b 100644
--- a/mail-filter/rspamd/rspamd-2.5.ebuild
+++ b/mail-filter/rspamd/rspamd-2.5-r1.ebuild
@@ -36,11 +36,9 @@ RDEPEND="
jemalloc? ( dev-libs/jemalloc )
jit? (
dev-lang/luajit:2
- dev-lua/lpeg[luajit]
)
!jit? (
dev-lang/lua:*
- dev-lua/lpeg[-luajit]
dev-lua/LuaBitOp
)
!libressl? ( dev-libs/openssl:0=[-bindist] )
@@ -63,7 +61,7 @@ PATCHES=(
src_prepare() {
cmake_src_prepare
- rm -vrf contrib/{lua-{bit,lpeg},snowball,zstd} || die
+ rm -vrf contrib/{lua-bit,snowball,zstd} || die
sed -i -e 's/User=_rspamd/User=rspamd/g' \
rspamd.service \
diff --git a/mail-filter/rspamd/rspamd-2.6-r1.ebuild b/mail-filter/rspamd/rspamd-2.6-r2.ebuild
index 1488b0696d24..380080e13fba 100644
--- a/mail-filter/rspamd/rspamd-2.6-r1.ebuild
+++ b/mail-filter/rspamd/rspamd-2.6-r2.ebuild
@@ -39,11 +39,9 @@ RDEPEND="
jemalloc? ( dev-libs/jemalloc )
jit? (
dev-lang/luajit:2
- dev-lua/lpeg[luajit]
)
!jit? (
dev-lang/lua:*
- dev-lua/lpeg[-luajit]
dev-lua/LuaBitOp
)
!libressl? ( dev-libs/openssl:0=[-bindist] )
@@ -65,7 +63,7 @@ PATCHES=(
src_prepare() {
cmake_src_prepare
- rm -vrf contrib/{lua-{bit,lpeg},snowball,zstd} || die
+ rm -vrf contrib/{lua-bit,snowball,zstd} || die
sed -i -e 's/User=_rspamd/User=rspamd/g' \
rspamd.service \