public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2020-04-04  8:06 Joonas Niilola
  0 siblings, 0 replies; 21+ messages in thread
From: Joonas Niilola @ 2020-04-04  8:06 UTC (permalink / raw
  To: gentoo-commits

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

mail-filter/rspamd: clean old

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

 mail-filter/rspamd/Manifest                        |  2 -
 .../rspamd/files/rspamd-2.2-i386-hyperscan.patch   | 15 ----
 mail-filter/rspamd/rspamd-2.1.ebuild               | 95 ---------------------
 mail-filter/rspamd/rspamd-2.2.ebuild               | 98 ----------------------
 4 files changed, 210 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index bf68858b2d9..c1caf263ac8 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,5 +1,3 @@
-DIST rspamd-2.1.tar.gz 4232297 BLAKE2B 4685fa404e5a66d2295da57ece8ce1830507b3464c5136952dbb85847a5002c9c45c4f5430d0d60bc199f3aeafde7abf3ac218451f1609b81a5edfd4d0394588 SHA512 7ecd42e9196ccad29a18bb3e6153fd13d3564c1630c4ec88c712d180f789ad2c36755bfeff65e8dd82737debfb5530a6ec4eb401b49dd82b9eb1dbdea991f84f
-DIST rspamd-2.2.tar.gz 4257574 BLAKE2B 3717736ecefea49cfc9e8bf312bdeafa8650dfe1b0a4410d98693add30c77cb054c7620ecc421edd69a2d8bfc1bcb02183951069b15774a588359da8bfb26ac9 SHA512 e62367b9d663a005686e3eef216a7913c6050125e96582e2a58ef459e14512c1bcf09108050ff8ef524ba5e7a3c78559805353a25510654d8764f985757b32fe
 DIST rspamd-2.3.tar.gz 4409924 BLAKE2B 825326c8c92b9937be1aed8640acc1c94762bf8de564642e4d1d429025eb9cc7ba943217b35c881c92b888cff0bec68ffae737bfc77ccb02bfc2ebd9d5948bcc SHA512 20fae1b088acafaaaa406980dc10da5efa66680f10ca8f0d262ddc735a0498f2026091806206995430d28ae27a7d348556eb1586a9217a02c39dfcf0f7c6eb95
 DIST rspamd-2.4.tar.gz 4462119 BLAKE2B 073a27dc8ca76ede3928a2bbc1c3908d442e2d70e0cb51fea73f23fea55536f84e8154b7b6423af13002c0bd5cda60ae9948b3c6321a73d365c7fbd6541c3dca SHA512 47d64fdadc1c61642efebe4772add48848a45c8106bf431dacb458d85cdd9bf996ca46bcb75d60cedb15ae72518089e9b3e63a0716d22843f5b9f38d7d86be08
 DIST rspamd-2.5.tar.gz 4490310 BLAKE2B 8d117b1b03e8092d0c724a4da4de23dd145f5b22696aa6b4ef1c208ade28f0d143dd783c9173b6987514b2aef9327ff8fd29eeae5e3da3039d2568384e50a697 SHA512 6068309da98eeb75f95188414b12ce9443aef31200853f820646e70e1dbf2d9d1e2c661a86df2183c175cc01cfb09f6a5c7b8ba358901a56ec6cdb9d9fef4540

diff --git a/mail-filter/rspamd/files/rspamd-2.2-i386-hyperscan.patch b/mail-filter/rspamd/files/rspamd-2.2-i386-hyperscan.patch
deleted file mode 100644
index 578d3da7fa3..00000000000
--- a/mail-filter/rspamd/files/rspamd-2.2-i386-hyperscan.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-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.1.ebuild b/mail-filter/rspamd/rspamd-2.1.ebuild
deleted file mode 100644
index b5ff98b60e8..00000000000
--- a/mail-filter/rspamd/rspamd-2.1.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-utils 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 libressl pcre2"
-
-RDEPEND="
-	acct-group/rspamd
-	acct-user/rspamd
-	dev-db/sqlite:3
-	dev-libs/glib:2
-	dev-libs/icu:=
-	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 )
-	jemalloc? ( dev-libs/jemalloc )
-	jit? ( dev-lang/luajit:2 )
-	!jit? ( dev-lang/lua:* )
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	pcre2? ( dev-libs/libpcre2[jit=] )
-	!pcre2? ( dev-libs/libpcre[jit=] )"
-DEPEND="${RDEPEND}"
-
-src_prepare() {
-	cmake-utils_src_prepare
-
-	sed -i -e '/PROJECT/s/LANGUAGES C ASM/LANGUAGES C CXX ASM/' CMakeLists.txt \
-		|| die "sed CMakeLists.txt failed"
-	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_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_test() {
-	cmake-utils_src_test
-}
-
-src_install() {
-	cmake-utils_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 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-2.2.ebuild b/mail-filter/rspamd/rspamd-2.2.ebuild
deleted file mode 100644
index ffab3a9e62c..00000000000
--- a/mail-filter/rspamd/rspamd-2.2.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake 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 libressl pcre2"
-
-RDEPEND="
-	acct-group/rspamd
-	acct-user/rspamd
-	dev-db/sqlite:3
-	dev-libs/glib:2
-	dev-libs/icu:=
-	dev-libs/libev
-	dev-libs/libsodium
-	dev-util/ragel
-	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:* )
-	!libressl? ( dev-libs/openssl:0=[-bindist] )
-	libressl? ( dev-libs/libressl:0= )
-	pcre2? ( dev-libs/libpcre2[jit=] )
-	!pcre2? ( dev-libs/libpcre[jit=] )"
-DEPEND="${RDEPEND}"
-
-PATCHES=( "${FILESDIR}/${P}-i386-hyperscan.patch" )
-
-src_prepare() {
-	cmake_src_prepare
-
-	sed -i -e '/PROJECT/s/LANGUAGES C ASM/LANGUAGES C CXX ASM/' CMakeLists.txt \
-		|| die "sed CMakeLists.txt failed"
-	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 jit 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 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] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2023-05-29 10:59 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2023-05-29 10:59 UTC (permalink / raw
  To: gentoo-commits

commit:     d0e615e314d69085bf006960ed4ac714d58f02b4
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun May 28 19:04:32 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon May 29 10:58:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0e615e3

mail-filter/rspamd: drop 3.4-r3

Bug: https://bugs.gentoo.org/905345
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 mail-filter/rspamd/Manifest                        |   1 -
 .../rspamd/files/rspamd-3.3-remove-test-case.patch |  20 ---
 mail-filter/rspamd/files/rspamd-3.4-gcc-13.patch   |  30 ----
 .../rspamd-3.4-hyperscan-page-alignment.patch      |  28 ----
 mail-filter/rspamd/rspamd-3.4-r3.ebuild            | 153 ---------------------
 5 files changed, 232 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index bcee383412e4..1b42f54a09d7 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,2 +1 @@
-DIST rspamd-3.4.tar.gz 5689732 BLAKE2B 8d1b98205f51cfe834db3ed53b8be72ada834980380cba06c4470689d16ef4a6396190ae27044ae76a7b35df6afd3cdf551f9469d878ac69ec61ef6b86b46104 SHA512 fec8cb7b845bf25d02f1c32c82bf35ad9c65f3301a73f3ea611b6fcfa0ac1b75f75561c4c42f142f876ac3a78f96fd91d22d30c5b3600e4001e25f06bc693ccf
 DIST rspamd-3.5.tar.gz 5806722 BLAKE2B 547cd9bb26942dc584d1f4b164e61bdb15505a56399fa19b358b7d7525ee983acc8d5ae1fdb3de340e3461a03aedbb48266fd81404c1f4a2e8fc5bd6735d9a62 SHA512 39c87d5dfd9ae1fc7709e19967eac5e7c7dc83fa070dfebbb7ab5411d7d50d6e6f10248ada717cf1cb3f6ff6c5bfb4d31fd87e1a7e1b2e5f876f6be7b5705623

diff --git a/mail-filter/rspamd/files/rspamd-3.3-remove-test-case.patch b/mail-filter/rspamd/files/rspamd-3.3-remove-test-case.patch
deleted file mode 100644
index 0cad11382b21..000000000000
--- a/mail-filter/rspamd/files/rspamd-3.3-remove-test-case.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Remove test case which does not work with luajit-2.1 anymore as it
-depends on internal behavior of lujait-2.0.
-
-Upstream-PR: https://github.com/rspamd/rspamd/pull/4323
-
-diff --git a/test/lua/unit/lua_util.extract_specific_urls.lua b/test/lua/unit/lua_util.extract_specific_urls.lua
-index 05ffeb7b0..a7e2f9f48 100644
---- a/test/lua/unit/lua_util.extract_specific_urls.lua
-+++ b/test/lua/unit/lua_util.extract_specific_urls.lua
-@@ -108,7 +108,6 @@ context("Lua util - extract_specific_urls plain", function()
-   local cases = {
-     {expect = url_list, filter = nil, limit = 9999, need_emails = true, prefix = 'p'},
-     {expect = {}, filter = (function() return false end), limit = 9999, need_emails = true, prefix = 'p'},
--    {expect = {"domain4.co.net", "test.com"}, filter = nil, limit = 2, need_emails = true, prefix = 'p'},
-     {expect = {"domain4.co.net", "test.com", "domain3.org"}, filter = nil, limit = 3, need_emails = true, prefix = 'p'},
-     {
-       expect = {"gov.co.net", "tesco.co.net", "domain1.co.net", "domain2.co.net", "domain3.co.net", "domain4.co.net"},
--- 
-2.37.4
-

diff --git a/mail-filter/rspamd/files/rspamd-3.4-gcc-13.patch b/mail-filter/rspamd/files/rspamd-3.4-gcc-13.patch
deleted file mode 100644
index f660b353fec7..000000000000
--- a/mail-filter/rspamd/files/rspamd-3.4-gcc-13.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-https://github.com/rspamd/rspamd/commit/0a916c632e18e6686e1a2256d5ef2fe1a1cc239f
-
-From 0a916c632e18e6686e1a2256d5ef2fe1a1cc239f Mon Sep 17 00:00:00 2001
-From: Heiko Becker <heirecka@exherbo.org>
-Date: Wed, 18 Jan 2023 23:54:24 +0100
-Subject: [PATCH] Fix build with gcc 13 by including <cstdint>
-
-Like other versions before, gcc 13 moved some includes around and as a
-result <cstdint> is no longer transitively included. Explicitly include
-it for uint8_t.
---- a/src/libserver/css/css_tokeniser.hxx
-+++ b/src/libserver/css/css_tokeniser.hxx
-@@ -24,6 +24,7 @@
- #include <variant>
- #include <list>
- #include <functional>
-+#include <cstdint>
- #include "mem_pool.h"
- 
- namespace rspamd::css {
---- a/src/libserver/html/html_tag.hxx
-+++ b/src/libserver/html/html_tag.hxx
-@@ -23,6 +23,7 @@
- #include <variant>
- #include <vector>
- #include <optional>
-+#include <cstdint>
- 
- #include "html_tags.h"
- 

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
deleted file mode 100644
index 913f1f7ecd4d..000000000000
--- a/mail-filter/rspamd/files/rspamd-3.4-hyperscan-page-alignment.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-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-r3.ebuild b/mail-filter/rspamd/rspamd-3.4-r3.ebuild
deleted file mode 100644
index a58ca9510131..000000000000
--- a/mail-filter/rspamd/rspamd-3.4-r3.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 )"
-
-# for <dev-libs/libfmt-10 see https://github.com/rspamd/rspamd/issues/4482
-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-10:=
-	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}/${PN}-3.0-cmake-lua-version.patch"
-	"${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"
-	"${FILESDIR}/${P}-gcc-13.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] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2023-01-26  7:23 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2023-01-26  7:23 UTC (permalink / raw
  To: gentoo-commits

commit:     8bf21588a1ff873679440c9b751aedec9ae783fa
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 26 07:21:40 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 26 07:21:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bf21588

mail-filter/rspamd: fix build w/ gcc 13

Signed-off-by: Sam James <sam <AT> gentoo.org>

 mail-filter/rspamd/files/rspamd-3.4-gcc-13.patch | 30 ++++++++++++++++++++++++
 mail-filter/rspamd/rspamd-3.4-r2.ebuild          |  1 +
 2 files changed, 31 insertions(+)

diff --git a/mail-filter/rspamd/files/rspamd-3.4-gcc-13.patch b/mail-filter/rspamd/files/rspamd-3.4-gcc-13.patch
new file mode 100644
index 000000000000..f660b353fec7
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.4-gcc-13.patch
@@ -0,0 +1,30 @@
+https://github.com/rspamd/rspamd/commit/0a916c632e18e6686e1a2256d5ef2fe1a1cc239f
+
+From 0a916c632e18e6686e1a2256d5ef2fe1a1cc239f Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Wed, 18 Jan 2023 23:54:24 +0100
+Subject: [PATCH] Fix build with gcc 13 by including <cstdint>
+
+Like other versions before, gcc 13 moved some includes around and as a
+result <cstdint> is no longer transitively included. Explicitly include
+it for uint8_t.
+--- a/src/libserver/css/css_tokeniser.hxx
++++ b/src/libserver/css/css_tokeniser.hxx
+@@ -24,6 +24,7 @@
+ #include <variant>
+ #include <list>
+ #include <functional>
++#include <cstdint>
+ #include "mem_pool.h"
+ 
+ namespace rspamd::css {
+--- a/src/libserver/html/html_tag.hxx
++++ b/src/libserver/html/html_tag.hxx
+@@ -23,6 +23,7 @@
+ #include <variant>
+ #include <vector>
+ #include <optional>
++#include <cstdint>
+ 
+ #include "html_tags.h"
+ 

diff --git a/mail-filter/rspamd/rspamd-3.4-r2.ebuild b/mail-filter/rspamd/rspamd-3.4-r2.ebuild
index 67c7e30c3e00..0a63b92b87b8 100644
--- a/mail-filter/rspamd/rspamd-3.4-r2.ebuild
+++ b/mail-filter/rspamd/rspamd-3.4-r2.ebuild
@@ -73,6 +73,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-2.5-unbundle-snowball.patch"
 	"${FILESDIR}/${PN}-3.3-remove-test-case.patch"
 	"${FILESDIR}/${PN}-3.4-hyperscan-page-alignment.patch"
+	"${FILESDIR}/${P}-gcc-13.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2022-12-24  8:59 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2022-12-24  8:59 UTC (permalink / raw
  To: gentoo-commits

commit:     7c78c5f223626fb3bb688cce6e50068e90cb1704
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 20 21:14:40 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 24 08:58:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c78c5f2

mail-filter/rspamd: drop 2.7-r104

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 mail-filter/rspamd/Manifest                        |   1 -
 .../rspamd/files/rspamd-2.6-unbundle-lua.patch     |  53 ---------
 .../files/rspamd-2.7-cmake-lua-version.patch       |  49 --------
 .../rspamd/files/rspamd-2.7-unbundle-zstd.patch    | 125 ---------------------
 mail-filter/rspamd/metadata.xml                    |   1 -
 mail-filter/rspamd/rspamd-2.7-r104.ebuild          | 116 -------------------
 6 files changed, 345 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index bca781f9d3ef..8892d1cbf45b 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,3 +1,2 @@
-DIST rspamd-2.7.tar.gz 5126227 BLAKE2B 70f57dba6ac9abe93d735d42e84bd17a1797035322029577a8e4376409bcee5345d4624925d3dd071bddce038858ebfdce8ee4f87f81b1fc8b1f71ad14e85930 SHA512 8779771baf85ef6ca1d7d2180429072ab1547ab834b073ee9222dcc6494efdd0a23f5e7ac52a777c23fd89296769f5b6f182593e714097c6f11ca7c9165e4ba7
 DIST rspamd-3.3.tar.gz 5680874 BLAKE2B 2fbafabc0a59ca4ad1bbdc1b7ceb5b5bc281dc75d2997ac50c080cdf5ced2582409e3f98b63239bab64fafbcc63016d857967fe00c371a6d5b896d170f5da4a9 SHA512 02c5e62cb9ce32cdd6da859c4afe2bf03fcaff456d79f68ab7c3c288a0b36f11a701825c3cb7f0ecaccd419f84ce693961c1ed955ce4dbcfe291a8e978e2e69c
 DIST rspamd-3.4.tar.gz 5689732 BLAKE2B 8d1b98205f51cfe834db3ed53b8be72ada834980380cba06c4470689d16ef4a6396190ae27044ae76a7b35df6afd3cdf551f9469d878ac69ec61ef6b86b46104 SHA512 fec8cb7b845bf25d02f1c32c82bf35ad9c65f3301a73f3ea611b6fcfa0ac1b75f75561c4c42f142f876ac3a78f96fd91d22d30c5b3600e4001e25f06bc693ccf

diff --git a/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch b/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch
deleted file mode 100644
index 9278fa8608d7..000000000000
--- a/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b794b9dbd..1ba5c085e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -632,10 +632,6 @@ ADD_SUBDIRECTORY(contrib/fastutf8)
- ADD_SUBDIRECTORY(contrib/google-ced)
- 
- 
--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)
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 9a34d2ac4..59bab5c15 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -189,10 +189,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 b7fcc2034..1d86464da 100644
---- a/src/lua/lua_common.c
-+++ b/src/lua/lua_common.c
-@@ -922,10 +922,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)
- {
-@@ -981,7 +977,6 @@ rspamd_lua_init (bool wipe_mem)
- 	luaopen_spf (L);
- 	luaopen_tensor (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-2.7-cmake-lua-version.patch b/mail-filter/rspamd/files/rspamd-2.7-cmake-lua-version.patch
deleted file mode 100644
index c8254f1ce95e..000000000000
--- a/mail-filter/rspamd/files/rspamd-2.7-cmake-lua-version.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 72382acb6..2335ae4bc 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -141,42 +141,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.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()
-+			MODULES lua)
- ENDIF(ENABLE_LUAJIT MATCHES "ON")
- 
- IF(ENABLE_JEMALLOC MATCHES "ON" AND NOT SANITIZE)
--- 

diff --git a/mail-filter/rspamd/files/rspamd-2.7-unbundle-zstd.patch b/mail-filter/rspamd/files/rspamd-2.7-unbundle-zstd.patch
deleted file mode 100644
index f0fc9f8352bd..000000000000
--- a/mail-filter/rspamd/files/rspamd-2.7-unbundle-zstd.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 77ad86785..56246807e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -202,6 +202,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
-@@ -619,7 +621,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 987123cbb..51c2e1468 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 14792753a..20ca8416e 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 31b0308cb..62ba3d833 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 096933803..f78754ab4 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 e879d37af..88451e222 100644
---- a/src/lua/lua_util.c
-+++ b/src/lua/lua_util.c
-@@ -15,7 +15,7 @@
-  */
- #include "lua_common.h"
- #include "unix-std.h"
--#include "contrib/zstd/zstd.h"
-+#include <zstd.h>
- #include "libmime/email_addr.h"
- #include "libmime/content_type.h"
- #include "libmime/mime_headers.h"
-diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
-index 3fa5da390..c641fb263 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>
- 

diff --git a/mail-filter/rspamd/metadata.xml b/mail-filter/rspamd/metadata.xml
index ebd97898f0a6..09b8498d3eb3 100644
--- a/mail-filter/rspamd/metadata.xml
+++ b/mail-filter/rspamd/metadata.xml
@@ -13,7 +13,6 @@
     <remote-id type="github">rspamd/rspamd</remote-id>
   </upstream>
   <use>
-    <flag name="pcre2">Use <pkg>dev-libs/libpcre2</pkg></flag>
     <flag name="jit">Enable PCRE JIT support</flag>
   </use>
 </pkgmetadata>

diff --git a/mail-filter/rspamd/rspamd-2.7-r104.ebuild b/mail-filter/rspamd/rspamd-2.7-r104.ebuild
deleted file mode 100644
index 12fd017ebb51..000000000000
--- a/mail-filter/rspamd/rspamd-2.7-r104.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-LUA_COMPAT=( lua5-{1..2} 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"
-
-REQUIRED_USE="${LUA_REQUIRED_USE}"
-
-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
-	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}/rspamd-2.7-cmake-lua-version.patch"
-	"${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-2.7-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] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2022-11-06  6:17 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2022-11-06  6:17 UTC (permalink / raw
  To: gentoo-commits

commit:     b022bb84a1fa213ed074ae78e01717683305ec75
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Sat Nov  5 19:27:38 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=b022bb84

mail-filter/rspamd: remove broken test case

Recent stabilization of luajit-2.1 triggered test phase failures related
to improperly designed test case. It was already removed from upstream,
see linked PR.

Upstream-PR: https://github.com/rspamd/rspamd/pull/4323
Bug: https://bugs.gentoo.org/879575
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../rspamd/files/rspamd-3.3-remove-test-case.patch   | 20 ++++++++++++++++++++
 mail-filter/rspamd/rspamd-3.3.ebuild                 |  1 +
 2 files changed, 21 insertions(+)

diff --git a/mail-filter/rspamd/files/rspamd-3.3-remove-test-case.patch b/mail-filter/rspamd/files/rspamd-3.3-remove-test-case.patch
new file mode 100644
index 000000000000..0cad11382b21
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.3-remove-test-case.patch
@@ -0,0 +1,20 @@
+Remove test case which does not work with luajit-2.1 anymore as it
+depends on internal behavior of lujait-2.0.
+
+Upstream-PR: https://github.com/rspamd/rspamd/pull/4323
+
+diff --git a/test/lua/unit/lua_util.extract_specific_urls.lua b/test/lua/unit/lua_util.extract_specific_urls.lua
+index 05ffeb7b0..a7e2f9f48 100644
+--- a/test/lua/unit/lua_util.extract_specific_urls.lua
++++ b/test/lua/unit/lua_util.extract_specific_urls.lua
+@@ -108,7 +108,6 @@ context("Lua util - extract_specific_urls plain", function()
+   local cases = {
+     {expect = url_list, filter = nil, limit = 9999, need_emails = true, prefix = 'p'},
+     {expect = {}, filter = (function() return false end), limit = 9999, need_emails = true, prefix = 'p'},
+-    {expect = {"domain4.co.net", "test.com"}, filter = nil, limit = 2, need_emails = true, prefix = 'p'},
+     {expect = {"domain4.co.net", "test.com", "domain3.org"}, filter = nil, limit = 3, need_emails = true, prefix = 'p'},
+     {
+       expect = {"gov.co.net", "tesco.co.net", "domain1.co.net", "domain2.co.net", "domain3.co.net", "domain4.co.net"},
+-- 
+2.37.4
+

diff --git a/mail-filter/rspamd/rspamd-3.3.ebuild b/mail-filter/rspamd/rspamd-3.3.ebuild
index b6932290133a..7231e72c2f72 100644
--- a/mail-filter/rspamd/rspamd-3.3.ebuild
+++ b/mail-filter/rspamd/rspamd-3.3.ebuild
@@ -70,6 +70,7 @@ PATCHES=(
 	"${FILESDIR}/rspamd-3.0-cmake-lua-version.patch"
 	"${FILESDIR}/rspamd-3.2-unbundle-lua.patch"
 	"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
+	"${FILESDIR}/rspamd-3.3-remove-test-case.patch"
 )
 
 src_prepare() {


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

commit:     9545e21cc8b4178834e21537b9ff74f9c1032412
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Sat Aug 21 20:50:40 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 22 02:49:01 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9545e21c

mail-filter/rspamd: add 3.0

- Use new -DSYSTEM_ZSTD=ON instead of unbundle patch
- Apply patch for -DSYSTEM_FMT=ON, it is already merged in upstream
- Make the src_test work

Closes: https://bugs.gentoo.org/809308
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.0-cmake-lua-version.patch       |  64 +++++++++++
 .../rspamd/files/rspamd-3.0-system-libfmt.patch    |  48 ++++++++
 mail-filter/rspamd/rspamd-3.0.ebuild               | 123 +++++++++++++++++++++
 4 files changed, 236 insertions(+)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index df4f86e665d..48c11b72f36 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,2 +1,3 @@
 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-3.0-cmake-lua-version.patch b/mail-filter/rspamd/files/rspamd-3.0-cmake-lua-version.patch
new file mode 100644
index 00000000000..55665b887c3
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.0-cmake-lua-version.patch
@@ -0,0 +1,64 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b53793008..5d092d654 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -147,55 +147,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.26.3
+

diff --git a/mail-filter/rspamd/files/rspamd-3.0-system-libfmt.patch b/mail-filter/rspamd/files/rspamd-3.0-system-libfmt.patch
new file mode 100644
index 00000000000..a6439b465e9
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.0-system-libfmt.patch
@@ -0,0 +1,48 @@
+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.ebuild b/mail-filter/rspamd/rspamd-3.0.ebuild
new file mode 100644
index 00000000000..1a472d6db57
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-3.0.ebuild
@@ -0,0 +1,123 @@
+# 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 test"
+RESTRICT="!test? ( test )"
+
+# A part of tests use ffi luajit extension
+REQUIRED_USE="${LUA_REQUIRED_USE}
+	jit? ( lua_single_target_luajit )
+	test? ( 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/libfmt:=
+	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}/${P}-cmake-lua-version.patch"
+	"${FILESDIR}/${P}-system-libfmt.patch"
+	"${FILESDIR}/${PN}-2.6-unbundle-lua.patch"
+	"${FILESDIR}/${PN}-2.5-unbundle-snowball.patch"
+)
+
+src_prepare() {
+	cmake_src_prepare
+
+	rm -vrf contrib/{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_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"
+}


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2021-01-09 12:33 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2021-01-09 12:33 UTC (permalink / raw
  To: gentoo-commits

commit:     4cc1b0ce6be1561a2f4e331c06fc4dbb7dd6671e
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Sat Jan  9 10:36:58 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan  9 12:33:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4cc1b0ce

mail-filter/rspamd: bump to 2.7

Closes: https://bugs.gentoo.org/764572
Package-Manager: Portage-3.0.12, Repoman-3.0.2
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-2.7-cmake-lua-version.patch       |  49 ++++++++
 .../rspamd/files/rspamd-2.7-unbundle-zstd.patch    | 125 +++++++++++++++++++++
 mail-filter/rspamd/rspamd-2.7-r100.ebuild          | 117 +++++++++++++++++++
 mail-filter/rspamd/rspamd-2.7.ebuild               | 115 +++++++++++++++++++
 5 files changed, 407 insertions(+)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 7b2fbeee713..166cfe25a14 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,2 +1,3 @@
 DIST rspamd-2.5.tar.gz 4490310 BLAKE2B 8d117b1b03e8092d0c724a4da4de23dd145f5b22696aa6b4ef1c208ade28f0d143dd783c9173b6987514b2aef9327ff8fd29eeae5e3da3039d2568384e50a697 SHA512 6068309da98eeb75f95188414b12ce9443aef31200853f820646e70e1dbf2d9d1e2c661a86df2183c175cc01cfb09f6a5c7b8ba358901a56ec6cdb9d9fef4540
 DIST rspamd-2.6.tar.gz 5079444 BLAKE2B acb9d9471d0bb457da33b4d23e3c75ef87ea26a47e6c731bfd5fbbfe28567244e2bc72fd25ca3408db0928dab4e4ab66596e38cf3eff7cb9690eec59d3b62372 SHA512 79e4c1aa763aef753c8d7b2a941ed92b384e96c25e6d1b3bd1321c5acc0ecb934d033a3bf19cb94c89809fd92edec25192cffe97de9e5251681e1a71216b734a
+DIST rspamd-2.7.tar.gz 5126227 BLAKE2B 70f57dba6ac9abe93d735d42e84bd17a1797035322029577a8e4376409bcee5345d4624925d3dd071bddce038858ebfdce8ee4f87f81b1fc8b1f71ad14e85930 SHA512 8779771baf85ef6ca1d7d2180429072ab1547ab834b073ee9222dcc6494efdd0a23f5e7ac52a777c23fd89296769f5b6f182593e714097c6f11ca7c9165e4ba7

diff --git a/mail-filter/rspamd/files/rspamd-2.7-cmake-lua-version.patch b/mail-filter/rspamd/files/rspamd-2.7-cmake-lua-version.patch
new file mode 100644
index 00000000000..c8254f1ce95
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-2.7-cmake-lua-version.patch
@@ -0,0 +1,49 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 72382acb6..2335ae4bc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -141,42 +141,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.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()
++			MODULES lua)
+ ENDIF(ENABLE_LUAJIT MATCHES "ON")
+ 
+ IF(ENABLE_JEMALLOC MATCHES "ON" AND NOT SANITIZE)
+-- 

diff --git a/mail-filter/rspamd/files/rspamd-2.7-unbundle-zstd.patch b/mail-filter/rspamd/files/rspamd-2.7-unbundle-zstd.patch
new file mode 100644
index 00000000000..f0fc9f8352b
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-2.7-unbundle-zstd.patch
@@ -0,0 +1,125 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 77ad86785..56246807e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -202,6 +202,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
+@@ -619,7 +621,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 987123cbb..51c2e1468 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 14792753a..20ca8416e 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 31b0308cb..62ba3d833 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 096933803..f78754ab4 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 e879d37af..88451e222 100644
+--- a/src/lua/lua_util.c
++++ b/src/lua/lua_util.c
+@@ -15,7 +15,7 @@
+  */
+ #include "lua_common.h"
+ #include "unix-std.h"
+-#include "contrib/zstd/zstd.h"
++#include <zstd.h>
+ #include "libmime/email_addr.h"
+ #include "libmime/content_type.h"
+ #include "libmime/mime_headers.h"
+diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
+index 3fa5da390..c641fb263 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>
+ 

diff --git a/mail-filter/rspamd/rspamd-2.7-r100.ebuild b/mail-filter/rspamd/rspamd-2.7-r100.ebuild
new file mode 100644
index 00000000000..0ba25019331
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-2.7-r100.ebuild
@@ -0,0 +1,117 @@
+# 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 libressl 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
+	net-libs/libnsl
+	sys-apps/file
+	blas? (
+		virtual/blas
+		virtual/lapack
+	)
+	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
+	jemalloc? ( dev-libs/jemalloc )
+	!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.7-cmake-lua-version.patch"
+	"${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
+	"${FILESDIR}/rspamd-2.7-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"
+}

diff --git a/mail-filter/rspamd/rspamd-2.7.ebuild b/mail-filter/rspamd/rspamd-2.7.ebuild
new file mode 100644
index 00000000000..86ced7662db
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-2.7.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake 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 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-libs/snowball-stemmer
+	net-libs/libnsl
+	sys-apps/file
+	blas? (
+		virtual/blas
+		virtual/lapack
+	)
+	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
+	jemalloc? ( dev-libs/jemalloc )
+	jit? (
+		dev-lang/luajit:2
+	)
+	!jit? (
+		dev-lang/lua:0=
+		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.6-unbundle-lua.patch"
+	"${FILESDIR}/rspamd-2.7-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 jit 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 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] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2021-01-09 12:33 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2021-01-09 12:33 UTC (permalink / raw
  To: gentoo-commits

commit:     84ba790757559589325dbaccde894d92c558a72a
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Sat Jan  9 10:49:17 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan  9 12:33:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84ba7907

mail-filter/rspamd: sync live

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../rspamd/files/rspamd-9999-unbundle-zstd.patch   | 125 ---------------------
 mail-filter/rspamd/rspamd-9999.ebuild              |   6 +-
 2 files changed, 3 insertions(+), 128 deletions(-)

diff --git a/mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch b/mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch
deleted file mode 100644
index c42bb8f5d6f..00000000000
--- a/mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 3b4bd8469..75582513e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -199,6 +199,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
-@@ -616,7 +618,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 59bab5c15..098329991 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -182,7 +182,6 @@ 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)
- 
- 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 e2f886aa6..5b214c09c 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 14792753a..20ca8416e 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 31b0308cb..62ba3d833 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 e7a83a603..c613fffcc 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 e879d37af..88451e222 100644
---- a/src/lua/lua_util.c
-+++ b/src/lua/lua_util.c
-@@ -15,7 +15,7 @@
-  */
- #include "lua_common.h"
- #include "unix-std.h"
--#include "contrib/zstd/zstd.h"
-+#include <zstd.h>
- #include "libmime/email_addr.h"
- #include "libmime/content_type.h"
- #include "libmime/mime_headers.h"
-diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
-index 3fa5da390..c641fb263 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>
- 

diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-9999.ebuild
index 8f97da55c2b..0ba25019331 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -56,9 +56,9 @@ BDEPEND="
 "
 
 PATCHES=(
-	"${FILESDIR}/rspamd-2.6-cmake-lua-version.patch"
+	"${FILESDIR}/rspamd-2.7-cmake-lua-version.patch"
 	"${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-9999-unbundle-zstd.patch"
+	"${FILESDIR}/rspamd-2.7-unbundle-zstd.patch"
 	"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
 )
 


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2021-01-09 12:33 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2021-01-09 12:33 UTC (permalink / raw
  To: gentoo-commits

commit:     e300b4dadd2faf5ce2cdb268b368ad403204c847
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Sat Jan  9 10:54:54 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan  9 12:33:32 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e300b4da

mail-filter/rspamd: clean old

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/19001
Signed-off-by: Sam James <sam <AT> gentoo.org>

 mail-filter/rspamd/Manifest                        |   1 -
 .../rspamd/files/rspamd-2.5-replxx-gcc10.patch     |  12 --
 .../rspamd/files/rspamd-2.5-unbundle-lua.patch     |  53 ---------
 .../rspamd/files/rspamd-2.5-unbundle-zstd.patch    | 132 ---------------------
 mail-filter/rspamd/rspamd-2.5-r1.ebuild            | 113 ------------------
 5 files changed, 311 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 166cfe25a14..df4f86e665d 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,3 +1,2 @@
-DIST rspamd-2.5.tar.gz 4490310 BLAKE2B 8d117b1b03e8092d0c724a4da4de23dd145f5b22696aa6b4ef1c208ade28f0d143dd783c9173b6987514b2aef9327ff8fd29eeae5e3da3039d2568384e50a697 SHA512 6068309da98eeb75f95188414b12ce9443aef31200853f820646e70e1dbf2d9d1e2c661a86df2183c175cc01cfb09f6a5c7b8ba358901a56ec6cdb9d9fef4540
 DIST rspamd-2.6.tar.gz 5079444 BLAKE2B acb9d9471d0bb457da33b4d23e3c75ef87ea26a47e6c731bfd5fbbfe28567244e2bc72fd25ca3408db0928dab4e4ab66596e38cf3eff7cb9690eec59d3b62372 SHA512 79e4c1aa763aef753c8d7b2a941ed92b384e96c25e6d1b3bd1321c5acc0ecb934d033a3bf19cb94c89809fd92edec25192cffe97de9e5251681e1a71216b734a
 DIST rspamd-2.7.tar.gz 5126227 BLAKE2B 70f57dba6ac9abe93d735d42e84bd17a1797035322029577a8e4376409bcee5345d4624925d3dd071bddce038858ebfdce8ee4f87f81b1fc8b1f71ad14e85930 SHA512 8779771baf85ef6ca1d7d2180429072ab1547ab834b073ee9222dcc6494efdd0a23f5e7ac52a777c23fd89296769f5b6f182593e714097c6f11ca7c9165e4ba7

diff --git a/mail-filter/rspamd/files/rspamd-2.5-replxx-gcc10.patch b/mail-filter/rspamd/files/rspamd-2.5-replxx-gcc10.patch
deleted file mode 100644
index 81d7f3de295..00000000000
--- a/mail-filter/rspamd/files/rspamd-2.5-replxx-gcc10.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/contrib/replxx/src/io.cxx b/contrib/replxx/src/io.cxx
-index a09886701..8df176d1c 100644
---- a/contrib/replxx/src/io.cxx
-+++ b/contrib/replxx/src/io.cxx
-@@ -3,6 +3,7 @@
- #include <cstdlib>
- #include <cstring>
- #include <array>
-+#include <stdexcept>
- 
- #ifdef _WIN32
- 

diff --git a/mail-filter/rspamd/files/rspamd-2.5-unbundle-lua.patch b/mail-filter/rspamd/files/rspamd-2.5-unbundle-lua.patch
deleted file mode 100644
index 4a20c8f19d3..00000000000
--- a/mail-filter/rspamd/files/rspamd-2.5-unbundle-lua.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index bbc141170..7fbb1b485 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -598,10 +598,6 @@ 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)
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 9a34d2ac4..59bab5c15 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -189,10 +189,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..bea6dc389 100644
---- a/src/lua/lua_common.c
-+++ b/src/lua/lua_common.c
-@@ -903,10 +903,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 +957,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
- 

diff --git a/mail-filter/rspamd/files/rspamd-2.5-unbundle-zstd.patch b/mail-filter/rspamd/files/rspamd-2.5-unbundle-zstd.patch
deleted file mode 100644
index e86d70173c6..00000000000
--- a/mail-filter/rspamd/files/rspamd-2.5-unbundle-zstd.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-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-2.5-r1.ebuild b/mail-filter/rspamd/rspamd-2.5-r1.ebuild
deleted file mode 100644
index c1020d552c7..00000000000
--- a/mail-filter/rspamd/rspamd-2.5-r1.ebuild
+++ /dev/null
@@ -1,113 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake 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 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-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:0=
-		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-replxx-gcc10.patch"
-	"${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,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 jit 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 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] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2020-11-20 10:12 Joonas Niilola
  0 siblings, 0 replies; 21+ messages in thread
From: Joonas Niilola @ 2020-11-20 10:12 UTC (permalink / raw
  To: gentoo-commits

commit:     4c876bf9fc2573be36d6ebd504df3cc3535dc7d2
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Thu Nov 12 13:12:58 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Nov 20 10:01:15 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c876bf9

mail-filter/rspamd: use bundled lua-lpeg, bug #753830

Closes: https://bugs.gentoo.org/753830
Package-Manager: Portage-3.0.8, Repoman-3.0.2
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     | 60 +++------------------
 .../rspamd/files/rspamd-2.6-unbundle-lua.patch     | 62 +++-------------------
 .../{rspamd-2.5.ebuild => rspamd-2.5-r1.ebuild}    |  4 +-
 .../{rspamd-2.6-r1.ebuild => rspamd-2.6-r2.ebuild} |  4 +-
 4 files changed, 16 insertions(+), 114 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
index b8deb2d6903..4a20c8f19d3 100644
--- a/mail-filter/rspamd/files/rspamd-2.5-unbundle-lua.patch
+++ b/mail-filter/rspamd/files/rspamd-2.5-unbundle-lua.patch
@@ -1,22 +1,8 @@
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index bbc141170..8e3665c18 100644
+index bbc141170..7fbb1b485 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)
+@@ -598,10 +598,6 @@ ADD_SUBDIRECTORY(contrib/libev)
  ADD_SUBDIRECTORY(contrib/kann)
  ADD_SUBDIRECTORY(contrib/fastutf8)
  
@@ -27,27 +13,11 @@ index bbc141170..8e3665c18 100644
  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
+index 9a34d2ac4..59bab5c15 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")
+@@ -189,10 +189,6 @@ IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
  	ADD_DEPENDENCIES(rspamd-server rspamd-clang)
  ENDIF()
  
@@ -59,18 +29,10 @@ index 9a34d2ac4..54b2e4083 100644
  	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
+index ce5fff6c5..bea6dc389 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,
+@@ -903,10 +903,6 @@ rspamd_lua_wipe_realloc (void *ud,
  	return NULL;
  }
  
@@ -81,7 +43,7 @@ index ce5fff6c5..509ceeb44 100644
  lua_State *
  rspamd_lua_init (bool wipe_mem)
  {
-@@ -961,7 +956,6 @@ rspamd_lua_init (bool wipe_mem)
+@@ -961,7 +957,6 @@ rspamd_lua_init (bool wipe_mem)
  	luaopen_kann (L);
  	luaopen_spf (L);
  #ifndef WITH_LUAJIT
@@ -89,11 +51,3 @@ index ce5fff6c5..509ceeb44 100644
  	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.6-unbundle-lua.patch b/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch
index c6f6324befc..9278fa8608d 100644
--- a/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch
+++ b/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch
@@ -1,24 +1,8 @@
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b794b9dbd..90caf4048 100644
+index b794b9dbd..1ba5c085e 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -111,7 +111,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")
- 
-@@ -624,7 +623,6 @@ 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)
-@@ -632,10 +630,6 @@ ADD_SUBDIRECTORY(contrib/fastutf8)
+@@ -632,10 +632,6 @@ ADD_SUBDIRECTORY(contrib/fastutf8)
  ADD_SUBDIRECTORY(contrib/google-ced)
  
  
@@ -29,27 +13,11 @@ index b794b9dbd..90caf4048 100644
  IF (ENABLE_LUA_REPL MATCHES "ON")
  	ADD_SUBDIRECTORY(contrib/replxx)
  	SET(WITH_LUA_REPL 1)
-@@ -735,7 +729,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
+index 9a34d2ac4..59bab5c15 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")
+@@ -189,10 +189,6 @@ IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
  	ADD_DEPENDENCIES(rspamd-server rspamd-clang)
  ENDIF()
  
@@ -61,18 +29,10 @@ index 9a34d2ac4..54b2e4083 100644
  	TARGET_LINK_LIBRARIES(rspamd-server stemmer)
  ENDIF()
 diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
-index b7fcc2034..b8120af97 100644
+index b7fcc2034..1d86464da 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"
-@@ -922,10 +921,6 @@ rspamd_lua_wipe_realloc (void *ud,
+@@ -922,10 +922,6 @@ rspamd_lua_wipe_realloc (void *ud,
  	return NULL;
  }
  
@@ -83,7 +43,7 @@ index b7fcc2034..b8120af97 100644
  lua_State *
  rspamd_lua_init (bool wipe_mem)
  {
-@@ -981,7 +976,6 @@ rspamd_lua_init (bool wipe_mem)
+@@ -981,7 +977,6 @@ rspamd_lua_init (bool wipe_mem)
  	luaopen_spf (L);
  	luaopen_tensor (L);
  #ifndef WITH_LUAJIT
@@ -91,11 +51,3 @@ index b7fcc2034..b8120af97 100644
  	lua_settop (L, 0);
  #endif
  
-@@ -991,7 +985,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/rspamd-2.5.ebuild b/mail-filter/rspamd/rspamd-2.5-r1.ebuild
similarity index 96%
rename from mail-filter/rspamd/rspamd-2.5.ebuild
rename to mail-filter/rspamd/rspamd-2.5-r1.ebuild
index a533869c512..eb97eb1d040 100644
--- a/mail-filter/rspamd/rspamd-2.5.ebuild
+++ b/mail-filter/rspamd/rspamd-2.5-r1.ebuild
@@ -36,11 +36,9 @@ RDEPEND="
 	jemalloc? ( dev-libs/jemalloc )
 	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] )
@@ -63,7 +61,7 @@ PATCHES=(
 src_prepare() {
 	cmake_src_prepare
 
-	rm -vrf contrib/{lua-{bit,lpeg},snowball,zstd} || die
+	rm -vrf contrib/{lua-bit,snowball,zstd} || die
 
 	sed -i -e 's/User=_rspamd/User=rspamd/g' \
 		rspamd.service \

diff --git a/mail-filter/rspamd/rspamd-2.6-r1.ebuild b/mail-filter/rspamd/rspamd-2.6-r2.ebuild
similarity index 96%
rename from mail-filter/rspamd/rspamd-2.6-r1.ebuild
rename to mail-filter/rspamd/rspamd-2.6-r2.ebuild
index 1488b0696d2..380080e13fb 100644
--- a/mail-filter/rspamd/rspamd-2.6-r1.ebuild
+++ b/mail-filter/rspamd/rspamd-2.6-r2.ebuild
@@ -39,11 +39,9 @@ RDEPEND="
 	jemalloc? ( dev-libs/jemalloc )
 	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] )
@@ -65,7 +63,7 @@ PATCHES=(
 src_prepare() {
 	cmake_src_prepare
 
-	rm -vrf contrib/{lua-{bit,lpeg},snowball,zstd} || die
+	rm -vrf contrib/{lua-bit,snowball,zstd} || die
 
 	sed -i -e 's/User=_rspamd/User=rspamd/g' \
 		rspamd.service \


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2020-11-20 10:12 Joonas Niilola
  0 siblings, 0 replies; 21+ messages in thread
From: Joonas Niilola @ 2020-11-20 10:12 UTC (permalink / raw
  To: gentoo-commits

commit:     71ff0f85c11853a25b7c5814f10b7339b922cc7f
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Thu Nov 12 13:17:44 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Nov 20 10:01:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71ff0f85

mail-filter/rspamd: sync live

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

 .../rspamd/files/rspamd-9999-unbundle-zstd.patch   | 125 +++++++++++++++++++++
 mail-filter/rspamd/rspamd-9999.ebuild              |   6 +-
 2 files changed, 127 insertions(+), 4 deletions(-)

diff --git a/mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch b/mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch
new file mode 100644
index 00000000000..c42bb8f5d6f
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch
@@ -0,0 +1,125 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3b4bd8469..75582513e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -199,6 +199,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
+@@ -616,7 +618,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 59bab5c15..098329991 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -182,7 +182,6 @@ 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)
+ 
+ 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 e2f886aa6..5b214c09c 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 14792753a..20ca8416e 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 31b0308cb..62ba3d833 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 e7a83a603..c613fffcc 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 e879d37af..88451e222 100644
+--- a/src/lua/lua_util.c
++++ b/src/lua/lua_util.c
+@@ -15,7 +15,7 @@
+  */
+ #include "lua_common.h"
+ #include "unix-std.h"
+-#include "contrib/zstd/zstd.h"
++#include <zstd.h>
+ #include "libmime/email_addr.h"
+ #include "libmime/content_type.h"
+ #include "libmime/mime_headers.h"
+diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
+index 3fa5da390..c641fb263 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>
+ 

diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-9999.ebuild
index 1488b0696d2..e51965b8983 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.ebuild
@@ -39,11 +39,9 @@ RDEPEND="
 	jemalloc? ( dev-libs/jemalloc )
 	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] )
@@ -58,14 +56,14 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-2.6-unbundle-zstd.patch"
+	"${FILESDIR}/rspamd-9999-unbundle-zstd.patch"
 	"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
 )
 
 src_prepare() {
 	cmake_src_prepare
 
-	rm -vrf contrib/{lua-{bit,lpeg},snowball,zstd} || die
+	rm -vrf contrib/{lua-bit,snowball,zstd} || die
 
 	sed -i -e 's/User=_rspamd/User=rspamd/g' \
 		rspamd.service \


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2020-10-07 15:58 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2020-10-07 15:58 UTC (permalink / raw
  To: gentoo-commits

commit:     e0cc7f032415b7c681e75ea79bd2e62d25d4118b
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Wed Oct  7 15:58:16 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct  7 15:58:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0cc7f03

mail-filter/rspamd: bump to 2.6

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/17834
Signed-off-by: Sam James <sam <AT> gentoo.org>

 mail-filter/rspamd/Manifest                                         | 1 +
 ...999-unbundle-hiredis.patch => rspamd-2.6-unbundle-hiredis.patch} | 0
 ...rspamd-9999-unbundle-lua.patch => rspamd-2.6-unbundle-lua.patch} | 0
 ...pamd-9999-unbundle-zstd.patch => rspamd-2.6-unbundle-zstd.patch} | 0
 mail-filter/rspamd/{rspamd-9999.ebuild => rspamd-2.6.ebuild}        | 6 +++---
 mail-filter/rspamd/rspamd-9999.ebuild                               | 6 +++---
 6 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 31a2bd1b901..7b2fbeee713 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1 +1,2 @@
 DIST rspamd-2.5.tar.gz 4490310 BLAKE2B 8d117b1b03e8092d0c724a4da4de23dd145f5b22696aa6b4ef1c208ade28f0d143dd783c9173b6987514b2aef9327ff8fd29eeae5e3da3039d2568384e50a697 SHA512 6068309da98eeb75f95188414b12ce9443aef31200853f820646e70e1dbf2d9d1e2c661a86df2183c175cc01cfb09f6a5c7b8ba358901a56ec6cdb9d9fef4540
+DIST rspamd-2.6.tar.gz 5079444 BLAKE2B acb9d9471d0bb457da33b4d23e3c75ef87ea26a47e6c731bfd5fbbfe28567244e2bc72fd25ca3408db0928dab4e4ab66596e38cf3eff7cb9690eec59d3b62372 SHA512 79e4c1aa763aef753c8d7b2a941ed92b384e96c25e6d1b3bd1321c5acc0ecb934d033a3bf19cb94c89809fd92edec25192cffe97de9e5251681e1a71216b734a

diff --git a/mail-filter/rspamd/files/rspamd-9999-unbundle-hiredis.patch b/mail-filter/rspamd/files/rspamd-2.6-unbundle-hiredis.patch
similarity index 100%
rename from mail-filter/rspamd/files/rspamd-9999-unbundle-hiredis.patch
rename to mail-filter/rspamd/files/rspamd-2.6-unbundle-hiredis.patch

diff --git a/mail-filter/rspamd/files/rspamd-9999-unbundle-lua.patch b/mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch
similarity index 100%
rename from mail-filter/rspamd/files/rspamd-9999-unbundle-lua.patch
rename to mail-filter/rspamd/files/rspamd-2.6-unbundle-lua.patch

diff --git a/mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch b/mail-filter/rspamd/files/rspamd-2.6-unbundle-zstd.patch
similarity index 100%
rename from mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch
rename to mail-filter/rspamd/files/rspamd-2.6-unbundle-zstd.patch

diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-2.6.ebuild
similarity index 94%
copy from mail-filter/rspamd/rspamd-9999.ebuild
copy to mail-filter/rspamd/rspamd-2.6.ebuild
index cad05375702..4c166ee4b01 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-2.6.ebuild
@@ -58,10 +58,10 @@ BDEPEND="
 "
 
 PATCHES=(
-	"${FILESDIR}/rspamd-9999-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-9999-unbundle-zstd.patch"
+	"${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
+	"${FILESDIR}/rspamd-2.6-unbundle-zstd.patch"
 	"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
-	"${FILESDIR}/rspamd-9999-unbundle-hiredis.patch"
+	"${FILESDIR}/rspamd-2.6-unbundle-hiredis.patch"
 )
 
 src_prepare() {

diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-9999.ebuild
index cad05375702..4c166ee4b01 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.ebuild
@@ -58,10 +58,10 @@ BDEPEND="
 "
 
 PATCHES=(
-	"${FILESDIR}/rspamd-9999-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-9999-unbundle-zstd.patch"
+	"${FILESDIR}/rspamd-2.6-unbundle-lua.patch"
+	"${FILESDIR}/rspamd-2.6-unbundle-zstd.patch"
 	"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
-	"${FILESDIR}/rspamd-9999-unbundle-hiredis.patch"
+	"${FILESDIR}/rspamd-2.6-unbundle-hiredis.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2020-10-02  7:32 Joonas Niilola
  0 siblings, 0 replies; 21+ messages in thread
From: Joonas Niilola @ 2020-10-02  7:32 UTC (permalink / raw
  To: gentoo-commits

commit:     08f5c2682300ed9088fc4ead069a4e69fc85b4dc
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Tue Sep  1 12:06:43 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Oct  2 07:21:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08f5c268

mail-filter/rspamd: sync live

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

 .../files/rspamd-9999-unbundle-hiredis.patch       |  93 +++++++++++++++
 .../rspamd/files/rspamd-9999-unbundle-lua.patch    | 101 ++++++++++++++++
 .../rspamd/files/rspamd-9999-unbundle-zstd.patch   | 128 +++++++++++++++++++++
 mail-filter/rspamd/rspamd-9999.ebuild              |  13 ++-
 4 files changed, 331 insertions(+), 4 deletions(-)

diff --git a/mail-filter/rspamd/files/rspamd-9999-unbundle-hiredis.patch b/mail-filter/rspamd/files/rspamd-9999-unbundle-hiredis.patch
new file mode 100644
index 00000000000..875009da41a
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-9999-unbundle-hiredis.patch
@@ -0,0 +1,93 @@
+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/files/rspamd-9999-unbundle-lua.patch b/mail-filter/rspamd/files/rspamd-9999-unbundle-lua.patch
new file mode 100644
index 00000000000..c6f6324befc
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-9999-unbundle-lua.patch
@@ -0,0 +1,101 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b794b9dbd..90caf4048 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -111,7 +111,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")
+ 
+@@ -624,7 +623,6 @@ 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)
+@@ -632,10 +630,6 @@ ADD_SUBDIRECTORY(contrib/fastutf8)
+ ADD_SUBDIRECTORY(contrib/google-ced)
+ 
+ 
+-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)
+@@ -735,7 +729,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 b7fcc2034..b8120af97 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"
+@@ -922,10 +921,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)
+ {
+@@ -981,7 +976,6 @@ rspamd_lua_init (bool wipe_mem)
+ 	luaopen_spf (L);
+ 	luaopen_tensor (L);
+ #ifndef WITH_LUAJIT
+-	rspamd_lua_add_preload (L, "bit", luaopen_bit);
+ 	lua_settop (L, 0);
+ #endif
+ 
+@@ -991,7 +985,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-9999-unbundle-zstd.patch b/mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch
new file mode 100644
index 00000000000..1a7f4453c86
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-9999-unbundle-zstd.patch
@@ -0,0 +1,128 @@
+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-9999.ebuild b/mail-filter/rspamd/rspamd-9999.ebuild
index b5d45580a5d..cad05375702 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.ebuild
@@ -25,13 +25,17 @@ RDEPEND="
 	app-arch/zstd
 	dev-db/sqlite:3
 	dev-libs/glib:2
+	dev-libs/hiredis:=
 	dev-libs/icu:=
 	dev-libs/libev
 	dev-libs/libsodium
 	dev-libs/snowball-stemmer
 	net-libs/libnsl
 	sys-apps/file
-	blas? ( sci-libs/openblas )
+	blas? (
+		virtual/blas
+		virtual/lapack
+	)
 	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
 	jemalloc? ( dev-libs/jemalloc )
 	jit? (
@@ -54,15 +58,16 @@ BDEPEND="
 "
 
 PATCHES=(
-	"${FILESDIR}/rspamd-2.5-unbundle-lua.patch"
-	"${FILESDIR}/rspamd-2.5-unbundle-zstd.patch"
+	"${FILESDIR}/rspamd-9999-unbundle-lua.patch"
+	"${FILESDIR}/rspamd-9999-unbundle-zstd.patch"
 	"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"
+	"${FILESDIR}/rspamd-9999-unbundle-hiredis.patch"
 )
 
 src_prepare() {
 	cmake_src_prepare
 
-	rm -vrf contrib/{lua-{bit,lpeg},snowball,zstd} || die
+	rm -vrf contrib/{hiredis,lua-{bit,lpeg},snowball,zstd} || die
 
 	sed -i -e 's/User=_rspamd/User=rspamd/g' \
 		rspamd.service \


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2020-10-02  7:32 Joonas Niilola
  0 siblings, 0 replies; 21+ messages in thread
From: Joonas Niilola @ 2020-10-02  7:32 UTC (permalink / raw
  To: gentoo-commits

commit:     560a9449d85a8f3e68c2b8bb3c9379d288bde3fd
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Mon Aug 31 12:39:30 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Oct  2 07:21:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=560a9449

mail-filter/rspamd: Fix gcc10 compilation issue

Closes: https://bugs.gentoo.org/738174
Package-Manager: Portage-3.0.4, Repoman-2.3.23
Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 mail-filter/rspamd/files/rspamd-2.5-replxx-gcc10.patch | 12 ++++++++++++
 mail-filter/rspamd/rspamd-2.5.ebuild                   |  1 +
 2 files changed, 13 insertions(+)

diff --git a/mail-filter/rspamd/files/rspamd-2.5-replxx-gcc10.patch b/mail-filter/rspamd/files/rspamd-2.5-replxx-gcc10.patch
new file mode 100644
index 00000000000..81d7f3de295
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-2.5-replxx-gcc10.patch
@@ -0,0 +1,12 @@
+diff --git a/contrib/replxx/src/io.cxx b/contrib/replxx/src/io.cxx
+index a09886701..8df176d1c 100644
+--- a/contrib/replxx/src/io.cxx
++++ b/contrib/replxx/src/io.cxx
+@@ -3,6 +3,7 @@
+ #include <cstdlib>
+ #include <cstring>
+ #include <array>
++#include <stdexcept>
+ 
+ #ifdef _WIN32
+ 

diff --git a/mail-filter/rspamd/rspamd-2.5.ebuild b/mail-filter/rspamd/rspamd-2.5.ebuild
index b5d45580a5d..a533869c512 100644
--- a/mail-filter/rspamd/rspamd-2.5.ebuild
+++ b/mail-filter/rspamd/rspamd-2.5.ebuild
@@ -54,6 +54,7 @@ BDEPEND="
 "
 
 PATCHES=(
+	"${FILESDIR}/rspamd-2.5-replxx-gcc10.patch"
 	"${FILESDIR}/rspamd-2.5-unbundle-lua.patch"
 	"${FILESDIR}/rspamd-2.5-unbundle-zstd.patch"
 	"${FILESDIR}/rspamd-2.5-unbundle-snowball.patch"


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2019-01-16  3:15 Thomas Deutschmann
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Deutschmann @ 2019-01-16  3:15 UTC (permalink / raw
  To: gentoo-commits

commit:     c334938edc52f23ed95834e3b8a658f2e76c53cb
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 16 03:15:11 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Jan 16 03:15:44 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c334938e

mail-filter/rspamd: bump to v1.8.3

- runscript rewritten

- username used in systemd unit adjusted for Gentoo

- priv escalation via PID file fixed

- dev-util/ragel version constraint removed (package
  is now compatible with ragel-7)

Closes: https://github.com/gentoo/gentoo/pull/10598
Closes: https://github.com/gentoo/gentoo/pull/10561
Closes: https://github.com/gentoo/gentoo/pull/10057
Package-Manager: Portage-2.3.56, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 mail-filter/rspamd/Manifest                        |  1 +
 mail-filter/rspamd/files/rspamd-r1.logrotate       | 16 +++++++
 mail-filter/rspamd/files/rspamd-r6.init            | 55 ++++++++++++++++++++++
 mail-filter/rspamd/files/rspamd.conf               | 26 ++++++++++
 mail-filter/rspamd/files/rspamd.tmpfile            |  1 +
 .../{rspamd-9999.ebuild => rspamd-1.8.3.ebuild}    | 55 +++++++++++++---------
 mail-filter/rspamd/rspamd-9999.ebuild              | 55 +++++++++++++---------
 7 files changed, 165 insertions(+), 44 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index 2223d7172bb..d45c6ec491a 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -7,3 +7,4 @@ DIST rspamd-1.7.7.tar.gz 4534430 BLAKE2B 83ba39b80293bf87f397e6b1b1cbec27e7c44f0
 DIST rspamd-1.7.8.tar.gz 4542955 BLAKE2B 78fbb01c51d290f8d88f4c512df248fcbc8e28e00a820ba0d3dc22adf4bb1b54b1923aa5306fde5d4d75c81a9304f220608a6cec3f1077bbb9adfa1ea8bdc2a4 SHA512 43f2350dfa4e0369cd53480bd4c8d0aa3898d7c471540281e7460a264207032aea226c4fd519a26397b9e9e8c8de3951e5a9752e010eabf1b3733a0c3e3086c2
 DIST rspamd-1.7.9.tar.gz 4557492 BLAKE2B f42775ba8157ef4815331c304e3030c522e9ae5e10ef0194da0c7dde105b40fed2ae84b063d78aed37992146311aecc1ac77f64dacdaf3ff11bb85076e8aef7c SHA512 d11d8c03668b85feae665ed491cd156c7430fbad30f42fe44103ea3c3a8bc988e5f8981e784e8f31aa35ba1ff9f7abd23605638e4ee3086a056b22fb3109563e
 DIST rspamd-1.8.1.tar.gz 4286637 BLAKE2B dd202a2f3dab4ef459d978e06231f8fcef3724ea5912c7455d553dc04e2744322b9144ba05a2f6f22a7eb58cd0a967f213bfc76fb273b5425036a5042975ed89 SHA512 98c2d909b7dc19f1c431d4e64444968092a10630ef238d3c8cc2825e7b2d92bee893bc7f9c431f3a6337ef2af4d2a157f0584e7b13fba0540660d7c853bc25cc
+DIST rspamd-1.8.3.tar.gz 4319623 BLAKE2B b7fdd6791df5899710bb1d696a9b94d1840335b6a34d6cdeebc2b5eebe9f4e5b6da3e90ed9ab5e3945aab7ef33f54f048024b51c3de37db1a083ad89c656b456 SHA512 5e20255466fe2cd4842196fb2138732b59911de655e73d9cc13009b5179b84e5a2060083961b35fe40b9f550f8e18067056415a1d803fac54fac000070024c01

diff --git a/mail-filter/rspamd/files/rspamd-r1.logrotate b/mail-filter/rspamd/files/rspamd-r1.logrotate
new file mode 100644
index 00000000000..5cb2fdd55e0
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-r1.logrotate
@@ -0,0 +1,16 @@
+/var/log/rspamd/rspamd.log {
+	daily
+	rotate 4
+	delaycompress
+	compress
+	notifempty
+	missingok
+	postrotate
+		if test -d /run/systemd/system ; then
+			systemctl kill -s USR1 --kill-who=main rspamd.service
+		else
+			test -r /run/rspamd.pid && kill -USR1 $(cat /run/rspamd.pid) &>/dev/null
+		fi
+	endscript
+}
+

diff --git a/mail-filter/rspamd/files/rspamd-r6.init b/mail-filter/rspamd/files/rspamd-r6.init
new file mode 100644
index 00000000000..8c31fd7d027
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-r6.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_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/files/rspamd.conf b/mail-filter/rspamd/files/rspamd.conf
new file mode 100644
index 00000000000..f3a65cbb20a
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd.conf
@@ -0,0 +1,26 @@
+# /etc/conf.d/rspamd
+
+# Configuration file
+#RSPAMD_CONFIGFILE="/etc/rsyslog.conf"
+
+# PID file
+# If you should ever change this, remember to update
+# "/etc/logrotate.d/rspamd", too.
+#RSPAMD_PIDFILE="/run/rspamd.pid"
+
+# You can use this configuration option to pass additional options to the
+# start-stop-daemon, see start-stop-daemon(8) for more details.
+# Per default we wait 1000ms after we have started the service to ensure
+# that the daemon is really up and running.
+#RSPAMD_SSDARGS="--wait 1000"
+
+# The termination timeout (start-stop-daemon parameter "retry") ensures
+# that the service will be terminated within a given time (60 + 5 seconds
+# per default) when you are stopping the service.
+#RSPAMD_TERMTIMEOUT="TERM/60/KILL/5"
+
+# Options to rspamd
+# See rspamd(8) for more details
+# Notes:
+# * Do not specify another CONFIGFILE but use the variable above to change the location
+#RSPAMD_OPTS=""

diff --git a/mail-filter/rspamd/files/rspamd.tmpfile b/mail-filter/rspamd/files/rspamd.tmpfile
new file mode 100644
index 00000000000..9f7a2c46c31
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd.tmpfile
@@ -0,0 +1 @@
+d /run/rspamd 0755 rspamd rspamd

diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-1.8.3.ebuild
similarity index 72%
copy from mail-filter/rspamd/rspamd-9999.ebuild
copy to mail-filter/rspamd/rspamd-1.8.3.ebuild
index 40d3b529082..64cb537424f 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-1.8.3.ebuild
@@ -1,26 +1,20 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
 
-if [[ ${PV} == *9999 ]] ; then
-	SCM="git-r3"
-	EGIT_REPO_URI="https://github.com/vstakhov/rspamd.git"
-fi
-
-inherit cmake-utils pax-utils systemd user ${SCM}
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="https://github.com/vstakhov/rspamd"
+inherit cmake-utils pax-utils systemd tmpfiles user
 
 if [[ ${PV} == *9999 ]] ; then
-	SRC_URI=""
-	KEYWORDS=""
+	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"
@@ -32,7 +26,7 @@ RDEPEND="dev-db/sqlite:3
 	dev-libs/libevent:=
 	net-libs/libnsl
 	sys-apps/file
-	<dev-util/ragel-7.0
+	dev-util/ragel
 	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
 	fann? ( sci-mathematics/fann )
 	gd? ( media-libs/gd[jpeg] )
@@ -49,6 +43,14 @@ pkg_setup() {
 	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
@@ -66,22 +68,31 @@ src_configure() {
 	cmake-utils_src_configure
 }
 
+src_test() {
+	cmake-utils_src_test
+}
+
 src_install() {
 	cmake-utils_src_install
-	newinitd "${FILESDIR}/rspamd.init-r5" rspamd
+
+	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-*
+		pax-mark m "${ED%/}"/usr/bin/rspamd-* "${ED%/}"/usr/bin/rspamadm-*
 	fi
 
-	keepdir /var/lib/rspamd
-	keepdir /var/log/rspamd
-
-	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
-
 	insinto /etc/logrotate.d
-	newins "${FILESDIR}/rspamd.logrotate" rspamd
+	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
 
-	systemd_newunit rspamd.service rspamd.service
+	diropts -o rspamd -g rspamd
+	keepdir /var/{lib,log}/rspamd
+}
+
+pkg_postinst() {
+	tmpfiles_process "${PN}.conf"
 }

diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-9999.ebuild
index 40d3b529082..64cb537424f 100644
--- a/mail-filter/rspamd/rspamd-9999.ebuild
+++ b/mail-filter/rspamd/rspamd-9999.ebuild
@@ -1,26 +1,20 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
 
-if [[ ${PV} == *9999 ]] ; then
-	SCM="git-r3"
-	EGIT_REPO_URI="https://github.com/vstakhov/rspamd.git"
-fi
-
-inherit cmake-utils pax-utils systemd user ${SCM}
-
-DESCRIPTION="Rapid spam filtering system"
-HOMEPAGE="https://github.com/vstakhov/rspamd"
+inherit cmake-utils pax-utils systemd tmpfiles user
 
 if [[ ${PV} == *9999 ]] ; then
-	SRC_URI=""
-	KEYWORDS=""
+	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"
@@ -32,7 +26,7 @@ RDEPEND="dev-db/sqlite:3
 	dev-libs/libevent:=
 	net-libs/libnsl
 	sys-apps/file
-	<dev-util/ragel-7.0
+	dev-util/ragel
 	cpu_flags_x86_ssse3? ( dev-libs/hyperscan )
 	fann? ( sci-mathematics/fann )
 	gd? ( media-libs/gd[jpeg] )
@@ -49,6 +43,14 @@ pkg_setup() {
 	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
@@ -66,22 +68,31 @@ src_configure() {
 	cmake-utils_src_configure
 }
 
+src_test() {
+	cmake-utils_src_test
+}
+
 src_install() {
 	cmake-utils_src_install
-	newinitd "${FILESDIR}/rspamd.init-r5" rspamd
+
+	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-*
+		pax-mark m "${ED%/}"/usr/bin/rspamd-* "${ED%/}"/usr/bin/rspamadm-*
 	fi
 
-	keepdir /var/lib/rspamd
-	keepdir /var/log/rspamd
-
-	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd
-
 	insinto /etc/logrotate.d
-	newins "${FILESDIR}/rspamd.logrotate" rspamd
+	newins "${FILESDIR}"/rspamd-r1.logrotate rspamd
 
-	systemd_newunit rspamd.service rspamd.service
+	diropts -o rspamd -g rspamd
+	keepdir /var/{lib,log}/rspamd
+}
+
+pkg_postinst() {
+	tmpfiles_process "${PN}.conf"
 }


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2018-03-29 13:41 Dirkjan Ochtman
  0 siblings, 0 replies; 21+ messages in thread
From: Dirkjan Ochtman @ 2018-03-29 13:41 UTC (permalink / raw
  To: gentoo-commits

commit:     66e9f5d2215641801b833a655e81c540e2b9394d
Author:     Christian Roessner <c <AT> roessner <DOT> co>
AuthorDate: Thu Mar 29 13:38:41 2018 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Thu Mar 29 13:41:50 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66e9f5d2

mail-filter/rspamd: version bump to 1.7.2 (fixes bug 651366)

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 mail-filter/rspamd/Manifest               |  1 +
 mail-filter/rspamd/files/rspamd.logrotate |  4 +-
 mail-filter/rspamd/metadata.xml           | 41 ++++++++--------
 mail-filter/rspamd/rspamd-1.7.2.ebuild    | 78 +++++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+), 22 deletions(-)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index b3c615c5281..8b5ef369325 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,3 +1,4 @@
 DIST rspamd-1.6.5.tar.gz 2484271 BLAKE2B 880e862eecd4a082b87bee2ba8c7b17a475efbfe90dbb0cbf34c5ad6c42c80d6ea142f11c7632763d7f9e4155a4521274f2d5a26a77dfbdab9f585bb1e3fff5f SHA512 789abc994cf96a0d88662e14f0e77f95f5c7c7bd1f808ffd64af21cf73cef643b5aee4c1f066d81d04e79d6bb7f72f12095ff08d8515a40bcca23153715fc9f1
 DIST rspamd-1.6.6.tar.gz 2487482 BLAKE2B f18640f64a8c0bcf6077267a1715f0bb096ab18484c24de56a012c42666cdc9f8671237c5336dce7cd47f44f9aba7905ce3723232d53a5b8ddfe143df682bd9b SHA512 14c7144017df69600dbd09541d16dae19d87105b09f95811fc09624b60e89ca68200654e88dea242508afd3c4963ea7cac086abddec8ca1a3d8fc73d7c27e899
 DIST rspamd-1.7.1.tar.gz 4453460 BLAKE2B 28070804a6daf7f6354203038fbd974176a1ed5135b51a5ef7f089e63ffac3b3bbdca1961154b846f5b7d054071925722b311b46a3be6d09ff3d853232cbbd5f SHA512 3de4e07fa9cc72e306936a201f6bc019b5bf6f3ade003bf9217dc8a7decf027b986d80e1c0d2f09460af6f1d59aa520fee68287ad6ccee1cec94698054bc2fbb
+DIST rspamd-1.7.2.tar.gz 4460606 BLAKE2B 2c4389fd5350d67d21745288f74c4e1276772c47bbb0c74364227d0c04e4102c2ce00cd8242a639825e8c9971e87822af7a38a0a8561ba979e3f3b396d120414 SHA512 45ab95c7488e58da9e8803daefda5a0f8920cc4d4c4508a0347ed07d201124d07b10e93010b2be5fab3ecd0ac2be962bcebbb41f434a449fdbc31ded744878cf

diff --git a/mail-filter/rspamd/files/rspamd.logrotate b/mail-filter/rspamd/files/rspamd.logrotate
index dca9cfadf66..81400efc891 100644
--- a/mail-filter/rspamd/files/rspamd.logrotate
+++ b/mail-filter/rspamd/files/rspamd.logrotate
@@ -1,4 +1,4 @@
-/var/log/rspamd/rspamd.log{
+/var/log/rspamd/rspamd.log {
        daily
        rotate 4
        delaycompress
@@ -6,7 +6,7 @@
        notifempty
        missingok
        postrotate
-          service rspamd reopenlog >/dev/null 2>&1 || true
+	  test -r /run/rspamd/rspamd.pid && kill -USR1 $(cat /run/rspamd/rspamd.pid) &>/dev/null
        endscript
 }
 

diff --git a/mail-filter/rspamd/metadata.xml b/mail-filter/rspamd/metadata.xml
index 458ce07c1fe..2f0df70fd3a 100644
--- a/mail-filter/rspamd/metadata.xml
+++ b/mail-filter/rspamd/metadata.xml
@@ -1,24 +1,25 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<maintainer type="person">
-		<email>c@roessner.co</email>
-		<name>Christian Roessner</name>
-	</maintainer>
-	<maintainer type="project">
-		<email>proxy-maint@gentoo.org</email>
-		<name>Proxy Maintainers</name>
-	</maintainer>
-	<maintainer type="person">
-		<email>djc@gentoo.org</email>
-		<name>Dirkjan Ochtman</name>
-	</maintainer>
-	<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>
-		<flag name="jemalloc">Use dev-libs/jemalloc for allocations</flag>
-		<flag name="pcre2">Use dev-libs/libpcre2</flag>
-	</use>
+  <maintainer type="person">
+    <email>cr@sys4.de</email>
+    <name>Christian Roessner</name>
+  </maintainer>
+  <maintainer type="project">
+    <email>proxy-maint@gentoo.org</email>
+    <name>Proxy Maintainers</name>
+  </maintainer>
+  <maintainer type="person">
+    <email>djc@gentoo.org</email>
+    <name>Dirkjan Ochtman</name>
+  </maintainer>
+  <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>
+    <flag name="jemalloc">Use dev-libs/jemalloc for allocations</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.7.2.ebuild b/mail-filter/rspamd/rspamd-1.7.2.ebuild
new file mode 100644
index 00000000000..8c2de174e29
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-1.7.2.ebuild
@@ -0,0 +1,78 @@
+# 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 +torch"
+REQUIRED_USE="torch? ( jit )"
+
+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_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
+	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] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2017-05-05  9:40 Dirkjan Ochtman
  0 siblings, 0 replies; 21+ messages in thread
From: Dirkjan Ochtman @ 2017-05-05  9:40 UTC (permalink / raw
  To: gentoo-commits

commit:     ddd3d83f783a7ea13b44a28fd3f8dce0ec39f6d4
Author:     Christian Roessner <c <AT> roessner-network-solutions <DOT> com>
AuthorDate: Wed May  3 05:35:19 2017 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Fri May  5 09:40:42 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddd3d83f

mail-filter/rspamd: Bump to version 1.5.7

 mail-filter/rspamd/Manifest                     |  1 +
 mail-filter/rspamd/files/rspamd-1.5.7-map.patch | 11 ++++
 mail-filter/rspamd/rspamd-1.5.7.ebuild          | 77 +++++++++++++++++++++++++
 3 files changed, 89 insertions(+)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index aa7c4506b60..c0630fb5cb1 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,3 +1,4 @@
+DIST 1.5.7.tar.gz 2384051 SHA256 73d18b129a072e35c74c9a440abdd0985fa15696d308a5e23736ec007432fd70 SHA512 362f8615795c739d1c869dd48426dadee38924287d82ad725baf0d3f80aa4571db29501d95d1497d3dfef61af39c2c7254f2c9437ee46f453e380f595b5873ca WHIRLPOOL cec77680fd767badf2b8a302372543e4c34a215dbc7e5e3389b7721a1aac82dd2ba7c0d1ee407f61ad2660ccb6917a366a6613af63d7e2d7922693a7ab9af53d
 DIST rspamd-1.4.4.tar.xz 1780816 SHA256 51342639dd1e50b235ae7fb2e877dee1d5b90c8102ce7ff817545fa0fb6ebc6d SHA512 df2260de6585699a5b6692aa210647270b7132372ae6a2437f8532265018fe4db8270a8989ce0c0664cad17cbc281ae92f935c4f0974dc2f8da309e54c234b14 WHIRLPOOL 1f5f19b57c571fe07a843ae738f5cc60411040dbabb965163e6ed25668cd590f0da99256f83165d6cd14a1715914a16a6cd5a99125093a294fbfa2bc89ce155c
 DIST rspamd-1.5.3.tar.xz 1854812 SHA256 a692f7eab27321924c5326efeae809ab2703fdf60b652446e9a232312d8a1e35 SHA512 68bdd593b03c299285d2cd56e945dbd38f823fbf7e9300318e7b05a3084eb751cb48134e69c13705e462838d814dd29bdca4631933eb23c0febf4d2fd223a153 WHIRLPOOL 5aa7aacafa44f3ebf6baf9f15a7461dc1e6d1a483f1794c0e66adbdfa83e22c77ad991e8925b7cfa11ab8e86cfbcef252fcd47b1e3954321449fd58911d15ee4
 DIST rspamd-1.5.6.tar.xz 1853052 SHA256 cda2a5b93f0e57b890767514ce00a2660baf9d48627f7367a36fe938ade14f31 SHA512 3735052817ecd12d46505e4657456a01cde6aac25d7bdffaf0c8722458c674edbe89aeb589f338ec9ed22b5455314511fe1f55b5a0be3532761579b4f7b44cfa WHIRLPOOL 2e5acd5a92c0453a4575ad3717809d287b8c7552b9927d2245b451a57b9f722b19e6820f9c5c188cbbdd414a38b95c9e001901438bd4c2796071f5501af1e0c4

diff --git a/mail-filter/rspamd/files/rspamd-1.5.7-map.patch b/mail-filter/rspamd/files/rspamd-1.5.7-map.patch
new file mode 100644
index 00000000000..1477b13eee7
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-1.5.7-map.patch
@@ -0,0 +1,11 @@
+--- rspamd-1.5.7/src/libutil/map.c	2017-05-02 15:26:54.000000000 +0200
++++ b/src/libutil/map.c	2017-05-02 16:22:37.695254699 +0200
+@@ -2290,7 +2290,7 @@
+ 	}
+ #else
+ 	if (pcre_flags & PCRE_FLAG(UTF)) {
+-		re_map->map_flags |= RSPAMD_REGEXP_FLAG_UTF;
++		re_map->has_utf = TRUE;
+ 	}
+ #endif
+ 

diff --git a/mail-filter/rspamd/rspamd-1.5.7.ebuild b/mail-filter/rspamd/rspamd-1.5.7.ebuild
new file mode 100644
index 00000000000..20a5bdba36b
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-1.5.7.ebuild
@@ -0,0 +1,77 @@
+# 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"
+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}"/${P}-map.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-r2" 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] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2017-01-03 19:00 Dirkjan Ochtman
  0 siblings, 0 replies; 21+ messages in thread
From: Dirkjan Ochtman @ 2017-01-03 19:00 UTC (permalink / raw
  To: gentoo-commits

commit:     0dce7fbc4dc9fb16a13056da4902cd120ec9be4e
Author:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  3 18:56:37 2017 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Tue Jan  3 19:00:51 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dce7fbc

mail-filter/rspamd: use checkpath in init script (fixes bug 603248)

Package-Manager: portage-2.3.0

 mail-filter/rspamd/files/rspamd.init-r4   | 48 +++++++++++++++++++++
 mail-filter/rspamd/rspamd-1.4.1-r1.ebuild | 71 +++++++++++++++++++++++++++++++
 2 files changed, 119 insertions(+)

diff --git a/mail-filter/rspamd/files/rspamd.init-r4 b/mail-filter/rspamd/files/rspamd.init-r4
new file mode 100644
index 00000000..cb4520f
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd.init-r4
@@ -0,0 +1,48 @@
+#!/sbin/openrc-run
+# Copyright 2015-2017 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}"
+
+	checkpath -d $RUNDIR -m 2750 -o rspamd:rspamd
+	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/rspamd-1.4.1-r1.ebuild b/mail-filter/rspamd/rspamd-1.4.1-r1.ebuild
new file mode 100644
index 00000000..978a2bd
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-1.4.1-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils pax-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 libressl"
+
+RDEPEND="!libressl? ( dev-libs/openssl:0[-bindist] )
+		libressl? ( dev-libs/libressl:0 )
+		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
+	pax-mark m "${ED}"/usr/bin/rspamadm-*
+	pax-mark m "${ED}"/usr/bin/rspamd-*
+	newinitd "${FILESDIR}/rspamd.init-r3" 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] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2016-12-18 15:41 Dirkjan Ochtman
  0 siblings, 0 replies; 21+ messages in thread
From: Dirkjan Ochtman @ 2016-12-18 15:41 UTC (permalink / raw
  To: gentoo-commits

commit:     322dc520f4d40d077ff42fc79010401463075523
Author:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 18 15:41:44 2016 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Sun Dec 18 15:41:44 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=322dc520

mail-filter/rspamd: version bump to 1.4.1 (fixes bug 602980)

Package-Manager: portage-2.3.0

 mail-filter/rspamd/Manifest             |  1 +
 mail-filter/rspamd/files/rspamd.init-r3 | 50 +++++++++++++++++++++++
 mail-filter/rspamd/rspamd-1.4.1.ebuild  | 71 +++++++++++++++++++++++++++++++++
 3 files changed, 122 insertions(+)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
index f0a9518..ae5b36c 100644
--- a/mail-filter/rspamd/Manifest
+++ b/mail-filter/rspamd/Manifest
@@ -1,2 +1,3 @@
 DIST rspamd-1.3.5.tar.xz 1483044 SHA256 d4413ccfc238c3023e2b8a9441b101a6437f521f333fc9db2dd924d473fee696 SHA512 6d7223c6be6e49296a5228d3d05a5f8dfd4a4002df9d247740bce75f2f652a01d86c30456b8475d08d529d2787aa30191713961ffc82c380c00612cae371b61c WHIRLPOOL 4017484d4653a23b5a987ab0bdd40a709cd5d116dea5c02a767c5cad94bd5399d6319aa8f75e726cec5d0bd7ae9e0722786cacc33963e2f9b8fbdd0fb0986729
 DIST rspamd-1.4.0.tar.xz 1769860 SHA256 30c9acf93bdcc6c009524c8b2770931475929c6c9e948faa90d7412306055a1c SHA512 39bfccee070b829f3ea5019ebde0020a850abf7fe92f7e5bb5b9212088d4c98544e6f55228984d3422c09c31f356b209237da6a6eb9c18e3feb7940429de663a WHIRLPOOL 449a15148067e4af38ca7d4218dca69064679d1a064c53d0edf99e63418d6a898fd80cdfce8707f706f19da659d44efadedab3a7ea8c3dcd54c65794f695e3d0
+DIST rspamd-1.4.1.tar.xz 1779492 SHA256 11e39e4b44a85feaf546696d28a72ffc32e35c01a028a251d5175ba58343eb28 SHA512 bc3be3f20a9692a5d188d9a254ad459dba4ca01ae3c917689943be7eed85e17ab638e0d0b9f4dd574864b4f39eb7a728b7b0ecf3088727a92dfb99a2df4a5a6d WHIRLPOOL 1cbe02c664596cd467f2f955691ec79c70ccf23a89cadf8853a1881264d555af248a1503a58da1df59142c73193074af556ca768aad349b832b95314f61615d5

diff --git a/mail-filter/rspamd/files/rspamd.init-r3 b/mail-filter/rspamd/files/rspamd.init-r3
new file mode 100644
index 00000000..974696b
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd.init-r3
@@ -0,0 +1,50 @@
+#!/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/rspamd-1.4.1.ebuild b/mail-filter/rspamd/rspamd-1.4.1.ebuild
new file mode 100644
index 00000000..c10e32e
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-1.4.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils pax-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 libressl"
+
+RDEPEND="!libressl? ( dev-libs/openssl:0[-bindist] )
+		libressl? ( dev-libs/libressl:0 )
+		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
+	pax-mark m "${ED}"/usr/bin/rspamadm-*
+	pax-mark m "${ED}"/usr/bin/rspamd-*
+	newinitd "${FILESDIR}/rspamd.init-r3" 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] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2016-01-30 15:29 Dirkjan Ochtman
  0 siblings, 0 replies; 21+ messages in thread
From: Dirkjan Ochtman @ 2016-01-30 15:29 UTC (permalink / raw
  To: gentoo-commits

commit:     c40a1c9edc75e2c5be3d3ff7a2c360e938a2bf91
Author:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 30 15:28:57 2016 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Sat Jan 30 15:29:27 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c40a1c9e

mail-filter/rspamd: remove reload from init script for 1.1.2

Package-Manager: portage-2.2.26

 mail-filter/rspamd/files/rspamd.init-r1 | 43 +++++++++++++++++++++++++++++++++
 mail-filter/rspamd/rspamd-1.1.2.ebuild  |  2 +-
 2 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/mail-filter/rspamd/files/rspamd.init-r1 b/mail-filter/rspamd/files/rspamd.init-r1
new file mode 100644
index 0000000..d26c41d
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd.init-r1
@@ -0,0 +1,43 @@
+#!/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 $?
+}

diff --git a/mail-filter/rspamd/rspamd-1.1.2.ebuild b/mail-filter/rspamd/rspamd-1.1.2.ebuild
index c5ecabb..fead741 100644
--- a/mail-filter/rspamd/rspamd-1.1.2.ebuild
+++ b/mail-filter/rspamd/rspamd-1.1.2.ebuild
@@ -50,7 +50,7 @@ src_configure() {
 
 src_install() {
 	cmake-utils_src_install
-	newinitd "${FILESDIR}/rspamd.init" rspamd
+	newinitd "${FILESDIR}/rspamd.init-r1" rspamd
 
 	dodir /var/lib/rspamd
 	dodir /var/log/rspamd


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/
@ 2015-12-26 13:21 Dirkjan Ochtman
  0 siblings, 0 replies; 21+ messages in thread
From: Dirkjan Ochtman @ 2015-12-26 13:21 UTC (permalink / raw
  To: gentoo-commits

commit:     5ac1c4d8cdc5c1e313926b113e89b1f284a872f8
Author:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 26 13:20:48 2015 +0000
Commit:     Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
CommitDate: Sat Dec 26 13:21:24 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ac1c4d8

mail-filter/rspamd: new ebuild, from my overlay

 mail-filter/rspamd/Manifest               |  1 +
 mail-filter/rspamd/files/rspamd.init      | 44 ++++++++++++++++++++++++
 mail-filter/rspamd/files/rspamd.logrotate | 12 +++++++
 mail-filter/rspamd/metadata.xml           |  8 +++++
 mail-filter/rspamd/rspamd-1.0.11.ebuild   | 56 +++++++++++++++++++++++++++++++
 5 files changed, 121 insertions(+)

diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest
new file mode 100644
index 0000000..034db93
--- /dev/null
+++ b/mail-filter/rspamd/Manifest
@@ -0,0 +1 @@
+DIST rspamd-1.0.11.tar.xz 1176160 SHA256 b914c77c30dcab863f6c685b4a83a1662ee1b4503654fbf3ee3ae2fbca1ed928 SHA512 79464e8c29bdf5b081744b79fb8eee944bf647abf334cd77686a8fa4d0a3ab7ff4293fc464606d298fb57c8d7fe909e333ae7e58768330e4d65464bf42f76f15 WHIRLPOOL ca1f8338ef6f917622c8a93fa8bf230b2767d750e953d9f790649e660865caaa255c5a8eb35a14cb882acc193a237bf107d79c7c01f3d7ec6520301edc9f2629

diff --git a/mail-filter/rspamd/files/rspamd.init b/mail-filter/rspamd/files/rspamd.init
new file mode 100644
index 0000000..8ba2231
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd.init
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+PIDFILE=/var/run/rspamd/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}"
+	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/files/rspamd.logrotate b/mail-filter/rspamd/files/rspamd.logrotate
new file mode 100644
index 0000000..dca9cfa
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd.logrotate
@@ -0,0 +1,12 @@
+/var/log/rspamd/rspamd.log{
+       daily
+       rotate 4
+       delaycompress
+       compress
+       notifempty
+       missingok
+       postrotate
+          service rspamd reopenlog >/dev/null 2>&1 || true
+       endscript
+}
+

diff --git a/mail-filter/rspamd/metadata.xml b/mail-filter/rspamd/metadata.xml
new file mode 100644
index 0000000..56a1880
--- /dev/null
+++ b/mail-filter/rspamd/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer>
+    <email>djc@gentoo.org</email>
+    <name>Dirkjan Ochtman</name>
+  </maintainer>
+</pkgmetadata>

diff --git a/mail-filter/rspamd/rspamd-1.0.11.ebuild b/mail-filter/rspamd/rspamd-1.0.11.ebuild
new file mode 100644
index 0000000..54376f0
--- /dev/null
+++ b/mail-filter/rspamd/rspamd-1.0.11.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 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="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/libpcre
+		mail-filter/libmilter
+		mail-filter/opendkim
+		mail-filter/libspf2
+		dev-lang/luajit:2
+		dev-libs/libevent
+		dev-db/sqlite:3
+		dev-libs/glib:2
+		dev-libs/gmime
+		dev-libs/hiredis"
+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
+	)
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+	newinitd "${FILESDIR}/rspamd.init" rspamd
+
+	dodir /var/lib/rspamd
+	dodir /var/log/rspamd
+	dodir /var/run/rspamd
+	fowners rspamd:rspamd /var/lib/rspamd /var/log/rspamd /var/run/rspamd
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/rspamd.logrotate" rspamd
+}


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

end of thread, other threads:[~2023-05-29 10:59 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-04  8:06 [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/ Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2023-05-29 10:59 Andreas Sturmlechner
2023-01-26  7:23 Sam James
2022-12-24  8:59 Andreas Sturmlechner
2022-11-06  6:17 Sam James
2021-08-22  2:50 Sam James
2021-01-09 12:33 Sam James
2021-01-09 12:33 Sam James
2021-01-09 12:33 Sam James
2020-11-20 10:12 Joonas Niilola
2020-11-20 10:12 Joonas Niilola
2020-10-07 15:58 Sam James
2020-10-02  7:32 Joonas Niilola
2020-10-02  7:32 Joonas Niilola
2019-01-16  3:15 Thomas Deutschmann
2018-03-29 13:41 Dirkjan Ochtman
2017-05-05  9:40 Dirkjan Ochtman
2017-01-03 19:00 Dirkjan Ochtman
2016-12-18 15:41 Dirkjan Ochtman
2016-01-30 15:29 Dirkjan Ochtman
2015-12-26 13:21 Dirkjan Ochtman

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