public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2016-01-13 16:30 Dirkjan Ochtman
  0 siblings, 0 replies; 22+ messages in thread
From: Dirkjan Ochtman @ 2016-01-13 16:30 UTC (permalink / raw
  To: gentoo-commits

commit:     327bb1b6b7a73f12e57f0faf23786940dae9ea30
Author:     Benny Pedersen <xpunkt <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Mon Jan 11 17:03:58 2016 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Wed Jan 13 16:28:40 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=327bb1b6

mail-filter/rspamd: create /var/run at run time

 mail-filter/rspamd/files/rspamd.init    | 9 ++++++++-
 mail-filter/rspamd/rspamd-1.0.11.ebuild | 4 ++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/mail-filter/rspamd/files/rspamd.init b/mail-filter/rspamd/files/rspamd.init
index 8ba2231..3f5df5b 100644
--- a/mail-filter/rspamd/files/rspamd.init
+++ b/mail-filter/rspamd/files/rspamd.init
@@ -5,7 +5,8 @@
 extra_commands="checkconfig"
 extra_started_commands="reload"
 
-PIDFILE=/var/run/rspamd/rspamd.pid
+RUNDIR=/var/run/rspamd
+PIDFILE=$RUNDIR/rspamd.pid
 
 depend() {
 	need net
@@ -19,6 +20,12 @@ checkconfig() {
 start() {
 	checkconfig || return 1
 	ebegin "Starting ${SVCNAME}"
+	
+	mkdir -m0750 -p $RUNDIR
+	chown rspamd:rspamd $RUNDIR
+	chmod g+s $RUNDIR
+	rm -f $RUNDIR/$SVCNAME.sock
+	
 	start-stop-daemon --start --quiet --pidfile $PIDFILE -u rspamd -g rspamd \
 						--exec /usr/bin/rspamd
 	eend $?

diff --git a/mail-filter/rspamd/rspamd-1.0.11.ebuild b/mail-filter/rspamd/rspamd-1.0.11.ebuild
index 73e6738..97460a2 100644
--- a/mail-filter/rspamd/rspamd-1.0.11.ebuild
+++ b/mail-filter/rspamd/rspamd-1.0.11.ebuild
@@ -46,8 +46,8 @@ src_install() {
 
 	dodir /var/lib/rspamd
 	dodir /var/log/rspamd
-	dodir /var/run/rspamd
-	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd /var/run/rspamd
+	
+	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
 
 	insinto /etc/logrotate.d
 	newins "${FILESDIR}/rspamd.logrotate" rspamd


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2016-04-26 19:33 Dirkjan Ochtman
  0 siblings, 0 replies; 22+ messages in thread
From: Dirkjan Ochtman @ 2016-04-26 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     22173086e840420929b0c1802083661acb69daf4
Author:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 26 19:32:13 2016 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Tue Apr 26 19:32:13 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22173086

mail-filter/rspamd: remove old versions

Package-Manager: portage-2.2.26

 mail-filter/rspamd/Manifest            |  5 ---
 mail-filter/rspamd/files/rspamd.init   | 51 ----------------------------
 mail-filter/rspamd/rspamd-1.1.3.ebuild | 62 ----------------------------------
 mail-filter/rspamd/rspamd-1.1.4.ebuild | 62 ----------------------------------
 mail-filter/rspamd/rspamd-1.2.0.ebuild | 62 ----------------------------------
 mail-filter/rspamd/rspamd-1.2.1.ebuild | 62 ----------------------------------
 mail-filter/rspamd/rspamd-1.2.2.ebuild | 62 ----------------------------------
 7 files changed, 366 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 0eb7268..e304e49 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,7 +1,2 @@
-DIST rspamd-1.1.3.tar.xz 1357696 SHA256 8604e980a81d6586d18d02f90236c83384754ef1debce0b4f0ca32f87e1ec135 SHA512 42152dd64f6265e3a17d6d53b041ded3b4a262e4d63237bc11e21dca96a4946334ab33c13fffa779b95717ed48629a9cc7a79f1af897d4dd3a831f7c121061ed WHIRLPOOL f9164ff3373bc928414b49d27fedff1d2990f4e01646f4959d759d9b3e4737aa77cced4de9bd9f8548145729fbdb765da78295b2d2e610c0f2bedb29b29ebd73
-DIST rspamd-1.1.4.tar.xz 1357172 SHA256 7186d0448aaddc1e347af580e7ec14e34ff38859db99bf2173139a6bbc18821d SHA512 de4afb82beba9d8d28a6cf6d7eb222806671fcca51114b9668fe0484c5a2b0680763d3fe6095cb7d4b301991a5f17effef6cfbf70d6d98c8e79476bbdb8b6ee3 WHIRLPOOL 0dab7e399a9319e82c1cacbf856cf4977376f78b12aa7de563912f6a5ed6280a8ec2b2bd0a07fe46dc684112b725717fb4fb9031b9d9d69ac2da59ba98724dea
-DIST rspamd-1.2.0.tar.xz 1406832 SHA256 1a287608787bfdd59137ae511bafeaca3c4d2faf23aa1c628bdf84d7da6d8505 SHA512 0c0b1c5151ee3633e40b5730a303658263b9e0d174614e92af1dedef7352f71daa524f8d9df04fc6b21d0a73bceeba18a930a6483d4fac0ef412686c36ce1b79 WHIRLPOOL 3e080c2bec4cfef9ebb952446b203ca287c0c1aeedc6baadae1e61fa452fc9a7ef729279378fe7ca1af65af251fc1a1cf6f3cfe1c8c0ccebb042922b1a1f8656
-DIST rspamd-1.2.1.tar.xz 1407348 SHA256 fa4379d047c2b8f029500db69a6c2e8e2ca36f6b187ea49ee5e8892c5236392a SHA512 95666417eb4f3dd3e5153b5b578efdf926014f084be556c7e471c50e386d7bb453f8c11935bcb8af2e0a86550452d39d54fb6630762ca621c6179af4977a5386 WHIRLPOOL 03b0dcc44b9c7718764c6fc81a2109e99cae16734dd5edcb5c49e6047d2877e37e005814e7390b1a3d5fa8991b4f3e50f5d42f9b6a550b753b5dc9dbb871aa1f
-DIST rspamd-1.2.2.tar.xz 1409272 SHA256 3e46509194f28ac36dc1d9a24d68afffed6e20e1a5e0cdb8573ec4fdd80eec73 SHA512 ef2c425d279a1c5d16c7b319d859bf3c8546a9705f313a194d1e536a2cc2adf139f44b95578ca44195845de158783035af3c0424e60b864ccfa233b041cce68f WHIRLPOOL 0443f8e1d4193ad220411c744429137b84aea9679bb54b218b96f4f00f8205e8134255501a10e5c37770ba0c8171e38201ecee365ee928885d6c43c88ac76459
 DIST rspamd-1.2.3.tar.xz 1419080 SHA256 18d41ee46993c51a5aed41b6734304b15e7b98bf0ab3c5855a57851eeb08b724 SHA512 f1b41d8cbd23f609e70031418eca726505f78f5e1cbf6b84ae34386c3635fb8e5786976816c1437524f02f6ba1abd714c9e90cf0fb05990b3ef0f5e49a296618 WHIRLPOOL cd13dc649fd861e4dc990a4ca983d5a2e38adb236e50f043deafa5082261bc0cd85081cc8e7adbbece98b11b8f8c7ccb718308342892f6a1424c663a2541f828
 DIST rspamd-1.2.5.tar.xz 1421372 SHA256 d31cd2d3c0d3511dda61d277b1c782d17f45ff45048e25f0d89f77fb8fe78748 SHA512 8b967f962aab12afe20854ba66d6f98128b1069473a35b88920f2cb429d4c5ea955040ad58fe49c5b4a18243eb42926f92ae6027b3099b3c0469799db82e4bd1 WHIRLPOOL 622e875488fb19ce1e080f06adae2fcb1b6776a813bdcb13d1c6e4e7c5735d17ea47c2d4cc9bbcc632cda714a2bc33241f8fbe0f57e0d0438538610b8c6d16a3

diff --git a/mail-filter/rspamd/files/rspamd.init b/mail-filter/rspamd/files/rspamd.init
deleted file mode 100644
index 3f5df5b..0000000
--- a/mail-filter/rspamd/files/rspamd.init
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/sbin/runscript
-# Copyright 2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_commands="checkconfig"
-extra_started_commands="reload"
-
-RUNDIR=/var/run/rspamd
-PIDFILE=$RUNDIR/rspamd.pid
-
-depend() {
-	need net
-}
-
-checkconfig() {
-	/usr/bin/rspamadm configtest -c /etc/rspamd/rspamd.sysvinit.conf > /dev/null \
-		|| return 1
-}
-
-start() {
-	checkconfig || return 1
-	ebegin "Starting ${SVCNAME}"
-	
-	mkdir -m0750 -p $RUNDIR
-	chown rspamd:rspamd $RUNDIR
-	chmod g+s $RUNDIR
-	rm -f $RUNDIR/$SVCNAME.sock
-	
-	start-stop-daemon --start --quiet --pidfile $PIDFILE -u rspamd -g rspamd \
-						--exec /usr/bin/rspamd
-	eend $?
-}
-
-stop() {
-	if [ "${RC_CMD}" = "restart" ] ; then
-		checkconfig || return 1
-	fi
-
-	ebegin "Stopping ${SVCNAME}"
-	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE \
-						--exec /usr/bin/rspamd
-	eend $?
-}
-
-reload() {
-	checkconfig || return 1
-	ebegin "Reloading ${SVCNAME}"
-	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE \
-						--exec /usr/bin/rspamd
-	eend $?
-}

diff --git a/mail-filter/rspamd/rspamd-1.1.3.ebuild b/mail-filter/rspamd/rspamd-1.1.3.ebuild
deleted file mode 100644
index 5656b03..0000000
--- a/mail-filter/rspamd/rspamd-1.1.3.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit cmake-utils user
-
-DESCRIPTION="Rapid spam filtering system"
-SRC_URI="https://rspamd.com/downloads/${P}.tar.xz"
-HOMEPAGE="https://github.com/vstakhov/rspamd"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+jit"
-
-DEPEND="dev-libs/openssl:0
-		jit? (
-			dev-libs/libpcre[jit]
-			dev-lang/luajit:2
-		)
-		!jit? (
-			dev-libs/libpcre[-jit]
-			>=dev-lang/lua-5.1:0
-		)
-		dev-libs/libevent
-		dev-db/sqlite:3
-		dev-libs/glib:2
-		dev-libs/gmime
-		sys-apps/file
-		virtual/libiconv"
-RDEPEND="${DEPEND}"
-
-pkg_setup() {
-	enewgroup rspamd
-	enewuser rspamd -1 -1 /var/lib/rspamd rspamd
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-		-DENABLE_LUAJIT=$(usex jit ON OFF)
-	)
-	cmake-utils_src_configure
-}
-
-src_install() {
-	cmake-utils_src_install
-	newinitd "${FILESDIR}/rspamd.init-r1" rspamd
-
-	dodir /var/lib/rspamd
-	dodir /var/log/rspamd
-
-	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/rspamd.logrotate" rspamd
-}

diff --git a/mail-filter/rspamd/rspamd-1.1.4.ebuild b/mail-filter/rspamd/rspamd-1.1.4.ebuild
deleted file mode 100644
index 5656b03..0000000
--- a/mail-filter/rspamd/rspamd-1.1.4.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit cmake-utils user
-
-DESCRIPTION="Rapid spam filtering system"
-SRC_URI="https://rspamd.com/downloads/${P}.tar.xz"
-HOMEPAGE="https://github.com/vstakhov/rspamd"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+jit"
-
-DEPEND="dev-libs/openssl:0
-		jit? (
-			dev-libs/libpcre[jit]
-			dev-lang/luajit:2
-		)
-		!jit? (
-			dev-libs/libpcre[-jit]
-			>=dev-lang/lua-5.1:0
-		)
-		dev-libs/libevent
-		dev-db/sqlite:3
-		dev-libs/glib:2
-		dev-libs/gmime
-		sys-apps/file
-		virtual/libiconv"
-RDEPEND="${DEPEND}"
-
-pkg_setup() {
-	enewgroup rspamd
-	enewuser rspamd -1 -1 /var/lib/rspamd rspamd
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-		-DENABLE_LUAJIT=$(usex jit ON OFF)
-	)
-	cmake-utils_src_configure
-}
-
-src_install() {
-	cmake-utils_src_install
-	newinitd "${FILESDIR}/rspamd.init-r1" rspamd
-
-	dodir /var/lib/rspamd
-	dodir /var/log/rspamd
-
-	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/rspamd.logrotate" rspamd
-}

diff --git a/mail-filter/rspamd/rspamd-1.2.0.ebuild b/mail-filter/rspamd/rspamd-1.2.0.ebuild
deleted file mode 100644
index 5656b03..0000000
--- a/mail-filter/rspamd/rspamd-1.2.0.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit cmake-utils user
-
-DESCRIPTION="Rapid spam filtering system"
-SRC_URI="https://rspamd.com/downloads/${P}.tar.xz"
-HOMEPAGE="https://github.com/vstakhov/rspamd"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+jit"
-
-DEPEND="dev-libs/openssl:0
-		jit? (
-			dev-libs/libpcre[jit]
-			dev-lang/luajit:2
-		)
-		!jit? (
-			dev-libs/libpcre[-jit]
-			>=dev-lang/lua-5.1:0
-		)
-		dev-libs/libevent
-		dev-db/sqlite:3
-		dev-libs/glib:2
-		dev-libs/gmime
-		sys-apps/file
-		virtual/libiconv"
-RDEPEND="${DEPEND}"
-
-pkg_setup() {
-	enewgroup rspamd
-	enewuser rspamd -1 -1 /var/lib/rspamd rspamd
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-		-DENABLE_LUAJIT=$(usex jit ON OFF)
-	)
-	cmake-utils_src_configure
-}
-
-src_install() {
-	cmake-utils_src_install
-	newinitd "${FILESDIR}/rspamd.init-r1" rspamd
-
-	dodir /var/lib/rspamd
-	dodir /var/log/rspamd
-
-	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/rspamd.logrotate" rspamd
-}

diff --git a/mail-filter/rspamd/rspamd-1.2.1.ebuild b/mail-filter/rspamd/rspamd-1.2.1.ebuild
deleted file mode 100644
index 5656b03..0000000
--- a/mail-filter/rspamd/rspamd-1.2.1.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit cmake-utils user
-
-DESCRIPTION="Rapid spam filtering system"
-SRC_URI="https://rspamd.com/downloads/${P}.tar.xz"
-HOMEPAGE="https://github.com/vstakhov/rspamd"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+jit"
-
-DEPEND="dev-libs/openssl:0
-		jit? (
-			dev-libs/libpcre[jit]
-			dev-lang/luajit:2
-		)
-		!jit? (
-			dev-libs/libpcre[-jit]
-			>=dev-lang/lua-5.1:0
-		)
-		dev-libs/libevent
-		dev-db/sqlite:3
-		dev-libs/glib:2
-		dev-libs/gmime
-		sys-apps/file
-		virtual/libiconv"
-RDEPEND="${DEPEND}"
-
-pkg_setup() {
-	enewgroup rspamd
-	enewuser rspamd -1 -1 /var/lib/rspamd rspamd
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-		-DENABLE_LUAJIT=$(usex jit ON OFF)
-	)
-	cmake-utils_src_configure
-}
-
-src_install() {
-	cmake-utils_src_install
-	newinitd "${FILESDIR}/rspamd.init-r1" rspamd
-
-	dodir /var/lib/rspamd
-	dodir /var/log/rspamd
-
-	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/rspamd.logrotate" rspamd
-}

diff --git a/mail-filter/rspamd/rspamd-1.2.2.ebuild b/mail-filter/rspamd/rspamd-1.2.2.ebuild
deleted file mode 100644
index 5656b03..0000000
--- a/mail-filter/rspamd/rspamd-1.2.2.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit cmake-utils user
-
-DESCRIPTION="Rapid spam filtering system"
-SRC_URI="https://rspamd.com/downloads/${P}.tar.xz"
-HOMEPAGE="https://github.com/vstakhov/rspamd"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+jit"
-
-DEPEND="dev-libs/openssl:0
-		jit? (
-			dev-libs/libpcre[jit]
-			dev-lang/luajit:2
-		)
-		!jit? (
-			dev-libs/libpcre[-jit]
-			>=dev-lang/lua-5.1:0
-		)
-		dev-libs/libevent
-		dev-db/sqlite:3
-		dev-libs/glib:2
-		dev-libs/gmime
-		sys-apps/file
-		virtual/libiconv"
-RDEPEND="${DEPEND}"
-
-pkg_setup() {
-	enewgroup rspamd
-	enewuser rspamd -1 -1 /var/lib/rspamd rspamd
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-		-DENABLE_LUAJIT=$(usex jit ON OFF)
-	)
-	cmake-utils_src_configure
-}
-
-src_install() {
-	cmake-utils_src_install
-	newinitd "${FILESDIR}/rspamd.init-r1" rspamd
-
-	dodir /var/lib/rspamd
-	dodir /var/log/rspamd
-
-	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/rspamd.logrotate" rspamd
-}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2016-09-10 14:56 Dirkjan Ochtman
  0 siblings, 0 replies; 22+ messages in thread
