summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@atlas.cz>2020-10-08 20:34:52 +0200
committerSam James <sam@gentoo.org>2020-10-08 19:39:37 +0000
commit6323b87561e9cea97fa219c349485e4e2fc8a9b3 (patch)
tree4f63e9e3813d44043f36db556b7f62bb82c8d568 /mail-filter/rspamd
parentmedia-libs/dav1d: Stabilize 0.7.0 arm, #747196 (diff)
downloadgentoo-6323b87561e9cea97fa219c349485e4e2fc8a9b3.tar.gz
gentoo-6323b87561e9cea97fa219c349485e4e2fc8a9b3.tar.bz2
gentoo-6323b87561e9cea97fa219c349485e4e2fc8a9b3.zip
mail-filter/rspamd: use bundled hiredis, bug #747274
System hiredis makes the rspamd subprocesses segfault periodically. Closes: https://bugs.gentoo.org/747274 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Closes: https://github.com/gentoo/gentoo/pull/17852 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'mail-filter/rspamd')
-rw-r--r--mail-filter/rspamd/files/rspamd-2.6-unbundle-hiredis.patch93
-rw-r--r--mail-filter/rspamd/rspamd-2.6-r1.ebuild (renamed from mail-filter/rspamd/rspamd-2.6.ebuild)4
-rw-r--r--mail-filter/rspamd/rspamd-9999.ebuild4
3 files changed, 2 insertions, 99 deletions
diff --git a/mail-filter/rspamd/files/rspamd-2.6-unbundle-hiredis.patch b/mail-filter/rspamd/files/rspamd-2.6-unbundle-hiredis.patch
deleted file mode 100644
index 875009da41aa..000000000000
--- a/mail-filter/rspamd/files/rspamd-2.6-unbundle-hiredis.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0afb5feff..966173075 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -170,6 +170,8 @@ ELSE()
- ROOT ${PCRE_ROOT_DIR} MODULES pcre libpcre pcre3 libpcre3)
- ENDIF()
-
-+ProcessPackage(HIREDIS LIBRARY hiredis INCLUDE hiredis.h
-+ ROOT ${HIREDIS_ROOT_DIR} MODULES hiredis)
- 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
-@@ -555,9 +557,7 @@ ENDIF(NOT DESTDIR)
-
-
- ################################ SUBDIRS SECTION ###########################
--ADD_SUBDIRECTORY(contrib/hiredis)
- SET(WITH_HIREDIS 1)
--INCLUDE_DIRECTORIES(BEFORE "${CMAKE_SOURCE_DIR}/contrib/hiredis")
-
- LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
- IF(HAVE_FETCH_H)
-@@ -604,7 +604,6 @@ ENDIF()
- IF (ENABLE_SNOWBALL MATCHES "ON")
- LIST(APPEND RSPAMD_REQUIRED_LIBRARIES stemmer)
- ENDIF()
--LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-hiredis)
-
- LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-actrie)
- LIST(APPEND RSPAMD_REQUIRED_LIBRARIES rspamd-t1ha)
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index e0e2edd58..4908013da 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -190,7 +190,6 @@ ENDIF()
- IF (ENABLE_SNOWBALL MATCHES "ON")
- TARGET_LINK_LIBRARIES(rspamd-server stemmer)
- ENDIF()
--TARGET_LINK_LIBRARIES(rspamd-server rspamd-hiredis)
-
- IF (ENABLE_FANN MATCHES "ON")
- TARGET_LINK_LIBRARIES(rspamd-server fann)
-diff --git a/src/libserver/fuzzy_backend/fuzzy_backend_redis.c b/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
-index d1e3e7532..882acdf6a 100644
---- a/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
-+++ b/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
-@@ -22,8 +22,8 @@
- #include "cryptobox.h"
- #include "str_util.h"
- #include "upstream.h"
--#include "contrib/hiredis/hiredis.h"
--#include "contrib/hiredis/async.h"
-+#include <hiredis.h>
-+#include <async.h>
- #include "lua/lua_common.h"
-
- #define REDIS_DEFAULT_PORT 6379
-diff --git a/src/libserver/redis_pool.c b/src/libserver/redis_pool.c
-index 7e835013c..fccf189e1 100644
---- a/src/libserver/redis_pool.c
-+++ b/src/libserver/redis_pool.c
-@@ -18,9 +18,9 @@
- #include "contrib/libev/ev.h"
- #include "redis_pool.h"
- #include "cfg_file.h"
--#include "contrib/hiredis/hiredis.h"
--#include "contrib/hiredis/async.h"
--#include "contrib/hiredis/adapters/libev.h"
-+#include <hiredis.h>
-+#include <async.h>
-+#include <adapters/libev.h>
- #include "cryptobox.h"
- #include "logger.h"
-
-diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c
-index f9dbbdd13..b885a8b61 100644
---- a/src/lua/lua_redis.c
-+++ b/src/lua/lua_redis.c
-@@ -17,8 +17,8 @@
- #include "lua_thread_pool.h"
- #include "utlist.h"
-
--#include "contrib/hiredis/hiredis.h"
--#include "contrib/hiredis/async.h"
-+#include <hiredis.h>
-+#include <async.h>
-
- #define REDIS_DEFAULT_TIMEOUT 1.0
-
---
-2.25.3
-
diff --git a/mail-filter/rspamd/rspamd-2.6.ebuild b/mail-filter/rspamd/rspamd-2.6-r1.ebuild
index 4c166ee4b01a..1488b0696d24 100644
--- a/mail-filter/rspamd/rspamd-2.6.ebuild
+++ b/mail-filter/rspamd/rspamd-2.6-r1.ebuild
@@ -25,7 +25,6 @@ RDEPEND="
app-arch/zstd
dev-db/sqlite:3
dev-libs/glib:2
- dev-libs/hiredis:=
dev-libs/icu:=
dev-libs/libev
dev-libs/libsodium
@@ -61,13 +60,12 @@ PATCHES=(
"${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
"${FILESDIR}/rspamd-2.6-unbundle-zstd.patch"
"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
- "${FILESDIR}/rspamd-2.6-unbundle-hiredis.patch"
)
src_prepare() {
cmake_src_prepare
- rm -vrf contrib/{hiredis,lua-{bit,lpeg},snowball,zstd} || die
+ rm -vrf contrib/{lua-{bit,lpeg},snowball,zstd} || die
sed -i -e 's/User=_rspamd/User=rspamd/g' \
rspamd.service \
diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-9999.ebuild
index 4c166ee4b01a..1488b0696d24 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.ebuild
@@ -25,7 +25,6 @@ RDEPEND="
app-arch/zstd
dev-db/sqlite:3
dev-libs/glib:2
- dev-libs/hiredis:=
dev-libs/icu:=
dev-libs/libev
dev-libs/libsodium
@@ -61,13 +60,12 @@ PATCHES=(
"${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
"${FILESDIR}/rspamd-2.6-unbundle-zstd.patch"
"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
- "${FILESDIR}/rspamd-2.6-unbundle-hiredis.patch"
)
src_prepare() {
cmake_src_prepare
- rm -vrf contrib/{hiredis,lua-{bit,lpeg},snowball,zstd} || die
+ rm -vrf contrib/{lua-{bit,lpeg},snowball,zstd} || die
sed -i -e 's/User=_rspamd/User=rspamd/g' \
rspamd.service \