summaryrefslogtreecommitdiff
path: root/mail-filter
diff options
context:
space:
mode:
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/Manifest.gzbin8708 -> 8710 bytes
-rw-r--r--mail-filter/libmilter/Manifest2
-rw-r--r--mail-filter/libmilter/libmilter-1.0.2_p2.ebuild2
-rw-r--r--mail-filter/postgrey/Manifest2
-rw-r--r--mail-filter/postgrey/postgrey-1.37.ebuild74
-rw-r--r--mail-filter/rspamd/Manifest6
-rw-r--r--mail-filter/rspamd/files/rspamd-3.0-fix-null-dereference.patch46
-rw-r--r--mail-filter/rspamd/files/rspamd-3.0-system-doctest.patch72
-rw-r--r--mail-filter/rspamd/rspamd-3.0-r3.ebuild (renamed from mail-filter/rspamd/rspamd-3.0-r2.ebuild)6
-rw-r--r--mail-filter/rspamd/rspamd-9999.ebuild4
10 files changed, 208 insertions, 6 deletions
diff --git a/mail-filter/Manifest.gz b/mail-filter/Manifest.gz
index 039dfbb0f2b0..8618037ae55f 100644
--- a/mail-filter/Manifest.gz
+++ b/mail-filter/Manifest.gz
Binary files differ
diff --git a/mail-filter/libmilter/Manifest b/mail-filter/libmilter/Manifest
index bf2ecb4c6da1..43d4d968b9ac 100644
--- a/mail-filter/libmilter/Manifest
+++ b/mail-filter/libmilter/Manifest
@@ -6,5 +6,5 @@ AUX sendmail-8.16.1-build-system.patch 9701 BLAKE2B f1bbf82ab321b502ecbd5d2658e5
DIST sendmail.8.16.1.tar.gz 2236402 BLAKE2B 80a9c2f1d04719099703e55f0a0c54fd638cf69b72839d358ae6863c95c9e0965d1b7fdd5b1807bec1ffdf87bca0c7c9ba91060962e6de5da5bf14422f6279ea SHA512 d7d4aac3c6d7505782abdb166204901b8b51cac000d610dfe40eda9eef7441a073af9e8e0b14c8719b07b445f55a1e2c28ac63d663d0daa7f1eafc5a101788b2
DIST sendmail.8.17.1.tar.gz 2284027 BLAKE2B 4cbbc2bb536a48ea27994721e9dfefff7739ef1c825bbc0397202e600d8dad8f9a2572a777204693cf9630f767865d50566f0827be6b52be41c1e25532cb394c SHA512 ae42343fb06c09f2db5d919d602afc4241914387dfdae0f15e0967dda3be25bf1d3a4637b57266763679646a3cea6aa07e6453266fd9b7358c1a09ec2b627a15
EBUILD libmilter-1.0.2_p1-r2.ebuild 2214 BLAKE2B 1d8fe51cf3c6b88889cbf9d9597bf78406794f18c79392a1fb2cb2f4af7ed662d68c35d11fce142b677c272a8234f9c30adda2aea94f31ed9850763ebbf94f89 SHA512 b4ad6934eb6d717c70eb0491508b6e482710e64801e6b1aeff1f0a305f919777d6c100d68fef2093aba09cfbaff7461377f4ee6890cb24db02a74f2ed21d82c0
-EBUILD libmilter-1.0.2_p2.ebuild 2589 BLAKE2B 00e621f39053d177496959a7fb2fe77f472f633b10dee23c91ec22baea0e4a0fcf33bc43050579f06d7c71e5f86e11a6758afda3d005adad95bde8c851a61b10 SHA512 f73dfe2f656fe328bdc570fee09d9658c7dcdd1c6cf31835388ea410bb972d8e02eb49f30073d756236b4162fb3ef2a70bae67ee31a5c3c7e228ebc256d819b0
+EBUILD libmilter-1.0.2_p2.ebuild 2595 BLAKE2B 8b19ceadbbfe3d0c54cc351862ccca58291ecdd3b6421342fc209f75d17045423730355a5aa722b603e9848f9958465eb286e47d547c49c5c00a7f5bc8a9b317 SHA512 8a3277296469ac03b534133279c45c6fb715b9df8fc57cda8abb8bf053041c9e3c2864c4acef96306cfc24ea4b410f06e9b36b976aa125ee3dc0c3d3bd82bb5e
MISC metadata.xml 241 BLAKE2B 7e817e3e8547331152f2d3378fe5681d02cccc2ec04dfbe21833282edc6c826a93b9493110f5f0afd05edbbbb84a1a185db7e17d154399aabd1e70ab044c3ecd SHA512 bec8ce3a2140871a48e34ad88eeefd1bf05b2d6508e2a5ca4c406aa0ca2729b0b827ae02dd4fd707630894e1c8fc367cdb9840b791ad8ee596d067d40c36aa42
diff --git a/mail-filter/libmilter/libmilter-1.0.2_p2.ebuild b/mail-filter/libmilter/libmilter-1.0.2_p2.ebuild
index ef84d62af4d6..4614aaf9e657 100644
--- a/mail-filter/libmilter/libmilter-1.0.2_p2.ebuild
+++ b/mail-filter/libmilter/libmilter-1.0.2_p2.ebuild
@@ -23,7 +23,7 @@ LICENSE="Sendmail"
# We change the actual "main version" (1.0.2 at time of writing) when the version
# of libmilter included in the tarball changes.
SLOT="0/$(ver_cut 1-3)"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="ipv6 poll"
RDEPEND="!<mail-mta/sendmail-8.16.1"
diff --git a/mail-filter/postgrey/Manifest b/mail-filter/postgrey/Manifest
index 4fcd7e64198f..245fe8bc3ddc 100644
--- a/mail-filter/postgrey/Manifest
+++ b/mail-filter/postgrey/Manifest
@@ -1,6 +1,8 @@
AUX postgrey-1.34-r3.rc.new 2373 BLAKE2B 6f7a1197735b710fbb23fd49acb1fc9a9b743e7c2e27c93441d2670de58448003d9c2d47305c01c8e54df8e958532a064cb413f010b744c058ceeb8016f973a2 SHA512 a9f9c841249b303da2bd4c976e2cd2fe85264929e298745e08f684f86659da548d9348c15a5723697835ee44c584405582605792f545eb9b1c097f82fc15720e
AUX postgrey.conf.new 1914 BLAKE2B 826949afe4a8a7bbfe9dec493fd619b91235945420bbd5e4c70709aff23a7393277c88edac1b1f149ea34b4fdfce4649715a97b38052d3e2c360716439bf6489 SHA512 07c7bf82fa24486a62701238bc3684e7ed445bceeb54c842eba39b0d83732b704954247978784142ecf20329352dbe698ba2d9a76576d5082315a314278a6740
AUX postgrey.service 345 BLAKE2B 4ca6ab7a5649ea49fe69128b64111113301ab891f3de9f2d433e40eca14d178dcb992f70802cc73d003e7903fc3edcb53242c656b9208fdd0aaef2562577d522 SHA512 f5f92cae916a8000da460c0c5bd2194b49518cf2bdadf7f6c4512a29dbee73b4a75d530ed0d2049ac46103235246b5b3b88e55216c9ed1a012ed306a4bf7d58c
+DIST postgrey-1.37.tar.gz 41815 BLAKE2B dd8a1f62f56a614c25863afde089f1882a1567e3a53a24b1d12b6f23994388caf99059f05775853065143f4f953a6fd964625d5c865993e0e679dd545b848c11 SHA512 369968212ea60539efc0d4a7ae84f7c3ce13f5622e6ee070a0089423ef81ca8f7541ebd20289291d0e6a3aec2ca30dbc9c0d9c0a6f0a686adfadb5d0dd7830ca
DIST postgrey-1.37_p20190625.tar.gz 124667 BLAKE2B ca2caba51a72198e42d6d4d9c5c7590b62c1bd1589d05bfb4096fb4d95ff62ff96976beac8c1b35136a4a6830af936244485ff7dcdcd46d8558a4bef0bbb123a SHA512 f3caf3c7663bd8784701c7e1ad45d1c577edf6fac14591a6983fda25e7f8a875f2501780a8f97ce72e6a324878404e9ac2a003a07ae07ad4debae61fe734b8d4
+EBUILD postgrey-1.37.ebuild 1660 BLAKE2B 20fb1d1b6230579a6a7b1f4dbdda2ee23be1d8d76dcb02f222ae832a0adc23665336a106c03bd8611d436914d406c4cde7ca511bead4e43f1bb39f37c7c660dc SHA512 25003e247c69e13ca2bf649877481f6730aba6c8687f8e8f92f08048a78f4f5761e8493afc182a8f362757b802880684ceb46d12ca951fbceff709dd4d67f266
EBUILD postgrey-1.37_p20190625-r1.ebuild 1760 BLAKE2B 5494ace7579f71f369f29a8dcc5be1cbac062e8b7c6c4e910e998623de83bc5e3ec41807f8affbe7487433fd7c3d436cefc839e45248644fb449b71e212cf579 SHA512 5a05c58fbc4fd8445968f731b3959be9eddc8551fe3b98ede4146aa5fc50aaad00d87bf10e17e49f0da69626d977a893b34d149972035c8dcc9bd5b14c84fe90
MISC metadata.xml 470 BLAKE2B 28f461f109f6883bd605e86a4e13436960db61cdc30467545a0a3826fa5f5282af1d73806288845474c87aaed616a83f9e77a5d264cde6dd07b2c8d9cdde0bba SHA512 9dec84c40a4b8705b458687fbd1d8300531bc77975f96be5e94ad251c8df2b2d1f20a08d4082f228353ee98cbf4f691b778d5bfdb9faa89ea1b3dd68b71fd331
diff --git a/mail-filter/postgrey/postgrey-1.37.ebuild b/mail-filter/postgrey/postgrey-1.37.ebuild
new file mode 100644
index 000000000000..d7fabcdacb8b
--- /dev/null
+++ b/mail-filter/postgrey/postgrey-1.37.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd
+
+DESCRIPTION="Postgrey is a Postfix policy server implementing greylisting"
+HOMEPAGE="https://postgrey.schweikert.ch/"
+SRC_URI="http://postgrey.schweikert.ch/pub/${P}.tar.gz
+ http://postgrey.schweikert.ch/pub/old/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 x86"
+
+DEPEND="
+ acct-group/postgrey
+ acct-user/postgrey
+"
+# TODO: Use db.eclass?
+RDEPEND="
+ ${DEPEND}
+ >=dev-lang/perl-5.6.0
+ dev-perl/Net-Server
+ dev-perl/IO-Multiplex
+ dev-perl/BerkeleyDB
+ dev-perl/Net-DNS
+ dev-perl/NetAddr-IP
+ dev-perl/Net-RBLClient
+ dev-perl/Parse-Syslog
+ virtual/perl-Digest-SHA
+ >=sys-libs/db-4.1
+"
+
+src_prepare() {
+ default
+
+ # bug 479400
+ sed -i 's@#!/usr/bin/perl -T -w@#!/usr/bin/perl -w@' postgrey || die "sed failed"
+}
+
+src_install() {
+ # postgrey data/DB in /var
+ diropts -m0770 -o ${PN} -g ${PN}
+ dodir /var/spool/postfix/${PN}
+ keepdir /var/spool/postfix/${PN}
+ fowners postgrey:postgrey /var/spool/postfix/${PN}
+ fperms 0770 /var/spool/postfix/${PN}
+
+ # postgrey binary
+ dosbin ${PN}
+ dosbin contrib/postgreyreport
+
+ # policy-test script
+ dosbin policy-test
+
+ # postgrey data in /etc/postfix
+ insinto /etc/postfix
+ insopts -o root -g ${PN} -m 0640
+ doins postgrey_whitelist_clients postgrey_whitelist_recipients
+
+ # documentation
+ dodoc Changes README README.exim
+
+ # init.d + conf.d files
+ insopts -o root -g root -m 755
+ newinitd "${FILESDIR}"/${PN}-1.34-r3.rc.new ${PN}
+
+ insopts -o root -g root -m 640
+ newconfd "${FILESDIR}"/${PN}.conf.new ${PN}
+
+ systemd_dounit "${FILESDIR}"/postgrey.service
+}
diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index c4c9b94752e5..b06295de846a 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -3,6 +3,8 @@ AUX rspamd-2.6-unbundle-lua.patch 1344 BLAKE2B 0d5e07043f5bff29ef484e7708cd3b0fd
AUX rspamd-2.7-cmake-lua-version.patch 1121 BLAKE2B 7fa15211805ebd90655eb696cb39d59215315fa55e2e286555f05c505af629119fa0e851dc2a7dd00779e06610d20e590cd57e08aca8557c752c3ab1bfc49bd3 SHA512 2977a94e4e2878a4148e292bc36f605df850145e011e8ef4c35d590ff203327c457c3856a8033d527428bf23673f54807acb912fb171c0550195b3cbf605cb6f
AUX rspamd-2.7-unbundle-zstd.patch 4047 BLAKE2B 2a93a17980915a5dc12e20f89922d2e58a73df555ba41c7e8e39a65ccb507673d900fee4b25f1539a7cf516fcf92e1ecacfc5eb1f0c154830700e2ca95acef8b SHA512 ae589dcecfb15980ec94924d1a5c4e27d8a297fa11ae8c9c40ca4b8fb523039df1f8ee193c936b30b4c6e1fc31b301ce07fb08645778defefe3351ea6df43dd9
AUX rspamd-3.0-cmake-lua-version.patch 1444 BLAKE2B b44ada90d1d4d59f000ab75a5d28545902235c85ccab3408eefb8f034bec0c86f6a62678cc5632c7db61b19e7cc1afff2b92a8f1493c64fbe831b3eca3836322 SHA512 f382af60698dd23e69469d6dfaf3c18cef0f413b22918725aec5dd09ee3f8c339d3a6ce92f46ebca89690ce57cab3295ab3093b502af7bce4ce5576c7fd3de9a
+AUX rspamd-3.0-fix-null-dereference.patch 1151 BLAKE2B ac2de9943a6581eb700d5c81b61afb79129fd485f004a4d65ba2ef8a5cf9c7f7e9bcc4e1b19f898fc6e781586c977aa65ac957eeff34766994e5159efe7a30c9 SHA512 acf836d043c38f741287d9d2f7a936f75e9b6ecb0609c58a4f315a10ecb089592feea968a71be2409c31aacd5c56340b6bbe59624cb40982656b50a3b0659e0f
+AUX rspamd-3.0-system-doctest.patch 3087 BLAKE2B 5d61f548bb2feba2fcb5de0eac5af3fd185e00d9c6a13e931f8f61e95a3465f93155a6335d6fb182da626baaf5e378db946219dba4c10994867a48fde3ebe9e7 SHA512 57f6e82319bf1e29d65953072e3c3a1d526c34fb01742080990d4764df35862c88aa4c44c06577a8265f52a401c48ecffd88e109f3abe69255b77ea9284a3cc5
AUX rspamd-3.0-system-libfmt.patch 1860 BLAKE2B 50754cbcc3bf687fb0274af69d5985b3da2278444819c43d7b51ee11b97776eb49e303f0d606538dd67295efb1e66d0265cc44ad8882a482c01b7733cfc46228 SHA512 6d64681d4ba6f6e93dc2f021041e0cb72309e369daaeb93f42ff9ee34ce6a9ea05db4a7ff21948788717d18d89287d2c0a9454a60b3f9bb9f72dab5be60ce7b2
AUX rspamd-r1.logrotate 305 BLAKE2B 58e816e54fd0a7e977dd2f6dcf97617c188888ffea66769ef60ce799f980e2814221734fee7b47c93790a5bbfecbb2f315f93c84bec9dd29b0f80c15e1b9e349 SHA512 0515d31a890058194106d9b8960d77909914986e73619dede751be2efb9592a41f90f15599310b5d6d027c3a203df412c8379ade7df09ecdfd4dcf43bfff4fa7
AUX rspamd-r7.init 1357 BLAKE2B 90227e0980397a256e6136cac4a4a4d143130d82a211bfd4894d5f8deb85113e0b219e6453257d548ec3d80de24241e6ecfc2b0a4178cb344c8c6549d96e549b SHA512 89a079d32b7d8c5a037c7bb2ab6825624ce89ea4b25893bcf6f49befc0c7b924b51d48b30bf61c4b3ea5bc3ccbaba16664c7df52236debda0bdb58f1adf8867a
@@ -11,6 +13,6 @@ AUX rspamd.tmpfile 33 BLAKE2B 3ce0f8ab29a2ca259023f90b12799d8c7f0f099a98ef1eb4ab
DIST rspamd-2.7.tar.gz 5126227 BLAKE2B 70f57dba6ac9abe93d735d42e84bd17a1797035322029577a8e4376409bcee5345d4624925d3dd071bddce038858ebfdce8ee4f87f81b1fc8b1f71ad14e85930 SHA512 8779771baf85ef6ca1d7d2180429072ab1547ab834b073ee9222dcc6494efdd0a23f5e7ac52a777c23fd89296769f5b6f182593e714097c6f11ca7c9165e4ba7
DIST rspamd-3.0.tar.gz 5535659 BLAKE2B 605ac59b947b49efb026e04d153df5fc0d56c65712def3f2c54a949db32b8534e634d172a1899cc08e98e0a9da839fc00f0f569dc8c52a743f38bd71b8abaeaa SHA512 1ea6f9ffe58b7f280dbd31e39db6412ebeddda634ca8a669fa5bff2951d17123a5d4a09ec0f366c6b0c0b585f868e646fd49e4d45bd451408675b927ec2557c4
EBUILD rspamd-2.7-r103.ebuild 2680 BLAKE2B 75275dd49ac5b6b2f33a53e54934025f0341df190efe6c66034e54377ece549a6fb0c93accac6ca54b543b78b3b600a3ad1a8e75ac1d3677a4688344ecd733d8 SHA512 1be59df83281b02c14cf24a4b13fc841e9dbc0a7e2218807ee3394dfaccc9b73001208dfe22dc88abf2073c6c6b3acf61937627b765a82e71eaad8d8c6054eab
-EBUILD rspamd-3.0-r2.ebuild 2836 BLAKE2B 60e8b70afe764c3260da4058cea28dce5a1ca1676a2333559ea2e8789fd36f0ff803d4e34cb70e9dee2ceb6da4d8cb901b2eddec0485fce0571832b87f13d24a SHA512 522f43a7601f818917c7f5c22eae638214e15469c467113800577022ea7c27cb0f98c9aec18e6551b3e73301441189a84c7634baf4a718d5b531a9909b4cb41d
-EBUILD rspamd-9999.ebuild 2804 BLAKE2B d758f9448ac993be7227a44733798d7dc0b0ff22c16616255acfeee23cca9e9c71a6341f2a0e9322b136f823a98b2871e1f3b9fa8f6e97813eb930c06b4b2bd6 SHA512 4e62781920704264a167340afc3456775cc585d39a9ab77bd62742f90c32641f52d785251a03e697e0eff2d6d633d9101d55cf70cc8a98e672c7bcc42768e853
+EBUILD rspamd-3.0-r3.ebuild 2971 BLAKE2B e610fb708f188a34b774743e41ad0bd921d78a143a2142b4743828ad2edd493baee0a819fd3df9328836d371c5c2da64269c0e3ec6c3d7b659396af6473b0e38 SHA512 d2cdd8c91c98c58a7bb73a1493f0d76684817678d01ad5a856c77863b429db4578c32739a49009d4815182940d40d9a2fcfbe3ec98a9edb56769578506d79d45
+EBUILD rspamd-9999.ebuild 2851 BLAKE2B 98c4585f0676de1b818c4d2297c0f677fa7f99bec09296c8c6061928939ccca730ff080c9a7be84ac693f383f48339faf04c2566cdca6098cf2bed51d8e4f44c SHA512 ece9fa974ac682edaa3bedc42218cb43e4b1ab1348a9b8a31c0c47677d02c5d3a230676310d4406526c2a830e5fb9482297c1db6dd05bf6e8dd20d551b166d08
MISC metadata.xml 683 BLAKE2B 88aae3128d411106650ed6fc0558c5b36419fffc01a6c09a0b23e85bdc6f4a02fa8f086f794dec814a78e40956f0ca3256de5700574ff4547309b868869fbb16 SHA512 a0367a901b8294cab8e725dce17ce5e9c9195aa9a62a1b5925b213875e5706509973d9d7bd2ee3057ee9892a05132f868f81cf2a0193f9fdc5eb9235c09093aa
diff --git a/mail-filter/rspamd/files/rspamd-3.0-fix-null-dereference.patch b/mail-filter/rspamd/files/rspamd-3.0-fix-null-dereference.patch
new file mode 100644
index 000000000000..d355f701a273
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.0-fix-null-dereference.patch
@@ -0,0 +1,46 @@
+From abea3ac21f764658a966dad475fc99e4b79530d7 Mon Sep 17 00:00:00 2001
+From: Jan Smutny <js@excello.cz>
+Date: Tue, 31 Aug 2021 14:25:23 +0200
+Subject: [PATCH] [Fix] src/lua/lua_mimepart.c: fix null dereference
+
+---
+
+This patch is taken from upstream. It fixes possible runtime segfaults.
+
+PR: https://github.com/rspamd/rspamd/pull/3873
+
+diff --git a/src/lua/lua_mimepart.c b/src/lua/lua_mimepart.c
+index 66b588e3a..21a46d496 100644
+--- a/src/lua/lua_mimepart.c
++++ b/src/lua/lua_mimepart.c
+@@ -1240,7 +1240,16 @@ lua_textpart_get_fuzzy_hashes (lua_State * L)
+ rspamd_stat_token_t *word;
+ struct lua_shingle_filter_cbdata cbd;
+
+- if (part && pool) {
++
++ if (part == NULL || pool == NULL) {
++ return luaL_error (L, "invalid arguments");
++ }
++
++ if (IS_TEXT_PART_EMPTY (part) || part->utf_words == NULL) {
++ lua_pushnil (L);
++ lua_pushnil (L);
++ }
++ else {
+ /* TODO: add keys and algorithms support */
+ rspamd_cryptobox_hash (key, "rspamd", strlen ("rspamd"), NULL, 0);
+
+@@ -1294,9 +1303,6 @@ lua_textpart_get_fuzzy_hashes (lua_State * L)
+ }
+ }
+ }
+- else {
+- return luaL_error (L, "invalid arguments");
+- }
+
+ return 2;
+ }
+--
+2.31.1
+
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 000000000000..bb315ee7a459
--- /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
index efe18dc57b00..1ff4af0796ec 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,8 @@ 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"
)
@@ -67,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 \
@@ -81,6 +84,7 @@ src_configure() {
-DDBDIR=/var/lib/rspamd
-DLOGDIR=/var/log/rspamd
+ -DSYSTEM_DOCTEST=ON
-DSYSTEM_FMT=ON
-DSYSTEM_ZSTD=ON
diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-9999.ebuild
index 7bcf4740c473..df5d75abfd0e 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.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
@@ -66,7 +67,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 \
@@ -80,6 +81,7 @@ src_configure() {
-DDBDIR=/var/lib/rspamd
-DLOGDIR=/var/log/rspamd
+ -DSYSTEM_DOCTEST=ON
-DSYSTEM_FMT=ON
-DSYSTEM_ZSTD=ON