From: Dirkjan Ochtman @ 2016-09-10 14:56 UTC (permalink / raw
  To: gentoo-commits

commit:     052b6bbf6cde1d2808849fffb459c675957dc217
Author:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 10 14:55:44 2016 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Sat Sep 10 14:55:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=052b6bbf

mail-filter/rspamd: version bump to 1.3.5 (fixes bug 593020, bug 592966)

Package-Manager: portage-2.2.28

 mail-filter/rspamd/Manifest             |  1 +
 mail-filter/rspamd/files/rspamd.init-r2 | 50 ++++++++++++++++++++++++
 mail-filter/rspamd/metadata.xml         |  3 ++
 mail-filter/rspamd/rspamd-1.3.5.ebuild  | 68 +++++++++++++++++++++++++++++++++
 4 files changed, 122 insertions(+)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 6c15fef..dd9f39d 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -2,3 +2,4 @@ DIST rspamd-1.2.8.tar.xz 1423888 SHA256 485438d8c38ada1a6e95c9ea1298d2c899d4ec61
 DIST rspamd-1.3.2.tar.xz 1476656 SHA256 283227d8f38fcc4c5d4b913996b52f55370c5445ec6f8dbb550aec2bb2d46c2a SHA512 75a5526852cbd60e0b8f06f9b722a686f3ef59ae2a0f132018465fb9d104ca847d71a5e38343b288149ebc5ba9b4f749ba72551568e338e6509c5d2ac13bd061 WHIRLPOOL 82749f3f2afd3cf3289a6b4862220d2a04d84e0bd59079daa24427b34a754300f8cf0d5e7eea52cba7090cc2c07e005573bd481573f89e1bff59f741889a1ef7
 DIST rspamd-1.3.3.tar.xz 1481836 SHA256 1296d3d0d97226e238c5d5954f58f2154bcbde4ba3ed45647b6b75da7a2e2b17 SHA512 9a1be238678bd9379000d2a7298308f7286ee4b8f1abb8c4f199d16a57183f91d29533533ceda244c382180cbdeb5e16c9b473899d3f0b813c8ea8519f8a7833 WHIRLPOOL 84d521746dc4a17648c82e11df56e3931dc37db413569f46bf8e2163c64b89c23700ee3567f4002863c624180b7efc8781b01d842060e7dc0f678e2ec8712709
 DIST rspamd-1.3.4.tar.xz 1484632 SHA256 64fcabb3dc6767b5dc22c89f968414d1028f34ab8a21e1b22482aace069d527c SHA512 41a3aa9b699ca1e40d229ebc9c3fd41ef07ad99b0badda44481fe4ff3003000069352f58379fa47013f96d98b08430a3c7bea0d97cab4a7e6db17a9084b082d6 WHIRLPOOL ab5a25d673423e15ae77c704345307a555edcfad502d951da46ece04ef220baab056c80acdf898fa4e3748b644a41e9b9ee64b73333c1bebbc5e514be5c0310d
+DIST rspamd-1.3.5.tar.xz 1483044 SHA256 d4413ccfc238c3023e2b8a9441b101a6437f521f333fc9db2dd924d473fee696 SHA512 6d7223c6be6e49296a5228d3d05a5f8dfd4a4002df9d247740bce75f2f652a01d86c30456b8475d08d529d2787aa30191713961ffc82c380c00612cae371b61c WHIRLPOOL 4017484d4653a23b5a987ab0bdd40a709cd5d116dea5c02a767c5cad94bd5399d6319aa8f75e726cec5d0bd7ae9e0722786cacc33963e2f9b8fbdd0fb0986729

diff --git a/mail-filter/rspamd/files/rspamd.init-r2 b/mail-filter/rspamd/files/rspamd.init-r2
new file mode 100644
index 00000000..bf6f9ca
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd.init-r2
@@ -0,0 +1,50 @@
+#!/sbin/openrc-run
+# Copyright 2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+RUNDIR=/var/run/rspamd
+PIDFILE=$RUNDIR/rspamd.pid
+
+depend() {
+	need net
+}
+
+checkconfig() {
+	/usr/bin/rspamadm configtest -c /etc/rspamd/rspamd.sysvinit.conf > /dev/null \
+		|| return 1
+}
+
+start() {
+	checkconfig || return 1
+	ebegin "Starting ${SVCNAME}"
+
+	mkdir -m0750 -p $RUNDIR
+	chown rspamd:rspamd $RUNDIR
+	chmod g+s $RUNDIR
+	rm -f $RUNDIR/$SVCNAME.sock
+
+	start-stop-daemon --start --quiet --pidfile $PIDFILE -u rspamd -g rspamd \
+						--exec /usr/bin/rspamd
+	eend $?
+}
+
+stop() {
+	if [ "${RC_CMD}" = "restart" ] ; then
+		checkconfig || return 1
+	fi
+
+	ebegin "Stopping ${SVCNAME}"
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE \
+						--exec /usr/bin/rspamd
+	eend $?
+}
+
+reload() {
+	checkconfig || return 1
+	ebegin "Reloading ${SVCNAME}"
+	start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE
+	eend $?
+}

diff --git a/mail-filter/rspamd/metadata.xml b/mail-filter/rspamd/metadata.xml
index 99b5040..aee0fd2 100644
--- a/mail-filter/rspamd/metadata.xml
+++ b/mail-filter/rspamd/metadata.xml
@@ -8,4 +8,7 @@
   <upstream>
     <remote-id type="github">vstakhov/rspamd</remote-id>
   </upstream>
+  <use>
+    <flag name="fann">Enable neural network plugin (requires <pkg>sci-mathematics/fann</pkg>).</flag>
+  </use>
 </pkgmetadata>

diff --git a/mail-filter/rspamd/rspamd-1.3.5.ebuild b/mail-filter/rspamd/rspamd-1.3.5.ebuild
new file mode 100644
index 00000000..5179365
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-1.3.5.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils user systemd
+
+DESCRIPTION="Rapid spam filtering system"
+SRC_URI="https://rspamd.com/downloads/${P}.tar.xz"
+HOMEPAGE="https://github.com/vstakhov/rspamd"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="fann +jit"
+
+RDEPEND="dev-libs/openssl:0[-bindist]
+		fann? ( sci-mathematics/fann )
+		jit? (
+			dev-libs/libpcre[jit]
+			dev-lang/luajit:2
+		)
+		!jit? (
+			dev-libs/libpcre[-jit]
+			>=dev-lang/lua-5.1:0
+		)
+		dev-libs/libevent
+		dev-db/sqlite:3
+		dev-libs/glib:2
+		dev-libs/gmime
+		dev-util/ragel
+		sys-apps/file
+		virtual/libiconv"
+DEPEND="dev-util/ragel
+		${RDEPEND}"
+
+pkg_setup() {
+	enewgroup rspamd
+	enewuser rspamd -1 -1 /var/lib/rspamd rspamd
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DCONFDIR=/etc/rspamd
+		-DRUNDIR=/var/run/rspamd
+		-DDBDIR=/var/lib/rspamd
+		-DLOGDIR=/var/log/rspamd
+		-DENABLE_LUAJIT=$(usex jit ON OFF)
+		-DENABLE_FANN=$(usex fann ON OFF)
+	)
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+	newinitd "${FILESDIR}/rspamd.init-r2" rspamd
+
+	dodir /var/lib/rspamd
+	dodir /var/log/rspamd
+
+	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/rspamd.logrotate" rspamd
+
+	systemd_newunit rspamd.service rspamd.service
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2017-06-13 19:52 Dirkjan Ochtman
  0 siblings, 0 replies; 22+ messages in thread
From: Dirkjan Ochtman @ 2017-06-13 19:52 UTC (permalink / raw
  To: gentoo-commits

commit:     80f530d3306caa1346f09605c99b37ce8515eb1a
Author:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 13 19:51:12 2017 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Tue Jun 13 19:52:32 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80f530d3

mail-filter/rspamd: version bump to 1.6.0

Package-Manager: Portage-2.3.5, Repoman-2.3.1

 mail-filter/rspamd/Manifest                        |  1 +
 mail-filter/rspamd/files/rspamd.init-r3            | 50 ---------------
 .../files/{rspamd.init-r4 => rspamd.init-r5}       |  2 +-
 mail-filter/rspamd/rspamd-1.6.0.ebuild             | 75 ++++++++++++++++++++++
 4 files changed, 77 insertions(+), 51 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 315aae6f2cb..3423488ed6c 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -3,3 +3,4 @@ DIST rspamd-1.5.3.tar.xz 1854812 SHA256 a692f7eab27321924c5326efeae809ab2703fdf6
 DIST rspamd-1.5.6.tar.xz 1853052 SHA256 cda2a5b93f0e57b890767514ce00a2660baf9d48627f7367a36fe938ade14f31 SHA512 3735052817ecd12d46505e4657456a01cde6aac25d7bdffaf0c8722458c674edbe89aeb589f338ec9ed22b5455314511fe1f55b5a0be3532761579b4f7b44cfa WHIRLPOOL 2e5acd5a92c0453a4575ad3717809d287b8c7552b9927d2245b451a57b9f722b19e6820f9c5c188cbbdd414a38b95c9e001901438bd4c2796071f5501af1e0c4
 DIST rspamd-1.5.7.tar.gz 2384051 SHA256 73d18b129a072e35c74c9a440abdd0985fa15696d308a5e23736ec007432fd70 SHA512 362f8615795c739d1c869dd48426dadee38924287d82ad725baf0d3f80aa4571db29501d95d1497d3dfef61af39c2c7254f2c9437ee46f453e380f595b5873ca WHIRLPOOL cec77680fd767badf2b8a302372543e4c34a215dbc7e5e3389b7721a1aac82dd2ba7c0d1ee407f61ad2660ccb6917a366a6613af63d7e2d7922693a7ab9af53d
 DIST rspamd-1.5.9.tar.gz 2386813 SHA256 864705c09733257449ffc52740f380c1edeb56bb4be6e0ad0a8ab8c0cdf6cbe6 SHA512 258e266bca592e2f52760019ffa8c319a84c23a53fec984dc803f5ac12f902f2d0978dbc5e35b623eb02ff8e2e7dc00e2cb8efcc0ea9a06b67f7210ae8f42bc3 WHIRLPOOL 667c46268d547c20e5868ae649fb81fb6a6dfb2d92b4a261d479ca74aa6393453037e0557a68d5eb5c1307a28568f2a9cee5af8fe3f8e653c518859043c07f0b
+DIST rspamd-1.6.0.tar.gz 2461626 SHA256 8a4df7115193fce8c8147495ef6b25961acd0f9758a12c6c5f6617f227f7153e SHA512 af6b362fa77e7153285a47d663afcf0a6c5f344a3888eb2d65abbdbc45c6d1745f5af30cc51df472f1da9a8d10b48712e67966be8632dfbcc9e02f2a589182f1 WHIRLPOOL e4e0fce3f02c1cd12b81724fb5a37ede4d6f30673ed639eb6fca7d2ea2922812af8f2bf266cfb1a96db2bd04003c8dd05fe14135cda59c6ec4a9b48e5f5da844

diff --git a/mail-filter/rspamd/files/rspamd.init-r3 b/mail-filter/rspamd/files/rspamd.init-r3
deleted file mode 100644
index 974696b76f5..00000000000
--- a/mail-filter/rspamd/files/rspamd.init-r3
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2015-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_commands="checkconfig"
-extra_started_commands="reload"
-
-RUNDIR=/var/run/rspamd
-PIDFILE=$RUNDIR/rspamd.pid
-
-depend() {
-	need net
-}
-
-checkconfig() {
-	/usr/bin/rspamadm configtest -c /etc/rspamd/rspamd.sysvinit.conf > /dev/null \
-		|| return 1
-}
-
-start() {
-	checkconfig || return 1
-	ebegin "Starting ${SVCNAME}"
-
-	mkdir -m0750 -p $RUNDIR
-	chown rspamd:rspamd $RUNDIR
-	chmod g+s $RUNDIR
-	rm -f $RUNDIR/$SVCNAME.sock
-
-	start-stop-daemon --start --quiet --pidfile $PIDFILE -u rspamd -g rspamd \
-						--exec /usr/bin/rspamd
-	eend $?
-}
-
-stop() {
-	if [ "${RC_CMD}" = "restart" ] ; then
-		checkconfig || return 1
-	fi
-
-	ebegin "Stopping ${SVCNAME}"
-	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE \
-						--exec /usr/bin/rspamd
-	eend $?
-}
-
-reload() {
-	checkconfig || return 1
-	ebegin "Reloading ${SVCNAME}"
-	start-stop-daemon --signal HUP --quiet --pidfile $PIDFILE
-	eend $?
-}

diff --git a/mail-filter/rspamd/files/rspamd.init-r4 b/mail-filter/rspamd/files/rspamd.init-r5
similarity index 92%
rename from mail-filter/rspamd/files/rspamd.init-r4
rename to mail-filter/rspamd/files/rspamd.init-r5
index cb4520f37c4..6d249f3f905 100644
--- a/mail-filter/rspamd/files/rspamd.init-r4
+++ b/mail-filter/rspamd/files/rspamd.init-r5
@@ -13,7 +13,7 @@ depend() {
 }
 
 checkconfig() {
-	/usr/bin/rspamadm configtest -c /etc/rspamd/rspamd.sysvinit.conf > /dev/null \
+	/usr/bin/rspamadm configtest -c /etc/rspamd/rspamd.conf > /dev/null \
 		|| return 1
 }
 

diff --git a/mail-filter/rspamd/rspamd-1.6.0.ebuild b/mail-filter/rspamd/rspamd-1.6.0.ebuild
new file mode 100644
index 00000000000..e00de6280f1
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-1.6.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils pax-utils user systemd
+
+DESCRIPTION="Rapid spam filtering system"
+SRC_URI="https://github.com/vstakhov/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="https://github.com/vstakhov/rspamd"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_x86_ssse3 fann gd jemalloc +jit libressl pcre2"
+
+RDEPEND="!libressl? ( dev-libs/openssl:0=[-bindist] )
+	libressl? ( dev-libs/libressl:0= )
+	fann? ( sci-mathematics/fann )
+	pcre2? ( dev-libs/libpcre2[jit=] )
+	!pcre2? ( dev-libs/libpcre[jit=] )
+	jit? ( dev-lang/luajit:2 )
+	jemalloc? ( dev-libs/jemalloc )
+	dev-libs/libevent
+	dev-db/sqlite:3
+	dev-libs/glib:2
+	<dev-util/ragel-7.0
+	sys-apps/file
+	gd? ( media-libs/gd[jpeg] )
+	dev-libs/icu
+	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )"
+DEPEND="dev-util/ragel
+	${RDEPEND}"
+
+QA_MULTILIB_PATHS="usr/lib/rspamd/.*"
+
+pkg_setup() {
+	enewgroup rspamd
+	enewuser rspamd -1 -1 /var/lib/rspamd rspamd
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DCONFDIR=/etc/rspamd
+		-DRUNDIR=/var/run/rspamd
+		-DDBDIR=/var/lib/rspamd
+		-DLOGDIR=/var/log/rspamd
+		-DENABLE_LUAJIT=$(usex jit ON OFF)
+		-DENABLE_FANN=$(usex fann ON OFF)
+		-DENABLE_PCRE2=$(usex pcre2 ON OFF)
+		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
+		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
+	)
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+	newinitd "${FILESDIR}/rspamd.init-r5" rspamd
+
+	# Remove mprotect for JIT support
+	if use jit; then
+		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-* || die
+	fi
+
+	dodir /var/lib/rspamd
+	dodir /var/log/rspamd
+
+	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/rspamd.logrotate" rspamd
+
+	systemd_newunit rspamd.service rspamd.service
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2018-03-11 14:07 Dirkjan Ochtman
  0 siblings, 0 replies; 22+ messages in thread
From: Dirkjan Ochtman @ 2018-03-11 14:07 UTC (permalink / raw
  To: gentoo-commits

commit:     49f2c10c2df125c6e3afa9edaf80a3d1223e943e
Author:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 11 13:56:25 2018 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Sun Mar 11 14:06:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49f2c10c

mail-filter/rspamd: version bump to 1.6.6 (fixes bug 647978)

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 mail-filter/rspamd/Manifest                        |   1 +
 ...-dont-send-reject-message-after-set-reply.patch | 128 +++++++++++++++++++++
 mail-filter/rspamd/rspamd-1.6.6.ebuild             |  76 ++++++++++++
 3 files changed, 205 insertions(+)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 5eda82e2b6f..94bea3662bb 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1 +1,2 @@
 DIST rspamd-1.6.5.tar.gz 2484271 BLAKE2B 880e862eecd4a082b87bee2ba8c7b17a475efbfe90dbb0cbf34c5ad6c42c80d6ea142f11c7632763d7f9e4155a4521274f2d5a26a77dfbdab9f585bb1e3fff5f SHA512 789abc994cf96a0d88662e14f0e77f95f5c7c7bd1f808ffd64af21cf73cef643b5aee4c1f066d81d04e79d6bb7f72f12095ff08d8515a40bcca23153715fc9f1
+DIST rspamd-1.6.6.tar.gz 2487482 BLAKE2B f18640f64a8c0bcf6077267a1715f0bb096ab18484c24de56a012c42666cdc9f8671237c5336dce7cd47f44f9aba7905ce3723232d53a5b8ddfe143df682bd9b SHA512 14c7144017df69600dbd09541d16dae19d87105b09f95811fc09624b60e89ca68200654e88dea242508afd3c4963ea7cac086abddec8ca1a3d8fc73d7c27e899

diff --git a/mail-filter/rspamd/files/1.6.6-dont-send-reject-message-after-set-reply.patch b/mail-filter/rspamd/files/1.6.6-dont-send-reject-message-after-set-reply.patch
new file mode 100644
index 00000000000..4238c838dfa
--- /dev/null
+++ b/mail-filter/rspamd/files/1.6.6-dont-send-reject-message-after-set-reply.patch
@@ -0,0 +1,128 @@
+From 2bda2989eee893c42ff04f48a904f00a33a7d07a Mon Sep 17 00:00:00 2001
+From: Vsevolod Stakhov <vsevolod@highsecure.ru>
+Date: Tue, 27 Feb 2018 16:37:44 +0000
+Subject: [PATCH] [CritFix] Do not send reject messages after set reply
+
+Libmilter seems to be totally brain damaged:
+https://github.com/freebsd/freebsd/blob/386ddae58459341ec567604707805814a2128a57/contrib/sendmail/libmilter/engine.c#L66
+
+---
+ src/libserver/milter.c | 22 ++++++++++++++++++----
+ 1 file changed, 18 insertions(+), 4 deletions(-)
+
+ Back-ported for rspamd 1.5.6
+
+diff -ur rspamd-1.6.6/src/libserver/milter.c rspamd-1.6.6-badmilter/src/libserver/milter.c
+--- rspamd-1.6.6/src/libserver/milter.c	2018-02-16 13:47:47.000000000 +0000
++++ rspamd-1.6.6-badmilter/src/libserver/milter.c	2018-03-07 16:07:58.591483869 +0000
+@@ -99,6 +99,8 @@
+ 	guint i;
+ 
+ 	if (how & RSPAMD_MILTER_RESET_IO) {
++		msg_debug_milter ("cleanup IO on abort");
++
+ 		DL_FOREACH_SAFE (priv->out_chain, obuf, obuf_tmp) {
+ 			rspamd_milter_obuf_free (obuf);
+ 		}
+@@ -111,8 +113,11 @@
+ 	}
+ 
+ 	if (how & RSPAMD_MILTER_RESET_COMMON) {
++		msg_debug_milter ("cleanup common data on abort");
++
+ 		if (session->message) {
+ 			session->message->len = 0;
++			msg_debug_milter ("cleanup message on abort");
+ 		}
+ 
+ 		if (session->rcpts) {
+@@ -120,30 +125,38 @@
+ 				rspamd_email_address_unref (cur);
+ 			}
+ 
++			msg_debug_milter ("cleanup %d recipients on abort",
++					(gint)session->rcpts->len);
++
+ 			g_ptr_array_free (session->rcpts, TRUE);
+ 			session->rcpts = NULL;
+ 		}
+ 
+ 		if (session->from) {
++			msg_debug_milter ("cleanup from");
+ 			rspamd_email_address_unref (session->from);
+ 			session->from = NULL;
+ 		}
+ 
+ 		if (session->helo) {
++			msg_debug_milter ("cleanup helo");
+ 			session->helo->len = 0;
+ 		}
+ 
+ 		if (session->hostname) {
++			msg_debug_milter ("cleanup hostname");
+ 			session->hostname->len = 0;
+ 		}
+ 
+ 		if (priv->headers) {
++			msg_debug_milter ("cleanup headers");
+ 			g_hash_table_remove_all (priv->headers);
+ 		}
+ 	}
+ 
+ 	if (how & RSPAMD_MILTER_RESET_ADDR) {
+ 		if (session->addr) {
++			msg_debug_milter ("cleanup addr");
+ 			rspamd_inet_address_free (session->addr);
+ 			session->addr = NULL;
+ 		}
+@@ -151,6 +164,7 @@
+ 
+ 	if (how & RSPAMD_MILTER_RESET_MACRO) {
+ 		if (session->macros) {
++			msg_debug_milter ("cleanup macros");
+ 			g_hash_table_unref (session->macros);
+ 			session->macros = NULL;
+ 		}
+@@ -1612,7 +1626,7 @@
+ 		msg_err_milter ("cannot find scan results, tempfail");
+ 		rspamd_milter_send_action (session, RSPAMD_MILTER_TEMPFAIL);
+ 
+-		return;
++		goto cleanup;
+ 	}
+ 
+ 	elt = ucl_object_lookup (results, "action");
+@@ -1621,7 +1635,7 @@
+ 		msg_err_milter ("cannot find action in results, tempfail");
+ 		rspamd_milter_send_action (session, RSPAMD_MILTER_TEMPFAIL);
+ 
+-		return;
++		goto cleanup;
+ 	}
+ 
+ 	rspamd_action_from_str (ucl_object_tostring (elt), &action);
+@@ -1681,7 +1695,6 @@
+ 			}
+ 
+ 			rspamd_milter_set_reply (session, rcode, xcode, reply);
+-			rspamd_milter_send_action (session, RSPAMD_MILTER_REJECT);
+ 		}
+ 		break;
+ 	case METRIC_ACTION_SOFT_REJECT:
+@@ -1696,7 +1709,6 @@
+ 		}
+ 
+ 		rspamd_milter_set_reply (session, rcode, xcode, reply);
+-		rspamd_milter_send_action (session, RSPAMD_MILTER_REJECT);
+ 		break;
+ 
+ 	case METRIC_ACTION_REWRITE_SUBJECT:
+@@ -1741,6 +1753,8 @@
+ 	rspamd_fstring_free (rcode);
+ 	rspamd_fstring_free (xcode);
+ 	rspamd_fstring_free (reply);
++
++	rspamd_milter_session_reset (session, RSPAMD_MILTER_RESET_ABORT);
+ }
+ 
+ void

diff --git a/mail-filter/rspamd/rspamd-1.6.6.ebuild b/mail-filter/rspamd/rspamd-1.6.6.ebuild
new file mode 100644
index 00000000000..8ded37e068e
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-1.6.6.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils pax-utils user systemd
+
+DESCRIPTION="Rapid spam filtering system"
+SRC_URI="https://github.com/vstakhov/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="https://github.com/vstakhov/rspamd"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_x86_ssse3 fann gd jemalloc +jit libressl pcre2"
+
+RDEPEND="!libressl? ( dev-libs/openssl:0=[-bindist] )
+	libressl? ( dev-libs/libressl:0= )
+	fann? ( sci-mathematics/fann )
+	pcre2? ( dev-libs/libpcre2[jit=] )
+	!pcre2? ( dev-libs/libpcre[jit=] )
+	jit? ( dev-lang/luajit:2 )
+	jemalloc? ( dev-libs/jemalloc )
+	dev-libs/libevent
+	dev-db/sqlite:3
+	dev-libs/glib:2
+	<dev-util/ragel-7.0
+	sys-apps/file
+	gd? ( media-libs/gd[jpeg] )
+	dev-libs/icu
+	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )"
+DEPEND="dev-util/ragel
+	${RDEPEND}"
+
+QA_MULTILIB_PATHS="usr/lib/rspamd/.*"
+PATCHES=( "${FILESDIR}/${PV}-dont-send-reject-message-after-set-reply.patch" )
+
+pkg_setup() {
+	enewgroup rspamd
+	enewuser rspamd -1 -1 /var/lib/rspamd rspamd
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DCONFDIR=/etc/rspamd
+		-DRUNDIR=/var/run/rspamd
+		-DDBDIR=/var/lib/rspamd
+		-DLOGDIR=/var/log/rspamd
+		-DENABLE_LUAJIT=$(usex jit ON OFF)
+		-DENABLE_FANN=$(usex fann ON OFF)
+		-DENABLE_PCRE2=$(usex pcre2 ON OFF)
+		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
+		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
+	)
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+	newinitd "${FILESDIR}/rspamd.init-r5" rspamd
+
+	# Remove mprotect for JIT support
+	if use jit; then
+		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-* || die
+	fi
+
+	dodir /var/lib/rspamd
+	dodir /var/log/rspamd
+
+	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/rspamd.logrotate" rspamd
+
+	systemd_newunit rspamd.service rspamd.service
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2019-11-04 11:22 Dirkjan Ochtman
  0 siblings, 0 replies; 22+ messages in thread
From: Dirkjan Ochtman @ 2019-11-04 11:22 UTC (permalink / raw
  To: gentoo-commits

commit:     b481cbb2f97f7453c04f9a94d98bd8c3e17e3cb8
Author:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  4 11:22:17 2019 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Mon Nov  4 11:22:30 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b481cbb2

mail-filter/rspamd: version bump to 2.1

Closes: https://bugs.gentoo.org/698902
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Dirkjan Ochtman <djc <AT> gentoo.org>

 mail-filter/rspamd/Manifest                        |  1 +
 mail-filter/rspamd/files/rspamd-r7.init            | 55 ++++++++++++++++++++++
 .../{rspamd-9999.ebuild => rspamd-2.1.ebuild}      | 12 ++---
 mail-filter/rspamd/rspamd-9999.ebuild              | 12 ++---
 4 files changed, 66 insertions(+), 14 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 32757315930..b4131458c7c 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,3 +1,4 @@
 DIST rspamd-1.8.3.tar.gz 4319623 BLAKE2B b7fdd6791df5899710bb1d696a9b94d1840335b6a34d6cdeebc2b5eebe9f4e5b6da3e90ed9ab5e3945aab7ef33f54f048024b51c3de37db1a083ad89c656b456 SHA512 5e20255466fe2cd4842196fb2138732b59911de655e73d9cc13009b5179b84e5a2060083961b35fe40b9f550f8e18067056415a1d803fac54fac000070024c01
 DIST rspamd-1.9.0.tar.gz 4402395 BLAKE2B 11f90fc232496b493296ef0fb9ff4118ac11863528cd6a52bcae6adbdc09ce86453bb39df35714702fcd5c6a535007ec402a580bd735abbddeeb154ff8807219 SHA512 fee2a60c10fbab087b12d9188974a0c47417a9894308f66980eb6311496b16661194d858d1e522d2d524b3e359f2f3ad88535421d1dc05be26414b5a346afec6
 DIST rspamd-1.9.4.tar.gz 4476230 BLAKE2B e4866fb8fd97210e77b75d948ae97f038eccc33ec9f6214693579e5d84210c87ff9258204f466ffe6bea780159d24d819aaf393a06dbf2785659a784e4f4e8b6 SHA512 3acecec6adb91580ac2ad96419fdc9588b120ec5a3b4a44135fc5a3e7c15f2dbc99963a8337f9effb9423846489545a55d89d1849c5ba62d8cd91dc67c32d8dc
+DIST rspamd-2.1.tar.gz 4232297 BLAKE2B 4685fa404e5a66d2295da57ece8ce1830507b3464c5136952dbb85847a5002c9c45c4f5430d0d60bc199f3aeafde7abf3ac218451f1609b81a5edfd4d0394588 SHA512 7ecd42e9196ccad29a18bb3e6153fd13d3564c1630c4ec88c712d180f789ad2c36755bfeff65e8dd82737debfb5530a6ec4eb401b49dd82b9eb1dbdea991f84f

diff --git a/mail-filter/rspamd/files/rspamd-r7.init b/mail-filter/rspamd/files/rspamd-r7.init
new file mode 100644
index 00000000000..311fde9d637
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-r7.init
@@ -0,0 +1,55 @@
+#!/sbin/openrc-run
+# Copyright 2015-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+RSPAMD_CONFIGFILE=${RSPAMD_CONFIGFILE:-"/etc/rspamd/rspamd.conf"}
+RSPAMD_GROUP=${RSPAMD_GROUP:-rspamd}
+RSPAMD_OPTS=${RSPAMD_OPTS:-""}
+RSPAMD_PIDFILE=${RSPAMD_PIDFILE:-"/run/rspamd.pid"}
+RSPAMD_USER=${RSPAMD_USER:-rspamd}
+
+command="/usr/bin/rspamd"
+command_rspamadm="/usr/bin/rspamadm"
+command_args="${RSPAMD_OPTS} -c \"${RSPAMD_CONFIGFILE}\" -u ${RSPAMD_USER} -g ${RSPAMD_GROUP} --pid \"${RSPAMD_PIDFILE}\""
+start_stop_daemon_args=${RSPAMD_SSDARGS:-"--wait 1000"}
+pidfile="${RSPAMD_PIDFILE}"
+retry=${RSPAMD_TERMTIMEOUT:-"TERM/60/KILL/5"}
+
+required_files="${RSPAMD_CONFIGFILE}"
+
+description="Rapid spam filtering system"
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+description_checkconfig="Validate rspamd's configuration"
+description_reload="Sends rspamd a signal to reload its configuration"
+
+depend() {
+	before mta
+	use dns redis
+}
+
+checkconfig() {
+	${command_rspamadm} configtest 1>/dev/null || return 1
+}
+
+reload() {
+	checkconfig || return 1
+
+	ebegin "Reloading ${SVCNAME}"
+	start-stop-daemon --signal HUP --pidfile "${pidfile}"
+	eend $?
+}
+
+start_pre() {
+	if [ "${RC_CMD}" != "restart" ]; then
+		checkconfig || return 1
+	fi
+}
+
+stop_pre() {
+	if [ "${RC_CMD}" = "restart" ]; then
+		checkconfig || return 1
+	fi
+}

diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-2.1.ebuild
similarity index 88%
copy from mail-filter/rspamd/rspamd-9999.ebuild
copy to mail-filter/rspamd/rspamd-2.1.ebuild
index 2000be8f549..a44b355c466 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-2.1.ebuild
@@ -17,18 +17,18 @@ DESCRIPTION="Rapid spam filtering system"
 HOMEPAGE="https://github.com/vstakhov/rspamd"
 LICENSE="Apache-2.0"
 SLOT="0"
-IUSE="cpu_flags_x86_ssse3 gd jemalloc +jit libressl pcre2 +torch"
-REQUIRED_USE="torch? ( jit )"
+IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit libressl pcre2"
 
 RDEPEND="dev-db/sqlite:3
 	dev-libs/glib:2
 	dev-libs/icu:=
-	dev-libs/libevent:=
+	dev-libs/libev
 	net-libs/libnsl
 	sys-apps/file
 	dev-util/ragel
+	dev-libs/libsodium
+	blas? ( sci-libs/openblas )
 	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
-	gd? ( media-libs/gd[jpeg] )
 	jemalloc? ( dev-libs/jemalloc )
 	jit? ( dev-lang/luajit:2 )
 	!libressl? ( dev-libs/openssl:0=[-bindist] )
@@ -57,11 +57,9 @@ src_configure() {
 		-DDBDIR=/var/lib/rspamd
 		-DLOGDIR=/var/log/rspamd
 		-DENABLE_LUAJIT=$(usex jit ON OFF)
-		-DENABLE_GD=$(usex gd ON OFF)
 		-DENABLE_PCRE2=$(usex pcre2 ON OFF)
 		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
 		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
-		-DENABLE_TORCH=$(usex torch ON OFF)
 	)
 	cmake-utils_src_configure
 }
@@ -74,7 +72,7 @@ src_install() {
 	cmake-utils_src_install
 
 	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r6.init" rspamd
+	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
 	systemd_newunit rspamd.service rspamd.service
 
 	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf

diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-9999.ebuild
index 2000be8f549..a44b355c466 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.ebuild
@@ -17,18 +17,18 @@ DESCRIPTION="Rapid spam filtering system"
 HOMEPAGE="https://github.com/vstakhov/rspamd"
 LICENSE="Apache-2.0"
 SLOT="0"
-IUSE="cpu_flags_x86_ssse3 gd jemalloc +jit libressl pcre2 +torch"
-REQUIRED_USE="torch? ( jit )"
+IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit libressl pcre2"
 
 RDEPEND="dev-db/sqlite:3
 	dev-libs/glib:2
 	dev-libs/icu:=
-	dev-libs/libevent:=
+	dev-libs/libev
 	net-libs/libnsl
 	sys-apps/file
 	dev-util/ragel
+	dev-libs/libsodium
+	blas? ( sci-libs/openblas )
 	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
-	gd? ( media-libs/gd[jpeg] )
 	jemalloc? ( dev-libs/jemalloc )
 	jit? ( dev-lang/luajit:2 )
 	!libressl? ( dev-libs/openssl:0=[-bindist] )
@@ -57,11 +57,9 @@ src_configure() {
 		-DDBDIR=/var/lib/rspamd
 		-DLOGDIR=/var/log/rspamd
 		-DENABLE_LUAJIT=$(usex jit ON OFF)
-		-DENABLE_GD=$(usex gd ON OFF)
 		-DENABLE_PCRE2=$(usex pcre2 ON OFF)
 		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
 		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
-		-DENABLE_TORCH=$(usex torch ON OFF)
 	)
 	cmake-utils_src_configure
 }
@@ -74,7 +72,7 @@ src_install() {
 	cmake-utils_src_install
 
 	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r6.init" rspamd
+	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
 	systemd_newunit rspamd.service rspamd.service
 
 	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2019-12-14  8:41 Joonas Niilola
  0 siblings, 0 replies; 22+ messages in thread
From: Joonas Niilola @ 2019-12-14  8:41 UTC (permalink / raw
  To: gentoo-commits

commit:     3082d47d25fdb359e720effd81a1ba6c408d9920
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Fri Dec  6 15:04:38 2019 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Dec 14 08:41:37 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3082d47d

mail-filter/rspamd: clean old versions

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

 mail-filter/rspamd/Manifest             |  3 -
 mail-filter/rspamd/files/rspamd-r6.init | 55 ------------------
 mail-filter/rspamd/metadata.xml         |  2 -
 mail-filter/rspamd/rspamd-1.8.3.ebuild  | 98 ---------------------------------
 mail-filter/rspamd/rspamd-1.9.0.ebuild  | 96 --------------------------------
 mail-filter/rspamd/rspamd-1.9.4.ebuild  | 89 ------------------------------
 6 files changed, 343 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index e822eb9baa8..879828213cd 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,5 +1,2 @@
-DIST rspamd-1.8.3.tar.gz 4319623 BLAKE2B b7fdd6791df5899710bb1d696a9b94d1840335b6a34d6cdeebc2b5eebe9f4e5b6da3e90ed9ab5e3945aab7ef33f54f048024b51c3de37db1a083ad89c656b456 SHA512 5e20255466fe2cd4842196fb2138732b59911de655e73d9cc13009b5179b84e5a2060083961b35fe40b9f550f8e18067056415a1d803fac54fac000070024c01
-DIST rspamd-1.9.0.tar.gz 4402395 BLAKE2B 11f90fc232496b493296ef0fb9ff4118ac11863528cd6a52bcae6adbdc09ce86453bb39df35714702fcd5c6a535007ec402a580bd735abbddeeb154ff8807219 SHA512 fee2a60c10fbab087b12d9188974a0c47417a9894308f66980eb6311496b16661194d858d1e522d2d524b3e359f2f3ad88535421d1dc05be26414b5a346afec6
-DIST rspamd-1.9.4.tar.gz 4476230 BLAKE2B e4866fb8fd97210e77b75d948ae97f038eccc33ec9f6214693579e5d84210c87ff9258204f466ffe6bea780159d24d819aaf393a06dbf2785659a784e4f4e8b6 SHA512 3acecec6adb91580ac2ad96419fdc9588b120ec5a3b4a44135fc5a3e7c15f2dbc99963a8337f9effb9423846489545a55d89d1849c5ba62d8cd91dc67c32d8dc
 DIST rspamd-2.1.tar.gz 4232297 BLAKE2B 4685fa404e5a66d2295da57ece8ce1830507b3464c5136952dbb85847a5002c9c45c4f5430d0d60bc199f3aeafde7abf3ac218451f1609b81a5edfd4d0394588 SHA512 7ecd42e9196ccad29a18bb3e6153fd13d3564c1630c4ec88c712d180f789ad2c36755bfeff65e8dd82737debfb5530a6ec4eb401b49dd82b9eb1dbdea991f84f
 DIST rspamd-2.2.tar.gz 4257574 BLAKE2B 3717736ecefea49cfc9e8bf312bdeafa8650dfe1b0a4410d98693add30c77cb054c7620ecc421edd69a2d8bfc1bcb02183951069b15774a588359da8bfb26ac9 SHA512 e62367b9d663a005686e3eef216a7913c6050125e96582e2a58ef459e14512c1bcf09108050ff8ef524ba5e7a3c78559805353a25510654d8764f985757b32fe

diff --git a/mail-filter/rspamd/files/rspamd-r6.init b/mail-filter/rspamd/files/rspamd-r6.init
deleted file mode 100644
index 8c31fd7d027..00000000000
--- a/mail-filter/rspamd/files/rspamd-r6.init
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2015-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-RSPAMD_CONFIGFILE=${RSPAMD_CONFIGFILE:-"/etc/rspamd/rspamd.conf"}
-RSPAMD_GROUP=${RSPAMD_GROUP:-rspamd}
-RSPAMD_OPTS=${RSPAMD_OPTS:-""}
-RSPAMD_PIDFILE=${RSPAMD_PIDFILE:-"/run/rspamd.pid"}
-RSPAMD_USER=${RSPAMD_USER:-rspamd}
-
-command="/usr/bin/rspamd"
-command_args="${RSPAMD_OPTS} -c \"${RSPAMD_CONFIGFILE}\" -u ${RSPAMD_USER} -g ${RSPAMD_GROUP} --pid \"${RSPAMD_PIDFILE}\""
-start_stop_daemon_args=${RSPAMD_SSDARGS:-"--wait 1000"}
-pidfile="${RSPAMD_PIDFILE}"
-retry=${RSPAMD_TERMTIMEOUT:-"TERM/60/KILL/5"}
-
-required_files="${RSPAMD_CONFIGFILE}"
-
-description="Rapid spam filtering system"
-
-extra_commands="checkconfig"
-extra_started_commands="reload"
-
-description_checkconfig="Validate rspamd's configuration"
-description_reload="Sends rspamd a signal to reload its configuration"
-
-depend() {
-	before mta
-	use dns redis
-}
-
-checkconfig() {
-	${command} -c "${RSPAMD_CONFIGFILE}" -u ${RSPAMD_USER} -g ${RSPAMD_GROUP} -t 1>/dev/null \
-		|| return 1
-}
-
-reload() {
-	checkconfig || return 1
-
-	ebegin "Reloading ${SVCNAME}"
-	start-stop-daemon --signal HUP --pidfile "${pidfile}"
-	eend $?
-}
-
-start_pre() {
-	if [ "${RC_CMD}" != "restart" ]; then
-		checkconfig || return 1
-	fi
-}
-
-stop_pre() {
-	if [ "${RC_CMD}" = "restart" ]; then
-		checkconfig || return 1
-	fi
-}

diff --git a/mail-filter/rspamd/metadata.xml b/mail-filter/rspamd/metadata.xml
index 2b4ad4e2b87..140755872e0 100644
--- a/mail-filter/rspamd/metadata.xml
+++ b/mail-filter/rspamd/metadata.xml
@@ -17,8 +17,6 @@
     <remote-id type="github">vstakhov/rspamd</remote-id>
   </upstream>
   <use>
-    <flag name="fann">Enable neural network plugin (requires <pkg>sci-mathematics/fann</pkg>).</flag>
     <flag name="pcre2">Use dev-libs/libpcre2</flag>
-    <flag name="torch">Enable torch support. This is required for the neural module</flag>
   </use>
 </pkgmetadata>

diff --git a/mail-filter/rspamd/rspamd-1.8.3.ebuild b/mail-filter/rspamd/rspamd-1.8.3.ebuild
deleted file mode 100644
index 64cb537424f..00000000000
--- a/mail-filter/rspamd/rspamd-1.8.3.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-utils pax-utils systemd tmpfiles user
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/vstakhov/rspamd.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/vstakhov/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~amd64 ~x86"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="https://github.com/vstakhov/rspamd"
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="cpu_flags_x86_ssse3 fann gd jemalloc +jit libressl pcre2 +torch"
-REQUIRED_USE="torch? ( jit )"
-
-RDEPEND="dev-db/sqlite:3
-	dev-libs/glib:2
-	dev-libs/icu:=
-	dev-libs/libevent:=
-	net-libs/libnsl
-	sys-apps/file
-	dev-util/ragel
-	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
-	fann? ( sci-mathematics/fann )
-	gd? ( media-libs/gd[jpeg] )
-	jemalloc? ( dev-libs/jemalloc )
-	jit? ( dev-lang/luajit:2 )
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	pcre2? ( dev-libs/libpcre2[jit=] )
-	!pcre2? ( dev-libs/libpcre[jit=] )"
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
-	enewgroup rspamd
-	enewuser rspamd -1 -1 /var/lib/rspamd rspamd
-}
-
-src_prepare() {
-	cmake-utils_src_prepare
-
-	sed -i -e 's/User=_rspamd/User=rspamd/g' \
-		rspamd.service \
-		|| die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-		-DENABLE_LUAJIT=$(usex jit ON OFF)
-		-DENABLE_FANN=$(usex fann ON OFF)
-		-DENABLE_GD=$(usex gd ON OFF)
-		-DENABLE_PCRE2=$(usex pcre2 ON OFF)
-		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
-		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
-		-DENABLE_TORCH=$(usex torch ON OFF)
-	)
-	cmake-utils_src_configure
-}
-
-src_test() {
-	cmake-utils_src_test
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r6.init" rspamd
-	systemd_newunit rspamd.service rspamd.service
-
-	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
-	# Remove mprotect for JIT support
-	if use jit; then
-		pax-mark m "${ED%/}"/usr/bin/rspamd-* "${ED%/}"/usr/bin/rspamadm-*
-	fi
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
-
-	diropts -o rspamd -g rspamd
-	keepdir /var/{lib,log}/rspamd
-}
-
-pkg_postinst() {
-	tmpfiles_process "${PN}.conf"
-}

diff --git a/mail-filter/rspamd/rspamd-1.9.0.ebuild b/mail-filter/rspamd/rspamd-1.9.0.ebuild
deleted file mode 100644
index 2000be8f549..00000000000
--- a/mail-filter/rspamd/rspamd-1.9.0.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-utils pax-utils systemd tmpfiles user
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/vstakhov/rspamd.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/vstakhov/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~amd64 ~x86"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="https://github.com/vstakhov/rspamd"
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="cpu_flags_x86_ssse3 gd jemalloc +jit libressl pcre2 +torch"
-REQUIRED_USE="torch? ( jit )"
-
-RDEPEND="dev-db/sqlite:3
-	dev-libs/glib:2
-	dev-libs/icu:=
-	dev-libs/libevent:=
-	net-libs/libnsl
-	sys-apps/file
-	dev-util/ragel
-	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
-	gd? ( media-libs/gd[jpeg] )
-	jemalloc? ( dev-libs/jemalloc )
-	jit? ( dev-lang/luajit:2 )
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	pcre2? ( dev-libs/libpcre2[jit=] )
-	!pcre2? ( dev-libs/libpcre[jit=] )"
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
-	enewgroup rspamd
-	enewuser rspamd -1 -1 /var/lib/rspamd rspamd
-}
-
-src_prepare() {
-	cmake-utils_src_prepare
-
-	sed -i -e 's/User=_rspamd/User=rspamd/g' \
-		rspamd.service \
-		|| die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-		-DENABLE_LUAJIT=$(usex jit ON OFF)
-		-DENABLE_GD=$(usex gd ON OFF)
-		-DENABLE_PCRE2=$(usex pcre2 ON OFF)
-		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
-		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
-		-DENABLE_TORCH=$(usex torch ON OFF)
-	)
-	cmake-utils_src_configure
-}
-
-src_test() {
-	cmake-utils_src_test
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r6.init" rspamd
-	systemd_newunit rspamd.service rspamd.service
-
-	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
-	# Remove mprotect for JIT support
-	if use jit; then
-		pax-mark m "${ED%/}"/usr/bin/rspamd-* "${ED%/}"/usr/bin/rspamadm-*
-	fi
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
-
-	diropts -o rspamd -g rspamd
-	keepdir /var/{lib,log}/rspamd
-}
-
-pkg_postinst() {
-	tmpfiles_process "${PN}.conf"
-}

diff --git a/mail-filter/rspamd/rspamd-1.9.4.ebuild b/mail-filter/rspamd/rspamd-1.9.4.ebuild
deleted file mode 100644
index 47cfb7f44f9..00000000000
--- a/mail-filter/rspamd/rspamd-1.9.4.ebuild
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-utils pax-utils systemd tmpfiles user
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/vstakhov/rspamd.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/vstakhov/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~amd64 ~x86"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="https://github.com/vstakhov/rspamd"
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="cpu_flags_x86_ssse3 gd jemalloc +jit libressl pcre2 +torch"
-REQUIRED_USE="torch? ( jit )"
-
-RDEPEND="dev-db/sqlite:3
-	dev-libs/glib:2
-	dev-libs/icu:=
-	dev-libs/libevent:=
-	net-libs/libnsl
-	sys-apps/file
-	dev-util/ragel
-	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
-	gd? ( media-libs/gd[jpeg] )
-	jemalloc? ( dev-libs/jemalloc )
-	jit? ( dev-lang/luajit:2 )
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	pcre2? ( dev-libs/libpcre2[jit=] )
-	!pcre2? ( dev-libs/libpcre[jit=] )"
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
-	enewgroup rspamd
-	enewuser rspamd -1 -1 /var/lib/rspamd rspamd
-}
-
-src_prepare() {
-	cmake-utils_src_prepare
-	sed -i -e 's/User=_rspamd/User=rspamd/g' rspamd.service || die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR="${EPREFIX}/etc/rspamd"
-		-DRUNDIR="${EPREFIX}/var/run/rspamd"
-		-DDBDIR="${EPREFIX}/var/lib/rspamd"
-		-DLOGDIR="${EPREFIX}/var/log/rspamd"
-		-DENABLE_LUAJIT=$(usex jit ON OFF)
-		-DENABLE_GD=$(usex gd ON OFF)
-		-DENABLE_PCRE2=$(usex pcre2 ON OFF)
-		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
-		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
-		-DENABLE_TORCH=$(usex torch ON OFF)
-	)
-	cmake-utils_src_configure
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r6.init" rspamd
-	systemd_newunit rspamd.service rspamd.service
-
-	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
-	# Remove mprotect for JIT support
-	if use jit; then
-		pax-mark m "${ED%/}"/usr/bin/rspamd-* "${ED%/}"/usr/bin/rspamadm-*
-	fi
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
-
-	diropts -o rspamd -g rspamd
-	keepdir /var/{lib,log}/rspamd
-}
-
-pkg_postinst() {
-	tmpfiles_process "${PN}.conf"
-}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2020-02-24  5:55 Joonas Niilola
  0 siblings, 0 replies; 22+ messages in thread
