public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
Date: Sat,  4 Apr 2020 08:06:33 +0000 (UTC)	[thread overview]
Message-ID: <1585986687.f9e1898e70581acc057e001cb301d091c32cb1df.juippis@gentoo> (raw)

commit:     f9e1898e70581acc057e001cb301d091c32cb1df
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Wed Apr  1 14:33:02 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Apr  4 07:51:27 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9e1898e

mail-filter/rspamd: sync live; unbundle few libraries

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../rspamd/files/rspamd-2.5-unbundle-lua.patch     |  99 ++++++++++++++++
 .../files/rspamd-2.5-unbundle-snowball.patch       |  23 ++++
 .../rspamd/files/rspamd-2.5-unbundle-zstd.patch    | 132 +++++++++++++++++++++
 mail-filter/rspamd/rspamd-9999.ebuild              |  26 +++-
 4 files changed, 277 insertions(+), 3 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
new file mode 100644
index 00000000000..b8deb2d6903
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-2.5-unbundle-lua.patch
@@ -0,0 +1,99 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bbc141170..8e3665c18 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)
+ ADD_SUBDIRECTORY(contrib/kann)
+ ADD_SUBDIRECTORY(contrib/fastutf8)
+ 
+-IF (NOT WITH_LUAJIT)
+-	ADD_SUBDIRECTORY(contrib/lua-bit)
+-ENDIF()
+-
+ 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
+--- 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")
+ 	ADD_DEPENDENCIES(rspamd-server rspamd-clang)
+ ENDIF()
+ 
+-IF (NOT WITH_LUAJIT)
+-	TARGET_LINK_LIBRARIES(rspamd-server rspamd-bit)
+-ENDIF()
+-
+ IF (ENABLE_SNOWBALL MATCHES "ON")
+ 	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
+--- 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,
+ 	return NULL;
+ }
+ 
+-#ifndef WITH_LUAJIT
+-extern int luaopen_bit(lua_State *L);
+-#endif
+-
+ lua_State *
+ rspamd_lua_init (bool wipe_mem)
+ {
+@@ -961,7 +956,6 @@ rspamd_lua_init (bool wipe_mem)
+ 	luaopen_kann (L);
+ 	luaopen_spf (L);
+ #ifndef WITH_LUAJIT
+-	rspamd_lua_add_preload (L, "bit", luaopen_bit);
+ 	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.5-unbundle-snowball.patch b/mail-filter/rspamd/files/rspamd-2.5-unbundle-snowball.patch
new file mode 100644
index 00000000000..10b56fa977a
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-2.5-unbundle-snowball.patch
@@ -0,0 +1,23 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ad989f7f2..d08496998 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -108,7 +108,6 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/"
+ 		"${CMAKE_SOURCE_DIR}/contrib/libottery"
+ 		"${CMAKE_SOURCE_DIR}/contrib/xxhash"
+ 		"${CMAKE_SOURCE_DIR}/contrib/cdb"
+-		"${CMAKE_SOURCE_DIR}/contrib/snowball/include"
+ 		"${CMAKE_SOURCE_DIR}/contrib/librdns"
+ 		"${CMAKE_SOURCE_DIR}/contrib/aho-corasick"
+ 		"${CMAKE_SOURCE_DIR}/contrib/lc-btrie"
+@@ -586,7 +585,6 @@ ADD_SUBDIRECTORY(contrib/fpconv)
+ ADD_SUBDIRECTORY(contrib/lc-btrie)
+ ADD_SUBDIRECTORY(contrib/libottery)
+ IF(ENABLE_SNOWBALL MATCHES "ON")
+-	ADD_SUBDIRECTORY(contrib/snowball)
+ 	SET(WITH_SNOWBALL 1)
+ ENDIF()
+ ADD_SUBDIRECTORY(contrib/libucl)
+-- 
+2.24.1
+

diff --git a/mail-filter/rspamd/files/rspamd-2.5-unbundle-zstd.patch b/mail-filter/rspamd/files/rspamd-2.5-unbundle-zstd.patch
new file mode 100644
index 00000000000..e86d70173c6
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-2.5-unbundle-zstd.patch
@@ -0,0 +1,132 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8e3665c18..ad989f7f2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -171,6 +171,8 @@ ELSE()
+ 		ROOT ${PCRE_ROOT_DIR} MODULES pcre libpcre pcre3 libpcre3)
+ ENDIF()
+ 
++ProcessPackage(ZSTD LIBRARY zstd INCLUDE zstd.h
++	ROOT ${ZSTD_ROOT_DIR} MODULES libzstd)
+ ProcessPackage(SQLITE3 LIBRARY sqlite3 INCLUDE sqlite3.h INCLUDE_SUFFIXES include/sqlite3 include/sqlite
+ 	ROOT ${SQLITE3_ROOT_DIR} MODULES sqlite3 sqlite)
+ ProcessPackage(ICUDATA LIBRARY icudata INCLUDE unicode/ucnv.h
+@@ -583,7 +585,6 @@ ADD_SUBDIRECTORY(contrib/http-parser)
+ ADD_SUBDIRECTORY(contrib/fpconv)
+ ADD_SUBDIRECTORY(contrib/lc-btrie)
+ ADD_SUBDIRECTORY(contrib/libottery)
+-ADD_SUBDIRECTORY(contrib/zstd)
+ IF(ENABLE_SNOWBALL MATCHES "ON")
+ 	ADD_SUBDIRECTORY(contrib/snowball)
+ 	SET(WITH_SNOWBALL 1)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 54b2e4083..e0e2edd58 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -181,7 +181,6 @@ 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 lcbtrie)
+-TARGET_LINK_LIBRARIES(rspamd-server rspamd-zstd)
+ TARGET_LINK_LIBRARIES(rspamd-server rspamd-fastutf8)
+ 
+ IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
+diff --git a/src/client/rspamdclient.c b/src/client/rspamdclient.c
+index 98b51506b..b4ed1cb5e 100644
+--- a/src/client/rspamdclient.c
++++ b/src/client/rspamdclient.c
+@@ -19,8 +19,8 @@
+ #include "libserver/http/http_private.h"
+ #include "libserver/protocol_internal.h"
+ #include "unix-std.h"
+-#include "contrib/zstd/zstd.h"
+-#include "contrib/zstd/zdict.h"
++#include <zstd.h>
++#include <zdict.h>
+ 
+ #ifdef HAVE_FETCH_H
+ #include <fetch.h>
+diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
+index d3ad9e210..c7e09c2f9 100644
+--- a/src/libserver/cfg_utils.c
++++ b/src/libserver/cfg_utils.c
+@@ -36,9 +36,8 @@
+ #include "contrib/libottery/ottery.h"
+ #include "contrib/fastutf8/fastutf8.h"
+ 
+-#define ZSTD_STATIC_LINKING_ONLY
+-#include "contrib/zstd/zstd.h"
+-#include "contrib/zstd/zdict.h"
++#include <zstd.h>
++#include <zdict.h>
+ 
+ #ifdef HAVE_OPENSSL
+ #include <openssl/rand.h>
+diff --git a/src/libserver/maps/map.c b/src/libserver/maps/map.c
+index a832adc4f..bdc1f8ba0 100644
+--- a/src/libserver/maps/map.c
++++ b/src/libserver/maps/map.c
+@@ -23,7 +23,7 @@
+ #include "libserver/http/http_connection.h"
+ #include "libserver/http/http_private.h"
+ #include "rspamd.h"
+-#include "contrib/zstd/zstd.h"
++#include <zstd.h>
+ #include "contrib/libev/ev.h"
+ #include "contrib/uthash/utlist.h"
+ 
+diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
+index 35d50b909..53c23ed51 100644
+--- a/src/libserver/protocol.c
++++ b/src/libserver/protocol.c
+@@ -21,7 +21,7 @@
+ #include "worker_private.h"
+ #include "libserver/cfg_file_private.h"
+ #include "libmime/scan_result_private.h"
+-#include "contrib/zstd/zstd.h"
++#include <zstd.h>
+ #include "lua/lua_common.h"
+ #include "unix-std.h"
+ #include "protocol_internal.h"
+diff --git a/src/libserver/task.c b/src/libserver/task.c
+index 3e8dd381f..150b5d54c 100644
+--- a/src/libserver/task.c
++++ b/src/libserver/task.c
+@@ -25,7 +25,7 @@
+ #include "stat_api.h"
+ #include "unix-std.h"
+ #include "utlist.h"
+-#include "contrib/zstd/zstd.h"
++#include <zstd.h>
+ #include "libserver/mempool_vars_internal.h"
+ #include "libserver/cfg_file_private.h"
+ #include "libmime/lang_detection.h"
+diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c
+index 91cc18800..d29f8aeaa 100644
+--- a/src/lua/lua_util.c
++++ b/src/lua/lua_util.c
+@@ -17,7 +17,7 @@
+ #include "html.h"
+ #include "tokenizers/tokenizers.h"
+ #include "unix-std.h"
+-#include "contrib/zstd/zstd.h"
++#include <zstd.h>
+ #include "contrib/uthash/utlist.h"
+ #include "libmime/email_addr.h"
+ #include "libmime/content_type.h"
+diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
+index e9ce9ef5e..a9f3159db 100644
+--- a/src/rspamd_proxy.c
++++ b/src/rspamd_proxy.c
+@@ -36,7 +36,7 @@
+ #include "libserver/milter.h"
+ #include "libserver/milter_internal.h"
+ #include "libmime/lang_detection.h"
+-#include "contrib/zstd/zstd.h"
++#include <zstd.h>
+ 
+ #include <math.h>
+ 
+-- 
+2.24.1
+

diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-9999.ebuild
index ea53c2dbb55..b5d45580a5d 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.ebuild
@@ -22,28 +22,48 @@ IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit libressl pcre2"
 RDEPEND="
 	acct-group/rspamd
 	acct-user/rspamd
+	app-arch/zstd
 	dev-db/sqlite:3
 	dev-libs/glib:2
 	dev-libs/icu:=
 	dev-libs/libev
 	dev-libs/libsodium
-	dev-util/ragel
+	dev-libs/snowball-stemmer
 	net-libs/libnsl
 	sys-apps/file
 	blas? ( sci-libs/openblas )
 	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
 	jemalloc? ( dev-libs/jemalloc )
-	jit? ( dev-lang/luajit:2 )
-	!jit? ( dev-lang/lua:* )
+	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] )
 	libressl? ( dev-libs/libressl:0= )
 	pcre2? ( dev-libs/libpcre2[jit=] )
 	!pcre2? ( dev-libs/libpcre[jit=] )"
 DEPEND="${RDEPEND}"
+BDEPEND="
+	dev-util/ragel
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/rspamd-2.5-unbundle-lua.patch"
+	"${FILESDIR}/rspamd-2.5-unbundle-zstd.patch"
+	"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
+)
 
 src_prepare() {
 	cmake_src_prepare
 
+	rm -vrf contrib/{lua-{bit,lpeg},snowball,zstd} || die
+
 	sed -i -e 's/User=_rspamd/User=rspamd/g' \
 		rspamd.service \
 		|| die


             reply	other threads:[~2020-04-04  8:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-04  8:06 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-02 17:44 [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/ Petr Vaněk
2024-07-13 20:43 Petr Vaněk
2024-03-13 17:32 Petr Vaněk
2023-12-03 22:01 Petr Vaněk
2023-08-07 17:22 Sam James
2023-08-07  5:43 Sam James
2022-11-15  0:56 Sam James
2022-11-06  6:17 Sam James
2022-04-12  8:20 Sam James
2021-09-07 20:25 Sam James
2021-09-07 20:25 Sam James
2021-08-22  2:50 Sam James
2020-10-08 19:41 Sam James
2020-02-24  5:55 Joonas Niilola
2019-12-14  8:41 Joonas Niilola
2019-11-04 11:22 Dirkjan Ochtman
2018-03-11 14:07 Dirkjan Ochtman
2017-06-13 19:52 Dirkjan Ochtman
2016-09-10 14:56 Dirkjan Ochtman
2016-04-26 19:33 Dirkjan Ochtman
2016-01-13 16:30 Dirkjan Ochtman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1585986687.f9e1898e70581acc057e001cb301d091c32cb1df.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox