From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
Date: Tue, 7 Sep 2021 20:25:25 +0000 (UTC) [thread overview]
Message-ID: <1631046300.b097209aecec050012ffa8b6f80f5e4d56308abd.sam@gentoo> (raw)
commit: b097209aecec050012ffa8b6f80f5e4d56308abd
Author: Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Mon Sep 6 06:15:55 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep 7 20:25:00 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b097209a
mail-filter/rspamd: use system dev-cpp/doctest
This backports patch already merged to upstream, which allows us to use
system dev-cpp/doctest library rather than bundled one. Rspamd bundles
doctest-2.4.5 which fails to build with glibc-2.34.
Closes: https://bugs.gentoo.org/811318
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../rspamd/files/rspamd-3.0-system-doctest.patch | 72 ++++++++++++++++++++++
.../{rspamd-3.0-r2.ebuild => rspamd-3.0-r3.ebuild} | 5 +-
2 files changed, 76 insertions(+), 1 deletion(-)
diff --git a/mail-filter/rspamd/files/rspamd-3.0-system-doctest.patch b/mail-filter/rspamd/files/rspamd-3.0-system-doctest.patch
new file mode 100644
index 00000000000..bb315ee7a45
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.0-system-doctest.patch
@@ -0,0 +1,72 @@
+From d37a3764e9889e6de0a7341ba3195ee8a314de23 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
+Date: Wed, 1 Sep 2021 13:30:56 +0200
+Subject: [PATCH] Add SYSTEM_DOCTEST cmake option
+
+This gives packagers option to use system version of doctest rather than
+bundled one. It is disabled by default. Additionally, there is no need
+to link rspamd-test-cxx with doctest as it is is single header library.
+
+Main reason for this change is that currently bundled version of
+doctest-2.4.5 can't compile with glibc-2.34 [1]. However, this issue was
+already fixed in upstream doctest-2.4.6 [2] in commit [3]. With this,
+packagers can just bump doctest to fixed version.
+
+[1] https://github.com/onqtam/doctest/issues/473
+[2] https://github.com/onqtam/doctest/blob/master/CHANGELOG.md#246-2021-03-22
+[3] https://github.com/onqtam/doctest/commit/099d5414e97244ec44cf46b14cd176b3a3dc52e3
+---
+
+Merged-to-upstream: https://github.com/rspamd/rspamd/pull/3875
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fc4175677..ced49730d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -59,6 +59,7 @@ OPTION(ENABLE_LUA_TRACE "Trace all Lua C API invocations [default: OFF]" OFF)
+ OPTION(ENABLE_LUA_REPL "Enables Lua repl (requires C++11 compiler) [default: ON]" ON)
+ OPTION(SYSTEM_ZSTD "Use system zstd instead of bundled one [default: OFF]" OFF)
+ OPTION(SYSTEM_FMT "Use system fmt instead of bundled one [defalut: OFF]" OFF)
++OPTION(SYSTEM_DOCTEST "Use system doctest instead of bundled one [default: OFF]" OFF)
+
+ ############################# INCLUDE SECTION #############################################
+
+@@ -118,7 +119,6 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/"
+ "${CMAKE_SOURCE_DIR}/contrib/lc-btrie"
+ "${CMAKE_SOURCE_DIR}/contrib/lua-lpeg"
+ "${CMAKE_SOURCE_DIR}/contrib/frozen/include"
+- "${CMAKE_SOURCE_DIR}/contrib/doctest"
+ "${CMAKE_SOURCE_DIR}/contrib/fu2/include"
+ "${CMAKE_BINARY_DIR}/src" #Stored in the binary dir
+ "${CMAKE_BINARY_DIR}/src/libcryptobox")
+@@ -656,7 +656,12 @@ IF(SYSTEM_FMT MATCHES "OFF")
+ ELSE()
+ find_package(fmt)
+ ENDIF()
+-ADD_SUBDIRECTORY(contrib/doctest)
++IF(SYSTEM_DOCTEST MATCHES "OFF")
++ ADD_SUBDIRECTORY(contrib/doctest)
++ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/contrib/doctest")
++ELSE()
++ find_package(doctest)
++ENDIF()
+
+ IF (NOT WITH_LUAJIT)
+ ADD_SUBDIRECTORY(contrib/lua-bit)
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 9e56cbad7..08e9556f3 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -24,9 +24,7 @@ SET(CXXTESTSSRC rspamd_cxx_unit.cxx)
+ ADD_EXECUTABLE(rspamd-test-cxx EXCLUDE_FROM_ALL ${CXXTESTSSRC})
+ SET_TARGET_PROPERTIES(rspamd-test-cxx PROPERTIES LINKER_LANGUAGE CXX)
+ ADD_DEPENDENCIES(rspamd-test-cxx rspamd-server)
+-ADD_DEPENDENCIES(rspamd-test-cxx doctest)
+ TARGET_LINK_LIBRARIES(rspamd-test-cxx PRIVATE rspamd-server)
+-TARGET_LINK_LIBRARIES(rspamd-test-cxx PRIVATE doctest)
+ SET_TARGET_PROPERTIES(rspamd-test-cxx PROPERTIES LINKER_LANGUAGE CXX)
+
+ IF(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+--
+2.31.1
+
diff --git a/mail-filter/rspamd/rspamd-3.0-r2.ebuild b/mail-filter/rspamd/rspamd-3.0-r3.ebuild
similarity index 95%
rename from mail-filter/rspamd/rspamd-3.0-r2.ebuild
rename to mail-filter/rspamd/rspamd-3.0-r3.ebuild
index 30065ff095b..1ff4af0796e 100644
--- a/mail-filter/rspamd/rspamd-3.0-r2.ebuild
+++ b/mail-filter/rspamd/rspamd-3.0-r3.ebuild
@@ -35,6 +35,7 @@ RDEPEND="${LUA_DEPS}
acct-user/rspamd
app-arch/zstd:=
dev-db/sqlite:3
+ dev-cpp/doctest
dev-libs/glib:2
dev-libs/icu:=
dev-libs/libev
@@ -60,6 +61,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${P}-cmake-lua-version.patch"
"${FILESDIR}/${P}-system-libfmt.patch"
+ "${FILESDIR}/${P}-system-doctest.patch"
"${FILESDIR}/${P}-fix-null-dereference.patch"
"${FILESDIR}/${PN}-2.6-unbundle-lua.patch"
"${FILESDIR}/${PN}-2.5-unbundle-snowball.patch"
@@ -68,7 +70,7 @@ PATCHES=(
src_prepare() {
cmake_src_prepare
- rm -vrf contrib/{fmt,lua-bit,snowball,zstd} || die
+ rm -vrf contrib/{doctest,fmt,lua-bit,snowball,zstd} || die
sed -i -e 's/User=_rspamd/User=rspamd/g' \
rspamd.service \
@@ -82,6 +84,7 @@ src_configure() {
-DDBDIR=/var/lib/rspamd
-DLOGDIR=/var/log/rspamd
+ -DSYSTEM_DOCTEST=ON
-DSYSTEM_FMT=ON
-DSYSTEM_ZSTD=ON
next reply other threads:[~2021-09-07 20:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 20:25 Sam James [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-08-22 2:50 Sam James
2020-10-08 19:41 Sam James
2020-04-04 8:06 Joonas Niilola
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=1631046300.b097209aecec050012ffa8b6f80f5e4d56308abd.sam@gentoo \
--to=sam@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