From: Joonas Niilola @ 2020-02-24  5:55 UTC (permalink / raw
  To: gentoo-commits

commit:     97d6eb42bee13f4495bf411d9dacbef05a733607
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Tue Feb  4 18:52:38 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Feb 24 05:19:45 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97d6eb42

mail-filter/rspamd: fix hyperscan support on i386

The patch is taken from upstream.
https://github.com/rspamd/rspamd/commit/92e62855a64d1f7f0e52720399f8aa31bdcb0983

Closes: https://bugs.gentoo.org/703004
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/14572
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 mail-filter/rspamd/files/rspamd-2.2-i386-hyperscan.patch | 15 +++++++++++++++
 mail-filter/rspamd/rspamd-2.2.ebuild                     |  2 ++
 2 files changed, 17 insertions(+)

diff --git a/mail-filter/rspamd/files/rspamd-2.2-i386-hyperscan.patch b/mail-filter/rspamd/files/rspamd-2.2-i386-hyperscan.patch
new file mode 100644
index 00000000000..578d3da7fa3
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-2.2-i386-hyperscan.patch
@@ -0,0 +1,15 @@
+diff --git a/cmake/Hyperscan.cmake b/cmake/Hyperscan.cmake
+index 3dd774511..b8f83a3bb 100644
+--- a/cmake/Hyperscan.cmake
++++ b/cmake/Hyperscan.cmake
+@@ -1,8 +1,8 @@
+ option (ENABLE_HYPERSCAN    "Enable hyperscan for fast regexp processing [default: OFF]" OFF)
+ 
+ if (ENABLE_HYPERSCAN MATCHES "ON")
+-    if (NOT "${ARCH}" STREQUAL "x86_64")
+-        MESSAGE(FATAL_ERROR "Hyperscan is supported only on x86_64 architecture")
++    if (NOT ("${ARCH}" STREQUAL "x86_64" OR "${ARCH}" STREQUAL "i386"))
++        MESSAGE(FATAL_ERROR "Hyperscan is supported only on x86_64/i386 architectures")
+     endif ()
+     ProcessPackage (HYPERSCAN LIBRARY hs INCLUDE hs.h INCLUDE_SUFFIXES
+             hs include/hs

diff --git a/mail-filter/rspamd/rspamd-2.2.ebuild b/mail-filter/rspamd/rspamd-2.2.ebuild
index 3f29e90b90e..3b7e3129381 100644
--- a/mail-filter/rspamd/rspamd-2.2.ebuild
+++ b/mail-filter/rspamd/rspamd-2.2.ebuild
@@ -41,6 +41,8 @@ RDEPEND="
 	!pcre2? ( dev-libs/libpcre[jit=] )"
 DEPEND="${RDEPEND}"
 
+PATCHES=( "${FILESDIR}/${P}-i386-hyperscan.patch" )
+
 src_prepare() {
 	cmake_src_prepare
 


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2020-04-04  8:06 Joonas Niilola
  0 siblings, 0 replies; 22+ messages in thread
From: Joonas Niilola @ 2020-04-04  8:06 UTC (permalink / raw
  To: gentoo-commits

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


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2020-10-08 19:41 Sam James
  0 siblings, 0 replies; 22+ messages in thread
From: Sam James @ 2020-10-08 19:41 UTC (permalink / raw
  To: gentoo-commits

commit:     6323b87561e9cea97fa219c349485e4e2fc8a9b3
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Thu Oct  8 18:34:52 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct  8 19:39:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6323b875

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 <AT> atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/17852
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../rspamd/files/rspamd-2.6-unbundle-hiredis.patch | 93 ----------------------
 .../{rspamd-2.6.ebuild => rspamd-2.6-r1.ebuild}    |  4 +-
 mail-filter/rspamd/rspamd-9999.ebuild              |  4 +-
 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 875009da41a..00000000000
--- 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
similarity index 95%
rename from mail-filter/rspamd/rspamd-2.6.ebuild
rename to mail-filter/rspamd/rspamd-2.6-r1.ebuild
index 4c166ee4b01..1488b0696d2 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 4c166ee4b01..1488b0696d2 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 \


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2021-08-22  2:50 Sam James
  0 siblings, 0 replies; 22+ messages in thread
From: Sam James @ 2021-08-22  2:50 UTC (permalink / raw
  To: gentoo-commits

commit:     74663b22b297f2f0e61d5bfb6da20258969a5f83
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Sat Aug 21 21:41:17 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 22 02:49:03 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74663b22

mail-filter/rspamd: drop 2.6-r102

Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/22070
Signed-off-by: Sam James <sam <AT> gentoo.org>

 mail-filter/rspamd/Manifest                        |   1 -
 .../files/rspamd-2.6-cmake-lua-version.patch       |  44 -------
 .../rspamd/files/rspamd-2.6-unbundle-zstd.patch    | 128 ---------------------
 mail-filter/rspamd/rspamd-2.6-r102.ebuild          | 115 ------------------
 4 files changed, 288 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 48c11b72f36..fa7fefdafd2 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,3 +1,2 @@
-DIST rspamd-2.6.tar.gz 5079444 BLAKE2B acb9d9471d0bb457da33b4d23e3c75ef87ea26a47e6c731bfd5fbbfe28567244e2bc72fd25ca3408db0928dab4e4ab66596e38cf3eff7cb9690eec59d3b62372 SHA512 79e4c1aa763aef753c8d7b2a941ed92b384e96c25e6d1b3bd1321c5acc0ecb934d033a3bf19cb94c89809fd92edec25192cffe97de9e5251681e1a71216b734a
 DIST rspamd-2.7.tar.gz 5126227 BLAKE2B 70f57dba6ac9abe93d735d42e84bd17a1797035322029577a8e4376409bcee5345d4624925d3dd071bddce038858ebfdce8ee4f87f81b1fc8b1f71ad14e85930 SHA512 8779771baf85ef6ca1d7d2180429072ab1547ab834b073ee9222dcc6494efdd0a23f5e7ac52a777c23fd89296769f5b6f182593e714097c6f11ca7c9165e4ba7
 DIST rspamd-3.0.tar.gz 5535659 BLAKE2B 605ac59b947b49efb026e04d153df5fc0d56c65712def3f2c54a949db32b8534e634d172a1899cc08e98e0a9da839fc00f0f569dc8c52a743f38bd71b8abaeaa SHA512 1ea6f9ffe58b7f280dbd31e39db6412ebeddda634ca8a669fa5bff2951d17123a5d4a09ec0f366c6b0c0b585f868e646fd49e4d45bd451408675b927ec2557c4

diff --git a/mail-filter/rspamd/files/rspamd-2.6-cmake-lua-version.patch b/mail-filter/rspamd/files/rspamd-2.6-cmake-lua-version.patch
deleted file mode 100644
index 141b13dfa8a..00000000000
--- a/mail-filter/rspamd/files/rspamd-2.6-cmake-lua-version.patch
+++ /dev/null
@@ -1,44 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -139,40 +139,8 @@
- ELSE(ENABLE_LUAJIT MATCHES "ON")
- 
- 	ProcessPackage(LIBLUA LIBRARY	"lua"
--			"lua-5.3"
--			INCLUDE lua.h INCLUDE_SUFFIXES
--			"include/lua-5.3"
--			"include/lua5.3"
--			"include/lua53"
--			"include/lua"
- 			ROOT ${LUA_ROOT}
--			MODULES lua53
--			OPTIONAL)
--
--	IF (NOT WITH_LIBLUA)
--		ProcessPackage(LIBLUA LIBRARY	"lua"
--				"lua-5.2"
--				INCLUDE lua.h INCLUDE_SUFFIXES
--				"include/lua-5.2"
--				"include/lua5.2"
--				"include/lua52"
--				"include/lua"
--				ROOT ${LUA_ROOT}
--				MODULES lua52
--				OPTIONAL)
--
--		IF (NOT WITH_LIBLUA)
--			ProcessPackage(LIBLUA LIBRARY	"lua"
--					"lua-5.1"
--					INCLUDE lua.h INCLUDE_SUFFIXES
--					"include/lua-5.1"
--					"include/lua5.1"
--					"include/lua51"
--					"include/lua"
--					ROOT ${LUA_ROOT}
--					MODULES lua51)
--		ENDIF()
--	ENDIF()
-+			MODULES lua)
- ENDIF(ENABLE_LUAJIT MATCHES "ON")
- 
- IF(ENABLE_JEMALLOC MATCHES "ON" AND NOT SANITIZE)

diff --git a/mail-filter/rspamd/files/rspamd-2.6-unbundle-zstd.patch b/mail-filter/rspamd/files/rspamd-2.6-unbundle-zstd.patch
deleted file mode 100644
index 1a7f4453c86..00000000000
--- a/mail-filter/rspamd/files/rspamd-2.6-unbundle-zstd.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 90caf4048..e2e5d182c 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -198,6 +198,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
-@@ -615,7 +617,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 bcb25672e..48ca58e94 100644
---- a/src/client/rspamdclient.c
-+++ b/src/client/rspamdclient.c
-@@ -19,7 +19,7 @@
- #include "libserver/http/http_private.h"
- #include "libserver/protocol_internal.h"
- #include "unix-std.h"
--#include "contrib/zstd/zstd.h"
-+#include <zstd.h>
- 
- #ifdef HAVE_FETCH_H
- #include <fetch.h>
-diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
-index 78e3fc79f..40110c693 100644
---- a/src/libserver/cfg_utils.c
-+++ b/src/libserver/cfg_utils.c
-@@ -36,8 +36,7 @@
- #include "contrib/libottery/ottery.h"
- #include "contrib/fastutf8/fastutf8.h"
- 
--#define ZSTD_STATIC_LINKING_ONLY
--#include "contrib/zstd/zstd.h"
-+#include <zstd.h>
- 
- #ifdef HAVE_OPENSSL
- #include <openssl/rand.h>
-diff --git a/src/libserver/maps/map.c b/src/libserver/maps/map.c
-index 8b9f522b2..8cf03ffd6 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 9d1276064..6f0a66fb8 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 53da0dae6..6538abdbf 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 0787736d5..21474317a 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 4ed8cfab7..5f8808e40 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.26.2
-

diff --git a/mail-filter/rspamd/rspamd-2.6-r102.ebuild b/mail-filter/rspamd/rspamd-2.6-r102.ebuild
deleted file mode 100644
index fc005db11e8..00000000000
--- a/mail-filter/rspamd/rspamd-2.6-r102.ebuild
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LUA_COMPAT=( lua5-{1..3} luajit )
-
-inherit cmake lua-single pax-utils systemd tmpfiles
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="amd64 x86"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="https://rspamd.com https://github.com/rspamd/rspamd"
-LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
-SLOT="0"
-IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit pcre2"
-
-REQUIRED_USE="${LUA_REQUIRED_USE}
-	jit? ( lua_single_target_luajit )"
-
-RDEPEND="${LUA_DEPS}
-	$(lua_gen_cond_dep '
-		dev-lua/LuaBitOp[${LUA_USEDEP}]
-	' lua5-{1,2})
-	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-libs/snowball-stemmer
-	sys-apps/file
-	blas? (
-		virtual/blas
-		virtual/lapack
-	)
-	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
-	jemalloc? ( dev-libs/jemalloc:= )
-	dev-libs/openssl:0=[-bindist(-)]
-	pcre2? ( dev-libs/libpcre2:=[jit=] )
-	!pcre2? ( dev-libs/libpcre[jit=] )"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	dev-util/ragel
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}/rspamd-2.6-cmake-lua-version.patch"
-	"${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-2.6-unbundle-zstd.patch"
-	"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
-)
-
-src_prepare() {
-	cmake_src_prepare
-
-	rm -vrf contrib/{lua-bit,snowball,zstd} || die
-
-	sed -i -e 's/User=_rspamd/User=rspamd/g' \
-		rspamd.service \
-		|| die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-		-DENABLE_BLAS=$(usex blas ON OFF)
-		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
-		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
-		-DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
-		-DENABLE_PCRE2=$(usex pcre2 ON OFF)
-	)
-	cmake_src_configure
-}
-
-src_test() {
-	cmake_src_test
-}
-
-src_install() {
-	cmake_src_install
-
-	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
-	systemd_newunit rspamd.service rspamd.service
-
-	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
-	# Remove mprotect for JIT support
-	if use lua_single_target_luajit; then
-		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
-	fi
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
-
-	diropts -o rspamd -g rspamd
-	keepdir /var/{lib,log}/rspamd
-}
-
-pkg_postinst() {
-	tmpfiles_process "${PN}.conf"
-}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2021-09-07 20:25 Sam James
  0 siblings, 0 replies; 22+ messages in thread
From: Sam James @ 2021-09-07 20:25 UTC (permalink / raw
  To: gentoo-commits

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
 


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2021-09-07 20:25 Sam James
  0 siblings, 0 replies; 22+ messages in thread
From: Sam James @ 2021-09-07 20:25 UTC (permalink / raw
  To: gentoo-commits

commit:     066a3f86023d2329d692558e9f869fc892071d96
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Mon Sep  6 06:42:00 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep  7 20:23:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=066a3f86

mail-filter/rspamd: backport null dereference fix

This Backports patch which fixes possible runtime segfaults caused by
null pointer dereference.

Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/rspamd-3.0-fix-null-dereference.patch    | 46 ++++++++++++++++++++++
 mail-filter/rspamd/rspamd-3.0-r2.ebuild            |  1 +
 2 files changed, 47 insertions(+)

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 00000000000..d355f701a27
--- /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/rspamd-3.0-r2.ebuild b/mail-filter/rspamd/rspamd-3.0-r2.ebuild
index efe18dc57b0..30065ff095b 100644
--- a/mail-filter/rspamd/rspamd-3.0-r2.ebuild
+++ b/mail-filter/rspamd/rspamd-3.0-r2.ebuild
@@ -60,6 +60,7 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}/${P}-cmake-lua-version.patch"
 	"${FILESDIR}/${P}-system-libfmt.patch"
+	"${FILESDIR}/${P}-fix-null-dereference.patch"
 	"${FILESDIR}/${PN}-2.6-unbundle-lua.patch"
 	"${FILESDIR}/${PN}-2.5-unbundle-snowball.patch"
 )


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2022-04-12  8:20 Sam James
  0 siblings, 0 replies; 22+ messages in thread
From: Sam James @ 2022-04-12  8:20 UTC (permalink / raw
  To: gentoo-commits

commit:     eac08ceb58e0fe52a1932960c290e31d3b0638e3
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Wed Apr  6 21:07:02 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 12 08:20:12 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eac08ceb

mail-filter/rspamd: add 3.2

- move dev-cpp/doctest from RDEPEND to DEPEND only
- unbundle dev-lua/lua-argparse
- doctest bug #830624 affects this version as well
- use dev-libs/libpcre2 only, it is upstream default and
  dev-libs/libpcre is eol

Closes: https://bugs.gentoo.org/836673
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 mail-filter/rspamd/Manifest                        |   1 +
 .../rspamd/files/rspamd-3.2-unbundle-lua.patch     |  61 ++++++++++
 mail-filter/rspamd/rspamd-3.2.ebuild               | 128 +++++++++++++++++++++
 3 files changed, 190 insertions(+)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 78c40cf829a4..4875b2720023 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,3 +1,4 @@
 DIST rspamd-2.7.tar.gz 5126227 BLAKE2B 70f57dba6ac9abe93d735d42e84bd17a1797035322029577a8e4376409bcee5345d4624925d3dd071bddce038858ebfdce8ee4f87f81b1fc8b1f71ad14e85930 SHA512 8779771baf85ef6ca1d7d2180429072ab1547ab834b073ee9222dcc6494efdd0a23f5e7ac52a777c23fd89296769f5b6f182593e714097c6f11ca7c9165e4ba7
 DIST rspamd-3.0.tar.gz 5535659 BLAKE2B 605ac59b947b49efb026e04d153df5fc0d56c65712def3f2c54a949db32b8534e634d172a1899cc08e98e0a9da839fc00f0f569dc8c52a743f38bd71b8abaeaa SHA512 1ea6f9ffe58b7f280dbd31e39db6412ebeddda634ca8a669fa5bff2951d17123a5d4a09ec0f366c6b0c0b585f868e646fd49e4d45bd451408675b927ec2557c4
 DIST rspamd-3.1.tar.gz 5566920 BLAKE2B dfb31534e7dbce303729e89537f83eea90d6524a0ccf81633e0d55840f21936985ba5991f2a2ed9ca5594a4a3938f9366f7a1879fc553f41ab52bb89460b87dc SHA512 3c3c06c10d3dfc90e4bc92c7ebaff4bd4854d3b0e56d6476f0223918c4a52f4cc7a8b381b1f867164199ee18ea00eda77ae0315925f3fd71596d610200667178
+DIST rspamd-3.2.tar.gz 5637835 BLAKE2B 8d42b34dacdc818689fd8602abf8c4d5ff2431eb30b2d8fae6e78642ce4361d39a54cb4b981c58cd31205b0f2013978896081e0d7364620312db3fa855d14b1e SHA512 fd3570da24d7f09f48ba6e98c210789b85006c51adaf37336c83a570ef5b9239d4a09491b647464254d3600fbea7c662ec271e9a77ee4108236962490c677a79

diff --git a/mail-filter/rspamd/files/rspamd-3.2-unbundle-lua.patch b/mail-filter/rspamd/files/rspamd-3.2-unbundle-lua.patch
new file mode 100644
index 000000000000..36aed009c6c8
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.2-unbundle-lua.patch
@@ -0,0 +1,61 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 096c2e79e..f323bfd40 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -620,10 +620,6 @@ ELSE()
+ 	find_package(doctest)
+ ENDIF()
+ 
+-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)
+@@ -721,7 +717,6 @@ ENDFOREACH(LUA_LIB)
+ 
+ # Install lua fun library
+ 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})
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 77c8756af..e0476bdc1 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -206,10 +206,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 ab411fa66..85787b31e 100644
+--- a/src/lua/lua_common.c
++++ b/src/lua/lua_common.c
+@@ -923,10 +923,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)
+ {
+@@ -984,7 +980,6 @@ rspamd_lua_init (bool wipe_mem)
+ 	luaopen_parsers (L);
+ 	luaopen_compress (L);
+ #ifndef WITH_LUAJIT
+-	rspamd_lua_add_preload (L, "bit", luaopen_bit);
+ 	lua_settop (L, 0);
+ #endif
+ 

diff --git a/mail-filter/rspamd/rspamd-3.2.ebuild b/mail-filter/rspamd/rspamd-3.2.ebuild
new file mode 100644
index 000000000000..fe5f08fba5e9
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-3.2.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit cmake lua-single pax-utils systemd tmpfiles
+
+if [[ ${PV} == *9999 ]] ; then
+	EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Rapid spam filtering system"
+HOMEPAGE="https://rspamd.com https://github.com/rspamd/rspamd"
+LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
+SLOT="0"
+IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit test"
+RESTRICT="!test? ( test )"
+
+# A part of tests use ffi luajit extension
+REQUIRED_USE="${LUA_REQUIRED_USE}
+	test? ( lua_single_target_luajit )"
+
+RDEPEND="${LUA_DEPS}
+	$(lua_gen_cond_dep '
+		dev-lua/LuaBitOp[${LUA_USEDEP}]
+		dev-lua/lua-argparse[${LUA_USEDEP}]
+	')
+	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/libfmt:=
+	dev-libs/libpcre2:=[jit=]
+	dev-libs/libsodium:=
+	dev-libs/openssl:0=[-bindist(-)]
+	dev-libs/snowball-stemmer:=
+	sys-apps/file
+	blas? (
+		virtual/blas
+		virtual/lapack
+	)
+	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
+	jemalloc? ( dev-libs/jemalloc:= )
+"
+# This version is also affected with bug #830624
+DEPEND="${RDEPEND}
+	<dev-cpp/doctest-2.4.7
+"
+BDEPEND="
+	dev-util/ragel
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/rspamd-3.0-cmake-lua-version.patch"
+	"${FILESDIR}/rspamd-3.2-unbundle-lua.patch"
+	"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
+)
+
+src_prepare() {
+	cmake_src_prepare
+
+	rm -vrf contrib/{doctest,fmt,lua-{argparse,bit},snowball,zstd} || die
+
+	> cmake/Toolset.cmake || die #827550
+
+	sed -i -e 's/User=_rspamd/User=rspamd/g' \
+		rspamd.service \
+		|| die
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DCONFDIR=/etc/rspamd
+		-DRUNDIR=/var/run/rspamd
+		-DDBDIR=/var/lib/rspamd
+		-DLOGDIR=/var/log/rspamd
+
+		-DSYSTEM_DOCTEST=ON
+		-DSYSTEM_FMT=ON
+		-DSYSTEM_ZSTD=ON
+
+		-DENABLE_BLAS=$(usex blas ON OFF)
+		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
+		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
+		-DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
+		-DENABLE_PCRE2=ON
+	)
+	cmake_src_configure
+}
+
+src_test() {
+	cmake_build run-test
+}
+
+src_install() {
+	cmake_src_install
+
+	newconfd "${FILESDIR}"/rspamd.conf rspamd
+	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
+	systemd_newunit rspamd.service rspamd.service
+
+	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+
+	# Remove mprotect for JIT support
+	if use lua_single_target_luajit; then
+		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
+	fi
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
+
+	diropts -o rspamd -g rspamd
+	keepdir /var/{lib,log}/rspamd
+}
+
+pkg_postinst() {
+	tmpfiles_process "${PN}.conf"
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2022-11-06  6:17 Sam James
  0 siblings, 0 replies; 22+ messages in thread
From: Sam James @ 2022-11-06  6:17 UTC (permalink / raw
  To: gentoo-commits

commit:     e22b9e780258d9aede2b057cff5e7ab8b9c6af2f
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Sat Nov  5 19:20:21 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov  6 06:16:51 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e22b9e78

mail-filter/rspamd: drop 3.0-r4, 3.1-r2, 3.2

Issues from two bugs bellow seems to be fixed in more recent versions.

Closes: https://bugs.gentoo.org/817866
Closes: https://bugs.gentoo.org/828584
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 mail-filter/rspamd/Manifest                        |   3 -
 .../files/rspamd-3.0-fix-null-dereference.patch    |  46 --------
 .../rspamd/files/rspamd-3.0-system-doctest.patch   |  72 ------------
 .../rspamd/files/rspamd-3.0-system-libfmt.patch    |  48 --------
 mail-filter/rspamd/rspamd-3.0-r4.ebuild            | 128 --------------------
 mail-filter/rspamd/rspamd-3.1-r2.ebuild            | 128 --------------------
 mail-filter/rspamd/rspamd-3.2.ebuild               | 129 ---------------------
 7 files changed, 554 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index e0065dc95ea1..cfddb0fa2c14 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,5 +1,2 @@
 DIST rspamd-2.7.tar.gz 5126227 BLAKE2B 70f57dba6ac9abe93d735d42e84bd17a1797035322029577a8e4376409bcee5345d4624925d3dd071bddce038858ebfdce8ee4f87f81b1fc8b1f71ad14e85930 SHA512 8779771baf85ef6ca1d7d2180429072ab1547ab834b073ee9222dcc6494efdd0a23f5e7ac52a777c23fd89296769f5b6f182593e714097c6f11ca7c9165e4ba7
-DIST rspamd-3.0.tar.gz 5535659 BLAKE2B 605ac59b947b49efb026e04d153df5fc0d56c65712def3f2c54a949db32b8534e634d172a1899cc08e98e0a9da839fc00f0f569dc8c52a743f38bd71b8abaeaa SHA512 1ea6f9ffe58b7f280dbd31e39db6412ebeddda634ca8a669fa5bff2951d17123a5d4a09ec0f366c6b0c0b585f868e646fd49e4d45bd451408675b927ec2557c4
-DIST rspamd-3.1.tar.gz 5566920 BLAKE2B dfb31534e7dbce303729e89537f83eea90d6524a0ccf81633e0d55840f21936985ba5991f2a2ed9ca5594a4a3938f9366f7a1879fc553f41ab52bb89460b87dc SHA512 3c3c06c10d3dfc90e4bc92c7ebaff4bd4854d3b0e56d6476f0223918c4a52f4cc7a8b381b1f867164199ee18ea00eda77ae0315925f3fd71596d610200667178
-DIST rspamd-3.2.tar.gz 5637835 BLAKE2B 8d42b34dacdc818689fd8602abf8c4d5ff2431eb30b2d8fae6e78642ce4361d39a54cb4b981c58cd31205b0f2013978896081e0d7364620312db3fa855d14b1e SHA512 fd3570da24d7f09f48ba6e98c210789b85006c51adaf37336c83a570ef5b9239d4a09491b647464254d3600fbea7c662ec271e9a77ee4108236962490c677a79
 DIST rspamd-3.3.tar.gz 5680874 BLAKE2B 2fbafabc0a59ca4ad1bbdc1b7ceb5b5bc281dc75d2997ac50c080cdf5ced2582409e3f98b63239bab64fafbcc63016d857967fe00c371a6d5b896d170f5da4a9 SHA512 02c5e62cb9ce32cdd6da859c4afe2bf03fcaff456d79f68ab7c3c288a0b36f11a701825c3cb7f0ecaccd419f84ce693961c1ed955ce4dbcfe291a8e978e2e69c

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
deleted file mode 100644
index d355f701a273..000000000000
--- a/mail-filter/rspamd/files/rspamd-3.0-fix-null-dereference.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-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
deleted file mode 100644
index bb315ee7a459..000000000000
--- a/mail-filter/rspamd/files/rspamd-3.0-system-doctest.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-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/files/rspamd-3.0-system-libfmt.patch b/mail-filter/rspamd/files/rspamd-3.0-system-libfmt.patch
deleted file mode 100644
index a6439b465e92..000000000000
--- a/mail-filter/rspamd/files/rspamd-3.0-system-libfmt.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 309bb213cffb23e6bee98157b53cf5db31f97ef9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
-Date: Sat, 21 Aug 2021 11:24:35 +0200
-Subject: [PATCH] Add SYSTEM_FMT cmake option
-
-This gives packagers option to use system version of fmt rather than
-bundled one. It is disabled by default.
----
-
-Merged-to-upstream: https://github.com/rspamd/rspamd/pull/3855
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 2c38758f3..fc4175677 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -58,6 +58,7 @@ OPTION(ENABLE_LIBUNWIND    "Use libunwind to print crash traces [default: OFF]"
- 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)
- 
- ############################# INCLUDE SECTION #############################################
- 
-@@ -117,7 +118,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/fmt/include"
- 		"${CMAKE_SOURCE_DIR}/contrib/doctest"
- 		"${CMAKE_SOURCE_DIR}/contrib/fu2/include"
- 		"${CMAKE_BINARY_DIR}/src" #Stored in the binary dir
-@@ -650,7 +650,12 @@ ADD_SUBDIRECTORY(contrib/libev)
- ADD_SUBDIRECTORY(contrib/kann)
- ADD_SUBDIRECTORY(contrib/fastutf8)
- ADD_SUBDIRECTORY(contrib/google-ced)
--ADD_SUBDIRECTORY(contrib/fmt)
-+IF(SYSTEM_FMT MATCHES "OFF")
-+	ADD_SUBDIRECTORY(contrib/fmt)
-+	INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/contrib/fmt/include")
-+ELSE()
-+	find_package(fmt)
-+ENDIF()
- ADD_SUBDIRECTORY(contrib/doctest)
- 
- IF (NOT WITH_LUAJIT)
--- 
-2.31.1
-

diff --git a/mail-filter/rspamd/rspamd-3.0-r4.ebuild b/mail-filter/rspamd/rspamd-3.0-r4.ebuild
deleted file mode 100644
index ad3bcaa4ff19..000000000000
--- a/mail-filter/rspamd/rspamd-3.0-r4.ebuild
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LUA_COMPAT=( lua5-{1..3} luajit )
-
-inherit cmake lua-single pax-utils systemd tmpfiles
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~amd64 ~x86"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="https://rspamd.com https://github.com/rspamd/rspamd"
-LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
-SLOT="0"
-IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit pcre2 selinux test"
-RESTRICT="!test? ( test )"
-
-# A part of tests use ffi luajit extension
-REQUIRED_USE="${LUA_REQUIRED_USE}
-	test? ( lua_single_target_luajit )"
-
-RDEPEND="${LUA_DEPS}
-	$(lua_gen_cond_dep '
-		dev-lua/LuaBitOp[${LUA_USEDEP}]
-	')
-	acct-group/rspamd
-	acct-user/rspamd
-	app-arch/zstd:=
-	dev-db/sqlite:3
-	dev-cpp/doctest
-	dev-libs/glib:2
-	dev-libs/icu:=
-	dev-libs/libev
-	dev-libs/libfmt:=
-	dev-libs/libsodium:=
-	dev-libs/snowball-stemmer:=
-	sys-apps/file
-	sys-libs/zlib
-	blas? (
-		virtual/blas
-		virtual/lapack
-	)
-	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
-	jemalloc? ( dev-libs/jemalloc:= )
-	dev-libs/openssl:0=[-bindist(-)]
-	pcre2? ( dev-libs/libpcre2:=[jit=] )
-	!pcre2? ( dev-libs/libpcre[jit=] )
-	selinux? ( sec-policy/selinux-spamassassin )"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	dev-util/ragel
-	virtual/pkgconfig
-"
-
-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"
-)
-
-src_prepare() {
-	cmake_src_prepare
-
-	rm -vrf contrib/{doctest,fmt,lua-bit,snowball,zstd} || die
-
-	sed -i -e 's/User=_rspamd/User=rspamd/g' \
-		rspamd.service \
-		|| die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-
-		-DSYSTEM_DOCTEST=ON
-		-DSYSTEM_FMT=ON
-		-DSYSTEM_ZSTD=ON
-
-		-DENABLE_BLAS=$(usex blas ON OFF)
-		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
-		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
-		-DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
-		-DENABLE_PCRE2=$(usex pcre2 ON OFF)
-	)
-	cmake_src_configure
-}
-
-src_test() {
-	cmake_build run-test
-}
-
-src_install() {
-	cmake_src_install
-
-	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
-	systemd_newunit rspamd.service rspamd.service
-
-	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
-	# Remove mprotect for JIT support
-	if use lua_single_target_luajit; then
-		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
-	fi
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
-
-	diropts -o rspamd -g rspamd
-	keepdir /var/{lib,log}/rspamd
-}
-
-pkg_postinst() {
-	tmpfiles_process "${PN}.conf"
-}

diff --git a/mail-filter/rspamd/rspamd-3.1-r2.ebuild b/mail-filter/rspamd/rspamd-3.1-r2.ebuild
deleted file mode 100644
index ac8b9e2b716a..000000000000
--- a/mail-filter/rspamd/rspamd-3.1-r2.ebuild
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LUA_COMPAT=( lua5-{1..4} luajit )
-
-inherit cmake lua-single pax-utils systemd tmpfiles
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~amd64 ~x86"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="https://rspamd.com https://github.com/rspamd/rspamd"
-LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
-SLOT="0"
-IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit pcre2 selinux test"
-RESTRICT="!test? ( test )"
-
-# A part of tests use ffi luajit extension
-REQUIRED_USE="${LUA_REQUIRED_USE}
-	test? ( lua_single_target_luajit )"
-
-RDEPEND="${LUA_DEPS}
-	$(lua_gen_cond_dep '
-		dev-lua/LuaBitOp[${LUA_USEDEP}]
-	')
-	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/libfmt:=
-	dev-libs/libsodium:=
-	dev-libs/snowball-stemmer:=
-	sys-apps/file
-	sys-libs/zlib
-	blas? (
-		virtual/blas
-		virtual/lapack
-	)
-	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
-	jemalloc? ( dev-libs/jemalloc:= )
-	dev-libs/openssl:0=[-bindist(-)]
-	pcre2? ( dev-libs/libpcre2:=[jit=] )
-	!pcre2? ( dev-libs/libpcre[jit=] )
-	selinux? ( sec-policy/selinux-spamassassin )"
-DEPEND="
-	${RDEPEND}
-	dev-cpp/doctest"
-BDEPEND="
-	dev-util/ragel
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}/rspamd-3.0-cmake-lua-version.patch"
-	"${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
-)
-
-src_prepare() {
-	cmake_src_prepare
-
-	rm -vrf contrib/{doctest,fmt,lua-bit,snowball,zstd} || die
-
-	> cmake/Toolset.cmake || die #827550
-
-	sed -i -e 's/User=_rspamd/User=rspamd/g' \
-		rspamd.service \
-		|| die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-
-		-DSYSTEM_DOCTEST=ON
-		-DSYSTEM_FMT=ON
-		-DSYSTEM_ZSTD=ON
-
-		-DENABLE_BLAS=$(usex blas ON OFF)
-		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
-		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
-		-DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
-		-DENABLE_PCRE2=$(usex pcre2 ON OFF)
-	)
-	cmake_src_configure
-}
-
-src_test() {
-	cmake_build run-test
-}
-
-src_install() {
-	cmake_src_install
-
-	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
-	systemd_newunit rspamd.service rspamd.service
-
-	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
-	# Remove mprotect for JIT support
-	if use lua_single_target_luajit; then
-		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
-	fi
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
-
-	diropts -o rspamd -g rspamd
-	keepdir /var/{lib,log}/rspamd
-}
-
-pkg_postinst() {
-	tmpfiles_process "${PN}.conf"
-}

diff --git a/mail-filter/rspamd/rspamd-3.2.ebuild b/mail-filter/rspamd/rspamd-3.2.ebuild
deleted file mode 100644
index 136dcaf7574d..000000000000
--- a/mail-filter/rspamd/rspamd-3.2.ebuild
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-{1..4} luajit )
-
-inherit cmake lua-single pax-utils systemd tmpfiles
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~amd64 ~x86"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="https://rspamd.com https://github.com/rspamd/rspamd"
-LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
-SLOT="0"
-IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit selinux test"
-RESTRICT="!test? ( test )"
-
-# A part of tests use ffi luajit extension
-REQUIRED_USE="${LUA_REQUIRED_USE}
-	test? ( lua_single_target_luajit )"
-
-RDEPEND="${LUA_DEPS}
-	$(lua_gen_cond_dep '
-		dev-lua/LuaBitOp[${LUA_USEDEP}]
-		dev-lua/lua-argparse[${LUA_USEDEP}]
-	')
-	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/libfmt:=
-	dev-libs/libpcre2:=[jit=]
-	dev-libs/libsodium:=
-	dev-libs/openssl:0=[-bindist(-)]
-	dev-libs/snowball-stemmer:=
-	sys-apps/file
-	sys-libs/zlib
-	blas? (
-		virtual/blas
-		virtual/lapack
-	)
-	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
-	jemalloc? ( dev-libs/jemalloc:= )
-	selinux? ( sec-policy/selinux-spamassassin )
-"
-DEPEND="${RDEPEND}
-	dev-cpp/doctest
-"
-BDEPEND="
-	dev-util/ragel
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}/rspamd-3.0-cmake-lua-version.patch"
-	"${FILESDIR}/rspamd-3.2-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
-)
-
-src_prepare() {
-	cmake_src_prepare
-
-	rm -vrf contrib/{doctest,fmt,lua-{argparse,bit},snowball,zstd} || die
-
-	> cmake/Toolset.cmake || die #827550
-
-	sed -i -e 's/User=_rspamd/User=rspamd/g' \
-		rspamd.service \
-		|| die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-
-		-DSYSTEM_DOCTEST=ON
-		-DSYSTEM_FMT=ON
-		-DSYSTEM_ZSTD=ON
-
-		-DENABLE_BLAS=$(usex blas ON OFF)
-		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
-		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
-		-DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
-		-DENABLE_PCRE2=ON
-	)
-	cmake_src_configure
-}
-
-src_test() {
-	cmake_build run-test
-}
-
-src_install() {
-	cmake_src_install
-
-	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
-	systemd_newunit rspamd.service rspamd.service
-
-	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
-	# Remove mprotect for JIT support
-	if use lua_single_target_luajit; then
-		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
-	fi
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
-
-	diropts -o rspamd -g rspamd
-	keepdir /var/{lib,log}/rspamd
-}
-
-pkg_postinst() {
-	tmpfiles_process "${PN}.conf"
-}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2022-11-15  0:56 Sam James
  0 siblings, 0 replies; 22+ messages in thread
From: Sam James @ 2022-11-15  0:56 UTC (permalink / raw
  To: gentoo-commits

commit:     1d2bf9e530d455d9d2e4b318d33c411ffb9e36f5
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Mon Nov 14 14:05:09 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 15 00:56:19 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d2bf9e5

mail-filter/rspamd: fix page-alignment of .unser files

This revision applies patch taken from upstream [1] which fixes
page-alignment issue of .unser files causing segfaults. The issue
affects only those who already started rspamd-3.4. All .unser files will
be automatically removed in postinstall phase for those who are updating
from 3.4 to 3.4-r1.

[1] https://github.com/rspamd/rspamd/issues/4329

Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/28263
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../rspamd-3.4-hyperscan-page-alignment.patch      | 28 ++++++++++++++++++++++
 .../{rspamd-3.4.ebuild => rspamd-3.4-r1.ebuild}    | 13 ++++++++++
 2 files changed, 41 insertions(+)

diff --git a/mail-filter/rspamd/files/rspamd-3.4-hyperscan-page-alignment.patch b/mail-filter/rspamd/files/rspamd-3.4-hyperscan-page-alignment.patch
new file mode 100644
index 000000000000..913f1f7ecd4d
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.4-hyperscan-page-alignment.patch
@@ -0,0 +1,28 @@
+Fix for hyperscan page alignment issues.
+
+Upstream-Issue: https://github.com/rspamd/rspamd/issues/4329
+
+diff --git a/src/libserver/hyperscan_tools.cxx b/src/libserver/hyperscan_tools.cxx
+index 6187208a9..96366067d 100644
+--- a/src/libserver/hyperscan_tools.cxx
++++ b/src/libserver/hyperscan_tools.cxx
+@@ -306,7 +306,15 @@ auto load_cached_hs_file(const char *fname, std::int64_t offset = 0) -> tl::expe
+ 						msg_debug_hyperscan_lambda("multipattern: create new database in %s; %Hz size",
+ 							tmpfile_pattern.data(), unserialized_size);
+ 						void *buf;
+-						posix_memalign(&buf, 16, unserialized_size);
++#ifdef HAVE_GETPAGESIZE
++						auto page_size = getpagesize();
++#else
++						auto page_size = sysconf(_SC_PAGESIZE);
++#endif
++						if (page_size == -1) {
++							page_size = 4096;
++						}
++						posix_memalign(&buf, page_size, unserialized_size);
+ 						if (buf == nullptr) {
+ 							return tl::make_unexpected(error {"Cannot allocate memory", errno, error_category::CRITICAL });
+ 						}
+-- 
+2.37.4
+

diff --git a/mail-filter/rspamd/rspamd-3.4.ebuild b/mail-filter/rspamd/rspamd-3.4-r1.ebuild
similarity index 83%
rename from mail-filter/rspamd/rspamd-3.4.ebuild
rename to mail-filter/rspamd/rspamd-3.4-r1.ebuild
index cb1d4e71df63..fc1664f05a6d 100644
--- a/mail-filter/rspamd/rspamd-3.4.ebuild
+++ b/mail-filter/rspamd/rspamd-3.4-r1.ebuild
@@ -71,6 +71,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-3.2-unbundle-lua.patch"
 	"${FILESDIR}/${PN}-2.5-unbundle-snowball.patch"
 	"${FILESDIR}/${PN}-3.3-remove-test-case.patch"
+	"${FILESDIR}/${PN}-3.4-hyperscan-page-alignment.patch"
 )
 
 src_prepare() {
@@ -133,4 +134,16 @@ src_install() {
 
 pkg_postinst() {
 	tmpfiles_process "${PN}.conf"
+
+	for ver in ${REPLACING_VERSIONS}; do
+		if ver_test "${ver}" -eq "3.4"; then
+			elog "rspamd-3.4 is known to segfault when it is updated from older version due"
+			elog "to a page-alignment of hyperscan .unser files. The issue is patched in this"
+			elog "ebuild revision rspamd-3.4-r1. All possibly broken .unser files will be"
+			elog "automaticaly removed. See https://github.com/rspamd/rspamd/issues/4329 for"
+			elog "more information."
+
+			find "${EROOT}/var/lib/rspamd" -type f -name '*.unser' -delete
+		fi
+	done
 }


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2023-08-07  5:43 Sam James
  0 siblings, 0 replies; 22+ messages in thread
From: Sam James @ 2023-08-07  5:43 UTC (permalink / raw
  To: gentoo-commits

commit:     0f736635e014f88ede09af2be9f4c06601fe5b75
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Thu Aug  3 15:36:16 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug  7 05:35:45 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f736635

mail-filter/rspamd: add 3.6

- It was necessary to rebase all patches because upstream changed coding
  style
- New patch was taken from upstream in order to fix tests [1] broken by
  linter
- This version seems to work with libfmt-10 [2], see bug #906068
- Restoring lua5-{3..4} support, see bug #903577

[1] https://github.com/rspamd/rspamd/pull/4560
[2] https://github.com/rspamd/rspamd/issues/4482

Bug: https://bugs.gentoo.org/903577
Bug: https://bugs.gentoo.org/906068
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 mail-filter/rspamd/Manifest                        |   1 +
 .../files/rspamd-3.6-cmake-lua-version.patch       |  64 +++++++++
 .../rspamd/files/rspamd-3.6-fix-tests.patch        |  23 ++++
 .../rspamd/files/rspamd-3.6-unbundle-lua.patch     |  61 +++++++++
 .../files/rspamd-3.6-unbundle-snowball.patch       |  20 +++
 mail-filter/rspamd/rspamd-3.6.ebuild               | 150 +++++++++++++++++++++
 6 files changed, 319 insertions(+)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 1b42f54a09d7..1b41c11b39d2 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1 +1,2 @@
 DIST rspamd-3.5.tar.gz 5806722 BLAKE2B 547cd9bb26942dc584d1f4b164e61bdb15505a56399fa19b358b7d7525ee983acc8d5ae1fdb3de340e3461a03aedbb48266fd81404c1f4a2e8fc5bd6735d9a62 SHA512 39c87d5dfd9ae1fc7709e19967eac5e7c7dc83fa070dfebbb7ab5411d7d50d6e6f10248ada717cf1cb3f6ff6c5bfb4d31fd87e1a7e1b2e5f876f6be7b5705623
+DIST rspamd-3.6.tar.gz 5843907 BLAKE2B 2ccb3e65a14624d48540bd3e2d034fec0dd89cd75032ade3ca74ded09cee6ed67f670c31035b18583b850cc4efeb21b44f97ec2c35d518a49b0c4e6f0eb8c90f SHA512 d99e2a60eec94eb39902454a8041eeb76f673c9f784849128766323a218d6c419755e0f8819e2a6921ca08c6a7d63660dc87bc911f808fb4a67d29e8fbfc571b

diff --git a/mail-filter/rspamd/files/rspamd-3.6-cmake-lua-version.patch b/mail-filter/rspamd/files/rspamd-3.6-cmake-lua-version.patch
new file mode 100644
index 000000000000..9a08eaac28b0
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.6-cmake-lua-version.patch
@@ -0,0 +1,64 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bea0af828..f72304f05 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -149,55 +149,8 @@ IF (ENABLE_LUAJIT MATCHES "ON")
+ ELSE (ENABLE_LUAJIT MATCHES "ON")
+ 
+     ProcessPackage(LIBLUA LIBRARY "lua"
+-            "lua-5.3"
+-            LIB_SUFFIXES "lua5.3"
+-            INCLUDE lua.h INCLUDE_SUFFIXES
+-            "include/lua-5.3"
+-            "include/lua5.3"
+-            "include/lua53"
+-            "include/lua"
+             ROOT ${LUA_ROOT}
+-            MODULES lua53
+-            OPTIONAL)
+-
+-    IF (NOT WITH_LIBLUA)
+-        ProcessPackage(LIBLUA LIBRARY "lua"
+-                "lua-5.4"
+-                LIB_SUFFIXES "lua5.4"
+-                INCLUDE lua.h INCLUDE_SUFFIXES
+-                "include/lua-5.4"
+-                "include/lua5.4"
+-                "include/lua54"
+-                "include/lua"
+-                ROOT ${LUA_ROOT}
+-                MODULES lua54
+-                OPTIONAL)
+-        IF (NOT WITH_LIBLUA)
+-            ProcessPackage(LIBLUA LIBRARY "lua"
+-                    "lua-5.2"
+-                    LIB_SUFFIXES "lua5.2"
+-                    INCLUDE lua.h INCLUDE_SUFFIXES
+-                    "include/lua-5.2"
+-                    "include/lua5.2"
+-                    "include/lua52"
+-                    "include/lua"
+-                    ROOT ${LUA_ROOT}
+-                    MODULES lua52
+-                    OPTIONAL)
+-
+-            IF (NOT WITH_LIBLUA)
+-                ProcessPackage(LIBLUA LIBRARY "lua"
+-                        "lua-5.1"
+-                        INCLUDE lua.h INCLUDE_SUFFIXES
+-                        "include/lua-5.1"
+-                        "include/lua5.1"
+-                        "include/lua51"
+-                        "include/lua"
+-                        ROOT ${LUA_ROOT}
+-                        MODULES lua51)
+-            ENDIF ()
+-        ENDIF ()
+-    ENDIF ()
++            MODULES lua)
+ ENDIF (ENABLE_LUAJIT MATCHES "ON")
+ 
+ IF (ENABLE_JEMALLOC MATCHES "ON" AND NOT SANITIZE)
+-- 
+2.41.0
+

diff --git a/mail-filter/rspamd/files/rspamd-3.6-fix-tests.patch b/mail-filter/rspamd/files/rspamd-3.6-fix-tests.patch
new file mode 100644
index 000000000000..33e851261f46
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.6-fix-tests.patch
@@ -0,0 +1,23 @@
+From: Duncan Bellamy <dunk@denkimushi.com>
+Date: Thu, 3 Aug 2023 22:08:06 +0000
+Subject: [PATCH] [Fix] CMakeLists.txt remove whitespace added by linter as it
+ makes tests fail
+
+Upstream-PR: https://github.com/rspamd/rspamd/pull/4560
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5402c4806..efda209ca 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -777,7 +777,7 @@ IF (NOT DEBIAN_BUILD)
+     ADD_CUSTOM_TARGET(check DEPENDS rspamd-test-cxx rspamd-test)
+     ADD_CUSTOM_TARGET(run-test DEPENDS check
+             COMMAND test/rspamd-test-cxx
+-            COMMAND sh -c 'LUA_PATH= "${CMAKE_SOURCE_DIR}/lualib/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/init.lua\;${CMAKE_SOURCE_DIR}/contrib/lua-?/?.lua"
++            COMMAND sh -c 'LUA_PATH="${CMAKE_SOURCE_DIR}/lualib/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/init.lua\;${CMAKE_SOURCE_DIR}/contrib/lua-?/?.lua"
+             test/rspamd-test -p /rspamd/lua')
+ ENDIF (NOT DEBIAN_BUILD)
+ 
+-- 
+2.41.0
+

diff --git a/mail-filter/rspamd/files/rspamd-3.6-unbundle-lua.patch b/mail-filter/rspamd/files/rspamd-3.6-unbundle-lua.patch
new file mode 100644
index 000000000000..78a2a49d796f
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.6-unbundle-lua.patch
@@ -0,0 +1,61 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bea0af828..d7a4eed14 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -641,10 +641,6 @@ ELSE ()
+     find_package(doctest)
+ ENDIF ()
+ 
+-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)
+@@ -742,7 +738,6 @@ ENDFOREACH (LUA_LIB)
+ 
+ # Install lua fun library
+ 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})
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 5dee8e610..a90f8d52d 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -205,10 +205,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 b543ae5db..7a93934fd 100644
+--- a/src/lua/lua_common.c
++++ b/src/lua/lua_common.c
+@@ -904,10 +904,6 @@ rspamd_lua_wipe_realloc(void *ud,
+ 	return NULL;
+ }
+ 
+-#ifndef WITH_LUAJIT
+-extern int luaopen_bit(lua_State *L);
+-#endif
+-
+ static unsigned int lua_initialized = 0;
+ 
+ lua_State *
+@@ -975,7 +971,6 @@ rspamd_lua_init(bool wipe_mem)
+ 	luaopen_parsers(L);
+ 	luaopen_compress(L);
+ #ifndef WITH_LUAJIT
+-	rspamd_lua_add_preload(L, "bit", luaopen_bit);
+ 	lua_settop(L, 0);
+ #endif
+ 

diff --git a/mail-filter/rspamd/files/rspamd-3.6-unbundle-snowball.patch b/mail-filter/rspamd/files/rspamd-3.6-unbundle-snowball.patch
new file mode 100644
index 000000000000..5779142b7b10
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.6-unbundle-snowball.patch
@@ -0,0 +1,20 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bea0af828..00778100c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -115,7 +115,6 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/"
+         "${CMAKE_SOURCE_DIR}/contrib/fpconv"
+         "${CMAKE_SOURCE_DIR}/contrib/libottery"
+         "${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"
+@@ -617,7 +616,6 @@ ELSE ()
+     ADD_DEFINITIONS(-DSYS_ZSTD)
+ ENDIF ()
+ IF (ENABLE_SNOWBALL MATCHES "ON")
+-    ADD_SUBDIRECTORY(contrib/snowball)
+     SET(WITH_SNOWBALL 1)
+ ENDIF ()
+ ADD_SUBDIRECTORY(contrib/libucl)

diff --git a/mail-filter/rspamd/rspamd-3.6.ebuild b/mail-filter/rspamd/rspamd-3.6.ebuild
new file mode 100644
index 000000000000..fb768118313d
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-3.6.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit cmake lua-single pax-utils systemd tmpfiles
+
+if [[ ${PV} == *9999 ]] ; then
+	EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Rapid spam filtering system"
+HOMEPAGE="
+	https://rspamd.com
+	https://github.com/rspamd/rspamd
+"
+
+LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
+SLOT="0"
+IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit selinux test"
+RESTRICT="!test? ( test )"
+
+# A part of tests use ffi luajit extension
+REQUIRED_USE="${LUA_REQUIRED_USE}
+	test? ( lua_single_target_luajit )"
+
+RDEPEND="${LUA_DEPS}
+	$(lua_gen_cond_dep '
+		dev-lua/LuaBitOp[${LUA_USEDEP}]
+		dev-lua/lua-argparse[${LUA_USEDEP}]
+	')
+	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/libfmt:=
+	dev-libs/libpcre2:=[jit=]
+	dev-libs/libsodium:=
+	dev-libs/openssl:0=[-bindist(-)]
+	dev-libs/snowball-stemmer:=
+	>=dev-libs/xxhash-0.8.0
+	sys-apps/file
+	sys-libs/zlib
+	blas? (
+		virtual/blas
+		virtual/lapack
+	)
+	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
+	jemalloc? ( dev-libs/jemalloc:= )
+	selinux? ( sec-policy/selinux-spamassassin )
+"
+DEPEND="${RDEPEND}
+	dev-cpp/doctest
+"
+BDEPEND="
+	dev-lang/perl
+	dev-util/ragel
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/rspamd-3.6-cmake-lua-version.patch"
+	"${FILESDIR}/rspamd-3.6-unbundle-lua.patch"
+	"${FILESDIR}/rspamd-3.6-unbundle-snowball.patch"
+	"${FILESDIR}/rspamd-3.6-fix-tests.patch"
+)
+
+src_prepare() {
+	cmake_src_prepare
+
+	rm -vrf contrib/{doctest,fmt,lua-{argparse,bit},snowball,xxhash,zstd} || die
+
+	> cmake/Toolset.cmake || die #827550
+
+	sed -i -e 's/User=_rspamd/User=rspamd/g' \
+		rspamd.service \
+		|| die
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DCONFDIR=/etc/rspamd
+		-DRUNDIR=/var/run/rspamd
+		-DDBDIR=/var/lib/rspamd
+		-DLOGDIR=/var/log/rspamd
+		-DLIBDIR="/usr/$(get_libdir)/rspamd"
+
+		-DSYSTEM_DOCTEST=ON
+		-DSYSTEM_FMT=ON
+		-DSYSTEM_XXHASH=ON
+		-DSYSTEM_ZSTD=ON
+
+		-DENABLE_BLAS=$(usex blas ON OFF)
+		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
+		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
+		-DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
+		-DENABLE_PCRE2=ON
+	)
+	cmake_src_configure
+}
+
+src_test() {
+	cmake_build run-test
+}
+
+src_install() {
+	cmake_src_install
+
+	newconfd "${FILESDIR}"/rspamd.conf rspamd
+	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
+	systemd_newunit rspamd.service rspamd.service
+
+	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+
+	# Remove mprotect for JIT support
+	if use lua_single_target_luajit; then
+		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
+	fi
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
+
+	diropts -o rspamd -g rspamd
+	keepdir /var/{lib,log}/rspamd
+}
+
+pkg_postinst() {
+	tmpfiles_process "${PN}.conf"
+
+	for ver in ${REPLACING_VERSIONS}; do
+		if ver_test "${ver}" -eq "3.4"; then
+			elog "rspamd-3.4 is known to segfault when it is updated from older version due"
+			elog "to a page-alignment of hyperscan .unser files. The issue was patched in"
+			elog "rspamd-3.4-r1 ebuild revision. All possibly broken .unser files will be"
+			elog "automaticaly removed. See https://github.com/rspamd/rspamd/issues/4329 for"
+			elog "more information."
+
+			find "${EROOT}/var/lib/rspamd" -type f -name '*.unser' -delete
+		fi
+	done
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2023-08-07 17:22 Sam James
  0 siblings, 0 replies; 22+ messages in thread
From: Sam James @ 2023-08-07 17:22 UTC (permalink / raw
  To: gentoo-commits

commit:     0507e5274d19d90e15aad64aa7ab4f26189c7edc
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Mon Aug  7 11:17:18 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug  7 17:22:25 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0507e527

mail-filter/rspamd: backport memory leak fix

This backports fix from upstream commit ffbab4fbf218 ("[CritFix] Fix
leak in `gzip` function").

Upstream-Issue: https://github.com/rspamd/rspamd/issues/4564
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/32209
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../rspamd/files/rspamd-3.6-memleak-fix.patch      | 36 ++++++++++++++++++++++
 .../{rspamd-3.6.ebuild => rspamd-3.6-r1.ebuild}    |  3 ++
 2 files changed, 39 insertions(+)

diff --git a/mail-filter/rspamd/files/rspamd-3.6-memleak-fix.patch b/mail-filter/rspamd/files/rspamd-3.6-memleak-fix.patch
new file mode 100644
index 000000000000..f372b79de7c7
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.6-memleak-fix.patch
@@ -0,0 +1,36 @@
+From ffbab4fbf218514845b8e5209aec044621b1f460 Mon Sep 17 00:00:00 2001
+From: Vsevolod Stakhov <vsevolod@rspamd.com>
+Date: Sun, 6 Aug 2023 18:33:37 +0100
+Subject: [PATCH] [CritFix] Fix leak in `gzip` function
+
+Upstream-Issue: https://github.com/rspamd/rspamd/issues/4564
+
+diff --git a/src/libutil/util.c b/src/libutil/util.c
+index 4be7cc620..deba3e807 100644
+--- a/src/libutil/util.c
++++ b/src/libutil/util.c
+@@ -2231,6 +2231,7 @@ rspamd_fstring_gzip(rspamd_fstring_t **in)
+ 	strm.avail_out = sizeof(temp) > buf->allocated ? buf->allocated : sizeof(temp);
+ 	ret = deflate(&strm, Z_FINISH);
+ 	if (ret == Z_STREAM_ERROR) {
++		deflateEnd(&strm);
+ 		return FALSE;
+ 	}
+ 
+@@ -2247,6 +2248,8 @@ rspamd_fstring_gzip(rspamd_fstring_t **in)
+ 		if (ret != Z_BUF_ERROR || strm.avail_in == 0) {
+ 			buf->len = strm.next_out - (unsigned char *) buf->str;
+ 			*in = buf;
++			deflateEnd(&strm);
++
+ 			return ret == Z_STREAM_END;
+ 		}
+ 	}
+@@ -2267,6 +2270,7 @@ rspamd_fstring_gzip(rspamd_fstring_t **in)
+ 	g_free(hold);
+ 	buf->len = strm.next_out - (unsigned char *) buf->str;
+ 	*in = buf;
++	deflateEnd(&strm);
+ 
+ 	return ret == Z_STREAM_END;
+ }

diff --git a/mail-filter/rspamd/rspamd-3.6.ebuild b/mail-filter/rspamd/rspamd-3.6-r1.ebuild
similarity index 97%
rename from mail-filter/rspamd/rspamd-3.6.ebuild
rename to mail-filter/rspamd/rspamd-3.6-r1.ebuild
index fb768118313d..dba607175345 100644
--- a/mail-filter/rspamd/rspamd-3.6.ebuild
+++ b/mail-filter/rspamd/rspamd-3.6-r1.ebuild
@@ -72,6 +72,9 @@ PATCHES=(
 	"${FILESDIR}/rspamd-3.6-unbundle-lua.patch"
 	"${FILESDIR}/rspamd-3.6-unbundle-snowball.patch"
 	"${FILESDIR}/rspamd-3.6-fix-tests.patch"
+
+	# see https://github.com/rspamd/rspamd/issues/4564
+	"${FILESDIR}/${P}-memleak-fix.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2023-12-03 22:01 Petr Vaněk
  0 siblings, 0 replies; 22+ messages in thread
From: Petr Vaněk @ 2023-12-03 22:01 UTC (permalink / raw
  To: gentoo-commits

commit:     056e6464c30c821ee62bea2557afa64398e20435
Author:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Sun Dec  3 21:47:28 2023 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Sun Dec  3 22:00:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=056e6464

mail-filter/rspamd: Fix build with disabled hyperscan

The issue is fixed with a patch backported from upstream.

Upstream-issue: https://github.com/rspamd/rspamd/issues/4701
Upstream-issue: https://github.com/rspamd/rspamd/issues/4702
Closes: https://bugs.gentoo.org/917512
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 .../rspamd/files/rspamd-3.7.4-no-hyperscan.patch   | 38 ++++++++++++++++++++++
 mail-filter/rspamd/rspamd-3.7.4-r1.ebuild          |  2 ++
 mail-filter/rspamd/rspamd-3.7.4.ebuild             |  2 ++
 3 files changed, 42 insertions(+)

diff --git a/mail-filter/rspamd/files/rspamd-3.7.4-no-hyperscan.patch b/mail-filter/rspamd/files/rspamd-3.7.4-no-hyperscan.patch
new file mode 100644
index 000000000000..76353b703f21
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.7.4-no-hyperscan.patch
@@ -0,0 +1,38 @@
+From d907a95ac2e2cad6f7f65c4323f031f7931ae18b Mon Sep 17 00:00:00 2001
+From: Vsevolod Stakhov <vsevolod@rspamd.com>
+Date: Wed, 15 Nov 2023 13:43:05 +0000
+Subject: [PATCH] [Minor] Fix build with no hyperscan
+
+Upstream-issue: https://github.com/rspamd/rspamd/issues/4701
+Upstream-issue: https://github.com/rspamd/rspamd/issues/4702
+
+diff --git a/src/libserver/rspamd_control.c b/src/libserver/rspamd_control.c
+index 986a4a2ea..69af0597f 100644
+--- a/src/libserver/rspamd_control.c
++++ b/src/libserver/rspamd_control.c
+@@ -922,6 +922,7 @@ rspamd_srv_handler(EV_P_ ev_io *w, int revents)
+ 				}
+ 				break;
+ 			case RSPAMD_SRV_HYPERSCAN_LOADED:
++#ifdef WITH_HYPERSCAN
+ 				/* Load RE cache to provide it for new forks */
+ 				if (rspamd_re_cache_is_hs_loaded(rspamd_main->cfg->re_cache) != RSPAMD_HYPERSCAN_LOADED_FULL ||
+ 					cmd.cmd.hs_loaded.forced) {
+@@ -932,7 +933,9 @@ rspamd_srv_handler(EV_P_ ev_io *w, int revents)
+ 				}
+ 
+ 				/* After getting this notice, we can clean up old hyperscan files */
++
+ 				rspamd_hyperscan_notice_loaded();
++
+ 				msg_info_main("received hyperscan cache loaded from %s",
+ 							  cmd.cmd.hs_loaded.cache_dir);
+ 
+@@ -945,6 +948,7 @@ rspamd_srv_handler(EV_P_ ev_io *w, int revents)
+ 				wcmd.cmd.hs_loaded.forced = cmd.cmd.hs_loaded.forced;
+ 				rspamd_control_broadcast_cmd(rspamd_main, &wcmd, rfd,
+ 											 rspamd_control_ignore_io_handler, NULL, worker->pid);
++#endif
+ 				break;
+ 			case RSPAMD_SRV_MONITORED_CHANGE:
+ 				/* Broadcast command to all workers */

diff --git a/mail-filter/rspamd/rspamd-3.7.4-r1.ebuild b/mail-filter/rspamd/rspamd-3.7.4-r1.ebuild
index 476878d10a51..d25c1a699699 100644
--- a/mail-filter/rspamd/rspamd-3.7.4-r1.ebuild
+++ b/mail-filter/rspamd/rspamd-3.7.4-r1.ebuild
@@ -71,6 +71,8 @@ PATCHES=(
 	"${FILESDIR}/rspamd-3.6-cmake-lua-version.patch"
 	"${FILESDIR}/rspamd-3.6-unbundle-lua.patch"
 	"${FILESDIR}/rspamd-3.6-unbundle-snowball.patch"
+
+	"${FILESDIR}/${P}-no-hyperscan.patch" #917512
 )
 
 src_prepare() {

diff --git a/mail-filter/rspamd/rspamd-3.7.4.ebuild b/mail-filter/rspamd/rspamd-3.7.4.ebuild
index ad8d2656579e..8ae0aff0c482 100644
--- a/mail-filter/rspamd/rspamd-3.7.4.ebuild
+++ b/mail-filter/rspamd/rspamd-3.7.4.ebuild
@@ -71,6 +71,8 @@ PATCHES=(
 	"${FILESDIR}/rspamd-3.6-cmake-lua-version.patch"
 	"${FILESDIR}/rspamd-3.6-unbundle-lua.patch"
 	"${FILESDIR}/rspamd-3.6-unbundle-snowball.patch"
+
+	"${FILESDIR}/${P}-no-hyperscan.patch" #917512
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2024-03-13 17:32 Petr Vaněk
  0 siblings, 0 replies; 22+ messages in thread
From: Petr Vaněk @ 2024-03-13 17:32 UTC (permalink / raw
  To: gentoo-commits

commit:     8a31789b8e900a225947a82e98f27576b03fb19e
Author:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 13 08:18:46 2024 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Wed Mar 13 17:30:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a31789b

mail-filter/rspamd: drop 3.6-r1, 3.7.4, 3.7.4-r1, 3.7.5

Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 mail-filter/rspamd/Manifest                        |   3 -
 .../rspamd/files/rspamd-3.6-fix-tests.patch        |  23 ---
 .../rspamd/files/rspamd-3.6-memleak-fix.patch      |  36 -----
 .../rspamd/files/rspamd-3.7.4-no-hyperscan.patch   |  38 -----
 mail-filter/rspamd/rspamd-3.6-r1.ebuild            | 153 --------------------
 mail-filter/rspamd/rspamd-3.7.4-r1.ebuild          | 157 ---------------------
 mail-filter/rspamd/rspamd-3.7.4.ebuild             | 157 ---------------------
 mail-filter/rspamd/rspamd-3.7.5.ebuild             | 155 --------------------
 8 files changed, 722 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 8929872819e4..f5a68e3e11cc 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,5 +1,2 @@
-DIST rspamd-3.6.tar.gz 5843907 BLAKE2B 2ccb3e65a14624d48540bd3e2d034fec0dd89cd75032ade3ca74ded09cee6ed67f670c31035b18583b850cc4efeb21b44f97ec2c35d518a49b0c4e6f0eb8c90f SHA512 d99e2a60eec94eb39902454a8041eeb76f673c9f784849128766323a218d6c419755e0f8819e2a6921ca08c6a7d63660dc87bc911f808fb4a67d29e8fbfc571b
-DIST rspamd-3.7.4.tar.gz 5903754 BLAKE2B d13b3451b4a6a7c5e8644ba57196190065edda2fc48e7245ef7e0094cb90838760cc124a2cf8d0b4b7519c7583284f6883fbcd4bf3a6489496b5e52234a36c21 SHA512 a82696957417f7197b59e614012176626b4fdf1464ed38ce57552c8a02fe2e426504e0b0780ab4f36d208a11ae4d1921bacee52341c8a906b4ab19c1719fd116
-DIST rspamd-3.7.5.tar.gz 5903689 BLAKE2B 29fecbc3a813fbc898360289aef2a8634fc15df38b28c47279eefa0afd836b2d3e95d83076190d9c1f0123402ea95f7c9b94fe2322996e37a529841cc55def8f SHA512 d8d25cda2dee80e0c1e627c96e56ade97fc44ca0cf9410d21bd3a82fc2a4004e09c0bbb8c89eb81e835c0be5cd748f468910c3be67f5e4cdb50d56d9f8cda672
 DIST rspamd-3.8.1.tar.gz 5910993 BLAKE2B c3c29cb380fa09a33173bb6f51ff76eaf88cf459eda0c6f19f890148eb97703a8f43f34443a6d4b28cb1cbcf2c6f47321203556d265a0b2f0b0050b5575c5851 SHA512 b87c1cba11faca278db85426ed527832c34d1beff56e0993543a05fcc2d5d72675cf31bbc4241f52da9122787d24f8b955218988a198a3c29dee5db3be2c7e99
 DIST rspamd-3.8.4.tar.gz 5915680 BLAKE2B a6674c5175a10dffa440b9f4227fc4f2e7c497bf8a5a6c87c9f042ca870380a61be63405f4d2714103f49679edd5a28c4eb30807b8acb22998c7dbba72f19cb3 SHA512 dda099dd9a17699d143fc8018b89fbecfa9659eccc26b5fb88bc3f40c47e935993dfc81f1f93bb69880d17af40870e6ea20edbeed7e3f4c12c278f5c12b56a51

diff --git a/mail-filter/rspamd/files/rspamd-3.6-fix-tests.patch b/mail-filter/rspamd/files/rspamd-3.6-fix-tests.patch
deleted file mode 100644
index 33e851261f46..000000000000
--- a/mail-filter/rspamd/files/rspamd-3.6-fix-tests.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Duncan Bellamy <dunk@denkimushi.com>
-Date: Thu, 3 Aug 2023 22:08:06 +0000
-Subject: [PATCH] [Fix] CMakeLists.txt remove whitespace added by linter as it
- makes tests fail
-
-Upstream-PR: https://github.com/rspamd/rspamd/pull/4560
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 5402c4806..efda209ca 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -777,7 +777,7 @@ IF (NOT DEBIAN_BUILD)
-     ADD_CUSTOM_TARGET(check DEPENDS rspamd-test-cxx rspamd-test)
-     ADD_CUSTOM_TARGET(run-test DEPENDS check
-             COMMAND test/rspamd-test-cxx
--            COMMAND sh -c 'LUA_PATH= "${CMAKE_SOURCE_DIR}/lualib/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/init.lua\;${CMAKE_SOURCE_DIR}/contrib/lua-?/?.lua"
-+            COMMAND sh -c 'LUA_PATH="${CMAKE_SOURCE_DIR}/lualib/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/?.lua\;${CMAKE_SOURCE_DIR}/lualib/?/init.lua\;${CMAKE_SOURCE_DIR}/contrib/lua-?/?.lua"
-             test/rspamd-test -p /rspamd/lua')
- ENDIF (NOT DEBIAN_BUILD)
- 
--- 
-2.41.0
-

diff --git a/mail-filter/rspamd/files/rspamd-3.6-memleak-fix.patch b/mail-filter/rspamd/files/rspamd-3.6-memleak-fix.patch
deleted file mode 100644
index f372b79de7c7..000000000000
--- a/mail-filter/rspamd/files/rspamd-3.6-memleak-fix.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From ffbab4fbf218514845b8e5209aec044621b1f460 Mon Sep 17 00:00:00 2001
-From: Vsevolod Stakhov <vsevolod@rspamd.com>
-Date: Sun, 6 Aug 2023 18:33:37 +0100
-Subject: [PATCH] [CritFix] Fix leak in `gzip` function
-
-Upstream-Issue: https://github.com/rspamd/rspamd/issues/4564
-
-diff --git a/src/libutil/util.c b/src/libutil/util.c
-index 4be7cc620..deba3e807 100644
---- a/src/libutil/util.c
-+++ b/src/libutil/util.c
-@@ -2231,6 +2231,7 @@ rspamd_fstring_gzip(rspamd_fstring_t **in)
- 	strm.avail_out = sizeof(temp) > buf->allocated ? buf->allocated : sizeof(temp);
- 	ret = deflate(&strm, Z_FINISH);
- 	if (ret == Z_STREAM_ERROR) {
-+		deflateEnd(&strm);
- 		return FALSE;
- 	}
- 
-@@ -2247,6 +2248,8 @@ rspamd_fstring_gzip(rspamd_fstring_t **in)
- 		if (ret != Z_BUF_ERROR || strm.avail_in == 0) {
- 			buf->len = strm.next_out - (unsigned char *) buf->str;
- 			*in = buf;
-+			deflateEnd(&strm);
-+
- 			return ret == Z_STREAM_END;
- 		}
- 	}
-@@ -2267,6 +2270,7 @@ rspamd_fstring_gzip(rspamd_fstring_t **in)
- 	g_free(hold);
- 	buf->len = strm.next_out - (unsigned char *) buf->str;
- 	*in = buf;
-+	deflateEnd(&strm);
- 
- 	return ret == Z_STREAM_END;
- }

diff --git a/mail-filter/rspamd/files/rspamd-3.7.4-no-hyperscan.patch b/mail-filter/rspamd/files/rspamd-3.7.4-no-hyperscan.patch
deleted file mode 100644
index 76353b703f21..000000000000
--- a/mail-filter/rspamd/files/rspamd-3.7.4-no-hyperscan.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From d907a95ac2e2cad6f7f65c4323f031f7931ae18b Mon Sep 17 00:00:00 2001
-From: Vsevolod Stakhov <vsevolod@rspamd.com>
-Date: Wed, 15 Nov 2023 13:43:05 +0000
-Subject: [PATCH] [Minor] Fix build with no hyperscan
-
-Upstream-issue: https://github.com/rspamd/rspamd/issues/4701
-Upstream-issue: https://github.com/rspamd/rspamd/issues/4702
-
-diff --git a/src/libserver/rspamd_control.c b/src/libserver/rspamd_control.c
-index 986a4a2ea..69af0597f 100644
---- a/src/libserver/rspamd_control.c
-+++ b/src/libserver/rspamd_control.c
-@@ -922,6 +922,7 @@ rspamd_srv_handler(EV_P_ ev_io *w, int revents)
- 				}
- 				break;
- 			case RSPAMD_SRV_HYPERSCAN_LOADED:
-+#ifdef WITH_HYPERSCAN
- 				/* Load RE cache to provide it for new forks */
- 				if (rspamd_re_cache_is_hs_loaded(rspamd_main->cfg->re_cache) != RSPAMD_HYPERSCAN_LOADED_FULL ||
- 					cmd.cmd.hs_loaded.forced) {
-@@ -932,7 +933,9 @@ rspamd_srv_handler(EV_P_ ev_io *w, int revents)
- 				}
- 
- 				/* After getting this notice, we can clean up old hyperscan files */
-+
- 				rspamd_hyperscan_notice_loaded();
-+
- 				msg_info_main("received hyperscan cache loaded from %s",
- 							  cmd.cmd.hs_loaded.cache_dir);
- 
-@@ -945,6 +948,7 @@ rspamd_srv_handler(EV_P_ ev_io *w, int revents)
- 				wcmd.cmd.hs_loaded.forced = cmd.cmd.hs_loaded.forced;
- 				rspamd_control_broadcast_cmd(rspamd_main, &wcmd, rfd,
- 											 rspamd_control_ignore_io_handler, NULL, worker->pid);
-+#endif
- 				break;
- 			case RSPAMD_SRV_MONITORED_CHANGE:
- 				/* Broadcast command to all workers */

diff --git a/mail-filter/rspamd/rspamd-3.6-r1.ebuild b/mail-filter/rspamd/rspamd-3.6-r1.ebuild
deleted file mode 100644
index 3e711833e3a8..000000000000
--- a/mail-filter/rspamd/rspamd-3.6-r1.ebuild
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-{1..4} luajit )
-
-inherit cmake lua-single pax-utils systemd tmpfiles
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="amd64 x86"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="
-	https://rspamd.com
-	https://github.com/rspamd/rspamd
-"
-
-LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
-SLOT="0"
-IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit selinux test"
-RESTRICT="!test? ( test )"
-
-# A part of tests use ffi luajit extension
-REQUIRED_USE="${LUA_REQUIRED_USE}
-	test? ( lua_single_target_luajit )"
-
-RDEPEND="${LUA_DEPS}
-	$(lua_gen_cond_dep '
-		dev-lua/LuaBitOp[${LUA_USEDEP}]
-		dev-lua/lua-argparse[${LUA_USEDEP}]
-	')
-	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/libfmt:=
-	dev-libs/libpcre2:=[jit=]
-	dev-libs/libsodium:=
-	dev-libs/openssl:0=[-bindist(-)]
-	dev-libs/snowball-stemmer:=
-	>=dev-libs/xxhash-0.8.0
-	sys-apps/file
-	sys-libs/zlib
-	blas? (
-		virtual/blas
-		virtual/lapack
-	)
-	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
-	jemalloc? ( dev-libs/jemalloc:= )
-	selinux? ( sec-policy/selinux-spamassassin )
-"
-DEPEND="${RDEPEND}
-	dev-cpp/doctest
-"
-BDEPEND="
-	dev-lang/perl
-	dev-util/ragel
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}/rspamd-3.6-cmake-lua-version.patch"
-	"${FILESDIR}/rspamd-3.6-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-3.6-unbundle-snowball.patch"
-	"${FILESDIR}/rspamd-3.6-fix-tests.patch"
-
-	# see https://github.com/rspamd/rspamd/issues/4564
-	"${FILESDIR}/${P}-memleak-fix.patch"
-)
-
-src_prepare() {
-	cmake_src_prepare
-
-	rm -vrf contrib/{doctest,fmt,lua-{argparse,bit},snowball,xxhash,zstd} || die
-
-	> cmake/Toolset.cmake || die #827550
-
-	sed -i -e 's/User=_rspamd/User=rspamd/g' \
-		rspamd.service \
-		|| die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-		-DLIBDIR="/usr/$(get_libdir)/rspamd"
-
-		-DSYSTEM_DOCTEST=ON
-		-DSYSTEM_FMT=ON
-		-DSYSTEM_XXHASH=ON
-		-DSYSTEM_ZSTD=ON
-
-		-DENABLE_BLAS=$(usex blas ON OFF)
-		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
-		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
-		-DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
-		-DENABLE_PCRE2=ON
-	)
-	cmake_src_configure
-}
-
-src_test() {
-	cmake_build run-test
-}
-
-src_install() {
-	cmake_src_install
-
-	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
-	systemd_newunit rspamd.service rspamd.service
-
-	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
-	# Remove mprotect for JIT support
-	if use lua_single_target_luajit; then
-		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
-	fi
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
-
-	diropts -o rspamd -g rspamd
-	keepdir /var/{lib,log}/rspamd
-}
-
-pkg_postinst() {
-	tmpfiles_process "${PN}.conf"
-
-	for ver in ${REPLACING_VERSIONS}; do
-		if ver_test "${ver}" -eq "3.4"; then
-			elog "rspamd-3.4 is known to segfault when it is updated from older version due"
-			elog "to a page-alignment of hyperscan .unser files. The issue was patched in"
-			elog "rspamd-3.4-r1 ebuild revision. All possibly broken .unser files will be"
-			elog "automaticaly removed. See https://github.com/rspamd/rspamd/issues/4329 for"
-			elog "more information."
-
-			find "${EROOT}/var/lib/rspamd" -type f -name '*.unser' -delete
-		fi
-	done
-}

diff --git a/mail-filter/rspamd/rspamd-3.7.4-r1.ebuild b/mail-filter/rspamd/rspamd-3.7.4-r1.ebuild
deleted file mode 100644
index d25c1a699699..000000000000
--- a/mail-filter/rspamd/rspamd-3.7.4-r1.ebuild
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-{1..4} luajit )
-
-inherit cmake lua-single pax-utils systemd tmpfiles
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="
-	https://rspamd.com
-	https://github.com/rspamd/rspamd
-"
-
-LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
-SLOT="0"
-IUSE="blas +hyperscan jemalloc +jit selinux test"
-RESTRICT="!test? ( test )"
-
-# A part of tests use ffi luajit extension
-REQUIRED_USE="${LUA_REQUIRED_USE}
-	test? ( lua_single_target_luajit )"
-
-RDEPEND="
-	${LUA_DEPS}
-	$(lua_gen_cond_dep '
-		dev-lua/LuaBitOp[${LUA_USEDEP}]
-		dev-lua/lua-argparse[${LUA_USEDEP}]
-	')
-	acct-group/rspamd
-	acct-user/rspamd
-	app-arch/zstd:=
-	dev-db/sqlite:3
-	dev-libs/glib:2
-	dev-libs/icu:=
-	dev-libs/libpcre2:=[jit=]
-	dev-libs/libsodium:=
-	dev-libs/openssl:0=[-bindist(-)]
-	dev-libs/snowball-stemmer:=
-	sys-libs/zlib
-	blas? (
-		virtual/blas
-		virtual/lapack
-	)
-	hyperscan? ( dev-libs/vectorscan:= )
-	jemalloc? ( dev-libs/jemalloc:= )
-	selinux? ( sec-policy/selinux-spamassassin )
-"
-DEPEND="
-	${RDEPEND}
-	dev-cpp/doctest
-	dev-libs/libfmt:=
-	>=dev-libs/xxhash-0.8.0
-"
-BDEPEND="
-	dev-lang/perl
-	dev-util/ragel
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}/rspamd-3.6-cmake-lua-version.patch"
-	"${FILESDIR}/rspamd-3.6-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-3.6-unbundle-snowball.patch"
-
-	"${FILESDIR}/${P}-no-hyperscan.patch" #917512
-)
-
-src_prepare() {
-	cmake_src_prepare
-
-	rm -vrf contrib/{doctest,fmt,lua-{argparse,bit},snowball,xxhash,zstd} || die
-
-	> cmake/Toolset.cmake || die #827550
-
-	sed -i -e 's/User=_rspamd/User=rspamd/g' \
-		rspamd.service \
-		|| die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-		-DLIBDIR="/usr/$(get_libdir)/rspamd"
-
-		-DSYSTEM_DOCTEST=ON
-		-DSYSTEM_FMT=ON
-		-DSYSTEM_XXHASH=ON
-		-DSYSTEM_ZSTD=ON
-
-		# For bundled https://github.com/bombela/backward-cpp
-		# Bundled backward library uses execinfo.h in current setting, which is
-		# available in glibc, but not in musl. Let's enable it for glibc only.
-		-DENABLE_BACKWARD=$(usex elibc_glibc ON OFF) # bug 917643
-		-DSTACK_DETAILS_AUTO_DETECT=OFF
-
-		-DENABLE_BLAS=$(usex blas ON OFF)
-		-DENABLE_HYPERSCAN=$(usex hyperscan ON OFF)
-		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
-		-DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
-		-DENABLE_PCRE2=ON
-	)
-	cmake_src_configure
-}
-
-src_test() {
-	cmake_build run-test
-}
-
-src_install() {
-	cmake_src_install
-
-	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
-	systemd_newunit rspamd.service rspamd.service
-
-	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
-	# Remove mprotect for JIT support
-	if use lua_single_target_luajit; then
-		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
-	fi
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
-
-	diropts -o rspamd -g rspamd
-	keepdir /var/{lib,log}/rspamd
-}
-
-pkg_postinst() {
-	tmpfiles_process "${PN}.conf"
-
-	for ver in ${REPLACING_VERSIONS}; do
-		if ver_test "${ver}" -eq "3.4"; then
-			elog "rspamd-3.4 is known to segfault when it is updated from older version due"
-			elog "to a page-alignment of hyperscan .unser files. The issue was patched in"
-			elog "rspamd-3.4-r1 ebuild revision. All possibly broken .unser files will be"
-			elog "automaticaly removed. See https://github.com/rspamd/rspamd/issues/4329 for"
-			elog "more information."
-
-			find "${EROOT}/var/lib/rspamd" -type f -name '*.unser' -delete
-		fi
-	done
-}

diff --git a/mail-filter/rspamd/rspamd-3.7.4.ebuild b/mail-filter/rspamd/rspamd-3.7.4.ebuild
deleted file mode 100644
index 8ae0aff0c482..000000000000
--- a/mail-filter/rspamd/rspamd-3.7.4.ebuild
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-{1..4} luajit )
-
-inherit cmake lua-single pax-utils systemd tmpfiles
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~amd64 ~x86"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="
-	https://rspamd.com
-	https://github.com/rspamd/rspamd
-"
-
-LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
-SLOT="0"
-IUSE="blas cpu_flags_x86_ssse3 jemalloc +jit selinux test"
-RESTRICT="!test? ( test )"
-
-# A part of tests use ffi luajit extension
-REQUIRED_USE="${LUA_REQUIRED_USE}
-	test? ( lua_single_target_luajit )"
-
-RDEPEND="
-	${LUA_DEPS}
-	$(lua_gen_cond_dep '
-		dev-lua/LuaBitOp[${LUA_USEDEP}]
-		dev-lua/lua-argparse[${LUA_USEDEP}]
-	')
-	acct-group/rspamd
-	acct-user/rspamd
-	app-arch/zstd:=
-	dev-db/sqlite:3
-	dev-libs/glib:2
-	dev-libs/icu:=
-	dev-libs/libpcre2:=[jit=]
-	dev-libs/libsodium:=
-	dev-libs/openssl:0=[-bindist(-)]
-	dev-libs/snowball-stemmer:=
-	sys-libs/zlib
-	blas? (
-		virtual/blas
-		virtual/lapack
-	)
-	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
-	jemalloc? ( dev-libs/jemalloc:= )
-	selinux? ( sec-policy/selinux-spamassassin )
-"
-DEPEND="
-	${RDEPEND}
-	dev-cpp/doctest
-	dev-libs/libfmt:=
-	>=dev-libs/xxhash-0.8.0
-"
-BDEPEND="
-	dev-lang/perl
-	dev-util/ragel
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}/rspamd-3.6-cmake-lua-version.patch"
-	"${FILESDIR}/rspamd-3.6-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-3.6-unbundle-snowball.patch"
-
-	"${FILESDIR}/${P}-no-hyperscan.patch" #917512
-)
-
-src_prepare() {
-	cmake_src_prepare
-
-	rm -vrf contrib/{doctest,fmt,lua-{argparse,bit},snowball,xxhash,zstd} || die
-
-	> cmake/Toolset.cmake || die #827550
-
-	sed -i -e 's/User=_rspamd/User=rspamd/g' \
-		rspamd.service \
-		|| die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-		-DLIBDIR="/usr/$(get_libdir)/rspamd"
-
-		-DSYSTEM_DOCTEST=ON
-		-DSYSTEM_FMT=ON
-		-DSYSTEM_XXHASH=ON
-		-DSYSTEM_ZSTD=ON
-
-		# For bundled https://github.com/bombela/backward-cpp
-		# Bundled backward library uses execinfo.h in current setting, which is
-		# available in glibc, but not in musl. Let's enable it for glibc only.
-		-DENABLE_BACKWARD=$(usex elibc_glibc ON OFF) # bug 917643
-		-DSTACK_DETAILS_AUTO_DETECT=OFF
-
-		-DENABLE_BLAS=$(usex blas ON OFF)
-		-DENABLE_HYPERSCAN=$(usex cpu_flags_x86_ssse3 ON OFF)
-		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
-		-DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
-		-DENABLE_PCRE2=ON
-	)
-	cmake_src_configure
-}
-
-src_test() {
-	cmake_build run-test
-}
-
-src_install() {
-	cmake_src_install
-
-	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
-	systemd_newunit rspamd.service rspamd.service
-
-	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
-	# Remove mprotect for JIT support
-	if use lua_single_target_luajit; then
-		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
-	fi
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
-
-	diropts -o rspamd -g rspamd
-	keepdir /var/{lib,log}/rspamd
-}
-
-pkg_postinst() {
-	tmpfiles_process "${PN}.conf"
-
-	for ver in ${REPLACING_VERSIONS}; do
-		if ver_test "${ver}" -eq "3.4"; then
-			elog "rspamd-3.4 is known to segfault when it is updated from older version due"
-			elog "to a page-alignment of hyperscan .unser files. The issue was patched in"
-			elog "rspamd-3.4-r1 ebuild revision. All possibly broken .unser files will be"
-			elog "automaticaly removed. See https://github.com/rspamd/rspamd/issues/4329 for"
-			elog "more information."
-
-			find "${EROOT}/var/lib/rspamd" -type f -name '*.unser' -delete
-		fi
-	done
-}

diff --git a/mail-filter/rspamd/rspamd-3.7.5.ebuild b/mail-filter/rspamd/rspamd-3.7.5.ebuild
deleted file mode 100644
index e4daeebbe16d..000000000000
--- a/mail-filter/rspamd/rspamd-3.7.5.ebuild
+++ /dev/null
@@ -1,155 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-{1..4} luajit )
-
-inherit cmake lua-single pax-utils systemd tmpfiles
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="amd64"
-fi
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="
-	https://rspamd.com
-	https://github.com/rspamd/rspamd
-"
-
-LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
-SLOT="0"
-IUSE="blas +hyperscan jemalloc +jit selinux test"
-RESTRICT="!test? ( test )"
-
-# A part of tests use ffi luajit extension
-REQUIRED_USE="${LUA_REQUIRED_USE}
-	test? ( lua_single_target_luajit )"
-
-RDEPEND="
-	${LUA_DEPS}
-	$(lua_gen_cond_dep '
-		dev-lua/LuaBitOp[${LUA_USEDEP}]
-		dev-lua/lua-argparse[${LUA_USEDEP}]
-	')
-	acct-group/rspamd
-	acct-user/rspamd
-	app-arch/zstd:=
-	dev-db/sqlite:3
-	dev-libs/glib:2
-	dev-libs/icu:=
-	dev-libs/libpcre2:=[jit=]
-	dev-libs/libsodium:=
-	dev-libs/openssl:0=[-bindist(-)]
-	dev-libs/snowball-stemmer:=
-	sys-libs/zlib
-	blas? (
-		virtual/blas
-		virtual/lapack
-	)
-	hyperscan? ( dev-libs/vectorscan:= )
-	jemalloc? ( dev-libs/jemalloc:= )
-	selinux? ( sec-policy/selinux-spamassassin )
-"
-DEPEND="
-	${RDEPEND}
-	dev-cpp/doctest
-	dev-libs/libfmt:=
-	>=dev-libs/xxhash-0.8.0
-"
-BDEPEND="
-	dev-lang/perl
-	dev-util/ragel
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}/rspamd-3.6-cmake-lua-version.patch"
-	"${FILESDIR}/rspamd-3.6-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-3.6-unbundle-snowball.patch"
-)
-
-src_prepare() {
-	cmake_src_prepare
-
-	rm -vrf contrib/{doctest,fmt,lua-{argparse,bit},snowball,xxhash,zstd} || die
-
-	> cmake/Toolset.cmake || die #827550
-
-	sed -i -e 's/User=_rspamd/User=rspamd/g' \
-		rspamd.service \
-		|| die
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DCONFDIR=/etc/rspamd
-		-DRUNDIR=/var/run/rspamd
-		-DDBDIR=/var/lib/rspamd
-		-DLOGDIR=/var/log/rspamd
-		-DLIBDIR="/usr/$(get_libdir)/rspamd"
-
-		-DSYSTEM_DOCTEST=ON
-		-DSYSTEM_FMT=ON
-		-DSYSTEM_XXHASH=ON
-		-DSYSTEM_ZSTD=ON
-
-		# For bundled https://github.com/bombela/backward-cpp
-		# Bundled backward library uses execinfo.h in current setting, which is
-		# available in glibc, but not in musl. Let's enable it for glibc only.
-		-DENABLE_BACKWARD=$(usex elibc_glibc ON OFF) # bug 917643
-		-DSTACK_DETAILS_AUTO_DETECT=OFF
-
-		-DENABLE_BLAS=$(usex blas ON OFF)
-		-DENABLE_HYPERSCAN=$(usex hyperscan ON OFF)
-		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
-		-DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
-		-DENABLE_PCRE2=ON
-	)
-	cmake_src_configure
-}
-
-src_test() {
-	cmake_build run-test
-}
-
-src_install() {
-	cmake_src_install
-
-	newconfd "${FILESDIR}"/rspamd.conf rspamd
-	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
-	systemd_newunit rspamd.service rspamd.service
-
-	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
-
-	# Remove mprotect for JIT support
-	if use lua_single_target_luajit; then
-		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
-	fi
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
-
-	diropts -o rspamd -g rspamd
-	keepdir /var/{lib,log}/rspamd
-}
-
-pkg_postinst() {
-	tmpfiles_process "${PN}.conf"
-
-	for ver in ${REPLACING_VERSIONS}; do
-		if ver_test "${ver}" -eq "3.4"; then
-			elog "rspamd-3.4 is known to segfault when it is updated from older version due"
-			elog "to a page-alignment of hyperscan .unser files. The issue was patched in"
-			elog "rspamd-3.4-r1 ebuild revision. All possibly broken .unser files will be"
-			elog "automaticaly removed. See https://github.com/rspamd/rspamd/issues/4329 for"
-			elog "more information."
-
-			find "${EROOT}/var/lib/rspamd" -type f -name '*.unser' -delete
-		fi
-	done
-}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2024-07-13 20:43 Petr Vaněk
  0 siblings, 0 replies; 22+ messages in thread
From: Petr Vaněk @ 2024-07-13 20:43 UTC (permalink / raw
  To: gentoo-commits

commit:     868baf98108d1975cc049a622e90485f74ee9082
Author:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 13 20:40:25 2024 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Sat Jul 13 20:42:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=868baf98

mail-filter/rspamd: add 3.9.0

Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 mail-filter/rspamd/Manifest                        |   1 +
 .../rspamd/files/rspamd-3.9.0-older-libfmt.patch   | 184 +++++++++++++++++++++
 mail-filter/rspamd/rspamd-3.9.0.ebuild             | 155 +++++++++++++++++
 3 files changed, 340 insertions(+)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index dd2b12eb7b18..89a5f23e7ef2 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1 +1,2 @@
 DIST rspamd-3.8.4.tar.gz 5915680 BLAKE2B a6674c5175a10dffa440b9f4227fc4f2e7c497bf8a5a6c87c9f042ca870380a61be63405f4d2714103f49679edd5a28c4eb30807b8acb22998c7dbba72f19cb3 SHA512 dda099dd9a17699d143fc8018b89fbecfa9659eccc26b5fb88bc3f40c47e935993dfc81f1f93bb69880d17af40870e6ea20edbeed7e3f4c12c278f5c12b56a51
+DIST rspamd-3.9.0.tar.gz 5955138 BLAKE2B 52eea9b11c3780bdd54d24a4ae49d7f1c598fa2748cf1d1b4e4cd19fff50fcfcfafe5140038efa437104ba71e6e968a39613e86b642df7be84553c96123a90fa SHA512 7e75df264de5c778e92aac72be5d701724896ef60dc7f7e41f91a89193b812896dff56f6434233eaa91b5cdf8e6aa863f39129a154520a08b52bcb04c61b965e

diff --git a/mail-filter/rspamd/files/rspamd-3.9.0-older-libfmt.patch b/mail-filter/rspamd/files/rspamd-3.9.0-older-libfmt.patch
new file mode 100644
index 000000000000..0b6de27f5689
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.9.0-older-libfmt.patch
@@ -0,0 +1,184 @@
+From 0826efdadc36a7f1f4251f0450101fb5cbb1c94f Mon Sep 17 00:00:00 2001
+From: Petr Vaněk <arkamar@gentoo.org>
+Date: Sat, 13 Jul 2024 15:53:28 +0200
+Subject: [PATCH] backward compatibility with <dev-libs/libfmt-11
+
+Upstream updated bundled libfmt to version 11 [1], where fmt/core.h was
+renamed to fmt/base.h [2]. Rspamd switched to a new header file but
+libfmt reintroduced fmt/core.h later for compatibility reasons. This
+patch switches fmt/base.h back to fmt/core.h in order to be able to work
+with <dev-libs/libfmt-11.
+
+[1] https://github.com/rspamd/rspamd/commit/19299911dc7b951fa9649b918a661026a5d0e450
+[2] https://github.com/fmtlib/fmt/commit/79f1506fe3a7fae7c22c55d3cd7cdc33bc536dae
+[3] https://github.com/fmtlib/fmt/commit/58a6bd48a8dc7ea74bb9fd900c60fd333a85725f
+
+diff --git a/src/libmime/lang_detection_fasttext.cxx b/src/libmime/lang_detection_fasttext.cxx
+index 89916151f..5c3549c8e 100644
+--- a/src/libmime/lang_detection_fasttext.cxx
++++ b/src/libmime/lang_detection_fasttext.cxx
+@@ -20,7 +20,7 @@
+ #include "fasttext/fasttext.h"
+ #include "libserver/cfg_file.h"
+ #include "libserver/logger.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "stat_api.h"
+ #include <exception>
+ #include <string_view>
+diff --git a/src/libserver/backtrace.cxx b/src/libserver/backtrace.cxx
+index c24e61936..330c829b0 100644
+--- a/src/libserver/backtrace.cxx
++++ b/src/libserver/backtrace.cxx
+@@ -19,7 +19,7 @@
+ #ifdef BACKWARD_ENABLE
+ 
+ #include "contrib/backward-cpp/backward.hpp"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "logger.h"
+ 
+ namespace rspamd {
+diff --git a/src/libserver/cfg_rcl.cxx b/src/libserver/cfg_rcl.cxx
+index ce3df4010..f0c9db64d 100644
+--- a/src/libserver/cfg_rcl.cxx
++++ b/src/libserver/cfg_rcl.cxx
+@@ -34,7 +34,7 @@
+ #include <algorithm>// for std::transform
+ #include <memory>
+ #include "contrib/ankerl/unordered_dense.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "libutil/cxx/util.hxx"
+ #include "libutil/cxx/file_util.hxx"
+ #include "frozen/unordered_set.h"
+diff --git a/src/libserver/cfg_utils.cxx b/src/libserver/cfg_utils.cxx
+index 1344bc4f9..adc23f590 100644
+--- a/src/libserver/cfg_utils.cxx
++++ b/src/libserver/cfg_utils.cxx
+@@ -65,7 +65,7 @@
+ #include <string>
+ #include <string_view>
+ #include <vector>
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "cxx/util.hxx"
+ #include "frozen/unordered_map.h"
+ #include "frozen/string.h"
+diff --git a/src/libserver/css/css_parser.cxx b/src/libserver/css/css_parser.cxx
+index 11fa830f0..c016b9d9d 100644
+--- a/src/libserver/css/css_parser.cxx
++++ b/src/libserver/css/css_parser.cxx
+@@ -20,7 +20,7 @@
+ #include "css_rule.hxx"
+ #include "css_util.hxx"
+ #include "css.hxx"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ 
+ #include <vector>
+ #include <unicode/utf8.h>
+diff --git a/src/libserver/css/css_selector.cxx b/src/libserver/css/css_selector.cxx
+index d2ae093cb..61bd8750f 100644
+--- a/src/libserver/css/css_selector.cxx
++++ b/src/libserver/css/css_selector.cxx
+@@ -17,7 +17,7 @@
+ #include "css_selector.hxx"
+ #include "css.hxx"
+ #include "libserver/html/html.hxx"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL
+ #include "doctest/doctest.h"
+ 
+diff --git a/src/libserver/css/css_value.cxx b/src/libserver/css/css_value.cxx
+index f2ff55363..64ebc536f 100644
+--- a/src/libserver/css/css_value.cxx
++++ b/src/libserver/css/css_value.cxx
+@@ -20,7 +20,7 @@
+ #include "frozen/string.h"
+ #include "libutil/util.h"
+ #include "contrib/ankerl/unordered_dense.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ 
+ #define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL
+ #include "doctest/doctest.h"
+diff --git a/src/libserver/hyperscan_tools.cxx b/src/libserver/hyperscan_tools.cxx
+index 5035bee2c..6f8450e6a 100644
+--- a/src/libserver/hyperscan_tools.cxx
++++ b/src/libserver/hyperscan_tools.cxx
+@@ -21,7 +21,7 @@
+ #include <filesystem>
+ #include "contrib/ankerl/unordered_dense.h"
+ #include "contrib/ankerl/svector.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "libutil/cxx/file_util.hxx"
+ #include "libutil/cxx/error.hxx"
+ #include "hs.h"
+diff --git a/src/libserver/symcache/symcache_impl.cxx b/src/libserver/symcache/symcache_impl.cxx
+index 7159555d2..4ea087024 100644
+--- a/src/libserver/symcache/symcache_impl.cxx
++++ b/src/libserver/symcache/symcache_impl.cxx
+@@ -21,7 +21,7 @@
+ #include "unix-std.h"
+ #include "libutil/cxx/file_util.hxx"
+ #include "libutil/cxx/util.hxx"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "contrib/t1ha/t1ha.h"
+ 
+ #ifdef __has_include
+diff --git a/src/libserver/symcache/symcache_item.cxx b/src/libserver/symcache/symcache_item.cxx
+index 4a9581fe7..490a87880 100644
+--- a/src/libserver/symcache/symcache_item.cxx
++++ b/src/libserver/symcache/symcache_item.cxx
+@@ -17,7 +17,7 @@
+ #include "lua/lua_common.h"
+ #include "symcache_internal.hxx"
+ #include "symcache_item.hxx"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "libserver/task.h"
+ #include "libutil/cxx/util.hxx"
+ #include <numeric>
+diff --git a/src/libstat/backends/cdb_backend.cxx b/src/libstat/backends/cdb_backend.cxx
+index bd05e8ef8..1d2b54d4c 100644
+--- a/src/libstat/backends/cdb_backend.cxx
++++ b/src/libstat/backends/cdb_backend.cxx
+@@ -28,7 +28,7 @@
+ #include <optional>
+ #include "contrib/expected/expected.hpp"
+ #include "contrib/ankerl/unordered_dense.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ 
+ namespace rspamd::stat::cdb {
+ 
+diff --git a/src/libstat/backends/redis_backend.cxx b/src/libstat/backends/redis_backend.cxx
+index 06842b078..6abcfa122 100644
+--- a/src/libstat/backends/redis_backend.cxx
++++ b/src/libstat/backends/redis_backend.cxx
+@@ -19,7 +19,7 @@
+ #include "stat_internal.h"
+ #include "upstream.h"
+ #include "libserver/mempool_vars_internal.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ 
+ #include "libutil/cxx/error.hxx"
+ 
+diff --git a/test/rspamd_cxx_unit_dkim.hxx b/test/rspamd_cxx_unit_dkim.hxx
+index d445c3800..6d3b4207e 100644
+--- a/test/rspamd_cxx_unit_dkim.hxx
++++ b/test/rspamd_cxx_unit_dkim.hxx
+@@ -21,7 +21,7 @@
+ 
+ #define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL
+ #include "doctest/doctest.h"
+-#include "fmt/base.h"
++#include "fmt/core.h"
+ #include "libserver/dkim.h"
+ 
+ #include <vector>

diff --git a/mail-filter/rspamd/rspamd-3.9.0.ebuild b/mail-filter/rspamd/rspamd-3.9.0.ebuild
new file mode 100644
index 000000000000..40c66dca1317
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-3.9.0.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit cmake lua-single pax-utils systemd tmpfiles
+
+if [[ ${PV} == *9999 ]] ; then
+	EGIT_REPO_URI="https://github.com/rspamd/rspamd.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/rspamd/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Rapid spam filtering system"
+HOMEPAGE="
+	https://rspamd.com
+	https://github.com/rspamd/rspamd
+"
+
+LICENSE="Apache-2.0 Boost-1.0 BSD BSD-1 BSD-2 CC0-1.0 LGPL-3 MIT public-domain unicode ZLIB"
+SLOT="0"
+IUSE="blas +hyperscan jemalloc +jit selinux test"
+RESTRICT="!test? ( test )"
+
+# A part of tests use ffi luajit extension
+REQUIRED_USE="${LUA_REQUIRED_USE}
+	test? ( lua_single_target_luajit )"
+
+RDEPEND="
+	${LUA_DEPS}
+	$(lua_gen_cond_dep '
+		dev-lua/LuaBitOp[${LUA_USEDEP}]
+		dev-lua/lua-argparse[${LUA_USEDEP}]
+	')
+	acct-group/rspamd
+	acct-user/rspamd
+	app-arch/libarchive:=
+	app-arch/zstd:=
+	dev-db/sqlite:3
+	dev-libs/glib:2
+	dev-libs/icu:=
+	dev-libs/libpcre2:=[jit=]
+	dev-libs/libsodium:=
+	dev-libs/openssl:0=[-bindist(-)]
+	dev-libs/snowball-stemmer:=
+	sys-libs/zlib
+	blas? (
+		virtual/blas
+		virtual/lapack
+	)
+	hyperscan? ( dev-libs/vectorscan:= )
+	jemalloc? ( dev-libs/jemalloc:= )
+	selinux? ( sec-policy/selinux-spamassassin )
+"
+DEPEND="
+	${RDEPEND}
+	dev-cpp/doctest
+	dev-libs/libfmt:=
+	>=dev-libs/xxhash-0.8.0
+"
+BDEPEND="
+	dev-lang/perl
+	dev-util/ragel
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/rspamd-3.6-cmake-lua-version.patch"
+	"${FILESDIR}/rspamd-3.6-unbundle-lua.patch"
+	"${FILESDIR}/rspamd-3.6-unbundle-snowball.patch"
+
+	# backward compatibility with <dev-libs/libfmt-11
+	"${FILESDIR}/${P}-older-libfmt.patch"
+)
+
+src_prepare() {
+	cmake_src_prepare
+
+	rm -vrf contrib/{doctest,fmt,lua-{argparse,bit},snowball,xxhash,zstd} || die
+
+	> cmake/Toolset.cmake || die #827550
+
+	sed -i -e 's/User=_rspamd/User=rspamd/g' \
+		rspamd.service \
+		|| die
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DCONFDIR=/etc/rspamd
+		-DRUNDIR=/var/run/rspamd
+		-DDBDIR=/var/lib/rspamd
+		-DLOGDIR=/var/log/rspamd
+		-DLIBDIR="/usr/$(get_libdir)/rspamd"
+
+		-DSYSTEM_DOCTEST=ON
+		-DSYSTEM_FMT=ON
+		-DSYSTEM_XXHASH=ON
+		-DSYSTEM_ZSTD=ON
+
+		# For bundled https://github.com/bombela/backward-cpp
+		# Bundled backward library uses execinfo.h in current setting, which is
+		# available in glibc, but not in musl. Let's enable it for glibc only.
+		-DENABLE_BACKWARD=$(usex elibc_glibc ON OFF) # bug 917643
+		-DSTACK_DETAILS_AUTO_DETECT=OFF
+
+		-DENABLE_BLAS=$(usex blas ON OFF)
+		-DENABLE_HYPERSCAN=$(usex hyperscan ON OFF)
+		-DENABLE_JEMALLOC=$(usex jemalloc ON OFF)
+		-DENABLE_LUAJIT=$(usex lua_single_target_luajit ON OFF)
+		-DENABLE_PCRE2=ON
+
+		-DBUILD_TESTING=$(usex test ON OFF)
+	)
+	cmake_src_configure
+}
+
+src_test() {
+	# These variables ensure tests use Lua scripts from this package rather
+	# than the installed version. However, rspamd always first attempts to load
+	# from /etc/rspamd/lua, with no method to override this behavior.
+	LUA_PATH="${S}/contrib/lua-?/?.lua" \
+	LUALIBDIR="${S}/lualib" \
+	RULESDIR="${S}/lualib" \
+	cmake_src_test
+}
+
+src_install() {
+	cmake_src_install
+
+	newconfd "${FILESDIR}"/rspamd.conf rspamd
+	newinitd "${FILESDIR}/rspamd-r7.init" rspamd
+	systemd_newunit rspamd.service rspamd.service
+
+	newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+
+	# Remove mprotect for JIT support
+	if use lua_single_target_luajit; then
+		pax-mark m "${ED}"/usr/bin/rspamd-* "${ED}"/usr/bin/rspamadm-*
+	fi
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
+
+	diropts -o rspamd -g rspamd
+	keepdir /var/{lib,log}/rspamd
+}
+
+pkg_postinst() {
+	tmpfiles_process "${PN}.conf"
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
@ 2024-10-02 17:44 Petr Vaněk
  0 siblings, 0 replies; 22+ messages in thread
From: Petr Vaněk @ 2024-10-02 17:44 UTC (permalink / raw
  To: gentoo-commits

commit:     a420be1dffb7d144cda2161519165a47d1c22d45
Author:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  2 17:36:00 2024 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Wed Oct  2 17:43:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a420be1d

mail-filter/rspamd: fix build issue with lua5-{3,4}

Backport patch, which fixes a build issue with Lua 5.3 and 5.4.

Issue: https://github.com/rspamd/rspamd/issues/5163
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 .../rspamd/files/rspamd-3.10.0-libucl-type.patch   | 36 ++++++++++++++++++++++
 ...spamd-3.10.0.ebuild => rspamd-3.10.0-r1.ebuild} |  3 ++
 2 files changed, 39 insertions(+)

diff --git a/mail-filter/rspamd/files/rspamd-3.10.0-libucl-type.patch b/mail-filter/rspamd/files/rspamd-3.10.0-libucl-type.patch
new file mode 100644
index 000000000000..25d4c32d26ff
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.10.0-libucl-type.patch
@@ -0,0 +1,36 @@
+From 3041484f859f3d8cc2275c5189280c31ff3ffeda Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
+Date: Wed, 2 Oct 2024 15:01:07 +0200
+Subject: [PATCH] [Fix] Use correct type for keylen in lua_ucl_newindex
+
+The keylen variable used in lua_ucl_newindex function should use size_t
+type instead of lua_Integer, because all functions that use keylen
+expect it to be of size_t type. This mismatch leads to incompatible
+pointer types, and modern versions of GCC fail to compile the code.
+
+Fixes: 9e87597ceb05 ("[Project] Allow manipulations with opaque UCL objects")
+Issue: https://github.com/rspamd/rspamd/issues/5163
+PR: https://github.com/rspamd/rspamd/pull/5169
+
+diff --git a/contrib/libucl/lua_ucl.c b/contrib/libucl/lua_ucl.c
+index 19ac9cb127..473aefe0cf 100644
+--- a/contrib/libucl/lua_ucl.c
++++ b/contrib/libucl/lua_ucl.c
+@@ -1426,7 +1426,7 @@ lua_ucl_newindex(lua_State *L)
+ 
+ 	if (ucl_object_type(obj) == UCL_OBJECT) {
+ 		if (key_type == LUA_TSTRING) {
+-			lua_Integer keylen;
++			size_t keylen;
+ 			const char *key = lua_tolstring(L, 2, &keylen);
+ 
+ 			ucl_object_t *value_obj = lua_ucl_object_get(L, 3);
+@@ -1539,7 +1539,7 @@ lua_ucl_newindex(lua_State *L)
+ 			obj->value.av = NULL;
+ 			obj->type = UCL_OBJECT;
+ 
+-			lua_Integer keylen;
++			size_t keylen;
+ 			const char *key = lua_tolstring(L, 2, &keylen);
+ 
+ 			ucl_object_t *value_obj = lua_ucl_object_get(L, 3);

diff --git a/mail-filter/rspamd/rspamd-3.10.0.ebuild b/mail-filter/rspamd/rspamd-3.10.0-r1.ebuild
similarity index 97%
rename from mail-filter/rspamd/rspamd-3.10.0.ebuild
rename to mail-filter/rspamd/rspamd-3.10.0-r1.ebuild
index 45df6738554b..8fb906ba42cb 100644
--- a/mail-filter/rspamd/rspamd-3.10.0.ebuild
+++ b/mail-filter/rspamd/rspamd-3.10.0-r1.ebuild
@@ -75,6 +75,9 @@ PATCHES=(
 
 	# backward compatibility with <dev-libs/libfmt-11
 	"${FILESDIR}/${PN}-3.9.0-older-libfmt.patch"
+
+	# see https://github.com/rspamd/rspamd/issues/5163
+	"${FILESDIR}/${P}-libucl-type.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2024-10-02 17:44 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-26 19:33 [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/ Dirkjan Ochtman
  -- strict thread matches above, loose matches on Subject: below --
2024-10-02 17:44 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-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-01-13 16:30 Dirkjan Ochtman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox